Fix a bunch of single player battle engine bugs

went through a bunch of the tutorials here;
https://github.com/pret/pokered/wiki/Bugs-and-Glitches#blaine-uses-super-potion-even-when-his-pok%C3%A9mon-arent-below-10-health

Overall:
- Blaine is no longer addicted to Super Potions
- CoolTrainerF no longer switches a lot
- Transformed Pokemon aren't presumed to be Dittos (very important given Animon)
- Status curing items don't remove modifiers anymore
- Learning new moves plays the sound in the correct bank
This commit is contained in:
May Evans 2022-08-31 14:42:36 +01:00
parent cab111d01b
commit 7c6bbb630f
3 changed files with 37 additions and 7 deletions

View file

@ -473,9 +473,7 @@ ItemUseBall:
; Mirror Move even though the only wild Pokémon that knows Transform is Ditto.
ld hl, wEnemyBattleStatus3
bit TRANSFORMED, [hl]
jr z, .notTransformed
ld a, DITTO
ld [wEnemyMonSpecies2], a
jr z, .notTransformed ; removed lines that cause above bug - PvK
jr .skip6
.notTransformed
@ -909,7 +907,10 @@ ItemUseMedicine:
ld de, wBattleMonStats
ld bc, NUM_STATS * 2
call CopyData ; copy party stats to in-battle stat data
predef DoubleOrHalveSelectedStats
xor a
ld [wCalculateWhoseStats], a
callfar CalculateModifiedStats
callfar ApplyBadgeStatBoosts
jp .doneHealing
.healHP
inc hl ; hl = address of current HP