namespace = gift_troops_ai
character_event = {
	id = gift_troops_ai.0
	desc = EVTDESCgift_troops_ai.0
	picture = GFX_evt_council
	is_triggered_only = yes

	option = {
		name = EVTOPTAgift_troops_ai.0
		trigger = {
			has_character_flag = troops1
		}
		event_target:sin_troop_target = {
			capital_scope = {
				holder_scope = {
					spawn_unit = {
						owner = THIS
						province = PREV
						leader = none
						troops = {
							knights = { 50 50 }
							light_cavalry = { 150 150 }
							light_infantry = { 300 300 }
							heavy_infantry = { 200 200 }
							archers = { 300 300 }
						}
						attrition = 1.0
						reinforcing = yes
						reinforce_rate_multiplier = 0.1
						maintenance_multiplier = 0.0
  						disband_on_peace = yes
						merge = yes
					}
				}
			}
			character_event = { id = gift_troops_ai.1 }
		}
		clr_character_flag = troops1
		clr_character_flag = buying_troops
		wealth = -50
	}
	option = {
		name = EVTOPTBgift_troops_ai.0
		trigger = {
			has_character_flag = troops1
			wealth = 100
		}
		event_target:sin_troop_target = {
			capital_scope = {
				holder_scope = {
					spawn_unit = {
						owner = THIS
						province = PREV
						leader = none
						troops = {
							knights = { 50 50 }
							light_cavalry = { 150 150 }
							light_infantry = { 300 300 }
							heavy_infantry = { 200 200 }
							archers = { 300 300 }
						}
						attrition = 1.0
						reinforcing = yes
						reinforce_rate_multiplier = 0.1
						maintenance_multiplier = 0.0
  						disband_on_peace = yes
						merge = yes
					}
					spawn_unit = {
						owner = THIS
						province = PREV
						leader = none
						troops = {
							knights = { 50 50 }
							light_cavalry = { 150 150 }
							light_infantry = { 300 300 }
							heavy_infantry = { 200 200 }
							archers = { 300 300 }
						}
						attrition = 1.0
						reinforcing = yes
						reinforce_rate_multiplier = 0.1
						maintenance_multiplier = 0.0
  						disband_on_peace = yes
						merge = yes
					}
				}
			}
			character_event = { id = gift_troops_ai.1 }
		}
		clr_character_flag = troops1
		clr_character_flag = buying_troops
		wealth = -100
	}
	option = {
		name = EVTOPTCgift_troops_ai.0
		trigger = {
			has_character_flag = troops1
			wealth = 150
		}
		event_target:sin_troop_target = {
			capital_scope = {
				holder_scope = {
					spawn_unit = {
						owner = THIS
						province = PREV
						leader = none
						troops = {
							knights = { 50 50 }
							light_cavalry = { 150 150 }
							light_infantry = { 300 300 }
							heavy_infantry = { 200 200 }
							archers = { 300 300 }
						}
						attrition = 1.0
						reinforcing = yes
						reinforce_rate_multiplier = 0.1
						maintenance_multiplier = 0.0
  						disband_on_peace = yes
						merge = yes
					}
					spawn_unit = {
						owner = THIS
						province = PREV
						leader = none
						troops = {
							knights = { 50 50 }
							light_cavalry = { 150 150 }
							light_infantry = { 300 300 }
							heavy_infantry = { 200 200 }
							archers = { 300 300 }
						}
						attrition = 1.0
						reinforcing = yes
						reinforce_rate_multiplier = 0.1
						maintenance_multiplier = 0.0
  						disband_on_peace = yes
						merge = yes
					}
					spawn_unit = {
						owner = THIS
						province = PREV
						leader = none
						troops = {
							knights = { 50 50 }
							light_cavalry = { 150 150 }
							light_infantry = { 300 300 }
							heavy_infantry = { 200 200 }
							archers = { 300 300 }
						}
						attrition = 1.0
						reinforcing = yes
						reinforce_rate_multiplier = 0.1
						maintenance_multiplier = 0.0
  						disband_on_peace = yes
						merge = yes
					}
				}
			}
			character_event = { id = gift_troops_ai.1 }
		}
		clr_character_flag = troops1
		clr_character_flag = buying_troops
		wealth = -150
	}
	option = {
		name = EVTOPTDgift_troops_ai.0
		trigger = {
			has_character_flag = troops2
			wealth = 250
		}
		event_target:sin_troop_target = {
			capital_scope = {
				holder_scope = {
					spawn_unit = {
						owner = THIS
						province = PREV
						leader = none
						troops = {
							knights = { 250 250 }
							light_cavalry = { 750 750 }
							light_infantry = { 1500 1500 }
							heavy_infantry = { 1000 1000 }
							archers = { 1500 1500 }
						}
						attrition = 1.0
						reinforcing = yes
						reinforce_rate_multiplier = 0.1
						maintenance_multiplier = 0.0
  						disband_on_peace = yes
						merge = yes
					}
				}
			}
			character_event = { id = gift_troops_ai.1 }
		}
		clr_character_flag = troops2
		clr_character_flag = buying_troops
		wealth = -250
	}
	option = {
		name = EVTOPTEgift_troops_ai.0
		trigger = {
			has_character_flag = troops2
			wealth = 500
		}
		event_target:sin_troop_target = {
			capital_scope = {
				holder_scope = {
					spawn_unit = {
						owner = THIS
						province = PREV
						leader = none
						troops = {
							knights = { 250 250 }
							light_cavalry = { 750 750 }
							light_infantry = { 1500 1500 }
							heavy_infantry = { 1000 1000 }
							archers = { 1500 1500 }
						}
						attrition = 1.0
						reinforcing = yes
						reinforce_rate_multiplier = 0.1
						maintenance_multiplier = 0.0
  						disband_on_peace = yes
						merge = yes
					}
					spawn_unit = {
						owner = THIS
						province = PREV
						leader = none
						troops = {
							knights = { 250 250 }
							light_cavalry = { 750 750 }
							light_infantry = { 1500 1500 }
							heavy_infantry = { 1000 1000 }
							archers = { 1500 1500 }
						}
						attrition = 1.0
						reinforcing = yes
						reinforce_rate_multiplier = 0.1
						maintenance_multiplier = 0.0
  						disband_on_peace = yes
						merge = yes
					}
				}
			}
			character_event = { id = gift_troops_ai.1 }
		}
		clr_character_flag = troops2
		clr_character_flag = buying_troops
		wealth = -500
	}
	option = {
		name = EVTOPTFgift_troops_ai.0
		trigger = {
			has_character_flag = troops2
			wealth = 750
		}
		event_target:sin_troop_target = {
			capital_scope = {
				holder_scope = {
					spawn_unit = {
						owner = THIS
						province = PREV
						leader = none
						troops = {
							knights = { 250 250 }
							light_cavalry = { 750 750 }
							light_infantry = { 1500 1500 }
							heavy_infantry = { 1000 1000 }
							archers = { 1500 1500 }
						}
						attrition = 1.0
						reinforcing = yes
						reinforce_rate_multiplier = 0.1
						maintenance_multiplier = 0.0
  						disband_on_peace = yes
						merge = yes
					}
					spawn_unit = {
						owner = THIS
						province = PREV
						leader = none
						troops = {
							knights = { 250 250 }
							light_cavalry = { 750 750 }
							light_infantry = { 1500 1500 }
							heavy_infantry = { 1000 1000 }
							archers = { 1500 1500 }
						}
						attrition = 1.0
						reinforcing = yes
						reinforce_rate_multiplier = 0.1
						maintenance_multiplier = 0.0
  						disband_on_peace = yes
						merge = yes
					}
					spawn_unit = {
						owner = THIS
						province = PREV
						leader = none
						troops = {
							knights = { 250 250 }
							light_cavalry = { 750 750 }
							light_infantry = { 1500 1500 }
							heavy_infantry = { 1000 1000 }
							archers = { 1500 1500 }
						}
						attrition = 1.0
						reinforcing = yes
						reinforce_rate_multiplier = 0.1
						maintenance_multiplier = 0.0
  						disband_on_peace = yes
						merge = yes
					}
				}
			}
			character_event = { id = gift_troops_ai.1 }
		}
		clr_character_flag = troops2
		clr_character_flag = buying_troops
		wealth = -750
	}
	option = {
		name = EVTOPTGgift_troops_ai.0
		IF = {
			limit = {
				has_character_flag = troops1
			}
			clr_character_flag = troops1
			set_character_flag = troops2
			character_event = { id = gift_troops_ai.0 }
			break = yes
		}
		IF = {
			limit = {
				has_character_flag = troops2
			}
			clr_character_flag = troops2
			set_character_flag = troops1
			character_event = { id = gift_troops_ai.0 }
			break = yes
		}
	}
}

character_event = {
	id = gift_troops_ai.1
	desc = EVTDESCgift_troops_ai.1
	picture = GFX_evt_council
	is_triggered_only = yes

	option = {
		name = EVTOPTAgift_troops_ai.1
		opinion = {
			modifier = opinion_my_saviour
			who = FROM
		}
	}
}