Нет описания

battle_script.h 21KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246
  1. #include <attack_names.h>
  2. @@ Banks
  3. #define BANK_USER 1
  4. #define BANK_TARGET 0
  5. @@ Delay
  6. #define DELAY_HALFSECOND 0x20
  7. #define DELAY_1SECOND 0x40
  8. @@ Compare operands
  9. .equ Equal, 0x0
  10. .equ Notequal, 0x1
  11. .equ Inferior, 0x2
  12. .equ Superior, 0x3
  13. .equ Anded, 0x4
  14. @@@@@@@@@@@@@@@@@ Macro
  15. @@ Super commands
  16. .macro calculatedamage
  17. .word 0x7060504
  18. .endm
  19. @@ Custom commands
  20. .macro callasm callasm_routine
  21. .byte 0xF8
  22. .word \callasm_routine
  23. .endm
  24. .macro setword setword_address setword_word
  25. .byte 0xF9
  26. .word \setword_address
  27. .word \setword_word
  28. .endm
  29. @@ Index commands
  30. .macro attackcanceler
  31. .byte 0
  32. .endm
  33. .macro accuracycheck accuracycheck_address accuracycheck_parameter1
  34. .byte 1
  35. .word \accuracycheck_address
  36. .hword \accuracycheck_parameter1
  37. .endm
  38. .macro attackstring
  39. .byte 2
  40. .endm
  41. .macro ppreduce
  42. .byte 3
  43. .endm
  44. .macro critcalc
  45. .byte 4
  46. .endm
  47. .macro cmd5
  48. .byte 5
  49. .endm
  50. .macro cmd6
  51. .byte 6
  52. .endm
  53. .macro cmd7
  54. .byte 7
  55. .endm
  56. .macro cmd8
  57. .byte 8
  58. .endm
  59. .macro attackanimation
  60. .byte 9
  61. .endm
  62. .macro waitanimation
  63. .byte 0xA
  64. .endm
  65. .macro graphicalhpupdate graphicalhpupdate_bank
  66. .byte 0xB
  67. .byte \graphicalhpupdate_bank
  68. .endm
  69. .macro datahpupdate datahpupdate_bank
  70. .byte 0xC
  71. .byte \datahpupdate_bank
  72. .endm
  73. .macro critmessage
  74. .byte 0xD
  75. .endm
  76. .macro missmessage
  77. .byte 0xE
  78. .endm
  79. .macro resultmessage
  80. .byte 0xF
  81. .endm
  82. .macro printstring printstring_string
  83. .byte 0x10
  84. .hword \printstring_string
  85. .endm
  86. .macro printstring2 printstring2_string
  87. .byte 0x11
  88. .hword \printstring2_string
  89. .endm
  90. .macro waitmessage waitmessage_delay
  91. .byte 0x12
  92. .hword \waitmessage_delay
  93. .endm
  94. .macro printfromtable printfromtable_table
  95. .byte 0x13
  96. .word \printfromtable_table
  97. .endm
  98. .macro printfromtable2 printfromtable2_table
  99. .byte 0x14
  100. .word \printfromtable2_table
  101. .endm
  102. .macro seteffectwithchancetarget
  103. .byte 0x15
  104. .endm
  105. .macro seteffecttarget
  106. .byte 0x16
  107. .endm
  108. .macro seteffectuser
  109. .byte 0x17
  110. .endm
  111. .macro clearstatus clearstatus_bank
  112. .byte 0x18
  113. .byte \clearstatus_bank
  114. .endm
  115. .macro faintpokemon faintpokemon_parameter1 faintpokemon_parameter2 faintpokemon_parameter3
  116. .byte 0x19
  117. .byte \faintpokemon_parameter1
  118. .byte \faintpokemon_parameter2
  119. .word \faintpokemon_parameter3
  120. .endm
  121. .macro cmd1a cmd1a_parameter1
  122. .byte 0x1A
  123. .byte cmd1a_parameter1
  124. .endm
  125. .macro cmd1b cmd1b_bank
  126. .byte 0x1B
  127. .byte \cmd1b_bank
  128. .endm
  129. .macro jumpifstatus jumpifstatus_bank jumpifstatus_status jumpifstatus_address
  130. .byte 0x1C
  131. .byte \jumpifstatus_bank
  132. .word \jumpifstatus_status
  133. .word \jumpifstatus_address
  134. .endm
  135. .macro jumpifsecondarytstatus jumpifsecondarytstatus_bank jumpifsecondarytstatus_status jumpifsecondarytstatus_address
  136. .byte 0x1D
  137. .byte \jumpifsecondarytstatus_bank
  138. .word \jumpifsecondarytstatus_status
  139. .word \jumpifsecondarytstatus_address
  140. .endm
  141. .macro jumpifability jumpifability_bank jumpifability_ability jumpifability_address
  142. .byte 0x1E
  143. .byte \jumpifability_bank
  144. .byte \jumpifability_ability
  145. .word \jumpifability_address
  146. .endm
  147. .macro jumpifhalverset jumpifhalverset_bank jumpifhalverset_status jumpifhalverset_address
  148. .byte 0x1F
  149. .byte \jumpifhalverset_bank
  150. .hword \jumpifhalverset_status
  151. .word \jumpifhalverset_address
  152. .endm
  153. .macro jumpifstat jumpifstat_bank jumpifstat_flag jumpifstat_quantity jumpifstat_statid jumpifstat_address
  154. .byte 0x20
  155. .byte \jumpifstat_bank
  156. .byte \jumpifstat_flag
  157. .byte \jumpifstat_quantity
  158. .byte \jumpifstat_statid
  159. .word \jumpifstat_address
  160. .endm
  161. .macro jumpifspecialstatusflag jumpifspecialstatusflag_bank jumpifspecialstatusflag_word_to_and jumpifspecialstatusflag_statut jumpifspecialstatusflag_address
  162. .byte 0x21
  163. .byte \jumpifspecialstatusflag_bank
  164. .word \jumpifspecialstatusflag_word_to_and
  165. .byte \jumpifspecialstatusflag_statut
  166. .word \jumpifspecialstatusflag_address
  167. .endm
  168. .macro jumpiftype jumpiftype_bank jumpiftype_type jumpiftype_address
  169. .byte 0x22
  170. .byte \jumpiftype_bank
  171. .byte \jumpiftype_type
  172. .word \jumpiftype_address
  173. .endm
  174. .macro cmd23 cmd23_side_or_bank
  175. .byte 0x23
  176. .byte \cmd23_side_or_bank
  177. .endm
  178. .macro gotoandsomething gotoandsomething_address
  179. .byte 0x24
  180. .word \gotoandsomething_address
  181. .endm
  182. .macro cmd25
  183. .byte 0x25
  184. .endm
  185. .macro cmd26 cmd26_param1
  186. .byte 0x26
  187. .byte \cmd26_param1
  188. .endm
  189. .macro cmd27 cmd27_address
  190. .byte 0x27
  191. .word \cmd27_address
  192. .endm
  193. .macro goto goto_address
  194. .byte 0x28
  195. .word \goto_address
  196. .endm
  197. .macro jumpifbyte jumpifbyte_ifflag jumpifbyte_checkaddr jumpifbyte_compare jumpifbyte_address
  198. .byte 0x29
  199. .byte \jumpifbyte_ifflag
  200. .word \jumpifbyte_checkaddr
  201. .byte \jumpifbyte_compare
  202. .word \jumpifbyte_address
  203. .endm
  204. .macro jumpifhalfword jumpifhalfword_ifflag jumpifhalfword_checkaddr jumpifhalfword_compare jumpifhalfword_address
  205. .byte 0x2A
  206. .byte \jumpifhalfword_ifflag
  207. .word \jumpifhalfword_checkaddr
  208. .hword \jumpifhalfword_compare
  209. .word \jumpifhalfword_address
  210. .endm
  211. .macro jumpifword jumpifword_ifflag jumpifword_checkaddr jumpifword_compare jumpifword_address
  212. .byte 0x2B
  213. .byte \jumpifword_ifflag
  214. .word \jumpifword_checkaddr
  215. .word \jumpifword_compare
  216. .word \jumpifword_address
  217. .endm
  218. .macro jumpifarrayequal jumpifarrayequal_mem1 jumpifarrayequal_mem2 jumpifarrayequal_size jumpifarrayequal_address
  219. .byte 0x2C
  220. .word \jumpifarrayequal_mem1
  221. .word \jumpifarrayequal_mem2
  222. .byte \jumpifarrayequal_size
  223. .word \jumpifarrayequal_address
  224. .endm
  225. .macro jumpifarraynotequal jumpifarraynotequal_mem1 jumpifarraynotequal_mem2 jumpifarraynotequal_size jumpifarraynotequal_address
  226. .byte 0x2D
  227. .word \jumpifarraynotequal_mem1
  228. .word \jumpifarraynotequal_mem2
  229. .byte \jumpifarraynotequal_size
  230. .word \jumpifarraynotequal_address
  231. .endm
  232. .macro setbyte setbyte_pointer setbyte_value
  233. .byte 0x2E
  234. .word \setbyte_pointer
  235. .byte \setbyte_value
  236. .endm
  237. .macro addbyte addbyte_pointer addbyte_value
  238. .byte 0x2F
  239. .word \addbyte_pointer
  240. .byte \addbyte_value
  241. .endm
  242. .macro subtractbyte subtractbyte_pointer subtractbyte_value
  243. .byte 0x30
  244. .word \subtractbyte_pointer
  245. .byte \subtractbyte_value
  246. .endm
  247. .macro copyarray copyarray_destination copyarray_source copyarray_size
  248. .byte 0x31
  249. .word \copyarray_destination
  250. .word \copyarray_source
  251. .byte \copyarray_size
  252. .endm
  253. .macro cmd32 cmd32_param1 cmd32_param2 cmd32_param3 cmd32_byte
  254. .byte 0x32
  255. .word \cmd32_param1
  256. .word \cmd32_param2
  257. .word \cmd32_param3
  258. .byte \cmd32_byte
  259. .endm
  260. .macro orbyte orbyte_pointer orbyte_value
  261. .byte 0x33
  262. .word \orbyte_pointer
  263. .byte \orbyte_value
  264. .endm
  265. .macro orhalfword orhalfword_pointer orhalfword_value
  266. .byte 0x34
  267. .word \orhalfword_pointer
  268. .hword \orhalfword_value
  269. .endm
  270. .macro orword orword_pointer orword_value
  271. .byte 0x35
  272. .word \orword_pointer
  273. .word \orword_value
  274. .endm
  275. .macro bicbyte bicbyte_pointer bicbyte_value
  276. .byte 0x36
  277. .word \bicbyte_pointer
  278. .byte \bicbyte_value
  279. .endm
  280. .macro bichalfword bichalfword_pointer bichalfword_value
  281. .byte 0x37
  282. .word \bichalfword_pointer
  283. .hword \bichalfword_value
  284. .endm
  285. .macro bicword bicword_pointer bicword_value
  286. .byte 0x38
  287. .word \bicword_pointer
  288. .word \bicword_value
  289. .endm
  290. .macro pause pause_duration
  291. .byte 0x39
  292. .hword \pause_duration
  293. .endm
  294. .macro waitstate
  295. .byte 0x3A
  296. .endm
  297. .macro somethinghealcmd3b somethinghealcmd3b_bank
  298. .byte 0x3B
  299. .byte \somethinghealcmd3b_bank
  300. .endm
  301. .macro return
  302. .byte 0x3C
  303. .endm
  304. .macro end
  305. .byte 0x3D
  306. .endm
  307. .macro end2
  308. .byte 0x3E
  309. .endm
  310. .macro end3
  311. .byte 0x3F
  312. .endm
  313. .macro cmd40 cmd40_address
  314. .byte 0x40
  315. .word \cmd40_address
  316. .endm
  317. .macro call call_address
  318. .byte 0x41
  319. .word \call_address
  320. .endm
  321. .macro jumpiftype2 jumpiftype2_bank jumpiftype2_type jumpiftype2_address
  322. .byte 0x42
  323. .byte \jumpiftype2_bank
  324. .byte \jumpiftype2_type
  325. .word \jumpiftype2_address
  326. .endm
  327. .macro jumpifabilitypresent jumpifabilitypresent_ability jumpifabilitypresent_address
  328. .byte 0x43
  329. .byte \jumpifabilitypresent_ability
  330. .word \jumpifabilitypresent_address
  331. .endm
  332. .macro cmd44
  333. .byte 0x44
  334. .endm
  335. .macro playanimation playanimation_bank playanimation_animation playanimation_word
  336. .byte 0x45
  337. .byte \playanimation_bank
  338. .byte \playanimation_animation
  339. .word \playanimation_word
  340. .endm
  341. .macro cmd46 cmd46_bank cmd46_address cmd46_address2
  342. .byte 0x46
  343. .byte \cmd46_bank
  344. .word \cmd46_address
  345. .word \cmd46_address2
  346. .endm
  347. .macro cmd47
  348. .byte 0x47
  349. .endm
  350. .macro playstatchangeanimation playstatchangeanimation_bank playstatchangeanimation_colour playstatchangeanimation_byte
  351. .byte 0x48
  352. .byte \playstatchangeanimation_bank
  353. .byte \playstatchangeanimation_colour
  354. .byte \playstatchangeanimation_byte
  355. .endm
  356. .macro cmd49 cmd49_byte1 cmd49_byte2
  357. .byte 0x49
  358. .byte \cmd49_byte1
  359. .byte \cmd49_byte2
  360. .endm
  361. .macro damagecalc2
  362. .byte 0x4A
  363. .endm
  364. .macro cmd4b
  365. .byte 0x4B
  366. .endm
  367. .macro switch1 switch1_bank
  368. .byte 0x4C
  369. .byte \switch1_bank
  370. .endm
  371. .macro switch2 switch2_bank
  372. .byte 0x4D
  373. .byte \switch2_bank
  374. .endm
  375. .macro switch3 switch3_bank switch3_byte
  376. .byte 0x4E
  377. .byte \switch3_bank
  378. .byte \switch3_byte
  379. .endm
  380. .macro jumpifcannotswitch jumpifcannotswitch_bank jumpifcannotswitch_address
  381. .byte 0x4F
  382. .byte \jumpifcannotswitch_bank
  383. .word \jumpifcannotswitch_address
  384. .endm
  385. .macro openpartyscreen openpartyscreen_bank openpartyscreen_address
  386. .byte 0x50
  387. .byte \openpartyscreen_bank
  388. .word \openpartyscreen_address
  389. .endm
  390. .macro cmd51 cmd51_bank cmd51_param2
  391. .byte 0x51
  392. .byte \cmd51_bank
  393. .byte \cmd51_param2
  394. .endm
  395. .macro cmd52 cmd52_bank
  396. .byte 0x52
  397. .byte \cmd52_bank
  398. .endm
  399. .macro cmd53 cmd53_bank
  400. .byte 0x53
  401. .byte \cmd53_bank
  402. .endm
  403. .macro cmd54 cmd54_hword
  404. .byte 0x54
  405. .hword \cmd54_hword
  406. .endm
  407. .macro cmd55 cmd55_word
  408. .byte 0x55
  409. .word \cmd55_word
  410. .endm
  411. .macro cmd56 cmd56_bank_or_side
  412. .byte 0x56
  413. .byte \cmd56_bank_or_side
  414. .endm
  415. .macro cmd57
  416. .byte 0x57
  417. .endm
  418. .macro cmd58 cmd58_bank
  419. .byte 0x58
  420. .byte \cmd58_bank
  421. .endm
  422. .macro checkiflearnmoveinbattle checkiflearnmoveinbattle_param1 checkiflearnmoveinbattle_param2 checkiflearnmoveinbattle_bank_maybe
  423. .byte 0x59
  424. .word \checkiflearnmoveinbattle_param1
  425. .word \checkiflearnmoveinbattle_param2
  426. .byte \checkiflearnmoveinbattle_bank_maybe
  427. .endm
  428. .macro cmd5a cmd5a_address
  429. .byte 0x5A
  430. .word \cmd5a_address
  431. .endm
  432. .macro cmd5b cmd5b_address
  433. .byte 0x5B
  434. .word \cmd5b_address
  435. .endm
  436. .macro cmd5c cmd5c_bank
  437. .byte 0x5C
  438. .byte \cmd5c_bank
  439. .endm
  440. .macro cmd5d
  441. .byte 0x5D
  442. .endm
  443. .macro cmd5e cmd5e_bank
  444. .byte 0x5E
  445. .byte \cmd5e_bank
  446. .endm
  447. .macro cmd5f
  448. .byte 0x5F
  449. .endm
  450. .macro cmd60 cmd60_byte
  451. .byte 0x60
  452. .byte \cmd60_byte
  453. .endm
  454. .macro cmd61 cmd61_bank_or_side
  455. .byte 0x61
  456. .byte \cmd61_bank_or_side
  457. .endm
  458. .macro cmd62 cmd62_bank_or_side
  459. .byte 0x62
  460. .byte \cmd62_bank_or_side
  461. .endm
  462. .macro jumptoattack jumptoattack_bank
  463. .byte 0x63
  464. .byte \jumptoattack_bank
  465. .endm
  466. .macro statusanimation statusanimation_bank
  467. .byte 0x64
  468. .byte \statusanimation_bank
  469. .endm
  470. .macro cmd65 cmd65_bank_or_side cmd65_address
  471. .byte 0x65
  472. .byte \cmd65_bank_or_side
  473. .word \cmd65_address
  474. .endm
  475. .macro cmd66 cmd66_bank_or_side cmd66_bank_or_side2 cmd66_address
  476. .byte 0x66
  477. .byte \cmd66_bank_or_side
  478. .byte \cmd66_bank_or_side2
  479. .word \cmd66_address
  480. .endm
  481. .macro cmd67
  482. .byte 0x67
  483. .endm
  484. .macro cmd68
  485. .byte 0x68
  486. .endm
  487. .macro cmd69
  488. .byte 0x69
  489. .endm
  490. .macro removeitem removeitem_bank
  491. .byte 0x6A
  492. .byte \removeitem_bank
  493. .endm
  494. .macro cmd6b
  495. .byte 0x6B
  496. .endm
  497. .macro cmd6c
  498. .byte 0x6C
  499. .endm
  500. .macro cmd6d
  501. .byte 0x6D
  502. .endm
  503. .macro cmd6e
  504. .byte 0x6E
  505. .endm
  506. .macro cmd6f cmd6f_bank
  507. .byte 0x6F
  508. .byte \cmd6f_bank
  509. .endm
  510. .macro cmd70 cmd70_bank
  511. .byte 0x70
  512. .byte \cmd70_bank
  513. .endm
  514. .macro cmd71
  515. .byte 0x71
  516. .endm
  517. .macro cmd72 cmd72_address
  518. .byte 0x72
  519. .word \cmd72_address
  520. .endm
  521. .macro cmd73 cmd73_bank
  522. .byte 0x73
  523. .byte \cmd73_bank
  524. .endm
  525. .macro cmd74 cmd74_bank
  526. .byte 0x74
  527. .byte \cmd74_bank
  528. .endm
  529. .macro cmd75
  530. .byte 0x75
  531. .endm
  532. .macro cmd76 cmd76_bank cmd76_byte
  533. .byte 0x76
  534. .byte \cmd76_bank
  535. .byte \cmd76_byte
  536. .endm
  537. .macro setprotect
  538. .byte 0x77
  539. .endm
  540. .macro faintifabilitynotdamp
  541. .byte 0x78
  542. .endm
  543. .macro setuserhptozero
  544. .byte 0x79
  545. .endm
  546. .macro jumpwhiletargetvalid jumpwhiletargetvalid_address
  547. .byte 0x7A
  548. .word \jumpwhiletargetvalid_address
  549. .endm
  550. .macro setdamageasrestorehalfmaxhp setdamageasrestorehalfmaxhp_address setdamageasrestorehalfmaxhp_byte
  551. .byte 0x7B
  552. .word \setdamageasrestorehalfmaxhp_address
  553. .byte \setdamageasrestorehalfmaxhp_byte
  554. .endm
  555. .macro jumptolastusedattack
  556. .byte 0x7C
  557. .endm
  558. .macro setrain
  559. .byte 0x7D
  560. .endm
  561. .macro setreflect
  562. .byte 0x7E
  563. .endm
  564. .macro setleechseed
  565. .byte 0x7F
  566. .endm
  567. .macro manipulatedamage
  568. .byte 0x80
  569. .endm
  570. .macro setrest setrest_address
  571. .byte 0x81
  572. .word \setrest_address
  573. .endm
  574. .macro jumpifnotfirstturn jumpifnotfirstturn_address
  575. .byte 0x82
  576. .word \jumpifnotfirstturn_address
  577. .endm
  578. .macro nop3
  579. .byte 0x83
  580. .endm
  581. .macro jumpifcannotsleep jumpifcannotsleep_address
  582. .byte 0x84
  583. .word \jumpifcannotsleep_address
  584. .endm
  585. .macro stockpile
  586. .byte 0x85
  587. .endm
  588. .macro stockpiletobasedamage stockpiletobasedamage_address
  589. .byte 0x86
  590. .word \stockpiletobasedamage_address
  591. .endm
  592. .macro stockpiletohprecovery stockpiletohprecovery_address
  593. .byte 0x87
  594. .word \stockpiletohprecovery_address
  595. .endm
  596. .macro negativedamage
  597. .byte 0x88
  598. .endm
  599. .macro statbuffchange statbuffchange_target statbuffchange_address
  600. .byte 0x89
  601. .byte \statbuffchange_target
  602. .word \statbuffchange_address
  603. .endm
  604. .macro normalisebuffs
  605. .byte 0x8A
  606. .endm
  607. .macro setbide
  608. .byte 0x8B
  609. .endm
  610. .macro confuseifrepeatingattackends
  611. .byte 0x8C
  612. .endm
  613. .macro setloopcounter setloopcounter_number_of_loop
  614. .byte 0x8D
  615. .byte \setloopcounter_number_of_loop
  616. .endm
  617. .macro cmd8e
  618. .byte 0x8E
  619. .endm
  620. .macro forcerandomswitch forcerandomswitch_address
  621. .byte 0x8F
  622. .word \forcerandomswitch_address
  623. .endm
  624. .macro changetypestoenemyattacktype changetypestoenemyattacktype_address
  625. .byte 0x90
  626. .word \changetypestoenemyattacktype_address
  627. .endm
  628. .macro givemoney
  629. .byte 0x91
  630. .endm
  631. .macro setlightscreen
  632. .byte 0x92
  633. .endm
  634. .macro koplussomethings koplussomethings_address
  635. .byte 0x93
  636. .word \koplussomethings_address
  637. .endm
  638. .macro gethalfcurrentenemyhp
  639. .byte 0x94
  640. .endm
  641. .macro setsandstorm
  642. .byte 0x95
  643. .endm
  644. .macro weatherdamage
  645. .byte 0x96
  646. .endm
  647. .macro tryinfatuatetarget tryinfatuatetarget_address
  648. .byte 0x97
  649. .word \tryinfatuatetarget_address
  650. .endm
  651. .macro cmd98 cmd98_byte
  652. .byte 0x98
  653. .byte \cmd98_byte
  654. .endm
  655. .macro setmisteffect
  656. .byte 0x99
  657. .endm
  658. .macro setincreasedcriticalchance
  659. .byte 0x9A
  660. .endm
  661. .macro transformdataexecution
  662. .byte 0x9B
  663. .endm
  664. .macro setsubstituteeffect
  665. .byte 0x9C
  666. .endm
  667. .macro copyattack copyattack_address
  668. .byte 0x9D
  669. .word \copyattack_address
  670. .endm
  671. .macro metronomeeffect
  672. .byte 0x9E
  673. .endm
  674. .macro nightshadedamageeffect
  675. .byte 0x9F
  676. .endm
  677. .macro psywavedamageeffect
  678. .byte 0xA0
  679. .endm
  680. .macro counterdamagecalculator counterdamagecalculator_address
  681. .byte 0xA1
  682. .word \counterdamagecalculator_address
  683. .endm
  684. .macro mirrorcoatdamagecalculator mirrorcoatdamagecalculator_address
  685. .byte 0xA2
  686. .word \mirrorcoatdamagecalculator_address
  687. .endm
  688. .macro disablelastusedattack disablelastusedattack_address
  689. .byte 0xA3
  690. .word \disablelastusedattack_address
  691. .endm
  692. .macro setencore setencore_address
  693. .byte 0xA4
  694. .word \setencore_address
  695. .endm
  696. .macro painsplitdamagecalculator painsplitdamagecalculator_address
  697. .byte 0xA5
  698. .word \painsplitdamagecalculator_address
  699. .endm
  700. .macro settypetorandomresistance settypetorandomresistance_address
  701. .byte 0xA6
  702. .word \settypetorandomresistance_address
  703. .endm
  704. .macro setalwayshitflag
  705. .byte 0xA7
  706. .endm
  707. .macro copymovepermanently copymovepermanently_address
  708. .byte 0xA8
  709. .word \copymovepermanently_address
  710. .endm
  711. .macro selectrandommovefromusermoves selectrandommovefromusermoves_address
  712. .byte 0xA9
  713. .word \selectrandommovefromusermoves_address
  714. .endm
  715. .macro destinybondeffect
  716. .byte 0xAA
  717. .endm
  718. .macro cmdab
  719. .byte 0xAB
  720. .endm
  721. .macro remaininghptopower
  722. .byte 0xAC
  723. .endm
  724. .macro reducepprandom reducepprandom_address
  725. .byte 0xAD
  726. .word \reducepprandom_address
  727. .endm
  728. .macro clearstatusifnotsoundproofed
  729. .byte 0xAE
  730. .endm
  731. .macro cursetarget cursetarget_address
  732. .byte 0xAF
  733. .word \cursetarget_address
  734. .endm
  735. .macro setspikes setspikes_address
  736. .byte 0xB0
  737. .word \setspikes_address
  738. .endm
  739. .macro setforesight
  740. .byte 0xB1
  741. .endm
  742. .macro setperishsong setperishsong_address
  743. .byte 0xB2
  744. .word \setperishsong_address
  745. .endm
  746. .macro rolloutdamagecalculation
  747. .byte 0xB3
  748. .endm
  749. .macro jumpifconfusedandattackmaxed jumpifconfusedandattackmaxed_bank jumpifconfusedandattackmaxed_address
  750. .byte 0xB4
  751. .byte \jumpifconfusedandattackmaxed_bank
  752. .word \jumpifconfusedandattackmaxed_address
  753. .endm
  754. .macro furycutterdamagecalculation
  755. .byte 0xB5
  756. .endm
  757. .macro happinesstodamagecalculation
  758. .byte 0xB6
  759. .endm
  760. .macro presentdamagecalculation
  761. .byte 0xB7
  762. .endm
  763. .macro setsafeguard
  764. .byte 0xB8
  765. .endm
  766. .macro magnitudedamagecalculation
  767. .byte 0xB9
  768. .endm
  769. .macro cmdba cmdba_address
  770. .byte 0xBA
  771. .word \cmdba_address
  772. .endm
  773. .macro setsunny
  774. .byte 0xBB
  775. .endm
  776. .macro maxattackhalvehp maxattackhalvehp_address
  777. .byte 0xBC
  778. .word \maxattackhalvehp_address
  779. .endm
  780. .macro copyfoestats copyfoestats_address
  781. .byte 0xBD
  782. .word \copyfoestats_address
  783. .endm
  784. .macro breakfree
  785. .byte 0xBE
  786. .endm
  787. .macro setcurled
  788. .byte 0xBF
  789. .endm
  790. .macro recoverbasedonsunlight
  791. .byte 0xC0
  792. .endm
  793. .macro hiddenpowerdamagecalculation
  794. .byte 0xC1
  795. .endm
  796. .macro selectnexttarget
  797. .byte 0xC2
  798. .endm
  799. .macro setfutureattack setfutureattack_address
  800. .byte 0xC3
  801. .word \setfutureattack_address
  802. .endm
  803. .macro beatupcalculation beatupcalculation_address1 beatupcalculation_address2
  804. .byte 0xC4
  805. .word \beatupcalculation_address1
  806. .word \beatupcalculation_address2
  807. .endm
  808. .macro hidepreattack
  809. .byte 0xC5
  810. .endm
  811. .macro unhidepostattack
  812. .byte 0xC6
  813. .endm
  814. .macro setminimize
  815. .byte 0xC7
  816. .endm
  817. .macro sethail
  818. .byte 0xC8
  819. .endm
  820. .macro jumpifattackandspecialattackcannotfall jumpifattackandspecialattackcannotfall_address
  821. .byte 0xC9
  822. .word \jumpifattackandspecialattackcannotfall_address
  823. .endm
  824. .macro setforcedtarget
  825. .byte 0xCA
  826. .endm
  827. .macro setcharge
  828. .byte 0xCB
  829. .endm
  830. .macro callterrainattack
  831. .byte 0xCC
  832. .endm
  833. .macro cureifburnedparalysedorpoisoned cureifburnedparalysedorpoisoned_address
  834. .byte 0xCD
  835. .word \cureifburnedparalysedorpoisoned_address
  836. .endm
  837. .macro settorment settorment_address
  838. .byte 0xCE
  839. .word \settorment_address
  840. .endm
  841. .macro jumpifnodamage jumpifnodamage_address
  842. .byte 0xCF
  843. .word \jumpifnodamage_address
  844. .endm
  845. .macro settaunt settaunt_address
  846. .byte 0xD0
  847. .word \settaunt_address
  848. .endm
  849. .macro sethelpinghand sethelpinghand_address
  850. .byte 0xD1
  851. .word \sethelpinghand_address
  852. .endm
  853. .macro itemswap itemswap_address
  854. .byte 0xD2
  855. .word \itemswap_address
  856. .endm
  857. .macro copyability copyability_address
  858. .byte 0xD3
  859. .word \copyability_address
  860. .endm
  861. .macro cmdd4 cmdd4_byte cmdd4_address
  862. .byte 0xD4
  863. .byte \cmdd4_byte
  864. .word \cmdd4_address
  865. .endm
  866. .macro setroots setroots_address
  867. .byte 0xD5
  868. .word \setroots_address
  869. .endm
  870. .macro doubledamagedealtifdamaged
  871. .byte 0xD6
  872. .endm
  873. .macro setyawn setyawn_address
  874. .byte 0xD7
  875. .word \setyawn_address
  876. .endm
  877. .macro setdamagetohealthdifference setdamagetohealthdifference_address
  878. .byte 0xD8
  879. .word \setdamagetohealthdifference_address
  880. .endm
  881. .macro scaledamagebyhealthratio
  882. .byte 0xD9
  883. .endm
  884. .macro abilityswap abilityswap_address
  885. .byte 0xDA
  886. .word \abilityswap_address
  887. .endm
  888. .macro imprisoneffect imprisoneffect_address
  889. .byte 0xDB
  890. .word \imprisoneffect_address
  891. .endm
  892. .macro setgrudge setgrudge_address
  893. .byte 0xDC
  894. .word \setgrudge_address
  895. .endm
  896. .macro weightdamagecalculation
  897. .byte 0xDD
  898. .endm
  899. .macro assistattackselect assistattackselect_address
  900. .byte 0xDE
  901. .word \assistattackselect_address
  902. .endm
  903. .macro setmagiccoat setmagiccoat_address
  904. .byte 0xDF
  905. .word \setmagiccoat_address
  906. .endm
  907. .macro setstealstatchange setstealstatchange_address
  908. .byte 0xE0
  909. .word \setstealstatchange_address
  910. .endm
  911. .macro cmde1 cmde1_address
  912. .byte 0xE1
  913. .word \cmde1_address
  914. .endm
  915. .macro cmde2 cmde2_bank
  916. .byte 0xE2
  917. .byte \cmde2_bank
  918. .endm
  919. .macro jumpiffainted jumpiffainted_bank jumpiffainted_address
  920. .byte 0xE3
  921. .byte \jumpiffainted_bank
  922. .word \jumpiffainted_address
  923. .endm
  924. .macro naturepowereffect
  925. .byte 0xE4
  926. .endm
  927. .macro pickupitemcalculation
  928. .byte 0xE5
  929. .endm
  930. .macro actualcastformswitch
  931. .byte 0xE6
  932. .endm
  933. .macro castformswitch
  934. .byte 0xE7
  935. .endm
  936. .macro settypebasedhalvers settypebasedhalvers_address
  937. .byte 0xE8
  938. .word \settypebasedhalvers_address
  939. .endm
  940. .macro seteffectbyweather
  941. .byte 0xE9
  942. .endm
  943. .macro recycleitem recycleitem_address
  944. .byte 0xEA
  945. .word \recycleitem_address
  946. .endm
  947. .macro settypetoterrain settypetoterrain_address
  948. .byte 0xEB
  949. .word \settypetoterrain_address
  950. .endm
  951. .macro pursuitwhenswitched pursuitwhenswitched_address
  952. .byte 0xEC
  953. .word \pursuitwhenswitched_address
  954. .endm
  955. .macro snatchmove
  956. .byte 0xED
  957. .endm
  958. .macro removereflectlightscreen
  959. .byte 0xEE
  960. .endm
  961. .macro pokemoncatchfunction
  962. .byte 0xEF
  963. .endm
  964. .macro catchpoke
  965. .byte 0xF0
  966. .endm
  967. .macro capturesomethingf1 capturesomethingf1_address
  968. .byte 0xF1
  969. .word \capturesomethingf1_address
  970. .endm
  971. .macro capturesomethingf2
  972. .byte 0xF2
  973. .endm
  974. .macro capturesomethingf3 capturesomethingf3_address
  975. .byte 0xF3
  976. .word \capturesomethingf3_address
  977. .endm
  978. .macro removehp
  979. .byte 0xF4
  980. .endm
  981. .macro curestatutfirstword
  982. .byte 0xF5
  983. .endm
  984. .macro cmdf6
  985. .byte 0xF6
  986. .endm
  987. .macro activesidesomething
  988. .byte 0xF7
  989. .endm