﻿

#rk_agot_reconquest_war = {
#	group = vassalization
#	ai_only_against_neighbors = yes
#
#	allowed_for_character = {
#		primary_title = title:h_the_iron_throne
#		}
#	}
#	allowed_against_character = {
#		scope:defender = {
#			agot_is_independent_ruler = yes
#			primary_title.tier = tier_empire
#			primary_title = {
#				title_capital_county.title_province = {
#					geographical_region = world_westeros_seven_kingdoms
#				}
#			}
#		}
#	}
#
#	cost = {
#		piety = {
#			value = 0
#			add = common_cb_impious_piety_cost
#		}
#		prestige = {
#			value = 0
#			add = {
#				desc = CB_SIZE_OF_TARGET_REALM_COST
#				scope:defender = {
#					every_sub_realm_county = {
#						add = {
#							value = 125
#						}
#					}
#				}
#			}
#			if = {
#				limit = {
#					scope:defender.primary_title = {
#						tier = tier_kingdom
#					}
#				}
#				multiply = {
#					value = 2
#					desc = CB_VASSALIZING_KING
#				}
#			}
#
#			multiply = common_cb_prestige_cost_multiplier
#		}
#	}
#	
#	should_invalidate = {
#		OR = {
#			scope:defender = {
#				top_liege != this
#			}
#			scope:defender.primary_title.tier >= scope:attacker.primary_title.tier
#		}
#	}
#	
#	on_declaration = {
#		on_declared_war = yes
#	}	
#	
#	on_invalidated_desc = msg_vassalization_war_invalidated_message
#	
#	on_invalidated = {}
#
#	on_victory_desc = {
#		first_valid = {
#			triggered_desc = {
#				trigger = { scope:attacker = { is_local_player = yes } }
#				desc = vassalization_cb_victory_desc_attacker
#			}
#			triggered_desc = {
#				trigger = { scope:defender = { is_local_player = yes } }
#				desc = vassalization_cb_victory_desc_defender
#			}
#			desc = vassalization_cb_victory_desc
#		}
#	}
#	
#	on_victory = {
#		scope:attacker = { show_pow_release_message_effect = yes }
#		
#		create_title_and_vassal_change = {
#			type = swear_fealty
#			save_scope_as = change
#			add_claim_on_loss = no
#		}
#		scope:defender = {
#			change_liege = {
#				liege = scope:attacker
#				change = scope:change
#			}
#			resolve_title_and_vassal_change = scope:change
#		}
#		
#		
#		# Prestige level progress for the attacker
#		scope:attacker = {
#			add_prestige_experience = {
#				value = medium_prestige_value
#			}
#		}

#		# Prestige loss for the defender
#		scope:defender = {
#			add_prestige = {
#				value = medium_prestige_value
#				multiply = -1.0
#			}
#		}
#
#		# Allies on both sides get full prestige value for helping in the war, based on their war participation.
#		modify_allies_of_participants_fame_values = {
#			WINNER = scope:attacker
#			FAME_BASE = major_prestige_value
#			IS_RELIGIOUS_WAR = no
#			WINNER_ALLY_FAME_SCALE = 1
#			LOSER_ALLY_FAME_SCALE = 1
#		}
#		
		# Truce
#		add_truce_attacker_victory_effect = yes
#
#		# EP3: note gold gained from military assistance/join war contracts and their war contribution threshold
#		laamp_as_mercenary_payout_tooltip_effect = yes

#		#Mandalas gain or lose piety/devotion depending on Decree
#		mandala_war_victory_effects = yes

#		#AGOT Added
#		agot_war_victory_effects = yes
#	}
#
#	on_white_peace_desc = {
#		first_valid = {
#			triggered_desc = {
#				trigger = { scope:defender = { is_local_player = yes } }
#				desc = vassalization_cb_white_peace_desc_defender
#			}
#			desc = vassalization_cb_white_peace_desc
#		}
#	}
#	
#	on_white_peace = {
#		scope:attacker = { show_pow_release_message_effect = yes }
#
#		#EP2 accolade glory gain for doing ok against higher ranked enemy
#		scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes }
#
#		# Prestige loss for the attacker
#		scope:attacker = {
#			add_prestige = {
#				value = minor_prestige_value
#				multiply = -1.0
#			}
#			stress_impact = {
#				ambitious = medium_stress_impact_gain
#				arrogant = medium_stress_impact_gain
#			}
#		}
#
#		# Allies on both sides get full prestige value for helping in the war, based on their war participation.
#		modify_allies_of_participants_fame_values = {
#			WINNER = scope:attacker # Not important as the scales are identical
#			FAME_BASE = minor_prestige_value
#			IS_RELIGIOUS_WAR = no
#			WINNER_ALLY_FAME_SCALE = 1
#			LOSER_ALLY_FAME_SCALE = 1
#		}
#		
#		scope:defender = {
#			stress_impact = {
#				arrogant = medium_stress_impact_gain
#			}
#		}
#
#		# Truce
#		add_truce_white_peace_effect = yes
#
#		# EP3: note gold gained from military assistance/join war contracts and their war contribution threshold
#		laamp_as_mercenary_payout_tooltip_effect = yes
#	}
#
#	on_defeat_desc = {
#		first_valid = {
#			triggered_desc = {
#				trigger = { scope:defender = { is_local_player = yes } }
#				desc = vassalization_cb_white_peace_desc_defender
#			}
#			triggered_desc = {
#				trigger = {
#					scope:attacker = {
#						is_local_player = yes
#						has_targeting_faction = yes
#					}
#				}
#				desc = vassalization_cb_defeat_desc_attacker
#			}
#			desc = vassalization_cb_white_peace_desc
#		}
#	}
#	
#	on_defeat = {
#		scope:attacker = { show_pow_release_message_effect = yes }
#
#		scope:defender = { 
#			mandala_peacemaker_perk_serenity_effect = yes
#			#EP2 accolade glory gain for winning against higher ranked enemy
#			accolade_defender_war_end_glory_gain_high_effect = yes
#			# Prestige for Defender
#			add_prestige_war_defender_effect = {
#				PRESTIGE_VALUE = medium_prestige_value
#			}
#		}
#		
#		# Prestige loss for the attacker
#		scope:attacker = {
#			pay_short_term_gold_reparations_effect = {
#				GOLD_VALUE = 3
#			}
#			add_prestige = {
#				value = major_prestige_value
#				multiply = -1.0
#			}
#		}
#
#		# Allies on both sides get full prestige value for helping in the war, based on their war participation.
#		modify_allies_of_participants_fame_values = {
#			WINNER = scope:defender
#			FAME_BASE = major_prestige_value
#			IS_RELIGIOUS_WAR = no
#			WINNER_ALLY_FAME_SCALE = 1
#			LOSER_ALLY_FAME_SCALE = 1
#		}
#		
#		scope:attacker = {
#			save_temporary_scope_as = loser
#		}
#
#		# Truce
#		add_truce_attacker_defeat_effect = yes
#		
#		on_lost_aggression_war_discontent_loss = yes
#
#		# EP3: note gold gained from military assistance/join war contracts and their war contribution threshold
#		laamp_as_mercenary_payout_tooltip_effect = yes
#
#		#Mandalas gain or lose piety/devotion depending on Decree
#		mandala_war_defeat_effects = yes
#	}
#	
#	on_primary_attacker_death = inherit
#	on_primary_defender_death = inherit
#	
#	attacker_allies_inherit = yes
#	defender_allies_inherit = yes
#	
#	war_name = "AGOT_VASSALIZATION_WAR_NAME"
#	war_name_base = "AGOT_VASSALIZATION_WAR_NAME_BASE"
#	cb_name = "AGOT_VASSALIZATION_CB_NAME"
#	interface_priority = 59
#	
#	ticking_war_score_targets_entire_realm = yes
#	max_defender_score_from_occupation = 150
#	max_attacker_score_from_occupation = 150
#	attacker_ticking_warscore = 0
#	attacker_wargoal_percentage = 0.8
#	
#	max_ai_diplo_distance_to_title = 500
#
#	ai_score_mult = {
#		value = 1
#		# As a feudal gov never attack tribal for vassalization
#		add = {
#			if = {
#				limit = {
#					scope:attacker = {
#						NOT = { government_has_flag = government_is_tribal }
#					}
#					scope:defender = {
#						government_has_flag = government_is_tribal
#					}
#				}
#				add = -1000
#			}
#		}
#		#Mandala really shouldn't be interested in this
#		add = {
#			if = {
#				limit = {
#					scope:attacker = { 
#						government_has_flag = government_is_mandala
#						vassal_limit_available < 1
#					}
#				}
#				add = -1000
#			}
#		}
#		# HOUSE RELATIONS
#		add = house_relation_ai_score_value
#		# Tell the Romans to stop going adventuring into the steppe for no gods-damned reason.
#		#AGOT Disabled
#		#multiply = byzantium_conquests_ai_score_value
#
#		#AGOT Disabled
#		# add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing
#	}
#}

