Merge pull request #124 from DizzyEggg/dump_battlescripts

Dump Battle Scripts
This commit is contained in:
Cameron Hall
2017-11-27 14:00:29 -06:00
committed by GitHub
29 changed files with 8562 additions and 1778 deletions

1389
asm/macros/battle_script.inc Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,170 @@
@ battle types
.set BATTLE_TYPE_DOUBLE , 0x0001
.set BATTLE_TYPE_LINK, 0x0002
.set BATTLE_TYPE_WILD, 0x0004
.set BATTLE_TYPE_TRAINER, 0x0008
.set BATTLE_TYPE_FIRST_BATTLE, 0x0010
.set BATTLE_TYPE_20, 0x0020
.set BATTLE_TYPE_MULTI, 0x0040
.set BATTLE_TYPE_SAFARI, 0x0080
.set BATTLE_TYPE_BATTLE_TOWER, 0x0100
.set BATTLE_TYPE_WALLY_TUTORIAL, 0x0200
.set BATTLE_TYPE_ROAMER, 0x0400
.set BATTLE_TYPE_EREADER_TRAINER, 0x0800
.set BATTLE_TYPE_KYOGRE_GROUDON, 0x1000
.set BATTLE_TYPE_LEGENDARY, 0x2000
.set BATTLE_TYPE_REGI, 0x4000
.set BATTLE_TYPE_TWO_OPPONENTS, 0x8000
.set BATTLE_TYPE_DOME, 0x10000
.set BATTLE_TYPE_PALACE, 0x20000
.set BATTLE_TYPE_ARENA, 0x40000
.set BATTLE_TYPE_FACTORY, 0x80000
.set BATTLE_TYPE_x100000, 0x100000
.set BATTLE_TYPE_PYRAMID, 0x200000
.set BATTLE_TYPE_INGAME_PARTNER, 0x400000
.set BATTLE_TYPE_x800000, 0x800000
.set BATTLE_TYPE_RECORDED, 0x1000000
.set BATTLE_TYPE_x2000000, 0x2000000
.set BATTLE_TYPE_x4000000, 0x4000000
.set BATTLE_TYPE_SECRET_BASE, 0x8000000
.set BATTLE_TYPE_GROUDON, 0x10000000
.set BATTLE_TYPE_KYORGE, 0x20000000
.set BATTLE_TYPE_RAYQUAZA, 0x40000000
.set BATTLE_TYPE_x80000000, 0x80000000
@ battle outcomes
.set WON, 0x1
.set LOST, 0x2
.set DREW, 0x3
.set RAN, 0x4
.set PLAYER_TELEPORTED, 0x5
.set MON_FLED, 0x6
.set CAUGHT, 0x7
.set OUT_OF_BALLS, 0x8
.set FORFEITED, 0x9
.set OPPONENT_TELEPORTED, 0xA
@ identities
.set IDENTITY_PLAYER_MON1, 0
.set IDENTITY_OPPONENT_MON1, 1
.set IDENTITY_PLAYER_MON2, 2
.set IDENTITY_OPPONENT_MON2, 3
@ status 1
.set STATUS_SLEEP, 0x7
.set STATUS_POISON, 0x8
.set STATUS_BURN, 0x10
.set STATUS_FREEZE, 0x20
.set STATUS_PARALYSIS, 0x40
.set STATUS_TOXIC_POISON, 0x80
.set STATUS_TOXIC_COUNTER, 0xF00
.set STATUS_ANY, STATUS_SLEEP | STATUS_POISON | STATUS_BURN | STATUS_FREEZE | STATUS_PARALYSIS | STATUS_TOXIC_POISON
@ status 2
.set STATUS2_CONFUSION, 0x00000007
.set STATUS2_FLINCHED, 0x00000008
.set STATUS2_UPROAR, 0x00000070
.set STATUS2_BIDE, 0x00000300
.set STATUS2_LOCK_CONFUSE, 0x00000C00
.set STATUS2_MULTIPLETURNS, 0x00001000
.set STATUS2_WRAPPED, 0x0000E000
.set STATUS2_INFATUATION, 0x000F0000
.set STATUS2_FOCUS_ENERGY, 0x00100000
.set STATUS2_TRANSFORMED, 0x00200000
.set STATUS2_RECHARGE, 0x00400000
.set STATUS2_RAGE, 0x00800000
.set STATUS2_SUBSTITUTE, 0x01000000
.set STATUS2_DESTINY_BOND, 0x02000000
.set STATUS2_ESCAPE_PREVENTION, 0x04000000
.set STATUS2_NIGHTMARE, 0x08000000
.set STATUS2_CURSED, 0x10000000
.set STATUS2_FORESIGHT, 0x20000000
.set STATUS2_DEFENSE_CURL, 0x40000000
.set STATUS2_TORMENT, 0x80000000
@ status 3
.set STATUS3_LEECHSEED_BANK, 0x3
.set STATUS3_LEECHSEED, 0x4
.set STATUS3_ALWAYS_HITS, 0x18
.set STATUS3_PERISH_SONG, 0x20
.set STATUS3_ON_AIR, 0x40
.set STATUS3_UNDERGROUND, 0x80
.set STATUS3_MINIMIZED, 0x100
.set STATUS3_ROOTED, 0x400
.set STATUS3_CHARGED_UP, 0x200
.set STATUS3_YAWN, 0x1800
.set STATUS3_IMPRISONED_OTHERS, 0x2000
.set STATUS3_GRUDGE, 0x4000
.set STATUS3_CANT_SCORE_A_CRIT, 0x8000
.set STATUS3_MUDSPORT, 0x10000
.set STATUS3_WATERSPORT, 0x20000
.set STATUS3_UNDERWATER, 0x40000
.set STATUS3_INTIMIDATE_POKES, 0x80000
.set STATUS3_TRACE, 0x100000
@ side status
.set SIDE_STATUS_REFLECT, 0x1
.set SIDE_STATUS_LIGHTSCREEN, 0x2
.set SIDE_STATUS_X4, 0x4
.set SIDE_STATUS_SPIKES, 0x10
.set SIDE_STATUS_SAFEGUARD, 0x20
.set SIDE_STATUS_FUTUREATTACK, 0x40
.set SIDE_STATUS_MIST, 0x100
.set SIDE_STATUS_SPIKES_DAMAGED, 0x200
@ stats
.set HP, 0x0
.set ATK, 0x1
.set DEF, 0x2
.set SPEED, 0x3
.set SPATK, 0x4
.set SPDEF, 0x5
.set ACC, 0x6
.set EVASION, 0x7
@ weather flags
.set WEATHER_RAIN_TEMPORARY, 0x01
.set WEATHER_RAIN_DOWNPOUR, 0x02
.set WEATHER_RAIN_PERMANENT, 0x04
.set WEATHER_SANDSTORM_TEMPORARY, 0x08
.set WEATHER_SANDSTORM_PERMANENT, 0x10
.set WEATHER_SUN_TEMPORARY, 0x20
.set WEATHER_SUN_PERMANENT, 0x40
.set WEATHER_HAIL, 0x80
@ hitmarker
.set HITMARKER_x10, 0x00000010
.set HITMARKER_x20, 0x00000020
.set HITMARKER_DESTINYBOND, 0x00000040
.set HITMARKER_NO_ANIMATIONS, 0x00000080
.set HITMARKER_IGNORE_SUBSTITUTE, 0x00000100
.set HITMARKER_NO_ATTACKSTRING, 0x00000200
.set HITMARKER_ATTACKSTRING_PRINTED, 0x00000400
.set HITMARKER_NO_PPDEDUCT, 0x00000800
.set HITMARKER_PURSUIT_TRAP, 0x00001000
.set HITMARKER_IGNORE_SAFEGUARD, 0x00002000
.set HITMARKER_SYNCHRONISE_EFFECT, 0x00004000
.set HITMARKER_RUN, 0x00008000
.set HITMARKER_IGNORE_ON_AIR, 0x00010000
.set HITMARKER_IGNORE_UNDERGROUND, 0x00020000
.set HITMARKER_IGNORE_UNDERWATER, 0x00040000
.set HITMARKER_UNABLE_TO_USE_MOVE, 0x00080000
.set HITMARKER_x100000, 0x00100000
.set HITMARKER_x200000, 0x00200000
.set HITMARKER_x400000, 0x00400000
.set HITMARKER_x800000, 0x00800000
.set HITMARKER_GRUDGE, 0x01000000
.set HITMARKER_OBEYS, 0x02000000
.set HITMARKER_x4000000, 0x04000000
.set HITMARKER_x8000000, 0x08000000
@ move flags
.set MOVESTATUS_MISSED, 0x1
.set MOVESTATUS_SUPEREFFECTIVE, 0x2
.set MOVESTATUS_NOTVERYEFFECTIVE, 0x4
.set MOVESTATUS_NOTAFFECTED, 0x8
.set MOVESTATUS_ONEHITKO, 0x10
.set MOVESTATUS_FAILED, 0x20
.set MOVESTATUS_ENDURED, 0x40
.set MOVESTATUS_HUNGON, 0x80

View File

@@ -0,0 +1,169 @@
@ animation ids
.set ANIM_CASTFORM_CHANGE, 0x0
.set ANIM_STATS_CHANGE, 0x1
.set ANIM_SUBSTITUTE_FADE, 0x2
.set ANIM_SUBSTITUTE_APPEAR, 0x3
.set ANIM_x4, 0x4
.set ANIM_ITEM_KNOCKOFF, 0x5
.set ANIM_TURN_TRAP, 0x6
.set ANIM_ITEM_EFFECT, 0x7
.set ANIM_SMOKEBALL_ESCAPE, 0x8
.set ANIM_HANGED_ON, 0x9
.set ANIM_RAIN_CONTINUES, 0xA
.set ANIM_SUN_CONTINUES, 0xB
.set ANIM_SANDSTORM_CONTINUES, 0xC
.set ANIM_HAIL_CONTINUES, 0xD
.set ANIM_LEECH_SEED_DRAIN, 0xE
.set ANIM_MON_HIT, 0xF
.set ANIM_ITEM_STEAL, 0x10
.set ANIM_SNATCH_MOVE, 0x11
.set ANIM_FUTURE_SIGHT_HIT, 0x12
.set ANIM_x13, 0x13
.set ANIM_x14, 0x14
.set ANIM_INGRAIN_HEAL, 0x15
.set ANIM_WISH_HEAL, 0x16
@ atk 80
.set ATK80_DMG_CHANGE_SIGN, 0x0
.set ATK80_DMG_HALF_BY_TWO_NOT_MORE_THAN_HALF_MAX_HP, 0x1
.set ATK80_DMG_DOUBLED, 0x2
@ compare operands
.set EQUAL, 0x0
.set NOT_EQUAL, 0x1
.set GREATER_THAN, 0x2
.set LESS_THAN, 0x3
.set COMMON_BITS, 0x4
.set NO_COMMON_BITS, 0x5
@ move effects
.set EFFECT_SLEEP, 0x1
.set EFFECT_POISON, 0x2
.set EFFECT_BURN, 0x3
.set EFFECT_FREEZE, 0x4
.set EFFECT_PARALYSIS, 0x5
.set EFFECT_TOXIC, 0x6
.set EFFECT_CONFUSION, 0x7
.set EFFECT_FLINCH, 0x8
.set EFFECT_TRI_ATTACK, 0x9
.set EFFECT_UPROAR, 0xA
.set EFFECT_PAYDAY, 0xB
.set EFFECT_CHARGING, 0xC
.set EFFECT_WRAP, 0xD
.set EFFECT_RECOIL_25, 0xE
.set EFFECT_ATK_PLUS_1, 0xF
.set EFFECT_DEF_PLUS_1, 0x10
.set EFFECT_SPD_PLUS_1, 0x11
.set EFFECT_SP_ATK_PLUS_1, 0x12
.set EFFECT_SP_DEF_PLUS_1, 0x13
.set EFFECT_ACC_PLUS_1, 0x14
.set EFFECT_EVS_PLUS_1, 0x15
.set EFFECT_ATK_MINUS_1, 0x16
.set EFFECT_DEF_MINUS_1, 0x17
.set EFFECT_SPD_MINUS_1, 0x18
.set EFFECT_SP_ATK_MINUS_1, 0x19
.set EFFECT_SP_DEF_MINUS_1, 0x1A
.set EFFECT_ACC_MINUS_1, 0x1B
.set EFFECT_EVS_MINUS_1, 0x1C
.set EFFECT_RECHARGE, 0x1D
.set EFFECT_RAGE, 0x1E
.set EFFECT_STEAL_ITEM, 0x1F
.set EFFECT_PREVENT_ESCAPE, 0x20
.set EFFECT_NIGHTMARE, 0x21
.set EFFECT_ALL_STATS_UP, 0x22
.set EFFECT_RAPIDSPIN, 0x23
.set EFFECT_REMOVE_PARALYSIS, 0x24
.set EFFECT_ATK_DEF_DOWN, 0x25
.set EFFECT_RECOIL_33_PARALYSIS, 0x26
.set EFFECT_ATK_PLUS_2, 0x27
.set EFFECT_DEF_PLUS_2, 0x28
.set EFFECT_SPD_PLUS_2, 0x29
.set EFFECT_SP_ATK_PLUS_2, 0x2A
.set EFFECT_SP_DEF_PLUS_2, 0x2B
.set EFFECT_ACC_PLUS_2, 0x2C
.set EFFECT_EVS_PLUS_2, 0x2D
.set EFFECT_ATK_MINUS_2, 0x2E
.set EFFECT_DEF_MINUS_2, 0x2F
.set EFFECT_SPD_MINUS_2, 0x30
.set EFFECT_SP_ATK_MINUS_2, 0x31
.set EFFECT_SP_DEF_MINUS_2, 0x32
.set EFFECT_ACC_MINUS_2, 0x33
.set EFFECT_EVS_MINUS_2, 0x34
.set EFFECT_THRASH, 0x35
.set EFFECT_KNOCK_OFF, 0x36
.set EFFECT_NOTHING_37, 0x37
.set EFFECT_NOTHING_38, 0x38
.set EFFECT_NOTHING_39, 0x39
.set EFFECT_NOTHING_3A, 0x3A
.set EFFECT_SP_ATK_TWO_DOWN, 0x3B
.set EFFECT_NOTHING_3C, 0x3C
.set EFFECT_NOTHING_3D, 0x3D
.set EFFECT_NOTHING_3E, 0x3E
.set EFFECT_NOTHING_3F, 0x3F
.set AFFECTS_USER, 0x40
.set CERTAIN, 0x80
@ accuracy calc
.set NO_ACC_CALC, 0xFFFE
.set NO_ACC_CALC_CHECK_LOCK_ON, 0xFFFF
.set ACC_CURR_MOVE, 0x0
@ bank values
.set TARGET, 0x0
.set ATTACKER, 0x1
.set EFFECT_BANK, 0x2
.set GBANK_1, 0x3
.set ATTACKER_WITH_PARTNER, 0x4 @ only for cmd98
.set BANK0, 0x7
.set SCRIPTING_BANK, 0xA
.set OPPONENT1, 0xC
@ various
.set VARIOUS_CANCEL_MULTI_TURN_MOVES, 0
.set VARIOUS_SET_MAGIC_COAT_TARGET, 1
.set VARIOUS_IS_RUNNING_IMPOSSIBLE, 2
.set VARIOUS_GET_MOVE_TARGET, 3
.set VARIOUS_RESET_INTIMIDATE_TRACE_BITS, 5
.set VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP, 6
.set VARIOUS_EMIT_YESNOBOX, 13
.set VARIOUS_WAIT_CRY, 18
.set VARIOUS_RETURN_OPPONENT_MON1, 19
.set VARIOUS_RETURN_OPPONENT_MON2, 20
.set VARIOUS_SET_TELEPORT_OUTCOME, 25
.set VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC, 26
@ jumpifcant switch flag argument
.set ATK4F_DONT_CHECK_STATUSES, 0x80
@ battle scripting struct
.equiv sPAINSPLIT_HP, gBattleScripting
.equiv sBIDE_DMG, gBattleScripting + 4
.equiv sMULTIHIT_STRING, gBattleScripting + 8
.equiv sDMG_MULTIPLIER, gBattleScripting + 0xE
.equiv sTWOTURN_STRINGID, gBattleScripting + 0xF
.equiv sANIM_ARG1, gBattleScripting + 0x10
.equiv sANIM_ARG2, gBattleScripting + 0x11
.equiv sTRIPLE_KICK_POWER, gBattleScripting + 0x12
.equiv sMOVEEND_STATE, gBattleScripting + 0x14
.equiv sFIELD_15, gBattleScripting + 0x15
.equiv sFIELD_16, gBattleScripting + 0x16
.equiv sBANK, gBattleScripting + 0x17
.equiv sANIM_TURN, gBattleScripting + 0x18
.equiv sANIM_TARGETS_HIT, gBattleScripting + 0x19
.equiv sSTATCHANGER, gBattleScripting + 0x1A
.equiv sFIELD_1B, gBattleScripting + 0x1B
.equiv sGIVEEXP_STATE, gBattleScripting + 0x1C
.equiv sBATTLE_STYLE, gBattleScripting + 0x1D
.equiv sLVLBOX_STATE, gBattleScripting + 0x1E
.equiv sLEARNMOVE_STATE, gBattleScripting + 0x1F
.equiv sFIELD_20, gBattleScripting + 0x20
.equiv sRESHOW_MAIN_STATE, gBattleScripting + 0x21
.equiv sRESHOW_HELPER_STATE, gBattleScripting + 0x22
.equiv sFIELD_23, gBattleScripting + 0x23
.equiv sFIELD_24, gBattleScripting + 0x24
.equiv sMULTIPLAYER_ID, gBattleScripting + 0x25
@ battle communication struct
.equiv cEFFECT_CHOOSER, gBattleCommunication + 3
.equiv cMULTISTRING_CHOOSER, gBattleCommunication + 5

375
constants/battle_text.inc Normal file
View File

@@ -0,0 +1,375 @@
.set STRINGID_INTROMSG, 0
.set STRINGID_INTROSENDOUT, 1
.set STRINGID_RETURNMON, 2
.set STRINGID_SWITCHINMON, 3
.set STRINGID_USEDMOVE, 4
.set STRINGID_BATTLEEND, 5
.set STRINGID_TRAINER1LOSETEXT, 12
.set STRINGID_PKMNGAINEDEXP, 13
.set STRINGID_PKMNGREWTOLV, 14
.set STRINGID_PKMNLEARNEDMOVE, 15
.set STRINGID_TRYTOLEARNMOVE1, 16
.set STRINGID_TRYTOLEARNMOVE2, 17
.set STRINGID_TRYTOLEARNMOVE3, 18
.set STRINGID_PKMNFORGOTMOVE, 19
.set STRINGID_STOPLEARNINGMOVE, 20
.set STRINGID_DIDNOTLEARNMOVE, 21
.set STRINGID_PKMNLEARNEDMOVE2, 22
.set STRINGID_ATTACKMISSED, 23
.set STRINGID_PKMNPROTECTEDITSELF, 24
.set STRINGID_STATSWONTINCREASE2, 25
.set STRINGID_AVOIDEDDAMAGE, 26
.set STRINGID_ITDOESNTAFFECT, 27
.set STRINGID_ATTACKERFAINTED, 28
.set STRINGID_TARGETFAINTED, 29
.set STRINGID_PLAYERGOTMONEY, 30
.set STRINGID_PLAYERWHITEOUT, 31
.set STRINGID_PLAYERWHITEOUT2, 32
.set STRINGID_PREVENTSESCAPE, 33
.set STRINGID_HITXTIMES, 34
.set STRINGID_PKMNFELLASLEEP, 35
.set STRINGID_PKMNMADESLEEP, 36
.set STRINGID_PKMNALREADYASLEEP, 37
.set STRINGID_PKMNALREADYASLEEP2, 38
.set STRINGID_PKMNWASNTAFFECTED, 39
.set STRINGID_PKMNWASPOISONED, 40
.set STRINGID_PKMNPOISONEDBY, 41
.set STRINGID_PKMNHURTBYPOISON, 42
.set STRINGID_PKMNALREADYPOISONED, 43
.set STRINGID_PKMNBADLYPOISONED, 44
.set STRINGID_PKMNENERGYDRAINED, 45
.set STRINGID_PKMNWASBURNED, 46
.set STRINGID_PKMNBURNEDBY, 47
.set STRINGID_PKMNHURTBYBURN, 48
.set STRINGID_PKMNWASFROZEN, 49
.set STRINGID_PKMNFROZENBY, 50
.set STRINGID_PKMNISFROZEN, 51
.set STRINGID_PKMNWASDEFROSTED, 52
.set STRINGID_PKMNWASDEFROSTED2, 53
.set STRINGID_PKMNWASDEFROSTEDBY, 54
.set STRINGID_PKMNWASPARALYZED, 55
.set STRINGID_PKMNWASPARALYZEDBY, 56
.set STRINGID_PKMNISPARALYZED, 57
.set STRINGID_PKMNISALREADYPARALYZED, 58
.set STRINGID_PKMNHEALEDPARALYSIS, 59
.set STRINGID_PKMNDREAMEATEN, 60
.set STRINGID_STATSWONTINCREASE, 61
.set STRINGID_STATSWONTDECREASE, 62
.set STRINGID_TEAMSTOPPEDWORKING, 63
.set STRINGID_FOESTOPPEDWORKING, 64
.set STRINGID_PKMNISCONFUSED, 65
.set STRINGID_PKMNHEALEDCONFUSION, 66
.set STRINGID_PKMNWASCONFUSED, 67
.set STRINGID_PKMNALREADYCONFUSED, 68
.set STRINGID_PKMNFELLINLOVE, 69
.set STRINGID_PKMNINLOVE, 70
.set STRINGID_PKMNIMMOBILIZEDBYLOVE, 71
.set STRINGID_PKMNBLOWNAWAY, 72
.set STRINGID_PKMNCHANGEDTYPE, 73
.set STRINGID_PKMNFLINCHED, 74
.set STRINGID_PKMNREGAINEDHEALTH, 75
.set STRINGID_PKMNHPFULL, 76
.set STRINGID_PKMNRAISEDSPDEF, 77
.set STRINGID_PKMNRAISEDDEF, 78
.set STRINGID_PKMNCOVEREDBYVEIL, 79
.set STRINGID_PKMNUSEDSAFEGUARD, 80
.set STRINGID_PKMNSAFEGUARDEXPIRED, 81
.set STRINGID_PKMNWENTTOSLEEP, 82
.set STRINGID_PKMNSLEPTHEALTHY, 83
.set STRINGID_PKMNWHIPPEDWHIRLWIND, 84
.set STRINGID_PKMNTOOKSUNLIGHT, 85
.set STRINGID_PKMNLOWEREDHEAD, 86
.set STRINGID_PKMNISGLOWING, 87
.set STRINGID_PKMNFLEWHIGH, 88
.set STRINGID_PKMNDUGHOLE, 89
.set STRINGID_PKMNSQUEEZEDBYBIND, 90
.set STRINGID_PKMNTRAPPEDINVORTEX, 91
.set STRINGID_PKMNWRAPPEDBY, 92
.set STRINGID_PKMNCLAMPED, 93
.set STRINGID_PKMNHURTBY, 94
.set STRINGID_PKMNFREEDFROM, 95
.set STRINGID_PKMNCRASHED, 96
.set STRINGID_PKMNSHROUDEDINMIST, 97
.set STRINGID_PKMNPROTECTEDBYMIST, 98
.set STRINGID_PKMNGETTINGPUMPED, 99
.set STRINGID_PKMNHITWITHRECOIL, 100
.set STRINGID_PKMNPROTECTEDITSELF2, 101
.set STRINGID_PKMNBUFFETEDBYSANDSTORM, 102
.set STRINGID_PKMNPELTEDBYHAIL, 103
.set STRINGID_PKMNSEEDED, 104
.set STRINGID_PKMNEVADEDATTACK, 105
.set STRINGID_PKMNSAPPEDBYLEECHSEED, 106
.set STRINGID_PKMNFASTASLEEP, 107
.set STRINGID_PKMNWOKEUP, 108
.set STRINGID_PKMNUPROARKEPTAWAKE, 109
.set STRINGID_PKMNWOKEUPINUPROAR, 110
.set STRINGID_PKMNCAUSEDUPROAR, 111
.set STRINGID_PKMNMAKINGUPROAR, 112
.set STRINGID_PKMNCALMEDDOWN, 113
.set STRINGID_PKMNCANTSLEEPINUPROAR, 114
.set STRINGID_PKMNSTOCKPILED, 115
.set STRINGID_PKMNCANTSTOCKPILE, 116
.set STRINGID_PKMNCANTSLEEPINUPROAR2, 117
.set STRINGID_UPROARKEPTPKMNAWAKE, 118
.set STRINGID_PKMNSTAYEDAWAKEUSING, 119
.set STRINGID_PKMNSTORINGENERGY, 120
.set STRINGID_PKMNUNLEASHEDENERGY, 121
.set STRINGID_PKMNFATIGUECONFUSION, 122
.set STRINGID_PKMNPICKEDUPITEM, 123
.set STRINGID_PKMNUNAFFECTED, 124
.set STRINGID_PKMNTRANSFORMEDINTO, 125
.set STRINGID_PKMNMADESUBSTITUTE, 126
.set STRINGID_PKMNHASSUBSTITUTE, 127
.set STRINGID_SUBSTITUTEDAMAGED, 128
.set STRINGID_PKMNSUBSTITUTEFADED, 129
.set STRINGID_PKMNMUSTRECHARGE, 130
.set STRINGID_PKMNRAGEBUILDING, 131
.set STRINGID_PKMNMOVEWASDISABLED, 132
.set STRINGID_PKMNMOVEISDISABLED, 133
.set STRINGID_PKMNMOVEDISABLEDNOMORE, 134
.set STRINGID_PKMNGOTENCORE, 135
.set STRINGID_PKMNENCOREENDED, 136
.set STRINGID_PKMNTOOKAIM, 137
.set STRINGID_PKMNSKETCHEDMOVE, 138
.set STRINGID_PKMNTRYINGTOTAKEFOE, 139
.set STRINGID_PKMNTOOKFOE, 140
.set STRINGID_PKMNREDUCEDPP, 141
.set STRINGID_PKMNSTOLEITEM, 142
.set STRINGID_TARGETCANTESCAPENOW, 143
.set STRINGID_PKMNFELLINTONIGHTMARE, 144
.set STRINGID_PKMNLOCKEDINNIGHTMARE, 145
.set STRINGID_PKMNLAIDCURSE, 146
.set STRINGID_PKMNAFFLICTEDBYCURSE, 147
.set STRINGID_SPIKESSCATTERED, 148
.set STRINGID_PKMNHURTBYSPIKES, 149
.set STRINGID_PKMNIDENTIFIED, 150
.set STRINGID_PKMNPERISHCOUNTFELL, 151
.set STRINGID_PKMNBRACEDITSELF, 152
.set STRINGID_PKMNENDUREDHIT, 153
.set STRINGID_MAGNITUDESTRENGTH, 154
.set STRINGID_PKMNCUTHPMAXEDATTACK, 155
.set STRINGID_PKMNCOPIEDSTATCHANGES, 156
.set STRINGID_PKMNGOTFREE, 157
.set STRINGID_PKMNSHEDLEECHSEED, 158
.set STRINGID_PKMNBLEWAWAYSPIKES, 159
.set STRINGID_PKMNFLEDFROMBATTLE, 160
.set STRINGID_PKMNFORESAWATTACK, 161
.set STRINGID_PKMNTOOKATTACK, 162
.set STRINGID_PKMNATTACK, 163
.set STRINGID_PKMNCENTERATTENTION, 164
.set STRINGID_PKMNCHARGINGPOWER, 165
.set STRINGID_NATUREPOWERTURNEDINTO, 166
.set STRINGID_PKMNSTATUSNORMAL, 167
.set STRINGID_PKMNHASNOMOVESLEFT, 168
.set STRINGID_PKMNSUBJECTEDTOTORMENT, 169
.set STRINGID_PKMNCANTUSEMOVETORMENT, 170
.set STRINGID_PKMNTIGHTENINGFOCUS, 171
.set STRINGID_PKMNFELLFORTAUNT, 172
.set STRINGID_PKMNCANTUSEMOVETAUNT, 173
.set STRINGID_PKMNREADYTOHELP, 174
.set STRINGID_PKMNSWITCHEDITEMS, 175
.set STRINGID_PKMNCOPIEDFOE, 176
.set STRINGID_PKMNMADEWISH, 177
.set STRINGID_PKMNWISHCAMETRUE, 178
.set STRINGID_PKMNPLANTEDROOTS, 179
.set STRINGID_PKMNABSORBEDNUTRIENTS, 180
.set STRINGID_PKMNANCHOREDITSELF, 181
.set STRINGID_PKMNWASMADEDROWSY, 182
.set STRINGID_PKMNKNOCKEDOFF, 183
.set STRINGID_PKMNSWAPPEDABILITIES, 184
.set STRINGID_PKMNSEALEDOPPONENTMOVE, 185
.set STRINGID_PKMNCANTUSEMOVESEALED, 186
.set STRINGID_PKMNWANTSGRUDGE, 187
.set STRINGID_PKMNLOSTPPGRUDGE, 188
.set STRINGID_PKMNSHROUDEDITSELF, 189
.set STRINGID_PKMNMOVEBOUNCED, 190
.set STRINGID_PKMNWAITSFORTARGET, 191
.set STRINGID_PKMNSNATCHEDMOVE, 192
.set STRINGID_PKMNMADEITRAIN, 193
.set STRINGID_PKMNRAISEDSPEED, 194
.set STRINGID_PKMNPROTECTEDBY, 195
.set STRINGID_PKMNPREVENTSUSAGE, 196
.set STRINGID_PKMNRESTOREDHPUSING, 197
.set STRINGID_PKMNCHANGEDTYPEWITH, 198
.set STRINGID_PKMNPREVENTSPARALYSISWITH, 199
.set STRINGID_PKMNPREVENTSROMANCEWITH, 200
.set STRINGID_PKMNPREVENTSPOISONINGWITH, 201
.set STRINGID_PKMNPREVENTSCONFUSIONWITH, 202
.set STRINGID_PKMNRAISEDFIREPOWERWITH, 203
.set STRINGID_PKMNANCHORSITSELFWITH, 204
.set STRINGID_PKMNCUTSATTACKWITH, 205
.set STRINGID_PKMNPREVENTSSTATLOSSWITH, 206
.set STRINGID_PKMNHURTSWITH, 207
.set STRINGID_PKMNTRACED, 208
.set STRINGID_STATSHARPLY, 209
.set STRINGID_STATROSE, 210
.set STRINGID_STATHARSHLY, 211
.set STRINGID_STATFELL, 212
.set STRINGID_PKMNSSTATCHANGED, 213
.set STRINGID_PKMNSSTATCHANGED2, 214
.set STRINGID_PKMNSSTATCHANGED3, 215
.set STRINGID_PKMNSSTATCHANGED4, 216
.set STRINGID_CRITICALHIT, 217
.set STRINGID_ONEHITKO, 218
.set STRINGID_123POOF, 219
.set STRINGID_ANDELLIPSIS, 220
.set STRINGID_NOTVERYEFFECTIVE, 221
.set STRINGID_SUPEREFFECTIVE, 222
.set STRINGID_GOTAWAYSAFELY, 223
.set STRINGID_WILDPKMNFLED, 224
.set STRINGID_NORUNNINGFROMTRAINERS, 225
.set STRINGID_CANTESCAPE, 226
.set STRINGID_DONTLEAVEBIRCH, 227
.set STRINGID_BUTNOTHINGHAPPENED, 228
.set STRINGID_BUTITFAILED, 229
.set STRINGID_ITHURTCONFUSION, 230
.set STRINGID_MIRRORMOVEFAILED, 231
.set STRINGID_STARTEDTORAIN, 232
.set STRINGID_DOWNPOURSTARTED, 233
.set STRINGID_RAINCONTINUES, 234
.set STRINGID_DOWNPOURCONTINUES, 235
.set STRINGID_RAINSTOPPED, 236
.set STRINGID_SANDSTORMBREWED, 237
.set STRINGID_SANDSTORMRAGES, 238
.set STRINGID_SANDSTORMSUBSIDED, 239
.set STRINGID_SUNLIGHTGOTBRIGHT, 240
.set STRINGID_SUNLIGHTSTRONG, 241
.set STRINGID_SUNLIGHTFADED, 242
.set STRINGID_STARTEDHAIL, 243
.set STRINGID_HAILCONTINUES, 244
.set STRINGID_HAILSTOPPED, 245
.set STRINGID_FAILEDTOSPITUP, 246
.set STRINGID_FAILEDTOSWALLOW, 247
.set STRINGID_WINDBECAMEHEATWAVE, 248
.set STRINGID_STATCHANGESGONE, 249
.set STRINGID_COINSSCATTERED, 250
.set STRINGID_TOOWEAKFORSUBSTITUTE, 251
.set STRINGID_SHAREDPAIN, 252
.set STRINGID_BELLCHIMED, 253
.set STRINGID_FAINTINTHREE, 254
.set STRINGID_NOPPLEFT, 255
.set STRINGID_BUTNOPPLEFT, 256
.set STRINGID_PLAYERUSEDITEM, 257
.set STRINGID_WALLYUSEDITEM, 258
.set STRINGID_TRAINERBLOCKEDBALL, 259
.set STRINGID_DONTBEATHIEF, 260
.set STRINGID_ITDODGEDBALL, 261
.set STRINGID_YOUMISSEDPKMN, 262
.set STRINGID_PKMNBROKEFREE, 263
.set STRINGID_ITAPPEAREDCAUGHT, 264
.set STRINGID_AARGHALMOSTHADIT, 265
.set STRINGID_SHOOTSOCLOSE, 266
.set STRINGID_GOTCHAPKMNCAUGHT, 267
.set STRINGID_GOTCHAPKMNCAUGHT2, 268
.set STRINGID_GIVENICKNAMECAPTURED, 269
.set STRINGID_PKMNSENTTOPC, 270
.set STRINGID_PKMNDATAADDEDTODEX, 271
.set STRINGID_ITISRAINING, 272
.set STRINGID_SANDSTORMISRAGING, 273
.set STRINGID_CANTESCAPE2, 274
.set STRINGID_PKMNIGNORESASLEEP, 275
.set STRINGID_PKMNIGNOREDORDERS, 276
.set STRINGID_PKMNBEGANTONAP, 277
.set STRINGID_PKMNLOAFING, 278
.set STRINGID_PKMNWONTOBEY, 279
.set STRINGID_PKMNTURNEDAWAY, 280
.set STRINGID_PKMNPRETENDNOTNOTICE, 281
.set STRINGID_ENEMYABOUTTOSWITCHPKMN, 282
.set STRINGID_CREPTCLOSER, 283
.set STRINGID_CANTGETCLOSER, 284
.set STRINGID_PKMNWATCHINGCAREFULLY, 285
.set STRINGID_PKMNCURIOUSABOUTX, 286
.set STRINGID_PKMNENTHRALLEDBYX, 287
.set STRINGID_PKMNIGNOREDX, 288
.set STRINGID_THREWPOKEBLOCKATPKMN, 289
.set STRINGID_OUTOFSAFARIBALLS, 290
.set STRINGID_PKMNSITEMCUREDPARALYSIS, 291
.set STRINGID_PKMNSITEMCUREDPOISON, 292
.set STRINGID_PKMNSITEMHEALEDBURN, 293
.set STRINGID_PKMNSITEMDEFROSTEDIT, 294
.set STRINGID_PKMNSITEMWOKEIT, 295
.set STRINGID_PKMNSITEMSNAPPEDOUT, 296
.set STRINGID_PKMNSITEMCUREDPROBLEM, 297
.set STRINGID_PKMNSITEMRESTOREDHEALTH, 298
.set STRINGID_PKMNSITEMRESTOREDPP, 299
.set STRINGID_PKMNSITEMRESTOREDSTATUS, 300
.set STRINGID_PKMNSITEMRESTOREDHPALITTLE, 301
.set STRINGID_ITEMALLOWSONLYYMOVE, 302
.set STRINGID_PKMNHUNGONWITHX, 303
.set STRINGID_EMPTYSTRING3, 304
.set STRINGID_PKMNSXPREVENTSBURNS, 305
.set STRINGID_PKMNSXBLOCKSY, 306
.set STRINGID_PKMNSXRESTOREDHPALITTLE2, 307
.set STRINGID_PKMNSXWHIPPEDUPSANDSTORM, 308
.set STRINGID_PKMNSXPREVENTSYLOSS, 309
.set STRINGID_PKMNSXINFATUATEDY, 310
.set STRINGID_PKMNSXMADEYINEFFECTIVE, 311
.set STRINGID_PKMNSXCUREDYPROBLEM, 312
.set STRINGID_ITSUCKEDLIQUIDOOZE, 313
.set STRINGID_PKMNTRANSFORMED, 314
.set STRINGID_ELECTRICITYWEAKENED, 315
.set STRINGID_FIREWEAKENED, 316
.set STRINGID_PKMNHIDUNDERWATER, 317
.set STRINGID_PKMNSPRANGUP, 318
.set STRINGID_HMMOVESCANTBEFORGOTTEN, 319
.set STRINGID_XFOUNDONEY, 320
.set STRINGID_PLAYERDEFEATEDTRAINER1, 321
.set STRINGID_SOOTHINGAROMA, 322
.set STRINGID_ITEMSCANTBEUSEDNOW, 323
.set STRINGID_FORXCOMMAYZ, 324
.set STRINGID_USINGXTHEYOFZN, 325
.set STRINGID_PKMNUSEDXTOGETPUMPED, 326
.set STRINGID_PKMNSXMADEYUSELESS, 327
.set STRINGID_PKMNTRAPPEDBYSANDTOMB, 328
.set STRINGID_EMPTYSTRING4, 329
.set STRINGID_ABOOSTED, 330
.set STRINGID_PKMNSXINTENSIFIEDSUN, 331
.set STRINGID_PKMNMAKESGROUNDMISS, 332
.set STRINGID_YOUTHROWABALLNOWRIGHT, 333
.set STRINGID_PKMNSXTOOKATTACK, 334
.set STRINGID_PKMNCHOSEXASDESTINY, 335
.set STRINGID_PKMNLOSTFOCUS, 336
.set STRINGID_USENEXTPKMN, 337
.set STRINGID_PKMNFLEDUSINGITS, 338
.set STRINGID_PKMNFLEDUSING, 339
.set STRINGID_PKMNWASDRAGGEDOUT, 340
.set STRINGID_PREVENTEDFROMWORKING, 341
.set STRINGID_PKMNSITEMNORMALIZEDSTATUS, 342
.set STRINGID_TRAINER1USEDITEM, 343
.set STRINGID_BOXISFULL, 344
.set STRINGID_PKMNAVOIDEDATTACK, 345
.set STRINGID_PKMNSXMADEITINEFFECTIVE, 346
.set STRINGID_PKMNSXPREVENTSFLINCHING, 347
.set STRINGID_PKMNALREADYHASBURN, 348
.set STRINGID_STATSWONTDECREASE2, 349
.set STRINGID_PKMNSXBLOCKSY2, 350
.set STRINGID_PKMNSXWOREOFF, 351
.set STRINGID_PKMNRAISEDDEFALITTLE, 352
.set STRINGID_PKMNRAISEDSPDEFALITTLE, 353
.set STRINGID_THEWALLSHATTERED, 354
.set STRINGID_PKMNSXPREVENTSYSZ, 355
.set STRINGID_PKMNSXCUREDITSYPROBLEM, 356
.set STRINGID_ATTACKERCANTESCAPE, 357
.set STRINGID_PKMNOBTAINEDX, 358
.set STRINGID_PKMNOBTAINEDX2, 359
.set STRINGID_PKMNOBTAINEDXYOBTAINEDZ, 360
.set STRINGID_BUTNOEFFECT, 361
.set STRINGID_PKMNSXHADNOEFFECTONY, 362
.set STRINGID_TWOENEMIESDEFEATED, 363
.set STRINGID_TRAINER2LOSETEXT, 364
.set STRINGID_PKMNINCAPABLEOFPOWER, 365
.set STRINGID_GLINTAPPEARSINEYE, 366
.set STRINGID_PKMNGETTINGINTOPOSITION, 367
.set STRINGID_PKMNBEGANGROWLINGDEEPLY, 368
.set STRINGID_PKMNEAGERFORMORE, 369
.set STRINGID_DEFEATEDOPPONENTBYREFEREE, 370
.set STRINGID_LOSTTOOPPONENTBYREFEREE, 371
.set STRINGID_TIEDOPPONENTBYREFEREE, 372
.set STRINGID_QUESTIONFORFEITMATCH, 373
.set STRINGID_FORFEITEDMATCH, 374
.set STRINGID_PKMNTRANSFERREDSOMEONESPC, 375
.set STRINGID_PKMNTRANSFERREDLANETTESPC, 376
.set STRINGID_PKMNBOXSOMEONESPCFULL, 377
.set STRINGID_PKMNBOXLANETTESPCFULL, 378
.set STRINGID_TRAINER1WINTEXT, 379
.set STRINGID_TRAINER2WINTEXT, 380

File diff suppressed because it is too large Load Diff

View File

@@ -1,32 +1,36 @@
.include "asm/macros.inc"
.include "asm/macros/battle_script.inc"
.include "constants/constants.inc"
.include "constants/battle_constants.inc"
.include "constants/battle_script_constants.inc"
.include "constants/battle_text.inc"
.section script_data, "aw", %progbits
.align 2
gBattlescriptsForBallThrow:: @ 82DBD08
.4byte gUnknown_082DBD68
.4byte gUnknown_082DBD68
.4byte gUnknown_082DBD68
.4byte gUnknown_082DBD68
.4byte gUnknown_082DBD68
.4byte gUnknown_082DBD7E
.4byte gUnknown_082DBD68
.4byte gUnknown_082DBD68
.4byte gUnknown_082DBD68
.4byte gUnknown_082DBD68
.4byte gUnknown_082DBD68
.4byte gUnknown_082DBD68
.4byte gUnknown_082DBD68
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_SafariBallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.align 2
gUnknown_082DBD3C:: @ 82DBD3C
.4byte gUnknown_082DBE12
.4byte gUnknown_082DBE1C
.4byte gUnknown_082DBE1C
.4byte gUnknown_082DBE4B
.4byte gUnknown_082DBE6F
.4byte gUnknown_082DBE91
.4byte BattleScript_82DBE12
.4byte BattleScript_82DBE1C
.4byte BattleScript_82DBE1C
.4byte BattleScript_82DBE4B
.4byte BattleScript_82DBE6F
.4byte BattleScript_82DBE91
.align 2
gBattlescriptsForRunningByItem:: @ 82DBD54
@@ -34,55 +38,166 @@ gBattlescriptsForRunningByItem:: @ 82DBD54
.align 2
gBattlescriptsForSafariActions:: @ 82DBD58
.4byte gUnknown_082DBEBD
.4byte gUnknown_082DBEC4
.4byte gUnknown_082DBECD
.4byte gUnknown_082DBEE3
.4byte BattleScript_ActionWatchesCarefully
.4byte BattleScript_ActionGetNear
.4byte BattleScript_ActionThrowPokeblock
.4byte BattleScript_82DBEE3
gUnknown_082DBD68:: @ 82DBD68
.incbin "baserom.gba", 0x2dbd68, 0x16
BattleScript_BallThrow::
jumpifword COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_WALLY_TUTORIAL, BattleScript_BallThrowByWally
printstring STRINGID_PLAYERUSEDITEM
handleballthrow
gUnknown_082DBD7E:: @ 82DBD7E
.incbin "baserom.gba", 0x2dbd7e, 0x6
BattleScript_BallThrowByWally::
printstring STRINGID_WALLYUSEDITEM
handleballthrow
BattleScript_SuccessBallThrow:: @ 82DBD84
.incbin "baserom.gba", 0x2dbd84, 0x46
BattleScript_SafariBallThrow::
printstring STRINGID_PLAYERUSEDITEM
updatestatusicon ATTACKER
handleballthrow
BattleScript_WallyBallThrow:: @ 82DBDCA
.incbin "baserom.gba", 0x2dbdca, 0xa
BattleScript_SuccessBallThrow::
jumpifhalfword EQUAL, gLastUsedItem, ITEM_SAFARI_BALL, BattleScript_82DBD92
incrementgamestat 0xB
BattleScript_82DBD92::
printstring STRINGID_GOTCHAPKMNCAUGHT
trysetcaughtmondexflags BattleScript_82DBDA5
printstring STRINGID_PKMNDATAADDEDTODEX
waitstate
setbyte gBattleCommunication, 0x0
displaydexinfo
BattleScript_82DBDA5::
printstring STRINGID_GIVENICKNAMECAPTURED
waitstate
setbyte gBattleCommunication, 0x0
trygivecaughtmonnick BattleScript_82DBDC2
givecaughtmon
printfromtable gCaughtMonStringIds
waitmessage 0x40
goto BattleScript_82DBDC3
BattleScript_82DBDC2::
givecaughtmon
BattleScript_82DBDC3::
setbyte gBattleOutcome, CAUGHT
finishturn
BattleScript_ShakeBallThrow:: @ 82DBDD4
.incbin "baserom.gba", 0x2dbdd4, 0x2e
BattleScript_WallyBallThrow::
printstring STRINGID_GOTCHAPKMNCAUGHT2
setbyte gBattleOutcome, CAUGHT
finishturn
BattleScript_TrainerBallBlock:: @ 82DBE02
.incbin "baserom.gba", 0x2dbe02, 0x10
BattleScript_ShakeBallThrow::
printfromtable gBallEscapeStringIds
waitmessage 0x40
jumpifword NO_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_SAFARI, BattleScript_82DBE01
jumpifbyte NOT_EQUAL, gNumSafariBalls, 0x0, BattleScript_82DBE01
printstring STRINGID_OUTOFSAFARIBALLS
waitmessage 0x40
setbyte gBattleOutcome, OUT_OF_BALLS
BattleScript_82DBE01::
finishaction
gUnknown_082DBE12:: @ 82DBE12
.incbin "baserom.gba", 0x2dbe12, 0xa
BattleScript_TrainerBallBlock::
waitmessage 0x40
printstring STRINGID_TRAINERBLOCKEDBALL
waitmessage 0x40
printstring STRINGID_DONTBEATHIEF
waitmessage 0x40
finishaction
gUnknown_082DBE1C:: @ 82DBE1C
.incbin "baserom.gba", 0x2dbe1c, 0x2f
BattleScript_82DBE12::
setbyte sMOVEEND_STATE, 0xF
moveend 0x1, 0x0
end
gUnknown_082DBE4B:: @ 82DBE4B
.incbin "baserom.gba", 0x2dbe4b, 0x24
BattleScript_82DBE1C::
printstring STRINGID_EMPTYSTRING3
pause 0x30
playse SE_KAIFUKU
printstring STRINGID_TRAINER1USEDITEM
waitmessage 0x40
useitemonopponent
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate ATTACKER
datahpupdate ATTACKER
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
waitmessage 0x40
updatestatusicon ATTACKER
setbyte sMOVEEND_STATE, 0xF
moveend 0x1, 0x0
finishaction
gUnknown_082DBE6F:: @ 82DBE6F
.incbin "baserom.gba", 0x2dbe6f, 0x22
BattleScript_82DBE4B::
printstring STRINGID_EMPTYSTRING3
pause 0x30
playse SE_KAIFUKU
printstring STRINGID_TRAINER1USEDITEM
waitmessage 0x40
useitemonopponent
printfromtable gTrainerItemCuredStatusStringIds
waitmessage 0x40
updatestatusicon ATTACKER
setbyte sMOVEEND_STATE, 0xF
moveend 0x1, 0x0
finishaction
gUnknown_082DBE91:: @ 82DBE91
.incbin "baserom.gba", 0x2dbe91, 0x22
BattleScript_82DBE6F::
printstring STRINGID_EMPTYSTRING3
pause 0x30
playse SE_KAIFUKU
printstring STRINGID_TRAINER1USEDITEM
waitmessage 0x40
useitemonopponent
printfromtable gStatUpStringIds
waitmessage 0x40
setbyte sMOVEEND_STATE, 0xF
moveend 0x1, 0x0
finishaction
BattleScript_RunByUsingItem:: @ 82DBEB3
.incbin "baserom.gba", 0x2dbeb3, 0xA
BattleScript_82DBE91::
printstring STRINGID_EMPTYSTRING3
pause 0x30
playse SE_KAIFUKU
printstring STRINGID_TRAINER1USEDITEM
waitmessage 0x40
useitemonopponent
printfromtable gMistUsedStringIds
waitmessage 0x40
setbyte sMOVEEND_STATE, 0xF
moveend 0x1, 0x0
finishaction
gUnknown_082DBEBD:: @ 82DBEBD
.incbin "baserom.gba", 0x2dbebd, 0x7
BattleScript_RunByUsingItem::
playse SE_NIGERU
setbyte gBattleOutcome, RAN
finishturn
gUnknown_082DBEC4:: @ 82DBEC4
.incbin "baserom.gba", 0x2dbec4, 0x9
BattleScript_ActionWatchesCarefully::
printstring STRINGID_PKMNWATCHINGCAREFULLY
waitmessage 0x40
end2
gUnknown_082DBECD:: @ 82DBECD
.incbin "baserom.gba", 0x2dbecd, 0x16
BattleScript_ActionGetNear::
printfromtable gSafariGetNearStringIds
waitmessage 0x40
end2
gUnknown_082DBEE3:: @ 82DBEE3
.incbin "baserom.gba", 0x2dbee3, 0x15
BattleScript_ActionThrowPokeblock::
printstring STRINGID_THREWPOKEBLOCKATPKMN
waitmessage 0x40
playanimation ATTACKER, ANIM_x4, NULL
printfromtable gSafariPokeblockResultStringIds
waitmessage 0x40
end2
BattleScript_82DBEE3::
printstring STRINGID_RETURNMON
waitmessage 0x40
returnatktoball
waitstate
trainerslidein TARGET
waitstate
printstring STRINGID_YOUTHROWABALLNOWRIGHT
waitmessage 0x40
end2

View File

@@ -272,6 +272,8 @@
#define BS_GET_TARGET 0
#define BS_GET_ATTACKER 1
#define BS_GET_EFFECT_BANK 2
#define BS_GET_gBank1 3
#define BS_GET_BANK_0 7
#define BS_ATTACKER_WITH_PARTNER 4 // for atk98_status_icon_update
#define BS_GET_ATTACKER_SIDE 8 // for atk1E_jumpifability
#define BS_GET_NOT_ATTACKER_SIDE 9 // for atk1E_jumpifability
@@ -704,13 +706,6 @@ struct BattleStruct
extern struct BattleStruct* gBattleStruct;
#define MEME_ACCESS_U8(structName, structPtr, arrayId, offsetField, value) \
{ \
u8* var2 = (u8*)((u32)(arrayId)); \
var2 = (u32)(structPtr) + var2; \
var2[offsetof(struct structName, offsetField)] = value; \
}
#define GET_MOVE_TYPE(move, typeArg) \
{ \
if (gBattleStruct->dynamicMoveType) \
@@ -835,20 +830,20 @@ extern struct BattleStruct* gBattleStruct;
#define GET_STAT_BUFF_VALUE(n)(((n >> 4) & 7)) // 0x10, 0x20, 0x40
#define STAT_BUFF_NEGATIVE 0x80 // 0x80, the sign bit
#define SET_STAT_BUFF_ID(n)((n & 0xF))
#define SET_STAT_BUFF_VALUE(n)(((s8)(((s8)(n) << 4)) & 0xF0))
#define SET_STATCHANGER(statId, stage, goesDown)(gBattleScripting.statChanger = (statId) + (stage << 4) + (goesDown << 7))
struct BattleScripting
{
s32 painSplitHp;
s32 bideDmg;
u8 multihitString[6];
u8 dmgMultiplier;
u8 field_F;
u8 twoTurnsMoveStringId;
u8 animArg1;
u8 animArg2;
u8 field_12;
u8 field_13;
u16 tripleKickPower;
u8 atk49_state;
u8 field_15;
u8 field_16;

View File

@@ -198,7 +198,7 @@ void EmitBallThrowAnim(u8 bufferId, u8 caseId);
void EmitPause(u8 bufferId, u8 toWait, void *data); // unused
void EmitMoveAnimation(u8 bufferId, u16 move, u8 turnOfMove, u16 movePower, s32 dmg, u8 friendship, struct DisableStruct *disableStructPtr, u8 multihit);
void EmitPrintString(u8 bufferId, u16 stringId);
void EmitPrintStringPlayerOnly(u8 bufferId, u16 stringId);
void EmitPrintSelectionString(u8 bufferId, u16 stringId);
void EmitChooseAction(u8 bufferId, u8 arg1, u16 arg2);
void EmitUnknownYesNoBox(u8 bufferId);
void EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct *movePpData);
@@ -224,7 +224,7 @@ void EmitCmd39(u8 bufferId); // unused
void EmitCmd40(u8 bufferId); // unused
void EmitHitAnimation(u8 bufferId);
void EmitCmd42(u8 bufferId);
void EmitEffectivenessSound(u8 bufferId, u16 songId);
void EmitPlaySE(u8 bufferId, u16 songId);
void EmitPlayFanfareOrBGM(u8 bufferId, u16 songId, bool8 playBGM);
void EmitFaintingCry(u8 bufferId);
void EmitIntroSlide(u8 bufferId, u8 terrainId);

View File

@@ -74,6 +74,14 @@
#define B_BUFF_PLACEHOLDER_BEGIN 0xFD
#define B_BUFF_EOS 0xFF
#define PREPARE_FLAVOUR_BUFFER(textVar, flavourId) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
textVar[1] = B_BUFF_NEGATIVE_FLAVOUR; \
textVar[2] = flavourId; \
textVar[3] = B_BUFF_EOS; \
}
#define PREPARE_STAT_BUFFER(textVar, statId) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
@@ -189,7 +197,7 @@
struct StringInfoBattle
{
u16 currentMove;
u16 lastMove;
u16 originallyUsedMove;
u16 lastItem;
u8 lastAbility;
u8 scrActive;

View File

@@ -153,12 +153,12 @@ enum
EFFECT_EARTHQUAKE,
EFFECT_FUTURE_SIGHT,
EFFECT_GUST,
EFFECT_FLINCH_HIT_2, // STOMP ASTONISH EXTRASENSORY NEEDLE_ARM
EFFECT_STOMP, // STOMP ASTONISH EXTRASENSORY NEEDLE_ARM
EFFECT_SOLARBEAM,
EFFECT_THUNDER,
EFFECT_TELEPORT,
EFFECT_BEAT_UP,
EFFECT_FLY,
EFFECT_SEMI_INVULNERABLE,
EFFECT_DEFENSE_CURL,
EFFECT_SOFTBOILED,
EFFECT_FAKE_OUT,

View File

@@ -1,6 +1,10 @@
#ifndef GUARD_BATTLE_SCRIPT_COMMANDS_H
#define GUARD_BATTLE_SCRIPT_COMMANDS_H
#define NO_ACC_CALC 0xFFFE
#define NO_ACC_CALC_CHECK_LOCK_ON 0xFFFF
#define ACC_CURR_MOVE 0
#define CMP_EQUAL 0x0
#define CMP_NOT_EQUAL 0x1
#define CMP_GREATER_THAN 0x2
@@ -21,7 +25,7 @@
#define VARIOUS_CANCEL_MULTI_TURN_MOVES 0
#define VARIOUS_SET_MAGIC_COAT_TARGET 1
#define VARIOUS_CAN_RUN_FROM_BATTLE 2
#define VARIOUS_IS_RUNNING_IMPOSSIBLE 2
#define VARIOUS_GET_MOVE_TARGET 3
#define VARIOUS_RESET_INTIMIDATE_TRACE_BITS 5
#define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 6

640
include/battle_scripts.h Normal file
View File

@@ -0,0 +1,640 @@
#ifndef GUARD_BATTLE_SCRIPTS_H
#define GUARD_BATTLE_SCRIPTS_H
extern const u8 BattleScript_EffectHit[];
extern const u8 BattleScript_HitFromAtkCanceler[];
extern const u8 BattleScript_HitFromAccCheck[];
extern const u8 BattleScript_HitFromAtkString[];
extern const u8 BattleScript_HitFromCritCalc[];
extern const u8 BattleScript_HitFromAtkAnimation[];
extern const u8 BattleScript_MoveEnd[];
extern const u8 BattleScript_MakeMoveMissed[];
extern const u8 BattleScript_PrintMoveMissed[];
extern const u8 BattleScript_MoveMissedPause[];
extern const u8 BattleScript_MoveMissed[];
extern const u8 BattleScript_EffectSleep[];
extern const u8 BattleScript_AlreadyAsleep[];
extern const u8 BattleScript_WasntAffected[];
extern const u8 BattleScript_CantMakeAsleep[];
extern const u8 BattleScript_EffectPoisonHit[];
extern const u8 BattleScript_EffectAbsorb[];
extern const u8 BattleScript_82D8B26[];
extern const u8 BattleScript_82D8B2E[];
extern const u8 BattleScript_82D8B45[];
extern const u8 BattleScript_EffectBurnHit[];
extern const u8 BattleScript_EffectFreezeHit[];
extern const u8 BattleScript_EffectParalyzeHit[];
extern const u8 BattleScript_EffectExplosion[];
extern const u8 BattleScript_82D8B94[];
extern const u8 BattleScript_82D8B96[];
extern const u8 BattleScript_82D8BCF[];
extern const u8 BattleScript_82D8BEA[];
extern const u8 BattleScript_EffectDreamEater[];
extern const u8 BattleScript_82D8C0E[];
extern const u8 BattleScript_82D8C18[];
extern const u8 BattleScript_82D8C56[];
extern const u8 BattleScript_EffectMirrorMove[];
extern const u8 BattleScript_EffectAttackUp[];
extern const u8 BattleScript_EffectDefenseUp[];
extern const u8 BattleScript_EffectSpecialAttackUp[];
extern const u8 BattleScript_EffectEvasionUp[];
extern const u8 BattleScript_EffectStatUp[];
extern const u8 BattleScript_EffectStatUpAfterAtkCanceler[];
extern const u8 BattleScript_StatUpAttackAnim[];
extern const u8 BattleScript_StatUpDoAnim[];
extern const u8 BattleScript_StatUpPrintString[];
extern const u8 BattleScript_StatUpEnd[];
extern const u8 BattleScript_StatUp[];
extern const u8 BattleScript_EffectAttackDown[];
extern const u8 BattleScript_EffectDefenseDown[];
extern const u8 BattleScript_EffectSpeedDown[];
extern const u8 BattleScript_EffectAccuracyDown[];
extern const u8 BattleScript_EffectEvasionDown[];
extern const u8 BattleScript_EffectStatDown[];
extern const u8 BattleScript_StatDownDoAnim[];
extern const u8 BattleScript_StatDownPrintString[];
extern const u8 BattleScript_82D8D60[];
extern const u8 BattleScript_StatDown[];
extern const u8 BattleScript_EffectHaze[];
extern const u8 BattleScript_EffectBide[];
extern const u8 BattleScript_EffectRampage[];
extern const u8 BattleScript_82D8DAE[];
extern const u8 BattleScript_EffectRoar[];
extern const u8 BattleScript_EffectMultiHit[];
extern const u8 BattleScript_82D8DFD[];
extern const u8 BattleScript_82D8E1F[];
extern const u8 BattleScript_82D8E71[];
extern const u8 BattleScript_82D8E74[];
extern const u8 BattleScript_82D8E93[];
extern const u8 BattleScript_EffectConversion[];
extern const u8 BattleScript_EffectFlinchHit[];
extern const u8 BattleScript_EffectRestoreHp[];
extern const u8 BattleScript_EffectToxic[];
extern const u8 BattleScript_AlreadyPoisoned[];
extern const u8 BattleScript_ImmunityProtected[];
extern const u8 BattleScript_EffectPayDay[];
extern const u8 BattleScript_EffectLightScreen[];
extern const u8 BattleScript_EffectTriAttack[];
extern const u8 BattleScript_EffectRest[];
extern const u8 BattleScript_RestCantSleep[];
extern const u8 BattleScript_RestIsAlreadyAsleep[];
extern const u8 BattleScript_EffectOHKO[];
extern const u8 BattleScript_KOFail[];
extern const u8 BattleScript_EffectRazorWind[];
extern const u8 BattleScript_TwoTurnMovesSecondTurn[];
extern const u8 BattleScriptFirstChargingTurn[];
extern const u8 BattleScript_EffectSuperFang[];
extern const u8 BattleScript_EffectDragonRage[];
extern const u8 BattleScript_EffectTrap[];
extern const u8 BattleScript_DoWrapEffect[];
extern const u8 BattleScript_EffectDoubleHit[];
extern const u8 BattleScript_EffectRecoilIfMiss[];
extern const u8 BattleScript_82D9135[];
extern const u8 BattleScript_EffectMist[];
extern const u8 BattleScript_EffectFocusEnergy[];
extern const u8 BattleScript_EffectRecoil[];
extern const u8 BattleScript_EffectConfuse[];
extern const u8 BattleScript_AlreadyConfused[];
extern const u8 BattleScript_EffectAttackUp2[];
extern const u8 BattleScript_EffectDefenseUp2[];
extern const u8 BattleScript_EffectSpeedUp2[];
extern const u8 BattleScript_EffectSpecialAttackUp2[];
extern const u8 BattleScript_EffectSpecialDefenseUp2[];
extern const u8 BattleScript_EffectTransform[];
extern const u8 BattleScript_EffectAttackDown2[];
extern const u8 BattleScript_EffectDefenseDown2[];
extern const u8 BattleScript_EffectSpeedDown2[];
extern const u8 BattleScript_EffectSpecialDefenseDown2[];
extern const u8 BattleScript_EffectReflect[];
extern const u8 BattleScript_PrintReflectLightScreenSafeguardString[];
extern const u8 BattleScript_EffectPoison[];
extern const u8 BattleScript_EffectParalyze[];
extern const u8 BattleScript_AlreadyParalyzed[];
extern const u8 BattleScript_LimberProtected[];
extern const u8 BattleScript_EffectAttackDownHit[];
extern const u8 BattleScript_EffectDefenseDownHit[];
extern const u8 BattleScript_EffectSpeedDownHit[];
extern const u8 BattleScript_EffectSpecialAttackDownHit[];
extern const u8 BattleScript_EffectSpecialDefenseDownHit[];
extern const u8 BattleScript_EffectAccuracyDownHit[];
extern const u8 BattleScript_EffectSkyAttack[];
extern const u8 BattleScript_EffectConfuseHit[];
extern const u8 BattleScript_EffectTwineedle[];
extern const u8 BattleScript_EffectSubstitute[];
extern const u8 BattleScript_SubstituteAnim[];
extern const u8 BattleScript_SubstituteString[];
extern const u8 BattleScript_AlreadyHasSubstitute[];
extern const u8 BattleScript_EffectRecharge[];
extern const u8 BattleScript_MoveUsedMustRecharge[];
extern const u8 BattleScript_EffectRage[];
extern const u8 BattleScript_RageMiss[];
extern const u8 BattleScript_EffectMimic[];
extern const u8 BattleScript_EffectMetronome[];
extern const u8 BattleScript_EffectLeechSeed[];
extern const u8 BattleScript_DoLeechSeed[];
extern const u8 BattleScript_EffectSplash[];
extern const u8 BattleScript_EffectDisable[];
extern const u8 BattleScript_EffectLevelDamage[];
extern const u8 BattleScript_EffectPsywave[];
extern const u8 BattleScript_EffectCounter[];
extern const u8 BattleScript_EffectEncore[];
extern const u8 BattleScript_EffectPainSplit[];
extern const u8 BattleScript_EffectSnore[];
extern const u8 BattleScript_SnoreIsAsleep[];
extern const u8 BattleScript_DoSnore[];
extern const u8 BattleScript_EffectConversion2[];
extern const u8 BattleScript_EffectLockOn[];
extern const u8 BattleScript_EffectSketch[];
extern const u8 BattleScript_EffectSleepTalk[];
extern const u8 BattleScript_SleepTalkIsAsleep[];
extern const u8 BattleScript_SleepTalkUsingMove[];
extern const u8 BattleScript_EffectDestinyBond[];
extern const u8 BattleScript_EffectFlail[];
extern const u8 BattleScript_EffectSpite[];
extern const u8 BattleScript_EffectHealBell[];
extern const u8 BattleScript_CheckHealBellMon2Unaffected[];
extern const u8 BattleScript_PartyHealEnd[];
extern const u8 BattleScript_EffectTripleKick[];
extern const u8 BattleScript_TripleKickLoop[];
extern const u8 BattleScript_DoTripleKickAttack[];
extern const u8 BattleScript_TripleKickNoMoreHits[];
extern const u8 BattleScript_TripleKickPrintStrings[];
extern const u8 BattleScript_TripleKickEnd[];
extern const u8 BattleScript_EffectThief[];
extern const u8 BattleScript_EffectMeanLook[];
extern const u8 BattleScript_EffectNightmare[];
extern const u8 BattleScript_NightmareWorked[];
extern const u8 BattleScript_EffectMinimize[];
extern const u8 BattleScript_EffectCurse[];
extern const u8 BattleScript_CurseTrySpeed[];
extern const u8 BattleScript_CurseTryAttack[];
extern const u8 BattleScript_CurseTryDefence[];
extern const u8 BattleScript_CurseEnd[];
extern const u8 BattleScript_GhostCurse[];
extern const u8 BattleScript_DoGhostCurse[];
extern const u8 BattleScript_EffectProtect[];
extern const u8 BattleScript_EffectSpikes[];
extern const u8 BattleScript_EffectForesight[];
extern const u8 BattleScript_EffectPerishSong[];
extern const u8 BattleScript_PerishSongLoop[];
extern const u8 BattleScript_PerishSongLoopIncrement[];
extern const u8 BattleScript_PerishSongNotAffected[];
extern const u8 BattleScript_EffectSandstorm[];
extern const u8 BattleScript_EffectRollout[];
extern const u8 BattleScript_RolloutCheckAccuracy[];
extern const u8 BattleScript_RolloutHit[];
extern const u8 BattleScript_EffectSwagger[];
extern const u8 BattleScript_SwaggerTryConfuse[];
extern const u8 BattleScript_EffectFuryCutter[];
extern const u8 BattleScript_FuryCutterHit[];
extern const u8 BattleScript_EffectAttract[];
extern const u8 BattleScript_EffectReturn[];
extern const u8 BattleScript_EffectPresent[];
extern const u8 BattleScript_EffectSafeguard[];
extern const u8 BattleScript_EffectThawHit[];
extern const u8 BattleScript_EffectMagnitude[];
extern const u8 BattleScript_EffectBatonPass[];
extern const u8 BattleScript_EffectRapidSpin[];
extern const u8 BattleScript_EffectSonicboom[];
extern const u8 BattleScript_EffectMorningSun[];
extern const u8 BattleScript_EffectHiddenPower[];
extern const u8 BattleScript_EffectRainDance[];
extern const u8 BattleScript_MoveWeatherChange[];
extern const u8 BattleScript_EffectSunnyDay[];
extern const u8 BattleScript_EffectDefenseUpHit[];
extern const u8 BattleScript_EffectAttackUpHit[];
extern const u8 BattleScript_EffectAllStatsUpHit[];
extern const u8 BattleScript_EffectBellyDrum[];
extern const u8 BattleScript_EffectPsychUp[];
extern const u8 BattleScript_EffectMirrorCoat[];
extern const u8 BattleScript_EffectSkullBash[];
extern const u8 BattleScript_SkullBashEnd[];
extern const u8 BattleScript_EffectTwister[];
extern const u8 BattleScript_FlinchEffect[];
extern const u8 BattleScript_EffectEarthquake[];
extern const u8 BattleScript_82D9C44[];
extern const u8 BattleScript_82D9C64[];
extern const u8 BattleScript_82D9C73[];
extern const u8 BattleScript_82D9CAC[];
extern const u8 BattleScript_EffectFutureSight[];
extern const u8 BattleScript_EffectGust[];
extern const u8 BattleScript_EffectStomp[];
extern const u8 BattleScript_EffectSolarbeam[];
extern const u8 BattleScript_SolarbeamDecideTurn[];
extern const u8 BattleScript_SolarbeamOnFirstTurn[];
extern const u8 BattleScript_EffectThunder[];
extern const u8 BattleScript_EffectTeleport[];
extern const u8 BattleScript_EffectBeatUp[];
extern const u8 BattleScript_BeatUpLoop[];
extern const u8 BattleScript_BeatUpAttack[];
extern const u8 BattleScript_BeatUpEnd[];
extern const u8 BattleScript_EffectSemiInvulnerable[];
extern const u8 BattleScript_FirstTurnBounce[];
extern const u8 BattleScript_FirstTurnDive[];
extern const u8 BattleScript_FirstTurnFly[];
extern const u8 BattleScript_FirstTurnSemiInvulnerable[];
extern const u8 BattleScript_SecondTurnSemiInvulnerable[];
extern const u8 BattleScript_SemiInvulnerableTryHit[];
extern const u8 BattleScript_SemiInvulnerableMiss[];
extern const u8 BattleScript_EffectDefenseCurl[];
extern const u8 BattleScript_DefenseCurlDoStatUpAnim[];
extern const u8 BattleScript_EffectSoftboiled[];
extern const u8 BattleScript_PresentHealTarget[];
extern const u8 BattleScript_AlreadyAtFullHp[];
extern const u8 BattleScript_EffectFakeOut[];
extern const u8 BattleScript_ButItFailedAtkStringPpReduce[];
extern const u8 BattleScript_ButItFailedPpReduce[];
extern const u8 BattleScript_ButItFailed[];
extern const u8 BattleScript_NotAffected[];
extern const u8 BattleScript_EffectUproar[];
extern const u8 BattleScript_UproarHit[];
extern const u8 BattleScript_EffectStockpile[];
extern const u8 BattleScript_EffectSpitUp[];
extern const u8 BattleScript_SpitUpFail[];
extern const u8 BattleScript_82D9FA2[];
extern const u8 BattleScript_EffectSwallow[];
extern const u8 BattleScript_SwallowFail[];
extern const u8 BattleScript_EffectHail[];
extern const u8 BattleScript_EffectTorment[];
extern const u8 BattleScript_EffectFlatter[];
extern const u8 BattleScript_FlatterTryConfuse[];
extern const u8 BattleScript_EffectWillOWisp[];
extern const u8 BattleScript_WaterVeilPrevents[];
extern const u8 BattleScript_AlreadyBurned[];
extern const u8 BattleScript_EffectMemento[];
extern const u8 BattleScript_82DA119[];
extern const u8 BattleScript_82DA13C[];
extern const u8 BattleScript_82DA148[];
extern const u8 BattleScript_82DA153[];
extern const u8 BattleScript_82DA15A[];
extern const u8 BattleScript_EffectFacade[];
extern const u8 BattleScript_FacadeDoubleDmg[];
extern const u8 BattleScript_EffectFocusPunch[];
extern const u8 BattleScript_EffectSmellingsalt[];
extern const u8 BattleScript_82DA1BA[];
extern const u8 BattleScript_EffectFollowMe[];
extern const u8 BattleScript_EffectNaturePower[];
extern const u8 BattleScript_EffectCharge[];
extern const u8 BattleScript_EffectTaunt[];
extern const u8 BattleScript_EffectHelpingHand[];
extern const u8 BattleScript_EffectTrick[];
extern const u8 BattleScript_EffectRolePlay[];
extern const u8 BattleScript_EffectWish[];
extern const u8 BattleScript_EffectAssist[];
extern const u8 BattleScript_EffectIngrain[];
extern const u8 BattleScript_EffectSuperpower[];
extern const u8 BattleScript_EffectMagicCoat[];
extern const u8 BattleScript_EffectRecycle[];
extern const u8 BattleScript_EffectRevenge[];
extern const u8 BattleScript_EffectBrickBreak[];
extern const u8 BattleScript_82DA306[];
extern const u8 BattleScript_82DA319[];
extern const u8 BattleScript_EffectYawn[];
extern const u8 BattleScript_82DA378[];
extern const u8 BattleScript_82DA382[];
extern const u8 BattleScript_EffectKnockOff[];
extern const u8 BattleScript_EffectEndeavor[];
extern const u8 BattleScript_EffectEruption[];
extern const u8 BattleScript_EffectSkillSwap[];
extern const u8 BattleScript_EffectImprison[];
extern const u8 BattleScript_EffectRefresh[];
extern const u8 BattleScript_EffectGrudge[];
extern const u8 BattleScript_EffectSnatch[];
extern const u8 BattleScript_EffectLowKick[];
extern const u8 BattleScript_EffectSecretPower[];
extern const u8 BattleScript_EffectDoubleEdge[];
extern const u8 BattleScript_EffectTeeterDance[];
extern const u8 BattleScript_82DA47B[];
extern const u8 BattleScript_82DA4C7[];
extern const u8 BattleScript_82DA4D0[];
extern const u8 BattleScript_82DA4E5[];
extern const u8 BattleScript_82DA4F3[];
extern const u8 BattleScript_82DA501[];
extern const u8 BattleScript_82DA50F[];
extern const u8 BattleScript_82DA520[];
extern const u8 BattleScript_EffectMudSport[];
extern const u8 BattleScript_EffectPoisonFang[];
extern const u8 BattleScript_EffectWeatherBall[];
extern const u8 BattleScript_EffectOverheat[];
extern const u8 BattleScript_EffectTickle[];
extern const u8 BattleScript_TickleDoMoveAnim[];
extern const u8 BattleScript_TickleTryLowerDef[];
extern const u8 BattleScript_TickleEnd[];
extern const u8 BattleScript_CantLowerMultipleStats[];
extern const u8 BattleScript_EffectCosmicPower[];
extern const u8 BattleScript_CosmicPowerDoMoveAnim[];
extern const u8 BattleScript_CosmicPowerTrySpDef[];
extern const u8 BattleScript_CosmicPowerEnd[];
extern const u8 BattleScript_EffectSkyUppercut[];
extern const u8 BattleScript_EffectBulkUp[];
extern const u8 BattleScript_BulkUpDoMoveAnim[];
extern const u8 BattleScript_BulkUpTryDef[];
extern const u8 BattleScript_BulkUpEnd[];
extern const u8 BattleScript_EffectCalmMind[];
extern const u8 BattleScript_CalmMindDoMoveAnim[];
extern const u8 BattleScript_CalmMindTrySpDef[];
extern const u8 BattleScript_CalmMindEnd[];
extern const u8 BattleScript_CantRaiseMultipleStats[];
extern const u8 BattleScript_EffectDragonDance[];
extern const u8 BattleScript_DragonDanceDoMoveAnim[];
extern const u8 BattleScript_DragonDanceTrySpeed[];
extern const u8 BattleScript_DragonDanceEnd[];
extern const u8 BattleScript_EffectCamouflage[];
extern const u8 BattleScript_FaintAttacker[];
extern const u8 BattleScript_FaintTarget[];
extern const u8 BattleScript_82DA7C4[];
extern const u8 BattleScript_82DA7CD[];
extern const u8 BattleScript_82DA816[];
extern const u8 BattleScript_82DA8D0[];
extern const u8 BattleScript_82DA8F5[];
extern const u8 BattleScript_82DA8F6[];
extern const u8 BattleScript_82DA8FC[];
extern const u8 BattleScript_82DA908[];
extern const u8 BattleScript_82DA92C[];
extern const u8 BattleScript_LocalTrainerBattleWon[];
extern const u8 BattleScript_LocalTwoTrainersDefeated[];
extern const u8 BattleScript_LocalBattleWonLoseTexts[];
extern const u8 BattleScript_LocalBattleWonReward[];
extern const u8 BattleScript_PayDayMoneyAndPickUpItems[];
extern const u8 BattleScript_LocalBattleLost[];
extern const u8 BattleScript_LocalBattleLostPrintWhiteOut[];
extern const u8 BattleScript_LocalBattleLostEnd[];
extern const u8 BattleScript_CheckDomeDrew[];
extern const u8 BattleScript_LocalBattleLostPrintTrainersWinText[];
extern const u8 BattleScript_LocalBattleLostDoTrainer2WinText[];
extern const u8 BattleScript_LocalBattleLostEnd_[];
extern const u8 BattleScript_82DAA0B[];
extern const u8 BattleScript_82DAA31[];
extern const u8 BattleScript_LinkBattleWonOrLost[];
extern const u8 BattleScript_LinkBattleWonOrLostWaitEnd[];
extern const u8 BattleScript_82DAA5C[];
extern const u8 BattleScript_82DAA83[];
extern const u8 BattleScript_FrontierTrainerBattleWon[];
extern const u8 BattleScript_82DAAAB[];
extern const u8 BattleScript_82DAAAE[];
extern const u8 BattleScript_82DAACB[];
extern const u8 BattleScript_82DAADA[];
extern const u8 BattleScript_SmokeBallEscape[];
extern const u8 BattleScript_RanAwayUsingMonAbility[];
extern const u8 BattleScript_GotAwaySafely[];
extern const u8 BattleScript_WildMonFled[];
extern const u8 BattleScript_PrintCantRunFromTrainer[];
extern const u8 BattleScript_PrintFailedToRunString[];
extern const u8 BattleScript_PrintCantEscapeFromBattle[];
extern const u8 BattleScript_PrintFullBox[];
extern const u8 BattleScript_ActionSwitch[];
extern const u8 BattleScript_82DAB35[];
extern const u8 BattleScript_82DAB37[];
extern const u8 BattleScript_82DAB44[];
extern const u8 BattleScript_82DAB77[];
extern const u8 BattleScript_82DABB8[];
extern const u8 BattleScript_Pausex20[];
extern const u8 BattleScript_LevelUp[];
extern const u8 BattleScript_TryLearnMoveLoop[];
extern const u8 BattleScript_AskToLearnMove[];
extern const u8 BattleScript_ForgotAndLearnedNewMove[];
extern const u8 BattleScript_LearnedNewMove[];
extern const u8 BattleScript_LearnMoveReturn[];
extern const u8 BattleScript_RainContinuesOrEnds[];
extern const u8 BattleScript_RainContinuesOrEndsEnd[];
extern const u8 BattleScript_DamagingWeatherContinues[];
extern const u8 BattleScript_DamagingWeatherLoop[];
extern const u8 BattleScript_DamagingWeatherLoopIncrement[];
extern const u8 BattleScript_DamagingWeatherContinuesEnd[];
extern const u8 BattleScript_SandStormHailEnds[];
extern const u8 BattleScript_SunlightContinues[];
extern const u8 BattleScript_SunlightFaded[];
extern const u8 BattleScript_OverworldWeatherStarts[];
extern const u8 BattleScript_SideStatusWoreOff[];
extern const u8 BattleScript_SafeguardProtected[];
extern const u8 BattleScript_SafeguardEnds[];
extern const u8 BattleScript_LeechSeedTurnDrain[];
extern const u8 BattleScript_82DAD47[];
extern const u8 BattleScript_82DAD4D[];
extern const u8 BattleScript_BideStoringEnergy[];
extern const u8 BattleScript_BideAttack[];
extern const u8 BattleScript_BideNoEnergyToAttack[];
extern const u8 BattleScript_82DADD8[];
extern const u8 BattleScript_82DADF1[];
extern const u8 BattleScript_MistProtected[];
extern const u8 BattleScript_RageIsBuilding[];
extern const u8 BattleScript_MoveUsedIsDisabled[];
extern const u8 BattleScript_SelectingDisabledMove[];
extern const u8 BattleScript_DisabledNoMore[];
extern const u8 BattleScript_82DAE2A[];
extern const u8 BattleScript_82DAE2D[];
extern const u8 BattleScript_EncoredNoMore[];
extern const u8 BattleScript_DestinyBondTakesLife[];
extern const u8 BattleScript_SpikesOnAttacker[];
extern const u8 BattleScript_82DAE7A[];
extern const u8 BattleScript_SpikesOnTarget[];
extern const u8 BattleScript_82DAEB1[];
extern const u8 BattleScript_SpikesOngBank1[];
extern const u8 BattleScript_82DAEE8[];
extern const u8 BattleScript_82DAEFE[];
extern const u8 BattleScript_PerishSongTakesLife[];
extern const u8 BattleScript_PerishSongCountGoesDown[];
extern const u8 BattleScript_AllStatsUp[];
extern const u8 BattleScript_82DAF54[];
extern const u8 BattleScript_82DAF72[];
extern const u8 BattleScript_82DAF86[];
extern const u8 BattleScript_82DAF9A[];
extern const u8 BattleScript_82DAFAE[];
extern const u8 BattleScript_82DAFC2[];
extern const u8 BattleScript_RapidSpinAway[];
extern const u8 BattleScript_WrapFree[];
extern const u8 BattleScript_LeechSeedFree[];
extern const u8 BattleScript_SpikesFree[];
extern const u8 BattleScript_MonTookFutureAttack[];
extern const u8 BattleScript_82DB001[];
extern const u8 BattleScript_82DB008[];
extern const u8 BattleScript_82DB020[];
extern const u8 BattleScript_82DB027[];
extern const u8 BattleScript_82DB03F[];
extern const u8 BattleScript_82DB058[];
extern const u8 BattleScript_NoMovesLeft[];
extern const u8 BattleScript_SelectingMoveWithNoPP[];
extern const u8 BattleScript_NoPPForMove[];
extern const u8 BattleScript_SelectingTormentedMove[];
extern const u8 BattleScript_82DB08D[];
extern const u8 BattleScript_82DB098[];
extern const u8 BattleScript_SelectingNotAllowedMoveTaunt[];
extern const u8 BattleScript_MoveUsedIsTaunted[];
extern const u8 BattleScript_82DB0AF[];
extern const u8 BattleScript_WishComesTrue[];
extern const u8 BattleScript_82DB0DE[];
extern const u8 BattleScript_IngrainTurnHeal[];
extern const u8 BattleScript_82DB109[];
extern const u8 BattleScript_AtkDefDown[];
extern const u8 BattleScript_82DB144[];
extern const u8 BattleScript_82DB167[];
extern const u8 BattleScript_KnockedOff[];
extern const u8 BattleScript_MoveUsedIsImprisoned[];
extern const u8 BattleScript_SelectingImprisionedMove[];
extern const u8 BattleScript_82DB185[];
extern const u8 BattleScript_GrudgeTakesPp[];
extern const u8 BattleScript_MagicCoatBounce[];
extern const u8 BattleScript_SnatchedMove[];
extern const u8 BattleScript_EnduredMsg[];
extern const u8 BattleScript_OneHitKOMsg[];
extern const u8 BattleScript_SAtkDown2[];
extern const u8 BattleScript_82DB1FE[];
extern const u8 BattleScript_FocusPunchSetUp[];
extern const u8 BattleScript_MoveUsedIsAsleep[];
extern const u8 BattleScript_MoveUsedWokeUp[];
extern const u8 BattleScript_MonWokeUpInUproar[];
extern const u8 BattleScript_PoisonTurnDmg[];
extern const u8 BattleScript_82DB243[];
extern const u8 BattleScript_82DB245[];
extern const u8 BattleScript_82DB25E[];
extern const u8 BattleScript_BurnTurnDmg[];
extern const u8 BattleScript_MoveUsedIsFrozen[];
extern const u8 BattleScript_MoveUsedUnfroze[];
extern const u8 BattleScript_DefrostedViaFireMove[];
extern const u8 BattleScript_MoveUsedIsParalyzed[];
extern const u8 BattleScript_MoveUsedFlinched[];
extern const u8 BattleScript_PrintUproarOverTurns[];
extern const u8 BattleScript_ThrashConfuses[];
extern const u8 BattleScript_MoveUsedIsConfused[];
extern const u8 BattleScript_82DB2D4[];
extern const u8 BattleScript_82DB2FF[];
extern const u8 BattleScript_MoveUsedIsConfusedNoMore[];
extern const u8 BattleScript_PrintPayDayMoneyString[];
extern const u8 BattleScript_WrapTurnDmg[];
extern const u8 BattleScript_WrapEnds[];
extern const u8 BattleScript_MoveUsedIsInLove[];
extern const u8 BattleScript_MoveUsedIsParalyzedCantAttack[];
extern const u8 BattleScript_NightmareTurnDmg[];
extern const u8 BattleScript_CurseTurnDmg[];
extern const u8 BattleScript_TargetPRLZHeal[];
extern const u8 BattleScript_MoveEffectSleep[];
extern const u8 BattleScript_82DB374[];
extern const u8 BattleScript_YawnMakesAsleep[];
extern const u8 BattleScript_MoveEffectPoison[];
extern const u8 BattleScript_MoveEffectBurn[];
extern const u8 BattleScript_MoveEffectFreeze[];
extern const u8 BattleScript_MoveEffectParalysis[];
extern const u8 BattleScript_MoveEffectUproar[];
extern const u8 BattleScript_MoveEffectToxic[];
extern const u8 BattleScript_MoveEffectPayDay[];
extern const u8 BattleScript_MoveEffectWrap[];
extern const u8 BattleScript_MoveEffectConfusion[];
extern const u8 BattleScript_MoveEffectRecoil33[];
extern const u8 BattleScript_DoRecoil33[];
extern const u8 BattleScript_Recoil33End[];
extern const u8 BattleScript_ItemSteal[];
extern const u8 BattleScript_DrizzleActivates[];
extern const u8 BattleScript_SpeedBoostActivates[];
extern const u8 BattleScript_TraceActivates[];
extern const u8 BattleScript_RainDishActivates[];
extern const u8 BattleScript_SandstreamActivates[];
extern const u8 BattleScript_ShedSkinActivates[];
extern const u8 BattleScript_WeatherFormChanges[];
extern const u8 BattleScript_WeatherFormChangesLoop[];
extern const u8 BattleScript_CastformChange[];
extern const u8 BattleScript_82DB4AF[];
extern const u8 BattleScript_82DB4B8[];
extern const u8 BattleScript_82DB4BE[];
extern const u8 BattleScript_82DB4C1[];
extern const u8 BattleScript_82DB4CD[];
extern const u8 BattleScript_82DB510[];
extern const u8 BattleScript_82DB51B[];
extern const u8 BattleScript_82DB51C[];
extern const u8 BattleScript_DroughtActivates[];
extern const u8 BattleScript_TookAttack[];
extern const u8 BattleScript_SturdyPreventsOHKO[];
extern const u8 BattleScript_DampStopsExplosion[];
extern const u8 BattleScript_MoveHPDrain_PPLoss[];
extern const u8 BattleScript_MoveHPDrain[];
extern const u8 BattleScript_MonMadeMoveUseless_PPLoss[];
extern const u8 BattleScript_MonMadeMoveUseless[];
extern const u8 BattleScript_FlashFireBoost_PPLoss[];
extern const u8 BattleScript_FlashFireBoost[];
extern const u8 BattleScript_82DB5B9[];
extern const u8 BattleScript_AbilityNoStatLoss[];
extern const u8 BattleScript_BRNPrevention[];
extern const u8 BattleScript_PRLZPrevention[];
extern const u8 BattleScript_PSNPrevention[];
extern const u8 BattleScript_ObliviousPreventsAttraction[];
extern const u8 BattleScript_FlinchPrevention[];
extern const u8 BattleScript_OwnTempoPrevents[];
extern const u8 BattleScript_SoundproofProtected[];
extern const u8 BattleScript_AbilityNoSpecificStatLoss[];
extern const u8 BattleScript_StickyHoldActivates[];
extern const u8 BattleScript_ColorChangeActivates[];
extern const u8 BattleScript_RoughSkinActivates[];
extern const u8 BattleScript_CuteCharmActivates[];
extern const u8 BattleScript_ApplySecondaryEffect[];
extern const u8 BattleScript_SynchronizeActivates[];
extern const u8 BattleScript_NoItemSteal[];
extern const u8 BattleScript_AbilityCuredStatus[];
extern const u8 BattleScript_82DB695[];
extern const u8 BattleScript_IgnoresAndUsesRandomMove[];
extern const u8 BattleScript_MoveUsedLoafingAround[];
extern const u8 BattleScript_82DB6C7[];
extern const u8 BattleScript_IgnoresAndFallsAsleep[];
extern const u8 BattleScript_82DB6F0[];
extern const u8 BattleScript_SubstituteFade[];
extern const u8 BattleScript_BerryCurePrlzEnd2[];
extern const u8 BattleScript_BerryCureParRet[];
extern const u8 BattleScript_BerryCurePsnEnd2[];
extern const u8 BattleScript_BerryCurePsnRet[];
extern const u8 BattleScript_BerryCureBrnEnd2[];
extern const u8 BattleScript_BerryCureBrnRet[];
extern const u8 BattleScript_BerryCureFrzEnd2[];
extern const u8 BattleScript_BerryCureFrzRet[];
extern const u8 BattleScript_BerryCureSlpEnd2[];
extern const u8 BattleScript_BerryCureSlpRet[];
extern const u8 BattleScript_BerryCureConfusionEnd2[];
extern const u8 BattleScript_BerryCureConfusionRet[];
extern const u8 BattleScript_BerryCureChosenStatusEnd2[];
extern const u8 BattleScript_BerryCureChosenStatusRet[];
extern const u8 BattleScript_WhiteHerbEnd2[];
extern const u8 BattleScript_WhiteHerbRet[];
extern const u8 BattleScript_ItemHealHP_RemoveItem[];
extern const u8 BattleScript_BerryPPHealEnd2[];
extern const u8 BattleScript_ItemHealHP_End2[];
extern const u8 BattleScript_ItemHealHP_Ret[];
extern const u8 BattleScript_SelectingNotAllowedMoveChoiceItem[];
extern const u8 BattleScript_HangedOnMsg[];
extern const u8 BattleScript_BerryConfuseHealEnd2[];
extern const u8 BattleScript_BerryStatRaiseEnd2[];
extern const u8 BattleScript_82DB85B[];
extern const u8 BattleScript_BerryFocusEnergyEnd2[];
extern const u8 BattleScript_ActionSelectionItemsCantBeUsed[];
extern const u8 BattleScript_82DB87D[];
extern const u8 BattleScript_82DB881[];
extern const u8 BattleScript_82DB887[];
extern const u8 BattleScript_82DB89D[];
extern const u8 BattleScript_82DB8BE[];
extern const u8 BattleScript_82DB8E0[];
extern const u8 BattleScript_82DB8F3[];
extern const u8 BattleScript_82DB973[];
extern const u8 BattleScript_82DB992[];
extern const u8 BattleScript_AskIfWantsToForfeitMatch[];
extern const u8 BattleScript_82DB9C1[];
extern const u8 BattleScript_82DB9C8[];
extern const u8 BattleScript_BallThrow[];
extern const u8 BattleScript_BallThrowByWally[];
extern const u8 BattleScript_SafariBallThrow[];
extern const u8 BattleScript_SuccessBallThrow[];
extern const u8 BattleScript_82DBD92[];
extern const u8 BattleScript_82DBDA5[];
extern const u8 BattleScript_82DBDC2[];
extern const u8 BattleScript_82DBDC3[];
extern const u8 BattleScript_WallyBallThrow[];
extern const u8 BattleScript_ShakeBallThrow[];
extern const u8 BattleScript_82DBE01[];
extern const u8 BattleScript_TrainerBallBlock[];
extern const u8 BattleScript_82DBE12[];
extern const u8 BattleScript_82DBE1C[];
extern const u8 BattleScript_82DBE4B[];
extern const u8 BattleScript_82DBE6F[];
extern const u8 BattleScript_82DBE91[];
extern const u8 BattleScript_RunByUsingItem[];
extern const u8 BattleScript_ActionWatchesCarefully[];
extern const u8 BattleScript_ActionGetNear[];
extern const u8 BattleScript_ActionThrowPokeblock[];
extern const u8 BattleScript_82DBEE3[];
#endif // GUARD_BATTLE_SCRIPTS_H

View File

@@ -6,6 +6,7 @@
#include "gpu_regs.h"
#include "unknown_task.h"
#include "battle_setup.h"
#include "battle_scripts.h"
#include "pokemon.h"
#include "palette.h"
#include "task.h"
@@ -119,14 +120,14 @@ extern u32 gBattleExecBuffer;
extern u8 gMultiHitCounter;
extern u8 gBattleMoveFlags;
extern s32 gBattleMoveDamage;
extern const u8* gUnknown_02024230[BATTLE_BANKS_COUNT];
extern u16 gUnknownMovesUsedByBanks[BATTLE_BANKS_COUNT];
extern u16 gLastUsedMovesByBanks[BATTLE_BANKS_COUNT];
extern u16 gUnknown_02024250[BATTLE_BANKS_COUNT];
extern u16 gUnknown_02024258[BATTLE_BANKS_COUNT];
extern u16 gUnknown_02024260[BATTLE_BANKS_COUNT];
extern const u8* gPalaceSelectionBattleScripts[BATTLE_BANKS_COUNT];
extern u16 gLastPrintedMoves[BATTLE_BANKS_COUNT];
extern u16 gLastMoves[BATTLE_BANKS_COUNT];
extern u16 gLastLandedMoves[BATTLE_BANKS_COUNT];
extern u16 gLastHitByType[BATTLE_BANKS_COUNT];
extern u16 gLastResultingMoves[BATTLE_BANKS_COUNT];
extern u16 gLockedMoves[BATTLE_BANKS_COUNT];
extern u8 gUnknown_02024270[BATTLE_BANKS_COUNT];
extern u8 gLastHitBy[BATTLE_BANKS_COUNT];
extern u8 gUnknown_02024284[BATTLE_BANKS_COUNT];
extern u32 gStatuses3[BATTLE_BANKS_COUNT];
extern u16 gSideAffecting[2];
@@ -140,7 +141,7 @@ extern u16 gChosenMovesByBanks[BATTLE_BANKS_COUNT];
extern u8 gCurrentActionFuncId;
extern u8 gLastUsedAbility;
extern u8 gUnknown_0203CF00[];
extern const u8* gBattlescriptPtrsForSelection[BATTLE_BANKS_COUNT];
extern const u8* gSelectionBattleScripts[BATTLE_BANKS_COUNT];
extern const u8* gBattlescriptCurrInstr;
extern u8 gActionsByTurnOrder[BATTLE_BANKS_COUNT];
extern u8 gCurrentTurnActionNumber;
@@ -148,7 +149,7 @@ extern u16 gDynamicBasePower;
extern u8 gCritMultiplier;
extern u8 gCurrMovePos;
extern u8 gUnknown_020241E9;
extern u16 gLastUsedMove;
extern u16 gChosenMove;
extern const struct BattleMove gBattleMoves[];
extern const u16 gUnknown_08C004E0[]; // battle textbox palette
@@ -178,31 +179,6 @@ extern const u8 gText_Ice[];
extern const u8 gText_Confusion[];
extern const u8 gText_Love[];
// battlescripts
extern const u8 gUnknown_082DB8BE[];
extern const u8 gUnknown_082DB881[];
extern const u8 BattleScript_ActionSelectionItemsCantBeUsed[];
extern const u8 gUnknown_082DAB11[];
extern const u8 gUnknown_082DB9BA[];
extern const u8 gUnknown_082DAAFE[];
extern const u8 gUnknown_082DAB0B[];
extern const u8 BattleScript_FocusPunchSetUp[];
extern const u8 BattleScript_LinkBattleWonOrLost[];
extern const u8 BattleScript_FrontierTrainerBattleWon[];
extern const u8 BattleScript_LocalTrainerBattleWon[];
extern const u8 BattleScript_PayDayMoneyAndPickUpItems[];
extern const u8 BattleScript_LocalBattleLost[];
extern const u8 gUnknown_082DB9C8[];
extern const u8 gUnknown_082DAA0B[];
extern const u8 gUnknown_082DB9C1[];
extern const u8 BattleScript_RanAwayUsingMonAbility[];
extern const u8 BattleScript_SmokeBallEscape[];
extern const u8 BattleScript_GotAwaySafely[];
extern const u8 BattleScript_WildMonFled[];
extern const u8 BattleScript_MoveUsedLoafingAround[];
extern const u8 BattleScript_ActionSwitch[];
extern const u8 BattleScript_PrintFailedToRunString[];
// functions
extern void dp12_8087EA4(void);
extern void sub_80356D0(void);
@@ -485,7 +461,7 @@ static void sub_8036A5C(void)
u32 status = 0;
s32 i;
for (i = 0; i < 6; i++)
for (i = 0; i < PARTY_SIZE; i++)
{
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
hp = GetMonData(&gPlayerParty[i], MON_DATA_HP);
@@ -1902,7 +1878,7 @@ static void sub_8038B94(u8 taskId)
}
r7 = 0;
for (i = 0; i < 6; i++)
for (i = 0; i < PARTY_SIZE; i++)
{
u16 species = GetMonData(&sp4[i], MON_DATA_SPECIES2);
u16 hp = GetMonData(&sp4[i], MON_DATA_HP);
@@ -1926,7 +1902,7 @@ static void sub_8038B94(u8 taskId)
gTasks[taskId].data[3] = r7;
r7 = 0;
for (i = 0; i < 6; i++)
for (i = 0; i < PARTY_SIZE; i++)
{
u16 species = GetMonData(&sp8[i], MON_DATA_SPECIES2);
u16 hp = GetMonData(&sp8[i], MON_DATA_HP);
@@ -2765,17 +2741,17 @@ static void BattleStartClearSetData(void)
for (j = 0; j < sizeof(struct DisableStruct); j++)
dataPtr[j] = 0;
gDisableStructs[i].isFirstTurn= 2;
gDisableStructs[i].isFirstTurn = 2;
gUnknown_02024284[i] = 0;
gLastUsedMovesByBanks[i] = 0;
gUnknown_02024250[i] = 0;
gUnknown_02024258[i] = 0;
gUnknown_02024260[i] = 0;
gUnknown_02024270[i] = 0xFF;
gLastMoves[i] = 0;
gLastLandedMoves[i] = 0;
gLastHitByType[i] = 0;
gLastResultingMoves[i] = 0;
gLastHitBy[i] = 0xFF;
gLockedMoves[i] = 0;
gUnknownMovesUsedByBanks[i] = 0;
gLastPrintedMoves[i] = 0;
gBattleResources->flags->flags[i] = 0;
gUnknown_02024230[i] = 0;
gPalaceSelectionBattleScripts[i] = 0;
}
for (i = 0; i < 2; i++)
@@ -2932,14 +2908,14 @@ void SwitchInClearSetData(void)
}
gBattleMoveFlags = 0;
gDisableStructs[gActiveBank].isFirstTurn= 2;
gDisableStructs[gActiveBank].isFirstTurn = 2;
gDisableStructs[gActiveBank].truantUnknownBit = disableStructCopy.truantUnknownBit;
gLastUsedMovesByBanks[gActiveBank] = 0;
gUnknown_02024250[gActiveBank] = 0;
gUnknown_02024258[gActiveBank] = 0;
gUnknown_02024260[gActiveBank] = 0;
gUnknownMovesUsedByBanks[gActiveBank] = 0;
gUnknown_02024270[gActiveBank] = 0xFF;
gLastMoves[gActiveBank] = 0;
gLastLandedMoves[gActiveBank] = 0;
gLastHitByType[gActiveBank] = 0;
gLastResultingMoves[gActiveBank] = 0;
gLastPrintedMoves[gActiveBank] = 0;
gLastHitBy[gActiveBank] = 0xFF;
*(gBattleStruct->mirrorMoves + gActiveBank * 2 + 0) = 0;
*(gBattleStruct->mirrorMoves + gActiveBank * 2 + 1) = 0;
@@ -3026,12 +3002,12 @@ void FaintClearSetData(void)
gDisableStructs[gActiveBank].isFirstTurn = 2;
gLastUsedMovesByBanks[gActiveBank] = 0;
gUnknown_02024250[gActiveBank] = 0;
gUnknown_02024258[gActiveBank] = 0;
gUnknown_02024260[gActiveBank] = 0;
gUnknownMovesUsedByBanks[gActiveBank] = 0;
gUnknown_02024270[gActiveBank] = 0xFF;
gLastMoves[gActiveBank] = 0;
gLastLandedMoves[gActiveBank] = 0;
gLastHitByType[gActiveBank] = 0;
gLastResultingMoves[gActiveBank] = 0;
gLastPrintedMoves[gActiveBank] = 0;
gLastHitBy[gActiveBank] = 0xFF;
*(u8*)((u8*)(&gBattleStruct->choicedMove[gActiveBank]) + 0) = 0;
*(u8*)((u8*)(&gBattleStruct->choicedMove[gActiveBank]) + 1) = 0;
@@ -3213,7 +3189,7 @@ static void BattleIntroDrawPartySummaryScreens(void)
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER)
{
for (i = 0; i < 6; i++)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE
|| GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG)
@@ -3231,7 +3207,7 @@ static void BattleIntroDrawPartySummaryScreens(void)
EmitDrawPartyStatusSummary(0, hpStatus, 0x80);
MarkBufferBankForExecution(gActiveBank);
for (i = 0; i < 6; i++)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE
|| GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG)
@@ -3704,7 +3680,7 @@ static void TryDoEventsBeforeFirstTurn(void)
if (gBattleTypeFlags & BATTLE_TYPE_ARENA)
{
StopCryAndClearCrySongs();
BattleScriptExecute(gUnknown_082DB8BE);
BattleScriptExecute(BattleScript_82DB8BE);
}
}
@@ -3792,9 +3768,9 @@ void BattleTurnPassed(void)
gRandomTurnNumber = Random();
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
BattleScriptExecute(gUnknown_082DB881);
BattleScriptExecute(BattleScript_82DB881);
else if (gBattleTypeFlags & BATTLE_TYPE_ARENA && gBattleStruct->field_DA == 0)
BattleScriptExecute(gUnknown_082DB8BE);
BattleScriptExecute(BattleScript_82DB8BE);
}
u8 IsRunningFromBattleImpossible(void)
@@ -4007,7 +3983,7 @@ static void HandleTurnActionSelectionState(void)
| BATTLE_TYPE_x2000000))
{
RecordedBattle_ClearBankAction(gActiveBank, 1);
gBattlescriptPtrsForSelection[gActiveBank] = BattleScript_ActionSelectionItemsCantBeUsed;
gSelectionBattleScripts[gActiveBank] = BattleScript_ActionSelectionItemsCantBeUsed;
gBattleCommunication[gActiveBank] = STATE_SELECTION_SCRIPT;
*(gBattleStruct->selectionScriptFinished + gActiveBank) = FALSE;
*(gBattleStruct->stateIdAfterSelScript + gActiveBank) = STATE_BEFORE_ACTION_CHOSEN;
@@ -4052,7 +4028,7 @@ static void HandleTurnActionSelectionState(void)
case ACTION_SAFARI_ZONE_BALL:
if (IsPlayerPartyAndPokemonStorageFull())
{
gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DAB11;
gSelectionBattleScripts[gActiveBank] = BattleScript_PrintFullBox;
gBattleCommunication[gActiveBank] = STATE_SELECTION_SCRIPT;
*(gBattleStruct->selectionScriptFinished + gActiveBank) = FALSE;
*(gBattleStruct->stateIdAfterSelScript + gActiveBank) = STATE_BEFORE_ACTION_CHOSEN;
@@ -4107,7 +4083,7 @@ static void HandleTurnActionSelectionState(void)
&& gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_x4000000)
&& gBattleBufferB[gActiveBank][1] == ACTION_RUN)
{
gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DB9BA;
gSelectionBattleScripts[gActiveBank] = BattleScript_AskIfWantsToForfeitMatch;
gBattleCommunication[gActiveBank] = 8;
*(gBattleStruct->selectionScriptFinished + gActiveBank) = FALSE;
*(gBattleStruct->stateIdAfterSelScript + gActiveBank) = STATE_BEFORE_ACTION_CHOSEN;
@@ -4117,13 +4093,13 @@ static void HandleTurnActionSelectionState(void)
&& !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))
&& gBattleBufferB[gActiveBank][1] == ACTION_RUN)
{
BattleScriptExecute(gUnknown_082DAAFE);
BattleScriptExecute(BattleScript_PrintCantRunFromTrainer);
gBattleCommunication[gActiveBank] = 1;
}
else if (IsRunningFromBattleImpossible() != 0
else if (IsRunningFromBattleImpossible()
&& gBattleBufferB[gActiveBank][1] == ACTION_RUN)
{
gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DAB0B;
gSelectionBattleScripts[gActiveBank] = BattleScript_PrintCantEscapeFromBattle;
gBattleCommunication[gActiveBank] = STATE_SELECTION_SCRIPT;
*(gBattleStruct->selectionScriptFinished + gActiveBank) = FALSE;
*(gBattleStruct->stateIdAfterSelScript + gActiveBank) = STATE_BEFORE_ACTION_CHOSEN;
@@ -4276,12 +4252,12 @@ static void HandleTurnActionSelectionState(void)
else
{
gBankAttacker = gActiveBank;
gBattlescriptCurrInstr = gBattlescriptPtrsForSelection[gActiveBank];
gBattlescriptCurrInstr = gSelectionBattleScripts[gActiveBank];
if (!(gBattleExecBuffer & ((gBitTable[gActiveBank]) | (0xF0000000) | (gBitTable[gActiveBank] << 4) | (gBitTable[gActiveBank] << 8) | (gBitTable[gActiveBank] << 0xC))))
{
gBattleScriptingCommandsTable[gBattlescriptCurrInstr[0]]();
}
gBattlescriptPtrsForSelection[gActiveBank] = gBattlescriptCurrInstr;
gSelectionBattleScripts[gActiveBank] = gBattlescriptCurrInstr;
}
break;
case STATE_WAIT_SET_BEFORE_ACTION:
@@ -4308,12 +4284,12 @@ static void HandleTurnActionSelectionState(void)
else
{
gBankAttacker = gActiveBank;
gBattlescriptCurrInstr = gBattlescriptPtrsForSelection[gActiveBank];
gBattlescriptCurrInstr = gSelectionBattleScripts[gActiveBank];
if (!(gBattleExecBuffer & ((gBitTable[gActiveBank]) | (0xF0000000) | (gBitTable[gActiveBank] << 4) | (gBitTable[gActiveBank] << 8) | (gBitTable[gActiveBank] << 0xC))))
{
gBattleScriptingCommandsTable[gBattlescriptCurrInstr[0]]();
}
gBattlescriptPtrsForSelection[gActiveBank] = gBattlescriptCurrInstr;
gSelectionBattleScripts[gActiveBank] = gBattlescriptCurrInstr;
}
break;
}
@@ -4811,13 +4787,13 @@ static void HandleEndTurn_BattleLost(void)
{
if (gBattleOutcome & BATTLE_OUTCOME_BIT_x80)
{
gBattlescriptCurrInstr = gUnknown_082DB9C8;
gBattlescriptCurrInstr = BattleScript_82DB9C8;
gBattleOutcome &= ~(BATTLE_OUTCOME_BIT_x80);
gSaveBlock2Ptr->field_CA9_b = 1;
}
else
{
gBattlescriptCurrInstr = gUnknown_082DAA0B;
gBattlescriptCurrInstr = BattleScript_82DAA0B;
gBattleOutcome &= ~(BATTLE_OUTCOME_BIT_x80);
}
}
@@ -4843,13 +4819,13 @@ static void HandleEndTurn_RanFromBattle(void)
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER && gBattleTypeFlags & BATTLE_TYPE_TRAINER)
{
gBattlescriptCurrInstr = gUnknown_082DB9C1;
gBattlescriptCurrInstr = BattleScript_82DB9C1;
gBattleOutcome = BATTLE_FORFEITED;
gSaveBlock2Ptr->field_CA9_b = 1;
}
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
{
gBattlescriptCurrInstr = gUnknown_082DB9C1;
gBattlescriptCurrInstr = BattleScript_82DB9C1;
gBattleOutcome = BATTLE_FORFEITED;
}
else
@@ -5072,19 +5048,19 @@ static void HandleAction_UseMove(void)
if (gProtectStructs[gBankAttacker].onlyStruggle)
{
gProtectStructs[gBankAttacker].onlyStruggle = 0;
gCurrentMove = gLastUsedMove = MOVE_STRUGGLE;
gCurrentMove = gChosenMove = MOVE_STRUGGLE;
gHitMarker |= HITMARKER_NO_PPDEDUCT;
*(gBattleStruct->moveTarget + gBankAttacker) = GetMoveTarget(MOVE_STRUGGLE, 0);
}
else if (gBattleMons[gBankAttacker].status2 & STATUS2_MULTIPLETURNS || gBattleMons[gBankAttacker].status2 & STATUS2_RECHARGE)
{
gCurrentMove = gLastUsedMove = gLockedMoves[gBankAttacker];
gCurrentMove = gChosenMove = gLockedMoves[gBankAttacker];
}
// encore forces you to use the same move
else if (gDisableStructs[gBankAttacker].encoredMove != MOVE_NONE
&& gDisableStructs[gBankAttacker].encoredMove == gBattleMons[gBankAttacker].moves[gDisableStructs[gBankAttacker].encoredMovePos])
{
gCurrentMove = gLastUsedMove = gDisableStructs[gBankAttacker].encoredMove;
gCurrentMove = gChosenMove = gDisableStructs[gBankAttacker].encoredMove;
gCurrMovePos = gUnknown_020241E9 = gDisableStructs[gBankAttacker].encoredMovePos;
*(gBattleStruct->moveTarget + gBankAttacker) = GetMoveTarget(gCurrentMove, 0);
}
@@ -5093,7 +5069,7 @@ static void HandleAction_UseMove(void)
&& gDisableStructs[gBankAttacker].encoredMove != gBattleMons[gBankAttacker].moves[gDisableStructs[gBankAttacker].encoredMovePos])
{
gCurrMovePos = gUnknown_020241E9 = gDisableStructs[gBankAttacker].encoredMovePos;
gCurrentMove = gLastUsedMove = gBattleMons[gBankAttacker].moves[gCurrMovePos];
gCurrentMove = gChosenMove = gBattleMons[gBankAttacker].moves[gCurrMovePos];
gDisableStructs[gBankAttacker].encoredMove = MOVE_NONE;
gDisableStructs[gBankAttacker].encoredMovePos = 0;
gDisableStructs[gBankAttacker].encoreTimer1 = 0;
@@ -5101,12 +5077,12 @@ static void HandleAction_UseMove(void)
}
else if (gBattleMons[gBankAttacker].moves[gCurrMovePos] != gChosenMovesByBanks[gBankAttacker])
{
gCurrentMove = gLastUsedMove = gBattleMons[gBankAttacker].moves[gCurrMovePos];
gCurrentMove = gChosenMove = gBattleMons[gBankAttacker].moves[gCurrMovePos];
*(gBattleStruct->moveTarget + gBankAttacker) = GetMoveTarget(gCurrentMove, 0);
}
else
{
gCurrentMove = gLastUsedMove = gBattleMons[gBankAttacker].moves[gCurrMovePos];
gCurrentMove = gChosenMove = gBattleMons[gBankAttacker].moves[gCurrMovePos];
}
if (gBattleMons[gBankAttacker].hp != 0)
@@ -5146,7 +5122,7 @@ static void HandleAction_UseMove(void)
}
if (var == 4)
{
if (gBattleMoves[gLastUsedMove].target & MOVE_TARGET_RANDOM)
if (gBattleMoves[gChosenMove].target & MOVE_TARGET_RANDOM)
{
if (GetBankSide(gBankAttacker) == SIDE_PLAYER)
{
@@ -5191,7 +5167,7 @@ static void HandleAction_UseMove(void)
}
}
else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE
&& gBattleMoves[gLastUsedMove].target & MOVE_TARGET_RANDOM)
&& gBattleMoves[gChosenMove].target & MOVE_TARGET_RANDOM)
{
if (GetBankSide(gBankAttacker) == SIDE_PLAYER)
{
@@ -5241,11 +5217,11 @@ static void HandleAction_UseMove(void)
gCurrentActionFuncId = 12;
return;
}
else if (gUnknown_02024230[gBankAttacker] != NULL)
else if (gPalaceSelectionBattleScripts[gBankAttacker] != NULL)
{
gBattleCommunication[MULTISTRING_CHOOSER] = 4;
gBattlescriptCurrInstr = gUnknown_02024230[gBankAttacker];
gUnknown_02024230[gBankAttacker] = NULL;
gBattlescriptCurrInstr = gPalaceSelectionBattleScripts[gBankAttacker];
gPalaceSelectionBattleScripts[gBankAttacker] = NULL;
}
else
{
@@ -5624,8 +5600,8 @@ static void HandleAction_ActionFinished(void)
gBattleMoveFlags = 0;
gBattleScripting.animTurn = 0;
gBattleScripting.animTargetsHit = 0;
gUnknown_02024250[gBankAttacker] = 0;
gUnknown_02024258[gBankAttacker] = 0;
gLastLandedMoves[gBankAttacker] = 0;
gLastHitByType[gBankAttacker] = 0;
gBattleStruct->dynamicMoveType = 0;
gDynamicBasePower = 0;
gBattleScripting.atk49_state = 0;

View File

@@ -58,7 +58,7 @@ extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT];
extern u16 gCurrentMove;
extern u8 gBankTarget;
extern u8 gAbsentBankFlags;
extern u16 gLastUsedMovesByBanks[BATTLE_BANKS_COUNT];
extern u16 gLastMoves[BATTLE_BANKS_COUNT];
extern u16 gTrainerBattleOpponent_A;
extern u16 gTrainerBattleOpponent_B;
extern u32 gStatuses3[BATTLE_BANKS_COUNT];
@@ -633,12 +633,12 @@ static void RecordLastUsedMoveByTarget(void)
for (i = 0; i < 4; i++)
{
if (gBattleResources->battleHistory->usedMoves[gBankTarget].moves[i] == gLastUsedMovesByBanks[gBankTarget])
if (gBattleResources->battleHistory->usedMoves[gBankTarget].moves[i] == gLastMoves[gBankTarget])
break;
if (gBattleResources->battleHistory->usedMoves[gBankTarget].moves[i] != gLastUsedMovesByBanks[gBankTarget] // HACK: This redundant condition is a hack to make the asm match.
if (gBattleResources->battleHistory->usedMoves[gBankTarget].moves[i] != gLastMoves[gBankTarget] // HACK: This redundant condition is a hack to make the asm match.
&& gBattleResources->battleHistory->usedMoves[gBankTarget].moves[i] == 0)
{
gBattleResources->battleHistory->usedMoves[gBankTarget].moves[i] = gLastUsedMovesByBanks[gBankTarget];
gBattleResources->battleHistory->usedMoves[gBankTarget].moves[i] = gLastMoves[gBankTarget];
break;
}
}
@@ -1252,9 +1252,9 @@ static void BattleAICmd_is_most_powerful_move(void)
static void BattleAICmd_get_last_used_bank_move(void)
{
if (gAIScriptPtr[1] == AI_USER)
AI_THINKING_STRUCT->funcResult = gLastUsedMovesByBanks[sBank_AI];
AI_THINKING_STRUCT->funcResult = gLastMoves[sBank_AI];
else
AI_THINKING_STRUCT->funcResult = gLastUsedMovesByBanks[gBankTarget];
AI_THINKING_STRUCT->funcResult = gLastMoves[gBankTarget];
gAIScriptPtr += 2;
}

View File

@@ -16,8 +16,8 @@ extern u32 gBattleTypeFlags;
extern u32 gStatuses3[BATTLE_BANKS_COUNT];
extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT];
extern u16 gBattlePartyID[BATTLE_BANKS_COUNT];
extern u16 gUnknown_02024250[BATTLE_BANKS_COUNT];
extern u8 gUnknown_02024270[BATTLE_BANKS_COUNT];
extern u16 gLastLandedMoves[BATTLE_BANKS_COUNT];
extern u8 gLastHitBy[BATTLE_BANKS_COUNT];
extern u16 gDynamicBasePower;
extern u8 gBattleMoveFlags;
extern u8 gCritMultiplier;
@@ -141,11 +141,11 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
if (HasSuperEffectiveMoveAgainstOpponents(TRUE) && Random() % 3 != 0)
return FALSE;
if (gUnknown_02024250[gActiveBank] == 0)
if (gLastLandedMoves[gActiveBank] == 0)
return FALSE;
if (gUnknown_02024250[gActiveBank] == 0xFFFF)
if (gLastLandedMoves[gActiveBank] == 0xFFFF)
return FALSE;
if (gBattleMoves[gUnknown_02024250[gActiveBank]].power == 0)
if (gBattleMoves[gLastLandedMoves[gActiveBank]].power == 0)
return FALSE;
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
@@ -162,11 +162,11 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
bankIn2 = gActiveBank;
}
if (gBattleMoves[gUnknown_02024250[gActiveBank]].type == TYPE_FIRE)
if (gBattleMoves[gLastLandedMoves[gActiveBank]].type == TYPE_FIRE)
absorbingTypeAbility = ABILITY_FLASH_FIRE;
else if (gBattleMoves[gUnknown_02024250[gActiveBank]].type == TYPE_WATER)
else if (gBattleMoves[gLastLandedMoves[gActiveBank]].type == TYPE_WATER)
absorbingTypeAbility = ABILITY_WATER_ABSORB;
else if (gBattleMoves[gUnknown_02024250[gActiveBank]].type == TYPE_ELECTRIC)
else if (gBattleMoves[gLastLandedMoves[gActiveBank]].type == TYPE_ELECTRIC)
absorbingTypeAbility = ABILITY_VOLT_ABSORB;
else
return FALSE;
@@ -238,13 +238,13 @@ static bool8 ShouldSwitchIfNaturalCure(void)
if (gBattleMons[gActiveBank].hp < gBattleMons[gActiveBank].maxHP / 2)
return FALSE;
if ((gUnknown_02024250[gActiveBank] == 0 || gUnknown_02024250[gActiveBank] == 0xFFFF) && Random() & 1)
if ((gLastLandedMoves[gActiveBank] == 0 || gLastLandedMoves[gActiveBank] == 0xFFFF) && Random() & 1)
{
*(gBattleStruct->AI_monToSwitchIntoId + gActiveBank) = 6;
EmitTwoReturnValues(1, ACTION_SWITCH, 0);
return TRUE;
}
else if (gBattleMoves[gUnknown_02024250[gActiveBank]].power == 0 && Random() & 1)
else if (gBattleMoves[gLastLandedMoves[gActiveBank]].power == 0 && Random() & 1)
{
*(gBattleStruct->AI_monToSwitchIntoId + gActiveBank) = 6;
EmitTwoReturnValues(1, ACTION_SWITCH, 0);
@@ -345,13 +345,13 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent)
u16 move;
u8 moveFlags;
if (gUnknown_02024250[gActiveBank] == 0)
if (gLastLandedMoves[gActiveBank] == 0)
return FALSE;
if (gUnknown_02024250[gActiveBank] == 0xFFFF)
if (gLastLandedMoves[gActiveBank] == 0xFFFF)
return FALSE;
if (gUnknown_02024270[gActiveBank] == 0xFF)
if (gLastHitBy[gActiveBank] == 0xFF)
return FALSE;
if (gBattleMoves[gUnknown_02024250[gActiveBank]].power == 0)
if (gBattleMoves[gLastLandedMoves[gActiveBank]].power == 0)
return FALSE;
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
@@ -411,10 +411,10 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent)
else
monAbility = gBaseStats[species].ability1;
moveFlags = AI_TypeCalc(gUnknown_02024250[gActiveBank], species, monAbility);
moveFlags = AI_TypeCalc(gLastLandedMoves[gActiveBank], species, monAbility);
if (moveFlags & flags)
{
bankIn1 = gUnknown_02024270[gActiveBank];
bankIn1 = gLastHitBy[gActiveBank];
for (j = 0; j < 4; j++)
{

View File

@@ -82,7 +82,7 @@ static void LinkOpponentHandleBallThrowAnim(void);
static void LinkOpponentHandlePause(void);
static void LinkOpponentHandleMoveAnimation(void);
static void LinkOpponentHandlePrintString(void);
static void LinkOpponentHandlePrintStringPlayerOnly(void);
static void LinkOpponentHandlePrintSelectionString(void);
static void LinkOpponentHandleChooseAction(void);
static void LinkOpponentHandleUnknownYesNoBox(void);
static void LinkOpponentHandleChooseMove(void);
@@ -108,7 +108,7 @@ static void LinkOpponentHandleCmd39(void);
static void LinkOpponentHandleCmd40(void);
static void LinkOpponentHandleHitAnimation(void);
static void LinkOpponentHandleCmd42(void);
static void LinkOpponentHandleEffectivenessSound(void);
static void LinkOpponentHandlePlaySE(void);
static void LinkOpponentHandlePlayFanfareOrBGM(void);
static void LinkOpponentHandleFaintingCry(void);
static void LinkOpponentHandleIntroSlide(void);
@@ -154,7 +154,7 @@ static void (*const sLinkOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
LinkOpponentHandlePause,
LinkOpponentHandleMoveAnimation,
LinkOpponentHandlePrintString,
LinkOpponentHandlePrintStringPlayerOnly,
LinkOpponentHandlePrintSelectionString,
LinkOpponentHandleChooseAction,
LinkOpponentHandleUnknownYesNoBox,
LinkOpponentHandleChooseMove,
@@ -180,7 +180,7 @@ static void (*const sLinkOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
LinkOpponentHandleCmd40,
LinkOpponentHandleHitAnimation,
LinkOpponentHandleCmd42,
LinkOpponentHandleEffectivenessSound,
LinkOpponentHandlePlaySE,
LinkOpponentHandlePlayFanfareOrBGM,
LinkOpponentHandleFaintingCry,
LinkOpponentHandleIntroSlide,
@@ -1505,7 +1505,7 @@ static void LinkOpponentHandlePrintString(void)
sub_817C95C(*stringId);
}
static void LinkOpponentHandlePrintStringPlayerOnly(void)
static void LinkOpponentHandlePrintSelectionString(void)
{
LinkOpponentBufferExecCompleted();
}
@@ -1681,7 +1681,7 @@ static void LinkOpponentHandleCmd42(void)
LinkOpponentBufferExecCompleted();
}
static void LinkOpponentHandleEffectivenessSound(void)
static void LinkOpponentHandlePlaySE(void)
{
s8 pan;

View File

@@ -78,7 +78,7 @@ static void LinkPartnerHandleBallThrowAnim(void);
static void LinkPartnerHandlePause(void);
static void LinkPartnerHandleMoveAnimation(void);
static void LinkPartnerHandlePrintString(void);
static void LinkPartnerHandlePrintStringPlayerOnly(void);
static void LinkPartnerHandlePrintSelectionString(void);
static void LinkPartnerHandleChooseAction(void);
static void LinkPartnerHandleUnknownYesNoBox(void);
static void LinkPartnerHandleChooseMove(void);
@@ -104,7 +104,7 @@ static void LinkPartnerHandleCmd39(void);
static void LinkPartnerHandleCmd40(void);
static void LinkPartnerHandleHitAnimation(void);
static void LinkPartnerHandleCmd42(void);
static void LinkPartnerHandleEffectivenessSound(void);
static void LinkPartnerHandlePlaySE(void);
static void LinkPartnerHandlePlayFanfareOrBGM(void);
static void LinkPartnerHandleFaintingCry(void);
static void LinkPartnerHandleIntroSlide(void);
@@ -149,7 +149,7 @@ static void (*const sLinkPartnerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
LinkPartnerHandlePause,
LinkPartnerHandleMoveAnimation,
LinkPartnerHandlePrintString,
LinkPartnerHandlePrintStringPlayerOnly,
LinkPartnerHandlePrintSelectionString,
LinkPartnerHandleChooseAction,
LinkPartnerHandleUnknownYesNoBox,
LinkPartnerHandleChooseMove,
@@ -175,7 +175,7 @@ static void (*const sLinkPartnerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
LinkPartnerHandleCmd40,
LinkPartnerHandleHitAnimation,
LinkPartnerHandleCmd42,
LinkPartnerHandleEffectivenessSound,
LinkPartnerHandlePlaySE,
LinkPartnerHandlePlayFanfareOrBGM,
LinkPartnerHandleFaintingCry,
LinkPartnerHandleIntroSlide,
@@ -1327,7 +1327,7 @@ static void LinkPartnerHandlePrintString(void)
sub_817C95C(*stringId);
}
static void LinkPartnerHandlePrintStringPlayerOnly(void)
static void LinkPartnerHandlePrintSelectionString(void)
{
LinkPartnerBufferExecCompleted();
}
@@ -1503,7 +1503,7 @@ static void LinkPartnerHandleCmd42(void)
LinkPartnerBufferExecCompleted();
}
static void LinkPartnerHandleEffectivenessSound(void)
static void LinkPartnerHandlePlaySE(void)
{
s8 pan;

View File

@@ -83,7 +83,7 @@ static void OpponentHandleBallThrow(void);
static void OpponentHandlePause(void);
static void OpponentHandleMoveAnimation(void);
static void OpponentHandlePrintString(void);
static void OpponentHandlePrintStringPlayerOnly(void);
static void OpponentHandlePrintSelectionString(void);
static void OpponentHandleChooseAction(void);
static void OpponentHandleUnknownYesNoBox(void);
static void OpponentHandleChooseMove(void);
@@ -109,7 +109,7 @@ static void OpponentHandleCmd39(void);
static void OpponentHandleCmd40(void);
static void OpponentHandleHitAnimation(void);
static void OpponentHandleCmd42(void);
static void OpponentHandleEffectivenessSound(void);
static void OpponentHandlePlaySE(void);
static void OpponentHandlePlayFanfareOrBGM(void);
static void OpponentHandleFaintingCry(void);
static void OpponentHandleIntroSlide(void);
@@ -155,7 +155,7 @@ static void (*const sOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
OpponentHandlePause,
OpponentHandleMoveAnimation,
OpponentHandlePrintString,
OpponentHandlePrintStringPlayerOnly,
OpponentHandlePrintSelectionString,
OpponentHandleChooseAction,
OpponentHandleUnknownYesNoBox,
OpponentHandleChooseMove,
@@ -181,7 +181,7 @@ static void (*const sOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
OpponentHandleCmd40,
OpponentHandleHitAnimation,
OpponentHandleCmd42,
OpponentHandleEffectivenessSound,
OpponentHandlePlaySE,
OpponentHandlePlayFanfareOrBGM,
OpponentHandleFaintingCry,
OpponentHandleIntroSlide,
@@ -1537,7 +1537,7 @@ static void OpponentHandlePrintString(void)
sub_81A57E4(gActiveBank, *stringId);
}
static void OpponentHandlePrintStringPlayerOnly(void)
static void OpponentHandlePrintSelectionString(void)
{
OpponentBufferExecCompleted();
}
@@ -1826,7 +1826,7 @@ static void OpponentHandleCmd42(void)
OpponentBufferExecCompleted();
}
static void OpponentHandleEffectivenessSound(void)
static void OpponentHandlePlaySE(void)
{
s8 pan;

View File

@@ -102,7 +102,7 @@ static void PlayerHandleBallThrowAnim(void);
static void PlayerHandlePause(void);
static void PlayerHandleMoveAnimation(void);
static void PlayerHandlePrintString(void);
static void PlayerHandlePrintStringPlayerOnly(void);
static void PlayerHandlePrintSelectionString(void);
static void PlayerHandleChooseAction(void);
static void PlayerHandleUnknownYesNoBox(void);
static void PlayerHandleChooseMove(void);
@@ -128,7 +128,7 @@ static void PlayerHandleCmd39(void);
static void PlayerHandleCmd40(void);
static void PlayerHandleHitAnimation(void);
static void PlayerHandleCmd42(void);
static void PlayerHandleEffectivenessSound(void);
static void PlayerHandlePlaySE(void);
static void PlayerHandlePlayFanfareOrBGM(void);
static void PlayerHandleFaintingCry(void);
static void PlayerHandleIntroSlide(void);
@@ -189,7 +189,7 @@ static void (*const sPlayerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
PlayerHandlePause,
PlayerHandleMoveAnimation,
PlayerHandlePrintString,
PlayerHandlePrintStringPlayerOnly,
PlayerHandlePrintSelectionString,
PlayerHandleChooseAction,
PlayerHandleUnknownYesNoBox,
PlayerHandleChooseMove,
@@ -215,7 +215,7 @@ static void (*const sPlayerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
PlayerHandleCmd40,
PlayerHandleHitAnimation,
PlayerHandleCmd42,
PlayerHandleEffectivenessSound,
PlayerHandlePlaySE,
PlayerHandlePlayFanfareOrBGM,
PlayerHandleFaintingCry,
PlayerHandleIntroSlide,
@@ -2576,7 +2576,7 @@ static void PlayerHandlePrintString(void)
sub_81A57E4(gActiveBank, *stringId);
}
static void PlayerHandlePrintStringPlayerOnly(void)
static void PlayerHandlePrintSelectionString(void)
{
if (GetBankSide(gActiveBank) == SIDE_PLAYER)
PlayerHandlePrintString();
@@ -2913,7 +2913,7 @@ static void PlayerHandleCmd42(void)
PlayerBufferExecCompleted();
}
static void PlayerHandleEffectivenessSound(void)
static void PlayerHandlePlaySE(void)
{
s8 pan;

View File

@@ -78,7 +78,7 @@ static void PlayerPartnerHandleBallThrowAnim(void);
static void PlayerPartnerHandlePause(void);
static void PlayerPartnerHandleMoveAnimation(void);
static void PlayerPartnerHandlePrintString(void);
static void PlayerPartnerHandlePrintStringPlayerOnly(void);
static void PlayerPartnerHandlePrintSelectionString(void);
static void PlayerPartnerHandleChooseAction(void);
static void PlayerPartnerHandleUnknownYesNoBox(void);
static void PlayerPartnerHandleChooseMove(void);
@@ -104,7 +104,7 @@ static void PlayerPartnerHandleCmd39(void);
static void PlayerPartnerHandleCmd40(void);
static void PlayerPartnerHandleHitAnimation(void);
static void PlayerPartnerHandleCmd42(void);
static void PlayerPartnerHandleEffectivenessSound(void);
static void PlayerPartnerHandlePlaySE(void);
static void PlayerPartnerHandlePlayFanfareOrBGM(void);
static void PlayerPartnerHandleFaintingCry(void);
static void PlayerPartnerHandleIntroSlide(void);
@@ -155,7 +155,7 @@ static void (*const sPlayerPartnerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
PlayerPartnerHandlePause,
PlayerPartnerHandleMoveAnimation,
PlayerPartnerHandlePrintString,
PlayerPartnerHandlePrintStringPlayerOnly,
PlayerPartnerHandlePrintSelectionString,
PlayerPartnerHandleChooseAction,
PlayerPartnerHandleUnknownYesNoBox,
PlayerPartnerHandleChooseMove,
@@ -181,7 +181,7 @@ static void (*const sPlayerPartnerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
PlayerPartnerHandleCmd40,
PlayerPartnerHandleHitAnimation,
PlayerPartnerHandleCmd42,
PlayerPartnerHandleEffectivenessSound,
PlayerPartnerHandlePlaySE,
PlayerPartnerHandlePlayFanfareOrBGM,
PlayerPartnerHandleFaintingCry,
PlayerPartnerHandleIntroSlide,
@@ -1519,7 +1519,7 @@ static void PlayerPartnerHandlePrintString(void)
gBattleBankFunc[gActiveBank] = CompleteOnInactiveTextPrinter2;
}
static void PlayerPartnerHandlePrintStringPlayerOnly(void)
static void PlayerPartnerHandlePrintSelectionString(void)
{
PlayerPartnerBufferExecCompleted();
}
@@ -1756,7 +1756,7 @@ static void PlayerPartnerHandleCmd42(void)
PlayerPartnerBufferExecCompleted();
}
static void PlayerPartnerHandleEffectivenessSound(void)
static void PlayerPartnerHandlePlaySE(void)
{
s8 pan;

View File

@@ -81,7 +81,7 @@ static void RecordedOpponentHandleBallThrowAnim(void);
static void RecordedOpponentHandlePause(void);
static void RecordedOpponentHandleMoveAnimation(void);
static void RecordedOpponentHandlePrintString(void);
static void RecordedOpponentHandlePrintStringPlayerOnly(void);
static void RecordedOpponentHandlePrintSelectionString(void);
static void RecordedOpponentHandleChooseAction(void);
static void RecordedOpponentHandleUnknownYesNoBox(void);
static void RecordedOpponentHandleChooseMove(void);
@@ -107,7 +107,7 @@ static void RecordedOpponentHandleCmd39(void);
static void RecordedOpponentHandleCmd40(void);
static void RecordedOpponentHandleHitAnimation(void);
static void RecordedOpponentHandleCmd42(void);
static void RecordedOpponentHandleEffectivenessSound(void);
static void RecordedOpponentHandlePlaySE(void);
static void RecordedOpponentHandlePlayFanfareOrBGM(void);
static void RecordedOpponentHandleFaintingCry(void);
static void RecordedOpponentHandleIntroSlide(void);
@@ -153,7 +153,7 @@ static void (*const sRecordedOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void
RecordedOpponentHandlePause,
RecordedOpponentHandleMoveAnimation,
RecordedOpponentHandlePrintString,
RecordedOpponentHandlePrintStringPlayerOnly,
RecordedOpponentHandlePrintSelectionString,
RecordedOpponentHandleChooseAction,
RecordedOpponentHandleUnknownYesNoBox,
RecordedOpponentHandleChooseMove,
@@ -179,7 +179,7 @@ static void (*const sRecordedOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void
RecordedOpponentHandleCmd40,
RecordedOpponentHandleHitAnimation,
RecordedOpponentHandleCmd42,
RecordedOpponentHandleEffectivenessSound,
RecordedOpponentHandlePlaySE,
RecordedOpponentHandlePlayFanfareOrBGM,
RecordedOpponentHandleFaintingCry,
RecordedOpponentHandleIntroSlide,
@@ -1435,7 +1435,7 @@ static void RecordedOpponentHandlePrintString(void)
gBattleBankFunc[gActiveBank] = CompleteOnInactiveTextPrinter;
}
static void RecordedOpponentHandlePrintStringPlayerOnly(void)
static void RecordedOpponentHandlePrintSelectionString(void)
{
RecordedOpponentBufferExecCompleted();
}
@@ -1625,7 +1625,7 @@ static void RecordedOpponentHandleCmd42(void)
RecordedOpponentBufferExecCompleted();
}
static void RecordedOpponentHandleEffectivenessSound(void)
static void RecordedOpponentHandlePlaySE(void)
{
s8 pan;

View File

@@ -81,7 +81,7 @@ static void RecordedPlayerHandleBallThrowAnim(void);
static void RecordedPlayerHandlePause(void);
static void RecordedPlayerHandleMoveAnimation(void);
static void RecordedPlayerHandlePrintString(void);
static void RecordedPlayerHandlePrintStringPlayerOnly(void);
static void RecordedPlayerHandlePrintSelectionString(void);
static void RecordedPlayerHandleChooseAction(void);
static void RecordedPlayerHandleUnknownYesNoBox(void);
static void RecordedPlayerHandleChooseMove(void);
@@ -107,7 +107,7 @@ static void RecordedPlayerHandleCmd39(void);
static void RecordedPlayerHandleCmd40(void);
static void RecordedPlayerHandleHitAnimation(void);
static void RecordedPlayerHandleCmd42(void);
static void RecordedPlayerHandleEffectivenessSound(void);
static void RecordedPlayerHandlePlaySE(void);
static void RecordedPlayerHandlePlayFanfareOrBGM(void);
static void RecordedPlayerHandleFaintingCry(void);
static void RecordedPlayerHandleIntroSlide(void);
@@ -152,7 +152,7 @@ static void (*const sRecordedPlayerBufferCommands[CONTROLLER_CMDS_COUNT])(void)
RecordedPlayerHandlePause,
RecordedPlayerHandleMoveAnimation,
RecordedPlayerHandlePrintString,
RecordedPlayerHandlePrintStringPlayerOnly,
RecordedPlayerHandlePrintSelectionString,
RecordedPlayerHandleChooseAction,
RecordedPlayerHandleUnknownYesNoBox,
RecordedPlayerHandleChooseMove,
@@ -178,7 +178,7 @@ static void (*const sRecordedPlayerBufferCommands[CONTROLLER_CMDS_COUNT])(void)
RecordedPlayerHandleCmd40,
RecordedPlayerHandleHitAnimation,
RecordedPlayerHandleCmd42,
RecordedPlayerHandleEffectivenessSound,
RecordedPlayerHandlePlaySE,
RecordedPlayerHandlePlayFanfareOrBGM,
RecordedPlayerHandleFaintingCry,
RecordedPlayerHandleIntroSlide,
@@ -1437,7 +1437,7 @@ static void RecordedPlayerHandlePrintString(void)
gBattleBankFunc[gActiveBank] = CompleteOnInactiveTextPrinter;
}
static void RecordedPlayerHandlePrintStringPlayerOnly(void)
static void RecordedPlayerHandlePrintSelectionString(void)
{
RecordedPlayerBufferExecCompleted();
}
@@ -1644,7 +1644,7 @@ static void RecordedPlayerHandleCmd42(void)
RecordedPlayerBufferExecCompleted();
}
static void RecordedPlayerHandleEffectivenessSound(void)
static void RecordedPlayerHandlePlaySE(void)
{
s8 pan;

View File

@@ -66,7 +66,7 @@ static void SafariHandleBallThrowAnim(void);
static void SafariHandlePause(void);
static void SafariHandleMoveAnimation(void);
static void SafariHandlePrintString(void);
static void SafariHandlePrintStringPlayerOnly(void);
static void SafariHandlePrintSelectionString(void);
static void SafariHandleChooseAction(void);
static void SafariHandleUnknownYesNoBox(void);
static void SafariHandleChooseMove(void);
@@ -92,7 +92,7 @@ static void SafariHandleCmd39(void);
static void SafariHandleCmd40(void);
static void SafariHandleHitAnimation(void);
static void SafariHandleCmd42(void);
static void SafariHandleEffectivenessSound(void);
static void SafariHandlePlaySE(void);
static void SafariHandlePlayFanfareOrBGM(void);
static void SafariHandleFaintingCry(void);
static void SafariHandleIntroSlide(void);
@@ -130,7 +130,7 @@ static void (*const sSafariBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
SafariHandlePause,
SafariHandleMoveAnimation,
SafariHandlePrintString,
SafariHandlePrintStringPlayerOnly,
SafariHandlePrintSelectionString,
SafariHandleChooseAction,
SafariHandleUnknownYesNoBox,
SafariHandleChooseMove,
@@ -156,7 +156,7 @@ static void (*const sSafariBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
SafariHandleCmd40,
SafariHandleHitAnimation,
SafariHandleCmd42,
SafariHandleEffectivenessSound,
SafariHandlePlaySE,
SafariHandlePlayFanfareOrBGM,
SafariHandleFaintingCry,
SafariHandleIntroSlide,
@@ -449,7 +449,7 @@ static void SafariHandlePrintString(void)
gBattleBankFunc[gActiveBank] = CompleteOnInactiveTextPrinter;
}
static void SafariHandlePrintStringPlayerOnly(void)
static void SafariHandlePrintSelectionString(void)
{
if (GetBankSide(gActiveBank) == SIDE_PLAYER)
SafariHandlePrintString();
@@ -607,7 +607,7 @@ static void SafariHandleCmd42(void)
SafariBufferExecCompleted();
}
static void SafariHandleEffectivenessSound(void)
static void SafariHandlePlaySE(void)
{
s8 pan;

View File

@@ -86,7 +86,7 @@ static void WallyHandleBallThrowAnim(void);
static void WallyHandlePause(void);
static void WallyHandleMoveAnimation(void);
static void WallyHandlePrintString(void);
static void WallyHandlePrintStringPlayerOnly(void);
static void WallyHandlePrintSelectionString(void);
static void WallyHandleChooseAction(void);
static void WallyHandleUnknownYesNoBox(void);
static void WallyHandleChooseMove(void);
@@ -112,7 +112,7 @@ static void WallyHandleCmd39(void);
static void WallyHandleCmd40(void);
static void WallyHandleHitAnimation(void);
static void WallyHandleCmd42(void);
static void WallyHandleEffectivenessSound(void);
static void WallyHandlePlaySE(void);
static void WallyHandlePlayFanfareOrBGM(void);
static void WallyHandleFaintingCry(void);
static void WallyHandleIntroSlide(void);
@@ -155,7 +155,7 @@ static void (*const sWallyBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
WallyHandlePause,
WallyHandleMoveAnimation,
WallyHandlePrintString,
WallyHandlePrintStringPlayerOnly,
WallyHandlePrintSelectionString,
WallyHandleChooseAction,
WallyHandleUnknownYesNoBox,
WallyHandleChooseMove,
@@ -181,7 +181,7 @@ static void (*const sWallyBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
WallyHandleCmd40,
WallyHandleHitAnimation,
WallyHandleCmd42,
WallyHandleEffectivenessSound,
WallyHandlePlaySE,
WallyHandlePlayFanfareOrBGM,
WallyHandleFaintingCry,
WallyHandleIntroSlide,
@@ -1211,7 +1211,7 @@ static void WallyHandlePrintString(void)
gBattleBankFunc[gActiveBank] = CompleteOnInactiveTextPrinter;
}
static void WallyHandlePrintStringPlayerOnly(void)
static void WallyHandlePrintSelectionString(void)
{
if (GetBankSide(gActiveBank) == SIDE_PLAYER)
WallyHandlePrintString();
@@ -1419,7 +1419,7 @@ static void WallyHandleCmd42(void)
WallyBufferExecCompleted();
}
static void WallyHandleEffectivenessSound(void)
static void WallyHandlePlaySE(void)
{
PlaySE(gBattleBufferA[gActiveBank][1] | (gBattleBufferA[gActiveBank][2] << 8));
WallyBufferExecCompleted();

View File

@@ -38,7 +38,7 @@ extern u8 gEffectBank;
extern u16 gBattleWeather;
extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT];
extern u16 gCurrentMove;
extern u16 gLastUsedMove;
extern u16 gChosenMove;
extern u16 gLastUsedItem;
extern u8 gBattleOutcome;
extern u8 gLastUsedAbility;
@@ -1120,7 +1120,7 @@ void EmitPrintString(u8 bufferId, u16 stringID)
stringInfo = (struct StringInfoBattle*)(&gBattleBuffersTransferData[4]);
stringInfo->currentMove = gCurrentMove;
stringInfo->lastMove = gLastUsedMove;
stringInfo->originallyUsedMove = gChosenMove;
stringInfo->lastItem = gLastUsedItem;
stringInfo->lastAbility = gLastUsedAbility;
stringInfo->scrActive = gBattleScripting.bank;
@@ -1140,10 +1140,10 @@ void EmitPrintString(u8 bufferId, u16 stringID)
PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, sizeof(struct StringInfoBattle) + 4);
}
void EmitPrintStringPlayerOnly(u8 bufferId, u16 stringID)
void EmitPrintSelectionString(u8 bufferId, u16 stringID)
{
s32 i;
struct StringInfoBattle* stringInfo;
struct StringInfoBattle *stringInfo;
gBattleBuffersTransferData[0] = CONTROLLER_PRINTSTRINGPLAYERONLY;
gBattleBuffersTransferData[1] = CONTROLLER_PRINTSTRINGPLAYERONLY;
@@ -1152,7 +1152,7 @@ void EmitPrintStringPlayerOnly(u8 bufferId, u16 stringID)
stringInfo = (struct StringInfoBattle*)(&gBattleBuffersTransferData[4]);
stringInfo->currentMove = gCurrentMove;
stringInfo->lastMove = gLastUsedMove;
stringInfo->originallyUsedMove = gChosenMove;
stringInfo->lastItem = gLastUsedItem;
stringInfo->lastAbility = gLastUsedAbility;
stringInfo->scrActive = gBattleScripting.bank;
@@ -1427,7 +1427,7 @@ void EmitCmd42(u8 bufferId)
PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, 4);
}
void EmitEffectivenessSound(u8 bufferId, u16 songId)
void EmitPlaySE(u8 bufferId, u16 songId)
{
gBattleBuffersTransferData[0] = CONTROLLER_EFFECTIVENESSSOUND;
gBattleBuffersTransferData[1] = songId;

View File

@@ -932,58 +932,237 @@ const u16 gSandStormHailDmgStringIds[] =
STRINGID_PKMNBUFFETEDBYSANDSTORM, STRINGID_PKMNPELTEDBYHAIL
};
// todo once battlescripts are dumped
const u16 gTooLazyToSplitThemStringIds[] =
const u16 gSandStormHailEndStringIds[] =
{
STRINGID_SANDSTORMSUBSIDED, STRINGID_HAILSTOPPED, STRINGID_RAINCONTINUES, STRINGID_DOWNPOURCONTINUES,
STRINGID_RAINSTOPPED, STRINGID_PKMNPROTECTEDITSELF2, STRINGID_PKMNBRACEDITSELF,
STRINGID_BUTITFAILED, STRINGID_BUTITFAILED, STRINGID_PKMNRAISEDDEF,
STRINGID_PKMNRAISEDDEFALITTLE, STRINGID_PKMNRAISEDSPDEF, STRINGID_PKMNRAISEDSPDEFALITTLE,
STRINGID_PKMNCOVEREDBYVEIL, STRINGID_PKMNSEEDED, STRINGID_PKMNEVADEDATTACK,
STRINGID_SANDSTORMSUBSIDED, STRINGID_HAILSTOPPED
};
const u16 gRainContinuesStringIds[] =
{
STRINGID_RAINCONTINUES, STRINGID_DOWNPOURCONTINUES, STRINGID_RAINSTOPPED
};
const u16 gProtectLikeUsedStringIds[] =
{
STRINGID_PKMNPROTECTEDITSELF2, STRINGID_PKMNBRACEDITSELF, STRINGID_BUTITFAILED
};
const u16 gReflectLightScreenSafeguardStringIds[] =
{
STRINGID_BUTITFAILED, STRINGID_PKMNRAISEDDEF, STRINGID_PKMNRAISEDDEFALITTLE,
STRINGID_PKMNRAISEDSPDEF, STRINGID_PKMNRAISEDSPDEFALITTLE, STRINGID_PKMNCOVEREDBYVEIL
};
const u16 gLeechSeedStringIds[] =
{
STRINGID_PKMNSEEDED, STRINGID_PKMNEVADEDATTACK,
STRINGID_ITDOESNTAFFECT, STRINGID_PKMNSAPPEDBYLEECHSEED, STRINGID_ITSUCKEDLIQUIDOOZE,
STRINGID_PKMNWENTTOSLEEP, STRINGID_PKMNSLEPTHEALTHY, STRINGID_PKMNMAKINGUPROAR,
STRINGID_PKMNCALMEDDOWN, STRINGID_PKMNSTOCKPILED, STRINGID_PKMNCANTSTOCKPILE,
STRINGID_PKMNWOKEUP, STRINGID_PKMNWOKEUPINUPROAR, STRINGID_FAILEDTOSWALLOW,
STRINGID_PKMNHPFULL, STRINGID_PKMNCANTSLEEPINUPROAR2, STRINGID_UPROARKEPTPKMNAWAKE,
STRINGID_PKMNSTAYEDAWAKEUSING, STRINGID_PKMNSSTATCHANGED, STRINGID_PKMNSSTATCHANGED2,
STRINGID_STATSWONTINCREASE, STRINGID_EMPTYSTRING3, STRINGID_USINGXTHEYOFZN,
STRINGID_PKMNUSEDXTOGETPUMPED, STRINGID_PKMNSSTATCHANGED3, STRINGID_PKMNSSTATCHANGED4,
STRINGID_STATSWONTDECREASE, STRINGID_EMPTYSTRING3, STRINGID_PKMNWHIPPEDWHIRLWIND,
STRINGID_PKMNTOOKSUNLIGHT, STRINGID_PKMNLOWEREDHEAD, STRINGID_PKMNISGLOWING,
STRINGID_PKMNFLEWHIGH, STRINGID_PKMNDUGHOLE, STRINGID_PKMNHIDUNDERWATER,
STRINGID_PKMNSPRANGUP, STRINGID_PKMNSQUEEZEDBYBIND, STRINGID_PKMNWRAPPEDBY,
STRINGID_PKMNTRAPPEDINVORTEX, STRINGID_PKMNCLAMPED, STRINGID_PKMNTRAPPEDINVORTEX,
STRINGID_PKMNTRAPPEDBYSANDTOMB, STRINGID_PKMNSHROUDEDINMIST, STRINGID_BUTITFAILED,
STRINGID_PKMNGETTINGPUMPED, STRINGID_BUTITFAILED, STRINGID_PKMNTRANSFORMEDINTO,
STRINGID_BUTITFAILED, STRINGID_PKMNMADESUBSTITUTE, STRINGID_TOOWEAKFORSUBSTITUTE,
STRINGID_PKMNWASPOISONED, STRINGID_PKMNPOISONEDBY, STRINGID_PKMNWASPARALYZED,
STRINGID_PKMNWASPARALYZEDBY, STRINGID_PKMNFELLASLEEP, STRINGID_PKMNMADESLEEP,
STRINGID_PKMNWASBURNED, STRINGID_PKMNBURNEDBY, STRINGID_PKMNWASFROZEN,
STRINGID_PKMNFROZENBY, STRINGID_PKMNWASDEFROSTED2, STRINGID_PKMNWASDEFROSTEDBY,
STRINGID_ATTACKMISSED, STRINGID_PKMNUNAFFECTED, STRINGID_PKMNFELLINLOVE,
STRINGID_PKMNSXINFATUATEDY, STRINGID_PKMNENERGYDRAINED, STRINGID_ITSUCKEDLIQUIDOOZE,
STRINGID_ELECTRICITYWEAKENED, STRINGID_FIREWEAKENED, STRINGID_BELLCHIMED,
STRINGID_BELLCHIMED, STRINGID_BELLCHIMED, STRINGID_BELLCHIMED,
STRINGID_SOOTHINGAROMA, STRINGID_PKMNFORESAWATTACK, STRINGID_PKMNCHOSEXASDESTINY,
STRINGID_PKMNBROKEFREE, STRINGID_ITAPPEAREDCAUGHT, STRINGID_AARGHALMOSTHADIT,
STRINGID_SHOOTSOCLOSE, STRINGID_ITISRAINING, STRINGID_ITISRAINING,
};
const u16 gRestUsedStringIds[] =
{
STRINGID_PKMNWENTTOSLEEP, STRINGID_PKMNSLEPTHEALTHY
};
const u16 gUproarOverTurnStringIds[] =
{
STRINGID_PKMNMAKINGUPROAR, STRINGID_PKMNCALMEDDOWN
};
const u16 gStockpileUsedStringIds[] =
{
STRINGID_PKMNSTOCKPILED, STRINGID_PKMNCANTSTOCKPILE,
};
const u16 gWokeUpStringIds[] =
{
STRINGID_PKMNWOKEUP, STRINGID_PKMNWOKEUPINUPROAR
};
const u16 gSwallowFailStringIds[] =
{
STRINGID_FAILEDTOSWALLOW, STRINGID_PKMNHPFULL
};
const u16 gUproarAwakeStringIds[] =
{
STRINGID_PKMNCANTSLEEPINUPROAR2, STRINGID_UPROARKEPTPKMNAWAKE, STRINGID_PKMNSTAYEDAWAKEUSING
};
const u16 gStatUpStringIds[] =
{
STRINGID_PKMNSSTATCHANGED, STRINGID_PKMNSSTATCHANGED2, STRINGID_STATSWONTINCREASE,
STRINGID_EMPTYSTRING3, STRINGID_USINGXTHEYOFZN, STRINGID_PKMNUSEDXTOGETPUMPED
};
const u16 gStatDownStringIds[] =
{
STRINGID_PKMNSSTATCHANGED3, STRINGID_PKMNSSTATCHANGED4, STRINGID_STATSWONTDECREASE, STRINGID_EMPTYSTRING3
};
const u16 gFirstTurnOfTwoStringIds[] =
{
STRINGID_PKMNWHIPPEDWHIRLWIND, STRINGID_PKMNTOOKSUNLIGHT, STRINGID_PKMNLOWEREDHEAD, STRINGID_PKMNISGLOWING,
STRINGID_PKMNFLEWHIGH, STRINGID_PKMNDUGHOLE, STRINGID_PKMNHIDUNDERWATER, STRINGID_PKMNSPRANGUP
};
const u16 gWrappedStringIds[] =
{
STRINGID_PKMNSQUEEZEDBYBIND, STRINGID_PKMNWRAPPEDBY, STRINGID_PKMNTRAPPEDINVORTEX,
STRINGID_PKMNCLAMPED, STRINGID_PKMNTRAPPEDINVORTEX, STRINGID_PKMNTRAPPEDBYSANDTOMB
};
const u16 gMistUsedStringIds[] =
{
STRINGID_PKMNSHROUDEDINMIST, STRINGID_BUTITFAILED
};
const u16 gFocusEnergyUsedStringIds[] =
{
STRINGID_PKMNGETTINGPUMPED, STRINGID_BUTITFAILED
};
const u16 gTransformUsedStringIds[] =
{
STRINGID_PKMNTRANSFORMEDINTO, STRINGID_BUTITFAILED
};
const u16 gSubsituteUsedStringIds[] =
{
STRINGID_PKMNMADESUBSTITUTE, STRINGID_TOOWEAKFORSUBSTITUTE
};
const u16 gGotPoisonedStringIds[] =
{
STRINGID_PKMNWASPOISONED, STRINGID_PKMNPOISONEDBY
};
const u16 gGotParalyzedStringIds[] =
{
STRINGID_PKMNWASPARALYZED, STRINGID_PKMNWASPARALYZEDBY
};
const u16 gFellAsleepStringIds[] =
{
STRINGID_PKMNFELLASLEEP, STRINGID_PKMNMADESLEEP,
};
const u16 gGotBurnedStringIds[] =
{
STRINGID_PKMNWASBURNED, STRINGID_PKMNBURNEDBY
};
const u16 gGotFrozenStringIds[] =
{
STRINGID_PKMNWASFROZEN, STRINGID_PKMNFROZENBY
};
const u16 gGotDefrostedStringIds[] =
{
STRINGID_PKMNWASDEFROSTED2, STRINGID_PKMNWASDEFROSTEDBY
};
const u16 gKOFailedStringIds[] =
{
STRINGID_ATTACKMISSED, STRINGID_PKMNUNAFFECTED
};
const u16 gAttractUsedStringIds[] =
{
STRINGID_PKMNFELLINLOVE, STRINGID_PKMNSXINFATUATEDY
};
const u16 gLeechSeedDrainStringIds[] =
{
STRINGID_PKMNENERGYDRAINED, STRINGID_ITSUCKEDLIQUIDOOZE
};
const u16 gSportsUsedStringIds[] =
{
STRINGID_ELECTRICITYWEAKENED, STRINGID_FIREWEAKENED
};
const u16 gPartyStatusHealStringIds[] =
{
STRINGID_BELLCHIMED, STRINGID_BELLCHIMED, STRINGID_BELLCHIMED, STRINGID_BELLCHIMED,
// interesting how there are four instances of the same string
STRINGID_SOOTHINGAROMA
};
const u16 gFutureMoveUsedStringIds[] =
{
STRINGID_PKMNFORESAWATTACK, STRINGID_PKMNCHOSEXASDESTINY
};
const u16 gBallEscapeStringIds[] =
{
STRINGID_PKMNBROKEFREE, STRINGID_ITAPPEAREDCAUGHT, STRINGID_AARGHALMOSTHADIT, STRINGID_SHOOTSOCLOSE
};
const u16 gWeatherContinuesStringIds[] =
{
STRINGID_ITISRAINING, STRINGID_ITISRAINING, STRINGID_ITISRAINING,
STRINGID_ITISRAINING, STRINGID_ITISRAINING, STRINGID_ITISRAINING,
STRINGID_SANDSTORMISRAGING, STRINGID_ITISRAINING, STRINGID_ITISRAINING,
STRINGID_ITISRAINING, STRINGID_SUNLIGHTSTRONG, STRINGID_ITISRAINING,
STRINGID_ITISRAINING, STRINGID_ITISRAINING, STRINGID_PKMNLOAFING,
STRINGID_PKMNWONTOBEY, STRINGID_PKMNTURNEDAWAY, STRINGID_PKMNPRETENDNOTNOTICE,
STRINGID_PKMNINCAPABLEOFPOWER, STRINGID_CREPTCLOSER, STRINGID_CANTGETCLOSER,
STRINGID_PKMNCURIOUSABOUTX, STRINGID_PKMNENTHRALLEDBYX, STRINGID_PKMNIGNOREDX,
STRINGID_ITISRAINING, STRINGID_ITISRAINING, STRINGID_SANDSTORMISRAGING,
STRINGID_ITISRAINING, STRINGID_ITISRAINING, STRINGID_ITISRAINING,
STRINGID_SUNLIGHTSTRONG, STRINGID_ITISRAINING, STRINGID_ITISRAINING, STRINGID_ITISRAINING
};
const u16 gInobedientStringIds[] =
{
STRINGID_PKMNLOAFING, STRINGID_PKMNWONTOBEY, STRINGID_PKMNTURNEDAWAY,
STRINGID_PKMNPRETENDNOTNOTICE, STRINGID_PKMNINCAPABLEOFPOWER
};
const u16 gSafariGetNearStringIds[] =
{
STRINGID_CREPTCLOSER, STRINGID_CANTGETCLOSER
};
const u16 gSafariPokeblockResultStringIds[] =
{
STRINGID_PKMNCURIOUSABOUTX, STRINGID_PKMNENTHRALLEDBYX, STRINGID_PKMNIGNOREDX
};
const u16 gTrainerItemCuredStatusStringIds[] =
{
STRINGID_PKMNSITEMSNAPPEDOUT, STRINGID_PKMNSITEMCUREDPARALYSIS, STRINGID_PKMNSITEMDEFROSTEDIT,
STRINGID_PKMNSITEMHEALEDBURN, STRINGID_PKMNSITEMCUREDPOISON, STRINGID_PKMNSITEMWOKEIT,
STRINGID_PKMNSITEMCUREDPROBLEM, STRINGID_PKMNSITEMNORMALIZEDSTATUS, STRINGID_PKMNSXPREVENTSBURNS,
STRINGID_PKMNSXPREVENTSYSZ, STRINGID_PKMNSXHADNOEFFECTONY, STRINGID_PKMNPREVENTSPARALYSISWITH,
STRINGID_PKMNSXPREVENTSYSZ, STRINGID_PKMNSXHADNOEFFECTONY, STRINGID_PKMNPREVENTSPOISONINGWITH,
STRINGID_PKMNSXPREVENTSYSZ, STRINGID_PKMNSXHADNOEFFECTONY, STRINGID_PKMNOBTAINEDX,
STRINGID_PKMNOBTAINEDX2, STRINGID_PKMNOBTAINEDXYOBTAINEDZ, STRINGID_PKMNRAISEDFIREPOWERWITH,
STRINGID_PKMNSXMADEYINEFFECTIVE, STRINGID_PKMNTRANSFERREDSOMEONESPC, STRINGID_PKMNTRANSFERREDLANETTESPC,
STRINGID_PKMNBOXSOMEONESPCFULL, STRINGID_PKMNBOXLANETTESPCFULL,
STRINGID_PKMNSITEMHEALEDBURN, STRINGID_PKMNSITEMCUREDPOISON, STRINGID_PKMNSITEMWOKEIT
};
const u16 gBerryEffectStringIds[] =
{
STRINGID_PKMNSITEMCUREDPROBLEM, STRINGID_PKMNSITEMNORMALIZEDSTATUS
};
const u16 gBRNPreventionStringIds[] =
{
STRINGID_PKMNSXPREVENTSBURNS, STRINGID_PKMNSXPREVENTSYSZ, STRINGID_PKMNSXHADNOEFFECTONY
};
const u16 gPRLZPreventionStringIds[] =
{
STRINGID_PKMNPREVENTSPARALYSISWITH, STRINGID_PKMNSXPREVENTSYSZ, STRINGID_PKMNSXHADNOEFFECTONY
};
const u16 gPSNPreventionStringIds[] =
{
STRINGID_PKMNPREVENTSPOISONINGWITH, STRINGID_PKMNSXPREVENTSYSZ, STRINGID_PKMNSXHADNOEFFECTONY
};
const u16 gItemSwapStringIds[] =
{
STRINGID_PKMNOBTAINEDX, STRINGID_PKMNOBTAINEDX2, STRINGID_PKMNOBTAINEDXYOBTAINEDZ
};
const u16 gFlashFireStringIds[] =
{
STRINGID_PKMNRAISEDFIREPOWERWITH, STRINGID_PKMNSXMADEYINEFFECTIVE
};
const u16 gCaughtMonStringIds[] =
{
STRINGID_PKMNTRANSFERREDSOMEONESPC, STRINGID_PKMNTRANSFERREDLANETTESPC, STRINGID_PKMNBOXSOMEONESPCFULL, STRINGID_PKMNBOXLANETTESPCFULL,
};
const u16 gTrappingMoves[] =
@@ -1102,9 +1281,10 @@ const u8 gText_PkmnGettingIntoPosition[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is
const u8 gText_PkmnBeganGrowlingDeeply[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} began growling deeply!");
const u8 gText_PkmnEagerForMore[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is eager for more!");
const u16 gUnknown_085CCF0A[] =
const u16 gStringIds_85CCF0A[] =
{
0x016E, 0x016F, 0x0170, 0x0171
STRINGID_GLINTAPPEARSINEYE, STRINGID_PKMNGETTINGINTOPOSITION,
STRINGID_PKMNBEGANGROWLINGDEEPLY, STRINGID_PKMNEAGERFORMORE
};
const u8 gText_RefIfNothingIsDecided[] = _("REFEREE: If nothing is decided in\n3 turns, we will go to judging!");
@@ -1736,11 +1916,11 @@ u32 BattleStringExpandPlaceholders(const u8* src, u8* dst)
else
toCpy = gMoveNames[gStringInfo->currentMove];
break;
case B_TXT_LAST_MOVE: // last used move name
if (gStringInfo->lastMove > LAST_MOVE_INDEX)
case B_TXT_LAST_MOVE: // originally used move name
if (gStringInfo->originallyUsedMove > LAST_MOVE_INDEX)
toCpy = gText_UnknownMoveTypes[gBattleStruct->stringMoveType];
else
toCpy = gMoveNames[gStringInfo->lastMove];
toCpy = gMoveNames[gStringInfo->originallyUsedMove];
break;
case B_TXT_LAST_ITEM: // last used item
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -312,7 +312,7 @@ gUnknown_020241E9: @ 20241E9
gCurrentMove: @ 20241EA
.space 0x2
gLastUsedMove: @ 20241EC
gChosenMove: @ 20241EC
.space 0x2
gRandomMove: @ 20241EE
@@ -363,31 +363,31 @@ gBattlescriptCurrInstr: @ 2024214
gActionForBanks: @ 202421C
.space 0x4
gBattlescriptPtrsForSelection: @ 2024220
gSelectionBattleScripts: @ 2024220
.space 0x10
gUnknown_02024230: @ 2024230
gPalaceSelectionBattleScripts: @ 2024230
.space 0x10
gUnknownMovesUsedByBanks: @ 2024240
gLastPrintedMoves: @ 2024240
.space 0x8
gLastUsedMovesByBanks: @ 2024248
gLastMoves: @ 2024248
.space 0x8
gUnknown_02024250: @ 2024250
gLastLandedMoves: @ 2024250
.space 0x8
gUnknown_02024258: @ 2024258
gLastHitByType: @ 2024258
.space 0x8
gUnknown_02024260: @ 2024260
gLastResultingMoves: @ 2024260
.space 0x8
gLockedMoves: @ 2024268
.space 0x8
gUnknown_02024270: @ 2024270
gLastHitBy: @ 2024270
.space 0x4
gChosenMovesByBanks: @ 2024274