Loading [MathJax]/extensions/ams.js
ALMaSS  1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Skylark_Male Class Reference

#include <skylarks_all.h>

Inheritance diagram for Skylark_Male:
Skylark_Adult Skylark_Base TAnimal TALMaSSObject

Public Member Functions

 Skylark_Male (int x, int y, double size, int age, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh)
 
 ~Skylark_Male () override
 
void ReInit (int x, int y, double size, int age, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh) override
 
void BeginStep (void) override
 BeingStep behaviour - must be implemented in descendent classes. More...
 
void Step (void) override
 Step behaviour - must be implemented in descendent classes. More...
 
void EndStep (void) override
 EndStep behaviour - must be implemented in descendent classes. More...
 
bool OnEvicted ()
 
int SupplyNoHabitatRefs () const
 
int SupplyBroodSize () const
 
int SupplyBroodAge (const int n) const
 
double Supply_TerritoryQual () const
 
int SupplyBroodWeight (const int n) const
 
double OnFoodMessage (const int n, const double f) const
 
void OnAddNestling (Skylark_Nestling *N)
 
void OnAddPreFledgeling (Skylark_PreFledgeling *P, const Skylark_Nestling *N)
 
skTerritory_struct Supply_Territory () const
 
int DefendTerritory () const
 
void OnEggHatch ()
 
void OnMateDying ()
 
void OnMateLeaving ()
 
void OnPairing (Skylark_Female *female)
 
void OnBroodDeath ()
 
void OnNestLocation (int x, int y)
 
void OnNestlingDeath (const Skylark_Nestling *N)
 
void OnPreFledgelingDeath (const Skylark_PreFledgeling *P)
 
void OnPreFledgelingMature (const Skylark_PreFledgeling *P)
 
void OnMateNeverComesBack (const Skylark_Female *AFemale)
 
void OnNestPredatation ()
 
void OnBroodDesertion ()
 
void OnReHouse ()
 
void SensibleCopy ()
 
bool SupplyNestValid () const
 
APoint SupplyNestLoc () const
 
- Public Member Functions inherited from Skylark_Adult
 Skylark_Adult (int x, int y, double size, int age, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh)
 
 ~Skylark_Adult () override
 
virtual void CopyMyself (int a_sktype)
 
- Public Member Functions inherited from Skylark_Base
 Skylark_Base (int x, int y, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh)
 
virtual void ReInit (int x, int y, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh)
 
virtual double On_FoodSupply (double)
 
void AddStriglingMort (const int lifestage) const
 
int WhatState () override
 Returns the objects current state number. More...
 
bool InSquare (rectangle R) const
 
- Public Member Functions inherited from TAnimal
 TAnimal (int x, int y, Landscape *L)
 The TAnimal constructor saving the x,y, location and the landscape pointer. More...
 
 TAnimal (int x, int y)
 The TAnimal constructor saving the x,y used if landscape is already set. More...
 
void SetGuardMapIndex (int a_index_x, int a_index_y)
 Set the guard map index, this is used to avoid two animals operating in the same location when using multithread. More...
 
unsigned SupplyFarmOwnerRef () const
 Get the current location farm ref if any. More...
 
AnimalPosition SupplyPosition () const
 Returns the objects location and habitat type and veg type. More...
 
APoint SupplyPoint () const
 Returns the objects location in ALMaSS coordinates. More...
 
int SupplyPolygonRef () const
 Returns the polygon reference where the object is located. More...
 
TTypesOfLandscapeElement SupplyPolygonType () const
 Returns the polygon type where the object is located. More...
 
int Supply_m_Location_x () const
 Returns the ALMaSS x-coordinate. More...
 
int Supply_m_Location_y () const
 Returns the ALMaSS y-coordinate. More...
 
int SupplyGuardCellX () const
 Returns the x-index to the guard cell. More...
 
int SupplyGuardCellY () const
 Returns the y-index to the guard cell. More...
 
int SupplyAge () const
 Returns the animals age in days. More...
 
void SetAge (int a_age)
 Sets the animals age in days. More...
 
virtual void KillThis ()
 Sets all parameters ready for object destruction. More...
 
virtual void CopyMyself ()
 Used to copy the object details to another in descendent classes. More...
 
void SetX (const int a_x)
 Sets the x-coordinate. More...
 
void SetY (const int a_y)
 Sets the y-coordinate. More...
 
virtual void ReinitialiseObject (int a_x, int a_y, Landscape *a_l_ptr)
 
virtual void ReinitialiseObject (int a_x, int a_y)
 Used to re-use an object - must be implemented in descendent classes. More...
 
virtual void Dying ()
 A wrapped for KillThis - ideally should not be used. More...
 
void CheckManagement ()
 Used to start a check for any management related effects at the objects current location. More...
 
void CheckManagementXY (int a_x, int a_y)
 Used to start a check for any management related effects at x,y. More...
 
- Public Member Functions inherited from TALMaSSObject
int GetCurrentStateNo () const
 Returns the current state number. More...
 
void SetCurrentStateNo (int a_num)
 Sets the current state number. More...
 
bool GetStepDone () const
 Returns the step done indicator flag. More...
 
void SetStepDone (bool a_bool)
 Sets the step done indicator flag. More...
 
void ReinitialiseObjectBase ()
 Used to initialise an object. More...
 
 TALMaSSObject ()
 The constructor for TALMaSSObject. More...
 
virtual ~TALMaSSObject ()=default
 The destructor for TALMaSSObject. More...
 

Public Attributes

Skylark_FemaleMyMate
 
int BroodAge
 
vector< int > m_HabitatTable_PNum
 
vector< int > m_HabitatTable_Size
 
vector< double > m_InsectTable
 
bool HaveTerritory
 
- Public Attributes inherited from Skylark_Adult
bool Paired
 
- Public Attributes inherited from Skylark_Base
TTypesOfSkState m_CurrentSkState
 
int Age
 
double m_Size
 
int m_Born_x
 
int m_Born_y
 
int m_MyHome
 The vegetation type where the skylark was born. More...
 
SkTerritoriesm_OurTerritories
 
Skylark_Population_Managerm_OurPopulationManager
 

Protected Member Functions

int st_Flocking ()
 
TTypesOfSkState st_Floating ()
 
bool st_Arriving () const
 
bool st_Immigrating ()
 
int st_Emigrating ()
 
int st_TempLeavingArea ()
 
int st_FindingTerritory ()
 
int st_AttractingAMate ()
 
int st_FollowingMate ()
 
void ConstructAHabitatTable ()
 
int EstablishingATerritory ()
 
int st_ScaringOffChicks ()
 
int st_CaringForYoung ()
 
void st_Dying ()
 
void ReEvaluateTerritory ()
 Daily re-evaluation of territory. More...
 
double GetFood (int time)
 
void OptimiseHabitatSearchingOrder ()
 
int GetMigrationMortality ()
 
bool OnFarmEvent (FarmToDo event) override
 Must be reimplemented if used in descendent classes. Sets the action on a management event. More...
 
- Protected Member Functions inherited from Skylark_Adult
virtual double RemoveEM (double food)
 
double GetVegHindrance (int PolyRef) const
 
double GetWeatherHindrance () const
 
- Protected Member Functions inherited from TAnimal
void CorrectWrapRound ()
 Corrects wrap around co-ordinate problems. More...
 

Protected Attributes

double m_XFNestAcceptScore
 
bool m_firstPF
 
int GoodWeather
 
int m_BroodSize
 
Skylark_Nestlingm_Brood [26]
 
int No_HabitatTable_Refs
 
int m_MyMinTerritoryQual
 
- Protected Attributes inherited from Skylark_Adult
int GoodWeather
 
bool BSuccess
 
double MyExtractEff
 
int m_pesticide_affected
 
skTerritory_struct MyTerritory
 
vector< APoint > * m_aTerrlist
 
- Protected Attributes inherited from TAnimal
int m_Location_x
 The objects ALMaSS x coordinate. More...
 
int m_Location_y
 The objects ALMaSS y coordinate. More...
 
int m_guard_cell_x
 The index x to the guard cell. More...
 
int m_guard_cell_y
 The index y to the guard cell. More...
 
int m_AgeDays {0}
 To hold the age in days. More...
 
PesticideToxicity m_my_pesticide
 
- Protected Attributes inherited from TALMaSSObject
int m_CurrentStateNo
 The basic state number for all objects - '-1' indicates death. More...
 
bool m_StepDone
 Indicates whether the iterative step code is done for this timestep. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from TAnimal
static void SetSimulationWidth (int a_value)
 Sets the simulation width. More...
 
static void SetSimulationHeight (int a_value)
 Sets the simulation height. More...
 
static void SetDayInYear (int a_value)
 Sets the day in year attribute. More...
 
static void SetOurLandscape (Landscape *a_value)
 Sets the landscape pointer. More...
 
static void SetTempToday (double a_value)
 Sets the temperature today attribute. More...
 
- Static Public Member Functions inherited from TALMaSSObject
static void OnArrayBoundsError ()
 Used for debugging only, tests basic object properties. More...
 
- Static Protected Member Functions inherited from Skylark_Adult
static bool GetBadWeather ()
 Extreme weather conditions check. More...
 
- Static Protected Member Functions inherited from Skylark_Base
static bool DailyMortality (int mort)
 
- Static Protected Attributes inherited from TAnimal
static Landscapem_OurLandscape = nullptr
 A pointer to the landscape object shared with all TAnimal objects. More...
 
static int m_SimulationWidth = 0
 A static member for the simulation width because it is often used by descendent classes. More...
 
static int m_SimulationHeight = 0
 A static member for the simulation height because it is often used by descendent classes. More...
 
static double m_TemperatureToday = 0.0
 A holder for the temperature today shared with all TAnimal objects. More...
 
static int m_DayInYear = 0
 A holder for the day in year shared with all TAnimal objects. More...
 

Constructor & Destructor Documentation

◆ Skylark_Male()

Skylark_Male::Skylark_Male ( int  x,
int  y,
double  size,
int  age,
SkTerritories Terrs,
Landscape L,
Skylark_Population_Manager SPM,
int  bx,
int  by,
int  mh 
)

The Male constructor. This initialises some important parameters.

There is some individual variation around the territory acceptance score, up to 10% max

3600  : Skylark_Adult(x, y, size, age, Terrs, L, SPM, bx, by, mh) {
3604  GoodWeather = 0;
3605  HaveTerritory = false;
3606  MyMate = nullptr;
3607  m_BroodSize = 0; // don't start life with chicks!
3608  BSuccess = false;
3609  m_firstPF = false;
3611  m_MyMinTerritoryQual = static_cast<int>(cfg_FemaleMinTerritoryAcceptScore.value() * (g_rand_uni_fnc() / 10.0 + 1.0)); //= 1.0 to 1.1
3613  for (int i = 0; i < 6; i++) m_Brood[i] = nullptr;
3614 }

References Skylark_Adult::BSuccess, cfg_FemaleMinTerritoryAcceptScore, g_rand_uni_fnc(), GoodWeather, HaveTerritory, m_Brood, m_BroodSize, m_firstPF, m_MyMinTerritoryQual, m_XFNestAcceptScore, MyMate, and CfgFloat::value().

◆ ~Skylark_Male()

Skylark_Male::~Skylark_Male ( )
override
3636  {
3637 }

Member Function Documentation

◆ BeginStep()

void Skylark_Male::BeginStep ( void  )
overridevirtual

BeingStep behaviour - must be implemented in descendent classes.

Reimplemented from TALMaSSObject.

3782  {
3783 #ifdef __CJTDebug_5
3784  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
3785 #endif
3786 
3787  if (m_CurrentSkState == toss_Destroy) return;
3788  CheckManagement();
3789 
3790  switch (m_CurrentSkState)
3791  {
3792  case toss_MFloating: // Floating
3793  m_CurrentSkState = st_Floating(); // Legal returns are toss_MFlocking, toss_MFindingTerritory, toss_MTempLeavingArea
3794  m_StepDone = true;
3795  break;
3796  case toss_MCaringForYoung: // CaringForYoung
3797  if (st_CaringForYoung()) m_CurrentSkState = toss_ScaringOffChicks; //ScareOffChicks
3798  m_StepDone = true;
3799  case toss_AttractingAMate:
3800  case toss_ScaringOffChicks:
3801  case toss_FollowingMate:
3803  break;
3804  default:
3805  /* char errornum[20]; sprintf(errornum, "%d", m_CurrentSkState );
3806  g_land->Warn("Skylark_Male::BeginStep(): Unknown state: ", errornum); exit(0); */
3807  break;
3808  }
3809 }

References TAnimal::CheckManagement(), Skylark_Base::m_CurrentSkState, TALMaSSObject::m_StepDone, ReEvaluateTerritory(), st_CaringForYoung(), and st_Floating().

◆ ConstructAHabitatTable()

void Skylark_Male::ConstructAHabitatTable ( )
protected
4744  {
4745 #ifdef __CJTDebug_5
4746  if ( IsAlive() != 0xDEADC0DE )
4747  DEADCODEError();
4748 #endif
4749  // This function must be called when the female arrives and
4750  // again when the eggs first hatch
4751  // This function constructs a table listing
4752  // the reference of each habitat object
4753  // and the area of that object within the skylarks home range
4754  // First must find out which habitats are in HomeRange
4755  // this is done by searching the landscape raster and counting how many
4756  // 1 meter areas are present for each habitat object
4757 
4758  // These days this is easy, as the information is already
4759  // available in the territory as a pre-chewed list provided
4760  // for this very use by PreProcessLandscape2()! :-)
4762  const int l_polys = static_cast<int>(l_terr->m_hr_polys.size());
4763 #ifdef __PESTICIDE_RA
4764  m_PConcTable.resize(l_polys);
4765 #endif
4766  m_HabitatTable_PNum.resize(l_polys);
4767  m_HabitatTable_Size.resize(l_polys);
4768  m_InsectTable.resize(l_polys);
4769  for (int i = 0; i < l_polys; i++)
4770  {
4771  m_HabitatTable_PNum[i] = l_terr->m_hr_polys[i];
4772  m_HabitatTable_Size[i] = l_terr->m_hr_sizes[i];
4773  }
4774  No_HabitatTable_Refs = l_polys;
4775 }

References m_HabitatTable_PNum, m_HabitatTable_Size, skTTerritory::m_hr_polys, skTTerritory::m_hr_sizes, m_InsectTable, Skylark_Base::m_OurTerritories, Skylark_Adult::MyTerritory, No_HabitatTable_Refs, skTerritory_struct::ref, and SkTerritories::Supply_terr().

Referenced by OnPairing().

◆ DefendTerritory()

int Skylark_Male::DefendTerritory ( ) const
4520  {
4521 #ifdef __CJTDebug_5
4522  if ( IsAlive() != 0xDEADC0DE )
4523  DEADCODEError();
4524 #endif
4525  if (Paired == true || BSuccess == true) return 999; // very old
4526  return Age;
4527  //can't be ousted if paired or owned the territory before
4528 }

References Skylark_Base::Age, Skylark_Adult::BSuccess, and Skylark_Adult::Paired.

Referenced by st_FindingTerritory().

◆ EndStep()

void Skylark_Male::EndStep ( void  )
overridevirtual

EndStep behaviour - must be implemented in descendent classes.

Reimplemented from TALMaSSObject.

3910  {
3911 #ifdef __CJTDebug_5
3912  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
3913 #endif
3914  if (m_CurrentSkState == toss_Destroy) return;
3915 #ifdef __PESTICIDE_RA
3916  PesticideResponse();
3917 #endif
3918 }

References Skylark_Base::m_CurrentSkState.

◆ EstablishingATerritory()

int Skylark_Male::EstablishingATerritory ( )
protected
4498  {
4499  /*
4500  The male claims the territory, primarily a programming construct, but resulting in the male being registered as occupying the territory.<br>
4501  */
4502 
4503 #ifdef __CJTDebug_5
4504  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
4505 #endif
4506  m_aTerrlist->clear();
4507  // Stand in the centre.
4512  // claim occupation
4514  HaveTerritory = true;
4515  return 0; // TransferToState(AttractMate)
4516 }

References HaveTerritory, Skylark_Adult::m_aTerrlist, TAnimal::m_Location_x, TAnimal::m_Location_y, Skylark_Base::m_OurPopulationManager, Skylark_Base::m_OurTerritories, Skylark_Adult::MyTerritory, SkTerritories::Occupy(), skTerritory_struct::ref, skTerritory_struct::size, Population_Manager_Base::SupplySimH(), Population_Manager_Base::SupplySimW(), skTerritory_struct::x, and skTerritory_struct::y.

Referenced by OnReHouse(), and Step().

◆ GetFood()

double Skylark_Male::GetFood ( int  time)
protected
4898  {
4899 #ifdef __CJTDebug_5
4900  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
4901 #endif
4902 
4903 #ifdef __CJTDebug_4
4904  if ( No_HabitatTable_Refs > 250 )
4906 #endif
4907  // This must be called each day before the female's code is executed
4908  double food = 0;
4909  // First find out how much food is available from each habitat
4910  // Note that the pesticide risk assessment code is integrated here.
4911  // Stage 1 create the insect data
4912  for (int i = 0; i < No_HabitatTable_Refs; i++)
4913  {
4914  // Insects = Insects * Hindrance
4915  // Insect table holds insects per squaremetre
4916 #ifdef __PESTICIDE_RA
4917  m_PConcTable[i] = m_OurLandscape->SupplyPesticide(m_HabitatTable_PNum[i], ppp_1);
4918 #endif
4919  const double WHindrance = GetWeatherHindrance();
4920  const double hind = GetVegHindrance(m_HabitatTable_PNum[i]);
4921  const double insects = m_OurLandscape->SupplyInsects(m_HabitatTable_PNum[i]);
4922  // Insects = Insects * Hindrance
4923  // Insect table holds insects per squaremetre
4924  m_InsectTable[i] = insects * hind * WHindrance;
4925  }
4926  // Now sort habitats into optimal searching order (i.e. most insect/m2)
4928  // Now extract insects available from each for as long as spends searching
4929  int index = 0;
4930  // Note at present this routine assumes that 1 min is spent per m2
4931  // if this assumption is changed then we must alter 'time' accordingly
4932 #ifdef __PESTICIDE_RA
4933  m_pcide = 0.0;
4934 #endif
4935  double fd;
4936  while (time > 0)
4937  {
4938  const int area = m_HabitatTable_Size[index];
4939  if (time > area)
4940  {
4941  time -= area;
4942  // Food+= area*WeatherHindrance*ExtractionEfficiency*Insects per m2
4943  fd = area * MyExtractEff * m_InsectTable[index];
4944  food += fd;
4945 #ifdef __PESTICIDE_RA
4946  m_pcide += fd * m_PConcTable[index] * KcalPerGInsect_kg_inv; // Needs converting from kcal to mg;
4947 #endif
4948  index++;
4949 #ifdef __CJTDebug_4
4950  if ( index > 249 )
4952 #endif
4953  }
4954  else
4955  {
4956  // Food+=
4957  // minutes left*WeatherHindrance*ExtractionEfficiency*Insects per m2
4958  fd = time * MyExtractEff * m_InsectTable[index];
4959  food += fd;
4960 #ifdef __PESTICIDE_RA
4961  m_pcide += m_PConcTable[index] * time * KcalPerGInsect_kg_inv; // Needs converting from kcal to mg;
4962 #endif
4963  time = 0;
4964  }
4965  }
4966  return food;
4967 }

References Skylark_Adult::GetVegHindrance(), Skylark_Adult::GetWeatherHindrance(), KcalPerGInsect_kg_inv, m_HabitatTable_PNum, m_HabitatTable_Size, m_InsectTable, TAnimal::m_OurLandscape, Skylark_Adult::MyExtractEff, No_HabitatTable_Refs, TALMaSSObject::OnArrayBoundsError(), OptimiseHabitatSearchingOrder(), ppp_1, Landscape::SupplyInsects(), and Landscape::SupplyPesticide().

Referenced by st_CaringForYoung(), and st_FollowingMate().

◆ GetMigrationMortality()

int Skylark_Male::GetMigrationMortality ( )
protected
4532  {
4533 #ifdef __CJTDebug_5
4534  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
4535 #endif
4536  Age++;
4537  if (Age == 1) return JuvenileReturnMort;
4539 }

References Skylark_Base::Age, JuvenileReturnMort, Skylark_Base::m_OurPopulationManager, and Skylark_Population_Manager::SupplyM_Mig_Mort().

Referenced by st_Immigrating().

◆ OnAddNestling()

void Skylark_Male::OnAddNestling ( Skylark_Nestling N)
4649  {
4650 #ifdef __CJTDebug_5
4651  if ( IsAlive() != 0xDEADC0DE )
4652  DEADCODEError();
4653 #endif
4654  // Add nestling and record the new brood member
4655  m_Brood[m_BroodSize++] = N;
4656 #ifdef __CJTDebug_4
4657  if ( m_BroodSize > 25 ) {
4659  }
4660 #endif
4661 }

References m_Brood, m_BroodSize, and TALMaSSObject::OnArrayBoundsError().

Referenced by Skylark_Population_Manager::CreateObjects().

◆ OnAddPreFledgeling()

void Skylark_Male::OnAddPreFledgeling ( Skylark_PreFledgeling P,
const Skylark_Nestling N 
)
4232  {
4233 #ifdef __CJTDebug_5
4234  if ( IsAlive() != 0xDEADC0DE )
4235  DEADCODEError();
4236 #endif
4237  // Must now replace nestling pointer with one to the new object
4238  int n = -1;
4239  for (int i = 0; i < m_BroodSize; i++) { if (N == m_Brood[i]) n = i; }
4240  if (n == -1)
4241  {
4242  // Very nasty problems
4243  g_land->Warn("Skylark_Male::Step: Maturing PreFl. not in Male's list", nullptr);
4244  exit(1);
4245  }
4246  m_Brood[n] = P;
4247  if (!m_firstPF) { MyMate->OnBreedSuccess(); }
4248  m_firstPF = true;
4249 }

References g_land, m_Brood, m_BroodSize, m_firstPF, MyMate, Skylark_Female::OnBreedSuccess(), and Landscape::Warn().

Referenced by Skylark_Population_Manager::CreateObjects().

◆ OnBroodDeath()

void Skylark_Male::OnBroodDeath ( )
4214  {
4215 #ifdef __CJTDebug_5
4216  if ( IsAlive() != 0xDEADC0DE )
4217  DEADCODEError();
4218 #endif
4219  for (int i = 0; i < m_BroodSize; i++) m_Brood[i] = nullptr;
4220  m_BroodSize = 0;
4221  if (Paired)
4222  {
4223  m_CurrentSkState = toss_FollowingMate; // Follow mate
4224  MyMate->OnBroodDeath();
4225  }
4226  else if (HaveTerritory) m_CurrentSkState = toss_AttractingAMate;
4227  else { m_CurrentSkState = toss_MFlocking; }
4228 }

References HaveTerritory, m_Brood, m_BroodSize, Skylark_Base::m_CurrentSkState, MyMate, Skylark_Female::OnBroodDeath(), and Skylark_Adult::Paired.

Referenced by OnBroodDesertion(), OnNestlingDeath(), OnNestPredatation(), and OnPreFledgelingDeath().

◆ OnBroodDesertion()

void Skylark_Male::OnBroodDesertion ( )
4709  {
4710  for (int i = 0; i < m_BroodSize; i++) { m_Brood[i]->OnDeserted(); }
4711  m_BroodSize = 0;
4712  OnBroodDeath();
4713 }

References m_Brood, m_BroodSize, OnBroodDeath(), and Skylark_Nestling::OnDeserted().

◆ OnEggHatch()

void Skylark_Male::OnEggHatch ( )
4630  {
4631 #ifdef __CJTDebug_5
4632  if ( IsAlive() != 0xDEADC0DE )
4633  DEADCODEError();
4634 #endif
4635  // NB this must not occur if there are still chicks to scare off -
4636  // if it does then they are left in limbo!
4637  // Brood information is already put here by CreatObjects
4638 #ifdef __CJTDebug_7
4639  if (m_BroodSize < 1)
4640  {
4641  g_land->Warn("Skylark_Male::OnEggHatch: DeBug7 ", nullptr);
4642  exit(1);
4643  }
4644 #endif
4645  m_CurrentSkState = toss_MCaringForYoung; // TransferToState(CareForYoung);
4646 }

References g_land, m_BroodSize, Skylark_Base::m_CurrentSkState, and Landscape::Warn().

Referenced by Skylark_Female::OnEggsHatch().

◆ OnEvicted()

bool Skylark_Male::OnEvicted ( )
4063  {
4064 #ifdef __CJTDebug_5
4065  if ( IsAlive() != 0xDEADC0DE )
4066  DEADCODEError();
4067 #endif
4068  // returns true if evicted or otherwise false
4069  if (!Paired)
4070  {
4071  m_aTerrlist->clear();
4074  MyTerritory.ref = -1;
4075  HaveTerritory = false;
4076  m_CurrentSkState = toss_MFindingTerritory;
4077  return true;
4078  } // can't evict I'm paired
4079  return false;
4080 }

References SkTerritories::GetTerritoriesByDistance(), HaveTerritory, Skylark_Adult::m_aTerrlist, Skylark_Base::m_CurrentSkState, Skylark_Base::m_OurPopulationManager, Skylark_Base::m_OurTerritories, Skylark_Adult::MyTerritory, Skylark_Adult::Paired, skTerritory_struct::ref, SkTerritories::RemoveMale(), Skylark_Population_Manager::TheSkylarkTerrs, skTerritory_struct::x, and skTerritory_struct::y.

Referenced by st_FindingTerritory().

◆ OnFarmEvent()

bool Skylark_Male::OnFarmEvent ( FarmToDo  )
overrideprotectedvirtual

Must be reimplemented if used in descendent classes. Sets the action on a management event.

Reimplemented from TAnimal.

3640  {
3641  switch (event)
3642  {
3643  case sleep_all_day:
3644  break;
3646  case autumn_plough:
3647  case autumn_roll:
3648  case autumn_sow:
3649  case autumn_sow_with_ferti:
3650  case bed_forming:
3651  case biocide:
3652  case bulb_harvest:
3653  case burn_straw_stubble:
3654  case burn_top:
3655  case cattle_out:
3656  case cattle_out_low:
3657  case cut_to_hay:
3658  case cut_to_silage:
3659  case cut_weeds:
3660  case deep_ploughing:
3661  case fa_ammoniumsulphate:
3662  case fa_boron:
3663  case fa_calcium:
3664  case fa_cu:
3665  case fa_greenmanure:
3666  case fa_k:
3667  case fa_manganesesulphate:
3668  case fa_manure:
3669  case fa_n:
3670  case fa_nk:
3671  case fa_npk:
3672  case fa_npks:
3673  case fa_p:
3674  case fa_pk:
3675  case fa_pks:
3676  case fa_rsm:
3677  case fa_sk:
3678  case fa_sludge:
3679  case fa_slurry:
3680  case fiber_covering:
3681  case fiber_removal:
3682  case flammebehandling:
3683  case flower_cutting:
3684  case fp_ammoniumsulphate:
3685  case fp_boron:
3686  case fp_calcium:
3687  case fp_cu:
3688  case fp_greenmanure:
3689  case fp_k:
3690  case fp_liquidNH3:
3691  case fp_manganesesulphate:
3692  case fp_manure:
3693  case fp_n:
3694  case fp_nc:
3695  case fp_nk:
3696  case fp_npk:
3697  case fp_npks:
3698  case fp_ns:
3699  case fp_p:
3700  case fp_pk:
3701  case fp_pks:
3702  case fp_rsm:
3703  case fp_sk:
3704  case fp_sludge:
3705  case fp_slurry:
3706  case fungicide_treat:
3707  case glyphosate:
3708  case green_harvest:
3709  case growth_regulator:
3710  case harvest:
3711  case harvest_bushfruit:
3712  case harvestshoots:
3713  case hay_bailing:
3714  case hay_turning:
3716  case herbicide_treat:
3717  case hilling_up:
3718  case insecticide_treat:
3719  case last_treatment:
3720  case manual_weeding:
3721  case molluscicide:
3722  case mow:
3723  case org_fungicide:
3724  case org_herbicide:
3725  case org_insecticide:
3726  case pheromone:
3727  case pigs_out:
3728  case preseeding_cultivator:
3730  case product_treat:
3731  case pruning:
3732  case row_cultivation:
3733  case shallow_harrow:
3734  case shredding:
3735  case spring_harrow:
3736  case spring_plough:
3737  case spring_roll:
3738  case spring_sow:
3739  case spring_sow_with_ferti:
3740  case straw_chopping:
3741  case straw_covering:
3742  case straw_removal:
3743  case strigling:
3744  case strigling_hill:
3745  case strigling_sow:
3747  case stubble_harrowing:
3748  case stubble_plough:
3749  case suckering:
3750  case summer_harrow:
3751  case summer_plough:
3752  case summer_sow:
3753  case swathing:
3754  case trial_control:
3756  case trial_toxiccontrol:
3757  case water:
3758  case winter_harrow:
3759  case winter_plough:
3760  case autumn_harrow:
3761  break;
3762 // Here begins spray mortality
3763  case syninsecticide_treat:
3765  {
3766 #ifdef TEST_ISSUE_DEATH_WARRANT
3767  printf( "Skylark_Male::OnFarmEvent() : %d : %d\n", event, ( int )g_date->Date() );
3768 #endif
3769  m_CurrentSkState = toss_MDying;
3770  }
3771  break;
3772  default:
3773  g_land->Warn("Skylark_Male::OnFarmEvent(): ""Unknown event type:", m_OurLandscape->EventtypeToString(event));
3774  exit(1);
3775  }
3776  if (m_CurrentSkState == toss_MDying) return true;
3777  return false;
3778 }

References autumn_harrow, autumn_or_spring_plough, autumn_plough, autumn_roll, autumn_sow, autumn_sow_with_ferti, bed_forming, biocide, bulb_harvest, burn_straw_stubble, burn_top, cattle_out, cattle_out_low, cfg_insecticide_direct_mortM, cut_to_hay, cut_to_silage, cut_weeds, Calendar::Date(), deep_ploughing, Landscape::EventtypeToString(), fa_ammoniumsulphate, fa_boron, fa_calcium, fa_cu, fa_greenmanure, fa_k, fa_manganesesulphate, fa_manure, fa_n, fa_nk, fa_npk, fa_npks, fa_p, fa_pk, fa_pks, fa_rsm, fa_sk, fa_sludge, fa_slurry, fiber_covering, fiber_removal, flammebehandling, flower_cutting, fp_ammoniumsulphate, fp_boron, fp_calcium, fp_cu, fp_greenmanure, fp_k, fp_liquidNH3, fp_manganesesulphate, fp_manure, fp_n, fp_nc, fp_nk, fp_npk, fp_npks, fp_ns, fp_p, fp_pk, fp_pks, fp_rsm, fp_sk, fp_sludge, fp_slurry, fungicide_treat, g_date, g_land, g_random_fnc(), glyphosate, green_harvest, growth_regulator, harvest, harvest_bushfruit, harvestshoots, hay_bailing, hay_turning, heavy_cultivator_aggregate, herbicide_treat, hilling_up, insecticide_treat, last_treatment, Skylark_Base::m_CurrentSkState, TAnimal::m_OurLandscape, manual_weeding, molluscicide, mow, org_fungicide, org_herbicide, org_insecticide, pheromone, pigs_out, preseeding_cultivator, preseeding_cultivator_sow, product_treat, pruning, row_cultivation, shallow_harrow, shredding, sleep_all_day, spring_harrow, spring_plough, spring_roll, spring_sow, spring_sow_with_ferti, straw_chopping, straw_covering, straw_removal, strigling, strigling_hill, strigling_sow, stubble_cultivator_heavy, stubble_harrowing, stubble_plough, suckering, summer_harrow, summer_plough, summer_sow, swathing, syninsecticide_treat, trial_control, trial_insecticidetreat, trial_toxiccontrol, CfgInt::value(), Landscape::Warn(), water, winter_harrow, and winter_plough.

◆ OnFoodMessage()

double Skylark_Male::OnFoodMessage ( const int  n,
const double  f 
) const
inline
842  {
843  const double extra = m_Brood[n]->On_FoodSupply(f);
844  return extra;
845  }

References Skylark_Nestling::On_FoodSupply().

Referenced by Skylark_Female::FeedYoung().

◆ OnMateDying()

void Skylark_Male::OnMateDying ( )
4140  {
4141 #ifdef __CJTDebug_5
4142  if ( IsAlive() != 0xDEADC0DE )
4143  DEADCODEError();
4144 #endif
4145  // Brood size is reduced to zero because he forgets about the young
4146  // So must also tell them to forget him
4147  for (int i = 0; i < m_BroodSize; i++)
4148  {
4149  m_Brood[i]->OnDadDead();
4150  m_Brood[i] = nullptr;
4151  }
4152  m_BroodSize = 0;
4153  MyMate = nullptr;
4154  Paired = false;
4155  BSuccess = false;
4156  const int today = m_OurLandscape->SupplyDayInYear();
4157  if (today >= g_stopdate) { m_CurrentSkState = toss_MFlocking; }
4158  else m_CurrentSkState = toss_AttractingAMate; // TransferToState(AttractAMate);
4159 }

References Skylark_Adult::BSuccess, g_stopdate, m_Brood, m_BroodSize, Skylark_Base::m_CurrentSkState, TAnimal::m_OurLandscape, MyMate, Skylark_Nestling::OnDadDead(), Skylark_Adult::Paired, and Landscape::SupplyDayInYear().

Referenced by Skylark_Female::st_Dying().

◆ OnMateLeaving()

void Skylark_Male::OnMateLeaving ( )
4163  {
4164 #ifdef __CJTDebug_5
4165  if ( IsAlive() != 0xDEADC0DE )
4166  DEADCODEError();
4167 #endif
4168  // Brood size is reduced to zero because he forgets about the young
4169  // He must tell them to forget about him as well
4170  for (int i = 0; i < m_BroodSize; i++)
4171  {
4172  m_Brood[i]->OnDadDead(); // OK he is lying
4173  m_Brood[i] = nullptr;
4174  }
4175  m_BroodSize = 0;
4176  if (!BSuccess)
4177  {
4178  // She has left him, so in this case he gives up
4179  MyMate = nullptr;
4180  const double qual = m_OurTerritories->Supply_terr(MyTerritory.ref)->GetQuality();
4181  // Store the quality for today so the female can read it
4183  {
4184  MyTerritory.nqual = qual;
4185  m_CurrentSkState = toss_AttractingAMate; // TransferToState(AttractAMate);
4186  }
4187  else
4188  {
4189  // Too late to try again
4190  m_CurrentSkState = toss_MFlocking;
4191  HaveTerritory = false;
4192  // Must de-register himself as territory owner
4194  // Just to be sure we can set the ref to -1 = no territory
4195  MyTerritory.ref = -1;
4196  }
4197  }
4198  else
4199  {
4200  // She has stopped breeding for the year
4201  m_CurrentSkState = toss_MFlocking; // TransferToState(Flocking);
4202  HaveTerritory = false;
4203  // Must de-register himself as territory owner
4205  // Just to be sure we can set the ref to -1 = no territory
4206  MyTerritory.ref = -1;
4207  }
4208  // In all cases
4209  Paired = false;
4210 }

References Skylark_Adult::BSuccess, g_stopdate, skTTerritory::GetQuality(), HaveTerritory, m_Brood, m_BroodSize, Skylark_Base::m_CurrentSkState, m_MyMinTerritoryQual, TAnimal::m_OurLandscape, Skylark_Base::m_OurTerritories, MyMate, Skylark_Adult::MyTerritory, skTerritory_struct::nqual, Skylark_Nestling::OnDadDead(), Skylark_Adult::Paired, skTerritory_struct::ref, SkTerritories::RemoveMale(), SkTerritories::Supply_terr(), and Landscape::SupplyDayInYear().

Referenced by Skylark_Female::st_GivingUpTerritory(), and Skylark_Female::st_StoppingBreeding().

◆ OnMateNeverComesBack()

void Skylark_Male::OnMateNeverComesBack ( const Skylark_Female AFemale)
4357  {
4358 #ifdef __CJTDebug_5
4359  if ( IsAlive() != 0xDEADC0DE )
4360  DEADCODEError();
4361 #endif
4362  // Just a safety check
4363  if (MyMate == AFemale)
4364  {
4365  MyMate = nullptr;
4366  Paired = false;
4367  BSuccess = false;
4368  }
4369 }

References Skylark_Adult::BSuccess, MyMate, and Skylark_Adult::Paired.

Referenced by Skylark_Female::st_Finding_Territory(), and Skylark_Female::st_Immigrating().

◆ OnNestlingDeath()

void Skylark_Male::OnNestlingDeath ( const Skylark_Nestling N)
4665  {
4666 #ifdef __CJTDebug_5
4667  if ( IsAlive() != 0xDEADC0DE )
4668  DEADCODEError();
4669  bool found = false;
4670 #endif
4671  // remove the dead one
4672  m_BroodSize--;
4673 #ifdef __CJTDebug_4
4674  if ( m_BroodSize < 0 ) {
4676  }
4677 #endif
4678  for (int i = 0; i <= m_BroodSize; i++)
4679  {
4680  if (m_Brood[i] == N)
4681  {
4682  m_Brood[i] = m_Brood[m_BroodSize];
4683  m_Brood[m_BroodSize] = nullptr;
4684 #ifdef __CJTDebug_5
4685  found = true;
4686 #endif
4687  }
4688  }
4689 #ifdef __CJTDebug_5
4690  if ( found == false ) {
4691  g_land->Warn( "Skylark_Male::OnNestlingDeath - Debug 5 ", NULL ); exit( 1 );
4692  }
4693 #endif
4694  // If all dead do on Brood death
4695  // remove the matured one
4696  if (m_BroodSize == 0) { OnBroodDeath(); }
4697 }

References g_land, m_Brood, m_BroodSize, TALMaSSObject::OnArrayBoundsError(), OnBroodDeath(), and Landscape::Warn().

Referenced by Skylark_Nestling::st_Dying().

◆ OnNestLocation()

void Skylark_Male::OnNestLocation ( int  x,
int  y 
)
4717  {
4718 #ifdef __CJTDebug_5
4719  if ( IsAlive() != 0xDEADC0DE )
4720  DEADCODEError();
4721 #endif
4722  if (x == 0) x = 2;
4723  m_Location_x = x - 1;
4724  m_Location_y = y;
4725 }

References TAnimal::m_Location_x, and TAnimal::m_Location_y.

Referenced by Skylark_Female::st_MakingNest().

◆ OnNestPredatation()

void Skylark_Male::OnNestPredatation ( )
4701  {
4702  for (int i = 0; i < m_BroodSize; i++) { m_Brood[i]->OnYouHaveBeenEaten(); }
4703  m_BroodSize = 0;
4704  OnBroodDeath();
4705 }

References m_Brood, m_BroodSize, OnBroodDeath(), and Skylark_Nestling::OnYouHaveBeenEaten().

Referenced by Skylark_Nestling::EndStep().

◆ OnPairing()

void Skylark_Male::OnPairing ( Skylark_Female female)
4729  {
4730 #ifdef __CJTDebug_5
4731  if ( IsAlive() != 0xDEADC0DE )
4732  DEADCODEError();
4733 #endif
4734  Paired = true;
4735  if (MyMate) { if (MyMate != female) MyMate->OnMaleNeverComesBack(this); }
4736  MyMate = female;
4738  BSuccess = false;
4739  m_CurrentSkState = toss_FollowingMate;
4740 }

References Skylark_Adult::BSuccess, ConstructAHabitatTable(), Skylark_Base::m_CurrentSkState, MyMate, Skylark_Female::OnMaleNeverComesBack(), and Skylark_Adult::Paired.

Referenced by Skylark_Female::EstablishTerritory().

◆ OnPreFledgelingDeath()

void Skylark_Male::OnPreFledgelingDeath ( const Skylark_PreFledgeling P)
4281  {
4282 #ifdef __CJTDebug_5
4283  if ( IsAlive() != 0xDEADC0DE )
4284  DEADCODEError();
4285  bool found = false;
4286 #endif
4287  // remove the dead one
4288  for (int i = 0; i < m_BroodSize; i++)
4289  {
4290  if (m_Brood[i] == P)
4291  {
4292  m_Brood[i] = m_Brood[--m_BroodSize];
4293  m_Brood[m_BroodSize] = nullptr;
4294 #ifdef __CJTDebug_5
4295  found = true;
4296 #endif
4297  }
4298  }
4299 
4300 #ifdef __CJTDebug_4
4301  if ( m_BroodSize < 0 ) {
4303  }
4304 #endif
4305 
4306 #ifdef __CJTDebug_5
4307  if ( found == false ) {
4308  g_land->Warn( "Skylark_Male::OnPreFledgelingDeath: DeBug5 ", NULL );
4309  exit( 1 );
4310  }
4311 #endif
4312  // If all dead do on Brood death
4313  // remove the matured one
4314  if (m_BroodSize == 0) { OnBroodDeath(); }
4315 }

References g_land, m_Brood, m_BroodSize, TALMaSSObject::OnArrayBoundsError(), OnBroodDeath(), and Landscape::Warn().

Referenced by Skylark_PreFledgeling::st_Dying().

◆ OnPreFledgelingMature()

void Skylark_Male::OnPreFledgelingMature ( const Skylark_PreFledgeling P)
4319  {
4320 #ifdef __CJTDebug_5
4321  if ( IsAlive() != 0xDEADC0DE )
4322  DEADCODEError();
4323 #endif
4324  for (int i = 0; i < m_BroodSize; i++)
4325  {
4326  if (m_Brood[i] == P)
4327  {
4328  m_Brood[i] = m_Brood[--m_BroodSize];
4329  m_Brood[m_BroodSize] = nullptr;
4330  BSuccess = true;
4332  }
4333  }
4334  // If all matured do on Brood death
4335  // remove the matured one
4336 #ifdef __CJTDebug_4
4337  if ( m_BroodSize < 0 ) {
4339  }
4340 #endif
4341  if (m_BroodSize == 0)
4342  {
4343  if (Paired)
4344  {
4345  // it all depends what the female is doing
4346  // what he must do.
4347  // if she is also feeding he needs to tell here to stop
4349  m_CurrentSkState = toss_FollowingMate;
4350  }
4351  else if (HaveTerritory) m_CurrentSkState = toss_AttractingAMate;
4352  else { m_CurrentSkState = toss_MFlocking; }
4353  }
4354 }

References Skylark_Adult::BSuccess, HaveTerritory, m_Brood, m_BroodSize, Skylark_Base::m_CurrentSkState, MyMate, TALMaSSObject::OnArrayBoundsError(), Skylark_Female::OnBreedingSuccess(), Skylark_Female::OnStopFeedingChicks(), and Skylark_Adult::Paired.

Referenced by Skylark_PreFledgeling::st_Maturing().

◆ OnReHouse()

void Skylark_Male::OnReHouse ( )
4085  {
4086 #ifdef __CJTDebug_5
4087  if ( IsAlive() != 0xDEADC0DE )
4088  DEADCODEError();
4089 #endif
4090  int mindist = 100000000;
4091  int index = -1;
4092  // Needs to sort through the new list of territories to find one closest to its m_Location_x, m_Location_y
4093  const int Nterrs = m_OurTerritories->SupplyNoTerritories();
4094  for (int i = 0; i < Nterrs; i++)
4095  {
4096  const Skylark_Base* TheOwner = m_OurTerritories->Supply_Owner(i);
4097  if (!TheOwner)
4098  {
4099  const int tx = m_OurTerritories->Supply_x(i);
4100  const int ty = m_OurTerritories->Supply_y(i);
4101  const int dist = static_cast<int>(sqrt(static_cast<float>(tx * tx + ty * ty)));
4102  if (dist < mindist)
4103  {
4104  mindist = dist;
4105  index = i;
4106  }
4107  }
4108  }
4109  if (index != -1)
4110  {
4111  MyTerritory.ref = index;
4112  // store territory data
4118  if (Paired)
4119  {
4122  }
4123  }
4124  else
4125  {
4126  if (Paired)
4127  {
4129  MyMate = nullptr;
4130  Paired = false;
4131  }
4132  MyTerritory.ref = -1;
4133  HaveTerritory = false;
4134  m_CurrentSkState = toss_MFindingTerritory;
4135  }
4136 }

References EstablishingATerritory(), Skylark_Female::EstablishTerritory(), SkTerritories::FemaleOccupy(), HaveTerritory, Skylark_Base::m_CurrentSkState, Skylark_Base::m_OurTerritories, MyMate, Skylark_Adult::MyTerritory, Skylark_Female::OnMateHomeless(), Skylark_Adult::Paired, skTerritory_struct::ref, skTerritory_struct::size, SkTerritories::Supply_Owner(), SkTerritories::Supply_size(), SkTerritories::Supply_x(), SkTerritories::Supply_y(), SkTerritories::SupplyIsNestValid(), SkTerritories::SupplyNoTerritories(), skTerritory_struct::validnest, skTerritory_struct::x, and skTerritory_struct::y.

◆ OptimiseHabitatSearchingOrder()

void Skylark_Male::OptimiseHabitatSearchingOrder ( )
protected
4971  {
4972 #ifdef __CJTDebug_5
4973  if ( IsAlive() != 0xDEADC0DE )
4974  DEADCODEError();
4975 #endif
4976  // This method sorts the HabitatTable on the basis of the highest
4977  // available insects per square metre basis
4978  // It also puts the available insects into the table
4979 
4980  // Sort the entries on the basis of InsectTable
4981  int interChange = 1;
4982  int pass = 0;
4983  while (pass++ <= No_HabitatTable_Refs - 1 && interChange)
4984  {
4985  interChange = 0;
4986  for (int j = 0; j < No_HabitatTable_Refs - pass; j++)
4987  if (m_InsectTable[j] < m_InsectTable[j + 1])
4988  {
4989  // set the flag
4990  interChange = 1;
4991  // The poly ref
4992  int hold1 = m_HabitatTable_PNum[j];
4994  m_HabitatTable_PNum[j + 1] = hold1;
4995  // the size
4996  hold1 = m_HabitatTable_Size[j];
4998  m_HabitatTable_Size[j + 1] = hold1;
4999  // The insects
5000  double hold2 = m_InsectTable[j];
5001  m_InsectTable[j] = m_InsectTable[j + 1];
5002  m_InsectTable[j + 1] = static_cast<int>(hold2);
5003  // The Pesticide
5004 #ifdef __PESTICIDE_RA
5005  hold2 = m_PConcTable[j];
5006  m_PConcTable[j] = m_PConcTable[j + 1];
5007  m_PConcTable[j + 1] = static_cast<int>(hold2);
5008 #endif
5009  }
5010  }
5011 }

References m_HabitatTable_PNum, m_HabitatTable_Size, m_InsectTable, and No_HabitatTable_Refs.

Referenced by GetFood().

◆ ReEvaluateTerritory()

void Skylark_Male::ReEvaluateTerritory ( )
protected

Daily re-evaluation of territory.

The method is designed to keep the measure of territory quality up to date and avoids the need for the female to do this unless finding a nest position. The second usage is to provide the potential to reduce territory size should conditions improve. The reverse situation results in desertion by the female so is not handled here.

4608  {
4615  double qual = 0;
4617  else qual = 0;
4618  if (qual > m_XFNestAcceptScore)
4619  {
4621  // He really has too much, so split it down into 2
4624  }
4625  // Store the quality for today so the female can read it
4626  MyTerritory.nqual = qual;
4627 }

References skTTerritory::GetQuality(), skTTerritory::GetVirtualDiameter(), Skylark_Base::m_OurTerritories, m_XFNestAcceptScore, Skylark_Adult::MyTerritory, skTerritory_struct::nqual, skTerritory_struct::ref, SkTerritories::Split(), SkTerritories::Supply_terr(), and skTerritory_struct::validnest.

Referenced by BeginStep().

◆ ReInit()

void Skylark_Male::ReInit ( int  x,
int  y,
double  size,
int  age,
SkTerritories Terrs,
Landscape L,
Skylark_Population_Manager SPM,
int  bx,
int  by,
int  mh 
)
overridevirtual

The Male constructor. This initialises some important parameters.

There is some individual variation around the territory acceptance score, up to 10% max

Reimplemented from Skylark_Adult.

3618  {
3619  Skylark_Adult::ReInit(x, y, size, age, Terrs, L, SPM, bx, by, mh);
3623  GoodWeather = 0;
3624  HaveTerritory = false;
3625  MyMate = nullptr;
3626  m_BroodSize = 0; // don't start life with chicks!
3627  BSuccess = false;
3628  m_firstPF = false;
3630  m_MyMinTerritoryQual = static_cast<int>(cfg_FemaleMinTerritoryAcceptScore.value() * (g_rand_uni_fnc() / 10.0 + 1.0)); //= 1.0 to 1.1
3632  for (int i = 0; i < 6; i++) m_Brood[i] = nullptr;
3633 }

References Skylark_Adult::BSuccess, cfg_FemaleMinTerritoryAcceptScore, g_rand_uni_fnc(), GoodWeather, HaveTerritory, m_Brood, m_BroodSize, m_firstPF, m_MyMinTerritoryQual, m_XFNestAcceptScore, MyMate, Skylark_Adult::ReInit(), and CfgFloat::value().

◆ SensibleCopy()

void Skylark_Male::SensibleCopy ( )
6626  {
6627  // This is called if a new bird is made as a copy of another and needs to have some sensible information added
6628  m_CurrentSkState = toss_MEmigrating;
6629 }

References Skylark_Base::m_CurrentSkState.

Referenced by Skylark_Population_Manager::CreateObjects().

◆ st_Arriving()

bool Skylark_Male::st_Arriving ( ) const
protected
3976  {
3977 #ifdef __CJTDebug_5
3978  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
3979 #endif
3980  if (GetBadWeather()) return false; // TransferToState(Flocking)
3981  m_aTerrlist->clear();
3982  int x = m_Born_x;
3983  int y = m_Born_y;
3984  if (MyTerritory.ref >= 0)
3985  {
3986  x = MyTerritory.x;
3987  y = MyTerritory.y;
3988  }
3990  return true; // TransferToState(FindTerritory)
3991 }

References Skylark_Adult::GetBadWeather(), SkTerritories::GetTerritoriesByDistance(), Skylark_Adult::m_aTerrlist, Skylark_Base::m_Born_x, Skylark_Base::m_Born_y, Skylark_Base::m_OurPopulationManager, Skylark_Adult::MyTerritory, skTerritory_struct::ref, Skylark_Population_Manager::TheSkylarkTerrs, skTerritory_struct::x, and skTerritory_struct::y.

Referenced by Step().

◆ st_AttractingAMate()

int Skylark_Male::st_AttractingAMate ( )
protected

Is called once each day. If a female comes along and pairs then she will trigger a move to FollowMate via Skylark_Male::OnPairing

4543  {
4544 #ifdef __CJTDebug_5
4545  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
4546 #endif
4547 
4550  {
4552  MyTerritory.ref = -1; // No territory
4553  HaveTerritory = false;
4554  return 1; // TransferToState(Flocking)
4555  }
4556  return 0; // Do nothing
4557 }

References g_stopdate, HaveTerritory, TAnimal::m_OurLandscape, Skylark_Base::m_OurTerritories, Skylark_Adult::MyTerritory, skTerritory_struct::ref, SkTerritories::RemoveMale(), and Landscape::SupplyDayInYear().

Referenced by Step().

◆ st_CaringForYoung()

int Skylark_Male::st_CaringForYoung ( )
protected
4801  {
4802 #ifdef __CJTDebug_5
4803  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
4804  if ( m_BroodSize < 1 )
4805  DEADCODEError();
4806 #endif
4807  double spare; // spare food
4808  int HungryChicks = m_BroodSize;
4809  int FeedingProbs[26];
4810  double ChickFood[26];
4811 #ifdef __PESTICIDE_RA_CHICK
4812  double ChickPoison[ 26 ];
4813 #endif
4814  if (m_Brood[0]->Age == 31)
4815  {
4816  return 1; // Scare off chicks
4817  }
4818  // Check for bad weather
4819  const double RainToday = m_OurLandscape->SupplyRain();
4820  if (RainToday > MaxFeedRain) return 0; // No feeding today
4821 
4822  // can only get food in daylight - dawn & dusk
4823  const int food_time = static_cast<int>(static_cast<double>(m_OurLandscape->SupplyDaylength() - 120));
4824  const double resources_all = GetFood(food_time); // dw g insects
4825  // remove metabolic requirements
4826  double resources = RemoveEM(resources_all);
4827  if (resources > 0)
4828  // Now give the food to the chicks
4829  // The chance that a chick get a portion is proportional to their size
4830  {
4831  // Zero the feeding probabilities
4832  for (int i = 0; i < m_BroodSize; i++)
4833  {
4834  FeedingProbs[i] = 0;
4835  ChickFood[i] = 0;
4836 #ifdef __PESTICIDE_RA_CHICK
4837  ChickPoison[ i ] = 0;
4838 #endif
4839  }
4840  resources /= FoodTripsPerDay; // Split into portions (food trips per day)
4841 #ifdef __PESTICIDE_RA_CHICK
4842  double pcide_remain = resources * m_pcide_conc;
4843 #endif
4844  int BroodWeight = 0;
4845  for (int i = 0; i < m_BroodSize; i++)
4846  {
4847  // Add up brood weight
4848  const int weight = static_cast<int>(floor(m_Brood[i]->m_Size + 0.5));
4849  BroodWeight += weight;
4850  for (int j = i; j < m_BroodSize; j++) FeedingProbs[j] += weight;
4851  }
4852 
4853  while (resources > 0.01 && HungryChicks > 0)
4854  {
4855  for (int portion = 0; portion < FoodTripsPerDay; portion++)
4856  {
4857  // For each portion
4858  const int choose = g_random_fnc(BroodWeight);
4859  for (int i = 0; i < m_BroodSize; i++)
4860  {
4861  if (choose < FeedingProbs[i])
4862  {
4863  ChickFood[i] += resources; // store the food for that chick
4864 #ifdef __PESTICIDE_RA_CHICK
4865  ChickPoison[ i ] += pcide_remain;
4866 #endif
4867  break;
4868  }
4869  }
4870  }
4871  // Now give the food to the chicks
4872  // Better do this than feed each a portion at a time, it is more efficient
4873  // and stops problems with growth between portions
4874  spare = 0;
4875  for (int i = 0; i < m_BroodSize; i++)
4876  {
4877  double extra = m_Brood[i]->On_FoodSupply(ChickFood[i]);
4878 #ifdef __PESTICIDE_RA_CHICK
4879  // If we want a chick response to pesticide then the line below should be lit up, and the response
4880  // specified in the PesticideResponse method
4881  m_Brood[ i ]->m_pesticide_accumulation += ChickPoison[i]* ((ChickFood[ i ]-extra)/ChickFood[ i ]);
4882 #endif
4883  if (extra > 0) // chick must be full
4884  {
4885  FeedingProbs[i] = -1; // no chance of food
4886  HungryChicks--;
4887  spare += extra;
4888  }
4889  }
4890  resources = spare / FoodTripsPerDay;
4891  }
4892  }
4893  return 0; // no change
4894 }

References Skylark_Base::Age, FoodTripsPerDay, g_random_fnc(), GetFood(), m_Brood, m_BroodSize, TAnimal::m_OurLandscape, Skylark_Base::m_Size, MaxFeedRain, Skylark_Nestling::On_FoodSupply(), Skylark_Adult::RemoveEM(), Landscape::SupplyDaylength(), and Landscape::SupplyRain().

Referenced by BeginStep().

◆ st_Dying()

void Skylark_Male::st_Dying ( void  )
protected
3922  {
3923 #ifdef __CJTDebug_5
3924  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
3925 #endif
3926  if (MyMate)
3927  {
3928  if (MyMate->MyMate != this)
3929  {
3930  g_land->Warn("Skylark_Male::st_Dying: DeBug1 ", nullptr);
3931  exit(1);
3932  }
3933  MyMate->OnMateDying();
3934  }
3936  MyTerritory.ref = -1; // No territory
3937  HaveTerritory = false;
3938  MyMate = nullptr;
3939  Paired = false;
3940  if (m_BroodSize > 0) { for (int i = 0; i < m_BroodSize; i++) { m_Brood[i]->OnDadDead(); } }
3941  m_CurrentStateNo = -1;
3942  m_CurrentSkState = toss_Destroy;
3943 }

References g_land, HaveTerritory, m_Brood, m_BroodSize, Skylark_Base::m_CurrentSkState, TALMaSSObject::m_CurrentStateNo, Skylark_Base::m_OurTerritories, Skylark_Female::MyMate, MyMate, Skylark_Adult::MyTerritory, Skylark_Nestling::OnDadDead(), Skylark_Female::OnMateDying(), Skylark_Adult::Paired, skTerritory_struct::ref, SkTerritories::RemoveMale(), and Landscape::Warn().

Referenced by Step().

◆ st_Emigrating()

int Skylark_Male::st_Emigrating ( )
protected
4031  {
4032 #ifdef __CJTDebug_5
4033  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
4034 #endif
4035  // Timing: Called once per day in the middle of a day
4036  // In the emigration state GoodWeather must be 0 on first entry
4037  const int today = m_OurLandscape->SupplyDayInYear();
4038  if (today >= g_stopdate) return 0; //don't come back this year
4039  if (m_OurLandscape->SupplyTemp() > 0.0) GoodWeather++;
4040  else GoodWeather = 0;
4041  if (GoodWeather >= 3) // Third day of good weather
4042  {
4043  const int chance = g_random_fnc(cfg_ReturnProbability.value()); // number between 0-99999
4044  if (Age < 1)
4045  {
4046  // below returning probability is divided by 30 as the number of days
4047  if (chance < 300 && today >= March) return 1;
4048  if (today >= April) return 1;
4049  }
4050  else
4051  {
4052  if (chance < 7 && today >= January) return 1;
4053  if (chance < 33 && today >= February) return 1;
4054  if (chance < 300 && today >= March) return 1;
4055  if (today >= April) return 1;
4056  }
4057  }
4058  return 0; // return value of 0 do nothing, 1 go to immigration
4059 }

References Skylark_Base::Age, April, cfg_ReturnProbability, February, g_random_fnc(), g_stopdate, GoodWeather, January, TAnimal::m_OurLandscape, March, Landscape::SupplyDayInYear(), Landscape::SupplyTemp(), and CfgFloat::value().

Referenced by Step().

◆ st_FindingTerritory()

int Skylark_Male::st_FindingTerritory ( )
protected

This option picks 10 territories at random and tests them. This will happen if the bird arrives here without an m_aTerrlist, or because it has exhausted its list of possible territories.

This option is for birds with a valid m_aTerrlist to search. It takes the 10 nearest territories one at a time and tests to see if they are OK If so establish in one of them, otherwise wait until another day to test the next 10

4400  {
4401  Skylark_Male* TheOwner;
4402  if (m_aTerrlist->size() == 0)
4403  {
4407 #ifdef __CJTDebug_5
4408  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
4409 #endif
4410  const int Nterrs = m_OurTerritories->SupplyNoTerritories();
4411  int territories[10][2];
4412  // Select 10 territories
4413  for (int i = 0; i < 10; i++)
4414  {
4415  territories[i][0] = g_random_fnc(Nterrs);
4416  TheOwner = m_OurTerritories->Supply_Owner(territories[i][0]);
4417  // If there is an owner
4418  if (TheOwner != nullptr) { if (TheOwner->DefendTerritory() >= Age) { territories[i][1] = -1; } }
4419  else { territories[i][1] = m_OurTerritories->Supply_quality(territories[i][0]); }
4420  }
4421  int best_qual = 0; // much too low
4422  int best = -1;
4423  for (int i = 0; i < 10; i++)
4424  {
4425  if (territories[i][1] > best_qual)
4426  {
4427  best_qual = territories[i][1];
4428  best = i;
4429  }
4430  }
4431  if (best_qual > m_MyMinTerritoryQual) // Territory acceptable
4432  {
4433  // save ref number
4434  TheOwner = m_OurTerritories->Supply_Owner(territories[best][0]);
4435  if (TheOwner)
4436  {
4437  // Must send a get out message to the other bird
4438  // if he is already breeding then fail
4439  if (TheOwner->OnEvicted()) return 2; // fail
4440  }
4441  MyTerritory.ref = territories[best][0];
4442  // store territory data
4447  return 1; //TransferToState(EstablishTerritory);
4448  }
4449  }
4450  else
4451  {
4457  for (int i = 0; i < 10; i++)
4458  {
4459  int sz = m_aTerrlist->size() - 1;
4460  int qual = 0;
4461  if (sz >= 0)
4462  {
4463  const APoint p = (*m_aTerrlist)[sz--];
4464  m_aTerrlist->pop_back();
4465  TheOwner = m_OurTerritories->Supply_Owner(p.m_x);
4466  // If there is an owner
4467  if (TheOwner != nullptr) { if (TheOwner->DefendTerritory() < Age) { qual = m_OurTerritories->Supply_quality(p.m_x); } }
4468  else { qual = m_OurTerritories->Supply_quality(p.m_x); }
4469  if (qual > m_MyMinTerritoryQual) // Territory acceptable
4470  {
4471  if (TheOwner)
4472  {
4473  // Must send a get out message to the other bird
4474  // if he is already breeding then fail
4475  if (TheOwner->OnEvicted()) return 2; // fail
4476  }
4477  MyTerritory.ref = p.m_x;
4478  // store territory data
4483  return 1; //TransferToState(EstablishTerritory);
4484  }
4485  }
4486  }
4487  }
4488 
4489 #ifdef FOR_DEMONSTRATION
4490  m_Location_x = 0;
4491  m_Location_y = 0;
4492 #endif
4493  return 2; //TransferToState(Floating);
4494 }

References Skylark_Base::Age, DefendTerritory(), g_random_fnc(), Skylark_Adult::m_aTerrlist, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MyMinTerritoryQual, Skylark_Base::m_OurTerritories, APoint::m_x, Skylark_Adult::MyTerritory, OnEvicted(), skTerritory_struct::ref, skTerritory_struct::size, SkTerritories::Supply_Owner(), SkTerritories::Supply_quality(), SkTerritories::Supply_size(), SkTerritories::Supply_x(), SkTerritories::Supply_y(), SkTerritories::SupplyIsNestValid(), SkTerritories::SupplyNoTerritories(), skTerritory_struct::validnest, skTerritory_struct::x, and skTerritory_struct::y.

Referenced by Step().

◆ st_Floating()

TTypesOfSkState Skylark_Male::st_Floating ( )
protected
4561  {
4562 #ifdef __CJTDebug_5
4563  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
4564 #endif
4565  if (GetBadWeather()) return toss_MTempLeavingArea;
4568  if (m_OurLandscape->SupplyDayInYear() > g_stopdate) { return toss_MFlocking; }
4569 #ifdef FOR_DEMONSTRATION
4570  m_Location_x = 0;
4571  m_Location_y = 0;
4572 #endif
4573  return toss_MFindingTerritory; //TransferToState(FindTerritory);
4574 }

References g_random_fnc(), g_stopdate, Skylark_Adult::GetBadWeather(), TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Skylark_Base::m_OurPopulationManager, Landscape::SupplyDayInYear(), Population_Manager_Base::SupplySimH(), and Population_Manager_Base::SupplySimW().

Referenced by BeginStep().

◆ st_Flocking()

int Skylark_Male::st_Flocking ( )
protected

The bird is assumed to move around the area waiting until weather conditions are suitable to begin Emigration, depending upon the time of year. Only arrives here after breeding, so poor conditions will trigger a transition to Emigration. A transition to Emigration will also occur if the bird has not emigrated before October.

3947  {
3948 #ifdef __CJTDebug_5
3949  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
3950 #endif
3951 
3956 #ifdef FOR_DEMONSTRATION
3957  // TODO if we want it to look nice on the screen then the birds must flock
3958  // this will not affect the rest of the simulation - just look better
3959  // Can we be bothered????
3960  // Just for now set the location to 0,0
3961  m_Location_x = 0;
3962  m_Location_y = 0;
3963 #endif
3964 
3966  {
3967  GoodWeather = 0;
3968  return 1; //TransferToState(Emigration);
3969  }
3970  const bool bad = GetBadWeather();
3971  if (bad && m_OurLandscape->SupplyDayInYear() >= September) return 1; //TransferToState(Emigration);
3972  return 0; // Carry on
3973 }

References Skylark_Adult::GetBadWeather(), GoodWeather, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, October, September, and Landscape::SupplyDayInYear().

Referenced by Step().

◆ st_FollowingMate()

int Skylark_Male::st_FollowingMate ( )
protected

This is simply waiting for a message to say that either female is dead, female leaves or the eggs hatch. The male occupies the same location as the female. When the female's eggs hatch there is a transition to st_CaringForYoung. If the female dies or abandons the territory, there is a transition to AttractingAMate. This method also has another function in that it sets up the food tables for the female, hence must be called before female activity starts.

4577  {
4578 #ifdef __CJTDebug_5
4579  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
4580 #endif
4581 
4587  if (Paired)
4588  {
4589  GetFood(0); //needs to set up the food tables for the female
4590  }
4591  else
4592  {
4593  m_CurrentSkState = toss_MFloating;
4594  if (HaveTerritory)
4595  {
4596  HaveTerritory = false;
4597  // Must de-register himself as territory owner
4599  // Just to be sure we can set the ref to -1 = no territory
4600  MyTerritory.ref = -1;
4601  }
4602  }
4603  return 0;
4604 }

References GetFood(), HaveTerritory, Skylark_Base::m_CurrentSkState, Skylark_Base::m_OurTerritories, Skylark_Adult::MyTerritory, Skylark_Adult::Paired, skTerritory_struct::ref, and SkTerritories::RemoveMale().

Referenced by Step().

◆ st_Immigrating()

bool Skylark_Male::st_Immigrating ( )
protected

An instantaneous state which determines the chance of migration mortality. If he does die then he has to inform any old mate that he has gone. If she is already paired with another bird then can just forget her. If not dying then the bird transitions to st_Arrival.

3995  {
4000 #ifdef __CJTDebug_5
4001  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
4002 #endif
4003  if (g_random_fnc(100) < GetMigrationMortality() || Age > 5)
4004  {
4005  if (MyMate != nullptr)
4006  {
4007  // Needs to be sure that she is not mated to someone else
4008  if (!MyMate->Paired)
4009  {
4010  MyMate->OnMaleNeverComesBack(this); //stop a bogus on matedeath message
4011  }
4012  // In either case forget about mate - he no longer cares about this female
4013  MyMate = nullptr;
4014  BSuccess = false;
4015 #ifdef __CJTDebug_8
4016  if ( m_BroodSize != 0 )
4017  int rubbish = 0;
4018  for ( int i = 0; i < 6; i++ ) {
4019  if ( m_Brood[ i ] != NULL )
4020  int rubbish = 0;
4021  }
4022 #endif
4023  }
4024  return false; // TransfertoState(Die)
4025  } // TransferToState(Arrival)
4026  return true;
4027 }

References Skylark_Base::Age, Skylark_Adult::BSuccess, g_random_fnc(), GetMigrationMortality(), m_Brood, m_BroodSize, MyMate, Skylark_Female::OnMaleNeverComesBack(), and Skylark_Adult::Paired.

Referenced by Step().

◆ st_ScaringOffChicks()

int Skylark_Male::st_ScaringOffChicks ( )
protected
4779  {
4780 #ifdef __CJTDebug_5
4781  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
4782 #endif
4783  if (m_BroodSize > 0)
4784  {
4785  for (int i = 0; i < m_BroodSize; i++)
4786  {
4787  m_Brood[i]->OnDadDead();
4788  m_Brood[i] = nullptr;
4789  }
4790  m_BroodSize = 0; // all chicks gone
4793  BSuccess = true;
4794  }
4795  m_firstPF = false;
4796  return 1; // TransferToState(FollowMate)
4797 }

References Skylark_Adult::BSuccess, m_Brood, m_BroodSize, m_firstPF, MyMate, Skylark_Female::OnBreedingSuccess(), Skylark_Nestling::OnDadDead(), and Skylark_Female::OnStopFeedingChicks().

Referenced by Step().

◆ st_TempLeavingArea()

int Skylark_Male::st_TempLeavingArea ( )
protected
4383  {
4384 #ifdef __CJTDebug_5
4385  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
4386 #endif
4387  // Timing - called once per day
4388  // In the emigration state GoodWeather must be 0 on first entry
4389  if (!GetBadWeather()) GoodWeather++;
4390  else GoodWeather = 0;
4391  if (GoodWeather >= 7) // 7 days of good weather
4392  {
4393  return 1; // comeback to the area
4394  }
4395  return 0; // return value of 0 do nothing, 1 go to Arrival
4396 }

References Skylark_Adult::GetBadWeather(), and GoodWeather.

Referenced by Step().

◆ Step()

void Skylark_Male::Step ( void  )
overridevirtual

Step behaviour - must be implemented in descendent classes.

Reimplemented from TALMaSSObject.

3813  {
3814 #ifdef __CJTDebug_5
3815  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
3816 #endif
3817  if (m_StepDone || m_CurrentSkState == toss_Destroy) return;
3818  switch (m_CurrentSkState)
3819  {
3820  case toss_Initiation: // Initial
3821  m_CurrentSkState = toss_MFlocking;
3822  break;
3823  case toss_MFlocking: // Flocking
3824  switch (st_Flocking())
3825  {
3826  case 3:
3827  m_CurrentSkState = toss_MFindingTerritory; // -> find terr.
3828  break;
3829  case 2:
3830  m_CurrentSkState = toss_MTempLeavingArea; // -> temp.leave
3831  break;
3832  case 1:
3833  // use 0,0 as a default location
3834  m_Location_x = 0;
3835  m_Location_y = 0;
3836  m_CurrentSkState = toss_MEmigrating; // -> Emigration
3837  break;
3838  case 0:
3839  m_StepDone = true;
3840  }
3841  break;
3842  case toss_MArriving: // Arriving
3843  if (st_Arriving()) m_CurrentSkState = toss_MFindingTerritory; // -> find terr.
3844  else { m_CurrentSkState = toss_MTempLeavingArea; }
3845  m_StepDone = true;
3846  break;
3847  case toss_MImmigrating: // Immigration - is instant
3848  if (st_Immigrating()) m_CurrentSkState = toss_MArriving; // -> arrival
3849  else
3850  {
3851 #ifdef TEST_ISSUE_DEATH_WARRANT
3852  printf( "Skylark_Male::Step() : st_Immigrating() : %d\n", ( int )g_date->Date() );
3853 #endif
3854  m_CurrentSkState = toss_MDying; // -> die
3855  }
3856  break;
3857  case toss_MEmigrating: // Emigration
3858  if (st_Emigrating() == 1) m_CurrentSkState = toss_MImmigrating; // -> immigr.
3859  m_StepDone = true;
3860  break;
3861  case toss_MTempLeavingArea: // Temp.leave.area
3862  if (st_TempLeavingArea()) m_CurrentSkState = toss_MArriving; // -> arrival
3863  m_StepDone = true;
3864  break;
3865  case toss_MFindingTerritory: // FindingTerritory
3866  switch (st_FindingTerritory())
3867  {
3868  case 1:
3869  // Must do this now in case someone else gets this territory
3871  m_CurrentSkState = toss_AttractingAMate; // -> attract mate
3872  break;
3873  case 2:
3874  HaveTerritory = false;
3875  m_CurrentSkState = toss_MFloating; // -> floating
3876  //m_CurrentSkState = toss_MTempLeavingArea;
3877  m_StepDone = true;
3878  break;
3879  }
3880  break;
3881  case toss_AttractingAMate: // Attract mate
3882  if (st_AttractingAMate())
3883  {
3884  m_CurrentSkState = toss_MFlocking; // -> flocking
3885  }
3886  m_StepDone = true;
3887  break;
3888  case toss_FollowingMate: // FollowingMate
3889  st_FollowingMate();
3890  m_StepDone = true;
3891  break;
3892  case toss_ScaringOffChicks: // ScaringOffChicks - instant
3893  if (st_ScaringOffChicks()) m_CurrentSkState = toss_FollowingMate; // -> follow mate
3894  break;
3895  case toss_MDying: // Dying
3896  st_Dying();
3897  m_StepDone = true;
3898  break;
3899  default:
3901  g_land->Warn("Skylark_Male::Step: Unknown State", st.c_str());
3902  exit(0);
3903  break;
3904  }
3905  if (m_BroodSize) BroodAge = m_Brood[0]->Age;
3906  else BroodAge = -1;
3907 }

References Skylark_Base::Age, BroodAge, Calendar::Date(), EstablishingATerritory(), g_date, g_land, HaveTerritory, m_Brood, m_BroodSize, Skylark_Base::m_CurrentSkState, TAnimal::m_Location_x, TAnimal::m_Location_y, Skylark_Base::m_OurPopulationManager, TALMaSSObject::m_StepDone, st_Arriving(), st_AttractingAMate(), st_Dying(), st_Emigrating(), st_FindingTerritory(), st_Flocking(), st_FollowingMate(), st_Immigrating(), st_ScaringOffChicks(), st_TempLeavingArea(), Population_Manager::SupplyStateNames(), and Landscape::Warn().

◆ Supply_Territory()

skTerritory_struct Skylark_Male::Supply_Territory ( ) const
4373  {
4374 #ifdef __CJTDebug_5
4375  if ( IsAlive() != 0xDEADC0DE )
4376  DEADCODEError();
4377 #endif
4378  return MyTerritory;
4379 }

References Skylark_Adult::MyTerritory.

Referenced by Skylark_Female::EstablishTerritory(), and Skylark_Female::st_Finding_Territory().

◆ Supply_TerritoryQual()

double Skylark_Male::Supply_TerritoryQual ( ) const
inline

brief Provide todays territory quality

837 { return MyTerritory.nqual; }

Referenced by Skylark_Female::st_BuildingUpResources(), Skylark_Female::st_MakingNest(), and Skylark_Female::st_StartingNewBrood().

◆ SupplyBroodAge()

int Skylark_Male::SupplyBroodAge ( const int  n) const
inline

◆ SupplyBroodSize()

int Skylark_Male::SupplyBroodSize ( ) const
inline

◆ SupplyBroodWeight()

int Skylark_Male::SupplyBroodWeight ( const int  n) const
inline
839 { return static_cast<int>(m_Brood[n]->m_Size); }

Referenced by Skylark_Female::FeedYoung().

◆ SupplyNestLoc()

APoint Skylark_Male::SupplyNestLoc ( ) const
inline

◆ SupplyNestValid()

bool Skylark_Male::SupplyNestValid ( ) const
inline

◆ SupplyNoHabitatRefs()

int Skylark_Male::SupplyNoHabitatRefs ( ) const
inline
830 { return No_HabitatTable_Refs; }

Referenced by Skylark_Female::GetFood().

Member Data Documentation

◆ BroodAge

int Skylark_Male::BroodAge

Referenced by Step().

◆ GoodWeather

int Skylark_Male::GoodWeather
protected

◆ HaveTerritory

◆ m_Brood

◆ m_BroodSize

◆ m_firstPF

bool Skylark_Male::m_firstPF
protected

◆ m_HabitatTable_PNum

vector<int> Skylark_Male::m_HabitatTable_PNum

◆ m_HabitatTable_Size

vector<int> Skylark_Male::m_HabitatTable_Size

◆ m_InsectTable

vector<double> Skylark_Male::m_InsectTable

◆ m_MyMinTerritoryQual

int Skylark_Male::m_MyMinTerritoryQual
protected

◆ m_XFNestAcceptScore

double Skylark_Male::m_XFNestAcceptScore
protected

◆ MyMate

◆ No_HabitatTable_Refs

int Skylark_Male::No_HabitatTable_Refs
protected

The documentation for this class was generated from the following files:
Skylark_Male::DefendTerritory
int DefendTerritory() const
Definition: skylarks_all.cpp:4520
fiber_removal
Definition: Treatment.h:129
fp_rsm
Definition: Treatment.h:64
org_insecticide
Definition: Treatment.h:84
fa_sk
Definition: Treatment.h:71
Skylark_Male::st_Floating
TTypesOfSkState st_Floating()
Definition: skylarks_all.cpp:4561
row_cultivation
Definition: Treatment.h:88
fa_pk
Definition: Treatment.h:68
Skylark_Male::st_FollowingMate
int st_FollowingMate()
Definition: skylarks_all.cpp:4577
winter_harrow
Definition: Treatment.h:144
fp_npk
Definition: Treatment.h:52
strigling
Definition: Treatment.h:89
g_rand_uni_fnc
double g_rand_uni_fnc()
Definition: ALMaSS_Random.cpp:56
Skylark_Adult::RemoveEM
virtual double RemoveEM(double food)
Definition: skylarks_all.cpp:3527
harvest
Definition: Treatment.h:94
fa_nk
Definition: Treatment.h:142
Skylark_Male::m_HabitatTable_Size
vector< int > m_HabitatTable_Size
Definition: skylarks_all.h:807
SkTerritories::SupplyIsNestValid
bool SupplyIsNestValid(const int ref) const
Definition: skylarks_all.h:405
Landscape::SupplyTemp
double SupplyTemp(void)
Passes a request on to the associated Weather class function, the temperature for the current day.
Definition: Landscape.h:1993
Skylark_Male::OptimiseHabitatSearchingOrder
void OptimiseHabitatSearchingOrder()
Definition: skylarks_all.cpp:4971
insecticide_treat
Definition: Treatment.h:83
straw_chopping
Definition: Treatment.h:99
fa_greenmanure
Definition: Treatment.h:76
SkTerritories::Supply_terr
skTTerritory * Supply_terr(int ref) const
Definition: skylarks_all.cpp:1380
stubble_plough
Definition: Treatment.h:35
growth_regulator
Definition: Treatment.h:81
Skylark_Male::st_AttractingAMate
int st_AttractingAMate()
Definition: skylarks_all.cpp:4543
skTerritory_struct::validnest
bool validnest
Definition: skylarks_all.h:304
Skylark_Male::OnEvicted
bool OnEvicted()
Definition: skylarks_all.cpp:4063
Population_Manager_Base::SupplySimH
int SupplySimH() const
Returns landscape height in m.
Definition: PopulationManager.h:569
deep_ploughing
Definition: Treatment.h:43
hilling_up
Definition: Treatment.h:91
green_harvest
Definition: Treatment.h:127
autumn_or_spring_plough
Definition: Treatment.h:103
cfg_ReturnProbability
CfgFloat cfg_ReturnProbability
Used to change the timing of start of arrival in the landscape.
flower_cutting
Definition: Treatment.h:121
Skylark_Adult::GetVegHindrance
double GetVegHindrance(int PolyRef) const
Definition: skylarks_all.cpp:3567
Skylark_Male::GoodWeather
int GoodWeather
Definition: skylarks_all.h:790
FoodTripsPerDay
static int FoodTripsPerDay
Definition: skylarks_all.cpp:166
Skylark_Male::st_ScaringOffChicks
int st_ScaringOffChicks()
Definition: skylarks_all.cpp:4779
g_land
Landscape * g_land
Definition: skylarks_all.cpp:44
spring_plough
Definition: Treatment.h:44
fp_sk
Definition: Treatment.h:56
pruning
Definition: Treatment.h:125
Skylark_Male::GetMigrationMortality
int GetMigrationMortality()
Definition: skylarks_all.cpp:4532
Skylark_Female::OnStopFeedingChicks
void OnStopFeedingChicks()
Definition: skylarks_all.cpp:5458
Skylark_Base::m_CurrentSkState
TTypesOfSkState m_CurrentSkState
Definition: skylarks_all.h:517
SkTerritories::Split
void Split(int ref)
Definition: skylarks_all.cpp:2034
fp_manure
Definition: Treatment.h:61
herbicide_treat
Definition: Treatment.h:80
fp_ammoniumsulphate
Definition: Treatment.h:60
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
flammebehandling
Definition: Treatment.h:90
Skylark_Nestling::OnYouHaveBeenEaten
void OnYouHaveBeenEaten()
Definition: skylarks_all.cpp:3037
straw_covering
Definition: Treatment.h:123
SkTerritories::Supply_size
int Supply_size(int ref) const
Definition: skylarks_all.cpp:1394
fp_boron
Definition: Treatment.h:131
Skylark_Adult::GetBadWeather
static bool GetBadWeather()
Extreme weather conditions check.
Definition: skylarks_all.cpp:3521
fp_cu
Definition: Treatment.h:138
bulb_harvest
Definition: Treatment.h:122
preseeding_cultivator
Definition: Treatment.h:39
trial_control
Definition: Treatment.h:110
SkTerritories::RemoveMale
void RemoveMale(int ref) const
Definition: skylarks_all.cpp:2030
Skylark_Male::ReEvaluateTerritory
void ReEvaluateTerritory()
Daily re-evaluation of territory.
Definition: skylarks_all.cpp:4608
fp_npks
Definition: Treatment.h:51
CfgFloat::value
double value() const
Definition: Configurator.h:142
burn_top
Definition: Treatment.h:143
fp_nk
Definition: Treatment.h:133
Skylark_Base::m_Born_y
int m_Born_y
Definition: skylarks_all.h:521
Skylark_Male::OnBroodDeath
void OnBroodDeath()
Definition: skylarks_all.cpp:4214
February
const int February
Julian start dates of the month of February.
Definition: Landscape.h:40
burn_straw_stubble
Definition: Treatment.h:104
org_herbicide
Definition: Treatment.h:85
skTerritory_struct::ref
int ref
Definition: skylarks_all.h:302
Skylark_Female::OnMaleNeverComesBack
void OnMaleNeverComesBack(const Skylark_Male *AMale)
Definition: skylarks_all.cpp:5879
g_stopdate
int g_stopdate
Definition: skylarks_all.cpp:40
Skylark_Population_Manager::TheSkylarkTerrs
SkTerritories * TheSkylarkTerrs
Definition: skylarks_all.h:496
Skylark_Base::m_OurTerritories
SkTerritories * m_OurTerritories
Definition: skylarks_all.h:525
fa_cu
Definition: Treatment.h:140
autumn_roll
Definition: Treatment.h:38
strigling_hill
Definition: Treatment.h:117
JuvenileReturnMort
int JuvenileReturnMort
Definition: skylarks_all.cpp:199
heavy_cultivator_aggregate
Definition: Treatment.h:120
fp_manganesesulphate
Definition: Treatment.h:59
skTTerritory::GetQuality
int GetQuality(void) const
Definition: skylarks_all.h:277
Skylark_Male::m_XFNestAcceptScore
double m_XFNestAcceptScore
Definition: skylarks_all.h:788
hay_turning
Definition: Treatment.h:100
Skylark_Male::st_FindingTerritory
int st_FindingTerritory()
Definition: skylarks_all.cpp:4400
last_treatment
Definition: Treatment.h:150
straw_removal
Definition: Treatment.h:124
fa_n
Definition: Treatment.h:139
shredding
Definition: Treatment.h:126
skTTerritory::m_hr_sizes
vector< int > m_hr_sizes
Definition: skylarks_all.h:262
pheromone
Definition: Treatment.h:149
skTerritory_struct::size
int size
Definition: skylarks_all.h:301
fp_n
Definition: Treatment.h:132
manual_weeding
Definition: Treatment.h:148
fa_npk
Definition: Treatment.h:67
Skylark_Adult::GetWeatherHindrance
double GetWeatherHindrance() const
Definition: skylarks_all.cpp:3549
winter_plough
Definition: Treatment.h:42
fp_calcium
Definition: Treatment.h:65
spring_harrow
Definition: Treatment.h:45
cut_to_silage
Definition: Treatment.h:98
Skylark_Male::m_firstPF
bool m_firstPF
Definition: skylarks_all.h:789
Skylark_Male::GetFood
double GetFood(int time)
Definition: skylarks_all.cpp:4898
SkTerritories::Supply_x
int Supply_x(int ref) const
Definition: skylarks_all.cpp:1358
fa_sludge
Definition: Treatment.h:77
pigs_out
Definition: Treatment.h:96
fp_p
Definition: Treatment.h:54
suckering
Definition: Treatment.h:130
cut_to_hay
Definition: Treatment.h:97
fa_boron
Definition: Treatment.h:141
Landscape::SupplyPesticide
double SupplyPesticide(int a_x, int a_y, PlantProtectionProducts a_ppp)
Gets total pesticide for a location.
Definition: Landscape.cpp:1386
SkTerritories::Occupy
void Occupy(int ref, Skylark_Male *Male) const
Definition: skylarks_all.cpp:2018
KcalPerGInsect_kg_inv
const double KcalPerGInsect_kg_inv
Definition: skylarks_all.cpp:177
Calendar::Date
long Date(void)
Definition: Calendar.h:57
TAnimal::m_Location_y
int m_Location_y
The objects ALMaSS y coordinate.
Definition: PopulationManager.h:366
Skylark_Male::st_Immigrating
bool st_Immigrating()
Definition: skylarks_all.cpp:3995
fa_k
Definition: Treatment.h:70
SkTerritories::FemaleOccupy
void FemaleOccupy(int ref, Skylark_Female *Female) const
Definition: skylarks_all.cpp:2022
APoint
A simple class defining an x,y coordinate set.
Definition: ALMaSS_Setup.h:52
spring_roll
Definition: Treatment.h:46
Skylark_Adult::Skylark_Adult
Skylark_Adult(int x, int y, double size, int age, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh)
Definition: skylarks_all.cpp:3488
TAnimal::m_OurLandscape
static Landscape * m_OurLandscape
A pointer to the landscape object shared with all TAnimal objects.
Definition: PopulationManager.h:342
TAnimal::CheckManagement
void CheckManagement()
Used to start a check for any management related effects at the objects current location.
Definition: PopulationManager.cpp:1591
Skylark_Base
Definition: skylarks_all.h:512
Skylark_Base::Age
int Age
Definition: skylarks_all.h:518
Skylark_Male::st_Emigrating
int st_Emigrating()
Definition: skylarks_all.cpp:4031
SkTerritories::Supply_quality
int Supply_quality(int ref) const
Definition: skylarks_all.cpp:2014
SkTerritories::GetTerritoriesByDistance
void GetTerritoriesByDistance(int nx, int ny, vector< APoint > *alist) const
Definition: skylarks_all.cpp:1999
syninsecticide_treat
Definition: Treatment.h:111
Skylark_Nestling::OnDadDead
void OnDadDead()
Definition: skylarks_all.cpp:3025
fp_nc
Definition: Treatment.h:135
fungicide_treat
Definition: Treatment.h:82
fp_sludge
Definition: Treatment.h:63
fp_greenmanure
Definition: Treatment.h:62
shallow_harrow
Definition: Treatment.h:119
SkTerritories::SupplyNoTerritories
int SupplyNoTerritories() const
Definition: skylarks_all.cpp:1362
fa_slurry
Definition: Treatment.h:72
cattle_out_low
Definition: Treatment.h:112
harvest_bushfruit
Definition: Treatment.h:137
preseeding_cultivator_sow
Definition: Treatment.h:40
fp_pk
Definition: Treatment.h:53
MaxFeedRain
double MaxFeedRain
Definition: skylarks_all.cpp:196
Population_Manager::SupplyStateNames
const char * SupplyStateNames(int i) const
Definition: PopulationManager.h:738
SkTerritories::SupplyNestPosition
APoint SupplyNestPosition(const int ref) const
Definition: skylarks_all.h:406
fa_pks
Definition: Treatment.h:145
Skylark_Female::EstablishTerritory
void EstablishTerritory()
Definition: skylarks_all.cpp:5718
org_fungicide
Definition: Treatment.h:86
summer_harrow
Definition: Treatment.h:49
Skylark_Male::m_InsectTable
vector< double > m_InsectTable
Definition: skylarks_all.h:808
Landscape::SupplyDayInYear
int SupplyDayInYear(void)
Passes a request on to the associated Calendar class function, the day in the year.
Definition: Landscape.h:2267
cattle_out
Definition: Treatment.h:95
harvestshoots
Definition: Treatment.h:147
April
const int April
Julian start dates of the month of April.
Definition: Landscape.h:44
stubble_cultivator_heavy
Definition: Treatment.h:36
Skylark_Male::BroodAge
int BroodAge
Definition: skylarks_all.h:800
skTerritory_struct::y
int y
Definition: skylarks_all.h:300
TALMaSSObject::m_StepDone
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:133
Skylark_Male
Definition: skylarks_all.h:760
APoint::m_x
int m_x
Definition: ALMaSS_Setup.h:55
biocide
Definition: Treatment.h:116
swathing
Definition: Treatment.h:93
Skylark_Adult::Paired
bool Paired
Definition: skylarks_all.h:670
glyphosate
Definition: Treatment.h:114
CfgInt::value
int value() const
Definition: Configurator.h:116
cfg_FemaleMinTerritoryAcceptScore
CfgFloat cfg_FemaleMinTerritoryAcceptScore
Skylark_Population_Manager::SupplyM_Mig_Mort
int SupplyM_Mig_Mort() const
Definition: skylarks_all.h:454
Skylark_Male::st_Flocking
int st_Flocking()
Definition: skylarks_all.cpp:3947
fa_manure
Definition: Treatment.h:75
spring_sow
Definition: Treatment.h:47
cut_weeds
Definition: Treatment.h:106
trial_toxiccontrol
Definition: Treatment.h:109
summer_plough
Definition: Treatment.h:48
Skylark_Base::m_Born_x
int m_Born_x
Definition: skylarks_all.h:520
Landscape::EventtypeToString
std::string EventtypeToString(int a_event)
Returns the text representation of a treatment type.
Definition: Landscape.cpp:6024
Skylark_Adult::m_aTerrlist
vector< APoint > * m_aTerrlist
Definition: skylarks_all.h:661
fp_pks
Definition: Treatment.h:146
Skylark_Male::m_Brood
Skylark_Nestling * m_Brood[26]
Definition: skylarks_all.h:792
fp_ns
Definition: Treatment.h:134
Skylark_Male::st_Dying
void st_Dying()
Definition: skylarks_all.cpp:3922
Landscape::SupplyInsects
double SupplyInsects(int a_polyref)
Returns the insect biomass on a polygon using the polygon reference number a_polyref or based on the ...
Definition: Landscape.h:1712
Landscape::SupplyRain
double SupplyRain(void)
Passes a request on to the associated Weather class function, the amount of rain for the current day.
Definition: Landscape.h:1971
Skylark_Male::st_TempLeavingArea
int st_TempLeavingArea()
Definition: skylarks_all.cpp:4383
Skylark_Female::OnBroodDeath
void OnBroodDeath()
Definition: skylarks_all.cpp:5768
bed_forming
Definition: Treatment.h:118
Skylark_Male::m_HabitatTable_PNum
vector< int > m_HabitatTable_PNum
Definition: skylarks_all.h:806
skTTerritory::m_hr_polys
vector< int > m_hr_polys
Definition: skylarks_all.h:261
January
const int January
Julian start dates of the month of January.
Definition: Landscape.h:38
product_treat
Definition: Treatment.h:113
Skylark_Female::OnBreedSuccess
void OnBreedSuccess()
Definition: skylarks_all.h:754
Skylark_Base::m_Size
double m_Size
Definition: skylarks_all.h:519
Skylark_Adult::MyExtractEff
double MyExtractEff
Definition: skylarks_all.h:658
TALMaSSObject::OnArrayBoundsError
static void OnArrayBoundsError()
Used for debugging only, tests basic object properties.
Definition: PopulationManager.cpp:1614
autumn_sow
Definition: Treatment.h:41
skTTerritory
Definition: skylarks_all.h:257
Skylark_Base::m_OurPopulationManager
Skylark_Population_Manager * m_OurPopulationManager
Definition: skylarks_all.h:526
autumn_harrow
Definition: Treatment.h:37
Skylark_Male::st_CaringForYoung
int st_CaringForYoung()
Definition: skylarks_all.cpp:4801
SkTerritories::Supply_Owner
Skylark_Male * Supply_Owner(int ref) const
Definition: skylarks_all.cpp:1382
fa_calcium
Definition: Treatment.h:79
September
const int September
Julian start dates of the month of September.
Definition: Landscape.h:54
Skylark_Male::m_MyMinTerritoryQual
int m_MyMinTerritoryQual
Definition: skylarks_all.h:794
fa_ammoniumsulphate
Definition: Treatment.h:74
Skylark_Female::OnBreedingSuccess
void OnBreedingSuccess()
Definition: skylarks_all.cpp:5465
Population_Manager_Base::SupplySimW
int SupplySimW() const
Returns landscape width in m.
Definition: PopulationManager.h:567
March
const int March
Julian start dates of the month of March.
Definition: Landscape.h:42
Skylark_Male::HaveTerritory
bool HaveTerritory
Definition: skylarks_all.h:813
autumn_sow_with_ferti
Definition: Treatment.h:136
Skylark_Male::m_BroodSize
int m_BroodSize
Definition: skylarks_all.h:791
trial_insecticidetreat
Definition: Treatment.h:108
fa_p
Definition: Treatment.h:69
mow
Definition: Treatment.h:105
skTTerritory::GetVirtualDiameter
double GetVirtualDiameter() const
Definition: skylarks_all.h:271
cfg_insecticide_direct_mortM
CfgInt cfg_insecticide_direct_mortM
Skylark_Nestling::OnDeserted
void OnDeserted()
Definition: skylarks_all.cpp:3048
fa_rsm
Definition: Treatment.h:78
g_random_fnc
int g_random_fnc(const int a_range)
Definition: ALMaSS_Random.cpp:74
fa_npks
Definition: Treatment.h:66
water
Definition: Treatment.h:92
stubble_harrowing
Definition: Treatment.h:102
Skylark_Female::MyMate
Skylark_Male * MyMate
Definition: skylarks_all.h:724
SkTerritories::Supply_y
int Supply_y(int ref) const
Definition: skylarks_all.cpp:1390
fp_liquidNH3
Definition: Treatment.h:57
molluscicide
Definition: Treatment.h:87
TALMaSSObject::m_CurrentStateNo
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: PopulationManager.h:131
Skylark_Female::OnMateDying
void OnMateDying()
Definition: skylarks_all.cpp:5830
hay_bailing
Definition: Treatment.h:101
fa_manganesesulphate
Definition: Treatment.h:73
skTerritory_struct::nqual
double nqual
Definition: skylarks_all.h:303
Skylark_Adult::ReInit
virtual void ReInit(int x, int y, double size, int age, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh)
Definition: skylarks_all.cpp:3502
fp_k
Definition: Treatment.h:55
Skylark_Nestling::On_FoodSupply
double On_FoodSupply(double food) override
Definition: skylarks_all.cpp:3059
Skylark_Adult::MyTerritory
skTerritory_struct MyTerritory
Definition: skylarks_all.h:660
Landscape::Warn
void Warn(std::string a_msg1, std::string a_msg2)
Wrapper for the g_msg Warn function.
Definition: Landscape.h:2250
Skylark_Male::No_HabitatTable_Refs
int No_HabitatTable_Refs
Definition: skylarks_all.h:793
autumn_plough
Definition: Treatment.h:34
Skylark_Male::MyMate
Skylark_Female * MyMate
Definition: skylarks_all.h:798
TAnimal::m_Location_x
int m_Location_x
The objects ALMaSS x coordinate.
Definition: PopulationManager.h:362
skTerritory_struct::x
int x
Definition: skylarks_all.h:299
Skylark_Male::ConstructAHabitatTable
void ConstructAHabitatTable()
Definition: skylarks_all.cpp:4744
Skylark_Male::EstablishingATerritory
int EstablishingATerritory()
Definition: skylarks_all.cpp:4498
Landscape::SupplyDaylength
int SupplyDaylength(void)
Passes a request on to the associated Weather class function, the day length for the current day.
Definition: Landscape.h:2201
fp_slurry
Definition: Treatment.h:58
fiber_covering
Definition: Treatment.h:128
ppp_1
Definition: LandscapeFarmingEnums.h:1079
summer_sow
Definition: Treatment.h:50
spring_sow_with_ferti
Definition: Treatment.h:115
October
const int October
Julian start dates of the month of October.
Definition: Landscape.h:56
sleep_all_day
Definition: Treatment.h:33
strigling_sow
Definition: Treatment.h:107
Skylark_Female::OnMateHomeless
void OnMateHomeless()
Definition: skylarks_all.cpp:5856
Skylark_Male::st_Arriving
bool st_Arriving() const
Definition: skylarks_all.cpp:3976
Skylark_Adult::BSuccess
bool BSuccess
Definition: skylarks_all.h:657