meleedamage.cpp 698 B

1234567891011121314151617181920212223242526
  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. // unit->setHealthPoints( unit->getHealthPoints() -
  16. // (count_ - 2.5 * double(count_) * double(unit->getPhysicDefence()) / 100.0));
  17. }
  18. void MeleeDamage::Execute(Cell* from, Cell* where, Unit* who, Unit* whom, TypeOfTrigger Type){
  19. if(Type == 1)
  20. OperateOnUnit(whom);
  21. }