This commit is contained in:
parent
c2c6f96de7
commit
ecae1e7e70
95
game/game.js
95
game/game.js
|
@ -24288,40 +24288,44 @@
|
||||||
},true);
|
},true);
|
||||||
}
|
}
|
||||||
if(get.config('free_choose')){
|
if(get.config('free_choose')){
|
||||||
event.freechoosedialog=ui.create.characterDialog();
|
var createCharacterDialog=function(){
|
||||||
event.freechoosedialog.style.height='80%';
|
event.freechoosedialog=ui.create.characterDialog();
|
||||||
event.freechoosedialog.style.top='10%';
|
event.freechoosedialog.style.height='80%';
|
||||||
event.freechoosedialog.style.transform='scale(0.8)';
|
event.freechoosedialog.style.top='10%';
|
||||||
event.freechoosedialog.style.transition='all 0.3s';
|
|
||||||
event.freechoosedialog.listen(function(e){
|
|
||||||
if(!event.replacing){
|
|
||||||
event.dialoglayer.clicked=true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
event.dialoglayer=ui.create.div('.popup-container.hidden',function(e){
|
|
||||||
if(this.classList.contains('removing')) return;
|
|
||||||
if(this.clicked){
|
|
||||||
this.clicked=false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ui.window.classList.remove('modepaused');
|
|
||||||
this.delete();
|
|
||||||
e.stopPropagation();
|
|
||||||
event.freechoosedialog.style.transform='scale(0.8)';
|
event.freechoosedialog.style.transform='scale(0.8)';
|
||||||
if(event.replacing){
|
event.freechoosedialog.style.transition='all 0.3s';
|
||||||
event.prompt('用'+get.translation(event.replacing)+'替换一名武将');
|
event.freechoosedialog.listen(function(e){
|
||||||
}
|
if(!event.replacing){
|
||||||
else{
|
event.dialoglayer.clicked=true;
|
||||||
if(event.side==0){
|
}
|
||||||
event.prompt('请选择两名武将');
|
});
|
||||||
|
event.dialoglayer=ui.create.div('.popup-container.hidden',function(e){
|
||||||
|
if(this.classList.contains('removing')) return;
|
||||||
|
if(this.clicked){
|
||||||
|
this.clicked=false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ui.window.classList.remove('modepaused');
|
||||||
|
this.delete();
|
||||||
|
e.stopPropagation();
|
||||||
|
event.freechoosedialog.style.transform='scale(0.8)';
|
||||||
|
if(event.replacing){
|
||||||
|
event.prompt('用'+get.translation(event.replacing)+'替换一名武将');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
event.prompt('请选择一名武将');
|
if(event.side==0){
|
||||||
|
event.prompt('请选择两名武将');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
event.prompt('请选择一名武将');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
event.dialoglayer.classList.add('modenopause');
|
||||||
event.dialoglayer.classList.add('modenopause');
|
event.dialoglayer.appendChild(event.freechoosedialog);
|
||||||
event.dialoglayer.appendChild(event.freechoosedialog);
|
event.freechoosenode.classList.remove('hidden');
|
||||||
|
}
|
||||||
|
|
||||||
event.custom.replace.button=function(button){
|
event.custom.replace.button=function(button){
|
||||||
event.replacing=button.link;
|
event.replacing=button.link;
|
||||||
};
|
};
|
||||||
|
@ -24337,6 +24341,7 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
event.freechoosenode=ui.create.system('自由选将',function(){
|
event.freechoosenode=ui.create.system('自由选将',function(){
|
||||||
|
if(this.classList.contains('hidden')) return;
|
||||||
if(!event.imchoosing){
|
if(!event.imchoosing){
|
||||||
event.prompt('请等待敌方选将');
|
event.prompt('请等待敌方选将');
|
||||||
return;
|
return;
|
||||||
|
@ -24348,7 +24353,14 @@
|
||||||
event.dialoglayer.show();
|
event.dialoglayer.show();
|
||||||
event.freechoosedialog.style.transform='scale(1)';
|
event.freechoosedialog.style.transform='scale(1)';
|
||||||
event.promptbar.hide();
|
event.promptbar.hide();
|
||||||
},true)
|
},true);
|
||||||
|
if(lib.onfree){
|
||||||
|
event.freechoosenode.classList.add('hidden');
|
||||||
|
lib.onfree.push(createCharacterDialog);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
createCharacterDialog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
event.checkredo=function(){
|
event.checkredo=function(){
|
||||||
if(event.redoing){
|
if(event.redoing){
|
||||||
|
@ -33581,7 +33593,9 @@
|
||||||
ui.replay=ui.create.system('重来',game.reload,true);
|
ui.replay=ui.create.system('重来',game.reload,true);
|
||||||
ui.replay.id='restartbutton';
|
ui.replay.id='restartbutton';
|
||||||
ui.config2=ui.create.system('选项',ui.click.config);
|
ui.config2=ui.create.system('选项',ui.click.config);
|
||||||
ui.config2.classList.add('hidden');
|
if(!game.syncMenu){
|
||||||
|
ui.config2.classList.add('hidden');
|
||||||
|
}
|
||||||
ui.config2.style.transition='all 0.5s';
|
ui.config2.style.transition='all 0.5s';
|
||||||
ui.pause=ui.create.system('暂停',ui.click.pause);
|
ui.pause=ui.create.system('暂停',ui.click.pause);
|
||||||
ui.pause.id='pausebutton';
|
ui.pause.id='pausebutton';
|
||||||
|
@ -33734,13 +33748,18 @@
|
||||||
setTimerPosition.call(ui.timer);
|
setTimerPosition.call(ui.timer);
|
||||||
ui.arena.appendChild(ui.timer);
|
ui.arena.appendChild(ui.timer);
|
||||||
|
|
||||||
lib.onfree.push(function(){
|
if(!game.syncMenu){
|
||||||
|
lib.onfree.push(function(){
|
||||||
|
ui.create.menu();
|
||||||
|
ui.config2.classList.remove('hidden');
|
||||||
|
setTimeout(function(){
|
||||||
|
ui.config2.style.transition='';
|
||||||
|
},500);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else{
|
||||||
ui.create.menu();
|
ui.create.menu();
|
||||||
ui.config2.classList.remove('hidden');
|
}
|
||||||
setTimeout(function(){
|
|
||||||
ui.config2.style.transition='';
|
|
||||||
},500);
|
|
||||||
});
|
|
||||||
|
|
||||||
lib.status.date=new Date();
|
lib.status.date=new Date();
|
||||||
lib.status.dateDelayed=0;
|
lib.status.dateDelayed=0;
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
window.noname_update={
|
window.noname_update={
|
||||||
version:'1.9.16.1',
|
version:'1.9.17',
|
||||||
update:'1.9.15',
|
update:'1.9.15',
|
||||||
changeLog:[
|
changeLog:[
|
||||||
'bug修复',
|
'提高载入速度',
|
||||||
'提高文件下载速度'
|
|
||||||
],
|
],
|
||||||
files:[
|
files:[
|
||||||
'game/game.js',
|
'game/game.js',
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
mode.brawl={
|
mode.brawl={
|
||||||
|
game:{
|
||||||
|
syncMenu:true,
|
||||||
|
},
|
||||||
start:function(){
|
start:function(){
|
||||||
ui.auto.hide();
|
ui.auto.hide();
|
||||||
if(!lib.storage.scene){
|
if(!lib.storage.scene){
|
||||||
|
@ -360,6 +363,7 @@ mode.brawl={
|
||||||
game.save('directStage');
|
game.save('directStage');
|
||||||
clickStart(directStage);
|
clickStart(directStage);
|
||||||
}
|
}
|
||||||
|
console.log(lib.onfree[0]);
|
||||||
},
|
},
|
||||||
brawl:{
|
brawl:{
|
||||||
duzhansanguo:{
|
duzhansanguo:{
|
||||||
|
|
|
@ -8,7 +8,7 @@ mode.stone={
|
||||||
var playback=localStorage.getItem(lib.configprefix+'playback');
|
var playback=localStorage.getItem(lib.configprefix+'playback');
|
||||||
|
|
||||||
if(!playback&&_status.mode=='deck'){
|
if(!playback&&_status.mode=='deck'){
|
||||||
(function(){
|
var createCardDialog=function(){
|
||||||
ui.deckBuilder=ui.create.div('.popup-container#deck-builder',function(){
|
ui.deckBuilder=ui.create.div('.popup-container#deck-builder',function(){
|
||||||
if(careerList.classList.contains('shown')){
|
if(careerList.classList.contains('shown')){
|
||||||
careerList.classList.remove('shown');
|
careerList.classList.remove('shown');
|
||||||
|
@ -362,9 +362,11 @@ mode.stone={
|
||||||
deckitem.name=i;
|
deckitem.name=i;
|
||||||
}
|
}
|
||||||
var deckContainer=ui.create.div('.list-container.deck',deckList);
|
var deckContainer=ui.create.div('.list-container.deck',deckList);
|
||||||
}());
|
ui.deckcontrol.show();
|
||||||
|
};
|
||||||
|
|
||||||
ui.deckcontrol=ui.create.system('卡组管理',function(){
|
ui.deckcontrol=ui.create.system('卡组管理',function(){
|
||||||
|
if(this.classList.contains('hidden')) return;
|
||||||
// if(lib.config.low_performance){
|
// if(lib.config.low_performance){
|
||||||
// ui.arena.style.transform='translateY('+ui.window.offsetHeight+'px)';
|
// ui.arena.style.transform='translateY('+ui.window.offsetHeight+'px)';
|
||||||
// }
|
// }
|
||||||
|
@ -386,6 +388,13 @@ mode.stone={
|
||||||
ui.historybar.hide();
|
ui.historybar.hide();
|
||||||
},true);
|
},true);
|
||||||
|
|
||||||
|
if(lib.onfree){
|
||||||
|
ui.deckcontrol.hide();
|
||||||
|
lib.onfree.push(createCardDialog);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
createCardDialog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(playback){
|
if(playback){
|
||||||
|
@ -408,7 +417,7 @@ mode.stone={
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
game.prepareArena(2);
|
game.prepareArena(2);
|
||||||
game.delay();
|
// game.delay();
|
||||||
}
|
}
|
||||||
ui.arena.classList.add('stone');
|
ui.arena.classList.add('stone');
|
||||||
"step 1"
|
"step 1"
|
||||||
|
@ -1460,7 +1469,7 @@ mode.stone={
|
||||||
dialog.add([list.slice(0,get.config('battle_number')*2+5),'character']);
|
dialog.add([list.slice(0,get.config('battle_number')*2+5),'character']);
|
||||||
dialog.open();
|
dialog.open();
|
||||||
|
|
||||||
var next=game.me.chooseButton(dialog,true);
|
var next=game.me.chooseButton(dialog,true).set('onfree',true);
|
||||||
next.selectButton=function(){
|
next.selectButton=function(){
|
||||||
return (get.config('double_character')?2:1)*get.config('battle_number');
|
return (get.config('double_character')?2:1)*get.config('battle_number');
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue