using System.Collections.Generic; using System.Linq; using Wizard.Battle; public class SkillConditionCheckerOption { public class SkillAndSelectTarget { public BattleCardBase SelectCard { get; private set; } public SkillBase SelectSkill { get; private set; } public SkillAndSelectTarget(BattleCardBase card, SkillBase skill) { SelectCard = card; SelectSkill = skill; } } private int _skillTargetConditionIndex; public BattleCardBase PlayedCard { get; set; } public BattleCardBase EnhanceCard { get; set; } public BattleCardBase AcceleratedCard { get; set; } public BattleCardBase CrystallizedCard { get; set; } public BattleCardBase SummonedCard { get; set; } public BattleCardBase AttackerCard { get; set; } public BattleCardBase AttackTargetCard { get; set; } public BattleCardBase DestroyedCard { get; set; } public BattleCardBase BanishedCard { get; set; } public BattleCardBase NecromanceCard { get; set; } public List LeftCards { get; set; } public int NecromanceCount { get; set; } public int LastUsedWhiteRitualStackCount { get; set; } public List BurialRiteCards { get; set; } public List GetOffCards { get; set; } public List ChosenCards { get; set; } public List InHandCard { get; set; } public List SkillDrewCards { get; set; } public List SkillUpdatedDeckCards { get; set; } public List HealingCardAndValue { get; set; } public List DamageCards { get; set; } public List EvolutionCards { get; set; } public List FusionIngredientCards { get; set; } public List Discards { get; set; } public List SelectedCards { get; set; } public List ReturnCards { get; set; } public List CantAttackAllReturnCards { get; set; } public List NextTargetCards { get; set; } public List ReanimatedCards { get; set; } public List DeckSelfSummonedCards { get; set; } public List TokenDrewCards { get; set; } public List DeckDrewCards { get; set; } public List DrewOverHandLimitCards { get; set; } public List InplayBuffingCards { get; set; } public List InplayDebuffingCards { get; set; } public List ChantCountChangeCard { get; set; } public List ShortageDeckWinCards { get; set; } public DamageInfo DefaultDamage { get; set; } public DamageInfo FixedDamage { get; set; } public List ProcessSkillList { get; set; } public AttachingAbilityInfo AttachingAbility { get; set; } public int AddChargeCount { get; set; } public int AddOddChargeCount { get; set; } public int AddEvenChargeCount { get; set; } public bool IsRefPrev { get; set; } public bool IsSkipPpCheck { get; set; } public bool IsSkipPrivateCardCheck { get; set; } public List> SkillTargetConditionList { get; set; } public List PopSkillTargetCondition() { List result = new List { string.Empty }; if (SkillTargetConditionList.Count > _skillTargetConditionIndex) { result = SkillTargetConditionList[_skillTargetConditionIndex]; _skillTargetConditionIndex++; } return result; } public SkillConditionCheckerOption() { ReturnCards = new List(); CantAttackAllReturnCards = new List(); InHandCard = new List(); SkillDrewCards = new List(); SkillUpdatedDeckCards = new List(); HealingCardAndValue = new List(); DamageCards = new List(); EvolutionCards = new List(); Discards = new List(); NextTargetCards = new List(); ReanimatedCards = new List(); DeckSelfSummonedCards = new List(); TokenDrewCards = new List(); DeckDrewCards = new List(); DrewOverHandLimitCards = new List(); ChantCountChangeCard = new List(); ShortageDeckWinCards = new List(); SelectedCards = new List(); BurialRiteCards = new List(); GetOffCards = new List(); ChosenCards = new List(); DefaultDamage = new DamageInfo(null, -1); FixedDamage = new DamageInfo(null, -1); ProcessSkillList = new List(); AttachingAbility = new AttachingAbilityInfo(null, new List()); SkillTargetConditionList = new List>(); _skillTargetConditionIndex = 0; } public SkillConditionCheckerOption ShallowCopy() { return new SkillConditionCheckerOption { PlayedCard = PlayedCard, EnhanceCard = EnhanceCard, AcceleratedCard = AcceleratedCard, CrystallizedCard = CrystallizedCard, SummonedCard = SummonedCard, AttackerCard = AttackerCard, AttackTargetCard = AttackTargetCard, DestroyedCard = DestroyedCard, NecromanceCard = NecromanceCard, BurialRiteCards = new List(BurialRiteCards), GetOffCards = new List(GetOffCards), ChosenCards = new List(ChosenCards), InHandCard = new List(InHandCard), SkillDrewCards = new List(SkillDrewCards), SkillUpdatedDeckCards = new List(SkillUpdatedDeckCards), HealingCardAndValue = new List(HealingCardAndValue), DamageCards = new List(DamageCards), EvolutionCards = new List(EvolutionCards), Discards = new List(Discards), SelectedCards = new List(SelectedCards), ReturnCards = new List(ReturnCards), CantAttackAllReturnCards = new List(CantAttackAllReturnCards), NextTargetCards = new List(NextTargetCards), ReanimatedCards = new List(ReanimatedCards), DeckSelfSummonedCards = new List(DeckSelfSummonedCards), TokenDrewCards = new List(TokenDrewCards), DeckDrewCards = new List(DeckDrewCards), DrewOverHandLimitCards = new List(DrewOverHandLimitCards), ChantCountChangeCard = new List(ChantCountChangeCard), ShortageDeckWinCards = new List(ShortageDeckWinCards), DefaultDamage = DefaultDamage, FixedDamage = FixedDamage, ProcessSkillList = new List(ProcessSkillList), AttachingAbility = new AttachingAbilityInfo(AttachingAbility.Skill, new List(AttachingAbility.TargetCards)), SkillTargetConditionList = new List>(SkillTargetConditionList), _skillTargetConditionIndex = _skillTargetConditionIndex, AddChargeCount = AddChargeCount, AddEvenChargeCount = AddEvenChargeCount, AddOddChargeCount = AddOddChargeCount, IsRefPrev = IsRefPrev }; } public void SetCheckerOptionTransientValue(BattlePlayerBase selfBattlePlayer, BattlePlayerBase opponentBattlePlayer) { if (selfBattlePlayer.ReturnList.Count > 0) { ReturnCards.AddRange(BattlePlayerBase.ConvertToSkillInfoCollection(selfBattlePlayer.ReturnList)); ReturnCards = ReturnCards.Distinct().ToList(); } if (opponentBattlePlayer.ReturnList.Count > 0) { ReturnCards.AddRange(BattlePlayerBase.ConvertToSkillInfoCollection(opponentBattlePlayer.ReturnList)); ReturnCards = ReturnCards.Distinct().ToList(); } } }