Réparation des succès en mode infini et du niveau max des mutations
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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()
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user