mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
Fix tooltips for Crystal Free Z-Moves (#2575)
This commit is contained in:
parent
ddfd9034a8
commit
54a573b815
|
|
@ -1527,11 +1527,13 @@ export class Battle {
|
|||
if (!fromeffect.id || callerMoveForPressure || fromeffect.id === 'pursuit') {
|
||||
let moveName = move.name;
|
||||
if (!callerMoveForPressure) {
|
||||
if (move.isZ) {
|
||||
const previousLine = this.stepQueue[this.currentStep - 1];
|
||||
const zPower = previousLine.startsWith('|-zpower');
|
||||
if (move.isZ && zPower) {
|
||||
pokemon.item = move.isZ;
|
||||
let item = Dex.items.get(move.isZ);
|
||||
if (item.zMoveFrom) moveName = item.zMoveFrom;
|
||||
} else if (move.name.startsWith('Z-')) {
|
||||
} else if (move.name.startsWith('Z-') && zPower) {
|
||||
moveName = moveName.slice(2);
|
||||
move = Dex.moves.get(moveName);
|
||||
if (window.BattleItems) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user