2013-09-18 17:17:43 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "AggressiveMonster.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cWither :
|
|
|
|
public cAggressiveMonster
|
|
|
|
{
|
|
|
|
typedef cAggressiveMonster super;
|
|
|
|
|
|
|
|
public:
|
|
|
|
cWither(void);
|
|
|
|
|
2014-07-22 18:36:13 -04:00
|
|
|
CLASS_PROTODEF(cWither)
|
2014-03-24 06:29:19 -04:00
|
|
|
|
2014-04-28 07:51:40 -04:00
|
|
|
unsigned int GetWitherInvulnerableTicks(void) const { return m_WitherInvulnerableTicks; }
|
|
|
|
|
|
|
|
void SetWitherInvulnerableTicks(unsigned int a_Ticks) { m_WitherInvulnerableTicks = a_Ticks; }
|
|
|
|
|
2014-03-25 04:32:58 -04:00
|
|
|
/** Returns whether the wither is invulnerable to arrows. */
|
|
|
|
bool IsArmored(void) const;
|
2013-09-18 17:17:43 -04:00
|
|
|
|
2014-03-25 03:10:55 -04:00
|
|
|
// cEntity overrides
|
2014-06-08 15:58:08 -04:00
|
|
|
virtual bool Initialize(cWorld & a_World) override;
|
2014-10-20 16:55:07 -04:00
|
|
|
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override;
|
2014-04-25 18:32:30 -04:00
|
|
|
virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override;
|
2014-03-24 06:29:19 -04:00
|
|
|
virtual void Tick(float a_Dt, cChunk & a_Chunk) override;
|
2014-07-04 05:55:09 -04:00
|
|
|
virtual void KilledBy(TakeDamageInfo & a_TDI) override;
|
2014-07-19 17:35:35 -04:00
|
|
|
|
|
|
|
virtual bool IsUndead(void) override { return true; }
|
2014-03-24 06:29:19 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2014-04-28 07:51:40 -04:00
|
|
|
/** The number of ticks of invulnerability left after being initially created. Zero once invulnerability has expired. */
|
|
|
|
unsigned int m_WitherInvulnerableTicks;
|
2014-03-25 03:10:55 -04:00
|
|
|
|
2013-09-18 17:17:43 -04:00
|
|
|
} ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|