Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename MON_ID to MON_OT_ID #1114

Merged
merged 4 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion constants/pokemon_data_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ rsreset
DEF MON_SPECIES rb
DEF MON_ITEM rb
DEF MON_MOVES rb NUM_MOVES
DEF MON_ID rw
DEF MON_TRAINER_ID rw
DEF MON_EXP rb 3
DEF MON_STAT_EXP rw NUM_EXP_STATS
rsset MON_STAT_EXP
Expand Down
10 changes: 5 additions & 5 deletions engine/battle/core.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3864,9 +3864,9 @@ InitBattleMon:
ld a, MON_SPECIES
call GetPartyParamLocation
ld de, wBattleMonSpecies
ld bc, MON_ID
ld bc, MON_TRAINER_ID
call CopyBytes
ld bc, MON_DVS - MON_ID
ld bc, MON_DVS - MON_TRAINER_ID
add hl, bc
ld de, wBattleMonDVs
ld bc, MON_POKERUS - MON_DVS
Expand Down Expand Up @@ -3950,9 +3950,9 @@ InitEnemyMon:
ld hl, wOTPartyMon1Species
call GetPartyLocation
ld de, wEnemyMonSpecies
ld bc, MON_ID
ld bc, MON_TRAINER_ID
call CopyBytes
ld bc, MON_DVS - MON_ID
ld bc, MON_DVS - MON_TRAINER_ID
add hl, bc
ld de, wEnemyMonDVs
ld bc, MON_POKERUS - MON_DVS
Expand Down Expand Up @@ -7074,7 +7074,7 @@ GiveExperiencePoints:
call Divide
; Boost Experience for traded Pokemon
pop bc
ld hl, MON_ID
ld hl, MON_TRAINER_ID
add hl, bc
ld a, [wPlayerID]
cp [hl]
Expand Down
4 changes: 2 additions & 2 deletions engine/battle/effect_commands.asm
Original file line number Diff line number Diff line change
Expand Up @@ -655,9 +655,9 @@ BattleCommand_CheckObedience:
and a
ret nz

; If the monster's id doesn't match the player's,
; If the Pokémon's Trainer ID doesn't match the player's,
; some conditions need to be met.
ld a, MON_ID
ld a, MON_TRAINER_ID
call BattlePartyAttr

ld a, [wPlayerID]
Expand Down
2 changes: 1 addition & 1 deletion engine/events/daycare.asm
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ DayCare_GiveEgg:
call AddNTimes
ld b, h
ld c, l
ld hl, MON_ID + 1
ld hl, MON_TRAINER_ID + 1
add hl, bc
push hl
ld hl, MON_MAXHP
Expand Down
2 changes: 1 addition & 1 deletion engine/events/halloffame.asm
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ GetHallOfFameParty:
ld [de], a
inc de

ld hl, MON_ID
ld hl, MON_TRAINER_ID
add hl, bc
ld a, [hli]
ld [de], a
Expand Down
2 changes: 1 addition & 1 deletion engine/events/lucky_number.asm
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ CheckForLuckyNumberWinners:
.done
pop hl
push hl
ld de, MON_SPECIES - MON_ID
ld de, MON_SPECIES - MON_TRAINER_ID
add hl, de
ld a, [hl]
pop hl
Expand Down
4 changes: 2 additions & 2 deletions engine/events/magikarp.asm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CheckMagikarpLength:
cp MAGIKARP
jr nz, .not_magikarp

; Now let's compute its length based on its DVs and ID.
; Now let's compute its length based on its DVs and Trainer ID.
ld a, [wCurPartyMon]
ld hl, wPartyMon1Species
ld bc, PARTYMON_STRUCT_LENGTH
Expand All @@ -22,7 +22,7 @@ CheckMagikarpLength:
ld d, h
ld e, l
pop hl
ld bc, MON_ID
ld bc, MON_TRAINER_ID
add hl, bc
ld b, h
ld c, l
Expand Down
2 changes: 1 addition & 1 deletion engine/events/poke_seer.asm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ ReadCaughtData:
ld a, SEERACTION_TRADED
ld [wSeerAction], a

ld a, MON_ID
ld a, MON_TRAINER_ID
call GetPartyParamLocation
ld a, [wPlayerID]
cp [hl]
Expand Down
2 changes: 1 addition & 1 deletion engine/pokemon/breeding.asm
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ HatchEggs:
ld [hli], a
ld a, [de]
ld [hl], a
ld hl, MON_ID
ld hl, MON_TRAINER_ID
add hl, bc
ld a, [wPlayerID]
ld [hli], a
Expand Down
6 changes: 3 additions & 3 deletions engine/pokemon/search_owned.asm
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ CheckOwnMon:
; wScriptVar should contain the species we're looking for

; outputs:
; sets carry if monster matches species, ID, and OT name.
; sets carry if monster matches species, Trainer ID, and OT name.

push bc
push hl
Expand All @@ -206,9 +206,9 @@ CheckOwnMon:
cp b
jr nz, .notfound

; check ID number
; check Trainer ID number

ld bc, MON_ID
ld bc, MON_TRAINER_ID
add hl, bc
ld a, [wPlayerID]
cp [hl]
Expand Down