From 17b2831c89d375cbb45e80878325c60c99cd25b7 Mon Sep 17 00:00:00 2001 From: TKHR-Shiu Date: Mon, 4 May 2026 22:53:12 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=E3=82=B9=E3=83=86=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E9=81=B8=E6=8A=9E=E7=94=BB=E9=9D=A2=E3=81=AE=E8=A3=85=E9=A3=BE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/routes/selectStage.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/routes/selectStage.tsx b/app/routes/selectStage.tsx index 9fb5a9b..907be0d 100644 --- a/app/routes/selectStage.tsx +++ b/app/routes/selectStage.tsx @@ -103,15 +103,15 @@ const personDecorations = [ { src: "/if_false.png", alt: "If False Character", - top: "50rem", - right: "4rem", + top: "45rem", + right: "5rem", width: 76, }, { src: "/if_true.png", alt: "If True Character", - top: "47%", - left: "18rem", + top: "55rem", + left: "16rem", width: 76, }, { @@ -131,8 +131,8 @@ const personDecorations = [ { src: "/pop_chocolate.png", alt: "Pop Chocolate Character", - bottom: "27rem", - left: "35%", + bottom: "26rem", + left: "26rem", width: 64, }, { @@ -145,8 +145,8 @@ const personDecorations = [ { src: "/push_strawberry.png", alt: "Push Strawberry Character", - bottom: "45rem", - left: "45%", + bottom: "43rem", + left: "37rem", width: 72, }, { From bfada2a48646c732dd1ecd8eaceeff146efa38bd Mon Sep 17 00:00:00 2001 From: TKHR-Shiu Date: Mon, 4 May 2026 23:44:39 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=E8=A3=85=E9=A3=BE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot --- app/routes/selectStage.tsx | 73 ++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a/app/routes/selectStage.tsx b/app/routes/selectStage.tsx index 907be0d..2bf8e0c 100644 --- a/app/routes/selectStage.tsx +++ b/app/routes/selectStage.tsx @@ -103,58 +103,66 @@ const personDecorations = [ { src: "/if_false.png", alt: "If False Character", - top: "45rem", - right: "5rem", + stageIndex: 10, width: 76, + offsetX: 80, + offsetY: -150, }, { src: "/if_true.png", alt: "If True Character", - top: "55rem", - left: "16rem", + stageIndex: 23, width: 76, + offsetX: 40, + offsetY: -150, }, { src: "/pop_vanilla.png", alt: "Pop Vanilla Character", - top: "37rem", - left: "30rem", + stageIndex: 7, width: 64, + offsetX: 40, + offsetY: -120, }, { src: "/pop_strawberry.png", alt: "Pop Strawberry Character", - top: "14rem", - right: "4rem", + stageIndex: 2, width: 64, + offsetX: 40, + offsetY: -120, }, { src: "/pop_chocolate.png", alt: "Pop Chocolate Character", - bottom: "26rem", - left: "26rem", + stageIndex: 14, width: 64, + offsetX: 40, + offsetY: -120, }, { src: "/push_vanilla.png", alt: "Push Vanilla Character", - top: "25rem", - left: "22rem", + stageIndex: 4, width: 72, + offsetX: 40, + offsetY: -120, }, { src: "/push_strawberry.png", alt: "Push Strawberry Character", - bottom: "43rem", - left: "37rem", + stageIndex: 18, width: 72, + offsetX: 40, + offsetY: -120, }, { src: "/push_chocolate.png", alt: "Push Chocolate Character", - bottom: "37rem", - right: "5rem", + stageIndex: 21, width: 64, + offsetX: 40, + offsetY: -120, }, ]; @@ -182,21 +190,6 @@ export default function SelectStage() { } /> ))} - {personDecorations.map((decor, index) => ( - {decor.alt} - ))} {/* Back button */}
@@ -240,6 +233,24 @@ export default function SelectStage() { /> + {personDecorations.map((decor, index) => { + const pos = stagePositions[decor.stageIndex]; + return ( + {decor.alt} + ); + })} + {stagePositions.map((pos, i) => { const stageNum = i + 1; return ( From 229128bfad5d1c98175127141fca4778e95c5843 Mon Sep 17 00:00:00 2001 From: TKHR-Shiu Date: Tue, 5 May 2026 00:19:28 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=E3=82=B9=E3=83=86=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E6=95=B0:24=E2=86=9220?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/routes/selectStage.tsx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/app/routes/selectStage.tsx b/app/routes/selectStage.tsx index 2bf8e0c..bc3dd71 100644 --- a/app/routes/selectStage.tsx +++ b/app/routes/selectStage.tsx @@ -1,7 +1,7 @@ import { useNavigate } from "react-router"; import { bubbles } from "~/bubbles"; -const TOTAL_STAGES = 24; +const TOTAL_STAGES = 20; const PATH_WIDTH = 1100; const CENTER_X = PATH_WIDTH / 2; @@ -103,15 +103,15 @@ const personDecorations = [ { src: "/if_false.png", alt: "If False Character", - stageIndex: 10, + stageIndex: 8, width: 76, - offsetX: 80, - offsetY: -150, + offsetX: 50, + offsetY: -100, }, { src: "/if_true.png", alt: "If True Character", - stageIndex: 23, + stageIndex: 19, width: 76, offsetX: 40, offsetY: -150, @@ -119,15 +119,15 @@ const personDecorations = [ { src: "/pop_vanilla.png", alt: "Pop Vanilla Character", - stageIndex: 7, + stageIndex: 0, width: 64, offsetX: 40, - offsetY: -120, + offsetY: -80, }, { src: "/pop_strawberry.png", alt: "Pop Strawberry Character", - stageIndex: 2, + stageIndex: 16, width: 64, offsetX: 40, offsetY: -120, @@ -135,7 +135,7 @@ const personDecorations = [ { src: "/pop_chocolate.png", alt: "Pop Chocolate Character", - stageIndex: 14, + stageIndex: 10, width: 64, offsetX: 40, offsetY: -120, @@ -143,7 +143,7 @@ const personDecorations = [ { src: "/push_vanilla.png", alt: "Push Vanilla Character", - stageIndex: 4, + stageIndex: 13, width: 72, offsetX: 40, offsetY: -120, @@ -151,15 +151,15 @@ const personDecorations = [ { src: "/push_strawberry.png", alt: "Push Strawberry Character", - stageIndex: 18, + stageIndex: 3, width: 72, - offsetX: 40, - offsetY: -120, + offsetX: 20, + offsetY: -150, }, { src: "/push_chocolate.png", alt: "Push Chocolate Character", - stageIndex: 21, + stageIndex: 6, width: 64, offsetX: 40, offsetY: -120, From b36f8c1c835d756fe50141865c0f628964278166 Mon Sep 17 00:00:00 2001 From: TKHR-Shiu Date: Tue, 5 May 2026 00:31:53 +0900 Subject: [PATCH 4/5] =?UTF-8?q?Flavor=E5=8D=98=E4=BD=93=E3=81=AEif?= =?UTF-8?q?=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/lib/icemake.ts | 7 ++----- app/routes/stage.$id.tsx | 7 ------- app/stages.ts | 2 +- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/app/lib/icemake.ts b/app/lib/icemake.ts index 5c439bd..7611145 100644 --- a/app/lib/icemake.ts +++ b/app/lib/icemake.ts @@ -101,13 +101,10 @@ function runGraphExecution( if (children != null && typeof children !== "number") { let condition = false; if (component.type === "if") { - const cond: ConeColor | Flavor | Flavor[] | number = + const cond: ConeColor | Flavor[] | number = component.condition; if (typeof cond === "string") { - if (coneColors.includes(cond as ConeColor)) - condition = color === cond; - else if (flavors.includes(cond as Flavor)) - condition = stack.length > 0 && stack[stack.length - 1] === cond; + condition = color === cond; } else if (Array.isArray(cond)) { for (let i = 0; i <= stack.length - cond.length; i++) { if ( diff --git a/app/routes/stage.$id.tsx b/app/routes/stage.$id.tsx index 7cc6886..328f554 100644 --- a/app/routes/stage.$id.tsx +++ b/app/routes/stage.$id.tsx @@ -93,13 +93,6 @@ function getComponentSrc( ) { return { src: baseSrc, overlaySrc: `/cone_${condition}.png` }; } - // Flavor - if ( - typeof condition === "string" && - ["vanilla", "chocolate", "strawberry"].includes(condition) - ) { - return { src: baseSrc, overlaySrc: `/ice_${condition}.png` }; - } // Flavor[] if (Array.isArray(condition)) { const overlayImages = condition.map((flavor) => `/ice_${flavor}.png`); diff --git a/app/stages.ts b/app/stages.ts index 4f72c4d..cf3d37a 100644 --- a/app/stages.ts +++ b/app/stages.ts @@ -3,7 +3,7 @@ export type Flavor = "vanilla" | "chocolate" | "strawberry"; export type Component = | { type: "start" } | { type: "push"; flavor: Flavor } - | { type: "if"; condition: ConeColor | Flavor | Flavor[] | number } + | { type: "if"; condition: ConeColor | Flavor[] | number } | { type: "pop"; flavor: Flavor | undefined }; export type StageData = { mission: Partial>; From dcca63aee7d06a643f6171cc9680b3706b5d9c73 Mon Sep 17 00:00:00 2001 From: TKHR-Shiu Date: Tue, 5 May 2026 22:09:27 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=E3=82=B9=E3=83=86=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E7=95=AA=E5=8F=B7=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/stages.ts | 89 +++++++++++++++++---------------------------------- 1 file changed, 30 insertions(+), 59 deletions(-) diff --git a/app/stages.ts b/app/stages.ts index cf3d37a..cc04d50 100644 --- a/app/stages.ts +++ b/app/stages.ts @@ -158,69 +158,40 @@ export const STAGES: Record = { {type: "if", condition: 5}, ] }, - 21: { + 20: { mission: { - red: ["chocolate", "vanilla", "strawberry", "chocolate", "vanilla", "strawberry"], - yellow: ["vanilla", "strawberry", "chocolate", "vanilla", "strawberry", "chocolate"], - brown: ["strawberry", "chocolate", "vanilla", "strawberry", "chocolate", "vanilla"], + red: ["vanilla", "chocolate", "strawberry", "vanilla", "chocolate", "strawberry", "chocolate", "vanilla"], + yellow: ["strawberry", "vanilla", "chocolate", "strawberry", "chocolate", "vanilla", "strawberry", "chocolate", "vanilla"], + brown: ["vanilla", "strawberry", "vanilla", "chocolate", "strawberry", "chocolate", "vanilla", "strawberry", "chocolate", "vanilla"], }, components: [ - { type: "if", condition: "yellow" }, - { type: "if", condition: "red" }, - { type: "if", condition: 6 }, - { type: "if", condition: 7 }, - { type: "push", flavor: "chocolate" }, - { type: "push", flavor: "strawberry" }, - { type: "push", flavor: "vanilla" }, - { type: "pop", flavor: "chocolate" }, - { type: "pop", flavor: "vanilla" }, - ], - }, - 22: { - mission: { - red: ["chocolate", "vanilla", "strawberry", "vanilla"], - yellow: ["strawberry", "vanilla", "chocolate", "vanilla"], - }, - components: [ - { type: "if", condition: "yellow" }, - { type: "if", condition: 3 }, - { type: "if", condition: ["strawberry", "vanilla"] }, - { type: "push", flavor: "chocolate" }, - { type: "push", flavor: "strawberry" }, - { type: "push", flavor: "vanilla" }, - ], - }, - 23: { - mission: { - red: ["chocolate", "vanilla", "chocolate", "strawberry"], - yellow: ["vanilla","strawberry", "chocolate"], - }, - components: [ - { type: "if", condition: "red" }, - { type: "if", condition: 3 }, - { type: "if", condition: ["chocolate", "vanilla"] }, - { type: "push", flavor: "chocolate" }, - { type: "push", flavor: "chocolate" }, - { type: "push", flavor: "chocolate" }, - { type: "push", flavor: "strawberry" }, - { type: "push", flavor: "vanilla" }, - ], - }, - 24: { + {type: "push", flavor: "vanilla"}, + {type: "push", flavor: "chocolate"}, + {type: "push", flavor: "vanilla"}, + {type: "push", flavor: "chocolate"}, + {type: "push", flavor: "strawberry"}, + {type: "if", condition: "red"}, + {type: "if", condition: "yellow"}, + {type: "if", condition: 4}, + {type: "if", condition: 8}, + ] +}, +21: { mission: { - red: ["chocolate", "vanilla", "chocolate", "vanilla", "chocolate", "vanilla", "chocolate", "vanilla", "strawberry"], - yellow: ["vanilla", "vanilla", "vanilla", "vanilla", "vanilla", "vanilla", "vanilla", "strawberry", "strawberry"], - brown: ["vanilla", "chocolate", "vanilla", "vanilla", "chocolate", "vanilla", "vanilla", "chocolate", "vanilla",], + red: ["vanilla", "strawberry", "chocolate", "vanilla", "chocolate", "strawberry", "vanilla", "chocolate", "strawberry"], + yellow: ["chocolate", "vanilla", "strawberry", "chocolate", "strawberry", "vanilla", "chocolate", "strawberry"], + brown: ["strawberry", "chocolate", "vanilla", "chocolate", "strawberry", "vanilla", "chocolate", "strawberry"], }, components: [ - { type: "if", condition: "red" }, - { type: "if", condition: "brown" }, - { type: "if", condition: 7 }, - { type: "if", condition: 9 }, - { type: "push", flavor: "chocolate" }, - { type: "push", flavor: "strawberry" }, - { type: "push", flavor: "vanilla" }, - { type: "push", flavor: "vanilla" }, - ], - }, + {type: "push", flavor: "vanilla"}, + {type: "push", flavor: "chocolate"}, + {type: "push", flavor: "strawberry"}, + {type: "if", condition: "red"}, + {type: "if", condition: "yellow"}, + {type: "if", condition: 3}, + {type: "if", condition: 4}, + {type: "if", condition: 5}, + {type: "if", condition: 8}, + ] +}, };