Version 1.5APIs subject to change!

multiverse.mars.objects
Class CombatInfo

java.lang.Object
  extended by multiverse.server.objects.NamedPropertyClass
      extended by multiverse.server.objects.Entity
          extended by multiverse.mars.objects.CombatInfo
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable, Cooldown.CooldownObject

public class CombatInfo
extends Entity
implements java.lang.Runnable, Cooldown.CooldownObject

Information related to the combat system. Any object that wants to be involved in combat needs one of these.

See Also:
Serialized Form

Field Summary
protected  java.util.ArrayList<java.lang.String> abilities
           
protected  java.util.Set<MarsAbility.State> activeAbilities
           
static java.lang.String COMBAT_PROP_ATTACKABLE
           
static java.lang.String COMBAT_PROP_AUTOATTACK_ABILITY
           
static java.lang.String COMBAT_PROP_BACKREF_KEY
           
static java.lang.String COMBAT_PROP_COMBATSTATE
           
static java.lang.String COMBAT_PROP_DEADSTATE
           
static java.lang.String COMBAT_PROP_ENERGY
           
static java.lang.String COMBAT_PROP_HEALTH
           
protected static java.lang.String COMBAT_PROP_MOBFLAG
           
static java.lang.String COMBAT_PROP_REGEN_EFFECT
           
protected static java.lang.String COMBAT_PROP_USERFLAG
           
protected  java.util.Map<java.lang.String,Cooldown.State> cooldownMap
           
protected  MarsAbility.State currentAction
           
protected  java.util.Set<MarsEffect.EffectState> effects
           
protected  long groupMemberOid
           
protected  long groupOid
           
protected  boolean pendingGroupInvite
           
protected  java.util.ArrayList<java.lang.String> skills
           
protected  java.lang.Long target
           
 
Fields inherited from class multiverse.server.objects.Entity
log, staticLock, subObjectNamespacesInt, transientPropertyKeys, type
 
Fields inherited from class multiverse.server.objects.NamedPropertyClass
lock, name
 
Constructor Summary
CombatInfo()
           
CombatInfo(java.lang.Long objOid)
           
 
Method Summary
 void addAbility(java.lang.String abilityName)
           
 void addActiveAbility(MarsAbility.State abilityState)
           
 void addCooldownState(Cooldown.State state)
           
 void addEffect(MarsEffect.EffectState effectState)
           
 void addSkill(java.lang.String skillName)
           
 boolean attackable()
           
protected  void cancel()
           
 boolean dead()
           
 java.util.ArrayList<java.lang.String> getAbilities()
           
 long getAttackDelay()
           
 java.lang.Long getAutoAttackTarget()
           
 Cooldown.State getCooldownState(java.lang.String id)
           
 MarsAbility.State getCurrentAction()
           
 java.util.Set<MarsEffect.EffectState> getEffects()
           
 long getGroupMemberOid()
           
 long getGroupOid()
           
 java.lang.Long getOwnerOid()
           
 java.util.ArrayList<java.lang.String> getSkills()
           
 ObjectType getType()
          Entity object type.
 InterpolatedWorldNode getWorldNode()
           
 boolean isGrouped()
           
 boolean isMob()
           
 boolean isPendingGroupInvite()
           
 boolean isUser()
           
 void removeAbility(java.lang.String abilityName)
           
 void removeActiveAbility(MarsAbility.State abilityState)
           
 void removeCooldownState(Cooldown.State state)
           
 void removeEffect(MarsEffect.EffectState effectState)
           
 void removeSkill(java.lang.String skillName)
           
 void run()
           
protected  void schedule(long delay)
           
 void sendStatusUpdate()
           
 void setAbilities(java.util.ArrayList<java.lang.String> abilities)
           
 void setAutoAttack(java.lang.Long newTarget)
           
 void setCombatState(boolean state)
           
 void setCurrentAction(MarsAbility.State action)
           
 void setDeadState(boolean state)
           
 void setEffects(java.util.Set<MarsEffect.EffectState> effects)
           
 void setGroupMemberOid(long groupMemberOid)
           
 void setGroupOid(long groupOid)
           
 void setPendingGroupInvite(boolean flag)
           
 void setSkills(java.util.ArrayList<java.lang.String> skills)
           
 void setWorldNode(InterpolatedWorldNode node)
           
 void statAddModifier(java.lang.String statName, java.lang.Object id, int delta)
           
 int statGetCurrentValue(java.lang.String statName)
           
 void statModifyBaseValue(java.lang.String statName, int delta)
           
 void statRemoveModifier(java.lang.String statName, java.lang.Object id)
           
 void statSendUpdate(boolean sendAll)
           
 void statSendUpdate(boolean sendAll, java.lang.Long targetOid)
           
 void statSetBaseValue(java.lang.String statName, int value)
           
 void stopAutoAttack()
           
 java.lang.String toString()
          Returns the string describing this entity, useful for logging.
 
Methods inherited from class multiverse.server.objects.Entity
equals, equals, getAllEntitiesByNamespace, getEntityByNamespace, getEntityCount, getLock, getNamespace, getOid, getPersistenceFlag, getProperty, getSubObjectNamespaces, getSubObjectNamespacesInt, getTransientDataRef, hashCode, isDeleted, registerEntityByNamespace, registerTransientPropertyKey, removeEntityByNamespace, removeEntityByNamespace, setDeleted, setNamespace, setOid, setPersistenceFlag, setProperty, setSubObjectNamespaces, setSubObjectNamespacesInt, setType, toBytes, unregisterTransientPropertyKey
 
Methods inherited from class multiverse.server.objects.NamedPropertyClass
getBooleanProperty, getIntProperty, getName, getPropertyMap, getPropertyMapRef, getStringProperty, lock, modifyIntProperty, setName, setPropertyMap, setupTransient, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface multiverse.mars.core.Cooldown.CooldownObject
getOid
 

Field Detail

target

protected java.lang.Long target

cooldownMap

protected java.util.Map<java.lang.String,Cooldown.State> cooldownMap

currentAction

protected transient MarsAbility.State currentAction

activeAbilities

protected transient java.util.Set<MarsAbility.State> activeAbilities

abilities

protected java.util.ArrayList<java.lang.String> abilities

effects

protected java.util.Set<MarsEffect.EffectState> effects

skills

protected java.util.ArrayList<java.lang.String> skills

groupOid

protected transient long groupOid

groupMemberOid

protected transient long groupMemberOid

pendingGroupInvite

protected transient boolean pendingGroupInvite

COMBAT_PROP_BACKREF_KEY

public static final java.lang.String COMBAT_PROP_BACKREF_KEY
See Also:
Constant Field Values

COMBAT_PROP_USERFLAG

protected static final java.lang.String COMBAT_PROP_USERFLAG
See Also:
Constant Field Values

COMBAT_PROP_MOBFLAG

protected static final java.lang.String COMBAT_PROP_MOBFLAG
See Also:
Constant Field Values

COMBAT_PROP_AUTOATTACK_ABILITY

public static final java.lang.String COMBAT_PROP_AUTOATTACK_ABILITY
See Also:
Constant Field Values

COMBAT_PROP_REGEN_EFFECT

public static final java.lang.String COMBAT_PROP_REGEN_EFFECT
See Also:
Constant Field Values

COMBAT_PROP_ENERGY

public static final java.lang.String COMBAT_PROP_ENERGY
See Also:
Constant Field Values

COMBAT_PROP_HEALTH

public static final java.lang.String COMBAT_PROP_HEALTH
See Also:
Constant Field Values

COMBAT_PROP_COMBATSTATE

public static final java.lang.String COMBAT_PROP_COMBATSTATE
See Also:
Constant Field Values

COMBAT_PROP_DEADSTATE

public static final java.lang.String COMBAT_PROP_DEADSTATE
See Also:
Constant Field Values

COMBAT_PROP_ATTACKABLE

public static final java.lang.String COMBAT_PROP_ATTACKABLE
See Also:
Constant Field Values
Constructor Detail

CombatInfo

public CombatInfo()

CombatInfo

public CombatInfo(java.lang.Long objOid)
Method Detail

toString

public java.lang.String toString()
Description copied from class: Entity
Returns the string describing this entity, useful for logging.

Overrides:
toString in class Entity
Returns:
string describing entity

getType

public ObjectType getType()
Description copied from class: Entity
Entity object type.

Overrides:
getType in class Entity
Returns:
ObjectTypes.unknown if no object type has been set.

setAutoAttack

public void setAutoAttack(java.lang.Long newTarget)

stopAutoAttack

public void stopAutoAttack()

getAutoAttackTarget

public java.lang.Long getAutoAttackTarget()

getAttackDelay

public long getAttackDelay()

schedule

protected void schedule(long delay)

cancel

protected void cancel()

run

public void run()
Specified by:
run in interface java.lang.Runnable

addCooldownState

public void addCooldownState(Cooldown.State state)
Specified by:
addCooldownState in interface Cooldown.CooldownObject

removeCooldownState

public void removeCooldownState(Cooldown.State state)
Specified by:
removeCooldownState in interface Cooldown.CooldownObject

getCooldownState

public Cooldown.State getCooldownState(java.lang.String id)
Specified by:
getCooldownState in interface Cooldown.CooldownObject

setCurrentAction

public void setCurrentAction(MarsAbility.State action)

getCurrentAction

public MarsAbility.State getCurrentAction()

addActiveAbility

public void addActiveAbility(MarsAbility.State abilityState)

removeActiveAbility

public void removeActiveAbility(MarsAbility.State abilityState)

addAbility

public void addAbility(java.lang.String abilityName)

removeAbility

public void removeAbility(java.lang.String abilityName)

getAbilities

public java.util.ArrayList<java.lang.String> getAbilities()

setAbilities

public void setAbilities(java.util.ArrayList<java.lang.String> abilities)

addEffect

public void addEffect(MarsEffect.EffectState effectState)

removeEffect

public void removeEffect(MarsEffect.EffectState effectState)

getEffects

public java.util.Set<MarsEffect.EffectState> getEffects()

setEffects

public void setEffects(java.util.Set<MarsEffect.EffectState> effects)

isUser

public boolean isUser()

isMob

public boolean isMob()

attackable

public boolean attackable()

dead

public boolean dead()

getOwnerOid

public java.lang.Long getOwnerOid()

setCombatState

public void setCombatState(boolean state)

setDeadState

public void setDeadState(boolean state)

sendStatusUpdate

public void sendStatusUpdate()

getWorldNode

public InterpolatedWorldNode getWorldNode()

setWorldNode

public void setWorldNode(InterpolatedWorldNode node)

statModifyBaseValue

public void statModifyBaseValue(java.lang.String statName,
                                int delta)

statSetBaseValue

public void statSetBaseValue(java.lang.String statName,
                             int value)

statAddModifier

public void statAddModifier(java.lang.String statName,
                            java.lang.Object id,
                            int delta)

statRemoveModifier

public void statRemoveModifier(java.lang.String statName,
                               java.lang.Object id)

statGetCurrentValue

public int statGetCurrentValue(java.lang.String statName)

statSendUpdate

public void statSendUpdate(boolean sendAll)

statSendUpdate

public void statSendUpdate(boolean sendAll,
                           java.lang.Long targetOid)

getSkills

public java.util.ArrayList<java.lang.String> getSkills()

addSkill

public void addSkill(java.lang.String skillName)

removeSkill

public void removeSkill(java.lang.String skillName)

setSkills

public void setSkills(java.util.ArrayList<java.lang.String> skills)

setGroupOid

public void setGroupOid(long groupOid)

getGroupOid

public long getGroupOid()

setGroupMemberOid

public void setGroupMemberOid(long groupMemberOid)

getGroupMemberOid

public long getGroupMemberOid()

isGrouped

public boolean isGrouped()

setPendingGroupInvite

public void setPendingGroupInvite(boolean flag)

isPendingGroupInvite

public boolean isPendingGroupInvite()


Copyright © 2008 The Multiverse Network, Inc.