Update xianding.js

This commit is contained in:
mengxinzxz 2023-09-02 01:10:53 +08:00 committed by GitHub
parent 2bb31c2a5e
commit b3e9289991
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -97,8 +97,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var player=event.player; var player=event.player;
var evtx=event.getParent('phaseUse'); var evtx=event.getParent('phaseUse');
var suits=lib.suit.slice(0).reverse(); var suits=lib.suit.slice(0).reverse();
suits=suits.filter(suit=>!player.getStorage('dcposuo_suits').contains(suit)); suits=suits.filter(suit=>!player.getStorage('dcposuo_suits').contains(suit)&&player.countCards('hs',card=>get.suit(card,player)==suit));
if(!suits.length||!player.countCards('hs',card=>suits.contains(get.suit(card,player)))||player.getHistory('sourceDamage',evt=>{ if(!suits.length||player.getHistory('sourceDamage',evt=>{
return evt.player!=player&&evt.getParent('phaseUse')==evtx; return evt.player!=player&&evt.getParent('phaseUse')==evtx;
}).length) event.set('dcposuo_cards',undefined); }).length) event.set('dcposuo_cards',undefined);
else{ else{
@ -160,7 +160,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
precontent:function(){ precontent:function(){
player.logSkill('dcposuo'); player.logSkill('dcposuo');
delete event.result.skill; delete event.result.skill;
player.addTempSkill('dcposuo_suits'); player.addTempSkill('dcposuo_suits','phaseUseAfter');
player.markAuto('dcposuo_suits',[get.suit(event.result.cards[0])]); player.markAuto('dcposuo_suits',[get.suit(event.result.cards[0])]);
}, },
} }