using Content.Shared.Chat.Prototypes;
using Content.Shared.Damage;
using Content.Shared.Roles;
using Content.Shared.Humanoid;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using static Content.Shared.Humanoid.HumanoidAppearanceState;
namespace Content.Shared.Zombies
{
[RegisterComponent, NetworkedComponent]
public sealed class ZombieComponent : Component
{
///
/// The coefficient of the damage reduction applied when a zombie
/// attacks another zombie. longe name
///
[ViewVariables]
public float OtherZombieDamageCoefficient = 0.25f;
///
/// Chance that this zombie be permanently killed (rolled once on crit->death transition)
///
[ViewVariables(VVAccess.ReadWrite)]
public float ZombiePermadeathChance = 0.80f;
///
/// Chance that this zombie will be healed (rolled each second when in crit or dead)
/// 3% means you have a 60% chance after 30 secs and a 84% chance after 60.
///
[ViewVariables(VVAccess.ReadWrite)]
public float ZombieReviveChance = 0.03f;
///
/// Has this zombie stopped healing now that it's died for real?
///
[ViewVariables(VVAccess.ReadWrite)]
public bool Permadeath = false;
///
/// The baseline infection chance you have if you are completely nude
///
[ViewVariables(VVAccess.ReadWrite)]
public float MaxZombieInfectionChance = 0.50f;
///
/// The minimum infection chance possible. This is simply to prevent
/// being invincible by bundling up.
///
[ViewVariables(VVAccess.ReadWrite)]
public float MinZombieInfectionChance = 0.20f;
[ViewVariables(VVAccess.ReadWrite)]
public float ZombieMovementSpeedDebuff = 0.70f;
///
/// How long it takes our bite victims to turn in seconds (max).
/// Will roll 25% - 100% of this on bite.
///
[DataField("zombieInfectionTurnTime"), ViewVariables(VVAccess.ReadWrite)]
public float ZombieInfectionTurnTime = 480.0f;
///
/// The skin color of the zombie
///
[DataField("skinColor")]
public Color SkinColor = new(0.45f, 0.51f, 0.29f);
///
/// The eye color of the zombie
///
[DataField("eyeColor")]
public Color EyeColor = new(0.96f, 0.13f, 0.24f);
///
/// The base layer to apply to any 'external' humanoid layers upon zombification.
///
[DataField("baseLayerExternal")]
public string BaseLayerExternal = "MobHumanoidMarkingMatchSkin";
///
/// The attack arc of the zombie
///
[DataField("attackArc", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string AttackAnimation = "WeaponArcBite";
///
/// The role prototype of the zombie antag role
///
[DataField("zombieRoleId", customTypeSerializer: typeof(PrototypeIdSerializer))]
public readonly string ZombieRoleId = "Zombie";
///
/// The EntityName of the humanoid to restore in case of cloning
///
[DataField("beforeZombifiedEntityName"), ViewVariables(VVAccess.ReadOnly)]
public string BeforeZombifiedEntityName = String.Empty;
///
/// The CustomBaseLayers of the humanoid to restore in case of cloning
///
[DataField("beforeZombifiedCustomBaseLayers")]
public Dictionary BeforeZombifiedCustomBaseLayers = new ();
///
/// The skin color of the humanoid to restore in case of cloning
///
[DataField("beforeZombifiedSkinColor")]
public Color BeforeZombifiedSkinColor;
[DataField("emoteId", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string? EmoteSoundsId = "Zombie";
public EmoteSoundsPrototype? EmoteSounds;
[DataField("nextTick", customTypeSerializer:typeof(TimeOffsetSerializer))]
public TimeSpan NextTick;
///
/// Healing each second
///
[DataField("damage")] public DamageSpecifier Damage = new()
{
DamageDict = new ()
{
{ "Blunt", -0.4 },
{ "Slash", -0.2 },
{ "Piercing", -0.2 },
{ "Heat", -0.2 },
{ "Cold", -0.2 },
{ "Shock", -0.2 },
}
};
///
/// Path to antagonist alert sound.
///
[DataField("greetSoundNotification")]
public SoundSpecifier GreetSoundNotification = new SoundPathSpecifier("/Audio/Ambience/Antag/zombie_start.ogg");
}
}