Barotrauma Client
Loading...
Searching...
No Matches
Barotrauma.Affliction Class Reference
Inheritance diagram for Barotrauma.Affliction:
Barotrauma.ISerializableEntity Barotrauma.AfflictionBleeding Barotrauma.AfflictionHusk Barotrauma.AfflictionPsychosis Barotrauma.AfflictionSpaceHerpes Barotrauma.BuffDurationIncrease

Public Member Functions

 Affliction (AfflictionPrefab prefab, float strength)
 
void CopyProperties (Affliction source)
 Copy properties here instead of using SerializableProperties (with reflection).
 
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)
 
virtual void Update (CharacterHealth characterHealth, Limb targetLimb, float deltaTime)
 
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.
 
bool ShouldShowIcon (Character afflictedCharacter)
 

Static Public Member Functions

static LocalizedString GetStrengthText (float strength, float maxStrength)
 

Public Attributes

readonly AfflictionPrefab Prefab
 
float DamagePerSecond
 
float DamagePerSecondTimer
 
float PreviousVitalityDecrease
 
float Value
 
float Affliction Source StrengthDiminishMultiplier = (1.0f, null)
 
readonly Dictionary< AfflictionPrefab.PeriodicEffect, float > PeriodicEffectTimers = new Dictionary<AfflictionPrefab.PeriodicEffect, float>()
 
double AppliedAsSuccessfulTreatmentTime
 
double AppliedAsFailedTreatmentTime
 
float Duration
 
Character Source
 Which character gave this affliction.
 

Protected Attributes

bool activeEffectDirty = true
 
float _strength
 

Properties

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, set]
 
- Properties inherited from Barotrauma.ISerializableEntity

Constructor & Destructor Documentation

◆ Affliction()

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

Member Function Documentation

◆ ApplyStatusEffect()

void Barotrauma.Affliction.ApplyStatusEffect ( ActionType type,
StatusEffect statusEffect,
float deltaTime,
CharacterHealth characterHealth,
Limb targetLimb )

◆ ApplyStatusEffects()

void Barotrauma.Affliction.ApplyStatusEffects ( ActionType type,
float deltaTime,
CharacterHealth characterHealth,
Limb targetLimb )

◆ CalculateDamagePerSecond()

void Barotrauma.Affliction.CalculateDamagePerSecond ( float currentVitalityDecrease)

◆ CopyProperties()

void Barotrauma.Affliction.CopyProperties ( Affliction source)

Copy properties here instead of using SerializableProperties (with reflection).

◆ CreateMultiplied()

Affliction Barotrauma.Affliction.CreateMultiplied ( float multiplier,
Affliction affliction )

◆ Deserialize()

void Barotrauma.Affliction.Deserialize ( XElement element)

◆ GetActiveEffect()

AfflictionPrefab.Effect Barotrauma.Affliction.GetActiveEffect ( )

◆ GetAfflictionOverlayMultiplier()

float Barotrauma.Affliction.GetAfflictionOverlayMultiplier ( )

◆ GetBodyTint()

Color Barotrauma.Affliction.GetBodyTint ( )

◆ GetChromaticAberrationStrength()

float Barotrauma.Affliction.GetChromaticAberrationStrength ( )

◆ GetFaceTint()

Color Barotrauma.Affliction.GetFaceTint ( )

◆ GetRadialDistortStrength()

float Barotrauma.Affliction.GetRadialDistortStrength ( )

◆ GetResistance()

float Barotrauma.Affliction.GetResistance ( Identifier afflictionId)

◆ GetScreenBlurStrength()

float Barotrauma.Affliction.GetScreenBlurStrength ( )

◆ GetScreenDistortStrength()

float Barotrauma.Affliction.GetScreenDistortStrength ( )

◆ GetScreenGrainStrength()

float Barotrauma.Affliction.GetScreenGrainStrength ( )

◆ GetSkillMultiplier()

float Barotrauma.Affliction.GetSkillMultiplier ( )

◆ GetSpeedMultiplier()

float Barotrauma.Affliction.GetSpeedMultiplier ( )

◆ GetStatValue()

float Barotrauma.Affliction.GetStatValue ( StatTypes statType)

◆ GetStrengthText() [1/2]

LocalizedString Barotrauma.Affliction.GetStrengthText ( )

◆ GetStrengthText() [2/2]

static LocalizedString Barotrauma.Affliction.GetStrengthText ( float strength,
float maxStrength )
static

◆ GetVitalityDecrease() [1/2]

float Barotrauma.Affliction.GetVitalityDecrease ( CharacterHealth characterHealth)

◆ GetVitalityDecrease() [2/2]

float Barotrauma.Affliction.GetVitalityDecrease ( CharacterHealth characterHealth,
float strength )

◆ HasFlag()

bool Barotrauma.Affliction.HasFlag ( AbilityFlags flagType)

◆ Serialize()

void Barotrauma.Affliction.Serialize ( XElement element)

◆ SetStrength()

void Barotrauma.Affliction.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.

◆ ShouldShowIcon()

bool Barotrauma.Affliction.ShouldShowIcon ( Character afflictedCharacter)

◆ ToString()

override string Barotrauma.Affliction.ToString ( )

◆ Update()

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

Member Data Documentation

◆ _strength

float Barotrauma.Affliction._strength
protected

◆ activeEffectDirty

bool Barotrauma.Affliction.activeEffectDirty = true
protected

◆ AppliedAsFailedTreatmentTime

double Barotrauma.Affliction.AppliedAsFailedTreatmentTime

◆ AppliedAsSuccessfulTreatmentTime

double Barotrauma.Affliction.AppliedAsSuccessfulTreatmentTime

◆ DamagePerSecond

float Barotrauma.Affliction.DamagePerSecond

◆ DamagePerSecondTimer

float Barotrauma.Affliction.DamagePerSecondTimer

◆ Duration

float Barotrauma.Affliction.Duration

◆ PeriodicEffectTimers

readonly Dictionary<AfflictionPrefab.PeriodicEffect, float> Barotrauma.Affliction.PeriodicEffectTimers = new Dictionary<AfflictionPrefab.PeriodicEffect, float>()

◆ Prefab

readonly AfflictionPrefab Barotrauma.Affliction.Prefab

◆ PreviousVitalityDecrease

float Barotrauma.Affliction.PreviousVitalityDecrease

◆ Source

Character Barotrauma.Affliction.Source

Which character gave this affliction.

◆ StrengthDiminishMultiplier

float Affliction Source Barotrauma.Affliction.StrengthDiminishMultiplier = (1.0f, null)

◆ Value

float Barotrauma.Affliction.Value

Property Documentation

◆ DivideByLimbCount

bool Barotrauma.Affliction.DivideByLimbCount
getset

◆ GrainEffectStrength

float Barotrauma.Affliction.GrainEffectStrength
getset

◆ Identifier

Identifier Barotrauma.Affliction.Identifier
get

◆ MultiplyByMaxVitality

bool Barotrauma.Affliction.MultiplyByMaxVitality
getset

◆ Name

string Barotrauma.Affliction.Name
get

◆ NonClampedStrength

float Barotrauma.Affliction.NonClampedStrength
get

◆ PendingGrainEffectStrength

float Barotrauma.Affliction.PendingGrainEffectStrength
getset

◆ Probability

float Barotrauma.Affliction.Probability = 1.0f
getset

◆ SerializableProperties

Dictionary<Identifier, SerializableProperty> Barotrauma.Affliction.SerializableProperties
getset

◆ Strength

virtual float Barotrauma.Affliction.Strength
getset

The documentation for this class was generated from the following file: