fixed bug where game gave you more points for taking longer

This commit is contained in:
pennyrigate 2023-01-30 17:34:19 -05:00
parent cf4c987245
commit 1a0e9d5937
2 changed files with 3 additions and 4 deletions

View file

@ -27,11 +27,11 @@ func _on_Area2D_area_entered(area):
#Time bonus
if Game.golds == 50 && Game.shards == 5:
if Game.time < map.target_time_100:
Game.score += floor(2500 * (Game.time / map.target_time_100))
Game.score += max(2500 - 2500 * int(Game.time / map.target_time_100), 0)
Game.shards_collected[6] = true
else:
if Game.time < map.target_time_any:
Game.score += floor(2500 * (Game.time / map.target_time_any))
Game.score += max(2500 - 2500 * int(Game.time / map.target_time_any), 0)
Game.shards_collected[6] = true
#Life bonus
if Game.lives == 1: Game.score += 500