Starsector API
Loading...
Searching...
No Matches
DesignCompromises.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;
6import com.fs.starfarer.api.impl.campaign.ids.Stats;
7
8public class DesignCompromises extends BaseHullMod {
9
10 public static float RANGE_MULT = 0.8f;
11 public static float FLUX_MULT = 0.6f;
12 public static float ENERGY_WEAPON_FLUX_INCREASE = 100f;
13 public static float MISSILE_ROF_MULT = 0.5f;
14 public static float BALLISTIC_RANGE_MULT = 0.85f;
15
16 public static boolean AlLOW_CONVERTED_HANGAR = true;
17
35
36
37 public String getDescriptionParam(int index, HullSize hullSize) {
38 if (index == 0) return "" + (int)Math.round((1f - FLUX_MULT) * 100f) + "%";
39 if (index == 1) return "" + (int)Math.round((1f - BALLISTIC_RANGE_MULT) * 100f) + "%";
40 if (index == 2) return "" + (int)Math.round((1f - MISSILE_ROF_MULT) * 100f) + "%";
41 if (index == 3) return "" + (int)Math.round(ENERGY_WEAPON_FLUX_INCREASE) + "%";
42
43 if (index == 4) return "Converted Hangar";
44 if (index == 5) return "" + (int)Math.round(2);
45 return null;
46 }
47
48}
49
50
51
52
53
54
55
56
57
void modifyMult(String source, float value)
void modifyMult(String source, float value)
void modifyPercent(String source, float value)
void modifyFlat(String source, float value)
static final String FORCE_ALLOW_CONVERTED_HANGAR
Definition Stats.java:247
static final String CONVERTED_HANGAR_NO_REARM_INCREASE
Definition Stats.java:250
static final String CONVERTED_HANGAR_NO_REFIT_PENALTY
Definition Stats.java:252
static final String CONVERTED_HANGAR_NO_CREW_INCREASE
Definition Stats.java:249
void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id)
String getDescriptionParam(int index, HullSize hullSize)