summaryrefslogtreecommitdiff
path: root/npc/craft
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-07-16 23:27:59 -0300
committerJesusaves <cpntb1@ymail.com>2020-07-16 23:27:59 -0300
commitdbbd82929270538b4d6e3cef2fbd1d35ef01c776 (patch)
treed69c624230205d33b94750fdbb4d7ecb2c8de82e /npc/craft
parent0e046a0fc6c2a37084dddbb83d0b58cfa4d01052 (diff)
downloadserverdata-dbbd82929270538b4d6e3cef2fbd1d35ef01c776.tar.gz
serverdata-dbbd82929270538b4d6e3cef2fbd1d35ef01c776.tar.bz2
serverdata-dbbd82929270538b4d6e3cef2fbd1d35ef01c776.tar.xz
serverdata-dbbd82929270538b4d6e3cef2fbd1d35ef01c776.zip
Now going option-less will NOT wipe options, it'll add MAXHP option instead.
And weapons cannot have any form of defense bonus.
Diffstat (limited to 'npc/craft')
-rw-r--r--npc/craft/options.txt17
1 files changed, 11 insertions, 6 deletions
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)