public Team GetTeam(BasicCard player) { return(GetTeam(UserHandler.GetUser(player.Owner))); }
public static async Task NextTurn(CombatInstance inst) { await CheckPlayerDeath(inst); if (inst.CombatEnded) { return; } foreach (BasicCard player in inst.CardList) { if (player.HasPassive) { if (player.Passive.UpdateTurnStart) { if (!player.Passive.RequiresAsync) { player.Passive.Update(inst, player); } else { await player.Passive.UpdateAsync(inst, player); } } } } inst.TurnNumber++; if (inst.TurnNumber >= inst.CardList.Count) { await NextRound(inst); return; } var card = inst.CardList[inst.TurnNumber]; var user = UserHandler.GetUser(card.Owner); //Turn start tick. Moved to turn end. May implement here later. //await card.TurnTick(); card.ApplyBonusActions(); var skip = false; foreach (BuffDebuff eff in card.Effects) { if (eff.TurnSkip) { skip = true; } } if (!card.Dead && !skip) { await MessageHandler.SendEmbedMessage(inst.Location, $"{user.Mention}'s Turn!", OsirisEmbedBuilder.PlayerTurnStatus(inst.CardList[inst.TurnNumber], inst.RoundNumber)); card.IsTurn = true; } else { if (skip) { await MessageHandler.SendMessage(inst.Location, $"{user.Mention}'s Turn was skipped!"); } await card.TurnTick(); card.IsTurn = false; await NextTurn(inst); } }