Пример #1
0
 /**
  * Boost
  * @param UnitInterface $unit
  * @return void
  * @throws BoostUnitException
  */
 public function boostUnit(UnitInterface $unit)
 {
     if (!$unit instanceof Player) {
         throw new BoostUnitException('Boost card can be applied only to player');
     }
     $unit->getData()->addPoints($this->mp);
 }
Пример #2
0
 /**
  * Do damage
  *
  * @param interfaces\UnitInterface $unit
  * @param $damage
  */
 public function damage(UnitInterface $unit, $damage)
 {
     $unit->receiveDamage($damage);
 }