#海军配比与舰船生产#
##### MTG strategies ####
###优先设计舰船###
#舰船升级#
ship_up = {
	enable = {
		always =yes
	}
        abort_when_not_enabled = yes
        ai_strategy = {
		type = navy_xp_spend_priority
		id = upgrade_xp_cutoff
		value = 9999
	}
}
###不玩的船###
useless_naval= {
        enable = {
		always =yes
	}
        abort_when_not_enabled = yes
   		ai_strategy = {
		type = role_ratio
		id = naval_capital_bb
		value = -99
	}
	
	ai_strategy = {
		type = role_ratio
		id = naval_capital_shbb
		value = -99
	}

	ai_strategy = {
		type = role_ratio
		id = naval_capital_bc
		value = -99
	}

	ai_strategy = {
		type = role_ratio
		id = naval_carrier
		value = -99
	}

	ai_strategy = {
		type = role_ratio
		id = naval_submarine
		value = -99
	}

	ai_strategy = {
		type = role_ratio
		id = naval_screen
		value = -99
	}

	ai_strategy = {
		type = role_ratio
		id = naval_escort
		value = -99
	}

	ai_strategy = {
		type = role_ratio
		id = naval_cruiser_light
		value = -99
	}

	ai_strategy = {
		type = role_ratio
		id = naval_cruiser_heavy
		value = -99
	}

	ai_strategy = {
		type = role_ratio
		id = naval_mine_sweeper
		value = -99
	}

	ai_strategy = {
		type = role_ratio
		id = naval_mine_layer
		value = -99
	}
}
### 小卡拉米 ###
naval_unit_role_ratios_minors = {
	allowed = {
		NOT = {
			tag = GER
			tag = FRA
			tag = ENG
			tag = JAP
			tag = USA			
			tag = RUS
                        tag = ITA
		}
	}
	enable = { num_of_naval_factories > 0 }

	abort_when_not_enabled = yes

	ai_strategy = {
		type = role_ratio
		id = screen
		value = 20
	}
        ai_strategy = {
		type = role_ratio
		id = cruiser_light
		value = 10
	}

	ai_strategy = {
		type = role_ratio
		id = submarine
		value = 20
	}
        ai_strategy = {
		type = equipment_production_min_factories
		id = convoy
		value = 1
	}
 }
### 不玩重炮 ###
### 大卡拉米 ###
#德意志#
naval_unit_role_ratios_GER = {
	allowed = {
		tag = GER
	}
	enable = {
		 any_enemy_country = {
                        naval_strength_ratio = {
			tag = ROOT
  			ratio < 2
  		        }
                }
	}
        abort_when_not_enabled = yes
	ai_strategy = {
		type = role_ratio
		id = submarine
		value = 100
	}
        ai_strategy = {
		type = role_ratio
		id = submarine_tiny
		value = 10
	} 
        ai_strategy = {
		type = role_ratio
		id = cruiser_light
		value = 20
	}
        ai_strategy = {
		type = role_ratio
		id = capital_bb
		value = 5
	}
        ai_strategy = {
		type = role_ratio
		id = screen
		value = 10
	}
        ai_strategy = {
		type = role_ratio
		id = carrier
		value = 1
	}
 }
wolf_wolf_wolf = {
	allowed = {
		tag = GER
	}
        enable = {
		 any_enemy_country = {
                        naval_strength_ratio = {
			tag = ROOT
  			ratio > 2
  		        }
                }
	}
        abort_when_not_enabled = yes
	ai_strategy = {
		type = role_ratio
		id = submarine
		value = 200
	}
        ai_strategy = {
		type = role_ratio
		id = submarine_tiny
		value = 20
	} 
        ai_strategy = {
		type = role_ratio
		id = screen
		value = 10
	}
         ai_strategy = {
		type = role_ratio
		id = cruiser_light
		value = 1
	}
         ai_strategy = {
		type = role_ratio
		id = capital_bb
		value = 1
	}
 }
#意大利#
naval_unit_role_ratios_ITA = {
	allowed = {
		tag = ITA
	}
	enable = {
		always = yes
	}
        abort = { always = no }
        ai_strategy = {
		type = role_ratio
		id = submarine_tiny
		value = 200
	} 
	ai_strategy = {
		type = role_ratio
		id = submarine
		value = 20
	}
        ai_strategy = {
		type = role_ratio
		id = cruiser_light
		value = 25
	}
        ai_strategy = {
		type = role_ratio
		id = capital_bb
		value = 10
	}
        ai_strategy = {
		type = role_ratio
		id = screen
		value = 25
	}
        ai_strategy = {
		type = role_ratio
		id = carrier
		value = 2
	}
 }

### ENG ###
#大不列颠#
naval_unit_role_ratios_ENG = {
	allowed = {
		tag = ENG
	}
	enable = {
		always = yes
	}
        abort = { always = no }
         ai_strategy = {
		type = role_ratio
		id = submarine_tiny
		value = 10
	} 
	ai_strategy = {
		type = role_ratio
		id = cruiser_light
		value = 50
	}
        ai_strategy = {
		type = role_ratio
		id = submarine
		value = 20
	}
	ai_strategy = {
		type = role_ratio
		id = screen
		value = 100
	}
        ai_strategy = {
		type = role_ratio
		id = carrier
		value = 20
	}
     	ai_strategy = {
		type = role_ratio
		id = capital_bb
		value = 20
	}
}

#法兰西#

naval_unit_role_ratios_FRA = {
	allowed = {
		tag = FRA
	}
	enable = {
		always = yes
	}
        abort = { always = no }
        ai_strategy = {
		type = role_ratio
		id = cruiser_light
		value = 80
	}
        ai_strategy = {
		type = role_ratio
		id = capital_bb
		value = 30
	}
	ai_strategy = {
		type = role_ratio
		id = submarine
		value = 30
	}
	ai_strategy = {
		type = role_ratio
		id = screen
		value = 90
	}
         ai_strategy = {
		type = role_ratio
		id = carrier
		value = 5
	}
 }

#苏维埃联盟/俄罗斯#

naval_unit_role_ratios_RUS = {
	allowed = {
		
		OR = {
			
			tag = RUS
		}
	}
	enable = {
		always = yes
	}
        abort = { always = no }
        ai_strategy = {
		type = role_ratio
		id = screen
		value = 50
	}
	ai_strategy = {
		type = role_ratio
		id = submarine
		value = 100
	}
        ai_strategy = {
		type = role_ratio
		id = cruiser_light
		value = 5
	}
        ai_strategy = {
		type = role_ratio
		id = capital_bb
		value = 1
	}
        ai_strategy = {
		type = role_ratio
		id = carrier
		value = 1
	}
}

#大日本帝国（如大）#

naval_unit_role_ratios_JAP = {
	allowed = {
		tag = JAP
	}
	enable = {
		always = yes
	}
        abort = { always = no }
        ai_strategy = {
		type = role_ratio
		id = submarine_tiny
		value = 2
	} 
	ai_strategy = {
		type = role_ratio
		id = submarine
		value = 10
	}

	ai_strategy = {
		type = role_ratio
		id = screen
		value = 60
	}
	ai_strategy = {
		type = role_ratio
		id = cruiser_light
		value = 100
	}
        ai_strategy = {
		type = role_ratio
		id = capital_bb
		value = 25
	}
        ai_strategy = {
		type = role_ratio
		id = carrier
		value = 1
	}
 }

#美利坚合众国#

USA_naval_role = {
	allowed = {
		tag = USA
	}
	enable = {
		always = yes
	}
	abort_when_not_enabled = yes

	ai_strategy = {
		type = role_ratio
		id = submarine
		value = 50
	}

	ai_strategy = {
		type = role_ratio
		id = screen
		value = 90
	}

	ai_strategy = {
		type = role_ratio
		id = cruiser_light
		value = 60
	}

	ai_strategy = {
		type = role_ratio
		id = capital_bb
		value = 30
	} 
        ai_strategy = {
		type = role_ratio
		id = carrier
		value = 10
	}
}

### 运输船生产 ###
we_need_convoys_base = {
	enable = { is_major = yes }
	abort = {  is_major = no }

	ai_strategy = {
		type = equipment_production_min_factories
		id = convoy
		value = 1
	}
}

we_need_convoys_minors = {
	allowed = {
		NOT = {
			OR = {
			tag = GER
			tag = FRA
			tag = ENG
			tag = JAP
			tag = USA
			tag = RUS
                        tag = ITA
		        }
		}
	}
	enable = { stockpile_ratio = { archetype = convoy ratio < 75 } }
	abort = { stockpile_ratio = { archetype = convoy ratio > 100 } }

	ai_strategy = {
		type = equipment_production_min_factories
		id = convoy
		value = 1
	}
}

we_need_convoys_majors1 = {
	allowed = {
		OR = {
			tag = GER
			tag = FRA
			tag = ENG
			tag = JAP
			tag = USA
			tag = RUS
                        tag = ITA
		}
	}
	enable = { stockpile_ratio = { archetype = convoy ratio < 300 } }
	abort = { stockpile_ratio = { archetype = convoy ratio > 500 } }

	ai_strategy = {
		type = equipment_production_min_factories
		id = convoy
		value = 8
	}
}

we_need_convoys_majors2 = {
	allowed = {
		OR = {
			tag = GER
			tag = FRA
			tag = ENG
			tag = JAP
			tag = USA
			tag = RUS
                        tag = ITA
		}
	}
	enable = { stockpile_ratio = { archetype = convoy ratio < 500 } }
	abort = { stockpile_ratio = { archetype = convoy ratio > 700 } }

	ai_strategy = {
		type = equipment_production_min_factories
		id = convoy
		value = 5
	}
}

we_need_convoys_majors3 = {
	allowed = {
		OR = {
			tag = GER
			tag = FRA
			tag = ENG
			tag = JAP
			tag = USA
			tag = RUS
                        tag = ITA
		}
	}
	enable = { stockpile_ratio = { archetype = convoy ratio < 700 } }
	abort = { stockpile_ratio = { archetype = convoy ratio > 1000 } }

	ai_strategy = {
		type = equipment_production_min_factories
		id = convoy
		value = 3
	}
}
we_need_convoys_majorsMAX = {
	allowed = {
		OR = {
			tag = GER
			tag = FRA
			tag = ENG
			tag = JAP
			tag = USA
			tag = RUS
                        tag = ITA
		}
	}
	enable = { stockpile_ratio = { archetype = convoy ratio < 1000 } }
	abort = { stockpile_ratio = { archetype = convoy ratio > 1500 } }

	ai_strategy = {
		type = equipment_production_min_factories
		id = convoy
		value = 1
	}
}

we_need_trade = {
	allowed = {
		OR = {
			tag = GER
			tag = FRA
			tag = ENG
			tag = JAP
			tag = USA
			tag = RUS
                        tag = ITA
		}
	}
	enable = { has_idea = free_trade }
        abort_when_not_enabled = yes
	ai_strategy = {
		type = equipment_production_min_factories
		id = convoy
		value = 2
	}
}
we_dont_need_convoys_1 = {
	allowed = {
		NOT = {
			OR = {
			tag = GER
			tag = FRA
			tag = ENG
			tag = JAP
			tag = USA
			tag = RUS
                        tag = ITA
		        }
		}
	}
	enable = { stockpile_ratio = { archetype = convoy ratio > 200 } }
	abort_when_not_enabled = yes

	ai_strategy = {
		type = equipment_variant_production_factor
		id = convoy
		value = -80
	}
}

we_dont_need_convoys_2 = {
	allowed = {
		OR = {
			tag = GER
			tag = FRA
			tag = ENG
			tag = JAP
			tag = USA
			tag = RUS
                        tag = ITA
		}
	}
	enable = { stockpile_ratio = { archetype = convoy ratio > 1500 } }
	abort_when_not_enabled = yes

	ai_strategy = {
		type = equipment_variant_production_factor
		id = convoy
		value = -100
	}
        ai_strategy = {
		type = equipment_production_surplus_management
		id = convoy
		value = -100
	}
}
