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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-13 16:38:06 +00:00
|
|
|
class cSlime:
|
2012-12-21 11:04:08 +00:00
|
|
|
public cAggressiveMonster
|
2012-06-14 13:06:06 +00:00
|
|
|
{
|
2020-04-13 16:38:06 +00:00
|
|
|
using Super = cAggressiveMonster;
|
2016-02-05 21:45:45 +00:00
|
|
|
|
2012-06-14 13:06:06 +00:00
|
|
|
public:
|
2020-04-13 16:38:06 +00:00
|
|
|
|
2014-07-18 14:55:28 +00: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 22:36:13 +00:00
|
|
|
CLASS_PROTODEF(cSlime)
|
2012-12-21 11:04:08 +00:00
|
|
|
|
2014-07-18 21:20:42 +00:00
|
|
|
// cAggressiveMonster overrides:
|
2014-10-20 20:55:07 +00:00
|
|
|
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override;
|
2015-11-08 12:44:17 +00:00
|
|
|
virtual bool Attack(std::chrono::milliseconds a_Dt) override;
|
2014-07-17 20:32:23 +00:00
|
|
|
virtual void KilledBy(TakeDamageInfo & a_TDI) override;
|
|
|
|
|
2013-10-08 18:20:49 +00:00
|
|
|
int GetSize(void) const { return m_Size; }
|
2016-02-05 21:45:45 +00:00
|
|
|
|
2014-07-18 21:20:42 +00: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-09 00:50:05 +00:00
|
|
|
static AString GetSizeName(int a_Size);
|
2016-02-05 21:45:45 +00:00
|
|
|
|
2013-07-01 10:39:56 +00:00
|
|
|
protected:
|
|
|
|
|
2014-07-18 21:20:42 +00: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
|
|
|
|