Barotrauma Client Doc
|
Attacks are used to deal damage to characters, structures and items. They can be defined in the weapon components of the items or the limb definitions of the characters. The limb attacks can also be used by the player, when they control a monster or have some appendage, like a husk stinger. More...
Public Member Functions | |
void | SetUser (Character user) |
List< Affliction > | GetMultipliedAfflictions (float multiplier) |
float | GetStructureDamage (float deltaTime) |
float | GetLevelWallDamage (float deltaTime) |
float | GetItemDamage (float deltaTime, float multiplier=1) |
float | GetTotalDamage (bool includeStructureDamage=false) |
Attack (float damage, float bleedingDamage, float burnDamage, float structureDamage, float itemDamage, float range=0.0f) | |
Attack (ContentXElement element, string parentDebugName, Item sourceItem) | |
Attack (ContentXElement element, string parentDebugName) | |
void | ReloadAfflictions (ContentXElement element, string parentDebugName) |
void | Serialize (ContentXElement element) |
void | Deserialize (ContentXElement element, string parentDebugName) |
AttackResult | DoDamage (Character attacker, IDamageable target, Vector2 worldPosition, float deltaTime, bool playSound=true, PhysicsBody sourceBody=null, Limb sourceLimb=null) |
AttackResult | DoDamageToLimb (Character attacker, Limb targetLimb, Vector2 worldPosition, float deltaTime, bool playSound=true, PhysicsBody sourceBody=null, Limb sourceLimb=null) |
void | UpdateCoolDown (float deltaTime) |
void | UpdateAttackTimer (float deltaTime, Character character) |
void | ResetAttackTimer () |
void | SetCoolDown (bool applyRandom) |
void | ResetCoolDown () |
bool | IsValidContext (AttackContext context) |
bool | IsValidContext (IEnumerable< AttackContext > contexts) |
bool | IsValidTarget (AttackTarget targetType) |
bool | IsValidTarget (Entity target) |
Vector2 | CalculateAttackPhase (TransitionMode easing=TransitionMode.Linear) |
Public Attributes | |
readonly List< int > | ForceOnLimbIndices = new List<int>() |
readonly Dictionary< Affliction, XElement > | Afflictions = new Dictionary<Affliction, XElement>() |
Properties | |
AttackContext | Context [get] |
AttackTarget | TargetType [get] |
LimbType | TargetLimbType [get] |
HitDetection | HitDetectionType [get] |
AIBehaviorAfterAttack | AfterAttack [get, set] |
float | AfterAttackDelay [get, set] |
bool | Reverse [get] |
bool | SnapRopeOnNewAttack [get] |
bool | Retreat [get] |
float | Range [get, set] |
float | DamageRange [get, set] |
float | MinRange [get] |
float | Duration [get] |
float | CoolDown = 5 [get, set] |
float | SecondaryCoolDown = 0 [get, set] |
float | CoolDownRandomFactor = 0 [get] |
bool | FullSpeedAfterAttack [get] |
float | StructureDamage [get, set] |
bool | EmitStructureDamageParticles [get] |
float | ItemDamage [get, set] |
float | Penetration [get] |
float | DamageMultiplier = 1 [get, set] |
Used for multiplying all the damage. More... | |
float | RangeMultiplier = 1 [get, set] |
Used for multiplying all the ranges. More... | |
float | ImpactMultiplier = 1 [get, set] |
Used for multiplying the physics forces. More... | |
float | LevelWallDamage [get, set] |
bool | Ranged [get, set] |
bool | AvoidFriendlyFire [get, set] |
float | RequiredAngle [get, set] |
float | RequiredAngleToShoot [get, set] |
float | AimRotationTorque [get, set] |
int | RotationLimbIndex [get, set] |
float | SwayAmount [get, set] |
float | SwayFrequency [get, set] |
float | Stun [get, set] |
bool | OnlyHumans [get, set] |
string | ApplyForceOnLimbs [get, set] |
float | Force [get] |
Vector2 | RootForceWorldStart [get] |
Vector2 | RootForceWorldMiddle [get] |
Vector2 | RootForceWorldEnd [get] |
TransitionMode | RootTransitionEasing [get] |
float | Torque [get] |
bool | ApplyForcesOnlyOnce [get] |
float | TargetImpulse [get] |
Vector2 | TargetImpulseWorld [get] |
float | TargetForce [get] |
Vector2 | TargetForceWorld [get] |
float | SubmarineImpactMultiplier [get] |
float | SeverLimbsProbability [get, set] |
float | StickChance [get] |
float | Priority [get] |
bool | Blink [get] |
IEnumerable< StatusEffect > | StatusEffects [get] |
string | Name [get] |
Dictionary< Identifier, SerializableProperty > | SerializableProperties = new Dictionary<Identifier, SerializableProperty>() [get] |
List< PropertyConditional > | Conditionals = new List<PropertyConditional>() [get] |
Only affects ai decision making. All the conditionals has to be met in order to select the attack. TODO: allow to define conditionals using any (implemented in StatusEffect -> move from there to PropertyConditional?) More... | |
Item | SourceItem [get, set] |
float | AttackTimer [get] |
float | CoolDownTimer [get, set] |
float | CurrentRandomCoolDown [get] |
float | SecondaryCoolDownTimer [get, set] |
bool | IsRunning [get] |
string | StructureSoundType [get] |
Properties inherited from Barotrauma.ISerializableEntity | |
string | Name [get] |
Dictionary< Identifier, SerializableProperty > | SerializableProperties [get] |
Attacks are used to deal damage to characters, structures and items. They can be defined in the weapon components of the items or the limb definitions of the characters. The limb attacks can also be used by the player, when they control a monster or have some appendage, like a husk stinger.
Definition at line 87 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
Barotrauma.Attack.Attack | ( | float | damage, |
float | bleedingDamage, | ||
float | burnDamage, | ||
float | structureDamage, | ||
float | itemDamage, | ||
float | range = 0.0f |
||
) |
Definition at line 369 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
Barotrauma.Attack.Attack | ( | ContentXElement | element, |
string | parentDebugName, | ||
Item | sourceItem | ||
) |
Definition at line 381 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
Barotrauma.Attack.Attack | ( | ContentXElement | element, |
string | parentDebugName | ||
) |
Definition at line 386 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
Vector2 Barotrauma.Attack.CalculateAttackPhase | ( | TransitionMode | easing = TransitionMode.Linear | ) |
Definition at line 814 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
void Barotrauma.Attack.Deserialize | ( | ContentXElement | element, |
string | parentDebugName | ||
) |
Definition at line 486 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
AttackResult Barotrauma.Attack.DoDamage | ( | Character | attacker, |
IDamageable | target, | ||
Vector2 | worldPosition, | ||
float | deltaTime, | ||
bool | playSound = true , |
||
PhysicsBody | sourceBody = null , |
||
Limb | sourceLimb = null |
||
) |
Definition at line 492 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
AttackResult Barotrauma.Attack.DoDamageToLimb | ( | Character | attacker, |
Limb | targetLimb, | ||
Vector2 | worldPosition, | ||
float | deltaTime, | ||
bool | playSound = true , |
||
PhysicsBody | sourceBody = null , |
||
Limb | sourceLimb = null |
||
) |
Definition at line 594 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
float Barotrauma.Attack.GetItemDamage | ( | float | deltaTime, |
float | multiplier = 1 |
||
) |
Definition at line 353 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
float Barotrauma.Attack.GetLevelWallDamage | ( | float | deltaTime | ) |
Definition at line 348 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
List<Affliction> Barotrauma.Attack.GetMultipliedAfflictions | ( | float | multiplier | ) |
Definition at line 333 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
float Barotrauma.Attack.GetStructureDamage | ( | float | deltaTime | ) |
Definition at line 343 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
float Barotrauma.Attack.GetTotalDamage | ( | bool | includeStructureDamage = false | ) |
Definition at line 359 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
bool Barotrauma.Attack.IsValidContext | ( | AttackContext | context | ) |
bool Barotrauma.Attack.IsValidContext | ( | IEnumerable< AttackContext > | contexts | ) |
Definition at line 765 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
bool Barotrauma.Attack.IsValidTarget | ( | AttackTarget | targetType | ) |
bool Barotrauma.Attack.IsValidTarget | ( | Entity | target | ) |
Definition at line 804 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
void Barotrauma.Attack.ReloadAfflictions | ( | ContentXElement | element, |
string | parentDebugName | ||
) |
Definition at line 449 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
void Barotrauma.Attack.ResetAttackTimer | ( | ) |
Definition at line 730 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
void Barotrauma.Attack.ResetCoolDown | ( | ) |
Definition at line 754 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
void Barotrauma.Attack.Serialize | ( | ContentXElement | element | ) |
Definition at line 474 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
void Barotrauma.Attack.SetCoolDown | ( | bool | applyRandom | ) |
Definition at line 736 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
void Barotrauma.Attack.SetUser | ( | Character | user | ) |
Definition at line 321 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
void Barotrauma.Attack.UpdateAttackTimer | ( | float | deltaTime, |
Character | character | ||
) |
Definition at line 719 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
void Barotrauma.Attack.UpdateCoolDown | ( | float | deltaTime | ) |
Definition at line 711 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
readonly Dictionary<Affliction, XElement> Barotrauma.Attack.Afflictions = new Dictionary<Affliction, XElement>() |
Definition at line 308 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
readonly List<int> Barotrauma.Attack.ForceOnLimbIndices = new List<int>() |
Definition at line 306 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 102 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 105 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 203 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 221 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 260 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 705 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 194 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 289 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Only affects ai decision making. All the conditionals has to be met in order to select the attack. TODO: allow to define conditionals using any (implemented in StatusEffect -> move from there to PropertyConditional?)
Definition at line 313 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 90 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 139 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 145 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 706 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 707 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Used for multiplying all the damage.
Definition at line 175 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 126 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 136 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 159 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 242 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 148 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 99 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Used for multiplying the physics forces.
Definition at line 185 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 709 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 163 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 188 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 133 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 296 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 218 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 170 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 286 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 118 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 191 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Used for multiplying all the ranges.
Definition at line 180 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 197 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 200 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 114 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 108 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 251 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 248 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 245 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 254 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 206 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 142 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 708 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 298 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 278 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 111 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 331 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 291 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 283 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 152 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 10 of file BarotraumaClient/ClientSource/Characters/Attack.cs.
|
getset |
Definition at line 215 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 275 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 209 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
getset |
Definition at line 212 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 269 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 272 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 263 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 266 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 96 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 93 of file BarotraumaShared/SharedSource/Characters/Attack.cs.
|
get |
Definition at line 257 of file BarotraumaShared/SharedSource/Characters/Attack.cs.