-
-
Notifications
You must be signed in to change notification settings - Fork 97
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 that can not kill #1518
base: develop
Are you sure you want to change the base?
Conversation
- Warheads can now damage the enemy without killing them (minimum health will be 1). - Verified in conventional weapons and radiation types. In `rulesmd.ini`: [SOMEWARHEAD] ; Warhead CanKill=false ; boolean
CanKill is by default true
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. |
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.
idk if setting the target's health to 1 is the correct way, since there's other logic that rely damage greater than 0 to work. Perhaps it would be safer to set the damage to current health - 1.
Also those check warning issues should be fixed as well.
regarding the WH re-declaration warning and the double to int
Since this code was born from a split from another feature I forgot to delete the WH declaration of the posterior if-else :-D thanks! And I'm against to set -1 since all the games's logic understand positive values but I don't know how are the checks with negative ones. Moreover, probably lots of Phobos checks could break because some checks could be written against health=0 and not negative health (I don't have time for confirming it). The only reason of the feature is that in case of having a weapon that can potentially kill the object (due to the gamage value and the target's current health) it just leave only 1 point of life, anything else will be able to kill it. Useful for debuff/plagues, auxiliary logics, etc. This had in mind the PR #1398 and both together fulfills the closed #627 |
You misunderstood. @Coronia meant that instead of setting health to 1 it's better to modify the damage before actually applying anything to deal |
I see, sorry I though wrongly it was that different approach when I readed the message :-P Isn't simplier this approach that if the final calculation surpasses the target's health set that minimum health and skip the checks for ending it? |
if you return that early , isnt that mean you will skip some of ares affect then , is it intended behavoiur ?. |
- I used a wrong function for cheking the damage value xD - Small changes so now it doesn't skip code in ReceiveDamage hook.
I changed that behaviour so now it doesn't skip code. I don't see any side effects. |
correct me if I'm wrong, but I think all |
…e on uncrushable unit (Phobos-developers#1529) - Fix an issue where a unit will leave an impassable invisible barrier in its original position when it is teleported by ChronoSphere onto an uncrushable unit and self destruct. Thx to @NetsuNegi .
In
rulesmd.ini
:[SOMEWARHEAD] ; Warhead
CanKill=true; boolean