static void createTerrefyingHowl() { var dazzling_display = library.Get <BlueprintAbility>("5f3126d4120b2b244a95cb2ec23d69fb"); terrifying_howl_ability = library.CopyAndAdd <BlueprintAbility>("08cb5f4c3b2695e44971bf5c45205df0", "TerrifyingHowlAbility", ""); terrifying_howl_ability.SetName("Terrifying Howl"); terrifying_howl_ability.SetDescription("The barbarian unleashes a terrifying howl as a standard action. All shaken enemies within 30 feet must make a Will save (DC equal to 10 + 1/2 the barbarian’s level + the barbarian’s Strength modifier) or be frightened for 1d4+1 rounds.\n" + "Once an enemy has made a save versus terrifying howl (successful or not), it is immune to this power for 24 hours."); terrifying_howl_ability.Type = AbilityType.Extraordinary; terrifying_howl_ability.RemoveComponents <SpellComponent>(); terrifying_howl_ability.RemoveComponents <SpellListComponent>(); terrifying_howl_ability.Range = AbilityRange.Personal; var frighteneed_buff = library.Get <BlueprintBuff>("f08a7239aa961f34c8301518e71d4cdf"); var shaken_buff = library.Get <BlueprintBuff>("25ec6cb6ab1845c48a95f9c20b034220"); var cooldown_buff = Helpers.CreateBuff("TerrifyingHowlCooldownBuff", "Cooldown: Terrifying Howl", terrifying_howl_ability.Description, "", terrifying_howl_ability.Icon, null); cooldown_buff.SetBuffFlags(BuffFlags.RemoveOnRest); var on_failed_save = Common.createContextSavedApplyBuff(frighteneed_buff, Helpers.CreateContextDuration(Common.createSimpleContextValue(1), Kingmaker.UnitLogic.Mechanics.DurationRate.Rounds, Kingmaker.RuleSystem.DiceType.D4, Common.createSimpleContextValue(1) ), is_dispellable: false ); var apply_cooldown = Common.createContextActionApplyBuff(cooldown_buff, Helpers.CreateContextDuration(Common.createSimpleContextValue(1), Kingmaker.UnitLogic.Mechanics.DurationRate.Days), dispellable: false ); PrefabLink p = new PrefabLink(); p.AssetId = "cbfe312cb8e63e240a859efaad8e467c"; var fx = Common.createContextActionSpawnFx(p); var condition = Helpers.CreateConditional(new Condition[] { Helpers.CreateConditionHasBuffFromCaster(cooldown_buff, true), Helpers.CreateConditionHasFact(shaken_buff), Helpers.Create <ContextConditionIsEnemy>() }, Common.createContextActionSavingThrow(SavingThrowType.Will, Helpers.CreateActionList(on_failed_save, apply_cooldown, fx))); condition.ConditionsChecker.Operation = Operation.And; terrifying_howl_ability.ReplaceComponent <AbilityEffectRunAction>(Helpers.CreateRunActions(condition)); terrifying_howl_ability.AddComponent(Common.createContextCalculateAbilityParamsBasedOnClasses(new BlueprintCharacterClass[] { barbarian_class }, StatType.Strength)); terrifying_howl_ability.AddComponent(dazzling_display.GetComponent <AbilitySpawnFx>()); terrifying_howl_ability.AddComponent(Common.createAbilityCasterHasFacts(rage_marker_caster)); // allow to use only on rage terrifying_howl_feature = Common.AbilityToFeature(terrifying_howl_ability, false); terrifying_howl_feature.Groups = new FeatureGroup[] { FeatureGroup.RagePower }; terrifying_howl_feature.AddComponent(Helpers.PrerequisiteClassLevel(barbarian_class, 8)); addToSelection(terrifying_howl_feature); }
internal static void RemoveSlumberNerf() { BlueprintAbility slumber_hex = library.Get <BlueprintAbility>("31f0fa4235ad435e95ebc89d8549c2ce"); slumber_hex.RemoveComponents <AbilityTargetCasterHDDifference>(); slumber_hex.SetNameDescription(slumber_hex.GetName(), "Effect: A witch can cause a creature within 30 feet to fall into a deep, magical sleep, as per the spell sleep. The creature receives a Will save to negate the effect. If the save fails, the creature falls asleep for a number of rounds equal to the witch’s level.\n" + "The creature will not wake due to noise or light, but others can rouse it with a standard action. This hex ends immediately if the creature takes damage. Whether or not the save is successful, a creature cannot be the target of this hex again for 1 day."); BlueprintAbility shaman_slumber_hex = library.Get <BlueprintAbility>("c04cde18e91e4f84898de92a372bc1e0"); shaman_slumber_hex.RemoveComponents <AbilityTargetCasterHDDifference>(); shaman_slumber_hex.SetNameDescription(shaman_slumber_hex.GetName(), "Effect: A witch can cause a creature within 30 feet to fall into a deep, magical sleep, as per the spell sleep. The creature receives a Will save to negate the effect. If the save fails, the creature falls asleep for a number of rounds equal to the witch’s level.\n" + "The creature will not wake due to noise or light, but others can rouse it with a standard action. This hex ends immediately if the creature takes damage. Whether or not the save is successful, a creature cannot be the target of this hex again for 1 day."); //hexstrike 82cad6f016c04bf49fa851f5e9e10953 BlueprintAbility hexstrike_slumber = library.Get <BlueprintAbility>("82cad6f016c04bf49fa851f5e9e10953"); hexstrike_slumber.SetNameDescription(hexstrike_slumber.GetName(), "Effect: A witch can cause a creature within 30 feet to fall into a deep, magical sleep, as per the spell sleep. The creature receives a Will save to negate the effect. If the save fails, the creature falls asleep for a number of rounds equal to the witch’s level.\n" + "The creature will not wake due to noise or light, but others can rouse it with a standard action. This hex ends immediately if the creature takes damage. Whether or not the save is successful, a creature cannot be the target of this hex again for 1 day."); BlueprintFeature slumber_hex_feature = library.Get <BlueprintFeature>("c086eeb69a4442df9c4bb8469a2c362d"); slumber_hex_feature.SetNameDescription(slumber_hex.GetName(), "Effect: A witch can cause a creature within 30 feet to fall into a deep, magical sleep, as per the spell sleep. The creature receives a Will save to negate the effect. If the save fails, the creature falls asleep for a number of rounds equal to the witch’s level.\n" + "The creature will not wake due to noise or light, but others can rouse it with a standard action. This hex ends immediately if the creature takes damage. Whether or not the save is successful, a creature cannot be the target of this hex again for 1 day."); BlueprintFeature shaman_slumber_hex_feature = library.Get <BlueprintFeature>("ee7a8e5dc78a4d6c9e44d88affe47088"); shaman_slumber_hex_feature.SetNameDescription(shaman_slumber_hex.GetName(), "Effect: A witch can cause a creature within 30 feet to fall into a deep, magical sleep, as per the spell sleep. The creature receives a Will save to negate the effect. If the save fails, the creature falls asleep for a number of rounds equal to the witch’s level.\n" + "The creature will not wake due to noise or light, but others can rouse it with a standard action. This hex ends immediately if the creature takes damage. Whether or not the save is successful, a creature cannot be the target of this hex again for 1 day."); }
static void createVirtuosoPerformance() { var performance_resource = library.Get <BlueprintAbilityResource>("e190ba276831b5c4fa28737e5e49e6a6"); var inspire_competence = library.Get <BlueprintActivatableAbility>("430ab3bb57f2cfc46b7b3a68afd4f74e"); var increase_group_size = Common.createIncreaseActivatableAbilityGroupSize(ActivatableAbilityGroup.BardicPerformance); var consume_additional_resource = Helpers.Create <NewMechanics.ConsumeResourceIfAbilitiesFromGroupActivated>(c => { c.group = ActivatableAbilityGroup.BardicPerformance; c.num_abilities_activated = 2; c.resource = performance_resource; } ); var deactivate_performance = Helpers.Create <NewMechanics.DeactivatedAbilityFromGroup>(c => { c.group = ActivatableAbilityGroup.BardicPerformance; c.num_abilities_activated = 1; } ); virtuoso_performance = library.CopyAndAdd <BlueprintAbility>("20b548bf09bb3ea4bafea78dcb4f3db6", "VirtuosoPerformanceAbility", ""); //echolocation virtuoso_performance.SetIcon(inspire_competence.Icon); virtuoso_performance.SetName("Virtuoso Performance"); virtuoso_performance.SetDescription("While this spell is active, you may start a second bardic performance while maintaining another. Starting the second performance costs 2 rounds of bardic performance instead of 1. Maintaining both performances costs a total of 3 rounds of bardic performance for each round they are maintained. When this spell ends, one of the performances ends immediately."); virtuoso_performance.RemoveComponents <SpellListComponent>(); virtuoso_performance.RemoveComponents <AbilityEffectRunAction>(); virtuoso_performance.LocalizedDuration = Helpers.roundsPerLevelDuration; var buff = Helpers.CreateBuff("VirtuosoPerformanceBuff", virtuoso_performance.Name, virtuoso_performance.Description, "", virtuoso_performance.Icon, null, increase_group_size, Helpers.CreateAddFactContextActions(newRound: consume_additional_resource, deactivated: deactivate_performance) ); var apply_buff = Common.createContextActionApplyBuff(buff, Helpers.CreateContextDuration(bonus: Helpers.CreateContextValue(AbilityRankType.Default), rate: DurationRate.Rounds), is_from_spell: true); virtuoso_performance.AddComponent(Helpers.CreateRunActions(apply_buff)); virtuoso_performance.AddToSpellList(Helpers.bardSpellList, 4); virtuoso_performance.AddSpellAndScroll("33770ff24b320e343bb767815f800fc4"); //echolocation }
static void createGangUp() { var freebooter_bane_buff = library.Get <BlueprintBuff>("76dabd40a1c1c644c86ce30e41ad5cab"); var gang_up_buff = library.CopyAndAdd <BlueprintBuff>(vindicative_smite_buff.AssetGuid, "GangUpBuff", ""); gang_up_buff.SetName("Gang Up"); gang_up_buff.SetIcon(freebooter_bane_buff.Icon); gang_up_buff.ReplaceComponent <ACBonusAgainstTarget>(a => { a.CheckCaster = false; a.CheckCasterFriend = true; }); gang_up_buff.ReplaceComponent <AttackBonusAgainstTarget>(a => { a.CheckCaster = false; a.CheckCasterFriend = true; }); gang_up_buff.ReplaceComponent <DamageBonusAgainstTarget>(a => { a.CheckCaster = false; a.CheckCasterFriend = true; }); gang_up_ability = library.CopyAndAdd <BlueprintAbility>(vindicative_smite_ability.AssetGuid, "GangUpAbility", ""); gang_up_ability.RemoveComponents <AbilityTargetHasFact>(); gang_up_ability.RemoveComponents <AbilityResourceLogic>(); gang_up_ability.AddComponent(Common.createAbilityTargetHasFact(false, vindicative_smite_buff)); gang_up_ability.ActionType = CommandType.Move; foreach (var c in gang_up_ability.GetComponents <ContextRankConfig>().ToArray()) { var new_c = c.CreateCopy(); Helpers.SetField(new_c, "m_Min", 1); Helpers.SetField(new_c, "m_UseMin", true); Helpers.SetField(new_c, "m_Progression", ContextRankProgression.Div2); gang_up_ability.ReplaceComponent(c, new_c); } var apply_buff = Common.createContextActionApplyBuff(gang_up_buff, Helpers.CreateContextDuration(Helpers.CreateContextValue(AbilityRankType.SpeedBonus)), dispellable: false); gang_up_ability.ReplaceComponent <AbilityEffectRunAction>(a => a.Actions = Helpers.CreateActionList(apply_buff)); gang_up_ability.AddComponent(Helpers.CreateContextRankConfig(ContextRankBaseValueType.StatBonus, min: 1, type: AbilityRankType.SpeedBonus, stat: StatType.Charisma)); gang_up_ability.SetName(gang_up_buff.Name); gang_up_ability.SetIcon(gang_up_buff.Icon); gang_up_ability.SetDescription("At 5th level, a vindictive bastard forms a close bond with her companions. This allows her to spend a move action to grant half her vindictive smite bonus against a single target to all allies who can see and hear her. This bonus lasts for a number of rounds equal to the vindictive bastard’s Charisma modifier (minimum 1)."); swift_gang_up_ability = library.CopyAndAdd <BlueprintAbility>(gang_up_ability.AssetGuid, "SwiftGangUpAbility", ""); swift_gang_up_ability.ActionType = CommandType.Swift; swift_gang_up_ability.SetName("Swift Justice"); swift_gang_up_ability.SetDescription("At 11th level, a vindictive bastard can activate her gang up ability as a swift action."); gang_up = Common.AbilityToFeature(gang_up_ability, false, ""); swift_justice = Common.AbilityToFeature(swift_gang_up_ability, false, ""); }
// Token: 0x06000025 RID: 37 RVA: 0x00002918 File Offset: 0x00000B18 public static void modSlumber() { try { foreach (string assetId in RemoveSlumberHD.guids) { BlueprintAbility blueprintAbility = RemoveSlumberHD.library.Get <BlueprintAbility>(assetId); if (blueprintAbility != null) { blueprintAbility.RemoveComponents <AbilityTargetCasterHDDifference>(); } } } catch (Exception ex) { return; } }
static internal void createDeadlyJuggernaut() { var sneak_attack = library.Get <BlueprintFeature>("df4f34f7cac73ab40986bc33f87b1a3c"); var false_life = library.Get <BlueprintAbility>("7a5b5bf845779a941a67251539545762"); deadly_juggernaut = library.CopyAndAdd <BlueprintAbility>("779179912e6c6fe458fa4cfb90d96e10", "DeadlyJuggernautAbility", ""); deadly_juggernaut.RemoveComponents <SpellListComponent>(); deadly_juggernaut.ReplaceComponent <AbilitySpawnFx>(false_life.GetComponent <AbilitySpawnFx>()); deadly_juggernaut.ReplaceComponent <SpellComponent>(false_life.GetComponent <SpellComponent>()); deadly_juggernaut.SetIcon(sneak_attack.Icon); deadly_juggernaut.SetName("Deadly Juggernaut"); deadly_juggernaut.SetDescription("With every enemy life you take, you become increasingly dangerous and difficult to stop. During the duration of the spell, you gain a cumulative +1 luck bonus on melee attack rolls, melee weapon damage rolls, Strength checks, and Strength-based skill checks as well as DR 2/— each time you reduce a qualifying opponent to 0 or few hit points (maximum +5 bonus and DR 10/—) with a melee attack."); deadly_juggernaut.RemoveComponents <AbilityEffectRunAction>(); BlueprintBuff[] buffs = new BlueprintBuff[5]; for (int i = 0; i < buffs.Length; i++) { int bonus = i + 1; buffs[i] = Helpers.CreateBuff($"DeadlyJuggernaut{i + 1}Buff", $"Deadly Juggernaut (+{i + 1})", deadly_juggernaut.Description, "", deadly_juggernaut.Icon, null, Common.createAttackTypeAttackBonus(Common.createSimpleContextValue(bonus), AttackTypeAttackBonus.WeaponRangeType.Melee, ModifierDescriptor.Luck), Helpers.CreateAddStatBonus(StatType.AdditionalDamage, bonus, ModifierDescriptor.Luck), Common.createAbilityScoreCheckBonus(Common.createSimpleContextValue(bonus), ModifierDescriptor.Luck, StatType.Strength), Helpers.CreateAddStatBonus(StatType.SkillAthletics, bonus, ModifierDescriptor.Luck), Common.createPhysicalDR(bonus * 2) ); } var conditional = Helpers.CreateConditional(Helpers.CreateConditionHasBuff(buffs[0]), new GameAction[] { Common.createContextActionApplyBuff(buffs[1], Helpers.CreateContextDuration(), is_from_spell: true, is_child: true, is_permanent: true), Common.createContextActionRemoveBuff(buffs[0]) }, new GameAction[] { Common.createContextActionApplyBuff(buffs[0], Helpers.CreateContextDuration(), is_from_spell: true, is_child: true, is_permanent: true) } ); for (int i = 1; i < buffs.Length; i++) { GameAction[] if_true = null; if (i < buffs.Length - 1) { if_true = new GameAction[] { Common.createContextActionRemoveBuff(buffs[i]), Common.createContextActionApplyBuff(buffs[i + 1], Helpers.CreateContextDuration(), is_from_spell: true, is_child: true, is_permanent: true) }; } conditional = Helpers.CreateConditional(Helpers.CreateConditionHasBuff(buffs[i]), if_true, new GameAction[] { conditional }); } var on_kill = Common.createAddInitiatorAttackWithWeaponTrigger(Helpers.CreateActionList(conditional), reduce_hp_to_zero: true, check_weapon_range_type: true, on_initiator: true, range_type: AttackTypeAttackBonus.WeaponRangeType.Melee); var buff = Helpers.CreateBuff("DeadlyJuggernautBuff", deadly_juggernaut.Name, deadly_juggernaut.Description, "", deadly_juggernaut.Icon, null, on_kill); buff.Stacking = StackingType.Replace; var apply_buff = Common.createContextActionApplyBuff(buff, Helpers.CreateContextDuration(bonus: Helpers.CreateContextValue(AbilityRankType.Default), rate: DurationRate.Minutes), is_from_spell: true); deadly_juggernaut.AddComponent(Helpers.CreateRunActions(apply_buff)); deadly_juggernaut.AddToSpellList(Helpers.clericSpellList, 3); deadly_juggernaut.AddToSpellList(Helpers.inquisitorSpellList, 3); deadly_juggernaut.AddToSpellList(Helpers.paladinSpellList, 3); deadly_juggernaut.AddSpellAndScroll("539ff89add7d8e4409ab92df30e6afee"); //lead_blades }