add_namespace = AXISSPEECHES_germany
add_namespace = germany
add_namespace = japan

country_event = {
    id = AXISSPEECHES_germany.1 #Fire italian declaration of war speech
    
    fire_only_once = yes
    
    trigger = {
        tag = ITA
        has_war_with = ENG
    }
    
    mean_time_to_happen = {
        days = 2
    }
    
    hidden = yes

    immediate = {
        play_italian_declaration_of_war_effect = yes
    }
}

   country_event = {
      id = AXISSPEECHES_germany.2 #Fire total war speech

      fire_only_once = yes

      trigger = {
		 tag = GER
         has_government = fascism
         any_enemy_country = { is_major = yes }
		 surrender_progress < 0.05
		 count_triggers = {
		   amount = 2
		   any_enemy_country = { original_tag = ENG }
		   any_enemy_country = { original_tag = USA }
		   any_enemy_country = { original_tag = SOV }
		 }
      }

    mean_time_to_happen = {
        days = 2
    }

      hidden = yes

      immediate = {
         play_do_you_want_total_war_effect = yes
      }
   }
country_event = {
	id = germany.4
	title = germany.4.t
	desc = germany.4.d
	picture = GFX_report_event_german_speech

	is_triggered_only = yes

 	immediate = {
 		hidden_effect = {
 			add_named_threat = { threat = 12 name = germany.4.t }
 		}
 	}

	option = {
		name = germany.4.a
		4 = {
			if = {
				limit = { is_owned_by = AUS }
				add_core_of = GER
			}
		}
		152 = {
			if = {
				limit = { is_owned_by = AUS }
				add_core_of = GER
			}
		}
		153 = {
			if = {
				limit = { is_owned_by = AUS }
				add_core_of = GER
			}
		}
		848 = {
			if = {
				limit = { is_owned_by = AUS }
				add_core_of = GER
			}
		}
		975 = {
			if = {
				limit = { is_owned_by = AUS }
				add_core_of = GER
			}
		}
		976 = {
			if = {
				limit = { is_owned_by = AUS }
				add_core_of = GER
			}
		}
		add_political_power = 75
		add_war_support = 0.1
		add_stability = 0.05
		army_experience = 10

		custom_effect_tooltip = generic_skip_one_line_tt

		set_country_flag = AUS_annexed #if this is changed, notify Malin or change reqs for Bohme and Beyer in AUS character file

		play_annexation_of_austria_effect = yes

		AUS = {
			AUS_franz_bohme = {
				demote_leader = yes
				set_nationality = GER
			}
			AUS_eugen_beyer = {
				demote_leader = yes
				set_nationality = GER
			}
			AUS_lothar_rendulic = {
				set_nationality = GER
			}
			AUS_karl_eglseer = {
				set_nationality = GER
			}
		}
		annex_country = { target = AUS transfer_troops = yes }
		
		custom_effect_tooltip = generic_skip_one_line_tt

		GER_anschluss_modify_mefo_bills_or_economy_of_conquest = yes
		GER_seize_gold_reserves_in_europe_peacefully = yes
		add_to_variable = { var = GER_mefo_bill_counter value = -10 }

		custom_effect_tooltip = generic_skip_one_line_tt

		USA = {
			set_country_flag = { flag = USA_anschluss_window days = 60 value = 1 }
		}


		if = {
			limit = {
				has_dlc = "Death or Dishonor"
				country_exists = YUG
				YUG = { has_war = no }
			}
			country_event = {
				id = DOD_yugoslavia.30
				days = 4
			}
		}
		hidden_effect = {
			news_event = { hours = 6 id = news.36 }

			BEL = {
				country_event = {
					id = AUS_political_events.63
					hours = 12
				}
			}
		}
	}
}
country_event = {
	id = japan.6
	title = japan.6.t
	desc = japan.6.d
	picture = GFX_report_event_japanese_soldiers_02
	
	is_triggered_only = yes
	
	option = {
		name = japan.6.a
		USA = { set_country_flag = { flag = USA_indochina_window days = 60 value = 1 } }
		hidden_effect = {
			news_event = { days = 5 id = news.5 }
			play_japan_desires_peace_in_east_asia_effect = yes
		}
		JAP = {
			IF = {
				limit = {
					286 = {
						CONTROLLER = {
							OR = {
								original_tag = FRA
								is_subject_of = FRA
								is_subject_of = VIC
							}
						}
					}
				}
				transfer_state = 286
			}
			IF = {
				limit = {
					670 = {
						CONTROLLER = {
							OR = {
								original_tag = FRA
								is_subject_of = FRA
								is_subject_of = VIC
							}
						}
					}
				}
				transfer_state = 670
			}
			IF = {
				limit = {
					671 = {
						CONTROLLER = {
							OR = {
								original_tag = FRA
								is_subject_of = FRA
								is_subject_of = VIC
							}
						}
					}
				}
				transfer_state = 671
			}
			IF = {
				limit = {
					741 = {
						CONTROLLER = {
							OR = {
								original_tag = FRA
								is_subject_of = FRA
								is_subject_of = VIC
							}
						}
					}
				}
				transfer_state = 741
			}
			IF = {
				limit = {
					728 = {
						CONTROLLER = {
							OR = {
								original_tag = FRA
								is_subject_of = FRA
								is_subject_of = VIC
							}
						}
					}
				}
				transfer_state = 728
			}
			IF = {
				limit = {
					1017 = {
						CONTROLLER = {
							OR = {
								original_tag = FRA
								is_subject_of = FRA
								is_subject_of = VIC
							}
						}
					}
				}
				transfer_state = 1017
			}
			add_named_threat = { threat = 3 name = france.1.t }
		}
	}
}

# French Reject Demands
country_event = {
	id = japan.7
	title = japan.7.t
	desc = japan.7.d
	picture = GFX_report_event_japanese_soldiers_03
	
	is_triggered_only = yes
	
	option = {
		name = japan.7.a
		create_wargoal = {
			type = take_state
			target = FROM
			generator = {
				286 741 670 671 728 1017 
			}
		}
		hidden_effect = {
			country_event = { days = 5 id = news.6 }
			play_japan_desires_peace_in_east_asia_effect = yes
		}
	}
}