mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
Spiky Shield
Created generic string "Atk was hurt by Def's BUFF" for use for both Spiky Shield and Rough Skin - can also be used for Aftermath and Rocky Helmet, when programmed
This commit is contained in:
parent
34cbb26e5e
commit
a3b4767dd2
@ -6366,6 +6366,15 @@ BattleScript_RoughSkinActivates::
|
||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||
return
|
||||
|
||||
BattleScript_SpikyShieldEffect::
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
printstring STRINGID_PKMNHURTSWITH
|
||||
waitmessage 0x40
|
||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||
return
|
||||
|
||||
BattleScript_CuteCharmActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
status2animation BS_ATTACKER, STATUS2_INFATUATION
|
||||
|
@ -300,5 +300,6 @@ extern const u8 BattleScript_DefiantActivates[];
|
||||
extern const u8 BattleScript_PowderMoveNoEffect[];
|
||||
extern const u8 BattleScript_GrassyTerrainLoop[];
|
||||
extern const u8 BattleScript_VCreateStatLoss[];
|
||||
extern const u8 BattleScript_SpikyShieldEffect[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||
|
@ -276,7 +276,7 @@ static const u8 sText_PkmnRaisedFirePowerWith[] = _("{B_DEF_NAME_WITH_PREFIX}'s
|
||||
static const u8 sText_PkmnAnchorsItselfWith[] = _("{B_DEF_NAME_WITH_PREFIX} anchors\nitself with {B_DEF_ABILITY}!");
|
||||
static const u8 sText_PkmnCutsAttackWith[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\ncuts {B_DEF_NAME_WITH_PREFIX}'s ATTACK!");
|
||||
static const u8 sText_PkmnPreventsStatLossWith[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\nprevents stat loss!");
|
||||
static const u8 sText_PkmnHurtsWith[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}\nhurt {B_ATK_NAME_WITH_PREFIX}!");
|
||||
static const u8 sText_PkmnHurtsWith[] = _("{B_ATK_NAME_WITH_PREFIX} was hurt by\n{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}!");
|
||||
static const u8 sText_PkmnTraced[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} TRACED\n{B_BUFF1}'s {B_BUFF2}!");
|
||||
static const u8 sText_PkmnsXPreventsBurns[] = _("{B_EFF_NAME_WITH_PREFIX}'s {B_EFF_ABILITY}\nprevents burns!");
|
||||
static const u8 sText_PkmnsXBlocksY[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}\nblocks {B_CURRENT_MOVE}!");
|
||||
|
@ -4151,6 +4151,7 @@ static void atk48_playstatchangeanimation(void)
|
||||
|
||||
enum
|
||||
{
|
||||
ATK49_SPIKY_SHIELD,
|
||||
ATK49_RAGE,
|
||||
ATK49_DEFROST,
|
||||
ATK49_SYNCHRONIZE_TARGET,
|
||||
@ -4202,6 +4203,23 @@ static void atk49_moveend(void)
|
||||
{
|
||||
switch (gBattleScripting.atk49_state)
|
||||
{
|
||||
case ATK49_SPIKY_SHIELD:
|
||||
if (gProtectStructs[gBattlerTarget].spikyShielded && gBattleMoves[gCurrentMove].flags & FLAG_MAKES_CONTACT)
|
||||
{
|
||||
if (!(GetBattlerAbility(gBattlerAttacker) == ABILITY_MAGIC_GUARD))
|
||||
{
|
||||
gMoveResultFlags &= ~(MOVE_RESULT_NO_EFFECT);
|
||||
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 8;
|
||||
if (gBattleMoveDamage == 0)
|
||||
gBattleMoveDamage = 1;
|
||||
PREPARE_MOVE_BUFFER(gBattleTextBuff1, MOVE_SPIKY_SHIELD);
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_SpikyShieldEffect;
|
||||
effect = 1;
|
||||
}
|
||||
}
|
||||
gBattleScripting.atk49_state++;
|
||||
break;
|
||||
case ATK49_RAGE: // rage check
|
||||
if (gBattleMons[gBattlerTarget].status2 & STATUS2_RAGE
|
||||
&& gBattleMons[gBattlerTarget].hp != 0 && gBattlerAttacker != gBattlerTarget
|
||||
|
@ -3248,6 +3248,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
||||
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 8;
|
||||
if (gBattleMoveDamage == 0)
|
||||
gBattleMoveDamage = 1;
|
||||
PREPARE_ABILITY_BUFFER(gBattleTextBuff1, gLastUsedAbility);
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_RoughSkinActivates;
|
||||
effect++;
|
||||
|
Loading…
Reference in New Issue
Block a user