Class MarketCMD
java.lang.Object
com.fs.starfarer.api.impl.campaign.rulecmd.BaseCommandPlugin
com.fs.starfarer.api.impl.campaign.rulecmd.salvage.MarketCMD
- All Implemented Interfaces:
CommandPlugin
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static enum
static enum
static enum
static enum
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic String
static String
static String
static String
static String
static String
static String
static final String
protected InteractionDialogAPI
static float
static float
static String
protected SectorEntityToken
protected FactionAPI
protected FactionAPI
static String
static int
static String
static float
static float
static float
protected MarketAPI
static float
static float
static int
protected MemoryAPI
static int
static float
protected OptionPanelAPI
protected CargoAPI
protected FactionAPI
protected CampaignFleetAPI
static float
static float
static float
static float
static String
static String
static String
static String
static String
static String
static String
static String
static String
static String
static float
static int
static int
protected MarketCMD.TempData
protected TextPanelAPI
static float
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
protected void
protected void
static void
addBombardVisual
(SectorEntityToken target) protected void
protected void
protected void
addContinueOption
(String text) protected void
protected void
protected void
static void
static int
applyRaidStabiltyPenalty
(MarketAPI target, String desc, float re) static int
applyRaidStabiltyPenalty
(MarketAPI target, String desc, float re, float maxPenalty) protected void
protected void
protected void
protected void
protected void
protected void
protected boolean
protected boolean
protected void
protected float
protected void
void
doBombardment
(FactionAPI faction, MarketCMD.BombardType type) void
doGenericRaid
(FactionAPI faction, float attackerStr) void
doGenericRaid
(FactionAPI faction, float attackerStr, float maxPenalty) void
doGenericRaid
(FactionAPI faction, float attackerStr, float maxPenalty, boolean allowedRepeat) boolean
doIndustryRaid
(FactionAPI faction, float attackerStr, Industry industry, float durMult) protected void
engage()
boolean
execute
(String ruleId, InteractionDialogAPI dialog, List<Misc.Token> params, Map<String, MemoryAPI> memoryMap) protected void
protected float
static int
static int
static int
getBombardmentCost
(MarketAPI market, CampaignFleetAPI fleet) static float
getDefenderIncreaseRaw
(MarketAPI market) static float
getDefenderIncreaseValue
(MarketAPI market) static float
getDefenderStr
(MarketAPI market) static float
getDefenderStr
(MarketAPI market, boolean forBombard) static int
getDisruptDaysPerToken
(MarketAPI market, Industry industry) protected CampaignFleetAPI
protected MutableStat
static int
getMarinesFor
(int defenderStrength, int tokens) static int
getMarinesFor
(MarketAPI market, int tokens) int
protected float
protected float
protected static float
protected static float
protected static float
protected static float
static float
getRaidEffectiveness
(MarketAPI market, float attackerStr) static float
getRaidEffectiveness
(MarketAPI market, CampaignFleetAPI fleet) static float
getRaidStr
(CampaignFleetAPI fleet) protected Random
static int
protected CampaignFleetAPI
protected MarketCMD.StationState
static int
protected void
init
(SectorEntityToken entity) protected void
protected CargoAPI
performRaid
(Random random, float raidEffectiveness) protected void
protected void
raidConfirm
(boolean secret) void
protected void
protected void
raidDisruptIndustryPicked
(Industry target) protected void
raidMenu()
protected void
protected void
protected void
protected void
protected void
protected void
setRaidCooldown
(float cooldown) protected void
showDefenses
(boolean withText) statPrinter
(boolean withNegative) Methods inherited from class com.fs.starfarer.api.impl.campaign.rulecmd.BaseCommandPlugin
doesCommandAddOptions, getEntityMemory, getOptionOrder
-
Field Details
-
HOSTILE_ACTIONS_TIMEOUT_DAYS
public static int HOSTILE_ACTIONS_TIMEOUT_DAYS -
TACTICAL_BOMBARD_TIMEOUT_DAYS
public static int TACTICAL_BOMBARD_TIMEOUT_DAYS -
SATURATION_BOMBARD_TIMEOUT_DAYS
public static int SATURATION_BOMBARD_TIMEOUT_DAYS -
MIN_MARINE_TOKENS
public static int MIN_MARINE_TOKENS -
RE_PER_MARINE_TOKEN
public static float RE_PER_MARINE_TOKEN -
MAX_MARINE_TOKENS
public static int MAX_MARINE_TOKENS -
LOSS_REDUCTION_PER_RESERVE_TOKEN
public static float LOSS_REDUCTION_PER_RESERVE_TOKEN -
LOSS_INCREASE_PER_RAID
public static float LOSS_INCREASE_PER_RAID -
MAX_MARINE_LOSSES
public static float MAX_MARINE_LOSSES -
MIN_RE_TO_REDUCE_MARINE_LOSSES
public static float MIN_RE_TO_REDUCE_MARINE_LOSSES -
MAX_MARINE_LOSS_REDUCTION_MULT
public static float MAX_MARINE_LOSS_REDUCTION_MULT -
ECON_IMPACT_MULT
public static float ECON_IMPACT_MULT -
QUANTITY_MULT_NORMAL
public static float QUANTITY_MULT_NORMAL -
QUANTITY_MULT_EXCESS
public static float QUANTITY_MULT_EXCESS -
QUANTITY_MULT_DEFICIT
public static float QUANTITY_MULT_DEFICIT -
QUANTITY_MULT_OVERALL
public static float QUANTITY_MULT_OVERALL -
ENGAGE
-
RAID
-
RAID_NON_MARKET
-
RAID_VALUABLE
-
RAID_DISRUPT
-
RAID_GO_BACK
-
RAID_CONFIRM_CONTINUE
-
RAID_CONFIRM
-
RAID_CONFIRM_STORY
-
RAID_NEVER_MIND
-
RAID_RESULT
-
INVADE
-
GO_BACK
-
BOMBARD
-
BOMBARD_TACTICAL
-
BOMBARD_SATURATION
-
BOMBARD_CONFIRM
-
BOMBARD_NEVERMIND
-
BOMBARD_RESULT
-
DEBT_RESULT_CONTINUE
-
DISRUPTION_THRESHOLD
public static float DISRUPTION_THRESHOLD -
VALUABLES_THRESHOLD
public static float VALUABLES_THRESHOLD -
playerFleet
-
entity
-
playerFaction
-
entityFaction
-
text
-
options
-
playerCargo
-
memory
-
market
-
dialog
-
memoryMap
-
faction
-
temp
-
MARINES_IN_MARKET_CARGO_DEFENSE_BONUS
public static float MARINES_IN_MARKET_CARGO_DEFENSE_BONUS -
DEFENDER_INCREASE_KEY
- See Also:
-
-
Constructor Details
-
MarketCMD
public MarketCMD() -
MarketCMD
-
-
Method Details
-
clearTemp
protected void clearTemp() -
init
-
execute
public boolean execute(String ruleId, InteractionDialogAPI dialog, List<Misc.Token> params, Map<String, MemoryAPI> memoryMap) -
showDefenses
protected void showDefenses(boolean withText) -
getRaidStr
-
getDefenderStr
-
getDefenderStr
-
getRaidEffectiveness
-
getRaidEffectiveness
-
getMarinesFor
-
getMarinesFor
public static int getMarinesFor(int defenderStrength, int tokens) -
getDisruptDaysPerToken
-
raidNonMarket
protected void raidNonMarket() -
raidMenu
protected void raidMenu() -
raidValuable
protected void raidValuable() -
addBombardConfirmOptions
protected void addBombardConfirmOptions() -
raidDisrupt
protected void raidDisrupt() -
computeBaseDisruptDuration
-
getBombardDestroyThreshold
public static int getBombardDestroyThreshold() -
getBombardDisruptDuration
public static int getBombardDisruptDuration() -
raidDisruptIndustryPicked
-
addNeverMindOption
protected void addNeverMindOption() -
addBombardNeverMindOption
protected void addBombardNeverMindOption() -
addContinueOption
protected void addContinueOption() -
addContinueOption
-
getDefenderIncreaseRaw
-
applyDefenderIncreaseFromRaid
-
getDefenderIncreaseValue
-
getRaidDefenderIncreasePerRaid
protected static float getRaidDefenderIncreasePerRaid() -
getRaidDefenderIncreaseMax
protected static float getRaidDefenderIncreaseMax() -
getRaidDefenderIncreaseFraction
protected static float getRaidDefenderIncreaseFraction() -
getRaidDefenderIncreaseMin
protected static float getRaidDefenderIncreaseMin() -
getRaidCooldownMax
protected float getRaidCooldownMax() -
setRaidCooldown
protected void setRaidCooldown(float cooldown) -
getRaidCooldown
protected float getRaidCooldown() -
getRandom
-
getNumMarineTokens
public int getNumMarineTokens() -
getMarineLossesStat
-
getAverageMarineLosses
-
addMilitaryResponse
protected void addMilitaryResponse() -
raidConfirm
protected void raidConfirm(boolean secret) -
raidConfirmContinue
public void raidConfirmContinue() -
performRaid
-
raidNeverMind
protected void raidNeverMind() -
raidShowLoot
protected void raidShowLoot() -
printStationState
protected void printStationState() -
engage
protected void engage() -
getStationFleet
-
getInteractionTargetForFIDPI
-
getStationState
-
applyRaidStabiltyPenalty
-
applyRaidStabiltyPenalty
-
statPrinter
-
getBombardmentCost
-
getTacticalBombardmentStabilityPenalty
public static int getTacticalBombardmentStabilityPenalty() -
getSaturationBombardmentStabilityPenalty
public static int getSaturationBombardmentStabilityPenalty() -
bombardMenu
protected void bombardMenu() -
addConfirmOptions
protected void addConfirmOptions() -
getTacticalBombardmentTargets
-
bombardTactical
protected void bombardTactical() -
bombardSaturation
protected void bombardSaturation() -
bombardConfirm
protected void bombardConfirm() -
bombardNeverMind
protected void bombardNeverMind() -
raidResult
protected void raidResult() -
bombardResult
protected void bombardResult() -
finishedRaidOrBombard
protected void finishedRaidOrBombard() -
addBombardContinueOption
protected void addBombardContinueOption() -
addBombardContinueOption
-
checkDebtEffect
protected boolean checkDebtEffect() -
applyDebtEffect
protected void applyDebtEffect() -
doGenericRaid
-
doGenericRaid
-
doGenericRaid
public void doGenericRaid(FactionAPI faction, float attackerStr, float maxPenalty, boolean allowedRepeat) -
doIndustryRaid
public boolean doIndustryRaid(FactionAPI faction, float attackerStr, Industry industry, float durMult) -
doBombardment
-
addBombardVisual
-
checkMercsLeaving
protected boolean checkMercsLeaving() -
convinceMercToStay
protected void convinceMercToStay() -
mercLeaves
protected void mercLeaves()
-