Drink a crafted potion when a stronger or weaker one is already active
The player drinks a small speed potion while a big one is still running and the big effect disappears, along with the potion that took ten minutes to brew. Or a second sip at full time wastes the bottle. This entry decides when a drink counts and when the bottle stays in the bag.
Why this works
Players treat a bottle as money. The game should never take it without giving something for it, so an unhelpful drink is simply declined and the bottle stays. Comparing strength first lets a better effect win while a worse one never undoes good work.
When not to use it
Do not block weaker drinks when effects are different in kind, such as speed against warmth, since neither is stronger. Let those run side by side, and use this rule only for effects that compete for the same job.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 21 lines of example code with 3 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Drink a crafted potion when a stronger or weaker one is already active" (read_entry stronger-potion-wins-weaker-is-kept) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP