2012-12-21 11:04:08 +00:00
|
|
|
|
2012-06-14 13:06:06 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
2012-09-23 20:53:08 +00:00
|
|
|
#include "AggressiveMonster.h"
|
2012-06-14 13:06:06 +00:00
|
|
|
|
2012-12-21 12:21:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-21 11:04:08 +00:00
|
|
|
class cSlime :
|
|
|
|
|
public cAggressiveMonster
|
2012-06-14 13:06:06 +00:00
|
|
|
{
|
2012-12-21 11:04:08 +00:00
|
|
|
typedef cAggressiveMonster super;
|
2016-02-05 23:45:45 +02:00
|
|
|
|
2012-06-14 13:06:06 +00:00
|
|
|
public:
|
2014-07-18 16:55:28 +02:00
|
|
|
/** Creates a slime of the specified size; size can be 1, 2 or 4, with 1 is the smallest and 4 is the tallest. */
|
2013-07-01 10:39:56 +00:00
|
|
|
cSlime(int a_Size);
|
2012-06-14 13:06:06 +00:00
|
|
|
|
2014-07-22 15:36:13 -07:00
|
|
|
CLASS_PROTODEF(cSlime)
|
2012-12-21 11:04:08 +00:00
|
|
|
|
2014-07-18 23:20:42 +02:00
|
|
|
// cAggressiveMonster overrides:
|
2014-10-20 21:55:07 +01:00
|
|
|
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override;
|
2015-11-08 13:44:17 +01:00
|
|
|
virtual bool Attack(std::chrono::milliseconds a_Dt) override;
|
2014-07-17 22:32:23 +02:00
|
|
|
virtual void KilledBy(TakeDamageInfo & a_TDI) override;
|
|
|
|
|
|
2013-10-08 19:20:49 +01:00
|
|
|
int GetSize(void) const { return m_Size; }
|
2016-02-05 23:45:45 +02:00
|
|
|
|
2014-07-18 23:20:42 +02:00
|
|
|
/** Returns the text describing the slime's size, as used by the client's resource subsystem for sounds.
|
|
|
|
|
Returns either "big" or "small". */
|
2015-05-08 20:50:05 -04:00
|
|
|
static AString GetSizeName(int a_Size);
|
2016-02-05 23:45:45 +02:00
|
|
|
|
2013-07-01 10:39:56 +00:00
|
|
|
protected:
|
|
|
|
|
|
2014-07-18 23:20:42 +02:00
|
|
|
/** Size of the slime, with 1 being the smallest.
|
|
|
|
|
Vanilla uses sizes 1, 2 and 4 only. */
|
2013-07-01 10:39:56 +00:00
|
|
|
int m_Size;
|
2012-12-21 11:04:08 +00:00
|
|
|
} ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-14 13:06:06 +00:00
|
|
|
|