-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Set TYPE_NONE as type 0 + other type data tweaks #4462
Set TYPE_NONE as type 0 + other type data tweaks #4462
Conversation
Off the top of my head, the backward-compatibility concerns are:
|
Set to draft in the meantime while I revert this and use |
# Conflicts: # include/data.h # src/battle_main.c # src/battle_util.c
Ready for review. I updated the PR name and description to account for all the new changes. |
added missing Tera Indicator stuff in the description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add this test (I would say the terastal.c file but up to you)?
SINGLE_BATTLE_TEST("(TERA) All types have the correct effectivness")
{
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 {
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!");
}
}
Looks good otherwise
This doesn't account for type changes by the user. I'll add sone assumes. |
Ready for re-review |
Description
Unlike Natures, Types are having the issue where if it's not defined in a struct, it always defaults to
TYPE_NORMAL
.This PR fixes that by changing
TYPE_NONE
to 0 and shifting all other Types to +1.It duplicates
TYPE_MYSTERY
's icon becausegraphics_file_rules.mk
doesn't let you do duplicates.Also:
MON_DATA_TERA_TYPE
's write/read to account for shift in type IDs.gTypesInfo
.gTypesInfo
.gTypesInfo
andsTypeEffectivenessTable
to their own file insrc/data/types_info.h
Feature(s) this PR does NOT handle:
Discord contact info
AsparagusEduardo