• 游客,欢迎来到米坛社区。
    米坛社区是大型中文智能穿戴设备交流社区,在这里交流你的极客思想,共同建造我们的智能世界
    为了更加方便的获取支持与帮助,请加入米坛社区官方QQ频道

问答 求魔塔开源档案

淘汰郎

LV8
🔥社区作者
普通成员
UID
77922
2021-12-01
594
6,273
JavaScript:
try{(()=>{var e=__$$hmAppManager$$__.currentApp;function t(){return e.app}const o=e.current,{px:n}=(new DeviceRuntimeCore.WidgetFactory(new DeviceRuntimeCore.HmDomApi(e,o)),t().__globals__),i=t().__globals__.gettext,{width:r,height:a}=hmSetting.getDeviceInfo();i("appName"),n(42),n(200),n(42),n(100),n(36),hmUI.align.CENTER_H,hmUI.text_style.WRAP;const y=DeviceRuntimeCore.HmLogger.getLogger("fs.js");function p(e,t,o){y.log("writeFileSync begin --\x3e",e);const n=function(e){for(var t=new ArrayBuffer(2*e.length),o=new Uint16Array(t),n=0,i=e.length;n<i;n++)o[n]=e.charCodeAt(n);return t}(t),i=new Uint8Array(n),r=hmFS.open(e,hmFS.O_CREAT|hmFS.O_RDWR|hmFS.O_TRUNC);y.log("writeFileSync file open success --\x3e",r),hmFS.seek(r,0,hmFS.SEEK_SET),hmFS.write(r,i.buffer,0,i.length),hmFS.close(r),y.log("writeFileSync success --\x3e",e)}function s(e,t){y.log("readFileSync fiename:",e);const o=function(e){y.log("statSync",e);const[t,o]=hmFS.stat(e);return y.log("res",t,o),0==o?(y.log("fs---\x3esize:",t.size),t):(y.log("fs---\x3eerr:",o),null)}(e);if(!o)return;const n=new Uint8Array(o.size),i=hmFS.open(e,hmFS.O_RDONLY);hmFS.seek(i,0,hmFS.SEEK_SET),hmFS.read(i,n.buffer,0,o.size),hmFS.close(i);const r=(a=n.buffer,String.fromCharCode.apply(null,new Uint16Array(a)));var a;return y.log("readFileSync",r),r}const u=DeviceRuntimeCore.HmLogger.getLogger("hello-world-page");o.module=DeviceRuntimeCore.Page({build(){u.log("page build invoked");const e={YELLOW_KEY:"YELLOW_KEY",BLUE_KEY:"BLUE_KEY",RED_KEY:"RED_KEY",HP:"HP",ATK:"ATK",DEF:"DEF",GOLD:"GOLD",EXP:"EXP",LEVEL:"LEVEL",FLOOR:"FLOOR",MAX_FLOOR:"MAX_FLOOR",MONS_INFO:"MONS_INFO",EVERY_THING:"EVERY_THING"},t={storage:{items:{}},getItemCount:function(e){return this.storage.items[e]?this.storage.items[e]:0},addItemCount:function(e,t){let o=this.getItemCount(e);this.setItemCount(e,o+t)},setItemCount:function(e,t){this.storage.items[e]=t,me(e,t),console.log("物品当前数量 "+e+":"+t)},set:function(e,t){this.storage[e]=t},get:function(e){return this.storage[e]},setNpcDone:function(e){this.set("npc_"+e.id,!0)},isNpcDone:function(e){return this.get("npc_"+e.id)},save:function(){!function(e,t){let o=t;p(e,JSON.stringify(o))}("MAGIC_TOWER_GAME_STORAGE.txt",this.storage)},load:function(){try{this.storage=function(e){const t=s(e);return t?JSON.parse(t):""}("MAGIC_TOWER_GAME_STORAGE.txt"),this.storage||this.reset()}catch(e){this.reset()}},resetAllAttrUI:function(){for(var t in e)me(t,this.getItemCount(t))},reset:function(){this.storage={items:{}},t.setItemCount(e.YELLOW_KEY,1),t.setItemCount(e.BLUE_KEY,1),t.setItemCount(e.RED_KEY,1),t.setItemCount(e.LEVEL,1),t.setItemCount(e.HP,1e3),t.setItemCount(e.ATK,13),t.setItemCount(e.DEF,13),t.setItemCount(e.GOLD,0),t.setItemCount(e.EXP,0),t.setItemCount(e.FLOOR,0),t.setItemCount(e.MAX_FLOOR,0),t.setItemCount(e.EVERY_THING,9999),this.save()}};var o=function(){this.data=[[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0]],this.npcMap={}};function n(e,t){var o="";if(e)switch(t){case 0:case 7:case 26:o={x:10,y:5};break;case 1:case 14:o={x:9,y:5};break;case 2:case 8:o={x:1,y:0};break;case 3:case 5:case 11:case 13:case 18:o={x:10,y:1};break;case 4:o={x:9,y:10};break;case 6:o={x:9,y:9};break;case 9:o={x:3,y:6};break;case 10:o={x:6,y:4};break;case 12:case 19:o={x:10,y:9};break;case 15:o={x:0,y:3};break;case 16:o={x:0,y:5};break;case 17:o={x:8,y:5};break;case 20:o={x:3,y:4};break;case 21:o={x:5,y:5};break;case 22:case 25:o={x:1,y:5};break;case 23:o={x:5,y:9};break;case 24:o={x:5,y:1}}else switch(t){case 0:case 21:o={x:1,y:5};break;case 1:case 7:o={x:0,y:1};break;case 2:case 4:case 10:o={x:9,y:0};break;case 3:o={x:9,y:10};break;case 5:o={x:9,y:9};break;case 6:o={x:10,y:5};break;case 8:o={x:4,y:7};break;case 9:o={x:7,y:6};break;case 11:case 18:o={x:10,y:9};break;case 12:case 17:o={x:10,y:1};break;case 13:o={x:10,y:4};break;case 14:o={x:0,y:5};break;case 15:o={x:0,y:7};break;case 16:case 20:o={x:6,y:5};break;case 19:o={x:4,y:5}}return o}o.prototype.makeMap=function(e,t){var o=this;switch(e){case 0:o.data=[[2,0,0,0,0,1,0,0,0,0,2],[2,0,0,0,0,1,0,0,0,0,2],[2,0,0,0,0,1,0,0,0,0,2],[2,0,0,0,0,1,0,0,0,0,2],[2,0,0,0,0,1,0,0,0,0,2],[2,0,0,0,0,1,0,0,0,0,2],[2,2,0,0,0,1,0,0,0,2,2],[2,2,2,2,2,1,2,2,2,2,2],[3,2,3,2,1,1,1,2,3,2,3],[3,3,3,3,3,1,3,3,3,3,3],[3,3,3,3,3,1,3,3,3,3,3]];break;case 1:o.data=[[1,1,1,1,1,1,1,1,1,1,1],[2,2,2,2,2,2,2,2,2,2,1],[1,1,1,1,1,2,1,1,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,1,1,1,0,0,1,1,1,1],[1,1,0,0,0,0,0,0,1,1,0],[1,0,0,1,0,0,0,0,0,1,0],[1,0,0,1,1,1,1,1,0,1,0],[1,0,0,0,0,0,0,1,1,1,0],[1,1,1,1,1,1,1,1,0,1,1]];break;case 24:o.data=[[1,1,0,1,1,1,1,1,1,1,1],[0,1,1,1,0,0,0,0,0,0,1],[0,1,0,1,1,1,1,1,0,0,1],[0,1,0,0,0,0,0,1,0,0,1],[0,1,1,0,0,0,0,0,0,1,1],[1,1,1,1,0,0,1,1,1,1,0],[0,1,1,0,0,0,0,0,0,1,1],[0,1,0,0,0,0,0,1,0,0,1],[0,1,0,1,1,1,1,1,0,0,1],[0,1,1,1,0,0,0,0,0,0,1],[1,1,0,1,1,1,1,1,1,1,1]];break;case 25:o.data=[[1,0,0,0,0,1,0,0,0,0,1],[1,1,1,1,1,1,1,1,1,1,1],[0,1,0,0,1,1,1,0,0,1,0],[1,1,1,0,0,1,0,0,1,1,1],[1,0,1,0,0,0,0,0,1,0,1],[1,0,1,0,0,1,0,0,1,0,1],[1,0,1,0,0,1,0,0,1,0,1],[1,0,1,1,0,1,0,1,1,0,1],[1,0,0,0,0,1,0,0,0,0,1],[1,0,0,0,1,1,1,0,0,0,1],[1,1,1,1,1,0,1,1,1,1,1]];break;case 26:o.data=[[3,3,3,1,1,1,1,1,3,3,3],[3,3,3,1,1,1,1,1,3,3,3],[3,3,3,1,1,1,1,1,3,3,3],[3,3,3,1,1,1,1,1,3,3,3],[3,3,3,1,1,1,1,1,3,3,3],[3,1,1,1,1,1,1,1,1,1,3],[3,3,3,3,3,1,3,3,3,3,3],[3,3,3,1,1,1,1,1,3,3,3],[3,3,3,3,3,1,3,3,3,3,3],[3,3,3,3,1,1,1,3,3,3,3],[3,3,3,3,3,1,3,3,3,3,3]]}return o},o.prototype.loadNpc=function(e){let t=h[e+""]();this.npcMap={};for(var o=0;o<t.length;o++){let e=t[o];if(null!=e.vif)if("function"==typeof e.vif){if(!e.vif())continue}else if(!e.vif)continue;this.setNpc(e),e.onShow&&e.onShow()}},o.prototype.setNpc=function(e){let t=e.x+","+e.y;this.npcMap[t]=e},o.prototype.getNpc=function(e,t){let o=e+","+t;return this.npcMap[o]},o.prototype.removeNpc=function(e){let t=e.x+","+e.y;delete this.npcMap[t],pe(this,e)},o.prototype.getBlock=function(e,t){return e<0||e>10||t<0||t>10?-1:this.data[t][e]},o.prototype.reLoadFloor=function(e){this.makeMap(e),this.loadNpc(e),re()};var i=function(){this.data=[[0]],this.origin={x:0,y:0},this.message="",this.name=""};i.prototype.makeFloorUp=function(e){var t=new i;return t.data=[[1.1]],t.message="",t.name="上",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFloorDown=function(e){var t=new i;return t.data=[[1.2]],t.message="",t.name="下",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcElfin=function(e){var t=new i;return t.data=[[2.1]],t.message="",t.name="精灵",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcThief=function(e){var t=new i;return t.data=[[2.2]],t.message="",t.name="小偷",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcPrincess=function(e){var t=new i;return t.data=[[2.3]],t.message="",t.name="公主",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcExpShop=function(e){var t=new i;return t.data=[[2.4]],t.message="",t.name="经验商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcGoldShop=function(e){var t=new i;return t.data=[[2.5]],t.message="",t.name="金币商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcGoldShop1=function(e){var t=new i;return t.data=[[2.51]],t.message="",t.name="",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcGoldShop2=function(e){var t=new i;return t.data=[[2.52]],t.message="",t.name="",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcKeySell=function(e){var t=new i;return t.data=[[2.6]],t.message="",t.name="钥匙贩卖商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcKeyBuy=function(e){var t=new i;return t.data=[[2.7]],t.message="",t.name="钥匙收购商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcMisticalOldMan=function(e){var t=new i;return t.data=[[2.8]],t.message="",t.name="神秘老人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeWeapon10=function(e){var t=new i;return t.data=[[3.1]],t.message="攻击 + 10",t.name="铁剑",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeWeapon30=function(e){var t=new i;return t.data=[[3.2]],t.message="攻击 + 50",t.name="银剑",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeWeapon70=function(e){var t=new i;return t.data=[[3.3]],t.message="攻击 + 150",t.name="神剑",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeWeapon150=function(e){var t=new i;return t.data=[[3.4]],t.message="攻击 + 300",t.name="圣剑",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeShield10=function(e){var t=new i;return t.data=[[3.5]],t.message="防御 + 10",t.name="铁盾",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeShield30=function(e){var t=new i;return t.data=[[3.6]],t.message="防御 + 85",t.name="银盾",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeShield70=function(e){var t=new i;return t.data=[[3.7]],t.message="防御 + 150",t.name="神盾",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeShield150=function(e){var t=new i;return t.data=[[3.8]],t.message="防御 + 300",t.name="圣盾",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeSupply200HP=function(e){var t=new i;return t.data=[[4.1]],t.message="血量 + 200",t.name="小血瓶",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeSupply500HP=function(e){var t=new i;return t.data=[[4.2]],t.message="血量 + 500",t.name="大血瓶",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeSupply3ATK=function(e){var t=new i;return t.data=[[4.3]],t.message="攻击 + 3",t.name="红宝石",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeSupply3DEF=function(e){var t=new i;return t.data=[[4.4]],t.message="防御 + 3",t.name="蓝宝石",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeEquipAtk50=function(e){var t=new i;return t.data=[[5.1]],t.message="",t.name="武器商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeEquipAtk150=function(e){var t=new i;return t.data=[[5.2]],t.message="",t.name="武器商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeEquipDef50=function(e){var t=new i;return t.data=[[5.3]],t.message="",t.name="盾牌商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeEquipDef150=function(e){var t=new i;return t.data=[[5.4]],t.message="",t.name="盾牌商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeDoorYellow=function(e){var t=new i;return t.data=[[6.1]],t.message="",t.name="黄门",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeDoorBlue=function(e){var t=new i;return t.data=[[6.2]],t.message="",t.name="蓝门",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeDoorRed=function(e){var t=new i;return t.data=[[6.3]],t.message="",t.name="红门",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeDoorIron=function(e){var t=new i;return t.data=[[6.4]],t.message="",t.name="铁门",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeDoorIronCant=function(e){var t=new i;return t.data=[[6.5]],t.message="",t.name="铁门",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeDoorGreen=function(e){var t=new i;return t.data=[[6.6]],t.message="",t.name="绿门",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeLevelOne=function(e){var t=new i;return t.data=[[7.1]],t.message="等级提升 1 级",t.name="一级羽毛",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeLevelTwo=function(e){var t=new i;return t.data=[[7.2]],t.message="等级提升 2 级",t.name="二级羽毛",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeLevelThree=function(e){var t=new i;return t.data=[[7.3]],t.message="等级提升 3 级",t.name="三级羽毛",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeKeyYellow=function(e){var t=new i;return t.data=[[8.1]],t.message="黄钥匙 + 1",t.name="黄钥匙",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeKeyBlue=function(e){var t=new i;return t.data=[[8.2]],t.message="蓝钥匙 + 1",t.name="蓝钥匙",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeKeyRed=function(e){var t=new i;return t.data=[[8.3]],t.message="红钥匙 + 1",t.name="红钥匙",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeKeyAll=function(e){var t=new i;return t.data=[[8.4]],t.message="所有钥匙 + 1",t.name="钥匙盒",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionFly=function(e){var t=new i;return t.data=[[9.1]],t.message="按‘R’可打开楼层传送界面",t.name="楼层传送器",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionMonster=function(e){var t=new i;return t.data=[[9.2]],t.message="按‘F’可打开怪物探测界面",t.name="怪物探测器",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionCross=function(e){var t=new i;return t.data=[[9.3]],t.message="自身属性提升1/3",t.name="神圣十字架",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionPickaxe=function(e){var t=new i;return t.data=[[9.4]],t.message="交给4层的小偷可打通18层的通道",t.name="十字镐",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionHolyWater=function(e){var t=new i;return t.data=[[9.5]],t.message="生命值翻倍",t.name="圣水",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionBigGold=function(e){var t=new i;return t.data=[[9.6]],t.message="金币 + 300",t.name="大金币",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionStaffOne=function(e){var t=new i;return t.data=[[9.71]],t.message="集齐魔杖交给精灵可削弱魔龙",t.name="蓝魔杖",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionStaffTwo=function(e){var t=new i;return t.data=[[9.72]],t.message="集齐魔杖交给精灵可削弱魔龙",t.name="黄魔杖",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionStaffThree=function(e){var t=new i;return t.data=[[9.73]],t.message="集齐魔杖交给精灵可削弱魔龙",t.name="红魔杖",t.origin.x=e.x,t.origin.y=e.y,t};var r=function(e,t){t.onHint()},a=function(e,t,o){P.removeNpc(e),e.x=t,e.y=o,P.setNpc(e),function(e,t,o){ee[e.id]&&pe(P,e);let n=oe,i=ne,r=oe+7,a=ne+7;if(e.x>=n&&e.x<r&&e.y>=i&&e.y<a&&e.class){let t="images/"+e.class+".png",o=e.x-oe,n=e.y-ne;Z[7*n+o].setProperty(hmUI.prop.MORE,{src:t}),ee[e.id]=Z[7*n+o]}}(e)};const y={3.1:{ATK:10},3.2:{ATK:30},3.3:{ATK:70},3.4:{ATK:150},3.5:{DEF:10},3.6:{DEF:30},3.7:{DEF:70},3.8:{DEF:150},4.1:{HP:200},4.2:{HP:500},4.3:{ATK:3},4.4:{DEF:3},5.1:{ATK:50},5.3:{DEF:50},7.1:{LEVEL:1,HP:1e3,ATK:7,DEF:7},7.2:{LEVEL:2,HP:2e3,ATK:14,DEF:14},8.1:{YELLOW_KEY:1},8.2:{BLUE_KEY:1},8.3:{RED_KEY:1},8.4:{YELLOW_KEY:1,BLUE_KEY:1,RED_KEY:1},9.2:{MONS_INFO:1},9.3:{HP:1/3,ATK:1/3,DEF:1/3},9.5:{HP:1},9.6:{GOLD:300}};var x=function(){this.list=[]};function m(e,o,n){return{x:e,y:o,src:"",type:4,vif:function(){return!t.isNpcDone(this)},key:n,onHint:function(){t.getItemCount(this.key)>0?(console.log("大门开启"),t.addItemCount(this.key,-1),t.setNpcDone(this),P.removeNpc(this)):console.log("钥匙不足")}}}function g(e,t,o){for(var n=0;n<o.length;n++){let r=o[n];var i=t(o[n]);e.simplePush(l(r,i))}}function l(o,n){var i="";let r=n.data[0][0];return 6.1==r?i=m(o.y,o.x,e.YELLOW_KEY):6.2==r?i=m(o.y,o.x,e.BLUE_KEY):6.3==r?i=m(o.y,o.x,e.RED_KEY):6.4==r?i=m(o.y,o.x,e.EVERY_THING):6.5==r||6.6==r?i=m(o.y,o.x,"NOT_ITEM"):r>10?i=function(e,o,n){return{x:e,y:o,type:2,vif:function(){return!t.isNpcDone(this)},monster:n,onHint:function(){v.fightMonster(this)}}}(o.y,o.x,n):y[r+""]?i=function(o,n,i){return{x:o,y:n,src:"",type:1,item:i,vif:function(){return!t.isNpcDone(this)},onHint:function(){if(9.3==this.detail_type)t.addItemCount(e.HP,Math.floor(.3*t.getItemCount(e.HP))),t.addItemCount(e.ATK,Math.floor(.3*t.getItemCount(e.ATK))),t.addItemCount(e.DEF,Math.floor(.3*t.getItemCount(e.DEF)));else if(9.5==this.detail_type)t.addItemCount(e.HP,t.getItemCount(e.HP));else for(var o in this.item)t.addItemCount(o,this.item[o]);if(t.setNpcDone(this),P.removeNpc(this),this.item_detail&&this.item_detail.name){var n="";n+="获得道具"+this.item_detail.name,this.item_detail.message&&(n+=":"+this.item_detail.message),ue(n)}}}}(o.y,o.x,y[r+""]):1.1==r?i={x:o.y,y:o.x,type:3,upflag:!0}:1.2==r?i={x:o.y,y:o.x,type:3,upflag:!1}:console.log("未实现的角色:"+JSON.stringify(n)),i.detail_type=n.data[0][0],i.item_detail={message:n.message,name:n.name},n.class&&(i.class=n.class),i}function c(e,t){for(var o=0;o<t.length;o++)if(t[o].id=e+"_"+o,!t[o].class){let e=f(t[o].detail_type);e?t[o].class=e:console.log("未渲染的组件:"+t[o].detail_type)}}x.prototype.push=function(e){this.list.push(function(e){return l({x:e.origin.x,y:e.origin.y},e)}(e))},x.prototype.simplePush=function(e){this.list.push(e)};const h={0:function(){let e=new x,o=e;return e.simplePush({x:5,y:8,detail_type:2.1,type:0,vif:function(){return!0},onHint:function(){var e=this;t.isNpcDone(this)?I(["勇敢的去吧,勇士!","公主就在16层。"]):I(["勇士,你醒了!","你是谁?我在哪里?","我是这里的仙子,刚才你被怪物打昏了。","剑,剑,我的剑呢?","你的剑被他们抢走了,我只来得及将你救出来。","那,公主呢?我是来救公主的。","公主还在里面,你这样进去是打不过里面的小怪的。","那我怎么办,我答应了国王一定要把公主救出来的。","放心吧,我把我的力量借给你,你就可以打赢那些小怪了。","好吧,谢谢你!","刚才我去看过了,你的剑被放在三楼,你的盾在五楼。","7楼也有一个很厉害的宝物。","另外,其它楼层存放了很多宝物","得到他们对于你对付这里面的怪物将有很大的帮助。","在塔里面还有很多钥匙,你一定要珍惜使用。","勇敢的去吧,勇士!"],(function(o){t.setNpcDone(e),a(e,6,8)}),"")},onShow:function(){t.isNpcDone(this)&&a(this,6,8)}}),e.push(i.prototype.makeDoorYellow({x:7,y:5})),o.push(i.prototype.makeFloorUp({x:0,y:5})),c("0",e.list),e.list},1:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:2,y:3},{x:4,y:1},{x:5,y:5},{x:7,y:1},{x:8,y:9}]),g(e,i.prototype.makeKeyYellow,[{x:0,y:2},{x:2,y:7},{x:3,y:0},{x:3,y:7},{x:5,y:0},{x:9,y:2},{x:9,y:8},{x:10,y:2},{x:10,y:8},{x:10,y:9},{x:10,y:10}]),g(e,i.prototype.makeKeyBlue,[{x:6,y:2},{x:9,y:10}]),e.push(i.prototype.makeDoorRed({x:8,y:5})),e.push(i.prototype.makeKeyRed({x:9,y:4})),g(e,d.prototype.makelvtouguai,[{x:0,y:3},{x:0,y:5},{x:5,y:7}]),g(e,d.prototype.makekulouren,[{x:2,y:2},{x:3,y:1}]),g(e,d.prototype.makekuloushibing,[{x:5,y:1},{x:8,y:1}]),e.push(d.prototype.makehongtouguai({x:0,y:4})),e.push(d.prototype.makexiaobianfu({x:5,y:8})),e.push(d.prototype.makeqingtouguai({x:4,y:8})),e.push(d.prototype.makechujifashi({x:5,y:6})),e.push(d.prototype.makeshoumianren({x:9,y:9})),g(e,i.prototype.makeSupply200HP,[{x:2,y:0},{x:2,y:6},{x:2,y:8},{x:3,y:6},{x:3,y:8},{x:9,y:0},{x:10,y:0}]),e.push(i.prototype.makeSupply500HP({x:9,y:1})),e.push(i.prototype.makeSupply3ATK({x:3,y:2})),e.push(i.prototype.makeSupply3DEF({x:6,y:0})),e.push(i.prototype.makeFunctionMonster({x:10,y:1})),t.push(i.prototype.makeFloorUp({x:0,y:0})),t.push(i.prototype.makeFloorDown({x:10,y:5})),c("1",e.list),e.list},2:function(){let e=new x,o=e;return e.push(i.prototype.makeEquipAtk50({x:10,y:7})),e.push(i.prototype.makeEquipDef50({x:10,y:9})),g(e,i.prototype.makeDoorYellow,[{x:3,y:9},{x:4,y:7},{x:5,y:8},{x:5,y:5},{x:5,y:2},{x:7,y:2}]),g(e,i.prototype.makeDoorIron,[{x:7,y:9},{x:7,y:7}]),g(e,d.prototype.makejinweishi,[{x:2,y:9},{x:6,y:8}]),e.push(d.prototype.makejinduizhang({x:0,y:3})),g(e,i.prototype.makeKeyYellow,[{x:0,y:8},{x:1,y:8},{x:2,y:2},{x:2,y:4},{x:2,y:8},{x:3,y:2},{x:3,y:4},{x:8,y:2},{x:9,y:2}]),e.push(i.prototype.makeKeyBlue({x:1,y:9})),e.push(i.prototype.makeKeyRed({x:0,y:9})),g(e,i.prototype.makeSupply200HP,[{x:8,y:5},{x:9,y:5},{x:10,y:5}]),g(e,i.prototype.makeSupply500HP,[{x:1,y:4},{x:8,y:4},{x:9,y:4},{x:10,y:4}]),g(e,i.prototype.makeSupply3ATK,[{x:0,y:6},{x:1,y:6},{x:2,y:6},{x:10,y:2}]),g(e,i.prototype.makeSupply3DEF,[{x:0,y:7},{x:1,y:2},{x:1,y:7},{x:2,y:7}]),e.push(i.prototype.makeDoorBlue({x:7,y:5})),o.push(i.prototype.makeFloorUp({x:10,y:0})),o.push(i.prototype.makeFloorDown({x:0,y:0})),t.get("ThiefSay")||e.push(i.prototype.makeDoorGreen({x:6,y:1})),c("2",e.list),e.list},3:function(){let e=new x,t=e;return e.simplePush({x:4,y:0,type:0,detail_type:2.51,vif:function(){return!0},onHint:function(){E.showShop("shop_gold")},onShow:function(){}}),e.simplePush({x:5,y:0,type:0,detail_type:2.5,vif:function(){return!0},onHint:function(){E.showShop("shop_gold")},onShow:function(){}}),e.simplePush({x:6,y:0,type:0,detail_type:2.52,vif:function(){return!0},onHint:function(){E.showShop("shop_gold")},onShow:function(){}}),g(e,i.prototype.makeDoorYellow,[{x:2,y:5},{x:3,y:1},{x:7,y:7}]),g(e,d.prototype.makelvtouguai,[{x:5,y:0},{x:6,y:0}]),g(e,d.prototype.makehongtouguai,[{x:0,y:1},{x:1,y:0},{x:3,y:10},{x:5,y:4},{x:5,y:10},{x:8,y:6},{x:8,y:8}]),g(e,d.prototype.makexiaobianfu,[{x:1,y:9},{x:4,y:10},{x:5,y:3},{x:5,y:5},{x:8,y:4},{x:9,y:7}]),g(e,d.prototype.makekulouren,[{x:2,y:1},{x:3,y:5}]),g(e,i.prototype.makeKeyYellow,[{x:0,y:2},{x:1,y:1},{x:2,y:0},{x:3,y:8},{x:4,y:8},{x:5,y:8},{x:9,y:8},{x:10,y:8}]),e.push(i.prototype.makeWeapon10({x:0,y:0})),e.push(i.prototype.makeSupply500HP({x:10,y:7})),e.push(i.prototype.makeSupply3ATK({x:10,y:6})),e.push(i.prototype.makeSupply3DEF({x:9,y:6})),t.push(i.prototype.makeFloorUp({x:10,y:10})),t.push(i.prototype.makeFloorDown({x:10,y:0})),c("3",e.list),e.list},4:function(){let e=new x,o=e;return g(e,i.prototype.makeDoorYellow,[{x:1,y:0},{x:1,y:2},{x:1,y:8},{x:1,y:10}]),e.push(i.prototype.makeDoorBlue({x:8,y:5})),e.push(i.prototype.makeDoorRed({x:5,y:5})),e.push(i.prototype.makeDoorIron({x:2,y:5})),g(e,i.prototype.makeKeyYellow,[{x:9,y:4},{x:9,y:6}]),g(e,d.prototype.makehongtouguai,[{x:6,y:0},{x:6,y:10}]),g(e,d.prototype.makexiaobianfu,[{x:4,y:0},{x:4,y:10},{x:5,y:0},{x:5,y:10}]),g(e,d.prototype.makekulouren,[{x:3,y:2},{x:3,y:8}]),g(e,d.prototype.makeqingtouguai,[{x:0,y:1},{x:0,y:9},{x:10,y:3},{x:10,y:7}]),g(e,d.prototype.makeshoumianren,[{x:6,y:4},{x:6,y:6},{x:7,y:5}]),g(e,d.prototype.makedabianfu,[{x:3,y:4},{x:3,y:6},{x:4,y:5}]),e.push(d.prototype.makechujiweibing({x:6,y:5})),e.push(d.prototype.makehongbianfu({x:3,y:5})),g(e,i.prototype.makeSupply200HP,[{x:4,y:2},{x:4,y:8},{x:5,y:2},{x:5,y:8}]),g(e,i.prototype.makeSupply3ATK,[{x:4,y:4},{x:4,y:6}]),g(e,i.prototype.makeSupply3DEF,[{x:7,y:4},{x:7,y:6}]),e.simplePush({x:5,y:0,type:0,detail_type:2.2,vif:function(){return!0},onHint:function(){t.get("ThiefSay")?I(["感谢你帮助了我!"]):I(["谢谢你救了我。","我可以帮你做一件事。","你会开门嘛?","帮我打开第二层的门吧。","好的,没问题。","第二层的门已打开!"],(function(e){console.log("对话结束:"+e),t.set("ThiefSay",!0)}),"")},onShow:function(){t.isNpcDone(this)&&a(this,6,8)}}),o.push(i.prototype.makeFloorUp({x:10,y:0})),o.push(i.prototype.makeFloorDown({x:10,y:10})),c("4",e.list),e.list},5:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:2,y:8},{x:3,y:1},{x:8,y:5},{x:8,y:9},{x:9,y:8}]),e.push(i.prototype.makeDoorBlue({x:8,y:7})),g(e,i.prototype.makeKeyYellow,[{x:0,y:9},{x:1,y:10},{x:10,y:7}]),e.push(i.prototype.makeKeyBlue({x:0,y:10})),e.push(i.prototype.makeKeyAll({x:0,y:0})),g(e,d.prototype.makexiaobianfu,[{x:5,y:5},{x:8,y:3},{x:9,y:5},{x:10,y:2}]),e.push(d.prototype.makekulouren({x:5,y:6})),g(e,d.prototype.makeqingtouguai,[{x:6,y:3},{x:7,y:3}]),g(e,d.prototype.makekuloushibing,[{x:2,y:4},{x:3,y:5},{x:3,y:9},{x:4,y:10}]),g(e,d.prototype.makechujifashi,[{x:0,y:5},{x:0,y:8},{x:1,y:4},{x:1,y:9},{x:3,y:2}]),g(e,d.prototype.makedabianfu,[{x:2,y:0},{x:4,y:0}]),g(e,d.prototype.makeshoumianren,[{x:3,y:8},{x:7,y:8}]),e.push(d.prototype.makechujiweibing({x:7,y:9})),e.push(i.prototype.makeSupply200HP({x:0,y:2})),e.push(i.prototype.makeSupply500HP({x:0,y:4})),g(e,i.prototype.makeSupply3ATK,[{x:1,y:2},{x:5,y:0}]),g(e,i.prototype.makeSupply3DEF,[{x:6,y:0},{x:9,y:7}]),e.push(i.prototype.makeShield10({x:3,y:4})),e.simplePush({x:10,y:3,detail_type:2.6,type:0,vif:function(){return!0},onHint:function(){E.showShop("shop_key")},onShow:function(){}}),e.simplePush({x:1,y:7,type:0,detail_type:2.4,vif:function(){return!0},onHint:function(){E.showShop("shop_exp")},onShow:function(){}}),t.push(i.prototype.makeFloorUp({x:10,y:9})),t.push(i.prototype.makeFloorDown({x:10,y:0})),c("5",e.list),e.list},6:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:4,y:9},{x:7,y:3},{x:8,y:2},{x:8,y:4},{x:10,y:6},{x:10,y:7}]),g(e,i.prototype.makeDoorBlue,[{x:2,y:2},{x:2,y:4},{x:8,y:9}]),e.push(i.prototype.makeDoorRed({x:4,y:3})),g(e,i.prototype.makeKeyYellow,[{x:0,y:5},{x:1,y:1},{x:1,y:6},{x:2,y:0},{x:2,y:7},{x:5,y:4},{x:5,y:5},{x:5,y:6}]),g(e,d.prototype.makedabianfu,[{x:7,y:2},{x:7,y:4},{x:9,y:2}]),g(e,d.prototype.makekulouduizhang,[{x:0,y:1},{x:1,y:0}]),g(e,d.prototype.makeshitouguairen,[{x:1,y:9},{x:2,y:10}]),g(e,d.prototype.makehongbianfu,[{x:2,y:1},{x:2,y:5}]),g(e,d.prototype.makegaojifashi,[{x:5,y:2},{x:5,y:8}]),g(e,d.prototype.makeguaiwang,[{x:0,y:6},{x:1,y:7}]),e.push(d.prototype.makechujiweibing({x:3,y:3})),e.push(d.prototype.makehongyifashi({x:3,y:9})),g(e,i.prototype.makeSupply500HP,[{x:0,y:9},{x:0,y:10},{x:1,y:10}]),e.push(i.prototype.makeSupply3ATK({x:1,y:3})),e.push(i.prototype.makeSupply3DEF({x:0,y:3})),e.push(i.prototype.makeLevelOne({x:0,y:0})),e.push(i.prototype.makeFunctionBigGold({x:0,y:7})),t.push(i.prototype.makeFloorUp({x:10,y:4})),t.push(i.prototype.makeFloorDown({x:10,y:9})),c("6",e.list),e.list},7:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:10,y:3},{x:10,y:7}]),g(e,i.prototype.makeDoorBlue,[{x:1,y:5},{x:4,y:2},{x:4,y:8},{x:7,y:5}]),e.push(i.prototype.makeDoorRed({x:9,y:5})),e.push(i.prototype.makeDoorIron({x:4,y:4})),g(e,i.prototype.makeDoorIronCant,[{x:3,y:5},{x:4,y:6},{x:5,y:5}]),g(e,i.prototype.makeKeyYellow,[{x:7,y:2},{x:7,y:8}]),g(e,i.prototype.makeKeyBlue,[{x:8,y:3},{x:8,y:4},{x:8,y:6},{x:8,y:7}]),g(e,d.prototype.makekulouduizhang,[{x:1,y:7},{x:2,y:8}]),g(e,d.prototype.makehongbianfu,[{x:1,y:3},{x:2,y:2}]),g(e,d.prototype.makebaiyiwushi,[{x:2,y:5},{x:4,y:3},{x:4,y:7},{x:6,y:5}]),g(e,i.prototype.makeSupply200HP,[{x:6,y:2},{x:6,y:8},{x:7,y:3},{x:7,y:7}]),g(e,i.prototype.makeSupply3ATK,[{x:2,y:7},{x:6,y:3}]),g(e,i.prototype.makeSupply3DEF,[{x:2,y:3},{x:6,y:7}]),e.push(i.prototype.makeFunctionCross({x:4,y:5})),t.push(i.prototype.makeFloorUp({x:0,y:0})),t.push(i.prototype.makeFloorDown({x:10,y:4})),c("7",e.list),e.list},8:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:1,y:5},{x:1,y:7},{x:7,y:8},{x:9,y:4}]),e.push(i.prototype.makeDoorBlue({x:2,y:6})),e.push(i.prototype.makeKeyYellow({x:0,y:8})),g(e,d.prototype.makeqingtouguai,[{x:3,y:10},{x:4,y:10},{x:6,y:2},{x:7,y:2}]),g(e,d.prototype.makedabianfu,[{x:3,y:8},{x:4,y:0},{x:6,y:0}]),g(e,d.prototype.makekulouduizhang,[{x:0,y:9},{x:8,y:3},{x:8,y:6}]),g(e,d.prototype.makemayifashi,[{x:3,y:4},{x:10,y:2}]),e.push(d.prototype.makechujiweibing({x:7,y:6})),g(e,d.prototype.makehongbianfu,[{x:5,y:0},{x:6,y:9}]),g(e,d.prototype.makeguaiwang,[{x:10,y:7},{x:10,y:9}]),e.push(d.prototype.makebaiyiwushi({x:10,y:8})),g(e,i.prototype.makeSupply200HP,[{x:4,y:4},{x:5,y:4}]),e.push(i.prototype.makeSupply3ATK({x:2,y:10})),e.push(i.prototype.makeSupply3DEF({x:5,y:2})),t.push(i.prototype.makeFloorUp({x:4,y:6})),t.push(i.prototype.makeFloorDown({x:0,y:0})),c("8",e.list),e.list},9:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:1,y:3},{x:1,y:9},{x:2,y:1},{x:7,y:1},{x:7,y:7},{x:9,y:9},{x:10,y:3}]),g(e,i.prototype.makeDoorBlue,[{x:5,y:1},{x:8,y:5}]),e.push(i.prototype.makeDoorRed({x:4,y:3})),g(e,i.prototype.makeKeyYellow,[{x:0,y:1},{x:1,y:0},{x:2,y:10},{x:3,y:10},{x:7,y:10},{x:8,y:10}]),g(e,i.prototype.makeKeyBlue,[{x:9,y:0},{x:10,y:1}]),g(e,d.prototype.makekulouduizhang,[{x:1,y:10},{x:8,y:0},{x:8,y:2},{x:9,y:1},{x:9,y:10},{x:10,y:2}]),g(e,d.prototype.makeshitouguairen,[{x:9,y:4},{x:9,y:6},{x:10,y:5}]),g(e,d.prototype.makemayifashi,[{x:6,y:4},{x:9,y:5}]),e.push(d.prototype.makehongyifashi({x:6,y:1})),e.push(d.prototype.makeshoumianwushi({x:1,y:2})),g(e,i.prototype.makeSupply200HP,[{x:4,y:10},{x:6,y:10},{x:8,y:1},{x:9,y:2}]),g(e,i.prototype.makeSupply500HP,[{x:10,y:4},{x:10,y:6}]),e.push(i.prototype.makeSupply3ATK({x:6,y:2})),e.push(i.prototype.makeSupply3DEF({x:6,y:0})),e.push(i.prototype.makeWeapon30({x:10,y:0})),e.push(i.prototype.makeFunctionFly({x:0,y:0})),t.push(i.prototype.makeFloorUp({x:6,y:6})),t.push(i.prototype.makeFloorDown({x:4,y:6})),c("9",e.list),e.list},10:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:1,y:4},{x:1,y:6},{x:5,y:7},{x:6,y:8},{x:7,y:7}]),e.push(i.prototype.makeDoorRed({x:9,y:5})),g(e,i.prototype.makeKeyYellow,[{x:4,y:4},{x:4,y:5},{x:4,y:6},{x:5,y:10},{x:6,y:10},{x:8,y:10},{x:9,y:10}]),g(e,i.prototype.makeKeyBlue,[{x:10,y:6},{x:10,y:8}]),g(e,d.prototype.makedabianfu,[{x:4,y:0},{x:6,y:0}]),g(e,d.prototype.makemayifashi,[{x:9,y:6},{x:9,y:8}]),g(e,d.prototype.makehongbianfu,[{x:5,y:0},{x:6,y:9},{x:8,y:7}]),g(e,d.prototype.makehongyifashi,[{x:1,y:10},{x:2,y:9}]),g(e,d.prototype.makeshoumianwushi,[{x:0,y:4},{x:0,y:6}]),g(e,i.prototype.makeSupply200HP,[{x:8,y:2},{x:9,y:2},{x:10,y:2},{x:10,y:10}]),g(e,i.prototype.makeSupply3ATK,[{x:0,y:3},{x:8,y:3},{x:9,y:3},{x:10,y:3}]),g(e,i.prototype.makeSupply3DEF,[{x:0,y:7},{x:8,y:4},{x:9,y:4},{x:10,y:4}]),e.push(i.prototype.makeSupply500HP({x:2,y:10})),t.push(i.prototype.makeFloorUp({x:10,y:0})),t.push(i.prototype.makeFloorDown({x:6,y:5})),c("10",e.list),e.list},11:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:3,y:0},{x:3,y:2},{x:3,y:4},{x:3,y:6},{x:5,y:0},{x:5,y:10}]),g(e,i.prototype.makeDoorBlue,[{x:3,y:9},{x:5,y:3},{x:5,y:7}]),g(e,i.prototype.makeDoorRed,[{x:9,y:2},{x:9,y:8}]),g(e,i.prototype.makeKeyYellow,[{x:0,y:2},{x:1,y:2},{x:2,y:2}]),g(e,i.prototype.makeKeyBlue,[{x:0,y:4},{x:1,y:4},{x:2,y:4}]),g(e,i.prototype.makeKeyRed,[{x:0,y:6},{x:1,y:6},{x:2,y:6}]),g(e,d.prototype.makeshoumianwushi,[{x:7,y:2},{x:7,y:2},{x:8,y:8},{x:8,y:8}]),g(e,d.prototype.makemingweibing,[{x:1,y:8},{x:1,y:10},{x:2,y:9},{x:6,y:3},{x:6,y:7}]),e.push(d.prototype.makegaojiweibing({x:1,y:9})),e.push(d.prototype.makeshuangshoujianshi({x:6,y:5})),g(e,i.prototype.makeSupply200HP,[{x:0,y:0},{x:1,y:0},{x:2,y:0},{x:9,y:4},{x:9,y:6}]),g(e,i.prototype.makeSupply500HP,[{x:0,y:8},{x:0,y:10},{x:6,y:4},{x:6,y:6}]),g(e,i.prototype.makeSupply3ATK,[{x:6,y:10},{x:7,y:10},{x:8,y:10}]),g(e,i.prototype.makeSupply3DEF,[{x:6,y:0},{x:7,y:0},{x:8,y:0}]),e.push(i.prototype.makeShield30({x:0,y:9})),e.simplePush({x:4,y:8,type:0,detail_type:2.51,vif:function(){return!0},onHint:function(){E.showShop("shop_gold2")},onShow:function(){}}),e.simplePush({x:5,y:8,type:0,detail_type:2.5,vif:function(){return!0},onHint:function(){E.showShop("shop_gold2")},onShow:function(){}}),e.simplePush({x:6,y:8,type:0,detail_type:2.52,vif:function(){return!0},onHint:function(){E.showShop("shop_gold2")},onShow:function(){}}),t.push(i.prototype.makeFloorUp({x:10,y:10})),t.push(i.prototype.makeFloorDown({x:10,y:0})),c("11",e.list),e.list},12:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:1,y:5},{x:8,y:2},{x:8,y:8}]),g(e,i.prototype.makeDoorBlue,[{x:5,y:1},{x:5,y:9},{x:9,y:5}]),g(e,i.prototype.makeKeyYellow,[{x:3,y:5},{x:4,y:5}]),g(e,d.prototype.makejinweishi,[{x:0,y:4},{x:0,y:6}]),g(e,d.prototype.makemingweibing,[{x:8,y:3},{x:8,y:4},{x:8,y:6},{x:8,y:7}]),g(e,d.prototype.makeshuangshoujianshi,[{x:3,y:1},{x:4,y:0},{x:8,y:1},{x:8,y:9}]),g(e,d.prototype.makejinduizhang,[{x:0,y:5},{x:2,y:5}]),g(e,d.prototype.makelingwushi1,[{x:3,y:9},{x:4,y:10}]),e.push(d.prototype.makegaojiweibing({x:8,y:5})),e.push(d.prototype.makemingzhanshi({x:4,y:1})),e.push(d.prototype.makelingfashi1({x:4,y:9})),g(e,i.prototype.makeSupply200HP,[{x:5,y:5},{x:6,y:5}]),g(e,i.prototype.makeSupply500HP,[{x:0,y:9},{x:1,y:10}]),g(e,i.prototype.makeSupply3ATK,[{x:1,y:0},{x:8,y:10}]),g(e,i.prototype.makeSupply3DEF,[{x:0,y:1},{x:8,y:0}]),t.push(i.prototype.makeFloorUp({x:10,y:0})),t.push(i.prototype.makeFloorDown({x:10,y:10})),c("12",e.list),e.list},13:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:1,y:6},{x:10,y:9}]),e.push(i.prototype.makeDoorBlue({x:10,y:3})),e.push(i.prototype.makeDoorRed({x:3,y:2})),g(e,i.prototype.makeDoorIron,[{x:5,y:4},{x:6,y:3}]),g(e,d.prototype.makejinweishi,[{x:4,y:0},{x:6,y:0},{x:8,y:1}]),g(e,d.prototype.makemingweibing,[{x:2,y:4},{x:4,y:6},{x:6,y:6}]),g(e,d.prototype.makemingzhanshi,[{x:0,y:9},{x:4,y:4},{x:6,y:2},{x:8,y:7}]),g(e,d.prototype.makemingduizhang1,[{x:5,y:3},{x:10,y:8}]),e.push(d.prototype.makejinduizhang({x:5,y:0})),e.push(d.prototype.makeshuangshoujianshi({x:0,y:1})),e.push(d.prototype.makejinduizhang({x:5,y:6})),g(e,i.prototype.makeSupply500HP,[{x:3,y:0},{x:9,y:4}]),g(e,i.prototype.makeSupply3ATK,[{x:4,y:8},{x:5,y:8},{x:6,y:8}]),g(e,i.prototype.makeSupply3DEF,[{x:6,y:10},{x:7,y:10},{x:8,y:10}]),e.push(i.prototype.makeLevelTwo({x:10,y:7})),e.simplePush({x:4,y:6,type:0,detail_type:2.4,vif:function(){return!0},onHint:function(){E.showShop("shop_exp2")},onShow:function(){}}),t.push(i.prototype.makeFloorUp({x:10,y:5})),t.push(i.prototype.makeFloorDown({x:10,y:0})),c("13",e.list),e.list},14:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorBlue,[{x:8,y:5},{x:9,y:4},{x:9,y:6}]),e.push(i.prototype.makeDoorIron({x:4,y:5})),e.push(i.prototype.makeKeyAll({x:0,y:3})),g(e,d.prototype.makemingweibing,[{x:9,y:1},{x:9,y:3},{x:9,y:7},{x:9,y:9}]),g(e,d.prototype.makegaojiweibing,[{x:9,y:2},{x:9,y:8}]),g(e,d.prototype.makemingzhanshi,[{x:5,y:5},{x:7,y:5}]),e.push(d.prototype.makemingduizhang1({x:6,y:5})),e.push(d.prototype.makelingwushi1({x:0,y:2})),g(e,i.prototype.makeSupply200HP,[{x:5,y:2},{x:5,y:8}]),g(e,i.prototype.makeSupply500HP,[{x:1,y:2},{x:1,y:8}]),e.push(i.prototype.makeFunctionHolyWater({x:3,y:5})),t.push(i.prototype.makeFloorUp({x:0,y:4})),t.push(i.prototype.makeFloorDown({x:10,y:5})),c("14",e.list),e.list},15:function(){let o=new x,n=o;return g(o,i.prototype.makeDoorYellow,[{x:7,y:4},{x:7,y:6}]),o.push(i.prototype.makeDoorRed({x:9,y:5})),g(o,i.prototype.makeSupply3ATK,[{x:5,y:4},{x:5,y:6}]),g(o,i.prototype.makeSupply3DEF,[{x:4,y:4},{x:4,y:6}]),o.simplePush({x:4,y:3,detail_type:5.2,type:0,vif:function(){return!0},onHint:function(){var o=this;t.isNpcDone(this)?I(["谢谢惠顾"]):I(["我这里有一件对你来说非常好的宝物。","只要你出得起钱,我就卖给你。","什么宝物?要多少钱?","是这个游戏是最好的武器,攻击值可以增加120点。","但是需要500经验。怎么样?"],(function(n){t.getItemCount(e.EXP)>=500?I(["我有500经验","好,成交!"],(function(n){t.addItemCount(e.EXP,-500),t.addItemCount(e.ATK,120),t.setNpcDone(o)}),""):I(["小伙子,你这经验可不够500啊。","等你凑够500经验再来找我吧!"],(function(e){}),"")}),"")},onShow:function(){}}),o.simplePush({x:6,y:3,detail_type:5.4,type:0,vif:function(){return!0},onHint:function(){var o=this;t.isNpcDone(this)?I(["谢谢惠顾"]):I(["我这里有一件对你来说非常好的宝物。","只要你出得起钱,我就卖给你。","什么宝物?要多少钱?","是这个游戏是最好的盾牌,防御值可以增加120点。","而你只要出500个金币就可以买下。怎么样?"],(function(n){t.getItemCount(e.GOLD)>=500?I(["我有500个金币","好,成交!"],(function(n){t.addItemCount(e.GOLD,-500),t.addItemCount(e.DEF,120),t.setNpcDone(o)}),""):I(["小伙子,你这金币可不够500个啊。","等你凑够500个金币再来找我吧!"],(function(e){}),"")}),"")},onShow:function(){}}),n.push(i.prototype.makeFloorUp({x:0,y:6})),n.push(i.prototype.makeFloorDown({x:0,y:4})),c("15",o.list),o.list},16:function(){let e=new x,o=e;return e.push(i.prototype.makeDoorRed({x:3,y:5})),e.push(d.prototype.makehongyimowang1({x:5,y:5})),o.push(i.prototype.makeFloorDown({x:0,y:6})),e.simplePush({x:5,y:7,detail_type:2.3,type:0,vif:function(){return!0},onHint:function(){var e=this;I(["你是谁?","我受国王的委托来营救你。","太感谢了!","那我们这就赶紧回去吧。","好的,有我在,不会有人再能伤害你。"],(function(o){t.setNpcDone(e),se("游戏结束,您已通关!")}),"")},onShow:function(){}}),c("16",e.list),e.list}};function f(e){var t="";return 0==e?t="null":1.1==e?t="floorUp":1.2==e?t="floorDown":2.1==e?t="npcElfin":2.2==e?t="npcThief":2.3==e?t="npcPrincess":2.4==e?t="npcExpShop":2.5==e?t="npcGoldShop":2.51==e?t="npcGoldShop1":2.52==e?t="npcGoldShop2":2.6==e?t="npcKeySell":2.7==e?t="npcKeyBuy":2.8==e?t="npcMisticalOldMan":3.1==e?t="weapon10":3.2==e?t="weapon30":3.3==e?t="weapon60":3.4==e?t="weapon150":3.5==e?t="shield10":3.6==e?t="shield30":3.7==e?t="shield70":3.8==e?t="shield150":4.1==e?t="supply200HP":4.2==e?t="supply500HP":4.3==e?t="supply3ATK":4.4==e?t="supply3DEF":5.1==e?t="equipAtk50":5.2==e?t="equipAtk150":5.3==e?t="equipDef50":5.4==e?t="equipDef150":6.1==e?t="doorYellow":6.2==e?t="doorBlue":6.3==e?t="doorRed":6.4==e?t="doorIron":6.5==e?t="doorIronCant":6.6==e?t="doorGreen":7.1==e?t="levelOne":7.2==e?t="levelTwo":7.3==e?t="levelThree":8.1==e?t="keyYellow":8.2==e?t="keyBlue":8.3==e?t="keyRed":8.4==e?t="keyAll":9.1==e?t="functionFly":9.2==e?t="functionMonster":9.3==e?t="functionCross":9.4==e?t="functionPickaxe":9.5==e?t="functionHolyWater":9.6==e?t="functionBigGold":9.71==e?t="functionStaffOne":9.72==e?t="functionStaffTwo":9.73==e?t="functionStaffThree":11==e?t="lvtouguai":12==e?t="hongtouguai":13==e?t="xiaobianfu":14==e?t="kulouren":15==e?t="qingtouguai":16==e?t="kuloushibing":17==e?t="chujifashi":18==e?t="dabianfu":19==e?t="shoumianren":20==e?t="kulouduizhang":21==e?t="shitouguairen":22==e?t="mayifashi":23==e?t="chujiweibing":24==e?t="hongbianfu":25==e?t="gaojifashi":26==e?t="guaiwang":27==e?t="baiyiwushi":28==e?t="jinweishi":29==e?t="hongyifashi":30==e?t="shoumianwushi":31==e?t="mingweibing":32==e?t="gaojiweibing":33==e?t="shuangshoujianshi":34==e?t="mingzhanshi":35==e?t="jinduizhang":36==e?t="lingfashi":37==e?t="mingduizhang":38==e?t="lingwushi":39==e?t="yingzizhanshi":40==e||41==e?t="hongyimowang":42==e?t="minglingmowang":43==e?t="mingduizhang":44==e||45==e?t="lingwushi":46==e?t="minglingmowang":47==e||48==e?t="lingfashi":49==e?t="minglingmowang":50==e?t="xueying":501==e?t="xueying1":502==e?t="xueying2":503==e?t="xueying3":504==e?t="xueying4":505==e?t="xueying5":506==e?t="xueying6":507==e?t="xueying7":508==e?t="xueying8":51==e?t="molong":511==e?t="molong1":512==e?t="molong2":513==e?t="molong3":514==e?t="molong4":515==e?t="molong5":516==e?t="molong6":517==e?t="molong7":518==e&&(t="molong8"),t}function k(e){var t="";return 0==e?t="none":1==e?t="board":2==e?t="wall":3==e?t="none1":4==e?t="board1":5==e&&(t="wall1"),t}var d=function(){this.data=[[0]],this.origin={x:0,y:0},this.HP=0,this.ATK=0,this.DEF=0,this.GOLD=0,this.EXP=0,this.class="",this.name=""};d.prototype.makelvtouguai=function(e){var t=new i;return t.data=[[11]],t.HP=50,t.ATK=20,t.DEF=1,t.GOLD=1,t.EXP=1,t.class="lvtouguai",t.name="绿头怪",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makehongtouguai=function(e){var t=new i;return t.data=[[12]],t.HP=70,t.ATK=15,t.DEF=2,t.GOLD=2,t.EXP=2,t.class="hongtouguai",t.name="红头怪",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexiaobianfu=function(e){var t=new i;return t.data=[[13]],t.HP=100,t.ATK=20,t.DEF=5,t.GOLD=3,t.EXP=3,t.class="xiaobianfu",t.name="小蝙蝠",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makekulouren=function(e){var t=new i;return t.data=[[14]],t.HP=110,t.ATK=25,t.DEF=5,t.GOLD=5,t.EXP=4,t.class="kulouren",t.name="骷髅人",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeqingtouguai=function(e){var t=new i;return t.data=[[15]],t.HP=200,t.ATK=35,t.DEF=10,t.GOLD=5,t.EXP=5,t.class="qingtouguai",t.name="青头怪",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makekuloushibing=function(e){var t=new i;return t.data=[[16]],t.HP=150,t.ATK=40,t.DEF=20,t.GOLD=8,t.EXP=6,t.class="kuloushibing",t.name="骷髅士兵",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makechujifashi=function(e){var t=new i;return t.data=[[17]],t.HP=125,t.ATK=50,t.DEF=25,t.GOLD=10,t.EXP=7,t.class="chujifashi",t.name="初级法师",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makedabianfu=function(e){var t=new i;return t.data=[[18]],t.HP=150,t.ATK=65,t.DEF=30,t.GOLD=10,t.EXP=8,t.class="dabianfu",t.name="大蝙蝠",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeshoumianren=function(e){var t=new i;return t.data=[[19]],t.HP=300,t.ATK=75,t.DEF=45,t.GOLD=13,t.EXP=10,t.class="shoumianren",t.name="兽面人",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makekulouduizhang=function(e){var t=new i;return t.data=[[20]],t.HP=400,t.ATK=90,t.DEF=50,t.GOLD=15,t.EXP=12,t.class="kulouduizhang",t.name="骷髅队长",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeshitouguairen=function(e){var t=new i;return t.data=[[21]],t.HP=500,t.ATK=115,t.DEF=65,t.GOLD=15,t.EXP=15,t.class="shitouguairen",t.name="石头怪人",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemayifashi=function(e){var t=new i;return t.data=[[22]],t.HP=250,t.ATK=120,t.DEF=70,t.GOLD=20,t.EXP=17,t.class="mayifashi",t.name="麻衣法师",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makechujiweibing=function(e){var t=new i;return t.data=[[23]],t.HP=450,t.ATK=150,t.DEF=90,t.GOLD=22,t.EXP=19,t.class="chujiweibing",t.name="初级卫兵",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makehongbianfu=function(e){var t=new i;return t.data=[[24]],t.HP=550,t.ATK=160,t.DEF=90,t.GOLD=25,t.EXP=20,t.class="hongbianfu",t.name="红蝙蝠",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makegaojifashi=function(e){var t=new i;return t.data=[[25]],t.HP=100,t.ATK=200,t.DEF=110,t.GOLD=30,t.EXP=25,t.class="gaojifashi",t.name="高级法师",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeguaiwang=function(e){var t=new i;return t.data=[[26]],t.HP=700,t.ATK=250,t.DEF=125,t.GOLD=32,t.EXP=30,t.class="guaiwang",t.name="怪王",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makebaiyiwushi=function(e){var t=new i;return t.data=[[27]],t.HP=1300,t.ATK=300,t.DEF=150,t.GOLD=40,t.EXP=35,t.class="baiyiwushi",t.name="白衣武士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makejinweishi=function(e){var t=new i;return t.data=[[28]],t.HP=850,t.ATK=350,t.DEF=200,t.GOLD=45,t.EXP=40,t.class="jinweishi",t.name="金卫士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makehongyifashi=function(e){var t=new i;return t.data=[[29]],t.HP=500,t.ATK=400,t.DEF=260,t.GOLD=47,t.EXP=45,t.class="hongyifashi",t.name="红衣法师",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeshoumianwushi=function(e){var t=new i;return t.data=[[30]],t.HP=900,t.ATK=450,t.DEF=330,t.GOLD=50,t.EXP=50,t.class="shoumianwushi",t.name="兽面武士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemingweibing=function(e){var t=new i;return t.data=[[31]],t.HP=1250,t.ATK=500,t.DEF=400,t.GOLD=55,t.EXP=55,t.class="mingweibing",t.name="冥卫兵",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makegaojiweibing=function(e){var t=new i;return t.data=[[32]],t.HP=1500,t.ATK=560,t.DEF=460,t.GOLD=60,t.EXP=60,t.class="gaojiweibing",t.name="高级卫兵",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeshuangshoujianshi=function(e){var t=new i;return t.data=[[33]],t.HP=1200,t.ATK=620,t.DEF=520,t.GOLD=65,t.EXP=75,t.class="shuangshoujianshi",t.name="双手剑士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemingzhanshi=function(e){var t=new i;return t.data=[[34]],t.HP=2e3,t.ATK=680,t.DEF=590,t.GOLD=70,t.EXP=65,t.class="mingzhanshi",t.name="冥战士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makejinduizhang=function(e){var t=new i;return t.data=[[35]],t.HP=900,t.ATK=750,t.DEF=650,t.GOLD=77,t.EXP=70,t.class="jinduizhang",t.name="金队长",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makelingfashi1=function(e,t,o){var n=new i;return t||o?t&&!o?n=d.prototype.makelingfashi2(e):t&&o&&(n=d.prototype.makelingfashi3(e)):(n.data=[[36]],n.HP=1500,n.ATK=830,n.DEF=730,n.GOLD=80,n.EXP=70,n.class="lingfashi",n.name="灵法师",n.origin.x=e.x,n.origin.y=e.y),n},d.prototype.makemingduizhang1=function(e,t,o){var n=new i;return t||o?n=d.prototype.makemingduizhang2(e):(n.data=[[37]],n.HP=2500,n.ATK=900,n.DEF=850,n.GOLD=84,n.EXP=75,n.class="mingduizhang",n.name="冥队长",n.origin.x=e.x,n.origin.y=e.y),n},d.prototype.makelingwushi1=function(e,t,o){var n=new i;return t||o?t&&!o?n=d.prototype.makelingwushi2(e):t&&o&&(n=d.prototype.makelingwushi3(e)):(n.data=[[38]],n.HP=1200,n.ATK=980,n.DEF=900,n.GOLD=88,n.EXP=75,n.class="lingwushi",n.name="灵武士",n.origin.x=e.x,n.origin.y=e.y),n},d.prototype.makeyingzizhanshi=function(e){var t=new i;return t.data=[[39]],t.HP=3100,t.ATK=1150,t.DEF=1050,t.GOLD=92,t.EXP=80,t.class="yingzizhanshi",t.name="影子战士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makehongyimowang1=function(e,t,o){var n=new i;return t||o?n=d.prototype.makehongyimowang2(e):(n.data=[[40]],n.HP=15e3,n.ATK=1e3,n.DEF=1e3,n.GOLD=100,n.EXP=100,n.class="hongyimowang",n.name="红衣魔王",n.origin.x=e.x,n.origin.y=e.y),n},d.prototype.makehongyimowang2=function(e){var t=new i;return t.data=[[41]],t.HP=2e4,t.ATK=1333,t.DEF=1333,t.GOLD=133,t.EXP=133,t.class="hongyimowang",t.name="红衣魔王",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeminglingmowang1=function(e,t,o){var n=new i;return t||o?t&&!o?n=d.prototype.makeminglingmowang2(e):t&&o&&(n=d.prototype.makeminglingmowang3(e)):(n.data=[[42]],n.HP=33333,n.ATK=2e3,n.DEF=1e3,n.GOLD=375,n.EXP=330,n.class="minglingmowang",n.name="冥灵魔王",n.origin.x=e.x,n.origin.y=e.y),n},d.prototype.makemingduizhang2=function(e){var t=new i;return t.data=[[43]],t.HP=3333,t.ATK=1200,t.DEF=1133,t.GOLD=112,t.EXP=100,t.class="mingduizhang",t.name="冥队长",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makelingwushi2=function(e){var t=new i;return t.data=[[44]],t.HP=1600,t.ATK=1306,t.DEF=1200,t.GOLD=117,t.EXP=100,t.class="lingwushi",t.name="灵武士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makelingwushi3=function(e){var t=new i;return t.data=[[45]],t.HP=2400,t.ATK=2612,t.DEF=2400,t.GOLD=146,t.EXP=125,t.class="lingwushi",t.name="灵武士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeminglingmowang2=function(e){var t=new i;return t.data=[[46]],t.HP=45e3,t.ATK=2550,t.DEF=2250,t.GOLD=312,t.EXP=275,t.class="minglingmowang",t.name="冥灵魔王",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makelingfashi2=function(e){var t=new i;return t.data=[[47]],t.HP=2e3,t.ATK=1106,t.DEF=973,t.GOLD=106,t.EXP=93,t.class="lingfashi",t.name="灵法师",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makelingfashi3=function(e){var t=new i;return t.data=[[48]],t.HP=3e3,t.ATK=2212,t.DEF=1946,t.GOLD=132,t.EXP=116,t.class="lingfashi",t.name="灵法师",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeminglingmowang3=function(e){var t=new i;return t.data=[[49]],t.HP=6e4,t.ATK=3400,t.DEF=3e3,t.GOLD=390,t.EXP=343,t.class="minglingmowang",t.name="冥灵魔王",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying=function(e){var t=new i;return t.data=[[50]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.class="xueying",t.name="血影",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying1=function(e){var t=new i;return t.data=[[501]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying2=function(e){var t=new i;return t.data=[[502]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying3=function(e){var t=new i;return t.data=[[503]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying4=function(e){var t=new i;return t.data=[[504]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying5=function(e){var t=new i;return t.data=[[505]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying6=function(e){var t=new i;return t.data=[[506]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying7=function(e){var t=new i;return t.data=[[507]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying8=function(e){var t=new i;return t.data=[[508]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong=function(e){var t=new i;return t.data=[[51]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.class="molong",t.name="魔龙",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong1=function(e){var t=new i;return t.data=[[511]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong2=function(e){var t=new i;return t.data=[[512]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong3=function(e){var t=new i;return t.data=[[513]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong4=function(e){var t=new i;return t.data=[[514]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong5=function(e){var t=new i;return t.data=[[515]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong6=function(e){var t=new i;return t.data=[[516]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong7=function(e){var t=new i;return t.data=[[517]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong8=function(e){var t=new i;return t.data=[[518]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t};var w=function(){this.x=0,this.y=0,this.dir=0};w.prototype.setOrigin=function(e,t,o){this.x=e,this.y=t,this.dir=o,ye(),ae()},w.prototype.move=function(o){if(F!=_)return;let i=this.canMove(this,o);if(this.dir!=o&&(this.dir=o,ae()),i){let p=P.getNpc(i[0],i[1]);if(p)if(0==p.type)r(this,p);else if(3==p.type)if(p.upflag){var a=t.getItemCount(e.FLOOR)+1;t.setItemCount(e.FLOOR,a);var y=n(p.upflag,a);this.setOrigin(y.y,y.x,1),P.reLoadFloor(a),t.getItemCount(e.MAX_FLOOR)<a&&t.setItemCount(e.MAX_FLOOR,a),t.save()}else{a=t.getItemCount(e.FLOOR)-1;t.setItemCount(e.FLOOR,a);y=n(p.upflag,a);this.setOrigin(y.y,y.x,1),P.reLoadFloor(a),t.save()}else 4==p.type?r(this,p):(1==p.type||2==p.type)&&p.onHint();else this.x=i[0],this.y=i[1],this.dir=o,ae(),function(e){var t=!1,o=!1,n=0,i=0;2==e.dir?e.x<=oe+1&&(t=!0,n=0):3==e.dir?e.x>=oe+7-2&&(t=!0,n=4):0==e.dir?e.y<=ne+1&&(o=!0,i=0):1==e.dir&&e.y>=ne+7-2&&(o=!0,i=4);t?oe!=n&&(oe=n,re(),ae()):o&&ne!=i&&(ne=i,re(),ae())}(this)}},w.prototype.canMove=function(e,t){let o=e.getAim(t),n=P.getBlock(o[0],o[1]);return 1==n||4==n?o:""},w.prototype.getAim=function(e){var t=this.x,o=this.y;return 0==e?o-=1:1==e?o+=1:2==e?t-=1:3==e&&(t+=1),[t,o]},w.prototype.fightMonster=function(o){var n=t.getItemCount(e.HP);let i=this.fightCheck(o),r=o.monster;if(i<0)console.log("敌人过于强大,无法击败"),se("敌人过于强大,无法击败");else{var a=n-i;t.addItemCount(e.HP,-1*a),t.addItemCount(e.EXP,r.EXP),t.addItemCount(e.GOLD,r.GOLD),console.log("HP-"+a+" Exp+"+r.EXP+"Gold+"+r.GOLD),ue("战斗胜利:生命-"+a+" 经验+"+r.EXP+" 金币+"+r.GOLD),t.setNpcDone(o),P.removeNpc(o)}},w.prototype.fightCheck=function(o){var n=t.getItemCount(e.HP),i=o.monster;switch(i.data[0][0]){case 22:n-=100;break;case 27:n=parseInt(n/4*3);break;case 29:n-=300;break;case 36:case 47:case 48:n=parseInt(n/3*2)}let r=t.getItemCount(e.ATK),a=t.getItemCount(e.DEF);i.ATK>a?monsterHurt=i.ATK-a:monsterHurt=0,roleHurt=r-i.DEF;var y=Math.ceil(i.HP/roleHurt)-1;return y=y<=0?0:y,r<=i.DEF||n<=0||monsterHurt*y>n?-1:n-monsterHurt*y};const E={offset:0,talks:[],cb:"",cbParam:"",timer:"",shopType:"",startTalk:function(){F=L,W.setProperty(hmUI.prop.VISIBLE,!0),Y.setProperty(hmUI.prop.VISIBLE,!0),this.onTalk()},onTalk:function(){var e,t=this;if(t.offset>=t.talks.length)return W.setProperty(hmUI.prop.VISIBLE,!1),Y.setProperty(hmUI.prop.VISIBLE,!1),F=_,void(t.cb&&t.cb(t.cbParam));console.log("TALK: "+t.talks[t.offset]),e=t.talks[t.offset],Y.setProperty(hmUI.prop.MORE,{text:e}),t.offset+=1},showShop:function(e){var t;this.shopType=e,F=T,t=D[e],R.setProperty(hmUI.prop.VISIBLE,!0),G.setProperty(hmUI.prop.VISIBLE,!1),z.setProperty(hmUI.prop.MORE,{text:t.title}),M.setProperty(hmUI.prop.MORE,{x:10,y:200,w:172,h:44,press_color:3289650,normal_color:5723991,text:t.items[0].title}),V.setProperty(hmUI.prop.MORE,{x:10,y:260,w:172,h:44,press_color:3289650,normal_color:5723991,text:t.items[1].title}),j.setProperty(hmUI.prop.MORE,{x:10,y:320,w:172,h:44,press_color:3289650,normal_color:5723991,text:t.items[2].title})},onItemBuy:function(e){let t=D[this.shopType].items[e];this.buyItem(t)},hideShop:function(e){R.setProperty(hmUI.prop.VISIBLE,!1),G.setProperty(hmUI.prop.VISIBLE,!0),F=_},buyItem:function(e){let o=e.cost,n=e.gain;for(var i in o){let e=o[i];if(t.getItemCount(i)<e)return void se("所需花费不足")}for(var i in o){let e=o[i];t.addItemCount(i,-1*e)}for(var i in n){let e=n[i];t.addItemCount(i,e)}se("购买成功")}};function I(e,t,o){E.offset=0,E.talks=e,E.cb=t,E.cbParam=o,E.startTalk()}const D={shop_exp:{title:"尊敬的勇士,在这里您可以使用经验来提升您的属性",items:[{title:"100经验:等级 + 1",cost:{EXP:100},gain:{LEVEL:1,HP:1e3,ATK:7,DEF:7}},{title:"30经验:攻击 + 5",cost:{EXP:30},gain:{ATK:5}},{title:"30经验:防御 + 5",cost:{EXP:30},gain:{DEF:5}}]},shop_exp2:{title:"尊敬的勇士,在这里您可以使用经验来提升您的属性",items:[{title:"285经验:等级 + 3",cost:{EXP:285},gain:{LEVEL:3,HP:3e3,ATK:21,DEF:21}},{title:"95经验:攻击 + 17",cost:{EXP:95},gain:{ATK:17}},{title:"95经验:防御 + 17",cost:{EXP:95},gain:{DEF:17}}]},shop_gold:{title:"尊敬的勇士,在这里您可以花费金币来提升您的属性,每次花费的金币为25",items:[{title:"生命 + 1000",cost:{GOLD:25},gain:{HP:1e3}},{title:"攻击 + 4",cost:{GOLD:25},gain:{ATK:4}},{title:"防御 + 4",cost:{GOLD:25},gain:{DEF:4}}]},shop_gold2:{title:"尊敬的勇士,在这里您可以花费金币来提升您的属性,每次花费的金币为100",items:[{title:"生命 + 5000",cost:{GOLD:100},gain:{HP:5e3}},{title:"攻击 + 20",cost:{GOLD:100},gain:{ATK:20}},{title:"防御 + 20",cost:{GOLD:100},gain:{DEF:20}}]},shop_key:{title:"尊敬的勇士,在这里您可以花费金币,来购买您所需的钥匙",items:[{title:"黄钥匙 ¥10",cost:{GOLD:10},gain:{YELLOW_KEY:1}},{title:"蓝钥匙 ¥60",cost:{GOLD:60},gain:{BLUE_KEY:1}},{title:"红钥匙 ¥100",cost:{GOLD:100},gain:{RED_KEY:1}}]}};var P,v;const _=0,L=1,T=2;var F=_;function O(o){t.setItemCount(e.FLOOR,o);var i=n(!0,o);v.setOrigin(i.y,i.x,1),P.reLoadFloor(o)}const S=27,K=130,U=192,H=480,A=13421772,b=13421772,G=hmUI.createWidget(hmUI.widget.GROUP,{x:0,y:0,width:U,hight:H}),R=hmUI.createWidget(hmUI.widget.GROUP,{x:0,y:0,width:U,hight:H}),X=hmUI.createWidget(hmUI.widget.GROUP,{x:0,y:0,width:U,hight:H}),C={wdPools:{},wdPoolIndex:-1,createOrGetImg:function(e,t,o){if(this.wdPoolIndex<0)return this.wdPoolIndex=-1,G.createWidget(hmUI.widget.IMG,{x:1+e,y:K+t,src:o});{let n=this.wdPools[this.wdPoolIndex+""];return n.setProperty(hmUI.prop.MORE,{x:1+e,y:K+t,src:o}),n.setProperty(hmUI.prop.VISIBLE,!0),delete this.wdPools[this.wdPoolIndex+""],this.wdPoolIndex-=1,n}},hideImg:function(e){e.setProperty(hmUI.prop.VISIBLE,!1),this.wdPoolIndex+=1,this.wdPools[this.wdPoolIndex+""]=e},createTmpImg:function(e,t,o){let n=G.createWidget(hmUI.widget.IMG,{x:e,y:t,src:o});this.hideImg(n)}};var B,N,W,Y,z,M,V,j,q,$,J,Q,Z=[],ee={},te={},oe=0,ne=0,ie=!1;function re(){let e=oe,t=ne,o=oe+7,n=ne+7;for(var i in ee)delete ee[i];for(var r=t;r<n;r++){let t=P.data[r];for(var a=e;a<o;a++){let e=r-ne,o=a-oe,n=a+","+r;if(P.npcMap[n]){var y=P.npcMap[n];if(y.class){let t="images/"+y.class+".png";Z[7*e+o].setProperty(hmUI.prop.MORE,{src:t}),ee[y.id]=Z[7*e+o]}}else{let n="images/"+k(t[a])+".png";Z[7*e+o].setProperty(hmUI.prop.MORE,{src:n})}}}0==oe?(J.setProperty(hmUI.prop.VISIBLE,!0),Q.setProperty(hmUI.prop.VISIBLE,!1)):(J.setProperty(hmUI.prop.VISIBLE,!1),Q.setProperty(hmUI.prop.VISIBLE,!0)),0==ne?(q.setProperty(hmUI.prop.VISIBLE,!0),$.setProperty(hmUI.prop.VISIBLE,!1)):(q.setProperty(hmUI.prop.VISIBLE,!1),$.setProperty(hmUI.prop.VISIBLE,!0))}function ae(){let e="images/hero_"+v.dir+".png";B.setProperty(hmUI.prop.MORE,{x:1+(v.x-oe)*S,y:K+(v.y-ne)*S,src:e})}function ye(){let e=v.x,t=v.y,o=Math.floor(6);oe=e<o?0:4,ne=t<=o?0:4}function pe(e,t){if(ee[t.id]){let e="images/"+k(1)+".png";ee[t.id].setProperty(hmUI.prop.MORE,{src:e}),delete ee[t.id]}}function se(e){hmUI.showToast({text:e})}function ue(e){N.setProperty(hmUI.prop.MORE,{text:e})}var xe={YELLOW_KEY:"黄钥匙:",BLUE_KEY:"蓝钥匙:",RED_KEY:"红钥匙:",HP:"生命:",ATK:"攻击:",DEF:"防御:",GOLD:"金币:",EXP:"经验:",LEVEL:"等级:",FLOOR:"楼层:"};function me(e,t){te[e]&&(te[e].setProperty(hmUI.prop.MORE,{text:xe[e]+t}),console.log("设置属性:"+e+"->"+xe[e]+t))}function ge(o){t.getItemCount(e.MAX_FLOOR)<o?se("还未探索到该楼层"):(O(o),X.setProperty(hmUI.prop.VISIBLE,!1),G.setProperty(hmUI.prop.VISIBLE,!0),t.save())}!function(){for(var o=0;o<7;o++)for(var n=0;n<7;n++){const e=C.createOrGetImg(n*S,o*S,"");Z.push(e)}B=C.createOrGetImg(0,0,""),q=G.createWidget(hmUI.widget.FILL_RECT,{x:0,y:128,w:193,h:2,color:A}),$=G.createWidget(hmUI.widget.FILL_RECT,{x:0,y:319,w:193,h:2,color:A}),J=G.createWidget(hmUI.widget.FILL_RECT,{x:0,y:128,w:2,h:193,color:A}),Q=G.createWidget(hmUI.widget.FILL_RECT,{x:190,y:128,w:2,h:193,color:A}),G.createWidget(hmUI.widget.IMG,{x:1,y:K,w:189,h:189,src:"images/empty.png"}).addEventListener(hmUI.event.CLICK_DOWN,(function(e){let t=e.x-1;e.y,t<Math.floor(96)?v.move(2):v.move(3)})),(N=G.createWidget(hmUI.widget.TEXT,{x:5,y:329,w:182,h:80,text:"",text_size:18,color:13421772,text_style:hmUI.text_style.WRAP})).addEventListener(hmUI.event.CLICK_DOWN,(function(e){v.move(1)})),W=G.createWidget(hmUI.widget.FILL_RECT,{x:5,y:324,w:182,h:80,radius:10,color:4473924}),Y=G.createWidget(hmUI.widget.TEXT,{x:10,y:329,w:172,h:70,text:"",text_size:16,color:13421772,text_style:hmUI.text_style.WRAP}),W.setProperty(hmUI.prop.VISIBLE,!1),Y.setProperty(hmUI.prop.VISIBLE,!1),Y.addEventListener(hmUI.event.CLICK_DOWN,(function(e){E.onTalk()})),te[e.FLOOR]=G.createWidget(hmUI.widget.TEXT,{x:0,y:7,w:192,h:20,text:"Floor: 0",text_size:14,color:b,align_h:hmUI.align.CENTER_H,align_v:hmUI.align.CENTER_V}),te[e.LEVEL]=G.createWidget(hmUI.widget.TEXT,{x:0,y:27,w:192,h:20,text:"LVL: 0",text_size:14,color:b,align_h:hmUI.align.CENTER_H,align_v:hmUI.align.CENTER_V}),te[e.ATK]=G.createWidget(hmUI.widget.TEXT,{x:24,y:47,w:84,h:20,text:"ATK: 0",text_size:14,color:b,align_h:hmUI.align.LEFT}),te[e.DEF]=G.createWidget(hmUI.widget.TEXT,{x:102,y:47,w:86,h:20,text:"DEF: 0",text_size:14,color:b,align_h:hmUI.align.LEFT}),te[e.GOLD]=G.createWidget(hmUI.widget.TEXT,{x:24,y:67,w:84,h:20,text:"GOLD: 0",text_size:14,color:b,align_h:hmUI.align.LEFT}),te[e.EXP]=G.createWidget(hmUI.widget.TEXT,{x:102,y:67,w:86,h:20,text:"EXP: 0",text_size:14,color:b,align_h:hmUI.align.LEFT}),te[e.HP]=G.createWidget(hmUI.widget.TEXT,{x:24,y:87,w:84,h:20,text:"HP: 0",text_size:14,color:b,align_h:hmUI.align.LEFT}),te[e.YELLOW_KEY]=G.createWidget(hmUI.widget.TEXT,{x:102,y:87,w:86,h:20,text:"YELLOW_KEY: 0",text_size:14,color:16776960,align_h:hmUI.align.LEFT}),te[e.BLUE_KEY]=G.createWidget(hmUI.widget.TEXT,{x:24,y:107,w:84,h:20,text:"BLUE_KEY: 0",text_size:14,color:65535,align_h:hmUI.align.LEFT}),te[e.RED_KEY]=G.createWidget(hmUI.widget.TEXT,{x:102,y:107,w:86,h:20,text:"RED_KEY: 0",text_size:14,color:16711680,align_h:hmUI.align.LEFT}),G.createWidget(hmUI.widget.IMG,{x:1,y:30,w:U,h:90,src:"images/empty.png"}).addEventListener(hmUI.event.CLICK_DOWN,(function(e){v.move(0)})),G.createWidget(hmUI.widget.BUTTON,{x:56,y:440,w:80,h:40,press_color:3289650,normal_color:5723991,text:"选项",radius:20,text_size:24,color:16777215,click_func:function(){G.setProperty(hmUI.prop.VISIBLE,!1),X.setProperty(hmUI.prop.VISIBLE,!0),ie=!1}}),R.createWidget(hmUI.widget.FILL_RECT,{x:0,y:0,w:U,h:H,color:0}),z=R.createWidget(hmUI.widget.TEXT,{x:5,y:80,w:182,h:100,text:"",text_size:16,color:13421772,text_style:hmUI.text_style.WRAP}),M=R.createWidget(hmUI.widget.BUTTON,{x:10,y:200,w:182,h:44,radius:5,press_color:3289650,normal_color:5723991,text:"按钮1",text_size:16,color:"0xffffff",click_func:function(){E.onItemBuy(0)}}),V=R.createWidget(hmUI.widget.BUTTON,{x:10,y:260,w:182,h:44,radius:5,press_color:3289650,normal_color:5723991,text:"按钮2",text_size:16,color:"0xffffff",click_func:function(){E.onItemBuy(1)}}),j=R.createWidget(hmUI.widget.BUTTON,{x:10,y:320,w:182,h:44,radius:5,press_color:3289650,normal_color:5723991,text:"按钮3",text_size:16,color:"0xffffff",click_func:function(){E.onItemBuy(2)}}),R.createWidget(hmUI.widget.BUTTON,{x:10,y:380,w:172,h:44,press_color:3289650,normal_color:5723991,text:"关闭",radius:5,text_size:16,color:"0xffffff",click_func:function(){E.hideShop()}}),R.setProperty(hmUI.prop.VISIBLE,!1),X.createWidget(hmUI.widget.TEXT,{x:55,y:40,w:100,h:80,text:"飞跃楼层",text_size:20,color:13421772,text_style:hmUI.text_style.WRAP}),X.createWidget(hmUI.widget.BUTTON,{x:30,y:80,w:40,h:40,press_color:3289650,normal_color:5723991,text:"2",radius:10,text_size:24,color:16777215,click_func:function(){ge(2)}}),X.createWidget(hmUI.widget.BUTTON,{x:80,y:80,w:40,h:40,press_color:3289650,normal_color:5723991,text:"4",radius:10,text_size:24,color:16777215,click_func:function(){ge(4)}}),X.createWidget(hmUI.widget.BUTTON,{x:130,y:80,w:40,h:40,press_color:3289650,normal_color:5723991,text:"6",radius:10,text_size:24,color:16777215,click_func:function(){ge(6)}}),X.createWidget(hmUI.widget.BUTTON,{x:10,y:130,w:40,h:40,press_color:3289650,normal_color:5723991,text:"8",radius:10,text_size:24,color:16777215,click_func:function(){ge(8)}}),X.createWidget(hmUI.widget.BUTTON,{x:55,y:130,w:40,h:40,press_color:3289650,normal_color:5723991,text:"10",radius:10,text_size:24,color:16777215,click_func:function(){ge(10)}}),X.createWidget(hmUI.widget.BUTTON,{x:100,y:130,w:40,h:40,press_color:3289650,normal_color:5723991,text:"12",radius:10,text_size:24,color:16777215,click_func:function(){ge(12)}}),X.createWidget(hmUI.widget.BUTTON,{x:145,y:130,w:40,h:40,press_color:3289650,normal_color:5723991,text:"14",radius:10,text_size:24,color:16777215,click_func:function(){ge(14)}}),X.createWidget(hmUI.widget.BUTTON,{x:40,y:200,w:120,h:40,press_color:3289650,normal_color:5723991,text:"怪兽图鉴",radius:10,text_size:24,color:16777215,click_func:function(){se("后续开放")}}),X.createWidget(hmUI.widget.BUTTON,{x:40,y:250,w:120,h:40,press_color:3289650,normal_color:5723991,text:"重置游戏",radius:10,text_size:24,color:16777215,click_func:function(){ie?(t.reset(),F=_,O(t.getItemCount(e.FLOOR)),G.setProperty(hmUI.prop.VISIBLE,!0),X.setProperty(hmUI.prop.VISIBLE,!1),R.setProperty(hmUI.prop.VISIBLE,!1),W.setProperty(hmUI.prop.VISIBLE,!1),Y.setProperty(hmUI.prop.VISIBLE,!1)):(ie=!0,se("再次点击确认重置"))}}),X.createWidget(hmUI.widget.TEXT,{x:10,y:300,w:172,h:120,text:"@米坛GiveMeFive\n上下楼层时会自动保存进度,操作方式同2048",text_size:20,color:13421772,text_style:hmUI.text_style.WRAP}),X.createWidget(hmUI.widget.BUTTON,{x:56,y:440,w:80,h:40,press_color:3289650,normal_color:5723991,text:"关闭",radius:20,text_size:24,color:16777215,click_func:function(){G.setProperty(hmUI.prop.VISIBLE,!0),X.setProperty(hmUI.prop.VISIBLE,!1)}}),X.setProperty(hmUI.prop.VISIBLE,!1)}(),t.load(),P=new o,v=new w,t.load(),O(t.getItemCount(e.FLOOR)),t.resetAllAttrUI()},onInit(){u.log("page onInit invoked")},onDestroy(){u.log("page onDestroy invoked")}})})()}catch(e){console.log(e)}
 
  • 赞
反馈: 王旋兆

王旋兆

LV0
普通成员
UID
108716
2022-08-14
36
1
JavaScript:
try{(()=>{var e=__$$hmAppManager$$__.currentApp;function t(){return e.app}const o=e.current,{px:n}=(new DeviceRuntimeCore.WidgetFactory(new DeviceRuntimeCore.HmDomApi(e,o)),t().__globals__),i=t().__globals__.gettext,{width:r,height:a}=hmSetting.getDeviceInfo();i("appName"),n(42),n(200),n(42),n(100),n(36),hmUI.align.CENTER_H,hmUI.text_style.WRAP;const y=DeviceRuntimeCore.HmLogger.getLogger("fs.js");function p(e,t,o){y.log("writeFileSync begin --\x3e",e);const n=function(e){for(var t=new ArrayBuffer(2*e.length),o=new Uint16Array(t),n=0,i=e.length;n<i;n++)o[n]=e.charCodeAt(n);return t}(t),i=new Uint8Array(n),r=hmFS.open(e,hmFS.O_CREAT|hmFS.O_RDWR|hmFS.O_TRUNC);y.log("writeFileSync file open success --\x3e",r),hmFS.seek(r,0,hmFS.SEEK_SET),hmFS.write(r,i.buffer,0,i.length),hmFS.close(r),y.log("writeFileSync success --\x3e",e)}function s(e,t){y.log("readFileSync fiename:",e);const o=function(e){y.log("statSync",e);const[t,o]=hmFS.stat(e);return y.log("res",t,o),0==o?(y.log("fs---\x3esize:",t.size),t):(y.log("fs---\x3eerr:",o),null)}(e);if(!o)return;const n=new Uint8Array(o.size),i=hmFS.open(e,hmFS.O_RDONLY);hmFS.seek(i,0,hmFS.SEEK_SET),hmFS.read(i,n.buffer,0,o.size),hmFS.close(i);const r=(a=n.buffer,String.fromCharCode.apply(null,new Uint16Array(a)));var a;return y.log("readFileSync",r),r}const u=DeviceRuntimeCore.HmLogger.getLogger("hello-world-page");o.module=DeviceRuntimeCore.Page({build(){u.log("page build invoked");const e={YELLOW_KEY:"YELLOW_KEY",BLUE_KEY:"BLUE_KEY",RED_KEY:"RED_KEY",HP:"HP",ATK:"ATK",DEF:"DEF",GOLD:"GOLD",EXP:"EXP",LEVEL:"LEVEL",FLOOR:"FLOOR",MAX_FLOOR:"MAX_FLOOR",MONS_INFO:"MONS_INFO",EVERY_THING:"EVERY_THING"},t={storage:{items:{}},getItemCount:function(e){return this.storage.items[e]?this.storage.items[e]:0},addItemCount:function(e,t){let o=this.getItemCount(e);this.setItemCount(e,o+t)},setItemCount:function(e,t){this.storage.items[e]=t,me(e,t),console.log("物品当前数量 "+e+":"+t)},set:function(e,t){this.storage[e]=t},get:function(e){return this.storage[e]},setNpcDone:function(e){this.set("npc_"+e.id,!0)},isNpcDone:function(e){return this.get("npc_"+e.id)},save:function(){!function(e,t){let o=t;p(e,JSON.stringify(o))}("MAGIC_TOWER_GAME_STORAGE.txt",this.storage)},load:function(){try{this.storage=function(e){const t=s(e);return t?JSON.parse(t):""}("MAGIC_TOWER_GAME_STORAGE.txt"),this.storage||this.reset()}catch(e){this.reset()}},resetAllAttrUI:function(){for(var t in e)me(t,this.getItemCount(t))},reset:function(){this.storage={items:{}},t.setItemCount(e.YELLOW_KEY,1),t.setItemCount(e.BLUE_KEY,1),t.setItemCount(e.RED_KEY,1),t.setItemCount(e.LEVEL,1),t.setItemCount(e.HP,1e3),t.setItemCount(e.ATK,13),t.setItemCount(e.DEF,13),t.setItemCount(e.GOLD,0),t.setItemCount(e.EXP,0),t.setItemCount(e.FLOOR,0),t.setItemCount(e.MAX_FLOOR,0),t.setItemCount(e.EVERY_THING,9999),this.save()}};var o=function(){this.data=[[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0]],this.npcMap={}};function n(e,t){var o="";if(e)switch(t){case 0:case 7:case 26:o={x:10,y:5};break;case 1:case 14:o={x:9,y:5};break;case 2:case 8:o={x:1,y:0};break;case 3:case 5:case 11:case 13:case 18:o={x:10,y:1};break;case 4:o={x:9,y:10};break;case 6:o={x:9,y:9};break;case 9:o={x:3,y:6};break;case 10:o={x:6,y:4};break;case 12:case 19:o={x:10,y:9};break;case 15:o={x:0,y:3};break;case 16:o={x:0,y:5};break;case 17:o={x:8,y:5};break;case 20:o={x:3,y:4};break;case 21:o={x:5,y:5};break;case 22:case 25:o={x:1,y:5};break;case 23:o={x:5,y:9};break;case 24:o={x:5,y:1}}else switch(t){case 0:case 21:o={x:1,y:5};break;case 1:case 7:o={x:0,y:1};break;case 2:case 4:case 10:o={x:9,y:0};break;case 3:o={x:9,y:10};break;case 5:o={x:9,y:9};break;case 6:o={x:10,y:5};break;case 8:o={x:4,y:7};break;case 9:o={x:7,y:6};break;case 11:case 18:o={x:10,y:9};break;case 12:case 17:o={x:10,y:1};break;case 13:o={x:10,y:4};break;case 14:o={x:0,y:5};break;case 15:o={x:0,y:7};break;case 16:case 20:o={x:6,y:5};break;case 19:o={x:4,y:5}}return o}o.prototype.makeMap=function(e,t){var o=this;switch(e){case 0:o.data=[[2,0,0,0,0,1,0,0,0,0,2],[2,0,0,0,0,1,0,0,0,0,2],[2,0,0,0,0,1,0,0,0,0,2],[2,0,0,0,0,1,0,0,0,0,2],[2,0,0,0,0,1,0,0,0,0,2],[2,0,0,0,0,1,0,0,0,0,2],[2,2,0,0,0,1,0,0,0,2,2],[2,2,2,2,2,1,2,2,2,2,2],[3,2,3,2,1,1,1,2,3,2,3],[3,3,3,3,3,1,3,3,3,3,3],[3,3,3,3,3,1,3,3,3,3,3]];break;case 1:o.data=[[1,1,1,1,1,1,1,1,1,1,1],[2,2,2,2,2,2,2,2,2,2,1],[1,1,1,1,1,2,1,1,1,2,1],[1,1,1,2,1,2,1,1,1,2,1],[2,1,2,2,1,2,2,2,1,2,1],[1,1,1,2,1,1,1,1,1,2,1],[1,1,1,2,1,2,2,2,2,2,1],[2,1,2,2,1,1,1,1,1,1,1],[1,1,1,2,2,1,2,2,2,1,2],[1,1,1,2,1,1,1,2,1,1,1],[1,1,1,2,1,1,1,2,1,1,1]];break;case 2:o.data=[[1,2,1,1,1,2,1,1,1,1,2],[1,2,1,2,1,2,1,1,1,1,2],[1,2,1,2,1,2,1,1,1,1,2],[1,2,1,2,1,2,2,2,2,1,2],[1,2,1,2,1,1,1,1,1,1,2],[1,2,1,2,2,1,2,2,1,2,2],[1,1,1,1,1,1,2,1,1,1,2],[1,2,1,2,2,1,2,1,2,1,2],[1,2,1,2,1,1,2,1,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 25:o.data=[[1,0,0,0,0,1,0,0,0,0,1],[1,1,1,1,1,1,1,1,1,1,1],[0,1,0,0,1,1,1,0,0,1,0],[1,1,1,0,0,1,0,0,1,1,1],[1,0,1,0,0,0,0,0,1,0,1],[1,0,1,0,0,1,0,0,1,0,1],[1,0,1,0,0,1,0,0,1,0,1],[1,0,1,1,0,1,0,1,1,0,1],[1,0,0,0,0,1,0,0,0,0,1],[1,0,0,0,1,1,1,0,0,0,1],[1,1,1,1,1,0,1,1,1,1,1]];break;case 26:o.data=[[3,3,3,1,1,1,1,1,3,3,3],[3,3,3,1,1,1,1,1,3,3,3],[3,3,3,1,1,1,1,1,3,3,3],[3,3,3,1,1,1,1,1,3,3,3],[3,3,3,1,1,1,1,1,3,3,3],[3,1,1,1,1,1,1,1,1,1,3],[3,3,3,3,3,1,3,3,3,3,3],[3,3,3,1,1,1,1,1,3,3,3],[3,3,3,3,3,1,3,3,3,3,3],[3,3,3,3,1,1,1,3,3,3,3],[3,3,3,3,3,1,3,3,3,3,3]]}return o},o.prototype.loadNpc=function(e){let t=h[e+""]();this.npcMap={};for(var o=0;o<t.length;o++){let e=t[o];if(null!=e.vif)if("function"==typeof e.vif){if(!e.vif())continue}else if(!e.vif)continue;this.setNpc(e),e.onShow&&e.onShow()}},o.prototype.setNpc=function(e){let t=e.x+","+e.y;this.npcMap[t]=e},o.prototype.getNpc=function(e,t){let o=e+","+t;return this.npcMap[o]},o.prototype.removeNpc=function(e){let t=e.x+","+e.y;delete this.npcMap[t],pe(this,e)},o.prototype.getBlock=function(e,t){return e<0||e>10||t<0||t>10?-1:this.data[t][e]},o.prototype.reLoadFloor=function(e){this.makeMap(e),this.loadNpc(e),re()};var i=function(){this.data=[[0]],this.origin={x:0,y:0},this.message="",this.name=""};i.prototype.makeFloorUp=function(e){var t=new i;return t.data=[[1.1]],t.message="",t.name="上",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFloorDown=function(e){var t=new i;return t.data=[[1.2]],t.message="",t.name="下",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcElfin=function(e){var t=new i;return t.data=[[2.1]],t.message="",t.name="精灵",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcThief=function(e){var t=new i;return t.data=[[2.2]],t.message="",t.name="小偷",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcPrincess=function(e){var t=new i;return t.data=[[2.3]],t.message="",t.name="公主",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcExpShop=function(e){var t=new i;return t.data=[[2.4]],t.message="",t.name="经验商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcGoldShop=function(e){var t=new i;return t.data=[[2.5]],t.message="",t.name="金币商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcGoldShop1=function(e){var t=new i;return t.data=[[2.51]],t.message="",t.name="",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcGoldShop2=function(e){var t=new i;return t.data=[[2.52]],t.message="",t.name="",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcKeySell=function(e){var t=new i;return t.data=[[2.6]],t.message="",t.name="钥匙贩卖商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcKeyBuy=function(e){var t=new i;return t.data=[[2.7]],t.message="",t.name="钥匙收购商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeNpcMisticalOldMan=function(e){var t=new i;return t.data=[[2.8]],t.message="",t.name="神秘老人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeWeapon10=function(e){var t=new i;return t.data=[[3.1]],t.message="攻击 + 10",t.name="铁剑",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeWeapon30=function(e){var t=new i;return t.data=[[3.2]],t.message="攻击 + 50",t.name="银剑",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeWeapon70=function(e){var t=new i;return t.data=[[3.3]],t.message="攻击 + 150",t.name="神剑",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeWeapon150=function(e){var t=new i;return t.data=[[3.4]],t.message="攻击 + 300",t.name="圣剑",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeShield10=function(e){var t=new i;return t.data=[[3.5]],t.message="防御 + 10",t.name="铁盾",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeShield30=function(e){var t=new i;return t.data=[[3.6]],t.message="防御 + 85",t.name="银盾",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeShield70=function(e){var t=new i;return t.data=[[3.7]],t.message="防御 + 150",t.name="神盾",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeShield150=function(e){var t=new i;return t.data=[[3.8]],t.message="防御 + 300",t.name="圣盾",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeSupply200HP=function(e){var t=new i;return t.data=[[4.1]],t.message="血量 + 200",t.name="小血瓶",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeSupply500HP=function(e){var t=new i;return t.data=[[4.2]],t.message="血量 + 500",t.name="大血瓶",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeSupply3ATK=function(e){var t=new i;return t.data=[[4.3]],t.message="攻击 + 3",t.name="红宝石",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeSupply3DEF=function(e){var t=new i;return t.data=[[4.4]],t.message="防御 + 3",t.name="蓝宝石",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeEquipAtk50=function(e){var t=new i;return t.data=[[5.1]],t.message="",t.name="武器商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeEquipAtk150=function(e){var t=new i;return t.data=[[5.2]],t.message="",t.name="武器商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeEquipDef50=function(e){var t=new i;return t.data=[[5.3]],t.message="",t.name="盾牌商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeEquipDef150=function(e){var t=new i;return t.data=[[5.4]],t.message="",t.name="盾牌商人",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeDoorYellow=function(e){var t=new i;return t.data=[[6.1]],t.message="",t.name="黄门",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeDoorBlue=function(e){var t=new i;return t.data=[[6.2]],t.message="",t.name="蓝门",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeDoorRed=function(e){var t=new i;return t.data=[[6.3]],t.message="",t.name="红门",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeDoorIron=function(e){var t=new i;return t.data=[[6.4]],t.message="",t.name="铁门",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeDoorIronCant=function(e){var t=new i;return t.data=[[6.5]],t.message="",t.name="铁门",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeDoorGreen=function(e){var t=new i;return t.data=[[6.6]],t.message="",t.name="绿门",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeLevelOne=function(e){var t=new i;return t.data=[[7.1]],t.message="等级提升 1 级",t.name="一级羽毛",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeLevelTwo=function(e){var t=new i;return t.data=[[7.2]],t.message="等级提升 2 级",t.name="二级羽毛",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeLevelThree=function(e){var t=new i;return t.data=[[7.3]],t.message="等级提升 3 级",t.name="三级羽毛",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeKeyYellow=function(e){var t=new i;return t.data=[[8.1]],t.message="黄钥匙 + 1",t.name="黄钥匙",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeKeyBlue=function(e){var t=new i;return t.data=[[8.2]],t.message="蓝钥匙 + 1",t.name="蓝钥匙",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeKeyRed=function(e){var t=new i;return t.data=[[8.3]],t.message="红钥匙 + 1",t.name="红钥匙",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeKeyAll=function(e){var t=new i;return t.data=[[8.4]],t.message="所有钥匙 + 1",t.name="钥匙盒",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionFly=function(e){var t=new i;return t.data=[[9.1]],t.message="按‘R’可打开楼层传送界面",t.name="楼层传送器",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionMonster=function(e){var t=new i;return t.data=[[9.2]],t.message="按‘F’可打开怪物探测界面",t.name="怪物探测器",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionCross=function(e){var t=new i;return t.data=[[9.3]],t.message="自身属性提升1/3",t.name="神圣十字架",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionPickaxe=function(e){var t=new i;return t.data=[[9.4]],t.message="交给4层的小偷可打通18层的通道",t.name="十字镐",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionHolyWater=function(e){var t=new i;return t.data=[[9.5]],t.message="生命值翻倍",t.name="圣水",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionBigGold=function(e){var t=new i;return t.data=[[9.6]],t.message="金币 + 300",t.name="大金币",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionStaffOne=function(e){var t=new i;return t.data=[[9.71]],t.message="集齐魔杖交给精灵可削弱魔龙",t.name="蓝魔杖",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionStaffTwo=function(e){var t=new i;return t.data=[[9.72]],t.message="集齐魔杖交给精灵可削弱魔龙",t.name="黄魔杖",t.origin.x=e.x,t.origin.y=e.y,t},i.prototype.makeFunctionStaffThree=function(e){var t=new i;return t.data=[[9.73]],t.message="集齐魔杖交给精灵可削弱魔龙",t.name="红魔杖",t.origin.x=e.x,t.origin.y=e.y,t};var r=function(e,t){t.onHint()},a=function(e,t,o){P.removeNpc(e),e.x=t,e.y=o,P.setNpc(e),function(e,t,o){ee[e.id]&&pe(P,e);let n=oe,i=ne,r=oe+7,a=ne+7;if(e.x>=n&&e.x<r&&e.y>=i&&e.y<a&&e.class){let t="images/"+e.class+".png",o=e.x-oe,n=e.y-ne;Z[7*n+o].setProperty(hmUI.prop.MORE,{src:t}),ee[e.id]=Z[7*n+o]}}(e)};const y={3.1:{ATK:10},3.2:{ATK:30},3.3:{ATK:70},3.4:{ATK:150},3.5:{DEF:10},3.6:{DEF:30},3.7:{DEF:70},3.8:{DEF:150},4.1:{HP:200},4.2:{HP:500},4.3:{ATK:3},4.4:{DEF:3},5.1:{ATK:50},5.3:{DEF:50},7.1:{LEVEL:1,HP:1e3,ATK:7,DEF:7},7.2:{LEVEL:2,HP:2e3,ATK:14,DEF:14},8.1:{YELLOW_KEY:1},8.2:{BLUE_KEY:1},8.3:{RED_KEY:1},8.4:{YELLOW_KEY:1,BLUE_KEY:1,RED_KEY:1},9.2:{MONS_INFO:1},9.3:{HP:1/3,ATK:1/3,DEF:1/3},9.5:{HP:1},9.6:{GOLD:300}};var x=function(){this.list=[]};function m(e,o,n){return{x:e,y:o,src:"",type:4,vif:function(){return!t.isNpcDone(this)},key:n,onHint:function(){t.getItemCount(this.key)>0?(console.log("大门开启"),t.addItemCount(this.key,-1),t.setNpcDone(this),P.removeNpc(this)):console.log("钥匙不足")}}}function g(e,t,o){for(var n=0;n<o.length;n++){let r=o[n];var i=t(o[n]);e.simplePush(l(r,i))}}function l(o,n){var i="";let r=n.data[0][0];return 6.1==r?i=m(o.y,o.x,e.YELLOW_KEY):6.2==r?i=m(o.y,o.x,e.BLUE_KEY):6.3==r?i=m(o.y,o.x,e.RED_KEY):6.4==r?i=m(o.y,o.x,e.EVERY_THING):6.5==r||6.6==r?i=m(o.y,o.x,"NOT_ITEM"):r>10?i=function(e,o,n){return{x:e,y:o,type:2,vif:function(){return!t.isNpcDone(this)},monster:n,onHint:function(){v.fightMonster(this)}}}(o.y,o.x,n):y[r+""]?i=function(o,n,i){return{x:o,y:n,src:"",type:1,item:i,vif:function(){return!t.isNpcDone(this)},onHint:function(){if(9.3==this.detail_type)t.addItemCount(e.HP,Math.floor(.3*t.getItemCount(e.HP))),t.addItemCount(e.ATK,Math.floor(.3*t.getItemCount(e.ATK))),t.addItemCount(e.DEF,Math.floor(.3*t.getItemCount(e.DEF)));else if(9.5==this.detail_type)t.addItemCount(e.HP,t.getItemCount(e.HP));else for(var o in this.item)t.addItemCount(o,this.item[o]);if(t.setNpcDone(this),P.removeNpc(this),this.item_detail&&this.item_detail.name){var n="";n+="获得道具"+this.item_detail.name,this.item_detail.message&&(n+=":"+this.item_detail.message),ue(n)}}}}(o.y,o.x,y[r+""]):1.1==r?i={x:o.y,y:o.x,type:3,upflag:!0}:1.2==r?i={x:o.y,y:o.x,type:3,upflag:!1}:console.log("未实现的角色:"+JSON.stringify(n)),i.detail_type=n.data[0][0],i.item_detail={message:n.message,name:n.name},n.class&&(i.class=n.class),i}function c(e,t){for(var o=0;o<t.length;o++)if(t[o].id=e+"_"+o,!t[o].class){let e=f(t[o].detail_type);e?t[o].class=e:console.log("未渲染的组件:"+t[o].detail_type)}}x.prototype.push=function(e){this.list.push(function(e){return l({x:e.origin.x,y:e.origin.y},e)}(e))},x.prototype.simplePush=function(e){this.list.push(e)};const h={0:function(){let e=new x,o=e;return e.simplePush({x:5,y:8,detail_type:2.1,type:0,vif:function(){return!0},onHint:function(){var e=this;t.isNpcDone(this)?I(["勇敢的去吧,勇士!","公主就在16层。"]):I(["勇士,你醒了!","你是谁?我在哪里?","我是这里的仙子,刚才你被怪物打昏了。","剑,剑,我的剑呢?","你的剑被他们抢走了,我只来得及将你救出来。","那,公主呢?我是来救公主的。","公主还在里面,你这样进去是打不过里面的小怪的。","那我怎么办,我答应了国王一定要把公主救出来的。","放心吧,我把我的力量借给你,你就可以打赢那些小怪了。","好吧,谢谢你!","刚才我去看过了,你的剑被放在三楼,你的盾在五楼。","7楼也有一个很厉害的宝物。","另外,其它楼层存放了很多宝物","得到他们对于你对付这里面的怪物将有很大的帮助。","在塔里面还有很多钥匙,你一定要珍惜使用。","勇敢的去吧,勇士!"],(function(o){t.setNpcDone(e),a(e,6,8)}),"")},onShow:function(){t.isNpcDone(this)&&a(this,6,8)}}),e.push(i.prototype.makeDoorYellow({x:7,y:5})),o.push(i.prototype.makeFloorUp({x:0,y:5})),c("0",e.list),e.list},1:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:2,y:3},{x:4,y:1},{x:5,y:5},{x:7,y:1},{x:8,y:9}]),g(e,i.prototype.makeKeyYellow,[{x:0,y:2},{x:2,y:7},{x:3,y:0},{x:3,y:7},{x:5,y:0},{x:9,y:2},{x:9,y:8},{x:10,y:2},{x:10,y:8},{x:10,y:9},{x:10,y:10}]),g(e,i.prototype.makeKeyBlue,[{x:6,y:2},{x:9,y:10}]),e.push(i.prototype.makeDoorRed({x:8,y:5})),e.push(i.prototype.makeKeyRed({x:9,y:4})),g(e,d.prototype.makelvtouguai,[{x:0,y:3},{x:0,y:5},{x:5,y:7}]),g(e,d.prototype.makekulouren,[{x:2,y:2},{x:3,y:1}]),g(e,d.prototype.makekuloushibing,[{x:5,y:1},{x:8,y:1}]),e.push(d.prototype.makehongtouguai({x:0,y:4})),e.push(d.prototype.makexiaobianfu({x:5,y:8})),e.push(d.prototype.makeqingtouguai({x:4,y:8})),e.push(d.prototype.makechujifashi({x:5,y:6})),e.push(d.prototype.makeshoumianren({x:9,y:9})),g(e,i.prototype.makeSupply200HP,[{x:2,y:0},{x:2,y:6},{x:2,y:8},{x:3,y:6},{x:3,y:8},{x:9,y:0},{x:10,y:0}]),e.push(i.prototype.makeSupply500HP({x:9,y:1})),e.push(i.prototype.makeSupply3ATK({x:3,y:2})),e.push(i.prototype.makeSupply3DEF({x:6,y:0})),e.push(i.prototype.makeFunctionMonster({x:10,y:1})),t.push(i.prototype.makeFloorUp({x:0,y:0})),t.push(i.prototype.makeFloorDown({x:10,y:5})),c("1",e.list),e.list},2:function(){let e=new x,o=e;return e.push(i.prototype.makeEquipAtk50({x:10,y:7})),e.push(i.prototype.makeEquipDef50({x:10,y:9})),g(e,i.prototype.makeDoorYellow,[{x:3,y:9},{x:4,y:7},{x:5,y:8},{x:5,y:5},{x:5,y:2},{x:7,y:2}]),g(e,i.prototype.makeDoorIron,[{x:7,y:9},{x:7,y:7}]),g(e,d.prototype.makejinweishi,[{x:2,y:9},{x:6,y:8}]),e.push(d.prototype.makejinduizhang({x:0,y:3})),g(e,i.prototype.makeKeyYellow,[{x:0,y:8},{x:1,y:8},{x:2,y:2},{x:2,y:4},{x:2,y:8},{x:3,y:2},{x:3,y:4},{x:8,y:2},{x:9,y:2}]),e.push(i.prototype.makeKeyBlue({x:1,y:9})),e.push(i.prototype.makeKeyRed({x:0,y:9})),g(e,i.prototype.makeSupply200HP,[{x:8,y:5},{x:9,y:5},{x:10,y:5}]),g(e,i.prototype.makeSupply500HP,[{x:1,y:4},{x:8,y:4},{x:9,y:4},{x:10,y:4}]),g(e,i.prototype.makeSupply3ATK,[{x:0,y:6},{x:1,y:6},{x:2,y:6},{x:10,y:2}]),g(e,i.prototype.makeSupply3DEF,[{x:0,y:7},{x:1,y:2},{x:1,y:7},{x:2,y:7}]),e.push(i.prototype.makeDoorBlue({x:7,y:5})),o.push(i.prototype.makeFloorUp({x:10,y:0})),o.push(i.prototype.makeFloorDown({x:0,y:0})),t.get("ThiefSay")||e.push(i.prototype.makeDoorGreen({x:6,y:1})),c("2",e.list),e.list},3:function(){let e=new x,t=e;return e.simplePush({x:4,y:0,type:0,detail_type:2.51,vif:function(){return!0},onHint:function(){E.showShop("shop_gold")},onShow:function(){}}),e.simplePush({x:5,y:0,type:0,detail_type:2.5,vif:function(){return!0},onHint:function(){E.showShop("shop_gold")},onShow:function(){}}),e.simplePush({x:6,y:0,type:0,detail_type:2.52,vif:function(){return!0},onHint:function(){E.showShop("shop_gold")},onShow:function(){}}),g(e,i.prototype.makeDoorYellow,[{x:2,y:5},{x:3,y:1},{x:7,y:7}]),g(e,d.prototype.makelvtouguai,[{x:5,y:0},{x:6,y:0}]),g(e,d.prototype.makehongtouguai,[{x:0,y:1},{x:1,y:0},{x:3,y:10},{x:5,y:4},{x:5,y:10},{x:8,y:6},{x:8,y:8}]),g(e,d.prototype.makexiaobianfu,[{x:1,y:9},{x:4,y:10},{x:5,y:3},{x:5,y:5},{x:8,y:4},{x:9,y:7}]),g(e,d.prototype.makekulouren,[{x:2,y:1},{x:3,y:5}]),g(e,i.prototype.makeKeyYellow,[{x:0,y:2},{x:1,y:1},{x:2,y:0},{x:3,y:8},{x:4,y:8},{x:5,y:8},{x:9,y:8},{x:10,y:8}]),e.push(i.prototype.makeWeapon10({x:0,y:0})),e.push(i.prototype.makeSupply500HP({x:10,y:7})),e.push(i.prototype.makeSupply3ATK({x:10,y:6})),e.push(i.prototype.makeSupply3DEF({x:9,y:6})),t.push(i.prototype.makeFloorUp({x:10,y:10})),t.push(i.prototype.makeFloorDown({x:10,y:0})),c("3",e.list),e.list},4:function(){let e=new x,o=e;return g(e,i.prototype.makeDoorYellow,[{x:1,y:0},{x:1,y:2},{x:1,y:8},{x:1,y:10}]),e.push(i.prototype.makeDoorBlue({x:8,y:5})),e.push(i.prototype.makeDoorRed({x:5,y:5})),e.push(i.prototype.makeDoorIron({x:2,y:5})),g(e,i.prototype.makeKeyYellow,[{x:9,y:4},{x:9,y:6}]),g(e,d.prototype.makehongtouguai,[{x:6,y:0},{x:6,y:10}]),g(e,d.prototype.makexiaobianfu,[{x:4,y:0},{x:4,y:10},{x:5,y:0},{x:5,y:10}]),g(e,d.prototype.makekulouren,[{x:3,y:2},{x:3,y:8}]),g(e,d.prototype.makeqingtouguai,[{x:0,y:1},{x:0,y:9},{x:10,y:3},{x:10,y:7}]),g(e,d.prototype.makeshoumianren,[{x:6,y:4},{x:6,y:6},{x:7,y:5}]),g(e,d.prototype.makedabianfu,[{x:3,y:4},{x:3,y:6},{x:4,y:5}]),e.push(d.prototype.makechujiweibing({x:6,y:5})),e.push(d.prototype.makehongbianfu({x:3,y:5})),g(e,i.prototype.makeSupply200HP,[{x:4,y:2},{x:4,y:8},{x:5,y:2},{x:5,y:8}]),g(e,i.prototype.makeSupply3ATK,[{x:4,y:4},{x:4,y:6}]),g(e,i.prototype.makeSupply3DEF,[{x:7,y:4},{x:7,y:6}]),e.simplePush({x:5,y:0,type:0,detail_type:2.2,vif:function(){return!0},onHint:function(){t.get("ThiefSay")?I(["感谢你帮助了我!"]):I(["谢谢你救了我。","我可以帮你做一件事。","你会开门嘛?","帮我打开第二层的门吧。","好的,没问题。","第二层的门已打开!"],(function(e){console.log("对话结束:"+e),t.set("ThiefSay",!0)}),"")},onShow:function(){t.isNpcDone(this)&&a(this,6,8)}}),o.push(i.prototype.makeFloorUp({x:10,y:0})),o.push(i.prototype.makeFloorDown({x:10,y:10})),c("4",e.list),e.list},5:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:2,y:8},{x:3,y:1},{x:8,y:5},{x:8,y:9},{x:9,y:8}]),e.push(i.prototype.makeDoorBlue({x:8,y:7})),g(e,i.prototype.makeKeyYellow,[{x:0,y:9},{x:1,y:10},{x:10,y:7}]),e.push(i.prototype.makeKeyBlue({x:0,y:10})),e.push(i.prototype.makeKeyAll({x:0,y:0})),g(e,d.prototype.makexiaobianfu,[{x:5,y:5},{x:8,y:3},{x:9,y:5},{x:10,y:2}]),e.push(d.prototype.makekulouren({x:5,y:6})),g(e,d.prototype.makeqingtouguai,[{x:6,y:3},{x:7,y:3}]),g(e,d.prototype.makekuloushibing,[{x:2,y:4},{x:3,y:5},{x:3,y:9},{x:4,y:10}]),g(e,d.prototype.makechujifashi,[{x:0,y:5},{x:0,y:8},{x:1,y:4},{x:1,y:9},{x:3,y:2}]),g(e,d.prototype.makedabianfu,[{x:2,y:0},{x:4,y:0}]),g(e,d.prototype.makeshoumianren,[{x:3,y:8},{x:7,y:8}]),e.push(d.prototype.makechujiweibing({x:7,y:9})),e.push(i.prototype.makeSupply200HP({x:0,y:2})),e.push(i.prototype.makeSupply500HP({x:0,y:4})),g(e,i.prototype.makeSupply3ATK,[{x:1,y:2},{x:5,y:0}]),g(e,i.prototype.makeSupply3DEF,[{x:6,y:0},{x:9,y:7}]),e.push(i.prototype.makeShield10({x:3,y:4})),e.simplePush({x:10,y:3,detail_type:2.6,type:0,vif:function(){return!0},onHint:function(){E.showShop("shop_key")},onShow:function(){}}),e.simplePush({x:1,y:7,type:0,detail_type:2.4,vif:function(){return!0},onHint:function(){E.showShop("shop_exp")},onShow:function(){}}),t.push(i.prototype.makeFloorUp({x:10,y:9})),t.push(i.prototype.makeFloorDown({x:10,y:0})),c("5",e.list),e.list},6:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:4,y:9},{x:7,y:3},{x:8,y:2},{x:8,y:4},{x:10,y:6},{x:10,y:7}]),g(e,i.prototype.makeDoorBlue,[{x:2,y:2},{x:2,y:4},{x:8,y:9}]),e.push(i.prototype.makeDoorRed({x:4,y:3})),g(e,i.prototype.makeKeyYellow,[{x:0,y:5},{x:1,y:1},{x:1,y:6},{x:2,y:0},{x:2,y:7},{x:5,y:4},{x:5,y:5},{x:5,y:6}]),g(e,d.prototype.makedabianfu,[{x:7,y:2},{x:7,y:4},{x:9,y:2}]),g(e,d.prototype.makekulouduizhang,[{x:0,y:1},{x:1,y:0}]),g(e,d.prototype.makeshitouguairen,[{x:1,y:9},{x:2,y:10}]),g(e,d.prototype.makehongbianfu,[{x:2,y:1},{x:2,y:5}]),g(e,d.prototype.makegaojifashi,[{x:5,y:2},{x:5,y:8}]),g(e,d.prototype.makeguaiwang,[{x:0,y:6},{x:1,y:7}]),e.push(d.prototype.makechujiweibing({x:3,y:3})),e.push(d.prototype.makehongyifashi({x:3,y:9})),g(e,i.prototype.makeSupply500HP,[{x:0,y:9},{x:0,y:10},{x:1,y:10}]),e.push(i.prototype.makeSupply3ATK({x:1,y:3})),e.push(i.prototype.makeSupply3DEF({x:0,y:3})),e.push(i.prototype.makeLevelOne({x:0,y:0})),e.push(i.prototype.makeFunctionBigGold({x:0,y:7})),t.push(i.prototype.makeFloorUp({x:10,y:4})),t.push(i.prototype.makeFloorDown({x:10,y:9})),c("6",e.list),e.list},7:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:10,y:3},{x:10,y:7}]),g(e,i.prototype.makeDoorBlue,[{x:1,y:5},{x:4,y:2},{x:4,y:8},{x:7,y:5}]),e.push(i.prototype.makeDoorRed({x:9,y:5})),e.push(i.prototype.makeDoorIron({x:4,y:4})),g(e,i.prototype.makeDoorIronCant,[{x:3,y:5},{x:4,y:6},{x:5,y:5}]),g(e,i.prototype.makeKeyYellow,[{x:7,y:2},{x:7,y:8}]),g(e,i.prototype.makeKeyBlue,[{x:8,y:3},{x:8,y:4},{x:8,y:6},{x:8,y:7}]),g(e,d.prototype.makekulouduizhang,[{x:1,y:7},{x:2,y:8}]),g(e,d.prototype.makehongbianfu,[{x:1,y:3},{x:2,y:2}]),g(e,d.prototype.makebaiyiwushi,[{x:2,y:5},{x:4,y:3},{x:4,y:7},{x:6,y:5}]),g(e,i.prototype.makeSupply200HP,[{x:6,y:2},{x:6,y:8},{x:7,y:3},{x:7,y:7}]),g(e,i.prototype.makeSupply3ATK,[{x:2,y:7},{x:6,y:3}]),g(e,i.prototype.makeSupply3DEF,[{x:2,y:3},{x:6,y:7}]),e.push(i.prototype.makeFunctionCross({x:4,y:5})),t.push(i.prototype.makeFloorUp({x:0,y:0})),t.push(i.prototype.makeFloorDown({x:10,y:4})),c("7",e.list),e.list},8:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:1,y:5},{x:1,y:7},{x:7,y:8},{x:9,y:4}]),e.push(i.prototype.makeDoorBlue({x:2,y:6})),e.push(i.prototype.makeKeyYellow({x:0,y:8})),g(e,d.prototype.makeqingtouguai,[{x:3,y:10},{x:4,y:10},{x:6,y:2},{x:7,y:2}]),g(e,d.prototype.makedabianfu,[{x:3,y:8},{x:4,y:0},{x:6,y:0}]),g(e,d.prototype.makekulouduizhang,[{x:0,y:9},{x:8,y:3},{x:8,y:6}]),g(e,d.prototype.makemayifashi,[{x:3,y:4},{x:10,y:2}]),e.push(d.prototype.makechujiweibing({x:7,y:6})),g(e,d.prototype.makehongbianfu,[{x:5,y:0},{x:6,y:9}]),g(e,d.prototype.makeguaiwang,[{x:10,y:7},{x:10,y:9}]),e.push(d.prototype.makebaiyiwushi({x:10,y:8})),g(e,i.prototype.makeSupply200HP,[{x:4,y:4},{x:5,y:4}]),e.push(i.prototype.makeSupply3ATK({x:2,y:10})),e.push(i.prototype.makeSupply3DEF({x:5,y:2})),t.push(i.prototype.makeFloorUp({x:4,y:6})),t.push(i.prototype.makeFloorDown({x:0,y:0})),c("8",e.list),e.list},9:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:1,y:3},{x:1,y:9},{x:2,y:1},{x:7,y:1},{x:7,y:7},{x:9,y:9},{x:10,y:3}]),g(e,i.prototype.makeDoorBlue,[{x:5,y:1},{x:8,y:5}]),e.push(i.prototype.makeDoorRed({x:4,y:3})),g(e,i.prototype.makeKeyYellow,[{x:0,y:1},{x:1,y:0},{x:2,y:10},{x:3,y:10},{x:7,y:10},{x:8,y:10}]),g(e,i.prototype.makeKeyBlue,[{x:9,y:0},{x:10,y:1}]),g(e,d.prototype.makekulouduizhang,[{x:1,y:10},{x:8,y:0},{x:8,y:2},{x:9,y:1},{x:9,y:10},{x:10,y:2}]),g(e,d.prototype.makeshitouguairen,[{x:9,y:4},{x:9,y:6},{x:10,y:5}]),g(e,d.prototype.makemayifashi,[{x:6,y:4},{x:9,y:5}]),e.push(d.prototype.makehongyifashi({x:6,y:1})),e.push(d.prototype.makeshoumianwushi({x:1,y:2})),g(e,i.prototype.makeSupply200HP,[{x:4,y:10},{x:6,y:10},{x:8,y:1},{x:9,y:2}]),g(e,i.prototype.makeSupply500HP,[{x:10,y:4},{x:10,y:6}]),e.push(i.prototype.makeSupply3ATK({x:6,y:2})),e.push(i.prototype.makeSupply3DEF({x:6,y:0})),e.push(i.prototype.makeWeapon30({x:10,y:0})),e.push(i.prototype.makeFunctionFly({x:0,y:0})),t.push(i.prototype.makeFloorUp({x:6,y:6})),t.push(i.prototype.makeFloorDown({x:4,y:6})),c("9",e.list),e.list},10:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:1,y:4},{x:1,y:6},{x:5,y:7},{x:6,y:8},{x:7,y:7}]),e.push(i.prototype.makeDoorRed({x:9,y:5})),g(e,i.prototype.makeKeyYellow,[{x:4,y:4},{x:4,y:5},{x:4,y:6},{x:5,y:10},{x:6,y:10},{x:8,y:10},{x:9,y:10}]),g(e,i.prototype.makeKeyBlue,[{x:10,y:6},{x:10,y:8}]),g(e,d.prototype.makedabianfu,[{x:4,y:0},{x:6,y:0}]),g(e,d.prototype.makemayifashi,[{x:9,y:6},{x:9,y:8}]),g(e,d.prototype.makehongbianfu,[{x:5,y:0},{x:6,y:9},{x:8,y:7}]),g(e,d.prototype.makehongyifashi,[{x:1,y:10},{x:2,y:9}]),g(e,d.prototype.makeshoumianwushi,[{x:0,y:4},{x:0,y:6}]),g(e,i.prototype.makeSupply200HP,[{x:8,y:2},{x:9,y:2},{x:10,y:2},{x:10,y:10}]),g(e,i.prototype.makeSupply3ATK,[{x:0,y:3},{x:8,y:3},{x:9,y:3},{x:10,y:3}]),g(e,i.prototype.makeSupply3DEF,[{x:0,y:7},{x:8,y:4},{x:9,y:4},{x:10,y:4}]),e.push(i.prototype.makeSupply500HP({x:2,y:10})),t.push(i.prototype.makeFloorUp({x:10,y:0})),t.push(i.prototype.makeFloorDown({x:6,y:5})),c("10",e.list),e.list},11:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:3,y:0},{x:3,y:2},{x:3,y:4},{x:3,y:6},{x:5,y:0},{x:5,y:10}]),g(e,i.prototype.makeDoorBlue,[{x:3,y:9},{x:5,y:3},{x:5,y:7}]),g(e,i.prototype.makeDoorRed,[{x:9,y:2},{x:9,y:8}]),g(e,i.prototype.makeKeyYellow,[{x:0,y:2},{x:1,y:2},{x:2,y:2}]),g(e,i.prototype.makeKeyBlue,[{x:0,y:4},{x:1,y:4},{x:2,y:4}]),g(e,i.prototype.makeKeyRed,[{x:0,y:6},{x:1,y:6},{x:2,y:6}]),g(e,d.prototype.makeshoumianwushi,[{x:7,y:2},{x:7,y:2},{x:8,y:8},{x:8,y:8}]),g(e,d.prototype.makemingweibing,[{x:1,y:8},{x:1,y:10},{x:2,y:9},{x:6,y:3},{x:6,y:7}]),e.push(d.prototype.makegaojiweibing({x:1,y:9})),e.push(d.prototype.makeshuangshoujianshi({x:6,y:5})),g(e,i.prototype.makeSupply200HP,[{x:0,y:0},{x:1,y:0},{x:2,y:0},{x:9,y:4},{x:9,y:6}]),g(e,i.prototype.makeSupply500HP,[{x:0,y:8},{x:0,y:10},{x:6,y:4},{x:6,y:6}]),g(e,i.prototype.makeSupply3ATK,[{x:6,y:10},{x:7,y:10},{x:8,y:10}]),g(e,i.prototype.makeSupply3DEF,[{x:6,y:0},{x:7,y:0},{x:8,y:0}]),e.push(i.prototype.makeShield30({x:0,y:9})),e.simplePush({x:4,y:8,type:0,detail_type:2.51,vif:function(){return!0},onHint:function(){E.showShop("shop_gold2")},onShow:function(){}}),e.simplePush({x:5,y:8,type:0,detail_type:2.5,vif:function(){return!0},onHint:function(){E.showShop("shop_gold2")},onShow:function(){}}),e.simplePush({x:6,y:8,type:0,detail_type:2.52,vif:function(){return!0},onHint:function(){E.showShop("shop_gold2")},onShow:function(){}}),t.push(i.prototype.makeFloorUp({x:10,y:10})),t.push(i.prototype.makeFloorDown({x:10,y:0})),c("11",e.list),e.list},12:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:1,y:5},{x:8,y:2},{x:8,y:8}]),g(e,i.prototype.makeDoorBlue,[{x:5,y:1},{x:5,y:9},{x:9,y:5}]),g(e,i.prototype.makeKeyYellow,[{x:3,y:5},{x:4,y:5}]),g(e,d.prototype.makejinweishi,[{x:0,y:4},{x:0,y:6}]),g(e,d.prototype.makemingweibing,[{x:8,y:3},{x:8,y:4},{x:8,y:6},{x:8,y:7}]),g(e,d.prototype.makeshuangshoujianshi,[{x:3,y:1},{x:4,y:0},{x:8,y:1},{x:8,y:9}]),g(e,d.prototype.makejinduizhang,[{x:0,y:5},{x:2,y:5}]),g(e,d.prototype.makelingwushi1,[{x:3,y:9},{x:4,y:10}]),e.push(d.prototype.makegaojiweibing({x:8,y:5})),e.push(d.prototype.makemingzhanshi({x:4,y:1})),e.push(d.prototype.makelingfashi1({x:4,y:9})),g(e,i.prototype.makeSupply200HP,[{x:5,y:5},{x:6,y:5}]),g(e,i.prototype.makeSupply500HP,[{x:0,y:9},{x:1,y:10}]),g(e,i.prototype.makeSupply3ATK,[{x:1,y:0},{x:8,y:10}]),g(e,i.prototype.makeSupply3DEF,[{x:0,y:1},{x:8,y:0}]),t.push(i.prototype.makeFloorUp({x:10,y:0})),t.push(i.prototype.makeFloorDown({x:10,y:10})),c("12",e.list),e.list},13:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorYellow,[{x:1,y:6},{x:10,y:9}]),e.push(i.prototype.makeDoorBlue({x:10,y:3})),e.push(i.prototype.makeDoorRed({x:3,y:2})),g(e,i.prototype.makeDoorIron,[{x:5,y:4},{x:6,y:3}]),g(e,d.prototype.makejinweishi,[{x:4,y:0},{x:6,y:0},{x:8,y:1}]),g(e,d.prototype.makemingweibing,[{x:2,y:4},{x:4,y:6},{x:6,y:6}]),g(e,d.prototype.makemingzhanshi,[{x:0,y:9},{x:4,y:4},{x:6,y:2},{x:8,y:7}]),g(e,d.prototype.makemingduizhang1,[{x:5,y:3},{x:10,y:8}]),e.push(d.prototype.makejinduizhang({x:5,y:0})),e.push(d.prototype.makeshuangshoujianshi({x:0,y:1})),e.push(d.prototype.makejinduizhang({x:5,y:6})),g(e,i.prototype.makeSupply500HP,[{x:3,y:0},{x:9,y:4}]),g(e,i.prototype.makeSupply3ATK,[{x:4,y:8},{x:5,y:8},{x:6,y:8}]),g(e,i.prototype.makeSupply3DEF,[{x:6,y:10},{x:7,y:10},{x:8,y:10}]),e.push(i.prototype.makeLevelTwo({x:10,y:7})),e.simplePush({x:4,y:6,type:0,detail_type:2.4,vif:function(){return!0},onHint:function(){E.showShop("shop_exp2")},onShow:function(){}}),t.push(i.prototype.makeFloorUp({x:10,y:5})),t.push(i.prototype.makeFloorDown({x:10,y:0})),c("13",e.list),e.list},14:function(){let e=new x,t=e;return g(e,i.prototype.makeDoorBlue,[{x:8,y:5},{x:9,y:4},{x:9,y:6}]),e.push(i.prototype.makeDoorIron({x:4,y:5})),e.push(i.prototype.makeKeyAll({x:0,y:3})),g(e,d.prototype.makemingweibing,[{x:9,y:1},{x:9,y:3},{x:9,y:7},{x:9,y:9}]),g(e,d.prototype.makegaojiweibing,[{x:9,y:2},{x:9,y:8}]),g(e,d.prototype.makemingzhanshi,[{x:5,y:5},{x:7,y:5}]),e.push(d.prototype.makemingduizhang1({x:6,y:5})),e.push(d.prototype.makelingwushi1({x:0,y:2})),g(e,i.prototype.makeSupply200HP,[{x:5,y:2},{x:5,y:8}]),g(e,i.prototype.makeSupply500HP,[{x:1,y:2},{x:1,y:8}]),e.push(i.prototype.makeFunctionHolyWater({x:3,y:5})),t.push(i.prototype.makeFloorUp({x:0,y:4})),t.push(i.prototype.makeFloorDown({x:10,y:5})),c("14",e.list),e.list},15:function(){let o=new x,n=o;return g(o,i.prototype.makeDoorYellow,[{x:7,y:4},{x:7,y:6}]),o.push(i.prototype.makeDoorRed({x:9,y:5})),g(o,i.prototype.makeSupply3ATK,[{x:5,y:4},{x:5,y:6}]),g(o,i.prototype.makeSupply3DEF,[{x:4,y:4},{x:4,y:6}]),o.simplePush({x:4,y:3,detail_type:5.2,type:0,vif:function(){return!0},onHint:function(){var o=this;t.isNpcDone(this)?I(["谢谢惠顾"]):I(["我这里有一件对你来说非常好的宝物。","只要你出得起钱,我就卖给你。","什么宝物?要多少钱?","是这个游戏是最好的武器,攻击值可以增加120点。","但是需要500经验。怎么样?"],(function(n){t.getItemCount(e.EXP)>=500?I(["我有500经验","好,成交!"],(function(n){t.addItemCount(e.EXP,-500),t.addItemCount(e.ATK,120),t.setNpcDone(o)}),""):I(["小伙子,你这经验可不够500啊。","等你凑够500经验再来找我吧!"],(function(e){}),"")}),"")},onShow:function(){}}),o.simplePush({x:6,y:3,detail_type:5.4,type:0,vif:function(){return!0},onHint:function(){var o=this;t.isNpcDone(this)?I(["谢谢惠顾"]):I(["我这里有一件对你来说非常好的宝物。","只要你出得起钱,我就卖给你。","什么宝物?要多少钱?","是这个游戏是最好的盾牌,防御值可以增加120点。","而你只要出500个金币就可以买下。怎么样?"],(function(n){t.getItemCount(e.GOLD)>=500?I(["我有500个金币","好,成交!"],(function(n){t.addItemCount(e.GOLD,-500),t.addItemCount(e.DEF,120),t.setNpcDone(o)}),""):I(["小伙子,你这金币可不够500个啊。","等你凑够500个金币再来找我吧!"],(function(e){}),"")}),"")},onShow:function(){}}),n.push(i.prototype.makeFloorUp({x:0,y:6})),n.push(i.prototype.makeFloorDown({x:0,y:4})),c("15",o.list),o.list},16:function(){let e=new x,o=e;return e.push(i.prototype.makeDoorRed({x:3,y:5})),e.push(d.prototype.makehongyimowang1({x:5,y:5})),o.push(i.prototype.makeFloorDown({x:0,y:6})),e.simplePush({x:5,y:7,detail_type:2.3,type:0,vif:function(){return!0},onHint:function(){var e=this;I(["你是谁?","我受国王的委托来营救你。","太感谢了!","那我们这就赶紧回去吧。","好的,有我在,不会有人再能伤害你。"],(function(o){t.setNpcDone(e),se("游戏结束,您已通关!")}),"")},onShow:function(){}}),c("16",e.list),e.list}};function f(e){var t="";return 0==e?t="null":1.1==e?t="floorUp":1.2==e?t="floorDown":2.1==e?t="npcElfin":2.2==e?t="npcThief":2.3==e?t="npcPrincess":2.4==e?t="npcExpShop":2.5==e?t="npcGoldShop":2.51==e?t="npcGoldShop1":2.52==e?t="npcGoldShop2":2.6==e?t="npcKeySell":2.7==e?t="npcKeyBuy":2.8==e?t="npcMisticalOldMan":3.1==e?t="weapon10":3.2==e?t="weapon30":3.3==e?t="weapon60":3.4==e?t="weapon150":3.5==e?t="shield10":3.6==e?t="shield30":3.7==e?t="shield70":3.8==e?t="shield150":4.1==e?t="supply200HP":4.2==e?t="supply500HP":4.3==e?t="supply3ATK":4.4==e?t="supply3DEF":5.1==e?t="equipAtk50":5.2==e?t="equipAtk150":5.3==e?t="equipDef50":5.4==e?t="equipDef150":6.1==e?t="doorYellow":6.2==e?t="doorBlue":6.3==e?t="doorRed":6.4==e?t="doorIron":6.5==e?t="doorIronCant":6.6==e?t="doorGreen":7.1==e?t="levelOne":7.2==e?t="levelTwo":7.3==e?t="levelThree":8.1==e?t="keyYellow":8.2==e?t="keyBlue":8.3==e?t="keyRed":8.4==e?t="keyAll":9.1==e?t="functionFly":9.2==e?t="functionMonster":9.3==e?t="functionCross":9.4==e?t="functionPickaxe":9.5==e?t="functionHolyWater":9.6==e?t="functionBigGold":9.71==e?t="functionStaffOne":9.72==e?t="functionStaffTwo":9.73==e?t="functionStaffThree":11==e?t="lvtouguai":12==e?t="hongtouguai":13==e?t="xiaobianfu":14==e?t="kulouren":15==e?t="qingtouguai":16==e?t="kuloushibing":17==e?t="chujifashi":18==e?t="dabianfu":19==e?t="shoumianren":20==e?t="kulouduizhang":21==e?t="shitouguairen":22==e?t="mayifashi":23==e?t="chujiweibing":24==e?t="hongbianfu":25==e?t="gaojifashi":26==e?t="guaiwang":27==e?t="baiyiwushi":28==e?t="jinweishi":29==e?t="hongyifashi":30==e?t="shoumianwushi":31==e?t="mingweibing":32==e?t="gaojiweibing":33==e?t="shuangshoujianshi":34==e?t="mingzhanshi":35==e?t="jinduizhang":36==e?t="lingfashi":37==e?t="mingduizhang":38==e?t="lingwushi":39==e?t="yingzizhanshi":40==e||41==e?t="hongyimowang":42==e?t="minglingmowang":43==e?t="mingduizhang":44==e||45==e?t="lingwushi":46==e?t="minglingmowang":47==e||48==e?t="lingfashi":49==e?t="minglingmowang":50==e?t="xueying":501==e?t="xueying1":502==e?t="xueying2":503==e?t="xueying3":504==e?t="xueying4":505==e?t="xueying5":506==e?t="xueying6":507==e?t="xueying7":508==e?t="xueying8":51==e?t="molong":511==e?t="molong1":512==e?t="molong2":513==e?t="molong3":514==e?t="molong4":515==e?t="molong5":516==e?t="molong6":517==e?t="molong7":518==e&&(t="molong8"),t}function k(e){var t="";return 0==e?t="none":1==e?t="board":2==e?t="wall":3==e?t="none1":4==e?t="board1":5==e&&(t="wall1"),t}var d=function(){this.data=[[0]],this.origin={x:0,y:0},this.HP=0,this.ATK=0,this.DEF=0,this.GOLD=0,this.EXP=0,this.class="",this.name=""};d.prototype.makelvtouguai=function(e){var t=new i;return t.data=[[11]],t.HP=50,t.ATK=20,t.DEF=1,t.GOLD=1,t.EXP=1,t.class="lvtouguai",t.name="绿头怪",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makehongtouguai=function(e){var t=new i;return t.data=[[12]],t.HP=70,t.ATK=15,t.DEF=2,t.GOLD=2,t.EXP=2,t.class="hongtouguai",t.name="红头怪",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexiaobianfu=function(e){var t=new i;return t.data=[[13]],t.HP=100,t.ATK=20,t.DEF=5,t.GOLD=3,t.EXP=3,t.class="xiaobianfu",t.name="小蝙蝠",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makekulouren=function(e){var t=new i;return t.data=[[14]],t.HP=110,t.ATK=25,t.DEF=5,t.GOLD=5,t.EXP=4,t.class="kulouren",t.name="骷髅人",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeqingtouguai=function(e){var t=new i;return t.data=[[15]],t.HP=200,t.ATK=35,t.DEF=10,t.GOLD=5,t.EXP=5,t.class="qingtouguai",t.name="青头怪",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makekuloushibing=function(e){var t=new i;return t.data=[[16]],t.HP=150,t.ATK=40,t.DEF=20,t.GOLD=8,t.EXP=6,t.class="kuloushibing",t.name="骷髅士兵",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makechujifashi=function(e){var t=new i;return t.data=[[17]],t.HP=125,t.ATK=50,t.DEF=25,t.GOLD=10,t.EXP=7,t.class="chujifashi",t.name="初级法师",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makedabianfu=function(e){var t=new i;return t.data=[[18]],t.HP=150,t.ATK=65,t.DEF=30,t.GOLD=10,t.EXP=8,t.class="dabianfu",t.name="大蝙蝠",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeshoumianren=function(e){var t=new i;return t.data=[[19]],t.HP=300,t.ATK=75,t.DEF=45,t.GOLD=13,t.EXP=10,t.class="shoumianren",t.name="兽面人",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makekulouduizhang=function(e){var t=new i;return t.data=[[20]],t.HP=400,t.ATK=90,t.DEF=50,t.GOLD=15,t.EXP=12,t.class="kulouduizhang",t.name="骷髅队长",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeshitouguairen=function(e){var t=new i;return t.data=[[21]],t.HP=500,t.ATK=115,t.DEF=65,t.GOLD=15,t.EXP=15,t.class="shitouguairen",t.name="石头怪人",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemayifashi=function(e){var t=new i;return t.data=[[22]],t.HP=250,t.ATK=120,t.DEF=70,t.GOLD=20,t.EXP=17,t.class="mayifashi",t.name="麻衣法师",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makechujiweibing=function(e){var t=new i;return t.data=[[23]],t.HP=450,t.ATK=150,t.DEF=90,t.GOLD=22,t.EXP=19,t.class="chujiweibing",t.name="初级卫兵",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makehongbianfu=function(e){var t=new i;return t.data=[[24]],t.HP=550,t.ATK=160,t.DEF=90,t.GOLD=25,t.EXP=20,t.class="hongbianfu",t.name="红蝙蝠",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makegaojifashi=function(e){var t=new i;return t.data=[[25]],t.HP=100,t.ATK=200,t.DEF=110,t.GOLD=30,t.EXP=25,t.class="gaojifashi",t.name="高级法师",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeguaiwang=function(e){var t=new i;return t.data=[[26]],t.HP=700,t.ATK=250,t.DEF=125,t.GOLD=32,t.EXP=30,t.class="guaiwang",t.name="怪王",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makebaiyiwushi=function(e){var t=new i;return t.data=[[27]],t.HP=1300,t.ATK=300,t.DEF=150,t.GOLD=40,t.EXP=35,t.class="baiyiwushi",t.name="白衣武士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makejinweishi=function(e){var t=new i;return t.data=[[28]],t.HP=850,t.ATK=350,t.DEF=200,t.GOLD=45,t.EXP=40,t.class="jinweishi",t.name="金卫士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makehongyifashi=function(e){var t=new i;return t.data=[[29]],t.HP=500,t.ATK=400,t.DEF=260,t.GOLD=47,t.EXP=45,t.class="hongyifashi",t.name="红衣法师",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeshoumianwushi=function(e){var t=new i;return t.data=[[30]],t.HP=900,t.ATK=450,t.DEF=330,t.GOLD=50,t.EXP=50,t.class="shoumianwushi",t.name="兽面武士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemingweibing=function(e){var t=new i;return t.data=[[31]],t.HP=1250,t.ATK=500,t.DEF=400,t.GOLD=55,t.EXP=55,t.class="mingweibing",t.name="冥卫兵",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makegaojiweibing=function(e){var t=new i;return t.data=[[32]],t.HP=1500,t.ATK=560,t.DEF=460,t.GOLD=60,t.EXP=60,t.class="gaojiweibing",t.name="高级卫兵",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeshuangshoujianshi=function(e){var t=new i;return t.data=[[33]],t.HP=1200,t.ATK=620,t.DEF=520,t.GOLD=65,t.EXP=75,t.class="shuangshoujianshi",t.name="双手剑士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemingzhanshi=function(e){var t=new i;return t.data=[[34]],t.HP=2e3,t.ATK=680,t.DEF=590,t.GOLD=70,t.EXP=65,t.class="mingzhanshi",t.name="冥战士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makejinduizhang=function(e){var t=new i;return t.data=[[35]],t.HP=900,t.ATK=750,t.DEF=650,t.GOLD=77,t.EXP=70,t.class="jinduizhang",t.name="金队长",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makelingfashi1=function(e,t,o){var n=new i;return t||o?t&&!o?n=d.prototype.makelingfashi2(e):t&&o&&(n=d.prototype.makelingfashi3(e)):(n.data=[[36]],n.HP=1500,n.ATK=830,n.DEF=730,n.GOLD=80,n.EXP=70,n.class="lingfashi",n.name="灵法师",n.origin.x=e.x,n.origin.y=e.y),n},d.prototype.makemingduizhang1=function(e,t,o){var n=new i;return t||o?n=d.prototype.makemingduizhang2(e):(n.data=[[37]],n.HP=2500,n.ATK=900,n.DEF=850,n.GOLD=84,n.EXP=75,n.class="mingduizhang",n.name="冥队长",n.origin.x=e.x,n.origin.y=e.y),n},d.prototype.makelingwushi1=function(e,t,o){var n=new i;return t||o?t&&!o?n=d.prototype.makelingwushi2(e):t&&o&&(n=d.prototype.makelingwushi3(e)):(n.data=[[38]],n.HP=1200,n.ATK=980,n.DEF=900,n.GOLD=88,n.EXP=75,n.class="lingwushi",n.name="灵武士",n.origin.x=e.x,n.origin.y=e.y),n},d.prototype.makeyingzizhanshi=function(e){var t=new i;return t.data=[[39]],t.HP=3100,t.ATK=1150,t.DEF=1050,t.GOLD=92,t.EXP=80,t.class="yingzizhanshi",t.name="影子战士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makehongyimowang1=function(e,t,o){var n=new i;return t||o?n=d.prototype.makehongyimowang2(e):(n.data=[[40]],n.HP=15e3,n.ATK=1e3,n.DEF=1e3,n.GOLD=100,n.EXP=100,n.class="hongyimowang",n.name="红衣魔王",n.origin.x=e.x,n.origin.y=e.y),n},d.prototype.makehongyimowang2=function(e){var t=new i;return t.data=[[41]],t.HP=2e4,t.ATK=1333,t.DEF=1333,t.GOLD=133,t.EXP=133,t.class="hongyimowang",t.name="红衣魔王",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeminglingmowang1=function(e,t,o){var n=new i;return t||o?t&&!o?n=d.prototype.makeminglingmowang2(e):t&&o&&(n=d.prototype.makeminglingmowang3(e)):(n.data=[[42]],n.HP=33333,n.ATK=2e3,n.DEF=1e3,n.GOLD=375,n.EXP=330,n.class="minglingmowang",n.name="冥灵魔王",n.origin.x=e.x,n.origin.y=e.y),n},d.prototype.makemingduizhang2=function(e){var t=new i;return t.data=[[43]],t.HP=3333,t.ATK=1200,t.DEF=1133,t.GOLD=112,t.EXP=100,t.class="mingduizhang",t.name="冥队长",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makelingwushi2=function(e){var t=new i;return t.data=[[44]],t.HP=1600,t.ATK=1306,t.DEF=1200,t.GOLD=117,t.EXP=100,t.class="lingwushi",t.name="灵武士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makelingwushi3=function(e){var t=new i;return t.data=[[45]],t.HP=2400,t.ATK=2612,t.DEF=2400,t.GOLD=146,t.EXP=125,t.class="lingwushi",t.name="灵武士",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeminglingmowang2=function(e){var t=new i;return t.data=[[46]],t.HP=45e3,t.ATK=2550,t.DEF=2250,t.GOLD=312,t.EXP=275,t.class="minglingmowang",t.name="冥灵魔王",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makelingfashi2=function(e){var t=new i;return t.data=[[47]],t.HP=2e3,t.ATK=1106,t.DEF=973,t.GOLD=106,t.EXP=93,t.class="lingfashi",t.name="灵法师",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makelingfashi3=function(e){var t=new i;return t.data=[[48]],t.HP=3e3,t.ATK=2212,t.DEF=1946,t.GOLD=132,t.EXP=116,t.class="lingfashi",t.name="灵法师",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makeminglingmowang3=function(e){var t=new i;return t.data=[[49]],t.HP=6e4,t.ATK=3400,t.DEF=3e3,t.GOLD=390,t.EXP=343,t.class="minglingmowang",t.name="冥灵魔王",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying=function(e){var t=new i;return t.data=[[50]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.class="xueying",t.name="血影",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying1=function(e){var t=new i;return t.data=[[501]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying2=function(e){var t=new i;return t.data=[[502]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying3=function(e){var t=new i;return t.data=[[503]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying4=function(e){var t=new i;return t.data=[[504]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying5=function(e){var t=new i;return t.data=[[505]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying6=function(e){var t=new i;return t.data=[[506]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying7=function(e){var t=new i;return t.data=[[507]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makexueying8=function(e){var t=new i;return t.data=[[508]],t.HP=99999,t.ATK=5e3,t.DEF=4e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong=function(e){var t=new i;return t.data=[[51]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.class="molong",t.name="魔龙",t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong1=function(e){var t=new i;return t.data=[[511]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong2=function(e){var t=new i;return t.data=[[512]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong3=function(e){var t=new i;return t.data=[[513]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong4=function(e){var t=new i;return t.data=[[514]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong5=function(e){var t=new i;return t.data=[[515]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong6=function(e){var t=new i;return t.data=[[516]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong7=function(e){var t=new i;return t.data=[[517]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t},d.prototype.makemolong8=function(e){var t=new i;return t.data=[[518]],t.HP=99999,t.ATK=9999,t.DEF=5e3,t.GOLD=9999,t.EXP=9999,t.origin.x=e.x,t.origin.y=e.y,t};var w=function(){this.x=0,this.y=0,this.dir=0};w.prototype.setOrigin=function(e,t,o){this.x=e,this.y=t,this.dir=o,ye(),ae()},w.prototype.move=function(o){if(F!=_)return;let i=this.canMove(this,o);if(this.dir!=o&&(this.dir=o,ae()),i){let p=P.getNpc(i[0],i[1]);if(p)if(0==p.type)r(this,p);else if(3==p.type)if(p.upflag){var a=t.getItemCount(e.FLOOR)+1;t.setItemCount(e.FLOOR,a);var y=n(p.upflag,a);this.setOrigin(y.y,y.x,1),P.reLoadFloor(a),t.getItemCount(e.MAX_FLOOR)<a&&t.setItemCount(e.MAX_FLOOR,a),t.save()}else{a=t.getItemCount(e.FLOOR)-1;t.setItemCount(e.FLOOR,a);y=n(p.upflag,a);this.setOrigin(y.y,y.x,1),P.reLoadFloor(a),t.save()}else 4==p.type?r(this,p):(1==p.type||2==p.type)&&p.onHint();else this.x=i[0],this.y=i[1],this.dir=o,ae(),function(e){var t=!1,o=!1,n=0,i=0;2==e.dir?e.x<=oe+1&&(t=!0,n=0):3==e.dir?e.x>=oe+7-2&&(t=!0,n=4):0==e.dir?e.y<=ne+1&&(o=!0,i=0):1==e.dir&&e.y>=ne+7-2&&(o=!0,i=4);t?oe!=n&&(oe=n,re(),ae()):o&&ne!=i&&(ne=i,re(),ae())}(this)}},w.prototype.canMove=function(e,t){let o=e.getAim(t),n=P.getBlock(o[0],o[1]);return 1==n||4==n?o:""},w.prototype.getAim=function(e){var t=this.x,o=this.y;return 0==e?o-=1:1==e?o+=1:2==e?t-=1:3==e&&(t+=1),[t,o]},w.prototype.fightMonster=function(o){var n=t.getItemCount(e.HP);let i=this.fightCheck(o),r=o.monster;if(i<0)console.log("敌人过于强大,无法击败"),se("敌人过于强大,无法击败");else{var a=n-i;t.addItemCount(e.HP,-1*a),t.addItemCount(e.EXP,r.EXP),t.addItemCount(e.GOLD,r.GOLD),console.log("HP-"+a+" Exp+"+r.EXP+"Gold+"+r.GOLD),ue("战斗胜利:生命-"+a+" 经验+"+r.EXP+" 金币+"+r.GOLD),t.setNpcDone(o),P.removeNpc(o)}},w.prototype.fightCheck=function(o){var n=t.getItemCount(e.HP),i=o.monster;switch(i.data[0][0]){case 22:n-=100;break;case 27:n=parseInt(n/4*3);break;case 29:n-=300;break;case 36:case 47:case 48:n=parseInt(n/3*2)}let r=t.getItemCount(e.ATK),a=t.getItemCount(e.DEF);i.ATK>a?monsterHurt=i.ATK-a:monsterHurt=0,roleHurt=r-i.DEF;var y=Math.ceil(i.HP/roleHurt)-1;return y=y<=0?0:y,r<=i.DEF||n<=0||monsterHurt*y>n?-1:n-monsterHurt*y};const E={offset:0,talks:[],cb:"",cbParam:"",timer:"",shopType:"",startTalk:function(){F=L,W.setProperty(hmUI.prop.VISIBLE,!0),Y.setProperty(hmUI.prop.VISIBLE,!0),this.onTalk()},onTalk:function(){var e,t=this;if(t.offset>=t.talks.length)return W.setProperty(hmUI.prop.VISIBLE,!1),Y.setProperty(hmUI.prop.VISIBLE,!1),F=_,void(t.cb&&t.cb(t.cbParam));console.log("TALK: "+t.talks[t.offset]),e=t.talks[t.offset],Y.setProperty(hmUI.prop.MORE,{text:e}),t.offset+=1},showShop:function(e){var t;this.shopType=e,F=T,t=D[e],R.setProperty(hmUI.prop.VISIBLE,!0),G.setProperty(hmUI.prop.VISIBLE,!1),z.setProperty(hmUI.prop.MORE,{text:t.title}),M.setProperty(hmUI.prop.MORE,{x:10,y:200,w:172,h:44,press_color:3289650,normal_color:5723991,text:t.items[0].title}),V.setProperty(hmUI.prop.MORE,{x:10,y:260,w:172,h:44,press_color:3289650,normal_color:5723991,text:t.items[1].title}),j.setProperty(hmUI.prop.MORE,{x:10,y:320,w:172,h:44,press_color:3289650,normal_color:5723991,text:t.items[2].title})},onItemBuy:function(e){let t=D[this.shopType].items[e];this.buyItem(t)},hideShop:function(e){R.setProperty(hmUI.prop.VISIBLE,!1),G.setProperty(hmUI.prop.VISIBLE,!0),F=_},buyItem:function(e){let o=e.cost,n=e.gain;for(var i in o){let e=o[i];if(t.getItemCount(i)<e)return void se("所需花费不足")}for(var i in o){let e=o[i];t.addItemCount(i,-1*e)}for(var i in n){let e=n[i];t.addItemCount(i,e)}se("购买成功")}};function I(e,t,o){E.offset=0,E.talks=e,E.cb=t,E.cbParam=o,E.startTalk()}const D={shop_exp:{title:"尊敬的勇士,在这里您可以使用经验来提升您的属性",items:[{title:"100经验:等级 + 1",cost:{EXP:100},gain:{LEVEL:1,HP:1e3,ATK:7,DEF:7}},{title:"30经验:攻击 + 5",cost:{EXP:30},gain:{ATK:5}},{title:"30经验:防御 + 5",cost:{EXP:30},gain:{DEF:5}}]},shop_exp2:{title:"尊敬的勇士,在这里您可以使用经验来提升您的属性",items:[{title:"285经验:等级 + 3",cost:{EXP:285},gain:{LEVEL:3,HP:3e3,ATK:21,DEF:21}},{title:"95经验:攻击 + 17",cost:{EXP:95},gain:{ATK:17}},{title:"95经验:防御 + 17",cost:{EXP:95},gain:{DEF:17}}]},shop_gold:{title:"尊敬的勇士,在这里您可以花费金币来提升您的属性,每次花费的金币为25",items:[{title:"生命 + 1000",cost:{GOLD:25},gain:{HP:1e3}},{title:"攻击 + 4",cost:{GOLD:25},gain:{ATK:4}},{title:"防御 + 4",cost:{GOLD:25},gain:{DEF:4}}]},shop_gold2:{title:"尊敬的勇士,在这里您可以花费金币来提升您的属性,每次花费的金币为100",items:[{title:"生命 + 5000",cost:{GOLD:100},gain:{HP:5e3}},{title:"攻击 + 20",cost:{GOLD:100},gain:{ATK:20}},{title:"防御 + 20",cost:{GOLD:100},gain:{DEF:20}}]},shop_key:{title:"尊敬的勇士,在这里您可以花费金币,来购买您所需的钥匙",items:[{title:"黄钥匙 ¥10",cost:{GOLD:10},gain:{YELLOW_KEY:1}},{title:"蓝钥匙 ¥60",cost:{GOLD:60},gain:{BLUE_KEY:1}},{title:"红钥匙 ¥100",cost:{GOLD:100},gain:{RED_KEY:1}}]}};var P,v;const _=0,L=1,T=2;var F=_;function O(o){t.setItemCount(e.FLOOR,o);var i=n(!0,o);v.setOrigin(i.y,i.x,1),P.reLoadFloor(o)}const S=27,K=130,U=192,H=480,A=13421772,b=13421772,G=hmUI.createWidget(hmUI.widget.GROUP,{x:0,y:0,width:U,hight:H}),R=hmUI.createWidget(hmUI.widget.GROUP,{x:0,y:0,width:U,hight:H}),X=hmUI.createWidget(hmUI.widget.GROUP,{x:0,y:0,width:U,hight:H}),C={wdPools:{},wdPoolIndex:-1,createOrGetImg:function(e,t,o){if(this.wdPoolIndex<0)return this.wdPoolIndex=-1,G.createWidget(hmUI.widget.IMG,{x:1+e,y:K+t,src:o});{let n=this.wdPools[this.wdPoolIndex+""];return n.setProperty(hmUI.prop.MORE,{x:1+e,y:K+t,src:o}),n.setProperty(hmUI.prop.VISIBLE,!0),delete this.wdPools[this.wdPoolIndex+""],this.wdPoolIndex-=1,n}},hideImg:function(e){e.setProperty(hmUI.prop.VISIBLE,!1),this.wdPoolIndex+=1,this.wdPools[this.wdPoolIndex+""]=e},createTmpImg:function(e,t,o){let n=G.createWidget(hmUI.widget.IMG,{x:e,y:t,src:o});this.hideImg(n)}};var B,N,W,Y,z,M,V,j,q,$,J,Q,Z=[],ee={},te={},oe=0,ne=0,ie=!1;function re(){let e=oe,t=ne,o=oe+7,n=ne+7;for(var i in ee)delete ee[i];for(var r=t;r<n;r++){let t=P.data[r];for(var a=e;a<o;a++){let e=r-ne,o=a-oe,n=a+","+r;if(P.npcMap[n]){var y=P.npcMap[n];if(y.class){let t="images/"+y.class+".png";Z[7*e+o].setProperty(hmUI.prop.MORE,{src:t}),ee[y.id]=Z[7*e+o]}}else{let n="images/"+k(t[a])+".png";Z[7*e+o].setProperty(hmUI.prop.MORE,{src:n})}}}0==oe?(J.setProperty(hmUI.prop.VISIBLE,!0),Q.setProperty(hmUI.prop.VISIBLE,!1)):(J.setProperty(hmUI.prop.VISIBLE,!1),Q.setProperty(hmUI.prop.VISIBLE,!0)),0==ne?(q.setProperty(hmUI.prop.VISIBLE,!0),$.setProperty(hmUI.prop.VISIBLE,!1)):(q.setProperty(hmUI.prop.VISIBLE,!1),$.setProperty(hmUI.prop.VISIBLE,!0))}function ae(){let e="images/hero_"+v.dir+".png";B.setProperty(hmUI.prop.MORE,{x:1+(v.x-oe)*S,y:K+(v.y-ne)*S,src:e})}function ye(){let e=v.x,t=v.y,o=Math.floor(6);oe=e<o?0:4,ne=t<=o?0:4}function pe(e,t){if(ee[t.id]){let e="images/"+k(1)+".png";ee[t.id].setProperty(hmUI.prop.MORE,{src:e}),delete ee[t.id]}}function se(e){hmUI.showToast({text:e})}function ue(e){N.setProperty(hmUI.prop.MORE,{text:e})}var xe={YELLOW_KEY:"黄钥匙:",BLUE_KEY:"蓝钥匙:",RED_KEY:"红钥匙:",HP:"生命:",ATK:"攻击:",DEF:"防御:",GOLD:"金币:",EXP:"经验:",LEVEL:"等级:",FLOOR:"楼层:"};function me(e,t){te[e]&&(te[e].setProperty(hmUI.prop.MORE,{text:xe[e]+t}),console.log("设置属性:"+e+"->"+xe[e]+t))}function ge(o){t.getItemCount(e.MAX_FLOOR)<o?se("还未探索到该楼层"):(O(o),X.setProperty(hmUI.prop.VISIBLE,!1),G.setProperty(hmUI.prop.VISIBLE,!0),t.save())}!function(){for(var o=0;o<7;o++)for(var n=0;n<7;n++){const e=C.createOrGetImg(n*S,o*S,"");Z.push(e)}B=C.createOrGetImg(0,0,""),q=G.createWidget(hmUI.widget.FILL_RECT,{x:0,y:128,w:193,h:2,color:A}),$=G.createWidget(hmUI.widget.FILL_RECT,{x:0,y:319,w:193,h:2,color:A}),J=G.createWidget(hmUI.widget.FILL_RECT,{x:0,y:128,w:2,h:193,color:A}),Q=G.createWidget(hmUI.widget.FILL_RECT,{x:190,y:128,w:2,h:193,color:A}),G.createWidget(hmUI.widget.IMG,{x:1,y:K,w:189,h:189,src:"images/empty.png"}).addEventListener(hmUI.event.CLICK_DOWN,(function(e){let t=e.x-1;e.y,t<Math.floor(96)?v.move(2):v.move(3)})),(N=G.createWidget(hmUI.widget.TEXT,{x:5,y:329,w:182,h:80,text:"",text_size:18,color:13421772,text_style:hmUI.text_style.WRAP})).addEventListener(hmUI.event.CLICK_DOWN,(function(e){v.move(1)})),W=G.createWidget(hmUI.widget.FILL_RECT,{x:5,y:324,w:182,h:80,radius:10,color:4473924}),Y=G.createWidget(hmUI.widget.TEXT,{x:10,y:329,w:172,h:70,text:"",text_size:16,color:13421772,text_style:hmUI.text_style.WRAP}),W.setProperty(hmUI.prop.VISIBLE,!1),Y.setProperty(hmUI.prop.VISIBLE,!1),Y.addEventListener(hmUI.event.CLICK_DOWN,(function(e){E.onTalk()})),te[e.FLOOR]=G.createWidget(hmUI.widget.TEXT,{x:0,y:7,w:192,h:20,text:"Floor: 0",text_size:14,color:b,align_h:hmUI.align.CENTER_H,align_v:hmUI.align.CENTER_V}),te[e.LEVEL]=G.createWidget(hmUI.widget.TEXT,{x:0,y:27,w:192,h:20,text:"LVL: 0",text_size:14,color:b,align_h:hmUI.align.CENTER_H,align_v:hmUI.align.CENTER_V}),te[e.ATK]=G.createWidget(hmUI.widget.TEXT,{x:24,y:47,w:84,h:20,text:"ATK: 0",text_size:14,color:b,align_h:hmUI.align.LEFT}),te[e.DEF]=G.createWidget(hmUI.widget.TEXT,{x:102,y:47,w:86,h:20,text:"DEF: 0",text_size:14,color:b,align_h:hmUI.align.LEFT}),te[e.GOLD]=G.createWidget(hmUI.widget.TEXT,{x:24,y:67,w:84,h:20,text:"GOLD: 0",text_size:14,color:b,align_h:hmUI.align.LEFT}),te[e.EXP]=G.createWidget(hmUI.widget.TEXT,{x:102,y:67,w:86,h:20,text:"EXP: 0",text_size:14,color:b,align_h:hmUI.align.LEFT}),te[e.HP]=G.createWidget(hmUI.widget.TEXT,{x:24,y:87,w:84,h:20,text:"HP: 0",text_size:14,color:b,align_h:hmUI.align.LEFT}),te[e.YELLOW_KEY]=G.createWidget(hmUI.widget.TEXT,{x:102,y:87,w:86,h:20,text:"YELLOW_KEY: 0",text_size:14,color:16776960,align_h:hmUI.align.LEFT}),te[e.BLUE_KEY]=G.createWidget(hmUI.widget.TEXT,{x:24,y:107,w:84,h:20,text:"BLUE_KEY: 0",text_size:14,color:65535,align_h:hmUI.align.LEFT}),te[e.RED_KEY]=G.createWidget(hmUI.widget.TEXT,{x:102,y:107,w:86,h:20,text:"RED_KEY: 0",text_size:14,color:16711680,align_h:hmUI.align.LEFT}),G.createWidget(hmUI.widget.IMG,{x:1,y:30,w:U,h:90,src:"images/empty.png"}).addEventListener(hmUI.event.CLICK_DOWN,(function(e){v.move(0)})),G.createWidget(hmUI.widget.BUTTON,{x:56,y:440,w:80,h:40,press_color:3289650,normal_color:5723991,text:"选项",radius:20,text_size:24,color:16777215,click_func:function(){G.setProperty(hmUI.prop.VISIBLE,!1),X.setProperty(hmUI.prop.VISIBLE,!0),ie=!1}}),R.createWidget(hmUI.widget.FILL_RECT,{x:0,y:0,w:U,h:H,color:0}),z=R.createWidget(hmUI.widget.TEXT,{x:5,y:80,w:182,h:100,text:"",text_size:16,color:13421772,text_style:hmUI.text_style.WRAP}),M=R.createWidget(hmUI.widget.BUTTON,{x:10,y:200,w:182,h:44,radius:5,press_color:3289650,normal_color:5723991,text:"按钮1",text_size:16,color:"0xffffff",click_func:function(){E.onItemBuy(0)}}),V=R.createWidget(hmUI.widget.BUTTON,{x:10,y:260,w:182,h:44,radius:5,press_color:3289650,normal_color:5723991,text:"按钮2",text_size:16,color:"0xffffff",click_func:function(){E.onItemBuy(1)}}),j=R.createWidget(hmUI.widget.BUTTON,{x:10,y:320,w:182,h:44,radius:5,press_color:3289650,normal_color:5723991,text:"按钮3",text_size:16,color:"0xffffff",click_func:function(){E.onItemBuy(2)}}),R.createWidget(hmUI.widget.BUTTON,{x:10,y:380,w:172,h:44,press_color:3289650,normal_color:5723991,text:"关闭",radius:5,text_size:16,color:"0xffffff",click_func:function(){E.hideShop()}}),R.setProperty(hmUI.prop.VISIBLE,!1),X.createWidget(hmUI.widget.TEXT,{x:55,y:40,w:100,h:80,text:"飞跃楼层",text_size:20,color:13421772,text_style:hmUI.text_style.WRAP}),X.createWidget(hmUI.widget.BUTTON,{x:30,y:80,w:40,h:40,press_color:3289650,normal_color:5723991,text:"2",radius:10,text_size:24,color:16777215,click_func:function(){ge(2)}}),X.createWidget(hmUI.widget.BUTTON,{x:80,y:80,w:40,h:40,press_color:3289650,normal_color:5723991,text:"4",radius:10,text_size:24,color:16777215,click_func:function(){ge(4)}}),X.createWidget(hmUI.widget.BUTTON,{x:130,y:80,w:40,h:40,press_color:3289650,normal_color:5723991,text:"6",radius:10,text_size:24,color:16777215,click_func:function(){ge(6)}}),X.createWidget(hmUI.widget.BUTTON,{x:10,y:130,w:40,h:40,press_color:3289650,normal_color:5723991,text:"8",radius:10,text_size:24,color:16777215,click_func:function(){ge(8)}}),X.createWidget(hmUI.widget.BUTTON,{x:55,y:130,w:40,h:40,press_color:3289650,normal_color:5723991,text:"10",radius:10,text_size:24,color:16777215,click_func:function(){ge(10)}}),X.createWidget(hmUI.widget.BUTTON,{x:100,y:130,w:40,h:40,press_color:3289650,normal_color:5723991,text:"12",radius:10,text_size:24,color:16777215,click_func:function(){ge(12)}}),X.createWidget(hmUI.widget.BUTTON,{x:145,y:130,w:40,h:40,press_color:3289650,normal_color:5723991,text:"14",radius:10,text_size:24,color:16777215,click_func:function(){ge(14)}}),X.createWidget(hmUI.widget.BUTTON,{x:40,y:200,w:120,h:40,press_color:3289650,normal_color:5723991,text:"怪兽图鉴",radius:10,text_size:24,color:16777215,click_func:function(){se("后续开放")}}),X.createWidget(hmUI.widget.BUTTON,{x:40,y:250,w:120,h:40,press_color:3289650,normal_color:5723991,text:"重置游戏",radius:10,text_size:24,color:16777215,click_func:function(){ie?(t.reset(),F=_,O(t.getItemCount(e.FLOOR)),G.setProperty(hmUI.prop.VISIBLE,!0),X.setProperty(hmUI.prop.VISIBLE,!1),R.setProperty(hmUI.prop.VISIBLE,!1),W.setProperty(hmUI.prop.VISIBLE,!1),Y.setProperty(hmUI.prop.VISIBLE,!1)):(ie=!0,se("再次点击确认重置"))}}),X.createWidget(hmUI.widget.TEXT,{x:10,y:300,w:172,h:120,text:"@米坛GiveMeFive\n上下楼层时会自动保存进度,操作方式同2048",text_size:20,color:13421772,text_style:hmUI.text_style.WRAP}),X.createWidget(hmUI.widget.BUTTON,{x:56,y:440,w:80,h:40,press_color:3289650,normal_color:5723991,text:"关闭",radius:20,text_size:24,color:16777215,click_func:function(){G.setProperty(hmUI.prop.VISIBLE,!0),X.setProperty(hmUI.prop.VISIBLE,!1)}}),X.setProperty(hmUI.prop.VISIBLE,!1)}(),t.load(),P=new o,v=new w,t.load(),O(t.getItemCount(e.FLOOR)),t.resetAllAttrUI()},onInit(){u.log("page onInit invoked")},onDestroy(){u.log("page onDestroy invoked")}})})()}catch(e){console.log(e)}
謝謝阿
 

*这是一则由 Google AdSense 自动推荐的广告,与本站无关,不对其真实性与可靠性负责