mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-10-25 19:57:26 -05:00
Tooltip: Count Rage Fist power (#2036)
This commit is contained in:
@@ -1784,6 +1784,13 @@ class BattleTooltips {
|
||||
value.setRange(isGKLK ? 20 : 40, 120);
|
||||
}
|
||||
}
|
||||
// Base power based on times hit
|
||||
if (move.id === 'ragefist') {
|
||||
value.set(Math.min(350, 50 + 50 * pokemon.timesAttacked),
|
||||
pokemon.timesAttacked > 0
|
||||
? `Hit ${pokemon.timesAttacked} time${pokemon.timesAttacked > 1 ? 's' : ''}`
|
||||
: undefined);
|
||||
}
|
||||
if (!value.value) return value;
|
||||
|
||||
// Other ability boosts
|
||||
|
||||
@@ -103,6 +103,7 @@ export class Pokemon implements PokemonDetails, PokemonHealth {
|
||||
/** [[moveName, ppUsed]] */
|
||||
moveTrack: [string, number][] = [];
|
||||
statusData = {sleepTurns: 0, toxicTurns: 0};
|
||||
timesAttacked = 0;
|
||||
|
||||
sprite: PokemonSprite;
|
||||
|
||||
@@ -1682,6 +1683,7 @@ export class Battle {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
poke.timesAttacked += 1;
|
||||
let damageinfo = '' + Pokemon.getFormattedRange(range, damage[1] === 100 ? 0 : 1, '\u2013');
|
||||
if (damage[1] !== 100) {
|
||||
let hover = '' + ((damage[0] < 0) ? '\u2212' : '') +
|
||||
@@ -2416,6 +2418,7 @@ export class Battle {
|
||||
poke.boosts = {...tpoke.boosts};
|
||||
poke.copyTypesFrom(tpoke);
|
||||
poke.ability = tpoke.ability;
|
||||
poke.timesAttacked = tpoke.timesAttacked;
|
||||
const targetForme = tpoke.volatiles.formechange;
|
||||
const speciesForme = (targetForme && !targetForme[1].endsWith('-Gmax')) ? targetForme[1] : tpoke.speciesForme;
|
||||
const pokemon = tpoke;
|
||||
|
||||
Reference in New Issue
Block a user