Embody Aspect fixes (#4439)

* Embody Aspect fixes

* Fix tests

* Update battle_util.c
This commit is contained in:
kittenchilly 2024-04-27 12:35:42 -05:00 committed by GitHub
parent 7355eb99a5
commit fc9d5c289a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 41 additions and 41 deletions

View file

@ -326,10 +326,10 @@
#define ABILITY_MYCELIUM_MIGHT 298
#define ABILITY_HOSPITALITY 299
#define ABILITY_MINDS_EYE 300
#define ABILITY_EMBODY_ASPECT_TEAL 301
#define ABILITY_EMBODY_ASPECT_HEARTHFLAME 302
#define ABILITY_EMBODY_ASPECT_WELLSPRING 303
#define ABILITY_EMBODY_ASPECT_CORNERSTONE 304
#define ABILITY_EMBODY_ASPECT_TEAL_MASK 301
#define ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK 302
#define ABILITY_EMBODY_ASPECT_WELLSPRING_MASK 303
#define ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK 304
#define ABILITY_TOXIC_CHAIN 305
#define ABILITY_SUPERSWEET_SYRUP 306
#define ABILITY_TERA_SHIFT 307

View file

@ -4737,22 +4737,22 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
effect++;
}
break;
case ABILITY_EMBODY_ASPECT_TEAL:
case ABILITY_EMBODY_ASPECT_HEARTHFLAME:
case ABILITY_EMBODY_ASPECT_WELLSPRING:
case ABILITY_EMBODY_ASPECT_CORNERSTONE:
case ABILITY_EMBODY_ASPECT_TEAL_MASK:
case ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK:
case ABILITY_EMBODY_ASPECT_WELLSPRING_MASK:
case ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK:
if (!gSpecialStatuses[battler].switchInAbilityDone)
{
u32 stat = STAT_SPATK;
u32 stat;
if (gLastUsedAbility == ABILITY_EMBODY_ASPECT_TEAL)
stat = STAT_SPATK;
else if (gLastUsedAbility == ABILITY_EMBODY_ASPECT_HEARTHFLAME)
if (gLastUsedAbility == ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK)
stat = STAT_ATK;
else if (gLastUsedAbility == ABILITY_EMBODY_ASPECT_WELLSPRING)
else if (gLastUsedAbility == ABILITY_EMBODY_ASPECT_WELLSPRING_MASK)
stat = STAT_SPDEF;
else if (gLastUsedAbility == ABILITY_EMBODY_ASPECT_CORNERSTONE)
else if (gLastUsedAbility == ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK)
stat = STAT_DEF;
else //ABILITY_EMBODY_ASPECT_TEAL_MASK
stat = STAT_SPEED;
if (CompareStat(battler, stat, MAX_STAT_STAGE, CMP_EQUAL))
break;

View file

@ -2472,7 +2472,7 @@ const struct Ability gAbilitiesInfo[ABILITIES_COUNT] =
.breakable = TRUE,
},
[ABILITY_EMBODY_ASPECT_TEAL] =
[ABILITY_EMBODY_ASPECT_TEAL_MASK] =
{
#if B_EXPANDED_ABILITY_NAMES == TRUE
.name = _("Embody Aspect"),
@ -2487,7 +2487,7 @@ const struct Ability gAbilitiesInfo[ABILITIES_COUNT] =
.failsOnImposter = TRUE,
},
[ABILITY_EMBODY_ASPECT_HEARTHFLAME] =
[ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK] =
{
#if B_EXPANDED_ABILITY_NAMES == TRUE
.name = _("Embody Aspect"),
@ -2502,7 +2502,7 @@ const struct Ability gAbilitiesInfo[ABILITIES_COUNT] =
.failsOnImposter = TRUE,
},
[ABILITY_EMBODY_ASPECT_WELLSPRING] =
[ABILITY_EMBODY_ASPECT_WELLSPRING_MASK] =
{
#if B_EXPANDED_ABILITY_NAMES == TRUE
.name = _("Embody Aspect"),
@ -2517,7 +2517,7 @@ const struct Ability gAbilitiesInfo[ABILITIES_COUNT] =
.failsOnImposter = TRUE,
},
[ABILITY_EMBODY_ASPECT_CORNERSTONE] =
[ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK] =
{
#if B_EXPANDED_ABILITY_NAMES == TRUE
.name = _("Embody Aspect"),

View file

@ -6314,10 +6314,10 @@ const struct SpeciesInfo gSpeciesInfoGen9[] =
[SPECIES_OGERPON_HEARTHFLAME_MASK] = OGERPON_SPECIES_INFO(HearthflameMask, TYPE_FIRE, ABILITY_MOLD_BREAKER, BODY_COLOR_RED, 0),
[SPECIES_OGERPON_CORNERSTONE_MASK] = OGERPON_SPECIES_INFO(CornerstoneMask, TYPE_ROCK, ABILITY_STURDY, BODY_COLOR_GRAY, 0),
#if P_TERA_FORMS
[SPECIES_OGERPON_TEAL_MASK_TERA] = OGERPON_SPECIES_INFO(TealMask, TYPE_GRASS, ABILITY_EMBODY_ASPECT_TEAL, BODY_COLOR_GREEN, 1),
[SPECIES_OGERPON_WELLSPRING_MASK_TERA] = OGERPON_SPECIES_INFO(WellspringMask, TYPE_WATER, ABILITY_EMBODY_ASPECT_WELLSPRING, BODY_COLOR_BLUE, 0),
[SPECIES_OGERPON_HEARTHFLAME_MASK_TERA] = OGERPON_SPECIES_INFO(HearthflameMask, TYPE_FIRE, ABILITY_EMBODY_ASPECT_HEARTHFLAME, BODY_COLOR_RED, 0),
[SPECIES_OGERPON_CORNERSTONE_MASK_TERA] = OGERPON_SPECIES_INFO(CornerstoneMask, TYPE_ROCK, ABILITY_EMBODY_ASPECT_CORNERSTONE, BODY_COLOR_GRAY, 0),
[SPECIES_OGERPON_TEAL_MASK_TERA] = OGERPON_SPECIES_INFO(TealMask, TYPE_GRASS, ABILITY_EMBODY_ASPECT_TEAL_MASK, BODY_COLOR_GREEN, 1),
[SPECIES_OGERPON_WELLSPRING_MASK_TERA] = OGERPON_SPECIES_INFO(WellspringMask, TYPE_WATER, ABILITY_EMBODY_ASPECT_WELLSPRING_MASK, BODY_COLOR_BLUE, 0),
[SPECIES_OGERPON_HEARTHFLAME_MASK_TERA] = OGERPON_SPECIES_INFO(HearthflameMask, TYPE_FIRE, ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK, BODY_COLOR_RED, 0),
[SPECIES_OGERPON_CORNERSTONE_MASK_TERA] = OGERPON_SPECIES_INFO(CornerstoneMask, TYPE_ROCK, ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK, BODY_COLOR_GRAY, 0),
#endif //P_TERA_FORMS
#endif //P_FAMILY_OGERPON

View file

@ -2,14 +2,14 @@
#include "test/battle.h"
SINGLE_BATTLE_TEST("Embodoy Aspect raises a stat depending on the users form by one stage")
SINGLE_BATTLE_TEST("Embody Aspect raises a stat depending on the users form by one stage")
{
u16 species, ability;
PARAMETRIZE { species = SPECIES_OGERPON_TEAL_MASK_TERA; ability = ABILITY_EMBODY_ASPECT_TEAL; }
PARAMETRIZE { species = SPECIES_OGERPON_HEARTHFLAME_MASK_TERA; ability = ABILITY_EMBODY_ASPECT_HEARTHFLAME; }
PARAMETRIZE { species = SPECIES_OGERPON_WELLSPRING_MASK_TERA; ability = ABILITY_EMBODY_ASPECT_WELLSPRING; }
PARAMETRIZE { species = SPECIES_OGERPON_CORNERSTONE_MASK_TERA; ability = ABILITY_EMBODY_ASPECT_CORNERSTONE; }
PARAMETRIZE { species = SPECIES_OGERPON_TEAL_MASK_TERA; ability = ABILITY_EMBODY_ASPECT_TEAL_MASK; }
PARAMETRIZE { species = SPECIES_OGERPON_HEARTHFLAME_MASK_TERA; ability = ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK; }
PARAMETRIZE { species = SPECIES_OGERPON_WELLSPRING_MASK_TERA; ability = ABILITY_EMBODY_ASPECT_WELLSPRING_MASK; }
PARAMETRIZE { species = SPECIES_OGERPON_CORNERSTONE_MASK_TERA; ability = ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK; }
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
@ -19,32 +19,32 @@ SINGLE_BATTLE_TEST("Embodoy Aspect raises a stat depending on the users form by
} SCENE {
ABILITY_POPUP(opponent, ability);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
if (ability == ABILITY_EMBODY_ASPECT_TEAL)
MESSAGE("Foe Ogerpon's Embody Aspect raised its Sp. Atk!");
else if (ability == ABILITY_EMBODY_ASPECT_HEARTHFLAME)
if (ability == ABILITY_EMBODY_ASPECT_TEAL_MASK)
MESSAGE("Foe Ogerpon's Embody Aspect raised its Speed!");
else if (ability == ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK)
MESSAGE("Foe Ogerpon's Embody Aspect raised its Attack!");
else if (ability == ABILITY_EMBODY_ASPECT_WELLSPRING)
else if (ability == ABILITY_EMBODY_ASPECT_WELLSPRING_MASK)
MESSAGE("Foe Ogerpon's Embody Aspect raised its Sp. Def!");
else if (ability == ABILITY_EMBODY_ASPECT_CORNERSTONE)
else if (ability == ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK)
MESSAGE("Foe Ogerpon's Embody Aspect raised its Defense!");
} THEN {
if (ability == ABILITY_EMBODY_ASPECT_TEAL)
EXPECT_EQ(opponent->statStages[STAT_SPATK], DEFAULT_STAT_STAGE + 1);
else if (ability == ABILITY_EMBODY_ASPECT_HEARTHFLAME)
if (ability == ABILITY_EMBODY_ASPECT_TEAL_MASK)
EXPECT_EQ(opponent->statStages[STAT_SPEED], DEFAULT_STAT_STAGE + 1);
else if (ability == ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK)
EXPECT_EQ(opponent->statStages[STAT_ATK], DEFAULT_STAT_STAGE + 1);
else if (ability == ABILITY_EMBODY_ASPECT_WELLSPRING)
else if (ability == ABILITY_EMBODY_ASPECT_WELLSPRING_MASK)
EXPECT_EQ(opponent->statStages[STAT_SPDEF], DEFAULT_STAT_STAGE + 1);
else if (ability == ABILITY_EMBODY_ASPECT_CORNERSTONE)
else if (ability == ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK)
EXPECT_EQ(opponent->statStages[STAT_DEF], DEFAULT_STAT_STAGE + 1);
}
}
SINGLE_BATTLE_TEST("Embodoy Aspect activates when it's no longer effected by Neutralizing Gas")
SINGLE_BATTLE_TEST("Embody Aspect activates when it's no longer effected by Neutralizing Gas")
{
GIVEN {
PLAYER(SPECIES_WEEZING) { Ability(ABILITY_NEUTRALIZING_GAS); }
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_OGERPON_TEAL_MASK_TERA) { Ability(ABILITY_EMBODY_ASPECT_TEAL); }
OPPONENT(SPECIES_OGERPON_TEAL_MASK_TERA) { Ability(ABILITY_EMBODY_ASPECT_TEAL_MASK); }
} WHEN {
TURN { SWITCH(player, 1); }
} SCENE {
@ -52,8 +52,8 @@ SINGLE_BATTLE_TEST("Embodoy Aspect activates when it's no longer effected by Neu
MESSAGE("Neutralizing Gas filled the area!");
MESSAGE("Weezing, that's enough! Come back!");
MESSAGE("The effects of Neutralizing Gas wore off!");
ABILITY_POPUP(opponent, ABILITY_EMBODY_ASPECT_TEAL);
ABILITY_POPUP(opponent, ABILITY_EMBODY_ASPECT_TEAL_MASK);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
MESSAGE("Foe Ogerpon's Embody Aspect raised its Sp. Atk!");
MESSAGE("Foe Ogerpon's Embody Aspect raised its Speed!");
}
}