Package games.stendhal.server.entity.npc
Class PassiveNPC
java.lang.Object
- All Implemented Interfaces:
Killer,Cloneable,Iterable<String>,Serializable
- Direct Known Subclasses:
SilentNPC,SpeakerNPC
-
Nested Class Summary
Nested classes/interfaces inherited from class marauroa.common.game.RPObject
RPObject.ID -
Field Summary
Fields inherited from class games.stendhal.server.entity.npc.NPC
pauseDirection, pauseTurns, pauseTurnsRemaining, SOUND_RADIUSFields inherited from class games.stendhal.server.entity.RPEntity
atk, ATTR_TITLE, damageReceived, def, HIT_CHANCE_MULTIPLIER, level, lv_cap, ratk, statusAttackers, statusList, totalDamageReceivedFields inherited from class games.stendhal.server.entity.CombatEntity
enemiesThatGiveFightXP, RPCLASS_NAMEFields inherited from class games.stendhal.server.entity.GuidedEntity
baseSpeed, pathnotifierFields inherited from class marauroa.common.game.RPObject
INVALID_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCreate path for the NPC.protected voidprotected voidhandleSimpleCollision(int nx, int ny) a simple collision is from tiled collision layer or the edge of the map.booleanprotected voidonMoved(int oldX, int oldY, int newX, int newY) Notification of intra-zone position change.voidreroute()Plan a new path to the old destination.voidChanged the entity's path to walk in the opposite directionvoidsetTeleportsFlag(boolean teleports) Methods inherited from class games.stendhal.server.entity.npc.NPC
checkPause, dropItemsOn, generateRPClass, getIdea, getMovementRange, getPerceptionRange, getSounds, isAttackable, logic, maybeMakeSound, maybeMakeSound, moveRandomly, onFinishedPath, say, say, setIdea, setMovement, setMovementRange, setPathCompletedPause, setPathCompletedPause, setPerceptionRange, setRandomPathFrom, setSounds, setSoundsMethods inherited from class games.stendhal.server.entity.DressedEntity
clearColors, getColorableLayers, getOriginalOutfit, getOutfit, getOutfitColor, getOutfitColors, isNaked, put, restoreOriginalOutfit, setOutfit, setOutfit, setOutfit, setOutfit, setOutfit, setOutfit, setOutfitColor, setOutfitColor, setOutfitColor, setOutfitColors, setOutfitWithDetail, storeOriginalOutfit, unsetOutfitColorMethods inherited from class games.stendhal.server.entity.RPEntity
addAtkXP, addBaseMana, addDefXP, addKarma, addMana, addRatkXP, addStatusAttacker, addXP, applyDistanceAttackModifiers, attack, calculateRiskForCanHit, canDoRangeAttack, canHit, damage, damageDone, damageDone, delayedDamage, describe, drop, drop, drop, dropDroppableItem, dropWithItemdata, dropWithItemdata, entityAsOnlinePlayer, entityAsPet, equip, equipOrPutOnGround, equipToInventoryOnly, getAllEquipped, getAllEquippedWithItemdata, getAllStatusAttackers, getAmmunition, getArmor, getAtk, getAtkXP, getAttackingRPEntities, getAttackRate, getAttackSources, getAttackTarget, getBaseHP, getBaseMana, getBloodClass, getBoots, getCappedAtk, getCappedDef, getCappedRatk, getCloak, getCorpseDeserver, getCorpseHeight, getCorpseName, getCorpseWidth, getDamageType, getDeathSound, getDef, getDefenseItems, getDefXP, getDescriptionName, getDroppables, getEquippedItemClass, getFirstEquipped, getHarmlessCorpseName, getHelmet, getHP, getItemAtk, getItemDef, getItemRatk, getKarma, getLanguage, getLegs, getLevel, getLVCap, getMana, getMaxRangeForArcher, getMissileIfNotHoldingOtherWeapon, getName, getNumberOfEquipped, getRangedDamageType, getRangeWeapon, getRatk, getRatkXP, getRing, getShield, getSlotToEquip, getStatusList, getSusceptibility, getTitle, getTotalNumberOf, getWeapon, getWeapons, getXP, handleLifesteal, handlePortal, hasArmor, hasBoots, hasCloak, hasHelmet, hasLegs, hasLineOfSight, hasRing, hasShield, hasStatus, heal, heal, heal, incAtkXP, incDefXP, incRatkXP, initHP, isAttacked, isAttacking, isEquipped, isEquipped, isEquippedItemClass, isEquippedItemInSlot, isEquippedWithItemdata, isEquippedWithItemdata, isInvisibleToCreatures, makeCorpse, maybeDropDroppables, onAdded, onDamaged, onDead, onDead, onRejectedAttackStart, onRemoved, rememberAttacker, rewardKillerAnimals, rewardKillers, sendPrivateText, sendPrivateText, sendPrivateText, sendPrivateText, setAtk, setAtkInternal, setAtkXP, setBaseHP, setBaseMana, setBlood, setDeathSound, setDef, setDefInternal, setDefXP, setHP, setLevel, setLVCap, setMana, setName, setRatk, setRatkInternal, setRatkXP, setRatkXPInternal, setShadowStyle, setTarget, setTitle, setXP, stopAttack, stopAttacking, subXP, update, updateItemAtkDef, updateLevel, useKarma, useKarma, useKarmaMethods inherited from class games.stendhal.server.entity.CombatEntity
getsAtkXpFrom, getsDefXpFrom, recentlyDamagedByMethods inherited from class games.stendhal.server.entity.GuidedEntity
addSuspend, addSuspend, applyMovement, atMovementRadius, clearPath, followPath, getBaseSpeed, getCollisionAction, getDirectionFromOrigin, getDistanceFromOrigin, getGuide, getPath, getPathPosition, hasPath, isPathLoop, onNodeReached, onOutsideMovementRadius, removeSuspend, retracePath, setBaseSpeed, setCollisionAction, setPath, setPath, setPathAndPosition, setPathPosition, setRandomMovementRadius, setRandomMovementRadius, setRetracePath, setUsesRandomPath, stop, updateModifiedAttributes, usesRandomPathMethods inherited from class games.stendhal.server.entity.ActiveEntity
canMoveTo, canMoveTo, faceto, faceToward, getDirection, getDirectionToward, getDirectionToward, getResistance, getSpeed, getStepsTaken, handleLeaveZone, ignoresCollision, isFacingToward, isGhost, isMoveCompleted, isZoneChangeAllowed, move, setDirection, setIgnoresCollision, setSpeed, stoppedMethods inherited from class games.stendhal.server.entity.Entity
getAdjacentNodes, getArea, getArea, getCursor, getDescription, getEntitySlot, getHeight, getOrigin, getResistance, getWidth, getX, getY, getZone, hasDescription, isInSight, isObstacle, nextTo, nextTo, notifyWorldAboutChanges, setCursor, setDescription, setEntityClass, setEntitySubclass, setMenu, setPosition, setResistance, setSize, setVisibility, slotIterator, slots, squaredDistance, squaredDistanceMethods 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, 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
-
PassiveNPC
public PassiveNPC()
-
-
Method Details
-
createPath
protected void createPath()Create path for the NPC. Sub classes can implement this method. -
reversePath
public void reversePath()Changed the entity's path to walk in the opposite direction -
reroute
public void reroute()Plan a new path to the old destination.- Overrides:
reroutein classGuidedEntity
-
onMoved
protected void onMoved(int oldX, int oldY, int newX, int newY) Description copied from class:ActiveEntityNotification of intra-zone position change.- Overrides:
onMovedin classGuidedEntity- Parameters:
oldX- The old X coordinate.oldY- The old Y coordinate.newX- The new X coordinate.newY- The new Y coordinate.
-
handleObjectCollision
protected void handleObjectCollision()- Overrides:
handleObjectCollisionin classGuidedEntity
-
handleSimpleCollision
protected void handleSimpleCollision(int nx, int ny) Description copied from class:ActiveEntitya simple collision is from tiled collision layer or the edge of the map.- Overrides:
handleSimpleCollisionin classActiveEntity
-
setTeleportsFlag
public void setTeleportsFlag(boolean teleports) -
isTeleporter
public boolean isTeleporter()
-