Class MoveResults
java.lang.Object
com.pixelmonmod.pixelmon.battles.controller.log.MoveResults
Records the results of a move.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AttackResultThe 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.protected List<SingleInstanceMoveResult> A list ofSingleInstanceMoveResultobjects.protected floatThe priority of the move.protected Set<PixelmonWrapper> An unordered set of all the Pixelmon that were targeted with this move.protected intThe total damage that a move dealt, which will be the sum of damage from multiple targets or strikes of a move.protected intThe total damage that a move could have dealt across multiple targets or strikes if the targets had infinite HP.protected intEvery move has a Base Power.protected floatThe chance that a move will be used. -
Constructor Summary
ConstructorsConstructorDescriptionMoveResults(PixelmonWrapper target, float priority) Initializes a move's results.MoveResults(List<PixelmonWrapper> targets, float priority) Initializes a move's results. -
Method Summary
Modifier and TypeMethodDescriptionfloatintintintfloatvoidsetAttackResult(AttackResult attackResult) voidsetMoveResultsList(List<SingleInstanceMoveResult> moveResultsList) voidsetPriority(float priority) voidsetTargetList(Set<PixelmonWrapper> targetList) voidsetTotalDamage(int totalDamage) voidsetTotalPotentialDamage(int totalPotentialDamage) voidsetTotalPower(int totalBasePower) voidsetWeightMod(float weightMod) toString()voidupdateMoveResultsDamageFromPartialResult(SingleInstanceMoveResult singleInstanceMoveResult)
-
Field Details
-
moveResultsList
A list ofSingleInstanceMoveResultobjects. 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
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 inmoveResultsList. -
totalPower
protected int totalPowerEvery 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 priorityThe priority of the move. Defaults to 0. -
totalDamage
protected int totalDamageThe 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 totalPotentialDamageThe 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 weightModThe chance that a move will be used. Only used by the AI when calculating which move to use. -
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
Initializes a move's results.Creates a
SingleInstanceMoveResultfor each target of the attack and adds it to themoveResultsList. Adds all the intended targets to thetargetList.- 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
Initializes a move's results.- Parameters:
target- The target of the move.priority- The priority of the move.
-
-
Method Details
-
toString
-
updateMoveResultsDamageFromPartialResult
public void updateMoveResultsDamageFromPartialResult(SingleInstanceMoveResult singleInstanceMoveResult) - Parameters:
singleInstanceMoveResult- The partial move result to update from.
-
getMoveResultsList
-
setMoveResultsList
-
getTargetList
-
setTargetList
-
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
-
setAttackResult
-