;====================================================================================================== GEORGIA EVOLUTION
;---------- Georgia Evolution
set_event_counter georgian2_golden_age_player 0 ; turn 80-140
set_event_counter georgian3_shota_rustaveli_player 0 ; turn 150-220
set_event_counter georgian4_crossbow_in_caucasus_player 0 ; turn 200-300
set_event_counter georgian6_revival_player 0 ; turn 270-360
set_event_counter georgian7_last_united_kingdom_player 0 ; turn 220-270
;-------------------------------------------------------------------- GEORGIAN 1 STARTING INFO
; information about reforms
monitor_event PreFactionTurnStart FactionType georgia
if I_IsFactionAIControlled georgia
terminate_monitor
end_if
if I_TurnNumber = 3
historic_event GEORGIAN0_STARTING_INFO
terminate_monitor
end_if
end_monitor
monitor_event PreFactionTurnStart FactionType georgia
if I_IsFactionAIControlled georgia
terminate_monitor
end_if
if I_TurnNumber = 4
historic_event GEORGIAN1_REFORMS_INFO
terminate_monitor
end_if
end_monitor
;-------------------------------------------------------------------- GEORGIAN 2 GOLDEN AGE
; historically should take place around turn 140
monitor_event PreFactionTurnStart FactionType georgia
if I_TurnNumber > 70 ; just in case the player rushes the map
and RandomPercent > 20
and I_CompareCounter number_p_large_town_built > 2 ; Gergia has built 3 Local Guards (Large Town level)
and I_CompareCounter number_ikoner_studio_built > 1 ; at least 2 Ikoner Studio were built (Minor City level)
and I_SettlementOwner Kutaisi = georgia
and I_SettlementOwner Tbilisi = georgia
if I_FactionLeaderTrait georgia WifeIsGreek > 0 ; the FL should have either wife or some ancestors of Byzantine / Kievian descent
historic_event GEORGIAN2_GOLDEN_AGE factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, } ; info only for the nearby factions
if not I_IsFactionAIControlled georgia
inc_event_counter georgian2_golden_age_player 1
end_if
terminate_monitor
end_if
if I_FactionLeaderTrait georgia Royal_Relation_Greek > 0
historic_event GEORGIAN2_GOLDEN_AGE factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian2_golden_age_player 1
end_if
terminate_monitor
end_if
if I_FactionLeaderTrait georgia WifeIsKievan > 0
historic_event GEORGIAN2_GOLDEN_AGE factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian2_golden_age_player 1
end_if
terminate_monitor
end_if
if I_FactionLeaderTrait georgia Royal_Relation_Kievan > 0
historic_event GEORGIAN2_GOLDEN_AGE factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian2_golden_age_player 1
end_if
terminate_monitor
end_if
end_if
if I_TurnNumber > 70
and RandomPercent > 20 ; to add some randomness against the bugs
and I_EventCounter FL_is_crowned_ruler > 0 ; FL has the crown
and not I_IsFactionAIControlled georgia ; to ensure it's not another faction FL who's got the crown
and I_SettlementOwner Tbilisi = georgia
and I_SettlementOwner Kutaisi = georgia
historic_event GEORGIAN2_GOLDEN_AGE factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian2_golden_age_player 1
end_if
terminate_monitor
end_if
if I_TurnNumber > 130 ; FALL BACK - in case of failure or a bug
and RandomPercent > 90 ; to add some randomness against the bugs
and I_SettlementOwner Tbilisi = georgia ; at least the capital is in the Georgian hands
historic_event GEORGIAN2_GOLDEN_AGE factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian2_golden_age_player 1
end_if
terminate_monitor
end_if
end_monitor
;-------------------------------------------------------------------- GEORGIAN 3 SHOTA RUSTAVELI
; historically should take place around turn 170
monitor_event PreFactionTurnStart FactionType georgia
if I_TurnNumber > 150
and RandomPercent > 20 ; to add some randomness against the bugs
and I_CompareCounter number_ikoner_studio_built > 3 ; Gergia has built 3 Ikoner Studios (Minor City level)
and I_CompareCounter number_cathedral_o_built > 1 ; at least 2 Large City
and I_SettlementOwner Kutaisi = georgia
and I_SettlementOwner Tbilisi = georgia
historic_event GEORGIAN3_SHOTA_RUSTAVELI factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian3_shota_rustaveli_player 1
end_if
terminate_monitor
end_if
if I_TurnNumber > 210 ; FALL BACK - in case of failure or a bug
and RandomPercent > 90 ; to add some randomness against the bugs
and I_SettlementOwner Tbilisi = georgia ; at least the capital is in the Georgian hands
historic_event GEORGIAN3_SHOTA_RUSTAVELI factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian3_shota_rustaveli_player 1
end_if
terminate_monitor
end_if
end_monitor
;-------------------------------------------------------------------- GEORGIAN 4 CROSSBOW IN CAUCASUS
; add crossbow units for Georgia
; this event is unrelated to the next Georgian events (may happen later)
; there's no pic
monitor_event PreFactionTurnStart FactionType georgia
if I_TurnNumber > 200
and RandomPercent > 20 ; to add some randomness against the bugs
and I_EventCounter MOUNTED_CROSSBOWS > 0 ; improvments in crossbow technology in Europe occured
and I_CompareCounter number_university_built > 0 ; at least 1 Large City (allows contacts with the Latins)
and I_CompareCounter number_marksmans_range_built > 1 ; Gergia has built 2 Marksmans Ranges (Castle level)
and I_SettlementOwner Kutaisi = georgia
and I_SettlementOwner Tbilisi = georgia
if I_FactionLeaderTrait georgia WifeIsJerusalem > 0 ; the FL should have either wife or some ancestors of Byzantine / Kievian descent
historic_event GEORGIAN4_CROSSBOW_IN_CAUCASUS factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, } ; info only for the nearby factions
if not I_IsFactionAIControlled georgia
inc_event_counter georgian4_crossbow_in_caucasus_player 1
end_if
terminate_monitor
end_if
if I_FactionLeaderTrait georgia Royal_Relation_Jerusalem > 0
historic_event GEORGIAN4_CROSSBOW_IN_CAUCASUS factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian4_crossbow_in_caucasus_player 1
end_if
terminate_monitor
end_if
if I_FactionLeaderTrait georgia WifeIsHRE > 0
historic_event GEORGIAN4_CROSSBOW_IN_CAUCASUS factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian4_crossbow_in_caucasus_player 1
end_if
terminate_monitor
end_if
if I_FactionLeaderTrait georgia Royal_Relation_HRE > 0
historic_event GEORGIAN4_CROSSBOW_IN_CAUCASUS factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian4_crossbow_in_caucasus_player 1
end_if
terminate_monitor
end_if
if I_FactionLeaderTrait georgia WifeIsEnglish > 0
historic_event GEORGIAN4_CROSSBOW_IN_CAUCASUS factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian4_crossbow_in_caucasus_player 1
end_if
terminate_monitor
end_if
if I_FactionLeaderTrait georgia Royal_Relation_English > 0
historic_event GEORGIAN4_CROSSBOW_IN_CAUCASUS factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian4_crossbow_in_caucasus_player 1
end_if
terminate_monitor
end_if
if I_FactionLeaderTrait georgia WifeIsSicilian > 0
historic_event GEORGIAN4_CROSSBOW_IN_CAUCASUS factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian4_crossbow_in_caucasus_player 1
end_if
terminate_monitor
end_if
if I_FactionLeaderTrait georgia Royal_Relation_Sicilian > 0
historic_event GEORGIAN4_CROSSBOW_IN_CAUCASUS factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian4_crossbow_in_caucasus_player 1
end_if
terminate_monitor
end_if
if I_FactionLeaderTrait georgia WifeIsFrench > 0
historic_event GEORGIAN4_CROSSBOW_IN_CAUCASUS factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian4_crossbow_in_caucasus_player 1
end_if
terminate_monitor
end_if
if I_FactionLeaderTrait georgia Royal_Relation_French > 0
historic_event GEORGIAN4_CROSSBOW_IN_CAUCASUS factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian4_crossbow_in_caucasus_player 1
end_if
terminate_monitor
end_if
end_if
if I_TurnNumber > 290 ; FALL BACK - in case of failure or a bug
and RandomPercent > 90 ; to add some randomness against the bugs
and I_EventCounter MOUNTED_CROSSBOWS > 0 ; improvments in crossbow technology in Europe occured
and I_SettlementOwner Tbilisi = georgia ; at least the capital is in the Georgian hands
historic_event GEORGIAN4_CROSSBOW_IN_CAUCASUS factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian4_crossbow_in_caucasus_player 1
end_if
terminate_monitor
end_if
end_monitor
;-------------------------------------------------------------------- GEORGIAN 5 6 REVIVAL
; historically should take place around turn 380
monitor_event SettlementTurnStart SettlementName Tbilisi
and I_EventCounter GEORGIAN3_SHOTA_RUSTAVELI > 0 ; only after the peak had happened (but no turn condition)
and not FactionType georgia ; Gergia lost capital to another faction
and not FactionType slave ; but not to a rebellion
historic_event GEORGIAN5_REVIVAL_ALLOWED ; next part of script may fire
terminate_monitor
end_monitor
monitor_event PreFactionTurnStart FactionType georgia
if I_TurnNumber > 270
and RandomPercent > 20 ; to add some randomness against the bugs
and I_EventCounter GEORGIAN5_REVIVAL_ALLOWED > 0 ; Gergia had lost capital to another faction
and I_CompareCounter number_p_city_built > 3 ; Gergia has built 4 Local Councils (Minor City level)
and I_CompareCounter number_citadel_built > 0 ; at least 1 Citadel (Large Castle) exists
and I_SettlementOwner Tbilisi = georgia
historic_event GEORGIAN6_REVIVAL
if not I_IsFactionAIControlled georgia
inc_event_counter georgian6_revival_player 1
end_if
terminate_monitor
end_if
if I_TurnNumber > 350 ; FALL BACK - in case of failure or a bug
and RandomPercent > 90 ; to add some randomness against the bugs
and I_SettlementOwner Tbilisi = georgia ; at least the capital is in the Georgian hands
historic_event GEORGIAN6_REVIVAL factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian6_revival_player 1
end_if
terminate_monitor
end_if
end_monitor
;-------------------------------------------------------------------- GEORGIAN 7 LAST UNITED KINGDOM
; historically should take place around turn 600
; details of this event are to be worked out in the future (the description is ok, but there's no pic)
monitor_event PreFactionTurnStart FactionType georgia
if I_TurnNumber > 520
and RandomPercent > 20 ; to add some randomness against the bugs
and FactionBuildingExists = huge_cathedral_o ; at least 1 Huge City
and FactionBuildingExists = great_university ; at least 1 Huge City
and FactionBuildingExists = royal_armoury ; highest level of barracks in a citadel
and I_SettlementOwner Kutaisi = georgia
and I_SettlementOwner Tbilisi = georgia
historic_event GEORGIAN7_LAST_UNITED_KINGDOM factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian7_last_united_kingdom_player 1
end_if
terminate_monitor
end_if
if I_TurnNumber > 600 ; FALL BACK - in case of failure or a bug
and RandomPercent > 90 ; to add some randomness against the bugs
and I_SettlementOwner Tbilisi = georgia ; at least the capital is in the Georgian hands
historic_event GEORGIAN7_LAST_UNITED_KINGDOM factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
if not I_IsFactionAIControlled georgia
inc_event_counter georgian7_last_united_kingdom_player 1
end_if
terminate_monitor
end_if
end_monitor