"beta5/player" )); } public function run($player, $removeList) { // Check if the player ID is not null if (is_null($player)) { return self::playerNotFound; } $player = (int) $player; // Check if the player is valid $playerRecord = $this->players->call('get', $player); if (is_null($playerRecord)) { return self::playerNotFound; } if ($this->players->call('isOnVacation', $player)) { return self::playerOnVacation; } // Check if the player is listed as an ally for these players $trustedBy = $this->players->call('isAllyOf', $player); $removeList = array_unique($removeList); foreach ($removeList as $removePlayer) { if (!array_key_exists((int) $removePlayer, $trustedBy)) { return self::trustingPlayerNotFound; } } // Remove the player from their lists and reorder foreach ($removeList as $removePlayer) { $this->players->call('removeAlly', (int) $removePlayer, $trustedBy[(int) $removePlayer]['level']); $this->players->call('reorderAllies', $removePlayer); } return $this->game->action("getTrustedAllies", $player); } } ?>