This commit is contained in:
parent
e7ca2b8a42
commit
e4a55059a6
|
@ -91,6 +91,9 @@ card.extra={
|
|||
}
|
||||
}
|
||||
}
|
||||
else if(player.hasSha()){
|
||||
card={name:'sha'};
|
||||
}
|
||||
if(card){
|
||||
if(game.hasPlayer(function(current){
|
||||
return (ai.get.attitude(target,current)<0&&
|
||||
|
|
30
card/swd.js
30
card/swd.js
|
@ -1584,22 +1584,34 @@ card.swd={
|
|||
if(lib.config.mode=='stone'&&!player.isMin()){
|
||||
if(player.getActCount()+1>=player.actcount) return false;
|
||||
}
|
||||
var shas=target.get('h','sha');
|
||||
var ok=false;
|
||||
var shas=player.get('h','sha');
|
||||
if(shas.length>1){
|
||||
if(player.num('e','zhuge')) return 0;
|
||||
if(player.hasSkill('paoxiao')) return 0;
|
||||
if(player.hasSkill('fengnu')) return 0;
|
||||
if(!player.getStat().card.sha){
|
||||
if(player.hasSkill('tanlin3')) return 0;
|
||||
if(player.hasSkill('zhaxiang2')) return 0;
|
||||
}
|
||||
}
|
||||
var card;
|
||||
if(shas.length){
|
||||
for(var i=0;i<shas.length;i++){
|
||||
if(lib.filter.filterCard(shas[i],target)){
|
||||
ok=true;break;
|
||||
card=shas[i];break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ok){
|
||||
var card=target.get('h','sha',0);
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(ai.get.attitude(target,game.players[i])<0&&
|
||||
target.canUse(card,game.players[i],true,true)){
|
||||
if(ai.get.effect(game.players[i],card,target)>0) return 1;
|
||||
else if(player.hasSha()){
|
||||
card={name:'sha'};
|
||||
}
|
||||
if(card){
|
||||
if(game.hasPlayer(function(current){
|
||||
return (ai.get.attitude(target,current)<0&&
|
||||
target.canUse(card,current,true,true)&&
|
||||
ai.get.effect(current,card,target)>0);
|
||||
})){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
11
game/game.js
11
game/game.js
|
@ -34058,6 +34058,17 @@
|
|||
if(method=='attack') return m;
|
||||
return n;
|
||||
},
|
||||
cardUsable:function(player,card){
|
||||
var info=get.info(card);
|
||||
if(info.autoViewAs){
|
||||
card={name:info.autoViewAs,suit:card.suit,number:card.number};
|
||||
}
|
||||
var num=get.info(card).usable;
|
||||
if(typeof num=='function') num=num(card,player);
|
||||
num=game.checkMod(card,player,num,'cardUsable',player.get('s'));
|
||||
if(typeof num!='number') return Infinity;
|
||||
else return num-get.cardCount(card,player);
|
||||
},
|
||||
attackRange:function(player){
|
||||
var range=0;
|
||||
range=game.checkMod(player,player,range,'globalFrom',player.get('s'));
|
||||
|
|
Loading…
Reference in New Issue