mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-16 10:23:34 +12:00
caught icon + ai gets to land status
This commit is contained in:
parent
7ddea035df
commit
00efe3c6b4
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -31,3 +31,8 @@
|
|||
*.sg1
|
||||
|
||||
.vscode/*
|
||||
|
||||
# nix stuff
|
||||
.direnv
|
||||
.envrc
|
||||
result
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.3 KiB |
Loading…
Reference in a new issue