Example #1
0
        public void NonCastersDoNothing()
        {
            var character     = new CharacterSheet(CharacterStrategy.Default());
            var prepareSpells = new PrepareSpells();

            prepareSpells.ExecuteStep(character);
        }
Example #2
0
        public void IfCasterHasNoCantripsShouldStillPrepareLevelOneSpells()
        {
            var character  = CharacterTestTemplates.Ranger().WithDivineCastingNoOrisons();
            var casting    = character.Get <ISpellCasting>();
            var prepSpells = new PrepareSpells();

            prepSpells.ExecuteStep(character);
            Assert.NotEmpty(casting.GetReadySpells(1));
        }
Example #3
0
        public void SelectsUniqueListOfSpellsDependingOnAvailableSlots()
        {
            var character    = CharacterTestTemplates.Wizard().WithWizardCasting().FillSpellbook();
            var spellCasting = character.Get <ISpellCasting>();

            var prepareSpells = new PrepareSpells();

            prepareSpells.ExecuteStep(character);
            Assert.Equal(3, spellCasting.GetReadySpells(0).Count());
            Assert.Equal(2, spellCasting.GetReadySpells(1).Count());
        }
Example #4
0
        public void PreparesSpellsFromMultipleSpellCastingClassesIfAvailable()
        {
            var character = CharacterTestTemplates.Wizard().WithWizardCasting().WithDivineCasting().FillSpellbook();
            var scWizard  = character.Get <WizardCasting>();
            var scCleric  = character.Get <DivineCasting>();

            var prepSpells = new PrepareSpells();

            prepSpells.ExecuteStep(character);
            Assert.Equal(3, scWizard.GetReadySpells(0).Count());
            Assert.Equal(3, scCleric.GetReadySpells(0).Count());
        }