Class BattleLog
java.lang.Object
com.pixelmonmod.pixelmon.battles.controller.log.BattleLog
Logs actions that occur during battles.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Instant
protected final BattleController
protected BattleLog.BattleTurnLog
protected final Map<Integer,
BattleLog.BattleTurnLog> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
areMessagesInOrder
(String... messageSubstrings) exportLogFile
(String message) exportLogFile
(String message, Exception exception) getActionForPokemon
(int turn, PixelmonWrapper pw) Gets a specific action for a Pokémon in the battle log.boolean
isMessagePresent
(String messageSubstring) void
logEvent
(BattleAction event) Adds an action to the current turn in the battle log.void
Logs a crash in the battle log and ends the battle.void
turnTick
(int turn) Moves the log on to the next turn (with the given turn id)
-
Field Details
-
bc
-
battleStart
-
logs
-
currentTurnLog
-
-
Constructor Details
-
BattleLog
Initializes a battle log.- Parameters:
bc
- The battle to log.
-
-
Method Details
-
logEvent
Adds an action to the current turn in the battle log.- Parameters:
event
- The action to add.
-
getActionForPokemon
Gets a specific action for a Pokémon in the battle log.- Parameters:
turn
- The turn to get an action from.pw
- The Pokémon to get an action for.- Returns:
- The Pokémon's action in the specified turn.
-
turnTick
public void turnTick(int turn) Moves the log on to the next turn (with the given turn id) -
onCrash
Logs a crash in the battle log and ends the battle.- Parameters:
exc
- The exception thrown by the battle.error
- The error message from the exception.
-
getAllActions
-
isMessagePresent
-
areMessagesInOrder
-
exportLogFile
-
exportLogFile
-
getFilename
-