more battlescript labels

This commit is contained in:
DizzyEggg 2017-12-03 00:47:21 +01:00
parent e10aea9a51
commit 790df7159e
8 changed files with 79 additions and 82 deletions

View File

@ -18,7 +18,7 @@
.set ANIM_ITEM_STEAL, 0x10
.set ANIM_SNATCH_MOVE, 0x11
.set ANIM_FUTURE_SIGHT_HIT, 0x12
.set ANIM_x13, 0x13
.set ANIM_DOOM_DESIRE_HIT, 0x13
.set ANIM_x14, 0x14
.set ANIM_INGRAIN_HEAL, 0x15
.set ANIM_WISH_HEAL, 0x16

View File

@ -610,8 +610,8 @@ BattleScript_EffectRoar::
attackcanceler
attackstring
ppreduce
jumpifability TARGET, ABILITY_SUCTION_CUPS, BattleScript_82DB5B9
jumpifstatus3 TARGET, STATUS3_ROOTED, BattleScript_82DB109
jumpifability TARGET, ABILITY_SUCTION_CUPS, BattleScript_AbilityPreventsPhasingOut
jumpifstatus3 TARGET, STATUS3_ROOTED, BattleScript_PrintMonIsRooted
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
accuracycheck BattleScript_MoveMissedPause, ACC_CURR_MOVE
jumpifbattletype BATTLE_TYPE_ARENA, BattleScript_ButItFailed
@ -1710,7 +1710,7 @@ BattleScript_EffectMagnitude::
pause 0x20
printstring STRINGID_MAGNITUDESTRENGTH
waitmessage 0x40
goto BattleScript_82D9C44
goto BattleScript_HitsAllWithUndergroundBonusLoop
BattleScript_EffectBatonPass::
attackcanceler
@ -1857,17 +1857,17 @@ BattleScript_EffectEarthquake::
attackstring
ppreduce
selectfirstvalidtarget
BattleScript_82D9C44::
BattleScript_HitsAllWithUndergroundBonusLoop::
movevaluescleanup
jumpifnostatus3 TARGET, STATUS3_UNDERGROUND, BattleScript_82D9C64
jumpifnostatus3 TARGET, STATUS3_UNDERGROUND, BattleScript_HitsAllNoUndergroundBonus
orword gHitMarker, HITMARKER_IGNORE_UNDERGROUND
setbyte sDMG_MULTIPLIER, 0x2
goto BattleScript_82D9C73
BattleScript_82D9C64::
goto BattleScript_DoHitAllWithUndergroundBonus
BattleScript_HitsAllNoUndergroundBonus::
bicword gHitMarker, HITMARKER_IGNORE_UNDERGROUND
setbyte sDMG_MULTIPLIER, 0x1
BattleScript_82D9C73::
accuracycheck BattleScript_82D9CAC, ACC_CURR_MOVE
BattleScript_DoHitAllWithUndergroundBonus::
accuracycheck BattleScript_HitAllWithUndergroundBonusMissed, ACC_CURR_MOVE
critcalc
damagecalc
typecalc
@ -1888,9 +1888,9 @@ BattleScript_82D9C73::
tryfaintmon TARGET, FALSE, NULL
setbyte sMOVEEND_STATE, 0x0
moveend 0x2, 0x10
jumpifnexttargetvalid BattleScript_82D9C44
jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop
end
BattleScript_82D9CAC::
BattleScript_HitAllWithUndergroundBonusMissed::
pause 0x20
typecalc
effectivenesssound
@ -1898,7 +1898,7 @@ BattleScript_82D9CAC::
waitmessage 0x40
setbyte sMOVEEND_STATE, 0x0
moveend 0x2, 0x10
jumpifnexttargetvalid BattleScript_82D9C44
jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop
end
BattleScript_EffectFutureSight::
@ -2289,10 +2289,10 @@ BattleScript_EffectFocusPunch::
BattleScript_EffectSmellingsalt::
jumpifstatus2 TARGET, STATUS2_SUBSTITUTE, BattleScript_EffectHit
setmoveeffect EFFECT_REMOVE_PARALYSIS | CERTAIN
jumpifstatus TARGET, STATUS_PARALYSIS, BattleScript_82DA1BA
jumpifstatus TARGET, STATUS_PARALYSIS, BattleScript_SmellingsaltDoubleDmg
goto BattleScript_EffectHit
BattleScript_82DA1BA::
BattleScript_SmellingsaltDoubleDmg::
setbyte sDMG_MULTIPLIER, 0x2
goto BattleScript_EffectHit
@ -3289,14 +3289,13 @@ BattleScript_LeechSeedTurnDrain::
healthbarupdate ATTACKER
datahpupdate ATTACKER
copyword gBattleMoveDamage, gHpDealt
jumpifability ATTACKER, ABILITY_LIQUID_OOZE, BattleScript_82DAD47
jumpifability ATTACKER, ABILITY_LIQUID_OOZE, BattleScript_LeechSeedTurnPrintLiquidOoze
manipulatedamage ATK80_DMG_CHANGE_SIGN
setbyte cMULTISTRING_CHOOSER, 0x3
goto BattleScript_82DAD4D
BattleScript_82DAD47::
goto BattleScript_LeechSeedTurnPrintAndUpdateHp
BattleScript_LeechSeedTurnPrintLiquidOoze::
setbyte cMULTISTRING_CHOOSER, 0x4
BattleScript_82DAD4D::
BattleScript_LeechSeedTurnPrintAndUpdateHp::
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
healthbarupdate TARGET
datahpupdate TARGET
@ -3387,9 +3386,9 @@ BattleScript_DisabledNoMore::
waitmessage 0x40
end2
BattleScript_82DAE2A::
BattleScript_SelectingDisabledMoveInPalace::
printstring STRINGID_PKMNMOVEISDISABLED
BattleScript_82DAE2D::
BattleScript_SelectingUnusableMoveInPalace::
setbyte sMOVEEND_STATE, 0x0
moveend 0x2, 0x10
end
@ -3534,19 +3533,19 @@ BattleScript_SpikesFree::
BattleScript_MonTookFutureAttack::
printstring STRINGID_PKMNTOOKATTACK
waitmessage 0x40
jumpifbyte NOT_EQUAL, cMULTISTRING_CHOOSER, 0x0, BattleScript_82DB001
accuracycheck BattleScript_82DB058, MOVE_FUTURE_SIGHT
goto BattleScript_82DB008
BattleScript_82DB001::
accuracycheck BattleScript_82DB058, MOVE_DOOM_DESIRE
BattleScript_82DB008::
jumpifbyte NOT_EQUAL, cMULTISTRING_CHOOSER, 0x0, BattleScript_CheckDoomDesireMiss
accuracycheck BattleScript_FutureAttackMiss, MOVE_FUTURE_SIGHT
goto BattleScript_FutureAttackAnimate
BattleScript_CheckDoomDesireMiss::
accuracycheck BattleScript_FutureAttackMiss, MOVE_DOOM_DESIRE
BattleScript_FutureAttackAnimate::
adjustnormaldamage2
jumpifbyte NOT_EQUAL, cMULTISTRING_CHOOSER, 0x0, BattleScript_82DB020
jumpifbyte NOT_EQUAL, cMULTISTRING_CHOOSER, 0x0, BattleScript_FutureHitAnimDoomDesire
playanimation ATTACKER, ANIM_FUTURE_SIGHT_HIT, NULL
goto BattleScript_82DB027
BattleScript_82DB020::
playanimation ATTACKER, ANIM_x13, NULL
BattleScript_82DB027::
goto BattleScript_DoFutureAttackHit
BattleScript_FutureHitAnimDoomDesire::
playanimation ATTACKER, ANIM_DOOM_DESIRE_HIT, NULL
BattleScript_DoFutureAttackHit::
effectivenesssound
hitanimation TARGET
waitstate
@ -3555,15 +3554,16 @@ BattleScript_82DB027::
resultmessage
waitmessage 0x40
tryfaintmon TARGET, FALSE, NULL
atk24 BattleScript_82DB03F
BattleScript_82DB03F::
atk24 BattleScript_FutureAttackEnd
BattleScript_FutureAttackEnd::
setbyte sMOVEEND_STATE, 0x0
moveend 0x1, 0x0
setbyte sMOVEEND_STATE, 0xB
moveend 0x2, 0xE
setbyte gBattleMoveFlags, 0
end2
BattleScript_82DB058::
BattleScript_FutureAttackMiss::
pause 0x20
setbyte gBattleMoveFlags, 0
orbyte gBattleMoveFlags, MOVESTATUS_FAILED
@ -3591,14 +3591,14 @@ BattleScript_SelectingTormentedMove::
printselectionstring STRINGID_PKMNCANTUSEMOVETORMENT
endselectionscript
BattleScript_82DB08D::
BattleScript_MoveUsedIsTormented::
printstring STRINGID_PKMNCANTUSEMOVETORMENT
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_82DB098::
BattleScript_SelectingTormentedMoveInPalace::
printstring STRINGID_PKMNCANTUSEMOVETORMENT
goto BattleScript_82DAE2D
goto BattleScript_SelectingUnusableMoveInPalace
BattleScript_SelectingNotAllowedMoveTaunt::
printselectionstring STRINGID_PKMNCANTUSEMOVETAUNT
@ -3609,12 +3609,12 @@ BattleScript_MoveUsedIsTaunted::
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_82DB0AF::
BattleScript_SelectingNotAllowedMoveTauntInPalace::
printstring STRINGID_PKMNCANTUSEMOVETAUNT
goto BattleScript_82DAE2D
goto BattleScript_SelectingUnusableMoveInPalace
BattleScript_WishComesTrue::
trywish 0x1, BattleScript_82DB0DE
trywish 0x1, BattleScript_WishButFullHp
playanimation TARGET, ANIM_WISH_HEAL, NULL
printstring STRINGID_PKMNWISHCAMETRUE
waitmessage 0x40
@ -3625,7 +3625,7 @@ BattleScript_WishComesTrue::
waitmessage 0x40
end2
BattleScript_82DB0DE::
BattleScript_WishButFullHp::
printstring STRINGID_PKMNWISHCAMETRUE
waitmessage 0x40
pause 0x20
@ -3642,7 +3642,7 @@ BattleScript_IngrainTurnHeal::
datahpupdate ATTACKER
end2
BattleScript_82DB109::
BattleScript_PrintMonIsRooted::
pause 0x20
printstring STRINGID_PKMNANCHOREDITSELF
waitmessage 0x40
@ -3682,9 +3682,9 @@ BattleScript_SelectingImprisionedMove::
printselectionstring STRINGID_PKMNCANTUSEMOVESEALED
endselectionscript
BattleScript_82DB185::
BattleScript_SelectingImprisionedMoveInPalace::
printstring STRINGID_PKMNCANTUSEMOVESEALED
goto BattleScript_82DAE2D
goto BattleScript_SelectingUnusableMoveInPalace
BattleScript_GrudgeTakesPp::
printstring STRINGID_PKMNLOSTPPGRUDGE
@ -4135,7 +4135,7 @@ BattleScript_FlashFireBoost::
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_82DB5B9::
BattleScript_AbilityPreventsPhasingOut::
pause 0x20
printstring STRINGID_PKMNANCHORSITSELFWITH
waitmessage 0x40
@ -4577,12 +4577,12 @@ BattleScript_AskIfWantsToForfeitMatch::
forfeityesnobox ATTACKER
endselectionscript
BattleScript_82DB9C1::
BattleScript_PrintPlayerForfeited::
printstring STRINGID_FORFEITEDMATCH
waitmessage 0x40
end2
BattleScript_82DB9C8::
BattleScript_PrintPlayerForfeitedLinkBattle::
printstring STRINGID_FORFEITEDMATCH
waitmessage 0x40
atk57

View File

@ -90,12 +90,12 @@ BattleScript_WallyBallThrow::
BattleScript_ShakeBallThrow::
printfromtable gBallEscapeStringIds
waitmessage 0x40
jumpifword NO_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_SAFARI, BattleScript_82DBE01
jumpifbyte NOT_EQUAL, gNumSafariBalls, 0x0, BattleScript_82DBE01
jumpifword NO_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_SAFARI, BattleScript_ShakeBallThrowEnd
jumpifbyte NOT_EQUAL, gNumSafariBalls, 0x0, BattleScript_ShakeBallThrowEnd
printstring STRINGID_OUTOFSAFARIBALLS
waitmessage 0x40
setbyte gBattleOutcome, OUT_OF_BALLS
BattleScript_82DBE01::
BattleScript_ShakeBallThrowEnd::
finishaction
BattleScript_TrainerBallBlock::

View File

@ -86,7 +86,7 @@
#define BATTLE_FORFEITED 0x9
#define BATTLE_OPPONENT_TELEPORTED 0xA
#define BATTLE_OUTCOME_BIT_x80 0x80
#define OUTCOME_LINK_BATTLE_RUN 0x80
#define STATUS_NONE 0x0
#define STATUS_SLEEP 0x7
@ -801,7 +801,7 @@ extern struct BattleStruct* gBattleStruct;
#define B_ANIM_ITEM_STEAL 0x10
#define B_ANIM_SNATCH_MOVE 0x11
#define B_ANIM_FUTURE_SIGHT_HIT 0x12
#define B_ANIM_x13 0x13
#define B_ANIM_DOOM_DESIRE_HIT 0x13
#define B_ANIM_x14 0x14
#define B_ANIM_INGRAIN_HEAL 0x15
#define B_ANIM_WISH_HEAL 0x16

View File

@ -74,8 +74,8 @@ extern const u8 BattleScript_RageIsBuilding[];
extern const u8 BattleScript_MoveUsedIsDisabled[];
extern const u8 BattleScript_SelectingDisabledMove[];
extern const u8 BattleScript_DisabledNoMore[];
extern const u8 BattleScript_82DAE2A[];
extern const u8 BattleScript_82DAE2D[];
extern const u8 BattleScript_SelectingDisabledMoveInPalace[];
extern const u8 BattleScript_SelectingUnusableMoveInPalace[];
extern const u8 BattleScript_EncoredNoMore[];
extern const u8 BattleScript_DestinyBondTakesLife[];
extern const u8 BattleScript_SpikesOnAttacker[];
@ -109,22 +109,20 @@ extern const u8 BattleScript_NoMovesLeft[];
extern const u8 BattleScript_SelectingMoveWithNoPP[];
extern const u8 BattleScript_NoPPForMove[];
extern const u8 BattleScript_SelectingTormentedMove[];
extern const u8 BattleScript_82DB08D[];
extern const u8 BattleScript_82DB098[];
extern const u8 BattleScript_MoveUsedIsTormented[];
extern const u8 BattleScript_SelectingTormentedMoveInPalace[];
extern const u8 BattleScript_SelectingNotAllowedMoveTaunt[];
extern const u8 BattleScript_MoveUsedIsTaunted[];
extern const u8 BattleScript_82DB0AF[];
extern const u8 BattleScript_SelectingNotAllowedMoveTauntInPalace[];
extern const u8 BattleScript_WishComesTrue[];
extern const u8 BattleScript_82DB0DE[];
extern const u8 BattleScript_IngrainTurnHeal[];
extern const u8 BattleScript_82DB109[];
extern const u8 BattleScript_AtkDefDown[];
extern const u8 BattleScript_82DB144[];
extern const u8 BattleScript_82DB167[];
extern const u8 BattleScript_KnockedOff[];
extern const u8 BattleScript_MoveUsedIsImprisoned[];
extern const u8 BattleScript_SelectingImprisionedMove[];
extern const u8 BattleScript_82DB185[];
extern const u8 BattleScript_SelectingImprisionedMoveInPalace[];
extern const u8 BattleScript_GrudgeTakesPp[];
extern const u8 BattleScript_MagicCoatBounce[];
extern const u8 BattleScript_SnatchedMove[];
@ -203,7 +201,6 @@ extern const u8 BattleScript_MonMadeMoveUseless_PPLoss[];
extern const u8 BattleScript_MonMadeMoveUseless[];
extern const u8 BattleScript_FlashFireBoost_PPLoss[];
extern const u8 BattleScript_FlashFireBoost[];
extern const u8 BattleScript_82DB5B9[];
extern const u8 BattleScript_AbilityNoStatLoss[];
extern const u8 BattleScript_BRNPrevention[];
extern const u8 BattleScript_PRLZPrevention[];
@ -265,8 +262,8 @@ extern const u8 BattleScript_82DB8F3[];
extern const u8 BattleScript_82DB973[];
extern const u8 BattleScript_82DB992[];
extern const u8 BattleScript_AskIfWantsToForfeitMatch[];
extern const u8 BattleScript_82DB9C1[];
extern const u8 BattleScript_82DB9C8[];
extern const u8 BattleScript_PrintPlayerForfeited[];
extern const u8 BattleScript_PrintPlayerForfeitedLinkBattle[];
extern const u8 BattleScript_BallThrow[];
extern const u8 BattleScript_BallThrowByWally[];
extern const u8 BattleScript_SafariBallThrow[];

View File

@ -2872,7 +2872,7 @@ void SwitchInClearSetData(void)
&& (gStatuses3[i] & STATUS3_ALWAYS_HITS) != 0
&& (gDisableStructs[i].bankWithSureHit == gActiveBank))
{
gStatuses3[i] &= ~STATUS3_ALWAYS_HITS;
gStatuses3[i] &= ~(STATUS3_ALWAYS_HITS);
gStatuses3[i] |= 0x10;
}
}
@ -4729,7 +4729,7 @@ static void HandleEndTurn_BattleWon(void)
gBattleTextBuff1[0] = gBattleOutcome;
gBankAttacker = GetBankByIdentity(IDENTITY_PLAYER_MON1);
gBattlescriptCurrInstr = BattleScript_LinkBattleWonOrLost;
gBattleOutcome &= ~(BATTLE_OUTCOME_BIT_x80);
gBattleOutcome &= ~(OUTCOME_LINK_BATTLE_RUN);
}
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER
&& gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_x4000000 | BATTLE_TYPE_EREADER_TRAINER))
@ -4785,16 +4785,16 @@ static void HandleEndTurn_BattleLost(void)
{
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER)
{
if (gBattleOutcome & BATTLE_OUTCOME_BIT_x80)
if (gBattleOutcome & OUTCOME_LINK_BATTLE_RUN)
{
gBattlescriptCurrInstr = BattleScript_82DB9C8;
gBattleOutcome &= ~(BATTLE_OUTCOME_BIT_x80);
gBattlescriptCurrInstr = BattleScript_PrintPlayerForfeitedLinkBattle;
gBattleOutcome &= ~(OUTCOME_LINK_BATTLE_RUN);
gSaveBlock2Ptr->field_CA9_b = 1;
}
else
{
gBattlescriptCurrInstr = BattleScript_82DAA0B;
gBattleOutcome &= ~(BATTLE_OUTCOME_BIT_x80);
gBattleOutcome &= ~(OUTCOME_LINK_BATTLE_RUN);
}
}
else
@ -4802,7 +4802,7 @@ static void HandleEndTurn_BattleLost(void)
gBattleTextBuff1[0] = gBattleOutcome;
gBankAttacker = GetBankByIdentity(IDENTITY_PLAYER_MON1);
gBattlescriptCurrInstr = BattleScript_LinkBattleWonOrLost;
gBattleOutcome &= ~(BATTLE_OUTCOME_BIT_x80);
gBattleOutcome &= ~(OUTCOME_LINK_BATTLE_RUN);
}
}
else
@ -4819,13 +4819,13 @@ static void HandleEndTurn_RanFromBattle(void)
if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER && gBattleTypeFlags & BATTLE_TYPE_TRAINER)
{
gBattlescriptCurrInstr = BattleScript_82DB9C1;
gBattlescriptCurrInstr = BattleScript_PrintPlayerForfeited;
gBattleOutcome = BATTLE_FORFEITED;
gSaveBlock2Ptr->field_CA9_b = 1;
}
else if (gBattleTypeFlags & BATTLE_TYPE_x4000000)
{
gBattlescriptCurrInstr = BattleScript_82DB9C1;
gBattlescriptCurrInstr = BattleScript_PrintPlayerForfeited;
gBattleOutcome = BATTLE_FORFEITED;
}
else
@ -5439,7 +5439,7 @@ static void HandleAction_Run(void)
}
}
gBattleOutcome |= BATTLE_OUTCOME_BIT_x80;
gBattleOutcome |= OUTCOME_LINK_BATTLE_RUN;
gSaveBlock2Ptr->field_CA9_b = 1;
}
else

View File

@ -1632,9 +1632,9 @@ void BufferStringBattle(u16 stringID)
stringPtr = gText_AttackerUsedX;
break;
case STRINGID_BATTLEEND: // battle end
if (gBattleTextBuff1[0] & BATTLE_OUTCOME_BIT_x80)
if (gBattleTextBuff1[0] & OUTCOME_LINK_BATTLE_RUN)
{
gBattleTextBuff1[0] &= ~(BATTLE_OUTCOME_BIT_x80);
gBattleTextBuff1[0] &= ~(OUTCOME_LINK_BATTLE_RUN);
if (GetBankSide(gActiveBank) == SIDE_OPPONENT && gBattleTextBuff1[0] != BATTLE_DREW)
gBattleTextBuff1[0] ^= (BATTLE_LOST | BATTLE_WON);

View File

@ -364,7 +364,7 @@ u8 TrySetCantSelectMoveBattleScript(void)
gCurrentMove = move;
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
{
gPalaceSelectionBattleScripts[gActiveBank] = BattleScript_82DAE2A;
gPalaceSelectionBattleScripts[gActiveBank] = BattleScript_SelectingDisabledMoveInPalace;
gProtectStructs[gActiveBank].flag_x10 = 1;
}
else
@ -379,7 +379,7 @@ u8 TrySetCantSelectMoveBattleScript(void)
CancelMultiTurnMoves(gActiveBank);
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
{
gPalaceSelectionBattleScripts[gActiveBank] = BattleScript_82DB098;
gPalaceSelectionBattleScripts[gActiveBank] = BattleScript_SelectingTormentedMoveInPalace;
gProtectStructs[gActiveBank].flag_x10 = 1;
}
else
@ -394,7 +394,7 @@ u8 TrySetCantSelectMoveBattleScript(void)
gCurrentMove = move;
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
{
gPalaceSelectionBattleScripts[gActiveBank] = BattleScript_82DB0AF;
gPalaceSelectionBattleScripts[gActiveBank] = BattleScript_SelectingNotAllowedMoveTauntInPalace;
gProtectStructs[gActiveBank].flag_x10 = 1;
}
else
@ -409,7 +409,7 @@ u8 TrySetCantSelectMoveBattleScript(void)
gCurrentMove = move;
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
{
gPalaceSelectionBattleScripts[gActiveBank] = BattleScript_82DB185;
gPalaceSelectionBattleScripts[gActiveBank] = BattleScript_SelectingImprisionedMoveInPalace;
gProtectStructs[gActiveBank].flag_x10 = 1;
}
else
@ -1313,7 +1313,7 @@ void TryClearRageStatuses(void)
u8 AtkCanceller_UnableToUseMove(void)
{
u8 effect = 0;
s32* bideDmg = &gBattleScripting.bideDmg;
s32 *bideDmg = &gBattleScripting.bideDmg;
do
{
switch (gBattleStruct->atkCancellerTracker)