selfheal.cpp 663 B

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