summaryrefslogtreecommitdiff
path: root/npc/boss/throne.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-07-29 20:10:13 -0300
committerJesusaves <cpntb1@ymail.com>2019-07-29 20:10:13 -0300
commit8a6628c11c04179a7738c3d60b606d38bf567ab2 (patch)
tree5d67071f1e261d9f8c1146dd3750c2c7aa9ce9a2 /npc/boss/throne.txt
parent2347ce5b6c84a62be386643aa9b4773a1c3bb9d0 (diff)
downloadserverdata-8a6628c11c04179a7738c3d60b606d38bf567ab2.tar.gz
serverdata-8a6628c11c04179a7738c3d60b606d38bf567ab2.tar.bz2
serverdata-8a6628c11c04179a7738c3d60b606d38bf567ab2.tar.xz
serverdata-8a6628c11c04179a7738c3d60b606d38bf567ab2.zip
Monster King Challenge - minimal logic
Diffstat (limited to 'npc/boss/throne.txt')
-rw-r--r--npc/boss/throne.txt47
1 files changed, 47 insertions, 0 deletions
diff --git a/npc/boss/throne.txt b/npc/boss/throne.txt
index e8f375bff..d44a63c99 100644
--- a/npc/boss/throne.txt
+++ b/npc/boss/throne.txt
@@ -14,4 +14,51 @@ OnTouch:
dispbottom "The throne is cursed, only the Monster King may seat on it.";
end;
+// Controls the Event
+OnBegin:
+ .MK=monster("boss", 45, 45, "The Monster King", MonsterKing, 1, .name$+"::OnVictory");
+ .@bhp=getunitdata(.MK, UDT_MAXHP);
+ setunitdata(.MK, UDT_MAXHP, .@bhp+50000+2000*.FAILS);
+ setunitdata(.MK, UDT_HP, .@bhp+50000+2000*.FAILS);
+
+ initnpctimer;
+ end;
+
+function CheckFinalAssault {
+ if (!siege_calcdiff(5)) {
+ kamibroadcast("You noobs, you all deserve to die!", "Monster King");
+ stopnpctimer;
+ // Clean Up
+ mapwarp("boss", "017-1", 120, 88);
+ killmonsterall("boss");
+ // Raise difficulty
+ .FAILS+=1;
+ // Halt execution
+ end;
+ }
+ return;
+}
+
+OnTimer60000:
+ initnpctimer;
+OnTimer15000:
+ // Each fail raise curse duration in 0.1s - chance of curse is 15% each 15s
+ if (rand2(100) <= 15) {
+ areasc2("boss", 45, 45, 25, 3000+(.FAILS*100), SC_CURSE, BL_PC | BL_HOM | BL_MER);
+ //globalmes("MSG");
+ unittalk(.MK, "Be cursed, you fools! I am the mighty Monster King!!");
+ }
+OnTimer5000:
+OnTimer10000:
+OnTimer20000:
+OnTimer25000:
+OnTimer30000:
+OnTimer35000:
+OnTimer40000:
+OnTimer45000:
+OnTimer50000:
+OnTimer55000:
+ CheckFinalAssault();
+ end;
+
}