fix(game): suppress endings while the tutorial is active
A command during the walkthrough (e.g. use front_door -> fled) no longer ends the game mid-tutorial; a pending ending fires once the tutorial finishes or is skipped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -84,6 +84,11 @@ public class Game {
|
||||
|
||||
/** Ends the game if any ending's conditions are met, printing its screen. */
|
||||
private void maybeEnd() {
|
||||
// Don't end the game (win or lose) while the player is still in the tutorial —
|
||||
// a pending ending fires once the walkthrough finishes or is skipped.
|
||||
if (tutorialGuide != null && tutorialGuide.isActive()) {
|
||||
return;
|
||||
}
|
||||
Ending e = EndingEngine.triggered(ctx);
|
||||
if (e != null) {
|
||||
ctx.getIo().print(EndingEngine.render(e, ctx, ctx.getSession().getTurn()));
|
||||
|
||||
Reference in New Issue
Block a user