Skip to content

Commit

Permalink
Zombie buff (#44)
Browse files Browse the repository at this point in the history
* big buff zombie

* big buff zombie v0.2

* big buff zombie v0.3
  • Loading branch information
RedTerrorDark authored Nov 22, 2024
1 parent 88be7b7 commit 585ef2e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 16 deletions.
18 changes: 16 additions & 2 deletions Content.Server/Zombies/ZombieSystem.Transform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
using Content.Shared.Traits.Assorted;
using Robust.Shared.Audio.Systems;
using Content.Shared.Ghost.Roles.Components;
using Content.Shared.Damage.Components;

namespace Content.Server.Zombies;

Expand Down Expand Up @@ -106,6 +107,7 @@ public void ZombifyEntity(EntityUid target, MobStateComponent? mobState = null)
RemComp<ReproductivePartnerComponent>(target);
RemComp<LegsParalyzedComponent>(target);
RemComp<ComplexInteractionComponent>(target);
RemComp<SlowOnDamageComponent>(target);

//funny voice
var accentType = "zombie";
Expand Down Expand Up @@ -170,8 +172,8 @@ public void ZombifyEntity(EntityUid target, MobStateComponent? mobState = null)
DamageDict = new()
{
{ "Slash", 13 },
{ "Piercing", 7 },
{ "Structural", 10 }
{ "Piercing", 8 },
{ "Structural", 20 }
}
};
melee.Damage = dspec;
Expand All @@ -183,6 +185,18 @@ public void ZombifyEntity(EntityUid target, MobStateComponent? mobState = null)
pryComp.Force = true;

Dirty(target, pryComp);

// Humanoid zombie now deals stamina damage! ye.
AddComp<StaminaDamageOnHitComponent>(target);
var staminDamage = EnsureComp<StaminaDamageOnHitComponent>(target);
staminDamage.Damage = 25f;

Dirty(target, staminDamage);

var staminaHp = EnsureComp<StaminaComponent>(target);
staminaHp.CritThreshold = 200f;

Dirty(target, staminaHp);
}

Dirty(target, melee);
Expand Down
7 changes: 4 additions & 3 deletions Content.Shared/Zombies/PendingZombieComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ public sealed partial class PendingZombieComponent : Component
{
DamageDict = new ()
{
{ "Poison", 0.2 },
{ "Poison", 0.5 },
{ "Cellular", 0.2 },
}
};

/// <summary>
/// A multiplier for <see cref="Damage"/> applied when the entity is in critical condition.
/// </summary>
[DataField("critDamageMultiplier")]
public float CritDamageMultiplier = 10f;
public float CritDamageMultiplier = 15f;

[DataField("nextTick", customTypeSerializer:typeof(TimeOffsetSerializer))]
public TimeSpan NextTick;
Expand All @@ -40,7 +41,7 @@ public sealed partial class PendingZombieComponent : Component
/// The minimum amount of time initial infected have before they start taking infection damage.
/// </summary>
[DataField]
public TimeSpan MinInitialInfectedGrace = TimeSpan.FromMinutes(12.5f);
public TimeSpan MinInitialInfectedGrace = TimeSpan.FromMinutes(6f);

/// <summary>
/// The maximum amount of time initial infected have before they start taking damage.
Expand Down
23 changes: 12 additions & 11 deletions Content.Shared/Zombies/ZombieComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ public sealed partial class ZombieComponent : Component
/// The baseline infection chance you have if you are completely nude
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public float MaxZombieInfectionChance = 0.80f;
public float MaxZombieInfectionChance = 0.90f;

/// <summary>
/// The minimum infection chance possible. This is simply to prevent
/// being invincible by bundling up.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public float MinZombieInfectionChance = 0.25f;
public float MinZombieInfectionChance = 0.40f;

[ViewVariables(VVAccess.ReadWrite)]
public float ZombieMovementSpeedDebuff = 0.70f;
public float ZombieMovementSpeedDebuff = 0.80f;

/// <summary>
/// The skin color of the zombie
Expand Down Expand Up @@ -99,11 +99,11 @@ public sealed partial class ZombieComponent : Component
{
DamageDict = new ()
{
{ "Blunt", -0.4 },
{ "Slash", -0.2 },
{ "Piercing", -0.2 },
{ "Heat", -0.02 },
{ "Shock", -0.02 }
{ "Blunt", -0.8 },
{ "Slash", -0.4 },
{ "Piercing", -0.4 },
{ "Heat", -0.05 },
{ "Shock", -0.05 }
}
};

Expand All @@ -121,9 +121,10 @@ public sealed partial class ZombieComponent : Component
{
DamageDict = new()
{
{ "Blunt", -2 },
{ "Slash", -2 },
{ "Piercing", -2 }
{ "Blunt", -5 },
{ "Slash", -5 },
{ "Piercing", -5 },
{ "Heat", -2 }
}
};

Expand Down

0 comments on commit 585ef2e

Please sign in to comment.