Barotrauma Client Doc
Barotrauma.AfflictionHusk Class Reference

A special affliction type that gradually makes the character turn into another type of character. See AfflictionPrefabHusk for more details. More...

Inheritance diagram for Barotrauma.AfflictionHusk:
Barotrauma.Affliction Barotrauma.ISerializableEntity

Public Types

enum class  InfectionState {
  Initial , Dormant , Transition , Active ,
  Final
}
 

Public Member Functions

 AfflictionHusk (AfflictionPrefab prefab, float strength)
 
override void Update (CharacterHealth characterHealth, Limb targetLimb, float deltaTime)
 
void ActivateHusk ()
 
void UnsubscribeFromDeathEvent ()
 
- Public Member Functions inherited from Barotrauma.Affliction
 Affliction (AfflictionPrefab prefab, float strength)
 
void CopyProperties (Affliction source)
 Copy properties here instead of using SerializableProperties (with reflection). More...
 
void Serialize (XElement element)
 
void Deserialize (XElement element)
 
Affliction CreateMultiplied (float multiplier, Affliction affliction)
 
override string ToString ()
 
LocalizedString GetStrengthText ()
 
AfflictionPrefab.Effect GetActiveEffect ()
 
float GetVitalityDecrease (CharacterHealth characterHealth)
 
float GetVitalityDecrease (CharacterHealth characterHealth, float strength)
 
float GetScreenGrainStrength ()
 
float GetScreenDistortStrength ()
 
float GetRadialDistortStrength ()
 
float GetChromaticAberrationStrength ()
 
float GetAfflictionOverlayMultiplier ()
 
Color GetFaceTint ()
 
Color GetBodyTint ()
 
float GetScreenBlurStrength ()
 
float GetSkillMultiplier ()
 
void CalculateDamagePerSecond (float currentVitalityDecrease)
 
float GetResistance (Identifier afflictionId)
 
float GetSpeedMultiplier ()
 
float GetStatValue (StatTypes statType)
 
bool HasFlag (AbilityFlags flagType)
 
void ApplyStatusEffects (ActionType type, float deltaTime, CharacterHealth characterHealth, Limb targetLimb)
 
void ApplyStatusEffect (ActionType type, StatusEffect statusEffect, float deltaTime, CharacterHealth characterHealth, Limb targetLimb)
 
void SetStrength (float strength)
 Use this method to skip clamping and additional logic of the setters. Ideally we would keep this private, but doing so would require too much refactoring. More...
 
bool ShouldShowIcon (Character afflictedCharacter)
 

Static Public Member Functions

static List< LimbAttachHuskAppendage (Character character, AfflictionPrefabHusk matchingAffliction, ContentXElement appendageDefinition=null, Ragdoll ragdoll=null)
 
static Identifier GetHuskedSpeciesName (Identifier speciesName, AfflictionPrefabHusk prefab)
 
static Identifier GetNonHuskedSpeciesName (Identifier huskedSpeciesName, AfflictionPrefabHusk prefab)
 
- Static Public Member Functions inherited from Barotrauma.Affliction
static LocalizedString GetStrengthText (float strength, float maxStrength)
 

Properties

override float???? Strength [get, set]
 
InfectionState State [get]
 
- Properties inherited from Barotrauma.Affliction
string Name [get]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get, set]
 
float PendingGrainEffectStrength [get, set]
 
float GrainEffectStrength [get, set]
 
virtual float Strength [get, set]
 
float NonClampedStrength [get]
 
Identifier Identifier [get]
 
float Probability = 1.0f [get, set]
 
bool DivideByLimbCount [get, set]
 
bool MultiplyByMaxVitality [get]
 
- Properties inherited from Barotrauma.ISerializableEntity
string Name [get]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get]
 

Additional Inherited Members

- Public Attributes inherited from Barotrauma.Affliction
readonly AfflictionPrefab Prefab
 
float DamagePerSecond
 
float DamagePerSecondTimer
 
float PreviousVitalityDecrease
 
float Value
 
readonly Dictionary< AfflictionPrefab.PeriodicEffect, float > PeriodicEffectTimers = new Dictionary<AfflictionPrefab.PeriodicEffect, float>()
 
double AppliedAsSuccessfulTreatmentTime
 
float Duration
 
Character Source
 Which character gave this affliction More...
 
- Protected Attributes inherited from Barotrauma.Affliction
bool activeEffectDirty = true
 
float _strength
 

Detailed Description

A special affliction type that gradually makes the character turn into another type of character. See AfflictionPrefabHusk for more details.

Definition at line 14 of file AfflictionHusk.cs.

Member Enumeration Documentation

◆ InfectionState

Enumerator
Initial 
Dormant 
Transition 
Active 
Final 

Definition at line 16 of file AfflictionHusk.cs.

Constructor & Destructor Documentation

◆ AfflictionHusk()

Barotrauma.AfflictionHusk.AfflictionHusk ( AfflictionPrefab  prefab,
float  strength 
)

Definition at line 73 of file AfflictionHusk.cs.

Member Function Documentation

◆ ActivateHusk()

void Barotrauma.AfflictionHusk.ActivateHusk ( )

Definition at line 205 of file AfflictionHusk.cs.

◆ AttachHuskAppendage()

static List<Limb> Barotrauma.AfflictionHusk.AttachHuskAppendage ( Character  character,
AfflictionPrefabHusk  matchingAffliction,
ContentXElement  appendageDefinition = null,
Ragdoll  ragdoll = null 
)
static

Definition at line 377 of file AfflictionHusk.cs.

◆ GetHuskedSpeciesName()

static Identifier Barotrauma.AfflictionHusk.GetHuskedSpeciesName ( Identifier  speciesName,
AfflictionPrefabHusk  prefab 
)
static

Definition at line 466 of file AfflictionHusk.cs.

◆ GetNonHuskedSpeciesName()

static Identifier Barotrauma.AfflictionHusk.GetNonHuskedSpeciesName ( Identifier  huskedSpeciesName,
AfflictionPrefabHusk  prefab 
)
static

Definition at line 471 of file AfflictionHusk.cs.

◆ UnsubscribeFromDeathEvent()

void Barotrauma.AfflictionHusk.UnsubscribeFromDeathEvent ( )

Definition at line 239 of file AfflictionHusk.cs.

◆ Update()

override void Barotrauma.AfflictionHusk.Update ( CharacterHealth  characterHealth,
Limb  targetLimb,
float  deltaTime 
)
virtual

Reimplemented from Barotrauma.Affliction.

Definition at line 83 of file AfflictionHusk.cs.

Property Documentation

◆ State

InfectionState Barotrauma.AfflictionHusk.State
get

Definition at line 55 of file AfflictionHusk.cs.

◆ Strength

override float???? Barotrauma.AfflictionHusk.Strength
getset

Definition at line 34 of file AfflictionHusk.cs.