summaryrefslogtreecommitdiff
path: root/battle
diff options
context:
space:
mode:
Diffstat (limited to 'battle')
-rw-r--r--battle/ai/items.asm8
-rw-r--r--battle/ai/scoring.asm4
-rw-r--r--battle/core.asm28
-rw-r--r--battle/effect_commands.asm32
4 files changed, 36 insertions, 36 deletions
diff --git a/battle/ai/items.asm b/battle/ai/items.asm
index 547d213df..d9798170d 100644
--- a/battle/ai/items.asm
+++ b/battle/ai/items.asm
@@ -250,7 +250,7 @@ endr
ld d, a
ld e, 0
ld hl, OTPartyMon1Level
- ld bc, OTPartyMon2 - OTPartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
.next
ld a, [hl]
cp e
@@ -685,7 +685,7 @@ AI_TrySwitch: ; 3844b
inc d
.fainted
push bc
- ld bc, PartyMon2 - PartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
pop bc
dec c
@@ -710,7 +710,7 @@ AI_Switch: ; 3846c
push af
ld a, [CurOTMon]
ld hl, OTPartyMon1Status
- ld bc, PartyMon2 - PartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
ld d, h
ld e, l
@@ -754,7 +754,7 @@ Function384d5: ; This appears to be unused
AI_HealStatus: ; 384e0
ld a, [CurOTMon]
ld hl, OTPartyMon1Status
- ld bc, PartyMon2 - PartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
xor a
ld [hl], a
diff --git a/battle/ai/scoring.asm b/battle/ai/scoring.asm
index 258ee2e16..4737d231c 100644
--- a/battle/ai/scoring.asm
+++ b/battle/ai/scoring.asm
@@ -1719,7 +1719,7 @@ AI_Smart_HealBell: ; 38d1f
ld b, a
ld c, 0
ld hl, OTPartyMon1HP
- ld de, OTPartyMon2 - OTPartyMon1
+ ld de, PARTYMON_STRUCT_LENGTH
.loop
push hl
@@ -1933,7 +1933,7 @@ AICheckLastPlayerMon: ; 38e2e
ld b, a
ld c, 0
ld hl, PartyMon1HP
- ld de, PartyMon2 - PartyMon1
+ ld de, PARTYMON_STRUCT_LENGTH
.loop
ld a, [CurBattleMon]
diff --git a/battle/core.asm b/battle/core.asm
index 90c05ea98..12c5fe190 100644
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -2295,7 +2295,7 @@ ShareExperiencePoints: ; 3ceaa
.asm_3ceb5
push hl
push bc
- ld bc, PartyMon1HP - PartyMon1
+ ld bc, MON_HP
add hl, bc
ld a, [hli]
or [hl]
@@ -2305,7 +2305,7 @@ ShareExperiencePoints: ; 3ceaa
push hl
push bc
- ld bc, PartyMon1Item - PartyMon1
+ ld bc, MON_ITEM
add hl, bc
pop bc
ld a, [hl]
@@ -2320,7 +2320,7 @@ ShareExperiencePoints: ; 3ceaa
.asm_3ced1
sla c
push de
- ld de, PartyMon2 - PartyMon1
+ ld de, PARTYMON_STRUCT_LENGTH
add hl, de
pop de
dec b
@@ -2384,7 +2384,7 @@ CheckEnemyTrainerDefeated: ; 3cf35
ld b, a
xor a
ld hl, OTPartyMon1HP
- ld de, PartyMon2 - PartyMon1
+ ld de, PARTYMON_STRUCT_LENGTH
.loop
or [hl]
@@ -4062,7 +4062,7 @@ TryToRunAwayFromBattle: ; 3d8b3
Function3da0d: ; 3da0d
- ld a, PartyMon1Species - PartyMon1
+ ld a, MON_SPECIES
call GetPartyParamLocation
ld de, BattleMonSpecies
ld bc, 1 + 1 + NUM_MOVES ; species, item, moves ; BattleMonDVs - BattleMonSpecies
@@ -4265,7 +4265,7 @@ Function3db5f: ; 3db5f
call Call_PlayBattleAnim
.asm_3dbbc
- ld a, PartyMon1Species - PartyMon1
+ ld a, MON_SPECIES
call GetPartyParamLocation
ld b, h
ld c, l
@@ -5608,7 +5608,7 @@ MoveSelectionScreen: ; 3e4bc
jr .asm_3e4e2
.asm_3e4dd
- ld a, PartyMon1Moves - PartyMon1
+ ld a, MON_MOVES
call GetPartyParamLocation
.asm_3e4e2
@@ -5867,7 +5867,7 @@ endr
push hl
call .asm_3e6a5
pop hl
- ld bc, PartyMon1PP - PartyMon1Moves
+ ld bc, (MON_PP) - (MON_MOVES)
add hl, bc
call .asm_3e6a5
@@ -7424,7 +7424,7 @@ GiveExperiencePoints: ; 3ee3b
.asm_3ee89
push hl
push bc
- ld a, PartyMon1PokerusStatus - PartyMon1
+ ld a, MON_PKRUS
call GetPartyParamLocation
ld a, [hl]
and a
@@ -7489,7 +7489,7 @@ endr
dec a
call nz, DoubleExp
push bc
- ld a, PartyMon1Item - PartyMon1
+ ld a, MON_ITEM
call GetPartyParamLocation
ld a, [hl]
cp LUCKY_EGG
@@ -7574,7 +7574,7 @@ endr
predef CopyPkmnToTempMon
callab CalcLevel
pop bc
- ld hl, PartyMon1Level - PartyMon1
+ ld hl, MON_LEVEL
add hl, bc
ld a, [hl]
cp MAX_LEVEL
@@ -7587,7 +7587,7 @@ endr
ld a, d
ld [CurPartyLevel], a
ld [hl], a
- ld hl, PartyMon1Species - PartyMon1
+ ld hl, MON_SPECIES
add hl, bc
ld a, [hl]
ld [CurSpecies], a
@@ -7733,7 +7733,7 @@ endr
cp b
jr z, .asm_3f0d1
ld [CurPartyMon], a
- ld a, PartyMon1Species - PartyMon1
+ ld a, MON_SPECIES
call GetPartyParamLocation
ld b, h
ld c, l
@@ -8577,7 +8577,7 @@ Function3f594: ; 3f594
ld b, a
.partyloop
push bc
- ld a, PartyMon1HP - PartyMon1
+ ld a, MON_HP
call GetPartyParamLocation
ld a, [hli]
or [hl]
diff --git a/battle/effect_commands.asm b/battle/effect_commands.asm
index 94f68d1ac..b36d514f7 100644
--- a/battle/effect_commands.asm
+++ b/battle/effect_commands.asm
@@ -706,7 +706,7 @@ BattleCommand02: ; 343db
; If the monster's id doesn't match the player's,
; some conditions need to be met.
- ld a, PartyMon1ID - PartyMon1
+ ld a, MON_ID
call BattlePartyAttr
ld a, [PlayerID]
@@ -1949,7 +1949,7 @@ CountEnemyAliveMons: ; 349f4
.next
srl b
push bc
- ld bc, PartyMon2 - PartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
pop bc
inc e
@@ -1987,7 +1987,7 @@ Function34a2a: ; 34a2a
push hl
push bc
- ld bc, PartyMon1HP - PartyMon1
+ ld bc, MON_HP
add hl, bc
pop bc
ld a, [hli]
@@ -2022,7 +2022,7 @@ Function34a2a: ; 34a2a
ret z
push bc
- ld bc, PartyMon2 - PartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
pop bc
@@ -2136,7 +2136,7 @@ Function34aa7: ; 34aa7
.asm_34b00
push bc
- ld bc, PartyMon2 - PartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
pop bc
srl b
@@ -2266,7 +2266,7 @@ endr
srl b
pop hl
push bc
- ld bc, PartyMon2 - PartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
pop bc
jr .loop
@@ -3358,7 +3358,7 @@ endr
DittoMetalPowder: ; 352b1
- ld a, PartyMon1Species - PartyMon1
+ ld a, MON_SPECIES
call BattlePartyAttr
ld a, [hBattleTurn]
and a
@@ -3633,7 +3633,7 @@ SpeciesItemBoost: ; 353d1
ld h, a
push hl
- ld a, PartyMon1Species - PartyMon1
+ ld a, MON_SPECIES
call BattlePartyAttr
ld a, [hBattleTurn]
@@ -4840,7 +4840,7 @@ BattleCommand46: ; 35a74
bit SUBSTATUS_TRANSFORMED, [hl]
jp nz, .asm_35b10
- ld a, PartyMon1Moves - PartyMon1
+ ld a, MON_MOVES
call UserPartyAttr
ld d, h
ld e, l
@@ -5118,7 +5118,7 @@ BattleCommand4a: ; 35c0f
ld a, [AttackMissed]
and a
jp nz, .asm_35c91
- ld bc, PartyMon2 - PartyMon1 ; ????
+ ld bc, PARTYMON_STRUCT_LENGTH ; ????
ld hl, EnemyMonMoves
ld a, [hBattleTurn]
and a
@@ -5166,7 +5166,7 @@ endr
sub b
ld [hl], a
push af
- ld a, PartyMon1PP - PartyMon1
+ ld a, MON_PP
call OpponentPartyAttr
ld d, b
pop af
@@ -5262,7 +5262,7 @@ BattleCommand4c: ; 35cc9
ld [hl], a
ld h, d
ld l, e
- ld bc, PartyMon2 - PartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
ld d, PartyEnd - PartySpecies
.asm_35ce9
ld [hl], a
@@ -7418,7 +7418,7 @@ Function36994: ; 36994
ld a, [PartyCount]
ld d, a
ld e, 0
- ld bc, PartyMon2 - PartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
.asm_3699d
ld a, [CurBattleMon]
cp e
@@ -9286,7 +9286,7 @@ BattleCommand53: ; 37563
jr z, .done
.party
- ld a, PartyMon1Status - PartyMon1
+ ld a, MON_STATUS
call UserPartyAttr
res FRZ, [hl]
@@ -9408,7 +9408,7 @@ BattleCommand5f: ; 377ce
Function377f5: ; 377f5
- ld a, PartyMon1Species - PartyMon1
+ ld a, MON_SPECIES
call BattlePartyAttr
ld a, [hl]
ld [CurPartySpecies], a
@@ -9937,7 +9937,7 @@ CheckAnyOtherAliveMons: ; 37b01
.next
push bc
- ld bc, PartyMon2 - PartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
pop bc
inc c