Esempio n. 1
0
 public GoodsGenerator(Dice dice, ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector,
                       ICollectionsSelector attributesSelector)
 {
     this.dice = dice;
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
     this.attributesSelector = attributesSelector;
 }
        public void Setup()
        {
            mockInnerSelector = new Mock<IPercentileSelector>();
            selector = new TypeAndAmountPercentileSelector(mockInnerSelector.Object);
            tableName = "table name";

            mockInnerSelector.Setup(m => m.SelectFrom(tableName)).Returns("type/9266");
        }
 public MagicalArmorGenerator(ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector, IPercentileSelector percentileSelector, ICollectionsSelector collectionsSelector, ISpecialAbilitiesGenerator specialAbilitiesSelector, ISpecificGearGenerator specificGearGenerator)
 {
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
     this.percentileSelector       = percentileSelector;
     this.collectionsSelector      = collectionsSelector;
     this.specialAbilitiesSelector = specialAbilitiesSelector;
     this.specificGearGenerator    = specificGearGenerator;
 }
Esempio n. 4
0
 public ItemsGenerator(ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector, IMundaneItemGeneratorRuntimeFactory mundaneItemGeneratorFactory, IPercentileSelector percentileSelector, IMagicalItemGeneratorRuntimeFactory magicalItemGeneratorFactory, IRangeAttributesSelector rangeAttributesSelector)
 {
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
     this.mundaneItemGeneratorFactory     = mundaneItemGeneratorFactory;
     this.percentileSelector          = percentileSelector;
     this.magicalItemGeneratorFactory = magicalItemGeneratorFactory;
     this.rangeAttributesSelector     = rangeAttributesSelector;
 }
 public RingGenerator(IPercentileSelector percentileSelector, ICollectionsSelector attributesSelector, ISpellGenerator spellGenerator, IChargesGenerator chargesGenerator, ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector)
 {
     this.percentileSelector = percentileSelector;
     this.attributesSelector = attributesSelector;
     this.spellGenerator     = spellGenerator;
     this.chargesGenerator   = chargesGenerator;
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
 }
Esempio n. 6
0
 public WondrousItemGenerator(IPercentileSelector percentileSelector, ICollectionsSelector attributesSelector, IChargesGenerator chargesGenerator, Dice dice, ISpellGenerator spellGenerator, ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector)
 {
     this.percentileSelector = percentileSelector;
     this.attributesSelector = attributesSelector;
     this.chargesGenerator   = chargesGenerator;
     this.dice           = dice;
     this.spellGenerator = spellGenerator;
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
 }
Esempio n. 7
0
 public PotionGenerator(
     ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector,
     ICollectionSelector collectionSelector,
     IReplacementSelector replacementSelector)
 {
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
     this.collectionSelector  = collectionSelector;
     this.replacementSelector = replacementSelector;
 }
        public void Setup()
        {
            mockPercentileSelector = new Mock <IPercentileSelector>();
            mockDice = new Mock <Dice>();
            typeAndAmountPercentileSelector = new TypeAndAmountPercentileSelector(mockPercentileSelector.Object, mockDice.Object);

            mockPercentileSelector.Setup(p => p.SelectFrom("table name")).Returns("type,amount");
            mockDice.Setup(d => d.Roll("amount").AsSum()).Returns(9266);
        }
Esempio n. 9
0
 public RodGenerator(ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector, ICollectionsSelector attributesSelector,
                     IChargesGenerator chargesGenerator, IBooleanPercentileSelector booleanPercentileSelector, ISpecialAbilitiesGenerator specialAbilitiesGenerator)
 {
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
     this.attributesSelector        = attributesSelector;
     this.chargesGenerator          = chargesGenerator;
     this.booleanPercentileSelector = booleanPercentileSelector;
     this.specialAbilitiesGenerator = specialAbilitiesGenerator;
 }
        public void Setup()
        {
            mockPercentileSelector = new Mock <ITreasurePercentileSelector>();
            mockDice = new Mock <Dice>();
            typeAndAmountPercentileSelector = new TypeAndAmountPercentileSelector(mockPercentileSelector.Object, mockDice.Object);

            mockPercentileSelector.Setup(p => p.SelectFrom("table name")).Returns("type,amount");
            SetUpRoll("amount", 9266);
        }
Esempio n. 11
0
        public FilterVerifier(ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector, ICollectionSelector collectionSelector, IEncounterCollectionSelector encounterCollectionSelector, IRollSelector rollSelector)
        {
            this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
            this.collectionSelector = collectionSelector;
            this.encounterCollectionSelector = encounterCollectionSelector;
            this.rollSelector = rollSelector;

            challengeRatingRegex = new Regex(RegexConstants.ChallengeRatingPattern);
            descriptionRegex = new Regex(RegexConstants.DescriptionPattern);
        }
Esempio n. 12
0
 public SpecificGearGenerator(ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector, ICollectionsSelector collectionsSelector, IChargesGenerator chargesGenerator, IPercentileSelector percentileSelector, ISpellGenerator spellGenerator, IBooleanPercentileSelector booleanPercentileSelector, Dice dice, ISpecialAbilitiesGenerator specialAbilitiesGenerator)
 {
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
     this.collectionsSelector             = collectionsSelector;
     this.chargesGenerator          = chargesGenerator;
     this.percentileSelector        = percentileSelector;
     this.spellGenerator            = spellGenerator;
     this.booleanPercentileSelector = booleanPercentileSelector;
     this.dice = dice;
     this.specialAbilitiesGenerator = specialAbilitiesGenerator;
 }
Esempio n. 13
0
 public StaffGenerator(ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector,
                       IChargesGenerator chargesGenerator,
                       ICollectionSelector collectionsSelector,
                       ISpecialAbilitiesGenerator specialAbilitiesGenerator,
                       JustInTimeFactory justInTimeFactory)
 {
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
     this.chargesGenerator          = chargesGenerator;
     this.collectionsSelector       = collectionsSelector;
     this.specialAbilitiesGenerator = specialAbilitiesGenerator;
     this.justInTimeFactory         = justInTimeFactory;
 }
Esempio n. 14
0
 public ItemsGenerator(
     ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector,
     JustInTimeFactory justInTimeFactory,
     ITreasurePercentileSelector percentileSelector,
     IRangeDataSelector rangeDataSelector,
     ICollectionSelector collectionSelector)
 {
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
     this.justInTimeFactory  = justInTimeFactory;
     this.percentileSelector = percentileSelector;
     this.rangeDataSelector  = rangeDataSelector;
     this.collectionSelector = collectionSelector;
 }
Esempio n. 15
0
 public RingGenerator(
     ICollectionSelector collectionsSelector,
     ISpellGenerator spellGenerator,
     IChargesGenerator chargesGenerator,
     ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector,
     IReplacementSelector replacementSelector)
 {
     this.collectionsSelector             = collectionsSelector;
     this.spellGenerator                  = spellGenerator;
     this.chargesGenerator                = chargesGenerator;
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
     this.replacementSelector             = replacementSelector;
 }
Esempio n. 16
0
        public EncounterGenerator(ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector, IRollSelector rollSelector, IPercentileSelector percentileSelector,
            ICollectionSelector collectionSelector, Dice dice, IEncounterCharacterGenerator encounterCharacterGenerator, IEncounterTreasureGenerator encounterTreasureGenerator,
            IFilterVerifier filterVerifier, IEncounterCollectionSelector creatureCollectionSelector)
        {
            this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
            this.rollSelector = rollSelector;
            this.percentileSelector = percentileSelector;
            this.collectionSelector = collectionSelector;
            this.dice = dice;
            this.encounterTreasureGenerator = encounterTreasureGenerator;
            this.encounterCharacterGenerator = encounterCharacterGenerator;
            this.filterVerifier = filterVerifier;
            this.creatureCollectionSelector = creatureCollectionSelector;

            challengeRatingRegex = new Regex(RegexConstants.ChallengeRatingPattern);
            subTypeRegex = new Regex(RegexConstants.DescriptionPattern);
        }
Esempio n. 17
0
 public SpecificGearGenerator(ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector,
                              ICollectionSelector collectionsSelector,
                              IChargesGenerator chargesGenerator,
                              ITreasurePercentileSelector percentileSelector,
                              ISpellGenerator spellGenerator,
                              ISpecialAbilitiesGenerator specialAbilitiesGenerator,
                              JustInTimeFactory justInTimeFactory,
                              IReplacementSelector replacementSelector)
 {
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
     this.collectionsSelector             = collectionsSelector;
     this.chargesGenerator          = chargesGenerator;
     this.percentileSelector        = percentileSelector;
     this.spellGenerator            = spellGenerator;
     this.specialAbilitiesGenerator = specialAbilitiesGenerator;
     this.justInTimeFactory         = justInTimeFactory;
     this.replacementSelector       = replacementSelector;
 }
Esempio n. 18
0
 public GoodsGenerator(ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector, ICollectionSelector collectionSelector)
 {
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
     this.collectionSelector = collectionSelector;
 }
Esempio n. 19
0
 public void Setup()
 {
     typeAndAmountPercentileSelector = GetNewInstanceOf <ITypeAndAmountPercentileSelector>();
     replacementSelector             = GetNewInstanceOf <IReplacementSelector>();
     percentileSelector = GetNewInstanceOf <IPercentileSelector>();
 }
 public AlchemicalItemGenerator(ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector)
 {
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
 }
 public PotionGenerator(ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector, IPercentileSelector percentileSelector)
 {
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
     this.percentileSelector = percentileSelector;
 }
 public CoinGenerator(ITypeAndAmountPercentileSelector typeAndAmountPercentileSelector)
 {
     this.typeAndAmountPercentileSelector = typeAndAmountPercentileSelector;
 }