summaryrefslogtreecommitdiff
path: root/npc/craft/options.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-10-19 03:15:54 -0300
committerJesusaves <cpntb1@ymail.com>2019-10-19 03:15:54 -0300
commitc54af539bc4d1f7f1e537fb87b0e4eaaeba3899c (patch)
tree10c9491fd8789e17f906ebfb8f1e3543b85404a6 /npc/craft/options.txt
parent7836d9d9964535d25ca65907ddd5f896ffe738b2 (diff)
downloadserverdata-c54af539bc4d1f7f1e537fb87b0e4eaaeba3899c.tar.gz
serverdata-c54af539bc4d1f7f1e537fb87b0e4eaaeba3899c.tar.bz2
serverdata-c54af539bc4d1f7f1e537fb87b0e4eaaeba3899c.tar.xz
serverdata-c54af539bc4d1f7f1e537fb87b0e4eaaeba3899c.zip
Defensive items now only get 25% of the max bonuses values.
This should allow me now to finish craft recipes
Diffstat (limited to 'npc/craft/options.txt')
-rw-r--r--npc/craft/options.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/npc/craft/options.txt b/npc/craft/options.txt
index 2b2f40ff8..6d718a9f8 100644
--- a/npc/craft/options.txt
+++ b/npc/craft/options.txt
@@ -399,6 +399,9 @@ function script csys_ArmorFix {
// Remove penalties
array_remove(@csys_penalty, VAR_ITEMDEFPOWER);
array_remove(@csys_penalty, VAR_MDEFPOWER);
+
+ // Save for csys_BonusCalc
+ @csysArmor=true;
return;
}
@@ -420,6 +423,10 @@ function script csys_BonusCalc {
if (.@base >= (.@avg+1)*7/10)
.@base=rand2(1, .@avg+1);
+ // Armor? Crap it to 25%
+ if (@csysArmor)
+ .@base=.@base/4;
+
return .@base;
}
@@ -441,6 +448,8 @@ function script csys_Apply {
getinventorylist();
if (getiteminfo(@inventorylist_id[.@id], ITEMINFO_TYPE) == IT_ARMOR)
csys_ArmorFix();
+ else
+ @csysArmor=false;
// Shuffle the arrays
array_shuffle(@csys_attr);
@@ -495,7 +504,8 @@ function script csys_Apply {
.@slt+=1;
}
- // The options have been attributed
+ // The options have been attributed, clear temporary variables
+ @csysArmor=false;
return;
}