Browse Source

Working state

master
Alexander Yakovlev 5 years ago
parent
commit
53d61fbc42
  1. 2
      game/begin.coffee
  2. 6
      game/story.coffee

2
game/begin.coffee

@ -92,6 +92,7 @@ class ImprovModel
setTagIfNotPresent: (tagName, value) ->
if @getTag(tagName) == undefined
@tags.push([tagName, value])
state = new ImprovModel
cunit = (name, spec) ->
spec.act = () ->
@ -101,6 +102,5 @@ cunit = (name, spec) ->
r.entering(r.name)
return '<em>'+@enact.fcall(this)+'</em>'
return unit(name, spec)
state = new ImprovModel
procgen = (tag) ->
return ImprovEngine.gen(tag, state)

6
game/story.coffee

@ -69,7 +69,7 @@ room "start",
return "alexey_final_dsc".l()
if salet.character.ferret
return "alexey_end".l()
return "alexey".l(Improv, state)
return "alexey".l(ImprovEngine, state)
enact: () ->
salet.goTo("alexey")
cunit "margo",
@ -79,7 +79,7 @@ room "start",
return "margo_final_dsc".l()
if salet.character.ferret
return "margo_end".l()
"margo".l(Improv, state)
"margo".l(ImprovEngine, state)
enact: () ->
salet.goTo("margo")
]
@ -171,7 +171,7 @@ dlg = (name) ->
return "meet_#{name}".l()
choices: "##{name}",
dsc: () ->
"#{name}_dsc".l(Improv, state)
"#{name}_dsc".l(ImprovEngine, state)
})
dlg_bye = (name) ->

Loading…
Cancel
Save