Creating and testing macro

This commit is contained in:
David Masad
2021-02-20 21:11:19 -05:00
parent 5ac02040bd
commit e1e8932207
7 changed files with 108 additions and 54 deletions

View File

@ -27,6 +27,12 @@ State.variables.characters = [
}
]
// Choose one of an array
var randomChoice = function(vals) {
return vals[Math.floor(Math.random() * vals.length)];
};
StoryManager.storylets["Conversation"] = {
name: "Conversation",
tags: ["circulating"],
@ -82,15 +88,12 @@ StoryManager.storylets["Conversation topic"] = {
:: Start
You stand at the edge of the grand ballroom in the Duchess's palace.<br>
<<set _possibleStories = window.SM.getStorylets(3, "circulating")>>
<<ShowStoryletLinks _possibleStories>>
<<getStoryletLinks 3 "circulating">>
:: Conversation
<<set $talkingTo = $currentStorylet.character>>
You talk with $talkingTo.name. <br>
<<set _possibleStories = window.SM.getStorylets(3, "during conversation")>>
<<ShowStoryletLinks _possibleStories>>
<<getStoryletLinks 3 "during conversation">>
[[Keep circulating | Start]]
:: Being approached