using Content.Shared.Contests;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Damage.Components;
///
/// Deals damage when thrown.
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class DamageOtherOnHitComponent : Component
{
[DataField, AutoNetworkedField]
public bool IgnoreResistances = false;
///
/// The damage that a throw deals.
///
[DataField, AutoNetworkedField]
public DamageSpecifier Damage = new();
///
/// The stamina cost of throwing this entity.
///
[DataField, AutoNetworkedField]
public float StaminaCost = 3.5f;
///
/// The maximum amount of hits per throw before landing on the floor.
///
[DataField, AutoNetworkedField]
public int MaxHitQuantity = 1;
///
/// The tracked amount of hits in a single throw.
///
[DataField, AutoNetworkedField]
public int HitQuantity = 0;
///
/// The multiplier to apply to the entity's light attack damage to calculate the throwing damage.
/// Only used if this component has a MeleeWeaponComponent and Damage is not set on the prototype.
///
[DataField, AutoNetworkedField]
public float MeleeDamageMultiplier = 1f;
///
/// The sound to play when this entity hits on a throw.
/// If null, attempts to retrieve the SoundHit from MeleeWeaponComponent.
///
[DataField, AutoNetworkedField]
public SoundSpecifier? SoundHit;
///
/// Arguments for modifying the throwing weapon damage with contests.
/// These are the same ContestArgs in MeleeWeaponComponent.
///
[DataField]
public ContestArgs ContestArgs = new ContestArgs
{
DoStaminaInteraction = true,
StaminaDisadvantage = true,
DoHealthInteraction = true,
};
///
/// Plays if no damage is done to the target entity.
/// If null, attempts to retrieve the SoundNoDamage from MeleeWeaponComponent.
///
[DataField, AutoNetworkedField]
public SoundSpecifier SoundNoDamage { get; set; } = new SoundCollectionSpecifier("WeakHit");
[DataField, AutoNetworkedField]
public float MinimumSpeed = 1f;
}