magician base functionality
This commit is contained in:
parent
471eab40c8
commit
1031703309
3 changed files with 27 additions and 0 deletions
|
@ -8426,3 +8426,9 @@ BattleScript_DarkTypePreventsPrankster::
|
|||
waitmessage B_WAIT_TIME_LONG
|
||||
orhalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_MagicianActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
call BattleScript_ItemSteal
|
||||
return
|
||||
|
||||
|
|
|
@ -389,5 +389,6 @@ extern const u8 BattleScript_DarkTypePreventsPrankster[];
|
|||
extern const u8 BattleScript_GulpMissileGorging[];
|
||||
extern const u8 BattleScript_GulpMissileGulping[];
|
||||
extern const u8 BattleScript_BattleBondActivatesOnMoveEndAttacker[];
|
||||
extern const u8 BattleScript_MagicianActivates[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||
|
|
|
@ -5071,6 +5071,26 @@ static void Cmd_moveend(void)
|
|||
}
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
case MOVEEND_MAGICIAN:
|
||||
if (GetBattlerAbility(gBattlerAttacker) == ABILITY_MAGICIAN
|
||||
&& gCurrentMove != MOVE_FLING && gCurrentMove != MOVE_NATURAL_GIFT
|
||||
&& gBattleMons[gBattlerAttacker].item == ITEM_NONE
|
||||
&& IsBattlerAlive(gBattlerAttacker)
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& CanStealItem(gBattlerAttacker, gBattlerTarget, gBattleMons[gBattlerTarget].item)
|
||||
&& !DoesSubstituteBlockMove(gBattlerAttacker, gBattlerTarget, gCurrentMove)
|
||||
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& (GetBattlerAbility(gBattlerTarget) != ABILITY_STICKY_HOLD || !IsBattlerAlive(gBattlerTarget)))
|
||||
{
|
||||
StealTargetItem(gBattlerAttacker, gBattlerTarget);
|
||||
gBattleScripting.battler = gBattlerAbility = gBattlerAttacker;
|
||||
gEffectBattler = gBattlerTarget;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_MagicianActivates;
|
||||
effect = TRUE;
|
||||
}
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
case MOVEEND_NEXT_TARGET: // For moves hitting two opposing Pokemon.
|
||||
// Set a flag if move hits either target (for throat spray that can't check damage)
|
||||
if (!(gHitMarker & HITMARKER_UNABLE_TO_USE_MOVE)
|
||||
|
|
Loading…
Reference in a new issue