Ejemplo n.º 1
0
        public async Task PreachUser(SocketGuildUser user = null)
        {
            var    authorUser = Context.User;
            string result     = "Not a Pastor. Use !help noob.";

            UserData authorData = JudgementService._activeUserList.Single(item => item.Id == authorUser.Id);

            if (user == null)
            {
                UserData[] userList = JudgementService._activeUserList.ToArray();
                //make sure author is angle or above
                if (authorData.Level >= 2)
                {
                    if (ThrowDice(2))
                    {
                        authorData.AddXP(25);
                        foreach (UserData d in userList)
                        {
                            d.AddXP((int)Math.Abs(d.Level * 0.2f) + 55);
                        }
                        result = "With authority you preach to EVERYBODY in discord. They gain 25XP!\n" + authorData.Username + " lost 100XP!";
                    }
                    else
                    {
                        authorData.LoseXP(300);
                        result = "You failed your god and said blasphemy, " + authorData.Username + "! Wrecked for 300XP!";
                    }
                }
                await ReplyAsync(result);

                return;
            }

            UserData userData = JudgementService._activeUserList.Single(item => item.Id == user.Id);

            //make sure author is angle or above
            if (authorData.Level >= 2)
            {
                if (ThrowDice(2))
                {
                    authorData.AddXP(100);
                    userData.AddXP((int)Math.Abs(userData.Level * 0.2f) + 55);

                    result = "With authority you preach to " + userData.Username +
                             " and they gain " + ((int)Math.Abs(userData.Level * 0.2f) + 55) +
                             "XP!\n Their XP is now " + userData.Xp + ".\n" + authorData.Username + " lost 100XP!";
                }
                else
                {
                    authorData.LoseXP(300);
                    result = "You failed your god and said blasphemy, " + authorData.Username + "! Wrecked for 300XP!";
                }
            }
            //Reply in chat
            await ReplyAsync(result);
        }
Ejemplo n.º 2
0
        public async Task HealUser(SocketGuildUser user = null)
        {
            var    authorUser = Context.User;
            string result     = "Not an Angel. Use !help noob.";

            if (user == null)
            {
                await ReplyAsync("Nobody to heal.");

                return;
            }

            UserData userData   = JudgementService._activeUserList.Single(item => item.Id == user.Id);
            UserData authorData = JudgementService._activeUserList.Single(item => item.Id == authorUser.Id);

            //make sure author is angle or above
            if (authorData.Level >= 1337)
            {
                if (ThrowDice(2))
                {
                    authorData.LoseXP(50);
                    userData.AddXP((int)Math.Abs(userData.Level * 0.2f) + 145);

                    result = "Healed " + userData.Username +
                             " for" + ((int)Math.Abs(userData.Level * 0.2f) + 145) +
                             "XP!\n Their XP is now " + userData.Xp + ".\n" + authorData.Username + " sacrificed 50XP!";
                }
                else
                {
                    authorData.LoseXP(150);
                    userData.LoseXP((int)Math.Abs(userData.Level * 0.2f) + 145);

                    result = "The gods are not on your side. The powerful healing burnt " + userData.Username +
                             " for " + ((int)Math.Abs(userData.Level * 0.2f) + 145) +
                             "XP!\n Their XP is now " + userData.Xp + ".\n" + authorData.Username + " is drained of 150XP!";
                }
            }
            //Reply in chat
            await ReplyAsync(result);
        }
Ejemplo n.º 3
0
        public async Task SpreadLiesUser(SocketGuildUser user = null)
        {
            var    authorUser = Context.User;
            string result     = "Not Saved. Use !help noob.";

            if (user == null)
            {
                await ReplyAsync("Nobody to spread lies about.");

                return;
            }

            UserData userData   = JudgementService._activeUserList.Single(item => item.Id == user.Id);
            UserData authorData = JudgementService._activeUserList.Single(item => item.Id == authorUser.Id);

            //make sure author is angle or above
            if (authorData.Level >= 1)
            {
                if (ThrowDice(2))
                {
                    authorData.LoseXP(50);
                    userData.AddXP((int)Math.Abs(userData.Level * 0.2f) + 25);

                    result = "Vicious rumours destroyed " + userData.Username +
                             " reputation for " + ((int)Math.Abs(userData.Level * 0.2f) + 25) +
                             "XP!\n Their XP is now " + userData.Xp + ".\n" + authorData.Username + " lost 50XP!";
                }
                else
                {
                    authorData.LoseXP(300);
                    result = "Everyone knows you make shit up, " + authorData.Username + ". Lose 300XP liar.";
                }
            }
            //Reply in chat
            await ReplyAsync(result);
        }
Ejemplo n.º 4
0
        public async Task SacrificeUser(SocketGuildUser user = null)
        {
            var    authorUser = Context.User;
            string result     = "Not an ArchAngel. Use !help noob.";

            if (user == null)
            {
                await ReplyAsync("Nobody to heal.");

                return;
            }

            UserData userData   = JudgementService._activeUserList.Single(item => item.Id == user.Id);
            UserData authorData = JudgementService._activeUserList.Single(item => item.Id == authorUser.Id);

            //make sure author is angle or above
            if (authorData.Level >= 9000)
            {
                if (ThrowDice(2))
                {
                    authorData.LoseXP(50);
                    userData.AddXP((int)Math.Abs(userData.Level * 0.2f) + 125);

                    result = "Sacrificed self to heal " + userData.Username +
                             " for" + ((int)Math.Abs(userData.Level * 0.2f) + 125) +
                             "XP!\n Their XP is now " + userData.Xp + ".\n" + authorData.Username + " lost 50XP!";
                }
                else
                {
                    authorData.LoseXP(150);
                    result = "How sweet of you to sacrifice yourself to your lord, " + authorData.Username + ". Wrecked for 150XP!";
                }
            }
            //Reply in chat
            await ReplyAsync(result);
        }
Ejemplo n.º 5
0
        public async Task ForgiveUser(SocketGuildUser user = null)
        {
            var    authorUser = Context.User;
            string result     = "Not a Priest. Use !help noob.";

            if (user == null)
            {
                await ReplyAsync("Nobody to forgive.");

                return;
            }

            UserData userData   = JudgementService._activeUserList.Single(item => item.Id == user.Id);
            UserData authorData = JudgementService._activeUserList.Single(item => item.Id == authorUser.Id);

            //make sure author is angle or above
            if (authorData.Level >= 3)
            {
                if (ThrowDice(2))
                {
                    authorData.AddXP(100);
                    userData.AddXP((int)Math.Abs(userData.Level * 0.2f) + 125);

                    result = "You've forgiven " + userData.Username +
                             " for " + ((int)Math.Abs(userData.Level * 0.2f) + 125) +
                             "XP!\n Their XP is now " + userData.Xp + ".\n" + authorData.Username + " lost 100XP!";
                }
                else
                {
                    authorData.LoseXP(300);
                    result = "Forgive you, I shall not, " + authorData.Username + ". Wrecked for 300XP!";
                }
            }
            //Reply in chat
            await ReplyAsync(result);
        }
Ejemplo n.º 6
0
        //ToDo: filter based on positive words/negative words add them together and combine the score
        private async Task ScoreHandler(SocketGuildUser user, UserData userdata, SocketUserMessage msg)
        {
            //-1
            if (msg.Content.Contains("warrior") || msg.Content.Contains("f*g") || msg.Content.Contains("gay") || msg.Content.Contains("bitch") || msg.Content.Contains("omg") || msg.Content.Contains("omfg") || msg.Content.Contains("fk") || msg.Content.Contains("shit"))
            {
                userdata.LoseXP(22);
            }
            //-5
            if (msg.Content.Contains("gay") || msg.Content.Contains("autism") || msg.Content.Contains("autistic") || msg.Content.Contains("retard") || msg.Content.Contains("retarded") || msg.Content.Contains("dick"))
            {
                userdata.LoseXP(28);
            }
            //-50
            if (msg.Content.Contains("goddammit") || msg.Content.Contains("god damn") || msg.Content.Contains("god dam") || msg.Content.Contains("goddam") || msg.Content.Contains("goddamn"))
            {
                userdata.LoseXP(22);
            }
            if (msg.Content.Contains("Warrior") || msg.Content.Contains("F*g") || msg.Content.Contains("Gay") || msg.Content.Contains("Bitch") || msg.Content.Contains("Omg") || msg.Content.Contains("F**k") || msg.Content.Contains("f**k") || msg.Content.Contains("shit") || msg.Content.Contains("ass"))
            {
                userdata.LoseXP(22);
            }

            //5
            if (msg.Content.Contains("boi") || msg.Content.Contains("like") || msg.Content.Contains("wanna") || msg.Content.Contains("ty") || msg.Content.Contains("boi") || msg.Content.Contains("no u") || msg.Content.Contains("aliens") || msg.Content.Contains("alien") || msg.Content.Contains("wifi") || msg.Content.Contains("space") || msg.Content.Contains("elon") || msg.Content.Contains("rocket") || msg.Content.Contains("good") || msg.Content.Contains("thankfully") || msg.Content.Contains("beautifully") || msg.Content.Contains("beautiful") || msg.Content.Contains("cute") || msg.Content.Contains("trap") || msg.Content.Contains("christian") || msg.Content.Contains("amen") || msg.Content.Contains("holy"))
            {
                if (userdata.Username == "ornox")
                {
                    userdata.AddXP(5);
                }
                else
                {
                    userdata.AddXP(24);
                }
            }
            //10
            if (msg.Content.Contains("appreciate") || msg.Content.Contains("thanks") || msg.Content.Contains("thank you") || msg.Content.Contains("thank u"))
            {
                if (userdata.Username == "ornox")
                {
                    userdata.AddXP(5);
                }
                else
                {
                    userdata.AddXP(32);
                }
            }
            //20
            if (msg.Content.Contains("of course") || msg.Content.Contains("praise the sun") || msg.Content.Contains("Praise the sun"))
            {
                if (userdata.Username == "ornox")
                {
                    userdata.AddXP(5);
                }
                else
                {
                    userdata.AddXP(53);
                }
            }

            //Level Update
            if (userdata.Xp > -4000 && userdata.Xp <= -3000)
            {
                userdata.Level = -666;
                userdata.Role  = JUDGEMENT_ROLES[0];
                await UpdateRoles(msg, user, 0);
            }
            else if (userdata.Xp > -3000 && userdata.Xp <= -2000)
            {
                userdata.Level = -66;
                userdata.Role  = JUDGEMENT_ROLES[1];
                await UpdateRoles(msg, user, 1);
            }
            else if (userdata.Xp > -2000 && userdata.Xp <= -1000)
            {
                userdata.Level = -6;
                userdata.Role  = JUDGEMENT_ROLES[2];
                await UpdateRoles(msg, user, 2);
            }
            else if (userdata.Xp > -1000 && userdata.Xp <= -500)
            {
                userdata.Level = -1;
                userdata.Role  = JUDGEMENT_ROLES[3];
                await UpdateRoles(msg, user, 3);
            }
            else if (userdata.Xp > -500 && userdata.Xp < 50) //repented
            {
                userdata.Level = 0;
                userdata.Role  = JUDGEMENT_ROLES[4];
                await UpdateRoles(msg, user, 4);
            }
            else if (userdata.Xp >= 50 && userdata.Xp <= 300) //saved
            {
                userdata.Level = 1;
                userdata.Role  = JUDGEMENT_ROLES[5];

                await UpdateRoles(msg, user, 5);
            }
            else if (userdata.Xp > 300 && userdata.Xp <= 500) //pastor
            {
                userdata.Level = 2;
                userdata.Role  = JUDGEMENT_ROLES[6];

                await UpdateRoles(msg, user, 6);
            }
            else if (userdata.Xp > 500 && userdata.Xp <= 1000) //priest
            {
                userdata.Level = 3;
                userdata.Role  = JUDGEMENT_ROLES[7];
                await UpdateRoles(msg, user, 7);
            }
            else if (userdata.Xp > 1000 && userdata.Xp <= 2000) //high priest
            {
                userdata.Level = 4;
                userdata.Role  = JUDGEMENT_ROLES[8];
                await UpdateRoles(msg, user, 8);
            }
            else if (userdata.Xp > 2000 && userdata.Xp <= 3000) //angle
            {
                userdata.Level = 1337;
                userdata.Role  = JUDGEMENT_ROLES[9];
                await UpdateRoles(msg, user, 9);
            }
            else if (userdata.Xp > 3000 && userdata.Xp <= 4000) //archangle
            {
                userdata.Level = 9001;
                userdata.Role  = JUDGEMENT_ROLES[10];
                await UpdateRoles(msg, user, 10);
            }
            else if (userdata.Xp > 4000 && userdata.Xp <= 5000) //demigod
            {
                userdata.Level = int.MaxValue;
                userdata.Role  = JUDGEMENT_ROLES[11];
                await UpdateRoles(msg, user, 11);
            }
        }