more knockback, reactivate player shield

This commit is contained in:
SondreElg
2025-10-05 14:15:40 +02:00
parent 724139155e
commit 2a187fe7af
4 changed files with 5 additions and 2 deletions

View File

@@ -120,6 +120,7 @@ func shuffle_deck():
discard_pile.clear();
drawpile.shuffle();
active_card_index = 0;
get_node(player).shield_active = true;
func get_cards() -> Array:
return get_card_container().get_children().map(func(c): return c.get_node_or_null("Card"))

View File

@@ -123,4 +123,5 @@ func reboot():
position = Vector2.ZERO;
velocity = Vector2.ZERO;
move_state = MoveState.Still;
shield_active = true;
# hand.discard_all();

View File

@@ -77,4 +77,6 @@ func take_hit(damage, knockback_vector, knockback_strength = 1):
# Flash white?
func _on_body_entered(body: Node2D) -> void:
body.take_hit(1, self.position.direction_to(body.position) * 100, 2)
if self.spawning_state == SpawningState.Spawning:
return
body.take_hit(1, self.position.direction_to(body.position) * 500, 2)

View File

@@ -234,7 +234,6 @@ radius = 85.0
radius = 120.0
[node name="Virus" type="Node2D"]
position = Vector2(0, -1)
script = ExtResource("1_5nuwd")
[node name="HitSFX" type="AudioStreamPlayer" parent="."]