diff --git a/.gitignore b/.gitignore index 4520aed3..05fc82a8 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,8 @@ *.sg1 .vscode/* + +# nix stuff +.direnv +.envrc +result diff --git a/engine/battle/core.asm b/engine/battle/core.asm index a52f2d37..67c11dd9 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -1986,6 +1986,28 @@ DrawEnemyHUDAndHPBar: lb bc, 4, 12 call ClearScreenArea callfar PlaceEnemyHUDTiles + push hl + ld a, [wIsInBattle] + cp 2 + jr z, .notOwned + ld a, [wEnemyMonSpecies2] + ld [wd11e], a + ld hl, IndexToPokedex + ld b, BANK(IndexToPokedex) + call Bankswitch + ld a, [wd11e] + dec a + ld c, a + ld b, FLAG_TEST + ld hl, wPokedexOwned + predef FlagActionPredef + ld a, c + and a + jr z, .notOwned + coord hl, 1, 1;horizontal/vertical + ld [hl], $D0 ;replace this with your Poké Ball icon or other character +.notOwned + pop hl ld de, wEnemyMonNick hlcoord 1, 0 call CenterMonName diff --git a/engine/battle/effects.asm b/engine/battle/effects.asm index aaaf20d0..d35f3cab 100644 --- a/engine/battle/effects.asm +++ b/engine/battle/effects.asm @@ -544,12 +544,14 @@ StatModifierDownEffect: ld hl, wPlayerMonStatMods ld de, wEnemyMoveEffect ld bc, wPlayerBattleStatus1 - ld a, [wLinkState] - cp LINK_STATE_BATTLING - jr z, .statModifierDownEffect - call BattleRandom - cp 25 percent + 1 ; chance to miss by in regular battle - jp c, MoveMissed + ;; the below code, when uncommented, restores + ;; the ai's 25% miss chance on status moves. + ; ld a, [wLinkState] + ; cp LINK_STATE_BATTLING + ; jr z, .statModifierDownEffect + ; call BattleRandom + ; cp 25 percent + 1 ; chance to miss by in regular battle + ; jp c, MoveMissed .statModifierDownEffect call CheckTargetSubstitute ; can't hit through substitute jp nz, MoveMissed diff --git a/gfx/font/font.png b/gfx/font/font.png index af26395e..f6a75a35 100644 Binary files a/gfx/font/font.png and b/gfx/font/font.png differ