This commit is contained in:
RoamerX 2025-04-19 15:49:04 +08:00
commit 7d93ac7d20
17 changed files with 93 additions and 68 deletions

View File

@ -12326,8 +12326,6 @@ gBattleAnimMove_NaturesMadness::
loadspritegfx ANIM_TAG_SPARKLE_2 @stars PinkStarsTemplate
loadspritegfx ANIM_TAG_PINK_PETAL @pink PinkRingTemplate, PinkStarsTemplate
loadspritegfx ANIM_TAG_ICE_CHUNK @blue green CrystalsTemplate
loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @charge
loadspritegfx ANIM_TAG_TEAL_ALERT @charge particles
monbg ANIM_ATTACKER
setalpha 14, 8
delay 0x1
@ -12374,6 +12372,8 @@ gBattleAnimMove_NaturesMadness::
createsprite gNaturesMadnessGrayRingTemplate, ANIM_ATTACKER, 40, 0x0, 0x0, 0x1, 0x0
playsewithpan SE_M_HEAL_BELL, SOUND_PAN_ATTACKER
waitforvisualfinish
unloadspritegfx ANIM_TAG_ECLIPSING_ORB
loadspritegfx ANIM_TAG_SPARKLE_2
playsewithpan SE_M_EXPLOSION, SOUND_PAN_ATTACKER
createsprite gNaturesMadnessPinkRingTemplate, ANIM_ATTACKER, 3, 0x0, 0x0, 0x1, 0x0, 0x1F, 0x8
createsprite gNaturesMadnessPinkStarsTemplate, ANIM_ATTACKER, 2, 0xa, 0xa, 0x19, 0x1
@ -16168,7 +16168,6 @@ SandsearStormFireSpin:
gBattleAnimMove_LunarBlessing::
loadspritegfx ANIM_TAG_BLUE_STAR
loadspritegfx ANIM_TAG_MOON
loadspritegfx ANIM_TAG_SPARKLE_2
loadspritegfx ANIM_TAG_GUARD_RING
loadspritegfx ANIM_TAG_SMALL_EMBER @Yellow colour for ring
monbg ANIM_ATK_PARTNER
@ -31487,13 +31486,15 @@ gBattleAnimMove_BlackHoleEclipse::
delay 0x8
createsprite gBlackHoleEclipseHoleShrinkSpriteTemplate, ANIM_ATTACKER, 2, 0x0, 0x0, ANIM_TARGET, 0x0
waitforvisualfinish
unloadspritegfx ANIM_TAG_THIN_RING
unloadspritegfx ANIM_TAG_ICE_CHUNK
loadspritegfx ANIM_TAG_SPARKLE_4 @detect
createsprite gTargetTwinkleSpriteTemplate, ANIM_ATTACKER, 13, 0x0, 0x0, ANIM_TARGET @detect star
delay 0x2
unloadspritegfx ANIM_TAG_VERTICAL_HEX @red
unloadspritegfx ANIM_TAG_SHADOW_BALL
unloadspritegfx ANIM_TAG_THIN_RING
unloadspritegfx ANIM_TAG_ICE_CHUNK
unloadspritegfx ANIM_TAG_BLACK_BALL_2
unloadspritegfx ANIM_TAG_FOCUS_ENERGY
loadspritegfx ANIM_TAG_EXPLOSION_2
call BlackHoleEclipseExplosion
createvisualtask AnimTask_BlendBattleAnimPal, 0xa, (F_PAL_BG | F_PAL_BATTLERS_2), 0x1, 0x0, 0x10, 0x7fff @ bg to white pal

View File

@ -6010,7 +6010,6 @@ BattleScript_RoarSuccessSwitch_Ret:
swapattackerwithtarget @ continuation of RedCardActivates
restoretarget
restoreattacker
restoresavedmove
setbyte sSWITCH_CASE, B_SWITCH_NORMAL
return
@ -9492,7 +9491,6 @@ BattleScript_RedCardActivationNoSwitch::
removeitem BS_SCRIPTING
restoretarget
restoreattacker
restoresavedmove
return
BattleScript_RedCardActivates::
@ -9515,6 +9513,7 @@ BattleScript_RedCardIngrainContinue:
waitmessage B_WAIT_TIME_LONG
removeitem BS_SCRIPTING
restoretarget
restoreattacker
return
BattleScript_RedCardSuctionCups:
printstring STRINGID_PKMNANCHORSITSELFWITH

View File

@ -834,7 +834,6 @@ struct BattleStruct
u8 usedMicleBerry;
struct MessageStatus slideMessageStatus;
u8 trainerSlideSpriteIds[MAX_BATTLERS_COUNT];
u16 savedMove; // backup current move for mid-turn switching, e.g. Red Card
u16 opponentMonCanTera:6;
u16 opponentMonCanDynamax:6;
u16 padding:4;

View File

@ -3698,8 +3698,8 @@ void SetMoveEffect(bool32 primary, bool32 certain)
flags = MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN;
else
flags = 0;
if (mirrorArmorReflected)
flags |= (STAT_CHANGE_ALLOW_PTR * !affectsUser);
if (mirrorArmorReflected && !affectsUser)
flags |= STAT_CHANGE_ALLOW_PTR;
else
flags |= STAT_CHANGE_UPDATE_MOVE_EFFECT;
@ -3753,9 +3753,12 @@ void SetMoveEffect(bool32 primary, bool32 certain)
flags = 0;
if (mirrorArmorReflected && !affectsUser)
flags |= STAT_CHANGE_ALLOW_PTR;
else
flags |= STAT_CHANGE_UPDATE_MOVE_EFFECT;
if (ChangeStatBuffs(SET_STAT_BUFF_VALUE(2) | STAT_BUFF_NEGATIVE,
gBattleScripting.moveEffect - MOVE_EFFECT_ATK_MINUS_2 + 1,
flags | STAT_CHANGE_UPDATE_MOVE_EFFECT, gBattlescriptCurrInstr + 1) == STAT_CHANGE_DIDNT_WORK)
flags, gBattlescriptCurrInstr + 1) == STAT_CHANGE_DIDNT_WORK)
{
if (!mirrorArmorReflected)
gBattlescriptCurrInstr++;
@ -7196,7 +7199,6 @@ static void Cmd_moveend(void)
gLastUsedItem = gBattleMons[battler].item;
SaveBattlerTarget(battler); // save battler with red card
SaveBattlerAttacker(gBattlerAttacker);
gBattleStruct->savedMove = gCurrentMove;
gBattleScripting.battler = battler;
gEffectBattler = gBattlerAttacker;
if (moveEffect == EFFECT_HIT_ESCAPE)
@ -7411,7 +7413,11 @@ static void Cmd_moveend(void)
gBattleScripting.moveendState++;
break;
case MOVEEND_DANCER: // Special case because it's so annoying
if (IsDanceMove(gCurrentMove) && !gBattleStruct->snatchedMoveIsUsed)
if (gCurrentMove == MOVE_NONE)
originallyUsedMove = gChosenMove; // Fallback to chosen move in case attacker is switched out in the middle of an attack resolution (eg red card)
else
originallyUsedMove = gCurrentMove;
if (IsDanceMove(originallyUsedMove) && !gBattleStruct->snatchedMoveIsUsed)
{
u32 battler, nextDancer = 0;
bool32 hasDancerTriggered = FALSE;
@ -7445,7 +7451,7 @@ static void Cmd_moveend(void)
nextDancer = battler | 0x4;
}
}
if (nextDancer && AbilityBattleEffects(ABILITYEFFECT_MOVE_END_OTHER, nextDancer & 0x3, 0, 0, 0))
if (nextDancer && AbilityBattleEffects(ABILITYEFFECT_MOVE_END_OTHER, nextDancer & 0x3, 0, 0, originallyUsedMove))
effect = TRUE;
}
}
@ -17993,6 +17999,7 @@ void BS_TryActivateGulpMissile(void)
if (!(gBattleStruct->moveResultFlags[gBattlerTarget] & MOVE_RESULT_NO_EFFECT)
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
&& IsBattlerAlive(gBattlerAttacker)
&& IsBattlerTurnDamaged(gBattlerTarget)
&& gBattleMons[gBattlerTarget].species != SPECIES_CRAMORANT
&& GetBattlerAbility(gBattlerTarget) == ABILITY_GULP_MISSILE)
@ -18775,15 +18782,3 @@ void BS_SetSteelsurge(void)
gBattlescriptCurrInstr = cmd->nextInstr;
}
}
void BS_RestoreSavedMove(void)
{
NATIVE_ARGS();
if (gBattleStruct->savedMove == MOVE_NONE)
DebugPrintfLevel(MGBA_LOG_WARN, "restoresavedmove was called with no move saved!");
gCurrentMove = gBattleStruct->savedMove;
gBattleStruct->savedMove = MOVE_NONE;
gBattlescriptCurrInstr = cmd->nextInstr;
}

View File

@ -2351,7 +2351,7 @@ u8 DoBattlerEndTurnEffects(void)
gBattleScripting.animArg1 = gBattlerTarget;
gBattleScripting.animArg2 = gBattlerAttacker;
gBattleStruct->moveDamage[gBattlerAttacker] = max(1, GetNonDynamaxMaxHP(battler) / 8);
gBattleStruct->moveDamage[gBattlerTarget] = GetDrainedBigRootHp(gBattlerAttacker, gBattleStruct->moveDamage[gBattlerAttacker]);
gBattleStruct->moveDamage[gBattlerTarget] = GetDrainedBigRootHp(gBattlerTarget, gBattleStruct->moveDamage[gBattlerAttacker]);
gHitMarker |= HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE;
if (GetBattlerAbility(battler) == ABILITY_LIQUID_OOZE)
{
@ -6091,7 +6091,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
if (!(gBattleStruct->moveResultFlags[gBattlerTarget] & MOVE_RESULT_NO_EFFECT)
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
&& IsBattlerTurnDamaged(gBattlerTarget)
&& IsBattlerAlive(battler)
&& IsBattlerAlive(gBattlerAttacker)
&& gBattleMons[gBattlerTarget].species != SPECIES_CRAMORANT)
{
if (GetBattlerAbility(gBattlerAttacker) != ABILITY_MAGIC_GUARD)
@ -6271,7 +6271,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
{
case ABILITY_DANCER:
if (IsBattlerAlive(battler)
&& IsDanceMove(gCurrentMove)
&& IsDanceMove(move)
&& !gSpecialStatuses[battler].dancerUsedMove
&& gBattlerAttacker != battler)
{
@ -6279,7 +6279,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
gSpecialStatuses[battler].dancerUsedMove = TRUE;
gSpecialStatuses[battler].dancerOriginalTarget = gBattleStruct->moveTarget[battler] | 0x4;
gBattlerAttacker = gBattlerAbility = battler;
gCalledMove = gCurrentMove;
gCalledMove = move;
// Set the target to the original target of the mon that first used a Dance move
gBattlerTarget = gBattleScripting.savedBattler & 0x3;

View File

@ -3806,10 +3806,10 @@ const struct SpeciesInfo gSpeciesInfoGen2[] =
.abilities = { ABILITY_LEVITATE, ABILITY_NONE, ABILITY_NONE }, \
.bodyColor = BODY_COLOR_BLACK, \
.noFlip = _noFlip, \
.speciesName = _("Unown"), \
.speciesName = _("未知图腾"), \
.cryId = CRY_UNOWN, \
.natDexNum = NATIONAL_DEX_UNOWN, \
.categoryName = _("Symbol"), \
.categoryName = _("象征"), \
.height = 5, \
.weight = 50, \
.description = gUnownPokedexText, \

View File

@ -2166,10 +2166,10 @@ const struct SpeciesInfo gSpeciesInfoGen4[] =
.eggGroups = MON_EGG_GROUPS(EGG_GROUP_BUG), \
.abilities = { ABILITY_SWARM, ABILITY_NONE, ABILITY_TINTED_LENS }, \
.bodyColor = BODY_COLOR_YELLOW, \
.speciesName = _("Mothim"), \
.speciesName = _("绅士蛾"), \
.cryId = CRY_MOTHIM, \
.natDexNum = NATIONAL_DEX_MOTHIM, \
.categoryName = _("Moth"), \
.categoryName = _("蓑衣蛾"), \
.height = 9, \
.weight = 233, \
.description = gMothimPokedexText, \
@ -7253,10 +7253,10 @@ const struct SpeciesInfo gSpeciesInfoGen4[] =
.eggGroups = MON_EGG_GROUPS(EGG_GROUP_NO_EGGS_DISCOVERED), \
.abilities = { ABILITY_MULTITYPE, ABILITY_NONE, ABILITY_NONE }, \
.bodyColor = BODY_COLOR_WHITE, \
.speciesName = _("Arceus"), \
.speciesName = _("阿尔宙斯"), \
.cryId = CRY_ARCEUS, \
.natDexNum = NATIONAL_DEX_ARCEUS, \
.categoryName = _("Alpha"), \
.categoryName = _("创造"), \
.height = 32, \
.weight = 3200, \
.description = gArceusPokedexText, \

View File

@ -13143,10 +13143,10 @@ const struct SpeciesInfo gSpeciesInfoGen5[] =
.eggGroups = MON_EGG_GROUPS(EGG_GROUP_NO_EGGS_DISCOVERED), \
.abilities = { ABILITY_DOWNLOAD, ABILITY_NONE, ABILITY_NONE }, \
.bodyColor = BODY_COLOR_PURPLE, \
.speciesName = _("Genesect"), \
.speciesName = _("盖诺赛克特"), \
.cryId = CRY_GENESECT, \
.natDexNum = NATIONAL_DEX_GENESECT, \
.categoryName = _("Paleozoic"), \
.categoryName = _("古生代"), \
.height = 15, \
.weight = 825, \
.description = gGenesectPokedexText, \

View File

@ -1095,10 +1095,10 @@ const struct SpeciesInfo gSpeciesInfoGen6[] =
.eggGroups = MON_EGG_GROUPS(EGG_GROUP_BUG), \
.abilities = { ABILITY_SHIELD_DUST, ABILITY_COMPOUND_EYES, ABILITY_FRIEND_GUARD }, \
.bodyColor = BODY_COLOR_BLACK, \
.speciesName = _("Scatterbug"), \
.speciesName = _("粉蝶虫"), \
.cryId = CRY_SCATTERBUG, \
.natDexNum = NATIONAL_DEX_SCATTERBUG, \
.categoryName = _("Scatterdust"), \
.categoryName = _("喷粉"), \
.height = 3, \
.weight = 25, \
.description = gScatterbugPokedexText, \
@ -1178,10 +1178,10 @@ const struct SpeciesInfo gSpeciesInfoGen6[] =
.eggGroups = MON_EGG_GROUPS(EGG_GROUP_BUG), \
.abilities = { ABILITY_SHED_SKIN, ABILITY_NONE, ABILITY_FRIEND_GUARD }, \
.bodyColor = BODY_COLOR_BLACK, \
.speciesName = _("Spewpa"), \
.speciesName = _("粉蝶蛹"), \
.cryId = CRY_SPEWPA, \
.natDexNum = NATIONAL_DEX_SPEWPA, \
.categoryName = _("Scatterdust"), \
.categoryName = _("喷粉"), \
.height = 3, \
.weight = 84, \
.description = gSpewpaPokedexText, \
@ -1261,10 +1261,10 @@ const struct SpeciesInfo gSpeciesInfoGen6[] =
.eggGroups = MON_EGG_GROUPS(EGG_GROUP_BUG), \
.abilities = { ABILITY_SHIELD_DUST, ABILITY_COMPOUND_EYES, ABILITY_FRIEND_GUARD }, \
.bodyColor = color, \
.speciesName = _("Vivillon"), \
.speciesName = _("彩粉蝶"), \
.cryId = CRY_VIVILLON, \
.natDexNum = NATIONAL_DEX_VIVILLON, \
.categoryName = _("Scale"), \
.categoryName = _("鳞粉"), \
.height = 12, \
.weight = 170, \
.pokemonScale = 282, \
@ -1630,10 +1630,10 @@ const struct SpeciesInfo gSpeciesInfoGen6[] =
.eggGroups = MON_EGG_GROUPS(EGG_GROUP_FAIRY), \
.abilities = { ABILITY_FLOWER_VEIL, ABILITY_NONE, ABILITY_SYMBIOSIS }, \
.bodyColor = BODY_COLOR_WHITE, \
.speciesName = _("Flabébé"), \
.speciesName = _("花蓓蓓"), \
.cryId = CRY_FLABEBE, \
.natDexNum = NATIONAL_DEX_FLABEBE, \
.categoryName = _("Single Bloom"), \
.categoryName = _("单朵"), \
.height = 1, \
.weight = 1, \
.pokemonScale = 682, \
@ -1722,9 +1722,9 @@ const struct SpeciesInfo gSpeciesInfoGen6[] =
.growthRate = GROWTH_MEDIUM_FAST, \
.abilities = { ABILITY_FLOWER_VEIL, ABILITY_NONE, ABILITY_SYMBIOSIS }, \
.bodyColor = BODY_COLOR_WHITE, \
.speciesName = _("Floette"), \
.speciesName = _("花叶蒂"), \
.natDexNum = NATIONAL_DEX_FLOETTE, \
.categoryName = _("Single Bloom"), \
.categoryName = _("单朵"), \
.height = 2, \
.weight = 9, \
.pokemonScale = 682, \
@ -1856,10 +1856,10 @@ const struct SpeciesInfo gSpeciesInfoGen6[] =
.eggGroups = MON_EGG_GROUPS(EGG_GROUP_FAIRY), \
.abilities = { ABILITY_FLOWER_VEIL, ABILITY_NONE, ABILITY_SYMBIOSIS }, \
.bodyColor = BODY_COLOR_WHITE, \
.speciesName = _("Florges"), \
.speciesName = _("花洁夫人"), \
.cryId = CRY_FLORGES, \
.natDexNum = NATIONAL_DEX_FLORGES, \
.categoryName = _("Garden"), \
.categoryName = _("花园"), \
.height = 11, \
.weight = 100, \
.pokemonScale = 320, \
@ -2231,10 +2231,10 @@ const struct SpeciesInfo gSpeciesInfoGen6[] =
.abilities = { ABILITY_FUR_COAT, ABILITY_NONE, ABILITY_NONE }, \
.bodyColor = BODY_COLOR_WHITE, \
.noFlip = _noFlip, \
.speciesName = _("Furfrou"), \
.speciesName = _("多丽米亚"), \
.cryId = CRY_FURFROU, \
.natDexNum = NATIONAL_DEX_FURFROU, \
.categoryName = _("Poodle"), \
.categoryName = _("贵宾犬"), \
.height = 12, \
.weight = 280, \
.description = gFurfrouPokedexText, \

View File

@ -4261,10 +4261,10 @@ const struct SpeciesInfo gSpeciesInfoGen7[] =
.eggGroups = MON_EGG_GROUPS(EGG_GROUP_NO_EGGS_DISCOVERED), \
.abilities = { ABILITY_RKS_SYSTEM, ABILITY_NONE, ABILITY_NONE }, \
.bodyColor = BODY_COLOR_GRAY, \
.speciesName = _("Silvally"), \
.speciesName = _("银伴战兽"), \
.cryId = CRY_SILVALLY, \
.natDexNum = NATIONAL_DEX_SILVALLY, \
.categoryName = _("Synthetic"), \
.categoryName = _("人工"), \
.height = 23, \
.weight = 1005, \
.description = (type == TYPE_NORMAL \
@ -4342,10 +4342,10 @@ const struct SpeciesInfo gSpeciesInfoGen7[] =
.abilities = { ABILITY_SHIELDS_DOWN, ABILITY_NONE, ABILITY_NONE }, \
.bodyColor = color, \
.noFlip = TRUE, \
.speciesName = _("Minior"), \
.speciesName = _("小陨星"), \
.cryId = CRY_MINIOR, \
.natDexNum = NATIONAL_DEX_MINIOR, \
.categoryName = _("Meteor"), \
.categoryName = _("流星"), \
.height = 3, \
.pokemonScale = 530, \
.pokemonOffset = 13, \
@ -4899,10 +4899,10 @@ const struct SpeciesInfo gSpeciesInfoGen7[] =
.eggGroups = MON_EGG_GROUPS(EGG_GROUP_AMORPHOUS),
.abilities = { ABILITY_DISGUISE, ABILITY_NONE, ABILITY_NONE },
.bodyColor = BODY_COLOR_YELLOW,
.speciesName = _("Mimikyu"),
.speciesName = _("谜拟丘"),
.cryId = CRY_MIMIKYU,
.natDexNum = NATIONAL_DEX_MIMIKYU,
.categoryName = _("Disguise"),
.categoryName = _("画皮"),
.height = 24,
.weight = 28,
.description = gMimikyuBustedPokedexText,

View File

@ -4714,10 +4714,10 @@ const struct SpeciesInfo gSpeciesInfoGen8[] =
#define ALCREMIE_REGULAR_SPECIES_INFO(sweet, cream, color) \
{ \
ALCREMIE_MISC_INFO(color), \
.speciesName = _("Alcremie"), \
.speciesName = _("霜奶仙"), \
.cryId = CRY_ALCREMIE, \
.natDexNum = NATIONAL_DEX_ALCREMIE, \
.categoryName = _("Cream"), \
.categoryName = _("鲜奶油"), \
.height = 3, \
.weight = 5, \
.description = gAlcremie ##cream##PokedexText, \

View File

@ -7382,10 +7382,10 @@ const struct SpeciesInfo gSpeciesInfoGen9[] =
.eggGroups = MON_EGG_GROUPS(EGG_GROUP_NO_EGGS_DISCOVERED), \
.abilities = { ability, ABILITY_NONE }, \
.bodyColor = color, \
.speciesName = _("Ogerpon"), \
.speciesName = _("厄诡椪"), \
.cryId = CRY_OGERPON, \
.natDexNum = NATIONAL_DEX_OGERPON, \
.categoryName = _("Mask"), \
.categoryName = _("面具"), \
.height = 12, \
.weight = 398, \
.description = gOgerpon##Form1##MaskPokedexText, \

View File

@ -336,6 +336,11 @@ static void ApplyDaycareExperience(struct Pokemon *mon)
CalculateMonStats(mon);
}
static u32 GetExpAtLevelCap(struct Pokemon *mon)
{
return gExperienceTables[gSpeciesInfo[GetMonData(mon, MON_DATA_SPECIES)].growthRate][GetCurrentLevelCap()];
}
static u16 TakeSelectedPokemonFromDaycare(struct DaycareMon *daycareMon)
{
u32 species;
@ -358,6 +363,9 @@ static u16 TakeSelectedPokemonFromDaycare(struct DaycareMon *daycareMon)
if (GetMonData(&pokemon, MON_DATA_LEVEL) < GetCurrentLevelCap())
{
experience = GetMonData(&pokemon, MON_DATA_EXP) + daycareMon->steps;
u32 maxExp = GetExpAtLevelCap(&pokemon);
if (experience > maxExp)
experience = maxExp;
SetMonData(&pokemon, MON_DATA_EXP, &experience);
ApplyDaycareExperience(&pokemon);
}

View File

@ -47,7 +47,7 @@ SINGLE_BATTLE_TEST("Color Change does not change the type of a dual-type Pokemon
ANIMATION(ANIM_TYPE_MOVE, MOVE_PSYCHO_CUT, player);
NONE_OF {
ABILITY_POPUP(opponent, ABILITY_COLOR_CHANGE);
MESSAGE("The opposing Xatu's Color Change made it the Psychic type!");
MESSAGE("The opposing Slowbro's Color Change made it the Psychic type!");
}
}
}

View File

@ -190,3 +190,13 @@ SINGLE_BATTLE_TEST("(Gulp Missile) Transformed Cramorant Gulping lowers defense
HP_BAR(opponent);
}
}
SINGLE_BATTLE_TEST("Gulp Missile triggered by explosion doesn't freeze the game")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_CRAMORANT);
} WHEN {
TURN { MOVE(opponent, MOVE_SURF); MOVE(player, MOVE_EXPLOSION); }
}
}

View File

@ -211,3 +211,18 @@ SINGLE_BATTLE_TEST("Mirror Armor reflects Tangling Hair speed drop")
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
}
}
SINGLE_BATTLE_TEST("Mirror Armor reflects Obstruct defense drop")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_CORVIKNIGHT) { Ability(ABILITY_MIRROR_ARMOR); }
} WHEN {
TURN { MOVE(player, MOVE_OBSTRUCT); MOVE(opponent, MOVE_TACKLE); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_OBSTRUCT, player);
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
ABILITY_POPUP(opponent, ABILITY_MIRROR_ARMOR);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
}
}

View File

@ -30,8 +30,6 @@ SINGLE_BATTLE_TEST("Big Root increases healing from absorbing moves", s16 damage
SINGLE_BATTLE_TEST("Big Root increases the damage restored from Leech Seed, Ingrain and Aqua Ring", s16 heal, s16 damage)
{
KNOWN_FAILING;
u32 item;
u32 move;
@ -53,9 +51,9 @@ SINGLE_BATTLE_TEST("Big Root increases the damage restored from Leech Seed, Ingr
HP_BAR(player, captureDamage: &results[i].heal);
} FINALLY {
EXPECT_EQ(results[0].damage, results[1].damage); // Damage is unaffected
EXPECT_MUL_EQ(results[1].heal, Q_4_12(5234 / 4096), results[0].heal);
EXPECT_MUL_EQ(results[3].heal, Q_4_12(5234 / 4096), results[2].heal);
EXPECT_MUL_EQ(results[5].heal, Q_4_12(5234 / 4096), results[4].heal);
EXPECT_MUL_EQ(results[0].heal, Q_4_12(1.3), results[1].heal);
EXPECT_MUL_EQ(results[2].heal, Q_4_12(1.3), results[3].heal);
EXPECT_MUL_EQ(results[4].heal, Q_4_12(1.3), results[5].heal);
}
}