mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 19:54:21 +01:00
Using True/False on SetMoveEffect.
This commit is contained in:
parent
c805c4cc6f
commit
f821303429
@ -2895,16 +2895,16 @@ static void Cmd_seteffectwithchance(void)
|
|||||||
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
|
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
|
||||||
{
|
{
|
||||||
gBattleCommunication[MOVE_EFFECT_BYTE] &= ~(MOVE_EFFECT_CERTAIN);
|
gBattleCommunication[MOVE_EFFECT_BYTE] &= ~(MOVE_EFFECT_CERTAIN);
|
||||||
SetMoveEffect(0, MOVE_EFFECT_CERTAIN);
|
SetMoveEffect(FALSE, MOVE_EFFECT_CERTAIN);
|
||||||
}
|
}
|
||||||
else if (Random() % 100 < percentChance
|
else if (Random() % 100 < percentChance
|
||||||
&& gBattleCommunication[MOVE_EFFECT_BYTE]
|
&& gBattleCommunication[MOVE_EFFECT_BYTE]
|
||||||
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
|
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
|
||||||
{
|
{
|
||||||
if (percentChance >= 100)
|
if (percentChance >= 100)
|
||||||
SetMoveEffect(0, MOVE_EFFECT_CERTAIN);
|
SetMoveEffect(FALSE, MOVE_EFFECT_CERTAIN);
|
||||||
else
|
else
|
||||||
SetMoveEffect(0, 0);
|
SetMoveEffect(FALSE, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1009,7 +1009,7 @@ u8 DoBattlerEndTurnEffects(void)
|
|||||||
if (!(gBattleMons[gActiveBattler].status2 & STATUS2_CONFUSION))
|
if (!(gBattleMons[gActiveBattler].status2 & STATUS2_CONFUSION))
|
||||||
{
|
{
|
||||||
gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_CONFUSION | MOVE_EFFECT_AFFECTS_USER;
|
gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_CONFUSION | MOVE_EFFECT_AFFECTS_USER;
|
||||||
SetMoveEffect(1, 0);
|
SetMoveEffect(TRUE, 0);
|
||||||
if (gBattleMons[gActiveBattler].status2 & STATUS2_CONFUSION)
|
if (gBattleMons[gActiveBattler].status2 & STATUS2_CONFUSION)
|
||||||
BattleScriptExecute(BattleScript_ThrashConfuses);
|
BattleScriptExecute(BattleScript_ThrashConfuses);
|
||||||
effect++;
|
effect++;
|
||||||
@ -3207,7 +3207,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
|||||||
{
|
{
|
||||||
gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_FLINCH;
|
gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_FLINCH;
|
||||||
BattleScriptPushCursor();
|
BattleScriptPushCursor();
|
||||||
SetMoveEffect(0, 0);
|
SetMoveEffect(FALSE, 0);
|
||||||
BattleScriptPop();
|
BattleScriptPop();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user