shithub: pokered

Download patch

ref: 8c83ebe9663ef317c8bd3b74339047bda29be1a4
parent: b9a113a9f4712771e37313a4c8a76f7ef23cebb2
author: Rangi <[email protected]>
date: Thu Jul 16 05:32:09 EDT 2020

Define constants for in-game trades

--- a/constants/script_constants.asm
+++ b/constants/script_constants.asm
@@ -12,6 +12,19 @@
 SLOTSBIRD   EQU $1210
 SLOTSMOUSE  EQU $1614
 
+; in game trades
+	const_def
+	const TRADE_FOR_TERRY
+	const TRADE_FOR_MARCEL
+	const TRADE_FOR_CHIKUCHIKU
+	const TRADE_FOR_SAILOR
+	const TRADE_FOR_DUX
+	const TRADE_FOR_MARC
+	const TRADE_FOR_LOLA
+	const TRADE_FOR_DORIS
+	const TRADE_FOR_CRINKLES
+	const TRADE_FOR_SPOT
+
 ; in game trade dialog sets
 	const_def
 	const TRADE_DIALOGSET_CASUAL
--- a/scripts/CeruleanTradeHouse.asm
+++ b/scripts/CeruleanTradeHouse.asm
@@ -11,7 +11,7 @@
 
 CeruleanHouse1Text2:
 	text_asm
-	ld a, $6
+	ld a, TRADE_FOR_LOLA
 	ld [wWhichTrade], a
 	predef DoInGameTradeDialogue
 	jp TextScriptEnd
--- a/scripts/CinnabarLabFossilRoom.asm
+++ b/scripts/CinnabarLabFossilRoom.asm
@@ -100,7 +100,7 @@
 
 Lab4Text2:
 	text_asm
-	ld a, $3
+	ld a, TRADE_FOR_SAILOR
 	ld [wWhichTrade], a
 	predef DoInGameTradeDialogue
 	jp TextScriptEnd
--- a/scripts/CinnabarLabTradeRoom.asm
+++ b/scripts/CinnabarLabTradeRoom.asm
@@ -12,13 +12,13 @@
 
 Lab2Text2:
 	text_asm
-	ld a, $7
+	ld a, TRADE_FOR_DORIS
 	ld [wWhichTrade], a
 	jr Lab2DoTrade
 
 Lab2Text3:
 	text_asm
-	ld a, $8
+	ld a, TRADE_FOR_CRINKLES
 	ld [wWhichTrade], a
 Lab2DoTrade:
 	predef DoInGameTradeDialogue
--- a/scripts/Route11Gate2F.asm
+++ b/scripts/Route11Gate2F.asm
@@ -9,7 +9,7 @@
 
 Route11GateUpstairsText1:
 	text_asm
-	xor a
+	xor a ; TRADE_FOR_TERRY
 	ld [wWhichTrade], a
 	predef DoInGameTradeDialogue
 Route11GateUpstairsScriptEnd:
--- a/scripts/Route18Gate2F.asm
+++ b/scripts/Route18Gate2F.asm
@@ -8,7 +8,7 @@
 
 Route18GateUpstairsText1:
 	text_asm
-	ld a, $5
+	ld a, TRADE_FOR_MARC
 	ld [wWhichTrade], a
 	predef DoInGameTradeDialogue
 	jp TextScriptEnd
--- a/scripts/Route2TradeHouse.asm
+++ b/scripts/Route2TradeHouse.asm
@@ -11,7 +11,7 @@
 
 Route2HouseText2:
 	text_asm
-	ld a, $1
+	ld a, TRADE_FOR_MARCEL
 	ld [wWhichTrade], a
 	predef DoInGameTradeDialogue
 	jp TextScriptEnd
--- a/scripts/UndergroundPathRoute5.asm
+++ b/scripts/UndergroundPathRoute5.asm
@@ -11,7 +11,7 @@
 
 UndergroundPathEntranceRoute5Text1:
 	text_asm
-	ld a, $9
+	ld a, TRADE_FOR_SPOT
 	ld [wWhichTrade], a
 	predef DoInGameTradeDialogue
 	ld hl, UndergroundPathEntranceRoute5_TextScriptEndingText
--- a/scripts/VermilionTradeHouse.asm
+++ b/scripts/VermilionTradeHouse.asm
@@ -6,7 +6,7 @@
 
 VermilionHouse3Text1:
 	text_asm
-	ld a, $4
+	ld a, TRADE_FOR_DUX
 	ld [wWhichTrade], a
 	predef DoInGameTradeDialogue
 	jp TextScriptEnd