public abstract class Effect extends java.lang.Object implements IUpdateable
| Modifier and Type | Class and Description |
|---|---|
static interface |
Effect.EffectAppliedListener |
static interface |
Effect.EffectCeasedListener |
| Modifier | Constructor and Description |
|---|---|
protected |
Effect(Ability ability,
EffectTarget... targets)
Instantiates a new effect.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
apply(ICombatEntity entity) |
void |
apply(java.awt.Shape impactArea)
Applies the effect in the specified impact area on the specified environment.
|
protected void |
cease(EffectApplication appliance) |
void |
cease(ICombatEntity entity) |
protected boolean |
customTarget(ICombatEntity entity)
Overwrite this method to implement a custom target predicate that determines whether an entity can be affected by this effect.
|
Ability |
getAbility() |
java.util.List<EffectApplication> |
getActiveAppliances() |
int |
getDelay() |
int |
getDuration() |
EffectTarget[] |
getEffectTargets() |
protected java.util.Collection<ICombatEntity> |
getEntitiesInImpactArea(java.awt.Shape impactArea) |
java.util.List<Effect> |
getFollowUpEffects() |
RelativeEntityComparator |
getTargetPriorityComparator() |
protected long |
getTotalDuration() |
protected boolean |
hasEnded(EffectApplication appliance) |
boolean |
isActive(ICombatEntity entity) |
protected java.util.List<ICombatEntity> |
lookForAffectedEntities(java.awt.Shape impactArea) |
void |
onEffectApplied(Effect.EffectAppliedListener listener) |
void |
onEffectCeased(Effect.EffectCeasedListener listener) |
void |
removeEffectAppliedListener(Effect.EffectAppliedListener listener) |
void |
removeEffectCeasedListener(Effect.EffectCeasedListener listener) |
void |
setDelay(int delay) |
void |
setDuration(int duration) |
void |
setTargetPriorityComparator(RelativeEntityComparator targetPriorityComparator) |
void |
update()
1.
|
protected Effect(Ability ability, EffectTarget... targets)
ability - the abilitytargets - the targetspublic void onEffectApplied(Effect.EffectAppliedListener listener)
public void removeEffectAppliedListener(Effect.EffectAppliedListener listener)
public void onEffectCeased(Effect.EffectCeasedListener listener)
public void removeEffectCeasedListener(Effect.EffectCeasedListener listener)
public void apply(java.awt.Shape impactArea)
impactArea - The impact areapublic void cease(ICombatEntity entity)
public Ability getAbility()
public java.util.List<EffectApplication> getActiveAppliances()
public int getDelay()
public int getDuration()
public EffectTarget[] getEffectTargets()
public java.util.List<Effect> getFollowUpEffects()
public RelativeEntityComparator getTargetPriorityComparator()
public boolean isActive(ICombatEntity entity)
public void setDelay(int delay)
public void setDuration(int duration)
public void setTargetPriorityComparator(RelativeEntityComparator targetPriorityComparator)
public void update()
update in interface IUpdateableClientConfiguration.setMaxFps(int)protected void apply(ICombatEntity entity)
protected void cease(EffectApplication appliance)
protected java.util.Collection<ICombatEntity> getEntitiesInImpactArea(java.awt.Shape impactArea)
protected long getTotalDuration()
protected boolean hasEnded(EffectApplication appliance)
protected java.util.List<ICombatEntity> lookForAffectedEntities(java.awt.Shape impactArea)
protected boolean customTarget(ICombatEntity entity)
CUSTOM value in order for this function to be evaluated.entity - The entity to check against the custom target predicate.EffectTarget.CUSTOM