Example #1
0
        private CombatantCard GetDamagedTarget(CombatantCard rawTarget)
        {
            CombatantCardBuilder target = castTarget.AsMutable();

            target =

                return(target.AsReadonly());
        }
Example #2
0
        public override ReadOnlyCollection <Card> GetApplied(ReadOnlyCollection <Card> queue)
        {
            List <Card> ret = queue.ToList();

            ret.RemoveAt(0);
            if (CanStillFight)
            {
                int targetIndex = GetCombatTargetIndex(queue);

                CombatantCard damagedTarget = GetDamagedTarget(ret[targetIndex]);
                ret.RemoveAt(targetIndex);
                ret.Insert(targetIndex, damagedTarget);
            }
            else
            {
            }
            // TODO: Add self back to the end of the queue
            return(ret.AsReadOnly());
        }
Example #3
0
        public override ReadOnlyCollection <Card> GetApplied(ReadOnlyCollection <Card> queue)
        {
            List <Card> ret = queue.ToList();

            ret.RemoveAt(0);
            for (int i = 0; i < ret.Count; i++)
            {
                if (ret[i].Faction == Faction)
                {
                    CombatantCard combatant = ret[i] as CombatantCard;
                    if (combatant != null)
                    {
                        CombatantCardBuilder mutable = combatant.AsMutable();
                        mutable.Attack += Skill;
                        ret[i]          = mutable.AsReadonly();
                    }
                }
            }
            ret.Add(this);
            return(ret.AsReadOnly());
        }
Example #4
0
        private BattleStatus GetStatus()
        {
            bool sideASurvives = false;
            bool sideBSurvives = false;

            foreach (Card card in Queue)
            {
                CombatantCard soldier = card as CombatantCard;
                if (soldier != null && soldier.CanStillFight)
                {
                    if (soldier.Faction == CardFaction.SideA)
                    {
                        sideASurvives = true;
                    }
                    else
                    {
                        sideBSurvives = true;
                    }
                }
            }
            return(GetStatus(sideASurvives, sideBSurvives));
        }