Atavism Version 2018.1AGIS API

atavism.agis.core
Class AgisAbility

java.lang.Object
  extended by atavism.agis.core.AgisAbility
Direct Known Subclasses:
CaptureBattleNodeAbility, CombatAbility, CombatMeleeAbility, CreateItemAbility, EffectAbility, FriendlyEffectAbility, MagicalAttackAbility, SpawnPetAbility, TeleportAbility

public class AgisAbility
extends java.lang.Object

The AgisAbility object describes an action that a mob can perform.

When an ability is triggered, a AgisAbility.State object is generated that represents the current state of that instance of the ability. It progresses through a sequence of states, dependent on the configuration of the AgisAbility object.

As each state is entered or exited, a method is called that can be overridden to create different types of abilities.


Nested Class Summary
static class AgisAbility.AbilityResult
           
static class AgisAbility.ActivationState
           
static class AgisAbility.AoeType
           
static class AgisAbility.Entry
          From what I can tell, this class is pointless. - Andrew
static class AgisAbility.TargetSpecies
           
static class AgisAbility.TargetType
           
 
Field Summary
protected  int activationCost
           
protected  long activationTime
           
protected  int activePulseCost
           
protected  long activePulseTime
           
protected  int ammoReq
           
protected  AgisAbility.AoeType aoeType
           
protected  int areaOfEffectRadius
           
 java.util.LinkedList<java.lang.Integer> attackerEffectConsumption
           
 java.util.LinkedList<java.lang.Integer> attackerEffectReqs
           
 boolean autoRotateToTarget
           
protected  java.lang.String castingAffinity
           
protected  java.lang.String castingAnim
           
protected  int channelCost
           
protected  boolean channelled
           
protected  int channelPulses
           
protected  long channelPulseTime
           
protected  java.lang.String completeAnimation
           
protected  java.lang.String completeSound
           
protected  boolean consumeReagents
           
protected  java.util.Map<java.lang.String,Cooldown> cooldownMap
           
protected  java.util.Map<AgisAbility.ActivationState,java.util.Set<CoordinatedEffect>> coordEffectMap
           
protected  java.lang.String costProp
           
protected  boolean decrementWeaponUses
           
protected  java.lang.String displayName
           
protected  java.lang.String icon
           
protected  int interceptType
           
protected  java.util.concurrent.locks.Lock lock
          AgisAbility lock
protected  int maxRange
           
protected  int minRange
           
protected  boolean persistent
           
 int position
           
protected  java.util.HashMap<java.lang.Integer,java.lang.Integer> reagentList
           
 boolean reqFacingTarget
           
protected  boolean reqTarget
           
static int RESULT_BLOCKED
           
static int RESULT_CRITICAL
           
static int RESULT_DODGED
           
static int RESULT_EVADED
           
static int RESULT_HIT
           
static int RESULT_IMMUNE
           
static int RESULT_MISSED
           
static int RESULT_PARRIED
           
protected  boolean sendSkillUpChance
           
protected  int skillType
           
protected  java.util.LinkedList<java.lang.String> specificTargets
           
protected  java.lang.String stanceReq
           
protected  boolean startCooldownsOnActivation
           
protected  boolean stationary
           
protected  java.util.LinkedList<AgisAbility.TargetSpecies> targetableSpecies
           
protected  int targetDeath
           
 java.util.LinkedList<java.lang.Integer> targetEffectConsumption
           
 java.util.LinkedList<java.lang.Integer> targetEffectReqs
           
protected  AgisAbility.TargetType targetType
           
protected  java.util.ArrayList<java.lang.Integer> toolList
           
protected  java.lang.String tooltip
           
protected  boolean useGlobalCooldown
           
protected  int vigor
           
 java.lang.String weaponReq
           
 
Constructor Summary
AgisAbility(java.lang.String name)
           
 
Method Summary
static void abortAbility(AgisAbilityState state)
           
 void addAttackerEffectConsumption(int effectReq)
           
 void addAttackerEffectReq(int effectReq)
           
 void addCooldown(Cooldown cd)
          Adds a cooldown to this ability.
 boolean addCoordEffect(AgisAbility.ActivationState state, CoordinatedEffect effect)
           
 void addReagent(java.lang.Integer reagent, java.lang.Integer count)
          Adds a reagent requirement to this ability.
 void addSpecificTarget(java.lang.String name)
           
 void addTargetableSpecies(AgisAbility.TargetSpecies species)
           
 void addTargetEffectConsumption(int effectReq)
           
 void addTargetEffectReq(int effectReq)
           
 void addTool(int tool)
          Adds a tool requirement to this ability.
 boolean autoRotateToTarget()
           
 void autoRotateToTarget(boolean autoRotateToTarget)
           
 void beginActivated(AgisAbilityState state)
           
 void beginActivation(AgisAbilityState state)
           
 void beginChannelling(AgisAbilityState state)
           
protected  void changeCoordinatedEffect(java.lang.String result)
           
 AgisAbility.AbilityResult checkAbility(CombatInfo obj, CombatInfo target)
           
protected  AgisAbility.AbilityResult checkAbility(CombatInfo obj, CombatInfo target, AgisAbility.ActivationState state)
           
protected  AgisAbility.AbilityResult checkAbilityType(CombatInfo obj, CombatInfo target)
           
protected  AgisAbility.AbilityResult checkAmmo(CombatInfo obj, CombatInfo target, AgisAbility.ActivationState state)
           
protected  AgisAbility.AbilityResult checkCost(CombatInfo obj, CombatInfo target, AgisAbility.ActivationState state)
           
protected  AgisAbility.AbilityResult checkDeath(CombatInfo obj, CombatInfo target)
           
protected  AgisAbility.AbilityResult checkEffects(CombatInfo obj, CombatInfo target, AgisAbility.ActivationState state)
           
 AgisAbility.AbilityResult checkEquip(CombatInfo obj, CombatInfo target, AgisAbility.ActivationState state)
           
protected  AgisAbility.AbilityResult checkHasAbility(CombatInfo obj, CombatInfo target)
           
protected  AgisAbility.AbilityResult checkPosition(CombatInfo obj, CombatInfo target, AgisAbility.ActivationState state, BasicWorldNode attackerNode)
           
protected  AgisAbility.AbilityResult checkRange(CombatInfo obj, CombatInfo target, BasicWorldNode casterWNode, float rangeTolerance)
           
protected  AgisAbility.AbilityResult checkReady(CombatInfo obj, CombatInfo target, BasicWorldNode casterWNode)
           
protected  AgisAbility.AbilityResult checkReagent(CombatInfo obj, CombatInfo target, AgisAbility.ActivationState state)
           
protected  AgisAbility.AbilityResult checkSpecificTarget(CombatInfo caster, CombatInfo target)
           
protected  AgisAbility.AbilityResult checkStance(CombatInfo obj, CombatInfo target, AgisAbility.ActivationState state)
           
protected  AgisAbility.AbilityResult checkState(CombatInfo obj, CombatInfo target)
           
protected  AgisAbility.AbilityResult checkTarget(CombatInfo caster, CombatInfo target)
          Checks if the caster's current target is a valid target for the ability.
protected  AgisAbility.AbilityResult checkTargetSpecies(CombatInfo caster, CombatInfo target)
           
protected  AgisAbility.AbilityResult checkTool(CombatInfo obj, CombatInfo target, AgisAbility.ActivationState state)
           
protected  AgisAbility.AbilityResult checkVigor(CombatInfo obj, CombatInfo target, AgisAbility.ActivationState state)
           
 void completeActivation(AgisAbilityState state)
          Runs when the ability is completed.
 void completeChannelling(AgisAbilityState state)
           
 void endActivated(AgisAbilityState state)
           
 boolean equals(java.lang.Object other)
          Returns if two objects are the same - tested by comparing the ability name.
protected  AgisAbilityState generateState(CombatInfo source, CombatInfo target, AgisItem item, Point loc)
           
 int getAbilityType()
           
 int getActivationCost()
          Returns the stat cost for successfully activating the ability.
 long getActivationTime()
          Returns the time the ability takes to activate.
 int getActiveCost()
          Returns the stat cost charged for each pulse of the active phase.
 int getActivePulseCost()
           
 long getActivePulseTime()
          Returns the time in ms for each pulse of the active phase.
 int getAmmoReq()
           
 java.util.ArrayList<CombatInfo> getAoETargets(CombatInfo caster, CombatInfo targetInfo, Point loc)
          Should this be merged up into the function above?
 AgisAbility.AoeType getAoEType()
           
 int getAreaOfEffectRadius()
          If the areaOfEffectRadius is greater than zero the system will check for all possible targets in the region and try apply the effects to them.
 java.util.LinkedList<java.lang.Integer> GetAttackerEffectConsumption()
           
 java.util.LinkedList<java.lang.Integer> GetAttackerEffectReqs()
           
 int getBaseExpThreshold()
          -Experience system component - Not currently used Returns the default max experience that will be needed before the ability gains a level.
 java.lang.String getCastingAffinity()
          The casting Anim is for abilities that have a cast, it determines which animation should be used.
 java.lang.String getCastingAnim()
          The casting Anim is for abilities that have a cast, it determines which animation should be used.
 int getChannelCost()
          Returns the stat cost charged for each channelling pulse.
 boolean getChannelled()
           
 int getChannelPulses()
          Returns the number of pulses during the channelled phase.
 long getChannelPulseTime()
          Returns the time in ms for each pulse of a channelled ability.
 java.lang.String getCompleteAnimation()
           
 java.lang.String getCompleteSound()
           
 boolean getConsumeReagents()
           
 java.util.Map<java.lang.String,Cooldown> getCooldownMap()
           
 java.util.Collection<CoordinatedEffect> getCoordEffects(AgisAbility.ActivationState state)
           
 java.lang.String getCostProperty()
          Returns the name of the property that stat costs are deducted from.
 boolean getDecrementWeaponUses()
           
 java.lang.String getDisplayName()
           
 int getDuelID()
           
 int getExperiencePerUse()
          -Experience system component - Not currently used Returns the amount of experience should be gained by successful use of this ability.
 java.lang.String getIcon()
          Returns the icon name for this ability.
 int getID()
           
 int getInterceptType()
           
 LevelingMap getLevelingMap()
           
 int getMaxRange()
          Returns the maximum range in metres for this ability.
 int getMaxRank()
          -Experience system component - Not currently used Returns the max rank that an ability may achieve.
 int getMinRange()
          Returns the minimum range in mm for this ability.
 java.lang.String getName()
          Returns the name of the ability.
 boolean getPersistent()
           
 int getPositional()
           
 java.util.List<CombatInfo> getPotentialTargets(AgisAbilityState state)
          This method gets the list of combat info objects we should lock.
 java.util.HashMap<java.lang.Integer,java.lang.Integer> getReagentList()
           
 boolean getReqFacingTarget()
           
 boolean getReqTarget()
          Returns whether a target is required for this ability to activate
 AgisSkill getRequiredSkill()
           
 int getRequiredSkillLevel()
           
 AgisEffect getResultVal(java.lang.String result, boolean caster)
           
 int getSkillType()
           
 java.lang.String getSlashCommand()
           
 java.util.LinkedList<java.lang.String> getSpecificTargets()
          Returns the list of acceptable specific targets for this ability.
 java.lang.String getStance()
          Returns the vigor amount added or required for the ability.
 boolean getStationary()
           
 java.util.LinkedList<AgisAbility.TargetSpecies> getTargetableSpecies()
          Returns the list of acceptable specific targets for this ability.
 int getTargetDeath()
          Returns the target type for this ability.
 java.util.LinkedList<java.lang.Integer> GetTargetEffectConsumption()
           
 java.util.LinkedList<java.lang.Integer> GetTargetEffectReqs()
           
 AgisAbility.TargetType getTargetType()
          Returns the target type for this ability.
 java.util.ArrayList<java.lang.Integer> getToolList()
           
 java.lang.String getTooltip()
           
 boolean getUseGlobalCooldown()
           
 int getVigor()
          Returns the vigor amount added or required for the ability.
 java.lang.String getWeaponReq()
           
 int hashCode()
          Returns a hash of the ability name
 void interrupt(AgisAbilityState state)
           
static void interruptAbility(AgisAbilityState state, AgisAbility.AbilityResult reason)
           
 boolean isInstant()
          Returns if the ability has 0 activation time.
 void pulseActivated(AgisAbilityState state)
           
 void pulseChannelling(AgisAbilityState state)
           
 void removeCooldown(java.lang.String id)
          Removes a cooldown from this ability.
 boolean removeCoordEffect(AgisAbility.ActivationState state, CoordinatedEffect effect)
           
 void setAbilityType(int abilityType)
           
 void setActivationCost(int cost)
          Sets the stat cost for successfully activating the ability.
 void setActivationTime(long time)
          Sets the time the ability takes to activate.
 void setActiveCost(int cost)
          Sets the stat cost charged for each pulse of the active phase.
 void setActivePulseCost(int cost)
           
 void setActivePulseTime(long time)
          Set the time in ms for each pulse of the active phase.
 void setAmmoReq(int ammoReq)
           
 void setAoETypeType(AgisAbility.AoeType type)
           
 void setAreaOfEffectRadius(int radius)
           
 void setBaseExpThreshold(int max)
          -Experience system component - Not currently used Sets the default max experience that will be needed before the ability gains a level.
 void setCastingAffinity(java.lang.String affinity)
           
 void setCastingAnim(java.lang.String anim)
           
 void setChannelCost(int cost)
          Sets the stat cost charged for each channelling pulse.
 void setChannelled(boolean val)
           
 void setChannelPulses(int pulses)
          Sets the number of pulses during the channelled phase.
 void setChannelPulseTime(long time)
          Sets the time in ms for each pulse of a channelled ability.
 void setCompleteAnimation(java.lang.String anim)
           
 void setCompleteSound(java.lang.String sound)
           
 void setConsumeReagents(boolean consume)
           
 void setCooldownMap(java.util.Map<java.lang.String,Cooldown> cooldownMap)
           
 void setCostProperty(java.lang.String name)
          Sets the name of the property that stat costs are deducted from.
 void setDecrementWeaponUses(boolean decrement)
           
 void setDisplayName(java.lang.String displayName)
           
 void setDuelID(int duelID)
           
 void setExperiencePerUse(int xp)
          -Experience system component - Not currently used Sets the amount of experience should be gained by successful use of this ability.
 void setIcon(java.lang.String icon)
          Sets the icon name for this ability.
 void setID(int id)
           
 void setInterceptType(int interceptType)
           
 void setLevelingMap(LevelingMap lm)
           
 void setMaxRange(int range)
          Sets the maximum range in metres for this ability.
 void setMaxRank(int rank)
          -Experience system component - Not currently used Sets the max rank that an ability may achieve.
 void setMinRange(int range)
          Sets the minimum range in mm for this ability.
 void setName(java.lang.String name)
          Sets the name of the ability.
 void setPersistent(boolean val)
           
 void setPositional(int positional)
           
 void setReagentList(java.util.HashMap<java.lang.Integer,java.lang.Integer> reagentList)
           
 void setReqFacingTarget(boolean reqFacingTarget)
           
 void setReqTarget(boolean req)
          Sets whether a target is required for this ability to activate
 void setRequiredSkill(AgisSkill skill, int level)
           
 void setSkillType(int skillType)
           
 void setSlashCommand(java.lang.String slashCommand)
          exposes a way for the client to execute ability with a slash command
 void setSpecificTargets(java.util.LinkedList<java.lang.String> targets)
          Sets the list of acceptable specific targets for this ability.
 void setStance(java.lang.String stance)
          Sets the amount of vigor to be added or required to activate the ability
 void setStationary(boolean val)
           
 void setTargetableSpecies(java.util.LinkedList<AgisAbility.TargetSpecies> targets)
          Sets the list of acceptable specific targets for this ability.
 void setTargetDeath(int type)
          Sets the target type for this ability.
 void setTargetType(AgisAbility.TargetType type)
          Sets the target type for this ability.
 void setToolList(java.util.ArrayList<java.lang.Integer> toolList)
           
 void setTooltip(java.lang.String tooltip)
           
 void setUseGlobalCooldown(boolean val)
           
 void setVigor(int value)
          Sets the amount of vigor to be added or required to activate the ability
 void setWeaponReq(java.lang.String weaponType)
           
static void startAbility(AgisAbility ability, CombatInfo source, CombatInfo target, AgisItem item)
           
static void startAbility(AgisAbility ability, CombatInfo source, CombatInfo target, AgisItem item, Point loc)
           
 boolean startCooldownsOnActivation()
           
 void startCooldownsOnActivation(boolean startCooldowns)
           
 java.lang.String toString()
          Returns the string describing this ability, useful for logging.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

lock

protected transient java.util.concurrent.locks.Lock lock
AgisAbility lock


skillType

protected int skillType

activationTime

protected long activationTime

activationCost

protected int activationCost

costProp

protected java.lang.String costProp

channelPulseTime

protected long channelPulseTime

channelPulses

protected int channelPulses

channelCost

protected int channelCost

activePulseTime

protected long activePulseTime

activePulseCost

protected int activePulseCost

icon

protected java.lang.String icon

displayName

protected java.lang.String displayName

tooltip

protected java.lang.String tooltip

interceptType

protected int interceptType

minRange

protected int minRange

maxRange

protected int maxRange

areaOfEffectRadius

protected int areaOfEffectRadius

aoeType

protected AgisAbility.AoeType aoeType

reqFacingTarget

public boolean reqFacingTarget

autoRotateToTarget

public boolean autoRotateToTarget

position

public int position

cooldownMap

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

startCooldownsOnActivation

protected boolean startCooldownsOnActivation

weaponReq

public java.lang.String weaponReq

decrementWeaponUses

protected boolean decrementWeaponUses

reagentList

protected java.util.HashMap<java.lang.Integer,java.lang.Integer> reagentList

consumeReagents

protected boolean consumeReagents

toolList

protected java.util.ArrayList<java.lang.Integer> toolList

ammoReq

protected int ammoReq

vigor

protected int vigor

stanceReq

protected java.lang.String stanceReq

castingAnim

protected java.lang.String castingAnim

castingAffinity

protected java.lang.String castingAffinity

reqTarget

protected boolean reqTarget

targetType

protected AgisAbility.TargetType targetType

specificTargets

protected java.util.LinkedList<java.lang.String> specificTargets

targetableSpecies

protected java.util.LinkedList<AgisAbility.TargetSpecies> targetableSpecies

targetDeath

protected int targetDeath

attackerEffectReqs

public java.util.LinkedList<java.lang.Integer> attackerEffectReqs

targetEffectReqs

public java.util.LinkedList<java.lang.Integer> targetEffectReqs

attackerEffectConsumption

public java.util.LinkedList<java.lang.Integer> attackerEffectConsumption

targetEffectConsumption

public java.util.LinkedList<java.lang.Integer> targetEffectConsumption

useGlobalCooldown

protected boolean useGlobalCooldown

stationary

protected boolean stationary

channelled

protected boolean channelled

persistent

protected boolean persistent

coordEffectMap

protected java.util.Map<AgisAbility.ActivationState,java.util.Set<CoordinatedEffect>> coordEffectMap

completeAnimation

protected java.lang.String completeAnimation

completeSound

protected java.lang.String completeSound

sendSkillUpChance

protected boolean sendSkillUpChance

RESULT_HIT

public static final int RESULT_HIT
See Also:
Constant Field Values

RESULT_CRITICAL

public static final int RESULT_CRITICAL
See Also:
Constant Field Values

RESULT_MISSED

public static final int RESULT_MISSED
See Also:
Constant Field Values

RESULT_PARRIED

public static final int RESULT_PARRIED
See Also:
Constant Field Values

RESULT_DODGED

public static final int RESULT_DODGED
See Also:
Constant Field Values

RESULT_BLOCKED

public static final int RESULT_BLOCKED
See Also:
Constant Field Values

RESULT_EVADED

public static final int RESULT_EVADED
See Also:
Constant Field Values

RESULT_IMMUNE

public static final int RESULT_IMMUNE
See Also:
Constant Field Values
Constructor Detail

AgisAbility

public AgisAbility(java.lang.String name)
Method Detail

toString

public java.lang.String toString()
Returns the string describing this ability, useful for logging.

Overrides:
toString in class java.lang.Object
Returns:
string describing ability

equals

public boolean equals(java.lang.Object other)
Returns if two objects are the same - tested by comparing the ability name. null objects are never equal to any other object including other null objects.

Overrides:
equals in class java.lang.Object
Returns:
true if abilities match

hashCode

public int hashCode()
Returns a hash of the ability name

Overrides:
hashCode in class java.lang.Object
Returns:
hash value of the object's ability name

setName

public void setName(java.lang.String name)
Sets the name of the ability. This is used to identify the ability, so it should be unique.

Parameters:
name - name for this ability.

getName

public java.lang.String getName()
Returns the name of the ability.

Returns:
name for this ability.

setID

public void setID(int id)

getID

public int getID()

setSkillType

public void setSkillType(int skillType)

getSkillType

public int getSkillType()

setAbilityType

public void setAbilityType(int abilityType)

getAbilityType

public int getAbilityType()

setDuelID

public void setDuelID(int duelID)

getDuelID

public int getDuelID()

getActivationTime

public long getActivationTime()
Returns the time the ability takes to activate.

Returns:
time in ms to activate the ability.

setActivationTime

public void setActivationTime(long time)
Sets the time the ability takes to activate.

Parameters:
time - time in ms that the ability takes to activate.

isInstant

public boolean isInstant()
Returns if the ability has 0 activation time.

Returns:
true if activate time is 0.

getActivationCost

public int getActivationCost()
Returns the stat cost for successfully activating the ability.

Returns:
stat cost for activating the ability.

setActivationCost

public void setActivationCost(int cost)
Sets the stat cost for successfully activating the ability.

Parameters:
cost - stat cost for activating the ability.

getCostProperty

public java.lang.String getCostProperty()
Returns the name of the property that stat costs are deducted from.

Returns:
name of the property that stat costs are deducted from.

setCostProperty

public void setCostProperty(java.lang.String name)
Sets the name of the property that stat costs are deducted from.

Parameters:
name - name of the property that stat costs are deducted from.

getChannelPulseTime

public long getChannelPulseTime()
Returns the time in ms for each pulse of a channelled ability.

Returns:
time in ms for each pulse of a channelled ability.

setChannelPulseTime

public void setChannelPulseTime(long time)
Sets the time in ms for each pulse of a channelled ability.

Parameters:
time - time in ms for each pulse of a channelled ability.

getChannelPulses

public int getChannelPulses()
Returns the number of pulses during the channelled phase.

Returns:
number of pulses during the channelled phase for the ability.

setChannelPulses

public void setChannelPulses(int pulses)
Sets the number of pulses during the channelled phase.

Parameters:
pulses - number of pulses during the channelled phase for the ability.

getChannelCost

public int getChannelCost()
Returns the stat cost charged for each channelling pulse.

Returns:
stat cost charged for each channelling pulse.

setChannelCost

public void setChannelCost(int cost)
Sets the stat cost charged for each channelling pulse.

Parameters:
cost - stat cost charged for each channelling pulse.

getActivePulseTime

public long getActivePulseTime()
Returns the time in ms for each pulse of the active phase.

Returns:
time in ms for each pulse of the active phase.

setActivePulseTime

public void setActivePulseTime(long time)
Set the time in ms for each pulse of the active phase.

Parameters:
time - time in ms for each pulse of the active phase.

getActiveCost

public int getActiveCost()
Returns the stat cost charged for each pulse of the active phase.

Returns:
stat cost charged for each pulse of the active phase.

getActivePulseCost

public int getActivePulseCost()

setActiveCost

public void setActiveCost(int cost)
Sets the stat cost charged for each pulse of the active phase.

Parameters:
cost - stat cost charged for each pulse of hte active phase.

setActivePulseCost

public void setActivePulseCost(int cost)

getIcon

public java.lang.String getIcon()
Returns the icon name for this ability.

Returns:
icon name for this ability.

setIcon

public void setIcon(java.lang.String icon)
Sets the icon name for this ability.

Parameters:
icon - icon name for this ability.

getDisplayName

public java.lang.String getDisplayName()

setDisplayName

public void setDisplayName(java.lang.String displayName)

getTooltip

public java.lang.String getTooltip()

setTooltip

public void setTooltip(java.lang.String tooltip)

getInterceptType

public int getInterceptType()

setInterceptType

public void setInterceptType(int interceptType)

getMinRange

public int getMinRange()
Returns the minimum range in mm for this ability.

Returns:
minimum range in mm for this ability.

setMinRange

public void setMinRange(int range)
Sets the minimum range in mm for this ability.

Parameters:
range - minimum range in mm for this ability.

getMaxRange

public int getMaxRange()
Returns the maximum range in metres for this ability.

Returns:
maximum range in metres for this ability.

setMaxRange

public void setMaxRange(int range)
Sets the maximum range in metres for this ability.

Parameters:
range - Maximum range in metres for this ability.

getAreaOfEffectRadius

public int getAreaOfEffectRadius()
If the areaOfEffectRadius is greater than zero the system will check for all possible targets in the region and try apply the effects to them.

Returns:

setAreaOfEffectRadius

public void setAreaOfEffectRadius(int radius)

getAoEType

public AgisAbility.AoeType getAoEType()

setAoETypeType

public void setAoETypeType(AgisAbility.AoeType type)

getReqFacingTarget

public boolean getReqFacingTarget()

setReqFacingTarget

public void setReqFacingTarget(boolean reqFacingTarget)

autoRotateToTarget

public boolean autoRotateToTarget()

autoRotateToTarget

public void autoRotateToTarget(boolean autoRotateToTarget)

setPositional

public void setPositional(int positional)

getPositional

public int getPositional()

addCooldown

public void addCooldown(Cooldown cd)
Adds a cooldown to this ability. If any of the ability's cooldowns are activate on the mob attempting to activate the ability, it will not be able to activate.

Parameters:
cd - Cooldown to add to this ability.

removeCooldown

public void removeCooldown(java.lang.String id)
Removes a cooldown from this ability.

Parameters:
id - id of the cooldown to remove.

getCooldownMap

public java.util.Map<java.lang.String,Cooldown> getCooldownMap()

setCooldownMap

public void setCooldownMap(java.util.Map<java.lang.String,Cooldown> cooldownMap)

startCooldownsOnActivation

public boolean startCooldownsOnActivation()

startCooldownsOnActivation

public void startCooldownsOnActivation(boolean startCooldowns)

setWeaponReq

public void setWeaponReq(java.lang.String weaponType)

getWeaponReq

public java.lang.String getWeaponReq()

getDecrementWeaponUses

public boolean getDecrementWeaponUses()

setDecrementWeaponUses

public void setDecrementWeaponUses(boolean decrement)

addReagent

public void addReagent(java.lang.Integer reagent,
                       java.lang.Integer count)
Adds a reagent requirement to this ability. Reagents are items that are required to be present in inventory, and are consumed when the ability completes the ACTIVATING phase.

Parameters:
reagent - name of the template the reagent was created from.

getReagentList

public java.util.HashMap<java.lang.Integer,java.lang.Integer> getReagentList()

setReagentList

public void setReagentList(java.util.HashMap<java.lang.Integer,java.lang.Integer> reagentList)

getConsumeReagents

public boolean getConsumeReagents()

setConsumeReagents

public void setConsumeReagents(boolean consume)

addTool

public void addTool(int tool)
Adds a tool requirement to this ability. Tools are items that are required to be present in inventory. They are not consumed.

Parameters:
tool - name of the template the tool was created from.

getToolList

public java.util.ArrayList<java.lang.Integer> getToolList()

setToolList

public void setToolList(java.util.ArrayList<java.lang.Integer> toolList)

getAmmoReq

public int getAmmoReq()

setAmmoReq

public void setAmmoReq(int ammoReq)

getVigor

public int getVigor()
Returns the vigor amount added or required for the ability.

Returns:
vigor amount.

setVigor

public void setVigor(int value)
Sets the amount of vigor to be added or required to activate the ability

Parameters:
value - the amount of vigor to be added or subtracted

getStance

public java.lang.String getStance()
Returns the vigor amount added or required for the ability.

Returns:
vigor amount.

setStance

public void setStance(java.lang.String stance)
Sets the amount of vigor to be added or required to activate the ability

Parameters:
value - the amount of vigor to be added or subtracted

getCastingAnim

public java.lang.String getCastingAnim()
The casting Anim is for abilities that have a cast, it determines which animation should be used.


setCastingAnim

public void setCastingAnim(java.lang.String anim)

getCastingAffinity

public java.lang.String getCastingAffinity()
The casting Anim is for abilities that have a cast, it determines which animation should be used.


setCastingAffinity

public void setCastingAffinity(java.lang.String affinity)

getReqTarget

public boolean getReqTarget()
Returns whether a target is required for this ability to activate

Returns:
target type for this ability.

setReqTarget

public void setReqTarget(boolean req)
Sets whether a target is required for this ability to activate

Parameters:
type - target type for this ability.

getTargetType

public AgisAbility.TargetType getTargetType()
Returns the target type for this ability.

Returns:
target type for this ability.

setTargetType

public void setTargetType(AgisAbility.TargetType type)
Sets the target type for this ability.

Parameters:
type - target type for this ability.

getSpecificTargets

public java.util.LinkedList<java.lang.String> getSpecificTargets()
Returns the list of acceptable specific targets for this ability.

Returns:
a list of specific targets for this ability.

setSpecificTargets

public void setSpecificTargets(java.util.LinkedList<java.lang.String> targets)
Sets the list of acceptable specific targets for this ability.

Parameters:
targets: - a list of acceptable specific targets.

addSpecificTarget

public void addSpecificTarget(java.lang.String name)

getTargetableSpecies

public java.util.LinkedList<AgisAbility.TargetSpecies> getTargetableSpecies()
Returns the list of acceptable specific targets for this ability.

Returns:
a list of specific targets for this ability.

setTargetableSpecies

public void setTargetableSpecies(java.util.LinkedList<AgisAbility.TargetSpecies> targets)
Sets the list of acceptable specific targets for this ability.

Parameters:
targets: - a list of acceptable specific targets.

addTargetableSpecies

public void addTargetableSpecies(AgisAbility.TargetSpecies species)

getTargetDeath

public int getTargetDeath()
Returns the target type for this ability.

Returns:
target type for this ability.

setTargetDeath

public void setTargetDeath(int type)
Sets the target type for this ability.

Parameters:
type - target type for this ability.

addAttackerEffectReq

public void addAttackerEffectReq(int effectReq)

GetAttackerEffectReqs

public java.util.LinkedList<java.lang.Integer> GetAttackerEffectReqs()

addTargetEffectReq

public void addTargetEffectReq(int effectReq)

GetTargetEffectReqs

public java.util.LinkedList<java.lang.Integer> GetTargetEffectReqs()

addAttackerEffectConsumption

public void addAttackerEffectConsumption(int effectReq)

GetAttackerEffectConsumption

public java.util.LinkedList<java.lang.Integer> GetAttackerEffectConsumption()

addTargetEffectConsumption

public void addTargetEffectConsumption(int effectReq)

GetTargetEffectConsumption

public java.util.LinkedList<java.lang.Integer> GetTargetEffectConsumption()

getUseGlobalCooldown

public boolean getUseGlobalCooldown()

setUseGlobalCooldown

public void setUseGlobalCooldown(boolean val)

getStationary

public boolean getStationary()

setStationary

public void setStationary(boolean val)

getChannelled

public boolean getChannelled()

setChannelled

public void setChannelled(boolean val)

getPersistent

public boolean getPersistent()

setPersistent

public void setPersistent(boolean val)

addCoordEffect

public boolean addCoordEffect(AgisAbility.ActivationState state,
                              CoordinatedEffect effect)

removeCoordEffect

public boolean removeCoordEffect(AgisAbility.ActivationState state,
                                 CoordinatedEffect effect)

getCoordEffects

public java.util.Collection<CoordinatedEffect> getCoordEffects(AgisAbility.ActivationState state)

changeCoordinatedEffect

protected void changeCoordinatedEffect(java.lang.String result)

getCompleteAnimation

public java.lang.String getCompleteAnimation()

setCompleteAnimation

public void setCompleteAnimation(java.lang.String anim)

getCompleteSound

public java.lang.String getCompleteSound()

setCompleteSound

public void setCompleteSound(java.lang.String sound)

getPotentialTargets

public java.util.List<CombatInfo> getPotentialTargets(AgisAbilityState state)
This method gets the list of combat info objects we should lock. The determination of this list must not lock any of the objects.

Parameters:
state -
Returns:

getAoETargets

public java.util.ArrayList<CombatInfo> getAoETargets(CombatInfo caster,
                                                     CombatInfo targetInfo,
                                                     Point loc)
Should this be merged up into the function above?

Parameters:
caster -
loc -
Returns:

beginActivation

public void beginActivation(AgisAbilityState state)

completeActivation

public void completeActivation(AgisAbilityState state)
Runs when the ability is completed.

Parameters:
state -

beginChannelling

public void beginChannelling(AgisAbilityState state)

pulseChannelling

public void pulseChannelling(AgisAbilityState state)

completeChannelling

public void completeChannelling(AgisAbilityState state)

beginActivated

public void beginActivated(AgisAbilityState state)

pulseActivated

public void pulseActivated(AgisAbilityState state)

endActivated

public void endActivated(AgisAbilityState state)

interrupt

public void interrupt(AgisAbilityState state)

setSlashCommand

public void setSlashCommand(java.lang.String slashCommand)
exposes a way for the client to execute ability with a slash command


getSlashCommand

public java.lang.String getSlashCommand()

setRequiredSkill

public void setRequiredSkill(AgisSkill skill,
                             int level)

getRequiredSkill

public AgisSkill getRequiredSkill()

getRequiredSkillLevel

public int getRequiredSkillLevel()

checkTarget

protected AgisAbility.AbilityResult checkTarget(CombatInfo caster,
                                                CombatInfo target)
Checks if the caster's current target is a valid target for the ability.

Parameters:
caster -
target -
Returns:
AbilityResult.SUCCESS if it is a valid target otherwise AbilityResult.INVALID_TARGET

checkTargetSpecies

protected AgisAbility.AbilityResult checkTargetSpecies(CombatInfo caster,
                                                       CombatInfo target)

checkSpecificTarget

protected AgisAbility.AbilityResult checkSpecificTarget(CombatInfo caster,
                                                        CombatInfo target)

checkState

protected AgisAbility.AbilityResult checkState(CombatInfo obj,
                                               CombatInfo target)

checkHasAbility

protected AgisAbility.AbilityResult checkHasAbility(CombatInfo obj,
                                                    CombatInfo target)

checkAbilityType

protected AgisAbility.AbilityResult checkAbilityType(CombatInfo obj,
                                                     CombatInfo target)

checkDeath

protected AgisAbility.AbilityResult checkDeath(CombatInfo obj,
                                               CombatInfo target)

checkRange

protected AgisAbility.AbilityResult checkRange(CombatInfo obj,
                                               CombatInfo target,
                                               BasicWorldNode casterWNode,
                                               float rangeTolerance)

checkReady

protected AgisAbility.AbilityResult checkReady(CombatInfo obj,
                                               CombatInfo target,
                                               BasicWorldNode casterWNode)

checkCost

protected AgisAbility.AbilityResult checkCost(CombatInfo obj,
                                              CombatInfo target,
                                              AgisAbility.ActivationState state)

checkVigor

protected AgisAbility.AbilityResult checkVigor(CombatInfo obj,
                                               CombatInfo target,
                                               AgisAbility.ActivationState state)

checkEffects

protected AgisAbility.AbilityResult checkEffects(CombatInfo obj,
                                                 CombatInfo target,
                                                 AgisAbility.ActivationState state)

checkStance

protected AgisAbility.AbilityResult checkStance(CombatInfo obj,
                                                CombatInfo target,
                                                AgisAbility.ActivationState state)

checkPosition

protected AgisAbility.AbilityResult checkPosition(CombatInfo obj,
                                                  CombatInfo target,
                                                  AgisAbility.ActivationState state,
                                                  BasicWorldNode attackerNode)

checkEquip

public AgisAbility.AbilityResult checkEquip(CombatInfo obj,
                                            CombatInfo target,
                                            AgisAbility.ActivationState state)

checkReagent

protected AgisAbility.AbilityResult checkReagent(CombatInfo obj,
                                                 CombatInfo target,
                                                 AgisAbility.ActivationState state)

checkTool

protected AgisAbility.AbilityResult checkTool(CombatInfo obj,
                                              CombatInfo target,
                                              AgisAbility.ActivationState state)

checkAmmo

protected AgisAbility.AbilityResult checkAmmo(CombatInfo obj,
                                              CombatInfo target,
                                              AgisAbility.ActivationState state)

checkAbility

public AgisAbility.AbilityResult checkAbility(CombatInfo obj,
                                              CombatInfo target)

checkAbility

protected AgisAbility.AbilityResult checkAbility(CombatInfo obj,
                                                 CombatInfo target,
                                                 AgisAbility.ActivationState state)

generateState

protected AgisAbilityState generateState(CombatInfo source,
                                         CombatInfo target,
                                         AgisItem item,
                                         Point loc)

startAbility

public static void startAbility(AgisAbility ability,
                                CombatInfo source,
                                CombatInfo target,
                                AgisItem item)

startAbility

public static void startAbility(AgisAbility ability,
                                CombatInfo source,
                                CombatInfo target,
                                AgisItem item,
                                Point loc)

abortAbility

public static void abortAbility(AgisAbilityState state)

interruptAbility

public static void interruptAbility(AgisAbilityState state,
                                    AgisAbility.AbilityResult reason)

getResultVal

public AgisEffect getResultVal(java.lang.String result,
                               boolean caster)

getExperiencePerUse

public int getExperiencePerUse()
-Experience system component - Not currently used Returns the amount of experience should be gained by successful use of this ability.


setExperiencePerUse

public void setExperiencePerUse(int xp)
-Experience system component - Not currently used Sets the amount of experience should be gained by successful use of this ability.


setLevelingMap

public void setLevelingMap(LevelingMap lm)

getLevelingMap

public LevelingMap getLevelingMap()

getBaseExpThreshold

public int getBaseExpThreshold()
-Experience system component - Not currently used Returns the default max experience that will be needed before the ability gains a level.


setBaseExpThreshold

public void setBaseExpThreshold(int max)
-Experience system component - Not currently used Sets the default max experience that will be needed before the ability gains a level.


getMaxRank

public int getMaxRank()
-Experience system component - Not currently used Returns the max rank that an ability may achieve.


setMaxRank

public void setMaxRank(int rank)
-Experience system component - Not currently used Sets the max rank that an ability may achieve.



Copyright © 2018 Dragonsan Studios Sp. z o.o.