001package com.fs.starfarer.api.impl.hullmods;
002
003import com.fs.starfarer.api.combat.BaseHullMod;
004import com.fs.starfarer.api.combat.MutableShipStatsAPI;
005import com.fs.starfarer.api.combat.ShipAPI.HullSize;
006
007public class DistributedFireControl extends BaseHullMod {
008
009        public static float WEAPON_DAMAGE_MULT = 0.5f;
010        public static float EMP_DAMAGE_MULT = 0.5f;
011        
012        public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id) {
013                stats.getWeaponDamageTakenMult().modifyMult(id, WEAPON_DAMAGE_MULT);
014                stats.getEmpDamageTakenMult().modifyMult(id, EMP_DAMAGE_MULT);
015        }
016        
017        public String getDescriptionParam(int index, HullSize hullSize) {
018                if (index == 0) return "" + (int) Math.round((1f - WEAPON_DAMAGE_MULT) * 100f) + "%";
019                if (index == 1) return "" + (int) Math.round((1f - EMP_DAMAGE_MULT) * 100f) + "%";
020                return null;
021        }
022
023
024}
025
026
027
028
029
030
031
032