public CardDrawedViewSample() { int baseId = 123; Clan clan = Clan.GetClanById(ClanId.Raptors); string cardName = "Tester"; Skill ability = new Skill(SkillPrefix.Courage, SkillSuffix.DecreasePillzXMinY, 2, 3); int minLevel = 2; int maxLevel = 4; List <CardLevel> cardLevels = new List <CardLevel> { new CardLevel(2, 2, 3), new CardLevel(3, 3, 4), new CardLevel(4, 6, 5), }; int abilityUnlockLevel = 3; CardRarity rarity = CardRarity.Legendary; int currentLevel = 4; int instanceId = 222; CardBase cardBase = new CardBase(baseId, cardName, clan, minLevel, maxLevel, cardLevels, ability, abilityUnlockLevel, rarity); CardInstance cardInstance = new CardInstance(cardBase, instanceId, currentLevel); card = new CardDrawed(cardInstance); }
private static int CalculateSupportValue(PlayerStatus player, CardDrawed card) { return(card.Ability.X * player.Hand.GetSupportMultiplier(card.Clan.ClanId)); }
public void ApplySupportPrefix(PlayerStatus leftPlayerStatus, PlayerStatus rightPlayerStatus, CardDrawed leftCard, CardDrawed rightCard) { for (int i = 0; i < 4; i++) { bool isLeft = IsLeft(i); switch (this[i].Prefix) { case SkillPrefix.Support: if (isLeft) { skills[i] = skills[i].CopyWithDifferentX(CalculateSupportValue(leftPlayerStatus, leftCard)); } else { skills[i] = skills[i].CopyWithDifferentX(CalculateSupportValue(rightPlayerStatus, rightCard)); } break; } } }