phreddrickk
Active member
Right now mafia (and the maximizer) has information about the enchantments that the Buddy Bjorn and Crown of Thrones give when a familiar is bjornified or enthroned, respectively. This information gets used in the maximizer, but doesn't appear to be exposed through any API that scripters can use; checking
when it is equipped and a Misshapen Animal Skeleton is in my bjorn yields 0, as does
which was admittedly a longshot anyways.
One option would just be to have numericModifier pay attention to our currently enthroned/bjornified familiar when being used on the crown or bjorn; the disadvantage of this is it requires the player to enthrone/bjornify a familiar every time they want to check its prospective enchantment; it's intuitive, but cumbersome.
Another would be to make a new override for numericModifier:
. This is awfully similar to the one used for active familiars, but lacks the weight and familiar-equipment parameter. It also isn't immediately obvious from the function-name or the signature that it's dealing with enchantments for the bjorn/crown specifically. This still feels like the best bet to me, although I'm not sure enough about the particularities of the code to know if it would be straightforward.
It could also be a newfunction as opposed to a numericModifier override, with the same signature listed above. It has the advantage of, depending upon the specific name chosen, feeling specific to the bjorn+crown, making it a little more obvious what the function does.
JavaScript:
numericModifier(Item.get("Buddy Bjorn"), "Familiar Weight")
JavaScript:
numericModifier(Familiar.get("misshapen animal skeleton"), "Familiar Weight", 1, Item.get("Buddy Bjorn"))
One option would just be to have numericModifier pay attention to our currently enthroned/bjornified familiar when being used on the crown or bjorn; the disadvantage of this is it requires the player to enthrone/bjornify a familiar every time they want to check its prospective enchantment; it's intuitive, but cumbersome.
Another would be to make a new override for numericModifier:
Code:
numericModifier(familiar: Familiar, modifier: string)
It could also be a newfunction as opposed to a numericModifier override, with the same signature listed above. It has the advantage of, depending upon the specific name chosen, feeling specific to the bjorn+crown, making it a little more obvious what the function does.