blob: 256f358f50a63c15a8c11b6046deec7e3e00bca8 (
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"
#include "RangedAttackMob.h"
class Witch : public Monster, public RangedAttackMob
{
public:
eINSTANCEOF GetType() { return eTYPE_WITCH; }
static Entity *create(Level *level) { return new Witch(level); }
private:
static AttributeModifier *SPEED_MODIFIER_DRINKING;
static const int DATA_USING_ITEM = 21;
static const int DEATH_LOOT_COUNT = 8;
static const int DEATH_LOOT[DEATH_LOOT_COUNT];
int usingTime;
public:
Witch(Level *level);
protected:
virtual void defineSynchedData();
virtual int getAmbientSound();
virtual int getHurtSound();
virtual int getDeathSound();
public:
virtual void setUsingItem(bool isUsing);
virtual bool isUsingItem();
protected:
virtual void registerAttributes();
public:
virtual bool useNewAi();
virtual void aiStep();
virtual void handleEntityEvent(byte id);
protected:
virtual float getDamageAfterMagicAbsorb(DamageSource *damageSource, float damage);
virtual void dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel);
public:
virtual void performRangedAttack(shared_ptr<LivingEntity> target, float power);
};
|