Ejemplo n.º 1
0
        static BlueprintFeature CreateWarlordReborn(BlueprintProgression bloodline)
        {
            var transformationSpell = library.Get <BlueprintAbility>("27203d62eb3d4184c9aced94f22e1806");

            var resource = Helpers.CreateAbilityResource($"BloodlineOrcTransformationResource", "", "",
                                                         "955f0d751ea5426ea66fe96839ce7132", transformationSpell.Icon);

            resource.SetFixedResource(1);

            var ability = library.CopyAndAdd(transformationSpell, "BloodlineOrcTransformationAbility", "c3f91df156974ce09cfa5b4f49b931ac");

            ability.Type = AbilityType.SpellLike;
            ability.AddComponent(Helpers.CreateResourceLogic(resource));

            return(Helpers.CreateFeature("BloodlineOrcWarlordReborn", Main.lc.GetTranslate("Bloodline.abOrcWarlordRebornName"),
                                         Main.lc.GetTranslate("Bloodline.abOrcWarlordRebornDesc"),
                                         "65e67606c3c94f75b924c13906a0b4b0",
                                         ability.Icon, // transformation
                                         FeatureGroup.None,
                                         ability.CreateAddFact(),
                                         Helpers.Create <AddDamageResistancePhysical>(t => t.Value = 5),
                                         Helpers.Create <AddEnergyDamageImmunity>(a => a.EnergyType = DamageEnergyType.Fire),
                                         resource.CreateAddAbilityResource(),
                                         ability.CreateBindToClass(bloodline, StatType.Charisma)));
        }
Ejemplo n.º 2
0
        static BlueprintFeature CreateWarlordReborn(BlueprintProgression bloodline)
        {
            var transformationSpell = library.Get <BlueprintAbility>("27203d62eb3d4184c9aced94f22e1806");

            var resource = Helpers.CreateAbilityResource($"BloodlineOrcTransformationResource", "", "",
                                                         "955f0d751ea5426ea66fe96839ce7132", transformationSpell.Icon);

            resource.SetFixedResource(1);

            var ability = library.CopyAndAdd(transformationSpell, "BloodlineOrcTransformationAbility", "c3f91df156974ce09cfa5b4f49b931ac");

            ability.Type = AbilityType.SpellLike;
            ability.AddComponent(Helpers.CreateResourceLogic(resource));

            return(Helpers.CreateFeature("BloodlineOrcWarlordReborn", "Warlord Reborn",
                                         "At 20th level, you become a true orc warlord of legend. You gain immunity to fire and DR 5/—. Once per day, you can cast transformation as a spell-like ability using your sorcerer level as your caster level.",
                                         "65e67606c3c94f75b924c13906a0b4b0",
                                         ability.Icon, // transformation
                                         FeatureGroup.None,
                                         ability.CreateAddFact(),
                                         Helpers.Create <AddDamageResistancePhysical>(t => t.Value = 5),
                                         Helpers.Create <AddEnergyDamageImmunity>(a => a.EnergyType = DamageEnergyType.Fire),
                                         resource.CreateAddAbilityResource(),
                                         ability.CreateBindToClass(bloodline, StatType.Charisma)));
        }
Ejemplo n.º 3
0
        static void createDawnflowerAnchoriteProgression()
        {
            createSpellbookSelection();
            createChannelEnergyDomainProgression();
            createSolarInvocation(); //also dawnflower invocation and related credences
            createCredence();
            createSunbeam();


            dawnflower_anchorite_progression = Helpers.CreateProgression("DawnfloweAnchoriteProgression",
                                                                         dawnflower_anchorite.Name,
                                                                         dawnflower_anchorite.Description,
                                                                         "",
                                                                         dawnflower_anchorite.Icon,
                                                                         FeatureGroup.None);
            dawnflower_anchorite_progression.Classes = getDawnflowerAcnchoriteArray();

            dawnflower_anchorite_progression.LevelEntries = new LevelEntry[] { Helpers.LevelEntry(1, channel_energy_domain_progression, solar_invocation),
                                                                               Helpers.LevelEntry(2, spellbook_selection),
                                                                               Helpers.LevelEntry(3, bask_in_radiance),
                                                                               Helpers.LevelEntry(4),
                                                                               Helpers.LevelEntry(5, solar_invocation_move_action),
                                                                               Helpers.LevelEntry(6, credence),
                                                                               Helpers.LevelEntry(7, sunbeam),
                                                                               Helpers.LevelEntry(8, credence),
                                                                               Helpers.LevelEntry(9),
                                                                               Helpers.LevelEntry(10, credence, dawnflower_invocation, solar_invocation_swift_action) };

            dawnflower_anchorite_progression.UIDeterminatorsGroup = new BlueprintFeatureBase[] { channel_energy_domain_progression };
            dawnflower_anchorite_progression.UIGroups             = new UIGroup[]  { Helpers.CreateUIGroup(solar_invocation, solar_invocation_move_action, solar_invocation_swift_action),
                                                                                     Helpers.CreateUIGroup(spellbook_selection, credence, credence, credence),
                                                                                     Helpers.CreateUIGroup(bask_in_radiance, sunbeam, dawnflower_invocation) };
        }
        static BlueprintParametrizedFeature CreateSpellPerfection(BlueprintFeature[] newMetamagics)
        {
            var library       = Main.library;
            var allMetamagics = newMetamagics.Concat((new String[] {
                "a1de1e4f92195b442adb946f0e2b9d4e",
                "f180e72e4a9cbaa4da8be9bc958132ef",
                "2f5d1e705c7967546b72ad8218ccf99c",
                "7f2b282626862e345935bbea5e66424b",
                "ef7ece7bb5bb66a41b256976b27f424e",
                "46fad72f54a33dc4692d3b62eca7bb78",
            }).Select(id => (BlueprintFeature)library.BlueprintsByAssetId[id])).ToArray();

            spellSpecialization     = library.Get <BlueprintProgression>("fe9220cdc16e5f444a84d85d5fa8e3d5");
            spellPenetration        = library.Get <BlueprintFeature>("ee7dc126939e4d9438357fbd5980d459");
            spellPenetrationGreater = library.Get <BlueprintFeature>("1978c3f91cfbbc24b9c9b0d017f4beec");
            elementalFocus          = library.Get <BlueprintFeatureSelection>("bb24cc01319528849b09a3ae8eec0b31");
            elementalFocusGreater   = library.Get <BlueprintFeatureSelection>("1c17446a3eb744f438488711b792ca4d");

            var spellSpecialization1 = library.Get <BlueprintParametrizedFeature>("f327a765a4353d04f872482ef3e48c35");
            var noFeature            = Helpers.PrerequisiteNoFeature(null);
            var spellPerfection      = Helpers.CreateParamSelection <KnownSpellSelection>("SpellPerfection",
                                                                                          "完美法术",
                                                                                          "选择一个你能够释放的法术,每次你释放此法术时,你可以在不影响施法时间和法术环级的情况下对其施加任何一个你所知晓的超魔专长,只要此法术的合计等级不超过九级(添加多个超魔时,环数调整最低的适用此专长)。此外,如果你有其他专长允许你对这个法术的任何一个方面添加一个加值(例如法术专攻,法术穿透,武器专攻-射线等),那么这些专长在这个法术上的效果加倍。",
                                                                                          "82165fb15af34cbb9c0c2e6fb232b2fc",
                                                                                          spellSpecialization.Icon,
                                                                                          FeatureGroup.Feat,
                                                                                          Helpers.PrerequisiteStatValue(StatType.SkillKnowledgeArcana, 15),
                                                                                          Helpers.Create <PrerequisiteFeaturesFromList>(p => { p.Amount = 3; p.Features = allMetamagics; }),
                                                                                          Helpers.Create <ReduceMetamagicCostForSpell>(r => r.OneMetamagicIsFree = true),
                                                                                          Helpers.Create <SpellPerfectionDoubleFeatBonuses>(),
                                                                                          noFeature);

            noFeature.Feature = spellPerfection;
            return(spellPerfection);
        }
        internal static List <BlueprintFeatureBase> CreateSpellProgression(BlueprintProgression bloodline, String[] spellIds)
        {
            var fullCaster  = bloodline.Classes[0];
            var isOracle    = fullCaster == OracleClass.oracle;
            var description = isOracle ? RES.BloodlineOrcSpellDescription_info : RES.BloodlineOrcOracleSpellDescription_info;
            var result      = new List <BlueprintFeatureBase>();

            for (int spellLevel = 1; spellLevel <= 9; spellLevel++)
            {
                var spellId = spellLevel <= spellIds.Length ? spellIds[spellLevel - 1] : null;
                if (spellId == null)
                {
                    continue;
                }

                var spell = library.Get <BlueprintAbility>(spellId);
                spell.AddRecommendNoFeature(bloodline);

                var bloodlineName = bloodline.name.Replace("Progression", "");
                var addSpell      = Helpers.CreateFeature($"{bloodlineName}SpellLevel{spellLevel}",
                                                          spell.Name,
                                                          string.Format(RES.BloodlineOrcSpellFeatureDescription_info, description, spell.Description),
                                                          Helpers.MergeIds(bloodline.AssetGuid, spell.AssetGuid),
                                                          spell.Icon,
                                                          FeatureGroup.None,
                                                          spell.CreateAddKnownSpell(fullCaster, spellLevel));

                if (spellLevel <= 6 && !isOracle)
                {
                    addSpell.AddComponent(spell.CreateAddKnownSpell(bloodline.Classes[1], spellLevel, bloodline.Archetypes[0])); // Eldritch Scion
                }
                result.Add(addSpell);
            }
            return(result);
        }
        static BlueprintProgression replaceRepeatingFeatureWithProgression(BlueprintProgression bloodline, BlueprintFeature feature)
        {
            List <LevelEntry> level_entries = new List <LevelEntry>();

            var feature_progression = Helpers.CreateProgression(feature.name + "Progression",
                                                                feature.Name,
                                                                feature.Description,
                                                                "",
                                                                feature.Icon,
                                                                FeatureGroup.None);

            feature_progression.Classes    = bloodline.Classes;
            feature_progression.Archetypes = bloodline.Archetypes;
            feature_progression.HideInCharacterSheetAndLevelUp = feature.HideInCharacterSheetAndLevelUp;

            for (int i = 0; i < bloodline.LevelEntries.Length; i++)
            {
                foreach (var f in bloodline.LevelEntries[i].Features.ToArray())
                {
                    if (f == feature)
                    {
                        if (level_entries.Count == 0)
                        {
                            bloodline.LevelEntries[i].Features.Add(feature_progression);
                        }
                        level_entries.Add(Helpers.LevelEntry(bloodline.LevelEntries[i].Level, feature));
                        bloodline.LevelEntries[i].Features.Remove(f);
                    }
                }
            }
            feature_progression.LevelEntries = level_entries.ToArray();
            return(feature_progression);
        }
Ejemplo n.º 7
0
        static void addLesserEidolon(BlueprintProgression normal_eidolon)
        {
            var lesser_eidolon = library.CopyAndAdd(normal_eidolon, "Lesser" + normal_eidolon.Name, "");

            lesser_eidolon.SetName("Lesser " + normal_eidolon.Name);
            normal_to_lesser_eidolon_map.Add(normal_eidolon, lesser_eidolon);
        }
Ejemplo n.º 8
0
        static BlueprintFeature CreateGreaterHeritage(BlueprintProgression bloodline, BlueprintFeature[] allImprovedFeats, int powerLevel = 15, BlueprintFeature improvedFeat = null)
        {
            var power       = GetBloodlinePower(bloodline, powerLevel);
            var name        = $"{GetPowerName(power)}GreaterHeritage";
            var displayName = $"Greater Eldritch Heritage — {power.Name}";
            var assetId     = Helpers.MergeIds(power.AssetGuid, "f2f2797315644c32a949182d79ae151e");

            if (improvedFeat != null)
            {
                // Copy the improved feat so we can update it.
                var greaterFeat = library.CopyAndAdd(improvedFeat, name, assetId);
                greaterFeat.SetName(displayName);
                improvedFeat.AddComponent(greaterFeat.PrerequisiteNoFeature());

                var otherImprovedFeat = allImprovedFeats.First(f => f != improvedFeat);
                greaterFeat.AddComponents(new BlueprintComponent[] {
                    improvedFeat.PrerequisiteNoFeature(),
                    otherImprovedFeat.PrerequisiteFeature()
                });
                return(greaterFeat);
            }
            return(CreateHeritageFeat(bloodline, power, powerLevel,
                                      name, displayName, power.Icon, assetId,
                                      new List <BlueprintComponent> {
                Helpers.PrerequisiteFeaturesFromList(allImprovedFeats)
            }));
        }
Ejemplo n.º 9
0
            public Spirit(string name, string display_name, string description, UnityEngine.Sprite icon, string guid,
                          BlueprintFeature spirit_ability, BlueprintFeature greater_spirit_ability, BlueprintFeature manifestation, BlueprintFeature[] hexes)
            {
                var entries = new LevelEntry[] { Helpers.LevelEntry(1, spirit_ability),
                                                 Helpers.LevelEntry(8, greater_spirit_ability),
                                                 Helpers.LevelEntry(20, manifestation) };


                progression = Helpers.CreateProgression(name + "SpiritWhispererProgression",
                                                        display_name + " Spirit",
                                                        description,
                                                        "",
                                                        icon,
                                                        FeatureGroup.None
                                                        );
                progression.LevelEntries = entries.ToArray();
                progression.UIGroups     = Helpers.CreateUIGroups(spirit_ability, greater_spirit_ability, manifestation);

                this.hex_selection = Helpers.CreateFeatureSelection(name + "SpiritWhispirerSpiritHexSelection",
                                                                    display_name + " Spirit Hex",
                                                                    $"You can select one of the hexes granted by {display_name} spirit.",
                                                                    "",
                                                                    icon,
                                                                    FeatureGroup.None,
                                                                    Helpers.PrerequisiteFeature(progression)
                                                                    );
                this.hex_selection.AllFeatures = hexes;
                progression.Classes            = new BlueprintCharacterClass[] { archetype.GetParentClass() };
            }
        static BlueprintFeature CreateBloodlinePower(BlueprintProgression bloodline, int level, BlueprintProgression crossbloodline)
        {
            var power   = EldritchHeritage.GetBloodlinePower(bloodline, level);
            var entries = EldritchHeritage.CollectLevelEntries(level, power, bloodline);

            if (entries.Count == 1)
            {
                return(CreateCrossbloodedFeature(entries[0].Item2, crossbloodline));
            }

            var name = power.name;

            if (name.EndsWith("1"))
            {
                name = name.Substring(0, power.name.Length - 1);
            }

            var feature = Helpers.CreateFeature($"{name}Cross", power.Name, power.Description,
                                                Helpers.MergeIds(power.AssetGuid, "3b983f0653914618844275e20d9fe561"),
                                                power.Icon, FeatureGroup.None);

            var components = new List <BlueprintComponent> {
                crossbloodline.PrerequisiteFeature()
            };

            for (int i = 0; i < entries.Count; i++)
            {
                var e = entries[i];
                components.Add(AddFactOnBloodlineLevel.Create(e.Item2, $"${i}", e.Item1));
            }
            feature.SetComponents(components);
            return(feature);
        }
 private static bool AllowProceed(BlueprintProgression progression)
 {
     // SpellSpecializationProgression << shouldn't be applied more than once per character level
     return(!Core.Enabled ||
            Core.Mod.UpdatedProgressions.Add(progression) ||
            progression.AssetGuid != "fe9220cdc16e5f444a84d85d5fa8e3d5");
 }
Ejemplo n.º 12
0
        static BlueprintParametrizedFeature CreateSpellPerfection(BlueprintFeature[] newMetamagics)
        {
            var library       = Main.library;
            var allMetamagics = newMetamagics.Concat((new String[] {
                "a1de1e4f92195b442adb946f0e2b9d4e",
                "f180e72e4a9cbaa4da8be9bc958132ef",
                "2f5d1e705c7967546b72ad8218ccf99c",
                "7f2b282626862e345935bbea5e66424b",
                "ef7ece7bb5bb66a41b256976b27f424e",
                "46fad72f54a33dc4692d3b62eca7bb78",
            }).Select(id => (BlueprintFeature)library.BlueprintsByAssetId[id])).ToArray();

            spellSpecialization     = library.Get <BlueprintProgression>("fe9220cdc16e5f444a84d85d5fa8e3d5");
            spellPenetration        = library.Get <BlueprintFeature>("ee7dc126939e4d9438357fbd5980d459");
            spellPenetrationGreater = library.Get <BlueprintFeature>("1978c3f91cfbbc24b9c9b0d017f4beec");
            elementalFocus          = library.Get <BlueprintFeatureSelection>("bb24cc01319528849b09a3ae8eec0b31");
            elementalFocusGreater   = library.Get <BlueprintFeatureSelection>("1c17446a3eb744f438488711b792ca4d");

            var spellSpecialization1 = library.Get <BlueprintParametrizedFeature>("f327a765a4353d04f872482ef3e48c35");
            var noFeature            = Helpers.PrerequisiteNoFeature(null);
            var spellPerfection      = Helpers.CreateParamSelection <KnownSpellSelection>("SpellPerfection",
                                                                                          "Spell Perfection",
                                                                                          "Pick one spell which you have the ability to cast. Whenever you cast that spell you may apply any one metamagic feat you have to that spell without affecting its level or casting time, as long as the total modified level of the spell does not use a spell slot above 9th level. In addition, if you have other feats which allow you to apply a set numerical bonus to any aspect of this spell (such as Spell Focus, Spell Penetration, Weapon Focus [ray], and so on), double the bonus granted by that feat when applied to this spell.",
                                                                                          "82165fb15af34cbb9c0c2e6fb232b2fc",
                                                                                          spellSpecialization.Icon,
                                                                                          FeatureGroup.Feat,
                                                                                          Helpers.PrerequisiteStatValue(StatType.SkillKnowledgeArcana, 15),
                                                                                          Helpers.Create <PrerequisiteFeaturesFromList>(p => { p.Amount = 3; p.Features = allMetamagics; }),
                                                                                          Helpers.Create <ReduceMetamagicCostForSpell>(r => r.OneMetamagicIsFree = true),
                                                                                          Helpers.Create <SpellPerfectionDoubleFeatBonuses>(),
                                                                                          noFeature);

            noFeature.Feature = spellPerfection;
            return(spellPerfection);
        }
Ejemplo n.º 13
0
        static BlueprintProgression createCurseProgression(BlueprintProgression oracle_curse)
        {
            var features = new BlueprintFeature[] { oracle_curse.LevelEntries[0].Features[0] as BlueprintFeature, //1 -> 5
                                                    oracle_curse.LevelEntries[1].Features[0] as BlueprintFeature, //5 -> 10,
                                                    oracle_curse.LevelEntries[2].Features[0] as BlueprintFeature, //10 -> 20
            };

            var curse = Helpers.CreateProgression("PactWizard" + oracle_curse.name,
                                                  oracle_curse.Name,
                                                  oracle_curse.Description,
                                                  "",
                                                  features[0].Icon,
                                                  FeatureGroup.None);
            List <BlueprintAbility> curse_spells = new List <BlueprintAbility>();

            for (int i = 0; i < features.Length; i++)
            {
                features[i] = library.CopyAndAdd(features[i], "PactWizard" + features[i].name, "");
                foreach (var af in features[i].GetComponents <AddFeatureOnClassLevel>())
                {
                    features[i].ReplaceComponent(af, af.CreateCopy(c => { c.Class = archetype.GetParentClass(); c.Level = c.Level * 2; }));
                }

                foreach (var aks in features[i].GetComponents <AddKnownSpell>())
                {
                    features[i].ReplaceComponent(aks, aks.CreateCopy(c =>
                    {
                        c.CharacterClass = archetype.GetParentClass();
                        if (archetype.GetParentClass().Spellbook.SpellList.Contains(c.Spell) &&
                            archetype.GetParentClass().Spellbook.SpellList.GetLevel(c.Spell) != c.SpellLevel)
                        {
                            c.Spell = SpellDuplicates.addDuplicateSpell(c.Spell, "PactWizard" + c.Spell.name, "");
                        }
                        curse_spells.Add(c.Spell);
                    }
                                                                     )
                                                 );
                }
            }

            if (!curse_spells.Empty())
            {
                var feature2 = Helpers.CreateFeature(oracle_curse.name + "CurseMetamagicFeature",
                                                     "",
                                                     "",
                                                     "",
                                                     null,
                                                     FeatureGroup.None,
                                                     Helpers.Create <NewMechanics.MetamagicMechanics.ReduceMetamagicCostForSpecifiedSpells>(r => { r.reduction = 1; r.spells = curse_spells.ToArray(); })
                                                     );
                feature2.HideInCharacterSheetAndLevelUp = true;
                patron_metamagic.AddComponent(Common.createAddFeatureIfHasFact(curse, feature2));
            }

            curse.LevelEntries = new LevelEntry[] { Helpers.LevelEntry(5, features[0]), Helpers.LevelEntry(10, features[1]), Helpers.LevelEntry(20, features[2]) };
            curse.UIGroups     = Helpers.CreateUIGroups(features);
            curse.Classes      = new BlueprintCharacterClass[] { archetype.GetParentClass() };
            return(curse);
        }
Ejemplo n.º 14
0
 static public BlueprintProgression getLesserEidolon(BlueprintProgression normal_eidolon)
 {
     if (normal_eidolon == null)
     {
         return(null);
     }
     return(normal_to_lesser_eidolon_map.ContainsKey(normal_eidolon) ? normal_to_lesser_eidolon_map[normal_eidolon] : null);
 }
Ejemplo n.º 15
0
        static BlueprintFeature CreateFearless(BlueprintProgression bloodline)
        {
            var dazzled = library.CopyAndAdd <BlueprintBuff>("df6d1025da07524429afbae248845ecc",
                                                             "LightSensitivityDazzled", "949ae82dd5a441b08da1390c1c3c8d84");

            // Add Light Sensitivity until we get fearless rank 2.
            var lightSensitive = Helpers.CreateFeature("BloodlineOrcLightSensitivity", Main.lc.GetTranslate("Bloodline.abLightSensitivityName"),
                                                       Main.lc.GetTranslate("Bloodline.abLightSensitivityDesc"),
                                                       "6a25396d38094003b6492648891abbf4",
                                                       Helpers.GetIcon("bf0accce250381a44b857d4af6c8e10d"), // searing light
                                                       FeatureGroup.None,
                                                       Helpers.Create <OrcLightSensitivity>());

            OrcLightSensitivity.DazzledBuff = dazzled;

            dazzled.SetDescription($"{dazzled.Description}\n{lightSensitive.Name}: {lightSensitive.Description}");

            var fearless1 = Helpers.CreateFeature("BloodlineOrcFearlessLevel1",
                                                  Main.lc.GetTranslate("Bloodline.abOrcAbFearlessName"),
                                                  Main.lc.GetTranslate("Bloodline.abOrcAbFearlessDesc"),
                                                  "6c28b22514804978adcc4223c4c37791",
                                                  Helpers.GetIcon("e45ab30f49215054e83b4ea12165409f"), // Aura of Courage
                                                  FeatureGroup.None,
                                                  Helpers.Create <SavingThrowBonusAgainstDescriptor>(a =>
            {
                a.Bonus = 4;
                a.ModifierDescriptor = ModifierDescriptor.Inherent;
                a.SpellDescriptor    = SpellDescriptor.Fear;
            }),
                                                  Helpers.CreateAddStatBonus(StatType.AC, 1, ModifierDescriptor.NaturalArmor));
            var fearless2 = Helpers.CreateFeature("BloodlineOrcFearlessLevel2",
                                                  fearless1.Name,
                                                  fearless1.Description,
                                                  "37224d428eac41cebba8b5710872401c",
                                                  fearless1.Icon,
                                                  FeatureGroup.None,
                                                  SpellDescriptor.Fear.CreateBuffImmunity(),
                                                  SpellDescriptor.Fear.CreateSpellImmunity(),
                                                  Helpers.CreateAddStatBonus(StatType.AC, 2, ModifierDescriptor.NaturalArmor),
                                                  Helpers.Create <RemoveFeatureOnApply>(r => r.Feature = lightSensitive));

            orcArcana.AddComponent(Helpers.Create <AddFeatureIfHasFact>(a =>
            {
                a.Feature     = lightSensitive;
                a.CheckedFact = fearless2;
                a.Not         = true;
            }));

            var addFeat = Helpers.CreateFeature($"BloodlineOrcFearlessAdd",
                                                fearless1.Name, fearless1.Description,
                                                "1afbd239a03744f39a8e66ad8ae74f75",
                                                fearless1.Icon,
                                                FeatureGroup.None,
                                                fearless1.CreateAddFeatureOnClassLevel(9, bloodline.Classes, bloodline.Archetypes, before: true),
                                                fearless2.CreateAddFeatureOnClassLevel(9, bloodline.Classes, bloodline.Archetypes));

            return(addFeat);
        }
Ejemplo n.º 16
0
 static private void FixProgressions()
 {
     foreach (string id in config.BloodlineProgressions)
     {
         BlueprintProgression prog = library.Get <BlueprintProgression>(id);
         HelpersNeu.Add <BlueprintCharacterClass>(ref prog.Classes, ArcanistClass.arcanist);
         HelpersNeu.Add <BlueprintArchetype>(ref prog.Archetypes, archetype);
     }
 }
 static void Prefix(LevelUpState state, UnitDescriptor unit, BlueprintProgression progression)
 {
     if (IsAvailable())
     {
         ProgressionData progressionData = unit.Progression.SureProgressionData(progression);
         int             nextLevel       = progressionData.Blueprint.CalcLevel(unit);
         Core.Debug($" - {nameof(LevelUpHelper)}.{nameof(LevelUpHelper.UpdateProgression)}({state.SelectedClass}[{state.NextClassLevel}], {unit}, {progression}) - NextLevel: {nextLevel}");
     }
 }
Ejemplo n.º 18
0
        static void createConversionInquisition()
        {
            var charm_of_wisdom = Helpers.CreateFeature("CharmOfWisdomFeature",
                                                        "Charm of Wisdom",
                                                        " You use your Wisdom modifier instead of your Charisma modifier when making Bluff, Diplomacy, and Intimidate checks.",
                                                        "",
                                                        library.Get <BlueprintAbility>("d316d3d94d20c674db2c24d7de96f6a7").Icon,       //serenity
                                                        FeatureGroup.None,
                                                        Helpers.Create <NewMechanics.SkillStatReplacement>(s => { s.Skill = StatType.SkillPersuasion; s.ReplacementStat = StatType.Wisdom; }),
                                                        Helpers.Create <RecalculateOnStatChange>(r => r.Stat = StatType.Wisdom),
                                                        Helpers.Create <RecalculateOnStatChange>(r => r.Stat = StatType.Charisma)
                                                        );


            var swaying_word_resource = Helpers.CreateAbilityResource("SwayingWordResource", "", "", "", null);

            swaying_word_resource.SetFixedResource(1);

            var swaying_word = library.CopyAndAdd <BlueprintAbility>("d7cbd2004ce66a042aeab2e95a3c5c61", "SwayingWordAbility", "");//domiante

            swaying_word.Type = AbilityType.SpellLike;
            swaying_word.RemoveComponents <SpellComponent>();
            swaying_word.RemoveComponents <SpellListComponent>();
            swaying_word.RemoveComponents <ContextRankConfig>();
            swaying_word.ReplaceComponent <AbilityEffectRunAction>(a => a.Actions = Helpers.CreateActionList(Common.changeAction <ContextActionApplyBuff>(a.Actions.Actions,
                                                                                                                                                          c =>
            {
                c.DurationValue = Helpers.CreateContextDuration(1, DurationRate.Minutes);
                c.Permanent     = false;
            }
                                                                                                                                                          )
                                                                                                             )
                                                                   );
            swaying_word.SetNameDescription("Swaying Word", "At 8th level, once per day you may speak a word of divinely inspired wisdom that causes a single creature to switch its alliance to you. The target must be within line of sight and able to hear you. If he fails his Will save, he is affected by dominate person, except the duration is only 1 minute.");
            swaying_word.AddComponent(Common.createContextCalculateAbilityParamsBasedOnClasses(scaling_classes, StatType.Wisdom));
            swaying_word.LocalizedDuration = Helpers.CreateString("WordOfAnathema.Duration", Helpers.oneMinuteDuration);
            swaying_word.AddComponent(Helpers.CreateResourceLogic(swaying_word_resource));
            var swaying_word_feat = Common.AbilityToFeature(swaying_word, false);

            swaying_word_feat.AddComponent(Helpers.CreateAddAbilityResource(swaying_word_resource));

            conversion = Helpers.CreateProgression("ConversionInquisitionProgression",
                                                   "Conversion Inquisition",
                                                   "You are a powerful persuader. A honeyed tongue empowered by divine argumentation sways the indifferent and adversarial to your side.",
                                                   "",
                                                   null,
                                                   FeatureGroup.Domain);
            conversion.Classes = scaling_classes;

            conversion.LevelEntries = new LevelEntry[] {
                Helpers.LevelEntry(1, charm_of_wisdom),
                Helpers.LevelEntry(8, swaying_word_feat)
            };
            conversion.UIGroups = Helpers.CreateUIGroups(charm_of_wisdom, swaying_word_feat);

            addToDomainSelection(conversion);
        }
Ejemplo n.º 19
0
        // Creates the progression that offers a choice of HP, Skill Rank, or other choices each level up.
        static void FillFavoredClassProgression(BlueprintProgression favored, BlueprintCharacterClass favoredClass, List <BlueprintFeature> extraChoices = null)
        {
            var isPrestige = favoredClass.PrestigeClass;

            favored.Classes = new BlueprintCharacterClass[] { favoredClass };
            favored.ExclusiveProgression = favoredClass;

            var selection = Helpers.CreateFeatureSelection(
                favored.name + "BonusSelection",
                favored.Name,
                favored.Description,
                Helpers.MergeIds(favored.AssetGuid, "5b99b7d724e048c08b384dd890826"),
                favoredClass.Icon,
                UpdateLevelUpDeterminatorText.Group);

            var choices = new List <BlueprintFeature> {
                bonusHitPointFeat, bonusSkillRankFeat
            };

            if (extraChoices != null)
            {
                choices.AddRange(extraChoices);
            }
            selection.SetFeatures(choices);

            var entries  = new List <LevelEntry>();
            int maxLevel = isPrestige ? 10 : 20;

            for (int level = 1; level <= maxLevel; level++)
            {
                entries.Add(Helpers.LevelEntry(level, selection));
            }

            /* if (isPrestige)
             * {
             *   // Create the skill selection feature that offers +2 bonus to class skill
             *   // (+4 bonus with 10 ranks invested).
             *   var paramSkill = Helpers.CreateParamSelection<CustomSkillSelection>(
             *       favored.name + "SkillBonus",
             *       favored.Name,
             *       favored.Description + "\nYou gain a +2 bonus on checks using the skill you chose from that prestige class’s class skills. If you have 10 or more ranks in one of these skills, the bonus increases to +4 for that skill. This bonus stacks with the bonus granted by Skill Focus, but does not stack with a bonus granted by any other feat (such as Magical Aptitude or Persuasive).",
             *       Helpers.MergeIds(favoredClass.AssetGuid, "15faccea8a364cb39d091dd01b513c3a"),
             *       Helpers.skillFocusFeat.Icon,
             *       FeatureGroup.None,
             *       Helpers.Create<AddParameterizedStatBonus>(a => a.Descriptor = ModifierDescriptor.Feat));
             *   paramSkill.Skills = favoredClass.ClassSkills;
             *
             *   // Parameterized selections can't be at the top level, so make sure it's nested inside another selection.
             *   var skillSelection = Helpers.CreateFeatureSelection($"{paramSkill.name}Selection", paramSkill.Name, paramSkill.Description,
             *       Helpers.MergeIds(favoredClass.AssetGuid, "751086fe9be448aaace88ed185b4240f"), paramSkill.Icon, UpdateLevelUpDeterminatorText.Group);
             *   skillSelection.SetFeatures(paramSkill);
             *   entries[0].Features.Add(skillSelection);
             * }*/

            favored.LevelEntries = entries.ToArray();
        }
Ejemplo n.º 20
0
        // Creates the progression that offers a choice of HP, Skill Rank, or other choices each level up.
        static void FillFavoredClassProgression(BlueprintProgression favored, BlueprintCharacterClass favoredClass, List <BlueprintFeature> extraChoices = null)
        {
            var isPrestige = favoredClass.PrestigeClass;

            favored.Classes = new BlueprintCharacterClass[] { favoredClass };
            favored.ExclusiveProgression = favoredClass;

            var selection = Helpers.CreateFeatureSelection(
                favored.name + "BonusSelection",
                favored.Name,
                favored.Description,
                Helpers.MergeIds(favored.AssetGuid, "5b99b7d724e048c08b384dd890826"),
                favoredClass.Icon,
                UpdateLevelUpDeterminatorText.Group);

            var choices = new List <BlueprintFeature> {
                bonusHitPointFeat, bonusSkillRankFeat
            };

            if (extraChoices != null)
            {
                choices.AddRange(extraChoices);
            }
            selection.SetFeatures(choices);

            var entries  = new List <LevelEntry>();
            int maxLevel = isPrestige ? 10 : 20;

            for (int level = 1; level <= maxLevel; level++)
            {
                entries.Add(Helpers.LevelEntry(level, selection));
            }

            if (isPrestige)
            {
                // Create the skill selection feature that offers +2 bonus to class skill
                // (+4 bonus with 10 ranks invested).
                var paramSkill = Helpers.CreateParamSelection <CustomSkillSelection>(
                    favored.name + "SkillBonus",
                    favored.Name,
                    string.Format(RES.SkillBonusProgressionDescription_info, favored.Description),
                    Helpers.MergeIds(favoredClass.AssetGuid, "15faccea8a364cb39d091dd01b513c3a"),
                    Helpers.skillFocusFeat.Icon,
                    FeatureGroup.None,
                    Helpers.Create <AddParameterizedStatBonus>(a => a.Descriptor = ModifierDescriptor.Feat));
                paramSkill.Skills = favoredClass.ClassSkills;

                // Parameterized selections can't be at the top level, so make sure it's nested inside another selection.
                var skillSelection = Helpers.CreateFeatureSelection($"{paramSkill.name}Selection", paramSkill.Name, paramSkill.Description,
                                                                    Helpers.MergeIds(favoredClass.AssetGuid, "751086fe9be448aaace88ed185b4240f"), paramSkill.Icon, UpdateLevelUpDeterminatorText.Group);
                skillSelection.SetFeatures(paramSkill);
                entries[0].Features.Add(skillSelection);
            }

            favored.LevelEntries = entries.ToArray();
        }
Ejemplo n.º 21
0
        public static void addClassToDomains(BlueprintCharacterClass class_to_add, BlueprintArchetype[] archetypes_to_add, DomainSpellsType spells_type, BlueprintFeatureSelection domain_selection)
        {
            var domains = domain_selection.AllFeatures;

            foreach (var domain_feature in domains)
            {
                BlueprintProgression domain = domain_feature as BlueprintProgression;
                addClassToProgression(class_to_add, archetypes_to_add, spells_type, domain);
            }
        }
Ejemplo n.º 22
0
        static void createVindicativeBastardProgression()
        {
            createVindicativeSmite();
            createFadedGrace();
            createSoloTactics();
            createSpitefulTenacity();
            createTeamworkFeat();
            createGangUp();
            createStalwart();
            createAuraOfSelfRighteousness();
            createUltimateVindication();

            var proficiencies = library.CopyAndAdd <BlueprintFeature>("b10ff88c03308b649b50c31611c2fefb", "VindicativeBastardProficiencies", "");

            proficiencies.SetName("Vindicative Bastard Proficiencies");
            proficiencies.SetDescription("Vindictive Bastards are proficient with all simple and martial weapons, with all types of armor (heavy, medium, and light), and with shields (except tower shields).");

            vindicative_bastard_progression = Helpers.CreateProgression("VindicativeBastardProgression",
                                                                        vindicative_bastard_class.Name,
                                                                        vindicative_bastard_class.Description,
                                                                        "",
                                                                        vindicative_bastard_class.Icon,
                                                                        FeatureGroup.None);
            vindicative_bastard_progression.Classes = getVindicativeBastardArray();
            var detect_magic = library.Get <BlueprintFeature>("ee0b69e90bac14446a4cf9a050f87f2e");

            vindicative_bastard_progression.LevelEntries = new LevelEntry[] { Helpers.LevelEntry(1, proficiencies, detect_magic, vindicative_smite,
                                                                                                 library.Get <BlueprintFeature>("d3e6275cfa6e7a04b9213b7b292a011c"),   // ray calculate feature
                                                                                                 library.Get <BlueprintFeature>("62ef1cdb90f1d654d996556669caf7fa")),  // touch calculate feature};
                                                                              Helpers.LevelEntry(2, faded_grace, solo_tactics),
                                                                              Helpers.LevelEntry(3, spiteful_tenacity, teamwork_feat),
                                                                              Helpers.LevelEntry(4, add_vindicative_smite_use),
                                                                              Helpers.LevelEntry(5, gang_up),
                                                                              Helpers.LevelEntry(6, teamwork_feat),
                                                                              Helpers.LevelEntry(7, add_vindicative_smite_use),
                                                                              Helpers.LevelEntry(8),
                                                                              Helpers.LevelEntry(9, teamwork_feat),
                                                                              Helpers.LevelEntry(10, add_vindicative_smite_use),
                                                                              Helpers.LevelEntry(11, swift_justice),
                                                                              Helpers.LevelEntry(12, teamwork_feat),
                                                                              Helpers.LevelEntry(13, add_vindicative_smite_use),
                                                                              Helpers.LevelEntry(14, stalwart),
                                                                              Helpers.LevelEntry(15, teamwork_feat),
                                                                              Helpers.LevelEntry(16, add_vindicative_smite_use),
                                                                              Helpers.LevelEntry(17, aura_of_self_righteousness),
                                                                              Helpers.LevelEntry(18, teamwork_feat),
                                                                              Helpers.LevelEntry(19, add_vindicative_smite_use),
                                                                              Helpers.LevelEntry(20, ultimate_vindication) };

            vindicative_bastard_progression.UIDeterminatorsGroup = new BlueprintFeatureBase[] { proficiencies, detect_magic };
            vindicative_bastard_progression.UIGroups             = new UIGroup[]  { Helpers.CreateUIGroup(vindicative_smite, add_vindicative_smite_use, add_vindicative_smite_use, add_vindicative_smite_use, add_vindicative_smite_use, add_vindicative_smite_use, add_vindicative_smite_use),
                                                                                    Helpers.CreateUIGroup(faded_grace, spiteful_tenacity, gang_up, swift_justice, stalwart, aura_of_self_righteousness, ultimate_vindication),
                                                                                    Helpers.CreateUIGroup(solo_tactics, teamwork_feat, teamwork_feat, teamwork_feat) };
        }
Ejemplo n.º 23
0
 private static bool AllowProceed(BlueprintProgression progression)
 {
     // SpellSpecializationProgression << shouldn't be applied more than once per character level
     if (!Main.Enabled || Main.multiclassMod == null)
     {
         return(false);
     }
     return(Main.multiclassMod.UpdatedProgressions.Add(progression));
     // TODO - what is the following and does it still matter?
     // || progression.AssetGuid != "fe9220cdc16e5f444a84d85d5fa8e3d5";
 }
Ejemplo n.º 24
0
        static void setLesserEidolonProgression(BlueprintProgression normal_eidolon)
        {
            normal_to_lesser_eidolon_map[normal_eidolon].LevelEntries = new LevelEntry[]
            {
                Helpers.LevelEntry(1, normal_eidolon.LevelEntries[0].Features),
                Helpers.LevelEntry(8, normal_eidolon.LevelEntries[1].Features),
                Helpers.LevelEntry(16, normal_eidolon.LevelEntries[2].Features)
            };

            normal_to_lesser_eidolon_map[normal_eidolon].UIGroups = normal_eidolon.UIGroups;
        }
Ejemplo n.º 25
0
        internal static BlueprintFeature GetBloodlinePower(BlueprintProgression bloodline, int level)
        {
            if (level == 1)
            {
                return((BlueprintFeature)bloodline.GetLevelEntry(1).Features.First(f => !IsArcanaOrClassSkill(f)));
            }
            var features = bloodline.GetLevelEntry(level).Features;
            var power    = features.First(f => (!Char.IsDigit(f.name.Last()) || f.name.Last() == '1') && !f.name.EndsWith("ExtraUse") &&
                                          f.GetComponent <AddKnownSpell>() == null);

            return((BlueprintFeature)power);
        }
Ejemplo n.º 26
0
        static BlueprintFeature CreateImprovedHeritage(BlueprintProgression bloodline, BlueprintFeature heritageFeat, int powerLevel)
        {
            var power = GetBloodlinePower(bloodline, powerLevel);

            return(CreateHeritageFeat(bloodline, power, powerLevel,
                                      $"{GetPowerName(power)}ImprovedHeritage",
                                      $"Improved Eldritch Heritage — {power.Name}",
                                      power.Icon,
                                      Helpers.MergeIds(power.AssetGuid, "6a4ec4f556ff4f0d9581722972cb6600"),
                                      new List <BlueprintComponent> {
                heritageFeat.PrerequisiteFeature()
            }));
        }
Ejemplo n.º 27
0
        static void addLesserEidolon(BlueprintProgression normal_eidolon)
        {
            var lesser_eidolon = library.CopyAndAdd(normal_eidolon, "Lesser" + normal_eidolon.Name, "");

            lesser_eidolon.SetName("Lesser " + normal_eidolon.Name);
            lesser_eidolon.LevelEntries = new LevelEntry[]
            {
                Helpers.LevelEntry(1, normal_eidolon.LevelEntries[0].Features),
                Helpers.LevelEntry(8, normal_eidolon.LevelEntries[1].Features),
                Helpers.LevelEntry(16, normal_eidolon.LevelEntries[2].Features)
            };
            normal_to_lesser_eidolon_map.Add(normal_eidolon, lesser_eidolon);
        }
        // Create the Time mystery.
        //
        // Note: Time does not have a spell list, because too many spells are missing.
        // Instead it's used with the Ancient Lorekeeper archetype.
        // (The prerequsite is added by the archetype.)
        internal static (BlueprintProgression, BlueprintFeature) Create(String mysteryDescription, BlueprintFeature classSkillFeat)
        {
            var revelations = new List <BlueprintFeature>()
            {
                CreateAgingTouch(),
                CreateEraseFromTime(),
                CreateMomentaryGlimpse(),
                CreateRewindTime(),
                CreateKnowledgeOfTheAges(),
                CreateSpeedOrSlowTime(),
                CreateTemporalClarity(),
                CreateTimeFlicker(),
                CreateTimeHop(),
                CreateTimeSight()
            };

            var skill1      = StatType.SkillAthletics;
            var skill2      = StatType.SkillMobility;
            var description = new StringBuilder(mysteryDescription).AppendLine();

            description.AppendLine(
                $"Class skills: {UIUtility.GetStatText(skill1)}, {UIUtility.GetStatText(skill2)}\n" +
                "An oracle with the time mystery can choose from any of the following revelations:");
            foreach (var r in revelations)
            {
                description.AppendLine($"• {r.Name}");
            }

            var mystery = Helpers.CreateProgression("MysteryTimeProgression", "Time Mystery", description.ToString(),
                                                    "b05d63ba0f634061af15c995c1a3340d",
                                                    TimeStop.spell.Icon,
                                                    UpdateLevelUpDeterminatorText.Group,
                                                    AddClassSkillIfHasFeature.Create(skill1, classSkillFeat),
                                                    AddClassSkillIfHasFeature.Create(skill2, classSkillFeat));

            mystery.Classes     = oracleArray;
            TimeMystery.mystery = mystery;

            var finalRevelation = CreateFinalRevelation();

            mystery.LevelEntries = new LevelEntry[] { Helpers.LevelEntry(20, finalRevelation) };

            var revelation = Helpers.CreateFeatureSelection("MysteryTimeRevelation", "Time Revelation",
                                                            mystery.Description, "d9a38bc21fd6441094e4a48de1aa4fad", null, FeatureGroup.None,
                                                            mystery.PrerequisiteFeature());

            revelation.Mode = SelectionMode.OnlyNew;
            revelation.SetFeatures(revelations);

            return(mystery, revelation);
        }
Ejemplo n.º 29
0
        static void createHolyVindicatorProgression()
        {
            createHolyVindicatorProficiencies();
            createVindicatorShield();
            createChannelEnergyProgression();
            createSpellbookSelection();

            createStigmata();
            createFaithHealing();
            createBloodfireAndBloodrain();
            createVersatileChannel();

            var channel_smite = Helpers.CreateFeature("HolyVindicatorChannelSmite",
                                                      "Channel Smite",
                                                      "At 5th level, a vindicator gains Channel Smite as a bonus feat.",
                                                      "",
                                                      ChannelEnergyEngine.channel_smite.Icon,
                                                      FeatureGroup.None,
                                                      Helpers.CreateAddFact(ChannelEnergyEngine.channel_smite)
                                                      );

            holy_vindicator_progression = Helpers.CreateProgression("HolyVindicatorProgression",
                                                                    holy_vindicator_class.Name,
                                                                    holy_vindicator_class.Description,
                                                                    "",
                                                                    holy_vindicator_class.Icon,
                                                                    FeatureGroup.None);
            holy_vindicator_progression.Classes = getHolyVindicatorArray();

            holy_vindicator_progression.LevelEntries = new LevelEntry[] { Helpers.LevelEntry(1, channel_energy_progression, holy_vindicator_proficiencies, vindicator_shield),
                                                                          Helpers.LevelEntry(2, spellbook_selection, stigmata),
                                                                          Helpers.LevelEntry(3, faith_healing),
                                                                          Helpers.LevelEntry(4),
                                                                          Helpers.LevelEntry(5, bloodfire, channel_smite),
                                                                          Helpers.LevelEntry(6, versatile_channel, stigmata_move),
                                                                          Helpers.LevelEntry(7),
                                                                          Helpers.LevelEntry(8),
                                                                          Helpers.LevelEntry(9, bloodrain),
                                                                          Helpers.LevelEntry(10, stigmata_swift) };

            holy_vindicator_progression.UIDeterminatorsGroup = new BlueprintFeatureBase[] { holy_vindicator_proficiencies };
            holy_vindicator_progression.UIGroups             = new UIGroup[]  { Helpers.CreateUIGroup(channel_energy_progression, spellbook_selection, channel_smite, versatile_channel),
                                                                                Helpers.CreateUIGroup(stigmata, stigmata_move, stigmata_swift),
                                                                                Helpers.CreateUIGroup(vindicator_shield, faith_healing, bloodfire, bloodrain), };

            /* not sure if it is worth implementing these features (they are not very useful and interface would be clunky)
             * createDivineWrath();
             * createDivineRetribution();
             */
        }
Ejemplo n.º 30
0
        // This method is only used by `SpellBookView.SetupHeader()` to find information such
        // as spellbook bloodlines, cleric deity, etc.
        //
        // Unfortunately, it doesn't understand how to find data from the archetype.
        // So this patch addresses it.
        static void Postfix(BlueprintProgression progression, UnitProgressionData progressionData, ref List <BlueprintFeatureBase> __result)
        {
            try
            {
                var @class = Helpers.classes.FirstOrDefault(c => c.Progression == progression);
                if (@class == null)
                {
                    return;
                }

                var list      = __result ?? new List <BlueprintFeatureBase>();
                var archetype = @class.Archetypes.FirstOrDefault(progressionData.IsArchetype);
                if (archetype == null)
                {
                    return;
                }

                foreach (var entry in archetype.RemoveFeatures)
                {
                    foreach (var feat in entry.Features.OfType <BlueprintFeatureSelection>().Where(f => !f.HideInUI))
                    {
                        var selections = progressionData.GetSelections(feat, entry.Level);
                        list.RemoveAll(f => f == feat || selections.Contains(f));
                    }
                }
                foreach (var entry in archetype.AddFeatures)
                {
                    foreach (var feat in entry.Features.OfType <BlueprintFeatureSelection>().Where(f => !f.HideInUI))
                    {
                        var selections = progressionData.GetSelections(feat, entry.Level);
                        foreach (var s in selections)
                        {
                            if (IsDeterminator(s) && !list.Contains(s))
                            {
                                list.Add(s);
                            }
                        }
                        if (selections.Count == 0 && IsDeterminator(feat))
                        {
                            list.Add(feat);
                        }
                    }
                }
                __result = list.Count == 0 ? null : list;
            }
            catch (Exception e)
            {
                Log.Error(e);
            }
        }