示例#1
0
        public static IEnumerator <ulong> CourtYard()
        {
            TownScreen.Instance.PlayerMoveEnabled = false;
            MessageScreen.Show("Engineer: Attack me one more time or these students die.");
            while (game.InputHandler.Focused is DialogScreen)
            {
                yield return(5);
            }
            MessageScreen.Show("Andres: Let them go!");
            while (game.InputHandler.Focused is DialogScreen)
            {
                yield return(5);
            }
            MessageScreen.Show("Engineer: Why should I? So you Traditionalist scums can brainwash these students? \nUnder no circumstances will I give them back to you. \nCome join us; you two look like you have potential.");
            while (game.InputHandler.Focused is DialogScreen)
            {
                yield return(5);
            }

            MessageScreen.Show("Schneider: It's gonna be fine. I chose to be captured. \nI will not waste one more day with people who do not want change.");
            while (game.InputHandler.Focused is DialogScreen)
            {
                yield return(5);
            }
            MessageScreen.Show("Andres: I want no part in this war. Come with me.");
            while (game.InputHandler.Focused is DialogScreen)
            {
                yield return(5);
            }
            TownScreen.Instance.PlayerMoveEnabled = true;
            yield break;
        }
示例#2
0
 public override IEnumerator <ulong> EntrySequence()
 {
     MessageScreen.Show("Setup Phase");
     while (Game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
 }
示例#3
0
        public IEnumerator <ulong> Escaped()
        {
            switch (State)
            {
            case BattleState.CHARACTER_SELECT:
                State = BattleState.NOTIF;
                yield break;

            case BattleState.CHARACTER_MOVE:
                positions[selectedCharacter] = new Point(selectedCharacterX, selectedCharacterY);
                for (int row = 0; row < tileEngine.MapGraphics.GetLength(0); row++)
                {
                    for (int col = 0; col < tileEngine.MapGraphics.GetLength(1); col++)
                    {
                        tileEngine.MapGraphics[row, col].Color = Color.White;
                    }
                }
                selectedValidMoves.Clear();
                colorChanged = false;
                State        = BattleState.CHARACTER_SELECT;
                MessageScreen.Show("Select a character to move. Press the Escape Key to cancel.");
                waiting = true;
                while (Game.InputHandler.Focused is DialogScreen)
                {
                    yield return(5);
                }
                waiting = false;
                yield break;

            case BattleState.CHARACTER_ATTACK:
                for (int row = 0; row < tileEngine.MapGraphics.GetLength(0); row++)
                {
                    for (int col = 0; col < tileEngine.MapGraphics.GetLength(1); col++)
                    {
                        tileEngine.MapGraphics[row, col].Color = Color.White;
                    }
                }
                selectedValidMoves.Clear();
                selectedAOE.Clear();
                colorChanged = false;
                State        = BattleState.CHARACTER_SELECT;
                MessageScreen.Show("Select a character to move. Press the Escape Key to cancel.");
                waiting = true;
                while (Game.InputHandler.Focused is DialogScreen)
                {
                    yield return(5);
                }
                waiting = false;
                yield break;

            default:
                Game.ScriptEngine.ExecuteScript(ExitSequence);
                yield break;
            }
        }
示例#4
0
 public static IEnumerator <ulong> FoundAndres()
 {
     TownScreen.Instance.PlayerMoveEnabled = false;
     MessageScreen.Show("Andres:		Finally found you. Have you seen Schneider? Last time I saw him was at the school cafe when the three of us were talking. I just saw a number of students captured by a few Futurists, I hope he’s not among them. Let’s go find out. I assume you can fight?");
     while (game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     TownScreen.Instance.PlayerMoveEnabled = true;
     yield break;
 }
示例#5
0
 public static IEnumerator <ulong> PASystem()
 {
     TownScreen.Instance.PlayerMoveEnabled = false;
     MessageScreen.Show("ATTENTION EVERYONE! THIS IS NOT A DRILL. USE THE EMERGENCY EXITS TO ESCAPE THE BUILDING! AGAIN, THIS IS NOT A DRILL.");
     while (game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     TownScreen.Instance.PlayerMoveEnabled = true;
     yield break;
 }
示例#6
0
 public static IEnumerator <ulong> AndresMail()
 {
     TownScreen.Instance.PlayerMoveEnabled = false;
     MessageScreen.Show("Andres: Hey lazy bones! Get up and get your arse up here to school cafe! We need to talk. It’s about this crazy guy who says he’s from the future and he goes “down with technology” and what-not and wants to protect our environment. This I gotta see. And so should you. I’ll tell Schneider.");
     while (game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     TownScreen.Instance.PlayerMoveEnabled = true;
     yield break;
 }
示例#7
0
 public static IEnumerator <ulong> SchneiderMail()
 {
     TownScreen.Instance.PlayerMoveEnabled = false;
     MessageScreen.Show("Schneider: Hey, have you heard? There’s a man to the West claiming to have come from the future. He’s telling everyone about technological acceleration and stuff. Freaking insane right? We’ve got to see this! Let’s meet later at the Academe (school) cafe. I’ll tell Andres.");
     while (game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     TownScreen.Instance.PlayerMoveEnabled = true;
     yield break;
 }
示例#8
0
 public IEnumerator <ulong> Fight()
 {
     MessageScreen.Show("Select a character to move. Press the Escape Key to cancel.");
     waiting = true;
     while (Game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     waiting = false;
     State   = BattleState.CHARACTER_SELECT;
     yield break;
 }
示例#9
0
 public static IEnumerator <ulong> FriendlyConversation()
 {
     TownScreen.Instance.PlayerMoveEnabled = false;
     MessageScreen.Show("Schneider:	But you know, if those rumors are real and the guy’s not a total lunatic, we’d have awesome gadgets and stuff. Imagine how much the poor would be helped if we had the right tools to do so.");
     while (game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     MessageScreen.Show("Andres:	Now wait just a darn minute! You know how it is with all those inventions. If they’re not carefully made, everyone breathes the poison produced along with them. Leave alone the fact that my race is slowly losing its once beautiful ability to dance with nature because of the crappy waste your modernization has brought. This environmental mental guy, on the other hand, even if he’s crazy, he makes a good point.");
     while (game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     MessageScreen.Show("Schneider:	I don’t know about you, but I think preserving those elitist arts is a lost cause. Don’t you desire change, justice, equality?");
     while (game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     MessageScreen.Show("Andres:		Not if it means we all die of cancer. Yeah, there you go. Death for all. Equality for all. Schneider, you’re too much of an idealist, but have too much pollution covering your eyes from reality.");
     while (game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     MessageScreen.Show("Schneider:	Hey hey now! No need to attack my person ‘cause you can’t hold your emotions. We’re all rational thinkers here. Or are we?");
     while (game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     MessageScreen.Show("Andres:		Mark my words Schneider. One of these days, the treacherousness of technology will be revealed, and we will have nothing to rely on but what our ancestors have developed over millennia.");
     while (game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     MessageScreen.Show("Schneider:	Well, we’ll just have to see about that. I want to hear what this Industrial Revolutionist has to say. You guys better go with me. I will be at Gadgets class if you need me.");
     while (game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     MessageScreen.Show("Andres:		No, you BETTER go with me! The entire world is worth more than all mankind. I will be at Will Defense class.");
     while (game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     TownScreen.Instance.PlayerMoveEnabled = true;
     yield break;
 }
示例#10
0
        public static IEnumerator <ulong> PubShootOut()
        {
            TownScreen.Instance.PlayerMoveEnabled = false;
            MessageScreen.Show("Schneider: 	You guys wait for me outside, I’m gonna go alone.");
            while (game.InputHandler.Focused is DialogScreen)
            {
                yield return(5);
            }
            MessageScreen.Show("Gunner: 	Roger that.");
            while (game.InputHandler.Focused is DialogScreen)
            {
                yield return(5);
            }
            MessageScreen.Show("Schneider: 	Black Sage! I waited fifteen years for this day of retribution. My parents were massacred by you! I suffered long enough!");
            while (game.InputHandler.Focused is DialogScreen)
            {
                yield return(5);
            }
            MessageScreen.Show("Black Sage: 	Oh, but did I really massacre them? Or did they allow themselves to be massacred? Maybe they just couldn’t swallow the possibility of all being one again and thus succumbed to the weakness of only half of One. I hope you do not follow their folly.");
            while (game.InputHandler.Focused is DialogScreen)
            {
                yield return(5);
            }
            MessageScreen.Show("Schneider: 	SHUT UP!!");
            while (game.InputHandler.Focused is DialogScreen)
            {
                yield return(5);
            }
            MessageScreen.Show("Black Sage: 	What’s the matter young boy? Analysis paralysis? Most people act without thinking, but I see you think very well but cannot act. Even you need a drug to strengthen your will, or you cannot live happily on this planet. I’ve desired nothing but the happiness of all. Pray tell me where I’ve erred.");
            while (game.InputHandler.Focused is DialogScreen)
            {
                yield return(5);
            }
            MessageScreen.Show("Andres: 	I naively thought that I could live in a world at war and make myself not a part of it. Schneider, I am going to destroy you and your stupid ambition.");
            while (game.InputHandler.Focused is DialogScreen)
            {
                yield return(5);
            }

            TownScreen.Instance.PlayerMoveEnabled = true;
            yield break;
        }
示例#11
0
 public static IEnumerator <ulong> FightOrFlee()
 {
     TownScreen.Instance.PlayerMoveEnabled = false;
     ChoiceScreen.Show("Would you rather fight or flee?",
                       new Choice("Fight",
                                  delegate
     {
         MessageScreen.Show("Careful, don't forget about your team");
         return(null);
     }),
                       new Choice("Flee",
                                  delegate
     {
         MessageScreen.Show("You can't always run...");
         return(null);
     })
                       );
     while (game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     TownScreen.Instance.PlayerMoveEnabled = true;
     yield break;
 }
示例#12
0
 public static IEnumerator <ulong> AboutTheWar()
 {
     TownScreen.Instance.PlayerMoveEnabled = false;
     ChoiceScreen.Show("Would you like to know more about the war?",
                       new Choice("Yes",
                                  delegate
     {
         MessageScreen.Show("This war is rooted in the differences of Traditionalists and Futurists.");
         return(null);
     }),
                       new Choice("No",
                                  delegate
     {
         MessageScreen.Show("You don't really care do you?");
         return(null);
     })
                       );
     while (game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     TownScreen.Instance.PlayerMoveEnabled = true;
     yield break;
 }
示例#13
0
 public static IEnumerator <ulong> ChooseYourFate()
 {
     TownScreen.Instance.PlayerMoveEnabled = false;
     ChoiceScreen.Show("Choose your fate.",
                       new Choice("Traditionalist",
                                  delegate
     {
         MessageScreen.Show("Your backwardness is preventing equality for all.");
         return(null);
     }),
                       new Choice("Futurist",
                                  delegate
     {
         MessageScreen.Show("Your technology is destroying the earth.");
         return(null);
     })
                       );
     while (game.InputHandler.Focused is DialogScreen)
     {
         yield return(5);
     }
     TownScreen.Instance.PlayerMoveEnabled = true;
     yield break;
 }
示例#14
0
        public IEnumerator <ulong> Pressed()
        {
            switch (State)
            {
            case BattleState.SETUP:
                if (cursorX < ALLOWED_INITIAL_REGION && !positions.Values.Contains <Point>(new Point(cursorX, cursorY)) && tileEngine.MapPassability[cursorY, cursorX])
                {
                    positions[Player.Party[setupIndex]] = new Point(cursorX, cursorY);
                    setupIndex++;
                    State = BattleState.NOTIF;
                }
                else
                {
                    MessageScreen.Show("You can't use that position.");
                    while (Game.InputHandler.Focused is DialogScreen)
                    {
                        yield return(5);
                    }
                }
                break;

            case BattleState.CHARACTER_SELECT:
                foreach (Character c in Player.Party)
                {
                    if (positions[c].X == cursorX && positions[c].Y == cursorY)
                    {
                        if (c.CurrMovementPoints <= 0)
                        {
                            MessageScreen.Show(c.Name + " has no movement points left and can't do anymore actions.");
                        }
                        else
                        {
                            ChoiceScreen.Show("What will " + c.Name + " do with his remaining " + c.CurrMovementPoints + " movement points?",
                                              new Choice("Attack",
                                                         delegate
                            {
                                selectedCharacterX = cursorX;
                                selectedCharacterY = cursorY;
                                Choice[] attacks   = new Choice[c.KnownAttacks.Count + 1];
                                for (int i = 0; i < c.KnownAttacks.Count; i++)
                                {
                                    Attack curr = c.KnownAttacks[i];
                                    attacks[i]  = new Choice(curr.Name,
                                                             delegate
                                    {
                                        if (c.CurrMovementPoints < curr.MovementCost)
                                        {
                                            MessageScreen.Show(c.Name + " does not have enough movement points for that.");
                                        }
                                        else
                                        {
                                            SelectAttack(c, curr);
                                            MessageScreen.Show("Choose a position to attack. Press the Escape Key to cancel.");
                                            State = BattleState.CHARACTER_ATTACK;
                                        }
                                        return(null);
                                    });
                                }
                                attacks[attacks.Length - 1] = new Choice("Nevermind", MiScreen.DoNothing);
                                ChoiceScreen.Show("Which Attack?", attacks);
                                return(null);
                            }),
                                              new Choice("Move",
                                                         delegate
                            {
                                SelectMove(c);
                                MessageScreen.Show("Choose where to move. Press the Escape Key to cancel.");
                                State = BattleState.CHARACTER_MOVE;
                                return(null);
                            }),
                                              new Choice("Nevermind", MiScreen.DoNothing)
                                              );
                        }
                        break;
                    }
                }
                break;

            case BattleState.CHARACTER_MOVE:
                if (Move(cursorX, cursorY))
                {
                    State = BattleState.NOTIF;
                }
                else
                {
                    MessageScreen.Show("You can't choose that position");
                    while (Game.InputHandler.Focused is DialogScreen)
                    {
                        yield return(5);
                    }
                }
                break;

            case BattleState.CHARACTER_ATTACK:
                if (Attack(cursorX, cursorY))
                {
                    colorChanged = true;
                    State        = BattleState.NOTIF;
                }
                else
                {
                    MessageScreen.Show("Target out of range.");
                    while (Game.InputHandler.Focused is DialogScreen)
                    {
                        yield return(5);
                    }
                }
                break;
            }
            yield break;
        }
示例#15
0
        public override void Update(GameTime gameTime)
        {
            flash.Update(gameTime);
            if (Game.InputHandler.Focused is DialogScreen)
            {
                return;
            }

            if (Player.Party.Count == 0)
            {
                ChoiceScreen.Show("You died!", new Choice("Yeah Whatever...", Escaped));
                return;
            }

            if (enemies.Count == 0)
            {
                ChoiceScreen.Show("You won!", new Choice("Yeah Whatever...", Escaped));
                return;
            }

            if (!waiting)
            {
                switch (State)
                {
                case BattleState.NOTIF:
                    if (setupIndex < Player.Party.Count)
                    {
                        MessageScreen.Show("Select Location for " + Player.Party[setupIndex].Name);
                        for (int row = 0; row < tileEngine.MapGraphics.GetLength(0); row++)
                        {
                            for (int col = 0; col < ALLOWED_INITIAL_REGION; col++)
                            {
                                tileEngine.MapGraphics[row, col].Color = Color.Yellow;
                            }
                        }
                        colorChanged = true;
                        State        = BattleState.SETUP;
                    }
                    else
                    {
                        if (colorChanged)
                        {
                            for (int row = 0; row < tileEngine.MapGraphics.GetLength(0); row++)
                            {
                                for (int col = 0; col < tileEngine.MapGraphics.GetLength(1); col++)
                                {
                                    tileEngine.MapGraphics[row, col].Color = Color.White;
                                }
                            }
                            colorChanged = false;
                        }
                        ChoiceScreen.Show("What to do?",
                                          new Choice("Fight", Fight),
                                          new Choice("End Turn",
                                                     delegate
                        {
                            foreach (Character c in Player.Party)
                            {
                                c.CurrMovementPoints = c.MaxMovementPoints;
                            }
                            State = BattleState.ENEMY_TURN;
                            return(null);
                        }),
                                          new Choice("Run", ExitSequence));
                    }
                    break;
                }
            }

            cursor.Update(gameTime);
        }
示例#16
0
        public static IEnumerator <ulong> Tutorial()
        {
            if (runStartScreenTutorial)
            {
                game.InputHandler.Enabled = false;
                yield return(100);

                game.InputHandler.Enabled = true;
                MessageScreen.Show("Press the Space Bar to acknowledge messages.");
                while (game.InputHandler.Focused is DialogScreen)
                {
                    yield return(5);
                }
                MessageScreen.Show("Press the Up or Down arrow keys to move the cursor.");
                while (game.InputHandler.Focused is DialogScreen)
                {
                    yield return(5);
                }
                MessageScreen.Show("Press the Space Bar to select.");
                while (game.InputHandler.Focused is DialogScreen)
                {
                    yield return(5);
                }
                runStartScreenTutorial = false;
            }
            if (runWorldScreenTutorial)
            {
                // Wait for first time player encounters world screen
                while (!(game.InputHandler.Focused is WorldScreen))
                {
                    yield return(5);
                }

                MessageScreen.Show("Locations with green markers are controlled by your faction.");
                while (game.InputHandler.Focused is DialogScreen)
                {
                    yield return(5);
                }
                MessageScreen.Show("Locations with red markers are controlled by the enemy faction.");
                while (game.InputHandler.Focused is DialogScreen)
                {
                    yield return(5);
                }
                MessageScreen.Show("Locations with gray markers are not controlled by either faction.");
                while (game.InputHandler.Focused is DialogScreen)
                {
                    yield return(5);
                }
                MessageScreen.Show("Press the arrow keys to move the cursor.");
                while (game.InputHandler.Focused is DialogScreen)
                {
                    yield return(5);
                }
                MessageScreen.Show("Press the Space Bar to enter the selected area.");
                while (game.InputHandler.Focused is DialogScreen)
                {
                    yield return(5);
                }

                runWorldScreenTutorial = false;
            }

            // Add the "self" to party
            Character self = new Character("JONG", 5, 5, 5, 5, 5);

            self.KnownAttacks.Add(Attack.nuke);
            self.KnownAttacks.Add(Attack.healNuke);
            self.KnownAttacks.Add(Attack.kamikaze);

            Player.Party.Add(self);

            Character me = new Character("fords", 5, 5, 5, 5, 5);

            me.KnownAttacks.Add(Attack.michizure);
            me.KnownAttacks.Add(Attack.knife);
            Player.Party.Add(me);

            if (runTownScreenTutorial)
            {
                // Wait for first time player encounters town screen
                while (!(game.InputHandler.Focused is TownScreen))
                {
                    yield return(5);
                }
                MessageScreen.Show("Press the arrow keys to move.");
                while (game.InputHandler.Focused is DialogScreen)
                {
                    yield return(5);
                }
                MessageScreen.Show("Press the Space Bar to talk to people.");
                while (game.InputHandler.Focused is DialogScreen)
                {
                    yield return(5);
                }
                runTownScreenTutorial = false;
            }

            yield break;
        }