# Targetted decisions are possible vs _all_ other characters and shown are in the Diplomacy View, not the Intrigue View. The taker is in the FROM scope.
#
# filter = [self/court/home_court/vassals/sub_realm/realm/dynasty/spouse/liege/religious_head/rivals/society/all] ('self' MUST be set for decisions targetting only the taker, the other filter types can be set to lessen CPU load)
# ai_target_filter = [self/court/home_court/vassals/sub_realm/realm/dynasty/spouse/liege/religious_head/rivals/society/all] (which characters for which the AI evaluates the decision.)
#	court: all characters in the host court, including prisoners, and characters currently away (wards, prisoners, etc)
#	home_court: all characters in the home court, including prisoners, and characters currently away (wards, prisoners, etc)
#	vassals: direct vassal rulers of the AI's employer
#	sub_realm: all characters below the AI's employer
#	realm: all characters in the same top realm as the AI
#	dynasty: all members of the same dynasty (but not yourself)
#	rivals: your rivals plus any character you have an opinion modifier with 'crime = yes' set (the same set of characters the 'is_foe' trigger evaluates)
# society: the other members of your society (but not yourself)
#	all: all living characters (Avoid if possible. VERY CPU-HEAVY!)
#	

targetted_decisions = {

	da_get_merc_cash = {
	
		from_potential = {
			is_landed = yes
		}
		
		potential = {
			primary_title = {
				band_creator = {
					character = FROM
				}
			}		
			mercenary = yes			
		}
		
		allow = {
			treasury = 100
			FROM = {
				NOT = { has_character_modifier = da_merc_get_cash }
			}
		}
		effect = {
			
			hidden_tooltip = {
			
	
				FROM = {
				
					if = {
						limit = {
							diplomacy = 8
							NOT = { diplomacy = 12 }
						}
						add_character_modifier = {
							name = da_merc_get_cash
							duration = 1825
							hidden = yes
						}
					}
					
					if = {
						limit = {
							diplomacy = 6
							NOT = { diplomacy = 8 }
						}
						add_character_modifier = {
							name = da_merc_get_cash
							duration = 2190
							hidden = yes
						}
					}

					if = {
						limit = {
							diplomacy = 4
							NOT = { diplomacy = 6 }
						}
						add_character_modifier = {
							name = da_merc_get_cash
							duration = 2920
							hidden = yes
						}
					}

					if = {
						limit = {
							diplomacy = 2
							NOT = { diplomacy = 4 }
						}
						add_character_modifier = {
							name = da_merc_get_cash
							duration = 3650
							hidden = yes
						}
					}	

					if = {
						limit = {
							NOT = { diplomacy = 2 }
						}
						add_character_modifier = {
							name = da_merc_get_cash
							duration = 5475
							hidden = yes
						}
					}	

					if = {
						limit = {
							diplomacy = 12
							NOT = { diplomacy = 15 }
						}
						add_character_modifier = {
							name = da_merc_get_cash
							duration = 1460
							hidden = yes
						}
					}

					if = {
						limit = {
							diplomacy = 15
							NOT = { diplomacy = 18 }
						}
						add_character_modifier = {
							name = da_merc_get_cash
							duration = 1095
							hidden = yes
						}
					}	

					if = {
						limit = {
							diplomacy = 18
							NOT = { diplomacy = 21 }
						}
						add_character_modifier = {
							name = da_merc_get_cash
							duration = 730
							hidden = yes
						}
					}					

					if = {
						limit = {
							diplomacy = 21
						}
						add_character_modifier = {
							name = da_merc_get_cash
							duration = 365
							hidden = yes
						}
					}
					
					character_event = { id = darkages.72385 }
					
				}
			}
			
		}
		
		ai_will_do = {
			factor = 0.01
			
			modifier = {
				factor = 10
				FROM = { war = yes }
			}
		}
	}
	
	
}
