1package com.fs.starfarer.api.impl.hullmods;
3import com.fs.starfarer.api.combat.BaseHullMod;
4import com.fs.starfarer.api.combat.MutableShipStatsAPI;
5import com.fs.starfarer.api.combat.ShipAPI;
6import com.fs.starfarer.api.combat.ShipAPI.HullSize;
7import com.fs.starfarer.api.impl.campaign.ids.HullMods;
8import com.fs.starfarer.api.impl.campaign.ids.Stats;
22 stats.getHullBonus().modifyPercent(
id,
HULL_PERCENT * mult);
23 stats.getArmorBonus().modifyPercent(
id,
ARMOR_PERCENT * mult);
26 stats.getDynamic().getMod(Stats.ACT_AS_COMBAT_SHIP).modifyFlat(
id, 1f);
33 if (index == 0)
return "" + (int) Math.round(
HULL_PERCENT * mult) +
"%";
34 if (index == 1)
return "" + (int) Math.round(
ARMOR_PERCENT * mult) +
"%";
40 if (shipHasOtherModInCategory(ship, spec.getId(), HullMods.TAG_CIV_PACKAGE))
return false;
41 return ship.getVariant().hasHullMod(HullMods.MILITARIZED_SUBSYSTEMS);
46 if (shipHasOtherModInCategory(ship, spec.getId(), HullMods.TAG_CIV_PACKAGE)) {
47 return "Can only install one combat package on a civilian-grade hull";
49 if (!ship.getVariant().hasHullMod(HullMods.MILITARIZED_SUBSYSTEMS)) {
50 return "Can only be installed on civilian-grade hulls with Militarized Subsystems";
52 return super.getUnapplicableReason(ship);
String getDescriptionParam(int index, HullSize hullSize)
static float ARMOR_PERCENT
String getUnapplicableReason(ShipAPI ship)
static float FLUX_CAPACITY_PERCENT
void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id)
boolean isApplicableToShip(ShipAPI ship)
static float HULL_PERCENT
static float getEffectMult(MutableShipStatsAPI stats)