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

public class MylingSpawner extends Entity implements TurnListener
Custom spawner so Creature is not attackable.
  • Constructor Details

    • MylingSpawner

      public MylingSpawner()
  • Method Details

    • respawn

      public void respawn()
      Adds a new myling to world.
    • onTurnReached

      public void onTurnReached(int currentTurn)
      Description copied from interface: TurnListener
      This method is called when the turn number is reached.
      Specified by:
      onTurnReached in interface TurnListener
      Parameters:
      currentTurn - current turn number
    • startSpawnTimer

      public void startSpawnTimer()
      Starts turn notifier to spawn a new myling.
    • onMylingRemoved

      public void onMylingRemoved()
      Handles removing myling from world & restarting spawn timer.
    • onMylingCured

      public void onMylingCured(Player player)
      Handles creating Niall instance when myling is cured.
    • mylingIsActive

      public boolean mylingIsActive()
      Checks if there are currently any mylings spawned in world.
    • niallIsActive

      public boolean niallIsActive()
      Checks if a Niall instance created by curing myling is currently active.
    • removeActiveMylings

      public void removeActiveMylings()
      Removes any active spawned mylings from world.
    • getActiveNiall

      public SpeakerNPC getActiveNiall()
      Retrieved the currently active Niall instance.
      Returns:
      SpeakerNPC Niall instance.