mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
Rename BATTLETOWER_NROF constants
This commit is contained in:
parent
b071dd364f
commit
8127d1fbcf
@ -1,11 +1,11 @@
|
|||||||
BATTLETOWER_NROFPKMNS EQU 3
|
BATTLETOWER_PARTY_SIZE EQU 3
|
||||||
BATTLETOWER_NROFTRAINERS EQU 7
|
BATTLETOWER_STREAK_SIZE EQU 7
|
||||||
|
|
||||||
BATTLETOWER_NUM_UNIQUE_PKMN EQU 21
|
BATTLETOWER_NUM_UNIQUE_PKMN EQU 21
|
||||||
BATTLETOWER_NUM_UNIQUE_TRAINERS EQU 70
|
BATTLETOWER_NUM_UNIQUE_TRAINERS EQU 70
|
||||||
|
|
||||||
BATTLETOWER_TRAINERDATALENGTH EQU $24
|
BATTLETOWER_TRAINERDATALENGTH EQU $24
|
||||||
BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + BATTLETOWER_NROFPKMNS * (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
|
BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + BATTLETOWER_PARTY_SIZE * (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
|
||||||
|
|
||||||
; BattleTowerAction writebyte arguments (see engine/events/battle_tower/battle_tower.asm)
|
; BattleTowerAction writebyte arguments (see engine/events/battle_tower/battle_tower.asm)
|
||||||
const_def
|
const_def
|
||||||
|
@ -363,7 +363,7 @@ ReadBTTrainerParty: ; 1702b7
|
|||||||
; Copy Pkmn into Memory from the address in hl
|
; Copy Pkmn into Memory from the address in hl
|
||||||
ld de, OTPartyMon1Species
|
ld de, OTPartyMon1Species
|
||||||
ld bc, OTPartyCount
|
ld bc, OTPartyCount
|
||||||
ld a, BATTLETOWER_NROFPKMNS ; Number of Pkmn the BattleTower-Trainer has
|
ld a, BATTLETOWER_PARTY_SIZE
|
||||||
ld [bc], a
|
ld [bc], a
|
||||||
inc bc
|
inc bc
|
||||||
.otpartymon_loop
|
.otpartymon_loop
|
||||||
@ -399,7 +399,7 @@ ReadBTTrainerParty: ; 1702b7
|
|||||||
ValidateBTParty: ; 170394
|
ValidateBTParty: ; 170394
|
||||||
; Check for and fix errors in party data
|
; Check for and fix errors in party data
|
||||||
ld hl, wBT_OTTempPkmn1Species
|
ld hl, wBT_OTTempPkmn1Species
|
||||||
ld d, BATTLETOWER_NROFPKMNS
|
ld d, BATTLETOWER_PARTY_SIZE
|
||||||
.pkmn_loop
|
.pkmn_loop
|
||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
@ -509,7 +509,7 @@ BT_ChrisName: ; 170426
|
|||||||
|
|
||||||
Function17042c: ; 17042c
|
Function17042c: ; 17042c
|
||||||
ld hl, w3_d202TrainerData
|
ld hl, w3_d202TrainerData
|
||||||
ld a, BATTLETOWER_NROFTRAINERS
|
ld a, BATTLETOWER_STREAK_SIZE
|
||||||
.loop
|
.loop
|
||||||
push af
|
push af
|
||||||
push hl
|
push hl
|
||||||
@ -956,7 +956,7 @@ ResetBattleTowerTrainersSRAM: ; 1706d6 (5c:46d6) BattleTowerAction $1a
|
|||||||
|
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld hl, sBTTrainers
|
ld hl, sBTTrainers
|
||||||
ld bc, BATTLETOWER_NROFTRAINERS
|
ld bc, BATTLETOWER_STREAK_SIZE
|
||||||
call ByteFill
|
call ByteFill
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
|
@ -41,7 +41,7 @@ endc
|
|||||||
ld a, BANK(sBTTrainers)
|
ld a, BANK(sBTTrainers)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
|
|
||||||
ld c, BATTLETOWER_NROFTRAINERS
|
ld c, BATTLETOWER_STREAK_SIZE
|
||||||
ld hl, sBTTrainers
|
ld hl, sBTTrainers
|
||||||
.next_trainer
|
.next_trainer
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -93,7 +93,7 @@ endc
|
|||||||
|
|
||||||
|
|
||||||
Function_LoadRandomBattleTowerPkmn: ; 1f8081
|
Function_LoadRandomBattleTowerPkmn: ; 1f8081
|
||||||
ld c, BATTLETOWER_NROFPKMNS
|
ld c, BATTLETOWER_PARTY_SIZE
|
||||||
.loop
|
.loop
|
||||||
push bc
|
push bc
|
||||||
ld a, BANK(sBTPkmnPrevTrainer1)
|
ld a, BANK(sBTPkmnPrevTrainer1)
|
||||||
|
@ -213,7 +213,7 @@ BattleTower_ExecuteJumptable: ; 8b25b
|
|||||||
|
|
||||||
BattleTower_CheckPartyLengthIs3: ; 8b2bb
|
BattleTower_CheckPartyLengthIs3: ; 8b2bb
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
cp BATTLETOWER_NROFPKMNS
|
cp BATTLETOWER_PARTY_SIZE
|
||||||
ret
|
ret
|
||||||
; 8b2c1
|
; 8b2c1
|
||||||
|
|
||||||
@ -235,13 +235,13 @@ BattleTower_CheckPartyHasThreeMonsThatAreNotEggs: ; 8b2c1
|
|||||||
cp b
|
cp b
|
||||||
ret z
|
ret z
|
||||||
ld a, b
|
ld a, b
|
||||||
cp BATTLETOWER_NROFPKMNS
|
cp BATTLETOWER_PARTY_SIZE
|
||||||
ret
|
ret
|
||||||
; 8b2da
|
; 8b2da
|
||||||
|
|
||||||
Function_PartyCountEq3: ; 8b2da
|
Function_PartyCountEq3: ; 8b2da
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
cp BATTLETOWER_NROFPKMNS
|
cp BATTLETOWER_PARTY_SIZE
|
||||||
ret z
|
ret z
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
@ -37,7 +37,7 @@ Script_BattleRoomLoop: ; 0x9f425
|
|||||||
reloadmap
|
reloadmap
|
||||||
if_not_equal $0, Script_FailedBattleTowerChallenge
|
if_not_equal $0, Script_FailedBattleTowerChallenge
|
||||||
copybytetovar wNrOfBeatenBattleTowerTrainers ; wcf64
|
copybytetovar wNrOfBeatenBattleTowerTrainers ; wcf64
|
||||||
if_equal BATTLETOWER_NROFTRAINERS, Script_BeatenAllTrainers
|
if_equal BATTLETOWER_STREAK_SIZE, Script_BeatenAllTrainers
|
||||||
applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksOut
|
applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksOut
|
||||||
warpsound
|
warpsound
|
||||||
disappear BATTLETOWERBATTLEROOM_YOUNGSTER
|
disappear BATTLETOWERBATTLEROOM_YOUNGSTER
|
||||||
|
@ -219,7 +219,7 @@ Function170c8b: ; 170c8b
|
|||||||
; 170c98
|
; 170c98
|
||||||
|
|
||||||
CheckBTMonMovesForErrors: ; 170c98
|
CheckBTMonMovesForErrors: ; 170c98
|
||||||
ld c, BATTLETOWER_NROFPKMNS
|
ld c, BATTLETOWER_PARTY_SIZE
|
||||||
ld hl, wBT_OTTempPkmn1Moves
|
ld hl, wBT_OTTempPkmn1Moves
|
||||||
.loop
|
.loop
|
||||||
push hl
|
push hl
|
||||||
|
2
sram.asm
2
sram.asm
@ -203,7 +203,7 @@ sBattleTower:: ; be46
|
|||||||
sNrOfBeatenBattleTowerTrainers:: db
|
sNrOfBeatenBattleTowerTrainers:: db
|
||||||
sBTChoiceOfLevelGroup:: db
|
sBTChoiceOfLevelGroup:: db
|
||||||
; Battle Tower trainers are saved here, so nobody appears more than once
|
; Battle Tower trainers are saved here, so nobody appears more than once
|
||||||
sBTTrainers:: ds BATTLETOWER_NROFTRAINERS ; sbe48
|
sBTTrainers:: ds BATTLETOWER_STREAK_SIZE ; sbe48
|
||||||
sBattleTowerSaveFileFlags:: db
|
sBattleTowerSaveFileFlags:: db
|
||||||
sBattleTowerReward:: db
|
sBattleTowerReward:: db
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user