mirror of
https://github.com/thornAvery/jep-hack.git
synced 2025-09-17 02:30:50 +12:00
Move type_matchups.asm out of Effect Commands bank to fix size issue
This commit is contained in:
parent
fd7ae97fbd
commit
e59cc2b329
|
@ -1284,6 +1284,11 @@ INCLUDE "data/battle/critical_hit_chances.asm"
|
||||||
|
|
||||||
INCLUDE "engine/battle/move_effects/triple_kick.asm"
|
INCLUDE "engine/battle/move_effects/triple_kick.asm"
|
||||||
|
|
||||||
|
GetNextTypeMatchupsByte:
|
||||||
|
ld a, BANK(TypeMatchups)
|
||||||
|
call GetFarByte
|
||||||
|
ret
|
||||||
|
|
||||||
BattleCommand_Stab:
|
BattleCommand_Stab:
|
||||||
; STAB = Same Type Attack Bonus
|
; STAB = Same Type Attack Bonus
|
||||||
ld a, BATTLE_VARS_MOVE_ANIM
|
ld a, BATTLE_VARS_MOVE_ANIM
|
||||||
|
@ -1368,7 +1373,9 @@ BattleCommand_Stab:
|
||||||
ld hl, TypeMatchups
|
ld hl, TypeMatchups
|
||||||
|
|
||||||
.TypesLoop:
|
.TypesLoop:
|
||||||
ld a, [hli]
|
; ld a, [hli]
|
||||||
|
call GetNextTypeMatchupsByte
|
||||||
|
inc hl
|
||||||
|
|
||||||
cp -1
|
cp -1
|
||||||
jr z, .end
|
jr z, .end
|
||||||
|
@ -1386,7 +1393,8 @@ BattleCommand_Stab:
|
||||||
.SkipForesightCheck:
|
.SkipForesightCheck:
|
||||||
cp b
|
cp b
|
||||||
jr nz, .SkipType
|
jr nz, .SkipType
|
||||||
ld a, [hl]
|
; ld a, [hl]
|
||||||
|
call GetNextTypeMatchupsByte
|
||||||
cp d
|
cp d
|
||||||
jr z, .GotMatchup
|
jr z, .GotMatchup
|
||||||
cp e
|
cp e
|
||||||
|
@ -1491,7 +1499,9 @@ CheckTypeMatchup:
|
||||||
ld [wTypeMatchup], a
|
ld [wTypeMatchup], a
|
||||||
ld hl, TypeMatchups
|
ld hl, TypeMatchups
|
||||||
.TypesLoop:
|
.TypesLoop:
|
||||||
ld a, [hli]
|
; ld a, [hli]
|
||||||
|
call GetNextTypeMatchupsByte
|
||||||
|
inc hl
|
||||||
cp -1
|
cp -1
|
||||||
jr z, .End
|
jr z, .End
|
||||||
cp -2
|
cp -2
|
||||||
|
@ -1505,7 +1515,9 @@ CheckTypeMatchup:
|
||||||
.Next:
|
.Next:
|
||||||
cp d
|
cp d
|
||||||
jr nz, .Nope
|
jr nz, .Nope
|
||||||
ld a, [hli]
|
; ld a, [hli]
|
||||||
|
call GetNextTypeMatchupsByte
|
||||||
|
inc hl
|
||||||
cp b
|
cp b
|
||||||
jr z, .Yup
|
jr z, .Yup
|
||||||
cp c
|
cp c
|
||||||
|
@ -1523,7 +1535,9 @@ CheckTypeMatchup:
|
||||||
ldh [hDividend + 0], a
|
ldh [hDividend + 0], a
|
||||||
ldh [hMultiplicand + 0], a
|
ldh [hMultiplicand + 0], a
|
||||||
ldh [hMultiplicand + 1], a
|
ldh [hMultiplicand + 1], a
|
||||||
ld a, [hli]
|
; ld a, [hli]
|
||||||
|
call GetNextTypeMatchupsByte
|
||||||
|
inc hl
|
||||||
ldh [hMultiplicand + 2], a
|
ldh [hMultiplicand + 2], a
|
||||||
ld a, [wTypeMatchup]
|
ld a, [wTypeMatchup]
|
||||||
ldh [hMultiplier], a
|
ldh [hMultiplier], a
|
||||||
|
@ -1565,7 +1579,7 @@ BattleCommand_ResetTypeMatchup:
|
||||||
|
|
||||||
INCLUDE "engine/battle/ai/switch.asm"
|
INCLUDE "engine/battle/ai/switch.asm"
|
||||||
|
|
||||||
INCLUDE "data/types/type_matchups.asm"
|
;INCLUDE "data/types/type_matchups.asm"
|
||||||
|
|
||||||
BattleCommand_DamageVariation:
|
BattleCommand_DamageVariation:
|
||||||
; Modify the damage spread between 85% and 100%.
|
; Modify the damage spread between 85% and 100%.
|
||||||
|
|
|
@ -630,15 +630,6 @@ INCLUDE "data/tilesets/lushcave_collision.asm"
|
||||||
TilesetLushCaveAttr::
|
TilesetLushCaveAttr::
|
||||||
INCBIN "data/tilesets/lushcave_attributes.bin"
|
INCBIN "data/tilesets/lushcave_attributes.bin"
|
||||||
|
|
||||||
TilesetPlayersRoomGFX::
|
|
||||||
INCBIN "gfx/tilesets/players_room.2bpp.lz"
|
|
||||||
|
|
||||||
TilesetPlayersRoomMeta::
|
|
||||||
INCBIN "data/tilesets/players_room_metatiles.bin"
|
|
||||||
|
|
||||||
TilesetPlayersRoomColl::
|
|
||||||
INCLUDE "data/tilesets/players_room_collision.asm"
|
|
||||||
|
|
||||||
; there should be space here, lavender crypt's set is just big
|
; there should be space here, lavender crypt's set is just big
|
||||||
|
|
||||||
SECTION "Tileset Data 16", ROMX
|
SECTION "Tileset Data 16", ROMX
|
||||||
|
|
5
main.asm
5
main.asm
|
@ -149,6 +149,11 @@ SECTION "Effect Commands", ROMX
|
||||||
INCLUDE "engine/battle/effect_commands.asm"
|
INCLUDE "engine/battle/effect_commands.asm"
|
||||||
|
|
||||||
|
|
||||||
|
SECTION "Type Matchups", ROMX
|
||||||
|
|
||||||
|
INCLUDE "data/types/type_matchups.asm"
|
||||||
|
|
||||||
|
|
||||||
SECTION "Enemy Trainers", ROMX
|
SECTION "Enemy Trainers", ROMX
|
||||||
|
|
||||||
INCLUDE "engine/battle/ai/items.asm"
|
INCLUDE "engine/battle/ai/items.asm"
|
||||||
|
|
Loading…
Reference in a new issue