Beispiel #1
0
 public async Task RoundTick()
 {
     foreach (BuffDebuff eff in Effects)
     {
         eff.RoundTick();
         if (eff.DamagePerRound > 0)
         {
             TakeDebuffDamage(eff.DamagePerRound);
             await MessageHandler.SendMessage(CombatHandler.GetInstance(UserHandler.GetUser(Owner).CombatID).Location, $"{Signature} takes {eff.DamagePerRound} {eff.DPRAlternateText}");
         }
     }
     EffectCleanup();
 }
Beispiel #2
0
        public static async Task CheckDuelVictory(CombatInstance inst)
        {
            if (inst.Teams.Count <= 1)
            {
                string mentions = "";
                foreach (UserAccount player in inst.Teams[0].Members)
                {
                    mentions += $"{player.Mention} ";
                }
                await MessageHandler.TeamVictory(inst.Location, mentions, inst.Teams[0].TeamNum);

                await CombatHandler.EndCombat(inst);
            }
        }
Beispiel #3
0
        public static async Task EndCombat(CombatInstance inst)
        {
            _dic.Remove(inst.Players[0].CombatID);
            inst.CombatEnded = true;

            var embeds = OsirisEmbedBuilder.RoundStart(inst);
            await MessageHandler.SendEmbedMessage(inst.Location, "**Combat End**", embeds[0]);

            //for(int i = 1; i < embeds.Count; i++)
            //await MessageHandler.SendEmbedMessage(inst.Location, "", embeds[i]);

            foreach (UserAccount player in inst.Players)
            {
                player.ResetCombatFields(inst.IsDuel);
            }

            UserHandler.SaveUsers();
            CombatHandler.SaveInstances();
        }