Exemplo n.º 1
0
 /**
  * @param $times
  * @return AttackGymResponse
  * @throws \Exception
  */
 public function attack($times)
 {
     $actions = [];
     for ($i = 0; $i < $times; $i++) {
         $action = new BattleAction();
         $action->setType(BattleActionType::ACTION_ATTACK);
         $action->setActionStartMs($this->pokemonGoAPI->currentTimeMillis() + 100 * $times);
         $action->setDurationMs(500);
         $action->setTargetIndex(-1);
         $actions[] = $action;
     }
     $result = $this->doActions($actions);
     return $result;
 }