Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSB: Client-side balance patch changes #2250

Merged
merged 3 commits into from
May 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 9 additions & 22 deletions play.pokemonshowdown.com/src/battle-tooltips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -996,11 +996,6 @@ class BattleTooltips {
if (statName === 'def') sourceStatName = 'atk';
}
stats[statName] = serverPokemon.stats[sourceStatName];
// SSB
if (this.battle.tier.includes('Super Staff Bros') && clientPokemon?.volatiles['ok']) {
if (statName === 'spa') stats[statName] += Math.floor(stats.atk / 10);
if (statName === 'spe') stats[statName] += Math.floor(stats.atk * 9 / 10);
}
if (!clientPokemon) continue;

const clientStatName = clientPokemon.boosts.spc && (statName === 'spa' || statName === 'spd') ? 'spc' : statName;
Expand Down Expand Up @@ -1259,6 +1254,9 @@ class BattleTooltips {

// SSB
if (this.battle.tier.includes('Super Staff Bros')) {
if (pokemon.name === 'Felucia') {
speedModifiers.push(1.5);
}
if (ability === 'misspelled') {
stats.spa = Math.floor(stats.spa * 1.5);
}
Expand Down Expand Up @@ -1327,9 +1325,9 @@ class BattleTooltips {
for (const statName of Dex.statNamesExceptHP) {
if (clientPokemon.volatiles['ultramystik']) {
if (statName === 'spe') {
speedModifiers.push(1.5);
speedModifiers.push(1.3);
} else {
stats[statName] = Math.floor(stats[statName] * 1.5);
stats[statName] = Math.floor(stats[statName] * 1.3);
}
}
}
Expand Down Expand Up @@ -2245,18 +2243,10 @@ class BattleTooltips {
value.modify(2, 'Terastallized target');
}
if (move.id === 'mysticalbonfire' && target?.status) {
value.modify(2, 'Mystical Bonfire + status');
value.modify(1.5, 'Mystical Bonfire + status');
}
if (move.id === 'adaptivebeam' && target) {
let boostCount = 0;
let targetBoostCount = 0;
for (const boost of Object.values(pokemon.boosts)) {
if (boost > 0) boostCount += boost;
}
for (const boost of Object.values(target.boosts)) {
if (boost > 0) targetBoostCount += boost;
}
if (targetBoostCount >= boostCount) value.modify(2, "Target has more boosts");
if (move.id === 'adaptivebeam' && target && Object.values(target.boosts).some(x => x > 0)) {
value.set(0, "Target has more boosts");
}
if (value.value <= 60) {
value.abilityModify(1.5, "Confirmed Town");
Expand All @@ -2266,11 +2256,8 @@ class BattleTooltips {
if (moveType === 'Normal') value.abilityModify(this.battle.gen > 6 ? 1.2 : 1.3, "I Can Hear The Heart Beating As One");
value.abilityModify(this.battle.gen > 6 ? 1.2 : 1.3, "Acetosa");
}
if (move.flags['sound']) {
value.abilityModify(1.5, "Cacophony");
}
if (move.flags['punch']) {
value.abilityModify(1.3, "Harambe Hit");
value.abilityModify(1.5, "Harambe Hit");
}
if (move.flags['slicing']) {
value.abilityModify(1.5, "I Can Hear The Heart Beating As One");
Expand Down
Loading