Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embody Aspect fixes #4439

Merged
merged 4 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions include/constants/abilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions src/battle_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/data/abilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand Down
8 changes: 4 additions & 4 deletions src/data/pokemon/species_info/gen_9_families.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 19 additions & 19 deletions test/battle/ability/embody_aspect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -19,41 +19,41 @@ 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 {
ABILITY_POPUP(player, ABILITY_NEUTRALIZING_GAS);
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!");
}
}
Loading