shithub: pokecrystal

Download patch

ref: b805d343f36019ae9fdf5d248d78a0d9b12f25d7
parent: ef9090b9a07b3d727b1508957c76c899bbc39987
parent: 70e6b5947b5cc9ca9fd93c720c7f97d9e018da2d
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Sun Dec 24 12:30:29 EST 2017

Merge branch 'master' of https://github.com/pret/pokecrystal

--- a/battle/core.asm
+++ b/battle/core.asm
@@ -3454,7 +3454,7 @@
 	ld bc, BASE_DATA_SIZE
 	call AddNTimes
 	ld de, EnemyMonType
-	ld bc, 2
+	ld bc, BASE_CATCH_RATE - BASE_TYPES
 	ld a, BANK(BaseData)
 	call FarCopyBytes
 	ld a, [BattleMonType1]
--- a/battle/effect_command_pointers.asm
+++ b/battle/effect_command_pointers.asm
@@ -78,7 +78,7 @@
 	dw BattleCommand_Spite ; 35c0f
 	dw BattleCommand_FalseSwipe ; 35c94
 	dw BattleCommand_HealBell ; 35cc9
-	dw BattleCommand_KingsRock ; 36ac9
+	dw BattleCommand_HeldFlinch ; 36ac9
 	dw BattleCommand_TripleKick ; 346b2
 	dw BattleCommand_KickCounter ; 346cd
 	dw BattleCommand_Thief ; 37492
--- a/battle/effect_commands.asm
+++ b/battle/effect_commands.asm
@@ -3881,11 +3881,11 @@
 	ld de, StringBuffer1
 	call GetMoveData
 
-	ld a, [StringBuffer1 + 2]
+	ld a, [StringBuffer1 + MOVE_POWER]
 	and a
 	ret z
 
-	ld a, [StringBuffer1 + 3]
+	ld a, [StringBuffer1 + MOVE_TYPE]
 	cp SPECIAL
 	ret nc
 
@@ -7184,7 +7184,7 @@
 ; 36ac9
 
 
-BattleCommand_KingsRock: ; 36ac9
+BattleCommand_HeldFlinch: ; 36ac9
 ; kingsrock
 
 	ld a, [AttackMissed]
@@ -7193,7 +7193,7 @@
 
 	call GetUserItem
 	ld a, b
-	cp HELD_TRADE_EVOLVE ; Only King's Rock has this effect
+	cp HELD_FLINCH
 	ret nz
 
 	call CheckSubstituteOpp
--- a/constants/item_constants.asm
+++ b/constants/item_constants.asm
@@ -366,7 +366,7 @@
 	const HELD_ESCAPE
 	const HELD_CRITICAL_UP
 	const HELD_QUICK_CLAW
-	const HELD_TRADE_EVOLVE
+	const HELD_FLINCH
 	const HELD_AMULET_COIN
 	const HELD_BRIGHTPOWDER
 	const HELD_78
--- a/data/items/item_attributes.asm
+++ b/data/items/item_attributes.asm
@@ -170,7 +170,7 @@
 ; POISON BARB
 	item_attribute 100, HELD_POISON_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
 ; KING'S ROCK
-	item_attribute 100, HELD_TRADE_EVOLVE, 30, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+	item_attribute 100, HELD_FLINCH, 30, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
 ; BITTER BERRY
 	item_attribute 10, HELD_HEAL_CONFUSION, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_PARTY
 ; MINT BERRY
--- a/engine/link.asm
+++ b/engine/link.asm
@@ -740,7 +740,7 @@
 	ld hl, BaseData + BASE_TYPES
 	ld bc, BASE_DATA_SIZE
 	call AddNTimes
-	ld bc, 2
+	ld bc, BASE_CATCH_RATE - BASE_TYPES
 	ld a, BANK(BaseData)
 	call FarCopyBytes
 	pop bc
--- a/engine/stats_screen.asm
+++ b/engine/stats_screen.asm
@@ -377,7 +377,7 @@
 	call .PlaceHPBar
 	xor a
 	ld [hBGMapMode], a
-	ld a, [CurBaseData]
+	ld a, [BaseDexNo]
 	ld [wd265], a
 	ld [CurSpecies], a
 	hlcoord 8, 0
@@ -401,7 +401,7 @@
 	hlcoord 9, 4
 	ld a, "/"
 	ld [hli], a
-	ld a, [CurBaseData]
+	ld a, [BaseDexNo]
 	ld [wd265], a
 	call GetPokemonName
 	call PlaceString