aboutsummaryrefslogtreecommitdiffstats
path: root/engine/events/in_game_trades.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2026-01-17 22:38:33 -0600
committerdannye <33dannye@gmail.com>2026-01-17 22:38:33 -0600
commitbc2354dd6626ce28bb9561547ed2107cfa56c18e (patch)
tree5902d4c3389253c76b7c3351e0d7dfecb551c28d /engine/events/in_game_trades.asm
parentIdentify characters in `_OakSpeechText2B` and `Printer_GetMonStats.IDNo` (#144) (diff)
parentUse macros for `WildMonEncounterSlotChances` (#562) (diff)
downloadpokeyellow-bc2354dd6626ce28bb9561547ed2107cfa56c18e.tar.gz
pokeyellow-bc2354dd6626ce28bb9561547ed2107cfa56c18e.tar.xz
pokeyellow-bc2354dd6626ce28bb9561547ed2107cfa56c18e.zip
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/events/in_game_trades.asm')
-rw-r--r--engine/events/in_game_trades.asm8
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/events/in_game_trades.asm b/engine/events/in_game_trades.asm
index 8c5f4e5c..fab80ada 100644
--- a/engine/events/in_game_trades.asm
+++ b/engine/events/in_game_trades.asm
@@ -106,7 +106,7 @@ InGameTrade_DoTrade:
jr nz, .tradeFailed ; jump if the selected mon's species is not the required one
ld a, [wWhichPokemon]
ld hl, wPartyMon1Level
- ld bc, wPartyMon2 - wPartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
ld a, [hl]
ld [wCurEnemyLevel], a
@@ -178,7 +178,7 @@ InGameTrade_PrepareTradeData:
ld de, wLinkEnemyTrainerName
call InGameTrade_CopyData
ld hl, wPartyMon1OTID
- ld bc, wPartyMon2 - wPartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
ld a, [wWhichPokemon]
call AddNTimes
ld de, wTradedPlayerMonOTID
@@ -211,10 +211,10 @@ InGameTrade_CopyDataToReceivedMon:
ld bc, NAME_LENGTH
call CopyData
ld hl, wPartyMon1OTID
- ld bc, wPartyMon2 - wPartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
call InGameTrade_GetReceivedMonPointer
ld hl, wTradedEnemyMonOTID
- ld bc, $2
+ ld bc, 2
jp CopyData
; the received mon's index is (partyCount - 1),