Generational Move Changes (#8405)

This commit is contained in:
amiosi 2025-12-06 17:50:58 -05:00 committed by GitHub
parent 445cc2ace9
commit 328ec9d708
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 289 additions and 157 deletions

View File

@ -2581,7 +2581,9 @@ BattleScript_MaxHp50Recoil::
BattleScript_EffectDreamEater::
attackcanceler
.if B_DREAM_EATER_SUBSTITUTE < GEN_5
jumpifsubstituteblocks BattleScript_DoesntAffectTargetAtkString
.endif
jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_HitFromAccCheck
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_HitFromAccCheck
goto BattleScript_DoesntAffectTargetAtkString

View File

@ -133,6 +133,7 @@
#define B_TIME_OF_DAY_HEALING_MOVES GEN_LATEST // In Gen2, Morning Sun, Moonlight, and Synthesis heal twice as much HP based off the time of day. Also changes how much they heal. Evening affects Moonlight.
// If OW_TIMES_OF_DAY is set to Gen 3, then Morning Sun is boosted during the day.
#define B_DREAM_EATER_LIQUID_OOZE GEN_LATEST // In Gen5+, Dream Eater is affected by Liquid Ooze.
#define B_DREAM_EATER_SUBSTITUTE GEN_LATEST // In Gen5+, Dream Eater can successfully hit and drain from a Substitute.
// Ability settings
#define B_GALE_WINGS GEN_LATEST // In Gen7+ requires full HP to trigger.

View File

@ -5906,8 +5906,12 @@ static bool32 HandleMoveEndMoveBlock(u32 moveEffect)
recoil = GetNonDynamaxMaxHP(gBattlerAttacker) / 2;
else if (B_RECOIL_IF_MISS_DMG == GEN_4 && (GetNonDynamaxMaxHP(gBattlerTarget) / 2) < gBattleStruct->moveDamage[gBattlerTarget])
recoil = GetNonDynamaxMaxHP(gBattlerTarget) / 2;
else // Fallback if B_RECOIL_IF_MISS_DMG is set to gen3 or lower.
else if (B_RECOIL_IF_MISS_DMG == GEN_3)
recoil = GetNonDynamaxMaxHP(gBattlerTarget) / 2;
else if (B_RECOIL_IF_MISS_DMG == GEN_2)
recoil = GetNonDynamaxMaxHP(gBattlerTarget) / 8;
else
recoil = 1;
SetPassiveDamageAmount(gBattlerAttacker, recoil);
BattleScriptCall(BattleScript_RecoilIfMiss);
effect = TRUE;

View File

@ -8065,8 +8065,13 @@ static inline s32 CalculateBaseDamage(u32 power, u32 userFinalAttack, u32 level,
static inline uq4_12_t GetTargetDamageModifier(struct DamageContext *ctx)
{
if (IsDoubleBattle() && GetMoveTargetCount(ctx) >= 2)
return B_MULTIPLE_TARGETS_DMG >= GEN_4 ? UQ_4_12(0.75) : UQ_4_12(0.5);
if (IsDoubleBattle())
{
if (GetMoveTargetCount(ctx) == 2)
return B_MULTIPLE_TARGETS_DMG >= GEN_4 ? UQ_4_12(0.75) : UQ_4_12(0.5);
else if (GetMoveTargetCount(ctx) >= 3)
return B_MULTIPLE_TARGETS_DMG >= GEN_4 ? UQ_4_12(0.75) : UQ_4_12(1.0);
}
return UQ_4_12(1.0);
}

File diff suppressed because it is too large Load Diff

View File

@ -96,6 +96,7 @@ SINGLE_BATTLE_TEST("Dream Eater works if the target is behind a Substitute (Gen
{
s16 damage;
s16 healed;
KNOWN_FAILING;
GIVEN {
ASSUME(GetMoveEffect(MOVE_YAWN) == EFFECT_YAWN);
ASSUME(GetMoveEffect(MOVE_SUBSTITUTE) == EFFECT_SUBSTITUTE);