summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/constants/duel_constants.asm20
-rw-r--r--src/data/effect_commands.asm121
-rw-r--r--src/engine/bank01.asm11
-rw-r--r--src/engine/bank05.asm4
-rw-r--r--src/engine/effect_functions.asm153
-rw-r--r--src/engine/home.asm14
-rw-r--r--src/text/text1.asm2
-rw-r--r--src/text/text_offsets.asm2
-rw-r--r--src/wram.asm2
9 files changed, 207 insertions, 122 deletions
diff --git a/src/constants/duel_constants.asm b/src/constants/duel_constants.asm
index 928e78c..473021a 100644
--- a/src/constants/duel_constants.asm
+++ b/src/constants/duel_constants.asm
@@ -166,16 +166,16 @@ CAN_EVOLVE_THIS_TURN EQU 1 << CAN_EVOLVE_THIS_TURN_F
; effect command constants (TryExecuteEffectCommandFunction)
; ordered by (roughly) execution time
-EFFECTCMDTYPE_INITIAL_EFFECT_1 EQU $01
-EFFECTCMDTYPE_INITIAL_EFFECT_2 EQU $02
-EFFECTCMDTYPE_DISCARD_ENERGY EQU $06
-EFFECTCMDTYPE_REQUIRE_SELECTION EQU $05
-EFFECTCMDTYPE_BEFORE_DAMAGE EQU $03
-EFFECTCMDTYPE_AFTER_DAMAGE EQU $04
-EFFECTCMDTYPE_SWITCH_DEFENDING_PKMN EQU $0a
-EFFECTCMDTYPE_PKMN_POWER_TRIGGER EQU $07
-EFFECTCMDTYPE_AI EQU $09
-EFFECTCMDTYPE_UNKNOWN_08 EQU $08
+EFFECTCMDTYPE_INITIAL_EFFECT_1 EQU $01
+EFFECTCMDTYPE_INITIAL_EFFECT_2 EQU $02
+EFFECTCMDTYPE_DISCARD_ENERGY EQU $06
+EFFECTCMDTYPE_REQUIRE_SELECTION EQU $05
+EFFECTCMDTYPE_BEFORE_DAMAGE EQU $03
+EFFECTCMDTYPE_AFTER_DAMAGE EQU $04
+EFFECTCMDTYPE_AI_SELECTION EQU $08
+EFFECTCMDTYPE_AI_SWITCH_DEFENDING_PKMN EQU $0a
+EFFECTCMDTYPE_PKMN_POWER_TRIGGER EQU $07
+EFFECTCMDTYPE_AI EQU $09
; wDamageEffectiveness constants
WEAKNESS EQU 1
diff --git a/src/data/effect_commands.asm b/src/data/effect_commands.asm
index 7360aff..60063ae 100644
--- a/src/data/effect_commands.asm
+++ b/src/data/effect_commands.asm
@@ -13,11 +13,14 @@ EffectCommands: ; 186f7 (6:46f7)
; - EFFECTCMDTYPE_DISCARD_ENERGY: For moves or trainer cards that require putting one or more attached energy cards into the discard pile.
; - EFFECTCMDTYPE_REQUIRE_SELECTION: For moves, Pokemon Powers, or trainer cards requring the user to select a card (from e.g. play area screen or card list).
; - EFFECTCMDTYPE_BEFORE_DAMAGE: Effect command of a move executed prior to the damage step. For trainer card or Pokemon Power, usually the main effect.
-; - EFFECTCMDTYPE_AFTER_DAMAGE: Effect command executed after the damage step
-; - EFFECTCMDTYPE_SWITCH_DEFENDING_PKMN: For moves that may result in the defending Pokemon being switched out
-; - EFFECTCMDTYPE_PKMN_POWER_TRIGGER: Pokemon Power effects that trigger the moment the Pokemon card is played
-; - EFFECTCMDTYPE_AI: Used for AI scoring
-; - EFFECTCMDTYPE_UNKNOWN_08: Unknown
+; - EFFECTCMDTYPE_AFTER_DAMAGE: Effect command executed after the damage step.
+; - EFFECTCMDTYPE_AI_SWITCH_DEFENDING_PKMN: For moves that may result in the defending Pokemon being switched out. Called only for AI-executed moves.
+; - EFFECTCMDTYPE_PKMN_POWER_TRIGGER: Pokemon Power effects that trigger the moment the Pokemon card is played.
+; - EFFECTCMDTYPE_AI: Used for AI scoring.
+; - EFFECTCMDTYPE_AI_SELECTION: When AI is required to select a card
+
+; Moves that have an EFFECTCMDTYPE_REQUIRE_SELECTION also must have either an EFFECTCMDTYPE_AI_SWITCH_DEFENDING_PKMN or an
+; EFFECTCMDTYPE_AI_SELECTION (for anything not involving switching the defending Pokemon), to handle selections involving the AI.
; Similar move effects of different Pokemon cards all point to a different command list,
; even though in some cases their commands and function pointers match.
@@ -44,7 +47,7 @@ EkansWrapEffectCommands:
ArbokTerrorStrikeEffectCommands:
dbw EFFECTCMDTYPE_AFTER_DAMAGE, TerrorStrike_SwitchDefendingPokemon
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, TerrorStrike_50PercentSelectSwitchPokemon
- dbw EFFECTCMDTYPE_SWITCH_DEFENDING_PKMN, TerrorStrike_50PercentSelectSwitchPokemon
+ dbw EFFECTCMDTYPE_AI_SWITCH_DEFENDING_PKMN, TerrorStrike_50PercentSelectSwitchPokemon
db $00
ArbokPoisonFangEffectCommands:
@@ -58,10 +61,10 @@ WeepinbellPoisonPowderEffectCommands:
db $00
VictreebelLureEffectCommands:
- dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $4740
- dbw EFFECTCMDTYPE_AFTER_DAMAGE, $476a
- dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $474b
- dbw EFFECTCMDTYPE_UNKNOWN_08, $4764
+ dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, Lure_AssertPokemonInBench
+ dbw EFFECTCMDTYPE_AFTER_DAMAGE, Lure_SwitchDefendingPokemon
+ dbw EFFECTCMDTYPE_REQUIRE_SELECTION, Lure_SelectSwitchPokemon
+ dbw EFFECTCMDTYPE_AI_SELECTION, Func_2c764
db $00
VictreebelAcidEffectCommands:
@@ -157,14 +160,14 @@ OddishSproutEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $484a
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $48cc
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $485a
- dbw EFFECTCMDTYPE_UNKNOWN_08, $48b7
+ dbw EFFECTCMDTYPE_AI_SELECTION, $48b7
db $00
ExeggutorTeleportEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $48ec
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $491a
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $48f7
- dbw EFFECTCMDTYPE_UNKNOWN_08, $490f
+ dbw EFFECTCMDTYPE_AI_SELECTION, $490f
db $00
ExeggutorBigEggsplosionEffectCommands:
@@ -174,7 +177,7 @@ ExeggutorBigEggsplosionEffectCommands:
NidokingThrashEffectCommands:
dbw EFFECTCMDTYPE_BEFORE_DAMAGE, Thrash_ModifierEffect
- dbw EFFECTCMDTYPE_AFTER_DAMAGE, Func_2c982
+ dbw EFFECTCMDTYPE_AFTER_DAMAGE, Thrash_LowRecoilEffect
dbw EFFECTCMDTYPE_AI, Thrash_AIEffect
db $00
@@ -196,7 +199,7 @@ NidoranFCallForFamilyEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $49db
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $4a6e
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $49eb
- dbw EFFECTCMDTYPE_UNKNOWN_08, $4a55
+ dbw EFFECTCMDTYPE_AI_SELECTION, $4a55
db $00
NidoranMHornHazardEffectCommands:
@@ -221,7 +224,7 @@ NidorinoDoubleKickEffectCommands:
ButterfreeWhirlwindEffectCommands:
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $4b09
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $4af3
- dbw EFFECTCMDTYPE_SWITCH_DEFENDING_PKMN, $4af3
+ dbw EFFECTCMDTYPE_AI_SWITCH_DEFENDING_PKMN, $4af3
db $00
ButterfreeMegaDrainEffectCommands:
@@ -278,7 +281,7 @@ BellsproutCallForFamilyEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $4c40
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $4cc2
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $4c50
- dbw EFFECTCMDTYPE_UNKNOWN_08, $4cad
+ dbw EFFECTCMDTYPE_AI_SELECTION, $4cad
db $00
WeezingSmogEffectCommands:
@@ -383,7 +386,7 @@ KrabbyCallForFamilyEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $4f5d
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $4fdf
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $4f6d
- dbw EFFECTCMDTYPE_UNKNOWN_08, $4fca
+ dbw EFFECTCMDTYPE_AI_SELECTION, $4fca
db $00
MagikarpFlailEffectCommands:
@@ -407,7 +410,7 @@ GolduckPsyshockEffectCommands:
GolduckHyperBeamEffectCommands:
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $506b
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $5033
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5065
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5065
db $00
SeadraWaterGunEffectCommands:
@@ -446,7 +449,7 @@ StarmieRecoverEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $50f0
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $5114
dbw EFFECTCMDTYPE_DISCARD_ENERGY, $510e
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5103
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5103
db $00
StarmieStarFreezeEffectCommands:
@@ -478,7 +481,7 @@ PoliwhirlAmnesiaEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $5149
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $516f
dbw EFFECTCMDTYPE_BEFORE_DAMAGE, $5179
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5173
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5173
db $00
PoliwhirlDoubleslapEffectCommands:
@@ -494,7 +497,7 @@ PoliwrathWaterGunEffectCommands:
PoliwrathWhirlpoolEffectCommands:
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $5214
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $51e6
- dbw EFFECTCMDTYPE_UNKNOWN_08, $520e
+ dbw EFFECTCMDTYPE_AI_SELECTION, $520e
db $00
PoliwagWaterGunEffectCommands:
@@ -553,7 +556,7 @@ ArcanineFlamethrowerEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $5363
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $5371
dbw EFFECTCMDTYPE_DISCARD_ENERGY, $5379
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5375
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5375
db $00
ArcanineTakeDownEffectCommands:
@@ -570,7 +573,7 @@ ArcanineFlamesOfRageEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $53ae
dbw EFFECTCMDTYPE_BEFORE_DAMAGE, $53ef
dbw EFFECTCMDTYPE_DISCARD_ENERGY, $53de
- dbw EFFECTCMDTYPE_UNKNOWN_08, $53d5
+ dbw EFFECTCMDTYPE_AI_SELECTION, $53d5
dbw EFFECTCMDTYPE_AI, $53e9
db $00
@@ -587,21 +590,21 @@ NinetailsLureEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $5425
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $544f
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $5430
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5449
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5449
db $00
NinetailsFireBlastEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $5463
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $5471
dbw EFFECTCMDTYPE_DISCARD_ENERGY, $5479
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5475
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5475
db $00
CharmanderEmberEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $547f
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $548d
dbw EFFECTCMDTYPE_DISCARD_ENERGY, $5495
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5491
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5491
db $00
MoltresWildfireEffectCommands:
@@ -609,7 +612,7 @@ MoltresWildfireEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $54a9
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $54f4
dbw EFFECTCMDTYPE_DISCARD_ENERGY, $54e1
- dbw EFFECTCMDTYPE_UNKNOWN_08, $54dd
+ dbw EFFECTCMDTYPE_AI_SELECTION, $54dd
db $00
Moltres1DiveBombEffectCommands:
@@ -626,14 +629,14 @@ FlareonFlamethrowerEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $555c
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $556a
dbw EFFECTCMDTYPE_DISCARD_ENERGY, $5572
- dbw EFFECTCMDTYPE_UNKNOWN_08, $556e
+ dbw EFFECTCMDTYPE_AI_SELECTION, $556e
db $00
MagmarFlamethrowerEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $5578
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $5586
dbw EFFECTCMDTYPE_DISCARD_ENERGY, $558e
- dbw EFFECTCMDTYPE_UNKNOWN_08, $558a
+ dbw EFFECTCMDTYPE_AI_SELECTION, $558a
db $00
MagmarSmokescreenEffectCommands:
@@ -649,7 +652,7 @@ CharmeleonFlamethrowerEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $55a2
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $55b0
dbw EFFECTCMDTYPE_DISCARD_ENERGY, $55b8
- dbw EFFECTCMDTYPE_UNKNOWN_08, $55b4
+ dbw EFFECTCMDTYPE_AI_SELECTION, $55b4
db $00
CharizardEnergyBurnEffectCommands:
@@ -660,7 +663,7 @@ CharizardFireSpinEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $55c0
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $55cd
dbw EFFECTCMDTYPE_DISCARD_ENERGY, $5614
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5606
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5606
db $00
VulpixConfuseRayEffectCommands:
@@ -704,7 +707,7 @@ GengarCurseEffectCommands:
GengarDarkMindEffectCommands:
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $593c
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $5903
- dbw EFFECTCMDTYPE_UNKNOWN_08, $592a
+ dbw EFFECTCMDTYPE_AI_SELECTION, $592a
db $00
GastlySleepingGasEffectCommands:
@@ -716,7 +719,7 @@ GastlyDestinyBondEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $5964
dbw EFFECTCMDTYPE_BEFORE_DAMAGE, $5987
dbw EFFECTCMDTYPE_DISCARD_ENERGY, $5981
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5976
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5976
db $00
GastlyLickEffectCommands:
@@ -727,7 +730,7 @@ GastlyEnergyConversionEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $598d
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $59b4
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $5994
- dbw EFFECTCMDTYPE_UNKNOWN_08, $599b
+ dbw EFFECTCMDTYPE_AI_SELECTION, $599b
db $00
HaunterHypnosisEffectCommands:
@@ -750,13 +753,13 @@ HypnoProphecyEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $59e7
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $5a41
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $5a00
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5a3c
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5a3c
db $00
HypnoDarkMindEffectCommands:
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $5b64
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $5b2b
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5b52
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5b52
db $00
DrowzeeConfuseRayEffectCommands:
@@ -791,7 +794,7 @@ MewDevolutionBeamEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $5c64
dbw EFFECTCMDTYPE_BEFORE_DAMAGE, $5cb6
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $5cbb
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5c9e
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5c9e
db $00
MewNeutralizingShieldEffectCommands:
@@ -812,21 +815,21 @@ MewtwoBarrierEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $5d9c
dbw EFFECTCMDTYPE_BEFORE_DAMAGE, $5dbf
dbw EFFECTCMDTYPE_DISCARD_ENERGY, $5db9
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5dae
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5dae
db $00
Mewtwo3EnergyAbsorptionEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $5dc5
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $5dec
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $5dcc
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5dd3
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5dd3
db $00
Mewtwo2EnergyAbsorptionEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $5dff
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $5e26
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $5e06
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5e0d
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5e0d
db $00
SlowbroStrangeBehaviorEffectCommands:
@@ -851,14 +854,14 @@ SlowpokeScavengeEffectCommands:
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $5f5f
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $5f46
dbw EFFECTCMDTYPE_DISCARD_ENERGY, $5f40
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5f2d
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5f2d
db $00
SlowpokeAmnesiaEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $5f74
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $5f7b
dbw EFFECTCMDTYPE_BEFORE_DAMAGE, $5f85
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5f7f
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5f7f
db $00
KadabraRecoverEffectCommands:
@@ -866,7 +869,7 @@ KadabraRecoverEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $5fa0
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $5fc3
dbw EFFECTCMDTYPE_DISCARD_ENERGY, $5fbd
- dbw EFFECTCMDTYPE_UNKNOWN_08, $5fb2
+ dbw EFFECTCMDTYPE_AI_SELECTION, $5fb2
db $00
JynxDoubleslapEffectCommands:
@@ -933,7 +936,7 @@ MarowakCallforFriendEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $6100
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $6194
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $6110
- dbw EFFECTCMDTYPE_UNKNOWN_08, $6177
+ dbw EFFECTCMDTYPE_AI_SELECTION, $6177
db $00
MachokeKarateChopEffectCommands:
@@ -956,7 +959,7 @@ GravelerHardenEffectCommands:
RhydonRamEffectCommands:
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $6212
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $61fc
- dbw EFFECTCMDTYPE_SWITCH_DEFENDING_PKMN, $61fc
+ dbw EFFECTCMDTYPE_AI_SWITCH_DEFENDING_PKMN, $61fc
db $00
RhyhornLeerEffectCommands:
@@ -967,7 +970,7 @@ HitmonleeStretchKickEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $6231
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $625b
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $623c
- dbw EFFECTCMDTYPE_UNKNOWN_08, $6255
+ dbw EFFECTCMDTYPE_AI_SELECTION, $6255
db $00
SandshrewSandAttackEffectCommands:
@@ -1068,7 +1071,7 @@ PikachuThunderJoltEffectCommands:
PikachuSparkEffectCommands:
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $6574
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $6539
- dbw EFFECTCMDTYPE_UNKNOWN_08, $6562
+ dbw EFFECTCMDTYPE_AI_SELECTION, $6562
db $00
Pikachu3GrowlEffectCommands:
@@ -1103,7 +1106,7 @@ RaichuThunderEffectCommands:
RaichuGigashockEffectCommands:
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $671f
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $660d
- dbw EFFECTCMDTYPE_UNKNOWN_08, $66c3
+ dbw EFFECTCMDTYPE_AI_SELECTION, $66c3
db $00
MagnetonThunderWaveEffectCommands:
@@ -1147,7 +1150,7 @@ ElectrodeEnergySpikeEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $6877
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $68f6
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $687b
- dbw EFFECTCMDTYPE_UNKNOWN_08, $68f1
+ dbw EFFECTCMDTYPE_AI_SELECTION, $68f1
db $00
JolteonDoubleKickEffectCommands:
@@ -1174,7 +1177,7 @@ SpearowMirrorMoveEffectCommands:
dbw EFFECTCMDTYPE_BEFORE_DAMAGE, $6987
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $6989
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $6983
- dbw EFFECTCMDTYPE_UNKNOWN_08, $6985
+ dbw EFFECTCMDTYPE_AI_SELECTION, $6985
dbw EFFECTCMDTYPE_AI, $697d
db $00
@@ -1252,13 +1255,13 @@ DragonairSlamEffectCommands:
DragonairHyperBeamEffectCommands:
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $6c35
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $6c2c
- dbw EFFECTCMDTYPE_UNKNOWN_08, $6c2f
+ dbw EFFECTCMDTYPE_AI_SELECTION, $6c2f
db $00
ClefableMetronomeEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $6c77
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $6c82
- dbw EFFECTCMDTYPE_UNKNOWN_08, $6c7e
+ dbw EFFECTCMDTYPE_AI_SELECTION, $6c7e
db $00
ClefableMinimizeEffectCommands:
@@ -1272,7 +1275,7 @@ PidgeotHurricaneEffectCommands:
PidgeottoWhirlwindEffectCommands:
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $6ce9
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $6cd3
- dbw EFFECTCMDTYPE_SWITCH_DEFENDING_PKMN, $6cd3
+ dbw EFFECTCMDTYPE_AI_SWITCH_DEFENDING_PKMN, $6cd3
db $00
PidgeottoMirrorMoveEffectCommands:
@@ -1281,7 +1284,7 @@ PidgeottoMirrorMoveEffectCommands:
dbw EFFECTCMDTYPE_BEFORE_DAMAGE, $6cfe
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $6d01
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $6cf8
- dbw EFFECTCMDTYPE_UNKNOWN_08, $6cfb
+ dbw EFFECTCMDTYPE_AI_SELECTION, $6cfb
dbw EFFECTCMDTYPE_AI, $6cef
db $00
@@ -1292,7 +1295,7 @@ ClefairySingEffectCommands:
ClefairyMetronomeEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $6d0b
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $6d16
- dbw EFFECTCMDTYPE_UNKNOWN_08, $6d12
+ dbw EFFECTCMDTYPE_AI_SELECTION, $6d12
db $00
WigglytuffLullabyEffectCommands:
@@ -1332,21 +1335,21 @@ LickitungSupersonicEffectCommands:
PidgeyWhirlwindEffectCommands:
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $6dcf
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $6db9
- dbw EFFECTCMDTYPE_SWITCH_DEFENDING_PKMN, $6db9
+ dbw EFFECTCMDTYPE_AI_SWITCH_DEFENDING_PKMN, $6db9
db $00
PorygonConversion1EffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $6dd5
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $6ded
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $6dfb
- dbw EFFECTCMDTYPE_UNKNOWN_08, $6df7
+ dbw EFFECTCMDTYPE_AI_SELECTION, $6df7
db $00
PorygonConversion2EffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $6e1f
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $6e31
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $6e5e
- dbw EFFECTCMDTYPE_UNKNOWN_08, $6e3c
+ dbw EFFECTCMDTYPE_AI_SELECTION, $6e3c
db $00
ChanseyScrunchEffectCommands:
@@ -1439,7 +1442,7 @@ EnergyRemovalEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $7252
dbw EFFECTCMDTYPE_INITIAL_EFFECT_2, $725f
dbw EFFECTCMDTYPE_BEFORE_DAMAGE, $7273
- dbw EFFECTCMDTYPE_UNKNOWN_08, $726f
+ dbw EFFECTCMDTYPE_AI_SELECTION, $726f
db $00
EnergyRetrievalEffectCommands:
diff --git a/src/engine/bank01.asm b/src/engine/bank01.asm
index c4a6b27..811f95b 100644
--- a/src/engine/bank01.asm
+++ b/src/engine/bank01.asm
@@ -1438,10 +1438,15 @@ CheckIfActiveCardParalyzedOrAsleep: ; 4918 (1:4918)
scf
ret
-; display the animation of the turn duelist drawing a card at the beginning of the turn
+; display the animation of the turn duelist drawing one card at the beginning of the turn
; if there isn't any card left in the deck, let the player know with a text message
DisplayDrawOneCardScreen: ; 4933 (1:4933)
ld a, 1
+; fallthrough
+
+; display the animation of the turn duelist drawing A cards at the beginning of the turn
+; if there isn't any card left in the deck, let the player know with a text message
+DisplayDrawACardsScreen:
push hl
push de
push bc
@@ -7386,9 +7391,9 @@ Func_6ff7: ; 6ff7 (1:6ff7)
ret
; print one of the "There was no effect from" texts depending
-; on the value at wNoEffectFromStatus (NO_STATUS or a status condition constant)
+; on the value at wNoEffectFromWhichStatus (NO_STATUS or a status condition constant)
PrintThereWasNoEffectFromStatusText: ; 700a (1:700a)
- ld a, [wNoEffectFromStatus]
+ ld a, [wNoEffectFromWhichStatus]
or a
jr nz, .status
ld hl, wLoadedMoveName
diff --git a/src/engine/bank05.asm b/src/engine/bank05.asm
index 6af2582..1a33d2f 100644
--- a/src/engine/bank05.asm
+++ b/src/engine/bank05.asm
@@ -190,7 +190,7 @@ AITryUseAttack: ; 14145 (5:4145)
call AISelectSpecialAttackParameters
jr c, .use_attack
- ld a, OPPACTION_BEGIN_ATTACK
+ ld a, EFFECTCMDTYPE_AI_SELECTION
call TryExecuteEffectCommandFunction
.use_attack
@@ -204,7 +204,7 @@ AITryUseAttack: ; 14145 (5:4145)
bank1call AIMakeDecision
ret c
- ld a, OPPACTION_ATTACK_ANIM_AND_DAMAGE
+ ld a, EFFECTCMDTYPE_AI_SWITCH_DEFENDING_PKMN
call TryExecuteEffectCommandFunction
ld a, OPPACTION_ATTACK_ANIM_AND_DAMAGE
bank1call AIMakeDecision
diff --git a/src/engine/effect_functions.asm b/src/engine/effect_functions.asm
index 4ed3dbe..7e8db45 100644
--- a/src/engine/effect_functions.asm
+++ b/src/engine/effect_functions.asm
@@ -57,7 +57,7 @@ ApplyStatusEffect:
.cant_induce_status
ld a, c
- ld [wNoEffectFromStatus], a
+ ld [wNoEffectFromWhichStatus], a
call SetNoEffectFromStatus
or a
ret
@@ -154,7 +154,7 @@ Func_2c0c7: ; 2c0c7 (b:40c7)
scf
ret
-; Sets some flags for AI use
+; Sets some variables for AI use
; if target poisoned
; [wAIMinDamage] <- [wDamage]
; [wAIMaxDamage] <- [wDamage]
@@ -162,19 +162,23 @@ Func_2c0c7: ; 2c0c7 (b:40c7)
; [wAIMinDamage] <- [wDamage] + d
; [wAIMaxDamage] <- [wDamage] + e
; [wDamage] <- [wDamage] + a
-Func_2c0d4: ; 2c0d4 (b:40d4)
+UpdateExpectedAIDamage_AccountForPoison: ; 2c0d4 (b:40d4)
push af
ld a, DUELVARS_ARENA_CARD_STATUS
call GetNonTurnDuelistVariable
and POISONED | DOUBLE_POISONED
- jr z, Func_2c0e9.skip_push_af
+ jr z, UpdateExpectedAIDamage.skip_push_af
pop af
ld a, [wDamage]
ld [wAIMinDamage], a
ld [wAIMaxDamage], a
ret
-Func_2c0e9: ; 2c0e9 (b:40e9)
+; Sets some variables for AI use
+; [wAIMinDamage] <- [wDamage] + d
+; [wAIMaxDamage] <- [wDamage] + e
+; [wDamage] <- [wDamage] + a
+UpdateExpectedAIDamage: ; 2c0e9 (b:40e9)
push af
.skip_push_af
@@ -190,11 +194,11 @@ Func_2c0e9: ; 2c0e9 (b:40e9)
ld [hl], a
ret
-; Sets some flags for AI use
+; Sets some variables for AI use
; [wDamage] <- a
; [wAIMinDamage] <- d
; [wAIMaxDamage] <- e
-Func_2c0fb: ; 2c0fb (b:40fb)
+SetExpectedAIDamage: ; 2c0fb (b:40fb)
ld [wDamage], a
xor a
ld [wDamage + 1], a
@@ -268,7 +272,7 @@ ApplySubstatus2ToDefendingCard: ; 2c149 (b:4149)
.no_damage_orEffect
pop af
push hl
- bank1call $4f9d
+ bank1call DrawDuelMainScene
pop hl
ld a, l
or h
@@ -277,7 +281,7 @@ ApplySubstatus2ToDefendingCard: ; 2c149 (b:4149)
; overwrites in wDamage, wAIMinDamage and wAIMaxDamage
; with the value in a.
-StoreDamageInfo: ; 2c166 (b:4166)
+SetDefiniteDamage: ; 2c166 (b:4166)
ld [wDamage], a
ld [wAIMinDamage], a
ld [wAIMaxDamage], a
@@ -404,10 +408,8 @@ CreateEnergyCardListFromOpponentDiscardPile: ; 2c2a4 (b:42a4)
INCROM $2c2e0, $2c487
-; handles the selection of a forced switch
-; by link/AI opponent or by the player.
-; outputs the Play Area location of the chosen
-; bench card in hTempPlayAreaLocation_ff9d.
+; handles the selection of a forced switch by link/AI opponent or by the player.
+; outputs the Play Area location of the chosen bench card in hTempPlayAreaLocation_ff9d.
DuelistSelectForcedSwitch: ; 2c487 (b:4487)
ld a, DUELVARS_DUELIST_TYPE
call GetNonTurnDuelistVariable
@@ -459,12 +461,43 @@ DuelistSelectForcedSwitch: ; 2c487 (b:4487)
ret
; 0x2c4da
- INCROM $2c4da, $2c6f0
+ INCROM $2c4da, $2c564
+
+; Return in a the PLAY_AREA_* of the non-turn holder's Pokemon card in bench with the lowest HP
+; if multiple cards are tied for the lowest HP, the one with the highest PLAY_AREA_* is returned.
+Func_2c564: ; 2c564 (b:4564)
+ call SwapTurn
+ ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY_AREA
+ call GetTurnDuelistVariable
+ ld c, a
+ lb de, 0, -1
+ ld b, d
+ ld a, DUELVARS_BENCH1_CARD_HP
+ call GetTurnDuelistVariable
+ jr .begin
+.loop
+ ld a, e
+ cp [hl]
+ jr c, .next
+ ld e, [hl]
+ ld d, b
+.next
+ inc hl
+.begin
+ inc b
+ dec c
+ jr nz, .loop
+ ld a, d
+ call SwapTurn
+ ret
+; 0x2c588
+
+ INCROM $2c588, $2c6f0
SpitPoison_AIEffect: ; 2c6f0 (b:46f0)
ld a, 5
lb de, 0, 10
- jp Func_2c0fb
+ jp SetExpectedAIDamage
; If heads, defending Pokemon becomes poisoned
SpitPoison_Poison50PercentEffect: ; 2c6f8 (b:46f8)
@@ -476,10 +509,9 @@ SpitPoison_Poison50PercentEffect: ; 2c6f8 (b:46f8)
call SetNoEffectFromStatus
ret
-; outputs in hTemp_ffa0 the result of the coin toss
-; (0 = tails, 1 = heads) and, in case it was heads,
-; stores in hTempPlayAreaLocation_ffa1 the location
-; of the Bench Pokemon that was selected for switch.
+; outputs in hTemp_ffa0 the result of the coin toss (0 = tails, 1 = heads).
+; in case it was heads, stores in hTempPlayAreaLocation_ffa1
+; the PLAY_AREA_* location of the Bench Pokemon that was selected for switch.
TerrorStrike_50PercentSelectSwitchPokemon: ; 2c70a (b:470a)
xor a
ldh [hTemp_ffa0], a
@@ -490,8 +522,7 @@ TerrorStrike_50PercentSelectSwitchPokemon: ; 2c70a (b:470a)
cp 2
ret c
-; toss coin and store whether it was tails (0)
-; or heads (1) in hTemp_ffa0
+; toss coin and store whether it was tails (0) or heads (1) in hTemp_ffa0.
; return if it was tails.
ldtx de, IfHeadsChangeOpponentsActivePokemonText
call Func_2c08a
@@ -503,8 +534,8 @@ TerrorStrike_50PercentSelectSwitchPokemon: ; 2c70a (b:470a)
ldh [hTempPlayAreaLocation_ffa1], a
ret
-; if coin toss was heads and it's possible,
-; switch Defending Pokemon
+; if coin toss at hTemp_ffa0 was heads and it's possible,
+; switch the Defending Pokemon
TerrorStrike_SwitchDefendingPokemon: ; 2c726 (b:4726)
ldh a, [hTemp_ffa0]
or a
@@ -516,15 +547,57 @@ TerrorStrike_SwitchDefendingPokemon: ; 2c726 (b:4726)
PoisonFang_AIEffect: ; 2c730 (b:4730)
ld a, 10
lb de, 10, 10
- jp Func_2c0d4
+ jp UpdateExpectedAIDamage_AccountForPoison
WeepinbellPoisonPowder_AIEffect: ; 2c738 (b:4738)
ld a, 5
lb de, 0, 10
- jp Func_2c0d4
+ jp UpdateExpectedAIDamage_AccountForPoison
; 0x2c740
- INCROM $2c740, $2c77e
+; return carry if there are no Pokemon cards in the non-turn holder's bench
+Lure_AssertPokemonInBench: ; 2c740 (b:4740)
+ ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY_AREA
+ call GetNonTurnDuelistVariable
+ ldtx hl, NoPokemonOnTheBenchText_2
+ cp 2
+ ret
+; 0x2c74b
+
+; return in hTempPlayAreaLocation_ffa1 the PLAY_AREA_* location
+; of the Bench Pokemon that was selected for switch
+Lure_SelectSwitchPokemon: ; 2c74b (b:474b)
+ ldtx hl, SelectPkmnOnBenchToSwitchWithActiveText
+ call DrawWideTextBox_WaitForInput
+ call SwapTurn
+ bank1call HasAlivePokemonInBench
+.select_pokemon
+ bank1call OpenPlayAreaScreenForSelection
+ jr c, .select_pokemon
+ ldh a, [hTempPlayAreaLocation_ff9d]
+ ldh [hTemp_ffa0], a
+ call SwapTurn
+ ret
+; 0x2c764
+
+Func_2c764: ; 2c764 (b:4764)
+ call Func_2c564
+ ldh [hTemp_ffa0], a
+ ret
+; 0x2c76a
+
+; Defending Pokemon is swapped out for the one with the PLAY_AREA_* at hTemp_ffa0
+; unless Mew's Neutralizing Shield or Haunter's Transparency prevents it.
+Lure_SwitchDefendingPokemon: ; 2c76a (b:476a)
+ call SwapTurn
+ ldh a, [hTemp_ffa0]
+ ld e, a
+ call HandleNShieldAndTransparency
+ call nc, SwapArenaWithBenchPokemon
+ call SwapTurn
+ xor a
+ ld [wDuelDisplayedScreen], a
+ ret
; If heads, defending Pokemon can't retreat next turn
AcidEffect: ; 2c77e (b:477e)
@@ -538,7 +611,7 @@ AcidEffect: ; 2c77e (b:477e)
GloomPoisonPowder_AIEffect: ; 2c78b (b:478b)
ld a, 10
lb de, 10, 10
- jp Func_2c0d4
+ jp UpdateExpectedAIDamage_AccountForPoison
; Defending Pokemon and user become confused
FoulOdorEffect: ; 2c793 (b:4793)
@@ -562,7 +635,7 @@ KakunaStiffenEffect: ; 2c7a0 (b:47a0)
KakunaPoisonPowder_AIEffect: ; 2c7b4 (b:47b4)
ld a, 5
lb de, 0, 10
- jp Func_2c0d4
+ jp UpdateExpectedAIDamage_AccountForPoison
; 0x2c7bc
INCROM $2c7bc, $2c7d0
@@ -588,7 +661,7 @@ ZubatSupersonicEffect: ; 2c7dc (b:47dc)
Twineedle_AIEffect: ; 2c7ed (b:47ed)
ld a, 30
lb de, 0, 60
- jp Func_2c0fb
+ jp SetExpectedAIDamage
; Flip 2 coins; deal 30x number of heads
Twineedle_MultiplierEffect: ; 2c7f5 (b:47f5)
@@ -601,7 +674,7 @@ Twineedle_MultiplierEffect: ; 2c7f5 (b:47f5)
add a
add e
call ATimes10
- call StoreDamageInfo
+ call SetDefiniteDamage
ret
; 0x2c80d
@@ -610,7 +683,7 @@ Twineedle_MultiplierEffect: ; 2c7f5 (b:47f5)
FoulGas_AIEffect: ; 2c822 (b:4822)
ld a, 5
lb de, 0, 10
- jp Func_2c0e9
+ jp UpdateExpectedAIDamage
; If heads, defending Pokemon becomes poisoned. If tails, defending Pokemon becomes confused
FoulGas_PoisonOrConfusionEffect: ; 2c82a (b:482a)
@@ -683,7 +756,7 @@ SetDamageToATimes20: ; 2c958 (b:4958)
Thrash_AIEffect: ; 2c96b (b:496b)
ld a, 35
lb de, 30, 40
- jp Func_2c0fb
+ jp SetExpectedAIDamage
; If heads 10 more damage; if tails, 10 damage to itself
Thrash_ModifierEffect: ; 2c973 (b:4973)
@@ -695,20 +768,20 @@ Thrash_ModifierEffect: ; 2c973 (b:4973)
call AddToDamage
ret
-Func_2c982: ; 2c982 (b:4982)
+Thrash_LowRecoilEffect: ; 2c982 (b:4982)
ldh a, [hTemp_ffa0]
or a
ret nz
ld a, 10
- call Func_1955
+ call DealRecoilDamageToSelf
ret
Toxic_AIEffect: ; 2c98c (b:498c)
ld a, 20
lb de, 20, 20
- jp Func_2c0e9
+ jp UpdateExpectedAIDamage
-; Defending Pokémon becomes poisoned, but takes 20 damage (double poisoned)
+; Defending Pokémon becomes double poisoned (takes 20 damage per turn rather than 10)
Toxic_DoublePoisonEffect: ; 2c994 (b:4994)
call DoublePoisonEffect
ret
@@ -727,7 +800,7 @@ Func_2cbfb: ; 2cbfb (b:4bfb)
; 0x2cc0a
INCROM $2cc0a, $2f4e1
-
+
ImposterProfessorOakEffect: ; 2f4e1 (b:74e1)
call SwapTurn
call CreateHandCardList
@@ -742,9 +815,9 @@ ImposterProfessorOakEffect: ; 2f4e1 (b:74e1)
jr .return_hand_to_deck_loop
.shuffle
call Func_2c0bd
- ld a, $07
- bank1call $4935
- ld c, $07
+ ld a, 7
+ bank1call DisplayDrawACardsScreen
+ ld c, 7
.draw_loop
call DrawCardFromDeck
jr c, .revert_turn_to_user
diff --git a/src/engine/home.asm b/src/engine/home.asm
index ff887fd..9ebb549 100644
--- a/src/engine/home.asm
+++ b/src/engine/home.asm
@@ -2778,7 +2778,7 @@ ExchangeRNG: ; 0f58 (0:0f58)
; send 10 bytes of data to the other game from hOppActionTableIndex, hTempCardIndex_ff9f,
; hTemp_ffa0, and hTempPlayAreaLocation_ffa1, and hTempRetreatCostCards.
; finally exchange RNG data.
-; the receiving side will use this data to read the OPP_ACTION_* value in
+; the receiving side will use this data to read the OPPACTION_* value in
; [hOppActionTableIndex] and match it by calling the correspoding OppAction* function
SetOppAction_SerialSendDuelData: ; 0f7f (0:0f7f)
push hl
@@ -4380,7 +4380,7 @@ Func_16f6: ; 16f6 (0:16f6)
ld [wIsDamageToSelf], a
ld [wccef], a
ld [wccf0], a
- ld [wNoEffectFromStatus], a
+ ld [wNoEffectFromWhichStatus], a
bank1call ClearNonTurnTemporaryDuelvars_CopyStatus
ret
@@ -4516,7 +4516,7 @@ ClearNonTurnTemporaryDuelvars_ResetCarry: ; 1823 (0:1823)
ret
; called when attacker deals damage to itself due to confusion
-; display the corresponding animation and deal damage to self
+; display the corresponding animation and deal 20 damage to self
HandleConfusionDamageToSelf: ; 1828 (0:1828)
bank1call DrawDuelMainScene
ld a, 1
@@ -4690,13 +4690,17 @@ LoadNonPokemonCardEffectCommands: ; 1944 (0:1944)
ld [de], a
ret
-Func_1955: ; 1955 (0:1955)
+; Make turn holder deal A damage to self due to recoil (e.g. Thrash, Selfdestruct)
+; display recoil animation
+DealRecoilDamageToSelf: ; 1955 (0:1955)
push af
ld a, $7a
ld [wLoadedMoveAnimation], a
pop af
; fallthrough
+; Make turn holder deal A damage to self due to confusion
+; display animation at wLoadedMoveAnimation
DealConfusionDamageToSelf: ; 195c (0:195c)
ld hl, wDamage
ld [hli], a
@@ -11461,7 +11465,7 @@ DrawSpriteAnimationFrame: ; 3cc4 (0:3cc4)
call BankswitchROM
ret
-; Loads a pointer to the current animation frame into SPRITE_ANIM_FRAME_DATA_POINTER using
+; Loads a pointer to the current animation frame into SPRITE_ANIM_FRAME_DATA_POINTER using
; the current frame's offset
; [wd4ca] - current frame offset
; wTempPointer* - Pointer to current Animation
diff --git a/src/text/text1.asm b/src/text/text1.asm
index 07d7a7a..4a05313 100644
--- a/src/text/text1.asm
+++ b/src/text/text1.asm
@@ -858,7 +858,7 @@ Text00b6: ; 375bc (d:75bc)
text "Not enough cards in Hand."
done
-Text00b7: ; 375d7 (d:75d7)
+NoPokemonOnTheBenchText_2: ; 375d7 (d:75d7)
text "No Pokémon on the Bench."
done
diff --git a/src/text/text_offsets.asm b/src/text/text_offsets.asm
index 605ec7d..9a45df3 100644
--- a/src/text/text_offsets.asm
+++ b/src/text/text_offsets.asm
@@ -184,7 +184,7 @@ TextOffsets:: ; 34000 (d:4000)
textpointer CantEvolvePokemonInSameTurnItsPlacedText ; 0x00b4
textpointer Text00b5 ; 0x00b5
textpointer Text00b6 ; 0x00b6
- textpointer Text00b7 ; 0x00b7
+ textpointer NoPokemonOnTheBenchText_2 ; 0x00b7
textpointer Text00b8 ; 0x00b8
textpointer Text00b9 ; 0x00b9
textpointer Text00ba ; 0x00ba
diff --git a/src/wram.asm b/src/wram.asm
index bb1f346..c75adf0 100644
--- a/src/wram.asm
+++ b/src/wram.asm
@@ -1025,7 +1025,7 @@ wccf0:: ; ccf0
; effect functions return a status condition constant here when it had no effect
; on the target, in order to print one of the ThereWasNoEffectFrom* texts
-wNoEffectFromStatus:: ; ccf1
+wNoEffectFromWhichStatus:: ; ccf1
ds $1
; when non-0, allows the player to skip some delays during a duel by pressing B.