diff --git a/autoloads/game.gd b/autoloads/game.gd index ddcea6e..52f43c0 100644 --- a/autoloads/game.gd +++ b/autoloads/game.gd @@ -105,10 +105,10 @@ func tally_scores() -> void: # collection bonus if keys >= 50: collection_bonus += 500 - if shards >= 5: + if _get_shards() >= 5: collection_bonus += 500 # 100% collection - if keys >= 50 and shards >= 5: + if keys >= 50 and _get_shards() >= 5: collection_bonus += 250 shards_collected[5] = true # 100% time bonus @@ -131,6 +131,7 @@ func tally_scores() -> void: perfect_bonus += 1000 # final score final_score = score + arrows_bonus + collection_bonus + time_bonus + life_bonus + perfect_bonus + print(collection_bonus) Game.save() @@ -176,7 +177,7 @@ func save(): var save_data: Save.LevelSaveData = Save.current_file.levels[save_id] # save score and time depending on completion - if shards >= 5 && keys >= 50: + if _get_shards() >= 5 && keys >= 50: save_data.score_100 = max(save_data.score_100, final_score) save_data.time_100 = min(save_data.time_100, time) else: @@ -230,7 +231,7 @@ func freeze_frame(time): #Check if 100%ed func has_collection_bonus(): - return shards == 5 && keys == 50 + return _get_shards() == 5 && keys == 50 # called when player dies func _on_player_died() -> void: