summaryrefslogtreecommitdiff
path: root/world/map/npc/magic
diff options
context:
space:
mode:
authorJesusaves <jesusalva@themanaworld.org>2020-08-17 18:28:47 -0300
committerGitHub <noreply@github.com>2020-08-17 21:28:47 +0000
commitb3c25ec3d41cf95c04270adbc08c0c30b1848d48 (patch)
tree349ba0b4802d8233a1a749c0f69e2c5980e521c4 /world/map/npc/magic
parentcc7cd73338e5542b70f1255424a4df48f866d8de (diff)
downloadserverdata-b3c25ec3d41cf95c04270adbc08c0c30b1848d48.tar.gz
serverdata-b3c25ec3d41cf95c04270adbc08c0c30b1848d48.tar.bz2
serverdata-b3c25ec3d41cf95c04270adbc08c0c30b1848d48.tar.xz
serverdata-b3c25ec3d41cf95c04270adbc08c0c30b1848d48.zip
Doomsday Act 5 - Keshlam's Adventurer Guild (#560)
Contains utils, gameplay and epilogue functions for Doomsday Act 5 THE FINAL BATTLE Note: Balancing patches may follow and are expected. The debug commands (`@js33`, `@js67` and `@js99`) were not removed. There might be overlap in voicing, in case specialeffect2() fails to work as intended. Bonus Content: * MONOCLE QUEST * Golden Apple healing is now instantaneous. * PVP Coin (Unrelated but anyway) * Golden PVP Cap. * Fix PVP Cap weight.
Diffstat (limited to 'world/map/npc/magic')
-rw-r--r--world/map/npc/magic/level1-detect-magic.txt4
-rw-r--r--world/map/npc/magic/level2-lay-on-hands.txt16
-rw-r--r--world/map/npc/magic/level2-rain.txt2
3 files changed, 21 insertions, 1 deletions
diff --git a/world/map/npc/magic/level1-detect-magic.txt b/world/map/npc/magic/level1-detect-magic.txt
index e70c6218..f22be844 100644
--- a/world/map/npc/magic/level1-detect-magic.txt
+++ b/world/map/npc/magic/level1-detect-magic.txt
@@ -11,6 +11,10 @@
set .@range, (@spellpower/50)+1;
foreach 1, getmap(), POS_X - .@range, POS_Y - .@range, POS_X + .@range, POS_Y + .@range,
strnpcinfo(0) + "::OnNearbyNpc";
+ if (getmap() == "099-4")
+ addtimer 10, "#TMWFinalExam::OnMiteyo";
+ if (getmap() == "099-5" && debug)
+ addtimer 10, "#TMWFinalExam::OnMiteyo";
callfunc "magic_exp";
end;
diff --git a/world/map/npc/magic/level2-lay-on-hands.txt b/world/map/npc/magic/level2-lay-on-hands.txt
index 819f0ea2..29d9292b 100644
--- a/world/map/npc/magic/level2-lay-on-hands.txt
+++ b/world/map/npc/magic/level2-lay-on-hands.txt
@@ -10,6 +10,8 @@
if (get(GM, @target_id) == 1) end;
if (Hp <= get(MaxHp, @target_id) / 20) end; // hp needs to be > 1/20 * target hp
callfunc "adjust_spellpower";
+ if (getmap() == "099-4") goto L_SpecialRules4;
+ if (getmap() == "099-5") goto L_SpecialRules5;
if (distance(BL_ID, @target_id) >= (((sqrt(@spellpower)*12)+@spellpower)/100)+2) end;
if (sc_check(SC_HALT_REGENERATE,@target_id)) end;
if (getequipid(equip_head, @args$) == 888) end; // magic gm top hat
@@ -55,6 +57,20 @@ L_Mouboo:
callfunc "QuestMoubooHeal";
end;
+// Special rules for a couple special maps
+L_SpecialRules4:
+ if (getmap(@target_id) != "099-5") end;
+ if (sc_check(SC_HALT_REGENERATE,@target_id)) end;
+ if (getequipid(equip_head, @args$) == 888) end; // magic gm top hat
+ set @needed, get(MaxHp, @target_id) - get(Hp, @target_id);
+ goto L_Pay;
+L_SpecialRules5:
+ if (getmap(@target_id) != "099-4") end;
+ if (sc_check(SC_HALT_REGENERATE,@target_id)) end;
+ if (getequipid(equip_head, @args$) == 888) end; // magic gm top hat
+ set @needed, get(MaxHp, @target_id) - get(Hp, @target_id);
+ goto L_Pay;
+
OnInit:
set .school, SKILL_MAGIC_LIFE;
set .invocation$, chr(MAGIC_SYMBOL) + "inma"; // used in npcs that refer to this spell
diff --git a/world/map/npc/magic/level2-rain.txt b/world/map/npc/magic/level2-rain.txt
index df8ef1c9..fac98690 100644
--- a/world/map/npc/magic/level2-rain.txt
+++ b/world/map/npc/magic/level2-rain.txt
@@ -9,7 +9,7 @@ OnCast:
if (getskilllv(SKILL_MAGIC) < .level) end;
if (Sp < 17) end;
explode .@map_ext[0], getmap(), "-";
- if (.@map_ext[1] != 1) end; // XXX this is fugly, in the future let's use MF_OUTSIDE to detect if a map is "outside" or "inside"
+ if (.@map_ext[1] != 1 && getmap() != "099-5") end; // XXX this is fugly, in the future let's use MF_OUTSIDE to detect if a map is "outside" or "inside"
if (getmapflag(getmap(), MF_TOWN)) end;
if (getskilllv(.school) < 4 && countitem("BottleOfWater") >= 1) delitem "BottleOfWater", 1;
elif (getskilllv(.school) < 4) end;