From 92f41d9a2229028575f0e7a37f0104ce8eff6eaf Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 13 Jun 2020 20:52:23 -0300 Subject: NEW MONSTER POINT RULE. If target level is above you, you'll get +1% mob pt (capped at 50% bonus) If target level is below you, you'll get -1% mob pt (capped at 50% malus) Note: If target is exactly 1 level below you, there'll be no penalty. Numbers are always rounded down. --- npc/functions/mobpoint.txt | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'npc/functions/mobpoint.txt') diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt index 11bb40f57..6a6ed99ad 100644 --- a/npc/functions/mobpoint.txt +++ b/npc/functions/mobpoint.txt @@ -15,12 +15,28 @@ function script mobpoint { return; //if (killedrid < 1002) goto L_Return; + .@moblv=strmobinfo(3,killedrid); // You get MobLv + 20% as MobPoints. // So a level 100 monster gives you 120 MobPt. Slimes gives no bonus. if (compare("slime", strtolower(strmobinfo(1, killedrid)))) - .@addval=strmobinfo(3,killedrid); + .@addval=.@moblv; else - .@addval=strmobinfo(3,killedrid)*12/10; + .@addval=.@moblv*12/10; + + // Penalty/Bonus + .@base=(.@moblv-BaseLevel); + if (BaseLevel < .@moblv) { + // Target is stronger, +1% per monster level, capped at +50% + .@addval = .@addval * limit(100, 100+.@base, 150) / 100; + } else if (BaseLevel > .@moblv) { + // Target is weaker, -1% per monster level, capped at -50% + .@addval = .@addval * limit(50, 101+.@base, 100) / 100; + } + + // Sanitization + .@addval=max(0, .@addval); + + // Grant you the Monster Points Mobpt = Mobpt + .@addval; return; -- cgit v1.2.3-60-g2f50