v1.9.19
This commit is contained in:
parent
fe9e0fce68
commit
69de46f058
40
game/game.js
40
game/game.js
|
@ -8845,7 +8845,7 @@
|
||||||
event.fakeforce=false;
|
event.fakeforce=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(event.player.isUnderControl()||(event.player.handcardsVisible&&event.player!=game.me)){
|
if(event.player.isUnderControl()){
|
||||||
event.result={
|
event.result={
|
||||||
bool:false
|
bool:false
|
||||||
}
|
}
|
||||||
|
@ -10023,7 +10023,7 @@
|
||||||
event.dialog.add('手牌');
|
event.dialog.add('手牌');
|
||||||
var hs=target.getCards('h');
|
var hs=target.getCards('h');
|
||||||
hs.randomSort();
|
hs.randomSort();
|
||||||
if(event.visible||target.isUnderControl(true)||target.handcardsVisible){
|
if(event.visible||target.isUnderControl(true)){
|
||||||
event.dialog.add(hs);
|
event.dialog.add(hs);
|
||||||
directh=false;
|
directh=false;
|
||||||
}
|
}
|
||||||
|
@ -10117,7 +10117,7 @@
|
||||||
event.dialog.add('手牌');
|
event.dialog.add('手牌');
|
||||||
var hs=target.getCards('h');
|
var hs=target.getCards('h');
|
||||||
hs.randomSort();
|
hs.randomSort();
|
||||||
if(event.visible||target.isUnderControl(true)||target.handcardsVisible){
|
if(event.visible||target.isUnderControl(true)){
|
||||||
event.dialog.add(hs);
|
event.dialog.add(hs);
|
||||||
directh=false;
|
directh=false;
|
||||||
}
|
}
|
||||||
|
@ -10228,7 +10228,7 @@
|
||||||
event.dialog.add('手牌');
|
event.dialog.add('手牌');
|
||||||
var hs=target.getCards('h');
|
var hs=target.getCards('h');
|
||||||
hs.randomSort();
|
hs.randomSort();
|
||||||
if(event.visible||target.isUnderControl(true)||target.handcardsVisible){
|
if(event.visible||target.isUnderControl(true)){
|
||||||
event.dialog.add(hs);
|
event.dialog.add(hs);
|
||||||
directh=false;
|
directh=false;
|
||||||
}
|
}
|
||||||
|
@ -15626,6 +15626,7 @@
|
||||||
if(lib.config.mode=='versus'){
|
if(lib.config.mode=='versus'){
|
||||||
if(_status.mode=='three') return this.side==me.side;
|
if(_status.mode=='three') return this.side==me.side;
|
||||||
if(_status.mode=='standard') return lib.storage.single_control&&this.side==me.side;
|
if(_status.mode=='standard') return lib.storage.single_control&&this.side==me.side;
|
||||||
|
if(_status.mode=='four') return get.config('four_phaseswap')&&this.side==me.side;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if(lib.config.mode=='boss'){
|
else if(lib.config.mode=='boss'){
|
||||||
|
@ -16504,9 +16505,7 @@
|
||||||
$giveAuto:function(card,player){
|
$giveAuto:function(card,player){
|
||||||
if(Array.isArray(card)&&card.length==0) return;
|
if(Array.isArray(card)&&card.length==0) return;
|
||||||
var args=Array.from(arguments);
|
var args=Array.from(arguments);
|
||||||
if(_status.connectMode||(
|
if(_status.connectMode||(!this.isUnderControl(true)&&!player.isUnderControl(true))){
|
||||||
!this.isUnderControl(true)&&!player.isUnderControl(true)&&
|
|
||||||
!this.handcardsVisible&&!player.handcardsVisible)){
|
|
||||||
if(Array.isArray(card)){
|
if(Array.isArray(card)){
|
||||||
card=card.length;
|
card=card.length;
|
||||||
}
|
}
|
||||||
|
@ -18352,7 +18351,7 @@
|
||||||
}
|
}
|
||||||
if(!_status.connectMode&&lib.config.wuxie_self&&event.getParent().state){
|
if(!_status.connectMode&&lib.config.wuxie_self&&event.getParent().state){
|
||||||
var tw=event.getTrigger().parent;
|
var tw=event.getTrigger().parent;
|
||||||
if((tw.player.isUnderControl(true)||tw.player.handcardsVisible)&&tw.targets&&tw.targets.length==1&&!tw.noai){
|
if(tw.player.isUnderControl(true)&&tw.targets&&tw.targets.length==1&&!tw.noai){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18459,29 +18458,6 @@
|
||||||
game.modeSwapPlayer(player);
|
game.modeSwapPlayer(player);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
autophase:{
|
|
||||||
trigger:{player:['chooseToUseBegin','chooseToRespondBegin','chooseToDiscardBegin','chooseToCompareBegin',
|
|
||||||
'chooseButtonBegin','chooseCardBegin','chooseTargetBegin','chooseCardTargetBegin','chooseControlBegin',
|
|
||||||
'chooseBoolBegin','choosePlayerCardBegin','discardPlayerCardBegin','gainPlayerCardBegin']},
|
|
||||||
forced:true,
|
|
||||||
priority:100,
|
|
||||||
popup:false,
|
|
||||||
filter:function(event,player){
|
|
||||||
if(player==game.me) return false;
|
|
||||||
if(event.autochoose&&event.autochoose()) return false;
|
|
||||||
if(lib.filter.wuxieSwap(event)) return false;
|
|
||||||
if(_status.auto) return false;
|
|
||||||
if(!player.isFriendOf(game.me)) return false;
|
|
||||||
if(_status.autophasefilter&&_status.autophasefilter(event,player)){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if(_status.currentPhase!=player) return false;
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
content:function(){
|
|
||||||
game.swapPlayer(player);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
fengyin:{
|
fengyin:{
|
||||||
init:function(player,skill){
|
init:function(player,skill){
|
||||||
var skills=player.getSkills(true,false);
|
var skills=player.getSkills(true,false);
|
||||||
|
@ -39563,7 +39539,7 @@
|
||||||
}
|
}
|
||||||
uiintro.add(capt);
|
uiintro.add(capt);
|
||||||
|
|
||||||
if(node.isUnderControl()||(node.handcardsVisible&&node!=game.me)){
|
if(node.isUnderControl()){
|
||||||
var hs=node.getCards('h');
|
var hs=node.getCards('h');
|
||||||
if(hs.length){
|
if(hs.length){
|
||||||
uiintro.add('<div class="text center">手牌</div>');
|
uiintro.add('<div class="text center">手牌</div>');
|
||||||
|
|
|
@ -1046,26 +1046,11 @@ mode.versus={
|
||||||
_status.ladder_mmr=0;
|
_status.ladder_mmr=0;
|
||||||
}
|
}
|
||||||
if(get.config('four_phaseswap')){
|
if(get.config('four_phaseswap')){
|
||||||
game.addGlobalSkill('autophase');
|
game.addGlobalSkill('autoswap');
|
||||||
if(lib.config.show_handcardbutton){
|
if(lib.config.show_handcardbutton){
|
||||||
ui.versushs=ui.create.system('手牌',null,true);
|
ui.versushs=ui.create.system('手牌',null,true);
|
||||||
lib.setPopped(ui.versushs,game.versusHoverHandcards,220);
|
lib.setPopped(ui.versushs,game.versusHoverHandcards,220);
|
||||||
}
|
}
|
||||||
ui.autophase=ui.create.system('自动切换',function(){
|
|
||||||
this.classList.toggle('glow');
|
|
||||||
game.save('autophase_four',!this.classList.contains('glow'));
|
|
||||||
},true);
|
|
||||||
if(!lib.storage.autophase_four){
|
|
||||||
ui.autophase.classList.add('glow');
|
|
||||||
}
|
|
||||||
_status.autophasefilter=function(){
|
|
||||||
return ui.autophase.classList.contains('glow');
|
|
||||||
}
|
|
||||||
for(var i=0;i<game.players.length;i++){
|
|
||||||
if(game.players[i].side==game.me.side){
|
|
||||||
game.players[i].handcardsVisible=true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
"step 1"
|
"step 1"
|
||||||
if(event.current==game.me||(event.four_assign&&event.current.side==game.me.side)){
|
if(event.current==game.me||(event.four_assign&&event.current.side==game.me.side)){
|
||||||
|
@ -2731,8 +2716,13 @@ mode.versus={
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
modeSwapPlayer:function(player){
|
modeSwapPlayer:function(player){
|
||||||
game.swapControl(player);
|
if(_status.mode=='four'){
|
||||||
game.onSwapControl();
|
game.swapPlayer(player);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
game.swapControl(player);
|
||||||
|
game.onSwapControl();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
updateLineMe:function(opacity,player){
|
updateLineMe:function(opacity,player){
|
||||||
if(!player){
|
if(!player){
|
||||||
|
|
Loading…
Reference in New Issue