Class BabyDragon

All Implemented Interfaces:
Killer, Cloneable, Iterable<String>, Serializable

public class BabyDragon extends Pet
A baby dragon is a domestic animal that can be owned by a player.

It eats ham or pizza from the ground.

They move much faster than sheep

Baby dragons attack animals which attack them

Author:
kymara (based on sheep by Daniel Herding)
  • Constructor Details

    • BabyDragon

      public BabyDragon()
      Creates a new wild baby dragon.
    • BabyDragon

      public BabyDragon(Player owner)
      Creates a new baby dragon that may be owned by a player.
      Parameters:
      owner - The player who should own the baby dragon
    • BabyDragon

      public BabyDragon(RPObject object, Player owner)
      Creates a Baby Dragon based on an existing pet RPObject, and assigns it to a player.
      Parameters:
      object - object containing the data for the dragon
      owner - The player who should own the baby dragon
  • Method Details

    • generateRPClass

      public static void generateRPClass()
    • getFoodNames

      protected List<String> getFoodNames()
      Specified by:
      getFoodNames in class Pet
    • canGrow

      public boolean canGrow()
      Description copied from class: Pet
      does this pet even have another form?
      Overrides:
      canGrow in class Pet
    • grow

      public void grow()
      If this pet 'canGrow' into another form it's handled here.
      Overrides:
      grow in class Pet