Search in sources :

Example 1 with Effect

use of de.gurkenlabs.litiengine.abilities.effects.Effect in project litiengine by gurkenlabs.

the class AbilityTests method testEffectInitialization.

@Test
public void testEffectInitialization() {
    Creature entity = new Creature();
    TestAbility ability = new TestAbility(new Creature());
    Effect effect = new TestEffect(ability, EffectTarget.ENEMY);
    assertEquals(ability.getAttributes().getDuration().getCurrentValue().intValue(), effect.getDuration());
    assertEquals(ability, effect.getAbility());
    assertEquals(0, effect.getFollowUpEffects().size());
    assertFalse(effect.isActive(entity));
    assertArrayEquals(new EffectTarget[] { EffectTarget.ENEMY }, effect.getEffectTargets());
}
Also used : Creature(de.gurkenlabs.litiengine.entities.Creature) Effect(de.gurkenlabs.litiengine.abilities.effects.Effect) Test(org.junit.jupiter.api.Test)

Aggregations

Effect (de.gurkenlabs.litiengine.abilities.effects.Effect)1 Creature (de.gurkenlabs.litiengine.entities.Creature)1 Test (org.junit.jupiter.api.Test)1