"use strict"; (function(){ var _status={ paused:false, paused2:false, over:false, clicked:false, auto:false, event:{ finished:true, next:[], }, ai:{}, lastdragchange:[] }; var lib={ configprefix:'noname_0.9_', updates:[], canvasUpdates:[], configMenu:{ general:{ name:'通用', config:{ cheat:{ name:'控制台命令', init:false, onclick:function(bool){ if(lib.config.cheat&&bool==false){ lib.cheat=window.cheat; delete window.cheat; delete window.game; delete window.ui; delete window.get; delete window.ai; delete window.lib; delete window._status; } else if(!lib.config.cheat&&bool){ window.cheat=lib.cheat; window.cheat.i(); } game.saveConfig('cheat',bool); }, unfrequent:true, }, auto_confirm:{ name:'自动确认', init:true, }, enable_drag:{ name:'启用拖拽', init:true, }, wuxie_self:{ name:'不无懈自己', init:true, } // ***** } }, appearence:{ name:'外观', config:{ theme:{ name:'主题', init:'woodden', item:{ woodden:'木纹', music:'音乐', simple:'简约', }, onclick:function(theme){ game.saveConfig('theme',theme); ui.arena.hide(); setTimeout(function(){ var theme=ui.css.theme; ui.css.theme=lib.init.css('theme/'+lib.config.theme,'style'); theme.remove(); setTimeout(function(){ui.arena.show();},100); },500); } } } } }, mode:{ identity:{ name:'身份', config:{ player_number:{ name:'游戏人数', init:'8', item:{ '2':'两人', '3':'三人', '4':'四人', '5':'五人', '6':'六人', '7':'七人', '8':'八人' }, frequent:true }, double_character:{ name:'双将模式', init:false, frequent:true, restart:true, }, double_hp:{ name:'双将体力上限', init:'pingjun', item:{ hejiansan:'和减三', pingjun:'平均值', zuidazhi:'最大值', zuixiaozhi:'最小值', zonghe:'相加', }, restart:true, }, auto_identity:{ name:'自动显示身份', item:{ off:'关闭', one:'一轮', two:'两轮', three:'三轮', always:'始终' }, init:'off', onclick:function(bool){ game.saveConfig('auto_identity',bool,true); var num; switch(bool){ case '一轮':num=1;break; case '两轮':num=2;break; case '三轮':num=3;break; default:num=0;break; } if(num&!_status.identityShown&&game.phaseNumber>game.players.length*num&&game.showIdentity){ _status.identityShown=true; game.showIdentity(); } } }, ban_weak:{ name:'屏蔽弱将', init:false, restart:true, }, enhance_zhu:{ name:'加强主公', init:false, restart:true, frequent:true, }, free_choose:{ name:'自由选将', init:true, onclick:function(bool){ game.saveConfig('free_choose',bool,true); 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')){ ui.cheat2.close(); delete ui.cheat2; if(ui.cheat2x){ ui.cheat2x.close(); delete ui.cheat2; } } } }, change_identity:{ name:'自由选择身份和座位', init:true, onclick:function(bool){ game.saveConfig('change_identity',bool,true); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; var dialog; if(ui.cheat2&&ui.cheat2.backup) dialog=ui.cheat2.backup; else dialog=_status.event.dialog; if(!dialog.querySelector('table')&&get.config('change_identity')) _status.event.parent.addSetting(dialog); else _status.event.parent.removeSetting(dialog); ui.update(); } }, change_choice:{ name:'开启换将卡', init:false, onclick:function(bool){ game.saveConfig('change_choice',bool,true); 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')){ ui.cheat.close(); delete ui.cheat; } } }, change_card:{ name:'开启手气卡', init:false, frequent:true }, dierestart:{ name:'死亡后显示重来', init:true, onclick:function(bool){ game.saveConfig('dierestart',bool,true); if(get.config('dierestart')){ if(!ui.restart&&game.me.isDead()){ ui.restart=ui.create.control('restart',game.reload); } } else if(ui.restart){ ui.restart.close(); delete ui.restart; } } }, swap:{ name:'死亡后显示换人', init:true, onclick:function(bool){ game.saveConfig('swap',bool,true); if(get.config('swap')){ if(!ui.swap&&game.me.isDead()){ ui.swap=ui.create.control('换人',ui.click.dieswap); } } else if(ui.swap){ ui.swap.close(); delete ui.swap; } } }, revive:{ name:'死亡后显示复活', init:false, onclick:function(bool){ game.saveConfig('revive',bool,true); if(get.config('revive')){ if(!ui.revive&&game.me.isDead()){ ui.revive=ui.create.control('revive',ui.click.dierevive); } } else if(ui.revive){ ui.revive.close(); delete ui.revive; } } }, ai_strategy:{ name:'内奸策略', init:'ai_strategy_1', item:{ ai_strategy_1:'均衡', ai_strategy_2:'偏反', ai_strategy_3:'偏忠', ai_strategy_4:'酱油', ai_strategy_5:'天使', ai_strategy_6:'仇主', } }, difficulty:{ name:'AI对人类态度', init:'normal', item:{ easy:'友好', normal:'一般', hard:'仇视', } }, } }, guozhan:{ name:'国战', config:{ player_number:{ name:'游戏人数', init:'8', item:{ '3':'三人', '4':'四人', '5':'五人', '6':'六人', '7':'七人', '8':'八人' }, frequent:true }, initshow_draw:{ name:'首亮摸牌', item:{ '0':'无', '1':'一张', '2':'两张', }, init:'2', frequent:true, }, zhulian:{ name:'珠联璧合', init:true, frequent:true, }, double_hp:{ name:'双将体力上限', init:'pingjun', item:{ hejiansan:'和减三', pingjun:'平均值', zuidazhi:'最大值', zuixiaozhi:'最小值', zonghe:'相加', }, restart:true, }, free_choose:{ name:'自由选将', init:true, onclick:function(bool){ game.saveConfig('free_choose',bool,true); 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')){ ui.cheat2.close(); delete ui.cheat2; if(ui.cheat2x){ ui.cheat2x.close(); delete ui.cheat2; } } } }, change_identity:{ name:'自由选择座位', init:true, onclick:function(bool){ game.saveConfig('change_identity',bool,true); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; var dialog; if(ui.cheat2&&ui.cheat2.backup) dialog=ui.cheat2.backup; else dialog=_status.event.dialog; if(!dialog.querySelector('table')&&get.config('change_identity')) _status.event.parent.addSetting(dialog); else _status.event.parent.removeSetting(dialog); ui.update(); } }, change_choice:{ name:'开启换将卡', init:false, onclick:function(bool){ game.saveConfig('change_choice',bool,true); 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')){ ui.cheat.close(); delete ui.cheat; } } }, change_card:{ name:'开启手气卡', init:false, frequent:true }, dierestart:{ name:'死亡后显示重来', init:true, onclick:function(bool){ game.saveConfig('dierestart',bool,true); if(get.config('dierestart')){ if(!ui.restart&&game.me.isDead()){ ui.restart=ui.create.control('restart',game.reload); } } else if(ui.restart){ ui.restart.close(); delete ui.restart; } } }, swap:{ name:'死亡后显示换人', init:true, onclick:function(bool){ game.saveConfig('swap',bool,true); if(get.config('swap')){ if(!ui.swap&&game.me.isDead()){ ui.swap=ui.create.control('换人',ui.click.dieswap); } } else if(ui.swap){ ui.swap.close(); delete ui.swap; } } }, revive:{ name:'死亡后显示复活', init:false, onclick:function(bool){ game.saveConfig('revive',bool,true); if(get.config('revive')){ if(!ui.revive&&game.me.isDead()){ ui.revive=ui.create.control('revive',ui.click.dierevive); } } else if(ui.revive){ ui.revive.close(); delete ui.revive; } } }, difficulty:{ name:'AI对人类态度', init:'normal', item:{ easy:'友好', normal:'一般', hard:'仇视', } }, } }, versus:{ name:'对决', config:{ change_choice:{ name:'开启换将卡', init:false, onclick:function(bool){ game.saveConfig('change_choice',bool,true); 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')){ ui.cheat.close(); delete ui.cheat; } }, frequent:true, }, ban_weak:{ name:'屏蔽弱将', init:false, restart:true, frequent:true, }, } }, boss:{ name:'挑战', config:{ free_choose:{ name:'自由选将', init:true, frequent:true, onclick:function(bool){ game.saveConfig('free_choose',bool,true); 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')){ ui.cheat2.close(); delete ui.cheat2; if(ui.cheat2x){ ui.cheat2x.close(); delete ui.cheat2; } } } }, change_choice:{ name:'开启换将卡', init:false, onclick:function(bool){ game.saveConfig('change_choice',bool,true); 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')){ ui.cheat.close(); delete ui.cheat; } }, frequent:true, }, ban_weak:{ name:'屏蔽弱将', init:false, restart:true, frequent:true, }, } }, chess:{ name:'战棋', config:{ chess_mode:{ name:'游戏模式', init:'combat', item:{ combat:'对战', leader:'统率' }, restart:true, frequent:true, }, update:function(config,map){ if(config.chess_mode=='combat'){ map.chess_leader_save.hide(); map.chess_leader_clear.hide(); map.battle_number.show(); map.ban_weak.show(); map.free_choose.show(); map.change_choice.show(); map.chess_ordered.show(); map.chess_character.show(); } else{ map.chess_leader_save.show(); map.chess_leader_clear.show(); map.battle_number.hide(); map.ban_weak.hide(); map.free_choose.hide(); map.change_choice.hide(); map.chess_ordered.hide(); map.chess_character.hide(); } }, chess_leader_save:{ name:'选择历程', init:'save1', item:{ save1:'一', save2:'二', save3:'三', save4:'四', save5:'五', }, restart:true, frequent:true, }, chess_leader_clear:{ name:'清除进度', onclick:function(){ var node=this; if(node._clearing){ game.save(get.config('chess_leader_save'),null); window.location.reload(); return; } node._clearing=true; node.innerHTML='单击以确认 (3)'; setTimeout(function(){ node.innerHTML='单击以确认 (2)'; setTimeout(function(){ node.innerHTML='单击以确认 (1)'; setTimeout(function(){ node.innerHTML='清除进度'; delete node._clearing; },1000); },1000); },1000); }, clear:true, frequent:true, }, battle_number:{ name:'对战人数', init:'3', frequent:true, item:{ '2':'2v2', '3':'3v3', '4':'4v4', '6':'6v6', '8':'8v8', }, onclick:function(num){ game.saveConfig('battle_number',num,true); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; if(_status.event.parent.changeDialog){ _status.event.parent.changeDialog(); } }, }, chess_ordered:{ name:'交替行动', init:true, frequent:true, }, chess_character:{ name:'战棋武将', init:true, frequent:true, }, chessscroll_speed:{ name:'边缘滚动速度', init:'20', item:{ '0':'不滚动', '10':'10格/秒', '20':'20格/秒', '30':'30格/秒', } }, free_choose:{ name:'自由选将', init:true, onclick:function(bool){ game.saveConfig('free_choose',bool,true); 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')){ ui.cheat2.close(); delete ui.cheat2; if(ui.cheat2x){ ui.cheat2x.close(); delete ui.cheat2; } } }, }, change_choice:{ name:'开启换将卡', init:false, onclick:function(bool){ game.saveConfig('change_choice',bool,true); 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')){ ui.cheat.close(); delete ui.cheat; } }, }, ban_weak:{ name:'屏蔽弱将', init:false, restart:true, }, } }, stone:{ name:'炉石', config:{ battle_number:{ name:'出场人数', init:'3', frequent:true, item:{ '2':'两人', '3':'三人', '4':'四人', '6':'六人', '8':'八人', '10':'十人', }, onclick:function(num){ game.saveConfig('battle_number',num,true); if(!_status.event.parent.showConfig&&!_status.event.showConfig) return; if(_status.event.parent.changeDialog){ _status.event.parent.changeDialog(); } }, }, free_choose:{ name:'自由选将', init:true, onclick:function(bool){ game.saveConfig('free_choose',bool,true); 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')){ ui.cheat2.close(); delete ui.cheat2; if(ui.cheat2x){ ui.cheat2x.close(); delete ui.cheat2; } } }, frequent:true, }, change_choice:{ name:'开启换将卡', init:false, onclick:function(bool){ game.saveConfig('change_choice',bool,true); 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')){ ui.cheat.close(); delete ui.cheat; } }, frequent:true, }, ban_weak:{ name:'屏蔽弱将', init:false, restart:true, frequent:true, }, } } }, status:{ running:false, canvas:false, time:0, delayed:0, frameId:0, }, help:{ '选项帮助':'