-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameDataEarly.sql
111 lines (82 loc) · 10.3 KB
/
GameDataEarly.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
-- Take away all modifiers that give seige units bonus movement (because with bonus movement, the units can move & shoot without the Expert Crew promotion)
-- They can still get the movement bonuses from war declarations with Chandragupta (TRAIT_TERRITORIAL_WAR_MOVEMENT), Cyrus (TRAIT_FALLBABYLON_SURPRISE_MOVEMENT), and Robert the Bruce (TRAIT_LIBERATION_WAR_MOVEMENT)
-- These traits are all based on EFFECT_ADD_DIPLOMATIC_MOVEMENT_MODIFIER which modifies the player, not the units. Therefore I can't set a requirement on the modifier to limit which units it applies to.
DELETE FROM TypeTags WHERE Type = 'ABILITY_GREAT_GENERAL_MOVEMENT' AND Tag = 'CLASS_SIEGE' ;
DELETE FROM TypeTags WHERE Type = 'ABILITY_GREAT_GENERAL_SINGLE_MOVEMENT' AND Tag = 'CLASS_SIEGE' ;
DELETE FROM TypeTags WHERE Type = 'ABILITY_GREAT_GENERAL_DOUBLE_MOVEMENT' AND Tag = 'CLASS_SIEGE' ;
DELETE FROM TypeTags WHERE Type = 'ABILITY_GREAT_GENERAL_TRIPLE_MOVEMENT' AND Tag = 'CLASS_SIEGE' ;
DELETE FROM TypeTags WHERE Type = 'ABILITY_COMANDANTE_AOE_MOVEMENT' AND Tag = 'CLASS_SIEGE' ;
INSERT OR IGNORE INTO Tags (Tag, Vocabulary) VALUES ('DB_CLASS_NOT_SIEGE_SETUP', 'ABILITY_CLASS') ;
INSERT OR IGNORE INTO TypeTags (Type, Tag)
SELECT UnitType, 'DB_CLASS_NOT_SIEGE_SETUP' FROM Units WHERE UnitType NOT IN (SELECT Type FROM TypeTags WHERE Tag = 'CLASS_SIEGE_SETUP') ;
INSERT OR REPLACE INTO Requirements (RequirementId, RequirementType) VALUES ('DB_REQ_NOT_SIEGE_SETUP', 'REQUIREMENT_UNIT_TAG_MATCHES') ;
INSERT OR REPLACE INTO RequirementArguments (RequirementId, Name, Value) VALUES ('DB_REQ_NOT_SIEGE_SETUP', 'Tag', 'DB_CLASS_NOT_SIEGE_SETUP') ;
INSERT OR REPLACE INTO RequirementSets (RequirementSetId, RequirementSetType) VALUES ('DB_REQSET_NOT_SIEGE_SETUP', 'REQUIREMENTSET_TEST_ALL') ;
INSERT OR REPLACE INTO RequirementSetRequirements (RequirementSetId, RequirementId) VALUES ('DB_REQSET_NOT_SIEGE_SETUP', 'DB_REQ_NOT_SIEGE_SETUP') ;
UPDATE Modifiers SET SubjectRequirementSetId = 'DB_REQSET_NOT_SIEGE_SETUP' WHERE Modifierid = 'LOGISTICS_FRIENDLYTERRITORYMOVEMENTBONUS' ;
UPDATE Modifiers SET SubjectRequirementSetId = 'DB_REQSET_NOT_SIEGE_SETUP' WHERE Modifierid = 'TRAIT_EJERCITO_PATRIOTA_EXTRA_MOVEMENT' ;
-- Seige promotions: Shrapnel and Grape Shot should only apply to attacks
INSERT INTO RequirementSetRequirements (RequirementSetId, RequirementId) VALUES ('SHRAPNEL_REQUIREMENTS', 'PLAYER_IS_ATTACKER_REQUIREMENTS') ;
INSERT INTO RequirementSetRequirements (RequirementSetId, RequirementId) VALUES ('GRAPE_SHOT_REQUIREMENTS', 'PLAYER_IS_ATTACKER_REQUIREMENTS') ;
-- Fix Information Age great admiral sea movement
UPDATE ModifierArguments SET Name = 'AbilityType' WHERE ModifierId = 'GREATPERSON_MOVEMENT_AOE_INFORMATION_SEA' AND Name = 'ModifierId' ;
-- Fix Barding combat preview
UPDATE ModifierStrings SET Text = '+{1_AMOUNT} {LOC_PROMOTION_BARDING_NAME} {LOC_PROMOTION_DESCRIPTOR_PREVIEW_TEXT}{LOC_UP_LABEL}' WHERE ModifierId = 'TOP_COVER_DEFENSE_BONUS_VS_RANGED' AND Context = 'Preview' ;
-- Fix Interceptor combat preview
UPDATE ModifierStrings SET Text = '+{1_AMOUNT} {LOC_PROMOTION_INTERCEPTOR_NAME} {LOC_PROMOTION_DESCRIPTOR_PREVIEW_TEXT}{LOC_UP_LABEL}' WHERE ModifierId = 'INTERCEPTOR_BONUS_VS_BOMBERS' AND Context = 'Preview' ;
-- Fix Drone and Observation Balloon ignoring terrain costs
INSERT OR REPLACE INTO TypeTags (Type, Tag) VALUES ('ABILITY_IGNORE_TERRAIN_COST', 'CLASS_OBSERVATION') ;
INSERT OR REPLACE INTO TypeTags (Type, Tag) VALUES ('ABILITY_IGNORE_CROSSING_RIVERS_COST', 'CLASS_OBSERVATION') ;
-- Fix Meenakshi temple
DELETE FROM BuildingModifiers WHERE ModifierId = 'MEENAKSHITEMPLE_RELIGIOUS_UNITS_COMBAT' OR ModifierId = 'MEENAKSHITEMPLE_RELIGIOUS_UNITS_MOVEMENT' ;
DELETE FROM Modifiers WHERE ModifierId = 'MEENAKSHITEMPLE_RELIGIOUS_UNITS_COMBAT' OR ModifierId = 'MEENAKSHITEMPLE_RELIGIOUS_UNITS_MOVEMENT' ;
DELETE FROM ModifierArguments WHERE ModifierId = 'MEENAKSHITEMPLE_RELIGIOUS_UNITS_COMBAT' OR ModifierId = 'MEENAKSHITEMPLE_RELIGIOUS_UNITS_MOVEMENT' ;
DELETE FROM Types WHERE Type = 'ABILITY_SAGE_COMBAT_AOE_RELIGIOUS' OR Type = 'ABILITY_GUIDE_MOVEMENT_AOE_RELIGIOUS' ;
DELETE FROM TypeTags WHERE Type = 'ABILITY_SAGE_COMBAT_AOE_RELIGIOUS' OR Type = 'ABILITY_GUIDE_MOVEMENT_AOE_RELIGIOUS' ;
DELETE FROM UnitAbilities WHERE UnitAbilityType = 'ABILITY_SAGE_COMBAT_AOE_RELIGIOUS' OR UnitAbilityType = 'ABILITY_GUIDE_MOVEMENT_AOE_RELIGIOUS' ;
DELETE FROM UnitAbilityModifiers WHERE UnitAbilityType = 'ABILITY_SAGE_COMBAT_AOE_RELIGIOUS' OR UnitAbilityType = 'ABILITY_GUIDE_MOVEMENT_AOE_RELIGIOUS' ; -- SAGE_COMBAT_AOE_RELIGIOUS_XP2, GUIDE_MOVEMENT_AOE_RELIGIOUS_XP2
DELETE FROM Modifiers WHERE ModifierId = 'SAGE_COMBAT_AOE_RELIGIOUS_XP2' OR ModifierId = 'GUIDE_MOVEMENT_AOE_RELIGIOUS_XP2' ; -- MODIFIER_PLAYER_UNITS_GRANT_ABILITY
DELETE FROM ModifierArguments WHERE ModifierId = 'SAGE_COMBAT_AOE_RELIGIOUS_XP2' OR ModifierId = 'GUIDE_MOVEMENT_AOE_RELIGIOUS_XP2' ; -- ABILITY_GURU_STRENGTH, ABILITY_GURU_MOVEMENT
DELETE FROM Types WHERE Type = 'ABILITY_GURU_STRENGTH' OR Type = 'ABILITY_GURU_MOVEMENT' ;
DELETE FROM TypeTags WHERE Type = 'ABILITY_GURU_STRENGTH' OR Type = 'ABILITY_GURU_MOVEMENT' ; -- CLASS_RELIGIOUS_ALL
DELETE FROM UnitAbilities WHERE UnitAbilityType = 'ABILITY_GURU_STRENGTH' OR UnitAbilityType = 'ABILITY_GURU_MOVEMENT' ;
DELETE FROM UnitAbilityModifiers WHERE UnitAbilityType = 'ABILITY_GURU_STRENGTH' OR UnitAbilityType = 'ABILITY_GURU_MOVEMENT' ; -- GURU_STRENGTH_XP2, GURU_MOVEMENT_XP2
DELETE FROM Modifiers WHERE ModifierId = 'GURU_STRENGTH_XP2' OR ModifierId = 'GURU_MOVEMENT_XP2' ; -- AOE_GURU_REQUIREMENTS_XP2
DELETE FROM ModifierArguments WHERE ModifierId = 'GURU_STRENGTH_XP2' OR ModifierId = 'GURU_MOVEMENT_XP2' ;
INSERT OR REPLACE INTO Requirements (RequirementId, RequirementType) VALUES ('DB_REQ_UNIT_IS_GURU', 'REQUIREMENT_UNIT_TYPE_MATCHES') ;
INSERT OR REPLACE INTO RequirementArguments (RequirementId, Name, Value) VALUES ('DB_REQ_UNIT_IS_GURU', 'UnitType', 'UNIT_GURU') ;
INSERT OR REPLACE INTO RequirementSets (RequirementSetId, RequirementSetType) VALUES ('DB_REQSET_UNIT_IS_GURU', 'REQUIREMENTSET_TEST_ALL') ;
INSERT OR REPLACE INTO RequirementSetRequirements (RequirementSetId, RequirementId) VALUES ('DB_REQSET_UNIT_IS_GURU', 'DB_REQ_UNIT_IS_GURU') ;
INSERT OR REPLACE INTO RequirementSets (RequirementSetId, RequirementSetType) VALUES ('DB_REQSET_UNIT_IS_RELIGIOUS_ALL', 'REQUIREMENTSET_TEST_ALL') ;
INSERT OR REPLACE INTO RequirementSetRequirements (RequirementSetId, RequirementId) VALUES ('DB_REQSET_UNIT_IS_RELIGIOUS_ALL', 'REQUIRES_UNIT_IS_RELIGIOUS_ALL') ;
INSERT OR REPLACE INTO Requirements (RequirementId, RequirementType) VALUES ('DB_REQ_NEXTTO_GURU', 'REQUIREMENT_PLOT_ADJACENT_FRIENDLY_UNIT_TYPE_MATCHES') ;
INSERT OR REPLACE INTO RequirementArguments (RequirementId, Name, Value) VALUES ('DB_REQ_NEXTTO_GURU', 'UnitType', 'UNIT_GURU') ;
INSERT OR REPLACE INTO RequirementSets (RequirementSetId, RequirementSetType) VALUES ('DB_REQSET_NEXTTO_GURU', 'REQUIREMENTSET_TEST_ALL') ;
INSERT OR REPLACE INTO RequirementSetRequirements (RequirementSetId, RequirementId) VALUES ('DB_REQSET_NEXTTO_GURU', 'DB_REQ_NEXTTO_GURU') ;
-- Meenakshi combat
INSERT OR REPLACE INTO BuildingModifiers (BuildingType, ModifierId) VALUES
('BUILDING_MEENAKSHI_TEMPLE', 'DB_MEENAKSHITEMPLE_GURU_ENHANCES_COMBAT') ;
INSERT OR REPLACE INTO Modifiers (ModifierId, ModifierType, Permanent, SubjectRequirementSetId) VALUES
('DB_MEENAKSHITEMPLE_GURU_ENHANCES_COMBAT', 'MODIFIER_PLAYER_UNITS_GRANT_ABILITY', 0, 'DB_REQSET_UNIT_IS_RELIGIOUS_ALL') ;
INSERT OR REPLACE INTO ModifierArguments (ModifierId, Name, Value) VALUES
('DB_MEENAKSHITEMPLE_GURU_ENHANCES_COMBAT', 'AbilityType', 'DB_ABILITY_ENHANCE_COMBAT_WHEN_ADJ_GURU') ;
INSERT OR REPLACE INTO Types (Type, Kind) VALUES ('DB_ABILITY_ENHANCE_COMBAT_WHEN_ADJ_GURU', 'KIND_ABILITY') ;
INSERT OR REPLACE INTO TypeTags (Type, Tag) VALUES ('DB_ABILITY_ENHANCE_COMBAT_WHEN_ADJ_GURU', 'CLASS_RELIGIOUS_ALL') ;
INSERT OR REPLACE INTO UnitAbilities (UnitAbilityType, Inactive, Name, Description) VALUES ('DB_ABILITY_ENHANCE_COMBAT_WHEN_ADJ_GURU', 1, 'LOC_DB_ABILITY_ENHANCE_COMBAT_WHEN_ADJ_GURU_NAME', 'LOC_DB_ABILITY_ENHANCE_COMBAT_WHEN_ADJ_GURU_DESCRIPTION') ;
INSERT OR REPLACE INTO UnitAbilityModifiers (UnitAbilityType, ModifierId) VALUES ('DB_ABILITY_ENHANCE_COMBAT_WHEN_ADJ_GURU', 'DB_ENHANCE_COMBAT_WHEN_ADJ_GURU') ;
INSERT OR REPLACE INTO Modifiers (ModifierId, ModifierType, SubjectRequirementSetId) VALUES ('DB_ENHANCE_COMBAT_WHEN_ADJ_GURU', 'MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH', 'DB_REQSET_NEXTTO_GURU') ;
INSERT OR REPLACE INTO ModifierArguments (ModifierId, Name, Value) VALUES ('DB_ENHANCE_COMBAT_WHEN_ADJ_GURU', 'Amount', 5) ;
INSERT OR REPLACE INTO ModifierStrings (ModifierId, Context, Text) VALUES ('DB_ENHANCE_COMBAT_WHEN_ADJ_GURU', 'Preview', 'LOC_DB_ABILITY_ENHANCE_COMBAT_WHEN_ADJ_GURU_COMBAT_DESCRIPTION') ;
-- Meenakshi Movement
INSERT OR REPLACE INTO BuildingModifiers (BuildingType, ModifierId) VALUES
('BUILDING_MEENAKSHI_TEMPLE', 'DB_MEENAKSHITEMPLE_GURU_ENHANCES_MOVEMENT') ;
INSERT OR REPLACE INTO Modifiers (ModifierId, ModifierType, Permanent, SubjectRequirementSetId) VALUES
('DB_MEENAKSHITEMPLE_GURU_ENHANCES_MOVEMENT', 'MODIFIER_PLAYER_UNITS_GRANT_ABILITY', 0, 'DB_REQSET_UNIT_IS_RELIGIOUS_ALL') ;
INSERT OR REPLACE INTO ModifierArguments (ModifierId, Name, Value) VALUES
('DB_MEENAKSHITEMPLE_GURU_ENHANCES_MOVEMENT', 'AbilityType', 'DB_ABILITY_ENHANCE_MOVEMENT_WHEN_ADJ_GURU') ;
INSERT OR REPLACE INTO Types (Type, Kind) VALUES ('DB_ABILITY_ENHANCE_MOVEMENT_WHEN_ADJ_GURU', 'KIND_ABILITY') ;
INSERT OR REPLACE INTO TypeTags (Type, Tag) VALUES ('DB_ABILITY_ENHANCE_MOVEMENT_WHEN_ADJ_GURU', 'CLASS_RELIGIOUS_ALL') ;
INSERT OR REPLACE INTO UnitAbilities (UnitAbilityType, Inactive, Name, Description) VALUES ('DB_ABILITY_ENHANCE_MOVEMENT_WHEN_ADJ_GURU', 1, 'LOC_DB_ABILITY_ENHANCE_MOVEMENT_WHEN_ADJ_GURU_NAME', 'LOC_DB_ABILITY_ENHANCE_MOVEMENT_WHEN_ADJ_GURU_DESCRIPTION') ;
INSERT OR REPLACE INTO UnitAbilityModifiers (UnitAbilityType, ModifierId) VALUES ('DB_ABILITY_ENHANCE_MOVEMENT_WHEN_ADJ_GURU', 'DB_ENHANCE_MOVEMENT_WHEN_ADJ_GURU') ;
INSERT OR REPLACE INTO Modifiers (ModifierId, ModifierType, SubjectRequirementSetId) VALUES ('DB_ENHANCE_MOVEMENT_WHEN_ADJ_GURU', 'MODIFIER_PLAYER_UNIT_ADJUST_MOVEMENT', 'DB_REQSET_NEXTTO_GURU') ;
INSERT OR REPLACE INTO ModifierArguments (ModifierId, Name, Value) VALUES ('DB_ENHANCE_MOVEMENT_WHEN_ADJ_GURU', 'Amount', 1) ;