private bool CheckWeaponAgainstOtherProficienciesAsIfMartial(IWeaponAttackStatistics weapon) { var martialize = new ExoticToMartialWeaponDecorator(weapon); var proficiencies = components.GetAll <WeaponProficiency>().Exclude(this); return(proficiencies.IsProficient(martialize)); }
private void SelectSkillFocus(ComponentContainer components) { var strategy = components.Get <CharacterStrategy>(); var skills = components.Get <SkillRanks>(); var skillTable = GetSkillTable(skills, strategy); DisableOptionsThatAlreadyHaveSkillFocus(skillTable, components.GetAll <SkillFocus>()); SetSkillFocus(skillTable.ChooseRandomly()); }
public void Execute(ComponentContainer components) { var options = _ragePowers .All() .GetAllQualified <RagePower>(components) .Exclude(components.GetAll <RagePower>()); var power = options.ChooseOne(); components.Add(power); }
public void Initialize(ComponentContainer components) { var trainings = components.GetAll <WeaponTraining>().Exclude(this); this.Group = EnumHelpers.GetValues <WeaponGroup>().Where(grp => !trainings.Any(already => already.Group == grp)).ChooseOne(); var offStats = components.Get <OffenseStats>(); offStats.AddWeaponModifier(WeaponAttackBonus); offStats.AddWeaponModifier(WeaponDamageBonus); }
public bool IsQualified(ComponentContainer components) { var spellcasting = components.GetAll <ISpellCasting>(); if (spellcasting.Empty()) { return(false); } return(spellcasting.Any(x => x.CasterLevel >= this.CasterLevel)); }
public bool IsQualified(ComponentContainer components) { var profs = components.GetAll <ArmorProficiency>(); foreach (var p in profs) { if (p.IsProficient(Proficiency)) { return(!CheckForNonProficiency); } } return(CheckForNonProficiency); }
public void Initialize(ComponentContainer components) { sourceClass = components.Get <ClassLevel>(); domains = components.GetAll <Domain>(); CastingAbility = components.Get <AbilityScores>().GetAbility(castingAbilityType); SpellList = new SpellList(); foreach (var d in domains) { for (int spellLevel = 0; spellLevel < d.Spells.Length; spellLevel++) { SpellList.Add(spellLevel + 1, d.Spells[spellLevel]); } } }
public void Execute(ComponentContainer components) { var spellCasting = components.Get <SpontaneousCasting>(); for (int spellLevel = 0; spellLevel <= spellCasting.GetHighestSpellLevelKnown(); spellLevel++) { var spellsToLearn = spellCasting.GetKnownSpellCount(spellLevel) - spellCasting.GetReadySpells(spellLevel).Count(); if (spellsToLearn > 0) { var spells = spellCasting.SpellList.GetSpells(spellLevel, components.GetAll <ISpellCastingRule>()) .Where(s => spellCasting.CanLearnSpell(spellLevel, s)) .Choose(spellsToLearn); foreach (var s in spells) { spellCasting.LearnSpell(s); } } } }
/// <summary> /// Determines whether this instance is qualified the specified character. /// </summary> /// <returns>true if the character is qualified</returns> /// <param name="character">Character to assess qualification.</param> public bool IsQualified(ComponentContainer components) { return(components.GetAll <IFeature>().Any(x => x.Name.EqualsIgnoreCase(SpecialAbilityName))); }
public void Initialize(ComponentContainer components) { druidLevels = components.GetAll <ClassLevel>().First(x => x.Class.Name.EqualsIgnoreCase("druid")); }
private IEnumerable <KiStrike> GetKiStrikes() { return(components.GetAll <KiStrike>()); }
public bool IsQualified(ComponentContainer components) { var sc = components.GetAll <ISpellCasting>(); return(sc.Any(x => x.SpellType == SpellType.Arcane)); }