Starsector API
Loading...
Searching...
No Matches
ShipDesign.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.campaign.skills;
2
3import com.fs.starfarer.api.characters.CharacterStatsSkillEffect;
4import com.fs.starfarer.api.characters.MutableCharacterStatsAPI;
5
6public class ShipDesign {
7
8 public static final float CAPACITORS_BONUS = 20f;
9 public static final float VENTS_BONUS = 20f;
10 public static final float OP_BONUS = 10f;
11
12
13
14 public static class Level1 implements CharacterStatsSkillEffect {
15 public void apply(MutableCharacterStatsAPI stats, String id, float level) {
16 stats.getMaxCapacitorsBonus().modifyPercent(id, CAPACITORS_BONUS);
17 }
18
19 public void unapply(MutableCharacterStatsAPI stats, String id) {
20 stats.getMaxCapacitorsBonus().unmodify(id);
21 }
22
23 public String getEffectDescription(float level) {
24 return "+" + (int) CAPACITORS_BONUS + "% maximum flux capacitors";
25 }
26
27 public String getEffectPerLevelDescription() {
28 return null;
29 }
30
31 public ScopeDescription getScopeDescription() {
32 return ScopeDescription.ALL_SHIPS;
33 }
34 }
35
36 public static class Level2 implements CharacterStatsSkillEffect {
37 public void apply(MutableCharacterStatsAPI stats, String id, float level) {
38 stats.getMaxVentsBonus().modifyPercent(id, VENTS_BONUS);
39 }
40
41 public void unapply(MutableCharacterStatsAPI stats, String id) {
42 stats.getMaxVentsBonus().unmodify(id);
43 }
44
45 public String getEffectDescription(float level) {
46 return "+" + (int) VENTS_BONUS + "% maximum flux vents";
47 }
48
49 public String getEffectPerLevelDescription() {
50 return null;
51 }
52
53 public ScopeDescription getScopeDescription() {
54 return ScopeDescription.ALL_SHIPS;
55 }
56 }
57
58 public static class Level3 implements CharacterStatsSkillEffect {
59 public void apply(MutableCharacterStatsAPI stats, String id, float level) {
60 stats.getShipOrdnancePointBonus().modifyPercent(id, OP_BONUS);
61 }
62
63 public void unapply(MutableCharacterStatsAPI stats, String id) {
64 stats.getShipOrdnancePointBonus().unmodify(id);
65 }
66
67 public String getEffectDescription(float level) {
68 return "+" + (int) OP_BONUS + "% ordnance points";
69 }
70
71 public String getEffectPerLevelDescription() {
72 return null;
73 }
74
75 public ScopeDescription getScopeDescription() {
76 return ScopeDescription.ALL_SHIPS;
77 }
78 }
79
80}