Starsector API
Loading...
Searching...
No Matches
PowerGridModulation.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.campaign.skills;
2
3import com.fs.starfarer.api.characters.ShipSkillEffect;
4import com.fs.starfarer.api.combat.MutableShipStatsAPI;
5import com.fs.starfarer.api.combat.ShipAPI.HullSize;
6
7public class PowerGridModulation {
8
9 public static final float FLUX_CAPACITY_BONUS = 10f;
10 public static final float VENT_RATE_BONUS = 25f;
11 public static final float FLUX_DISSIPATION_BONUS = 10f;
12
13
14
15 public static class Level1 implements ShipSkillEffect {
16
17 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String id, float level) {
18 stats.getFluxCapacity().modifyPercent(id, FLUX_CAPACITY_BONUS);
19 }
20
21 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String id) {
22 stats.getFluxCapacity().unmodify(id);
23 }
24
25 public String getEffectDescription(float level) {
26 return "+" + (int)(FLUX_CAPACITY_BONUS) + "% flux capacity";
27 }
28
29 public String getEffectPerLevelDescription() {
30 return null;
31 }
32
33 public ScopeDescription getScopeDescription() {
34 return ScopeDescription.PILOTED_SHIP;
35 }
36 }
37
38 public static class Level2 implements ShipSkillEffect {
39 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String id, float level) {
40 stats.getVentRateMult().modifyFlat(id, VENT_RATE_BONUS * 0.01f);
41 }
42
43 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String id) {
44 stats.getVentRateMult().unmodify(id);
45 }
46
47 public String getEffectDescription(float level) {
48 return "+" + (int) VENT_RATE_BONUS + "% flux dissipation rate while venting";
49 }
50
51 public String getEffectPerLevelDescription() {
52 return null;
53 }
54
55 public ScopeDescription getScopeDescription() {
56 return ScopeDescription.PILOTED_SHIP;
57 }
58 }
59
60 public static class Level3 implements ShipSkillEffect {
61 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String id, float level) {
62 stats.getFluxDissipation().modifyPercent(id, FLUX_DISSIPATION_BONUS);
63 }
64
65 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String id) {
66 stats.getFluxDissipation().unmodify(id);
67 }
68
69 public String getEffectDescription(float level) {
70 return "+" + (int)(FLUX_DISSIPATION_BONUS) + "% flux dissipation rate";
71 }
72
73 public String getEffectPerLevelDescription() {
74 return null;
75 }
76
77 public ScopeDescription getScopeDescription() {
78 return ScopeDescription.PILOTED_SHIP;
79 }
80 }
81
82}