Beispiel #1
0
        public static string GetSchoolStr(SpellSchool sc)
        {
            switch (sc)
            {
            case SpellSchool.Abjuration:
                return("Abjuration");

            case SpellSchool.Conjuration:
                return("Conjuration");

            case SpellSchool.Divination:
                return("Divination");

            case SpellSchool.Enchantment:
                return("Enchantment");

            case SpellSchool.Evocation:
                return("Evocation");

            case SpellSchool.Illusion:
                return("Illusion");

            case SpellSchool.Necromancy:
                return("Necromancy");

            case SpellSchool.Transmutation:
                return("Transmutation");

            case SpellSchool.Universalist:
                return("Universal");

            default:
                return("None");
            }
        }
Beispiel #2
0
        static void createOppositionResearch()
        {
            var opposition_schools = library.Get <BlueprintFeatureSelection>("6c29030e9fea36949877c43a6f94ff31").AllFeatures;
            var icon = Helpers.GetIcon("68a23a419b330de45b4c3789649b5b41");

            opposition_research = Helpers.CreateFeatureSelection("OppositionResearchWizardDiscoveryFeature",
                                                                 "Opposition Research",
                                                                 "Select one Wizard opposition school; preparing spells of this school now only requires one spell slot of the appropriate level instead of two.",
                                                                 "",
                                                                 icon,
                                                                 FeatureGroup.Feat,
                                                                 Helpers.PrerequisiteFeaturesFromList(opposition_schools),
                                                                 Helpers.PrerequisiteClassLevel(wizard, 9)
                                                                 );
            opposition_research.AddComponent(Helpers.PrerequisiteNoFeature(opposition_research));

            foreach (BlueprintFeature opposition_school in opposition_schools)
            {
                SpellSchool school  = opposition_school.GetComponent <AddOppositionSchool>().School;
                var         feature = Helpers.CreateFeature(school.ToString() + "OppositionResearchWizardDiscoveryFeature",
                                                            "Opposition Research: " + school.ToString(),
                                                            opposition_research.Description,
                                                            "",
                                                            opposition_school.Icon,
                                                            FeatureGroup.WizardFeat,
                                                            Helpers.Create <RemoveFeatureOnApply>(f => f.Feature  = opposition_school),
                                                            Helpers.Create <RemoveOppositionSchool>(s => s.school = school),
                                                            Helpers.PrerequisiteFeature(opposition_school),
                                                            Helpers.PrerequisiteClassLevel(wizard, 9)
                                                            );
                opposition_research.AllFeatures = opposition_research.AllFeatures.AddToArray(feature);
            }

            addWizardDiscovery(opposition_research);
        }
Beispiel #3
0
        public static RemoveOppositionSchool Create(BlueprintCharacterClass @class, SpellSchool school)
        {
            var result = Helpers.Create <RemoveOppositionSchool>();

            result.CharacterClass = @class;
            result.School         = school;
            return(result);
        }
 public MagicEffectData(System.IO.BinaryReader reader)
 {
     spellSchool = (SpellSchool)reader.ReadInt32();
     baseCost    = reader.ReadSingle();
     flags       = (Flags)reader.ReadInt32();
     red         = reader.ReadInt32();
     green       = reader.ReadInt32();
     blue        = reader.ReadInt32();
     speedX      = reader.ReadSingle();
     sizeX       = reader.ReadSingle();
     sizeCap     = reader.ReadSingle();
 }
Beispiel #5
0
 static private void FixOppositionSchoolFeats()
 {
     //fix opposition school feats so that they can function on arcanist class
     foreach (string featId in config.SchoolOppositionFeatureIds)
     {
         BlueprintFeature feat   = library.Get <BlueprintFeature>(featId);
         SpellSchool      school = feat.GetComponent <AddOppositionSchool>().School;
         feat.AddComponent(Helpers.Create <AddOppositionSchool>(a => {
             a.CharacterClass = ArcanistClass.arcanist;
             a.School         = school;
         }));
     }
 }
Beispiel #6
0
        /// <summary>
        /// Creates a copy of <see cref="SpellModel"/>
        /// </summary>
        public SpellModel(SpellModel spellModel) : base(spellModel)
        {
            _level       = spellModel.Level;
            _spellSchool = spellModel.SpellSchool;
            _isRitual    = spellModel.IsRitual;
            _castingTime = spellModel.CastingTime;
            _range       = spellModel.Range;
            _components  = spellModel.Components;
            _duration    = spellModel.Duration;
            _classes     = spellModel.Classes;
            List <string> _text  = new List <string>(spellModel.TextCollection);
            List <string> _rolls = new List <string>(spellModel.Rolls);

            _xml = spellModel.XML;
        }
Beispiel #7
0
 /// <summary>
 /// Sets the level of a particular school for this spell. If ChooseSchool is true,
 /// the lowest level will be treated as the level count. Otherwise, all levels
 /// will be added up to get the count.
 /// </summary>
 /// <param name="school">The school for this level</param>
 /// <param name="level">The level</param>
 public void SetSchoolLevel(SpellSchool school, int level)
 {
     if (levels.ContainsKey(school))
     {
         levels[school] = level;
         if (levels[school] <= 0)
         {
             levels.Remove(school);
         }
     }
     else if (level > 0)
     {
         levels.Add(school, level);
     }
     FieldChanged("Level");
 }
        public Spell(int index, string row)
        {
            Index = index;

            cells = row.Split('\t');
            Name  = cells[0];

            int type = 0;

            for (int i = 3; i < 7; i++)
            {
                if (cells[i] == "x")
                {
                    type |= (1 << (i - 3));
                }
            }
            MagicSchool = (SpellSchool)type;
        }
Beispiel #9
0
        static void createImplements()
        {
            first_implement_selection = Helpers.CreateFeatureSelection("RelicHunterBaseImplementSelection",
                                                                       "Relics",
                                                                       "At 1st level, a relic hunter gains the occultist’s implements class feature and learns to use two occultist implement schools as relic schools. At 4th level and every 3 levels thereafter, the relic hunter learns to use one additional relic school drawn from the same source, gaining access to that school’s resonant power and base focus power and opening up that school’s focus powers for her to select. Like an occultist, a relic hunter can select the same school twice, but it is far less useful for her to do so.\n"
                                                                       + "Relics do not need to be magic items, and non-magical relics do not take up a magic item slot. Relics that are not magic items are often of some religious significance to the relic hunter or her church, such as the battered shield of a saint, a bishop’s robe, or the finger bone of a church martyr.",
                                                                       "",
                                                                       null,
                                                                       FeatureGroup.None
                                                                       );
            //initialize implement engines
            var schools = new SpellSchool[] { SpellSchool.Abjuration, SpellSchool.Conjuration, SpellSchool.Divination, SpellSchool.Enchantment,
                                              SpellSchool.Evocation, SpellSchool.Illusion, SpellSchool.Necromancy, SpellSchool.Transmutation,
                                              (SpellSchool)Occultist.Panoply.TrappingOfTheWarrior, (SpellSchool)Occultist.Panoply.MagesParaphernalia,
                                              (SpellSchool)Occultist.Panoply.SaintsRegalia, (SpellSchool)Occultist.Panoply.PerformersAccoutrements };

            foreach (var s in schools)
            {
                if (!Occultist.isPanoply(s))
                {
                    implement_factories[s] = new ImplementsEngine("RelicHunter", deific_focus_resource[s],
                                                                  getOccultistArray(),
                                                                  StatType.Wisdom);
                }
                else
                {
                    implement_factories[s] = new ImplementsEngine("RelicHunter", deific_focus_resource[s],
                                                                  getOccultistArray(),
                                                                  StatType.Wisdom);
                }
            }

            Dictionary <SpellSchool, (string flavor, BlueprintFeature base_power, BlueprintBuff[] resonant_power_buffs)> implement_data
                = new Dictionary <SpellSchool, (string, BlueprintFeature, BlueprintBuff[])>
                {
                { SpellSchool.Abjuration, ("Abjuration implements are objects associated with protection and wards.",
                                           implement_factories[SpellSchool.Abjuration].createMindBarrier(),
                                           new BlueprintBuff[] { implement_factories[SpellSchool.Abjuration].createWardingTalisman() }
                                           ) },
 public void removeinvestedFocusBonus(SpellSchool school, int amount = 1)
 {
     invested_focus_bonus[school] -= amount;
 }
Beispiel #11
0
 public void UpdateSchool(SpellSchool school)
 {
     this.School = school;
 }
 public void investFocus(SpellSchool school, int amount = 1)
 {
     invested_focus[school] += amount;
     invested_focus[SpellSchool.Universalist] -= amount;
 }
 public void addinvestedFocusBonus(SpellSchool school, int amount = 1)
 {
     invested_focus_bonus[school] += amount;
 }
Beispiel #14
0
 public static string SchoolName(this SpellSchool dir)
 {
     return(dir.GetAttribute <SpellSchoolAttribute>().schoolName);
 }
Beispiel #15
0
 public static Color Tint(this SpellSchool dir)
 {
     return(dir.GetAttribute <SpellSchoolAttribute>().tint);
 }
Beispiel #16
0
        public void addParametrizedFeatureSelection(BlueprintParametrizedFeature feature, SpellSchool school)
        {
            var spell_focus = new SelectionEntry();

            spell_focus.IsParametrizedFeature = true;
            spell_focus.ParametrizedFeature   = feature;
            spell_focus.ParamSpellSchool      = school;
            acl.Selections = acl.Selections.AddToArray(spell_focus);
        }
Beispiel #17
0
 public static Effect SpellLevelAbsorption(int maxSpellLevel, int totalSpellsAbsorbed = 0, SpellSchool spellSchool = SpellSchool.General)
 => NWScript.EffectSpellLevelAbsorption(maxSpellLevel, totalSpellsAbsorbed, (int)spellSchool);
 private string AsSchoolLabel(SpellSchool school)
 {
     switch (school)
     {
         case SpellSchool.Abjuration:
             return "Abj";
         case SpellSchool.Conjuration:
             return "Inv";
         case SpellSchool.Divination:
             return "Div";
         case SpellSchool.Enchantment:
             return "Enc";
         case SpellSchool.Evocation:
             return "Évo";
         case SpellSchool.Illusion:
             return "Ill";
         case SpellSchool.Necromancy:
             return "Nec";
         case SpellSchool.Transmutation:
             return "Tra";
         case SpellSchool.Universal:
             return "Uni";
         default:
             throw new NotSupportedException(school.ToString());
     }
 }
Beispiel #19
0
 public Wizard(SpellSchool school)
 {
     this.specialization = school;
     this.spellBook = new List<Spell>();
 }
Beispiel #20
0
 public Spell(string name, SpellSchool school)
 {
     this.name = name;
     this.school = school;
 }
Beispiel #21
0
 public static Effect SpellFailure(int failPct, SpellSchool spellSchool = SpellSchool.General)
 => NWScript.EffectSpellFailure(failPct, (int)spellSchool);
Beispiel #22
0
 private bool IsSchool(SpellModel spellModel, SpellSchool school)
 {
     return(school == SpellSchool.None || spellModel.SpellSchool == school);
 }