summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Behaviors/BehaviorAggressive.h
blob: 5bf86b23fa73da107ddf12f310558988b150c593 (plain) (blame)
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
#pragma once


class cBehaviorAggressive;

#include "Behavior.h"

class cPawn;
class cMonster;
class cBehaviorChaser;





/** The mob is agressive toward specific mobtypes, or toward the player.
This Behavior has a dependency on BehaviorChaser. */
class cBehaviorAggressive : public cBehavior
{

public:
	cBehaviorAggressive(cMonster * a_Parent);

	// cBehaviorAggressive(cMonster * a_Parent, bool a_HatesPlayer);
	// TODO agression toward specific players, and specific mobtypes, etc
	// Agression under specific conditions (nighttime, etc)

	// Functions our host Monster should invoke:
	void PreTick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;

private:
	cPawn * FindNewTarget();

	// Our parent
	cMonster * m_Parent;
	cBehaviorChaser * m_ParentChaser;

	// The mob we want to attack
	cPawn * m_Target;
};