Package com.pixelmonmod.tcg.duel.state
Class CommonCardState
java.lang.Object
com.pixelmonmod.tcg.duel.state.CommonCardState
- Direct Known Subclasses:
PokemonCardState
,TrainerCardState
Created by Hy on 5/10/2016.
-
Field Summary
Modifier and TypeFieldDescriptionprotected ImmutableCard
protected Energy
This will regard all energy attachments as this overwriteEnergy -
Constructor Summary
ConstructorDescriptionCommonCardState
(ImmutableCard data) CommonCardState
(net.minecraft.network.FriendlyByteBuf buf) -
Method Summary
Modifier and TypeMethodDescriptiongetCode()
getData()
int
getHP()
getName()
org.joml.Vector3f
int
net.minecraft.resources.ResourceLocation
int
getSetID()
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 otherwiseboolean
boolean
protected static boolean
isNullOrEmpty
(List list) void
setCardType
(CardType cardType) void
void
setData
(ImmutableCard data) void
setDescription
(String description) void
setHP
(int hp) void
void
setOverrideModelColor
(org.joml.Vector3f overrideModelColor) void
setOverwriteEnergy
(Energy overwriteEnergy) void
setPokemonID
(int pokemonId) void
setRarity
(CardRarity cardRarity) void
setSetID
(int setId) void
transform
(ImmutableCard data, PokemonCardStatus status) void
write
(net.minecraft.network.FriendlyByteBuf buf, boolean faceUp) protected void
write
(net.minecraft.network.FriendlyByteBuf buf, boolean faceUp, boolean writeParams)
-
Field Details
-
parameters
-
data
-
overwriteEnergy
This will regard all energy attachments as this overwriteEnergy
-
-
Constructor Details
-
CommonCardState
-
CommonCardState
public CommonCardState(net.minecraft.network.FriendlyByteBuf buf)
-
-
Method Details
-
transform
-
write
public void write(net.minecraft.network.FriendlyByteBuf buf, boolean faceUp) -
write
protected void write(net.minecraft.network.FriendlyByteBuf buf, boolean faceUp, boolean writeParams) - Parameters:
buf
-faceUp
-writeParams
- This is to prevent circular reference when parameters contains this card
-
getData
-
setData
-
getParameters
-
isEnergyEquivalence
public boolean isEnergyEquivalence() -
isNullOrEmpty
-
getSetID
public int getSetID() -
setSetID
public void setSetID(int setId) -
getCardType
-
setCardType
-
getPokemonID
public int getPokemonID() -
setPokemonID
public void setPokemonID(int pokemonId) -
getHP
public int getHP() -
setHP
public void setHP(int hp) -
getName
-
setName
-
getCode
-
setCode
-
getDescription
-
setDescription
-
getAbility
-
getMainEnergy
-
getSecondaryEnergy
-
hasTransformation
public boolean hasTransformation() -
getTransformation
-
setOverwriteEnergy
-
getRarity
-
setRarity
-
getOverrideModelColor
public org.joml.Vector3f getOverrideModelColor() -
setOverrideModelColor
public void setOverrideModelColor(org.joml.Vector3f overrideModelColor) -
handleEndTurn
public 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 otherwise- Parameters:
attachTo
- Pokemon card that this card attach toplayer
-server
-
-
getPokemonSprite
public net.minecraft.resources.ResourceLocation getPokemonSprite()
-