diff --git a/NadekoBot/Classes/DBHandler.cs b/NadekoBot/Classes/DBHandler.cs index f003b94b..fd54899f 100644 --- a/NadekoBot/Classes/DBHandler.cs +++ b/NadekoBot/Classes/DBHandler.cs @@ -22,6 +22,8 @@ namespace NadekoBot.Classes { conn.CreateTable(); conn.CreateTable(); conn.CreateTable(); + conn.CreateTable(); + conn.CreateTable(); conn.CreateTable(); conn.Execute(Queries.TransactionTriggerQuery); } diff --git a/NadekoBot/Classes/JSONModels/Configuration.cs b/NadekoBot/Classes/JSONModels/Configuration.cs index 296568b3..a528cc37 100644 --- a/NadekoBot/Classes/JSONModels/Configuration.cs +++ b/NadekoBot/Classes/JSONModels/Configuration.cs @@ -94,6 +94,7 @@ namespace NadekoBot.Classes.JSONModels public string Gambling { get; set; } = "$"; public string Permissions { get; set; } = ";"; public string Programming { get; set; } = "%"; + public string Pokemon { get; set; } = "poke"; } public static class ConfigHandler diff --git a/NadekoBot/Classes/_DataModels/PokeTypes.cs b/NadekoBot/Classes/_DataModels/PokeTypes.cs new file mode 100644 index 00000000..3661540a --- /dev/null +++ b/NadekoBot/Classes/_DataModels/PokeTypes.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NadekoBot.Classes._DataModels +{ + class userPokeTypes : IDataModel + { + public long UserId { get; set; } + public int type { get; set; } + } +} diff --git a/NadekoBot/Classes/_DataModels/pokemoves.cs b/NadekoBot/Classes/_DataModels/pokemoves.cs new file mode 100644 index 00000000..bacbed68 --- /dev/null +++ b/NadekoBot/Classes/_DataModels/pokemoves.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NadekoBot.Classes._DataModels +{ + class PokeMoves : IDataModel + { + public string move { get; set; } + public int type { get; set; } + public long UserId { get; internal set; } + } +} diff --git a/NadekoBot/Modules/Games.cs b/NadekoBot/Modules/Games.cs index 32b6b4fd..9321859a 100644 --- a/NadekoBot/Modules/Games.cs +++ b/NadekoBot/Modules/Games.cs @@ -1,30 +1,28 @@ -using Discord.Commands; +using System; +using System.Linq; using Discord.Modules; using NadekoBot.Commands; +using Newtonsoft.Json.Linq; +using System.IO; +using Discord.Commands; using NadekoBot.Extensions; -using System; -using System.Linq; -namespace NadekoBot.Modules -{ - internal class Games : DiscordModule - { +namespace NadekoBot.Modules { + internal class Games : DiscordModule { private readonly Random rng = new Random(); - public Games() - { + public Games() { commands.Add(new Trivia(this)); commands.Add(new SpeedTyping(this)); commands.Add(new PollCommand(this)); //commands.Add(new BetrayGame(this)); + } public override string Prefix { get; } = NadekoBot.Config.CommandPrefixes.Games; - public override void Install(ModuleManager manager) - { - manager.CreateCommands("", cgb => - { + public override void Install(ModuleManager manager) { + manager.CreateCommands("", cgb => { cgb.AddCheck(Classes.Permissions.PermissionChecker.Instance); @@ -33,8 +31,7 @@ namespace NadekoBot.Modules cgb.CreateCommand(Prefix + "choose") .Description("Chooses a thing from a list of things\n**Usage**: >choose Get up;Sleep;Sleep more") .Parameter("list", Discord.Commands.ParameterType.Unparsed) - .Do(async e => - { + .Do(async e => { var arg = e.GetArg("list"); if (string.IsNullOrWhiteSpace(arg)) return; @@ -47,69 +44,23 @@ namespace NadekoBot.Modules cgb.CreateCommand(Prefix + "8ball") .Description("Ask the 8ball a yes/no question.") .Parameter("question", Discord.Commands.ParameterType.Unparsed) - .Do(async e => - { + .Do(async e => { var question = e.GetArg("question"); if (string.IsNullOrWhiteSpace(question)) return; - try - { + try { await e.Channel.SendMessage( $":question: **Question**: `{question}` \n🎱 **8Ball Answers**: `{NadekoBot.Config._8BallResponses[rng.Next(0, NadekoBot.Config._8BallResponses.Length)]}`"); - } - catch { } + } catch { } }); - cgb.CreateCommand(Prefix + "attack") - .Description("Attack a person. Supported attacks: 'splash', 'strike', 'burn', 'surge'.\n**Usage**: >attack strike @User") - .Parameter("attack_type", Discord.Commands.ParameterType.Required) - .Parameter("target", Discord.Commands.ParameterType.Required) - .Do(async e => - { - var usr = e.Server.FindUsers(e.GetArg("target")).FirstOrDefault(); - if (usr == null) - { - await e.Channel.SendMessage("No such person."); - return; - } - var usrType = GetType(usr.Id); - var response = ""; - var dmg = GetDamage(usrType, e.GetArg("attack_type").ToLowerInvariant()); - response = e.GetArg("attack_type") + (e.GetArg("attack_type") == "splash" ? "es " : "s ") + $"{usr.Mention}{GetImage(usrType)} for {dmg}\n"; - if (dmg >= 65) - { - response += "It's super effective!"; - } - else if (dmg <= 35) - { - response += "Ineffective!"; - } - await e.Channel.SendMessage($"{ e.User.Mention }{GetImage(GetType(e.User.Id))} {response}"); - }); - - cgb.CreateCommand(Prefix + "poketype") - .Parameter("target", Discord.Commands.ParameterType.Required) - .Description("Gets the users element type. Use this to do more damage with strike!") - .Do(async e => - { - var usr = e.Server.FindUsers(e.GetArg("target")).FirstOrDefault(); - if (usr == null) - { - await e.Channel.SendMessage("No such person."); - return; - } - var t = GetType(usr.Id); - await e.Channel.SendMessage($"{usr.Name}'s type is {GetImage(t)} {t}"); - }); cgb.CreateCommand(Prefix + "rps") .Description("Play a game of rocket paperclip scissors with nadkeo.\n**Usage**: >rps scissors") .Parameter("input", ParameterType.Required) - .Do(async e => - { + .Do(async e => { var input = e.GetArg("input").Trim(); int pick; - switch (input) - { + switch (input) { case "r": case "rock": case "rocket": @@ -145,8 +96,7 @@ namespace NadekoBot.Modules .Description("Prints a customizable Linux interjection") .Parameter("gnu", ParameterType.Required) .Parameter("linux", ParameterType.Required) - .Do(async e => - { + .Do(async e => { var guhnoo = e.Args[0]; var loonix = e.Args[1]; @@ -161,104 +111,8 @@ There really is a {loonix}, and these people are using it, but it is just a part }); }); } - /* - 🌿 or 🍃 or 🌱 Grass -⚡ Electric -❄ Ice -☁ Fly -🔥 Fire -💧 or 💦 Water -⭕ Normal -🐛 Insect -🌟 or 💫 or ✨ Fairy - */ - - private string GetImage(PokeType t) - { - switch (t) - { - case PokeType.WATER: - return "💦"; - case PokeType.GRASS: - return "🌿"; - case PokeType.FIRE: - return "🔥"; - case PokeType.ELECTRICAL: - return "⚡️"; - default: - return "⭕️"; - } - } - - private int GetDamage(PokeType targetType, string v) - { - var rng = new Random(); - switch (v) - { - case "splash": //water - if (targetType == PokeType.FIRE) - return rng.Next(65, 100); - else if (targetType == PokeType.ELECTRICAL) - return rng.Next(0, 35); - else - return rng.Next(40, 60); - case "strike": //grass - if (targetType == PokeType.ELECTRICAL) - return rng.Next(65, 100); - else if (targetType == PokeType.FIRE) - return rng.Next(0, 35); - else - return rng.Next(40, 60); - case "burn": //fire - case "flame": - if (targetType == PokeType.GRASS) - return rng.Next(65, 100); - else if (targetType == PokeType.WATER) - return rng.Next(0, 35); - else - return rng.Next(40, 60); - case "surge": //electrical - case "electrocute": - if (targetType == PokeType.WATER) - return rng.Next(65, 100); - else if (targetType == PokeType.GRASS) - return rng.Next(0, 35); - else - return rng.Next(40, 60); - default: - return 0; - } - } - - private PokeType GetType(ulong id) - { - if (id == 113760353979990024) - return PokeType.FIRE; - - var remainder = id % 10; - if (remainder < 3) - return PokeType.WATER; - else if (remainder >= 3 && remainder < 5) - { - return PokeType.GRASS; - } - else if (remainder >= 5 && remainder < 8) - { - return PokeType.FIRE; - } - else { - return PokeType.ELECTRICAL; - } - } - - private enum PokeType - { - WATER, GRASS, FIRE, ELECTRICAL - } - - private string GetRPSPick(int i) - { + private string GetRPSPick(int i) { if (i == 0) return "rocket"; else if (i == 1) diff --git a/NadekoBot/Modules/Pokemon/DefaultMoves.cs b/NadekoBot/Modules/Pokemon/DefaultMoves.cs new file mode 100644 index 00000000..0072f6bf --- /dev/null +++ b/NadekoBot/Modules/Pokemon/DefaultMoves.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Pokemon +{ + class DefaultMoves + { + + public static Dictionary DefaultMovesList = new Dictionary() + { + {"sonic boom",0}, + {"quick attack",0}, + {"doubleslap",0}, + {"headbutt",0}, + {"incinerate",1}, + {"ember",1}, + {"fire punch",1}, + {"fiery dance",1}, + {"bubblebeam",2}, + {"dive",2}, + {"whirlpool",2}, + {"aqua tail",2}, + {"nuzzle",3}, + {"thunderbolt",3}, + {"thundershock",3}, + {"discharge",3}, + {"absorb",4}, + {"mega drain",4}, + {"vine whip",4}, + {"razor leaf",4}, + {"ice ball",5}, + {"powder snow",5}, + {"avalanche",5}, + {"icy wind",5}, + {"low kick",6}, + {"force palm",6}, + {"mach punch",6}, + {"double kick",6}, + {"acid",7}, + {"smog",7}, + {"sludge",7}, + {"poison jab",7}, + {"mud-slap",8}, + {"boomerang",8}, + {"bulldoze",8}, + {"dig",8}, + {"peck",9}, + {"pluck",9}, + {"gust",9}, + {"aerial ace",9}, + {"confusion",10}, + {"psybeam",10}, + {"psywave",10}, + {"heart stamp",10}, + {"bug bite",11}, + {"infestation",11}, + {"x-scissor",11}, + {"twineedle",11}, + {"rock throw",12}, + {"rollout",12}, + {"rock tomb",12}, + {"rock blast",12}, + {"astonish",13}, + {"night shade",13}, + {"lick",13}, + {"ominous wind",13}, + {"hex",13}, + {"dragon tail",14}, + {"dragon rage",14}, + {"dragonbreath",14}, + {"twister",14}, + {"pursuit",15}, + {"assurance",15}, + {"bite",15}, + {"faint attack",15}, + {"bullet punch",16}, + {"metal burst",16}, + {"gear grind",16}, + {"magnet bomb",16} + }; + + + } +} diff --git a/NadekoBot/Modules/Pokemon/PokeStats.cs b/NadekoBot/Modules/Pokemon/PokeStats.cs new file mode 100644 index 00000000..0d9c9d34 --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokeStats.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Pokemon +{ + class PokeStats + { + //Health left + public int HP { get; set; } = 500; + //Amount of moves made since last time attacked + public int MovesMade { get; set; } = 0; + //Last people attacked + public List LastAttacked { get; set; } = new List(); + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonModule.cs b/NadekoBot/Modules/Pokemon/PokemonModule.cs new file mode 100644 index 00000000..ac29c79c --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonModule.cs @@ -0,0 +1,381 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Discord.Modules; +using Discord.Commands; +using NadekoBot.Commands; +using NadekoBot.Classes; +using NadekoBot.Extensions; +using NadekoBot.Classes._DataModels; +using NadekoBot.Classes.Permissions; +using System.Collections.Concurrent; +using NadekoBot.Modules.Pokemon.PokeTypes; +using NadekoBot.Modules.Pokemon.PokeTypes.Extensions; + + +namespace NadekoBot.Modules.Pokemon +{ + + class PokemonGame : DiscordModule + { + public override string Prefix { get; } = NadekoBot.Config.CommandPrefixes.Pokemon; + public readonly int BaseHealth = 500; + //private Dictionary stats = new Dictionary(); + private ConcurrentDictionary Stats = new ConcurrentDictionary(); + + + public PokemonGame() + { + //Something? + } + public override void Install(ModuleManager manager) + { + manager.CreateCommands("", cgb => + { + cgb.AddCheck(Classes.Permissions.PermissionChecker.Instance); + + commands.ForEach(cmd => cmd.Init(cgb)); + + cgb.CreateCommand(Prefix + "attack") + .Description("Attacks a target with the given move") + .Parameter("move", ParameterType.Required) + .Parameter("target", ParameterType.Unparsed) + .Do(async e => + { + var move = e.GetArg("move"); + var target = e.Server.FindUsers(e.GetArg("target")).FirstOrDefault(); + if (target == null) + { + await e.Channel.SendMessage("No such person."); + return; + } + // Checking stats first, then move + //Set up the userstats + PokeStats userStats; + userStats = Stats.GetOrAdd(e.User.Id, defaultStats()); + + //Check if able to move + //User not able if HP < 0, has made more than 4 attacks + if (userStats.HP < 0) + { + await e.Channel.SendMessage($"{e.User.Mention} has fainted and was not able to move!"); + return; + } + if (userStats.MovesMade >= 5) + { + await e.Channel.SendMessage($"{e.User.Mention} has used too many moves in a row and was not able to move!"); + return; + } + if (userStats.LastAttacked.Contains(target.Id)) + { + await e.Channel.SendMessage($"{e.User.Mention} can't attack again without retaliation!"); + return; + } + //get target stats + PokeStats targetStats; + targetStats = Stats.GetOrAdd(target.Id, defaultStats()); + + //If target's HP is below 0, no use attacking + if (targetStats.HP <= 0) + { + await e.Channel.SendMessage($"{target.Mention} has already fainted!"); + return; + } + + //Check whether move can be used + IPokeType userType = getPokeType(e.User.Id); + + var enabledMoves = userType.GetMoves(); + if (!enabledMoves.Contains(move.ToLowerInvariant())) + { + await e.Channel.SendMessage($"{e.User.Mention} was not able to use **{move}**, use {Prefix}listmoves to see moves you can use"); + return; + } + + //get target type + IPokeType targetType = getPokeType(target.Id); + //generate damage + int damage = getDamage(userType, targetType); + //apply damage to target + targetStats.HP -= damage; + + var response = $"{e.User.Mention} used **{move}**{userType.GetImage()} on {target.Mention}{targetType.GetImage()} for **{damage}** damage"; + + //Damage type + if (damage < 40) + { + response += "\nIt's not effective.."; + } + else if (damage > 60) + { + response += "\nIt's super effective!"; + } + else + { + response += "\nIt's somewhat effective"; + } + + //check fainted + + if (targetStats.HP <= 0) + { + response += $"\n**{target.Name}** has fainted!"; + } + else + { + response += $"\n**{target.Name}** has {targetStats.HP} HP remaining"; + } + + //update other stats + userStats.LastAttacked.Add(target.Id); + userStats.MovesMade++; + targetStats.MovesMade = 0; + if (targetStats.LastAttacked.Contains(e.User.Id)) + { + targetStats.LastAttacked.Remove(e.User.Id); + } + + //update dictionary + //This can stay the same right? + Stats[e.User.Id] = userStats; + Stats[target.Id] = targetStats; + + await e.Channel.SendMessage(response); + }); + + cgb.CreateCommand(Prefix + "listmoves") + .Description("Lists the moves you are able to use") + .Do(async e => + { + var userType = getPokeType(e.User.Id); + List movesList = userType.GetMoves(); + var str = "**Moves:**"; + foreach (string m in movesList) + { + str += $"\n{userType.GetImage()}{m}"; + } + await e.Channel.SendMessage(str); + }); + + cgb.CreateCommand(Prefix + "addmove") + .Description($"Adds move given to database.\n**Usage**: {Prefix}addmove flame fire") + .Parameter("movename", ParameterType.Required) + .Parameter("movetype", ParameterType.Required) + .Do(async e => + { + //Implement NadekoFlowers???? + string newMove = e.GetArg("movename").ToLowerInvariant(); + var newType = PokemonTypesMain.stringToPokeType(e.GetArg("movetype").ToUpperInvariant()); + int typeNum = newType.GetNum(); + var db = DbHandler.Instance.GetAllRows().Select(x => x.move); + if (db.Contains(newMove)) + { + await e.Channel.SendMessage($"{newMove} already exists"); + return; + } + await Task.Run(() => + { + DbHandler.Instance.InsertData(new Classes._DataModels.PokeMoves + { + move = newMove, + type = typeNum + }); + }); + await e.Channel.SendMessage($"Added {newType.GetImage()}{newMove}"); + }); + + cgb.CreateCommand(Prefix + "heal") + .Description($"Heals someone. Revives those that fainted. Costs a NadekoFlower \n**Usage**:{Prefix}revive @someone") + .Parameter("target", ParameterType.Required) + .Do(async e => + { + var usr = e.Server.FindUsers(e.GetArg("target")).FirstOrDefault(); + if (usr == null) + { + await e.Channel.SendMessage("No such person."); + return; + } + if (Stats.ContainsKey(usr.Id)) + { + + var targetStats = Stats[usr.Id]; + int HP = targetStats.HP; + if (targetStats.HP == BaseHealth) + { + await e.Channel.SendMessage($"{usr.Name} already has full HP!"); + return; + } + //Payment~ + var amount = 1; + var pts = Classes.DbHandler.Instance.GetStateByUserId((long)e.User.Id)?.Value ?? 0; + if (pts < amount) + { + await e.Channel.SendMessage($"{e.User.Mention} you don't have enough NadekoFlowers! \nYou still need {amount - pts} to be able to do this!"); + return; + } + var up = (usr.Id == e.User.Id) ? "yourself" : usr.Name; + await FlowersHandler.RemoveFlowersAsync(e.User, $"heal {up}", amount); + //healing + targetStats.HP = BaseHealth; + if (HP < 0) + { + //Could heal only for half HP? + Stats[usr.Id].HP = (BaseHealth / 2); + await e.Channel.SendMessage($"{e.User.Name} revived {usr.Name} for 🌸"); + return; + } + await e.Channel.SendMessage($"{e.User.Name} healed {usr.Name} for {BaseHealth - HP} HP with a 🌸"); + return; + } + else + { + await e.Channel.SendMessage($"{usr.Name} already has full HP!"); + } + }); + + cgb.CreateCommand(Prefix + "type") + .Description($"Get the poketype of the target.\n**Usage**: {Prefix}type @someone") + .Parameter("target", ParameterType.Required) + .Do(async e => + { + var usr = e.Server.FindUsers(e.GetArg("target")).FirstOrDefault(); + if (usr == null) + { + await e.Channel.SendMessage("No such person."); + return; + } + var pType = getPokeType(usr.Id); + await e.Channel.SendMessage($"Type of {usr.Name} is **{pType.GetName().ToLowerInvariant()}**{pType.GetImage()}"); + + }); + + cgb.CreateCommand(Prefix + "setdefaultmoves") + .Description($"Sets the moves DB to the default state and returns them all **OWNER ONLY**") + .AddCheck(SimpleCheckers.OwnerOnly()) + .Do(async e => + { + //clear DB + var db = DbHandler.Instance.GetAllRows(); + foreach (PokeMoves p in db) + { + DbHandler.Instance.Delete(p.Id); + } + + foreach (var entry in DefaultMoves.DefaultMovesList) + { + DbHandler.Instance.InsertData(new Classes._DataModels.PokeMoves + { + move = entry.Key, + type = entry.Value + }); + } + + var str = "**Reset moves to default**.\n**Moves:**"; + //could sort, but meh + var dbMoves = DbHandler.Instance.GetAllRows(); + foreach (PokeMoves m in dbMoves) + { + var t = PokemonTypesMain.IntToPokeType(m.type); + + str += $"\n{t.GetImage()}{m.move}"; + } + + await e.Channel.SendMessage(str); + + }); + + cgb.CreateCommand(Prefix + "settype") + .Description($"Set your poketype. Costs a NadekoFlower.\n**Usage**: {Prefix}settype fire") + .Parameter("targetType", ParameterType.Required) + .Do(async e => + { + var targetTypeString = e.GetArg("targetType"); + var targetType = PokemonTypesMain.stringToPokeType(targetTypeString.ToUpperInvariant()); + if (targetType == null) + { + await e.Channel.SendMessage("Invalid type specified. Type must be one of:\nNORMAL, FIRE, WATER, ELECTRIC, GRASS, ICE, FIGHTING, POISON, GROUND, FLYING, PSYCHIC, BUG, ROCK, GHOST, DRAGON, DARK, STEEL"); + return; + } + if (targetType == getPokeType(e.User.Id)) + { + await e.Channel.SendMessage($"Your type is already {targetType.GetName().ToLowerInvariant()}{targetType.GetImage()}"); + return; + } + + //Payment~ + var amount = 1; + var pts = Classes.DbHandler.Instance.GetStateByUserId((long)e.User.Id)?.Value ?? 0; + if (pts < amount) + { + await e.Channel.SendMessage($"{e.User.Mention} you don't have enough NadekoFlowers! \nYou still need {amount - pts} to be able to do this!"); + return; + } + await FlowersHandler.RemoveFlowersAsync(e.User, $"set usertype to {targetTypeString}", amount); + //Actually changing the type here + var preTypes = DbHandler.Instance.GetAllRows(); + Dictionary Dict = preTypes.ToDictionary(x => x.UserId, y => y.Id); + if (Dict.ContainsKey((long)e.User.Id)) + { + //delete previous type + DbHandler.Instance.Delete(Dict[(long)e.User.Id]); + } + + DbHandler.Instance.InsertData(new Classes._DataModels.userPokeTypes + { + UserId = (long)e.User.Id, + type = targetType.GetNum() + }); + + //Now for the response + + await e.Channel.SendMessage($"Set type of {e.User.Mention} to {targetTypeString}{targetType.GetImage()} for a 🌸"); + }); + }); + } + + + + + private int getDamage(IPokeType usertype, IPokeType targetType) + { + Random rng = new Random(); + int damage = rng.Next(40, 60); + double multiplier = 1; + multiplier = usertype.GetMagnifier(targetType); + damage = (int)(damage * multiplier); + return damage; + } + + private IPokeType getPokeType(ulong id) + { + + var db = DbHandler.Instance.GetAllRows(); + Dictionary setTypes = db.ToDictionary(x => x.UserId, y => y.type); + if (setTypes.ContainsKey((long)id)) + { + return PokemonTypesMain.IntToPokeType(setTypes[(long)id]); + } + + int remainder = (int)id % 16; + + return PokemonTypesMain.IntToPokeType(remainder); + + + } + + private PokeStats defaultStats() + { + PokeStats s = new PokeStats(); + s.HP = BaseHealth; + return s; + } + + + } +} + + + + diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/BugType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/BugType.cs new file mode 100644 index 00000000..2df84631 --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/BugType.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; using NadekoBot.Modules.Pokemon.PokeTypes; + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class BugType : IPokeType + { + static readonly string name = "BUG"; + public static int numType = 11; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "FIRE": return 0.5; + case "GRASS": return 2; + case "FIGHTING": return 0.5; + case "POISON": return 0.5; + case "FLYING": return 0.5; + case "PSYCHIC": return 2; + case "ROCK": return 0.5; + case "DARK": return 2; + case "STEEL": return 0.5; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + + public string GetImage() + { + return "🐛"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/DarkType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/DarkType.cs new file mode 100644 index 00000000..54f69e2d --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/DarkType.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; using NadekoBot.Modules.Pokemon.PokeTypes; + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class DarkType : IPokeType + { + static readonly string name = "DARK"; + public static int numType = 15; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "FIGHTING": return 0.5; + case "PSYCHIC": return 2; + case "GHOST": return 2; + case "DARK": return 0.5; + case "STEEL": return 0.5; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + + public string GetImage() + { + return "🕶"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/Dragontype.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/Dragontype.cs new file mode 100644 index 00000000..e7168ffc --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/Dragontype.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; using NadekoBot.Modules.Pokemon.PokeTypes; + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class DragonType : IPokeType + { + static readonly string name = "DRAGON"; + public static int numType = 14; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "DRAGON": return 2; + case "STEEL": return 0.5; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + + public string GetImage() + { + return "🐉"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/ElectricType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/ElectricType.cs new file mode 100644 index 00000000..3cb77723 --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/ElectricType.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; using NadekoBot.Modules.Pokemon.PokeTypes; + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class ElectricType : IPokeType + { + static readonly string name = "ELECTRIC"; + public static int numType = 3; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "WATER": return 2; + case "ELECTRIC": return 0.5; + case "GRASS": return 2; + case "GROUND": return 0; + case "FLYING": return 2; + case "DRAGON": return 0.5; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + public string GetImage() + { + return "⚡️"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/FightingType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/FightingType.cs new file mode 100644 index 00000000..3d4603ed --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/FightingType.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; using NadekoBot.Modules.Pokemon.PokeTypes; + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class FightingType : IPokeType + { + static readonly string name = "FIGHTING"; + public static int numType = 6; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "NORMAL": return 2; + case "ICE": return 2; + case "POISON": return 0.5; + case "FLYING": return 0.5; + case "PSYCHIC": return 0.5; + case "BUG": return 0.5; + case "ROCK": return 2; + case "GHOST": return 0; + case "DARK": return 2; + case "STEEL": return 2; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + public string GetImage() + { + return "✊"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/FireType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/FireType.cs new file mode 100644 index 00000000..6995799a --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/FireType.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; using NadekoBot.Modules.Pokemon.PokeTypes; + + + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class FireType : IPokeType + { + static readonly string name = "FIRE"; + public static int numType = 1; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "FIRE": return 0.5; + case "WATER": return 0.5; + case "GRASS": return 2; + case "ICE": return 2; + case "BUG": return 2; + case "ROCK": return 0.5; + case "DRAGON": return 0.5; + case "STEEL": return 2; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + + public string GetImage() + { + return "🔥"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/FlyingType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/FlyingType.cs new file mode 100644 index 00000000..8f26875b --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/FlyingType.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; using NadekoBot.Modules.Pokemon.PokeTypes; + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class FlyingType : IPokeType + { + static readonly string name = "FLYING"; + public static int numType = 9; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "ELECTRIC": return 0.5; + case "GRASS": return 2; + case "FIGHTING": return 2; + case "BUG": return 2; + case "ROCK": return 0.5; + case "STEEL": return 0.5; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + + public string GetImage() + { + return "☁"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/GhostType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/GhostType.cs new file mode 100644 index 00000000..83c35504 --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/GhostType.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; using NadekoBot.Modules.Pokemon.PokeTypes; + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class GhostType : IPokeType + { + static readonly string name = "GHOST"; + public static int numType = 13; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "NORMAL": return 0; + case "PSYCHIC": return 2; + case "GHOST": return 2; + case "DARK": return 0.5; + case "STEEL": return 0.5; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + + public string GetImage() + { + return "👻"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/GrassType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/GrassType.cs new file mode 100644 index 00000000..1fc34dd6 --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/GrassType.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; using NadekoBot.Modules.Pokemon.PokeTypes; + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class GrassType : IPokeType + { + static readonly string name = "GRASS"; + public static int numType = 4; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "FIRE": return 0.5; + case "WATER": return 0.5; + case "GRASS": return 2; + case "ICE": return 2; + case "BUG": return 2; + case "ROCK": return 0.5; + case "DRAGON": return 0.5; + case "STEEL": return 2; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + public string GetImage() + { + return "🌿"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/GroundType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/GroundType.cs new file mode 100644 index 00000000..9795aa77 --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/GroundType.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; using NadekoBot.Modules.Pokemon.PokeTypes; + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class GroundType : IPokeType + { + static readonly string name = "GROUND"; + public static int numType = 8; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "FIRE": return 2; + case "ELECTRIC": return 2; + case "GRASS": return 0.5; + case "POISON": return 0.5; + case "FLYING": return 0; + case "BUG": return 0.5; + case "ROCK": return 2; + case "STEEL": return 2; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + + public string GetImage() + { + return "🗻"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/IPokeTypeExtensions.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/IPokeTypeExtensions.cs new file mode 100644 index 00000000..08d354cf --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/IPokeTypeExtensions.cs @@ -0,0 +1,27 @@ +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; +using System.Collections.Generic; + +namespace NadekoBot.Modules.Pokemon.PokeTypes.Extensions +{ + public static class IPokeTypeExtensions + { + public static List GetMoves(this IPokeType poketype) + { + var db = DbHandler.Instance.GetAllRows(); + List moves = new List(); + foreach (PokeMoves p in db) + { + if (p.type == poketype.GetNum()) + { + if (!moves.Contains(p.move)) + { + moves.Add(p.move); + } + } + } + return moves; + } + } + + } diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/IceType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/IceType.cs new file mode 100644 index 00000000..1d1156ad --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/IceType.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; using NadekoBot.Modules.Pokemon.PokeTypes; + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class IceType : IPokeType + { + static readonly string name = "ICE"; + public static int numType = 5; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "FIRE": return 0.5; + case "WATER": return 0.5; + case "GRASS": return 2; + case "ICE": return 0.5; + case "GROUND": return 2; + case "FLYING": return 2; + case "DRAGON": return 2; + case "STEEL": return 0.5; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + public string GetImage() + { + return "❄"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/NormalType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/NormalType.cs new file mode 100644 index 00000000..3052b4e1 --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/NormalType.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; +using NadekoBot.Modules.Pokemon.PokeTypes; + + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class NormalType : IPokeType + { + static readonly string name = "NORMAL"; + public static int type_num = 0; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "ROCK": return 0.5; + case "GHOST": return 0; + case "STEEL": return 0.5; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + + public string GetImage() + { + return "⭕️"; + } + + public int GetNum() + { + return type_num; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/PoisonType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/PoisonType.cs new file mode 100644 index 00000000..9c30dfae --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/PoisonType.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; +using NadekoBot.Modules.Pokemon.PokeTypes; + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class PoisonType : IPokeType + { + static readonly string name = "POISON"; + public static int numType = 7; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "GRASS": return 2; + case "POISON": return 0.5; + case "GROUND": return 0.5; + case "ROCK": return 0.5; + case "GHOST": return 0.5; + case "STEEL": return 0; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + public string GetImage() + { + return "☠"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/PokeType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/PokeType.cs new file mode 100644 index 00000000..6c47e466 --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/PokeType.cs @@ -0,0 +1,86 @@ +using System.Collections.Generic; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; +using NadekoBot.Modules.Pokemon.PokemonTypes; + +namespace NadekoBot.Modules.Pokemon.PokeTypes +{ + + public interface IPokeType + { + + string GetImage(); + string GetName(); + int GetNum(); + double GetMagnifier(IPokeType target); + } + public class PokemonTypesMain + { + + public static IPokeType stringToPokeType(string newType) + { + + foreach (IPokeType t in TypeList) + { + if (t.GetName() == newType) + { + return t; + } + } + return null; + } + + //public static List getMoves(int numType) + //{ + // var db = DbHandler.Instance.GetAllRows(); + // List moves = new List(); + // foreach (PokeMoves p in db) + // { + // if (p.type == numType) + // { + // if (!moves.Contains(p.move)) + // { + // moves.Add(p.move); + // } + // } + // } + // return moves; + //} + + + //These classes can use all methods (except getMoves) + public static List TypeList = new List() + { + new NormalType(), + new FireType(), + new WaterType(), + new ElectricType(), + new GrassType(), + new IceType(), + new FightingType(), + new PoisonType(), + new GroundType(), + new FlyingType(), + new PsychicType(), + new BugType(), + new RockType(), + new GhostType(), + new DragonType(), + new DarkType(), + new SteelType() + }; + + public static IPokeType IntToPokeType(int id) + { + foreach (IPokeType t in TypeList) + { + if (t.GetNum() == id) + { + return t; + } + } + return null; + } + + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/PsychicType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/PsychicType.cs new file mode 100644 index 00000000..1972c197 --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/PsychicType.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; +using NadekoBot.Modules.Pokemon.PokeTypes; + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class PsychicType : IPokeType + { + static readonly string name = "PSYCHIC"; + public static int numType = 10; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "FIGHTING": return 2; + case "POISON": return 2; + case "PSYCHIC": return 0.5; + case "DARK": return 0; + case "STEEL": return 0.5; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + + public string GetImage() + { + return "💫"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/RockType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/RockType.cs new file mode 100644 index 00000000..76b7ae44 --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/RockType.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; using NadekoBot.Modules.Pokemon.PokeTypes; + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class RockType : IPokeType + { + static readonly string name = "ROCK"; + public static int numType = 12; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "FIRE": return 2; + case "ICE": return 2; + case "FIGHTING": return 0.5; + case "GROUND": return 0.5; + case "FLYING": return 2; + case "BUG": return 2; + case "STEEL": return 0.5; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + + public string GetImage() + { + return "💎"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/SteelType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/SteelType.cs new file mode 100644 index 00000000..ff8b554b --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/SteelType.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; using NadekoBot.Modules.Pokemon.PokeTypes; + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class SteelType : IPokeType + { + static readonly string name = "STEEL"; + public static int numType = -1; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "FIRE": return 0.5; + case "WATER": return 0.5; + case "ELECTRIC": return 0.5; + case "ICE": return 2; + case "ROCK": return 2; + case "STEEL": return 0.5; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + public string GetImage() + { + return "🔩"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/Modules/Pokemon/PokemonTypes/WaterType.cs b/NadekoBot/Modules/Pokemon/PokemonTypes/WaterType.cs new file mode 100644 index 00000000..e5cfeaaa --- /dev/null +++ b/NadekoBot/Modules/Pokemon/PokemonTypes/WaterType.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Modules.Pokemon; +using NadekoBot.Classes; +using NadekoBot.Classes._DataModels; using NadekoBot.Modules.Pokemon.PokeTypes; using NadekoBot.Modules.Pokemon.PokeTypes; + +namespace NadekoBot.Modules.Pokemon.PokemonTypes +{ + class WaterType : IPokeType + { + static readonly string name = "WATER"; + public static int numType = 2; + + public double GetMagnifier(IPokeType target) + { + switch (target.GetName()) + { + + case "FIRE": return 2; + case "WATER": return 0.5; + case "GRASS": return 0.5; + case "GROUND": return 2; + case "ROCK": return 2; + case "DRAGON": return 0.5; + default: return 1; + } + } + List moves = new List(); + + + + + public string GetName() + { + return name; + } + + + public string GetImage() + { + return "💦"; + } + + public int GetNum() + { + return numType; + } + } +} diff --git a/NadekoBot/NadekoBot.cs b/NadekoBot/NadekoBot.cs index 77af4a00..d4f60c86 100644 --- a/NadekoBot/NadekoBot.cs +++ b/NadekoBot/NadekoBot.cs @@ -6,7 +6,7 @@ using NadekoBot.Classes.JSONModels; using NadekoBot.Commands; using NadekoBot.Modules; using NadekoBot.Modules.Gambling; -using NadekoBot.Modules.Translator; +using NadekoBot.Modules.Pokemon; using Newtonsoft.Json; using System; using System.Collections.Generic; @@ -14,6 +14,7 @@ using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; +using NadekoBot.Modules.Translator; namespace NadekoBot { @@ -164,9 +165,10 @@ namespace NadekoBot modules.Add(new Games(), "Games", ModuleFilter.None); modules.Add(new Music(), "Music", ModuleFilter.None); modules.Add(new Searches(), "Searches", ModuleFilter.None); - modules.Add(new TranslatorModule(), "Translator", ModuleFilter.None); modules.Add(new NSFW(), "NSFW", ModuleFilter.None); modules.Add(new ClashOfClans(), "ClashOfClans", ModuleFilter.None); + modules.Add(new PokemonGame(), "Pokegame", ModuleFilter.None); + modules.Add(new TranslatorModule(), "Translator", ModuleFilter.None); if (!string.IsNullOrWhiteSpace(Creds.TrelloAppKey)) modules.Add(new Trello(), "Trello", ModuleFilter.None); diff --git a/NadekoBot/NadekoBot.csproj b/NadekoBot/NadekoBot.csproj index ce98bffa..858557ba 100644 --- a/NadekoBot/NadekoBot.csproj +++ b/NadekoBot/NadekoBot.csproj @@ -143,6 +143,8 @@ + + @@ -186,6 +188,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/NadekoBot/bin/Debug/data/config_example.json b/NadekoBot/bin/Debug/data/config_example.json index 9b6bb69d..0f4507e1 100644 --- a/NadekoBot/bin/Debug/data/config_example.json +++ b/NadekoBot/bin/Debug/data/config_example.json @@ -15,7 +15,8 @@ "Games": ">", "Gambling": "$", "Permissions": ";", - "Programming": "%" + "Programming": "%", + "Pokemon": "poke" }, "ServerBlacklist": [], "ChannelBlacklist": [],