Ejemplo n.º 1
0
        static private void FormatAndStoreSpecialSpell(BlueprintAbility spell, int level)
        {
            var comps = spell.GetComponents <SpellListComponent>();

            if (comps != null)
            {
                foreach (var comp in comps)
                {
                    spell.RemoveComponent(comp);
                }
            }
            if (spell.GetComponent <UniqueSpellComponent>() == null)
            {
                spell.AddComponent(Helpers.Create <UniqueSpellComponent>());
            }
            specialSpells.Add(spell);
            specialSpellLevels.Add(level);
        }
Ejemplo n.º 2
0
        static void createGangUp()
        {
            var freebooter_bane_buff = library.Get <BlueprintBuff>("76dabd40a1c1c644c86ce30e41ad5cab");
            var gang_up_buff         = library.CopyAndAdd <BlueprintBuff>(vindicative_smite_buff.AssetGuid, "GangUpBuff", "");

            gang_up_buff.SetName("Gang Up");
            gang_up_buff.SetIcon(freebooter_bane_buff.Icon);
            gang_up_buff.ReplaceComponent <ACBonusAgainstTarget>(a => { a.CheckCaster = false; a.CheckCasterFriend = true; });
            gang_up_buff.ReplaceComponent <AttackBonusAgainstTarget>(a => { a.CheckCaster = false; a.CheckCasterFriend = true; });
            gang_up_buff.ReplaceComponent <DamageBonusAgainstTarget>(a => { a.CheckCaster = false; a.CheckCasterFriend = true; });


            gang_up_ability = library.CopyAndAdd <BlueprintAbility>(vindicative_smite_ability.AssetGuid, "GangUpAbility", "");
            gang_up_ability.RemoveComponents <AbilityTargetHasFact>();
            gang_up_ability.RemoveComponents <AbilityResourceLogic>();
            gang_up_ability.AddComponent(Common.createAbilityTargetHasFact(false, vindicative_smite_buff));
            gang_up_ability.ActionType = CommandType.Move;

            foreach (var c in gang_up_ability.GetComponents <ContextRankConfig>().ToArray())
            {
                var new_c = c.CreateCopy();
                Helpers.SetField(new_c, "m_Min", 1);
                Helpers.SetField(new_c, "m_UseMin", true);
                Helpers.SetField(new_c, "m_Progression", ContextRankProgression.Div2);
                gang_up_ability.ReplaceComponent(c, new_c);
            }

            var apply_buff = Common.createContextActionApplyBuff(gang_up_buff, Helpers.CreateContextDuration(Helpers.CreateContextValue(AbilityRankType.SpeedBonus)), dispellable: false);

            gang_up_ability.ReplaceComponent <AbilityEffectRunAction>(a => a.Actions = Helpers.CreateActionList(apply_buff));
            gang_up_ability.AddComponent(Helpers.CreateContextRankConfig(ContextRankBaseValueType.StatBonus, min: 1, type: AbilityRankType.SpeedBonus, stat: StatType.Charisma));
            gang_up_ability.SetName(gang_up_buff.Name);
            gang_up_ability.SetIcon(gang_up_buff.Icon);
            gang_up_ability.SetDescription("At 5th level, a vindictive bastard forms a close bond with her companions. This allows her to spend a move action to grant half her vindictive smite bonus against a single target to all allies who can see and hear her. This bonus lasts for a number of rounds equal to the vindictive bastard’s Charisma modifier (minimum 1).");

            swift_gang_up_ability            = library.CopyAndAdd <BlueprintAbility>(gang_up_ability.AssetGuid, "SwiftGangUpAbility", "");
            swift_gang_up_ability.ActionType = CommandType.Swift;
            swift_gang_up_ability.SetName("Swift Justice");
            swift_gang_up_ability.SetDescription("At 11th level, a vindictive bastard can activate her gang up ability as a swift action.");

            gang_up       = Common.AbilityToFeature(gang_up_ability, false, "");
            swift_justice = Common.AbilityToFeature(swift_gang_up_ability, false, "");
        }
Ejemplo n.º 3
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);
        }