CvDiplomacyAI::ChangeOtherPlayerNumMinorsAttacked(PlayerTypes, int)
- Defined in
- CvDiplomacyAI.cpp, line 10175
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_ChangeOtherPlayerNumMinorsAttacked
Hooks
static bool BeforeCvDiplomacyAI_ChangeOtherPlayerNumMinorsAttacked(CvDiplomacyAI* self, PlayerTypes ePlayer, int iChange);static void AfterCvDiplomacyAI_ChangeOtherPlayerNumMinorsAttacked(CvDiplomacyAI* self, PlayerTypes ePlayer, int iChange);static void ReplaceCvDiplomacyAI_ChangeOtherPlayerNumMinorsAttacked(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iChange);CivRegisterBefore<CivHooks::CvDiplomacyAI_ChangeOtherPlayerNumMinorsAttacked>(host, &BeforeCvDiplomacyAI_ChangeOtherPlayerNumMinorsAttacked);CivRegisterAfter<CivHooks::CvDiplomacyAI_ChangeOtherPlayerNumMinorsAttacked>(host, &AfterCvDiplomacyAI_ChangeOtherPlayerNumMinorsAttacked);CivRegisterReplace<CivHooks::CvDiplomacyAI_ChangeOtherPlayerNumMinorsAttacked>(host, &ReplaceCvDiplomacyAI_ChangeOtherPlayerNumMinorsAttacked);
Code
10174/// Changes how many Minors have we seen this Player attack10175void CvDiplomacyAI::ChangeOtherPlayerNumMinorsAttacked(PlayerTypes ePlayer, int iChange)10176{10177#if defined(MOD_API_EXTENSIONS)10178 int iWarmongerModifier = 100;10179#endif1018010181 SetOtherPlayerNumMinorsAttacked(ePlayer, GetOtherPlayerNumMinorsAttacked(ePlayer) + iChange);10182#if defined(MOD_API_EXTENSIONS)10183 ChangeOtherPlayerWarmongerAmountTimes100(ePlayer, iChange * /*250 */ GC.getWARMONGER_THREAT_MINOR_ATTACKED_WEIGHT() * iWarmongerModifier);10184#else10185 ChangeOtherPlayerWarmongerAmount(ePlayer, iChange * /*250 */ GC.getWARMONGER_THREAT_MINOR_ATTACKED_WEIGHT());10186#endif10187}