summaryrefslogtreecommitdiff
path: root/npc/functions/goodbye.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/goodbye.txt')
-rw-r--r--npc/functions/goodbye.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/npc/functions/goodbye.txt b/npc/functions/goodbye.txt
index b52146188..07697885f 100644
--- a/npc/functions/goodbye.txt
+++ b/npc/functions/goodbye.txt
@@ -150,3 +150,34 @@ function script goodbye2 {
end;
}
+
+
+
+// fortwarp(floor ID, dest map, dest x, dest y)
+// warps player along the Fortress
+
+function script fortwarp {
+ // Not unlocked
+ if ($GAME_STORYLINE >= 3 && $MK_TEMPVAR < getarg(0)) {
+ mesc l("The gate is sealed shut."), 1;
+ mesc l("The monster army is still strong on this floor!"), 1;
+ mesc l("Minimum wins: %d/%d", $MK_TEMPVAR, getarg(0)), 1;
+ close;
+ }
+
+ // If you pledged for Barbara's life, your invincibility timer is vastly better
+ if (BARBARA_STATE == 3) {
+ if (!@barb)
+ percentheal 100, 100;
+ else if ((@barb + 180) < gettimetick(2))
+ percentheal 5, 5;
+ if (@barb < gettimetick(2))
+ sc_start SC_PRESTIGE, 4500, 3500, 5000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK|SCFLAG_FIXEDRATE, getcharid(3); // 4.5 seconds duration
+ @barb = gettimetick(2) + 15;
+ }
+
+ // The actual warp within the Impregnable Fortress
+ warp getarg(1), getarg(2), getarg(3);
+ return;
+}
+