public class ToggleAbilityWithCost extends BaseToggleAbility
cooldownLeft, isActivateCooldown, level, turnedOndisableFrames, entity, id, PLAY_UI_SOUNDS_IN_WORLD_SOURCES, spec| Constructor and Description |
|---|
ToggleAbilityWithCost() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activateImpl() |
void |
addCostTooltipSection(TooltipMakerAPI tooltip,
boolean expanded,
java.lang.String prefix) |
void |
addOtherNotUsableReason(TooltipMakerAPI tooltip,
boolean expanded) |
protected void |
applyEffect(float amount,
float level)
Will be called once when level is 0 and consistently when level >0.
|
protected void |
applyFleetVisual(float amount,
float level) |
protected void |
applyStatsEffect(float amount,
float level) |
boolean |
canRecoverCRWhileActive(boolean forTooltip) |
protected void |
cleanupImpl() |
protected float |
computeFuelCost(boolean forTooltip) |
protected float |
computeSupplyCost(boolean forTooltip) |
protected void |
deactivateImpl() |
protected void |
deductCost() |
float |
getActivationAtLowCRShipDamageProbability(boolean forTooltip) |
Misc.FleetMemberDamageLevel |
getActivationDamageLevel(boolean forTooltip) |
java.awt.Color |
getCooldownColor() |
float |
getCooldownFraction()
0 at start of cooldown, 1 at end.
|
float |
getCRCost(FleetMemberAPI member,
boolean forTooltip) |
float |
getCRCostMult(boolean forTooltip) |
float |
getFuelCostMult(boolean forTooltip) |
protected java.util.List<FleetMemberAPI> |
getNonReadyShips(boolean forTooltip) |
boolean |
hasTooltip() |
boolean |
isCooldownRenderingAdditive() |
boolean |
isOnCooldown() |
boolean |
isUsable()
Whether the ability can be activated / the UI button corresponding to it is enabled.
|
boolean |
shouldApplyCostWhenDeactivating(boolean forTooltip) |
protected boolean |
showAlarm() |
protected void |
unapplyStatsEffect() |
activate, addIncompatibleToTooltip, advance, cleanup, deactivate, getActivateCooldownDays, getActivationDays, getCooldownLeft, getDeactivateCooldownDays, getDeactivationDays, getLevel, getLoopSoundUIPitch, getLoopSoundUIVolume, getLoopSoundWorldPitch, getLoopSoundWorldVolume, getProgressFraction, hasCustomButtonPressSounds, isActive, pressButton, runWhilePaused, setCooldownLeft, showActiveIndicator, showProgressIndicatoraddIncompatibleToTooltip, createTooltip, disableIncompatible, fleetJoinedBattle, fleetLeftBattle, fleetOpenedMarket, forceDisable, getActivationText, getActiveColor, getActiveLayers, getDeactivationText, getEntity, getFleet, getId, getInterruptedList, getLoopSoundUI, getLoopSoundWorld, getModId, getOffSoundUI, getOffSoundWorld, getOnSoundUI, getOnSoundWorld, getProgressColor, getSpec, getSpriteName, getTooltipWidth, init, interruptIncompatible, isActiveOrInProgress, isCompatible, isDone, isInProgress, isTooltipExpandable, readResolve, render, showCooldownIndicatorpublic ToggleAbilityWithCost()
public float getFuelCostMult(boolean forTooltip)
public float getCRCostMult(boolean forTooltip)
public float getActivationAtLowCRShipDamageProbability(boolean forTooltip)
public Misc.FleetMemberDamageLevel getActivationDamageLevel(boolean forTooltip)
public boolean canRecoverCRWhileActive(boolean forTooltip)
public boolean shouldApplyCostWhenDeactivating(boolean forTooltip)
protected void activateImpl()
activateImpl in class BaseToggleAbilityprotected void deductCost()
protected void applyStatsEffect(float amount, float level)
protected void unapplyStatsEffect()
protected void applyFleetVisual(float amount, float level)
protected void applyEffect(float amount, float level)
BaseToggleAbilityapplyEffect in class BaseToggleAbilityprotected void deactivateImpl()
deactivateImpl in class BaseToggleAbilityprotected void cleanupImpl()
cleanupImpl in class BaseToggleAbilityprotected java.util.List<FleetMemberAPI> getNonReadyShips(boolean forTooltip)
public float getCRCost(FleetMemberAPI member, boolean forTooltip)
protected float computeFuelCost(boolean forTooltip)
protected float computeSupplyCost(boolean forTooltip)
public void addOtherNotUsableReason(TooltipMakerAPI tooltip, boolean expanded)
public void addCostTooltipSection(TooltipMakerAPI tooltip, boolean expanded, java.lang.String prefix)
public boolean hasTooltip()
hasTooltip in interface AbilityPluginhasTooltip in class BaseAbilityPluginpublic boolean isOnCooldown()
isOnCooldown in interface AbilityPluginisOnCooldown in class BaseAbilityPluginpublic boolean isUsable()
AbilityPluginisUsable in interface AbilityPluginisUsable in class BaseToggleAbilityprotected boolean showAlarm()
public float getCooldownFraction()
AbilityPlugingetCooldownFraction in interface AbilityPlugingetCooldownFraction in class BaseToggleAbilitypublic java.awt.Color getCooldownColor()
getCooldownColor in interface AbilityPlugingetCooldownColor in class BaseAbilityPluginpublic boolean isCooldownRenderingAdditive()
isCooldownRenderingAdditive in interface AbilityPluginisCooldownRenderingAdditive in class BaseAbilityPlugin