diff options
Diffstat (limited to 'npc')
-rw-r--r-- | npc/001-14/ctrl.txt | 18 |
1 files changed, 15 insertions, 3 deletions
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; |