feat: port melee combat and wounds
This commit is contained in:
@@ -1,21 +1,70 @@
|
||||
class_name ActorState
|
||||
extends RefCounted
|
||||
|
||||
const LimbWoundsType = preload("res://scripts/domain/combat/limb_wounds.gd")
|
||||
|
||||
var id: StringName
|
||||
var cell: Vector2i
|
||||
var hit_points: int
|
||||
var max_hit_points: int
|
||||
# Legacy basic damage remains the unarmed/default weapon damage.
|
||||
var attack_damage: int
|
||||
|
||||
var content_id: StringName
|
||||
|
||||
func _init(new_id: StringName, new_cell: Vector2i, new_hit_points: int, new_attack_damage: int, new_content_id: StringName = &"") -> void:
|
||||
# Data-backed combat stats. Defaults retain the pre-C2 prototype fixtures.
|
||||
var accuracy := 30
|
||||
var defense := 0
|
||||
var armor := 0
|
||||
var weapon_damage := 0
|
||||
var damage_variance := 0
|
||||
var penetration := 0
|
||||
var crit_chance := 0.0
|
||||
var crit_mult := 1.5
|
||||
var block := 0
|
||||
var stance: StringName = &"none"
|
||||
var xp_reward := 0
|
||||
var xp := 0
|
||||
var loot_table: StringName = &""
|
||||
var perception := 0
|
||||
var wounds: LimbWounds
|
||||
|
||||
func _init(new_id: StringName, new_cell: Vector2i, new_hit_points: int, new_attack_damage: int, new_content_id: StringName = &"", combat_data: Dictionary = {}) -> void:
|
||||
id = new_id
|
||||
cell = new_cell
|
||||
hit_points = new_hit_points
|
||||
max_hit_points = new_hit_points
|
||||
attack_damage = new_attack_damage
|
||||
content_id = new_content_id if not new_content_id.is_empty() else new_id
|
||||
accuracy = int(combat_data.get("accuracy", accuracy))
|
||||
defense = int(combat_data.get("defense", defense))
|
||||
armor = int(combat_data.get("armor", armor))
|
||||
weapon_damage = int(combat_data.get("weapon_damage", combat_data.get("damage", attack_damage)))
|
||||
damage_variance = int(combat_data.get("damage_variance", damage_variance))
|
||||
penetration = int(combat_data.get("penetration", penetration))
|
||||
crit_chance = float(combat_data.get("crit_chance", crit_chance))
|
||||
crit_mult = float(combat_data.get("crit_mult", crit_mult))
|
||||
block = int(combat_data.get("block", block))
|
||||
stance = StringName(combat_data.get("stance", stance))
|
||||
xp_reward = int(combat_data.get("xp_reward", xp_reward))
|
||||
xp = int(combat_data.get("xp", xp))
|
||||
loot_table = StringName(combat_data.get("loot_table", loot_table))
|
||||
perception = int(combat_data.get("perception", combat_data.get("per", perception)))
|
||||
wounds = LimbWoundsType.new()
|
||||
|
||||
func is_alive() -> bool:
|
||||
return hit_points > 0
|
||||
|
||||
func take_damage(amount: int) -> int:
|
||||
var actual := mini(maxi(0, amount), hit_points)
|
||||
hit_points -= actual
|
||||
return actual
|
||||
|
||||
func wound_severity(slot: StringName) -> int:
|
||||
return wounds.severity_at(slot)
|
||||
|
||||
func effective_perception() -> int:
|
||||
return perception - wounds.severity_at(&"head")
|
||||
|
||||
func effective_max_hit_points() -> int:
|
||||
var reduction := int(float(max_hit_points) * 0.05 * wounds.severity_at(&"torso"))
|
||||
return maxi(1, max_hit_points - reduction)
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
class_name CombatEngine
|
||||
extends RefCounted
|
||||
|
||||
# Direct port of the ASCII melee probabilities, reduced to C2's domain inputs.
|
||||
const MIN_HIT_CHANCE := 0.05
|
||||
const MAX_HIT_CHANCE := 0.97
|
||||
const ARM_WOUND_PENALTY := 6
|
||||
const LEG_WOUND_PENALTY := 6
|
||||
const DODGE_STANCE_BONUS := 18
|
||||
const BLOCK_BASE_REDUCTION := 2
|
||||
|
||||
var _rolls: Array[float] = []
|
||||
|
||||
func _init(scripted_rolls: Array[float] = []) -> void:
|
||||
_rolls.assign(scripted_rolls)
|
||||
|
||||
func resolve_attack(attacker: ActorState, defender: ActorState) -> Dictionary:
|
||||
var events: Array[Dictionary] = [_event(&"attack_started", attacker, defender, {"stance": String(attacker.stance)})]
|
||||
var attack_score := attacker.accuracy - attacker.wound_severity(&"arms") * ARM_WOUND_PENALTY
|
||||
var defense_score := defender.defense * 3 - defender.wound_severity(&"legs") * LEG_WOUND_PENALTY
|
||||
if defender.stance == &"dodge":
|
||||
defense_score += DODGE_STANCE_BONUS
|
||||
var hit_chance := clampf(0.55 + float(attack_score - defense_score) * 0.02, MIN_HIT_CHANCE, MAX_HIT_CHANCE)
|
||||
if _next_roll() > hit_chance:
|
||||
return {"hit": false, "critical": false, "damage": 0, "events": events}
|
||||
|
||||
events.append(_event(&"attack_hit", attacker, defender, {"hit_chance": hit_chance}))
|
||||
var critical := _next_roll() < attacker.crit_chance
|
||||
var base_damage := attacker.weapon_damage + _damage_variance(attacker.damage_variance)
|
||||
var damage: int
|
||||
# ASCII player attacks use full target armor and weapon penetration.
|
||||
# Enemy attacks apply block first, then half of the target's armor.
|
||||
if attacker.id == &"player":
|
||||
damage = maxi(1, base_damage - maxi(0, defender.armor - attacker.penetration))
|
||||
if defender.stance == &"block":
|
||||
damage = maxi(0, damage - BLOCK_BASE_REDUCTION - defender.block / 2)
|
||||
else:
|
||||
damage = base_damage
|
||||
if defender.stance == &"block":
|
||||
damage = maxi(0, damage - BLOCK_BASE_REDUCTION - defender.block / 2)
|
||||
if damage > 0:
|
||||
damage = maxi(1, damage - defender.armor / 2)
|
||||
if critical:
|
||||
damage = int(float(damage) * attacker.crit_mult)
|
||||
var actual := defender.take_damage(damage)
|
||||
events.append(_event(&"damage_dealt", attacker, defender, {"damage": actual, "critical": critical}))
|
||||
if not defender.is_alive():
|
||||
events.append(_event(&"actor_died", defender, attacker, {"killed_by": String(attacker.id)}))
|
||||
attacker.xp += defender.xp_reward
|
||||
events.append(_event(&"xp_granted", attacker, defender, {"xp": defender.xp_reward}))
|
||||
events.append(_event(&"loot_dropped", defender, attacker, {"loot_table": String(defender.loot_table)}))
|
||||
return {"hit": true, "critical": critical, "damage": actual, "events": events}
|
||||
|
||||
func _damage_variance(variance: int) -> int:
|
||||
if variance <= 0:
|
||||
return 0
|
||||
return int(_next_roll() * float(variance + 1))
|
||||
|
||||
func _next_roll() -> float:
|
||||
if _rolls.is_empty():
|
||||
return 0.0
|
||||
return clampf(_rolls.pop_front(), 0.0, 0.999999)
|
||||
|
||||
func _event(kind: StringName, actor: ActorState, target: ActorState, payload: Dictionary) -> Dictionary:
|
||||
return {"kind": kind, "actor_id": actor.id, "target_id": target.id, "cell": actor.cell, "payload": payload}
|
||||
@@ -0,0 +1 @@
|
||||
uid://dcxbc8mscls6t
|
||||
@@ -0,0 +1,61 @@
|
||||
class_name LimbWounds
|
||||
extends RefCounted
|
||||
|
||||
# ASCII parity: one recoverable wound per body slot, with severity 1..3.
|
||||
const SLOTS: Array[StringName] = [&"head", &"torso", &"arms", &"legs"]
|
||||
const DEFAULT_DURATION := 8
|
||||
const MAX_SEVERITY := 3
|
||||
|
||||
var _wounds: Dictionary[StringName, Dictionary] = {}
|
||||
|
||||
func apply(slot: StringName, severity: int = 1, duration: int = DEFAULT_DURATION, source: String = "") -> void:
|
||||
if not SLOTS.has(slot):
|
||||
return
|
||||
var existing: Dictionary = _wounds.get(slot, {})
|
||||
_wounds[slot] = {
|
||||
"severity": maxi(int(existing.get("severity", 0)), clampi(severity, 1, MAX_SEVERITY)),
|
||||
"duration": maxi(int(existing.get("duration", 0)), maxi(1, duration)),
|
||||
"source": source if not source.is_empty() else String(existing.get("source", "")),
|
||||
}
|
||||
|
||||
func severity_at(slot: StringName) -> int:
|
||||
return int(_wounds.get(slot, {}).get("severity", 0))
|
||||
|
||||
func duration_at(slot: StringName) -> int:
|
||||
return int(_wounds.get(slot, {}).get("duration", 0))
|
||||
|
||||
func source_at(slot: StringName) -> String:
|
||||
return String(_wounds.get(slot, {}).get("source", ""))
|
||||
|
||||
func tick(recovery_multiplier: float = 1.0) -> Array[StringName]:
|
||||
var recovered: Array[StringName] = []
|
||||
var step := 2 if recovery_multiplier >= 2.0 else 1
|
||||
for slot in _wounds.keys():
|
||||
var wound: Dictionary = _wounds[slot]
|
||||
wound["duration"] = int(wound["duration"]) - step
|
||||
if int(wound["duration"]) <= 0:
|
||||
_wounds.erase(slot)
|
||||
recovered.append(slot)
|
||||
else:
|
||||
_wounds[slot] = wound
|
||||
return recovered
|
||||
|
||||
func active_wounds() -> Array[Dictionary]:
|
||||
var active: Array[Dictionary] = []
|
||||
for slot in SLOTS:
|
||||
if _wounds.has(slot):
|
||||
var wound: Dictionary = _wounds[slot].duplicate(true)
|
||||
wound["slot"] = slot
|
||||
active.append(wound)
|
||||
return active
|
||||
|
||||
func to_dictionary() -> Dictionary:
|
||||
return _wounds.duplicate(true)
|
||||
|
||||
static func from_dictionary(data: Dictionary = {}) -> LimbWounds:
|
||||
var wounds := LimbWounds.new()
|
||||
for raw_slot in data:
|
||||
var slot := StringName(raw_slot)
|
||||
var wound: Dictionary = data[raw_slot]
|
||||
wounds.apply(slot, int(wound.get("severity", 1)), int(wound.get("duration", DEFAULT_DURATION)), String(wound.get("source", "")))
|
||||
return wounds
|
||||
@@ -0,0 +1 @@
|
||||
uid://cox0vsuwmj701
|
||||
@@ -2,6 +2,7 @@ class_name TurnResolver
|
||||
extends RefCounted
|
||||
|
||||
const TurnResultType = preload("res://scripts/domain/turn_result.gd")
|
||||
const CombatEngineType = preload("res://scripts/domain/combat/combat_engine.gd")
|
||||
|
||||
static func resolve_player_action(state: GameState, direction: Vector2i) -> Array[TurnResult]:
|
||||
var results: Array[TurnResult] = []
|
||||
@@ -11,13 +12,12 @@ static func resolve_player_action(state: GameState, direction: Vector2i) -> Arra
|
||||
var destination: Vector2i = player.cell + direction
|
||||
var enemy: ActorState = _enemy_at(state, destination)
|
||||
if enemy != null:
|
||||
enemy.hit_points -= player.attack_damage
|
||||
results.append(TurnResultType.new(player.id, &"melee", player.cell, destination, enemy.id, player.attack_damage, "You strike the goblin for %d." % player.attack_damage))
|
||||
_append_combat_results(results, CombatEngineType.new().resolve_attack(player, enemy), player.cell, destination)
|
||||
if not enemy.is_alive():
|
||||
state.enemies.erase(enemy.id)
|
||||
results.append(TurnResultType.new(enemy.id, &"enemy_defeated", enemy.cell, enemy.cell, player.id, 0, "The goblin is defeated."))
|
||||
else:
|
||||
append_enemy_response(state, results)
|
||||
_tick_wounds(state, results)
|
||||
return results
|
||||
if not state.map.is_walkable(destination):
|
||||
results.append(TurnResultType.new(player.id, &"blocked", player.cell, destination, &"", 0, "Your way is blocked."))
|
||||
@@ -26,6 +26,7 @@ static func resolve_player_action(state: GameState, direction: Vector2i) -> Arra
|
||||
player.cell = destination
|
||||
results.append(TurnResultType.new(player.id, &"moved", from, destination, &"", 0, "You move to (%d, %d)." % [destination.x, destination.y]))
|
||||
append_enemy_response(state, results)
|
||||
_tick_wounds(state, results)
|
||||
return results
|
||||
|
||||
static func _enemy_at(state: GameState, cell: Vector2i) -> ActorState:
|
||||
@@ -38,8 +39,7 @@ static func append_enemy_response(state: GameState, results: Array[TurnResult])
|
||||
for enemy: ActorState in state.enemies.values():
|
||||
var delta: Vector2i = state.player.cell - enemy.cell
|
||||
if abs(delta.x) + abs(delta.y) == 1:
|
||||
state.player.hit_points = max(0, state.player.hit_points - enemy.attack_damage)
|
||||
results.append(TurnResultType.new(enemy.id, &"enemy_melee", enemy.cell, state.player.cell, state.player.id, enemy.attack_damage, "The goblin hits you for %d." % enemy.attack_damage))
|
||||
_append_combat_results(results, CombatEngineType.new().resolve_attack(enemy, state.player), enemy.cell, state.player.cell)
|
||||
return
|
||||
var step: Vector2i = Vector2i(int(sign(delta.x)), int(sign(delta.y)))
|
||||
if abs(delta.x) >= abs(delta.y):
|
||||
@@ -51,3 +51,28 @@ static func append_enemy_response(state: GameState, results: Array[TurnResult])
|
||||
var from: Vector2i = enemy.cell
|
||||
enemy.cell = target
|
||||
results.append(TurnResultType.new(enemy.id, &"enemy_moved", from, target, &"", 0, "The goblin moves."))
|
||||
|
||||
static func _append_combat_results(results: Array[TurnResult], outcome: Dictionary, from_cell: Vector2i, to_cell: Vector2i) -> void:
|
||||
# Keep the prototype TurnResult seam stable for existing action callers while
|
||||
# carrying the authoritative C2 descriptors to Game's GameEvent journal.
|
||||
var descriptors: Array = outcome.events
|
||||
var first: Dictionary = descriptors[0]
|
||||
var actor_id := StringName(first.actor_id)
|
||||
var target_id := StringName(first.target_id)
|
||||
var legacy_kind := &"melee" if actor_id == &"player" else &"enemy_melee"
|
||||
var damage := int(outcome.damage)
|
||||
var message := "You strike the goblin for %d." % damage if actor_id == &"player" else "The goblin hits you for %d." % damage
|
||||
results.append(TurnResultType.new(actor_id, legacy_kind, from_cell, to_cell, target_id, damage, message, {"domain_events": descriptors}))
|
||||
if not bool(outcome.hit):
|
||||
results.back().message = "You miss the goblin." if actor_id == &"player" else "The goblin misses you."
|
||||
if not (results.back().payload.domain_events as Array).filter(func(event: Dictionary) -> bool: return event.kind == &"actor_died").is_empty():
|
||||
var defeated := target_id if actor_id == &"player" else actor_id
|
||||
results.append(TurnResultType.new(defeated, &"enemy_defeated", to_cell, to_cell, actor_id, 0, "The goblin is defeated."))
|
||||
|
||||
static func _actor_label(actor_id: StringName) -> String:
|
||||
return "You" if actor_id == &"player" else "The goblin"
|
||||
|
||||
static func _tick_wounds(state: GameState, results: Array[TurnResult]) -> void:
|
||||
for actor: ActorState in [state.player] + state.enemies.values():
|
||||
for slot in actor.wounds.tick():
|
||||
results.append(TurnResultType.new(actor.id, &"wound_recovered", actor.cell, actor.cell, &"", 0, "%s's %s wound recovers." % [_actor_label(actor.id), slot], {"slot": String(slot)}))
|
||||
|
||||
@@ -8,8 +8,11 @@ var to_cell: Vector2i
|
||||
var target_id: StringName
|
||||
var damage: int
|
||||
var message: String
|
||||
# Optional domain event descriptors. Game converts these to the authoritative
|
||||
# GameEvent journal without allowing presentation to mutate combat state.
|
||||
var payload: Dictionary
|
||||
|
||||
func _init(new_actor_id: StringName, new_kind: StringName, from: Vector2i, to: Vector2i, target: StringName = &"", amount: int = 0, text: String = "") -> void:
|
||||
func _init(new_actor_id: StringName, new_kind: StringName, from: Vector2i, to: Vector2i, target: StringName = &"", amount: int = 0, text: String = "", new_payload: Dictionary = {}) -> void:
|
||||
actor_id = new_actor_id
|
||||
kind = new_kind
|
||||
from_cell = from
|
||||
@@ -17,3 +20,4 @@ func _init(new_actor_id: StringName, new_kind: StringName, from: Vector2i, to: V
|
||||
target_id = target
|
||||
damage = amount
|
||||
message = text
|
||||
payload = new_payload.duplicate(true)
|
||||
|
||||
@@ -46,7 +46,7 @@ static func _spawn_enemy(floor: FloorState, catalog: ContentCatalog, room: RoomS
|
||||
var definition: Dictionary = definitions[rng.next_int() % definitions.size()]
|
||||
var content_id := StringName(definition["id"])
|
||||
var actor_id := StringName("%s_%02d" % [content_id, serial])
|
||||
floor.enemies[actor_id] = ActorStateType.new(actor_id, cell, int(definition.get("hp", 1)), int(definition.get("attack", 0)), content_id)
|
||||
floor.enemies[actor_id] = ActorStateType.new(actor_id, cell, int(definition.get("hp", 1)), int(definition.get("attack", 0)), content_id, definition)
|
||||
occupied[cell] = true
|
||||
return serial + 1
|
||||
|
||||
|
||||
@@ -118,6 +118,21 @@ static func _actor_to_dict(actor: ActorState) -> Dictionary:
|
||||
"max_hit_points": actor.max_hit_points,
|
||||
"attack_damage": actor.attack_damage,
|
||||
"content_id": String(actor.content_id),
|
||||
"accuracy": actor.accuracy,
|
||||
"defense": actor.defense,
|
||||
"armor": actor.armor,
|
||||
"weapon_damage": actor.weapon_damage,
|
||||
"damage_variance": actor.damage_variance,
|
||||
"penetration": actor.penetration,
|
||||
"crit_chance": actor.crit_chance,
|
||||
"crit_mult": actor.crit_mult,
|
||||
"block": actor.block,
|
||||
"stance": String(actor.stance),
|
||||
"xp_reward": actor.xp_reward,
|
||||
"xp": actor.xp,
|
||||
"loot_table": String(actor.loot_table),
|
||||
"perception": actor.perception,
|
||||
"wounds": actor.wounds.to_dictionary(),
|
||||
}
|
||||
|
||||
static func _actor_from_dict(data: Dictionary) -> ActorState:
|
||||
@@ -126,9 +141,11 @@ static func _actor_from_dict(data: Dictionary) -> ActorState:
|
||||
_array_to_cell(data.get("cell", [0, 0])),
|
||||
int(data.get("max_hit_points", data.get("hit_points", 0))),
|
||||
int(data.get("attack_damage", 0)),
|
||||
StringName(data.get("content_id", data.get("id", "")))
|
||||
StringName(data.get("content_id", data.get("id", ""))),
|
||||
data
|
||||
)
|
||||
actor.hit_points = int(data.get("hit_points", actor.max_hit_points))
|
||||
actor.wounds = LimbWounds.from_dictionary(data.get("wounds", {}))
|
||||
return actor
|
||||
|
||||
static func _cell_to_array(cell: Vector2i) -> Array[int]:
|
||||
|
||||
+35
-16
@@ -273,7 +273,15 @@ func _resolve_player_action(results: Array[TurnResult], sync_camera: bool) -> Ar
|
||||
_sync_camera_to_player()
|
||||
_dispatch_audio(results)
|
||||
var events := _record_events(results)
|
||||
event_presenter.enqueue(events)
|
||||
# C2 journals compatibility events, but presentation consumes the
|
||||
# authoritative structured combat stream exactly once so impacts are not
|
||||
# duplicated by legacy melee results.
|
||||
var presentation_events := events
|
||||
if events.any(func(event: GameEvent) -> bool: return event.kind == &"attack_started"):
|
||||
presentation_events = events.filter(func(event: GameEvent) -> bool:
|
||||
return event.kind not in [&"melee", &"enemy_melee", &"enemy_defeated"]
|
||||
)
|
||||
event_presenter.enqueue(presentation_events)
|
||||
event_presenter.present_next()
|
||||
hud.refresh(game_state, run_state.recent_events(run_state.log.size()), run_state)
|
||||
return results
|
||||
@@ -283,24 +291,33 @@ func _record_events(results: Array[TurnResult]) -> Array[GameEvent]:
|
||||
if results.is_empty():
|
||||
return events
|
||||
var turn := run_state.next_turn()
|
||||
# Structured C2 combat events are journaled before the legacy TurnResult
|
||||
# compatibility events. This preserves old callers' `recent_events(2)` seam.
|
||||
for result in results:
|
||||
events.append(GameEventType.new(
|
||||
turn,
|
||||
run_state.current_floor,
|
||||
result.kind,
|
||||
{
|
||||
"from_cell": result.from_cell,
|
||||
"to_cell": result.to_cell,
|
||||
"damage": result.damage,
|
||||
},
|
||||
result.message,
|
||||
result.actor_id,
|
||||
result.target_id,
|
||||
result.to_cell
|
||||
))
|
||||
for descriptor: Dictionary in result.payload.get("domain_events", []):
|
||||
var payload := {"from_cell": result.from_cell, "to_cell": result.to_cell, "damage": int(descriptor.payload.get("damage", 0))}
|
||||
payload.merge(descriptor.payload, true)
|
||||
var event_message := _combat_event_message(descriptor.kind, descriptor.actor_id, int(payload.damage))
|
||||
if descriptor.kind == &"damage_dealt":
|
||||
event_message = result.message
|
||||
events.append(GameEventType.new(turn, run_state.current_floor, descriptor.kind, payload, event_message, descriptor.actor_id, descriptor.target_id, descriptor.cell))
|
||||
for result in results:
|
||||
var payload := {"from_cell": result.from_cell, "to_cell": result.to_cell, "damage": result.damage}
|
||||
payload.merge(result.payload, true)
|
||||
events.append(GameEventType.new(turn, run_state.current_floor, result.kind, payload, result.message, result.actor_id, result.target_id, result.to_cell))
|
||||
run_state.append_events(events)
|
||||
return events
|
||||
|
||||
func _combat_event_message(kind: StringName, actor_id: StringName, damage: int) -> String:
|
||||
match kind:
|
||||
&"attack_started": return "%s attacks." % ("You" if actor_id == &"player" else "The goblin")
|
||||
&"attack_hit": return "%s hits." % ("You" if actor_id == &"player" else "The goblin")
|
||||
&"damage_dealt": return "%s deals %d damage." % [("You" if actor_id == &"player" else "The goblin"), damage]
|
||||
&"actor_died": return "The goblin is defeated." if actor_id != &"player" else "You are defeated."
|
||||
&"xp_granted": return "You gain experience."
|
||||
&"loot_dropped": return "Loot dropped."
|
||||
return ""
|
||||
|
||||
func _dispatch_audio(results: Array[TurnResult]) -> void:
|
||||
for result in results:
|
||||
match result.kind:
|
||||
@@ -314,7 +331,9 @@ func _dispatch_audio(results: Array[TurnResult]) -> void:
|
||||
audio_library.play_sfx("death")
|
||||
|
||||
func _on_event_presented(event: GameEvent) -> void:
|
||||
if event.kind == &"enemy_defeated":
|
||||
if event.kind == &"actor_died" and event.actor_id != &"player":
|
||||
# The structured actor_died event completes before subsequent XP/loot
|
||||
# no-ops, so removal retains the A3 180 ms death-fade contract.
|
||||
_sync_enemy_views()
|
||||
|
||||
func _get_actor_view(actor_id: StringName) -> ActorView:
|
||||
|
||||
@@ -50,7 +50,7 @@ func begin(event: GameEvent, actor_lookup: Callable) -> void:
|
||||
await _show_movement(event, actor_lookup)
|
||||
&"melee", &"enemy_melee", &"damage_dealt":
|
||||
await _show_impact(event, actor_lookup)
|
||||
&"enemy_defeated":
|
||||
&"enemy_defeated", &"actor_died":
|
||||
await _show_death(event, actor_lookup)
|
||||
# Existing and future domain events are intentionally presentation no-ops.
|
||||
_:
|
||||
|
||||
Reference in New Issue
Block a user