public abstract class Effect extends java.lang.Object implements IEffect
| Modifier and Type | Field and Description |
|---|---|
static int |
NO_DURATION |
| 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) |
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<IEffect> |
getFollowUpEffects() |
EntityComparator |
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(java.util.function.Consumer<EffectArgument> consumer) |
void |
onEffectCeased(java.util.function.Consumer<EffectArgument> consumer) |
void |
setDelay(int delay) |
void |
setDuration(int duration) |
void |
setTargetPriorityComparator(EntityComparator targetPriorityComparator) |
void |
update()
1.
|
public static final int NO_DURATION
protected Effect(Ability ability, EffectTarget... targets)
ability - the abilitytargets - the targetspublic void apply(java.awt.Shape impactArea)
IEffectpublic void cease(ICombatEntity entity)
public Ability getAbility()
public java.util.List<EffectApplication> getActiveAppliances()
getActiveAppliances in interface IEffectpublic int getDuration()
getDuration in interface IEffectpublic EffectTarget[] getEffectTargets()
getEffectTargets in interface IEffectpublic java.util.List<IEffect> getFollowUpEffects()
getFollowUpEffects in interface IEffectpublic EntityComparator getTargetPriorityComparator()
public boolean isActive(ICombatEntity entity)
public void onEffectApplied(java.util.function.Consumer<EffectArgument> consumer)
onEffectApplied in interface IEffectpublic void onEffectCeased(java.util.function.Consumer<EffectArgument> consumer)
onEffectCeased in interface IEffectpublic void setDelay(int delay)
public void setDuration(int duration)
public void setTargetPriorityComparator(EntityComparator targetPriorityComparator)
public void update()
update in interface IUpdateableprotected 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)