meleedamage.cpp 680 B

123456789101112131415161718192021222324252627
  1. //
  2. // Created by IgorBat on 23.04.2018.
  3. //
  4. #include <cassert>
  5. #include "effects\meleedamage.h"
  6. #include "units\unit.h"
  7. #include <string>
  8. void MeleeDamage::OperateOnCell(Cell* cell){
  9. throw std :: string("CAN'T TOUCH THIS");
  10. }
  11. void MeleeDamage::OperateOnUnitToCell(Unit* who, Cell* where){
  12. throw std :: string("CAN'T TOUCH THIS");
  13. }
  14. void MeleeDamage::OperateOnUnit(Unit* unit){
  15. //int temp = unit -> reduceIncomingDamage("p", count_);
  16. //unit ->setHealthPoints(unit -> getHealthPoints() - temp);
  17. //check_on_death
  18. }
  19. void MeleeDamage::Execute(Cell* from, Cell* where, Unit* who, Unit* whom, TypeOfTrigger Type){
  20. if(Type == 1)
  21. OperateOnUnit(whom);
  22. }