summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-07-01 03:06:22 -0300
committerJesusaves <cpntb1@ymail.com>2020-07-01 03:06:22 -0300
commit8452daa268edd046d14470a7ab181643dd66d1f4 (patch)
tree2ca3581932be916682e141da454f8d85ed2b2624 /npc
parent759c8ed9ea2b7b3a049487ee1e1b06f331b50574 (diff)
downloadserverdata-8452daa268edd046d14470a7ab181643dd66d1f4.tar.gz
serverdata-8452daa268edd046d14470a7ab181643dd66d1f4.tar.bz2
serverdata-8452daa268edd046d14470a7ab181643dd66d1f4.tar.xz
serverdata-8452daa268edd046d14470a7ab181643dd66d1f4.zip
Aegis Shield will not be able to get weapon-exclusive bonuses,
but will have same rolls as weapons. Shields will also have 100% rolls for DEF, MDEF, MaxHP and MaxMP. (It'll actually be rounded up, so they'll go as: +4, +8, +12, +16, +20...)
Diffstat (limited to 'npc')
-rw-r--r--npc/craft/options.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/npc/craft/options.txt b/npc/craft/options.txt
index 22b7f8a71..5ffefe0a1 100644
--- a/npc/craft/options.txt
+++ b/npc/craft/options.txt
@@ -429,6 +429,14 @@ function script csys_ArmorFix {
// Save for csys_BonusCalc
@csysArmor=CSYS_ARMOR;
+ // Shields
+ if (getiteminfo(getarg(0), ITEMINFO_LOC) == EQP_HAND_L)
+ @csysArmor=@csysArmor|CSYS_SHIELD;
+
+ // Aegis Shield is special and is not classified as armor
+ if (compare("aegis shield", strtolower(getitemname(getarg(0)))))
+ @csysArmor=@csysArmor^CSYS_ARMOR;
+
// Special sets
if (compare("savior", strtolower(getitemname(getarg(0)))))
@csysArmor=@csysArmor|CSYS_SAVIOR;
@@ -513,6 +521,12 @@ function script csys_BonusCalc {
if (@csysArmor & CSYS_ARMOR)
.@base=max(1, .@base/4);
+ // HP/MP/DEF/MDEF for shields? Revert the cap and round it
+ if (.@var == VAR_ITEMDEFPOWER || .@var == VAR_MAXHPAMOUNT ||
+ .@var == VAR_MDEFPOWER || .@var == VAR_MAXSPAMOUNT) {
+ if (@csysArmor & CSYS_SHIELD)
+ .@base*=4;
+ }
return .@base;
}