Skip to content

balance(ai): Moveset generation rebalancing#6962

Merged
DayKev merged 50 commits into
pagefaultgames:betafrom
SirzBenjie:balance/remove-bad-moves
Mar 9, 2026
Merged

balance(ai): Moveset generation rebalancing#6962
DayKev merged 50 commits into
pagefaultgames:betafrom
SirzBenjie:balance/remove-bad-moves

Conversation

@SirzBenjie

@SirzBenjie SirzBenjie commented Jan 12, 2026

Copy link
Copy Markdown
Member

What are the changes the user will see?

Moveset generation has been tweaked; most changes do not apply to non-boss wild Pokémon.

  • Pokémon will no longer generate with moves that are only useful in double battles unless the current battle is doubles.
  • Certain Pokémon will attempt to force their signature move with a high probability. For balance reasons, Empoleon considers flash cannon a signature move.
  • Pokémon will avoid generating moves when there is an option that is strictly better (e.g. ember will not generate if flamethrower is available)
  • Reduced the power level for a move learned at level 1 to be considered an evolution move from 80 to 70.
    • This is meant to address situations like Vanilluxe where freeze-dry was weighted too low
    • Notably, this impacts the elemental punches for the few evolutions that learn them at level 1
  • Fixed a bug that caused status moves that share a type with an offensive move to have a lower than intended chance to generate.
  • Pokemon that are guaranteed to tera will consider their tera type as an additional type for when of computing the likelihood of moves generating. As a result, Pokémon with off-type Teras will have an increased chance to include a move of the same type as the tera, if able.
  • Moves with a variable type that can be predicted based on the Pokémon are now considered to be of that type during moveset generation. This includes:
    • Weather ball on Pokémon with weather-summoning abilities (though similar for terrain pulse was intentionally not done)
    • Ivy Cudgel/Judgement/Techno Blast/Multi-Attack/Raging Bull when generating on the respective Pokémon
    • Hidden Power
    • Tera Blast
    • Revelation Dance
    • Tera Starstorm on will be considered a stellar on a Terapagos that is set to Tera, allowing a real normal type move to generate.
  • Abilities will now be factored in when calculating the effective power of moves for weights. This impacts:
    • Abilities that boost moves with certain attributes, e.g. sharpness, punk rock, iron fist, tough claws
    • Weather and terrain summoning abilities (including misty terrain's nerf to dragon moves)
    • Abilities that impact an offensive stat (e.g. Pure Power, Hustle)
  • Moves that would be entirely useless for a Pokémon will now be prevented from generating on trainers and bosses only. This includes:
    • Aurora veil with no source of snow/hail
    • Weather moves with no relevant ability / associated move (does not include accuracy boosts like hurricane or recovery boosts like synthesis). Leaf Guard/Hydration excluded due to being deemed too situational
    • Moves that require the user or opponent to be asleep without a way to induce such

Why am I making these changes?

Long discussion with balance team

What are the changes from a developer perspective?

Created a new script to generate sample movesets. Can be used with pnpm sample-movesets

Added a new constant to balance/moves/moveset-generation.ts, EVO_MOVE_BP_THRESHOLD, for dynamically controlling the BP threshold that causes a move learned at level 1 to be considered a "move reminder" move.

Moved some movegen related files in the balance folder into a sub folder for better organization.

Created forbidden-moves.ts, which currently includes a set of moves that should not generate outside of double battles. Before initial weights are calculated during moveset generation, these moves are removed from the pool if the battle is not a doubles battle.
Note that this adds an assumption where a mon is expected to have one non-doubles move available in its moveset in order to generate any moves. No edge-case handling is implemented that would allow moves from this list during singles, even if the Pokémon has no other moves available. (This situation cannot happen now, but could in the future, say in a randomizer mode, etc.).

Created superceded-moves.ts, which contains a map of moves that are outclassed.

  • After each pool is initially generated, moves that are superceded, and have a better move in a less-restrictive pool will be removed prior to generating weights. For example, if a Pokémon is currently able to learn both ember and flamethrower on level up, then ember will be removed from the possible options. This would not happen if the pokemon only learns ember via TM.

Currently, for TMs, if a pokemon learns both the base move and the TM, and the pokemon is allowed to learn the TM of a higher tier, the lower tier TM will be removed from the pool. This may not be desireable, for example, as certain moves are locked behind ultra tier tms.
An example of this consequence:
If ultra tier TMs are available to the mon, this would mean that shock wave will never generate on a mon that can learn it if the mon can also learn thunderbolt from TM, even though it has a higher likelihood to generate.

Added a new method to VariableMoveTypeAttr, getTypeForMovegen, to obtain the type of many variable-type moves

Misc

  • Fixed a benign bug where the RELEARN_MOVE_WEIGHT constant was not being used. This was an oversight from my changes in [Balance] Tweak trainer moveset TM generation. #6533. This isn't an observable bug, because the value being used was the same as RELEARN_MOVE_WEIGHT.
  • Fixed a bug that improperly reduced the weight of status moves that shared a type with a damaging move already in the
  • Added licensing info to the top of files that were touched by this PR.
  • Adjusted the type of the TmPoolTiers interface to only allow common, great, and ultra tiers

Screenshots/Videos

How to test the changes?

Try out movegen with pnpm sample-movesets

Checklist

  • I'm using beta as my base branch
  • There is no overlap with another PR
  • The PR is self-contained and cannot be split into smaller PRs
  • I have provided a clear explanation of the changes
  • The PR title matches the format described in CONTRIBUTING.md
  • I have tested the changes manually
  • The full test suite still passes (pnpm test:silent)
    • I have created new automated tests (pnpm test:create) or updated existing tests related to the PR's changes
  • [ ] I have provided screenshots/videos of the changes (if applicable)
    • [ ] I have made sure that any UI change works for both the default and legacy UI themes (if applicable)

@Madmadness65 Madmadness65 added Game Balance Changes focused on game balance AI Affects the Enemy Pokemon and/or Trainer AI labels Jan 12, 2026
@SirzBenjie SirzBenjie force-pushed the balance/remove-bad-moves branch from bc69b19 to 834cbe9 Compare January 12, 2026 23:24
@SirzBenjie SirzBenjie force-pushed the balance/remove-bad-moves branch from d8982a7 to 59da950 Compare January 13, 2026 03:40
@SirzBenjie SirzBenjie force-pushed the balance/remove-bad-moves branch from 7fd5c00 to bb5b85b Compare January 13, 2026 21:22
@SirzBenjie SirzBenjie force-pushed the balance/remove-bad-moves branch 2 times, most recently from 15878f8 to 5869e46 Compare February 8, 2026 17:45
Also update forced signature moves
@SirzBenjie SirzBenjie force-pushed the balance/remove-bad-moves branch from ead10c6 to 10dba0a Compare February 9, 2026 02:29
@SirzBenjie SirzBenjie force-pushed the balance/remove-bad-moves branch 2 times, most recently from 2d06aef to 9f0fe14 Compare February 9, 2026 02:59
@SirzBenjie SirzBenjie marked this pull request as ready for review February 9, 2026 03:02
@SirzBenjie SirzBenjie requested review from a team as code owners February 9, 2026 03:02
@SirzBenjie SirzBenjie dismissed Bertie690’s stale review February 27, 2026 15:54

All comments addressed

Mourouh
Mourouh previously approved these changes Feb 27, 2026
@SirzBenjie SirzBenjie force-pushed the balance/remove-bad-moves branch from ee88c47 to 0ef2081 Compare March 8, 2026 22:12
@damocleas damocleas requested a review from Blitz425 March 8, 2026 22:38
Blitz425
Blitz425 previously approved these changes Mar 9, 2026
@DayKev DayKev removed this from the 1.11.7 milestone Mar 9, 2026
Comment thread src/data/abilities/ab-attrs.ts
Comment thread src/data/moves/move.ts
Comment thread src/ai/ai-moveset-gen.ts Outdated
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Comment thread src/ai/ai-moveset-gen.ts
Comment thread src/data/abilities/ab-attrs.ts
@SirzBenjie SirzBenjie force-pushed the balance/remove-bad-moves branch from 9d4cac1 to 4a1d352 Compare March 9, 2026 04:02
@DayKev DayKev merged commit 2ad39d1 into pagefaultgames:beta Mar 9, 2026
13 checks passed
@SirzBenjie SirzBenjie deleted the balance/remove-bad-moves branch April 1, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Affects the Enemy Pokemon and/or Trainer AI Game Balance Changes focused on game balance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants