diff --git a/CHANGELOG.MD b/CHANGELOG.MD index dab4da3d1..309c16b4b 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,6 +1,9 @@ 1.4.0 弹出菜单改进 -新选项菜单 +选项菜单 游戏速度选项 游戏未正常载入时可重置游戏 导入/导出游戏数据 +可禁用单个武将/卡牌 +作弊、换人、输入js命令 +修正国战明置bug diff --git a/game/config.js b/game/config.js index 4f63fd0a6..0511610ad 100755 --- a/game/config.js +++ b/game/config.js @@ -249,6 +249,8 @@ window.config={ cards:['standard','ex','extra','refresh'], characters:['standard','wind','fire','woods','mountain','refresh'], plays:[], + banned:[], + bannedcards:[], mode:'identity', mode_config:{ diff --git a/game/game.js b/game/game.js index 838a3cef4..2bf05d3bd 100755 --- a/game/game.js +++ b/game/game.js @@ -643,23 +643,16 @@ var downloadLink = document.createElement("a"); downloadLink.download = fileNameToSaveAs; downloadLink.innerHTML = "Download File"; - if (window.webkitURL != null) - { - // Chrome allows the link to be clicked - // without actually adding it to the DOM. - downloadLink.href = window.webkitURL.createObjectURL(textFileAsBlob); - } - else - { - // Firefox requires the link to be added to the DOM - // before it can be clicked. - downloadLink.href = window.URL.createObjectURL(textFileAsBlob); - downloadLink.onclick = function(){ - downloadLink.remove(); - }; - downloadLink.style.display = "none"; - document.body.appendChild(downloadLink); - } + downloadLink.href = window.URL.createObjectURL(textFileAsBlob); + + // { + // downloadLink.href = window.URL.createObjectURL(textFileAsBlob); + // downloadLink.onclick = function(){ + // downloadLink.remove(); + // }; + // downloadLink.style.display = "none"; + // document.body.appendChild(downloadLink); + // } downloadLink.click(); }, @@ -684,7 +677,8 @@ '7':'七人', '8':'八人' }, - frequent:true + frequent:true, + restart:true, }, double_character:{ name:'双将模式', @@ -715,7 +709,7 @@ }, init:'off', onclick:function(bool){ - game.saveConfig('auto_identity',bool,true); + game.saveConfig('auto_identity',bool,this._link.config.mode); var num; switch(bool){ case '一轮':num=1;break; @@ -744,7 +738,7 @@ name:'自由选将', init:true, onclick:function(bool){ - game.saveConfig('free_choose',bool,true); + game.saveConfig('free_choose',bool,this._link.config.mode); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; if(!ui.cheat2&&get.config('free_choose')) ui.create.cheat2(); else if(ui.cheat2&&!get.config('free_choose')){ @@ -761,7 +755,7 @@ name:'自由选择身份和座位', init:true, onclick:function(bool){ - game.saveConfig('change_identity',bool,true); + game.saveConfig('change_identity',bool,this._link.config.mode); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; var dialog; if(ui.cheat2&&ui.cheat2.backup) dialog=ui.cheat2.backup; @@ -775,7 +769,7 @@ name:'开启换将卡', init:false, onclick:function(bool){ - game.saveConfig('change_choice',bool,true); + game.saveConfig('change_choice',bool,this._link.config.mode); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; if(!ui.cheat&&get.config('change_choice')) ui.create.cheat(); else if(ui.cheat&&!get.config('change_choice')){ @@ -793,7 +787,7 @@ name:'死亡后显示重来', init:true, onclick:function(bool){ - game.saveConfig('dierestart',bool,true); + game.saveConfig('dierestart',bool,this._link.config.mode); if(get.config('dierestart')){ if(!ui.restart&&game.me.isDead()){ ui.restart=ui.create.control('restart',game.reload); @@ -809,7 +803,7 @@ name:'死亡后显示换人', init:true, onclick:function(bool){ - game.saveConfig('swap',bool,true); + game.saveConfig('swap',bool,this._link.config.mode); if(get.config('swap')){ if(!ui.swap&&game.me.isDead()){ ui.swap=ui.create.control('换人',ui.click.dieswap); @@ -825,7 +819,7 @@ name:'死亡后显示复活', init:false, onclick:function(bool){ - game.saveConfig('revive',bool,true); + game.saveConfig('revive',bool,this._link.config.mode); if(get.config('revive')){ if(!ui.revive&&game.me.isDead()){ ui.revive=ui.create.control('revive',ui.click.dierevive); @@ -874,7 +868,8 @@ '7':'七人', '8':'八人' }, - frequent:true + frequent:true, + restart:true, }, initshow_draw:{ name:'首亮摸牌', @@ -907,7 +902,7 @@ name:'自由选将', init:true, onclick:function(bool){ - game.saveConfig('free_choose',bool,true); + game.saveConfig('free_choose',bool,this._link.config.mode); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; if(!ui.cheat2&&get.config('free_choose')) ui.create.cheat2(); else if(ui.cheat2&&!get.config('free_choose')){ @@ -924,7 +919,7 @@ name:'自由选择座位', init:true, onclick:function(bool){ - game.saveConfig('change_identity',bool,true); + game.saveConfig('change_identity',bool,this._link.config.mode); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; var dialog; if(ui.cheat2&&ui.cheat2.backup) dialog=ui.cheat2.backup; @@ -938,7 +933,7 @@ name:'开启换将卡', init:false, onclick:function(bool){ - game.saveConfig('change_choice',bool,true); + game.saveConfig('change_choice',bool,this._link.config.mode); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; if(!ui.cheat&&get.config('change_choice')) ui.create.cheat(); else if(ui.cheat&&!get.config('change_choice')){ @@ -956,7 +951,7 @@ name:'死亡后显示重来', init:true, onclick:function(bool){ - game.saveConfig('dierestart',bool,true); + game.saveConfig('dierestart',bool,this._link.config.mode); if(get.config('dierestart')){ if(!ui.restart&&game.me.isDead()){ ui.restart=ui.create.control('restart',game.reload); @@ -972,7 +967,7 @@ name:'死亡后显示换人', init:true, onclick:function(bool){ - game.saveConfig('swap',bool,true); + game.saveConfig('swap',bool,this._link.config.mode); if(get.config('swap')){ if(!ui.swap&&game.me.isDead()){ ui.swap=ui.create.control('换人',ui.click.dieswap); @@ -988,7 +983,7 @@ name:'死亡后显示复活', init:false, onclick:function(bool){ - game.saveConfig('revive',bool,true); + game.saveConfig('revive',bool,this._link.config.mode); if(get.config('revive')){ if(!ui.revive&&game.me.isDead()){ ui.revive=ui.create.control('revive',ui.click.dierevive); @@ -1018,7 +1013,7 @@ name:'开启换将卡', init:false, onclick:function(bool){ - game.saveConfig('change_choice',bool,true); + game.saveConfig('change_choice',bool,this._link.config.mode); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; if(!ui.cheat&&get.config('change_choice')) ui.create.cheat(); else if(ui.cheat&&!get.config('change_choice')){ @@ -1044,7 +1039,7 @@ init:true, frequent:true, onclick:function(bool){ - game.saveConfig('free_choose',bool,true); + game.saveConfig('free_choose',bool,this._link.config.mode); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; if(!ui.cheat2&&get.config('free_choose')) ui.create.cheat2(); else if(ui.cheat2&&!get.config('free_choose')){ @@ -1061,7 +1056,7 @@ name:'开启换将卡', init:false, onclick:function(bool){ - game.saveConfig('change_choice',bool,true); + game.saveConfig('change_choice',bool,this._link.config.mode); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; if(!ui.cheat&&get.config('change_choice')) ui.create.cheat(); else if(ui.cheat&&!get.config('change_choice')){ @@ -1166,7 +1161,7 @@ '8':'8v8', }, onclick:function(num){ - game.saveConfig('battle_number',num,true); + game.saveConfig('battle_number',num,this._link.config.mode); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; if(_status.event.parent.changeDialog){ _status.event.parent.changeDialog(); @@ -1197,7 +1192,7 @@ name:'自由选将', init:true, onclick:function(bool){ - game.saveConfig('free_choose',bool,true); + game.saveConfig('free_choose',bool,this._link.config.mode); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; if(!ui.cheat2&&get.config('free_choose')) ui.create.cheat2(); else if(ui.cheat2&&!get.config('free_choose')){ @@ -1214,7 +1209,7 @@ name:'开启换将卡', init:false, onclick:function(bool){ - game.saveConfig('change_choice',bool,true); + game.saveConfig('change_choice',bool,this._link.config.mode); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; if(!ui.cheat&&get.config('change_choice')) ui.create.cheat(); else if(ui.cheat&&!get.config('change_choice')){ @@ -1246,7 +1241,7 @@ '10':'十人', }, onclick:function(num){ - game.saveConfig('battle_number',num,true); + game.saveConfig('battle_number',num,this._link.config.mode); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; if(_status.event.parent.changeDialog){ _status.event.parent.changeDialog(); @@ -1257,7 +1252,7 @@ name:'自由选将', init:true, onclick:function(bool){ - game.saveConfig('free_choose',bool,true); + game.saveConfig('free_choose',bool,this._link.config.mode); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; if(!ui.cheat2&&get.config('free_choose')) ui.create.cheat2(); else if(ui.cheat2&&!get.config('free_choose')){ @@ -1275,7 +1270,7 @@ name:'开启换将卡', init:false, onclick:function(bool){ - game.saveConfig('change_choice',bool,true); + game.saveConfig('change_choice',bool,this._link.config.mode); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; if(!ui.cheat&&get.config('change_choice')) ui.create.cheat(); else if(ui.cheat&&!get.config('change_choice')){ @@ -1302,12 +1297,24 @@ frameId:0, }, help:{ - '选项帮助':'