Starsector API
Loading...
Searching...
No Matches
DistributedFireControl.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 DistributedFireControl extends BaseHullMod {
8
9 public static float WEAPON_DAMAGE_MULT = 0.5f;
10 public static float EMP_DAMAGE_MULT = 0.5f;
11
12 public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id) {
13 stats.getWeaponDamageTakenMult().modifyMult(id, WEAPON_DAMAGE_MULT);
14 stats.getEmpDamageTakenMult().modifyMult(id, EMP_DAMAGE_MULT);
15 }
16
17 public String getDescriptionParam(int index, HullSize hullSize) {
18 if (index == 0) return "" + (int) Math.round((1f - WEAPON_DAMAGE_MULT) * 100f) + "%";
19 if (index == 1) return "" + (int) Math.round((1f - EMP_DAMAGE_MULT) * 100f) + "%";
20 return null;
21 }
22
23
24}
25
26
27
28
29
30
31
32
void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id)