summaryrefslogtreecommitdiff
path: root/world
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-03 18:04:53 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-03 18:04:53 -0300
commit5c83426a20d1e00f09b229182c8b8e35c7f44370 (patch)
tree2faa2b77a28ae4e17c8b9dd80c4c021a50100633 /world
parent19e2021fd657664bb854f1b73247eade047fe58a (diff)
downloadserverdata-5c83426a20d1e00f09b229182c8b8e35c7f44370.tar.gz
serverdata-5c83426a20d1e00f09b229182c8b8e35c7f44370.tar.bz2
serverdata-5c83426a20d1e00f09b229182c8b8e35c7f44370.tar.xz
serverdata-5c83426a20d1e00f09b229182c8b8e35c7f44370.zip
Prevent summoning in event maps during Christmas 2020.
This is very hackish, and the explanation is as hackish as the code. But hey, it gets the job done, and self-disables after Christmas, so.
Diffstat (limited to 'world')
-rw-r--r--world/map/npc/magic/_procedures.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/world/map/npc/magic/_procedures.txt b/world/map/npc/magic/_procedures.txt
index 6ba748a9..66f356c7 100644
--- a/world/map/npc/magic/_procedures.txt
+++ b/world/map/npc/magic/_procedures.txt
@@ -38,6 +38,7 @@ function|script|magic_checks
if(@_M_BLOCK) goto L_Blocked; // check if last debuff ended
if(Hp < 1) goto L_Dead; // can not cast when dead
if (MATK1 < 1 && .@nonmagic < 1) goto L_Greybar; // can not cast with a grey mana bar
+ if ($@xmas_time && $@xmas_time != $@xmas_reward_time) goto L_Christmas2020;
return 0;
L_Hidden:
@@ -60,6 +61,35 @@ L_Login:
smsg SMSG_FAILURE, "Magic: Impossible to cast for 10s after logging in.";
return 5;
+L_Xmas2020:
+ smsg SMSG_FAILURE, "Magic: Jack Frost's magical powers prevented your summoning!";
+ return 6;
+
+
+L_Christmas2020:
+ if (gettime(7) != 2020)
+ goto L_Return;
+
+ // If it is not Astral nor Dark I don't really care
+ if (.school != SKILL_MAGIC_ASTRAL && .school != SKILL_MAGIC_DARK)
+ goto L_Return;
+
+ // TODO: Not all astral nor all dark magic are summons
+ // But I don't have that sort of fine grained control in TMWA
+ // So I must whitelist a few invocations and hope they cover everything
+ if (.invocation$ == "#asorm" || .invocation$ == "#anwiltyp" || .invocation$ == "#phlex")
+ goto L_Return;
+
+ // Not in burst time, so not really important?
+ // Actually, nevermind, that would not use snowball >__>
+
+ // Unallowed in the map
+ if (getmap() == "034-1" || getmap() == "033-1" || getmap() == "046-1" || getmap() == "047-1")
+ goto L_Xmas2020;
+
+ // Other map? Don't care
+ goto L_Return;
+
L_Return:
return 0;
}