Class MylingSpawner
java.lang.Object
marauroa.common.game.Attributes
marauroa.common.game.SlotOwner
marauroa.common.game.RPObject
games.stendhal.server.entity.Entity
games.stendhal.server.maps.quests.a_grandfathers_wish.MylingSpawner
- All Implemented Interfaces:
TurnListener,Killer,Cloneable,Iterable<String>,Serializable
Custom spawner so Creature is not attackable.
-
Nested Class Summary
Nested classes/interfaces inherited from class marauroa.common.game.RPObject
RPObject.ID -
Field Summary
Fields inherited from class marauroa.common.game.RPObject
INVALID_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieved the currently active Niall instance.booleanChecks if there are currently any mylings spawned in world.booleanChecks if a Niall instance created by curing myling is currently active.voidonMylingCured(Player player) Handles creating Niall instance when myling is cured.voidHandles removing myling from world & restarting spawn timer.voidonTurnReached(int currentTurn) This method is called when the turn number is reached.voidRemoves any active spawned mylings from world.voidrespawn()Adds a new myling to world.voidStarts turn notifier to spawn a new myling.Methods inherited from class games.stendhal.server.entity.Entity
describe, generateRPClass, getAdjacentNodes, getArea, getArea, getCursor, getDescription, getDescriptionName, getEntitySlot, getHeight, getName, getOrigin, getResistance, getResistance, getTitle, getWidth, getX, getY, getZone, hasDescription, isInSight, isObstacle, nextTo, nextTo, notifyWorldAboutChanges, onAdded, onMoved, onRemoved, setCursor, setDescription, setEntityClass, setEntitySubclass, setMenu, setPosition, setResistance, setSize, setVisibility, slotIterator, slots, squaredDistance, squaredDistance, stopped, updateMethods inherited from class marauroa.common.game.RPObject
addEvent, addLink, addLink, addMap, addSlot, addSlot, applyDifferences, clearEvents, clearVisible, clone, containsKey, equals, events, eventsIterator, fill, get, getBaseContainer, getBoolean, getContainer, getContainerBaseOwner, getContainerOwner, getContainerSlot, getDifferences, getDouble, getFromSlots, getID, getInt, getLink, getLinkedObject, getMap, getSlot, has, hashCode, hasLink, hasMap, hasSlot, hide, isContained, isEmpty, isHidden, isStorable, maps, put, put, put, put, readObject, remove, removeLink, removeMap, removeSlot, resetAddedAndDeleted, resetAddedAndDeletedMaps, resetAddedAndDeletedRPLink, resetAddedAndDeletedRPSlot, setAddedMaps, setAddedRPSlot, setContainer, setDeletedMaps, setDeletedRPSlot, setID, size, slots, slotsIterator, store, toString, unhide, unstore, writeObject, writeObject, writeToJsonMethods inherited from class marauroa.common.game.SlotOwner
deserializeRPSlots, fill, serializeRPSlotsMethods inherited from class marauroa.common.game.Attributes
add, applyDifferences, get, getBool, getDouble, getInt, getList, getLong, getRPClass, has, instanceOf, iterator, put, put, put, put, put, readFromMap, remove, resetAddedAndDeletedAttributes, setAddedAttributes, setDeletedAttributes, setRPClass, setRPClass, toAttributeStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
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:TurnListenerThis method is called when the turn number is reached.- Specified by:
onTurnReachedin interfaceTurnListener- 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
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
Retrieved the currently active Niall instance.- Returns:
SpeakerNPCNiall instance.
-