コード例 #1
0
        static BlueprintActivatableAbility CreateAbilityForBuff(BlueprintFeature feat, BlueprintAbilityResource resource, BlueprintBuff buff, DurationRate duration, String extraName = "")
        {
            var abilityBuff = LingeringBuffLogic.CreateBuffForAbility(buff,
                                                                      Helpers.MergeIds(feat.AssetGuid, "9654e4eb4fbe40cba281e47de787595d"),
                                                                      resource, duration);

            var inspireCourage = library.Get <BlueprintActivatableAbility>("2ce9653d7d2e9d948aa0b03e50ae52a6");
            var ability        = Helpers.CreateActivatableAbility($"{feat.name}{buff.name}ToggleAbility",
                                                                  feat.Name + extraName, feat.Description,
                                                                  Helpers.MergeIds(abilityBuff.AssetGuid, "b136041937b24d58a80a71fea93cf878"),
                                                                  buff.Icon, abilityBuff, AbilityActivationType.WithUnitCommand,
                                                                  CommandType.Standard, inspireCourage.ActivateWithUnitAnimation,
                                                                  Helpers.CreateActivatableResourceLogic(resource, ResourceSpendType.Never));

            return(ability);
        }
コード例 #2
0
        static BlueprintFeature CreatePowerOfGiants(BlueprintProgression bloodline)
        {
            var icon        = Helpers.GetIcon("da1b292d91ba37948893cdbe9ea89e28"); // legendary proportions
            var baseName    = "BloodlineOrcPowerOfGiants";
            var displayName = Main.lc.GetTranslate("Bloodline.abOrcAbPowerOfGiantsName");
            var description = Main.lc.GetTranslate("Bloodline.abOrcAbPowerOfGiantsDesc");

            var resource = Helpers.CreateAbilityResource($"{baseName}Resource", "", "", "887f8bb5ca65428684d42623d1ed2d09", icon);

            resource.SetIncreasedByLevel(0, 1, bloodline.Classes, bloodline.Archetypes);

            var strengthDomainBuff = library.Get <BlueprintBuff>("94dfcf5f3a72ce8478c8de5db69e752b");
            var buff = Helpers.CreateBuff(
                $"{baseName}Buff", displayName, description,
                "8c6ad79fd7f04f93aba2b8743afe9506", icon,
                strengthDomainBuff.FxOnStart,
                Helpers.Create <ChangeUnitSize>(a => a.Size = Size.Large),
                Helpers.Create <AddGenericStatBonus>(a =>
            {
                a.Descriptor = ModifierDescriptor.Size;
                a.Stat       = StatType.Strength;
                a.Value      = 6;
            }),
                Helpers.Create <AddGenericStatBonus>(a =>
            {
                a.Descriptor = ModifierDescriptor.Size;
                a.Stat       = StatType.Dexterity;
                a.Value      = -2;
            }),
                Helpers.Create <AddGenericStatBonus>(a =>
            {
                a.Descriptor = ModifierDescriptor.Size;
                a.Stat       = StatType.Constitution;
                a.Value      = 4;
            }),
                Helpers.Create <AddGenericStatBonus>(a =>
            {
                a.Descriptor = ModifierDescriptor.NaturalArmor;
                a.Stat       = StatType.AC;
                a.Value      = 4;
            }));

            var abilityBuff = LingeringBuffLogic.CreateBuffForAbility(buff,
                                                                      "a7f51053fa0b453c90bf413a3b5afd23", resource, DurationRate.Minutes);

            // Create activatable ability
            var inspireCourage = library.Get <BlueprintActivatableAbility>("2ce9653d7d2e9d948aa0b03e50ae52a6");
            var ability        = Helpers.CreateActivatableAbility($"{baseName}ToggleAbility",
                                                                  displayName, description, "0c68bb4d1b0b48babd5f93a44d6a5f66",
                                                                  icon, abilityBuff, AbilityActivationType.WithUnitCommand,
                                                                  CommandType.Standard, inspireCourage.ActivateWithUnitAnimation,
                                                                  Helpers.CreateActivatableResourceLogic(resource, ResourceSpendType.Never));

            return(Helpers.CreateFeature(baseName, displayName,
                                         description,
                                         "6c42a66a8aed4ed8aba182d2b4bc7c3d",
                                         icon,
                                         FeatureGroup.None,
                                         ability.CreateAddFact(),
                                         resource.CreateAddAbilityResource()));
        }
コード例 #3
0
        static BlueprintFeature CreatePowerOfGiants(BlueprintProgression bloodline)
        {
            var icon        = Helpers.GetIcon("da1b292d91ba37948893cdbe9ea89e28"); // legendary proportions
            var baseName    = "BloodlineOrcPowerOfGiants";
            var displayName = "Power of Giants";
            var description = "At 15th level, you may grow to Large size as a standard action. At this size you gain a +6 size bonus to Strength, a –2 penalty to Dexterity, a +4 size bonus to Constitution, and a +4 natural armor bonus. You may return to your normal size as a standard action. You may remain in this size for up to 1 minute per character level per day; this duration does not need to be consecutive, but it must be used in 1 minute increments.";

            var resource = Helpers.CreateAbilityResource($"{baseName}Resource", "", "", "887f8bb5ca65428684d42623d1ed2d09", icon);

            resource.SetIncreasedByLevel(0, 1, bloodline.Classes, bloodline.Archetypes);

            var strengthDomainBuff = library.Get <BlueprintBuff>("94dfcf5f3a72ce8478c8de5db69e752b");
            var buff = Helpers.CreateBuff(
                $"{baseName}Buff", displayName, description,
                "8c6ad79fd7f04f93aba2b8743afe9506", icon,
                strengthDomainBuff.FxOnStart,
                Helpers.Create <ChangeUnitSize>(a => a.Size = Size.Large),
                Helpers.Create <AddGenericStatBonus>(a =>
            {
                a.Descriptor = ModifierDescriptor.Size;
                a.Stat       = StatType.Strength;
                a.Value      = 6;
            }),
                Helpers.Create <AddGenericStatBonus>(a =>
            {
                a.Descriptor = ModifierDescriptor.Size;
                a.Stat       = StatType.Dexterity;
                a.Value      = -2;
            }),
                Helpers.Create <AddGenericStatBonus>(a =>
            {
                a.Descriptor = ModifierDescriptor.Size;
                a.Stat       = StatType.Constitution;
                a.Value      = 4;
            }),
                Helpers.Create <AddGenericStatBonus>(a =>
            {
                a.Descriptor = ModifierDescriptor.NaturalArmor;
                a.Stat       = StatType.AC;
                a.Value      = 4;
            }));

            var abilityBuff = LingeringBuffLogic.CreateBuffForAbility(buff,
                                                                      "a7f51053fa0b453c90bf413a3b5afd23", resource, DurationRate.Minutes);

            // Create activatable ability
            var inspireCourage = library.Get <BlueprintActivatableAbility>("2ce9653d7d2e9d948aa0b03e50ae52a6");
            var ability        = Helpers.CreateActivatableAbility($"{baseName}ToggleAbility",
                                                                  displayName, description, "0c68bb4d1b0b48babd5f93a44d6a5f66",
                                                                  icon, abilityBuff, AbilityActivationType.WithUnitCommand,
                                                                  CommandType.Standard, inspireCourage.ActivateWithUnitAnimation,
                                                                  Helpers.CreateActivatableResourceLogic(resource, ResourceSpendType.Never));

            return(Helpers.CreateFeature(baseName, displayName,
                                         description,
                                         "6c42a66a8aed4ed8aba182d2b4bc7c3d",
                                         icon,
                                         FeatureGroup.None,
                                         ability.CreateAddFact(),
                                         resource.CreateAddAbilityResource()));
        }