; === Carthaginian Reforms === ;
; Representing a political, economic and military shift that changes government types and recruitment_slots
;
; --- Barcid Reform ---
declare_counter roman_battles
; Checking that Carthage has been at war with the Romans
monitor_event PostBattle FactionType f_carthage
and GeneralFoughtFaction f_rome
and not I_ConflictType Naval ; must be land battles, not just skirmishes at sea - doesn't have to win
inc_counter roman_battles 1
if I_CompareCounter roman_battles > 5 ; several battles
terminate_monitor
end_if
if I_NumberOfSettlements f_rome < 1 ; ie the Romans are dead
set_counter roman_battles 6 ; ensuring this part of the script is complete - a fallback
end_if
if I_IsFactionAIControlled f_carthage ; not for the AI
terminate_monitor
end_if
end_monitor
; Checking the Faction Leader is from the Barcid faction - need to put triggers for Barcid/anti-Barcid in EDCT!
monitor_event CharacterTurnStart FactionType f_carthage
and I_TurnNumber > 140 ; it's at least 237BC
and Trait Rb_mhnt > 1 ; is a General of the Army
and Trait Barcid > 0 ; is of the Barcid faction
set_event_counter barcid_leader 1
if I_EventCounter ecCarthage_Reform > 0 ; close if reform has happened
terminate_monitor
end_if
if I_IsFactionAIControlled f_carthage ; not for the AI
terminate_monitor
end_if
end_monitor
monitor_event CharacterTurnStart FactionType f_carthage
and I_TurnNumber > 140 ; it's at least 237BC
and Trait CarthWarLeader > 0 ; is a General of the Army
and Trait Barcid > 0 ; is of the Barcid faction
set_event_counter barcid_leader 1
if I_EventCounter ecCarthage_Reform > 0 ; close if reform has happened
terminate_monitor
end_if
if I_IsFactionAIControlled f_carthage ; not for the AI
terminate_monitor
end_if
end_monitor
;Triggering the reform
monitor_event FactionTurnStart FactionType f_carthage
if I_IsFactionAIControlled f_carthage ; not for the AI
terminate_monitor
end_if
if I_TurnNumber > 140 ; it's at least 237BC
and I_SettlementOwner sett_170 = f_carthage ; Kart-Hadast
and I_SettlementOwner sett_012 = f_carthage ; Gadir
and I_SettlementOwner sett_013 = f_carthage ; Mastia/Qart-Hadast
;and I_EventCounter ecIberian_Resistance > 0 ; has completed the unique mission
and I_CompareCounter roman_battles > 4 ; have been at war with Rome
and I_EventCounter barcid_leader > 0 ; has a pro-Barcid FL
set_event_counter ecCarthage_Reform 1
historic_event HE_CARTHAGE_REFORM factions { f_carthage, }
terminate_monitor
end_if
end_monitor
;AI Triggers
monitor_event FactionTurnStart FactionType f_carthage
if not I_IsFactionAIControlled f_carthage ; not for the human player
terminate_monitor
end_if
if I_TurnNumber > 140 ; it's at least 237BC
and I_SettlementOwner sett_170 = f_carthage ; Kart-Hadast
and I_SettlementOwner sett_012 = f_carthage ; Gadir
and I_SettlementOwner sett_013 = f_carthage ; Mastia/Qart-Hadast
set_event_counter ecCarthage_Reform 1
terminate_monitor
end_if
if I_TurnNumber > 248 ; it's 210BC
and I_EventCounter ecCarthage_Reform < 1 ; Barcid reform hasn't happened for the AI
set_event_counter ecCarthage_Reform 1
terminate_monitor
end_if
end_monitor