meleedamagespell.cpp 397 B

12345678910111213141516
  1. //
  2. // Created by IgorBat on 23.04.2018.
  3. //
  4. #include <cassert>
  5. #include "spells/meleedamagespell.h"
  6. #include "units/unit.h"
  7. #include "cell.h"
  8. #include <string>
  9. void MeleeDamageSpell::CastSpell(Cell* from, Cell* where, Unit* who, Unit* whom){
  10. effects_[0] -> OperateOnUnit(whom);
  11. }
  12. bool MeleeDamageSpell::canCastToCell(Cell* destination, Cell* from){
  13. return isNeirbor(destination, from);
  14. }