From 789602147e2b6556f2a5fa5d8710966d87c007ba Mon Sep 17 00:00:00 2001 From: LessRekkless <34615525+LessRekkless@users.noreply.github.com> Date: Fri, 28 Jun 2024 19:16:34 -0400 Subject: [PATCH] Congress Proposal 6.09a Tourism from Shared Religion (#11053) * Tourism Calculation / Tootlip Generation: - clarified the difference between player generating tourism, and the player who the tourism is being inflicted upon - reorganized tooltip so that the earliest bonuses come first and UA/Policy/etc abilities come last - updated tourism concepts and yellow text in Civilopedia * Tourism from Shared Religion updated to scale with population or cities following your religion as desired * (6-09a) Shared Religion Tourism Modifier scales with population --- .../Core Files/Core Values/CoreDefines.sql | 5 + .../Core Files/Text/CoreText_en_US.sql | 9 +- .../Database Changes/DefineChanges.sql | 3 + .../Database Changes/Policies/Fealty.sql | 2 +- .../en_US/Concepts/ConceptTextChanges.sql | 75 +++- .../Text/en_US/Policies/PolicyTextChanges.sql | 2 +- CvGameCoreDLL_Expansion2/CvCultureClasses.cpp | 330 ++++++++++-------- CvGameCoreDLL_Expansion2/CvCultureClasses.h | 6 +- CvGameCoreDLL_Expansion2/CvGlobals.cpp | 4 + CvGameCoreDLL_Expansion2/CvGlobals.h | 2 + .../CvReligionClasses.cpp | 2 +- 11 files changed, 277 insertions(+), 163 deletions(-) diff --git a/(1) Community Patch/Core Files/Core Values/CoreDefines.sql b/(1) Community Patch/Core Files/Core Values/CoreDefines.sql index 04568a703c..48dc3c64e8 100644 --- a/(1) Community Patch/Core Files/Core Values/CoreDefines.sql +++ b/(1) Community Patch/Core Files/Core Values/CoreDefines.sql @@ -246,6 +246,11 @@ UPDATE Defines SET Value = 6 WHERE Name = 'RELIGION_BELIEF_SCORE_CITY_MULTIPLIER UPDATE Defines SET Value = 4 WHERE Name = 'RELIGION_BELIEF_SCORE_UNOWNED_PLOT_MULTIPLIER'; -- Unowned but in range more valuable than before to make sure AI knows it's in a good position UPDATE Defines SET Value = 8 WHERE Name = 'RELIGION_BELIEF_SCORE_OWNED_PLOT_MULTIPLIER'; -- Owned slightly more valuable than before +-- Tourism Stuff +UPDATE Defines SET Value = 25 WHERE Name = 'TOURISM_MODIFIER_SHARED_RELIGION'; -- percentage +INSERT INTO Defines (Name, Value) SELECT 'TOURISM_MODIFIER_SHARED_RELIGION_MAX', 0; -- maximum base percentage allowed (0 is no max) +INSERT INTO Defines (Name, Value) SELECT 'TOURISM_MODIFIER_SHARED_RELIGION_TYPE', 0; -- 0 = no scaling, 1 = scaling per city, 2 = scaling per population + -- AI Grand Strategy UPDATE Defines SET Value = 10 WHERE Name = 'AI_GRAND_STRATEGY_NUM_TURNS_STRATEGY_MUST_BE_ACTIVE'; UPDATE Defines SET Value = 50 WHERE Name = 'AI_GRAND_STRATEGY_CURRENT_STRATEGY_WEIGHT'; diff --git a/(1) Community Patch/Core Files/Text/CoreText_en_US.sql b/(1) Community Patch/Core Files/Text/CoreText_en_US.sql index df34bceb57..cc9306eaef 100644 --- a/(1) Community Patch/Core Files/Text/CoreText_en_US.sql +++ b/(1) Community Patch/Core Files/Text/CoreText_en_US.sql @@ -717,11 +717,6 @@ UPDATE Language_en_US SET Text = 'We''re having issues with our growing population, so we needn''t build growth buildings in our cities.' WHERE Tag = 'TXT_KEY_ECONOMICAISTRATEGY_HALT_GROWTH_BUILDINGS'; --- Reversed Tourism for Open Borders -UPDATE Language_en_US -SET Text = '+{1_Num}% Bonus for Open Borders from:[NEWLINE] ' -WHERE Tag = 'TXT_KEY_CO_CITY_TOURISM_OPEN_BORDERS_BONUS'; - -- Barbarians UPDATE Language_en_US SET Text = 'Crom' @@ -1985,6 +1980,8 @@ UPDATE Language_en_US SET Text = '{1_Num} [ICON_TOURISM] Tourism from buildings purchased with [ICON_PEACE] Faith' WHERE Tag = 'TXT_KEY_CO_CITY_TOURISM_FAITH_BUILDINGS'; - +UPDATE Language_en_US +SET Text = '+{1_Num}% Bonus from Trade Route between Empires[NEWLINE]' +WHERE Tag = 'TXT_KEY_CO_PLAYER_TOURISM_TRADE_ROUTE'; diff --git a/(2) Vox Populi/Database Changes/DefineChanges.sql b/(2) Vox Populi/Database Changes/DefineChanges.sql index 3b1fe9c784..34f3a54fc9 100644 --- a/(2) Vox Populi/Database Changes/DefineChanges.sql +++ b/(2) Vox Populi/Database Changes/DefineChanges.sql @@ -371,6 +371,9 @@ UPDATE Defines SET Value = 15 WHERE Name = 'TOURISM_MODIFIER_OPEN_BORDERS'; UPDATE Defines SET Value = 10 WHERE Name = 'TOURISM_MODIFIER_TRADE_ROUTE'; UPDATE Defines SET Value = -10 WHERE Name = 'TOURISM_MODIFIER_DIFFERENT_IDEOLOGIES'; UPDATE Defines SET Value = 20 WHERE Name = 'TOURISM_MODIFIER_DIPLOMAT'; +UPDATE Defines SET Value = 1 WHERE Name = 'TOURISM_MODIFIER_SHARED_RELIGION'; -- percentage +UPDATE Defines SET Value = 50 WHERE Name = 'TOURISM_MODIFIER_SHARED_RELIGION_MAX'; +UPDATE Defines SET Value = 2 WHERE Name = 'TOURISM_MODIFIER_SHARED_RELIGION_TYPE'; -- 0 = no scaling, 1 = scaling per city, 2 = scaling per population ------------------------------------------------------------------------------------------------------------------- -- Religion diff --git a/(2) Vox Populi/Database Changes/Policies/Fealty.sql b/(2) Vox Populi/Database Changes/Policies/Fealty.sql index f6c3c971e4..9344b03ee5 100644 --- a/(2) Vox Populi/Database Changes/Policies/Fealty.sql +++ b/(2) Vox Populi/Database Changes/Policies/Fealty.sql @@ -128,7 +128,7 @@ VALUES ('POLICY_PIETY_FINISHER', 'UNITCLASS_ARTIST'); UPDATE Policies -SET SharedReligionTourismModifier = 25 +SET SharedReligionTourismModifier = 50 WHERE Type = 'POLICY_PIETY_FINISHER'; INSERT INTO Policy_ReligionYieldMod diff --git a/(2) Vox Populi/Database Changes/Text/en_US/Concepts/ConceptTextChanges.sql b/(2) Vox Populi/Database Changes/Text/en_US/Concepts/ConceptTextChanges.sql index 6fecbe2c63..266f181388 100644 --- a/(2) Vox Populi/Database Changes/Text/en_US/Concepts/ConceptTextChanges.sql +++ b/(2) Vox Populi/Database Changes/Text/en_US/Concepts/ConceptTextChanges.sql @@ -162,12 +162,12 @@ UPDATE Language_en_US SET Text = '[COLOR_YELLOW]Cultural Victory[ENDCOLOR]' WHERE Tag = 'TXT_KEY_SOCIALPOLICY_CULTUREVICTORY_HEADING2_TITLE'; UPDATE Language_en_US -SET Text = 'You no longer win a Cultural Victory by fully exploring five Social Policy branches. Instead, you must become the dominant cultural influence in every civilization in the game using Tourism. [COLOR_YELLOW]You must also have two Tier 3 Tenets of an Ideology, your people must be Content, and the Citizen Earth Protocol wonder must be constructed. Once these requirements are met, you can construct the Citizen Earth Protocol to win this victory.[ENDCOLOR] See the section on Victory for more information.' +SET Text = 'You no longer win a Cultural Victory by fully exploring five Social Policy branches. Instead, you must become the dominant cultural influence in every civilization in the game using Tourism. [COLOR_YELLOW]You must also have two Tier 3 Tenets of an Ideology, and your people must be Content. Once these requirements are met, you can then construct the Citizen Earth Protocol wonder to win.[ENDCOLOR] See the section on Victory for more information.' WHERE Tag = 'TXT_KEY_SOCIALPOLICY_CULTUREVICTORY_HEADING2_BODY'; UPDATE Language_en_US SET Text = '[COLOR_YELLOW]Cultural Victory[ENDCOLOR]' -WHERE Tag = 'TXT_KEY_CULTURE_VICTORY_HEADING3_TITLE'; +WHERE Tag = 'TXT_KEY_VICTORY_CULTURAL_HEADING3_TITLE'; UPDATE Language_en_US SET Text = 'To win a Cultural Victory, you must become the dominant cultural influence in every civilization in the game [COLOR_YELLOW]and construct the Citizen Earth Protocol. You must also have two Tier 3 Tenets of an Ideology, and your people must be Content[ENDCOLOR]. Cultural Influence is achieved through Tourism generated by [ICON_GREAT_WORK] Great Works that you create, and [ICON_VP_ARTIFACT] Artifacts that you discover. The Tourism you generate has a constant impact on other civilizations, and its effect is amplified through Open Borders, Trade Routes, shared Religion and Ideologies, Research Agreements, etc.[NEWLINE][NEWLINE]When your cumulative Tourism output (for the entire game) surpasses the cumulative Culture output of each remaining civilization in the game, [COLOR_YELLOW]you will be able to construct the Citizen Earth Protocol if you also have an ideology and your population is Content[ENDCOLOR].' WHERE Tag = 'TXT_KEY_VICTORY_CULTURAL_HEADING3_BODY'; @@ -176,7 +176,20 @@ UPDATE Language_en_US SET Text = '[COLOR_YELLOW]Tourism[ENDCOLOR]' WHERE Tag = 'TXT_KEY_CULTURE_TOURISM_HEADING2_TITLE'; UPDATE Language_en_US -SET Text = '[ICON_TOURISM] Tourism is the primary yield you will use to spread your cultural influence to other civilizations. It is generated passively by [COLOR_POSITIVE_TEXT]Buildings[ENDCOLOR], [COLOR_POSITIVE_TEXT]Great Works[ENDCOLOR] or [COLOR_POSITIVE_TEXT]Artifacts[ENDCOLOR][COLOR_YELLOW], and actively by [ENDCOLOR][COLOR_POSITIVE_TEXT]Historic Events[ENDCOLOR][COLOR_YELLOW] (for more on "Historic Events", see the section with this label) or completing [ENDCOLOR][COLOR_POSITIVE_TEXT]Trade Routes[ENDCOLOR][COLOR_YELLOW] (if you have constructed buildings that grant such bonuses)[ENDCOLOR]. As you place more and more Great Works and Artifacts into your Museums, Amphitheaters, Opera Houses, etc., your [ICON_TOURISM] Tourism will continue to increase. Additionally, you can boost your [ICON_TOURISM] Tourism output quite a bit through Open Borders, Trade Routes, shared Religion, and certain Ideological Tenets.' +SET Text = '[ICON_TOURISM] Tourism is the primary yield you will use to spread your cultural influence to other civilizations. It is generated passively by [COLOR_POSITIVE_TEXT]Buildings[ENDCOLOR], [COLOR_POSITIVE_TEXT]Great Works[ENDCOLOR] or [COLOR_POSITIVE_TEXT]Artifacts[COLOR_YELLOW], and actively by [COLOR_POSITIVE_TEXT]Historic Events[COLOR_YELLOW] (for more on "Historic Events", see the section with this label) or completing [COLOR_POSITIVE_TEXT]Trade Routes[ENDCOLOR][COLOR_YELLOW] (if you have constructed buildings that grant such bonuses)[ENDCOLOR]. As you place more and more Great Works and Artifacts into your Museums, Amphitheaters, Opera Houses, etc., your [ICON_TOURISM] Tourism will continue to increase. + +[NEWLINE][NEWLINE]Your [ICON_TOURISM] Tourism is multiplied with each player in the following ways [COLOR_YELLOW](minimum [COLOR_NEGATIVE_TEXT]-100%[COLOR_YELLOW])[ENDCOLOR]: +[NEWLINE][ICON_BULLET]Any Trade Route connecting your City with their City [COLOR_YELLOW]([COLOR_POSITIVE_TEXT]+10%[COLOR_YELLOW])[ENDCOLOR]. +[NEWLINE][ICON_BULLET][COLOR_YELLOW]Trade Open Borders to the player ([COLOR_POSITIVE_TEXT]+15%[COLOR_YELLOW]).[ENDCOLOR] +[NEWLINE][ICON_BULLET]Share your Religion with the player [COLOR_YELLOW]([COLOR_POSITIVE_TEXT]+X%[COLOR_YELLOW], the percent of its followers in their empire, maximum [COLOR_POSITIVE_TEXT]+50%[COLOR_YELLOW])[ENDCOLOR]. +[NEWLINE][ICON_BULLET][COLOR_YELLOW]Have a Diplomat in their Capital City ([COLOR_POSITIVE_TEXT]+20%[COLOR_YELLOW]).[ENDCOLOR] +[NEWLINE][ICON_BULLET][COLOR_YELLOW]Have less Boredom in your Empire ([COLOR_POSITIVE_TEXT]+X%[COLOR_YELLOW], the difference in Boredom between your two Empires).[ENDCOLOR] +[NEWLINE][ICON_BULLET][COLOR_YELLOW]Expend a Great Musician inside their borders ([COLOR_POSITIVE_TEXT]+100%[COLOR_YELLOW], and [COLOR_POSITIVE_TEXT]+50%[COLOR_YELLOW] with everyone else).[ENDCOLOR] +[NEWLINE][ICON_BULLET][COLOR_YELLOW]Gain the player as a Vassal ([COLOR_POSITIVE_TEXT]+33%[COLOR_YELLOW]).[ENDCOLOR] +[NEWLINE][ICON_BULLET]Have a different Ideology than the player [COLOR_YELLOW]([COLOR_NEGATIVE_TEXT]-10%[COLOR_YELLOW])[ENDCOLOR]. +[NEWLINE][ICON_BULLET][COLOR_YELLOW]Own more non-Puppet Cities than the player ([COLOR_NEGATIVE_TEXT]-5% per additional City[COLOR_YELLOW]).[ENDCOLOR] + +[NEWLINE][NEWLINE][COLOR_YELLOW]Additionally, certain player Abilities, Policies, Tenets, Corporations, and World Congress proposals can change this modifier.[ENDCOLOR] Other Abilities instead directly multiply the tourism generated in a city.' WHERE Tag = 'TXT_KEY_CULTURE_TOURISM_HEADING2_BODY'; UPDATE Language_en_US @@ -346,15 +359,71 @@ WHERE Tag = 'TXT_KEY_BUILDINGS_PURCHASING_HEADING3_BODY'; -- Freedom UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Freedom[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_SOCIALPOLICY_FREEDOM_HEADING3_TITLE'; +UPDATE Language_en_US SET Text = 'The Freedom ideology provides bonuses for Culture, Tourism, Specialist production, and more. [COLOR_YELLOW]This ideology unlocks upon entering the Atomic Era, or unlocking 18 Policies and having advanced at least to the Industrial Era, whichever comes first.[ENDCOLOR]' WHERE Tag = 'TXT_KEY_SOCIALPOLICY_FREEDOM_HEADING3_BODY'; -- Order UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Order[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_SOCIALPOLICY_ORDER_HEADING3_TITLE'; +UPDATE Language_en_US SET Text = 'Players interested in creating massive, sprawling civs should turn to the Order ideology, as the strength of the empire is determined by the total number of cities it contains. [COLOR_YELLOW]This ideology unlocks upon entering the Atomic Era, or unlocking 18 Policies and have advanced at least to the Industrial Era, whichever comes first.[ENDCOLOR]' WHERE Tag = 'TXT_KEY_SOCIALPOLICY_ORDER_HEADING3_BODY'; -- Autocracy UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Autocracy[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_SOCIALPOLICY_AUTOCRACY_HEADING3_TITLE'; +UPDATE Language_en_US SET Text = 'The Autocracy ideology is well suited for those wishing nothing more than to crush their foes under the weight of their iron-plated boots. [COLOR_YELLOW]This ideology unlocks upon entering the Atomic Era, or unlocking 18 Policies and having advanced at least to the Industrial Era, whichever comes first.[ENDCOLOR]' WHERE Tag = 'TXT_KEY_SOCIALPOLICY_AUTOCRACY_HEADING3_BODY'; + +-- Headings whose topics have mechanics changes +UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Cities[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_GAME_CONCEPT_SECTION_1'; +UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Combat Rules[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_GAME_CONCEPT_SECTION_2'; +UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Resources[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_GAME_CONCEPT_SECTION_4'; +UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Constructing Improvements[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_GAME_CONCEPT_SECTION_5'; +UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Food and City Growth[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_GAME_CONCEPT_SECTION_6'; +UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Culture[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_GAME_CONCEPT_SECTION_8'; +UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Diplomacy[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_GAME_CONCEPT_SECTION_9'; +UPDATE Language_en_US +SET Text = '[COLOR_GREEN]Happiness[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_GAME_CONCEPT_SECTION_10'; +UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Social Policies[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_GAME_CONCEPT_SECTION_12'; +UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Gold and the Economy[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_GAME_CONCEPT_SECTION_13'; +UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Great People and Specialists[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_GAME_CONCEPT_SECTION_15'; +UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]City-States[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_GAME_CONCEPT_SECTION_16'; +UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Ruins and Barbarians[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_GAME_CONCEPT_SECTION_19'; +UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Units[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_GAME_CONCEPT_SECTION_20'; +UPDATE Language_en_US +SET Text = '[COLOR_YELLOW]Victory[ENDCOLOR]' +WHERE Tag = 'TXT_KEY_GAME_CONCEPT_SECTION_21'; \ No newline at end of file diff --git a/(2) Vox Populi/Database Changes/Text/en_US/Policies/PolicyTextChanges.sql b/(2) Vox Populi/Database Changes/Text/en_US/Policies/PolicyTextChanges.sql index 417e6f47a8..5414eff798 100644 --- a/(2) Vox Populi/Database Changes/Text/en_US/Policies/PolicyTextChanges.sql +++ b/(2) Vox Populi/Database Changes/Text/en_US/Policies/PolicyTextChanges.sql @@ -241,7 +241,7 @@ SET Text = 'Fealty' WHERE Tag = 'TXT_KEY_POLICY_BRANCH_PIETY'; UPDATE Language_en_US -SET Text = '[COLOR_POSITIVE_TEXT]Fealty[ENDCOLOR] enhances your ability to defend and leverage your [ICON_RELIGION] Majority Religion.[NEWLINE][NEWLINE][COLOR_POSITIVE_TEXT]Adopting Fealty grants:[ENDCOLOR][NEWLINE][ICON_BULLET]Can purchase Monasteries with [ICON_PEACE] Faith (+3 [ICON_FOOD] Food, +3 [ICON_RESEARCH] Science, +2 [ICON_PEACE] Faith).[NEWLINE][ICON_BULLET]-25% [ICON_PEACE] Faith costs for purchasing Buildings, Missionaries, and Inquisitors.[NEWLINE][NEWLINE][COLOR_POSITIVE_TEXT]Each Fealty policy unlocked grants:[ENDCOLOR][NEWLINE][ICON_BULLET]+1 [ICON_PEACE] Faith and [ICON_STRENGTH] Strength in every City.[NEWLINE][NEWLINE][COLOR_POSITIVE_TEXT]Adopting all Policies in Fealty grants:[ENDCOLOR][NEWLINE][ICON_BULLET]Unlocks building the [COLOR_POSITIVE_TEXT]Red Fort[ENDCOLOR].[NEWLINE][ICON_BULLET]+25% [ICON_TOURISM] Tourism modifier for [COLOR_POSITIVE_TEXT]Shared Religion[ENDCOLOR].[NEWLINE][ICON_BULLET]Cities that follow your [ICON_RELIGION] Majority Religion generate +3 [ICON_PRODUCTION] Production, [ICON_GOLD] Gold, [ICON_SCIENCE] Science, and [ICON_CULTURE] Culture.[NEWLINE][ICON_BULLET]Allows for the purchase of [ICON_GREAT_ARTIST] Great Artists with [ICON_PEACE] Faith starting in the Industrial Era.' +SET Text = '[COLOR_POSITIVE_TEXT]Fealty[ENDCOLOR] enhances your ability to defend and leverage your [ICON_RELIGION] Majority Religion.[NEWLINE][NEWLINE][COLOR_POSITIVE_TEXT]Adopting Fealty grants:[ENDCOLOR][NEWLINE][ICON_BULLET]Can purchase Monasteries with [ICON_PEACE] Faith (+3 [ICON_FOOD] Food, +3 [ICON_RESEARCH] Science, +2 [ICON_PEACE] Faith).[NEWLINE][ICON_BULLET]-25% [ICON_PEACE] Faith costs for purchasing Buildings, Missionaries, and Inquisitors.[NEWLINE][NEWLINE][COLOR_POSITIVE_TEXT]Each Fealty policy unlocked grants:[ENDCOLOR][NEWLINE][ICON_BULLET]+1 [ICON_PEACE] Faith and [ICON_STRENGTH] Strength in every City.[NEWLINE][NEWLINE][COLOR_POSITIVE_TEXT]Adopting all Policies in Fealty grants:[ENDCOLOR][NEWLINE][ICON_BULLET]Unlocks building the [COLOR_POSITIVE_TEXT]Red Fort[ENDCOLOR].[NEWLINE][ICON_BULLET]Multiply the [ICON_TOURISM] Tourism modifier for [COLOR_POSITIVE_TEXT]Shared Religion[ENDCOLOR] by +50%.[NEWLINE][ICON_BULLET]Cities that follow your [ICON_RELIGION] Majority Religion generate +3 [ICON_PRODUCTION] Production, [ICON_GOLD] Gold, [ICON_SCIENCE] Science, and [ICON_CULTURE] Culture.[NEWLINE][ICON_BULLET]Allows for the purchase of [ICON_GREAT_ARTIST] Great Artists with [ICON_PEACE] Faith starting in the Industrial Era.' WHERE Tag = 'TXT_KEY_POLICY_BRANCH_PIETY_HELP'; UPDATE Language_en_US diff --git a/CvGameCoreDLL_Expansion2/CvCultureClasses.cpp b/CvGameCoreDLL_Expansion2/CvCultureClasses.cpp index f38f1cbe41..b2e0641c41 100644 --- a/CvGameCoreDLL_Expansion2/CvCultureClasses.cpp +++ b/CvGameCoreDLL_Expansion2/CvCultureClasses.cpp @@ -4652,60 +4652,95 @@ int CvPlayerCulture::GetTourismModifierWith(PlayerTypes ePlayer) const } /// Tooltip for GetTourismModifierWith() -CvString CvPlayerCulture::GetTourismModifierWithTooltip(PlayerTypes ePlayer) const +CvString CvPlayerCulture::GetTourismModifierWithTooltip(PlayerTypes eTargetPlayer) const { CvString szRtnValue = ""; - CvPlayer &kPlayer = GET_PLAYER(ePlayer); - CvTeam &kTeam = GET_TEAM(kPlayer.getTeam()); + CvTeam &kMyTeam = GET_TEAM(m_pPlayer->getTeam()); + CvPlayer &kTargetPlayer = GET_PLAYER(eTargetPlayer); + CvTeam &kTargetTeam = GET_TEAM(kTargetPlayer.getTeam()); PolicyBranchTypes eMyIdeology = m_pPlayer->GetPlayerPolicies()->GetLateGamePolicyTree(); - PolicyBranchTypes eTheirIdeology = kPlayer.GetPlayerPolicies()->GetLateGamePolicyTree(); + PolicyBranchTypes eTheirIdeology = kTargetPlayer.GetPlayerPolicies()->GetLateGamePolicyTree(); - int iTourismWithPlayer = m_pPlayer->GetCulture()->GetTourismPerTurnIncludingInstant(ePlayer, true); - if (iTourismWithPlayer != 0) + int iTourismWithTargetPlayer = m_pPlayer->GetCulture()->GetTourismPerTurnIncludingInstant(eTargetPlayer, true); + if (iTourismWithTargetPlayer != 0) { - szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_INSTANT_TT_VALUE", iTourismWithPlayer) + "[ENDCOLOR]"; + szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_INSTANT_TT_VALUE", iTourismWithTargetPlayer) + "[ENDCOLOR]"; } szRtnValue += "[NEWLINE]------------------------[NEWLINE]"; // POSITIVE MODIFIERS - // Open borders with this player - if ((MOD_BALANCE_FLIPPED_TOURISM_MODIFIER_OPEN_BORDERS && GET_TEAM(m_pPlayer->getTeam()).IsAllowsOpenBordersToTeam(kTeam.GetID())) || - (!MOD_BALANCE_FLIPPED_TOURISM_MODIFIER_OPEN_BORDERS && kTeam.IsAllowsOpenBordersToTeam(m_pPlayer->getTeam()))) + // This player is on the same Team as us + if (m_pPlayer->getTeam() == GET_PLAYER(eTargetPlayer).getTeam()) { - szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_OPEN_BORDERS", GetTourismModifierOpenBorders()) + "[ENDCOLOR]"; + szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_SAME_TEAM", 200) + "[ENDCOLOR]"; } - // Trade route to one of this player's cities from here - if (m_pPlayer->getTeam() == GET_PLAYER(ePlayer).getTeam()) + // Trade route between one of this player's cities and ours + if (GC.getGame().GetGameTrade()->IsPlayerConnectedToPlayer(m_pPlayer->GetID(), eTargetPlayer)) { - szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_SAME_TEAM", 200) + "[ENDCOLOR]"; + szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_TRADE_ROUTE", GetTourismModifierTradeRoute()) + "[ENDCOLOR]"; } - // Trade route to one of this player's cities from here - if (GC.getGame().GetGameTrade()->IsPlayerConnectedToPlayer(m_pPlayer->GetID(), ePlayer)) + // Open Borders with this player + if ((MOD_BALANCE_FLIPPED_TOURISM_MODIFIER_OPEN_BORDERS && kMyTeam.IsAllowsOpenBordersToTeam(kTargetTeam.GetID())) || + (!MOD_BALANCE_FLIPPED_TOURISM_MODIFIER_OPEN_BORDERS && kTargetTeam.IsAllowsOpenBordersToTeam(m_pPlayer->getTeam()))) { - szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_TRADE_ROUTE", GetTourismModifierTradeRoute()) + "[ENDCOLOR]"; + szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_OPEN_BORDERS", GetTourismModifierOpenBorders()) + "[ENDCOLOR]"; } - ReligionTypes ePlayerReligion = m_pPlayer->GetReligions()->GetStateReligion(); - if (ePlayerReligion != NO_RELIGION && kPlayer.GetReligions()->GetStateReligion() == ePlayerReligion) + // Shared Religion with this player + int iSharedReligionModifier = GetTourismModifierSharedReligion(eTargetPlayer); + if (iSharedReligionModifier > 0) { - szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_RELIGION_NOTE", GetTourismModifierSharedReligion()) + "[ENDCOLOR]"; + szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_RELIGION_NOTE", iSharedReligionModifier) + "[ENDCOLOR]"; } - if (m_pPlayer->GetEspionage()->IsMyDiplomatVisitingThem(ePlayer)) + // Diplomat in this player's Capital City + if (m_pPlayer->GetEspionage()->IsMyDiplomatVisitingThem(eTargetPlayer) && + (MOD_BALANCE_CORE || (!MOD_BALANCE_CORE && eMyIdeology != NO_POLICY_BRANCH_TYPE && eTheirIdeology != NO_POLICY_BRANCH_TYPE && eMyIdeology != eTheirIdeology))) { - szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_PROPAGANDA", /*25 in CP, 10 in VP*/ GD_INT_GET(TOURISM_MODIFIER_DIPLOMAT)) + "[ENDCOLOR]"; + szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_PROPAGANDA", /*25 in CP, 20 in VP*/ GD_INT_GET(TOURISM_MODIFIER_DIPLOMAT)) + "[ENDCOLOR]"; + } + + if (MOD_BALANCE_VP) + { + // This player has more boredom (unhappiness due to culture deficit) than us + int iBoredom = kTargetPlayer.GetCulture()->GetBoredomCache(); + int iDelta = iBoredom - GetBoredomCache(); + if (iDelta > 0) + { + szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_BOREDOM", iDelta) + "[ENDCOLOR]"; + } } - if (GET_TEAM(GET_PLAYER(ePlayer).getTeam()).GetMaster() == m_pPlayer->getTeam()) + // Expended a Great Musician in one of this player's cities + if (m_pPlayer->getTourismBonusTurnsPlayer(eTargetPlayer) > 0) + { + szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_TOUR_BONUS", m_pPlayer->getTourismBonusTurnsPlayer(eTargetPlayer)) + "[ENDCOLOR]"; + } + // Expended a Great Musician in another player's cities + else if (m_pPlayer->GetTourismBonusTurns() > 0) + { + szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_TOUR_BONUS_HALF", m_pPlayer->GetTourismBonusTurns()) + "[ENDCOLOR]"; + } + + // This player is our Vassal + if (kTargetTeam.GetMaster() == m_pPlayer->getTeam()) { szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_VASSAL", GetTourismModifierVassal()) + "[ENDCOLOR]"; } + + // Positive Congress Proposal is Active + CvLeague* pLeague = GC.getGame().GetGameLeagues()->GetActiveLeague(); + if(pLeague != NULL && pLeague->GetTourismMod() > 0) + { + szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_LEAGUE", pLeague->GetTourismMod()) + "[ENDCOLOR]"; + } + // This player shares our ideology (activated with a policy) int iSharedIdeologyMod = m_pPlayer->GetPlayerPolicies()->GetNumericModifier(POLICYMOD_TOURISM_MOD_SHARED_IDEOLOGY); if (iSharedIdeologyMod != 0) { @@ -4715,6 +4750,7 @@ CvString CvPlayerCulture::GetTourismModifierWithTooltip(PlayerTypes ePlayer) con } } + // This player is at war against the same opponent as us (activated with a policy) int iCommonFoeMod = m_pPlayer->GetPlayerPolicies()->GetNumericModifier(POLICYMOD_TOURISM_MOD_COMMON_FOE); if (iCommonFoeMod != 0) { @@ -4724,10 +4760,10 @@ CvString CvPlayerCulture::GetTourismModifierWithTooltip(PlayerTypes ePlayer) con { eLoopPlayer = (PlayerTypes) iPlayerLoop; - if (eLoopPlayer != ePlayer && eLoopPlayer != m_pPlayer->GetID() && m_pPlayer->GetDiplomacyAI()->IsPlayerValid(eLoopPlayer)) + if (eLoopPlayer != eTargetPlayer && eLoopPlayer != m_pPlayer->GetID() && m_pPlayer->GetDiplomacyAI()->IsPlayerValid(eLoopPlayer)) { // Are they at war with me too? - if (GET_TEAM(m_pPlayer->getTeam()).isAtWar(GET_PLAYER(eLoopPlayer).getTeam()) && GET_TEAM(kPlayer.getTeam()).isAtWar(GET_PLAYER(eLoopPlayer).getTeam())) + if (kMyTeam.isAtWar(GET_PLAYER(eLoopPlayer).getTeam()) && kTargetTeam.isAtWar(GET_PLAYER(eLoopPlayer).getTeam())) { iTotal += iCommonFoeMod; break; @@ -4738,39 +4774,17 @@ CvString CvPlayerCulture::GetTourismModifierWithTooltip(PlayerTypes ePlayer) con szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_COMMON_FOE", iTotal) + "[ENDCOLOR]"; } + // This player is less happy than us (activated with a policy) int iLessHappyMod = m_pPlayer->GetPlayerPolicies()->GetNumericModifier(POLICYMOD_TOURISM_MOD_LESS_HAPPY); if (iLessHappyMod != 0) { - if (m_pPlayer->GetExcessHappiness() > kPlayer.GetExcessHappiness()) + if (m_pPlayer->GetExcessHappiness() > kTargetPlayer.GetExcessHappiness()) { szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_LESS_HAPPY", iLessHappyMod) + "[ENDCOLOR]"; } } -#if defined(MOD_BALANCE_CORE) - if (MOD_BALANCE_VP) - { - int iBoredom = kPlayer.GetCulture()->GetBoredomCache(); - int iDelta = iBoredom - GetBoredomCache(); - if (iDelta > 0) - { - szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_BOREDOM", iDelta) + "[ENDCOLOR]"; - } - } - - int iFranchiseBonus = m_pPlayer->GetCulture()->GetFranchiseModifier(ePlayer); - if (iFranchiseBonus != 0) - { - szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_FRANCHISES", iFranchiseBonus) + "[ENDCOLOR]"; - } - if (m_pPlayer->getTourismBonusTurnsPlayer(ePlayer) > 0) - { - szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_TOUR_BONUS", m_pPlayer->getTourismBonusTurnsPlayer(ePlayer)) + "[ENDCOLOR]"; - } - else if (m_pPlayer->GetTourismBonusTurns() > 0) - { - szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_TOUR_BONUS_HALF", m_pPlayer->GetTourismBonusTurns()) + "[ENDCOLOR]"; - } + // Have a positive war-score against any player (activated with a policy) if (m_pPlayer->GetPositiveWarScoreTourismMod() != 0) { int iWarScore = m_pPlayer->GetDiplomacyAI()->GetHighestWarscore(); @@ -4781,50 +4795,50 @@ CvString CvPlayerCulture::GetTourismModifierWithTooltip(PlayerTypes ePlayer) con } } - CvLeague* pLeague = GC.getGame().GetGameLeagues()->GetActiveLeague(); - if(pLeague != NULL) + // Corporation franchises in this player's cities + int iFranchiseBonus = m_pPlayer->GetCulture()->GetFranchiseModifier(eTargetPlayer); + if (iFranchiseBonus != 0) { - if(pLeague->GetTourismMod() > 0) - { - szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_LEAGUE", pLeague->GetTourismMod()) + "[ENDCOLOR]"; - } - else if(pLeague->GetTourismMod() < 0) - { - szRtnValue += "[COLOR_NEGATIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_LEAGUE_NEGATIVE", pLeague->GetTourismMod()) + "[ENDCOLOR]"; - } + szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_FRANCHISES", iFranchiseBonus) + "[ENDCOLOR]"; } -#endif + // Carnival is active (UA) if (m_pPlayer->isGoldenAge() && m_pPlayer->GetPlayerTraits()->GetGoldenAgeTourismModifier()) { szRtnValue += "[COLOR_POSITIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_CARNIVAL", m_pPlayer->GetPlayerTraits()->GetGoldenAgeTourismModifier()) + "[ENDCOLOR]"; } // NEUTRAL MODIFIERS - if ((MOD_BALANCE_FLIPPED_TOURISM_MODIFIER_OPEN_BORDERS && !GET_TEAM(m_pPlayer->getTeam()).IsAllowsOpenBordersToTeam(kTeam.GetID())) || - (!MOD_BALANCE_FLIPPED_TOURISM_MODIFIER_OPEN_BORDERS && !kTeam.IsAllowsOpenBordersToTeam(m_pPlayer->getTeam()))) + if (!GC.getGame().GetGameTrade()->IsPlayerConnectedToPlayer(m_pPlayer->GetID(), eTargetPlayer)) { - szRtnValue += "[COLOR_GREY]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_OPEN_BORDERS", 0) + "[ENDCOLOR]"; + szRtnValue += "[COLOR_GREY]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_TRADE_ROUTE", 0) + "[ENDCOLOR]"; } - if (!GC.getGame().GetGameTrade()->IsPlayerConnectedToPlayer(m_pPlayer->GetID(), ePlayer)) + if ((MOD_BALANCE_FLIPPED_TOURISM_MODIFIER_OPEN_BORDERS && !kMyTeam.IsAllowsOpenBordersToTeam(kTargetTeam.GetID())) || + (!MOD_BALANCE_FLIPPED_TOURISM_MODIFIER_OPEN_BORDERS && !kTargetTeam.IsAllowsOpenBordersToTeam(m_pPlayer->getTeam()))) { - szRtnValue += "[COLOR_GREY]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_TRADE_ROUTE", 0) + "[ENDCOLOR]"; + szRtnValue += "[COLOR_GREY]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_OPEN_BORDERS", 0) + "[ENDCOLOR]"; } - if (ePlayerReligion == NO_RELIGION || !kPlayer.GetReligions()->HasReligionInMostCities(ePlayerReligion)) + if (iSharedReligionModifier <= 0) { szRtnValue += "[COLOR_GREY]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_RELIGION_NOTE", 0) + "[ENDCOLOR]"; } if (eMyIdeology != NO_POLICY_BRANCH_TYPE && eTheirIdeology != NO_POLICY_BRANCH_TYPE && eMyIdeology != eTheirIdeology) { - if (!m_pPlayer->GetEspionage()->IsMyDiplomatVisitingThem(ePlayer)) + if (!m_pPlayer->GetEspionage()->IsMyDiplomatVisitingThem(eTargetPlayer)) { szRtnValue += "[COLOR_GREY]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_PROPAGANDA", 0) + "[ENDCOLOR]"; } } // NEGATIVE MODIFIERS - //city difference - do we have more than them? - int iNumCities = m_pPlayer->GetNumEffectiveCities() - kPlayer.GetNumEffectiveCities(); + // This player has a different Ideology than us + if (eMyIdeology != NO_POLICY_BRANCH_TYPE && eTheirIdeology != NO_POLICY_BRANCH_TYPE && eMyIdeology != eTheirIdeology) + { + szRtnValue += "[COLOR_NEGATIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_DIFFERENT_IDEOLOGIES", /*-34 in CP, -10 in VP*/ GD_INT_GET(TOURISM_MODIFIER_DIFFERENT_IDEOLOGIES)) + "[ENDCOLOR]"; + } + + // City difference - do we have more than them? + int iNumCities = m_pPlayer->GetNumEffectiveCities() - kTargetPlayer.GetNumEffectiveCities(); if (iNumCities > 0) { // Mod for City Count @@ -4837,27 +4851,56 @@ CvString CvPlayerCulture::GetTourismModifierWithTooltip(PlayerTypes ePlayer) con szRtnValue += "[COLOR_NEGATIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_CITY_TOURISM_CAPITAL_PENALTY", iMod, iNumCities) + "[ENDCOLOR]"; } - if (eMyIdeology != NO_POLICY_BRANCH_TYPE && eTheirIdeology != NO_POLICY_BRANCH_TYPE && eMyIdeology != eTheirIdeology) + // Negative Congress Proposal is active + if(pLeague != NULL && pLeague->GetTourismMod() < 0) { - szRtnValue += "[COLOR_NEGATIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_DIFFERENT_IDEOLOGIES", /*-34 in CP, -10 in VP*/ GD_INT_GET(TOURISM_MODIFIER_DIFFERENT_IDEOLOGIES)) + "[ENDCOLOR]"; + szRtnValue += "[COLOR_NEGATIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_LEAGUE_NEGATIVE", pLeague->GetTourismMod()) + "[ENDCOLOR]"; } -#if defined(MOD_BALANCE_CORE) - if (GET_PLAYER(ePlayer).isMajorCiv() && GET_PLAYER(ePlayer).GetPlayerTraits()->IsNoOpenTrade()) + + // This player has closed borders with us (UA) + if (kTargetPlayer.isMajorCiv() && kTargetPlayer.GetPlayerTraits()->IsNoOpenTrade()) { - if (!GC.getGame().GetGameTrade()->IsPlayerConnectedToPlayer(ePlayer, m_pPlayer->GetID(), true)) + if (!GC.getGame().GetGameTrade()->IsPlayerConnectedToPlayer(eTargetPlayer, m_pPlayer->GetID(), true)) { szRtnValue += "[COLOR_NEGATIVE_TEXT]" + GetLocalizedText("TXT_KEY_CO_PLAYER_TOURISM_JAPAN_UA", /*-34 in CP, -10 in VP*/ GD_INT_GET(TOURISM_MODIFIER_DIFFERENT_IDEOLOGIES)) + "[ENDCOLOR]"; } } -#endif return szRtnValue; } /// Tourism modifier (base plus policy boost) - shared religion -int CvPlayerCulture::GetTourismModifierSharedReligion() const +int CvPlayerCulture::GetTourismModifierSharedReligion(PlayerTypes eTargetPlayer) const { - return /*25*/ GD_INT_GET(TOURISM_MODIFIER_SHARED_RELIGION) + m_pPlayer->GetPlayerPolicies()->GetNumericModifier(POLICYMOD_SHARED_RELIGION_TOURISM_MODIFIER) + m_pPlayer->GetPlayerTraits()->GetSharedReligionTourismModifier(); + ReligionTypes eMyReligion = m_pPlayer->GetReligions()->GetStateReligion(); + if (eMyReligion <= RELIGION_PANTHEON || eTargetPlayer == NO_PLAYER) + return 0; + + int iModifier = /*25in CP, 1 in VP*/ GD_INT_GET(TOURISM_MODIFIER_SHARED_RELIGION); + int iModifierMax = /*0 in CP, 50 in VP*/ GD_INT_GET(TOURISM_MODIFIER_SHARED_RELIGION_MAX); + int iMultiplier = m_pPlayer->GetPlayerPolicies()->GetNumericModifier(POLICYMOD_SHARED_RELIGION_TOURISM_MODIFIER) + m_pPlayer->GetPlayerTraits()->GetSharedReligionTourismModifier(); + + switch (/*0 in CP, 2 in VP*/ GD_INT_GET(TOURISM_MODIFIER_SHARED_RELIGION_TYPE)) + { + case 0: + // Flat value if both players have the same religion + return GET_PLAYER(eTargetPlayer).GetReligions()->GetStateReligion() == eMyReligion ? iModifier + iMultiplier : 0; + case 1: + // Scales with number of cities following religion + iModifier *= GC.getGame().GetGameReligions()->GetNumDomesticCitiesFollowing(eMyReligion, eTargetPlayer); + break; + case 2: + // Scales with percentage of followers of religion in population + int iFollowers = GC.getGame().GetGameReligions()->GetNumFollowers(eMyReligion, eTargetPlayer); + int iPopulation = GET_PLAYER(eTargetPlayer).getTotalPopulation(); + iModifier = iModifier * 100 * iFollowers / iPopulation; + break; + } + + if (iModifierMax > 0) + iModifier = min(iModifierMax, iModifier); + + return iModifier * (100 + iMultiplier) / 100; } /// Tourism modifier (base plus policy boost) - trade route @@ -4872,7 +4915,7 @@ int CvPlayerCulture::GetTourismModifierOpenBorders() const return /*25 in CP, 10 in VP*/ GD_INT_GET(TOURISM_MODIFIER_OPEN_BORDERS) + m_pPlayer->GetPlayerPolicies()->GetNumericModifier(POLICYMOD_OPEN_BORDERS_TOURISM_MODIFIER); } -/// Tourism modifier (base plus policy boost) - open borders +/// Tourism modifier - corporation franchise int CvPlayerCulture::GetFranchiseModifier(PlayerTypes ePlayer, bool bJustCheckOne) const { return m_pPlayer->GetCorporations()->GetFranchiseTourismMod(ePlayer, bJustCheckOne); @@ -5999,8 +6042,8 @@ GreatWorkSlotType CvCityCulture::GetSlotTypeFirstAvailableCultureBuilding() cons { int iCheapest = MAX_INT; GreatWorkSlotType eRtnValue = NO_GREAT_WORK_SLOT; - CvPlayer &kCityPlayer = GET_PLAYER(m_pCity->getOwner()); - std::vector allBuildingCount = kCityPlayer.GetTotalBuildingCount(); + CvPlayer &kPlayer = GET_PLAYER(m_pCity->getOwner()); + std::vector allBuildingCount = kPlayer.GetTotalBuildingCount(); for(int iBuildingClassLoop = 0; iBuildingClassLoop < GC.getNumBuildingClassInfos(); iBuildingClassLoop++) { @@ -6008,7 +6051,7 @@ GreatWorkSlotType CvCityCulture::GetSlotTypeFirstAvailableCultureBuilding() cons { continue; } - const CvCivilizationInfo& playerCivilizationInfo = kCityPlayer.getCivilizationInfo(); + const CvCivilizationInfo& playerCivilizationInfo = kPlayer.getCivilizationInfo(); BuildingTypes eBuilding = (BuildingTypes)playerCivilizationInfo.getCivilizationBuildings((BuildingClassTypes)iBuildingClassLoop); if (eBuilding != NO_BUILDING) { @@ -6037,6 +6080,7 @@ GreatWorkSlotType CvCityCulture::GetSlotTypeFirstAvailableCultureBuilding() cons #if defined(MOD_BALANCE_CORE) void CvCityCulture::CalculateBaseTourismBeforeModifiers() { + CvPlayer &kPlayer = GET_PLAYER(m_pCity->getOwner()); // If we're in Resistance, then no Tourism! if(m_pCity->IsResistance() || m_pCity->IsRazing() || m_pCity->GetNoTourismTurns() > 0) { @@ -6045,8 +6089,8 @@ void CvCityCulture::CalculateBaseTourismBeforeModifiers() } // Ignore those Great Works in storage (ie not generating a yield) - int iBase = GetNumGreatWorks(false) * (/*2 in CP, 3 in VP*/ GD_INT_GET(BASE_TOURISM_PER_GREAT_WORK) + GET_PLAYER(m_pCity->getOwner()).GetGreatWorkYieldChange(YIELD_TOURISM)); - int iBonus = ((m_pCity->GetCityBuildings()->GetGreatWorksTourismModifier() + GET_PLAYER(m_pCity->getOwner()).GetGreatWorksTourismModifierGlobal()) * iBase / 100); + int iBase = GetNumGreatWorks(false) * (/*2 in CP, 3 in VP*/ GD_INT_GET(BASE_TOURISM_PER_GREAT_WORK) + kPlayer.GetGreatWorkYieldChange(YIELD_TOURISM)); + int iBonus = ((m_pCity->GetCityBuildings()->GetGreatWorksTourismModifier() + kPlayer.GetGreatWorksTourismModifierGlobal()) * iBase / 100); iBase += iBonus; iBase += m_pCity->GetCityBuildings()->GetCurrentThemingBonuses(YIELD_CULTURE); @@ -6054,11 +6098,11 @@ void CvCityCulture::CalculateBaseTourismBeforeModifiers() // Add in all the tourism from yields iBase += m_pCity->getYieldRate(YIELD_TOURISM, false); - if(GET_PLAYER(m_pCity->getOwner()).isGoldenAge()) + if(kPlayer.isGoldenAge()) { if(m_pCity->isCapital()) { - int iPercent = GET_PLAYER(m_pCity->getOwner()).GetPlayerTraits()->GetTourismGABonus(); + int iPercent = kPlayer.GetPlayerTraits()->GetTourismGABonus(); if(iPercent != 0) { int iCulture = m_pCity->getJONSCulturePerTurn(); @@ -6067,7 +6111,7 @@ void CvCityCulture::CalculateBaseTourismBeforeModifiers() } } - int iPercent = m_pCity->GetCityBuildings()->GetLandmarksTourismPercent() + GET_PLAYER(m_pCity->getOwner()).GetLandmarksTourismPercentGlobal(); + int iPercent = m_pCity->GetCityBuildings()->GetLandmarksTourismPercent() + kPlayer.GetLandmarksTourismPercentGlobal(); if (iPercent != 0) { int iFromWonders = GetCultureFromWonders(); @@ -6180,37 +6224,35 @@ void CvCityCulture::CalculateBaseTourism() #endif /// What is the tourism modifier for one player -int CvCityCulture::GetTourismMultiplier(PlayerTypes ePlayer, bool bIgnoreReligion, bool bIgnoreOpenBorders, bool bIgnoreTrade, bool bIgnorePolicies, bool bIgnoreIdeologies) const +int CvCityCulture::GetTourismMultiplier(PlayerTypes eTargetPlayer, bool bIgnoreReligion, bool bIgnoreOpenBorders, bool bIgnoreTrade, bool bIgnorePolicies, bool bIgnoreIdeologies) const { int iMultiplier = 0; - if(ePlayer == NO_PLAYER || m_pCity->getOwner() == NO_PLAYER) + if(eTargetPlayer == NO_PLAYER || m_pCity->getOwner() == NO_PLAYER) return 0; - CvPlayer &kPlayer = GET_PLAYER(ePlayer); - - CvTeam &kTeam = GET_TEAM(kPlayer.getTeam()); + + CvPlayer &kTargetPlayer = GET_PLAYER(eTargetPlayer); + CvTeam &kTargetTeam = GET_TEAM(kTargetPlayer.getTeam()); + CvPlayer &kCityPlayer = GET_PLAYER(m_pCity->getOwner()); + CvTeam &kCityTeam = GET_TEAM(kCityPlayer.getTeam()); if(kCityPlayer.isMinorCiv()) return 0; PolicyBranchTypes eMyIdeology = kCityPlayer.GetPlayerPolicies()->GetLateGamePolicyTree(); - PolicyBranchTypes eTheirIdeology = kPlayer.GetPlayerPolicies()->GetLateGamePolicyTree(); + PolicyBranchTypes eTheirIdeology = kTargetPlayer.GetPlayerPolicies()->GetLateGamePolicyTree(); if (!bIgnoreReligion) { - // City shares religion with this player - ReligionTypes ePlayerReligion = kCityPlayer.GetReligions()->GetStateReligion(); - if (ePlayerReligion != NO_RELIGION && kPlayer.GetReligions()->GetStateReligion() == ePlayerReligion) - { - iMultiplier += kCityPlayer.GetCulture()->GetTourismModifierSharedReligion(); - } + // they share (at least some of) this player's religion + iMultiplier += kCityPlayer.GetCulture()->GetTourismModifierSharedReligion(eTargetPlayer); } if (!bIgnoreOpenBorders) { // Open borders with this player - if ((MOD_BALANCE_FLIPPED_TOURISM_MODIFIER_OPEN_BORDERS && GET_TEAM(kCityPlayer.getTeam()).IsAllowsOpenBordersToTeam(kTeam.GetID())) || - (!MOD_BALANCE_FLIPPED_TOURISM_MODIFIER_OPEN_BORDERS && kTeam.IsAllowsOpenBordersToTeam(kCityPlayer.getTeam()))) + if ((MOD_BALANCE_FLIPPED_TOURISM_MODIFIER_OPEN_BORDERS && kCityTeam.IsAllowsOpenBordersToTeam(kTargetTeam.GetID())) || + (!MOD_BALANCE_FLIPPED_TOURISM_MODIFIER_OPEN_BORDERS && kTargetTeam.IsAllowsOpenBordersToTeam(m_pCity->getTeam()))) { iMultiplier += kCityPlayer.GetCulture()->GetTourismModifierOpenBorders(); } @@ -6219,13 +6261,13 @@ int CvCityCulture::GetTourismMultiplier(PlayerTypes ePlayer, bool bIgnoreReligio if (!bIgnoreTrade) { // Trade route to one of this player's cities from here - if (GC.getGame().GetGameTrade()->IsPlayerConnectedToPlayer(m_pCity->getOwner(), ePlayer)) + if (GC.getGame().GetGameTrade()->IsPlayerConnectedToPlayer(m_pCity->getOwner(), eTargetPlayer)) { iMultiplier += kCityPlayer.GetCulture()->GetTourismModifierTradeRoute(); } - if (GET_PLAYER(ePlayer).isMajorCiv() && GET_PLAYER(ePlayer).GetPlayerTraits()->IsNoOpenTrade()) + if (kCityPlayer.isMajorCiv() && kCityPlayer.GetPlayerTraits()->IsNoOpenTrade()) { - if (!GC.getGame().GetGameTrade()->IsPlayerConnectedToPlayer(ePlayer, m_pCity->getOwner(), true)) + if (!GC.getGame().GetGameTrade()->IsPlayerConnectedToPlayer(eTargetPlayer, m_pCity->getOwner(), true)) { iMultiplier += /*-34 in CP, -10 in VP*/ GD_INT_GET(TOURISM_MODIFIER_DIFFERENT_IDEOLOGIES); } @@ -6238,9 +6280,9 @@ int CvCityCulture::GetTourismMultiplier(PlayerTypes ePlayer, bool bIgnoreReligio { iMultiplier += /*-34 in CP, -10 in VP*/ GD_INT_GET(TOURISM_MODIFIER_DIFFERENT_IDEOLOGIES); - if (!MOD_BALANCE_CORE && kCityPlayer.GetEspionage()->IsMyDiplomatVisitingThem(ePlayer)) + if (!MOD_BALANCE_CORE && kCityPlayer.GetEspionage()->IsMyDiplomatVisitingThem(eTargetPlayer)) { - iMultiplier += /*25 in CP, 10 in VP*/ GD_INT_GET(TOURISM_MODIFIER_DIPLOMAT); + iMultiplier += /*25 in CP, 20 in VP*/ GD_INT_GET(TOURISM_MODIFIER_DIPLOMAT); } } } @@ -6249,7 +6291,7 @@ int CvCityCulture::GetTourismMultiplier(PlayerTypes ePlayer, bool bIgnoreReligio int iLessHappyMod = kCityPlayer.GetPlayerPolicies()->GetNumericModifier(POLICYMOD_TOURISM_MOD_LESS_HAPPY); if (iLessHappyMod != 0) { - if (kCityPlayer.GetExcessHappiness() > kPlayer.GetExcessHappiness()) + if (kCityPlayer.GetExcessHappiness() > kTargetPlayer.GetExcessHappiness()) { iMultiplier += iLessHappyMod; } @@ -6262,10 +6304,10 @@ int CvCityCulture::GetTourismMultiplier(PlayerTypes ePlayer, bool bIgnoreReligio { eLoopPlayer = (PlayerTypes) iPlayerLoop; - if(eLoopPlayer != ePlayer && eLoopPlayer != m_pCity->getOwner() && kCityPlayer.GetDiplomacyAI()->IsPlayerValid(eLoopPlayer)) + if(eLoopPlayer != eTargetPlayer && eLoopPlayer != m_pCity->getOwner() && kCityPlayer.GetDiplomacyAI()->IsPlayerValid(eLoopPlayer)) { // Are they at war with me too? - if (GET_TEAM(kCityPlayer.getTeam()).isAtWar(GET_PLAYER(eLoopPlayer).getTeam()) && GET_TEAM(kPlayer.getTeam()).isAtWar(GET_PLAYER(eLoopPlayer).getTeam())) + if (kCityTeam.isAtWar(GET_PLAYER(eLoopPlayer).getTeam()) && kTargetTeam.isAtWar(GET_PLAYER(eLoopPlayer).getTeam())) { iMultiplier += iCommonFoeMod; break; @@ -6282,17 +6324,17 @@ int CvCityCulture::GetTourismMultiplier(PlayerTypes ePlayer, bool bIgnoreReligio } } } -#if defined(MOD_BALANCE_CORE) + if(MOD_BALANCE_CORE) { - if (kCityPlayer.GetEspionage() && kCityPlayer.GetEspionage()->IsMyDiplomatVisitingThem(ePlayer)) + if (kCityPlayer.GetEspionage() && kCityPlayer.GetEspionage()->IsMyDiplomatVisitingThem(eTargetPlayer)) { - iMultiplier += /*25 in CP, 10 in VP*/ GD_INT_GET(TOURISM_MODIFIER_DIPLOMAT); + iMultiplier += /*25 in CP, 20 in VP*/ GD_INT_GET(TOURISM_MODIFIER_DIPLOMAT); } } if (MOD_BALANCE_VP) { - int iBoredom = kPlayer.GetCulture()->GetBoredomCache(); + int iBoredom = kTargetPlayer.GetCulture()->GetBoredomCache(); int iDelta = iBoredom - kCityPlayer.GetCulture()->GetBoredomCache(); if (iDelta > 0) { @@ -6301,9 +6343,9 @@ int CvCityCulture::GetTourismMultiplier(PlayerTypes ePlayer, bool bIgnoreReligio } //Corporations - iMultiplier += kCityPlayer.GetCulture()->GetFranchiseModifier(ePlayer); + iMultiplier += kCityPlayer.GetCulture()->GetFranchiseModifier(eTargetPlayer); - if (kCityPlayer.getTourismBonusTurnsPlayer(ePlayer) > 0) + if (kCityPlayer.getTourismBonusTurnsPlayer(eTargetPlayer) > 0) { iMultiplier += /*200 in CP, 100 in VP*/ GD_INT_GET(TEMPORARY_TOURISM_BOOST_MOD) * 2; } @@ -6330,13 +6372,13 @@ int CvCityCulture::GetTourismMultiplier(PlayerTypes ePlayer, bool bIgnoreReligio } } // My vassal - if (GET_TEAM(GET_PLAYER(ePlayer).getTeam()).GetMaster() == kCityPlayer.getTeam()) + if (kTargetTeam.GetMaster() == kCityPlayer.getTeam()) { iMultiplier += kCityPlayer.GetCulture()->GetTourismModifierVassal(); } - //city difference - do we have more than them? - int iNumCities = kCityPlayer.GetNumEffectiveCities() - kPlayer.GetNumEffectiveCities(); + // City difference - do we have more than them? + int iNumCities = kCityPlayer.GetNumEffectiveCities() - kTargetPlayer.GetNumEffectiveCities(); if (iNumCities > 0) { // Mod for City Count @@ -6347,7 +6389,6 @@ int CvCityCulture::GetTourismMultiplier(PlayerTypes ePlayer, bool bIgnoreReligio iMultiplier -= iMod; } -#endif // LATER add top science city and research agreement with this player??? return max(-100, iMultiplier); @@ -6358,18 +6399,11 @@ CvString CvCityCulture::GetTourismTooltip() { CvString szRtnValue = ""; CvString szTemp; - CvString sharedReligionCivs = ""; - CvString openBordersCivs = ""; - CvString tradeRouteCivs = ""; - CvString lessHappyCivs = ""; - CvString commonFoeCivs = ""; - CvString sharedIdeologyCivs = ""; - CvString differentIdeologyCivs = ""; CvPlayer &kCityPlayer = GET_PLAYER(m_pCity->getOwner()); // Great Works // Ignore those Great Works in storage, ie not generating a yield int iGWTourism = GetNumGreatWorks(false) * (/*2 in CP, 3 in VP*/ GD_INT_GET(BASE_TOURISM_PER_GREAT_WORK) + kCityPlayer.GetGreatWorkYieldChange(YIELD_TOURISM)); - iGWTourism += ((m_pCity->GetCityBuildings()->GetGreatWorksTourismModifier() + +GET_PLAYER(m_pCity->getOwner()).GetGreatWorksTourismModifierGlobal()) * iGWTourism / 100); + iGWTourism += ((m_pCity->GetCityBuildings()->GetGreatWorksTourismModifier() + kCityPlayer.GetGreatWorksTourismModifierGlobal()) * iGWTourism / 100); szRtnValue = GetLocalizedText("TXT_KEY_CO_CITY_TOURISM_GREAT_WORKS", iGWTourism, m_pCity->GetCityCulture()->GetNumGreatWorks()); int iThemingBonuses = m_pCity->GetCityBuildings()->GetCurrentThemingBonuses(YIELD_CULTURE); @@ -6388,7 +6422,7 @@ CvString CvCityCulture::GetTourismTooltip() // Landmarks, Wonders, Natural Wonders, Improvements int iTileTourism = 0; - int iPercent = m_pCity->GetCityBuildings()->GetLandmarksTourismPercent() + GET_PLAYER(m_pCity->getOwner()).GetLandmarksTourismPercentGlobal(); + int iPercent = m_pCity->GetCityBuildings()->GetLandmarksTourismPercent() + kCityPlayer.GetLandmarksTourismPercentGlobal(); if (iPercent != 0) { int iFromWonders = GetCultureFromWonders(); @@ -6402,11 +6436,11 @@ CvString CvCityCulture::GetTourismTooltip() szRtnValue += GetLocalizedText("TXT_KEY_CO_CITY_TOURISM_TILES", iTileTourism, iPercent); } #if defined(MOD_BALANCE_CORE) - if(m_pCity->isCapital() && GET_PLAYER(m_pCity->getOwner()).isGoldenAge()) + if(m_pCity->isCapital() && kCityPlayer.isGoldenAge()) { // Landmarks, Wonders, Natural Wonders, Improvements int iGATourism = 0; - int iPercent = GET_PLAYER(m_pCity->getOwner()).GetPlayerTraits()->GetTourismGABonus(); + int iPercent = kCityPlayer.GetPlayerTraits()->GetTourismGABonus(); if (iPercent != 0) { int iCulture = m_pCity->getJONSCulturePerTurn(); @@ -6609,7 +6643,7 @@ CvString CvCityCulture::GetTourismTooltip() } } - iTempMod = GET_PLAYER(m_pCity->getOwner()).getYieldRateModifier(YIELD_TOURISM); + iTempMod = kCityPlayer.getYieldRateModifier(YIELD_TOURISM); if (iTempMod != 0) { if (!bHasCityModTooltip) @@ -6625,7 +6659,7 @@ CvString CvCityCulture::GetTourismTooltip() if (m_pCity->isCapital()) { - iTempMod = GET_PLAYER(m_pCity->getOwner()).getCapitalYieldRateModifier(YIELD_TOURISM); + iTempMod = kCityPlayer.getCapitalYieldRateModifier(YIELD_TOURISM); if (iTempMod != 0) { if (!bHasCityModTooltip) @@ -6711,7 +6745,7 @@ CvString CvCityCulture::GetTourismTooltip() szRtnValue += GetLocalizedText("TXT_KEY_YIELD_MODIFIER_DEVELOPMENT", iTempMod); } - iTempMod = min(20, (GET_PLAYER(m_pCity->getOwner()).getYieldModifierFromGreatWorks(YIELD_TOURISM) * m_pCity->GetCityBuildings()->GetNumGreatWorks())); + iTempMod = min(20, (kCityPlayer.getYieldModifierFromGreatWorks(YIELD_TOURISM) * m_pCity->GetCityBuildings()->GetNumGreatWorks())); if (iTempMod != 0) { if (!bHasCityModTooltip) @@ -6724,7 +6758,7 @@ CvString CvCityCulture::GetTourismTooltip() } szRtnValue += GetLocalizedText("TXT_KEY_PRODMOD_GREAT_WORKS", iTempMod); } - iTempMod = min(30, (GET_PLAYER(m_pCity->getOwner()).getYieldModifierFromActiveSpies(YIELD_TOURISM) * GET_PLAYER(m_pCity->getOwner()).GetSpyPoints(true) / 100)); + iTempMod = min(30, (kCityPlayer.getYieldModifierFromActiveSpies(YIELD_TOURISM) * kCityPlayer.GetSpyPoints(true) / 100)); if (iTempMod != 0) { if (!bHasCityModTooltip) @@ -6740,7 +6774,7 @@ CvString CvCityCulture::GetTourismTooltip() #endif // Golden Age Yield Modifier - if (GET_PLAYER(m_pCity->getOwner()).isGoldenAge()) + if (kCityPlayer.isGoldenAge()) { CvYieldInfo* pYield = GC.getYieldInfo(YIELD_TOURISM); if (pYield) @@ -6774,7 +6808,7 @@ CvString CvCityCulture::GetTourismTooltip() szRtnValue += GetLocalizedText("TXT_KEY_PRODMOD_YIELD_GOLDEN_AGE_BUILDINGS", iTempMod); } - iTempMod = GET_PLAYER(m_pCity->getOwner()).getGoldenAgeYieldMod(YIELD_TOURISM); + iTempMod = kCityPlayer.getGoldenAgeYieldMod(YIELD_TOURISM); if (iTempMod != 0) { if (!bHasCityModTooltip) @@ -6794,7 +6828,7 @@ CvString CvCityCulture::GetTourismTooltip() if (pReligion) { int max = 0; - int iReligionYieldMaxFollowersPercent = pReligion->m_Beliefs.GetMaxYieldModifierPerFollowerPercent(max, YIELD_TOURISM, m_pCity->getOwner(), GET_PLAYER(m_pCity->getOwner()).getCity(m_pCity->GetID())); + int iReligionYieldMaxFollowersPercent = pReligion->m_Beliefs.GetMaxYieldModifierPerFollowerPercent(max, YIELD_TOURISM, m_pCity->getOwner(), kCityPlayer.getCity(m_pCity->GetID())); if (iReligionYieldMaxFollowersPercent > 0) { int iVal = m_pCity->GetCityReligions()->GetNumFollowers(eMajority) * iReligionYieldMaxFollowersPercent; @@ -6819,7 +6853,7 @@ CvString CvCityCulture::GetTourismTooltip() } else { - int iReligionYieldMaxFollowers = pReligion->m_Beliefs.GetMaxYieldModifierPerFollower(YIELD_TOURISM, m_pCity->getOwner(), GET_PLAYER(m_pCity->getOwner()).getCity(m_pCity->GetID())); + int iReligionYieldMaxFollowers = pReligion->m_Beliefs.GetMaxYieldModifierPerFollower(YIELD_TOURISM, m_pCity->getOwner(), kCityPlayer.getCity(m_pCity->GetID())); if (iReligionYieldMaxFollowers > 0) { int iFollowers = m_pCity->GetCityReligions()->GetNumFollowers(eMajority); @@ -6844,10 +6878,10 @@ CvString CvCityCulture::GetTourismTooltip() if (MOD_BALANCE_CORE_RESOURCE_MONOPOLIES) { // Do we get increased yields from a resource monopoly? - int iTempMod = GET_PLAYER(m_pCity->getOwner()).getCityYieldModFromMonopoly(YIELD_TOURISM); + int iTempMod = kCityPlayer.getCityYieldModFromMonopoly(YIELD_TOURISM); if (iTempMod != 0) { - iTempMod += GET_PLAYER(m_pCity->getOwner()).GetMonopolyModPercent(); + iTempMod += kCityPlayer.GetMonopolyModPercent(); if (!bHasCityModTooltip) { if (!szRtnValue.empty()) @@ -6861,16 +6895,16 @@ CvString CvCityCulture::GetTourismTooltip() } #endif - ReligionTypes eStateReligion = GET_PLAYER(m_pCity->getOwner()).GetReligions()->GetStateReligion(); + ReligionTypes eStateReligion = kCityPlayer.GetReligions()->GetStateReligion(); if (MOD_BALANCE_CORE_BELIEFS && eStateReligion != NO_RELIGION) { const CvReligion* pReligion = GC.getGame().GetGameReligions()->GetReligion(eStateReligion, m_pCity->getOwner()); if (pReligion) { - int iGoldenAge = pReligion->m_Beliefs.GetYieldBonusGoldenAge(YIELD_TOURISM, m_pCity->getOwner(), GET_PLAYER(m_pCity->getOwner()).getCity(m_pCity->GetID()), true); + int iGoldenAge = pReligion->m_Beliefs.GetYieldBonusGoldenAge(YIELD_TOURISM, m_pCity->getOwner(), kCityPlayer.getCity(m_pCity->GetID()), true); if (iGoldenAge > 0) { - if (GET_PLAYER(m_pCity->getOwner()).getGoldenAgeTurns() > 0) + if (kCityPlayer.getGoldenAgeTurns() > 0) { iTempMod = iGoldenAge; if (iTempMod != 0) @@ -6887,7 +6921,7 @@ CvString CvCityCulture::GetTourismTooltip() } } } - int iWLTKD = pReligion->m_Beliefs.GetYieldFromWLTKD(YIELD_TOURISM, m_pCity->getOwner(), GET_PLAYER(m_pCity->getOwner()).getCity(m_pCity->GetID())); + int iWLTKD = pReligion->m_Beliefs.GetYieldFromWLTKD(YIELD_TOURISM, m_pCity->getOwner(), kCityPlayer.getCity(m_pCity->GetID())); if (iWLTKD != 0) { if (m_pCity->GetWeLoveTheKingDayCounter() > 0) @@ -6911,7 +6945,7 @@ CvString CvCityCulture::GetTourismTooltip() } if (m_pCity->GetWeLoveTheKingDayCounter() > 0) { - iTempMod = (m_pCity->GetYieldFromWLTKD(YIELD_TOURISM) + GET_PLAYER(m_pCity->getOwner()).GetYieldFromWLTKD(YIELD_TOURISM)); + iTempMod = (m_pCity->GetYieldFromWLTKD(YIELD_TOURISM) + kCityPlayer.GetYieldFromWLTKD(YIELD_TOURISM)); if (iTempMod != 0) { if (!bHasCityModTooltip) @@ -6928,8 +6962,8 @@ CvString CvCityCulture::GetTourismTooltip() if (m_pCity->IsPuppet()) { - iTempMod = GET_PLAYER(m_pCity->getOwner()).GetPuppetYieldPenaltyMod() + GET_PLAYER(m_pCity->getOwner()).GetPlayerTraits()->GetPuppetPenaltyReduction() + /*0 in CP, -80 in VP*/ GD_INT_GET(PUPPET_TOURISM_MODIFIER); - if (GET_PLAYER(m_pCity->getOwner()).GetPlayerTraits()->GetPuppetPenaltyReduction() != 0 && iTempMod > 0) + iTempMod = kCityPlayer.GetPuppetYieldPenaltyMod() + kCityPlayer.GetPlayerTraits()->GetPuppetPenaltyReduction() + /*0 in CP, -80 in VP*/ GD_INT_GET(PUPPET_TOURISM_MODIFIER); + if (kCityPlayer.GetPlayerTraits()->GetPuppetPenaltyReduction() != 0 && iTempMod > 0) iTempMod = 0; if (!bHasCityModTooltip) { @@ -7121,7 +7155,7 @@ CvString CvCityCulture::GetThemingTooltip(BuildingClassTypes eBuildingClass) con if (work.m_ePlayer > -1 && work.m_eEra > -1) { CvString szEraString = GC.getEraInfo(work.m_eEra)->getShortDesc(); - CvString szCivAdj = GET_PLAYER(m_pCity->getOwner()).getCivilizationAdjectiveKey(); + CvString szCivAdj = kPlayer.getCivilizationAdjectiveKey(); switch (iIndex) { case 0: diff --git a/CvGameCoreDLL_Expansion2/CvCultureClasses.h b/CvGameCoreDLL_Expansion2/CvCultureClasses.h index e08c736110..debdb8452b 100644 --- a/CvGameCoreDLL_Expansion2/CvCultureClasses.h +++ b/CvGameCoreDLL_Expansion2/CvCultureClasses.h @@ -275,8 +275,8 @@ class CvPlayerCulture CvString GetInfluenceSpyRankTooltip (const CvString& szName, const CvString& szRank, PlayerTypes ePlayer); int GetTourism(); int GetTourismModifierWith(PlayerTypes ePlayer) const; - CvString GetTourismModifierWithTooltip(PlayerTypes ePlayer) const; - int GetTourismModifierSharedReligion() const; + CvString GetTourismModifierWithTooltip(PlayerTypes eTargetPlayer) const; + int GetTourismModifierSharedReligion(PlayerTypes eTargetPlayer) const; int GetTourismModifierTradeRoute() const; int GetTourismModifierOpenBorders() const; int GetFranchiseModifier(PlayerTypes ePlayer, bool bJustCheckOne = false) const; @@ -382,7 +382,7 @@ class CvCityCulture void CalculateBaseTourism(); #endif - int GetTourismMultiplier(PlayerTypes ePlayer, bool bIgnoreReligion, bool bIgnoreOpenBorders, bool bIgnoreTrade, bool bIgnorePolicies, bool bIgnoreIdeologies) const; + int GetTourismMultiplier(PlayerTypes eTargetPlayer, bool bIgnoreReligion, bool bIgnoreOpenBorders, bool bIgnoreTrade, bool bIgnorePolicies, bool bIgnoreIdeologies) const; CvString GetTourismTooltip(); CvString GetFilledSlotsTooltip(); diff --git a/CvGameCoreDLL_Expansion2/CvGlobals.cpp b/CvGameCoreDLL_Expansion2/CvGlobals.cpp index 71fdf4a18d..bb9d0b769a 100644 --- a/CvGameCoreDLL_Expansion2/CvGlobals.cpp +++ b/CvGameCoreDLL_Expansion2/CvGlobals.cpp @@ -2182,6 +2182,8 @@ CvGlobals::CvGlobals() : GD_INT_INIT(BASE_CULTURE_PER_GREAT_WORK, 2), GD_INT_INIT(BASE_TOURISM_PER_GREAT_WORK, 2), GD_INT_INIT(TOURISM_MODIFIER_SHARED_RELIGION, 25), + GD_INT_INIT(TOURISM_MODIFIER_SHARED_RELIGION_MAX, 0), + GD_INT_INIT(TOURISM_MODIFIER_SHARED_RELIGION_TYPE, 0), GD_INT_INIT(TOURISM_MODIFIER_TRADE_ROUTE, 25), GD_INT_INIT(TOURISM_MODIFIER_OPEN_BORDERS, 25), GD_INT_INIT(TOURISM_MODIFIER_DIFFERENT_IDEOLOGIES, -34), @@ -7010,6 +7012,8 @@ void CvGlobals::cacheGlobals() GD_INT_CACHE(BASE_CULTURE_PER_GREAT_WORK); GD_INT_CACHE(BASE_TOURISM_PER_GREAT_WORK); GD_INT_CACHE(TOURISM_MODIFIER_SHARED_RELIGION); + GD_INT_CACHE(TOURISM_MODIFIER_SHARED_RELIGION_MAX); + GD_INT_CACHE(TOURISM_MODIFIER_SHARED_RELIGION_TYPE); GD_INT_CACHE(TOURISM_MODIFIER_TRADE_ROUTE); GD_INT_CACHE(TOURISM_MODIFIER_OPEN_BORDERS); GD_INT_CACHE(TOURISM_MODIFIER_DIFFERENT_IDEOLOGIES); diff --git a/CvGameCoreDLL_Expansion2/CvGlobals.h b/CvGameCoreDLL_Expansion2/CvGlobals.h index b5bb92f208..1e767e61ef 100644 --- a/CvGameCoreDLL_Expansion2/CvGlobals.h +++ b/CvGameCoreDLL_Expansion2/CvGlobals.h @@ -2773,6 +2773,8 @@ class CvGlobals GD_INT_MEMBER(BASE_CULTURE_PER_GREAT_WORK); GD_INT_MEMBER(BASE_TOURISM_PER_GREAT_WORK); GD_INT_MEMBER(TOURISM_MODIFIER_SHARED_RELIGION); + GD_INT_MEMBER(TOURISM_MODIFIER_SHARED_RELIGION_MAX); + GD_INT_MEMBER(TOURISM_MODIFIER_SHARED_RELIGION_TYPE); GD_INT_MEMBER(TOURISM_MODIFIER_TRADE_ROUTE); GD_INT_MEMBER(TOURISM_MODIFIER_OPEN_BORDERS); GD_INT_MEMBER(TOURISM_MODIFIER_DIFFERENT_IDEOLOGIES); diff --git a/CvGameCoreDLL_Expansion2/CvReligionClasses.cpp b/CvGameCoreDLL_Expansion2/CvReligionClasses.cpp index 248bf8f524..2601a64c7f 100644 --- a/CvGameCoreDLL_Expansion2/CvReligionClasses.cpp +++ b/CvGameCoreDLL_Expansion2/CvReligionClasses.cpp @@ -2109,7 +2109,7 @@ bool CvGameReligions::IsPantheonBeliefAvailable(BeliefTypes eBelief, PlayerTypes return false; } -/// Number of followers of this religion +/// Number of followers of this religion (include ePlayer for followers in just that player's cities, although I think this duplicates GetNumDomesticFollowers()) int CvGameReligions::GetNumFollowers(ReligionTypes eReligion, PlayerTypes ePlayer) const { int iRtnValue = 0;