bear long range slam. and not rotating while attacking animore. but dash and movement damage not working now
This commit is contained in:
@@ -49,9 +49,8 @@ visible = false
|
|||||||
|
|
||||||
[node name="RigidBody3D" type="AnimatableBody3D" parent="bear_model/test_cube/Bear_FX/Bear_fx_smash_hit" index="0" unique_id=1764208051]
|
[node name="RigidBody3D" type="AnimatableBody3D" parent="bear_model/test_cube/Bear_FX/Bear_fx_smash_hit" index="0" unique_id=1764208051]
|
||||||
transform = Transform3D(1.0000001, -1.21071935e-08, -1.8626451e-08, -9.313226e-10, 0.99999994, 7.450581e-09, 3.7252903e-09, -1.4901161e-08, 0.99999994, 0, 0, 0)
|
transform = Transform3D(1.0000001, -1.21071935e-08, -1.8626451e-08, -9.313226e-10, 0.99999994, 7.450581e-09, 3.7252903e-09, -1.4901161e-08, 0.99999994, 0, 0, 0)
|
||||||
disable_mode = 1
|
collision_layer = 0
|
||||||
collision_layer = 8
|
collision_mask = 0
|
||||||
collision_mask = 2
|
|
||||||
|
|
||||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="bear_model/test_cube/Bear_FX/Bear_fx_smash_hit/RigidBody3D" unique_id=1779197150]
|
[node name="CollisionShape3D2" type="CollisionShape3D" parent="bear_model/test_cube/Bear_FX/Bear_fx_smash_hit/RigidBody3D" unique_id=1779197150]
|
||||||
transform = Transform3D(0.99993557, -0.00749125, -0.010078691, 0.0077760145, 0.999569, 0.028562747, 0.009858355, -0.028639637, 0.9995405, -1.5136471, 0.9093375, 35.591957)
|
transform = Transform3D(0.99993557, -0.00749125, -0.010078691, 0.0077760145, 0.999569, 0.028562747, 0.009858355, -0.028639637, 0.9995405, -1.5136471, 0.9093375, 35.591957)
|
||||||
|
|||||||
Binary file not shown.
@@ -280,29 +280,62 @@ func _decide() -> void:
|
|||||||
|
|
||||||
var dist := _flat_dist_to_bull()
|
var dist := _flat_dist_to_bull()
|
||||||
var options: Array
|
var options: Array
|
||||||
|
|
||||||
if dist <= DP.f("bear_close_range"):
|
if dist <= DP.f("bear_close_range"):
|
||||||
# In strike range: punch or overhead (both step in during the swing).
|
# Short range: claw attack
|
||||||
options = [[State.SWIPE, 3.0], [State.SMASH, 3.0 if _enraged else 2.5]]
|
options = [[State.SWIPE, 3.0]]
|
||||||
|
|
||||||
elif dist <= DP.f("bear_mid_range"):
|
elif dist <= DP.f("bear_mid_range"):
|
||||||
# Mid: mostly walk the bull down on two legs; occasionally leap the gap.
|
# Mid range: jump smash or walk closer
|
||||||
options = [[State.STALK, 3.0], [State.LEAP, 2.0 if _enraged else 1.5]]
|
options = [
|
||||||
|
[State.LEAP, 2.0 if _enraged else 1.5],
|
||||||
|
[State.STALK, 3.0]
|
||||||
|
]
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Far: lope in on all fours, or spring across with a leap.
|
# Long range: smash or prowl
|
||||||
options = [[State.PROWL, 3.0], [State.LEAP, 1.5]]
|
options = [
|
||||||
|
[State.SMASH, 3.0 if _enraged else 2.5],
|
||||||
|
[State.PROWL, 3.0]
|
||||||
|
]
|
||||||
|
|
||||||
_start_routine(_weighted_pick(options))
|
_start_routine(_weighted_pick(options))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if dist <= DP.f("bear_close_range"):
|
||||||
|
# Short range — claw attack
|
||||||
|
options = [[State.SWIPE, 3.0]]
|
||||||
|
|
||||||
|
elif dist <= DP.f("bear_mid_range"):
|
||||||
|
# Mid range — jump smash or stalk closer
|
||||||
|
options = [[State.LEAP, 2.0 if _enraged else 1.5], [State.STALK, 3.0]]
|
||||||
|
|
||||||
|
else:
|
||||||
|
# Long range — smash is allowed from farther away
|
||||||
|
options = [[State.SMASH, 3.0 if _enraged else 2.5], [State.PROWL, 3.0]]
|
||||||
|
|
||||||
|
|
||||||
# A queued combo step only fires if the bull is still roughly in its band, so a chain
|
# A queued combo step only fires if the bull is still roughly in its band, so a chain
|
||||||
# doesn't whiff into empty air after the player rolls away.
|
# doesn't whiff into empty air after the player rolls away.
|
||||||
func _range_allows(routine: State) -> bool:
|
func _range_allows(routine: State) -> bool:
|
||||||
if _bull == null:
|
if _bull == null:
|
||||||
return routine == State.PROWL
|
return routine == State.PROWL
|
||||||
|
|
||||||
var dist := _flat_dist_to_bull()
|
var dist := _flat_dist_to_bull()
|
||||||
|
|
||||||
match routine:
|
match routine:
|
||||||
State.SWIPE, State.SMASH:
|
State.SWIPE:
|
||||||
return dist <= DP.f("bear_close_range") * 1.4
|
return dist <= DP.f("bear_close_range") * 1.4
|
||||||
|
|
||||||
State.LEAP:
|
State.LEAP:
|
||||||
return dist <= DP.f("bear_mid_range") * 1.5
|
return dist <= DP.f("bear_mid_range") * 1.5
|
||||||
|
|
||||||
|
State.SMASH:
|
||||||
|
# Smash can be started from any distance.
|
||||||
|
# The attack itself will move toward the bull.
|
||||||
|
return true
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
||||||
|
|
||||||
@@ -419,8 +452,8 @@ func _tick_smash(delta: float) -> void:
|
|||||||
if _phase_timer <= 0.0:
|
if _phase_timer <= 0.0:
|
||||||
_begin_attack_active(_anim_smash, 0.9)
|
_begin_attack_active(_anim_smash, 0.9)
|
||||||
Phase.ACTIVE:
|
Phase.ACTIVE:
|
||||||
# The overhead steps in less than the swipe — it's a commitment, not a rush.
|
# The overhead steps in less than the swipe — it's a commitment, not a rush. no rotation
|
||||||
_lunge_and_track(DP.f("bear_lunge_speed") * 0.5, delta)
|
_lunge_and_track_no_rotation(DP.f("bear_lunge_speed") * 0.5, delta)
|
||||||
_phase_timer -= delta
|
_phase_timer -= delta
|
||||||
var frac := 1.0 - _phase_timer / maxf(_active_len, 0.001)
|
var frac := 1.0 - _phase_timer / maxf(_active_len, 0.001)
|
||||||
if _hits_done == 0 and frac >= 0.4:
|
if _hits_done == 0 and frac >= 0.4:
|
||||||
@@ -552,6 +585,20 @@ func _lunge_and_track(speed: float, delta: float) -> void:
|
|||||||
_accelerate(to_bull / dist, speed, delta)
|
_accelerate(to_bull / dist, speed, delta)
|
||||||
else:
|
else:
|
||||||
_decelerate(_PLANT_DECEL, delta)
|
_decelerate(_PLANT_DECEL, delta)
|
||||||
|
|
||||||
|
|
||||||
|
func _lunge_and_track_no_rotation(speed: float, delta: float) -> void:
|
||||||
|
if _bull == null:
|
||||||
|
_decelerate(_PLANT_DECEL, delta)
|
||||||
|
return
|
||||||
|
|
||||||
|
var to_bull := _flat_to_bull()
|
||||||
|
var dist := to_bull.length()
|
||||||
|
|
||||||
|
if speed > 0.0 and dist > _BULL_STANDOFF:
|
||||||
|
_accelerate(to_bull / dist, speed, delta)
|
||||||
|
else:
|
||||||
|
_decelerate(_PLANT_DECEL, delta)
|
||||||
|
|
||||||
|
|
||||||
# ── Hitting the bull ───────────────────────────────────────────────────────────────
|
# ── Hitting the bull ───────────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ func _register_all() -> void:
|
|||||||
# steps in during the swing (see bear_lunge_speed) rather than needing to be on top.
|
# steps in during the swing (see bear_lunge_speed) rather than needing to be on top.
|
||||||
_reg_f("Bear", "bear_close_range", 5.0, 1.0, 12.0, 0.1)
|
_reg_f("Bear", "bear_close_range", 5.0, 1.0, 12.0, 0.1)
|
||||||
_reg_f("Bear", "bear_mid_range", 10.0, 3.0, 20.0, 0.5)
|
_reg_f("Bear", "bear_mid_range", 10.0, 3.0, 20.0, 0.5)
|
||||||
|
_reg_f("Bear", "bear_long_range", 15.0, 3.0, 100.0, 0.5)
|
||||||
# Beat spent in NEUTRAL sizing up the bull between routines — kept short so the bear
|
# Beat spent in NEUTRAL sizing up the bull between routines — kept short so the bear
|
||||||
# flows straight from one action into the next instead of pausing (raise for a more
|
# flows straight from one action into the next instead of pausing (raise for a more
|
||||||
# hesitant, readable boss; near-0 for relentless pressure). Shrinks again in phase 2.
|
# hesitant, readable boss; near-0 for relentless pressure). Shrinks again in phase 2.
|
||||||
|
|||||||
Reference in New Issue
Block a user