This commit is contained in:
parent
1ea2b4b81b
commit
ee3f5d18df
|
@ -474,10 +474,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
'step 2'
|
||||
var target=result.targets[0];
|
||||
var hp=target.hp;
|
||||
target.reinit(target.name,event.nametarget);
|
||||
target.hp=target.maxHp;
|
||||
target.hp=Math.min(hp+1,target.maxHp);
|
||||
target.update();
|
||||
player.line(target,'green');
|
||||
'step 3'
|
||||
game.triggerEnter(target);
|
||||
},
|
||||
contentAfter:function(){
|
||||
var evt=_status.event.getParent('phaseUse');
|
||||
|
@ -2224,7 +2227,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
gw_aerdeyin:'阿尔德印',
|
||||
gw_aerdeyin_info:'对相邻的角色造成一点伤害,目标摸一张牌并移出游戏一轮,然后结束出牌阶段',
|
||||
gw_xinsheng:'新生',
|
||||
gw_xinsheng_info:'随机观看12张武将牌,选择一张替代一名角色的武将牌,然后结束出牌阶段',
|
||||
gw_xinsheng_info:'选择一名角色,随机观看12张武将牌,选择一张替代其武将牌,并令其增加一点体力,然后结束出牌阶段',
|
||||
gw_zhongmozhizhan:'终末之战',
|
||||
gw_zhongmozhizhan_info:'将所有角色区域内的所有牌置入弃牌堆(不触发技能),然后结束出牌阶段',
|
||||
gw_butianshu:'卜天术',
|
||||
|
|
|
@ -387,7 +387,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
for(var i=0;i<names.length;i++){
|
||||
if(game.countPlayer(function(current){
|
||||
return current!=player&&lib.filter.targetEnabled2({name:names[i]},player,current);
|
||||
return current!=player&&lib.filter.targetEnabled3({name:names[i]},player,current);
|
||||
})>1){
|
||||
return true;
|
||||
}
|
||||
|
@ -403,12 +403,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filterCard:function(card,player){
|
||||
if(!['basic','trick'].contains(get.type(card))) return false;
|
||||
return game.countPlayer(function(current){
|
||||
return current!=player&&lib.filter.targetEnabled2({name:card.name},player,current);
|
||||
return current!=player&&lib.filter.targetEnabled3({name:card.name},player,current);
|
||||
})>1;
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
if(player==target||!ui.selected.cards.length) return false;
|
||||
return lib.filter.targetEnabled2({name:ui.selected.cards[0].name},player,target);
|
||||
return lib.filter.targetEnabled3({name:ui.selected.cards[0].name},player,target);
|
||||
},
|
||||
targetprompt:['先出牌','后出牌'],
|
||||
selectTarget:2,
|
||||
|
|
15
game/game.js
15
game/game.js
|
@ -21152,7 +21152,7 @@
|
|||
lib.filter.cardUsable(card,player,event));
|
||||
},
|
||||
targetEnabled:function(card,player,target){
|
||||
if(card==undefined) return false;
|
||||
if(!card) return false;
|
||||
var info=get.info(card);
|
||||
var filter=info.filterTarget;
|
||||
var mod=game.checkMod(card,player,target,'unchanged','playerEnabled',player);
|
||||
|
@ -21166,7 +21166,7 @@
|
|||
},
|
||||
targetEnabled2:function(card,player,target){
|
||||
if(lib.filter.targetEnabled(card,player,target)) return true;
|
||||
if(card==undefined) return false;
|
||||
if(!card) return false;
|
||||
|
||||
if(game.checkMod(card,player,target,'unchanged','playerEnabled',player)==false) return false;
|
||||
if(game.checkMod(card,player,target,'unchanged','targetEnabled',target)==false) return false;
|
||||
|
@ -21175,6 +21175,17 @@
|
|||
if(typeof filter=='boolean') return filter;
|
||||
if(typeof filter=='function') return filter(card,player,target);
|
||||
return false;
|
||||
},
|
||||
targetEnabled3:function(card,player,target){
|
||||
if(!card) return false;
|
||||
var info=get.info(card);
|
||||
|
||||
if(info.filterTarget==true) return true;
|
||||
if(typeof info.filterTarget=='function'&&info.filterTarget(card,player,target)) return true;
|
||||
|
||||
if(info.modTarget==true) return true;
|
||||
if(typeof info.modTarget=='function'&&info.modTarget(card,player,target)) return true;
|
||||
return false;
|
||||
},
|
||||
targetInRange:function(card,player,target){
|
||||
var mod=game.checkMod(card,player,target,'unchanged','targetInRange',player);
|
||||
|
|
Loading…
Reference in New Issue