Renamed seteffectwithchance to setadditionaleffects
Function no longer has ability to apply effects from moveEffect - for that, seteffectprimary or secondary is now recommended. Removed EFFECT_RAMPAGE, updated a few tests
This commit is contained in:
parent
be2e3cf056
commit
e34373effc
10 changed files with 82 additions and 70 deletions
|
@ -92,7 +92,7 @@
|
|||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro seteffectwithchance
|
||||
.macro setadditionaleffects
|
||||
1:
|
||||
.byte 0x15
|
||||
jumpifhalfword CMP_EQUAL, sMOVE_EFFECT, MOVE_EFFECT_CONTINUE, 1b
|
||||
|
|
|
@ -45,7 +45,7 @@ gBattleScriptsForMoveEffects::
|
|||
.4byte BattleScript_EffectEvasionDown @ EFFECT_EVASION_DOWN
|
||||
.4byte BattleScript_EffectHaze @ EFFECT_HAZE
|
||||
.4byte BattleScript_EffectBide @ EFFECT_BIDE
|
||||
.4byte BattleScript_EffectRampage @ EFFECT_RAMPAGE
|
||||
.4byte BattleScript_EffectHit @ EFFECT_UNUSED_23
|
||||
.4byte BattleScript_EffectRoar @ EFFECT_ROAR
|
||||
.4byte BattleScript_EffectHit @ EFFECT_MULTI_HIT
|
||||
.4byte BattleScript_EffectConversion @ EFFECT_CONVERSION
|
||||
|
@ -2056,7 +2056,7 @@ BattleScript_EffectFinalGambit:
|
|||
dmgtocurrattackerhp
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
seteffectwithchance
|
||||
setadditionaleffects
|
||||
tryfaintmon BS_ATTACKER
|
||||
tryfaintmon BS_TARGET
|
||||
jumpifmovehadnoeffect BattleScript_MoveEnd
|
||||
|
@ -3070,7 +3070,7 @@ BattleScript_Hit_RetFromAtkAnimation::
|
|||
waitmessage B_WAIT_TIME_LONG
|
||||
resultmessage
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
seteffectwithchance
|
||||
setadditionaleffects
|
||||
return
|
||||
|
||||
BattleScript_EffectNaturalGift:
|
||||
|
@ -3557,16 +3557,6 @@ BattleScript_EffectBide::
|
|||
setbide
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectRampage::
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
attackstring
|
||||
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_EffectRampage2
|
||||
ppreduce
|
||||
BattleScript_EffectRampage2:
|
||||
confuseifrepeatingattackends
|
||||
goto BattleScript_HitFromCritCalc
|
||||
|
||||
BattleScript_EffectRoar::
|
||||
attackcanceler
|
||||
attackstring
|
||||
|
@ -3634,7 +3624,7 @@ BattleScript_MultiHitPrintStrings::
|
|||
return
|
||||
|
||||
BattleScript_MultiHitEnd::
|
||||
seteffectwithchance
|
||||
setadditionaleffects
|
||||
tryfaintmon BS_TARGET
|
||||
moveendcase MOVEEND_SYNCHRONIZE_TARGET
|
||||
moveendfrom MOVEEND_STATUS_IMMUNITY_ABILITIES
|
||||
|
@ -5586,7 +5576,7 @@ BattleScript_BrickBreakDoHit::
|
|||
waitmessage B_WAIT_TIME_LONG
|
||||
resultmessage
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
seteffectwithchance
|
||||
setadditionaleffects
|
||||
tryfaintmon BS_TARGET
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, u32 atkAbility, u
|
|||
u8 GetBattlerTurnOrderNum(u8 battlerId);
|
||||
bool32 NoAliveMonsForPlayer(void);
|
||||
bool32 NoAliveMonsForEitherParty(void);
|
||||
void SetMoveEffect(bool32 primary, u32 certain);
|
||||
void SetMoveEffect(bool32 primary, bool32 certain);
|
||||
bool32 CanBattlerSwitch(u32 battlerId);
|
||||
void BattleDestroyYesNoCursorAt(u8 cursorPosition);
|
||||
void BattleCreateYesNoCursorAt(u8 cursorPosition);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define EFFECT_EVASION_DOWN 20
|
||||
#define EFFECT_HAZE 21
|
||||
#define EFFECT_BIDE 22
|
||||
#define EFFECT_RAMPAGE 23
|
||||
#define EFFECT_UNUSED_23 23
|
||||
#define EFFECT_ROAR 24
|
||||
#define EFFECT_MULTI_HIT 25
|
||||
#define EFFECT_CONVERSION 26
|
||||
|
|
|
@ -378,7 +378,7 @@ static void Cmd_printselectionstring(void);
|
|||
static void Cmd_waitmessage(void);
|
||||
static void Cmd_printfromtable(void);
|
||||
static void Cmd_printselectionstringfromtable(void);
|
||||
static void Cmd_seteffectwithchance(void);
|
||||
static void Cmd_setadditionaleffects(void);
|
||||
static void Cmd_seteffectprimary(void);
|
||||
static void Cmd_seteffectsecondary(void);
|
||||
static void Cmd_clearstatusfromeffect(void);
|
||||
|
@ -637,7 +637,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
|
|||
Cmd_waitmessage, //0x12
|
||||
Cmd_printfromtable, //0x13
|
||||
Cmd_printselectionstringfromtable, //0x14
|
||||
Cmd_seteffectwithchance, //0x15
|
||||
Cmd_setadditionaleffects, //0x15
|
||||
Cmd_seteffectprimary, //0x16
|
||||
Cmd_seteffectsecondary, //0x17
|
||||
Cmd_clearstatusfromeffect, //0x18
|
||||
|
@ -1830,6 +1830,9 @@ static void Cmd_ppreduce(void)
|
|||
if (gBattleControllerExecFlags)
|
||||
return;
|
||||
|
||||
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS)
|
||||
gHitMarker |= HITMARKER_NO_PPDEDUCT;
|
||||
|
||||
if (moveTarget == MOVE_TARGET_BOTH
|
||||
|| moveTarget == MOVE_TARGET_FOES_AND_ALLY
|
||||
|| moveTarget == MOVE_TARGET_ALL_BATTLERS
|
||||
|
@ -2747,7 +2750,7 @@ void StealTargetItem(u8 battlerStealer, u8 battlerItem)
|
|||
return; \
|
||||
}
|
||||
|
||||
void SetMoveEffect(bool32 primary, u32 certain)
|
||||
void SetMoveEffect(bool32 primary, bool32 certain)
|
||||
{
|
||||
s32 i, affectsUser = 0;
|
||||
bool32 statusChanged = FALSE;
|
||||
|
@ -2855,7 +2858,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
break;
|
||||
case STATUS1_POISON:
|
||||
if ((battlerAbility == ABILITY_IMMUNITY || battlerAbility == ABILITY_PASTEL_VEIL)
|
||||
&& (primary == TRUE || certain == MOVE_EFFECT_CERTAIN))
|
||||
&& (primary == TRUE || certain == TRUE))
|
||||
{
|
||||
gLastUsedAbility = battlerAbility;
|
||||
RecordAbilityBattle(gEffectBattler, battlerAbility);
|
||||
|
@ -2876,7 +2879,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
}
|
||||
if (!CanPoisonType(gBattleScripting.battler, gEffectBattler)
|
||||
&& (gHitMarker & HITMARKER_STATUS_ABILITY_EFFECT)
|
||||
&& (primary == TRUE || certain == MOVE_EFFECT_CERTAIN))
|
||||
&& (primary == TRUE || certain == TRUE))
|
||||
{
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_PSNPrevention;
|
||||
|
@ -2894,7 +2897,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
break;
|
||||
|
||||
if ((battlerAbility == ABILITY_WATER_VEIL || battlerAbility == ABILITY_WATER_BUBBLE)
|
||||
&& (primary == TRUE || certain == MOVE_EFFECT_CERTAIN))
|
||||
&& (primary == TRUE || certain == TRUE))
|
||||
{
|
||||
gLastUsedAbility = battlerAbility;
|
||||
RecordAbilityBattle(gEffectBattler, battlerAbility);
|
||||
|
@ -2914,7 +2917,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
}
|
||||
if (IS_BATTLER_OF_TYPE(gEffectBattler, TYPE_FIRE)
|
||||
&& (gHitMarker & HITMARKER_STATUS_ABILITY_EFFECT)
|
||||
&& (primary == TRUE || certain == MOVE_EFFECT_CERTAIN))
|
||||
&& (primary == TRUE || certain == TRUE))
|
||||
{
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_BRNPrevention;
|
||||
|
@ -2927,7 +2930,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
{
|
||||
u8 moveType = 0;
|
||||
GET_MOVE_TYPE(gCurrentMove, moveType);
|
||||
if (primary == FALSE && certain != MOVE_EFFECT_CERTAIN && IS_BATTLER_OF_TYPE(gEffectBattler, moveType))
|
||||
if (primary == FALSE && certain == FALSE && IS_BATTLER_OF_TYPE(gEffectBattler, moveType))
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2941,7 +2944,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
{
|
||||
u8 moveType = 0;
|
||||
GET_MOVE_TYPE(gCurrentMove, moveType);
|
||||
if (primary == FALSE && certain != MOVE_EFFECT_CERTAIN && IS_BATTLER_OF_TYPE(gEffectBattler, moveType))
|
||||
if (primary == FALSE && certain == FALSE && IS_BATTLER_OF_TYPE(gEffectBattler, moveType))
|
||||
break;
|
||||
}
|
||||
if (!CanBeFrozen(gEffectBattler))
|
||||
|
@ -2955,7 +2958,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
case STATUS1_PARALYSIS:
|
||||
if (battlerAbility == ABILITY_LIMBER)
|
||||
{
|
||||
if (primary == TRUE || certain == MOVE_EFFECT_CERTAIN)
|
||||
if (primary == TRUE || certain == TRUE)
|
||||
{
|
||||
gLastUsedAbility = ABILITY_LIMBER;
|
||||
RecordAbilityBattle(gEffectBattler, ABILITY_LIMBER);
|
||||
|
@ -2981,12 +2984,12 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
{
|
||||
u8 moveType = 0;
|
||||
GET_MOVE_TYPE(gCurrentMove, moveType);
|
||||
if (primary == FALSE && certain != MOVE_EFFECT_CERTAIN && IS_BATTLER_OF_TYPE(gEffectBattler, moveType))
|
||||
if (primary == FALSE && certain == FALSE && IS_BATTLER_OF_TYPE(gEffectBattler, moveType))
|
||||
break;
|
||||
}
|
||||
if (!CanParalyzeType(gBattleScripting.battler, gEffectBattler)
|
||||
&& (gHitMarker & HITMARKER_STATUS_ABILITY_EFFECT)
|
||||
&& (primary == TRUE || certain == MOVE_EFFECT_CERTAIN))
|
||||
&& (primary == TRUE || certain == TRUE))
|
||||
{
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_PRLZPrevention;
|
||||
|
@ -3003,7 +3006,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
break;
|
||||
case STATUS1_TOXIC_POISON:
|
||||
if ((battlerAbility == ABILITY_IMMUNITY || battlerAbility == ABILITY_PASTEL_VEIL)
|
||||
&& (primary == TRUE || certain == MOVE_EFFECT_CERTAIN))
|
||||
&& (primary == TRUE || certain == TRUE))
|
||||
{
|
||||
gLastUsedAbility = battlerAbility;
|
||||
RecordAbilityBattle(gEffectBattler, battlerAbility);
|
||||
|
@ -3024,7 +3027,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
}
|
||||
if (!CanPoisonType(gBattleScripting.battler, gEffectBattler)
|
||||
&& (gHitMarker & HITMARKER_STATUS_ABILITY_EFFECT)
|
||||
&& (primary == TRUE || certain == MOVE_EFFECT_CERTAIN))
|
||||
&& (primary == TRUE || certain == TRUE))
|
||||
{
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_PSNPrevention;
|
||||
|
@ -3052,7 +3055,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
{
|
||||
u8 moveType = 0;
|
||||
GET_MOVE_TYPE(gCurrentMove, moveType);
|
||||
if (primary == FALSE && certain != MOVE_EFFECT_CERTAIN && IS_BATTLER_OF_TYPE(gEffectBattler, moveType))
|
||||
if (primary == FALSE && certain == FALSE && IS_BATTLER_OF_TYPE(gEffectBattler, moveType))
|
||||
break;
|
||||
}
|
||||
if (!CanGetFrostbite(gEffectBattler))
|
||||
|
@ -3152,7 +3155,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
{
|
||||
// Inner Focus ALWAYS prevents flinching but only activates
|
||||
// on a move that's supposed to flinch, like Fake Out
|
||||
if (primary == TRUE || certain == MOVE_EFFECT_CERTAIN)
|
||||
if (primary == TRUE || certain == TRUE)
|
||||
{
|
||||
gLastUsedAbility = ABILITY_INNER_FOCUS;
|
||||
gBattlerAbility = gEffectBattler;
|
||||
|
@ -3228,7 +3231,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
MOVE_EFFECT_PARALYSIS
|
||||
};
|
||||
gBattleScripting.moveEffect = RandomElement(RNG_TRI_ATTACK, sTriAttackEffects);
|
||||
SetMoveEffect(FALSE, 0);
|
||||
SetMoveEffect(FALSE, certain);
|
||||
}
|
||||
break;
|
||||
case MOVE_EFFECT_CHARGING:
|
||||
|
@ -3467,7 +3470,8 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
gBattlescriptCurrInstr = BattleScript_MoveEffectRecoil;
|
||||
break;
|
||||
case MOVE_EFFECT_THRASH:
|
||||
if (gBattleMons[gEffectBattler].status2 & STATUS2_LOCK_CONFUSE)
|
||||
// Petal Dance doesn't lock mons that copy the move with Dancer
|
||||
if (gSpecialStatuses[gEffectBattler].dancerUsedMove)
|
||||
{
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
|
@ -3663,7 +3667,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
{
|
||||
static const u8 sDireClawEffects[] = { MOVE_EFFECT_POISON, MOVE_EFFECT_PARALYSIS, MOVE_EFFECT_SLEEP };
|
||||
gBattleScripting.moveEffect = RandomElement(RNG_DIRE_CLAW, sDireClawEffects);
|
||||
SetMoveEffect(FALSE, 0);
|
||||
SetMoveEffect(FALSE, certain);
|
||||
}
|
||||
break;
|
||||
case MOVE_EFFECT_STEALTH_ROCK:
|
||||
|
@ -3779,7 +3783,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
break;
|
||||
}
|
||||
}
|
||||
SetMoveEffect(FALSE, 0);
|
||||
SetMoveEffect(FALSE, certain);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3788,26 +3792,13 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
gBattleScripting.moveEffect = 0;
|
||||
}
|
||||
|
||||
static void Cmd_seteffectwithchance(void)
|
||||
static void Cmd_setadditionaleffects(void)
|
||||
{
|
||||
CMD_ARGS();
|
||||
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
|
||||
{
|
||||
if (gBattleScripting.moveEffect &= ~(MOVE_EFFECT_CONTINUE))
|
||||
{
|
||||
if (gBattleScripting.moveEffect & MOVE_EFFECT_CERTAIN)
|
||||
{
|
||||
gBattleScripting.moveEffect &= ~MOVE_EFFECT_CERTAIN;
|
||||
SetMoveEffect(FALSE, MOVE_EFFECT_CERTAIN);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetMoveEffect(FALSE, 0);
|
||||
}
|
||||
gBattleScripting.moveEffect = 0;
|
||||
}
|
||||
else if (gBattleMoves[gCurrentMove].numAdditionalEffects > gBattleStruct->additionalEffectsCounter)
|
||||
if (gBattleMoves[gCurrentMove].numAdditionalEffects > gBattleStruct->additionalEffectsCounter)
|
||||
{
|
||||
const u8 *currentPtr = gBattlescriptCurrInstr;
|
||||
// self-targeting move effects cannot occur multiple times per turn
|
||||
|
@ -3829,7 +3820,7 @@ static void Cmd_seteffectwithchance(void)
|
|||
|
||||
SetMoveEffect(
|
||||
percentChance == 0, // a primary effect
|
||||
MOVE_EFFECT_CERTAIN * (percentChance >= 100) // certain to happen
|
||||
percentChance >= 100 // certain to happen
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -3838,7 +3829,7 @@ static void Cmd_seteffectwithchance(void)
|
|||
if (gBattlescriptCurrInstr == currentPtr)
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
|
||||
// Call seteffectwithchance again in the case of a move with multiple effects
|
||||
// Call setadditionaleffects again in the case of a move with multiple effects
|
||||
gBattleStruct->additionalEffectsCounter++;
|
||||
if (gBattleMoves[gCurrentMove].numAdditionalEffects > gBattleStruct->additionalEffectsCounter)
|
||||
gBattleScripting.moveEffect = MOVE_EFFECT_CONTINUE;
|
||||
|
@ -3864,14 +3855,14 @@ static void Cmd_seteffectprimary(void)
|
|||
{
|
||||
CMD_ARGS();
|
||||
|
||||
SetMoveEffect(TRUE, 0);
|
||||
SetMoveEffect(TRUE, FALSE);
|
||||
}
|
||||
|
||||
static void Cmd_seteffectsecondary(void)
|
||||
{
|
||||
CMD_ARGS();
|
||||
|
||||
SetMoveEffect(FALSE, 0);
|
||||
SetMoveEffect(FALSE, FALSE);
|
||||
}
|
||||
|
||||
static void Cmd_clearstatusfromeffect(void)
|
||||
|
@ -6196,7 +6187,7 @@ static void Cmd_moveend(void)
|
|||
*(gBattleStruct->moveTarget + gBattlerAttacker) = gSpecialStatuses[gBattlerAttacker].dancerOriginalTarget & 0x3;
|
||||
|
||||
if (B_RAMPAGE_CANCELLING >= GEN_5
|
||||
&& gBattleMoves[gCurrentMove].effect == EFFECT_RAMPAGE // If we're rampaging
|
||||
&& MoveHasMoveEffectSelf(gCurrentMove, MOVE_EFFECT_THRASH) // If we're rampaging
|
||||
&& (gMoveResultFlags & MOVE_RESULT_NO_EFFECT) // And it is unusable
|
||||
&& (gBattleMons[gBattlerAttacker].status2 & STATUS2_LOCK_CONFUSE) != STATUS2_LOCK_CONFUSE_TURN(1)) // And won't end this turn
|
||||
CancelMultiTurnMoves(gBattlerAttacker); // Cancel it
|
||||
|
|
|
@ -109,7 +109,6 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] =
|
|||
[EFFECT_EVASION_DOWN] = 1,
|
||||
[EFFECT_HAZE] = 5,
|
||||
[EFFECT_BIDE] = 5,
|
||||
[EFFECT_RAMPAGE] = 4,
|
||||
[EFFECT_ROAR] = 5,
|
||||
[EFFECT_MULTI_HIT] = 1,
|
||||
[EFFECT_CONVERSION] = 3,
|
||||
|
@ -1282,7 +1281,8 @@ static void AddMovePoints(u8 caseId, u16 arg1, u8 arg2, u8 arg3)
|
|||
baseFromEffect += 2; // Overheat etc & Superpower
|
||||
if (MoveHasMoveEffect(arg2, MOVE_EFFECT_STEAL_ITEM))
|
||||
baseFromEffect += 3;
|
||||
if (MoveHasMoveEffect(arg2, MOVE_EFFECT_WRAP))
|
||||
if (MoveHasMoveEffect(arg2, MOVE_EFFECT_WRAP)
|
||||
|| MoveHasMoveEffectSelf(arg2, MOVE_EFFECT_THRASH))
|
||||
baseFromEffect += 3;
|
||||
if (MoveHasMoveEffect(arg2, MOVE_EFFECT_RECHARGE))
|
||||
baseFromEffect += 4;
|
||||
|
|
|
@ -3002,7 +3002,7 @@ u8 DoBattlerEndTurnEffects(void)
|
|||
if (!(gBattleMons[battler].status2 & STATUS2_CONFUSION))
|
||||
{
|
||||
gBattleScripting.moveEffect = MOVE_EFFECT_CONFUSION | MOVE_EFFECT_AFFECTS_USER;
|
||||
SetMoveEffect(TRUE, 0);
|
||||
SetMoveEffect(TRUE, FALSE);
|
||||
if (gBattleMons[battler].status2 & STATUS2_CONFUSION)
|
||||
BattleScriptExecute(BattleScript_ThrashConfuses);
|
||||
effect++;
|
||||
|
@ -5933,7 +5933,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
|
|||
{
|
||||
gBattleScripting.moveEffect = MOVE_EFFECT_FLINCH;
|
||||
BattleScriptPushCursor();
|
||||
SetMoveEffect(FALSE, 0);
|
||||
SetMoveEffect(FALSE, FALSE);
|
||||
BattleScriptPop();
|
||||
effect++;
|
||||
}
|
||||
|
@ -7861,7 +7861,7 @@ u8 ItemBattleEffects(u8 caseID, u32 battler, bool32 moveTurn)
|
|||
{
|
||||
gBattleScripting.moveEffect = MOVE_EFFECT_FLINCH;
|
||||
BattleScriptPushCursor();
|
||||
SetMoveEffect(FALSE, 0);
|
||||
SetMoveEffect(FALSE, FALSE);
|
||||
BattleScriptPop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -601,7 +601,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
|
|||
.power = 90,
|
||||
.pp = 20,
|
||||
#endif
|
||||
.effect = EFFECT_RAMPAGE,
|
||||
.effect = EFFECT_HIT,
|
||||
.type = TYPE_NORMAL,
|
||||
.accuracy = 100,
|
||||
.target = MOVE_TARGET_RANDOM,
|
||||
|
@ -609,6 +609,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
|
|||
.category = BATTLE_CATEGORY_PHYSICAL,
|
||||
.makesContact = TRUE,
|
||||
.instructBanned = TRUE,
|
||||
ADDITIONAL_EFFECTS(
|
||||
PRIMARY_EFFECT_SELF(MOVE_EFFECT_THRASH)
|
||||
),
|
||||
},
|
||||
|
||||
[MOVE_DOUBLE_EDGE] =
|
||||
|
@ -1320,7 +1323,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
|
|||
.power = 70,
|
||||
.pp = 20,
|
||||
#endif
|
||||
.effect = EFFECT_RAMPAGE,
|
||||
.effect = EFFECT_HIT,
|
||||
.type = TYPE_GRASS,
|
||||
.accuracy = 100,
|
||||
.target = MOVE_TARGET_RANDOM,
|
||||
|
@ -1329,6 +1332,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
|
|||
.makesContact = TRUE,
|
||||
.danceMove = TRUE,
|
||||
.instructBanned = TRUE,
|
||||
ADDITIONAL_EFFECTS(
|
||||
PRIMARY_EFFECT_SELF(MOVE_EFFECT_THRASH)
|
||||
),
|
||||
},
|
||||
|
||||
[MOVE_STRING_SHOT] =
|
||||
|
@ -3390,7 +3396,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
|
|||
.power = 90,
|
||||
.pp = 15,
|
||||
#endif
|
||||
.effect = EFFECT_RAMPAGE,
|
||||
.effect = EFFECT_HIT,
|
||||
.type = TYPE_DRAGON,
|
||||
.accuracy = 100,
|
||||
.target = MOVE_TARGET_RANDOM,
|
||||
|
@ -3398,6 +3404,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
|
|||
.category = BATTLE_CATEGORY_PHYSICAL,
|
||||
.makesContact = TRUE,
|
||||
.instructBanned = TRUE,
|
||||
ADDITIONAL_EFFECTS(
|
||||
PRIMARY_EFFECT_SELF(MOVE_EFFECT_THRASH)
|
||||
),
|
||||
},
|
||||
|
||||
[MOVE_SANDSTORM] =
|
||||
|
@ -12504,7 +12513,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
|
|||
|
||||
[MOVE_RAGING_FURY] =
|
||||
{
|
||||
.effect = EFFECT_RAMPAGE,
|
||||
.effect = EFFECT_HIT,
|
||||
.power = B_UPDATED_MOVE_DATA >= GEN_9 ? 120 : 90,
|
||||
.type = TYPE_FIRE,
|
||||
.accuracy = 100,
|
||||
|
@ -12513,6 +12522,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
|
|||
.priority = 0,
|
||||
.category = BATTLE_CATEGORY_PHYSICAL,
|
||||
.metronomeBanned = TRUE,
|
||||
ADDITIONAL_EFFECTS(
|
||||
PRIMARY_EFFECT_SELF(MOVE_EFFECT_THRASH)
|
||||
),
|
||||
},
|
||||
|
||||
[MOVE_WAVE_CRASH] =
|
||||
|
|
|
@ -44,7 +44,7 @@ SINGLE_BATTLE_TEST("Own Tempo prevents confusion from moves by the opponent")
|
|||
SINGLE_BATTLE_TEST("Own Tempo prevents confusion from moves by the user")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gBattleMoves[MOVE_PETAL_DANCE].effect == EFFECT_RAMPAGE);
|
||||
ASSUME(MoveHasMoveEffectSelf(MOVE_PETAL_DANCE, MOVE_EFFECT_THRASH));
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_SLOWPOKE) { Ability(ABILITY_OWN_TEMPO); };
|
||||
} WHEN {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gBattleMoves[MOVE_THRASH].effect == EFFECT_RAMPAGE);
|
||||
ASSUME(MoveHasMoveEffectSelf(MOVE_THRASH, MOVE_EFFECT_THRASH) == TRUE);
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Thrash lasts for 2 or 3 turns")
|
||||
|
@ -26,7 +26,7 @@ SINGLE_BATTLE_TEST("Thrash lasts for 2 or 3 turns")
|
|||
SINGLE_BATTLE_TEST("Thrash confuses the user after it finishes")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
PLAYER(SPECIES_WOBBUFFET) { MovesWithPP({MOVE_THRASH, 10}); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_THRASH); }
|
||||
|
@ -37,6 +37,9 @@ SINGLE_BATTLE_TEST("Thrash confuses the user after it finishes")
|
|||
ANIMATION(ANIM_TYPE_MOVE, MOVE_THRASH, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_THRASH, player);
|
||||
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_CONFUSION, player);
|
||||
} THEN {
|
||||
// Check that PP has been consumed correctly
|
||||
EXPECT_EQ(player->pp[0], 9);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,3 +88,19 @@ SINGLE_BATTLE_TEST("Thrash confuses the user if it is canceled on turn 3 of 3")
|
|||
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_CONFUSION, player);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Petal Dance does not lock mons that copy the move with Dancer")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_VILEPLUME);
|
||||
OPPONENT(SPECIES_ORICORIO);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_PETAL_DANCE); }
|
||||
TURN { SKIP_TURN(player); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_PETAL_DANCE, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_PETAL_DANCE, opponent);
|
||||
// How do you actually test locking?
|
||||
EXPECT(!(opponent->status2 & STATUS2_MULTIPLETURNS));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue