diff options
author | Lane Kolbly <lane@rscheme.org> | 2017-07-23 11:46:38 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2017-07-23 11:46:38 +0200 |
commit | 87af95b67cb45b72bffd77f7744dc1a10cb3f25a (patch) | |
tree | 516a9c969936fc0d42a251f4462a5d1f92781230 /src/Entities/Entity.h | |
parent | Creepers explode when burned by flint and steel (#3865) (diff) | |
download | cuberite-87af95b67cb45b72bffd77f7744dc1a10cb3f25a.tar cuberite-87af95b67cb45b72bffd77f7744dc1a10cb3f25a.tar.gz cuberite-87af95b67cb45b72bffd77f7744dc1a10cb3f25a.tar.bz2 cuberite-87af95b67cb45b72bffd77f7744dc1a10cb3f25a.tar.lz cuberite-87af95b67cb45b72bffd77f7744dc1a10cb3f25a.tar.xz cuberite-87af95b67cb45b72bffd77f7744dc1a10cb3f25a.tar.zst cuberite-87af95b67cb45b72bffd77f7744dc1a10cb3f25a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Entity.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 4310b1567..d55955b0c 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -141,12 +141,12 @@ public: static const int BURN_TICKS_PER_DAMAGE = 20; ///< Ticks to wait between damaging an entity when it is burning static const int BURN_DAMAGE = 1; ///< Damage to deal when the entity is burning - static const int BURN_TICKS = 200; ///< Ticks to keep an entity burning after it has stood in lava / fire + static const int BURN_TICKS = 160; ///< Ticks to keep an entity burning after it has stood in lava / fire static const int MAX_AIR_LEVEL = 300; ///< Maximum air an entity can have static const int DROWNING_TICKS = 20; ///< Number of ticks per heart of damage - static const int VOID_BOUNDARY = -46; ///< Y position to begin applying void damage + static const int VOID_BOUNDARY = -64; ///< Y position to begin applying void damage static const int FALL_DAMAGE_HEIGHT = 4; ///< Y difference after which fall damage is applied /** Special ID that is considered an "invalid value", signifying no entity. */ @@ -320,6 +320,9 @@ public: /** Returns the hitpoints out of a_RawDamage that the currently equipped armor would cover */ virtual int GetArmorCoverAgainst(const cEntity * a_Attacker, eDamageType a_DamageType, int a_RawDamage); + /** Returns the hitpoints that the currently equipped armor's enchantments would cover */ + virtual int GetEnchantmentCoverAgainst(const cEntity * a_Attacker, eDamageType a_DamageType, int a_Damage); + /** Returns the knockback amount that the currently equipped items would cause to a_Receiver on a hit */ virtual double GetKnockbackAmountAgainst(const cEntity & a_Receiver); @@ -338,6 +341,9 @@ public: /** Returns the currently equipped boots; empty item if none */ virtual cItem GetEquippedBoots(void) const { return cItem(); } + /** Applies damage to the armor after the armor blocked the given amount */ + virtual void ApplyArmorDamage(int DamageBlocked); + // tolua_end /** Called when the health drops below zero. a_TDI's Attacker may be nullptr (environmental damage) */ |