Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixes logic with reveal
  • Loading branch information
Emma authored and Emma committed Mar 29, 2020
1 parent 1289313 commit f6584eb
Showing 1 changed file with 22 additions and 31 deletions.
53 changes: 22 additions & 31 deletions index.html
Expand Up @@ -46,7 +46,7 @@ tw-link.visited:hover
}


</style><script role="script" id="twine-user-script" type="text/twine-javascript"></script><tw-passagedata pid="1" name="Start" tags="" position="390,460" size="100,100">(text-color: &quot;black&quot;)[&quot;**Alright! Let&#39;s play a game!**&quot; They announce cheerily.]
</style><script role="script" id="twine-user-script" type="text/twine-javascript"></script><tw-passagedata pid="1" name="Start" tags="" position="414,419" size="100,100">(text-color: &quot;black&quot;)[&quot;**Alright! Let&#39;s play a game!**&quot; They announce cheerily.]
[&quot;Today you will be trying to win a //good potion//!&quot; The game itself it very easy. I learned it from a man named Monty Hall.&quot;]

[&quot;Would you like to hear the rules?&quot;]
Expand Down Expand Up @@ -91,53 +91,44 @@ tw-link.visited:hover

(text-color: &quot;purple&quot;)[[The purple bag!]]
(text-color: &quot;orange&quot;)[[The orange bag!]]
(text-color: &quot;green&quot;)[[The green bag!]]</tw-passagedata><tw-passagedata pid="4" name="The purple bag!" tags="" position="288,657" size="100,100">(set: $playerchoice1 to &quot;purple bag&quot;)[An excellent choice!]
(text-color: &quot;green&quot;)[[The green bag!]]</tw-passagedata><tw-passagedata pid="4" name="The purple bag!" tags="" position="288,604" size="100,100">(set: $set to &quot;false&quot;)(set: $playerchoice1 to &quot;purple bag&quot;)[An excellent choice!]

[Well let&#39;s take a look inside the...]
(set: $hostchoice1 to (either: &quot;orange bag&quot;, &quot;green bag&quot;))
(if: $hostchoice1 is &quot;orange bag&quot; and $set is &quot;false&quot;)[(if: $hostchoice1 is &quot;orange bag&quot; and $orangebag is &quot;good potion&quot;)[(set: $hostchoice1 to &quot;green bag&quot;)(set: $set to &quot;true&quot;)$hostchoice1] (if: $hostchoice1 is &quot;orange bag&quot; and $orangebag is &quot;bad potion&quot;)[(set: $set to &quot;true&quot;)$hostchoice1]](if: $hostchoice1 is &quot;green bag&quot; and $set is &quot;false&quot;)[(if: $hostchoice1 is &quot;green bag&quot; and $greenbag is &quot;good potion&quot;)[(set: $hostchoice1 to &quot;orange bag&quot;)(set: $set to &quot;true&quot;)$hostchoice1] (if: $greenbag is &quot;bad potion&quot; and $hostchoice1 is &quot;green bag&quot;)[(set: $set to &quot;true&quot;)$hostchoice1]]

(set: $hostchoice1 to (either: &quot;orange bag&quot;, &quot;green bag&quot;))[$hostchoice1!]
(if: $hostchoice1 is &quot;orange bag&quot;)[&lt;img src=&quot;https://i.imgur.com/OLfHmc9.png&quot; alt=&quot;orange bag open&quot; height=&quot;300&quot; width=&quot;300&quot; /&gt;](else:)[&lt;img src=&quot;https://i.imgur.com/AwRTO6o.png&quot; alt=&quot;green bag open&quot; height=&quot;300&quot; width=&quot;300&quot; /&gt;]

[They pull open the bag, reaching inside to reveal a -]

(if: $hostchoice1 is &quot;orange bag&quot;)[$orangebag.] (if: $hostchoice1 is &quot;orange bag&quot; and $orangebag is &quot;good potion&quot;)[(set: $continue to &quot;no&quot;) Aww, better luck next time!] (if: $hostchoice1 is &quot;orange bag&quot; and $orangebag is &quot;bad potion&quot;)[(set: $continue to &quot;yes&quot;) Good choice!](if: $hostchoice1 is &quot;green bag&quot;)[$greenbag.](if: $hostchoice1 is &quot;green bag&quot; and $greenbag is &quot;good potion&quot;)[(set: $continue to &quot;no&quot;) Aww, better luck next time!] (if: $greenbag is &quot;bad potion&quot; and $hostchoice1 is &quot;green bag&quot;)[(set: $continue to &quot;yes&quot;) Good choice!]
(if: $hostchoice1 is &quot;orange bag&quot; and $orangebag is &quot;bad potion&quot;)[&lt;img src=&quot;https://i.imgur.com/BjOXUZU.png&quot; alt=&quot;bad potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;](if: $greenbag is &quot;bad potion&quot; and $hostchoice1 is &quot;green bag&quot;)[&lt;img src=&quot;https://i.imgur.com/BjOXUZU.png&quot; alt=&quot;bad potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;]

(if: $hostchoice1 is &quot;orange bag&quot; and $orangebag is &quot;good potion&quot;)[&lt;img src=&quot;https://i.imgur.com/lIbXqGr.png&quot; alt=&quot;good potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;](if: $hostchoice1 is &quot;orange bag&quot; and $orangebag is &quot;bad potion&quot;)[&lt;img src=&quot;https://i.imgur.com/BjOXUZU.png&quot; alt=&quot;bad potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;](if: $hostchoice1 is &quot;green bag&quot; and $greenbag is &quot;good potion&quot;)[&lt;img src=&quot;https://i.imgur.com/lIbXqGr.png&quot; alt=&quot;good potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;](if: $greenbag is &quot;bad potion&quot; and $hostchoice1 is &quot;green bag&quot;)[&lt;img src=&quot;https://i.imgur.com/BjOXUZU.png&quot; alt=&quot;bad potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;]

(if: $continue is &quot;yes&quot;)[[On to the next question?]]
(if: $continue is &quot;no&quot;)[[[Would you like to play again?-&gt;Start]]
[[Start over from beginning?-&gt;Title]]]</tw-passagedata><tw-passagedata pid="5" name="The orange bag!" tags="" position="653,671" size="100,100">(set: $playerchoice1 to &quot;orange bag&quot;)[Superb choice!]
[[On to the next question?]]
</tw-passagedata><tw-passagedata pid="5" name="The orange bag!" tags="" position="664,650" size="100,100">(set: $set to &quot;false&quot;)(set: $playerchoice1 to &quot;orange bag&quot;)[Superb choice!]

[Well let&#39;s take a look inside the...]
(set: $hostchoice1 to (either: &quot;purple bag&quot;, &quot;green bag&quot;))
(if: $hostchoice1 is &quot;purple bag&quot; and $set is &quot;false&quot;)[(if: $hostchoice1 is &quot;purple bag&quot; and $purplebag is &quot;good potion&quot;)[(set: $hostchoice1 to &quot;green bag&quot;)(set: $set to &quot;true&quot;)$hostchoice1] (if: $hostchoice1 is &quot;purple bag&quot; and $purplebag is &quot;bad potion&quot;)[(set: $set to &quot;true&quot;)$hostchoice1]](if: $hostchoice1 is &quot;green bag&quot; and $set is &quot;false&quot;)[(if: $hostchoice1 is &quot;green bag&quot; and $greenbag is &quot;good potion&quot;)[(set: $hostchoice1 to &quot;purple bag&quot;)(set: $set to &quot;true&quot;)$hostchoice1] (if: $greenbag is &quot;bad potion&quot; and $hostchoice1 is &quot;green bag&quot;)[(set: $set to &quot;true&quot;)$hostchoice1]]

(set: $hostchoice1 to (either: &quot;purple bag&quot;, &quot;green bag&quot;))[$hostchoice1!]
(if: $hostchoice1 is &quot;purple bag&quot;)[&lt;img src=&quot;https://i.imgur.com/OP11vSu.png&quot; alt=&quot;purple bag open&quot; height=&quot;300&quot; width=&quot;300&quot; /&gt;](else:)[&lt;img src=&quot;https://i.imgur.com/AwRTO6o.png&quot; alt=&quot;green bag open&quot; height=&quot;300&quot; width=&quot;300&quot; /&gt;]

[They pull open the bag, reaching inside to reveal a -]

(if: $hostchoice1 is &quot;purple bag&quot;)[$purplebag.] (if: $hostchoice1 is &quot;purple bag&quot; and $purplebag is &quot;good potion&quot;)[(set: $continue to &quot;no&quot;) Aww, better luck next time!] (if: $hostchoice1 is &quot;purple bag&quot; and $purplebag is &quot;bad potion&quot;)[(set: $continue to &quot;yes&quot;) Good choice!] (if: $hostchoice1 is &quot;green bag&quot;)[$greenbag.](if: $hostchoice1 is &quot;green bag&quot; and $greenbag is &quot;good potion&quot;)[(set: $continue to &quot;no&quot;) Aww, better luck next time!] (if: $greenbag is &quot;bad potion&quot; and $hostchoice1 is &quot;green bag&quot;)[(set: $continue to &quot;yes&quot;) Good choice!]

(if: $hostchoice1 is &quot;purple bag&quot; and $purplebag is &quot;good potion&quot;)[&lt;img src=&quot;https://i.imgur.com/lIbXqGr.png&quot; alt=&quot;good potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;](if: $hostchoice1 is &quot;purple bag&quot; and $purplebag is &quot;bad potion&quot;)[&lt;img src=&quot;https://i.imgur.com/BjOXUZU.png&quot; alt=&quot;bad potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;](if: $hostchoice1 is &quot;green bag&quot; and $greenbag is &quot;good potion&quot;)[&lt;img src=&quot;https://i.imgur.com/lIbXqGr.png&quot; alt=&quot;good potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;](if: $greenbag is &quot;bad potion&quot; and $hostchoice1 is &quot;green bag&quot;)[&lt;img src=&quot;https://i.imgur.com/BjOXUZU.png&quot; alt=&quot;bad potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;]
(if: $hostchoice1 is &quot;purple bag&quot; and $purplebag is &quot;bad potion&quot;)[&lt;img src=&quot;https://i.imgur.com/BjOXUZU.png&quot; alt=&quot;bad potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;](if: $greenbag is &quot;bad potion&quot; and $hostchoice1 is &quot;green bag&quot;)[&lt;img src=&quot;https://i.imgur.com/BjOXUZU.png&quot; alt=&quot;bad potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;]

(if: $continue is &quot;yes&quot;)[[On to the next question?]]
(if: $continue is &quot;no&quot;)[[[Would you like to play again?-&gt;Start]]
[[Start over from beginning?-&gt;Title]]]</tw-passagedata><tw-passagedata pid="6" name="The green bag!" tags="" position="957,769" size="100,100">(set: $playerchoice1 to &quot;green bag&quot;)[A great choice!]
[[On to the next question?]]</tw-passagedata><tw-passagedata pid="6" name="The green bag!" tags="" position="957,769" size="100,100">(set: $set to &quot;false&quot;)(set: $playerchoice1 to &quot;green bag&quot;)[A great choice!]

[Well let&#39;s take a look inside the...]
(set: $hostchoice1 to (either: &quot;purple bag&quot;, &quot;orange bag&quot;))
(if: $hostchoice1 is &quot;purple bag&quot; and $set is &quot;false&quot;)[(if: $hostchoice1 is &quot;purple bag&quot; and $purplebag is &quot;good potion&quot;)[(set: $hostchoice1 to &quot;green bag&quot;)(set: $set to &quot;true&quot;)$hostchoice1] (if: $hostchoice1 is &quot;purple bag&quot; and $purplebag is &quot;bad potion&quot;)[(set: $set to &quot;true&quot;)$hostchoice1]](if: $hostchoice1 is &quot;orange bag&quot; and $set is &quot;false&quot;)[(if: $hostchoice1 is &quot;orange bag&quot; and $orangebag is &quot;good potion&quot;)[(set: $hostchoice1 to &quot;green bag&quot;)(set: $set to &quot;true&quot;)$hostchoice1] (if: $hostchoice1 is &quot;orange bag&quot; and $orangebag is &quot;bad potion&quot;)[(set: $set to &quot;true&quot;)$hostchoice1]]

(set: $hostchoice1 to (either: &quot;purple bag&quot;, &quot;orange bag&quot;))[$hostchoice1!]
(if: $hostchoice1 is &quot;purple bag&quot;)[&lt;img src=&quot;https://i.imgur.com/OP11vSu.png&quot; alt=&quot;purple bag open&quot; height=&quot;300&quot; width=&quot;300&quot; /&gt;](else:)[&lt;img src=&quot;https://i.imgur.com/OLfHmc9.png&quot; alt=&quot;green bag open&quot; height=&quot;300&quot; width=&quot;300&quot; /&gt;]
(if: $hostchoice1 is &quot;purple bag&quot;)[&lt;img src=&quot;https://i.imgur.com/OP11vSu.png&quot; alt=&quot;purple bag open&quot; height=&quot;300&quot; width=&quot;300&quot; /&gt;](else:)[&lt;img src=&quot;https://i.imgur.com/OLfHmc9.png&quot; alt=&quot;orange bag open&quot; height=&quot;300&quot; width=&quot;300&quot; /&gt;]

[They pull open the bag, reaching inside to reveal a -]

(if: $hostchoice1 is &quot;purple bag&quot;)[$purplebag.] (if: $hostchoice1 is &quot;purple bag&quot; and $purplebag is &quot;good potion&quot;)[(set: $continue to &quot;no&quot;) Aww, better luck next time!] (if: $hostchoice1 is &quot;purple bag&quot; and $purplebag is &quot;bad potion&quot;)[(set: $continue to &quot;yes&quot;) Good choice!]
(if: $hostchoice1 is &quot;orange bag&quot;)[$orangebag.] (if: $hostchoice1 is &quot;orange bag&quot; and $orangebag is &quot;good potion&quot;)[(set: $continue to &quot;no&quot;) Aww, better luck next time!] (if: $hostchoice1 is &quot;orange bag&quot; and $orangebag is &quot;bad potion&quot;)[(set: $continue to &quot;yes&quot;) Good choice!]

(if: $hostchoice1 is &quot;purple bag&quot; and $purplebag is &quot;good potion&quot;)[&lt;img src=&quot;https://i.imgur.com/lIbXqGr.png&quot; alt=&quot;good potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;](if: $hostchoice1 is &quot;purple bag&quot; and $purplebag is &quot;bad potion&quot;)[&lt;img src=&quot;https://i.imgur.com/BjOXUZU.png&quot; alt=&quot;bad potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;](if: $hostchoice1 is &quot;orange bag&quot; and $orangebag is &quot;good potion&quot;)[&lt;img src=&quot;https://i.imgur.com/lIbXqGr.png&quot; alt=&quot;good potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;](if: $orangebag is &quot;bad potion&quot; and $hostchoice1 is &quot;orange bag&quot;)[&lt;img src=&quot;https://i.imgur.com/BjOXUZU.png&quot; alt=&quot;bad potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;]
(if: $hostchoice1 is &quot;purple bag&quot; and $purplebag is &quot;bad potion&quot;)[&lt;img src=&quot;https://i.imgur.com/BjOXUZU.png&quot; alt=&quot;bad potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;](if: $greenbag is &quot;bad potion&quot; and $hostchoice1 is &quot;green bag&quot;)[&lt;img src=&quot;https://i.imgur.com/BjOXUZU.png&quot; alt=&quot;bad potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;]

(if: $continue is &quot;yes&quot;)[[On to the next question?]]
(if: $continue is &quot;no&quot;)[[[Would you like to play again?-&gt;Start]]
[[Start over from beginning?-&gt;Title]]]</tw-passagedata><tw-passagedata pid="7" name="On to the next question?" tags="" position="493,836" size="100,100">Would you like to...
[[On to the next question?]]</tw-passagedata><tw-passagedata pid="7" name="On to the next question?" tags="" position="518,787" size="100,100">Would you like to...

[[Keep your bag?]]
[[Switch your bag?]]</tw-passagedata><tw-passagedata pid="8" name="Keep your bag?" tags="" position="39,642" size="100,100">[They nod their head.]
Expand All @@ -164,14 +155,14 @@ tw-link.visited:hover
(if: $playerchoice1 is &quot;purple bag&quot;)[(if: $purplebag is &quot;bad potion&quot;)[&lt;img src=&quot;https://i.imgur.com/BjOXUZU.png&quot; alt=&quot;bad potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;](else:)[&lt;img src=&quot;https://i.imgur.com/lIbXqGr.png&quot; alt=&quot;good potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;]](if: $playerchoice1 is &quot;orange bag&quot;)[(if: $orangebag is &quot;bad potion&quot;)[&lt;img src=&quot;https://i.imgur.com/BjOXUZU.png&quot; alt=&quot;bad potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;](else:)[&lt;img src=&quot;https://i.imgur.com/lIbXqGr.png&quot; alt=&quot;good potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;]](if: $playerchoice1 is &quot;green bag&quot;)[(if: $greenbag is &quot;bad potion&quot;)[&lt;img src=&quot;https://i.imgur.com/BjOXUZU.png&quot; alt=&quot;bad potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;](else:)[&lt;img src=&quot;https://i.imgur.com/lIbXqGr.png&quot; alt=&quot;good potion&quot; height=&quot;300&quot; width=&quot;300&quot;/&gt;]]

[[Would you like to play again? -&gt;Start]]
[[Start over from beginning?-&gt;Title]]</tw-passagedata><tw-passagedata pid="11" name="Story Intro" tags="" position="301,10.5" size="100,100">[You run down the old dirt path, the only one that leads into town.]
[[Start over from beginning?-&gt;Title]]</tw-passagedata><tw-passagedata pid="11" name="Story Intro" tags="" position="301,10" size="100,100">[You run down the old dirt path, the only one that leads into town.]

[Today is the day!]

[The traveling peddler comes back to town, with stories of their adventures in far away lands and fantastic wares to sell.]

[[Run]]
</tw-passagedata><tw-passagedata pid="12" name="You decline." tags="" position="592,141.5" size="100,100">[For some reason, you say //no// to playing.]
</tw-passagedata><tw-passagedata pid="12" name="You decline." tags="" position="592,141" size="100,100">[For some reason, you say //no// to playing.]

[The peddler stares at you for another minute, then turns to the child next to you, asking them the same question.]
(set: $outcome to (either: &quot;wins&quot;, &quot;loses&quot;))
Expand All @@ -183,14 +174,14 @@ tw-link.visited:hover

[You start to think about that day, imagining what might have happened if you had said yes.]

[[Imagine that day again...-&gt;Story Intro]] </tw-passagedata><tw-passagedata pid="13" name="Run" tags="" position="605,10.5" size="100,100">[But you like them visiting for the games. Each time they visit, they play a game with one of the villagers.]
[[Imagine that day again...-&gt;Story Intro]] </tw-passagedata><tw-passagedata pid="13" name="Run" tags="" position="605,10" size="100,100">[But you like them visiting for the games. Each time they visit, they play a game with one of the villagers.]

[This time, you&#39;re hoping they&#39;ll pick you.]

[You see a crowd is starting to form in the center of town around the peddler.]

[[Run faster.]]
[[Continue at your pace.]]</tw-passagedata><tw-passagedata pid="14" name="Run faster." tags="" position="311,275.5" size="100,100">[Pumping all your energy into your legs, you run as fast as you can. You just barely make it to the front of the crowd when you feel it close tightly around you.]
[[Continue at your pace.]]</tw-passagedata><tw-passagedata pid="14" name="Run faster." tags="" position="311,275" size="100,100">[Pumping all your energy into your legs, you run as fast as you can. You just barely make it to the front of the crowd when you feel it close tightly around you.]

[Directly in front of you is the peddler. They stare at you for a moment.]

Expand All @@ -205,7 +196,7 @@ tw-link.visited:hover

[[You accept the offer.-&gt;Start]]
[[You decline.]]
</tw-passagedata><tw-passagedata pid="15" name="Continue at your pace." tags="" position="932,121.5" size="100,100">[You&#39;re already pretty tired from yesterday. You think you can just make it at the current pace.]
</tw-passagedata><tw-passagedata pid="15" name="Continue at your pace." tags="" position="932,121" size="100,100">[You&#39;re already pretty tired from yesterday. You think you can just make it at the current pace.]

[You just barely miss it. The crowd closes in in front of you. Seeing no other option, you start to weave around people. The crowd jostles you around.]

Expand All @@ -223,7 +214,7 @@ tw-link.visited:hover
[The crowd falls silent, awaiting your response.]

[[You accept the offer.-&gt;Start]]
[[You decline.]]</tw-passagedata><tw-passagedata pid="16" name="Title" tags="" position="114,19.5" size="100,100">#[Prize Potions!]
[[You decline.]]</tw-passagedata><tw-passagedata pid="16" name="Title" tags="" position="114,19" size="100,100">#[Prize Potions!]

[&lt;img src=&quot;https://i.imgur.com/lIbXqGr.png&quot; alt=&quot;good potion&quot; height=&quot;300&quot; width=&quot;300&quot; align=&quot;right&quot;/&gt;]

Expand Down

0 comments on commit f6584eb

Please sign in to comment.