| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611 |
- {
- "_resourceType": "script",
- "id": "5a060925-e335-4b93-8af5-2a63051e70e8",
- "name": "CombatTurn",
- "description": "",
- "variables": {
- "V0": {
- "id": "V0",
- "name": "Variable A",
- "passByReference": true
- }
- },
- "actors": {},
- "symbol": "script_9",
- "script": [
- {
- "command": "EVENT_MENU",
- "args": {
- "variable": "12",
- "items": 2,
- "option1": "Attack",
- "option2": "Heal",
- "option3": "Spell",
- "option4": "",
- "option5": "",
- "option6": "",
- "option7": "",
- "option8": "",
- "cancelOnB": false,
- "layout": "menu",
- "__collapse": true
- },
- "id": "234a6b96-3b78-42a4-942f-0228b3698eac"
- },
- {
- "command": "EVENT_IF",
- "args": {
- "condition": {
- "type": "eq",
- "valueA": {
- "type": "variable",
- "value": "12"
- },
- "valueB": {
- "type": "number",
- "value": 1
- }
- },
- "__collapseElse": true,
- "__collapse": true,
- "__comment": false
- },
- "children": {
- "true": [
- {
- "command": "EVENT_SET_VALUE",
- "args": {
- "variable": "11",
- "value": {
- "type": "expression",
- "value": "1 + rnd($05$ - 1)"
- },
- "__collapse": true
- },
- "id": "0a4d9b93-2df2-4362-b67f-0783fae55434"
- },
- {
- "command": "EVENT_TEXT",
- "args": {
- "text": [
- "You dealed \n$11$ damage(s)"
- ],
- "__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": "7bbd8b85-5906-4a0c-9f5a-156aadba7337"
- },
- {
- "command": "EVENT_SET_VALUE",
- "args": {
- "variable": "1",
- "value": {
- "type": "expression",
- "value": "max(0, $01$ - $11$)"
- },
- "__collapse": true,
- "text": [
- "max(0, $01$ - $V0$)"
- ],
- "__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": "03cc80da-c447-46e8-8590-ccd1f3e1ee3f"
- },
- {
- "command": "EVENT_IF",
- "args": {
- "condition": {
- "type": "lte",
- "valueA": {
- "type": "variable",
- "value": "1"
- },
- "valueB": {
- "type": "number",
- "value": 0
- }
- },
- "__collapseElse": true,
- "__collapse": true
- },
- "children": {
- "true": [
- {
- "command": "EVENT_TEXT",
- "args": {
- "text": [
- "You've killed\nthe Monster!"
- ],
- "__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": "7d3de43e-29d9-4b1f-be1b-896ec6da14c0"
- }
- ],
- "false": []
- },
- "id": "6d1e9707-c479-4058-a5ad-f8372b7166a8"
- },
- {
- "command": "EVENT_SET_VALUE",
- "args": {
- "variable": "3",
- "value": {
- "type": "expression",
- "value": "$03$ + $11$\n"
- },
- "__collapse": true
- },
- "id": "70f6e351-b495-4c50-b11b-5c39ddf1d157"
- },
- {
- "command": "EVENT_LOOP_WHILE",
- "args": {
- "condition": {
- "type": "expression",
- "value": "$03$ >= $05$*4"
- },
- "__collapse": true
- },
- "children": {
- "true": [
- {
- "command": "EVENT_SET_VALUE",
- "args": {
- "variable": "3",
- "value": {
- "type": "expression",
- "value": "$03$-$05$*4"
- },
- "__collapse": true
- },
- "id": "7e2119de-55e8-49ed-9eb8-78c35a218665"
- },
- {
- "command": "EVENT_INC_VALUE",
- "args": {
- "variable": "5",
- "__collapse": true
- },
- "id": "680ef6c6-e208-4473-aa5d-87a74e3e6f49"
- }
- ]
- },
- "id": "a3f15833-91f4-4749-9ccb-0d4b0e7d0e04"
- }
- ],
- "false": []
- },
- "id": "b353ca00-9c81-4216-8111-38ff22019048"
- },
- {
- "command": "EVENT_IF",
- "args": {
- "condition": {
- "type": "eq",
- "valueA": {
- "type": "variable",
- "value": "12"
- },
- "valueB": {
- "type": "number",
- "value": 2
- }
- },
- "__collapseElse": true,
- "__collapse": true
- },
- "children": {
- "true": [
- {
- "command": "EVENT_SET_VALUE",
- "args": {
- "variable": "11",
- "value": {
- "type": "expression",
- "value": "$06$ + rnd(max(0, $01$ / 2 - $06$))"
- },
- "__collapse": true
- },
- "id": "cb744e25-b732-452a-8d6c-d432067e5aba"
- },
- {
- "command": "EVENT_TEXT",
- "args": {
- "text": [
- "You healed for\n$11$ 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": "a34b4173-1ba0-41da-8d00-45b2fdb076e2"
- },
- {
- "command": "EVENT_SET_VALUE",
- "args": {
- "variable": "0",
- "value": {
- "type": "expression",
- "value": "min($14$, $00$ + $11$)"
- },
- "__collapse": true
- },
- "id": "5f3fd47b-937f-417f-bbfe-b22a573aa0b5"
- },
- {
- "command": "EVENT_SET_VALUE",
- "args": {
- "variable": "4",
- "value": {
- "type": "expression",
- "value": "$04$ + $11$"
- },
- "__collapse": true
- },
- "id": "357d0ac1-f49d-4013-8e28-5e5e3ed2e0b1"
- },
- {
- "command": "EVENT_LOOP_WHILE",
- "args": {
- "condition": {
- "type": "expression",
- "value": "$04$ >= $06$*3"
- },
- "__collapse": true
- },
- "children": {
- "true": [
- {
- "command": "EVENT_SET_VALUE",
- "args": {
- "variable": "4",
- "value": {
- "type": "expression",
- "value": "$04$-$06$*3"
- },
- "__collapse": true
- },
- "id": "bdb4fea2-9079-4287-8c13-97c0cd1857f5"
- },
- {
- "command": "EVENT_INC_VALUE",
- "args": {
- "variable": "6",
- "__collapse": true
- },
- "id": "85c8935d-2d7e-4f2d-aa3e-47848d0d9a7c"
- }
- ]
- },
- "id": "56f208bb-1360-4ba9-941c-9708f6fd061f"
- }
- ],
- "false": [
- {
- "command": "EVENT_IF",
- "args": {
- "condition": {
- "type": "eq",
- "valueA": {
- "type": "variable",
- "value": "12"
- },
- "valueB": {
- "type": "number",
- "value": 3
- }
- },
- "__collapseElse": true
- },
- "children": {
- "true": [
- {
- "command": "EVENT_TEXT",
- "args": {
- "text": [
- "Whoosh."
- ],
- "__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": "2353f7fd-25ce-4cea-b1e9-1f75ac3b83a5"
- }
- ],
- "false": []
- },
- "id": "8f0a6115-c406-416c-8635-3ac74e0fd218"
- }
- ]
- },
- "id": "9d0a216f-5622-4edb-8be4-fdccc585da14"
- },
- {
- "command": "EVENT_IF",
- "args": {
- "condition": {
- "type": "gt",
- "valueA": {
- "type": "variable",
- "value": "1"
- },
- "valueB": {
- "type": "number",
- "value": 0
- }
- },
- "__collapseElse": true,
- "__collapse": false
- },
- "children": {
- "true": [
- {
- "command": "EVENT_SET_VALUE",
- "args": {
- "variable": "12",
- "value": {
- "type": "expression",
- "value": "rnd(2)"
- },
- "__collapse": false
- },
- "id": "b1ab22f9-88af-4cce-b7d8-559267a871c6"
- },
- {
- "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": "40b7531f-0f34-48df-aa69-3bf2b6893d9b"
- },
- {
- "command": "EVENT_TEXT",
- "args": {
- "text": [
- "The enemy dealed\n$11$ damage(s)"
- ],
- "__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": false
- },
- "id": "d93a10f5-9cef-4624-b034-738d13fd5fa1"
- },
- {
- "command": "EVENT_SET_VALUE",
- "args": {
- "variable": "0",
- "value": {
- "type": "expression",
- "value": "max(0, $00$ - $11$)"
- },
- "__collapse": false
- },
- "id": "f5aafac1-e985-47f2-b2e8-7aebd0804b20"
- },
- {
- "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": "ed5412b7-50ac-4897-8a10-2a9394bd7d1d"
- }
- ],
- "false": []
- },
- "id": "f3011093-5d2f-4a70-bed7-935d94b9a062"
- }
- ],
- "false": []
- },
- "id": "f842f2e5-3ec7-4eb6-a7e4-297f6ac1acfe"
- },
- {
- "command": "EVENT_IF",
- "args": {
- "condition": {
- "type": "eq",
- "valueA": {
- "type": "variable",
- "value": "12"
- },
- "valueB": {
- "type": "number",
- "value": 1
- }
- },
- "__collapseElse": true,
- "__collapse": false
- },
- "children": {
- "true": [
- {
- "command": "EVENT_SET_VALUE",
- "args": {
- "variable": "11",
- "value": {
- "type": "expression",
- "value": "rnd($06$)"
- },
- "__collapse": false
- },
- "id": "27caa270-55d2-4a5e-90d5-fe54ae4bf626"
- },
- {
- "command": "EVENT_TEXT",
- "args": {
- "text": [
- "The enemy healed \n$11$ 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": "915ecbab-229d-404e-8524-f5e7a2138ccd"
- },
- {
- "command": "EVENT_SET_VALUE",
- "args": {
- "variable": "1",
- "value": {
- "type": "expression",
- "value": "min(8, $01$ + $11$)"
- },
- "__collapse": false
- },
- "id": "db91e0e5-c11e-432f-83ef-6bbf54ecc377"
- }
- ],
- "false": []
- },
- "id": "615d25ae-0c8a-432c-a308-6b4b323bbd3a"
- }
- ],
- "false": []
- },
- "id": "5cd3130a-52bc-405e-a4ef-f5fb725ef201"
- }
- ]
- }
|