@Test public void testAppliesToCharacterCharacter() { final Character caster = MockFactory.mockCharacter(); final Character target = MockFactory.mockCharacter(); assertTrue(spellNoStaff.appliesTo(caster, target)); assertTrue(spellWithStaff.appliesTo(caster, target)); assertFalse(spellNoStaffObject.appliesTo(caster, target)); }
public boolean appliesTo(Character caster, Character target) { for (Effect effect : effects) { if (!effect.appliesTo(caster, target)) { return false; } } return true; }
Spell { public boolean appliesTo(Character caster, Character target) { for (Effect effect : effects) { if (!effect.appliesTo(caster, target)) { return false; } } return true; } }
Spell { public boolean appliesTo(Character caster, Character target) { for (Effect effect : effects) { if (!effect.appliesTo(caster, target)) { return false; } } return true; } Spell(int id, Effect[] effects, int requiredStaffPower, int requiredSkill,
			int requiredMana, String name, String description, boolean negative,
			int fx, int sound, String magicWords); }
Spell { public boolean appliesTo(Character caster, Character target) { for (Effect effect : effects) { if (!effect.appliesTo(caster, target)) { return false; } } return true; } Spell(int id, Effect[] effects, int requiredStaffPower, int requiredSkill,
			int requiredMana, String name, String description, boolean negative,
			int fx, int sound, String magicWords); boolean requiresStaff(); int getRequiredStaffPower(); int getRequiredMana(); int getRequiredSkill(); boolean appliesTo(Character caster, Character target); boolean appliesTo(Character caster, WorldObject target); void apply(Character caster, Character target); void apply(Character caster, WorldObject target); String getName(); String getDescription(); boolean isNegative(); int getFX(); int getSound(); String getMagicWords(); int getId(); }
Spell { public boolean appliesTo(Character caster, Character target) { for (Effect effect : effects) { if (!effect.appliesTo(caster, target)) { return false; } } return true; } Spell(int id, Effect[] effects, int requiredStaffPower, int requiredSkill,
			int requiredMana, String name, String description, boolean negative,
			int fx, int sound, String magicWords); boolean requiresStaff(); int getRequiredStaffPower(); int getRequiredMana(); int getRequiredSkill(); boolean appliesTo(Character caster, Character target); boolean appliesTo(Character caster, WorldObject target); void apply(Character caster, Character target); void apply(Character caster, WorldObject target); String getName(); String getDescription(); boolean isNegative(); int getFX(); int getSound(); String getMagicWords(); int getId();  }