Réparation des succès en mode infini et du niveau max des mutations

This commit is contained in:
2026-07-26 17:16:39 +02:00
parent a6c1c4a770
commit 9de99680e5
7 changed files with 22 additions and 8 deletions
@@ -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
+4 -1
View File
@@ -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)
@@ -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