var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = { "main": { "floorIds": [ "sample0", "sample1", "sample2", "sample3", "MT0" ], "images": [ "bg.jpg", "winskin.png" ], "tilesets": [], "animates": [ "hand", "sword", "zone" ], "bgms": [ "bgm.mp3" ], "sounds": [ "floor.mp3", "attack.mp3", "door.mp3", "item.mp3", "equip.mp3", "zone.mp3", "jump.mp3", "pickaxe.mp3", "bomb.mp3", "centerFly.mp3" ], "startBackground": "bg.jpg", "startLogoStyle": "color: black", "levelChoose": [ [ "简单", "Easy" ], [ "普通", "Normal" ], [ "困难", "Hard" ], [ "噩梦", "Hell" ] ], "equipName": [ "武器", "盾牌" ], "startBgm": "bgm.mp3", "statusLeftBackground": "url(project/images/ground.png) repeat", "statusTopBackground": "url(project/images/ground.png) repeat", "toolsBackground": "url(project/images/ground.png) repeat", "borderColor": "white", "statusBarColor": "white", "hardLabelColor": "red", "floorChangingBackground": "black", "floorChangingTextColor": "white", "font": "Verdana" }, "firstData": { "title": "魔塔样板", "name": "template", "version": "Ver 2.5.5", "floorId": "sample0", "hero": { "name": "阳光", "lv": 1, "hpmax": 9999, "hp": 1000, "mana": 0, "atk": 100, "def": 100, "mdef": 0, "money": 0, "experience": 0, "equipment": [], "items": { "keys": { "yellowKey": 0, "blueKey": 0, "redKey": 0 }, "constants": {}, "tools": {}, "equips": {} }, "flyRange": [], "loc": { "direction": "up", "x": 6, "y": 10 }, "flags": {}, "steps": 0 }, "startCanvas": [ { "type": "comment", "text": "在这里可以用事件来自定义绘制标题界面的背景图等" }, { "type": "comment", "text": "也可以直接切换到其他楼层(比如某个开始剧情楼层)进行操作。" }, { "type": "showImage", "code": 1, "image": "bg.jpg", "loc": [ 0, 0 ], "dw": 100, "dh": 100, "opacity": 1, "time": 0 }, { "type": "while", "condition": "1", "data": [ { "type": "comment", "text": "给用户提供选择项,这里简单的使用了choices事件" }, { "type": "comment", "text": "也可以贴按钮图然后使用等待操作来完成" }, { "type": "choices", "choices": [ { "text": "开始游戏", "action": [ { "type": "comment", "text": "检查bgm状态,下同" }, { "type": "function", "function": "function(){\ncore.control.checkBgm()\n}" }, { "type": "if", "condition": "core.flags.startDirectly", "true": [ { "type": "comment", "text": "直接开始游戏,设置初始化数据" }, { "type": "function", "function": "function(){\ncore.events.setInitData('')\n}" } ], "false": [ { "type": "comment", "text": "动态生成难度选择项" }, { "type": "function", "function": "function(){\nvar choices = [];\nmain.levelChoose.forEach(function (one) {\n\tchoices.push({\"text\": one[0], \"action\": [\n\t\t{\"type\": \"function\", \"function\": \"function() { core.status.hard = '\"+one[1]+\"'; core.events.setInitData('\"+one[1]+\"'); }\"}\n\t]});\n})\ncore.insertAction({\"type\": \"choices\", \"choices\": choices});\n}" } ] }, { "type": "hideImage", "code": 1, "time": 0 }, { "type": "comment", "text": "成功选择难度" }, { "type": "break" } ] }, { "text": "读取存档", "action": [ { "type": "function", "function": "function(){\ncore.control.checkBgm()\n}" }, { "type": "comment", "text": "简单的使用“呼出读档界面”来处理" }, { "type": "callLoad" } ] }, { "text": "回放录像", "action": [ { "type": "function", "function": "function(){\ncore.control.checkBgm()\n}" }, { "type": "comment", "text": "这段代码会弹框选择录像文件" }, { "type": "if", "condition": "!core.isReplaying()", "true": [ { "type": "function", "function": "function(){\ncore.chooseReplayFile()\n}" } ], "false": [] } ] } ] } ] }, { "type": "comment", "text": "接下来会执行startText中的事件" } ], "startText": [ "Hi,欢迎来到 HTML5 魔塔样板!\n\n本样板由艾之葵制作,可以让你在不会写任何代码\n的情况下也能做出属于自己的H5魔塔!", "这里游戏开始时的剧情。\n定义在data.js的startText处。\n\n你可以在这里写上自己的内容。", "赶快来试一试吧!" ], "shops": [ { "id": "moneyShop1", "name": "贪婪之神", "icon": "blueShop", "textInList": "1F金币商店", "use": "money", "need": "20+10*times*(times+1)", "text": "勇敢的武士啊,给我${need}金币就可以:", "choices": [ { "text": "生命+800", "effect": "status:hp+=800" }, { "text": "攻击+4", "effect": "status:atk+=4" }, { "text": "防御+4", "effect": "status:def+=4" }, { "text": "魔防+10", "effect": "status:mdef+=10" } ] }, { "id": "expShop1", "name": "经验之神", "icon": "pinkShop", "textInList": "1F经验商店", "use": "experience", "need": "-1", "text": "勇敢的武士啊,给我若干经验就可以:", "choices": [ { "text": "等级+1", "need": "100", "effect": "status:lv+=1;status:hp+=1000;status:atk+=7;status:def+=7" }, { "text": "攻击+5", "need": "30", "effect": "status:atk+=5" }, { "text": "防御+5", "need": "30", "effect": "status:def+=5" } ] } ], "levelUp": [ { "need": "0", "title": "", "action": [ { "type": "comment", "text": "此处是初始等级,只需填写称号" } ] }, { "need": "20", "title": "第二级", "action": [ { "type": "setValue", "name": "status:atk", "value": "status:atk+10" }, { "type": "setValue", "name": "status:def", "value": "status:def+10" } ] }, { "need": "40", "title": "", "action": [ { "type": "tip", "text": "恭喜升级" } ] } ] }, "values": { "lavaDamage": 100, "poisonDamage": 10, "weakValue": 20, "redJewel": 3, "blueJewel": 3, "greenJewel": 5, "redPotion": 100, "bluePotion": 250, "yellowPotion": 500, "greenPotion": 800, "breakArmor": 0.9, "counterAttack": 0.1, "purify": 3, "hatred": 2, "moveSpeed": 100, "animateSpeed": 400, "floorChangeTime": 800 }, "flags": { "enableFloor": true, "enableName": false, "enableLv": false, "enableHPMax": false, "enableMana": false, "enableMDef": true, "enableMoney": true, "enableExperience": false, "enableLevelUp": false, "levelUpLeftMode": false, "enableKeys": true, "enablePZF": false, "enableDebuff": false, "enableSkill": false, "flyNearStair": true, "pickaxeFourDirections": false, "bombFourDirections": false, "snowFourDirections": false, "bigKeyIsBox": false, "equipment": false, "equipboxButton": false, "enableAddPoint": false, "enableNegativeDamage": false, "hatredDecrease": true, "betweenAttackCeil": false, "useLoop": false, "startUsingCanvas": false, "startDirectly": false, "statusCanvas": false, "statusCanvasRowsOnMobile": 3, "canOpenBattleAnimate": true, "showBattleAnimateConfirm": false, "battleAnimate": false, "displayEnemyDamage": true, "displayCritical": true, "displayExtraDamage": true, "enableGentleClick": true, "potionWhileRouting": false, "portalWithoutTrigger": true, "canGoDeadZone": false, "enableMoveDirectly": true, "enableDisabledShop": true, "disableShopOnDamage": false, "checkConsole": false } }