Skip to content
EvilEngine.Api.Damage

Damage record

public sealed record Damage

One hit on a person as it passes through the deciders: what the engine knows of it, and what the deciders set. Once they’re done, the engine takes the amount from health rounded to the nearest point, takes the armour, adds the push to the person’s velocity and sets their view punch.

Assembly
EvilEngine.Api
Commit
4ff877b1

Members

Damage constructor

public Damage(double Amount, DamageKind Kind)

The amount and kind.

Amount property

public double Amount { get; init; }

How much health it takes.

Kind property

public DamageKind Kind { get; init; }

What did it.

Group property

public int Group { get; init; }

The hit group of the hitbox a bullet hit, or 0 for anything else.

Force property

public MapVector Force { get; init; }

The push it gives what it hits, in kg·m/s, as the weapon or blast set it.

Position property

public MapVector Position { get; init; }

Where it hit.

Player property

public bool Player { get; init; }

Whether the person hit is a player’s body.

Health property

public int Health { get; init; }

The person’s health before it lands.

Armour property

public int Armour { get; init; }

The person’s armour before it lands.

ArmourTaken property

public double ArmourTaken { get; init; }

How much armour it takes, which deciders set.

Direction property

public MapVector Direction { get; init; }

The unit direction from what did it to the person’s centre.

Hitscan property

public bool Hitscan { get; init; }

Whether a hitscan bullet did it.

OnGround property

public bool OnGround { get; init; }

Whether the person is standing on something.

Push property

public MapVector Push { get; init; }

The change to the person’s velocity, in meters a second, which deciders set.

Punch property

public double Punch { get; init; }

The view punch it sets on the person, in degrees of pitch up, which deciders set.