mirror of
https://github.com/pret/pokecrystal.git
synced 2026-03-21 17:45:29 -05:00
Bug: AI use of Full Heal or Full Restore does not cure Attack or Speed drops from burn or paralysis
Some checks are pending
CI / build (push) Waiting to run
Some checks are pending
CI / build (push) Waiting to run
Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com>
This commit is contained in:
parent
713b829198
commit
e286a5f098
|
|
@ -58,6 +58,7 @@ Fixes in the [multi-player battle engine](#multi-player-battle-engine) category
|
|||
- [AI makes a false assumption about `CheckTypeMatchup`](#ai-makes-a-false-assumption-about-checktypematchup)
|
||||
- [AI use of Full Heal or Full Restore does not cure Nightmare status](#ai-use-of-full-heal-or-full-restore-does-not-cure-nightmare-status)
|
||||
- [AI use of Full Heal does not cure confusion status](#ai-use-of-full-heal-does-not-cure-confusion-status)
|
||||
- [AI use of Full Heal or Full Restore does not cure Attack or Speed drops from burn or paralysis](#ai-use-of-full-heal-or-full-restore-does-not-cure-attack-or-speed-drops-from-Burn-or-Paralysis)
|
||||
- [AI might use its base reward value as an item](#ai-might-use-its-base-reward-value-as-an-item)
|
||||
- [Wild Pokémon can always Teleport regardless of level difference](#wild-pok%C3%A9mon-can-always-teleport-regardless-of-level-difference)
|
||||
- [`RIVAL2` has lower DVs than `RIVAL1`](#rival2-has-lower-dvs-than-rival1)
|
||||
|
|
@ -1406,6 +1407,7 @@ AI_Cautious:
|
|||
```diff
|
||||
AI_HealStatus:
|
||||
-; BUG: AI use of Full Heal or Full Restore does not cure Nightmare status (see docs/bugs_and_glitches.md)
|
||||
; BUG: AI use of Full Heal or Full Restore does not cure Attack or Speed drops from burn or paralysis (see docs/bugs_and_glitches.md)
|
||||
ld a, [wCurOTMon]
|
||||
ld hl, wOTPartyMon1Status
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
|
|
@ -1441,6 +1443,7 @@ AI_Cautious:
|
|||
```diff
|
||||
AI_HealStatus:
|
||||
; BUG: AI use of Full Heal or Full Restore does not cure Nightmare status (see docs/bugs_and_glitches.md)
|
||||
; BUG: AI use of Full Heal or Full Restore does not cure Attack or Speed drops from burn or paralysis (see docs/bugs_and_glitches.md)
|
||||
ld a, [wCurOTMon]
|
||||
ld hl, wOTPartyMon1Status
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
|
|
@ -1456,6 +1459,27 @@ AI_Cautious:
|
|||
ret
|
||||
```
|
||||
|
||||
### AI use of Full Heal or Full Restore does not cure Attack or Speed drops from burn or paralysis
|
||||
|
||||
**Fix:** Edit `AI_HealStatus` in [engine/battle/ai/items.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/ai/items.asm):
|
||||
|
||||
```diff
|
||||
AI_HealStatus:
|
||||
; BUG: AI use of Full Heal or Full Restore does not cure Nightmare status (see docs/bugs_and_glitches.md)
|
||||
-; BUG: AI use of Full Heal or Full Restore does not cure Attack or Speed drops from burn or paralysis (see docs/bugs_and_glitches.md)
|
||||
ld a, [wCurOTMon]
|
||||
ld hl, wOTPartyMon1Status
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call AddNTimes
|
||||
xor a
|
||||
ld [hl], a
|
||||
ld [wEnemyMonStatus], a
|
||||
ld hl, wEnemySubStatus5
|
||||
res SUBSTATUS_TOXIC, [hl]
|
||||
+ farcall CalcEnemyStats
|
||||
ret
|
||||
```
|
||||
|
||||
### AI might use its base reward value as an item
|
||||
|
||||
In the `AI_TryItem` routine, an item pointer is set to `wEnemyTrainerItem1` and then increments to `wEnemyTrainerItem2` to see if either of the AI's items are in the `AI_Items` list. However, if the AI has used its first item (or its first one is `ITEM_NONE`) and hasn't used its second item, the item pointer can increment from `wEnemyTrainerItem2` to `wEnemyTrainerBaseReward`. If the value at this address then matches an item in the `AI_Items` list, the AI could mistakenly use it.
|
||||
|
|
|
|||
|
|
@ -729,6 +729,7 @@ EnemyUsedFullHealRed: ; unreferenced
|
|||
|
||||
AI_HealStatus:
|
||||
; BUG: AI use of Full Heal or Full Restore does not cure Nightmare status (see docs/bugs_and_glitches.md)
|
||||
; BUG: AI use of Full Heal or Full Restore does not cure Attack or Speed drops from burn or paralysis (see docs/bugs_and_glitches.md)
|
||||
ld a, [wCurOTMon]
|
||||
ld hl, wOTPartyMon1Status
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user