CvLuaPlayer::lGetMinimumFaithNextGreatProphet(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 3060
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lGetMinimumFaithNextGreatProphet
Hooks
static bool BeforeCvLuaPlayer_lGetMinimumFaithNextGreatProphet(lua_State* L, int& result);static void AfterCvLuaPlayer_lGetMinimumFaithNextGreatProphet(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lGetMinimumFaithNextGreatProphet(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lGetMinimumFaithNextGreatProphet>(host, &BeforeCvLuaPlayer_lGetMinimumFaithNextGreatProphet);CivRegisterAfter<CivHooks::CvLuaPlayer_lGetMinimumFaithNextGreatProphet>(host, &AfterCvLuaPlayer_lGetMinimumFaithNextGreatProphet);CivRegisterReplace<CivHooks::CvLuaPlayer_lGetMinimumFaithNextGreatProphet>(host, &ReplaceCvLuaPlayer_lGetMinimumFaithNextGreatProphet);
Code
3059// int GetMinimumFaithNextGreatProphet() const3060int CvLuaPlayer::lGetMinimumFaithNextGreatProphet(lua_State* L)3061{3062 CvPlayerAI* pkPlayer = GetInstance(L);30633064#if defined(MOD_GLOBAL_TRULY_FREE_GP)3065 int iFaith = pkPlayer->GetReligions()->GetCostNextProphet(true /*bIncludeBeliefDiscounts*/, true /*bAdjustForSpeedDifficulty*/, MOD_GLOBAL_TRULY_FREE_GP);3066#else3067 int iFaith = pkPlayer->GetReligions()->GetCostNextProphet(true /*bIncludeBeliefDiscounts*/, true /*bAdjustForSpeedDifficulty*/);3068#endif3069 lua_pushinteger(L, iFaith);30703071 return 1;3072}
Calls
- CustomMods::isGLOBAL_TRULY_FREE_GP()
CvLuaScopedInstance::GetInstance- CvPlayer::GetReligions() const
- CvPlayerReligions::GetCostNextProphet(bool, bool, bool) const
lua_pushinteger