mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-01 07:28:05 +00:00
[Balance] Make dual STABs way more likely #5401
This commit is contained in:
parent
8f15788b39
commit
9fb654ce73
@ -2395,14 +2395,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
while (baseWeights.length > this.moveset.length && this.moveset.length < 4) {
|
||||
if (this.hasTrainer()) {
|
||||
// Sqrt the weight of any damaging moves with overlapping types. This is about a 0.05 - 0.1 multiplier.
|
||||
// Other damaging moves 2x weight if 0-1 damaging moves, 0.5x if 2, 0.125x if 3. These weights double if STAB.
|
||||
// Other damaging moves 2x weight if 0-1 damaging moves, 0.5x if 2, 0.125x if 3. These weights get 20x if STAB.
|
||||
// Status moves remain unchanged on weight, this encourages 1-2
|
||||
movePool = baseWeights.filter(m => !this.moveset.some(mo => m[0] === mo?.moveId)).map((m) => {
|
||||
let ret: number;
|
||||
if (this.moveset.some(mo => mo?.getMove().category !== MoveCategory.STATUS && mo?.getMove().type === allMoves[m[0]].type)) {
|
||||
ret = Math.ceil(Math.sqrt(m[1]));
|
||||
} else if (allMoves[m[0]].category !== MoveCategory.STATUS) {
|
||||
ret = Math.ceil(m[1] / Math.max(Math.pow(4, this.moveset.filter(mo => (mo?.getMove().power ?? 0) > 1).length) / 8, 0.5) * (this.isOfType(allMoves[m[0]].type) ? 2 : 1));
|
||||
ret = Math.ceil(m[1] / Math.max(Math.pow(4, this.moveset.filter(mo => (mo?.getMove().power ?? 0) > 1).length) / 8, 0.5) * (this.isOfType(allMoves[m[0]].type) ? 20 : 1));
|
||||
} else {
|
||||
ret = m[1];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user