{
  "GS2TemplateFormatVersion": "2019-05-01",
  "Description": "Adventure tutorial: character-training-studio.json",
  "Resources": {
    "Training": {
      "Type": "GS2::Exchange::Namespace",
      "Properties": {
        "Name": "adventure-character-training",
        "TransactionSettingV2": {
          "DistributorNamespaceId": "grn:gs2:{region}:{ownerId}:distributor:default",
          "EnableParallelExecution": false
        }
      }
    },
    "TrainingMaster": {
      "Type": "GS2::Exchange::CurrentRateMaster",
      "Properties": {
        "NamespaceName": "adventure-character-training",
        "Settings": {
          "version": "2019-08-19",
          "rateModels": [
            {
              "name": "train",
              "timingType": "immediate",
              "consumeActions": [
                {
                  "action": "Gs2Money2:WithdrawByUserId",
                  "request": "{\"namespaceName\":\"Currency\",\"userId\":\"#{userId}\",\"slot\":0,\"withdrawCount\":10,\"paidOnly\":false}"
                }
              ],
              "acquireActions": [
                {
                  "action": "Gs2Experience:AddExperienceByUserId",
                  "request": "{\"namespaceName\":\"CharacterExperience\",\"userId\":\"#{userId}\",\"experienceName\":\"Experience\",\"propertyId\":\"#{propertyId}\",\"experienceValue\":10}"
                }
              ]
            }
          ]
        },
        "Mode": "direct"
      },
      "DependsOn": [
        "Training"
      ]
    }
  }
}
