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