public async Task GenerateDungeon(IUser user, [Remainder] string name) { if (await IsGMLevel(3)) { Player player = Player.Load(user.Id); Area dungeon; if (name.Length > 0) { dungeon = Dungeons.ManualDungeon(StringM.UpperAt(name), player.AreaInfo.floor, player.Area); } else { dungeon = Dungeons.Generate(player.AreaInfo.floor, player.Area); } if (dungeon != null) { await player.SetArea(dungeon); await player.NewUI(await ReplyAsync(embed: dungeon.AreaInfo(player.AreaInfo.floor).Build()), MsgType.Main); } else { await ReplyAsync("Dungeon not Found"); } } }
internal static async Task EnterDungeon(Player player, IMessageChannel chan) { player.EndEncounter(); Area dungeon = Dungeons.Generate(player.AreaInfo.floor, player.Area); await player.SetArea(dungeon, player.AreaInfo.floor); player.QuestTrigger(Quest.QuestTrigger.Enter, "Dungeon"); player.EggPocketTrigger(NPCSystems.Companions.Egg.EggChallenge.Exploration); EmbedBuilder areaInfo = player.UserEmbedColor(player.Area.AreaInfo(player.AreaInfo.floor)); await player.NewUI(await chan.SendMessageAsync("You've entered " + player.Area.name, embed: areaInfo.Build()), MsgType.Main); }