mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Remove shell trap effect code
Left strings and animations as those were fine, but code was non-functional and fixing it was not trivial.
This commit is contained in:
parent
42b8f18cb1
commit
d2eb5f0e61
@ -1933,20 +1933,6 @@
|
|||||||
various BS_ATTACKER, VARIOUS_SWAP_SIDE_STATUSES
|
various BS_ATTACKER, VARIOUS_SWAP_SIDE_STATUSES
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setshelltrap battler:req
|
|
||||||
various \battler, VARIOUS_SET_SHELL_TRAP
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro clearshelltrap battler:req
|
|
||||||
various \battler, VARIOUS_CLEAR_SHELL_TRAP
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro checkshelltrap battler:req, ptr1:req, ptr2:req
|
|
||||||
various \battler, VARIOUS_CHECK_SHELL_TRAP
|
|
||||||
.4byte \ptr1
|
|
||||||
.4byte \ptr2
|
|
||||||
.endm
|
|
||||||
|
|
||||||
@ helpful macros
|
@ helpful macros
|
||||||
.macro setstatchanger stat:req, stages:req, down:req
|
.macro setstatchanger stat:req, stages:req, down:req
|
||||||
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7
|
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7
|
||||||
|
@ -409,47 +409,6 @@ gBattleScriptsForMoveEffects::
|
|||||||
.4byte BattleScript_EffectHit @ EFFECT_RISING_VOLTAGE
|
.4byte BattleScript_EffectHit @ EFFECT_RISING_VOLTAGE
|
||||||
.4byte BattleScript_EffectHit @ EFFECT_BEAK_BLAST
|
.4byte BattleScript_EffectHit @ EFFECT_BEAK_BLAST
|
||||||
.4byte BattleScript_EffectCourtChange @ EFFECT_COURT_CHANGE
|
.4byte BattleScript_EffectCourtChange @ EFFECT_COURT_CHANGE
|
||||||
.4byte BattleScript_EffectShellTrap @ EFFECT_SHELL_TRAP
|
|
||||||
|
|
||||||
BattleScript_EffectShellTrap::
|
|
||||||
checkshelltrap BS_ATTACKER, BattleScript_ShellTrapExplode, BattleScript_MoveEnd
|
|
||||||
clearshelltrap BS_ATTACKER
|
|
||||||
attackcanceler
|
|
||||||
attackstring
|
|
||||||
goto BattleScript_ButItFailed
|
|
||||||
|
|
||||||
BattleScript_ShellTrapSetUp::
|
|
||||||
setshelltrap BS_ATTACKER
|
|
||||||
printstring STRINGID_EMPTYSTRING3
|
|
||||||
waitmessage 0x1
|
|
||||||
playanimation BS_ATTACKER B_ANIM_SHELL_TRAP_SETUP, NULL
|
|
||||||
printstring STRINGID_PREPARESHELLTRAP
|
|
||||||
waitmessage 0x40
|
|
||||||
end2
|
|
||||||
|
|
||||||
BattleScript_ShellTrapExplode::
|
|
||||||
clearshelltrap BS_ATTACKER
|
|
||||||
attackcanceler
|
|
||||||
attackstring
|
|
||||||
ppreduce
|
|
||||||
critcalc
|
|
||||||
damagecalc
|
|
||||||
adjustdamage
|
|
||||||
attackanimation
|
|
||||||
waitanimation
|
|
||||||
effectivenesssound
|
|
||||||
hitanimation BS_TARGET
|
|
||||||
waitstate
|
|
||||||
healthbarupdate BS_TARGET
|
|
||||||
datahpupdate BS_TARGET
|
|
||||||
critmessage
|
|
||||||
waitmessage 0x40
|
|
||||||
resultmessage
|
|
||||||
waitmessage 0x40
|
|
||||||
seteffectwithchance
|
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
|
||||||
moveendall
|
|
||||||
end
|
|
||||||
|
|
||||||
BattleScript_EffectCourtChange::
|
BattleScript_EffectCourtChange::
|
||||||
attackcanceler
|
attackcanceler
|
||||||
|
@ -158,8 +158,6 @@ struct ProtectStruct
|
|||||||
u16 pranksterElevated:1;
|
u16 pranksterElevated:1;
|
||||||
u16 quickDraw:1;
|
u16 quickDraw:1;
|
||||||
u16 beakBlastCharge:1;
|
u16 beakBlastCharge:1;
|
||||||
u16 shellTrapSet:1;
|
|
||||||
u16 shellTrapTriggered:1;
|
|
||||||
u32 physicalDmg;
|
u32 physicalDmg;
|
||||||
u32 specialDmg;
|
u32 specialDmg;
|
||||||
u8 physicalBattlerId;
|
u8 physicalBattlerId;
|
||||||
|
@ -418,9 +418,6 @@ extern const u8 BattleScript_NeutralizingGasExits[];
|
|||||||
extern const u8 BattleScript_MeltedItem[];
|
extern const u8 BattleScript_MeltedItem[];
|
||||||
extern const u8 BattleScript_BeakBlastSetUp[];
|
extern const u8 BattleScript_BeakBlastSetUp[];
|
||||||
extern const u8 BattleScript_BeakBlastBurn[];
|
extern const u8 BattleScript_BeakBlastBurn[];
|
||||||
extern const u8 BattleScript_ShellTrapSetUp[];
|
|
||||||
extern const u8 BattleScript_ShellTrapExplode[];
|
|
||||||
extern const u8 BattleScript_EffectShellTrap[];
|
|
||||||
extern const u8 BattleScript_DefDownSpeedUp[];
|
extern const u8 BattleScript_DefDownSpeedUp[];
|
||||||
|
|
||||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||||
|
@ -392,7 +392,6 @@
|
|||||||
#define EFFECT_RISING_VOLTAGE 386
|
#define EFFECT_RISING_VOLTAGE 386
|
||||||
#define EFFECT_BEAK_BLAST 387
|
#define EFFECT_BEAK_BLAST 387
|
||||||
#define EFFECT_COURT_CHANGE 388
|
#define EFFECT_COURT_CHANGE 388
|
||||||
#define EFFECT_SHELL_TRAP 389
|
|
||||||
|
|
||||||
#define NUM_BATTLE_MOVE_EFFECTS 390
|
#define NUM_BATTLE_MOVE_EFFECTS 390
|
||||||
|
|
||||||
|
@ -211,9 +211,6 @@
|
|||||||
#define VARIOUS_TRY_SET_CORROSIVE_GAS 138
|
#define VARIOUS_TRY_SET_CORROSIVE_GAS 138
|
||||||
#define VARIOUS_SET_BEAK_BLAST 139
|
#define VARIOUS_SET_BEAK_BLAST 139
|
||||||
#define VARIOUS_SWAP_SIDE_STATUSES 140
|
#define VARIOUS_SWAP_SIDE_STATUSES 140
|
||||||
#define VARIOUS_SET_SHELL_TRAP 141
|
|
||||||
#define VARIOUS_CLEAR_SHELL_TRAP 142
|
|
||||||
#define VARIOUS_CHECK_SHELL_TRAP 143
|
|
||||||
|
|
||||||
// Cmd_manipulatedamage
|
// Cmd_manipulatedamage
|
||||||
#define DMG_CHANGE_SIGN 0
|
#define DMG_CHANGE_SIGN 0
|
||||||
|
@ -4714,9 +4714,6 @@ static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void)
|
|||||||
case MOVE_BEAK_BLAST:
|
case MOVE_BEAK_BLAST:
|
||||||
BattleScriptExecute(BattleScript_BeakBlastSetUp);
|
BattleScriptExecute(BattleScript_BeakBlastSetUp);
|
||||||
return;
|
return;
|
||||||
case MOVE_SHELL_TRAP:
|
|
||||||
BattleScriptExecute(BattleScript_ShellTrapSetUp);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1543,8 +1543,7 @@ static void Cmd_attackcanceler(void)
|
|||||||
gBattleCommunication[MISS_TYPE] = B_MSG_PROTECTED;
|
gBattleCommunication[MISS_TYPE] = B_MSG_PROTECTED;
|
||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
else if ((gProtectStructs[gBattlerTarget].beakBlastCharge || gProtectStructs[gBattlerTarget].shellTrapSet)
|
else if (gProtectStructs[gBattlerTarget].beakBlastCharge && IsMoveMakingContact(gCurrentMove, gBattlerAttacker))
|
||||||
&& IsMoveMakingContact(gCurrentMove, gBattlerAttacker))
|
|
||||||
{
|
{
|
||||||
gProtectStructs[gBattlerAttacker].touchedProtectLike = TRUE;
|
gProtectStructs[gBattlerAttacker].touchedProtectLike = TRUE;
|
||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
@ -4994,21 +4993,6 @@ static void Cmd_moveend(void)
|
|||||||
gBattlescriptCurrInstr = BattleScript_BeakBlastBurn;
|
gBattlescriptCurrInstr = BattleScript_BeakBlastBurn;
|
||||||
effect = 1;
|
effect = 1;
|
||||||
}
|
}
|
||||||
else if (gProtectStructs[gBattlerTarget].shellTrapSet
|
|
||||||
&& !TestSheerForceFlag(gBattlerAttacker, gCurrentMove)
|
|
||||||
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
|
|
||||||
{
|
|
||||||
u32 temp;
|
|
||||||
gProtectStructs[gBattlerTarget].shellTrapTriggered = TRUE;
|
|
||||||
gProtectStructs[gBattlerAttacker].touchedProtectLike = FALSE;
|
|
||||||
// Swap battlers so target attacks attacker with Shell Trap
|
|
||||||
SWAP(gBattlerAttacker, gBattlerTarget, temp);
|
|
||||||
// Set current move to Shell Trap
|
|
||||||
gCurrentMove = MOVE_SHELL_TRAP;
|
|
||||||
BattleScriptPushCursor();
|
|
||||||
gBattlescriptCurrInstr = BattleScript_EffectShellTrap;
|
|
||||||
effect = TRUE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
gBattleScripting.moveendState++;
|
gBattleScripting.moveendState++;
|
||||||
break;
|
break;
|
||||||
@ -9379,23 +9363,6 @@ static void Cmd_various(void)
|
|||||||
case VARIOUS_SET_BEAK_BLAST:
|
case VARIOUS_SET_BEAK_BLAST:
|
||||||
gProtectStructs[gBattlerAttacker].beakBlastCharge = TRUE;
|
gProtectStructs[gBattlerAttacker].beakBlastCharge = TRUE;
|
||||||
break;
|
break;
|
||||||
case VARIOUS_SET_SHELL_TRAP:
|
|
||||||
gProtectStructs[gBattlerAttacker].shellTrapSet = TRUE;
|
|
||||||
break;
|
|
||||||
case VARIOUS_CLEAR_SHELL_TRAP:
|
|
||||||
gProtectStructs[gBattlerAttacker].shellTrapSet = FALSE;
|
|
||||||
break;
|
|
||||||
case VARIOUS_CHECK_SHELL_TRAP:
|
|
||||||
// Attack with Shell Trap
|
|
||||||
if (gProtectStructs[gBattlerAttacker].shellTrapSet == TRUE && gProtectStructs[gBattlerAttacker].shellTrapTriggered == TRUE)
|
|
||||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
|
||||||
// Attacked with Shell Trap, go to move end
|
|
||||||
else if (gProtectStructs[gBattlerAttacker].shellTrapSet == FALSE && gProtectStructs[gBattlerAttacker].shellTrapTriggered == TRUE)
|
|
||||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 7);
|
|
||||||
// Shell Trap failed
|
|
||||||
else
|
|
||||||
gBattlescriptCurrInstr += 11;
|
|
||||||
break;
|
|
||||||
case VARIOUS_SWAP_SIDE_STATUSES:
|
case VARIOUS_SWAP_SIDE_STATUSES:
|
||||||
{
|
{
|
||||||
CourtChangeSwapSideStatuses();
|
CourtChangeSwapSideStatuses();
|
||||||
|
@ -10212,7 +10212,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
|||||||
|
|
||||||
[MOVE_SHELL_TRAP] =
|
[MOVE_SHELL_TRAP] =
|
||||||
{
|
{
|
||||||
.effect = EFFECT_SHELL_TRAP,
|
.effect = EFFECT_PLACEHOLDER, // EFFECT_SHELL_TRAP,
|
||||||
.power = 150,
|
.power = 150,
|
||||||
.type = TYPE_FIRE,
|
.type = TYPE_FIRE,
|
||||||
.accuracy = 100,
|
.accuracy = 100,
|
||||||
|
Loading…
Reference in New Issue
Block a user