No Description

battle_script.h 21KB

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