private void AirRankBuff(List <BoardUnit> units, Enumerators.CardRank rank) { List <Enumerators.BuffType> buffs = new List <Enumerators.BuffType>(); int count = 1; switch (rank) { case Enumerators.CardRank.OFFICER: buffs.Add(Enumerators.BuffType.GUARD); break; case Enumerators.CardRank.COMMANDER: buffs.Add(Enumerators.BuffType.GUARD); buffs.Add(Enumerators.BuffType.DEFENCE); count = 2; break; case Enumerators.CardRank.GENERAL: buffs.Add(Enumerators.BuffType.GUARD); buffs.Add(Enumerators.BuffType.DEFENCE); count = 3; break; } BuffRandomAlly(units, count, buffs); }
private Card GenerateNewCard() { Enumerators.CardRank rarity = (Enumerators.CardRank)IsChanceFit(0); List <Card> cards = _dataManager.CachedCardsLibraryData.Cards.FindAll(item => item.CardRank == rarity && item.CardSetType != Enumerators.SetType.OTHERS); Card card = cards[Random.Range(0, cards.Count)].Clone(); return(card); }
public void DoRankUpgrades(List <BoardUnit> units, Enumerators.SetType element, Enumerators.CardRank rank) { switch (element) { case Enumerators.SetType.AIR: AirRankBuff(units, rank); break; case Enumerators.SetType.EARTH: EarthRankBuff(units, rank); break; case Enumerators.SetType.WATER: WaterRankBuff(units, rank); break; case Enumerators.SetType.FIRE: FireRankBuff(units, rank); break; case Enumerators.SetType.TOXIC: ToxicRankBuff(units, rank); break; case Enumerators.SetType.LIFE: LifeRankBuff(units, rank); break; } }