diff --git a/common/game_data/scripts/infinite_progression_data.gd b/common/game_data/scripts/infinite_progression_data.gd index 969c393..2b34c9f 100644 --- a/common/game_data/scripts/infinite_progression_data.gd +++ b/common/game_data/scripts/infinite_progression_data.gd @@ -37,13 +37,14 @@ func get_available_mutations() -> Array[PlantMutation]: return get_all_mutations().slice(0, mutation_unlocked) func set_best_run(v := best_run): - if best_run < 10 and v == 10: + best_run = v + + if best_run > 10: SteamConnection.unlock_achievement(SteamConnection.ACH_STW_HIT_10_INFINITE) - if best_run < 20 and v == 20: + if best_run > 20: SteamConnection.unlock_achievement(SteamConnection.ACH_STW_HIT_20_INFINITE) - if best_run < 30 and v == 30: + if best_run > 30: SteamConnection.unlock_achievement(SteamConnection.ACH_STW_HIT_30_INFINITE) - best_run = v diff --git a/common/game_data/scripts/progression_data.gd b/common/game_data/scripts/progression_data.gd index 498f086..6410126 100644 --- a/common/game_data/scripts/progression_data.gd +++ b/common/game_data/scripts/progression_data.gd @@ -75,6 +75,9 @@ func get_all_story_steps() -> Array[StoryStep]: AstraStoryStep.new(), ] +func update_best_run(run : RunData): + best_run = max(best_run, run.level) + func finish_run(run : RunData): run_number += 1 - best_run = max(best_run, run.level) + update_best_run(run) diff --git a/common/game_data/scripts/story/infinite_story_step.gd b/common/game_data/scripts/story/infinite_story_step.gd index 246db44..331fad5 100644 --- a/common/game_data/scripts/story/infinite_story_step.gd +++ b/common/game_data/scripts/story/infinite_story_step.gd @@ -23,8 +23,17 @@ func get_player_max_energy(_difficulty_setting : int) -> int: func get_player_max_inventory(_difficulty_setting : int) -> int: return 4 -func get_objective_for_region(level : int, _difficulty_setting : int) -> int: - return basic_objective_for_region(level) +static func basic_objective_for_region(level : int) -> int: + match level: + 1: return 10 + 2: return 15 + 3: return 20 + 4: return 40 + 5: return 60 + 6: return 80 + 7: return 110 + 8: return 150 + _: return basic_objective_for_region(level-1) + (level-3) * 10 func has_cave_modifier(_level : int, _difficulty_setting : int) -> bool: return false diff --git a/entities/plants/scripts/plant_mutation.gd b/entities/plants/scripts/plant_mutation.gd index db12d39..f16a6a8 100644 --- a/entities/plants/scripts/plant_mutation.gd +++ b/entities/plants/scripts/plant_mutation.gd @@ -92,7 +92,7 @@ func get_rarity() -> int: return get_base_rarity() + level - 1 func is_max_level() -> bool: - return get_base_rarity() + level > get_max_rarity() + return get_base_rarity() + level >= get_max_rarity() func card_info() -> CardInfo: var info = CardInfo.new( diff --git a/stages/3d_scenes/cockpit_scene/scripts/cockpit.gd b/stages/3d_scenes/cockpit_scene/scripts/cockpit.gd index e13b474..3dec628 100644 --- a/stages/3d_scenes/cockpit_scene/scripts/cockpit.gd +++ b/stages/3d_scenes/cockpit_scene/scripts/cockpit.gd @@ -115,6 +115,7 @@ func _on_main_screen_activated(): GameInfo.game_data.ship_in_space = true if GameInfo.game_data.current_run == null: GameInfo.game_data.start_run() + GameInfo.game_data.progression_data.update_best_run(GameInfo.game_data.current_run) GameInfo.game_data.player_data.energy = GameInfo.game_data.player_data.max_energy var gauge_tween = get_tree().create_tween() diff --git a/stages/3d_scenes/ship_garage/assets/videos/ship_leave.blend b/stages/3d_scenes/ship_garage/assets/videos/ship_leave.blend index 7649437..25cb313 100644 Binary files a/stages/3d_scenes/ship_garage/assets/videos/ship_leave.blend and b/stages/3d_scenes/ship_garage/assets/videos/ship_leave.blend differ diff --git a/stages/3d_scenes/ship_garage/assets/videos/ship_leave.blend1 b/stages/3d_scenes/ship_garage/assets/videos/ship_leave.blend1 new file mode 100644 index 0000000..7649437 Binary files /dev/null and b/stages/3d_scenes/ship_garage/assets/videos/ship_leave.blend1 differ