mirror of
https://github.com/pret/pokefirered.git
synced 2026-10-01 13:29:23 -05:00
added remaining battle scripts in Cmd_attackcanceler
This commit is contained in:
@@ -4486,4 +4486,14 @@ BattleScript_MoveUsedIsThroatChopPrevented::
|
||||
printstring STRINGID_PKMNCANTUSEMOVETHROATCHOP
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_PrimalWeatherBlocksMove::
|
||||
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_ATTACKSTRING_PRINTED, BattleScript_MoveEnd @in case of multi-target moves, if move fails once, no point in printing the message twice
|
||||
accuracycheck BattleScript_PrintMoveMissed, NO_ACC_CALC_CHECK_LOCK_ON
|
||||
attackstring
|
||||
pause B_WAIT_TIME_SHORT
|
||||
ppreduce
|
||||
printfromtable gPrimalWeatherBlocksStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
@@ -467,5 +467,6 @@ extern const u8 BattleScript_MoveUsedUnfrostbite[];
|
||||
extern const u8 BattleScript_PowderMoveNoEffect[];
|
||||
extern const u8 BattleScript_MoveUsedPowder[];
|
||||
extern const u8 BattleScript_MoveUsedIsThroatChopPrevented[];
|
||||
extern const u8 BattleScript_PrimalWeatherBlocksMove[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||
|
||||
@@ -404,8 +404,10 @@
|
||||
#define STRINGID_SAFETYGOGGLESPROTECTED 402
|
||||
#define STRINGID_POWDEREXPLODES 403
|
||||
#define STRINGID_PKMNCANTUSEMOVETHROATCHOP 404
|
||||
#define STRINGID_MOVEFIZZLEDOUTINTHEHEAVYRAIN 405
|
||||
#define STRINGID_MOVEEVAPORATEDINTHEHARSHSUNLIGHT 406
|
||||
|
||||
#define BATTLESTRINGS_COUNT 405
|
||||
#define BATTLESTRINGS_COUNT 407
|
||||
|
||||
// This is the string id that gBattleStringsTable starts with.
|
||||
// String ids before this (e.g. STRINGID_INTROMSG) are not in the table,
|
||||
|
||||
@@ -534,6 +534,8 @@ static const u8 sText_PkmnFrostbiteHealedBy[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B
|
||||
static const u8 sText_SafetyGogglesProtected[] = _("{B_DEF_NAME_WITH_PREFIX} is not affected\nthanks to its {B_LAST_ITEM}!");
|
||||
static const u8 sText_PowderExplodes[] = _("When the flame touched the powder\non the Pokémon, it exploded!");
|
||||
static const u8 sText_PkmnCantUseMoveThroatChop[] = _("{B_ATK_NAME_WITH_PREFIX} can't use\n{B_CURRENT_MOVE} due to Throat Chop!\p");
|
||||
static const u8 sText_MoveFizzledOutInTheHeavyRain[] = _("The Fire-type attack fizzled out\nin the heavy rain!");
|
||||
static const u8 sText_MoveEvaporatedInTheHarshSunlight[] = _("The Water-type attack evaporated\nin the harsh sunlight!");
|
||||
|
||||
|
||||
const u16 gTrainerUsedItemStringIds[] =
|
||||
@@ -938,6 +940,8 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT - BATTLESTRINGS_TABLE_ST
|
||||
[STRINGID_SAFETYGOGGLESPROTECTED - BATTLESTRINGS_TABLE_START] = sText_SafetyGogglesProtected,
|
||||
[STRINGID_POWDEREXPLODES - BATTLESTRINGS_TABLE_START] = sText_PowderExplodes,
|
||||
[STRINGID_PKMNCANTUSEMOVETHROATCHOP - BATTLESTRINGS_TABLE_START] = sText_PkmnCantUseMoveThroatChop,
|
||||
[STRINGID_MOVEFIZZLEDOUTINTHEHEAVYRAIN - BATTLESTRINGS_TABLE_START] = sText_MoveFizzledOutInTheHeavyRain,
|
||||
[STRINGID_MOVEEVAPORATEDINTHEHARSHSUNLIGHT - BATTLESTRINGS_TABLE_START] = sText_MoveEvaporatedInTheHarshSunlight,
|
||||
};
|
||||
|
||||
const u16 gMagicCoatBounceStringIds[] =
|
||||
@@ -1237,6 +1241,12 @@ const u16 gWeatherStartsStringIds[] =
|
||||
[WEATHER_ABNORMAL] = STRINGID_ITISRAINING
|
||||
};
|
||||
|
||||
const u16 gPrimalWeatherBlocksStringIds[] =
|
||||
{
|
||||
[B_MSG_PRIMAL_WEATHER_FIZZLED_BY_RAIN] = STRINGID_MOVEFIZZLEDOUTINTHEHEAVYRAIN,
|
||||
[B_MSG_PRIMAL_WEATHER_EVAPORATED_IN_SUN] = STRINGID_MOVEEVAPORATEDINTHEHARSHSUNLIGHT,
|
||||
};
|
||||
|
||||
const u16 gInobedientStringIds[] =
|
||||
{
|
||||
[B_MSG_LOAFING] = STRINGID_PKMNLOAFING,
|
||||
|
||||
@@ -933,6 +933,7 @@ static void Cmd_attackcanceler(void)
|
||||
u16 attackerAbility = GetBattlerAbility(gBattlerAttacker);
|
||||
GET_MOVE_TYPE(gCurrentMove, moveType);
|
||||
|
||||
// TODO: dynamax
|
||||
// Weight-based moves are blocked by Dynamax.
|
||||
// if (IsDynamaxed(gBattlerTarget) && IsMoveBlockedByDynamax(gCurrentMove))
|
||||
// {
|
||||
@@ -959,20 +960,19 @@ static void Cmd_attackcanceler(void)
|
||||
|
||||
if (WEATHER_HAS_EFFECT && gMovesInfo[gCurrentMove].power)
|
||||
{
|
||||
// TODO: battlescripts
|
||||
if (moveType == TYPE_FIRE && (gBattleWeather & B_WEATHER_RAIN_PRIMAL))
|
||||
{
|
||||
// gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PRIMAL_WEATHER_FIZZLED_BY_RAIN;
|
||||
// BattleScriptPushCursor();
|
||||
// gBattlescriptCurrInstr = BattleScript_PrimalWeatherBlocksMove;
|
||||
// return;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PRIMAL_WEATHER_FIZZLED_BY_RAIN;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_PrimalWeatherBlocksMove;
|
||||
return;
|
||||
}
|
||||
else if (moveType == TYPE_WATER && (gBattleWeather & B_WEATHER_SUN_PRIMAL))
|
||||
{
|
||||
// gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PRIMAL_WEATHER_EVAPORATED_IN_SUN;
|
||||
// BattleScriptPushCursor();
|
||||
// gBattlescriptCurrInstr = BattleScript_PrimalWeatherBlocksMove;
|
||||
// return;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PRIMAL_WEATHER_EVAPORATED_IN_SUN;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_PrimalWeatherBlocksMove;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user