commit
7e158a2899
@ -333,6 +333,9 @@ core.prototype.init = function (coreData, callback) {
|
|||||||
core.material.ground.src = "project/images/ground.png";
|
core.material.ground.src = "project/images/ground.png";
|
||||||
|
|
||||||
core.animateFrame.weather.fog = new Image();
|
core.animateFrame.weather.fog = new Image();
|
||||||
|
core.animateFrame.weather.fog.onerror = function () {
|
||||||
|
core.animateFrame.weather.fog = null;
|
||||||
|
}
|
||||||
core.animateFrame.weather.fog.src = "project/images/fog.png";
|
core.animateFrame.weather.fog.src = "project/images/fog.png";
|
||||||
|
|
||||||
core.bigmap.tempCanvas = document.createElement('canvas').getContext('2d');
|
core.bigmap.tempCanvas = document.createElement('canvas').getContext('2d');
|
||||||
|
|||||||
@ -1884,13 +1884,14 @@ events.prototype.passNet = function (data) {
|
|||||||
if (data.event.id=='weakNet') { // 衰网
|
if (data.event.id=='weakNet') { // 衰网
|
||||||
if (core.hasFlag('weak')) return;
|
if (core.hasFlag('weak')) return;
|
||||||
core.setFlag('weak', true);
|
core.setFlag('weak', true);
|
||||||
var weakValue = core.values.weakValue;
|
if (core.values.weakValue>=1) { // >=1:直接扣数值
|
||||||
var weakAtk = weakValue>=1?weakValue:Math.floor(weakValue*core.status.hero.atk);
|
core.status.hero.atk -= core.values.weakValue;
|
||||||
var weakDef = weakValue>=1?weakValue:Math.floor(weakValue*core.status.hero.def);
|
core.status.hero.def -= core.values.weakValue;
|
||||||
core.setFlag('weakAtk', weakAtk);
|
}
|
||||||
core.setFlag('weakDef', weakDef);
|
else { // <1:扣比例
|
||||||
core.status.hero.atk-=weakAtk;
|
core.setFlag("equip_atk_buff", core.getFlag("equip_atk_buff", 1) - core.values.weakValue);
|
||||||
core.status.hero.def-=weakDef;
|
core.setFlag("equip_def_buff", core.getFlag("equip_def_buff", 1) - core.values.weakValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (data.event.id=='curseNet') { // 咒网
|
if (data.event.id=='curseNet') { // 咒网
|
||||||
if (core.hasFlag('curse')) return;
|
if (core.hasFlag('curse')) return;
|
||||||
|
|||||||
@ -106,14 +106,10 @@ loader.prototype.loadImage = function (imgName, callback) {
|
|||||||
if (name.indexOf(".")<0)
|
if (name.indexOf(".")<0)
|
||||||
name=name+".png";
|
name=name+".png";
|
||||||
var image = new Image();
|
var image = new Image();
|
||||||
image.src = 'project/images/' + name + "?v=" + main.version;
|
|
||||||
if (image.complete) {
|
|
||||||
callback(imgName, image);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
image.onload = function () {
|
image.onload = function () {
|
||||||
callback(imgName, image);
|
callback(imgName, image);
|
||||||
}
|
}
|
||||||
|
image.src = 'project/images/' + name + "?v=" + main.version;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
|||||||
@ -179,13 +179,14 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
// 衰弱
|
// 衰弱
|
||||||
if (core.enemys.hasSpecial(special, 13) && !core.hasFlag('weak')) {
|
if (core.enemys.hasSpecial(special, 13) && !core.hasFlag('weak')) {
|
||||||
core.setFlag('weak', true);
|
core.setFlag('weak', true);
|
||||||
var weakValue = core.values.weakValue;
|
if (core.values.weakValue>=1) { // >=1:直接扣数值
|
||||||
var weakAtk = weakValue>=1?weakValue:Math.floor(weakValue*core.status.hero.atk);
|
core.status.hero.atk -= core.values.weakValue;
|
||||||
var weakDef = weakValue>=1?weakValue:Math.floor(weakValue*core.status.hero.def);
|
core.status.hero.def -= core.values.weakValue;
|
||||||
core.setFlag('weakAtk', weakAtk);
|
}
|
||||||
core.setFlag('weakDef', weakDef);
|
else { // <1:扣比例
|
||||||
core.status.hero.atk-=weakAtk;
|
core.setFlag("equip_atk_buff", core.getFlag("equip_atk_buff", 1) - core.values.weakValue);
|
||||||
core.status.hero.def-=weakDef;
|
core.setFlag("equip_def_buff", core.getFlag("equip_def_buff", 1) - core.values.weakValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 诅咒
|
// 诅咒
|
||||||
if (core.enemys.hasSpecial(special, 14) && !core.hasFlag('curse')) {
|
if (core.enemys.hasSpecial(special, 14) && !core.hasFlag('curse')) {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||||
{
|
{
|
||||||
"items": {
|
"items": {
|
||||||
"yellowKey": {
|
"yellowKey": {
|
||||||
@ -301,7 +301,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "constants",
|
"cls": "constants",
|
||||||
"name": "技能:二倍斩",
|
"name": "技能:二倍斩",
|
||||||
"text": "可以打开或关闭主动技能二倍斩",
|
"text": "可以打开或关闭主动技能二倍斩",
|
||||||
"hideInReplay": true
|
"hideInReplay": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"itemEffect": {
|
"itemEffect": {
|
||||||
@ -368,9 +368,9 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"upFly": "var loc = {'direction': core.status.hero.loc.direction, 'x': core.status.event.data.x, 'y': core.status.event.data.y};\ncore.changeFloor(core.status.event.data.id, null, loc, null, function (){\n\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\tcore.replay();\n});",
|
"upFly": "var loc = {'direction': core.status.hero.loc.direction, 'x': core.status.event.data.x, 'y': core.status.event.data.y};\ncore.changeFloor(core.status.event.data.id, null, loc, null, function (){\n\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\tcore.replay();\n});",
|
||||||
"downFly": "var loc = {'direction': core.status.hero.loc.direction, 'x': core.status.event.data.x, 'y': core.status.event.data.y};\ncore.changeFloor(core.status.event.data.id, null, loc, null, function (){\n\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\tcore.replay();\n});",
|
"downFly": "var loc = {'direction': core.status.hero.loc.direction, 'x': core.status.event.data.x, 'y': core.status.event.data.y};\ncore.changeFloor(core.status.event.data.id, null, loc, null, function (){\n\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\tcore.replay();\n});",
|
||||||
"poisonWine": "core.removeFlag('poison');",
|
"poisonWine": "core.removeFlag('poison');",
|
||||||
"weakWine": "core.removeFlag('weak');\ncore.status.hero.atk += core.getFlag('weakAtk', core.values.weakValue);\ncore.status.hero.def += core.getFlag('weakDef', core.values.weakValue);",
|
"weakWine": "core.removeFlag('weak');\nif (core.values.weakValue>=1) { // >=1:直接扣数值\n\tcore.status.hero.atk += core.values.weakValue;\n\tcore.status.hero.def += core.values.weakValue;\n}\nelse { // <1:扣比例\n\tcore.setFlag(\"equip_atk_buff\", core.getFlag(\"equip_atk_buff\", 1) + core.values.weakValue);\n\tcore.setFlag(\"equip_def_buff\", core.getFlag(\"equip_def_buff\", 1) + core.values.weakValue);\n}",
|
||||||
"curseWine": "core.removeFlag('curse');",
|
"curseWine": "core.removeFlag('curse');",
|
||||||
"superWine": "core.removeFlag('poison');\nif (core.hasFlag('weak')) {\n\tcore.removeFlag('weak');\n\tcore.status.hero.atk += core.getFlag('weakAtk', core.values.weakValue);\n\tcore.status.hero.def += core.getFlag('weakDef', core.values.weakValue);\n}\ncore.removeFlag('curse');",
|
"superWine": "core.removeFlag('poison');\nif (core.hasFlag('weak')) {\n\tcore.removeFlag('weak');\n\tif (core.values.weakValue>=1) { // >=1:直接扣数值\n\t\tcore.status.hero.atk += core.values.weakValue;\n\t\tcore.status.hero.def += core.values.weakValue;\n\t}\n\telse { // <1:扣比例\n\t\tcore.setFlag(\"equip_atk_buff\", core.getFlag(\"equip_atk_buff\", 1) + core.values.weakValue);\n\t\tcore.setFlag(\"equip_def_buff\", core.getFlag(\"equip_def_buff\", 1) + core.values.weakValue);\n\t}\n}\ncore.removeFlag('curse');",
|
||||||
"lifeWand": "core.insertAction([\n\t{\"type\": \"input\", \"text\": \"请输入生命魔杖使用次数:(0-${item:lifeWand})\"},\n\t{\"type\": \"if\", \"condition\": \"flag:input<=item:lifeWand\",\n\t\t\"true\": [\n\t\t\t{\"type\": \"setValue\", \"name\": \"item:lifeWand\", \"value\": \"item:lifeWand-flag:input\"},\n\t\t\t{\"type\": \"setValue\", \"name\": \"status:hp\", \"value\": \"status:hp+flag:input*100\"},\n\t\t\t\"成功使用${flag:input}次生命魔杖,恢复${flag:input*100}点生命。\"\n\t\t],\n\t\t\"false\": [\"输入不合法!\"]\n\t},\n]);\ncore.addItem('lifeWand', 1);",
|
"lifeWand": "core.insertAction([\n\t{\"type\": \"input\", \"text\": \"请输入生命魔杖使用次数:(0-${item:lifeWand})\"},\n\t{\"type\": \"if\", \"condition\": \"flag:input<=item:lifeWand\",\n\t\t\"true\": [\n\t\t\t{\"type\": \"setValue\", \"name\": \"item:lifeWand\", \"value\": \"item:lifeWand-flag:input\"},\n\t\t\t{\"type\": \"setValue\", \"name\": \"status:hp\", \"value\": \"status:hp+flag:input*100\"},\n\t\t\t\"成功使用${flag:input}次生命魔杖,恢复${flag:input*100}点生命。\"\n\t\t],\n\t\t\"false\": [\"输入不合法!\"]\n\t},\n]);\ncore.addItem('lifeWand', 1);",
|
||||||
"jumpShoes": "core.insertAction({\"type\":\"jumpHero\",\"loc\":[core.nextX(2),core.nextY(2)]});",
|
"jumpShoes": "core.insertAction({\"type\":\"jumpHero\",\"loc\":[core.nextX(2),core.nextY(2)]});",
|
||||||
"redPotion": "core.status.hero.hp += core.values.redPotion",
|
"redPotion": "core.status.hero.hp += core.values.redPotion",
|
||||||
@ -411,5 +411,6 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"greenJewel": "true",
|
"greenJewel": "true",
|
||||||
"yellowJewel": "true",
|
"yellowJewel": "true",
|
||||||
"skill1": "true"
|
"skill1": "true"
|
||||||
}
|
},
|
||||||
|
"canEquip": {}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user