-
Notifications
You must be signed in to change notification settings - Fork 0
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
[GH-280] Display Energy bar in Battle #420
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Screen.Recording.2024-05-03.at.2.54.56.PM.mov
I see that after casting their first ultimate of the battle, units stop charging it's energy bar, except sometimes that they charge a little and then it goes away without it being complete.
Thanks! I wasn't limiting the amount to add/substract from the unit's energy, so in some cases I was allowing negative amounts of energy. Should be fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found an error when battling with less than 6 units in either team.
target.CurrentHealth = (int)action.StatOverride.StatAffected.Amount; | ||
break; | ||
case Protobuf.Messages.Stat.Energy: | ||
target.CurrentEnergy = Math.Max(0, (int)action.StatOverride.StatAffected.Amount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we introducing game logic here? If our battle design does not allow us to have negative energy, then it's not a good idea to hide it here, as the battle will be buggy and we will have less ways of finding out!
Closes #280
Motivation
Until now, we couldn't see the energy accumulated by each unit in the battle.
Summary of changes
How has this been tested?
Start the backend (use this branch!) and fight a battle. You should see a blue energy bar above each unit's head, that increases with each use of the basic skill and decreases with each use of the ultimate skill (that is, after is reaches its top).
Test additions / changes
List tests added/updated.
Checklist