Class FactionHostilityEvent
java.lang.Object
com.fs.starfarer.api.impl.campaign.events.BaseEventPlugin
com.fs.starfarer.api.impl.campaign.events.FactionHostilityEvent
- All Implemented Interfaces:
CampaignEventListener
,CampaignEventPlugin
,CallEvent.CallableEvent
- Author:
- Alex Mosolov Copyright 2015 Fractal Softworks, LLC
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.fs.starfarer.api.impl.campaign.events.BaseEventPlugin
BaseEventPlugin.MarketFilter
Nested classes/interfaces inherited from interface com.fs.starfarer.api.campaign.CampaignEventListener
CampaignEventListener.FleetDespawnReason
Nested classes/interfaces inherited from interface com.fs.starfarer.api.campaign.events.CampaignEventPlugin
CampaignEventPlugin.CampaignEventCategory, CampaignEventPlugin.PriceUpdatePlugin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected float
protected float
protected boolean
static final float
static org.apache.log4j.Logger
protected FactionAPI
protected float
protected float
protected float
protected FactionAPI
Fields inherited from class com.fs.starfarer.api.impl.campaign.events.BaseEventPlugin
entity, eventTarget, eventType, faction, market, memory, started, startProbability, statModId
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
advance
(float amount) boolean
callEvent
(String ruleId, InteractionDialogAPI dialog, List<Misc.Token> params, Map<String, MemoryAPI> memoryMap) Called by the CallEvent command (called from rules.csv).protected void
endEvent()
String[]
getHighlights
(String stageId) Since multiple reports (possibly from different channels) are possible per stage: 1) All reports must have the highlighted text occur in the same order, which is the order this method returns them in, and 2) Not all highlights have to occur in every report.Token values for filling out descriptions from reports.csv.void
init
(String type, CampaignEventTarget eventTarget) Called when the EventProbability for this event is accessed.boolean
isDone()
void
Called when the event starts.protected void
Methods inherited from class com.fs.starfarer.api.impl.campaign.events.BaseEventPlugin
addFactionNameTokens, addPersonTokens, addTokensToList, allowMultipleOngoingForSameTarget, cleanup, findMatchingMarkets, findNearestMarket, getCurrentImage, getCurrentMessageIcon, getDefaultPriority, getEventCategory, getEventIcon, getEventTarget, getEventType, getHighlightColors, getId, getLoggingId, getMemory, getPriceUpdates, getRelatedCommodities, getStageIdForLikely, getStageIdForPossible, getStatModId, getTargetName, getWarningWhenLikelyPriority, getWarningWhenPossiblePriority, increaseRecentUnrest, init, isEventStarted, reportBattleFinished, reportBattleOccurred, reportEconomyMonthEnd, reportEconomyTick, reportEncounterLootGenerated, reportFleetDespawned, reportFleetJumped, reportFleetReachedEntity, reportFleetSpawned, reportPlayerActivatedAbility, reportPlayerClosedMarket, reportPlayerDeactivatedAbility, reportPlayerDidNotTakeCargo, reportPlayerDumpedCargo, reportPlayerEngagement, reportPlayerMarketTransaction, reportPlayerOpenedMarket, reportPlayerOpenedMarketAndCargoUpdated, reportPlayerReputationChange, reportPlayerReputationChange, reportShownInteractionDialog, setParam, setProbability, setTarget, showAllMessagesIfOngoing, showLatestMessageIfOngoing, startEvent, useEventNameAsId
-
Field Details
-
HOSTILITY_PENALTY
public static final float HOSTILITY_PENALTY- See Also:
-
log
public static org.apache.log4j.Logger log -
elapsedDays
protected float elapsedDays -
duration
protected float duration -
target
-
one
-
two
-
ended
protected boolean ended -
prevRel
protected float prevRel -
prevRelOne
protected float prevRelOne -
prevRelTwo
protected float prevRelTwo
-
-
Constructor Details
-
FactionHostilityEvent
public FactionHostilityEvent()
-
-
Method Details
-
init
Description copied from interface:CampaignEventPlugin
Called when the EventProbability for this event is accessed. Doesn't mean the event will actually happen.- Specified by:
init
in interfaceCampaignEventPlugin
- Overrides:
init
in classBaseEventPlugin
-
startEvent
public void startEvent()Description copied from interface:CampaignEventPlugin
Called when the event starts.- Specified by:
startEvent
in interfaceCampaignEventPlugin
- Overrides:
startEvent
in classBaseEventPlugin
-
startHostilities
protected void startHostilities() -
advance
public void advance(float amount) - Specified by:
advance
in interfaceCampaignEventPlugin
- Overrides:
advance
in classBaseEventPlugin
-
endEvent
protected void endEvent() -
getEventName
- Specified by:
getEventName
in interfaceCampaignEventPlugin
- Overrides:
getEventName
in classBaseEventPlugin
-
callEvent
public boolean callEvent(String ruleId, InteractionDialogAPI dialog, List<Misc.Token> params, Map<String, MemoryAPI> memoryMap) Description copied from interface:CampaignEventPlugin
Called by the CallEvent command (called from rules.csv).- Specified by:
callEvent
in interfaceCallEvent.CallableEvent
- Specified by:
callEvent
in interfaceCampaignEventPlugin
- Overrides:
callEvent
in classBaseEventPlugin
-
getTokenReplacements
Description copied from interface:CampaignEventPlugin
Token values for filling out descriptions from reports.csv.- Specified by:
getTokenReplacements
in interfaceCampaignEventPlugin
- Overrides:
getTokenReplacements
in classBaseEventPlugin
- Returns:
-
getHighlights
Description copied from interface:CampaignEventPlugin
Since multiple reports (possibly from different channels) are possible per stage: 1) All reports must have the highlighted text occur in the same order, which is the order this method returns them in, and 2) Not all highlights have to occur in every report.- Specified by:
getHighlights
in interfaceCampaignEventPlugin
- Overrides:
getHighlights
in classBaseEventPlugin
- Returns:
-
isDone
public boolean isDone()- Specified by:
isDone
in interfaceCampaignEventPlugin
- Overrides:
isDone
in classBaseEventPlugin
-