Starsector API
Loading...
Searching...
No Matches
AblativeArmor.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.hullmods;
2
3import com.fs.starfarer.api.combat.BaseHullMod;
4import com.fs.starfarer.api.combat.MutableShipStatsAPI;
5import com.fs.starfarer.api.combat.ShipAPI.HullSize;
6
7public class AblativeArmor extends BaseHullMod {
8
9 public static float ARMOR_MULT = 0.1f;
10
11 public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id) {
12 stats.getEffectiveArmorBonus().modifyMult(id, ARMOR_MULT);
13 stats.getMinArmorFraction().modifyMult(id, ARMOR_MULT);
14 }
15
16 public String getDescriptionParam(int index, HullSize hullSize) {
17 if (index == 0) return "" + (int) Math.round(ARMOR_MULT * 100f) + "%";
18 return null;
19 }
20
21
22}
23
24
25
26
27
28
29
30
void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id)
String getDescriptionParam(int index, HullSize hullSize)