on_actions = { on_monthly_EGY = { effect = { coptic_events = yes } } on_weekly_EGY = { effect = { if = { limit = { has_idea = the_military } # Calculate current tier set_temp_variable = { EGY_mil_tier = 1 } if = { limit = { check_variable = { EGY_military_standing_value < -1 } } set_temp_variable = { EGY_mil_tier = 2 } } if = { limit = { check_variable = { EGY_military_standing_value < -49 } } set_temp_variable = { EGY_mil_tier = 3 } } if = { limit = { check_variable = { EGY_military_standing_value < -99 } } set_temp_variable = { EGY_mil_tier = 4 } } if = { limit = { check_variable = { EGY_military_standing_value < -149 } } set_temp_variable = { EGY_mil_tier = 5 } } if = { limit = { check_variable = { EGY_military_standing_value < -199 } } set_temp_variable = { EGY_mil_tier = 6 } } # Only swap ideas if the tier changed if = { limit = { NOT = { check_variable = { EGY_current_mil_tier = EGY_mil_tier } } } set_variable = { EGY_current_mil_tier = EGY_mil_tier } remove_ideas = { EGY_military_happy EGY_military_anger1 EGY_military_anger2 EGY_military_anger3 EGY_military_anger4 EGY_military_anger5 } if = { limit = { check_variable = { EGY_current_mil_tier = 6 } } add_ideas = EGY_military_anger5 remove_ideas = the_military } else_if = { limit = { check_variable = { EGY_current_mil_tier = 5 } } add_ideas = EGY_military_anger4 } else_if = { limit = { check_variable = { EGY_current_mil_tier = 4 } } add_ideas = EGY_military_anger3 } else_if = { limit = { check_variable = { EGY_current_mil_tier = 3 } } add_ideas = EGY_military_anger2 } else_if = { limit = { check_variable = { EGY_current_mil_tier = 2 } } add_ideas = EGY_military_anger1 } else = { add_ideas = EGY_military_happy } } } EGY_update_military_standing = yes if = { limit = { NOT = { OR = { has_country_flag = isis_egy_risen has_government = fascism } } has_stability < 0.4 owns_state = 213 fascism > 0.2 } ISI = { 213 = { transfer_state_to = ISI } division_template = { name = "Warriors of Jihad" regiments = { Special_Forces = { x = 0 y = 0 } Special_Forces = { x = 0 y = 1 } Special_Forces = { x = 1 y = 0 } Special_Forces = { x = 1 y = 1 } } priority = 2 } 213 = { create_unit = { division = "name = \"Warriors of Jihad\" division_template = \"Warriors of Jihad\" start_experience_factor = 1.0" owner = ISI count = 3 } } declare_war_on = { target = EGY type = annex_everything } } EGY = { set_country_flag = isis_egy_risen set_province_controller = 1155 set_province_controller = 9947 set_province_controller = 11922 set_province_controller = 10002 set_province_controller = 4161 set_province_controller = 12073 set_province_controller = 1112 set_province_controller = 10099 country_event = egypt.105 } } } } }