CvGrandStrategyAI::GetGuessOtherPlayerConquestPriority(PlayerTypes, int)
- Defined in
- CvGrandStrategyAI.cpp, line 1035
- Class
- CvGrandStrategyAI
- Hook name
CivHooks::CvGrandStrategyAI_GetGuessOtherPlayerConquestPriority
Hooks
static bool BeforeCvGrandStrategyAI_GetGuessOtherPlayerConquestPriority(CvGrandStrategyAI* self, PlayerTypes ePlayer, int iWorldMilitaryAverage, int& result);static void AfterCvGrandStrategyAI_GetGuessOtherPlayerConquestPriority(CvGrandStrategyAI* self, PlayerTypes ePlayer, int iWorldMilitaryAverage, int& result);static int ReplaceCvGrandStrategyAI_GetGuessOtherPlayerConquestPriority(int (*original)(CvGrandStrategyAI*, PlayerTypes, int), CvGrandStrategyAI* self, PlayerTypes ePlayer, int iWorldMilitaryAverage);CivRegisterBefore<CivHooks::CvGrandStrategyAI_GetGuessOtherPlayerConquestPriority>(host, &BeforeCvGrandStrategyAI_GetGuessOtherPlayerConquestPriority);CivRegisterAfter<CivHooks::CvGrandStrategyAI_GetGuessOtherPlayerConquestPriority>(host, &AfterCvGrandStrategyAI_GetGuessOtherPlayerConquestPriority);CivRegisterReplace<CivHooks::CvGrandStrategyAI_GetGuessOtherPlayerConquestPriority>(host, &ReplaceCvGrandStrategyAI_GetGuessOtherPlayerConquestPriority);
Code
1034/// Guess as to how much another Player is prioritizing Conquest as his means of winning the game1035int CvGrandStrategyAI::GetGuessOtherPlayerConquestPriority(PlayerTypes ePlayer, int iWorldMilitaryAverage)1036{1037 int iConquestPriority = 0;10381039 // Compare their Military to the world average; Possible range is 100 to -100 (but will typically be around -20 to 20)1040 if(iWorldMilitaryAverage > 0)1041 {1042 iConquestPriority += (GET_PLAYER(ePlayer).GetMilitaryMight() - iWorldMilitaryAverage) * /*100*/ GC.getAI_GRAND_STRATEGY_CONQUEST_POWER_RATIO_MULTIPLIER() / iWorldMilitaryAverage;1043 }10441045 // Minors attacked1046 iConquestPriority += (GetPlayer()->GetDiplomacyAI()->GetOtherPlayerNumMinorsAttacked(ePlayer) * /*5*/ GC.getAI_GRAND_STRATEGY_CONQUEST_WEIGHT_PER_MINOR_ATTACKED());10471048 // Minors Conquered1049 iConquestPriority += (GetPlayer()->GetDiplomacyAI()->GetOtherPlayerNumMinorsConquered(ePlayer) * /*10*/ GC.getAI_GRAND_STRATEGY_CONQUEST_WEIGHT_PER_MINOR_CONQUERED());10501051 // Majors attacked1052 iConquestPriority += (GetPlayer()->GetDiplomacyAI()->GetOtherPlayerNumMajorsAttacked(ePlayer) * /*10*/ GC.getAI_GRAND_STRATEGY_CONQUEST_WEIGHT_PER_MAJOR_ATTACKED());10531054 // Majors Conquered1055 iConquestPriority += (GetPlayer()->GetDiplomacyAI()->GetOtherPlayerNumMajorsConquered(ePlayer) * /*15*/ GC.getAI_GRAND_STRATEGY_CONQUEST_WEIGHT_PER_MAJOR_CONQUERED());10561057 return iConquestPriority;1058}
Calls
- CvDiplomacyAI::GetOtherPlayerNumMajorsAttacked(PlayerTypes) const
- CvDiplomacyAI::GetOtherPlayerNumMajorsConquered(PlayerTypes) const
- CvDiplomacyAI::GetOtherPlayerNumMinorsAttacked(PlayerTypes) const
- CvDiplomacyAI::GetOtherPlayerNumMinorsConquered(PlayerTypes) const
- CvGlobals::getAI_GRAND_STRATEGY_CONQUEST_POWER_RATIO_MULTIPLIER()
- CvGlobals::getAI_GRAND_STRATEGY_CONQUEST_WEIGHT_PER_MAJOR_ATTACKED()
- CvGlobals::getAI_GRAND_STRATEGY_CONQUEST_WEIGHT_PER_MAJOR_CONQUERED()
- CvGlobals::getAI_GRAND_STRATEGY_CONQUEST_WEIGHT_PER_MINOR_ATTACKED()
- CvGlobals::getAI_GRAND_STRATEGY_CONQUEST_WEIGHT_PER_MINOR_CONQUERED()
- CvGrandStrategyAI::GetPlayer()
- CvPlayer::GetDiplomacyAI() const
- CvPlayer::GetMilitaryMight() const
- CvPlayerAI::getPlayer(PlayerTypes)