From 3f040275db9a85018be6774838cda7c380d3bc81 Mon Sep 17 00:00:00 2001 From: libccy Date: Wed, 29 Mar 2017 14:31:50 +0800 Subject: [PATCH] v --- game/game.js | 18 ++++++++++-------- mode/versus.js | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/game/game.js b/game/game.js index c49104125..082c81e8d 100644 --- a/game/game.js +++ b/game/game.js @@ -8845,7 +8845,7 @@ event.fakeforce=false; } } - if(event.player.isUnderControl()){ + if(event.player.isUnderControl()||(event.player.handcardsVisible&&event.player!=game.me)){ event.result={ bool:false } @@ -10023,7 +10023,7 @@ event.dialog.add('手牌'); var hs=target.getCards('h'); hs.randomSort(); - if(event.visible||target.isUnderControl(true)){ + if(event.visible||target.isUnderControl(true)||target.handcardsVisible){ event.dialog.add(hs); directh=false; } @@ -10117,7 +10117,7 @@ event.dialog.add('手牌'); var hs=target.getCards('h'); hs.randomSort(); - if(event.visible||target.isUnderControl(true)){ + if(event.visible||target.isUnderControl(true)||target.handcardsVisible){ event.dialog.add(hs); directh=false; } @@ -10228,7 +10228,7 @@ event.dialog.add('手牌'); var hs=target.getCards('h'); hs.randomSort(); - if(event.visible||target.isUnderControl(true)){ + if(event.visible||target.isUnderControl(true)||target.handcardsVisible){ event.dialog.add(hs); directh=false; } @@ -16504,7 +16504,9 @@ $giveAuto:function(card,player){ if(Array.isArray(card)&&card.length==0) return; var args=Array.from(arguments); - if(_status.connectMode||(!this.isUnderControl(true)&&!player.isUnderControl(true))){ + if(_status.connectMode||( + !this.isUnderControl(true)&&!player.isUnderControl(true)&& + !this.handcardsVisible&&!player.handcardsVisible)){ if(Array.isArray(card)){ card=card.length; } @@ -18350,7 +18352,7 @@ } if(!_status.connectMode&&lib.config.wuxie_self&&event.getParent().state){ var tw=event.getTrigger().parent; - if(tw.player.isUnderControl(true)&&tw.targets&&tw.targets.length==1&&!tw.noai){ + if((tw.player.isUnderControl(true)||tw.player.handcardsVisible)&&tw.targets&&tw.targets.length==1&&!tw.noai){ return true; } } @@ -18441,7 +18443,7 @@ zhuSkill:{}, unequip:{ai:{unequip:true}}, autoswap:{ - trigger:{player:['phaseBegin','chooseToUseBegin','chooseToRespondBegin','chooseToDiscardBegin','chooseToCompareBegin', + trigger:{player:['chooseToUseBegin','chooseToRespondBegin','chooseToDiscardBegin','chooseToCompareBegin', 'chooseButtonBegin','chooseCardBegin','chooseTargetBegin','chooseCardTargetBegin','chooseControlBegin', 'chooseBoolBegin','choosePlayerCardBegin','discardPlayerCardBegin','gainPlayerCardBegin']}, forced:true, @@ -18458,7 +18460,7 @@ }, }, autophase:{ - trigger:{player:['phaseBegin','chooseToUseBegin','chooseToRespondBegin','chooseToDiscardBegin','chooseToCompareBegin', + trigger:{player:['chooseToUseBegin','chooseToRespondBegin','chooseToDiscardBegin','chooseToCompareBegin', 'chooseButtonBegin','chooseCardBegin','chooseTargetBegin','chooseCardTargetBegin','chooseControlBegin', 'chooseBoolBegin','choosePlayerCardBegin','discardPlayerCardBegin','gainPlayerCardBegin']}, forced:true, diff --git a/mode/versus.js b/mode/versus.js index acdfb4cea..12d5e4b0e 100644 --- a/mode/versus.js +++ b/mode/versus.js @@ -1053,9 +1053,9 @@ mode.versus={ } ui.autophase=ui.create.system('自动切换',function(){ this.classList.toggle('glow'); - game.save('autophase_four',this.classList.contains('glow')); + game.save('autophase_four',!this.classList.contains('glow')); },true); - if(lib.storage.autophase_four){ + if(!lib.storage.autophase_four){ ui.autophase.classList.add('glow'); } _status.autophasefilter=function(){