Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 00efe3c

Browse files
committedNov 13, 2023
caught icon + ai gets to land status
1 parent 7ddea03 commit 00efe3c

File tree

4 files changed

+35
-6
lines changed

4 files changed

+35
-6
lines changed
 

‎.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,8 @@
3131
*.sg1
3232

3333
.vscode/*
34+
35+
# nix stuff
36+
.direnv
37+
.envrc
38+
result

‎engine/battle/core.asm

+22
Original file line numberDiff line numberDiff line change
@@ -1986,6 +1986,28 @@ DrawEnemyHUDAndHPBar:
19861986
lb bc, 4, 12
19871987
call ClearScreenArea
19881988
callfar PlaceEnemyHUDTiles
1989+
push hl
1990+
ld a, [wIsInBattle]
1991+
cp 2
1992+
jr z, .notOwned
1993+
ld a, [wEnemyMonSpecies2]
1994+
ld [wd11e], a
1995+
ld hl, IndexToPokedex
1996+
ld b, BANK(IndexToPokedex)
1997+
call Bankswitch
1998+
ld a, [wd11e]
1999+
dec a
2000+
ld c, a
2001+
ld b, FLAG_TEST
2002+
ld hl, wPokedexOwned
2003+
predef FlagActionPredef
2004+
ld a, c
2005+
and a
2006+
jr z, .notOwned
2007+
coord hl, 1, 1;horizontal/vertical
2008+
ld [hl], $D0 ;replace this with your Poké Ball icon or other character
2009+
.notOwned
2010+
pop hl
19892011
ld de, wEnemyMonNick
19902012
hlcoord 1, 0
19912013
call CenterMonName

‎engine/battle/effects.asm

+8-6
Original file line numberDiff line numberDiff line change
@@ -544,12 +544,14 @@ StatModifierDownEffect:
544544
ld hl, wPlayerMonStatMods
545545
ld de, wEnemyMoveEffect
546546
ld bc, wPlayerBattleStatus1
547-
ld a, [wLinkState]
548-
cp LINK_STATE_BATTLING
549-
jr z, .statModifierDownEffect
550-
call BattleRandom
551-
cp 25 percent + 1 ; chance to miss by in regular battle
552-
jp c, MoveMissed
547+
;; the below code, when uncommented, restores
548+
;; the ai's 25% miss chance on status moves.
549+
; ld a, [wLinkState]
550+
; cp LINK_STATE_BATTLING
551+
; jr z, .statModifierDownEffect
552+
; call BattleRandom
553+
; cp 25 percent + 1 ; chance to miss by in regular battle
554+
; jp c, MoveMissed
553555
.statModifierDownEffect
554556
call CheckTargetSubstitute ; can't hit through substitute
555557
jp nz, MoveMissed

‎gfx/font/font.png

560 Bytes
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.