From 06aa466269907455dcc0931e0991e9b88714e023 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 5 Apr 2022 01:06:29 +0200 Subject: [PATCH] :bug: Fix turbo-big-arrows --- src/entities/enemies/ChaserEnemy.tscn | 2 +- src/levels/phaseone/PhaseOne.tscn | 4 ++++ src/pickups/effects/BigArrow.gd | 7 +++---- src/pickups/effects/BigArrow.tscn | 4 +++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/entities/enemies/ChaserEnemy.tscn b/src/entities/enemies/ChaserEnemy.tscn index 4e06797..223b869 100644 --- a/src/entities/enemies/ChaserEnemy.tscn +++ b/src/entities/enemies/ChaserEnemy.tscn @@ -63,7 +63,7 @@ loot_weights = [ 80.0, 10.0, 10.0 ] [node name="Damaging" type="Node" parent="." index="5"] script = ExtResource( 11 ) -damage = -10.0 +damage = -6.0 [connection signal="collided" from="AttractedToMovement" to="." method="_on_AttractedToMovement_collided"] [connection signal="moved_in_direction" from="AttractedToMovement" to="Shape/FourSidedSprite" method="_on_AttractedToMovement_moved_in_direction"] diff --git a/src/levels/phaseone/PhaseOne.tscn b/src/levels/phaseone/PhaseOne.tscn index dfe495e..1e4630b 100644 --- a/src/levels/phaseone/PhaseOne.tscn +++ b/src/levels/phaseone/PhaseOne.tscn @@ -90,6 +90,7 @@ container_name = "Enemies" wait_time = 2.0 [node name="DecreaseEvery" parent="Entities/Containers/Enemies/TowardsFireSpawner/SpawnEveryPeriod/Period" index="0" instance=ExtResource( 8 )] +wait_time = 15.0 multiplier = 0.5 [node name="SetSpawnedGoalTo" parent="Entities/Containers/Enemies/TowardsFireSpawner/SpawnEveryPeriod" instance=ExtResource( 11 )] @@ -108,6 +109,7 @@ container_name = "Enemies" wait_time = 2.0 [node name="DecreaseEvery" parent="Entities/Containers/Enemies/TowardsFireSpawner2/SpawnEveryPeriod/Period" index="0" instance=ExtResource( 8 )] +wait_time = 15.0 multiplier = 0.5 [node name="SetSpawnedGoalTo" parent="Entities/Containers/Enemies/TowardsFireSpawner2/SpawnEveryPeriod" instance=ExtResource( 11 )] @@ -126,6 +128,7 @@ container_name = "Enemies" wait_time = 2.0 [node name="DecreaseEvery" parent="Entities/Containers/Enemies/TowardsFireSpawner3/SpawnEveryPeriod/Period" index="0" instance=ExtResource( 8 )] +wait_time = 15.0 multiplier = 0.5 [node name="SetSpawnedGoalTo" parent="Entities/Containers/Enemies/TowardsFireSpawner3/SpawnEveryPeriod" instance=ExtResource( 11 )] @@ -142,6 +145,7 @@ spawning = ExtResource( 5 ) container_name = "Enemies" [node name="DecreaseEvery" parent="Entities/Containers/Enemies/TowardsPlayerSpawner/SpawnEveryPeriod/Period" index="0" instance=ExtResource( 8 )] +wait_time = 15.0 multiplier = 0.5 [node name="SetSpawnedGoalTo" parent="Entities/Containers/Enemies/TowardsPlayerSpawner/SpawnEveryPeriod" instance=ExtResource( 11 )] diff --git a/src/pickups/effects/BigArrow.gd b/src/pickups/effects/BigArrow.gd index 002de63..203b6cd 100644 --- a/src/pickups/effects/BigArrow.gd +++ b/src/pickups/effects/BigArrow.gd @@ -1,5 +1,7 @@ extends Node + +export(PackedScene) var old_spawning export(PackedScene) var new_spawning @@ -7,14 +9,11 @@ onready var target = get_tree().root.find_node("PhaseOnePlayer", true, false).ge onready var pickup: Area2D = get_parent() -var previous_spawn - func _on_picked_up(): - previous_spawn = target.spawning target.spawning = new_spawning target.connect("shot", self, "_on_shot", [], CONNECT_ONESHOT) func _on_shot(_origin, _whatever): - target.spawning = previous_spawn + target.spawning = old_spawning diff --git a/src/pickups/effects/BigArrow.tscn b/src/pickups/effects/BigArrow.tscn index 2d3160e..5793bac 100644 --- a/src/pickups/effects/BigArrow.tscn +++ b/src/pickups/effects/BigArrow.tscn @@ -1,8 +1,10 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://src/pickups/effects/BigArrow.gd" type="Script" id=1] [ext_resource path="res://src/entities/bullets/PiercingArrow.tscn" type="PackedScene" id=2] +[ext_resource path="res://src/entities/bullets/Arrow.tscn" type="PackedScene" id=3] [node name="BigArrow" type="Node"] script = ExtResource( 1 ) +old_spawning = ExtResource( 3 ) new_spawning = ExtResource( 2 )