mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-15 16:12:12 +01:00
prankster updated to gen 7
This commit is contained in:
parent
8647895f1a
commit
a49b5d1ad0
@ -7792,3 +7792,12 @@ BattleScript_AnnounceAirLockCloudNine::
|
|||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
call BattleScript_WeatherFormChanges
|
call BattleScript_WeatherFormChanges
|
||||||
end3
|
end3
|
||||||
|
|
||||||
|
BattleScript_DarkTypePreventsPrankster::
|
||||||
|
attackstring
|
||||||
|
ppreduce
|
||||||
|
pause 0x20
|
||||||
|
printstring STRINGID_ITDOESNTAFFECT
|
||||||
|
waitmessage 0x40
|
||||||
|
orhalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
|
||||||
|
goto BattleScript_MoveEnd
|
||||||
|
@ -357,5 +357,6 @@ extern const u8 BattleScript_CottonDownActivates[];
|
|||||||
extern const u8 BattleScript_BallFetch[];
|
extern const u8 BattleScript_BallFetch[];
|
||||||
extern const u8 BattleScript_SandSpitActivates[];
|
extern const u8 BattleScript_SandSpitActivates[];
|
||||||
extern const u8 BattleScript_PerishBodyActivates[];
|
extern const u8 BattleScript_PerishBodyActivates[];
|
||||||
|
extern const u8 BattleScript_DarkTypePreventsPrankster[];
|
||||||
|
|
||||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||||
|
@ -122,6 +122,7 @@
|
|||||||
#define B_FLASH_FIRE_FROZEN GEN_6 // In Gen5+, Flash Fire can trigger even when frozen, when it couldn't before.
|
#define B_FLASH_FIRE_FROZEN GEN_6 // In Gen5+, Flash Fire can trigger even when frozen, when it couldn't before.
|
||||||
#define B_SYNCHRONIZE_NATURE GEN_6 // In Gen8+, if the Pokémon with Synchronize is leading the party, it's 100% guaranteed that wild Pokémon will have the same ability, as opposed to 50% previously.
|
#define B_SYNCHRONIZE_NATURE GEN_6 // In Gen8+, if the Pokémon with Synchronize is leading the party, it's 100% guaranteed that wild Pokémon will have the same ability, as opposed to 50% previously.
|
||||||
#define B_UPDATED_INTIMIDATE GEN_8 // In Gen8, Intimidate doesn't work on opponents with the Inner Focus, Scrappy, Own Tempo or Oblivious abilities.
|
#define B_UPDATED_INTIMIDATE GEN_8 // In Gen8, Intimidate doesn't work on opponents with the Inner Focus, Scrappy, Own Tempo or Oblivious abilities.
|
||||||
|
#define B_PRANKSTER GEN_7 // In Gen7, Prankster-elevated status moves do not affect Dark type Pokemon
|
||||||
|
|
||||||
// Item settings
|
// Item settings
|
||||||
#define B_HP_BERRIES GEN_6 // In Gen4+, berries which restore hp activate immediately after hp drops to half. In gen3, the effect occurs at the end of the turn.
|
#define B_HP_BERRIES GEN_6 // In Gen4+, berries which restore hp activate immediately after hp drops to half. In gen3, the effect occurs at the end of the turn.
|
||||||
|
@ -4994,6 +4994,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
|
||||||
gBattlescriptCurrInstr = BattleScript_FlushMessageBox;
|
gBattlescriptCurrInstr = BattleScript_FlushMessageBox;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2849,6 +2849,7 @@ enum
|
|||||||
CANCELLER_POWDER_MOVE,
|
CANCELLER_POWDER_MOVE,
|
||||||
CANCELLER_POWDER_STATUS,
|
CANCELLER_POWDER_STATUS,
|
||||||
CANCELLER_THROAT_CHOP,
|
CANCELLER_THROAT_CHOP,
|
||||||
|
CANCELLER_PRANKSTER,
|
||||||
CANCELLER_END,
|
CANCELLER_END,
|
||||||
CANCELLER_PSYCHIC_TERRAIN,
|
CANCELLER_PSYCHIC_TERRAIN,
|
||||||
CANCELLER_END2,
|
CANCELLER_END2,
|
||||||
@ -3185,6 +3186,23 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
}
|
}
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancellerTracker++;
|
||||||
break;
|
break;
|
||||||
|
case CANCELLER_PRANKSTER:
|
||||||
|
#if B_PRANKSTER >= GEN_7
|
||||||
|
if (GetBattlerAbility(gBattlerAttacker) == ABILITY_PRANKSTER
|
||||||
|
&& IS_MOVE_STATUS(gCurrentMove)
|
||||||
|
&& !(gBattleMoves[gCurrentMove].target & MOVE_TARGET_OPPONENTS_FIELD)
|
||||||
|
&& IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_DARK)
|
||||||
|
&& !(gStatuses3[gBattlerTarget] & STATUS3_SEMI_INVULNERABLE))
|
||||||
|
{
|
||||||
|
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE) || !(gBattleMoves[gCurrentMove].target & (MOVE_TARGET_BOTH | MOVE_TARGET_FOES_AND_ALLY)))
|
||||||
|
CancelMultiTurnMoves(gBattlerAttacker); // don't cancel moves that can hit two targets bc one target might not be protected
|
||||||
|
gBattleScripting.battler = gBattlerAbility = gBattlerTarget;
|
||||||
|
gBattlescriptCurrInstr = BattleScript_DarkTypePreventsPrankster;
|
||||||
|
effect = 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
gBattleStruct->atkCancellerTracker++;
|
||||||
|
break;
|
||||||
case CANCELLER_END:
|
case CANCELLER_END:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user