mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 13:53:52 +01:00
Gravity fix
Brings down Pokémon in the middle of a two-turn flying move (only Bounce and Fly at the moment); says the appropriate message for all mons brought to the ground via Gravity
This commit is contained in:
parent
a001faeced
commit
d704b9cd5b
@ -1588,6 +1588,10 @@
|
|||||||
.macro spectralthiefprintstats
|
.macro spectralthiefprintstats
|
||||||
various BS_ATTACKER, VARIOUS_SPECTRAL_THIEF
|
various BS_ATTACKER, VARIOUS_SPECTRAL_THIEF
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro bringdownairbornebattler battler:req
|
||||||
|
various \battler, VARIOUS_GRAVITY_ON_AIRBORNE_MONS
|
||||||
|
.endm
|
||||||
|
|
||||||
@ helpful macros
|
@ helpful macros
|
||||||
.macro setstatchanger stat:req, stages:req, down:req
|
.macro setstatchanger stat:req, stages:req, down:req
|
||||||
|
@ -1601,7 +1601,20 @@ BattleScript_EffectGravity:
|
|||||||
waitanimation
|
waitanimation
|
||||||
printstring STRINGID_GRAVITYINTENSIFIED
|
printstring STRINGID_GRAVITYINTENSIFIED
|
||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
goto BattleScript_MoveEnd
|
selectfirstvalidtarget
|
||||||
|
BattleScript_GravityLoop:
|
||||||
|
movevaluescleanup
|
||||||
|
jumpifstatus3 BS_TARGET, STATUS3_ON_AIR | STATUS3_MAGNET_RISE | STATUS3_TELEKINESIS, BattleScript_GravityLoopDrop
|
||||||
|
goto BattleScript_GravityLoopEnd
|
||||||
|
BattleScript_GravityLoopDrop:
|
||||||
|
bringdownairbornebattler BS_TARGET
|
||||||
|
printstring STRINGID_GRAVITYGROUNDING
|
||||||
|
waitmessage 0x40
|
||||||
|
BattleScript_GravityLoopEnd:
|
||||||
|
setbyte sMOVEEND_STATE, 0x0
|
||||||
|
moveend 0x2, 0x10
|
||||||
|
jumpifnexttargetvalid BattleScript_GravityLoop
|
||||||
|
end
|
||||||
|
|
||||||
BattleScript_EffectRoost:
|
BattleScript_EffectRoost:
|
||||||
attackcanceler
|
attackcanceler
|
||||||
|
@ -136,6 +136,7 @@
|
|||||||
#define VARIOUS_ACUPRESSURE 73
|
#define VARIOUS_ACUPRESSURE 73
|
||||||
#define VARIOUS_SET_POWDER 74
|
#define VARIOUS_SET_POWDER 74
|
||||||
#define VARIOUS_SPECTRAL_THIEF 75
|
#define VARIOUS_SPECTRAL_THIEF 75
|
||||||
|
#define VARIOUS_GRAVITY_ON_AIRBORNE_MONS 76
|
||||||
|
|
||||||
// atk80, dmg manipulation
|
// atk80, dmg manipulation
|
||||||
#define ATK80_DMG_CHANGE_SIGN 0
|
#define ATK80_DMG_CHANGE_SIGN 0
|
||||||
|
@ -518,7 +518,8 @@
|
|||||||
#define STRINGID_POWDEREXPLODES 514
|
#define STRINGID_POWDEREXPLODES 514
|
||||||
#define STRINGID_BELCHCANTSELECT 515
|
#define STRINGID_BELCHCANTSELECT 515
|
||||||
#define STRINGID_SPECTRALTHIEFSTEAL 516
|
#define STRINGID_SPECTRALTHIEFSTEAL 516
|
||||||
|
#define STRINGID_GRAVITYGROUNDING 517
|
||||||
|
|
||||||
#define BATTLESTRINGS_COUNT 528
|
#define BATTLESTRINGS_COUNT 529
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H
|
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H
|
||||||
|
@ -626,7 +626,7 @@ static const u8 sText_TerrainBecomesElectric[] = _("An electric current runs acr
|
|||||||
static const u8 sText_TerrainBecomesPsychic[] = _("The battlefield got weird!");
|
static const u8 sText_TerrainBecomesPsychic[] = _("The battlefield got weird!");
|
||||||
static const u8 sText_TargetElectrified[] = _("The opposing {B_ATK_NAME_WITH_PREFIX}'s moves\nhave been electrified!");
|
static const u8 sText_TargetElectrified[] = _("The opposing {B_ATK_NAME_WITH_PREFIX}'s moves\nhave been electrified!");
|
||||||
static const u8 sText_AssaultVestDoesntAllow[] = _("The effects of the {B_LAST_ITEM} prevent status\nmoves from being used!\p");
|
static const u8 sText_AssaultVestDoesntAllow[] = _("The effects of the {B_LAST_ITEM} prevent status\nmoves from being used!\p");
|
||||||
static const u8 sText_GravityPreventsUsage[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} can't use {B_CURRENT_MOVE}\nbecause of gravity!\p");
|
static const u8 sText_GravityPreventsUsage[] = _("{B_ATK_NAME_WITH_PREFIX} can't use {B_CURRENT_MOVE}\nbecause of gravity!\p");
|
||||||
static const u8 sText_HealBlockPreventsUsage[] = _("The opposing {B_ATK_NAME_WITH_PREFIX} was\nprevented from healing!\p");
|
static const u8 sText_HealBlockPreventsUsage[] = _("The opposing {B_ATK_NAME_WITH_PREFIX} was\nprevented from healing!\p");
|
||||||
static const u8 sText_MegaEvoReacting[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_LAST_ITEM} is reacting\nto {B_ATK_TRAINER_NAME}'s Mega Ring!");
|
static const u8 sText_MegaEvoReacting[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_LAST_ITEM} is reacting\nto {B_ATK_TRAINER_NAME}'s Mega Ring!");
|
||||||
static const u8 sText_MegaEvoEvolved[] = _("{B_ATK_NAME_WITH_PREFIX} has Mega\nEvolved into Mega {B_BUFF1}!");
|
static const u8 sText_MegaEvoEvolved[] = _("{B_ATK_NAME_WITH_PREFIX} has Mega\nEvolved into Mega {B_BUFF1}!");
|
||||||
@ -643,6 +643,7 @@ static const u8 sText_CoveredInPowder[] = _("{B_DEF_NAME_WITH_PREFIX} is covered
|
|||||||
static const u8 sText_PowderExplodes[] = _("When the flame touched the powder\non the Pokémon, it exploded!");
|
static const u8 sText_PowderExplodes[] = _("When the flame touched the powder\non the Pokémon, it exploded!");
|
||||||
static const u8 sText_BelchCantUse[] = _("Belch cannot be used!\p");
|
static const u8 sText_BelchCantUse[] = _("Belch cannot be used!\p");
|
||||||
static const u8 sText_SpectralThiefSteal[] = _("{B_ATK_NAME_WITH_PREFIX} stole the target's\nboosted stats!");
|
static const u8 sText_SpectralThiefSteal[] = _("{B_ATK_NAME_WITH_PREFIX} stole the target's\nboosted stats!");
|
||||||
|
static const u8 sText_GravityGrounding[] = _("{B_DEF_NAME_WITH_PREFIX} can't stay airborne\nbecause of gravity!");
|
||||||
|
|
||||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||||
{
|
{
|
||||||
@ -1151,6 +1152,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
|||||||
[STRINGID_POKEMONCANNOTUSEMOVE - 12] = sText_PokemonCannotUseMove,
|
[STRINGID_POKEMONCANNOTUSEMOVE - 12] = sText_PokemonCannotUseMove,
|
||||||
[STRINGID_COVEREDINPOWDER - 12] = sText_CoveredInPowder,
|
[STRINGID_COVEREDINPOWDER - 12] = sText_CoveredInPowder,
|
||||||
[STRINGID_POWDEREXPLODES - 12] = sText_PowderExplodes,
|
[STRINGID_POWDEREXPLODES - 12] = sText_PowderExplodes,
|
||||||
|
[STRINGID_GRAVITYGROUNDING - 12] = sText_GravityGrounding,
|
||||||
};
|
};
|
||||||
|
|
||||||
const u16 gTerrainStringIds[] =
|
const u16 gTerrainStringIds[] =
|
||||||
|
@ -5828,10 +5828,6 @@ static void atk69_setgravity(void)
|
|||||||
|
|
||||||
gFieldStatuses |= STATUS_FIELD_GRAVITY;
|
gFieldStatuses |= STATUS_FIELD_GRAVITY;
|
||||||
gFieldTimers.gravityTimer = 5;
|
gFieldTimers.gravityTimer = 5;
|
||||||
|
|
||||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
|
||||||
gStatuses3[i] &= ~(STATUS3_MAGNET_RISE | STATUS3_TELEKINESIS | STATUS3_ON_AIR);
|
|
||||||
|
|
||||||
gBattlescriptCurrInstr += 5;
|
gBattlescriptCurrInstr += 5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6371,6 +6367,12 @@ static void atk76_various(void)
|
|||||||
|
|
||||||
switch (gBattlescriptCurrInstr[2])
|
switch (gBattlescriptCurrInstr[2])
|
||||||
{
|
{
|
||||||
|
case VARIOUS_GRAVITY_ON_AIRBORNE_MONS:
|
||||||
|
if (gStatuses3[gActiveBattler] & STATUS3_ON_AIR)
|
||||||
|
CancelMultiTurnMoves(gActiveBattler);
|
||||||
|
|
||||||
|
gStatuses3[gActiveBattler] &= ~(STATUS3_MAGNET_RISE | STATUS3_TELEKINESIS | STATUS3_ON_AIR);
|
||||||
|
break;
|
||||||
case VARIOUS_SPECTRAL_THIEF:
|
case VARIOUS_SPECTRAL_THIEF:
|
||||||
// Raise stats
|
// Raise stats
|
||||||
for (i = STAT_ATK; i < NUM_BATTLE_STATS; i++)
|
for (i = STAT_ATK; i < NUM_BATTLE_STATS; i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user