Fanta, Coca e spuma bionda nell'inventario: si bevono con Usa, e si possono buttare

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017egeN2amL84ErjfgQFtEDn
This commit is contained in:
2026-10-24 00:54:46 +02:00
co-authored by Claude Opus 5.5
parent 066f9ff9ed
commit 2d32e552f8
17 changed files with 64 additions and 19 deletions
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16" shape-rendering="crispEdges"><rect x="7" y="1" width="1" height="1" fill="#24461c"/><rect x="8" y="1" width="1" height="1" fill="#24461c"/><rect x="6" y="2" width="1" height="1" fill="#24461c"/><rect x="7" y="2" width="1" height="1" fill="#d8d0b0"/><rect x="8" y="2" width="1" height="1" fill="#d8d0b0"/><rect x="9" y="2" width="1" height="1" fill="#24461c"/><rect x="7" y="3" width="1" height="1" fill="#24461c"/><rect x="8" y="3" width="1" height="1" fill="#24461c"/><rect x="7" y="4" width="1" height="1" fill="#4a1a12"/><rect x="8" y="4" width="1" height="1" fill="#24461c"/><rect x="6" y="5" width="1" height="1" fill="#24461c"/><rect x="7" y="5" width="1" height="1" fill="#4a1a12"/><rect x="8" y="5" width="1" height="1" fill="#4a1a12"/><rect x="9" y="5" width="1" height="1" fill="#24461c"/><rect x="5" y="6" width="1" height="1" fill="#24461c"/><rect x="6" y="6" width="1" height="1" fill="#4a1a12"/><rect x="7" y="6" width="1" height="1" fill="#4a1a12"/><rect x="8" y="6" width="1" height="1" fill="#4a1a12"/><rect x="9" y="6" width="1" height="1" fill="#4a1a12"/><rect x="10" y="6" width="1" height="1" fill="#24461c"/><rect x="5" y="7" width="1" height="1" fill="#24461c"/><rect x="6" y="7" width="1" height="1" fill="#c8584a"/><rect x="7" y="7" width="1" height="1" fill="#4a1a12"/><rect x="8" y="7" width="1" height="1" fill="#4a1a12"/><rect x="9" y="7" width="1" height="1" fill="#4a1a12"/><rect x="10" y="7" width="1" height="1" fill="#24461c"/><rect x="5" y="8" width="1" height="1" fill="#24461c"/><rect x="6" y="8" width="1" height="1" fill="#c8584a"/><rect x="7" y="8" width="1" height="1" fill="#4a1a12"/><rect x="8" y="8" width="1" height="1" fill="#4a1a12"/><rect x="9" y="8" width="1" height="1" fill="#4a1a12"/><rect x="10" y="8" width="1" height="1" fill="#24461c"/><rect x="5" y="9" width="1" height="1" fill="#24461c"/><rect x="6" y="9" width="1" height="1" fill="#4a1a12"/><rect x="7" y="9" width="1" height="1" fill="#4a1a12"/><rect x="8" y="9" width="1" height="1" fill="#4a1a12"/><rect x="9" y="9" width="1" height="1" fill="#4a1a12"/><rect x="10" y="9" width="1" height="1" fill="#24461c"/><rect x="5" y="10" width="1" height="1" fill="#24461c"/><rect x="6" y="10" width="1" height="1" fill="#4a1a12"/><rect x="7" y="10" width="1" height="1" fill="#4a1a12"/><rect x="8" y="10" width="1" height="1" fill="#4a1a12"/><rect x="9" y="10" width="1" height="1" fill="#4a1a12"/><rect x="10" y="10" width="1" height="1" fill="#24461c"/><rect x="5" y="11" width="1" height="1" fill="#24461c"/><rect x="6" y="11" width="1" height="1" fill="#4a1a12"/><rect x="7" y="11" width="1" height="1" fill="#4a1a12"/><rect x="8" y="11" width="1" height="1" fill="#4a1a12"/><rect x="9" y="11" width="1" height="1" fill="#4a1a12"/><rect x="10" y="11" width="1" height="1" fill="#24461c"/><rect x="5" y="12" width="1" height="1" fill="#24461c"/><rect x="6" y="12" width="1" height="1" fill="#4a1a12"/><rect x="7" y="12" width="1" height="1" fill="#4a1a12"/><rect x="8" y="12" width="1" height="1" fill="#4a1a12"/><rect x="9" y="12" width="1" height="1" fill="#4a1a12"/><rect x="10" y="12" width="1" height="1" fill="#24461c"/><rect x="5" y="13" width="1" height="1" fill="#24461c"/><rect x="6" y="13" width="1" height="1" fill="#4a1a12"/><rect x="7" y="13" width="1" height="1" fill="#4a1a12"/><rect x="8" y="13" width="1" height="1" fill="#4a1a12"/><rect x="9" y="13" width="1" height="1" fill="#4a1a12"/><rect x="10" y="13" width="1" height="1" fill="#24461c"/><rect x="6" y="14" width="1" height="1" fill="#24461c"/><rect x="7" y="14" width="1" height="1" fill="#24461c"/><rect x="8" y="14" width="1" height="1" fill="#24461c"/><rect x="9" y="14" width="1" height="1" fill="#24461c"/></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16" shape-rendering="crispEdges"><rect x="7" y="1" width="1" height="1" fill="#24461c"/><rect x="8" y="1" width="1" height="1" fill="#24461c"/><rect x="6" y="2" width="1" height="1" fill="#24461c"/><rect x="7" y="2" width="1" height="1" fill="#d8d0b0"/><rect x="8" y="2" width="1" height="1" fill="#d8d0b0"/><rect x="9" y="2" width="1" height="1" fill="#24461c"/><rect x="7" y="3" width="1" height="1" fill="#24461c"/><rect x="8" y="3" width="1" height="1" fill="#24461c"/><rect x="7" y="4" width="1" height="1" fill="#f28a1a"/><rect x="8" y="4" width="1" height="1" fill="#24461c"/><rect x="6" y="5" width="1" height="1" fill="#24461c"/><rect x="7" y="5" width="1" height="1" fill="#f28a1a"/><rect x="8" y="5" width="1" height="1" fill="#f28a1a"/><rect x="9" y="5" width="1" height="1" fill="#24461c"/><rect x="5" y="6" width="1" height="1" fill="#24461c"/><rect x="6" y="6" width="1" height="1" fill="#f28a1a"/><rect x="7" y="6" width="1" height="1" fill="#f28a1a"/><rect x="8" y="6" width="1" height="1" fill="#f28a1a"/><rect x="9" y="6" width="1" height="1" fill="#f28a1a"/><rect x="10" y="6" width="1" height="1" fill="#24461c"/><rect x="5" y="7" width="1" height="1" fill="#24461c"/><rect x="6" y="7" width="1" height="1" fill="#ffd0a0"/><rect x="7" y="7" width="1" height="1" fill="#f28a1a"/><rect x="8" y="7" width="1" height="1" fill="#f28a1a"/><rect x="9" y="7" width="1" height="1" fill="#f28a1a"/><rect x="10" y="7" width="1" height="1" fill="#24461c"/><rect x="5" y="8" width="1" height="1" fill="#24461c"/><rect x="6" y="8" width="1" height="1" fill="#ffd0a0"/><rect x="7" y="8" width="1" height="1" fill="#f28a1a"/><rect x="8" y="8" width="1" height="1" fill="#f28a1a"/><rect x="9" y="8" width="1" height="1" fill="#f28a1a"/><rect x="10" y="8" width="1" height="1" fill="#24461c"/><rect x="5" y="9" width="1" height="1" fill="#24461c"/><rect x="6" y="9" width="1" height="1" fill="#f28a1a"/><rect x="7" y="9" width="1" height="1" fill="#f28a1a"/><rect x="8" y="9" width="1" height="1" fill="#f28a1a"/><rect x="9" y="9" width="1" height="1" fill="#f28a1a"/><rect x="10" y="9" width="1" height="1" fill="#24461c"/><rect x="5" y="10" width="1" height="1" fill="#24461c"/><rect x="6" y="10" width="1" height="1" fill="#f28a1a"/><rect x="7" y="10" width="1" height="1" fill="#f28a1a"/><rect x="8" y="10" width="1" height="1" fill="#f28a1a"/><rect x="9" y="10" width="1" height="1" fill="#f28a1a"/><rect x="10" y="10" width="1" height="1" fill="#24461c"/><rect x="5" y="11" width="1" height="1" fill="#24461c"/><rect x="6" y="11" width="1" height="1" fill="#f28a1a"/><rect x="7" y="11" width="1" height="1" fill="#f28a1a"/><rect x="8" y="11" width="1" height="1" fill="#f28a1a"/><rect x="9" y="11" width="1" height="1" fill="#f28a1a"/><rect x="10" y="11" width="1" height="1" fill="#24461c"/><rect x="5" y="12" width="1" height="1" fill="#24461c"/><rect x="6" y="12" width="1" height="1" fill="#f28a1a"/><rect x="7" y="12" width="1" height="1" fill="#f28a1a"/><rect x="8" y="12" width="1" height="1" fill="#f28a1a"/><rect x="9" y="12" width="1" height="1" fill="#f28a1a"/><rect x="10" y="12" width="1" height="1" fill="#24461c"/><rect x="5" y="13" width="1" height="1" fill="#24461c"/><rect x="6" y="13" width="1" height="1" fill="#f28a1a"/><rect x="7" y="13" width="1" height="1" fill="#f28a1a"/><rect x="8" y="13" width="1" height="1" fill="#f28a1a"/><rect x="9" y="13" width="1" height="1" fill="#f28a1a"/><rect x="10" y="13" width="1" height="1" fill="#24461c"/><rect x="6" y="14" width="1" height="1" fill="#24461c"/><rect x="7" y="14" width="1" height="1" fill="#24461c"/><rect x="8" y="14" width="1" height="1" fill="#24461c"/><rect x="9" y="14" width="1" height="1" fill="#24461c"/></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16" shape-rendering="crispEdges"><rect x="7" y="1" width="1" height="1" fill="#24461c"/><rect x="8" y="1" width="1" height="1" fill="#24461c"/><rect x="6" y="2" width="1" height="1" fill="#24461c"/><rect x="7" y="2" width="1" height="1" fill="#d8d0b0"/><rect x="8" y="2" width="1" height="1" fill="#d8d0b0"/><rect x="9" y="2" width="1" height="1" fill="#24461c"/><rect x="7" y="3" width="1" height="1" fill="#24461c"/><rect x="8" y="3" width="1" height="1" fill="#24461c"/><rect x="7" y="4" width="1" height="1" fill="#d8a83a"/><rect x="8" y="4" width="1" height="1" fill="#24461c"/><rect x="6" y="5" width="1" height="1" fill="#24461c"/><rect x="7" y="5" width="1" height="1" fill="#d8a83a"/><rect x="8" y="5" width="1" height="1" fill="#d8a83a"/><rect x="9" y="5" width="1" height="1" fill="#24461c"/><rect x="5" y="6" width="1" height="1" fill="#24461c"/><rect x="6" y="6" width="1" height="1" fill="#d8a83a"/><rect x="7" y="6" width="1" height="1" fill="#d8a83a"/><rect x="8" y="6" width="1" height="1" fill="#d8a83a"/><rect x="9" y="6" width="1" height="1" fill="#d8a83a"/><rect x="10" y="6" width="1" height="1" fill="#24461c"/><rect x="5" y="7" width="1" height="1" fill="#24461c"/><rect x="6" y="7" width="1" height="1" fill="#fff0b0"/><rect x="7" y="7" width="1" height="1" fill="#d8a83a"/><rect x="8" y="7" width="1" height="1" fill="#d8a83a"/><rect x="9" y="7" width="1" height="1" fill="#d8a83a"/><rect x="10" y="7" width="1" height="1" fill="#24461c"/><rect x="5" y="8" width="1" height="1" fill="#24461c"/><rect x="6" y="8" width="1" height="1" fill="#fff0b0"/><rect x="7" y="8" width="1" height="1" fill="#d8a83a"/><rect x="8" y="8" width="1" height="1" fill="#d8a83a"/><rect x="9" y="8" width="1" height="1" fill="#d8a83a"/><rect x="10" y="8" width="1" height="1" fill="#24461c"/><rect x="5" y="9" width="1" height="1" fill="#24461c"/><rect x="6" y="9" width="1" height="1" fill="#d8a83a"/><rect x="7" y="9" width="1" height="1" fill="#d8a83a"/><rect x="8" y="9" width="1" height="1" fill="#d8a83a"/><rect x="9" y="9" width="1" height="1" fill="#d8a83a"/><rect x="10" y="9" width="1" height="1" fill="#24461c"/><rect x="5" y="10" width="1" height="1" fill="#24461c"/><rect x="6" y="10" width="1" height="1" fill="#d8a83a"/><rect x="7" y="10" width="1" height="1" fill="#d8a83a"/><rect x="8" y="10" width="1" height="1" fill="#d8a83a"/><rect x="9" y="10" width="1" height="1" fill="#d8a83a"/><rect x="10" y="10" width="1" height="1" fill="#24461c"/><rect x="5" y="11" width="1" height="1" fill="#24461c"/><rect x="6" y="11" width="1" height="1" fill="#d8a83a"/><rect x="7" y="11" width="1" height="1" fill="#d8a83a"/><rect x="8" y="11" width="1" height="1" fill="#d8a83a"/><rect x="9" y="11" width="1" height="1" fill="#d8a83a"/><rect x="10" y="11" width="1" height="1" fill="#24461c"/><rect x="5" y="12" width="1" height="1" fill="#24461c"/><rect x="6" y="12" width="1" height="1" fill="#d8a83a"/><rect x="7" y="12" width="1" height="1" fill="#d8a83a"/><rect x="8" y="12" width="1" height="1" fill="#d8a83a"/><rect x="9" y="12" width="1" height="1" fill="#d8a83a"/><rect x="10" y="12" width="1" height="1" fill="#24461c"/><rect x="5" y="13" width="1" height="1" fill="#24461c"/><rect x="6" y="13" width="1" height="1" fill="#d8a83a"/><rect x="7" y="13" width="1" height="1" fill="#d8a83a"/><rect x="8" y="13" width="1" height="1" fill="#d8a83a"/><rect x="9" y="13" width="1" height="1" fill="#d8a83a"/><rect x="10" y="13" width="1" height="1" fill="#24461c"/><rect x="6" y="14" width="1" height="1" fill="#24461c"/><rect x="7" y="14" width="1" height="1" fill="#24461c"/><rect x="8" y="14" width="1" height="1" fill="#24461c"/><rect x="9" y="14" width="1" height="1" fill="#24461c"/></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+27 -15
View File
@@ -867,6 +867,30 @@
"file": "andrea-69907b4352.mp3",
"sec": 5.27
},
"andrea|Una Fanta ghiacciata, arancione come il tramonto.": {
"file": "andrea-9631d9ce30.mp3",
"sec": 3.18
},
"andrea|Glu glu... arancione fino alle orecchie.": {
"file": "andrea-aaa51e9e69.mp3",
"sec": 4.08
},
"andrea|Una Coca col vetro appannato dal freddo.": {
"file": "andrea-70fdbe36de.mp3",
"sec": 2.52
},
"andrea|Fa le bollicine nel naso. Come sempre.": {
"file": "andrea-b143e9177f.mp3",
"sec": 3.34
},
"andrea|Una spuma bionda. Ormai la chiedono solo i nonni. E io.": {
"file": "andrea-139cc72b05.mp3",
"sec": 5.12
},
"andrea|Buona come ai tempi della festa.": {
"file": "andrea-6216c97894.mp3",
"sec": 2.06
},
"andrea|Lo stecco del ghiacciolo. Appiccica ancora un po' di limone.": {
"file": "andrea-942c0fe126.mp3",
"sec": 4.23
@@ -915,26 +939,14 @@
"file": "tosca-133c83efc3.mp3",
"sec": 1.79
},
"andrea|Glu glu... arancione fino alle orecchie. Grazie, Tosca!": {
"file": "andrea-ae47136080.mp3",
"sec": 6.05
},
"tosca|Tieni.": {
"file": "tosca-db5640a086.mp3",
"sec": 0.46
},
"andrea|Fa le bollicine nel naso. Come sempre. Grazie!": {
"file": "andrea-d13933a255.mp3",
"sec": 4.57
"tosca|Tieni, col vetro appannato.": {
"file": "tosca-01b56ee7c1.mp3",
"sec": 1.9
},
"tosca|La spuma bionda! Ormai la chiedono solo i nonni.": {
"file": "tosca-b4008e55ce.mp3",
"sec": 3.8
},
"andrea|E io. Buona come ai tempi della festa.": {
"file": "andrea-0d9794e650.mp3",
"sec": 3.05
},
"tosca|Cedrata. Bella fresca.": {
"file": "tosca-d6b114d197.mp3",
"sec": 2.24
Binary file not shown.
Binary file not shown.
+30 -3
View File
@@ -92,6 +92,33 @@ export const story = {
use: [{ say: 'Bevuta liscia è sprecata. Ci vuole qualcosa da inzupparci dentro.' }],
},
},
fanta: {
name: 'Fanta',
icon: { src: 'assets/icons/fanta.svg' },
droppable: true,
actions: {
look: [{ say: 'Una Fanta ghiacciata, arancione come il tramonto.' }],
use: [{ drop: 'fanta' }, { say: 'Glu glu... arancione fino alle orecchie.' }],
},
},
coca: {
name: 'Coca',
icon: { src: 'assets/icons/coca.svg' },
droppable: true,
actions: {
look: [{ say: 'Una Coca col vetro appannato dal freddo.' }],
use: [{ drop: 'coca' }, { say: 'Fa le bollicine nel naso. Come sempre.' }],
},
},
spuma: {
name: 'spuma bionda',
icon: { src: 'assets/icons/spuma.svg' },
droppable: true,
actions: {
look: [{ say: 'Una spuma bionda. Ormai la chiedono solo i nonni. E io.' }],
use: [{ drop: 'spuma' }, { say: 'Buona come ai tempi della festa.' }],
},
},
stecco: {
name: 'stecco',
icon: { src: 'assets/icons/stecco.svg' },
@@ -1369,9 +1396,9 @@ export const story = {
nodes: {
start: {
options: [
{ text: 'Una Fanta.', then: [{ say: 'Eccola, ghiacciata.', who: 'tosca' }, { say: 'Glu glu... arancione fino alle orecchie. Grazie, Tosca!' }] },
{ text: 'Una Coca.', then: [{ say: 'Tieni.', who: 'tosca' }, { say: 'Fa le bollicine nel naso. Come sempre. Grazie!' }] },
{ text: 'Una spuma bionda.', then: [{ say: 'La spuma bionda! Ormai la chiedono solo i nonni.', who: 'tosca' }, { say: 'E io. Buona come ai tempi della festa.' }] },
{ text: 'Una Fanta.', when: '!has:fanta', then: [{ say: 'Eccola, ghiacciata.', who: 'tosca' }, { give: 'fanta' }] },
{ text: 'Una Coca.', when: '!has:coca', then: [{ say: 'Tieni, col vetro appannato.', who: 'tosca' }, { give: 'coca' }] },
{ text: 'Una spuma bionda.', when: '!has:spuma', then: [{ say: 'La spuma bionda! Ormai la chiedono solo i nonni.', who: 'tosca' }, { give: 'spuma' }] },
{ text: 'Una cedrata, da portare via.', when: ['!has:cedrata', '!stecco_fatto'], then: [{ say: 'Cedrata. Bella fresca.', who: 'tosca' }, { give: 'cedrata' }] },
{ text: 'Un ghiacciolo al limone.', when: ['!has:ghiacciolo', '!stecco_fatto'], then: [{ say: 'Al limone, l\'ultimo della cassetta.', who: 'tosca' }, { give: 'ghiacciolo' }] },
{ text: 'Niente, grazie Tosca.', next: 'end', then: [{ say: 'Quando ti viene sete, sai dove trovarmi.', who: 'tosca' }] },
+4 -1
View File
@@ -210,7 +210,7 @@ test('si buttano solo gli oggetti che non servono', () => {
settle(g);
assert.deepEqual(g.state.inventory, ['squama']);
for (const [id, item] of Object.entries(story.items))
if (id !== 'libro') assert.ok(!item.droppable, `${id} serve alla storia: non deve potersi buttare`);
if (!['libro', 'fanta', 'coca', 'spuma'].includes(id)) assert.ok(!item.droppable, `${id} serve alla storia: non deve potersi buttare`);
});
test('ogni oggetto ha la sua icona a pixel', () => {
@@ -238,9 +238,12 @@ test('la catena del ghiacciolo: Tosca, cedrata, stecco, gomma, griglia, chiavett
const answer = text => { const i = g.options().findIndex(o => o.text === text); assert.ok(i >= 0, `manca «${text}»`); g.choose(i); say(); };
g.go('tennis_chiesa'); say();
g.act('talk', 'chiosco'); say();
answer('Una Coca.');
assert.deepEqual(g.state.inventory, ['coca'], 'la Coca finisce nell\'inventario');
answer('Un ghiacciolo al limone.');
answer('Una cedrata, da portare via.');
answer('Niente, grazie Tosca.');
g.act('use', 'coca'); say();
assert.deepEqual(g.state.inventory, ['ghiacciolo', 'cedrata']);
g.act('use', 'cedrata', 'ghiacciolo'); say();
assert.deepEqual(g.state.inventory, ['stecco'], 'inzuppato e mangiato: resta lo stecco');