public abstract class Effect extends java.lang.Object implements IUpdateable
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<Effect> |
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)
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 EntityComparator getTargetPriorityComparator()
public boolean isActive(ICombatEntity entity)
public void onEffectApplied(java.util.function.Consumer<EffectArgument> consumer)
public void onEffectCeased(java.util.function.Consumer<EffectArgument> consumer)
public void setDelay(int delay)
public void setDuration(int duration)
public void setTargetPriorityComparator(EntityComparator targetPriorityComparator)
public void update()
update
in interface IUpdateable
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)