political_decisions = {
	annexation_of_korea = {
		potential = {
			OR = {
			tag = JAP
			tag = SHO}
			NOT = {
				has_country_flag = japan_gains_korea
			}
		}
		
		allow = {
			exists = KOR
			OR = { 
			KOR = {
				vassal_of = THIS
			}
			AND = { KOR = { in_sphere = THIS } year = 1910 } }
		}
		
		effect = {
			set_country_flag = japan_gains_korea
			inherit = KOR
			prestige = 20
			badboy = 5
		}
	}

	claim_outer_manchuria = {
		potential = {
			OR = {
			tag = JAP
			tag = SHO}
			NOT = {
				has_country_flag = japan_manchuria
			}
		}
		
		allow = {
			owns = 1479
		}
		
		effect = {
			set_country_flag = japan_manchuria
			CHI_1082 = { add_core = THIS }
			prestige = 10
			badboy = 4
		}
	}
	Japanese_California = {
		potential = {
			OR = {
			tag = JAP
			tag = SHO}
			
			owns = 89
			NOT = {
				has_country_flag = japan_usa
			}
		}
		
		allow = {
			owns = 89
		}
		
		effect = {
			set_country_flag = japan_usa
			MEX_85 = { add_core = THIS }
			prestige = 10
			badboy = 4
		}
	}
	
	Japanese_philippines = {
		potential = {
			OR = {
			tag = JAP
			tag = SHO}
			NOT = {
				has_country_flag = japan_phi
			}
		}
		
		allow = {
			owns = 1455
		}
		
		effect = {
			set_country_flag = japan_phi
			PHI = { all_core = { add_core = THIS } } 
			1456 = { add_core = THIS } 
			1455 = { add_core = THIS } 
			1457 = { add_core = THIS } 
			1458 = { add_core = THIS } 
			1461 = { add_core = THIS } 
			1460 = { add_core = THIS } 
			1459 = { add_core = THIS } 
			2565 = { add_core = THIS } 
			1462 = { add_core = THIS } 
			1463 = { add_core = THIS } 
			1464 = { add_core = THIS } 
			prestige = 10
			badboy = 4
		}
	}
	
	emperor_meiji = {
		potential = {
			tag = JAP
			year = 1850
			NOT = {
				has_country_flag = emperor_meiji
			}
		}
		
		allow = { 
			}
		
		effect = {
			set_country_flag = emperor_meiji
		}
	}

    overthrow_the_bakufu = {
        picture = the_meiji_restoration
        potential = {
            tag = JAP
           	war = no
            NOT = {
                has_country_flag = boshin_war
                has_country_flag = boshin_war_has_happened
            }			
			exists = SHO
		civilized = yes
        }

        allow = {
            has_country_flag = emperor_meiji
        }

        effect = {
            set_country_flag = boshin_war_has_happened
			any_country = {
				limit = {
					OR = {
						tag = CHO
						tag = TOS
						tag = SAT
					}
					NOT = {
						tag = THIS
					}
				}
		civilized = yes
		annex_to = THIS
			}
			JAP = { all_core = { add_core = SHO } }
            SHO = { country_event = 112929 } }

        ai_will_do = {
            factor = 1
            }
        }
		overthrow_the_bakufu_2 = {
        picture = the_meiji_restoration
        potential = {
            OR = { tag = CHO
			tag = TOS
			tag = SAT }
           	war = no
            NOT = {
                has_country_flag = boshin_war
                has_country_flag = boshin_war_has_happened
            }
			exists = SHO
			NOT = {   
            JAP = { has_country_flag = boshin_war_has_happened } }
		civilized = yes
        }

        allow = {
            JAP = { has_country_flag = emperor_meiji }
        }

        effect = {
            set_country_flag = boshin_war
			any_country = {
				limit = {
					OR = {
						tag = JAP
						tag = CHO
						tag = TOS
						tag = SAT
 
					}
					NOT = {
						tag = THIS
					}
				}
				annex_to = THIS
			}
			change_tag = JAP
			JAP = { all_core = { add_core = SHO } }
            SHO = { country_event = 112929 } }

        ai_will_do = {
            factor = 1
            }
        }
    iwakura_mission = {
    picture = iwakura_mission
        potential = {
            OR = {
                tag = JAP
                tag = SHO
            }
            NOT = { has_country_flag = sent_iwakura_mission }
        }

        allow = {
            war = no
            civilized = yes
            idealism = 1
            OR = {
            AND = {
                tag = JAP
                SHO = { exists = no }
                }
            AND = {
                tag = SHO
                JAP = { exists = no }
                }
            }
        }

        effect = {
            set_country_flag = sent_iwakura_mission
            years_of_research = 1
            random_owned = {
                limit = {
                    owner = { school_reforms = no_schools }
                    }
                owner = { social_reform = low_schools }
            }
        }

        ai_will_do = { factor = 1 }
    }
    meiji_constitution = {
        picture = meiji_court
        potential = {
            tag = JAP
            civilized = yes
            government = absolute_monarchy
            NOT = { has_country_flag = enacted_meiji_constitution }
        }

        allow = {
            war = no
            state_n_government = 1
        }

        effect = {
            set_country_flag = enacted_meiji_constitution
            prestige = 10
            political_reform = wealth_weighted_voting
            random_owned = {
                limit = {
                    owner = { political_parties = underground_parties }
                }
                owner = {
                    political_reform = harassment
                }
            }

            government = prussian_constitutionalism
            any_pop = { militancy = -2 }
        }

        ai_will_do = { factor = 1 }
    }
	Rename_Edo = {
		potential = {
			tag = JAP
			owns = 1649
			NOT = {
				has_country_flag = edo_renamed
			}
		}
		
		allow = {
			JAP = { owns = 1649 }
		}
		
		effect = {
			prestige = 5
			1649 = {
				change_province_name = "Tokyo"
			}
			capital = 1649
			set_country_flag = edo_renamed
		}
	}
			
    Annexation_of_manchuria = {
        picture = gtfo
        potential = {
            OR = {
                tag = JAP
                tag = SHO
            }
		NOT = { has_country_flag = far_east_question1 }
		OR = { MCK = { civilized = yes }
			mass_politics = 1 } 
            exists = MCK
			MCK = { vassal_of = THIS }
        }

        allow = {
            MCK = {
                OR = {
                    in_sphere = THIS
                }
            }
        }

        effect = {
		set_country_flag = far_east_question1
            inhertir = MCK
        }
    }	
    Korean_cores = {
        picture = gtfo
        potential = {
            OR = {
                tag = JAP
                tag = SHO
            }
		OR = { 
			AND = { revolution_n_counterrevolution = 1
			KOR = {
                all_core = {
                    OR = {
                        owned_by = THIS
                        owner = {
                            in_sphere = THIS
                            OR = {
                                is_vassal = no
                                vassal_of = THIS
                            }
                        }
				        owner = {
                                vassal_of = THIS
                            }
                        }
                    }
				}
			}
        }

        allow = {
        }

        effect = {
		set_country_flag = far_east_question
            KOR = { all_core = { add_core = THIS } }
        }
    }
    Annexation_of_Rehe = {
        picture = gtfo
        potential = {
            OR = {
                tag = JAP
                tag = SHO
            }
		NOT = { has_country_flag = far_east_question2 }
		OR = { owns = 1555
			mass_politics = 1 }
		has_global_flag = taiping_has_happened2
		CHI = { war = no }
        }

        allow = {
            owns = 1479
        }

        effect = {
		set_country_flag = far_east_question2
        CHI = { country_event = 463020000 }
        }
    }
    Nanshin-Ron = {
        picture = gtfo
        potential = {
            OR = {
                tag = JAP
                tag = SHO
            }
		revolution_n_counterrevolution = 1
		owns = 1456
		owns = 1461
		owns = 1463
		NOT = { has_country_flag = nanshinron }
        }

        allow = {
         civilized = yes
        }

        effect = {
		set_country_flag = nanshinron
        JAV = { all_core = { add_core = THIS } }
        BRU = { all_core = { add_core = THIS } }
        BAL = { all_core = { add_core = THIS } }
        ATJ = { all_core = { add_core = THIS } }
        SRI = { all_core = { add_core = THIS } }
        1426 = { add_core = THIS }
        1427 = { add_core = THIS }
        1428 = { add_core = THIS }
        1422 = { add_core = THIS }
        1423 = { add_core = THIS }
        1429 = { add_core = THIS }
        1425 = { add_core = THIS }
        1397 = { add_core = THIS }
        1400 = { add_core = THIS }
        1399 = { add_core = THIS }
        1403 = { add_core = THIS }
        1410 = { add_core = THIS }
        1408 = { add_core = THIS }
        }
    }
    convention_for_Sakhalin = {
        picture = gtfo
        potential = {
            OR = {
                tag = JAP
                tag = SHO
            }
		revolution_n_counterrevolution = 1
		RUS = { owns = 1087 }
		NOT = { has_country_flag = nanshinron2 }
        }

        allow = {
         civilized = yes
        }

        effect = {
		set_country_flag = nanshinron2
        RUS = { country_event = 142200 }
        }
    }
}