Something went wrong

Party Adventure 2

// Set up
VAR speaker = "Narrator"
VAR music = ""
VAR scene = "Corridor bars"

LIST possible_party_members = Elly, Eddy
VAR party = ()

LIST all_spells = Fireball, Invisibility, Fly, Knock
VAR spells = ()

LIST possible_states = LockedUp, Hurt, Delayed, TrapDisarmed
// You start the game in a jail cell.
VAR state = (LockedUp)

LIST all_locations = Cell, TrapRoom, Exit
VAR location = Cell
// End set up

-> start

=== start ===
You wake up behind bars fading in and out of consciousness. Elly, your fighter, and Eddy, your rogue are in cells on either side of you but there isn't much you can do in your current state except set up your spell matrix and sleep.

-> rest ->

~speaker = "Eddy"
Wake up! The orc will be back soon with food, and we need to warn the kingdom they're coming. What's the plan? #emote driven

* {spells ? Knock} [Use knock to unlock one of the cells] -> knock_cells
* [Elly! Quick, pick your lock and get free]
  ~party += Elly
  -> wait_for_orc
* [We'll wait, and take them by surprise]
  -> wait_for_orc

-> END

=== knock_cells ===
~speaker = "Narrator"
~spells -= Knock
Whose cell are you going to unlock?

* [Your own]
  ~state -= LockedUp
  -> wait_for_orc
* [Eddy]
  ~party += Eddy
  -> wait_for_orc
* [Elly]
  ~party += Elly
  -> wait_for_orc

=== wait_for_orc ===
~speaker = "Orc"
Huuum de huuum, human dinner.

{
- party ? Eddy:
  -> eddy_kills_orc
- party ? Elly:
  -> elly_free
- not (state ? LockedUp):
  -> you_free
- else:
  -> no_one_free
}

-> prepare_to_run

= eddy_kills_orc
~speaker = "Eddy"
Take that, foul orc! #emote rage

~speaker = "Narrator"
Eddy uses his experience as a fighter to quickly knock out the orc.

-> prepare_to_run

= elly_free
~speaker = "Orc"
Er. Where'd the pretty one go?

* {spells ? Fireball} [Fireball the orc before it can spot Elly]
    ~spells -= Fireball
    ~speaker = "Narrator"
    A fireball streaks out of your cell and incinerates the orc. Poor orc.
    -> prepare_to_run
* [Let Elly sneak out on her own]
    ~speaker = "Narrator"
    Elly is the sneakiest member of your party, and probably the best equipped to sneak back and warn the kingdom alone. Unfortunately you never find out if she succeeds, as the orcs decide to have you and Eddy for dinner.
    -> END
* {spells ? Knock} [Use knock to let out Eddy as well]
    ~spells -= Knock
    -> eddy_kills_orc

= you_free
~speaker = "Orc"
You! How did you get out?

* {spells ? Invisibility} [Turn invisible and flee]
    ~speaker = "Narrator"
    ~spells -= Invisibility
    You promise you'll be back for Eddy and Elly, but for now you disappear with a burst of magic and dash off turn the corridor.
    -> run_down_corridor
* {spells ? Fireball} [Fireball the orc]
    ~spells -= Fireball
    ~speaker = "Narrator"
    A fireball streaks out of your cell and incinerates the orc. Poor orc.
    -> prepare_to_run

= no_one_free
* {spells ? Fireball} [Fireball the orc]
    ~spells -= Fireball
    ~speaker = "Narrator"
    A fireball streaks out of your cell and incinerates the orc. Poor orc.
    -> prepare_to_run
* ->
    ~speaker = "Narrator"
    Well, that's a bit embarrasing. Maybe that wasn't the best preparation you could have made.
    -> END

=== prepare_to_run ===
~speaker = "Narrator"
{
- not (state ? LockedUp) and (party ? Elly) and (party ? Eddy):
  Everyone is ready! Time to set out.
  -> run_down_corridor
- (state ? LockedUp) and not (party ? Elly) and not (party ? Eddy):
  Although you're all still in your cells, in only takes Elly a moment to pick all three locks now there's no guard. But is that a moment you had?

  ~state -= LockedUp
  ~party += (Eddy, Elly)
  ~state += Delayed
- else:
  -> make_decision
}
-> run_down_corridor

= make_decision
With the orc dealt with, you have a tough choice to make. Do you spend the time for Elly to pick all the locks, or do the people who are free set out immediately to avoid a delay?

* [Make sure everyone is free]
    ~state -= LockedUp
    ~party += (Eddy, Elly)
    ~state += Delayed
    -> run_down_corridor
* {state ? LockedUp} [Send off {party} to carry a warning]
    You hope {party} manage to sneak out and warn the kingdom. Unfortunately you never find out if they succeed, as the orcs decide to have prisoners for dinner.
    -> END
* {not (state ? LockedUp)} [Set off with {party}, promising to come back]
    There isn't a moment to lose! You and {party} set off immediately, promising to come back and rescue {possible_party_members - party}.
    -> run_down_corridor

=== run_down_corridor ===
~location = TrapRoom
~scene = "Corridor"
~speaker = "Narrator"
{You run down the corridor|You are in the corridor}.

{
- party ? Elly and not (state ? TrapDisarmed):
  ~speaker = "Elly"
  {Watch out! It's a trap!|We should really disarm that trap!} #emote driven
}

<- choices
<- check_spells_available(-> run_down_corridor)
<- speak_to_elly(-> run_down_corridor)
-> DONE

= choices

+ [Carry on running]
  {
  - not (state ? TrapDisarmed):
    ~speaker = "Narrator"
    A blast of flame from a trap burns you badly, and you stagger back.
    ~state += (TrapDisarmed, Hurt)
    {
    - party ? Elly:
      ~speaker = "Elly"
      Why did you do that?! I told you about the trap. At least it's disarmed now.
    - party ? Eddy:
      ~speaker = "Eddy"
      Nice find, good disarming. Are you okay?
    - else:
      ~speaker = "Narrator"
      That hurt. A lot. But at least the trap is disarmed.
    }
    -> run_down_corridor
  - else:
    -> get_outside
  }
+ {party ? Elly and not (state ? TrapDisarmed)} [Disarm the trap]
  ~state += TrapDisarmed
  -> run_down_corridor

=== get_outside ===
~scene = "Corridor outside"
~speaker = "Narrator"
You run down the corridor and escape. You have {party:{party}|no one else} with you, and {spells:the spells {spells}|no spells} still available. You {state ? Delayed:were|were not} delayed on the way out, and you {state ? Hurt:are|are not} injured.
-> END

=== rest ===
~speaker = "Narrator"
You rest for the night.

// Reset the spell list so the player can always choose the two they want.
~spells = ()

-> pick_spell -> pick_spell ->

You currently have {spells} ready to use.

->->

= pick_spell
Pick a spell to memorize

+ {not (spells ? Fireball)} [Fireball: shoot a ball of fire]
  ~spells += Fireball
+ {not (spells ? Invisibility)} [Invisibility: turn invisibile]
  ~spells += Invisibility
+ {not (spells ? Fly)} [Fly: fly!]
  ~spells += Fly
+ {not (spells ? Knock)} [Knock: unlock a lock by looking at it]
  ~spells += Knock
-
->->

=== check_spells_available(-> back) ===

+ [Check spells available]
  ~speaker = "Narrator"
  You have {spells} available.
  -> back

=== speak_to_elly(-> back) ===
{
- party ? Elly:
  * [Ask Elly about her childhood]
    ~speaker = "Elly"
    Really? That's what's on your mind?
    ~state += Delayed
    -> back
  * [Ask Elly what thief skills she has]
    ~speaker = "Elly"
    I'm pretty good with picks and sneaking, and I'm an expert at disarming traps.
    -> back
}