Embody Aspect fixes (#4439)
* Embody Aspect fixes * Fix tests * Update battle_util.c
This commit is contained in:
parent
7355eb99a5
commit
fc9d5c289a
5 changed files with 41 additions and 41 deletions
|
@ -326,10 +326,10 @@
|
||||||
#define ABILITY_MYCELIUM_MIGHT 298
|
#define ABILITY_MYCELIUM_MIGHT 298
|
||||||
#define ABILITY_HOSPITALITY 299
|
#define ABILITY_HOSPITALITY 299
|
||||||
#define ABILITY_MINDS_EYE 300
|
#define ABILITY_MINDS_EYE 300
|
||||||
#define ABILITY_EMBODY_ASPECT_TEAL 301
|
#define ABILITY_EMBODY_ASPECT_TEAL_MASK 301
|
||||||
#define ABILITY_EMBODY_ASPECT_HEARTHFLAME 302
|
#define ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK 302
|
||||||
#define ABILITY_EMBODY_ASPECT_WELLSPRING 303
|
#define ABILITY_EMBODY_ASPECT_WELLSPRING_MASK 303
|
||||||
#define ABILITY_EMBODY_ASPECT_CORNERSTONE 304
|
#define ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK 304
|
||||||
#define ABILITY_TOXIC_CHAIN 305
|
#define ABILITY_TOXIC_CHAIN 305
|
||||||
#define ABILITY_SUPERSWEET_SYRUP 306
|
#define ABILITY_SUPERSWEET_SYRUP 306
|
||||||
#define ABILITY_TERA_SHIFT 307
|
#define ABILITY_TERA_SHIFT 307
|
||||||
|
|
|
@ -4737,22 +4737,22 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
|
||||||
effect++;
|
effect++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ABILITY_EMBODY_ASPECT_TEAL:
|
case ABILITY_EMBODY_ASPECT_TEAL_MASK:
|
||||||
case ABILITY_EMBODY_ASPECT_HEARTHFLAME:
|
case ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK:
|
||||||
case ABILITY_EMBODY_ASPECT_WELLSPRING:
|
case ABILITY_EMBODY_ASPECT_WELLSPRING_MASK:
|
||||||
case ABILITY_EMBODY_ASPECT_CORNERSTONE:
|
case ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK:
|
||||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
{
|
{
|
||||||
u32 stat = STAT_SPATK;
|
u32 stat;
|
||||||
|
|
||||||
if (gLastUsedAbility == ABILITY_EMBODY_ASPECT_TEAL)
|
if (gLastUsedAbility == ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK)
|
||||||
stat = STAT_SPATK;
|
|
||||||
else if (gLastUsedAbility == ABILITY_EMBODY_ASPECT_HEARTHFLAME)
|
|
||||||
stat = STAT_ATK;
|
stat = STAT_ATK;
|
||||||
else if (gLastUsedAbility == ABILITY_EMBODY_ASPECT_WELLSPRING)
|
else if (gLastUsedAbility == ABILITY_EMBODY_ASPECT_WELLSPRING_MASK)
|
||||||
stat = STAT_SPDEF;
|
stat = STAT_SPDEF;
|
||||||
else if (gLastUsedAbility == ABILITY_EMBODY_ASPECT_CORNERSTONE)
|
else if (gLastUsedAbility == ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK)
|
||||||
stat = STAT_DEF;
|
stat = STAT_DEF;
|
||||||
|
else //ABILITY_EMBODY_ASPECT_TEAL_MASK
|
||||||
|
stat = STAT_SPEED;
|
||||||
|
|
||||||
if (CompareStat(battler, stat, MAX_STAT_STAGE, CMP_EQUAL))
|
if (CompareStat(battler, stat, MAX_STAT_STAGE, CMP_EQUAL))
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -2472,7 +2472,7 @@ const struct Ability gAbilitiesInfo[ABILITIES_COUNT] =
|
||||||
.breakable = TRUE,
|
.breakable = TRUE,
|
||||||
},
|
},
|
||||||
|
|
||||||
[ABILITY_EMBODY_ASPECT_TEAL] =
|
[ABILITY_EMBODY_ASPECT_TEAL_MASK] =
|
||||||
{
|
{
|
||||||
#if B_EXPANDED_ABILITY_NAMES == TRUE
|
#if B_EXPANDED_ABILITY_NAMES == TRUE
|
||||||
.name = _("Embody Aspect"),
|
.name = _("Embody Aspect"),
|
||||||
|
@ -2487,7 +2487,7 @@ const struct Ability gAbilitiesInfo[ABILITIES_COUNT] =
|
||||||
.failsOnImposter = TRUE,
|
.failsOnImposter = TRUE,
|
||||||
},
|
},
|
||||||
|
|
||||||
[ABILITY_EMBODY_ASPECT_HEARTHFLAME] =
|
[ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK] =
|
||||||
{
|
{
|
||||||
#if B_EXPANDED_ABILITY_NAMES == TRUE
|
#if B_EXPANDED_ABILITY_NAMES == TRUE
|
||||||
.name = _("Embody Aspect"),
|
.name = _("Embody Aspect"),
|
||||||
|
@ -2502,7 +2502,7 @@ const struct Ability gAbilitiesInfo[ABILITIES_COUNT] =
|
||||||
.failsOnImposter = TRUE,
|
.failsOnImposter = TRUE,
|
||||||
},
|
},
|
||||||
|
|
||||||
[ABILITY_EMBODY_ASPECT_WELLSPRING] =
|
[ABILITY_EMBODY_ASPECT_WELLSPRING_MASK] =
|
||||||
{
|
{
|
||||||
#if B_EXPANDED_ABILITY_NAMES == TRUE
|
#if B_EXPANDED_ABILITY_NAMES == TRUE
|
||||||
.name = _("Embody Aspect"),
|
.name = _("Embody Aspect"),
|
||||||
|
@ -2517,7 +2517,7 @@ const struct Ability gAbilitiesInfo[ABILITIES_COUNT] =
|
||||||
.failsOnImposter = TRUE,
|
.failsOnImposter = TRUE,
|
||||||
},
|
},
|
||||||
|
|
||||||
[ABILITY_EMBODY_ASPECT_CORNERSTONE] =
|
[ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK] =
|
||||||
{
|
{
|
||||||
#if B_EXPANDED_ABILITY_NAMES == TRUE
|
#if B_EXPANDED_ABILITY_NAMES == TRUE
|
||||||
.name = _("Embody Aspect"),
|
.name = _("Embody Aspect"),
|
||||||
|
|
|
@ -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_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),
|
[SPECIES_OGERPON_CORNERSTONE_MASK] = OGERPON_SPECIES_INFO(CornerstoneMask, TYPE_ROCK, ABILITY_STURDY, BODY_COLOR_GRAY, 0),
|
||||||
#if P_TERA_FORMS
|
#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_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, BODY_COLOR_BLUE, 0),
|
[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, BODY_COLOR_RED, 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, BODY_COLOR_GRAY, 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_TERA_FORMS
|
||||||
|
|
||||||
#endif //P_FAMILY_OGERPON
|
#endif //P_FAMILY_OGERPON
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
#include "test/battle.h"
|
#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;
|
u16 species, ability;
|
||||||
|
|
||||||
PARAMETRIZE { species = SPECIES_OGERPON_TEAL_MASK_TERA; ability = ABILITY_EMBODY_ASPECT_TEAL; }
|
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; }
|
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; }
|
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; }
|
PARAMETRIZE { species = SPECIES_OGERPON_CORNERSTONE_MASK_TERA; ability = ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK; }
|
||||||
|
|
||||||
GIVEN {
|
GIVEN {
|
||||||
PLAYER(SPECIES_WOBBUFFET);
|
PLAYER(SPECIES_WOBBUFFET);
|
||||||
|
@ -19,32 +19,32 @@ SINGLE_BATTLE_TEST("Embodoy Aspect raises a stat depending on the users form by
|
||||||
} SCENE {
|
} SCENE {
|
||||||
ABILITY_POPUP(opponent, ability);
|
ABILITY_POPUP(opponent, ability);
|
||||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
||||||
if (ability == ABILITY_EMBODY_ASPECT_TEAL)
|
if (ability == ABILITY_EMBODY_ASPECT_TEAL_MASK)
|
||||||
MESSAGE("Foe Ogerpon's Embody Aspect raised its Sp. Atk!");
|
MESSAGE("Foe Ogerpon's Embody Aspect raised its Speed!");
|
||||||
else if (ability == ABILITY_EMBODY_ASPECT_HEARTHFLAME)
|
else if (ability == ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK)
|
||||||
MESSAGE("Foe Ogerpon's Embody Aspect raised its Attack!");
|
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!");
|
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!");
|
MESSAGE("Foe Ogerpon's Embody Aspect raised its Defense!");
|
||||||
} THEN {
|
} THEN {
|
||||||
if (ability == ABILITY_EMBODY_ASPECT_TEAL)
|
if (ability == ABILITY_EMBODY_ASPECT_TEAL_MASK)
|
||||||
EXPECT_EQ(opponent->statStages[STAT_SPATK], DEFAULT_STAT_STAGE + 1);
|
EXPECT_EQ(opponent->statStages[STAT_SPEED], DEFAULT_STAT_STAGE + 1);
|
||||||
else if (ability == ABILITY_EMBODY_ASPECT_HEARTHFLAME)
|
else if (ability == ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK)
|
||||||
EXPECT_EQ(opponent->statStages[STAT_ATK], DEFAULT_STAT_STAGE + 1);
|
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);
|
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);
|
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 {
|
GIVEN {
|
||||||
PLAYER(SPECIES_WEEZING) { Ability(ABILITY_NEUTRALIZING_GAS); }
|
PLAYER(SPECIES_WEEZING) { Ability(ABILITY_NEUTRALIZING_GAS); }
|
||||||
PLAYER(SPECIES_WOBBUFFET);
|
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 {
|
} WHEN {
|
||||||
TURN { SWITCH(player, 1); }
|
TURN { SWITCH(player, 1); }
|
||||||
} SCENE {
|
} 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("Neutralizing Gas filled the area!");
|
||||||
MESSAGE("Weezing, that's enough! Come back!");
|
MESSAGE("Weezing, that's enough! Come back!");
|
||||||
MESSAGE("The effects of Neutralizing Gas wore off!");
|
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);
|
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…
Reference in a new issue