コード例 #1
0
        public void Execute(Utility.ComponentContainer components)
        {
            // Select a simple weapon
            var choice = GatewayProvider.Get <Weapon>().SimpleWeapons().ChooseOne();

            components.Add(new WeaponProficiency(choice.ProficiencyName));
        }
コード例 #2
0
        public void Execute(Utility.ComponentContainer components)
        {
            var list   = new IAbility[] { new DivineBondMount(), new DivineBondWeapon() };
            var option = list.ChooseOne();

            components.Add(option);
        }
コード例 #3
0
        public void Execute(Utility.ComponentContainer components)
        {
            RogueTalent selected = null;

            var characterTalents = components.GetAll <RogueTalent>();
            var availableTalents = this.rogueTalentGateway.Where(talent =>
                                                                 (!talent.IsAdvancedTalent ||
                                                                  talent.IsAdvancedTalent == selectAdvanced) &&
                                                                 characterTalents.None(x => x.Matches(talent.Name)));

            //Prefer Advanced Talents

            var advanced = availableTalents.Where(x => x.IsAdvancedTalent);

            if (advanced.Count() > 0)
            {
                selected = advanced.ChooseOne();
            }
            else
            {
                selected = availableTalents.ChooseOne();
            }

            components.Add(selected);
        }
コード例 #4
0
        public void Execute(Utility.ComponentContainer components)
        {
            var familiar = familiars.ChooseOne();
            var summon   = new SummonFamiliar(familiar);

            components.Add(summon);
        }
コード例 #5
0
        public void Execute(Utility.ComponentContainer components)
        {
            var combatStyle = components.Get <CombatStyle>();
            var rangerLevel = components.Get <ClassLevel>();
            var token       = new FeatToken(combatStyle.GetFeats(rangerLevel.Level), true);

            components.Add(token);
        }
コード例 #6
0
        public void Execute(Utility.ComponentContainer components)
        {
            var wizardCasting = components.Get <WizardCasting>();
            var school        = arcaneGateway.ChooseOne();

            wizardCasting.SetFocusSchool(school);
            components.Add(school);
        }
コード例 #7
0
        public void Execute(Utility.ComponentContainer components)
        {
            var bloodline      = components.Get <Bloodline>();
            var bloodlineLevel = components.Get <ClassLevel>();
            var powerType      = bloodline.GetPower(bloodlineLevel.Level);
            var power          = Reflector.Instantiate <IBloodlinePower>(powerType);

            components.Add(power);
        }
コード例 #8
0
 public void Execute(Utility.ComponentContainer components)
 {
     for (int i = 0; i < domainCount; i++)
     {
         var currentDoms = components.GetAll <Domain>();
         var domains     = domainsGateway.Where(d => !currentDoms.Contains(d));
         var domain      = domains.ChooseOne();
         components.Add(domain);
     }
 }
コード例 #9
0
        public void Execute(Utility.ComponentContainer components)
        {
            var fav = components.Get <FavoredTerrain>();

            if (fav == null)
            {
                fav = new FavoredTerrain();
                components.Add(fav);
            }
            fav.Add(this.terrainTypeGateway.Where(x => !fav.TerrainTypes.Contains(x)).ChooseOne());
        }
コード例 #10
0
        public void Execute(Utility.ComponentContainer components)
        {
            var domains = components.GetAll <Domain>();

            if (domains.Empty())
            {
                return;
            }

            var domainSpells = new DomainCasting(configuration);

            components.Add(domainSpells);
        }
コード例 #11
0
        public void Execute(Utility.ComponentContainer components)
        {
            var favoredEnemy = components.Get <FavoredEnemy>();

            if (favoredEnemy == null)
            {
                favoredEnemy = new FavoredEnemy();
                components.Add(favoredEnemy);
            }
            var type = this.creatureTypeGateway.Where(x => !favoredEnemy.CreatureTypes.Contains(x)).ChooseOne();

            favoredEnemy.Add(type);
        }
コード例 #12
0
        public void Execute(Utility.ComponentContainer components)
        {
            var mercies = components.Get <Mercies>();

            if (mercies == null)
            {
                mercies = new Mercies();
                components.Add(mercies);
            }

            var paladinLevel = components.Get <ClassLevel>();

            var selected = mercyGateway.Where(x => x.Level <= paladinLevel.Level && !mercies.MercyList.Contains(x)).ChooseOne();

            mercies.Add(selected);
        }
コード例 #13
0
 public void Execute(Utility.ComponentContainer components)
 {
     components.Add(bloodlines.ChooseOne());
 }
コード例 #14
0
        public void Execute(Utility.ComponentContainer components)
        {
            var combat = combatStyleGateway.ChooseOne();

            components.Add(combat);
        }
コード例 #15
0
        public void Execute(Utility.ComponentContainer components)
        {
            var bloodline = components.Get <Bloodline>();

            components.Add(new FeatToken(bloodline.GetBonusFeats()));
        }