tmewett / BrogueCE

Brogue: Community Edition - a community-lead fork of the much-loved minimalist roguelike game
https://sites.google.com/site/broguegame/
GNU Affero General Public License v3.0
1.03k stars 109 forks source link

Fixed strength potion not curing weakness immediately #640

Closed Kissyboots closed 10 months ago

Kissyboots commented 11 months ago

This fixes bug #366.

This removes the player's weakened status as soon as the potion is drunk. It's done again at the end of the turn as well, but I don't see how that would cause a problem.

It's possible that the better way to do this is to make another generic function like applyInstantTileEffectsToCreature (but for potions), but I don't know of any other potions that need an effect like this to happen immediately. If there are, it might make sense to put them into something like applyInstantPotionEffectsToPlayer (which I'd be happy to try to tackle if that's the correct thing to do in this case).

(This is my first bug fix in C, my first attempt at using github.)

Kissyboots commented 10 months ago

This fixes #366.

(Attempting to link pull request to issue).

tmewett commented 10 months ago

Thanks, great work! Do you want to add a change file for this?

Kissyboots commented 10 months ago

I'm not sure what a "change file" is in this context, but I don't think so, thanks.

tmewett commented 10 months ago

A change file describes the change for the changelog, see contribution guide: https://github.com/tmewett/BrogueCE/wiki/Contribution-guide#change-files

Sorry for my poor wording, could you add one rq? Then I'll merge :)

Kissyboots commented 10 months ago

I'm sorry, I missed that in the contribution guide. Done!

tmewett commented 10 months ago

Ahh sorry, I didn't notice this branch was on release, but it's a gameplay change so should be on master. Could you rebase it onto master then edit the PR (top right) and change base branch? Then we should be good

Kissyboots commented 10 months ago

OK, I think I did it. I'm not 100% sure. If it looks fine from your end, then I'm good with it.