From 9326a5dc9198f7f97668728eff055b9943086e43 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 22 Aug 2020 23:17:25 +0200 Subject: [PATCH] fix: change the randomseed before each battle Fix #42 --- sonic-radiance.love/scenes/battlesystem/controllers/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/init.lua b/sonic-radiance.love/scenes/battlesystem/controllers/init.lua index fc3cc02..03851ae 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/init.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/init.lua @@ -28,6 +28,9 @@ function TurnController:new(scene, battleData) self.player = Player(self) self.ennemies = Ennemy(self, battleData) + + -- Change the seed at the start of each battle + math.randomseed( os.time() ) end function TurnController:startBattle()