package data.hullmods;

import com.fs.starfarer.api.combat.BaseHullMod;
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.ShipAPI.HullSize;

public class NGOhullmod extends BaseHullMod
{
    public static final float NGO_VENT_RATE_BONUS = 15f;
    public static final float NGO_SHIELD_BONUS = 10f;

    public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id)
    {
        stats.getVentRateMult().modifyPercent(id, NGO_VENT_RATE_BONUS);
        stats.getShieldDamageTakenMult().modifyPercent(id, -NGO_SHIELD_BONUS);

    }

    public String getDescriptionParam(int index, HullSize hullSize)
    {
        if (index == 0) return "" + (int) NGO_VENT_RATE_BONUS;
        if (index == 1) return "" + (int) NGO_SHIELD_BONUS;

        return null;
    }

    public boolean isApplicableToShip(ShipAPI ship)
    {
        return ship != null && ship.getShield() != null;
    }
}
