Goose Management Model ODdox  1.02
Hunter Class Reference

The base class for hunters encompsassing all their general behaviours. More...

#include <Hunters_all.h>

Public Member Functions

int GetBag ()
 Gets the annual hunting bag. More...
 
int GetClock ()
 Supplies the clock time. More...
 
FarmGetFarmerRef (unsigned a_ref)
 Provide our ref name. More...
 
APoint GetHome ()
 Provide our home coords. More...
 
int GetHuntField ()
 Get the polygon reference number to our current hunting field (which is at a hunting location) More...
 
int GetHuntingDays ()
 Gets the annual hunting attempts count. More...
 
APoint GetHuntLoc (unsigned a_ref)
 Provide our hunting location coords. More...
 
int GetRef ()
 Provide our ref name. More...
 
virtual int GetSeasonLengthLeft (int)
 Returns the length of the hunting season in days - MUST be overridden in descendent class. More...
 
int GetShots ()
 Gets the number of shots this season to-date. More...
 
 Hunter (struct_Hunter *p_data, Hunter_Population_Manager *p_PPM)
 The constructor for the Hunter class. More...
 
virtual bool InSeason (int)
 Is it hunting season? - MUST be overridden in descendent class. More...
 
bool IsOutHunting ()
 A debug function, but may be useful in other contexts. Returns true of currently out hunting. More...
 
virtual bool IsSeasonEnd (int)
 Is it the end of the hunting season? - MUST be overridden in descendent class. More...
 
virtual void OnGoHome ()
 On gohome message handler - must be overidden in descendent classes. More...
 
void OnMorning ()
 Optimism in the morning, perhaps we should hunt? More...
 
virtual void OnShoot ()
 On shoot message handler - must be overidden in descendent classes. More...
 
virtual void ResetBag ()
 Sets the annual hunting bag to zero. More...
 
void ResetClock ()
 Sets the clock back to zero. More...
 
void ResetHuntingOpportunities ()
 Sets the annual hunting attempts count to zero. More...
 
void ResetSeasonData ()
 Sets the bag and hunting counters to zero. More...
 
virtual void SaveMyData (ofstream *)
 Each hunter needs to save different kinds of data, so we use a polymorphic method for this. More...
 
virtual ~Hunter ()
 The destructor for the Hunter class. More...
 

Protected Member Functions

virtual int CheckForGame (void)
 If the hunter checks for game at their hunting locations then this is done here. Must be overridden. More...
 
virtual void Init (struct_Hunter *p_data)
 Initiation of a basic hunter here. More...
 
bool IsTodayAChosenHuntDay (int a_today)
 Uses a probability test to determine whether to go hunting today. More...
 
bool IsTodayAPreferredHuntDay (int a_today)
 Checks for the hunting day preference (weekday or any day) More...
 
TypeOfHunterState st_OutHunting (void)
 The basic hunting behaviour. More...
 
TypeOfHunterState st_Resting (void)
 Finished hunting and waiting for the next opportunity. More...
 
virtual TypeOfHunterState st_ShouldGoHunting (void)
 Decide whether to go out hunting on a specific day. More...
 

Protected Attributes

int m_bag
 The numbers of game items shot todate this year. More...
 
int m_baglimit
 Annual self-imposed limit on number shot - unused at present. More...
 
int m_clock
 Records the time spent hunting per day. More...
 
TypeOfHunterState m_CurrentHState
 The current hunter behavioural state. More...
 
double m_efficiency
 Probability of 'hitting' a game item. More...
 
double m_goosecountchance
 Probability of checking for geese in hunting area. More...
 
APoint m_Home
 
int m_huntfield_polyref
 The polygon reference number to our current hunting field (which is at a hunting location) More...
 
int m_huntingdays
 The numbers of days used for hunting this year. More...
 
int m_huntlimit
 Annual self-imposed limit on number of days spent hunting. More...
 
vector< int > m_HuntLocRefs
 
vector< APoint > m_HuntLocs
 
int m_lasthuntday
 The date for the last hunt day. More...
 
int m_myMagazine
 The number of shells in the magazine. More...
 
int m_myname
 A reference number unique to this hunter. More...
 
int m_myShots
 The numbers of shots to-date this year. More...
 
int m_NoHuntLocs
 
vector< Farm * > m_OurFarmers
 List of pointers to the farmers whose land the hunter hunts
More...
 
Hunter_Population_Managerm_OurPopulationManager
 Pointer to the population manager. More...
 
int m_weekend
 Code for weekly hunting activity. More...
 

Detailed Description

The base class for hunters encompsassing all their general behaviours.

The hunter class specifies general hunter behaviours that are common to all hunter types.

Definition at line 120 of file Hunters_all.h.

Constructor & Destructor Documentation

◆ Hunter()

Hunter::Hunter ( struct_Hunter p_data,
Hunter_Population_Manager p_PPM 
)

The constructor for the Hunter class.

Definition at line 1075 of file Hunters_all.cpp.

1075  : TAnimal(p_data->m_home.m_x, p_data->m_home.m_y, p_data->m_L)
1076 {
1077  m_OurPopulationManager = p_PPM;
1078  Init(p_data);
1079 }

References Init(), and m_OurPopulationManager.

◆ ~Hunter()

Hunter::~Hunter ( )
virtual

The destructor for the Hunter class.

Definition at line 1081 of file Hunters_all.cpp.

1082 {
1083  ;
1084 }

Member Function Documentation

◆ CheckForGame()

virtual int Hunter::CheckForGame ( void  )
inlineprotectedvirtual

If the hunter checks for game at their hunting locations then this is done here. Must be overridden.

Reimplemented in GooseHunter.

Definition at line 179 of file Hunters_all.h.

179  {
180  return false;
181  }

◆ GetBag()

int Hunter::GetBag ( )
inline

Gets the annual hunting bag.

Definition at line 193 of file Hunters_all.h.

193  {
194  return m_bag;
195  }

References m_bag.

Referenced by GooseHunter::SaveMyData().

◆ GetClock()

int Hunter::GetClock ( )
inline

Supplies the clock time.

Definition at line 210 of file Hunters_all.h.

210  {
211  return m_clock;
212  }

References m_clock.

Referenced by Hunter_Population_Manager::DoFirst().

◆ GetFarmerRef()

Farm* Hunter::GetFarmerRef ( unsigned  a_ref)
inline

Provide our ref name.

Definition at line 240 of file Hunters_all.h.

240 { return m_OurFarmers[a_ref]; }

References m_OurFarmers.

◆ GetHome()

APoint Hunter::GetHome ( )
inline

Provide our home coords.

Definition at line 232 of file Hunters_all.h.

232 { return m_Home; }

References m_Home.

◆ GetHuntField()

int Hunter::GetHuntField ( )
inline

Get the polygon reference number to our current hunting field (which is at a hunting location)

Definition at line 234 of file Hunters_all.h.

234  {
235  return m_huntfield_polyref;
236  }

References m_huntfield_polyref.

Referenced by Hunter_Population_Manager::DoFirst().

◆ GetHuntingDays()

int Hunter::GetHuntingDays ( )
inline

Gets the annual hunting attempts count.

Definition at line 189 of file Hunters_all.h.

189  {
190  return m_huntingdays;
191  }

References m_huntingdays.

Referenced by GooseHunter::SaveMyData().

◆ GetHuntLoc()

APoint Hunter::GetHuntLoc ( unsigned  a_ref)
inline

Provide our hunting location coords.

Definition at line 238 of file Hunters_all.h.

238 { return m_HuntLocs[a_ref]; }

References m_HuntLocs.

◆ GetRef()

int Hunter::GetRef ( )
inline

Provide our ref name.

Definition at line 230 of file Hunters_all.h.

230 { return m_myname; }

References m_myname.

◆ GetSeasonLengthLeft()

virtual int Hunter::GetSeasonLengthLeft ( int  )
inlinevirtual

Returns the length of the hunting season in days - MUST be overridden in descendent class.

Reimplemented in GooseHunter.

Definition at line 250 of file Hunters_all.h.

250  {
251  return 0;
252  }

Referenced by IsTodayAChosenHuntDay().

◆ GetShots()

int Hunter::GetShots ( )
inline

Gets the number of shots this season to-date.

Definition at line 197 of file Hunters_all.h.

197  {
198  return m_myShots;
199  }

References m_myShots.

Referenced by GooseHunter::SaveMyData().

◆ Init()

void Hunter::Init ( struct_Hunter p_data)
protectedvirtual

◆ InSeason()

virtual bool Hunter::InSeason ( int  )
inlinevirtual

Is it hunting season? - MUST be overridden in descendent class.

Reimplemented in GooseHunter.

Definition at line 242 of file Hunters_all.h.

242  {
243  return false;
244  }

Referenced by st_ShouldGoHunting().

◆ IsOutHunting()

bool Hunter::IsOutHunting ( )
inline

A debug function, but may be useful in other contexts. Returns true of currently out hunting.

Definition at line 223 of file Hunters_all.h.

223  {
224  if (m_CurrentHState == tohts_OutHunting) return true;
225  return false;
226  }

References m_CurrentHState, and tohts_OutHunting.

Referenced by Hunter_Population_Manager::DoFirst().

◆ IsSeasonEnd()

virtual bool Hunter::IsSeasonEnd ( int  )
inlinevirtual

Is it the end of the hunting season? - MUST be overridden in descendent class.

Reimplemented in GooseHunter.

Definition at line 246 of file Hunters_all.h.

246  {
247  return true;
248  }

Referenced by Hunter_Population_Manager::DoFirst().

◆ IsTodayAChosenHuntDay()

bool Hunter::IsTodayAChosenHuntDay ( int  a_today)
inlineprotected

Uses a probability test to determine whether to go hunting today.

Parameters
[in]a_todayThe day in the year
Returns
true = go hunting today, or false = don't go hunting today

Calculates the season length left, then divides the number of hunting days still needed by this to get a probability of going each day. This probability is scaled to hedge our bets for going earlier in the season. Then a probability test is taken and the value returned as true = go today, or false = don't go To calculate this we need the remaining season length. Then if a weekend hunter this is multiplied by 2/7 to get weekends. We assume that we will hedge our bets to some extent, so the probability is based on scaler*daysneeded/dayspossible e.g. if scaler is 2 and we need 2 days and 10 are left, the chance of going is 2*2/10 per day = 40%.

Definition at line 1158 of file Hunters_all.cpp.

1158  {
1170  double seasonleft = double( GetSeasonLengthLeft( a_today ) );
1171  if (m_weekend == 0) seasonleft *= 2.0 / 7.0;
1172  double prob = cfg_hunterhuntdayprobscaler.value()*(m_huntlimit - m_huntingdays) / seasonleft;
1173  if (g_rand_uni() < prob) return true;
1174  return false;
1175 }

References cfg_hunterhuntdayprobscaler, g_rand_uni, GetSeasonLengthLeft(), m_huntingdays, m_huntlimit, m_weekend, and CfgFloat::value().

Referenced by st_ShouldGoHunting().

◆ IsTodayAPreferredHuntDay()

bool Hunter::IsTodayAPreferredHuntDay ( int  a_today)
inlineprotected

Checks for the hunting day preference (weekday or any day)

Parameters
[in]a_todayThe day in the year
Returns
true = go hunting today, or false = don't go hunting today

Checks whether today is a weekend, if so and weekend hunter then hunt chance today, if not no chance. Otherwise if not a weekend hunter all is good to hunt.

Definition at line 1137 of file Hunters_all.cpp.

1137  {
1145  if (m_weekend == 0) // 0 means only hunt at weekend
1146  {
1147  // 5 & 6 are assumed to be weekends
1148  if (a_today % 7 > 4) return true; else return false;
1149  }
1150  if (m_weekend == 2) // 2 means leave cfg_hunterrefractionperiod days between hunts
1151  {
1152 
1153  if (m_OurLandscape->SupplyGlobalDate() - m_lasthuntday >= cfg_hunterrefractionperiod.value()) return true; else return false;
1154  }
1155  return true;
1156 }

References cfg_hunterrefractionperiod, m_lasthuntday, m_weekend, and CfgInt::value().

Referenced by st_ShouldGoHunting().

◆ OnGoHome()

virtual void Hunter::OnGoHome ( )
inlinevirtual

On gohome message handler - must be overidden in descendent classes.

Reimplemented in GooseHunter.

Definition at line 260 of file Hunters_all.h.

260 { ; }

◆ OnMorning()

void Hunter::OnMorning ( )
inline

Optimism in the morning, perhaps we should hunt?

Definition at line 228 of file Hunters_all.h.

References m_CurrentHState, and tohts_Hunting.

Referenced by Hunter_Population_Manager::DoFirst().

◆ OnShoot()

virtual void Hunter::OnShoot ( )
inlinevirtual

On shoot message handler - must be overidden in descendent classes.

Reimplemented in GooseHunter.

Definition at line 258 of file Hunters_all.h.

258 { ; }

◆ ResetBag()

virtual void Hunter::ResetBag ( )
inlinevirtual

Sets the annual hunting bag to zero.

Reimplemented in GooseHunter.

Definition at line 201 of file Hunters_all.h.

201  {
202  m_bag = 0;
203  m_myShots = 0;
204  }

References m_bag, and m_myShots.

Referenced by GooseHunter::ResetBag(), and ResetSeasonData().

◆ ResetClock()

void Hunter::ResetClock ( )
inline

Sets the clock back to zero.

Definition at line 214 of file Hunters_all.h.

214  {
215  m_clock = 0;
216  }

References m_clock.

Referenced by Hunter_Population_Manager::DoFirst(), and GooseHunter::Init().

◆ ResetHuntingOpportunities()

void Hunter::ResetHuntingOpportunities ( )
inline

Sets the annual hunting attempts count to zero.

Definition at line 206 of file Hunters_all.h.

206  {
207  m_huntingdays = 0;
208  }

References m_huntingdays.

Referenced by ResetSeasonData().

◆ ResetSeasonData()

void Hunter::ResetSeasonData ( )
inline

Sets the bag and hunting counters to zero.

Definition at line 218 of file Hunters_all.h.

218  {
219  ResetBag();
221  }

References ResetBag(), and ResetHuntingOpportunities().

Referenced by Hunter_Population_Manager::DoFirst(), and GooseHunter::Init().

◆ SaveMyData()

virtual void Hunter::SaveMyData ( ofstream *  )
inlinevirtual

Each hunter needs to save different kinds of data, so we use a polymorphic method for this.

Reimplemented in GooseHunter.

Definition at line 254 of file Hunters_all.h.

254  {
255  ; // Base class does nothing
256  }

Referenced by Hunter_Population_Manager::DoFirst().

◆ st_OutHunting()

TypeOfHunterState Hunter::st_OutHunting ( void  )
protected

The basic hunting behaviour.

Must not be called, has to be overridden in descendent classes.

Definition at line 1177 of file Hunters_all.cpp.

1178 {
1182  return tohts_foobar;
1183 }

References tohts_foobar.

◆ st_Resting()

TypeOfHunterState Hunter::st_Resting ( void  )
protected

Finished hunting and waiting for the next opportunity.

Just stays doing this until called out again by the population manager

Definition at line 1185 of file Hunters_all.cpp.

1186 {
1190  return tohts_Resting;
1191 }

References tohts_Resting.

Referenced by GooseHunter::Step().

◆ st_ShouldGoHunting()

TypeOfHunterState Hunter::st_ShouldGoHunting ( void  )
protectedvirtual

Decide whether to go out hunting on a specific day.

This is called at the beginning of each day, if it is decided to go hunting then this is done for each 10 minute period. First check we have not shot our limit this year or done our allocated number of days, if so do nothing.

Otherwise we want to find out if we should hunt today - this depends on the season for our game species, and whether we want to hunt today - which depends on whether it is a weekend or not - and then how eager we are.

We've established that it is legal to hunt today but whether the hunter goes depends on how eager he is. This is determined by a probability that is based on the number of days needed to fulfil the hunting day limit, and the number of possible days left in the season. This will also depend on whether they are a weekend hunter or not, and finally whether he checks if there are geese on his hunting locations (done in st_OutHunting ).

When all the days are used up, the hunter will no longer enter this decision process.

Reimplemented in GooseHunter.

Definition at line 1109 of file Hunters_all.cpp.

1110 {
1115  if ((m_bag >= m_baglimit) || (m_huntingdays >= m_huntlimit)) return tohts_Resting;
1119  int day = m_OurLandscape->SupplyDayInYear();
1120  if (!InSeason( day )) return tohts_Resting;
1121  // is it a weekday?
1129  if (IsTodayAPreferredHuntDay(day)) {
1130  if (IsTodayAChosenHuntDay( day )) {
1131  return tohts_OutHunting;
1132  }
1133  }
1134  return tohts_Resting; // This is important that it returns resting and not hunting - resting stops the hunter doing anything until the next day.
1135 }

References InSeason(), IsTodayAChosenHuntDay(), IsTodayAPreferredHuntDay(), m_bag, m_baglimit, m_huntingdays, m_huntlimit, tohts_OutHunting, and tohts_Resting.

Referenced by GooseHunter::st_ShouldGoHunting().

Member Data Documentation

◆ m_bag

int Hunter::m_bag
protected

The numbers of game items shot todate this year.

Definition at line 133 of file Hunters_all.h.

Referenced by GetBag(), Init(), GooseHunter::OnShotABird(), ResetBag(), and st_ShouldGoHunting().

◆ m_baglimit

int Hunter::m_baglimit
protected

Annual self-imposed limit on number shot - unused at present.

Definition at line 143 of file Hunters_all.h.

Referenced by Init(), and st_ShouldGoHunting().

◆ m_clock

int Hunter::m_clock
protected

Records the time spent hunting per day.

Definition at line 131 of file Hunters_all.h.

Referenced by GetClock(), Init(), ResetClock(), and GooseHunter::st_OutHunting().

◆ m_CurrentHState

TypeOfHunterState Hunter::m_CurrentHState
protected

The current hunter behavioural state.

Definition at line 127 of file Hunters_all.h.

Referenced by Init(), IsOutHunting(), GooseHunter::OnGoHome(), OnMorning(), and GooseHunter::Step().

◆ m_efficiency

double Hunter::m_efficiency
protected

Probability of 'hitting' a game item.

Definition at line 147 of file Hunters_all.h.

Referenced by Init(), GooseHunter::OnShoot(), and GooseHunter::st_OutHunting().

◆ m_goosecountchance

double Hunter::m_goosecountchance
protected

Probability of checking for geese in hunting area.

Definition at line 149 of file Hunters_all.h.

Referenced by GooseHunter::CheckForGame(), and Init().

◆ m_Home

APoint Hunter::m_Home
protected

/brief The home location for the hunter

Definition at line 155 of file Hunters_all.h.

Referenced by GetHome(), and Init().

◆ m_huntfield_polyref

int Hunter::m_huntfield_polyref
protected

The polygon reference number to our current hunting field (which is at a hunting location)

Definition at line 157 of file Hunters_all.h.

Referenced by GetHuntField(), GooseHunter::OnGoHome(), GooseHunter::OnShoot(), and GooseHunter::st_OutHunting().

◆ m_huntingdays

int Hunter::m_huntingdays
protected

The numbers of days used for hunting this year.

Definition at line 139 of file Hunters_all.h.

Referenced by GetHuntingDays(), Init(), IsTodayAChosenHuntDay(), ResetHuntingOpportunities(), GooseHunter::st_OutHunting(), and st_ShouldGoHunting().

◆ m_huntlimit

int Hunter::m_huntlimit
protected

Annual self-imposed limit on number of days spent hunting.

Definition at line 145 of file Hunters_all.h.

Referenced by Init(), IsTodayAChosenHuntDay(), and st_ShouldGoHunting().

◆ m_HuntLocRefs

vector<int> Hunter::m_HuntLocRefs
protected

\ The hunting location ref numbers

Definition at line 161 of file Hunters_all.h.

Referenced by Init().

◆ m_HuntLocs

vector<APoint> Hunter::m_HuntLocs
protected

\ The hunting locations centroid of the farm held in m_OurFarmer

Definition at line 163 of file Hunters_all.h.

Referenced by GetHuntLoc(), and Init().

◆ m_lasthuntday

int Hunter::m_lasthuntday
protected

The date for the last hunt day.

Definition at line 141 of file Hunters_all.h.

Referenced by Init(), IsTodayAPreferredHuntDay(), and GooseHunter::st_OutHunting().

◆ m_myMagazine

int Hunter::m_myMagazine
protected

The number of shells in the magazine.

Definition at line 137 of file Hunters_all.h.

Referenced by Init(), and GooseHunter::st_OutHunting().

◆ m_myname

int Hunter::m_myname
protected

A reference number unique to this hunter.

Definition at line 125 of file Hunters_all.h.

Referenced by GetRef(), Init(), GooseHunter::OnShotABird(), and GooseHunter::SaveMyData().

◆ m_myShots

int Hunter::m_myShots
protected

The numbers of shots to-date this year.

Definition at line 135 of file Hunters_all.h.

Referenced by GetShots(), Init(), GooseHunter::OnShoot(), ResetBag(), and GooseHunter::st_OutHunting().

◆ m_NoHuntLocs

int Hunter::m_NoHuntLocs
protected

/brief The number of farms he can hunt on

Definition at line 159 of file Hunters_all.h.

Referenced by Init(), and GooseHunter::Init().

◆ m_OurFarmers

vector<Farm*> Hunter::m_OurFarmers
protected

List of pointers to the farmers whose land the hunter hunts

Definition at line 153 of file Hunters_all.h.

Referenced by GetFarmerRef(), GooseHunter::GooseHunter(), Init(), and GooseHunter::Init().

◆ m_OurPopulationManager

Hunter_Population_Manager* Hunter::m_OurPopulationManager
protected

◆ m_weekend

int Hunter::m_weekend
protected

Code for weekly hunting activity.

Definition at line 151 of file Hunters_all.h.

Referenced by Init(), IsTodayAChosenHuntDay(), and IsTodayAPreferredHuntDay().


The documentation for this class was generated from the following files:
struct_Hunter::m_weekend
int m_weekend
Definition: Hunters_all.h:91
struct_Hunter::m_huntingdayslimit
int m_huntingdayslimit
Definition: Hunters_all.h:90
Hunter::ResetBag
virtual void ResetBag()
Sets the annual hunting bag to zero.
Definition: Hunters_all.h:201
Hunter::m_baglimit
int m_baglimit
Annual self-imposed limit on number shot - unused at present.
Definition: Hunters_all.h:143
Hunter::m_weekend
int m_weekend
Code for weekly hunting activity.
Definition: Hunters_all.h:151
Hunter::IsTodayAPreferredHuntDay
bool IsTodayAPreferredHuntDay(int a_today)
Checks for the hunting day preference (weekday or any day)
Definition: Hunters_all.cpp:1137
Hunter::m_huntfield_polyref
int m_huntfield_polyref
The polygon reference number to our current hunting field (which is at a hunting location)
Definition: Hunters_all.h:157
struct_Hunter::m_ref
int m_ref
Definition: Hunters_all.h:82
g_rand_uni
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
struct_Hunter::m_farms
vector< Farm * > m_farms
Definition: Hunters_all.h:89
struct_Hunter::m_huntlocrefs
vector< int > m_huntlocrefs
Definition: Hunters_all.h:85
Hunter::m_huntingdays
int m_huntingdays
The numbers of days used for hunting this year.
Definition: Hunters_all.h:139
Hunter::m_lasthuntday
int m_lasthuntday
The date for the last hunt day.
Definition: Hunters_all.h:141
Hunter::m_huntlimit
int m_huntlimit
Annual self-imposed limit on number of days spent hunting.
Definition: Hunters_all.h:145
Hunter::m_OurFarmers
vector< Farm * > m_OurFarmers
List of pointers to the farmers whose land the hunter hunts
Definition: Hunters_all.h:153
Hunter::m_NoHuntLocs
int m_NoHuntLocs
Definition: Hunters_all.h:159
Hunter::m_OurPopulationManager
Hunter_Population_Manager * m_OurPopulationManager
Pointer to the population manager.
Definition: Hunters_all.h:129
TAnimal
Hunter::m_HuntLocs
vector< APoint > m_HuntLocs
Definition: Hunters_all.h:163
cfg_hunterhuntdayprobscaler
static CfgFloat cfg_hunterhuntdayprobscaler("HUNTER_HUNTDAYPROBSCALER", CFG_CUSTOM, 2.0)
Hedging bets scaler to the probability of going hunting on a particular day.
Hunter::m_myMagazine
int m_myMagazine
The number of shells in the magazine.
Definition: Hunters_all.h:137
struct_Hunter::m_efficiency
double m_efficiency
Definition: Hunters_all.h:92
Hunter::m_myname
int m_myname
A reference number unique to this hunter.
Definition: Hunters_all.h:125
struct_Hunter::m_home
APoint m_home
Definition: Hunters_all.h:84
Hunter::m_goosecountchance
double m_goosecountchance
Probability of checking for geese in hunting area.
Definition: Hunters_all.h:149
Hunter::GetSeasonLengthLeft
virtual int GetSeasonLengthLeft(int)
Returns the length of the hunting season in days - MUST be overridden in descendent class.
Definition: Hunters_all.h:250
CfgFloat::value
double value(void)
Definition: configurator.h:118
cfg_hunter_magazinecapacity
static CfgInt cfg_hunter_magazinecapacity("HUNTER_MAGAZINECAPACITY", CFG_CUSTOM, 2)
The number of shots a hunter can take per shooting event.
struct_Hunter::m_L
Landscape * m_L
Definition: Hunters_all.h:94
Hunter::m_myShots
int m_myShots
The numbers of shots to-date this year.
Definition: Hunters_all.h:135
struct_Hunter::m_huntlocs
vector< APoint > m_huntlocs
Definition: Hunters_all.h:86
tohts_foobar
Definition: Hunters_all.h:61
Hunter::m_HuntLocRefs
vector< int > m_HuntLocRefs
Definition: Hunters_all.h:161
tohts_Resting
Definition: Hunters_all.h:60
Hunter::m_CurrentHState
TypeOfHunterState m_CurrentHState
The current hunter behavioural state.
Definition: Hunters_all.h:127
Hunter::IsTodayAChosenHuntDay
bool IsTodayAChosenHuntDay(int a_today)
Uses a probability test to determine whether to go hunting today.
Definition: Hunters_all.cpp:1158
tohts_Hunting
Definition: Hunters_all.h:58
tohts_OutHunting
Definition: Hunters_all.h:59
CfgInt::value
int value(void)
Definition: configurator.h:98
cfg_hunterrefractionperiod
static CfgInt cfg_hunterrefractionperiod("HUNTER_REFRACTIONPERIOD", CFG_CUSTOM, 7)
The number of days rest between going hunting.
Hunter::ResetHuntingOpportunities
void ResetHuntingOpportunities()
Sets the annual hunting attempts count to zero.
Definition: Hunters_all.h:206
struct_Hunter::m_goosecountchance
double m_goosecountchance
Definition: Hunters_all.h:93
tohts_InitialState
Definition: Hunters_all.h:57
Hunter::m_clock
int m_clock
Records the time spent hunting per day.
Definition: Hunters_all.h:131
Hunter::m_bag
int m_bag
The numbers of game items shot todate this year.
Definition: Hunters_all.h:133
Hunter::m_efficiency
double m_efficiency
Probability of 'hitting' a game item.
Definition: Hunters_all.h:147
Hunter::m_Home
APoint m_Home
Definition: Hunters_all.h:155
Hunter::Init
virtual void Init(struct_Hunter *p_data)
Initiation of a basic hunter here.
Definition: Hunters_all.cpp:1086
Hunter::InSeason
virtual bool InSeason(int)
Is it hunting season? - MUST be overridden in descendent class.
Definition: Hunters_all.h:242