public class TrainerParticipant extends BattleParticipant
Modifier and Type | Field and Description |
---|---|
NPCTrainer |
trainer
The Trainer entity that this participant is representing.
|
allPokemon, ashNinja, bc, controlledPokemon, dynamax, evolution, isDefeated, lastFailedCapture, lastFaintedTurn, lastMoveTime, numControlledPokemon, startedBattle, switchingIn, switchingOut, team, totalFainted, ultraBurst, usedZ, wait
Constructor and Description |
---|
TrainerParticipant(NPCTrainer trainer,
int numPokemon)
Initializes the participant.
|
TrainerParticipant(NPCTrainer trainer,
net.minecraft.entity.player.PlayerEntity opponent,
int numPokemon)
Initializes the participant.
|
TrainerParticipant(NPCTrainer trainer,
net.minecraft.entity.player.PlayerEntity opponent,
int numPokemon,
java.util.List<Pokemon> teamSelection)
Initializes the participant.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canDynamax()
Checks if the participant is allowed to Dynamax Pokémon.
|
boolean |
canGainXP()
Checks if the participant's Pokémon can give experience.
|
boolean |
canMegaEvolve()
Checks if the participant is allowed to Mega Evolve Pokémon.
|
boolean |
checkPokemon()
Checks if the participant's Pokémon are in a valid state.
|
void |
endBattle(BattleEndCause cause)
Ends the battle the participant is in.
|
java.lang.String |
getDisplayName()
Returns the name of the entity the participant is representing.
|
net.minecraft.entity.MobEntity |
getEntity()
Gets the entity that this participant is representing.
|
MoveChoice |
getMove(PixelmonWrapper p)
Gets the move to be used by the specified Pokémon.
|
net.minecraft.util.text.TextComponent |
getName()
Gets the name of the participant.
|
void |
getNextPokemon(int position)
Sends out the next unfainted Pokémon in the participant's party.
|
java.util.UUID |
getNextPokemonUUID()
Gets the UUID of the next Pokémon in the participant's party that can battle;
|
TrainerPartyStorage |
getStorage()
Returns the Pokémon storage of the participant.
|
ParticipantType |
getType()
Gets the type of participant that this participant is.
|
boolean |
hasMorePokemonReserve()
For use with switching in new Pokémon.
|
void |
startBattle()
Adds the participant to a battle.
|
PixelmonWrapper |
switchPokemon(PixelmonWrapper oldPokemon,
java.util.UUID newPixelmonUUID)
Switches the participant's Pokémon for another one.
|
void |
updateOtherPokemon()
Updates the opponent's Pokémon client-side.
|
void |
updatePokemon(PixelmonWrapper p)
Updates the specified Pokémon client-side.
|
addSwitchingOut, animateDynamax, canSwitch, clearTurnVariables, countAblePokemon, countHealthPercent, countTeam, faintedLastTurn, getActiveUnfaintedPokemon, getAllies, getBattleAI, getCurrentTime, getFaintedPokemon, getOpponentPokemon, getOpponents, getPartyPosition, getPokemonFromParty, getPokemonFromParty, getPokemonFromUUID, getRandomPartyPokemon, getTeamPokemon, getTotalFainted, getTurnTimeSeconds, getWait, getWorld, hasMorePokemon, hasRemainingPokemon, incrementFaintCount, loadParty, loadParty, loadSingle, onAddStatus, onEndTurn, onHit, onOpponentKO, onSwitchIn, onTakeTurn, onTargeted, onUseAttack, onUseAttackOther, onUseAttackPost, resetMoveTimer, retrieveEntityDuringBattleUnlessRiding, selectAction, sendDamagePacket, sendHealPacket, sendMessage, setBattleAI, setNumControlledPokemon, switchAllFainted, tick, updateLastFaintedTurn
public NPCTrainer trainer
public TrainerParticipant(NPCTrainer trainer, net.minecraft.entity.player.PlayerEntity opponent, int numPokemon) throws java.lang.IllegalStateException
trainer
- The Trainer entity that this participant is representing.opponent
- The player that is battling the Trainer.numPokemon
- The number of Pokémon to be sent out by the Trainer.java.lang.IllegalStateException
- When the player is prevented from battling the NPC.public TrainerParticipant(NPCTrainer trainer, net.minecraft.entity.player.PlayerEntity opponent, int numPokemon, java.util.List<Pokemon> teamSelection) throws java.lang.IllegalStateException
trainer
- The Trainer entity that this participant is representing.opponent
- The player that is battling the Trainer.numPokemon
- The number of Pokémon to be sent out by the Trainer.teamSelection
- The team selected by the Trainer for battle.java.lang.IllegalStateException
- When the player is prevented from battling the NPC.public TrainerParticipant(NPCTrainer trainer, int numPokemon) throws java.lang.IllegalStateException
trainer
- The Trainer entity that this participant is representing.numPokemon
- The number of Pokémon to be sent out by the Trainer.java.lang.IllegalStateException
- When the player is prevented from battling the NPC.public void startBattle()
BattleParticipant
startBattle
in class BattleParticipant
public ParticipantType getType()
BattleParticipant
getType
in class BattleParticipant
public boolean hasMorePokemonReserve()
BattleParticipant
hasMorePokemonReserve
in class BattleParticipant
public boolean canGainXP()
BattleParticipant
canGainXP
in class BattleParticipant
public void endBattle(BattleEndCause cause)
BattleParticipant
endBattle
in class BattleParticipant
public void getNextPokemon(int position)
BattleParticipant
getNextPokemon
in class BattleParticipant
position
- The position to send out the Pokémon at.public java.util.UUID getNextPokemonUUID()
BattleParticipant
getNextPokemonUUID
in class BattleParticipant
public net.minecraft.util.text.TextComponent getName()
BattleParticipant
getName
in class BattleParticipant
public MoveChoice getMove(PixelmonWrapper p)
BattleParticipant
getMove
in class BattleParticipant
p
- The Pokémon to get a move for.public PixelmonWrapper switchPokemon(PixelmonWrapper oldPokemon, java.util.UUID newPixelmonUUID)
BattleParticipant
switchPokemon
in class BattleParticipant
oldPokemon
- The Pokémon to switch out.newPixelmonUUID
- The UUID of the Pokémon's to switch in.public boolean checkPokemon()
BattleParticipant
checkPokemon
in class BattleParticipant
public boolean canMegaEvolve()
BattleParticipant
canMegaEvolve
in class BattleParticipant
public boolean canDynamax()
BattleParticipant
canDynamax
in class BattleParticipant
public void updatePokemon(PixelmonWrapper p)
BattleParticipant
updatePokemon
in class BattleParticipant
p
- The Pokémon to update.public net.minecraft.entity.MobEntity getEntity()
BattleParticipant
getEntity
in class BattleParticipant
public void updateOtherPokemon()
BattleParticipant
updateOtherPokemon
in class BattleParticipant
public java.lang.String getDisplayName()
BattleParticipant
getDisplayName
in class BattleParticipant
public TrainerPartyStorage getStorage()
BattleParticipant
getStorage
in class BattleParticipant