

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# 例: 不均等なチーム (ハンター対モンスター) を作成する
<a name="match-examples-2"></a>

この例は、プレイヤーのグループが単一のモンスターをハントするゲームモードを示しています。プレイヤーは、ハンターまたはモンスターのロールを選択します。ハンターは、敵対するモンスターの最小スキルレベルを指定します。ハンターチームの最小サイズは、マッチングを達成するために徐々に緩和できます。このシナリオでは、以下の手順に従います。
+ 正確に 5 名のハンターで構成される 1 つのチームを作成します。
+ 正確に 1 匹のモンスターで構成される別のチームを作成します。
+ 以下のプレイヤー属性を含めます。
  + プレイヤーのスキルレベル (指定しない場合、デフォルトの 10 が使用されます)。
  + プレイヤーが希望するモンスターのスキルレベル (指定しない場合、デフォルトの 10 が使用されます)。
  + プレイヤーがモンスターのロールを希望するかどうか (指定しない場合、デフォルトで 0 または false になります)。
+ 以下の条件に基づいてモンスターとなるプレイヤーを選択します。
  + プレイヤーはモンスターのロールをリクエストする必要があります。
  + プレイヤーは、ハンターチームに既に追加されているプレイヤーが希望する最高のスキルレベルを達成済みであるか、超えている必要があります。
+ 以下の条件に基づいてハンターチームに属するプレイヤーを選択します。
  + モンスターのロールをリクエストしたプレイヤーは、ハンターチームに参加できません。
  + モンスターのロールが既に埋まっている場合、プレイヤーが希望するモンスターのスキルレベルは、モンスター候補のスキルより低くなければなりません。
+ すぐにマッチングが達成されない場合は、以下のようにハンターチームの最小サイズを緩和します。
  + 30 秒後に、ハンターチームのプレイヤー 4 名のみでゲームを開始することを許可します。
  + 60 秒後に、ハンターチームのプレイヤー 3 名のみでゲームを開始することを許可します。

このルールセットの使用に関する注意事項 
+ ハンターとモンスターに 2 つの異なるチームを使用することで、さまざまな条件のセットに基づいてメンバーシップを評価できます。

```
{
    "name": "players_vs_monster_5_vs_1",
    "ruleLanguageVersion": "1.0",
    "playerAttributes": [{
        "name": "skill",
        "type": "number",
        "default": 10
    },{
        "name": "desiredSkillOfMonster",
        "type": "number",
        "default": 10
    },{
        "name": "wantsToBeMonster",
        "type": "number",
        "default": 0
    }],
    "teams": [{
        "name": "players",
        "maxPlayers": 5,
        "minPlayers": 5
    }, {
        "name": "monster",
        "maxPlayers": 1,
        "minPlayers": 1 
    }],
    "rules": [{
        "name": "MonsterSelection",
        "description": "Only users that request playing as monster are assigned to the monster team",
        "type": "comparison",
        "measurements": ["teams[monster].players.attributes[wantsToBeMonster]"],
        "referenceValue": 1, 
        "operation": "="
    },{
        "name": "PlayerSelection",
        "description": "Do not place people who want to be monsters in the players team",
        "type": "comparison",
        "measurements": ["teams[players].players.attributes[wantsToBeMonster]"],
        "referenceValue": 0,
        "operation": "="
    },{
        "name": "MonsterSkill",
        "description": "Monsters must meet the skill requested by all players",
        "type": "comparison",
        "measurements": ["avg(teams[monster].players.attributes[skill])"],
        "referenceValue": "max(teams[players].players.attributes[desiredSkillOfMonster])",
        "operation": ">="
    }],
    "expansions": [{
        "target": "teams[players].minPlayers",
        "steps": [{
            "waitTimeSeconds": 30,
            "value": 4 
        },{
            "waitTimeSeconds": 60,
            "value": 3 
        }]
    }]
}
```