Merge branch '_RHH/master' into _RHH/upcoming
This commit is contained in:
commit
53aebc34dd
@ -134,7 +134,11 @@ BattleScript_EffectTidyUp::
|
||||
pause B_WAIT_TIME_MED
|
||||
ppreduce
|
||||
waitstate
|
||||
saveattacker
|
||||
savetarget
|
||||
trytidyup FALSE, BattleScript_EffectTidyUpDoMoveAnimation
|
||||
restoreattacker
|
||||
restoretarget
|
||||
goto BattleScript_EffectDragonDanceFromStatUp
|
||||
|
||||
BattleScript_EffectTidyUpDoMoveAnimation::
|
||||
@ -143,6 +147,8 @@ BattleScript_EffectTidyUpDoMoveAnimation::
|
||||
trytidyup TRUE, NULL
|
||||
printstring STRINGID_TIDYINGUPCOMPLETE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
restoreattacker
|
||||
restoretarget
|
||||
goto BattleScript_EffectDragonDanceFromStatUp
|
||||
|
||||
BattleScript_EffectUpperHand::
|
||||
@ -1220,7 +1226,6 @@ BattleScript_StrengthSapLower:
|
||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
printfromtable gStatDownStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_StrengthSapHp
|
||||
@ Drain HP without lowering a stat
|
||||
BattleScript_StrengthSapHp:
|
||||
jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_StrengthSapManipulateDmg
|
||||
@ -6371,18 +6376,14 @@ BattleScript_GulpMissileGulping::
|
||||
datahpupdate BS_ATTACKER
|
||||
tryfaintmon BS_ATTACKER
|
||||
jumpiffainted BS_ATTACKER, TRUE, BattleScript_GulpMissileNoSecondEffectGulping
|
||||
jumpifholdeffect BS_ATTACKER, HOLD_EFFECT_CLEAR_AMULET, BattleScript_GulpMissileNoSecondEffectGulping
|
||||
jumpifability BS_ATTACKER, ABILITY_CLEAR_BODY, BattleScript_GulpMissileNoSecondEffectGulping
|
||||
jumpifability BS_ATTACKER, ABILITY_FULL_METAL_BODY, BattleScript_GulpMissileNoSecondEffectGulping
|
||||
jumpifability BS_ATTACKER, ABILITY_WHITE_SMOKE, BattleScript_GulpMissileNoSecondEffectGulping
|
||||
jumpifflowerveilattacker BattleScript_GulpMissileNoSecondEffectGulping
|
||||
BattleScript_GulpMissileNoDmgGulping:
|
||||
handleformchange BS_TARGET, 0
|
||||
playanimation BS_TARGET, B_ANIM_FORM_CHANGE
|
||||
waitanimation
|
||||
swapattackerwithtarget @ to make gStatDownStringIds down below print the right battler
|
||||
setstatchanger STAT_DEF, 1, TRUE
|
||||
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_GulpMissileGorgingTargetDefenseCantGoLower
|
||||
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_GulpMissileGulpingEnd
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_GulpMissileGulpingTargetDefenseCantGoLower
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
printfromtable gStatDownStringIds
|
||||
@ -6394,9 +6395,11 @@ BattleScript_GulpMissileNoSecondEffectGulping:
|
||||
playanimation BS_TARGET, B_ANIM_FORM_CHANGE
|
||||
waitanimation
|
||||
return
|
||||
BattleScript_GulpMissileGorgingTargetDefenseCantGoLower:
|
||||
BattleScript_GulpMissileGulpingTargetDefenseCantGoLower:
|
||||
printstring STRINGID_STATSWONTDECREASE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_GulpMissileGulpingEnd:
|
||||
swapattackerwithtarget @ restore the battlers, just in case
|
||||
return
|
||||
|
||||
BattleScript_SeedSowerActivates::
|
||||
@ -7124,7 +7127,8 @@ BattleScript_CottonDownLoop:
|
||||
jumpiffainted BS_TARGET, TRUE, BattleScript_CottonDownLoopIncrement
|
||||
setstatchanger STAT_SPEED, 1, TRUE
|
||||
jumpifbyteequal gBattlerTarget, gEffectBattler, BattleScript_CottonDownLoopIncrement
|
||||
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_CottonDownTargetSpeedCantGoLower
|
||||
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_CottonDownLoopIncrement
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_CottonDownTargetSpeedCantGoLower
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
printfromtable gStatDownStringIds
|
||||
@ -9067,7 +9071,7 @@ BattleScript_BerryStatRaiseEnd2::
|
||||
BattleScript_BerryStatRaiseEnd2_AbilityPopup:
|
||||
call BattleScript_AbilityPopUp
|
||||
BattleScript_BerryStatRaiseEnd2_Anim:
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_BerryStatRaiseEnd2_End
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_BerryStatRaiseEnd2_End
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, sB_ANIM_ARG1
|
||||
setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_ROSE_ITEM
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
- [How to add a new move](tutorials/how_to_new_move.md)
|
||||
- [How to add a new trainer class](tutorials/how_to_trainer_class.md)
|
||||
- [How to add a new Pokémon]()
|
||||
- [v1.10.x](tutorials/how_to_new_pokemon_1_10_0.md)
|
||||
- [v1.9.x](tutorials/how_to_new_pokemon_1_9_0.md)
|
||||
- [v1.8.x](tutorials/how_to_new_pokemon_1_8_0.md)
|
||||
- [v1.7.x](tutorials/how_to_new_pokemon_1_7_0.md)
|
||||
|
||||
@ -864,9 +864,10 @@ STATIC_ASSERT(sizeof(((struct BattleStruct *)0)->palaceFlags) * 8 >= MAX_BATTLER
|
||||
#define F_DYNAMIC_TYPE_IGNORE_PHYSICALITY (1 << 6) // If set, the dynamic type's physicality won't be used for certain move effects.
|
||||
#define F_DYNAMIC_TYPE_SET (1 << 7) // Set for all dynamic types to distinguish a dynamic type of Normal (0) from no dynamic type.
|
||||
|
||||
#define IS_MOVE_PHYSICAL(move)(GetBattleMoveCategory(move) == DAMAGE_CATEGORY_PHYSICAL)
|
||||
#define IS_MOVE_SPECIAL(move)(GetBattleMoveCategory(move) == DAMAGE_CATEGORY_SPECIAL)
|
||||
#define IS_MOVE_STATUS(move)(gMovesInfo[move].category == DAMAGE_CATEGORY_STATUS)
|
||||
#define IS_MOVE_PHYSICAL(move) (GetBattleMoveCategory(move) == DAMAGE_CATEGORY_PHYSICAL)
|
||||
#define IS_MOVE_SPECIAL(move) (GetBattleMoveCategory(move) == DAMAGE_CATEGORY_SPECIAL)
|
||||
#define IS_MOVE_STATUS(move) (gMovesInfo[move].category == DAMAGE_CATEGORY_STATUS)
|
||||
|
||||
#define IS_MOVE_RECOIL(move)(gMovesInfo[move].recoil > 0 || gMovesInfo[move].effect == EFFECT_RECOIL_IF_MISS)
|
||||
|
||||
/* Checks if 'battlerId' is any of the types.
|
||||
|
||||
@ -156,6 +156,7 @@
|
||||
#define B_ABILITY_TRIGGER_CHANCE GEN_LATEST // In Gen3, Shed Skin, Cute Charm, Flame Body, Static and Poison Point have a 1/3 chance to trigger. In Gen 4+ it's 30%.
|
||||
// In Gen3, Effect Spore has a 10% chance to sleep, poison or paralyze, with an equal chance.
|
||||
// In Gen4, it's 30%. In Gen5+ it has 11% to sleep, 9% chance to poison and 10% chance to paralyze.
|
||||
#define B_PICKUP_WILD GEN_LATEST // In Gen9+, Pickup allows its user to pickup its own used item at the end of the turn in wild battles.
|
||||
|
||||
// Item settings
|
||||
#define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore HP activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn.
|
||||
@ -165,6 +166,7 @@
|
||||
#define B_MENTAL_HERB GEN_LATEST // In Gen5+, the Mental Herb cures Taunt, Encore, Torment, Heal Block, and Disable in addition to Infatuation from before.
|
||||
#define B_TRAINERS_KNOCK_OFF_ITEMS TRUE // If TRUE, trainers can steal/swap your items (non-berries are restored after battle). In vanilla games trainers cannot steal items.
|
||||
#define B_RETURN_STOLEN_NPC_ITEMS GEN_LATEST // In Gen5+, Thief and Covet no longer steal items from NPCs.
|
||||
#define B_STEAL_WILD_ITEMS GEN_LATEST // In Gen9, Thief and Covet steal a wild pokemon's item and send it to the bag. Before Gen9, the stolen item would be held by the Thief/Covet user.
|
||||
#define B_RESTORE_HELD_BATTLE_ITEMS GEN_LATEST // In Gen9, all non-berry items are restored after battle.
|
||||
#define B_SOUL_DEW_BOOST GEN_LATEST // In Gens3-6, Soul Dew boosts Latis' Sp. Atk and Sp. Def. In Gen7+ it boosts the power of their Psychic and Dragon type moves instead.
|
||||
#define B_NET_BALL_MODIFIER GEN_LATEST // In Gen7+, Net Ball's catch multiplier is x5 instead of x3.
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
#define P_SHOW_TERA_TYPE GEN_8 // Since Gen 9, the Tera Type is shown on the summary screen.
|
||||
#define P_TM_LITERACY GEN_LATEST // Since Gen 6, TM illiterate Pokémon can learn TMs that teach moves that are in their level-up learnsets.
|
||||
#define P_CAN_FORGET_HIDDEN_MOVE FALSE // If TRUE, Pokémon can forget any move, even if it is a Hidden Move.
|
||||
#define P_EGG_CYCLE_LENGTH GEN_LATEST // Since Gen 8, egg cycles take half as many steps as before.
|
||||
#define P_EGG_CYCLE_LENGTH GEN_LATEST // Since Gen 8, egg cycles take half as many steps as before. Previous Gens have some varied step counts around 255.
|
||||
#define P_ONLY_OBTAINABLE_SHINIES FALSE // If TRUE, Pokémon encountered in the Battle Pyramid won't be shiny.
|
||||
#define P_NO_SHINIES_WITHOUT_POKEBALLS FALSE // If TRUE, Pokémon encountered when the player is out of Poké Balls won't be shiny
|
||||
#define P_SHOW_DYNAMIC_TYPES FALSE // If TRUE, all moves with dynamic type changes will be reflected as their current type in battle/summary screens instead of just select ones like in vanilla.
|
||||
|
||||
@ -815,8 +815,7 @@ struct DayCare
|
||||
{
|
||||
struct DaycareMon mons[DAYCARE_MON_COUNT];
|
||||
u32 offspringPersonality;
|
||||
u8 stepCounter;
|
||||
//u8 padding[3];
|
||||
u32 stepCounter;
|
||||
};
|
||||
|
||||
struct LilycoveLadyQuiz
|
||||
|
||||
@ -433,7 +433,7 @@ static void SetBattlerAiMovesData(struct AiLogicData *aiData, u32 battlerAtk, u3
|
||||
|
||||
if (move != 0
|
||||
&& move != 0xFFFF
|
||||
//&& gMovesInfo[move].power != 0 /* we want to get effectiveness and accuracy of status moves */
|
||||
//&& !IS_MOVE_STATUS(gMovesInfo[move]) /* we want to get effectiveness and accuracy of status moves */
|
||||
&& !(aiData->moveLimitations[battlerAtk] & (1u << moveIndex)))
|
||||
{
|
||||
dmg = AI_CalcDamage(move, battlerAtk, battlerDef, &effectiveness, TRUE, weather, rollType);
|
||||
@ -2619,8 +2619,8 @@ static s32 AI_TryToFaint(u32 battlerAtk, u32 battlerDef, u32 move, s32 score)
|
||||
if (IS_TARGETING_PARTNER(battlerAtk, battlerDef))
|
||||
return score;
|
||||
|
||||
if (gMovesInfo[move].power == 0)
|
||||
return score; // can't make anything faint with no power
|
||||
if (IS_MOVE_STATUS(move))
|
||||
return score; // status moves aren't accounted here
|
||||
|
||||
if (CanIndexMoveFaintTarget(battlerAtk, battlerDef, movesetIndex, 0) && gMovesInfo[move].effect != EFFECT_EXPLOSION)
|
||||
{
|
||||
@ -4937,7 +4937,7 @@ static s32 AI_PreferBatonPass(u32 battlerAtk, u32 battlerDef, u32 move, s32 scor
|
||||
{
|
||||
if (IS_TARGETING_PARTNER(battlerAtk, battlerDef)
|
||||
|| CountUsablePartyMons(battlerAtk) == 0
|
||||
|| gMovesInfo[move].power != 0
|
||||
|| !IS_MOVE_STATUS(move)
|
||||
|| !HasMoveEffect(battlerAtk, EFFECT_BATON_PASS)
|
||||
|| IsBattlerTrapped(battlerAtk, TRUE))
|
||||
return score;
|
||||
|
||||
@ -122,8 +122,8 @@ static bool32 ShouldSwitchIfHasBadOdds(u32 battler)
|
||||
hasStatusMove = TRUE;
|
||||
}
|
||||
|
||||
// Only check damage if move has power
|
||||
if (gMovesInfo[aiMove].power != 0)
|
||||
// Only check damage if it's a damaging move
|
||||
if (!IS_MOVE_STATUS(aiMove))
|
||||
{
|
||||
// Check if mon has a super effective move
|
||||
if (AI_GetMoveEffectiveness(aiMove, battler, opposingBattler) >= AI_EFFECTIVENESS_x2)
|
||||
@ -156,7 +156,7 @@ static bool32 ShouldSwitchIfHasBadOdds(u32 battler)
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
playerMove = gBattleMons[opposingBattler].moves[i];
|
||||
if (playerMove != MOVE_NONE && gMovesInfo[playerMove].power != 0)
|
||||
if (playerMove != MOVE_NONE && !IS_MOVE_STATUS(playerMove))
|
||||
{
|
||||
damageTaken = AI_CalcDamage(playerMove, opposingBattler, battler, &effectiveness, FALSE, weather, DMG_ROLL_HIGHEST).expected;
|
||||
if (damageTaken > maxDamageTaken)
|
||||
@ -1242,7 +1242,7 @@ static u32 GetBestMonDmg(struct Pokemon *party, int firstId, int lastId, u8 inva
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
aiMove = AI_DATA->switchinCandidate.battleMon.moves[j];
|
||||
if (aiMove != MOVE_NONE && gMovesInfo[aiMove].power != 0)
|
||||
if (aiMove != MOVE_NONE && !IS_MOVE_STATUS(aiMove))
|
||||
{
|
||||
aiMove = GetMonData(&party[i], MON_DATA_MOVE1 + j);
|
||||
dmg = AI_CalcPartyMonDamage(aiMove, battler, opposingBattler, AI_DATA->switchinCandidate.battleMon, TRUE, rollType);
|
||||
@ -1698,7 +1698,7 @@ static s32 GetMaxDamagePlayerCouldDealToSwitchin(u32 battler, u32 opposingBattle
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
playerMove = gBattleMons[opposingBattler].moves[i];
|
||||
if (playerMove != MOVE_NONE && gMovesInfo[playerMove].power != 0)
|
||||
if (playerMove != MOVE_NONE && !IS_MOVE_STATUS(playerMove))
|
||||
{
|
||||
damageTaken = AI_CalcPartyMonDamage(playerMove, opposingBattler, battler, battleMon, FALSE, DMG_ROLL_HIGHEST);
|
||||
if (damageTaken > maxDamageTaken)
|
||||
@ -1826,7 +1826,7 @@ static u32 GetBestMonIntegrated(struct Pokemon *party, int firstId, int lastId,
|
||||
{
|
||||
aiMove = AI_DATA->switchinCandidate.battleMon.moves[j];
|
||||
|
||||
if (aiMove != MOVE_NONE && gMovesInfo[aiMove].power != 0)
|
||||
if (aiMove != MOVE_NONE && !IS_MOVE_STATUS(aiMove))
|
||||
{
|
||||
if (AI_THINKING_STRUCT->aiFlags[battler] & AI_FLAG_CONSERVATIVE)
|
||||
damageDealt = AI_CalcPartyMonDamage(aiMove, battler, opposingBattler, AI_DATA->switchinCandidate.battleMon, TRUE, DMG_ROLL_LOWEST);
|
||||
@ -1856,7 +1856,7 @@ static u32 GetBestMonIntegrated(struct Pokemon *party, int firstId, int lastId,
|
||||
}
|
||||
|
||||
// Check for mon with resistance and super effective move for best type matchup mon with effective move
|
||||
if (aiMove != MOVE_NONE && gMovesInfo[aiMove].power != 0)
|
||||
if (aiMove != MOVE_NONE && !IS_MOVE_STATUS(aiMove))
|
||||
{
|
||||
if (typeMatchup < bestResistEffective)
|
||||
{
|
||||
|
||||
@ -2419,7 +2419,7 @@ bool32 HasDamagingMove(u32 battlerId)
|
||||
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
if (moves[i] != MOVE_NONE && moves[i] != MOVE_UNAVAILABLE && gMovesInfo[moves[i]].power != 0)
|
||||
if (moves[i] != MOVE_NONE && moves[i] != MOVE_UNAVAILABLE && !IS_MOVE_STATUS(moves[i]))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -2434,7 +2434,7 @@ bool32 HasDamagingMoveOfType(u32 battlerId, u32 type)
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
if (moves[i] != MOVE_NONE && moves[i] != MOVE_UNAVAILABLE
|
||||
&& gMovesInfo[moves[i]].type == type && gMovesInfo[moves[i]].power != 0)
|
||||
&& !IS_MOVE_STATUS(moves[i]].type == type && gMovesInfo[moves[i]))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@ -6642,6 +6642,79 @@ static void ReloadBattlerSprites(u32 battler, struct Pokemon *party)
|
||||
}
|
||||
}
|
||||
|
||||
static void TrySwapSkyDropTargets(u32 battlerAtk, u32 battlerPartner)
|
||||
{
|
||||
u32 i, temp;
|
||||
|
||||
// battlerAtk is using Ally Switch
|
||||
// check if our partner is the target of sky drop
|
||||
// If so, change that index to battlerAtk
|
||||
for (i = 0; i < gBattlersCount; i++) {
|
||||
if (gBattleStruct->skyDropTargets[i] == battlerPartner) {
|
||||
gBattleStruct->skyDropTargets[i] = battlerAtk;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Then swap our own sky drop targets with the partner in case our partner is mid-skydrop
|
||||
SWAP(gBattleStruct->skyDropTargets[battlerAtk], gBattleStruct->skyDropTargets[battlerPartner], temp);
|
||||
}
|
||||
|
||||
#define TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, side, field) \
|
||||
if (gSideTimers[side].field == battlerAtk) \
|
||||
gSideTimers[side].field = battlerPartner; \
|
||||
else if (gSideTimers[side].field == battlerPartner) \
|
||||
gSideTimers[side].field = battlerAtk;
|
||||
|
||||
static void TrySwapStickyWebBattlerId(u32 battlerAtk, u32 battlerPartner)
|
||||
{
|
||||
u32 atkSide = GetBattlerSide(battlerAtk);
|
||||
u32 oppSide = GetBattlerSide(BATTLE_OPPOSITE(battlerAtk));
|
||||
|
||||
// not all of these are needed to be swapped, but are done so to be robust to anything in the future that might care about them
|
||||
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, atkSide, reflectBattlerId);
|
||||
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, atkSide, lightscreenBattlerId);
|
||||
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, atkSide, mistBattlerId);
|
||||
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, atkSide, safeguardBattlerId);
|
||||
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, atkSide, auroraVeilBattlerId);
|
||||
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, atkSide, tailwindBattlerId);
|
||||
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, atkSide, luckyChantBattlerId);
|
||||
|
||||
// if we've set sticky web on the opposing side, need to swap stickyWebBattlerId for mirror armor
|
||||
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, oppSide, stickyWebBattlerId);
|
||||
}
|
||||
#undef TRY_SIDE_TIMER_BATTLER_ID_SWAP
|
||||
|
||||
static void TrySwapWishBattlerIds(u32 battlerAtk, u32 battlerPartner)
|
||||
{
|
||||
u32 i, temp;
|
||||
u32 oppSide = GetBattlerSide(BATTLE_OPPOSITE(battlerAtk));
|
||||
|
||||
// if used future sight on opposing side, properly track who used it
|
||||
if (gSideStatuses[oppSide] & SIDE_STATUS_FUTUREATTACK) {
|
||||
for (i = 0; i < gBattlersCount; i++) {
|
||||
if (IsAlly(i,battlerAtk))
|
||||
continue; // only on opposing side
|
||||
if (gWishFutureKnock.futureSightBattlerIndex[i] == battlerAtk) {
|
||||
// if target was attacked with future sight from us, now they'll be the partner slot
|
||||
gWishFutureKnock.futureSightBattlerIndex[i] = battlerPartner;
|
||||
gWishFutureKnock.futureSightPartyIndex[i] = gBattlerPartyIndexes[battlerPartner];
|
||||
break;
|
||||
} else if (gWishFutureKnock.futureSightBattlerIndex[i] == battlerPartner) {
|
||||
gWishFutureKnock.futureSightBattlerIndex[i] = battlerAtk;
|
||||
gWishFutureKnock.futureSightPartyIndex[i] = gBattlerPartyIndexes[battlerAtk];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// swap wish party indices
|
||||
if (gWishFutureKnock.wishCounter[battlerAtk] > 0
|
||||
|| gWishFutureKnock.wishCounter[battlerPartner] > 0) {
|
||||
SWAP(gWishFutureKnock.wishPartyId[battlerAtk], gWishFutureKnock.wishPartyId[battlerPartner], temp);
|
||||
}
|
||||
}
|
||||
|
||||
static void AnimTask_AllySwitchDataSwap(u8 taskId)
|
||||
{
|
||||
s32 i, j;
|
||||
@ -6684,6 +6757,7 @@ static void AnimTask_AllySwitchDataSwap(u8 taskId)
|
||||
break;
|
||||
}
|
||||
SWAP(gBattlerByTurnOrder[i], gBattlerByTurnOrder[j], temp);
|
||||
SWAP(gActionsByTurnOrder[i], gActionsByTurnOrder[j], temp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -6692,6 +6766,10 @@ static void AnimTask_AllySwitchDataSwap(u8 taskId)
|
||||
SwitchTwoBattlersInParty(battlerAtk, battlerPartner);
|
||||
SWAP(gBattlerPartyIndexes[battlerAtk], gBattlerPartyIndexes[battlerPartner], temp);
|
||||
|
||||
TrySwapSkyDropTargets(battlerAtk, battlerPartner);
|
||||
TrySwapStickyWebBattlerId(battlerAtk, battlerPartner);
|
||||
TrySwapWishBattlerIds(battlerAtk, battlerPartner);
|
||||
|
||||
// For Snipe Shot and abilities Stalwart/Propeller Tail - keep the original target.
|
||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
{
|
||||
|
||||
@ -360,7 +360,7 @@ void BattleArena_AddMindPoints(u8 battler)
|
||||
// All moves with power != 0 give 1 point, with the following exceptions:
|
||||
// - Counter, Mirror Coat, and Bide give 0 points
|
||||
// - Fake Out subtracts 1 point
|
||||
// All moves with power == 0 give 0 points, with the following exceptions:
|
||||
// All status moves give 0 points, with the following exceptions:
|
||||
// - Protect, Detect, and Endure subtract 1 point
|
||||
|
||||
if (gMovesInfo[gCurrentMove].effect == EFFECT_FIRST_TURN_ONLY
|
||||
@ -369,7 +369,7 @@ void BattleArena_AddMindPoints(u8 battler)
|
||||
{
|
||||
gBattleStruct->arenaMindPoints[battler]--;
|
||||
}
|
||||
else if (gMovesInfo[gCurrentMove].power != 0
|
||||
else if (!IS_MOVE_STATUS(gCurrentMove)
|
||||
&& gMovesInfo[gCurrentMove].effect != EFFECT_COUNTER
|
||||
&& gMovesInfo[gCurrentMove].effect != EFFECT_MIRROR_COAT
|
||||
&& gMovesInfo[gCurrentMove].effect != EFFECT_METAL_BURST
|
||||
|
||||
@ -4326,7 +4326,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
|
||||
allocatedArray[k] = IsDomeStatusMoveEffect(move);
|
||||
break;
|
||||
case MOVE_POINTS_DMG:
|
||||
allocatedArray[k] = (gMovesInfo[move].power != 0) ? 1 : 0;
|
||||
allocatedArray[k] = (!IS_MOVE_STATUS(move)) ? 1 : 0;
|
||||
break;
|
||||
case MOVE_POINTS_DEF:
|
||||
allocatedArray[k] = IsDomeDefensiveMoveEffect(gMovesInfo[move].effect) ? 1 : 0;
|
||||
@ -5108,7 +5108,7 @@ static u16 GetWinningMove(int winnerTournamentId, int loserTournamentId, u8 roun
|
||||
moveIds[i * MAX_MON_MOVES + j] = gFacilityTrainerMons[DOME_MONS[winnerTournamentId][i]].moves[j];
|
||||
|
||||
movePower = gMovesInfo[moveIds[i * MAX_MON_MOVES + j]].power;
|
||||
if (movePower == 0)
|
||||
if (IS_MOVE_STATUS(moveIds[i * MAX_MON_MOVES + j]))
|
||||
movePower = 40;
|
||||
else if (movePower == 1)
|
||||
movePower = 60;
|
||||
|
||||
@ -4844,7 +4844,7 @@ s8 GetMovePriority(u32 battler, u16 move)
|
||||
s8 priority;
|
||||
u16 ability = GetBattlerAbility(battler);
|
||||
|
||||
if (GetActiveGimmick(battler) == GIMMICK_Z_MOVE && gMovesInfo[move].power != 0)
|
||||
if (GetActiveGimmick(battler) == GIMMICK_Z_MOVE && !IS_MOVE_STATUS(move))
|
||||
move = GetUsableZMove(battler, move);
|
||||
|
||||
priority = gMovesInfo[move].priority;
|
||||
|
||||
@ -703,7 +703,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
[STRINGID_NOONEWILLBEABLETORUNAWAY] = COMPOUND_STRING("No one will be able to run away during the next turn!"),
|
||||
[STRINGID_DESTINYKNOTACTIVATES] = COMPOUND_STRING("{B_SCR_NAME_WITH_PREFIX} fell in love because of the {B_LAST_ITEM}!"),
|
||||
[STRINGID_CLOAKEDINAFREEZINGLIGHT] = COMPOUND_STRING("{B_ATK_NAME_WITH_PREFIX} became cloaked in a freezing light!"),
|
||||
[STRINGID_CLEARAMULETWONTLOWERSTATS] = COMPOUND_STRING("The effects of the {B_LAST_ITEM} held by {B_DEF_NAME_WITH_PREFIX2} prevents its stats from being lowered!"),
|
||||
[STRINGID_CLEARAMULETWONTLOWERSTATS] = COMPOUND_STRING("The effects of the {B_LAST_ITEM} held by {B_SCR_NAME_WITH_PREFIX2} prevents its stats from being lowered!"),
|
||||
[STRINGID_FERVENTWISHREACHED] = COMPOUND_STRING("{B_ATK_TRAINER_NAME}'s fervent wish has reached {B_ATK_NAME_WITH_PREFIX2}!"),
|
||||
[STRINGID_AIRLOCKACTIVATES] = COMPOUND_STRING("The effects of the weather disappeared."),
|
||||
[STRINGID_PRESSUREENTERS] = COMPOUND_STRING("{B_SCR_NAME_WITH_PREFIX} is exerting its pressure!"),
|
||||
@ -1286,7 +1286,10 @@ const u16 gWeatherStartsStringIds[] =
|
||||
|
||||
const u16 gTerrainStartsStringIds[] =
|
||||
{
|
||||
STRINGID_MISTSWIRLSAROUND, STRINGID_ELECTRICCURRENTISRUNNING, STRINGID_ISCOVEREDWITHGRASS, STRINGID_SEEMSWEIRD,
|
||||
[B_MSG_TERRAIN_SET_MISTY] = STRINGID_MISTSWIRLSAROUND,
|
||||
[B_MSG_TERRAIN_SET_ELECTRIC] = STRINGID_ELECTRICCURRENTISRUNNING,
|
||||
[B_MSG_TERRAIN_SET_PSYCHIC] = STRINGID_SEEMSWEIRD,
|
||||
[B_MSG_TERRAIN_SET_GRASSY] = STRINGID_ISCOVEREDWITHGRASS,
|
||||
};
|
||||
|
||||
const u16 gPrimalWeatherBlocksStringIds[] =
|
||||
|
||||
@ -3133,17 +3133,26 @@ static void CheckSetUnburden(u8 battler)
|
||||
void StealTargetItem(u8 battlerStealer, u8 battlerItem)
|
||||
{
|
||||
gLastUsedItem = gBattleMons[battlerItem].item;
|
||||
gBattleMons[battlerItem].item = 0;
|
||||
gBattleMons[battlerItem].item = ITEM_NONE;
|
||||
|
||||
RecordItemEffectBattle(battlerItem, 0);
|
||||
RecordItemEffectBattle(battlerStealer, ItemId_GetHoldEffect(gLastUsedItem));
|
||||
gBattleMons[battlerStealer].item = gLastUsedItem;
|
||||
if (B_STEAL_WILD_ITEMS >= GEN_9
|
||||
&& !(gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_PALACE))
|
||||
&& MoveHasAdditionalEffect(gCurrentMove, MOVE_EFFECT_STEAL_ITEM)
|
||||
&& battlerStealer == gBattlerAttacker) // ensure that Pickpocket isn't activating this
|
||||
{
|
||||
AddBagItem(gLastUsedItem, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
RecordItemEffectBattle(battlerStealer, ItemId_GetHoldEffect(gLastUsedItem));
|
||||
gBattleMons[battlerStealer].item = gLastUsedItem;
|
||||
gBattleResources->flags->flags[battlerStealer] &= ~RESOURCE_FLAG_UNBURDEN;
|
||||
BtlController_EmitSetMonData(battlerStealer, BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gLastUsedItem), &gLastUsedItem); // set attacker item
|
||||
MarkBattlerForControllerExec(battlerStealer);
|
||||
}
|
||||
|
||||
RecordItemEffectBattle(battlerItem, ITEM_NONE);
|
||||
CheckSetUnburden(battlerItem);
|
||||
gBattleResources->flags->flags[battlerStealer] &= ~RESOURCE_FLAG_UNBURDEN;
|
||||
|
||||
BtlController_EmitSetMonData(battlerStealer, BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gLastUsedItem), &gLastUsedItem); // set attacker item
|
||||
MarkBattlerForControllerExec(battlerStealer);
|
||||
|
||||
BtlController_EmitSetMonData(battlerItem, BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gBattleMons[gBattlerTarget].item), &gBattleMons[battlerItem].item); // remove target item
|
||||
MarkBattlerForControllerExec(battlerItem);
|
||||
@ -3826,8 +3835,13 @@ void SetMoveEffect(bool32 primary, bool32 certain)
|
||||
else
|
||||
{
|
||||
StealTargetItem(gBattlerAttacker, gBattlerTarget); // Attacker steals target item
|
||||
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
|
||||
|
||||
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;
|
||||
}
|
||||
@ -5959,7 +5973,9 @@ static void Cmd_moveend(void)
|
||||
gBattleScripting.moveendState++;
|
||||
break;
|
||||
case MOVEEND_ABSORB:
|
||||
if (gMovesInfo[gCurrentMove].effect == EFFECT_ABSORB)
|
||||
if (gMovesInfo[gCurrentMove].effect == EFFECT_ABSORB
|
||||
&& !(gHitMarker & HITMARKER_UNABLE_TO_USE_MOVE)
|
||||
&& TARGET_TURN_DAMAGED)
|
||||
{
|
||||
if (gStatuses3[gBattlerAttacker] & STATUS3_HEAL_BLOCK && gMovesInfo[gCurrentMove].healingMove)
|
||||
{
|
||||
@ -5997,7 +6013,7 @@ static void Cmd_moveend(void)
|
||||
&& GetBattlerSide(gBattlerAttacker) != GetBattlerSide(gBattlerTarget)
|
||||
&& MoveResultHasEffect(gBattlerTarget)
|
||||
&& IsBattlerTurnDamaged(gBattlerTarget)
|
||||
&& gMovesInfo[gCurrentMove].power != 0
|
||||
&& !IS_MOVE_STATUS(gCurrentMove)
|
||||
&& CompareStat(gBattlerTarget, STAT_ATK, MAX_STAT_STAGE, CMP_LESS_THAN))
|
||||
{
|
||||
SET_STATCHANGER(STAT_ATK, 1, FALSE);
|
||||
@ -9015,7 +9031,7 @@ static void Cmd_useitemonopponent(void)
|
||||
static bool32 HasAttackerFaintedTarget(void)
|
||||
{
|
||||
if (MoveResultHasEffect(gBattlerTarget)
|
||||
&& gMovesInfo[gCurrentMove].power != 0
|
||||
&& !IS_MOVE_STATUS(gCurrentMove)
|
||||
&& (gLastHitBy[gBattlerTarget] == 0xFF || gLastHitBy[gBattlerTarget] == gBattlerAttacker)
|
||||
&& gBattleStruct->moveTarget[gBattlerAttacker] == gBattlerTarget
|
||||
&& gBattlerTarget != gBattlerAttacker
|
||||
@ -9174,8 +9190,8 @@ static bool32 TryDefogClear(u32 battlerAtk, bool32 clear)
|
||||
|
||||
static bool32 TryTidyUpClear(u32 battlerAtk, bool32 clear)
|
||||
{
|
||||
s32 i;
|
||||
u8 saveBattler = gBattlerAttacker;
|
||||
u32 i;
|
||||
u32 saveBattler = gBattlerAttacker;
|
||||
|
||||
for (i = 0; i < NUM_BATTLE_SIDES; i++)
|
||||
{
|
||||
@ -12268,7 +12284,10 @@ static void Cmd_statbuffchange(void)
|
||||
const u8 *ptrBefore = gBattlescriptCurrInstr;
|
||||
const u8 *failInstr = cmd->failInstr;
|
||||
|
||||
if (ChangeStatBuffs(GET_STAT_BUFF_VALUE_WITH_SIGN(gBattleScripting.statChanger), GET_STAT_BUFF_ID(gBattleScripting.statChanger), flags, failInstr) == STAT_CHANGE_WORKED)
|
||||
if (ChangeStatBuffs(GET_STAT_BUFF_VALUE_WITH_SIGN(gBattleScripting.statChanger),
|
||||
GET_STAT_BUFF_ID(gBattleScripting.statChanger),
|
||||
flags,
|
||||
failInstr) == STAT_CHANGE_WORKED)
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
else if (gBattlescriptCurrInstr == ptrBefore) // Prevent infinite looping.
|
||||
gBattlescriptCurrInstr = failInstr;
|
||||
@ -12989,7 +13008,10 @@ static void Cmd_setsubstitute(void)
|
||||
|
||||
gBattleMons[gBattlerAttacker].status2 |= STATUS2_SUBSTITUTE;
|
||||
gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_WRAPPED;
|
||||
gDisableStructs[gBattlerAttacker].substituteHP = gBattleStruct->moveDamage[gBattlerAttacker];
|
||||
if (factor == 2)
|
||||
gDisableStructs[gBattlerAttacker].substituteHP = gBattleStruct->moveDamage[gBattlerAttacker] / 2;
|
||||
else
|
||||
gDisableStructs[gBattlerAttacker].substituteHP = gBattleStruct->moveDamage[gBattlerAttacker];
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_SUBSTITUTE;
|
||||
gHitMarker |= HITMARKER_IGNORE_SUBSTITUTE;
|
||||
}
|
||||
|
||||
@ -230,7 +230,7 @@ void HandleAction_UseMove(void)
|
||||
else if (IsDoubleBattle()
|
||||
&& gSideTimers[side].followmeTimer == 0
|
||||
&& !(gBattleStruct->pursuitTarget & (1u << *(gBattleStruct->moveTarget + gBattlerAttacker)))
|
||||
&& (gMovesInfo[gCurrentMove].power != 0 || (moveTarget != MOVE_TARGET_USER && moveTarget != MOVE_TARGET_ALL_BATTLERS))
|
||||
&& (!IS_MOVE_STATUS(gCurrentMove) || (moveTarget != MOVE_TARGET_USER && moveTarget != MOVE_TARGET_ALL_BATTLERS))
|
||||
&& ((GetBattlerAbility(*(gBattleStruct->moveTarget + gBattlerAttacker)) != ABILITY_LIGHTNING_ROD && moveType == TYPE_ELECTRIC)
|
||||
|| (GetBattlerAbility(*(gBattleStruct->moveTarget + gBattlerAttacker)) != ABILITY_STORM_DRAIN && moveType == TYPE_WATER)))
|
||||
{
|
||||
@ -574,7 +574,8 @@ void HandleAction_ThrowBall(void)
|
||||
gBattle_BG0_X = 0;
|
||||
gBattle_BG0_Y = 0;
|
||||
gLastUsedItem = gBallToDisplay;
|
||||
RemoveBagItem(gLastUsedItem, 1);
|
||||
if (!ItemId_GetImportance(gLastUsedItem))
|
||||
RemoveBagItem(gLastUsedItem, 1);
|
||||
gBattlescriptCurrInstr = BattleScript_BallThrow;
|
||||
gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT;
|
||||
}
|
||||
@ -1586,17 +1587,12 @@ u8 DoFieldEndTurnEffects(void)
|
||||
switch (gBattleStruct->turnCountersTracker)
|
||||
{
|
||||
case ENDTURN_ORDER:
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
gBattlerByTurnOrder[i] = i;
|
||||
}
|
||||
for (i = 0; i < gBattlersCount - 1; i++)
|
||||
{
|
||||
s32 j;
|
||||
for (j = i + 1; j < gBattlersCount; j++)
|
||||
{
|
||||
if (!gProtectStructs[i].quash
|
||||
&& !gProtectStructs[j].quash
|
||||
if (!(gProtectStructs[i].quash && gProtectStructs[j].quash)
|
||||
&& GetWhichBattlerFaster(gBattlerByTurnOrder[i], gBattlerByTurnOrder[j], FALSE) == -1)
|
||||
SwapTurnOrder(i, j);
|
||||
}
|
||||
@ -5664,7 +5660,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
|
||||
case ABILITY_COLOR_CHANGE:
|
||||
if (MoveResultHasEffect(battler)
|
||||
&& move != MOVE_STRUGGLE
|
||||
&& gMovesInfo[move].power != 0
|
||||
&& !IS_MOVE_STATUS(move)
|
||||
&& IsBattlerTurnDamaged(gBattlerTarget)
|
||||
&& !IS_BATTLER_OF_TYPE(battler, moveType)
|
||||
&& moveType != TYPE_STELLAR
|
||||
@ -8624,7 +8620,7 @@ bool32 IsBattlerProtected(u32 battlerAtk, u32 battlerDef, u32 move)
|
||||
isProtected = TRUE;
|
||||
else if (gProtectStructs[battlerDef].spikyShielded)
|
||||
isProtected = TRUE;
|
||||
else if (gProtectStructs[battlerDef].kingsShielded && gMovesInfo[move].power != 0)
|
||||
else if (gProtectStructs[battlerDef].kingsShielded && !IS_MOVE_STATUS(move))
|
||||
isProtected = TRUE;
|
||||
else if (gProtectStructs[battlerDef].maxGuarded)
|
||||
isProtected = TRUE;
|
||||
@ -11543,7 +11539,7 @@ u16 GetUsedHeldItem(u32 battler)
|
||||
bool32 CantPickupItem(u32 battler)
|
||||
{
|
||||
// Used by RandomUniformExcept() for RNG_PICKUP
|
||||
if (battler == gBattlerAttacker && gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_LINK))
|
||||
if (battler == gBattlerAttacker && (B_PICKUP_WILD < GEN_9 || gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_LINK)))
|
||||
return TRUE;
|
||||
return !(IsBattlerAlive(battler) && GetUsedHeldItem(battler) && gBattleStruct->canPickupItem & (1u << battler));
|
||||
}
|
||||
|
||||
@ -14459,11 +14459,11 @@ const u32 gObjectEventPic_Substitute[] = INCBIN_COMP("graphics/pokemon/question_
|
||||
#endif //P_FAMILY_SHIELDON
|
||||
|
||||
#if P_FAMILY_BURMY
|
||||
const u32 gMonFrontPic_BurmyPlantCloak[] = INCBIN_U32("graphics/pokemon/burmy/anim_front.4bpp.lz");
|
||||
const u32 gMonPalette_BurmyPlantCloak[] = INCBIN_U32("graphics/pokemon/burmy/normal.gbapal.lz");
|
||||
const u32 gMonBackPic_BurmyPlantCloak[] = INCBIN_U32("graphics/pokemon/burmy/back.4bpp.lz");
|
||||
const u32 gMonShinyPalette_BurmyPlantCloak[] = INCBIN_U32("graphics/pokemon/burmy/shiny.gbapal.lz");
|
||||
const u8 gMonIcon_BurmyPlantCloak[] = INCBIN_U8("graphics/pokemon/burmy/icon.4bpp");
|
||||
const u32 gMonFrontPic_BurmyPlant[] = INCBIN_U32("graphics/pokemon/burmy/anim_front.4bpp.lz");
|
||||
const u32 gMonPalette_BurmyPlant[] = INCBIN_U32("graphics/pokemon/burmy/normal.gbapal.lz");
|
||||
const u32 gMonBackPic_BurmyPlant[] = INCBIN_U32("graphics/pokemon/burmy/back.4bpp.lz");
|
||||
const u32 gMonShinyPalette_BurmyPlant[] = INCBIN_U32("graphics/pokemon/burmy/shiny.gbapal.lz");
|
||||
const u8 gMonIcon_BurmyPlant[] = INCBIN_U8("graphics/pokemon/burmy/icon.4bpp");
|
||||
#if P_FOOTPRINTS
|
||||
const u8 gMonFootprint_Burmy[] = INCBIN_U8("graphics/pokemon/burmy/footprint.1bpp");
|
||||
#endif //P_FOOTPRINTS
|
||||
@ -14481,24 +14481,24 @@ const u32 gObjectEventPic_Substitute[] = INCBIN_COMP("graphics/pokemon/question_
|
||||
const u8 gMonIcon_BurmyTrash[] = INCBIN_U8("graphics/pokemon/burmy/trash/icon.4bpp");
|
||||
|
||||
#if OW_POKEMON_OBJECT_EVENTS
|
||||
const u32 gObjectEventPic_BurmyPlantCloak[] = INCBIN_COMP("graphics/pokemon/burmy/overworld.4bpp");
|
||||
const u32 gObjectEventPic_BurmyPlant[] = INCBIN_COMP("graphics/pokemon/burmy/overworld.4bpp");
|
||||
const u32 gObjectEventPic_BurmySandy[] = INCBIN_COMP("graphics/pokemon/burmy/sandy/overworld.4bpp");
|
||||
const u32 gObjectEventPic_BurmyTrash[] = INCBIN_COMP("graphics/pokemon/burmy/trash/overworld.4bpp");
|
||||
#if OW_PKMN_OBJECTS_SHARE_PALETTES == FALSE
|
||||
const u32 gOverworldPalette_BurmyPlantCloak[] = INCBIN_U32("graphics/pokemon/burmy/overworld_normal.gbapal.lz");
|
||||
const u32 gOverworldPalette_BurmyPlant[] = INCBIN_U32("graphics/pokemon/burmy/overworld_normal.gbapal.lz");
|
||||
const u32 gOverworldPalette_BurmySandy[] = INCBIN_U32("graphics/pokemon/burmy/sandy/overworld_normal.gbapal.lz");
|
||||
const u32 gOverworldPalette_BurmyTrash[] = INCBIN_U32("graphics/pokemon/burmy/trash/overworld_normal.gbapal.lz");
|
||||
const u32 gShinyOverworldPalette_BurmyPlantCloak[] = INCBIN_U32("graphics/pokemon/burmy/overworld_shiny.gbapal.lz");
|
||||
const u32 gShinyOverworldPalette_BurmyPlant[] = INCBIN_U32("graphics/pokemon/burmy/overworld_shiny.gbapal.lz");
|
||||
const u32 gShinyOverworldPalette_BurmySandy[] = INCBIN_U32("graphics/pokemon/burmy/sandy/overworld_shiny.gbapal.lz");
|
||||
const u32 gShinyOverworldPalette_BurmyTrash[] = INCBIN_U32("graphics/pokemon/burmy/trash/overworld_shiny.gbapal.lz");
|
||||
#endif //OW_PKMN_OBJECTS_SHARE_PALETTES
|
||||
#endif //OW_POKEMON_OBJECT_EVENTS
|
||||
|
||||
const u32 gMonFrontPic_WormadamPlantCloak[] = INCBIN_U32("graphics/pokemon/wormadam/anim_front.4bpp.lz");
|
||||
const u32 gMonPalette_WormadamPlantCloak[] = INCBIN_U32("graphics/pokemon/wormadam/normal.gbapal.lz");
|
||||
const u32 gMonBackPic_WormadamPlantCloak[] = INCBIN_U32("graphics/pokemon/wormadam/back.4bpp.lz");
|
||||
const u32 gMonShinyPalette_WormadamPlantCloak[] = INCBIN_U32("graphics/pokemon/wormadam/shiny.gbapal.lz");
|
||||
const u8 gMonIcon_WormadamPlantCloak[] = INCBIN_U8("graphics/pokemon/wormadam/icon.4bpp");
|
||||
const u32 gMonFrontPic_WormadamPlant[] = INCBIN_U32("graphics/pokemon/wormadam/anim_front.4bpp.lz");
|
||||
const u32 gMonPalette_WormadamPlant[] = INCBIN_U32("graphics/pokemon/wormadam/normal.gbapal.lz");
|
||||
const u32 gMonBackPic_WormadamPlant[] = INCBIN_U32("graphics/pokemon/wormadam/back.4bpp.lz");
|
||||
const u32 gMonShinyPalette_WormadamPlant[] = INCBIN_U32("graphics/pokemon/wormadam/shiny.gbapal.lz");
|
||||
const u8 gMonIcon_WormadamPlant[] = INCBIN_U8("graphics/pokemon/wormadam/icon.4bpp");
|
||||
#if P_FOOTPRINTS
|
||||
const u8 gMonFootprint_Wormadam[] = INCBIN_U8("graphics/pokemon/wormadam/footprint.1bpp");
|
||||
#endif //P_FOOTPRINTS
|
||||
@ -14516,14 +14516,14 @@ const u32 gObjectEventPic_Substitute[] = INCBIN_COMP("graphics/pokemon/question_
|
||||
const u8 gMonIcon_WormadamTrash[] = INCBIN_U8("graphics/pokemon/wormadam/trash/icon.4bpp");
|
||||
|
||||
#if OW_POKEMON_OBJECT_EVENTS
|
||||
const u32 gObjectEventPic_WormadamPlantCloak[] = INCBIN_COMP("graphics/pokemon/wormadam/overworld.4bpp");
|
||||
const u32 gObjectEventPic_WormadamPlant[] = INCBIN_COMP("graphics/pokemon/wormadam/overworld.4bpp");
|
||||
const u32 gObjectEventPic_WormadamSandy[] = INCBIN_COMP("graphics/pokemon/wormadam/sandy/overworld.4bpp");
|
||||
const u32 gObjectEventPic_WormadamTrash[] = INCBIN_COMP("graphics/pokemon/wormadam/trash/overworld.4bpp");
|
||||
#if OW_PKMN_OBJECTS_SHARE_PALETTES == FALSE
|
||||
const u32 gOverworldPalette_WormadamPlantCloak[] = INCBIN_U32("graphics/pokemon/wormadam/overworld_normal.gbapal.lz");
|
||||
const u32 gOverworldPalette_WormadamPlant[] = INCBIN_U32("graphics/pokemon/wormadam/overworld_normal.gbapal.lz");
|
||||
const u32 gOverworldPalette_WormadamSandy[] = INCBIN_U32("graphics/pokemon/wormadam/sandy/overworld_normal.gbapal.lz");
|
||||
const u32 gOverworldPalette_WormadamTrash[] = INCBIN_U32("graphics/pokemon/wormadam/trash/overworld_normal.gbapal.lz");
|
||||
const u32 gShinyOverworldPalette_WormadamPlantCloak[] = INCBIN_U32("graphics/pokemon/wormadam/overworld_shiny.gbapal.lz");
|
||||
const u32 gShinyOverworldPalette_WormadamPlant[] = INCBIN_U32("graphics/pokemon/wormadam/overworld_shiny.gbapal.lz");
|
||||
const u32 gShinyOverworldPalette_WormadamSandy[] = INCBIN_U32("graphics/pokemon/wormadam/sandy/overworld_shiny.gbapal.lz");
|
||||
const u32 gShinyOverworldPalette_WormadamTrash[] = INCBIN_U32("graphics/pokemon/wormadam/trash/overworld_shiny.gbapal.lz");
|
||||
#endif //OW_PKMN_OBJECTS_SHARE_PALETTES
|
||||
|
||||
@ -3136,8 +3136,8 @@ static const struct SpriteFrameImage sPicTable_Bastiodon[] = {
|
||||
#endif //P_FAMILY_SHIELDON
|
||||
|
||||
#if P_FAMILY_BURMY
|
||||
static const struct SpriteFrameImage sPicTable_BurmyPlantCloak[] = {
|
||||
overworld_ascending_frames(gObjectEventPic_BurmyPlantCloak, 4, 4),
|
||||
static const struct SpriteFrameImage sPicTable_BurmyPlant[] = {
|
||||
overworld_ascending_frames(gObjectEventPic_BurmyPlant, 4, 4),
|
||||
};
|
||||
static const struct SpriteFrameImage sPicTable_BurmySandy[] = {
|
||||
overworld_ascending_frames(gObjectEventPic_BurmySandy, 4, 4),
|
||||
@ -3145,8 +3145,8 @@ static const struct SpriteFrameImage sPicTable_BurmySandy[] = {
|
||||
static const struct SpriteFrameImage sPicTable_BurmyTrash[] = {
|
||||
overworld_ascending_frames(gObjectEventPic_BurmyTrash, 4, 4),
|
||||
};
|
||||
static const struct SpriteFrameImage sPicTable_WormadamPlantCloak[] = {
|
||||
overworld_ascending_frames(gObjectEventPic_WormadamPlantCloak, 4, 4),
|
||||
static const struct SpriteFrameImage sPicTable_WormadamPlant[] = {
|
||||
overworld_ascending_frames(gObjectEventPic_WormadamPlant, 4, 4),
|
||||
};
|
||||
static const struct SpriteFrameImage sPicTable_WormadamSandy[] = {
|
||||
overworld_ascending_frames(gObjectEventPic_WormadamSandy, 4, 4),
|
||||
|
||||
@ -7717,7 +7717,7 @@ static const struct LevelUpMove sBurmyLevelUpLearnset[] = {
|
||||
LEVEL_UP_END
|
||||
};
|
||||
|
||||
static const struct LevelUpMove sWormadamPlantCloakLevelUpLearnset[] = {
|
||||
static const struct LevelUpMove sWormadamPlantLevelUpLearnset[] = {
|
||||
LEVEL_UP_MOVE( 1, MOVE_TACKLE),
|
||||
LEVEL_UP_MOVE(10, MOVE_PROTECT),
|
||||
LEVEL_UP_MOVE(15, MOVE_BUG_BITE),
|
||||
|
||||
@ -7961,7 +7961,7 @@ static const struct LevelUpMove sBurmyLevelUpLearnset[] = {
|
||||
LEVEL_UP_END
|
||||
};
|
||||
|
||||
static const struct LevelUpMove sWormadamPlantCloakLevelUpLearnset[] = {
|
||||
static const struct LevelUpMove sWormadamPlantLevelUpLearnset[] = {
|
||||
LEVEL_UP_MOVE( 1, MOVE_TACKLE),
|
||||
LEVEL_UP_MOVE(10, MOVE_PROTECT),
|
||||
LEVEL_UP_MOVE(15, MOVE_BUG_BITE),
|
||||
|
||||
@ -8187,7 +8187,7 @@ static const struct LevelUpMove sBurmyLevelUpLearnset[] = {
|
||||
LEVEL_UP_END
|
||||
};
|
||||
|
||||
static const struct LevelUpMove sWormadamPlantCloakLevelUpLearnset[] = {
|
||||
static const struct LevelUpMove sWormadamPlantLevelUpLearnset[] = {
|
||||
LEVEL_UP_MOVE( 1, MOVE_TACKLE),
|
||||
LEVEL_UP_MOVE(10, MOVE_PROTECT),
|
||||
LEVEL_UP_MOVE(15, MOVE_BUG_BITE),
|
||||
|
||||
@ -9461,7 +9461,7 @@ static const struct LevelUpMove sBurmyLevelUpLearnset[] = {
|
||||
LEVEL_UP_END
|
||||
};
|
||||
|
||||
static const struct LevelUpMove sWormadamPlantCloakLevelUpLearnset[] = {
|
||||
static const struct LevelUpMove sWormadamPlantLevelUpLearnset[] = {
|
||||
LEVEL_UP_MOVE( 1, MOVE_TACKLE),
|
||||
LEVEL_UP_MOVE(10, MOVE_PROTECT),
|
||||
LEVEL_UP_MOVE(15, MOVE_BUG_BITE),
|
||||
|
||||
@ -9920,7 +9920,7 @@ static const struct LevelUpMove sBurmyLevelUpLearnset[] = {
|
||||
LEVEL_UP_END
|
||||
};
|
||||
|
||||
static const struct LevelUpMove sWormadamPlantCloakLevelUpLearnset[] = {
|
||||
static const struct LevelUpMove sWormadamPlantLevelUpLearnset[] = {
|
||||
LEVEL_UP_MOVE( 1, MOVE_TACKLE),
|
||||
LEVEL_UP_MOVE(10, MOVE_PROTECT),
|
||||
LEVEL_UP_MOVE(15, MOVE_BUG_BITE),
|
||||
|
||||
@ -10382,7 +10382,7 @@ static const struct LevelUpMove sBurmyLevelUpLearnset[] = {
|
||||
LEVEL_UP_END
|
||||
};
|
||||
|
||||
static const struct LevelUpMove sWormadamPlantCloakLevelUpLearnset[] = {
|
||||
static const struct LevelUpMove sWormadamPlantLevelUpLearnset[] = {
|
||||
LEVEL_UP_MOVE( 1, MOVE_TACKLE),
|
||||
LEVEL_UP_MOVE(10, MOVE_PROTECT),
|
||||
LEVEL_UP_MOVE(15, MOVE_BUG_BITE),
|
||||
|
||||
@ -10610,7 +10610,7 @@ static const struct LevelUpMove sBurmyLevelUpLearnset[] = {
|
||||
LEVEL_UP_END
|
||||
};
|
||||
|
||||
static const struct LevelUpMove sWormadamPlantCloakLevelUpLearnset[] = {
|
||||
static const struct LevelUpMove sWormadamPlantLevelUpLearnset[] = {
|
||||
LEVEL_UP_MOVE( 0, MOVE_QUIVER_DANCE),
|
||||
LEVEL_UP_MOVE( 1, MOVE_QUIVER_DANCE),
|
||||
LEVEL_UP_MOVE( 1, MOVE_SUCKER_PUNCH),
|
||||
|
||||
@ -10633,7 +10633,7 @@ static const struct LevelUpMove sBurmyLevelUpLearnset[] = {
|
||||
LEVEL_UP_END
|
||||
};
|
||||
|
||||
static const struct LevelUpMove sWormadamPlantCloakLevelUpLearnset[] = {
|
||||
static const struct LevelUpMove sWormadamPlantLevelUpLearnset[] = {
|
||||
LEVEL_UP_MOVE( 0, MOVE_QUIVER_DANCE),
|
||||
LEVEL_UP_MOVE( 1, MOVE_QUIVER_DANCE),
|
||||
LEVEL_UP_MOVE( 1, MOVE_SUCKER_PUNCH),
|
||||
|
||||
@ -10291,7 +10291,7 @@ static const struct LevelUpMove sBurmyLevelUpLearnset[] = {
|
||||
LEVEL_UP_END
|
||||
};
|
||||
|
||||
static const struct LevelUpMove sWormadamPlantCloakLevelUpLearnset[] = {
|
||||
static const struct LevelUpMove sWormadamPlantLevelUpLearnset[] = {
|
||||
LEVEL_UP_MOVE( 0, MOVE_QUIVER_DANCE),
|
||||
LEVEL_UP_MOVE( 1, MOVE_QUIVER_DANCE),
|
||||
LEVEL_UP_MOVE( 1, MOVE_SUCKER_PUNCH),
|
||||
|
||||
@ -1656,29 +1656,29 @@ const struct SpeciesInfo gSpeciesInfoGen4[] =
|
||||
.pokemonOffset = 24,
|
||||
.trainerScale = 256,
|
||||
.trainerOffset = 0,
|
||||
.frontPic = gMonFrontPic_BurmyPlantCloak,
|
||||
.frontPic = gMonFrontPic_BurmyPlant,
|
||||
.frontPicSize = MON_COORDS_SIZE(32, 56),
|
||||
.frontPicYOffset = 13,
|
||||
.frontAnimFrames = sAnims_Burmy,
|
||||
.frontAnimId = ANIM_V_STRETCH,
|
||||
.enemyMonElevation = 10,
|
||||
.backPic = gMonBackPic_BurmyPlantCloak,
|
||||
.backPic = gMonBackPic_BurmyPlant,
|
||||
.backPicSize = MON_COORDS_SIZE(40, 56),
|
||||
.backPicYOffset = 6,
|
||||
.backAnimId = BACK_ANIM_H_SHAKE,
|
||||
.palette = gMonPalette_BurmyPlantCloak,
|
||||
.shinyPalette = gMonShinyPalette_BurmyPlantCloak,
|
||||
.iconSprite = gMonIcon_BurmyPlantCloak,
|
||||
.palette = gMonPalette_BurmyPlant,
|
||||
.shinyPalette = gMonShinyPalette_BurmyPlant,
|
||||
.iconSprite = gMonIcon_BurmyPlant,
|
||||
.iconPalIndex = 1,
|
||||
SHADOW(-1, 8, SHADOW_SIZE_S)
|
||||
FOOTPRINT(Burmy)
|
||||
OVERWORLD(
|
||||
sPicTable_BurmyPlantCloak,
|
||||
sPicTable_BurmyPlant,
|
||||
SIZE_32x32,
|
||||
SHADOW_SIZE_M,
|
||||
TRACKS_FOOT,
|
||||
gOverworldPalette_BurmyPlantCloak,
|
||||
gShinyOverworldPalette_BurmyPlantCloak
|
||||
gOverworldPalette_BurmyPlant,
|
||||
gShinyOverworldPalette_BurmyPlant
|
||||
)
|
||||
.tmIlliterate = TRUE,
|
||||
.levelUpLearnset = sBurmyLevelUpLearnset,
|
||||
@ -1858,32 +1858,32 @@ const struct SpeciesInfo gSpeciesInfoGen4[] =
|
||||
.pokemonOffset = 13,
|
||||
.trainerScale = 256,
|
||||
.trainerOffset = 0,
|
||||
.frontPic = gMonFrontPic_WormadamPlantCloak,
|
||||
.frontPic = gMonFrontPic_WormadamPlant,
|
||||
.frontPicSize = MON_COORDS_SIZE(48, 56),
|
||||
.frontPicYOffset = 10,
|
||||
.frontAnimFrames = sAnims_Wormadam,
|
||||
.frontAnimId = ANIM_SWING_CONVEX_FAST_SHORT,
|
||||
.enemyMonElevation = 8,
|
||||
.backPic = gMonBackPic_WormadamPlantCloak,
|
||||
.backPic = gMonBackPic_WormadamPlant,
|
||||
.backPicSize = MON_COORDS_SIZE(56, 64),
|
||||
.backPicYOffset = 2,
|
||||
.backAnimId = BACK_ANIM_V_SHAKE,
|
||||
.palette = gMonPalette_WormadamPlantCloak,
|
||||
.shinyPalette = gMonShinyPalette_WormadamPlantCloak,
|
||||
.iconSprite = gMonIcon_WormadamPlantCloak,
|
||||
.palette = gMonPalette_WormadamPlant,
|
||||
.shinyPalette = gMonShinyPalette_WormadamPlant,
|
||||
.iconSprite = gMonIcon_WormadamPlant,
|
||||
.iconPalIndex = 1,
|
||||
SHADOW(0, 9, SHADOW_SIZE_S)
|
||||
FOOTPRINT(Wormadam)
|
||||
OVERWORLD(
|
||||
sPicTable_WormadamPlantCloak,
|
||||
sPicTable_WormadamPlant,
|
||||
SIZE_32x32,
|
||||
SHADOW_SIZE_M,
|
||||
TRACKS_FOOT,
|
||||
gOverworldPalette_WormadamPlantCloak,
|
||||
gShinyOverworldPalette_WormadamPlantCloak
|
||||
gOverworldPalette_WormadamPlant,
|
||||
gShinyOverworldPalette_WormadamPlant
|
||||
)
|
||||
.levelUpLearnset = sWormadamPlantCloakLevelUpLearnset,
|
||||
.teachableLearnset = sWormadamPlantCloakTeachableLearnset,
|
||||
.levelUpLearnset = sWormadamPlantLevelUpLearnset,
|
||||
.teachableLearnset = sWormadamPlantTeachableLearnset,
|
||||
.formSpeciesIdTable = sWormadamFormSpeciesIdTable,
|
||||
},
|
||||
|
||||
|
||||
@ -18903,7 +18903,7 @@ static const u16 sBurmyTeachableLearnset[] = {
|
||||
MOVE_UNAVAILABLE,
|
||||
};
|
||||
|
||||
static const u16 sWormadamPlantCloakTeachableLearnset[] = {
|
||||
static const u16 sWormadamPlantTeachableLearnset[] = {
|
||||
MOVE_ATTRACT,
|
||||
MOVE_BULLET_SEED,
|
||||
MOVE_DIG,
|
||||
|
||||
@ -1154,11 +1154,17 @@ static bool8 TryProduceOrHatchEgg(struct DayCare *daycare)
|
||||
}
|
||||
|
||||
// Try to hatch Egg
|
||||
if (++daycare->stepCounter == ((P_EGG_CYCLE_LENGTH >= GEN_8) ? 127 : 255))
|
||||
daycare->stepCounter++;
|
||||
if (((P_EGG_CYCLE_LENGTH <= GEN_3 || P_EGG_CYCLE_LENGTH == GEN_7) && daycare->stepCounter >= 256)
|
||||
|| (P_EGG_CYCLE_LENGTH == GEN_4 && daycare->stepCounter >= 255)
|
||||
|| ((P_EGG_CYCLE_LENGTH == GEN_5 || P_EGG_CYCLE_LENGTH == GEN_6) && daycare->stepCounter >= 257)
|
||||
|| (P_EGG_CYCLE_LENGTH >= GEN_8 && daycare->stepCounter >= 128))
|
||||
{
|
||||
u32 eggCycles;
|
||||
u8 toSub = GetEggCyclesToSubtract();
|
||||
|
||||
daycare->stepCounter = 0;
|
||||
|
||||
for (i = 0; i < gPlayerPartyCount; i++)
|
||||
{
|
||||
if (!GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG))
|
||||
|
||||
@ -1415,9 +1415,17 @@ void ItemUseOutOfBattle_ZygardeCube(u8 taskId)
|
||||
|
||||
void ItemUseOutOfBattle_Fusion(u8 taskId)
|
||||
{
|
||||
gItemUseCB = ItemUseCB_Fusion;
|
||||
gTasks[taskId].data[0] = FALSE;
|
||||
SetUpItemUseCallback(taskId);
|
||||
if (!gTasks[taskId].tUsingRegisteredKeyItem)
|
||||
{
|
||||
gItemUseCB = ItemUseCB_Fusion;
|
||||
gTasks[taskId].data[0] = FALSE;
|
||||
SetUpItemUseCallback(taskId);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: handle key items with callbacks to menus allow to be used by registering them.
|
||||
DisplayDadsAdviceCannotUseItemMessage(taskId, gTasks[taskId].tUsingRegisteredKeyItem);
|
||||
}
|
||||
}
|
||||
|
||||
void Task_UseHoneyOnField(u8 taskId)
|
||||
@ -1567,10 +1575,18 @@ static void ItemUseOnFieldCB_TownMap(u8 taskId)
|
||||
|
||||
void ItemUseOutOfBattle_TownMap(u8 taskId)
|
||||
{
|
||||
sItemUseOnFieldCB = ItemUseOnFieldCB_TownMap;
|
||||
gFieldCallback = FieldCB_UseItemOnField;
|
||||
gBagMenu->newScreenCallback = CB2_ReturnToField;
|
||||
Task_FadeAndCloseBagMenu(taskId);
|
||||
if (!gTasks[taskId].tUsingRegisteredKeyItem)
|
||||
{
|
||||
sItemUseOnFieldCB = ItemUseOnFieldCB_TownMap;
|
||||
gFieldCallback = FieldCB_UseItemOnField;
|
||||
gBagMenu->newScreenCallback = CB2_ReturnToField;
|
||||
Task_FadeAndCloseBagMenu(taskId);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: handle key items with callbacks to menus allow to be used by registering them.
|
||||
DisplayDadsAdviceCannotUseItemMessage(taskId, gTasks[taskId].tUsingRegisteredKeyItem);
|
||||
}
|
||||
}
|
||||
|
||||
#undef tUsingRegisteredKeyItem
|
||||
|
||||
@ -2560,11 +2560,11 @@ static void CreatePokedexList(u8 dexMode, u8 order)
|
||||
}
|
||||
break;
|
||||
case ORDER_ALPHABETICAL:
|
||||
for (i = 0; i < NUM_SPECIES - 1; i++)
|
||||
for (i = 0; i < NATIONAL_DEX_COUNT; i++)
|
||||
{
|
||||
temp_dexNum = gPokedexOrder_Alphabetical[i];
|
||||
|
||||
if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN))
|
||||
if ((!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN))
|
||||
{
|
||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum;
|
||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;
|
||||
@ -2578,7 +2578,7 @@ static void CreatePokedexList(u8 dexMode, u8 order)
|
||||
{
|
||||
temp_dexNum = gPokedexOrder_Weight[i];
|
||||
|
||||
if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
||||
if ((!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
||||
{
|
||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum;
|
||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;
|
||||
@ -2592,7 +2592,7 @@ static void CreatePokedexList(u8 dexMode, u8 order)
|
||||
{
|
||||
temp_dexNum = gPokedexOrder_Weight[i];
|
||||
|
||||
if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
||||
if ((!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
||||
{
|
||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum;
|
||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;
|
||||
@ -2606,7 +2606,7 @@ static void CreatePokedexList(u8 dexMode, u8 order)
|
||||
{
|
||||
temp_dexNum = gPokedexOrder_Height[i];
|
||||
|
||||
if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
||||
if ((!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
||||
{
|
||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum;
|
||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;
|
||||
@ -2620,7 +2620,7 @@ static void CreatePokedexList(u8 dexMode, u8 order)
|
||||
{
|
||||
temp_dexNum = gPokedexOrder_Height[i];
|
||||
|
||||
if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
||||
if ((!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
||||
{
|
||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum;
|
||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;
|
||||
|
||||
@ -14,7 +14,7 @@ SINGLE_BATTLE_TEST("Anger Shell activates only if the target had more than 50% o
|
||||
PARAMETRIZE { hp = 254; activates = TRUE; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
PLAYER(SPECIES_KLAWF) { Ability(ABILITY_ANGER_SHELL); MaxHP(maxHp); HP(hp); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
@ -41,7 +41,7 @@ SINGLE_BATTLE_TEST("Anger Shell lowers Def/Sp.Def by 1 and raises Atk/Sp.Atk/Spd
|
||||
{
|
||||
u16 maxHp = 500;
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
PLAYER(SPECIES_KLAWF) { Ability(ABILITY_ANGER_SHELL); MaxHP(maxHp); HP(maxHp / 2 + 1); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_WATER_GUN].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_WATER_GUN));
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Battle Bond does not transform species other than Greninja")
|
||||
|
||||
@ -14,7 +14,7 @@ SINGLE_BATTLE_TEST("Berserk activates only if the target had more than 50% of it
|
||||
PARAMETRIZE { hp = 254; activates = TRUE; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
PLAYER(SPECIES_DRAMPA) { Ability(ABILITY_BERSERK); MaxHP(maxHp); HP(hp); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
@ -37,7 +37,7 @@ SINGLE_BATTLE_TEST("Berserk raises Sp.Atk by 1")
|
||||
{
|
||||
u16 maxHp = 500;
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
PLAYER(SPECIES_DRAMPA) { Ability(ABILITY_BERSERK); MaxHP(maxHp); HP(maxHp / 2 + 1); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
|
||||
@ -62,3 +62,37 @@ DOUBLE_BATTLE_TEST("Cotton Down drops speed by one of all other battlers on the
|
||||
EXPECT_EQ(opponentRight->statStages[STAT_SPEED], DEFAULT_STAT_STAGE - 1);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Cotton Down correctly gets blocked by stat reduction preventing abilities")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_METAGROSS) { Ability(ABILITY_CLEAR_BODY); }
|
||||
PLAYER(SPECIES_WYNAUT) { Item(ITEM_CLEAR_AMULET); }
|
||||
OPPONENT(SPECIES_ELDEGOSS) { Ability(ABILITY_COTTON_DOWN); }
|
||||
OPPONENT(SPECIES_CORVIKNIGHT) { Ability(ABILITY_MIRROR_ARMOR); }
|
||||
} WHEN {
|
||||
TURN { MOVE(playerLeft, MOVE_TACKLE, target: opponentLeft); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, playerLeft);
|
||||
ABILITY_POPUP(opponentLeft, ABILITY_COTTON_DOWN);
|
||||
NONE_OF {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft);
|
||||
MESSAGE("Metagross's Speed fell!");
|
||||
}
|
||||
ABILITY_POPUP(playerLeft, ABILITY_CLEAR_BODY);
|
||||
NONE_OF {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerRight);
|
||||
MESSAGE("Wynaut's Speed fell!");
|
||||
}
|
||||
MESSAGE("The effects of the Clear Amulet held by Wynaut prevents its stats from being lowered!");
|
||||
NONE_OF {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentRight);
|
||||
MESSAGE("The opposing Corviknight's Speed fell!");
|
||||
}
|
||||
ABILITY_POPUP(opponentRight, ABILITY_MIRROR_ARMOR);
|
||||
} THEN {
|
||||
EXPECT_EQ(playerLeft->statStages[STAT_SPEED], DEFAULT_STAT_STAGE);
|
||||
EXPECT_EQ(playerRight->statStages[STAT_SPEED], DEFAULT_STAT_STAGE);
|
||||
EXPECT_EQ(opponentRight->statStages[STAT_SPEED], DEFAULT_STAT_STAGE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_WATER_GUN].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_WATER_GUN));
|
||||
ASSUME(gMovesInfo[MOVE_WATER_GUN].type == TYPE_WATER);
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ SINGLE_BATTLE_TEST("Desolate Land blocks damaging Water-type moves")
|
||||
DOUBLE_BATTLE_TEST("Desolate Land blocks damaging Water-type moves and prints the message only once with moves hitting multiple targets")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_SURF].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_SURF));
|
||||
ASSUME(gMovesInfo[MOVE_SURF].type == TYPE_WATER);
|
||||
ASSUME(gMovesInfo[MOVE_SURF].target == MOVE_TARGET_FOES_AND_ALLY);
|
||||
PLAYER(SPECIES_GROUDON) {Item(ITEM_RED_ORB); {Speed(5);}}
|
||||
|
||||
@ -10,11 +10,11 @@ SINGLE_BATTLE_TEST("Electromorphosis sets up Charge when hit by any move")
|
||||
PARAMETRIZE {move = MOVE_GUST; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(gMovesInfo[MOVE_GUST].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_GUST));
|
||||
ASSUME(gMovesInfo[MOVE_GUST].category == DAMAGE_CATEGORY_SPECIAL);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].category == DAMAGE_CATEGORY_PHYSICAL);
|
||||
ASSUME(gMovesInfo[MOVE_THUNDER_SHOCK].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_THUNDER_SHOCK));
|
||||
ASSUME(gMovesInfo[MOVE_THUNDER_SHOCK].type == TYPE_ELECTRIC);
|
||||
|
||||
PLAYER(SPECIES_BELLIBOLT) { Ability(ABILITY_ELECTROMORPHOSIS); Speed(10); }
|
||||
|
||||
@ -42,7 +42,7 @@ DOUBLE_BATTLE_TEST("Frisk triggers for player in a Double Battle after switching
|
||||
PARAMETRIZE { target = playerRight; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_POUND].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_POUND));
|
||||
PLAYER(SPECIES_WOBBUFFET) { HP(1); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { HP(1); }
|
||||
PLAYER(SPECIES_FURRET) { Ability(ABILITY_FRISK); };
|
||||
@ -65,7 +65,7 @@ DOUBLE_BATTLE_TEST("Frisk triggers for opponent in a Double Battle after switchi
|
||||
PARAMETRIZE { target = opponentRight; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_POUND].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_POUND));
|
||||
PLAYER(SPECIES_WYNAUT) { Item(ITEM_POTION); }
|
||||
PLAYER(SPECIES_WYNAUT);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { HP(1); }
|
||||
|
||||
@ -92,6 +92,7 @@ SINGLE_BATTLE_TEST("(Gulp Missile) Transformed Cramorant deal 1/4 of damage oppo
|
||||
MESSAGE("The opposing Wobbuffet's Defense fell!");
|
||||
} THEN {
|
||||
EXPECT_EQ(gulpMissileDamage, opponent->maxHP / 4);
|
||||
EXPECT_EQ(opponent->statStages[STAT_DEF], DEFAULT_STAT_STAGE - 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,3 +134,59 @@ SINGLE_BATTLE_TEST("(Gulp Missile) triggers even if the user is fainted by oppos
|
||||
STATUS_ICON(opponent, paralysis: TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("(Gulp Missile) Transformed Cramorant Gulping lowers defense but is prevented by stat reduction preventing abilities")
|
||||
{
|
||||
u32 species, ability;
|
||||
PARAMETRIZE { species = SPECIES_METAGROSS; ability = ABILITY_CLEAR_BODY; }
|
||||
PARAMETRIZE { species = SPECIES_CORVIKNIGHT; ability = ABILITY_MIRROR_ARMOR; }
|
||||
PARAMETRIZE { species = SPECIES_CHATOT; ability = ABILITY_BIG_PECKS; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_CRAMORANT) { Ability(ABILITY_GULP_MISSILE); }
|
||||
OPPONENT(species) { Ability(ability); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_SURF); MOVE(opponent, MOVE_TACKLE); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SURF, player);
|
||||
HP_BAR(opponent);
|
||||
ABILITY_POPUP(player, ABILITY_GULP_MISSILE);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
|
||||
HP_BAR(player);
|
||||
ABILITY_POPUP(player, ABILITY_GULP_MISSILE);
|
||||
ABILITY_POPUP(opponent, ability);
|
||||
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
||||
} THEN {
|
||||
EXPECT_EQ(opponent->statStages[STAT_DEF], DEFAULT_STAT_STAGE);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("(Gulp Missile) Transformed Cramorant Gulping lowers defense and still triggers other effects after")
|
||||
{
|
||||
// Make sure attacker and target are correct after triggering the ability
|
||||
u32 ability;
|
||||
PARAMETRIZE { ability = ABILITY_INFILTRATOR; }
|
||||
PARAMETRIZE { ability = ABILITY_CLEAR_BODY; }
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].makesContact == TRUE);
|
||||
PLAYER(SPECIES_CRAMORANT) { Ability(ABILITY_GULP_MISSILE); Item(ITEM_ROCKY_HELMET); }
|
||||
OPPONENT(SPECIES_DRAGAPULT) { Ability(ability); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_SURF); MOVE(opponent, MOVE_TACKLE); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SURF, player);
|
||||
HP_BAR(opponent);
|
||||
ABILITY_POPUP(player, ABILITY_GULP_MISSILE);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
|
||||
HP_BAR(player);
|
||||
ABILITY_POPUP(player, ABILITY_GULP_MISSILE);
|
||||
HP_BAR(opponent);
|
||||
if (ability == ABILITY_INFILTRATOR) {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
||||
MESSAGE("The opposing Dragapult's Defense fell!");
|
||||
} else {
|
||||
ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY);
|
||||
}
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player);
|
||||
HP_BAR(opponent);
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ SINGLE_BATTLE_TEST("Innards Out deal dmg on fainting equal to the amount of dmg
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { HP(70); SpAttack(1000); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
ASSUME(gMovesInfo[MOVE_PSYCHIC].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_PSYCHIC));
|
||||
ASSUME(gMovesInfo[MOVE_PSYCHIC].category == DAMAGE_CATEGORY_SPECIAL);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_PSYCHIC); SEND_OUT(player, 1); if (hp == 100) { SEND_OUT(opponent, 1); } }
|
||||
@ -32,7 +32,7 @@ SINGLE_BATTLE_TEST("Innards Out does not trigger after Gastro Acid has been used
|
||||
PLAYER(SPECIES_PYUKUMUKU) { HP(1); Ability(ABILITY_INNARDS_OUT); }
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
ASSUME(gMovesInfo[MOVE_PSYCHIC].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_PSYCHIC));
|
||||
ASSUME(gMovesInfo[MOVE_GASTRO_ACID].effect == EFFECT_GASTRO_ACID);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_GASTRO_ACID); }
|
||||
@ -55,7 +55,7 @@ SINGLE_BATTLE_TEST("Innards Out does not damage Magic Guard Pokemon")
|
||||
PLAYER(SPECIES_PYUKUMUKU) { HP(1); Ability(ABILITY_INNARDS_OUT); }
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_CLEFABLE) { Ability(ABILITY_MAGIC_GUARD); }
|
||||
ASSUME(gMovesInfo[MOVE_PSYCHIC].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_PSYCHIC));
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_PSYCHIC); SEND_OUT(player, 1); }
|
||||
} SCENE {
|
||||
|
||||
@ -5,7 +5,7 @@ SINGLE_BATTLE_TEST("Magician does not get self-damage recoil after stealing Life
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gItemsInfo[ITEM_LIFE_ORB].holdEffect == HOLD_EFFECT_LIFE_ORB);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
PLAYER(SPECIES_DELPHOX) { Ability(ABILITY_MAGICIAN); Item(ITEM_NONE); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_LIFE_ORB); }
|
||||
} WHEN {
|
||||
|
||||
@ -23,7 +23,24 @@ SINGLE_BATTLE_TEST("Pickup grants an item used by another Pokémon")
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Pickup doesn't grant the user their item")
|
||||
WILD_BATTLE_TEST("Pickup grants an item used by itself in wild battles (Gen 9)")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(B_PICKUP_WILD >= GEN_9);
|
||||
PLAYER(SPECIES_ZIGZAGOON) { Ability(ABILITY_PICKUP); MaxHP(100); HP(51); Item(ITEM_SITRUS_BERRY); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_TACKLE); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
|
||||
ABILITY_POPUP(player, ABILITY_PICKUP);
|
||||
MESSAGE("Zigzagoon found one Sitrus Berry!");
|
||||
} THEN {
|
||||
EXPECT_EQ(player->item, ITEM_SITRUS_BERRY);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Pickup doesn't grant the user their item outside wild battles")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_EMBER].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_EMBER));
|
||||
ASSUME(gMovesInfo[MOVE_EMBER].type == TYPE_FIRE);
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ SINGLE_BATTLE_TEST("Primordial Sea blocks damaging Fire-type moves")
|
||||
DOUBLE_BATTLE_TEST("Primordial Sea blocks damaging Fire-type moves and prints the message only once with moves hitting multiple targets")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_ERUPTION].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_ERUPTION));
|
||||
ASSUME(gMovesInfo[MOVE_ERUPTION].type == TYPE_FIRE);
|
||||
ASSUME(gMovesInfo[MOVE_ERUPTION].target == MOVE_TARGET_BOTH);
|
||||
PLAYER(SPECIES_KYOGRE) {Item(ITEM_BLUE_ORB); {Speed(5);}}
|
||||
|
||||
@ -4,13 +4,13 @@
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_FURY_CUTTER].type == TYPE_BUG);
|
||||
ASSUME(gMovesInfo[MOVE_FURY_CUTTER].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_FURY_CUTTER));
|
||||
ASSUME(gMovesInfo[MOVE_FEINT_ATTACK].type == TYPE_DARK);
|
||||
ASSUME(gMovesInfo[MOVE_FEINT_ATTACK].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_FEINT_ATTACK));
|
||||
ASSUME(gMovesInfo[MOVE_SHADOW_PUNCH].type == TYPE_GHOST);
|
||||
ASSUME(gMovesInfo[MOVE_SHADOW_PUNCH].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_SHADOW_PUNCH));
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].type == TYPE_NORMAL);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Rattled boosts speed by 1 when hit by Bug, Dark or Ghost type move")
|
||||
|
||||
@ -24,8 +24,8 @@ SINGLE_BATTLE_TEST("Stamina raises Defense by 1 when hit by a move")
|
||||
PARAMETRIZE {move = MOVE_GUST; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(gMovesInfo[MOVE_GUST].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_GUST));
|
||||
ASSUME(gMovesInfo[MOVE_GUST].category == DAMAGE_CATEGORY_SPECIAL);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].category == DAMAGE_CATEGORY_PHYSICAL);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_STAMINA); }
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(gMovesInfo[MOVE_GUST].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_GUST));
|
||||
ASSUME(gMovesInfo[MOVE_GUST].category == DAMAGE_CATEGORY_SPECIAL);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].category == DAMAGE_CATEGORY_PHYSICAL);
|
||||
ASSUME(B_WEAK_ARMOR_SPEED >= GEN_7);
|
||||
|
||||
@ -3,13 +3,13 @@
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_THUNDERBOLT].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_THUNDERBOLT));
|
||||
ASSUME(gMovesInfo[MOVE_THUNDERBOLT].type == TYPE_ELECTRIC);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(gMovesInfo[MOVE_AIR_CUTTER].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_AIR_CUTTER));
|
||||
ASSUME(gMovesInfo[MOVE_AIR_CUTTER].target == MOVE_TARGET_BOTH);
|
||||
ASSUME(gMovesInfo[MOVE_AIR_CUTTER].windMove == TRUE);
|
||||
ASSUME(gMovesInfo[MOVE_PETAL_BLIZZARD].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_PETAL_BLIZZARD));
|
||||
ASSUME(gMovesInfo[MOVE_PETAL_BLIZZARD].target == MOVE_TARGET_FOES_AND_ALLY);
|
||||
ASSUME(gMovesInfo[MOVE_PETAL_BLIZZARD].windMove == TRUE);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].windMove == FALSE);
|
||||
|
||||
@ -120,7 +120,7 @@ DOUBLE_BATTLE_TEST("Primal reversion's order is determined by Speed - player fas
|
||||
SINGLE_BATTLE_TEST("Primal reversion happens after a mon is sent out after a mon is fainted")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
PLAYER(SPECIES_WOBBUFFET) {HP(1); }
|
||||
PLAYER(SPECIES_GROUDON) { Item(ITEM_RED_ORB); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
@ -156,7 +156,7 @@ SINGLE_BATTLE_TEST("Primal reversion happens after a mon is switched in")
|
||||
SINGLE_BATTLE_TEST("Primal reversion happens after a switch-in caused by Eject Button")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
ASSUME(gItemsInfo[ITEM_EJECT_BUTTON].holdEffect == HOLD_EFFECT_EJECT_BUTTON);
|
||||
PLAYER(SPECIES_WOBBUFFET) {Item(ITEM_EJECT_BUTTON); }
|
||||
PLAYER(SPECIES_GROUDON) { Item(ITEM_RED_ORB); }
|
||||
@ -177,7 +177,7 @@ SINGLE_BATTLE_TEST("Primal reversion happens after a switch-in caused by Eject B
|
||||
SINGLE_BATTLE_TEST("Primal reversion happens after a switch-in caused by Red Card")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
ASSUME(gItemsInfo[ITEM_RED_CARD].holdEffect == HOLD_EFFECT_RED_CARD);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
PLAYER(SPECIES_GROUDON) { Item(ITEM_RED_ORB); }
|
||||
|
||||
33
test/battle/hold_effect/room_service.c
Normal file
33
test/battle/hold_effect/room_service.c
Normal file
@ -0,0 +1,33 @@
|
||||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gItemsInfo[ITEM_ROOM_SERVICE].holdEffect == HOLD_EFFECT_ROOM_SERVICE);
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Room Serive decreases the holder's seep by one stage")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_U_TURN].effect == EFFECT_HIT_ESCAPE);
|
||||
ASSUME(gMovesInfo[MOVE_TRICK_ROOM].effect == EFFECT_TRICK_ROOM);
|
||||
ASSUME(gMovesInfo[MOVE_EXPLOSION].effect == EFFECT_EXPLOSION);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
PLAYER(SPECIES_EKANS) { Ability(ABILITY_INTIMIDATE); Item(ITEM_ROOM_SERVICE); }
|
||||
OPPONENT(SPECIES_WYNAUT) { HP(1); }
|
||||
OPPONENT(SPECIES_WYNAUT);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_TRICK_ROOM); }
|
||||
TURN { MOVE(player, MOVE_EXPLOSION); SEND_OUT(player, 1); SEND_OUT(opponent, 1); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TRICK_ROOM, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_EXPLOSION, player);
|
||||
HP_BAR(opponent);
|
||||
MESSAGE("2 sent out Wynaut!");
|
||||
ABILITY_POPUP(player, ABILITY_INTIMIDATE);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
} THEN {
|
||||
EXPECT_EQ(player->statStages[STAT_SPEED], DEFAULT_STAT_STAGE - 1);
|
||||
}
|
||||
}
|
||||
@ -125,4 +125,20 @@ SINGLE_BATTLE_TEST("Draining Kiss recovers 75% of the damage dealt")
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Absorb does not drain any HP if user flinched")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_FAKE_OUT); MOVE(player, MOVE_ABSORB); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_FAKE_OUT, opponent);
|
||||
NONE_OF {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_ABSORB, player);
|
||||
MESSAGE("The opposing Wobbuffet had its energy drained!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TO_DO_BATTLE_TEST("Absorb recovers 50% of the damage dealt to a Substitute");
|
||||
|
||||
@ -203,5 +203,79 @@ DOUBLE_BATTLE_TEST("Ally Switch works if ally used two-turn move like Dig")
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Ally switch swaps sky drop targets if being used by partner")
|
||||
{
|
||||
u8 visibility;
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_SKY_DROP].effect == EFFECT_SKY_DROP);
|
||||
PLAYER(SPECIES_FEAROW) { Speed(100); }
|
||||
PLAYER(SPECIES_XATU) { Speed(150); }
|
||||
OPPONENT(SPECIES_ARON) { Speed(25); Ability(ABILITY_STURDY); }
|
||||
OPPONENT(SPECIES_WYNAUT) { Speed(30); }
|
||||
} WHEN {
|
||||
TURN { MOVE(playerLeft, MOVE_SKY_DROP, target: opponentLeft); }
|
||||
TURN { MOVE(playerRight, MOVE_ALLY_SWITCH); SKIP_TURN(playerLeft); MOVE(opponentRight, MOVE_MUD_SPORT); MOVE(opponentLeft, MOVE_IRON_DEFENSE); }
|
||||
} SCENE {
|
||||
MESSAGE("Fearow used Sky Drop!");
|
||||
MESSAGE("Fearow took the opposing Aron into the sky!");
|
||||
// turn 2
|
||||
MESSAGE("Xatu used Ally Switch!");
|
||||
MESSAGE("Xatu and Fearow switched places!");
|
||||
MESSAGE("Fearow used Sky Drop!");
|
||||
HP_BAR(opponentLeft);
|
||||
MESSAGE("The opposing Wynaut used Mud Sport!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_MUD_SPORT, opponentRight);
|
||||
MESSAGE("The opposing Aron used Iron Defense!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_IRON_DEFENSE, opponentLeft);
|
||||
} THEN {
|
||||
// all battlers should be visible
|
||||
visibility = gBattleSpritesDataPtr->battlerData[0].invisible;
|
||||
EXPECT_EQ(visibility, 0);
|
||||
visibility = gBattleSpritesDataPtr->battlerData[1].invisible;
|
||||
EXPECT_EQ(visibility, 0);
|
||||
visibility = gBattleSpritesDataPtr->battlerData[2].invisible;
|
||||
EXPECT_EQ(visibility, 0);
|
||||
visibility = gBattleSpritesDataPtr->battlerData[3].invisible;
|
||||
EXPECT_EQ(visibility, 0);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Ally switch swaps opposing sky drop targets if partner is being held in the air")
|
||||
{
|
||||
u8 visibility;
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_SKY_DROP].effect == EFFECT_SKY_DROP);
|
||||
PLAYER(SPECIES_ARON) { Speed(25); Ability(ABILITY_STURDY); }
|
||||
PLAYER(SPECIES_WYNAUT) { Speed(30); }
|
||||
OPPONENT(SPECIES_FEAROW) { Speed(100); }
|
||||
OPPONENT(SPECIES_XATU) { Speed(150); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponentLeft, MOVE_SKY_DROP, target: playerLeft); }
|
||||
TURN { MOVE(opponentRight, MOVE_ALLY_SWITCH); SKIP_TURN(opponentLeft); MOVE(playerRight, MOVE_MUD_SPORT); MOVE(playerLeft, MOVE_IRON_DEFENSE); }
|
||||
} SCENE {
|
||||
MESSAGE("The opposing Fearow used Sky Drop!");
|
||||
MESSAGE("The opposing Fearow took Aron into the sky!");
|
||||
// turn 2
|
||||
MESSAGE("The opposing Xatu used Ally Switch!");
|
||||
MESSAGE("The opposing Xatu and the opposing Fearow switched places!");
|
||||
MESSAGE("The opposing Fearow used Sky Drop!");
|
||||
HP_BAR(playerLeft);
|
||||
MESSAGE("Wynaut used Mud Sport!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_MUD_SPORT, playerRight);
|
||||
MESSAGE("Aron used Iron Defense!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_IRON_DEFENSE, playerLeft);
|
||||
} THEN {
|
||||
// all battlers should be visible
|
||||
visibility = gBattleSpritesDataPtr->battlerData[0].invisible;
|
||||
EXPECT_EQ(visibility, 0);
|
||||
visibility = gBattleSpritesDataPtr->battlerData[1].invisible;
|
||||
EXPECT_EQ(visibility, 0);
|
||||
visibility = gBattleSpritesDataPtr->battlerData[2].invisible;
|
||||
EXPECT_EQ(visibility, 0);
|
||||
visibility = gBattleSpritesDataPtr->battlerData[3].invisible;
|
||||
EXPECT_EQ(visibility, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Triple Battles required to test
|
||||
//TO_DO_BATTLE_TEST("Ally Switch fails if the user is in the middle of the field in a Triple Battle");
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_THUNDERBOLT].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_THUNDERBOLT));
|
||||
ASSUME(gMovesInfo[MOVE_THUNDERBOLT].type == TYPE_ELECTRIC);
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ SINGLE_BATTLE_TEST("Charge's effect is removed regardless if the next move is El
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].type != TYPE_ELECTRIC);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
|
||||
@ -86,17 +86,39 @@ SINGLE_BATTLE_TEST("Shed Tail's HP cost doesn't trigger effects that trigger on
|
||||
}
|
||||
}
|
||||
|
||||
// Passes for some reason even though it seems there is some code missing
|
||||
// AI_SINGLE_BATTLE_TEST("AI will use Shed Tail to pivot to another mon while in damage stalemate with player")
|
||||
// {
|
||||
// KNOWN_FAILING; // missing AI code
|
||||
// GIVEN {
|
||||
// AI_FLAGS(AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_CHECK_VIABILITY | AI_FLAG_TRY_TO_FAINT);
|
||||
// PLAYER(SPECIES_WOBBUFFET) { Speed(100); Ability(ABILITY_RUN_AWAY); Moves(MOVE_TACKLE, MOVE_CELEBRATE); }
|
||||
// OPPONENT(SPECIES_WOBBUFFET) { Speed(50); Ability(ABILITY_RUN_AWAY); Moves(MOVE_CONFUSION, MOVE_SHED_TAIL); }
|
||||
// OPPONENT(SPECIES_SCIZOR) { Speed(101); Moves(MOVE_CELEBRATE, MOVE_X_SCISSOR); }
|
||||
// } WHEN {
|
||||
// TURN { MOVE(player, MOVE_TACKLE); EXPECT_MOVE(opponent, MOVE_CONFUSION); }
|
||||
// TURN { MOVE(player, MOVE_TACKLE); EXPECT_MOVE(opponent, MOVE_SHED_TAIL); }
|
||||
// }
|
||||
// }
|
||||
AI_SINGLE_BATTLE_TEST("AI will use Shed Tail to pivot to another mon while in damage stalemate with player")
|
||||
{
|
||||
KNOWN_FAILING; // missing AI code
|
||||
GIVEN {
|
||||
AI_FLAGS(AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_CHECK_VIABILITY | AI_FLAG_TRY_TO_FAINT);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Speed(100); Ability(ABILITY_RUN_AWAY); Moves(MOVE_TACKLE, MOVE_CELEBRATE); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(50); Ability(ABILITY_RUN_AWAY); Moves(MOVE_CONFUSION, MOVE_SHED_TAIL); }
|
||||
OPPONENT(SPECIES_SCIZOR) { Speed(101); Moves(MOVE_CELEBRATE, MOVE_X_SCISSOR); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_TACKLE); EXPECT_MOVE(opponent, MOVE_CONFUSION); }
|
||||
TURN { MOVE(player, MOVE_TACKLE); EXPECT_MOVE(opponent, MOVE_SHED_TAIL); }
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Shed Tail creates a Substitute with 1/4 of user maximum health")
|
||||
{
|
||||
u32 hp;
|
||||
PARAMETRIZE { hp = 160; }
|
||||
PARAMETRIZE { hp = 164; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_DRAGON_RAGE].argument == 40);
|
||||
ASSUME(gMovesInfo[MOVE_DRAGON_RAGE].effect == EFFECT_FIXED_DAMAGE_ARG);
|
||||
PLAYER(SPECIES_BULBASAUR) { MaxHP(hp); }
|
||||
PLAYER(SPECIES_BULBASAUR);
|
||||
OPPONENT(SPECIES_CHARMANDER);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_SHED_TAIL); MOVE(opponent, MOVE_DRAGON_RAGE); SEND_OUT(player, 1); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SHED_TAIL, player);
|
||||
if (hp == 160)
|
||||
MESSAGE("Bulbasaur's substitute faded!");
|
||||
else
|
||||
NOT MESSAGE("Bulbasaur's substitute faded!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -271,3 +271,31 @@ SINGLE_BATTLE_TEST("Sticky Web is placed on the correct side after Memento")
|
||||
MESSAGE("A sticky web has been laid out on the ground around your team!");
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Sticky Web setter has their speed lowered with Mirror Armor even after Ally Switch")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_SQUIRTLE);
|
||||
PLAYER(SPECIES_CHARMANDER);
|
||||
PLAYER(SPECIES_CORVIKNIGHT) { Ability(ABILITY_MIRROR_ARMOR); Item(ITEM_IRON_BALL); } // Iron Ball, so that flying type Corviknight is affected by Sticky Web.
|
||||
OPPONENT(SPECIES_CATERPIE);
|
||||
OPPONENT(SPECIES_NATU);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponentLeft, MOVE_STICKY_WEB); }
|
||||
TURN { MOVE(opponentRight, MOVE_ALLY_SWITCH); }
|
||||
TURN { SWITCH(playerRight, 2); }
|
||||
} SCENE {
|
||||
// Turn 1 - set up sticky web
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_STICKY_WEB, opponentLeft);
|
||||
MESSAGE("A sticky web has been laid out on the ground around your team!");
|
||||
// Turn 2 - ally switch
|
||||
MESSAGE("The opposing Natu used Ally Switch!");
|
||||
// turn 3 - send our corviknight
|
||||
SEND_IN_MESSAGE("Corviknight");
|
||||
MESSAGE("Corviknight was caught in a sticky web!");
|
||||
ABILITY_POPUP(playerRight, ABILITY_MIRROR_ARMOR);
|
||||
// sticky web setter - caterpie (now opponentRight) gets speed lowered
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentRight);
|
||||
MESSAGE("The opposing Caterpie's Speed fell!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,3 +99,24 @@ AI_SINGLE_BATTLE_TEST("AI will try to remove hazards if slower then target even
|
||||
TURN { EXPECT_MOVE(opponent, MOVE_TIDY_UP); }
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Tidy Up raises Attack and Speed by one after clearing hazards on opposing field")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_STEALTH_ROCK); }
|
||||
TURN { MOVE(player, MOVE_TIDY_UP); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_STEALTH_ROCK, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TIDY_UP, player);
|
||||
MESSAGE("Tidying up complete!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
MESSAGE("Wobbuffet's Attack rose!");
|
||||
MESSAGE("Wobbuffet's Speed rose!");
|
||||
} THEN {
|
||||
EXPECT_EQ(player->statStages[STAT_ATK], DEFAULT_STAT_STAGE + 1);
|
||||
EXPECT_EQ(player->statStages[STAT_SPEED], DEFAULT_STAT_STAGE + 1);
|
||||
}
|
||||
}
|
||||
|
||||
129
test/battle/move_effect_secondary/steal_item.c
Normal file
129
test/battle/move_effect_secondary/steal_item.c
Normal file
@ -0,0 +1,129 @@
|
||||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_THIEF, MOVE_EFFECT_STEAL_ITEM) == TRUE);
|
||||
ASSUME(MoveHasAdditionalEffect(MOVE_COVET, MOVE_EFFECT_STEAL_ITEM) == TRUE);
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Thief and Covet steal target's held item")
|
||||
{
|
||||
u32 move;
|
||||
PARAMETRIZE { move = MOVE_THIEF; }
|
||||
PARAMETRIZE { move = MOVE_COVET; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_HYPER_POTION); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, move); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, player);
|
||||
HP_BAR(opponent);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_ITEM_STEAL, opponent);
|
||||
} THEN {
|
||||
EXPECT_EQ(player->item, ITEM_HYPER_POTION);
|
||||
EXPECT_EQ(opponent->item, ITEM_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Thief and Covet steal player's held item if opponent is a trainer")
|
||||
{
|
||||
u32 move;
|
||||
PARAMETRIZE { move = MOVE_THIEF; }
|
||||
PARAMETRIZE { move = MOVE_COVET; }
|
||||
GIVEN {
|
||||
ASSUME(B_TRAINERS_KNOCK_OFF_ITEMS == TRUE);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_HYPER_POTION); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, move); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, opponent);
|
||||
HP_BAR(player);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_ITEM_STEAL, player);
|
||||
} THEN {
|
||||
EXPECT_EQ(opponent->item, ITEM_HYPER_POTION);
|
||||
EXPECT_EQ(player->item, ITEM_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
WILD_BATTLE_TEST("Thief and Covet don't steal player's held item if opponent is a wild mon")
|
||||
{
|
||||
u32 move;
|
||||
PARAMETRIZE { move = MOVE_THIEF; }
|
||||
PARAMETRIZE { move = MOVE_COVET; }
|
||||
GIVEN {
|
||||
ASSUME(B_TRAINERS_KNOCK_OFF_ITEMS == TRUE);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_HYPER_POTION); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, move); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, opponent);
|
||||
HP_BAR(player);
|
||||
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_ITEM_STEAL, player);
|
||||
} THEN {
|
||||
EXPECT_EQ(player->item, ITEM_HYPER_POTION);
|
||||
EXPECT_EQ(opponent->item, ITEM_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Thief and Covet don't steal target's held item if user is holding an item")
|
||||
{
|
||||
u32 move;
|
||||
PARAMETRIZE { move = MOVE_THIEF; }
|
||||
PARAMETRIZE { move = MOVE_COVET; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_POTION); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_HYPER_POTION); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, move); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, player);
|
||||
HP_BAR(opponent);
|
||||
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_ITEM_STEAL, opponent);
|
||||
} THEN {
|
||||
EXPECT_EQ(player->item, ITEM_POTION);
|
||||
EXPECT_EQ(opponent->item, ITEM_HYPER_POTION);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Thief and Covet don't steal target's held item if target has no item")
|
||||
{
|
||||
u32 move;
|
||||
PARAMETRIZE { move = MOVE_THIEF; }
|
||||
PARAMETRIZE { move = MOVE_COVET; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, move); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, player);
|
||||
HP_BAR(opponent);
|
||||
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_ITEM_STEAL, opponent);
|
||||
}
|
||||
}
|
||||
|
||||
// Test can't currently verify if the item is sent to Bag
|
||||
WILD_BATTLE_TEST("Thief and Covet steal target's held item and it's added to Bag in wild battles (Gen 9)")
|
||||
{
|
||||
u32 move;
|
||||
PARAMETRIZE { move = MOVE_THIEF; }
|
||||
PARAMETRIZE { move = MOVE_COVET; }
|
||||
GIVEN {
|
||||
ASSUME(B_STEAL_WILD_ITEMS >= GEN_9);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_HYPER_POTION); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, move); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, player);
|
||||
HP_BAR(opponent);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_ITEM_STEAL, opponent);
|
||||
} THEN {
|
||||
EXPECT_EQ(player->item, ITEM_NONE);
|
||||
EXPECT_EQ(opponent->item, ITEM_NONE);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user