diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-06-09 22:26:39 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-06-09 22:26:39 -0300 |
commit | 8995cb332fbcc046fd0ff852b80d644280274273 (patch) | |
tree | 4a31eb108b89f98f4329dc0f89d56bbc22bc99f9 /npc/craft | |
parent | f3dff45a7d82b8a17ebc8ac6c5cd283ec1af2c9b (diff) | |
download | serverdata-8995cb332fbcc046fd0ff852b80d644280274273.tar.gz serverdata-8995cb332fbcc046fd0ff852b80d644280274273.tar.bz2 serverdata-8995cb332fbcc046fd0ff852b80d644280274273.tar.xz serverdata-8995cb332fbcc046fd0ff852b80d644280274273.zip |
Fix some long standing bugs (mostly in crafting options)
Diffstat (limited to 'npc/craft')
-rw-r--r-- | npc/craft/options.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/npc/craft/options.txt b/npc/craft/options.txt index 50e043c17..81de71ef1 100644 --- a/npc/craft/options.txt +++ b/npc/craft/options.txt @@ -644,12 +644,13 @@ function script csys_Apply { } // You have 112% chance of a malus, skill and equips lower it in 0.5% each - .@base=11200-(.@lv*50); + // This value cannot go below 15% + .@base=max(1500, 11200-(.@lv*50)); if (rand(10000) < .@base && .@max_pena) { // Apply a malus using array_pop (it was shuffled so we're fine) .@vartp=array_pop(@csys_penalty); - .@malus=csys_BonusCalc(.@lv, .@lv2, .@vartp); // .@eqplv ? FIXME - .@malus=.@malus*70/100; + .@malus=csys_BonusCalc(.@lv, .@lv2, .@vartp, .@eqplv); + .@malus=max(1, .@malus*70/100); if (.@vartp > 0 && .@malus > 0) setitemoptionbyindex(.@id, .@slot, .@vartp, -(.@malus)); .@slot+=1; |