Package com.pixelmonmod.tcg.duel.state
Class PokemonCardState
java.lang.Object
com.pixelmonmod.tcg.duel.state.CommonCardState
com.pixelmonmod.tcg.duel.state.PokemonCardState
Created by Hy on 5/10/2016.
-
Field Summary
Fields inherited from class com.pixelmonmod.tcg.duel.state.CommonCardState
data, overwriteEnergy, parameters
-
Constructor Summary
ConstructorDescriptionPokemonCardState
(ImmutableCard card, int turn) PokemonCardState
(BaseTrainerEffect effect, TrainerCardState trainer, int turn) PokemonCardState
(net.minecraft.network.FriendlyByteBuf buf) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
addCondition
(PokemonCardState attacker, CardCondition cardCondition, Integer modifier, GameServerState server) void
addDamage
(PokemonCardState attacker, int damage, GameServerState server) void
addDamageFromCondition
(int d) net.minecraft.resources.ResourceLocation
boolean
void
disableAbilities
(boolean disable) int
net.minecraft.resources.ResourceLocation
int
int
int
getTurn()
int
void
handleEndTurn
(PokemonCardState attachTo, PlayerServerState player, GameServerState server) Clear all the parameters stored in the cards when the turns ends, unless the power effects state otherwisevoid
setAbility
(CardPower cardAbility) void
setCanRetreat
(boolean canRetreat) void
setHiddenAbility
(CardPower hiddenCardAbility) void
setPreviousPokemonID
(int previousPokemonId) void
setResistance
(Energy resistance) void
setResistanceModifier
(CardModifier resistanceCardModifier) void
setResistanceValue
(int resistanceValue) void
setRetreatCost
(int retreatCost) void
void
setWeakness
(Energy weakness) void
setWeaknessModifier
(CardModifier weaknessCardModifier) void
setWeaknessValue
(int weaknessValue) void
transform
(ImmutableCard card, PokemonCardStatus stats) protected void
write
(net.minecraft.network.FriendlyByteBuf buf, boolean faceUp, boolean writeParams) Methods inherited from class com.pixelmonmod.tcg.duel.state.CommonCardState
getCardType, getCode, getData, getDescription, getHP, getMainEnergy, getName, getOverrideModelColor, getParameters, getPokemonID, getPokemonSprite, getRarity, getSecondaryEnergy, getSetID, getTransformation, hasTransformation, isEnergyEquivalence, isNullOrEmpty, setCardType, setCode, setData, setDescription, setHP, setName, setOverrideModelColor, setOverwriteEnergy, setPokemonID, setRarity, setSetID, write
-
Field Details
-
turn
protected int turn
-
-
Constructor Details
-
PokemonCardState
-
PokemonCardState
-
PokemonCardState
public PokemonCardState(net.minecraft.network.FriendlyByteBuf buf)
-
-
Method Details
-
transform
- Overrides:
transform
in classCommonCardState
-
write
protected void write(net.minecraft.network.FriendlyByteBuf buf, boolean faceUp, boolean writeParams) - Overrides:
write
in classCommonCardState
writeParams
- This is to prevent circular reference when parameters contains this card
-
handleEndTurn
public void handleEndTurn(PokemonCardState attachTo, PlayerServerState player, GameServerState server) Description copied from class:CommonCardState
Clear all the parameters stored in the cards when the turns ends, unless the power effects state otherwise- Overrides:
handleEndTurn
in classCommonCardState
- Parameters:
attachTo
- Pokemon card that this card attach toplayer
-server
-
-
addDamage
-
addCondition
public void addCondition(PokemonCardState attacker, CardCondition cardCondition, Integer modifier, GameServerState server) -
addDamageFromCondition
public void addDamageFromCondition(int d) -
bindPreviousPokemonSprite
public net.minecraft.resources.ResourceLocation bindPreviousPokemonSprite() -
getPreviousPokemonSprite
public net.minecraft.resources.ResourceLocation getPreviousPokemonSprite() -
getAttachments
-
getPreviousPokemonID
public int getPreviousPokemonID() -
setPreviousPokemonID
public void setPreviousPokemonID(int previousPokemonId) -
getStatus
-
setStatus
-
getAttacksStatus
-
getAbility
- Overrides:
getAbility
in classCommonCardState
-
setAbility
-
abilitiesDisabled
public boolean abilitiesDisabled() -
disableAbilities
public void disableAbilities(boolean disable) -
getHiddenAbility
-
setHiddenAbility
-
getWeakness
-
setWeakness
-
getWeaknessModifier
-
setWeaknessModifier
-
getWeaknessValue
public int getWeaknessValue() -
setWeaknessValue
public void setWeaknessValue(int weaknessValue) -
getResistance
-
setResistance
-
getResistanceModifier
-
setResistanceModifier
-
getResistanceValue
public int getResistanceValue() -
setResistanceValue
public void setResistanceValue(int resistanceValue) -
getRetreatCost
public int getRetreatCost() -
setRetreatCost
public void setRetreatCost(int retreatCost) -
getTurn
public int getTurn() -
setCanRetreat
public void setCanRetreat(boolean canRetreat) -
canRetreat
public boolean canRetreat()
-