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){
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{
@ -22444,6 +22471,7 @@
if(nodes[i]==ui.arenalog) continue;
if(nodes[i]==ui.roundmenu) 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<ui.control.childNodes.length;i++){
// if(ui.control.childNodes[i].classList.contains('removing')){
// var that=ui.control.childNodes[i];
@ -30460,6 +30488,7 @@
}
else if(controls[i]=='stayleft'){
control.stayleft=true;
control.classList.add('stayleft');
}
else{
control.add(controls[i]);
@ -30484,7 +30513,9 @@
// control.style.transform='scale(0.8)';
// }
ui.refresh(control);
if(!control.stayleft){
control.style.transform='translateX(-'+(control.offsetWidth/2)+'px)';
}
control.style.opacity=1;
ui.refresh(control);
control.style.transition='';
@ -32753,6 +32784,9 @@
_status.mousedragging=null;
_status.mousedragorigin=null;
_status.clicked=false;
if(_status.event.type=='phase'&&!_status.event.skill&&ui.confirm){
ui.confirm.classList.add('removing');
}
game.uncheck();
game.check();
_status.clicked=true;
@ -32808,7 +32842,10 @@
}
item=item.parentNode;
}
if(!_status.mouseleft){
_status.mouseleft=true;
game.check();
}
_status.dragstatuschanged=null;
}
else{
@ -33685,6 +33722,9 @@
if(typeof event.dialog=='string'&&event.isMine()){
event.dialog=ui.create.dialog(event.dialog);
}
if(_status.event.type=='phase'&&ui.confirm){
ui.confirm.classList.add('removing');
}
event.restore();
var cards=event.player.get('hej');
for(var i=0;i<cards.length;i++){

View File

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

View File

@ -1572,7 +1572,10 @@ div:not(.handcards)>.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;

View File

@ -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--;