Пример #1
0
        private string GetPartyPlayerInfo(PartyMember member, Encounter encounter)
        {
            if (encounter == null)
            {
                return(member.characterName);
            }

            if (encounter.IsCombatEncounter())
            {
                var duel = member.LoadPlayer().duel;
                return($"{member.characterName} [{duel.abilityName} {duel.target}]");
            }

            return(member.characterName);
        }
Пример #2
0
        public async Task Party_Kick(IUser user)
        {
            if (Context.Player.Party == null)
            {
                await ReplyAsync("You are not in a party.");
            }
            if (Context.Player.IsSolo)
            {
                await ReplyAsync("Use `Follower kick` to kick followers");
            }
            else if (!Context.Player.IsLeader)
            {
                await ReplyAsync("You are not leader.");
            }
            else if (Context.Player.IsEncounter("Loot"))
            {
                await ReplyAsync("You may not kick players during the loot phase.");
            }
            else if (Context.Player.ui?.type == MsgType.CardGame)
            {
                await ReplyAsync("You may not kick players during this mini game.");
            }
            else
            {
                PartyMember member = Context.Player.Party.members.Find(m => m.id == user.Id);
                if (member == null)
                {
                    await ReplyAsync("This user has no character in this party.");
                }
                else
                {
                    Player p = member.LoadPlayer();
                    await Context.Player.Party.Remove(p);

                    p.SaveFileMongo();
                    await ReplyAsync($"{p.name} was kicked from the party.");
                }
            }
        }