Ejemplo n.º 1
0
        public async Task GetBuff([Remainder] string name)
        {
            Buff find = Buffs.GetSpecificBuff(name);

            if (find == null)
            {
                await Context.Channel.SendMessageAsync($"`No Buff Found`");

                return;
            }
            string text = "";

            text += $"Name : {find.Name}\nCountdown : {find.Countdown}\nDescription : {find.Tech}";
            await Context.Channel.SendMessageAsync($"`{text}`");
        }
Ejemplo n.º 2
0
        public async Task AddingBuffToItem(ulong id, string buffname)
        {
            if (!IsHavingThisRole((SocketGuildUser)Context.User, "Developer") &&
                !IsHavingThisRole((SocketGuildUser)Context.User, "Quiz Manager"))
            {
                return;
            }
            Item select = Drops.GetSpecificItem(id);

            if (select == null)
            {
                return;
            }
            Buff buff = Buffs.GetSpecificBuff(buffname);

            if (buff == null)
            {
                return;
            }
            select.Buffs.Add(buff);
            await Context.Channel.SendMessageAsync("ADDING BUFF SUCCESS");
        }
Ejemplo n.º 3
0
        public static async void DecreasingHealth(UserAccount user, int ammount)
        {
            if (Inventories.CheckHaveThisItem(user, "Chainmail") && user.HP - ammount <= 0)
            {
                if (CheckHaveThisBuff(user, "Reversality"))
                {
                    ItemTech.haveReversal = true;
                    IncreasingHealth(user, ammount);
                    user.Buffs.Remove(Buffs.GetSpecificBuff("Reversality"));
                    await GlobalVar.ChannelSelect.SendMessageAsync($"{user.Name} REVERSALITY BUFF HAS BEEN REMOVED");

                    return;
                }
                user.HP = 1;
                Item       getto    = Drops.GetSpecificItem("Chainmail");
                SocketUser realuser = GlobalVar.GuildSelect.GetUser(user.ID);
                await Inventories.DropAnyItem(realuser, getto);
            }
            else if (Inventories.CheckHaveThisItem(user, "Bulletproof Vest"))
            {
                Console.WriteLine("masuk");
                ammount = (ammount / 2) + 1;
                ItemTech.damageOutcoume = ammount;
                bool temp = false;
                if (CheckHaveThisBuff(user, "Reversality"))
                {
                    ItemTech.haveReversal = true;
                    IncreasingHealth(user, ammount);
                    user.Buffs.Remove(Buffs.GetSpecificBuff("Reversality"));
                    await GlobalVar.ChannelSelect.SendMessageAsync($"{user.Name} REVERSALITY BUFF HAS BEEN REMOVED");

                    temp = !temp;
                }
                Item       getto    = Drops.GetSpecificItem("Bulletproof Vest");
                SocketUser realuser = GlobalVar.GuildSelect.GetUser(user.ID);
                await Inventories.DropAnyItem(realuser, getto);

                if (temp)
                {
                    return;
                }
                user.HP -= ammount;
            }
            else
            {
                if (CheckHaveThisBuff(user, "Reversality"))
                {
                    ItemTech.haveReversal = true;
                    IncreasingHealth(user, ammount);
                    user.Buffs.Remove(Buffs.GetSpecificBuff("Reversality"));
                    await GlobalVar.ChannelSelect.SendMessageAsync($"{user.Name} REVERSALITY BUFF HAS BEEN REMOVED");

                    return;
                }
                user.HP -= ammount;
            }
            if (user.HP < 0)
            {
                user.HP = 0;
            }
            SaveAccount();
        }