Skip to content

Define limited stock of money for shops #76

@Grimmys

Description

@Grimmys

Currently, Shops have infinite amount of money: you can sell them whatever amount of items you want and still get money from it.

My idea would be to define a limited amount of money for Shops, same as what is already the case for the players.

The amount of money owned by the seller should be display in the "Sell" view (and maybe in the "Buy" view as well?).

Selling items to the seller would decrease the money left according to the sell value of the item, and buying items from the seller should increase the money left.
If the seller does not have enough money for buying the item, then something should be happening between:

  1. Forbid the sell (inform the player that seller cannot buy the item)
  2. Allow the sell but only give to the player what the seller had left (0 if the seller already had no money anymore), and maybe ask confirmation to the player that the sell would be "at loss"

I don't have any strong opinion about which behaviour is the best.

Concerned places should be shop.py, menu_creator_manager.py#create_shop_menu (if anything should be updated in the menu) and level_0/map.tmx, level_3/map.tmx (for giving the new "money" property to the shops defined in these levels).

N.B.: I don't know if this feature is a balanced one, I just think it may be funny to implement. Let see after experimenting if it's bringing some value or too boring

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomerstextRelates to text visible in the applicationuiRelates to changes on the User Interface

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions