types = { #Strikes against fuel production and storage fuel_production_storage_raid_air = { days_to_prepare = 30 days_re_enable = 180 category = infastructure_strikes command_power = 20 # Specific Target is visible show_target = { NOT = { is_in_faction_with = FROM } raid_show_target_opinion_neutral = yes FROM = { MD_special_countries = no } } # Can prepare available = { raid_available_grey_zone = yes } launchable = { set_temp_variable = { cost = 99 } raid_can_launch = yes } target_type = { state = { # Resouce amount needed to be eligible as raid target OR = { oil > 18 fuel_silo > 0 } # If the site has been hit recently you can't target it again NOT = { OR = { has_dynamic_modifier = { modifier = oil_refining_modifier } has_dynamic_modifier = { modifier = oil_critical_refining_modifier } has_dynamic_modifier = { modifier = oil_minor_refining_modifier } } } } } arrow = { type = air } launch_sound = raid_launch_air target_icon = GFX_other_target_icon unit_requirements = { equipment = { type = { tactical_bomber cas strategic_bomber guided_missile_equipment ballistic_missile_equipment hypersonic_missile_equipment } amount = { min = 10 } } } starting_point = { types = { carrier air_base rocket_site submarine } } success_factors = { success = { base = 0.20 # Raiding unit modifiers experience = { weight = 0.1 start_weight = -0.1 reference = 1000 } air_agility = { reference = 200 weight = 0.5 start_weight = -0.5 } reliability = { reference = 1 weight = 0.1 start_weight = -0.1 } air_defence = { reference = 150 weight = 0.2 start_weight = -0.2 } air_superiority = { reference = 1 weight = 0.3 start_weight = -0.100 } ### Target Modifiers anti_air = { reference = 5 weight = -0.25 } radar = { reference = 1 weight = -0.15 } interception = { reference = 120 # 5 wings as 500 planes in vanilla weight = -0.2 } intel = { weight = 0.3 reference = 100 } } disaster = { base = 0.25 } critical = { base = 0.05 } } success_levels = { failure = { actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_failure_losses = yes } victim_effects = { send_raid_event_to_victim = yes } } limited_success = { victim_effects = { send_raid_event_to_victim = yes var:target_state = { set_temp_variable = { ROOT.num_fuel_silos = THIS.building_level@fuel_silo } } calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_limited = yes clamp_temp_variable = { var = building_damage_by_missile max = num_fuel_silos } #if the state has oil wells to target as well, reduce the number of missiles going after buildings #Otherwise, the missiles will just bum rush the storage and kill that instead var:target_state = { if = { limit = { oil > 18 } set_temp_variable = { oil_reducer = THIS.resource@oil } multiply_temp_variable = { oil_reducer = 0.75 } divide_temp_variable = { ROOT.building_damage_by_missile = oil_reducer } add_dynamic_modifier = { modifier = oil_minor_refining_modifier days = 150 } } } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { if = { limit = { fuel_silo > 0 } meta_effect = { text = { damage_building = { type = fuel_silo damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_limited_success_losses = yes } } success = { victim_effects = { send_raid_event_to_victim = yes var:target_state = { set_temp_variable = { ROOT.num_fuel_silos = THIS.building_level@fuel_silo } } calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_success = yes clamp_temp_variable = { var = building_damage_by_missile max = num_fuel_silos } #if the state has oil wells to target as well, reduce the number of missiles going after buildings #Otherwise, the missiles will just bum rush the storage and kill that instead var:target_state = { if = { limit = { oil > 18 } set_temp_variable = { oil_reducer = THIS.resource@oil } multiply_temp_variable = { oil_reducer = 0.75 } divide_temp_variable = { ROOT.building_damage_by_missile = oil_reducer } add_dynamic_modifier = { modifier = oil_refining_modifier days = 200 } } } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { if = { limit = { fuel_silo > 0 } meta_effect = { text = { damage_building = { type = fuel_silo damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_success_losses = yes } } critical_success = { victim_effects = { send_raid_event_to_victim = yes var:target_state = { set_temp_variable = { ROOT.num_fuel_silos = THIS.building_level@fuel_silo } } calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_critical = yes clamp_temp_variable = { var = building_damage_by_missile max = num_fuel_silos } #if the state has oil wells to target as well, reduce the number of missiles going after buildings #Otherwise, the missiles will just bum rush the storage and kill that instead var:target_state = { if = { limit = { oil > 18 } set_temp_variable = { oil_reducer = THIS.resource@oil } multiply_temp_variable = { oil_reducer = 0.75 } divide_temp_variable = { ROOT.building_damage_by_missile = oil_reducer } add_dynamic_modifier = { modifier = oil_critical_refining_modifier days = 260 } } } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { if = { limit = { fuel_silo > 0 } meta_effect = { text = { damage_building = { type = fuel_silo damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_critical_success_losses = yes } } } ai_will_do = { base = 0 modifier = { add = 5 has_opinion = { target = FROM value < -75 } } modifier = { add = 5 has_opinion = { target = FROM value < -100 } } modifier = { add = 5 has_opinion = { target = FROM value < -50 } } modifier = { add = -10 has_government = FROM } modifier = { factor = 2 OR = { has_idea = super_power has_idea = large_power has_idea = great_power } } modifier = { factor = 2 strength_ratio = { tag = FROM ratio > 1.5 } NOT = { has_war_with = FROM } } modifier = { factor = 0 threat < 0.10 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0.05 OR = { has_government = democratic has_government = neutrality has_elections = yes } FROM = { has_added_tension_amount < 5 } } modifier = { factor = 0 date < 2001.1.1 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0 strength_ratio = { tag = FROM ratio < 0.75 } NOT = { has_war_with = FROM } } modifier = { # Don't target anyone who is not a potential enemy factor = 0 NOT = { has_country_flag = promised_retaliation_against@FROM } NOT = { is_in_array = { array = potential_and_current_enemies value = FROM # Target country } } } modifier = { factor = 0 has_war = yes raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0 tag = USA FROM = { tag = IRQ } date < 2004.1.1 NOT = { has_country_flag = promised_retaliation_against@FROM } } modifier = { factor = 0 NOT = { has_country_flag = promised_retaliation_against@FROM } FROM = { OR = { has_idea = NATO_member has_idea = CSTO_member has_idea = EU_member has_idea = faction_resistance_axis_member } } } # Alliance gate — back off when target is in a faction and our alliance ratio is weak (<0.7) modifier = { factor = 0 raid_alliance_unfavorable = yes } # Doctrinal reach gate — isolation/local_security/limited interventionism can't reach. # Bypassed by the rule_raid_doctrine_reach game rule. modifier = { factor = 0 raid_intervention_doctrine_reach_block = yes } # Major-power target dampener — AI minors are 4× less likely to raid super/great powers while at peace. modifier = { factor = 0.25 raid_skip_target_non_hostile_no_retaliation = yes FROM = { OR = { has_idea = super_power has_idea = great_power } } NOT = { OR = { has_idea = super_power has_idea = great_power } } } modifier = { has_country_flag = promised_retaliation_against@FROM factor = 100 } modifier = { has_country_flag = conceded_to@FROM factor = 0 } modifier = { factor = 0 is_ally_with = FROM raid_skip_target_non_hostile_no_retaliation = yes } modifier = { # Don't raid nations we have influence in factor = 0 raid_skip_target_non_hostile_no_retaliation = yes FROM = { is_influencer = yes } } modifier = { # Don't raid if heavily in debt factor = 0 raid_skip_target_non_hostile_no_retaliation = yes check_variable = { debt_ratio > 0.25 } } modifier = { # Less likely to raid if somewhat in debt factor = 0.25 NOT = { has_war_with = FROM } check_variable = { debt_ratio > 0.15 } } modifier = { factor = 0 OR = { FROM = { is_subject_of = ROOT } is_subject_of = FROM } } } } #Strike against resource mines metal_production_raid_air = { days_to_prepare = 30 days_re_enable = 180 category = infastructure_strikes command_power = 20 # Specific Target is visible show_target = { NOT = { is_in_faction_with = FROM } raid_show_target_opinion_neutral = yes FROM = { MD_special_countries = no } } # Can prepare available = { raid_available_grey_zone = yes } launchable = { set_temp_variable = { cost = 99 } raid_can_launch = yes } target_type = { state = { # Resouce amount needed to be eligible as raid target OR = { tungsten > 8 steel > 24 aluminium > 24 chromium > 8 } # If the site has been hit recently you can't target it again NOT = { OR = { has_dynamic_modifier = { modifier = tech_metal_refining_modifier } has_dynamic_modifier = { modifier = tech_metal_critical_refining_modifier } has_dynamic_modifier = { modifier = tech_metal_minor_refining_modifier } has_dynamic_modifier = { modifier = metal_refining_modifier } has_dynamic_modifier = { modifier = metal_critical_refining_modifier } has_dynamic_modifier = { modifier = metal_minor_refining_modifier } has_dynamic_modifier = { modifier = rare_metal_refining_modifier } has_dynamic_modifier = { modifier = rare_metal_critical_refining_modifier } has_dynamic_modifier = { modifier = rare_metal_minor_refining_modifier } } } } } arrow = { type = air } launch_sound = raid_launch_air target_icon = GFX_other_target_icon unit_requirements = { equipment = { type = { tactical_bomber cas strategic_bomber guided_missile_equipment ballistic_missile_equipment hypersonic_missile_equipment } amount = { min = 10 } } } starting_point = { types = { carrier air_base rocket_site submarine } } success_factors = { success = { base = 0.20 # Raiding unit modifiers experience = { weight = 0.1 start_weight = -0.1 reference = 1000 } air_agility = { reference = 200 weight = 0.5 start_weight = -0.5 } reliability = { reference = 1 weight = 0.1 start_weight = -0.1 } air_defence = { reference = 150 weight = 0.2 start_weight = -0.2 } air_superiority = { reference = 1 weight = 0.3 start_weight = -0.100 } ### Target Modifiers anti_air = { reference = 5 weight = -0.25 } radar = { reference = 1 weight = -0.15 } interception = { reference = 120 # 5 wings as 500 planes in vanilla weight = -0.2 } intel = { weight = 0.3 reference = 100 } } disaster = { base = 0.25 } critical = { base = 0.05 } } success_levels = { failure = { actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_failure_losses = yes } victim_effects = { send_raid_event_to_victim = yes } } limited_success = { victim_effects = { send_raid_event_to_victim = yes var:target_state = { if = { limit = { tungsten > 8 } add_dynamic_modifier = { modifier = tech_metal_minor_refining_modifier days = 150 } } if = { limit = { chromium > 8 } add_dynamic_modifier = { modifier = rare_metal_minor_refining_modifier days = 150 } } if = { limit = { OR = { aluminium > 24 steel > 24 } } add_dynamic_modifier = { modifier = metal_minor_refining_modifier days = 150 } } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_limited_success_losses = yes } } success = { victim_effects = { send_raid_event_to_victim = yes # Damage to Target var:target_state = { if = { limit = { tungsten > 8 } add_dynamic_modifier = { modifier = tech_metal_refining_modifier days = 200 } } if = { limit = { chromium > 8 } add_dynamic_modifier = { modifier = rare_metal_refining_modifier days = 200 } } if = { limit = { OR = { aluminium > 24 steel > 24 } } add_dynamic_modifier = { modifier = metal_refining_modifier days = 200 } } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_success_losses = yes } } critical_success = { victim_effects = { send_raid_event_to_victim = yes # Damage to Target var:target_state = { if = { limit = { tungsten > 8 } add_dynamic_modifier = { modifier = tech_metal_critical_refining_modifier days = 280 } } if = { limit = { chromium > 8 } add_dynamic_modifier = { modifier = rare_metal_critical_refining_modifier days = 280 } } if = { limit = { OR = { aluminium > 24 steel > 24 } } add_dynamic_modifier = { modifier = metal_critical_refining_modifier days = 280 } } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_critical_success_losses = yes } } } ai_will_do = { base = 0 modifier = { add = 5 has_opinion = { target = FROM value < -75 } } modifier = { add = 5 has_opinion = { target = FROM value < -100 } } modifier = { add = 5 has_opinion = { target = FROM value < -50 } } modifier = { factor = 2 OR = { has_idea = super_power has_idea = large_power has_idea = great_power } } modifier = { factor = 0 threat < 0.10 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 2 strength_ratio = { tag = FROM ratio > 1.5 } NOT = { has_war_with = FROM } } modifier = { factor = 0 strength_ratio = { tag = FROM ratio < 0.75 } NOT = { has_war_with = FROM } } modifier = { # Don't target anyone who is not a potential enemy factor = 0 NOT = { OR = { has_country_flag = promised_retaliation_against@FROM is_in_array = { array = potential_and_current_enemies value = FROM # Target country } } } } modifier = { factor = 0.05 OR = { has_government = democratic has_government = neutrality has_elections = yes } FROM = { has_added_tension_amount < 5 } } modifier = { factor = 0 date < 2001.1.1 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0 has_war = yes raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0 tag = USA FROM = { tag = IRQ } date < 2004.1.1 NOT = { has_country_flag = promised_retaliation_against@FROM } } modifier = { NOT = { has_country_flag = promised_retaliation_against@FROM } factor = 0 FROM = { OR = { has_idea = NATO_member has_idea = CSTO_member has_idea = EU_member has_idea = faction_resistance_axis_member } } } # Alliance gate — back off when target is in a faction and our alliance ratio is weak (<0.7) modifier = { factor = 0 raid_alliance_unfavorable = yes } # Doctrinal reach gate — isolation/local_security/limited interventionism can't reach. # Bypassed by the rule_raid_doctrine_reach game rule. modifier = { factor = 0 raid_intervention_doctrine_reach_block = yes } # Major-power target dampener — AI minors are 4× less likely to raid super/great powers while at peace. modifier = { factor = 0.25 raid_skip_target_non_hostile_no_retaliation = yes FROM = { OR = { has_idea = super_power has_idea = great_power } } NOT = { OR = { has_idea = super_power has_idea = great_power } } } modifier = { has_country_flag = promised_retaliation_against@FROM factor = 100 } modifier = { has_country_flag = conceded_to@FROM factor = 0 } modifier = { factor = 0 is_ally_with = FROM raid_skip_target_non_hostile_no_retaliation = yes } modifier = { # Don't raid nations we have influence in factor = 0 raid_skip_target_non_hostile_no_retaliation = yes FROM = { is_influencer = yes } } modifier = { # Don't raid if heavily in debt factor = 0 raid_skip_target_non_hostile_no_retaliation = yes check_variable = { debt_ratio > 0.25 } } modifier = { # Less likely to raid if somewhat in debt factor = 0.25 NOT = { has_war_with = FROM } check_variable = { debt_ratio > 0.15 } } modifier = { factor = 0 OR = { FROM = { is_subject_of = ROOT } is_subject_of = FROM } } } } #Strike against all power production elements state_power_strike_air = { days_to_prepare = 30 days_re_enable = 365 category = infastructure_strikes command_power = 20 # Specific Target is visible show_target = { NOT = { is_in_faction_with = FROM } FROM = { NOT = { has_country_flag = power_grid_damaged } MD_special_countries = no } raid_show_target_opinion_neutral = yes } # Can prepare available = { raid_available_grey_zone = yes } launchable = { set_temp_variable = { cost = 99 } raid_can_launch = yes } target_type = { building = { type = fossil_powerplant } building = { type = renewable_energy_infra } } launch_sound = raid_launch_air target_icon = GFX_other_target_icon arrow = { type = air } unit_requirements = { equipment = { type = { tactical_bomber cas strategic_bomber guided_missile_equipment ballistic_missile_equipment hypersonic_missile_equipment } amount = { min = 10 } } } starting_point = { types = { carrier air_base rocket_site submarine } } success_factors = { success = { base = 0.20 # Raiding unit modifiers experience = { weight = 0.3 start_weight = -0.2 reference = 1000 } air_agility = { reference = 200 weight = 0.5 start_weight = -0.5 } reliability = { reference = 1 weight = 0.2 start_weight = -0.1 } air_defence = { reference = 150 weight = 0.2 start_weight = -0.2 } air_superiority = { reference = 1 weight = 0.1 start_weight = -0.100 } ### Target Modifiers anti_air = { reference = 5 weight = -0.25 } radar = { reference = 1 weight = -0.15 } interception = { reference = 120 # 5 wings as 500 planes in vanilla weight = -0.2 } intel = { weight = 0.5 start_weight = -0.1 start_reference = 10 reference = 100 } } disaster = { base = 0.25 #TODO: Go back trhough this system and rebalance it #Disaster - Straight Failure #Limited Success - Mostly failed, maybe a tiny bit of damage #Success - Actual damage level that we want to see happen #Critical Success - Kaboom. Consider even allowing buildings to be deleted by this # air_agility = { # reference = 200 # weight = -0.1 # start_weight = 0.5 # } } critical = { base = 0.05 } } success_levels = { failure = { actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_failure_losses = yes } victim_effects = { send_raid_event_to_victim = yes } } limited_success = { victim_effects = { send_raid_event_to_victim = yes var:victim_country = { if = { limit = { NOT = { OR = { has_dynamic_modifier = { modifier = power_critical_strike_modifier } has_dynamic_modifier = { modifier = power_strike_modifier } has_dynamic_modifier = { modifier = power_minor_strike_modifier } } } } add_dynamic_modifier = { modifier = power_minor_strike_modifier days = 75 } set_country_flag = { flag = power_grid_damaged days = 75 value = 1 } } } var:target_state = { set_temp_variable = { num_power_plants = THIS.building_level@fossil_powerplant } set_temp_variable = { num_renewable_energy_infra = THIS.building_level@renewable_energy_infra } } calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_limited = yes if = { limit = { check_variable = { num_power_plants > 0 } check_variable = { num_renewable_energy_infra > 0 } } multiply_temp_variable = { building_damage_by_missile = 0.5 } } set_temp_variable = { max_clamp = num_power_plants } add_to_temp_variable = { max_clamp = num_renewable_energy_infra } clamp_temp_variable = { var = building_damage_by_missile min = 0 max = max_clamp } multiply_temp_variable = { building_damage_by_missile = 0.1 } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { if = { limit = { fossil_powerplant > 0 } meta_effect = { text = { damage_building = { type = fossil_powerplant damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } if = { limit = { renewable_energy_infra > 0 } meta_effect = { text = { damage_building = { type = renewable_energy_infra damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_limited_success_losses = yes } } success = { victim_effects = { send_raid_event_to_victim = yes var:victim_country = { if = { limit = { NOT = { OR = { has_dynamic_modifier = { modifier = power_critical_strike_modifier } has_dynamic_modifier = { modifier = power_strike_modifier } has_dynamic_modifier = { modifier = power_minor_strike_modifier } } } } add_dynamic_modifier = { modifier = power_strike_modifier days = 120 } set_country_flag = { flag = power_grid_damaged days = 120 value = 1 } } } var:target_state = { set_temp_variable = { num_power_plants = THIS.building_level@fossil_powerplant } set_temp_variable = { num_renewable_energy_infra = THIS.building_level@renewable_energy_infra } } calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_success = yes if = { limit = { check_variable = { num_power_plants > 0 } check_variable = { num_renewable_energy_infra > 0 } } multiply_temp_variable = { building_damage_by_missile = 0.5 } } set_temp_variable = { max_clamp = num_power_plants } add_to_temp_variable = { max_clamp = num_renewable_energy_infra } clamp_temp_variable = { var = building_damage_by_missile min = 0 max = max_clamp } multiply_temp_variable = { building_damage_by_missile = 0.1 } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { if = { limit = { fossil_powerplant > 0 } meta_effect = { text = { damage_building = { type = fossil_powerplant damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } if = { limit = { renewable_energy_infra > 0 } meta_effect = { text = { damage_building = { type = renewable_energy_infra damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_success_losses = yes } } critical_success = { victim_effects = { send_raid_event_to_victim = yes var:victim_country = { if = { limit = { NOT = { OR = { has_dynamic_modifier = { modifier = power_critical_strike_modifier } has_dynamic_modifier = { modifier = power_strike_modifier } has_dynamic_modifier = { modifier = power_minor_strike_modifier } } } } add_dynamic_modifier = { modifier = power_critical_strike_modifier days = 180 } set_country_flag = { flag = power_grid_damaged days = 180 value = 1 } } } var:target_state = { set_temp_variable = { num_power_plants = THIS.building_level@fossil_powerplant } set_temp_variable = { num_renewable_energy_infra = THIS.building_level@renewable_energy_infra } } calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_critical = yes if = { limit = { check_variable = { num_power_plants > 0 } check_variable = { num_renewable_energy_infra > 0 } } multiply_temp_variable = { building_damage_by_missile = 0.5 } } set_temp_variable = { max_clamp = num_power_plants } add_to_temp_variable = { max_clamp = num_renewable_energy_infra } clamp_temp_variable = { var = building_damage_by_missile min = 0 max = max_clamp } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { if = { limit = { fossil_powerplant > 0 } meta_effect = { text = { damage_building = { type = fossil_powerplant damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } if = { limit = { renewable_energy_infra > 0 } meta_effect = { text = { damage_building = { type = renewable_energy_infra damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_critical_success_losses = yes } } } #TODO: Add some checks here to assess how much power a nation needs #If hostile, and their power is close to the line, increase likihood of strikes ai_will_do = { base = 0 modifier = { add = 5 has_opinion = { target = FROM value < -75 } } modifier = { add = 5 has_opinion = { target = FROM value < -100 } } modifier = { add = 5 has_opinion = { target = FROM value < -50 } } modifier = { factor = 2 OR = { has_idea = super_power has_idea = large_power has_idea = great_power } } modifier = { add = -10 has_government = FROM } modifier = { factor = 2 strength_ratio = { tag = FROM ratio > 1.5 } NOT = { has_war_with = FROM } } modifier = { factor = 0 threat < 0.10 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0 strength_ratio = { tag = FROM ratio < 0.75 } NOT = { has_war_with = FROM } } modifier = { # Don't target anyone who is not a potential enemy factor = 0 NOT = { has_country_flag = promised_retaliation_against@FROM } NOT = { is_in_array = { array = potential_and_current_enemies value = FROM # Target country } } } modifier = { factor = 0 has_war = yes raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0 tag = USA FROM = { tag = IRQ } date < 2004.1.1 NOT = { has_country_flag = promised_retaliation_against@FROM } } modifier = { factor = 0.05 OR = { has_government = democratic has_government = neutrality has_elections = yes } FROM = { has_added_tension_amount < 5 } } modifier = { factor = 0 date < 2001.1.1 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { NOT = { has_country_flag = promised_retaliation_against@FROM } factor = 0 FROM = { OR = { has_idea = NATO_member has_idea = CSTO_member has_idea = EU_member has_idea = faction_resistance_axis_member } } } # Alliance gate — back off when target is in a faction and our alliance ratio is weak (<0.7) modifier = { factor = 0 raid_alliance_unfavorable = yes } # Doctrinal reach gate — isolation/local_security/limited interventionism can't reach. # Bypassed by the rule_raid_doctrine_reach game rule. modifier = { factor = 0 raid_intervention_doctrine_reach_block = yes } # Major-power target dampener — AI minors are 4× less likely to raid super/great powers while at peace. modifier = { factor = 0.25 raid_skip_target_non_hostile_no_retaliation = yes FROM = { OR = { has_idea = super_power has_idea = great_power } } NOT = { OR = { has_idea = super_power has_idea = great_power } } } modifier = { has_country_flag = promised_retaliation_against@FROM factor = 100 } modifier = { has_country_flag = conceded_to@FROM factor = 0 } modifier = { factor = 0 is_ally_with = FROM raid_skip_target_non_hostile_no_retaliation = yes } modifier = { # Don't raid nations we have influence in factor = 0 raid_skip_target_non_hostile_no_retaliation = yes FROM = { is_influencer = yes } } modifier = { # Don't raid if heavily in debt factor = 0 raid_skip_target_non_hostile_no_retaliation = yes check_variable = { debt_ratio > 0.25 } } modifier = { # Less likely to raid if somewhat in debt factor = 0.25 NOT = { has_war_with = FROM } check_variable = { debt_ratio > 0.15 } } modifier = { factor = 0 OR = { FROM = { is_subject_of = ROOT } is_subject_of = FROM } } } } #Strike against enrichment facilities to disable nuclear fuel/weapons production enrichment_facility_strike = { days_to_prepare = 30 days_re_enable = 365 category = infastructure_strikes command_power = 20 show_target = { NOT = { is_in_faction_with = FROM } raid_show_target_opinion_hostile = yes FROM = { MD_special_countries = no } } available = { raid_available_grey_zone = yes } launchable = { set_temp_variable = { cost = 99 } raid_can_launch = yes } target_type = { building = { type = enrichment_facility } } launch_sound = raid_launch_air target_icon = GFX_other_target_icon arrow = { type = air } unit_requirements = { equipment = { type = { tactical_bomber cas strategic_bomber guided_missile_equipment ballistic_missile_equipment hypersonic_missile_equipment } amount = { min = 10 } } } starting_point = { types = { carrier air_base rocket_site submarine } } success_factors = { success = { base = 0.20 experience = { weight = 0.3 start_weight = -0.2 reference = 1000 } air_agility = { reference = 200 weight = 0.5 start_weight = -0.5 } reliability = { reference = 1 weight = 0.2 start_weight = -0.1 } air_defence = { reference = 150 weight = 0.2 start_weight = -0.2 } air_superiority = { reference = 1 weight = 0.1 start_weight = -0.100 } anti_air = { reference = 5 weight = -0.25 } radar = { reference = 1 weight = -0.15 } interception = { reference = 120 # 5 wings as 500 planes in vanilla weight = -0.2 } intel = { weight = 0.5 start_weight = -0.1 start_reference = 10 reference = 100 } } disaster = { base = 0.25 } critical = { base = 0.05 } } success_levels = { failure = { actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_failure_losses = yes } victim_effects = { send_raid_event_to_victim = yes } } limited_success = { victim_effects = { send_raid_event_to_victim = yes calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_limited = yes clamp_temp_variable = { var = building_damage_by_missile max = 1 } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { meta_effect = { text = { if = { limit = { enrichment_facility > 0 } damage_building = { type = enrichment_facility damage = [DAM] } } } DAM = "[?building_damage_by_missile]" } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_limited_success_losses = yes } } success = { victim_effects = { send_raid_event_to_victim = yes calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_success = yes clamp_temp_variable = { var = building_damage_by_missile max = 1 } multiply_temp_variable = { building_damage_by_missile = 0.5 } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { meta_effect = { text = { if = { limit = { enrichment_facility > 0 } damage_building = { type = enrichment_facility damage = [DAM] } } } DAM = "[?building_damage_by_missile]" } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_success_losses = yes } } critical_success = { victim_effects = { send_raid_event_to_victim = yes calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_critical = yes clamp_temp_variable = { var = building_damage_by_missile max = 1 } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { meta_effect = { text = { if = { limit = { enrichment_facility > 0 } damage_building = { type = enrichment_facility damage = [DAM] } } } DAM = "[?building_damage_by_missile]" } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_critical_success_losses = yes } } } ai_will_do = { base = 0 modifier = { add = 5 has_opinion = { target = FROM value < -50 } } modifier = { add = 5 has_opinion = { target = FROM value < -75 } } modifier = { add = 5 has_opinion = { target = FROM value < -100 } } modifier = { add = -10 has_government = FROM } modifier = { factor = 2 OR = { has_idea = super_power has_idea = large_power has_idea = great_power } } modifier = { factor = 2 strength_ratio = { tag = FROM ratio > 1.5 } NOT = { has_war_with = FROM } } modifier = { factor = 0 threat < 0.10 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0 strength_ratio = { tag = FROM ratio < 0.75 } NOT = { has_war_with = FROM } } modifier = { factor = 0 NOT = { has_country_flag = promised_retaliation_against@FROM } NOT = { is_in_array = { array = potential_and_current_enemies value = FROM } } } modifier = { factor = 0 has_war = yes raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0.05 OR = { has_government = democratic has_government = neutrality has_elections = yes } FROM = { has_added_tension_amount < 5 } } modifier = { factor = 0 date < 2001.1.1 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { NOT = { has_country_flag = promised_retaliation_against@FROM } factor = 0 FROM = { OR = { has_idea = NATO_member has_idea = CSTO_member has_idea = EU_member has_idea = faction_resistance_axis_member } } } modifier = { factor = 0 raid_alliance_unfavorable = yes } modifier = { factor = 0 raid_intervention_doctrine_reach_block = yes } modifier = { factor = 0.25 raid_skip_target_non_hostile_no_retaliation = yes FROM = { OR = { has_idea = super_power has_idea = great_power } } NOT = { OR = { has_idea = super_power has_idea = great_power } } } modifier = { has_country_flag = promised_retaliation_against@FROM factor = 100 } modifier = { has_country_flag = conceded_to@FROM factor = 0 } modifier = { factor = 0 is_ally_with = FROM raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0 raid_skip_target_non_hostile_no_retaliation = yes FROM = { is_influencer = yes } } modifier = { factor = 0 raid_skip_target_non_hostile_no_retaliation = yes check_variable = { debt_ratio > 0.25 } } modifier = { factor = 0.25 NOT = { has_war_with = FROM } check_variable = { debt_ratio > 0.15 } } modifier = { factor = 0 OR = { FROM = { is_subject_of = ROOT } is_subject_of = FROM } } } } #Cruise missile strikes against production production_strike = { days_to_prepare = 30 days_re_enable = 356 category = infastructure_strikes command_power = 20 # command power allocation cost arrow = { type = air } # Specific Target is visible show_target = { raid_show_target_opinion_hostile = yes } # Can prepare available = { FROM = { NOT = { is_subject_of = ROOT } NOT = { has_non_aggression_pact_with = ROOT } } OR = { has_war_with = FROM has_opinion = { target = FROM value < -50 } hidden_trigger = { has_country_flag = promised_retaliation_against@FROM } } } launchable = { set_temp_variable = { cost = 99 } raid_can_launch = yes } unit_requirements = { equipment = { type = { tactical_bomber cas strategic_bomber guided_missile_equipment ballistic_missile_equipment hypersonic_missile_equipment } amount = { min = 10 } } } launch_sound = raid_launch_marine target_icon = GFX_other_target_icon target_type = { state = { OR = { industrial_complex > 0 arms_factory > 0 dockyard > 0 offices > 0 agriculture_district > 0 } } } starting_point = { types = { rocket_site submarine carrier air_base } } success_factors = { success = { base = 0.20 air_agility = { reference = 200 weight = 0.5 start_weight = -0.5 } reliability = { reference = 1 weight = 0.3 start_weight = -0.1 } air_defence = { reference = 150 weight = 0.2 start_weight = -0.2 } air_superiority = { reference = 1 weight = 0.1 start_weight = -0.100 } ### Target Modifiers anti_air = { reference = 5 weight = -0.25 } radar = { reference = 1 weight = -0.15 } interception = { reference = 120 # 5 wings as 500 planes in vanilla weight = -0.2 } intel = { weight = 0.5 start_weight = -0.1 start_reference = 10 reference = 100 } } critical = { base = 0.10 } disaster = { base = 0.25 } } success_levels = { failure = { actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_failure_losses = yes } victim_effects = { send_raid_event_to_victim = yes } } limited_success = { victim_effects = { send_raid_event_to_victim = yes var:target_state = { set_temp_variable = { ROOT.num_mil_ind = THIS.building_level@arms_factory } set_temp_variable = { ROOT.num_dockyard = THIS.building_level@dockyard } set_temp_variable = { ROOT.num_industrial_complex = THIS.building_level@industrial_complex } set_temp_variable = { ROOT.num_offices = THIS.building_level@offices } set_temp_variable = { ROOT.num_agriculture_district = THIS.building_level@agriculture_district } } calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_limited = yes set_temp_variable = { target_split_var = 0 } if = { limit = { check_variable = { num_mil_ind > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_dockyard > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_industrial_complex > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_offices > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_agriculture_district > 0 } } add_to_temp_variable = { target_split_var = 1 } } divide_temp_variable = { building_damage_by_missile = target_split_var } set_temp_variable = { max_clamp = num_mil_ind } add_to_temp_variable = { max_clamp = num_dockyard } add_to_temp_variable = { max_clamp = num_industrial_complex } add_to_temp_variable = { max_clamp = num_offices } add_to_temp_variable = { max_clamp = num_agriculture_district } clamp_temp_variable = { var = building_damage_by_missile min = 0 max = max_clamp } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { production_strike_success_damage = yes } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_limited_success_losses = yes } } success = { victim_effects = { send_raid_event_to_victim = yes var:target_state = { set_temp_variable = { ROOT.num_mil_ind = THIS.building_level@arms_factory } set_temp_variable = { ROOT.num_dockyard = THIS.building_level@dockyard } set_temp_variable = { ROOT.num_industrial_complex = THIS.building_level@industrial_complex } set_temp_variable = { ROOT.num_offices = THIS.building_level@offices } set_temp_variable = { ROOT.num_agriculture_district = THIS.building_level@agriculture_district } } calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_success = yes set_temp_variable = { target_split_var = 0 } if = { limit = { check_variable = { num_mil_ind > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_dockyard > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_industrial_complex > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_offices > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_agriculture_district > 0 } } add_to_temp_variable = { target_split_var = 1 } } divide_temp_variable = { building_damage_by_missile = target_split_var } set_temp_variable = { max_clamp = num_mil_ind } add_to_temp_variable = { max_clamp = num_dockyard } add_to_temp_variable = { max_clamp = num_industrial_complex } add_to_temp_variable = { max_clamp = num_offices } add_to_temp_variable = { max_clamp = num_agriculture_district } clamp_temp_variable = { var = building_damage_by_missile min = 0 max = max_clamp } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { production_strike_success_damage = yes } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_success_losses = yes } } critical_success = { victim_effects = { send_raid_event_to_victim = yes var:target_state = { set_temp_variable = { ROOT.num_mil_ind = THIS.building_level@arms_factory } set_temp_variable = { ROOT.num_dockyard = THIS.building_level@dockyard } set_temp_variable = { ROOT.num_industrial_complex = THIS.building_level@industrial_complex } set_temp_variable = { ROOT.num_offices = THIS.building_level@offices } set_temp_variable = { ROOT.num_agriculture_district = THIS.building_level@agriculture_district } } calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_critical = yes set_temp_variable = { target_split_var = 0 } if = { limit = { check_variable = { num_mil_ind > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_dockyard > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_industrial_complex > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_offices > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_agriculture_district > 0 } } add_to_temp_variable = { target_split_var = 1 } } divide_temp_variable = { building_damage_by_missile = target_split_var } set_temp_variable = { max_clamp = num_mil_ind } add_to_temp_variable = { max_clamp = num_dockyard } add_to_temp_variable = { max_clamp = num_industrial_complex } add_to_temp_variable = { max_clamp = num_offices } add_to_temp_variable = { max_clamp = num_agriculture_district } clamp_temp_variable = { var = building_damage_by_missile min = 0 max = max_clamp } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { production_strike_success_damage = yes } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_critical_success_losses = yes } } } ai_will_do = { base = 0 modifier = { add = 5 has_opinion = { target = FROM value < -75 } } modifier = { add = 5 has_opinion = { target = FROM value < -100 } } modifier = { add = 5 has_opinion = { target = FROM value < -50 } } modifier = { add = -10 has_government = FROM } modifier = { factor = 2 OR = { has_idea = super_power has_idea = large_power has_idea = great_power } } modifier = { factor = 2 strength_ratio = { tag = FROM ratio > 1.5 } NOT = { has_war_with = FROM } } modifier = { factor = 0 threat < 0.10 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0 strength_ratio = { tag = FROM ratio < 0.75 } NOT = { has_war_with = FROM } } modifier = { # Don't target anyone who is not a potential enemy factor = 0 NOT = { has_country_flag = promised_retaliation_against@FROM } NOT = { is_in_array = { array = potential_and_current_enemies value = FROM # Target country } } } modifier = { factor = 0 has_war = yes raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0 tag = USA FROM = { tag = IRQ } date < 2004.1.1 NOT = { has_country_flag = promised_retaliation_against@FROM } } modifier = { factor = 0.05 OR = { has_government = democratic has_government = neutrality has_elections = yes } FROM = { has_added_tension_amount < 5 } } modifier = { factor = 0 date < 2001.1.1 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { NOT = { has_country_flag = promised_retaliation_against@FROM } factor = 0 FROM = { OR = { has_idea = NATO_member has_idea = CSTO_member has_idea = EU_member has_idea = faction_resistance_axis_member } } } # Alliance gate — back off when target is in a faction and our alliance ratio is weak (<0.7) modifier = { factor = 0 raid_alliance_unfavorable = yes } # Doctrinal reach gate — isolation/local_security/limited interventionism can't reach. # Bypassed by the rule_raid_doctrine_reach game rule. modifier = { factor = 0 raid_intervention_doctrine_reach_block = yes } # Major-power target dampener — AI minors are 4× less likely to raid super/great powers while at peace. modifier = { factor = 0.25 raid_skip_target_non_hostile_no_retaliation = yes FROM = { OR = { has_idea = super_power has_idea = great_power } } NOT = { OR = { has_idea = super_power has_idea = great_power } } } modifier = { has_country_flag = promised_retaliation_against@FROM factor = 100 } modifier = { has_country_flag = conceded_to@FROM factor = 0 } modifier = { factor = 0 is_ally_with = FROM raid_skip_target_non_hostile_no_retaliation = yes } modifier = { # Don't raid nations we have influence in factor = 0 raid_skip_target_non_hostile_no_retaliation = yes FROM = { is_influencer = yes } } modifier = { # Don't raid if heavily in debt factor = 0 raid_skip_target_non_hostile_no_retaliation = yes check_variable = { debt_ratio > 0.25 } } modifier = { # Less likely to raid if somewhat in debt factor = 0.25 NOT = { has_war_with = FROM } check_variable = { debt_ratio > 0.15 } } modifier = { factor = 0 OR = { FROM = { is_subject_of = ROOT } is_subject_of = FROM } } } } #Strikes against both network and transportation infrastructure infrastructure_strike = { days_to_prepare = 30 days_re_enable = 356 category = infastructure_strikes command_power = 20 # command power allocation cost arrow = { type = air } # Specific Target is visible show_target = { raid_show_target_opinion_hostile = yes } # Can prepare available = { FROM = { NOT = { is_subject_of = ROOT } NOT = { has_non_aggression_pact_with = ROOT } } OR = { has_war_with = FROM has_opinion = { target = FROM value < -50 } hidden_trigger = { has_country_flag = promised_retaliation_against@FROM } } } launchable = { set_temp_variable = { cost = 99 } raid_can_launch = yes } unit_requirements = { equipment = { type = { tactical_bomber cas strategic_bomber guided_missile_equipment ballistic_missile_equipment hypersonic_missile_equipment } amount = { min = 10 } } } launch_sound = raid_launch_marine target_icon = GFX_other_target_icon target_type = { state = { infrastructure > 0 internet_station > 0 rail_way > 0 } } starting_point = { types = { rocket_site submarine carrier air_base } } success_factors = { success = { base = 0.20 air_agility = { reference = 200 weight = 0.5 start_weight = -0.5 } reliability = { reference = 1 weight = 0.3 start_weight = -0.1 } air_defence = { reference = 150 weight = 0.2 start_weight = -0.2 } air_superiority = { reference = 1 weight = 0.1 start_weight = -0.100 } ### Target Modifiers anti_air = { reference = 5 weight = -0.25 } radar = { reference = 1 weight = -0.15 } interception = { reference = 120 # 5 wings as 500 planes in vanilla weight = -0.2 } intel = { weight = 0.5 start_weight = -0.1 start_reference = 10 reference = 100 } } critical = { base = 0.10 } disaster = { base = 0.25 } } success_levels = { failure = { actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_failure_losses = yes } victim_effects = { send_raid_event_to_victim = yes } } limited_success = { victim_effects = { send_raid_event_to_victim = yes var:target_state = { set_temp_variable = { ROOT.num_infrastructure = THIS.building_level@infrastructure } set_temp_variable = { ROOT.num_internet_station = THIS.building_level@internet_station } set_temp_variable = { ROOT.num_rail_way = THIS.building_level@rail_way } } calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_limited = yes set_temp_variable = { target_split_var = 0 } if = { limit = { check_variable = { num_infrastructure > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_internet_station > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_rail_way > 0 } } add_to_temp_variable = { target_split_var = 1 } } divide_temp_variable = { building_damage_by_missile = target_split_var } set_temp_variable = { max_clamp = num_infrastructure } add_to_temp_variable = { max_clamp = num_internet_station } add_to_temp_variable = { max_clamp = num_rail_way } clamp_temp_variable = { var = building_damage_by_missile min = 0 max = max_clamp } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { if = { limit = { infrastructure > 0 } meta_effect = { text = { damage_building = { type = infrastructure damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } if = { limit = { internet_station > 0 } meta_effect = { text = { damage_building = { type = internet_station damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } if = { limit = { rail_way > 0 } meta_effect = { text = { damage_building = { type = rail_way damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_limited_success_losses = yes } } success = { victim_effects = { send_raid_event_to_victim = yes var:target_state = { set_temp_variable = { ROOT.num_infrastructure = THIS.building_level@infrastructure } set_temp_variable = { ROOT.num_internet_station = THIS.building_level@internet_station } set_temp_variable = { ROOT.num_rail_way = THIS.building_level@rail_way } } calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_success = yes set_temp_variable = { target_split_var = 0 } if = { limit = { check_variable = { num_infrastructure > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_internet_station > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_rail_way > 0 } } add_to_temp_variable = { target_split_var = 1 } } divide_temp_variable = { building_damage_by_missile = target_split_var } set_temp_variable = { max_clamp = num_infrastructure } add_to_temp_variable = { max_clamp = num_internet_station } add_to_temp_variable = { max_clamp = num_rail_way } clamp_temp_variable = { var = building_damage_by_missile min = 0 max = max_clamp } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { if = { limit = { infrastructure > 0 } meta_effect = { text = { damage_building = { type = infrastructure damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } if = { limit = { internet_station > 0 } meta_effect = { text = { damage_building = { type = internet_station damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } if = { limit = { rail_way > 0 } meta_effect = { text = { damage_building = { type = rail_way damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_success_losses = yes } } critical_success = { victim_effects = { send_raid_event_to_victim = yes var:target_state = { set_temp_variable = { ROOT.num_infrastructure = THIS.building_level@infrastructure } set_temp_variable = { ROOT.num_internet_station = THIS.building_level@internet_station } set_temp_variable = { ROOT.num_rail_way = THIS.building_level@rail_way } } calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_critical = yes set_temp_variable = { target_split_var = 0 } if = { limit = { check_variable = { num_infrastructure > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_internet_station > 0 } } add_to_temp_variable = { target_split_var = 1 } } if = { limit = { check_variable = { num_rail_way > 0 } } add_to_temp_variable = { target_split_var = 1 } } divide_temp_variable = { building_damage_by_missile = target_split_var } set_temp_variable = { max_clamp = num_infrastructure } add_to_temp_variable = { max_clamp = num_internet_station } add_to_temp_variable = { max_clamp = num_rail_way } clamp_temp_variable = { var = building_damage_by_missile min = 0 max = max_clamp } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { if = { limit = { infrastructure > 0 } meta_effect = { text = { damage_building = { type = infrastructure damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } if = { limit = { internet_station > 0 } meta_effect = { text = { damage_building = { type = internet_station damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } if = { limit = { rail_way > 0 } meta_effect = { text = { damage_building = { type = rail_way damage = [DAM] } } DAM = "[?building_damage_by_missile]" } } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_critical_success_losses = yes } } } ai_will_do = { base = 0 modifier = { add = 5 has_opinion = { target = FROM value < -75 } } modifier = { add = 5 has_opinion = { target = FROM value < -100 } } modifier = { add = 5 has_opinion = { target = FROM value < -50 } } modifier = { add = -10 has_government = FROM } modifier = { factor = 2 OR = { has_idea = super_power has_idea = large_power has_idea = great_power } } modifier = { factor = 2 strength_ratio = { tag = FROM ratio > 1.5 } NOT = { has_war_with = FROM } } modifier = { factor = 0 threat < 0.10 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0.05 OR = { has_government = democratic has_government = neutrality has_elections = yes } FROM = { has_added_tension_amount < 5 } } # Alliance gate — back off when target is in a faction and our alliance ratio is weak (<0.7) modifier = { factor = 0 raid_alliance_unfavorable = yes } # Doctrinal reach gate — isolation/local_security/limited interventionism can't reach. # Bypassed by the rule_raid_doctrine_reach game rule. modifier = { factor = 0 raid_intervention_doctrine_reach_block = yes } # Major-power target dampener — AI minors are 4× less likely to raid super/great powers while at peace. modifier = { factor = 0.25 raid_skip_target_non_hostile_no_retaliation = yes FROM = { OR = { has_idea = super_power has_idea = great_power } } NOT = { OR = { has_idea = super_power has_idea = great_power } } } modifier = { factor = 100 has_country_flag = promised_retaliation_against@FROM } modifier = { factor = 0 strength_ratio = { tag = FROM ratio < 0.75 } NOT = { has_war_with = FROM } } modifier = { # Don't target anyone who is not a potential enemy factor = 0 NOT = { has_country_flag = promised_retaliation_against@FROM } NOT = { is_in_array = { array = potential_and_current_enemies value = FROM # Target country } } } modifier = { factor = 0 has_war = yes raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0 tag = USA FROM = { tag = IRQ } date < 2004.1.1 NOT = { has_country_flag = promised_retaliation_against@FROM } } modifier = { factor = 0 date < 2001.1.1 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0 NOT = { has_country_flag = promised_retaliation_against@FROM } FROM = { has_idea = NATO_member } } modifier = { has_country_flag = conceded_to@FROM factor = 0 } modifier = { factor = 0 is_ally_with = FROM raid_skip_target_non_hostile_no_retaliation = yes } modifier = { # Don't raid nations we have influence in factor = 0 raid_skip_target_non_hostile_no_retaliation = yes FROM = { is_influencer = yes } } modifier = { # Don't raid if heavily in debt factor = 0 raid_skip_target_non_hostile_no_retaliation = yes check_variable = { debt_ratio > 0.25 } } modifier = { # Less likely to raid if somewhat in debt factor = 0.25 NOT = { has_war_with = FROM } check_variable = { debt_ratio > 0.15 } } modifier = { factor = 0 OR = { FROM = { is_subject_of = ROOT } is_subject_of = FROM } } } } # Adjust facility strike to have less prep time facility_strike = { days_to_prepare = 30 days_re_enable = 365 category = infastructure_strikes command_power = 20 # Specific Target is visible show_target = { NOT = { is_in_faction_with = FROM } raid_show_target_opinion_hostile = yes FROM = { MD_special_countries = no } } # Can prepare available = { raid_available_grey_zone = yes } launchable = { set_temp_variable = { cost = 99 } raid_can_launch = yes } target_type = { building = { tags = facility } } target_icon = GFX_facility_icon launch_sound = raid_launch_air arrow = { type = air } unit_requirements = { equipment = { type = { tactical_bomber cas strategic_bomber guided_missile_equipment ballistic_missile_equipment hypersonic_missile_equipment } amount = { min = 10 } } } starting_point = { types = { carrier air_base rocket_site submarine } } success_factors = { success = { base = 0.20 # Raiding unit modifiers experience = { weight = 0.3 start_weight = -0.2 reference = 1000 } air_agility = { reference = 200 weight = 0.5 start_weight = -0.5 } reliability = { reference = 1 weight = 0.2 start_weight = -0.1 } air_defence = { reference = 150 weight = 0.2 start_weight = -0.2 } air_superiority = { reference = 1 weight = 0.1 start_weight = -0.100 } ### Target Modifiers anti_air = { reference = 5 weight = -0.25 } radar = { reference = 1 weight = -0.15 } interception = { reference = 120 # 5 wings as 500 planes in vanilla weight = -0.2 } intel = { weight = 0.5 start_weight = -0.1 start_reference = 10 reference = 100 } } disaster = { base = 0.25 } critical = { base = 0.05 } } success_levels = { failure = { actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_failure_losses = yes } victim_effects = { send_raid_event_to_victim = yes } } limited_success = { victim_effects = { send_raid_event_to_victim = yes calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_limited = yes clamp_temp_variable = { var = building_damage_by_missile max = 1 } var:target_state = { meta_effect = { text = { damage_building = { tags = facility damage = [DAM] province = var:ROOT.target_province repair_speed_modifier = -0.05 } } DAM = "[?building_damage_by_missile]" } raid_reduce_project_progress_ratio = 0.05 } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_limited_success_losses = yes } } success = { victim_effects = { send_raid_event_to_victim = yes calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_success = yes clamp_temp_variable = { var = building_damage_by_missile max = 1 } multiply_temp_variable = { building_damage_by_missile = 0.5 } var:target_state = { meta_effect = { text = { damage_building = { tags = facility damage = [DAM] province = var:ROOT.target_province repair_speed_modifier = -0.25 } } DAM = "[?building_damage_by_missile]" } raid_reduce_project_progress_ratio = 0.15 } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_success_losses = yes } } critical_success = { victim_effects = { send_raid_event_to_victim = yes calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_critical = yes clamp_temp_variable = { var = building_damage_by_missile max = 1 } var:target_state = { meta_effect = { text = { damage_building = { tags = facility damage = [DAM] province = var:ROOT.target_province repair_speed_modifier = -0.5 } } DAM = "[?building_damage_by_missile]" } raid_reduce_project_progress_ratio = 0.25 } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_critical_success_losses = yes } } } ai_will_do = { base = 0 modifier = { add = 5 has_opinion = { target = FROM value < -75 } } modifier = { add = 5 has_opinion = { target = FROM value < -100 } } modifier = { add = 5 has_opinion = { target = FROM value < -50 } } modifier = { add = -10 has_government = FROM } modifier = { factor = 2 OR = { has_idea = super_power has_idea = large_power has_idea = great_power } } modifier = { factor = 2 strength_ratio = { tag = FROM ratio > 1.5 } NOT = { has_war_with = FROM } } modifier = { factor = 0 threat < 0.10 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0.05 OR = { has_government = democratic has_government = neutrality has_elections = yes } FROM = { has_added_tension_amount < 5 } } modifier = { factor = 0 strength_ratio = { tag = FROM ratio < 0.75 } NOT = { has_war_with = FROM } } modifier = { # Don't target anyone who is not a potential enemy factor = 0 NOT = { has_country_flag = promised_retaliation_against@FROM } NOT = { is_in_array = { array = potential_and_current_enemies value = FROM # Target country } } } modifier = { factor = 0 has_war = yes raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0 tag = USA FROM = { tag = IRQ } date < 2004.1.1 NOT = { has_country_flag = promised_retaliation_against@FROM } } modifier = { factor = 0 date < 2001.1.1 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { NOT = { has_country_flag = promised_retaliation_against@FROM } factor = 0 FROM = { OR = { has_idea = NATO_member has_idea = CSTO_member has_idea = EU_member has_idea = faction_resistance_axis_member } } } # Alliance gate — back off when target is in a faction and our alliance ratio is weak (<0.7) modifier = { factor = 0 raid_alliance_unfavorable = yes } # Doctrinal reach gate — isolation/local_security/limited interventionism can't reach. # Bypassed by the rule_raid_doctrine_reach game rule. modifier = { factor = 0 raid_intervention_doctrine_reach_block = yes } # Major-power target dampener — AI minors are 4× less likely to raid super/great powers while at peace. modifier = { factor = 0.25 raid_skip_target_non_hostile_no_retaliation = yes FROM = { OR = { has_idea = super_power has_idea = great_power } } NOT = { OR = { has_idea = super_power has_idea = great_power } } } modifier = { factor = 100 has_country_flag = promised_retaliation_against@FROM } modifier = { has_country_flag = conceded_to@FROM factor = 0 } modifier = { factor = 0 is_ally_with = FROM raid_skip_target_non_hostile_no_retaliation = yes } modifier = { # Don't raid nations we have influence in factor = 0 raid_skip_target_non_hostile_no_retaliation = yes FROM = { is_influencer = yes } } modifier = { # Don't raid if heavily in debt factor = 0 raid_skip_target_non_hostile_no_retaliation = yes check_variable = { debt_ratio > 0.25 } } modifier = { # Less likely to raid if somewhat in debt factor = 0.25 NOT = { has_war_with = FROM } check_variable = { debt_ratio > 0.15 } } modifier = { factor = 0 OR = { FROM = { is_subject_of = ROOT } is_subject_of = FROM } } } } PER_raid_hezbollah = { allowed = { original_tag = PER } days_to_prepare = 30 days_re_enable = 180 category = infastructure_strikes command_power = 20 # Raid Type is visible visible = { original_tag = PER has_country_flag = PER_strike_hez_1_year } # Specific Target is visible show_target = { FROM = { original_tag = HEZ } } # Can prepare available = { FROM = { original_tag = HEZ NOT = { is_subject_of = ROOT } NOT = { has_non_aggression_pact_with = ROOT } } set_temp_variable = { cost = 99 } raid_can_launch = yes } launchable = { set_temp_variable = { cost = 99 } raid_can_launch = yes } target_type = { state = { infrastructure > 0 } } arrow = { type = air } launch_sound = raid_launch_air target_icon = GFX_other_target_icon unit_requirements = { equipment = { type = { tactical_bomber cas strategic_bomber } amount = { min = 10 } } } unit_requirements = { equipment = { type = { guided_missile_equipment } amount = { min = 50 } } } starting_point = { types = { carrier air_base rocket_site submarine } } success_factors = { success = { base = 0.20 # Raiding unit modifiers experience = { weight = 0.1 start_weight = -0.1 reference = 10 } air_agility = { reference = 20 weight = 0.1 start_weight = -0.5 } reliability = { reference = 1 weight = 0.1 start_weight = -0.1 } air_defence = { reference = 100 weight = 0.2 start_weight = -0.2 } air_superiority = { reference = 1 weight = 0.3 start_weight = -0.100 } ### Target Modifiers anti_air = { reference = 1 weight = -0.25 } radar = { reference = 0 weight = -0.15 } interception = { reference = 120 # was 5?? weight = -0.2 } intel = { weight = 0.1 reference = 100 } } disaster = { base = 0.05 } critical = { base = 0.01 } } success_levels = { failure = { actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_failure_losses = yes } victim_effects = { if = { limit = { NOT = { var:actor_country = { has_war_with = var:ROOT.victim_country } } } hidden_effect = { var:actor_country = { set_variable = { THIS.target_country = var:ROOT.victim_country } set_variable = { THIS.actor_country = var:ROOT.hostile_country } country_event = iranian_focus.74 } } } } } limited_success = { victim_effects = { if = { limit = { NOT = { var:actor_country = { has_war_with = var:ROOT.victim_country } } } hidden_effect = { var:actor_country = { set_variable = { THIS.target_country = var:ROOT.victim_country } set_variable = { THIS.actor_country = var:ROOT.hostile_country } country_event = iranian_focus.74 } } } var:target_state = { set_temp_variable = { ROOT.num_fuel_silos = THIS.building_level@fuel_silo } } calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_limited = yes clamp_temp_variable = { var = building_damage_by_missile max = num_fuel_silos } #if the state has oil wells to target as well, reduce the number of missiles going after buildings #Otherwise, the missiles will just bum rush the storage and kill that instead var:target_state = { if = { limit = { oil > 18 } set_temp_variable = { oil_reducer = THIS.resource@oil } multiply_temp_variable = { oil_reducer = 0.75 } divide_temp_variable = { ROOT.building_damage_by_missile = oil_reducer } add_dynamic_modifier = { modifier = oil_minor_refining_modifier days = 150 } } } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { if = { limit = { fuel_silo > 0 } meta_effect = { text = { damage_building = { type = fuel_silo damage = [DAM] # levels of damage } } DAM = "[?building_damage_by_missile]" } } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_limited_success_losses = yes } } success = { victim_effects = { if = { limit = { NOT = { var:actor_country = { has_war_with = var:ROOT.victim_country } } } hidden_effect = { var:actor_country = { set_variable = { THIS.target_country = var:ROOT.victim_country } set_variable = { THIS.actor_country = var:ROOT.hostile_country } country_event = iranian_focus.74 } } } var:target_state = { set_temp_variable = { ROOT.num_fuel_silos = THIS.building_level@fuel_silo } } calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_success = yes clamp_temp_variable = { var = building_damage_by_missile max = num_fuel_silos } #if the state has oil wells to target as well, reduce the number of missiles going after buildings #Otherwise, the missiles will just bum rush the storage and kill that instead var:target_state = { if = { limit = { oil > 18 } set_temp_variable = { oil_reducer = THIS.resource@oil } multiply_temp_variable = { oil_reducer = 0.75 } divide_temp_variable = { ROOT.building_damage_by_missile = oil_reducer } add_dynamic_modifier = { modifier = oil_refining_modifier days = 200 } } } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { if = { limit = { fuel_silo > 0 } meta_effect = { text = { damage_building = { type = fuel_silo damage = [DAM] # levels of damage } } DAM = "[?building_damage_by_missile]" } } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_success_losses = yes } } critical_success = { victim_effects = { if = { limit = { NOT = { var:actor_country = { has_war_with = var:ROOT.victim_country } } } hidden_effect = { var:actor_country = { set_variable = { THIS.target_country = var:ROOT.victim_country } set_variable = { THIS.actor_country = var:ROOT.hostile_country } country_event = iranian_focus.74 } } } var:target_state = { set_temp_variable = { ROOT.num_fuel_silos = THIS.building_level@fuel_silo } } calculate_aa_defense_value = yes set_temp_variable = { building_damage_by_missile = 1.25 } set_temp_variable = { raid_damage_mult = 10 } apply_raid_building_damage_critical = yes clamp_temp_variable = { var = building_damage_by_missile max = num_fuel_silos } #if the state has oil wells to target as well, reduce the number of missiles going after buildings #Otherwise, the missiles will just bum rush the storage and kill that instead var:target_state = { if = { limit = { oil > 18 } set_temp_variable = { oil_reducer = THIS.resource@oil } multiply_temp_variable = { oil_reducer = 0.75 } divide_temp_variable = { ROOT.building_damage_by_missile = oil_reducer } add_dynamic_modifier = { modifier = oil_critical_refining_modifier days = 260 } } } if = { limit = { check_variable = { building_damage_by_missile < 1 } } set_temp_variable = { building_damage_by_missile = 1.25 } } var:target_state = { if = { limit = { fuel_silo > 0 } meta_effect = { text = { damage_building = { type = fuel_silo damage = [DAM] # levels of damage } } DAM = "[?building_damage_by_missile]" } } } } actor_effects = { set_temp_variable = { raid_pp_loss = -100 } apply_raid_critical_success_losses = yes } } } ai_will_do = { base = 20 modifier = { factor = 0 threat < 0.10 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0 date < 2001.1.1 raid_skip_target_non_hostile_no_retaliation = yes } modifier = { # Don't raid nations we have influence in factor = 0 raid_skip_target_non_hostile_no_retaliation = yes FROM = { is_influencer = yes } } modifier = { # Don't raid if heavily in debt factor = 0 raid_skip_target_non_hostile_no_retaliation = yes check_variable = { debt_ratio > 0.25 } } modifier = { # Less likely to raid if somewhat in debt factor = 0.25 NOT = { has_war_with = FROM } check_variable = { debt_ratio > 0.15 } } modifier = { factor = 0 is_ally_with = FROM raid_skip_target_non_hostile_no_retaliation = yes } modifier = { factor = 0 OR = { FROM = { is_subject_of = ROOT } is_subject_of = FROM } } } } EH_raid_portal = { days_to_prepare = 30 days_re_enable = 30 category = EH_portal_raids command_power = 20 # Specific Target is visible show_target = { FROM = { original_tag = ALN } } # Can prepare available = { has_country_flag = EH_tesla_weapon_in_stockpile has_war_with = FROM } launchable = { has_country_flag = EH_tesla_weapon_in_stockpile has_war_with = FROM } target_type = { state = { FROM = { has_state_flag = EH_state_with_portal } } } arrow = { type = air } launch_sound = raid_launch_air target_icon = GFX_other_target_icon unit_requirements = { equipment = { type = { tactical_bomber cas strategic_bomber } amount = { min = 10 } } } unit_requirements = { equipment = { type = { guided_missile_equipment } amount = { min = 50 } } } starting_point = { types = { carrier air_base rocket_site submarine } } success_factors = { success = { base = 0.50 # Raiding unit modifiers experience = { weight = 0.1 start_weight = -0.1 reference = 10 } air_agility = { reference = 20 weight = 0.1 start_weight = -0.5 } reliability = { reference = 1 weight = 0.1 start_weight = -0.1 } air_defence = { reference = 100 weight = 0.2 start_weight = -0.2 } air_superiority = { reference = 1 weight = 0.3 start_weight = -0.100 } ### Target Modifiers anti_air = { reference = 1 weight = -0.25 } radar = { reference = 0 weight = -0.15 } interception = { reference = 120 # was 5?? weight = -0.2 } intel = { weight = 0.1 reference = 100 } } disaster = { base = 0.05 } critical = { base = 0.01 } } success_levels = { failure = { actor_effects = { #Random plane loss starting value. The max value will vary based on the success level set_temp_variable = { raid_planes_lost = 0 } set_temp_variable_to_random = { var = raid_planes_lost max = 8 } # Chimera doesn't know how to use AA systems, ignored multiply_temp_variable = { raid_planes_lost = 1.5 } #clamp after round, just in case some black magic made this negative clamp_temp_variable = { var = raid_planes_lost min = 0 } round_temp_variable = raid_planes_lost hidden_effect = { raid_damage_units = { plane_loss = raid_planes_lost ratio = no } } custom_effect_tooltip = { localization_key = plane_raid_losses_tt LOSSES = [?raid_planes_lost] } var:actor_country = { add_command_power = -50 } } victim_effects = { # Nothing } } limited_success = { victim_effects = { EH_chimera_portal_destroyed_effect = yes } actor_effects = { #Random plane loss starting value. The max value will vary based on the success level set_temp_variable = { raid_planes_lost = 0 } set_temp_variable_to_random = { var = raid_planes_lost max = 5 } multiply_temp_variable = { raid_planes_lost = 1.25 } #clamp after round, just in case some black magic made this negative clamp_temp_variable = { var = raid_planes_lost min = 0 } round_temp_variable = raid_planes_lost hidden_effect = { raid_damage_units = { plane_loss = raid_planes_lost ratio = no } } custom_effect_tooltip = { localization_key = plane_raid_losses_tt LOSSES = [?raid_planes_lost] } var:actor_country = { news_event = EH_event.1000 EH_reset_tesla_weapon = yes } } } success = { victim_effects = { EH_chimera_portal_destroyed_effect = yes } actor_effects = { #Random plane loss starting value. The max value will vary based on the success level set_temp_variable = { raid_planes_lost = 0 } set_temp_variable_to_random = { var = raid_planes_lost max = 5 } multiply_temp_variable = { raid_planes_lost = 1.25 } #clamp after round, just in case some black magic made this negative clamp_temp_variable = { var = raid_planes_lost min = 0 } round_temp_variable = raid_planes_lost hidden_effect = { raid_damage_units = { plane_loss = raid_planes_lost ratio = no } } custom_effect_tooltip = { localization_key = plane_raid_losses_tt LOSSES = [?raid_planes_lost] } var:actor_country = { news_event = EH_event.1000 EH_reset_tesla_weapon = yes } } } critical_success = { victim_effects = { EH_chimera_portal_destroyed_effect = yes } actor_effects = { #Random plane loss starting value. The max value will vary based on the success level set_temp_variable = { raid_planes_lost = 0 } set_temp_variable_to_random = { var = raid_planes_lost max = 5 } multiply_temp_variable = { raid_planes_lost = 1.25 } #clamp after round, just in case some black magic made this negative clamp_temp_variable = { var = raid_planes_lost min = 0 } round_temp_variable = raid_planes_lost hidden_effect = { raid_damage_units = { plane_loss = raid_planes_lost ratio = no } } custom_effect_tooltip = { localization_key = plane_raid_losses_tt LOSSES = [?raid_planes_lost] } var:actor_country = { news_event = EH_event.1000 EH_reset_tesla_weapon = yes } } } } ai_will_do = { base = 1000 } } }