001package com.fs.starfarer.api.impl.campaign.skills;
002
003import com.fs.starfarer.api.characters.CharacterStatsSkillEffect;
004import com.fs.starfarer.api.characters.MutableCharacterStatsAPI;
005
006public class ShipDesign {
007        
008        public static final float CAPACITORS_BONUS = 20f;
009        public static final float VENTS_BONUS = 20f;
010        public static final float OP_BONUS = 10f;
011        
012        
013
014        public static class Level1 implements CharacterStatsSkillEffect {
015                public void apply(MutableCharacterStatsAPI stats, String id, float level) {
016                        stats.getMaxCapacitorsBonus().modifyPercent(id, CAPACITORS_BONUS);
017                }
018
019                public void unapply(MutableCharacterStatsAPI stats, String id) {
020                        stats.getMaxCapacitorsBonus().unmodify(id);
021                }
022
023                public String getEffectDescription(float level) {
024                        return "+" + (int) CAPACITORS_BONUS + "% maximum flux capacitors";
025                }
026
027                public String getEffectPerLevelDescription() {
028                        return null;
029                }
030
031                public ScopeDescription getScopeDescription() {
032                        return ScopeDescription.ALL_SHIPS;
033                }
034        }
035
036        public static class Level2 implements CharacterStatsSkillEffect {
037                public void apply(MutableCharacterStatsAPI stats, String id, float level) {
038                        stats.getMaxVentsBonus().modifyPercent(id, VENTS_BONUS);
039                }
040
041                public void unapply(MutableCharacterStatsAPI stats, String id) {
042                        stats.getMaxVentsBonus().unmodify(id);
043                }
044
045                public String getEffectDescription(float level) {
046                        return "+" + (int) VENTS_BONUS + "% maximum flux vents";
047                }
048
049                public String getEffectPerLevelDescription() {
050                        return null;
051                }
052
053                public ScopeDescription getScopeDescription() {
054                        return ScopeDescription.ALL_SHIPS;
055                }
056        }
057        
058        public static class Level3 implements CharacterStatsSkillEffect {
059                public void apply(MutableCharacterStatsAPI stats, String id, float level) {
060                        stats.getShipOrdnancePointBonus().modifyPercent(id, OP_BONUS);
061                }
062
063                public void unapply(MutableCharacterStatsAPI stats, String id) {
064                        stats.getShipOrdnancePointBonus().unmodify(id);
065                }
066
067                public String getEffectDescription(float level) {
068                        return "+" + (int) OP_BONUS + "% ordnance points";
069                }
070
071                public String getEffectPerLevelDescription() {
072                        return null;
073                }
074
075                public ScopeDescription getScopeDescription() {
076                        return ScopeDescription.ALL_SHIPS;
077                }
078        }
079        
080}