From 5f8c320b22aca9c19ec6496c0e988fa3518d0aa4 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Wed, 13 Sep 2023 19:36:33 +0800 Subject: [PATCH] game.washCard --- character/yijiang.js | 10 +---- game/game.js | 91 +++++++++++++++++--------------------------- mode/boss.js | 34 +++++++++-------- 3 files changed, 54 insertions(+), 81 deletions(-) diff --git a/character/yijiang.js b/character/yijiang.js index d12e30d6c..3cbae6bed 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -4305,7 +4305,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:true, animationColor:'wood', onWash:function(){ - _status.event.getParent('fuzhu').washed=false; + _status.event.getParent('fuzhu').washed=true; return 'remove'; }, content:function(){ @@ -4319,19 +4319,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return card.name=='sha'&&player.canUse(card,trigger.player,false); }); if(card){ - card.remove(); - game.updateRoundNumber(); player.useCard(card,trigger.player,false); } 'step 2' if(event.total>0&&!event.washed&&ui.cardPile.childElementCount<=player.hp*10&&trigger.player.isIn()) event.goto(1); 'step 3' lib.onwash.remove(lib.skill.fuzhu.onWash); - var cards=get.cards(ui.cardPile.childElementCount+1); - for(var i=0;i{ + if(_status.maxShuffle!=undefined){ + if(_status.maxShuffle==0){ + if(_status.maxShuffleCheck){ + game.over(_status.maxShuffleCheck()); + } + else{ + game.over('平局'); + } + return []; + } + _status.maxShuffle--; + } + game.shuffleNumber++; + const cards=Array.from(ui.cardPile); + if(_status.discarded){ + _status.discarded.length=0; + } + for(let i=0;i{ @@ -54512,34 +54543,7 @@ if(num<0) num=1; while(num--){ if(ui.cardPile.hasChildNodes()==false){ - if(_status.maxShuffle!=undefined){ - if(_status.maxShuffle==0){ - if(_status.maxShuffleCheck){ - game.over(_status.maxShuffleCheck()); - } - else{ - game.over('平局'); - } - return []; - } - _status.maxShuffle--; - } - game.shuffleNumber++; - var cards=[],i; - if(_status.discarded){ - _status.discarded.length=0; - } - for(i=0;i0) player.disableEquip(disables); - }, + if(disables.length>0) player.disableEquip(disables); + }, + } }, }, /*