namespace = Plus

#reserved: Plus.3400 to Plus.3499

#######################################
# CUSTOM TARGETTED DECISION EVENTS
#######################################

## Player Diplo Action to give custom amounts of wealth
# Plus.3400 [Target]
#
# Put the target in the FROM scope before interacting with player
character_event = {
	id = Plus.3400
	hide_window = yes
	is_triggered_only = yes
	
	immediate = {
		FROMFROM = { character_event = { id = Plus.3401 } } # Normally FROM would suffice, but FROMFROM is the actual origin here
	}
}


# Plus.3401 [Player]
#
# Aprox., how much money do you want to send?
# 
character_event = {
	id = Plus.3401
	
	desc = Plus.3401.desc
	picture = GFX_evt_give_money
	is_triggered_only = yes

	option = {
		name = Plus.3401.opt.a # Less than 100
		hidden_tooltip = {
			FROM = { 
				set_character_flag = less_than_100
				character_event = { id = Plus.3402 } 
			}
		}
	}
	
	option = {
		name = Plus.3401.opt.b # Between 100 and 300
		trigger = {
			wealth = 100
		}
		hidden_tooltip = {
			FROM = { 
				set_character_flag = between_100_and_300
				character_event = { id = Plus.3402 } 
			}
		}
	}
	
	option = {
		name = Plus.3401.opt.c # 500 and higher
		trigger = {
			wealth = 300
		}		
		hidden_tooltip = {
			FROM = { 
				set_character_flag = more_than_300
				character_event = { id = Plus.3402 } 
			}
		}
	}

	option = {
		name = CANCEL
		hidden_tooltip = {
			FROM = { clr_character_flag = ck2plus_ctd_give_gold_busy }
		}
	}	
}

# Plus.3402 [Target]
#
# Bounce
# 
character_event = {
	id = Plus.3402
	is_triggered_only = yes
	hide_window = yes
	
	immediate = {
		if = {
			limit = { has_character_flag = less_than_100 }
			FROM = { character_event = { id = Plus.3403 } }
			clr_character_flag = less_than_100
		}
		if = {
			limit = { has_character_flag = between_100_and_300 }
			FROM = { character_event = { id = Plus.3403 } }
			clr_character_flag = between_100_and_300
		}
		if = {
			limit = { has_character_flag = more_than_300 }
			FROM = { character_event = { id = Plus.3403 } }
			clr_character_flag = more_than_300
		}
	}
}

# Plus.3403 [Player]
#
# Specifically, how much money do you want to send?
# 
character_event = {
	id = Plus.3403
	
	desc = Plus.3403.desc
	picture = GFX_evt_give_money
	is_triggered_only = yes

	option = {
		name = Plus.3403.opt.a # 10 wealth
		trigger = {
			FROM = { has_character_flag = less_than_100 }
			wealth = 10
		}
		
		wealth = -10
		FROM = { wealth = 10 }
		hidden_tooltip = {
			FROM = {
				set_character_flag = gave_10
				letter_event = { id = Plus.3404 }
				clr_character_flag = ck2plus_ctd_give_gold_busy
				clr_character_flag = gave_10
			}
		}
	}
	
	option = {
		name = Plus.3403.opt.b # 25 Wealth
		trigger = {
			FROM = { has_character_flag = less_than_100 }
			wealth = 25
		}
		
		wealth = -25
		FROM = { wealth = 25 }
		hidden_tooltip = {
			FROM = {
				set_character_flag = gave_25
				letter_event = { id = Plus.3404 }
				clr_character_flag = ck2plus_ctd_give_gold_busy
				clr_character_flag = gave_25
			}
		}
	}
	
	option = {
		name = Plus.3403.opt.c # 50 Wealth
		trigger = {
			FROM = { has_character_flag = less_than_100 }
			wealth = 50
		}
		
		wealth = -50
		FROM = { wealth = 50 }
		hidden_tooltip = {
			FROM = {
				set_character_flag = gave_50
				letter_event = { id = Plus.3404 }
				clr_character_flag = ck2plus_ctd_give_gold_busy
				clr_character_flag = gave_50
			}
		}
	}
	
	option = {
		name = Plus.3403.opt.d # 100 wealth
		trigger = {
			FROM = { has_character_flag = between_100_and_300 }
			wealth = 100
		}
		
		wealth = -100
		FROM = { wealth = 100 }
		hidden_tooltip = {
			FROM = {
				set_character_flag = gave_100
				letter_event = { id = Plus.3404 }
				clr_character_flag = ck2plus_ctd_give_gold_busy
				clr_character_flag = gave_100
			}
		}
	}
	
	option = {
		name = Plus.3403.opt.e # 200 Wealth
		trigger = {
			FROM = { has_character_flag = between_100_and_300 }
			wealth = 200
		}
		
		wealth = -200
		FROM = { wealth = 200 }
		hidden_tooltip = {
			FROM = {
				set_character_flag = gave_200
				letter_event = { id = Plus.3404 }
				clr_character_flag = ck2plus_ctd_give_gold_busy
				clr_character_flag = gave_200
			}
		}
	}
	
	option = {
		name = Plus.3403.opt.f # 300 Wealth
		trigger = {
			FROM = { has_character_flag = between_100_and_300 }
			wealth = 300
		}
		
		wealth = -300
		FROM = { wealth = 300 }
		hidden_tooltip = {
			FROM = {
				set_character_flag = gave_300
				letter_event = { id = Plus.3404 }
				clr_character_flag = ck2plus_ctd_give_gold_busy
				clr_character_flag = gave_300
			}
		}
	}
	
	option = {
		name = Plus.3403.opt.g # 500 wealth
		trigger = {
			FROM = { has_character_flag = more_than_300 }
			wealth = 500
		}
		
		wealth = -500
		FROM = { wealth = 500 }
		hidden_tooltip = {
			FROM = {
				set_character_flag = gave_500
				letter_event = { id = Plus.3404 }
				clr_character_flag = ck2plus_ctd_give_gold_busy
				clr_character_flag = gave_500
			}
		}
	}
	
	option = {
		name = Plus.3403.opt.h # 750 Wealth
		trigger = {
			FROM = { has_character_flag = more_than_300 }
			wealth = 750
		}
		
		wealth = -750
		FROM = { wealth = 750 }
		hidden_tooltip = {
			FROM = {
				set_character_flag = gave_750
				letter_event = { id = Plus.3404 }
				clr_character_flag = ck2plus_ctd_give_gold_busy
				clr_character_flag = gave_750
			}
		}
	}
	
	option = {
		name = Plus.3403.opt.i # 1000 Wealth
		trigger = {
			FROM = { has_character_flag = more_than_300 }
			wealth = 1000
		}
		
		wealth = -1000
		FROM = { wealth = 1000 }
		hidden_tooltip = {
			FROM = {
				set_character_flag = gave_1000
				letter_event = { id = Plus.3404 }
				clr_character_flag = ck2plus_ctd_give_gold_busy
				clr_character_flag = gave_1000
			}
		}
	}

	option = {
		name = CANCEL
		hidden_tooltip = {
			FROM = { clr_character_flag = ck2plus_ctd_give_gold_busy }
		}
	}	
}

# Plus.3404 [Target]
#
# Recieve Notification
# 
letter_event = {
	id = Plus.3404
	desc = {
		text = Plus.3404.desc.gave_10
		trigger = {
			has_character_flag = gave_10
		}
	}
	desc = {
		text = Plus.3404.desc.gave_25
		trigger = {
			has_character_flag = gave_25
		}
	}
	desc = {
		text = Plus.3404.desc.gave_50
		trigger = {
			has_character_flag = gave_50
		}
	}
	desc = {
		text = Plus.3404.desc.gave_100
		trigger = {
			has_character_flag = gave_100
		}
	}
	desc = {
		text = Plus.3404.desc.gave_200
		trigger = {
			has_character_flag = gave_200
		}
	}
	desc = {
		text = Plus.3404.desc.gave_300
		trigger = {
			has_character_flag = gave_300
		}
	}
	desc = {
		text = Plus.3404.desc.gave_500
		trigger = {
			has_character_flag = gave_500
		}
	}
	desc = {
		text = Plus.3404.desc.gave_750
		trigger = {
			has_character_flag = gave_750
		}
	}
	desc = {
		text = Plus.3404.desc.gave_1000
		trigger = {
			has_character_flag = gave_1000
		}
	}
	is_triggered_only = yes
	
	option = {
		name = OK
	}
}