summaryrefslogtreecommitdiff
path: root/npc/functions/dungeon.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-03-23 11:16:07 -0300
committerJesusaves <cpntb1@ymail.com>2021-03-23 11:16:07 -0300
commit15d81154c2ed1ba989924f89fbef672a49965d38 (patch)
treebc5b8547d1cadb634f19cac4060eee19397e64d6 /npc/functions/dungeon.txt
parenta9175bf3d6916cf83f655ee95a1b56a8c8fef49f (diff)
downloadserverdata-15d81154c2ed1ba989924f89fbef672a49965d38.tar.gz
serverdata-15d81154c2ed1ba989924f89fbef672a49965d38.tar.bz2
serverdata-15d81154c2ed1ba989924f89fbef672a49965d38.tar.xz
serverdata-15d81154c2ed1ba989924f89fbef672a49965d38.zip
029-5 is now a map which causes diseases. Mitigates slime mother farming.
HP > 70%: Bleeding HP > 40%: Poison HP < 00%: Deadly Poison PS. Formula likely wrong.
Diffstat (limited to 'npc/functions/dungeon.txt')
-rw-r--r--npc/functions/dungeon.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/npc/functions/dungeon.txt b/npc/functions/dungeon.txt
index 1b3f29f2f..ef0bcc08e 100644
--- a/npc/functions/dungeon.txt
+++ b/npc/functions/dungeon.txt
@@ -11,6 +11,7 @@
OnInit:
setarray .heatmap$, "007-2";
setarray .cursemap$, "006-4", "006-4-1", "025-1";
+ setarray .sickmap$, "029-5";
end;
/////////////////////////////////////////
@@ -75,10 +76,49 @@ OnCurse:
end;
}
+/////////////////////////////////////////
+// Heartbeat for Disease effects
+OnSick:
+ // Did you left?
+ .@i=array_find(.sickmap$, getmap());
+ if (.@i < 0) {
+ @sick$="";
+ end;
+ }
+
+ // First time seeing this
+ if (@sick$ != getmap()) {
+ @sick$=getmap();
+ dispbottom l("This map contains poisonous class and may cause diseases.");
+ }
+
+ // The effect is based on HP
+ if (MaxHp*7/10 > Hp)
+ .@eff = SC_BLOODING;
+ else if (MaxHp*4/10 > Hp)
+ .@eff = SC_POISON;
+ else
+ .@eff = SC_DPOISON;
+
+ // You are in a SICKMAP$, so suffer damage from disease
+ if (@sickio > gettimetick(2)) {
+ heal -50, 0;
+ } else {
+ heal -rand2(50, 200), 0;
+ SC_Bonus(10, .@eff, 1);
+ }
+
+ // New tick (10 seconds fixed cycle)
+ addtimer2 10000, .name$+"::OnSick";
+ end;
+
+
+
//////////////////////////////
007-2 mapflag nosave 007-1,99,189
006-4 mapflag nosave 006-3,54,36
006-4-1 mapflag nosave 006-3,54,36
+029-5 mapflag nosave 029-4,21,97