public async Task Info([Remainder] string moveName) { PBEMove?nMove = PBELocalizedString.GetMoveByName(moveName); if (!nMove.HasValue || nMove.Value == PBEMove.None) { await Context.Channel.SendMessageAsync($"{Context.User.Mention} ― Invalid move!"); } else { PBEMove move = nMove.Value; moveName = PBELocalizedString.GetMoveName(move).English; PBEMoveData mData = PBEMoveData.Data[move]; EmbedBuilder embed = new EmbedBuilder() .WithAuthor(Context.User) .WithColor(Utils.TypeColors[mData.Type]) .WithTitle(moveName) .WithUrl(Utils.URL) .WithDescription(PBELocalizedString.GetMoveDescription(move).English.Replace('\n', ' ')) .AddField("Type", Utils.TypeEmotes[mData.Type], true) .AddField("Category", mData.Category, true) .AddField("Priority", mData.Priority, true) .AddField("PP", Math.Max(1, mData.PPTier * PBESettings.DefaultPPMultiplier), true) .AddField("Power", mData.Power == 0 ? "―" : mData.Power.ToString(), true) .AddField("Accuracy", mData.Accuracy == 0 ? "―" : mData.Accuracy.ToString(), true) .AddField("Targets", mData.Targets, true) .AddField("Flags", mData.Flags, true); switch (mData.Effect) { case PBEMoveEffect.Recoil: embed.AddField("Recoil", $"1/{mData.EffectParam} damage dealt"); break; case PBEMoveEffect.Recoil__10PercentBurn: embed.AddField("Recoil", $"1/{mData.EffectParam} damage dealt"); break; // TODO: Burn chance case PBEMoveEffect.Recoil__10PercentParalyze: embed.AddField("Recoil", $"1/{mData.EffectParam} damage dealt"); break; // TODO: Paralyze chance case PBEMoveEffect.Struggle: embed.AddField("Recoil", "1/4 user's max HP"); break; case PBEMoveEffect.TODOMOVE: embed.AddField("**ATTENTION**", $"{moveName} is not yet implemented in Pokémon Battle Engine"); break; } await Context.Channel.SendMessageAsync(string.Empty, embed : embed.Build()); } }
public async Task Info([Remainder] string moveName) { PBEMove?nMove = PBELocalizedString.GetMoveByName(moveName); if (!nMove.HasValue || nMove.Value == PBEMove.None) { await Context.Channel.SendMessageAsync($"{Context.User.Mention} Invalid move!"); } else { PBEMove move = nMove.Value; PBEMoveData mData = PBEMoveData.Data[move]; EmbedBuilder embed = new EmbedBuilder() .WithAuthor(Context.User) .WithColor(Utils.TypeToColor[mData.Type]) .WithTitle(PBELocalizedString.GetMoveName(move).English) .WithUrl(Utils.URL) .WithDescription(PBELocalizedString.GetMoveDescription(move).English.Replace('\n', ' ')) .AddField("Type", mData.Type, true) .AddField("Category", mData.Category, true) .AddField("Priority", mData.Priority, true) .AddField("PP", Math.Max(1, mData.PPTier * PBESettings.DefaultSettings.PPMultiplier), true) .AddField("Power", mData.Power == 0 ? "--" : mData.Power.ToString(), true) .AddField("Accuracy", mData.Accuracy == 0 ? "--" : mData.Accuracy.ToString(), true); switch (mData.Effect) { case PBEMoveEffect.FlareBlitz: embed.AddField("Recoil", "1/3 damage dealt", true); break; // TODO: Burn chance case PBEMoveEffect.Recoil: embed.AddField("Recoil", $"1/{mData.EffectParam} damage dealt", true); break; case PBEMoveEffect.Struggle: embed.AddField("Recoil", "1/4 user's max HP", true); break; case PBEMoveEffect.VoltTackle: embed.AddField("Recoil", "1/3 damage dealt", true); break; // TODO: Paralyze chance } embed.AddField("Targets", mData.Targets, true) .AddField("Flags", mData.Flags, true); await Context.Channel.SendMessageAsync(string.Empty, embed : embed.Build()); } }