mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-01 07:28:05 +00:00
[Balance] Make stat a much larger factor in moveset gen #5383
This commit is contained in:
parent
073a36a33e
commit
ed8d162125
@ -2348,12 +2348,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
const maxPower = Math.min(movePool.reduce((v, m) => Math.max(allMoves[m[0]].power, v), 40), 90);
|
||||
movePool = movePool.map(m => [ m[0], m[1] * (allMoves[m[0]].category === MoveCategory.STATUS ? 1 : Math.max(Math.min(allMoves[m[0]].power / maxPower, 1), 0.5)) ]);
|
||||
|
||||
// Weight damaging moves against the lower stat
|
||||
// Weight damaging moves against the lower stat. This uses a non-linear relationship.
|
||||
// If the higher stat is 1 - 1.09x higher, no change. At higher stat ~1.38x lower stat, off-stat moves have half weight.
|
||||
// One third weight at ~1.58x higher, one quarter weight at ~1.73x higher, one fifth at ~1.87x, and one tenth at ~2.35x higher.
|
||||
const atk = this.getStat(Stat.ATK);
|
||||
const spAtk = this.getStat(Stat.SPATK);
|
||||
const worseCategory: MoveCategory = atk > spAtk ? MoveCategory.SPECIAL : MoveCategory.PHYSICAL;
|
||||
const statRatio = worseCategory === MoveCategory.PHYSICAL ? atk / spAtk : spAtk / atk;
|
||||
movePool = movePool.map(m => [ m[0], m[1] * (allMoves[m[0]].category === worseCategory ? statRatio : 1) ]);
|
||||
movePool = movePool.map(m => [ m[0], m[1] * (allMoves[m[0]].category === worseCategory ? Math.min(Math.pow(statRatio, 3) * 1.3, 1) : 1) ]);
|
||||
|
||||
/** The higher this is the more the game weights towards higher level moves. At `0` all moves are equal weight. */
|
||||
let weightMultiplier = 0.9;
|
||||
|
Loading…
x
Reference in New Issue
Block a user