From c1dee7e99e28417246ff4f465ce01dca9b05969e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 26 Jun 2020 10:46:35 -0300 Subject: New rule for maluses while crafting: It is now 102% and bonuses lower in 0.5% only --- npc/craft/options.txt | 42 ++++++++++-------------------------------- 1 file changed, 10 insertions(+), 32 deletions(-) (limited to 'npc/craft') diff --git a/npc/craft/options.txt b/npc/craft/options.txt index 042f29ad0..d141429ba 100644 --- a/npc/craft/options.txt +++ b/npc/craft/options.txt @@ -565,38 +565,16 @@ function script csys_Apply { .@slot+=1; } - // We need a new temp var - .@slt=0; - while (.@slt < min(2, .@max_pena)) { - // You have 95% for first onus, -30% each, depending on skill lv - .@base=(3000*.@slt)+(.@lv*75); - // The bigger the base, the best for you. - // Initial bonus: 40% (lowering chance to 55%) - .@base+=40000; - // This _lowers_ base based on how many options you're using (max -30%) - // 5% per option enabled. One is always enabled so... - .@base-=limit(1000, 30000, bitmask_count(CRAFTSYS_CURRENT)*5000); - // Lower based on min. tier (max -10%) - // Note higher tier inheirts all of previous penalties - .@base-=(CRAFTSYS_CURRENT >= CRGROUP_ATK ? 2500 : 0); // 1st tier - .@base-=(CRAFTSYS_CURRENT >= CRGROUP_REGEN ? 2500 : 0); // 2nd tier - .@base-=(CRAFTSYS_CURRENT >= CRGROUP_SCRESIST ? 2500 : 0); // 3rd tier - .@base-=(CRAFTSYS_CURRENT >= CRGROUP_FINAL ? 2500 : 0); // FIN tier - - if ($@GM_OVERRIDE) - debugmes "[MALUS] Base is now %d - Chances are of %d%%", - .@base, 95000-.@base; - - if (rand(10000) > 9500-.@base) - break; - - // Apply a malus using array_pop (it was shuffled so we're fine) - .@vartp=array_pop(@csys_penalty); - .@malus=csys_BonusCalc(.@lv, .@lv2, .@vartp); - setitemoptionbyindex(.@id, .@slot, .@vartp, -(.@malus)); - .@slot+=1; - .@slt+=1; - } + // You have 102% chance of a malus, skill and equips lower it in 0.5% each + .@base=10200-(.@lv*50); + if (rand(10000) > .@base) + break; + + // Apply a malus using array_pop (it was shuffled so we're fine) + .@vartp=array_pop(@csys_penalty); + .@malus=csys_BonusCalc(.@lv, .@lv2, .@vartp); + setitemoptionbyindex(.@id, .@slot, .@vartp, -(.@malus)); + .@slot+=1; // The options have been attributed, clear temporary variables @csysArmor=false; -- cgit v1.2.3-70-g09d2