Add mob retaliation (#19901)
This commit is contained in:
@@ -9,7 +9,7 @@ namespace Content.Server.Friends.Systems;
|
|||||||
|
|
||||||
public sealed class PettableFriendSystem : EntitySystem
|
public sealed class PettableFriendSystem : EntitySystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly FactionExceptionSystem _factionException = default!;
|
[Dependency] private readonly NpcFactionSystem _factionException = default!;
|
||||||
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
@@ -26,7 +26,7 @@ public sealed class PettableFriendSystem : EntitySystem
|
|||||||
if (args.Handled || !TryComp<FactionExceptionComponent>(uid, out var factionException))
|
if (args.Handled || !TryComp<FactionExceptionComponent>(uid, out var factionException))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_factionException.IsIgnored(factionException, user))
|
if (_factionException.IsIgnored(uid, user, factionException))
|
||||||
{
|
{
|
||||||
_popup.PopupEntity(Loc.GetString(comp.FailureString, ("target", uid)), user, user);
|
_popup.PopupEntity(Loc.GetString(comp.FailureString, ("target", uid)), user, user);
|
||||||
return;
|
return;
|
||||||
@@ -34,7 +34,7 @@ public sealed class PettableFriendSystem : EntitySystem
|
|||||||
|
|
||||||
// you have made a new friend :)
|
// you have made a new friend :)
|
||||||
_popup.PopupEntity(Loc.GetString(comp.SuccessString, ("target", uid)), user, user);
|
_popup.PopupEntity(Loc.GetString(comp.SuccessString, ("target", uid)), user, user);
|
||||||
_factionException.IgnoreEntity(factionException, user);
|
_factionException.IgnoreEntity(uid, user, factionException);
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,6 +45,6 @@ public sealed class PettableFriendSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var targetComp = AddComp<FactionExceptionComponent>(args.Target);
|
var targetComp = AddComp<FactionExceptionComponent>(args.Target);
|
||||||
_factionException.IgnoreEntities(targetComp, comp.Ignored);
|
_factionException.IgnoreEntities(args.Target, comp.Ignored, targetComp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,12 +6,18 @@ namespace Content.Server.NPC.Components;
|
|||||||
/// Prevents an NPC from attacking ignored entities from enemy factions.
|
/// Prevents an NPC from attacking ignored entities from enemy factions.
|
||||||
/// Can be added to if pettable, see PettableFriendComponent.
|
/// Can be added to if pettable, see PettableFriendComponent.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent, Access(typeof(FactionExceptionSystem))]
|
[RegisterComponent, Access(typeof(NpcFactionSystem))]
|
||||||
public sealed partial class FactionExceptionComponent : Component
|
public sealed partial class FactionExceptionComponent : Component
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// List of entities that this NPC will refuse to attack
|
/// Collection of entities that this NPC will refuse to attack
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("ignored")]
|
[DataField("ignored")]
|
||||||
public HashSet<EntityUid> Ignored = new();
|
public HashSet<EntityUid> Ignored = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Collection of entities that this NPC will attack, regardless of faction.
|
||||||
|
/// </summary>
|
||||||
|
[DataField("hostiles")]
|
||||||
|
public HashSet<EntityUid> Hostiles = new();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using Content.Server.NPC.Systems;
|
||||||
|
|
||||||
|
namespace Content.Server.NPC.Components;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This is used for tracking entities stored in <see cref="FactionExceptionComponent"/>
|
||||||
|
/// </summary>
|
||||||
|
[RegisterComponent, Access(typeof(NpcFactionSystem))]
|
||||||
|
public sealed partial class FactionExceptionTrackerComponent : Component
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// entities with <see cref="FactionExceptionComponent"/> that are tracking this entity.
|
||||||
|
/// </summary>
|
||||||
|
[DataField("entities")]
|
||||||
|
public HashSet<EntityUid> Entities = new();
|
||||||
|
}
|
||||||
24
Content.Server/NPC/Components/NPCRetaliationComponent.cs
Normal file
24
Content.Server/NPC/Components/NPCRetaliationComponent.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
using Content.Server.NPC.Systems;
|
||||||
|
|
||||||
|
namespace Content.Server.NPC.Components;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entities with this component will retaliate against those who physically attack them.
|
||||||
|
/// It has an optional "memory" specification wherein it will only attack those entities for a specified length of time.
|
||||||
|
/// </summary>
|
||||||
|
[RegisterComponent, Access(typeof(NPCRetaliationSystem))]
|
||||||
|
public sealed partial class NPCRetaliationComponent : Component
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// How long after being attacked will an NPC continue to be aggressive to the attacker for.
|
||||||
|
/// </summary>
|
||||||
|
[DataField("attackMemoryLength"), ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public TimeSpan? AttackMemoryLength;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A dictionary that stores an entity and the time at which they will no longer be considered hostile.
|
||||||
|
/// </summary>
|
||||||
|
/// todo: this needs to support timeoffsetserializer at some point
|
||||||
|
[DataField("attackMemories")]
|
||||||
|
public Dictionary<EntityUid, TimeSpan> AttackMemories = new();
|
||||||
|
}
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
using Content.Server.NPC.Components;
|
|
||||||
|
|
||||||
namespace Content.Server.NPC.Systems;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Prevents an NPC from attacking some entities from an enemy faction.
|
|
||||||
/// </summary>
|
|
||||||
public sealed class FactionExceptionSystem : EntitySystem
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Returns whether the entity from an enemy faction won't be attacked
|
|
||||||
/// </summary>
|
|
||||||
public bool IsIgnored(FactionExceptionComponent comp, EntityUid target)
|
|
||||||
{
|
|
||||||
return comp.Ignored.Contains(target);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Prevents an entity from an enemy faction from being attacked
|
|
||||||
/// </summary>
|
|
||||||
public void IgnoreEntity(FactionExceptionComponent comp, EntityUid target)
|
|
||||||
{
|
|
||||||
comp.Ignored.Add(target);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Prevents a list of entities from an enemy faction from being attacked
|
|
||||||
/// </summary>
|
|
||||||
public void IgnoreEntities(FactionExceptionComponent comp, IEnumerable<EntityUid> ignored)
|
|
||||||
{
|
|
||||||
comp.Ignored.UnionWith(ignored);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
90
Content.Server/NPC/Systems/NPCRetaliationSystem.cs
Normal file
90
Content.Server/NPC/Systems/NPCRetaliationSystem.cs
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
using Content.Server.NPC.Components;
|
||||||
|
using Content.Shared.CombatMode;
|
||||||
|
using Content.Shared.Damage;
|
||||||
|
using Content.Shared.Mobs.Components;
|
||||||
|
using Robust.Shared.Collections;
|
||||||
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
|
namespace Content.Server.NPC.Systems;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles NPC which become aggressive after being attacked.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class NPCRetaliationSystem : EntitySystem
|
||||||
|
{
|
||||||
|
[Dependency] private readonly IGameTiming _timing = default!;
|
||||||
|
[Dependency] private readonly NpcFactionSystem _npcFaction = default!;
|
||||||
|
|
||||||
|
private readonly HashSet<EntityUid> _deAggroQueue = new();
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
SubscribeLocalEvent<NPCRetaliationComponent, DamageChangedEvent>(OnDamageChanged);
|
||||||
|
SubscribeLocalEvent<NPCRetaliationComponent, DisarmedEvent>(OnDisarmed);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDamageChanged(EntityUid uid, NPCRetaliationComponent component, DamageChangedEvent args)
|
||||||
|
{
|
||||||
|
if (!args.DamageIncreased)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (args.Origin is not { } origin)
|
||||||
|
return;
|
||||||
|
|
||||||
|
TryRetaliate(uid, origin, component);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDisarmed(EntityUid uid, NPCRetaliationComponent component, DisarmedEvent args)
|
||||||
|
{
|
||||||
|
TryRetaliate(uid, args.Source, component);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TryRetaliate(EntityUid uid, EntityUid target, NPCRetaliationComponent? component = null)
|
||||||
|
{
|
||||||
|
if (!Resolve(uid, ref component))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// don't retaliate against inanimate objects.
|
||||||
|
if (!HasComp<MobStateComponent>(target))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (_npcFaction.IsEntityFriendly(uid, target))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
_npcFaction.AggroEntity(uid, target);
|
||||||
|
if (component.AttackMemoryLength is { } memoryLength)
|
||||||
|
{
|
||||||
|
component.AttackMemories[target] = _timing.CurTime + memoryLength;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Update(float frameTime)
|
||||||
|
{
|
||||||
|
base.Update(frameTime);
|
||||||
|
|
||||||
|
var query = EntityQueryEnumerator<NPCRetaliationComponent, FactionExceptionComponent, MetaDataComponent>();
|
||||||
|
while (query.MoveNext(out var uid, out var comp, out var factionException, out var metaData))
|
||||||
|
{
|
||||||
|
_deAggroQueue.Clear();
|
||||||
|
|
||||||
|
foreach (var ent in new ValueList<EntityUid>(comp.AttackMemories.Keys))
|
||||||
|
{
|
||||||
|
if (_timing.CurTime < comp.AttackMemories[ent])
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (TerminatingOrDeleted(ent, metaData))
|
||||||
|
_deAggroQueue.Add(ent);
|
||||||
|
|
||||||
|
_deAggroQueue.Add(ent);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var ent in _deAggroQueue)
|
||||||
|
{
|
||||||
|
_npcFaction.DeAggroEntity(uid, ent, factionException);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
130
Content.Server/NPC/Systems/NpcFactionSystem.Exception.cs
Normal file
130
Content.Server/NPC/Systems/NpcFactionSystem.Exception.cs
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using Content.Server.NPC.Components;
|
||||||
|
|
||||||
|
namespace Content.Server.NPC.Systems;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Prevents an NPC from attacking some entities from an enemy faction.
|
||||||
|
/// </summary>
|
||||||
|
public sealed partial class NpcFactionSystem
|
||||||
|
{
|
||||||
|
private EntityQuery<FactionExceptionComponent> _exceptionQuery;
|
||||||
|
private EntityQuery<FactionExceptionTrackerComponent> _trackerQuery;
|
||||||
|
|
||||||
|
public void InitializeException()
|
||||||
|
{
|
||||||
|
_exceptionQuery = GetEntityQuery<FactionExceptionComponent>();
|
||||||
|
_trackerQuery = GetEntityQuery<FactionExceptionTrackerComponent>();
|
||||||
|
|
||||||
|
SubscribeLocalEvent<FactionExceptionComponent, ComponentShutdown>(OnShutdown);
|
||||||
|
SubscribeLocalEvent<FactionExceptionTrackerComponent, ComponentShutdown>(OnTrackerShutdown);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnShutdown(EntityUid uid, FactionExceptionComponent component, ComponentShutdown args)
|
||||||
|
{
|
||||||
|
foreach (var ent in component.Hostiles)
|
||||||
|
{
|
||||||
|
if (!_trackerQuery.TryGetComponent(ent, out var trackerComponent))
|
||||||
|
continue;
|
||||||
|
trackerComponent.Entities.Remove(uid);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var ent in component.Ignored)
|
||||||
|
{
|
||||||
|
if (!_trackerQuery.TryGetComponent(ent, out var trackerComponent))
|
||||||
|
continue;
|
||||||
|
trackerComponent.Entities.Remove(uid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnTrackerShutdown(EntityUid uid, FactionExceptionTrackerComponent component, ComponentShutdown args)
|
||||||
|
{
|
||||||
|
foreach (var ent in component.Entities)
|
||||||
|
{
|
||||||
|
if (!_exceptionQuery.TryGetComponent(ent, out var exceptionComponent))
|
||||||
|
continue;
|
||||||
|
exceptionComponent.Ignored.Remove(uid);
|
||||||
|
exceptionComponent.Hostiles.Remove(uid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns whether the entity from an enemy faction won't be attacked
|
||||||
|
/// </summary>
|
||||||
|
public bool IsIgnored(EntityUid uid, EntityUid target, FactionExceptionComponent? comp = null)
|
||||||
|
{
|
||||||
|
if (!Resolve(uid, ref comp, false))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return comp.Ignored.Contains(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the specific hostile entities for a given entity.
|
||||||
|
/// </summary>
|
||||||
|
public IEnumerable<EntityUid> GetHostiles(EntityUid uid, FactionExceptionComponent? comp = null)
|
||||||
|
{
|
||||||
|
if (!Resolve(uid, ref comp, false))
|
||||||
|
return Array.Empty<EntityUid>();
|
||||||
|
|
||||||
|
return comp.Hostiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Prevents an entity from an enemy faction from being attacked
|
||||||
|
/// </summary>
|
||||||
|
public void IgnoreEntity(EntityUid uid, EntityUid target, FactionExceptionComponent? comp = null)
|
||||||
|
{
|
||||||
|
comp ??= EnsureComp<FactionExceptionComponent>(uid);
|
||||||
|
comp.Ignored.Add(target);
|
||||||
|
EnsureComp<FactionExceptionTrackerComponent>(target).Entities.Add(uid);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Prevents a list of entities from an enemy faction from being attacked
|
||||||
|
/// </summary>
|
||||||
|
public void IgnoreEntities(EntityUid uid, IEnumerable<EntityUid> ignored, FactionExceptionComponent? comp = null)
|
||||||
|
{
|
||||||
|
comp ??= EnsureComp<FactionExceptionComponent>(uid);
|
||||||
|
foreach (var ignore in ignored)
|
||||||
|
{
|
||||||
|
IgnoreEntity(uid, ignore, comp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Makes an entity always be considered hostile.
|
||||||
|
/// </summary>
|
||||||
|
public void AggroEntity(EntityUid uid, EntityUid target, FactionExceptionComponent? comp = null)
|
||||||
|
{
|
||||||
|
comp ??= EnsureComp<FactionExceptionComponent>(uid);
|
||||||
|
comp.Hostiles.Add(target);
|
||||||
|
EnsureComp<FactionExceptionTrackerComponent>(target).Entities.Add(uid);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Makes an entity no longer be considered hostile, if it was.
|
||||||
|
/// Doesn't apply to regular faction hostilities.
|
||||||
|
/// </summary>
|
||||||
|
public void DeAggroEntity(EntityUid uid, EntityUid target, FactionExceptionComponent? comp = null)
|
||||||
|
{
|
||||||
|
if (!Resolve(uid, ref comp, false))
|
||||||
|
return;
|
||||||
|
if (!comp.Hostiles.Remove(target) || !_trackerQuery.TryGetComponent(target, out var tracker))
|
||||||
|
return;
|
||||||
|
tracker.Entities.Remove(uid);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Makes a list of entities no longer be considered hostile, if it was.
|
||||||
|
/// Doesn't apply to regular faction hostilities.
|
||||||
|
/// </summary>
|
||||||
|
public void AggroEntities(EntityUid uid, IEnumerable<EntityUid> entities, FactionExceptionComponent? comp = null)
|
||||||
|
{
|
||||||
|
comp ??= EnsureComp<FactionExceptionComponent>(uid);
|
||||||
|
foreach (var ent in entities)
|
||||||
|
{
|
||||||
|
AggroEntity(uid, ent, comp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
using Content.Server.NPC.Components;
|
using Content.Server.NPC.Components;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using JetBrains.Annotations;
|
||||||
|
|
||||||
namespace Content.Server.NPC.Systems;
|
namespace Content.Server.NPC.Systems;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Outlines faction relationships with each other.
|
/// Outlines faction relationships with each other.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class NpcFactionSystem : EntitySystem
|
public sealed partial class NpcFactionSystem : EntitySystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly FactionExceptionSystem _factionException = default!;
|
|
||||||
[Dependency] private readonly EntityLookupSystem _lookup = default!;
|
[Dependency] private readonly EntityLookupSystem _lookup = default!;
|
||||||
[Dependency] private readonly IPrototypeManager _protoManager = default!;
|
[Dependency] private readonly IPrototypeManager _protoManager = default!;
|
||||||
|
|
||||||
@@ -26,6 +26,8 @@ public sealed class NpcFactionSystem : EntitySystem
|
|||||||
_sawmill = Logger.GetSawmill("faction");
|
_sawmill = Logger.GetSawmill("faction");
|
||||||
SubscribeLocalEvent<NpcFactionMemberComponent, ComponentStartup>(OnFactionStartup);
|
SubscribeLocalEvent<NpcFactionMemberComponent, ComponentStartup>(OnFactionStartup);
|
||||||
_protoManager.PrototypesReloaded += OnProtoReload;
|
_protoManager.PrototypesReloaded += OnProtoReload;
|
||||||
|
|
||||||
|
InitializeException();
|
||||||
RefreshFactions();
|
RefreshFactions();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,12 +136,15 @@ public sealed class NpcFactionSystem : EntitySystem
|
|||||||
if (TryComp<FactionExceptionComponent>(entity, out var factionException))
|
if (TryComp<FactionExceptionComponent>(entity, out var factionException))
|
||||||
{
|
{
|
||||||
// ignore anything from enemy faction that we are explicitly friendly towards
|
// ignore anything from enemy faction that we are explicitly friendly towards
|
||||||
return hostiles.Where(target => !_factionException.IsIgnored(factionException, target));
|
return hostiles
|
||||||
|
.Union(GetHostiles(entity, factionException))
|
||||||
|
.Where(target => !IsIgnored(entity, target, factionException));
|
||||||
}
|
}
|
||||||
|
|
||||||
return hostiles;
|
return hostiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[PublicAPI]
|
||||||
public IEnumerable<EntityUid> GetNearbyFriendlies(EntityUid entity, float range, NpcFactionMemberComponent? component = null)
|
public IEnumerable<EntityUid> GetNearbyFriendlies(EntityUid entity, float range, NpcFactionMemberComponent? component = null)
|
||||||
{
|
{
|
||||||
if (!Resolve(entity, ref component, false))
|
if (!Resolve(entity, ref component, false))
|
||||||
|
|||||||
@@ -111,6 +111,14 @@
|
|||||||
bloodMaxVolume: 0.1
|
bloodMaxVolume: 0.1
|
||||||
- type: MobPrice
|
- type: MobPrice
|
||||||
price: 50
|
price: 50
|
||||||
|
- type: NPCRetaliation
|
||||||
|
- type: FactionException
|
||||||
|
- type: NpcFactionMember
|
||||||
|
factions:
|
||||||
|
- Passive
|
||||||
|
- type: HTN
|
||||||
|
rootTask:
|
||||||
|
task: SimpleHostileCompound
|
||||||
- type: Puller
|
- type: Puller
|
||||||
needsHands: true
|
needsHands: true
|
||||||
|
|
||||||
@@ -560,6 +568,8 @@
|
|||||||
states:
|
states:
|
||||||
Alive:
|
Alive:
|
||||||
Base: goat
|
Base: goat
|
||||||
|
Critical:
|
||||||
|
Base: dead
|
||||||
Dead:
|
Dead:
|
||||||
Base: dead
|
Base: dead
|
||||||
- type: SolutionContainerManager
|
- type: SolutionContainerManager
|
||||||
@@ -592,9 +602,12 @@
|
|||||||
- Passive
|
- Passive
|
||||||
- type: Body
|
- type: Body
|
||||||
prototype: AnimalRuminant
|
prototype: AnimalRuminant
|
||||||
|
- type: NPCRetaliation
|
||||||
|
attackMemoryLength: 5
|
||||||
|
- type: FactionException
|
||||||
- type: HTN
|
- type: HTN
|
||||||
rootTask:
|
rootTask:
|
||||||
task: RuminantCompound
|
task: RuminantHostileCompound
|
||||||
|
|
||||||
# Note that we gotta make this bitch vomit someday when you feed it anthrax or sumthin. Needs to be a small item thief too and aggressive if attacked.
|
# Note that we gotta make this bitch vomit someday when you feed it anthrax or sumthin. Needs to be a small item thief too and aggressive if attacked.
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -671,6 +684,8 @@
|
|||||||
states:
|
states:
|
||||||
Alive:
|
Alive:
|
||||||
Base: crawling
|
Base: crawling
|
||||||
|
Critical:
|
||||||
|
Base: dead
|
||||||
Dead:
|
Dead:
|
||||||
Base: dead
|
Base: dead
|
||||||
- type: Butcherable
|
- type: Butcherable
|
||||||
@@ -679,6 +694,20 @@
|
|||||||
amount: 4
|
amount: 4
|
||||||
- type: Bloodstream
|
- type: Bloodstream
|
||||||
bloodMaxVolume: 300
|
bloodMaxVolume: 300
|
||||||
|
# if you fuck with the gorilla he will harambe you
|
||||||
|
- type: MeleeWeapon
|
||||||
|
damage:
|
||||||
|
types:
|
||||||
|
Blunt: 20
|
||||||
|
animation: WeaponArcFist
|
||||||
|
- type: NPCRetaliation
|
||||||
|
- type: FactionException
|
||||||
|
- type: NpcFactionMember
|
||||||
|
factions:
|
||||||
|
- Passive
|
||||||
|
- type: HTN
|
||||||
|
rootTask:
|
||||||
|
task: SimpleHostileCompound
|
||||||
- type: Puller
|
- type: Puller
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -760,6 +789,15 @@
|
|||||||
soundHit:
|
soundHit:
|
||||||
collection: BoxingHit
|
collection: BoxingHit
|
||||||
animation: WeaponArcFist
|
animation: WeaponArcFist
|
||||||
|
- type: NPCRetaliation
|
||||||
|
attackMemoryLength: 10
|
||||||
|
- type: FactionException
|
||||||
|
- type: NpcFactionMember
|
||||||
|
factions:
|
||||||
|
- Passive
|
||||||
|
- type: HTN
|
||||||
|
rootTask:
|
||||||
|
task: SimpleHostileCompound
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: boxing kangaroo
|
name: boxing kangaroo
|
||||||
@@ -768,9 +806,6 @@
|
|||||||
components:
|
components:
|
||||||
- type: Loadout
|
- type: Loadout
|
||||||
prototypes: [ BoxingKangarooGear ]
|
prototypes: [ BoxingKangarooGear ]
|
||||||
- type: HTN
|
|
||||||
rootTask:
|
|
||||||
task: SimpleHostileCompound
|
|
||||||
- type: NpcFactionMember
|
- type: NpcFactionMember
|
||||||
factions:
|
factions:
|
||||||
- SimpleHostile
|
- SimpleHostile
|
||||||
@@ -857,9 +892,15 @@
|
|||||||
- type: MonkeyAccent
|
- type: MonkeyAccent
|
||||||
- type: Puller
|
- type: Puller
|
||||||
- type: CanHostGuardian
|
- type: CanHostGuardian
|
||||||
|
- type: NPCRetaliation
|
||||||
|
attackMemoryLength: 10
|
||||||
|
- type: FactionException
|
||||||
- type: NpcFactionMember
|
- type: NpcFactionMember
|
||||||
factions:
|
factions:
|
||||||
- Passive
|
- Passive
|
||||||
|
- type: HTN
|
||||||
|
rootTask:
|
||||||
|
task: SimpleHostileCompound
|
||||||
- type: GhostRole
|
- type: GhostRole
|
||||||
prob: 0.05
|
prob: 0.05
|
||||||
makeSentient: true
|
makeSentient: true
|
||||||
|
|||||||
@@ -39,6 +39,19 @@
|
|||||||
- !type:HTNCompoundTask
|
- !type:HTNCompoundTask
|
||||||
task: IdleCompound
|
task: IdleCompound
|
||||||
|
|
||||||
|
- type: htnCompound
|
||||||
|
id: RuminantHostileCompound
|
||||||
|
branches:
|
||||||
|
- tasks:
|
||||||
|
- !type:HTNCompoundTask
|
||||||
|
task: MeleeCombatCompound
|
||||||
|
- tasks:
|
||||||
|
- !type:HTNCompoundTask
|
||||||
|
task: FoodCompound
|
||||||
|
- tasks:
|
||||||
|
- !type:HTNCompoundTask
|
||||||
|
task: IdleCompound
|
||||||
|
|
||||||
- type: htnCompound
|
- type: htnCompound
|
||||||
id: DragonCarpCompound
|
id: DragonCarpCompound
|
||||||
branches:
|
branches:
|
||||||
|
|||||||
Reference in New Issue
Block a user