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 | |
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)
-rw-r--r-- | npc/craft/options.txt | 7 | ||||
-rw-r--r-- | npc/functions/random-talk.txt | 2 |
2 files changed, 5 insertions, 4 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; diff --git a/npc/functions/random-talk.txt b/npc/functions/random-talk.txt index d4e0396f7..212a319e5 100644 --- a/npc/functions/random-talk.txt +++ b/npc/functions/random-talk.txt @@ -190,7 +190,7 @@ function script legiontalk { npctalkonce(l("I thought sandstorms would make difficult to walk, but it is just awful on my skin.")); else if (.@m & MASK_SNOW) npctalkonce(l("Ugh, it's even colder today than other days. I hope this snowstorm ends soon.")); - else if (.@m & MASK_NIGHT) + else if (.@m & MASK_NIGHT) // Beware: NOT the same as is_night() npctalkonce(l("I'm tired, but I can't sleep, I am tasked with the night watch.")); else npctalkonce(l("I hope my shift ends soon, so I can go home rest and drink a little.")); |