* - add: Meatspike changes. * - fix: Fix socks. * - remove: No light status. * - tweak: Raptor tweak. * - fix: Fix exception. * - remove: Remove unsexed. * - tweak: Crossbow tweak. * - add: More meatspike. * - tweak: Nerf buff rune. * - tweak: No throwing during incorporeal. * - add: Incorporeal magic cooldown.
35 lines
924 B
C#
35 lines
924 B
C#
using Content.Server.Atmos.Components;
|
|
using Content.Server.Body.Systems;
|
|
using Content.Shared.Mobs;
|
|
|
|
namespace Content.Server._White.Wizard.Magic.Amaterasu;
|
|
|
|
public sealed class AmaterasuSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly BodySystem _bodySystem = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<AmaterasuComponent, MobStateChangedEvent>(OnMobState);
|
|
}
|
|
|
|
private void OnMobState(EntityUid uid, AmaterasuComponent component, MobStateChangedEvent args)
|
|
{
|
|
if (args.NewMobState is MobState.Critical or MobState.Dead)
|
|
{
|
|
if(!TryComp<FlammableComponent>(uid, out var flammable))
|
|
return;
|
|
|
|
if (flammable.OnFire)
|
|
{
|
|
_bodySystem.GibBody(uid, true);
|
|
return;
|
|
}
|
|
|
|
RemComp<AmaterasuComponent>(uid);
|
|
}
|
|
}
|
|
}
|