mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-03-04 03:37:07 +08:00
修复多次解析地图怪物的bug
This commit is contained in:
parent
9b5b212828
commit
bc2488c95d
@ -75,6 +75,7 @@ interface CriticalDamageDelta extends Omit<DamageDelta, 'info'> {
|
|||||||
type HaloFn = (info: EnemyInfo, enemy: Enemy) => void;
|
type HaloFn = (info: EnemyInfo, enemy: Enemy) => void;
|
||||||
type DamageDir = Dir | 'none';
|
type DamageDir = Dir | 'none';
|
||||||
|
|
||||||
|
/** 光环属性 */
|
||||||
export const haloSpecials: number[] = [8, 21, 25, 26, 27];
|
export const haloSpecials: number[] = [8, 21, 25, 26, 27];
|
||||||
|
|
||||||
export class EnemyCollection implements RangeCollection<DamageEnemy> {
|
export class EnemyCollection implements RangeCollection<DamageEnemy> {
|
||||||
@ -94,6 +95,7 @@ export class EnemyCollection implements RangeCollection<DamageEnemy> {
|
|||||||
* 解析本地图的怪物信息
|
* 解析本地图的怪物信息
|
||||||
*/
|
*/
|
||||||
extract() {
|
extract() {
|
||||||
|
this.list = [];
|
||||||
core.extractBlocks(this.floorId);
|
core.extractBlocks(this.floorId);
|
||||||
core.status.maps[this.floorId].blocks.forEach(v => {
|
core.status.maps[this.floorId].blocks.forEach(v => {
|
||||||
if (v.event.cls !== 'enemy48' && v.event.cls !== 'enemys') return;
|
if (v.event.cls !== 'enemy48' && v.event.cls !== 'enemys') return;
|
||||||
|
@ -18,6 +18,7 @@ core.control.updateDamage = function (floorId = core.status.floorId, ctx) {
|
|||||||
// 计算伤害
|
// 计算伤害
|
||||||
ensureFloorDamage(floorId);
|
ensureFloorDamage(floorId);
|
||||||
|
|
||||||
|
floor.enemy.extract();
|
||||||
floor.enemy.calDamage(true, onMap);
|
floor.enemy.calDamage(true, onMap);
|
||||||
floor.enemy.calMapDamage();
|
floor.enemy.calMapDamage();
|
||||||
core.status.damage.data = [];
|
core.status.damage.data = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user