@@ -0,0 +1,25 @@
|
||||
package script
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
"git.teletypegames.org/games/realworld/inc/world"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Script{
|
||||
Name: inc.ScriptFinale,
|
||||
Actions: inkwell.Seq(
|
||||
world.SetMode(world.ModeCutscene),
|
||||
inkwell.Wait(0.6),
|
||||
inkwell.Say(inc.Paul, "I'm putting it in. That's all this is."),
|
||||
inkwell.Wait(0.4),
|
||||
world.UseTheme(inc.NokiaPunk),
|
||||
inkwell.Say("norman", "No — this isn't what you were supposed to do!"),
|
||||
inkwell.Wait(0.6),
|
||||
inkwell.Say(inc.TapeMystery, "Thank you, Paul. You did exactly what I asked, the whole way through."),
|
||||
inkwell.Wait(1.0),
|
||||
inkwell.ShowEnd("REAL WORLD — end of game two"),
|
||||
),
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package script
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
type Script = inkwell.Script
|
||||
|
||||
var Manager = inkwell.NewManager[Script]()
|
||||
@@ -0,0 +1,17 @@
|
||||
package script
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Script{
|
||||
Name: inc.ScriptOpening,
|
||||
Actions: inkwell.Seq(
|
||||
inkwell.SetFlag(inc.FlagPoliceTip),
|
||||
inkwell.Say(inc.Paul, "Back alley. Just like the clerk said."),
|
||||
inkwell.Say(inc.Dex, "A government office tipped you off to remove something from a scene. That doesn't strike you as odd?"),
|
||||
),
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package script
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
"git.teletypegames.org/games/realworld/inc/world"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Script{
|
||||
Name: inc.ScriptTapeInsert,
|
||||
Actions: inkwell.Seq(
|
||||
world.Fn(func(ctx *inkwell.Ctx) {
|
||||
item := world.TakePending()
|
||||
if item == "" {
|
||||
return
|
||||
}
|
||||
world.SetSlot2(item)
|
||||
ctx.Game.Inventory.Remove(item)
|
||||
ctx.Game.State.SetVar(inc.VarArmillaStrip, "SLOT2: READING")
|
||||
}),
|
||||
inkwell.Say(inc.Paul, "Right. Let's see who you are."),
|
||||
inkwell.Say(inc.Dex, "Clicked in. Spinning. And now: nothing."),
|
||||
inkwell.Say(inc.Dex, "A stranger's tape in your own Armilla, Paul. I hope you know what you're doing."),
|
||||
),
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package script
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
"git.teletypegames.org/games/realworld/inc/world"
|
||||
)
|
||||
|
||||
func UseWithFail(item string, h *inkwell.Hotspot) inkwell.Action {
|
||||
key := "fail." + item + "." + h.Name
|
||||
world.Game().State.NoteTalked(key)
|
||||
n := world.Game().State.Talked(key)
|
||||
|
||||
return inkwell.Seq(
|
||||
inkwell.Say(inc.Paul, pick(paulFails, n)),
|
||||
inkwell.Say(inc.Dex, dexFail(n)),
|
||||
)
|
||||
}
|
||||
|
||||
var paulFails = []string{
|
||||
"No. That's not going to work.",
|
||||
"Tried that. It didn't improve.",
|
||||
"All right, I know that one doesn't work.",
|
||||
"Now it's personal.",
|
||||
}
|
||||
|
||||
var dexDry = []string{
|
||||
"No. Not like that.",
|
||||
"I heard it. Nothing happened.",
|
||||
}
|
||||
|
||||
var dexTease = []string{
|
||||
"Twice the same. The second one rarely goes better.",
|
||||
"Do it a few more times, maybe physics reconsiders.",
|
||||
}
|
||||
|
||||
func dexFail(n int) string {
|
||||
switch {
|
||||
case n <= 1:
|
||||
return pick(dexDry, n)
|
||||
case n == 2:
|
||||
return pick(dexTease, n)
|
||||
default:
|
||||
return "Paul. Leave it. Look again at what you're carrying — that's where it is."
|
||||
}
|
||||
}
|
||||
|
||||
func pick(s []string, n int) string {
|
||||
switch {
|
||||
case len(s) == 0:
|
||||
return ""
|
||||
case n <= 0:
|
||||
return s[0]
|
||||
case n-1 < len(s):
|
||||
return s[n-1]
|
||||
default:
|
||||
return s[rand.Intn(len(s))]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user