diff options
Diffstat (limited to 'engine/battle')
-rwxr-xr-x | engine/battle/ai/redundant.asm | 6 | ||||
-rw-r--r-- | engine/battle/ai/scoring.asm | 4 | ||||
-rw-r--r-- | engine/battle/core.asm | 66 | ||||
-rw-r--r-- | engine/battle/effect_commands.asm | 26 | ||||
-rw-r--r-- | engine/battle/effect_commands/sandstorm.asm | 4 | ||||
-rw-r--r-- | engine/battle/misc.asm | 2 | ||||
-rw-r--r-- | engine/battle/start_battle.asm | 2 |
7 files changed, 55 insertions, 55 deletions
diff --git a/engine/battle/ai/redundant.asm b/engine/battle/ai/redundant.asm index 2e8f7c6df..68d7b0203 100755 --- a/engine/battle/ai/redundant.asm +++ b/engine/battle/ai/redundant.asm @@ -135,7 +135,7 @@ AI_Redundant: ; 2c41a ret .Sandstorm: ; 2c4f5 - ld a, [Weather] + ld a, [wBattleWeather] cp WEATHER_SANDSTORM jr z, .Redundant jr .NotRedundant @@ -153,13 +153,13 @@ AI_Redundant: ; 2c41a ret .RainDance: ; 2c512 - ld a, [Weather] + ld a, [wBattleWeather] cp WEATHER_RAIN jr z, .Redundant jr .NotRedundant .SunnyDay: ; 2c51b - ld a, [Weather] + ld a, [wBattleWeather] cp WEATHER_SUN jr z, .Redundant jr .NotRedundant diff --git a/engine/battle/ai/scoring.asm b/engine/battle/ai/scoring.asm index 73284435a..2ea87cc82 100644 --- a/engine/battle/ai/scoring.asm +++ b/engine/battle/ai/scoring.asm @@ -2842,7 +2842,7 @@ AI_Smart_Solarbeam: ; 3920b ; 80% chance to encourage this move when it's sunny. ; 90% chance to discourage this move when it's raining. - ld a, [Weather] + ld a, [wBattleWeather] cp WEATHER_SUN jr z, .asm_3921e @@ -2870,7 +2870,7 @@ AI_Smart_Solarbeam: ; 3920b AI_Smart_Thunder: ; 39225 ; 90% chance to discourage this move when it's sunny. - ld a, [Weather] + ld a, [wBattleWeather] cp WEATHER_SUN ret nz diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 1a58b3df5..e8eec9894 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -4,7 +4,7 @@ DoBattle: ; 3c000 xor a ld [wBattleParticipantsNotFainted], a ld [wBattleParticipantsIncludingFainted], a - ld [wPlayerAction], a + ld [wBattlePlayerAction], a ld [BattleEnded], a inc a ld [wBattleHasJustStarted], a @@ -455,7 +455,7 @@ DetermineMoveOrder: ; 3c314 jr z, .use_move sub BATTLEACTION_SWITCH1 jr c, .use_move - ld a, [wPlayerAction] + ld a, [wBattlePlayerAction] cp $2 jr nz, .switch ld a, [hSerialConnectionStatus] @@ -480,7 +480,7 @@ DetermineMoveOrder: ; 3c314 jp .enemy_first .use_move - ld a, [wPlayerAction] + ld a, [wBattlePlayerAction] and a jp nz, .player_first call CompareMovePriority @@ -623,7 +623,7 @@ ParsePlayerAction: ; 3c434 jr .encored .not_encored - ld a, [wPlayerAction] + ld a, [wBattlePlayerAction] cp $2 jr z, .reset_rage and a @@ -920,7 +920,7 @@ Battle_EnemyFirst: ; 3c5fe jp z, HandlePlayerMonFaint call RefreshBattleHuds xor a - ld [wPlayerAction], a + ld [wBattlePlayerAction], a ret ; 3c664 @@ -970,7 +970,7 @@ Battle_PlayerFirst: ; 3c664 jp z, HandleEnemyMonFaint call RefreshBattleHuds xor a - ld [wPlayerAction], a + ld [wBattlePlayerAction], a ret ; 3c6cf @@ -1716,7 +1716,7 @@ HandleScreens: ; 3cb36 ; 3cb9e HandleWeather: ; 3cb9e - ld a, [Weather] + ld a, [wBattleWeather] cp WEATHER_NONE ret z @@ -1727,7 +1727,7 @@ HandleWeather: ; 3cb9e ld hl, .WeatherMessages call .PrintWeatherMessage - ld a, [Weather] + ld a, [wBattleWeather] cp WEATHER_SANDSTORM ret nz @@ -1790,11 +1790,11 @@ HandleWeather: ; 3cb9e ld hl, .WeatherEndedMessages call .PrintWeatherMessage xor a - ld [Weather], a + ld [wBattleWeather], a ret .PrintWeatherMessage: - ld a, [Weather] + ld a, [wBattleWeather] dec a ld c, a ld b, 0 @@ -2099,18 +2099,18 @@ HandleEnemyMonFaint: ; 3cd55 jp c, WildFled_EnemyFled_LinkBattleCanceled ld a, $1 - ld [wPlayerAction], a + ld [wBattlePlayerAction], a call HandleEnemySwitch jp z, WildFled_EnemyFled_LinkBattleCanceled jr DoubleSwitch .player_mon_not_fainted ld a, $1 - ld [wPlayerAction], a + ld [wBattlePlayerAction], a call HandleEnemySwitch jp z, WildFled_EnemyFled_LinkBattleCanceled xor a - ld [wPlayerAction], a + ld [wBattlePlayerAction], a ret ; 3cdca @@ -2140,7 +2140,7 @@ DoubleSwitch: ; 3cdca .done xor a - ld [wPlayerAction], a + ld [wBattlePlayerAction], a ret ; 3ce01 @@ -2173,7 +2173,7 @@ UpdateBattleStateAndExperienceAfterEnemyFaint: ; 3ce01 .wild2 call StopDangerSound ld a, $1 - ld [wDanger], a + ld [wBattleLowHealthAlarm], a .trainer ld hl, BattleMonHP @@ -2293,7 +2293,7 @@ IsAnyMonHoldingExpShare: ; 3ceaa StopDangerSound: ; 3ceec xor a - ld [Danger], a + ld [wLowHealthAlarm], a ret ; 3cef1 @@ -2394,7 +2394,7 @@ EnemyPartyMonEntrance: ; 3cf78 call SpikesDamage xor a ld [wEnemyMoveStruct + MOVE_ANIM], a - ld [wPlayerAction], a + ld [wBattlePlayerAction], a inc a ret ; 3cfa4 @@ -2403,7 +2403,7 @@ WinTrainerBattle: ; 3cfa4 ; Player won the battle call StopDangerSound ld a, $1 - ld [wDanger], a + ld [wBattleLowHealthAlarm], a ld [BattleEnded], a ld a, [wLinkMode] and a @@ -2705,7 +2705,7 @@ HandlePlayerMonFaint: ; 3d14e and a ret nz ld a, $1 - ld [wPlayerAction], a + ld [wBattlePlayerAction], a call HandleEnemySwitch jp z, WildFled_EnemyFled_LinkBattleCanceled jp DoubleSwitch @@ -2720,7 +2720,7 @@ PlayerMonFaintHappinessMod: ; 3d1aa ld hl, EnemySubStatus3 res SUBSTATUS_IN_LOOP, [hl] xor a - ld [Danger], a + ld [wLowHealthAlarm], a ld hl, PlayerDamageTaken ld [hli], a ld [hl], a @@ -2788,12 +2788,12 @@ ForcePlayerMonChoice: ; 3d227 and a jr z, .skip_link ld a, $1 - ld [wPlayerAction], a + ld [wBattlePlayerAction], a call LinkBattleSendReceiveAction .skip_link xor a - ld [wPlayerAction], a + ld [wBattlePlayerAction], a call CheckMobileBattleError jr c, .enemy_fainted_mobile_error ld hl, EnemyMonHP @@ -3229,7 +3229,7 @@ EnemySwitch: ; 3d4e1 xor a ld [wBattleParticipantsNotFainted], a ld [wBattleParticipantsIncludingFainted], a - ld [wPlayerAction], a + ld [wBattlePlayerAction], a inc a ld [wEnemyIsSwitching], a call LoadTileMapToTempTileMap @@ -3883,7 +3883,7 @@ TryToRunAwayFromBattle: ; 3d8b3 cp b jr nc, .can_escape ld a, $1 - ld [wPlayerAction], a + ld [wBattlePlayerAction], a ld hl, BattleText_CantEscape2 jr .print_inescapable_text @@ -3909,7 +3909,7 @@ TryToRunAwayFromBattle: ; 3d8b3 jr z, .fled call LoadTileMapToTempTileMap xor a - ld [wPlayerAction], a + ld [wBattlePlayerAction], a ld a, $f ld [CurMoveNum], a xor a @@ -4769,7 +4769,7 @@ CheckDanger: ; 3df9e ld a, [hli] or [hl] jr z, .no_danger - ld a, [wDanger] + ld a, [wBattleLowHealthAlarm] and a jr nz, .done ld a, [PlayerHPPal] @@ -4777,12 +4777,12 @@ CheckDanger: ; 3df9e jr z, .danger .no_danger - ld hl, Danger + ld hl, wLowHealthAlarm res DANGER_ON_F, [hl] jr .done .danger - ld hl, Danger + ld hl, wLowHealthAlarm set DANGER_ON_F, [hl] .done @@ -5116,7 +5116,7 @@ BattleMenu_Pack: ; 3e1c7 jr z, .contest farcall BattlePack - ld a, [wPlayerAction] + ld a, [wBattlePlayerAction] and a jr z, .didnt_use_item jr .got_item @@ -5329,7 +5329,7 @@ TryPlayerSwitch: ; 3e358 ld a, [CurBattleMon] ld [LastPlayerMon], a ld a, $2 - ld [wPlayerAction], a + ld [wBattlePlayerAction], a call ClearPalettes call DelayFrame call ClearSprites @@ -5464,7 +5464,7 @@ BattleMenu_Run: ; 3e489 ld a, $0 ld [wFailedToFlee], a ret c - ld a, [wPlayerAction] + ld a, [wBattlePlayerAction] and a ret nz jp BattleMenu @@ -5955,7 +5955,7 @@ ParseEnemyAction: ; 3e7c1 jr z, .not_linked call EmptyBattleTextBox call LoadTileMapToTempTileMap - ld a, [wPlayerAction] + ld a, [wBattlePlayerAction] and a call z, LinkBattleSendReceiveAction call Call_LoadTempTileMapToTileMap @@ -8560,7 +8560,7 @@ ExitBattle: ; 3f69e CleanUpBattleRAM: ; 3f6d0 call BattleEnd_HandleRoamMons xor a - ld [Danger], a + ld [wLowHealthAlarm], a ld [wBattleMode], a ld [BattleType], a ld [AttackMissed], a diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index c1bc3752a..b07f9df21 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -1,7 +1,7 @@ DoPlayerTurn: ; 34000 call SetPlayerTurn - ld a, [wPlayerAction] + ld a, [wBattlePlayerAction] and a ret nz @@ -1908,7 +1908,7 @@ BattleCommand_CheckHit: ; 34d32 cp EFFECT_THUNDER ret nz - ld a, [Weather] + ld a, [wBattleWeather] cp WEATHER_RAIN ret @@ -5394,7 +5394,7 @@ BattleCommand_FreezeTarget: ; 36102 ld a, [TypeModifier] and $7f ret z - ld a, [Weather] + ld a, [wBattleWeather] cp WEATHER_SUN ret z call CheckMoveTypeMatchesTarget ; Don't freeze an Ice-type @@ -9046,7 +9046,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67 ret z ld a, 1 - ld [wPlayerAction], a + ld [wBattlePlayerAction], a call LoadStandardMenuDataHeader ld hl, LinkBattleSendReceiveAction @@ -9054,7 +9054,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67 call CloseWindow xor a - ld [wPlayerAction], a + ld [wBattlePlayerAction], a ret ; 37a82 @@ -9310,15 +9310,15 @@ BattleCommand_TimeBasedHealContinue: ; 37b7e ; Don't factor in time of day in link battles. ld a, [wLinkMode] and a - jr nz, .Weather + jr nz, .checkWeather ld a, [TimeOfDay] cp b - jr z, .Weather + jr z, .checkWeather dec c ; double -.Weather: - ld a, [Weather] +.checkWeather: + ld a, [wBattleWeather] and a jr z, .Heal @@ -9384,7 +9384,7 @@ BattleCommand_HiddenPower: ; 37be8 BattleCommand_StartRain: ; 37bf4 ; startrain ld a, WEATHER_RAIN - ld [Weather], a + ld [wBattleWeather], a ld a, 5 ld [WeatherCount], a call AnimateCurrentMove @@ -9397,7 +9397,7 @@ BattleCommand_StartRain: ; 37bf4 BattleCommand_StartSun: ; 37c07 ; startsun ld a, WEATHER_SUN - ld [Weather], a + ld [wBattleWeather], a ld a, 5 ld [WeatherCount], a call AnimateCurrentMove @@ -9588,7 +9588,7 @@ BattleCommand_DoubleMinimizeDamage: ; 37ce6 BattleCommand_SkipSunCharge: ; 37d02 ; mimicsuncharge - ld a, [Weather] + ld a, [wBattleWeather] cp WEATHER_SUN ret nz ld b, charge_command @@ -9690,7 +9690,7 @@ BattleCommand_ThunderAccuracy: ; 37d94 ld a, BATTLE_VARS_MOVE_TYPE call GetBattleVarAddr inc hl - ld a, [Weather] + ld a, [wBattleWeather] cp WEATHER_RAIN jr z, .rain cp WEATHER_SUN diff --git a/engine/battle/effect_commands/sandstorm.asm b/engine/battle/effect_commands/sandstorm.asm index 27b8e8e2c..7bd653420 100644 --- a/engine/battle/effect_commands/sandstorm.asm +++ b/engine/battle/effect_commands/sandstorm.asm @@ -1,12 +1,12 @@ BattleCommand_StartSandstorm: ; 376f8 ; startsandstorm - ld a, [Weather] + ld a, [wBattleWeather] cp WEATHER_SANDSTORM jr z, .failed ld a, WEATHER_SANDSTORM - ld [Weather], a + ld [wBattleWeather], a ld a, 5 ld [WeatherCount], a call AnimateCurrentMove diff --git a/engine/battle/misc.asm b/engine/battle/misc.asm index a41d31d9a..d7b5584c7 100644 --- a/engine/battle/misc.asm +++ b/engine/battle/misc.asm @@ -53,7 +53,7 @@ GetPlayerBackpicCoords: ; fbd9d (3e:7d9d) DoWeatherModifiers: ; fbda4 ld de, .WeatherTypeModifiers - ld a, [Weather] + ld a, [wBattleWeather] ld b, a ld a, [wd265] ; move type ld c, a diff --git a/engine/battle/start_battle.asm b/engine/battle/start_battle.asm index e1377eec0..98a32c0dd 100644 --- a/engine/battle/start_battle.asm +++ b/engine/battle/start_battle.asm @@ -150,7 +150,7 @@ PlayBattleMusic: ; 2ee6c ClearBattleRAM: ; 2ef18 xor a - ld [wPlayerAction], a + ld [wBattlePlayerAction], a ld [wBattleResult], a ld hl, wPartyMenuCursor |