Fixes Max Moves ignoring absorbing abilities, G-Max Corviknight and Centiskorch names (#5296)

* Fix Max and G-Max Moves bypassing absorbing abilities

* Fix G-Max Corviknight and Centiskorch speciesName

* Remove some outdated comments

* Missing Dynamax check

* Add Max Quake and Max Overgrowth to test
This commit is contained in:
PhallenTree 2024-08-31 11:39:37 +01:00 committed by GitHub
parent addaf40971
commit ac9b40a423
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 46 additions and 8 deletions

View file

@ -406,7 +406,6 @@ static u8 GetMaxPowerTier(u32 move)
case EFFECT_NATURAL_GIFT:
case EFFECT_MIRROR_COAT:
case EFFECT_FINAL_GAMBIT:
//case EFFECT_DRAGON_DARTS:
return MAX_POWER_TIER_2;
case EFFECT_OHKO:
case EFFECT_RETURN:

View file

@ -1729,6 +1729,8 @@ static void AccuracyCheck(bool32 recalcDragonDarts, const u8 *nextInstr, const u
gBattlescriptCurrInstr = failInstr;
else if (!JumpIfMoveAffectedByProtect(gCurrentMove))
gBattlescriptCurrInstr = nextInstr;
if (GetActiveGimmick(gBattlerAttacker) == GIMMICK_DYNAMAX)
AbilityBattleEffects(ABILITYEFFECT_ABSORBING, gBattlerTarget, 0, 0, gCurrentMove);
}
else if (gSpecialStatuses[gBattlerAttacker].parentalBondState == PARENTAL_BOND_2ND_HIT
|| (gSpecialStatuses[gBattlerAttacker].multiHitOn

View file

@ -21719,7 +21719,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.category = DAMAGE_CATEGORY_PHYSICAL,
.argument = MAX_EFFECT_FIXED_POWER, //EFFECT TODO
.argument = MAX_EFFECT_FIXED_POWER,
.ignoresTargetAbility = TRUE,
.battleAnimScript = Move_G_MAX_DRUM_SOLO,
},
@ -21736,7 +21736,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.category = DAMAGE_CATEGORY_PHYSICAL,
.argument = MAX_EFFECT_FIXED_POWER, //EFFECT TODO
.argument = MAX_EFFECT_FIXED_POWER,
.ignoresTargetAbility = TRUE,
.battleAnimScript = Move_G_MAX_FIREBALL,
},
@ -21753,7 +21753,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.category = DAMAGE_CATEGORY_PHYSICAL,
.argument = MAX_EFFECT_FIXED_POWER, //EFFECT TODO
.argument = MAX_EFFECT_FIXED_POWER,
.ignoresTargetAbility = TRUE,
.battleAnimScript = Move_G_MAX_HYDROSNIPE,
},
@ -21995,7 +21995,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.category = DAMAGE_CATEGORY_PHYSICAL,
.argument = MAX_EFFECT_BYPASS_PROTECT, //EFFECT TODO
.argument = MAX_EFFECT_BYPASS_PROTECT,
.battleAnimScript = Move_G_MAX_ONE_BLOW,
},
@ -22011,7 +22011,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.category = DAMAGE_CATEGORY_PHYSICAL,
.argument = MAX_EFFECT_BYPASS_PROTECT, //EFFECT TODO
.argument = MAX_EFFECT_BYPASS_PROTECT,
.battleAnimScript = Move_G_MAX_RAPID_FLOW,
},

View file

@ -1063,7 +1063,7 @@ const struct SpeciesInfo gSpeciesInfoGen8[] =
.eggGroups = MON_EGG_GROUPS(EGG_GROUP_FLYING),
.abilities = { ABILITY_PRESSURE, ABILITY_UNNERVE, ABILITY_MIRROR_ARMOR },
.bodyColor = BODY_COLOR_PURPLE,
.speciesName = _("Corviknigh"),
.speciesName = HANDLE_EXPANDED_SPECIES_NAME("Corviknigh", "Corviknight"),
.cryId = CRY_CORVIKNIGHT,
.natDexNum = NATIONAL_DEX_CORVIKNIGHT,
.categoryName = _("Raven"),
@ -3605,7 +3605,7 @@ const struct SpeciesInfo gSpeciesInfoGen8[] =
.eggGroups = MON_EGG_GROUPS(EGG_GROUP_BUG),
.abilities = { ABILITY_FLASH_FIRE, ABILITY_WHITE_SMOKE, ABILITY_FLAME_BODY },
.bodyColor = BODY_COLOR_RED,
.speciesName = _("Centiskorc"),
.speciesName = HANDLE_EXPANDED_SPECIES_NAME("Centiskorc", "Centiskorch"),
.cryId = CRY_CENTISKORCH,
.natDexNum = NATIONAL_DEX_CENTISKORCH,
.categoryName = _("Radiator"),

View file

@ -1476,3 +1476,40 @@ SINGLE_BATTLE_TEST("(DYNAMAX) Moxie clones can be triggered by Max Moves faintin
MESSAGE("Gyarados's Moxie raised its Attack!");
}
}
SINGLE_BATTLE_TEST("(DYNAMAX) Max Moves don't bypass absorbing abilities")
{
u32 move, ability, species;
PARAMETRIZE { move = MOVE_SPARK; ability = ABILITY_VOLT_ABSORB; species = SPECIES_LANTURN; }
PARAMETRIZE { move = MOVE_WATER_GUN; ability = ABILITY_WATER_ABSORB; species = SPECIES_LANTURN; }
PARAMETRIZE { move = MOVE_EMBER; ability = ABILITY_FLASH_FIRE; species = SPECIES_HEATRAN; }
PARAMETRIZE { move = MOVE_SPARK; ability = ABILITY_LIGHTNING_ROD; species = SPECIES_PIKACHU; }
PARAMETRIZE { move = MOVE_WATER_GUN; ability = ABILITY_STORM_DRAIN; species = SPECIES_GASTRODON; }
PARAMETRIZE { move = MOVE_EMBER; ability = ABILITY_WELL_BAKED_BODY; species = SPECIES_DACHSBUN; }
PARAMETRIZE { move = MOVE_SPARK; ability = ABILITY_MOTOR_DRIVE; species = SPECIES_ELECTIVIRE; }
PARAMETRIZE { move = MOVE_WATER_GUN; ability = ABILITY_DRY_SKIN; species = SPECIES_PARASECT; }
PARAMETRIZE { move = MOVE_MUD_BOMB; ability = ABILITY_EARTH_EATER; species = SPECIES_ORTHWORM; }
PARAMETRIZE { move = MOVE_VINE_WHIP; ability = ABILITY_SAP_SIPPER; species = SPECIES_MILTANK; }
GIVEN {
ASSUME(gMovesInfo[MOVE_WATER_GUN].type == TYPE_WATER);
ASSUME(gMovesInfo[MOVE_SPARK].type == TYPE_ELECTRIC);
ASSUME(gMovesInfo[MOVE_EMBER].type == TYPE_FIRE);
ASSUME(gMovesInfo[MOVE_MUD_BOMB].type == TYPE_GROUND);
ASSUME(gMovesInfo[MOVE_VINE_WHIP].type == TYPE_GRASS);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(species) { Ability(ability); }
} WHEN {
TURN { MOVE(player, move, gimmick: GIMMICK_DYNAMAX); }
} SCENE {
NONE_OF {
ANIMATION(ANIM_TYPE_MOVE, MOVE_MAX_LIGHTNING, player);
ANIMATION(ANIM_TYPE_MOVE, MOVE_MAX_FLARE, player);
ANIMATION(ANIM_TYPE_MOVE, MOVE_MAX_GEYSER, player);
ANIMATION(ANIM_TYPE_MOVE, MOVE_MAX_QUAKE, player);
ANIMATION(ANIM_TYPE_MOVE, MOVE_MAX_OVERGROWTH, player);
HP_BAR(opponent);
}
ABILITY_POPUP(opponent, ability);
}
}