summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/craft/options.txt17
1 files changed, 13 insertions, 4 deletions
diff --git a/npc/craft/options.txt b/npc/craft/options.txt
index 947a5c8ca..94941537d 100644
--- a/npc/craft/options.txt
+++ b/npc/craft/options.txt
@@ -409,7 +409,7 @@ function script csys_Multiplier {
// Remove problematic bonuses from armors
// Use getiteminfo before
-// csys_ArmorFix( - )
+// csys_ArmorFix( item )
function script csys_ArmorFix {
// Rare bonus
if (rand2(100) >= 5)
@@ -431,6 +431,14 @@ function script csys_ArmorFix {
return;
}
+// Update problematic bonuses for weapons
+// Use getiteminfo before
+// csys_WeaponFix( item )
+function script csys_WeaponFix {
+ @csysArmor=false;
+ return;
+}
+
// csys_BonusCalc( lv1, lv2, vartp )
// Calculates the due bonus
function script csys_BonusCalc {
@@ -472,10 +480,11 @@ function script csys_Apply {
// Remove weapon-only bonuses if it is armor
delinventorylist();
getinventorylist();
- if (getiteminfo(@inventorylist_id[.@id], ITEMINFO_TYPE) != IT_WEAPON)
- csys_ArmorFix();
+ .@itemid=@inventorylist_id[.@id];
+ if (getiteminfo(.@itemid, ITEMINFO_TYPE) != IT_WEAPON)
+ csys_ArmorFix(.@itemid);
else
- @csysArmor=false;
+ csys_WeaponFix(.@itemid);
// Shuffle the arrays
array_shuffle(@csys_attr);