Further moveend changes (move blocks) (#6820)
This commit is contained in:
parent
e42890e954
commit
44d9b9c9e6
@ -720,7 +720,6 @@ struct BattleStruct
|
||||
u8 soulheartBattlerId;
|
||||
u8 friskedBattler; // Frisk needs to identify 2 battlers in double battles.
|
||||
u8 sameMoveTurns[MAX_BATTLERS_COUNT]; // For Metronome, number of times the same moves has been SUCCESFULLY used.
|
||||
u16 moveEffect2; // For Knock Off
|
||||
u16 changedSpecies[NUM_BATTLE_SIDES][PARTY_SIZE]; // For forms when multiple mons can change into the same pokemon.
|
||||
u8 quickClawBattlerId;
|
||||
struct LostItem itemLost[NUM_BATTLE_SIDES][PARTY_SIZE]; // Pokemon that had items consumed or stolen (two bytes per party member per side)
|
||||
|
||||
@ -374,10 +374,8 @@ enum MoveEffects
|
||||
MOVE_EFFECT_EVS_MINUS_2,
|
||||
MOVE_EFFECT_SCALE_SHOT,
|
||||
MOVE_EFFECT_THRASH,
|
||||
MOVE_EFFECT_KNOCK_OFF,
|
||||
MOVE_EFFECT_DEF_SPDEF_DOWN,
|
||||
MOVE_EFFECT_CLEAR_SMOG,
|
||||
MOVE_EFFECT_SMACK_DOWN,
|
||||
MOVE_EFFECT_FLAME_BURST,
|
||||
MOVE_EFFECT_FEINT,
|
||||
MOVE_EFFECT_V_CREATE,
|
||||
|
||||
@ -354,6 +354,7 @@ enum BattleMoveEffects
|
||||
EFFECT_RAPID_SPIN,
|
||||
EFFECT_SPECTRAL_THIEF,
|
||||
EFFECT_RECOIL,
|
||||
EFFECT_SMACK_DOWN,
|
||||
NUM_BATTLE_MOVE_EFFECTS,
|
||||
};
|
||||
|
||||
|
||||
@ -263,7 +263,6 @@ enum MoveEndEffects
|
||||
MOVEEND_FIRST_MOVE_BLOCK,
|
||||
MOVEEND_ITEM_EFFECTS_ALL,
|
||||
MOVEEND_SYMBIOSIS,
|
||||
MOVEEND_HIT_SWITCH_TARGET,
|
||||
MOVEEND_KINGSROCK, // These item effects will occur each strike of a multi-hit move
|
||||
MOVEEND_SUBSTITUTE,
|
||||
MOVEEND_SKY_DROP_CONFUSE,
|
||||
|
||||
@ -4765,6 +4765,28 @@ static u32 AI_CalcMoveEffectScore(u32 battlerAtk, u32 battlerDef, u32 move)
|
||||
case EFFECT_SPECTRAL_THIEF:
|
||||
ADJUST_SCORE(AI_ShouldCopyStatChanges(battlerAtk, battlerDef));
|
||||
break;
|
||||
case EFFECT_SMACK_DOWN:
|
||||
if (!IsBattlerGrounded(battlerDef) && HasDamagingMoveOfType(battlerAtk, TYPE_GROUND) && !CanTargetFaintAi(battlerDef, battlerAtk))
|
||||
ADJUST_SCORE(DECENT_EFFECT);
|
||||
break;
|
||||
case EFFECT_KNOCK_OFF:
|
||||
if (CanKnockOffItem(battlerDef, aiData->items[battlerDef]))
|
||||
{
|
||||
switch (aiData->holdEffects[battlerDef])
|
||||
{
|
||||
case HOLD_EFFECT_IRON_BALL:
|
||||
if (HasMoveEffect(battlerDef, EFFECT_FLING))
|
||||
ADJUST_SCORE(DECENT_EFFECT);
|
||||
break;
|
||||
case HOLD_EFFECT_LAGGING_TAIL:
|
||||
case HOLD_EFFECT_STICKY_BARB:
|
||||
break;
|
||||
default:
|
||||
ADJUST_SCORE(DECENT_EFFECT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} // move effect checks
|
||||
@ -4904,28 +4926,6 @@ static u32 AI_CalcMoveEffectScore(u32 battlerAtk, u32 battlerDef, u32 move)
|
||||
else if (ItemId_GetPocket(aiData->items[battlerDef]) == POCKET_BERRIES || aiData->holdEffects[battlerDef] == HOLD_EFFECT_GEMS)
|
||||
ADJUST_SCORE(DECENT_EFFECT);
|
||||
break;
|
||||
case MOVE_EFFECT_SMACK_DOWN:
|
||||
if (!IsBattlerGrounded(battlerDef) && HasDamagingMoveOfType(battlerAtk, TYPE_GROUND) && !CanTargetFaintAi(battlerDef, battlerAtk))
|
||||
ADJUST_SCORE(DECENT_EFFECT);
|
||||
break;
|
||||
case MOVE_EFFECT_KNOCK_OFF:
|
||||
if (CanKnockOffItem(battlerDef, aiData->items[battlerDef]))
|
||||
{
|
||||
switch (aiData->holdEffects[battlerDef])
|
||||
{
|
||||
case HOLD_EFFECT_IRON_BALL:
|
||||
if (HasMoveEffect(battlerDef, EFFECT_FLING))
|
||||
ADJUST_SCORE(DECENT_EFFECT);
|
||||
break;
|
||||
case HOLD_EFFECT_LAGGING_TAIL:
|
||||
case HOLD_EFFECT_STICKY_BARB:
|
||||
break;
|
||||
default:
|
||||
ADJUST_SCORE(DECENT_EFFECT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MOVE_EFFECT_STEAL_ITEM:
|
||||
{
|
||||
bool32 canSteal = FALSE;
|
||||
|
||||
@ -964,7 +964,6 @@ static const u16 sFinalStrikeOnlyEffects[] =
|
||||
MOVE_EFFECT_BUG_BITE,
|
||||
MOVE_EFFECT_STEAL_ITEM,
|
||||
MOVE_EFFECT_REMOVE_ARG_TYPE,
|
||||
MOVE_EFFECT_SMACK_DOWN,
|
||||
MOVE_EFFECT_REMOVE_STATUS,
|
||||
MOVE_EFFECT_RECOIL_HP_25,
|
||||
MOVE_EFFECT_PREVENT_ESCAPE,
|
||||
@ -3282,17 +3281,11 @@ void SetMoveEffect(bool32 primary, bool32 certain)
|
||||
|
||||
switch (gBattleScripting.moveEffect) // Set move effects which happen later on
|
||||
{
|
||||
case MOVE_EFFECT_KNOCK_OFF:
|
||||
case MOVE_EFFECT_SMACK_DOWN:
|
||||
case MOVE_EFFECT_REMOVE_STATUS:
|
||||
gBattleStruct->moveEffect2 = gBattleScripting.moveEffect;
|
||||
gBattlescriptCurrInstr++;
|
||||
return;
|
||||
case MOVE_EFFECT_STEALTH_ROCK:
|
||||
case MOVE_EFFECT_SPIKES:
|
||||
case MOVE_EFFECT_PAYDAY:
|
||||
case MOVE_EFFECT_STEAL_ITEM:
|
||||
case MOVE_EFFECT_BUG_BITE:
|
||||
case MOVE_EFFECT_STEAL_ITEM:
|
||||
activateAfterFaint = TRUE;
|
||||
break;
|
||||
}
|
||||
@ -3636,34 +3629,32 @@ void SetMoveEffect(bool32 primary, bool32 certain)
|
||||
gBattlescriptCurrInstr++;
|
||||
break;
|
||||
case MOVE_EFFECT_STEAL_ITEM:
|
||||
if (!CanStealItem(gBattlerAttacker, gBattlerTarget, gBattleMons[gBattlerTarget].item)
|
||||
|| gBattleMons[gBattlerAttacker].item != ITEM_NONE
|
||||
|| gBattleMons[gBattlerTarget].item == ITEM_NONE)
|
||||
{
|
||||
if (!CanStealItem(gBattlerAttacker, gBattlerTarget, gBattleMons[gBattlerTarget].item)
|
||||
|| gBattleMons[gBattlerAttacker].item != ITEM_NONE
|
||||
|| gBattleMons[gBattlerTarget].item == ITEM_NONE)
|
||||
{
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
else if (GetBattlerAbility(gBattlerTarget) == ABILITY_STICKY_HOLD)
|
||||
{
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_NoItemSteal;
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
else if (GetBattlerAbility(gBattlerTarget) == ABILITY_STICKY_HOLD)
|
||||
{
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_NoItemSteal;
|
||||
|
||||
gLastUsedAbility = gBattleMons[gBattlerTarget].ability;
|
||||
RecordAbilityBattle(gBattlerTarget, gLastUsedAbility);
|
||||
}
|
||||
else
|
||||
{
|
||||
StealTargetItem(gBattlerAttacker, gBattlerTarget); // Attacker steals target item
|
||||
gLastUsedAbility = gBattleMons[gBattlerTarget].ability;
|
||||
RecordAbilityBattle(gBattlerTarget, gLastUsedAbility);
|
||||
}
|
||||
else
|
||||
{
|
||||
StealTargetItem(gBattlerAttacker, gBattlerTarget); // Attacker steals target item
|
||||
|
||||
if (!(B_STEAL_WILD_ITEMS >= GEN_9
|
||||
&& !(gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_PALACE))))
|
||||
{
|
||||
gBattleMons[gBattlerAttacker].item = ITEM_NONE; // Item assigned later on with thief (see MOVEEND_CHANGED_ITEMS)
|
||||
gBattleStruct->changedItems[gBattlerAttacker] = gLastUsedItem; // Stolen item to be assigned later
|
||||
}
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_ItemSteal;
|
||||
if (!(B_STEAL_WILD_ITEMS >= GEN_9
|
||||
&& !(gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_PALACE))))
|
||||
{
|
||||
gBattleMons[gBattlerAttacker].item = ITEM_NONE; // Item assigned later on with thief (see MOVEEND_CHANGED_ITEMS)
|
||||
gBattleStruct->changedItems[gBattlerAttacker] = gLastUsedItem; // Stolen item to be assigned later
|
||||
}
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_ItemSteal;
|
||||
}
|
||||
break;
|
||||
case MOVE_EFFECT_PREVENT_ESCAPE:
|
||||
@ -4447,6 +4438,44 @@ void SetMoveEffect(bool32 primary, bool32 certain)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MOVE_EFFECT_REMOVE_STATUS:
|
||||
{
|
||||
u32 argStatus = GetMoveEffectArg_Status(gCurrentMove);
|
||||
if ((gBattleMons[gEffectBattler].status1 & argStatus)
|
||||
&& (NumAffectedSpreadMoveTargets() > 1 || !IsMoveEffectBlockedByTarget(GetBattlerAbility(gEffectBattler))))
|
||||
{
|
||||
gBattleMons[gEffectBattler].status1 &= ~(argStatus);
|
||||
BtlController_EmitSetMonData(gEffectBattler, 0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gEffectBattler].status1);
|
||||
MarkBattlerForControllerExec(gEffectBattler);
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
|
||||
switch (argStatus)
|
||||
{
|
||||
case STATUS1_PARALYSIS:
|
||||
gBattlescriptCurrInstr = BattleScript_TargetPRLZHeal;
|
||||
break;
|
||||
case STATUS1_SLEEP:
|
||||
TryDeactivateSleepClause(GetBattlerSide(gEffectBattler), gBattlerPartyIndexes[gBattlerTarget]);
|
||||
gBattlescriptCurrInstr = BattleScript_TargetWokeUp;
|
||||
break;
|
||||
case STATUS1_BURN:
|
||||
gBattlescriptCurrInstr = BattleScript_TargetBurnHeal;
|
||||
break;
|
||||
case STATUS1_FREEZE:
|
||||
gBattlescriptCurrInstr = BattleScript_DefrostedViaFireMove;
|
||||
break;
|
||||
case STATUS1_FROSTBITE:
|
||||
gBattlescriptCurrInstr = BattleScript_FrostbiteHealedViaFireMove;
|
||||
break;
|
||||
case STATUS1_POISON:
|
||||
case STATUS1_TOXIC_POISON:
|
||||
case STATUS1_PSN_ANY:
|
||||
gBattlescriptCurrInstr = BattleScript_TargetPoisonHealed;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6513,17 +6542,56 @@ static void Cmd_moveend(void)
|
||||
effect = TRUE;
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
case MOVEEND_FIRST_MOVE_BLOCK: // For effects which should happen after target items, for example Knock Off after damage from Rocky Helmet.
|
||||
{
|
||||
switch (gBattleStruct->moveEffect2)
|
||||
case MOVEEND_FIRST_MOVE_BLOCK:
|
||||
if ((gSpecialStatuses[gBattlerAttacker].parentalBondState == PARENTAL_BOND_1ST_HIT && IsBattlerAlive(gBattlerTarget))
|
||||
|| gHitMarker & HITMARKER_UNABLE_TO_USE_MOVE)
|
||||
{
|
||||
case MOVE_EFFECT_KNOCK_OFF:
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (moveEffect)
|
||||
{
|
||||
case EFFECT_KNOCK_OFF:
|
||||
if (!DoesSubstituteBlockMove(gBattlerAttacker, gBattlerTarget, gCurrentMove))
|
||||
{
|
||||
effect = TryKnockOffBattleScript(gBattlerTarget);
|
||||
break;
|
||||
case EFFECT_HIT_SWITCH_TARGET:
|
||||
if (IsBattlerTurnDamaged(gBattlerTarget)
|
||||
&& IsBattlerAlive(gBattlerTarget)
|
||||
&& IsBattlerAlive(gBattlerAttacker)
|
||||
&& !(gStatuses3[BATTLE_PARTNER(gBattlerTarget)] & STATUS3_COMMANDER)
|
||||
&& gSpecialStatuses[gBattlerAttacker].parentalBondState != PARENTAL_BOND_1ST_HIT)
|
||||
{
|
||||
u32 targetAbility = GetBattlerAbility(gBattlerTarget);
|
||||
if (targetAbility == ABILITY_GUARD_DOG)
|
||||
{
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
}
|
||||
|
||||
effect = TRUE;
|
||||
BattleScriptPushCursor();
|
||||
if (targetAbility == ABILITY_SUCTION_CUPS)
|
||||
{
|
||||
gBattlescriptCurrInstr = BattleScript_AbilityPreventsPhasingOutRet;
|
||||
}
|
||||
else if (gStatuses3[gBattlerTarget] & STATUS3_ROOTED)
|
||||
{
|
||||
gBattlescriptCurrInstr = BattleScript_PrintMonIsRootedRet;
|
||||
}
|
||||
else if (GetActiveGimmick(gBattlerTarget) == GIMMICK_DYNAMAX)
|
||||
{
|
||||
gBattlescriptCurrInstr = BattleScript_HitSwitchTargetDynamaxed;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleScripting.switchCase = B_SWITCH_HIT;
|
||||
gBattlescriptCurrInstr = BattleScript_TryHitSwitchTarget;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MOVE_EFFECT_SMACK_DOWN:
|
||||
case EFFECT_SMACK_DOWN:
|
||||
if (!IsBattlerGrounded(gBattlerTarget)
|
||||
&& IsBattlerAlive(gBattlerTarget)
|
||||
&& !DoesSubstituteBlockMove(gBattlerAttacker, gBattlerTarget, gCurrentMove))
|
||||
@ -6535,97 +6603,17 @@ static void Cmd_moveend(void)
|
||||
gBattlescriptCurrInstr = BattleScript_MoveEffectSmackDown;
|
||||
}
|
||||
break;
|
||||
case MOVE_EFFECT_REMOVE_STATUS: // Smelling salts, Wake-Up Slap, Sparkling Aria
|
||||
{
|
||||
u32 argStatus = GetMoveEffectArg_Status(gCurrentMove);
|
||||
if ((gBattleMons[gBattlerTarget].status1 & argStatus)
|
||||
&& IsBattlerAlive(gBattlerTarget)
|
||||
&& !DoesSubstituteBlockMove(gBattlerAttacker, gBattlerTarget, gCurrentMove)
|
||||
&& (NumAffectedSpreadMoveTargets() > 1 || !IsMoveEffectBlockedByTarget(GetBattlerAbility(gBattlerTarget))))
|
||||
{
|
||||
gBattleMons[gBattlerTarget].status1 &= ~(argStatus);
|
||||
|
||||
BtlController_EmitSetMonData(gBattlerTarget, 0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gBattlerTarget].status1);
|
||||
MarkBattlerForControllerExec(gBattlerTarget);
|
||||
effect = TRUE;
|
||||
BattleScriptPush(gBattlescriptCurrInstr);
|
||||
|
||||
switch (argStatus)
|
||||
{
|
||||
case STATUS1_PARALYSIS:
|
||||
gBattlescriptCurrInstr = BattleScript_TargetPRLZHeal;
|
||||
break;
|
||||
case STATUS1_SLEEP:
|
||||
TryDeactivateSleepClause(GetBattlerSide(gBattlerTarget), gBattlerPartyIndexes[gBattlerTarget]);
|
||||
gBattlescriptCurrInstr = BattleScript_TargetWokeUp;
|
||||
break;
|
||||
case STATUS1_BURN:
|
||||
gBattlescriptCurrInstr = BattleScript_TargetBurnHeal;
|
||||
break;
|
||||
case STATUS1_FREEZE:
|
||||
gBattlescriptCurrInstr = BattleScript_DefrostedViaFireMove;
|
||||
break;
|
||||
case STATUS1_FROSTBITE:
|
||||
gBattlescriptCurrInstr = BattleScript_FrostbiteHealedViaFireMove;
|
||||
break;
|
||||
case STATUS1_POISON:
|
||||
case STATUS1_TOXIC_POISON:
|
||||
case STATUS1_PSN_ANY:
|
||||
gBattlescriptCurrInstr = BattleScript_TargetPoisonHealed;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break; // MOVE_EFFECT_REMOVE_STATUS
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
gBattleStruct->moveEffect2 = 0;
|
||||
gBattleScripting.moveendState++;
|
||||
break; // MOVEEND_MOVE_EFFECTS2
|
||||
}
|
||||
break;
|
||||
case MOVEEND_ITEM_EFFECTS_ALL: // item effects for all battlers
|
||||
if (ItemBattleEffects(ITEMEFFECT_MOVE_END, 0, FALSE))
|
||||
effect = TRUE;
|
||||
else
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
case MOVEEND_HIT_SWITCH_TARGET:
|
||||
if (GetMoveEffect(gCurrentMove) == EFFECT_HIT_SWITCH_TARGET
|
||||
&& !(gHitMarker & HITMARKER_UNABLE_TO_USE_MOVE)
|
||||
&& IsBattlerTurnDamaged(gBattlerTarget)
|
||||
&& IsBattlerAlive(gBattlerTarget)
|
||||
&& IsBattlerAlive(gBattlerAttacker)
|
||||
&& !(gStatuses3[BATTLE_PARTNER(gBattlerTarget)] & STATUS3_COMMANDER)
|
||||
&& gSpecialStatuses[gBattlerAttacker].parentalBondState != PARENTAL_BOND_1ST_HIT)
|
||||
{
|
||||
u32 targetAbility = GetBattlerAbility(gBattlerTarget);
|
||||
if (targetAbility == ABILITY_GUARD_DOG)
|
||||
{
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
}
|
||||
|
||||
effect = TRUE;
|
||||
BattleScriptPushCursor();
|
||||
if (targetAbility == ABILITY_SUCTION_CUPS)
|
||||
{
|
||||
gBattlescriptCurrInstr = BattleScript_AbilityPreventsPhasingOutRet;
|
||||
}
|
||||
else if (gStatuses3[gBattlerTarget] & STATUS3_ROOTED)
|
||||
{
|
||||
gBattlescriptCurrInstr = BattleScript_PrintMonIsRootedRet;
|
||||
}
|
||||
else if (GetActiveGimmick(gBattlerTarget) == GIMMICK_DYNAMAX)
|
||||
{
|
||||
gBattlescriptCurrInstr = BattleScript_HitSwitchTargetDynamaxed;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleScripting.switchCase = B_SWITCH_HIT;
|
||||
gBattlescriptCurrInstr = BattleScript_TryHitSwitchTarget;
|
||||
}
|
||||
}
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
case MOVEEND_KINGSROCK: // King's rock
|
||||
// These effects will occur at each hit in a multi-strike move
|
||||
if (ItemBattleEffects(ITEMEFFECT_KINGSROCK, 0, FALSE))
|
||||
@ -7038,6 +7026,7 @@ static void Cmd_moveend(void)
|
||||
gBattlescriptCurrInstr = BattleScript_FellStingerRaisesStat;
|
||||
effect = TRUE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -8118,9 +8118,7 @@ static inline u32 CalcMoveBasePower(struct DamageCalculationData *damageCalcData
|
||||
// Comatose targets treated as if asleep
|
||||
if ((gBattleMons[battlerDef].status1 | (STATUS1_SLEEP * (abilityDef == ABILITY_COMATOSE))) & GetMoveEffectArg_Status(move)
|
||||
&& !((GetMoveAdditionalEffectById(move, 0)->moveEffect == MOVE_EFFECT_REMOVE_STATUS) && DoesSubstituteBlockMove(battlerAtk, battlerDef, move)))
|
||||
{
|
||||
basePower *= 2;
|
||||
}
|
||||
break;
|
||||
case EFFECT_POWER_BASED_ON_TARGET_HP:
|
||||
basePower = gBattleMons[battlerDef].hp * basePower / gBattleMons[battlerDef].maxHP;
|
||||
|
||||
@ -2252,4 +2252,10 @@ const struct BattleMoveEffect gBattleMoveEffects[NUM_BATTLE_MOVE_EFFECTS] =
|
||||
.battleScript = BattleScript_EffectHit,
|
||||
.battleTvScore = 0, // TODO: Assign points
|
||||
},
|
||||
|
||||
[EFFECT_SMACK_DOWN] =
|
||||
{
|
||||
.battleScript = BattleScript_EffectHit,
|
||||
.battleTvScore = 0, // TODO: Assign points
|
||||
},
|
||||
};
|
||||
|
||||
@ -4441,14 +4441,14 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_ALL] =
|
||||
.priority = 0,
|
||||
.category = DAMAGE_CATEGORY_PHYSICAL,
|
||||
.makesContact = TRUE,
|
||||
.additionalEffects = ADDITIONAL_EFFECTS({
|
||||
.moveEffect = MOVE_EFFECT_STEAL_ITEM,
|
||||
}),
|
||||
.ignoresKingsRock = (B_UPDATED_MOVE_FLAGS == GEN_3 || B_UPDATED_MOVE_FLAGS == GEN_4),
|
||||
.meFirstBanned = TRUE,
|
||||
.metronomeBanned = TRUE,
|
||||
.copycatBanned = TRUE,
|
||||
.assistBanned = TRUE,
|
||||
.additionalEffects = ADDITIONAL_EFFECTS({
|
||||
.moveEffect = MOVE_EFFECT_STEAL_ITEM,
|
||||
}),
|
||||
.contestEffect = CONTEST_EFFECT_APPEAL_AS_GOOD_AS_PREV_ONES,
|
||||
.contestCategory = CONTEST_CATEGORY_TOUGH,
|
||||
.contestComboStarterId = 0,
|
||||
@ -7412,9 +7412,6 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_ALL] =
|
||||
.priority = 0,
|
||||
.category = DAMAGE_CATEGORY_PHYSICAL,
|
||||
.makesContact = TRUE,
|
||||
.additionalEffects = ADDITIONAL_EFFECTS({
|
||||
.moveEffect = MOVE_EFFECT_KNOCK_OFF,
|
||||
}),
|
||||
.contestEffect = CONTEST_EFFECT_BADLY_STARTLE_FRONT_MON,
|
||||
.contestCategory = CONTEST_CATEGORY_SMART,
|
||||
.contestComboStarterId = 0,
|
||||
@ -12295,7 +12292,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_ALL] =
|
||||
.description = COMPOUND_STRING(
|
||||
"Throws a rock to knock the\n"
|
||||
"foe down to the ground."),
|
||||
.effect = EFFECT_HIT,
|
||||
.effect = EFFECT_SMACK_DOWN,
|
||||
.power = 50,
|
||||
.type = TYPE_ROCK,
|
||||
.accuracy = 100,
|
||||
@ -12305,9 +12302,6 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_ALL] =
|
||||
.category = DAMAGE_CATEGORY_PHYSICAL,
|
||||
.damagesAirborne = TRUE,
|
||||
.skyBattleBanned = TRUE,
|
||||
.additionalEffects = ADDITIONAL_EFFECTS({
|
||||
.moveEffect = MOVE_EFFECT_SMACK_DOWN,
|
||||
}),
|
||||
.contestEffect = CONTEST_EFFECT_BADLY_STARTLE_FRONT_MON,
|
||||
.contestCategory = CONTEST_CATEGORY_TOUGH,
|
||||
.contestComboStarterId = 0,
|
||||
@ -15598,7 +15592,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_ALL] =
|
||||
.description = COMPOUND_STRING(
|
||||
"Can hit Flying foes, then\n"
|
||||
"knocks them to the ground."),
|
||||
.effect = EFFECT_HIT,
|
||||
.effect = EFFECT_SMACK_DOWN,
|
||||
.power = 90,
|
||||
.type = TYPE_GROUND,
|
||||
.accuracy = 100,
|
||||
@ -15610,9 +15604,6 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_ALL] =
|
||||
.ignoreTypeIfFlyingAndUngrounded = TRUE,
|
||||
.metronomeBanned = TRUE,
|
||||
.skyBattleBanned = TRUE,
|
||||
.additionalEffects = ADDITIONAL_EFFECTS({
|
||||
.moveEffect = MOVE_EFFECT_SMACK_DOWN,
|
||||
}),
|
||||
.contestEffect = CONTEST_EFFECT_HIGHLY_APPEALING,
|
||||
.contestCategory = CONTEST_CATEGORY_TOUGH,
|
||||
.contestComboStarterId = COMBO_STARTER_THOUSAND_ARROWS,
|
||||
@ -15929,7 +15920,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_ALL] =
|
||||
.soundMove = TRUE,
|
||||
.additionalEffects = ADDITIONAL_EFFECTS({
|
||||
.moveEffect = MOVE_EFFECT_REMOVE_STATUS,
|
||||
.chance = 100,
|
||||
.sheerForceBoost = SHEER_FORCE_BOOST,
|
||||
}),
|
||||
.contestEffect = CONTEST_EFFECT_HIGHLY_APPEALING,
|
||||
.contestCategory = CONTEST_CATEGORY_BEAUTY,
|
||||
|
||||
@ -135,7 +135,7 @@ SINGLE_BATTLE_TEST("Harvest doesn't restore a Berry when knocked off by Knock Of
|
||||
{
|
||||
PASSES_RANDOMLY(1, 1, RNG_HARVEST);
|
||||
GIVEN {
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_KNOCK_OFF, MOVE_EFFECT_KNOCK_OFF));
|
||||
ASSUME(GetMoveEffect(MOVE_KNOCK_OFF) == EFFECT_KNOCK_OFF);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_EXEGGUTOR) { Ability(ABILITY_HARVEST); Item(ITEM_SITRUS_BERRY); }
|
||||
} WHEN {
|
||||
|
||||
@ -254,9 +254,9 @@ SINGLE_BATTLE_TEST("Parental Bond has no affect on multi hit moves and they stil
|
||||
SINGLE_BATTLE_TEST("Parental Bond Smack Down effect triggers after 2nd hit")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(GetMoveEffect(MOVE_SMACK_DOWN) == EFFECT_SMACK_DOWN);
|
||||
ASSUME(GetMoveCategory(MOVE_SMACK_DOWN) != DAMAGE_CATEGORY_STATUS);
|
||||
ASSUME(GetMoveStrikeCount(MOVE_SMACK_DOWN) < 2);
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_SMACK_DOWN, MOVE_EFFECT_SMACK_DOWN));
|
||||
PLAYER(SPECIES_KANGASKHAN) { Item(ITEM_KANGASKHANITE); }
|
||||
OPPONENT(SPECIES_SKARMORY);
|
||||
} WHEN {
|
||||
|
||||
@ -164,7 +164,7 @@ SINGLE_BATTLE_TEST("Pickup doesn't grant an item if it destroyed the item with I
|
||||
SINGLE_BATTLE_TEST("Pickup doesn't grant an item if it knocked off that item")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_KNOCK_OFF, MOVE_EFFECT_KNOCK_OFF));
|
||||
ASSUME(GetMoveEffect(MOVE_KNOCK_OFF) == EFFECT_KNOCK_OFF);
|
||||
PLAYER(SPECIES_ZIGZAGOON) { Ability(ABILITY_PICKUP); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_SITRUS_BERRY); }
|
||||
} WHEN {
|
||||
|
||||
@ -49,11 +49,11 @@ SINGLE_BATTLE_TEST("Shield Dust does not block primary effects")
|
||||
PARAMETRIZE { move = MOVE_PAY_DAY; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(GetMoveEffect(MOVE_THOUSAND_ARROWS) == EFFECT_SMACK_DOWN);
|
||||
ASSUME(GetMoveEffect(MOVE_SMACK_DOWN) == EFFECT_SMACK_DOWN);
|
||||
ASSUME(MoveHasAdditionalEffectWithChance(MOVE_INFESTATION, MOVE_EFFECT_WRAP, 0) == TRUE);
|
||||
ASSUME(MoveHasAdditionalEffectWithChance(MOVE_THOUSAND_ARROWS, MOVE_EFFECT_SMACK_DOWN, 0) == TRUE);
|
||||
ASSUME(MoveHasAdditionalEffectWithChance(MOVE_JAW_LOCK, MOVE_EFFECT_TRAP_BOTH, 0) == TRUE);
|
||||
ASSUME(MoveHasAdditionalEffectWithChance(MOVE_PAY_DAY, MOVE_EFFECT_PAYDAY, 0) == TRUE);
|
||||
ASSUME(MoveHasAdditionalEffectWithChance(MOVE_SMACK_DOWN, MOVE_EFFECT_SMACK_DOWN, 0) == TRUE);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_VIVILLON) { Ability(ABILITY_SHIELD_DUST); }
|
||||
} WHEN {
|
||||
|
||||
@ -26,7 +26,7 @@ SINGLE_BATTLE_TEST("Unburden doubles speed once user uses item")
|
||||
SINGLE_BATTLE_TEST("Unburden doubles speed once user gets their item knocked off")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_KNOCK_OFF, MOVE_EFFECT_KNOCK_OFF));
|
||||
ASSUME(GetMoveEffect(MOVE_KNOCK_OFF) == EFFECT_KNOCK_OFF);
|
||||
PLAYER(SPECIES_DRIFBLIM) { Ability(ABILITY_UNBURDEN); Item(ITEM_POTION); Speed(5); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(7); }
|
||||
} WHEN {
|
||||
@ -46,7 +46,7 @@ SINGLE_BATTLE_TEST("Unburden doesn't activate when item is consumed in Neutraliz
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(GetMoveEffect(MOVE_U_TURN) == EFFECT_HIT_ESCAPE);
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_KNOCK_OFF, MOVE_EFFECT_KNOCK_OFF));
|
||||
ASSUME(GetMoveEffect(MOVE_KNOCK_OFF) == EFFECT_KNOCK_OFF);
|
||||
PLAYER(SPECIES_DRIFBLIM) { Ability(ABILITY_UNBURDEN); Item(ITEM_POTION); Speed(5); }
|
||||
OPPONENT(SPECIES_WEEZING) { Speed(7); Ability(ABILITY_NEUTRALIZING_GAS); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(7); }
|
||||
@ -73,7 +73,7 @@ SINGLE_BATTLE_TEST("Unburden doubling speed effect is ignored by Neutralizing Ga
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(GetMoveEffect(MOVE_U_TURN) == EFFECT_HIT_ESCAPE);
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_KNOCK_OFF, MOVE_EFFECT_KNOCK_OFF));
|
||||
ASSUME(GetMoveEffect(MOVE_KNOCK_OFF) == EFFECT_KNOCK_OFF);
|
||||
PLAYER(SPECIES_DRIFBLIM) { Ability(ABILITY_UNBURDEN); Item(ITEM_POTION); Speed(5); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(7); }
|
||||
OPPONENT(SPECIES_WEEZING) { Speed(7); Ability(ABILITY_NEUTRALIZING_GAS); }
|
||||
|
||||
@ -54,11 +54,11 @@ SINGLE_BATTLE_TEST("Covert Cloak does not block primary effects")
|
||||
PARAMETRIZE { move = MOVE_PAY_DAY; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(GetMoveEffect(MOVE_THOUSAND_ARROWS) == EFFECT_SMACK_DOWN);
|
||||
ASSUME(GetMoveEffect(MOVE_SMACK_DOWN) == EFFECT_SMACK_DOWN);
|
||||
ASSUME(MoveHasAdditionalEffectWithChance(MOVE_INFESTATION, MOVE_EFFECT_WRAP, 0) == TRUE);
|
||||
ASSUME(MoveHasAdditionalEffectWithChance(MOVE_THOUSAND_ARROWS, MOVE_EFFECT_SMACK_DOWN, 0) == TRUE);
|
||||
ASSUME(MoveHasAdditionalEffectWithChance(MOVE_JAW_LOCK, MOVE_EFFECT_TRAP_BOTH, 0) == TRUE);
|
||||
ASSUME(MoveHasAdditionalEffectWithChance(MOVE_PAY_DAY, MOVE_EFFECT_PAYDAY, 0) == TRUE);
|
||||
ASSUME(MoveHasAdditionalEffectWithChance(MOVE_SMACK_DOWN, MOVE_EFFECT_SMACK_DOWN, 0) == TRUE);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_SKARMORY) { Item(ITEM_COVERT_CLOAK); }
|
||||
} WHEN {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_SMACK_DOWN, MOVE_EFFECT_SMACK_DOWN) == TRUE);
|
||||
ASSUME(GetMoveEffect(MOVE_SMACK_DOWN) == EFFECT_SMACK_DOWN);
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Smack Down does not ground mons behind substitutes")
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_THOUSAND_ARROWS, MOVE_EFFECT_SMACK_DOWN));
|
||||
ASSUME(GetMoveEffect(MOVE_THOUSAND_ARROWS) == EFFECT_SMACK_DOWN);
|
||||
ASSUME(MoveIgnoresTypeIfFlyingAndUngrounded(MOVE_THOUSAND_ARROWS) == TRUE);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user