Class Elf

All Implemented Interfaces:
DefaultRequired

public class Elf extends Champion
Represents an Elf player in the simulation. Extends the Champion class.
  • Constructor Details

    • Elf

      public Elf(String type, int level, int maxhp, int hp, int strength, int range, int luck, boolean move, boolean has_shield, boolean has_sword, int x_index, int y_index, boolean regeneration)
      Constructs an Elf object with the specified attributes.
      Parameters:
      type - the type of the Elf
      level - the level of the Elf
      maxhp - the maximum hit points of the Elf
      hp - the current hit points of the Elf
      strength - the strength of the Elf
      range - the attack range of the Elf
      luck - the luck factor of the Elf
      move - indicates if the Elf can move
      has_shield - indicates if the Elf has a shield
      has_sword - indicates if the Elf has a sword
      x_index - the x index position of the Elf
      y_index - the y index position of the Elf
      regeneration - indicates if the Elf has regeneration ability
  • Method Details

    • kill

      public static String kill(String Opponent)
      Simulates the act of killing an opponent.
      Parameters:
      Opponent - the name of the opponent being killed
      Returns:
      a string indicating that the Elf killed the opponent
    • pickUp

      public static String pickUp(String Kit)
      Simulates the act of picking up a kit.
      Parameters:
      Kit - the name of the kit being picked up
      Returns:
      a string indicating that the Elf picked up the kit