Create enemy type
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user