Skip to content

Commit

Permalink
cleanup (#10880)
Browse files Browse the repository at this point in the history
remove all references to Prize Rules - modmodders beware
fix Songhai still having river connections (now its trait is entirely vanilla, ironically enough)
sweep pantheon text
- always put Faith first
- standardization: "your" Capital/Holy City, "the" City, "the" Palace
- remove "scaling with game speed" as all instant yields from pantheons already do
- remove "in the City", "in every City" etc. unless there's a need to explicitly use the phrase (e.g. Ancestor Worship)
- separate "from the Palace" and "in your Capital/Holy City" - they're different after founding
- UNSURE: which/whose units FriendlyHealChange affect - the DLL code is so weird
  • Loading branch information
azum4roll authored May 21, 2024
1 parent 8b690c7 commit 30b6008
Show file tree
Hide file tree
Showing 37 changed files with 124 additions and 178 deletions.
13 changes: 6 additions & 7 deletions (2) Vox Populi/Database Changes/AI/LeaderFlavorSweeps.sql
Original file line number Diff line number Diff line change
Expand Up @@ -387,21 +387,20 @@ UPDATE Leader_Flavors SET Flavor = 8 WHERE FlavorType = 'FLAVOR_DIPLOMACY' AND L

UPDATE Leader_Flavors SET Flavor = 6 WHERE FlavorType = 'FLAVOR_MILITARY_TRAINING' AND LeaderType = 'LEADER_ISABELLA'; -- 5, primary: dom
UPDATE Leader_Flavors SET Flavor = 7 WHERE FlavorType = 'FLAVOR_OFFENSE' AND LeaderType = 'LEADER_ISABELLA'; -- 5, primary: dom
UPDATE Leader_Flavors SET Flavor = 4 WHERE FlavorType = 'FLAVOR_DEFENSE' AND LeaderType = 'LEADER_ISABELLA'; -- 9, primary: dom
UPDATE Leader_Flavors SET Flavor = 9 WHERE FlavorType = 'FLAVOR_TILE_IMPROVEMENT' AND LeaderType = 'LEADER_ISABELLA'; -- 7, UI
UPDATE Leader_Flavors SET Flavor = 4 WHERE FlavorType = 'FLAVOR_DEFENSE' AND LeaderType = 'LEADER_ISABELLA'; -- 8, primary: dom
UPDATE Leader_Flavors SET Flavor = 5 WHERE FlavorType = 'FLAVOR_MOBILE' AND LeaderType = 'LEADER_ISABELLA'; -- 7, UU is a pseudo mounted
UPDATE Leader_Flavors SET Flavor = 8 WHERE FlavorType = 'FLAVOR_NAVAL' AND LeaderType = 'LEADER_ISABELLA'; -- 4, UA, loves overseas expansion
UPDATE Leader_Flavors SET Flavor = 8 WHERE FlavorType = 'FLAVOR_NAVAL_RECON' AND LeaderType = 'LEADER_ISABELLA'; -- 4, loves overseas expansion
UPDATE Leader_Flavors SET Flavor = 5 WHERE FlavorType = 'FLAVOR_NUKE' AND LeaderType = 'LEADER_ISABELLA'; -- 9, primary: dom
UPDATE Leader_Flavors SET Flavor = 5 WHERE FlavorType = 'FLAVOR_USE_NUKE' AND LeaderType = 'LEADER_ISABELLA'; -- 9, primary: dom
UPDATE Leader_Flavors SET Flavor = 5 WHERE FlavorType = 'FLAVOR_AIR_CARRIER' AND LeaderType = 'LEADER_ISABELLA'; -- 5, naval
UPDATE Leader_Flavors SET Flavor = 8 WHERE FlavorType = 'FLAVOR_NAVAL' AND LeaderType = 'LEADER_ISABELLA'; -- 5, UA, loves overseas expansion
UPDATE Leader_Flavors SET Flavor = 5 WHERE FlavorType = 'FLAVOR_AIR_CARRIER' AND LeaderType = 'LEADER_ISABELLA'; -- 4, naval
UPDATE Leader_Flavors SET Flavor = 5 WHERE FlavorType = 'FLAVOR_USE_NUKE' AND LeaderType = 'LEADER_ISABELLA'; -- 4, primary: dom
UPDATE Leader_Flavors SET Flavor = 5 WHERE FlavorType = 'FLAVOR_NUKE' AND LeaderType = 'LEADER_ISABELLA'; -- 4, primary: dom
UPDATE Leader_Flavors SET Flavor = 5 WHERE FlavorType = 'FLAVOR_GROWTH' AND LeaderType = 'LEADER_ISABELLA'; -- 7, primary: dom
UPDATE Leader_Flavors SET Flavor = 9 WHERE FlavorType = 'FLAVOR_GOLD' AND LeaderType = 'LEADER_ISABELLA'; -- 7, UA
UPDATE Leader_Flavors SET Flavor = 5 WHERE FlavorType = 'FLAVOR_SCIENCE' AND LeaderType = 'LEADER_ISABELLA'; -- 7, primary: dom
UPDATE Leader_Flavors SET Flavor = 3 WHERE FlavorType = 'FLAVOR_SPACESHIP' AND LeaderType = 'LEADER_ISABELLA'; -- 5, primary: dom
UPDATE Leader_Flavors SET Flavor = 3 WHERE FlavorType = 'FLAVOR_ESPIONAGE' AND LeaderType = 'LEADER_ISABELLA'; -- 5, passive
UPDATE Leader_Flavors SET Flavor = 9 WHERE FlavorType = 'FLAVOR_RELIGION' AND LeaderType = 'LEADER_ISABELLA'; -- 6, UA
UPDATE Leader_Flavors SET Flavor = 5 WHERE FlavorType = 'FLAVOR_HAPPINESS' AND LeaderType = 'LEADER_ISABELLA'; -- 8, naval
UPDATE Leader_Flavors SET Flavor = 9 WHERE FlavorType = 'FLAVOR_TILE_IMPROVEMENT' AND LeaderType = 'LEADER_ISABELLA'; -- 7, UI
UPDATE Leader_Flavors SET Flavor = 7 WHERE FlavorType = 'FLAVOR_I_SEA_TRADE_ROUTE' AND LeaderType = 'LEADER_ISABELLA'; -- 5, naval
UPDATE Leader_Flavors SET Flavor = 4 WHERE FlavorType = 'FLAVOR_WONDER' AND LeaderType = 'LEADER_ISABELLA'; -- 5, primary: dom

Expand Down
8 changes: 4 additions & 4 deletions (2) Vox Populi/Database Changes/AI/PolicyFlavorSweeps.sql
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ VALUES
('POLICY_WARRIOR_CODE', 'FLAVOR_HAPPINESS', 5),
('POLICY_DISCIPLINE', 'FLAVOR_PRODUCTION', 5),
('POLICY_DISCIPLINE', 'FLAVOR_GOLD', 5),
('POLICY_MILITARY_TRADITION', 'FLAVOR_SCIENCE', 5),
('POLICY_MILITARY_TRADITION', 'FLAVOR_OFFENSE', 5),
('POLICY_MILITARY_CASTE', 'FLAVOR_RANGED', 5),
('POLICY_MILITARY_CASTE', 'FLAVOR_EXPANSION', 5),
('POLICY_MILITARY_TRADITION', 'FLAVOR_MILITARY_TRAINING', 5),
('POLICY_MILITARY_TRADITION', 'FLAVOR_EXPANSION', 5),
('POLICY_MILITARY_CASTE', 'FLAVOR_MILITARY_TRAINING', 5),
('POLICY_MILITARY_CASTE', 'FLAVOR_OFFENSE', 5),
('POLICY_PROFESSIONAL_ARMY', 'FLAVOR_GOLD', 5),
('POLICY_PROFESSIONAL_ARMY', 'FLAVOR_PRODUCTION', 5),
('POLICY_HONOR_FINISHER', 'FLAVOR_OFFENSE', 50),
Expand Down
3 changes: 2 additions & 1 deletion (2) Vox Populi/Database Changes/AI/TechFlavorSweeps.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-- Notes on Format: Eras are separated by dashes, NO UNIQUES in comments since flavors are general. Please update the comments if any tech gets changed.

/*Flavors used here, somewhat grouped:
/*
Flavors used here, somewhat grouped:
Strategy: FLAVOR_EXPANSION, FLAVOR_WONDER, FLAVOR_CITY_DEFENSE, FLAVOR_ESPIONAGE, FLAVOR_SPACESHIP, FLAVOR_NAVAL_GROWTH, FLAVOR_DIPLOMACY
Yield: FLAVOR_GROWTH, FLAVOR_PRODUCTION, FLAVOR_SCIENCE, FLAVOR_GOLD, FLAVOR_RELIGION, FLAVOR_CULTURE,
FLAVOR_TILE_IMPROVEMENT, FLAVOR_NAVAL_TILE_IMPROVEMENT
Expand Down
2 changes: 1 addition & 1 deletion (2) Vox Populi/Database Changes/AI/UnitFlavorSweeps.sql
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ VALUES
('UNIT_POLYNESIAN_MAORI_WARRIOR', 'FLAVOR_OFFENSE', 10),
('UNIT_POLYNESIAN_MAORI_WARRIOR', 'FLAVOR_DEFENSE', 10),
('UNIT_POLYNESIAN_MAORI_WARRIOR', 'FLAVOR_RECON', 10),

-- Explorer
('UNIT_EXPLORER', 'FLAVOR_RECON', 12),

Expand Down
22 changes: 9 additions & 13 deletions (2) Vox Populi/Database Changes/Beliefs/PantheonChanges.sql
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ UPDATE Beliefs SET RequiresResource = 1 WHERE Type = 'BELIEF_SUN_GOD';
INSERT INTO Belief_ImprovementYieldChanges
(BeliefType, ImprovementType, YieldType, Yield)
VALUES
('BELIEF_SUN_GOD', 'IMPROVEMENT_FARM', 'YIELD_FAITH', 1),
('BELIEF_SUN_GOD', 'IMPROVEMENT_FARM', 'YIELD_FOOD', 1),
('BELIEF_SUN_GOD', 'IMPROVEMENT_FARM', 'YIELD_SCIENCE', 1),
('BELIEF_SUN_GOD', 'IMPROVEMENT_FARM', 'YIELD_FOOD', 1);
('BELIEF_SUN_GOD', 'IMPROVEMENT_FARM', 'YIELD_FAITH', 1);

INSERT INTO Belief_BuildingClassYieldChanges
(BeliefType, BuildingClassType, YieldType, YieldChange)
Expand Down Expand Up @@ -425,7 +425,7 @@ VALUES
INSERT INTO Belief_YieldPerBorderGrowth
(BeliefType, YieldType, Yield, IsEraScaling)
VALUES
('BELIEF_EPONA', 'YIELD_FOOD', 8, 1),
('BELIEF_EPONA', 'YIELD_FOOD', 8, 1),
('BELIEF_EPONA', 'YIELD_PRODUCTION', 8, 1),
('BELIEF_EPONA', 'YIELD_SCIENCE', 8, 1),
('BELIEF_EPONA', 'YIELD_CULTURE', 8, 1);
Expand Down Expand Up @@ -485,7 +485,6 @@ VALUES
('BELIEF_LUGH', 'YIELD_CULTURE', 2),
('BELIEF_LUGH', 'YIELD_TOURISM', 2);


-- Rhiannon, the Sovereign
INSERT INTO Belief_YieldPerFollowingCity
(BeliefType, YieldType, Yield)
Expand Down Expand Up @@ -570,13 +569,13 @@ WHERE Type = 'BELIEF_DAGDA';
INSERT INTO Belief_YieldPerBirth
(BeliefType, YieldType, Yield)
VALUES
('BELIEF_DAGDA', 'YIELD_GOLD', 12),
('BELIEF_DAGDA', 'YIELD_PRODUCTION', 12),
('BELIEF_DAGDA', 'YIELD_GOLD', 12),
('BELIEF_DAGDA', 'YIELD_CULTURE', 12);

-- Bran, the Sleeping Guardian
UPDATE Beliefs
SET
UPDATE Beliefs
SET
FriendlyHealChange = 10,
CityRangeStrikeModifier = 25
WHERE Type = 'BELIEF_BRAN';
Expand All @@ -599,6 +598,7 @@ VALUES

-- Cailleach, the Queen of Winter
UPDATE Beliefs SET RequiresResource = 1 WHERE Type = 'BELIEF_CAILLEACH';

-- Note: if you have the RequiresResources flag set, the Times100 table ignores it for tundra, but the YieldChanges table obeys it
INSERT INTO Belief_CityYieldPerXTerrainTimes100
(BeliefType, TerrainType, YieldType, Yield)
Expand All @@ -609,19 +609,15 @@ VALUES
INSERT INTO Belief_TerrainYieldChanges
(BeliefType, TerrainType, YieldType, Yield)
VALUES
('BELIEF_CAILLEACH', 'TERRAIN_SNOW', 'YIELD_FOOD', 1),
('BELIEF_CAILLEACH', 'TERRAIN_SNOW', 'YIELD_PRODUCTION', 1),
('BELIEF_CAILLEACH', 'TERRAIN_SNOW', 'YIELD_FOOD', 1),
('BELIEF_CAILLEACH', 'TERRAIN_SNOW', 'YIELD_PRODUCTION', 1),
('BELIEF_CAILLEACH', 'TERRAIN_SNOW', 'YIELD_SCIENCE', 1),
('BELIEF_CAILLEACH', 'TERRAIN_SNOW', 'YIELD_CULTURE', 1);


INSERT INTO Belief_ImprovementYieldChanges
(BeliefType, ImprovementType, YieldType, Yield)
VALUES
('BELIEF_CAILLEACH', 'IMPROVEMENT_QUARRY', 'YIELD_GOLD', 1),
('BELIEF_CAILLEACH', 'IMPROVEMENT_QUARRY', 'YIELD_CULTURE', 1),
('BELIEF_CAILLEACH', 'IMPROVEMENT_MINE', 'YIELD_GOLD', 1),
('BELIEF_CAILLEACH', 'IMPROVEMENT_MINE', 'YIELD_CULTURE', 1);



Original file line number Diff line number Diff line change
Expand Up @@ -1007,15 +1007,11 @@ FROM Buildings
WHERE BuildingClass = 'BUILDINGCLASS_HARBOR';

-- Seaport
UPDATE Buildings
SET
AllowsIndustrialWaterRoutes = 1
WHERE BuildingClass = 'BUILDINGCLASS_SEAPORT';

UPDATE Buildings
SET
PrereqTech = 'TECH_STEAM_POWER',
CitySupplyModifier = 20
CitySupplyModifier = 20,
AllowsIndustrialWaterRoutes = 1
WHERE BuildingClass = 'BUILDINGCLASS_SEAPORT';

INSERT INTO Helper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ UPDATE Buildings
SET
PolicyBranchType = NULL,
IlliteracyFlatReduction = 1,
MedianTechPercentChange = 0
MedianTechPercentChange = 0
WHERE Type = 'BUILDING_PORCELAIN_TOWER';

INSERT INTO Building_YieldChanges
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,6 @@ UPDATE Buildings
SET Cost = 800, GoldMaintenance = 4
WHERE Type = 'BUILDING_SKOLA';

-- Coaling Station
UPDATE Buildings
SET Cost = 1000, GoldMaintenance = 5
WHERE BuildingClass = 'BUILDINGCLASS_COALING_STATION';

-- Seaport
UPDATE Buildings
SET Cost = 1000, GoldMaintenance = 5
WHERE BuildingClass = 'BUILDINGCLASS_SEAPORT';

-- Museum, Military Academy
UPDATE Buildings
SET GoldMaintenance = 6
Expand Down
5 changes: 2 additions & 3 deletions (2) Vox Populi/Database Changes/Civilizations/Carthage.sql
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ INSERT INTO Civilization_BuildingClassOverrides
VALUES
('CIVILIZATION_CARTHAGE', 'BUILDINGCLASS_NATIONAL_TREASURY', 'BUILDING_GREAT_COTHON');

DELETE FROM Building_ClassesNeededInCity WHERE BuildingType = 'BUILDING_GREAT_COTHON';

UPDATE Buildings
SET
PrereqTech = 'TECH_CURRENCY',
Expand All @@ -53,9 +55,6 @@ SET
FreeBuilding = 'BUILDINGCLASS_HARBOR'
WHERE Type = 'BUILDING_GREAT_COTHON';

DELETE FROM Building_ClassesNeededInCity
WHERE BuildingType = 'BUILDING_GREAT_COTHON';

INSERT INTO Building_BuildingClassYieldChanges
(BuildingType, BuildingClassType, YieldType, YieldChange)
VALUES
Expand Down
1 change: 1 addition & 0 deletions (2) Vox Populi/Database Changes/Civilizations/Shoshone.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ VALUES
('TRAIT_GREAT_EXPANSE', 'TERRAIN_DESERT'),
('TRAIT_GREAT_EXPANSE', 'TERRAIN_TUNDRA'),
('TRAIT_GREAT_EXPANSE', 'TERRAIN_SNOW');

----------------------------------------------------------
-- Unique Unit: Comanche Riders (Cavalry)
----------------------------------------------------------
Expand Down
4 changes: 0 additions & 4 deletions (2) Vox Populi/Database Changes/Civilizations/Songhai.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
----------------------------------------------------------
-- Unique Ability: River Warlord
----------------------------------------------------------
UPDATE Traits
SET
RiverTradeRoad = 1
WHERE Type = 'TRAIT_AMPHIB_WARLORD';

----------------------------------------------------------
-- Unique Unit: Mandekalu Cavalry (Knight)
Expand Down
2 changes: 0 additions & 2 deletions (2) Vox Populi/Database Changes/Civilizations/Spain.sql
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ INSERT INTO Civilization_UnitClassOverrides
VALUES
('CIVILIZATION_SPAIN', 'UNITCLASS_INQUISITOR', 'UNIT_SPAIN_INQUISITOR');

UPDATE Units SET ShowInPedia = 0 WHERE Type = 'UNIT_SPAIN_INQUISITOR';

----------------------------------------------------------
-- Unique Unit: Conquistador (Explorer)
----------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ WHERE EXISTS (

DROP TABLE AncientDifficultyBonusAmounts;


-- +/- 1 or 2 to the final totals for Renaissance amounts to match Proposal (6-71)
CREATE TEMP TABLE RenaissanceDifficultyBonusAmounts (
HandicapTypeTemp text,
Expand Down
4 changes: 1 addition & 3 deletions (2) Vox Populi/Database Changes/Events/CityEventChanges.sql
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,7 @@ INSERT INTO CityEventChoice_YieldSiphon
(CityEventChoiceType, YieldType, Yield)
VALUES
('ESPIONAGE_EVENT_CHOICE_STEAL_FAITH', 'YIELD_FAITH', 100);



CREATE TEMP TABLE Helper (
YieldType TEXT
);
Expand All @@ -333,4 +332,3 @@ FROM CityEventChoices a, Helper b
WHERE a.isCounterSpyMission = 1;

DROP TABLE Helper;

11 changes: 3 additions & 8 deletions (2) Vox Populi/Database Changes/Policies/Authority.sql
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,12 @@ INSERT INTO Policy_CityYieldChanges
(PolicyType, YieldType, Yield)
VALUES
('POLICY_HONOR', 'YIELD_PRODUCTION', 1);

INSERT INTO Policy_YieldFromKills
(PolicyType, YieldType, Yield)
VALUES
('POLICY_HONOR', 'YIELD_SCIENCE', 50);

INSERT INTO Policy_CityYieldChanges
(PolicyType, YieldType, Yield)
VALUES
('POLICY_HONOR', 'YIELD_PRODUCTION', 1);

-- Warrior Code (Now Tribute)
DELETE FROM Policy_UnitCombatProductionModifiers
WHERE PolicyType = 'POLICY_WARRIOR_CODE';
Expand Down Expand Up @@ -108,7 +103,6 @@ INSERT INTO Policy_YieldPerCityOverStrengthThreshold
(PolicyType, YieldType, Yield)
VALUES
('POLICY_MILITARY_TRADITION', 'YIELD_CULTURE', 2);


-- Military Caste (Now Dominance)
UPDATE Policies
Expand Down Expand Up @@ -163,7 +157,8 @@ VALUES
-- Scaler
INSERT INTO Policy_YieldFromKills
(PolicyType, YieldType, Yield)
SELECT Type, 'YIELD_SCIENCE', 10
SELECT
Type, 'YIELD_SCIENCE', 10
FROM Policies
WHERE PolicyBranchType = 'POLICY_BRANCH_HONOR';

Expand Down
4 changes: 2 additions & 2 deletions (2) Vox Populi/Database Changes/Policies/Fealty.sql
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ INSERT INTO Policy_ReligionYieldMod
(PolicyType, YieldType, Yield)
VALUES
('POLICY_PIETY_FINISHER', 'YIELD_PRODUCTION', 3),
('POLICY_PIETY_FINISHER', 'YIELD_GOLD', 3),
('POLICY_PIETY_FINISHER', 'YIELD_SCIENCE', 3),
('POLICY_PIETY_FINISHER', 'YIELD_CULTURE', 3),
('POLICY_PIETY_FINISHER', 'YIELD_GOLD', 3);
('POLICY_PIETY_FINISHER', 'YIELD_CULTURE', 3);

-- Scaler
INSERT INTO Policy_CityYieldChanges
Expand Down
1 change: 0 additions & 1 deletion (2) Vox Populi/Database Changes/Policies/Rationalism.sql
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ INSERT INTO Policy_SpecialistExtraYields
VALUES
('POLICY_SCIENTIFIC_REVOLUTION', 'YIELD_FOOD', 1);


INSERT INTO Policy_YieldModifierFromGreatWorks
(PolicyType, YieldType, Yield)
VALUES
Expand Down
36 changes: 18 additions & 18 deletions (2) Vox Populi/Database Changes/Policies/Tradition.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,16 @@ WHERE Type = 'POLICY_MONARCHY';

DELETE FROM Policy_PrereqPolicies
WHERE PolicyType IN (
'POLICY_LANDED_ELITE',
'POLICY_MONARCHY',
'POLICY_LEGALISM'
);

INSERT INTO Policy_PrereqPolicies
(PolicyType, PrereqPolicy)
VALUES
('POLICY_MONARCHY', 'POLICY_ARISTOCRACY'),
('POLICY_MONARCHY', 'POLICY_ARISTOCRACY'),
('POLICY_MONARCHY', 'POLICY_OLIGARCHY'),
('POLICY_LANDED_ELITE', 'POLICY_ARISTOCRACY'),
('POLICY_LANDED_ELITE', 'POLICY_LEGALISM');
('POLICY_LANDED_ELITE', 'POLICY_ARISTOCRACY');

-- Opener
DELETE FROM Policy_BuildingClassCultureChanges
Expand Down Expand Up @@ -95,9 +93,7 @@ VALUES
-- Legalism (now Ceremony)
UPDATE Policies
SET
GoldenAgeDurationMod = 0,
NumCitiesFreeCultureBuilding = 0,
CapitalGrowthMod = 0,
PortraitIndex = 55
WHERE Type = 'POLICY_LEGALISM';

Expand Down Expand Up @@ -161,8 +157,6 @@ WHERE PolicyType = 'POLICY_LANDED_ELITE';
UPDATE Policies
SET
CapitalGrowthMod = 0,
GreatPeopleRateModifier = 0,
CityGrowthMod = 3,
PortraitIndex = 56
WHERE Type = 'POLICY_LANDED_ELITE';

Expand All @@ -183,19 +177,24 @@ SET
CityGrowthMod = 0
WHERE Type = 'POLICY_TRADITION_FINISHER';

INSERT INTO Policy_ImprovementYieldChanges
(PolicyType, ImprovementType, YieldType, Yield)
SELECT
'POLICY_TRADITION_FINISHER', Type, 'YIELD_FOOD', 1
FROM Improvements
WHERE CreatedByGreatPerson = 1 OR Type = 'IMPROVEMENT_LANDMARK';
CREATE TEMP TABLE Helper (
YieldType TEXT
);

INSERT INTO Helper
(YieldType)
VALUES
('YIELD_FOOD'),
('YIELD_PRODUCTION');

INSERT INTO Policy_ImprovementYieldChanges
(PolicyType, ImprovementType, YieldType, Yield)
SELECT
'POLICY_TRADITION_FINISHER', Type, 'YIELD_PRODUCTION', 1
FROM Improvements
WHERE CreatedByGreatPerson = 1 OR Type = 'IMPROVEMENT_LANDMARK';
'POLICY_TRADITION_FINISHER', a.Type, b.YieldType, 1
FROM Improvements a, Helper b
WHERE a.CreatedByGreatPerson = 1 OR a.Type = 'IMPROVEMENT_LANDMARK';

DROP TABLE Helper;

INSERT INTO Policy_FreeBuilding
(PolicyType, BuildingClassType, Count)
Expand All @@ -212,6 +211,7 @@ WHERE PolicyBranchType = 'POLICY_BRANCH_TRADITION';

INSERT INTO Policy_CityYieldChanges
(PolicyType, YieldType, Yield)
SELECT Type, 'YIELD_FOOD', 1
SELECT
Type, 'YIELD_FOOD', 1
FROM Policies
WHERE PolicyBranchType = 'POLICY_BRANCH_TRADITION';
Loading

0 comments on commit 30b6008

Please sign in to comment.