java.lang.Object
com.pixelmonmod.pixelmon.battles.controller.log.MoveResults

public class MoveResults extends Object
Records the results of a move.
  • Field Details

    • moveResultsList

      protected List<SingleInstanceMoveResult> moveResultsList
      A list of SingleInstanceMoveResult objects. Should never be empty. Will contain only one object for single-target single-strike moves. Each additional target per strike of a move should add an object to this list.
    • targetList

      protected Set<PixelmonWrapper> targetList
      An unordered set of all the Pixelmon that were targeted with this move. These are the Pixelmon that are initially targeted, not the Pixelmon that are finally hit, and thus the Pixelmon in this set may be different from combination of all targets in moveResultsList.
    • totalPower

      protected int totalPower
      Every move has a Base Power. This combines the base power of all strikes of a move to get the total power from one use of the move.
    • priority

      protected float priority
      The priority of the move. Defaults to 0.
    • totalDamage

      protected int totalDamage
      The total damage that a move dealt, which will be the sum of damage from multiple targets or strikes of a move. Defaults to 0.
    • totalPotentialDamage

      protected int totalPotentialDamage
      The total damage that a move could have dealt across multiple targets or strikes if the targets had infinite HP. Defaults to 0.
    • weightMod

      protected float weightMod
      The chance that a move will be used. Only used by the AI when calculating which move to use.
    • attackResult

      protected AttackResult attackResult
      The result of the overall move, which may be different from individual hits in a multi-strike move, or different from the individual hits from a multi-target move. Defaults to AttackResult.proceed.
  • Constructor Details

    • MoveResults

      public MoveResults(List<PixelmonWrapper> targets, float priority)
      Initializes a move's results.

      Creates a SingleInstanceMoveResult for each target of the attack and adds it to the moveResultsList. Adds all the intended targets to the targetList.

      Parameters:
      targets - All the intended targets of an attack.
      priority - Value between -6 and +6 representing if the move goes faster than other moves.
    • MoveResults

      public MoveResults(PixelmonWrapper target, float priority)
      Initializes a move's results.
      Parameters:
      target - The target of the move.
      priority - The priority of the move.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • updateMoveResultsDamageFromPartialResult

      public void updateMoveResultsDamageFromPartialResult(SingleInstanceMoveResult singleInstanceMoveResult)
      Updates only totalDamage and totalPotentialDamage from a SingleInstanceMoveResult's similar values.
      Parameters:
      singleInstanceMoveResult - The partial move result to update from.
    • getMoveResultsList

      public List<SingleInstanceMoveResult> getMoveResultsList()
    • setMoveResultsList

      public void setMoveResultsList(List<SingleInstanceMoveResult> moveResultsList)
    • getTargetList

      public Set<PixelmonWrapper> getTargetList()
    • setTargetList

      public void setTargetList(Set<PixelmonWrapper> targetList)
    • getTotalPower

      public int getTotalPower()
    • setTotalPower

      public void setTotalPower(int totalBasePower)
    • getPriority

      public float getPriority()
    • setPriority

      public void setPriority(float priority)
    • getTotalDamage

      public int getTotalDamage()
    • setTotalDamage

      public void setTotalDamage(int totalDamage)
    • getTotalPotentialDamage

      public int getTotalPotentialDamage()
    • setTotalPotentialDamage

      public void setTotalPotentialDamage(int totalPotentialDamage)
    • getWeightMod

      public float getWeightMod()
    • setWeightMod

      public void setWeightMod(float weightMod)
    • getAttackResult

      public AttackResult getAttackResult()
    • setAttackResult

      public void setAttackResult(AttackResult attackResult)