org.starhope.appius.game.npc
Class Projectile

java.lang.Object
  extended by org.starhope.appius.user.GeneralUser
      extended by org.starhope.appius.game.npc.Ejecta
          extended by org.starhope.appius.game.npc.Projectile
All Implemented Interfaces:
Serializable, Comparable<Object>, RoomListener, Collidable, HasVariables, AbstractUser, DataRecordBacked<UserRecord>

public class Projectile
extends Ejecta

WRITEME: Document this type.

Author:
brpocock@star-hope.org
See Also:
Serialized Form

Nested Class Summary
private static class Projectile.ProjectileWatcher
           
 
Field Summary
private  AbstractUser attacker
          WRITEME: Document this brpocock@star-hope.org
private  DamageHitHandler hitEffect
          WRITEME brpocock@star-hope.org
private  DamageMissHandler missEffect
          WRITEME
private  DamageTypeRanks myDamage
          WRITEME
private  AvatarClass myHitParticle
          WRITEME: Document this brpocock@star-hope.org
private  AvatarClass myMissParticle
          WRITEME: Document this brpocock@star-hope.org
private  AbstractUser myShooter
          Who fired this shot
private  Projectile.ProjectileWatcher myWatcher
          WRITEME: Document this brpocock@star-hope.org
private static long serialVersionUID
          Java serialisation unique ID
private  Coord3D startLocation
          WRITEME: Document this brpocock@star-hope.org
 
Fields inherited from class org.starhope.appius.user.GeneralUser
baseStats, collisionBounds, currentRoom, facing, lastUserMovement, pathFinder, userRecord
 
Constructor Summary
Projectile(AvatarClass avatar, Room room, Coord3D origin, long birth, Coord3D target, double travelRate, AbstractUser shooter, AvatarClass hitParticle, AvatarClass missParticle, DamageTypeRanks damage)
          Specify the avatar file to be provided to the client, and the point of origination, and motion vector.
 
Method Summary
static Projectile fire(AvatarClass avatar, Coord3D target, double travelRate, AbstractUser shooter, AvatarClass hitParticle, AvatarClass missParticle, DamageTypeRanks damage)
          Specify the avatar file to be provided to the client, and the shooter, and motion vector.
 AbstractUser getAttacker()
           
 DamageHitHandler getHitEffect()
           
 AvatarClass getHitParticle()
           
 DamageMissHandler getMissEffect()
           
 AvatarClass getMissParticle()
           
 AbstractUser getShooter()
           
 Coord3D getStartLocation()
           
 Projectile.ProjectileWatcher getWatcher()
           
 void hit(AbstractUser victim)
           
 void miss()
          WRITEME: Document this method brpocock@star-hope.org
 void setAttacker(AbstractUser attacker)
           
 void setHitEffect(DamageHitHandler newHitEffect)
           
 void setMissEffect(DamageMissHandler newMissEffect)
           
 
Methods inherited from class org.starhope.appius.game.npc.Ejecta
acceptErrorReply, acceptGameAction, acceptGameStateChange, acceptMessage, acceptObjectJoinRoom, acceptObjectPartRoom, acceptOutOfBandMessage, acceptPrivateMessage, acceptPublicMessage, acceptPublicMessage, acceptSuccessReply, acceptUserVariableUpdate, addBuddy, addGiftSubscription, addItem, assertLocationUnlocked, assertStaffLevel, attend, ban, canTalk, destroy, doffClothes, doTransport, equals, finalize, getAge, getAgeGroup, getApprovedDateString, getAvatarClass, getAvatarLabel, getBaseColor, getBuddyListNames, getCurrentAction, getDebugName, getDialect, getDisplayName, getExtraColor, getFacing, getInventory, getIPAddress, getKickedByUserID, getKickedMessage, getKickedReasonCode, getKickedUntil, getLag, getLanguage, getLocation, getLocationForUpdate, getMail, getMoney, getNameApprovedAt, getNameRequestedAt, getPublicInfo, getRegisteredDateString, getResponsibleMail, getRoom, getRoomNumber, getServerThread, getStaffLevel, getStartT, getTarget, getTravelRate, getTravelStart, getUserID, getUserVariables, getVariable, getWallet, getZone, hashCode, hasStaffLevel, hasVariable, ignore, isBanned, isCanceled, isKicked, isNPC, isOnline, isPaidMember, kick, liftBan, needsParent, removeBuddy, reportedToModeratorBy, reportedToModeratorBy, sendEarnings, sendMigrate, sendOops, sendResponse, sendWardrobe, setAgeGroupToSystem, setBaseColor, setCanTalk, setCurrentAction, setExtraColor, setFacing, setLastActive, setLocation, setMail, setParent, setRoom, setStartT, setTarget, setTravelRate, setTravelStart, setVariable, speak, toJSON, toSFSXML, toString, unlockLocation
 
Methods inherited from class org.starhope.appius.user.GeneralUser
acceptUserAction, canApproveSelf, canBetaTest, canEnterChatZone, canEnterMenuZone, changeBaseDefenses, compareTo, deleteVariable, getBaseDefenses, getBaseStat, getCenterOfMass, getCollisionBounds, getD, getEffectiveDefenses, getEndMovementTime, getGameEquipItems_JSON, getGameEquipItems, getHeight, getHouse, getItemsByType, getItemsByType, getItemsByTypeAsArray, getMass, getPathFinder, getRegisteredAt, getRegisteredDate, getRequestedName, getSizeScalar, getStartMovementTime, getStat, getUserListIterator, getUserName, getVariables, getVariablesJSON, getVelocity, handleWalkFail, isActive, isApproved, local_publicInfo, purchase, resetVariables, sendBuddyList, setBackingRecord, setCenterOfMass, setVariable, setVariables, setVelocity, takeAttack, updateWallet
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Java serialisation unique ID

See Also:
Constant Field Values

hitEffect

private DamageHitHandler hitEffect
WRITEME brpocock@star-hope.org


missEffect

private DamageMissHandler missEffect
WRITEME


myShooter

private final AbstractUser myShooter
Who fired this shot


myHitParticle

private final AvatarClass myHitParticle
WRITEME: Document this brpocock@star-hope.org


myMissParticle

private final AvatarClass myMissParticle
WRITEME: Document this brpocock@star-hope.org


myWatcher

private final Projectile.ProjectileWatcher myWatcher
WRITEME: Document this brpocock@star-hope.org


attacker

private AbstractUser attacker
WRITEME: Document this brpocock@star-hope.org


startLocation

private final Coord3D startLocation
WRITEME: Document this brpocock@star-hope.org


myDamage

private final DamageTypeRanks myDamage
WRITEME

Constructor Detail

Projectile

public Projectile(AvatarClass avatar,
                  Room room,
                  Coord3D origin,
                  long birth,
                  Coord3D target,
                  double travelRate,
                  AbstractUser shooter,
                  AvatarClass hitParticle,
                  AvatarClass missParticle,
                  DamageTypeRanks damage)
Specify the avatar file to be provided to the client, and the point of origination, and motion vector.

Parameters:
avatar - The avatar file to be provided to the client
room - The room in which the Ejecta is born
origin - The point of origin
birth - The time of origination
target - The destination of motion
travelRate - The rate of travel
shooter - person firing the shot
hitParticle - particle to play on hit
missParticle - particle to play on miss
damage - the type of damage to use for determining hits
Method Detail

fire

public static Projectile fire(AvatarClass avatar,
                              Coord3D target,
                              double travelRate,
                              AbstractUser shooter,
                              AvatarClass hitParticle,
                              AvatarClass missParticle,
                              DamageTypeRanks damage)
Specify the avatar file to be provided to the client, and the shooter, and motion vector. The particle will start at the shooter's periphery in the direction of the shot's travel, now.

Parameters:
avatar - The avatar file to be provided to the client
target - The destination of motion
travelRate - The rate of travel
shooter - person firing the shot
hitParticle - particle to play on hit
missParticle - particle to play on miss
Returns:
the projectile

getAttacker

public AbstractUser getAttacker()
Returns:
the attacker

getHitEffect

public DamageHitHandler getHitEffect()
Returns:
the hitEffect

getHitParticle

public AvatarClass getHitParticle()
Returns:
the myHitParticle

getMissEffect

public DamageMissHandler getMissEffect()
Returns:
the missEffect

getMissParticle

public AvatarClass getMissParticle()
Returns:
the myMissParticle

getShooter

public AbstractUser getShooter()
Returns:
who fired this shot

getStartLocation

public Coord3D getStartLocation()
Returns:
the origin coördinates

getWatcher

public Projectile.ProjectileWatcher getWatcher()
Returns:
the myWatcher

hit

public void hit(AbstractUser victim)
Parameters:
victim - WRITEME

miss

public void miss()
WRITEME: Document this method brpocock@star-hope.org


setAttacker

public void setAttacker(AbstractUser attacker)
Parameters:
attacker - the attacker to set

setHitEffect

public void setHitEffect(DamageHitHandler newHitEffect)
Parameters:
newHitEffect - the hitEffect to set

setMissEffect

public void setMissEffect(DamageMissHandler newMissEffect)
Parameters:
newMissEffect - the missEffect to set