rollback huge hit
This commit is contained in:
+6
-4
@@ -142,7 +142,7 @@ func _chase(delta: float) -> void:
|
||||
if target.has_method("take_damage"):
|
||||
target.take_damage(damage_to_player)
|
||||
FX.hit_spark(target.global_position + Vector3(0, 0.5, 0), get_parent(), Color(0.95, 0.18, 0.08))
|
||||
if randf() < 0.3:
|
||||
#if randf() < 0.3:
|
||||
var knock_dir := diff.normalized() if dist > 0.01 else -global_transform.basis.z
|
||||
knock_dir.y = 0.0
|
||||
target.call("receive_kick", knock_dir, 12.0 + kick_tier * 10.0)
|
||||
@@ -185,8 +185,8 @@ func _try_enemy_kick() -> void:
|
||||
var k := node as Node3D
|
||||
if k == null or not is_instance_valid(k):
|
||||
continue
|
||||
if k.get("kickable_type") == "stick":
|
||||
continue
|
||||
#if k.get("kickable_type") == "stick":
|
||||
#continue
|
||||
var kfv = k.get("fly_vel")
|
||||
if kfv != null and Vector2((kfv as Vector3).x, (kfv as Vector3).z).length() > 15.0:
|
||||
continue
|
||||
@@ -226,7 +226,9 @@ func _try_enemy_kick() -> void:
|
||||
if to_player.length() < ENEMY_KICK_RANGE:
|
||||
var player_toughness: int = target.get("toughness_tier") if target.get("toughness_tier") != null else 0
|
||||
if player_toughness < kick_tier:
|
||||
target.call("receive_kick", kick_dir, 12.0 + kick_tier * 10.0)
|
||||
# light kick
|
||||
# target.call("receive_kick", kick_dir, 12.0 + kick_tier * 10.0)
|
||||
target.call("receive_kick", kick_dir, 35.0 + kick_tier * 8.0)
|
||||
FX.hit_spark(target.global_position + Vector3(0, 0.5, 0), get_parent(), Color(0.95, 0.18, 0.08))
|
||||
enemy_kick_timer = ENEMY_KICK_COOLDOWN
|
||||
|
||||
|
||||
@@ -236,6 +236,9 @@ func take_damage(amount: int, attacker_toughness: int = 0) -> void:
|
||||
var diff := shield_tier - attacker_toughness
|
||||
var mod: float = 0.15 if diff >= 2 else (0.30 if diff == 1 else 0.50)
|
||||
amount = int(amount * mod)
|
||||
|
||||
health = min(health - amount, max_health)
|
||||
emit_signal("health_changed", health, max_health)
|
||||
_squish_effect()
|
||||
|
||||
func heal(amount: int) -> void:
|
||||
|
||||
Reference in New Issue
Block a user