From 5f95e0aca5d86b61b36c10ae246f147212808c8e Mon Sep 17 00:00:00 2001
From: Shriansh Chari <30420527+shrianshChari@users.noreply.github.com>
Date: Mon, 14 Apr 2025 18:23:38 -0700
Subject: [PATCH 01/10] Teams: Change Judgment's type icon if the item allows
---
teams.pokemonshowdown.com/src/teams-view.tsx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/teams.pokemonshowdown.com/src/teams-view.tsx b/teams.pokemonshowdown.com/src/teams-view.tsx
index 5ad4f58cb..f96856335 100644
--- a/teams.pokemonshowdown.com/src/teams-view.tsx
+++ b/teams.pokemonshowdown.com/src/teams-view.tsx
@@ -149,8 +149,13 @@ function PokemonSet({ set }: { set: Dex.PokemonSet }) {
move = move.slice(0, 13);
move = `${move}[${hpType}]`;
}
+
+ let judgmentType;
+ if (move === 'Judgment' && set.item && Dex.items.get(set.item).onPlate) {
+ judgmentType = Dex.items.get(set.item).onPlate;
+ }
// hide the alt so it doesn't interfere w/ copy/pasting
- return <>- {move}
>;
+ return <>- {move}
>;
}) : <>>}
{typeof set.happiness === 'number' && set.happiness !== 255 && !isNaN(set.happiness) ?
From faf7bc5970712f29f2e8a230bfccf8396a73c9e2 Mon Sep 17 00:00:00 2001
From: Shriansh Chari <30420527+shrianshChari@users.noreply.github.com>
Date: Mon, 14 Apr 2025 18:31:02 -0700
Subject: [PATCH 02/10] Make it explicitly `null` to adhere to PS convention
---
teams.pokemonshowdown.com/src/teams-view.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/teams.pokemonshowdown.com/src/teams-view.tsx b/teams.pokemonshowdown.com/src/teams-view.tsx
index f96856335..fc6c5f909 100644
--- a/teams.pokemonshowdown.com/src/teams-view.tsx
+++ b/teams.pokemonshowdown.com/src/teams-view.tsx
@@ -150,7 +150,7 @@ function PokemonSet({ set }: { set: Dex.PokemonSet }) {
move = `${move}[${hpType}]`;
}
- let judgmentType;
+ let judgmentType = null;
if (move === 'Judgment' && set.item && Dex.items.get(set.item).onPlate) {
judgmentType = Dex.items.get(set.item).onPlate;
}
From 794cffce905265f0f73c926cb08e280dd5f2f423 Mon Sep 17 00:00:00 2001
From: Shriansh Chari <30420527+shrianshChari@users.noreply.github.com>
Date: Mon, 14 Apr 2025 18:40:45 -0700
Subject: [PATCH 03/10] Z-moves shouldn't work
---
teams.pokemonshowdown.com/src/teams-view.tsx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/teams.pokemonshowdown.com/src/teams-view.tsx b/teams.pokemonshowdown.com/src/teams-view.tsx
index fc6c5f909..9aa18d915 100644
--- a/teams.pokemonshowdown.com/src/teams-view.tsx
+++ b/teams.pokemonshowdown.com/src/teams-view.tsx
@@ -151,8 +151,11 @@ function PokemonSet({ set }: { set: Dex.PokemonSet }) {
}
let judgmentType = null;
- if (move === 'Judgment' && set.item && Dex.items.get(set.item).onPlate) {
- judgmentType = Dex.items.get(set.item).onPlate;
+ if (move === 'Judgment' && set.item) {
+ let item = Dex.items.get(set.item);
+ if (item.onPlate && !item.zMoveType) {
+ judgmentType = item.onPlate;
+ }
}
// hide the alt so it doesn't interfere w/ copy/pasting
return <>- {move}
>;
From 30039cec692fbe7e8e79b7e3a3b74efc1aa1b84f Mon Sep 17 00:00:00 2001
From: Shriansh Chari <30420527+shrianshChari@users.noreply.github.com>
Date: Mon, 14 Apr 2025 19:33:16 -0700
Subject: [PATCH 04/10] Add more than just Judgment
---
teams.pokemonshowdown.com/src/teams-view.tsx | 69 ++++++++++++++++++--
1 file changed, 63 insertions(+), 6 deletions(-)
diff --git a/teams.pokemonshowdown.com/src/teams-view.tsx b/teams.pokemonshowdown.com/src/teams-view.tsx
index 9aa18d915..abec17135 100644
--- a/teams.pokemonshowdown.com/src/teams-view.tsx
+++ b/teams.pokemonshowdown.com/src/teams-view.tsx
@@ -150,15 +150,72 @@ function PokemonSet({ set }: { set: Dex.PokemonSet }) {
move = `${move}[${hpType}]`;
}
- let judgmentType = null;
- if (move === 'Judgment' && set.item) {
- let item = Dex.items.get(set.item);
- if (item.onPlate && !item.zMoveType) {
- judgmentType = item.onPlate;
+ let forcedType = null;
+ let item = Dex.items.get(set.item);
+ if (item) {
+ if (move === 'Judgment' && item.onPlate && !item.zMoveType) {
+ forcedType = item.onPlate;
+ } else if (move === 'Multi-Attack' && item.onMemory) {
+ forcedType = item.onMemory;
+ } else if (move === 'Techno Blast' && item.onDrive) {
+ forcedType = item.onDrive;
+ } else if (move === 'Natural Gift' && item.naturalGift) {
+ forcedType = item.naturalGift;
}
}
+
+ if (move === 'Raging Bull') {
+ switch (set.species) {
+ case 'Tauros-Paldea-Combat':
+ forcedType = 'Fighting';
+ break;
+ case 'Tauros-Paldea-Blaze':
+ forcedType = 'Fire';
+ break;
+ case 'Tauros-Paldea-Aqua':
+ forcedType = 'Water';
+ break;
+ }
+ }
+
+ if (move === 'Ivy Cudgel') {
+ switch (set.species) {
+ case 'Ogerpon-Cornerstone':
+ forcedType = 'Fighting';
+ break;
+ case 'Ogerpon-Hearthflame':
+ forcedType = 'Fire';
+ break;
+ case 'Ogerpon-Wellspring':
+ forcedType = 'Water';
+ break;
+ }
+ }
+
+ if (set.ability) {
+ const noTypeOverride = [
+ 'Judgment', 'Multi Attack', 'Natural Gift', 'Revelation Dance', 'Techno Blast', 'Terrain Pulse', 'Weather Ball',
+ ];
+ const allowTypeOverride = !noTypeOverride.includes(move);
+ if (set.ability === 'Normalize') {
+ forcedType = 'Normal';
+ } else if (allowTypeOverride && Dex.moves.get(move).type === 'Normal') {
+ if (set.ability === 'Aerilate') {
+ forcedType = 'Flying';
+ } else if (set.ability === 'Galvanize') {
+ forcedType = 'Electric';
+ } else if (set.ability === 'Pixilate') {
+ forcedType = 'Fairy';
+ } else if (set.ability === 'Refrigerate') {
+ forcedType = 'Ice';
+ }
+ } else if (set.ability === 'Liquid Voice' && Dex.moves.get(move).flags.sound) {
+ forcedType = 'Water';
+ }
+ }
+
// hide the alt so it doesn't interfere w/ copy/pasting
- return <>- {move}
>;
+ return <>- {move}
>;
}) : <>>}
{typeof set.happiness === 'number' && set.happiness !== 255 && !isNaN(set.happiness) ?
From e1ead25d807d44380b89c667da18fc71a991adc8 Mon Sep 17 00:00:00 2001
From: Shriansh Chari <30420527+shrianshChari@users.noreply.github.com>
Date: Mon, 14 Apr 2025 19:35:52 -0700
Subject: [PATCH 05/10] Add Revelation Dance and explicit type checking
---
teams.pokemonshowdown.com/src/teams-view.tsx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/teams.pokemonshowdown.com/src/teams-view.tsx b/teams.pokemonshowdown.com/src/teams-view.tsx
index abec17135..b54c16fb0 100644
--- a/teams.pokemonshowdown.com/src/teams-view.tsx
+++ b/teams.pokemonshowdown.com/src/teams-view.tsx
@@ -5,7 +5,7 @@ import { Net, PSIcon, getShowdownUsername, unpackTeam } from './utils';
import { BattleLog } from '../../play.pokemonshowdown.com/src/battle-log';
import type { PageProps } from './teams';
import { Dex } from '../../play.pokemonshowdown.com/src/battle-dex';
-import { BattleStatNames } from '../../play.pokemonshowdown.com/src/battle-dex-data';
+import { BattleStatNames, type TypeName } from '../../play.pokemonshowdown.com/src/battle-dex-data';
declare const toID: (str: any) => string;
declare const BattleAliases: Record;
@@ -150,7 +150,7 @@ function PokemonSet({ set }: { set: Dex.PokemonSet }) {
move = `${move}[${hpType}]`;
}
- let forcedType = null;
+ let forcedType: TypeName | null = null;
let item = Dex.items.get(set.item);
if (item) {
if (move === 'Judgment' && item.onPlate && !item.zMoveType) {
@@ -176,9 +176,7 @@ function PokemonSet({ set }: { set: Dex.PokemonSet }) {
forcedType = 'Water';
break;
}
- }
-
- if (move === 'Ivy Cudgel') {
+ } else if (move === 'Ivy Cudgel') {
switch (set.species) {
case 'Ogerpon-Cornerstone':
forcedType = 'Fighting';
@@ -190,6 +188,8 @@ function PokemonSet({ set }: { set: Dex.PokemonSet }) {
forcedType = 'Water';
break;
}
+ } else if (move === 'Revelation Dance') {
+ forcedType = Dex.species.get(set.species).types[0]
}
if (set.ability) {
From 5206ce677f134411d6678762383bb129f29e096c Mon Sep 17 00:00:00 2001
From: Shriansh Chari <30420527+shrianshChari@users.noreply.github.com>
Date: Mon, 14 Apr 2025 19:36:21 -0700
Subject: [PATCH 06/10] Satisfy linter
---
teams.pokemonshowdown.com/src/teams-view.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/teams.pokemonshowdown.com/src/teams-view.tsx b/teams.pokemonshowdown.com/src/teams-view.tsx
index b54c16fb0..fa0a5e53d 100644
--- a/teams.pokemonshowdown.com/src/teams-view.tsx
+++ b/teams.pokemonshowdown.com/src/teams-view.tsx
@@ -189,7 +189,7 @@ function PokemonSet({ set }: { set: Dex.PokemonSet }) {
break;
}
} else if (move === 'Revelation Dance') {
- forcedType = Dex.species.get(set.species).types[0]
+ forcedType = Dex.species.get(set.species).types[0];
}
if (set.ability) {
From 0070dc2dc036379a5f8724ed31b2e2a3750ff325 Mon Sep 17 00:00:00 2001
From: Shriansh Chari <30420527+shrianshChari@users.noreply.github.com>
Date: Mon, 14 Apr 2025 19:39:46 -0700
Subject: [PATCH 07/10] Remove the `||`
---
teams.pokemonshowdown.com/src/teams-view.tsx | 40 ++++++++++----------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/teams.pokemonshowdown.com/src/teams-view.tsx b/teams.pokemonshowdown.com/src/teams-view.tsx
index fa0a5e53d..ce18a4f94 100644
--- a/teams.pokemonshowdown.com/src/teams-view.tsx
+++ b/teams.pokemonshowdown.com/src/teams-view.tsx
@@ -5,7 +5,7 @@ import { Net, PSIcon, getShowdownUsername, unpackTeam } from './utils';
import { BattleLog } from '../../play.pokemonshowdown.com/src/battle-log';
import type { PageProps } from './teams';
import { Dex } from '../../play.pokemonshowdown.com/src/battle-dex';
-import { BattleStatNames, type TypeName } from '../../play.pokemonshowdown.com/src/battle-dex-data';
+import { BattleStatNames } from '../../play.pokemonshowdown.com/src/battle-dex-data';
declare const toID: (str: any) => string;
declare const BattleAliases: Record;
@@ -150,46 +150,46 @@ function PokemonSet({ set }: { set: Dex.PokemonSet }) {
move = `${move}[${hpType}]`;
}
- let forcedType: TypeName | null = null;
+ let moveType = Dex.moves.get(move).type;
let item = Dex.items.get(set.item);
if (item) {
if (move === 'Judgment' && item.onPlate && !item.zMoveType) {
- forcedType = item.onPlate;
+ moveType = item.onPlate;
} else if (move === 'Multi-Attack' && item.onMemory) {
- forcedType = item.onMemory;
+ moveType = item.onMemory;
} else if (move === 'Techno Blast' && item.onDrive) {
- forcedType = item.onDrive;
+ moveType = item.onDrive;
} else if (move === 'Natural Gift' && item.naturalGift) {
- forcedType = item.naturalGift;
+ moveType = item.naturalGift;
}
}
if (move === 'Raging Bull') {
switch (set.species) {
case 'Tauros-Paldea-Combat':
- forcedType = 'Fighting';
+ moveType = 'Fighting';
break;
case 'Tauros-Paldea-Blaze':
- forcedType = 'Fire';
+ moveType = 'Fire';
break;
case 'Tauros-Paldea-Aqua':
- forcedType = 'Water';
+ moveType = 'Water';
break;
}
} else if (move === 'Ivy Cudgel') {
switch (set.species) {
case 'Ogerpon-Cornerstone':
- forcedType = 'Fighting';
+ moveType = 'Fighting';
break;
case 'Ogerpon-Hearthflame':
- forcedType = 'Fire';
+ moveType = 'Fire';
break;
case 'Ogerpon-Wellspring':
- forcedType = 'Water';
+ moveType = 'Water';
break;
}
} else if (move === 'Revelation Dance') {
- forcedType = Dex.species.get(set.species).types[0];
+ moveType = Dex.species.get(set.species).types[0];
}
if (set.ability) {
@@ -198,24 +198,24 @@ function PokemonSet({ set }: { set: Dex.PokemonSet }) {
];
const allowTypeOverride = !noTypeOverride.includes(move);
if (set.ability === 'Normalize') {
- forcedType = 'Normal';
+ moveType = 'Normal';
} else if (allowTypeOverride && Dex.moves.get(move).type === 'Normal') {
if (set.ability === 'Aerilate') {
- forcedType = 'Flying';
+ moveType = 'Flying';
} else if (set.ability === 'Galvanize') {
- forcedType = 'Electric';
+ moveType = 'Electric';
} else if (set.ability === 'Pixilate') {
- forcedType = 'Fairy';
+ moveType = 'Fairy';
} else if (set.ability === 'Refrigerate') {
- forcedType = 'Ice';
+ moveType = 'Ice';
}
} else if (set.ability === 'Liquid Voice' && Dex.moves.get(move).flags.sound) {
- forcedType = 'Water';
+ moveType = 'Water';
}
}
// hide the alt so it doesn't interfere w/ copy/pasting
- return <>- {move}
>;
+ return <>- {move}
>;
}) : <>>}
{typeof set.happiness === 'number' && set.happiness !== 255 && !isNaN(set.happiness) ?
From d9820fec2cde70eee07f48327480740a50a48b47 Mon Sep 17 00:00:00 2001
From: Shriansh Chari <30420527+shrianshChari@users.noreply.github.com>
Date: Wed, 16 Apr 2025 11:23:00 -0700
Subject: [PATCH 08/10] Fix Natural Gift (this is why we don't use `any`!)
---
teams.pokemonshowdown.com/src/teams-view.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/teams.pokemonshowdown.com/src/teams-view.tsx b/teams.pokemonshowdown.com/src/teams-view.tsx
index ce18a4f94..47dd2e0b7 100644
--- a/teams.pokemonshowdown.com/src/teams-view.tsx
+++ b/teams.pokemonshowdown.com/src/teams-view.tsx
@@ -160,7 +160,7 @@ function PokemonSet({ set }: { set: Dex.PokemonSet }) {
} else if (move === 'Techno Blast' && item.onDrive) {
moveType = item.onDrive;
} else if (move === 'Natural Gift' && item.naturalGift) {
- moveType = item.naturalGift;
+ moveType = item.naturalGift.type;
}
}
From 06b2ec5ff850d137aebb1647e3320cf0f2e7b99e Mon Sep 17 00:00:00 2001
From: Shriansh Chari <30420527+shrianshChari@users.noreply.github.com>
Date: Mon, 14 Jul 2025 15:00:26 -0700
Subject: [PATCH 09/10] Fix Ogerpon-Cornerstone's Ivy Cudgel type
---
teams.pokemonshowdown.com/src/teams-view.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/teams.pokemonshowdown.com/src/teams-view.tsx b/teams.pokemonshowdown.com/src/teams-view.tsx
index 47dd2e0b7..a015702d0 100644
--- a/teams.pokemonshowdown.com/src/teams-view.tsx
+++ b/teams.pokemonshowdown.com/src/teams-view.tsx
@@ -179,7 +179,7 @@ function PokemonSet({ set }: { set: Dex.PokemonSet }) {
} else if (move === 'Ivy Cudgel') {
switch (set.species) {
case 'Ogerpon-Cornerstone':
- moveType = 'Fighting';
+ moveType = 'Rock';
break;
case 'Ogerpon-Hearthflame':
moveType = 'Fire';
From 9ec4810e82adb179abca483d9c514459d2bee2ca Mon Sep 17 00:00:00 2001
From: Shriansh Chari <30420527+shrianshChari@users.noreply.github.com>
Date: Tue, 23 Sep 2025 14:09:05 -0700
Subject: [PATCH 10/10] Raging Bull that is not Normal-type shouldn't be
affected by -ate abilities
---
teams.pokemonshowdown.com/src/teams-view.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/teams.pokemonshowdown.com/src/teams-view.tsx b/teams.pokemonshowdown.com/src/teams-view.tsx
index a015702d0..6b0e56aa8 100644
--- a/teams.pokemonshowdown.com/src/teams-view.tsx
+++ b/teams.pokemonshowdown.com/src/teams-view.tsx
@@ -199,7 +199,7 @@ function PokemonSet({ set }: { set: Dex.PokemonSet }) {
const allowTypeOverride = !noTypeOverride.includes(move);
if (set.ability === 'Normalize') {
moveType = 'Normal';
- } else if (allowTypeOverride && Dex.moves.get(move).type === 'Normal') {
+ } else if (allowTypeOverride && moveType === 'Normal') {
if (set.ability === 'Aerilate') {
moveType = 'Flying';
} else if (set.ability === 'Galvanize') {