diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index 76212d5e7..fbc12824d 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -109,8 +109,6 @@ DoMove: CheckTurn: BattleCommand_CheckTurn: -; checkturn - ; Repurposed as hardcoded turn handling. Useless as a command. ; Move $ff immediately ends the turn. @@ -631,8 +629,6 @@ HitConfusion: jp BattleCommand_RaiseSub BattleCommand_CheckObedience: -; checkobedience - ; Enemy can't disobey ldh a, [hBattleTurn] and a @@ -942,7 +938,6 @@ IgnoreSleepOnly: ret BattleCommand_UsedMoveText: -; usedmovetext farcall DisplayUsedMoveText ret @@ -1123,8 +1118,6 @@ CheckMimicUsed: ret BattleCommand_Critical: -; critical - ; Determine whether this attack's hit will be critical. xor a @@ -1505,8 +1498,6 @@ INCLUDE "engine/battle/ai/switch.asm" INCLUDE "data/types/type_matchups.asm" BattleCommand_DamageVariation: -; damagevariation - ; Modify the damage spread between 85% and 100%. ; Because of the method of division the probability distribution @@ -1557,8 +1548,6 @@ BattleCommand_DamageVariation: ret BattleCommand_CheckHit: -; checkhit - call .DreamEater jp z, .Miss @@ -1864,8 +1853,6 @@ BattleCommand_CheckHit: INCLUDE "data/battle/accuracy_multipliers.asm" BattleCommand_EffectChance: -; effectchance - xor a ld [wEffectFailed], a call CheckSubstituteOpp @@ -1893,8 +1880,6 @@ BattleCommand_EffectChance: ret BattleCommand_LowerSub: -; lowersub - ld a, BATTLE_VARS_SUBSTATUS4 call GetBattleVar bit SUBSTATUS_SUBSTITUTE, a @@ -1961,7 +1946,6 @@ BattleCommand_LowerSub: ret BattleCommand_MoveAnim: -; moveanim call BattleCommand_LowerSub call BattleCommand_MoveAnimNoSub jp BattleCommand_RaiseSub @@ -2062,16 +2046,12 @@ BattleCommand_StatUpDownAnim: jp PlayFXAnimID BattleCommand_SwitchTurn: -; switchturn - ldh a, [hBattleTurn] xor 1 ldh [hBattleTurn], a ret BattleCommand_RaiseSub: -; raisesub - ld a, BATTLE_VARS_SUBSTATUS4 call GetBattleVar bit SUBSTATUS_SUBSTITUTE, a @@ -2089,7 +2069,6 @@ BattleCommand_RaiseSub: jp LoadAnim BattleCommand_FailureText: -; failuretext ; If the move missed or failed, load the appropriate ; text, and end the effects of multi-turn or multi- ; hit moves. @@ -2131,8 +2110,6 @@ BattleCommand_FailureText: jp EndMoveEffect BattleCommand_ApplyDamage: -; applydamage - ld a, BATTLE_VARS_SUBSTATUS1_OPP call GetBattleVar bit SUBSTATUS_ENDURE, a @@ -2301,7 +2278,6 @@ BattleCommand_BideFailText: jp PrintButItFailed BattleCommand_CriticalText: -; criticaltext ; Prints the message for critical hits or one-hit KOs. ; If there is no message to be printed, wait 20 frames. @@ -2332,8 +2308,6 @@ BattleCommand_CriticalText: dw OneHitKOText BattleCommand_StartLoop: -; startloop - ld hl, wPlayerRolloutCount ldh a, [hBattleTurn] and a @@ -2345,8 +2319,6 @@ BattleCommand_StartLoop: ret BattleCommand_SuperEffectiveLoopText: -; supereffectivelooptext - ld a, BATTLE_VARS_SUBSTATUS3 call GetBattleVarAddr bit SUBSTATUS_IN_LOOP, a @@ -2355,8 +2327,6 @@ BattleCommand_SuperEffectiveLoopText: ; fallthrough BattleCommand_SuperEffectiveText: -; supereffectivetext - ld a, [wTypeModifier] and $7f cp EFFECTIVE @@ -2368,8 +2338,6 @@ BattleCommand_SuperEffectiveText: jp StdBattleTextbox BattleCommand_CheckFaint: -; checkfaint - ; Faint the opponent if its HP reached zero ; and faint the user along with it if it used Destiny Bond. ; Ends the move effect if the opponent faints. @@ -2457,8 +2425,6 @@ BattleCommand_CheckFaint: jp EndMoveEffect BattleCommand_BuildOpponentRage: -; buildopponentrage - jp .start .start @@ -2488,8 +2454,6 @@ BattleCommand_BuildOpponentRage: jp BattleCommand_SwitchTurn BattleCommand_RageDamage: -; ragedamage - ld a, [wCurDamage] ld h, a ld b, a @@ -2563,8 +2527,6 @@ DittoMetalPowder: ret BattleCommand_DamageStats: -; damagestats - ldh a, [hBattleTurn] and a jp nz, EnemyAttackDamage @@ -2895,7 +2857,6 @@ EnemyAttackDamage: INCLUDE "engine/battle/move_effects/beat_up.asm" BattleCommand_ClearMissDamage: -; clearmissdamage ld a, [wAttackMissed] and a ret z @@ -2939,8 +2900,6 @@ HitSelfInConfusion: ret BattleCommand_DamageCalc: -; damagecalc - ; Return a damage value for move power d, player level e, enemy defense c and player attack b. ; Return 1 if successful, else 0. @@ -3175,8 +3134,6 @@ DEF DAMAGE_CAP EQU MAX_DAMAGE - MIN_DAMAGE INCLUDE "data/types/type_boost_items.asm" BattleCommand_ConstantDamage: -; constantdamage - ld hl, wBattleMonLevel ldh a, [hBattleTurn] and a @@ -3349,7 +3306,6 @@ INCLUDE "engine/battle/move_effects/lock_on.asm" INCLUDE "engine/battle/move_effects/sketch.asm" BattleCommand_DefrostOpponent: -; defrostopponent ; Thaw the opponent if frozen, and ; raise the user's Attack one stage. @@ -3616,8 +3572,6 @@ UpdateMoveData: jp CopyName1 BattleCommand_SleepTarget: -; sleeptarget - call GetOpponentItem ld a, b cp HELD_PREVENT_SLEEP @@ -3715,8 +3669,6 @@ BattleCommand_SleepTarget: ret BattleCommand_PoisonTarget: -; poisontarget - call CheckSubstituteOpp ret nz ld a, BATTLE_VARS_STATUS_OPP @@ -3750,8 +3702,6 @@ BattleCommand_PoisonTarget: ret BattleCommand_Poison: -; poison - ld hl, DoesntAffectText ld a, [wTypeModifier] and $7f @@ -3878,13 +3828,11 @@ PoisonOpponent: jp UpdateOpponentInParty BattleCommand_DrainTarget: -; draintarget call SapHealth ld hl, SuckedHealthText jp StdBattleTextbox BattleCommand_EatDream: -; eatdream call SapHealth ld hl, DreamEatenText jp StdBattleTextbox @@ -3983,8 +3931,6 @@ SapHealth: jp UpdateBattleMonInParty BattleCommand_BurnTarget: -; burntarget - xor a ld [wNumHits], a call CheckSubstituteOpp @@ -4049,8 +3995,6 @@ Defrost: jp StdBattleTextbox BattleCommand_FreezeTarget: -; freezetarget - xor a ld [wNumHits], a call CheckSubstituteOpp @@ -4102,8 +4046,6 @@ BattleCommand_FreezeTarget: ret BattleCommand_ParalyzeTarget: -; paralyzetarget - xor a ld [wNumHits], a call CheckSubstituteOpp @@ -4138,77 +4080,62 @@ BattleCommand_ParalyzeTarget: jp CallBattleCore BattleCommand_AttackUp: -; attackup ld b, ATTACK jr BattleCommand_StatUp BattleCommand_DefenseUp: -; defenseup ld b, DEFENSE jr BattleCommand_StatUp BattleCommand_SpeedUp: -; speedup ld b, SPEED jr BattleCommand_StatUp BattleCommand_SpecialAttackUp: -; specialattackup ld b, SP_ATTACK jr BattleCommand_StatUp BattleCommand_SpecialDefenseUp: -; specialdefenseup ld b, SP_DEFENSE jr BattleCommand_StatUp BattleCommand_AccuracyUp: -; accuracyup ld b, ACCURACY jr BattleCommand_StatUp BattleCommand_EvasionUp: -; evasionup ld b, EVASION jr BattleCommand_StatUp BattleCommand_AttackUp2: -; attackup2 ld b, $10 | ATTACK jr BattleCommand_StatUp BattleCommand_DefenseUp2: -; defenseup2 ld b, $10 | DEFENSE jr BattleCommand_StatUp BattleCommand_SpeedUp2: -; speedup2 ld b, $10 | SPEED jr BattleCommand_StatUp BattleCommand_SpecialAttackUp2: -; specialattackup2 ld b, $10 | SP_ATTACK jr BattleCommand_StatUp BattleCommand_SpecialDefenseUp2: -; specialdefenseup2 ld b, $10 | SP_DEFENSE jr BattleCommand_StatUp BattleCommand_AccuracyUp2: -; accuracyup2 ld b, $10 | ACCURACY jr BattleCommand_StatUp BattleCommand_EvasionUp2: -; evasionup2 ld b, $10 | EVASION jr BattleCommand_StatUp BattleCommand_StatUp: -; statup call RaiseStat ld a, [wFailedMessage] and a @@ -4339,77 +4266,61 @@ MinimizeDropSub: jp BattleCommand_MoveDelay BattleCommand_AttackDown: -; attackdown ld a, ATTACK jr BattleCommand_StatDown BattleCommand_DefenseDown: -; defensedown ld a, DEFENSE jr BattleCommand_StatDown BattleCommand_SpeedDown: -; speeddown ld a, SPEED jr BattleCommand_StatDown BattleCommand_SpecialAttackDown: -; specialattackdown ld a, SP_ATTACK jr BattleCommand_StatDown BattleCommand_SpecialDefenseDown: -; specialdefensedown ld a, SP_DEFENSE jr BattleCommand_StatDown BattleCommand_AccuracyDown: -; accuracydown ld a, ACCURACY jr BattleCommand_StatDown BattleCommand_EvasionDown: -; evasiondown ld a, EVASION jr BattleCommand_StatDown BattleCommand_AttackDown2: -; attackdown2 ld a, $10 | ATTACK jr BattleCommand_StatDown BattleCommand_DefenseDown2: -; defensedown2 ld a, $10 | DEFENSE jr BattleCommand_StatDown BattleCommand_SpeedDown2: -; speeddown2 ld a, $10 | SPEED jr BattleCommand_StatDown BattleCommand_SpecialAttackDown2: -; specialattackdown2 ld a, $10 | SP_ATTACK jr BattleCommand_StatDown BattleCommand_SpecialDefenseDown2: -; specialdefensedown2 ld a, $10 | SP_DEFENSE jr BattleCommand_StatDown BattleCommand_AccuracyDown2: -; accuracydown2 ld a, $10 | ACCURACY jr BattleCommand_StatDown BattleCommand_EvasionDown2: -; evasiondown2 ld a, $10 | EVASION BattleCommand_StatDown: -; statdown - ld [wLoweredStat], a call CheckMist @@ -4659,7 +4570,6 @@ TryLowerStat: ret BattleCommand_StatUpFailText: -; statupfailtext ld a, [wFailedMessage] and a ret z @@ -4677,7 +4587,6 @@ BattleCommand_StatUpFailText: jp StdBattleTextbox BattleCommand_StatDownFailText: -; statdownfailtext ld a, [wFailedMessage] and a ret z @@ -4719,8 +4628,6 @@ INCLUDE "data/battle/stat_names.asm" INCLUDE "data/battle/stat_multipliers.asm" BattleCommand_AllStatsUp: -; allstatsup - ; Attack call ResetMiss call BattleCommand_AttackUp @@ -4823,8 +4730,6 @@ LowerStat: ret BattleCommand_TriStatusChance: -; tristatuschance - call BattleCommand_EffectChance .loop ; 1/3 chance of each status @@ -4843,7 +4748,6 @@ BattleCommand_TriStatusChance: dw BattleCommand_BurnTarget ; burn BattleCommand_Curl: -; curl ld a, BATTLE_VARS_SUBSTATUS2 call GetBattleVarAddr set SUBSTATUS_CURLED, [hl] @@ -4984,8 +4888,6 @@ CalcBattleStats: INCLUDE "engine/battle/move_effects/bide.asm" BattleCommand_CheckRampage: -; checkrampage - ld de, wPlayerRolloutCount ldh a, [hBattleTurn] and a @@ -5021,8 +4923,6 @@ BattleCommand_CheckRampage: jp SkipToBattleCommand BattleCommand_Rampage: -; rampage - ; No rampage during Sleep Talk. ld a, BATTLE_VARS_STATUS call GetBattleVar @@ -5057,8 +4957,6 @@ SetBattleDraw: ret BattleCommand_ForceSwitch: -; forceswitch - ld a, [wBattleType] cp BATTLETYPE_SHINY jp z, .fail @@ -5305,8 +5203,6 @@ CheckPlayerHasMonToSwitchTo: ret BattleCommand_EndLoop: -; endloop - ; Loop back to 'critical'. ld de, wPlayerRolloutCount @@ -5523,8 +5419,6 @@ BattleCommand_HeldFlinch: ret BattleCommand_OHKO: -; ohko - call ResetDamage ld a, [wTypeModifier] and $7f @@ -5569,8 +5463,6 @@ BattleCommand_OHKO: ret BattleCommand_CheckCharge: -; checkcharge - ld a, BATTLE_VARS_SUBSTATUS3 call GetBattleVarAddr bit SUBSTATUS_CHARGED, [hl] @@ -5582,8 +5474,6 @@ BattleCommand_CheckCharge: jp SkipToBattleCommand BattleCommand_Charge: -; charge - call BattleCommand_ClearText ld a, BATTLE_VARS_STATUS call GetBattleVar @@ -5721,8 +5611,6 @@ BattleCommand_Unused3C: ret BattleCommand_TrapTarget: -; traptarget - ld a, [wAttackMissed] and a ret nz @@ -5781,8 +5669,6 @@ INCLUDE "engine/battle/move_effects/mist.asm" INCLUDE "engine/battle/move_effects/focus_energy.asm" BattleCommand_Recoil: -; recoil - ld hl, wBattleMonMaxHP ldh a, [hBattleTurn] and a @@ -5845,8 +5731,6 @@ BattleCommand_Recoil: jp StdBattleTextbox BattleCommand_ConfuseTarget: -; confusetarget - call GetOpponentItem ld a, b cp HELD_PREVENT_CONFUSE @@ -5865,8 +5749,6 @@ BattleCommand_ConfuseTarget: jr BattleCommand_FinishConfusingTarget BattleCommand_Confuse: -; confuse - call GetOpponentItem ld a, b cp HELD_PREVENT_CONFUSE @@ -5948,8 +5830,6 @@ BattleCommand_Confuse_CheckSnore_Swagger_ConfuseHit: jp PrintDidntAffect2 BattleCommand_Paralyze: -; paralyze - ld a, BATTLE_VARS_STATUS_OPP call GetBattleVar bit PAR, a @@ -6065,7 +5945,6 @@ CheckMoveTypeMatchesTarget: INCLUDE "engine/battle/move_effects/substitute.asm" BattleCommand_RechargeNextTurn: -; rechargenextturn ld a, BATTLE_VARS_SUBSTATUS4 call GetBattleVarAddr set SUBSTATUS_RECHARGE, [hl] @@ -6082,7 +5961,6 @@ EndRechargeOpp: INCLUDE "engine/battle/move_effects/rage.asm" BattleCommand_DoubleFlyingDamage: -; doubleflyingdamage ld a, BATTLE_VARS_SUBSTATUS3_OPP call GetBattleVar bit SUBSTATUS_FLYING, a @@ -6090,7 +5968,6 @@ BattleCommand_DoubleFlyingDamage: jr DoubleDamage BattleCommand_DoubleUndergroundDamage: -; doubleundergrounddamage ld a, BATTLE_VARS_SUBSTATUS3_OPP call GetBattleVar bit SUBSTATUS_UNDERGROUND, a @@ -6124,8 +6001,6 @@ INCLUDE "engine/battle/move_effects/pay_day.asm" INCLUDE "engine/battle/move_effects/conversion.asm" BattleCommand_ResetStats: -; resetstats - ld a, BASE_STAT_LEVEL ld hl, wPlayerStatLevels call .Fill @@ -6157,8 +6032,6 @@ BattleCommand_ResetStats: ret BattleCommand_Heal: -; heal - ld de, wBattleMonHP ld hl, wBattleMonMaxHP ldh a, [hBattleTurn] @@ -6273,8 +6146,6 @@ ResetActorDisable: ret BattleCommand_Screen: -; screen - ld hl, wPlayerScreens ld bc, wPlayerLightScreenCount ldh a, [hBattleTurn] @@ -6318,12 +6189,10 @@ BattleCommand_Screen: jp PrintButItFailed PrintDoesntAffect: -; 'it doesn't affect' ld hl, DoesntAffectText jp StdBattleTextbox PrintNothingHappened: -; 'but nothing happened!' ld hl, NothingHappenedText jp StdBattleTextbox @@ -6335,7 +6204,6 @@ TryPrintButItFailed: ; fallthrough PrintButItFailed: -; 'but it failed!' ld hl, ButItFailedText jp StdBattleTextbox @@ -6349,7 +6217,6 @@ FailMimic: jp FailText_CheckOpponentProtect PrintDidntAffect: -; 'it didn't affect' ld hl, DidntAffect1Text jp StdBattleTextbox @@ -6417,8 +6284,6 @@ ResetTurn: INCLUDE "engine/battle/move_effects/thief.asm" BattleCommand_ArenaTrap: -; arenatrap - ; Doesn't work on an absent opponent. call CheckHiddenOpponent @@ -6445,8 +6310,6 @@ BattleCommand_ArenaTrap: INCLUDE "engine/battle/move_effects/nightmare.asm" BattleCommand_Defrost: -; defrost - ; Thaw the user. ld a, BATTLE_VARS_STATUS @@ -6521,7 +6384,6 @@ SafeCheckSafeguard: ret BattleCommand_CheckSafeguard: -; checksafeguard ld hl, wEnemyScreens ldh a, [hBattleTurn] and a @@ -6546,17 +6408,14 @@ INCLUDE "engine/battle/move_effects/pursuit.asm" INCLUDE "engine/battle/move_effects/rapid_spin.asm" BattleCommand_HealMorn: -; healmorn ld b, MORN_F jr BattleCommand_TimeBasedHealContinue BattleCommand_HealDay: -; healday ld b, DAY_F jr BattleCommand_TimeBasedHealContinue BattleCommand_HealNite: -; healnite ld b, NITE_F ; fallthrough @@ -6655,8 +6514,6 @@ INCLUDE "engine/battle/move_effects/psych_up.asm" INCLUDE "engine/battle/move_effects/mirror_coat.asm" BattleCommand_DoubleMinimizeDamage: -; doubleminimizedamage - ld hl, wEnemyMinimized ldh a, [hBattleTurn] and a @@ -6850,14 +6707,11 @@ AnimateFailedMove: jp BattleCommand_RaiseSub BattleCommand_MoveDelay: -; movedelay ; Wait 40 frames. ld c, 40 jp DelayFrames BattleCommand_ClearText: -; cleartext - ; Used in multi-hit moves. ld hl, .text jp BattleTextbox diff --git a/engine/battle/move_effects/attract.asm b/engine/battle/move_effects/attract.asm index 5eb82d65e..8bca67ebf 100644 --- a/engine/battle/move_effects/attract.asm +++ b/engine/battle/move_effects/attract.asm @@ -1,5 +1,4 @@ BattleCommand_Attract: -; attract ld a, [wAttackMissed] and a jr nz, .failed diff --git a/engine/battle/move_effects/baton_pass.asm b/engine/battle/move_effects/baton_pass.asm index bafe33866..622aa2b4c 100644 --- a/engine/battle/move_effects/baton_pass.asm +++ b/engine/battle/move_effects/baton_pass.asm @@ -1,6 +1,4 @@ BattleCommand_BatonPass: -; batonpass - ldh a, [hBattleTurn] and a jp nz, .Enemy diff --git a/engine/battle/move_effects/beat_up.asm b/engine/battle/move_effects/beat_up.asm index 2bd6cb458..a57fcd786 100644 --- a/engine/battle/move_effects/beat_up.asm +++ b/engine/battle/move_effects/beat_up.asm @@ -1,6 +1,4 @@ BattleCommand_BeatUp: -; beatup - call ResetDamage ldh a, [hBattleTurn] and a @@ -198,8 +196,6 @@ BattleCommand_BeatUp: jp SkipToBattleCommand BattleCommand_BeatUpFailText: -; beatupfailtext - ld a, [wBeatUpHitAtLeastOnce] and a ret nz diff --git a/engine/battle/move_effects/belly_drum.asm b/engine/battle/move_effects/belly_drum.asm index 912f702bd..3594e5e6d 100644 --- a/engine/battle/move_effects/belly_drum.asm +++ b/engine/battle/move_effects/belly_drum.asm @@ -1,5 +1,4 @@ BattleCommand_BellyDrum: -; bellydrum ; This command is buggy because it raises the user's attack ; before checking that it has enough HP to use the move. ; Swap the order of these two blocks to fix. diff --git a/engine/battle/move_effects/bide.asm b/engine/battle/move_effects/bide.asm index 300ff8c7c..7181918f3 100644 --- a/engine/battle/move_effects/bide.asm +++ b/engine/battle/move_effects/bide.asm @@ -1,6 +1,4 @@ BattleCommand_StoreEnergy: -; storeenergy - ld a, BATTLE_VARS_SUBSTATUS3 call GetBattleVar bit SUBSTATUS_BIDE, a @@ -70,8 +68,6 @@ BattleCommand_StoreEnergy: jp EndMoveEffect BattleCommand_UnleashEnergy: -; unleashenergy - ld de, wPlayerDamageTaken ld bc, wPlayerRolloutCount ldh a, [hBattleTurn] diff --git a/engine/battle/move_effects/conversion.asm b/engine/battle/move_effects/conversion.asm index b67ed9924..2a7b0799a 100644 --- a/engine/battle/move_effects/conversion.asm +++ b/engine/battle/move_effects/conversion.asm @@ -1,6 +1,4 @@ BattleCommand_Conversion: -; conversion - ld hl, wBattleMonMoves ld de, wBattleMonType1 ldh a, [hBattleTurn] diff --git a/engine/battle/move_effects/conversion2.asm b/engine/battle/move_effects/conversion2.asm index 32d4502e3..7bd6bfef6 100644 --- a/engine/battle/move_effects/conversion2.asm +++ b/engine/battle/move_effects/conversion2.asm @@ -1,6 +1,4 @@ BattleCommand_Conversion2: -; conversion2 - ld a, [wAttackMissed] and a jr nz, .failed diff --git a/engine/battle/move_effects/counter.asm b/engine/battle/move_effects/counter.asm index 031c399a6..3da636da9 100644 --- a/engine/battle/move_effects/counter.asm +++ b/engine/battle/move_effects/counter.asm @@ -1,6 +1,4 @@ BattleCommand_Counter: -; counter - ld a, 1 ld [wAttackMissed], a ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP diff --git a/engine/battle/move_effects/curse.asm b/engine/battle/move_effects/curse.asm index 049e79e5e..1fe32c798 100644 --- a/engine/battle/move_effects/curse.asm +++ b/engine/battle/move_effects/curse.asm @@ -1,6 +1,4 @@ BattleCommand_Curse: -; curse - ld de, wBattleMonType1 ld bc, wPlayerStatLevels ldh a, [hBattleTurn] diff --git a/engine/battle/move_effects/destiny_bond.asm b/engine/battle/move_effects/destiny_bond.asm index 6a03b9a76..365f66e34 100644 --- a/engine/battle/move_effects/destiny_bond.asm +++ b/engine/battle/move_effects/destiny_bond.asm @@ -1,6 +1,4 @@ BattleCommand_DestinyBond: -; destinybond - ld a, BATTLE_VARS_SUBSTATUS5 call GetBattleVarAddr set SUBSTATUS_DESTINY_BOND, [hl] diff --git a/engine/battle/move_effects/disable.asm b/engine/battle/move_effects/disable.asm index 4020aa886..4b11d5c72 100644 --- a/engine/battle/move_effects/disable.asm +++ b/engine/battle/move_effects/disable.asm @@ -1,6 +1,4 @@ BattleCommand_Disable: -; disable - ld a, [wAttackMissed] and a jr nz, .failed diff --git a/engine/battle/move_effects/encore.asm b/engine/battle/move_effects/encore.asm index 8ca3595f3..a84cb5398 100644 --- a/engine/battle/move_effects/encore.asm +++ b/engine/battle/move_effects/encore.asm @@ -1,6 +1,4 @@ BattleCommand_Encore: -; encore - ld hl, wEnemyMonMoves ld de, wEnemyEncoreCount ldh a, [hBattleTurn] diff --git a/engine/battle/move_effects/endure.asm b/engine/battle/move_effects/endure.asm index 00ccb130c..f23d71833 100644 --- a/engine/battle/move_effects/endure.asm +++ b/engine/battle/move_effects/endure.asm @@ -1,6 +1,4 @@ BattleCommand_Endure: -; endure - ; Endure shares code with Protect. See protect.asm. call ProtectChance diff --git a/engine/battle/move_effects/false_swipe.asm b/engine/battle/move_effects/false_swipe.asm index e2e0c6f10..61ffa616f 100644 --- a/engine/battle/move_effects/false_swipe.asm +++ b/engine/battle/move_effects/false_swipe.asm @@ -1,6 +1,4 @@ BattleCommand_FalseSwipe: -; falseswipe - ; Makes sure wCurDamage < MonHP ld hl, wEnemyMonHP diff --git a/engine/battle/move_effects/focus_energy.asm b/engine/battle/move_effects/focus_energy.asm index c4eb1f334..d1dd04b49 100644 --- a/engine/battle/move_effects/focus_energy.asm +++ b/engine/battle/move_effects/focus_energy.asm @@ -1,6 +1,4 @@ BattleCommand_FocusEnergy: -; focusenergy - ld a, BATTLE_VARS_SUBSTATUS4 call GetBattleVarAddr bit SUBSTATUS_FOCUS_ENERGY, [hl] diff --git a/engine/battle/move_effects/foresight.asm b/engine/battle/move_effects/foresight.asm index ff25b04eb..8aba15754 100644 --- a/engine/battle/move_effects/foresight.asm +++ b/engine/battle/move_effects/foresight.asm @@ -1,6 +1,4 @@ BattleCommand_Foresight: -; foresight - ld a, [wAttackMissed] and a jr nz, .failed diff --git a/engine/battle/move_effects/frustration.asm b/engine/battle/move_effects/frustration.asm index b8f5529a2..e1ccf580b 100644 --- a/engine/battle/move_effects/frustration.asm +++ b/engine/battle/move_effects/frustration.asm @@ -1,5 +1,4 @@ BattleCommand_FrustrationPower: -; frustrationpower push bc ld hl, wBattleMonHappiness ldh a, [hBattleTurn] diff --git a/engine/battle/move_effects/fury_cutter.asm b/engine/battle/move_effects/fury_cutter.asm index a12848499..c839d8881 100644 --- a/engine/battle/move_effects/fury_cutter.asm +++ b/engine/battle/move_effects/fury_cutter.asm @@ -1,6 +1,4 @@ BattleCommand_FuryCutter: -; furycutter - ld hl, wPlayerFuryCutterCount ldh a, [hBattleTurn] and a diff --git a/engine/battle/move_effects/future_sight.asm b/engine/battle/move_effects/future_sight.asm index 129a9e08f..5dae084cf 100644 --- a/engine/battle/move_effects/future_sight.asm +++ b/engine/battle/move_effects/future_sight.asm @@ -1,6 +1,4 @@ BattleCommand_CheckFutureSight: -; checkfuturesight - ld hl, wPlayerFutureSightCount ld de, wPlayerFutureSightDamage ldh a, [hBattleTurn] @@ -26,8 +24,6 @@ BattleCommand_CheckFutureSight: jp SkipToBattleCommand BattleCommand_FutureSight: -; futuresight - call CheckUserIsCharging jr nz, .AlreadyChargingFutureSight ld a, BATTLE_VARS_MOVE_ANIM diff --git a/engine/battle/move_effects/heal_bell.asm b/engine/battle/move_effects/heal_bell.asm index 62309f1db..ec2251036 100644 --- a/engine/battle/move_effects/heal_bell.asm +++ b/engine/battle/move_effects/heal_bell.asm @@ -1,6 +1,4 @@ BattleCommand_HealBell: -; healbell - ld a, BATTLE_VARS_SUBSTATUS1 call GetBattleVarAddr res SUBSTATUS_NIGHTMARE, [hl] diff --git a/engine/battle/move_effects/hidden_power.asm b/engine/battle/move_effects/hidden_power.asm index 3b40a6c31..59b718f0c 100644 --- a/engine/battle/move_effects/hidden_power.asm +++ b/engine/battle/move_effects/hidden_power.asm @@ -1,6 +1,4 @@ BattleCommand_HiddenPower: -; hiddenpower - ld a, [wAttackMissed] and a ret nz diff --git a/engine/battle/move_effects/leech_seed.asm b/engine/battle/move_effects/leech_seed.asm index bb17ee00c..f52820339 100644 --- a/engine/battle/move_effects/leech_seed.asm +++ b/engine/battle/move_effects/leech_seed.asm @@ -1,5 +1,4 @@ BattleCommand_LeechSeed: -; leechseed ld a, [wAttackMissed] and a jr nz, .evaded diff --git a/engine/battle/move_effects/lock_on.asm b/engine/battle/move_effects/lock_on.asm index 1de3e14ba..5b0733c0b 100644 --- a/engine/battle/move_effects/lock_on.asm +++ b/engine/battle/move_effects/lock_on.asm @@ -1,6 +1,4 @@ BattleCommand_LockOn: -; lockon - call CheckSubstituteOpp jr nz, .fail diff --git a/engine/battle/move_effects/magnitude.asm b/engine/battle/move_effects/magnitude.asm index 87510db05..aedbd9e17 100644 --- a/engine/battle/move_effects/magnitude.asm +++ b/engine/battle/move_effects/magnitude.asm @@ -1,6 +1,4 @@ BattleCommand_GetMagnitude: -; getmagnitude - push bc call BattleRandom ld b, a diff --git a/engine/battle/move_effects/metronome.asm b/engine/battle/move_effects/metronome.asm index ab1c6a6c9..7f0a48d9f 100644 --- a/engine/battle/move_effects/metronome.asm +++ b/engine/battle/move_effects/metronome.asm @@ -1,6 +1,4 @@ BattleCommand_Metronome: -; metronome - call ClearLastMove call CheckUserIsCharging jr nz, .charging diff --git a/engine/battle/move_effects/mimic.asm b/engine/battle/move_effects/mimic.asm index a8bc1e11a..94db47e31 100644 --- a/engine/battle/move_effects/mimic.asm +++ b/engine/battle/move_effects/mimic.asm @@ -1,6 +1,4 @@ BattleCommand_Mimic: -; mimic - call ClearLastMove call BattleCommand_MoveDelay ld a, [wAttackMissed] diff --git a/engine/battle/move_effects/mirror_coat.asm b/engine/battle/move_effects/mirror_coat.asm index 96afa3175..23f2bc717 100644 --- a/engine/battle/move_effects/mirror_coat.asm +++ b/engine/battle/move_effects/mirror_coat.asm @@ -1,6 +1,4 @@ BattleCommand_MirrorCoat: -; mirrorcoat - ld a, 1 ld [wAttackMissed], a diff --git a/engine/battle/move_effects/mirror_move.asm b/engine/battle/move_effects/mirror_move.asm index e3ac3e1c6..96d0c4f7e 100644 --- a/engine/battle/move_effects/mirror_move.asm +++ b/engine/battle/move_effects/mirror_move.asm @@ -1,6 +1,4 @@ BattleCommand_MirrorMove: -; mirrormove - call ClearLastMove ld a, BATTLE_VARS_MOVE diff --git a/engine/battle/move_effects/mist.asm b/engine/battle/move_effects/mist.asm index 26fafdd2d..eb240c7a1 100644 --- a/engine/battle/move_effects/mist.asm +++ b/engine/battle/move_effects/mist.asm @@ -1,6 +1,4 @@ BattleCommand_Mist: -; mist - ld a, BATTLE_VARS_SUBSTATUS4 call GetBattleVarAddr bit SUBSTATUS_MIST, [hl] diff --git a/engine/battle/move_effects/nightmare.asm b/engine/battle/move_effects/nightmare.asm index 9354b15bb..192cd743c 100644 --- a/engine/battle/move_effects/nightmare.asm +++ b/engine/battle/move_effects/nightmare.asm @@ -1,6 +1,4 @@ BattleCommand_Nightmare: -; nightmare - ; Can't hit an absent opponent. call CheckHiddenOpponent diff --git a/engine/battle/move_effects/pain_split.asm b/engine/battle/move_effects/pain_split.asm index 5831ca392..13faca053 100644 --- a/engine/battle/move_effects/pain_split.asm +++ b/engine/battle/move_effects/pain_split.asm @@ -1,6 +1,4 @@ BattleCommand_PainSplit: -; painsplit - ld a, [wAttackMissed] and a jp nz, .ButItFailed diff --git a/engine/battle/move_effects/pay_day.asm b/engine/battle/move_effects/pay_day.asm index 5f857aea5..f05b4d66a 100644 --- a/engine/battle/move_effects/pay_day.asm +++ b/engine/battle/move_effects/pay_day.asm @@ -1,6 +1,4 @@ BattleCommand_PayDay: -; payday - xor a ld hl, wStringBuffer1 ld [hli], a diff --git a/engine/battle/move_effects/perish_song.asm b/engine/battle/move_effects/perish_song.asm index 1758b65a0..bfacf5281 100644 --- a/engine/battle/move_effects/perish_song.asm +++ b/engine/battle/move_effects/perish_song.asm @@ -1,6 +1,4 @@ BattleCommand_PerishSong: -; perishsong - ld hl, wPlayerSubStatus1 ld de, wEnemySubStatus1 bit SUBSTATUS_PERISH, [hl] diff --git a/engine/battle/move_effects/present.asm b/engine/battle/move_effects/present.asm index 6aa35acbf..03424ad7e 100644 --- a/engine/battle/move_effects/present.asm +++ b/engine/battle/move_effects/present.asm @@ -1,6 +1,4 @@ BattleCommand_Present: -; present - ld a, [wLinkMode] cp LINK_COLOSSEUM jr z, .colosseum_skippush diff --git a/engine/battle/move_effects/protect.asm b/engine/battle/move_effects/protect.asm index bcfdacdfc..7e61ee71e 100644 --- a/engine/battle/move_effects/protect.asm +++ b/engine/battle/move_effects/protect.asm @@ -1,5 +1,4 @@ BattleCommand_Protect: -; protect call ProtectChance ret c diff --git a/engine/battle/move_effects/psych_up.asm b/engine/battle/move_effects/psych_up.asm index 1bf9f3e6f..06006f9a6 100644 --- a/engine/battle/move_effects/psych_up.asm +++ b/engine/battle/move_effects/psych_up.asm @@ -1,6 +1,4 @@ BattleCommand_PsychUp: -; psychup - ld hl, wEnemyStatLevels ld de, wPlayerStatLevels ldh a, [hBattleTurn] diff --git a/engine/battle/move_effects/pursuit.asm b/engine/battle/move_effects/pursuit.asm index f8979fb9f..397c0a026 100644 --- a/engine/battle/move_effects/pursuit.asm +++ b/engine/battle/move_effects/pursuit.asm @@ -1,5 +1,4 @@ BattleCommand_Pursuit: -; pursuit ; Double damage if the opponent is switching. ld hl, wEnemyIsSwitching diff --git a/engine/battle/move_effects/rage.asm b/engine/battle/move_effects/rage.asm index df206a6bf..fbe7ef139 100644 --- a/engine/battle/move_effects/rage.asm +++ b/engine/battle/move_effects/rage.asm @@ -1,5 +1,4 @@ BattleCommand_Rage: -; rage ld a, BATTLE_VARS_SUBSTATUS4 call GetBattleVarAddr set SUBSTATUS_RAGE, [hl] diff --git a/engine/battle/move_effects/rain_dance.asm b/engine/battle/move_effects/rain_dance.asm index c22fb9fdb..1b31325d4 100644 --- a/engine/battle/move_effects/rain_dance.asm +++ b/engine/battle/move_effects/rain_dance.asm @@ -1,5 +1,4 @@ BattleCommand_StartRain: -; startrain ld a, WEATHER_RAIN ld [wBattleWeather], a ld a, 5 diff --git a/engine/battle/move_effects/rapid_spin.asm b/engine/battle/move_effects/rapid_spin.asm index eb396a35d..beac7af45 100644 --- a/engine/battle/move_effects/rapid_spin.asm +++ b/engine/battle/move_effects/rapid_spin.asm @@ -1,6 +1,4 @@ BattleCommand_ClearHazards: -; clearhazards - ld a, BATTLE_VARS_SUBSTATUS4 call GetBattleVarAddr bit SUBSTATUS_LEECH_SEED, [hl] diff --git a/engine/battle/move_effects/return.asm b/engine/battle/move_effects/return.asm index 7c7c5fcb2..90574c234 100644 --- a/engine/battle/move_effects/return.asm +++ b/engine/battle/move_effects/return.asm @@ -1,5 +1,4 @@ BattleCommand_HappinessPower: -; happinesspower push bc ld hl, wBattleMonHappiness ldh a, [hBattleTurn] diff --git a/engine/battle/move_effects/rollout.asm b/engine/battle/move_effects/rollout.asm index 8249bce89..0b5124317 100644 --- a/engine/battle/move_effects/rollout.asm +++ b/engine/battle/move_effects/rollout.asm @@ -1,8 +1,6 @@ DEF MAX_ROLLOUT_COUNT EQU 5 BattleCommand_CheckCurl: -; checkcurl - ld de, wPlayerRolloutCount ldh a, [hBattleTurn] and a @@ -23,8 +21,6 @@ BattleCommand_CheckCurl: ret BattleCommand_RolloutPower: -; rolloutpower - ld a, BATTLE_VARS_STATUS call GetBattleVar and SLP diff --git a/engine/battle/move_effects/safeguard.asm b/engine/battle/move_effects/safeguard.asm index e64e80921..0833f0ab0 100644 --- a/engine/battle/move_effects/safeguard.asm +++ b/engine/battle/move_effects/safeguard.asm @@ -1,6 +1,4 @@ BattleCommand_Safeguard: -; safeguard - ld hl, wPlayerScreens ld de, wPlayerSafeguardCount ldh a, [hBattleTurn] diff --git a/engine/battle/move_effects/sandstorm.asm b/engine/battle/move_effects/sandstorm.asm index c88529fb1..d05280654 100644 --- a/engine/battle/move_effects/sandstorm.asm +++ b/engine/battle/move_effects/sandstorm.asm @@ -1,6 +1,4 @@ BattleCommand_StartSandstorm: -; startsandstorm - ld a, [wBattleWeather] cp WEATHER_SANDSTORM jr z, .failed diff --git a/engine/battle/move_effects/sketch.asm b/engine/battle/move_effects/sketch.asm index aa5410989..492fe445f 100644 --- a/engine/battle/move_effects/sketch.asm +++ b/engine/battle/move_effects/sketch.asm @@ -1,6 +1,4 @@ BattleCommand_Sketch: -; sketch - call ClearLastMove ; Don't sketch during a link battle ld a, [wLinkMode] diff --git a/engine/battle/move_effects/sleep_talk.asm b/engine/battle/move_effects/sleep_talk.asm index 96522af23..c0d7f8b74 100644 --- a/engine/battle/move_effects/sleep_talk.asm +++ b/engine/battle/move_effects/sleep_talk.asm @@ -1,6 +1,4 @@ BattleCommand_SleepTalk: -; sleeptalk - call ClearLastMove ld a, [wAttackMissed] and a diff --git a/engine/battle/move_effects/snore.asm b/engine/battle/move_effects/snore.asm index e2432c59f..ade87551c 100644 --- a/engine/battle/move_effects/snore.asm +++ b/engine/battle/move_effects/snore.asm @@ -1,5 +1,4 @@ BattleCommand_Snore: -; snore ld a, BATTLE_VARS_STATUS call GetBattleVar and SLP diff --git a/engine/battle/move_effects/spikes.asm b/engine/battle/move_effects/spikes.asm index 69752c8f6..24683cc59 100644 --- a/engine/battle/move_effects/spikes.asm +++ b/engine/battle/move_effects/spikes.asm @@ -1,6 +1,4 @@ BattleCommand_Spikes: -; spikes - ld hl, wEnemyScreens ldh a, [hBattleTurn] and a diff --git a/engine/battle/move_effects/spite.asm b/engine/battle/move_effects/spite.asm index 0244f778c..7e31a3fe1 100644 --- a/engine/battle/move_effects/spite.asm +++ b/engine/battle/move_effects/spite.asm @@ -1,6 +1,4 @@ BattleCommand_Spite: -; spite - ld a, [wAttackMissed] and a jp nz, .failed diff --git a/engine/battle/move_effects/substitute.asm b/engine/battle/move_effects/substitute.asm index 25209c23b..cc3de90c0 100644 --- a/engine/battle/move_effects/substitute.asm +++ b/engine/battle/move_effects/substitute.asm @@ -1,6 +1,4 @@ BattleCommand_Substitute: -; substitute - call BattleCommand_MoveDelay ld hl, wBattleMonMaxHP ld de, wPlayerSubstituteHP diff --git a/engine/battle/move_effects/sunny_day.asm b/engine/battle/move_effects/sunny_day.asm index 0edc38e45..c45c86f80 100644 --- a/engine/battle/move_effects/sunny_day.asm +++ b/engine/battle/move_effects/sunny_day.asm @@ -1,5 +1,4 @@ BattleCommand_StartSun: -; startsun ld a, WEATHER_SUN ld [wBattleWeather], a ld a, 5 diff --git a/engine/battle/move_effects/teleport.asm b/engine/battle/move_effects/teleport.asm index 36d3bed72..454fd8bbd 100644 --- a/engine/battle/move_effects/teleport.asm +++ b/engine/battle/move_effects/teleport.asm @@ -1,6 +1,4 @@ BattleCommand_Teleport: -; teleport - ld a, [wBattleType] cp BATTLETYPE_SHINY jr z, .failed diff --git a/engine/battle/move_effects/thief.asm b/engine/battle/move_effects/thief.asm index 73bbf595e..bc31ca390 100644 --- a/engine/battle/move_effects/thief.asm +++ b/engine/battle/move_effects/thief.asm @@ -1,6 +1,4 @@ BattleCommand_Thief: -; thief - ldh a, [hBattleTurn] and a jr nz, .enemy diff --git a/engine/battle/move_effects/thunder.asm b/engine/battle/move_effects/thunder.asm index b2a643787..3e9b628dd 100644 --- a/engine/battle/move_effects/thunder.asm +++ b/engine/battle/move_effects/thunder.asm @@ -1,6 +1,4 @@ BattleCommand_ThunderAccuracy: -; thunderaccuracy - ld a, BATTLE_VARS_MOVE_TYPE call GetBattleVarAddr inc hl diff --git a/engine/battle/move_effects/transform.asm b/engine/battle/move_effects/transform.asm index 734eedd6c..7d3a7efcf 100644 --- a/engine/battle/move_effects/transform.asm +++ b/engine/battle/move_effects/transform.asm @@ -1,6 +1,4 @@ BattleCommand_Transform: -; transform - call ClearLastMove ld a, BATTLE_VARS_SUBSTATUS5_OPP call GetBattleVarAddr diff --git a/engine/battle/move_effects/triple_kick.asm b/engine/battle/move_effects/triple_kick.asm index a192ddaaa..b9e8d8bf5 100644 --- a/engine/battle/move_effects/triple_kick.asm +++ b/engine/battle/move_effects/triple_kick.asm @@ -1,6 +1,4 @@ BattleCommand_TripleKick: -; triplekick - ld a, [wBattleAnimParam] ld b, a inc b @@ -27,8 +25,6 @@ BattleCommand_TripleKick: ret BattleCommand_KickCounter: -; kickcounter - ld hl, wBattleAnimParam inc [hl] ret diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index 50190a02e..ce20d7036 100644 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -278,7 +278,6 @@ FlashFunction: ret .CheckUseFlash: -; Flash ld de, ENGINE_ZEPHYRBADGE farcall CheckBadge jr c, .nozephyrbadge @@ -557,7 +556,6 @@ FlyFunction: dw .FailFly .TryFly: -; Fly ld de, ENGINE_STORMBADGE call CheckBadge jr c, .nostormbadge @@ -637,7 +635,6 @@ WaterfallFunction: ret .TryWaterfall: -; Waterfall ld de, ENGINE_RISINGBADGE farcall CheckBadge ld a, $80 @@ -963,7 +960,6 @@ StrengthFunction: ret .TryStrength: -; Strength ld de, ENGINE_PLAINBADGE call CheckBadge jr c, .Failed diff --git a/mobile/mobile_41.asm b/mobile/mobile_41.asm index ef01f5fc0..1546b2c14 100644 --- a/mobile/mobile_41.asm +++ b/mobile/mobile_41.asm @@ -391,17 +391,17 @@ StubbedTrainerRankings_Unused3: ; unreferenced ld hl, sTrainerRankingUnused3 jr StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_ColosseumWins: ; win +StubbedTrainerRankings_ColosseumWins: ret ld hl, sTrainerRankingColosseumWins jr StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_ColosseumLosses: ; lose +StubbedTrainerRankings_ColosseumLosses: ret ld hl, sTrainerRankingColosseumLosses jr StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_ColosseumDraws: ; draw +StubbedTrainerRankings_ColosseumDraws: ret ld hl, sTrainerRankingColosseumDraws jr StubbedTrainerRankings_Increment3Byte