Solarus Forum

Solarus => Bugs & Feature requests => Topic started by: ffomega on November 03, 2016, 02:59:27 pm

Title: [Request Already Added] Chests' contents dependent on Hero's inventory
Post by: ffomega on November 03, 2016, 02:59:27 pm
In a Link to the Past, certain chests' contents changed depending on what Link had in his inventory.

For example, when Link's uncle leaves the house, and Link is free to get out of bed, if you check the chest in the house, it contains the Lamp.  Then when you fall into the secret passage and collect the sword and shield from him, you collect 5 rupees from the chest in the next hallway.  However, if you choose to leave the chest behind in Link's house, the chest in the secret passage will then contain the Lamp, and when you return to Link's house later on the contents of that chest will be the 5 rupees.

Do you think some options could be added to the chest menu?

"Check for treasure on Hero: [treasures list - drop-down list]"

"Chest contents alternative [treasures list - drop-down list]"
Title: Re: [Request] Chests' contents dependent on Hero's inventory
Post by: Christopho on November 03, 2016, 03:10:11 pm
This can be done in Lua easily, by defining the chest:on_opened() event. You can give any treasure to the hero from there, using hero:start_treasure().