Skip to content

Commit

Permalink
Fix strength potion not curing weakness immediately (#640)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kissyboots authored Jan 25, 2024
1 parent d47925c commit 3789ce2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/strength-potion-not-immediate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drinking a strength potion now causes weakness to be removed from a character immediately, in the middle of the turn in which it was ingested (as well as at the end of the turn).
2 changes: 2 additions & 0 deletions src/brogue/Items.c
Original file line number Diff line number Diff line change
Expand Up @@ -7143,6 +7143,8 @@ void drinkPotion(item *theItem) {
if (player.status[STATUS_WEAKENED]) {
player.status[STATUS_WEAKENED] = 1;
}
//Needed to make potion have immediate effect
player.weaknessAmount = 0;
updateEncumbrance();
messageWithColor("newfound strength surges through your body.", &advancementMessageColor, 0);
createFlare(player.loc.x, player.loc.y, POTION_STRENGTH_LIGHT);
Expand Down

0 comments on commit 3789ce2

Please sign in to comment.