mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Implemented Shell Trap's effect
This commit is contained in:
parent
ae482ed1f4
commit
3ce4869766
@ -417,6 +417,24 @@ gBattleScriptsForMoveEffects::
|
||||
.4byte BattleScript_EffectSpecialAttackUpHit @ EFFECT_SPECIAL_ATTACK_UP_HIT
|
||||
.4byte BattleScript_EffectVictoryDance @ EFFECT_VICTORY_DANCE
|
||||
.4byte BattleScript_EffectCeaselessEdge @ EFFECT_CEASELESS_EDGE
|
||||
.4byte BattleScript_EffectShellTrap @ EFFECT_SHELL_TRAP
|
||||
|
||||
BattleScript_EffectShellTrap:
|
||||
jumpifnodamage BattleScript_EffectShellTrap_Failed
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
BattleScript_EffectShellTrap_Failed:
|
||||
printstring STRINGID_ATTACKERSHELLTRAPDIDNTWORK
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_ShellTrapSetUp::
|
||||
printstring STRINGID_EMPTYSTRING3
|
||||
waitmessage 1
|
||||
playanimation BS_ATTACKER, B_ANIM_SHELL_TRAP_SETUP, NULL
|
||||
printstring STRINGID_ATTACKERSETASHELLTRAP
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end2
|
||||
|
||||
BattleScript_EffectCeaselessEdge::
|
||||
call BattleScript_EffectHit_Ret
|
||||
|
@ -433,6 +433,7 @@ extern const u8 BattleScript_MultiHitPrintStrings[];
|
||||
extern const u8 BattleScript_BurnUpRemoveType[];
|
||||
extern const u8 BattleScript_TargetAbilityStatRaiseRet[];
|
||||
extern const u8 BattleScript_DoubleShockRemoveType[];
|
||||
extern const u8 BattleScript_ShellTrapSetUp[];
|
||||
|
||||
// zmoves
|
||||
extern const u8 BattleScript_ZMoveActivateDamaging[];
|
||||
|
@ -398,7 +398,8 @@
|
||||
#define EFFECT_SPECIAL_ATTACK_UP_HIT 392
|
||||
#define EFFECT_VICTORY_DANCE 393
|
||||
#define EFFECT_CEASELESS_EDGE 394
|
||||
#define EFFECT_SHELL_TRAP 395
|
||||
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 395
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 396
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
@ -632,8 +632,10 @@
|
||||
#define STRINGID_TARGETTOUGHEDITOUT 630
|
||||
#define STRINGID_ATTACKERLOSTELECTRICTYPE 631
|
||||
#define STRINGID_ATTACKERSWITCHEDSTATWITHTARGET 632
|
||||
#define STRINGID_ATTACKERSETASHELLTRAP 633
|
||||
#define STRINGID_ATTACKERSHELLTRAPDIDNTWORK 634
|
||||
|
||||
#define BATTLESTRINGS_COUNT 633
|
||||
#define BATTLESTRINGS_COUNT 635
|
||||
|
||||
// This is the string id that gBattleStringsTable starts with.
|
||||
// String ids before this (e.g. STRINGID_INTROMSG) are not in the table,
|
||||
|
@ -101,7 +101,7 @@ static void SetActionsAndBattlersTurnOrder(void);
|
||||
static void UpdateBattlerPartyOrdersOnSwitch(void);
|
||||
static bool8 AllAtActionConfirmed(void);
|
||||
static void TryChangeTurnOrder(void);
|
||||
static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void);
|
||||
static void CheckChosenMoveForEffectsBeforeTurnStarts(void);
|
||||
static void CheckMegaEvolutionBeforeTurn(void);
|
||||
static void CheckQuickClaw_CustapBerryActivation(void);
|
||||
static void FreeResetData_ReturnToOvOrDoEvolutions(void);
|
||||
@ -4878,7 +4878,7 @@ static void CheckMegaEvolutionBeforeTurn(void)
|
||||
}
|
||||
|
||||
#if B_MEGA_EVO_TURN_ORDER <= GEN_6
|
||||
gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts;
|
||||
gBattleMainFunc = CheckChosenMoveForEffectsBeforeTurnStarts;
|
||||
gBattleStruct->focusPunchBattlerId = 0;
|
||||
#else
|
||||
gBattleMainFunc = TryChangeTurnOrder; // This will just do nothing if no mon has mega evolved
|
||||
@ -4903,11 +4903,11 @@ static void TryChangeTurnOrder(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts;
|
||||
gBattleMainFunc = CheckChosenMoveForEffectsBeforeTurnStarts;
|
||||
gBattleStruct->focusPunchBattlerId = 0;
|
||||
}
|
||||
|
||||
static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void)
|
||||
static void CheckChosenMoveForEffectsBeforeTurnStarts(void)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
@ -4921,7 +4921,7 @@ static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void)
|
||||
&& !(gDisableStructs[gBattlerAttacker].truantCounter)
|
||||
&& !(gProtectStructs[gActiveBattler].noValidMoves))
|
||||
{
|
||||
switch(gChosenMoveByBattler[gActiveBattler])
|
||||
switch (gChosenMoveByBattler[gActiveBattler])
|
||||
{
|
||||
case MOVE_FOCUS_PUNCH:
|
||||
BattleScriptExecute(BattleScript_FocusPunchSetUp);
|
||||
@ -4929,6 +4929,9 @@ static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void)
|
||||
case MOVE_BEAK_BLAST:
|
||||
BattleScriptExecute(BattleScript_BeakBlastSetUp);
|
||||
return;
|
||||
case MOVE_SHELL_TRAP:
|
||||
BattleScriptExecute(BattleScript_ShellTrapSetUp);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -761,9 +761,13 @@ static const u8 sText_AttackerMeltedTheIce[] = _("{B_ATK_NAME_WITH_PREFIX} melte
|
||||
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} used up all\nof its electricity!");
|
||||
static const u8 sText_AttackerSwitchedStatWithTarget[] = _("{B_ATK_NAME_WITH_PREFIX} switched {B_BUFF1}\nwith its target!");
|
||||
static const u8 sText_AttackerSetAShellTrap[] = _("{B_ATK_NAME_WITH_PREFIX} set\na shell trap!");
|
||||
static const u8 sText_AttackerShellTrapDidntWork[] = _("{B_ATK_NAME_WITH_PREFIX}'s shell trap\ndidn't work!");
|
||||
|
||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
{
|
||||
[STRINGID_ATTACKERSHELLTRAPDIDNTWORK - BATTLESTRINGS_TABLE_START] = sText_AttackerShellTrapDidntWork,
|
||||
[STRINGID_ATTACKERSETASHELLTRAP - BATTLESTRINGS_TABLE_START] = sText_AttackerSetAShellTrap,
|
||||
[STRINGID_ATTACKERSWITCHEDSTATWITHTARGET - BATTLESTRINGS_TABLE_START] = sText_AttackerSwitchedStatWithTarget,
|
||||
[STRINGID_TARGETTOUGHEDITOUT - BATTLESTRINGS_TABLE_START] = sText_TargetToughedItOut,
|
||||
[STRINGID_ATTACKERMELTEDTHEICE - BATTLESTRINGS_TABLE_START] = sText_AttackerMeltedTheIce,
|
||||
|
@ -10031,7 +10031,7 @@ static void Cmd_various(void)
|
||||
gBattleMons[gActiveBattler].item = gLastUsedItem;
|
||||
break;
|
||||
case VARIOUS_SET_BEAK_BLAST:
|
||||
gProtectStructs[gBattlerAttacker].beakBlastCharge = TRUE;
|
||||
gProtectStructs[gActiveBattler].beakBlastCharge = TRUE;
|
||||
break;
|
||||
case VARIOUS_SWAP_SIDE_STATUSES:
|
||||
CourtChangeSwapSideStatuses();
|
||||
@ -11927,7 +11927,8 @@ static void Cmd_trysetencore(void)
|
||||
|
||||
if (gLastMoves[gBattlerTarget] == MOVE_STRUGGLE
|
||||
|| gLastMoves[gBattlerTarget] == MOVE_ENCORE
|
||||
|| gLastMoves[gBattlerTarget] == MOVE_MIRROR_MOVE)
|
||||
|| gLastMoves[gBattlerTarget] == MOVE_MIRROR_MOVE
|
||||
|| gLastMoves[gBattlerTarget] == MOVE_SHELL_TRAP)
|
||||
{
|
||||
i = MAX_MON_MOVES;
|
||||
}
|
||||
|
@ -11616,7 +11616,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
|
||||
|
||||
[MOVE_SHELL_TRAP] =
|
||||
{
|
||||
.effect = EFFECT_PLACEHOLDER, // EFFECT_SHELL_TRAP,
|
||||
.effect = EFFECT_SHELL_TRAP,
|
||||
.power = 150,
|
||||
.type = TYPE_FIRE,
|
||||
.accuracy = 100,
|
||||
|
Loading…
Reference in New Issue
Block a user