Complete the DamageEvent migration: one deal() entry point for every attacker
The bull's Hitbox already routed through DamageEvent, but the spear, the bear's maul, and the matador's reach-gore still did raw Object.call(&"take_sword_hit", ...) — the exact scattered string paths DamageEvent was meant to retire. Add a single static DamageEvent.deal(target, cause, at, source, knock_up) that builds the typed event and hands it to receive_damage(), falling back to the legacy string call for any not-yet-migrated victim, and route all four attackers (Hitbox included) through it. The damage_pipeline characterization test proves the bull's outcomes are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pq1VX2o1ZfiNRdCjD294wf
This commit is contained in:
+1
-1
@@ -955,7 +955,7 @@ func _try_melee_hit(reach: float) -> void:
|
||||
if facing.dot(to_bull / dist) < cos(deg_to_rad(DP.f("mat_stab_arc"))):
|
||||
return
|
||||
_blade_hit_cd = DP.f("mat_stab_cooldown")
|
||||
_bull.call(&"take_sword_hit", "gored")
|
||||
DamageEvent.deal(_bull, DamageEvent.Cause.GORED, _bull.global_position, self)
|
||||
|
||||
|
||||
func _enter_ragdoll(hit_dir: Vector3, bull_speed: float, up_boost: float = 0.0) -> void:
|
||||
|
||||
Reference in New Issue
Block a user