summaryrefslogblamecommitdiffstats
path: root/src/Mobs/Behaviors/BehaviorAggressive.h
blob: 0235aa99b507a5e642d0d745f25ea831e51823ae (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                                       
                                                                 
 


                                                                         
 


                                                

        
                            
 


                                     
 

                                
  
// The mob is agressive toward specific mobtypes, or toward the player.
// This Behavior has a dependency on BehaviorChaser.
#pragma once
class cPawn;
class cMonster;
class cBehaviorChaser;

class cBehaviorAggressive
{

public:
    cBehaviorAggressive(cMonster * a_Parent, int a_MinimumLight);

    // 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:
    bool ActiveTick();
    void Destroyed();

private:
    cPawn * FindNewTarget();

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

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