Implement Health Consideration for NPCs (#29922)

Implement TargetHealthCon
This commit is contained in:
osjarw
2024-07-12 14:37:47 +03:00
committed by GitHub
parent 7ce3a1f27f
commit 3ee7d7bc35
2 changed files with 21 additions and 1 deletions

View File

@@ -1,6 +1,16 @@
using Content.Shared.Mobs;
namespace Content.Server.NPC.Queries.Considerations;
/// <summary>
/// Goes linearly from 1f to 0f, with 0 damage returning 1f and <see cref=TargetState> damage returning 0f
/// </summary>
public sealed partial class TargetHealthCon : UtilityConsideration
{
/// <summary>
/// Which MobState the consideration returns 0f at, defaults to choosing earliest incapacitating MobState
/// </summary>
[DataField("targetState")]
public MobState TargetState = MobState.Invalid;
}