RAJ_GOE_independence_movement = {

	#TODO_VD add violence
	RAJ_GOE_urge_non_violence = { 

		icon = GFX_decision_SWI_swiss_democratic_tradition_campaign
		
		state_target = any_controlled_state
		
		visible = { 
			OR = {
				has_completed_focus = RAJ_mahatma
			}
			NOT = { has_completed_focus = RAJ_forward_bloc }

		}
		
		available = {
			hidden_trigger = {
				always = yes
			}
		}
		on_map_mode = map_only
		target_root_trigger = {
			original_tag = RAJ
			has_completed_focus = RAJ_mahatma
			
		}
		target_trigger = {			
			FROM = {
				has_resistance = yes
				resistance > 0
				is_in_array = { RAJ.owned_states_at_game_start = THIS }
				is_controlled_by = RAJ
			}
		}
		
		cost = 15
		fire_only_once = no
		days_remove = 90
		ai_will_do = {
			base = 1

		}
		complete_effect = {
			FROM = {
				add_resistance = -60
			}
			ROOT = {
				add_autonomy_ratio = { 
					value = -0.05 
					#localization = LOC_KEY
				}
				custom_effect_tooltip = idea_RAJ_independence_movement_tt
				#add_to_variable = { RAJ_autonomy_gain_independence_movement = -0.05 tooltip = autonomy_gain_tt }
			}
		}
	}

	RAJ_GOE_urge_violence = { 

		icon = GFX_decision_revolt
		
		state_target = yes
		
		visible = { 

			has_completed_focus = RAJ_promote_violence_against_the_british
			NOT = { has_completed_focus = RAJ_give_me_blood_and_i_will_grant_you_freedom }
		}
		
		available = {
			hidden_trigger = {
				always = yes
			}
		}
		
		target_root_trigger = {
			original_tag = RAJ
			has_completed_focus = RAJ_promote_violence_against_the_british	
		}
		target_trigger = {			
			FROM = {
				has_resistance = yes
				is_in_array = { RAJ.owned_states_at_game_start = THIS }
				is_controlled_by = ROOT
			}
		}
		on_map_mode = map_only
		cost = 13
		fire_only_once = no
		days_remove = 90
		ai_will_do = {
			base = 0
			modifier = {
				FROM = {
					resistance < 67
				}
				add = 200
			}

			modifier = {
				FROM = {
					resistance < 87
				}
				add = 100
			}

		}
		complete_effect = {
			FROM = {
				add_resistance = 50
				add_compliance = -10
			}
			ROOT = {
				army_experience = 5
			}
		}
	}

	RAJ_GOE_try_to_arrest_bose = {
	    activation = {
			has_country_flag = RAJ_british_authorities_looking_to_arrest_bose
			original_tag = RAJ 
			NOT = { has_completed_focus = RAJ_give_me_blood_and_i_will_grant_you_freedom }

	    }

	    fire_only_once = yes
	    available = {
	    	hidden_trigger = {
	    		always = no
	    	}
	    }
	    cancel_trigger = {
	    	has_completed_focus = RAJ_go_into_hiding
	    }
	    #icon = mission_icon     # For GFX_decision_mission_icon
	    is_good = no
	    days_mission_timeout = 120
	    selectable_mission = no
	    complete_effect = {
	    	
	    }
	    timeout_effect = {
	    	set_country_flag = has_arrested_bose
	    	custom_effect_tooltip = RAJ_GOE_try_to_arrest_bose_tt
	    }
	}

	RAJ_GOE_foment_independence_tension = { 

		icon = GFX_decision_generic_political_rally
		
		state_target = yes
		
		visible = { 
			has_completed_focus = RAJ_protest_against_the_howell_monument
			NOT = { has_completed_focus = RAJ_give_me_blood_and_i_will_grant_you_freedom }
		}
		on_map_mode = map_only
		available = {
			hidden_trigger = {
				always = yes
			}
		}
		
		target_root_trigger = {
			original_tag = RAJ
			has_completed_focus = RAJ_protest_against_the_howell_monument	
		}
		target_trigger = {			
			FROM = {
				is_core_of = ROOT
				is_in_array = { RAJ.owned_states_at_game_start = THIS }
				is_controlled_by = ROOT

			}
		}
		
		cost = 20
		fire_only_once = no
		ai_will_do = {
			base = 0 
			modifier = {
				all_owned_state = {
					has_resistance = yes
					resistance > 87
				}
				add = 800
			}
		}
		complete_effect = {
			if = {
				limit = {
					NOT = { has_country_flag = RAJ_british_authorities_looking_to_arrest_bose }
				}
				effect_tooltip = {
					activate_mission = RAJ_GOE_try_to_arrest_bose
				}
				custom_effect_tooltip = RAJ_GOE_try_to_arrest_bose_tt
				hidden_effect = { set_country_flag = RAJ_british_authorities_looking_to_arrest_bose }
			}
			
			FROM = { 
				remove_core_of = ROOT 
				set_state_flag = pre_bose_core
				add_core_of = DIP
				force_enable_resistance = { 
					clear = no #if yes, will clear previously disabled resistance
					occupier = ROOT
					occupied = DIP
				}
				start_resistance = yes
				

			}  

			custom_effect_tooltip = RAJ_GOE_foment_independence_tension_tt


		}
	}
}

RAJ_GOE_tea_exports_cat = {
	RAJ_GOE_export_tea_subject = {
		icon = generic_construction
	
		
		visible = { 
			NOT = { has_war_with = ENG }
			is_subject_of = ENG
			check_variable = { RAJ_times_expanded_tea_exports < 5 }

		}
		
		available = {
			NOT = { has_war_with = ENG }
			is_subject_of = ENG
			custom_trigger_tooltip = {
				tooltip = RAJ_GOE_export_tea_subject_trigger
				check_variable = { RAJ_times_expanded_tea_exports < 5 }
			}
		}
		
		cost = 10
		fire_only_once = no

		ai_will_do = {
			base = 1

		}
		complete_effect = {
			if = {
				limit = {
					NOT = { has_dynamic_modifier = { modifier = idea_RAJ_tea_exports } }
				}
				add_dynamic_modifier = { modifier = idea_RAJ_tea_exports }
			}

			add_to_variable = { RAJ_autonomy_gain_tea_exports = -0.05 tooltip = autonomy_gain_tt }
			add_to_variable = { RAJ_building_speed_tea_exports = 0.05 tooltip = production_speed_buildings_factor_tt }

			add_to_variable = { RAJ_times_expanded_tea_exports = 1 }

		}
	}

	RAJ_GOE_export_tea_free = {
		icon = generic_construction
	
		
		visible = { 
			NOT = { has_war_with = ENG }
			NOT = { is_subject_of = ENG }
			check_variable = { RAJ_times_expanded_tea_exports < 5 }

		}
		
		available = {
			NOT = { has_war_with = ENG }
			is_subject = no
			custom_trigger_tooltip = {
				tooltip = RAJ_GOE_export_tea_subject_trigger
				check_variable = { RAJ_times_expanded_tea_exports < 5 }
			}
		}
		
		cost = 70
		fire_only_once = no

		ai_will_do = {
			base = 1

		}
		complete_effect = {

			try_build_civ_in_core_otherwise_build_in_controlled = yes
			add_to_variable = { RAJ_times_expanded_tea_exports = 1 }
			ENG = { add_stability = 0.02 }

		}
	}
}

RAJ_GOE_sikh_recruitment_cat = {
	
	RAJ_GOE_sikh_recruitment = {

		icon = GFX_decision_generic_prepare_civil_war
		
		state_target = yes
		
		visible = { 
			has_completed_focus = RAJ_punjab_autonomy
		}
		
		available = {
			FROM = { 
				controller = {
					OR = {
						original_tag = ROOT
						is_subject_of = ROOT
					}
				}
			}
			has_tech = gw_artillery
		}
		
		target_root_trigger = {
			original_tag = RAJ
			has_completed_focus = RAJ_punjab_autonomy
			NOT = { 
				has_dynamic_modifier = {
				 	modifier = idea_RAJ_sikh_approval_2
				} 
			}
		}
		target_trigger = {			
			OR = {
				FROM = { state = 440 }
				FROM = { state = 433 }
			}
		}

		highlight_states = {
			highlight_state_targets = {
				state = 440
				state = 433
			}
		}
		
		cost = 30
		fire_only_once = yes
		days_remove = 45
		ai_will_do = {
			base = 1

		}
		remove_effect = {
			if = {
				limit = {
					NOT = {has_template = "Sikh Division"}
				}
				division_template = {
					name = "Sikh Division"
					is_locked = yes
					division_names_group = RAJ_SIKH_01 # optional
					priority = 2 # optional 
					
					regiments = {
						mountaineers = { x = 0 y = 0 }
						mountaineers = { x = 0 y = 1 }
						mountaineers = { x = 0 y = 2 }
						mountaineers = { x = 0 y = 3 }
						mountaineers = { x = 1 y = 0 }
						mountaineers = { x = 1 y = 1 }
						mountaineers = { x = 1 y = 2 }
						mountaineers = { x = 1 y = 3 }
					}
					support = {
						artillery = { x = 0 y = 0 }
						engineer = { x = 0 y = 1 }
					}
				}
			}
			FROM = {

				custom_effect_tooltip = RAJ_GOE_sikh_recruitment_tt
				create_unit = {
					division = "name = \"Sikh Division\" division_template = \"Sikh Division\" start_experience_factor = 0.5 start_equipment_factor = 1 start_manpower_factor = 1"
					owner = ROOT
					allow_spawning_on_enemy_provs = no 
					count = 1
				}

				if = {
					limit = { has_dynamic_modifier = { modifier = idea_RAJ_sikh_approval } }
					remove_dynamic_modifier = { modifier = idea_RAJ_sikh_approval }
					add_dynamic_modifier = { modifier = idea_RAJ_sikh_approval_1 }
				}
				else_if = {
					limit = { has_dynamic_modifier = { modifier = idea_RAJ_sikh_approval_1 } }
					remove_dynamic_modifier = { modifier = idea_RAJ_sikh_approval_1 }
					add_dynamic_modifier = { modifier = idea_RAJ_sikh_approval_2 }
				}
			}
		}
	}
}

RAJ_GOE_india_indivisible_cat = {
	RAJ_core_states = {
		icon = GFX_decision_generic_prepare_civil_war
		
		state_target = yes
		
		visible = { 

		}
		
		available = {
			FROM = { 
				compliance > 40
				resistance < 15
			}
		}
		
		target_root_trigger = {
			is_raj_or_raj_inheritor = yes
		}
		target_trigger = {			
			FROM = { 
				NOT = { is_core_of = ROOT }  
			 	is_in_array = { array = RAJ.owned_states_at_game_start value = THIS } 
			 	is_controlled_by = ROOT
			 }
		}

		remove_effect = {
			FROM = { add_core_of = ROOT }
		}
		cancel_trigger = {
			has_political_power < 0
		}
		modifier = { political_power_gain = -0.1	}
		
		cost = 30
		fire_only_once = no
		days_remove = 70
		ai_will_do = {
			base = 200

		}
	}

	RAJ_core_states_eic = {
		icon = GFX_decision_generic_prepare_civil_war
		
		state_target = yes
		
		visible = { 
			has_completed_focus = RAJ_trade_federation_of_india
		}
		
		available = {
			FROM = { 
				is_owned_and_controlled_by = ROOT 
				compliance > 60
			}
			has_completed_focus = RAJ_trade_federation_of_india
		}
		
		target_root_trigger = {
			is_raj_or_raj_inheritor = yes
		}
		target_trigger = {			
			FROM = {  
				is_owned_and_controlled_by = ROOT 
				NOT = { is_core_of = ROOT }  
			 	NOT = { is_in_array = { array = RAJ.owned_states_at_game_start value = THIS } }
			 }
		}
		remove_effect = {
			FROM = { add_core_of = ROOT }
		}
		modifier = { 
			consumer_goods_factor = 0.4
		}
		
		cost = 120
		fire_only_once = no
		days_remove = 240
		ai_will_do = {
			base = 1

		}
	}
}

RAJ_GOE_famine_cat = {

	RAJ_reveal_famine_timeframe = {
		icon = GFX_decision_generic_prepare_civil_war
	
		visible = { 
			has_country_flag = RAJ_famine_has_started
			hidden_trigger = {
				NOT = { has_country_flag = reveal_true_famine_timeframe }
			}
		}
		
		available = {
			has_dynamic_modifier = {
				modifier = idea_RAJ_famine_country
			}
		}



		complete_effect = {
			custom_effect_tooltip = RAJ_reveal_famine_timeframe_tt
			hidden_effect = {
				set_country_flag = reveal_true_famine_timeframe
			}
		}

		cost = 25
		
		ai_will_do = {
			base = 0

		}
	}


	RAJ_ask_for_aid = {
		icon = GFX_decision_generic_prepare_civil_war
	
		visible = { 
			has_country_flag = RAJ_famine_has_started
			NOT = { has_country_flag = RAJ_asked_for_famine_help }
		}
		
		available = {
			has_dynamic_modifier = {
				modifier = idea_RAJ_famine_country
			}
		}

		highlight_states = {
			highlight_states_trigger = {
				has_dynamic_modifier = {
					modifier = idea_RAJ_famine_state
				}
			}
		}

		complete_effect = {
			every_other_country = {
				limit = { 
					OR = {
						is_in_faction_with = ROOT 
						original_tag = IRQ
					}
					NOT = {
						original_tag = ROOT
					}
					exists = yes
					has_capitulated = no
					industrial_complex > 5
					has_equipment = {
						convoy_1 > 50
					}
				}

				country_event = { id = GOE_RAJ_famine.9 days = 4 random_days = 2 }
				custom_effect_tooltip = if_they_accept
				event_option_tooltip = GOE_RAJ_famine.11.a
			}
			set_country_flag = RAJ_asked_for_famine_help
			
		}

		cost = 150
		
		ai_will_do = {
			base = 1

		}
	}

	RAJ_deploy_emergency_healthcare = {

		icon = GFX_decision_generic_prepare_civil_war

		visible = { 
			has_country_flag = RAJ_famine_has_started
		}
		
		available = {
			OR = {
				has_completed_focus = RAJ_quinine
				has_tech = tech_field_hospital
			}
		}

		days_remove = 70
		modifier = { civilian_factory_use = 3 }
		remove_effect = {
			add_to_variable = { RAJ_famine_shield = 10 tooltip = RAJ_famine_shield_tt  }
		}

		cost = 10
		
		ai_will_do = {
			base = 1

		}
	}

	RAJ_shut_down_black_markets = {

		icon = GFX_decision_generic_prepare_civil_war
		state_target = yes

		target_root_trigger = {
			is_raj_or_raj_inheritor = yes
		}

		target_trigger = {	
			FROM = { has_dynamic_modifier = { modifier = idea_RAJ_famine_state } }
		}
		visible = { 
			has_country_flag = RAJ_famine_has_started
		}
		
		available = {
			divisions_in_state = {
				state = FROM
				size > 0
			}
		}

		cancel_trigger = {
			divisions_in_state = {
				state = FROM
				size < 1
			}
		}

		days_remove = 950
		complete_effect = {
			custom_effect_tooltip = RAJ_black_markets_tt 

			hidden_effect = { 
				FROM = { 
					set_state_flag = RAJ_has_crushed_black_market
					calculate_famine_black_market = yes 
				}
			}
		}
		remove_effect = {

		}

		cancel_effect = {
			hidden_effect = {
				FROM = { clr_state_flag = RAJ_has_crushed_black_market }
				calculate_famine_black_market = yes
			}
		}

		cost = 0
		
		ai_will_do = {
			base = 1

		}
	}
}

political_actions = {

	mughal_west_britain_company_dec = {

		icon = generic_form_nation
		fire_only_once = yes
		allowed = {
			original_tag = RAJ 
		}

		visible = {
			original_tag = RAJ 
			has_completed_focus = RAJ_revisiting_inquities
		}

		available = {
			has_full_control_of_state = 122
		}
		cost = 50
		on_map_mode = decision_view_only

		highlight_states = { 
			highlight_state_targets = {
				state = 122
			}
		}

		complete_effect = {
			custom_effect_tooltip = create_mwbc_tt
			hidden_effect = {
				create_dynamic_country = {
					original_tag = RAJ
					save_event_target_as = west_britain_company
					122 = {
						event_target:west_britain_company = { transfer_state = PREV }
						add_core_of = event_target:west_britain_company
					}
					every_state = {
						limit = {
							OR = {
								state = 123
								state = 338
								state = 127
								state = 126
								state = 125
								state = 129
								state = 128
								state = 132
								state = 130
								state = 931
								state = 131
							}
						}
						add_core_of = PREV
					}
					set_capital = { state = 122 }
					set_politics = {
						ruling_party = neutrality
						elections_allowed = no
					}
					set_cosmetic_tag = mughal_west_britain_company
                    RAJ = {
                        set_autonomy = {
                            target=PREV
                            autonomy_state = autonomy_integrated_puppet
                            freedom_level = 0.5 # 0-1 
                            end_wars  = no # default yes. will not cancel non civil wars if set to no
                            end_civil_wars = no # default yes. will not cancel civil wars if set to no
                        }
                    }
				}
			}
		}

		ai_will_do = {
			base = 2000
		}
	}
	
	RAJ_GOE_raise_war_taxes = {
		icon = GFX_decision_generic_prepare_civil_war

		priority = 4
		visible = { 
			has_completed_focus = RAJ_war_taxes
		}
		
		available = {

			check_variable = { enemies^num > amount_of_times_raised_taxes tooltip = RAJ_GOE_raise_war_taxes_condition_tt }
			has_war_support > 0.02
			has_stability > 0.01
			has_war = yes
		}

		cancel_trigger = {
		}

		complete_effect = {
			if = {
				limit = { 
					NOT = { has_dynamic_modifier = { modifier = idea_RAJ_war_taxes } } 
				}
				add_dynamic_modifier = { modifier = idea_RAJ_war_taxes }
			}

			add_to_variable = { amount_of_times_raised_taxes = 1 }
			
			add_to_variable = { RAJ_war_taxes_war_support = -0.02 tooltip = war_support_factor_tt }
			add_to_variable = { RAJ_war_taxes_stability = -0.01 tooltip = stability_factor_tt }
			add_to_variable = { RAJ_war_taxes_mil = 0.02 tooltip = production_speed_arms_factory_factor_tt }

		}


		days_re_enable = 1
		cost = 5
		
		ai_will_do = {
			base = 0
			modifier = {
				has_war_support > 0.65
				add = 1
			}

		}
	}

	RAJ_GOE_reduce_war_taxes = {
		icon = GFX_decision_generic_prepare_civil_war

		priority = 3
		visible = { 
			has_completed_focus = RAJ_war_taxes
		}
		
		available = {
			check_variable = { amount_of_times_raised_taxes > 0 tooltip = RAJ_GOE_reduce_war_taxes_condition_tt}
			has_war = yes
		}

		cancel_trigger = {
		}

		complete_effect = {
			subtract_from_variable = { amount_of_times_raised_taxes = 1 }
			
			add_to_variable = { RAJ_war_taxes_war_support = 0.02 tooltip = war_support_factor_tt }
			add_to_variable = { RAJ_war_taxes_stability = 0.01 tooltip = stability_factor_tt }
			add_to_variable = { RAJ_war_taxes_mil = -0.02 tooltip = production_speed_arms_factory_factor_tt }

		}
		days_re_enable = 1
		cost = 5
		
		ai_will_do = {
			base = 0
			modifier = {
				has_war_support < 0.65
				add = 1
			}

		}
	}

	RAJ_GOE_azad_hind_radio_unaligned = {
		icon = decision_generic_political_discourse
		allowed = { 
			original_tag = RAJ 
		}


		visible = {
			OR = {
				has_idea = idea_RAJ_azad_hind_radio_communism
				has_idea = idea_RAJ_azad_hind_radio_fascism
			}
		}
		cost = 25
		days_remove = 120

		#modifier = {
			#civilian_factory_use = 4
		#}

		ai_will_do = {
			factor = 1
		}

		remove_effect = {
			if = {
				limit = {
					has_idea = idea_RAJ_azad_hind_radio_fascism 
				}
				swap_ideas = {
					add_idea = idea_RAJ_azad_hind_radio_unaligned
					remove_idea = idea_RAJ_azad_hind_radio_fascism
				}
			}
			else_if = {
				limit = {
					has_idea = idea_RAJ_azad_hind_radio_communism 
				}
				swap_ideas = {
					add_idea = idea_RAJ_azad_hind_radio_unaligned
					remove_idea = idea_RAJ_azad_hind_radio_communism
				}
			}
		}
	}

	RAJ_GOE_azad_hind_radio_fascism = {
		icon = decision_generic_political_discourse
		allowed = { 
			original_tag = RAJ 
		}

		visible = {
			OR = {
				has_idea = idea_RAJ_azad_hind_radio_unaligned
				has_idea = idea_RAJ_azad_hind_radio_communism
			}
		}
		cost = 25
		days_remove = 120

		#modifier = {
			#civilian_factory_use = 4
		#}

		ai_will_do = {
			factor = 1
		}

		remove_effect = {
			if = {
				limit = {
					has_idea = idea_RAJ_azad_hind_radio_unaligned 
				}
				swap_ideas = {
					add_idea = idea_RAJ_azad_hind_radio_fascism
					remove_idea = idea_RAJ_azad_hind_radio_unaligned
				}
			}
			else_if = {
				limit = {
					has_idea = idea_RAJ_azad_hind_radio_communism 
				}
				swap_ideas = {
					add_idea = idea_RAJ_azad_hind_radio_fascism
					remove_idea = idea_RAJ_azad_hind_radio_communism
				}
			}
		}
	}

	RAJ_GOE_azad_hind_radio_communism = {
		icon = decision_generic_political_discourse
		allowed = { 
			original_tag = RAJ 
		}


		visible = {
			OR = {
				has_idea = idea_RAJ_azad_hind_radio_unaligned
				has_idea = idea_RAJ_azad_hind_radio_fascism
			}
		}
		cost = 25
		days_remove = 120

		#modifier = {
			#civilian_factory_use = 4
		#}

		ai_will_do = {
			factor = 1
		}

		remove_effect = {
			if = {
				limit = {
					has_idea = idea_RAJ_azad_hind_radio_fascism 
				}
				swap_ideas = {
					add_idea = idea_RAJ_azad_hind_radio_communism
					remove_idea = idea_RAJ_azad_hind_radio_fascism
				}
			}
			else_if = {
				limit = {
					has_idea = idea_RAJ_azad_hind_radio_unaligned 
				}
				swap_ideas = {
					add_idea = idea_RAJ_azad_hind_radio_communism
					remove_idea = idea_RAJ_azad_hind_radio_unaligned 
				}
			}
		}
	}
}

RAJ_GOE_into_hiding_cat = {
		
}


RAJ_akhand_bharat_cat = {
	RAJ_akhand_bharat_claim_afg = {
		icon = generic_civil_support
		allowed = { 
			is_raj_or_raj_inheritor = yes
		}
		available = {
			OR = {
				AFG = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				all_of_scopes = {
					array = claimed_by_akhand_bharat 
					is_controlled_by = ROOT
					tooltip = RAJ_akhand_bharat_availability_tt 
				}
			}
		}

		highlight_states = {
			highlight_states_trigger = {
				is_core_of = AFG
			}
		}
		visible = {
			AFG = {
				any_core_state = {
					NOT = { is_core_of = ROOT }
				}
			}
		}
		cost = 0
		days_re_enable = 0 
		ai_will_do = {
			factor = 10
		}

		complete_effect = {
			every_state = {
				limit = { is_core_of = AFG }
				ROOT = { 
					add_to_array = {
						array = claimed_by_akhand_bharat
						value = PREV #optional, if not defined adds scope
					} 
				}
				add_core_of = ROOT
			}
 			
			for_each_scope_loop = { #transfer state if already subject since its not a core
				array = claimed_by_akhand_bharat
				if = {
					limit = { 
						is_core_of = AFG 
						owner = { is_subject_of = ROOT }
					}

					ROOT = { transfer_state = PREV }
				}
			}

			AFG = { custom_effect_tooltip = RAJ_akhand_bharat_annex_subject }
		}	
	}

	RAJ_akhand_bharat_claim_ban = {
		icon = generic_civil_support
		allowed = { 
			is_raj_or_raj_inheritor = yes
		}
		available = {
			OR = {
				BAN = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				all_of_scopes = {
					array = claimed_by_akhand_bharat 
					is_controlled_by = ROOT
					tooltip = RAJ_akhand_bharat_availability_tt 
				}
			}
			NOT = { has_dynamic_modifier = { modifier = idea_RAJ_famine_country } }
		}

		visible = {
			BAN = {
				any_core_state = {
					NOT = { is_core_of = ROOT }
				}
			}
		}
		cost = 0
		days_re_enable = 0 
		ai_will_do = {
			factor = 10
		}

		complete_effect = {
			every_state = {
				limit = { is_core_of = BAN }
				ROOT = { 
					add_to_array = {
						array = claimed_by_akhand_bharat
						value = PREV #optional, if not defined adds scope
					} 
				}
				add_core_of = ROOT
			}
 			
			for_each_scope_loop = { #transfer state if already subject since its not a core
				array = claimed_by_akhand_bharat
				if = {
					limit = { 
						is_core_of = BAN 
						owner = { is_subject_of = ROOT }
					}

					ROOT = { transfer_state = PREV }
				}
			}

			BAN = { custom_effect_tooltip = RAJ_akhand_bharat_annex_subject }
		}	
	}

	RAJ_akhand_bharat_claim_nep = {
		icon = generic_civil_support
		allowed = { 
			is_raj_or_raj_inheritor = yes
		}
		available = {
			OR = {
				NEP = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				all_of_scopes = {
					array = claimed_by_akhand_bharat 
					is_controlled_by = ROOT
					tooltip = RAJ_akhand_bharat_availability_tt 
				}
			}	
		}

		highlight_states = {
			highlight_states_trigger = {
				is_core_of = NEP
			}
		}

		visible = {
			NEP = {
				any_core_state = {
					NOT = { is_core_of = ROOT }
				}
			}
		}
		cost = 0
		days_re_enable = 0 
		ai_will_do = {
			factor = 10
		}

		complete_effect = {
			every_state = {
				limit = { is_core_of = NEP }
				ROOT = { 
					add_to_array = {
						array = claimed_by_akhand_bharat
						value = PREV #optional, if not defined adds scope
					} 
				}
				add_core_of = ROOT
			}
 			
			for_each_scope_loop = { #transfer state if already subject since its not a core
				array = claimed_by_akhand_bharat
				if = {
					limit = { 
						is_core_of = NEP 
						owner = { is_subject_of = ROOT }
					}

					ROOT = { transfer_state = PREV }
				}
			}

			NEP = { custom_effect_tooltip = RAJ_akhand_bharat_annex_subject }
		}	
	}

	RAJ_akhand_bharat_claim_tib = {
		icon = generic_civil_support
		allowed = { 
			is_raj_or_raj_inheritor = yes
		}
		available = {
			OR = {
				TIB = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				all_of_scopes = {
					array = claimed_by_akhand_bharat 
					is_controlled_by = ROOT
					tooltip = RAJ_akhand_bharat_availability_tt 
				}
			}
		}

		visible = {
			TIB = {
				any_core_state = {
					NOT = { is_core_of = ROOT }
					NOT = { state = 601 }
				}
			}
		}
		cost = 0
		days_re_enable = 0 
		ai_will_do = {
			factor = 10
		}

		highlight_states = {
			highlight_states_trigger = {
				is_core_of = TIB
				NOT = { state = 601 }
			}
		}

		complete_effect = {
			every_state = {
				limit = { 
					is_core_of = TIB 
					NOT = { state = 601 }
				}
				ROOT = { 
					add_to_array = {
						array = claimed_by_akhand_bharat
						value = PREV #optional, if not defined adds scope
					} 
				}
				add_core_of = ROOT
			}
 			
			for_each_scope_loop = { #transfer state if already subject since its not a core
				array = claimed_by_akhand_bharat
				if = {
					limit = { 
						is_core_of = TIB 
						owner = { is_subject_of = ROOT }
					}

					ROOT = { transfer_state = PREV }
				}
			}

			TIB = { custom_effect_tooltip = RAJ_akhand_bharat_annex_subject }
		}	
	}

	RAJ_akhand_bharat_claim_srl = {
		icon = generic_civil_support
		allowed = { 
			is_raj_or_raj_inheritor = yes
		}
		available = {
			OR = {
				SRL = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				all_of_scopes = {
					array = claimed_by_akhand_bharat 
					is_controlled_by = ROOT
					tooltip = RAJ_akhand_bharat_availability_tt 
				}
			}	
		}

		visible = {
			SRL = {
				any_core_state = {
					NOT = { is_core_of = ROOT }
				}
			}
		}
		cost = 0
		days_re_enable = 0 
		ai_will_do = {
			factor = 10
		}

		highlight_states = {
			highlight_states_trigger = {
				is_core_of = SRL
			}
		}
		complete_effect = {
			every_state = {
				limit = { is_core_of = SRL }
				ROOT = { 
					add_to_array = {
						array = claimed_by_akhand_bharat
						value = PREV #optional, if not defined adds scope
					} 
				}
				add_core_of = ROOT
			}
 			

			for_each_scope_loop = { #transfer state if already subject since its not a core
				array = claimed_by_akhand_bharat
				if = {
					limit = { 
						is_core_of = SRL 
						owner = { is_subject_of = ROOT }
					}

					ROOT = { transfer_state = PREV }
				}
			}

			SRL = { custom_effect_tooltip = RAJ_akhand_bharat_annex_subject }
		}	
	}

	RAJ_akhand_bharat_claim_pak = {
		icon = generic_civil_support
		allowed = { 
			is_raj_or_raj_inheritor = yes
		}
		available = {
			OR = {
				PAK = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				all_of_scopes = {
					array = claimed_by_akhand_bharat 
					is_controlled_by = ROOT
					tooltip = RAJ_akhand_bharat_availability_tt 
				}
			}
			NOT = { has_dynamic_modifier = { modifier = idea_RAJ_famine_country } }
		}
		highlight_states = {
			highlight_states_trigger = {
				is_core_of = PAK
			}
		}
		visible = {
			PAK = {
				any_core_state = {
					NOT = { is_core_of = ROOT }
				}
			}
		}
		cost = 0
		days_re_enable = 0 
		ai_will_do = {
			factor = 10
		}

		complete_effect = {
			every_state = {
				limit = { is_core_of = PAK }
				ROOT = { 
					add_to_array = {
						array = claimed_by_akhand_bharat
						value = PREV #optional, if not defined adds scope
					} 
				}
				add_core_of = ROOT
			}
 			
			for_each_scope_loop = { #transfer state if already subject since its not a core
				array = claimed_by_akhand_bharat
				if = {
					limit = { 
						is_core_of = PAK 
						owner = { is_subject_of = ROOT }
					}

					ROOT = { transfer_state = PREV }
				}
			}

			PAK = { custom_effect_tooltip = RAJ_akhand_bharat_annex_subject }
		}	
	}

	RAJ_akhand_bharat_claim_brm = {
		icon = generic_civil_support
		allowed = { 
			is_raj_or_raj_inheritor = yes
		}

		highlight_states = {
			highlight_states_trigger = {
				is_core_of = BRM
			}
		}	
		available = {
			OR = {
				BRM = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				all_of_scopes = {
					array = claimed_by_akhand_bharat 
					is_controlled_by = ROOT
					tooltip = RAJ_akhand_bharat_availability_tt 
				}
			}
		}

		visible = {
			BRM = {
				any_core_state = {
					NOT = { is_core_of = ROOT }
				}
			}
		}
		cost = 0
		days_re_enable = 0 
		ai_will_do = {
			factor = 10
		}

		complete_effect = {
			every_state = {
				limit = { is_core_of = BRM }
				ROOT = { 
					add_to_array = {
						array = claimed_by_akhand_bharat
						value = PREV #optional, if not defined adds scope
					} 
				}
				add_core_of = ROOT
			}
 			
			for_each_scope_loop = { #transfer state if already subject since its not a core
				array = claimed_by_akhand_bharat
				if = {
					limit = { 
						is_core_of = BRM 
						owner = { is_subject_of = ROOT }
					}

					ROOT = { transfer_state = PREV }
				}
			}

			BRM = { custom_effect_tooltip = RAJ_akhand_bharat_annex_subject }
		}	
	}

	RAJ_akhand_bharat_claim_mld = {
		icon = generic_civil_support
		allowed = { 
			is_raj_or_raj_inheritor = yes
		}
		highlight_states = {
			highlight_states_trigger = {
				is_core_of = MLD
			}
		}	
		available = {
			OR = {
				MLD = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				all_of_scopes = {
					array = claimed_by_akhand_bharat 
					is_controlled_by = ROOT
					tooltip = RAJ_akhand_bharat_availability_tt 
				}
			}
		}

		visible = {
			MLD = {
				any_core_state = {
					NOT = { is_core_of = ROOT }
				}
			}
		}
		cost = 0
		days_re_enable = 0 
		ai_will_do = {
			factor = 10
		}

		complete_effect = {
			every_state = {
				limit = { is_core_of = MLD }
				ROOT = { 
					add_to_array = {
						array = claimed_by_akhand_bharat
						value = PREV #optional, if not defined adds scope
					} 
				}
				add_core_of = ROOT
			}
 			
			for_each_scope_loop = { #transfer state if already subject since its not a core
				array = claimed_by_akhand_bharat
				if = {
					limit = { 
						is_core_of = MLD 
						owner = { is_subject_of = ROOT }
					}

					ROOT = { transfer_state = PREV }
				}
			}

			MLD = { custom_effect_tooltip = RAJ_akhand_bharat_annex_subject }
		}	
	}

	RAJ_akhand_bharat_claim_bhu = {
		icon = generic_civil_support
		allowed = { 
			is_raj_or_raj_inheritor = yes
		}
		highlight_states = {
			highlight_states_trigger = {
				is_core_of = BHU
			}
		}	
		available = {
			OR = {
				BHU = {
					all_core_state = {
						is_controlled_by = ROOT
					}
				}
				all_of_scopes = {
					array = claimed_by_akhand_bharat 
					is_controlled_by = ROOT
					tooltip = RAJ_akhand_bharat_availability_tt 
				}
			}
		}

		visible = {
			BHU = {
				any_core_state = {
					NOT = { is_core_of = ROOT }
				}
			}
		}
		cost = 0
		days_re_enable = 0 
		ai_will_do = {
			factor = 20
		}

		complete_effect = {
			every_state = {
				limit = { is_core_of = BHU }
				ROOT = { 
					add_to_array = {
						array = claimed_by_akhand_bharat
						value = PREV #optional, if not defined adds scope
					} 
				}
				add_core_of = ROOT
			}
 			
			for_each_scope_loop = { #transfer state if already subject since its not a core
				array = claimed_by_akhand_bharat
				if = {
					limit = { 
						is_core_of = BHU 
						owner = { is_subject_of = ROOT }
					}

					ROOT = { transfer_state = PREV }
				}
			}

			BHU = { custom_effect_tooltip = RAJ_akhand_bharat_annex_subject }
		}	
	}

	RAJ_form_akhand_bharat = {
		icon = GFX_decision_eng_install_government
		allowed = { 
			is_raj_or_raj_inheritor = yes
		}

		fire_only_once = yes

		available = {
			MLD = {
				all_core_state = {
					is_fully_controlled_by = ROOT
					is_core_of = ROOT
				}
			}

			BHU = {
				all_core_state = {
					is_fully_controlled_by = ROOT
					is_core_of = ROOT
				}
			}

			BRM = {
				all_core_state = {
					is_fully_controlled_by = ROOT
					is_core_of = ROOT
				}
			}

			PAK = {
				all_core_state = {
					is_fully_controlled_by = ROOT
					is_core_of = ROOT
				}
			}

			SRL = {
				all_core_state = {
					is_fully_controlled_by = ROOT
					is_core_of = ROOT
				}
			}

			AFG = {
				all_core_state = {
					is_fully_controlled_by = ROOT
					is_core_of = ROOT
				}
			}
			BAN = {
				all_core_state = {
					is_fully_controlled_by = ROOT
					is_core_of = ROOT
				}
			}
			
			NEP = {
				all_core_state = {
					is_fully_controlled_by = ROOT
					is_core_of = ROOT
				}
			}
			TIB = {
				all_core_state = {
					OR = {
						is_fully_controlled_by = ROOT
						AND = {
							state = 601
							NOT = { is_controlled_by = ROOT }
						}
					}
					OR = {
						is_core_of = ROOT
						AND = { 
							state = 601 
							NOT = { is_core_of = ROOT }
						}
					}
				}
			}

		}

		visible = {
			always = yes
		}
		cost = 0
		days_re_enable = 0 
		ai_will_do = {
			factor = 100
		}

		complete_effect = {
			set_cosmetic_tag = RAJ_akhand_bharat_tag
			add_country_leader_trait = uniter_of_akhand_bharat
			if = {
				limit = {
					has_dynamic_modifier = {
						modifier = idea_RAJ_agrarian_society
					}
				}

	            custom_effect_tooltip = RAJ_relax_agrarian_society_criteria_tt
	            
	            add_to_variable = { RAJ_agrarian_society_conscription_factor = 0.27 tooltip = conscription_factor_tt }
	            add_to_variable = { RAJ_agrarian_society_mobilization_speed = 0.27  tooltip = mobilization_speed_tt }
	            add_to_variable = { RAJ_agrarian_society_mobilization_laws_cost_factor = -0.81 tooltip = mobilization_laws_cost_factor_tt }
	            remove_agrarian_society_if_void = yes
			}

			add_research_slot = 1
		}
	}

	
}

RAJ_military_matters = { #removed
	#	RAJ_establish_local_recruitment_offices = {
	#		icon = decision_generic_political_discourse
	#		allowed = { 
	#			is_raj_or_raj_inheritor = yes
	#		}
	#		available = {
	#			check_variable = { RAJ.RAJ_established_recruitment_offices < RAJ.owned_states_at_game_start^num }
	#		}
#
	#		visible = {
	#			has_dynamic_modifier = { modifier = idea_RAJ_agrarian_society }
#
	#		}
	#		cost = 25
	#		days_re_enable = 0 
#
	#	#modifier = {
	#		#civilian_factory_use = 4
	#	#}
#
	#	ai_will_do = {
	#		factor = 1
	#	}
#
	#	complete_effect = {
#
	#		custom_effect_tooltip = RAJ_establish_local_recruitment_offices_tt
	#		add_to_variable = { RAJ.RAJ_established_recruitment_offices = 1 }
	#		clamp_variable = {
	#			var = RAJ.RAJ_established_recruitment_offices
	#			min = 0
	#			max = RAJ.owned_states_at_game_start^num
	#		}
	#		recalc_projected_time_local_recruitment_offices = yes
	#		#RAJ_established_recruitment_offices
#
	#		if = {
	#			limit = {
	#				check_variable = {
	#				 	var = RAJ.RAJ_max_cap_local_recruitment_offices
	#				 	value = 5
	#				 	compare = greater_than_or_equals
	#			 	} 
	#			}
	#			custom_effect_tooltip = RAJ_establish_local_recruitment_offices_tt_2
	#		}
	#	}
	#}
}

propaganda_efforts = {
RAJ_GOE_campaign_against_agrarian_societys = {
	name = RAJ_campaign_against_agrarian_societys
	icon = GFX_decision_eng_install_government
		allowed = { 
			is_raj_or_raj_inheritor = yes
		}

		visible = {
			has_completed_focus = RAJ_campaign_against_agrarian_societys
			has_dynamic_modifier = {
				modifier = idea_RAJ_agrarian_society
			}
		}

		available = {
			has_dynamic_modifier = {
				modifier = idea_RAJ_agrarian_society
			}
			OR = {
				has_stability > 0.69
				has_war_support > 0.79
			}
		}

		cost = 175
		days_re_enable = 0 
		ai_will_do = {
			factor = 1
			modifier = {
				has_political_power > 399
				has_manpower < 90000
				factor = 20
			}
		}

		complete_effect = {
            custom_effect_tooltip = RAJ_relax_agrarian_society_criteria_tt
            
            add_to_variable = { RAJ_agrarian_society_conscription_factor = 0.03 tooltip = conscription_factor_tt }
            add_to_variable = { RAJ_agrarian_society_mobilization_speed = 0.03  tooltip = mobilization_speed_tt }
            add_to_variable = { RAJ_agrarian_society_mobilization_laws_cost_factor = -0.09 tooltip = mobilization_laws_cost_factor_tt }
            remove_agrarian_society_if_void = yes
		}
	}
}

RAJ_GOE_partition_cat = {
	#AI only, players can just use guarantee as normal
	RAJ_GOE_ai_protect_princely_state = {

		state_target = yes
		
		visible = { 
			is_ai = yes
			has_global_flag = RAJ_GOE_partition_has_happened
			NOT = { has_global_flag =  RAJ_GOE_partition_is_over }
			NOT = {  FROM.owner = { is_guaranteed_by = ROOT } }
			NOT = { has_completed_focus = RAJ_india_united }
		}
		
		available = {
			is_ai = yes
			is_raj_or_raj_inheritor = yes

			FROM.owner = {
				is_neighbor_of = ROOT #doe say, Kashmir or Kalat, or Hyderabad
			}
			any_country = {
				is_justifying_wargoal_against = FROM.owner 
			}

			#check_variable = { pressure_left > 0 tooltip = pressure_left_tt }
		}
		on_map_mode = map_only
		target_root_trigger = {
			is_raj_or_raj_inheritor = yes

		}

		target_array = RAJ.states_in_play_partition
		target_trigger = {
			FROM = { 
				NOT = { 
					is_controlled_by = PAK
					is_controlled_by = RAJ
					is_controlled_by = BAN 
				}
				controller = { 
					has_war = no
					exists = yes
					has_capitulated = no
				}
			}
		}

		complete_effect = {
			give_guarantee = FROM.owner
		}
		ai_will_do = {
			base = 10
		}
	}

	RAJ_GOE_princely_state_timeout = {
	    activation = {
			has_global_flag = RAJ_GOE_partition_has_happened
			NOT = { has_global_flag =  RAJ_GOE_partition_is_over }
			is_raj_or_raj_inheritor = yes
			NOT = { has_completed_focus = RAJ_india_united }
	    }
	    available = {
	    	hidden_trigger = {
	    		always = no
	    	}
	    }
	    cancel_trigger = {
       		has_global_flag = RAJ_GOE_partition_is_over
	    }
	    fire_only_once = yes
	    #icon = mission_icon     # For GFX_decision_mission_icon
	    is_good = yes
	    days_mission_timeout = 110
	    selectable_mission = no
	    complete_effect = {
	    	
	    }
	    timeout_effect = {
			set_global_flag = RAJ_GOE_partition_is_over
			set_country_flag = RAJ_allow_release_states
	    	if = {
	    		limit = {
	    			NOT = { has_variable = princely_state_timeout_count  }
	    		}
	    		set_variable = { princely_state_timeout_count = 0 }
	    	}
	    	add_to_variable = { princely_state_timeout_count = 1 } #The decision was to be repeated several times with increasing intervals. This varibble controls this but for now its just set to time out after one time, keeping functionality though in case we need to revert

	    	custom_effect_tooltip = RAJ_GOE_princely_state_timeout_tt
	    	for_each_scope_loop = { 
	    		array =  RAJ.states_in_play_partition
	    		if = {
	    			limit = {
	    				ROOT = { original_tag = RAJ } #only execute once, not for all 3
		    			NOT = {
	    					is_controlled_by = RAJ
	    					is_controlled_by = PAK
	    					is_controlled_by = BAN
	    				}

    					owner = {
    						NOT = { has_war_with = ROOT }
    					}
	    			}
	    			
		    		set_temp_variable = { t_RAJ_pressure_scaled  = RAJ_pressure }
		    		set_variable = { t_PAK_pressure_scaled  = PAK_pressure }
		    		set_temp_variable = { t_BAN_pressure_scaled  = BAN_pressure }

		    		multiply_temp_variable = { t_RAJ_pressure_scaled  = 1.25 }
		    		multiply_variable = { t_PAK_pressure_scaled  = 1.25 }
		    		multiply_temp_variable = { t_BAN_pressure_scaled  = 1.25 } #


		    		if = {
		    			limit = {
		    				RAJ = {
		    					exists = yes
		    					#is_subject = no
		    				}
		    				check_variable = { RAJ_pressure > t_PAK_pressure_scaled }
		    				check_variable = { RAJ_pressure > t_BAN_pressure_scaled }
		    				check_variable = { RAJ_pressure > 0 }
		    			}
		    			RAJ = {
		    				transfer_state = PREV
		    			}
		    			if = {
		    				limit = {
		    					NOT = { is_core_of = RAJ }
		    				}
		    				add_core_of = RAJ
		    			}
		    		}
		    		else_if = {
		    			limit = {
		    				PAK = {
		    					exists = yes
		    					is_subject = no
		    				}
		    				check_variable = { PAK_pressure > t_RAJ_pressure_scaled }
		    				check_variable = { PAK_pressure > t_BAN_pressure_scaled }
		    				check_variable = { PAK_Pressure > 0 }
		    			}
		    			PAK = {
		    				transfer_state = PREV
		    			}

		    			if = {
		    				limit = {
		    					NOT = { is_core_of = PAK }
		    				}
		    				add_core_of = PAK
		    			}
		    		}
		    		else_if = {
		    			limit = {
		    				BAN = {
		    					exists = yes
		    					is_subject = no
		    				}
		    				check_variable = { BAN_pressure > t_RAJ_pressure_scaled }
		    				check_variable = { BAN_pressure > t_PAK_pressure_scaled }
		    				check_variable = { BAN_pressure > 0 }
		    			}
		    			BAN = {
		    				transfer_state = PREV
		    			}

		    			if = {
		    				limit = {
		    					NOT = { is_core_of = BAN }
		    				}
		    				add_core_of = BAN
		    			}
		    		}
		    	}
    		}



    		hidden_effect = {
    			if = {
    				limit = {
    					NOT = { has_completed_focus = RAJ_i_am_death }
    				}

					set_rule = { can_declare_war_on_same_ideology = no }
					set_rule = { can_only_justify_war_on_threat_country = yes }
    			}
    		}

    		if = {
    			limit = {
    				has_idea = idea_RAJ_princely_state_aggression
    			}
    			remove_ideas = idea_RAJ_princely_state_aggression
    		}
			set_rule = { can_join_factions = yes }

    		if = {
    			limit = {
    				PAK = {
    					exists = yes
    				}
    			}

    			if = {
    				limit = {
    					PAK = {
    						has_idea = neutrality_idea	
    					}
    				}
    				PAK = { remove_ideas = neutrality_idea }
    			}

    			PAK = { set_rule = { can_join_factions = yes } }
    		}

    		if = {
    			limit = {
    				BAN = {
    					exists = yes
    				}
    			}

    			if = {
    				limit = {
    					BAN = {
    						has_idea = neutrality_idea	
    					}
    				}
    				BAN = { remove_ideas = neutrality_idea }
    			}

    			BAN = { set_rule = { can_join_factions = yes } }
    		}

    		for_each_scope_loop = {
    			array = RAJ.raj_releasables
    			
    			if = {
    				limit = {
					has_idea = neutrality_idea	
    					
    				}
    				remove_ideas = neutrality_idea
    			}
    			set_rule = { can_join_factions = yes }
    		}
	    }
	}

	RAJ_GOE_eng_is_getting_involved_in_war = {
		priority = 30
	    activation = {
	    	always = no #enabled by on_action
	    }
	    available = {
			always = no
	    }

	    icon = GFX_decision_mission_icon     # For GFX_decision_mission_icon
	    is_good = no
	    days_mission_timeout = 40
	    selectable_mission = no

	    timeout_effect = {
	    	if = {
	    		limit = {
	    			ENG = {
	    				exists = yes
	    				is_subject = no
	    			}
	    		}

	    		ENG = { country_event = { id = GOE_RAJ_partition.10 } }
	    	}
	    }
	}


	RAJ_GOE_cease_hostilities = {
		priority = 30

	    available = {
	    	has_war_with = PAK
	    	
	    }
	    visible = {
	    	
	    	NOT = { has_completed_focus = RAJ_india_united }
	    	NOT = { has_global_flag = RAJ_GOE_partition_is_over }
	    }

	    cost = 0

	    complete_effect = {
	    	every_other_country = {
	    		limit = {
		    		is_in_array = {
		    			array = RAJ.raj_releasables
		    			value = THIS
		    		}

		    		has_war_with = ROOT
	    		}

	    		white_peace = {
	    			tag = ROOT
	    		}

	    		if = {
	    			limit = {
	    				has_active_mission = RAJ_GOE_eng_is_getting_involved_in_war
	    			}
	    			remove_mission = RAJ_GOE_eng_is_getting_involved_in_war	
	    		}
	    	}

	    	remove_mission = RAJ_GOE_eng_is_getting_involved_in_war
	    }
	}


	RAJ_GOE_vie_for_princes = {
		icon = GFX_decision_SWI_swiss_democratic_tradition_campaign
		
		state_target = yes
		
		visible = { 
			has_global_flag = RAJ_GOE_partition_has_happened
			NOT = { has_global_flag =  RAJ_GOE_partition_is_over }
			NOT = { has_completed_focus = RAJ_india_united }
		}
		
		available = {
			check_variable = { pressure_left > 0 tooltip = pressure_left_tt }
		}
		on_map_mode = map_only
		target_root_trigger = {
			is_raj_or_raj_inheritor = yes
		}

		target_array = RAJ.states_in_play_partition
		target_trigger = {
			FROM = { 
				NOT = { 
					is_controlled_by = PAK
					is_controlled_by = RAJ
					is_controlled_by = BAN 
				}
				controller = { 
					has_war = no
					exists = yes
					has_capitulated = no
				}
			}
		}
		
		cost = 0
		fire_only_once = no
		days_remove = 8
		ai_will_do = {
			base = 1

		}
		complete_effect = {
			FROM = { custom_effect_tooltip = RAJ_GOE_vie_for_princes_tt }
			if = {
				limit = {
					ROOT = {
						original_tag = RAJ
					}
				}
				ROOT = { subtract_from_variable = { pressure_left = 1 } }
				FROM = {
					if = {
						limit = { has_state_flag = prefers_raj }
						set_temp_variable = { t_pressure = 1 }
						multiply_temp_variable = { t_pressure = preference }
						add_to_variable = { RAJ_pressure = t_pressure }
					}
					else  = {
						add_to_variable = { RAJ_pressure = 1 }
					}
				}
			}

			if = {
				limit = {
					ROOT = {
						original_tag = PAK
					}
				}
				FROM = {

					ROOT = { subtract_from_variable = { pressure_left = 1 } }
					FROM = {
						if = {
							limit = { has_state_flag = prefers_pak }
							set_temp_variable = { t_pressure = 1 }
							multiply_temp_variable = { t_pressure = preference }
							add_to_variable = { PAK_pressure = t_pressure }
						}
						else  = {
							add_to_variable = { PAK_pressure = 1 }
						}
					}
				}
			}

			if = {
				limit = {
					ROOT = {
						original_tag = BAN
					}
				}
				FROM = {

					ROOT = { subtract_from_variable = { pressure_left = 1 } }
					FROM = {
						if = {
							limit = { has_state_flag = prefers_ban }
							set_temp_variable = { t_pressure = 1 }
							multiply_temp_variable = { t_pressure = preference }
							add_to_variable = { BAN_pressure = t_pressure }
						}
						else  = {
							add_to_variable = { BAN_pressure = 1 }
						}
					}
				}
			}
		}
	}
}

RAJ_GOE_eic_cat = {

	
	RAJ_GOE_eic_the_taxman = {
		priority = 100
	    activation = {
			has_dynamic_modifier = {
				modifier = idea_RAJ_eic_taxes
			}
	    }
	    available = {
			NOT = {
				has_dynamic_modifier = {
					modifier = idea_RAJ_eic_taxes
				}
			}
	    }

	    icon = mission_icon     # For GFX_decision_mission_icon
	    is_good = no
	    days_mission_timeout = 365
	    selectable_mission = no

	    timeout_effect = {
	    	if = {
	    		limit = { has_country_flag = has_payed_small_dividends }

	    		eic_low_investments = yes
			    clr_country_flag = has_payed_small_dividends
	    	}
	    	else_if = {
	    		limit = { has_country_flag = has_payed_normal_dividends }
	    		eic_normal_investments = yes
				clr_country_flag = has_payed_normal_dividends
	    	}

	    	else_if = {
	    		limit = { has_country_flag = has_payed_high_dividends }
	    		eic_high_investments = yes
				clr_country_flag = has_payed_high_dividends
	    	}
	    	else = {
		    	custom_effect_tooltip = RAJ_GOE_modify_dividends
		    	set_variable = { RAJ_eic_dividends_investment_efficiency_max = 0 tooltip = production_factory_efficiency_gain_factor_tt } 
				set_variable = { RAJ_eic_dividends_investment_building_speed = 0 tooltip = production_speed_buildings_factor_tt}
	    	}

	    	custom_effect_tooltip = newline_tt

	    	if = {
	    		limit = {
	    			has_country_flag = defaulted_on_debt
	    		}
	    		clr_country_flag = defaulted_on_debt
	    		custom_effect_tooltip = RAJ_GOE_eic_the_taxman_defaulted_tt
	    	}
	    	else = {
				hidden_effect = { 
					calc_expected_consumer_goods_for_taxes = yes
		    		set_variable = { RAJ_eic_taxes_consumer_goods = taxes }
		    	}
		    	custom_effect_tooltip = RAJ_GOE_eic_the_taxman_taxes_tt
	    	}

	        if = {
	            limit = { has_country_flag = has_payed_dividends }
	            clr_country_flag = has_payed_dividends
	        }

	    }
	}

	RAJ_GOE_eic_no_more_taxman = {
		icon = mission_icon
		available = {
			controls_state = 126
		}
		complete_effect = {
			custom_effect_tooltip = RAJ_GOE_eic_no_more_taxman_tt
			hidden_effect = {
				remove_dynamic_modifier = { modifier = idea_RAJ_eic_taxes }
			}
		}
	}

	RAJ_GOE_provide_working_opportunities = {

		priority = 100
		fire_only_once = yes
	    activation = {
	    	always = no #triggered
	    }
	    available = {
    		ROOT = {
    			OR = {
    				infrastructure > 63
    				industrial_complex > 18
    				arms_factory > 12
    			}
    		}
	    }

	    is_good = no
	    days_mission_timeout = 1800
	    selectable_mission = no

	    complete_effect = {
	    	add_timed_idea = {
	    		idea = idea_RAJ_military_into_the_workforce
	    		days = 400
	    	}

	    	add_tech_bonus = {
	    		bonus = 0.25
	    		uses = 2
	    		category = industry # optional 
	    		# technology  = technology_id # optional
	    	}
	    }

	    timeout_effect = {
	    	#add_stability = -0.05

	    }
	    
	}

	RAJ_GOE_default_on_debt = {

	    available = {
			has_dynamic_modifier = {
				modifier = idea_RAJ_eic_taxes
			}
			has_war_support > 0.5
			has_stability > 0.5
			NOT = { has_country_flag = defaulted_on_debt }
	    }

	    complete_effect = {
	    	add_war_support = -1
	    	add_stability = -1
	    	hidden_effect = {
		    	every_state = {
					damage_units = {
						state = THIS
						limit = { original_tag = RAJ }
						org_damage = 0.5
						str_damage = 0.5
						ratio = yes
						army = yes
						navy = yes
					}
		    	}
	    	}
	    	custom_effect_tooltip = RAJ_GOE_default_on_debt_tt

	  		set_equipment_fraction = 0.5
	    	set_country_flag = { flag  = defaulted_on_debt days = 1080 }
	    	custom_effect_tooltip = defaulted_on_debt_effect_tt
	    }
	}

	RAJ_GOE_pay_out_dividends_small = {

	    available = {
    		check_variable = { actually_controlled_civs > 1 tooltip = more_than_1_controlled_factories }
    		NOT = { has_country_flag = has_payed_dividends }
	    }

	    ai_will_do = {
	    	base = 0
	    	modifier = {
	    		AND = {
	                check_variable = {
	                    var = taxes
	                    value = tier_two_taxes_threshold
	                    compare = less_than_or_equals
	                }
	    		}
                add = 1
	    	}
	    }

	    complete_effect = {
	    	set_country_flag = has_payed_dividends
	    	set_country_flag = has_payed_small_dividends
	    	if = {
	    		limit = {
	    			NOT = {
	    				has_country_flag = has_paid_initial_funding
	    			}
	    		}
	    		set_country_flag = has_paid_initial_funding
	    		custom_effect_tooltip = RAJ_seek_intial_funding_unlock_tt
	    	}
	    	custom_effect_tooltip = RAJ_GOE_pay_out_dividends_small_tt
	    	effect_tooltip = {
	    		eic_low_investments = yes
	    	}
	    	hidden_effect = { calc_expected_consumer_goods_for_taxes = yes } 
	    }

	}

	RAJ_GOE_pay_out_dividends_normal = {

	    available = {
    		check_variable = { actually_controlled_civs > 2 tooltip = more_than_2_controlled_factories }
    		NOT = { has_country_flag = has_payed_dividends }
	    }

	    ai_will_do = {
	    	base = 0
	    	modifier = {
                AND = {
	                check_variable = {
	                    var = taxes
	                    value = tier_two_taxes_threshold
	                    compare = greater_than_or_equals
	                }
	                check_variable = {
	                    var = taxes
	                    value = tier_three_taxes_threshold
	                    compare = less_than_or_equals
	                }
                }
                add = 1
	    	}
	    }

	    complete_effect = {
	    	set_country_flag = has_payed_dividends
	    	set_country_flag = has_payed_normal_dividends
	    	if = {
	    		limit = {
	    			NOT = {
	    				has_country_flag = has_paid_initial_funding
	    			}
	    		}
	    		set_country_flag = has_paid_initial_funding
	    		custom_effect_tooltip = RAJ_seek_intial_funding_unlock_tt
	    	}
	    	custom_effect_tooltip = RAJ_GOE_pay_out_dividends_normal_tt
	    	effect_tooltip = {
	    		eic_normal_investments = yes
	    	}
	    	hidden_effect = { 
	    		calc_expected_consumer_goods_for_taxes = yes 
	    	}
	    }
	}

	RAJ_GOE_pay_out_dividends_high = {
	    available = {
    		check_variable = { actually_controlled_civs > 4 tooltip = more_than_4_controlled_factories }
    		NOT = { has_country_flag = has_payed_dividends }
	    }

	    ai_will_do = {
	    	base = 0
	    	modifier = {
                check_variable = {
                    var = taxes
                    value = tier_three_taxes_threshold
                    compare = greater_than_or_equals
                }
                add = 1
	    	}
	    }

	    complete_effect = {
	    	set_country_flag = has_payed_dividends
	    	set_country_flag = has_payed_high_dividends
	    	if = {
	    		limit = {
	    			NOT = {
	    				has_country_flag = has_paid_initial_funding
	    			}
	    		}
	    		set_country_flag = has_paid_initial_funding
	    		custom_effect_tooltip = RAJ_seek_intial_funding_unlock_tt
	    	}
	    	
	    	custom_effect_tooltip = RAJ_GOE_pay_out_dividends_high_tt
	    	effect_tooltip = {
	    		eic_high_investments = yes
	    	}

	    	hidden_effect = {
	    		calc_expected_consumer_goods_for_taxes = yes
	    	}
	    }
	}

	RAJ_GOE_tax_fraud = {

		icon = eng_propaganda_campaigns

		days_remove = 0

		available = {
			check_variable = { actually_controlled_civs > 1 tooltip = RAJ_tax_fraud_cost }
		}

		visible = {

		}

		days_re_enable = 5

		target_array = subjects

		target_trigger = {
			FROM = {
				is_subject_of = ROOT
				any_core_state = {
					free_building_slots = { #sort any core state that has less than 25 slots  
						building = industrial_complex
						size < 25
						include_locked = yes
					}
				}
			}
		}

		complete_effect = {
			ROOT = {
				random_controlled_state = {
					limit = {
						industrial_complex > 0
					}
					remove_building = {
						type = industrial_complex 
						level = 1
					}
				}
			}
			FROM = {
				random_core_state = {  
					limit = {
						free_building_slots = { #sort any core state that has less than 25 slots  
							building = industrial_complex
							size < 25
							include_locked = yes
						}
					}

					add_extra_state_shared_building_slots = 1
					if = {
						limit = {
							free_building_slots = {
								building = industrial_complex
								size > 0 
								include_locked = no

							}
						}
						add_building_construction = {
							type = industrial_complex
							level = 1
							instant_build = yes
						}
					}
				}
				if = {
					limit = {
						NOT = { has_idea = idea_RAJ_sudden_spending_increase }
					}
					add_timed_idea = {
						idea = idea_RAJ_sudden_spending_increase
						days = 210
					}
				}
			}

			hidden_effect = {
				calc_expected_consumer_goods_for_taxes = yes
			}
		}

		modifier = {
			#olitical_power_cost = 0.5
		}

		ai_will_do = {
			base = 0
		}
	}
}

RAJ_GOE_eic_hostile_takeover_cat = {
	RAJ_GOE_hostile_takeover_decision = {

		icon = GFX_decision_hol_attract_foreign_investors

		available = {
			FROM.owner = {
				controls_state = FROM
			}

			if = {
				limit = {
					is_ai = yes
					NOT = { has_completed_focus = RAJ_deathknell_to_the_raj }
				}
				is_in_array = {
					array = RAJ.owned_states_at_game_start
					value = FROM
				}
			}

			if = {
				limit = {
					is_in_array = {
						array = RAJ.owned_states_at_game_start
						value = FROM
					}
				}
				check_variable = { actually_controlled_civs > 1 tooltip = RAJ_hostile_takeover_cost_rebate }
			}
			else = {
				if = {
					limit = {
						AND = {
							OR = {
								FROM = { has_state_category = wasteland }
								FROM = { has_state_category = enclave }
								FROM = { has_state_category = tiny_island }
							}
							NOT = {
								OR = {
									FROM = { state = 446 }
									FROM = { state = 685 }
								}
							}
						}
					}
					check_variable = { actually_controlled_civs > 1 tooltip = RAJ_hostile_takeover_cost }
				}
				else_if = {
					limit = {
						OR = {
							FROM = { has_state_category = pastoral }
							FROM = { has_state_category = small_island }
						}
					}
					check_variable = { actually_controlled_civs > 2 tooltip = RAJ_hostile_takeover_cost_2 }
				}
				else_if = {
					limit = {
						FROM = { has_state_category = rural }
					}
					check_variable = { actually_controlled_civs > 3 tooltip = RAJ_hostile_takeover_cost_3 }
				}
				else_if = {
					limit = {
						OR = {
							FROM = { has_state_category = town }
							FROM = { has_state_category = large_town }
						}
					}
					check_variable = { actually_controlled_civs > 5 tooltip = RAJ_hostile_takeover_cost_5 }
				}
				else_if = {
					limit = {
						OR = {
							FROM = { has_state_category = city }
							FROM = { has_state_category = large_city }
						}
					}
					check_variable = { actually_controlled_civs > 7 tooltip = RAJ_hostile_takeover_cost_7 }
				}
				else_if = {
					limit = {
						OR = {
							FROM = { has_state_category = metropolis }
						}
					}
					check_variable = { actually_controlled_civs > 9 tooltip = RAJ_hostile_takeover_cost_10 }
				}
				else_if = {
					limit = {
						FROM = { has_state_category = megalopolis }
					}
					check_variable = { actually_controlled_civs > 14 tooltip = RAJ_hostile_takeover_cost_15 }
				}
				else_if = {
					limit = {
						OR = {
							FROM = { state = 446 }
							FROM = { state = 685 }
						}
					}
					check_variable = { actually_controlled_civs > 7 tooltip = RAJ_hostile_takeover_cost_7 }
				}
				else = {
					check_variable = { actually_controlled_civs > 4 tooltip = RAJ_hostile_takeover_cost_5 }
				}
			}
			NOT = { has_country_flag = is_trying_to_buy_land }
			
		}

		ai_will_do = {
			base = 0

			modifier = {

				is_in_array = {
					array = RAJ.owned_states_at_game_start
					value = FROM
				}
				num_of_controlled_factories > 9
				num_of_controlled_states < 6
			
					
				add = 10
			}
			modifier = {

				is_in_array = {
					array = RAJ.owned_states_at_game_start
					value = FROM
				}
				num_of_controlled_factories > 17
				num_of_controlled_states > 5

				add = 10

			}
			modifier = {

				NOT = {
					is_in_array = {
						array = RAJ.owned_states_at_game_start
						value = FROM
					}
				}
				has_completed_focus = RAJ_deathknell_to_the_raj
				num_of_owned_factories > 30

				add = 10

			}
		}

		state_target = yes
		visible = {
			has_completed_focus = RAJ_hostile_takeover
		}
		days_re_enable = 14

		cost = 10

		on_map_mode = map_and_decisions_view
		target_root_trigger = {
			original_tag = RAJ 
		}
		target_trigger = {
			FROM = {
				NOT = { owner = { has_war_with = ROOT } }
				NOT = { is_owned_by = ROOT }
				NOT = { has_state_flag = rejected_selling_this_state_to_eic }
				owner = { NOT = { has_country_flag = rejected_ever_selling_land_to_eic } }
				is_capital = no
				OR = {
		        	any_neighbor_state = { 
		        		is_controlled_by_ROOT_or_subject = yes
		        	}
	        		state = 446 #Suez
	        		state = 268 #French Somalialand
	        		state = 543 #Madagascar
	        		state = 299 #Falklands
	        		state = 649 #Galapagos
	        		state = 685 #Panama
	        		state = 696 #Bermuda
	        		state = 698 #azores
	        		state = 177 #Islas bandares
	        		state = 658 #Abu Dhabi
	        		state = 337 #Faroe
	        		state = 799 #hatay
	        		state = 910 #Bornholm
	        		state = 721 #Portuguese TImor
	        	}
	        }
		}

		complete_effect = {

			FROM = {
				save_global_event_target_as = RAJ_i_want_to_buy_this_land
				owner  = {
					country_event = { id = GOE_RAJ_eic.6 hours = 2 }
				}
			}
			ROOT = {
				set_country_flag = { flag = is_trying_to_buy_land days = 45 value = 1 }
				custom_effect_tooltip = if_they_accept_newline_tt
				
				effect_tooltip = {
					if = {
						limit = {
							is_in_array = {
								array = RAJ.owned_states_at_game_start
								value = FROM
							}
						}
						FROM.owner = { 
							add_offsite_building = {
								type = industrial_complex
								level = 1
							}
						}
						custom_effect_tooltip = RAJ_GOE_hostile_takeover_remove_civ_rebate_tt
					}
					else = {
						if = {
							limit = {
								AND = {
									OR = {
										FROM = { has_state_category = wasteland }
										FROM = { has_state_category = enclave }
										FROM = { has_state_category = tiny_island }
									}
									NOT = {
										OR = {
											FROM = { state = 446 }
											FROM = { state = 685 }
										}
									}
								}
							}
							FROM.owner = { 
								add_offsite_building = {
									type = industrial_complex
									level = 1
								}
							}
							custom_effect_tooltip = RAJ_GOE_hostile_takeover_remove_civ_tt_1
						}
						else_if = {
							limit = {
								OR = {
									FROM = { has_state_category = pastoral }
									FROM = { has_state_category = small_island }
								}
							}
							FROM.owner = { 
								add_offsite_building = {
									type = industrial_complex
									level = 3
								}
							}
							custom_effect_tooltip = RAJ_GOE_hostile_takeover_remove_civ_tt_2
						}
						else_if = {
							limit = {
								OR = {
									FROM = { has_state_category = rural }
								}
							}
							FROM.owner = { 
								add_offsite_building = {
									type = industrial_complex
									level = 4
								}
							}
							custom_effect_tooltip = RAJ_GOE_hostile_takeover_remove_civ_tt_3
						}
						else_if = {
							limit = {
								OR = {
									FROM = { has_state_category = town }
									FROM = { has_state_category = large_town }
								}
							}
							FROM.owner = { 
								add_offsite_building = {
									type = industrial_complex
									level = 6
								}
							}
							custom_effect_tooltip = RAJ_GOE_hostile_takeover_remove_civ_tt_5
						}
						else_if = {
							limit = {
								OR = {
									FROM = { has_state_category = city }
									FROM = { has_state_category = large_city }
								}
							}
							FROM.owner = { 
								add_offsite_building = {
									type = industrial_complex
									level = 8
								}
							}
							custom_effect_tooltip = RAJ_GOE_hostile_takeover_remove_civ_tt_7
						}
						else_if = {
							limit = {
								OR = {
									FROM = { has_state_category = metropolis }
								}
							}
							FROM.owner = { 
								add_offsite_building = {
									type = industrial_complex
									level = 10
								}
							}
							custom_effect_tooltip = RAJ_GOE_hostile_takeover_remove_civ_tt_10
						}
						else_if = {
							limit = {
								OR = {
									FROM = { has_state_category = megalopolis }
								}
							}
							FROM.owner = { 
								add_offsite_building = {
									type = industrial_complex
									level = 15
								}
							}
							custom_effect_tooltip = RAJ_GOE_hostile_takeover_remove_civ_tt_15
						}
						else_if = {
							limit = {
								OR = {
									FROM = { state = 446 }
									FROM = { state = 685 }
								}
							}
							FROM.owner = { 
								add_offsite_building = {
									type = industrial_complex
									level = 8
								}
							}
							custom_effect_tooltip = RAJ_GOE_hostile_takeover_remove_civ_tt_7
						}
						else = {
							FROM.owner = { 
								add_offsite_building = {
									type = industrial_complex
									level = 5
								}
							}
							custom_effect_tooltip = RAJ_GOE_hostile_takeover_remove_civ_tt_5
						}
					}

				}
			}

			hidden_effect = { controlled_civilian_factories_excluding_trade = yes }
			
		}
	}
}


RAJ_GOE_mughal_independence_category = {
	RAJ_GOE_enforced_peace_decision = {
		icon = GFX_decision_revolt
		allowed = {
			original_tag = RAJ
		}	
		available = {
			exists = no 
		}
		days_mission_timeout = 250
		activation = {
			RAJ = { has_country_flag = independence_war_mughals }
		}
		cancel_trigger = {
			OR = {
				event_target:UK_INDIA = {
					exists = no
				}  
				has_war = no
			}
		}
		fire_only_once = yes
		is_good = yes
		
		highlight_states = { 
			highlight_state_targets = {
				state = 440
				state = 986
				state = 439
				state = 441
				state = 787
			}
		}
		
		timeout_effect = {
			custom_effect_tooltip = RAJ_GOE_enforced_peace_decision_desc_tt
			custom_effect_tooltip = newline_tt
			custom_effect_tooltip = RAJ_GOE_enforced_peace_decision_desc_2_tt
			custom_effect_tooltip = newline_tt
			clr_country_flag = independence_war_mughals
			clr_country_flag = RAJ_mughal_uprising_started
			IF = {
				limit = {
					440 = { is_controlled_by = ROOT }
					988 = { is_controlled_by = ROOT }
					442 = { is_controlled_by = ROOT }
					439 = { is_controlled_by = ROOT }
				}
				set_country_flag = RAJ_mughal_captured_states
			}
			RAJ = {
				country_event = {
					id = GOE_RAJ_mughals_peace_deal.1
					hours = 1
				}
			}
			ENG = {
				country_event = { 
					id = GOE_RAJ.34
				}
			}

			set_division_template_lock = {
				division_template = "Princely Personal Guard"
				is_locked = no
			}

			hidden_effect = {
				every_state = {
					limit = {
						owner = { tag = BRM }
					}
					teleport_armies = { 
						#only define one. if neither is defined will teleport to unit to their capital  
						to_state = 988
						to_province = 5105
						limit = { 
							tag = RAJ
						}
					}
				}
			}
		}
	}
	
	RAJ_GOE_enforced_peace_decision_eng = {
		icon = GFX_decision_revolt
		allowed = {
			original_tag = ENG
		}	
		available = {
			RAJ = { exists = no }
			#RAJ = { has_country_flag = independence_war_mughals }
		}
		days_mission_timeout = 365
		activation = {
			RAJ = { has_country_flag = independence_war_mughals }
		}
		cancel_trigger = {
			OR = {
				NOT = { country_exists = RAJ }
				RAJ = {
					OR = {
						NOT = { country_exists = event_target:UK_INDIA }
						has_war = no
					}
				}
			}
		}
		fire_only_once = yes
		is_good = no
		
		highlight_states = { 
			highlight_state_targets = {
				state = 440
				state = 986
				state = 439
				state = 441
				state = 787
				state = 442
				state = 987
				state = 445
				state = 988
				state = 1012
				state = 444
			}
		}
		
		timeout_effect = {
			custom_effect_tooltip = RAJ_GOE_enforced_peace_decision_desc_eng_tt
		}
	}


}
political_actions = {

	# Allies

	#RAJ_change_sides_to_allies = {
#
	#	icon = decision_generic_nationalism
#
	#	allowed = {
	#		original_tag = RAJ
	#	}
#
	#	available = {
	#		is_faction_leader = no
	#		has_capitulated = no
	#		any_country = {
	#			is_faction_leader = yes
	#			has_war_with = RAJ
	#			OR = {
	#				has_government = democratic
	#				original_tag = ENG
	#				original_tag = USA
	#			}
	#		}
	#		OR = {
	#			has_country_leader = {
	#				character = RAJ_subhas_chanda_bose
	#				ruling_only = yes
	#			}
	#			has_government = neutrality
	#			has_government = democratic
	#		}
	#		NOT = {
	#			FACTION_LEADER  = {
	#				has_government = democratic
	#			}
	#		}
	#		hidden_trigger = {
	#			NOT = { has_country_flag = india_has_flipped_sides } #Romania shouldn't be able to keep switching sides all the time
	#		}
	#	}
	#	
	#	visible = {
	#		is_faction_leader = no # you shouldn't be able to betray your own faction
	#		original_tag = RAJ
	#		NOT = { has_country_flag = india_has_flipped_sides }
	#		hidden_trigger = { has_country_flag = can_change_sides_dem }
	#	}
#
	#	cost = 0
	#	
	#	fire_only_once = yes
	#	
	#	remove_effect = {
	#		hidden_effect = { clr_country_flag = can_change_sides_dem }
	#	}
#
	#	complete_effect = {
	#		#save current faction leader for use in the event
	#		hidden_effect = {
	#			random_country = {
	#				limit = {
	#					is_in_faction_with = ROOT
	#					is_faction_leader = yes
	#				}
	#				save_global_event_target_as = romania_former_ally_target
	#			}
	#		}
	#		#top priority is joining the Allies if they still exist
	#		if = {
	#			limit = {
	#				any_country = {
	#					is_faction_leader = yes
	#					has_war_with = RAJ
	#					has_government = democratic
	#					OR = {
	#						original_tag = ENG
	#						is_in_faction_with = ENG
	#					}
	#				}
	#			}
	#			random_enemy_country = {
	#				limit = {
	#					is_faction_leader = yes
	#					has_war_with = RAJ
	#					has_government = democratic
	#					OR = {
	#						original_tag = ENG
	#						is_in_faction_with = ENG
	#					}
	#				}
	#				save_event_target_as = romania_new_ally_target #reuse the loc
	#			}
	#		}
	#		#then attempts to join the USA's faction
	#		else_if = {
	#			limit = {
	#				any_country = {
	#					is_faction_leader = yes
	#					has_war_with = RAJ
	#					has_government = democratic
	#					OR = {
	#						original_tag = USA
	#						is_in_faction_with = USA
	#					}
	#				}
	#			}
	#			random_enemy_country = {
	#				limit = {
	#					is_faction_leader = yes
	#					has_war_with = RAJ
	#					has_government = democratic
	#					OR = {
	#						original_tag = USA
	#						is_in_faction_with = USA
	#					}
	#				}
	#				save_event_target_as = romania_new_ally_target #reuse the loc
	#			}
	#		}
	#		#then attempts to join any democratic faction
	#		else = {
	#			random_enemy_country = {
	#				limit = {
	#					is_faction_leader = yes
	#					has_war_with = RAJ
	#					has_government = democratic
	#				}
	#				save_event_target_as = romania_new_ally_target #reuse the loc
	#			}
	#		}
	#		event_target:romania_new_ally_target = {
	#			country_event = { id = DOD_romania.16 }
	#		}
	#		hidden_effect = {
	#			set_country_flag = india_has_flipped_sides
	#		}
	#	}
#
	#	ai_will_do = {
	#		factor = 100
	#		modifier = {
	#			is_historical_focus_on = no
	#			factor = 0
	#		}
	#		modifier = {
	#			is_historical_focus_on = yes
	#			NOT = { date > 1944.08.08 }
	#			factor = 0
	#		}
	#	}
#
	#}
	#
	## Commintern
#
	#RAJ_change_sides_to_commintern = {
#
	#	icon = decision_generic_nationalism
#
	#	allowed = {
	#		original_tag = RAJ
	#	}
#
	#	available = {
	#		is_faction_leader = no
	#		has_capitulated = no
	#		any_country = {
	#			is_faction_leader = yes
	#			has_war_with = RAJ
	#			OR = {
	#				has_government = communism
	#				original_tag = SOV
	#			}
	#		}
	#		OR = {
	#			has_country_leader = {
	#				character = RAJ_subhas_chanda_bose
	#				ruling_only = yes
	#			}
	#			has_government = communism
	#		}
	#		NOT = {
	#			FACTION_LEADER  = {
	#				has_government = communism
	#			}
	#		}
	#		hidden_trigger = {
	#			NOT = { has_country_flag = india_has_flipped_sides } #Romania shouldn't be able to keep switching sides all the time
	#		}
	#	}
	#	
	#	visible = {
	#		is_faction_leader = no # you shouldn't be able to betray your own faction
	#		original_tag = RAJ
	#		NOT = { has_country_flag = india_has_flipped_sides }
	#		hidden_trigger = { has_country_flag = can_change_sides_com }
	#	}
#
	#	cost = 0
	#	
	#	fire_only_once = yes
	#	
	#	remove_effect = {
	#		hidden_effect = { clr_country_flag = can_change_sides_com }
	#	}
#
	#	complete_effect = {
	#		#save current faction leader for use in the event
	#		hidden_effect = {
	#			random_country = {
	#				limit = {
	#					is_in_faction_with = ROOT
	#					is_faction_leader = yes
	#				}
	#				save_global_event_target_as = romania_former_ally_target
	#			}
	#		}
	#		#top priority is joining the Commintern if they still exist
	#		if = {
	#			limit = {
	#				any_country = {
	#					is_faction_leader = yes
	#					has_war_with = RAJ
	#					has_government = communism
	#					OR = {
	#						original_tag = SOV
	#						is_in_faction_with = SOV
	#					}
	#				}
	#			}
	#			random_enemy_country = {
	#				limit = {
	#					is_faction_leader = yes
	#					has_war_with = RAJ
	#					has_government = communism
	#					OR = {
	#						original_tag = SOV
	#						is_in_faction_with = SOV
	#					}
	#				}
	#				save_event_target_as = romania_new_ally_target #reuse the loc
	#			}
	#		}
	#		#then attempts to join any communist faction
	#		else = {
	#			random_enemy_country = {
	#				limit = {
	#					is_faction_leader = yes
	#					has_war_with = RAJ
	#					has_government = communism
	#				}
	#				save_event_target_as = romania_new_ally_target #reuse the loc
	#			}
	#		}
	#		event_target:romania_new_ally_target = {
	#			country_event = { id = DOD_romania.16 }
	#		}
	#		hidden_effect = {
	#			set_country_flag = india_has_flipped_sides
	#		}
	#	}
#
	#	ai_will_do = {
	#		factor = 0
	#	}
#
	#}
	#
	## Axis
#
	#RAJ_change_sides_to_axis = {
#
	#	icon = decision_generic_nationalism
#
	#	allowed = {
	#		original_tag = RAJ
	#	}
#
	#	available = {
	#		is_faction_leader = no
	#		has_capitulated = no
	#		any_country = {
	#			is_faction_leader = yes
	#			has_war_with = RAJ
	#			OR = {
	#				has_government = fascism
	#				original_tag = GER
	#				original_tag = ITA
	#			}
	#		}
	#		OR = {
	#			has_country_leader = {
	#				character = RAJ_subhas_chanda_bose
	#				ruling_only = yes
	#			}
	#			has_government = fascism
	#		}
	#		NOT = {
	#			FACTION_LEADER  = {
	#				has_government = fascism
	#			}
	#		}
	#		hidden_trigger = {
	#			NOT = { has_country_flag = india_has_flipped_sides } #Romania shouldn't be able to keep switching sides all the time
	#		}
	#	}
	#	
	#	visible = {
	#		is_faction_leader = no # you shouldn't be able to betray your own faction
	#		original_tag = RAJ
	#		NOT = { has_country_flag = india_has_flipped_sides }
	#		hidden_trigger = { has_country_flag = can_change_sides_fas }
	#	}
#
	#	cost = 0
	#	
	#	fire_only_once = yes
	#	
	#	remove_effect = {
	#		hidden_effect = { clr_country_flag = can_change_sides_fas }
	#	}
#
	#	complete_effect = {
	#		#save current faction leader for use in the event
	#		hidden_effect = {
	#			random_country = {
	#				limit = {
	#					is_in_faction_with = ROOT
	#					is_faction_leader = yes
	#				}
	#				save_global_event_target_as = romania_former_ally_target
	#			}
	#		}
	#		#top priority is joining the Axis if they still exist
	#		if = {
	#			limit = {
	#				any_country = {
	#					is_faction_leader = yes
	#					has_war_with = RAJ
	#					has_government = fascism
	#					OR = {
	#						original_tag = GER
	#						is_in_faction_with = GER
	#					}
	#				}
	#			}
	#			random_enemy_country = {
	#				limit = {
	#					is_faction_leader = yes
	#					has_war_with = RAJ
	#					has_government = fascism
	#					OR = {
	#						original_tag = GER
	#						is_in_faction_with = GER
	#					}
	#				}
	#				save_event_target_as = romania_new_ally_target #reuse the loc
	#			}
	#		}
	#		#then attempts to join Italy's faction
	#		else_if = {
	#			limit = {
	#				any_country = {
	#					is_faction_leader = yes
	#					has_war_with = RAJ
	#					has_government = fascism
	#					OR = {
	#						original_tag = ITA
	#						is_in_faction_with = ITA
	#					}
	#				}
	#			}
	#			random_enemy_country = {
	#				limit = {
	#					is_faction_leader = yes
	#					has_war_with = RAJ
	#					has_government = fascism
	#					OR = {
	#						original_tag = ITA
	#						is_in_faction_with = ITA
	#					}
	#				}
	#				save_event_target_as = romania_new_ally_target #reuse the loc
	#			}
	#		}
	#		#then attempts to join any fascist faction
	#		else = {
	#			random_enemy_country = {
	#				limit = {
	#					is_faction_leader = yes
	#					has_war_with = RAJ
	#					has_government = fascism
	#				}
	#				save_event_target_as = romania_new_ally_target #reuse the loc
	#			}
	#		}
	#		event_target:romania_new_ally_target = {
	#			country_event = { id = DOD_romania.16 }
	#		}
	#		hidden_effect = {
	#			set_country_flag = india_has_flipped_sides
	#		}
	#	}
#
	#	ai_will_do = {
	#		factor = 0
	#	}
#
	#}
	
}
