diff options
Diffstat (limited to 'engine/battle')
| -rw-r--r-- | engine/battle/battle_transitions.asm | 2 | ||||
| -rw-r--r-- | engine/battle/core.asm | 36 | ||||
| -rw-r--r-- | engine/battle/effects.asm | 4 | ||||
| -rw-r--r-- | engine/battle/end_of_battle.asm | 4 | ||||
| -rw-r--r-- | engine/battle/experience.asm | 6 | ||||
| -rw-r--r-- | engine/battle/read_trainer_party.asm | 8 | ||||
| -rw-r--r-- | engine/battle/wild_encounters.asm | 8 |
7 files changed, 34 insertions, 34 deletions
diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm index 363533ce..16311f48 100644 --- a/engine/battle/battle_transitions.asm +++ b/engine/battle/battle_transitions.asm @@ -105,7 +105,7 @@ GetBattleTransitionID_CompareLevels: ld a, [hl] add $3 ld e, a - ld a, [wCurEnemyLVL] + ld a, [wCurEnemyLevel] sub e jr nc, .highLevelEnemy res 1, c diff --git a/engine/battle/core.asm b/engine/battle/core.asm index ca3294b8..ab4d1c56 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -844,7 +844,7 @@ FaintEnemyPokemon: ; the player has exp all ; now, set the gain exp flag for every party member ; half of the total stat exp and normal exp will divided evenly amongst every party member - ld a, $1 + ld a, TRUE ld [wBoostExpByExpAll], a ld a, [wPartyCount] ld b, 0 @@ -924,8 +924,8 @@ TrainerBattleVictory: cp RIVAL3 ; final battle against rival jr nz, .notrival ld b, MUSIC_DEFEATED_GYM_LEADER - ld hl, wFlags_D733 - set 1, [hl] + ld hl, wStatusFlags7 + set BIT_NO_MAP_MUSIC, [hl] .notrival ld a, [wLinkState] cp LINK_STATE_BATTLING @@ -1157,9 +1157,9 @@ HandlePlayerBlackOut: ld hl, LinkBattleLostText .noLinkBattle call PrintText - ld a, [wd732] - res 5, a - ld [wd732], a + ld a, [wStatusFlags6] + res BIT_ALWAYS_ON_BIKE, a + ld [wStatusFlags6], a call ClearScreen scf ret @@ -1179,10 +1179,10 @@ LinkBattleLostText: ; slides pic of fainted mon downwards until it disappears ; bug: when this is called, [hAutoBGTransferEnabled] is non-zero, so there is screen tearing SlideDownFaintedMonPic: - ld a, [wd730] + ld a, [wStatusFlags5] push af - set 6, a - ld [wd730], a + set BIT_NO_TEXT_DELAY, a + ld [wStatusFlags5], a ld b, 7 ; number of times to slide .slideStepLoop ; each iteration, the mon is slid down one row push bc @@ -1221,7 +1221,7 @@ SlideDownFaintedMonPic: dec b jr nz, .slideStepLoop pop af - ld [wd730], a + ld [wStatusFlags5], a ret SevenSpacesText: @@ -1344,7 +1344,7 @@ EnemySendOutFirstMon: ld bc, wEnemyMon2 - wEnemyMon1 call AddNTimes ld a, [hl] - ld [wCurEnemyLVL], a + ld [wCurEnemyLevel], a ld a, [wWhichPokemon] inc a ld hl, wEnemyPartyCount @@ -2558,7 +2558,7 @@ MoveSelectionMenu: cp LINK_STATE_BATTLING jr z, .matchedkeyspicked ; Disable left, right, and START buttons in regular battles. - ld a, [wFlags_D733] + ld a, [wStatusFlags7] bit BIT_TEST_BATTLE, a ld b, D_UP | D_DOWN | A_BUTTON | B_BUTTON | SELECT jr z, .matchedkeyspicked @@ -2587,7 +2587,7 @@ SelectMenuItem: jr .select .battleselect ; Hide move swap cursor in TestBattle. - ld a, [wFlags_D733] + ld a, [wStatusFlags7] bit BIT_TEST_BATTLE, a ; This causes PrintMenuItem to not run in TestBattle. ; MoveSelectionMenu still draws part of its window, an issue @@ -4404,7 +4404,7 @@ GetEnemyMonStat: ret .notLinkBattle ld a, [wEnemyMonLevel] - ld [wCurEnemyLVL], a + ld [wCurEnemyLevel], a ld a, [wEnemyMonSpecies] ld [wd0b5], a call GetMonHeader @@ -6092,7 +6092,7 @@ GetCurrentMove: .player ld de, wPlayerMoveNum ; Apply InitBattleVariables to TestBattle. - ld a, [wFlags_D733] + ld a, [wStatusFlags7] bit BIT_TEST_BATTLE, a ld a, [wTestBattlePlayerSelectedMove] jr nz, .selected @@ -6143,7 +6143,7 @@ LoadEnemyMonData: ld [hli], a ld [hl], b ld de, wEnemyMonLevel - ld a, [wCurEnemyLVL] + ld a, [wCurEnemyLevel] ld [de], a inc de ld b, $0 @@ -6776,7 +6776,7 @@ InitOpponent: jr InitBattleCommon DetermineWildOpponent: - ld a, [wd732] + ld a, [wStatusFlags6] bit BIT_DEBUG_MODE, a jr z, .notDebugMode ldh a, [hJoyHeld] @@ -6794,7 +6794,7 @@ InitBattleCommon: ld hl, wLetterPrintingDelayFlags ld a, [hl] push af - res 1, [hl] + res BIT_TEXT_DELAY, [hl] ; no delay callfar InitBattleVariables ld a, [wEnemyMonSpecies2] sub OPP_ID_OFFSET diff --git a/engine/battle/effects.asm b/engine/battle/effects.asm index b94b12d2..643afeb2 100644 --- a/engine/battle/effects.asm +++ b/engine/battle/effects.asm @@ -812,7 +812,7 @@ SwitchAndTeleportEffect: ld a, [wIsInBattle] dec a jr nz, .notWildBattle1 - ld a, [wCurEnemyLVL] + ld a, [wCurEnemyLevel] ld b, a ld a, [wBattleMonLevel] cp b ; is the player's level greater than the enemy's level? @@ -856,7 +856,7 @@ SwitchAndTeleportEffect: jr nz, .notWildBattle2 ld a, [wBattleMonLevel] ld b, a - ld a, [wCurEnemyLVL] + ld a, [wCurEnemyLevel] cp b jr nc, .enemyMoveWasSuccessful add b diff --git a/engine/battle/end_of_battle.asm b/engine/battle/end_of_battle.asm index b9f9d537..80fdf002 100644 --- a/engine/battle/end_of_battle.asm +++ b/engine/battle/end_of_battle.asm @@ -66,8 +66,8 @@ EndOfBattle: ld [hli], a dec b jr nz, .loop - ld hl, wd72c - set 0, [hl] + ld hl, wStatusFlags2 + set BIT_WILD_ENCOUNTER_COOLDOWN, [hl] call WaitForSoundToFinish call GBPalWhiteOut ld a, $ff diff --git a/engine/battle/experience.asm b/engine/battle/experience.asm index 0eab6e08..798d7ce1 100644 --- a/engine/battle/experience.asm +++ b/engine/battle/experience.asm @@ -160,11 +160,11 @@ GainExperience: ld a, [hl] ; current level cp d jp z, .nextMon ; if level didn't change, go to next mon - ld a, [wCurEnemyLVL] + ld a, [wCurEnemyLevel] push af push hl ld a, d - ld [wCurEnemyLVL], a + ld [wCurEnemyLevel], a ld [hl], a ld bc, wPartyMon1Species - wPartyMon1Level add hl, bc @@ -261,7 +261,7 @@ GainExperience: predef FlagActionPredef pop hl pop af - ld [wCurEnemyLVL], a + ld [wCurEnemyLevel], a .nextMon ld a, [wPartyCount] diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm index a9e09a30..a88b0dfc 100644 --- a/engine/battle/read_trainer_party.asm +++ b/engine/battle/read_trainer_party.asm @@ -49,7 +49,7 @@ ReadTrainer: ld a, [hli] cp $FF ; is the trainer special? jr z, .SpecialTrainer ; if so, check for special moves - ld [wCurEnemyLVL], a + ld [wCurEnemyLevel], a .LoopTrainerData ld a, [hli] and a ; have we reached the end of the trainer data? @@ -69,7 +69,7 @@ ReadTrainer: ld a, [hli] and a ; have we reached the end of the trainer data? jr z, .AddLoneMove - ld [wCurEnemyLVL], a + ld [wCurEnemyLevel], a ld a, [hli] ld [wcf91], a ld a, ENEMY_PARTY_DATA @@ -150,7 +150,7 @@ ReadTrainer: ld [de], a inc de ld [de], a - ld a, [wCurEnemyLVL] + ld a, [wCurEnemyLevel] ld b, a .LastLoop ; update wAmountMoneyWon addresses (money to win) based on enemy's level @@ -162,5 +162,5 @@ ReadTrainer: inc de inc de dec b - jr nz, .LastLoop ; repeat wCurEnemyLVL times + jr nz, .LastLoop ; repeat wCurEnemyLevel times ret diff --git a/engine/battle/wild_encounters.asm b/engine/battle/wild_encounters.asm index 8c9c1529..eede46ed 100644 --- a/engine/battle/wild_encounters.asm +++ b/engine/battle/wild_encounters.asm @@ -4,8 +4,8 @@ TryDoWildEncounter: ld a, [wNPCMovementScriptPointerTableNum] and a ret nz - ld a, [wd736] - and a + ld a, [wMovementFlags] + and a ; is player exiting a door, jumping over a ledge, or fishing? ret nz callfar IsPlayerStandingOnDoorTileOrWarpTile jr nc, .notStandingOnDoorOrWarpTile @@ -74,7 +74,7 @@ TryDoWildEncounter: ld b, 0 add hl, bc ld a, [hli] - ld [wCurEnemyLVL], a + ld [wCurEnemyLevel], a ld a, [hl] ld [wcf91], a ld [wEnemyMonSpecies2], a @@ -83,7 +83,7 @@ TryDoWildEncounter: jr z, .willEncounter ld a, [wPartyMon1Level] ld b, a - ld a, [wCurEnemyLVL] + ld a, [wCurEnemyLevel] cp b jr c, .CantEncounter2 ; repel prevents encounters if the leading party mon's level is higher than the wild mon jr .willEncounter |
