Пример #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);
        }
Пример #2
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] {