Ejemplo n.º 1
0
        protected override void MakeBattleAnnouncement(CreatureAI Enemy)
        {
            Manager.World.MakeAnnouncement(new Gui.Widgets.QueuedAnnouncement
            {
                Text        = String.Format("{0} is fighting {1}.", Stats.FullName, TextGenerator.IndefiniteArticle(Enemy.Stats.CurrentClass.Name)),
                ClickAction = (gui, sender) => ZoomToMe()
            });

            Manager.World.Tutorial("combat");
        }
Ejemplo n.º 2
0
        public void OrderEnemyAttack()
        {
            foreach (CreatureAI enemy in Sensor.Enemies)
            {
                Task task = new KillEntityTask(enemy.Physics, KillEntityTask.KillType.Auto);
                if (!HasTaskWithName(task))
                {
                    Creature.AI.Tasks.Add(task);

                    if (Faction == PlayState.PlayerFaction)
                    {
                        PlayState.AnnouncementManager.Announce(Stats.FullName + Drawer2D.WrapColor(" is fighting ", Color.DarkRed) + TextGenerator.IndefiniteArticle(enemy.Creature.Name),
                            Stats.FullName + " the " + Stats.CurrentLevel.Name + " is fighting " + TextGenerator.IndefiniteArticle(enemy.Stats.CurrentLevel.Name) + " " + enemy.Faction.Race.Name, 
                            ZoomToMe);
                    }
                }
            }
        }