ref: 28aec67f6e99db64582f66b26a5c898fe9943e00
parent: 6ba30e593e39057b700920808af0309c672688a0
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Thu Dec 14 19:05:53 EST 2017
Document one more bug/oversight Move FleeMons table into data/
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -820,42 +820,8 @@
ret
; 3c59a
-FleeMons:
+INCLUDE "data/battle/flee_mons.asm"
-SometimesFleeMons: ; 3c59a
- db MAGNEMITE
- db GRIMER
- db TANGELA
- db MR__MIME
- db EEVEE
- db PORYGON
- db DRATINI
- db DRAGONAIR
- db TOGETIC
- db UMBREON
- db UNOWN
- db SNUBBULL
- db HERACROSS
- db -1
-
-OftenFleeMons: ; 3c5a8
- db CUBONE
- db ARTICUNO
- db ZAPDOS
- db MOLTRES
- db QUAGSIRE
- db DELIBIRD
- db PHANPY
- db TEDDIURSA
- db -1
-
-AlwaysFleeMons: ; 3c5b1
- db RAIKOU
- db ENTEI
-; db SUICUNE
- db -1
-; 3c5b4
-
CompareMovePriority: ; 3c5b4
; Compare the priority of the player and enemy's moves.
; Return carry if the player goes first, or z if they match.
@@ -876,7 +842,7 @@
ld b, a
- ; Vital throw goes last.
+ ; Vital Throw goes last.
cp VITAL_THROW
ld a, 0
ret z
--- a/battle/objects/functions.asm
+++ b/battle/objects/functions.asm
@@ -450,7 +450,7 @@
ret
; cd26c (33:526c)
-INCLUDE "data/ball_colors.asm"
+INCLUDE "data/battle/ball_colors.asm"
BattleAnimFunction_10: ; cd284 (33:5284)
call BattleAnim_AnonJumptable
--- a/data/ball_colors.asm
+++ /dev/null
@@ -1,16 +1,0 @@
-; colors of balls thrown in battle
-
-BallColors: ; cd26c (33:526c)
- db MASTER_BALL, PAL_BATTLE_OB_GREEN
- db ULTRA_BALL, PAL_BATTLE_OB_YELLOW
- db GREAT_BALL, PAL_BATTLE_OB_BLUE
- db POKE_BALL, PAL_BATTLE_OB_RED
- db HEAVY_BALL, PAL_BATTLE_OB_GRAY
- db LEVEL_BALL, PAL_BATTLE_OB_BROWN
- db LURE_BALL, PAL_BATTLE_OB_BLUE
- db FAST_BALL, PAL_BATTLE_OB_BLUE
- db FRIEND_BALL, PAL_BATTLE_OB_YELLOW
- db MOON_BALL, PAL_BATTLE_OB_GRAY
- db LOVE_BALL, PAL_BATTLE_OB_RED
- db -1, PAL_BATTLE_OB_GRAY
-; cd284
--- /dev/null
+++ b/data/battle/ball_colors.asm
@@ -1,0 +1,16 @@
+; colors of balls thrown in battle
+
+BallColors: ; cd26c (33:526c)
+ db MASTER_BALL, PAL_BATTLE_OB_GREEN
+ db ULTRA_BALL, PAL_BATTLE_OB_YELLOW
+ db GREAT_BALL, PAL_BATTLE_OB_BLUE
+ db POKE_BALL, PAL_BATTLE_OB_RED
+ db HEAVY_BALL, PAL_BATTLE_OB_GRAY
+ db LEVEL_BALL, PAL_BATTLE_OB_BROWN
+ db LURE_BALL, PAL_BATTLE_OB_BLUE
+ db FAST_BALL, PAL_BATTLE_OB_BLUE
+ db FRIEND_BALL, PAL_BATTLE_OB_YELLOW
+ db MOON_BALL, PAL_BATTLE_OB_GRAY
+ db LOVE_BALL, PAL_BATTLE_OB_RED
+ db -1, PAL_BATTLE_OB_GRAY
+; cd284
--- /dev/null
+++ b/data/battle/flee_mons.asm
@@ -1,0 +1,36 @@
+FleeMons:
+; referenced by TryEnemyFlee and FastBallMultiplier
+
+SometimesFleeMons: ; 3c59a
+ db MAGNEMITE
+ db GRIMER
+ db TANGELA
+ db MR__MIME
+ db EEVEE
+ db PORYGON
+ db DRATINI
+ db DRAGONAIR
+ db TOGETIC
+ db UMBREON
+ db UNOWN
+ db SNUBBULL
+ db HERACROSS
+ db -1
+
+OftenFleeMons: ; 3c5a8
+ db CUBONE
+ db ARTICUNO
+ db ZAPDOS
+ db MOLTRES
+ db QUAGSIRE
+ db DELIBIRD
+ db PHANPY
+ db TEDDIURSA
+ db -1
+
+AlwaysFleeMons: ; 3c5b1
+ db RAIKOU
+ db ENTEI
+; db SUICUNE
+ db -1
+; 3c5b4
--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -29,6 +29,7 @@
- [Magikarp in Lake of Rage are shorter, not longer](#magikarp-in-lake-of-rage-are-shorter-not-longer)
- [Battle transitions fail to account for the enemy's level](#battle-transitions-fail-to-account-for-the-enemys-level)
- [Slot machine payout sound effects cut each other off](#slot-machine-payout-sound-effects-cut-each-other-off)
+- [Team Rocket battle music is not used for Executives or Scientists](#team-rocket-battle-music-is-not-used-for-executives-or-scientists)
- [No bump noise if standing on tile `$3E`](#no-bump-noise-if-standing-on-tile-3e)
- [Playing Entei's Pokédex cry can distort Raikou's and Suicune's](#playing-enteis-pokédex-cry-can-distort-raikous-and-suicunes)
- [`LoadMetatiles` wraps around past 128 blocks](#loadmetatiles-wraps-around-past-128-blocks)
@@ -800,6 +801,36 @@
```
**Fix:** Change `ret z` to `ret nz`.
+
+
+## Team Rocket battle music is not used for Executives or Scientists
+
+This is a bug with `PlayBattleMusic` in [main.asm](/main.asm):
+
+```asm
+ ; really, they should have included admins and scientists here too...
+ ld de, MUSIC_ROCKET_BATTLE
+ cp GRUNTM
+ jr z, .done
+ cp GRUNTF
+ jr z, .done
+```
+
+**Fix:**
+
+```asm
+ ld de, MUSIC_ROCKET_BATTLE
+ cp GRUNTM
+ jr z, .done
+ cp GRUNTF
+ jr z, .done
+ cp EXECUTIVEM
+ jr z, .done
+ cp EXECUTIVEF
+ jr z, .done
+ cp SCIENTIST
+ jr z, .done
+```
## No bump noise if standing on tile `$3E`