mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-04-19 17:16:08 +08:00
fix: 光环
This commit is contained in:
parent
3af7f71478
commit
d25555b032
@ -1112,9 +1112,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
|
||||
|
||||
// 施加光环
|
||||
col.applyHalo(type, range, this, (e, enemy) => {
|
||||
e.atkBuff += enemy.enemy.atkBuff ?? 0;
|
||||
e.defBuff += enemy.enemy.defBuff ?? 0;
|
||||
e.hpBuff += enemy.enemy.hpBuff ?? 0;
|
||||
e.atkBuff_ += enemy.enemy.atkBuff ?? 0;
|
||||
e.defBuff_ += enemy.enemy.defBuff ?? 0;
|
||||
e.hpBuff_ += enemy.enemy.hpBuff ?? 0;
|
||||
});
|
||||
// 向已施加的光环列表中添加
|
||||
this.providedHalo.add(25);
|
||||
|
@ -26,9 +26,9 @@ interface EnemyInfo extends Partial<Enemy> {
|
||||
def: number;
|
||||
hp: number;
|
||||
special: number[];
|
||||
atkBuff: number;
|
||||
defBuff: number;
|
||||
hpBuff: number;
|
||||
atkBuff_: number;
|
||||
defBuff_: number;
|
||||
hpBuff_: number;
|
||||
enemy: Enemy;
|
||||
guard?: DamageEnemy[];
|
||||
x?: number;
|
||||
@ -341,9 +341,9 @@ export class DamageEnemy<T extends EnemyIds = EnemyIds> {
|
||||
atk: enemy.atk,
|
||||
def: enemy.def,
|
||||
special: enemy.special.slice(),
|
||||
atkBuff: 0,
|
||||
defBuff: 0,
|
||||
hpBuff: 0,
|
||||
atkBuff_: 0,
|
||||
defBuff_: 0,
|
||||
hpBuff_: 0,
|
||||
enemy: this.enemy,
|
||||
x: this.x,
|
||||
y: this.y,
|
||||
@ -384,8 +384,8 @@ export class DamageEnemy<T extends EnemyIds = EnemyIds> {
|
||||
for (const [loc, per] of Object.entries(flags[`melt_${floorId}`])) {
|
||||
const [mx, my] = loc.split(',').map(v => parseInt(v));
|
||||
if (Math.abs(mx - this.x) <= 1 && Math.abs(my - this.y) <= 1) {
|
||||
info.atkBuff += per as number;
|
||||
info.defBuff += per as number;
|
||||
info.atkBuff_ += per as number;
|
||||
info.defBuff_ += per as number;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -406,9 +406,9 @@ export class DamageEnemy<T extends EnemyIds = EnemyIds> {
|
||||
// 此时已经inject光环,因此直接计算真实属性
|
||||
const info = this.info;
|
||||
|
||||
info.atk = Math.floor(info.atk * (info.atkBuff / 100 + 1));
|
||||
info.def = Math.floor(info.def * (info.defBuff / 100 + 1));
|
||||
info.hp = Math.floor(info.hp * (info.hpBuff / 100 + 1));
|
||||
info.atk = Math.floor(info.atk * (info.atkBuff_ / 100 + 1));
|
||||
info.def = Math.floor(info.def * (info.defBuff_ / 100 + 1));
|
||||
info.hp = Math.floor(info.hp * (info.hpBuff_ / 100 + 1));
|
||||
|
||||
return this.info;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user