This commit is contained in:
parent
86a175d260
commit
124e82a11b
|
@ -25,18 +25,33 @@ card.zhenfa={
|
||||||
type:'zhenfa',
|
type:'zhenfa',
|
||||||
chongzhu:true,
|
chongzhu:true,
|
||||||
enable:function(card,player){
|
enable:function(card,player){
|
||||||
if(player.identity=='unknown') return false;
|
if(player.inline()) return true;
|
||||||
return player.next.identity==player.identity||player.previous.identity==player.identity;
|
if(player.identity=='unknown'||player.identity=='ye') return false;
|
||||||
|
return game.hasPlayer(function(current){
|
||||||
|
return current!=player&¤t.isFriendOf(player);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
if(player==target) return player.inline();
|
if(player.inline()) return player.inline(target);
|
||||||
return player.inline(target);
|
if(!player.getNext()) return false;
|
||||||
|
var list=game.filterPlayer(function(current){
|
||||||
|
return current!=player&¤t.isFriendOf(player);
|
||||||
|
});
|
||||||
|
list.sort(function(a,b){
|
||||||
|
return get.distance(player,a,'absolute')-get.distance(player,b,'absolute');
|
||||||
|
});
|
||||||
|
return target==list[0];
|
||||||
},
|
},
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
multitarget:true,
|
multitarget:true,
|
||||||
multiline:true,
|
multiline:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
game.asyncDraw(targets);
|
if(targets.length==1){
|
||||||
|
game.swapSeat(targets[0],game.me.getNext(),true,true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
game.asyncDraw(targets);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mode:['guozhan'],
|
mode:['guozhan'],
|
||||||
ai:{
|
ai:{
|
||||||
|
@ -149,33 +164,31 @@ card.zhenfa={
|
||||||
type:'zhenfa',
|
type:'zhenfa',
|
||||||
chongzhu:true,
|
chongzhu:true,
|
||||||
enable:function(card,player){
|
enable:function(card,player){
|
||||||
if(player.identity=='unknown'||player.identity=='ye') return false;
|
return player.siege()||player.sieged();
|
||||||
return (get.population(player.identity)>1)
|
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target.identity==player.identity;
|
return target==player;
|
||||||
},
|
},
|
||||||
multitarget:true,
|
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
content:function(){
|
content:function(){
|
||||||
lib.temp=targets[0];
|
'step 0'
|
||||||
targets.sort(lib.sort.seat);
|
event.targets=game.filterPlayer(function(current){
|
||||||
var rest=game.players.slice(0);
|
return current.siege(player);
|
||||||
rest.remove(targets);
|
});
|
||||||
rest.sort(function(a,b){
|
'step 1'
|
||||||
if(a.identity=='unknown') return 1;
|
if(event.targets.length){
|
||||||
else return -1;
|
var current=event.targets.shift();
|
||||||
})
|
player.line(current,'green');
|
||||||
lib.temp={};
|
player.discardPlayerCard(current,true);
|
||||||
if(targets.length>rest.length+1) targets.length=rest.length+1;
|
event.redo();
|
||||||
for(var i=1;i<targets.length;i++){
|
|
||||||
game.swapSeat(targets[i],targets[i-1].next.next,false);
|
|
||||||
game.swapSeat(rest[i-1],targets[i-1].next,false);
|
|
||||||
}
|
}
|
||||||
if(rest[targets.length-1]){
|
'step 2'
|
||||||
game.swapSeat(rest[targets.length-1],targets[targets.length-1].next,false);
|
var list=game.filterPlayer(function(current){
|
||||||
|
return current.sieged(player);
|
||||||
|
});
|
||||||
|
if(list.length){
|
||||||
|
player.useCard({name:'sha'},list,false);
|
||||||
}
|
}
|
||||||
game.log(get.translation(player.identity)+'势力角色摆成了七星阵')
|
|
||||||
},
|
},
|
||||||
mode:['guozhan'],
|
mode:['guozhan'],
|
||||||
ai:{
|
ai:{
|
||||||
|
@ -354,15 +367,15 @@ card.zhenfa={
|
||||||
huyizhen:'虎翼阵',
|
huyizhen:'虎翼阵',
|
||||||
niaoxiangzhen:'鸟翔阵',
|
niaoxiangzhen:'鸟翔阵',
|
||||||
niaoxiangzhen_info:'令所有非你阵营的队列的角色今次打出一张闪,或者受到一点伤害',
|
niaoxiangzhen_info:'令所有非你阵营的队列的角色今次打出一张闪,或者受到一点伤害',
|
||||||
huyizhen_info:'将一张非基本牌当作杀对你围攻的角色使用',
|
qixingzhen_info:'弃置所有围攻你的角色各一张牌,然后视为对所有你围攻的角色使用一张不计入出杀次数的杀',
|
||||||
longfeizhen_info:'弃置围攻你的角色各一张牌,然后摸一张牌',
|
// longfeizhen_info:'弃置围攻你的角色各一张牌,然后摸一张牌',
|
||||||
qixingzhen_info:'令我方所有角色进入围攻状态',
|
// qixingzhen_info:'令我方所有角色进入围攻状态',
|
||||||
shepanzhen_info:'令我方所有角色进入队列状态',
|
// shepanzhen_info:'令我方所有角色进入队列状态',
|
||||||
yunchuizhen_info:'令所有围攻角色获得技能【无双】,直到其首次造成伤害',
|
// yunchuizhen_info:'令所有围攻角色获得技能【无双】,直到其首次造成伤害',
|
||||||
fengyangzhen_info:'令所有被围攻角色获得技能【飞影】,直到其首次受到伤害',
|
// fengyangzhen_info:'令所有被围攻角色获得技能【飞影】,直到其首次受到伤害',
|
||||||
dizaizhen_info:'所有小势力角色摸一张牌',
|
dizaizhen_info:'所有小势力角色摸一张牌',
|
||||||
changshezhen_info:'与你同一队列的所有角色摸一张牌',
|
changshezhen_info:'若你处于队列中,与你同一队列的所有角色摸一张牌,否则将与你逆时针距离最近的同势力角色移至你下家',
|
||||||
pozhenjue_info:'将所有角色的顺序随机重排',
|
// pozhenjue_info:'将所有角色的顺序随机重排',
|
||||||
tianfuzhen_info:'所有大势力角色弃置一张牌'
|
tianfuzhen_info:'所有大势力角色弃置一张牌'
|
||||||
},
|
},
|
||||||
list:[
|
list:[
|
||||||
|
@ -392,24 +405,24 @@ card.zhenfa={
|
||||||
// ["heart",5,'zhonghuangzhen'],
|
// ["heart",5,'zhonghuangzhen'],
|
||||||
|
|
||||||
// ["diamond",6,'huyizhen'],
|
// ["diamond",6,'huyizhen'],
|
||||||
["club",6,'huyizhen'],
|
// ["club",6,'huyizhen'],
|
||||||
["spade",6,'huyizhen'],
|
// ["spade",6,'huyizhen'],
|
||||||
// ["heart",6,'huyizhen'],
|
// ["heart",6,'huyizhen'],
|
||||||
|
|
||||||
// ["diamond",7,'qixingzhen'],
|
["diamond",7,'qixingzhen'],
|
||||||
// ["club",7,'qixingzhen'],
|
["club",7,'qixingzhen'],
|
||||||
// ["spade",7,'qixingzhen'],
|
["spade",7,'qixingzhen'],
|
||||||
// ["heart",7,'qixingzhen'],
|
// ["heart",7,'qixingzhen'],
|
||||||
|
|
||||||
["diamond",8,'shepanzhen'],
|
// ["diamond",8,'shepanzhen'],
|
||||||
// ["club",8,'shepanzhen'],
|
// ["club",8,'shepanzhen'],
|
||||||
// ["spade",8,'shepanzhen'],
|
// ["spade",8,'shepanzhen'],
|
||||||
["heart",8,'shepanzhen'],
|
// ["heart",8,'shepanzhen'],
|
||||||
|
|
||||||
// ["diamond",9,'longfeizhen'],
|
// ["diamond",9,'longfeizhen'],
|
||||||
["club",9,'longfeizhen'],
|
// ["club",9,'longfeizhen'],
|
||||||
// ["spade",9,'longfeizhen'],
|
// ["spade",9,'longfeizhen'],
|
||||||
["heart",9,'longfeizhen'],
|
// ["heart",9,'longfeizhen'],
|
||||||
|
|
||||||
["diamond",11,'niaoxiangzhen'],
|
["diamond",11,'niaoxiangzhen'],
|
||||||
// ["club",11,'niaoxiangzhen'],
|
// ["club",11,'niaoxiangzhen'],
|
||||||
|
@ -421,7 +434,7 @@ card.zhenfa={
|
||||||
// ["spade",12,'yunchuizhen'],
|
// ["spade",12,'yunchuizhen'],
|
||||||
// ["heart",12,'yunchuizhen'],
|
// ["heart",12,'yunchuizhen'],
|
||||||
|
|
||||||
["diamond",13,'pozhenjue'],
|
// ["diamond",13,'pozhenjue'],
|
||||||
// ["club",13,'pozhenjue'],
|
// ["club",13,'pozhenjue'],
|
||||||
// ["spade",13,'pozhenjue'],
|
// ["spade",13,'pozhenjue'],
|
||||||
//["heart",13,'pozhenjue'],
|
//["heart",13,'pozhenjue'],
|
||||||
|
|
|
@ -761,7 +761,11 @@ character.standard={
|
||||||
if(player.isUnderControl()){
|
if(player.isUnderControl()){
|
||||||
game.modeSwapPlayer(player);
|
game.modeSwapPlayer(player);
|
||||||
}
|
}
|
||||||
var cards=get.cards(Math.min(5,game.countPlayer()));
|
var num=Math.min(5,game.countPlayer());
|
||||||
|
if(player.hasSkill('yizhi')&&player.hasSkill('guanxing')){
|
||||||
|
num=5;
|
||||||
|
}
|
||||||
|
var cards=get.cards(num);
|
||||||
event.cards=cards;
|
event.cards=cards;
|
||||||
var switchToAuto=function(){
|
var switchToAuto=function(){
|
||||||
_status.imchoosing=false;
|
_status.imchoosing=false;
|
||||||
|
|
15
game/game.js
15
game/game.js
|
@ -5857,7 +5857,6 @@
|
||||||
game.saveConfig('characters',lib.config.all.characters);
|
game.saveConfig('characters',lib.config.all.characters);
|
||||||
game.saveConfig('cards',lib.config.all.cards);
|
game.saveConfig('cards',lib.config.all.cards);
|
||||||
game.saveConfig('plays',['cardpile']);
|
game.saveConfig('plays',['cardpile']);
|
||||||
game.saveConfig('hiddenCardPack',['zhenfa']);
|
|
||||||
game.saveConfig('hiddenPlayPack',['character', 'soldier', 'weather']);
|
game.saveConfig('hiddenPlayPack',['character', 'soldier', 'weather']);
|
||||||
game.saveConfig('tao_enemy',true);
|
game.saveConfig('tao_enemy',true);
|
||||||
game.saveConfig('layout','long2');
|
game.saveConfig('layout','long2');
|
||||||
|
@ -17200,6 +17199,7 @@
|
||||||
lib.skill[i]=lib.init.eval(mode.skill[i]);
|
lib.skill[i]=lib.init.eval(mode.skill[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
game.finishCards();
|
||||||
_status.event={
|
_status.event={
|
||||||
finished:true,
|
finished:true,
|
||||||
next:[],
|
next:[],
|
||||||
|
@ -17275,6 +17275,7 @@
|
||||||
lib.skill[i]=lib.init.eval(mode.skill[i]);
|
lib.skill[i]=lib.init.eval(mode.skill[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
game.finishCards();
|
||||||
if(mode.characterPack){
|
if(mode.characterPack){
|
||||||
for(var i in mode.characterPack){
|
for(var i in mode.characterPack){
|
||||||
lib.characterPack[i]=mode.characterPack[i];
|
lib.characterPack[i]=mode.characterPack[i];
|
||||||
|
@ -21114,6 +21115,7 @@
|
||||||
catch(e){
|
catch(e){
|
||||||
game.print('游戏出错:'+event.name);
|
game.print('游戏出错:'+event.name);
|
||||||
game.print(e.toString());
|
game.print(e.toString());
|
||||||
|
console.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -36701,14 +36703,11 @@
|
||||||
if(node==game.me&&node.hiddenSkills.length){
|
if(node==game.me&&node.hiddenSkills.length){
|
||||||
skills.addArray(node.hiddenSkills);
|
skills.addArray(node.hiddenSkills);
|
||||||
}
|
}
|
||||||
if(node.awakenedSkills.length){
|
for(var i in node.disabledSkills){
|
||||||
for(var i=0;i<node.awakenedSkills.length;i++){
|
if(node.disabledSkills[i].length==1&&node.disabledSkills[i][0]==i+'_awake'){
|
||||||
if(node.disabledSkills[node.awakenedSkills[i]]&&
|
skills.push(i);
|
||||||
node.disabledSkills[node.awakenedSkills[i]].length==1){
|
|
||||||
skills.push(node.awakenedSkills[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(i=0;i<skills.length;i++){
|
for(i=0;i<skills.length;i++){
|
||||||
if(lib.skill[skills[i]]&&lib.skill[skills[i]].nopop) continue;
|
if(lib.skill[skills[i]]&&lib.skill[skills[i]].nopop) continue;
|
||||||
if(lib.translate[skills[i]+'_info']){
|
if(lib.translate[skills[i]+'_info']){
|
||||||
|
|
|
@ -22,7 +22,7 @@ card.pack={
|
||||||
extra:'军争',
|
extra:'军争',
|
||||||
sp:'SP',
|
sp:'SP',
|
||||||
guozhan:'国战',
|
guozhan:'国战',
|
||||||
// zhenfa:'阵法',
|
zhenfa:'阵法',
|
||||||
yunchou:'运筹帷幄',
|
yunchou:'运筹帷幄',
|
||||||
swd:'轩辕剑',
|
swd:'轩辕剑',
|
||||||
gujian:'古剑奇谭',
|
gujian:'古剑奇谭',
|
||||||
|
|
|
@ -72,7 +72,6 @@ mode.guozhan={
|
||||||
if(lib.configOL.guozhanpile){
|
if(lib.configOL.guozhanpile){
|
||||||
lib.card.list=lib.guozhanPile.slice(0);
|
lib.card.list=lib.guozhanPile.slice(0);
|
||||||
}
|
}
|
||||||
game.randomMapOL();
|
|
||||||
game.broadcastAll(function(pack){
|
game.broadcastAll(function(pack){
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
game.players[i].node.name.hide();
|
game.players[i].node.name.hide();
|
||||||
|
@ -92,6 +91,7 @@ mode.guozhan={
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},lib.characterPack.mode_guozhan);
|
},lib.characterPack.mode_guozhan);
|
||||||
|
game.randomMapOL();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
@ -235,7 +235,7 @@ mode.guozhan={
|
||||||
// gz_dengai:['male','wei',4,['tuntian','ziliang','gzjixi']],
|
// gz_dengai:['male','wei',4,['tuntian','ziliang','gzjixi']],
|
||||||
// gz_caohong:['male','wei',4,['huyuan','heyi']],
|
// gz_caohong:['male','wei',4,['huyuan','heyi']],
|
||||||
// gz_jiangfei:['male','shu',3,['shengxi','gzshoucheng']],
|
// gz_jiangfei:['male','shu',3,['shengxi','gzshoucheng']],
|
||||||
// gz_jiangwei:['male','shu',4,['tiaoxin','yizhi','tianfu']],
|
gz_jiangwei:['male','shu',4,['tiaoxin','yizhi','tianfu']],
|
||||||
// gz_xusheng:['male','wu',4,['yicheng']],
|
// gz_xusheng:['male','wu',4,['yicheng']],
|
||||||
gz_jiangqing:['male','wu',4,['gzshangyi','niaoxiang']],
|
gz_jiangqing:['male','wu',4,['gzshangyi','niaoxiang']],
|
||||||
gz_hetaihou:['female','qun',3,['zhendu','qiluan']],
|
gz_hetaihou:['female','qun',3,['zhendu','qiluan']],
|
||||||
|
@ -257,6 +257,27 @@ mode.guozhan={
|
||||||
zoushi:'军阀张济之妻,张绣之婶。张绣降曹后,邹氏遂被曹操霸占。贾诩献计趁机诛杀曹操,险些得手。曹操在损失爱将典韦、侄子曹安民和长子曹昂后方才逃出生天。',
|
zoushi:'军阀张济之妻,张绣之婶。张绣降曹后,邹氏遂被曹操霸占。贾诩献计趁机诛杀曹操,险些得手。曹操在损失爱将典韦、侄子曹安民和长子曹昂后方才逃出生天。',
|
||||||
},
|
},
|
||||||
skill:{
|
skill:{
|
||||||
|
tianfu:{
|
||||||
|
init:function(player){
|
||||||
|
player.checkMainSkill('tianfu');
|
||||||
|
},
|
||||||
|
inherit:'kanpo',
|
||||||
|
zhenfa:'inline',
|
||||||
|
viewAsFilter:function(player){
|
||||||
|
return _status.currentPhase.inline(player)&&!player.hasSkill('kanpo')&&player.num('h',{color:'black'})>0;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
yizhi:{
|
||||||
|
init:function(player){
|
||||||
|
if(player.checkViceSkill('yizhi')){
|
||||||
|
player.removeMaxHp();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
inherit:'guanxing',
|
||||||
|
filter:function(event,player){
|
||||||
|
return !player.hasSkill('guanxing');
|
||||||
|
}
|
||||||
|
},
|
||||||
gzshangyi:{
|
gzshangyi:{
|
||||||
audio:'shangyi',
|
audio:'shangyi',
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
|
@ -1308,7 +1329,16 @@ mode.guozhan={
|
||||||
else{
|
else{
|
||||||
event.current.showCharacter(1);
|
event.current.showCharacter(1);
|
||||||
}
|
}
|
||||||
event.goto(num);
|
if(event.current.identity=='ye'||num!=1){
|
||||||
|
if(event.dir){
|
||||||
|
event.dir=false;
|
||||||
|
event.current=player;
|
||||||
|
event.goto(num);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
event.goto(num);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(event.dir){
|
else if(event.dir){
|
||||||
event.dir=false;
|
event.dir=false;
|
||||||
|
@ -2009,6 +2039,7 @@ mode.guozhan={
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(var j=0;j<game.players[i].hiddenSkills.length;j++){
|
for(var j=0;j<game.players[i].hiddenSkills.length;j++){
|
||||||
|
game.players[i].name1=game.players[i].name;
|
||||||
game.players[i].addSkillTrigger(game.players[i].hiddenSkills[j],true);
|
game.players[i].addSkillTrigger(game.players[i].hiddenSkills[j],true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2419,8 +2450,7 @@ mode.guozhan={
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(disable!==false){
|
if(disable!==false){
|
||||||
this.disableSkill(skill,skill);
|
this.awakenSkill(skill);
|
||||||
this.awakenedSkills.add(skill);
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2431,8 +2461,7 @@ mode.guozhan={
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(disable!==false){
|
if(disable!==false){
|
||||||
this.disableSkill(skill,skill);
|
this.awakenSkill(skill);
|
||||||
this.awakenedSkills.add(skill);
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue