shithub: pokecrystal

Download patch

ref: b565e6a9dc5f54fad37f750ae546e2334a6c66e5
parent: 89c2646ccaa2c9a0afb358c1d9738e9bb0d42c97
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Tue Jul 3 22:42:11 EDT 2018

Miscellaneous reorganization fixes

--- /dev/null
+++ b/data/battle/critical_hit_chances.asm
@@ -1,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
--- a/data/battle/critical_hits.asm
+++ /dev/null
@@ -1,18 +1,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
--- a/data/battle/metronome_exception_moves.asm
+++ /dev/null
@@ -1,17 +1,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
--- /dev/null
+++ b/data/moves/critical_hit_moves.asm
@@ -1,0 +1,9 @@
+CriticalHitMoves:
+	db KARATE_CHOP
+	db RAZOR_WIND
+	db RAZOR_LEAF
+	db CRABHAMMER
+	db SLASH
+	db AEROBLAST
+	db CROSS_CHOP
+	db -1
--- /dev/null
+++ b/data/moves/metronome_exception_moves.asm
@@ -1,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
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -1210,7 +1210,9 @@
 	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"
 
--- a/engine/battle/move_effects/metronome.asm
+++ b/engine/battle/move_effects/metronome.asm
@@ -40,4 +40,4 @@
 	call UpdateMoveData
 	jp ResetTurn
 
-INCLUDE "data/battle/metronome_exception_moves.asm"
+INCLUDE "data/moves/metronome_exception_moves.asm"
--- a/engine/battle/start_battle.asm
+++ b/engine/battle/start_battle.asm
@@ -16,7 +16,7 @@
 	xor a
 	ld [hMapAnims], a
 	call DelayFrame
-	ld b, 6
+	ld b, PARTY_LENGTH
 	ld hl, wPartyMon1HP
 	ld de, PARTYMON_STRUCT_LENGTH - 1
 
--- a/home/map.asm
+++ b/home/map.asm
@@ -1176,7 +1176,7 @@
 	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