状态栏!
@ -32,12 +32,51 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
|||||||
],
|
],
|
||||||
"floorPartitions": [],
|
"floorPartitions": [],
|
||||||
"images": [
|
"images": [
|
||||||
|
"0.png",
|
||||||
"1.jpg",
|
"1.jpg",
|
||||||
|
"1.png",
|
||||||
|
"2.png",
|
||||||
|
"3.png",
|
||||||
|
"4.png",
|
||||||
|
"5.png",
|
||||||
|
"6.png",
|
||||||
|
"7.png",
|
||||||
|
"8.png",
|
||||||
|
"9.png",
|
||||||
|
"Actor05-Strange05.png",
|
||||||
|
"Star.png",
|
||||||
|
"a.png",
|
||||||
|
"atk.png",
|
||||||
|
"atk2.png",
|
||||||
|
"b.png",
|
||||||
|
"backg.png",
|
||||||
|
"backl.png",
|
||||||
|
"backl2.png",
|
||||||
|
"backw.png",
|
||||||
"bear.png",
|
"bear.png",
|
||||||
"bg.jpg",
|
"bg.jpg",
|
||||||
|
"box1.png",
|
||||||
|
"box1Light.png",
|
||||||
|
"box2.png",
|
||||||
|
"box2Light.png",
|
||||||
|
"boxLight.png",
|
||||||
"brave.png",
|
"brave.png",
|
||||||
|
"c.png",
|
||||||
|
"def.png",
|
||||||
|
"def2.png",
|
||||||
"dragon.png",
|
"dragon.png",
|
||||||
|
"exp.png",
|
||||||
|
"expL.png",
|
||||||
|
"expLt.png",
|
||||||
"hero.png",
|
"hero.png",
|
||||||
|
"hp.png",
|
||||||
|
"key.png",
|
||||||
|
"lv.png",
|
||||||
|
"mana.png",
|
||||||
|
"manaL.png",
|
||||||
|
"manaLt.png",
|
||||||
|
"mdef.png",
|
||||||
|
"money.png",
|
||||||
"shengzi.png",
|
"shengzi.png",
|
||||||
"winskin.png"
|
"winskin.png"
|
||||||
],
|
],
|
||||||
@ -726,6 +765,10 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"startText": [
|
"startText": [
|
||||||
|
{
|
||||||
|
"type": "function",
|
||||||
|
"function": "function(){\nflags._statusgry_ = 0;\ncore.createSpr0();\ncore.createSprBack();\n}"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "comment",
|
"type": "comment",
|
||||||
"text": "初始剧情"
|
"text": "初始剧情"
|
||||||
|
@ -1284,88 +1284,88 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"updateStatusBar": function () {
|
"updateStatusBar": function () {
|
||||||
// 更新状态栏
|
// 更新状态栏
|
||||||
|
|
||||||
// 检查等级
|
// 检查等级
|
||||||
core.events.checkLvUp();
|
core.events.checkLvUp();
|
||||||
|
|
||||||
// 检查HP上限
|
// 检查HP上限
|
||||||
if (core.flags.statusBarItems.indexOf('enableHPMax') >= 0) {
|
if (core.flags.statusBarItems.indexOf('enableHPMax') >= 0) {
|
||||||
core.setStatus('hp', Math.min(core.getRealStatus('hpmax'), core.getStatus('hp')));
|
core.setStatus('hp', Math.min(core.getRealStatus('hpmax'), core.getStatus('hp')));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置楼层名
|
// 设置楼层名
|
||||||
if (core.status.floorId) {
|
if (core.status.floorId) {
|
||||||
core.setStatusBarInnerHTML('floor', core.status.maps[core.status.floorId].name);
|
core.setStatusBarInnerHTML('floor', core.status.maps[core.status.floorId].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置勇士名字和图标
|
// 设置勇士名字和图标
|
||||||
core.setStatusBarInnerHTML('name', core.getStatus('name'));
|
core.setStatusBarInnerHTML('name', core.getStatus('name'));
|
||||||
// 设置等级名称
|
// 设置等级名称
|
||||||
core.setStatusBarInnerHTML('lv', core.getLvName());
|
core.setStatusBarInnerHTML('lv', core.getLvName());
|
||||||
|
|
||||||
// 设置生命上限、生命值、攻防护盾金币和经验值
|
// 设置生命上限、生命值、攻防护盾金币和经验值
|
||||||
var statusList = ['hpmax', 'hp', 'mana', 'atk', 'def', 'mdef', 'money', 'exp'];
|
var statusList = ['hpmax', 'hp', 'mana', 'atk', 'def', 'mdef', 'money', 'exp'];
|
||||||
statusList.forEach(function (item) {
|
statusList.forEach(function (item) {
|
||||||
// 向下取整
|
// 向下取整
|
||||||
core.status.hero[item] = Math.floor(core.status.hero[item]);
|
core.status.hero[item] = Math.floor(core.status.hero[item]);
|
||||||
// 大数据格式化
|
// 大数据格式化
|
||||||
core.setStatusBarInnerHTML(item, core.getRealStatus(item));
|
core.setStatusBarInnerHTML(item, core.getRealStatus(item));
|
||||||
});
|
});
|
||||||
|
|
||||||
// 设置魔力值; status:manamax 只有在非负时才生效。
|
// 设置魔力值; status:manamax 只有在非负时才生效。
|
||||||
if (core.status.hero.manamax != null && core.getRealStatus('manamax') >= 0) {
|
if (core.status.hero.manamax != null && core.getRealStatus('manamax') >= 0) {
|
||||||
core.status.hero.mana = Math.min(core.status.hero.mana, core.getRealStatus('manamax'));
|
core.status.hero.mana = Math.min(core.status.hero.mana, core.getRealStatus('manamax'));
|
||||||
core.setStatusBarInnerHTML('mana', core.status.hero.mana + "/" + core.getRealStatus('manamax'));
|
core.setStatusBarInnerHTML('mana', core.status.hero.mana + "/" + core.getRealStatus('manamax'));
|
||||||
} else {
|
} else {
|
||||||
core.setStatusBarInnerHTML("mana", core.status.hero.mana);
|
core.setStatusBarInnerHTML("mana", core.status.hero.mana);
|
||||||
}
|
}
|
||||||
// 设置技能栏
|
// 设置技能栏
|
||||||
// 可以用flag:skill表示当前开启的技能类型,flag:skillName显示技能名;详见文档-个性化-技能塔的支持
|
// 可以用flag:skill表示当前开启的技能类型,flag:skillName显示技能名;详见文档-个性化-技能塔的支持
|
||||||
core.setStatusBarInnerHTML('skill', core.getFlag('skillName', '无'));
|
core.setStatusBarInnerHTML('skill', core.getFlag('skillName', '无'));
|
||||||
|
|
||||||
// 可以在这里添加自己额外的状态栏信息,比如想攻击显示 +0.5 可以这么写:
|
// 可以在这里添加自己额外的状态栏信息,比如想攻击显示 +0.5 可以这么写:
|
||||||
// if (core.hasFlag('halfAtk')) core.setStatusBarInnerHTML('atk', core.statusBar.atk.innerText + "+0.5");
|
// if (core.hasFlag('halfAtk')) core.setStatusBarInnerHTML('atk', core.statusBar.atk.innerText + "+0.5");
|
||||||
|
|
||||||
// 如果是自定义添加的状态栏,也需要在这里进行设置显示的数值
|
// 如果是自定义添加的状态栏,也需要在这里进行设置显示的数值
|
||||||
|
|
||||||
// 进阶
|
// 进阶
|
||||||
if (core.flags.statusBarItems.indexOf('enableLevelUp') >= 0) {
|
if (core.flags.statusBarItems.indexOf('enableLevelUp') >= 0) {
|
||||||
core.setStatusBarInnerHTML('up', core.formatBigNumber(core.getNextLvUpNeed()) || "");
|
core.setStatusBarInnerHTML('up', core.formatBigNumber(core.getNextLvUpNeed()) || "");
|
||||||
} else core.setStatusBarInnerHTML('up', "");
|
} else core.setStatusBarInnerHTML('up', "");
|
||||||
|
|
||||||
// 钥匙
|
// 钥匙
|
||||||
var keys = ['yellowKey', 'blueKey', 'redKey', 'greenKey'];
|
var keys = ['yellowKey', 'blueKey', 'redKey', 'greenKey'];
|
||||||
keys.forEach(function (key) {
|
keys.forEach(function (key) {
|
||||||
core.setStatusBarInnerHTML(key, core.setTwoDigits(core.itemCount(key)));
|
core.setStatusBarInnerHTML(key, core.setTwoDigits(core.itemCount(key)));
|
||||||
});
|
});
|
||||||
// 毒衰咒
|
// 毒衰咒
|
||||||
core.setStatusBarInnerHTML('poison', core.hasFlag('poison') ? "毒" : "");
|
core.setStatusBarInnerHTML('poison', core.hasFlag('poison') ? "毒" : "");
|
||||||
core.setStatusBarInnerHTML('weak', core.hasFlag('weak') ? "衰" : "");
|
core.setStatusBarInnerHTML('weak', core.hasFlag('weak') ? "衰" : "");
|
||||||
core.setStatusBarInnerHTML('curse', core.hasFlag('curse') ? "咒" : "");
|
core.setStatusBarInnerHTML('curse', core.hasFlag('curse') ? "咒" : "");
|
||||||
// 破炸飞
|
// 破炸飞
|
||||||
core.setStatusBarInnerHTML('pickaxe', "破" + core.itemCount('pickaxe'));
|
core.setStatusBarInnerHTML('pickaxe', "破" + core.itemCount('pickaxe'));
|
||||||
core.setStatusBarInnerHTML('bomb', "炸" + core.itemCount('bomb'));
|
core.setStatusBarInnerHTML('bomb', "炸" + core.itemCount('bomb'));
|
||||||
core.setStatusBarInnerHTML('fly', "飞" + core.itemCount('centerFly'));
|
core.setStatusBarInnerHTML('fly', "飞" + core.itemCount('centerFly'));
|
||||||
|
|
||||||
// 难度
|
// 难度
|
||||||
if (core.statusBar.hard.innerText != core.status.hard) {
|
if (core.statusBar.hard.innerText != core.status.hard) {
|
||||||
core.statusBar.hard.innerText = core.status.hard;
|
core.statusBar.hard.innerText = core.status.hard;
|
||||||
}
|
}
|
||||||
var hardColor = core.getFlag('__hardColor__');
|
var hardColor = core.getFlag('__hardColor__');
|
||||||
if (hardColor == null) core.statusBar.hard.innerText = '';
|
if (hardColor == null) core.statusBar.hard.innerText = '';
|
||||||
if (core.statusBar.hard.getAttribute('_style') != hardColor) {
|
if (core.statusBar.hard.getAttribute('_style') != hardColor) {
|
||||||
core.statusBar.hard.style.color = hardColor;
|
core.statusBar.hard.style.color = hardColor;
|
||||||
core.statusBar.hard.setAttribute('_style', hardColor);
|
core.statusBar.hard.setAttribute('_style', hardColor);
|
||||||
}
|
}
|
||||||
// 自定义状态栏绘制
|
// 自定义状态栏绘制
|
||||||
core.drawStatusBar();
|
core.drawStatusBar();
|
||||||
|
core.createSpr2();
|
||||||
// 更新阻激夹域的伤害值
|
// 更新阻激夹域的伤害值
|
||||||
core.updateCheckBlock();
|
core.updateCheckBlock();
|
||||||
// updateDamage只能在此处执行!!更新全地图显伤
|
// updateDamage只能在此处执行!!更新全地图显伤
|
||||||
core.updateDamage();
|
core.updateDamage();
|
||||||
},
|
},
|
||||||
"updateCheckBlock": function (floorId) {
|
"updateCheckBlock": function (floorId) {
|
||||||
// 领域、夹击、阻击等的伤害值计算
|
// 领域、夹击、阻击等的伤害值计算
|
||||||
floorId = floorId || core.status.floorId;
|
floorId = floorId || core.status.floorId;
|
||||||
@ -1680,22 +1680,27 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
"parallelDo": function (timestamp) {
|
"parallelDo": function (timestamp) {
|
||||||
// 并行事件处理,可以在这里写任何需要并行处理的脚本或事件
|
// 并行事件处理,可以在这里写任何需要并行处理的脚本或事件
|
||||||
// 该函数将被系统反复执行,每次执行间隔视浏览器或设备性能而定,一般约为16.6ms一次
|
// 该函数将被系统反复执行,每次执行间隔视浏览器或设备性能而定,一般约为16.6ms一次
|
||||||
// 参数timestamp为“从游戏资源加载完毕到当前函数执行时”的时间差,以毫秒为单位
|
// 参数timestamp为“从游戏资源加载完毕到当前函数执行时”的时间差,以毫秒为单位
|
||||||
|
|
||||||
// 检查当前是否处于游戏开始状态
|
// 检查当前是否处于游戏开始状态
|
||||||
if (!core.isPlaying()) return;
|
if (!core.isPlaying()) return;
|
||||||
|
|
||||||
// 执行当前楼层的并行事件处理
|
// 执行当前楼层的并行事件处理
|
||||||
if (core.status.floorId) {
|
if (core.status.floorId) {
|
||||||
try {
|
try {
|
||||||
eval(core.floors[core.status.floorId].parallelDo);
|
eval(core.floors[core.status.floorId].parallelDo);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if ((!main.replayChecking && core.status.played) && flags._coltrue_) {
|
||||||
|
flags._statuscol_ = flags._statuscol_ + 5 || 0
|
||||||
|
core.createSpr0();
|
||||||
|
core.createSprBack();
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"ui": {
|
"ui": {
|
||||||
"getToolboxItems": function (cls) {
|
"getToolboxItems": function (cls) {
|
||||||
|
BIN
project/images/0.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 428 KiB After Width: | Height: | Size: 154 KiB |
BIN
project/images/1.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
project/images/2.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
project/images/3.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
project/images/4.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
project/images/5.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
project/images/6.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
project/images/7.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
project/images/8.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
project/images/9.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
project/images/Actor05-Strange05.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
project/images/Star.png
Normal file
After Width: | Height: | Size: 1.8 MiB |
BIN
project/images/a.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
project/images/atk.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
project/images/atk2.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
project/images/b.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
project/images/backg.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
project/images/backl.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
project/images/backl2.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
project/images/backw.png
Normal file
After Width: | Height: | Size: 2.3 MiB |
BIN
project/images/backw_.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
project/images/box1.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
project/images/box1Light.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
project/images/box2.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
project/images/box2Light.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
project/images/boxLight.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
project/images/c.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
project/images/def.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
project/images/def2.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
project/images/exp.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
project/images/expL.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
project/images/expLt.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
project/images/hp.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
project/images/key.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
project/images/lv.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
project/images/mana.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
project/images/manaL.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
project/images/manaLt.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
project/images/mdef.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
project/images/money.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 9.2 KiB |
BIN
project/images/未标题-1.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
1385
project/plugins.js
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 190 KiB |
@ -201,7 +201,7 @@
|
|||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
background: url(project/materials/ground.png) repeat;
|
background: url(project/materials/ground.png) repeat;
|
||||||
z-index: 185;
|
z-index: 1;
|
||||||
display: none;
|
display: none;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@ -238,7 +238,7 @@
|
|||||||
#toolBar {
|
#toolBar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background: url(project/materials/ground.png) repeat;
|
background: url(project/materials/ground.png) repeat;
|
||||||
z-index: 210;
|
z-index: 1;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
|