This commit is contained in:
Spmario233 2024-02-29 22:11:31 +08:00
parent c8afa70bb7
commit 2c66172a56
3 changed files with 6 additions and 6 deletions

View File

@ -801,7 +801,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
target.draw(); target.draw();
}, },
destroy:function(card,targetPosition,player,event){ destroy:function(card,targetPosition,player,event){
if(event.name!='lose'||event.name!='cardsDiscard'||targetPosition!='discardPile') return false; if((event.name!='lose'&&event.name!='cardsDiscard')||targetPosition!='discardPile') return false;
var evt=event.getParent().relatedEvent; var evt=event.getParent().relatedEvent;
if(evt&&evt.name=='useCard') return false; if(evt&&evt.name=='useCard') return false;
return true; return true;

View File

@ -1043,14 +1043,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(bool){ if(bool){
const name=links.find(i=>typeof i=='string'),card=links.find(j=>j!=name),cardname=map[name]; const name=links.find(i=>typeof i=='string'),card=links.find(j=>j!=name),cardname=map[name];
const {result:{bool,targets}}=await player.chooseTarget('请选择【'+name+''+get.translation(card)+')】置入的目标',(cardx,player,target)=>{ const {result:{bool,targets}}=await player.chooseTarget('请选择【'+name+''+get.translation(card)+')】置入的目标',(cardx,player,target)=>{
return target.canAddJudge(get.autoViewAs({name:'dczixi_'+get.event('name')},[get.event('card')])); return target.canAddJudge(get.autoViewAs({name:'dczixi_'+get.event('cardname')},[get.event('card')]));
},true).set('ai',target=>{ },true).set('ai',target=>{
const player=get.event('player'),card=get.event('card'); const player=get.event('player'),card=get.event('card');
if(game.hasPlayer(current=>{ if(game.hasPlayer(current=>{
return get.attitude(player,current)<0&&current.canAddJudge(get.autoViewAs({name:'dczixi_'+get.event('name')},[card])); return get.attitude(player,current)<0&&current.canAddJudge(get.autoViewAs({name:'dczixi_'+get.event('cardname')},[card]));
})) return -target.countCards('j')-1; })) return -target.countCards('j')-1;
return target.countCards('j')+1; return target.countCards('j')+1;
}).set('card',card).set('name',cardname); }).set('card',card).set('cardname',cardname);
if(bool){ if(bool){
const target=targets[0]; const target=targets[0];
player.logSkill('dczixi',target); player.logSkill('dczixi',target);

View File

@ -543,7 +543,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'令其摸一张牌', '令其摸一张牌',
][['豹','鹰','熊','兔'].indexOf(zhoufa)]:'令其随机执行一个效果'; ][['豹','鹰','熊','兔'].indexOf(zhoufa)]:'令其随机执行一个效果';
const {result:{bool,targets}}=await player.chooseTarget(get.prompt('shoufa'),'选择一名距离'+(event.triggername=='damageEnd'?'':'不')+'大于2的角色'+str,(card,player,target)=>{ const {result:{bool,targets}}=await player.chooseTarget(get.prompt('shoufa'),'选择一名距离'+(event.triggername=='damageEnd'?'':'不')+'大于2的角色'+str,(card,player,target)=>{
const name=_status.event.name; const name=_status.event.triggername;
if(name=='damageEnd'&&get.distance(player,target)<=2) return false; if(name=='damageEnd'&&get.distance(player,target)<=2) return false;
if(name=='damageSource'&&get.distance(player,target)>2) return false; if(name=='damageSource'&&get.distance(player,target)>2) return false;
const zhoufa=player.storage.zhoulin_zhoufa; const zhoufa=player.storage.zhoulin_zhoufa;
@ -570,7 +570,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
case '兔': case '兔':
return get.effect(target,{name:'draw'},player,player); return get.effect(target,{name:'draw'},player,player);
} }
}).set('name',event.triggername); }).set('triggername',event.triggername);
if(!bool) return; if(!bool) return;
const target=targets[0]; const target=targets[0];
player.logSkill('shoufa',target); player.logSkill('shoufa',target);