-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add support for damage overtime and move super healing from panacea to Aftershock #40082
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.
This looks like a real good start, though I have some comments
I would advise making a new class for the DoT data, have it store the damage in a private member and you can use accessors to get and set those values.
I would like for it to be possible that when you add a new DoT effect, it just adds that effect to the stack of effects and continues to get processed. for example: I have a DoT acid spell that applies 3 or 4 damage per tick over 5 seconds. i cast it once and apply the 3 damage per 5 seconds, and i cast it again and apply 4 damage over 5 seconds. time has already elapsed for the first one, sowe just want to add a new one.
If you need any additional assistance with the Json loading functions you can ask, though there are plenty of examples of having load functions as member functions in the code.
I'm not opposed to it, is the healing ability jsonized if we need to change it for balance? |
Yes. |
Co-authored-by: Curtis Merrill <[email protected]>
So a couple little implementation details with how json is used in our infrastructure. one trick you can do if you are loading and deserializing the same data (because deserialize needs a JsonIn parameter) is the load function can just be something like |
Co-authored-by: Curtis Merrill <[email protected]>
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.
Seeems good to me!
Summary
SUMMARY: Infrastructure "Add support for damage overtime"
Purpose of change
Damage over time is a usefull thing to have
When making panacea spawn in vanilla I missed its super healing effect. This moves the effect back into Aftershock.
Describe the solution
Add
damage_over_time_data
class to damage namespaceAdd
std::vector< damage_over_time_data > damage_over_time_map;
to creature and the associated functions to store damage into it and process it every turn.Describe alternatives you've considered
Testing
Damage all body part
Eat panacea
nothing happen
Start a world with aftershock
Damage all body part
Eat panacea
Everything is healed in a few sconds
Save and quit before being completly healed
Reload
Healing continues
Additional context
@Maleclypse @John-Candlebury Are you ok with this in Aftershock?