Zombie disease is easier to spread and deadly in minutes. Zombies heal over time. (#16235)

* Nerf Space zombies, get DoT in space (barotrauma) and spawn stunned.

- Also discard any helmet or mask you might be wearing.

* Zombies have heal over time, infection far more fatal

- Stun time reduced to 2 seconds

* Zombification occurs after you die, rather than after you crit.

- Zombies cannot inflict Zombification DoT on other zombies.

* Heal shock damage, space zombies are back.

* Lower the chance of infection per hit

* Removed the stun, reduced zombification virus slightly
This commit is contained in:
Tom Leys
2023-05-09 14:24:40 +12:00
committed by GitHub
parent 1e6b0f5d42
commit 878272ecf3
4 changed files with 70 additions and 14 deletions

View File

@@ -1,3 +1,4 @@
using Content.Server.Administration.Commands;
using Content.Server.Atmos.Components;
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
@@ -22,6 +23,7 @@ using Content.Shared.Hands.EntitySystems;
using Content.Shared.Humanoid;
using Content.Shared.Mobs;
using Content.Shared.Mobs.Components;
using Content.Shared.Mobs.Systems;
using Content.Shared.Movement.Components;
using Content.Shared.Movement.Systems;
using Content.Shared.Nutrition.Components;
@@ -54,6 +56,8 @@ namespace Content.Server.Zombies
[Dependency] private readonly SharedCombatModeSystem _combat = default!;
[Dependency] private readonly IChatManager _chatMan = default!;
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly MobStateSystem _mobState = default!;
[Dependency] private readonly MobThresholdSystem _mobThreshold = default!;
public override void Initialize()
{
@@ -67,8 +71,7 @@ namespace Content.Server.Zombies
/// </summary>
private void OnDamageChanged(EntityUid uid, ZombifyOnDeathComponent component, MobStateChangedEvent args)
{
if (args.NewMobState == MobState.Dead ||
args.NewMobState == MobState.Critical)
if (args.NewMobState == MobState.Dead)
{
ZombifyEntity(uid, args.Component);
}
@@ -181,10 +184,17 @@ namespace Content.Server.Zombies
if (TryComp<TemperatureComponent>(target, out var tempComp))
tempComp.ColdDamage.ClampMax(0);
// Zombies can revive themselves
_mobThreshold.SetAllowRevives(target, true);
//Heals the zombie from all the damage it took while human
if (TryComp<DamageableComponent>(target, out var damageablecomp))
_damageable.SetAllDamage(target, damageablecomp, 0);
// Revive them now
if (TryComp<MobStateComponent>(target, out var mobstate) && mobstate.CurrentState==MobState.Dead)
_mobState.ChangeMobState(target, MobState.Alive, mobstate);
//gives it the funny "Zombie ___" name.
var meta = MetaData(target);
zombiecomp.BeforeZombifiedEntityName = meta.EntityName;
@@ -221,6 +231,8 @@ namespace Content.Server.Zombies
_sharedHands.RemoveHand(target, hand.Name);
}
RemComp<HandsComponent>(target);
// No longer waiting to become a zombie:
RemComp<PendingZombieComponent>(target);
//zombie gamemode stuff
RaiseLocalEvent(new EntityZombifiedEvent(target));