1 line
1.9 KiB
JavaScript
1 line
1.9 KiB
JavaScript
function data(){}data.prototype.init=function(){this.firstData={title:"魔塔样板",name:"template",version:"Ver 1.0.0 (Beta)",floorId:"sample0",hero:{id:"hero1",name:"勇士",hp:1000,atk:100,def:100,mdef:100,money:100,experience:1000,items:{keys:{yellowKey:0,blueKey:0,redKey:0},constants:{},tools:{}},flyRange:[],loc:{direction:"up",x:6,y:10},flags:{poison:false,weak:false,curse:false,}},startText:["Hi,欢迎来到 HTML5 魔塔样板!\n\n本样板由艾之葵制作,可以让你在不会写任何代码\n的情况下也能做出属于自己的H5魔塔!","这里游戏开始时的剧情。\n定义在data.js的startText处。\n\n你可以在这里写上自己的内容。","赶快来试一试吧!"],shops:{moneyShop1:{name:"贪婪之神",icon:"blueShop",textInList:"3楼金币商店",use:"money",need:"20+10*times*(times+1)",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"}]},expShop1:{name:"经验之神",icon:"pinkShop",textInList:"5楼经验商店",use:"experience",need:"-1",choices:[{text:"等级+1",need:"100",effect:"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"},]}},};this.values={HPMAX:999999,lavaDamage:100,poisonDamage:10,weakValue:20,cannotUseQuickShop:["MT0"],redJewel:3,blueJewel:3,greenJewel:5,redPotion:100,bluePotion:250,yellowPotion:500,greenPotion:800,sword1:10,shield1:10,sword2:20,shield2:20,sword3:40,shield3:40,sword4:80,shield4:80,sword5:160,shield5:160,moneyPocket:500,animateSpeed:500,};this.flags={enableMDef:false,enableExperience:true,flyNearStair:true,bombTrigger:true,pickaxeFourDirections:true,bigKeyIsBox:false,portalWithoutTrigger:true,potionWhileRouting:false,}};data.prototype.getFirstData=function(){return core.clone(this.firstData)};main.instance.data=new data(); |