From dbbd82929270538b4d6e3cef2fbd1d35ef01c776 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 16 Jul 2020 23:27:59 -0300 Subject: Now going option-less will NOT wipe options, it'll add MAXHP option instead. And weapons cannot have any form of defense bonus. --- npc/craft/options.txt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'npc') diff --git a/npc/craft/options.txt b/npc/craft/options.txt index fb23c7fd2..3928adff1 100644 --- a/npc/craft/options.txt +++ b/npc/craft/options.txt @@ -426,6 +426,10 @@ function script csys_ArmorFix { array_remove(@csys_penalty, VAR_ITEMDEFPOWER); array_remove(@csys_penalty, VAR_MDEFPOWER); + // If the options were wiped, add a random one + if (getarraysize(@csys_attr) == 0) + array_push(@csys_attr, VAR_MAXHPAMOUNT); + // Save for csys_BonusCalc @csysArmor=CSYS_ARMOR; @@ -454,12 +458,13 @@ function script csys_WeaponFix { .@sub=getiteminfo(getarg(0,Acorn), ITEMINFO_SUBTYPE); @csysArmor=0; - // Only remove one; There is a rationale for this: - // If you go only with defense level 1, it'll break item. - if (any(true,false)) - array_remove(@csys_attr, VAR_ITEMDEFPOWER); - else - array_remove(@csys_attr, VAR_MDEFPOWER); + // Remove the defense options + array_remove(@csys_attr, VAR_ITEMDEFPOWER); + array_remove(@csys_attr, VAR_MDEFPOWER); + + // If the options were wiped, add a random one + if (getarraysize(@csys_attr) == 0) + array_push(@csys_attr, VAR_MAXHPAMOUNT); // Weapon Subtype if (.@sub == W_FIST || .@sub == W_KNUCKLE) -- cgit v1.2.3-60-g2f50