Attached effect for transfering damage to invoker#2086
Attached effect for transfering damage to invoker#2086Coronia wants to merge 3 commits intoPhobos-developers:developfrom
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. |
TaranDahl
left a comment
There was a problem hiding this comment.
The damage trigger, the pre-damage trigger. Things are getting better and better XD.
I bet someone will encounter problems caused by the settlement order in the future.
Maybe it's time to add an overall explanation of the settlement order.
| { | ||
| int nDamageLeft = damage; | ||
|
|
||
| if (pExt->AE.TransferDamageCount > 0 && !pWHExt->Transfered) |
There was a problem hiding this comment.
It is better to write a comment to explain that checking Transfered is to prevent circular calls.
|
Looking at all those coming PRs, it feels more and more like we should design a generic and flexible system instead of adding 123946123874238 different systems. It's just not feasible in the long run. We can add endless amount of things this way, because there will be endless amount of ideas to implement. |
A large part of them are my fixes to vanilla bullshit 😝 |
I know. My point was more about @Coronia's additions like this one and the weapon one. |
Attached effect between object and invoker - Season 1
TransferDamagecan be set to true to have any damage dealt to the object the effect is attached to be transfered to the invoker of the effect if it's alive.TransferDamage.SelfMultiplierandTransferDamage.InvokerMultiplierare multuipliers of damage that'll be applied to the attached object and the invoker if a transfer happens. If an object has multiple effects withTransferDamage, the damage will be equally divided and calculated for each effect independently.TransferDamage.MinimumandTransferDamage.Maximumfurther restrict the bound of damage transfering to the invoker.TransferDamage.Warheaddetermines which Warhead is used to deal the damage, defaults to[CombatDamage] -> C4Warhead. IfTransferDamage.Warhead.Detonateis set to true, the Warhead is fully detonated instead of used to simply deal damage. IfTransferDamage.UseOriginalWarheadis set to true, it'll reuse the Warhead that dealt damage to the object.TransferDamage.Chancedetermines the chance of transfer, whileTransferDamage.AffectsHousecustomizes which houses can trigger the transfer damage.TransferDamage.Invoker.AbovePercentandTransferDamage.Invoker.BelowPercentdetermine if the transfer can happen when the invoker's health is above or below the given values.SuppressTransferDamageto true.SuppressTransferDamage.Typescan control which AttachEffectTypes' transfer damage is suppressed, if none are listed then all of them are suppressed.SuppressTransferDamage.Groupsdoes the same thing but for all AttachEffectTypes in the listed groups.SuppressTransferDamage.SelfOwnedcan be used to set the house and TechnoType that the object the effect is attached to as the transfered damage's owner & invoker. Otherwise, it'll be set to the original damage dealer that trigger this transfer.In
rulesmd.ini: