コード例 #1
0
        private static void CreateGuidedHandFeat()
        {
            BlueprintFeature selectiveChannel = library.Get <BlueprintFeature>("fd30c69417b434d47b6b03b9c1f568ff");

            List <BlueprintFeature> guidedHandFeatures = new List <BlueprintFeature>();

            foreach (BlueprintFeature feature in Resources.FindObjectsOfTypeAll <BlueprintFeature>())
            {
                if (feature.Groups.Contains(FeatureGroup.Deities))
                {
                    AddFeatureOnClassLevel levelUpProficiencyFeature = feature.GetComponent <AddFeatureOnClassLevel>();
                    if (levelUpProficiencyFeature != null)
                    {
                        BlueprintFeature proficiencyFeature = levelUpProficiencyFeature.Feature;
                        WeaponCategory   category;
                        if (proficiencyFeature.AssetGuid == "7812ad3672a4b9a4fb894ea402095167")
                        {
                            category = WeaponCategory.UnarmedStrike;
                        }
                        else
                        {
                            AddProficiencies addedProficiency = proficiencyFeature.GetComponent <AddProficiencies>();
                            category = addedProficiency.WeaponProficiencies[0];
                        }

                        guidedHandFeatures.Add(Helpers.CreateFeature(
                                                   "GuidedHand" + feature.AssetGuid,
                                                   "Guided Hand (" + feature.name + ")",
                                                   "With your deity’s favored weapon, you can use your Wisdom modifier instead of your Strength or Dexterity modifier on attack rolls.",
                                                   Helpers.getGuid("GuidedHand" + feature.AssetGuid),
                                                   feature.Icon,
                                                   FeatureGroup.Feat,
                                                   feature.PrerequisiteFeature(),
                                                   Helpers.Create <PrerequisiteProficiency>(x => x.WeaponProficiencies = new WeaponCategory[] { category }),
                                                   selectiveChannel.PrerequisiteFeature(),
                                                   Helpers.Create <ReplaceAttackStatForWeaponCategoryLogic>(x =>
                        {
                            x.StatType       = StatType.Wisdom;
                            x.WeaponCategory = category;
                        })
                                                   ));
                    }
                }
            }

            library.AddFeats(guidedHandFeatures.ToArray());
        }
コード例 #2
0
        static private void FixSpecialComponents()
        {
            //fix abjuration resistance buffs
            foreach (string buffId in config.AbjurationResistanceBuffs)
            {
                var buff = library.Get <BlueprintBuff>(buffId);

                WizardAbjurationResistance    compOld = buff.GetComponent <WizardAbjurationResistance>();
                WizardAbjurationResistanceNeu compNeu = Helpers.Create <WizardAbjurationResistanceNeu>();
                compNeu.Type               = compOld.Type;
                compNeu.Pool               = compOld.Pool;
                compNeu.Value              = compOld.Value;
                compNeu.ValueMultiplier    = compOld.ValueMultiplier;
                compNeu.UseValueMultiplier = true;
                compNeu.UsePool            = true;
                compNeu.Wizards            = new BlueprintCharacterClass[] { wizard, ArcanistClass.arcanist };
                buff.RemoveComponent(compOld);
                buff.AddComponent(compNeu);
            }

            //fix conjuration enhance summoning
            var conj1_feat = library.Get <BlueprintFeature>("cee0f7edbd874a042952ee150f878b84");

            conj1_feat.RemoveComponent(conj1_feat.GetComponent <AddClassLevelToSummonDuration>());
            AddClassLevelToSummonDurationNeu compNeu2 = Helpers.Create <AddClassLevelToSummonDurationNeu>();

            compNeu2.CharacterClasses = new BlueprintCharacterClass[] { wizard, ArcanistClass.arcanist };
            compNeu2.Half             = true;
            conj1_feat.AddComponent(compNeu2);

            //fix evocation intense spell
            var evo1_feat = library.Get <BlueprintFeature>("c46512b796216b64899f26301241e4e6");

            evo1_feat.RemoveComponent(evo1_feat.GetComponent <IntenseSpells>());
            IntenseSpellsNeu compNeu3 = Helpers.Create <IntenseSpellsNeu>();

            compNeu3.Wizards = new BlueprintCharacterClass[] { wizard, ArcanistClass.arcanist };
            evo1_feat.AddComponent(compNeu3);

            //fix necromancy turn undead cl
            var necro1_feat = library.Get <BlueprintFeature>("927707dce06627d4f880c90b5575125f");
            ReplaceCasterLevelOfAbility compOld4 = necro1_feat.GetComponent <ReplaceCasterLevelOfAbility>();

            compOld4.AdditionalClasses = new BlueprintCharacterClass[] { ArcanistClass.arcanist };

            //fix transmutation physical enhance
            foreach (string buffId in config.TransmutationPhysicalEnhanceBuffs)
            {
                var buff = library.Get <BlueprintBuff>(buffId);

                AddStatBonusScaled compOld5 = buff.GetComponent <AddStatBonusScaled>();
                AddStatBonusScaledTransmutationSpecialized compNeu5 = Helpers.Create <AddStatBonusScaledTransmutationSpecialized>();
                compNeu5.classes    = new BlueprintCharacterClass[] { wizard, ArcanistClass.arcanist };
                compNeu5.Descriptor = compOld5.Descriptor;
                compNeu5.Stat       = compOld5.Stat;
                compNeu5.Value      = compOld5.Value;
                buff.RemoveComponent(buff.GetComponent <AddStatBonusScaled>());
            }

            //fix transmutation polymorphy
            var trans8_feat = library.Get <BlueprintFeature>("aeb56418768235640a3ee858d5ee05e8");
            AddFeatureOnClassLevel compOld6 = trans8_feat.GetComponent <AddFeatureOnClassLevel>();

            compOld6.AdditionalClasses = new BlueprintCharacterClass[] { ArcanistClass.arcanist };
        }
コード例 #3
0
 static bool Prefix(AddFeatureOnClassLevel __instance)
 {
     ReplaceCasterLevelOfAbility_CalculateClassLevel_Patch.currentFact = __instance.Fact;
     return(true);
 }