Skip to content

Commit

Permalink
Merge pull request #2367 from AsparagusEduardo/RHH/pr/feature/MewTeach
Browse files Browse the repository at this point in the history
Special handling for Mew's Teachable moveset
  • Loading branch information
ghoulslash authored Oct 7, 2022
2 parents 7c7eb8a + 90ad112 commit 1e04c80
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 88 deletions.
89 changes: 1 addition & 88 deletions src/data/pokemon/teachable_learnsets.h
Original file line number Diff line number Diff line change
Expand Up @@ -6209,95 +6209,8 @@ static const u16 sMewtwoTeachableLearnset[] = {
MOVE_UNAVAILABLE,
};

// Instead of reading this array for Mew, it checks for exceptions in CanLearnTeachableMove instead.
static const u16 sMewTeachableLearnset[] = {
MOVE_AERIAL_ACE,
MOVE_ATTRACT,
MOVE_BLIZZARD,
MOVE_BRICK_BREAK,
MOVE_BULK_UP,
MOVE_BULLET_SEED,
MOVE_CALM_MIND,
MOVE_CUT,
MOVE_DIG,
MOVE_DIVE,
MOVE_DOUBLE_TEAM,
MOVE_DRAGON_CLAW,
MOVE_EARTHQUAKE,
MOVE_FACADE,
MOVE_FIRE_BLAST,
MOVE_FLAMETHROWER,
MOVE_FLASH,
MOVE_FLY,
MOVE_FOCUS_PUNCH,
MOVE_FRUSTRATION,
MOVE_GIGA_DRAIN,
MOVE_HAIL,
MOVE_HIDDEN_POWER,
MOVE_HYPER_BEAM,
MOVE_ICE_BEAM,
MOVE_IRON_TAIL,
MOVE_LIGHT_SCREEN,
MOVE_OVERHEAT,
MOVE_PROTECT,
MOVE_PSYCHIC,
MOVE_RAIN_DANCE,
MOVE_REFLECT,
MOVE_REST,
MOVE_RETURN,
MOVE_ROAR,
MOVE_ROCK_SMASH,
MOVE_ROCK_TOMB,
MOVE_SAFEGUARD,
MOVE_SANDSTORM,
MOVE_SECRET_POWER,
MOVE_SHADOW_BALL,
MOVE_SHOCK_WAVE,
MOVE_SKILL_SWAP,
MOVE_SLUDGE_BOMB,
MOVE_SNATCH,
MOVE_SOLAR_BEAM,
MOVE_STEEL_WING,
MOVE_STRENGTH,
MOVE_SUNNY_DAY,
MOVE_SURF,
MOVE_TAUNT,
MOVE_THIEF,
MOVE_THUNDER,
MOVE_THUNDERBOLT,
MOVE_TORMENT,
MOVE_TOXIC,
MOVE_WATERFALL,
MOVE_WATER_PULSE,
MOVE_BODY_SLAM,
MOVE_COUNTER,
MOVE_DEFENSE_CURL,
MOVE_DOUBLE_EDGE,
MOVE_DREAM_EATER,
MOVE_DYNAMIC_PUNCH,
MOVE_ENDURE,
MOVE_EXPLOSION,
MOVE_FIRE_PUNCH,
MOVE_FURY_CUTTER,
MOVE_ICE_PUNCH,
MOVE_ICY_WIND,
MOVE_MEGA_KICK,
MOVE_MEGA_PUNCH,
MOVE_METRONOME,
MOVE_MIMIC,
MOVE_MUD_SLAP,
MOVE_PSYCH_UP,
MOVE_ROCK_SLIDE,
MOVE_ROLLOUT,
MOVE_SEISMIC_TOSS,
MOVE_SLEEP_TALK,
MOVE_SNORE,
MOVE_SOFT_BOILED,
MOVE_SUBSTITUTE,
MOVE_SWAGGER,
MOVE_SWIFT,
MOVE_SWORDS_DANCE,
MOVE_THUNDER_PUNCH,
MOVE_THUNDER_WAVE,
MOVE_UNAVAILABLE,
};

Expand Down
32 changes: 32 additions & 0 deletions src/pokemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -7301,6 +7301,38 @@ u8 CanLearnTeachableMove(u16 species, u16 move)
{
return FALSE;
}
else if (species == SPECIES_MEW)
{
switch (move)
{
case MOVE_BADDY_BAD:
case MOVE_BLAST_BURN:
case MOVE_BOUNCY_BUBBLE:
case MOVE_BUZZY_BUZZ:
case MOVE_DRACO_METEOR:
case MOVE_DRAGON_ASCENT:
case MOVE_FIRE_PLEDGE:
case MOVE_FLOATY_FALL:
case MOVE_FREEZY_FROST:
case MOVE_FRENZY_PLANT:
case MOVE_GLITZY_GLOW:
case MOVE_GRASS_PLEDGE:
case MOVE_HYDRO_CANNON:
case MOVE_RELIC_SONG:
case MOVE_SAPPY_SEED:
case MOVE_SECRET_SWORD:
case MOVE_SIZZLY_SLIDE:
case MOVE_SPARKLY_SWIRL:
case MOVE_SPLISHY_SPLASH:
case MOVE_STEEL_BEAM:
case MOVE_VOLT_TACKLE:
case MOVE_WATER_PLEDGE:
case MOVE_ZIPPY_ZAP:
return FALSE;
default:
return TRUE;
}
}
else
{
u8 i;
Expand Down

0 comments on commit 1e04c80

Please sign in to comment.