-
-
Notifications
You must be signed in to change notification settings - Fork 110
Warhead activation target health thresholds #1398
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
Warhead activation target health thresholds #1398
Conversation
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
So basically we have to set multiple warheads in the same weapon and depending the threshold of the damage produced by the warhead it does any damage (or not)? Is for preparing the tests |
No, depending on the target health at the moment of hit. |
Otherwise you're correct. |
So you said: 1º) The weapon hits the target. I tried With a Yuri mind control weapon (as the ones used in #627 ): [EMindControl] [PsyController] ;Mind control warhead. Will skip normal damage like EMP did It ignores this new logic and mind controls the target. Same with ExtraWarheads logic. Anotehr test in a Chrono legionnaire temporal weapon These tags are ignored and attacks & erase the target. |
Wait, I checked in the code that exists a EffectsRequireVerses=false, I want re-test these cases sicne they should be considered effects. |
Meh I know what's the issue, currently it only applies to Phobos warhead effects... will see later if it's possible to fix this |
If helps : 0x4690B0 -> void __thiscall BulletClass::Logics(BulletClass *this, CoordStruct *coords) <- controls some WH effects (or all, I don't remember. Is what I was using in #627 for replacing the original warhead by another one if the threshold was reached) |
Yeah I am looking at this one too. I figured I'll ask other devs since for some reason it isn't hooked in order to be able to control all effects, might be cause of Ares. I might just move that check in the beginning of the function. |
I updated the code with the suggested changes and I did basic tests and looks that it just works. |
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.
- The important code chunk that is repeated converted into a function: bool IsHealthInThreshold(TechnoClass* pTarget) const; - Small code tweaks. - Added contribution in credits file.
Applied feedback, pending that question between devs. |
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.
Besides the thing I mentioned in comments about applying EffectsRequireVerses
on ExtraWarheads
not being appropriate, there's this one other thing that probably needs changing.
Removed extra checks I added regarding effects.
replacing code with a function that does the same
Finally I tested this online and no desyncs. Then should this be merged? |
04ac501
to
c19d8bc
Compare
I just noticed EffectsRequireVerses is true by default and the documentation mentions it is false by default. I'll change the docs later |
2128644
to
799ea22
Compare
tested, and it can do the effect we've expected: setting a series of |
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.
LGTM.
Phobos-developers#1398 AffectsAbovePercent AffectsBelowPercent EffectsRequireVerses
Customizable Warhead trigger conditions
In
rulesmd.ini
: