diff --git a/game/game.js b/game/game.js index cdb9bbecb..3339556e7 100644 --- a/game/game.js +++ b/game/game.js @@ -7011,6 +7011,7 @@ if(!lib.config.show_phaseuse_prompt){ next.set('prompt',false); } + next.set('type','phase'); "step 1" if(result.bool&&!event.skipped){ event.goto(0); @@ -7049,6 +7050,24 @@ } } _status.noclearcountdown=true; + if(event.type=='phase'){ + if(event.isMine()){ + event.endButton=ui.create.control('结束回合','stayleft',function(){ + if(_status.event.skill){ + ui.click.cancel(); + } + ui.click.cancel(); + }); + event.forced=true; + } + else{ + if(event.endButton){ + event.endButton.close(); + delete event.endButton; + } + event.forced=false; + } + } if(event.player.isUnderControl()){ event.result={ bool:false @@ -7173,6 +7192,10 @@ } } "step 2" + if(event.endButton){ + event.endButton.close(); + delete event.endButton; + } event.resume(); if(event.result){ if(event.result.skill){ @@ -7209,6 +7232,7 @@ } } else{ + ui.control.animate('nozoom',100); event.aiexclude.add(event.buttoned); } event.goto(0); @@ -21206,7 +21230,7 @@ enable=false; if(typeof info.enable=='function') enable=info.enable(event); else if(typeof info.enable=='object') enable=info.enable.contains(event.name); - else if(info.enable=='phaseUse') enable=(event.getParent().name=='phaseUse'); + else if(info.enable=='phaseUse') enable=(event.type=='phase'); else if(typeof info.enable=='string') enable=(info.enable==event.name); if(enable){ if(info.filter&&!info.filter(event,player)) enable=false; @@ -21306,13 +21330,16 @@ } } } - if(ok&&auto&&lib.config.auto_confirm&&(!_status.mousedragging||!_status.mouseleft)&& + if(ok&&auto&&(lib.config.auto_confirm||(skillinfo&&skillinfo.direct))&&(!_status.mousedragging||!_status.mouseleft)&& !_status.mousedown&&!_status.touchnocheck){ if(ui.confirm){ if(!skillinfo||!skillinfo.preservecancel){ ui.confirm.close(); } } + if(skillinfo&&skillinfo.preservecancel&&!ui.confirm){ + ui.create.confirm('c'); + } if(event.skillDialog==true) event.skillDialog=false; ui.click.ok(); _status.mousedragging=null; @@ -21330,7 +21357,7 @@ } } if(ui.confirm&&ui.confirm.lastChild.link=='cancel'){ - if(_status.event.getParent().name=='phaseUse'&&!_status.event.skill){ + if(_status.event.type=='phase'&&!_status.event.skill){ ui.confirm.lastChild.innerHTML='结束'; } else{ @@ -22443,7 +22470,8 @@ if(nodes[i]==ui.control) continue; if(nodes[i]==ui.arenalog) continue; if(nodes[i]==ui.roundmenu) continue; - if(nodes[i]==ui.timer) continue; + if(nodes[i]==ui.timer) continue; + if(nodes[i]==ui.autonode) continue; nodes[i].remove(); } ui.sidebar.innerHTML=''; @@ -30432,7 +30460,7 @@ return caption; }, control:function(){ - var nc=(ui.control.childNodes.length==0); + var nc=!ui.control.querySelector('div:not(.removing):not(.stayleft)'); // for(var i=0;i.card>.info>span, cursor:pointer; } #control.nozoom>div { - transition-property: opacity + transition-property: opacity; +} +#control>div.stayleft{ + transition-property: opacity !important; } .control { padding-top: 2px; diff --git a/mode/chess.js b/mode/chess.js index b58601f10..b508abe89 100644 --- a/mode/chess.js +++ b/mode/chess.js @@ -4187,6 +4187,9 @@ mode.chess={ event.custom.replace.confirm=game.resume; event.switchToAuto=game.resume; "step 1" + if(ui.confirm){ + ui.confirm.classList.add('removing'); + } _status.imchoosing=false; event.dialog.close(); if(event.choice){ @@ -4928,6 +4931,9 @@ mode.chess={ }; } 'step 1' + if(ui.confirm){ + ui.confirm.classList.add('removing'); + } _status.imchoosing=false; if(!event.cancelled){ if(!event.obstacle){ @@ -4985,6 +4991,9 @@ mode.chess={ move=game.checkMod(player,move,'chessMove',player.get('s')); player.chooseToMove(move).phasing=true; "step 1" + if(ui.confirm){ + ui.confirm.classList.add('removing'); + } if(!result.bool){ var skill=player.getStat().skill; skill._chessmove--;