Starsector API
Loading...
Searching...
No Matches
BallisticMastery.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 BallisticMastery {
8
9 public static float PROJ_SPEED_BONUS = 33;
10
11 public static float DAMAGE_BONUS = 10f;
12 public static float DAMAGE_ELITE = 5f;
13 public static float RANGE_BONUS = 10f;
14
15
16 public static class Level1 implements ShipSkillEffect {
17 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String id, float level) {
18 stats.getBallisticWeaponDamageMult().modifyPercent(id, DAMAGE_BONUS);
19 }
20
21 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String id) {
22 stats.getBallisticWeaponDamageMult().unmodify(id);
23 }
24
25 public String getEffectDescription(float level) {
26 return "+" + (int)(DAMAGE_BONUS) + "% damage dealt by ballistic weapons";
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.getBallisticWeaponRangeBonus().modifyPercent(id, RANGE_BONUS);
41 }
42
43 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String id) {
44 stats.getBallisticWeaponRangeBonus().unmodify(id);
45 }
46
47 public String getEffectDescription(float level) {
48 return "+" + (int)(RANGE_BONUS) + "% ballistic weapon range";
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.getBallisticProjectileSpeedMult().modifyPercent(id, PROJ_SPEED_BONUS);
63 }
64
65 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String id) {
66 stats.getBallisticProjectileSpeedMult().unmodify(id);
67 }
68
69 public String getEffectDescription(float level) {
70 return "+" + (int)(PROJ_SPEED_BONUS) + "% ballistic projectile speed";
71 }
72
73 public String getEffectPerLevelDescription() {
74 return null;
75 }
76
77 public ScopeDescription getScopeDescription() {
78 return ScopeDescription.PILOTED_SHIP;
79 }
80 }
81
82
83 public static class Level4 implements ShipSkillEffect {
84 public void apply(MutableShipStatsAPI stats, HullSize hullSize, String id, float level) {
85 stats.getBallisticWeaponDamageMult().modifyPercent(id, DAMAGE_ELITE);
86 }
87
88 public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String id) {
89 stats.getBallisticWeaponDamageMult().unmodify(id);
90 }
91
92 public String getEffectDescription(float level) {
93 return "+" + (int)(DAMAGE_ELITE) + "% damage dealt by ballistic weapons";
94 }
95
96 public String getEffectPerLevelDescription() {
97 return null;
98 }
99
100 public ScopeDescription getScopeDescription() {
101 return ScopeDescription.PILOTED_SHIP;
102 }
103 }
104
105
106
107
108
109
110
111
112}