game->output); $out = $this->game->output; $out->writeln("╔════════════════════════════════════╗"); $out->writeln("║ 选择副本 ║"); $out->writeln("╚════════════════════════════════════╝"); $out->writeln(""); $maps = require __DIR__ . '/../../src/Data/maps.php'; foreach ($maps as $id => $map) { $out->writeln("[{$id}] {$map['name']} (Lv.{$map['min_level']})"); } $out->writeln(""); $out->writeln("[0] 返回"); $dungeonId = Input::ask($out, "请选择副本: "); if ($dungeonId == 0) { $this->game->state = Game::MENU; return; } if (isset($maps[$dungeonId])) { $this->game->dungeonId = (int)$dungeonId; $this->game->state = Game::BATTLE; } else { $out->writeln("无效副本"); Screen::sleep(1); } } }