public async Task NewGamePlusTask() { var account = EntityConverter.ConvertUser(Context.User); await ReplyAsync("So you want to start over? Are you sure?"); var response = await Context.Channel.AwaitMessage(m => m.Author == Context.User); if (!response.Content.Equals("Yes", StringComparison.CurrentCultureIgnoreCase)) { return; } await ReplyAsync($"You will lose all your progress so far, are you really sure? However, you will get an experience boost from x{account.XpBoost:F} to x{Math.Min(2,account.XpBoost * (1 + 0.1 * (1 - Math.Exp(-(double)account.XP / 120000)))):F}"); response = await Context.Channel.AwaitMessage(m => m.Author == Context.User); if (!response.Content.Equals("Yes", StringComparison.CurrentCultureIgnoreCase)) { return; } if (ColossoPvE.UserInBattle(EntityConverter.ConvertUser(Context.User))) { await ReplyAsync($"I find it highly unwise to do such things in the midst of a fight."); return; } await ReplyAsync("Let us reverse the cycle, to a stage where you were just beginning"); account.NewGame(); UserAccountProvider.StoreUser(account); await Status(); }
public async Task Repair([Remainder] string item) { var inv = UserAccounts.GetAccount(Context.User).Inv; var embed = new EmbedBuilder(); embed.WithColor(Colors.Get("Iodem")); if (ColossoPvE.UserInBattle(UserAccounts.GetAccount(Context.User))) { return; } if (inv.Repair(item)) { embed.WithDescription($"Item repaired successfully."); } else { embed.WithDescription($":x: No such item to repair, or not enough funds."); } await Context.Channel.SendMessageAsync("", false, embed.Build()); }