Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AsparagusEduardo committed Jun 1, 2024
1 parent e84c778 commit 806ee9f
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/data/types_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ const uq4_12_t gTypeEffectivenessTable[NUMBER_OF_MON_TYPES][NUMBER_OF_MON_TYPES]
#endif

// .generic is large enough that the text for TYPE_ELECTRIC will exceed TEXT_BUFF_ARRAY_COUNT.
// In this array there's commented-out data such as references to type-resist berries that would otherwise would go unused.
// However, we figured this information would be useful for users that want to add their own types as a reminder of
// what data would they need to add in order to have their new types be fully fledged like official types.
const struct TypeInfo gTypesInfo[NUMBER_OF_MON_TYPES] =
{
[TYPE_NONE] =
Expand Down
51 changes: 51 additions & 0 deletions test/battle/move_effect/tera_blast.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,57 @@ SINGLE_BATTLE_TEST("Tera Blast changes from Normal-type to the user's Tera Type"
}
}

SINGLE_BATTLE_TEST("Tera Blast has correct effectiveness for every Tera Type")
{
u32 species;
u32 type;

PARAMETRIZE { species = SPECIES_CHIKORITA; type = TYPE_FLYING; }
PARAMETRIZE { species = SPECIES_CHIKORITA; type = TYPE_POISON; }
PARAMETRIZE { species = SPECIES_CHIKORITA; type = TYPE_FIRE; }
PARAMETRIZE { species = SPECIES_CHIKORITA; type = TYPE_BUG; }
PARAMETRIZE { species = SPECIES_CHIKORITA; type = TYPE_ICE; }
PARAMETRIZE { species = SPECIES_CYNDAQUIL; type = TYPE_GROUND; }
PARAMETRIZE { species = SPECIES_CYNDAQUIL; type = TYPE_ROCK; }
PARAMETRIZE { species = SPECIES_CYNDAQUIL; type = TYPE_WATER; }
PARAMETRIZE { species = SPECIES_GASTLY; type = TYPE_NORMAL; }
PARAMETRIZE { species = SPECIES_GASTLY; type = TYPE_GHOST; }
PARAMETRIZE { species = SPECIES_GASTLY; type = TYPE_PSYCHIC; }
PARAMETRIZE { species = SPECIES_TOTODILE; type = TYPE_GRASS; }
PARAMETRIZE { species = SPECIES_TOTODILE; type = TYPE_ELECTRIC; }
PARAMETRIZE { species = SPECIES_DRATINI; type = TYPE_DRAGON; }
PARAMETRIZE { species = SPECIES_DRATINI; type = TYPE_FAIRY; }
PARAMETRIZE { species = SPECIES_SNEASEL; type = TYPE_FIGHTING; }
PARAMETRIZE { species = SPECIES_SNEASEL; type = TYPE_STEEL; }
PARAMETRIZE { species = SPECIES_ABRA; type = TYPE_DARK; }

GIVEN {
ASSUME(gSpeciesInfo[SPECIES_CHIKORITA].types[0] == TYPE_GRASS);
ASSUME(gSpeciesInfo[SPECIES_CHIKORITA].types[1] == TYPE_GRASS);
ASSUME(gSpeciesInfo[SPECIES_CYNDAQUIL].types[0] == TYPE_FIRE);
ASSUME(gSpeciesInfo[SPECIES_CYNDAQUIL].types[1] == TYPE_FIRE);
ASSUME(gSpeciesInfo[SPECIES_GASTLY].types[0] == TYPE_GHOST);
ASSUME(gSpeciesInfo[SPECIES_GASTLY].types[1] == TYPE_POISON);
ASSUME(gSpeciesInfo[SPECIES_TOTODILE].types[0] == TYPE_WATER);
ASSUME(gSpeciesInfo[SPECIES_TOTODILE].types[1] == TYPE_WATER);
ASSUME(gSpeciesInfo[SPECIES_DRATINI].types[0] == TYPE_DRAGON);
ASSUME(gSpeciesInfo[SPECIES_DRATINI].types[1] == TYPE_DRAGON);
ASSUME(gSpeciesInfo[SPECIES_SNEASEL].types[0] == TYPE_DARK);
ASSUME(gSpeciesInfo[SPECIES_SNEASEL].types[1] == TYPE_ICE);
ASSUME(gSpeciesInfo[SPECIES_ABRA].types[0] == TYPE_PSYCHIC);
ASSUME(gSpeciesInfo[SPECIES_ABRA].types[1] == TYPE_PSYCHIC);
PLAYER(SPECIES_WOBBUFFET) { TeraType(type); }
OPPONENT(species);
} WHEN {
TURN { MOVE(player, MOVE_TERA_BLAST, tera: TRUE); }
} SCENE {
if (species == SPECIES_GASTLY && type == TYPE_NORMAL)
MESSAGE("It doesn't affect Foe Gastly…");
else
MESSAGE("It's super effective!");
}
}

SINGLE_BATTLE_TEST("Tera Blast becomes a physical move if the user is Terastallized and has a higher Attack stat", s16 damage)
{
bool32 tera;
Expand Down

0 comments on commit 806ee9f

Please sign in to comment.