Skip to content

Commit

Permalink
Randomized format updates (#10306)
Browse files Browse the repository at this point in the history
  • Loading branch information
livid-washed committed May 19, 2024
1 parent 002bf04 commit 7158ead
Show file tree
Hide file tree
Showing 13 changed files with 277 additions and 143 deletions.
6 changes: 1 addition & 5 deletions data/random-battles/gen2/sets.json
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@
},
{
"role": "Fast Attacker",
"movepool": ["explosion", "hiddenpowerice", "lightscreen", "reflect", "thunder"]
"movepool": ["explosion", "hiddenpowerice", "lightscreen", "reflect", "thunder", "thunderbolt"]
}
]
},
Expand Down Expand Up @@ -1160,10 +1160,6 @@
{
"role": "Generalist",
"movepool": ["encore", "hiddenpowerflying", "leechseed", "stunspore"]
},
{
"role": "Bulky Support",
"movepool": ["encore", "reflect", "stunspore", "synthesis"]
}
]
},
Expand Down
8 changes: 2 additions & 6 deletions data/random-battles/gen3/sets.json
Original file line number Diff line number Diff line change
Expand Up @@ -1387,8 +1387,8 @@
"movepool": ["doubleedge", "earthquake", "explosion", "hiddenpowerrock", "irontail", "rest", "roar", "toxic"]
},
{
"role": "Bulky Support",
"movepool": ["doubleedge", "earthquake", "hiddenpowerrock", "rest", "sleeptalk"]
"role": "Staller",
"movepool": ["doubleedge", "earthquake", "hiddenpowerrock", "protect", "toxic"]
}
]
},
Expand Down Expand Up @@ -1976,10 +1976,6 @@
"slaking": {
"level": 79,
"sets": [
{
"role": "Wallbreaker",
"movepool": ["doubleedge", "earthquake", "focuspunch", "return", "shadowball"]
},
{
"role": "Fast Attacker",
"movepool": ["doubleedge", "earthquake", "hyperbeam", "return", "shadowball"]
Expand Down
66 changes: 50 additions & 16 deletions data/random-battles/gen4/sets.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
},
{
"role": "Setup Sweeper",
"movepool": ["hiddenpowerfire", "sludgebomb", "solarbeam", "sunnyday", "synthesis"]
"movepool": ["hiddenpowerfire", "sludgebomb", "solarbeam", "sunnyday"]
}
]
},
Expand Down Expand Up @@ -944,7 +944,7 @@
"sets": [
{
"role": "Bulky Support",
"movepool": ["energyball", "hiddenpowerfire", "hiddenpowerrock", "leafstorm", "sleeppowder", "stunspore", "synthesis"]
"movepool": ["energyball", "hiddenpowerfire", "hiddenpowerrock", "leafstorm", "leechseed", "sleeppowder", "stunspore", "synthesis"]
}
]
},
Expand Down Expand Up @@ -1020,11 +1020,11 @@
"sets": [
{
"role": "Fast Attacker",
"movepool": ["calmmind", "hiddenpowerfire", "morningsun", "psychic", "signalbeam", "trick"]
"movepool": ["calmmind", "hiddenpowerfighting", "morningsun", "psychic", "signalbeam", "trick"]
},
{
"role": "Setup Sweeper",
"movepool": ["batonpass", "calmmind", "hiddenpowerfire", "morningsun", "psychic", "substitute"]
"movepool": ["batonpass", "calmmind", "hiddenpowerfighting", "morningsun", "psychic", "substitute"]
}
]
},
Expand Down Expand Up @@ -1112,6 +1112,10 @@
{
"role": "Bulky Support",
"movepool": ["earthquake", "explosion", "ironhead", "roar", "stealthrock", "stoneedge", "toxic"]
},
{
"role": "Staller",
"movepool": ["earthquake", "ironhead", "protect", "toxic"]
}
]
},
Expand Down Expand Up @@ -1150,8 +1154,8 @@
"level": 93,
"sets": [
{
"role": "Staller",
"movepool": ["encore", "knockoff", "rest", "stealthrock", "toxic"]
"role": "Bulky Support",
"movepool": ["encore", "knockoff", "protect", "stealthrock", "toxic"]
}
]
},
Expand Down Expand Up @@ -1218,7 +1222,11 @@
"sets": [
{
"role": "Bulky Support",
"movepool": ["hiddenpowerflying", "rest", "sleeptalk", "surf", "toxic"]
"movepool": ["rest", "sleeptalk", "surf", "toxic"]
},
{
"role": "Staller",
"movepool": ["hiddenpowerflying", "protect", "surf", "toxic"]
}
]
},
Expand Down Expand Up @@ -1736,6 +1744,10 @@
{
"role": "Bulky Setup",
"movepool": ["batonpass", "encore", "hiddenpowerice", "nastyplot", "thunderbolt"]
},
{
"role": "Setup Sweeper",
"movepool": ["grassknot", "hiddenpowerice", "nastyplot", "thunderbolt"]
}
]
},
Expand All @@ -1745,6 +1757,10 @@
{
"role": "Bulky Setup",
"movepool": ["batonpass", "encore", "hiddenpowerice", "nastyplot", "thunderbolt"]
},
{
"role": "Setup Sweeper",
"movepool": ["grassknot", "hiddenpowerice", "nastyplot", "thunderbolt"]
}
]
},
Expand Down Expand Up @@ -2226,7 +2242,7 @@
},
{
"role": "Staller",
"movepool": ["protect", "seismictoss", "stealthrock", "toxic"]
"movepool": ["protect", "seismictoss", "stealthrock", "thunderwave", "toxic"]
}
]
},
Expand Down Expand Up @@ -2493,7 +2509,7 @@
"sets": [
{
"role": "Staller",
"movepool": ["flashcannon", "protect", "stealthrock", "toxic"]
"movepool": ["flashcannon", "protect", "stealthrock", "suckerpunch", "toxic"]
}
]
},
Expand Down Expand Up @@ -2619,7 +2635,7 @@
"sets": [
{
"role": "Fast Attacker",
"movepool": ["fakeout", "return", "shadowclaw", "taunt", "uturn"]
"movepool": ["fakeout", "irontail", "return", "shadowclaw", "uturn"]
}
]
},
Expand Down Expand Up @@ -2693,7 +2709,7 @@
"sets": [
{
"role": "Fast Attacker",
"movepool": ["closecombat", "crunch", "extremespeed", "icepunch", "swordsdance"],
"movepool": ["closecombat", "crunch", "extremespeed", "stoneedge", "swordsdance"],
"preferredTypes": ["Normal"]
}
]
Expand Down Expand Up @@ -2950,9 +2966,13 @@
"sets": [
{
"role": "Bulky Support",
"movepool": ["earthquake", "icepunch", "painsplit", "shadowsneak", "trick", "willowisp"],
"movepool": ["earthquake", "icepunch", "painsplit", "shadowsneak", "toxic", "trick", "willowisp"],
"preferredTypes": ["Ground"]
},
{
"role": "Staller",
"movepool": ["earthquake", "protect", "shadowsneak", "toxic"]
},
{
"role": "Bulky Attacker",
"movepool": ["focuspunch", "painsplit", "shadowsneak", "substitute"]
Expand Down Expand Up @@ -2984,6 +3004,10 @@
"role": "Bulky Attacker",
"movepool": ["overheat", "painsplit", "shadowball", "thunderbolt", "trick", "willowisp"],
"preferredTypes": ["Fire"]
},
{
"role": "Bulky Support",
"movepool": ["rest", "shadowball", "sleeptalk", "thunderbolt"]
}
]
},
Expand All @@ -2994,6 +3018,10 @@
"role": "Bulky Attacker",
"movepool": ["hydropump", "painsplit", "shadowball", "thunderbolt", "trick", "willowisp"],
"preferredTypes": ["Water"]
},
{
"role": "Bulky Support",
"movepool": ["rest", "shadowball", "sleeptalk", "thunderbolt"]
}
]
},
Expand Down Expand Up @@ -3031,6 +3059,10 @@
"role": "Bulky Attacker",
"movepool": ["leafstorm", "painsplit", "shadowball", "thunderbolt", "trick", "willowisp"],
"preferredTypes": ["Grass"]
},
{
"role": "Bulky Support",
"movepool": ["rest", "shadowball", "sleeptalk", "thunderbolt"]
}
]
},
Expand All @@ -3048,11 +3080,11 @@
"sets": [
{
"role": "Fast Attacker",
"movepool": ["calmmind", "healingwish", "hiddenpowerfire", "icebeam", "psychic", "thunderbolt", "trick", "uturn"]
"movepool": ["calmmind", "healingwish", "hiddenpowerfighting", "icebeam", "psychic", "thunderbolt", "trick", "uturn"]
},
{
"role": "Bulky Support",
"movepool": ["hiddenpowerfire", "psychic", "stealthrock", "thunderwave", "toxic", "uturn"]
"movepool": ["hiddenpowerfighting", "psychic", "stealthrock", "thunderwave", "toxic", "uturn"]
}
]
},
Expand Down Expand Up @@ -3351,11 +3383,13 @@
"sets": [
{
"role": "Setup Sweeper",
"movepool": ["calmmind", "earthpower", "fireblast", "recover", "sludgebomb"]
"movepool": ["calmmind", "earthpower", "fireblast", "recover", "sludgebomb"],
"preferredTypes": ["Ground"]
},
{
"role": "Bulky Attacker",
"movepool": ["earthquake", "fireblast", "icebeam", "recover", "sludgebomb", "stealthrock", "willowisp"]
"movepool": ["earthquake", "fireblast", "icebeam", "recover", "sludgebomb", "stealthrock", "willowisp"],
"preferredTypes": ["Ground"]
}
]
},
Expand Down
22 changes: 18 additions & 4 deletions data/random-battles/gen4/teams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class RandomGen4Teams extends RandomGen5Teams {
Electric: (movePool, moves, abilities, types, counter) => !counter.get('Electric'),
Fighting: (movePool, moves, abilities, types, counter) => !counter.get('Fighting'),
Fire: (movePool, moves, abilities, types, counter) => !counter.get('Fire'),
Flying: (movePool, moves, abilities, types, counter, species) => (!counter.get('Flying') && species.id !== 'mantine'),
Flying: (movePool, moves, abilities, types, counter, species) => !counter.get('Flying'),
Ghost: (movePool, moves, abilities, types, counter) => !counter.get('Ghost'),
Grass: (movePool, moves, abilities, types, counter, species) => (
!counter.get('Grass') &&
Expand Down Expand Up @@ -201,6 +201,8 @@ export class RandomGen4Teams extends RandomGen5Teams {
['bodyslam', 'healingwish'],
// Blaziken
['agility', 'vacuumwave'],
// Shuckle
['knockoff', 'protect'],
];

for (const pair of incompatiblePairs) this.incompatibleMoves(moves, movePool, pair[0], pair[1]);
Expand All @@ -209,6 +211,18 @@ export class RandomGen4Teams extends RandomGen5Teams {
if (role !== 'Staller') {
this.incompatibleMoves(moves, movePool, statusInflictingMoves, statusInflictingMoves);
}

// Cull filler moves for otherwise fixed set Stealth Rock users
if (!teamDetails.stealthRock) {
if (species.id === 'registeel' && role === 'Staller') {
if (movePool.includes('thunderwave')) this.fastPop(movePool, movePool.indexOf('thunderwave'));
if (moves.size + movePool.length <= this.maxMoveCount) return;
}
if (species.id === 'wormadamtrash' && role === 'Staller') {
if (movePool.includes('suckerpunch')) this.fastPop(movePool, movePool.indexOf('suckerpunch'));
if (moves.size + movePool.length <= this.maxMoveCount) return;
}
}
}

// Generate random moveset for a given species, role, preferred type.
Expand Down Expand Up @@ -635,8 +649,7 @@ export class RandomGen4Teams extends RandomGen5Teams {
if (['batonpass', 'protect', 'substitute'].some(m => moves.has(m))) return 'Leftovers';
if (
role === 'Fast Support' && isLead && defensiveStatTotal < 255 && !counter.get('recovery') &&
(!counter.get('recoil') || ability === 'Rock Head') &&
(counter.get('hazards') || !moves.has('uturn'))
(counter.get('hazards') || counter.get('setup')) && (!counter.get('recoil') || ability === 'Rock Head')
) return 'Focus Sash';

// Default Items
Expand Down Expand Up @@ -755,7 +768,8 @@ export class RandomGen4Teams extends RandomGen5Teams {
if (hp % 2 === 0) break;
} else {
// Maximize number of Stealth Rock switch-ins
if (srWeakness <= 0 || ['Black Sludge', 'Leftovers', 'Life Orb'].includes(item)) break;
if (srWeakness <= 0) break;
if (srWeakness === 1 && ['Black Sludge', 'Leftovers', 'Life Orb'].includes(item)) break;
if (item !== 'Sitrus Berry' && hp % (4 / srWeakness) > 0) break;
// Minimise number of Stealth Rock switch-ins to activate Sitrus Berry
if (item === 'Sitrus Berry' && hp % (4 / srWeakness) === 0) break;
Expand Down

0 comments on commit 7158ead

Please sign in to comment.