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(card){
|
||||||
if(game.hasPlayer(function(current){
|
if(game.hasPlayer(function(current){
|
||||||
return (ai.get.attitude(target,current)<0&&
|
return (ai.get.attitude(target,current)<0&&
|
||||||
|
|
32
card/swd.js
32
card/swd.js
|
@ -1584,22 +1584,34 @@ card.swd={
|
||||||
if(lib.config.mode=='stone'&&!player.isMin()){
|
if(lib.config.mode=='stone'&&!player.isMin()){
|
||||||
if(player.getActCount()+1>=player.actcount) return false;
|
if(player.getActCount()+1>=player.actcount) return false;
|
||||||
}
|
}
|
||||||
var shas=target.get('h','sha');
|
var shas=player.get('h','sha');
|
||||||
var ok=false;
|
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){
|
if(shas.length){
|
||||||
for(var i=0;i<shas.length;i++){
|
for(var i=0;i<shas.length;i++){
|
||||||
if(lib.filter.filterCard(shas[i],target)){
|
if(lib.filter.filterCard(shas[i],target)){
|
||||||
ok=true;break;
|
card=shas[i];break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(ok){
|
else if(player.hasSha()){
|
||||||
var card=target.get('h','sha',0);
|
card={name:'sha'};
|
||||||
for(var i=0;i<game.players.length;i++){
|
}
|
||||||
if(ai.get.attitude(target,game.players[i])<0&&
|
if(card){
|
||||||
target.canUse(card,game.players[i],true,true)){
|
if(game.hasPlayer(function(current){
|
||||||
if(ai.get.effect(game.players[i],card,target)>0) return 1;
|
return (ai.get.attitude(target,current)<0&&
|
||||||
}
|
target.canUse(card,current,true,true)&&
|
||||||
|
ai.get.effect(current,card,target)>0);
|
||||||
|
})){
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
11
game/game.js
11
game/game.js
|
@ -34058,6 +34058,17 @@
|
||||||
if(method=='attack') return m;
|
if(method=='attack') return m;
|
||||||
return n;
|
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){
|
attackRange:function(player){
|
||||||
var range=0;
|
var range=0;
|
||||||
range=game.checkMod(player,player,range,'globalFrom',player.get('s'));
|
range=game.checkMod(player,player,range,'globalFrom',player.get('s'));
|
||||||
|
|
Loading…
Reference in New Issue