apace100 / apoli

MIT License
40 stars 46 forks source link

Add Bi-entity Condition and Action fields to `apoli:modify_damage_dealt` and `apoli:modify_damage_taken` #27

Closed MerchantPug closed 3 years ago

MerchantPug commented 3 years ago

Modify Damage Dealt.

modify_damage_dealt is fairly straightforward since a target always exists in this case.

Basically it handles the check as you'd expect it to. Being that if the bi-entity condition is null or the power holder and target fit the condition, it returns true.

Modify Damage Taken

We've discussed the issue with adding a bientity condition to modify_damage_taken before, however I've come up with a solution for this.

If you have a bientity_condition field specified, the damage source requires an attacker to actually work, with the non attacker damage condition only returning true if the bientity_condition is null.

If there is an attacker it'll check for if the bientity condition is null or if the attacker and power holder respectively the fits the bientity condition.

MerchantPug commented 3 years ago

I imagine there are some issues within this PR so please bring them up with me.