Beispiel #1
0
        public BlueprintFeature createDeathsTouch(string name_prefix, string display_name, string description)
        {
            var resource = Helpers.CreateAbilityResource(name_prefix + "Resource", "", "", "", null);

            resource.SetIncreasedByStat(3, stat);
            var inflict_light_wounds = library.Get <BlueprintAbility>("e5cb4c4459e437e49a4cd73fde6b9063");

            var dmg  = Helpers.CreateActionDealDamage(DamageEnergyType.NegativeEnergy, Helpers.CreateContextDiceValue(DiceType.D6, 1, Helpers.CreateContextValue(AbilityRankType.Default)));
            var heal = Common.createContextActionHealTarget(Helpers.CreateContextDiceValue(DiceType.D6, 1, Helpers.CreateContextValue(AbilityRankType.Default)));

            if (Main.settings.balance_fixes)
            {
                dmg  = Helpers.CreateActionDealDamage(DamageEnergyType.NegativeEnergy, Helpers.CreateContextDiceValue(DiceType.D6, Helpers.CreateContextValue(AbilityRankType.Default), 0));
                heal = Common.createContextActionHealTarget(Helpers.CreateContextDiceValue(DiceType.D6, Helpers.CreateContextValue(AbilityRankType.Default), 0));
            }

            var channel_resistance = Helpers.CreateBuff(name_prefix + "ChannelResistanceBuff",
                                                        "",
                                                        "",
                                                        "",
                                                        null,
                                                        null,
                                                        Helpers.Create <SavingThrowBonusAgainstSpecificSpells>(c =>
            {
                c.Spells         = new BlueprintAbility[0];
                c.Value          = 2;
                c.BypassFeatures = new BlueprintFeature[] { library.Get <BlueprintFeature>("3d8e38c9ed54931469281ab0cec506e9") };                                            //sun domain
            }
                                                                                                               )
                                                        );
            var apply_buff = Common.createContextActionApplyBuff(channel_resistance, Helpers.CreateContextDuration(1, DurationRate.Minutes), dispellable: false);
            var effect     = Helpers.CreateConditional(Helpers.Create <UndeadMechanics.ContextConditionHasNegativeEnergyAffinity>(),
                                                       new GameAction[] { heal, apply_buff }, new GameAction[] { dmg });

            ChannelEnergyEngine.addChannelResitance(channel_resistance);

            var ability = Helpers.CreateAbility(name_prefix + "Ability",
                                                display_name,
                                                description,
                                                "",
                                                inflict_light_wounds.Icon,
                                                AbilityType.Supernatural,
                                                CommandType.Standard,
                                                AbilityRange.Touch,
                                                "",
                                                Helpers.savingThrowNone,
                                                Helpers.CreateRunActions(effect),
                                                inflict_light_wounds.GetComponent <AbilityTargetHasFact>(),
                                                inflict_light_wounds.GetComponent <AbilitySpawnFx>(),
                                                inflict_light_wounds.GetComponent <AbilityDeliverTouch>(),
                                                createClassScalingConfig(progression: Main.settings.balance_fixes ? ContextRankProgression.OnePlusDiv2 : ContextRankProgression.Div2)
                                                );

            ability.setMiscAbilityParametersTouchHarmful(true);

            var feature = Common.AbilityToFeature(ability.CreateTouchSpellCast(resource), false);

            feature.AddComponent(resource.CreateAddAbilityResource());
            return(feature);
        }
Beispiel #2
0
        static void createChannelEnergyDomainProgression()
        {
            //add to domains
            var druid            = library.Get <BlueprintCharacterClass>("610d836f3a3a9ed42a4349b62f002e96");
            var domain_selection = library.Get <BlueprintFeatureSelection>("48525e5da45c9c243a343fc6545dbdb9");
            var cleric_secondary_domain_selection = library.Get <BlueprintFeatureSelection>("43281c3d7fe18cc4d91928395837cd1e");
            var druid_domain_selection            = library.Get <BlueprintFeatureSelection>("5edfe84c93823d04f8c40ca2b4e0f039");
            var blight_druid_domain_selection     = library.Get <BlueprintFeatureSelection>("096fc02f6cc817a43991c4b437e12b8e");
            var cleric = library.Get <BlueprintCharacterClass>("67819271767a9dd4fbfd4ae700befea0");

            ClassToProgression.addClassToDomains(dawnflower_anchorite, new BlueprintArchetype[0], ClassToProgression.DomainSpellsType.NoSpells, domain_selection, cleric);
            ClassToProgression.addClassToDomains(dawnflower_anchorite, new BlueprintArchetype[0], ClassToProgression.DomainSpellsType.NoSpells, cleric_secondary_domain_selection, cleric);
            ClassToProgression.addClassToDomains(dawnflower_anchorite, new BlueprintArchetype[0], ClassToProgression.DomainSpellsType.NoSpells, blight_druid_domain_selection, druid);
            ClassToProgression.addClassToDomains(dawnflower_anchorite, new BlueprintArchetype[0], ClassToProgression.DomainSpellsType.NoSpells, druid_domain_selection, druid);
            ChannelEnergyEngine.addClassToChannelEnergyProgression(dawnflower_anchorite);

            foreach (var p in Archetypes.StormDruid.domain_secondary_progressions)
            {
                ClassToProgression.addClassToProgression(dawnflower_anchorite, new BlueprintArchetype[0], ClassToProgression.DomainSpellsType.NoSpells, p, druid);
            }


            foreach (var p in Wildshape.wildshape_progressions)
            {
                ClassToProgression.addClassToProgression(dawnflower_anchorite, new BlueprintArchetype[0], ClassToProgression.DomainSpellsType.NoSpells, p, p.Classes[0]);
            }

            //remove dawnflower anchorite from animal domains
            var domain_animal_companion_progression = library.Get <BlueprintProgression>("125af359f8bc9a145968b5d8fd8159b8");

            domain_animal_companion_progression.Classes = domain_animal_companion_progression.Classes.RemoveFromArray(dawnflower_anchorite);
            var druid_animal_domain_selection = library.Get <BlueprintProgression>("a75ad4936e099c54881cf553e2110703");

            foreach (var a in druid_animal_domain_selection.GetComponents <AddFeatureOnClassLevel>())
            {
                a.AdditionalClasses = a.AdditionalClasses.RemoveFromArray(dawnflower_anchorite);
            }



            channel_energy_domain_progression = Helpers.CreateFeature("DawnflowerAnchoriteChannelDomainProgressionFeature",
                                                                      "Focused",
                                                                      "The character adds his Dawnflower anchorite class levels to his effective class level in the corresponding class for the purpose of determining the effects of the following features: "
                                                                      + "Domains, Channel Energy, Animal Companion and Wildshape.",
                                                                      "",
                                                                      Helpers.GetIcon("a5e23522eda32dc45801e32c05dc9f96"), //good hope
                                                                      FeatureGroup.None
                                                                      );

            var animal_companion_rank = library.Get <BlueprintFeature>("1670990255e4fe948a863bafd5dbda5d");

            for (int i = 1; i <= 10; i++)
            {
                channel_energy_domain_progression.AddComponent(Helpers.CreateAddFeatureOnClassLevelIfHasFact(animal_companion_rank, i, getDawnflowerAcnchoriteArray(), animal_companion_rank));
            }
        }
        static internal void load()
        {
            createRagingBrutality();
            createBloodedArcaneStrike();
            createRivingStrike();
            createCoordiantedShot();
            FeralCombatTraining.load();

            ChannelEnergyEngine.createQuickChannel();
        }
Beispiel #4
0
        static void createVersatileChannel()
        {
            versatile_channel = Helpers.CreateFeature("VersatileChannelHolyVindicator",
                                                      "Versatile Channel",
                                                      "At 6th level, a vindicator’s channel energy can instead affect a 30-foot cone or a 120-foot line.",
                                                      "",
                                                      null,
                                                      FeatureGroup.None);

            ChannelEnergyEngine.addVersatileChannel(versatile_channel);
        }
Beispiel #5
0
        static void createChannelEnergyProgression()
        {
            ChannelEnergyEngine.addHolyVindicatorChannelEnergyProgression();

            channel_energy_progression = Helpers.CreateFeature("ChannelEnergyHolyVindicatorProgression",
                                                               "Channel Energy",
                                                               "The vindicator’s class level stacks with levels in any other class that grants the channel energy ability.",
                                                               "",
                                                               null,
                                                               FeatureGroup.None);
        }
Beispiel #6
0
            void createTrueSpiritAbility()
            {
                var healing_spells = new BlueprintAbility[]
                {
                    library.Get <BlueprintAbility>("5590652e1c2225c4ca30c4a699ab3649"),
                    library.Get <BlueprintAbility>("6b90c773a6543dc49b2505858ce33db5"),
                    library.Get <BlueprintAbility>("3361c5df793b4c8448756146a88026ad"),
                    library.Get <BlueprintAbility>("41c9016596fe1de4faf67425ed691203"),
                    library.Get <BlueprintAbility>("5d3d689392e4ff740a761ef346815074"),
                    library.Get <BlueprintAbility>("571221cc141bc21449ae96b3944652aa"),
                    library.Get <BlueprintAbility>("1f173a16120359e41a20fc75bb53d449"),
                    library.Get <BlueprintAbility>("0cea35de4d553cc439ae80b3a8724397")
                };

                ChannelEnergyEngine.createSwiftPositiveChannel();
                var icon = library.Get <BlueprintAbility>("867524328b54f25488d371214eea0d90").Icon; //mass heal
                var buff = Helpers.CreateBuff(prefix + "QuickHealingBuff",
                                              "Quick Healing",
                                              "The shaman calls upon her spirit to enhance the speed of her healing abilities. This ability allows her to channel positive energy or cast a cure spell as a swift action. The shaman can use this ability a number of times per day equal to her Charisma modifier.",
                                              "",
                                              icon,
                                              null,
                                              Helpers.Create <NewMechanics.MetamagicMechanics.MetamagicOnSpellList>(a =>
                {
                    a.resource   = ChannelEnergyEngine.swift_positve_channel_resource;
                    a.amount     = 1;
                    a.spell_list = healing_spells;
                    a.Metamagic  = Kingmaker.UnitLogic.Abilities.Metamagic.Quicken;
                }
                                                                                                                    )
                                              );

                var ability = Helpers.CreateActivatableAbility(prefix + "QuickHealingActivatableAbility",
                                                               buff.Name,
                                                               buff.Description,
                                                               "",
                                                               buff.Icon,
                                                               buff,
                                                               AbilityActivationType.Immediately,
                                                               CommandType.Free,
                                                               null,
                                                               Helpers.CreateActivatableResourceLogic(ChannelEnergyEngine.swift_positve_channel_resource, ResourceSpendType.Never)
                                                               );

                ability.DeactivateImmediately = true;

                true_spirit_ability = Common.ActivatableAbilityToFeature(ability, hide: false);
                true_spirit_ability.AddComponent(Helpers.CreateAddAbilityResource(ChannelEnergyEngine.swift_positve_channel_resource));
                true_spirit_ability.AddComponent(Helpers.CreateAddFact(ChannelEnergyEngine.swift_positive_channel));
            }
Beispiel #7
0
        public BlueprintFeature createChannel(string name_prefix, string display_name, string description)
        {
            var resource = Helpers.CreateAbilityResource(name_prefix + "Resource", "", "", "", null);

            resource.SetIncreasedByStat(1, stat);

            var positive_energy_feature = library.Get <BlueprintFeature>("a79013ff4bcd4864cb669622a29ddafb");
            var context_rank_config     = Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.ClassLevel, progression: ContextRankProgression.StartPlusDivStep,
                                                                          type: AbilityRankType.Default, classes: classes, startLevel: 1, stepLevel: 2);
            var dc_scaling = Common.createContextCalculateAbilityParamsBasedOnClasses(classes, stat);
            var feature    = Helpers.CreateFeature(name_prefix + "Feature",
                                                   display_name,
                                                   description,
                                                   "",
                                                   positive_energy_feature.Icon,
                                                   FeatureGroup.None);

            var heal_living = ChannelEnergyEngine.createChannelEnergy(ChannelEnergyEngine.ChannelType.PositiveHeal,
                                                                      name_prefix + "ChannelEnergyHealLiving",
                                                                      "",
                                                                      "",
                                                                      "",
                                                                      context_rank_config,
                                                                      dc_scaling,
                                                                      Helpers.CreateResourceLogic(resource));
            var harm_undead = ChannelEnergyEngine.createChannelEnergy(ChannelEnergyEngine.ChannelType.PositiveHarm,
                                                                      name_prefix + "ChannelEnergyHarmUndead",
                                                                      "",
                                                                      "",
                                                                      "",
                                                                      context_rank_config,
                                                                      dc_scaling,
                                                                      Helpers.CreateResourceLogic(resource));

            var heal_living_base = Common.createVariantWrapper(name_prefix + "PositiveHealBase", "", heal_living);
            var harm_undead_base = Common.createVariantWrapper(name_prefix + "PositiveHarmBase", "", harm_undead);

            ChannelEnergyEngine.storeChannel(heal_living, feature, ChannelEnergyEngine.ChannelType.PositiveHeal);
            ChannelEnergyEngine.storeChannel(harm_undead, feature, ChannelEnergyEngine.ChannelType.PositiveHarm);

            feature.AddComponent(Helpers.CreateAddFacts(heal_living_base, harm_undead_base));
            feature.AddComponent(Helpers.CreateAddAbilityResource(resource));
            var extra_channel = ChannelEnergyEngine.createExtraChannelFeat(heal_living, feature, name_prefix + "ExtraChannelDeature", $"Extra Channel ({classes[0].Name})", "");

            return(feature);
        }
Beispiel #8
0
            void createSpiritAbility()
            {
                var resource = Helpers.CreateAbilityResource(prefix + "ChannelResource", "", "", "", null);

                resource.SetIncreasedByStat(1, hex_engine.hex_secondary_stat);

                var positive_energy_feature = library.Get <BlueprintFeature>("a79013ff4bcd4864cb669622a29ddafb");
                var context_rank_config     = Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.ClassLevel, progression: ContextRankProgression.StartPlusDivStep,
                                                                              type: AbilityRankType.Default, classes: hex_engine.hex_classes, startLevel: 1, stepLevel: 2);
                var dc_scaling = Common.createContextCalculateAbilityParamsBasedOnClasses(hex_engine.hex_classes, hex_engine.hex_secondary_stat);

                spirit_ability = Helpers.CreateFeature(prefix + "LifeSpiritChannelPositiveEnergyFeature",
                                                       "Channel Positive Energy",
                                                       "Shaman channels positive energy and can choose to deal damage to undead creatures or to heal living creatures.\nChanneling energy causes a burst that either heals all living creatures or damages all undead creatures in a 30-foot radius centered on the shaman. The amount of damage dealt or healed is equal to 1d6 points of damage plus 1d6 points of damage for every two shaman levels beyond 1st (2d6 at 3rd, 3d6 at 5th, and so on). Creatures that take damage from channeled energy receive a Will save to halve the damage. The DC of this save is equal to 10 + 1/2 the shaman's level + the shaman's Charisma modifier. Creatures healed by channel energy cannot exceed their maximum hit point total—all excess healing is lost. A shaman may channel energy a number of times per day equal to 1 + her Charisma modifier. This is a standard action that does not provoke an attack of opportunity. A shaman can choose whether or not to include herself in this effect.",
                                                       "",
                                                       positive_energy_feature.Icon,
                                                       FeatureGroup.None);

                heal_living = ChannelEnergyEngine.createChannelEnergy(ChannelEnergyEngine.ChannelType.PositiveHeal,
                                                                      prefix + "LifeSpiritChannelEnergyHealLiving",
                                                                      "",
                                                                      "Channeling positive energy causes a burst that heals all living creatures in a 30 - foot radius centered on the shaman. The amount of damage healed is equal to 1d6 plus 1d6 for every two shaman levels beyond first.",
                                                                      "",
                                                                      context_rank_config,
                                                                      dc_scaling,
                                                                      Helpers.CreateResourceLogic(resource));
                harm_undead = ChannelEnergyEngine.createChannelEnergy(ChannelEnergyEngine.ChannelType.PositiveHarm,
                                                                      prefix + "LifeSpiritChannelEnergyHarmUndead",
                                                                      "",
                                                                      "Channeling energy causes a burst that damages all undead creatures in a 30 - foot radius centered on the shaman. The amount of damage dealt is equal to 1d6 plus 1d6 for every two shaman levels beyond first. Creatures that take damage from channeled energy receive a Will save to halve the damage. The DC of this save is equal to 10 + 1 / 2 the shaman's level + the shaman's Charisma modifier.",
                                                                      "",
                                                                      context_rank_config,
                                                                      dc_scaling,
                                                                      Helpers.CreateResourceLogic(resource));

                var heal_living_base = Common.createVariantWrapper(prefix + "LifeSpiritPositiveHealBase", "", heal_living);
                var harm_undead_base = Common.createVariantWrapper(prefix + "LifeSpiritPositiveHarmBase", "", harm_undead);

                ChannelEnergyEngine.storeChannel(heal_living, spirit_ability, ChannelEnergyEngine.ChannelType.PositiveHeal);
                ChannelEnergyEngine.storeChannel(harm_undead, spirit_ability, ChannelEnergyEngine.ChannelType.PositiveHarm);

                spirit_ability.AddComponent(Helpers.CreateAddFacts(heal_living_base, harm_undead_base));
                spirit_ability.AddComponent(Helpers.CreateAddAbilityResource(resource));
                extra_channel = ChannelEnergyEngine.createExtraChannelFeat(heal_living, spirit_ability, extra_channel_prefix + "ExtraChannelShamanLifeSpirit", extra_channel_name, "");
            }
        static internal void FixMissingAssets()
        {
            List <BlueprintUnitFact> missing_facts = new List <BlueprintUnitFact>();

            //broken channels that were removed in 1.29
            missing_facts.Add(createDummyAbility("ChannelSmiteQuickChannelEnergyEmpyrealHarm", "89804559ac9dd22e23053d0b8c939eae"));
            missing_facts.Add(createDummyAbility("ChannelSmiteQuickChannelEnergyPaladinHarm", "21e46c86f0a5714e918572662d76f4c1"));
            missing_facts.Add(createDummyAbility("ChannelSmiteQuickChannelEnergyHospitalerHarm", "a4c40f80cdddfe2e926c5e8560ac512c"));
            missing_facts.Add(createDummyAbility("ChannelSmiteQuickChannelPositiveHarm", "4f476c1d5375337ee1c6ce7a154d269b"));
            missing_facts.Add(createDummyAbility("ChannelSmiteQuickWitchPostiveHarm", "247078e91cb34f9ea7538e53811892e8"));
            missing_facts.Add(createDummyAbility("ChannelSmiteQuickChannelNegativeEnergy", "e10c33b872aa274e80ec96a132ec08ae"));
            missing_facts.Add(createDummyAbility("ChannelSmiteQuickWitchNegativeHarm", "d2479ab66de342adb092948d4bb85948"));

            missing_facts.Add(createDummyFeature("PositiveChanneling1Feature", "fc168f08cbeb4a5e90f1d5a4cfe82f42"));
            missing_facts.Add(createDummyFeature("PositiveChanneling2Feature", "56f12dafd5bf495fabf9b2f938a03d63"));

            missing_facts.Add(createDummyFeatureSelection("BloodlineUndeadSpellLevel1Selection", "cacde9103efa44979349a36e104c5b71"));

            Action <UnitDescriptor> fix_action = delegate(UnitDescriptor u)
            {
                foreach (var missing_fact in missing_facts)
                {
                    if (u.HasFact(missing_fact))
                    {
                        u.RemoveFact(missing_fact);
                    }
                }
            };

            //remove channels explicit abilities that should now all be under drop-down menu
            Action <UnitDescriptor> fix_channel = delegate(UnitDescriptor u)
            {
                var channels = ChannelEnergyEngine.getChannelAbilities(p => true);
                foreach (var channel in channels)
                {
                    if (u.HasFact(channel))
                    {
                        u.RemoveFact(channel);
                    }
                }
            };

            save_game_actions.Add(fix_action);
            save_game_actions.Add(fix_channel);
        }
Beispiel #10
0
        static internal void load()
        {
            createFuriousFocus();
            replaceIconsForExistingFeats();
            createRagingBrutality();
            createBloodedArcaneStrike();
            createRivingStrike();
            createCoordiantedShot();
            createStalwart();
            FeralCombatTraining.load();

            ChannelEnergyEngine.createQuickChannel();
            ChannelEnergyEngine.createChannelSmite();
            createPlanarWildShape();
            createGuidedHand();
            createDeadeyesBlessing();
            createExtraChannelPaladin();
            ChannelEnergyEngine.createChannelingScourge();
            ChannelEnergyEngine.createImprovedChannel();
            ChannelEnergyEngine.createVersatileChanneler();
        }
Beispiel #11
0
        static void createExtraChannelPaladin()
        {
            var paladin_extra_channel_resource = Helpers.CreateAbilityResource("PaladinExtraChannelResource", "", "", "", null);

            paladin_extra_channel_resource.SetFixedResource(0);

            var paladin_channel_energy = library.Get <BlueprintFeature>("cb6d55dda5ab906459d18a435994a760");
            var paladin_heal           = library.Get <BlueprintAbility>("6670f0f21a1d7f04db2b8b115e8e6abf");
            var paladin_harm           = library.Get <BlueprintAbility>("4937473d1cfd7774a979b625fb833b47");

            BlueprintAbility paladin_harm_base = paladin_channel_energy.GetComponent <AddFacts>().Facts[0] as BlueprintAbility;
            BlueprintAbility paladin_heal_base = paladin_channel_energy.GetComponent <AddFacts>().Facts[1] as BlueprintAbility;

            var heal_living_extra = ChannelEnergyEngine.createChannelEnergy(ChannelEnergyEngine.ChannelType.PositiveHeal,
                                                                            "PaladinChannelEnergyHealLivingExtra",
                                                                            paladin_heal.Name + " (Extra)",
                                                                            paladin_heal.Description,
                                                                            "",
                                                                            paladin_heal.GetComponent <ContextRankConfig>(),
                                                                            paladin_heal.GetComponent <NewMechanics.ContextCalculateAbilityParamsBasedOnClasses>(),
                                                                            Helpers.CreateResourceLogic(paladin_extra_channel_resource, true, 1));

            var harm_undead_extra = ChannelEnergyEngine.createChannelEnergy(ChannelEnergyEngine.ChannelType.PositiveHarm,
                                                                            "PaladinChannelEnergyHarmUndeadExtra",
                                                                            paladin_harm.Name + " (Extra)",
                                                                            paladin_harm.Description,
                                                                            "",
                                                                            paladin_harm.GetComponent <ContextRankConfig>(),
                                                                            paladin_harm.GetComponent <NewMechanics.ContextCalculateAbilityParamsBasedOnClasses>(),
                                                                            Helpers.CreateResourceLogic(paladin_extra_channel_resource, true, 1));

            paladin_heal_base.addToAbilityVariants(heal_living_extra);
            paladin_harm_base.addToAbilityVariants(harm_undead_extra);
            ChannelEnergyEngine.storeChannel(heal_living_extra, paladin_channel_energy, ChannelEnergyEngine.ChannelType.PositiveHeal);
            ChannelEnergyEngine.storeChannel(harm_undead_extra, paladin_channel_energy, ChannelEnergyEngine.ChannelType.PositiveHarm);

            paladin_channel_energy.AddComponent(Helpers.CreateAddFacts(heal_living_extra, harm_undead_extra));
            paladin_channel_energy.AddComponent(Helpers.CreateAddAbilityResource(paladin_extra_channel_resource));
            paladin_channel_extra = ChannelEnergyEngine.createExtraChannelFeat(heal_living_extra, paladin_channel_energy, "ExtraChannelPaladin", "Extra Channel (Paladin)", "");
        }
Beispiel #12
0
            void createDeathlyBeingHex()
            {
                var icon = library.Get <BlueprintFeature>("b0acce833384b9b428f32517163c9117").Icon; //deaths_embrace

                var energy_drain_immunity_feature = library.Get <BlueprintFeature>("efe0344bca1290244a277ed5c45d9ff2");

                energy_drain_immunity_feature.HideInCharacterSheetAndLevelUp = true;

                var living_feature1 = Helpers.CreateFeature(prefix + "DeathlyBeingLiving1Feature",
                                                            "Deathly Being",
                                                            "",
                                                            "",
                                                            icon,
                                                            FeatureGroup.None,
                                                            Helpers.Create <UndeadMechanics.ConsiderUndeadForHealing>(),
                                                            Helpers.Create <AddEnergyImmunity>(a => a.Type = DamageEnergyType.NegativeEnergy)
                                                            );

                living_feature1.HideInUI = true;

                var living_feature2 = Helpers.CreateFeature(prefix + "DeathlyBeingLiving2Feature",
                                                            "",
                                                            "",
                                                            "",
                                                            icon,
                                                            FeatureGroup.None,
                                                            Common.createContextSavingThrowBonusAgainstDescriptor(4, ModifierDescriptor.UntypedStackable, SpellDescriptor.Death),
                                                            Helpers.CreateAddFeatureOnClassLevel(energy_drain_immunity_feature, 16, hex_engine.hex_classes)
                                                            );

                living_feature1.HideInUI = true;

                var undead_feature1 = Helpers.CreateFeature(prefix + "DeathlyBeingUndead1Feature",
                                                            "",
                                                            "",
                                                            "",
                                                            icon,
                                                            FeatureGroup.None,
                                                            Helpers.Create <SavingThrowBonusAgainstSpecificSpells>(c =>
                {
                    c.Spells         = new BlueprintAbility[0];
                    c.Value          = 1;
                    c.BypassFeatures = new BlueprintFeature[] { library.Get <BlueprintFeature>("3d8e38c9ed54931469281ab0cec506e9") };                                                            //sun domain
                }
                                                                                                                   )
                                                            );

                ChannelEnergyEngine.addChannelResitance(undead_feature1);

                var undead_feature2 = Helpers.CreateFeature(prefix + "DeathlyBeingUndead2Feature",
                                                            "",
                                                            "",
                                                            "",
                                                            icon,
                                                            FeatureGroup.None,
                                                            Helpers.Create <NewMechanics.ContextSavingThrowBonusAgainstSpecificSpells>(c =>
                {
                    c.Spells         = new BlueprintAbility[0];
                    c.Value          = Helpers.CreateContextValue(AbilityRankType.StatBonus);
                    c.BypassFeatures = new BlueprintFeature[] { library.Get <BlueprintFeature>("3d8e38c9ed54931469281ab0cec506e9") };                                          //sun domain
                }),
                                                            Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.ClassLevel, classes: hex_engine.hex_classes,
                                                                                            progression: ContextRankProgression.Custom,
                                                                                            customProgression: new (int, int)[2] {
Beispiel #13
0
        static void createBloodfireAndBloodrain()
        {
            bloodfire = Helpers.CreateFeature("BloodFireHolyVindicatorFeature",
                                              "Bloodfire",
                                              "At 5th level, while a vindicator’s stigmata are bleeding, his blood runs down his weapons like sacred or profane liquid energy; when he uses Channel Smite, the damage increases by 1d6, and if the target fails its save, it is sickened and takes 1d6 points of bleed damage each round on its turn. The target can attempt a new save every round to end the sickened and bleed effects.",
                                              "",
                                              null,
                                              FeatureGroup.None);

            var bloodfire_buff = Helpers.CreateBuff("BloodFireHolyVindicatorBuff",
                                                    bloodfire.Name,
                                                    bloodfire.Description,
                                                    "",
                                                    null,
                                                    null);

            bloodfire_buff.SetBuffFlags(BuffFlags.HiddenInUi);

            bloodrain = Helpers.CreateFeature("BloodRainHolyVindicatorFeature",
                                              "Bloodrain",
                                              "At 9th level, while his stigmata are bleeding, the vindicator’s harmful channeled energy is accompanied by a burst of sacred or profane liquid energy, increasing the damage by 1d6. Creatures failing their saves against the channeled energy become sickened and take 1d6 points of bleed damage each round. Affected creatures can attempt a new save every round to end the sickened and bleed effects.",
                                              "",
                                              null,
                                              FeatureGroup.None);

            var bloodrain_buff = Helpers.CreateBuff("BloodRainHolyVindicatorBuff",
                                                    bloodrain.Name,
                                                    bloodrain.Description,
                                                    "",
                                                    null,
                                                    null);

            bloodrain_buff.SetBuffFlags(BuffFlags.HiddenInUi);

            foreach (var buff_list in stigmata_buffs.Values)
            {
                foreach (var buff in buff_list)
                {
                    Common.addContextActionApplyBuffOnFactsToActivatedAbilityBuffNoRemove(buff, bloodfire_buff, bloodfire);
                    Common.addContextActionApplyBuffOnFactsToActivatedAbilityBuffNoRemove(buff, bloodrain_buff, bloodrain);
                }
            }

            var bleed_buff    = library.Get <BlueprintBuff>("75039846c3d85d940aa96c249b97e562");
            var sickened_buff = library.Get <BlueprintBuff>("4e42460798665fd4cb9173ffa7ada323");

            var blood_buff = Helpers.CreateBuff("HolyVindicatorBloodBuff",
                                                "",
                                                "",
                                                "",
                                                null,
                                                null,
                                                Helpers.CreateAddFactContextActions(new GameAction[] { Common.createContextActionApplyBuff(bleed_buff, Helpers.CreateContextDuration(), is_permanent: true, dispellable: false),
                                                                                                       Common.createContextActionApplyBuff(sickened_buff, Helpers.CreateContextDuration(), is_permanent: true, dispellable: false) }),
                                                Helpers.Create <NewMechanics.BuffRemoveOnSave>(b => b.SaveType = SavingThrowType.Will)
                                                );

            blood_buff.SetBuffFlags(BuffFlags.HiddenInUi);

            var save_failed_action = Common.createContextSavedApplyBuff(blood_buff, DurationRate.Rounds, is_permanent: true, is_dispellable: false);

            /*var save_failed_action = Common.createContextActionSavingThrow(SavingThrowType.Will,
             *                                                             Helpers.CreateActionList(Common.createContextSavedApplyBuff(sickened_buff, DurationRate.Rounds, is_permanent: true, is_dispellable: false))
             * ;
             *                                                             );*/

            var positive_damage = Helpers.CreateActionDealDamage(DamageEnergyType.PositiveEnergy, Helpers.CreateContextDiceValue(DiceType.D6, 1), IgnoreCritical: true);
            var negative_damage = Helpers.CreateActionDealDamage(DamageEnergyType.NegativeEnergy, Helpers.CreateContextDiceValue(DiceType.D6, 1), IgnoreCritical: true);

            var smite_positive_action = Helpers.CreateConditional(Common.createContextConditionCasterHasFact(bloodfire_buff), new GameAction[] { positive_damage, save_failed_action });
            var smite_negative_action = Helpers.CreateConditional(Common.createContextConditionCasterHasFact(bloodfire_buff), new GameAction[] { negative_damage, save_failed_action });
            var positive_action       = Helpers.CreateConditional(Common.createContextConditionCasterHasFact(bloodrain_buff), new GameAction[] { positive_damage, save_failed_action });
            var negative_action       = Helpers.CreateConditional(Common.createContextConditionCasterHasFact(bloodrain_buff), new GameAction[] { negative_damage, save_failed_action });

            ChannelEnergyEngine.addBloodfireAndBloodrainActions(positive_action, negative_action, smite_positive_action, smite_negative_action);
        }
Beispiel #14
0
        static void createStigmata()
        {
            ModifierDescriptor[] bonus_descriptors = new ModifierDescriptor[] { ModifierDescriptor.Sacred, ModifierDescriptor.Profane };
            StatType[]           stats             = new StatType[] { StatType.AC, StatType.AdditionalAttackBonus, StatType.AdditionalDamage };
            string []            stats_description = new string[] { "Armor Class Bonus", "Attack Bonus", "Damage Bonus" };

            var icon_profane = library.Get <BlueprintAbility>("a6e59e74cba46a44093babf6aec250fc").Icon; //slay living
            var icon_sacred  = library.Get <BlueprintAbility>("f6f95242abdfac346befd6f4f6222140").Icon; //slay living

            stigmata = Helpers.CreateFeature("HolyVindicatorStigmata",
                                             "Stigmata",
                                             "A vindicator willingly gives his blood in service to his faith, and is marked by scarified wounds appropriate to his deity. At 2nd level, he may stop or start the flow of blood by force of will as a standard action; at 6th level it becomes a move action, and at 10th level it becomes a swift action. Activating stigmata causes holy or unholy damage equal to half the vindicator’s class level every round. While the stigmata are bleeding, the vindicator gains a sacred bonus (if he channels positive energy) or profane bonus (if he channels negative energy) equal to half his class level. Each time he activates his stigmata, the vindicator decides if the bonus applies to attack rolls, weapon damage rolls, Armor Class, saving throws or spell penetration checks; to change what the bonus applies to, the vindicator must deactivate and reactivate his stigmata. While his stigmata are burning, the vindicator ignores blood drain and bleed damage from any other source.",
                                             "",
                                             icon_sacred,
                                             FeatureGroup.None);

            stigmata_move = library.CopyAndAdd <BlueprintFeature>(stigmata.AssetGuid, "HolyVindicatorStigmataMove", "");
            stigmata_move.SetName("Stigmata: Move Action");
            stigmata_move.AddComponent(Helpers.Create <ActivatableAbilityActionTypeModierMechanics.ModifyActivatableAbilityGroupActionType>(m =>
                                                                                                                                            { m.group = ActivatableAbilityGroupExtension.Stigmata.ToActivatableAbilityGroup();
                                                                                                                                              m.action = CommandType.Move; }
                                                                                                                                            )
                                       );

            stigmata_swift = library.CopyAndAdd <BlueprintFeature>(stigmata.AssetGuid, "HolyVindicatorStigmataSwift", "");
            stigmata_swift.AddComponent(Common.createRemoveFeatureOnApply(stigmata_move));
            stigmata_swift.SetName("Stigmata: Swift Action");
            stigmata_swift.AddComponent(Helpers.Create <ActivatableAbilityActionTypeModierMechanics.ModifyActivatableAbilityGroupActionType>(m =>
            {
                m.group  = ActivatableAbilityGroupExtension.Stigmata.ToActivatableAbilityGroup();
                m.action = CommandType.Swift;
            }
                                                                                                                                             )
                                        );



            var bleed_immunity = Common.createBuffDescriptorImmunity(SpellDescriptor.Bleed);

            foreach (var bonus_descriptor in bonus_descriptors)
            {
                var icon                = bonus_descriptor == ModifierDescriptor.Sacred ? icon_sacred : icon_profane;
                var buffs               = new List <BlueprintBuff>();
                var dmg_type            = bonus_descriptor == ModifierDescriptor.Sacred ? DamageEnergyType.Holy : DamageEnergyType.Unholy;
                var add_context_actions = Helpers.CreateAddFactContextActions(Common.createContextActionRemoveBuffsByDescriptor(SpellDescriptor.Bleed),
                                                                              null,
                                                                              Helpers.CreateActionDealDamage(dmg_type,
                                                                                                             Helpers.CreateContextDiceValue(DiceType.Zero, bonus: Helpers.CreateContextValue(AbilityRankType.StatBonus))
                                                                                                             )
                                                                              );
                var context_rank_config = Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.ClassLevel, classes: getHolyVindicatorArray(),
                                                                          type: AbilityRankType.StatBonus, progression: ContextRankProgression.Div2);

                for (int i = 0; i < stats.Length; i++)
                {
                    var buff = Helpers.CreateBuff(bonus_descriptor.ToString() + "Stigmata" + stats[i].ToString() + "Buff",
                                                  $"{bonus_descriptor.ToString()} Stigmata: {stats_description[i]}",
                                                  stigmata.Description,
                                                  "",
                                                  icon,
                                                  null,
                                                  add_context_actions,
                                                  bleed_immunity,
                                                  Helpers.CreateAddContextStatBonus(stats[i], bonus_descriptor, rankType: AbilityRankType.StatBonus),
                                                  context_rank_config
                                                  );
                    buffs.Add(buff);
                }

                var saves_buff = Helpers.CreateBuff(bonus_descriptor.ToString() + "Stigmata" + "SavesBuff",
                                                    $"{bonus_descriptor.ToString()} Stigmata: Saving Throws Bonus",
                                                    buffs[0].Description,
                                                    "",
                                                    icon,
                                                    null,
                                                    Helpers.CreateAddContextStatBonus(StatType.SaveFortitude, bonus_descriptor, rankType: AbilityRankType.StatBonus),
                                                    Helpers.CreateAddContextStatBonus(StatType.SaveReflex, bonus_descriptor, rankType: AbilityRankType.StatBonus),
                                                    Helpers.CreateAddContextStatBonus(StatType.SaveWill, bonus_descriptor, rankType: AbilityRankType.StatBonus),
                                                    context_rank_config
                                                    );
                buffs.Add(saves_buff);
                var spell_penetration_buff = Helpers.CreateBuff(bonus_descriptor.ToString() + "Stigmata" + "SpellPenetrationBuff",
                                                                $"{bonus_descriptor.ToString()} Stigmata: Caster Level Check Bonus",
                                                                buffs[0].Description,
                                                                "",
                                                                icon,
                                                                null,
                                                                Helpers.Create <NewMechanics.CasterLevelCheckBonus>(s => s.Value = Helpers.CreateContextValue(AbilityRankType.StatBonus)),
                                                                context_rank_config
                                                                );
                buffs.Add(spell_penetration_buff);

                stigmata_buffs.Add(bonus_descriptor, buffs);

                stigmata_abilities.Add(bonus_descriptor, new List <BlueprintActivatableAbility>());
                foreach (var b in buffs)
                {
                    var ability = Helpers.CreateActivatableAbility(b.name.Replace("Buff", "ActivatableAbility"),
                                                                   b.Name,
                                                                   b.Description,
                                                                   "",
                                                                   icon,
                                                                   b,
                                                                   AbilityActivationType.Immediately,
                                                                   CommandType.Standard,
                                                                   null
                                                                   );

                    ability.Group = ActivatableAbilityGroupExtension.Stigmata.ToActivatableAbilityGroup();
                    ability.DeactivateIfCombatEnded      = !test_mode;
                    ability.DeactivateIfOwnerDisabled    = true;
                    ability.DeactivateIfOwnerUnconscious = true;
                    stigmata_abilities[bonus_descriptor].Add(ability);
                }

                var add_stigmata = Helpers.CreateFeature($"HolyVindicator{bonus_descriptor.ToString()}StigmataFeature",
                                                         "",
                                                         "",
                                                         "",
                                                         null,
                                                         FeatureGroup.None,
                                                         Helpers.CreateAddFacts(stigmata_abilities[bonus_descriptor].ToArray())
                                                         );
                add_stigmata.HideInUI = true;

                stigmata.AddComponent(Helpers.Create <NewMechanics.AddFeatureIfHasFactsFromList>(a => { a.Feature = add_stigmata; a.CheckedFacts = new BlueprintUnitFact[0]; }));
            }

            ChannelEnergyEngine.registerStigmata(stigmata);
        }
Beispiel #15
0
 static void createVindicatorShield()
 {
     ChannelEnergyEngine.createHolyVindicatorShield();
     vindicator_shield = ChannelEnergyEngine.holy_vindicator_shield;
 }