Class StatusBase

java.lang.Object
com.pixelmonmod.pixelmon.battles.attacks.EffectBase
com.pixelmonmod.pixelmon.battles.status.StatusBase
Direct Known Subclasses:
AquaRing, Autotomize, BeakBlastStatus, BerryEaten, BideStatus, Charge, Commanded, Confusion, CopiedBoosts, CorrosiveGas, Cursed, DefenseCurl, DestinyBond, Disable, Electrify, Embargo, Encore, EntryHazard, FixatedStatus, Flinch, Flying, Focus, FollowMe, Foresight, FuryCutterStatus, FutureSighted, GastroAcid, GlaiveRushLock, GlobalStatusBase, Grudge, HealBlock, HealingWish, HelpingHand, Imprison, Infatuated, Ingrain, InMouth, InPursuit, LaserFocus, Leech, LockOn, LuckyChant, LunarBlessing, LunarDance, MagicCoat, MagnetRise, MatBlock, MeanLook, MeFirstStatus, Minimize, Mist, MoveOrderModifier, MultiTurn, Nightmare, NoRetreat, ObscuredStatus, Overlord, ParadoxBoost, PartialTrap, Perish, PledgeBase, Powder, PowerShift, PowerTrick, ProtectVariation, Raging, Recharge, Roosting, SafeGuard, SaltCure, Screen, ShellTrapStatus, SkyDropBase, SmackedDown, Snatch, SpeedSwapStatus, Splinters, Split, Spotlight, SpringtideStormStatus, StatusPersist, Stockpile, Submerged, Substitute, SyrupBomb, Tailwind, TarShot, Taunt, Telekinesis, ThroatChop, Torment, Transformed, UnderGround, UproarStatus, Vanish, Wish, Yawn

public abstract class StatusBase extends EffectBase
A battle status.
  • Field Details

    • type

      public StatusType type
      The type of the status.
    • battleTurnGained

      public int battleTurnGained
    • turnGained

      public int turnGained
  • Constructor Details

    • StatusBase

      public StatusBase()
    • StatusBase

      public StatusBase(StatusType type)
      Initializes the status with its type.
      Parameters:
      type - The status's type.
  • Method Details

    • applyEffect

      public void applyEffect(PixelmonWrapper user, PixelmonWrapper target)
      Description copied from class: EffectBase
      Causes various effects during the move.
      Specified by:
      applyEffect in class EffectBase
      Parameters:
      user - The move's user.
      target - The move's target.
    • onAttackUsed

      public void onAttackUsed(PixelmonWrapper user, Attack attack)
      Triggers when the Pokémon uses an attack.
      Parameters:
      user - The attack's user.
      attack - The attack.
    • stopsSwitching

      public boolean stopsSwitching()
      Determines whether the status stops switching.
      Returns:
      Whether the status stops switching.
    • stopsForcedSwitches

      public boolean stopsForcedSwitches(PixelmonWrapper cause)
      Determines whether the status prevents another Pokémon from switching them.
      Parameters:
      cause - The Pokémon triggering the switch.
      Returns:
      Whether the status stops the forced switch.
    • skipsTurn

      public boolean skipsTurn()
      Determines whether the user skips their turn due to this status. Skips all actions.
      Returns:
      Whether the turn is skipped
    • applyRepeatedEffect

      public void applyRepeatedEffect(PixelmonWrapper pw)
      Triggered at the end of every turn.
      Parameters:
      pw - The statused Pokémon.
    • onAttackEnd

      public void onAttackEnd(PixelmonWrapper pw)
      Triggered when an attack against the Pokémon finishes.
      Parameters:
      pw - The statused Pokémon.
    • canAttackThisTurn

      public boolean canAttackThisTurn(PixelmonWrapper user, Attack a)
      Determines whether the statused Pokémon can attack.
      Parameters:
      user - The statused Pokémon.
      a - The attack to be used by the Pokémon.
      Returns:
      Whether the Pokémon can attack.
    • stopsSelfStatusMove

      public boolean stopsSelfStatusMove(PixelmonWrapper user, PixelmonWrapper opponent, Attack attack)
      Determines whether the Pokémon's status stops an opponent's status move on itself.
      Parameters:
      user - The statused Pokémon.
      opponent - The attack's user.
      attack - The attack.
      Returns:
      Whether the attack is stopped.
    • onEndOfTurn

      public void onEndOfTurn(PixelmonWrapper pw)
      Occurs at the end of the Pokémon's current turn.
      Parameters:
      pw - The statused Pokémon.
    • onEndOfAttackersTurn

      public void onEndOfAttackersTurn(PixelmonWrapper statusedPokemon, PixelmonWrapper attacker)
      Affects the statuses of the Pokémon defending against this attacking Pokémon. Occurs at the end of the attacking Pokémon's current turn.
      Parameters:
      statusedPokemon - The defending Pokémon that has the status condition.
      attacker - The attacking Pokémon.
    • modifyPowerAndAccuracyUser

      public int[] modifyPowerAndAccuracyUser(int power, int accuracy, PixelmonWrapper user, PixelmonWrapper target, Attack a)
      Modifies the power and accuracy of the attack used by the statused Pokémon.
      Parameters:
      power - The attack's power.
      accuracy - The attack's accuracy.
      user - The attack's user.
      target - The attack's target.
      a - The attack.
      Returns:
      The modified power and accuracy.
    • modifyPowerAndAccuracyTarget

      public int[] modifyPowerAndAccuracyTarget(int power, int accuracy, PixelmonWrapper user, PixelmonWrapper target, Attack a)
      Modifies the power and accuracy of the attack about to hit the statused Pokémon.
      Parameters:
      power - The attack's power.
      accuracy - The attack's accuracy.
      user - The attack's user.
      target - The attack's target.
      a - The attack.
      Returns:
      The modified power and accuracy.
    • modifyMoveEffectChanceUser

      public void modifyMoveEffectChanceUser(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects)
      Allows the user's status to adjust the move's effects
      Parameters:
      user - The attacking Pokemon, with the Status.
      target - The Pokemon being attacked.
      effects - The current effects of the attack.
    • modifyMoveEffectChanceTarget

      public void modifyMoveEffectChanceTarget(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects)
      Allows the target's status to adjust the move's effects
      Parameters:
      user - The item holder and attacking Pokemon.
      target - The Pokemon being attacked.
      effects - The current effects of the attack.
    • stopsIncomingAttack

      public boolean stopsIncomingAttack(PixelmonWrapper pokemon, PixelmonWrapper user)
      Determines whether the status stops an attack about to hit the statused Pokémon.
      Parameters:
      pokemon - The statused Pokémon.
      user - The attack's user.
      Returns:
      Whether the attack is stopped.
    • stopsIncomingAttackUser

      public boolean stopsIncomingAttackUser(PixelmonWrapper pokemon, PixelmonWrapper user)
      Determines whether the status stops an attack used by the statused Pokémon.
      Parameters:
      pokemon - The statused Pokémon.
      user - The attack's user.
      Returns:
      Whether the attack is stopped.
    • stopsIncomingAttackMessage

      public void stopsIncomingAttackMessage(PixelmonWrapper pokemon, PixelmonWrapper user)
      Displays a battle message when the status stops an attack.
      Parameters:
      pokemon - The statused Pokémon.
      user - The attack's user.
    • stopsStatusChange

      public boolean stopsStatusChange(StatusType t, PixelmonWrapper target, PixelmonWrapper user)
      Determines whether the status prevents the Pokémon from obtaining other statuses.
      Parameters:
      t - The status to be afflicted
      target - The Pokémon to be afflicted.
      user - The Pokémon afflicting the status.
      Returns:
      Whether the status stops the other status from being afflicted.
    • stopsEvolution

      public boolean stopsEvolution(PixelmonWrapper pw)
      Determines whether the status prevents the Pokémon from evolving.
      Parameters:
      pw - The Pokémon with the status.
      Returns:
      Whether the status stops the pokemon from evolving.
    • onDamageReceived

      public void onDamageReceived(PixelmonWrapper userWrapper, PixelmonWrapper pokemon, Attack a, int damage, DamageTypeEnum damageType)
      Triggers when the statused Pokémon takes damage.
      Parameters:
      userWrapper - The attack's user.
      pokemon - The statused Pokémon.
      a - The attack.
      damage - The amount of damage dealt.
      damageType - The type of damage dealt.
    • modifyDamageIncludeFixed

      public int modifyDamageIncludeFixed(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a, DamageTypeEnum damageType)
      Triggers when the Pokémon takes direct damage, including fixed damage moves.
      Parameters:
      damage - The amount of damage dealt.
      user - The attack's user.
      target - The attack's target.
      a - The attack.
      Returns:
      The modified damage.
    • isTeamStatus

      public boolean isTeamStatus()
      Determines whether the status applies to the Pokémon's position in the battle.
      Returns:
      Whether the status applies to the Pokémon's position in the battle.
    • isWholeTeamStatus

      public boolean isWholeTeamStatus()
      Determines whether the status applies to the Pokémon's side of the battle.
      Returns:
      Whether the status applies to the Pokémon's side of the battle.
    • applySwitchOutEffect

      public void applySwitchOutEffect(PixelmonWrapper outgoing, PixelmonWrapper incoming)
      Triggers when the statused Pokémon switches out.
      Parameters:
      outgoing - The statused Pokémon.
      incoming - The incoming Pokémon.
    • applyEffectOnSwitch

      public void applyEffectOnSwitch(PixelmonWrapper pw)
      Triggers when the statused Pokémon switches in.
      Parameters:
      pw - The statused Pokémon.
    • applyBeforeEffect

      public void applyBeforeEffect(PixelmonWrapper victim, PixelmonWrapper opponent)
      Triggers when the Pokémon gains the status.
      Parameters:
      victim - The statused Pokémon.
      opponent - The attack's target.
    • applyEndOfBattleEffect

      public void applyEndOfBattleEffect(PixelmonWrapper pokemon)
      Triggers when the battle ends.
      Parameters:
      pokemon - The statused Pokémon.
    • getEffectiveTypes

      public List<Element> getEffectiveTypes(PixelmonWrapper user, PixelmonWrapper target)
      Returns the types that will be used in calculating the Pokémon's attack's type effectiveness.
      Parameters:
      user - The attack's user.
      target - The attack's target.
      Returns:
      The target's modified types.
    • modifyBaseStats

      public int[] modifyBaseStats(PixelmonWrapper user, int[] stats)
      Modifies the Pokémon's base stats at the beginning of a battle turn.
      Parameters:
      user - The Pokémon.
      stats - The Pokémon's stats.
      Returns:
      The modified stats.
    • modifyStats

      public int[] modifyStats(PixelmonWrapper user, int[] stats)
      Modifies the Pokémon's stats at the beginning of a battle turn.
      Parameters:
      user - The Pokémon.
      stats - The Pokémon's stats.
      Returns:
      The modified stats.
    • modifyStatsCancellable

      public int[] modifyStatsCancellable(PixelmonWrapper user, int[] stats)
      Modifies the Pokémon's stats at the beginning of a battle turn. Affected by Abilities that negate status.
      Parameters:
      user - The Pokémon.
      stats - The Pokémon's stats.
      Returns:
      The modified stats.
    • ignoreStatus

      public boolean ignoreStatus(PixelmonWrapper user, PixelmonWrapper target)
      Determines whether the status is ignored during the attack.
      Parameters:
      user - The attack's user.
      target - The attack's target.
      Returns:
      Whether the status is ignored.
    • allowsStatChange

      public boolean allowsStatChange(PixelmonWrapper pokemon, PixelmonWrapper user, StatsEffect e)
      Determines whether the status allows stats to be modified
      Parameters:
      pokemon - The statused Pokémon.
      user - The attack's user.
      e - The stat modifier.
      Returns:
      Whether the stat can be modified.
    • modifyWeight

      public float modifyWeight(float initWeight)
      Modifies the Pokémon's weight.
      Parameters:
      initWeight - The Pokémon's weight.
      Returns:
      The modified weight.
    • redirectAttack

      public boolean redirectAttack(PixelmonWrapper user, PixelmonWrapper targetAlly, Attack attack)
      Determines whether the status causes an incoming attack to be redirected.
      Parameters:
      user - The Pokémon using the attack.
      targetAlly - The Pokémon with the status.
      attack - The attack.
      Returns:
      Whether the attack is redirected to the Pokémon with the status.
    • isImmune

      public boolean isImmune(PixelmonWrapper pokemon)
      Checks if the Pokémon is immune to the status.
      Parameters:
      pokemon - The Pokémon to check.
      Returns:
      Whether the Pokémon is immune to the status.
    • copy

      public StatusBase copy()
      If necessary, makes a deep copy of the status.
      Returns:
      A deep copy of the status.
    • cantMiss

      public boolean cantMiss(PixelmonWrapper user)
      Description copied from class: EffectBase
      Determines whether a move cannot miss.
      Specified by:
      cantMiss in class EffectBase
      Parameters:
      user - The move's user.
      Returns:
      Whether the move can't miss.
    • getCureMessage

      public String getCureMessage()
      Gets the lang key for the message that is displayed when the status is cured.
      Returns:
      The lang key for the message that is displayed when the status is cured.
    • getCureMessageItem

      public String getCureMessageItem()
      Gets the lang key for the message that is displayed when the status is cured with a held item.
      Returns:
      The lang key for the message that is displayed when the status is cured with a held item.
    • getNewInstance

      public static StatusBase getNewInstance(Class<? extends StatusBase> statusClass)
      Returns a new instance of the given status class.
      Parameters:
      statusClass - The status class to make a new instance of.
      Returns:
      A new instance of the given status class.