Class BattleLog
java.lang.Object
com.pixelmonmod.pixelmon.battles.controller.log.BattleLog
Logs actions that occur during battles.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Instantprotected final BattleControllerprotected BattleLog.BattleTurnLogprotected final Map<Integer, BattleLog.BattleTurnLog> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanareMessagesInOrder(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.booleanisMessagePresent(String messageSubstring) voidlogEvent(BattleAction event) Adds an action to the current turn in the battle log.voidLogs a crash in the battle log and ends the battle.voidturnTick(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
-