Updated armor cover calculation. (#3858)

* Updated armor damage calculation.

+ Added lua docs, added casts from float to int.

* Changed verbage in docstring and comment.
This commit is contained in:
Lane Kolbly
2017-07-23 10:46:38 +01:00
committed by Tiger Wang
parent 6e8ec2fe34
commit 87af95b67c
5 changed files with 134 additions and 135 deletions
+36
View File
@@ -3019,6 +3019,17 @@ local Hash = cCryptoHash.sha1HexString("DataToHash")
},
Notes = "Adds the specified amount of speed in the Z axis direction.",
},
ApplyArmorDamage =
{
Params =
{
{
Name = "DamageBlocked",
Type = "number",
},
},
Notes = "Lowers armor durability, as if the armor blocked the given amount of damage.",
},
ArmorCoversAgainst =
{
Params =
@@ -3124,6 +3135,31 @@ local Hash = cCryptoHash.sha1HexString("DataToHash")
},
Notes = "Returns the entity classname that this class implements. Each descendant overrides this function.",
},
GetEnchantmentCoverAgainst =
{
Params =
{
{
Name = "AttackerEntity",
Type = "cEntity",
},
{
Name = "DamageType",
Type = "eDamageType",
},
{
Name = "RawDamage",
Type = "number",
},
},
Returns =
{
{
Type = "number",
},
},
Notes = "Returns the number of hitpoints out of RawDamage that the enchantments on the currently equipped armor would cover. See {{TakeDamageInfo}} for more information on attack damage.",
},
GetEntityType =
{
Returns =