示例#1
0
 public static void ConfirmDeclareWar(DialogueContext Context)
 {
     Context.ClearOptions();
     Context.Say("You really want to declare war on us?");
     Context.AddOption("Yes!", DeclareWar);
     Context.AddOption("No.", ConversationRoot);
 }
示例#2
0
        public static void DeclareWar(DialogueContext Context)
        {
            Context.Envoy.OwnerFaction.Race.Speech.Language.SayBoo();
            if (!Context.Politics.HasEvent("you declared war on us"))
            {
                Context.Politics.RecentEvents.Add(new Diplomacy.PoliticalEvent()
                {
                    Change      = -2.0f,
                    Description = "you declared war on us",
                    Duration    = new TimeSpan(4, 0, 0, 0),
                    Time        = Context.World.Time.CurrentDate
                });
                Context.Politics.WasAtWar = true;
            }

            Context.Say(Datastructures.SelectRandom(Context.Envoy.OwnerFaction.Race.Speech.WarDeclarations));
            Context.ClearOptions();

            Context.AddOption("Goodbye.", (context) =>
            {
                Diplomacy.RecallEnvoy(context.Envoy);
                GameState.Game.StateManager.PopState();
            });

            Context.World.GoalManager.OnGameEvent(new Goals.Events.DeclareWar
            {
                PlayerFaction = Context.PlayerFaction,
                OtherFaction  = Context.Envoy.OwnerFaction
            });
        }
示例#3
0
 public static void ConversationRoot(DialogueContext Context)
 {
     Context.Say(String.Format("{0} I am {1} of {2}.",
                               Datastructures.SelectRandom(Context.Envoy.OwnerFaction.Race.Speech.Greetings),
                               Context.EnvoyName,
                               Context.Envoy.OwnerFaction.Name));
     Context.ClearOptions();
     Context.AddOption("Trade", Trade);
     Context.AddOption("Leave", (context) =>
     {
         Diplomacy.RecallEnvoy(context.Envoy);
         Context.Say(Datastructures.SelectRandom(context.Envoy.OwnerFaction.Race.Speech.Farewells));
         Context.ClearOptions();
         Context.AddOption("Goodbye.", (_) =>
         {
             GameState.Game.StateManager.PopState();
         });
     });
 }