Create enemy type

This commit is contained in:
Peter Stockings
2026-01-05 13:00:16 +11:00
parent 161da3a64a
commit e223bf4b40
4 changed files with 10 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
import type { World, EntityId, Action, SimEvent, Actor, CombatantActor, CollectibleActor } from "../../core/types";
import type { World, EntityId, Action, SimEvent, Actor, CombatantActor, CollectibleActor, ActorType } from "../../core/types";
import { isBlocked } from "../world/world-logic";
import { GAME_CONFIG } from "../../core/config/GameConfig";
@@ -181,7 +181,7 @@ function handleAttack(w: World, actor: Actor, action: { targetId: EntityId }): S
killerId: actor.id,
x: target.pos.x,
y: target.pos.y,
victimType: target.type as "player" | "rat" | "bat"
victimType: target.type as ActorType
});
w.actors.delete(target.id);