11 Super(
"CaveSpider",
mtCaveSpider,
"entity.spider.hurt",
"entity.spider.death",
"entity.spider.ambient", 0.7f, 0.5f)
56 unsigned int LootingLevel = 0;
57 if (a_Killer !=
nullptr)
62 if ((a_Killer !=
nullptr) && (a_Killer->
IsPlayer() || a_Killer->
IsA(
"cWolf")))
unsigned int GetLevel(int a_EnchantmentID) const
Returns the level for the specified enchantment; 0 if not stored.
bool IsPlayer(void) const
bool IsTicking(void) const
Returns true if the entity is valid and ticking.
virtual bool IsA(const char *a_ClassName) const
Returns true if the entity is of the specified class or a subclass (cPawn's IsA("cEntity") returns tr...
virtual cItem GetEquippedWeapon(void) const
Returns the curently equipped weapon; empty item if none.
cWorld * GetWorld(void) const
void AddEntityEffect(cEntityEffect::eType a_EffectType, int a_EffectDurationTicks, short a_EffectIntensity, double a_DistanceModifier=1)
Applies an entity effect.
cEnchantments m_Enchantments
This class bridges a vector of cItem for safe access via Lua.
virtual bool Attack(std::chrono::milliseconds a_Dt)
Try to perform attack returns true if attack was deemed successful (hit player, fired projectile,...
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.
virtual bool Attack(std::chrono::milliseconds a_Dt) override
Try to perform attack returns true if attack was deemed successful (hit player, fired projectile,...
void AddRandomDropItem(cItems &a_Drops, unsigned int a_Min, unsigned int a_Max, short a_Item, short a_ItemHealth=0)
Adds a random number of a_Item between a_Min and a_Max to itemdrops a_Drops.
cPawn * GetTarget()
Returns the current target.
enum cMonster::MPersonality m_EMPersonality
void AddRandomUncommonDropItem(cItems &a_Drops, float a_Chance, short a_Item, short a_ItemHealth=0)
Adds a item a_Item with the chance of a_Chance (in percent) to itemdrops a_Drops.
virtual cTickTime GetTimeOfDay(void) const override