Implemented Aftermath's effect
This commit is contained in:
parent
a61f282668
commit
c690d577a5
4 changed files with 26 additions and 1 deletions
|
@ -5864,6 +5864,15 @@ BattleScript_IllusionOff::
|
|||
waitmessage 0x40
|
||||
return
|
||||
|
||||
BattleScript_AftermathDmg::
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
printstring STRINGID_AFTERMATHDMG
|
||||
waitmessage 0x40
|
||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||
return
|
||||
|
||||
BattleScript_MoveUsedIsAsleep::
|
||||
printstring STRINGID_PKMNFASTASLEEP
|
||||
waitmessage 0x40
|
||||
|
|
|
@ -327,5 +327,6 @@ extern const u8 BattleScript_MoveEffectIncinerate[];
|
|||
extern const u8 BattleScript_MoveEffectBugBite[];
|
||||
extern const u8 BattleScript_IllusionOff[];
|
||||
extern const u8 BattleScript_DancerActivates[];
|
||||
extern const u8 BattleScript_AftermathDmg[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||
|
|
|
@ -592,7 +592,7 @@ static const u8 sText_TurboblazeEnters[] = _("{B_ATK_NAME_WITH_PREFIX} is radiat
|
|||
static const u8 sText_SlowStartEnters[] = _("{B_ATK_NAME_WITH_PREFIX} can't get it going!");
|
||||
static const u8 sText_SlowStartEnd[] = _("{B_ATK_NAME_WITH_PREFIX} finally got its act together!");
|
||||
static const u8 sText_SolarPowerHpDrop[] = _("The {B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\ntakes its toll!");
|
||||
static const u8 sText_AftermathDmg[] = _("The {B_DEF_NAME_WITH_PREFIX}\nsuffers the {B_DEF_ABILITY}!");
|
||||
static const u8 sText_AftermathDmg[] = _("{B_ATK_NAME_WITH_PREFIX} is hurt!");
|
||||
static const u8 sText_AnticipationActivates[] = _("The {B_ATK_NAME_WITH_PREFIX} shuddered in {B_ATK_ABILITY}!");
|
||||
static const u8 sText_ForewarnActivates[] = _("{B_ATK_ABILITY} alerted the {B_ATK_NAME_WITH_PREFIX} to the\n{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}!");
|
||||
static const u8 sText_IceBodyHpGain[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\nhealed it a little bit!");
|
||||
|
|
|
@ -3327,6 +3327,21 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
|||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_AFTERMATH:
|
||||
if (IsAbilityOnField(ABILITY_DAMP))
|
||||
break;
|
||||
else if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& gBattleMons[gBattlerTarget].hp == 0
|
||||
&& (gBattleMoves[move].flags & FLAG_MAKES_CONTACT))
|
||||
{
|
||||
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 4;
|
||||
if (gBattleMoveDamage == 0)
|
||||
gBattleMoveDamage = 1;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_AftermathDmg;
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_EFFECT_SPORE:
|
||||
if (!IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_GRASS)
|
||||
&& GetBattlerAbility(gBattlerAttacker) != ABILITY_OVERCOAT
|
||||
|
|
Loading…
Reference in a new issue