feat: reconstruct standard battle continuations

This commit is contained in:
MaxTomahawk
2026-08-07 16:32:42 +02:00
parent 85c6fde443
commit 44a7910c69
7 changed files with 196 additions and 8 deletions
+11
View File
@@ -1143,4 +1143,15 @@ function Game:restoreCheckpointSave(loaded)
{ via = "checkpoint", checkpoint = true })
end
-- Install a reconstructed battle without calling BattleState:enter(), whose
-- transition, intro queues and battle-start side effects already happened in
-- the checkpointed timeline.
function Game:restoreCheckpointBattle(battle)
if self.stack:top() ~= self.overworld then
error("battle checkpoint requires a reconstructed overworld base", 0)
end
self.stack.states[#self.stack.states + 1] = battle
if battle.resumeCheckpoint then battle:resumeCheckpoint() end
end
return Game