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

@@ -63,12 +63,28 @@ namespace Content.Server.Zombies
var query = EntityQueryEnumerator<PendingZombieComponent>();
var curTime = _timing.CurTime;
// Hurt the living infected
while (query.MoveNext(out var uid, out var comp))
{
if (comp.NextTick < curTime)
if (comp.NextTick + TimeSpan.FromSeconds(1) > curTime)
continue;
comp.NextTick += TimeSpan.FromSeconds(1);
comp.InfectedSecs += 1;
// Pain of becoming a zombie grows over time
// 1x at 30s, 3x at 60s, 6x at 90s, 10x at 120s.
var pain_multiple = 0.1 + 0.02 * comp.InfectedSecs + 0.0005 * comp.InfectedSecs * comp.InfectedSecs;
comp.NextTick = curTime;
_damageable.TryChangeDamage(uid, comp.Damage * pain_multiple, true, false);
}
var zomb_query = EntityQueryEnumerator<ZombieComponent>();
// Heal the zombified
while (zomb_query.MoveNext(out var uid, out var comp))
{
if (comp.NextTick + TimeSpan.FromSeconds(1) > curTime)
continue;
comp.NextTick = curTime;
_damageable.TryChangeDamage(uid, comp.Damage, true, false);
}
}
@@ -166,14 +182,18 @@ namespace Content.Server.Zombies
if (!TryComp<MobStateComponent>(entity, out var mobState) || HasComp<DroneComponent>(entity))
continue;
if (_random.Prob(GetZombieInfectionChance(entity, component)))
{
EnsureComp<PendingZombieComponent>(entity);
EnsureComp<ZombifyOnDeathComponent>(entity);
}
if (HasComp<ZombieComponent>(entity))
{
args.BonusDamage = -args.BaseDamage * zombieComp.OtherZombieDamageCoefficient;
}
else
{
if (_random.Prob(GetZombieInfectionChance(entity, component)))
{
EnsureComp<PendingZombieComponent>(entity);
EnsureComp<ZombifyOnDeathComponent>(entity);
}
}
if ((mobState.CurrentState == MobState.Dead || mobState.CurrentState == MobState.Critical)
&& !HasComp<ZombieComponent>(entity))