targetted_decisions = {

	player_gift_troops = {
		filter = all
		ai_target_filter = self

		from_potential = {
			ai = no
			NOT = { has_character_flag = buying_troops }
		}
		potential = {
			NOT = { character = FROM }
			is_ruler = yes
			OR = {
				any_friend = { character = FROM }
				any_liege = { character = FROM }
				any_dynasty_member = { character = FROM }
			}
		}
		allow = {
			ROOT = { war = yes }
			FROM = { wealth = 50 }
		}
		effect = {
			save_event_target_as = sin_troop_target
			FROM = {
				set_character_flag = buying_troops
				set_character_flag = troops1
				character_event = { id = gift_troops_ai.0 }
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}

}