mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
fix psycho shift string printing
This commit is contained in:
parent
a165f9926d
commit
209279c207
@ -1532,7 +1532,7 @@ BattleScript_EffectPsychoShift:
|
||||
BattleScript_EffectPsychoShiftCanWork:
|
||||
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
|
||||
jumpifsafeguard BattleScript_SafeguardProtected
|
||||
trypsychoshift BattleScript_MoveEnd
|
||||
trypsychoshift BattleScript_ButItFailed
|
||||
attackanimation
|
||||
waitanimation
|
||||
copybyte gEffectBattler, gBattlerTarget
|
||||
|
@ -8657,70 +8657,17 @@ static void Cmd_various(void)
|
||||
return;
|
||||
case VARIOUS_PSYCHO_SHIFT:
|
||||
{
|
||||
u16 targetAbility = GetBattlerAbility(gBattlerTarget);
|
||||
i = TRUE;
|
||||
if (gBattleMons[gBattlerAttacker].status1 & STATUS1_PARALYSIS)
|
||||
if ((gBattleMons[gBattlerAttacker].status1 & STATUS1_PARALYSIS && !CanBeParalyzed(gBattlerTarget))
|
||||
|| (gBattleMons[gBattlerAttacker].status1 & STATUS1_PSN_ANY && !CanBePoisoned(gBattlerAttacker, gBattlerTarget))
|
||||
|| (gBattleMons[gBattlerAttacker].status1 & STATUS1_BURN && !CanBeBurned(gBattlerTarget))
|
||||
|| (gBattleMons[gBattlerAttacker].status1 & STATUS1_SLEEP && !CanSleep(gBattlerTarget)))
|
||||
{
|
||||
if (!(CanBeParalyzed(gBattlerTarget)))
|
||||
{
|
||||
gBattlerAbility = gBattlerTarget;
|
||||
BattleScriptPush(T1_READ_PTR(gBattlescriptCurrInstr + 3));
|
||||
gBattlescriptCurrInstr = BattleScript_PRLZPrevention;
|
||||
i = FALSE;
|
||||
// fails
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 3;
|
||||
}
|
||||
}
|
||||
else if (gBattleMons[gBattlerAttacker].status1 & STATUS1_PSN_ANY)
|
||||
{
|
||||
if (!CanBePoisoned(gBattlerTarget, targetAbility))
|
||||
{
|
||||
gBattlerAbility = gBattlerTarget;
|
||||
BattleScriptPush(T1_READ_PTR(gBattlescriptCurrInstr + 3));
|
||||
gBattlescriptCurrInstr = BattleScript_PSNPrevention;
|
||||
i = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gBattleMons[gBattlerAttacker].status1 & STATUS1_POISON)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
}
|
||||
}
|
||||
else if (gBattleMons[gBattlerAttacker].status1 & STATUS1_BURN)
|
||||
{
|
||||
if (!CanBeBurned(gBattlerTarget))
|
||||
{
|
||||
gBattlerAbility = gBattlerTarget;
|
||||
BattleScriptPush(T1_READ_PTR(gBattlescriptCurrInstr + 3));
|
||||
gBattlescriptCurrInstr = BattleScript_BRNPrevention;
|
||||
i = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
}
|
||||
}
|
||||
else if (gBattleMons[gBattlerAttacker].status1 & STATUS1_SLEEP)
|
||||
{
|
||||
if (!CanSleep(gBattlerTarget))
|
||||
{
|
||||
gBattlerAbility = gBattlerTarget;
|
||||
// BattleScriptPush(T1_READ_PTR(gBattlescriptCurrInstr + 3));
|
||||
// gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||
i = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 4;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == TRUE)
|
||||
{
|
||||
// Psycho shift works
|
||||
gBattleMons[gBattlerTarget].status1 = gBattleMons[gBattlerAttacker].status1 & STATUS1_ANY;
|
||||
gActiveBattler = gBattlerTarget;
|
||||
BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].status1), &gBattleMons[gActiveBattler].status1);
|
||||
|
Loading…
Reference in New Issue
Block a user