diff --git a/project/floors/GM1.js b/project/floors/GM1.js index 7c01998..839ced4 100644 --- a/project/floors/GM1.js +++ b/project/floors/GM1.js @@ -341,7 +341,7 @@ main.floors.GM1= "cannotMove": {}, "cannotMoveIn": {}, "map": [ - [50049,50049,50049, 91,50049,50049, 93,50049,50049, 91,50049,50049,50049], + [50049,50049,50049, 91,50049,50049, 91,50049,50049, 91,50049,50049,50049], [50049, 0,442, 0,441,442, 0,441,442, 0,441, 0,50049], [50049, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,50049], [ 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94], @@ -353,7 +353,7 @@ main.floors.GM1= [ 92, 0, 0, 0, 0, 0,549, 0, 0, 0, 0, 0, 94], [50049, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,50049], [50049, 0,442, 0,441,442, 0,441,442, 0,441, 0,50049], - [50049,50049,50049, 93,50049,50049, 91,50049,50049, 93,50049,50049,50049] + [50049,50049,50049, 93,50049,50049, 93,50049,50049, 93,50049,50049,50049] ], "bgmap": [ diff --git a/project/functions.js b/project/functions.js index 1ddf5fa..d32ee06 100644 --- a/project/functions.js +++ b/project/functions.js @@ -352,8 +352,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = } //回溯 if (core.enemys.hasSpecial(special, 28)) { - core.status.hero.statistics.battleDamage += - core.status.hero.hp *= 1.2 + } //毁灭 if (core.enemys.hasSpecial(special, 33)) { @@ -559,9 +558,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = [25, "光环", function (enemy) { return (enemy.range != null ? ((enemy.haloSquare ? "该怪物九宫格" : "该怪物十字") + enemy.haloRange + "格范围内") : "同楼层所有") + "怪物生命提升" + (enemy.hpBuff || 0) + "%,攻击提升" + (enemy.atkBuff || 0) + "%,防御提升" + (enemy.defBuff || 0) + "%," + (enemy.haloAdd ? "可叠加" : "不可叠加"); }, "#e6e099", 1], [26, "支援", "当周围一圈的怪物受到攻击时将上前支援,并组成小队战斗。", "#77c0b6", 1], [27, "捕捉", function (enemy) { return "当走到怪物周围" + (enemy.zoneSquare ? "九宫格" : "十字") + "时会强制进行战斗。"; }, "#c0ddbb"], - [28, "回溯", "战斗后回复20%生命值", "red"], - [29, "反弹", function (enemy) { return "将对手" + (enemy.fantan || 0) + "%的伤害回去"; }, "#FF9900"], - [32, "破盾", function (enemy) { return "无视对手" + (enemy.Z || 0) + "%的护盾"; }, "#66ff00"], + [28, "回溯", "战斗后回复战斗后生命20%生命值,已计入伤害。", "red"], + [29, "反弹", function (enemy) { return "将对手" + (enemy.fantan || 0) + "%的伤害反弹回去。"; }, "#FF9900"], + [32, "破盾", function (enemy) { return "无视对手" + (enemy.Z || 0) + "%的护盾。"; }, "#66ff00"], [33, "毁灭", "战斗后将周围3*3格图块炸毁", "yellow"], [34, "复制", "怪物属性为勇者的80%(怪物攻击力大于勇者攻击力的80%则怪物属性不变)", "#c0ddbb"], [35, "灼烧", "勇者每回合额外受到怪物攻击力和防御力之和1%的伤害", "red"], @@ -813,7 +812,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = if (hero_per_damage <= 0) return null; //反弹 if (core.hasSpecial(mon_special, 29)) { - per_damage += hero_per_damage * (enemy.fantan / 100); + //per_damage += hero_per_damage * (enemy.fantan / 100); + init_damage += mon_hp * (enemy.fantan / 100) / (1 - (enemy.fantan / 100)) hero_per_damage *= (1 - (enemy.fantan / 100)) } // 勇士的攻击回合数;为怪物生命除以每回合伤害向上取整 @@ -899,7 +899,14 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = if (core.hasItem("I673")) { damage *= 1.1 } if (core.getFlag('skill', 0) == 3) { damage -= hero_def * 0.5 + hero_mdef * 0.2 + 50 } + if (core.hasSpecial(mon_special, 28)) { + var vampire_damage = (hero_hp - damage) / -5; + vampire_damage = Math.ceil(vampire_damage) || 0; + + + damage += vampire_damage; + } return { "mon_hp": Math.floor(mon_hp), "mon_atk": Math.floor(mon_atk), diff --git a/project/items.js b/project/items.js index 35b6cc3..ffe6174 100644 --- a/project/items.js +++ b/project/items.js @@ -2109,7 +2109,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "cls": "constants", "name": "禁术印记", "canUseItemEffect": "true", - "text": "希娜公主为了控制光明圣子的禁术印记,每次战斗额外受到10%伤害" + "text": "希娜公主为了控制光明圣子的禁术印记,每次战斗额外受到10%伤害,先计算护盾后计算此禁术。" }, "I674": { "cls": "items", @@ -2371,7 +2371,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = }, { "type": "if", - "condition": "(flag:input<=item:I710)", + "condition": "((flag:input<=item:I710)&&(flag:input>0))", "true": [ { "type": "setValue", @@ -2429,7 +2429,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = }, { "type": "if", - "condition": "(flag:input<=item:I711)", + "condition": "((flag:input<=item:I711)&&(flag:input>0))", "true": [ { "type": "setValue", @@ -2487,7 +2487,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = }, { "type": "if", - "condition": "(flag:input<=item:I712)", + "condition": "((flag:input<=item:I712)&&(flag:input>0))", "true": [ { "type": "setValue", @@ -2545,7 +2545,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = }, { "type": "if", - "condition": "(flag:input<=item:I713)", + "condition": "((flag:input<=item:I713)&&(flag:input>0))", "true": [ { "type": "setValue", diff --git a/project/plugins.js b/project/plugins.js index 3c24418..93d40ba 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -1,10 +1,59 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { "init": function () { - this._afterLoadResources = function () { - // 本函数将在所有资源加载完毕后,游戏开启前被执行 + this._afterLoadResources = function () { + // 本函数将在所有资源加载完毕后,游戏开启前被执行 + } + core.enemys.getDamageString = function (enemy, x, y, floorId) { + if (typeof enemy == 'string') enemy = core.material.enemys[enemy]; + var damage = this.getDamage(enemy, x, y, floorId); + + var color = '#000000'; + + if (damage == null) { + damage = "???"; + color = '#FF2222'; + } else { + if (damage <= 0) color = '#11FF11'; + else if (damage < core.status.hero.hp / 3) color = '#FFFFFF'; + else if (damage < core.status.hero.hp * 2 / 3) color = '#FFFF00'; + else if (damage < core.status.hero.hp) color = '#FF9933'; + else color = '#FF2222'; + + damage = core.formatBigNumber(damage, true); + if (core.enemys.hasSpecial(enemy, 19)) + damage += "+"; + if (core.enemys.hasSpecial(enemy, 21)) + damage += "-"; + if (core.enemys.hasSpecial(enemy, 11) || core.enemys.hasSpecial(enemy, 28)) + damage += "^"; } - }, + + return { + "damage": damage, + "color": color + }; + } + core.ui._drawBook_drawDamage = function (index, enemy, offset, position) { + core.setTextAlign('ui', 'center'); + var damage = enemy.damage, + color = '#FFFF00'; + if (damage == null) { + damage = '无法战斗'; + color = '#FF2222'; + } else { + if (damage >= core.status.hero.hp) color = '#FF2222'; + else if (damage >= core.status.hero.hp * 2 / 3) color = '#FF9933'; + else if (damage <= 0) color = '#11FF11'; + damage = core.formatBigNumber(damage); + if (core.enemys.hasSpecial(enemy, 19)) damage += "+"; + if (core.enemys.hasSpecial(enemy, 21)) damage += "-"; + if (core.enemys.hasSpecial(enemy, 11) || core.enemys.hasSpecial(enemy, 28)) damage += "^"; + } + if (enemy.notBomb) damage += "[b]"; + core.fillText('ui', damage, offset, position, color, this._buildFont(13, true)); + } +}, "drawLight": function () { // 绘制灯光/漆黑层效果。调用方式 core.plugin.drawLight(...) @@ -1969,6 +2018,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = // 忽略的道具 const ignore = ['superPotion']; + const box = ['X10110']; + const portals = ['upPortal', 'downPortal', 'leftPortal', 'rightPortal']; // 取消注释下面这句可以减少超大地图的判定。 // 如果地图宝石过多,可能会略有卡顿,可以尝试取消注释下面这句话来解决。 @@ -2016,8 +2067,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.status.hero = new Proxy(hero, handler); core.status.maps[floorId].blocks.forEach(function (block) { if ( - block.event.cls !== 'items' || - ignore.includes(block.event.id) || + (block.event.cls !== 'items' || ignore.includes(block.event.id)) && !box.includes(block.event.id) && !portals.includes(block.event.id) || block.disable ) return; @@ -2037,7 +2087,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = diff = {}; const id = block.event.id; const item = core.material.items[id]; - if (item.cls === 'equips') { + if (portals.includes(block.event.id)) { + if (!block.event.trigger) { + drawItemDetail({ 'atk': 'X' }, x, y); + } + } + if (item && item.cls === 'equips') { // 装备也显示 const diff = item.equip.value ?? {}; const per = item.equip.percentage ?? {}; @@ -2050,7 +2105,28 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = // 跟数据统计原理一样 执行效果 前后比较 core.setFlag('__statistics__', true); try { - eval(item.itemEffect); + if (box.includes(block.event.id)) { + for (var i of (block.event.data[0].yes[0].false)) + if (i.type == 'setValue') { + var value = core.events._updateValueByOperator(core.calValue(i.value), core.calValue(i.name), i.operator); + core.events._setValue_setStatus(i.name, value); + if ((i.name.indexOf("item:") == 0)) { + var itemId = i.name.substring(5), + count = core.itemCount(itemId); + diff[itemId] = value - count; + } + + //core.events._setValue_setBuff(i.name, value); + //core.events._setValue_setItem(i.name, value); + //core.events._setValue_setFlag(i.name, value); + //core.events._setValue_setSwitch(i.name, value); + //core.events._setValue_setTemp(i.name, value); + //core.events._setValue_setGlobal(i.name, value); + //core.events.setValue(i.name, i.operator, i.value); + }; + diff['mana'] += 50; + } else + eval(item.itemEffect); } catch (error) {} drawItemDetail(diff, x, y); }); @@ -2096,6 +2172,20 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = case 'mana': color = '#c66'; break; + case 'yellowKey': + color = '#fca'; + break; + case 'blueKey': + color = '#aad'; + break; + case 'redKey': + color = '#f88'; + break; + case 'greenKey': + color = '#8f8'; + break; + default: + if (diff[name] == 1) content = name; } // 绘制 core.status.damage.data.push({