-
Notifications
You must be signed in to change notification settings - Fork 1
/
MonsterAI.h
62 lines (49 loc) · 1.82 KB
/
MonsterAI.h
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// --------------------------------------------------------------------------------------------------------------------------------
// DEMISERL
// Copyright 2014 Corremn
//
// $LastChangedBy$
// $LastChangedDate$
// $LastChangedRevision$
// $HeadURL: $
// --------------------------------------------------------------------------------------------------------------------------------
#if !defined(AFX_MONSTERAI_H__63120427_CA91_4CCC_9525_1E2F1D16AE39__INCLUDED_)
#define AFX_MONSTERAI_H__63120427_CA91_4CCC_9525_1E2F1D16AE39__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "MonsterManager.h"
enum eActionList
{
move,
pickup,
equip,
attack,
};
class MonsterAI
{
public:
int ProcessIntelligence(MonsterData* monster);
private:
eMonsterState UpdateMonsterState(MonsterData* monster);
int Detect(MonsterData* monster);
int DetermineAction(MonsterData* monster);
int RandomMove(MonsterData* monster);
int ChasePlayer(MonsterData* monster);
int AttackPlayer(MonsterData* monster);
int DistanceAttackMonster(MonsterData* monster);
int DoNothing(MonsterData* monster);
int DistanceAttackPlayer(MonsterData* monster);
int MagicAttackPlayer(MonsterData* monster);
int ProcessEffects(MonsterData* monster);
int EffectAction(MonsterData* monster,eEffect effect,int strength); //run effects I.e confused
int DetectPlayer(int m_x, int m_y, int *p_x, int *p_y);
int DetectCheese(int m_x, int m_y, int &p_x, int &p_y);
int ProcessRat(MonsterData* monster);
int MoveCloserToPlayer(int m_x,int m_y,int p_x,int p_y);
int LOS(int x,int y,int x2,int y2, int range);
int CheckValidMove(int m_x,int m_y,int dir);
int detect;
int detect_timeout;
};
#endif // !defined(AFX_MONSTERAI_H__63120427_CA91_4CCC_9525_1E2F1D16AE39__INCLUDED_)