Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heroism potion failed #73

Open
takosalad opened this issue Jul 15, 2023 · 4 comments
Open

Heroism potion failed #73

takosalad opened this issue Jul 15, 2023 · 4 comments

Comments

@takosalad
Copy link

Level 3 dwarven priest, taking around 6 damage per turn from the two centipede attacks, down to 2 HP. I drink a potion of heroism. From what I understand it gives +10 HP. However, the centipede kills me with the next attack.

@mrcook
Copy link
Member

mrcook commented Dec 10, 2023

Thanks or the issue. I'm not sure when I'll get around to looking into this but I'll leave this here for future reference.

@awjackson
Copy link
Contributor

I can't reproduce this, and I wonder if the person reporting it misunderstands how heroism works.

Heroism is a status that temporarily gives +10 max HP (among other buffs). When you gain it you gain both max HP and current HP; when it wears off you lose the max HP, and then your current HP is capped if it's above your reverted max HP. The heroism status is binary (on or off), it doesn't stack. Drinking a second potion of heroism when you already have the status doesn't give you another 10 HP, it only increases the duration.

@awjackson
Copy link
Contributor

awjackson commented Mar 23, 2024

Never mind, I managed to reproduce the described situation (died the same turn as quaffing a heroism potion) without multiple potions being involved, and I understand why it happens now.

The main game loop in umoria looks like this:

Update player status (hunger, light, hp/mp regen, buff durations, etc)
Accept and execute player command
Move monsters
(repeat)

The changes to the player's maximum and current HP from heroism kicking in or wearing off are not applied immediately when you quaff the potion (unlike, say, using a healing potion or spell) but rather in the "update player status" part of the game loop. Thus, it's possible for monsters to kill you after you quaff the potion but before you gain the temporary HP from it.

This is unintuitive but it's the same way 5.5.2 and previous versions of the game worked. Another buff that works a similar way is blessing: monsters will still attack your unbuffed AC during the turn when you first cast the spell or read the scroll, because the buff is only applied at the start of the next turn.

@mrcook
Copy link
Member

mrcook commented Apr 1, 2024

Hi @awjackson, many thanks for looking into this and for clarifying the behaviour. As my original goal for this repository was to not change the original gameplay, I think this one is best left alone. I will however leave this issue open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants