﻿je_submarines = {
 	icon = "gfx/interface/icons/event_icons/event_military.dds"
	
	group = je_group_technology

 	is_shown_when_inactive = {
 		is_player = yes
 		has_technology_researched = self_propelled_torpedoes
        navy_size >= 10
 	}

 	possible = {
 		has_technology_researched = submarine
        navy_size >= 30
 	}
 	complete = {
        country_navy_unit_type_fraction = {  
            target = unit_type:combat_unit_type_submarine
            value >= 0.2  
        }
        any_military_formation = {
            filter = {
                is_fleet = yes
            }
            any_scope_character = {
                has_role = admiral
               commander_military_formation = {
                   formation_navy_unit_type_fraction = {  
                       target = unit_type:combat_unit_type_submarine
                       value >= 0.2  
                   }
               }
            }
			percent >= 0.25
        }
 	}

 	on_complete = {
 		trigger_event = { id = naval_tech_events.4 }
 	}

 	invalid = {
 	}

 	weight = 10000
 	can_deactivate = no
 }

 je_carriers = {
 	icon = "gfx/interface/icons/event_icons/event_military.dds"
	
	group = je_group_technology

 	is_shown_when_inactive = {
 		is_player = yes
        navy_size >= 10
 		has_technology_researched = dreadnought
 	}

 	possible = {
 		has_technology_researched = carrier_tech
        navy_size >= 30
 	}
 	complete = {
        country_navy_unit_type_fraction = {  
            target = unit_type:combat_unit_type_carrier
            value >= 0.2  
        }
        any_military_formation = {
            filter = {
                is_fleet = yes
            }
            any_scope_character = {
                has_role = admiral
                commander_military_formation = {
                   formation_navy_unit_type_fraction = {  
                       target = unit_type:combat_unit_type_carrier
                       value >= 0.2  
                   }
                }
            }
			percent >= 0.25
        }
 	}

 	on_complete = {
 		trigger_event = { id = naval_tech_events.5 }
 	}

 	invalid = {
 	}

 	weight = 10000
 	can_deactivate = no
 }
