Barotrauma Client Doc
Barotrauma.AfflictionPrefab.Effect Class Reference

Effects are the primary way to add functionality to afflictions. More...

Classes

struct  AppliedStatValue
 StatType that will be applied to the affected character when the effect is active that is proportional to the effect's strength. More...
 

Public Member Functions

 Effect (ContentXElement element, string parentDebugName)
 
float GetStrengthFactor (Affliction affliction)
 Returns 0 if affliction.Strength is MinStrength, 1 if affliction.Strength is MaxStrength More...
 
float GetStrengthFactor (float strength)
 Returns 0 if affliction.Strength is MinStrength, 1 if affliction.Strength is MaxStrength More...
 

Public Attributes

readonly ImmutableArray< IdentifierResistanceFor
 A list of identifiers of afflictions that the affected character will be resistant to when this effect is active. More...
 
readonly ImmutableArray< IdentifierBlockTransformation
 Prevents AfflictionHusks with the specified identifier(s) from transforming the character into an AI-controlled character. More...
 
readonly ImmutableDictionary< StatTypes, AppliedStatValueAfflictionStatValues
 StatType that will be applied to the affected character when the effect is active that is proportional to the effect's strength. More...
 
readonly AbilityFlags AfflictionAbilityFlags
 
readonly ImmutableArray< StatusEffectStatusEffects
 

Properties

float MinStrength [get]
 
float MaxStrength [get]
 
float MinVitalityDecrease [get]
 
float MaxVitalityDecrease [get]
 
float StrengthChange [get]
 
bool MultiplyByMaxVitality [get]
 
float MinScreenBlur [get]
 
float MaxScreenBlur [get]
 
float MinScreenDistort [get]
 
float MaxScreenDistort [get]
 
float MinRadialDistort [get]
 
float MaxRadialDistort [get]
 
float MinChromaticAberration [get]
 
float MaxChromaticAberration [get]
 
Color GrainColor [get]
 
float MinGrainStrength [get]
 
float MaxGrainStrength [get]
 
float ScreenEffectFluctuationFrequency [get]
 
float MinAfflictionOverlayAlphaMultiplier [get]
 
float MaxAfflictionOverlayAlphaMultiplier [get]
 
float MinBuffMultiplier [get]
 
float MaxBuffMultiplier [get]
 
float MinSpeedMultiplier [get]
 
float MaxSpeedMultiplier [get]
 
float MinSkillMultiplier [get]
 
float MaxSkillMultiplier [get]
 
float MinResistance [get]
 
float MaxResistance [get]
 
Identifier DialogFlag [get]
 
Identifier Tag [get]
 
Color MinFaceTint [get]
 
Color MaxFaceTint [get]
 
Color MinBodyTint [get]
 
Color MaxBodyTint [get]
 

Detailed Description

Effects are the primary way to add functionality to afflictions.

<doc> <Ignore type="SubElement" identifier="AbilityFlag" > <SubElement identifier="abilityflag" type="AppliedAbilityFlag"> Enables the specified flag on the character as long as the effect is active. </SubElement> <Type identifier="AppliedAbilityFlag">

Flag that will be enabled for the character as long as the effect is active.

<Effect minstrength="0" maxstrength="100">
<AbilityFlag flagtype="ImmuneToPressure" />
Effect(ContentXElement element, string parentDebugName)

<Field identifier="FlagType" type="AbilityFlags" defaultValue="None"> Which ability flag to enable. </Field> </Type> </doc>

Definition at line 233 of file AfflictionPrefab.cs.

Constructor & Destructor Documentation

◆ Effect()

Barotrauma.AfflictionPrefab.Effect.Effect ( ContentXElement  element,
string  parentDebugName 
)

Definition at line 421 of file AfflictionPrefab.cs.

Member Function Documentation

◆ GetStrengthFactor() [1/2]

float Barotrauma.AfflictionPrefab.Effect.GetStrengthFactor ( Affliction  affliction)

Returns 0 if affliction.Strength is MinStrength, 1 if affliction.Strength is MaxStrength

◆ GetStrengthFactor() [2/2]

float Barotrauma.AfflictionPrefab.Effect.GetStrengthFactor ( float  strength)

Returns 0 if affliction.Strength is MinStrength, 1 if affliction.Strength is MaxStrength

Member Data Documentation

◆ AfflictionAbilityFlags

readonly AbilityFlags Barotrauma.AfflictionPrefab.Effect.AfflictionAbilityFlags

Definition at line 416 of file AfflictionPrefab.cs.

◆ AfflictionStatValues

readonly ImmutableDictionary<StatTypes, AppliedStatValue> Barotrauma.AfflictionPrefab.Effect.AfflictionStatValues

StatType that will be applied to the affected character when the effect is active that is proportional to the effect's strength.

Definition at line 414 of file AfflictionPrefab.cs.

◆ BlockTransformation

readonly ImmutableArray<Identifier> Barotrauma.AfflictionPrefab.Effect.BlockTransformation

Prevents AfflictionHusks with the specified identifier(s) from transforming the character into an AI-controlled character.

Definition at line 409 of file AfflictionPrefab.cs.

◆ ResistanceFor

readonly ImmutableArray<Identifier> Barotrauma.AfflictionPrefab.Effect.ResistanceFor

A list of identifiers of afflictions that the affected character will be resistant to when this effect is active.

Definition at line 330 of file AfflictionPrefab.cs.

◆ StatusEffects

readonly ImmutableArray<StatusEffect> Barotrauma.AfflictionPrefab.Effect.StatusEffects

Definition at line 419 of file AfflictionPrefab.cs.

Property Documentation

◆ DialogFlag

Identifier Barotrauma.AfflictionPrefab.Effect.DialogFlag
get

Definition at line 341 of file AfflictionPrefab.cs.

◆ GrainColor

Color Barotrauma.AfflictionPrefab.Effect.GrainColor
get

Definition at line 281 of file AfflictionPrefab.cs.

◆ MaxAfflictionOverlayAlphaMultiplier

float Barotrauma.AfflictionPrefab.Effect.MaxAfflictionOverlayAlphaMultiplier
get

Definition at line 302 of file AfflictionPrefab.cs.

◆ MaxBodyTint

Color Barotrauma.AfflictionPrefab.Effect.MaxBodyTint
get

Definition at line 360 of file AfflictionPrefab.cs.

◆ MaxBuffMultiplier

float Barotrauma.AfflictionPrefab.Effect.MaxBuffMultiplier
get

Definition at line 312 of file AfflictionPrefab.cs.

◆ MaxChromaticAberration

float Barotrauma.AfflictionPrefab.Effect.MaxChromaticAberration
get

Definition at line 278 of file AfflictionPrefab.cs.

◆ MaxFaceTint

Color Barotrauma.AfflictionPrefab.Effect.MaxFaceTint
get

Definition at line 352 of file AfflictionPrefab.cs.

◆ MaxGrainStrength

float Barotrauma.AfflictionPrefab.Effect.MaxGrainStrength
get

Definition at line 287 of file AfflictionPrefab.cs.

◆ MaxRadialDistort

float Barotrauma.AfflictionPrefab.Effect.MaxRadialDistort
get

Definition at line 272 of file AfflictionPrefab.cs.

◆ MaxResistance

float Barotrauma.AfflictionPrefab.Effect.MaxResistance
get

Definition at line 338 of file AfflictionPrefab.cs.

◆ MaxScreenBlur

float Barotrauma.AfflictionPrefab.Effect.MaxScreenBlur
get

Definition at line 260 of file AfflictionPrefab.cs.

◆ MaxScreenDistort

float Barotrauma.AfflictionPrefab.Effect.MaxScreenDistort
get

Definition at line 266 of file AfflictionPrefab.cs.

◆ MaxSkillMultiplier

float Barotrauma.AfflictionPrefab.Effect.MaxSkillMultiplier
get

Definition at line 324 of file AfflictionPrefab.cs.

◆ MaxSpeedMultiplier

float Barotrauma.AfflictionPrefab.Effect.MaxSpeedMultiplier
get

Definition at line 318 of file AfflictionPrefab.cs.

◆ MaxStrength

float Barotrauma.AfflictionPrefab.Effect.MaxStrength
get

Definition at line 240 of file AfflictionPrefab.cs.

◆ MaxVitalityDecrease

float Barotrauma.AfflictionPrefab.Effect.MaxVitalityDecrease
get

Definition at line 246 of file AfflictionPrefab.cs.

◆ MinAfflictionOverlayAlphaMultiplier

float Barotrauma.AfflictionPrefab.Effect.MinAfflictionOverlayAlphaMultiplier
get

Definition at line 297 of file AfflictionPrefab.cs.

◆ MinBodyTint

Color Barotrauma.AfflictionPrefab.Effect.MinBodyTint
get

Definition at line 356 of file AfflictionPrefab.cs.

◆ MinBuffMultiplier

float Barotrauma.AfflictionPrefab.Effect.MinBuffMultiplier
get

Definition at line 307 of file AfflictionPrefab.cs.

◆ MinChromaticAberration

float Barotrauma.AfflictionPrefab.Effect.MinChromaticAberration
get

Definition at line 275 of file AfflictionPrefab.cs.

◆ MinFaceTint

Color Barotrauma.AfflictionPrefab.Effect.MinFaceTint
get

Definition at line 348 of file AfflictionPrefab.cs.

◆ MinGrainStrength

float Barotrauma.AfflictionPrefab.Effect.MinGrainStrength
get

Definition at line 284 of file AfflictionPrefab.cs.

◆ MinRadialDistort

float Barotrauma.AfflictionPrefab.Effect.MinRadialDistort
get

Definition at line 269 of file AfflictionPrefab.cs.

◆ MinResistance

float Barotrauma.AfflictionPrefab.Effect.MinResistance
get

Definition at line 334 of file AfflictionPrefab.cs.

◆ MinScreenBlur

float Barotrauma.AfflictionPrefab.Effect.MinScreenBlur
get

Definition at line 257 of file AfflictionPrefab.cs.

◆ MinScreenDistort

float Barotrauma.AfflictionPrefab.Effect.MinScreenDistort
get

Definition at line 263 of file AfflictionPrefab.cs.

◆ MinSkillMultiplier

float Barotrauma.AfflictionPrefab.Effect.MinSkillMultiplier
get

Definition at line 321 of file AfflictionPrefab.cs.

◆ MinSpeedMultiplier

float Barotrauma.AfflictionPrefab.Effect.MinSpeedMultiplier
get

Definition at line 315 of file AfflictionPrefab.cs.

◆ MinStrength

float Barotrauma.AfflictionPrefab.Effect.MinStrength
get

Definition at line 237 of file AfflictionPrefab.cs.

◆ MinVitalityDecrease

float Barotrauma.AfflictionPrefab.Effect.MinVitalityDecrease
get

Definition at line 243 of file AfflictionPrefab.cs.

◆ MultiplyByMaxVitality

bool Barotrauma.AfflictionPrefab.Effect.MultiplyByMaxVitality
get

Definition at line 254 of file AfflictionPrefab.cs.

◆ ScreenEffectFluctuationFrequency

float Barotrauma.AfflictionPrefab.Effect.ScreenEffectFluctuationFrequency
get

Definition at line 292 of file AfflictionPrefab.cs.

◆ StrengthChange

float Barotrauma.AfflictionPrefab.Effect.StrengthChange
get

Definition at line 249 of file AfflictionPrefab.cs.

◆ Tag

Identifier Barotrauma.AfflictionPrefab.Effect.Tag
get

Definition at line 344 of file AfflictionPrefab.cs.