{"inkVersion":21,"root":[[{"->":"introduction"},["done",{"#f":5,"#n":"g-0"}],null],"done",{"buy":[{"temp=":"cost"},{"temp=":"item"},"ev",{"VAR?":"money"},{"VAR?":"cost"},">=","/ev",[{"->":".^.b","c":true},{"b":["\n","ev",{"VAR?":"money"},{"VAR?":"cost"},"-",{"VAR=":"money","re":true},"/ev","ev",{"VAR?":"inventory"},{"VAR?":"item"},"+",{"VAR=":"inventory","re":true},"/ev","^$audio coins","\n","ev",true,"/ev","~ret",{"->":"buy.9"},null]}],[{"->":".^.b"},{"b":["\n","^It looks like you don't have enough money.","\n","ev",false,"/ev","~ret",{"->":"buy.9"},null]}],"nop","\n",{"#f":1}],"introduction":[["^The Grocery List ","#","^title","/#","\n","^It is Saturday afternoon.","\n","^You are new to the village because your family has just moved here.","\n","^It is a bit cold outside today.","\n","^So you are playing with your toys in your bedroom.","\n","^$image grocery-bedroom.jpg","\n","^Your mom calls you.","\n",[["ev","visit",2,"%","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^@mom Peter!",{"->":".^.^.17"},null],"s1":["pop","^@mom Peter, please come here.",{"->":".^.^.17"},null],"#f":5}],"\n","ev","str","^Leave the bedroom","/str","/ev",{"*":".^.c-0","flg":20},"ev","str","^Keep playing","/str","/ev",{"*":".^.c-1","flg":20},"ev","str","^Keep playing","/str",{"CNT?":".^.c-1"},"/ev",{"*":".^.c-2","flg":21},{"c-0":["^ ",{"->":".^.^.^.^.downstairs"},"\n",{"#f":5}],"c-1":["\n","^You play for a few more minutes.","\n",{"->":".^.^"},{"#f":5}],"c-2":["\n","^You want to play more, but your mom really insists.","\n",{"->":".^.^.^.^.downstairs"},{"#f":5}],"#f":5,"#n":"loop1"}],null],{"downstairs":[["^@peter Yes, mom. I'm coming.","\n","^You leave the bedroom and go to your mom.","\n","^@mom Can you please go shopping for dinner?","\n","^@mom Grandma is visiting us tonight, so we need five apples to make her favorite apple pie.","\n","^@mom We also need three tomatoes and four eggs for the dinner.","\n","^@mom You'll find everything at the supermarket.","\n","ev",{"VAR?":"money"},17,"+",{"VAR=":"money","re":true},"/ev","^@mom Here are 17 coins, I think that should be enough.","\n","^@mom Oh, and we need bread too!","\n",[["ev",{"^->":"introduction.downstairs.0.loop2.0.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-0","flg":18},{"s":["^@peter Can I stay home?",{"->":"$r","var":true},null]}],["ev",{"^->":"introduction.downstairs.0.loop2.1.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-1","flg":18},{"s":["^@peter How do I get to the supermarket?",{"->":"$r","var":true},null]}],["ev",{"^->":"introduction.downstairs.0.loop2.2.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-2","flg":18},{"s":["^@peter Can you repeat the shopping list?",{"->":"$r","var":true},null]}],["ev",{"^->":"introduction.downstairs.0.loop2.3.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-3","flg":18},{"s":["^@peter Can I buy something for myself?",{"->":"$r","var":true},null]}],"ev","str","^Leave","/str","/ev",{"*":".^.c-4","flg":20},{"c-0":["ev",{"^->":"introduction.downstairs.0.loop2.c-0.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.0.s"},[{"#n":"$r2"}],"\n","^@peter I'd love to play more.","\n","^@mom No, it's important to have food for dinner. You can play later.","\n",{"->":".^.^.^.g-0"},{"#f":5}],"c-1":["ev",{"^->":"introduction.downstairs.0.loop2.c-1.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.1.s"},[{"#n":"$r2"}],"\n","^@mom You'll find it at the end of the street, just turn right.","\n","^@mom It's on the main square.","\n","^@mom Remember, we went there last week.","\n",{"->":".^.^.^.g-0"},{"#f":5}],"c-2":["ev",{"^->":"introduction.downstairs.0.loop2.c-2.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.2.s"},[{"#n":"$r2"}],"\n","^@mom Sure. We need three tomatoes, four eggs, five apples, and bread.","\n",{"->":".^.^.^.g-0"},{"#f":5}],"c-3":["ev",{"^->":"introduction.downstairs.0.loop2.c-3.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.3.s"},[{"#n":"$r2"}],"\n","^@peter I'd like to get some chocolate or maybe a pastry.","\n","^@mom If you have enough coins, you can buy something for yourself.","\n","^@mom But first, please buy the food for dinner.","\n",{"->":".^.^.^.g-0"},{"#f":5}],"c-4":["\n","^@peter Alright, I'm going now.","\n",{"->":"travel"},{"->":".^.^.^.g-0"},{"#f":5}],"#f":5,"#n":"loop2"}],{"g-0":[{"->":".^.^.loop2"},{"#f":5}]}],{"#f":1}],"#f":1}],"travel":[["^You leave the house.","\n","^$image grocery-house.jpg","\n","^It is sunny with a bit of wind.","\n","^It's not that cold.","\n","^You see children playing in the park as you pass by.","\n","^You walk down the street until the end.","\n","^@peter Which way is it? I think I should turn left now.","\n","ev","str","^Go left","/str","/ev",{"*":".^.c-0","flg":20},"ev","str","^Go right","/str","/ev",{"*":".^.c-1","flg":20},{"c-0":["\n","^You take the street on the left.","\n",{"->":"lost"},{"#f":5}],"c-1":["\n","^You take the street on the right.","\n",{"->":"main_square"},{"#f":5}]}],{"#f":1}],"lost":[[["ev","visit",3,"%","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"ev","du",2,"==","/ev",{"->":".^.s2","c":true},"nop",{"s0":["pop","^After a few minutes, you find another crossroad.",{"->":".^.^.23"},null],"s1":["pop","^You feel lost and see another crossroad.",{"->":".^.^.23"},null],"s2":["pop","^Another crossroad? Where should you go?",{"->":".^.^.23"},null],"#f":5}],"\n",["ev","visit",2,"%","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^@peter Is it the street on the right? I'm not sure.",{"->":".^.^.17"},null],"s1":["pop",{"->":".^.^.17"},null],"#f":5}],"\n","ev","str","^Go left","/str","/ev",{"*":".^.c-0","flg":4},"ev","str","^Go right","/str","/ev",{"*":".^.c-1","flg":4},"ev","str","^Go straight","/str","/ev",{"*":".^.c-2","flg":4},"ev","str","^Go back","/str","/ev",{"*":".^.c-3","flg":4},{"c-0":["\n","^You take the street on the left.","\n",{"->":"lost"},{"#f":5}],"c-1":["\n","^You take the street on the right.","\n",{"->":"lost"},{"#f":5}],"c-2":["\n","^You continue straight ahead.","\n",{"->":"lost"},{"#f":5}],"c-3":["\n","^You are afraid of getting lost.","\n","^You decide to go back.","\n","^But after a while, it starts to feel familiar.","\n",{"->":"main_square"},{"#f":5}]}],{"#f":1}],"main_square":[[["ev","visit",4,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"ev","du",2,"==","/ev",{"->":".^.s2","c":true},"ev","du",3,"==","/ev",{"->":".^.s3","c":true},"ev","du",4,"==","/ev",{"->":".^.s4","c":true},"nop",{"s0":["pop","^You reach the main square.",{"->":".^.^.35"},null],"s1":["pop","^A street musician is playing guitar on the main square.",{"->":".^.^.35"},null],"s2":["pop","^There are many people on the main square.",{"->":".^.^.35"},null],"s3":["pop","^On the main square, a group of tourists is taking photos of the old buildings.",{"->":".^.^.35"},null],"s4":["pop",{"->":".^.^.35"},null],"#f":5}],"\n",["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^$image grocery-square.jpg",{"->":".^.^.17"},null],"s1":["pop",{"->":".^.^.17"},null],"#f":5}],"\n",["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^The supermarket is right in front of you.",{"->":".^.^.17"},null],"s1":["pop",{"->":".^.^.17"},null],"#f":5}],"\n","ev","str","^Go to the supermarket","/str","/ev",{"*":".^.c-0","flg":4},"ev","str","^Go to the bakery","/str","/ev",{"*":".^.c-1","flg":4},"ev","str","^Go to the outdoor market","/str","/ev",{"*":".^.c-2","flg":4},"ev","str","^Look for your music teacher","/str",{"VAR?":"teacher"},{"VAR?":"inventory"},{"VAR?":"apples"},"?","!","&&","/ev",{"*":".^.c-3","flg":5},"ev","str","^Eat chocolate","/str",{"VAR?":"inventory"},{"VAR?":"chocolate"},"?","/ev",{"*":".^.c-4","flg":5},"ev","str","^Eat the pastry","/str",{"VAR?":"inventory"},{"VAR?":"pastry"},"?","/ev",{"*":".^.c-5","flg":5},"ev","str","^Go back home","/str",{"VAR?":"money"},16,"<",{"VAR?":"money"},1,">","&&","/ev",{"*":".^.c-6","flg":5},"ev","str","^Go back home","/str",{"VAR?":"money"},1,"<=","/ev",{"*":".^.c-7","flg":5},{"c-0":["\n",{"->":"supermarket"},{"#f":5}],"c-1":["\n",{"->":"bakery"},{"#f":5}],"c-2":["\n",{"->":"market"},{"#f":5}],"c-3":["\n",{"->":"music_teacher"},{"#f":5}],"c-4":["\n","^$audio eat","\n","^The chocolate tastes delicious.","\n","ev",{"VAR?":"inventory"},{"VAR?":"chocolate"},"-",{"VAR=":"inventory","re":true},"/ev",{"->":".^.^.^"},{"#f":5}],"c-5":["\n","^$audio eat","\n","^The pastry is really good.","\n","ev",{"VAR?":"inventory"},{"VAR?":"pastry"},"-",{"VAR=":"inventory","re":true},"/ev",{"->":".^.^.^"},{"#f":5}],"c-6":["\n","^@peter I still have some coins to spend.","\n",["ev","str","^Go back home","/str","/ev",{"*":".^.c-0","flg":20},"ev","str","^Stay","/str","/ev",{"*":".^.c-1","flg":4},{"c-0":["^ ",{"->":"home"},"\n",{"#f":5}],"c-1":["^ ",{"->":".^.^.^.^.^"},"\n",{"#f":5}]}],{"#f":5}],"c-7":["\n",{"->":"home"},{"#f":5}]}],{"#f":1}],"supermarket":[[["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^You enter the supermarket.",{"->":".^.^.17"},null],"s1":["pop",{"->":".^.^.17"},null],"#f":5}],"\n",["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^It's hard to find what you want.",{"->":".^.^.17"},null],"s1":["pop",{"->":".^.^.17"},null],"#f":5}],"\n",["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^An employee asks if you need help.",{"->":".^.^.17"},null],"s1":["pop",{"->":".^.^.17"},null],"#f":5}],"\n",[["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^@employee What are you looking for?",{"->":".^.^.17"},null],"s1":["pop","^@employee Anything else?",{"->":".^.^.17"},null],"#f":5}],"\n","ev","str","^Tomatoes","/str","/ev",{"*":".^.c-0","flg":20},"ev","str","^Apples","/str","/ev",{"*":".^.c-1","flg":20},"ev","str","^Eggs","/str",{"VAR?":"inventory"},{"VAR?":"eggs"},"?","!","/ev",{"*":".^.c-2","flg":5},"ev","str","^Bread","/str","/ev",{"*":".^.c-3","flg":20},"ev","str","^Wine","/str","/ev",{"*":".^.c-4","flg":20},"ev","str","^Chocolate (2🪙)","/str","/ev",{"*":".^.c-5","flg":20},"ev","str","^Leave","/str","/ev",{"*":".^.c-6","flg":4},{"c-0":["\n","^@peter I'd like some tomatoes.","\n","^@employee Sorry, we're out of tomatoes.","\n","^@employee But they should have tomatoes on the market.","\n",{"->":".^.^.^.g-0"},{"#f":5}],"c-1":["\n","^@peter Do you have apples?","\n","^@employee I don't know why everyone wants apples today.","\n","^@employee Unfortunately, we don't have any more.","\n",{"->":".^.^.^.g-0"},{"#f":5}],"c-2":["\n","^@peter I need eggs.","\n","^@employee How many eggs do you want?","\n",["ev","str","^4 eggs (4🪙)","/str","/ev",{"*":".^.c-0","flg":20},"ev","str","^6 eggs (6🪙)","/str","/ev",{"*":".^.c-1","flg":20},"ev","str","^12 eggs (9🪙)","/str","/ev",{"*":".^.c-2","flg":20},{"c-0":["\n","^@peter Four.","\n","ev",{"VAR?":"eggs"},4,{"f()":"buy"},"pop","/ev","\n",{"->":".^.^.^.^.^.g-0"},{"#f":5}],"c-1":["\n","^@peter Six.","\n","ev",{"VAR?":"eggs"},6,{"f()":"buy"},"pop","/ev","\n",{"->":".^.^.^.^.^.g-0"},{"#f":5}],"c-2":["\n","^@peter Twelve.","\n","ev",{"VAR?":"eggs"},9,{"f()":"buy"},"pop","/ev","\n",{"->":".^.^.^.^.^.g-0"},{"#f":5}]}],{"#f":5}],"c-3":["\n","^@peter I am looking for the bread.","\n","^@employee Unfortunately, we don't have bread anymore today.","\n","^@employee But there's a bakery nearby.","\n",{"->":".^.^.^.g-0"},{"#f":5}],"c-4":["\n","^@peter Can I have a bottle of wine?","\n","^@employee How old are you?","\n",["ev","str","^10 years old","/str","/ev",{"*":".^.c-0","flg":20},"ev","str","^Lie","/str","/ev",{"*":".^.c-1","flg":20},{"c-0":["\n","^@peter I am 10 years old.","\n",{"->":".^.^.g-0"},{"#f":5}],"c-1":["\n","^@peter I am... 11 years old!","\n",{"->":".^.^.g-0"},{"#f":5}],"g-0":["^@employee Sorry, you're too young to buy wine.","\n",{"->":".^.^.^.^.^.g-0"},{"#f":5}]}],{"#f":5}],"c-5":["\n","^@peter I'll buy my favorite chocolate.","\n","ev",{"VAR?":"chocolate"},2,{"f()":"buy"},"/ev",[{"->":".^.b","c":true},{"b":["\n","ev",{"VAR?":"treats"},1,"+",{"VAR=":"treats","re":true},"/ev",{"->":".^.^.^.9"},null]}],"nop","\n",{"->":".^.^.^.g-0"},{"#f":5}],"c-6":["\n","^@peter That's all, thank you.","\n","^You leave the supermarket.","\n",{"->":"main_square"},{"->":".^.^.^.g-0"},{"#f":5}],"#f":5,"#n":"loop"}],{"g-0":[{"->":".^.^.loop"},{"#f":5}]}],{"#f":1}],"bakery":[["^You enter the bakery.","\n",["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^It smells like fresh bread",{"->":".^.^.17"},null],"s1":["pop",{"->":".^.^.17"},null],"#f":5}],"\n",["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^You see your favorite pastry.",{"->":".^.^.17"},null],"s1":["pop",{"->":".^.^.17"},null],"#f":5}],"\n",["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^You recognize the baker.",{"->":".^.^.17"},null],"s1":["pop",{"->":".^.^.17"},null],"#f":5}],"\n",["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^He smiles at you.",{"->":".^.^.17"},null],"s1":["pop",{"->":".^.^.17"},null],"#f":5}],"\n","^@baker Hello Peter, what would you like today?","\n",["ev","str","^Apples","/str",{"VAR?":"inventory"},{"VAR?":"apples"},"?","!","/ev",{"*":".^.c-0","flg":21},"ev","str","^Pastry (2🪙)","/str",{"VAR?":"inventory"},{"VAR?":"pastry"},"?","!","/ev",{"*":".^.c-1","flg":21},"ev","str","^Bigger pastry (4🪙)","/str",{"VAR?":"inventory"},{"VAR?":"pastry"},"?","!","/ev",{"*":".^.c-2","flg":21},"ev","str","^Bread (3🪙)","/str","/ev",{"*":".^.c-3","flg":20},"ev","str","^Leave","/str","/ev",{"*":".^.c-4","flg":4},{"c-0":["\n","^@peter Do you have apples?","\n","^@baker Sorry, this is a bakery, we don't sell apples.","\n",{"->":".^.^.^.g-0"},{"#f":5}],"c-1":["\n","^@peter This pastry, please.","\n","ev",{"VAR?":"pastry"},2,{"f()":"buy"},"/ev",[{"->":".^.b","c":true},{"b":["\n","ev",{"VAR?":"treats"},1,"+",{"VAR=":"treats","re":true},"/ev",{"->":".^.^.^.9"},null]}],"nop","\n",{"->":".^.^.^.g-0"},{"#f":5}],"c-2":["\n","^@peter This pastry, please.","\n","ev",{"VAR?":"pastry"},4,{"f()":"buy"},"/ev",[{"->":".^.b","c":true},{"b":["\n","ev",{"VAR?":"treats"},1,"+",{"VAR=":"treats","re":true},"/ev",{"->":".^.^.^.9"},null]}],"nop","\n",{"->":".^.^.^.g-0"},{"#f":5}],"c-3":["\n","^@peter I would like this bread, please.","\n","ev",{"VAR?":"bread"},3,{"f()":"buy"},"pop","/ev","\n",{"->":".^.^.^.g-0"},{"#f":5}],"c-4":["\n","^@baker See you soon, Peter!","\n",{"->":"main_square"},{"->":".^.^.^.g-0"},{"#f":5}],"#f":5,"#n":"loop"}],{"g-0":[{"->":".^.^.loop"},{"#f":5}]}],{"#f":1}],"market":[[["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop",{"->":"music_teacher_first"},{"->":".^.^.17"},null],"s1":["pop",{"->":".^.^.17"},null],"#f":5}],"\n",["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^You approach the man who sells fruits and vegetables.",{"->":".^.^.17"},null],"s1":["pop",{"->":".^.^.17"},null],"#f":5}],"\n",["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^@seller Hello! What would you like?",{"->":".^.^.17"},null],"s1":["pop","^@seller Do you want something else?",{"->":".^.^.17"},null],"#f":5}],"\n",["ev","str","^Apples","/str","/ev",{"*":".^.c-0","flg":20},"ev","str","^Pears (5🪙)","/str","/ev",{"*":".^.c-1","flg":20},"ev","str","^Tomatoes","/str",{"VAR?":"inventory"},{"VAR?":"tomatoes"},"?","!","/ev",{"*":".^.c-2","flg":5},"ev","str","^Carrots (2🪙)","/str","/ev",{"*":".^.c-3","flg":20},"ev","str","^Leave","/str","/ev",{"*":".^.c-4","flg":4},{"c-0":["\n","^@peter I'd like some apples.","\n","^@seller Sorry, we just sold the last apples to that woman.","\n","^@peter Ms. Melody?","\n","^@peter Oh no, I have to find a solution!","\n","^@seller Maybe you can use pears instead?","\n","ev",true,"/ev",{"VAR=":"teacher","re":true},{"->":".^.^.^.g-0"},{"#f":5}],"c-1":["\n","^@peter Can I get the pears, please?","\n","ev",{"VAR?":"pears"},5,{"f()":"buy"},"pop","/ev","\n",{"->":".^.^.^.g-0"},{"#f":5}],"c-2":["\n","^@seller How many tomatoes do you want?","\n",["ev","str","^3","/str","/ev",{"*":".^.c-0","flg":4},"ev","str","^4","/str","/ev",{"*":".^.c-1","flg":4},"ev","str","^5","/str","/ev",{"*":".^.c-2","flg":4},{"c-0":["\n","^@peter Three tomatoes, please.","\n","ev",{"VAR?":"tomatoes"},3,{"f()":"buy"},"pop","/ev","\n",{"->":".^.^.g-0"},{"#f":5}],"c-1":["\n","^@peter Four tomatoes, please.","\n","ev",{"VAR?":"tomatoes"},4,{"f()":"buy"},"pop","/ev","\n",{"->":".^.^.g-0"},{"#f":5}],"c-2":["\n","^@peter Five tomatoes, please.","\n","ev",{"VAR?":"tomatoes"},5,{"f()":"buy"},"pop","/ev","\n",{"->":".^.^.g-0"},{"#f":5}],"g-0":["ev",{"VAR?":"inventory"},{"VAR?":"tomatoes"},"?","/ev",[{"->":".^.b","c":true},{"b":["\n","^Peter puts the tomatoes in his bag.","\n",{"->":".^.^.^.6"},null]}],"nop","\n",{"->":"market.0.g-0"},{"#f":5}]}],{"#f":5}],"c-3":["\n","^@peter I'll take two carrots.","\n","ev",{"VAR?":"carrots"},2,{"f()":"buy"},"pop","/ev","\n",{"->":".^.^.^.g-0"},{"#f":5}],"c-4":["\n","^@seller See you soon!","\n",{"->":"main_square"},{"->":".^.^.^.g-0"},{"#f":5}],"#f":5,"#n":"loop"}],{"g-0":[{"->":".^.^.loop"},{"#f":5}]}],{"#f":1}],"music_teacher_first":[["^You decide to go to the market.","\n","^$image grocery-market.jpg","\n","^When you arrive near the fruits and vegetables, you recognize someone.","\n","^@teacher Hi Peter, what a surprise to see you here!","\n","^This is your music teacher.","\n","^@peter Hello Ms. Melody!","\n","^@teacher What are you doing here?","\n",["ev",{"^->":"music_teacher_first.0.14.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-0","flg":18},{"s":["^@peter I'm looking for apples.",{"->":"$r","var":true},null]}],["ev",{"^->":"music_teacher_first.0.15.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-1","flg":18},{"s":["^@peter I'm buying food for dinner.",{"->":"$r","var":true},null]}],{"c-0":["ev",{"^->":"music_teacher_first.0.c-0.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.14.s"},[{"#n":"$r2"}],"\n",{"->":".^.^.g-0"},{"#f":5}],"c-1":["ev",{"^->":"music_teacher_first.0.c-1.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.15.s"},[{"#n":"$r2"}],"\n",{"->":".^.^.g-0"},{"#f":5}],"g-0":["^@peter We'll make an apple pie for my Grandma.","\n","^@teacher Great! I love apples too. I'm going to make apple sauce.","\n","^@teacher See you later! I'll stay a bit on the square to listen to the music.","\n",{"->":"market"},{"#f":5}]}],{"#f":1}],"music_teacher":[[["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^As you look around, you find your music teacher.",{"->":".^.^.17"},null],"s1":["pop","^Your music teacher is still here.",{"->":".^.^.17"},null],"#f":5}],"\n",["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^She is holding a bag of apples.",{"->":".^.^.17"},null],"s1":["pop",{"->":".^.^.17"},null],"#f":5}],"\n",["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^She is listening to the guitar.",{"->":".^.^.17"},null],"s1":["pop",{"->":".^.^.17"},null],"#f":5}],"\n",["ev","visit",1,"MIN","/ev","ev","du",0,"==","/ev",{"->":".^.s0","c":true},"ev","du",1,"==","/ev",{"->":".^.s1","c":true},"nop",{"s0":["pop","^@teacher Hey Peter, what's up?",{"->":".^.^.17"},null],"s1":["pop",{"->":".^.^.17"},null],"#f":5}],"\n","ev","str","^Ask for apples","/str","/ev",{"*":".^.c-0","flg":4},"ev","str","^Leave","/str","/ev",{"*":".^.c-1","flg":4},{"c-0":["\n","^@peter Can you help me? I really need apples.","\n","^@teacher I'll trade you these apples for some pears. Do you have any?","\n",["ev","str","^Yes","/str",{"VAR?":"inventory"},{"VAR?":"pears"},"?","/ev",{"*":".^.c-0","flg":21},"ev","str","^No","/str","/ev",{"*":".^.c-1","flg":4},{"c-0":["\n","^@peter Yes.","\n","ev",{"VAR?":"inventory"},{"VAR?":"pears"},"-",{"VAR=":"inventory","re":true},"/ev","ev",{"VAR?":"inventory"},{"list":{"items.apples":1}},"+",{"VAR=":"inventory","re":true},"/ev","^@teacher Great, I love pears too! Here are your apples.","\n","^@teacher See you on Monday, Peter!","\n","^@peter Bye!","\n",{"->":".^.^.g-0"},{"#f":5}],"c-1":["\n","^@teacher That's too bad. Maybe next time.","\n",{"->":".^.^.g-0"},{"#f":5}],"g-0":[{"->":"main_square"},{"#f":5}]}],{"#f":5}],"c-1":["\n",{"->":"main_square"},{"#f":5}]}],{"#f":1}],"home":["^You come back home. Your mom looks at your groceries.","\n","^@mom Let's see what you bought!","\n","ev",{"VAR?":"inventory"},{"VAR?":"apples"},"?","/ev",[{"->":".^.b","c":true},{"b":["\n","ev",{"VAR?":"inventory"},{"VAR?":"apples"},"-",{"VAR=":"inventory","re":true},"/ev","^@mom Great, you have the apples! I'll make an apple pie.","\n","ev",{"VAR?":"score"},10,"+",{"VAR=":"score","re":true},"/ev",{"->":"home.11"},null]}],[{"->":".^.b"},{"b":["\n",["ev",{"VAR?":"inventory"},{"VAR?":"pears"},"?","/ev",{"->":".^.b","c":true},{"b":["\n","ev",{"VAR?":"inventory"},{"VAR?":"pears"},"-",{"VAR=":"inventory","re":true},"/ev","^@mom No apples? Well, I can make a pear pie instead.","\n","ev",{"VAR?":"score"},5,"+",{"VAR=":"score","re":true},"/ev",{"->":".^.^.^.4"},null]}],["ev",{"VAR?":"inventory"},{"VAR?":"chocolate"},"?","/ev",{"->":".^.b","c":true},{"b":["\n","ev",{"VAR?":"inventory"},{"VAR?":"chocolate"},"-",{"VAR=":"inventory","re":true},"/ev","^@mom No apples or pears? I can use the chocolate to make a chocolate cake.","\n","ev",{"VAR?":"score"},5,"+",{"VAR=":"score","re":true},"/ev",{"->":".^.^.^.4"},null]}],[{"->":".^.b"},{"b":["\n","^@mom No fruit? So we won't have any dessert today.","\n",{"->":".^.^.^.4"},null]}],"nop","\n",{"->":"home.11"},null]}],"nop","\n","ev",{"VAR?":"inventory"},{"VAR?":"eggs"},"?","/ev",[{"->":".^.b","c":true},{"b":["\n","ev",{"VAR?":"score"},5,"+","/ev",{"VAR=":"score","re":true},"ev",{"VAR?":"inventory"},{"VAR?":"eggs"},"-",{"VAR=":"inventory","re":true},"/ev","^@mom Thank you for the eggs!","\n",{"->":"home.20"},null]}],[{"->":".^.b"},{"b":["\n","^@mom It looks like you forgot the eggs.","\n",{"->":"home.20"},null]}],"nop","\n","ev",{"VAR?":"inventory"},{"VAR?":"tomatoes"},"?","/ev",[{"->":".^.b","c":true},{"b":["\n","ev",{"VAR?":"inventory"},{"VAR?":"tomatoes"},"-",{"VAR=":"inventory","re":true},"/ev","ev",{"VAR?":"score"},5,"+",{"VAR=":"score","re":true},"/ev","^@mom Nice, you have the tomatoes!","\n",{"->":"home.29"},null]}],[{"->":".^.b"},{"b":["\n","^@mom Where are the tomatoes?","\n",{"->":"home.29"},null]}],"nop","\n","ev",{"VAR?":"inventory"},{"VAR?":"bread"},"?","/ev",[{"->":".^.b","c":true},{"b":["\n","ev",{"VAR?":"inventory"},{"VAR?":"bread"},"-",{"VAR=":"inventory","re":true},"/ev","ev",{"VAR?":"score"},5,"+",{"VAR=":"score","re":true},"/ev","^@mom The bread smells good.","\n",{"->":"home.38"},null]}],[{"->":".^.b"},{"b":["\n","^@mom You didn't buy bread?","\n",{"->":"home.38"},null]}],"nop","\n",["ev",{"VAR?":"score"},25,">=","/ev",{"->":".^.b","c":true},{"b":["\n","^Excellent job! You have got everything on the list!","\n","ev",{"VAR?":"treats"},0,"==","/ev",[{"->":".^.b","c":true},{"b":["\n","^But maybe you could have bought something for yourself?","\n",{"->":".^.^.^.10"},null]}],[{"->":".^.b"},{"b":["\n","^And you still had enough coins to buy something you liked.","\n",{"->":".^.^.^.10"},null]}],"nop","\n","^Your mom smiles warmly.","\n","^@mom You did a great job, Peter. Thank you!","\n","^@mom After dinner, you can play with your toys again.","\n","^@mom But first, let's make the apple pie!","\n","^$image grocery-pie.jpg","\n",{"->":"home.43"},null]}],["ev",{"VAR?":"score"},15,">","/ev",{"->":".^.b","c":true},{"b":["\n","^Good work! You got most of the items.","\n","^@mom It's not perfect, but you did well, Peter. Thank you!","\n",{"->":"home.43"},null]}],[{"->":".^.b"},{"b":["\n","^@mom Lots of things are missing.","\n","^@mom What are we going to have for dinner?","\n","^@mom It's okay, Peter. I'm sure you'll do better next time.","\n",{"->":"home.43"},null]}],"nop","\n","end",{"#f":1}],"global decl":["ev",{"list":{},"origins":["items"]},{"VAR=":"items"},{"list":{}},{"VAR=":"inventory"},0,{"VAR=":"money"},false,{"VAR=":"teacher"},0,{"VAR=":"treats"},0,{"VAR=":"score"},"/ev","end",null],"#f":1}],"listDefs":{"items":{"apples":1,"pears":2,"tomatoes":3,"carrots":4,"chocolate":5,"eggs":6,"bread":7,"pastry":8}}}