Exemplo n.º 1
0
        public override InitiativePassSlot Next()
        {
            InitiativeOrder.Sort();
            var slot = InitiativeOrder.FirstOrDefault(_leftToAct);

            if (slot != null)
            {
                slot.CurrentInitiative -= 10;
            }
            return(slot);
        }
Exemplo n.º 2
0
        public void Setup(IDiceBag diceBag, IEnumerable <ICharacter> participants)
        {
            if (diceBag == null)
            {
                throw new ArgumentNullException("diceBag");
            }
            if (participants == null)
            {
                throw new ArgumentNullException("participants");
            }

            InitiativeOrder = participants.Select(x =>
                                                  new InitiativePassSlot()
            {
                Participant = x,
                HasActed    = false
            }).ToList();

            InitiativeOrder.ForEach(x => x.CurrentInitiative = x.RollInitiative(diceBag));

            InitiativeOrder.Sort();
        }
Exemplo n.º 3
0
 public override InitiativePassSlot Next()
 {
     InitiativeOrder.Sort();
     return(InitiativeOrder.FirstOrDefault(_leftToAct));
 }