Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/entities/base_enemy.gd
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@ func _handle_attack(action: Dictionary) -> void:


## Damage API
func apply_damage(damage: int) -> void:
func apply_damage(damage: int, attacker: Entity = null) -> void:
## Apply damage through EntityLifecycle via AutoloadHelper
var lifecycle: _EntityLifecycle = AutoloadHelper.entity_lifecycle()
if lifecycle:
lifecycle.apply_damage(null, entity, damage)
lifecycle.apply_damage(attacker, entity, damage)
else:
entity.apply_damage(damage)

Expand Down
4 changes: 2 additions & 2 deletions scripts/entities/keeper.gd
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ func trigger_damage_effect() -> void:

## Apply damage to the Keeper entity and trigger recoil on the apparition.
## Delegates to EntityLifecycle for canonical state transitions.
func apply_damage(damage: int) -> void:
func apply_damage(damage: int, attacker: Entity = null) -> void:
if entity == null:
return
var lifecycle: _EntityLifecycle = AutoloadHelper.entity_lifecycle()
if lifecycle:
lifecycle.apply_damage(null, entity, damage)
lifecycle.apply_damage(attacker, entity, damage)
else:
entity.apply_damage(damage)

Expand Down
Loading