|
楼主 |
发表于 2022-2-28 16:48:22
|
显示全部楼层
本帖最后由 夜游神 于 2022-2-28 16:52 编辑
- package com.fs.starfarer.api.impl.campaign.skills;
- import com.fs.starfarer.api.Global;
- import com.fs.starfarer.api.characters.CharacterStatsSkillEffect;
- import com.fs.starfarer.api.characters.DescriptionSkillEffect;
- import com.fs.starfarer.api.characters.LevelBasedEffect;
- import com.fs.starfarer.api.characters.MutableCharacterStatsAPI;
- import com.fs.starfarer.api.util.Misc;
- import java.awt.Color;
- public class OfficerManagement {
- public static float NUM_OFFICERS_BONUS = 2.0F;
-
- public static float CP_BONUS = 2.0F;
-
- public static class Level0 implements DescriptionSkillEffect {
- public String getString() {
- int baseOfficers = (int)Global.getSector().getPlayerStats().getOfficerNumber().getBaseValue();
- return "" + baseOfficers + ".";
- }
-
- public Color[] getHighlightColors() {
- Color h = Misc.getDarkHighlightColor();
- return new Color[] { h };
- }
-
- public String[] getHighlights() {
- int i = (int)Global.getSector().getPlayerStats().getOfficerNumber().getBaseValue();
- return new String[] { i };
- }
-
- public Color getTextColor() {
- return null;
- }
- }
-
- public static class Level1 implements CharacterStatsSkillEffect {
- public void apply(MutableCharacterStatsAPI stats, String id, float level) {
- stats.getOfficerNumber().modifyFlat(id, OfficerManagement.NUM_OFFICERS_BONUS);
- }
-
- public void unapply(MutableCharacterStatsAPI stats, String id) {
- stats.getOfficerNumber().unmodify(id);
- }
-
- public String getEffectDescription(float level) {
- return "+" + (int)OfficerManagement.NUM_OFFICERS_BONUS + " ;
- }
-
- public String getEffectPerLevelDescription() {
- return null;
- }
-
- public LevelBasedEffect.ScopeDescription getScopeDescription() {
- return LevelBasedEffect.ScopeDescription.NONE;
- }
- }
-
- public static class Level1B implements CharacterStatsSkillEffect {
- public void apply(MutableCharacterStatsAPI stats, String id, float level) {
- stats.getCommandPoints().modifyFlat(id, OfficerManagement.CP_BONUS);
- }
-
- public void unapply(MutableCharacterStatsAPI stats, String id) {
- stats.getCommandPoints().unmodify(id);
- }
-
- public String getEffectDescription(float level) {
- return "+" + (int)OfficerManagement.CP_BONUS + " ;
- }
-
- public String getEffectPerLevelDescription() {
- return null;
- }
-
- public LevelBasedEffect.ScopeDescription getScopeDescription() {
- return LevelBasedEffect.ScopeDescription.FLEET;
- }
- }
- }
复制代码
|
|