From 308a38a4c895a66cc9fced55de387b329c097cb8 Mon Sep 17 00:00:00 2001 From: Duncan Sparks Date: Wed, 9 Jan 2019 20:50:05 -0800 Subject: [PATCH] Dialogue is skipped on subsequent boss attempts --- Instances/System/DialogueRegistry.tscn | 2 +- Scenes/Dungeon 2/Dungeon2-BOSS.tscn | 22 +++++++++++----------- Scenes/GATE/CorrBoss.tscn | 6 +----- Scenes/GATE/Gate-3.tscn | 7 ++++--- Scenes/GATE/Gate-4.tscn | 4 ++-- Scenes/GATE/Gate-FINALBOSS1.tscn | 2 +- Scenes/GATE/Gate-TrueEnd3.tscn | 1 + Scenes/Startup.tscn | 2 +- Scripts/Globals/controller.gd | 3 +++ Scripts/Objects/Dungeon 2/SesdinIntro.gd | 6 +++++- Scripts/Scenes/FinalBossIntro.gd | 6 +++++- Scripts/Scenes/FinalBossIntro2.gd | 8 +++++++- Scripts/Scenes/Title.gd | 4 +++- export_presets.cfg | 2 +- 14 files changed, 46 insertions(+), 29 deletions(-) diff --git a/Instances/System/DialogueRegistry.tscn b/Instances/System/DialogueRegistry.tscn index 20ae8f2..2998335 100644 --- a/Instances/System/DialogueRegistry.tscn +++ b/Instances/System/DialogueRegistry.tscn @@ -8,7 +8,7 @@ [ext_resource path="res://Sounds/UI/Text type.wav" type="AudioStream" id=6] [ext_resource path="res://Fonts/font_standard.tres" type="DynamicFont" id=7] -[node name="DialogueRegistry" type="CanvasLayer" index="0"] +[node name="DialogueRegistry" type="CanvasLayer"] layer = 24 offset = Vector2( 0, 0 ) diff --git a/Scenes/Dungeon 2/Dungeon2-BOSS.tscn b/Scenes/Dungeon 2/Dungeon2-BOSS.tscn index fe6653d..58f3a13 100644 --- a/Scenes/Dungeon 2/Dungeon2-BOSS.tscn +++ b/Scenes/Dungeon 2/Dungeon2-BOSS.tscn @@ -24,9 +24,9 @@ [ext_resource path="res://Scripts/Objects/Dungeon 2/SesdinBoss.gd" type="Script" id=22] [ext_resource path="res://Sprites/Characters/Sesdin/Sesdin left.png" type="Texture" id=23] [ext_resource path="res://Sprites/Characters/Sesdin/Sesdin right.png" type="Texture" id=24] -[ext_resource path="res://Sprites/Characters/Sesdin/Sesdin cast left.png" type="Texture" id=25] -[ext_resource path="res://Sprites/Characters/Sesdin/Sesdin cast right.png" type="Texture" id=26] -[ext_resource path="res://Sprites/Characters/Sesdin/Sesdin cast down.png" type="Texture" id=27] +[ext_resource path="res://Sprites/Characters/Sesdin/Sesdin cast down.png" type="Texture" id=25] +[ext_resource path="res://Sprites/Characters/Sesdin/Sesdin cast left.png" type="Texture" id=26] +[ext_resource path="res://Sprites/Characters/Sesdin/Sesdin cast right.png" type="Texture" id=27] [ext_resource path="res://Sprites/Particles/Impact.png" type="Texture" id=28] [ext_resource path="res://Sounds/Objects/Turret.wav" type="AudioStream" id=29] [ext_resource path="res://Sounds/Characters/Charge.wav" type="AudioStream" id=30] @@ -138,24 +138,24 @@ animations = [ { "name": "right", "speed": 5.0 }, { -"frames": [ ExtResource( 25 ) ], +"frames": [ ExtResource( 11 ) ], "loop": true, -"name": "castleft", +"name": "down", "speed": 5.0 }, { -"frames": [ ExtResource( 26 ) ], +"frames": [ ExtResource( 25 ) ], "loop": true, -"name": "castright", +"name": "castdown", "speed": 5.0 }, { -"frames": [ ExtResource( 27 ) ], +"frames": [ ExtResource( 26 ) ], "loop": true, -"name": "castdown", +"name": "castleft", "speed": 5.0 }, { -"frames": [ ExtResource( 11 ) ], +"frames": [ ExtResource( 27 ) ], "loop": true, -"name": "down", +"name": "castright", "speed": 5.0 } ] diff --git a/Scenes/GATE/CorrBoss.tscn b/Scenes/GATE/CorrBoss.tscn index 607ddaf..a609c0e 100644 --- a/Scenes/GATE/CorrBoss.tscn +++ b/Scenes/GATE/CorrBoss.tscn @@ -11,10 +11,6 @@ [ext_resource path="res://Instances/CorruptionOverlay.tscn" type="PackedScene" id=9] [ext_resource path="res://Instances/Particles/PartsWorldborder.tscn" type="PackedScene" id=10] - - - - [sub_resource type="Gradient" id=1] offsets = PoolRealArray( 0, 1 ) @@ -75,7 +71,7 @@ extents = Vector2( 81.0026, 4.38243 ) custom_solver_bias = 0.0 extents = Vector2( 5.73753, 72.0946 ) -[node name="Node2D" type="Node2D" index="0"] +[node name="Node2D" type="Node2D"] _sections_unfolded = [ "Transform" ] diff --git a/Scenes/GATE/Gate-3.tscn b/Scenes/GATE/Gate-3.tscn index 3ee2a5a..6f6495a 100644 --- a/Scenes/GATE/Gate-3.tscn +++ b/Scenes/GATE/Gate-3.tscn @@ -13,7 +13,7 @@ custom_solver_bias = 0.0 extents = Vector2( 32, 64 ) -[node name="Node2D" type="Node2D" index="0"] +[node name="Node2D" type="Node2D"] _sections_unfolded = [ "Transform" ] @@ -68,7 +68,7 @@ corrupt_interval = 1.5 [node name="CorruptionOverlaySprite" parent="CorruptionOverlay" index="1"] -frame = 3 +frame = 13 [node name="CorruptionOverlay2" parent="." index="5" instance=ExtResource( 6 )] @@ -76,7 +76,7 @@ corrupt = false [node name="CorruptionOverlaySprite" parent="CorruptionOverlay2" index="1"] -frame = 3 +frame = 13 [node name="Walls" type="StaticBody2D" parent="." index="6"] @@ -124,6 +124,7 @@ target_scene = "res://Scenes/GATE/Gate-4.tscn" target_x = 0 target_y = 110 direction = "up" +checkpoint = true [editable path="CorruptionOverlay"] diff --git a/Scenes/GATE/Gate-4.tscn b/Scenes/GATE/Gate-4.tscn index 2f49d98..a02ad6d 100644 --- a/Scenes/GATE/Gate-4.tscn +++ b/Scenes/GATE/Gate-4.tscn @@ -75,7 +75,7 @@ corrupt_interval = 1.5 [node name="CorruptionOverlaySprite" parent="CorruptionOverlay" index="1"] -frame = 7 +frame = 10 [node name="CorruptionOverlay2" parent="." index="5" instance=ExtResource( 7 )] @@ -83,7 +83,7 @@ corrupt = false [node name="CorruptionOverlaySprite" parent="CorruptionOverlay2" index="1"] -frame = 7 +frame = 10 [node name="Walls" type="StaticBody2D" parent="." index="6"] diff --git a/Scenes/GATE/Gate-FINALBOSS1.tscn b/Scenes/GATE/Gate-FINALBOSS1.tscn index 63e8318..a7d07d0 100644 --- a/Scenes/GATE/Gate-FINALBOSS1.tscn +++ b/Scenes/GATE/Gate-FINALBOSS1.tscn @@ -85,7 +85,7 @@ radius = 9.0 custom_solver_bias = 0.0 extents = Vector2( 32, 23 ) -[node name="Node2D" type="Node2D"] +[node name="Node2D" type="Node2D" index="0"] _sections_unfolded = [ "Transform" ] diff --git a/Scenes/GATE/Gate-TrueEnd3.tscn b/Scenes/GATE/Gate-TrueEnd3.tscn index 642971a..3631308 100644 --- a/Scenes/GATE/Gate-TrueEnd3.tscn +++ b/Scenes/GATE/Gate-TrueEnd3.tscn @@ -179,6 +179,7 @@ visible = false position = Vector2( 80, 50 ) frames = SubResource( 3 ) animation = "default" +frame = 1 playing = true [node name="EndArea" type="Area2D" parent="." index="7"] diff --git a/Scenes/Startup.tscn b/Scenes/Startup.tscn index 1ac1ae7..7e0a115 100644 --- a/Scenes/Startup.tscn +++ b/Scenes/Startup.tscn @@ -7,7 +7,7 @@ [node name="Node2D" type="Node2D" index="0"] script = ExtResource( 1 ) -start_scene = "res://Scenes/Dungeon 1/Dungeon1-12.tscn" +start_scene = "res://Scenes/GATE/Gate-3.tscn" start_position = Vector2( 80, 72 ) flags = [ "jari_talk", "cultist40_talk", "holding_dungeon1key", "dungeon1_switchesTL", "dungeon1_switchesTR", "dungeon1_switchTL_1", "dungeon1_switchTL_2", "dungeon1_switchTL_3", "dungeon1_switchTL_4", "dungeon1_switchTR_1", "dungeon1_switchTR_2", "dungeon1_switchTR_3", "dungeon1_switchTR_4", "kein_talk", "keininside_talk", "dungeon1_switches2TL", "dungeon1_switches2TR", "dungeon1_switches2BL", "dungeon1_switches2BR", "dungeon1_switchTR_5", "dungeon1_switchBR2_1", "dungeon1_switchBR2_2", "dungeon1_switchBR2_3", "dungeon1_switchBR2_4", "dungeon1_switchTR2_1", "dungeon1_switchTR2_2", "dungeon1_switchTR2_3", "dungeon1_switchTR2_4", "dungeon1_switchTL2_1", "dungeon1_switchTL2_2", "dungeon1_switchBL2_1", "dungeon1_switchBL2_2", "dungeon1_switchBL2_3", "iiro_talk", "dungeon2_switchIntro", "dungeon2_switchesL", "dungeon2_switchesR", "dungeon2_switchL1", "dungeon2_switchL2", "dungeon2_switchR1", "dungeon2_switchR2", "dungeon2_switchR3", "dungeon2_switchR4", "dungeon2_door1", "gold_1", "gold_2", "gold_3", "gold_4", "gold_5", "gold_6", "gold_7", "gold_8", "gold_9", "dungeon2_switchesL2", "dungeon2_switchesR2", "holding_dungeon2key", "holding_bow", "dungeon1_complete", "keinoutside_talk", "dungeon2_complete", "holding_gatekey", "jarid1_talk", "jarid2_talk", "iiro00_talk", "azura_talk", "azura12_talk", "azura00_talk", "gallaro_talk", "gold_10", "gold_11", "kein00_talk" ] title_screen = true diff --git a/Scripts/Globals/controller.gd b/Scripts/Globals/controller.gd index e88c5af..1dff788 100644 --- a/Scripts/Globals/controller.gd +++ b/Scripts/Globals/controller.gd @@ -16,6 +16,9 @@ var corrupted_cells_add_checkpoint = [] var holding_thekey = false var holding_theitem = false +var boss2_init = false +var finalboss_init = false + var bad_ending = false var true_ending = false diff --git a/Scripts/Objects/Dungeon 2/SesdinIntro.gd b/Scripts/Objects/Dungeon 2/SesdinIntro.gd index 23f2b5f..610f2e5 100644 --- a/Scripts/Objects/Dungeon 2/SesdinIntro.gd +++ b/Scripts/Objects/Dungeon 2/SesdinIntro.gd @@ -51,6 +51,7 @@ func _physics_process(delta): func intro(): $Sprite.play("down") + controller.boss2_init = true controller.dialogue(dialogue_text, self, 10, 10, 140, 45) func teleport(): @@ -70,7 +71,10 @@ func _on_TimerIntro_timeout(): Player.state = Player.NO_INPUT Player.motion = Vector2(0,0) Player.face = Vector2(0,-1) - intro() + if controller.boss2_init: + _on_TimerTeleport_timeout() + else: + intro() func _on_TimerTeleport_timeout(): teleport() diff --git a/Scripts/Scenes/FinalBossIntro.gd b/Scripts/Scenes/FinalBossIntro.gd index 2913d1e..0f7c771 100644 --- a/Scripts/Scenes/FinalBossIntro.gd +++ b/Scripts/Scenes/FinalBossIntro.gd @@ -29,7 +29,11 @@ func _on_EntryTrigger_body_entered(body): active = true func _on_TimerMusic_timeout(): - $MusicConfrontation.play(0) + if controller.finalboss_init: + controller.scene_change("res://Scenes/GATE/Gate-FINALBOSS2.tscn", false) + Player.hide() + else: + $MusicConfrontation.play(0) func _on_TimerDialogue_timeout(): controller.dialogue_registry(text_1, self, 15, 10, 100, 50, false) diff --git a/Scripts/Scenes/FinalBossIntro2.gd b/Scripts/Scenes/FinalBossIntro2.gd index 4954128..ae5ac59 100644 --- a/Scripts/Scenes/FinalBossIntro2.gd +++ b/Scripts/Scenes/FinalBossIntro2.gd @@ -15,8 +15,14 @@ func _physics_process(delta): Player.get_node("Sprite").play("up") func _on_TimerDialogue_timeout(): - controller.dialogue_registry(text_2, self, 15, 10, 100, 50, false) + if controller.finalboss_init: + get_node("TimerStartBoss").start() + audioplayer.get_node("MusicFinalBoss").play(0) + audioplayer.current_music = audioplayer.get_node("MusicFinalBoss").stream + else: + controller.dialogue_registry(text_2, self, 15, 10, 100, 50, false) func _on_TimerStartBoss_timeout(): + controller.finalboss_init = true controller.scene_change("res://Scenes/GATE/CorrBoss.tscn") Player.show() diff --git a/Scripts/Scenes/Title.gd b/Scripts/Scenes/Title.gd index fab072b..5863c9f 100644 --- a/Scripts/Scenes/Title.gd +++ b/Scripts/Scenes/Title.gd @@ -237,7 +237,9 @@ func input(): controller.player_corruption = 0 controller.player_gold = 20 controller.player_potions = 5 - + + controller.boss2_init = false + controller.finalboss_init = false controller.corrupted_cells_add = [] controller.bad_ending = false controller.true_ending = false diff --git a/export_presets.cfg b/export_presets.cfg index 74b44e3..ef30401 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -18,7 +18,7 @@ binary_format/64_bits=true custom_template/release="" custom_template/debug="" application/icon="C:/Users/Duncan Sparks/Downloads/favicon.ico" -application/file_version="1.0" +application/file_version="1.1" application/product_version="" application/company_name="Studio Fractal" application/product_name=""