Skip to main content
Glama
bellsanct
by bellsanct

create_player

Create a new player character with a unique name and save key to start playing the MCP Dungeon Game, an idle dungeon crawler with equipment collection and auto-battles.

Instructions

名前を付けて新しいプレイヤーキャラクターを作成します。ゲームごとに一度だけ実行できます。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesキャラクター名
save_keyYesセーブキー

Implementation Reference

  • The 'createPlayer' function handles character creation, including initializing stats, equipment, and gold.
    export async function createPlayer(name: string, saveKey: string): Promise<string> {
      const data = await storage.load(saveKey);
    
      if (data.player.name) {
        return `プレイヤーは既に存在します: ${data.player.name}\n'view_status'でキャラクター情報を確認してください。`;
      }
    
      data.player.name = name;
    
      // 初期装備を付与
      const starterWeapon = STARTER_EQUIPMENT.find(eq => eq.id === 'rusty_sword')!;
      const starterArmor = STARTER_EQUIPMENT.find(eq => eq.id === 'leather_armor')!;
    
      data.player.equipment.weapon = starterWeapon;
      data.player.equipment.armor = starterArmor;
      data.player.equipment.item1 = null;
      data.player.equipment.item2 = null;
      data.player.gold = 100; // 初期ゴールド
      data.player.hp = 100; // 初期HP
      data.player.maxHp = 100; // 最大HP
      data.player.itemInventory = []; // 持ち物インベントリを初期化
      data.player.state = 'idle';
    
      await storage.save(data, saveKey);
    
      return `ようこそ、${name}!\n\n初期装備:\n- ${starterWeapon.name} (攻撃力+${starterWeapon.stats.attack})\n- ${starterArmor.name} (防御力+${starterArmor.stats.defense})\n\n初期ゴールド: 100\n\n'view_status'でステータスを確認できます!`;
    }

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