Changed defaultmoves

From LawlyPoppz
This commit is contained in:
appelemac 2016-03-27 18:36:42 +02:00
parent 41a6b84934
commit 7c6e1918e8

View File

@ -15,14 +15,14 @@ using NadekoBot.Modules.Pokemon.PokeTypes;
namespace NadekoBot.Modules.Pokemon
{
class PokemonGame : DiscordModule
{
public override string Prefix { get; } = NadekoBot.Config.CommandPrefixes.Pokemon;
public readonly int BASEHEALTH = 500;
//private Dictionary<ulong, Pokestats> stats = new Dictionary<ulong, Pokestats>();
private ConcurrentDictionary<ulong, Pokestats> stats = new ConcurrentDictionary<ulong, Pokestats>();
public PokemonGame()
{
@ -53,7 +53,8 @@ namespace NadekoBot.Modules.Pokemon
await e.Channel.SendMessage("No such person.");
return;
}
} else
}
else
{
await e.Channel.SendMessage("No such person.");
return;
@ -62,7 +63,7 @@ namespace NadekoBot.Modules.Pokemon
//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)
@ -83,7 +84,7 @@ namespace NadekoBot.Modules.Pokemon
//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)
{
@ -272,37 +273,75 @@ namespace NadekoBot.Modules.Pokemon
Dictionary<string, int> defaultmoves = new Dictionary<string, int>()
{
{"flame",1},
{"hack",3},
{"scare",13},
{"splash",2},
{"freeze",5},
{"strike",4},
{"surge",3},
{"electrocute",3},
{"surf",2},
{"mellow",4},
{"flamethrower",1},
{"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},
{"lava",12},
{"fly",9},
{"control",10},
{"sting",11},
{"poison",7},
{"confusion",10},
{"breathe",14},
{"ultrabash",6},
{"punch",6},
{"blind",15},
{"earthquake",8},
{"rocksmash",12},
{"transform",0},
{"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},
{"frustate",0},
{"confide",0},
{"metronome",0},
{"dracometeor",14},
{"outrage",14}
{"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}
};
foreach (KeyValuePair<string, int> entry in defaultmoves)
@ -323,7 +362,7 @@ namespace NadekoBot.Modules.Pokemon
str += $"\n{t.getImage()}{m.move}";
}
await e.Channel.SendMessage(str);
});
@ -377,8 +416,8 @@ namespace NadekoBot.Modules.Pokemon
});
}
private int getDamage(IPokeType usertype, IPokeType targetType)
{