When there are 50 shops all listing the same item for 100 meat. The shop with the most items purchasable will always be purchased from by mafia.
I don't think this is intended behavior, as it effectively removes advertising budget from play.
Checking mafia's internals, the PriceComparator is first comparing the limit, then the quantity.
Which brings another issue into play. The "limit" is not what you think it is.
To the playerbase, it's a player set limit on how many items can be purchased that is sometimes used for funsies when they set it higher than the amount they're selling.
In mafia, it's the amount of items mafia can purchase from the store.
So mafia's limit is basically
Which is then subtracted from with every purchase of course.
[Link] [Link]
This doesn't look like too big a deal, but it breaks two areas.
The first is display, the second is the PriceComparator again!
Because remember, that limit will never be 0, always the remaining items you can buy in said store. It's effectively another quantity alias.
Heck, it might be more useful to rename quantity to "cosmetic amount left" for all it seems to matter.
That is to say, with this limit logic:
Joe has 400 items in his store. Steve has 500 items in his store. Steve is the #1 seller.
Steve puts a limit of 350 in his store, Steve still has the most items in his store. Joe is now the #1 seller.
That same limit is also used for display purposes. So if I put a limit of 50 on an item with 40 remaining. Then mafia will set the limit to 40, because it always does
[Link]
Lets put all of this into a 'real world' context.
If you have mall min items: You're never going to be purchased from by mafia unless you have the most items, no matter how much meat you throw at the advertising budget.
If you have the same quantities of items for sale; mafia will list your store by alphabetical order instead.
Your store "ZZZZ Sleepy Joes" is the last place mafia will ever go to for its shopping.
I don't think this is intended behavior, as it effectively removes advertising budget from play.
Checking mafia's internals, the PriceComparator is first comparing the limit, then the quantity.
Which brings another issue into play. The "limit" is not what you think it is.
To the playerbase, it's a player set limit on how many items can be purchased that is sometimes used for funsies when they set it higher than the amount they're selling.
In mafia, it's the amount of items mafia can purchase from the store.
So mafia's limit is basically
Math.min(quantity, limit == null ? quantity : limit)
Which is then subtracted from with every purchase of course.
[Link] [Link]
This doesn't look like too big a deal, but it breaks two areas.
The first is display, the second is the PriceComparator again!
Because remember, that limit will never be 0, always the remaining items you can buy in said store. It's effectively another quantity alias.
Heck, it might be more useful to rename quantity to "cosmetic amount left" for all it seems to matter.
That is to say, with this limit logic:
Joe has 400 items in his store. Steve has 500 items in his store. Steve is the #1 seller.
Steve puts a limit of 350 in his store, Steve still has the most items in his store. Joe is now the #1 seller.
That same limit is also used for display purposes. So if I put a limit of 50 on an item with 40 remaining. Then mafia will set the limit to 40, because it always does
Math.min(limit, quantity)
. And as the "limit" is equal to the quantity, mafia will not render the player's limit. This is generally a cosmetic thing, but still unintended(?) behavior.[Link]
Lets put all of this into a 'real world' context.
If you have mall min items: You're never going to be purchased from by mafia unless you have the most items, no matter how much meat you throw at the advertising budget.
If you have the same quantities of items for sale; mafia will list your store by alphabetical order instead.
Your store "ZZZZ Sleepy Joes" is the last place mafia will ever go to for its shopping.

Last edited: