CvDiplomacyAI::GetAngryAboutProtectedMinorBulliedScore(PlayerTypes)
- Defined in
- CvDiplomacyAI.cpp, line 23845
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_GetAngryAboutProtectedMinorBulliedScore
Hooks
static bool BeforeCvDiplomacyAI_GetAngryAboutProtectedMinorBulliedScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetAngryAboutProtectedMinorBulliedScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetAngryAboutProtectedMinorBulliedScore(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetAngryAboutProtectedMinorBulliedScore>(host, &BeforeCvDiplomacyAI_GetAngryAboutProtectedMinorBulliedScore);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetAngryAboutProtectedMinorBulliedScore>(host, &AfterCvDiplomacyAI_GetAngryAboutProtectedMinorBulliedScore);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetAngryAboutProtectedMinorBulliedScore>(host, &ReplaceCvDiplomacyAI_GetAngryAboutProtectedMinorBulliedScore);
Code
23845int CvDiplomacyAI::GetAngryAboutProtectedMinorBulliedScore(PlayerTypes ePlayer)23846{23847 int iOpinionWeight = 0;23848 if (IsAngryAboutProtectedMinorBullied(ePlayer))23849 {23850 if (GetTurnsSincePlayerBulliedProtectedMinor(ePlayer) < /*50*/ GC.getOPINION_WEIGHT_BULLIED_PROTECTED_MINOR_RECENTLY_NUM_TURNS()) //antonjs: consider: scale by game speed23851 iOpinionWeight += /*15*/ GC.getOPINION_WEIGHT_BULLIED_PROTECTED_MINOR_RECENTLY();23852 else23853 iOpinionWeight += /*10*/ GC.getOPINION_WEIGHT_BULLIED_PROTECTED_MINOR_WHILE_AGO();2385423855 if (GetOtherPlayerNumProtectedMinorsBullied(ePlayer) > 1) 23856 iOpinionWeight += /*10*/ GC.getOPINION_WEIGHT_BULLIED_MANY_PROTECTED_MINORS();23857 }23858 return iOpinionWeight;23859}
Calls
- CvDiplomacyAI::GetOtherPlayerNumProtectedMinorsBullied(PlayerTypes) const
- CvDiplomacyAI::GetTurnsSincePlayerBulliedProtectedMinor(PlayerTypes)
- CvDiplomacyAI::IsAngryAboutProtectedMinorBullied(PlayerTypes)
- CvGlobals::getOPINION_WEIGHT_BULLIED_MANY_PROTECTED_MINORS()
- CvGlobals::getOPINION_WEIGHT_BULLIED_PROTECTED_MINOR_RECENTLY()
- CvGlobals::getOPINION_WEIGHT_BULLIED_PROTECTED_MINOR_RECENTLY_NUM_TURNS()
- CvGlobals::getOPINION_WEIGHT_BULLIED_PROTECTED_MINOR_WHILE_AGO()