{
  "_resourceType": "script",
  "id": "8dd00dfe-f1f1-4217-8a3b-aaa1a6ccbad7",
  "name": "MonsterTurn",
  "description": "",
  "variables": {},
  "actors": {},
  "symbol": "script_0",
  "script": [
    {
      "command": "EVENT_SET_VALUE",
      "args": {
        "variable": "12",
        "value": {
          "type": "expression",
          "value": "rnd(1)"
        }
      },
      "id": "12b633d1-be53-40d3-b2e4-2da588567778"
    },
    {
      "command": "EVENT_IF",
      "args": {
        "condition": {
          "type": "eq",
          "valueA": {
            "type": "variable",
            "value": "12"
          },
          "valueB": {
            "type": "number",
            "value": 0
          }
        },
        "__collapseElse": true,
        "__collapse": true
      },
      "children": {
        "true": [
          {
            "command": "EVENT_SET_VALUE",
            "args": {
              "variable": "11",
              "value": {
                "type": "expression",
                "value": "1 + rnd($05$-1)"
              }
            },
            "id": "b8663728-5e6e-4def-b8fa-e73bda96b34a"
          },
          {
            "command": "EVENT_TEXT",
            "args": {
              "text": [
                "The enemy dealed $11$"
              ],
              "__section": "text",
              "avatarId": "",
              "minHeight": 4,
              "maxHeight": 7,
              "textX": 1,
              "textY": 1,
              "textHeight": 5,
              "position": "bottom",
              "clearPrevious": true,
              "showFrame": "true",
              "speedIn": -1,
              "speedOut": -1,
              "closeWhen": "key",
              "closeButton": "a",
              "closeDelayTime": 0.5,
              "closeDelayFrames": 30,
              "__collapse": true
            },
            "id": "ef9c3114-7270-4523-b8cc-7eba8e0b67f2"
          },
          {
            "command": "EVENT_SET_VALUE",
            "args": {
              "variable": "0",
              "value": {
                "type": "expression",
                "value": "max(0, $01$ - $11$)"
              },
              "__collapse": true
            },
            "id": "87a16c59-cac3-4dc4-ae4c-725d7937ef83"
          },
          {
            "command": "EVENT_TEXT",
            "args": {
              "text": [
                "You now have $00$HPs"
              ],
              "__section": "text",
              "avatarId": "",
              "minHeight": 4,
              "maxHeight": 7,
              "textX": 1,
              "textY": 1,
              "textHeight": 5,
              "position": "bottom",
              "clearPrevious": true,
              "showFrame": "true",
              "speedIn": -1,
              "speedOut": -1,
              "closeWhen": "key",
              "closeButton": "a",
              "closeDelayTime": 0.5,
              "closeDelayFrames": 30,
              "__collapse": true
            },
            "id": "9e6f5b86-4109-4f5c-bd18-287b4d776f4b"
          },
          {
            "command": "EVENT_IF",
            "args": {
              "condition": {
                "type": "lte",
                "valueA": {
                  "type": "variable",
                  "value": "0"
                },
                "valueB": {
                  "type": "number",
                  "value": 0
                }
              },
              "__collapseElse": true
            },
            "children": {
              "true": [
                {
                  "command": "EVENT_CALL_CUSTOM_EVENT",
                  "args": {
                    "customEventId": "058cb3f2-19ed-4fdd-a966-a97ae6b63e60"
                  },
                  "id": "23be3c80-3a22-4ce4-bb13-d1bd5ea1121f"
                }
              ],
              "false": []
            },
            "id": "4bdd5850-aee0-464f-be02-7c2b5c11cde0"
          }
        ],
        "false": []
      },
      "id": "2df6bb2e-1af6-4b4f-a1a5-4795884b2312"
    },
    {
      "command": "EVENT_IF",
      "args": {
        "condition": {
          "type": "eq",
          "valueA": {
            "type": "variable",
            "value": "12"
          },
          "valueB": {
            "type": "number",
            "value": 1
          }
        },
        "__collapseElse": true
      },
      "children": {
        "true": [
          {
            "command": "EVENT_SET_VALUE",
            "args": {
              "variable": "11",
              "value": {
                "type": "expression",
                "value": "$06$ + rnd(max($06$, $01$/2) - $06$)"
              }
            },
            "id": "750d4028-2a41-4b36-88ff-172a5865816f"
          },
          {
            "command": "EVENT_TEXT",
            "args": {
              "text": [
                "The enemy healed $11$"
              ],
              "__section": "text",
              "avatarId": "",
              "minHeight": 4,
              "maxHeight": 7,
              "textX": 1,
              "textY": 1,
              "textHeight": 5,
              "position": "bottom",
              "clearPrevious": true,
              "showFrame": "true",
              "speedIn": -1,
              "speedOut": -1,
              "closeWhen": "key",
              "closeButton": "a",
              "closeDelayTime": 0.5,
              "closeDelayFrames": 30
            },
            "id": "8e22c223-9468-4cdf-b40c-03cf9f41c944"
          },
          {
            "command": "EVENT_TEXT",
            "args": {
              "text": [
                "It now has $01$"
              ],
              "__section": "text",
              "avatarId": "",
              "minHeight": 4,
              "maxHeight": 7,
              "textX": 1,
              "textY": 1,
              "textHeight": 5,
              "position": "bottom",
              "clearPrevious": true,
              "showFrame": "true",
              "speedIn": -1,
              "speedOut": -1,
              "closeWhen": "key",
              "closeButton": "a",
              "closeDelayTime": 0.5,
              "closeDelayFrames": 30
            },
            "id": "8f619d2a-392b-44c7-a43f-3c85bbd9e115"
          }
        ],
        "false": []
      },
      "id": "c3322905-a96b-4424-8ab0-0edfdd7623b1"
    }
  ]
}