Skip to content

Commit

Permalink
Hidden Power adjustment part 3
Browse files Browse the repository at this point in the history
Info text, this time
  • Loading branch information
ZoomTen committed Nov 5, 2024
1 parent 3c6a6de commit 1d474c8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 13 deletions.
43 changes: 31 additions & 12 deletions engine/pokemon/types.asm
Original file line number Diff line number Diff line change
Expand Up @@ -120,21 +120,40 @@ HiddenPowerType:
add a
or b

; Skip Normal
inc a

; Skip Bird
cp BIRD
jr c, .done
inc a
; duplicated in ../battle/hidden_power.asm
; Map to vanilla types
ld hl, .VanillaTypeRemapping
; hl <- .VanillaTypeRemapping + a
add l
ld l, a
ld a, h
adc 0
ld h, a
; get the entry
ld a, [hl]

; Skip unused types
cp UNUSED_TYPES
jr c, .done
add UNUSED_TYPES_END - UNUSED_TYPES
.done
ret

.VanillaTypeRemapping:
table_width 1, HiddenPowerType.VanillaTypeRemapping
db FIGHTING
db FLYING
db POISON
db GROUND
db ROCK
db BUG
db GHOST
db STEEL
db FIRE
db WATER
db GRASS
db ELECTRIC
db PSYCHIC_TYPE
db ICE
db DRAGON
db DARK
assert_table_length 16

PrintBattleMoveType:
; Print the type of move b at hl.
push hl
Expand Down
2 changes: 1 addition & 1 deletion main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ INCLUDE "engine/pokemon/switchpartymons.asm"
INCLUDE "engine/gfx/load_pics.asm"
INCLUDE "data/pokemon/base_stats.asm"
INCLUDE "data/pokemon/names.asm"
INCLUDE "data/pokemon/unused_pic_banks.asm"
; INCLUDE "data/pokemon/unused_pic_banks.asm"


SECTION "Crystal Phone Text", ROMX
Expand Down

0 comments on commit 1d474c8

Please sign in to comment.