Class Move

java.lang.Object
com.mg105.entities.Move

public class Move extends Object
Move is a class which contains the combat properties and name of a specific move used by a specific character.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Move(int healthChange, int damageChange, String name, boolean isFriendly)
    Creates a Move with the given details.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the amount the current damage stat of the target would change if this move is used on them.
    int
    Returns the amount the current health of the target would change if this move is used on them.
    Returns the name of this move.
    boolean
    Returns whether this move is to be used on a character on the same team as the caster or not.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Move

      public Move(int healthChange, int damageChange, String name, boolean isFriendly)
      Creates a Move with the given details.
      Parameters:
      healthChange - the amount the targeted BattleCharacter's current health will change when the Move is used.
      damageChange - the amount the targeted BattleCharacter's damage stat will change when the Move is used.
      name - the name of the Move.
      isFriendly - boolean for if the Move is to be applied on a character on the same team as the caster.
  • Method Details

    • getHealthChange

      public int getHealthChange()
      Returns the amount the current health of the target would change if this move is used on them.
      Returns:
      the health change of this Move.
    • getDamageChange

      public int getDamageChange()
      Returns the amount the current damage stat of the target would change if this move is used on them.
      Returns:
      the damage change of this Move.
    • getName

      public String getName()
      Returns the name of this move.
      Returns:
      the name of this Move as a String.
    • isFriendly

      public boolean isFriendly()
      Returns whether this move is to be used on a character on the same team as the caster or not.
      Returns:
      whether this Move should target a BattleCharacter on the same team (true) or on the other team (false).