caught icon + ai gets to land status

This commit is contained in:
Thorn Avery 2023-11-14 08:10:40 +11:00
parent 7ddea035df
commit 00efe3c6b4
4 changed files with 35 additions and 6 deletions

5
.gitignore vendored
View file

@ -31,3 +31,8 @@
*.sg1 *.sg1
.vscode/* .vscode/*
# nix stuff
.direnv
.envrc
result

View file

@ -1986,6 +1986,28 @@ DrawEnemyHUDAndHPBar:
lb bc, 4, 12 lb bc, 4, 12
call ClearScreenArea call ClearScreenArea
callfar PlaceEnemyHUDTiles 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 ld de, wEnemyMonNick
hlcoord 1, 0 hlcoord 1, 0
call CenterMonName call CenterMonName

View file

@ -544,12 +544,14 @@ StatModifierDownEffect:
ld hl, wPlayerMonStatMods ld hl, wPlayerMonStatMods
ld de, wEnemyMoveEffect ld de, wEnemyMoveEffect
ld bc, wPlayerBattleStatus1 ld bc, wPlayerBattleStatus1
ld a, [wLinkState] ;; the below code, when uncommented, restores
cp LINK_STATE_BATTLING ;; the ai's 25% miss chance on status moves.
jr z, .statModifierDownEffect ; ld a, [wLinkState]
call BattleRandom ; cp LINK_STATE_BATTLING
cp 25 percent + 1 ; chance to miss by in regular battle ; jr z, .statModifierDownEffect
jp c, MoveMissed ; call BattleRandom
; cp 25 percent + 1 ; chance to miss by in regular battle
; jp c, MoveMissed
.statModifierDownEffect .statModifierDownEffect
call CheckTargetSubstitute ; can't hit through substitute call CheckTargetSubstitute ; can't hit through substitute
jp nz, MoveMissed jp nz, MoveMissed

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB