diff --git a/game/entities/weapons/abstract_projectile.gd b/game/entities/weapons/abstract_projectile.gd index 8bb842c..2edc7f6 100644 --- a/game/entities/weapons/abstract_projectile.gd +++ b/game/entities/weapons/abstract_projectile.gd @@ -63,4 +63,7 @@ func _on_body_entered(body: Node2D) -> void: var health_component : Health = body.find_child("Health") if health_component and health_component.has_method("apply_damage"): health_component.apply_damage(damage) - queue_free() + if piercing == 0: + queue_free() + else: + piercing -= 1 diff --git a/game/entities/weapons/gatling/gatling_projectile.tscn b/game/entities/weapons/gatling/gatling_projectile.tscn index f895728..7e1e22a 100644 --- a/game/entities/weapons/gatling/gatling_projectile.tscn +++ b/game/entities/weapons/gatling/gatling_projectile.tscn @@ -19,6 +19,7 @@ radius = 1.0 script = ExtResource("2_hbgoq") damage = SubResource("Resource_ndegg") speed = 600 +piercing = 1 [node name="Sprite2D" parent="." index="0"] texture = SubResource("PlaceholderTexture2D_hbgoq")