-
Notifications
You must be signed in to change notification settings - Fork 1
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
Stat override message #564
Conversation
…ckend into stat-override-message
…ackend into stat-override-message
Let's implement statoverrides for heal caps |
target_id: unit.id, | ||
stat_affected: %{ | ||
stat: :ENERGY, | ||
amount: -@ultimate_energy_cost |
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.
This should be 0, otehrwise the whole concept of stat_override doesn't make sense
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.
To test with SocketTester:
IEx.configure(inspect: [limit: :infinity])
{:ok, user} = Champions.Users.register("Lotu")
campaign_progress = user.super_campaign_progresses |> hd()
{:ok, pid} = Gateway.SocketTester.start_link
Gateway.SocketTester.fight_level(pid, user.id, campaign_progress.level_id)
Nice! I'll add it to the description |
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.
Passed functional review!
Part of https://github.com/lambdaclass/champions_of_mirra/issues/280
Motivation
We should have a specific message for the case in which we want to override a stat's value, despite its current value.
In the immediate future this will be used to set the energy to 0 after casting the ultimate skill, in the near future it will be used to set other stats such as the health.
Summary of changes
How to test it?
You can use the SocketTester (remember to move it to the gateway directory) to simulate a battle and check that this new message is sent. You can follow these steps to do so:
If you feel more comfortable using the client, start the client using this branch, go to BattleManager.cs and add a Debug.Log() in the PlayOutSteps() method, in the StatOverride case of the switch statement. Run a battle and there you should see how the frontend receives this new message when a unit is about to use the ulti.
Checklist