Skip to content
EvilEngine.Api.Damage

IDamage interface

public interface IDamage

Where a Plugin changes damage before it lands, through its context’s Damage.

context.Damage.Decide(damage => damage.Group == 1 ? damage with { Amount = damage.Amount * 2 } : damage);
Assembly
EvilEngine.Api
Commit
4ff877b1

Members

Decide method

void Decide(Func<Damage, Damage> decider)

Adds a decider. Every damage to a person runs through every decider in Plugin load order, each getting what the one before returned; whatever the last returns lands. A decider that throws, or decides a number that isn’t finite, is left out of that damage, which goes on to the next decider as it came to that one; each kind is noted once. Add deciders while your Plugin loads, inside Load: a call after Load has returned throws InvalidOperationException.