summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Behaviors/BehaviorBrave.h
blob: 1562c00894d1bec8749ab054a52f9b61ea2ba8b7 (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
#pragma once

#include "Behavior.h"

/** Makes the mob fight back any other mob that damages it. Unlike cBehaviorAggressive, it will
not attack unless provoked.

Connections to other behaviors:
 - The mob should also have a cBehaviorAttacker, otherwise this behavior will not work.
 - This behavior does not make sense in combination with BehaviorCoward or cBehaviorAggressive.

Special connections:
 - Relies on cMonster::GetAttackerBehavior to obtain the attacker behavior and alter its target.

*/
class cBehaviorBrave : cBehavior
{
public:
	void AttachToMonster(cMonster & a_Parent);
	void DoTakeDamage(TakeDamageInfo & a_TDI) override;

private:
	cMonster * m_Parent;  // Our Parent
};