Skip to content

Commit

Permalink
Clean up battle scripts (rh-hideout#4839)
Browse files Browse the repository at this point in the history
* Clean up battle and anim scripts

* Revert anim cleanup
  • Loading branch information
Bassoonian authored Jul 15, 2024
1 parent b5a7185 commit cfcac0b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
44 changes: 0 additions & 44 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -758,13 +758,11 @@ BattleScript_OctolockEndTurn::
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, STAT_CHANGE_NEGATIVE
setstatchanger STAT_DEF, 1, TRUE
statbuffchange STAT_CHANGE_ALLOW_PTR | STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_OctolockTryLowerSpDef
BattleScript_OctolockTryLowerDef:
printfromtable gStatDownStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_OctolockTryLowerSpDef:
setstatchanger STAT_SPDEF, 1, TRUE
statbuffchange STAT_CHANGE_ALLOW_PTR | STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_OctlockTurnDmgEnd
BattleScript_OctolockTurnDmgPrintMsg:
printfromtable gStatDownStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_OctlockTurnDmgEnd:
Expand Down Expand Up @@ -904,7 +902,6 @@ BattleScript_EffectStuffCheeks::
jumpifnotberry BS_ATTACKER, BattleScript_ButItFailed
attackanimation
waitanimation
BattleScript_StuffCheeksEatBerry:
setbyte sBERRY_OVERRIDE, 1
orword gHitMarker, HITMARKER_DISABLE_ANIMATION
consumeberry BS_ATTACKER, TRUE
Expand Down Expand Up @@ -1116,10 +1113,6 @@ BattleScript_StrengthSapLower:
waitmessage B_WAIT_TIME_LONG
goto BattleScript_StrengthSapHp
@ Drain HP without lowering a stat
BattleScript_StrengthSapTryHp:
jumpiffullhp BS_ATTACKER, BattleScript_ButItFailed
attackanimation
waitanimation
BattleScript_StrengthSapHp:
jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_StrengthSapManipulateDmg
jumpifstatus3 BS_ATTACKER, STATUS3_HEAL_BLOCK, BattleScript_MoveEnd
Expand Down Expand Up @@ -1250,8 +1243,6 @@ BattleScript_EffectPartingShotTrySpAtk:
BattleScript_EffectPartingShotSwitch:
moveendall
goto BattleScript_MoveSwitch
BattleScript_PartingShotEnd:
end

BattleScript_EffectPowder::
attackcanceler
Expand Down Expand Up @@ -1454,7 +1445,6 @@ BattleScript_RototillerLoop:
jumpifstat BS_TARGET, CMP_EQUAL, STAT_SPATK, MAX_STAT_STAGE, BattleScript_RototillerCantRaiseMultipleStats
BattleScript_RototillerCheckAffected:
jumpifnotrototilleraffected BS_TARGET, BattleScript_RototillerNoEffect
BattleScript_RototillerAffected:
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_SPATK, 0
setstatchanger STAT_ATK, 1, FALSE
Expand Down Expand Up @@ -1685,7 +1675,6 @@ BattleScript_EffectAutotomize::
BattleScript_AutotomizeAttackAnim::
attackanimation
waitanimation
BattleScript_AutotomizeDoAnim::
setgraphicalstatchangevalues
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_AutotomizePrintString::
Expand Down Expand Up @@ -2596,7 +2585,6 @@ BattleScript_TryTailwindAbilitiesLoop_Iter:
BattleScript_TryTailwindAbilitiesLoop_Increment:
addbyte gBattlerTarget, 0x1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TryTailwindAbilitiesLoop_Iter
BattleScript_TryTailwindAbilitiesLoop_Ret:
restoretarget
return

Expand Down Expand Up @@ -2697,7 +2685,6 @@ BattleScript_EffectPlaceholder::
goto BattleScript_MoveEnd

BattleScript_EffectHit::
BattleScript_HitFromAtkCanceler::
attackcanceler
BattleScript_HitFromAccCheck::
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
Expand Down Expand Up @@ -3187,14 +3174,6 @@ BattleScript_RoarBlockedByDynamax:
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd

BattleScript_EffectMultiHit::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
setmultihitcounter 0
initmultihitstring
sethword sMULTIHIT_EFFECT, 0
BattleScript_MultiHitLoop::
jumpifhasnohp BS_ATTACKER, BattleScript_MultiHitEnd
jumpifhasnohp BS_TARGET, BattleScript_MultiHitPrintStrings
Expand Down Expand Up @@ -3607,7 +3586,6 @@ BattleScript_EffectParalyze::
jumpifshieldsdown BS_TARGET, BattleScript_AbilityProtectsDoesntAffect
jumpifsubstituteblocks BattleScript_ButItFailed
typecalc
BattleScript_BattleScript_EffectParalyzeNoTypeCalc:
jumpifmovehadnoeffect BattleScript_ButItFailed
jumpifstatus BS_TARGET, STATUS1_PARALYSIS, BattleScript_AlreadyParalyzed
jumpifelectricabilityaffected BS_TARGET, ABILITY_VOLT_ABSORB, BattleScript_VoltAbsorbHeal
Expand Down Expand Up @@ -4534,7 +4512,6 @@ BattleScript_EffectTeleport::
.else
jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_FailedFromAtkCanceler
.endif
BattleScript_EffectTeleportTryToRunAway:
attackcanceler
attackstring
ppreduce
Expand Down Expand Up @@ -6394,7 +6371,6 @@ BattleScript_WindPowerActivates::
setcharge BS_TARGET
printstring STRINGID_BEINGHITCHARGEDPKMNWITHPOWER
waitmessage B_WAIT_TIME_LONG
BattleScript_WindPowerActivates_Ret:
return

BattleScript_ToxicDebrisActivates::
Expand Down Expand Up @@ -7081,7 +7057,6 @@ BattleScript_CottonDownTargetSpeedCantGoLower:
BattleScript_CottonDownLoopIncrement:
addbyte gBattlerTarget, 1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_CottonDownLoop
BattleScript_CottonDownReturn:
swapattackerwithtarget
copybyte gBattlerAttacker, sSAVED_BATTLER
return
Expand Down Expand Up @@ -7700,7 +7675,6 @@ BattleScript_ActivateWeatherAbilities:
BattleScript_ActivateWeatherAbilities_Loop:
copybyte sBATTLER, gBattlerTarget
activateweatherchangeabilities BS_TARGET
BattleScript_ActivateWeatherAbilities_Increment:
addbyte gBattlerTarget, 1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_ActivateWeatherAbilities_Loop
restoretarget
Expand Down Expand Up @@ -7759,7 +7733,6 @@ BattleScript_IntimidateEffect_WaitString:
BattleScript_IntimidateLoopIncrement:
addbyte gBattlerTarget, 1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_IntimidateLoop
BattleScript_IntimidateEnd:
copybyte sBATTLER, gBattlerAttacker
destroyabilitypopup
copybyte gBattlerTarget, sSAVED_BATTLER
Expand Down Expand Up @@ -7825,7 +7798,6 @@ BattleScript_SupersweetSyrupEffect_WaitString:
BattleScript_SupersweetSyrupLoopIncrement:
addbyte gBattlerTarget, 1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_SupersweetSyrupLoop
BattleScript_SupersweetSyrupEnd:
copybyte sBATTLER, gBattlerAttacker
destroyabilitypopup
copybyte gBattlerTarget, sSAVED_BATTLER
Expand Down Expand Up @@ -7984,7 +7956,6 @@ BattleScript_ActivateTerrainSeed:
removeitem BS_TARGET
BattleScript_ActivateTerrainAbility:
activateterrainchangeabilities BS_TARGET
BattleScript_ActivateTerrainEffects_Increment:
addbyte gBattlerTarget, 0x1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_ActivateTerrainSeed
restoretarget
Expand Down Expand Up @@ -8240,14 +8211,12 @@ BattleScript_GrassyTerrainLoop:
checkgrassyterrainheal BS_ATTACKER, BattleScript_GrassyTerrainLoopIncrement
printstring STRINGID_GRASSYTERRAINHEALS
waitmessage B_WAIT_TIME_LONG
BattleScript_GrassyTerrainHpChange:
orword gHitMarker, HITMARKER_IGNORE_BIDE | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
BattleScript_GrassyTerrainLoopIncrement::
addbyte gBattleCommunication, 1
jumpifbytenotequal gBattleCommunication, gBattlersCount, BattleScript_GrassyTerrainLoop
BattleScript_GrassyTerrainLoopEnd::
bicword gHitMarker, HITMARKER_IGNORE_BIDE | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
jumpifword CMP_COMMON_BITS, gFieldStatuses, STATUS_FIELD_TERRAIN_PERMANENT, BattleScript_GrassyTerrainHealEnd
BattleScript_GrassyTerrainHealEnd:
Expand All @@ -8256,7 +8225,6 @@ BattleScript_GrassyTerrainHealEnd:
BattleScript_AbilityNoSpecificStatLoss::
pause B_WAIT_TIME_SHORT
call BattleScript_AbilityPopUp
BattleScript_AbilityNoSpecificStatLossPrint:
printstring STRINGID_PKMNSXPREVENTSYLOSS
waitmessage B_WAIT_TIME_LONG
setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_FELL_EMPTY
Expand Down Expand Up @@ -9033,16 +9001,6 @@ BattleScript_ArenaTurnBeginning::
volumeup
end2

@ Unused
BattleScript_ArenaNothingDecided::
playse SE_DING_DONG
arenadrawreftextbox
arenajudgmentstring B_MSG_REF_NOTHING_IS_DECIDED
arenawaitmessage B_MSG_REF_NOTHING_IS_DECIDED
pause B_WAIT_TIME_LONG
arenaerasereftextbox
end2

BattleScript_ArenaDoJudgment::
makevisible BS_PLAYER1
waitstate
Expand Down Expand Up @@ -9316,7 +9274,6 @@ BattleScript_EffectExtremeEvoboost::
BattleScript_ExtremeEvoboostAnim:
attackanimation
waitanimation
BattleScript_ExtremeEvoboostAtk::
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF | BIT_SPEED | BIT_SPATK | BIT_SPDEF, 0x0
setstatchanger STAT_ATK, 2, FALSE
Expand Down Expand Up @@ -9890,7 +9847,6 @@ BattleScript_CouldntFullyProtect::
return

BattleScript_BerserkGeneRet::
BattleScript_BerserkGeneRet_Anim:
savetarget
copybyte gBattlerTarget, sBATTLER
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_BerserkGeneRet_TryConfuse
Expand Down
1 change: 0 additions & 1 deletion data/battle_scripts_2.s
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ BattleScript_SafariBallThrow::
BattleScript_SuccessBallThrow::
setbyte sMON_CAUGHT, TRUE
incrementgamestat GAME_STAT_POKEMON_CAPTURES
BattleScript_PrintCaughtMonInfo::
printstring STRINGID_GOTCHAPKMNCAUGHTPLAYER
jumpifbyte CMP_NOT_EQUAL, sEXP_CATCH, TRUE, BattleScript_TryPrintCaughtMonInfo
setbyte sGIVEEXP_STATE, 0
Expand Down

0 comments on commit cfcac0b

Please sign in to comment.