mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-30 07:24:16 +01:00
Fix multi target moves
Only run CANCELLER_PRANKSTER when moving to the next target of a multi target move. If more cancellers are needed they can be added/moved after CANCELLER_PRANKSTER.
This commit is contained in:
parent
8a6aee7546
commit
b5293cc3e2
@ -34,6 +34,33 @@
|
|||||||
#define ITEMEFFECT_LIFEORB_SHELLBELL 0x7
|
#define ITEMEFFECT_LIFEORB_SHELLBELL 0x7
|
||||||
#define ITEMEFFECT_BATTLER_MOVE_END 0x8 // move end effects for just the battler, not whole field
|
#define ITEMEFFECT_BATTLER_MOVE_END 0x8 // move end effects for just the battler, not whole field
|
||||||
|
|
||||||
|
// Move cancellers. Note that anything from CANCELLER_PRANKSTER onwards is
|
||||||
|
// called on each target of a multi target move, so any new cancellers should
|
||||||
|
// probably be added before CANCELLER_PRANKSTER.
|
||||||
|
#define CANCELLER_FLAGS 0
|
||||||
|
#define CANCELLER_ASLEEP 1
|
||||||
|
#define CANCELLER_FROZEN 2
|
||||||
|
#define CANCELLER_TRUANT 3
|
||||||
|
#define CANCELLER_RECHARGE 4
|
||||||
|
#define CANCELLER_FLINCH 5
|
||||||
|
#define CANCELLER_DISABLED 6
|
||||||
|
#define CANCELLER_GRAVITY 7
|
||||||
|
#define CANCELLER_HEAL_BLOCKED 8
|
||||||
|
#define CANCELLER_TAUNTED 9
|
||||||
|
#define CANCELLER_IMPRISONED 10
|
||||||
|
#define CANCELLER_CONFUSED 11
|
||||||
|
#define CANCELLER_PARALYSED 12
|
||||||
|
#define CANCELLER_IN_LOVE 13
|
||||||
|
#define CANCELLER_BIDE 14
|
||||||
|
#define CANCELLER_THAW 15
|
||||||
|
#define CANCELLER_POWDER_MOVE 16
|
||||||
|
#define CANCELLER_POWDER_STATUS 17
|
||||||
|
#define CANCELLER_THROAT_CHOP 18
|
||||||
|
#define CANCELLER_PRANKSTER 19
|
||||||
|
#define CANCELLER_END 20
|
||||||
|
#define CANCELLER_PSYCHIC_TERRAIN 21
|
||||||
|
#define CANCELLER_END2 22
|
||||||
|
|
||||||
#define WEATHER_HAS_EFFECT ((!IsAbilityOnField(ABILITY_CLOUD_NINE) && !IsAbilityOnField(ABILITY_AIR_LOCK)))
|
#define WEATHER_HAS_EFFECT ((!IsAbilityOnField(ABILITY_CLOUD_NINE) && !IsAbilityOnField(ABILITY_AIR_LOCK)))
|
||||||
|
|
||||||
#define IS_WHOLE_SIDE_ALIVE(battler)((IsBattlerAlive(battler) && IsBattlerAlive(BATTLE_PARTNER(battler))))
|
#define IS_WHOLE_SIDE_ALIVE(battler)((IsBattlerAlive(battler) && IsBattlerAlive(BATTLE_PARTNER(battler))))
|
||||||
|
@ -5157,7 +5157,7 @@ static void Cmd_moveend(void)
|
|||||||
MoveValuesCleanUp();
|
MoveValuesCleanUp();
|
||||||
gBattleScripting.moveEffect = gBattleScripting.savedMoveEffect;
|
gBattleScripting.moveEffect = gBattleScripting.savedMoveEffect;
|
||||||
BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]);
|
BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]);
|
||||||
gBattleStruct->atkCancellerTracker = 0; // Run all cancellers on next target
|
gBattleStruct->atkCancellerTracker = CANCELLER_PRANKSTER; // Run Prankster canceller on next target, skip the earlier ones
|
||||||
gBattlescriptCurrInstr = BattleScript_FlushMessageBox;
|
gBattlescriptCurrInstr = BattleScript_FlushMessageBox;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3102,33 +3102,6 @@ void TryClearRageAndFuryCutter(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
CANCELLER_FLAGS,
|
|
||||||
CANCELLER_ASLEEP,
|
|
||||||
CANCELLER_FROZEN,
|
|
||||||
CANCELLER_TRUANT,
|
|
||||||
CANCELLER_RECHARGE,
|
|
||||||
CANCELLER_FLINCH,
|
|
||||||
CANCELLER_DISABLED,
|
|
||||||
CANCELLER_GRAVITY,
|
|
||||||
CANCELLER_HEAL_BLOCKED,
|
|
||||||
CANCELLER_TAUNTED,
|
|
||||||
CANCELLER_IMPRISONED,
|
|
||||||
CANCELLER_CONFUSED,
|
|
||||||
CANCELLER_PARALYSED,
|
|
||||||
CANCELLER_IN_LOVE,
|
|
||||||
CANCELLER_BIDE,
|
|
||||||
CANCELLER_THAW,
|
|
||||||
CANCELLER_POWDER_MOVE,
|
|
||||||
CANCELLER_POWDER_STATUS,
|
|
||||||
CANCELLER_THROAT_CHOP,
|
|
||||||
CANCELLER_PRANKSTER,
|
|
||||||
CANCELLER_END,
|
|
||||||
CANCELLER_PSYCHIC_TERRAIN,
|
|
||||||
CANCELLER_END2,
|
|
||||||
};
|
|
||||||
|
|
||||||
u8 AtkCanceller_UnableToUseMove(void)
|
u8 AtkCanceller_UnableToUseMove(void)
|
||||||
{
|
{
|
||||||
u8 effect = 0;
|
u8 effect = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user