Fix weather ball display (#2709)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled

This commit is contained in:
ry
2026-07-03 08:57:40 -05:00
committed by GitHub
parent f789748b2f
commit 2b45bf167b

View File

@@ -1665,12 +1665,12 @@ export class BattleTooltips {
switch (this.battle.weather) {
case 'sunnyday':
case 'desolateland':
if (item.id === 'utilityumbrella') break;
if (value.tryItem('Utility Umbrella')) break;
moveType = 'Fire';
break;
case 'raindance':
case 'primordialsea':
if (item.id === 'utilityumbrella') break;
if (value.tryItem('Utility Umbrella')) break;
moveType = 'Water';
break;
case 'sandstorm':
@@ -1792,7 +1792,7 @@ export class BattleTooltips {
moveType = 'Stellar';
}
if (move.id === 'weatherball' && value.weatherModify(0)) {
if (this.battle.weather === 'stormsurge' && item.id !== 'utilityumbrella') moveType = 'Water';
if (this.battle.weather === 'stormsurge' && !value.tryItem('Utility Umbrella')) moveType = 'Water';
if (this.battle.weather === 'deserteddunes') moveType = 'Rock';
}
if (move.id === 'o' || move.id === 'worriednoises') {
@@ -2317,7 +2317,19 @@ export class BattleTooltips {
}
if (move.id === 'weatherball') {
if (!value.abilityModify(2, "Mega Sol") && this.battle.weather !== 'deltastream') {
value.weatherModify(2);
switch (this.battle.weather) {
case 'sunnyday':
case 'desolateland':
case 'raindance':
case 'primordialsea':
case 'stormsurge':
if (value.tryItem('Utility Umbrella')) break;
value.weatherModify(2);
break;
default:
value.weatherModify(2);
break;
}
}
}
if (move.id === 'hydrosteam') {