From c54af539bc4d1f7f1e537fb87b0e4eaaeba3899c Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 19 Oct 2019 03:15:54 -0300 Subject: Defensive items now only get 25% of the max bonuses values. This should allow me now to finish craft recipes --- npc/craft/options.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3-70-g09d2