From 12396f4dac8c781e06edbc95687b3267c2b647ab Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Tue, 4 Aug 2026 16:16:11 -0700 Subject: [PATCH] Toggle OSKIEWAR P2 dummy mode --- xbox/live/hello.js | 15 ++++++++++++++- xbox/live/tests/hello.test.mjs | 16 ++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/xbox/live/hello.js b/xbox/live/hello.js index beb76192d5..29e8f6c871 100644 --- a/xbox/live/hello.js +++ b/xbox/live/hello.js @@ -341,6 +341,18 @@ function updateSelect(now) { } const previous = selectionPrevious[player.pad]; const pressed = (button) => down.includes(button) && !previous.includes(button); + if (player.pad === 0 && pressed("X")) { + const opponent = players[1]; + opponent.npc = !opponent.npc; + if (opponent.npc) { + applyRoster(opponent, -1); + selectionReady[1] = true; + } else { + applyRoster(opponent, 2); + selectionReady[1] = false; + } + drum("clap", .8, 0); + } if (pressed("B") && selectionReady[player.pad]) selectionReady[player.pad] = false; if (!selectionReady[player.pad] && (pressed("ArrowLeft") || pressed("ArrowRight"))) { applyRoster(player, player.rosterIndex + (pressed("ArrowRight") ? 1 : -1)); @@ -1313,7 +1325,8 @@ function drawSelectionScreen(t, ink, panel) { typeWrite(player.npc ? "NON-PLAYER" : "P" + (player.pad + 1), left + 355, 805, 24, ...ink); } - write("LEFT RIGHT SELECT A READY B BACK", 430, 965, 29, ...ink); + write("LEFT RIGHT SELECT A READY X P2 / DUMMY B BACK", + 290, 965, 26, ...ink); } function paint() { diff --git a/xbox/live/tests/hello.test.mjs b/xbox/live/tests/hello.test.mjs index aa0298f59f..42cc58a445 100644 --- a/xbox/live/tests/hello.test.mjs +++ b/xbox/live/tests/hello.test.mjs @@ -65,6 +65,22 @@ test("character select offers the four AC fighters and waits for both pads", () assert.equal(fight.selectionState().selecting, false); }); +test("P1 X toggles P2 between controller and dummy on character select", () => { + const { fight, pads, tick } = createFight(false); + pads[0].down = ["X"]; + tick(); + assert.equal(fight.players[1].name, "DUMMY"); + assert.equal(fight.players[1].npc, true); + assert.equal(fight.selectionState().ready[1], true); + pads[0].down = []; + tick(); + pads[0].down = ["X"]; + tick(); + assert.equal(fight.players[1].name, "@OSKIE"); + assert.equal(fight.players[1].npc, false); + assert.equal(fight.selectionState().ready[1], false); +}); + test("perspective intro never submits invalid ground triangles", () => { const { fight, pads, triangles, tick } = createFight(false); pads[0].down = ["A"]; -- 2.51.2