示例#1
0
        static internal BlueprintAbility CreateAddDCAbl()
        {
            AddCLDCOnNextSpell_AR component = Helpers.Create <AddCLDCOnNextSpell_AR>();

            component.valueCL     = 0;
            component.valueDC     = 1;
            component.PotentMagic = PotentMagic.exploit;
            Sprite        icon = Helpers.GetIcon("f001c73999fb5a543a199f890108d936");   //vanish
            BlueprintBuff buff = Helpers.CreateBuff("ArcanistClassReservoirAddDCBuff", "", "",
                                                    "85143f03db31082e776c095f3518a505", //MD5-32[ArcanistClass.Reservoir.AddDCBuff]
                                                    icon,
                                                    null,
                                                    component);

            buff.SetName(Helpers.CreateString("ArcanistClass.Reservoir.AddDCBuff.Name"));
            buff.SetDescription(Helpers.CreateString("ArcanistClass.Reservoir.AddDCBuff.Desc"));

            var ablResourceLogicComp = Helpers.Create <AbilityResourceLogic>();

            ablResourceLogicComp.RequiredResource = resource;
            ablResourceLogicComp.IsSpendResource  = true;
            ablResourceLogicComp.CostIsCustom     = false;
            ablResourceLogicComp.Amount           = 1;

            var ablEffectComp       = Helpers.Create <AbilityEffectRunAction>();
            var ablEffectCompAction = Helpers.Create <ContextActionApplyBuff>();

            ablEffectCompAction.Buff            = buff;
            ablEffectCompAction.Permanent       = false;
            ablEffectCompAction.DurationValue   = PresetDurations.threeRounds;
            ablEffectCompAction.IsFromSpell     = false;
            ablEffectCompAction.IsNotDispelable = false;
            ablEffectCompAction.ToCaster        = false;
            ablEffectCompAction.AsChild         = true;
            ablEffectComp.Actions = new ActionList {
                Actions = new GameAction[] { null, ablEffectCompAction }
            };

            BlueprintAbility abl = Helpers.CreateAbility("ArcanistClassReservoirAddDCAbl", "", "",
                                                         "a572d2412acba81b25cb7ca77c129010",//MD5-32[ArcanistClass.Reservoir.AddDCAbl]
                                                         icon,
                                                         AbilityType.Supernatural,
                                                         Kingmaker.UnitLogic.Commands.Base.UnitCommand.CommandType.Free,
                                                         AbilityRange.Personal,
                                                         "",
                                                         "",
                                                         ablResourceLogicComp,
                                                         ablEffectComp,
                                                         Helpers.Create <AbilityRequirementNoSupremancy>());

            abl.SetName(Helpers.CreateString("ArcanistClass.Reservoir.AddDCAbl.Name"));
            abl.SetDescription(Helpers.CreateString("ArcanistClass.Reservoir.AddDCAbl.Desc"));
            abl.LocalizedDuration    = Helpers.CreateString("ArcaneTide.ThreeRounds");
            abl.LocalizedSavingThrow = Helpers.CreateString("ArcaneTide.WillSave.CanAbandon");
            return(abl);
        }
示例#2
0
        static void createVindicativeSmite()
        {
            vindicative_smite_buff = library.CopyAndAdd <BlueprintBuff>("b6570b8cbb32eaf4ca8255d0ec3310b0", "VindicativeSmiteBuff", "");
            vindicative_smite_buff.SetName("Vindictive Smite");
            vindicative_smite_buff.RemoveComponents <IgnoreTargetDR>();

            Common.addConditionToResoundingBlow(Common.createContextConditionHasBuffFromCaster(vindicative_smite_buff));


            var vindicative_smite_allowed = Helpers.CreateBuff("VindicativeSmiteAllowedBuff",
                                                               "Vindictive Smite Allowed",
                                                               "",
                                                               "",
                                                               vindicative_smite_buff.Icon,
                                                               null);

            vindicative_smite_allowed.SetBuffFlags(BuffFlags.RemoveOnRest);


            vindicative_smite_ability = library.CopyAndAdd <BlueprintAbility>("7bb9eb2042e67bf489ccd1374423cdec", "VindicativeSmiteAbility", "");
            vindicative_smite_ability.SetName(vindicative_smite_buff.Name);
            vindicative_smite_ability.SetDescription("A vindictive bastard is particularly ruthless against those who have harmed her or her allies. Once per day as a swift action, she can smite one target within sight who has dealt hit point damage to her or an ally. She adds her Charisma modifier to her attack rolls and adds her paladin level to damage rolls against the target of her smite. In addition, while vindictive smite is in effect, the vindictive bastard gains a deflection bonus equal to her Charisma bonus (if any) to her AC against attacks by the target of the smite.\n"
                                                     + "The vindictive smite effect remains until the target of the smite is dead or the next time the vindictive bastard rests and regains her uses of this ability. At 4th level and every 3 levels thereafter, the vindictive bastard can invoke her vindictive smite one additional time per day, to a maximum of seven times per day at 19th level.");

            vindicative_smite_ability.ReplaceComponent <AbilityCasterAlignment>(Common.createAbilityTargetHasFact(false, vindicative_smite_allowed));
            vindicative_smite_ability.AddComponent(Common.createAbilityTargetHasFact(true, vindicative_smite_buff));

            var apply_buff = Common.createContextActionApplyBuff(vindicative_smite_buff, Helpers.CreateContextDuration(), is_permanent: true, dispellable: false);

            vindicative_smite_ability.ReplaceComponent <AbilityEffectRunAction>(a => a.Actions = Helpers.CreateActionList(apply_buff));

            var config     = vindicative_smite_ability.GetComponents <ContextRankConfig>().Where(c => c.IsBasedOnClassLevel).FirstOrDefault();
            var new_config = config.CreateCopy();

            Helpers.SetField(new_config, "m_Class", getVindicativeBastardArray());
            vindicative_smite_ability.ReplaceComponent(config, new_config);

            var apply_allowed = Common.createContextActionApplyBuff(vindicative_smite_allowed, Helpers.CreateContextDuration(), is_permanent: true, dispellable: false);

            GameAction trigger = apply_allowed;

            if (!test_mode)
            {
                trigger = Helpers.CreateConditional(Helpers.Create <ContextConditionIsEnemy>(), trigger);
            }

            var vindicative_smite_trigger = Helpers.CreateBuff("VindicativeSmiteTriggerBuff",
                                                               "",
                                                               "",
                                                               "",
                                                               null,
                                                               null,
                                                               Helpers.Create <NewMechanics.AddIncomingDamageTriggerOnAttacker>(c => c.Actions = Helpers.CreateActionList(trigger))
                                                               );

            vindicative_smite_trigger.SetBuffFlags(BuffFlags.HiddenInUi);

            var vindicative_smite_trigger_area = library.CopyAndAdd <BlueprintAbilityAreaEffect>("7ced0efa297bd5142ab749f6e33b112b", "VindicativeSmiteTriggerArea", "");

            vindicative_smite_trigger_area.Size = 100.Feet();
            vindicative_smite_trigger_area.ReplaceComponent <AbilityAreaEffectBuff>(a => a.Buff = vindicative_smite_trigger);

            var vindicative_smite_area_buff = library.CopyAndAdd <BlueprintBuff>("c96380f6dcac83c45acdb698ae70ffc4", "VindicativeSmiteTriggerAreaBuff", "");

            vindicative_smite_area_buff.ReplaceComponent <AddAreaEffect>(a => a.AreaEffect = vindicative_smite_trigger_area);
            smite_resource = library.Get <BlueprintAbilityResource>("b4274c5bb0bf2ad4190eb7c44859048b");//smite_evil_resource

            vindicative_smite = Helpers.CreateFeature("VindicativeSmiteFeature",
                                                      vindicative_smite_ability.Name,
                                                      vindicative_smite_ability.Description,
                                                      "",
                                                      vindicative_smite_ability.Icon,
                                                      FeatureGroup.None,
                                                      Common.createAuraFeatureComponent(vindicative_smite_area_buff),
                                                      Helpers.CreateAddAbilityResource(smite_resource),
                                                      Helpers.CreateAddFact(vindicative_smite_ability)
                                                      );

            add_vindicative_smite_use = library.CopyAndAdd <BlueprintFeature>("0f5c99ffb9c084545bbbe960b825d137", "VindicativeSmiteAdditionalUse", "");
            add_vindicative_smite_use.SetName("Vindicative Smite - Additional Use");
            add_vindicative_smite_use.SetDescription(vindicative_smite.Description);
        }
示例#3
0
        static public BlueprintFeature Create()
        {
            MagicSupremancyBuffComp comp = Helpers.Create <MagicSupremancyBuffComp>();

            comp.resource = ArcaneReservoir.resource;
            buff          = Helpers.CreateBuff("ArcanistClassMagicSupremancyBuff", "", "",
                                               "d4a2fc38efec094263696cb8342bd274",//MD5-32[ArcanistClass.MagaicSupremancy.Buff]
                                               IconSet.tsunami,
                                               null,
                                               comp);
            buff.SetName(Helpers.CreateString("ArcanistClass.MagaicSupremancy.Buff.Name"));
            buff.SetDescription(Helpers.CreateString("ArcanistClass.MagaicSupremancy.Buff.Desc"));
            //When buff finds the first spell to apply, add buff2 to caster as a flag
            buff2 = Helpers.CreateBuff("ArcanistClassMagicSupremancyBuff2", "", "",
                                       "b1e2b39dd4ecb343322098b3403d11df",//MD5-32[ArcanistClass.MagaicSupremancy.Buff_FindProperSpell]
                                       IconSet.tsunami, null);
            var comp_res = Helpers.Create <AbilityResourceLogic>();

            comp_res.Amount           = 1;
            comp_res.RequiredResource = ArcaneReservoir.resource;
            comp_res.IsSpendResource  = true;
            comp_res.CostIsCustom     = false;

            var ablEffectComp       = Helpers.Create <AbilityEffectRunAction>();
            var ablEffectCompAction = Helpers.Create <ContextActionApplyBuff>();

            ablEffectCompAction.Buff            = buff;
            ablEffectCompAction.Permanent       = false;
            ablEffectCompAction.DurationValue   = PresetDurations.threeRounds;
            ablEffectCompAction.IsFromSpell     = false;
            ablEffectCompAction.IsNotDispelable = false;
            ablEffectCompAction.ToCaster        = false;
            ablEffectCompAction.AsChild         = true;
            ablEffectComp.Actions = new ActionList {
                Actions = new GameAction[] { null, ablEffectCompAction }
            };

            var abl = Helpers.CreateAbility("ArcanistClassMagicSupremancyAbl", "", "",
                                            "fb2a3383e82cbc6ad9c13ac0bca46723",//MD5-32[ArcanistClass.MagicSupremancy.Abl]
                                            IconSet.tsunami,
                                            AbilityType.Supernatural,
                                            UnitCommand.CommandType.Free,
                                            AbilityRange.Personal,
                                            "", "",
                                            comp_res,
                                            ablEffectComp);

            abl.SetName(Helpers.CreateString("ArcanistClass.MagicSupremancy.Abl.Name"));
            abl.SetDescription(Helpers.CreateString("ArcanistClass.MagicSupremancy.Abl.Desc"));
            abl.LocalizedDuration    = Helpers.CreateString("ArcaneTide.ThreeRounds");
            abl.LocalizedSavingThrow = Helpers.CreateString("ArcaneTide.NoSave");

            feat = Helpers.CreateFeature("ArcanistClassMagicSupremancyFeat", "", "",
                                         "e9438c7efd1c9df62a041ba6e360a5c1",//MD5-32[ArcanistClass.MagicSupremancy.Feat]
                                         IconSet.tsunami,
                                         FeatureGroup.None,
                                         Helpers.Create <AddFacts>(a => a.Facts = new BlueprintUnitFact[] { abl }));
            feat.SetName(Helpers.CreateString("ArcanistClass.MagicSupremancy.Feat.Name"));
            feat.SetDescription(Helpers.CreateString("ArcanistClass.MagicSupremancy.Feat.Desc"));
            return(feat);
        }