static internal void createGreaterDaemonTotem() { greater_daemon_totem = Helpers.CreateFeature("GreaterDaemonTotemFeature", "Daemon Totem, Greater", "If the barbarian kills a creature while raging, she heals 5 hit points.", "", lesser_daemon_totem.Icon, FeatureGroup.RagePower, Helpers.PrerequisiteClassLevel(barbarian_class, 10), Helpers.PrerequisiteFeature(daemon_totem)); var effect_action = Common.createContextActionHealTarget(Helpers.CreateContextDiceValue(DiceType.Zero, bonus: Common.createSimpleContextValue(5))); var action = Helpers.CreateActionList(effect_action); var buff = Helpers.CreateBuff("GreaterDaemonTotemBuff", "", "", "", null, null, Common.createAddInitiatorAttackWithWeaponTrigger(action, reduce_hp_to_zero: true, on_initiator: true) ); buff.SetBuffFlags(BuffFlags.HiddenInUi); Common.addContextActionApplyBuffOnFactsToActivatedAbilityBuffNoRemove(rage_buff, buff, greater_daemon_totem); lesser_daemon_totem_buff.AddComponent(Helpers.CreateContextRankConfig(baseValueType: Kingmaker.UnitLogic.Mechanics.Components.ContextRankBaseValueType.FeatureListRanks, type: AbilityRankType.StatBonus, progression: Kingmaker.UnitLogic.Mechanics.Components.ContextRankProgression.AsIs, featureList: new BlueprintFeature[] { lesser_daemon_totem, lesser_daemon_totem, daemon_totem, greater_daemon_totem } ) ); addToSelection(greater_daemon_totem); }