Unstable v0.1300.0.0 (February 19th 2021)
This commit is contained in:
@@ -121,11 +121,29 @@ namespace Barotrauma
|
||||
[Serialize(false, true), Editable]
|
||||
public bool FullSpeedAfterAttack { get; private set; }
|
||||
|
||||
private float _structureDamage;
|
||||
[Serialize(0.0f, true), Editable(MinValueFloat = 0.0f, MaxValueFloat = 10000.0f)]
|
||||
public float StructureDamage { get; set; }
|
||||
public float StructureDamage
|
||||
{
|
||||
get => _structureDamage * DamageMultiplier;
|
||||
set => _structureDamage = value;
|
||||
}
|
||||
|
||||
private float _itemDamage;
|
||||
[Serialize(0.0f, true), Editable(MinValueFloat = 0.0f, MaxValueFloat = 1000.0f)]
|
||||
public float ItemDamage
|
||||
{
|
||||
get =>_itemDamage * DamageMultiplier;
|
||||
set => _itemDamage = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Currently only used with variants. Used for multiplying all the damage.
|
||||
/// </summary>
|
||||
public float DamageMultiplier { get; set; } = 1;
|
||||
|
||||
[Serialize(0.0f, true), Editable(MinValueFloat = 0.0f, MaxValueFloat = 1000.0f)]
|
||||
public float ItemDamage { get; set; }
|
||||
public float LevelWallDamage { get; set; }
|
||||
|
||||
[Serialize(false, true)]
|
||||
public bool Ranged { get; set; }
|
||||
@@ -199,6 +217,9 @@ namespace Barotrauma
|
||||
[Serialize("0.0, 0.0", true, description: "Applied to the target, in world space coordinates(i.e. 0, -1 pushes the target downwards). The attacker's facing direction is taken into account."), Editable]
|
||||
public Vector2 TargetForceWorld { get; private set; }
|
||||
|
||||
[Serialize(1.0f, true, description: "Affects the strength of the impact effects the limb causes when it hits a submarine."), Editable(MinValueFloat = 0.0f, MaxValueFloat = 100.0f)]
|
||||
public float SubmarineImpactMultiplier { get; private set; }
|
||||
|
||||
[Serialize(0.0f, true, description: "How likely the attack causes target limbs to be severed."), Editable(MinValueFloat = 0.0f, MaxValueFloat = 10.0f)]
|
||||
public float SeverLimbsProbability { get; set; }
|
||||
|
||||
@@ -210,6 +231,9 @@ namespace Barotrauma
|
||||
[Serialize(0.0f, true, description: ""), Editable(MinValueFloat = 0.0f, MaxValueFloat = 1.0f)]
|
||||
public float Priority { get; private set; }
|
||||
|
||||
[Serialize(false, true, description: ""), Editable]
|
||||
public bool Blink { get; private set; }
|
||||
|
||||
public IEnumerable<StatusEffect> StatusEffects
|
||||
{
|
||||
get { return statusEffects; }
|
||||
@@ -260,6 +284,11 @@ namespace Barotrauma
|
||||
return (Duration == 0.0f) ? StructureDamage : StructureDamage * deltaTime;
|
||||
}
|
||||
|
||||
public float GetLevelWallDamage(float deltaTime)
|
||||
{
|
||||
return (Duration == 0.0f) ? LevelWallDamage : LevelWallDamage * deltaTime;
|
||||
}
|
||||
|
||||
public float GetItemDamage(float deltaTime)
|
||||
{
|
||||
return (Duration == 0.0f) ? ItemDamage : ItemDamage * deltaTime;
|
||||
@@ -272,7 +301,7 @@ namespace Barotrauma
|
||||
{
|
||||
totalDamage += affliction.GetVitalityDecrease(null);
|
||||
}
|
||||
return totalDamage;
|
||||
return totalDamage * DamageMultiplier;
|
||||
}
|
||||
|
||||
public Attack(float damage, float bleedingDamage, float burnDamage, float structureDamage, float itemDamage, float range = 0.0f)
|
||||
@@ -283,7 +312,7 @@ namespace Barotrauma
|
||||
|
||||
Range = range;
|
||||
DamageRange = range;
|
||||
StructureDamage = structureDamage;
|
||||
StructureDamage = LevelWallDamage = structureDamage;
|
||||
ItemDamage = itemDamage;
|
||||
}
|
||||
|
||||
@@ -299,6 +328,13 @@ namespace Barotrauma
|
||||
DebugConsole.ThrowError("Error in Attack (" + parentDebugName + ") - Define damage as afflictions instead of using the damage attribute (e.g. <Affliction identifier=\"internaldamage\" strength=\"10\" />).");
|
||||
}
|
||||
|
||||
//if level wall damage is not defined, default to the structure damage
|
||||
if (element.Attribute("LevelWallDamage") == null &&
|
||||
element.Attribute("levelwalldamage") == null)
|
||||
{
|
||||
LevelWallDamage = StructureDamage;
|
||||
}
|
||||
|
||||
InitProjSpecific(element);
|
||||
|
||||
foreach (XElement subElement in element.Elements())
|
||||
|
||||
Reference in New Issue
Block a user