-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
eoc: replace u_set_hp with math #70820
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.
Auto-requesting reviews from non-collaborators: @GuardianDll @Standing-Storm @wapcaplet
iirc it's because, for some reason, when you die, even if prevent death event worked as expected, hp of all sublimbs goes to 0, and it can't be healed |
Thanks for merging |
Summary
None
Purpose of change
Continue migrating things to math
u_set_hp
withtarget_part
as a variable object is wrong. #70813 (invalidates)Describe the solution
"u_set_hp"
with math'su_hp()
ALL_MAJOR
andALL_MINOR
special values tou_hp()
to emulate"major_only"
and"minor_only"
u_hp()
there too"u_val": "hp"
Describe alternatives you've considered
N/A
Testing
Loaded a test with all mods.
Widget tests still pass.
Additional context
@GuardianDll can you double check the JSON please. In particular, there are some odd cases where all hp is set to 999 then individually to X that I might have misunderstood.
The old
increase_only
can be replaced withmax( u_hp(...), ...)
but that doesn't work well withALL
/ALL_MAJOR
/ALL_MINOR
. It