fill data to Phase and Turn (#236)

This commit is contained in:
xxyheaven 2023-08-03 13:49:34 +08:00 committed by GitHub
parent 43bdfb8c53
commit c86d6a7249
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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