Ugo reloaded
Ugo reloaded est un court chatbot créé sous Twine (format Chapbook). Le code ci-dessous peut être copié tel quel dans un logiciel qui gère le format twee. Attention aux adresses des cartes de tarot.
:: StoryTitle
Ugo reloaded
:: Début[important]
lien: 0
config.header.center: "[[Ma collection]]"
--
*Bonjour*
[[Qui es-tu?]]
:: Qui es-tu?
lien: lien + 1
--
*Je m'appelle Ugo. Kris est ma créatrice.*
*Quel est ton nom?*
{text input for: 'Nom'}
[[Valider mon choix-> Pronom]]
:: Pronom
lien: lien + 1
config.header.center: "[[Ma collection]]"
--
Je suis ravi de faire ta connaissance, {Nom}. Quel pronom souhaites tu que j'utilise?
{dropdown menu for: 'pronom', choices: ['Il', 'Elle', 'Iel']}
*[[Merci pour ta réponse-> Activités]]*
:: Activités[important]
lien: lien + 1
config.header.center: "[[Ma collection]]"
--
Que sais-tu faire?
Je sais discuter, jouer à pierre feuille ciseaux et faire des tirages de Tarot.
Que veux-tu faire?
> [[Discuter]]
> [[Jouer à pierre feuille ciseaux->Jeu pierre feuille ciseaux]]
> [[Faire des tirages du Tarot->Tarot]]
:: Discuter
lien: lien + 1
--
*Comment s'est passé ta journée?*
J'ai passé une [[mauvaise journée]].
J'ai passé une [[bonne journée]].
:: Jeu pierre feuille ciseaux
choix: 'Pierre'
lien: lien + 1
--
Le principe est simple: chacun choisit entre pierre, feuille et ciseaux.
La pierre gagne contre les ciseaux.
Les ciseaux gagnent contre la feuille.
La feuille gagne contre la pierre.
{dropdown menu for: 'choix', choices: ['Pierre', 'Feuille', 'Ciseaux']}
[[Valider ton choix->Résultat]]
:: mauvaise journée
config.header.center: "[[Ma collection]]"
lien: lien + 2
--
Tu m'en vois désolé.
Souhaites-tu en [[[parler-> Approfondir]]?
ou préfères-tu regarder des [[photos de chats mignons]]?
Nous pouvons aussi jouer à [[pierre feuille ciseaux->Jeu pierre feuille ciseaux]] ou faire un tirage du [[Tarot]].
:: bonne journée
config.header.center: "[[Ma collection]]"
lien: lien + 1
--
Tu m'en vois ravi.
:: Approfondir
config.header.center: "[[Ma collection]]"
lien: lien + 2
--
Quelle émotion ressens-tu?
* en colère?
* découragé?
* triste?
Tout ça à la fois?
:: photos de chats mignons
config.header.center: "[[Ma collection]]"
lien: lien + 2
--
Voici quelques images de chats.
{embed Unsplash image: 'https://unsplash.com/photos/1l2waV8glIQ', alt: '2 chatons'}
{embed Unsplash image: 'https://unsplash.com/photos/FbhNdD1ow2g', alt: 'chat surpris'}
{embed Unsplash image: 'https://unsplash.com/photos/zBvVuRJ71vU', alt: 'chat debout'}
:: Résultat
choixUgo: (random.d6)
choixUgo (choixUgo === 1): "Pierre"
choixUgo (choixUgo === 2): "Feuille"
choixUgo (choixUgo === 3): "Ciseaux"
choixUgo (choixUgo === 4): "Pierre"
choixUgo (choixUgo === 5): "Feuille"
choixUgo (choixUgo === 6): "Ciseaux"
victoire (choix === "Pierre" && choixUgo === "Feuille"): "J'ai gagné."
victoire (choixUgo === "Pierre" && choix === "Feuille"): "Tu as gagné."
victoire (choix === "Pierre" && choixUgo === "Ciseaux"): "Tu as gagné."
victoire (choixUgo === "Pierre" && choix === "Ciseaux"): "J'ai gagné."
victoire (choix === "Feuille" && choixUgo === "Ciseaux"): "J'ai gagné."
victoire (choixUgo === "Feuille" && choix === "Ciseaux"): "Tu as gagné."
victoire (choix === "Pierre" && choixUgo === "Pierre"): "Egalité"
victoire (choix === "Feuille" && choixUgo === "Feuille"): "Egalité"
victoire (choix === "Ciseaux" && choixUgo === "Ciseaux"): "Egalité"
--
* Ton choix: {choix}
* Mon choix: {choixUgo}
{victoire}
Veux-tu refaire une partie?
[[Oui->Jeu pierre feuille ciseaux]]
Je préfère [[discuter->Discuter]] .
Je veux faire [[autre chose-> Activités]] .
:: Tarot
Cards: ["00-TheFool", "01-TheMagician", "02-TheHighPriestess", "03-TheEmpress", "04-TheEmperor", "05-TheHierophant", "06-TheLovers", "07-TheChariot", "08-Strength", "09-TheHermit", "10-WheelOfFortune", "11-Justice", "12-TheHangedMan", "13-Death", "14-Temperance", "15-TheDevil", "16-TheTower", "17-TheStar", "18-TheMoon", "19-TheSun", "20-Judgement", "21-TheWorld", "Cups01", "Cups02", "Cups03", "Cups04", "Cups05", "Cups06", "Cups07", "Cups08", "Cups09", "Cups10", "Cups11", "Cups12", "Cups13", "Cups14", "Pentacles01", "Pentacles02", "Pentacles03", "Pentacles04", "Pentacles05", "Pentacles06", "Pentacles07", "Pentacles08", "Pentacles09", "Pentacles10", "Pentacles11", "Pentacles12", "Pentacles13", "Pentacles14", "Swords01", "Swords02", "Swords03", "Swords04", "Swords05", "Swords06", "Swords07", "Swords08", "Swords09", "Swords10", "Swords11", "Swords12", "Swords13", "Swords14", "Wands01", "Wands02", "Wands03", "Wands04", "Wands05", "Wands06", "Wands07", "Wands08", "Wands09", "Wands10", "Wands11", "Wands12", "Wands13", "Wands14", ]
PickedCard: ""
lien: lien + 1
config.header.center: "[[Ma collection]]"
--
[JavaScript]
var i = Math.floor(Math.random() * Cards.length);
PickedCard = Cards[i];
[Continued]
Voici le tirage d'une carte ([[Tirer une autre carte->Tarot]]):
{embed passage: PickedCard}
:: 00-TheFool[tarot-card]
{embed image: 'cards/00-TheFool.png', alt: 'The Fool'}
The Fool (en français Le Fou)
Symbolise: toutes sortes de choses
:: 01-TheMagician[tarot-card]
{embed image: 'cards/01-TheMagician.png', alt: 'The Magician'}
:: 02-TheHighPriestess[tarot-card]
{embed image: "cards/02-TheHighPriestess.png", alt: "The High Priestess"}
:: 03-TheEmpress[tarot-card]
{embed image: 'cards/03-TheEmpress.png', alt: 'The Empress'}
:: 04-TheEmperor[tarot-card]
{embed image: 'cards/04-TheEmperor.png', alt: 'The Emperor'}
:: 05-TheHierophant[tarot-card]
{embed image: 'cards/05-TheHierophant.png', alt: 'The Hierophant'}
:: 06-TheLovers[tarot-card]
{embed image: 'cards/06-TheLovers.png', alt: 'The Lovers'}
:: 07-TheChariot[tarot-card]
{embed image: 'cards/07-TheChariot.png', alt: 'The Chariot'}
:: 08-Strength[tarot-card]
{embed image: 'cards/08-Strength.png', alt: 'Strength'}
:: 09-TheHermit[tarot-card]
{embed image: 'cards/09-TheHermit.png', alt: 'The Hermit'}
:: 10-WheelOfFortune[tarot-card]
{embed image: 'cards/10-WheelOfFortune.png', alt: 'Wheel of Fortune'}
:: 11-Justice[tarot-card]
{embed image: 'cards/11-Justice.png', alt: 'Justice'}
:: 12-TheHangedMan[tarot-card]
{embed image: 'cards/12-TheHangedMan.png', alt: 'The Hanged Man'}
:: 13-Death[tarot-card]
{embed image: 'cards/13-Death.png', alt: 'Death'}
:: 14-Temperance[tarot-card]
{embed image: 'cards/14-Temperance.png', alt: 'Temperance'}
:: 15-TheDevil[tarot-card]
{embed image: 'cards/15-TheDevil.png', alt: 'The Devil'}
:: 16-TheTower[tarot-card]
{embed image: 'cards/16-TheTower.png', alt: 'The Tower'}
:: 17-TheStar[tarot-card]
{embed image: 'cards/17-TheStar.png', alt: 'The Star'}
:: 18-TheMoon[tarot-card]
{embed image: 'cards/18-TheMoon.png', alt: 'The Moon'}
:: 19-TheSun[tarot-card]
{embed image: 'cards/19-TheSun.png', alt: 'The Sun'}
:: 20-Judgement[tarot-card]
{embed image: 'cards/20-Judgement.png', alt: 'Judgement'}
:: 21-TheWorld[tarot-card]
{embed image: 'cards/21-TheWorld.png', alt: 'The World'}
:: Cups01[tarot-card]
{embed image: 'cards/Cups01.png', alt: 'Cups01'}
:: Cups02[tarot-card]
{embed image: 'cards/Cups02.png', alt: 'Cups02'}
:: Cups03[tarot-card]
{embed image: 'cards/Cups03.png', alt: 'Cups03'}
:: Cups04[tarot-card]
{embed image: 'cards/Cups04.png', alt: 'Cups04'}
:: Cups05[tarot-card]
{embed image: 'cards/Cups05.png', alt: 'Cups05'}
:: Cups06[tarot-card]
{embed image: 'cards/Cups06.png', alt: 'Cups06'}
:: Cups07[tarot-card]
{embed image: 'cards/Cups07.png', alt: 'Cups07'}
:: Cups08[tarot-card]
{embed image: 'cards/Cups08.png', alt: 'Cups08'}
:: Cups09[tarot-card]
{embed image: 'cards/Cups09.png', alt: 'Cups09'}
:: Cups10[tarot-card]
{embed image: 'cards/Cups10.png', alt: 'Cups10'}
:: Cups11[tarot-card]
{embed image: 'cards/Cups11.png', alt: 'Cups11'}
:: Cups12[tarot-card]
{embed image: 'cards/Cups12.png', alt: 'Cups12'}
:: Cups13[tarot-card]
{embed image: 'cards/Cups13.png', alt: 'Cups13'}
:: Cups14[tarot-card]
{embed image: 'cards/Cups14.png', alt: 'Cups14'}
:: Pentacles01[tarot-card]
{embed image: 'cards/Pentacles01.png', alt: 'Pentacles01'}
:: Pentacles02[tarot-card]
{embed image: 'cards/Pentacles02.png', alt: 'Pentacles02'}
:: Pentacles03[tarot-card]
{embed image: 'cards/Pentacles03.png', alt: 'Pentacles03'}
:: Pentacles04[tarot-card]
{embed image: 'cards/Pentacles04.png', alt: 'Pentacles04'}
:: Pentacles05[tarot-card]
{embed image: 'cards/Pentacles05.png', alt: 'Pentacles05'}
:: Pentacles06[tarot-card]
{embed image: 'cards/Pentacles06.png', alt: 'Pentacles06'}
:: Pentacles07[tarot-card]
{embed image: 'cards/Pentacles07.png', alt: 'Pentacles07'}
:: Pentacles08[tarot-card]
{embed image: 'cards/Pentacles08.png', alt: 'Pentacles08'}
:: Pentacles09[tarot-card]
{embed image: 'cards/Pentacles09.png', alt: 'Pentacles09'}
:: Pentacles10[tarot-card]
{embed image: 'cards/Pentacles10.png', alt: 'Pentacles10'}
:: Pentacles11[tarot-card]
{embed image: 'cards/Pentacles11.png', alt: 'Pentacles11'}
:: Pentacles12[tarot-card]
{embed image: 'cards/Pentacles12.png', alt: 'Pentacles12'}
:: Pentacles13[tarot-card]
{embed image: 'cards/Pentacles13.png', alt: 'Pentacles13'}
:: Pentacles14[tarot-card]
{embed image: 'cards/Pentacles14.png', alt: 'Pentacles14'}
:: Swords01[tarot-card]
{embed image: 'cards/Swords01.png', alt: 'Swords01'}
:: Swords02[tarot-card]
{embed image: 'cards/Swords02.png', alt: 'Swords02'}
:: Swords03[tarot-card]
{embed image: 'cards/Swords03.png', alt: 'Swords03'}
:: Swords04[tarot-card]
{embed image: 'cards/Swords04.png', alt: 'Swords04'}
:: Swords05[tarot-card]
{embed image: 'cards/Swords05.png', alt: 'Swords05'}
:: Swords06[tarot-card]
{embed image: 'cards/Swords06.png', alt: 'Swords06'}
:: Swords07[tarot-card]
{embed image: 'cards/Swords07.png', alt: 'Swords07'}
:: Swords08[tarot-card]
{embed image: 'cards/Swords08.png', alt: 'Swords08'}
:: Swords09[tarot-card]
{embed image: 'cards/Swords09.png', alt: 'Swords09'}
:: Swords10[tarot-card]
{embed image: 'cards/Swords10.png', alt: 'Swords10'}
:: Swords11[tarot-card]
{embed image: 'cards/Swords11.png', alt: 'Swords11'}
:: Swords12[tarot-card]
{embed image: 'cards/Swords12.png', alt: 'Swords12'}
:: Swords13[tarot-card]
{embed image: 'cards/Swords13.png', alt: 'Swords13'}
:: Swords14[tarot-card]
{embed image: 'cards/Swords14.png', alt: 'Swords14'}
:: Wands01[tarot-card]
{embed image: 'cards/Wands01.png', alt: 'Wands01'}
:: Wands02[tarot-card]
{embed image: 'cards/Wands02.png', alt: 'Wands02'}
:: Wands03[tarot-card]
{embed image: 'cards/Wands03.png', alt: 'Wands03'}
:: Wands04[tarot-card]
{embed image: 'cards/Wands04.png', alt: 'Wands04'}
:: Wands05[tarot-card]
{embed image: 'cards/Wands05.png', alt: 'Wands05'}
:: Wands06[tarot-card]
{embed image: 'cards/Wands06.png', alt: 'Wands06'}
:: Wands07[tarot-card]
{embed image: 'cards/Wands07.png', alt: 'Wands07'}
:: Wands08[tarot-card]
{embed image: 'cards/Wands08.png', alt: 'Wands08'}
:: Wands09[tarot-card]
{embed image: 'cards/Wands09.png', alt: 'Wands09'}
:: Wands10[tarot-card]
{embed image: 'cards/Wands10.png', alt: 'Wands10'}
:: Wands11[tarot-card]
{embed image: 'cards/Wands11.png', alt: 'Wands11'}
:: Wands12[tarot-card]
{embed image: 'cards/Wands12.png', alt: 'Wands12'}
:: Wands13[tarot-card]
{embed image: 'cards/Wands13.png', alt: 'Wands13'}
:: Wands14[tarot-card]
{embed image: 'cards/Wands14.png', alt: 'Wands14'}
:: Ma collection[important]
config.header.center: "{back link, label: 'Retour'}"
--
Voici ma collection d'Ugoïdes.
{embed image: 'ugoid/estandar.png', alt: 'blanc'}