예제 #1
0
        private List<int> TurnOrder = new List<int>(); //List of InstanceIDs

        #endregion Fields

        #region Constructors

        public BattleV2(Party playerParty, Party foeParty)
        {
            this.friend = playerParty.getActiveParty()[0];
            this.friend.setInstanceID(nextID);
            nextID++;
            //this.TurnOrder.Add(this.friend.getInstanceID());

            foreach (Entity tmpFoe in foeParty.getActiveParty())
            {
                tmpFoe.setInstanceID(nextID);
                //this.TurnOrder.Add(tmpFoe.getInstanceID());
                foes.Add(tmpFoe.getInstanceID(), tmpFoe);
                nextID++;
            }
            this.foe = foeParty.getActiveParty()[0];
            this.dataOut = "You, " + this.friend.name + ", have encountered a level " + this.foe.getLevel() + " " + this.foe.name + "\r\n";
            OrderParicipents();
        }
예제 #2
0
        public Battle(Party tmpPlayerParty, Party tmpFoeParty)
        {
            int nextInstanceID = 0;
            foreach (Entity tmpEnt in tmpPlayerParty.getActiveParty())
            {
                tmpEnt.setInstanceID(nextInstanceID);
                AllyInstanceIDs.Add(tmpEnt.getInstanceID());
                nextInstanceID++;
                orderedParticipents.Add(tmpEnt);
            }

            foreach (Entity tmpEnt in tmpFoeParty.getActiveParty())
            {
                tmpEnt.setInstanceID(nextInstanceID);
                foesInstanceIDs.Add(tmpEnt.getInstanceID());
                nextInstanceID++;
                orderedParticipents.Add(tmpEnt);
            }

            this.playerParty = tmpPlayerParty;
            this.foeParty = tmpFoeParty;
            this.currentEntity = this.playerParty.getActiveParty()[0];
        }