001package com.fs.starfarer.api.impl.campaign.skills;
002
003import java.awt.Color;
004
005import com.fs.starfarer.api.Global;
006import com.fs.starfarer.api.characters.CharacterStatsSkillEffect;
007import com.fs.starfarer.api.characters.DescriptionSkillEffect;
008import com.fs.starfarer.api.characters.MutableCharacterStatsAPI;
009import com.fs.starfarer.api.util.Misc;
010
011public class OfficerManagement {
012        
013        public static float NUM_OFFICERS_BONUS = 2;
014        public static float CP_BONUS = 2f;
015        
016        public static class Level0 implements DescriptionSkillEffect {
017                public String getString() {
018                        int baseOfficers = (int)Global.getSector().getPlayerStats().getOfficerNumber().getBaseValue();
019                        
020                        return "*The base maximum number of officers you're able to command is " + baseOfficers + ".";
021                }
022                public Color[] getHighlightColors() {
023                        Color h = Misc.getDarkHighlightColor();
024                        return new Color[] {h};
025                }
026                public String[] getHighlights() {
027                        String baseOfficers = "" + (int)Global.getSector().getPlayerStats().getOfficerNumber().getBaseValue();
028                        return new String [] {baseOfficers};
029                }
030                public Color getTextColor() {
031                        return null;
032                }
033        }
034        public static class Level1  implements CharacterStatsSkillEffect {
035
036                public void apply(MutableCharacterStatsAPI stats, String id, float level) {
037                        stats.getOfficerNumber().modifyFlat(id, NUM_OFFICERS_BONUS);
038                }
039
040                public void unapply(MutableCharacterStatsAPI stats, String id) {
041                        stats.getOfficerNumber().unmodify(id);
042                }
043                
044                public String getEffectDescription(float level) {
045                        //return "Able to command up to " + (int) (max) + " officers";
046                        return "+" + (int)NUM_OFFICERS_BONUS + " to maximum number of officers* you're able to command";
047                }
048                
049                public String getEffectPerLevelDescription() {
050                        return null;
051                }
052
053                public ScopeDescription getScopeDescription() {
054                        return ScopeDescription.NONE;
055                }
056        }
057        
058        public static class Level1B implements CharacterStatsSkillEffect {
059
060                public void apply(MutableCharacterStatsAPI stats, String id, float level) {
061                        stats.getCommandPoints().modifyFlat(id, CP_BONUS);
062                }
063
064                public void unapply(MutableCharacterStatsAPI stats, String id) {
065                        stats.getCommandPoints().unmodify(id);
066                }
067                
068                public String getEffectDescription(float level) {
069                        return "+" + (int) CP_BONUS + " command points";
070                }
071                
072                public String getEffectPerLevelDescription() {
073                        return null;
074                }
075
076                public ScopeDescription getScopeDescription() {
077                        return ScopeDescription.FLEET;
078                }
079        }
080}