include "convtree.h";

! here's the complete structure:
!    cheryltopic:
!       contains everything cheryl will say on a time delay
!    all early deadends use cheryltopic
!    endgame events introduce a new set of player topics

Constant delay=1;

Class Chat class Conv    with deadend cheryltopic;

Class Ctalk class Chat   with act_trigger ##Talk has immediate;
Class Cansw class Chat   with act_trigger ##Answer has immediate;
Class Cwait class Chat   with num_trigger delay;

Conv cherylstart with description
           "^Cheryl says, ~This is our chance to make a difference, Tolan.
             But only if we do it according to my rules.
             You're going to see
             what sort of information you can get displayed. As soon as you
             bring some Yi text up, you stop. You don't touch anything until
             I say it's ok to continue. Got it?~";
Cansw ->           with cpop, description
          "You reply, ~Of course. I will do it your way rather than not at
           all.~^^Cheryl says, ~I'd be more glad to hear that if I actually
           trusted you, Tolan.~";
Cwait ->           with description
           "^Cheryl says, ~As you asked, the guards will keep their distance
            so they won't disturb your concentration. It'll just be you and
            me. And, since I'm no mechanist, I've got this--just so
            I can keep tabs on you.~ She shows you a holographic reproduction
            of this room, hovering over a black base. ~There are sensors for
            movement, electromagnetic radiation, and I don't know what else,
            all analyzing this room. This little display lets me monitor the
            activity everywhere in the room so I can see what you're up to.
            So don't think you'll get away with anything.~";
Cansw -> -> with description
           "~I am not intending to get away with anything, Cheryl,~
            you reply. ~I just want to crack the Yi-Lono-Mordel
            nut.~";
Cwait -> -> -> with description "^Cheryl says, ~This is a chance to make history together,
            Tolan. So crack it, but leave opening it all the way to me.~";
Cwait -> -> ;

Conv cheryltopic;
Cwait -> ;
Cwait -> ;
Cwait -> ;
Cwait -> ;
Cwait ->                with description
           "^Cheryl sighs. ~Tolan, do you have any idea how important it is
            we figure this place out, once and for all?~";
Cansw -> ->             with cpop, description
           "You reply, ~It must be pretty important
            for you to take a chance on me.~";
Cwait -> ->             with description
           "^Cheryl says, ~The problem is with the Lono, as you might guess.~";
Ctalk -> -> ->          with description
           "You say, ~Are not the Lono long gone? Or is there a Terran Alliance
            secret?~";
Cwait -> -> -> ->       with description
           "^Cheryl replies, ~Gone, but not forgotten. We didn't lie about
            anything, though. After the battle at
            Calder's Star, every last one of their ships retreated through
            the wormhole back to their galaxy.~";
Ctalk -> -> -> -> ->    with cpop,description
           "You say, ~But?~";
Cwait -> -> -> -> ->  c_swore  with deadend c_anend, description
           "^~But,~ Cheryl continues, ~They swore an oath. Apparently the
            same one they swore against the Yi, millennia ago. They're going
            to be back, Tolan, back with a vengeance. Soon. So 
            before they show up, I'm going to have found a way to put an
            end to it--and that's why you're here.~";
Cwait -> -> ->   c_anend  with description
           "^Cheryl says, ~They're coming back, Tolan. Soon, we think. So
            before they show up, I'm going to have found a way
            to put an end to it, with your help.~";
Ctalk -> -> -> ->       with cpop, description
           "You say, ~The Yi-Lono-Mordel certainly looks promising that way.~";
Cwait -> -> -> ->       with description
           "^Cheryl says, ~You probably never realized it, Tolan, but
            the Yi had a somewhat high opinion of themselves. The word Yi
            isn't just their name--it means 'the end' or
            'the ultimate'. The 'Yi-Lono-Mordel' isn't 'the Yi's Lono weapon';
            it's 'the final Lono weapon'. They were planning to win their war
            with it.~";
Cwait -> -> -> -> ->    with description
           "^Cheryl says, ~So I guess I'll finally make it into the history
               books by doing it for them.~";
Ctalk -> -> -> -> ->    with description
           "You say, ~Until humanity won the war for them.~";
Cwait -> -> -> -> -> -> with cinclude cheryltopic, description
           "^Cheryl says, ~We didn't win the war. Just a battle. The Terran
            Alliance's forces are terribly depleted. Who knows what additional
            forces the Lono have sitting in their galaxy?~";
Cansw -> -> -> -> -> -> -> with description
           "You say, ~Maybe none at all.~";
Cwait -> -> -> -> -> -> -> -> with description
          "^Cheryl says, ~Maybe not, but I'm not willing to take that chance,
               especially not with an opportunity like Yi-Lono-Mordel in my
               hands.~";
Ctalk -> -> -> -> -> -> -> with description
           "You say, ~Their current galaxy.~";
Cwait -> -> -> -> -> -> -> -> with description
           "^Cheryl says, ~Yes, their current galaxy. Who knows how many
            galaxies they've chased the Yi through?~";
Cwait -> -> -> -> -> -> -> -> -> ;
Cansw -> -> -> -> -> -> -> -> -> with description
           "You say, ~A better question: how many times have they been
            turned back before?~";
Cwait -> -> -> -> -> -> -> -> -> -> with description
           "^Cheryl says, ~I don't think they ever have, Tolan. They're angry.
            Really angry. They swore an oath against us. The same one they swore
            against the Yi--they stressed that part. We know how much
            they hate the Yi. And now we'll get the same treatment.~^^
            Cheryl says, ~There's a difference between us and the Yi, though.
            They run. We're going to fight. And I'm going to be the one
            to bring the bastards down.~",
           depends [; return c_swore hasnt conv_seen; ];
Ctalk -> -> -> -> -> -> -> -> -> -> -> with description
           "You say, ~The Yi tried to fight, Cheryl. They had weapons.~^^You
            pause, decide to say just a little more. ~Look at this place.
            They just tired of it.~";
Cwait -> -> -> -> -> -> -> -> -> -> with description
           "^Cheryl says, ~Given that oath, I'd imagine never. Unless perhaps
            that was the Yi's transgression long ago.~";
Cwait -> ;
Cwait -> ;
Cwait -> ;
Cwait -> ;
Cwait -> ;
Cwait -> ;
Cwait -> ;
Cwait -> ;
Cwait -> ;
Cwait -> ;
Cwait ->                      with description
           "^Cheryl says, ~Tolan, my superiors don't want you anywhere
             near here. If they find out, I'll be in a lot of trouble.~";
Ctalk -> ->                  with cpop, description
            "You say, ~Even if I find a way to win the war?~";
Cwait -> ->                  with description
            "^Cheryl says, ~If I manage to find a way to win the war, they'll
            forgive me. But I can't tell them about it yet.
            They don't trust you at all. I don't really trust you.
            But we've worked together, so I'm sure I can keep you under
            control, and more importantly, I'm sure you can get me access.
            I know you can do this. I don't know if anybody else could.~";
Ctalk -> -> ->               with cpop, description
            "You smile. ~Nobody else could.~";
Cwait -> -> ->               with description
            "^Cheryl says, ~And of anyone, I'm the only one who will
            be able to make heads or tails out of whatever information you
            can dig up.~";
Cwait -> -> -> ->            with description
            "^Cheryl says, ~Cooperation will payoff in the end.~";
Ctalk -> -> -> -> ->         with description
            "You say, ~I hope so, Cheryl. I do hope so.~";
Cwait -> -> -> -> -> ;
Ctalk -> -> -> ->            with description
            "You say, ~Heads or tails. Yes, indeed. I am sure you can figure
             it out if I bring up some text.~";
Cwait -> -> -> -> ->         with description
            "^Cheryl says, ~Regardless of how it ended, we did make a good
            team at the last dig. I'm glad I can give you the chance to work
            with me again.~";
Ctalk -> -> -> -> -> ->      with description
            "You say, ~I treasure this opportunity.~";
Cwait -> -> -> -> -> -> ;



Chat c_wave              with description
            "^Cheryl says, ~Yes? I do see you, Tolan.~";
Ctalk ->                 with description
            "You say, ~Just checking.~";
Cwait -> -> with description
            "^Cheryl says, ~Why is it I don't like the sound of that?~";
Cwait -> ;

Chat c_jump              with description
            "^Cheryl says, ~That's a bit of Mechanism I've never seen before.~";
Ctalk ->                 with description
            "You say, ~I will try to avoid further surprise.~";
Cwait -> ;

Chat c_sing              with description
            "^Cheryl says, ~Tolan, we both have to be here. So please
              don't make it any worse for me.~";
Ctalk -> with description "You say, ~The urge has passed now.~";
Cwait -> ;

Chat c_smile    with description
     "^Cheryl says, ~Try not to hurt yourself exercising those unused
       muscles, Tolan.~";
Ctalk -> with description "You say, ~Just because I never smile around
       you does not mean I never smile.~";
Cwait -> -> with description
       "^Cheryl says, ~Oh right, I'm the dead serious one.~";
Cwait -> ;

Chat c_frown    with description
     "^Cheryl says, ~Is there a problem?~";
Ctalk -> with description "You say, ~Well, yes, I think that is fairly
      obvious. But it can not stop me.~";
Cwait -> ;

Chat c_nod      with description
     "^Cheryl looks at you quizzically.";
Ctalk -> with description "You say, ~Just thinking outside. Out loud, I mean.~";
Cwait -> ;

Chat c_wink     with description
     "^Cheryl stares at you.";
Ctalk -> with description "You say, ~What?~";
Cwait -> -> with description "^Cheryl says, ~Nothing.~";
Cwait -> ;

Chat c_laugh    with description
     "^Cheryl says, ~Are you okay?~";
Ctalk -> with description "You say, ~I am fine.~";
Cwait -> -> with description "^Cheryl says, ~Umm, ok.~";
Cwait -> ;



Chat c_pillar   with description
     "^Cheryl says, ~You better know what you're doing here, Tolan.~";
Ctalk -> with description "You say, ~I'm looking for the manual override.~";
Cwait -> -> with description "^Cheryl says, ~Well, of course. I'd help, but I'm busy watching you.~";
Ctalk -> -> -> with description "You say, ~Of course.~";
Cwait -> -> ->;
Cwait ->;

Chat c_bay               with description
            "^Cheryl says, ~What exactly is that?~";
Cwait ->                 with cpop;
Cwait ->                 with cpop;
Cansw ->                 with description
            "You say, ~It is a wiring crossover terminal. Something is not
             connected correctly.~";
Cwait -> ->              with description
            "^Cheryl says, ~Oh, right, I should have recognized it.~";
Cwait ->;

Chat c_goggles;
Cwait ->  with description 
             "^Cheryl says, ~Are those goggles helpful? Can you see anything
             through them that isn't on my hologram?~";
Ctalk -> -> with description "You say, ~Not that I am aware of.~";
Cwait -> ;

Chat c_takeoff;
Cwait -> with description  "^Cheryl says, ~I can't imagine how you can stand wearing those
             bulky things. Of course they make a huge difference in what you
             see.~";

Chat c_fusion            with description
            "^Cheryl says, ~You're making quite a bit of progress, Tolan.~";
Cwait ->                 with cpop;
Cwait ->                 with cpop;
Cansw ->                 with cbranch c_progress;
Ctalk -> c_progress      with description
            "You say, ~No. This is little more than turning the lights on.~";
Cwait -> ->              with description
            "^Cheryl says, ~Oh, well, sure, for a place this big and complicated,
                   that would be true.~";
Cwait -> ;

Chat c_control           with description
            "^Cheryl says, ~What's on that screen?~ She approaches from other
            side of the slab. ~Bah. See if you can find some text there.~";
Ctalk ->                 with description
            "You say, ~I will watch out for text.~";

Chat c_status            with description
            "^Cheryl says, ~What's this?~ She takes a step closer to it.
             ~Shoot, no text.~";
Ctalk ->                 with cpop, description
            "You say, ~I am not exactly sure.~";
Cwait ->                 with description
            "^Cheryl says, ~Cool, that must be Yi-Lono-Mordel. I'm sure
             there's more to this, Tolan. Find me some text!~";
Cansw -> ->              with cpop, description
             "You say, ~I am on watch for anything that might produce
             significant text, I promise.~";
Cwait -> -> ;
Cwait -> -> ->           with description
            "^Cheryl says, ~Can you believe the scope of this place?
             Astrophysical engineering on this scale is so beyond what we
             can do.~";
Cwait -> -> -> ->        with description
            "^Cheryl says, ~All this power. It must be destructive on an
             unimaginable scale. Or astonishingly subtle.~";
Cwait -> -> -> -> ->     with description
            "^Cheryl says, ~Well, we'll know soon enough.~";
Cansw -> -> -> ->        with description
            "You say, ~Have you ever seen one of the wormholes?~";
Cwait -> -> -> -> ->     with description
            "^Cheryl, ~No, but I suppose they produce a similar feeling.~";
Ctalk -> -> -> -> -> -> with description
            "You say, ~The wormholes are amazing, they defy human imagination.~
             You pause to let that sink in. ~This place is bigger.~";
Cwait -> -> -> -> -> -> with cpop ;
Cwait -> -> -> -> -> -> ;

Chat c_didnothing        with description
            "^Cheryl says, ~Are you sure you know what you're doing, Tolan?~";
Cwait ->;
Cansw ->                 with description
            "You say, ~Trial and error is part of the process of Mechanism.~";
Cwait -> ->              with description
            "^Cheryl says, ~Make sure you err on the side of safety.~";
Cwait -> -> ->;
Ctalk -> -> ->           with description
            "You say, ~I am being cautious, but we can not afford
             too much caution.~";
Cwait ->;

Chat c_rods_seen         with description
            "^Cheryl says, ~What are those?~";
Ctalk ->                 with description
            "You say, ~It seems it will not display any information unless
             you activate these controls.~";
Cwait -> ->              with description
            "^Cheryl says, ~I knew it! The place must be very important to
             have its information so protected. It's rather uncharacteristic
             of the Yi, but I expected that all along.~";
Ctalk -> -> ->           with description
            "You say, ~You are right.~";
Cwait -> -> -> ;
Cwait ->                 with cpop;
Cwait -> ;


Chat c_rods              with description
            "^Cheryl says, ~How clever.~";
Ctalk ->                 with cpop, description
            "You say, ~Took you long enough to notice.~";
Cwait ->                 with description
            "^Cheryl says, ~I'm surprised the Yi would have had such a
             physical control system. I could have operated that myself.~";
Ctalk -> ->              with description
            "You say, ~Yes, odd.~";
Cwait -> -> ->           with description
            "^Cheryl says, ~Well, it's really to be expected that a place
                like this would have things we've never seen before.~";
Cwait -> ->;
Cwait ->;

Chat c_stall;

Class Cwtalk class Conv   with act_trigger ##Talk has immediate;
!Class Cwansw class Conv   with act_trigger ##Answer has immediate;
Class Cwwait class Conv   with num_trigger delay;

Conv c_winner;

Cwtalk ->                  with cpop, description
            "You say, ~Well, it has been fun, Cheryl. But it is over now.~
             ^^Cheryl says, ~What do you mean?~";
Cwtalk ->                  with cpop, description 
            "You say, ~Yi-Lono-Mordel is powered up and ready to go.~
             ^^Cheryl says, ~Ready? What is Yi-Lono-Mordel?~";
Cwtalk ->                  with cpop, description
            "You say, ~It is the Yi's ultimate weapon, just like you said.
             You remember the Lono planet-buster? Yi-Lono-Mordel is more.
             Far more. It is a galaxy smasher. I think. I believe. I hope.~
             ^^Cheryl stares at you silently.";
Cwtalk ->                  with cpop, description
            "You say, ~We can only assume the Yi did not use it because
             they did not want to wipe out humanity along with the Lono--at
             least, not if humanity managed to stop the Lono.~";
Cwtalk ->  c_badguy        with cpop, description
            "You say, ~So now I will get to do the honors.~
             ^^Cheryl says, ~What? Destroy the galaxy? Why?~";
Cwtalk ->                  with cpop, description
            "You shake your head. ~Cheryl, Cheryl. Come now. Why
             do you think I would want to destroy all of humanity?~
             ^^Cheryl says, ~I know you too well to believe you're
             a psychopath. So I don't know.~";
Cwtalk ->                  with cpop, description
            "You say, ~You do not know me at all, Cheryl. I am different
             from everyone you know. Different from every human being
             in the galaxy, in fact. Differently motivated.~";
Cwtalk ->                  with description
            "You say, ~Did your superiors suspect? Did they tell you to
             keep me away, or did they tell you to kill me? Tell me.~
             ^^Cheryl considers replying, but hesitates.";
Cwtalk -> ->               with description
            "You say, ~Never mind, it matters not.~";
Cwtalk -> -> ->            with cbranch c_lono;
Cwwait -> ->               with description
            "^Cheryl says, ~How did you know? Tolan, we can
             stop this. I won't let them kill you. I'll help you escape. I
             have friends...~";
Cwtalk -> -> ->            with description
          "You say, ~Ah, poor Cheryl. Your sympathies are misdirected.
           Your superiors were right. For you it was kill or be
           killed.~";
Cwtalk -> -> -> ->         with cbranch c_lono;

Conv c_lono                has immediate with description
            "You say, ~Well, enough discussion. I find it hard enough to
             control this pathetic human body without forcing myself to
             try to make human speech. Say goodbye, 'Milky Way'.~";
Cwwait  ->                 with description
            "^Cheryl opens her mouth to speak, but she is, for once,
             at a loss for words.";
