Atavism Version 2018.1AGIS API

atavism.agis.core
Class AgisEffect

java.lang.Object
  extended by atavism.agis.core.AgisEffect
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AlterSkillCurrentEffect, BuildObjectEffect, CooldownEffect, CreateClaimEffect, CreateItemEffect, CreateItemFromLootEffect, DamageEffect, DamageMitigationEffect, DespawnEffect, DispelEffect, FactionEffect, HealEffect, HealInstantEffect, HealOverTimeEffect, HealthStealDotEffect, HealthStealEffect, HealthTransferEffect, ImmuneEffect, LockpickEffect, MagicalDotEffect, MagicalStrikeEffect, MeleeStrikeEffect, MorphEffect, MountEffect, ParryEffect, PhysicalDotEffect, PropertyEffect, RegenEffect, ResultEffect, ReviveEffect, SendExtensionMessageEffect, SetRespawnLocationEffect, SleepEffect, SmooWeaponDamageEffect, SpawnEffect, StateEffect, StatEffect, StunEffect, TameEffect, TaskCompleteEffect, TeachAbilityEffect, TeachSkillEffect, TeleportEffect, ThreatEffect

public class AgisEffect
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Nested Class Summary
static class AgisEffect.EffectState
           
 
Field Summary
protected  int bonusEffect
           
protected  int bonusEffectReq
           
protected  boolean bonusEffectReqConsumed
           
protected  float chance
           
protected  java.lang.String damageType
           
protected  long duration
           
 int effectSkillType
           
protected  boolean isBuff
           
 boolean multipleCopies
          Variables for effect stacking
protected  int numPulses
           
protected  boolean removeBonusWhenEffectRemoved
           
 boolean replacable
           
protected  float skillDurationMod
           
protected  java.util.List<java.lang.Float> skillEffectMod
           
 int stackLimit
           
 
Constructor Summary
AgisEffect()
           
AgisEffect(int id, java.lang.String name)
           
 
Method Summary
 void activate(AgisEffect.EffectState state)
          Used for passive effects to activate the "effects" of the effect
 void apply(AgisEffect.EffectState state)
           
static AgisEffect.EffectState applyEffect(AgisEffect effect, CombatInfo source, CombatInfo target, int abilityID)
           
static AgisEffect.EffectState applyEffect(AgisEffect effect, CombatInfo source, CombatInfo target, int abilityID, java.util.Map params)
           
static AgisEffect.EffectState applyEffect(AgisEffect effect, CombatInfo source, CombatInfo target, int abilityID, java.util.Map params, AgisItem item)
           
static AgisEffect.EffectState applyEffect(AgisEffect effect, CombatInfo source, CombatInfo target, java.util.Map params, int abilityID, AgisItem item)
           
static AgisEffect.EffectState applyPassiveEffect(AgisEffect effect, CombatInfo source, CombatInfo target, int abilityID, java.util.Map params)
           
 void canApplyToImmine(boolean canApply)
           
 boolean canApplyToImmune()
           
protected  int checkDamageMitigation(AgisEffect.EffectState state, int damageAmount)
           
protected  boolean checkDuelDefeat(CombatInfo target, CombatInfo caster, java.lang.String damageProperty)
           
 void deactivate(AgisEffect.EffectState state)
          Used for passive effects to deactive the "effects" of the effect
 boolean equals(java.lang.Object other)
           
protected  AgisEffect.EffectState generateState(CombatInfo source, CombatInfo target, java.util.Map params)
           
protected  AgisEffect.EffectState generateState(CombatInfo source, CombatInfo target, java.util.Map params, int abilityID)
           
protected  AgisEffect.EffectState generateState(CombatInfo source, CombatInfo target, java.util.Map params, int abilityID, AgisItem item)
           
 int getBonusEffect()
           
 int getBonusEffectReq()
           
 boolean getBonusEffectReqConsumed()
           
 float getChance()
           
 java.lang.String getDamageType()
           
 int getDuelEffect()
           
 long getDuration()
           
 int getEffectSkillType()
           
 java.lang.String getIcon()
           
 int getID()
           
 java.lang.String getName()
           
 int getNumPulses()
           
 long getPulseTime()
           
 float getSkillDurationMod()
           
 java.util.List<java.lang.Float> getSkillEffectMod()
           
 int getStackLimit()
           
 java.util.LinkedList<AgisEffect.EffectState> getTargetEffectsOfMatchingType(CombatInfo target)
           
 int hashCode()
           
 boolean isBuff()
           
 void isBuff(boolean isBuff)
           
 boolean isContinuous()
           
 void isContinuous(boolean b)
           
 boolean isPassive()
           
 void isPassive(boolean b)
           
 boolean isPeriodic()
           
 void isPeriodic(boolean b)
           
 boolean isPersistent()
           
 void isPersistent(boolean b)
           
 void pulse(AgisEffect.EffectState state)
           
 void remove(AgisEffect.EffectState state)
           
 boolean removeBonusWhenEffectRemoved()
           
 void removeBonusWhenEffectRemoved(boolean removeBonus)
           
static void removeEffect(AgisEffect.EffectState state)
           
static void removeEffect(AgisEffect.EffectState state, CombatInfo target)
           
static boolean removeEffectByID(CombatInfo target, int effectID)
          Finds an effect on the target that matches the ID passed in
static void removeNonContinuousEffects(CombatInfo target, boolean resume)
          Used when a player logs in to ensure all old non-continuous effects are removed.
static void removeNonPassiveEffects(CombatInfo target)
          Used when a target dies in to ensure all old non-passive effects are removed.
 void setBonusEffect(int bonusEffect)
           
 void setBonusEffectReq(int effectNum)
           
 void setBonusEffectReqConsumed(boolean consumed)
           
 void setChance(float chance)
           
 void setDamageType(java.lang.String type)
           
 void setDuelEffect(int duelID)
           
 void setDuration(long dur)
           
 void setEffectSkillType(int type)
           
 void setIcon(java.lang.String icon)
           
 void setID(int id)
          the name is used to refer to the effect, so use a unique name
 void setMultipleCopies(boolean multipleCopies)
           
 void setName(java.lang.String name)
          the name is used to refer to the effect, so use a unique name
 void setNumPulses(int num)
           
 void setReplacable(boolean replacable)
           
 void setSkillDurationMod(float mod)
           
 void setSkillEffectMod(float mod)
           
 void setStackLimit(int stackLimit)
           
 int stackCheck()
          This function checks to see what stacking behaviour this effect has, and returns an existing EffectState if there is one to be over-written.
 java.lang.String toString()
           
 void unload(AgisEffect.EffectState state, CombatInfo target)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

multipleCopies

public boolean multipleCopies
Variables for effect stacking


replacable

public boolean replacable

stackLimit

public int stackLimit

damageType

protected java.lang.String damageType

effectSkillType

public int effectSkillType

skillEffectMod

protected java.util.List<java.lang.Float> skillEffectMod

skillDurationMod

protected float skillDurationMod

duration

protected long duration

numPulses

protected int numPulses

bonusEffectReq

protected int bonusEffectReq

bonusEffectReqConsumed

protected boolean bonusEffectReqConsumed

bonusEffect

protected int bonusEffect

removeBonusWhenEffectRemoved

protected boolean removeBonusWhenEffectRemoved

isBuff

protected boolean isBuff

chance

protected float chance
Constructor Detail

AgisEffect

public AgisEffect()

AgisEffect

public AgisEffect(int id,
                  java.lang.String name)
Method Detail

getStackLimit

public int getStackLimit()

setStackLimit

public void setStackLimit(int stackLimit)

setMultipleCopies

public void setMultipleCopies(boolean multipleCopies)

setReplacable

public void setReplacable(boolean replacable)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

setID

public void setID(int id)
the name is used to refer to the effect, so use a unique name


getID

public int getID()

setName

public void setName(java.lang.String name)
the name is used to refer to the effect, so use a unique name


getName

public java.lang.String getName()

apply

public void apply(AgisEffect.EffectState state)

unload

public void unload(AgisEffect.EffectState state,
                   CombatInfo target)

remove

public void remove(AgisEffect.EffectState state)

pulse

public void pulse(AgisEffect.EffectState state)

activate

public void activate(AgisEffect.EffectState state)
Used for passive effects to activate the "effects" of the effect


deactivate

public void deactivate(AgisEffect.EffectState state)
Used for passive effects to deactive the "effects" of the effect


stackCheck

public int stackCheck()
This function checks to see what stacking behaviour this effect has, and returns an existing EffectState if there is one to be over-written. Return value meanings: 0: Do not apply this new effect 1: Apply this new effect and remove and existing one by the same player 2: Apply and increment the stack but remove the one that belongs to this player 3: Apply and remove the existing one 4: Apply and increment the stack while removing the existing one

Returns:
an Integer referring to what should be done.

checkDamageMitigation

protected int checkDamageMitigation(AgisEffect.EffectState state,
                                    int damageAmount)

getDamageType

public java.lang.String getDamageType()

setDamageType

public void setDamageType(java.lang.String type)

getEffectSkillType

public int getEffectSkillType()

setEffectSkillType

public void setEffectSkillType(int type)

getSkillEffectMod

public java.util.List<java.lang.Float> getSkillEffectMod()

setSkillEffectMod

public void setSkillEffectMod(float mod)

getSkillDurationMod

public float getSkillDurationMod()

setSkillDurationMod

public void setSkillDurationMod(float mod)

getDuration

public long getDuration()

setDuration

public void setDuration(long dur)

getNumPulses

public int getNumPulses()

setNumPulses

public void setNumPulses(int num)

getPulseTime

public long getPulseTime()

setBonusEffectReq

public void setBonusEffectReq(int effectNum)

getBonusEffectReq

public int getBonusEffectReq()

setBonusEffectReqConsumed

public void setBonusEffectReqConsumed(boolean consumed)

getBonusEffectReqConsumed

public boolean getBonusEffectReqConsumed()

setBonusEffect

public void setBonusEffect(int bonusEffect)

getBonusEffect

public int getBonusEffect()

removeBonusWhenEffectRemoved

public void removeBonusWhenEffectRemoved(boolean removeBonus)

removeBonusWhenEffectRemoved

public boolean removeBonusWhenEffectRemoved()

isBuff

public void isBuff(boolean isBuff)

isBuff

public boolean isBuff()

setIcon

public void setIcon(java.lang.String icon)

getIcon

public java.lang.String getIcon()

getChance

public float getChance()

setChance

public void setChance(float chance)

isPeriodic

public boolean isPeriodic()

isPeriodic

public void isPeriodic(boolean b)

isPersistent

public boolean isPersistent()

isPersistent

public void isPersistent(boolean b)

isPassive

public boolean isPassive()

isPassive

public void isPassive(boolean b)

isContinuous

public boolean isContinuous()

isContinuous

public void isContinuous(boolean b)

canApplyToImmune

public boolean canApplyToImmune()

canApplyToImmine

public void canApplyToImmine(boolean canApply)

getDuelEffect

public int getDuelEffect()

setDuelEffect

public void setDuelEffect(int duelID)

checkDuelDefeat

protected boolean checkDuelDefeat(CombatInfo target,
                                  CombatInfo caster,
                                  java.lang.String damageProperty)

getTargetEffectsOfMatchingType

public java.util.LinkedList<AgisEffect.EffectState> getTargetEffectsOfMatchingType(CombatInfo target)

generateState

protected AgisEffect.EffectState generateState(CombatInfo source,
                                               CombatInfo target,
                                               java.util.Map params)

generateState

protected AgisEffect.EffectState generateState(CombatInfo source,
                                               CombatInfo target,
                                               java.util.Map params,
                                               int abilityID)

generateState

protected AgisEffect.EffectState generateState(CombatInfo source,
                                               CombatInfo target,
                                               java.util.Map params,
                                               int abilityID,
                                               AgisItem item)

applyEffect

public static AgisEffect.EffectState applyEffect(AgisEffect effect,
                                                 CombatInfo source,
                                                 CombatInfo target,
                                                 int abilityID)

applyEffect

public static AgisEffect.EffectState applyEffect(AgisEffect effect,
                                                 CombatInfo source,
                                                 CombatInfo target,
                                                 int abilityID,
                                                 java.util.Map params)

applyEffect

public static AgisEffect.EffectState applyEffect(AgisEffect effect,
                                                 CombatInfo source,
                                                 CombatInfo target,
                                                 int abilityID,
                                                 java.util.Map params,
                                                 AgisItem item)

applyEffect

public static AgisEffect.EffectState applyEffect(AgisEffect effect,
                                                 CombatInfo source,
                                                 CombatInfo target,
                                                 java.util.Map params,
                                                 int abilityID,
                                                 AgisItem item)

applyPassiveEffect

public static AgisEffect.EffectState applyPassiveEffect(AgisEffect effect,
                                                        CombatInfo source,
                                                        CombatInfo target,
                                                        int abilityID,
                                                        java.util.Map params)

removeEffectByID

public static boolean removeEffectByID(CombatInfo target,
                                       int effectID)
Finds an effect on the target that matches the ID passed in

Parameters:
state -

removeEffect

public static void removeEffect(AgisEffect.EffectState state)

removeEffect

public static void removeEffect(AgisEffect.EffectState state,
                                CombatInfo target)

removeNonContinuousEffects

public static void removeNonContinuousEffects(CombatInfo target,
                                              boolean resume)
Used when a player logs in to ensure all old non-continuous effects are removed.

Parameters:
target -

removeNonPassiveEffects

public static void removeNonPassiveEffects(CombatInfo target)
Used when a target dies in to ensure all old non-passive effects are removed.

Parameters:
target -


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