shithub: pokecrystal

Download patch

ref: cf7eec3bdeeaa9ace0bba7db87c0c71bd48915ba
parent: 08ddbe843b6d29c0901ff5f0862cbb5a57b557d7
parent: 15015e48779386ae01fe3b3a07a0b776f9933f60
author: yenatch <yenatch@gmail.com>
date: Tue Dec 5 19:06:11 EST 2017

Merge pull request #404 from surskitty/master

De-Magic-Numbers the Rocket Grunts

--- a/constants/trainer_constants.asm
+++ b/constants/trainer_constants.asm
@@ -241,6 +241,37 @@
 	const MILLER
 
 	trainerclass GRUNTM ; 1f
+	const GRUNTM_1
+	const GRUNTM_2
+	const GRUNTM_3
+	const GRUNTM_4
+	const GRUNTM_5
+	const GRUNTM_6
+	const GRUNTM_7
+	const GRUNTM_8
+	const GRUNTM_9
+	const GRUNTM_10
+	const GRUNTM_11
+	const GRUNTM_12
+	const GRUNTM_13
+	const GRUNTM_14
+	const GRUNTM_15
+	const GRUNTM_16
+	const GRUNTM_17
+	const GRUNTM_18
+	const GRUNTM_19
+	const GRUNTM_20
+	const GRUNTM_21
+	const GRUNTM_22
+	const GRUNTM_23
+	const GRUNTM_24
+	const GRUNTM_25
+	const GRUNTM_26
+	const GRUNTM_27
+	const GRUNTM_28
+	const GRUNTM_29
+	const GRUNTM_30
+	const GRUNTM_31
 
 	trainerclass GENTLEMAN ; 20
 	const PRESTON
@@ -611,6 +642,12 @@
 	const DIRK
 
 	trainerclass GRUNTF ; 42
+	const GRUNTF_1
+	const GRUNTF_2
+	const GRUNTF_3
+	const GRUNTF_4
+	const GRUNTF_5
+
 
 	trainerclass MYSTICALMAN ; 43
 	const EUSINE
--- a/maps/FightingDojo.asm
+++ b/maps/FightingDojo.asm
@@ -9,19 +9,19 @@
 .MapCallbacks:
 	db 0
 
-BlackBeltScript_0x189b61:
-	jumptextfaceplayer UnknownText_0x189b6c
+FightingDojoBlackBelt:
+	jumptextfaceplayer FightingDojoBlackBeltText
 
 MapFightingDojoSignpost0Script:
-	jumptext UnknownText_0x189bc0
+	jumptext FightingDojoSign0Text
 
 MapFightingDojoSignpost1Script:
-	jumptext UnknownText_0x189be0
+	jumptext FightingDojoSign1Text
 
 FightingDojoFocusBand:
 	itemball FOCUS_BAND
 
-UnknownText_0x189b6c:
+FightingDojoBlackBeltText:
 	text "Hello!"
 
 	para "KARATE KING, the"
@@ -32,12 +32,12 @@
 	cont "training."
 	done
 
-UnknownText_0x189bc0:
+FightingDojoSign0Text:
 	text "What goes around"
 	line "comes around!"
 	done
 
-UnknownText_0x189be0:
+FightingDojoSign1Text:
 	text "Enemies on every"
 	line "side!"
 	done
@@ -61,5 +61,5 @@
 
 .PersonEvents:
 	db 2
-	person_event SPRITE_BLACK_BELT, 4, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, BlackBeltScript_0x189b61, -1
+	person_event SPRITE_BLACK_BELT, 4, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, FightingDojoBlackBelt, -1
 	person_event SPRITE_POKE_BALL, 1, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, FightingDojoFocusBand, EVENT_PICKED_UP_FOCUS_BAND
--- a/maps/RadioTower1F.asm
+++ b/maps/RadioTower1F.asm
@@ -186,7 +186,7 @@
 	jumptextfaceplayer UnknownText_0x5d4ac
 
 TrainerGruntM3:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_3, GRUNTM, 3, GruntM3SeenText, GruntM3BeatenText, 0, GruntM3Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_3, GRUNTM, GRUNTM_3, GruntM3SeenText, GruntM3BeatenText, 0, GruntM3Script
 
 GruntM3Script:
 	end_if_just_battled
--- a/maps/RadioTower2F.asm
+++ b/maps/RadioTower2F.asm
@@ -55,7 +55,7 @@
 	jumptextfaceplayer UnknownText_0x5da44
 
 TrainerGruntM4:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_4, GRUNTM, 4, GruntM4SeenText, GruntM4BeatenText, 0, GruntM4Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_4, GRUNTM, GRUNTM_4, GruntM4SeenText, GruntM4BeatenText, 0, GruntM4Script
 
 GruntM4Script:
 	end_if_just_battled
@@ -66,7 +66,7 @@
 	end
 
 TrainerGruntM5:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_5, GRUNTM, 5, GruntM5SeenText, GruntM5BeatenText, 0, GruntM5Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_5, GRUNTM, GRUNTM_5, GruntM5SeenText, GruntM5BeatenText, 0, GruntM5Script
 
 GruntM5Script:
 	end_if_just_battled
@@ -77,7 +77,7 @@
 	end
 
 TrainerGruntM6:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_6, GRUNTM, 6, GruntM6SeenText, GruntM6BeatenText, 0, GruntM6Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_6, GRUNTM, GRUNTM_6, GruntM6SeenText, GruntM6BeatenText, 0, GruntM6Script
 
 GruntM6Script:
 	end_if_just_battled
@@ -88,7 +88,7 @@
 	end
 
 TrainerGruntF2:
-	trainer EVENT_BEAT_ROCKET_GRUNTF_2, GRUNTF, 2, GruntF2SeenText, GruntF2BeatenText, 0, GruntF2Script
+	trainer EVENT_BEAT_ROCKET_GRUNTF_2, GRUNTF, GRUNTF_2, GruntF2SeenText, GruntF2BeatenText, 0, GruntF2Script
 
 GruntF2Script:
 	end_if_just_battled
--- a/maps/RadioTower3F.asm
+++ b/maps/RadioTower3F.asm
@@ -86,7 +86,7 @@
 	end
 
 TrainerGruntM7:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_7, GRUNTM, 7, GruntM7SeenText, GruntM7BeatenText, 0, GruntM7Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_7, GRUNTM, GRUNTM_7, GruntM7SeenText, GruntM7BeatenText, 0, GruntM7Script
 
 GruntM7Script:
 	end_if_just_battled
@@ -97,7 +97,7 @@
 	end
 
 TrainerGruntM8:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_8, GRUNTM, 8, GruntM8SeenText, GruntM8BeatenText, 0, GruntM8Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_8, GRUNTM, GRUNTM_8, GruntM8SeenText, GruntM8BeatenText, 0, GruntM8Script
 
 GruntM8Script:
 	end_if_just_battled
@@ -108,7 +108,7 @@
 	end
 
 TrainerGruntM9:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_9, GRUNTM, 9, GruntM9SeenText, GruntM9BeatenText, 0, GruntM9Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_9, GRUNTM, GRUNTM_9, GruntM9SeenText, GruntM9BeatenText, 0, GruntM9Script
 
 GruntM9Script:
 	end_if_just_battled
--- a/maps/RadioTower4F.asm
+++ b/maps/RadioTower4F.asm
@@ -56,7 +56,7 @@
 	end
 
 TrainerGruntM10:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_10, GRUNTM, 10, GruntM10SeenText, GruntM10BeatenText, 0, GruntM10Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_10, GRUNTM, GRUNTM_10, GruntM10SeenText, GruntM10BeatenText, 0, GruntM10Script
 
 GruntM10Script:
 	end_if_just_battled
@@ -78,7 +78,7 @@
 	end
 
 TrainerGruntF4:
-	trainer EVENT_BEAT_ROCKET_GRUNTF_4, GRUNTF, 4, GruntF4SeenText, GruntF4BeatenText, 0, GruntF4Script
+	trainer EVENT_BEAT_ROCKET_GRUNTF_4, GRUNTF, GRUNTF_4, GruntF4SeenText, GruntF4BeatenText, 0, GruntF4Script
 
 GruntF4Script:
 	end_if_just_battled
--- a/maps/Route24.asm
+++ b/maps/Route24.asm
@@ -16,7 +16,7 @@
 	waitbutton
 	closetext
 	winlosstext UnknownText_0x1add67, -1
-	loadtrainer GRUNTM, 31
+	loadtrainer GRUNTM, GRUNTM_31
 	startbattle
 	dontrestartmapmusic
 	reloadmapafterbattle
--- a/maps/SlowpokeWellB1F.asm
+++ b/maps/SlowpokeWellB1F.asm
@@ -20,7 +20,7 @@
 	jumptextfaceplayer UnknownText_0x5a6b5
 
 TrainerGruntM29:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_29, GRUNTM, 29, GruntM29SeenText, GruntM29BeatenText, 0, GruntM29Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_29, GRUNTM, GRUNTM_29, GruntM29SeenText, GruntM29BeatenText, 0, GruntM29Script
 
 GruntM29Script:
 	end_if_just_battled
@@ -31,7 +31,7 @@
 	end
 
 TrainerGruntM1:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_1, GRUNTM, 1, GruntM1SeenText, GruntM1BeatenText, 0, GruntM1Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_1, GRUNTM, GRUNTM_1, GruntM1SeenText, GruntM1BeatenText, 0, GruntM1Script
 
 GruntM1Script:
 	opentext
@@ -74,7 +74,7 @@
 	end
 
 TrainerGruntM2:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_2, GRUNTM, 2, GruntM2SeenText, GruntM2BeatenText, 0, GruntM2Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_2, GRUNTM, GRUNTM_2, GruntM2SeenText, GruntM2BeatenText, 0, GruntM2Script
 
 GruntM2Script:
 	end_if_just_battled
@@ -85,7 +85,7 @@
 	end
 
 TrainerGruntF1:
-	trainer EVENT_BEAT_ROCKET_GRUNTF_1, GRUNTF, 1, GruntF1SeenText, GruntF1BeatenText, 0, GruntF1Script
+	trainer EVENT_BEAT_ROCKET_GRUNTF_1, GRUNTF, GRUNTF_1, GruntF1SeenText, GruntF1BeatenText, 0, GruntF1Script
 
 GruntF1Script:
 	end_if_just_battled
--- a/maps/TeamRocketBaseB1F.asm
+++ b/maps/TeamRocketBaseB1F.asm
@@ -243,7 +243,7 @@
 	closetext
 	winlosstext CameraGrunt1BeatenText, 0
 	setlasttalked TEAMROCKETBASEB1F_ROCKET1
-	loadtrainer GRUNTM, 20
+	loadtrainer GRUNTM, GRUNTM_20
 	startbattle
 	disappear TEAMROCKETBASEB1F_ROCKET1
 	reloadmapafterbattle
@@ -256,7 +256,7 @@
 	closetext
 	winlosstext CameraGrunt2BeatenText, 0
 	setlasttalked TEAMROCKETBASEB1F_ROCKET1
-	loadtrainer GRUNTM, 21
+	loadtrainer GRUNTM, GRUNTM_21
 	startbattle
 	disappear TEAMROCKETBASEB1F_ROCKET1
 	reloadmapafterbattle
@@ -497,7 +497,7 @@
 	end
 
 TrainerGruntM16:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_16, GRUNTM, 16, GruntM16SeenText, GruntM16BeatenText, 0, GruntM16Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_16, GRUNTM, GRUNTM_16, GruntM16SeenText, GruntM16BeatenText, 0, GruntM16Script
 
 GruntM16Script:
 	end_if_just_battled
--- a/maps/TeamRocketBaseB2F.asm
+++ b/maps/TeamRocketBaseB2F.asm
@@ -194,7 +194,7 @@
 	end
 
 TrainerGruntM17:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_17, GRUNTM, 17, GruntM17SeenText, GruntM17BeatenText, 0, GruntM17Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_17, GRUNTM, GRUNTM_17, GruntM17SeenText, GruntM17BeatenText, 0, GruntM17Script
 
 GruntM17Script:
 	end_if_just_battled
@@ -205,7 +205,7 @@
 	end
 
 TrainerGruntM18:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_18, GRUNTM, 18, GruntM18SeenText, GruntM18BeatenText, 0, GruntM18Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_18, GRUNTM, GRUNTM_18, GruntM18SeenText, GruntM18BeatenText, 0, GruntM18Script
 
 GruntM18Script:
 	end_if_just_battled
@@ -216,7 +216,7 @@
 	end
 
 TrainerGruntM19:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_19, GRUNTM, 19, GruntM19SeenText, GruntM19BeatenText, 0, GruntM19Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_19, GRUNTM, GRUNTM_19, GruntM19SeenText, GruntM19BeatenText, 0, GruntM19Script
 
 GruntM19Script:
 	end_if_just_battled
--- a/maps/TeamRocketBaseB3F.asm
+++ b/maps/TeamRocketBaseB3F.asm
@@ -133,7 +133,7 @@
 	end
 
 SlowpokeTailGrunt:
-	trainer EVENT_BEAT_ROCKET_GRUNTF_5, GRUNTF, 5, GruntF5SeenText, GruntF5BeatenText, 0, GruntF5Script
+	trainer EVENT_BEAT_ROCKET_GRUNTF_5, GRUNTF, GRUNTF_5, GruntF5SeenText, GruntF5BeatenText, 0, GruntF5Script
 
 GruntF5Script:
 	end_if_just_battled
@@ -145,7 +145,7 @@
 	end
 
 RaticateTailGrunt:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_28, GRUNTM, 28, GruntM28SeenText, GruntM28BeatenText, 0, GruntM28Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_28, GRUNTM, GRUNTM_28, GruntM28SeenText, GruntM28BeatenText, 0, GruntM28Script
 
 GruntM28Script:
 	end_if_just_battled
--- a/maps/UndergroundPathSwitchRoomEntrances.asm
+++ b/maps/UndergroundPathSwitchRoomEntrances.asm
@@ -211,7 +211,7 @@
 	end
 
 TrainerGruntM11:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_11, GRUNTM, 11, GruntM11SeenText, GruntM11BeatenText, 0, GruntM11Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_11, GRUNTM, GRUNTM_11, GruntM11SeenText, GruntM11BeatenText, 0, GruntM11Script
 
 GruntM11Script:
 	end_if_just_battled
@@ -222,7 +222,7 @@
 	end
 
 TrainerGruntM25:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_25, GRUNTM, 25, GruntM25SeenText, GruntM25BeatenText, 0, GruntM25Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_25, GRUNTM, GRUNTM_25, GruntM25SeenText, GruntM25BeatenText, 0, GruntM25Script
 
 GruntM25Script:
 	end_if_just_battled
@@ -255,7 +255,7 @@
 	end
 
 TrainerGruntM13:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_13, GRUNTM, 13, GruntM13SeenText, GruntM13BeatenText, 0, GruntM13Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_13, GRUNTM, GRUNTM_13, GruntM13SeenText, GruntM13BeatenText, 0, GruntM13Script
 
 GruntM13Script:
 	end_if_just_battled
@@ -266,7 +266,7 @@
 	end
 
 TrainerGruntF3:
-	trainer EVENT_BEAT_ROCKET_GRUNTF_3, GRUNTF, 3, GruntF3SeenText, GruntF3BeatenText, 0, GruntF3Script
+	trainer EVENT_BEAT_ROCKET_GRUNTF_3, GRUNTF, GRUNTF_3, GruntF3SeenText, GruntF3BeatenText, 0, GruntF3Script
 
 GruntF3Script:
 	end_if_just_battled
--- a/maps/UndergroundWarehouse.asm
+++ b/maps/UndergroundWarehouse.asm
@@ -39,7 +39,7 @@
 	return
 
 TrainerGruntM24:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_24, GRUNTM, 24, GruntM24SeenText, GruntM24BeatenText, 0, GruntM24Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_24, GRUNTM, GRUNTM_24, GruntM24SeenText, GruntM24BeatenText, 0, GruntM24Script
 
 GruntM24Script:
 	end_if_just_battled
@@ -50,7 +50,7 @@
 	end
 
 TrainerGruntM14:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_14, GRUNTM, 14, GruntM14SeenText, GruntM14BeatenText, 0, GruntM14Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_14, GRUNTM, GRUNTM_14, GruntM14SeenText, GruntM14BeatenText, 0, GruntM14Script
 
 GruntM14Script:
 	end_if_just_battled
@@ -61,7 +61,7 @@
 	end
 
 TrainerGruntM15:
-	trainer EVENT_BEAT_ROCKET_GRUNTM_15, GRUNTM, 15, GruntM15SeenText, GruntM15BeatenText, 0, GruntM15Script
+	trainer EVENT_BEAT_ROCKET_GRUNTM_15, GRUNTM, GRUNTM_15, GruntM15SeenText, GruntM15BeatenText, 0, GruntM15Script
 
 GruntM15Script:
 	end_if_just_battled