From 2607f9c325adcd91d4ce43745bcbecc546031a94 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 16 Jan 2022 18:19:12 -0300 Subject: Handle all outstanding flaws but testing still required (and ASAP) --- npc/001-14/ctrl.txt | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'npc') diff --git a/npc/001-14/ctrl.txt b/npc/001-14/ctrl.txt index e86dd72e7..572ecce7d 100644 --- a/npc/001-14/ctrl.txt +++ b/npc/001-14/ctrl.txt @@ -320,9 +320,7 @@ OnInit: next; mesc l("Begin campaign?"), 1; if (askyesno() == ASK_NO) close; - // FIXME: Intercept death event or handle it better (a timer with map check?) - -OnStart: + addtimer 2500, instance_npcname("Hocus#MOLY0800")+"::OnCheck"; @map$ = getmap(); @moly_tick = gettimetick(2); // Will be used to determine score @moly_score = 0; // Actually unused @@ -598,6 +596,20 @@ OnWin: // *: Distance is always at least ~50 tiles in a straight line end; +OnCheck: + if (@moly_chall != 8) end; + // Game Over + if (ispcdead() || + getmap() != MAZE_MAP$) { // NOT a typo - starting square is OK + // Game Over! + dispbottom col(l("You have been disqualified - died or left the maze"), 1); + @moly_score = 0; + @moly_chall = 0; + end; + } + addtimer 2500, instance_npcname("Hocus#MOLY0800")+"::OnCheck"; + end; + OnInit: .distance=7; end; -- cgit v1.2.3-70-g09d2