mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 23:23:43 +01:00
Soul Heart
This commit is contained in:
parent
307bbcfe97
commit
e42ead10c9
@ -1439,6 +1439,10 @@
|
|||||||
various \battler, VARIOUS_TRY_ACTIVATE_MOXIE
|
various \battler, VARIOUS_TRY_ACTIVATE_MOXIE
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro tryactivatesoulheart
|
||||||
|
various BS_ATTACKER, VARIOUS_TRY_ACTIVATE_SOULHEART
|
||||||
|
.endm
|
||||||
|
|
||||||
.macro tryactivatefellstinger battler:req
|
.macro tryactivatefellstinger battler:req
|
||||||
various \battler, VARIOUS_TRY_ACTIVATE_FELL_STINGER
|
various \battler, VARIOUS_TRY_ACTIVATE_FELL_STINGER
|
||||||
.endm
|
.endm
|
||||||
|
@ -4783,6 +4783,7 @@ BattleScript_FaintAttacker::
|
|||||||
dofaintanimation BS_ATTACKER
|
dofaintanimation BS_ATTACKER
|
||||||
printstring STRINGID_ATTACKERFAINTED
|
printstring STRINGID_ATTACKERFAINTED
|
||||||
cleareffectsonfaint BS_ATTACKER
|
cleareffectsonfaint BS_ATTACKER
|
||||||
|
tryactivatesoulheart
|
||||||
trytrainerslidefirstdownmsg BS_ATTACKER
|
trytrainerslidefirstdownmsg BS_ATTACKER
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -4793,6 +4794,7 @@ BattleScript_FaintTarget::
|
|||||||
dofaintanimation BS_TARGET
|
dofaintanimation BS_TARGET
|
||||||
printstring STRINGID_TARGETFAINTED
|
printstring STRINGID_TARGETFAINTED
|
||||||
cleareffectsonfaint BS_TARGET
|
cleareffectsonfaint BS_TARGET
|
||||||
|
tryactivatesoulheart
|
||||||
tryactivatemoxie BS_ATTACKER
|
tryactivatemoxie BS_ATTACKER
|
||||||
tryactivatefellstinger BS_ATTACKER
|
tryactivatefellstinger BS_ATTACKER
|
||||||
trytrainerslidefirstdownmsg BS_TARGET
|
trytrainerslidefirstdownmsg BS_TARGET
|
||||||
@ -6799,6 +6801,20 @@ BattleScript_TargetAbilityStatRaise::
|
|||||||
printstring STRINGID_TARGETABILITYSTATRAISE
|
printstring STRINGID_TARGETABILITYSTATRAISE
|
||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
return
|
return
|
||||||
|
|
||||||
|
BattleScript_ScriptingAbilityStatRaise::
|
||||||
|
copybyte gBattlerAbility, sBATTLER
|
||||||
|
call BattleScript_AbilityPopUp
|
||||||
|
copybyte sSAVED_DMG, gBattlerAttacker
|
||||||
|
copybyte gBattlerAttacker, sBATTLER
|
||||||
|
statbuffchange STAT_BUFF_NOT_PROTECT_AFFECTED | MOVE_EFFECT_CERTAIN, NULL
|
||||||
|
setgraphicalstatchangevalues
|
||||||
|
playanimation BS_SCRIPTING, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||||
|
waitanimation
|
||||||
|
printstring STRINGID_ATTACKERABILITYSTATRAISE
|
||||||
|
waitmessage 0x40
|
||||||
|
copybyte gBattlerAttacker, sSAVED_DMG
|
||||||
|
return
|
||||||
|
|
||||||
BattleScript_WeakArmorActivates::
|
BattleScript_WeakArmorActivates::
|
||||||
call BattleScript_AbilityPopUp
|
call BattleScript_AbilityPopUp
|
||||||
|
@ -543,6 +543,7 @@ struct BattleStruct
|
|||||||
bool8 spriteIgnore0Hp;
|
bool8 spriteIgnore0Hp;
|
||||||
struct Illusion illusion[MAX_BATTLERS_COUNT];
|
struct Illusion illusion[MAX_BATTLERS_COUNT];
|
||||||
s8 aiFinalScore[MAX_BATTLERS_COUNT][MAX_BATTLERS_COUNT][MAX_MON_MOVES]; // AI, target, moves to make debugging easier
|
s8 aiFinalScore[MAX_BATTLERS_COUNT][MAX_BATTLERS_COUNT][MAX_MON_MOVES]; // AI, target, moves to make debugging easier
|
||||||
|
u8 soulheartBattlerId;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GET_MOVE_TYPE(move, typeArg) \
|
#define GET_MOVE_TYPE(move, typeArg) \
|
||||||
|
@ -334,5 +334,6 @@ extern const u8 BattleScript_DisguiseBustedActivates[];
|
|||||||
extern const u8 BattleScript_AnticipationActivates[];
|
extern const u8 BattleScript_AnticipationActivates[];
|
||||||
extern const u8 BattleScript_SlowStartEnds[];
|
extern const u8 BattleScript_SlowStartEnds[];
|
||||||
extern const u8 BattleScript_HealerActivates[];
|
extern const u8 BattleScript_HealerActivates[];
|
||||||
|
extern const u8 BattleScript_ScriptingAbilityStatRaise[];
|
||||||
|
|
||||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||||
|
@ -149,6 +149,7 @@
|
|||||||
#define VARIOUS_GET_STAT_VALUE 86
|
#define VARIOUS_GET_STAT_VALUE 86
|
||||||
#define VARIOUS_JUMP_IF_FULL_HP 87
|
#define VARIOUS_JUMP_IF_FULL_HP 87
|
||||||
#define VARIOUS_LOSE_TYPE 88
|
#define VARIOUS_LOSE_TYPE 88
|
||||||
|
#define VARIOUS_TRY_ACTIVATE_SOULHEART 89
|
||||||
|
|
||||||
// Cmd_manipulatedamage
|
// Cmd_manipulatedamage
|
||||||
#define DMG_CHANGE_SIGN 0
|
#define DMG_CHANGE_SIGN 0
|
||||||
|
@ -543,7 +543,8 @@
|
|||||||
#define STRINGID_ATTACKERCUREDTARGETSTATUS 539
|
#define STRINGID_ATTACKERCUREDTARGETSTATUS 539
|
||||||
#define STRINGID_ATTACKERLOSTFIRETYPE 540
|
#define STRINGID_ATTACKERLOSTFIRETYPE 540
|
||||||
#define STRINGID_HEALERCURE 541
|
#define STRINGID_HEALERCURE 541
|
||||||
|
#define STRINGID_SCRIPTINGABILITYSTATRAISE 542
|
||||||
|
|
||||||
#define BATTLESTRINGS_COUNT 542
|
#define BATTLESTRINGS_COUNT 543
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H
|
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H
|
||||||
|
@ -572,6 +572,7 @@ static const u8 sText_AquaRingHeal[] = _("Aqua Ring restored\n{B_ATK_NAME_WITH_P
|
|||||||
static const u8 sText_TargetAbilityRaisedStat[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}\nraised its {B_BUFF1}!");
|
static const u8 sText_TargetAbilityRaisedStat[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}\nraised its {B_BUFF1}!");
|
||||||
static const u8 sText_TargetAbilityLoweredStat[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}\nlowered its {B_BUFF1}!");
|
static const u8 sText_TargetAbilityLoweredStat[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}\nlowered its {B_BUFF1}!");
|
||||||
static const u8 sText_AttackerAbilityRaisedStat[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\nraised its {B_BUFF1}!");
|
static const u8 sText_AttackerAbilityRaisedStat[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\nraised its {B_BUFF1}!");
|
||||||
|
static const u8 sText_ScriptingAbilityRaisedStat[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\nraised its {B_BUFF1}!");
|
||||||
static const u8 sText_AuroraVeilEnds[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}\nwore off!");
|
static const u8 sText_AuroraVeilEnds[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}\nwore off!");
|
||||||
static const u8 sText_ElectricTerrainEnds[] = _("The electricity disappeared\nfrom the battlefield.");
|
static const u8 sText_ElectricTerrainEnds[] = _("The electricity disappeared\nfrom the battlefield.");
|
||||||
static const u8 sText_MistyTerrainEnds[] = _("The mist disappeared\nfrom the battlefield.");
|
static const u8 sText_MistyTerrainEnds[] = _("The mist disappeared\nfrom the battlefield.");
|
||||||
@ -667,6 +668,7 @@ static const u8 sText_HealerCure[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_LAST_ABILI
|
|||||||
|
|
||||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||||
{
|
{
|
||||||
|
[STRINGID_SCRIPTINGABILITYSTATRAISE - 12] = sText_ScriptingAbilityRaisedStat,
|
||||||
[STRINGID_HEALERCURE - 12] = sText_HealerCure,
|
[STRINGID_HEALERCURE - 12] = sText_HealerCure,
|
||||||
[STRINGID_ATTACKERLOSTFIRETYPE - 12] = sText_AttackerLostFireType,
|
[STRINGID_ATTACKERLOSTFIRETYPE - 12] = sText_AttackerLostFireType,
|
||||||
[STRINGID_ATTACKERCUREDTARGETSTATUS - 12] = sText_AttackerCuredTargetStatus,
|
[STRINGID_ATTACKERCUREDTARGETSTATUS - 12] = sText_AttackerCuredTargetStatus,
|
||||||
|
@ -7123,6 +7123,25 @@ static void Cmd_various(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case VARIOUS_TRY_ACTIVATE_SOULHEART:
|
||||||
|
while (gBattleStruct->soulheartBattlerId < gBattlersCount)
|
||||||
|
{
|
||||||
|
gBattleScripting.battler = gBattleStruct->soulheartBattlerId++;
|
||||||
|
if (GetBattlerAbility(gBattleScripting.battler) == ABILITY_SOUL_HEART
|
||||||
|
&& IsBattlerAlive(gBattleScripting.battler)
|
||||||
|
&& !NoAliveMonsForEitherParty()
|
||||||
|
&& gBattleMons[gBattleScripting.battler].statStages[STAT_SPATK] != 12)
|
||||||
|
{
|
||||||
|
gBattleMons[gBattleScripting.battler].statStages[STAT_SPATK]++;
|
||||||
|
SET_STATCHANGER(STAT_SPATK, 1, FALSE);
|
||||||
|
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPATK);
|
||||||
|
BattleScriptPushCursor();
|
||||||
|
gBattlescriptCurrInstr = BattleScript_ScriptingAbilityStatRaise;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gBattleStruct->soulheartBattlerId = 0;
|
||||||
|
break;
|
||||||
case VARIOUS_TRY_ACTIVATE_FELL_STINGER:
|
case VARIOUS_TRY_ACTIVATE_FELL_STINGER:
|
||||||
if (gBattleMoves[gCurrentMove].effect == EFFECT_FELL_STINGER
|
if (gBattleMoves[gCurrentMove].effect == EFFECT_FELL_STINGER
|
||||||
&& HasAttackerFaintedTarget()
|
&& HasAttackerFaintedTarget()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user