ref: 3bb94e49286617c9e8d61af4e9af85df88000d96
parent: c34add7e08f11219bcdf9d71b6473215f0a4ae98
author: Idain <[email protected]>
date: Sat Mar 12 21:46:04 EST 2022
Solve issue with Full Heal text bugfix (#887) Fixes #818
--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -1349,19 +1349,13 @@
- ; res SUBSTATUS_NIGHTMARE, [hl]
+ ld hl, wEnemySubStatus1
+ res SUBSTATUS_NIGHTMARE, [hl]
-- ; Bug: this should reset SUBSTATUS_CONFUSED
-- ; Uncomment the 2 lines below to fix
-- ; ld hl, wEnemySubStatus3
-- ; res SUBSTATUS_CONFUSED, [hl]
-+ ld hl, wEnemySubStatus5
-+ res SUBSTATUS_TOXIC, [hl]
- ret
+ ...
```
### AI use of Full Heal does not cure confusion status
-**Fix:** Edit `EnemyUsedFullRestore`, `EnemyUsedFullHeal`, and `AI_HealStatus` in [engine/battle/ai/items.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/ai/items.asm):
+**Fix:** Edit `EnemyUsedFullRestore`, and `AI_HealStatus` in [engine/battle/ai/items.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/ai/items.asm):
```diff
EnemyUsedFullRestore:
@@ -1370,22 +1364,11 @@
ld [wCurEnemyItem], a
- ld hl, wEnemySubStatus3
- res SUBSTATUS_CONFUSED, [hl]
- xor a
- ld [wEnemyConfuseCount], a
+- xor a
+- ld [wEnemyConfuseCount], a
```
```diff
- EnemyUsedFullHeal:
- call AIUsedItemSound
- call AI_HealStatus
- ld a, FULL_HEAL
-+ ld [wCurEnemyItem], a
-+ xor a
-+ ld [wEnemyConfuseCount], a
- jp PrintText_UsedItemOn_AND_AIUpdateHUD
-```
-
-```diff
AI_HealStatus:
ld a, [wCurOTMon]
ld hl, wOTPartyMon1Status
@@ -1394,12 +1377,11 @@
xor a
ld [hl], a
ld [wEnemyMonStatus], a
-- ; Bug: this should reset SUBSTATUS_NIGHTMARE
-- ; Uncomment the 2 lines below to fix
-- ; ld hl, wEnemySubStatus1
-- ; res SUBSTATUS_NIGHTMARE, [hl]
-+ ld hl, wEnemySubStatus1
-+ res SUBSTATUS_NIGHTMARE, [hl]
++ ld [wEnemyConfuseCount], a
+ ; Bug: this should reset SUBSTATUS_NIGHTMARE
+ ; Uncomment the 2 lines below to fix
+ ; ld hl, wEnemySubStatus1
+ ; res SUBSTATUS_NIGHTMARE, [hl]
- ; Bug: this should reset SUBSTATUS_CONFUSED
- ; Uncomment the 2 lines below to fix
- ; ld hl, wEnemySubStatus3