Skip to main content
Glama
bellsanct
by bellsanct

start_dungeon

Begin time-based dungeon exploration in an idle crawler game. Start adventures to collect equipment and trigger auto-battles, then return later to check progress.

Instructions

ダンジョンの探索を開始します。時間ベースの活動なので、後で確認する必要があります。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dungeon_idYes探索するダンジョンのID
save_keyYesセーブキー

Implementation Reference

  • The startDungeon function validates player state and dungeon existence, calculates duration based on player stats, updates the player state to 'exploring' with currentDungeon details, and saves the progress.
    export async function startDungeon(dungeonId: string, saveKey: string): Promise<string> {
      const data = await storage.load(saveKey);
      
      if (!data.player.name) {
        return "プレイヤーが見つかりません。先に'create_player'を実行してください。";
      }
    
      if (data.player.currentDungeon) {
        const remaining = Math.max(0, data.player.currentDungeon.estimatedEndTime - Date.now());
        const minutes = Math.ceil(remaining / 60000);
        return `既にダンジョンを探索中です!\n残り時間: 約${minutes}分\n\n'check_progress'で進行状況を確認できます。`;
      }
    
      const dungeon = getDungeonById(dungeonId);
      
      if (!dungeon) {
        return `ダンジョン '${dungeonId}' が見つかりません。`;
      }
    
      const playerStats = calculateTotalStats(data.player.equipment);
      const actualTime = calculateDungeonTime(dungeon.baseTime, playerStats.speed);
    
      const startTime = Date.now();
      const estimatedEndTime = startTime + (actualTime * 60 * 1000);
    
      data.player.currentDungeon = {
        dungeonId,
        startTime,
        estimatedEndTime,
        battleLog: [],
        events: []
      };
      data.player.state = 'exploring';
    
      await storage.save(data, saveKey);
    
      return `🗡️  ${dungeon.name}の探索を開始しました!\n\n推定完了時刻: ${actualTime}分後\n\n'check_progress'で進行状況を確認できます。`;
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bellsanct/mcp-dungeon-game'

If you have feedback or need assistance with the MCP directory API, please join our Discord server