public class BaseTrainerEffect
extends java.lang.Object
Constructor and Description |
---|
BaseTrainerEffect() |
Modifier and Type | Method and Description |
---|---|
void |
apply(TrainerCardState trainer,
GameServerState server)
This function applies the effect of the Trainer card.
|
void |
applySkipSelector(TrainerCardState trainer,
PokemonCardState pokemon,
GameServerState server,
BoardLocation b,
int p)
This function skips the selector, taking what it was placed on as the parameter.
|
boolean |
canApply(TrainerCardState trainer,
GameServerState server)
This function makes sure all selector result are ready.
|
boolean |
canPlaceOn(CardWithLocation card) |
boolean |
canPlay(GameClientState client)
This is check on client to make sure the condition on trainer card are met.
|
boolean |
canPlay(GameServerState server)
This is a utility function, so that server can re-use the same logic in canPlay(GameClientState).
|
boolean |
canSkipSelector()
This function is to tell if this trainer can skip the selector stage.
|
java.util.List<CoinSide> |
flipCoin()
This function returns all necessary coin flip results.
|
CardSelectorState |
getOpponentRevealingSelectorState(TrainerCardState trainer,
GameServerState server) |
CardSelectorState |
getSelectorState(TrainerCardState trainer,
GameServerState server) |
void |
handleEndTurn(TrainerCardState trainer,
PokemonCardState card,
PlayerServerState player,
GameServerState server) |
int |
modifyDamage(int damage,
TrainerCardState trainer,
GameServerState server) |
boolean |
preventDiscard()
Prevent the battle controller from automatically discard the trainer
|
boolean |
showDiscardButton()
For cards that allow manual discard such as Clefari Doll
|
public boolean canApply(TrainerCardState trainer, GameServerState server)
trainer
- server
- public void apply(TrainerCardState trainer, GameServerState server)
trainer
- server
- public boolean canSkipSelector()
public void applySkipSelector(TrainerCardState trainer, PokemonCardState pokemon, GameServerState server, BoardLocation b, int p)
trainer
- pokemon
- server
- public boolean canPlay(GameClientState client)
client
- public final boolean canPlay(GameServerState server)
server
- public boolean canPlaceOn(CardWithLocation card)
card
- public CardSelectorState getSelectorState(TrainerCardState trainer, GameServerState server)
trainer
- server
- public CardSelectorState getOpponentRevealingSelectorState(TrainerCardState trainer, GameServerState server)
public java.util.List<CoinSide> flipCoin()
public int modifyDamage(int damage, TrainerCardState trainer, GameServerState server)
public boolean preventDiscard()
public void handleEndTurn(TrainerCardState trainer, PokemonCardState card, PlayerServerState player, GameServerState server)
public boolean showDiscardButton()