From 45db4b4f64809bba3d63129be2dcb461eb11176f Mon Sep 17 00:00:00 2001 From: Page Asgardius Date: Mon, 15 Jul 2024 17:22:33 -0700 Subject: [PATCH] level clear --- backgounds/result.gd | 1 + backgounds/wip.gd | 1 + export_presets.cfg | 6 +++--- global.gd | 2 +- levels/Ceres/L20.gd | 12 ++++++++++++ levels/Testrooms/bullethell.gd | 10 ++++++++++ levels/ui/Cutscenes.gd | 4 +++- levels/ui/gameplay.gd | 18 ++++++++++++------ levels/ui/talk.gd | 14 +++++++++++--- project.godot | 4 ---- text.csv | 6 ++++++ 11 files changed, 60 insertions(+), 18 deletions(-) diff --git a/backgounds/result.gd b/backgounds/result.gd index d76cec8..ead5eea 100644 --- a/backgounds/result.gd +++ b/backgounds/result.gd @@ -8,6 +8,7 @@ func _ready(): add_child(rmusic) var titlemusic = load(Global.musictracks[7]) rmusic.stream = titlemusic + rmusic.mix_target = 1 rmusic.play(0) wait = Time.get_ticks_msec() #pass # Replace with function body. diff --git a/backgounds/wip.gd b/backgounds/wip.gd index 380ec76..a21502e 100644 --- a/backgounds/wip.gd +++ b/backgounds/wip.gd @@ -8,6 +8,7 @@ func _ready(): add_child(rmusic) var titlemusic = load(Global.musictracks[1]) rmusic.stream = titlemusic + rmusic.mix_target = 1 rmusic.play(0) wait = Time.get_ticks_msec() #pass # Replace with function body. diff --git a/export_presets.cfg b/export_presets.cfg index ee49c94..10d9875 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -60,15 +60,15 @@ script_export_mode=2 custom_template/debug="" custom_template/release="" -gradle_build/use_gradle_build=true +gradle_build/use_gradle_build=false gradle_build/gradle_build_directory="" gradle_build/android_source_template="" gradle_build/compress_native_libraries=false gradle_build/export_format=0 gradle_build/min_sdk="" gradle_build/target_sdk="" -architectures/armeabi-v7a=false -architectures/arm64-v8a=true +architectures/armeabi-v7a=true +architectures/arm64-v8a=false architectures/x86=false architectures/x86_64=false version/code=1 diff --git a/global.gd b/global.gd index 9cebe5b..8a7b18e 100644 --- a/global.gd +++ b/global.gd @@ -11,7 +11,7 @@ var wait var bossready = false var playerx var playery -var ccutscene +var ccutscene = null const cutscenes = [["res://levels/Cutscenes/opening/aboutkaizo.tscn", "res://levels/Cutscenes/opening/midorihello.tscn", "res://music/scholartrip.wav", false], ["res://levels/Cutscenes/opening/midorihello.tscn", "res://levels/Cutscenes/opening/fearlessmidori.tscn", "res://music/scholartrip.wav", false], ["res://levels/Cutscenes/opening/fearlessmidori.tscn", "res://levels/Cutscenes/opening/midoriwaterfall.tscn", "res://music/midorinoakuma.wav", false], ["res://levels/Cutscenes/opening/midoriwaterfall.tscn", "res://levels/Cutscenes/opening/midorireading.tscn", "res://music/midorinoakuma.wav", false], ["res://levels/Cutscenes/opening/midorireading.tscn", "res://levels/Cutscenes/opening/chasing.tscn", "res://music/midorinoakuma.wav", false], ["res://levels/Cutscenes/opening/chasing.tscn", "res://levels/ui/gameplay.tscn", "res://music/midorinoakuma.wav", true]] const pcnames = ["Midori Asgardius", "Diana Asgardius", null, "Kimberly Arch", null, null, null, null, null, "Natasha Dostoyevsky"] const npcnames = ["Lily", null, null, "Kimberly Arch", null, null, null, null, null, "Natasha Dostoyevsky"] diff --git a/levels/Ceres/L20.gd b/levels/Ceres/L20.gd index 40f6337..7b0779e 100644 --- a/levels/Ceres/L20.gd +++ b/levels/Ceres/L20.gd @@ -24,9 +24,21 @@ func _physics_process(delta): elif player.position.y > boss.position.y && player.get_index() < boss.get_index(): move_child(player, boss.get_index() + 1) print("move down") + if Global.debug: + if Global.dstats[Global.dparty[0][0]][0] <= 0 && Global.live == 1: + _winner() + else: + if Global.cstats[Global.party[0][0]][0] <= 0 && Global.live == 1: + _winner() func _input(event): if Global.cdialog.size() != 0 && Global.live == 1: get_tree().root.remove_child(talk) Global.cdialog = [] +func _winner(): + Global.cdialog = [[tr("DIALOG_CERES_L20_3"), true, 0, 0], [tr("DIALOG_CERES_L20_4"), false, 3], [tr("DIALOG_CERES_L20_5"), true, 0, 0]] + Global.live = 3 + #talk.queue_free() + talk = load("res://levels/ui/talk.tscn").instantiate() + get_tree().root.add_child.call(talk) diff --git a/levels/Testrooms/bullethell.gd b/levels/Testrooms/bullethell.gd index 38faeed..e893e61 100644 --- a/levels/Testrooms/bullethell.gd +++ b/levels/Testrooms/bullethell.gd @@ -29,4 +29,14 @@ func _input(event): if Global.cdialog.size() != 0 && Global.live == 1: get_tree().root.remove_child(talk) Global.cdialog = [] + if Global.cboss[1] <= 0 && Global.live == 1: + _winner() + + +func _winner(): + Global.cdialog = [[tr("DIALOG_DANMAKUTEST_3"), true, 0, 0], [tr("DIALOG_DANMAKUTEST_4"), false, 9], [tr("DIALOG_DANMAKUTEST_5"), true, 0, 0]] + Global.live = 3 + #talk.queue_free() + talk = load("res://levels/ui/talk.tscn").instantiate() + get_tree().root.add_child.call(talk) diff --git a/levels/ui/Cutscenes.gd b/levels/ui/Cutscenes.gd index 68861d0..6029ac3 100644 --- a/levels/ui/Cutscenes.gd +++ b/levels/ui/Cutscenes.gd @@ -58,13 +58,15 @@ func _input(event): get_tree().change_scene_to_file("res://title.tscn") if Input.is_action_just_pressed("ui_accept"): if Global.cutscenes[Global.ccutscene][3]: + var ccutscene = Global.ccutscene + Global.ccutscene = null get_tree().root.remove_child(bhud) get_tree().root.remove_child(level) bgsound.stop() if Global.debug: get_tree().change_scene_to_file("res://levels/ui/scene.tscn") else: - get_tree().change_scene_to_file(Global.cutscenes[Global.ccutscene][1]) + get_tree().change_scene_to_file(Global.cutscenes[ccutscene][1]) else: Global.ccutscene += 1 get_tree().root.remove_child(level) diff --git a/levels/ui/gameplay.gd b/levels/ui/gameplay.gd index e72ba8f..0449b4e 100644 --- a/levels/ui/gameplay.gd +++ b/levels/ui/gameplay.gd @@ -53,7 +53,7 @@ func _ready(): # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta): var velocity = Vector2.ZERO - if Global.live == 6: + if Global.live > 4 && Global.live < 9: _exit() #velocity = (Vector2.RIGHT.rotated(rotation) * -100 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -100 * Global.ym * delta @@ -150,8 +150,14 @@ func _exit(): # get_tree().root.remove_child(bhud) #get_tree().root.remove_child(player) get_tree().root.remove_child(level) - Global.live = 0 - if Global.debug: - get_tree().change_scene_to_file("res://levels/ui/scene.tscn") - else: - get_tree().change_scene_to_file("res://title.tscn") + if Global.live == 7: + get_tree().change_scene_to_file("res://backgounds/result.tscn") + elif Global.live == 8: + get_tree().change_scene_to_file("res://levels/ui/Cutscenes.tscn") + elif Global.live == 6: + if Global.debug: + Global.live = 0 + get_tree().change_scene_to_file("res://levels/ui/scene.tscn") + else: + Global.live = 0 + get_tree().change_scene_to_file("res://title.tscn") diff --git a/levels/ui/talk.gd b/levels/ui/talk.gd index 472170a..0449277 100644 --- a/levels/ui/talk.gd +++ b/levels/ui/talk.gd @@ -42,7 +42,15 @@ func _input(event): isboss = Global.places[Global.dplace[0]][Global.dplace[1]][Global.dplace[2]][2] else: isboss = Global.places[Global.cplace[0]][Global.cplace[1]][Global.cplace[2]][2] - if isboss: - Global.bossready = true - Global.live = 1 + if Global.live == 0: + if isboss: + Global.bossready = true + Global.live = 1 + queue_free() + elif Global.live == 3: + if Global.ccutscene == null: + Global.live = 7 + else: + Global.live = 8 + queue_free() press = false diff --git a/project.godot b/project.godot index 535470a..d782811 100644 --- a/project.godot +++ b/project.godot @@ -15,10 +15,6 @@ run/main_scene="res://main.tscn" config/features=PackedStringArray("4.3", "GL Compatibility") config/icon="res://icon.png" -[audio] - -buses/default_bus_layout="" - [autoload] Global="*res://global.gd" diff --git a/text.csv b/text.csv index 76afa98..6f08f28 100644 --- a/text.csv +++ b/text.csv @@ -89,9 +89,15 @@ DIALOG_TEST_2;I got you, cheap copy;Te atrapé, copia barata;手に入れたよ DIALOG_DANMAKUTEST_0;What are you doing here?;¿Qué haces aquí?;ここで何をしているの? DIALOG_DANMAKUTEST_1;Your father need help to debug this game;Tu padre necesita ayuda para depurar este juego;あなたのお父さんはこのゲー\nムのデバッグを手伝ってほしいと思っています DIALOG_DANMAKUTEST_2;Ok, i'll help too;Bien, entonces yo también ayudaré;わかった、私も手伝うよ +DIALOG_DANMAKUTEST_3;are you OK?;¿estás bien?;大丈夫ですか? +DIALOG_DANMAKUTEST_4;I'm just a bit tired;Solo estoy un poco cansada;ちょっと疲れただけ +DIALOG_DANMAKUTEST_5;I'm leaving for now;Me voy por ahora;とりあえず出発します DIALOG_CERES_L20_0;I won’t be a healer;No seré una sanadora;私はヒーラーにはなりません DIALOG_CERES_L20_1;I want a friendly challenge, loser will obey the winner;Haremos un reto amistoso, El perdedor obedecerá al ganador;友好的な挑戦をしたい、負けた者は勝者に従う DIALOG_CERES_L20_2;My magic wand VS your bow;Mi vara mágica contra tu arco;私の魔法の杖 VS あなたの弓 +DIALOG_CERES_L20_3;I'm tired;Estoy cansada;私は疲れている +DIALOG_CERES_L20_4;You must study at Kaizo Magic School as you promised;Debes estudiar en la escuela de Magia Kaizo como prometiste;約束通りカイゾー魔法学校で勉強しなくちゃ +DIALOG_CERES_L20_5;It seems I'm lucky;Parece que tengo suerte;私は幸運のようです CERES_L20_DESC;Kimberly’s Challenge;Reto de Kimberly;キンバリーの挑戦 MENU_CHARACTER;Character List;Lista de Personajes;キャラクター一覧 MENU_TEAM;Team List;Lista de Equipos;チーム