Sort party select: conscious Pokemon first, then fainted, most recent within each group

This commit is contained in:
Sterling Archer committed 2026-05-27 15:44:47 -07:00
1 parent 5e74d5f677
commit 96abd838a4
1 file changed
+1 -1
+1 -1
View File
@@ -686,7 +686,7 @@ class Game {
const list = document.getElementById('party-select-list');
list.innerHTML = '';
const ordered = [...this.state.party].reverse();
const ordered = [...this.state.party].reverse().sort((a, b) => (a.fainted ? 1 : 0) - (b.fainted ? 1 : 0));
ordered.forEach((poke, i) => {
const entry = document.createElement('div');