combatturn.gbsres.bak 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. {
  2. "_resourceType": "script",
  3. "id": "5a060925-e335-4b93-8af5-2a63051e70e8",
  4. "name": "CombatTurn",
  5. "description": "",
  6. "variables": {
  7. "V0": {
  8. "id": "V0",
  9. "name": "Variable A",
  10. "passByReference": true
  11. }
  12. },
  13. "actors": {},
  14. "symbol": "script_9",
  15. "script": [
  16. {
  17. "command": "EVENT_MENU",
  18. "args": {
  19. "variable": "12",
  20. "items": 2,
  21. "option1": "Attack",
  22. "option2": "Heal",
  23. "option3": "Spell",
  24. "option4": "",
  25. "option5": "",
  26. "option6": "",
  27. "option7": "",
  28. "option8": "",
  29. "cancelOnB": false,
  30. "layout": "menu",
  31. "__collapse": true
  32. },
  33. "id": "234a6b96-3b78-42a4-942f-0228b3698eac"
  34. },
  35. {
  36. "command": "EVENT_IF",
  37. "args": {
  38. "condition": {
  39. "type": "eq",
  40. "valueA": {
  41. "type": "variable",
  42. "value": "12"
  43. },
  44. "valueB": {
  45. "type": "number",
  46. "value": 1
  47. }
  48. },
  49. "__collapseElse": true,
  50. "__collapse": true,
  51. "__comment": false
  52. },
  53. "children": {
  54. "true": [
  55. {
  56. "command": "EVENT_SET_VALUE",
  57. "args": {
  58. "variable": "11",
  59. "value": {
  60. "type": "expression",
  61. "value": "1 + rnd($05$ - 1)"
  62. },
  63. "__collapse": true
  64. },
  65. "id": "0a4d9b93-2df2-4362-b67f-0783fae55434"
  66. },
  67. {
  68. "command": "EVENT_TEXT",
  69. "args": {
  70. "text": [
  71. "You dealed \n$11$ damage(s)"
  72. ],
  73. "__section": "text",
  74. "avatarId": "",
  75. "minHeight": 4,
  76. "maxHeight": 7,
  77. "textX": 1,
  78. "textY": 1,
  79. "textHeight": 5,
  80. "position": "bottom",
  81. "clearPrevious": true,
  82. "showFrame": "true",
  83. "speedIn": -1,
  84. "speedOut": -1,
  85. "closeWhen": "key",
  86. "closeButton": "a",
  87. "closeDelayTime": 0.5,
  88. "closeDelayFrames": 30,
  89. "__collapse": true
  90. },
  91. "id": "7bbd8b85-5906-4a0c-9f5a-156aadba7337"
  92. },
  93. {
  94. "command": "EVENT_SET_VALUE",
  95. "args": {
  96. "variable": "1",
  97. "value": {
  98. "type": "expression",
  99. "value": "max(0, $01$ - $11$)"
  100. },
  101. "__collapse": true,
  102. "text": [
  103. "max(0, $01$ - $V0$)"
  104. ],
  105. "__section": "text",
  106. "avatarId": "",
  107. "minHeight": 4,
  108. "maxHeight": 7,
  109. "textX": 1,
  110. "textY": 1,
  111. "textHeight": 5,
  112. "position": "bottom",
  113. "clearPrevious": true,
  114. "showFrame": "true",
  115. "speedIn": -1,
  116. "speedOut": -1,
  117. "closeWhen": "key",
  118. "closeButton": "a",
  119. "closeDelayTime": 0.5,
  120. "closeDelayFrames": 30
  121. },
  122. "id": "03cc80da-c447-46e8-8590-ccd1f3e1ee3f"
  123. },
  124. {
  125. "command": "EVENT_IF",
  126. "args": {
  127. "condition": {
  128. "type": "lte",
  129. "valueA": {
  130. "type": "variable",
  131. "value": "1"
  132. },
  133. "valueB": {
  134. "type": "number",
  135. "value": 0
  136. }
  137. },
  138. "__collapseElse": true,
  139. "__collapse": true
  140. },
  141. "children": {
  142. "true": [
  143. {
  144. "command": "EVENT_TEXT",
  145. "args": {
  146. "text": [
  147. "You've killed\nthe Monster!"
  148. ],
  149. "__section": "text",
  150. "avatarId": "",
  151. "minHeight": 4,
  152. "maxHeight": 7,
  153. "textX": 1,
  154. "textY": 1,
  155. "textHeight": 5,
  156. "position": "bottom",
  157. "clearPrevious": true,
  158. "showFrame": "true",
  159. "speedIn": -1,
  160. "speedOut": -1,
  161. "closeWhen": "key",
  162. "closeButton": "a",
  163. "closeDelayTime": 0.5,
  164. "closeDelayFrames": 30,
  165. "__collapse": true
  166. },
  167. "id": "7d3de43e-29d9-4b1f-be1b-896ec6da14c0"
  168. }
  169. ],
  170. "false": []
  171. },
  172. "id": "6d1e9707-c479-4058-a5ad-f8372b7166a8"
  173. },
  174. {
  175. "command": "EVENT_SET_VALUE",
  176. "args": {
  177. "variable": "3",
  178. "value": {
  179. "type": "expression",
  180. "value": "$03$ + $11$\n"
  181. },
  182. "__collapse": true
  183. },
  184. "id": "70f6e351-b495-4c50-b11b-5c39ddf1d157"
  185. },
  186. {
  187. "command": "EVENT_LOOP_WHILE",
  188. "args": {
  189. "condition": {
  190. "type": "expression",
  191. "value": "$03$ >= $05$*4"
  192. },
  193. "__collapse": true
  194. },
  195. "children": {
  196. "true": [
  197. {
  198. "command": "EVENT_SET_VALUE",
  199. "args": {
  200. "variable": "3",
  201. "value": {
  202. "type": "expression",
  203. "value": "$03$-$05$*4"
  204. },
  205. "__collapse": true
  206. },
  207. "id": "7e2119de-55e8-49ed-9eb8-78c35a218665"
  208. },
  209. {
  210. "command": "EVENT_INC_VALUE",
  211. "args": {
  212. "variable": "5",
  213. "__collapse": true
  214. },
  215. "id": "680ef6c6-e208-4473-aa5d-87a74e3e6f49"
  216. }
  217. ]
  218. },
  219. "id": "a3f15833-91f4-4749-9ccb-0d4b0e7d0e04"
  220. }
  221. ],
  222. "false": []
  223. },
  224. "id": "b353ca00-9c81-4216-8111-38ff22019048"
  225. },
  226. {
  227. "command": "EVENT_IF",
  228. "args": {
  229. "condition": {
  230. "type": "eq",
  231. "valueA": {
  232. "type": "variable",
  233. "value": "12"
  234. },
  235. "valueB": {
  236. "type": "number",
  237. "value": 2
  238. }
  239. },
  240. "__collapseElse": true,
  241. "__collapse": true
  242. },
  243. "children": {
  244. "true": [
  245. {
  246. "command": "EVENT_SET_VALUE",
  247. "args": {
  248. "variable": "11",
  249. "value": {
  250. "type": "expression",
  251. "value": "$06$ + rnd(max(0, $01$ / 2 - $06$))"
  252. },
  253. "__collapse": true
  254. },
  255. "id": "cb744e25-b732-452a-8d6c-d432067e5aba"
  256. },
  257. {
  258. "command": "EVENT_TEXT",
  259. "args": {
  260. "text": [
  261. "You healed for\n$11$ HPs"
  262. ],
  263. "__section": "text",
  264. "avatarId": "",
  265. "minHeight": 4,
  266. "maxHeight": 7,
  267. "textX": 1,
  268. "textY": 1,
  269. "textHeight": 5,
  270. "position": "bottom",
  271. "clearPrevious": true,
  272. "showFrame": "true",
  273. "speedIn": -1,
  274. "speedOut": -1,
  275. "closeWhen": "key",
  276. "closeButton": "a",
  277. "closeDelayTime": 0.5,
  278. "closeDelayFrames": 30,
  279. "__collapse": true
  280. },
  281. "id": "a34b4173-1ba0-41da-8d00-45b2fdb076e2"
  282. },
  283. {
  284. "command": "EVENT_SET_VALUE",
  285. "args": {
  286. "variable": "0",
  287. "value": {
  288. "type": "expression",
  289. "value": "min($14$, $00$ + $11$)"
  290. },
  291. "__collapse": true
  292. },
  293. "id": "5f3fd47b-937f-417f-bbfe-b22a573aa0b5"
  294. },
  295. {
  296. "command": "EVENT_SET_VALUE",
  297. "args": {
  298. "variable": "4",
  299. "value": {
  300. "type": "expression",
  301. "value": "$04$ + $11$"
  302. },
  303. "__collapse": true
  304. },
  305. "id": "357d0ac1-f49d-4013-8e28-5e5e3ed2e0b1"
  306. },
  307. {
  308. "command": "EVENT_LOOP_WHILE",
  309. "args": {
  310. "condition": {
  311. "type": "expression",
  312. "value": "$04$ >= $06$*3"
  313. },
  314. "__collapse": true
  315. },
  316. "children": {
  317. "true": [
  318. {
  319. "command": "EVENT_SET_VALUE",
  320. "args": {
  321. "variable": "4",
  322. "value": {
  323. "type": "expression",
  324. "value": "$04$-$06$*3"
  325. },
  326. "__collapse": true
  327. },
  328. "id": "bdb4fea2-9079-4287-8c13-97c0cd1857f5"
  329. },
  330. {
  331. "command": "EVENT_INC_VALUE",
  332. "args": {
  333. "variable": "6",
  334. "__collapse": true
  335. },
  336. "id": "85c8935d-2d7e-4f2d-aa3e-47848d0d9a7c"
  337. }
  338. ]
  339. },
  340. "id": "56f208bb-1360-4ba9-941c-9708f6fd061f"
  341. }
  342. ],
  343. "false": [
  344. {
  345. "command": "EVENT_IF",
  346. "args": {
  347. "condition": {
  348. "type": "eq",
  349. "valueA": {
  350. "type": "variable",
  351. "value": "12"
  352. },
  353. "valueB": {
  354. "type": "number",
  355. "value": 3
  356. }
  357. },
  358. "__collapseElse": true
  359. },
  360. "children": {
  361. "true": [
  362. {
  363. "command": "EVENT_TEXT",
  364. "args": {
  365. "text": [
  366. "Whoosh."
  367. ],
  368. "__section": "text",
  369. "avatarId": "",
  370. "minHeight": 4,
  371. "maxHeight": 7,
  372. "textX": 1,
  373. "textY": 1,
  374. "textHeight": 5,
  375. "position": "bottom",
  376. "clearPrevious": true,
  377. "showFrame": "true",
  378. "speedIn": -1,
  379. "speedOut": -1,
  380. "closeWhen": "key",
  381. "closeButton": "a",
  382. "closeDelayTime": 0.5,
  383. "closeDelayFrames": 30,
  384. "__collapse": true
  385. },
  386. "id": "2353f7fd-25ce-4cea-b1e9-1f75ac3b83a5"
  387. }
  388. ],
  389. "false": []
  390. },
  391. "id": "8f0a6115-c406-416c-8635-3ac74e0fd218"
  392. }
  393. ]
  394. },
  395. "id": "9d0a216f-5622-4edb-8be4-fdccc585da14"
  396. },
  397. {
  398. "command": "EVENT_IF",
  399. "args": {
  400. "condition": {
  401. "type": "gt",
  402. "valueA": {
  403. "type": "variable",
  404. "value": "1"
  405. },
  406. "valueB": {
  407. "type": "number",
  408. "value": 0
  409. }
  410. },
  411. "__collapseElse": true,
  412. "__collapse": false
  413. },
  414. "children": {
  415. "true": [
  416. {
  417. "command": "EVENT_SET_VALUE",
  418. "args": {
  419. "variable": "12",
  420. "value": {
  421. "type": "expression",
  422. "value": "rnd(2)"
  423. },
  424. "__collapse": false
  425. },
  426. "id": "b1ab22f9-88af-4cce-b7d8-559267a871c6"
  427. },
  428. {
  429. "command": "EVENT_IF",
  430. "args": {
  431. "condition": {
  432. "type": "eq",
  433. "valueA": {
  434. "type": "variable",
  435. "value": "12"
  436. },
  437. "valueB": {
  438. "type": "number",
  439. "value": 0
  440. }
  441. },
  442. "__collapseElse": true,
  443. "__collapse": true
  444. },
  445. "children": {
  446. "true": [
  447. {
  448. "command": "EVENT_SET_VALUE",
  449. "args": {
  450. "variable": "11",
  451. "value": {
  452. "type": "expression",
  453. "value": "1 + rnd($05$-1)"
  454. }
  455. },
  456. "id": "40b7531f-0f34-48df-aa69-3bf2b6893d9b"
  457. },
  458. {
  459. "command": "EVENT_TEXT",
  460. "args": {
  461. "text": [
  462. "The enemy dealed\n$11$ damage(s)"
  463. ],
  464. "__section": "text",
  465. "avatarId": "",
  466. "minHeight": 4,
  467. "maxHeight": 7,
  468. "textX": 1,
  469. "textY": 1,
  470. "textHeight": 5,
  471. "position": "bottom",
  472. "clearPrevious": true,
  473. "showFrame": "true",
  474. "speedIn": -1,
  475. "speedOut": -1,
  476. "closeWhen": "key",
  477. "closeButton": "a",
  478. "closeDelayTime": 0.5,
  479. "closeDelayFrames": 30,
  480. "__collapse": false
  481. },
  482. "id": "d93a10f5-9cef-4624-b034-738d13fd5fa1"
  483. },
  484. {
  485. "command": "EVENT_SET_VALUE",
  486. "args": {
  487. "variable": "0",
  488. "value": {
  489. "type": "expression",
  490. "value": "max(0, $00$ - $11$)"
  491. },
  492. "__collapse": false
  493. },
  494. "id": "f5aafac1-e985-47f2-b2e8-7aebd0804b20"
  495. },
  496. {
  497. "command": "EVENT_IF",
  498. "args": {
  499. "condition": {
  500. "type": "lte",
  501. "valueA": {
  502. "type": "variable",
  503. "value": "0"
  504. },
  505. "valueB": {
  506. "type": "number",
  507. "value": 0
  508. }
  509. },
  510. "__collapseElse": true
  511. },
  512. "children": {
  513. "true": [
  514. {
  515. "command": "EVENT_CALL_CUSTOM_EVENT",
  516. "args": {
  517. "customEventId": "058cb3f2-19ed-4fdd-a966-a97ae6b63e60"
  518. },
  519. "id": "ed5412b7-50ac-4897-8a10-2a9394bd7d1d"
  520. }
  521. ],
  522. "false": []
  523. },
  524. "id": "f3011093-5d2f-4a70-bed7-935d94b9a062"
  525. }
  526. ],
  527. "false": []
  528. },
  529. "id": "f842f2e5-3ec7-4eb6-a7e4-297f6ac1acfe"
  530. },
  531. {
  532. "command": "EVENT_IF",
  533. "args": {
  534. "condition": {
  535. "type": "eq",
  536. "valueA": {
  537. "type": "variable",
  538. "value": "12"
  539. },
  540. "valueB": {
  541. "type": "number",
  542. "value": 1
  543. }
  544. },
  545. "__collapseElse": true,
  546. "__collapse": false
  547. },
  548. "children": {
  549. "true": [
  550. {
  551. "command": "EVENT_SET_VALUE",
  552. "args": {
  553. "variable": "11",
  554. "value": {
  555. "type": "expression",
  556. "value": "rnd($06$)"
  557. },
  558. "__collapse": false
  559. },
  560. "id": "27caa270-55d2-4a5e-90d5-fe54ae4bf626"
  561. },
  562. {
  563. "command": "EVENT_TEXT",
  564. "args": {
  565. "text": [
  566. "The enemy healed \n$11$ HPs"
  567. ],
  568. "__section": "text",
  569. "avatarId": "",
  570. "minHeight": 4,
  571. "maxHeight": 7,
  572. "textX": 1,
  573. "textY": 1,
  574. "textHeight": 5,
  575. "position": "bottom",
  576. "clearPrevious": true,
  577. "showFrame": "true",
  578. "speedIn": -1,
  579. "speedOut": -1,
  580. "closeWhen": "key",
  581. "closeButton": "a",
  582. "closeDelayTime": 0.5,
  583. "closeDelayFrames": 30,
  584. "__collapse": true
  585. },
  586. "id": "915ecbab-229d-404e-8524-f5e7a2138ccd"
  587. },
  588. {
  589. "command": "EVENT_SET_VALUE",
  590. "args": {
  591. "variable": "1",
  592. "value": {
  593. "type": "expression",
  594. "value": "min(8, $01$ + $11$)"
  595. },
  596. "__collapse": false
  597. },
  598. "id": "db91e0e5-c11e-432f-83ef-6bbf54ecc377"
  599. }
  600. ],
  601. "false": []
  602. },
  603. "id": "615d25ae-0c8a-432c-a308-6b4b323bbd3a"
  604. }
  605. ],
  606. "false": []
  607. },
  608. "id": "5cd3130a-52bc-405e-a4ef-f5fb725ef201"
  609. }
  610. ]
  611. }