Beispiel #1
0
        public ZombieApplicator(
            ICollectionSelector collectionSelector,
            IAdjustmentsSelector adjustmentSelector,
            Dice dice,
            IAttacksGenerator attacksGenerator,
            IFeatsGenerator featsGenerator,
            ISavesGenerator savesGenerator,
            IHitPointsGenerator hitPointsGenerator)
        {
            this.collectionSelector = collectionSelector;
            this.adjustmentSelector = adjustmentSelector;
            this.dice               = dice;
            this.attacksGenerator   = attacksGenerator;
            this.featsGenerator     = featsGenerator;
            this.savesGenerator     = savesGenerator;
            this.hitPointsGenerator = hitPointsGenerator;

            creatureTypes = new[]
            {
                CreatureConstants.Types.Aberration,
                CreatureConstants.Types.Animal,
                CreatureConstants.Types.Dragon,
                CreatureConstants.Types.Elemental,
                CreatureConstants.Types.Fey,
                CreatureConstants.Types.Giant,
                CreatureConstants.Types.Humanoid,
                CreatureConstants.Types.MagicalBeast,
                CreatureConstants.Types.MonstrousHumanoid,
                CreatureConstants.Types.Vermin,
            };
        }
Beispiel #2
0
        public LycanthropeApplicator(
            ICollectionSelector collectionSelector,
            ICreatureDataSelector creatureDataSelector,
            IHitPointsGenerator hitPointsGenerator,
            Dice dice,
            ITypeAndAmountSelector typeAndAmountSelector,
            IFeatsGenerator featsGenerator,
            IAttacksGenerator attacksGenerator,
            ISavesGenerator savesGenerator,
            ISkillsGenerator skillsGenerator,
            ISpeedsGenerator speedsGenerator)
        {
            this.collectionSelector   = collectionSelector;
            this.creatureDataSelector = creatureDataSelector;
            this.hitPointsGenerator   = hitPointsGenerator;
            this.dice = dice;
            this.typeAndAmountSelector = typeAndAmountSelector;
            this.featsGenerator        = featsGenerator;
            this.attacksGenerator      = attacksGenerator;
            this.savesGenerator        = savesGenerator;
            this.skillsGenerator       = skillsGenerator;
            this.speedsGenerator       = speedsGenerator;

            creatureTypes = new[]
            {
                CreatureConstants.Types.Giant,
                CreatureConstants.Types.Humanoid,
            };
        }
Beispiel #3
0
 public CombatGenerator(IArmorClassGenerator armorClassGenerator, IHitPointsGenerator hitPointsGenerator, ISavingThrowsGenerator savingThrowsGenerator,
     IAdjustmentsSelector adjustmentsSelector, ICollectionsSelector collectionsSelector)
 {
     this.armorClassGenerator = armorClassGenerator;
     this.hitPointsGenerator = hitPointsGenerator;
     this.savingThrowsGenerator = savingThrowsGenerator;
     this.adjustmentsSelector = adjustmentsSelector;
     this.collectionsSelector = collectionsSelector;
 }
        public void Setup()
        {
            mockDice = new Mock <Dice>();
            mockAdjustmentSelector = new Mock <IAdjustmentsSelector>();
            hitPointsGenerator     = new HitPointsGenerator(mockDice.Object, mockAdjustmentSelector.Object);

            mockPartialRolls = new Dictionary <int, Mock <PartialRoll> >();
            feats            = new List <Feat>();
            constitution     = new Ability(AbilityConstants.Constitution);
            creatureType     = new CreatureType();

            creatureType.Name = "creature type";

            SetUpRolls(600.5, new[] { 9266, 42 });

            mockAdjustmentSelector.Setup(s => s.SelectFrom <int>(TableNameConstants.Adjustments.HitDice, creatureType.Name)).Returns(Die);

            mockDice.Setup(d => d.Roll(It.IsAny <int>())).Returns((int q) => mockPartialRolls[q].Object);
        }
 public LycanthropeBoarNaturalApplicator(
     ICollectionSelector collectionSelector,
     ICreatureDataSelector creatureDataSelector,
     IHitPointsGenerator hitPointsGenerator,
     Dice dice,
     ITypeAndAmountSelector typeAndAmountSelector,
     IFeatsGenerator featsGenerator,
     IAttacksGenerator attacksGenerator,
     ISavesGenerator savesGenerator,
     ISkillsGenerator skillsGenerator,
     ISpeedsGenerator speedsGenerator)
     : base(
         collectionSelector,
         creatureDataSelector,
         hitPointsGenerator,
         dice,
         typeAndAmountSelector,
         featsGenerator,
         attacksGenerator,
         savesGenerator,
         skillsGenerator,
         speedsGenerator)
 {
 }
 public CreatureGenerator(IAlignmentGenerator alignmentGenerator,
                          ICreatureVerifier creatureVerifier,
                          ICollectionSelector collectionsSelector,
                          IAbilitiesGenerator abilitiesGenerator,
                          ISkillsGenerator skillsGenerator,
                          IFeatsGenerator featsGenerator,
                          ICreatureDataSelector creatureDataSelector,
                          IHitPointsGenerator hitPointsGenerator,
                          IArmorClassGenerator armorClassGenerator,
                          ISavesGenerator savesGenerator,
                          JustInTimeFactory justInTimeFactory,
                          IAdvancementSelector advancementSelector,
                          IAttacksGenerator attacksGenerator,
                          ISpeedsGenerator speedsGenerator,
                          IEquipmentGenerator equipmentGenerator,
                          IMagicGenerator magicGenerator,
                          ILanguageGenerator languageGenerator)
 {
     this.alignmentGenerator   = alignmentGenerator;
     this.abilitiesGenerator   = abilitiesGenerator;
     this.skillsGenerator      = skillsGenerator;
     this.featsGenerator       = featsGenerator;
     this.creatureVerifier     = creatureVerifier;
     this.collectionsSelector  = collectionsSelector;
     this.creatureDataSelector = creatureDataSelector;
     this.hitPointsGenerator   = hitPointsGenerator;
     this.armorClassGenerator  = armorClassGenerator;
     this.savesGenerator       = savesGenerator;
     this.justInTimeFactory    = justInTimeFactory;
     this.advancementSelector  = advancementSelector;
     this.attacksGenerator     = attacksGenerator;
     this.speedsGenerator      = speedsGenerator;
     this.equipmentGenerator   = equipmentGenerator;
     this.magicGenerator       = magicGenerator;
     this.languageGenerator    = languageGenerator;
 }
        public void Setup()
        {
            mockDice = new Mock<Dice>();
            mockAdjustmentsSelector = new Mock<IAdjustmentsSelector>();
            mockCollectionsSelector = new Mock<ICollectionsSelector>();
            hitPointsGenerator = new HitPointsGenerator(mockDice.Object, mockAdjustmentsSelector.Object, mockCollectionsSelector.Object);

            mockPartialRolls = new Dictionary<int, Mock<PartialRoll>>();
            characterClass = new CharacterClass();
            race = new Race();
            feats = new List<Feat>();
            hitDice = new Dictionary<string, int>();

            characterClass.Level = 1;
            characterClass.Name = "class name";
            race.Metarace = "metarace";
            constitutionBonus = 0;
            hitDice[characterClass.Name] = 9266;
            hitDice["otherclassname"] = 42;

            SetUpRoll(0, 8, 0);
            SetUpRoll(1, 9266, 42);

            mockAdjustmentsSelector.Setup(s => s.SelectFrom(TableNameConstants.Set.Adjustments.ClassHitDice)).Returns(hitDice);
            mockDice.Setup(d => d.Roll(It.IsAny<int>())).Returns((int q) => mockPartialRolls[q].Object);
        }