forked from pret/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 0
/
battle_scripts_1.s
4560 lines (4135 loc) · 141 KB
/
battle_scripts_1.s
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
#include "constants/global.h"
#include "constants/battle.h"
#include "constants/pokemon.h"
#include "constants/battle_script_commands.h"
#include "constants/battle_anim.h"
#include "constants/battle_string_ids.h"
#include "constants/abilities.h"
#include "constants/moves.h"
#include "constants/songs.h"
#include "constants/game_stat.h"
#include "constants/trainers.h"
.include "asm/macros.inc"
.include "asm/macros/battle_script.inc"
.include "constants/constants.inc"
.section script_data, "aw", %progbits
.align 2
gBattleScriptsForMoveEffects::
.4byte BattleScript_EffectHit @ EFFECT_HIT
.4byte BattleScript_EffectSleep @ EFFECT_SLEEP
.4byte BattleScript_EffectPoisonHit @ EFFECT_POISON_HIT
.4byte BattleScript_EffectAbsorb @ EFFECT_ABSORB
.4byte BattleScript_EffectBurnHit @ EFFECT_BURN_HIT
.4byte BattleScript_EffectFreezeHit @ EFFECT_FREEZE_HIT
.4byte BattleScript_EffectParalyzeHit @ EFFECT_PARALYZE_HIT
.4byte BattleScript_EffectExplosion @ EFFECT_EXPLOSION
.4byte BattleScript_EffectDreamEater @ EFFECT_DREAM_EATER
.4byte BattleScript_EffectMirrorMove @ EFFECT_MIRROR_MOVE
.4byte BattleScript_EffectAttackUp @ EFFECT_ATTACK_UP
.4byte BattleScript_EffectDefenseUp @ EFFECT_DEFENSE_UP
.4byte BattleScript_EffectHit @ EFFECT_SPEED_UP
.4byte BattleScript_EffectSpecialAttackUp @ EFFECT_SPECIAL_ATTACK_UP
.4byte BattleScript_EffectHit @ EFFECT_SPECIAL_DEFENSE_UP
.4byte BattleScript_EffectHit @ EFFECT_ACCURACY_UP
.4byte BattleScript_EffectEvasionUp @ EFFECT_EVASION_UP
.4byte BattleScript_EffectHit @ EFFECT_ALWAYS_HIT
.4byte BattleScript_EffectAttackDown @ EFFECT_ATTACK_DOWN
.4byte BattleScript_EffectDefenseDown @ EFFECT_DEFENSE_DOWN
.4byte BattleScript_EffectSpeedDown @ EFFECT_SPEED_DOWN
.4byte BattleScript_EffectHit @ EFFECT_SPECIAL_ATTACK_DOWN
.4byte BattleScript_EffectHit @ EFFECT_SPECIAL_DEFENSE_DOWN
.4byte BattleScript_EffectAccuracyDown @ EFFECT_ACCURACY_DOWN
.4byte BattleScript_EffectEvasionDown @ EFFECT_EVASION_DOWN
.4byte BattleScript_EffectHaze @ EFFECT_HAZE
.4byte BattleScript_EffectBide @ EFFECT_BIDE
.4byte BattleScript_EffectRampage @ EFFECT_RAMPAGE
.4byte BattleScript_EffectRoar @ EFFECT_ROAR
.4byte BattleScript_EffectMultiHit @ EFFECT_MULTI_HIT
.4byte BattleScript_EffectConversion @ EFFECT_CONVERSION
.4byte BattleScript_EffectFlinchHit @ EFFECT_FLINCH_HIT
.4byte BattleScript_EffectRestoreHp @ EFFECT_RESTORE_HP
.4byte BattleScript_EffectToxic @ EFFECT_TOXIC
.4byte BattleScript_EffectPayDay @ EFFECT_PAY_DAY
.4byte BattleScript_EffectLightScreen @ EFFECT_LIGHT_SCREEN
.4byte BattleScript_EffectTriAttack @ EFFECT_TRI_ATTACK
.4byte BattleScript_EffectRest @ EFFECT_REST
.4byte BattleScript_EffectOHKO @ EFFECT_OHKO
.4byte BattleScript_EffectRazorWind @ EFFECT_RAZOR_WIND
.4byte BattleScript_EffectSuperFang @ EFFECT_SUPER_FANG
.4byte BattleScript_EffectDragonRage @ EFFECT_DRAGON_RAGE
.4byte BattleScript_EffectTrap @ EFFECT_TRAP
.4byte BattleScript_EffectHit @ EFFECT_HIGH_CRITICAL
.4byte BattleScript_EffectDoubleHit @ EFFECT_DOUBLE_HIT
.4byte BattleScript_EffectRecoilIfMiss @ EFFECT_RECOIL_IF_MISS
.4byte BattleScript_EffectMist @ EFFECT_MIST
.4byte BattleScript_EffectFocusEnergy @ EFFECT_FOCUS_ENERGY
.4byte BattleScript_EffectRecoil @ EFFECT_RECOIL
.4byte BattleScript_EffectConfuse @ EFFECT_CONFUSE
.4byte BattleScript_EffectAttackUp2 @ EFFECT_ATTACK_UP_2
.4byte BattleScript_EffectDefenseUp2 @ EFFECT_DEFENSE_UP_2
.4byte BattleScript_EffectSpeedUp2 @ EFFECT_SPEED_UP_2
.4byte BattleScript_EffectSpecialAttackUp2 @ EFFECT_SPECIAL_ATTACK_UP_2
.4byte BattleScript_EffectSpecialDefenseUp2 @ EFFECT_SPECIAL_DEFENSE_UP_2
.4byte BattleScript_EffectHit @ EFFECT_ACCURACY_UP_2
.4byte BattleScript_EffectHit @ EFFECT_EVASION_UP_2
.4byte BattleScript_EffectTransform @ EFFECT_TRANSFORM
.4byte BattleScript_EffectAttackDown2 @ EFFECT_ATTACK_DOWN_2
.4byte BattleScript_EffectDefenseDown2 @ EFFECT_DEFENSE_DOWN_2
.4byte BattleScript_EffectSpeedDown2 @ EFFECT_SPEED_DOWN_2
.4byte BattleScript_EffectHit @ EFFECT_SPECIAL_ATTACK_DOWN_2
.4byte BattleScript_EffectSpecialDefenseDown2 @ EFFECT_SPECIAL_DEFENSE_DOWN_2
.4byte BattleScript_EffectHit @ EFFECT_ACCURACY_DOWN_2
.4byte BattleScript_EffectHit @ EFFECT_EVASION_DOWN_2
.4byte BattleScript_EffectReflect @ EFFECT_REFLECT
.4byte BattleScript_EffectPoison @ EFFECT_POISON
.4byte BattleScript_EffectParalyze @ EFFECT_PARALYZE
.4byte BattleScript_EffectAttackDownHit @ EFFECT_ATTACK_DOWN_HIT
.4byte BattleScript_EffectDefenseDownHit @ EFFECT_DEFENSE_DOWN_HIT
.4byte BattleScript_EffectSpeedDownHit @ EFFECT_SPEED_DOWN_HIT
.4byte BattleScript_EffectSpecialAttackDownHit @ EFFECT_SPECIAL_ATTACK_DOWN_HIT
.4byte BattleScript_EffectSpecialDefenseDownHit @ EFFECT_SPECIAL_DEFENSE_DOWN_HIT
.4byte BattleScript_EffectAccuracyDownHit @ EFFECT_ACCURACY_DOWN_HIT
.4byte BattleScript_EffectHit @ EFFECT_EVASION_DOWN_HIT
.4byte BattleScript_EffectSkyAttack @ EFFECT_SKY_ATTACK
.4byte BattleScript_EffectConfuseHit @ EFFECT_CONFUSE_HIT
.4byte BattleScript_EffectTwineedle @ EFFECT_TWINEEDLE
.4byte BattleScript_EffectHit @ EFFECT_VITAL_THROW
.4byte BattleScript_EffectSubstitute @ EFFECT_SUBSTITUTE
.4byte BattleScript_EffectRecharge @ EFFECT_RECHARGE
.4byte BattleScript_EffectRage @ EFFECT_RAGE
.4byte BattleScript_EffectMimic @ EFFECT_MIMIC
.4byte BattleScript_EffectMetronome @ EFFECT_METRONOME
.4byte BattleScript_EffectLeechSeed @ EFFECT_LEECH_SEED
.4byte BattleScript_EffectSplash @ EFFECT_SPLASH
.4byte BattleScript_EffectDisable @ EFFECT_DISABLE
.4byte BattleScript_EffectLevelDamage @ EFFECT_LEVEL_DAMAGE
.4byte BattleScript_EffectPsywave @ EFFECT_PSYWAVE
.4byte BattleScript_EffectCounter @ EFFECT_COUNTER
.4byte BattleScript_EffectEncore @ EFFECT_ENCORE
.4byte BattleScript_EffectPainSplit @ EFFECT_PAIN_SPLIT
.4byte BattleScript_EffectSnore @ EFFECT_SNORE
.4byte BattleScript_EffectConversion2 @ EFFECT_CONVERSION_2
.4byte BattleScript_EffectLockOn @ EFFECT_LOCK_ON
.4byte BattleScript_EffectSketch @ EFFECT_SKETCH
.4byte BattleScript_EffectHit @ EFFECT_UNUSED_60
.4byte BattleScript_EffectSleepTalk @ EFFECT_SLEEP_TALK
.4byte BattleScript_EffectDestinyBond @ EFFECT_DESTINY_BOND
.4byte BattleScript_EffectFlail @ EFFECT_FLAIL
.4byte BattleScript_EffectSpite @ EFFECT_SPITE
.4byte BattleScript_EffectHit @ EFFECT_FALSE_SWIPE
.4byte BattleScript_EffectHealBell @ EFFECT_HEAL_BELL
.4byte BattleScript_EffectHit @ EFFECT_QUICK_ATTACK
.4byte BattleScript_EffectTripleKick @ EFFECT_TRIPLE_KICK
.4byte BattleScript_EffectThief @ EFFECT_THIEF
.4byte BattleScript_EffectMeanLook @ EFFECT_MEAN_LOOK
.4byte BattleScript_EffectNightmare @ EFFECT_NIGHTMARE
.4byte BattleScript_EffectMinimize @ EFFECT_MINIMIZE
.4byte BattleScript_EffectCurse @ EFFECT_CURSE
.4byte BattleScript_EffectHit @ EFFECT_UNUSED_6E
.4byte BattleScript_EffectProtect @ EFFECT_PROTECT
.4byte BattleScript_EffectSpikes @ EFFECT_SPIKES
.4byte BattleScript_EffectForesight @ EFFECT_FORESIGHT
.4byte BattleScript_EffectPerishSong @ EFFECT_PERISH_SONG
.4byte BattleScript_EffectSandstorm @ EFFECT_SANDSTORM
.4byte BattleScript_EffectEndure @ EFFECT_ENDURE
.4byte BattleScript_EffectRollout @ EFFECT_ROLLOUT
.4byte BattleScript_EffectSwagger @ EFFECT_SWAGGER
.4byte BattleScript_EffectFuryCutter @ EFFECT_FURY_CUTTER
.4byte BattleScript_EffectAttract @ EFFECT_ATTRACT
.4byte BattleScript_EffectReturn @ EFFECT_RETURN
.4byte BattleScript_EffectPresent @ EFFECT_PRESENT
.4byte BattleScript_EffectFrustration @ EFFECT_FRUSTRATION
.4byte BattleScript_EffectSafeguard @ EFFECT_SAFEGUARD
.4byte BattleScript_EffectThawHit @ EFFECT_THAW_HIT
.4byte BattleScript_EffectMagnitude @ EFFECT_MAGNITUDE
.4byte BattleScript_EffectBatonPass @ EFFECT_BATON_PASS
.4byte BattleScript_EffectHit @ EFFECT_PURSUIT
.4byte BattleScript_EffectRapidSpin @ EFFECT_RAPID_SPIN
.4byte BattleScript_EffectSonicboom @ EFFECT_SONICBOOM
.4byte BattleScript_EffectHit @ EFFECT_UNUSED_83
.4byte BattleScript_EffectMorningSun @ EFFECT_MORNING_SUN
.4byte BattleScript_EffectSynthesis @ EFFECT_SYNTHESIS
.4byte BattleScript_EffectMoonlight @ EFFECT_MOONLIGHT
.4byte BattleScript_EffectHiddenPower @ EFFECT_HIDDEN_POWER
.4byte BattleScript_EffectRainDance @ EFFECT_RAIN_DANCE
.4byte BattleScript_EffectSunnyDay @ EFFECT_SUNNY_DAY
.4byte BattleScript_EffectDefenseUpHit @ EFFECT_DEFENSE_UP_HIT
.4byte BattleScript_EffectAttackUpHit @ EFFECT_ATTACK_UP_HIT
.4byte BattleScript_EffectAllStatsUpHit @ EFFECT_ALL_STATS_UP_HIT
.4byte BattleScript_EffectHit @ EFFECT_UNUSED_8D
.4byte BattleScript_EffectBellyDrum @ EFFECT_BELLY_DRUM
.4byte BattleScript_EffectPsychUp @ EFFECT_PSYCH_UP
.4byte BattleScript_EffectMirrorCoat @ EFFECT_MIRROR_COAT
.4byte BattleScript_EffectSkullBash @ EFFECT_SKULL_BASH
.4byte BattleScript_EffectTwister @ EFFECT_TWISTER
.4byte BattleScript_EffectEarthquake @ EFFECT_EARTHQUAKE
.4byte BattleScript_EffectFutureSight @ EFFECT_FUTURE_SIGHT
.4byte BattleScript_EffectGust @ EFFECT_GUST
.4byte BattleScript_EffectStomp @ EFFECT_FLINCH_MINIMIZE_HIT
.4byte BattleScript_EffectSolarBeam @ EFFECT_SOLAR_BEAM
.4byte BattleScript_EffectThunder @ EFFECT_THUNDER
.4byte BattleScript_EffectTeleport @ EFFECT_TELEPORT
.4byte BattleScript_EffectBeatUp @ EFFECT_BEAT_UP
.4byte BattleScript_EffectSemiInvulnerable @ EFFECT_SEMI_INVULNERABLE
.4byte BattleScript_EffectDefenseCurl @ EFFECT_DEFENSE_CURL
.4byte BattleScript_EffectSoftboiled @ EFFECT_SOFTBOILED
.4byte BattleScript_EffectFakeOut @ EFFECT_FAKE_OUT
.4byte BattleScript_EffectUproar @ EFFECT_UPROAR
.4byte BattleScript_EffectStockpile @ EFFECT_STOCKPILE
.4byte BattleScript_EffectSpitUp @ EFFECT_SPIT_UP
.4byte BattleScript_EffectSwallow @ EFFECT_SWALLOW
.4byte BattleScript_EffectHit @ EFFECT_UNUSED_A3
.4byte BattleScript_EffectHail @ EFFECT_HAIL
.4byte BattleScript_EffectTorment @ EFFECT_TORMENT
.4byte BattleScript_EffectFlatter @ EFFECT_FLATTER
.4byte BattleScript_EffectWillOWisp @ EFFECT_WILL_O_WISP
.4byte BattleScript_EffectMemento @ EFFECT_MEMENTO
.4byte BattleScript_EffectFacade @ EFFECT_FACADE
.4byte BattleScript_EffectFocusPunch @ EFFECT_FOCUS_PUNCH
.4byte BattleScript_EffectSmellingsalt @ EFFECT_SMELLINGSALT
.4byte BattleScript_EffectFollowMe @ EFFECT_FOLLOW_ME
.4byte BattleScript_EffectNaturePower @ EFFECT_NATURE_POWER
.4byte BattleScript_EffectCharge @ EFFECT_CHARGE
.4byte BattleScript_EffectTaunt @ EFFECT_TAUNT
.4byte BattleScript_EffectHelpingHand @ EFFECT_HELPING_HAND
.4byte BattleScript_EffectTrick @ EFFECT_TRICK
.4byte BattleScript_EffectRolePlay @ EFFECT_ROLE_PLAY
.4byte BattleScript_EffectWish @ EFFECT_WISH
.4byte BattleScript_EffectAssist @ EFFECT_ASSIST
.4byte BattleScript_EffectIngrain @ EFFECT_INGRAIN
.4byte BattleScript_EffectSuperpower @ EFFECT_SUPERPOWER
.4byte BattleScript_EffectMagicCoat @ EFFECT_MAGIC_COAT
.4byte BattleScript_EffectRecycle @ EFFECT_RECYCLE
.4byte BattleScript_EffectRevenge @ EFFECT_REVENGE
.4byte BattleScript_EffectBrickBreak @ EFFECT_BRICK_BREAK
.4byte BattleScript_EffectYawn @ EFFECT_YAWN
.4byte BattleScript_EffectKnockOff @ EFFECT_KNOCK_OFF
.4byte BattleScript_EffectEndeavor @ EFFECT_ENDEAVOR
.4byte BattleScript_EffectEruption @ EFFECT_ERUPTION
.4byte BattleScript_EffectSkillSwap @ EFFECT_SKILL_SWAP
.4byte BattleScript_EffectImprison @ EFFECT_IMPRISON
.4byte BattleScript_EffectRefresh @ EFFECT_REFRESH
.4byte BattleScript_EffectGrudge @ EFFECT_GRUDGE
.4byte BattleScript_EffectSnatch @ EFFECT_SNATCH
.4byte BattleScript_EffectLowKick @ EFFECT_LOW_KICK
.4byte BattleScript_EffectSecretPower @ EFFECT_SECRET_POWER
.4byte BattleScript_EffectDoubleEdge @ EFFECT_DOUBLE_EDGE
.4byte BattleScript_EffectTeeterDance @ EFFECT_TEETER_DANCE
.4byte BattleScript_EffectBurnHit @ EFFECT_BLAZE_KICK
.4byte BattleScript_EffectMudSport @ EFFECT_MUD_SPORT
.4byte BattleScript_EffectPoisonFang @ EFFECT_POISON_FANG
.4byte BattleScript_EffectWeatherBall @ EFFECT_WEATHER_BALL
.4byte BattleScript_EffectOverheat @ EFFECT_OVERHEAT
.4byte BattleScript_EffectTickle @ EFFECT_TICKLE
.4byte BattleScript_EffectCosmicPower @ EFFECT_COSMIC_POWER
.4byte BattleScript_EffectSkyUppercut @ EFFECT_SKY_UPPERCUT
.4byte BattleScript_EffectBulkUp @ EFFECT_BULK_UP
.4byte BattleScript_EffectPoisonHit @ EFFECT_POISON_TAIL
.4byte BattleScript_EffectWaterSport @ EFFECT_WATER_SPORT
.4byte BattleScript_EffectCalmMind @ EFFECT_CALM_MIND
.4byte BattleScript_EffectDragonDance @ EFFECT_DRAGON_DANCE
.4byte BattleScript_EffectCamouflage @ EFFECT_CAMOUFLAGE
BattleScript_EffectHit::
jumpifnotmove MOVE_SURF, BattleScript_HitFromAtkCanceler
jumpifnostatus3 BS_TARGET, STATUS3_UNDERWATER, BattleScript_HitFromAtkCanceler
orword gHitMarker, HITMARKER_IGNORE_UNDERWATER
setbyte sDMG_MULTIPLIER, 2
BattleScript_HitFromAtkCanceler::
attackcanceler
BattleScript_HitFromAccCheck::
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
BattleScript_HitFromAtkString::
attackstring
ppreduce
BattleScript_HitFromCritCalc::
critcalc
damagecalc
typecalc
adjustnormaldamage
BattleScript_HitFromAtkAnimation::
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
seteffectwithchance
tryfaintmon BS_TARGET
BattleScript_MoveEnd::
moveendall
end
BattleScript_MakeMoveMissed::
orbyte gMoveResultFlags, MOVE_RESULT_MISSED
BattleScript_PrintMoveMissed::
attackstring
ppreduce
BattleScript_MoveMissedPause::
pause B_WAIT_TIME_SHORT
BattleScript_MoveMissed::
effectivenesssound
resultmessage
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_EffectSleep::
attackcanceler
attackstring
ppreduce
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_ButItFailed
jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_AlreadyAsleep
jumpifcantmakeasleep BattleScript_CantMakeAsleep
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
attackanimation
waitanimation
setmoveeffect MOVE_EFFECT_SLEEP
seteffectprimary
goto BattleScript_MoveEnd
BattleScript_AlreadyAsleep::
setalreadystatusedmoveattempt BS_ATTACKER
pause B_WAIT_TIME_SHORT
printstring STRINGID_PKMNALREADYASLEEP
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_WasntAffected::
pause B_WAIT_TIME_SHORT
printstring STRINGID_PKMNWASNTAFFECTED
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_CantMakeAsleep::
pause B_WAIT_TIME_SHORT
printfromtable gUproarAwakeStringIds
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_EffectPoisonHit::
setmoveeffect MOVE_EFFECT_POISON
goto BattleScript_EffectHit
BattleScript_EffectAbsorb::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
typecalc
adjustnormaldamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
negativedamage
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_AbsorbLiquidOoze
setbyte cMULTISTRING_CHOOSER, B_MSG_ABSORB
goto BattleScript_AbsorbUpdateHp
BattleScript_AbsorbLiquidOoze::
manipulatedamage DMG_CHANGE_SIGN
setbyte cMULTISTRING_CHOOSER, B_MSG_ABSORB_OOZE
BattleScript_AbsorbUpdateHp::
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
jumpifmovehadnoeffect BattleScript_AbsorbTryFainting
printfromtable gAbsorbDrainStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_AbsorbTryFainting::
tryfaintmon BS_ATTACKER
tryfaintmon BS_TARGET
goto BattleScript_MoveEnd
BattleScript_EffectBurnHit::
setmoveeffect MOVE_EFFECT_BURN
goto BattleScript_EffectHit
BattleScript_EffectFreezeHit::
setmoveeffect MOVE_EFFECT_FREEZE
goto BattleScript_EffectHit
BattleScript_EffectParalyzeHit::
setmoveeffect MOVE_EFFECT_PARALYSIS
goto BattleScript_EffectHit
BattleScript_EffectExplosion::
attackcanceler
attackstring
ppreduce
@ Below jumps to BattleScript_DampStopsExplosion if it fails (only way it can)
tryexplosion
setatkhptozero
waitstate
jumpifbyte CMP_NO_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_MISSED, BattleScript_ExplosionDoAnimStartLoop
call BattleScript_PreserveMissedBitDoMoveAnim
goto BattleScript_ExplosionLoop
BattleScript_ExplosionDoAnimStartLoop:
attackanimation
waitanimation
BattleScript_ExplosionLoop:
movevaluescleanup
critcalc
damagecalc
typecalc
adjustnormaldamage
accuracycheck BattleScript_ExplosionMissed, ACC_CURR_MOVE
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
tryfaintmon BS_TARGET
moveendto MOVEEND_NEXT_TARGET
jumpifnexttargetvalid BattleScript_ExplosionLoop
tryfaintmon BS_ATTACKER
end
BattleScript_ExplosionMissed:
effectivenesssound
resultmessage
waitmessage B_WAIT_TIME_LONG
moveendto MOVEEND_NEXT_TARGET
jumpifnexttargetvalid BattleScript_ExplosionLoop
tryfaintmon BS_ATTACKER
end
BattleScript_PreserveMissedBitDoMoveAnim:
bicbyte gMoveResultFlags, MOVE_RESULT_MISSED
attackanimation
waitanimation
orbyte gMoveResultFlags, MOVE_RESULT_MISSED
return
BattleScript_EffectDreamEater::
attackcanceler
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_DreamEaterNoEffect
jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_DreamEaterWorked
BattleScript_DreamEaterNoEffect:
attackstring
ppreduce
waitmessage B_WAIT_TIME_LONG
goto BattleScript_WasntAffected
BattleScript_DreamEaterWorked:
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
typecalc
adjustnormaldamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
negativedamage
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
jumpifmovehadnoeffect BattleScript_DreamEaterTryFaintEnd
printstring STRINGID_PKMNDREAMEATEN
waitmessage B_WAIT_TIME_LONG
BattleScript_DreamEaterTryFaintEnd:
tryfaintmon BS_TARGET
goto BattleScript_MoveEnd
BattleScript_EffectMirrorMove::
attackcanceler
attackstring
pause B_WAIT_TIME_LONG
trymirrormove
ppreduce
orbyte gMoveResultFlags, MOVE_RESULT_FAILED
printstring STRINGID_MIRRORMOVEFAILED
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_EffectAttackUp::
setstatchanger STAT_ATK, 1, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectDefenseUp::
setstatchanger STAT_DEF, 1, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectSpecialAttackUp::
setstatchanger STAT_SPATK, 1, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectEvasionUp::
setstatchanger STAT_EVASION, 1, FALSE
BattleScript_EffectStatUp::
attackcanceler
BattleScript_EffectStatUpAfterAtkCanceler::
attackstring
ppreduce
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_StatUpEnd
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_StatUpAttackAnim
pause B_WAIT_TIME_SHORT
goto BattleScript_StatUpPrintString
BattleScript_StatUpAttackAnim::
attackanimation
waitanimation
BattleScript_StatUpDoAnim::
setgraphicalstatchangevalues
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_StatUpPrintString::
printfromtable gStatUpStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_StatUpEnd::
goto BattleScript_MoveEnd
BattleScript_StatUp::
playanimation BS_EFFECT_BATTLER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatUpStringIds
waitmessage B_WAIT_TIME_LONG
return
BattleScript_EffectAttackDown::
setstatchanger STAT_ATK, 1, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectDefenseDown::
setstatchanger STAT_DEF, 1, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectSpeedDown::
setstatchanger STAT_SPEED, 1, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectAccuracyDown::
setstatchanger STAT_ACC, 1, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectEvasionDown::
setstatchanger STAT_EVASION, 1, TRUE
BattleScript_EffectStatDown::
attackcanceler
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_ButItFailedAtkStringPpReduce
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_StatDownEnd
jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_StatDownDoAnim
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_FELL_EMPTY, BattleScript_StatDownEnd
pause B_WAIT_TIME_SHORT
goto BattleScript_StatDownPrintString
BattleScript_StatDownDoAnim::
attackanimation
waitanimation
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_StatDownPrintString::
printfromtable gStatDownStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_StatDownEnd::
goto BattleScript_MoveEnd
BattleScript_StatDown::
playanimation BS_EFFECT_BATTLER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatDownStringIds
waitmessage B_WAIT_TIME_LONG
return
BattleScript_EffectHaze::
attackcanceler
attackstring
ppreduce
attackanimation
waitanimation
normalisebuffs
printstring STRINGID_STATCHANGESGONE
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_EffectBide::
attackcanceler
attackstring
ppreduce
attackanimation
waitanimation
orword gHitMarker, HITMARKER_CHARGING
setbide
goto BattleScript_MoveEnd
BattleScript_EffectRampage::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_EffectRampage2
ppreduce
BattleScript_EffectRampage2:
confuseifrepeatingattackends
goto BattleScript_HitFromCritCalc
BattleScript_EffectRoar::
attackcanceler
attackstring
ppreduce
jumpifability BS_TARGET, ABILITY_SUCTION_CUPS, BattleScript_AbilityPreventsPhasingOut
jumpifstatus3 BS_TARGET, STATUS3_ROOTED, BattleScript_PrintMonIsRooted
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
accuracycheck BattleScript_MoveMissedPause, ACC_CURR_MOVE
jumpifbattletype BATTLE_TYPE_ARENA, BattleScript_ButItFailed
forcerandomswitch BattleScript_ButItFailed
BattleScript_EffectMultiHit::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
setmultihitcounter 0
initmultihitstring
setbyte sMULTIHIT_EFFECT, 0
BattleScript_MultiHitLoop::
jumpifhasnohp BS_ATTACKER, BattleScript_MultiHitEnd
jumpifhasnohp BS_TARGET, BattleScript_MultiHitPrintStrings
jumpifhalfword CMP_EQUAL, gChosenMove, MOVE_SLEEP_TALK, BattleScript_DoMultiHit
jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_MultiHitPrintStrings
BattleScript_DoMultiHit::
movevaluescleanup
copybyte cEFFECT_CHOOSER, sMULTIHIT_EFFECT
critcalc
damagecalc
typecalc
jumpifmovehadnoeffect BattleScript_MultiHitNoMoreHits
adjustnormaldamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
printstring STRINGID_EMPTYSTRING3
waitmessage 1
addbyte sMULTIHIT_STRING + 4, 1
moveendto MOVEEND_NEXT_TARGET
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_FOE_ENDURED, BattleScript_MultiHitPrintStrings
decrementmultihit BattleScript_MultiHitLoop
goto BattleScript_MultiHitPrintStrings
BattleScript_MultiHitNoMoreHits::
pause B_WAIT_TIME_SHORT
BattleScript_MultiHitPrintStrings::
resultmessage
waitmessage B_WAIT_TIME_LONG
jumpifmovehadnoeffect BattleScript_MultiHitEnd
copyarray gBattleTextBuff1, sMULTIHIT_STRING, 6
printstring STRINGID_HITXTIMES
waitmessage B_WAIT_TIME_LONG
BattleScript_MultiHitEnd::
seteffectwithchance
tryfaintmon BS_TARGET
moveendcase MOVEEND_SYNCHRONIZE_TARGET
moveendfrom MOVEEND_IMMUNITY_ABILITIES
end
BattleScript_EffectConversion::
attackcanceler
attackstring
ppreduce
tryconversiontypechange BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNCHANGEDTYPE
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_EffectFlinchHit::
setmoveeffect MOVE_EFFECT_FLINCH
goto BattleScript_EffectHit
BattleScript_EffectRestoreHp::
attackcanceler
attackstring
ppreduce
tryhealhalfhealth BattleScript_AlreadyAtFullHp, BS_ATTACKER
attackanimation
waitanimation
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_PKMNREGAINEDHEALTH
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_EffectToxic::
attackcanceler
attackstring
ppreduce
jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_ButItFailed
jumpifstatus BS_TARGET, STATUS1_POISON, BattleScript_AlreadyPoisoned
jumpifstatus BS_TARGET, STATUS1_TOXIC_POISON, BattleScript_AlreadyPoisoned
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
jumpiftype BS_TARGET, TYPE_POISON, BattleScript_NotAffected
jumpiftype BS_TARGET, TYPE_STEEL, BattleScript_NotAffected
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
attackanimation
waitanimation
setmoveeffect MOVE_EFFECT_TOXIC
seteffectprimary
resultmessage
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_AlreadyPoisoned::
setalreadystatusedmoveattempt BS_ATTACKER
pause B_WAIT_TIME_LONG
printstring STRINGID_PKMNALREADYPOISONED
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_ImmunityProtected::
copybyte gEffectBattler, gBattlerTarget
setbyte cMULTISTRING_CHOOSER, B_MSG_ABILITY_PREVENTS_MOVE_STATUS
call BattleScript_PSNPrevention
goto BattleScript_MoveEnd
BattleScript_EffectPayDay::
setmoveeffect MOVE_EFFECT_PAYDAY
goto BattleScript_EffectHit
BattleScript_EffectLightScreen::
attackcanceler
attackstring
ppreduce
setlightscreen
goto BattleScript_PrintReflectLightScreenSafeguardString
BattleScript_EffectTriAttack::
setmoveeffect MOVE_EFFECT_TRI_ATTACK
goto BattleScript_EffectHit
BattleScript_EffectRest::
attackcanceler
attackstring
ppreduce
jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_RestIsAlreadyAsleep
jumpifcantmakeasleep BattleScript_RestCantSleep
trysetrest BattleScript_AlreadyAtFullHp
pause B_WAIT_TIME_SHORT
printfromtable gRestUsedStringIds
waitmessage B_WAIT_TIME_LONG
updatestatusicon BS_ATTACKER
waitstate
goto BattleScript_PresentHealTarget
BattleScript_RestCantSleep::
pause B_WAIT_TIME_LONG
printfromtable gUproarAwakeStringIds
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_RestIsAlreadyAsleep::
setalreadystatusedmoveattempt BS_ATTACKER
pause B_WAIT_TIME_SHORT
printstring STRINGID_PKMNALREADYASLEEP2
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_EffectOHKO::
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
typecalc
jumpifmovehadnoeffect BattleScript_HitFromAtkAnimation
tryKO BattleScript_KOFail
trysetdestinybondtohappen
goto BattleScript_HitFromAtkAnimation
BattleScript_KOFail::
pause B_WAIT_TIME_LONG
printfromtable gKOFailedStringIds
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_EffectRazorWind::
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn
setbyte sTWOTURN_STRINGID, B_MSG_TURN1_RAZOR_WIND
call BattleScriptFirstChargingTurn
goto BattleScript_MoveEnd
BattleScript_TwoTurnMovesSecondTurn::
attackcanceler
setmoveeffect MOVE_EFFECT_CHARGING
setbyte sB_ANIM_TURN, 1
clearstatusfromeffect BS_ATTACKER
orword gHitMarker, HITMARKER_NO_PPDEDUCT
jumpifnotmove MOVE_SKY_ATTACK, BattleScript_HitFromAccCheck
setmoveeffect MOVE_EFFECT_FLINCH
goto BattleScript_HitFromAccCheck
BattleScriptFirstChargingTurn::
attackcanceler
printstring STRINGID_EMPTYSTRING3
ppreduce
attackanimation
waitanimation
orword gHitMarker, HITMARKER_CHARGING
setmoveeffect MOVE_EFFECT_CHARGING | MOVE_EFFECT_AFFECTS_USER
seteffectprimary
copybyte cMULTISTRING_CHOOSER, sTWOTURN_STRINGID
printfromtable gFirstTurnOfTwoStringIds
waitmessage B_WAIT_TIME_LONG
return
BattleScript_EffectSuperFang::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
typecalc
bicbyte gMoveResultFlags, MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
damagetohalftargethp
goto BattleScript_HitFromAtkAnimation
BattleScript_EffectDragonRage::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
typecalc
bicbyte gMoveResultFlags, MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
setword gBattleMoveDamage, 40
adjustsetdamage
goto BattleScript_HitFromAtkAnimation
BattleScript_EffectTrap::
jumpifnotmove MOVE_WHIRLPOOL, BattleScript_DoWrapEffect
jumpifnostatus3 BS_TARGET, STATUS3_UNDERWATER, BattleScript_DoWrapEffect
orword gHitMarker, HITMARKER_IGNORE_UNDERWATER
setbyte sDMG_MULTIPLIER, 2
BattleScript_DoWrapEffect::
setmoveeffect MOVE_EFFECT_WRAP
goto BattleScript_EffectHit
BattleScript_EffectDoubleHit::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
setmultihitcounter 2
initmultihitstring
setbyte sMULTIHIT_EFFECT, 0
goto BattleScript_MultiHitLoop
BattleScript_EffectRecoilIfMiss::
attackcanceler
accuracycheck BattleScript_MoveMissedDoDamage, ACC_CURR_MOVE
goto BattleScript_HitFromAtkString
BattleScript_MoveMissedDoDamage::
attackstring
ppreduce
pause B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE, BattleScript_MoveEnd
printstring STRINGID_PKMNCRASHED
waitmessage B_WAIT_TIME_LONG
damagecalc
typecalc
adjustnormaldamage
manipulatedamage DMG_RECOIL_FROM_MISS
bicbyte gMoveResultFlags, MOVE_RESULT_MISSED
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
tryfaintmon BS_ATTACKER
orbyte gMoveResultFlags, MOVE_RESULT_MISSED
goto BattleScript_MoveEnd
BattleScript_EffectMist::
attackcanceler
attackstring
ppreduce
setmist
attackanimation
waitanimation
printfromtable gMistUsedStringIds
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_EffectFocusEnergy::
attackcanceler
attackstring
ppreduce
jumpifstatus2 BS_ATTACKER, STATUS2_FOCUS_ENERGY, BattleScript_ButItFailed
setfocusenergy
attackanimation
waitanimation
printfromtable gFocusEnergyUsedStringIds
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_EffectRecoil::
setmoveeffect MOVE_EFFECT_RECOIL_25 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
jumpifnotmove MOVE_STRUGGLE, BattleScript_EffectHit
incrementgamestat GAME_STAT_USED_STRUGGLE
goto BattleScript_EffectHit
BattleScript_EffectConfuse::
attackcanceler
attackstring
ppreduce
jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_OwnTempoPrevents
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_ButItFailed
jumpifstatus2 BS_TARGET, STATUS2_CONFUSION, BattleScript_AlreadyConfused
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
attackanimation
waitanimation
setmoveeffect MOVE_EFFECT_CONFUSION
seteffectprimary
resultmessage
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_AlreadyConfused::
setalreadystatusedmoveattempt BS_ATTACKER
pause B_WAIT_TIME_SHORT
printstring STRINGID_PKMNALREADYCONFUSED
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_EffectAttackUp2::
setstatchanger STAT_ATK, 2, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectDefenseUp2::
setstatchanger STAT_DEF, 2, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectSpeedUp2::
setstatchanger STAT_SPEED, 2, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectSpecialAttackUp2::
setstatchanger STAT_SPATK, 2, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectSpecialDefenseUp2::
setstatchanger STAT_SPDEF, 2, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectTransform::
attackcanceler
attackstring
ppreduce
transformdataexecution
attackanimation
waitanimation
printfromtable gTransformUsedStringIds
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_EffectAttackDown2::
setstatchanger STAT_ATK, 2, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectDefenseDown2::
setstatchanger STAT_DEF, 2, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectSpeedDown2::
setstatchanger STAT_SPEED, 2, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectSpecialDefenseDown2::
setstatchanger STAT_SPDEF, 2, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectReflect::
attackcanceler
attackstring
ppreduce
setreflect
BattleScript_PrintReflectLightScreenSafeguardString::
attackanimation
waitanimation
printfromtable gReflectLightScreenSafeguardStringIds
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_EffectPoison::
attackcanceler
attackstring
ppreduce
jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_ButItFailed
jumpifstatus BS_TARGET, STATUS1_POISON, BattleScript_AlreadyPoisoned
jumpifstatus BS_TARGET, STATUS1_TOXIC_POISON, BattleScript_AlreadyPoisoned
jumpiftype BS_TARGET, TYPE_POISON, BattleScript_NotAffected
jumpiftype BS_TARGET, TYPE_STEEL, BattleScript_NotAffected
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
attackanimation
waitanimation
setmoveeffect MOVE_EFFECT_POISON