CvCity::GetPower() const
- Defined in
- CvCity.cpp, line 11832
- Class
- CvCity
- Hook name
CivHooks::CvCity_GetPower
Hooks
static bool BeforeCvCity_GetPower(const CvCity* self, int& result);static void AfterCvCity_GetPower(const CvCity* self, int& result);static int ReplaceCvCity_GetPower(int (*original)(const CvCity*), const CvCity* self);CivRegisterBefore<CivHooks::CvCity_GetPower>(host, &BeforeCvCity_GetPower);CivRegisterAfter<CivHooks::CvCity_GetPower>(host, &AfterCvCity_GetPower);CivRegisterReplace<CivHooks::CvCity_GetPower>(host, &ReplaceCvCity_GetPower);
Code
11832int CvCity::GetPower() const11833{11834 VALIDATE_OBJECT11835 return int(pow((double) getStrengthValue() / 100, 1.5)); // This is the same math used to calculate Unit Power in CvUnitEntry11836}