This commit is contained in:
libccy 2017-02-21 10:01:50 +08:00
parent 8a1d5eb07b
commit 5299f7bb48
4 changed files with 64 additions and 12 deletions

View File

@ -7011,6 +7011,7 @@
if(!lib.config.show_phaseuse_prompt){ if(!lib.config.show_phaseuse_prompt){
next.set('prompt',false); next.set('prompt',false);
} }
next.set('type','phase');
"step 1" "step 1"
if(result.bool&&!event.skipped){ if(result.bool&&!event.skipped){
event.goto(0); event.goto(0);
@ -7049,6 +7050,24 @@
} }
} }
_status.noclearcountdown=true; _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()){ if(event.player.isUnderControl()){
event.result={ event.result={
bool:false bool:false
@ -7173,6 +7192,10 @@
} }
} }
"step 2" "step 2"
if(event.endButton){
event.endButton.close();
delete event.endButton;
}
event.resume(); event.resume();
if(event.result){ if(event.result){
if(event.result.skill){ if(event.result.skill){
@ -7209,6 +7232,7 @@
} }
} }
else{ else{
ui.control.animate('nozoom',100);
event.aiexclude.add(event.buttoned); event.aiexclude.add(event.buttoned);
} }
event.goto(0); event.goto(0);
@ -21206,7 +21230,7 @@
enable=false; enable=false;
if(typeof info.enable=='function') enable=info.enable(event); if(typeof info.enable=='function') enable=info.enable(event);
else if(typeof info.enable=='object') enable=info.enable.contains(event.name); 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); else if(typeof info.enable=='string') enable=(info.enable==event.name);
if(enable){ if(enable){
if(info.filter&&!info.filter(event,player)) enable=false; 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){ !_status.mousedown&&!_status.touchnocheck){
if(ui.confirm){ if(ui.confirm){
if(!skillinfo||!skillinfo.preservecancel){ if(!skillinfo||!skillinfo.preservecancel){
ui.confirm.close(); ui.confirm.close();
} }
} }
if(skillinfo&&skillinfo.preservecancel&&!ui.confirm){
ui.create.confirm('c');
}
if(event.skillDialog==true) event.skillDialog=false; if(event.skillDialog==true) event.skillDialog=false;
ui.click.ok(); ui.click.ok();
_status.mousedragging=null; _status.mousedragging=null;
@ -21330,7 +21357,7 @@
} }
} }
if(ui.confirm&&ui.confirm.lastChild.link=='cancel'){ 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='结束'; ui.confirm.lastChild.innerHTML='结束';
} }
else{ else{
@ -22444,6 +22471,7 @@
if(nodes[i]==ui.arenalog) continue; if(nodes[i]==ui.arenalog) continue;
if(nodes[i]==ui.roundmenu) 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(); nodes[i].remove();
} }
ui.sidebar.innerHTML=''; ui.sidebar.innerHTML='';
@ -30432,7 +30460,7 @@
return caption; return caption;
}, },
control:function(){ control:function(){
var nc=(ui.control.childNodes.length==0); var nc=!ui.control.querySelector('div:not(.removing):not(.stayleft)');
// for(var i=0;i<ui.control.childNodes.length;i++){ // for(var i=0;i<ui.control.childNodes.length;i++){
// if(ui.control.childNodes[i].classList.contains('removing')){ // if(ui.control.childNodes[i].classList.contains('removing')){
// var that=ui.control.childNodes[i]; // var that=ui.control.childNodes[i];
@ -30460,6 +30488,7 @@
} }
else if(controls[i]=='stayleft'){ else if(controls[i]=='stayleft'){
control.stayleft=true; control.stayleft=true;
control.classList.add('stayleft');
} }
else{ else{
control.add(controls[i]); control.add(controls[i]);
@ -30484,7 +30513,9 @@
// control.style.transform='scale(0.8)'; // control.style.transform='scale(0.8)';
// } // }
ui.refresh(control); ui.refresh(control);
if(!control.stayleft){
control.style.transform='translateX(-'+(control.offsetWidth/2)+'px)'; control.style.transform='translateX(-'+(control.offsetWidth/2)+'px)';
}
control.style.opacity=1; control.style.opacity=1;
ui.refresh(control); ui.refresh(control);
control.style.transition=''; control.style.transition='';
@ -32753,6 +32784,9 @@
_status.mousedragging=null; _status.mousedragging=null;
_status.mousedragorigin=null; _status.mousedragorigin=null;
_status.clicked=false; _status.clicked=false;
if(_status.event.type=='phase'&&!_status.event.skill&&ui.confirm){
ui.confirm.classList.add('removing');
}
game.uncheck(); game.uncheck();
game.check(); game.check();
_status.clicked=true; _status.clicked=true;
@ -32808,7 +32842,10 @@
} }
item=item.parentNode; item=item.parentNode;
} }
if(!_status.mouseleft){
_status.mouseleft=true; _status.mouseleft=true;
game.check();
}
_status.dragstatuschanged=null; _status.dragstatuschanged=null;
} }
else{ else{
@ -33685,6 +33722,9 @@
if(typeof event.dialog=='string'&&event.isMine()){ if(typeof event.dialog=='string'&&event.isMine()){
event.dialog=ui.create.dialog(event.dialog); event.dialog=ui.create.dialog(event.dialog);
} }
if(_status.event.type=='phase'&&ui.confirm){
ui.confirm.classList.add('removing');
}
event.restore(); event.restore();
var cards=event.player.get('hej'); var cards=event.player.get('hej');
for(var i=0;i<cards.length;i++){ for(var i=0;i<cards.length;i++){

View File

@ -1,22 +1,22 @@
window.noname_update={ window.noname_update={
version:'1.9.9.6', version:'1.9.9.6',
// update:'1.9.9', update:'1.9.9.6',
changeLog:[ changeLog:[
'武将介绍', '武将介绍',
], ],
files:[ files:[
// 'game/game.js', 'game/game.js',
// 'game/asset.js', // 'game/asset.js',
// 'card/*', // 'card/*',
// 'character/*', // 'character/*',
// 'mode/boss.js', // 'mode/boss.js',
// 'mode/chess.js', 'mode/chess.js',
// 'mode/versus.js', // 'mode/versus.js',
// 'mode/guozhan.js', // 'mode/guozhan.js',
// 'mode/identity.js', // 'mode/identity.js',
// 'mode/stone.js', // 'mode/stone.js',
// 'theme/simple/style.css', // 'theme/simple/style.css',
// 'layout/default/layout.css', 'layout/default/layout.css',
// 'layout/default/layout.css', // 'layout/default/layout.css',
// 'layout/long/layout.css', // 'layout/long/layout.css',
// 'layout/long2/layout.css', // 'layout/long2/layout.css',

View File

@ -1572,7 +1572,10 @@ div:not(.handcards)>.card>.info>span,
cursor:pointer; cursor:pointer;
} }
#control.nozoom>div { #control.nozoom>div {
transition-property: opacity transition-property: opacity;
}
#control>div.stayleft{
transition-property: opacity !important;
} }
.control { .control {
padding-top: 2px; padding-top: 2px;

View File

@ -4187,6 +4187,9 @@ mode.chess={
event.custom.replace.confirm=game.resume; event.custom.replace.confirm=game.resume;
event.switchToAuto=game.resume; event.switchToAuto=game.resume;
"step 1" "step 1"
if(ui.confirm){
ui.confirm.classList.add('removing');
}
_status.imchoosing=false; _status.imchoosing=false;
event.dialog.close(); event.dialog.close();
if(event.choice){ if(event.choice){
@ -4928,6 +4931,9 @@ mode.chess={
}; };
} }
'step 1' 'step 1'
if(ui.confirm){
ui.confirm.classList.add('removing');
}
_status.imchoosing=false; _status.imchoosing=false;
if(!event.cancelled){ if(!event.cancelled){
if(!event.obstacle){ if(!event.obstacle){
@ -4985,6 +4991,9 @@ mode.chess={
move=game.checkMod(player,move,'chessMove',player.get('s')); move=game.checkMod(player,move,'chessMove',player.get('s'));
player.chooseToMove(move).phasing=true; player.chooseToMove(move).phasing=true;
"step 1" "step 1"
if(ui.confirm){
ui.confirm.classList.add('removing');
}
if(!result.bool){ if(!result.bool){
var skill=player.getStat().skill; var skill=player.getStat().skill;
skill._chessmove--; skill._chessmove--;