-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathspeedchoice.diff
21716 lines (21160 loc) · 682 KB
/
speedchoice.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff --git a/INSTALL.md b/INSTALL.md
index 20d55e134..8cadfdc2b 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -10,42 +10,49 @@
Independently from the specific OS, make sure that the `gcc`, `g++`, `make`, `git`, and `libpng-dev` packages or their equivalents are installed and accessible to the development tools that are used by the project (this means that, for example, on Windows, the packages have to be installed in the WSL environment). The package names and installation methods may vary with each OS.
-Install the devkitARM toolchain of devkitPro as per [the instructions on their wiki](https://devkitpro.org/wiki/devkitPro_pacman). On Windows, follow the Linux instructions inside WSL as any steps about the Windows installer do not apply.
+# Requirements
-**Debian-based distro users:** This applies to Debian, Ubuntu, and similar distros, including in WSL. If necessary, install the `libarchive13`, `pkg-config`, and `gdebi-core` packages to be able to install devkitPro.
+Grab the latest version of [devkitPRO](https://github.com/devkitPro/pacman/releases/latest) from their GitHub that fits your CPU architecture (arm64 or amd64)
-**Windows 10 users:** WSL 2 is available in the 1903 release (build 18362) and later, therefore existing WSL 1 and [prerelease WSL](https://docs.microsoft.com/windows/wsl/install-legacy) users are recommended to update. Right-click the Start button or press `Win`+`X`, choose Run, and run `ms-settings:about` to determine the Windows version. Also check Windows Update to make sure your installation is up-to-date.
+**Windows 10 users:** [WSL 2][wsl] is available in the 1903 release (build 18362) and later, therefore existing WSL 1 and [prerelease WSL](https://docs.microsoft.com/windows/wsl/install-legacy) users are recommended to update. Right-click the Start button or press `Win`+`X`, choose Run, and run `ms-settings:about` to determine the Windows version. Also check Windows Update to make sure your installation is up-to-date.
-**Windows 7 and 8.1 users:** pret is no longer focusing on support in pokeemerald for [old versions of Windows](https://support.microsoft.com/help/13853) so consider upgrading to a current release of Windows 10 or try a third-party guide like [this one](https://www.pokecommunity.com/showthread.php?t=425246) instead.
+**Debian-based distro users (and Windows users running WSL v2):** This applies to Debian, Ubuntu, and similar distros, including in WSL.
+1. Run `sudo apt-get install gcc g++ make git libpng-dev libarchive13 pkg-config gdebi-core`. This grabs all the requirements to move forward
+2. Run `sudo gdebi devkitpro-pacman.[arch].deb`
+3. Run `sudo dkp-pacman -S gba-dev`. When asked to select what you want to install, type `all` and click enter
+4. Add `DEVKITPRO=/opt/devkitpro` and `DEVKITARM=/opt/devkitpro/devkitARM` as environmental variables
+ * For Ubuntu, that would be `export DEVKITPRO=/opt/devkitpro` and `export DEVKITARM=/opt/devkitpro/devkitARM`
+
+You can now proceed to the installation section
+
+**Windows 7 and 8.1 users:** pret is no longer focusing on support in pokeemerald for [old versions of Windows](https://support.microsoft.com/help/13853) so consider upgrading to a current release of Windows 10 or try a third-party guide like [this one](https://www.pokecommunity.com/showthread.php?t=425246) instead. Remember to update the git clone from pret/pokeemerald to ProjectRevoTPP/pokeemerald-speedchoice
+
+**MacOS users:** Nogarremi does not have a Mac device and cannot walk somebody through that process
# Installation
To set up the repository:
- git clone https://github.com/pret/pokeemerald
git clone https://github.com/pret/agbcc
+ git clone https://github.com/ProjectRevoTPP/pokeemerald-speedchoice
cd ./agbcc
./build.sh
- ./install.sh ../pokeemerald
-
- cd ../pokeemerald
-
-To build **pokeemerald.gba** for the first time and confirm it matches the official ROM image:
-
- make compare
-
-If an OK is returned, then the installation went smoothly.
+ ./install.sh ../pokeemerald-speedchoice
-**Windows users:** Consider adding exceptions for the `pokeemerald` and `agbcc` folders in Windows Security using [these instructions](https://support.microsoft.com/help/4028485). This prevents Microsoft Defender from scanning them which might improve performance while building.
+ cd ../pokeemerald-speedchoice
+ ./build_tools.sh
+To build **pokeemerald-speedchoice.gba**:
-# Start
+ `make`
-To build **pokeemerald.gba** with your changes:
+A successful build will end with the lines:
+`arm-none-eabi-objcopy -O binary pokeemerald-speedchoice.elf pokeemerald-speedchoice.gba`
+`tools/gbafix/gbafix pokeemerald-speedchoice.gba -p --silent`
- make
+**Windows users:** Consider adding exceptions for the `pokeemerald-speedchoice` and `agbcc` folders in Windows Security using [these instructions](https://support.microsoft.com/help/4028485). This prevents Microsoft Defender from scanning them which might improve performance while building.
**macOS users:** If the base tools are not found in new Terminal sessions after the first successful build, run `echo "if [ -f ~/.bashrc ]; then . ~/.bashrc; fi" >> ~/.bash_profile` once to prevent the issue from occurring again. Verify that the `devkitarm-rules` package is installed as well; if not, install it by running `sudo dkp-pacman -S devkitarm-rules`.
diff --git a/Makefile b/Makefile
index 78a2c2a4f..80a20af95 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ EXE :=
endif
TITLE := POKEMON EMER
-GAME_CODE := BPEE
+GAME_CODE := SPDC
MAKER_CODE := 01
REVISION := 0
MODERN ?= 0
@@ -41,6 +41,8 @@ SHELL := /bin/bash -o pipefail
ELF = $(ROM:.gba=.elf)
MAP = $(ROM:.gba=.map)
+INI = $(ROM:.gba=.ini)
+PATCH := $(ROM:.gba=.xdelta)
C_SUBDIR = src
GFLIB_SUBDIR = gflib
@@ -64,7 +66,7 @@ ASFLAGS := -mcpu=arm7tdmi --defsym MODERN=$(MODERN)
ifeq ($(MODERN),0)
CC1 := tools/agbcc/bin/agbcc$(EXE)
override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm -g
-ROM := pokeemerald.gba
+ROM := pokeemerald-speedchoice.gba
OBJ_DIR := build/emerald
LIBPATH := -L ../../tools/agbcc/lib
else
@@ -94,6 +96,8 @@ RAMSCRGEN := tools/ramscrgen/ramscrgen$(EXE)
FIX := tools/gbafix/gbafix$(EXE)
MAPJSON := tools/mapjson/mapjson$(EXE)
JSONPROC := tools/jsonproc/jsonproc$(EXE)
+INIGEN := tools/inigen/inigen$(EXE)
+XDELTA := xdelta3
TOOLDIRS := $(filter-out tools/agbcc tools/binutils,$(wildcard tools/*))
TOOLBASE = $(TOOLDIRS:tools/%=%)
@@ -117,7 +121,7 @@ infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst
# Build tools when building the rom
# Disable dependency scanning for clean/tidy/tools
-ifeq (,$(filter-out all rom compare modern berry_fix libagbsyscall,$(MAKECMDGOALS)))
+ifeq (,$(filter-out all rom compare modern berry_fix libagbsyscall release,$(MAKECMDGOALS)))
$(call infoshell, $(MAKE) tools)
else
NODEP := 1
@@ -169,6 +173,12 @@ ifeq ($(COMPARE),1)
@$(SHA1) rom.sha1
endif
+release: ini patch
+
+ini: $(INI)
+
+patch: $(PATCH)
+
# For contributors to make sure a change didn't affect the contents of the ROM.
compare: ; @$(MAKE) COMPARE=1
@@ -345,3 +355,12 @@ berry_fix:
libagbsyscall:
@$(MAKE) -C libagbsyscall TOOLCHAIN=$(TOOLCHAIN)
+
+$(INI): $(ROM)
+ $(INIGEN) $(ELF) $@ --name "Emerald Speedchoice (U)" --code $(GAME_CODE)
+ echo "MD5Hash="$(shell md5sum $< | cut -d' ' -f1) >> $@
+
+$(PATCH): $(ROM)
+ $(XDELTA) -f -e -s baserom.gba $< $@
+
+print-% : ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true
diff --git a/README.md b/README.md
index 2c3447abc..553f68d8d 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,12 @@
-# Pokémon Emerald
+# Pokémon Emerald Speedchoice Edition
-[![Build Status][travis-badge]][travis]
+This is a decompilation of Pokémon Emerald with changes made to be more speedrun friendly.
-[travis]: https://travis-ci.org/pret/pokeemerald
-[travis-badge]: https://travis-ci.org/pret/pokeemerald.svg?branch=master
-
-This is a decompilation of Pokémon Emerald.
+* [Original decompilation by pret](https://github.com/pret/pokeemerald)
It builds the following ROM:
-* [**pokeemerald.gba**](https://datomatic.no-intro.org/index.php?page=show_record&s=23&n=1961) `sha1: f3ae088181bf583e55daf962a92bb46f4f1d07b7`
+* pokeemerald-speedchoice.gba
To set up the repository, see [INSTALL.md](INSTALL.md).
diff --git a/asm/macros/event.inc b/asm/macros/event.inc
index eafd19b1c..1287e0c34 100644
--- a/asm/macros/event.inc
+++ b/asm/macros/event.inc
@@ -1614,6 +1614,13 @@
.2byte \quantity
.endm
+ @ speedchoice option checking command for checking if a specific
+ @ setting on a specific option is set.
+ .macro checkspeedchoice option:req, setting:req
+ .byte 0xe3
+ .byte \option
+ .byte \setting
+ .endm
@ Supplementary
diff --git a/constants/global.inc b/constants/global.inc
index 621ba2af8..8bdc49d8d 100644
--- a/constants/global.inc
+++ b/constants/global.inc
@@ -20,3 +20,96 @@
.set OBJ_IMAGE_ANIM_H_FLIP, 1 << 6
.set OBJ_IMAGE_ANIM_V_FLIP, 1 << 7
+
+ @ README: ensure that these values are aligned with the enum in speedchoice.h!
+ @ 0 is for the preset value in the enum and 1 is for the player name.
+ @ DO NOT USE THESE VALUES!
+ @ 0 reserved for PRESET
+ @ 1 reserved for PLAYER_NAME
+ .set EXPMATH, 2
+ .set PLOTLESS, 3
+ .set SPINNERS, 4
+ .set MAXVISION, 5
+ .set EARLYFLY, 6
+ .set GOOD_EARLY_WILDS, 7
+ .set EARLYSURF, 8
+ .set NICE_MENU_ORDER, 9
+ .set EASY_FALSE_SWIPE, 10
+ .set FAST_CATCH, 11
+ .set GEN_7_X_ITEMS, 12
+ .set EVO_EVERY_LEVEL, 13
+
+ @ -------------
+ @ option enums
+ @ -------------
+
+ @ EXPMATH
+ .set EXP_KEEP, 0
+ .set EXP_BW, 1
+ .set EXP_NONE, 2
+
+ @ PLOTLESS
+ .set PLOT_SEMI, 0
+ .set PLOT_KEEP, 1
+ .set PLOT_FULL, 2
+
+ @ INSTANT TEXT (DEPRECATED)
+ .set IT_ON, 0
+ .set IT_OFF, 1
+
+ @ SPINNERS
+ .set SPIN_NERF, 0
+ .set SPIN_KEEP, 1
+ .set SPIN_HELL, 2
+ .set SPIN_WHY, 3
+
+ @ MAX VISION
+ .set MAX_OFF, 0
+ .set MAX_SANE, 1
+ .set MAX_HELL, 2
+
+ @ NERF ROXANNE (DEPRECATED)
+ .set NERF_YES, 0
+ .set NERF_NO, 1
+
+ @ SUPER BIKE (DEPRECATED)
+ .set BIKE_ON, 0
+ .set BIKE_OFF, 1
+
+ @ NEW WILD ENC (DEPRECATED)
+ .set NEW_ON, 0
+ .set NEW_OFF, 1
+
+ @ EARLY FLY
+ .set FLY_YES, 0
+ .set FLY_NO, 1
+
+ @ RUN EVERYWHERE (DEPRECATED)
+ .set RUN_ON, 0
+ .set RUN_OFF, 1
+
+ @ MEME ISLAND (DEPRECATED)
+ .set MEME_BIG, 0 @ dot net
+ .set MEME_SMALL, 1 @ you're banned
+
+ @ BETTER MARTS (DEPRECATED)
+ .set MARTS_ON, 0
+ .set MARTS_OFF, 1
+
+ @ GOOD EARLY WILDS
+ .set GOOD_OFF, 0
+ .set GOOD_STATIC, 1
+ .set GOOD_RAND, 2
+
+ @ EARLY SURF
+ .set SURF_ON, 0
+ .set SURF_OFF, 1
+
+ @ NICE_MENU_ORDER
+ .set NICE_MENU_ORDER_ON, 0
+ .set NICE_MENU_ORDER_OFF, 1
+
+ @ EASY_FALSE_SWIPE
+ .set EASY_FALSE_SWIPE_OFF, 0
+ .set EASY_FALSE_SWIPE_TUTOR, 1
+ .set EASY_FALSE_SWIPE_HM05, 2
diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s
index bf8ab19c1..d583e15a8 100644
--- a/data/battle_scripts_1.s
+++ b/data/battle_scripts_1.s
@@ -278,9 +278,9 @@ BattleScript_HitFromAtkAnimation::
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
- waitmessage 0x40
+ waitmessage 1
resultmessage
- waitmessage 0x40
+ waitmessage 1
seteffectwithchance
tryfaintmon BS_TARGET, FALSE, NULL
BattleScript_MoveEnd::
@@ -297,7 +297,7 @@ BattleScript_MoveMissedPause::
BattleScript_MoveMissed::
effectivenesssound
resultmessage
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectSleep::
@@ -320,19 +320,19 @@ BattleScript_AlreadyAsleep::
setalreadystatusedmoveattempt BS_ATTACKER
pause 0x20
printstring STRINGID_PKMNALREADYASLEEP
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_WasntAffected::
pause 0x20
printstring STRINGID_PKMNWASNTAFFECTED
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_CantMakeAsleep::
pause 0x20
printfromtable gUproarAwakeStringIds
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectPoisonHit::
@@ -357,9 +357,9 @@ BattleScript_EffectAbsorb::
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
- waitmessage 0x40
+ waitmessage 1
resultmessage
- waitmessage 0x40
+ waitmessage 1
negativedamage
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_AbsorbLiquidOoze
@@ -373,7 +373,7 @@ BattleScript_AbsorbUpdateHp::
datahpupdate BS_ATTACKER
jumpifmovehadnoeffect BattleScript_AbsorbTryFainting
printfromtable gLeechSeedDrainStringIds
- waitmessage 0x40
+ waitmessage 1
BattleScript_AbsorbTryFainting::
tryfaintmon BS_ATTACKER, FALSE, NULL
tryfaintmon BS_TARGET, FALSE, NULL
@@ -418,9 +418,9 @@ BattleScript_ExplosionLoop:
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
- waitmessage 0x40
+ waitmessage 1
resultmessage
- waitmessage 0x40
+ waitmessage 1
tryfaintmon BS_TARGET, FALSE, NULL
moveendto MOVEEND_NEXT_TARGET
jumpifnexttargetvalid BattleScript_ExplosionLoop
@@ -429,7 +429,7 @@ BattleScript_ExplosionLoop:
BattleScript_ExplosionMissed:
effectivenesssound
resultmessage
- waitmessage 0x40
+ waitmessage 1
moveendto MOVEEND_NEXT_TARGET
jumpifnexttargetvalid BattleScript_ExplosionLoop
tryfaintmon BS_ATTACKER, FALSE, NULL
@@ -449,7 +449,7 @@ BattleScript_EffectDreamEater::
BattleScript_DreamEaterNoEffect:
attackstring
ppreduce
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_WasntAffected
BattleScript_DreamEaterWorked:
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
@@ -467,16 +467,16 @@ BattleScript_DreamEaterWorked:
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
- waitmessage 0x40
+ waitmessage 1
resultmessage
- waitmessage 0x40
+ waitmessage 1
negativedamage
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
jumpifmovehadnoeffect BattleScript_DreamEaterTryFaintEnd
printstring STRINGID_PKMNDREAMEATEN
- waitmessage 0x40
+ waitmessage 1
BattleScript_DreamEaterTryFaintEnd:
tryfaintmon BS_TARGET, FALSE, NULL
goto BattleScript_MoveEnd
@@ -489,7 +489,7 @@ BattleScript_EffectMirrorMove::
ppreduce
orbyte gMoveResultFlags, MOVE_RESULT_FAILED
printstring STRINGID_MIRRORMOVEFAILED
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectAttackUp::
@@ -523,14 +523,14 @@ BattleScript_StatUpDoAnim::
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_StatUpPrintString::
printfromtable gStatUpStringIds
- waitmessage 0x40
+ waitmessage 1
BattleScript_StatUpEnd::
goto BattleScript_MoveEnd
BattleScript_StatUp::
playanimation BS_EFFECT_BATTLER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatUpStringIds
- waitmessage 0x40
+ waitmessage 1
return
BattleScript_EffectAttackDown::
@@ -569,14 +569,14 @@ BattleScript_StatDownDoAnim::
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_StatDownPrintString::
printfromtable gStatDownStringIds
- waitmessage 0x40
+ waitmessage 1
BattleScript_StatDownEnd::
goto BattleScript_MoveEnd
BattleScript_StatDown::
playanimation BS_EFFECT_BATTLER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatDownStringIds
- waitmessage 0x40
+ waitmessage 1
return
BattleScript_EffectHaze::
@@ -587,7 +587,7 @@ BattleScript_EffectHaze::
waitanimation
normalisebuffs
printstring STRINGID_STATCHANGESGONE
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectBide::
@@ -650,9 +650,9 @@ BattleScript_DoMultiHit::
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
- waitmessage 0x40
+ waitmessage 1
printstring STRINGID_EMPTYSTRING3
- waitmessage 0x1
+ waitmessage 1
addbyte sMULTIHIT_STRING + 4, 0x1
moveendto MOVEEND_NEXT_TARGET
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_FOE_ENDURED, BattleScript_MultiHitPrintStrings
@@ -662,11 +662,11 @@ BattleScript_MultiHitNoMoreHits::
pause 0x20
BattleScript_MultiHitPrintStrings::
resultmessage
- waitmessage 0x40
+ waitmessage 1
jumpifmovehadnoeffect BattleScript_MultiHitEnd
copyarray gBattleTextBuff1, sMULTIHIT_STRING, 0x6
printstring STRINGID_HITXTIMES
- waitmessage 0x40
+ waitmessage 1
BattleScript_MultiHitEnd::
seteffectwithchance
tryfaintmon BS_TARGET, FALSE, NULL
@@ -682,7 +682,7 @@ BattleScript_EffectConversion::
attackanimation
waitanimation
printstring STRINGID_PKMNCHANGEDTYPE
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectFlinchHit::
@@ -700,7 +700,7 @@ BattleScript_EffectRestoreHp::
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_PKMNREGAINEDHEALTH
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectToxic::
@@ -721,14 +721,14 @@ BattleScript_EffectToxic::
setmoveeffect MOVE_EFFECT_TOXIC
seteffectprimary
resultmessage
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_AlreadyPoisoned::
setalreadystatusedmoveattempt BS_ATTACKER
pause 0x40
printstring STRINGID_PKMNALREADYPOISONED
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_ImmunityProtected::
@@ -761,7 +761,7 @@ BattleScript_EffectRest::
trysetrest BattleScript_AlreadyAtFullHp
pause 0x20
printfromtable gRestUsedStringIds
- waitmessage 0x40
+ waitmessage 1
updatestatusicon BS_ATTACKER
waitstate
goto BattleScript_PresentHealTarget
@@ -769,14 +769,14 @@ BattleScript_EffectRest::
BattleScript_RestCantSleep::
pause 0x40
printfromtable gUproarAwakeStringIds
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_RestIsAlreadyAsleep::
setalreadystatusedmoveattempt BS_ATTACKER
pause 0x20
printstring STRINGID_PKMNALREADYASLEEP2
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectOHKO::
@@ -792,7 +792,7 @@ BattleScript_EffectOHKO::
BattleScript_KOFail::
pause 0x40
printfromtable gKOFailedStringIds
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectRazorWind::
@@ -823,7 +823,7 @@ BattleScriptFirstChargingTurn::
seteffectprimary
copybyte cMULTISTRING_CHOOSER, sTWOTURN_STRINGID
printfromtable gFirstTurnOfTwoStringIds
- waitmessage 0x40
+ waitmessage 1
return
BattleScript_EffectSuperFang::
@@ -875,10 +875,10 @@ BattleScript_MoveMissedDoDamage::
ppreduce
pause 0x40
resultmessage
- waitmessage 0x40
+ waitmessage 1
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE, BattleScript_MoveEnd
printstring STRINGID_PKMNCRASHED
- waitmessage 0x40
+ waitmessage 1
damagecalc
typecalc
adjustnormaldamage
@@ -899,7 +899,7 @@ BattleScript_EffectMist::
attackanimation
waitanimation
printfromtable gMistUsedStringIds
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectFocusEnergy::
@@ -911,7 +911,7 @@ BattleScript_EffectFocusEnergy::
attackanimation
waitanimation
printfromtable gFocusEnergyUsedStringIds
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectRecoil::
@@ -934,14 +934,14 @@ BattleScript_EffectConfuse::
setmoveeffect MOVE_EFFECT_CONFUSION
seteffectprimary
resultmessage
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_AlreadyConfused::
setalreadystatusedmoveattempt BS_ATTACKER
pause 0x20
printstring STRINGID_PKMNALREADYCONFUSED
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectAttackUp2::
@@ -972,7 +972,7 @@ BattleScript_EffectTransform::
attackanimation
waitanimation
printfromtable gTransformUsedStringIds
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectAttackDown2::
@@ -1000,7 +1000,7 @@ BattleScript_PrintReflectLightScreenSafeguardString::
attackanimation
waitanimation
printfromtable gReflectLightScreenSafeguardStringIds
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectPoison::
@@ -1021,7 +1021,7 @@ BattleScript_EffectPoison::
setmoveeffect MOVE_EFFECT_POISON
seteffectprimary
resultmessage
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectParalyze::
@@ -1041,14 +1041,14 @@ BattleScript_EffectParalyze::
setmoveeffect MOVE_EFFECT_PARALYSIS
seteffectprimary
resultmessage
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_AlreadyParalyzed::
setalreadystatusedmoveattempt BS_ATTACKER
pause 0x20
printstring STRINGID_PKMNISALREADYPARALYZED
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_LimberProtected::
@@ -1119,13 +1119,13 @@ BattleScript_SubstituteAnim::
datahpupdate BS_ATTACKER
BattleScript_SubstituteString::
printfromtable gSubsituteUsedStringIds
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_AlreadyHasSubstitute::
setalreadystatusedmoveattempt BS_ATTACKER
pause 0x20
printstring STRINGID_PKMNHASSUBSTITUTE
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectRecharge::
@@ -1136,7 +1136,7 @@ BattleScript_EffectRecharge::
BattleScript_MoveUsedMustRecharge::
printstring STRINGID_PKMNMUSTRECHARGE
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectRage::
@@ -1161,7 +1161,7 @@ BattleScript_EffectMimic::
attackanimation
waitanimation
printstring STRINGID_PKMNLEARNEDMOVE2
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectMetronome::
@@ -1186,7 +1186,7 @@ BattleScript_DoLeechSeed::
attackanimation
waitanimation
printfromtable gLeechSeedStringIds
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectSplash::
@@ -1197,7 +1197,7 @@ BattleScript_EffectSplash::
waitanimation
incrementgamestat GAME_STAT_USED_SPLASH
printstring STRINGID_BUTNOTHINGHAPPENED
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectDisable::
@@ -1209,7 +1209,7 @@ BattleScript_EffectDisable::
attackanimation
waitanimation
printstring STRINGID_PKMNMOVEWASDISABLED
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectLevelDamage::
@@ -1253,7 +1253,7 @@ BattleScript_EffectEncore::
attackanimation
waitanimation
printstring STRINGID_PKMNGOTENCORE
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectPainSplit::
@@ -1271,7 +1271,7 @@ BattleScript_EffectPainSplit::
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
printstring STRINGID_SHAREDPAIN
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectSnore::
@@ -1283,7 +1283,7 @@ BattleScript_EffectSnore::
BattleScript_SnoreIsAsleep::
jumpifhalfword CMP_EQUAL, gChosenMove, MOVE_SLEEP_TALK, BattleScript_DoSnore
printstring STRINGID_PKMNFASTASLEEP
- waitmessage 0x40
+ waitmessage 1
statusanimation BS_ATTACKER
BattleScript_DoSnore::
attackstring
@@ -1300,7 +1300,7 @@ BattleScript_EffectConversion2::
attackanimation
waitanimation
printstring STRINGID_PKMNCHANGEDTYPE
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectLockOn::
@@ -1313,7 +1313,7 @@ BattleScript_EffectLockOn::
attackanimation
waitanimation
printstring STRINGID_PKMNTOOKAIM
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectSketch::
@@ -1325,7 +1325,7 @@ BattleScript_EffectSketch::
attackanimation
waitanimation
printstring STRINGID_PKMNSKETCHEDMOVE
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectSleepTalk::
@@ -1336,7 +1336,7 @@ BattleScript_EffectSleepTalk::
goto BattleScript_ButItFailed
BattleScript_SleepTalkIsAsleep::
printstring STRINGID_PKMNFASTASLEEP
- waitmessage 0x40
+ waitmessage 1
statusanimation BS_ATTACKER
attackstring
ppreduce
@@ -1359,7 +1359,7 @@ BattleScript_EffectDestinyBond::
attackanimation
waitanimation
printstring STRINGID_PKMNTRYINGTOTAKEFOE
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectFlail::
@@ -1375,7 +1375,7 @@ BattleScript_EffectSpite::
attackanimation
waitanimation
printstring STRINGID_PKMNREDUCEDPP
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectHealBell::
@@ -1387,15 +1387,15 @@ BattleScript_EffectHealBell::
attackanimation
waitanimation
printfromtable gPartyStatusHealStringIds
- waitmessage 0x40
+ waitmessage 1
jumpifnotmove MOVE_HEAL_BELL, BattleScript_PartyHealEnd
jumpifbyte CMP_NO_COMMON_BITS, cMULTISTRING_CHOOSER, 0x1, BattleScript_CheckHealBellMon2Unaffected
printstring STRINGID_PKMNSXBLOCKSY
- waitmessage 0x40
+ waitmessage 1
BattleScript_CheckHealBellMon2Unaffected::
jumpifbyte CMP_NO_COMMON_BITS, cMULTISTRING_CHOOSER, 0x2, BattleScript_PartyHealEnd
printstring STRINGID_PKMNSXBLOCKSY2
- waitmessage 0x40
+ waitmessage 1
BattleScript_PartyHealEnd::
updatestatusicon BS_ATTACKER_WITH_PARTNER
waitstate
@@ -1432,9 +1432,9 @@ BattleScript_DoTripleKickAttack::
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
- waitmessage 0x40
+ waitmessage 1
printstring STRINGID_EMPTYSTRING3
- waitmessage 0x1
+ waitmessage 1
moveendto MOVEEND_NEXT_TARGET
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_FOE_ENDURED, BattleScript_TripleKickPrintStrings
decrementmultihit BattleScript_TripleKickLoop
@@ -1445,12 +1445,12 @@ BattleScript_TripleKickNoMoreHits::
bicbyte gMoveResultFlags, MOVE_RESULT_MISSED
BattleScript_TripleKickPrintStrings::
resultmessage
- waitmessage 0x40
+ waitmessage 1
jumpifbyte CMP_EQUAL, sMULTIHIT_STRING + 4, 0x0, BattleScript_TripleKickEnd
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE, BattleScript_TripleKickEnd
copyarray gBattleTextBuff1, sMULTIHIT_STRING, 0x6
printstring STRINGID_HITXTIMES
- waitmessage 0x40
+ waitmessage 1
BattleScript_TripleKickEnd::
seteffectwithchance
tryfaintmon BS_TARGET, FALSE, NULL
@@ -1473,7 +1473,7 @@ BattleScript_EffectMeanLook::
setmoveeffect MOVE_EFFECT_PREVENT_ESCAPE
seteffectprimary
printstring STRINGID_TARGETCANTESCAPENOW
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectNightmare::
@@ -1490,7 +1490,7 @@ BattleScript_NightmareWorked::
setmoveeffect MOVE_EFFECT_NIGHTMARE
seteffectprimary
printstring STRINGID_PKMNFELLINTONIGHTMARE
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectMinimize::
@@ -1515,17 +1515,17 @@ BattleScript_CurseTrySpeed::
setstatchanger STAT_SPEED, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseTryAttack
printfromtable gStatDownStringIds
- waitmessage 0x40
+ waitmessage 1
BattleScript_CurseTryAttack::
setstatchanger STAT_ATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseTryDefence
printfromtable gStatUpStringIds
- waitmessage 0x40
+ waitmessage 1
BattleScript_CurseTryDefence::
setstatchanger STAT_DEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseEnd
printfromtable gStatUpStringIds
- waitmessage 0x40
+ waitmessage 1
BattleScript_CurseEnd::
goto BattleScript_MoveEnd
BattleScript_GhostCurse::
@@ -1545,7 +1545,7 @@ BattleScript_DoGhostCurse::
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_PKMNLAIDCURSE
- waitmessage 0x40
+ waitmessage 1
tryfaintmon BS_ATTACKER, FALSE, NULL
goto BattleScript_MoveEnd
@@ -1558,7 +1558,7 @@ BattleScript_EffectEndure::
attackanimation
waitanimation
printfromtable gProtectLikeUsedStringIds
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectSpikes::
@@ -1569,7 +1569,7 @@ BattleScript_EffectSpikes::
attackanimation
waitanimation
printstring STRINGID_SPIKESSCATTERED
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectForesight::
@@ -1581,7 +1581,7 @@ BattleScript_EffectForesight::
attackanimation
waitanimation
printstring STRINGID_PKMNIDENTIFIED
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectPerishSong::
@@ -1592,7 +1592,7 @@ BattleScript_EffectPerishSong::
attackanimation
waitanimation
printstring STRINGID_FAINTINTHREE
- waitmessage 0x40
+ waitmessage 1
setbyte sBATTLER, 0x0
BattleScript_PerishSongLoop::
jumpifability BS_SCRIPTING, ABILITY_SOUNDPROOF, BattleScript_PerishSongNotAffected
@@ -1603,7 +1603,7 @@ BattleScript_PerishSongLoopIncrement::
BattleScript_PerishSongNotAffected::
printstring STRINGID_PKMNSXBLOCKSY2
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_PerishSongLoopIncrement
BattleScript_EffectSandstorm::
@@ -1640,7 +1640,7 @@ BattleScript_EffectSwagger::
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatUpStringIds
- waitmessage 0x40
+ waitmessage 1
BattleScript_SwaggerTryConfuse::
jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_OwnTempoPrevents
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
@@ -1671,7 +1671,7 @@ BattleScript_EffectAttract::
attackanimation
waitanimation
printstring STRINGID_PKMNFELLINLOVE
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectReturn::
@@ -1708,7 +1708,7 @@ BattleScript_EffectMagnitude::
magnitudedamagecalculation
pause 0x20
printstring STRINGID_MAGNITUDESTRENGTH
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_HitsAllWithUndergroundBonusLoop
BattleScript_EffectBatonPass::
@@ -1770,7 +1770,7 @@ BattleScript_MoveWeatherChange::
attackanimation
waitanimation
printfromtable gMoveWeatherChangeStringIds
- waitmessage 0x40
+ waitmessage 1
call BattleScript_WeatherFormChanges
goto BattleScript_MoveEnd
@@ -1804,7 +1804,7 @@ BattleScript_EffectBellyDrum::
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_PKMNCUTHPMAXEDATTACK
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectPsychUp::
@@ -1815,7 +1815,7 @@ BattleScript_EffectPsychUp::
attackanimation
waitanimation
printstring STRINGID_PKMNCOPIEDSTATCHANGES
- waitmessage 0x40
+ waitmessage 1
goto BattleScript_MoveEnd
BattleScript_EffectMirrorCoat::
@@ -1839,7 +1839,7 @@ BattleScript_EffectSkullBash::
setgraphicalstatchangevalues
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatUpStringIds
- waitmessage 0x40
+ waitmessage 1
BattleScript_SkullBashEnd::