# IDamage interface

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

Namespace `EvilEngine.Api.Damage`, assembly `EvilEngine.Api`. Engine commit 4ff877b1.

```csharp
public interface IDamage
```

Where a Plugin changes damage before it lands, through its context's [Damage](/docs/api/plugincontext#damage).

```csharp
context.Damage.Decide(damage => damage.Group == 1 ? damage with { Amount = damage.Amount * 2 } : damage);
```

## Members

### Decide (method)

```csharp
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](/docs/api/iplugin#load): a call after `Load` has returned throws `InvalidOperationException`.
