v1.9.24.1

This commit is contained in:
libccy 2017-04-17 12:48:19 +08:00
parent 31ff9f6156
commit 0de9a8ba43
5 changed files with 49 additions and 60 deletions

View File

@ -191,34 +191,30 @@ game.import('play',function(){
if(get.mode()=='tafang') return; if(get.mode()=='tafang') return;
var loadversus=function(){ var loadversus=function(){
if(get.mode()!='versus'){ if(get.mode()!='versus'){
lib.init.js(lib.assetURL+'mode','versus',function(){ game.loadModeAsync('versus',function(mode){
var mode=lib.imported.mode; for(var i in mode.translate){
for(var i in mode.versus.translate){ lib.translate[i]=lib.translate[i]||mode.translate[i];
lib.translate[i]=lib.translate[i]||mode.versus.translate[i];
} }
for(var i in mode.versus.skill){ for(var i in mode.skill){
if(lib.skill[i]) console.log(i); if(lib.skill[i]) console.log(i);
if(i!='versus_ladder'){ if(i!='versus_ladder'){
lib.skill[i]=lib.init.eval(mode.versus.skill[i]); lib.skill[i]=lib.init.eval(mode.skill[i]);
game.finishSkill(i); game.finishSkill(i);
} }
} }
delete lib.imported.mode.versus;
}); });
} }
}; };
if(get.mode()!='boss'){ if(get.mode()!='boss'){
lib.init.js(lib.assetURL+'mode','boss',function(){ game.loadModeAsync('boss',function(mode){
var mode=lib.imported.mode; for(var i in mode.translate){
for(var i in mode.boss.translate){ lib.translate[i]=lib.translate[i]||mode.translate[i];
lib.translate[i]=lib.translate[i]||mode.boss.translate[i];
} }
for(var i in mode.boss.skill){ for(var i in mode.skill){
if(lib.skill[i]) console.log(i); if(lib.skill[i]) console.log(i);
lib.skill[i]=lib.init.eval(mode.boss.skill[i]); lib.skill[i]=lib.init.eval(mode.skill[i]);
game.finishSkill(i); game.finishSkill(i);
} }
delete lib.imported.mode.boss;
loadversus(); loadversus();
}); });
} }
@ -226,8 +222,5 @@ game.import('play',function(){
loadversus(); loadversus();
} }
}, },
help:{
'挑战武将':'<ul><li>在非挑战模式中使用挑战武将'
},
}; };
}); });

View File

@ -99,8 +99,5 @@ game.import('play',function(){
} }
} }
}, },
help:{
'牌堆补充':'<ul><li>将杀闪等牌在牌堆中的比例维持在与军争牌堆相同,防止开启扩展包后重要的牌被过多地稀释'
},
}; };
}); });

View File

@ -3472,7 +3472,7 @@
restart:true, restart:true,
}, },
intro:{ intro:{
name:'在非挑战模式中使用剑阁和挑战模式的武将', name:'在其它模式中使用剑阁和挑战模式的武将',
clear:true, clear:true,
nopointer:true, nopointer:true,
}, },
@ -6483,11 +6483,6 @@
window.game=game; window.game=game;
window.lib=lib;
window.ui=ui;
window.ai=ai;
window.get=get;
window._status=_status;
var styleToLoad=6; var styleToLoad=6;
var styleLoaded=function(){ var styleLoaded=function(){
styleToLoad--; styleToLoad--;
@ -6937,7 +6932,7 @@
}); });
} }
var proceed=function(){ var proceed2=function(){
var mode=lib.imported.mode; var mode=lib.imported.mode;
var card=lib.imported.card; var card=lib.imported.card;
var character=lib.imported.character; var character=lib.imported.character;
@ -7329,16 +7324,16 @@
} }
delete lib.extensions; delete lib.extensions;
var proceed=function(){ if(lib.init.startBefore){
if(lib.init.startBefore){ lib.init.startBefore();
lib.init.startBefore(); delete lib.init.startBefore;
delete lib.init.startBefore; }
} ui.create.arena();
ui.create.arena(); game.createEvent('game',false).setContent(lib.init.start);
game.createEvent('game',false).setContent(lib.init.start); delete lib.init.start;
delete lib.init.start; game.loop();
game.loop(); }
}; var proceed=function(){
if(!lib.db){ if(!lib.db){
try{ try{
lib.storage=JSON.parse(localStorage.getItem(lib.configprefix+lib.config.mode)); lib.storage=JSON.parse(localStorage.getItem(lib.configprefix+lib.config.mode));
@ -7349,15 +7344,15 @@
lib.storage={}; lib.storage={};
localStorage.setItem(lib.configprefix+lib.config.mode,"{}"); localStorage.setItem(lib.configprefix+lib.config.mode,"{}");
} }
proceed(); proceed2();
} }
else{ else{
game.getDB('data',lib.config.mode,function(obj){ game.getDB('data',lib.config.mode,function(obj){
lib.storage=obj||{}; lib.storage=obj||{};
proceed(); proceed2();
}); });
} }
} };
if(!lib.imported.mode||!lib.imported.mode[lib.config.mode]){ if(!lib.imported.mode||!lib.imported.mode[lib.config.mode]){
window.inSplash=true; window.inSplash=true;
clearTimeout(window.resetGameTimeout); clearTimeout(window.resetGameTimeout);
@ -8694,12 +8689,11 @@
}, },
loadMode:function(){ loadMode:function(){
'step 0' 'step 0'
event.removegame=window.game!=game; window.game=game;
if(event.removegame) window.game=game;
lib.init.js(lib.assetURL+'mode',event.mode,game.resume); lib.init.js(lib.assetURL+'mode',event.mode,game.resume);
game.pause(); game.pause();
'step 1' 'step 1'
if(event.removegame) delete window.game; if(!lib.config.dev) delete window.game;
event.result=lib.imported.mode[event.mode]; event.result=lib.imported.mode[event.mode];
delete lib.imported.mode[event.mode]; delete lib.imported.mode[event.mode];
}, },
@ -20802,7 +20796,20 @@
if(!lib.imported[type]){ if(!lib.imported[type]){
lib.imported[type]={}; lib.imported[type]={};
} }
var bool_ui=!window.ui;
var bool_get=!window.get;
var bool_ai=!window.ai;
var bool_lib=!window.lib;
window.ui=ui;
window.get=get;
window.ai=ai;
window.lib=lib;
window._status=_status;
var content2=content(); var content2=content();
if(bool_ui) delete window.ui;
if(bool_get) delete window.get;
if(bool_ai) delete window.ai;
if(bool_lib) delete window.lib;
if(content2.name){ if(content2.name){
lib.imported[type][content2.name]=content2; lib.imported[type][content2.name]=content2;
delete content2.name; delete content2.name;
@ -24774,10 +24781,9 @@
return players[0]; return players[0];
}, },
loadModeAsync:function(name,callback){ loadModeAsync:function(name,callback){
var removegame=window.game!=game; window.game=game;
if(removegame) window.game=game;
var script=lib.init.js(lib.assetURL+'mode',name,function(){ var script=lib.init.js(lib.assetURL+'mode',name,function(){
if(removegame) delete window.game; if(!lib.config.dev) delete window.game;
script.remove(); script.remove();
var content=lib.imported.mode[name]; var content=lib.imported.mode[name];
delete lib.imported.mode[name]; delete lib.imported.mode[name];
@ -24795,10 +24801,9 @@
} }
} }
} }
var removegame=window.game!=game; window.game=game;
if(removegame) window.game=game;
var script=lib.init.js(lib.assetURL+'mode',name,function(){ var script=lib.init.js(lib.assetURL+'mode',name,function(){
if(removegame) delete window.game; if(!lib.config.dev) delete window.game;
script.remove(); script.remove();
var mode=lib.imported.mode; var mode=lib.imported.mode;
_status.sourcemode=lib.config.mode; _status.sourcemode=lib.config.mode;
@ -31757,15 +31762,9 @@
},function(){ },function(){
onprogress(-1); onprogress(-1);
_status.importingExtension=true; _status.importingExtension=true;
var removegame=false; window.game=game;
if(window.game!=game){
window.game=game;
removegame=true;
}
lib.init.js(lib.assetURL+'extension/'+that.info.name,'extension',function(){ lib.init.js(lib.assetURL+'extension/'+that.info.name,'extension',function(){
if(removegame){ if(!lib.config.dev) delete window.game;
delete window.game;
}
if(game.importedPack){ if(game.importedPack){
var extname=game.importedPack.name; var extname=game.importedPack.name;
if(lib.config.extensions.contains(extname)){ if(lib.config.extensions.contains(extname)){

View File

@ -28,7 +28,7 @@ window.noname_package={
hearth:'炉石传说', hearth:'炉石传说',
}, },
play:{ play:{
boss:'剑阁挑战', boss:'诸神降临',
cardpile:'牌堆补充', cardpile:'牌堆补充',
wuxing:'五行生克', wuxing:'五行生克',
coin:'富甲天下', coin:'富甲天下',

View File

@ -1,8 +1,8 @@
window.noname_update={ window.noname_update={
version:'1.9.24', version:'1.9.24.1',
// update:'1.9.23', // update:'1.9.23',
changeLog:[ changeLog:[
'神之试炼', 'bug修复',
], ],
files:[ files:[
// 'game/game.js', // 'game/game.js',