blob: e954fff1eedf74f64c2c4bba3cdd07e4b1cb2fb2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#pragma once
#include "Monster.h"
class Silverfish : public Monster
{
public:
eINSTANCEOF GetType() { return eTYPE_SILVERFISH; }
static Entity *create(Level *level) { return new Silverfish(level); }
private:
int lookForFriends;
public:
Silverfish(Level *level);
protected:
virtual void registerAttributes();
virtual bool makeStepSound();
virtual shared_ptr<Entity> findAttackTarget();
virtual int getAmbientSound();
virtual int getHurtSound();
virtual int getDeathSound();
public:
virtual bool hurt(DamageSource *source, float dmg);
protected:
virtual void checkHurtTarget(shared_ptr<Entity> target, float d);
virtual void playStepSound(int xt, int yt, int zt, int t);
virtual int getDeathLoot();
public:
virtual void tick();
protected:
virtual void serverAiStep();
public:
virtual float getWalkTargetValue(int x, int y, int z);
protected:
virtual bool isDarkEnoughToSpawn();
public:
virtual bool canSpawn();
virtual MobType getMobType();
};
|