diff --git a/lua/server/events/gameflow.lua b/lua/server/events/gameflow.lua index 58bf2017..8f50b0ff 100644 --- a/lua/server/events/gameflow.lua +++ b/lua/server/events/gameflow.lua @@ -152,7 +152,7 @@ GameEvent.functions[GameEvent.Round] = function(self) repeat p = room.current - GameEvent(GameEvent.Turn):exec() + GameEvent(GameEvent.Turn, p):exec() if room.game_finished then break end room.current = room.current:getNextAlive() until p.seat >= p:getNextAlive().seat diff --git a/lua/server/serverplayer.lua b/lua/server/serverplayer.lua index dd5b61e8..c098d1ff 100644 --- a/lua/server/serverplayer.lua +++ b/lua/server/serverplayer.lua @@ -417,7 +417,7 @@ function ServerPlayer:changePhase(from_phase, to_phase) table.remove(self.phases, 1) end - GameEvent(GameEvent.Phase, self):exec() + GameEvent(GameEvent.Phase, self, self.phase):exec() return false end @@ -445,7 +445,7 @@ function ServerPlayer:gainAnExtraPhase(phase, delay) } - GameEvent(GameEvent.Phase, self):exec() + GameEvent(GameEvent.Phase, self, self.phase):exec() self.phase = current room:broadcastProperty(self, "phase") @@ -511,7 +511,7 @@ function ServerPlayer:play(phase_table) end if (not skip) or (cancel_skip) then - GameEvent(GameEvent.Phase, self):exec() + GameEvent(GameEvent.Phase, self, self.phase):exec() else room:sendLog{ type = "#PhaseSkipped", @@ -559,7 +559,7 @@ function ServerPlayer:gainAnExtraTurn(delay) local current = room.current room.current = self - GameEvent(GameEvent.Turn):exec() + GameEvent(GameEvent.Turn, self):exec() room.current = current end