mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-19 04:19:30 +08:00
冰封与火焰光环
This commit is contained in:
parent
7a42a0d9b9
commit
cb0e6cb98e
@ -267,6 +267,18 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"_docs": "融化",
|
||||
"_data": "融化"
|
||||
},
|
||||
"iceCore": {
|
||||
"_leaf": true,
|
||||
"_type": "textarea",
|
||||
"_docs": "冰封之核",
|
||||
"_data": "冰封之核"
|
||||
},
|
||||
"fireCore": {
|
||||
"_leaf": true,
|
||||
"_type": "textarea",
|
||||
"_docs": "火焰之核",
|
||||
"_data": "火焰之核"
|
||||
},
|
||||
"value": {
|
||||
"_leaf": true,
|
||||
"_type": "textarea",
|
||||
|
@ -161,6 +161,6 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
|
||||
"E610": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"E611": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"E612": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"E613": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"E614": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}
|
||||
"E613": {"name":"寒冰核心","hp":20000,"atk":3000,"def":1500,"money":3,"exp":150,"point":0,"special":[26],"iceCore":20},
|
||||
"E614": {"name":"火焰核心","hp":15000,"atk":2750,"def":1750,"money":3,"exp":140,"point":0,"special":[27],"fireCore":20}
|
||||
}
|
@ -29,6 +29,9 @@ main.floors.MT36=
|
||||
],
|
||||
"6,14": [
|
||||
"在本地图的右方,会看到一个棕色的线,这是由于抗锯齿出现的像素错误。这里关闭抗锯齿即可解决(默认是关闭的)。"
|
||||
],
|
||||
"8,14": [
|
||||
"坚固怪受到光环加成后可能无法被打败,因为会首先计算坚固属性再计算光环"
|
||||
]
|
||||
},
|
||||
"changeFloor": {},
|
||||
@ -44,17 +47,17 @@ main.floors.MT36=
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,604, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70176,70177,70177,70177,70177],
|
||||
[604, 0, 0, 0, 0, 0, 0, 0, 0, 0,70184,70185,70185,70185, 94],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70208,70209,70209,70209,70209],
|
||||
[ 0, 0, 0, 0, 0, 0, 0,609, 0, 0,70208,70209,70209,70209,70209],
|
||||
[604, 0, 0, 0, 0, 0,600, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[587, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[587, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[584,584,584,584,584,584,584,584,584,584,584, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,614, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[70056, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[585,585,585,585,585,585,129, 0,585,585,585,585,585,585,585]
|
||||
[70056,613, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[585,585,585,585,585,585,129, 0,129,585,585,585,585,585,585]
|
||||
],
|
||||
"bgmap": [
|
||||
[70073,70073,70073,70056, 0, 0, 0, 0, 0, 0,70058,70086,70086,70086,70086],
|
||||
|
@ -723,12 +723,20 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
],
|
||||
[
|
||||
26,
|
||||
'支援',
|
||||
'当周围一圈的怪物受到攻击时将上前支援,并组成小队战斗。',
|
||||
'#77c0b6',
|
||||
'冰封之核',
|
||||
enemy =>
|
||||
`怪物拥有逼人的寒气,使周围5*5范围内的怪物防御增加${enemy.iceCore}%`,
|
||||
'#70ffd1',
|
||||
1
|
||||
],
|
||||
[27, '捕捉', '当走到怪物周围十字时会强制进行战斗。', '#c0ddbb']
|
||||
[
|
||||
27,
|
||||
'火焰之核',
|
||||
enemy =>
|
||||
`怪物拥有灼热的火焰,使周围5*5范围内的怪物攻击增加${enemy.fireCore}%`,
|
||||
'#ff6f0a',
|
||||
1
|
||||
]
|
||||
];
|
||||
},
|
||||
getEnemyInfo: function (enemy, hero, x, y, floorId) {
|
||||
@ -806,29 +814,20 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
|
||||
var guards = [];
|
||||
|
||||
const info = {
|
||||
hp: Math.floor(mon_hp),
|
||||
atk: Math.floor(mon_atk),
|
||||
def: Math.floor(mon_def),
|
||||
money: Math.floor(mon_money),
|
||||
exp: Math.floor(mon_exp),
|
||||
point: Math.floor(mon_point),
|
||||
special: mon_special,
|
||||
guards: guards, // 返回支援情况
|
||||
iceDecline
|
||||
};
|
||||
|
||||
// 光环和支援检查
|
||||
core.status.checkBlock ??= {};
|
||||
|
||||
if (!core.status.checkBlock.needCache) return info;
|
||||
|
||||
if (
|
||||
core.status.checkBlock.needCache &&
|
||||
core.has(x) &&
|
||||
core.has(y)
|
||||
) {
|
||||
// 从V2.5.4开始,对光环效果增加缓存,以解决多次重复计算的问题,从而大幅提升运行效率。
|
||||
var hp_buff = 0,
|
||||
atk_buff = 0,
|
||||
def_buff = 0;
|
||||
// 检查光环和支援的缓存
|
||||
var index =
|
||||
x != null && y != null ? x + ',' + y : 'floor' + enemy.id;
|
||||
var index = `${x},${y}`;
|
||||
core.status.checkBlock.cache ??= {};
|
||||
var cache = core.status.checkBlock.cache[index];
|
||||
if (!cache) {
|
||||
@ -839,27 +838,12 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
// 获得该图块的ID
|
||||
var id = block.event.id,
|
||||
e = core.material.enemys[id];
|
||||
if (!e) return;
|
||||
var dx = Math.abs(block.x - x),
|
||||
dy = Math.abs(block.y - y);
|
||||
// 检查【支援】技能,数字26
|
||||
if (
|
||||
e &&
|
||||
core.hasSpecial(e.special, 26) &&
|
||||
// 检查支援条件,坐标存在,距离为1,且不能是自己
|
||||
// 其他类型的支援怪,比如十字之类的话.... 看着做是一样的
|
||||
x != null &&
|
||||
y != null &&
|
||||
Math.abs(block.x - x) <= 1 &&
|
||||
Math.abs(block.y - y) <= 1 &&
|
||||
!(x == block.x && y == block.y)
|
||||
) {
|
||||
// 记录怪物的x,y,ID
|
||||
guards.push([block.x, block.y, id]);
|
||||
}
|
||||
|
||||
// 抱团
|
||||
if (
|
||||
e &&
|
||||
core.hasSpecial(mon_special, 8) &&
|
||||
core.hasSpecial(e.special, 8) &&
|
||||
!(dx == 0 && dy == 0) &&
|
||||
@ -872,18 +856,25 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
|
||||
// 冰封光环
|
||||
if (
|
||||
e &&
|
||||
core.hasSpecial(e.special, 21) &&
|
||||
x != null &&
|
||||
y != null &&
|
||||
dx < 4 &&
|
||||
dy < 4
|
||||
) {
|
||||
iceDecline += e.iceHalo;
|
||||
}
|
||||
|
||||
// TODO:如果有其他类型光环怪物在这里仿照添加检查
|
||||
// 注:新增新的类光环属性(需要遍历全图的)需要在特殊属性定义那里的第五项写1,参见光环和支援的特殊属性定义。
|
||||
// 5*5光环
|
||||
if (dx <= 2 && dy <= 2) {
|
||||
// 冰封之核
|
||||
if (core.hasSpecial(e.special, 26)) {
|
||||
def_buff += e.iceCore;
|
||||
}
|
||||
|
||||
// 火焰之核
|
||||
if (core.hasSpecial(e.special, 27)) {
|
||||
atk_buff += e.fireCore;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 融化怪要在这里判断
|
||||
@ -895,8 +886,13 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
for (const [loc, per] of Object.entries(
|
||||
flags[`melt_${floorId}`]
|
||||
)) {
|
||||
const [mx, my] = loc.split(',').map(v => parseInt(v));
|
||||
if (Math.abs(mx - x) <= 1 && Math.abs(my - y) <= 1) {
|
||||
const [mx, my] = loc
|
||||
.split(',')
|
||||
.map(v => parseInt(v));
|
||||
if (
|
||||
Math.abs(mx - x) <= 1 &&
|
||||
Math.abs(my - y) <= 1
|
||||
) {
|
||||
atk_buff += per;
|
||||
def_buff += per;
|
||||
}
|
||||
@ -923,8 +919,19 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
mon_hp *= 1 + hp_buff / 100;
|
||||
mon_atk *= 1 + atk_buff / 100;
|
||||
mon_def *= 1 + def_buff / 100;
|
||||
}
|
||||
|
||||
return info;
|
||||
return {
|
||||
hp: Math.floor(mon_hp),
|
||||
atk: Math.floor(mon_atk),
|
||||
def: Math.floor(mon_def),
|
||||
money: Math.floor(mon_money),
|
||||
exp: Math.floor(mon_exp),
|
||||
point: Math.floor(mon_point),
|
||||
special: mon_special,
|
||||
guards: guards, // 返回支援情况
|
||||
iceDecline
|
||||
};
|
||||
},
|
||||
getDamageInfo: function (enemy, hero, x, y, floorId) {
|
||||
// 获得战斗伤害信息(实际伤害计算函数)
|
||||
@ -1516,7 +1523,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
if (!floorId || !core.status.maps) return;
|
||||
|
||||
const haloMap = {
|
||||
21: ['square:7:cyan']
|
||||
21: ['square:7:cyan'],
|
||||
26: ['square:5:blue'],
|
||||
27: ['square:5:red']
|
||||
};
|
||||
|
||||
var width = core.floors[floorId].width,
|
||||
@ -1757,7 +1766,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
Object.keys(flags[`melt_${floorId}`]).forEach(v => {
|
||||
needCache = true;
|
||||
halo[v] ??= [];
|
||||
halo[v].push('square:3:#d9a8ff');
|
||||
halo[v].push('square:3:purple');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1574,7 +1574,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
|
||||
}
|
||||
if (flags['jump_' + core.status.floorId] >= 3)
|
||||
return core.drawTip('当前地图使用次数已用完');
|
||||
core.autosave();
|
||||
var direction = core.status.hero.loc.direction;
|
||||
var loc = core.status.hero.loc;
|
||||
var checkLoc = {};
|
||||
@ -1620,6 +1619,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
|
||||
true
|
||||
);
|
||||
if (!toLoc) return;
|
||||
core.autosave();
|
||||
if (flags.chapter <= 1) core.status.hero.hp -= 200 * flags.hard;
|
||||
core.updateStatusBar();
|
||||
flags['jump_' + core.status.floorId]++;
|
||||
@ -1642,6 +1642,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
|
||||
false
|
||||
);
|
||||
if (!firstNoPass) return;
|
||||
core.autosave();
|
||||
if (flags.chapter <= 1) core.status.hero.hp -= 200 * flags.hard;
|
||||
core.updateStatusBar();
|
||||
flags['jump_' + core.status.floorId]++;
|
||||
|
Loading…
Reference in New Issue
Block a user