-
Notifications
You must be signed in to change notification settings - Fork 106
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
[Bug] Deactivate monster defeated button #1548
Comments
This occurs when the attack and evade action has been selected, mythos phase, and horror phase. The only time the defeated button actually works as intended is a user selects the monster without clicking attack or evade action. |
Also if the monster's damage equal to its health and a user clicks attack or evade, the cancel button is inactive even if the hit points go below maximum. While this may seem inconsequential, we should think about sequence of how the UI is drawn in this phase. |
The issue here is that the dialog/UI isn't destroyed when the HP of the monster are increased or decreased during the attack/evade, mythos or horror phase as destroyer is not called during this phase. As a result, old UIElements are left behind and appear active. Several possible solutions:
I'm opting to do 3. 2. is also a good option, but would be significant amount of work that may be worth it as a part of a general refactor if ever done. 1. might be ideal which may speed up processing time, but would be a huge refactor. |
There's actually a fourth way. Create a list of elements to store the references and delete. This was actually the easiest and least intrusive to other code bases. |
Added a list to the Monster Health UI to destroy.
I'll keep this open until we get @Hobbeslionheart changes merged to the main codebase, but I added a workaround for now (3rd approach). |
Tested OK on 2.5.8a Windows build. |
Describe the bug
When adding damage to a monster the 'defeated' button lights up when the maximum damage is reached on the monster. But if you then lower the damage to a value below its maximum health (for example because you clicked once to many on '+'), the Monster defeated button remains high-lighted.
Scenario
Any
Steps to reproduce the behavior:
Expected behavior
when the monster's damage is not equal; to its maximum health, the defeated button should not be high-lighted (not selectable)
LogFile
Screenshots
Valkyrie Version
v 2.5.6.
Desktop
Smartphone
Additional context
The text was updated successfully, but these errors were encountered: