public void CastTo(ISpellCastTo spell, ICharacter target) { try { if (Check.IsCastableByWarrior(this, spell) == true) { base.CastTo(spell, target); } else { throw new InvalidOperationException(); } } catch (InvalidOperationException) { } }
protected void CastTo(ISpellCastTo spell, ICharacter target) { try { if (Check.IsAlive(this) == true) { SpellLevelUp(spell, this.level); spell.CastTo(this, target); } else { throw new InvalidOperationException(); } } catch (InvalidOperationException) { } }