Made EFFECT_WRING_OUT read the max power from the move's argument field (#4180)

* Made EFFECT_WRING_OUT read the max power from the move's argument field

* Renamed EFFECT_WRING_OUT to EFFECT_VARY_POWER_BASED_ON_HP
This commit is contained in:
LOuroboros 2024-02-12 18:39:15 -03:00 committed by GitHub
parent de0f94406a
commit e73c58ed2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 11 additions and 8 deletions

View file

@ -178,7 +178,7 @@ enum {
EFFECT_PLEDGE, EFFECT_PLEDGE,
EFFECT_FLING, EFFECT_FLING,
EFFECT_NATURAL_GIFT, EFFECT_NATURAL_GIFT,
EFFECT_WRING_OUT, EFFECT_VARY_POWER_BASED_ON_HP,
EFFECT_ASSURANCE, EFFECT_ASSURANCE,
EFFECT_TRUMP_CARD, EFFECT_TRUMP_CARD,
EFFECT_ACROBATICS, EFFECT_ACROBATICS,

View file

@ -451,7 +451,7 @@ static u8 GetMaxPowerTier(u16 move)
case EFFECT_GYRO_BALL: case EFFECT_GYRO_BALL:
return MAX_POWER_TIER_5; return MAX_POWER_TIER_5;
case EFFECT_MAGNITUDE: case EFFECT_MAGNITUDE:
case EFFECT_WRING_OUT: case EFFECT_VARY_POWER_BASED_ON_HP:
return MAX_POWER_TIER_6; return MAX_POWER_TIER_6;
case EFFECT_FLAIL: case EFFECT_FLAIL:
case EFFECT_LOW_KICK: case EFFECT_LOW_KICK:

View file

@ -8504,8 +8504,8 @@ static inline u32 CalcMoveBasePower(u32 move, u32 battlerAtk, u32 battlerDef, u3
if ((gBattleMons[battlerDef].status1 | (STATUS1_SLEEP * (abilityDef == ABILITY_COMATOSE))) & gMovesInfo[move].argument) if ((gBattleMons[battlerDef].status1 | (STATUS1_SLEEP * (abilityDef == ABILITY_COMATOSE))) & gMovesInfo[move].argument)
basePower *= 2; basePower *= 2;
break; break;
case EFFECT_WRING_OUT: case EFFECT_VARY_POWER_BASED_ON_HP:
basePower = 120 * gBattleMons[battlerDef].hp / gBattleMons[battlerDef].maxHP; basePower = gMovesInfo[move].argument * gBattleMons[battlerDef].hp / gBattleMons[battlerDef].maxHP;
break; break;
case EFFECT_ASSURANCE: case EFFECT_ASSURANCE:
if (gProtectStructs[battlerDef].physicalDmg != 0 || gProtectStructs[battlerDef].specialDmg != 0 || gProtectStructs[battlerDef].confusionSelfDmg) if (gProtectStructs[battlerDef].physicalDmg != 0 || gProtectStructs[battlerDef].specialDmg != 0 || gProtectStructs[battlerDef].confusionSelfDmg)

View file

@ -1145,7 +1145,7 @@ const struct BattleMoveEffect gBattleMoveEffects[NUM_BATTLE_MOVE_EFFECTS] =
.encourageEncore = TRUE, .encourageEncore = TRUE,
}, },
[EFFECT_WRING_OUT] = [EFFECT_VARY_POWER_BASED_ON_HP] =
{ {
.battleScript = BattleScript_EffectHit, .battleScript = BattleScript_EffectHit,
.battleTvScore = 0, // TODO: Assign points .battleTvScore = 0, // TODO: Assign points

View file

@ -9201,7 +9201,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
{ {
.name = COMPOUND_STRING("Wring Out"), .name = COMPOUND_STRING("Wring Out"),
.description = sWringOutDescription, .description = sWringOutDescription,
.effect = EFFECT_WRING_OUT, .effect = EFFECT_VARY_POWER_BASED_ON_HP,
.power = 1, .power = 1,
.type = TYPE_NORMAL, .type = TYPE_NORMAL,
.accuracy = 100, .accuracy = 100,
@ -9209,6 +9209,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.category = DAMAGE_CATEGORY_SPECIAL, .category = DAMAGE_CATEGORY_SPECIAL,
.argument = 120,
.makesContact = TRUE, .makesContact = TRUE,
.contestEffect = CONTEST_EFFECT_STARTLE_PREV_MON, .contestEffect = CONTEST_EFFECT_STARTLE_PREV_MON,
.contestCategory = CONTEST_CATEGORY_SMART, .contestCategory = CONTEST_CATEGORY_SMART,
@ -11206,7 +11207,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
{ {
.name = COMPOUND_STRING("Crush Grip"), .name = COMPOUND_STRING("Crush Grip"),
.description = sWringOutDescription, .description = sWringOutDescription,
.effect = EFFECT_WRING_OUT, .effect = EFFECT_VARY_POWER_BASED_ON_HP,
.power = 1, .power = 1,
.type = TYPE_NORMAL, .type = TYPE_NORMAL,
.accuracy = 100, .accuracy = 100,
@ -11214,6 +11215,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.category = DAMAGE_CATEGORY_PHYSICAL, .category = DAMAGE_CATEGORY_PHYSICAL,
.argument = 120,
.makesContact = TRUE, .makesContact = TRUE,
.contestEffect = CONTEST_EFFECT_BADLY_STARTLE_FRONT_MON, .contestEffect = CONTEST_EFFECT_BADLY_STARTLE_FRONT_MON,
.contestCategory = CONTEST_CATEGORY_TOUGH, .contestCategory = CONTEST_CATEGORY_TOUGH,
@ -19866,7 +19868,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
{ {
.name = COMPOUND_STRING("Hard Press"), .name = COMPOUND_STRING("Hard Press"),
.description = sWringOutDescription, .description = sWringOutDescription,
.effect = EFFECT_WRING_OUT, .effect = EFFECT_VARY_POWER_BASED_ON_HP,
.power = 1, .power = 1,
.type = TYPE_STEEL, .type = TYPE_STEEL,
.accuracy = 100, .accuracy = 100,
@ -19874,6 +19876,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_DYNAMAX] =
.target = MOVE_TARGET_SELECTED, .target = MOVE_TARGET_SELECTED,
.priority = 0, .priority = 0,
.category = DAMAGE_CATEGORY_PHYSICAL, .category = DAMAGE_CATEGORY_PHYSICAL,
.argument = 100,
.makesContact = TRUE, .makesContact = TRUE,
}, },