Merge pull request #546 from Rangi42/master

Reword bug docs now that they use diffs
This commit is contained in:
Rangi
2018-07-28 01:06:54 -04:00
committed by GitHub
3 changed files with 515 additions and 615 deletions

View File

@@ -12,8 +12,9 @@ Fixes are written in the `diff` format. If you're familiar with git, this should
## Contents
- [Thick Club and Light Ball can decrease damage done with boosted (Special) Attack](#thick-club-and-light-ball-can-decrease-damage-done-with-boosted-special-attack)
- [Thick Club and Light Ball can make (Special) Attack wrap around above 1024](#thick-club-and-light-ball-can-make-special-attack-wrap-around-above-1024)
- [Metal Powder can increase damage taken with boosted (Special) Defense](#metal-powder-can-increase-damage-taken-with-boosted-special-defense)
- [Reflect and Light Screen can make (Special) Defense wrap around above 1024](#reflect-and-light-screen-can-make-special-defense-wrap-around-above-1024)
- [Belly Drum sharply boosts Attack even with under 50% HP](#belly-drum-sharply-boosts-attack-even-with-under-50-hp)
- [Confusion damage is affected by type-boosting items and Explosion/Self-Destruct doubling](#confusion-damage-is-affected-by-type-boosting-items-and-explosionself-destruct-doubling)
- [Moves that lower Defense can do so after breaking a Substitute](#moves-that-lower-defense-can-do-so-after-breaking-a-substitute)
@@ -22,7 +23,8 @@ Fixes are written in the `diff` format. If you're familiar with git, this should
- [A Pokémon that fainted from Pursuit will have its old status condition when revived](#a-pokémon-that-fainted-from-pursuit-will-have-its-old-status-condition-when-revived)
- [Lock-On and Mind Reader don't always bypass Fly and Dig](#lock-on-and-mind-reader-dont-always-bypass-fly-and-dig)
- [Beat Up can desynchronize link battles](#beat-up-can-desynchronize-link-battles)
- [Beat Up may fail to raise substitute](#beat-up-may-fail-to-raise-substitute)
- [Beat Up works incorrectly with only one Pokémon in the party](#beat-up-works-incorrectly-with-only-one-pokémon-in-the-party)
- [Beat Up may fail to raise Substitute](#beat-up-may-fail-to-raise-substitute)
- [Beat Up may trigger King's Rock even if it failed](#beat-up-may-trigger-kings-rock-even-if-it-failed)
- [Present damage is incorrect in link battles](#present-damage-is-incorrect-in-link-battles)
- ["Smart" AI encourages Mean Look if its own Pokémon is badly poisoned](#smart-ai-encourages-mean-look-if-its-own-pokémon-is-badly-poisoned)
@@ -65,16 +67,13 @@ Fixes are written in the `diff` format. If you're familiar with git, this should
- [`ClearWRAM` only clears WRAM bank 1](#clearwram-only-clears-wram-bank-1)
## Thick Club and Light Ball can decrease damage done with boosted (Special) Attack
## Thick Club and Light Ball can make (Special) Attack wrap around above 1024
*Fixing this bug will break compatibility with standard Pokémon Crystal for link battles.*
([Video](https://www.youtube.com/watch?v=rGqu3d3pdok&t=450))
This is a bug with `SpeciesItemBoost` in [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm):
**Fix:**
**Fix:** Edit `SpeciesItemBoost` in [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm)
```diff
; Double the stat
@@ -101,10 +100,7 @@ This is a bug with `SpeciesItemBoost` in [engine/battle/effect_commands.asm](/en
([Video](https://www.youtube.com/watch?v=rGqu3d3pdok&t=450))
This is a bug with `DittoMetalPowder` in [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm):
**Fix:**
**Fix:** Edit `DittoMetalPowder` in [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm):
```diff
ld a, c
@@ -136,16 +132,41 @@ This is a bug with `DittoMetalPowder` in [engine/battle/effect_commands.asm](/en
```
## Reflect and Light Screen can make (Special) Defense wrap around above 1024
*Fixing this bug will break compatibility with standard Pokémon Crystal for link battles.*
This bug existed for all battles in Gold and Silver, and was only fixed for single-player battles in Crystal to preserve link compatibility.
**Fix:** Edit `TruncateHL_BC` in [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm)
```diff
.finish
- ld a, [wLinkMode]
- cp LINK_COLOSSEUM
- jr z, .done
; If we go back to the loop point,
; it's the same as doing this exact
; same check twice.
ld a, h
or b
jr nz, .loop
-.done
ld b, l
ret
```
(This fix also affects Thick Club, Light Ball, and Metal Powder, as described above, but their specific fixes in the above bugs allow more accurate damage calculations.)
## Belly Drum sharply boosts Attack even with under 50% HP
*Fixing this bug will break compatibility with standard Pokémon Crystal for link battles.*
([Video](https://www.youtube.com/watch?v=zuCLMikWo4Y))
This is a bug with `BattleCommand_BellyDrum` in [engine/battle/move_effects/belly_drum.asm](/engine/battle/move_effects/belly_drum.asm):
**Fix:**
**Fix:** Edit `BattleCommand_BellyDrum` in [engine/battle/move_effects/belly_drum.asm](/engine/battle/move_effects/belly_drum.asm):
```diff
BattleCommand_BellyDrum:
@@ -153,18 +174,19 @@ BattleCommand_BellyDrum:
-; This command is buggy because it raises the user's attack
-; before checking that it has enough HP to use the move.
-; Swap the order of these two blocks to fix.
+ callfar GetHalfMaxHP
+ callfar CheckUserHasEnoughHP
+ jr nc, .failed
+
call BattleCommand_AttackUp2
ld a, [wAttackMissed]
and a
jr nz, .failed
- call BattleCommand_AttackUp2
- ld a, [wAttackMissed]
- and a
- jr nz, .failed
-
- callfar GetHalfMaxHP
- callfar CheckUserHasEnoughHP
- jr nc, .failed
callfar GetHalfMaxHP
callfar CheckUserHasEnoughHP
jr nc, .failed
+
+ call BattleCommand_AttackUp2
+ ld a, [wAttackMissed]
+ and a
+ jr nz, .failed
```
@@ -185,12 +207,9 @@ BattleCommand_BellyDrum:
This bug affects Acid, Iron Tail, and Rock Smash.
This is a bug with `DefenseDownHit` in [data/moves/effects.asm](/data/moves/effects.asm):
**Fix:** Edit `DefenseDownHit` in [data/moves/effects.asm](/data/moves/effects.asm):
**Fix:**
```asm
```diff
DefenseDownHit:
checkobedience
usedmovetext
@@ -222,10 +241,7 @@ DefenseDownHit:
([Video](https://www.youtube.com/watch?v=uRYyzKRatFk))
This is a bug with `BattleCommand_Counter` in [engine/battle/move_effects/counter.asm](/engine/battle/move_effects/counter.asm) and `BattleCommand_MirrorCoat` in [engine/battle/move_effects/mirror_coat.asm](/engine/battle/move_effects/mirror_coat.asm):
**Fix:**
**Fix:** Edit `BattleCommand_Counter` in [engine/battle/move_effects/counter.asm](/engine/battle/move_effects/counter.asm) and `BattleCommand_MirrorCoat` in [engine/battle/move_effects/mirror_coat.asm](/engine/battle/move_effects/mirror_coat.asm):
```diff
- ; BUG: Move should fail with all non-damaging battle actions
@@ -253,10 +269,7 @@ Add this to the end of each file:
([Video](https://www.youtube.com/watch?v=1v9x4SgMggs))
This is a bug with `CheckPlayerHasUsableMoves` in [engine/battle/core.asm](/engine/battle/core.asm):
**Fix:**
**Fix:** Edit `CheckPlayerHasUsableMoves` in [engine/battle/core.asm](/engine/battle/core.asm):
```diff
.done
@@ -290,22 +303,18 @@ This is a bug with `CheckPlayerHasUsableMoves` in [engine/battle/core.asm](/engi
This bug affects Attract, Curse, Foresight, Mean Look, Mimic, Nightmare, Spider Web, Transform, and stat-lowering effects of moves like String Shot or Bubble during the semi-invulnerable turn of Fly or Dig.
This is a bug with `CheckHiddenOpponent` in [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm):
**Fix:**
**Fix:** Edit `CheckHiddenOpponent` in [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm):
```diff
CheckHiddenOpponent:
-CheckHiddenOpponent:
-; BUG: This routine is completely redundant and introduces a bug, since BattleCommand_CheckHit does these checks properly.
- ld a, BATTLE_VARS_SUBSTATUS3_OPP
- call GetBattleVar
- and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
+ xor a
ret
```
The code in `CheckHiddenOpponent` is completely redundant as `BattleCommand_CheckHit` already does what this code is doing. Another option is to remove `CheckHiddenOpponent` completely, the calls to `CheckHiddenOpponent`, and the jump afterwards.
## Beat Up can desynchronize link battles
@@ -313,10 +322,7 @@ The code in `CheckHiddenOpponent` is completely redundant as `BattleCommand_Chec
([Video](https://www.youtube.com/watch?v=202-iAsrIa8))
This is a bug with `BattleCommand_BeatUp` in [engine/battle/move_effects/beat_up.asm](/engine/battle/move_effects/beat_up.asm):
**Fix:**
**Fix:** Edit `BattleCommand_BeatUp` in [engine/battle/move_effects/beat_up.asm](/engine/battle/move_effects/beat_up.asm):
```diff
.got_mon
@@ -346,17 +352,13 @@ This is a bug with `BattleCommand_BeatUp` in [engine/battle/move_effects/beat_up
```
## Beat Up may fail to raise substitute
## Beat Up works incorrectly with only one Pokémon in the party
*Fixing this bug will break compatibility with standard Pokémon Crystal for link battles.*
(Only the fixes denoted with "breaking" will actually break compatibility, the others just affect what's shown on the screen with the patched game)
*Fixing this bug may break compatibility with standard Pokémon Crystal for link battles.*
This is a bug in `BattleCommand_EndLoop` in [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm) that prevents the rest of the move's effect from being executed if the player or enemy only has one mon in their party while using Beat Up.
This bug prevents the rest of Beat Up's effect from being executed if the player or enemy only has one Pokémon in their party while using it. It prevents Substitute from being raised and King's Rock from working.
It prevents the substitute from being raised and the King's Rock from working.
**Fix (breaking):**
**Fix:** Edit `BattleCommand_EndLoop` in [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm):
```diff
.only_one_beatup
@@ -368,7 +370,7 @@ It prevents the substitute from being raised and the King's Rock from working.
+ ret
```
**Fix (cosmetics):**
**Cosmetic fix:** This fix does not break compatibility, but it only affects what's shown on the screen for the patched game.
```diff
.only_one_beatup
@@ -381,12 +383,13 @@ It prevents the substitute from being raised and the King's Rock from working.
```
There's a similar oversight in `BattleCommand_FailureText` in [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm) that will prevent the substitute from being raised if Beat Up is protected against.
## Beat Up may fail to raise Substitute
This bug prevents Substitute from being raised if Beat Up was blocked by Protect or Detect.
**Fix (cosmetics):**
**Fix:** Edit `BattleCommand_FailureText` in [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm).
```asm
```diff
cp EFFECT_MULTI_HIT
jr z, .multihit
cp EFFECT_DOUBLE_HIT
@@ -407,12 +410,9 @@ There's a similar oversight in `BattleCommand_FailureText` in [engine/battle/eff
*Fixing this bug will break compatibility with standard Pokémon Crystal for link battles.*
This is a bug in how `wAttackMissed` is never set by BeatUp, even when none of the 'mon have been able to attack (due to being fainted or having a status effect), the King's Rock may activate.
This bug is caused because Beat Up never sets `wAttackMissed`, even when no Pokémon was able to attack (due to being fainted or having a status condition).
This bug can be fixed in a plethora of ways, but the most straight-forward would be in `BattleCommand_BeatUpFailText` in [engine/battle/move_effects/beat_up.asm](/engine/battle/move_effects/beat_up.asm), as that's always ran before the king's rock effect.
**Fix:**
**Fix:** Edit `BattleCommand_BeatUpFailText` in [engine/battle/move_effects/beat_up.asm](/engine/battle/move_effects/beat_up.asm):
```diff
BattleCommand_BeatUpFailText:
@@ -437,10 +437,7 @@ BattleCommand_BeatUpFailText:
This bug existed for all battles in Gold and Silver, and was only fixed for single-player battles in Crystal to preserve link compatibility.
This is a bug with `BattleCommand_Present` in [engine/battle/move_effects/present.asm](/engine/battle/move_effects/present.asm):
**Fix:**
**Fix:** Edit `BattleCommand_Present` in [engine/battle/move_effects/present.asm](/engine/battle/move_effects/present.asm):
```diff
BattleCommand_Present:
@@ -468,10 +465,7 @@ BattleCommand_Present:
([Video](https://www.youtube.com/watch?v=cygMO-zHTls))
This is a bug with `AI_Smart_MeanLook` in [engine/battle/ai/scoring.asm](/engine/battle/ai/scoring.asm):
**Fix:**
**Fix:** Edit `AI_Smart_MeanLook` in [engine/battle/ai/scoring.asm](/engine/battle/ai/scoring.asm):
```diff
-; 80% chance to greatly encourage this move if the enemy is badly poisoned (buggy).
@@ -486,7 +480,7 @@ This is a bug with `AI_Smart_MeanLook` in [engine/battle/ai/scoring.asm](/engine
## AI makes a false assumption about `CheckTypeMatchup`
In [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm):
In [engine/battle/effect_commands.asm](/engine/battle/effect_commands.asm).
```asm
BattleCheckTypeMatchup:
@@ -517,10 +511,7 @@ CheckTypeMatchup:
([Video](https://www.youtube.com/watch?v=rGqu3d3pdok&t=322))
This is a bug with `AI_HealStatus` in [engine/battle/ai/items.asm](/engine/battle/ai/items.asm):
**Fix:**
**Fix:** Edit `AI_HealStatus` in [engine/battle/ai/items.asm](/engine/battle/ai/items.asm):
```diff
AI_HealStatus:
@@ -547,10 +538,7 @@ AI_HealStatus:
([Video](https://www.youtube.com/watch?v=SE-BfsFgZVM))
This is a bug with `LongAnim_UpdateVariables` in [engine/battle/anim_hp_bar.asm](/engine/battle/anim_hp_bar.asm):
**Fix:**
**Fix:** Edit `LongAnim_UpdateVariables` in [engine/battle/anim_hp_bar.asm](/engine/battle/anim_hp_bar.asm):
```diff
- ; This routine is buggy. The result from ComputeHPBarPixels is stored
@@ -577,10 +565,7 @@ This is a bug with `LongAnim_UpdateVariables` in [engine/battle/anim_hp_bar.asm]
([Video](https://www.youtube.com/watch?v=9KyNVIZxJvI))
This is a bug with `ShortHPBar_CalcPixelFrame` in [engine/battle/anim_hp_bar.asm](/engine/battle/anim_hp_bar.asm):
**Fix:**
**Fix:** Edit `ShortHPBar_CalcPixelFrame` in [engine/battle/anim_hp_bar.asm](/engine/battle/anim_hp_bar.asm):
```diff
ld b, 0
@@ -608,10 +593,7 @@ This is a bug with `ShortHPBar_CalcPixelFrame` in [engine/battle/anim_hp_bar.asm
This can bring Pokémon straight from level 1 to 100 by gaining just a few experience points.
This is a bug with `CalcExpAtLevel` in [engine/pokemon/experience.asm](/engine/pokemon/experience.asm):
**Fix:**
**Fix:** Edit `CalcExpAtLevel` in [engine/pokemon/experience.asm](/engine/pokemon/experience.asm):
```diff
CalcExpAtLevel:
@@ -643,10 +625,7 @@ CalcExpAtLevel:
([Video](https://www.youtube.com/watch?v=o54VjpAEoO8))
This is a bug with `Text_ABoostedStringBuffer2ExpPoints` and `Text_StringBuffer2ExpPoints` in [data/text/common_2.asm](/data/text/common_2.asm):
**Fix:**
**Fix:** Edit `Text_ABoostedStringBuffer2ExpPoints` and `Text_StringBuffer2ExpPoints` in [data/text/common_2.asm](/data/text/common_2.asm):
```diff
Text_ABoostedStringBuffer2ExpPoints::
@@ -670,10 +649,7 @@ Text_StringBuffer2ExpPoints::
## BRN/PSN/PAR do not affect catch rate
This is a bug with `PokeBallEffect` in [engine/items/item_effects.asm](/engine/items/item_effects.asm):
**Fix:**
**Fix:** Edit `PokeBallEffect` in [engine/items/item_effects.asm](/engine/items/item_effects.asm):
```diff
-; This routine is buggy. It was intended that SLP and FRZ provide a higher
@@ -703,10 +679,7 @@ This is a bug with `PokeBallEffect` in [engine/items/item_effects.asm](/engine/i
## Moon Ball does not boost catch rate
This is a bug with `MoonBallMultiplier` in [items/item_effects.asm](/items/item_effects.asm):
**Fix:**
**Fix:** Edit `MoonBallMultiplier` in [items/item_effects.asm](/items/item_effects.asm):
```diff
-; Moon Stone's constant from Pokémon Red is used.
@@ -724,10 +697,7 @@ This is a bug with `MoonBallMultiplier` in [items/item_effects.asm](/items/item_
## Love Ball boosts catch rate for the wrong gender
This is a bug with `LoveBallMultiplier` in [items/item_effects.asm](/items/item_effects.asm):
**Fix:**
**Fix:** Edit `LoveBallMultiplier` in [items/item_effects.asm](/items/item_effects.asm):
```diff
.wildmale
@@ -743,10 +713,7 @@ This is a bug with `LoveBallMultiplier` in [items/item_effects.asm](/items/item_
## Fast Ball only boosts catch rate for three Pokémon
This is a bug with `FastBallMultiplier` in [items/item_effects.asm](/items/item_effects.asm):
**Fix:**
**Fix:** Edit `FastBallMultiplier` in [items/item_effects.asm](/items/item_effects.asm):
```diff
.loop
@@ -768,20 +735,13 @@ This is a bug with `FastBallMultiplier` in [items/item_effects.asm](/items/item_
*Fixing this bug will break compatibility with standard Pokémon Crystal for link battles.*
This is a bug with `ItemAttributes` in [data/items/attributes.asm](/data/items/attributes.asm):
**Fix:**
**Fix:** Edit `ItemAttributes` in [data/items/attributes.asm](/data/items/attributes.asm):
```diff
; DRAGON_FANG
- item_attribute 100, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+ item_attribute 100, HELD_DRAGON_BOOST, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
```
And:
```diff
...
; DRAGON_SCALE
- item_attribute 2100, HELD_DRAGON_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+ item_attribute 2100, HELD_NONE, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
@@ -827,10 +787,7 @@ CopyPokemonName_Buffer1_Buffer3:
jp CopyBytes
```
In [data/events/happiness_probabilities.asm](/data/events/happiness_probabilities.asm):
**Fix:**
**Fix:** Edit [data/events/happiness_probabilities.asm](/data/events/happiness_probabilities.asm):
```diff
HappinessData_DaisysGrooming:
@@ -842,10 +799,7 @@ HappinessData_DaisysGrooming:
## Magikarp in Lake of Rage are shorter, not longer
This is a bug with `LoadEnemyMon.CheckMagikarpArea` in [engine/battle/core.asm](/engine/battle/core.asm):
**Fix:**
**Fix:** Edit `LoadEnemyMon.CheckMagikarpArea` in [engine/battle/core.asm](/engine/battle/core.asm):
```diff
.CheckMagikarpArea:
@@ -875,10 +829,7 @@ This is a bug with `LoadEnemyMon.CheckMagikarpArea` in [engine/battle/core.asm](
## Magikarp length limits have a unit conversion error
This is a bug with `LoadEnemyMon.CheckMagikarpArea` in [engine/battle/core.asm](/engine/battle/core.asm):
**Fix:**
**Fix:** Edit `LoadEnemyMon.CheckMagikarpArea` in [engine/battle/core.asm](/engine/battle/core.asm):
```diff
; Get Magikarp's length
@@ -916,10 +867,7 @@ This is a bug with `LoadEnemyMon.CheckMagikarpArea` in [engine/battle/core.asm](
## Magikarp lengths can be miscalculated
This is a bug with `CalcMagikarpLength.BCLessThanDE` in [engine/events/magikarp.asm](/engine/events/magikarp.asm):
**Fix:**
**Fix:** Edit `CalcMagikarpLength.BCLessThanDE` in [engine/events/magikarp.asm](/engine/events/magikarp.asm):
```diff
.BCLessThanDE:
@@ -985,10 +933,7 @@ StartTrainerBattle_DetermineWhichAnimation:
([Video](https://www.youtube.com/watch?v=iHkWubvxmSg))
This is a bug with `_HallOfFamePC.DisplayMonAndStrings` in [engine/events/halloffame.asm](/engine/events/halloffame.asm):
**Fix:**
**Fix:** Edit `_HallOfFamePC.DisplayMonAndStrings` in [engine/events/halloffame.asm](/engine/events/halloffame.asm):
```diff
ld a, [wHallOfFameTempWinCount]
@@ -1007,10 +952,7 @@ This is a bug with `_HallOfFamePC.DisplayMonAndStrings` in [engine/events/hallof
([Video](https://www.youtube.com/watch?v=ojq3xqfRF6I))
This is a bug with `Slots_PayoutAnim` in [engine/games/slot_machine.asm](/engine/games/slot_machine.asm):
**Fix:**
**Fix:** Edit `Slots_PayoutAnim` in [engine/games/slot_machine.asm](/engine/games/slot_machine.asm):
```diff
.okay
@@ -1029,10 +971,7 @@ This is a bug with `Slots_PayoutAnim` in [engine/games/slot_machine.asm](/engine
## Team Rocket battle music is not used for Executives or Scientists
This is a bug with `PlayBattleMusic` in [engine/battle/start_battle.asm](/engine/battle/start_battle.asm):
**Fix:**
**Fix:** Edit `PlayBattleMusic` in [engine/battle/start_battle.asm](/engine/battle/start_battle.asm):
```diff
ld de, MUSIC_ROCKET_BATTLE
@@ -1051,10 +990,7 @@ This is a bug with `PlayBattleMusic` in [engine/battle/start_battle.asm](/engine
## No bump noise if standing on tile `$3E`
This is a bug with `DoPlayerMovement.CheckWarp` in [engine/overworld/player_movement.asm](/engine/overworld/player_movement.asm):
**Fix:**
**Fix:** Edit `DoPlayerMovement.CheckWarp` in [engine/overworld/player_movement.asm](/engine/overworld/player_movement.asm):
```diff
.CheckWarp:
@@ -1089,10 +1025,9 @@ This is a bug with `DoPlayerMovement.CheckWarp` in [engine/overworld/player_move
([Video](https://www.youtube.com/watch?v=z305e4sIO24))
The exact cause is unknown, but a workaround exists for `DexEntryScreen_MenuActionJumptable.Cry` in [engine/pokedex/pokedex.asm](/engine/pokedex/pokedex.asm):
The exact cause of this bug is unknown.
**Workaround:**
**Workaround:** Edit `DexEntryScreen_MenuActionJumptable.Cry` in [engine/pokedex/pokedex.asm](/engine/pokedex/pokedex.asm):
```diff
.Cry:
@@ -1134,10 +1069,7 @@ This is a mistake with the left-hand warp carpet corner tiles in [gfx/tilesets/p
This bug prevents you from using blocksets with more than 128 blocks.
In [home/map.asm](/home/map.asm):
**Fix:**
**Fix:** Edit `LoadMetatiles` in [home/map.asm](/home/map.asm):
```diff
; Set hl to the address of the current metatile data ([wTilesetBlocksAddress] + (a) tiles).
@@ -1171,10 +1103,7 @@ In [home/map.asm](/home/map.asm):
This bug is why the Lapras in [maps/UnionCaveB2F.asm](/maps/UnionCaveB2F.asm), which uses `SPRITEMOVEDATA_SWIM_WANDER`, is not restricted by its `1, 1` movement radius.
This is a bug with `CanObjectMoveInDirection` in [engine/overworld/npc_movement.asm](/engine/overworld/npc_movement.asm):
**Fix:**
**Fix:** Edit `CanObjectMoveInDirection` in [engine/overworld/npc_movement.asm](/engine/overworld/npc_movement.asm):
```diff
ld hl, OBJECT_FLAGS1
@@ -1191,10 +1120,7 @@ This is a bug with `CanObjectMoveInDirection` in [engine/overworld/npc_movement.
This bug can allow you to talk to Eusine in Celadon City and encounter Ho-Oh with only traded legendary beasts.
In [engine/pokemon/search.asm](/engine/pokemon/search.asm):
**Fix:**
**Fix:** Edit `CheckOwnMon` in [engine/pokemon/search.asm](/engine/pokemon/search.asm):
```diff
; check OT
@@ -1224,10 +1150,7 @@ endr
This bug can affect Mew or Pokémon other than Ditto that used Transform via Mirror Move or Sketch.
This is a bug with `PokeBallEffect` in [engine/items/item_effects.asm](/engine/items/item_effects.asm):
**Fix:**
**Fix:** Edit `PokeBallEffect` in [engine/items/item_effects.asm](/engine/items/item_effects.asm):
```diff
ld hl, wEnemySubStatus5
@@ -1272,10 +1195,7 @@ This is a bug with `PokeBallEffect` in [engine/items/item_effects.asm](/engine/i
([Video](https://www.youtube.com/watch?v=v1ErZdLCIyU))
This is a bug with `PokeBallEffect` in [engine/items/item_effects.asm](/engine/items/item_effects.asm):
**Fix:**
**Fix:** Edit `PokeBallEffect` in [engine/items/item_effects.asm](/engine/items/item_effects.asm):
```diff
.room_in_party
@@ -1291,10 +1211,7 @@ This is a bug with `PokeBallEffect` in [engine/items/item_effects.asm](/engine/i
## `HELD_CATCH_CHANCE` has no effect
This is a bug with `PokeBallEffect` in [engine/items/item_effects.asm](/engine/items/item_effects.asm):
**Fix:**
**Fix:** Edit `PokeBallEffect` in [engine/items/item_effects.asm](/engine/items/item_effects.asm):
```diff
- ; BUG: farcall overwrites a, and GetItemHeldEffect takes b anyway.
@@ -1320,10 +1237,7 @@ This is a bug with `PokeBallEffect` in [engine/items/item_effects.asm](/engine/i
## Only the first three evolution entries can have Stone compatibility reported correctly
This is a bug with `PlacePartyMonEvoStoneCompatibility.DetermineCompatibility` in [engine/pokemon/party_menu.asm](/engine/pokemon/party_menu.asm):
**Workaround (supports up to six entries):**
**Workaround:** Edit `PlacePartyMonEvoStoneCompatibility.DetermineCompatibility` in [engine/pokemon/party_menu.asm](/engine/pokemon/party_menu.asm):
```diff
.DetermineCompatibility:
@@ -1342,13 +1256,12 @@ This is a bug with `PlacePartyMonEvoStoneCompatibility.DetermineCompatibility` i
call FarCopyBytes
```
This supports up to six entries.
## `EVOLVE_STAT` can break Stone compatibility reporting
This is a bug with `PlacePartyMonEvoStoneCompatibility.DetermineCompatibility` in [engine/pokemon/party_menu.asm](/engine/pokemon/party_menu.asm):
**Fix:**
**Fix:** Edit `PlacePartyMonEvoStoneCompatibility.DetermineCompatibility` in [engine/pokemon/party_menu.asm](/engine/pokemon/party_menu.asm):
```asm
.loop2
@@ -1408,10 +1321,7 @@ ScriptCall:
## `LoadSpriteGFX` does not limit the capacity of `UsedSprites`
In [engine/overworld/overworld.asm](/engine/overworld/overworld.asm):
**Fix:**
**Fix:** Edit `LoadSpriteGFX` in [engine/overworld/overworld.asm](/engine/overworld/overworld.asm):
```diff
LoadSpriteGFX:
@@ -1447,10 +1357,7 @@ LoadSpriteGFX:
## `ChooseWildEncounter` doesn't really validate the wild Pokémon species
In [engine/overworld/wildmons.asm](/engine/overworld/wildmons.asm):
**Fix:**
**Fix:** Edit `ChooseWildEncounter` in [engine/overworld/wildmons.asm](/engine/overworld/wildmons.asm):
```diff
.ok
@@ -1469,10 +1376,7 @@ In [engine/overworld/wildmons.asm](/engine/overworld/wildmons.asm):
## `TryObjectEvent` arbitrary code execution
In [engine/overworld/events.asm](/engine/overworld/events.asm):
**Fix:**
**Fix:** Edit `TryObjectEvent` in [engine/overworld/events.asm](/engine/overworld/events.asm):
```diff
-; Bug: If IsInArray returns nc, data at bc will be executed as code.
@@ -1499,10 +1403,7 @@ In [engine/overworld/events.asm](/engine/overworld/events.asm):
## `ClearWRAM` only clears WRAM bank 1
In [home/init.asm](/home/init.asm):
**Fix:**
**Fix:** Edit `ClearWRAM` in [home/init.asm](/home/init.asm):
```diff
ClearWRAM::

View File

@@ -2679,7 +2679,7 @@ TruncateHL_BC:
.finish
ld a, [wLinkMode]
cp 3
cp LINK_COLOSSEUM
jr z, .done
; If we go back to the loop point,
; it's the same as doing this exact

View File

@@ -158,11 +158,10 @@ wDisableTextAcceleration:: db
wPreviousLandmark:: db
wCurrentLandmark:: db
wLandmarkSignTimer:: dw
wLinkMode:: ; c2dc
; 0 not in link battle
; 1 link battle
; 4 mobile battle
db
wLinkMode::
; a LINK_* value for the link type
db ; c2dc
wScriptVar:: db ; c2dd