@Test public void testAppliesToCharacterWorldObject() { final Character caster = mock(Character.class); final WorldObject target = mock(WorldObject.class); assertFalse(hpEffect1.appliesTo(caster, target)); assertFalse(hpEffect2.appliesTo(caster, target)); }
@Override public boolean appliesTo(Character caster, Character target) { if (target.isDead()) { return false; } return true; }
HitPointsEffect implements Effect { @Override public boolean appliesTo(Character caster, Character target) { if (target.isDead()) { return false; } return true; } }
HitPointsEffect implements Effect { @Override public boolean appliesTo(Character caster, Character target) { if (target.isDead()) { return false; } return true; } HitPointsEffect(int minPoints, int maxPoints); }
HitPointsEffect implements Effect { @Override public boolean appliesTo(Character caster, Character target) { if (target.isDead()) { return false; } return true; } HitPointsEffect(int minPoints, int maxPoints); @Override void apply(Character caster, Character target); @Override boolean appliesTo(Character caster, Character target); @Override boolean appliesTo(Character caster, WorldObject worldobject); @Override void apply(Character caster, WorldObject target); }
HitPointsEffect implements Effect { @Override public boolean appliesTo(Character caster, Character target) { if (target.isDead()) { return false; } return true; } HitPointsEffect(int minPoints, int maxPoints); @Override void apply(Character caster, Character target); @Override boolean appliesTo(Character caster, Character target); @Override boolean appliesTo(Character caster, WorldObject worldobject); @Override void apply(Character caster, WorldObject target);  }