never ending bug fix
This commit is contained in:
parent
3f83f02193
commit
6a20717488
|
@ -580,12 +580,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ai:{
|
||||
order:7,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
player:function(player,target){
|
||||
var name=(target.countCards('h')>player.countCards('h')?'tuixinzhifu':'chenghuodajie');
|
||||
var list=[];
|
||||
if(ui.selected.cards.length) list.addArray(ui.selected.cards);
|
||||
var card=get.autoViewAs({name:name},list);
|
||||
return get.effect(card,target,player);
|
||||
return get.effect(target,card,player,player);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1482,8 +1482,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return player.group=='qun';
|
||||
},
|
||||
filterCard:lib.filter.cardRecastable,
|
||||
check:function(card,player){
|
||||
var val=5+['shan','tao'].contains(get.name(card))*1.5;
|
||||
check:function(card){
|
||||
var player=_status.event.player,val=5+['shan','tao'].contains(get.name(card))*1.5;
|
||||
if(player.needsToDiscard()>2&&get.name(card)=='sha'&&player.countCards('hs','sha')>1) val+=0.5;
|
||||
return val-get.value(card);
|
||||
},
|
||||
|
|
|
@ -7034,9 +7034,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var source=event.source;
|
||||
if(!source) return false;
|
||||
var cards=source.getEquips(1);
|
||||
return cards.length&&cards.some(card=>lib.filter.canBeGained(card,player,source));
|
||||
return cards.some(card=>lib.filter.canBeGained(card,player,source));
|
||||
},
|
||||
prompt2:function(event){
|
||||
prompt2:function(event,player){
|
||||
var source=event.source;
|
||||
var cards=source.getEquips(1).filter(card=>lib.filter.canBeGained(card,player,source));
|
||||
return '获得其装备区中的'+get.translation(cards);
|
||||
|
|
|
@ -1014,19 +1014,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
})>1) return 'equip5';
|
||||
});
|
||||
'step 1'
|
||||
if(result.control=='equip1'){
|
||||
switch(result.control){
|
||||
case 'equip1':
|
||||
player.addTempSkill('drlt_jueyan1',{player:'phaseAfter'});
|
||||
};
|
||||
if(result.control=='equip2'){
|
||||
break;
|
||||
case 'equip2':
|
||||
player.draw(3);
|
||||
player.addTempSkill('drlt_jueyan3',{player:'phaseAfter'});
|
||||
};
|
||||
if(result.control=='equip6'){
|
||||
break;
|
||||
case 'equip3_4':
|
||||
player.addTempSkill('drlt_jueyan2',{player:'phaseAfter'});
|
||||
};
|
||||
if(result.control=='equip5'){
|
||||
break;
|
||||
case 'equip5':
|
||||
player.addTempSkill('rejizhi',{player:'phaseAfter'});
|
||||
};
|
||||
break;
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
order:13,
|
||||
|
|
|
@ -10736,8 +10736,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
selectTarget:[1,Infinity],
|
||||
content:function(){
|
||||
'step 0'
|
||||
if(!target.countCards('he')) event.finish();
|
||||
else target.chooseCard('he','交给'+get.translation(player)+'一张牌',true);
|
||||
if(!target.countCards('h')) event.finish();
|
||||
else target.chooseCard('h','交给'+get.translation(player)+'一张牌',true);
|
||||
'step 1'
|
||||
target.give(result.cards,player);
|
||||
'step 2'
|
||||
|
|
|
@ -514,7 +514,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var mod=game.checkMod(card,player,source,'unchanged','cardEnabled',source);
|
||||
if(mod!='unchanged') return mod;
|
||||
if(typeof filter=='boolean') return filter;
|
||||
if(typeof filter=='function') return filter(card,player,event);
|
||||
if(typeof filter=='function') return filter(card,source,event);
|
||||
}
|
||||
},
|
||||
cardUsable:function(card,player,num){
|
||||
|
@ -10715,6 +10715,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
event.finish();
|
||||
return;
|
||||
}
|
||||
if(game.hasPlayer(current=>{
|
||||
return current.countCards('he')>0&¤t!=player&¤t!=target;
|
||||
})){
|
||||
var color=get.color(result.cards[0],result.cards[0].original=='j'?false:target);
|
||||
event.color=color;
|
||||
var next=player.chooseTarget(true,'挫锐:选择另一名其他角色','弃置该角色装备区里至多两张'+get.translation(event.color)+'牌;或展示该角色的至多两张手牌,然后获得其中的'+get.translation(event.color)+'牌');
|
||||
|
@ -10724,6 +10727,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
next.set('ai',target=>{
|
||||
return -get.attitude(_status.event.player,target)*target.countCards('he')+0.1;
|
||||
});
|
||||
}
|
||||
else event.finish();
|
||||
'step 8'
|
||||
if(result.bool){
|
||||
var targetx=result.targets[0];
|
||||
|
|
|
@ -16486,7 +16486,7 @@
|
|||
}
|
||||
}
|
||||
if(card.name=='wuxie'){
|
||||
game.logv(player,[card,cards],[evt.card]);
|
||||
game.logv(player,[card,cards],[event.getTrigger().card]);
|
||||
}
|
||||
else{
|
||||
game.logv(player,[card,cards],targets);
|
||||
|
|
Loading…
Reference in New Issue