This commit is contained in:
Georgiy Gorin
2026-04-23 16:27:03 +03:00
8 changed files with 246 additions and 10 deletions
+6 -2
View File
@@ -85,7 +85,7 @@ func _input(event: InputEvent) -> void:
func _physics_process(delta: float) -> void:
if not is_alive:
return
is_shielding = shield_tier > 0 and Input.is_key_pressed(KEY_SHIFT)
is_shielding = shield_tier > 0 and Input.is_key_pressed(KEY_SPACE)
_handle_movement(delta)
_handle_kick(delta)
_handle_iframes(delta)
@@ -180,7 +180,9 @@ func _do_kick() -> void:
var obj_toughness: int = best.get("toughness_tier") if best.get("toughness_tier") != null else 0
var diff_tier := kick_tier - obj_toughness
var force: float
if diff_tier < 0:
if GameSettings.difficulty == "survival":
force = 50.0
elif diff_tier < 0:
force = 15.0
elif diff_tier == 0:
force = 50.0
@@ -229,6 +231,8 @@ func receive_kick(direction: Vector3, force: float) -> void:
_squish_effect()
func take_damage(amount: int, attacker_toughness: int = 0) -> void:
if GameSettings.difficulty == "immortal":
return
if not is_alive or invincible_timer > 0.0:
return
invincible_timer = IFRAMES_DURATION