mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
Implement Double Shock functionality with temporary string
This commit is contained in:
parent
a250341e6c
commit
9512b3a57a
@ -413,6 +413,7 @@ gBattleScriptsForMoveEffects::
|
|||||||
.4byte BattleScript_EffectTerrainHit @ EFFECT_DAMAGE_SET_TERRAIN
|
.4byte BattleScript_EffectTerrainHit @ EFFECT_DAMAGE_SET_TERRAIN
|
||||||
.4byte BattleScript_EffectDarkVoid @ EFFECT_DARK_VOID
|
.4byte BattleScript_EffectDarkVoid @ EFFECT_DARK_VOID
|
||||||
.4byte BattleScript_EffectSleepHit @ EFFECT_SLEEP_HIT
|
.4byte BattleScript_EffectSleepHit @ EFFECT_SLEEP_HIT
|
||||||
|
.4byte BattleScript_EffectDoubleShock @ EFFECT_DOUBLE_SHOCK
|
||||||
|
|
||||||
BattleScript_AffectionBasedEndurance::
|
BattleScript_AffectionBasedEndurance::
|
||||||
playanimation BS_TARGET, B_ANIM_AFFECTION_HANGED_ON
|
playanimation BS_TARGET, B_ANIM_AFFECTION_HANGED_ON
|
||||||
@ -1282,6 +1283,23 @@ BattleScript_BurnUpRemoveType::
|
|||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
return
|
return
|
||||||
|
|
||||||
|
BattleScript_EffectDoubleShock:
|
||||||
|
attackcanceler
|
||||||
|
attackstring
|
||||||
|
ppreduce
|
||||||
|
jumpiftype BS_ATTACKER, TYPE_ELECTRIC, BattleScript_DoubleShockWorks
|
||||||
|
goto BattleScript_ButItFailed
|
||||||
|
|
||||||
|
BattleScript_DoubleShockWorks:
|
||||||
|
setmoveeffect MOVE_EFFECT_DOUBLE_SHOCK | MOVE_EFFECT_CERTAIN
|
||||||
|
goto BattleScript_EffectHit
|
||||||
|
|
||||||
|
BattleScript_DoubleShockRemoveType::
|
||||||
|
losetype BS_ATTACKER, TYPE_ELECTRIC
|
||||||
|
printstring STRINGID_ATTACKERLOSTELECTRICTYPE
|
||||||
|
waitmessage B_WAIT_TIME_LONG
|
||||||
|
return
|
||||||
|
|
||||||
BattleScript_EffectPurify:
|
BattleScript_EffectPurify:
|
||||||
attackcanceler
|
attackcanceler
|
||||||
attackstring
|
attackstring
|
||||||
|
@ -433,6 +433,7 @@ extern const u8 BattleScript_SymbiosisActivates[];
|
|||||||
extern const u8 BattleScript_MultiHitPrintStrings[];
|
extern const u8 BattleScript_MultiHitPrintStrings[];
|
||||||
extern const u8 BattleScript_BurnUpRemoveType[];
|
extern const u8 BattleScript_BurnUpRemoveType[];
|
||||||
extern const u8 BattleScript_TargetAbilityStatRaiseRet[];
|
extern const u8 BattleScript_TargetAbilityStatRaiseRet[];
|
||||||
|
extern const u8 BattleScript_DoubleShockRemoveType[];
|
||||||
|
|
||||||
// zmoves
|
// zmoves
|
||||||
extern const u8 BattleScript_ZMoveActivateDamaging[];
|
extern const u8 BattleScript_ZMoveActivateDamaging[];
|
||||||
|
@ -369,8 +369,9 @@
|
|||||||
#define MOVE_EFFECT_RECOIL_HP_25 0x44
|
#define MOVE_EFFECT_RECOIL_HP_25 0x44
|
||||||
#define MOVE_EFFECT_RELIC_SONG 0x45
|
#define MOVE_EFFECT_RELIC_SONG 0x45
|
||||||
#define MOVE_EFFECT_TRAP_BOTH 0x46
|
#define MOVE_EFFECT_TRAP_BOTH 0x46
|
||||||
|
#define MOVE_EFFECT_DOUBLE_SHOCK 0x47
|
||||||
|
|
||||||
#define NUM_MOVE_EFFECTS 0x47
|
#define NUM_MOVE_EFFECTS 0x48
|
||||||
|
|
||||||
#define MOVE_EFFECT_AFFECTS_USER 0x4000
|
#define MOVE_EFFECT_AFFECTS_USER 0x4000
|
||||||
#define MOVE_EFFECT_CERTAIN 0x8000
|
#define MOVE_EFFECT_CERTAIN 0x8000
|
||||||
|
@ -394,7 +394,8 @@
|
|||||||
#define EFFECT_DAMAGE_SET_TERRAIN 388 // genesis supernova
|
#define EFFECT_DAMAGE_SET_TERRAIN 388 // genesis supernova
|
||||||
#define EFFECT_DARK_VOID 389
|
#define EFFECT_DARK_VOID 389
|
||||||
#define EFFECT_SLEEP_HIT 390
|
#define EFFECT_SLEEP_HIT 390
|
||||||
|
#define EFFECT_DOUBLE_SHOCK 391
|
||||||
|
|
||||||
#define NUM_BATTLE_MOVE_EFFECTS 391
|
#define NUM_BATTLE_MOVE_EFFECTS 392
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||||
|
@ -630,8 +630,9 @@
|
|||||||
#define STRINGID_ATTACKERHEALEDITSBURN 628
|
#define STRINGID_ATTACKERHEALEDITSBURN 628
|
||||||
#define STRINGID_ATTACKERMELTEDTHEICE 629
|
#define STRINGID_ATTACKERMELTEDTHEICE 629
|
||||||
#define STRINGID_TARGETTOUGHEDITOUT 630
|
#define STRINGID_TARGETTOUGHEDITOUT 630
|
||||||
|
#define STRINGID_ATTACKERLOSTELECTRICTYPE 631
|
||||||
|
|
||||||
#define BATTLESTRINGS_COUNT 631
|
#define BATTLESTRINGS_COUNT 632
|
||||||
|
|
||||||
// This is the string id that gBattleStringsTable starts with.
|
// This is the string id that gBattleStringsTable starts with.
|
||||||
// String ids before this (e.g. STRINGID_INTROMSG) are not in the table,
|
// String ids before this (e.g. STRINGID_INTROMSG) are not in the table,
|
||||||
|
@ -2007,6 +2007,10 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
|||||||
if (!IS_BATTLER_OF_TYPE(battlerAtk, TYPE_FIRE))
|
if (!IS_BATTLER_OF_TYPE(battlerAtk, TYPE_FIRE))
|
||||||
score -= 10;
|
score -= 10;
|
||||||
break;
|
break;
|
||||||
|
case EFFECT_DOUBLE_SHOCK:
|
||||||
|
if (!IS_BATTLER_OF_TYPE(battlerAtk, TYPE_ELECTRIC))
|
||||||
|
score -= 10;
|
||||||
|
break;
|
||||||
case EFFECT_DEFOG:
|
case EFFECT_DEFOG:
|
||||||
if (gSideStatuses[GetBattlerSide(battlerDef)]
|
if (gSideStatuses[GetBattlerSide(battlerDef)]
|
||||||
& (SIDE_STATUS_REFLECT | SIDE_STATUS_LIGHTSCREEN | SIDE_STATUS_AURORA_VEIL | SIDE_STATUS_SAFEGUARD | SIDE_STATUS_MIST)
|
& (SIDE_STATUS_REFLECT | SIDE_STATUS_LIGHTSCREEN | SIDE_STATUS_AURORA_VEIL | SIDE_STATUS_SAFEGUARD | SIDE_STATUS_MIST)
|
||||||
|
@ -759,7 +759,7 @@ static const u8 sText_AttackerBrokeThroughParalysis[] = _("{B_ATK_NAME_WITH_PREF
|
|||||||
static const u8 sText_AttackerHealedItsBurn[] = _("{B_ATK_NAME_WITH_PREFIX} healed its burn with\nits sheer determination!");
|
static const u8 sText_AttackerHealedItsBurn[] = _("{B_ATK_NAME_WITH_PREFIX} healed its burn with\nits sheer determination!");
|
||||||
static const u8 sText_AttackerMeltedTheIce[] = _("{B_ATK_NAME_WITH_PREFIX} melted the ice with\nits fiery determination!");
|
static const u8 sText_AttackerMeltedTheIce[] = _("{B_ATK_NAME_WITH_PREFIX} melted the ice with\nits fiery determination!");
|
||||||
static const u8 sText_TargetToughedItOut[] = _("{B_DEF_NAME_WITH_PREFIX} toughed it out\nto show you its best side!");
|
static const u8 sText_TargetToughedItOut[] = _("{B_DEF_NAME_WITH_PREFIX} toughed it out\nto show you its best side!");
|
||||||
|
static const u8 sText_AttackerLostElectricType[] = _("{B_ATK_NAME_WITH_PREFIX} discharged itself out!"); // Unofficial text until the string from the main games is known
|
||||||
|
|
||||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||||
{
|
{
|
||||||
@ -1381,6 +1381,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
|||||||
[STRINGID_CANTESCAPEBECAUSEOFCURRENTMOVE - BATTLESTRINGS_TABLE_START] = sText_CantEscapeBecauseOfCurrentMove,
|
[STRINGID_CANTESCAPEBECAUSEOFCURRENTMOVE - BATTLESTRINGS_TABLE_START] = sText_CantEscapeBecauseOfCurrentMove,
|
||||||
[STRINGID_PKMNTOOKTARGETHIGH - BATTLESTRINGS_TABLE_START] = sText_PkmnTookTargetHigh,
|
[STRINGID_PKMNTOOKTARGETHIGH - BATTLESTRINGS_TABLE_START] = sText_PkmnTookTargetHigh,
|
||||||
[STRINGID_TARGETTOOHEAVY - BATTLESTRINGS_TABLE_START] = sText_TargetTooHeavy,
|
[STRINGID_TARGETTOOHEAVY - BATTLESTRINGS_TABLE_START] = sText_TargetTooHeavy,
|
||||||
|
[STRINGID_ATTACKERLOSTELECTRICTYPE - BATTLESTRINGS_TABLE_START] = sText_AttackerLostElectricType,
|
||||||
};
|
};
|
||||||
|
|
||||||
const u16 gZEffectStringIds[] =
|
const u16 gZEffectStringIds[] =
|
||||||
|
@ -1131,6 +1131,7 @@ static const u16 sFinalStrikeOnlyEffects[] =
|
|||||||
EFFECT_BUG_BITE,
|
EFFECT_BUG_BITE,
|
||||||
EFFECT_THIEF,
|
EFFECT_THIEF,
|
||||||
EFFECT_BURN_UP,
|
EFFECT_BURN_UP,
|
||||||
|
EFFECT_DOUBLE_SHOCK,
|
||||||
EFFECT_SECRET_POWER,
|
EFFECT_SECRET_POWER,
|
||||||
EFFECT_SMACK_DOWN,
|
EFFECT_SMACK_DOWN,
|
||||||
EFFECT_SPARKLING_ARIA,
|
EFFECT_SPARKLING_ARIA,
|
||||||
@ -3647,6 +3648,11 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||||
gBattlescriptCurrInstr = BattleScript_BurnUpRemoveType;
|
gBattlescriptCurrInstr = BattleScript_BurnUpRemoveType;
|
||||||
break;
|
break;
|
||||||
|
case MOVE_EFFECT_DOUBLE_SHOCK:
|
||||||
|
// This seems unnecessary but is done to make it work properly with Parental Bond
|
||||||
|
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||||
|
gBattlescriptCurrInstr = BattleScript_DoubleShockRemoveType;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14355,7 +14355,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
|
|||||||
|
|
||||||
[MOVE_DOUBLE_SHOCK] =
|
[MOVE_DOUBLE_SHOCK] =
|
||||||
{
|
{
|
||||||
.effect = EFFECT_PLACEHOLDER, // EFFECT_DOUBLE_SHOCK
|
.effect = EFFECT_DOUBLE_SHOCK,
|
||||||
.power = 120,
|
.power = 120,
|
||||||
.type = TYPE_ELECTRIC,
|
.type = TYPE_ELECTRIC,
|
||||||
.accuracy = 100,
|
.accuracy = 100,
|
||||||
|
Loading…
Reference in New Issue
Block a user