clear status bar
This commit is contained in:
parent
841e56ee21
commit
543f86642b
1
libs/actions.min.js
vendored
1
libs/actions.min.js
vendored
File diff suppressed because one or more lines are too long
5533
libs/control.js
5533
libs/control.js
File diff suppressed because it is too large
Load Diff
1
libs/control.min.js
vendored
1
libs/control.min.js
vendored
File diff suppressed because one or more lines are too long
1
libs/data.min.js
vendored
1
libs/data.min.js
vendored
@ -1 +0,0 @@
|
||||
function data(){this.init()}data.prototype.init=function(){this.firstData=data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.firstData;this.values=data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.values;this.flags=data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.flags};data.prototype.getFirstData=function(){return core.clone(this.firstData)};
|
||||
1
libs/enemys.min.js
vendored
1
libs/enemys.min.js
vendored
File diff suppressed because one or more lines are too long
1
libs/events.min.js
vendored
1
libs/events.min.js
vendored
File diff suppressed because one or more lines are too long
1
libs/icons.min.js
vendored
1
libs/icons.min.js
vendored
@ -1 +0,0 @@
|
||||
function icons(){this.init()}icons.prototype.init=function(){this.icons=icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1};icons.prototype.getIcons=function(){return this.icons};
|
||||
1
libs/items.min.js
vendored
1
libs/items.min.js
vendored
@ -1 +0,0 @@
|
||||
function items(){this.init()}items.prototype.init=function(){this.items=items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a.items;this.itemEffect=items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a.itemEffect;this.itemEffectTip=items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a.itemEffectTip;this.useItemEffect=items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a.useItemEffect;this.canUseItemEffect=items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a.canUseItemEffect};items.prototype.getItems=function(){return this.items};items.prototype.getItemEffect=function(itemId,itemNum){var itemCls=core.material.items[itemId].cls;if(itemCls==="items"){var ratio=parseInt(core.floors[core.status.floorId].item_ratio)||1;var curr_hp=core.status.hero.hp;if(itemId in this.itemEffect){eval(this.itemEffect[itemId])}core.status.hero.statistics.hp+=core.status.hero.hp-curr_hp}else{core.addItem(itemId,itemNum)}};items.prototype.getItemEffectTip=function(itemId){var itemCls=core.material.items[itemId].cls;if(itemCls==="items"){var ratio=parseInt(core.floors[core.status.floorId].item_ratio)||1;if(itemId in this.itemEffectTip){return eval(this.itemEffectTip[itemId])||""}}return""};items.prototype.useItem=function(itemId,callback){if(!this.canUseItem(itemId)){if(core.isset(callback)){callback()}return}var itemCls=core.material.items[itemId].cls;if(itemId in this.useItemEffect){eval(this.useItemEffect[itemId])}core.updateStatusBar();if(itemId!="book"&&itemId!="fly"){core.status.route.push("item:"+itemId)}if(itemCls=="tools"){core.status.hero.items[itemCls][itemId]--}if(core.status.hero.items[itemCls][itemId]==0){delete core.status.hero.items[itemCls][itemId]}if(core.isset(callback)){callback()}};items.prototype.canUseItem=function(itemId){if(!core.hasItem(itemId)){return false}if(itemId in this.canUseItemEffect){return eval(this.canUseItemEffect[itemId])}return false};items.prototype.itemCount=function(b){if(!core.isset(b)||!core.isset(core.material.items[b])){return 0}var a=core.material.items[b].cls;if(a=="items"){return 0}return core.isset(core.status.hero.items[a][b])?core.status.hero.items[a][b]:0};items.prototype.hasItem=function(a){return core.itemCount(a)>0};items.prototype.setItem=function(b,c){var a=core.material.items[b].cls;if(a=="items"){return}if(!core.isset(core.status.hero.items[a])){core.status.hero.items[a]={}}core.status.hero.items[a][b]=c;if(a!="keys"&&c==0){delete core.status.hero.items[a][b]}};items.prototype.removeItem=function(b){if(!core.hasItem(b)){return false}var a=core.material.items[b].cls;core.status.hero.items[a][b]--;if(a!="keys"&&core.status.hero.items[a][b]==0){delete core.status.hero.items[a][b]}core.updateStatusBar();return true};items.prototype.addItem=function(c,d){var b=core.material.items[c];var a=b.cls;if(a=="items"){return}if(!core.isset(core.status.hero.items[a])){core.status.hero.items[a]={};core.status.hero.items[a][c]=0}else{if(!core.isset(core.status.hero.items[a][c])){core.status.hero.items[a][c]=0}}core.status.hero.items[a][c]+=d};
|
||||
1
libs/loader.min.js
vendored
1
libs/loader.min.js
vendored
@ -1 +0,0 @@
|
||||
function loader(){this.init()}loader.prototype.init=function(){};loader.prototype.setStartProgressVal=function(a){core.dom.startTopProgress.style.width=a+"%"};loader.prototype.setStartLoadTipText=function(a){core.dom.startTopLoadTips.innerHTML=a};loader.prototype.load=function(a){core.loader.loadIcons();core.loader.loadImages(core.materials,core.material.images,function(){core.material.images.images={};var b=core.clone(core.images);if(b.indexOf("hero.png")<0){b.push("hero.png")}core.loader.loadImages(b,core.material.images.images,function(){core.material.images.autotile={};core.loader.loadImages(Object.keys(core.material.icons.autotile),core.material.images.autotile,function(){core.loader.loadAnimates();core.loader.loadMusic();if(core.isset(a)){a()}})})})};loader.prototype.loadIcons=function(){this.loadImage("icons.png",function(a,b){var c=core.cropImage(b);for(var d in core.statusBar.icons){if(typeof core.statusBar.icons[d]=="number"){core.statusBar.icons[d]=c[core.statusBar.icons[d]];if(core.isset(core.statusBar.image[d])){core.statusBar.image[d].src=core.statusBar.icons[d].src}}}})};loader.prototype.loadImages=function(d,f,a){if(d.length==0){if(core.isset(a)){a()}return}var c=0;for(var b=0;b<d.length;b++){this.loadImage(d[b],function(g,h){core.loader.setStartLoadTipText("正在加载图片 "+g+"...");f[g]=h;c++;core.loader.setStartProgressVal(c*(100/d.length));if(c==d.length){if(core.isset(a)){a()}}})}};loader.prototype.loadImage=function(d,a){try{var f=d;if(f.indexOf(".")<0){f=f+".png"}var c=new Image();c.src="project/images/"+f+"?v="+main.version;if(c.complete){a(d,c);return}c.onload=function(){a(d,c)}}catch(b){console.log(b)}};loader.prototype.loadAnimates=function(){core.animates.forEach(function(a){core.http("GET","project/animates/"+a+".animate",null,function(b){try{b=JSON.parse(b);var c={};c.ratio=b.ratio;c.images=[];c.images_rev=[];b.bitmaps.forEach(function(h){if(!core.isset(h)||h==""){c.images.push(null)}else{try{var g=new Image();g.src=h;c.images.push(g)}catch(f){c.images.push(null)}}});c.frame=b.frame_max;c.frames=[];b.frames.forEach(function(g){var f=[];g.forEach(function(h){f.push({index:h[0],x:h[1],y:h[2],zoom:h[3],opacity:h[4],mirror:h[5]||0,angle:h[6]||0,})});c.frames.push(f)});core.material.animates[a]=c}catch(d){console.log(d);core.material.animates[a]=null}},function(b){console.log(b);core.material.animates[a]=null},"text/plain; charset=x-user-defined")})};loader.prototype.loadMusic=function(){core.bgms.forEach(function(b){if(/^.*\.mid$/i.test(b)){if(core.musicStatus.audioContext!=null){core.material.bgms[b]="loading";core.http("GET","project/sounds/"+b,null,function(c){try{var f=[];var g=c.length;for(var i=0;i<g;i++){f[i]=String.fromCharCode(c.charCodeAt(i)&255)}var h=core.material.bgms[b]=="starting";core.material.bgms[b]=AudioPlayer(core.musicStatus.audioContext,Replayer(MidiFile(f.join("")),Synth(44100)),true);if(h){core.playBgm(b)}}catch(d){console.log(d);core.material.bgms[b]=null}},function(c){console.log(c);core.material.bgms[b]=null},"text/plain; charset=x-user-defined")}else{core.material.bgms[b]=null}}else{var a=new Audio();a.preload="none";if(main.bgmRemote){a.src=main.bgmRemoteRoot+core.firstData.name+"/"+b}else{a.src="project/sounds/"+b}a.loop="loop";core.material.bgms[b]=a}});core.sounds.forEach(function(b){if(core.musicStatus.audioContext!=null){core.http("GET","project/sounds/"+b,null,function(c){try{core.musicStatus.audioContext.decodeAudioData(c,function(f){core.material.sounds[b]=f},function(f){console.log(f);core.material.sounds[b]=null})}catch(d){console.log(d);core.material.sounds[b]=null}},function(){console.log(e);core.material.sounds[b]=null},null,"arraybuffer")}else{var a=new Audio();a.src="project/sounds/"+b;core.material.sounds[b]=a}});if(core.musicStatus.startDirectly&&core.bgms.length>0){core.playBgm(core.bgms[0])}};
|
||||
1
libs/maps.min.js
vendored
1
libs/maps.min.js
vendored
File diff suppressed because one or more lines are too long
1
libs/ui.min.js
vendored
1
libs/ui.min.js
vendored
File diff suppressed because one or more lines are too long
1
libs/utils.min.js
vendored
1
libs/utils.min.js
vendored
File diff suppressed because one or more lines are too long
334
project/data.js
334
project/data.js
@ -1,168 +1,168 @@
|
||||
data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
{
|
||||
"main" : {
|
||||
"floorIds" : [
|
||||
"sample0", "sample1", "sample2", "MT0"
|
||||
],
|
||||
"images" : [
|
||||
"bg.jpg"
|
||||
],
|
||||
"animates" : [
|
||||
"hand", "sword", "zone",
|
||||
],
|
||||
"bgms" : [
|
||||
'bgm.mp3'
|
||||
],
|
||||
"sounds" : [
|
||||
'floor.mp3', 'attack.mp3', 'door.mp3', 'item.mp3', 'zone.mp3'
|
||||
],
|
||||
"startBackground" : "bg.jpg",
|
||||
"startLogoStyle" : "color: black",
|
||||
"levelChoose" : [["简单","Easy"],["普通","Normal"],["困难","Hard"],["噩梦","Hell"]],
|
||||
"statusLeftBackground": "url(project/images/ground.png) repeat",
|
||||
"statusTopBackground": "url(project/images/ground.png) repeat",
|
||||
"toolsBackground": "url(project/images/ground.png) repeat"
|
||||
},
|
||||
"firstData" : {
|
||||
"title": "魔塔样板",
|
||||
"name": "template",
|
||||
"version": "Ver 2.2",
|
||||
"floorId": "sample0",
|
||||
"hero": {
|
||||
"name": "阳光",
|
||||
'lv': 1,
|
||||
"hpmax": 9999,
|
||||
"hp": 1000,
|
||||
"atk": 100,
|
||||
"def": 100,
|
||||
"mdef": 100,
|
||||
"money": 100,
|
||||
"experience": 0,
|
||||
"items": {
|
||||
"keys": {
|
||||
"yellowKey": 0,
|
||||
"blueKey": 0,
|
||||
"redKey": 0
|
||||
},
|
||||
"constants": {},
|
||||
"tools": {}
|
||||
},
|
||||
"flyRange": [],
|
||||
"loc": {"direction": "up", "x": 6, "y": 10},
|
||||
"flags": {},
|
||||
"steps": 0,
|
||||
},
|
||||
"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": 20, "name": "第二级", "effect": "status:hp+=2*(status:atk+status:def);status:atk+=10;status:def+=10"},
|
||||
{"need": 40, "effect": function () {
|
||||
core.insertAction("恭喜升级!");
|
||||
core.status.hero.hp *= 2;
|
||||
core.status.hero.atk += 100;
|
||||
core.status.hero.def += 100;
|
||||
}},
|
||||
]
|
||||
},
|
||||
|
||||
"values" : {
|
||||
"lavaDamage": 100,
|
||||
"poisonDamage": 10,
|
||||
"weakValue": 20,
|
||||
"redJewel": 3,
|
||||
"blueJewel": 3,
|
||||
"greenJewel": 5,
|
||||
"redPotion": 100,
|
||||
"bluePotion": 250,
|
||||
"yellowPotion": 500,
|
||||
"greenPotion": 800,
|
||||
"sword0": 0,
|
||||
"shield0": 0,
|
||||
"sword1": 10,
|
||||
"shield1": 10,
|
||||
"sword2": 20,
|
||||
"shield2": 20,
|
||||
"sword3": 40,
|
||||
"shield3": 40,
|
||||
"sword4": 80,
|
||||
"shield4": 80,
|
||||
"sword5": 160,
|
||||
"shield5": 160,
|
||||
"moneyPocket": 500,
|
||||
'breakArmor': 0.9,
|
||||
'counterAttack': 0.1,
|
||||
'purify': 3,
|
||||
'hatred': 2,
|
||||
'maxValidHp': null,
|
||||
'animateSpeed': 300,
|
||||
},
|
||||
|
||||
"flags" : {
|
||||
"enableFloor": true,
|
||||
"enableLv": false,
|
||||
"enableHPMax": false,
|
||||
"enableMDef": true,
|
||||
"enableMoney": true,
|
||||
"enableExperience": false,
|
||||
"enableLevelUp": false,
|
||||
"enableKeys": true,
|
||||
"enableDebuff": false,
|
||||
"flyNearStair": true,
|
||||
"pickaxeFourDirections": false,
|
||||
"bombFourDirections": false,
|
||||
"bigKeyIsBox": false,
|
||||
"equipment": false,
|
||||
"enableDeleteItem": true,
|
||||
"enableAddPoint": false,
|
||||
"enableNegativeDamage": false,
|
||||
"hatredDecrease": true,
|
||||
"betweenAttackCeil": false,
|
||||
"startDirectly": false,
|
||||
"canOpenBattleAnimate": true,
|
||||
"showBattleAnimateConfirm": true,
|
||||
"battleAnimate": true,
|
||||
"displayEnemyDamage": true,
|
||||
"displayCritical": true,
|
||||
"displayExtraDamage": true,
|
||||
"enableGentleClick": true,
|
||||
"potionWhileRouting": false,
|
||||
"enableViewMaps": true,
|
||||
"portalWithoutTrigger": true,
|
||||
"enableMoveDirectly": true,
|
||||
}
|
||||
data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
{
|
||||
"main" : {
|
||||
"floorIds" : [
|
||||
"sample0", "sample1", "sample2", "MT0"
|
||||
],
|
||||
"images" : [
|
||||
"bg.jpg"
|
||||
],
|
||||
"animates" : [
|
||||
"hand", "sword", "zone",
|
||||
],
|
||||
"bgms" : [
|
||||
'bgm.mp3'
|
||||
],
|
||||
"sounds" : [
|
||||
'floor.mp3', 'attack.mp3', 'door.mp3', 'item.mp3', 'zone.mp3'
|
||||
],
|
||||
"startBackground" : "bg.jpg",
|
||||
"startLogoStyle" : "color: black",
|
||||
"levelChoose" : [["简单","Easy"],["普通","Normal"],["困难","Hard"],["噩梦","Hell"]],
|
||||
"statusLeftBackground": "url(project/images/ground.png) repeat",
|
||||
"statusTopBackground": "url(project/images/ground.png) repeat",
|
||||
"toolsBackground": "url(project/images/ground.png) repeat"
|
||||
},
|
||||
"firstData" : {
|
||||
"title": "魔塔样板",
|
||||
"name": "template",
|
||||
"version": "Ver 2.3",
|
||||
"floorId": "sample0",
|
||||
"hero": {
|
||||
"name": "阳光",
|
||||
'lv': 1,
|
||||
"hpmax": 9999,
|
||||
"hp": 1000,
|
||||
"atk": 100,
|
||||
"def": 100,
|
||||
"mdef": 100,
|
||||
"money": 100,
|
||||
"experience": 0,
|
||||
"items": {
|
||||
"keys": {
|
||||
"yellowKey": 0,
|
||||
"blueKey": 0,
|
||||
"redKey": 0
|
||||
},
|
||||
"constants": {},
|
||||
"tools": {}
|
||||
},
|
||||
"flyRange": [],
|
||||
"loc": {"direction": "up", "x": 6, "y": 10},
|
||||
"flags": {},
|
||||
"steps": 0,
|
||||
},
|
||||
"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": 20, "name": "第二级", "effect": "status:hp+=2*(status:atk+status:def);status:atk+=10;status:def+=10"},
|
||||
{"need": 40, "effect": function () {
|
||||
core.insertAction("恭喜升级!");
|
||||
core.status.hero.hp *= 2;
|
||||
core.status.hero.atk += 100;
|
||||
core.status.hero.def += 100;
|
||||
}},
|
||||
]
|
||||
},
|
||||
|
||||
"values" : {
|
||||
"lavaDamage": 100,
|
||||
"poisonDamage": 10,
|
||||
"weakValue": 20,
|
||||
"redJewel": 3,
|
||||
"blueJewel": 3,
|
||||
"greenJewel": 5,
|
||||
"redPotion": 100,
|
||||
"bluePotion": 250,
|
||||
"yellowPotion": 500,
|
||||
"greenPotion": 800,
|
||||
"sword0": 0,
|
||||
"shield0": 0,
|
||||
"sword1": 10,
|
||||
"shield1": 10,
|
||||
"sword2": 20,
|
||||
"shield2": 20,
|
||||
"sword3": 40,
|
||||
"shield3": 40,
|
||||
"sword4": 80,
|
||||
"shield4": 80,
|
||||
"sword5": 160,
|
||||
"shield5": 160,
|
||||
"moneyPocket": 500,
|
||||
'breakArmor': 0.9,
|
||||
'counterAttack': 0.1,
|
||||
'purify': 3,
|
||||
'hatred': 2,
|
||||
'maxValidHp': null,
|
||||
'animateSpeed': 300,
|
||||
},
|
||||
|
||||
"flags" : {
|
||||
"enableFloor": true,
|
||||
"enableLv": false,
|
||||
"enableHPMax": false,
|
||||
"enableMDef": true,
|
||||
"enableMoney": true,
|
||||
"enableExperience": false,
|
||||
"enableLevelUp": false,
|
||||
"enableKeys": true,
|
||||
"enableDebuff": false,
|
||||
"flyNearStair": true,
|
||||
"pickaxeFourDirections": false,
|
||||
"bombFourDirections": false,
|
||||
"bigKeyIsBox": false,
|
||||
"equipment": false,
|
||||
"enableDeleteItem": true,
|
||||
"enableAddPoint": false,
|
||||
"enableNegativeDamage": false,
|
||||
"hatredDecrease": true,
|
||||
"betweenAttackCeil": false,
|
||||
"startDirectly": false,
|
||||
"canOpenBattleAnimate": true,
|
||||
"showBattleAnimateConfirm": true,
|
||||
"battleAnimate": true,
|
||||
"displayEnemyDamage": true,
|
||||
"displayCritical": true,
|
||||
"displayExtraDamage": true,
|
||||
"enableGentleClick": true,
|
||||
"potionWhileRouting": false,
|
||||
"enableViewMaps": true,
|
||||
"portalWithoutTrigger": true,
|
||||
"enableMoveDirectly": true,
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user