Esempio n. 1
0
        static public void addToRagingTactician(BlueprintFeature tw)
        {
            var choice_buff = Helpers.CreateBuff(tw.name + "RagingTacticianShareBuff",
                                                 "Raging Tactician: " + tw.Name,
                                                 "You can grant this teamwork feat to all allies within 30 feet who can see and hear you, using your tactician ability.",
                                                 Helpers.MergeIds("52674e84501b449c811bfcf8ce3d5a48", tw.AssetGuid),
                                                 tw.Icon,
                                                 null
                                                 );
            var toggle = Helpers.CreateActivatableAbility(tw.name + "RagingTacticianShareToggleAbility",
                                                          choice_buff.Name,
                                                          choice_buff.Description,
                                                          Helpers.MergeIds("311f55033cea46af96129d053e1e9c36", tw.AssetGuid),
                                                          tw.Icon,
                                                          choice_buff,
                                                          AbilityActivationType.Immediately,
                                                          UnitCommand.CommandType.Free,
                                                          null
                                                          );

            toggle.DeactivateImmediately = true;
            toggle.Group         = ActivatableAbilityGroupExtension.RagingTacticianTeamworkFeatShare.ToActivatableAbilityGroup();
            toggle.WeightInGroup = 1;

            var feature = Common.ActivatableAbilityToFeature(toggle, true, Helpers.MergeIds("949676fc1d3c482c84289c1920b5923c", tw.AssetGuid));

            raging_tactician[0].AddComponent(Helpers.Create <NewMechanics.AddFeatureIfHasFactsFromList>(a => { a.Feature = feature; a.CheckedFacts = new Kingmaker.Blueprints.Facts.BlueprintUnitFact[] { tw }; }));
            tw.AddComponent(Helpers.Create <NewMechanics.AddFeatureIfHasFactsFromList>(a => { a.Feature = feature; a.CheckedFacts = new Kingmaker.Blueprints.Facts.BlueprintUnitFact[] { raging_tactician[0] }; }));

            raging_tactician_buff.GetComponent <TeamworkMechanics.AddFactsFromCasterIfHasBuffs>().facts.Add(tw);
            raging_tactician_buff.GetComponent <TeamworkMechanics.AddFactsFromCasterIfHasBuffs>().prerequsites.Add(choice_buff);
        }
Esempio n. 2
0
        static void createHolyWaterSprinkerAndDeathWard()
        {
            var enchantment = Common.createWeaponEnchantment("HolyWaterSprinklerEnhancement",
                                                             "Holy Water Sprinkler",
                                                             "As a swift action, a grave warden can open a flask of holy water and pour it onto a held or adjacent melee weapon. If the weapon successfully hits an undead creature before the end of the grave warden’s next turn, the undead takes damage as if it took a direct hit from the holy water, taking 2d4 points of damage in addition to the damage from the weapon, if any.\n"
                                                             + "A grave warden can use this ability once per day per grave warden level.",
                                                             "",
                                                             "",
                                                             "",
                                                             0,
                                                             null,
                                                             Common.createWeaponDamageAgainstFact(DamageEnergyType.Holy, Common.undead,
                                                                                                  Helpers.CreateContextDiceValue(DiceType.D4, 2))
                                                             );

            var icon = LoadIcons.Image2Sprite.Create(@"AbilityIcons/HolyWaterJet.png");
            var buff = Helpers.CreateBuff("HolyWaterSprinklerBuff",
                                          enchantment.Name,
                                          enchantment.Description,
                                          "",
                                          icon,
                                          null,
                                          Common.createBuffContextEnchantPrimaryHandWeapon(Common.createSimpleContextValue(1), false, true, enchantment)
                                          );
            var resource = Helpers.CreateAbilityResource("GraveWardenHolyWaterResource", "", "", "", null);

            resource.SetIncreasedByLevel(0, 1, new BlueprintCharacterClass[] { archetype.GetParentClass() });
            var ability = Helpers.CreateActivatableAbility("HolyWaterSprinklerAbility",
                                                           buff.Name,
                                                           buff.Description,
                                                           "",
                                                           buff.Icon,
                                                           buff,
                                                           AbilityActivationType.Immediately,
                                                           CommandType.Swift,
                                                           null,
                                                           resource.CreateActivatableResourceLogic(ResourceSpendType.NewRound),
                                                           Common.createActivatableAbilityUnitCommand(CommandType.Swift),
                                                           Helpers.Create <NewMechanics.ActivatableAbilityMeleeWeaponRestriction>()
                                                           );

            holy_water_sprinkler = Common.ActivatableAbilityToFeature(ability, false);
            holy_water_sprinkler.AddComponent(resource.CreateAddAbilityResource());

            var death_ward_ability = Common.convertToSpellLike(library.Get <BlueprintAbility>("0413915f355a38146bc6ad40cdf27b3f"),
                                                               "GraveWarden",
                                                               new BlueprintCharacterClass[] { archetype.GetParentClass() },
                                                               StatType.Intelligence,
                                                               no_resource: true
                                                               );

            death_ward_ability.setMiscAbilityParametersSelfOnly();
            Common.setAsFullRoundAction(death_ward_ability);
            death_ward_ability.Range = AbilityRange.Personal;

            death_ward_ability.AddComponent(resource.CreateResourceLogic(amount: 4));

            death_ward = Common.AbilityToFeature(death_ward_ability, false);
            death_ward.SetDescription("At 7th level, a grave warden learns to perform a short ritual that grants the benefits of death ward, using his slayer level as his caster level. Performing this ritual requires a full-round action and consumes 4 uses of Holy Water Sprinkler ability. The grave warden can protect only himself with this ability.");
        }
Esempio n. 3
0
        static void createSymphonyOfElysianHeart()
        {
            var buff = library.CopyAndAdd <BlueprintBuff>("1533e782fca42b84ea370fc1dcbf4fc1", "SymphonyOfElysianHeartEffectBuff", ""); //freedom of movement

            var toggle = Common.createToggleAreaEffect(buff, 30.Feet(), Helpers.CreateConditionsCheckerAnd(Helpers.Create <ContextConditionIsAlly>()),
                                                       AbilityActivationType.WithUnitCommand,
                                                       UnitCommand.CommandType.Standard,
                                                       Common.createPrefabLink("79665f3d500fdf44083feccf4cbfc00a"), //inspire competence area
                                                       Common.createPrefabLink("9353083f430e5a44a8e9d6e26faec248")
                                                       );

            toggle.Group = ActivatableAbilityGroup.BardicPerformance;
            toggle.SetNameDescription("Symphony of the Elysian Heart",
                                      "Effect: The complex arpeggios in this piece follow each other so quickly that the music can sound jumbled and disjointed at first. As the piece progresses, however, distinct phrases emerge, creating a wild but harmonious piece that inspires feelings of unfettered freedom. You and your allies within 30 feet who can hear you can move and attack normally for the duration of your performance, even if under the influence of magic that usually impedes movement. This effect is identical to that of freedom of movement, except that this masterpiece does not allow subjects to move and attack normally while underwater unless these creatures would already be able to do so, and only lasts as long as you continue the performance.\n"
                                      + "Use: 1 bardic performance round per round."
                                      );

            toggle.AddComponent(performance_resource.CreateActivatableResourceLogic(ActivatableAbilityResourceLogic.ResourceSpendType.NewRound));
            toggle.DeactivateIfCombatEnded   = true;
            toggle.DeactivateIfOwnerDisabled = true;
            symphony_of_elysian_heart        = Common.ActivatableAbilityToFeature(toggle, false);
            symphony_of_elysian_heart.Groups = new FeatureGroup[] { FeatureGroup.Feat };
            symphony_of_elysian_heart.AddComponents(Helpers.PrerequisiteClassLevel(bard_class, 7, any: true),
                                                    Helpers.PrerequisiteClassLevel(Skald.skald_class, 7, any: true));

            symphony_of_elysian_heart_buff = buff;
        }
Esempio n. 4
0
            void createSpiritAbility()
            {
                var resource = Helpers.CreateAbilityResource(prefix + "BattleSpiritResource", "", "", "", null);

                resource.SetIncreasedByStat(3, secondary_stat);
                var rage = library.Get <BlueprintBuff>("a1ffec0ce7c167a40aaea13dc49b757b");
                var buff = Helpers.CreateBuff(prefix + "BattleSpiritEffectBuff",
                                              "Battle Spirit",
                                              "A shaman surrounds herself with the spirit of battle. Allies within 30 feet of the shaman (including the shaman) receive a +1 morale bonus on attack rolls and weapon damage rolls. At 8th level and 16th level, these bonuses increase by 1. The shaman can use this ability for a number of rounds per day equal to 3 + her Charisma modifier. These rounds do not need to be consecutive.",
                                              "",
                                              rage.Icon,
                                              rage.FxOnStart,
                                              Helpers.CreateAddContextStatBonus(StatType.AdditionalAttackBonus, ModifierDescriptor.Morale, rankType: AbilityRankType.StatBonus),
                                              Helpers.CreateAddContextStatBonus(StatType.AdditionalDamage, ModifierDescriptor.Morale, rankType: AbilityRankType.StatBonus),
                                              Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.ClassLevel, progression: ContextRankProgression.OnePlusDivStep,
                                                                              classes: hex_engine.hex_classes, stepLevel: 8, type: AbilityRankType.StatBonus)
                                              );

                var ability = Common.convertPerformance(library.Get <BlueprintActivatableAbility>("5250fe10c377fdb49be449dfe050ba70"), buff, prefix + "BattleSpirit");

                ability.Group = ActivatableAbilityGroup.None;
                Helpers.SetField(ability, "m_ActivateWithUnitCommand", CommandType.Standard);
                ability.ReplaceComponent <ActivatableAbilityResourceLogic>(a => a.RequiredResource = resource);
                ability.DeactivateIfCombatEnded = true;
                spirit_ability = Common.ActivatableAbilityToFeature(ability, hide: false);
                spirit_ability.AddComponent(Helpers.CreateAddAbilityResource(resource));
            }
        static void createArrowSongStrike()
        {
            var bard_class       = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("772c83a25e2268e448e841dcd548235f");
            var add_spell_combat = Helpers.Create <AddMagusMechanicPart>(); //needed for unit_part magus creation (no actual ability though)

            Helpers.SetField(add_spell_combat, "m_Feature", 1);
            Helpers.SetField(add_spell_combat, "m_MagusClass", bard_class);
            //it should not be used since it sets spell combat to be always active by default (ok on magus though since the corresponding toggle is always active by default)

            var add_magus_part = Helpers.Create <NewMechanics.ActivateUnitPartMagus>(a => a.magus_class = bard_class);

            var add_eldritch_archer = Helpers.Create <AddMagusMechanicPart>();

            Helpers.SetField(add_eldritch_archer, "m_Feature", 5);

            var add_spellstrike = Helpers.Create <AddMagusMechanicPart>();

            Helpers.SetField(add_spellstrike, "m_Feature", 2);

            var spellstrike = library.CopyAndAdd <BlueprintActivatableAbility>("e958891ef90f7e142a941c06c811181e", "ArrowsongMinstrelSpellstrike", "");

            spellstrike.SetName("Arrowsong Strike");
            spellstrike.SetDescription("At 6th level, an Arrowsong minstrel can use spellstrike (as per the magus class feature) to cast a single-target ranged touch attack spell and deliver it through a ranged weapon attack.");
            spellstrike.SetIcon(NewSpells.flame_arrow.Icon);
            arrowsong_strike = Common.ActivatableAbilityToFeature(spellstrike, false);
            arrowsong_strike.AddComponents(add_magus_part, add_eldritch_archer, add_spellstrike);
        }
        public BlueprintFeature createWillOfTheDead()
        {
            var will_of_the_dead = library.Get <BlueprintFeature>("1a5e7191279e7cd479b17a6ca438498c");
            var buff             = Helpers.CreateBuff(name_prefix + "WillOfTheDeadBuff",
                                                      "Will of the Dead",
                                                      "Even undead creatures can be affected by the psychic’s mind-affecting spells. The psychic can spend 2 points from her phrenic pool to overcome an undead creature’s immunity to mind-affecting effects for the purposes of the linked spell. This ability functions even on mindless undead, but has no effect on creatures that aren’t undead. This amplification can be linked only to spells that have the mind-affecting descriptor.",
                                                      "",
                                                      will_of_the_dead.Icon,
                                                      null,
                                                      Helpers.Create <NewMechanics.MetamagicMechanics.MetamagicOnSpellDescriptor>(m =>
            {
                m.Descriptor     = SpellDescriptor.MindAffecting;
                m.amount         = 2;
                m.resource       = resource;
                m.Metamagic      = (Metamagic)MetamagicFeats.MetamagicExtender.ThrenodicSpell;
                m.specific_class = character_class;
            })
                                                      );

            var toggle = Common.buffToToggle(buff, UnitCommand.CommandType.Free, true,
                                             resource.CreateActivatableResourceLogic(spendType: ActivatableAbilityResourceLogic.ResourceSpendType.Never),
                                             Helpers.Create <ResourceMechanics.RestrictionHasEnoughResource>(r => { r.resource = resource; r.amount = 2; })
                                             );

            toggle.Group = ActivatableAbilityGroupExtension.PhrenicAmplification.ToActivatableAbilityGroup();
            return(Common.ActivatableAbilityToFeature(toggle, false));
        }
        public BlueprintFeature createMindsEye()
        {
            var buff = Helpers.CreateBuff(name_prefix + "MindsEyeBuff",
                                          "Mind's Eye",
                                          "Some psychics train their visual and psychic senses, binding them together into a unified focus to better guide their ranged spells and place them with uncanny precision. While casting a spell that requires a ranged attack roll, the psychic can spend 2 points from her phrenic pool and gain a +4 insight bonus on the attack roll.",
                                          "",
                                          Helpers.GetIcon("3c08d842e802c3e4eb19d15496145709"), //uncanny dodge
                                          null,
                                          Helpers.Create <NewMechanics.MetamagicMechanics.MetamagicOnSpellDescriptor>(m =>
            {
                m.amount         = 2;
                m.resource       = resource;
                m.Metamagic      = (Metamagic)MetamagicFeats.MetamagicExtender.RangedAttackRollBonus;
                m.specific_class = character_class;
            })
                                          );

            var toggle = Common.buffToToggle(buff, UnitCommand.CommandType.Free, true,
                                             resource.CreateActivatableResourceLogic(spendType: ActivatableAbilityResourceLogic.ResourceSpendType.Never),
                                             Helpers.Create <ResourceMechanics.RestrictionHasEnoughResource>(r => { r.resource = resource; r.amount = 2; })
                                             );

            toggle.Group = ActivatableAbilityGroupExtension.PhrenicAmplification.ToActivatableAbilityGroup();
            var feature = Common.ActivatableAbilityToFeature(toggle, false);

            feature.AddComponent(Helpers.Create <OnCastMechanics.RangedSpellAttackRollBonusRangeAttackRollMetamagic>(s => { s.spellbook = spellbook; s.bonus = 4; s.descriptor = ModifierDescriptor.UntypedStackable; }));
            return(feature);
        }
        public BlueprintFeature createOngoingDefense()
        {
            var buff = Helpers.CreateBuff(name_prefix + "OngoingDefenseBuff",
                                          "Ongoing Defense",
                                          "The psychic can increase the duration of spells that improve her psychic defenses. She can spend 1 point from her phrenic pool when she casts any intellect fortress, mental barrier or thought shield spell to extend the spell’s duration by 1 round.",
                                          "",
                                          Helpers.GetIcon("62888999171921e4dafb46de83f4d67d"), //shield of dawn
                                          null,
                                          Helpers.Create <NewMechanics.MetamagicMechanics.MetamagicOnSpellDescriptor>(m =>
            {
                m.amount         = 1;
                m.resource       = resource;
                m.Abilities      = NewSpells.mental_barrier.AddToArray(NewSpells.thought_shield).AddToArray(NewSpells.intellect_fortress).ToList();
                m.Metamagic      = (Metamagic)MetamagicFeats.MetamagicExtender.ExtraRoundDuration;
                m.specific_class = character_class;
            })
                                          );

            var toggle = Common.buffToToggle(buff, UnitCommand.CommandType.Free, true,
                                             resource.CreateActivatableResourceLogic(spendType: ActivatableAbilityResourceLogic.ResourceSpendType.Never)
                                             );

            toggle.Group = ActivatableAbilityGroupExtension.PhrenicAmplification.ToActivatableAbilityGroup();
            var feature = Common.ActivatableAbilityToFeature(toggle, false);

            feature.AddComponent(Helpers.Create <OnCastMechanics.IncreaseDurationBy1RoundIfMetamagic>(s => { s.spellbook = spellbook; }));
            return(feature);
        }
        public BlueprintFeature createRelentnessCasting()
        {
            var buff = Helpers.CreateBuff(name_prefix + "RelentnessCastingBuff",
                                          "Relentness Casting",
                                          "The psychic can spend 1 point from her phrenic pool to roll twice on any caster level checks to overcome spell resistance required for the linked spell and take the better result. Because she must decide to spend points from her phrenic pool when she starts casting a spell, the psychic must decide to use this ability before the GM calls for the caster level check.",
                                          "",
                                          LoadIcons.Image2Sprite.Create(@"AbilityIcons/Metamixing.png"),
                                          null,
                                          Helpers.Create <NewMechanics.MetamagicMechanics.MetamagicOnSpellDescriptor>(m =>
            {
                m.amount         = 1;
                m.resource       = resource;
                m.Metamagic      = (Metamagic)MetamagicFeats.MetamagicExtender.RollSpellResistanceTwice;
                m.specific_class = character_class;
            })
                                          );

            var toggle = Common.buffToToggle(buff, UnitCommand.CommandType.Free, true,
                                             resource.CreateActivatableResourceLogic(spendType: ActivatableAbilityResourceLogic.ResourceSpendType.Never)
                                             );

            toggle.AddComponent(Helpers.Create <ResourceMechanics.RestrictionHasEnoughResource>(r => { r.resource = resource; r.amount = 1; }));
            toggle.Group = ActivatableAbilityGroupExtension.PhrenicAmplification.ToActivatableAbilityGroup();
            var feature = Common.ActivatableAbilityToFeature(toggle, false);

            return(feature);
        }
        public BlueprintFeature createFocusedForce()
        {
            var buff = Helpers.CreateBuff(name_prefix + "FocusedForceBuff",
                                          "Focused Force",
                                          "When casting a force spell, the psychic can increase the spell’s damage by spending 1 point from her phrenic pool. Increase the die size for the spell’s damage by one step (from 1d4 to 1d6, 1d6 to 1d8, 1d8 to 1d10, or 1d10 to 1d12). This increases the size of each die rolled, so a spell that dealt 4d6+3 points of force damage would deal 4d8+3 points of force damage instead. This amplification can be linked only to spells that deal force damage, and only if that damage includes a die value. A spell that already uses d12s for damage can’t be amplified in this way.",
                                          "",
                                          Helpers.GetIcon("0a2f7c6aa81bc6548ac7780d8b70bcbc"),
                                          null,
                                          Helpers.Create <NewMechanics.MetamagicMechanics.MetamagicOnSpellDescriptor>(m =>
            {
                m.amount           = 1;
                m.resource         = resource;
                m.spell_descriptor = SpellDescriptor.Force;
                m.Metamagic        = (Metamagic)MetamagicFeats.MetamagicExtender.ForceFocus;
                m.specific_class   = character_class;
            })
                                          );

            var toggle = Common.buffToToggle(buff, UnitCommand.CommandType.Free, true,
                                             resource.CreateActivatableResourceLogic(spendType: ActivatableAbilityResourceLogic.ResourceSpendType.Never)
                                             );

            toggle.Group = ActivatableAbilityGroupExtension.PhrenicAmplification.ToActivatableAbilityGroup();
            var feature = Common.ActivatableAbilityToFeature(toggle, false);

            feature.AddComponent(Helpers.Create <OnCastMechanics.ForceFocusSpellDamageDiceIncrease>(s => { s.spellbook = spellbook; s.SpellDescriptor = SpellDescriptor.Force; }));
            return(feature);
        }
Esempio n. 11
0
        static void createDanceOf23Steps()
        {
            var bard_class = library.Get <BlueprintCharacterClass>("772c83a25e2268e448e841dcd548235f");
            var buff       = Helpers.CreateBuff("DanceOf23StepsBuff",
                                                "The Dance of 23 Steps",
                                                "Effect: The shuffling steps, bends, and leaps of this intricate dance make you a difficult target to hit, but also make it more difficult for you to perform other actions. When using this masterpiece, you take a –2 penalty on melee attack rolls and combat maneuver checks, and you must make a concentration check to cast any spell (DC 15 + the spell’s level), but you gain a +2 dodge bonus to your Armor Class. When you have 8 bard levels, and every 4 levels thereafter, the penalty increases by –1 and the dodge bonus increases by +1. You can combine this masterpiece with fighting defensively and Combat Expertise, but not total defense. When you use this masterpiece, it lasts until the start of your next turn. Abilities that extend the duration of a bardic performance (such as Lingering Performance) affect this masterpiece; this allows you to get multiple rounds of its benefit (and its penalties) at the cost of only 1 round of bardic performance."
                                                + "Use: 1 bardic performance round. Starting this performance is free action.",
                                                "",
                                                NewSpells.irresistible_dance.Icon,
                                                Common.createPrefabLink("91ef30ab58fa0d3449d4d2ccc20cb0f8"),
                                                Helpers.CreateAddContextStatBonus(StatType.AdditionalAttackBonus, ModifierDescriptor.None, multiplier: -1),
                                                Helpers.CreateAddContextStatBonus(StatType.AC, ModifierDescriptor.Dodge),
                                                Common.createAddCondition(UnitCondition.SpellCastingIsDifficult),
                                                Helpers.CreateContextRankConfig(ContextRankBaseValueType.ClassLevel, ContextRankProgression.OnePlusDivStep,
                                                                                classes: new BlueprintCharacterClass[] { bard_class, Skald.skald_class },
                                                                                min: 2, stepLevel: 4)
                                                );

            var toggle = Helpers.CreateActivatableAbility(buff.name + "ToggleAbility",
                                                          buff.Name,
                                                          buff.Description,
                                                          "",
                                                          buff.Icon,
                                                          buff,
                                                          AbilityActivationType.Immediately,
                                                          UnitCommand.CommandType.Free,
                                                          null);

            toggle.Group = ActivatableAbilityGroup.BardicPerformance;
            toggle.AddComponent(performance_resource.CreateActivatableResourceLogic(ActivatableAbilityResourceLogic.ResourceSpendType.NewRound));
            dance_of_23_steps        = Common.ActivatableAbilityToFeature(toggle, false);
            dance_of_23_steps.Groups = new FeatureGroup[] { FeatureGroup.Feat };
            dance_of_23_steps.AddComponents(Helpers.PrerequisiteClassLevel(bard_class, 4, any: true),
                                            Helpers.PrerequisiteClassLevel(Skald.skald_class, 4, any: true));
        }
Esempio n. 12
0
        public BlueprintFeature createCombatHealer(string name_prefix, string display_name, string description)
        {
            var icon = Helpers.GetIcon("6b90c773a6543dc49b2505858ce33db5"); // cure moderate wounds

            var resource = Helpers.CreateAbilityResource($"{name_prefix}Resource", "", "", "", null);

            resource.SetIncreasedByLevelStartPlusDivStep(0, 7, 1, 4, 1, 0, 0, classes, getArchetypeArray());

            var cure_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>("0cea35de4d553cc439ae80b3a8724397"),
                library.Get <BlueprintAbility>("1f173a16120359e41a20fc75bb53d449"),
            };

            var buff = Helpers.CreateBuff($"{name_prefix}Buff",
                                          display_name,
                                          description,
                                          "",
                                          icon,
                                          null,
                                          Helpers.Create <NewMechanics.MetamagicMechanics.MetamagicOnSpellList>(m =>
            {
                m.spell_list = cure_spells;
                m.Metamagic  = Kingmaker.UnitLogic.Abilities.Metamagic.Quicken;
                m.resource   = resource;
                m.consume_extra_spell_slot = true;
                m.amount = 1;
            }
                                                                                                                )
                                          );


            var ability = Helpers.CreateActivatableAbility($"{name_prefix}ToggleAbility",
                                                           display_name,
                                                           description,
                                                           "",
                                                           icon,
                                                           buff,
                                                           Kingmaker.UnitLogic.ActivatableAbilities.AbilityActivationType.Immediately,
                                                           CommandType.Free,
                                                           null,
                                                           Helpers.CreateActivatableResourceLogic(resource, ResourceSpendType.Never)
                                                           );

            ability.DeactivateImmediately = true;


            var feature = Common.ActivatableAbilityToFeature(ability, false);

            feature.AddComponent(Helpers.CreateAddAbilityResource(resource));
            addMinLevelPrerequisite(feature, 7);
            return(feature);
        }
Esempio n. 13
0
        //air barrier is the same as spirirt shield from ancestor mystery


        public BlueprintFeature createInvisibility(string name_prefix, string display_name, string description)
        {
            var invisibility_buff          = library.Get <BlueprintBuff>("525f980cb29bc2240b93e953974cb325");
            var improved_invisibility_buff = library.Get <BlueprintBuff>("e6b35473a237a6045969253beb09777c");

            var resource = Helpers.CreateAbilityResource(name_prefix + "Resource", "", "", "", null);

            resource.SetIncreasedByLevel(0, 1, classes);

            var apply_invisibility = Common.createContextActionApplyBuff(invisibility_buff, Helpers.CreateContextDuration(1, DurationRate.Minutes), dispellable: false);

            var ability1 = Helpers.CreateAbility(name_prefix + "Ability",
                                                 display_name,
                                                 description,
                                                 "",
                                                 invisibility_buff.Icon,
                                                 AbilityType.Supernatural,
                                                 CommandType.Standard,
                                                 AbilityRange.Personal,
                                                 Helpers.oneMinuteDuration,
                                                 "",
                                                 Helpers.CreateRunActions(apply_invisibility),
                                                 Helpers.CreateResourceLogic(resource)
                                                 );

            ability1.setMiscAbilityParametersSelfOnly();

            var ability2 = Helpers.CreateActivatableAbility(name_prefix + "ActivatableAbility",
                                                            "Greater " + display_name,
                                                            description,
                                                            "",
                                                            improved_invisibility_buff.Icon,
                                                            improved_invisibility_buff,
                                                            AbilityActivationType.Immediately,
                                                            CommandType.Standard,
                                                            null,
                                                            Helpers.CreateActivatableResourceLogic(resource, ActivatableAbilityResourceLogic.ResourceSpendType.NewRound)
                                                            );

            var add_ability2_feature = Common.ActivatableAbilityToFeature(ability2);

            var feature = Helpers.CreateFeature(name_prefix + "Feature",
                                                display_name,
                                                description,
                                                "",
                                                ability1.Icon,
                                                FeatureGroup.None,
                                                Helpers.CreateAddAbilityResource(resource),
                                                Helpers.CreateAddFact(ability1),
                                                Helpers.CreateAddFeatureOnClassLevel(add_ability2_feature, 9, classes)
                                                );

            foreach (var c in classes)
            {
                feature.AddComponents(Helpers.PrerequisiteClassLevel(c, 3, any: true));
            }

            return(feature);
        }
Esempio n. 14
0
        //combat healer is the same as in battle mystery


        public BlueprintFeature createEnergyBody(string name_prefix, string display_name, string description)
        {
            var resource = Helpers.CreateAbilityResource(name_prefix + "Resource", "", "", "", null);

            resource.SetIncreasedByLevel(0, 1, classes);

            var icon = library.Get <BlueprintAbility>("1bc83efec9f8c4b42a46162d72cbf494").Icon; //burst of glory


            var heal_living = Helpers.CreateConditional(new Condition[] { Helpers.Create <UndeadMechanics.ContextConditionHasNegativeEnergyAffinity>(),
                                                                          Helpers.Create <ContextConditionIsAlly>() },
                                                        new GameAction[0],
                                                        new GameAction[] { Helpers.Create <ContextActionSpawnFx>(c => c.PrefabLink = Common.createPrefabLink("61602c5b0ac793d489c008e9cb58f631")),
                                                                           Common.createContextActionHealTarget(Helpers.CreateContextDiceValue(DiceType.D6, 1, Helpers.CreateContextValue(AbilityRankType.Default))) }
                                                        );
            var aura_of_healing = library.Get <BlueprintAbilityAreaEffect>("be47154a20220f64f9bea767587e700a");

            var area_effect = library.CopyAndAdd(aura_of_healing, $"{name_prefix}Area", "");

            area_effect.Size = 5.Feet();
            area_effect.SetComponents(Helpers.CreateContextRankConfig(ContextRankBaseValueType.ClassLevel, classes: classes),
                                      Helpers.CreateAreaEffectRunAction(round: heal_living)
                                      );
            var undead_damage = Helpers.CreateConditional(Helpers.Create <UndeadMechanics.ContextConditionHasNegativeEnergyAffinity>(),
                                                          Helpers.CreateActionDealDamage(DamageEnergyType.PositiveEnergy,
                                                                                         Helpers.CreateContextDiceValue(DiceType.D6, 1, Helpers.CreateContextValue(AbilityRankType.Default)),
                                                                                         IgnoreCritical: true
                                                                                         )
                                                          );
            var buff = Helpers.CreateBuff(name_prefix + "Buff",
                                          display_name,
                                          description,
                                          "",
                                          icon,
                                          Common.createPrefabLink("f5eaec10b715dbb46a78890db41fa6a0"), //fiery body
                                          Helpers.CreateAddFact(Common.elemental),
                                          Common.createAddTargetAttackWithWeaponTrigger(action_attacker: Helpers.CreateActionList(undead_damage)),
                                          Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.ClassLevel, classes: classes),
                                          Common.createAddAreaEffect(area_effect)
                                          );

            var ability = Helpers.CreateActivatableAbility(name_prefix + "ActivatableAbility",
                                                           display_name,
                                                           description,
                                                           "",
                                                           icon,
                                                           buff,
                                                           Kingmaker.UnitLogic.ActivatableAbilities.AbilityActivationType.Immediately,
                                                           CommandType.Standard,
                                                           null,
                                                           Helpers.CreateActivatableResourceLogic(resource, ResourceSpendType.NewRound)
                                                           );
            var feature = Common.ActivatableAbilityToFeature(ability, false);

            feature.AddComponent(Helpers.CreateAddAbilityResource(resource));

            return(feature);
        }
Esempio n. 15
0
        static void createBleedingAttack()
        {
            var bleed1d6    = library.Get <BlueprintBuff>("75039846c3d85d940aa96c249b97e562");
            var icon        = NewSpells.deadly_juggernaut.Icon;
            var effect_buff = Helpers.CreateBuff("RogueBleedingAttackEffectBuff",
                                                 "Bleeding Attack Effect",
                                                 "A rogue with this ability can cause living opponents to bleed by hitting them with a sneak attack. This attack causes the target to take 1 additional point of damage each round for each die of the rogue’s sneak attack (e.g., 4d6 equals 4 points of bleed). Bleeding creatures take that amount of damage every round at the start of each of their turns. The bleeding can be stopped by a successful DC 15 Heal check or the application of any effect that heals hit point damage. Bleed damage from this ability does not stack with itself. Bleed damage bypasses any damage reduction the creature might possess.",
                                                 "",
                                                 icon,
                                                 null,
                                                 Helpers.Create <BleedMechanics.BleedBuff>(b => b.dice_value = Helpers.CreateContextDiceValue(DiceType.Zero, 0, Helpers.CreateContextValue(AbilityRankType.Default))),
                                                 Helpers.CreateContextRankConfig(ContextRankBaseValueType.CustomProperty, customProperty: NewMechanics.SneakAttackDiceGetter.Blueprint.Value),
                                                 Helpers.CreateSpellDescriptor(SpellDescriptor.Bleed),
                                                 bleed1d6.GetComponent <CombatStateTrigger>(),
                                                 bleed1d6.GetComponent <AddHealTrigger>()
                                                 );

            var apply_buff = Common.createContextActionApplyBuff(effect_buff, Helpers.CreateContextDuration(), dispellable: false, is_permanent: true);
            var buff       = Helpers.CreateBuff("RogueBleedingAttackBuff",
                                                "Bleeding Attack",
                                                effect_buff.Description,
                                                "",
                                                icon,
                                                null,
                                                Helpers.Create <AddInitiatorAttackRollTrigger>(a =>
            {
                a.OnlyHit     = true;
                a.SneakAttack = true;
                a.Action      = Helpers.CreateActionList(apply_buff);
            }
                                                                                               )
                                                );

            var toggle = Helpers.CreateActivatableAbility("RogueBleedingAttackToggleAbility",
                                                          buff.Name,
                                                          buff.Description,
                                                          "",
                                                          buff.Icon,
                                                          buff,
                                                          AbilityActivationType.Immediately,
                                                          UnitCommand.CommandType.Free,
                                                          null
                                                          );

            toggle.Group = ActivatableAbilityGroupExtension.SneakAttack.ToActivatableAbilityGroup();
            toggle.DeactivateImmediately = true;

            bleeding_attack = Common.ActivatableAbilityToFeature(toggle, false);

            bleeding_attack.AddComponent(Helpers.PrerequisiteFeature(library.Get <BlueprintFeature>("9b9eac6709e1c084cb18c3a366e0ec87")));//sneak attack

            addToTalentSelection(bleeding_attack, for_investigator: false);

            var medical_discoveries = library.Get <BlueprintFeatureSelection>("67f499218a0e22944abab6fe1c9eaeee");

            medical_discoveries.AllFeatures = medical_discoveries.AllFeatures.AddToArray(bleeding_attack);
        }
Esempio n. 16
0
        static void createClamorOfHeavens()
        {
            var bard_class     = library.Get <BlueprintCharacterClass>("772c83a25e2268e448e841dcd548235f");
            var undead_stunned = library.CopyAndAdd <BlueprintBuff>("09d39b38bb7c6014394b6daced9bacd3", "UndeadStunnedBuff", "");

            undead_stunned.RemoveComponents <SpellDescriptorComponent>();

            var staggered = library.Get <BlueprintBuff>("df3950af5a783bd4d91ab73eb8fa0fd3");
            var blinded   = library.Get <BlueprintBuff>("0ec36e7596a4928489d2049e1e1c76a7");
            var shaken    = library.Get <BlueprintBuff>("25ec6cb6ab1845c48a95f9c20b034220");

            var apply_stun    = Common.createContextActionApplyBuff(undead_stunned, Helpers.CreateContextDuration(), dispellable: false, is_permanent: true, is_child: true);
            var apply_stagger = Common.createContextActionApplyBuff(staggered, Helpers.CreateContextDuration(), dispellable: false, is_permanent: true, is_child: true);
            var apply_blind   = Common.createContextActionApplyBuff(blinded, Helpers.CreateContextDuration(), dispellable: false, is_permanent: true, is_child: true);
            var apply_shaken  = Common.createContextActionApplyBuff(shaken, Helpers.CreateContextDuration(), dispellable: false, is_permanent: true, is_child: true);

            var effect = Helpers.CreateConditional(Common.createContextConditionHasFacts(false, Common.undead, Common.outsider),
                                                   Helpers.CreateConditionalSaved(apply_stagger, apply_stun),
                                                   Helpers.CreateConditionalSaved(apply_shaken, apply_blind)
                                                   );
            var effect_saved = Helpers.CreateActionSavingThrow(SavingThrowType.Will, effect);
            var effect_buff  = Helpers.CreateBuff("ClamorOfHeavensEffectBuff",
                                                  "Clamor Of the Heavens",
                                                  "Effect: Evil creatures that hear the performance and fail a Will save against the effect are blinded and deafened for the duration. On a successful save, they are shaken instead. Undead or creatures with the evil subtype that fail their saves are stunned for the duration, while those that succeed are staggered.\n"
                                                  + "Use: 3 bardic performance rounds, +1 round per additional round of duration.",
                                                  "",
                                                  Helpers.GetIcon("574cf074e8b65e84d9b69a8c6f1af27b"),
                                                  null,
                                                  Common.createContextCalculateAbilityParamsBasedOnClasses(new BlueprintCharacterClass[] { bard_class, Skald.skald_class }, StatType.Charisma),
                                                  Helpers.CreateAddFactContextActions(activated: effect_saved)
                                                  );

            var toggle = Common.createToggleAreaEffect(effect_buff, 30.Feet(), Helpers.CreateConditionsCheckerAnd(Helpers.CreateContextConditionAlignment(AlignmentComponent.Evil)),
                                                       AbilityActivationType.WithUnitCommand,
                                                       UnitCommand.CommandType.Standard,
                                                       Common.createPrefabLink("dfc59904273f7ee49ab00e5278d86e16"),
                                                       Common.createPrefabLink("9353083f430e5a44a8e9d6e26faec248")
                                                       );

            toggle.Group = ActivatableAbilityGroup.BardicPerformance;
            toggle.Buff.AddComponent(Helpers.CreateAddFactContextActions(activated: Helpers.Create <ResourceMechanics.ContextActionSpendResourceFromCaster>(a =>
            {
                a.resource = performance_resource;
                a.amount   = 2;
            })));
            toggle.AddComponent(performance_resource.CreateActivatableResourceLogic(ActivatableAbilityResourceLogic.ResourceSpendType.NewRound));
            toggle.AddComponent(Helpers.Create <ResourceMechanics.RestrictionHasEnoughResource>(r => { r.resource = performance_resource; r.amount = 3; }));
            toggle.DeactivateIfCombatEnded   = true;
            toggle.DeactivateIfOwnerDisabled = true;
            clamor_of_hevens        = Common.ActivatableAbilityToFeature(toggle, false);
            clamor_of_hevens.Groups = new FeatureGroup[] { FeatureGroup.Feat };
            clamor_of_hevens.AddComponents(Helpers.PrerequisiteClassLevel(bard_class, 10, any: true),
                                           Helpers.PrerequisiteClassLevel(Skald.skald_class, 10, any: true));
        }
Esempio n. 17
0
        static void createHealingBuffer()
        {
            var healing_burst  = library.Get <BlueprintAbility>("db611ffeefb8f1e4f88e7d5393fc651d");
            var kinetic_healer = library.Get <BlueprintAbility>("eff667a3a43a77d45a193bb7c94b3a6c"); //kinetic healer
            var heal_varinats  = kinetic_healer.GetComponent <AbilityVariants>();

            var buffer_resource = Helpers.CreateAbilityResource("KineticistHelearBufferResource", "", "", "", null);

            buffer_resource.SetFixedResource(1);

            var icon           = Helpers.GetIcon("be2062d6d85f4634ea4f26e9e858c3b8"); //cleanse
            var spend_resource = Helpers.Create <NewMechanics.ContextActionSpendResource>(s => s.resource = buffer_resource);
            var buff           = Helpers.CreateBuff("HealerBufferBuff",
                                                    "Healer Buffer",
                                                    "At 6th level, a kinetic chirurgeon’s internal buffer has double the usual maximum size, and she can use it only when she would accept points of burn for the kinetic healer wild talent.\n"
                                                    + "Internal Buffer: At 6th level, a kineticist’s study of her body and the elemental forces that course through it allow her to form an internal buffer to store extra energy.\n" +
                                                    "When she would otherwise accept burn, a kineticist can spend energy from her buffer to avoid accepting 1 point of burn. She can do it once per day. Kineticist gets an additional use of this ability at levels 11 and 16.",
                                                    "",
                                                    icon,
                                                    null,
                                                    Helpers.Create <KineticistMechanics.DecreaseWildTalentCostForSpecificTalents>(a =>
            {
                a.actions   = Helpers.CreateActionList(spend_resource);
                a.abilities = heal_varinats.Variants.Where(v => v.GetComponent <AbilityKineticist>().WildTalentBurnCost > 0).ToArray().AddToArray(healing_burst);
            }
                                                                                                                                  )
                                                    );

            var ability = Helpers.CreateActivatableAbility("HealerBufferActivatableAbility",
                                                           buff.Name,
                                                           buff.Description,
                                                           "",
                                                           buff.Icon,
                                                           buff,
                                                           AbilityActivationType.Immediately,
                                                           UnitCommand.CommandType.Free,
                                                           null,
                                                           Helpers.CreateActivatableResourceLogic(buffer_resource, ActivatableAbilityResourceLogic.ResourceSpendType.Never)
                                                           );

            ability.DeactivateImmediately = true;

            healing_buffer = Common.ActivatableAbilityToFeature(ability, hide: false);
            healing_buffer.AddComponents(Helpers.CreateAddAbilityResource(buffer_resource),
                                         Helpers.Create <ResourceMechanics.ContextIncreaseResourceAmount>(c => { c.Resource = buffer_resource; c.Value = Helpers.CreateContextValue(AbilityRankType.Default); }),
                                         Helpers.CreateContextRankConfig(ContextRankBaseValueType.ClassLevel, ContextRankProgression.StartPlusDoubleDivStep, startLevel: 6, stepLevel: 5,
                                                                         classes: new BlueprintCharacterClass[] { archetype.GetParentClass() }
                                                                         )
                                         );
            healing_buffer.ReapplyOnLevelUp = true;

            healing_buffer_resource = buffer_resource;
        }
Esempio n. 18
0
        public BlueprintFeature createTimeFlicker(string name_prefix, string display_name, string description)
        {
            var resource = Helpers.CreateAbilityResource($"{name_prefix}Resource", "", "", "", null);

            resource.SetIncreasedByLevel(0, 1, classes);
            // Note: reworked to use Displacement instead of Blink
            var blur         = library.Get <BlueprintBuff>("dd3ad347240624d46a11a092b4dd4674");
            var displacement = library.Get <BlueprintBuff>("00402bae4442a854081264e498e7a833");

            var apply_blur = Common.createContextActionApplyBuff(blur, Helpers.CreateContextDuration(1, DurationRate.Minutes), dispellable: false);

            var ability = Helpers.CreateAbility(name_prefix + "Ability",
                                                display_name,
                                                description,
                                                "",
                                                blur.Icon,
                                                AbilityType.Supernatural,
                                                CommandType.Standard,
                                                AbilityRange.Personal,
                                                Helpers.oneMinuteDuration,
                                                "",
                                                Helpers.CreateRunActions(apply_blur),
                                                Helpers.CreateResourceLogic(resource)
                                                );

            ability.setMiscAbilityParametersSelfOnly();

            var ability2 = Helpers.CreateActivatableAbility(name_prefix + "ActivatableAbility",
                                                            display_name + ": Displacement",
                                                            description,
                                                            "",
                                                            blur.Icon,
                                                            displacement,
                                                            Kingmaker.UnitLogic.ActivatableAbilities.AbilityActivationType.Immediately,
                                                            CommandType.Standard,
                                                            null,
                                                            Helpers.CreateActivatableResourceLogic(resource, Kingmaker.UnitLogic.ActivatableAbilities.ActivatableAbilityResourceLogic.ResourceSpendType.NewRound)
                                                            );

            var feature = Common.AbilityToFeature(ability, hide: false);

            feature.AddComponent(Helpers.CreateAddAbilityResource(resource));

            var feature2 = Common.ActivatableAbilityToFeature(ability2);

            feature.AddComponent(Helpers.CreateAddFeatureOnClassLevel(feature2, 7, classes));
            foreach (var c in classes)
            {
                feature.AddComponents(Helpers.PrerequisiteClassLevel(c, 3, any: true));
            }
            return(feature);
        }
        static void createArrowSongStrike()
        {
            var bard_class       = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("772c83a25e2268e448e841dcd548235f");
            var add_spell_combat = Helpers.Create <AddMagusMechanicPart>(); //needed for unit_part magus creation (no actual ability though)

            Helpers.SetField(add_spell_combat, "m_Feature", 1);
            Helpers.SetField(add_spell_combat, "m_MagusClass", bard_class);
            //it should not be used since it sets spell combat to be always active by default (ok on magus though since the corresponding toggle is always active by default)

            var add_magus_part = Helpers.Create <NewMechanics.ActivateUnitPartMagus>(a => a.magus_class = bard_class);

            var add_eldritch_archer = Helpers.Create <AddMagusMechanicPart>();

            Helpers.SetField(add_eldritch_archer, "m_Feature", 5);

            var add_spellstrike = Helpers.Create <AddMagusMechanicPart>();

            Helpers.SetField(add_spellstrike, "m_Feature", 2);

            var spellstrike = library.CopyAndAdd <BlueprintActivatableAbility>("e958891ef90f7e142a941c06c811181e", "ArrowsongMinstrelSpellstrike", "");

            spellstrike.SetName("Arrowsong Strike");
            spellstrike.SetDescription("At 6th level, an Arrowsong minstrel can use spellstrike (as per the magus class feature) to cast a single-target ranged touch attack spell and deliver it through a ranged weapon attack.");
            spellstrike.SetIcon(NewSpells.flame_arrow.Icon);
            arrowsong_strike = Common.ActivatableAbilityToFeature(spellstrike, false);
            arrowsong_strike.AddComponents(add_magus_part, add_eldritch_archer, add_spellstrike);

            var add_spell_combat18 = library.Get <BlueprintFeature>("2464ba53317c7fc4d88f383fac2b45f9").GetComponent <AddMagusMechanicPart>().CreateCopy(); //spell combat

            Helpers.SetField(add_spell_combat18, "m_MagusClass", bard_class);
            var spell_combat_buff = library.Get <BlueprintBuff>("91e4b45ab5f29574aa1fb41da4bbdcf2");

            ray_spell_combat = Helpers.CreateFeature("RaySpellCombatFeature",
                                                     "Arrowsong Strike II",
                                                     "At 18th level, an arrowsong minstrel can make a full attack when using arrowsong strike.",
                                                     "",
                                                     LoadIcons.Image2Sprite.Create(@"AbilityIcons/LingeringAcid.png"),
                                                     FeatureGroup.None,
                                                     Helpers.CreateAddFact(Common.ignore_spell_combat_penalty),
                                                     add_spell_combat18
                                                     );
            var spellcombat_penalty_buff = library.Get <BlueprintBuff>("7b4cf64d3a49e3d45b1dbd2385f4eb6d");

            spellcombat_penalty_buff.AddComponent(Helpers.Create <NewMechanics.BuffExtraAttackIfHasFact>(b => { b.num_attacks = -1; b.fact = ray_spell_combat; }));
            var apply_spell_combat = Common.createContextActionApplyBuff(spell_combat_buff, Helpers.CreateContextDuration(), is_child: true, dispellable: false, is_permanent: true);

            spellstrike.Buff.AddComponent(Helpers.CreateAddFactContextActions(Helpers.CreateConditional(Common.createContextConditionHasFact(ray_spell_combat),
                                                                                                        apply_spell_combat)
                                                                              )
                                          );
        }
Esempio n. 20
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));
            }
Esempio n. 21
0
        static void createBravadosBlade()
        {
            var demoralize = library.Get <BlueprintAbility>("5f3126d4120b2b244a95cb2ec23d69fb").GetComponent <AbilityEffectRunAction>().Actions.Actions[0] as Demoralize;

            for (int i = 0; i < 5; i++)
            {
                var buff_sneak = Helpers.CreateBuff($"BravadosBladeReduceSneak{i}Buff",
                                                    "",
                                                    "",
                                                    "",
                                                    null,
                                                    null,
                                                    Helpers.CreateAddStatBonus(StatType.SneakAttack, -(i + 1), ModifierDescriptor.UntypedStackable),
                                                    Helpers.Create <DemoralizeMechanics.DemoralizeBonus>(d => d.value = i * 5)
                                                    );
                buff_sneak.SetBuffFlags(BuffFlags.HiddenInUi);

                var action_on_hit = Helpers.CreateActionList(Common.createContextActionApplyBuffToCaster(buff_sneak, Helpers.CreateContextDuration(1), dispellable: false),
                                                             demoralize);

                var buff = Helpers.CreateBuff($"BravadosBlade{i}Buff",
                                              $"Bravado's Blade ({Common.roman_id[i + 1]})",
                                              "When a rake hits an opponent and deals sneak attack damage, she can forgo 1d6 points of that damage and make a free Intimidate check to demoralize the foe. Starting from level 5 she can decide to forgo 1 additional sneak attack die + 1 more die per 4 levels thereafter. For every additional 1d6 points of sneak attack damage she forgoes, she receives a +5 circumstance bonus on this check.",
                                              "",
                                              Helpers.GetIcon("bd81a3931aa285a4f9844585b5d97e51"),
                                              null,
                                              Common.createAddInitiatorAttackRollTrigger2(action_on_hit, sneak_attack: true),
                                              Common.createAddInitiatorAttackWithWeaponTrigger(Helpers.CreateActionList(Common.createContextActionRemoveBuff(buff_sneak)),
                                                                                               false,
                                                                                               wait_for_attack_to_resolve: true,
                                                                                               on_initiator: true
                                                                                               )
                                              );
                var toggle = Helpers.CreateActivatableAbility($"BravadosBlade{i}ToggleAbility",
                                                              buff.Name,
                                                              buff.Description,
                                                              "",
                                                              buff.Icon,
                                                              buff,
                                                              AbilityActivationType.Immediately,
                                                              CommandType.Free,
                                                              null);
                toggle.DeactivateImmediately = true;
                toggle.Group = ActivatableAbilityGroupExtension.BravadosBlade.ToActivatableAbilityGroup();

                bravados_blade[i] = Common.ActivatableAbilityToFeature(toggle, false);
            }
        }
        public BlueprintFeature createMetamagicMaster(BlueprintCharacterClass caster_class)
        {
            var feature = Helpers.CreateFeature(prefix + "MetamagicMasterFeature",
                                                "Metamagic Master",
                                                "As a free action while casting a spell, you can expend 1 or more points of mental focus to apply a metamagic feat you know to that spell without increasing the spell’s casting time or the spell level of the spell slot it occupies. The number of points of mental focus you must expend to use this power is equal to the increase in spell levels the metamagic feat would normally require (minimum 1).",
                                                "",
                                                LoadIcons.Image2Sprite.Create(@"AbilityIcons/ArcaneExploit.png"),
                                                FeatureGroup.None
                                                );

            BlueprintFeature[] metamagics = library.GetAllBlueprints().OfType <BlueprintFeature>().Where(b => b.Groups.Contains(FeatureGroup.WizardFeat) && (b.GetComponent <AddMetamagicFeat>() != null) && b.AssetGuid != "2f5d1e705c7967546b72ad8218ccf99c").ToArray();
            foreach (var m in metamagics)
            {
                var metamagic = m.GetComponent <Kingmaker.UnitLogic.FactLogic.AddMetamagicFeat>().Metamagic;
                var cost      = MetamagicHelper.DefaultCost(metamagic);
                var buff      = Helpers.CreateBuff(prefix + m.name + "MetamagicMasterBuff",
                                                   "Metamagic Master: " + m.Name,
                                                   feature.Description + "\n" + m.Name + ": " + m.Description,
                                                   "",
                                                   m.Icon,
                                                   null,
                                                   Helpers.Create <NewMechanics.MetamagicMechanics.MetamagicOnSpellDescriptor>(ms =>
                {
                    ms.spell_descriptor = SpellDescriptor.None;
                    ms.specific_class   = caster_class;
                    ms.resource         = resource;
                    ms.Metamagic        = metamagic;
                    ms.amount           = cost;
                }
                                                                                                                               )
                                                   );

                var toggle = Common.buffToToggle(buff, CommandType.Free, true,
                                                 resource.CreateActivatableResourceLogic(ActivatableAbilityResourceLogic.ResourceSpendType.Never),
                                                 Helpers.Create <ResourceMechanics.RestrictionHasEnoughResource>(r => { r.resource = resource; r.amount = cost; })
                                                 );

                toggle.Group = ActivatableAbilityGroupExtension.MetamagicMaster.ToActivatableAbilityGroup();
                addFocusInvestmentCheck(toggle, SpellSchool.Divination, SpellSchool.Evocation, SpellSchool.Necromancy);

                var feature1 = Common.ActivatableAbilityToFeature(toggle);

                feature.AddComponent(Helpers.Create <NewMechanics.AddFeatureIfHasFactsFromList>(a => { a.Feature = feature1; a.CheckedFacts = new Kingmaker.Blueprints.Facts.BlueprintUnitFact[] { m }; }));
                m.AddComponent(Helpers.Create <NewMechanics.AddFeatureIfHasFactsFromList>(a => { a.Feature = feature1; a.CheckedFacts = new Kingmaker.Blueprints.Facts.BlueprintUnitFact[] { feature }; }));
            }

            return(feature);
        }
Esempio n. 23
0
        static void createRapidAttack()
        {
            var buff = Helpers.CreateBuff("DawnflowerDervishRapidAttackBuff",
                                          "Rapid Attack",
                                          "At 11th level, a Dawnflower dervish can make a full attack after charge. She must forgo the attack at her highest bonus.",
                                          "",
                                          Helpers.GetIcon("85742dd6788c6914f96ddc4628b23932"), //arcane weapon speed
                                          null,
                                          Common.createBuffExtraAttack(-1, false),
                                          Helpers.CreateAddMechanics(AddMechanicsFeature.MechanicsFeatureType.Pounce)
                                          );

            var toggle = Common.buffToToggle(buff, CommandType.Free, deactivate_immediately: true);

            rapid_attack = Common.ActivatableAbilityToFeature(toggle, false);
        }
Esempio n. 24
0
        static void createLightningStrike()
        {
            var buff = Helpers.CreateBuff("DawnflowerDervishLightningStrikeBuff",
                                          "Lightning Strike",
                                          "At 15th level, as part of a full attack, a Dawnflower dervish can make one additional attack. This attack is at the dervish’s highest base attack bonus, but each attack in the round (including the extra one) takes a –2 penalty.",
                                          "",
                                          Helpers.GetIcon("a3a9e9a2f909cd74e9aee7788a7ec0c6"), //arcane wepon shock
                                          null,
                                          Common.createBuffExtraAttack(1, false),
                                          Helpers.Create <WeaponParametersAttackBonus>(w => { w.Ranged = true; w.AttackBonus = -2; }),
                                          Helpers.Create <WeaponParametersAttackBonus>(w => { w.Ranged = false; w.AttackBonus = -2; })
                                          );

            var toggle = Common.buffToToggle(buff, CommandType.Free, deactivate_immediately: true);

            lightning_strike = Common.ActivatableAbilityToFeature(toggle, false);
        }
Esempio n. 25
0
        static void createBlazingRondo()
        {
            var haste_buff    = library.Get <BlueprintBuff>("03464790f40c3c24aa684b57155f3280"); //haste
            var fatigued      = library.Get <BlueprintBuff>("e6f2fc5d73d88064583cb828801212f4");
            var apply_haste   = Common.createContextActionApplyBuff(haste_buff, Helpers.CreateContextDuration(), is_child: true, dispellable: false, is_permanent: true);
            var apply_fatigue = Common.createContextActionApplyBuff(fatigued, Helpers.CreateContextDuration(Helpers.CreateContextValue(AbilitySharedValue.Duration)), dispellable: false);
            var fatigue_saved = Helpers.CreateActionSavingThrow(SavingThrowType.Fortitude, Helpers.CreateConditionalSaved(null, apply_fatigue));

            var effect_buff = Helpers.CreateBuff("BlazingRondoEffectBuff",
                                                 "Blazing Rondo",
                                                 "You and your allies gain the benefits of haste while you maintain this masterpiece, except the bonus to AC and on attack rolls and Reflex saves is one-fifth of your bard level. Allies must be within 50 feet of you to receive this benefit. When you cease performing this masterpiece, any creature that received this benefit must succeed at a Fortitude save at this masterpiece’s DC or be fatigued for twice as many rounds as they were affected.\n"
                                                 + "Use: 1 round of bardic performance per round.",
                                                 "",
                                                 haste_buff.Icon,
                                                 null,
                                                 Helpers.CreateAddContextStatBonus(StatType.AdditionalAttackBonus, ModifierDescriptor.UntypedStackable),
                                                 Helpers.CreateAddContextStatBonus(StatType.AC, ModifierDescriptor.Dodge),
                                                 Helpers.CreateAddContextStatBonus(StatType.SaveReflex, ModifierDescriptor.UntypedStackable),
                                                 Helpers.CreateContextRankConfig(ContextRankBaseValueType.ClassLevel, classes: new BlueprintCharacterClass[] { bard_class, Skald.skald_class },
                                                                                 progression: ContextRankProgression.DelayedStartPlusDivStep,
                                                                                 startLevel: 10, stepLevel: 5),
                                                 Common.createContextCalculateAbilityParamsBasedOnClasses(new BlueprintCharacterClass[] { bard_class, Skald.skald_class }, StatType.Charisma),
                                                 Helpers.CreateAddFactContextActions(activated: apply_haste,
                                                                                     newRound: Helpers.Create <ContextActionChangeSharedValue>(c => { c.AddValue = 2; c.Type = SharedValueChangeType.Add; c.SharedValue = AbilitySharedValue.Duration; }),
                                                                                     deactivated: fatigue_saved)
                                                 );
            var toggle = Common.createToggleAreaEffect(effect_buff, 50.Feet(), Helpers.CreateConditionsCheckerAnd(Helpers.Create <ContextConditionIsAlly>()),
                                                       AbilityActivationType.WithUnitCommand,
                                                       UnitCommand.CommandType.Standard,
                                                       Common.createPrefabLink("5d4308fa344af0243b2dd3b1e500b2cc"), //inspire courage
                                                       Common.createPrefabLink("9353083f430e5a44a8e9d6e26faec248")
                                                       );

            toggle.Group = ActivatableAbilityGroup.BardicPerformance;
            toggle.AddComponent(performance_resource.CreateActivatableResourceLogic(ActivatableAbilityResourceLogic.ResourceSpendType.NewRound));
            toggle.DeactivateIfCombatEnded   = true;
            toggle.DeactivateIfOwnerDisabled = true;
            blazing_rondo        = Common.ActivatableAbilityToFeature(toggle, false);
            blazing_rondo.Groups = new FeatureGroup[] { FeatureGroup.Feat };
            blazing_rondo.AddComponents(Helpers.PrerequisiteClassLevel(bard_class, 7, any: true),
                                        Helpers.PrerequisiteClassLevel(Skald.skald_class, 7, any: true));
            blazing_rondo_buff = effect_buff;
        }
Esempio n. 26
0
        static void createFeintingFlurry()
        {
            var feint_action       = Common.createContextActionApplyBuff(CallOfTheWild.NewFeats.greater_feint_buff, Helpers.CreateContextDuration(), dispellable: false, duration_seconds: 6); //you already have all feint feats
            var feint_check_action = Helpers.Create <CallOfTheWild.SkillMechanics.ContextFeintSkillCheck>(c => c.Success = Helpers.CreateActionList(feint_action));
            var feint_action_list  = Helpers.CreateActionList(feint_check_action);
            var feint_buff         = Helpers.CreateBuff("FeintingFlurryFeature",
                                                        "Feinting Flurry",
                                                        "At 10th level, sage counselor can choose to replace his first attack during a flurry of blows with a feint check.",
                                                        "",
                                                        LoadIcons.Image2Sprite.Create(@"FeatIcons/FeintingFlurry.png"),
                                                        null,
                                                        Helpers.Create <CallOfTheWild.AttackReplacementMechanics.ReplaceAttackWithActionOnFullAttack>(f => f.action = feint_action_list)
                                                        );

            var toggle = Common.buffToToggle(feint_buff, CommandType.Free, true,
                                             Helpers.Create <NewMechanics.FlurryOfBlowsRestriciton>());

            feinting_flurry = Common.ActivatableAbilityToFeature(toggle, false);
        }
Esempio n. 27
0
        static void createBansheesRequiem()
        {
            var effect = Helpers.CreateActionEnergyDrain(Helpers.CreateContextDiceValue(DiceType.Zero, 0, 2), Helpers.CreateContextDuration(1, DurationRate.Hours), EnergyDrainType.Permanent);

            var effect_saved = Helpers.CreateActionSavingThrow(SavingThrowType.Fortitude, Helpers.CreateConditionalSaved(null, effect));
            var effect_buff  = Helpers.CreateBuff("BansheesRequiemBuff",
                                                  "Banshee’s Requiem",
                                                  "Effect: All living creatures you select within 30 feet at the start of your turn each round gain 2 negative levels unless they succeed at a Fortitude saving throw (DC = 10 + 1/2 your bard level + your Charisma bonus). This is a death effect and a sonic effect. This performance has audible components.\n"
                                                  + "Use: 3 rounds of bardic performance per round.",
                                                  "",
                                                  Helpers.GetIcon("b24583190f36a8442b212e45226c54fc"), //banshee blast
                                                  null,
                                                  Common.createContextCalculateAbilityParamsBasedOnClasses(new BlueprintCharacterClass[] { bard_class, Skald.skald_class }, StatType.Charisma),
                                                  Helpers.CreateAddFactContextActions(activated: effect_saved, newRound: effect_saved),
                                                  Helpers.CreateSpellDescriptor(SpellDescriptor.Death | SpellDescriptor.Sonic)
                                                  );

            var toggle = Common.createToggleAreaEffect(effect_buff, 30.Feet(), Helpers.CreateConditionsCheckerAnd(Common.createContextConditionHasFact(Common.undead, has: false),
                                                                                                                  Common.createContextConditionHasFact(Common.elemental, has: false),
                                                                                                                  Common.createContextConditionHasFact(Common.construct, has: false),
                                                                                                                  Helpers.Create <ContextConditionIsEnemy>()),
                                                       AbilityActivationType.WithUnitCommand,
                                                       UnitCommand.CommandType.Standard,
                                                       Common.createPrefabLink("20caf000cd4c3434da00a74f4a49dccc"), //dirge of doom
                                                       Common.createPrefabLink("39da71647ad4747468d41920d0edd721")  //dirge of doom
                                                       );

            toggle.Group = ActivatableAbilityGroup.BardicPerformance;
            toggle.Buff.AddComponent(Helpers.CreateAddFactContextActions(activated: Helpers.Create <ResourceMechanics.ContextActionSpendResourceFromCaster>(a =>
            {
                a.resource = performance_resource;
                a.amount   = 3;
            })));
            toggle.AddComponent(performance_resource.CreateActivatableResourceLogic(ActivatableAbilityResourceLogic.ResourceSpendType.NewRound));
            toggle.AddComponent(Helpers.Create <ResourceMechanics.RestrictionHasEnoughResource>(r => { r.resource = performance_resource; r.amount = 3; }));
            toggle.DeactivateIfCombatEnded   = true;
            toggle.DeactivateIfOwnerDisabled = true;
            banshees_requiem        = Common.ActivatableAbilityToFeature(toggle, false);
            banshees_requiem.Groups = new FeatureGroup[] { FeatureGroup.Feat };
            banshees_requiem.AddComponents(Helpers.PrerequisiteClassLevel(bard_class, 17, any: true),
                                           Helpers.PrerequisiteClassLevel(Skald.skald_class, 17, any: true));
        }
        static void createPainStrike()
        {
            var sickened = library.Get <BlueprintBuff>("4e42460798665fd4cb9173ffa7ada323");

            var apply_buff       = Common.createContextActionApplyBuff(sickened, Helpers.CreateContextDuration(0, DurationRate.Rounds, DiceType.D4, 1), dispellable: false);
            var apply_buff_saved = Helpers.CreateActionSavingThrow(SavingThrowType.Fortitude, Helpers.CreateConditionalSaved(null, apply_buff));
            var buff             = Helpers.CreateBuff("ExecutionerPainStrikeBuff",
                                                      "Painful Strike",
                                                      "Executioners are trained to cause excruciating pain when striking targets, often leaving them reeling in agony or completely incapacitated as they slowly bleed out. A creature that takes sneak attack damage from an executioner must make a successful a Fortitude save (DC = 10 + 1/2 the executioner’s class level + his Intelligence modifier) or become sickened for 1d4 rounds.",
                                                      "",
                                                      sickened.Icon,
                                                      null,
                                                      Helpers.Create <AddInitiatorAttackRollTrigger>(a =>
            {
                a.OnlyHit     = true;
                a.SneakAttack = true;
                a.Action      = Helpers.CreateActionList(apply_buff_saved);
            }
                                                                                                     ),
                                                      Common.createContextCalculateAbilityParamsBasedOnClass(archetype.GetParentClass(), StatType.Intelligence)
                                                      );

            Common.addToSlayerStudiedTargetDC(buff);

            var toggle = Helpers.CreateActivatableAbility("ExecutionerPainStrikeToggleAbility",
                                                          buff.Name,
                                                          buff.Description,
                                                          "",
                                                          buff.Icon,
                                                          buff,
                                                          AbilityActivationType.Immediately,
                                                          UnitCommand.CommandType.Free,
                                                          null
                                                          );

            toggle.Group = ActivatableAbilityGroupExtension.SneakAttack.ToActivatableAbilityGroup();
            toggle.DeactivateImmediately = true;

            pain_strike = Common.ActivatableAbilityToFeature(toggle, false);
            pain_strike.SetDescription("At 4th level, an executioner automatically gains this talent. " + toggle.Description);
        }
        public BlueprintFeature createSpellPower(BlueprintCharacterClass character_class)
        {
            var feature = Helpers.CreateFeature(prefix + "SpellPowerFeature",
                                                "Spell Power",
                                                " As a free action while casting a spell, you can expend 2 points of mental focus to increase that spell’s caster level by 2. At 12th and 18th levels, whenever you use this ability, you can spend an additional point of mental focus in order to increase the spell’s caster level by an additional 1.",
                                                "",
                                                Shaman.font_of_spirit_magic.Icon,
                                                FeatureGroup.None
                                                );

            for (int i = 0; i < 3; i++)
            {
                var buff = Helpers.CreateBuff(prefix + $"SpellPowerFeature{i + 1}Buff",
                                              $"Spell Power (+{2 + i})",
                                              feature.Description,
                                              "",
                                              feature.Icon,
                                              null,
                                              Helpers.Create <NewMechanics.SpendResourceOnSpecificSpellCast>(s => { s.resource = resource; s.specific_class = character_class; s.spell_descriptor = SpellDescriptor.None; s.amount = 2 + i; }),
                                              Helpers.Create <NewMechanics.ContextIncreaseDescriptorSpellLevel>(c => { c.specific_class = character_class; c.Descriptor = SpellDescriptor.None; c.Value = i + 2; })
                                              );

                var toggle = Common.buffToToggle(buff, UnitCommand.CommandType.Free, true,
                                                 resource.CreateActivatableResourceLogic(spendType: ActivatableAbilityResourceLogic.ResourceSpendType.Never)
                                                 );
                toggle.AddComponent(Helpers.Create <ResourceMechanics.RestrictionHasEnoughResource>(r => { r.resource = resource; r.amount = 2 + i; }));
                addFocusInvestmentCheck(toggle, SpellSchool.Divination, SpellSchool.Evocation, SpellSchool.Necromancy);
                toggle.Group = ActivatableAbilityGroupExtension.SpellPower.ToActivatableAbilityGroup();

                if (i == 0)
                {
                    feature.AddComponent(Helpers.CreateAddFact(toggle));
                }
                else
                {
                    feature.AddComponent(Helpers.CreateAddFeatureOnClassLevel(Common.ActivatableAbilityToFeature(toggle), i == 0 ? 1 : 6 + i * 6, new BlueprintCharacterClass[] { character_class }));
                }
            }
            return(feature);
        }
Esempio n. 30
0
        static void createSoloTactics()
        {
            var inquisitor_solo_tactics = library.Get <BlueprintFeature>("5602845cd22683840a6f28ec46331051");
            var swift_tactician         = library.Get <BlueprintFeature>("4ca47c023f1c158428bd55deb44c735f");
            var solo_tactics_buff       = Helpers.CreateBuff("VindicativeBastardSoloTacticsBuff",
                                                             "Solo Tactics",
                                                             "At 2nd level, a vindictive bastard gains solo tactics, as per the inquisitor class feature. She can activate this ability as a swift action and gains the benefits of it for 1 round. She can use this ability a number of rounds per day equal to half her paladin level + her Charisma modifier.",
                                                             "",
                                                             swift_tactician.Icon,
                                                             null,
                                                             inquisitor_solo_tactics.ComponentsArray[0]);

            solo_tactics_resource = Helpers.CreateAbilityResource("HolyVindicatorSoloTacticsResource", "", "", "", null);
            solo_tactics_resource.SetIncreasedByStat(0, StatType.Charisma);
            solo_tactics_resource.SetIncreasedByLevelStartPlusDivStep(0, 2, 1, 2, 1, 0, 0.0f, getVindicativeBastardArray());

            var solo_tactics_ability = Helpers.CreateActivatableAbility("VindicativeBastardSoloTacticsActivatableAbility",
                                                                        solo_tactics_buff.Name,
                                                                        solo_tactics_buff.Description,
                                                                        "",
                                                                        solo_tactics_buff.Icon,
                                                                        solo_tactics_buff,
                                                                        AbilityActivationType.Immediately,
                                                                        CommandType.Free,
                                                                        null,
                                                                        Helpers.CreateActivatableResourceLogic(solo_tactics_resource, ResourceSpendType.NewRound)
                                                                        );

            if (!test_mode)
            {
                Helpers.SetField(solo_tactics_ability, "m_ActivateWithUnitCommand", CommandType.Swift);
                solo_tactics_ability.DeactivateIfCombatEnded = true;
                solo_tactics_ability.AddComponent(Common.createActivatableAbilityUnitCommand(CommandType.Swift));
            }

            solo_tactics = Common.ActivatableAbilityToFeature(solo_tactics_ability, false);
            solo_tactics.AddComponent(Helpers.CreateAddAbilityResource(solo_tactics_resource));
        }