Exemplo n.º 1
0
        public HalfFiendApplicator(
            ICollectionSelector collectionSelector,
            ITypeAndAmountSelector typeAndAmountSelector,
            ISpeedsGenerator speedsGenerator,
            IAttacksGenerator attacksGenerator,
            IFeatsGenerator featsGenerator,
            ISkillsGenerator skillsGenerator,
            Dice dice,
            IMagicGenerator magicGenerator)
        {
            this.collectionSelector    = collectionSelector;
            this.typeAndAmountSelector = typeAndAmountSelector;
            this.speedsGenerator       = speedsGenerator;
            this.attacksGenerator      = attacksGenerator;
            this.featsGenerator        = featsGenerator;
            this.skillsGenerator       = skillsGenerator;
            this.dice           = dice;
            this.magicGenerator = magicGenerator;

            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.Ooze,
                CreatureConstants.Types.Plant,
                CreatureConstants.Types.Vermin,
            };
        }
Exemplo n.º 2
0
 public HalfDragonRedApplicator(
     ICollectionSelector collectionSelector,
     ISpeedsGenerator speedsGenerator,
     IAttacksGenerator attacksGenerator,
     IFeatsGenerator featsGenerator,
     ISkillsGenerator skillsGenerator,
     IAlignmentGenerator alignmentGenerator,
     Dice dice,
     IMagicGenerator magicGenerator)
     : base(collectionSelector, speedsGenerator, attacksGenerator, featsGenerator, skillsGenerator, alignmentGenerator, dice, magicGenerator)
 {
 }
Exemplo n.º 3
0
        public CharacterGenerator(IAlignmentGenerator alignmentGenerator, ICharacterClassGenerator characterClassGenerator, IRaceGenerator raceGenerator,
            IAdjustmentsSelector adjustmentsSelector, IRandomizerVerifier randomizerVerifier, IPercentileSelector percentileSelector,
            IAbilitiesGenerator abilitiesGenerator, ICombatGenerator combatGenerator, IEquipmentGenerator equipmentGenerator,
            IMagicGenerator magicGenerator, Generator generator, ICollectionsSelector collectionsSelector)
        {
            this.alignmentGenerator = alignmentGenerator;
            this.characterClassGenerator = characterClassGenerator;
            this.raceGenerator = raceGenerator;
            this.abilitiesGenerator = abilitiesGenerator;
            this.combatGenerator = combatGenerator;
            this.equipmentGenerator = equipmentGenerator;
            this.generator = generator;

            this.adjustmentsSelector = adjustmentsSelector;
            this.randomizerVerifier = randomizerVerifier;
            this.percentileSelector = percentileSelector;
            this.magicGenerator = magicGenerator;
            this.collectionsSelector = collectionsSelector;
        }
Exemplo n.º 4
0
        public void Setup()
        {
            mockSpellsGenerator       = new Mock <ISpellsGenerator>();
            mockCollectionsSelector   = new Mock <ICollectionSelector>();
            mockAdjustmentsSelector   = new Mock <IAdjustmentsSelector>();
            mockTypeAndAmountSelector = new Mock <ITypeAndAmountSelector>();
            magicGenerator            = new MagicGenerator(
                mockSpellsGenerator.Object,
                mockCollectionsSelector.Object,
                mockAdjustmentsSelector.Object,
                mockTypeAndAmountSelector.Object);
            alignment                = new Alignment();
            abilities                = new Dictionary <string, Ability>();
            equipment                = new Equipment();
            arcaneSpellFailures      = new Dictionary <string, int>();
            classesThatPrepareSpells = new List <string>();
            caster = new TypeAndAmountSelection();

            caster.Type   = "class name";
            caster.Amount = 42;

            classesThatPrepareSpells.Add(caster.Type);
            classesThatPrepareSpells.Add("other class");

            abilities["casting ability"]           = new Ability("casting ability");
            abilities["casting ability"].BaseScore = 11;
            abilities["other ability"]             = new Ability("other ability");
            abilities["other ability"].BaseScore   = 11;

            mockTypeAndAmountSelector
            .Setup(s => s.Select(TableNameConstants.TypeAndAmount.Casters, "creature"))
            .Returns(new[] { caster });

            mockAdjustmentsSelector
            .Setup(s => s.SelectFrom <int>(TableNameConstants.Adjustments.ArcaneSpellFailures, It.IsAny <string>()))
            .Returns((string table, string name) => arcaneSpellFailures[name]);
            mockCollectionsSelector
            .Setup(s => s.SelectFrom(TableNameConstants.Collection.CasterGroups, GroupConstants.PreparesSpells))
            .Returns(classesThatPrepareSpells);

            mockCollectionsSelector.Setup(s => s.SelectFrom(TableNameConstants.Collection.AbilityGroups, $"{caster.Type}:Spellcaster")).Returns(new[] { "casting ability" });
        }
Exemplo n.º 5
0
        public CelestialCreatureApplicator(IAttacksGenerator attackGenerator, IFeatsGenerator featGenerator, ICollectionSelector collectionSelector, IMagicGenerator magicGenerator)
        {
            this.attackGenerator    = attackGenerator;
            this.featGenerator      = featGenerator;
            this.collectionSelector = collectionSelector;
            this.magicGenerator     = magicGenerator;

            creatureTypes = new[]
            {
                CreatureConstants.Types.Aberration,
                CreatureConstants.Types.Animal,
                CreatureConstants.Types.Dragon,
                CreatureConstants.Types.Fey,
                CreatureConstants.Types.Giant,
                CreatureConstants.Types.Humanoid,
                CreatureConstants.Types.MagicalBeast,
                CreatureConstants.Types.MonstrousHumanoid,
                CreatureConstants.Types.Plant,
                CreatureConstants.Types.Vermin,
            };
        }
Exemplo n.º 6
0
 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;
 }
Exemplo n.º 7
0
        public void Setup()
        {
            mockSpellsGenerator = new Mock<ISpellsGenerator>();
            mockAnimalGenerator = new Mock<IAnimalGenerator>();
            mockCollectionsSelector = new Mock<ICollectionsSelector>();
            mockAdjustmentsSelector = new Mock<IAdjustmentsSelector>();
            magicGenerator = new MagicGenerator(mockSpellsGenerator.Object, mockAnimalGenerator.Object, mockCollectionsSelector.Object, mockAdjustmentsSelector.Object);
            characterClass = new CharacterClass();
            feats = new List<Feat>();
            alignment = new Alignment();
            race = new Race();
            stats = new Dictionary<string, Stat>();
            equipment = new Equipment();
            arcaneSpellFailures = new Dictionary<string, int>();
            classesThatPrepareSpells = new List<string>();

            characterClass.Name = "class name";
            classesThatPrepareSpells.Add(characterClass.Name);
            classesThatPrepareSpells.Add("other class");

            mockAdjustmentsSelector.Setup(s => s.SelectFrom(TableNameConstants.Set.Adjustments.ArcaneSpellFailures)).Returns(arcaneSpellFailures);
            mockCollectionsSelector.Setup(s => s.SelectFrom(TableNameConstants.Set.Collection.ClassNameGroups, GroupConstants.PreparesSpells)).Returns(classesThatPrepareSpells);
        }