@Test public void testAppliesToCharacterCharacter() { final Character target = mock(Character.class); final Character caster = mock(Character.class); assertFalse(dumbEffect.appliesTo(caster, target)); final Character deadUserTarget = mock(UserCharacter.class); when(deadUserTarget.isDead()).thenReturn(Boolean.TRUE); final Character aliveUserTarget = mock(UserCharacter.class); assertTrue(dumbEffect.appliesTo(caster, aliveUserTarget)); assertFalse(dumbEffect.appliesTo(caster, deadUserTarget)); }
@Override public boolean appliesTo(Character caster, Character target) { if (!(target instanceof UserCharacter) || target.isDead()) { return false; } return true; }
DumbEffect implements Effect { @Override public boolean appliesTo(Character caster, Character target) { if (!(target instanceof UserCharacter) || target.isDead()) { return false; } return true; } }
DumbEffect implements Effect { @Override public boolean appliesTo(Character caster, Character target) { if (!(target instanceof UserCharacter) || target.isDead()) { return false; } return true; }  }
DumbEffect implements Effect { @Override public boolean appliesTo(Character caster, Character target) { if (!(target instanceof UserCharacter) || target.isDead()) { return false; } return true; }  @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); }
DumbEffect implements Effect { @Override public boolean appliesTo(Character caster, Character target) { if (!(target instanceof UserCharacter) || target.isDead()) { return false; } return true; }  @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);  }