CharacterHealth

Barotrauma.CharacterHealth

Functions

AddToGUIUpdateList()

AddToGUIUpdateList

ApplyAffliction(targetLimb, affliction, allowStacking, ignoreUnkillability, recalculateVitality)

ApplyAffliction

Parameters

  • targetLimb Limb

  • affliction Affliction

  • allowStacking bool

  • ignoreUnkillability bool

  • recalculateVitality bool

ApplyAfflictionStatusEffects(type)

ApplyAfflictionStatusEffects

Parameters

  • type ActionType

ApplyDamage(hitLimb, attackResult, allowStacking, recalculateVitality)

ApplyDamage

Parameters

  • hitLimb Limb

  • attackResult AttackResult

  • allowStacking bool

  • recalculateVitality bool

CharacterHealth(character)

CharacterHealth

Parameters

CharacterHealth(element, character, limbHealthElement)

CharacterHealth

Parameters

  • element ContentXElement

  • limbHealthElement ContentXElement

CharacterHealth.GetAfflictionIconColor(affliction)

GetAfflictionIconColor

Parameters

  • affliction Affliction

Returns

  • Microsoft.Xna.Framework.Color

CharacterHealth.GetAfflictionIconColor(prefab, affliction)

GetAfflictionIconColor

Parameters

  • prefab AfflictionPrefab

  • affliction Affliction

Returns

  • Microsoft.Xna.Framework.Color

CharacterHealth.GetAfflictionIconColor(prefab, afflictionStrength)

GetAfflictionIconColor

Parameters

  • prefab AfflictionPrefab

  • afflictionStrength number

Returns

  • Microsoft.Xna.Framework.Color

CharacterHealth.IsMouseOnHealthBar()

IsMouseOnHealthBar

Returns

  • bool

CharacterHealth.SortAfflictionsBySeverity(afflictions, excludeBuffs)

SortAfflictionsBySeverity

Parameters

  • afflictions IEnumerable

  • excludeBuffs bool

Returns

  • IEnumerable

ClientRead(inc)

ClientRead

Parameters

  • inc Networking.IReadMessage

DrawHUD(spriteBatch)

DrawHUD

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

Equals(obj)

Equals

Parameters

  • obj Object

Returns

  • bool

ForceUpdateVisuals()

ForceUpdateVisuals

GetActiveAfflictionTags()

GetActiveAfflictionTags

Returns

  • IEnumerable

GetAffliction(identifier, allowLimbAfflictions)

GetAffliction

Parameters

  • identifier Identifier

  • allowLimbAfflictions bool

Returns

  • T

GetAffliction(identifier, allowLimbAfflictions)

GetAffliction

Parameters

  • allowLimbAfflictions bool

Returns

  • Affliction

GetAffliction(identifier, allowLimbAfflictions)

GetAffliction

Parameters

  • identifier Identifier

  • allowLimbAfflictions bool

Returns

  • Affliction

GetAffliction(identifier, limb)

GetAffliction

Parameters

  • identifier Identifier

  • limb Limb

Returns

  • Affliction

GetAfflictionLimb(affliction)

GetAfflictionLimb

Parameters

  • affliction Affliction

Returns

  • Limb

GetAfflictionOfType(afflictionType, allowLimbAfflictions)

GetAfflictionOfType

Parameters

  • afflictionType Identifier

  • allowLimbAfflictions bool

Returns

  • Affliction

GetAfflictionStrength(afflictionType, afflictionidentifier, allowLimbAfflictions)

GetAfflictionStrength

Parameters

  • afflictionType Identifier

  • afflictionidentifier Identifier

  • allowLimbAfflictions bool

Returns

  • number

GetAfflictionStrength(afflictionType, limb, requireLimbSpecific)

GetAfflictionStrength

Parameters

  • afflictionType Identifier

  • limb Limb

  • requireLimbSpecific bool

Returns

  • number

GetAfflictionStrengthByIdentifier(afflictionIdentifier, allowLimbAfflictions)

GetAfflictionStrengthByIdentifier

Parameters

  • afflictionIdentifier Identifier

  • allowLimbAfflictions bool

Returns

  • number

GetAfflictionStrengthByType(afflictionType, allowLimbAfflictions)

GetAfflictionStrengthByType

Parameters

  • afflictionType Identifier

  • allowLimbAfflictions bool

Returns

  • number

GetAllAfflictions(limbHealthFilter)

GetAllAfflictions

Parameters

  • limbHealthFilter function

Returns

  • IEnumerable

GetAllAfflictions()

GetAllAfflictions

Returns

  • IReadOnlyCollection

GetCauseOfDeath()

GetCauseOfDeath

Returns

  • ValueTuple

GetHashCode()

GetHashCode

Returns

  • number

GetLimbDamage(limb, afflictionType)

GetLimbDamage

Parameters

  • limb Limb

  • afflictionType Identifier

Returns

  • number

GetPredictedStrength(affliction, predictFutureDuration, limb)

GetPredictedStrength

Parameters

  • affliction Affliction

  • predictFutureDuration number

  • limb Limb

Returns

  • number

GetResistance(afflictionPrefab, limbType)

GetResistance

Parameters

  • afflictionPrefab AfflictionPrefab

  • limbType LimbType

Returns

  • number

GetStatValue(statType)

GetStatValue

Parameters

  • statType StatTypes

Returns

  • number

GetSuitableTreatments(treatmentSuitability, user, limb, ignoreHiddenAfflictions, predictFutureDuration)

GetSuitableTreatments

Parameters

  • treatmentSuitability table

  • limb Limb

  • ignoreHiddenAfflictions bool

  • predictFutureDuration number

GetTotalAdjustedAfflictionStrength(affliction, otherAfflictionMultiplier, includeSameAffliction)

GetTotalAdjustedAfflictionStrength

Parameters

  • affliction Affliction

  • otherAfflictionMultiplier number

  • includeSameAffliction bool

Returns

  • number

GetType()

GetType

Returns

  • Type

HasFlag(flagType)

HasFlag

Parameters

  • flagType AbilityFlags

Returns

  • bool

Load(element, afflictionPredicate)

Load

Parameters

  • element Xml.Linq.XElement

  • afflictionPredicate function

OnItemDropped(item, ignoreMousePos)

OnItemDropped

Parameters

  • item Item

  • ignoreMousePos bool

Returns

  • bool

RecalculateVitality()

RecalculateVitality

ReduceAfflictionOnAllLimbs(afflictionIdOrType, amount, treatmentAction, attacker)

ReduceAfflictionOnAllLimbs

Parameters

  • afflictionIdOrType Identifier

  • amount number

  • treatmentAction optional ActionType

ReduceAfflictionOnLimb(targetLimb, afflictionIdOrType, amount, treatmentAction, attacker)

ReduceAfflictionOnLimb

Parameters

  • targetLimb Limb

  • afflictionIdOrType Identifier

  • amount number

  • treatmentAction optional ActionType

ReduceAllAfflictionsOnAllLimbs(amount, treatmentAction)

ReduceAllAfflictionsOnAllLimbs

Parameters

  • amount number

  • treatmentAction optional ActionType

ReduceAllAfflictionsOnLimb(targetLimb, amount, treatmentAction)

ReduceAllAfflictionsOnLimb

Parameters

  • targetLimb Limb

  • amount number

  • treatmentAction optional ActionType

Remove()

Remove

RemoveAfflictions(predicate)

RemoveAfflictions

Parameters

  • predicate function

RemoveAllAfflictions()

RemoveAllAfflictions

RemoveNegativeAfflictions()

RemoveNegativeAfflictions

Save(healthElement)

Save

Parameters

  • healthElement Xml.Linq.XElement

ServerWrite(msg)

ServerWrite

Parameters

  • msg Networking.IWriteMessage

SetAllDamage(damageAmount, bleedingDamageAmount, burnDamageAmount)

SetAllDamage

Parameters

  • damageAmount number

  • bleedingDamageAmount number

  • burnDamageAmount number

SetHealthBarVisibility(value)

SetHealthBarVisibility

Parameters

  • value bool

SetVitality(newVitality)

SetVitality

Parameters

  • newVitality number

ToString()

ToString

Returns

Update(deltaTime)

Update

Parameters

  • deltaTime number

UpdateClientSpecific(deltaTime)

UpdateClientSpecific

Parameters

  • deltaTime number

UpdateHUD(deltaTime)

UpdateHUD

Parameters

  • deltaTime number

UpdateStatusHUD(deltaTime)

UpdateStatusHUD

Parameters

  • deltaTime number

Fields

Alignment

Alignment, field of type Alignment

  • Alignment

BloodlossAffliction

BloodlossAffliction, field of type Affliction

  • BloodlossAffliction

BloodlossAmount

BloodlossAmount, field of type number

  • BloodlossAmount

BodyTint

BodyTint, field of type Microsoft.Xna.Framework.Color

  • BodyTint

CPRButton

CPRButton, field of type GUIButton

  • CPRButton

Character

Character, field of type Character

  • Character

CharacterHealth.DamageOverlay

CharacterHealth.DamageOverlay, field of type Sprite

CharacterHealth.DefaultFaceTint

CharacterHealth.DefaultFaceTint, field of type Microsoft.Xna.Framework.Color

CharacterHealth.InsufficientOxygenThreshold

CharacterHealth.InsufficientOxygenThreshold, field of type number

CharacterHealth.LowOxygenThreshold

CharacterHealth.LowOxygenThreshold, field of type number

CharacterHealth.OpenHealthWindow

CharacterHealth.OpenHealthWindow, field of type CharacterHealth

CrushDepth

CrushDepth, field of type number

  • CrushDepth

DamageOverlayTimer

DamageOverlayTimer, field of type number

  • DamageOverlayTimer

DisplayVitalityDelay

DisplayVitalityDelay, field of type number

  • DisplayVitalityDelay

DisplayedVitality

DisplayedVitality, field of type number

  • DisplayedVitality

DoesBleed

DoesBleed, field of type bool

  • DoesBleed

FaceTint

FaceTint, field of type Microsoft.Xna.Framework.Color

  • FaceTint

HealthBarPulsateTimer

HealthBarPulsateTimer, field of type number

  • HealthBarPulsateTimer

HealthPercentage

HealthPercentage, field of type number

  • HealthPercentage

InventorySlotContainer

InventorySlotContainer, field of type GUIComponent

  • InventorySlotContainer

IsParalyzed

IsParalyzed, field of type bool

  • IsParalyzed

IsUnconscious

IsUnconscious, field of type bool

  • IsUnconscious

MaxVitality

MaxVitality, field of type number

  • MaxVitality

MinVitality

MinVitality, field of type number

  • MinVitality

MouseOnElement

MouseOnElement, field of type bool

  • MouseOnElement

OxygenAmount

OxygenAmount, field of type number

  • OxygenAmount

OxygenLowResistance

OxygenLowResistance, field of type number

  • OxygenLowResistance

PressureAffliction

PressureAffliction, field of type Affliction

  • PressureAffliction

PressureKillDelay

PressureKillDelay, field of type number

  • PressureKillDelay

ShowDamageOverlay

ShowDamageOverlay, field of type bool

  • ShowDamageOverlay

Stun

Stun, field of type number

  • Stun

StunTimer

StunTimer, field of type number

  • StunTimer

SuicideButton

SuicideButton, field of type GUIButton

  • SuicideButton

Unkillable

Unkillable, field of type bool

  • Unkillable

UseHealthWindow

UseHealthWindow, field of type bool

  • UseHealthWindow

Vitality

Vitality, field of type number

  • Vitality

VitalityDisregardingDeath

VitalityDisregardingDeath, field of type number

  • VitalityDisregardingDeath

WasInFullHealth

WasInFullHealth, field of type bool

  • WasInFullHealth