Package com.pixelmonmod.tcg.duel.power
Class BasePowerEffect
java.lang.Object
com.pixelmonmod.tcg.duel.power.BasePowerEffect
- Direct Known Subclasses:
Bounce
,Buzzap
,Curse
,DamageSwap
,DamageSwapEnemy
,DamageSwapToSelfOnly
,DisableEvolution
,EnergyBurn
,EnergyTransfer
,EvolutionaryLight
,FinalBeam
,FlipToEvade
,Frenzy
,GatherFire
,HalfDamage
,HayFever
,Heal
,InvisibleWall
,LongDistanceHypnosis
,MatterExchange
,Peek
,PollenStench
,PrehistoricPower
,RainDance
,ReelIn
,RetreatAid
,RevealHand
,Shift
,Sinkhole
,SneakAttack
,SpecialDelivery
,StepIn
,StickyGoo
,StrikesBack
,SummonMinions
,ThickSkinned
,ToxicGas
,Transform
,Transparency
,Trickery
Created by Hy on 6/25/2016.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(PokemonCardState pokemon, GameServerState server, PlayerServerState player) boolean
canActivate
(PokemonCardState pokemon, GameServerState server) Passive ability does not have to override this.void
cleanUp
(PokemonCardState pokemon, GameServerState server) boolean
disableEvolution
(PokemonCardState pokemon, GameClientState client) Disable all evolution.boolean
disableEvolution
(PokemonCardState affecting, PokemonCardState pokemon, GameClientState client) Disable evolution of a particular Pokemonboolean
disableOtherAbilities
(PokemonCardState pokemon, GameClientState server) Disable abilitiesflipCoin()
This function returns all necessary coin flip results.getCode()
getCustomGUI
(PokemonCardState pokemon, GameServerState server) getEnergyEquivalence
(CommonCardState attachment) getSelectorState
(PokemonCardState pokemon, GameServerState server) boolean
By default, battle controller clear all parameter after ending turns.boolean
Rainbowfy energyboolean
isEnabled
(PokemonCardState pokemon, GameClientState client) Making sure that the non-passive ability can be activated.boolean
Passive ability does not require activationint
onAttacked
(PokemonCardState active, PokemonCardState attacker, GameServerState server) boolean
onCondition
(PokemonCardState pokemon, PokemonCardState attacker, CardCondition cardCondition, GameServerState server) int
onDamage
(PokemonCardState active, PokemonCardState attacker, GameServerState server, int damage) void
onEndTurn
(PokemonCardState pokemon, GameServerState server) void
onPlay
(PokemonCardState newPokemon, PlayerCommonState playingPlayer, PokemonCardState pokemon, PlayerServerState player, GameServerState server) void
onStartGame
(PokemonCardState pokemon, GameServerState server) void
onSwitchActiveCard
(PokemonCardState newActive, PokemonCardState oldActive, PlayerCommonState switchingPlayer, PokemonCardState pokemon, PlayerServerState player, GameServerState server) int
retreatModifier
(PokemonCardState pokemon, PlayerCommonState player) boolean
Reveal hand of other player
-
Constructor Details
-
BasePowerEffect
-
-
Method Details
-
isPassive
public boolean isPassive()Passive ability does not require activation- Returns:
-
isEnabled
Making sure that the non-passive ability can be activated. Checks for Sleep, Confused, Paralyzed- Parameters:
pokemon
-client
-- Returns:
-
onDamage
public int onDamage(PokemonCardState active, PokemonCardState attacker, GameServerState server, int damage) - Parameters:
active
-attacker
-damage
-- Returns:
- Final damage value
-
onAttacked
- Parameters:
active
-attacker
-server
-- Returns:
- -1 no effect, 0 miss regardless of other effects, 1 hit regardless of other effects
-
onCondition
public boolean onCondition(PokemonCardState pokemon, PokemonCardState attacker, CardCondition cardCondition, GameServerState server) - Parameters:
pokemon
-attacker
-cardCondition
-- Returns:
- False will cancel the effect
-
canActivate
Passive ability does not have to override this.- Parameters:
pokemon
-server
-- Returns:
-
getSelectorState
-
getCustomGUI
-
activate
-
cleanUp
-
onPlay
public void onPlay(PokemonCardState newPokemon, PlayerCommonState playingPlayer, PokemonCardState pokemon, PlayerServerState player, GameServerState server) -
onStartGame
-
onEndTurn
-
onSwitchActiveCard
public void onSwitchActiveCard(PokemonCardState newActive, PokemonCardState oldActive, PlayerCommonState switchingPlayer, PokemonCardState pokemon, PlayerServerState player, GameServerState server) -
getEnergyEquivalence
-
flipCoin
This function returns all necessary coin flip results.- Returns:
- List of CoinSide
-
retreatModifier
-
disableEvolution
Disable all evolution. NOTE: need to overwrite both disableEvolution function.- Parameters:
pokemon
-- Returns:
-
disableEvolution
public boolean disableEvolution(PokemonCardState affecting, PokemonCardState pokemon, GameClientState client) Disable evolution of a particular Pokemon- Parameters:
affecting
-pokemon
-- Returns:
-
disableOtherAbilities
Disable abilities- Parameters:
pokemon
-- Returns:
-
holdParameters
public boolean holdParameters()By default, battle controller clear all parameter after ending turns. Setting this to true will prevent that behavior.- Returns:
-
revealHand
public boolean revealHand()Reveal hand of other player- Returns:
-
ignoreEnergyTypes
public boolean ignoreEnergyTypes()Rainbowfy energy- Returns:
-
getCode
-