decisions = {
	bloodline_of_george = {
		is_high_prio = yes
		potential = {
			ai = no			
			dynasty = 450000
			NOT = {
				has_global_flag = george_bloodline
			}
		}
		allow = {
			custom_tooltip = {
				text = has_100_inspiration
				check_variable = { 
					which = GRRMPower value = 100
				}
			}
		}
		effect = {
			set_global_flag = george_bloodline
			create_bloodline = {
				type = george_bloodline
				inheritance = all_descendants
			}
		}
	}
	assume_mantle_of_george = {
		is_high_prio = yes
		potential = {
			ai = no			
			dynasty = 450000
			NOT = { has_character_modifier = grrm_power }
		}
		allow = {
			always = yes
		}
		effect = {
			hidden_tooltip = {
				character_event = { id = grrm.3 }
			}
		}
	}
	summon_dragonlord_invader = {
		is_high_prio = yes
		potential = {
			ai = no			
			dynasty = 450000
			has_artifact = grrm_book_of_dragons
		}
		allow = {
			custom_tooltip = {
				text = has_50_inspiration
				check_variable = { 
					which = GRRMPower value = 50
				}
			}
		}
		effect = {
			custom_tooltip = {
				text = magic_returns
				character_event = { id = grrm.15 }
				subtract_variable = { which = GRRMPower value = 50 }
			}
		}
	}
	write_novel = {
		is_high_prio = yes
		potential = {
			ai = no			
			dynasty = 450000
			NOT = {
				has_character_flag = writing_novel
			}
			custom_tooltip = {
				text = all_books_written
				george_all_books_written = true
			}
		}
		allow = {
			custom_tooltip = {
				text = has_30_inspiration
				check_variable = { 
					which = GRRMPower value = 30
				}
			}
			custom_tooltip = {
				text = all_books_written
				george_all_books_written = true
			}
		}
		effect = {
			hidden_tooltip = {
				character_event = { id = grrm.4 }
				set_character_flag = writing_novel
				subtract_variable = { which = GRRMPower value = 30 }
			}
		}
	}
	open_studies = {
		potential = {
			ai = no
			dynasty = 450000
			has_character_flag = studies_hidden
		}
		allow = {
			always = yes
		}
		effect = {
			clr_character_flag = studies_hidden
		}
	}
	close_studies = {
		potential = {
			ai = no
			dynasty = 450000
			NOT = { has_character_flag = studies_hidden }
		}
		allow = {
			always = yes
		}
		effect = {
			set_character_flag = studies_hidden
		}
	}
	study_intrigue = {
		potential = {
			ai = no
			dynasty = 450000
			NOT = {
				has_character_flag = studying_intrigue
				has_character_flag = studying_martial
				has_character_flag = studying_stewardship
				has_character_flag = studying_diplo
				has_character_flag = studies_hidden
			}
		}
		allow = {
			custom_tooltip = {
				text = has_10_inspiration
				check_variable = { 
					which = GRRMPower value = 10
				}
			}
		}
		effect = {
			hidden_tooltip = {
				character_event = { id = grrm.7 }
				set_character_flag = studying_intrigue
				subtract_variable = { which = GRRMPower value = 10 }
			}
		}
	}
	study_martial = {
		potential = {
			ai = no
			dynasty = 450000
			NOT = {
				has_character_flag = studying_intrigue
				has_character_flag = studying_martial
				has_character_flag = studying_stewardship
				has_character_flag = studying_diplo
				has_character_flag = studies_hidden
			}
		}
		allow = {
			custom_tooltip = {
				text = has_10_inspiration
				check_variable = { 
					which = GRRMPower value = 10
				}
			}
		}
		effect = {
			hidden_tooltip = {
				character_event = { id = grrm.13 }
				set_character_flag = studying_martial
				subtract_variable = { which = GRRMPower value = 10 }
			}
		}
	}
	study_stewardship = {
		potential = {
			ai = no
			dynasty = 450000
			NOT = {
				has_character_flag = studying_intrigue
				has_character_flag = studying_martial
				has_character_flag = studying_stewardship
				has_character_flag = studying_diplo
				has_character_flag = studies_hidden
			}
		}
		allow = {
			custom_tooltip = {
				text = has_10_inspiration
				check_variable = { 
					which = GRRMPower value = 10
				}
			}
		}
		effect = {
			hidden_tooltip = {
				character_event = { id = grrm.11 }
				set_character_flag = studying_stewardship
				subtract_variable = { which = GRRMPower value = 10 }
			}
		}
	}
	study_diplomacy = {
		potential = {
			ai = no
			dynasty = 450000
			NOT = {
				has_character_flag = studying_intrigue
				has_character_flag = studying_martial
				has_character_flag = studying_stewardship
				has_character_flag = studying_diplo
				has_character_flag = studies_hidden
			}
		}
		allow = {
			custom_tooltip = {
				text = has_10_inspiration
				check_variable = { 
					which = GRRMPower value = 10
				}
			}
		}
		effect = {
			hidden_tooltip = {
				character_event = { id = grrm.9 }
				set_character_flag = studying_diplo
				subtract_variable = { which = GRRMPower value = 10 }
			}
		}
	}
}

targeted_decisions = {
	george_plot_twist = {		#general_opinion -10
		diplomacy_icon = GFX_decision_george
		from_potential = { 
			ai = no 
			dynasty = 450000
			has_artifact = grrm_book_plot_twist
		}
		potential = { 
			is_within_diplo_range = FROM
		}
		allow = {
			FROM = {
				is_inaccessible_or_incapable_trigger = no
				has_regent = no
				custom_tooltip = {
					text = has_10_inspiration
					check_variable = { 
						which = GRRMPower value = 10
					}
				}
			}
			ROOT = {
				is_within_diplo_range = FROM
				in_seclusion = no
				NOT = { has_non_aggression_pact_with = FROM }
				NOT = { 
					has_character_modifier = vicious_rumors
				}
			}
		}
		effect = {
			FROM = {
				subtract_variable = { which = GRRMPower value = 10 }
			}
			ROOT = { 
				add_character_modifier = { name = vicious_rumors duration = 300 }
			}
		}
	}

	george_adaptation = {		#general_opinion -20
		diplomacy_icon = GFX_decision_george
		from_potential = { 
			ai = no 
			dynasty = 450000
			has_artifact = grrm_book_adaptation
		}
		potential = { 
			is_within_diplo_range = FROM
		}
		allow = {
			FROM = {
				is_inaccessible_or_incapable_trigger = no
				has_regent = no
				custom_tooltip = {
					text = has_20_inspiration
					check_variable = { 
						which = GRRMPower value = 20
					}
				}
			}
			ROOT = {
				is_within_diplo_range = FROM
				in_seclusion = no
				NOT = { has_non_aggression_pact_with = FROM }
				NOT = { 
					has_character_modifier = vicious_rumors_2
				}
			}
		}
		effect = {
			FROM = {
				subtract_variable = { which = GRRMPower value = 20 }
			}
			ROOT = { 
				add_character_modifier = { name = vicious_rumors_2 duration = 300 }
			}
		}
	}

	### Beginning of Health ###

	george_heal_physical = {		#heal
		diplomacy_icon = GFX_decision_george
		from_potential = { 
			ai = no 
			dynasty = 450000
			has_artifact = grrm_book_of_healing_physical
		}
		potential = { 
			is_within_diplo_range = FROM
		}
		allow = {
			FROM = {
				is_inaccessible_or_incapable_trigger = no
				has_regent = no
				custom_tooltip = {
					text = has_40_inspiration
					check_variable = { 
						which = GRRMPower value = 40
					}
				}
			}
			ROOT = {
				is_within_diplo_range = FROM
			}
		}
		effect = {
			FROM = {
				subtract_variable = { which = GRRMPower value = 40 }
			}
			custom_tooltip = {
				text = heal_physical_ailment
				ROOT = { 
					remove_trait = wounded
					remove_trait = incapable
					remove_trait = infirm
					remove_trait = scarred
					remove_trait = scarred_mid
					remove_trait = scarred_high
					remove_trait = maimed
					remove_trait = disfigured
					remove_trait = mangled
					remove_trait = one_eyed
					remove_trait = one_handed
					remove_trait = one_legged
					remove_trait = severely_injured
					remove_trait = clubfooted
					remove_trait = harelip
					remove_trait = hunchback
					remove_trait = feeble
					remove_trait = is_malnourished
					remove_trait = crippled
					remove_trait = greyscale_scarred
					remove_trait = blinded_age
					remove_trait = disfigured_AGOT
				}
			}
		}
	}

	george_heal_mental = {		#heal mental
		diplomacy_icon = GFX_decision_george
		from_potential = { 
			ai = no 
			dynasty = 450000
			has_artifact = grrm_book_of_healing_mental
		}
		potential = { 
			is_within_diplo_range = FROM
		}
		allow = {
			FROM = {
				is_inaccessible_or_incapable_trigger = no
				has_regent = no
				custom_tooltip = {
					text = has_30_inspiration
					check_variable = { 
						which = GRRMPower value = 30
					}
				}
			}
			ROOT = {
				is_within_diplo_range = FROM
			}
		}
		effect = {
			FROM = {
				subtract_variable = { which = GRRMPower value = 30 }
			}
			custom_tooltip = {
				text = heal_mental_ailment
				ROOT = { 
					remove_trait = depressed
					remove_trait = lunatic
					remove_trait = possessed
					remove_trait = stressed
					
				}
			}
		}
	}

	george_heal_disease = {		#heal disease
		diplomacy_icon = GFX_decision_george
		from_potential = { 
			ai = no 
			dynasty = 450000
			has_artifact = grrm_book_of_healing_disease
		}
		potential = { 
			is_within_diplo_range = FROM
		}
		allow = {
			FROM = {
				is_inaccessible_or_incapable_trigger = no
				has_regent = no
				custom_tooltip = {
					text = has_40_inspiration
					check_variable = { 
						which = GRRMPower value = 40
					}
				}
			}
			ROOT = {
				is_within_diplo_range = FROM
			}
		}
		effect = {
			FROM = {
				subtract_variable = { which = GRRMPower value = 40 }
			}
			custom_tooltip = {
				text = heal_disease_ailment
				ROOT = { 
					remove_trait = has_aztec_disease
					remove_trait = has_typhus
					remove_trait = cancer
					remove_trait = has_tuberculosis
					remove_trait = dancing_plague
					remove_trait = dysentery
					remove_trait = flu
					remove_trait = food_poisoning
					remove_trait = gout
					remove_trait = syphilitic
					remove_trait = has_typhoid_fever
					remove_trait = ill 
					remove_trait = leper 
					remove_trait = has_measles
					remove_trait = pneumonic
					remove_trait = rabies
					remove_trait = scurvy
					remove_trait = sickly
					remove_trait = has_small_pox
					remove_trait = has_bubonic_plague
					remove_trait = has_grey_plague
					remove_trait = has_greyscale
					remove_trait = has_bloody_flux
					remove_trait = has_pox
					remove_trait = has_red_death
					remove_trait = has_butterfly_fever
					remove_trait = old_ones_scourge
				}
			}
		}
	}

	### End of Health ###

	george_madness = {		#gives lunatic or possessed
		diplomacy_icon = GFX_decision_george
		from_potential = { 
			ai = no 
			dynasty = 450000
			has_artifact = grrm_book_madness
		}
		potential = { 
			is_within_diplo_range = FROM
		}
		allow = {
			FROM = {
				is_inaccessible_or_incapable_trigger = no
				has_regent = no
				custom_tooltip = {
					text = has_30_inspiration
					check_variable = { 
						which = GRRMPower value = 30
					}
				}
			}
			ROOT = {
				is_within_diplo_range = FROM
				in_seclusion = no
				NOT = { has_non_aggression_pact_with = FROM }
				NOT = { 
					OR = {
						trait = lunatic
						trait = possessed
					}
				}
			}
		}
		effect = {
			FROM = {
				subtract_variable = { which = GRRMPower value = 30 }
			}
			ROOT = { 
				random_list = {
					50 = {
						add_trait = possessed
					}
					50 = {
						add_trait = lunatic
					}
				}	
			}
		}
	}

	george_sickness = {		#gives random disease
		diplomacy_icon = GFX_decision_george
		from_potential = { 
			ai = no 
			dynasty = 450000
			has_artifact = grrm_book_sickness
		}
		potential = { 
			is_within_diplo_range = FROM
		}
		allow = {
			FROM = {
				is_inaccessible_or_incapable_trigger = no
				has_regent = no
				custom_tooltip = {
					text = has_40_inspiration
					check_variable = { 
						which = GRRMPower value = 40
					}
				}
			}
			ROOT = {
				is_within_diplo_range = FROM
				in_seclusion = no
				NOT = { has_non_aggression_pact_with = FROM }
				is_ill = no
			}
		}
		effect = {
			FROM = {
				subtract_variable = { which = GRRMPower value = 40 }
			}
			ROOT = { 
				custom_tooltip = {
					text = gets_random_disease
					random_list = {
						10 = {
							add_trait = has_bloody_flux
						}
						10 = {
							add_trait = has_typhoid_fever
						}
						10 = {
							add_trait = has_grey_plague
						}
						10 = {
							add_trait = has_bubonic_plague
						}
						10 = {
							add_trait = has_small_pox
						}
						10 = {
							add_trait = dancing_plague
						}
						10 = {
							add_trait = old_ones_scourge
						}
						10 = {
							add_trait = has_red_death
						}
						10 = {
							add_trait = has_butterfly_fever
						}
					}	
				}
			}
		}
	}
}

title_decisions = {
	george_claim_decision = {		#gives a bastard a claim on target
		diplomacy_icon = GFX_decision_george
		from_potential = { 
			dynasty = 450000
			ai = no 
			has_artifact = grrm_book_of_bastards
		}
		potential = {
			tier = COUNT
		}
		allow = {
			FROM = {
				is_inaccessible_or_incapable_trigger = no
				has_regent = no
				custom_tooltip = {
					text = has_20_inspiration
					check_variable = { 
						which = GRRMPower value = 20
					}
				}
				any_child = { 
					OR = {
						trait = legit_bastard
						trait = bastard
					}
					num_of_claims < 1
				}
			}
		}
		effect = {
			ROOT = {
				save_event_target_as = claim
			}
			FROM = {
				subtract_variable = { which = GRRMPower value = 20 }
				random_child = { 
					if = {
						limit = { 
							OR = {
								trait = legit_bastard
								trait = bastard
							}
							num_of_claims < 1
						}
						add_claim = event_target:claim
					}
				}
			}
		}
	}

	george_claim_decision_child = {		#gives a natural child a claim on target
		diplomacy_icon = GFX_decision_george
		from_potential = { 
			dynasty = 450000
			ai = no 
			has_artifact = grrm_book_death_of_author
		}
		potential = {
			tier = COUNT
		}
		allow = {
			FROM = {
				is_inaccessible_or_incapable_trigger = no
				has_regent = no
				custom_tooltip = {
					text = has_40_inspiration
					check_variable = { 
						which = GRRMPower value = 40
					}
				}
			}
		}
		effect = {
			ROOT = {
				save_event_target_as = claim
			}
			FROM = {
				subtract_variable = { which = GRRMPower value = 40 }
				random_child = { 
					if = {
						limit = { 
							NOR = {
								trait = legit_bastard
								trait = bastard
							}
							num_of_claims < 1
						}
						add_claim = event_target:claim
					}
				}
			}
		}
	}
}