From b565e6a9dc5f54fad37f750ae546e2334a6c66e5 Mon Sep 17 00:00:00 2001 From: Rangi Date: Wed, 4 Jul 2018 02:42:11 -0400 Subject: Miscellaneous reorganization fixes --- data/battle/critical_hit_chances.asm | 8 ++++++++ data/battle/critical_hits.asm | 18 ------------------ data/battle/metronome_exception_moves.asm | 17 ----------------- data/moves/critical_hit_moves.asm | 9 +++++++++ data/moves/metronome_exception_moves.asm | 17 +++++++++++++++++ engine/battle/effect_commands.asm | 4 +++- engine/battle/move_effects/metronome.asm | 2 +- engine/battle/start_battle.asm | 2 +- home/map.asm | 2 +- 9 files changed, 40 insertions(+), 39 deletions(-) create mode 100644 data/battle/critical_hit_chances.asm delete mode 100644 data/battle/critical_hits.asm delete mode 100644 data/battle/metronome_exception_moves.asm create mode 100644 data/moves/critical_hit_moves.asm create mode 100644 data/moves/metronome_exception_moves.asm diff --git a/data/battle/critical_hit_chances.asm b/data/battle/critical_hit_chances.asm new file mode 100644 index 000000000..0128f1a1e --- /dev/null +++ b/data/battle/critical_hit_chances.asm @@ -0,0 +1,8 @@ +CriticalHitChances: + db 7 percent ; 0 + db 12 percent + 2 ; +1 + db 25 percent + 1 ; +2 + db 33 percent + 1 ; +3 + db 50 percent + 1 ; +4 + db 50 percent + 1 ; +5 + db 50 percent + 1 ; +6 diff --git a/data/battle/critical_hits.asm b/data/battle/critical_hits.asm deleted file mode 100644 index 5800d57f4..000000000 --- a/data/battle/critical_hits.asm +++ /dev/null @@ -1,18 +0,0 @@ -CriticalHitMoves: - db KARATE_CHOP - db RAZOR_WIND - db RAZOR_LEAF - db CRABHAMMER - db SLASH - db AEROBLAST - db CROSS_CHOP - db -1 - -CriticalHitChances: - db 7 percent ; 0 - db 12 percent + 2 ; +1 - db 25 percent + 1 ; +2 - db 33 percent + 1 ; +3 - db 50 percent + 1 ; +4 - db 50 percent + 1 ; +5 - db 50 percent + 1 ; +6 diff --git a/data/battle/metronome_exception_moves.asm b/data/battle/metronome_exception_moves.asm deleted file mode 100644 index a5aa44132..000000000 --- a/data/battle/metronome_exception_moves.asm +++ /dev/null @@ -1,17 +0,0 @@ -; Metronome cannot turn into these moves. - -MetronomeExcepts: - db NO_MOVE - db METRONOME - db STRUGGLE - db SKETCH - db MIMIC - db COUNTER - db MIRROR_COAT - db PROTECT - db DETECT - db ENDURE - db DESTINY_BOND - db SLEEP_TALK - db THIEF - db -1 diff --git a/data/moves/critical_hit_moves.asm b/data/moves/critical_hit_moves.asm new file mode 100644 index 000000000..4a4730574 --- /dev/null +++ b/data/moves/critical_hit_moves.asm @@ -0,0 +1,9 @@ +CriticalHitMoves: + db KARATE_CHOP + db RAZOR_WIND + db RAZOR_LEAF + db CRABHAMMER + db SLASH + db AEROBLAST + db CROSS_CHOP + db -1 diff --git a/data/moves/metronome_exception_moves.asm b/data/moves/metronome_exception_moves.asm new file mode 100644 index 000000000..a5aa44132 --- /dev/null +++ b/data/moves/metronome_exception_moves.asm @@ -0,0 +1,17 @@ +; Metronome cannot turn into these moves. + +MetronomeExcepts: + db NO_MOVE + db METRONOME + db STRUGGLE + db SKETCH + db MIMIC + db COUNTER + db MIRROR_COAT + db PROTECT + db DETECT + db ENDURE + db DESTINY_BOND + db SLEEP_TALK + db THIEF + db -1 diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index 3e6d928d2..eb30af88b 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -1210,7 +1210,9 @@ BattleCommand_Critical: ld [wCriticalHit], a ret -INCLUDE "data/battle/critical_hits.asm" +INCLUDE "data/moves/critical_hit_moves.asm" + +INCLUDE "data/battle/critical_hit_chances.asm" INCLUDE "engine/battle/move_effects/triple_kick.asm" diff --git a/engine/battle/move_effects/metronome.asm b/engine/battle/move_effects/metronome.asm index b8a6b586f..25197d7cd 100644 --- a/engine/battle/move_effects/metronome.asm +++ b/engine/battle/move_effects/metronome.asm @@ -40,4 +40,4 @@ BattleCommand_Metronome: call UpdateMoveData jp ResetTurn -INCLUDE "data/battle/metronome_exception_moves.asm" +INCLUDE "data/moves/metronome_exception_moves.asm" diff --git a/engine/battle/start_battle.asm b/engine/battle/start_battle.asm index 5c2a633a8..f5fc4a6b0 100644 --- a/engine/battle/start_battle.asm +++ b/engine/battle/start_battle.asm @@ -16,7 +16,7 @@ FindFirstAliveMonAndStartBattle: xor a ld [hMapAnims], a call DelayFrame - ld b, 6 + ld b, PARTY_LENGTH ld hl, wPartyMon1HP ld de, PARTYMON_STRUCT_LENGTH - 1 diff --git a/home/map.asm b/home/map.asm index 550486081..a38b791fb 100644 --- a/home/map.asm +++ b/home/map.asm @@ -1176,7 +1176,7 @@ ScrollMapUp:: ld l, a ld a, [wBGMapAnchor + 1] ld h, a - ld bc, $0200 + ld bc, BG_MAP_WIDTH tiles add hl, bc ; cap d at HIGH(vBGMap0) ld a, h -- cgit v1.2.3