Bug - Fixed +item bonus from heavy fairy

I have a 141 lb baby gravy fairy and mafia says it gives +212.88% item (through modtrace item).

The formula on the wiki says it should be:
sqrt(55*141) + 138 = 226

Fortunately I have a test. I have +1078% other item, so with mafia's number I am at +1290% and with mine/wiki's I am at +1305%.
I killed mother slime. She dropped 26 alveoli. I think mafia's number is wrong.
 
Last edited:

Theraze

Active member
Hmm... you have any gear that gives you Fairy effectiveness? Like cloaca-cola helmet, el vibrato helmet, hodgman's porkpie hat, etc?

Because the code is doing "effectiveness * (sqrt(55 * weight) + weight - 3)" which is exactly what you gave... Effectiveness, to give 212.88 from 226, must be running at ~0.942 of 'normal' fairy effectiveness. Which doesn't really make sense.

Edit: Checked, and your figures match for a weight of 131 perfectly... Any chance some part of your gear/effects are odd?
 
Last edited:

lostcalpolydude

Developer
Staff member
It's probably well-fed from a moveable feast. Mafia includes the 10 lb bonus in the weight total, but not when determining the +item it gives.
 
I tried backing out what mafia thought the fairy weight was and must have messed up.

I can confirm that today (with feast buff off and a 131 lb fairy) the +item is right.

Yesterday had the feast.

This is a bug, right? Not KoL mechanics I am unaware of?
 

Bale

Minion
Yeah, that's a bug. Mafia should be considering the bonus weight from the feast when considering the item drop.
 

Theraze

Active member
So, the question is this... where do we want feast-weight to be considered? Should it be moved into the main modifier locations, or do we just want to add it into the additional bits on getNumericModifier and applyFamiliarModifiers in the Modifiers file? It's getting missed because feasted doesn't count as either Modifiers.FAMILIAR_WEIGHT or Modifiers.HIDDEN_FAMILIAR_WEIGHT, nor in the main getWeight function. I'll attach a patch here that just includes it into both of those functions... just add
Code:
+ (familiar.feasted ? 10 : 0)
to those functions. Or it would be, if feasted was a public variable...

Caveat: This does include the definitions for the 3 new combat delevelling modifiers. If these are meant to stay out a while longer, just remove them from the top of the patch on Modifiers.java, shouldn't affect the feasting checks.

Details: This patch affects 2 files. FamiliarData is given a new function, getFeasted. This returns a boolean based on the feasted value. Modifiers is given a check on its two familiar weight bits for getFeasted and if true, 10 weight is added to the calculation.

This has been tested and, at least on my system, compiles cleanly.
 

Attachments

  • ConsiderFeasting.patch
    3.4 KB · Views: 26
Top