Exemplo n.º 1
0
        public override void SetNextEnemy()
        {
            if (enumerator.MoveNext())
            {
                matchup = enumerator.Current;
                Battle.TeamB.Clear();
                var curEnemies = matchup.Enemy;
                if (matchup.Shuffle)
                {
                    curEnemies.Shuffle();
                }
                curEnemies.Reverse();
                curEnemies.ForEach(e =>
                {
                    if (curEnemies.Count(p => p.Name.Equals(e.Name) || p.Name[0..^ 2].Equals(e.Name)) > 1)
                    {
                        e.Name = $"{e.Name} {curEnemies.Count(p => p.Name.Equals(e.Name))}";
                    }
                });
                curEnemies.Reverse();
                curEnemies.ForEach(e => Battle.AddPlayer(e, Team.B));

                if (matchup.HealBefore)
                {
                    Battle.TeamA.ForEach(f =>
                    {
                        f.RemoveAllConditions();
                        f.Heal(1000);
                        f.RestorePP(1000);
                    });
                }

                if (matchup.Keywords.Contains("Cure"))
                {
                    Battle.TeamA.ForEach(f =>
                    {
                        f.RemoveAllConditions();
                    });
                }

                matchup.Keywords
                .Where(s => s.StartsWith("Status"))
                .Select(s => s.Substring(6))
                .Select(s => Enum.Parse <Condition>(s, true)).ToList()
                .ForEach(c => Battle.TeamA.ForEach(p => p.AddCondition(c)));

                EndOfDungeon = false;
            }
            else
            {
                EndOfDungeon = true;
            }
        }
Exemplo n.º 2
0
 public override void SetNextEnemy()
 {
     if (enumerator.MoveNext())
     {
         matchup = enumerator.Current;
         Battle.TeamB.Clear();
         matchup.Enemy.ForEach(e => Battle.AddPlayer((NPCEnemy)e.Clone(), ColossoBattle.Team.B));
         EndOfDungeon = false;
     }
     else
     {
         EndOfDungeon = true;
     }
 }
Exemplo n.º 3
0
        public override async Task Reset()
        {
            enumerator = Dungeon.Matchups.GetEnumerator();
            matchup    = enumerator.Current;
            await base.Reset();

            var e = new EmbedBuilder();

            e.WithThumbnailUrl(Dungeon.Image);
            e.WithDescription(EnemyMessage.Content);
            await EnemyMessage.ModifyAsync(m =>
            {
                m.Content = "";
                m.Embed   = e.Build();
            });
        }