Combat overhaul: charge/gore, bear ram, matador taunt reactions
Bull charge damage: - Tunnel-proof swept detection (prev→now segment) for matador gore and bear ram, so a 66 m/s dash no longer skips clean over the thin HitArea. - Horns-first cone (bull_gore_arc): running into an enemy only wounds it when charging roughly at it, not a sideways brush. - Dash is a committed lunge: bypasses the horns cone AND the survival roll, so a dash connect is a guaranteed kill. Cruise charges keep a speed-scaled roll (mat_charge_pierce). Roll ability defers to its own pop (is_rolling guard). Bear: - Horns-first swept ram detection (edge-triggered: one charge = one wound); a tunnelling or point-blank charge now lands where body_entered wouldn't. - Overhead smash lane extends faster (0.1s) and further (20 m). - Leap slam launches the bull from anywhere in the circle (ring_frac 0). - Removed stray-quote syntax errors that broke the script. Matador: - Collider-driven stab (BladeHitbox) with recovery beat + taunt-after-hit so it stops machine-gunning the bull. - A taunting matador answers a charge: spear from range, sword up close. Spear projectile masks the BULL layer so throws connect. Tests: matador_charge/stab/spear/taunt_react, bear_ram/hitbox/fx (+ unified _fake_bull stand-in). Trimmed verbose comments. Note: bear claw-emitter/death work is still WIP (3 bear_boss_test failures). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+58
-12
@@ -39,6 +39,10 @@ func _register_all() -> void:
|
||||
# bull_hit_iframes seconds of invulnerability so a single pass can't drain it.
|
||||
_reg_f("Bull", "bull_max_hp", 10.0, 1.0, 100.0, 1.0)
|
||||
_reg_f("Bull", "bull_hit_iframes", 0.8, 0.0, 3.0, 0.1)
|
||||
# Half-angle (deg) of the bull's horns-first cone: running into an enemy only wounds it when the
|
||||
# bull's velocity points within this of the enemy (not a sideways brush). 90 = any contact at speed.
|
||||
# (The dash ability bypasses this.)
|
||||
_reg_f("Bull", "bull_gore_arc", 75.0, 10.0, 180.0, 5.0)
|
||||
# ── Dust speed thresholds ─────────────────────────────────────────────────
|
||||
_reg_f("Dust", "dust_walk_spd", 1.5, 0.1, 10.0)
|
||||
_reg_f("Dust", "dust_charge_spd", 7.0, 1.0, 20.0)
|
||||
@@ -114,6 +118,9 @@ func _register_all() -> void:
|
||||
_reg_f("Matador", "mat_idle_min", 1.2, 0.0, 5.0, 0.1)
|
||||
_reg_f("Matador", "mat_idle_max", 4.0, 0.5, 10.0, 0.1)
|
||||
_reg_f("Matador", "mat_hit_threshold", 4.0, 1.0, 30.0)
|
||||
# Planar reach at which the bull's swept charge path gores a matador (~bull + HitArea radii).
|
||||
# Raise for a more forgiving charge, lower for a more precise one.
|
||||
_reg_f("Matador", "mat_charge_gore_radius", 1.2, 0.5, 3.0, 0.05)
|
||||
_reg_f("Matador", "mat_ragdoll_impulse", 6.0, 0.5, 20.0)
|
||||
# Ragdoll joint limits — lower swing/twist = stiffer corpse that keeps its
|
||||
# shape; higher angular damp settles the flail instead of flopping flat.
|
||||
@@ -136,21 +143,42 @@ func _register_all() -> void:
|
||||
_reg_f("Matador", "mat_attack_range", 8.0, 2.0, 20.0)
|
||||
_reg_f("Matador", "mat_attack_speed", 7.5, 1.0, 12.0)
|
||||
_reg_f("Matador", "mat_attack_duration", 1.8, 0.5, 5.0, 0.1)
|
||||
_reg_f("Matador", "mat_attack_min_dist", 4.2, 0.5, 6.0, 0.1)
|
||||
# Forward drive during the opening of a melee swing — turns the stationary stab
|
||||
# into an estocada lunge so the blade covers ground toward the bull.
|
||||
_reg_f("Matador", "mat_lunge_speed", 13.0, 0.0, 20.0)
|
||||
_reg_f("Matador", "mat_lunge_time", 0.22, 0.0, 0.6, 0.01)
|
||||
# Reach of the reach-based stab (the reliable melee hit) and its re-strike gap.
|
||||
# The bull dies if it comes inside mat_stab_reach of a matador that's attacking,
|
||||
# bracing, or passing with a drawn blade — closing in is genuinely deadly.
|
||||
_reg_f("Matador", "mat_stab_reach", 1.7, 0.5, 4.0, 0.1)
|
||||
# Reach of the reach-based melee hit and its re-strike gap. This now governs ONLY the sidestep
|
||||
# PASS (mat charges the bull past with the blade out): a fast lateral sweep where the thin blade
|
||||
# Area would tunnel, so a center-to-center distance check is the reliable gore. The stationary
|
||||
# ATTACK stab no longer uses this — it drives off the sword's BladeHitbox collider (see below).
|
||||
_reg_f("Matador", "mat_stab_reach", 2.0, 0.5, 4.0, 0.1)
|
||||
# Distance the matador plants at to swing. The ATTACK stab damages off the animated BladeHitbox,
|
||||
# whose thrust reaches ~3.75 m at full extension — so this MUST stay under that or the blade never
|
||||
# touches the bull and the stab whiffs. 3.5 m keeps the matador clear of the bull's ~1.8 m-long
|
||||
# body while the thrust still lands. Raise toward 3.75 for more gap, lower to stab from closer.
|
||||
_reg_f("Matador", "mat_stab_standoff", 3.5, 0.5, 4.0, 0.1)
|
||||
# Fraction through the Attack clip at which the blade's collider is armed. The clip is guard →
|
||||
# wind-up (blade pulled back, phase ~0.3-0.5) → thrust (blade drives out to ~3.5 m, phase ~0.55+).
|
||||
# Arming at the thrust keeps the bull from being gored during the wind-up (blade not yet extended)
|
||||
# or the guard pose. The BladeHitbox overlap still decides the exact hit; this just gates timing.
|
||||
_reg_f("Matador", "mat_stab_strike_at", 0.5, 0.0, 1.0, 0.05)
|
||||
# Chance, each time a stab finishes, that the matador breaks off into something else (give ground,
|
||||
# circle, or throw) instead of immediately stabbing again — keeps it from drilling the same thrust
|
||||
# on repeat. 0 = always re-stab if in range, 1 = always break off after every stab.
|
||||
_reg_f("Matador", "mat_stab_followup_chance", 0.6, 0.0, 1.0, 0.05)
|
||||
# Beat after every stab where the brain won't re-commit to ATTACK, so it can't machine-gun the
|
||||
# bull — it circles/gives ground instead. 0 = stab as fast as range allows.
|
||||
_reg_f("Matador", "mat_stab_recovery", 0.9, 0.0, 3.0, 0.1)
|
||||
# Chance, when a stab actually CONNECTS, that the matador breaks into a crowd-pleasing taunt and
|
||||
# gives ground instead of pressing — milking the hit rather than spamming. High by design.
|
||||
_reg_f("Matador", "mat_taunt_after_hit", 0.85, 0.0, 1.0, 0.05)
|
||||
_reg_f("Matador", "mat_stab_cooldown", 0.6, 0.1, 3.0, 0.1)
|
||||
# Half-angle (deg) the matador must be facing the bull within for a stab to land.
|
||||
# Stops "sword's off to the side but I still died" — you're only gored when the
|
||||
# blade is actually presented at you.
|
||||
_reg_f("Matador", "mat_stab_arc", 55.0, 5.0, 180.0, 5.0)
|
||||
# Chance a matador rolls clear (survives) instead of ragdolling when the bull's charge connects.
|
||||
_reg_f("Matador", "mat_roll_chance", 0.8, 0.0, 1.0, 0.05)
|
||||
# How much a committed charge pierces the survival roll: roll chance fades toward
|
||||
# mat_roll_chance*(1-this) as bull speed climbs to mat_charge_speed. 1 = full-speed charge always
|
||||
# gores. (A dash connect ignores the roll entirely.)
|
||||
_reg_f("Matador", "mat_charge_pierce", 0.8, 0.0, 1.0, 0.05)
|
||||
_reg_f("Matador", "mat_roll_duration", 0.45, 0.1, 1.5, 0.05)
|
||||
# Playback rate of the Draw_weapon clip used for both drawing and sheathing —
|
||||
# higher = snappier unholster/holster.
|
||||
@@ -229,10 +257,22 @@ func _register_all() -> void:
|
||||
_reg_f("Bear", "bear_swipe_windup", 0.3, 0.05, 2.0, 0.05)
|
||||
_reg_f("Bear", "bear_swipe_recover", 0.35, 0.05, 3.0, 0.05)
|
||||
_reg_f("Bear", "bear_swipe_reach", 4.2, 1.0, 8.0, 0.1)
|
||||
# Which claw-slash FX plays on the first vs second swipe hit — the L/R clips are easy to
|
||||
# mix up, so 0 = first hit L then R, 1 = swap them. Purely cosmetic (no gameplay effect).
|
||||
_reg_f("Bear", "bear_fx_claw_swap", 0.0, 0.0, 1.0, 1.0)
|
||||
# Live yaw (deg) applied to the whole Bear_FX node before each effect fires, so the claw
|
||||
# rake / debris can be spun to line up with the bear's facing by eye. Bake the good value.
|
||||
_reg_f("Bear", "bear_fx_yaw", 0.0, -180.0, 180.0, 5.0)
|
||||
# The baked crater clip only pops up (no shrink), so hold it on the ground this long after a
|
||||
# leap slam before hiding it — otherwise it flashes for a single frame and reads as invisible.
|
||||
_reg_f("Bear", "bear_fx_crater_linger", 0.8, 0.0, 3.0, 0.1)
|
||||
# Overhead Smash (SMASH_HIT) — slower tell, biggest punish window, AoE on impact.
|
||||
_reg_f("Bear", "bear_smash_windup", 0.6, 0.1, 3.0, 0.05)
|
||||
_reg_f("Bear", "bear_smash_recover", 0.75, 0.1, 4.0, 0.05)
|
||||
_reg_f("Bear", "bear_smash_radius", 4.2, 1.0, 8.0, 0.1)
|
||||
# The overhead smash's hitbox is a forward box lane whose size + travel are authored in
|
||||
# BearAttackHitboxes.tscn's AnimationPlayer ("smash_travel"). Here we only set the upward
|
||||
# pop the bull takes off its feet at the far end (it ramps 0→this with hit distance).
|
||||
_reg_f("Bear", "bear_smash_knockup", 6.0, 0.0, 16.0, 0.5)
|
||||
# Leap Slam (JUMP_SMASH, 47 frames @30fps) — timed to the clip by FRAME: it plays the
|
||||
# crouch grounded, springs at the takeoff frame, and the arc is solved so the paws hit
|
||||
# ground exactly on the impact frame (25), leaving the tail frames to settle on the
|
||||
@@ -243,7 +283,10 @@ func _register_all() -> void:
|
||||
_reg_f("Bear", "bear_leap_height", 2.6, 0.5, 8.0, 0.1)
|
||||
_reg_f("Bear", "bear_leap_recover", 0.35, 0.0, 4.0, 0.05)
|
||||
_reg_f("Bear", "bear_leap_speed", 14.0, 4.0, 30.0, 0.5)
|
||||
_reg_f("Bear", "bear_slam_radius", 4.0, 1.0, 8.0, 0.1)
|
||||
# Where the leap-slam launch zone starts, as a fraction of the circle radius. 0 = launch anywhere
|
||||
# inside; raise to carve a grounded inner zone that only mauls (0.75 = only the outer quarter ring).
|
||||
_reg_f("Bear", "bear_leap_ring_frac", 0.0, 0.0, 1.0, 0.05)
|
||||
_reg_f("Bear", "bear_leap_knockup", 7.0, 0.0, 16.0, 0.5)
|
||||
# Stalk (WALK_ON2LEGS) — how long it will keep walking the bull down before re-deciding.
|
||||
_reg_f("Bear", "bear_stalk_time", 2.5, 0.0, 6.0, 0.1)
|
||||
# Odds a close combo chains a follow-up smash after the swipe (phase 2 always chains).
|
||||
@@ -252,6 +295,9 @@ func _register_all() -> void:
|
||||
# shrugged off, only a real charge or an ability wounds it. (The bear itself never
|
||||
# damages the bull by colliding — only its swings and slams hurt.)
|
||||
_reg_f("Bear", "bear_hit_threshold", 6.0, 1.0, 30.0, 0.5)
|
||||
# Planar reach at which a horns-first bull charge wounds the bear (~bear body radius + bull reach).
|
||||
# The bull's swept path is tested against this, so a tunnelling or point-blank charge still lands.
|
||||
_reg_f("Bear", "bear_ram_reach", 2.1, 0.5, 5.0, 0.1)
|
||||
# How long (s) the bear is rocked back and can't act after taking a hit.
|
||||
_reg_f("Bear", "bear_stagger_time", 0.5, 0.0, 2.0, 0.05)
|
||||
# Poise: after a stagger the bear shrugs off staggers for this long (hits still wound
|
||||
@@ -345,7 +391,6 @@ func _register_all() -> void:
|
||||
_reg_f("Roll", "roll_hit_strength", 22.0, 1.0, 40.0) # horizontal launch on the pop
|
||||
_reg_f("Roll", "roll_knockup", 11.0, 0.0, 25.0) # vertical knock-up on the pop
|
||||
# ── Debug overlays (see debug_draw.gd) ───────────────────────────────────
|
||||
_reg_b("Debug", "show_collisions", false)
|
||||
# PS1 post-process filter (see ps1_filter.gd on the fullscreen ColorRect):
|
||||
# screen-covering CRT/PS1 shader — pixelation, colour-banding + dither, and a
|
||||
# rolling scanline. Keys map 1:1 onto the shader uniforms; show_ps1 toggles the
|
||||
@@ -359,6 +404,7 @@ func _register_all() -> void:
|
||||
_reg_f("PS1", "ps1_roll_speed", 3.0, 0.0, 10.0, 0.1)
|
||||
_reg_f("PS1", "ps1_roll_strength", 1.0, 0.0, 1.0, 0.05)
|
||||
_reg_b("Debug", "show_hitboxes", false)
|
||||
_reg_b("Debug", "show_attacks", false)
|
||||
_reg_b("Debug", "show_bones", false)
|
||||
_reg_b("Debug", "show_raycasts", false)
|
||||
_reg_b("Debug", "show_tail", false)
|
||||
|
||||
Reference in New Issue
Block a user