Ejemplo n.º 1
0
        public SZOutcome(SelectionManager selectionManager, ScenarioLoader scenarioLoader, Outcome toCopy)
        {
            activeUnit    = selectionManager.GetIDByUnit(toCopy.activeUnit);
            position      = scenarioLoader.GetIDByHex(toCopy.position);
            spendingMoves = toCopy.spendingMoves;

            combat = new List <SZAttackResult>();
            foreach (AttackResult attackResult in toCopy.combat)
            {
                combat.Add(new SZAttackResult(selectionManager, scenarioLoader, attackResult));
            }
        }
Ejemplo n.º 2
0
        public SZAttackResult(SelectionManager selectionManager, ScenarioLoader scenarioLoader, AttackResult toCopy)
        {
            target          = selectionManager.GetIDByUnit(toCopy.target);
            source          = selectionManager.GetIDByUnit(toCopy.source);
            healthRemaining = toCopy.healthRemaining;
            sourceHex       = scenarioLoader.GetIDByHex(toCopy.sourceHex);
            targetHex       = scenarioLoader.GetIDByHex(toCopy.targetHex);
            attackType      = toCopy.attackType;


            if (toCopy.pushMoves == null)
            {
                pushMoves = null;
            }
            else
            {
                pushMoves = new List <SZOutcome>();
                foreach (Outcome outcome in toCopy.pushMoves)
                {
                    pushMoves.Add(new SZOutcome(selectionManager, scenarioLoader, outcome));
                }
            }
        }