on_actions = { on_startup = { effect = { YUG = { save_global_event_target_as = yugoslavia_wedding_partner } } } #FROM is war target on_declare_war = { effect = { #Powder keg ach if = { limit = { tag = YUG OR = { is_in_faction_with = GER is_in_faction_with = ENG } FROM = { OR = { is_in_faction_with = GER is_in_faction_with = ENG } } } set_country_flag = YUG_delcared_war_on_axis_allies } #Make sure Horthy or Franz does not go to war against himself. #Remove fascist sympaty trait if neutral Horthy at war with fascists if = { limit = { original_tag = HUN FROM = { original_tag = HUN } OR = { has_government = fascism FROM = { has_government = fascism } } } #Neutral Horthy no longer likes fascist if a civil war breaks out because of them if = { limit = { has_country_leader = { id = 500 } #Horthy Neutral } remove_country_leader_trait = fascist_sympathies } FROM = { if = { limit = { has_country_leader = { id = 500 } #Horthy Neutral } remove_country_leader_trait = fascist_sympathies } } #If Fascist Horthy or Nazi Franz is leading a fascist side. Get rid of the neutral guy. if = { limit = { AND = { FROM = { has_country_leader = { id = 502 } #Nazi Franz } has_country_leader = { id = 501 } #Neutral Franz } } retire_country_leader = yes #Neutral Horthy no longer likes fascist if a civil war breaks out because of them if = { limit = { has_country_leader = { id = 500 } #Horthy Neutral } remove_country_leader_trait = fascist_sympathies } } if = { limit = { has_country_leader = { id = 502 } #Nazi Franz FROM = { has_country_leader = { id = 501 } } #Neutral Franz } FROM = { retire_country_leader = yes #Neutral Horthy no longer likes fascist if a civil war breaks out because of them if = { limit = { has_country_leader = { id = 500 } #Horthy Neutral } remove_country_leader_trait = fascist_sympathies } } } if = { limit = { AND = { FROM = { has_country_leader = { id = 503 } #Horthy fascist } has_country_leader = { id = 500 } #Horthy Neutral } } retire_country_leader = yes } if = { limit = { has_country_leader = { id = 503 } #Horthy fascist FROM = { has_country_leader = { id = 500 } } #Horthy Neutral } FROM = { retire_country_leader = yes } } } } } #ROOT = attacking side #FROM = defending side #fired when two countries end up at war with each other (on_war is fired when a country goes to war against anyone and is not fired again when it enters war against another country unless it went to peace first) on_war_relation_added = { effect = { if = { limit = { FROM = { original_tag = YUG } } every_country = { limit = { is_subject_of = YUG OR = { original_tag = BOS original_tag = HRZ original_tag = CRO original_tag = MAC original_tag = SLV original_tag = KOS original_tag = MNT original_tag = HUN original_tag = TRA } } add_to_war = { targeted_alliance = YUG enemy = ROOT hostility_reason = asked_to_join } } } } } #ROOT is new controller #FROM is old controller #FROM.FROM is state ID on_state_control_changed = { effect = { if = { limit = { FROM.FROM = { is_core_of = ROM } } FROM = { set_country_flag = ROM_lost_starting_state } } } } }