You are on page 1of 50

1 using System;

2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Threading.Tasks;
6 using Kingmaker.Blueprints;
7 using Kingmaker.Blueprints.Classes;
8 using Kingmaker.Blueprints.Classes.Prerequisites;
9 using Kingmaker.Blueprints.Classes.Selection;
10 using Kingmaker.Blueprints.Classes.Spells;
11 using Kingmaker.Blueprints.Facts;
12 using Kingmaker.Designers.Mechanics.Facts;
13 using Kingmaker.ElementsSystem;
14 using Kingmaker.EntitySystem.Stats;
15 using Kingmaker.Enums;
16 using Kingmaker.Enums.Damage;
17 using Kingmaker.Localization;
18 using Kingmaker.ResourceLinks;
19 using Kingmaker.RuleSystem;
20 using Kingmaker.UI.Common;
21 using Kingmaker.UnitLogic;
22 using Kingmaker.UnitLogic.Abilities;
23 using Kingmaker.UnitLogic.Abilities.Blueprints;
24 using Kingmaker.UnitLogic.Abilities.Components;
25 using Kingmaker.UnitLogic.Abilities.Components.Base;
26 using Kingmaker.UnitLogic.Abilities.Components.CasterCheckers;
27 using Kingmaker.UnitLogic.Abilities.Components.TargetCheckers;
28 using Kingmaker.UnitLogic.ActivatableAbilities;
29 using Kingmaker.UnitLogic.Buffs.Blueprints;
30 using Kingmaker.UnitLogic.Class.Kineticist;
31 using Kingmaker.UnitLogic.Commands.Base;
32 using Kingmaker.UnitLogic.FactLogic;
33 using Kingmaker.UnitLogic.Mechanics;
34 using Kingmaker.UnitLogic.Mechanics.Actions;
35 using Kingmaker.UnitLogic.Mechanics.Components;
36 using Kingmaker.UnitLogic.Mechanics.Conditions;
37 using Kingmaker.UnitLogic.Parts;
38 using Kingmaker.Utility;
39 using static Kingmaker.UnitLogic.ActivatableAbilities.ActivatableAbilityResourceLogic;
40 using static Kingmaker.UnitLogic.Commands.Base.UnitCommand;
41
42 namespace CallOfTheWild
43 {
44 public class Witch
45 {
46 static LibraryScriptableObject library => Main.library;
47 internal static bool test_mode = false;
48 static public BlueprintCharacterClass witch_class;
49 static public BlueprintProgression witch_progression;
50 static public BlueprintFeatureSelection witch_patrons;
51 static public BlueprintFeatureSelection hex_selection;
52 static public BlueprintFeatureSelection witch_familiar;
53 static public BlueprintFeature witch_cantrips;
54 //hexes
55 static public BlueprintFeature healing;
56 static public BlueprintFeature beast_of_ill_omen;
57 static public BlueprintFeature slumber_hex;
58 static public BlueprintFeature misfortune_hex;
59 static public BlueprintFeature fortune_hex;
60 static public BlueprintFeature flight_hex;
61 static public BlueprintFeature iceplant_hex;
62 static public BlueprintFeature murksight_hex;
63 static public BlueprintFeature ameliorating;
64 static public BlueprintFeature evil_eye;
65 static public BlueprintFeature summer_heat;
66 static public BlueprintFeature cackle;
67 static public BlueprintFeature ward;
68 static public BlueprintFeature swamps_grasp;
69 //major hexes
70 static public BlueprintFeature major_ameliorating;
71 static public BlueprintFeature major_healing;
72 static public BlueprintFeature animal_skin;
73 static public BlueprintFeature agony;
74 static public BlueprintFeature beast_gift;
75 static public BlueprintFeature harrowing_curse;
76 static public BlueprintFeature ice_tomb;
77 static public BlueprintFeature regenerative_sinew;
78 static public BlueprintFeature retribution;
79 static public BlueprintFeature restless_slumber;
80 // grand hexes
81 static public BlueprintFeature animal_servant;
82 static public BlueprintFeature death_curse;
83 static public BlueprintFeature lay_to_rest;
84 static public BlueprintFeature life_giver;
85 static public BlueprintFeature eternal_slumber;
86 //death interupted ? - breath of life 1/creature/24 hours?
87 static public BlueprintFeature extra_hex_feat;
88
89 static public BlueprintArchetype ley_line_guardian_archetype;
90 static public BlueprintArchetype hedge_witch_archetype;
91 static public BlueprintArchetype hex_channeler_archetype;
92
93 static public BlueprintFeatureSelection
hex_channeler_channel_energy_selection;
94 static public BlueprintFeature improved_channel_hex_positive;
95 static public BlueprintFeature improved_channel_hex_negative;
96 static public BlueprintFeature witch_channel_negative;
97 static public BlueprintFeature witch_channel_positive;
98 static public BlueprintFeature conduit_surge;
99
100
101 static public BlueprintArchetype winter_witch_archetype;
102 static List<BlueprintFeature> winter_witch_patrons = new List<
BlueprintFeature>();
103 static public BlueprintFeatureSelection winter_witch_patron_selection;
104 static public BlueprintFeatureSelection winter_witch_familiar;
105 static public BlueprintFeature cold_flesh, cold_flesh2;
106 static public BlueprintFeature winter_witch_cantrips;
107 static public BlueprintFeature ice_magic;
108
109 static public Dictionary<string, Common.ExtraSpellList> patron_spelllist_map
= new Dictionary<string, Common.ExtraSpellList>();
110 static public Dictionary<BlueprintFeature, BlueprintAbility[]>
patron_spells_map = new Dictionary<BlueprintFeature, BlueprintAbility[]>();
111 static public BlueprintArchetype havocker;
112 static public BlueprintFeatureSelection patron_element;
113 static public BlueprintFeatureSelection infusion;
114 static public BlueprintFeature infusion_specialization;
115 static public BlueprintFeature spellburn;
116 static public BlueprintFeature gather_power;
117 static public BlueprintProgression kinetic_blast_progression;
118
119 static public BlueprintFeature patron_cl_fcb;
120 static public BlueprintFeature witch_knife;
121 static public BlueprintAbility ill_omen;
122 static public BlueprintAbility hermean_potential;
123 static public BlueprintAbility screech;
124
125 static public BlueprintArchetype invoker;
126 static public BlueprintBuff invoke_patron_buff;
127 static public BlueprintAbilityResource invoke_patron_resource;
128 static public BlueprintFeature invoke_patron;
129 static public BlueprintFeature second_invocation;
130
131 static HexEngine hex_engine;
132
133
134
135 internal static void createWitchClass()
136 {
137 var wizard_class = ResourcesLibrary.TryGetBlueprint<
BlueprintCharacterClass>("ba34257984f4c41408ce1dc2004e342e");
138 var sorcerer_class = ResourcesLibrary.TryGetBlueprint<
BlueprintCharacterClass>("b3a505fb61437dc4097f43c3f8f9a4cf");
139
140 witch_class = Helpers.Create<BlueprintCharacterClass>();
141 witch_class.name = "WitcherClass";
142 library.AddAsset(witch_class, "0df441ec2aa2407384ddd14e54a50d22");
143
144 hex_engine = new HexEngine(getWitchArray(), StatType.Intelligence);
145
146 witch_class.LocalizedName = Helpers.CreateString("Witch.Name", "Witch");
147 witch_class.LocalizedDescription = Helpers.CreateString(
"Witch.Description",
148 "Some gain power through study, some through devotion, others
through blood, but the witch gains power from her communion with the
unknown.Generally feared and misunderstood, the witch draws her magic from a pact
made with an otherworldly power. Communing with that source, using her familiar as a
conduit, the witch gains not only a host of spells, but a number of strange
abilities known as hexes.As a witch grows in power, she might learn about the source
of her magic, but some remain blissfully unaware.Some are even afraid of that
source, fearful of what it might be or where its true purposes lie.\n"
149 + "Role: While many witches are recluses, living on the edge of
civilization, some live within society, openly or in hiding. The blend of witches’
spells makes them adept at filling a number of different roles, from seer to healer,
and their hexes grant them a number of abilities that are useful in a fight.Some
witches travel about, seeking greater knowledge and better understanding of the
mysterious powers that guide them."
150 );
151 witch_class.m_Icon = wizard_class.Icon;
152 witch_class.SkillPoints = wizard_class.SkillPoints;
153 witch_class.HitDie = DiceType.D6;
154 witch_class.BaseAttackBonus = wizard_class.BaseAttackBonus;
155 witch_class.FortitudeSave = wizard_class.FortitudeSave;
156 witch_class.ReflexSave = wizard_class.ReflexSave;
157 witch_class.WillSave = wizard_class.WillSave;
158 witch_class.Spellbook = createWitchSpellbook();
159 createIllOmen();
160 createScreech();
161 createHermeanPotential();
162 witch_class.ClassSkills = new StatType[] {StatType.SkillKnowledgeArcana,
StatType.SkillKnowledgeWorld, StatType.SkillLoreNature, StatType.SkillLoreReligion,
StatType.SkillUseMagicDevice,
163 StatType.SkillPersuasion};
164 witch_class.IsDivineCaster = false;
165 witch_class.IsArcaneCaster = true;
166 witch_class.StartingGold = wizard_class.StartingGold;
167 witch_class.PrimaryColor = sorcerer_class.PrimaryColor;
168 witch_class.SecondaryColor = sorcerer_class.SecondaryColor;
169 witch_class.RecommendedAttributes = wizard_class.RecommendedAttributes;
170 witch_class.NotRecommendedAttributes = wizard_class.
NotRecommendedAttributes;
171 witch_class.EquipmentEntities = sorcerer_class.EquipmentEntities;
172 witch_class.MaleEquipmentEntities = sorcerer_class.MaleEquipmentEntities;
173 witch_class.FemaleEquipmentEntities = sorcerer_class.
FemaleEquipmentEntities;
174 witch_class.ComponentsArray = wizard_class.ComponentsArray;
175 witch_class.StartingItems = new Kingmaker.Blueprints.Items.BlueprintItem
[] {library.Get<Kingmaker.Blueprints.Items.BlueprintItem>(
"511c97c1ea111444aa186b1a58496664"), //crossbow
176
library.Get<Kingmaker.Blueprints.Items.BlueprintItem>(
"ada85dae8d12eda4bbe6747bb8b5883c"), // quarterstaff
177
library.Get<Kingmaker.Blueprints.Items.BlueprintItem>(
"cd635d5720937b044a354dba17abad8d"), //s. cure light wounds
178
library.Get<Kingmaker.Blueprints.Items.BlueprintItem>(
"cd635d5720937b044a354dba17abad8d"), //s. cure light wounds
179
library.Get<Kingmaker.Blueprints.Items.BlueprintItem>(
"e8308a74821762e49bc3211358e81016"), //s. mage armor
180
library.Get<Kingmaker.Blueprints.Items.BlueprintItem>(
"3c56e535129756e449af6c0e67fd937f") //s. burning hands
181
};
182 createWitchProgression();
183 witch_class.Progression = witch_progression;
184 createLeyLineGuardian();
185 createHedgeWitch();
186 createHexChanneler();
187 createWinterWitch();
188 createHavocker();
189 createInvoker();
190 witch_class.Archetypes = new BlueprintArchetype[] {
ley_line_guardian_archetype, hedge_witch_archetype, hex_channeler_archetype,
winter_witch_archetype, havocker, invoker};
191 Helpers.RegisterClass(witch_class);
192 createExtraHexFeat();
193
194 addToPrestigeClasses();
195
196 HexEngine.split_hex_feat.AddComponent(Helpers.PrerequisiteClassLevel(
witch_class, 10));
197 HexEngine.split_major_hex_feat.AddComponent(Helpers.
PrerequisiteClassLevel(witch_class, 18));
198
199 HexEngine.split_hex_feat.AddComponent(Common.prerequisiteNoArchetype(
havocker));
200 HexEngine.split_major_hex_feat.AddComponent(Common.
prerequisiteNoArchetype(havocker));
201
202 HexEngine.amplified_hex_feat.ReplaceComponent(HexEngine.
amplified_hex_feat.GetComponent<PrerequisiteClassLevel>(),
203 Helpers.Create<
PrerequisiteMechanics.CompoundPrerequisite>(c =>
204 {
205 c.prerequisite1 =
Helpers.PrerequisiteClassLevel(witch_class, 1);
206 c.prerequisite2 =
Common.prerequisiteNoArchetype(havocker);
207 c.Group = Prerequisite.
GroupType.Any;
208 })
209 );
210 HexEngine.accursed_hex_feat.ReplaceComponent(HexEngine.accursed_hex_feat.
GetComponent<PrerequisiteClassLevel>(),
211 Helpers.Create<
PrerequisiteMechanics.CompoundPrerequisite>(c =>
212 {
213 c.prerequisite1 =
Helpers.PrerequisiteClassLevel(witch_class, 1);
214 c.prerequisite2 =
Common.prerequisiteNoArchetype(havocker);
215 c.Group = Prerequisite.
GroupType.Any;
216 })
217 );
218 HexEngine.hex_strike.ReplaceComponent(HexEngine.hex_strike.GetComponent<
PrerequisiteClassLevel>(),
219 Helpers.Create<PrerequisiteMechanics.
CompoundPrerequisite>(c =>
220 {
221 c.prerequisite1 = Helpers.
PrerequisiteClassLevel(witch_class, 1);
222 c.prerequisite2 = Common.
prerequisiteNoArchetype(havocker);
223 c.Group = Prerequisite.GroupType.
Any;
224 })
225 );
226 extra_hex_feat.AddComponent(Common.prerequisiteNoArchetype(havocker));
227 witch_knife.AddComponent(Common.prerequisiteNoArchetype(havocker));
228 patron_cl_fcb.AddComponent(Common.prerequisiteNoArchetype(havocker));
229 }
230
231
232 static void createInvoker()
233 {
234 invoker = Helpers.Create<BlueprintArchetype>(a =>
235 {
236 a.name = "InvokerWitchArchetype";
237 a.LocalizedName = Helpers.CreateString($"{a.name}.Name", "Invoker");
238 a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description"
, "The invoker uses her familiar to summon facets of her mysterious patron directly
into her body, enhancing her skills and granting her powerful abilities. Whether
these spiritual enhancements come from a single entity or a host of spiritual forces
associated with the witch’s patron can vary, and in many cases, a particular invoker
never learns the truth of this matter.");
239 });
240 Helpers.SetField(invoker, "m_ParentClass", witch_class);
241 library.AddAsset(invoker, "");
242
243 createInvokePatron();
244
245 invoker.RemoveFeatures = new LevelEntry[] { Helpers.LevelEntry(1,
hex_selection),
246 Helpers.
LevelEntry(8, hex_selection),
247 Helpers.
LevelEntry(10, hex_selection),
248 Helpers.
LevelEntry(16, hex_selection)
249 };
250 invoker.AddFeatures = new LevelEntry[] { Helpers.LevelEntry(1,
invoke_patron), Helpers.LevelEntry(10, second_invocation) };
251 witch_class.Progression.UIGroups = witch_class.Progression.UIGroups.
AddToArray(Helpers.CreateUIGroup(invoke_patron, second_invocation));
252 }
253
254
255 static void createInvokePatron()
256 {
257 invoke_patron_buff = Helpers.CreateBuff("InvokePatronBuff",
258 "",
259 "",
260 "",
261 null,
262 null);
263 invoke_patron_buff.SetBuffFlags(BuffFlags.HiddenInUi);
264 var bondage = createPatronAspect("BondagePatronAspect",
265 "Bondage",
266 "The invoker gains a +2 enhancement
bonus to her Strength. This bonus increases to +4 at 8th level and +6 at 16th level.",
267 Helpers.GetIcon(
"c7773d1b408fea24dbbb0f7bf3eb864e"), //transmutation strength
268 Helpers.CreateAddContextStatBonus(
StatType.Strength, ModifierDescriptor.Enhancement),
269 Helpers.CreateContextRankConfig(
ContextRankBaseValueType.ClassLevel, classes: getWitchArray(),
270
progression: ContextRankProgression.Custom,
271
customProgression: new (int, int)[] { (7, 2), (15, 4), (20, 6) })
272 );
273
274 var crisis = createPatronAspect("CrisisPatronAspect",
275 "Crisis",
276 "The invoker gains a +2 enhancement
bonus to her Constitution. This bonus increases to +4 at 8th level and +6 at 16th
level.",
277 Helpers.GetIcon(
"99cf556b967c2074ca284e127d815711"), //transmutation constitution
278 Helpers.CreateAddContextStatBonus(
StatType.Constitution, ModifierDescriptor.Enhancement),
279 Helpers.CreateContextRankConfig(
ContextRankBaseValueType.ClassLevel, classes: getWitchArray(),
280
progression: ContextRankProgression.Custom,
281
customProgression: new (int, int)[] { (7, 2), (15, 4), (20, 6) })
282 );
283
284 var decisions = createPatronAspect("DecisionsPatronAspect",
285 "Decisions",
286 "The invoker gains a +2 enhancement
bonus to Dexterity. This bonus increases to +4 at 8th level and +6 at 16th level.",
287 Helpers.GetIcon(
"3553bda4d6dfe6344ad89b25f7be939a"), //transmutation dexterity
288 Helpers.CreateAddContextStatBonus(
StatType.Dexterity, ModifierDescriptor.Enhancement),
289 Helpers.CreateContextRankConfig(
ContextRankBaseValueType.ClassLevel, classes: getWitchArray(),
290
progression: ContextRankProgression.Custom,
291
customProgression: new (int, int)[] { (7, 2), (15, 4), (20, 6) })
292 );
293
294 var fortune = createPatronAspect("FortunePatronAspect",
295 "Fortune",
296 "The invoker gains a +1 resistance
bonus on saving throws. This bonus increases to +3 at 8th level and +5 at 16th
level.",
297 Helpers.GetIcon(
"1bb08308c9f6a5e4697887cd438b7221"), //judgement protection
298 Helpers.CreateAddContextStatBonus(
StatType.SaveFortitude, ModifierDescriptor.Resistance),
299 Helpers.CreateAddContextStatBonus(
StatType.SaveReflex, ModifierDescriptor.Resistance),
300 Helpers.CreateAddContextStatBonus(
StatType.SaveWill, ModifierDescriptor.Resistance),
301 Helpers.CreateContextRankConfig(
ContextRankBaseValueType.ClassLevel, classes: getWitchArray(),
302
progression: ContextRankProgression.StartPlusDoubleDivStep, stepLevel: 8, startLevel:
0)
303 );
304
305 var paradise = createPatronAspect("ParadisePatronAspect",
306 "Paradise",
307 "The invoker gains a +3 competence
bonus on Mobility checks and concentration checks. This bonus increases to +6 at 8th
level and +9 at 16th level.",
308 Helpers.GetIcon(
"c074a5d615200494b8f2a9c845799d93"), //rogue talent
309 Helpers.CreateAddContextStatBonus(
StatType.SkillMobility, ModifierDescriptor.Competence),
310 Helpers.Create<ConcentrationBonus>(c =>
c.Value = Helpers.CreateContextValue(AbilityRankType.Default)),
311 Helpers.CreateContextRankConfig(
ContextRankBaseValueType.ClassLevel, classes: getWitchArray(),
312
progression: ContextRankProgression.Custom,
313
customProgression: new (int, int)[] { (7, 3), (15, 6), (20, 9) })
314 );
315
316 var revelation = createPatronAspect("RevelationPatronAspect",
317 "Revelation",
318 "The invoker gains a +1 insight
bonus on attack rolls made with weapons. This bonus increases to +2 at 8th level and
+3 at 16th level.",
319 NewSpells.magic_weapon.Icon,
320 Helpers.Create<NewMechanics.
WeaponsOnlyAttackBonus>(w => w.value = Helpers.CreateContextValue(AbilityRankType.
Default)),
321 Helpers.CreateContextRankConfig(
ContextRankBaseValueType.ClassLevel, classes: getWitchArray(),
322
progression: ContextRankProgression.OnePlusDivStep, stepLevel: 8)
323 );
324
325 var bridge = createPatronAspect("BridgePatronAspect",
326 "Bridge",
327 "The invoker treats other creatures as
if their damage reduction were 2 lower. This increases to 5 lower at 8th level and
10 lower at 16th level.",
328 Helpers.GetIcon(
"487af80cdfbaad74b8c2fd644c538233"), //piercing judgment
329 Helpers.Create<
SpellManipulationMechanics.ReduceEnergyResistance>(w => w.value = Helpers.
CreateContextValue(AbilityRankType.Default)),
330 Helpers.CreateContextRankConfig(
ContextRankBaseValueType.ClassLevel, classes: getWitchArray(),
331
progression: ContextRankProgression.Custom,
332
customProgression: new (int, int)[] { (7, 2), (15, 5), (20, 10) }
333 )
334 );
335
336 var reckoning = createPatronAspect("ReckoningPatronAspect",
337 "Reckoning",
338 "The invoker adds an insight bonus
on damage rolls from attacks made with spells and natural attacks, gaining 1 point
of damage per die rolled. At 8th level, the invoker gains a +4 bonus to confirm
critical hits threatened with spells and natural attacks. At 16th level, the
critical threat range of the invoker’s spells and natural attacks doubles, as if
from Improved Critical.",
339 Helpers.GetIcon(
"4ebaf39efb8ffb64baf92784808dc49c"), //destruction judgment
340 Helpers.Create<OnCastMechanics.
DamageBonusPerDieOnSpell>(d => { d.apply_to_natural_attacks = true; d.specific_class
= witch_class; }),
341 Helpers.Create<OnCastMechanics.
SpellCriticalRangeDouble>(d =>
342 {
343 d.apply_to_natural_attacks =
true;
344 d.check_context_value = true;
345 d.value = Helpers.
CreateContextValue(AbilityRankType.Default);
346 d.specific_class = witch_class;
347 }
348 ),
349 Helpers.Create<OnCastMechanics.
SpellCriticalConfirmationBonus>(d =>
350 {
351 d.apply_to_natural_attacks =
true;
352 d.value = Helpers.
CreateContextValue(AbilityRankType.StatBonus);
353 d.specific_class = witch_class;
354 }
355 ),
356 Helpers.CreateContextRankConfig(
ContextRankBaseValueType.ClassLevel, classes: getWitchArray(),
357
progression: ContextRankProgression.Custom, type: AbilityRankType.StatBonus,
358
customProgression: new (int, int)[] { (7, 0), (20, 4) }),
359 Helpers.CreateContextRankConfig(
ContextRankBaseValueType.ClassLevel, classes: getWitchArray(),
360
progression: ContextRankProgression.DivStep, stepLevel: 16)
361 );
362
363 var curiosity = createPatronAspect("CuriosityPatronAspect",
364 "Curiosity",
365 "The DCs of the invoker’s patron spells
increase by 1. At 8th level this bonus also applies to all invoker's hexes. At 16th
level, these DCs increase by an additional 1.",
366 Helpers.GetIcon(
"ae4d3ad6a8fda1542acf2e9bbc13d113"), //fix cunning
367 Helpers.Create<NewMechanics.
IncreaseSpecifiedSpellsDC>(i =>
368 {
369 i.spells = HexEngine.
amplified_hex_buff.GetComponent<NewMechanics.IncreaseSpecifiedSpellsDC>().spells;
370 i.BonusDC = Helpers.
CreateContextValue(AbilityRankType.Default);
371 }),
372 Helpers.CreateContextRankConfig(
ContextRankBaseValueType.ClassLevel, classes: getWitchArray(),
373
progression: ContextRankProgression.DivStep, stepLevel: 8)
374 );
375
376 foreach (var kv in patron_spells_map)
377 {
378 var patron_buff = Helpers.CreateBuff(kv.Key.name + "CurioistyBuff",
379 "",
380 "",
381 "",
382 null,
383 null,
384 Helpers.Create<NewMechanics.
IncreaseSpecifiedSpellsDC>(i =>
385 {
386 i.spells = kv.Value;
387 i.BonusDC = Helpers.
CreateContextValue(AbilityRankType.Default);
388 }),
389 Helpers.CreateContextRankConfig(
ContextRankBaseValueType.ClassLevel, classes: getWitchArray(),
390
progression: ContextRankProgression.DivStep, stepLevel: 8, min: 1)
391 );
392 patron_buff.SetBuffFlags(BuffFlags.HiddenInUi);
393 Common.
addContextActionApplyBuffOnCasterFactsToActivatedAbilityBuffNoRemove(curiosity.Buff,
patron_buff, kv.Key);
394 }
395
396 var toggles = new BlueprintActivatableAbility[]
397 {
398 bondage, bridge, crisis, curiosity, decisions, fortune, paradise,
reckoning, revelation
399 };
400
401 var description = "At 1st level, an invoker can invite spirits
associated with her patron’s themes into her body and mind as a swift action. This
functions like a hunter’s animal focus, except she emulates facets of her patron,
chosen from the list below. The invoker can use this ability for a number of minutes
per day equal to her level; this duration need not be consecutive, but it must be
spent in 1-minute increments.";
402
403 foreach (var t in toggles)
404 {
405 description += "\n" + t.Name + ": " + t.Description;
406 }
407
408 invoke_patron_resource = Helpers.CreateAbilityResource(
"InvokePatronResource", "", "", "", null);
409 invoke_patron_resource.SetIncreasedByLevel(0, 1, getWitchArray());
410
411 invoke_patron = Helpers.CreateFeature("InvokePatronFeature",
412 "Invoke Patron",
413 description,
414 "",
415 Helpers.GetIcon(
"ef16771cb05d1344989519e87f25b3c5"),
416 FeatureGroup.None,
417 Helpers.CreateAddFacts(toggles),
418 invoke_patron_resource.
CreateAddAbilityResource()
419 );
420
421 var ability = Helpers.CreateAbility("InvokePatronAbility",
422 invoke_patron.Name,
423 invoke_patron.Description,
424 "",
425 invoke_patron.Icon,
426 AbilityType.Supernatural,
427 CommandType.Swift,
428 AbilityRange.Personal,
429 Helpers.oneMinuteDuration,
430 "",
431 Helpers.CreateRunActions(Common.
createContextActionApplyBuff(invoke_patron_buff, Helpers.CreateContextDuration(1,
DurationRate.Minutes), dispellable: false)),
432 invoke_patron_resource.
CreateResourceLogic()
433 );
434 ability.setMiscAbilityParametersSelfOnly();
435
436 invoke_patron.AddComponent(Helpers.CreateAddFact(ability));
437 second_invocation = Helpers.CreateFeature(
"SecondInvocationInvokerFeature",
438 "Second Invocation",
439 "At 10th level, whenever an
invoker uses her invoke patron ability, she selects two different facets of her
patron for herself instead of one.",
440 "",
441 Helpers.GetIcon(
"ef16771cb05d1344989519e87f25b3c5"),
442 FeatureGroup.None,
443 Common.
createIncreaseActivatableAbilityGroupSize(ActivatableAbilityGroupExtension.
InvokePatron.ToActivatableAbilityGroup())
444 );
445 }
446
447
448 static BlueprintActivatableAbility createPatronAspect(string prefix, string
display_name, string description,
449 UnityEngine.Sprite icon, params
BlueprintComponent[] components)
450 {
451 var effect_buff = Helpers.CreateBuff(prefix + "Buff",
452 display_name,
453 description,
454 "",
455 icon,
456 null,
457 components
458 );
459
460
461 var enable_buff = Helpers.CreateBuff("Enable" + effect_buff.name,
462 effect_buff.Name,
463 effect_buff.Description,
464 "",
465 effect_buff.Icon,
466 null);
467 enable_buff.SetBuffFlags(BuffFlags.HiddenInUi);
468 var toggle = Common.buffToToggle(enable_buff, CommandType.Free, true);
469 toggle.Group = ActivatableAbilityGroupExtension.InvokePatron.
ToActivatableAbilityGroup();
470
471 Common.
addContextActionApplyBuffOnCasterFactsToActivatedAbilityBuffFixedDuration(
invoke_patron_buff, effect_buff, Helpers.CreateContextDuration(1, DurationRate.
Minutes), enable_buff);
472 return toggle;
473 }
474
475
476 static void createWinterWitch()
477 {
478 winter_witch_familiar = library.CopyAndAdd<BlueprintFeatureSelection>(
"363cab72f77c47745bf3a8807074d183", "WinterWitchFamiliarSelection", "");
479 winter_witch_familiar.AllFeatures = new BlueprintFeature[]
480 {
481 library.Get<BlueprintFeature>("1cb0b559ca2e31e4d9dc65de012fa82f"),
//cat
482 library.Get<BlueprintFeature>("97dff21a036e80948b07097ad3df2b30"),
//hare
483 library.Get<BlueprintFeature>("4d48365690ea9a746a74d19c31562788")
//rat
484 };
485 winter_witch_familiar.SetDescription("Winter witches must choose a
familiar that is native to the frozen north, even when they themselves operate in
other regions. Traditionally, this limits winter witch familiar choices to cat,
hare, or rat.");
486 winter_witch_familiar.Features = winter_witch_familiar.AllFeatures;
487
488 winter_witch_archetype = Helpers.Create<BlueprintArchetype>(a =>
489 {
490 a.name = "WinterWitchArchetype";
491 a.LocalizedName = Helpers.CreateString($"{a.name}.Name", "Winter
Witch");
492 a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description"
, "The descendents of Baba Yaga rule the frozen realm of Irrisen, and possess a
unique power stemming from their otherworldly origin and their ties to cold magic.
This power is partly magical, partly political, and partly cultural. Known as winter
witches, these scions of Baba Yaga have not bothered to hide their secrets from
outsiders, for they understand that those who see winter witches not native to
Irrisen working their frozen magic will simply assume the witches are agents of
Irrisen. By opening up their traditions to those who have no direct blood connection
to Baba Yaga or the ruling families of Irrisen, they spread the notoriety and infamy
of their wintry magic far beyond what they could accomplish on their own. While
winter witches are most commonly encountered in Irrisen, they could be encountered
in any part of the Inner Sea region, where they work to increase Irrisen’s notoriety
with each frozen spell and manipulative hex they cast. A winter witch has the
following class features.");
493 });
494 Helpers.SetField(winter_witch_archetype, "m_ParentClass", witch_class);
495 library.AddAsset(winter_witch_archetype, "");
496
497 var spellbook = library.CopyAndAdd<BlueprintSpellbook>(witch_class.
Spellbook, "WinterWitchSpellbook", "");
498 var winter_witch_spell_list = Common.combineSpellLists(
"WinterWitchSpellList", spellbook.SpellList);
499 Common.excludeSpellsFromList(winter_witch_spell_list, p => ((p.
SpellDescriptor & SpellDescriptor.Fire) != 0));
500 spellbook.SpellList = winter_witch_spell_list;
501 var ray_of_frost = library.Get<BlueprintAbility>(
"9af2ab69df6538f4793b2f9c3cc85603");
502 ray_of_frost.AddToSpellList(spellbook.SpellList, 0);
503
504 winter_witch_cantrips = Common.createCantrips("WinterWitchCantrips",
505 "Cantrips",
506 "A winter witch adds ray
of frost to list of cantrips she can cast.",
507 ray_of_frost.Icon,
508 "",
509 witch_class,
510 StatType.Intelligence,
511 winter_witch_spell_list.
SpellsByLevel[0].Spells.ToArray()
512 );
513 winter_witch_patron_selection = Helpers.CreateFeatureSelection(
"WinterWitchPatronSelection",
514 "Winter Patron",
515 "A winter witch must
choose her patron from one of the following patron themes: ancestors, enchantment,
endurance, transformation, or winter. ",
516 "",
517 Helpers.GetIcon(
"e377feb2ecec95e478e0565da621ea55"),
518 FeatureGroup.None);
519 winter_witch_patron_selection.AllFeatures = winter_witch_patrons.ToArray
();
520 winter_witch_patron_selection.Features = winter_witch_patrons.ToArray();
521
522
523 ice_magic = Helpers.CreateFeature("WinterWitchIceMagicFeature",
524 "Ice Magic",
525 "When a winter witch casts a spell
with the cold descriptor, the save DC of the spell increases by +1. A winter witch
cannot learn or cast spells with the fire descriptor at all.",
526 "",
527 Helpers.GetIcon(
"e7c530f8137630f4d9d7ee1aa7b1edc0"), //cone of cold
528 FeatureGroup.None,
529 Helpers.Create<NewMechanics.
ContextIncreaseDescriptorSpellsDC>(c => { c.Descriptor = SpellDescriptor.Cold; c.
Value = 1; c.specific_class = witch_class; })
530 );
531 createColdFlesh();
532
533 winter_witch_archetype.RemoveFeatures = new LevelEntry[] { Helpers.
LevelEntry(1, witch_cantrips, witch_familiar, witch_patrons), Helpers.LevelEntry(4,
hex_selection)};
534 winter_witch_archetype.AddFeatures = new LevelEntry[] { Helpers.
LevelEntry(1, winter_witch_cantrips, winter_witch_familiar,
winter_witch_patron_selection, ice_magic), Helpers.LevelEntry(4, cold_flesh), Helpers
.LevelEntry(14, cold_flesh2) };
535 winter_witch_archetype.ReplaceSpellbook = spellbook;
536 witch_class.Progression.UIDeterminatorsGroup = witch_class.Progression.
UIDeterminatorsGroup.AddToArray(winter_witch_cantrips, winter_witch_familiar);
537 witch_class.Progression.UIGroups = witch_class.Progression.UIGroups.
AddToArray(Helpers.CreateUIGroup(ice_magic, cold_flesh, cold_flesh2));
538 }
539
540
541 static void createColdFlesh()
542 {
543 cold_flesh = Helpers.CreateFeature("WinterWitchColdFleshFeature",
544 "Cold Flesh",
545 "At 4th level, winter witch gains cold resistance
5, making her comfortable in near-freezing temperatures. At 9th-level, this
increases to cold resistance 10, and at 14th level, it becomes immunity to cold.",
546 "",
547 Helpers.GetIcon("5368cecec375e1845ae07f48cdc09dd1"
), //resist cold
548 FeatureGroup.None,
549 Common.createEnergyDRContextRank(DamageEnergyType.
Cold, AbilityRankType.Default, multiplier: 5)
550 );
551 cold_flesh.AddComponent(Helpers.CreateContextRankConfig(
ContextRankBaseValueType.ClassLevel, progression: ContextRankProgression.
StartPlusDivStep, classes: getWitchArray(),
552 startLevel: 4,
stepLevel: 5, max: 2));
553 cold_flesh.ReapplyOnLevelUp = true;
554
555 cold_flesh2 = Helpers.CreateFeature("WinterWitchColdFlesh2Feature",
556 "Cold Flesh",
557 "At 4th level, winter witch gains cold
resistance 5, making her comfortable in near-freezing temperatures. At 9th-level,
this increases to cold resistance 10, and at 14th level, it becomes immunity to
cold.",
558 "",
559 Helpers.GetIcon(
"021d39c8e0eec384ba69140f4875e166"), //protection from cold
560 FeatureGroup.None,
561 Common.createAddEnergyDamageImmunity(
DamageEnergyType.Cold)
562 );
563 }
564
565 static void addToPrestigeClasses()
566 {
567 Common.addReplaceSpellbook(Common.EldritchKnightSpellbookSelection,
witch_class.Spellbook, "EldritchKnightWitch",
568 Common.createPrerequisiteClassSpellLevel(
witch_class, 3),
569 Common.prerequisiteNoArchetype(witch_class,
ley_line_guardian_archetype),
570 Common.prerequisiteNoArchetype(witch_class,
winter_witch_archetype)
571 );
572 Common.addReplaceSpellbook(Common.ArcaneTricksterSelection, witch_class.
Spellbook, "ArcaneTricksterWitch",
573 Common.createPrerequisiteClassSpellLevel(witch_class, 2),
574 Common.prerequisiteNoArchetype(witch_class,
ley_line_guardian_archetype), Common.prerequisiteNoArchetype(witch_class,
winter_witch_archetype));
575 Common.addReplaceSpellbook(Common.MysticTheurgeArcaneSpellbookSelection,
witch_class.Spellbook, "MysticTheurgeWitch",
576 Common.createPrerequisiteClassSpellLevel(witch_class, 2),
577 Common.prerequisiteNoArchetype(witch_class,
ley_line_guardian_archetype), Common.prerequisiteNoArchetype(witch_class,
winter_witch_archetype));
578
579 Common.addReplaceSpellbook(Common.EldritchKnightSpellbookSelection,
ley_line_guardian_archetype.ReplaceSpellbook, "EldritchKnightLeyLineGuardian",
580 Common.createPrerequisiteClassSpellLevel(witch_class, 3),
581 Common.createPrerequisiteArchetypeLevel(witch_class,
ley_line_guardian_archetype, 1));
582 Common.addReplaceSpellbook(Common.ArcaneTricksterSelection,
ley_line_guardian_archetype.ReplaceSpellbook, "ArcaneTricksterLeyLineGuardian",
583 Common.createPrerequisiteClassSpellLevel(witch_class, 2),
584 Common.createPrerequisiteArchetypeLevel(witch_class,
ley_line_guardian_archetype, 1));
585 Common.addReplaceSpellbook(Common.MysticTheurgeArcaneSpellbookSelection,
ley_line_guardian_archetype.ReplaceSpellbook, "MysticTheurgeLeyLineGuardian",
586 Common.createPrerequisiteClassSpellLevel(witch_class, 2),
587 Common.createPrerequisiteArchetypeLevel(witch_class,
ley_line_guardian_archetype,1));
588
589 Common.addReplaceSpellbook(Common.EldritchKnightSpellbookSelection,
winter_witch_archetype.ReplaceSpellbook, "EldritchKnightWinterWitch",
590 Common.createPrerequisiteClassSpellLevel(
witch_class, 3),
591 Common.createPrerequisiteArchetypeLevel(
witch_class, winter_witch_archetype, 1));
592 Common.addReplaceSpellbook(Common.ArcaneTricksterSelection,
winter_witch_archetype.ReplaceSpellbook, "ArcaneTricksterWinterWitch",
593 Common.createPrerequisiteClassSpellLevel(witch_class, 2),
594 Common.createPrerequisiteArchetypeLevel(witch_class,
winter_witch_archetype, 1));
595 Common.addReplaceSpellbook(Common.MysticTheurgeArcaneSpellbookSelection,
winter_witch_archetype.ReplaceSpellbook, "MysticTheurgeWinterWitch",
596 Common.createPrerequisiteClassSpellLevel(witch_class, 2),
597 Common.createPrerequisiteArchetypeLevel(witch_class,
winter_witch_archetype, 1));
598
599
600 Common.addReplaceSpellbook(Common.DragonDiscipleSpellbookSelection,
ley_line_guardian_archetype.ReplaceSpellbook, "DragonDiscipleLeyLineGuardian",
601 Common.createPrerequisiteClassSpellLevel(witch_class, 1),
602 Common.createPrerequisiteArchetypeLevel(witch_class,
ley_line_guardian_archetype, 1));
603 }
604
605
606 static void createHavocker()
607 {
608 havocker = Helpers.Create<BlueprintArchetype>(a =>
609 {
610 a.name = "HavockerArchetype";
611 a.LocalizedName = Helpers.CreateString($"{a.name}.Name", "Havocker");
612 a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description"
, "Although most witches are guided to subtle curses and debilitating hexes by their
mysterious patrons, some are instead taught the secrets of harnessing raw,
destructive elemental power.");
613 });
614 Helpers.SetField(havocker, "m_ParentClass", witch_class);
615 library.AddAsset(havocker, "");
616 createPatronElement();
617 createInfusions();
618 createSpellBurn();
619 havocker.RemoveFeatures = new LevelEntry[] { Helpers.LevelEntry(1,
witch_patrons, witch_familiar, hex_selection),
620 Helpers.LevelEntry(2,
hex_selection),
621 Helpers.LevelEntry(4,
hex_selection),
622 Helpers.LevelEntry(6,
hex_selection),
623 Helpers.LevelEntry(8,
hex_selection),
624 Helpers.LevelEntry(10,
hex_selection),
625 Helpers.LevelEntry(12,
hex_selection),
626 Helpers.LevelEntry(14,
hex_selection),
627 Helpers.LevelEntry(16,
hex_selection),
628 Helpers.LevelEntry(18,
hex_selection),
629 Helpers.LevelEntry(20,
hex_selection)
630 };
631 havocker.AddFeatures = new LevelEntry[] { Helpers.LevelEntry(1,
patron_element, kinetic_blast_progression, gather_power),
632 Helpers.LevelEntry(2),
633 Helpers.LevelEntry(4, infusion),
634 Helpers.LevelEntry(6, spellburn
),
635 Helpers.LevelEntry(8, infusion),
636 Helpers.LevelEntry(10,
infusion_specialization),
637 Helpers.LevelEntry(12, infusion
),
638 Helpers.LevelEntry(14,
infusion_specialization),
639 Helpers.LevelEntry(16, infusion
),
640 Helpers.LevelEntry(18,
infusion_specialization),
641 Helpers.LevelEntry(20, infusion)
642 };
643 witch_progression.UIDeterminatorsGroup = witch_progression.
UIDeterminatorsGroup.AddToArray(patron_element);
644 witch_progression.UIGroups = witch_progression.UIGroups.AddToArray(
Helpers.CreateUIGroup(spellburn, gather_power));
645 }
646
647
648 static void createPatronElement()
649 {
650 var kineticist = library.Get<BlueprintCharacterClass>(
"42a455d9ec1ad924d889272429eb8391");
651 var elemental_foci = new List<BlueprintFeature>();
652 var elemental_focus = library.Get<BlueprintFeatureSelection>(
"1f3a15a3ae8a5524ab8b97f469bf4e3d");
653
654 foreach (var efs in elemental_focus.AllFeatures)
655 {
656 var progression = efs as BlueprintProgression;
657
658 var focus = Helpers.CreateProgression("Havocker" + progression.name,
659 progression.Name,
660 progression.Description,
661 "",
662 progression.Icon,
663 progression.Groups[0]);
664 focus.Classes = getWitchArray();
665 focus.LevelEntries = new LevelEntry[] { progression.LevelEntries[0] };
666 focus.AddComponent(Helpers.Create<PrerequisiteMechanics.
PrerequisiteNoClassLevelVisible>(p => p.CharacterClass = progression.Classes[0]));
667 progression.AddComponent(Common.prerequisiteNoArchetype(havocker));
668
669 var blast_selection = progression.LevelEntries[0].Features[0] as
BlueprintFeatureSelection;
670 if (blast_selection != null)
671 {
672 foreach (var s in blast_selection.AllFeatures)
673 {
674 var s_progression = s as BlueprintProgression;
675 s_progression.Classes = s_progression.Classes.AddToArray(
witch_class);
676 s_progression.Archetypes = new BlueprintArchetype[] {
havocker };
677 }
678 }
679 else
680 {
681 var s_progression = progression.LevelEntries[0].Features[0] as
BlueprintProgression;
682 s_progression.Classes = s_progression.Classes.AddToArray(
witch_class);
683 s_progression.Archetypes = new BlueprintArchetype[] { havocker };
684 }
685 elemental_foci.Add(focus);
686 }
687
688 patron_element = Helpers.CreateFeatureSelection(
"PatronElementFeatureSelection",
689 "Patron Element",
690 "A havocker’s patron
grants her the ability to devastate her foes with a specific element. At 1st level,
rather than selecting a standard patron and gaining patron spells, the witch selects
a specific kineticist element, which represents the shadowy forces from which she
gains her familiar and class powers. The havocker gains the elemental focus and
kinetic blast class features with the associated element, using her witch level as
her effective kineticist level. A havocker uses her Intelligence modifier instead of
her Constitution modifier to determine her damage with wild talents, the DCs of
Constitution-based wild talents, the durations of wild talents with
Constitution-based durations, her bonus on concentration checks for wild talents,
and any other Constitution-based effects of all her wild talents.",
691 "",
692 elemental_focus.Icon,
693 FeatureGroup.None,
694 Common.
createAddWeaponProficiencies(WeaponCategory.KineticBlast)
695 );
696 patron_element.AllFeatures = elemental_foci.ToArray();
697 elemental_focus.AddComponent(Helpers.Create<NewMechanics.
FeatureReplacement>(f => f.replacement_feature = patron_element));
698
699
700
701 var burn_resource = Helpers.CreateAbilityResource("HavockerBurnResource",
"", "", "", null);
702 burn_resource.SetFixedResource(0);
703
704 var burn_per_round_resource = Helpers.CreateAbilityResource(
"HavockerBurnPerRoundResource", "", "", "", null);
705 burn_per_round_resource.SetFixedResource(0);
706
707 var kineticist_component = library.Get<BlueprintFeature>(
"2fa48527ba627254ba9bf4556330a4d4").GetComponent<AddKineticistPart>().CreateCopy();
708 kineticist_component.MainStat = StatType.Intelligence;
709 kineticist_component.MaxBurn = burn_resource;
710 kineticist_component.MaxBurnPerRound = burn_per_round_resource;
711 kineticist_component.Class = witch_class;
712 patron_element.AddComponents(burn_resource.CreateAddAbilityResource(),
713 burn_per_round_resource.
CreateAddAbilityResource(),
714 kineticist_component,
715 Common.createClassLevelsForPrerequisites(
kineticist, witch_class)
716 );
717 //fix kineticist base abilities to be visible for patron element
718 var abilities = library.GetAllBlueprints().OfType<BlueprintAbility>().
Where(a =>
719
{
720
var comp = a.GetComponent<AbilityShowIfCasterHasFact>();
721
return comp != null && comp.UnitFact == elemental_focus;
722
}
723
);
724 foreach (var a in abilities)
725 {
726 var comp = a.GetComponent<AbilityShowIfCasterHasFact>();
727 a.ReplaceComponent(comp, Helpers.Create<NewMechanics.
AbilityShowIfCasterHasFactsFromList>(f => f.UnitFacts = new BlueprintUnitFact[] {
elemental_focus, patron_element }));
728 }
729
730 //fix all scaling to account for havocker
731 var scaling_objects = library.GetAllBlueprints().Where(a =>
732 {
733 var
comp = a.GetComponent<ContextCalculateAbilityParamsBasedOnClass>();
734
return comp != null && comp.CharacterClass == kineticist;
735 }
736 );
737
738 foreach (var so in scaling_objects)
739 {
740 var comp = so.GetComponent<ContextCalculateAbilityParamsBasedOnClass
>();
741 var new_scaling = Common.
createContextCalculateAbilityParamsBasedOnClassesWithArchetypes(new
BlueprintCharacterClass[] { witch_class, kineticist }, new BlueprintArchetype[] {
havocker }, comp.StatType);
742 new_scaling.use_kineticist_main_stat = comp.UseKineticistMainStat;
743 so.ReplaceComponent(comp, new_scaling);
744 }
745
746
747 kinetic_blast_progression = library.CopyAndAdd<BlueprintProgression>(
"30a5b8cf728bd4a4d8d90fc4953e322e", "HavockerKineticBlastProgression",
"c32f99fcb740447f948b70de216c751b");
748 kinetic_blast_progression.Classes = kinetic_blast_progression.Classes.
AddToArray(witch_class);
749 kinetic_blast_progression.Archetypes = new BlueprintArchetype[] {
havocker };
750 kinetic_blast_progression.SetDescription(patron_element.Description);
751 }
752
753
754 static void createInfusions()
755 {
756 infusion = library.CopyAndAdd<BlueprintFeatureSelection>(
"58d6f8e9eea63f6418b107ce64f315ea", "HavockerInfusionSelectionFeature", "");
757 infusion.SetDescription("At 4th level and every 4 witch levels
thereafter, the havocker gains an infusion wild talent from the list of options
available based on her elemental focus, functioning as the kineticist ability of the
same name. A havocker must meet the prerequisites of the infusion wild talent and
can’t accept burn (but see the spellburn ability below).");
758
759 infusion_specialization = library.CopyAndAdd<BlueprintFeature>(
"5f64f446aef387d499a396b626d5fc51", "InfusionSpecializationHavockerFeature", "");
760 infusion_specialization.ReplaceComponent<ContextRankConfig>(c => Helpers.
SetField(c, "m_Feature", infusion_specialization));
761
762 infusion_specialization.SetDescription("At 10th level, whenever a
havocker uses one or more infusions with a blast, she reduces the combined burn cost
of the infusions by 1. This can't reduce the total cost of the infusions used below
0.\nShe reduces the burn cost by 1 additional point at 12th, 16th, and 20th levels.");
763
764 gather_power = library.CopyAndAdd<BlueprintFeature>(
"71f526b1d4b50b94582b0b9cbe12b0e0", "HavockerGatherPowerFeature", "");
765 gather_power.SetDescription("At 1st level a havocker gains a kineticist
gather power ability.");
766 gather_power.HideInUI = false;
767 gather_power.HideInCharacterSheetAndLevelUp = false;
768 }
769
770
771 static void createSpellBurn()
772 {
773 var abilities = new List<BlueprintAbility>();
774 var buffs = new List<BlueprintBuff>();
775 var icon = library.Get<BlueprintActivatableAbility>(
"00b6d36e31548dc4ab0ac9d15e64a980").Icon; //healing judgment
776 abilities.Add(null);
777 abilities.Add(null);
778 for (int i = 2; i < 9; i++)
779 {
780 var buff = Helpers.CreateBuff($"SpellBurn{i}Buff",
781 $"Spellburn ({i/2})",
782 "Beginning at 6th level, a havocker
can channel stored spell energy into her kinetic blast to increase the blast’s
overall utility and power. To use her infusions, the havocker must lose a prepared
witch spell to apply the infusion to her kinetic blast. Any spell sacrificed is
required to have a spell level equal to at least twice the infusion burn cost. The
havocker cannot accept additional burn if the infusion would allow her to do so.",
783 "",
784 icon,
785 null,
786 Helpers.Create<KineticistMechanics.
DecreaseWildTalentCostWithActionOnBurn>(a => { a.value = i / 2; a.actions = Helpers.
CreateActionList(Helpers.Create<ContextActionRemoveSelf>()); })
787 );
788 buffs.Add(buff);
789
790 var ability = Helpers.CreateAbility($"SpellBurn{i}Ability",
791 buff.Name,
792 buff.Description,
793 "",
794 buff.Icon,
795 AbilityType.Special,
796 CommandType.Free,
797 AbilityRange.Personal,
798 Helpers.oneRoundDuration,
799 "",
800 Helpers.CreateRunActions(Common.
createContextActionApplyBuff(buff, Helpers.CreateContextDuration(1), false,
dispellable: false))
801 );
802 ability.setMiscAbilityParametersSelfOnly();
803 abilities.Add(ability);
804 }
805
806
807 foreach (var a in abilities)
808 {
809 if (a == null)
810 {
811 continue;
812 }
813 a.AddComponent(Common.createAbilityExecuteActionOnCast(Helpers.
CreateActionList(Helpers.Create<NewMechanics.ContextActionRemoveBuffs>(r => r.Buffs =
buffs.ToArray()))));
814 }
815
816 spellburn = Helpers.CreateFeature("SpellburnHavockerFeature",
817 "Spellburn",
818 abilities[3].Description,
819 "",
820 abilities[3].Icon,
821 FeatureGroup.None,
822 Common.createSpontaneousSpellConversion
(witch_class, abilities.ToArray())
823 );
824 }
825
826
827 static void createLeyLineGuardian()
828 {
829 ley_line_guardian_archetype = Helpers.Create<BlueprintArchetype>(a =>
830 {
831 a.name = "LeyLineGuardianArchetype";
832 a.LocalizedName = Helpers.CreateString($"{a.name}.Name", "Ley Line
Guardian");
833 a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description"
, "Some witches tap into the power of their patrons not through a special connection
with a familiar, but rather directly through the vast network of ley lines that
crosses the planes. These witches can harness the latent powers of ley lines without
even needing to be near one of the points where ley lines’ powers are accessible to
mortal spellcasters.\n"
834
+ "Instead of preparing her spells, a ley line guardian draws the power casting
spells directly from ley lines. A ley line guardian is a spontaneous spellcaster.
She knows the same number of spells and receives the same number of spell slots per
day as a sorcerer of her witch level. Bonus spells granted by a ley line guardian’s
patron are added to the ley line guardian’s total spells known at the appropriate
levels.\n"
835
+ "Note: Ley Line Guardian uses INTELLIGENCE as primary casting attribute!");
836 });
837 Helpers.SetField(ley_line_guardian_archetype, "m_ParentClass",
witch_class);
838 library.AddAsset(ley_line_guardian_archetype,
"d4a3aa7c1cf84e14ae532c92e675927f");
839 createConduitSurge();
840 ley_line_guardian_archetype.RemoveFeatures = new LevelEntry[] { Helpers.
LevelEntry(1, witch_familiar), Helpers.LevelEntry(1, hex_selection), Helpers.
LevelEntry(8, hex_selection) };
841 ley_line_guardian_archetype.AddFeatures = new LevelEntry[] { Helpers.
LevelEntry(1, conduit_surge) };
842 var sorcerer_class = ResourcesLibrary.TryGetBlueprint<
BlueprintCharacterClass>("b3a505fb61437dc4097f43c3f8f9a4cf");
843
844 var spellbook = library.CopyAndAdd<BlueprintSpellbook>(witch_class.
Spellbook, "LeyLineGuardianSpellbook", "a3a86b1efe31479cb8543c76bd522147");
845
846 spellbook.CanCopyScrolls = false;
847 spellbook.Spontaneous = true;
848 spellbook.SpellsKnown = sorcerer_class.Spellbook.SpellsKnown;
849 spellbook.SpellsPerDay = sorcerer_class.Spellbook.SpellsPerDay;
850 spellbook.SpellsPerLevel = sorcerer_class.Spellbook.SpellsPerLevel;
851 spellbook.Name = ley_line_guardian_archetype.LocalizedName;
852 ley_line_guardian_archetype.ReplaceSpellbook = spellbook;
853
854 beast_of_ill_omen.AddComponent(Common.prerequisiteNoArchetype(witch_class
, ley_line_guardian_archetype));
855 }
856
857
858 static void createConduitSurge()
859 {
860
861 var resource = Helpers.CreateAbilityResource(
"LeyLineGuardianConduitSurgeResource",
862 "",
863 "",
864 "",
865 null
866 );
867 resource.SetIncreasedByStat(3, StatType.Charisma);
868
869 var surge = Helpers.Create<NewMechanics.ConduitSurge>();
870 surge.buff = library.Get<BlueprintBuff>(
"df3950af5a783bd4d91ab73eb8fa0fd3"); //stagerred
871 surge.save_type = SavingThrowType.Fortitude;
872 surge.rate = DurationRate.Minutes;
873 surge.dice_value = Helpers.CreateContextDiceValue(DiceType.D4, Common.
createSimpleContextValue(1), Helpers.CreateContextValue(AbilityRankType.DamageBonus));
874 surge.resource = resource;
875
876 var shadow_evocation = library.Get<BlueprintAbility>(
"237427308e48c3341b3d532b9d3a001f");
877 var buff = Helpers.CreateBuff("LeyLineGuardianConduitSurgeBuff",
878 "Conduit Surge",
879 "At 1st level, a ley line guardian is adept at
channeling energy from ley lines to enhance her own spells. As a swift action, she
can increase her effective caster level for the next spell she casts in that round
by 1d4–1 levels. After performing a conduit surge, the ley line guardian must
succeed at a Fortitude save (DC = 10 + level of spell cast + number of additional
caster levels granted) or become staggered for a number of minutes equal to the
level of the spell cast. At 8th level, the caster level increase becomes 1d4. She
can use this ability a number of times per day equal to 3 + her Charisma modifier.",
880 "",
881 shadow_evocation.Icon,
882 null,
883 surge,
884 Helpers.CreateContextRankConfig(baseValueType:
ContextRankBaseValueType.ClassLevel, classes: getWitchArray(),
885 progression:
ContextRankProgression.Custom, type: AbilityRankType.DamageBonus,
886 customProgression: new
(int, int)[] {
887 (7, -1),
888 (20, 0)
889 })
890 );
891
892
893 var ability = Helpers.CreateActivatableAbility(
"LeyLineGuardianConduitSurgeAbility",
894 buff.Name,
895 buff.Description,
896 "",
897 buff.Icon,
898 buff,
899 AbilityActivationType.
Immediately,
900 CommandType.Free,
901 null,
902 Helpers.
CreateActivatableResourceLogic(resource, ResourceSpendType.Never)
903 );
904
905 conduit_surge = Helpers.CreateFeature(
"LeyLineGuardianConduitSurgeFeature",
906 ability.Name,
907 ability.Description,
908 "",
909 ability.Icon,
910 FeatureGroup.None,
911 Helpers.CreateAddFact(ability),
912 Helpers.CreateAddAbilityResource(
resource)
913 );
914 }
915
916
917 static void createHedgeWitch()
918 {
919 hedge_witch_archetype = Helpers.Create<BlueprintArchetype>(a =>
920 {
921 a.name = "HedgeWitchArchetype";
922 a.LocalizedName = Helpers.CreateString($"{a.name}.Name", "Hedge
Witch");
923 a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description"
, "Among witches, there are those who devote themselves to the care of others and
restrict their practices to the healing arts. They often take the place of clerics
in rural communities and may wander the countryside servicing the needs of several
small communities.");
924 });
925 Helpers.SetField(hedge_witch_archetype, "m_ParentClass", witch_class);
926 library.AddAsset(hedge_witch_archetype,
"721173ec8def432ea01dd024d53e8fb8");
927 hedge_witch_archetype.RemoveFeatures = new LevelEntry[] { Helpers.
LevelEntry(4, hex_selection),
928 Helpers.
LevelEntry(8, hex_selection)};
929
930 var witch_spontaneous_cure = library.CopyAndAdd<BlueprintFeature>(
"5e4620cea099c9345a9207c11d7bc916", "WitchSpontaneousCure",
"ba941f7c2096461bbda75578b52b792cf");
931 witch_spontaneous_cure.SetName("Spontaneous Healing");
932 witch_spontaneous_cure.SetDescription("A hedge witch can channel stored
spell energy into healing spells that she did not prepare ahead of time. The witch
can “lose” any prepared spell that is not an orison in order to cast any cure spell
of the same spell level or lower, even if she doesn’t know that cure spell.");
933 witch_spontaneous_cure.ReplaceComponent<Kingmaker.UnitLogic.FactLogic.
SpontaneousSpellConversion>(Common.createSpontaneousSpellConversion(witch_class,
934
null,
935
library.Get<
BlueprintAbility>("5590652e1c2225c4ca30c4a699ab3649"),
936
library.Get<
BlueprintAbility>("6b90c773a6543dc49b2505858ce33db5"),
937
library.Get<
BlueprintAbility>("6b90c773a6543dc49b2505858ce33db5"),
938
library.Get<
BlueprintAbility>("3361c5df793b4c8448756146a88026ad"),
939
library.Get<
BlueprintAbility>("41c9016596fe1de4faf67425ed691203"),
940
library.Get<
BlueprintAbility>("5d3d689392e4ff740a761ef346815074"),
941
library.Get<
BlueprintAbility>("571221cc141bc21449ae96b3944652aa"),
942
library.Get<
BlueprintAbility>("0cea35de4d553cc439ae80b3a8724397"),
943
library.Get<
BlueprintAbility>("1f173a16120359e41a20fc75bb53d449")
944
)
945
);
946 witch_spontaneous_cure.RemoveComponents<Prerequisite>();
947 var icon = library.Get<BlueprintAbility>(
"f6f95242abdfac346befd6f4f6222140").Icon;
948 var empatic_healing = Helpers.CreateFeature(
"HedgeWitchEmpaticHealingFeature",
949 "Empatic Healing",
950 "The witch gains a +3 bonus
to Lore (Religion) skill.",
951 "",
952 icon,
953 FeatureGroup.None,
954 Helpers.CreateAddStatBonus(
StatType.SkillLoreReligion, 3, ModifierDescriptor.UntypedStackable)
955 );
956
957 hedge_witch_archetype.AddFeatures = new LevelEntry[] {Helpers.LevelEntry(
1, witch_spontaneous_cure), Helpers.LevelEntry(8, empatic_healing) };
958 }
959
960
961 static internal void createHexChanneler()
962 {
963 hex_channeler_archetype = Helpers.Create<BlueprintArchetype>(a =>
964 {
965 a.name = "HexChannelerArchetype";
966 a.LocalizedName = Helpers.CreateString($"{a.name}.Name", "Hex
Channeler");
967 a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description"
, "A hex channeler is a witch who devotes herself to either life—healing the wounded
and destroying the undead—or death, slaying the living and aiding undead.");
968 });
969 Helpers.SetField(hex_channeler_archetype, "m_ParentClass", witch_class);
970 library.AddAsset(hex_channeler_archetype,
"6fb0c184122e42e686d23d9d473d621e");
971 hex_channeler_archetype.RemoveFeatures = new LevelEntry[] { Helpers.
LevelEntry(2, hex_selection)};
972
973 createHexChannelerChannelEnergySelection();
974 hex_channeler_archetype.AddFeatures = new LevelEntry[] { Helpers.
LevelEntry(2, hex_channeler_channel_energy_selection) };
975
976 //replace improved_channel_hex_positive for negative energy channeler
977 Action<UnitDescriptor> save_game_fix = delegate (UnitDescriptor u)
978 {
979 if (u.HasFact(witch_channel_negative))
980 {
981 while (u.Progression.Features.HasFact(
improved_channel_hex_positive))
982 {
983 u.Progression.ReplaceFeature(improved_channel_hex_positive,
improved_channel_hex_negative);
984 }
985 }
986 };
987 SaveGameFix.save_game_actions.Add(save_game_fix);
988 }
989
990
991 static void createHexChannelerChannelEnergySelection()
992 {
993 var bless_spell = library.Get<BlueprintAbility>(
"90e59f4a4ada87243b7b3535a06d0638");
994
995 var select_positive = library.Get<BlueprintFeature>(
"a79013ff4bcd4864cb669622a29ddafb");
996 var select_negative = library.Get<BlueprintFeature>(
"3adb2c906e031ee41a01bfc1d5fb7eea");
997
998 witch_channel_positive = Helpers.CreateFeature("WitchChannelPositive",
999 select_positive.Name,
1000 select_negative.
Description,
1001
"2cca6a04afd64ebd84ee6aad6d1cea5f",
1002 select_positive.Icon,
1003 FeatureGroup.
ChannelEnergy,
1004 Common.
createPrerequisiteAlignment(Kingmaker.UnitLogic.Alignments.AlignmentMaskType.Good
1005
| Kingmaker.UnitLogic.Alignments.AlignmentMaskType.TrueNeutral
1006
| Kingmaker.UnitLogic.Alignments.AlignmentMaskType.ChaoticNeutral
1007
| Kingmaker.UnitLogic.Alignments.AlignmentMaskType.LawfulNeutral
1008
)
1009 );
1010
1011 witch_channel_negative = Helpers.CreateFeature("WitchChannelNegative",
1012 select_negative.Name,
1013 select_negative.
Description,
1014
"bffcdc859c954a08bbbbe1eddb4b2115",
1015 select_negative.Icon,
1016 FeatureGroup.
ChannelEnergy,
1017 Common.
createPrerequisiteAlignment(Kingmaker.UnitLogic.Alignments.AlignmentMaskType.Evil
1018
| Kingmaker.UnitLogic.Alignments.AlignmentMaskType.TrueNeutral
1019
| Kingmaker.UnitLogic.Alignments.AlignmentMaskType.ChaoticNeutral
1020
| Kingmaker.UnitLogic.Alignments.AlignmentMaskType.LawfulNeutral
1021
)
1022 );
1023 var channel_energy_resource = library.CopyAndAdd<BlueprintAbilityResource
>("5e2bba3e07c37be42909a12945c27de7", "HexChannelerChannelResource", "");
1024 var resource_logic = Helpers.CreateResourceLogic(channel_energy_resource);
1025
1026 improved_channel_hex_positive = Helpers.CreateFeature(
"WitchImprovedChannelHex",
1027 "Increase Channel Energy Amount",
1028 $"Every time the hex channeler is able
to learn a new hex (including major or grand hexes, but not hexes gained through the
Extra Hex feat), she can instead increase her channel energy amount by
1d{BalanceFixes.getDamageDieString(DiceType.D6)}.",
1029 "6638ec10b97b4e5bad312f58b80db844",
1030 bless_spell.Icon,
1031 FeatureGroup.None,
1032 Common.createPrerequisiteArchetypeLevel(
witch_class, hex_channeler_archetype, 2),
1033 Helpers.PrerequisiteFeature(
witch_channel_positive));
1034 improved_channel_hex_positive.Ranks = 20;
1035 improved_channel_hex_negative = Helpers.CreateFeature(
"WitchImprovedChannelHexNegative",
1036 "Increase Channel Energy Amount",
1037 $"Every time the hex channeler is able to learn a
new hex (including major or grand hexes, but not hexes gained through the Extra Hex
feat), she can instead increase her channel energy amount by
1d{BalanceFixes.getDamageDieString(DiceType.D6)}.",
1038 "6e5bbc077cc34af0ab934a2b84760807",
1039 bless_spell.Icon,
1040 FeatureGroup.None,
1041 Common.createPrerequisiteArchetypeLevel(witch_class,
hex_channeler_archetype, 2),
1042 Helpers.PrerequisiteFeature(witch_channel_negative)
1043 );
1044 improved_channel_hex_negative.Ranks = 20;
1045 /*var context_rank_config_positive =
Helpers.CreateContextRankConfig(baseValueType:
ContextRankBaseValueType.FeatureListRanks, progression: ContextRankProgression.AsIs,
1046 featureList: new
BlueprintFeature[] { witch_channel_positive,
1047
improved_channel_hex_positive});*/
1048
1049 /*var context_rank_config =
Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.ClassLevel,
progression: ContextRankProgression.OnePlusDiv2,
1050 classes: new
BlueprintCharacterClass[] { null });*/
1051
1052 var context_rank_config = Helpers.CreateContextRankConfig(baseValueType:
ContextRankBaseValueType.FeatureListRanks, progression: ContextRankProgression.AsIs,
1053 featureList:
new BlueprintFeature[] { witch_channel_negative, witch_channel_positive,
1054
improved_channel_hex_negative, improved_channel_hex_positive
1055
},
1056 classes: new
BlueprintCharacterClass[] { null }
1057 );
1058
1059 var dc_scaling = Common.createContextCalculateAbilityParamsBasedOnClasses
(getWitchArray(), StatType.Charisma);
1060 var positive_heal = ChannelEnergyEngine.createChannelEnergy(
ChannelEnergyEngine.ChannelType.PositiveHeal, "WitchPostiveHeal", "", "",
"b305df2f8ec34684867db7402677388b",
1061
context_rank_config, dc_scaling, resource_logic);
1062 var positive_harm = ChannelEnergyEngine.createChannelEnergy(
ChannelEnergyEngine.ChannelType.PositiveHarm, "WitchPostiveHarm", "", "",
"4ca35352f0eb49a49faf4a1057ed5d6e",
1063
context_rank_config, dc_scaling, resource_logic);
1064 var negative_heal = ChannelEnergyEngine.createChannelEnergy(
ChannelEnergyEngine.ChannelType.NegativeHeal, "WitchNegativeHeal", "", "",
"a39b06c274c843f19fa10cc6b7be5f39",
1065
context_rank_config, dc_scaling, resource_logic);
1066 var negative_harm = ChannelEnergyEngine.createChannelEnergy(
ChannelEnergyEngine.ChannelType.NegativeHarm, "WitchNegativeHarm", "", "",
"ba94b10d81bb4497886e50ce9d4d96ce",
1067
context_rank_config, dc_scaling, resource_logic);
1068
1069 var positive_heal_base = Common.createVariantWrapper(
"WitchPositiveHealBase", "", positive_heal);
1070 var positive_harm_base = Common.createVariantWrapper(
"WitchPositiveHarmBase", "", positive_harm);
1071 var negative_heal_base = Common.createVariantWrapper(
"WitchNegativeHealBase", "", negative_heal);
1072 var negative_harm_base = Common.createVariantWrapper(
"WitchNegativeHarmBase", "", negative_harm);
1073
1074 ChannelEnergyEngine.storeChannel(positive_heal, witch_channel_positive,
ChannelEnergyEngine.ChannelType.PositiveHeal);
1075 ChannelEnergyEngine.storeChannel(positive_harm, witch_channel_positive,
ChannelEnergyEngine.ChannelType.PositiveHarm);
1076 ChannelEnergyEngine.storeChannel(negative_heal, witch_channel_negative,
ChannelEnergyEngine.ChannelType.NegativeHeal);
1077 ChannelEnergyEngine.storeChannel(negative_harm, witch_channel_negative,
ChannelEnergyEngine.ChannelType.NegativeHarm);
1078
1079 witch_channel_positive.AddComponent(Helpers.CreateAddAbilityResource(
channel_energy_resource));
1080 witch_channel_positive.AddComponent(Helpers.CreateAddFacts(
positive_heal_base, positive_harm_base));
1081
/*witch_channel_positive.AddComponent(Helpers.CreateContextRankConfig(baseValueType:
ContextRankBaseValueType.FeatureListRanks, progression: ContextRankProgression.AsIs,
1082
type: AbilityRankType.StatBonus,
1083
featureList: new BlueprintFeature[] { improved_channel_hex_positive,
witch_channel_positive }
1084 )
1085 );
1086
witch_channel_positive.AddComponent(Helpers.Create<NewMechanics.ContextIncreaseCasterL
evelForSelectedSpells>(c =>
1087
{
1088
c.value =
Helpers.CreateContextValue(AbilityRankType.StatBonus);
1089
c.spells = new BlueprintAbility[0];
1090
c.correct_dc = true;
1091
c.multiplier = 2;
1092
})
1093 );*/
1094 witch_channel_negative.AddComponent(Helpers.CreateAddAbilityResource(
channel_energy_resource));
1095 witch_channel_negative.AddComponent(Helpers.CreateAddFacts(
negative_heal_base, negative_harm_base));
1096
/*witch_channel_negative.AddComponent(Helpers.CreateContextRankConfig(baseValueType:
ContextRankBaseValueType.FeatureListRanks, progression: ContextRankProgression.AsIs,
1097 type:
AbilityRankType.StatBonus,
1098 featureList: new
BlueprintFeature[] { improved_channel_hex_negative, witch_channel_negative }
1099 )
1100 );
1101
witch_channel_negative.AddComponent(Helpers.Create<NewMechanics.ContextIncreaseCasterL
evelForSelectedSpells>(c =>
1102
{ c.value =
Helpers.CreateContextValue(AbilityRankType.StatBonus);
1103
c.spells = new BlueprintAbility[0];
1104
c.correct_dc = true;
1105
c.multiplier = 2;
1106
})
1107 );
1108 ChannelEnergyEngine.setWitchImprovedChannelHex(witch_channel_positive,
witch_channel_negative);*/
1109
1110
1111 hex_channeler_channel_energy_selection = Helpers.CreateFeatureSelection(
"WitchChannelEnergySelection",
1112
"Channel Energy",
1113
"At 2nd level, a hex channeler can call upon her patron to release a wave of energy
from herself or her familiar. A good witch channels positive energy(like a good
cleric), and an evil witch channels negative energy(like an evil cleric). A witch
who is neither good nor evil must choose whether she channels positive or negative
energy; once this choice is made, it cannot be reversed.\n"
1114 +
"Channeling energy causes a burst that affects all creatures of one type (either
undead or living) in a 30 - foot radius centered on the witch. The witch can channel
energy a number of times per day equal to 3 + her Charisma modifier (minimum 1).
This otherwise functions as a cleric using channel energy, except the witch does not
require a holy symbol to use this ability. The hex channeler uses her witch level as
her cleric level for all other effects dependent upon channel energy(except
increasing the amount of damage healed or dealt).\n"
1115 +
$"This burst heals or deals 1d{BalanceFixes.getDamageDieString(DiceType.D6)} points
of damage. Every time the hex channeler is able to learn a new hex (including major
or grand hexes, but not hexes gained through the Extra Hex feat), she can instead
increase her channel energy amount by
1d{BalanceFixes.getDamageDieString(DiceType.D6)}.",
1116
"d33b4095dbfa47588ed1f07b5af30e2c",
1117
bless_spell.Icon,
1118
FeatureGroup.None);
1119 hex_channeler_channel_energy_selection.Features = new BlueprintFeature[]
{ witch_channel_positive, witch_channel_negative };
1120 hex_channeler_channel_energy_selection.AllFeatures =
hex_channeler_channel_energy_selection.Features;
1121
1122
1123 hex_selection.Features = hex_selection.Features.AddToArray(
improved_channel_hex_positive, improved_channel_hex_negative);
1124 hex_selection.AllFeatures = hex_selection.AllFeatures.AddToArray(
improved_channel_hex_positive, improved_channel_hex_negative);
1125
1126
1127 ChannelEnergyEngine.createExtraChannelFeat(positive_heal,
hex_channeler_channel_energy_selection, "ExtraChannelWitch", "Extra Channel (Hex
Channeler)",
1128
"9c90fbbe75dc4bd0951e6d5be6da5627");
1129 }
1130
1131
1132 static void createHexSelection()
1133 {
1134 createBeastOfIllOmen();
1135 createHealing();
1136 createIceplantHex();
1137 createFortuneHex();
1138 createMisfortune();
1139 createMurksightHex();
1140 createFlightHex();
1141 createSlumber();
1142 createAmeliorating();
1143 createEvilEye();
1144 createSummerHeat();
1145 createWard();
1146 createSwampsGrasp();
1147
1148 createRestlessSlumber();
1149 createMajorHealing();
1150 createMajorAmeliorating();
1151 createAnimalSkin();
1152 createAgony();
1153 createBeastGift();
1154 createHarrowingCurse();
1155 createIceTomb();
1156 createRegenerativeSinew();
1157 createRetribution();
1158
1159 createAnimalServant();
1160 createDeathCurse();
1161 createLayToRest();
1162 createLifeGiver();
1163 createEternalSlumber();
1164 createCackle();
1165
1166
1167 hex_selection = Helpers.CreateFeatureSelection("WitchHexSelection",
1168 "Hex",
1169 "Witches learn a number
of magic tricks, called hexes, that grant them powers or weaken foes. At 1st level,
a witch gains one hex of her choice. She gains an additional hex at 2nd level and
for every 2 levels attained after 2nd level. A witch cannot select an individual hex
more than once.\n" +
1170 "Unless otherwise noted,
using a hex is a standard action that does not provoke an attack of opportunity. The
save to resist a hex is equal to 10 + 1/2 the witch’s level + the witch’s
Intelligence modifier.",
1171
"68bd6449147e4234b6d9a80564ba17ae",
1172 null,
1173 FeatureGroup.None);
1174 hex_selection.Features = new BlueprintFeature[] { ameliorating, healing,
beast_of_ill_omen, slumber_hex, misfortune_hex, fortune_hex, iceplant_hex,
murksight_hex, evil_eye, summer_heat, cackle, ward, swamps_grasp, flight_hex,
1175 major_healing,
major_ameliorating, animal_skin, agony, beast_gift, harrowing_curse, ice_tomb,
regenerative_sinew, retribution, restless_slumber,
1176 animal_servant,
death_curse, lay_to_rest, life_giver, eternal_slumber};
1177 hex_selection.AllFeatures = hex_selection.Features;
1178 }
1179
1180
1181 static void createWitchCantrips()
1182 {
1183 var daze = library.Get<BlueprintAbility>(
"55f14bc84d7c85446b07a1b5dd6b2b4c");
1184 witch_cantrips = Common.createCantrips("WitchCantripsFeature",
1185 "Cantrips",
1186 "Witches can cast a number of
cantrips, or 0-level spells. These spells are cast like any other spell, but they
are not expended when cast and may be used again.",
1187 daze.Icon,
1188 "86501dda312a4f548d579632c4a06c0f",
1189 witch_class,
1190 StatType.Intelligence,
1191 witch_class.Spellbook.SpellList.
SpellsByLevel[0].Spells.ToArray());
1192 }
1193
1194
1195 static void createWitchProgression()
1196 {
1197 createWitchPatrons();
1198 createWitchCantrips();
1199 createHexSelection();
1200 witch_progression = Helpers.CreateProgression("WitchProgression",
1201 witch_class.Name,
1202 witch_class.Description,
1203 "6973ab6ad02f4265888c3fdbe7e12921",
1204 witch_class.Icon,
1205 FeatureGroup.None);
1206 witch_progression.Classes = getWitchArray();
1207
1208 var witch_proficiencies = library.CopyAndAdd<BlueprintFeature>(
"25c97697236ccf2479d0c6a4185eae7f", //sorcerer proficiencies
1209
"WitchProficiencies",
1210
"a042a27a76f94a2ca5e0997d5f432a33");
1211 witch_proficiencies.SetName("Witch Proficiencies");
1212 witch_proficiencies.SetDescription("Witches are proficient with all
simple weapons. They are not proficient with any type of armor or shield. Armor
interferes with a witch’s gestures, which can cause her spells with somatic
components to fail.");
1213
1214 var detect_magic = library.Get<BlueprintFeature>(
"ee0b69e90bac14446a4cf9a050f87f2e");
1215 witch_familiar = library.CopyAndAdd<BlueprintFeatureSelection>(
"363cab72f77c47745bf3a8807074d183", "WitchFamiliar",
"a07215bde92a4cc986ee3059cb8b7350");
1216 witch_familiar.DlcType = Kingmaker.Blueprints.Root.DlcType.None;
1217 witch_familiar.ComponentsArray = new BlueprintComponent[0];
1218 witch_familiar.SetDescription("At 1st level, a witch forms a close bond
with a familiar, a creature that teaches her magic and helps to guide her along her
path. Familiars also aid a witch by granting her skill bonuses, additional spells,
and help with some types of magic.");
1219
1220 var entries = new List<LevelEntry>();
1221 entries.Add(Helpers.LevelEntry(1, witch_proficiencies, witch_cantrips,
detect_magic, witch_patrons, witch_familiar, hex_selection,
1222 library.Get<
BlueprintFeature>("0aeba56961779e54a8a0f6dedef081ee"), //inside the storm
1223 library.Get<
BlueprintFeature>("d3e6275cfa6e7a04b9213b7b292a011c"), // ray calculate feature
1224 library.Get<
BlueprintFeature>("62ef1cdb90f1d654d996556669caf7fa"), // touch calculate feature
1225 library.Get<
BlueprintFeature>("9fc9813f569e2e5448ddc435abf774b3") //full caster feature
1226 ));
1227 witch_progression.UIGroups = new UIGroup[1] { Helpers.CreateUIGroup(
hex_selection) };
1228 for (int i = 2; i<= 20; i++)
1229 {
1230 if (i % 2 == 0)
1231 {
1232 entries.Add(Helpers.LevelEntry(i, hex_selection));
1233 witch_progression.UIGroups[0].Features.Add(hex_selection);
1234 }
1235 else
1236 {
1237 entries.Add(Helpers.LevelEntry(i));
1238 }
1239 }
1240
1241
1242 witch_progression.UIDeterminatorsGroup = new BlueprintFeatureBase[] {
witch_familiar, witch_proficiencies, witch_cantrips, detect_magic, witch_patrons };
1243 witch_progression.LevelEntries = entries.ToArray();
1244 }
1245
1246
1247
1248 static void createWitchPatrons()
1249 {
1250 patron_cl_fcb = Helpers.CreateFeature("WitchClFCBFeature",
1251 "Patron Spells Caster Level Bonus",
1252 "Add +1/4 to the witch’s caster level when
determining the effects of the spells granted to by the patron.",
1253 "690666245f8a481b9b7ed8816115443a",
1254 Helpers.GetIcon(
"e69a85f633ae8ca4398abeb6fa11b1fe"), //spell specialization
1255 FeatureGroup.Feat,
1256 Helpers.PrerequisiteClassLevel(witch_class, 1)
1257 );
1258 patron_cl_fcb.Ranks = 5;
1259
1260 witch_knife = Helpers.CreateFeature("WitchKnifeFeature",
1261 "Witch Knife",
1262 "You empower your witch spells by
incorporating the use of a special ceremonial knife during your castings.\n Add +1
to the DC of all your patron spells.",
1263 "",
1264 null,
1265 FeatureGroup.Feat,
1266 Helpers.PrerequisiteClassLevel(
witch_class, 1)
1267 );
1268 library.AddFeats(witch_knife);
1269
1270 BlueprintFeature[] patrons = new BlueprintFeature[]
1271 {
1272 createWitchPatronFeature("Agility",
"f7a4a115c138439c8e5f4ee8adacfca0","9b43dc766cae40b7891c035b8fa43522", false,
1273 "4f8181e7a7f1d904fbaea64220e83379",
//expeditious retreat
1274 "de7a025d48ad5da4991e7d3c682cf69d", //cats
grace
1275 "486eaff58293f6441a5c2759c4872f98", //haste
1276 "0087fc2d64b6095478bc7b8d7d512caf",
//freedom of movement
1277 "93d9d74dac46b9b458d4d2ea7f4b1911",
//polymorph
1278 "1f6c94d56f178b84ead4c02f1b1e1c48", //cats
grace mass
1279 "a9fc28e147dbb364ea4a3c1831e7e55f",
//polymorph greater
1280 "9155dbc8268da1c49a7fc4834fa1a4b1", //cloak
of chaos
1281 Wildshape.shapechange.AssetGuid //shapechange
1282 ),
1283 createWitchPatronFeature("Ancestors",
"7e72537869dc455781780147823fc6a5", "a5dd1fcfdff84b2396c21c7705faf3fc", true,
1284 "90e59f4a4ada87243b7b3535a06d0638", //bless
1285 "03a9630394d10164a9410882d31572f0", //aid
1286 "faabd2cc67efa4646ac58c7bb3e40fcc", //prayer
1287 "0413915f355a38146bc6ad40cdf27b3f", //death
ward
1288 "1bc83efec9f8c4b42a46162d72cbf494", //burst
of glory
1289 "e15e5e7045fda2244b98c8f010adfe31",
//heroism, greater
1290 "3cf5b2bd093a36a468b4ece38ad4d5fa",
//bestow grace of the champion
1291 "cbf3bafa8375340498b86a3313a11e2f",
//euphoric tranquility
1292 "870af83be6572594d84d276d7fc583e0" //weird
1293 ),
1294 createWitchPatronFeature("Animal", "aee09b4c9ae843c09829ef220241affe"
, "1eb5c7c9254044b5bad7bdf0eca1764a", false,
1295 "403cf599412299a4f9d5d925c7b9fb33", //magic
fang
1296 "4c3d08935262b6544ae97599b3a9556d", //bull
strength
1297 "754c478a2aa9bb54d809e648c3f7ac0e",
//dominate animal
1298 "c83db50513abdf74ca103651931fac4b",
//summon nature ally 4
1299 "56923211d2ac95e43b8ac5031bab74d8",
//animal growth
1300 "9b93040dad242eb43ac7de6bb6547030", //beast
shape 3
1301 "940a545a665194b48b722c1f9dd78d53", //beast
shape 4
1302 "ea78c04f0bd13d049a1cce5daf8d83e0",
//natures ally 8
1303 "a7469ef84ba50ac4cbf3d145e3173f8e"
//natures ally 9
1304 ),
1305 createWitchPatronFeature("Autumn", "c3c1f806206546628b7b9d44cc1141ad"
, "beaddc15271240d992b8149babb79fed", false,
1306 "450af0402422b0b4980d9c2175869612", //ray
of enfeeblement
1307 "29ccc62632178d344ad0be0865fd3113",
//create pit
1308 "1a36c8b9ed655c249a9f9e8d4731f001",
//soothing mud
1309 "6b30813c3709fc44b92dc8fd8191f345",
//slowing mud
1310 "6d1d48a939ce475409f06e1b376bc386",
//vinetrap
1311 "dbf99b00cd35d0a4491c6cc9e771b487", //acid
fog
1312 "8c29e953190cc67429dc9c701b16b7c2",
//caustic eruption
1313 "08323922485f7e246acb3d2276515526",
//horrid witling
1314 "b24583190f36a8442b212e45226c54fc" //wail
of banshee
1315 ),
1316 createWitchPatronFeature("Death", "0418c666165047f2bdb72e0168bb51eb",
"8af4300894f04995b534531c832d8f3d", false,
1317 "450af0402422b0b4980d9c2175869612", //ray
of enfeeblement
1318 "c36c1d11771b0584f8e100b92ee5475b",
//blessing of life and courage
1319 "4b76d32feb089ad4499c3a1ce8e1ac27",
//animate dead
1320 "0413915f355a38146bc6ad40cdf27b3f", //death
ward
1321 NewSpells.suffocation.AssetGuid,
1322 "a89dcbbab8f40e44e920cc60636097cf",
//circle of death
1323 "6f1dcf6cfa92d1948a740195707c0dbe",
//finger of death
1324 "c3d2294a6740bc147870fff652f3ced5",
//death_clutch,
1325 "2f8a67c483dfa0f439b293e094ca9e3c" //power
word kill
1326 ),
1327 createWitchPatronFeature("Devotion",
"faa76cf5cacd447caa2c18965ca9c3cb", "89bd5b848cfc4d6eacb51cf8e018e8d4", false,
1328 "9d5d2d3ffdd73c648af3eb3e585b1113",
//divine favor
1329 "042aaa117e89c4d4b8cb41478dd3fca3", //grace
1330 "2d4263d80f5136b4296d6eb43a221d7d", //magic
vestment
1331 NewSpells.magic_weapon_greater.AssetGuid,
1332 "f9910c76efc34af41b6e43d5d8752f0f",
//flameStrike
1333 "6a234c6dcde7ae94e94e9c36fd1163a7", //bulls
strength mass
1334 "3cf5b2bd093a36a468b4ece38ad4d5fa",
//bestow grace of the champion
1335 "808ab74c12df8784ab4eeaf6a107dbea", //holy
aura
1336 "867524328b54f25488d371214eea0d90" //heal
mass
1337 ),
1338 createWitchPatronFeature("Elements",
"1c19b61a30e34682b40261d29acd6ac3", "4f51c6e364be432f8e285893b4611b22", false,
1339 "ab395d2335d3f384e99dddee8562978f",
//shocking grasp
1340 NewSpells.flaming_sphere.AssetGuid,
1341 "2d81362af43aeac4387a3d4fced489c3",
//fireball
1342 NewSpells.river_of_wind.AssetGuid,
1343 "f9910c76efc34af41b6e43d5d8752f0f",
//flamestrike
1344 NewSpells.freezing_sphere.AssetGuid,
1345 "8eb769e3b583f594faabe1cfdb0bb696",
//summon greater elemental
1346 "e3d0dfe1c8527934294f241e0ae96a8d",
//firestorm
1347 NewSpells.meteor_swarm.AssetGuid
1348 ),
1349 createWitchPatronFeature("Enchantment",
"0677e4fe8b0648a99c8965c7d580ca74", "40eb72aded8c4dbfaf0ce4cf0fa79707", true,
1350 NewSpells.command.AssetGuid,
1351 "fd4d9fd7f87575d47aafe2a64a6e2d8d",
//hideous laughter
1352 "e6048d85fc3294f4c92b21c8d7526b1f",
//cacophonus call
1353 "dd2918e4a77c50044acba1ac93494c36",
//overwhelming grief
1354 "d7cbd2004ce66a042aeab2e95a3c5c61",
//domiante person
1355 "d316d3d94d20c674db2c24d7de96f6a7",
//serenity
1356 "740d943e42b60f64a8de74926ba6ddf7",
//euphoric tranquility
1357 NewSpells.irresistible_dance.AssetGuid,
1358 "3c17035ec4717674cae2e841a190e757"
//dominate monster
1359 ),
1360 createWitchPatronFeature("Endurance",
"16e0d62dac7947aab226dcded5bc5177", "79301d011ec5490ea32dcd42a8daa366", true,
1361 "b065231094a21d14dbf1c3832f776871", //fire
belly
1362 "a900628aea19aa74aad0ece0e65d091a", //bears
endurance
1363 "d2f116cfe05fcdd4a94e80143b67046f",
//protection from energy
1364 "76a629d019275b94184a1a8733cac45e",
//protection from energy communal
1365 "0a5ddfbcfb3989543ac7c936fc256889", //spell
resistance
1366 "f6bcea6db14f0814d99b54856e918b92", //bears
endurance mass
1367 "fafd77c6bfa85c04ba31fdc1c962c914",
//restoration greater
1368 "b1c7576bd06812b42bda3f09ab202f14",
//angelic aspect greater
1369 "867524328b54f25488d371214eea0d90" //heal
mass
1370 ),
1371 createWitchPatronFeature("Healing",
"84286f03a92c4d27bf13484dee22c990", "b6c6c3ee2e904c689d9cb0eca78ce7c1", false,
1372 "55a037e514c0ee14a8e3ed14b47061de",
//remove fear
1373 "e84fc922ccf952943b5240293669b171",
//restoration lesser
1374 "4093d5a0eb5cae94e909eb1e0e1a6b36",
//remove disiease
1375 "f2115ac1148256b4ba20788f7e966830",
//restoration
1376 "be2062d6d85f4634ea4f26e9e858c3b8", //cleanse
1377 "788d72e7713cf90418ee1f38449416dc",
//inspiring recovery
1378 "fafd77c6bfa85c04ba31fdc1c962c914",
//restoration greater
1379 SpellDuplicates.addDuplicateSpell(
"1f173a16120359e41a20fc75bb53d449", "WitchHealingPatronCureCriticalWoundsMassAbility"
, "").AssetGuid, //cure critical wounds mass
1380 "867524328b54f25488d371214eea0d90" // heal
mass
1381 ),
1382 createWitchPatronFeature("Light", "8676966b3e0f4595be33f9cd2efc061c",
"c248bad0e267442890c292c2079bcd2b", false,
1383 "91da41b9793a4624797921f221db653c", //color
spray
1384 NewSpells.burst_of_radiance.AssetGuid,
1385 "c927a8b0cd3f5174f8c0b67cdbfde539",
//remove blindness
1386 "4b8265132f9c8174f87ce7fa6d0fe47b",
//rainbow pattern
1387 "ebade19998e1f8542a1b55bd4da766b3", //fire
snake
1388 "093ed1d67a539ad4c939d9d05cfe192c", //sirocco
1389 "1fca0ba2fdfe2994a8c8bc1f0f2fc5b1", //sunbeam
1390 "e96424f70ff884947b06f41a765b7658",
//sunburst
1391 "08ccad78cac525040919d51963f9ac39" //fiery
body
1392 ),
1393 createWitchPatronFeature("Mercy", "88ce8b8dc64b4343984fefd31054a913",
"b7b7f46389544a99b0b4846ab99ed042", false,
1394 "5590652e1c2225c4ca30c4a699ab3649", //cure
light wounds
1395 "446f7bf201dc1934f96ac0a26e324803",
//eagles splendor
1396 "b48674cef2bff5e478a007cf57d8345b",
//remove curse
1397 "f2115ac1148256b4ba20788f7e966830",
//resoration
1398 "be2062d6d85f4634ea4f26e9e858c3b8", //cleanse
1399 "2caa607eadda4ab44934c5c9875e01bc",
//eagles splendor mass
1400 "15a04c40f84545949abeedef7279751a",
//joyfull rupture
1401 "cbf3bafa8375340498b86a3313a11e2f",
//euphoric tranquility
1402 "867524328b54f25488d371214eea0d90" //mass
heal
1403 ),
1404 createWitchPatronFeature("Mountain",
"2147870b66c643978c6c6aeae6f6c6a6", "cdcc5439ee0a4266aeb41e29f0677bf9", false,
1405 "85067a04a97416949b5d1dbf986d93f3", //stone
fist
1406 "5181c2ed0190fc34b8a1162783af5bf4", //stone
call
1407 "0a2f7c6aa81bc6548ac7780d8b70bcbc",
//battering blast
1408 "d1afa8bc28c99104da7d784115552de5", //spike
stones
1409 "7c5d556b9a5883048bf030e20daebe31",
//stoneskin communal
1410 "e243740dfdb17a246b116b334ed0b165", //stone
to flesh
1411 "3ecd589cf1a55df42a3b66940ee93ea4",
//summon earth elemental greater
1412 "65254c7a2cf18944287207e1de3e44e8",
//summon earth elemental elder
1413 "01300baad090d634cb1a1b2defe068d6"
//clashing rocks
1414 ),
1415 createWitchPatronFeature("Plague", "ad6dcbca48394d0890565eef09c0dc19"
, "7339a5c3c56d4403860790af1118959a", false,
1416 "fa3078b9976a5b24caf92e20ee9c0f54", //ray
of sickening
1417 "dee3074b2fbfb064b80b973f9b56319e",
//pernicious poison
1418 "48e2744846ed04b4580be1a3343a5d3d",
//contagion
1419 "4b76d32feb089ad4499c3a1ce8e1ac27",
//animate dead
1420 "548d339ba87ee56459c98e80167bdf10",
//cloudkill
1421 "82a5b848c05e3f342b893dedb1f9b446",
//plague storm
1422 "76a11b460be25e44ca85904d6806e5a3",
//create undead
1423 "08323922485f7e246acb3d2276515526",
//horrid witlin
1424 "37302f72b06ced1408bf5bb965766d46" //energy
drain
1425 ),
1426 createWitchPatronFeature("Protection",
"fbda94ae0c184d06a9f1bc8b56e68267", "da5be607b885402eae26f954c47b47e4", false,
1427 NewSpells.sanctuary.AssetGuid, //sanctuary
1428 "21ffef7791ce73f468b6fca4d9371e8b",
//resist energy
1429 "d2f116cfe05fcdd4a94e80143b67046f",
//protection from energy
1430 "c66e86905f7606c4eaa5c774f0357b2b",
//stoneskin
1431 "7c5d556b9a5883048bf030e20daebe31",
//stoneskin communal
1432 "fafd77c6bfa85c04ba31fdc1c962c914",
//restoration greater
1433 "42aa71adc7343714fa92e471baa98d42",
//protection from spells
1434 "7ef49f184922063499b8f1346fb7f521",
//seamantle
1435 "87a29febd010993419f2a4a9bee11cfc"
//mindblank communal
1436 ),
1437 createWitchPatronFeature("Shadow", "4a479a6ef8564e9eb7e1dd0d97660804",
"bce2135f54da44c78582f5fca82e4555", false,
1438 "f001c73999fb5a543a199f890108d936", //vanish
1439 "89940cde01689fb46946b2f8cd7b66b7",
//invisibility
1440 NewSpells.barrow_haze.AssetGuid,
1441 NewSpells.shadow_conjuration.AssetGuid,
1442 "237427308e48c3341b3d532b9d3a001f",
//shadow evocation
1443 "1f2e6019ece86d64baa5effa15e81ecc",
//phantasmal putrefaction
1444 NewSpells.shadow_conjuration_greater.
AssetGuid,
1445 "3c4a2d4181482e84d9cd752ef8edc3b6",
//shadow evocation greater
1446 NewSpells.shades.AssetGuid
1447 ),
1448 createWitchPatronFeature("Spring", "fa8155faef214069a896e65a9073458c"
, "e9f7f92bf7724ec788fcd6374bfd2e82", false,
1449 "f3c0b267dd17a2a45a40805e31fe3cd1",
//feather step
1450 "6c7467f0344004d48848a43d8c078bf8",
//sickening entanglement
1451 "d219494150ac1f24f9ce14a3d4f66d26",
//feather step mass
1452 "a5e23522eda32dc45801e32c05dc9f96", //good
hope
1453 "3fce8e988a51a2a4ea366324d6153001",
//constricting coils
1454 SpellDuplicates.addDuplicateSpell(
"645558d63604747428d55f0dd3a4cb58", "WitchSpringPatronChainLightningAbility", "").
AssetGuid, //chain lightning
1455 "26be70c4664d07446bdfe83504c1d757",
//change staff
1456 "7cfbefe0931257344b2cb7ddc4cdff6f",
//stormbolts
1457 NewSpells.time_stop.AssetGuid
1458 ),
1459 createWitchPatronFeature("Storms", "2d167ffdc10d4adfad18d6277017e26b",
"baf0b28b8f374fea992774af85188175", false,
1460 NewSpells.obscuring_mist.AssetGuid,
1461 NewSpells.aggressive_thundercloud.AssetGuid,
1462 "2a9ef0e0b5822a24d88b16673a267456", //call
lightning
1463 "fcb028205a71ee64d98175ff39a0abf9", //ice
storm
1464 "d5a36a7ee8177be4f848b953d1c53c84", //call
lightning storm
1465 NewSpells.wind_walk.AssetGuid,
1466 NewSpells.scouring_winds.AssetGuid,
1467 "7cfbefe0931257344b2cb7ddc4cdff6f", //strom
bolts
1468 NewSpells.winds_of_vengeance.AssetGuid
1469 ),
1470 createWitchPatronFeature("Strength",
"6f859ba938f94132920eeb63a8c9af50", "8125ff1edafc4c5489ad2739a85d5386", false,
1471 "9d5d2d3ffdd73c648af3eb3e585b1113",
//divine favor
1472 "4c3d08935262b6544ae97599b3a9556d", //bulls
strength
1473 NewSpells.magic_weapon_greater.AssetGuid,
1474 "ef16771cb05d1344989519e87f25b3c5",
//divine power
1475 "90810e5cf53bf854293cbd5ea1066252",
//righteous magic
1476 "6a234c6dcde7ae94e94e9c36fd1163a7", //bulls
strength mass
1477 Wildshape.giant_formI.AssetGuid, //giant
form I
1478 Wildshape.giant_formII.AssetGuid, //giant
form II
1479 Wildshape.shapechange.AssetGuid //shapechange
1480 ),
1481 createWitchPatronFeature("Summer", "abd76216790240a6b3a0ddda236d1f19"
, "31e196f567fb4426b0199350dcbb2ac4", false,
1482 "b065231094a21d14dbf1c3832f776871",
//firebelly
1483 NewSpells.flaming_sphere.AssetGuid,
1484 NewSpells.flashfire.AssetGuid,
1485 NewSpells.flaming_sphere_greater.AssetGuid,
1486 NewSpells.wall_of_fire.AssetGuid,
1487 "093ed1d67a539ad4c939d9d05cfe192c", //sirocco
1488 "1fca0ba2fdfe2994a8c8bc1f0f2fc5b1", //sunbeam
1489 "e96424f70ff884947b06f41a765b7658",
//sunburst
1490 "08ccad78cac525040919d51963f9ac39" //fiery
body
1491 ),
1492 createWitchPatronFeature("Transformation",
"6af899b9496d42258619ceebe08b1e4a" , "e71d75fcdc24439ab6a7fddbfbd92d34", true,
1493 "14c90900b690cac429b229efdf416127",
//longstrider
1494 "a900628aea19aa74aad0ece0e65d091a", //bears
endurance
1495 "61a7ed778dd93f344a5dacdbad324cc9", //beast
shape 1
1496 "5d4028eb28a106d4691ed1b92bbb1915", //beast
shape 2
1497 "9b93040dad242eb43ac7de6bb6547030", //beast
shape 3
1498 "f767399367df54645ac620ef7b2062bb", //form
of dragon 1
1499 "666556ded3a32f34885e8c318c3a0ced", //form
of dragon 2
1500 "1cdc4ad4c208246419b98a35539eafa6", //form
of dragon 3
1501 Wildshape.shapechange.AssetGuid //shapechange
1502 ),
1503 createWitchPatronFeature("Winter", "073328f3df07436eb27bcc731fca6bb1"
, "3d5f30725ae24f589747b1164fc44228", true,
1504 "9f10909f0be1f5141bf1c102041f93d9",
//snowball
1505 "5368cecec375e1845ae07f48cdc09dd1",
//resist cold
1506 SpellDuplicates.addDuplicateSpell(
"fcb028205a71ee64d98175ff39a0abf9", "WitchWinterPatronIceStormAbility", "").AssetGuid
, //ice storm
1507 "65e8d23aef5e7784dbeb27b1fca40931", //icy
prison
1508 SpellDuplicates.addDuplicateSpell(
"e7c530f8137630f4d9d7ee1aa7b1edc0", "WinterPatronConeOfColdABility","").AssetGuid,
//cone of cold
1509 NewSpells.freezing_sphere.AssetGuid,
1510 "3e4d3b9a5bd03734d9b053b9067c2f38", //waves
of exhaustion
1511 "17696c144a0194c478cbe402b496cb23", //polar
ray
1512 "ba48abb52b142164eba309fd09898856" // polar
midnight
1513 )
1514
1515 };
1516 var diety_selection = library.Get<BlueprintFeatureSelection>(
"59e7a76987fe3b547b9cce045f4db3e4");
1517 witch_patrons = Helpers.CreateFeatureSelection("WitchPatronSelection",
1518 "Patron",
1519 "At 1st level, when a
witch gains her familiar, she must also select a patron. This patron is a vague and
mysterious force, granting the witch power for reasons that she might not entirely
understand. While these forces need not be named, they typically hold influence over
one of the following forces.\n"
1520 + "At 2nd level, and
every two levels thereafter, a witch’s patron adds new spells to a witch’s list of
spells known. These spells are also automatically added to the list of spells stored
by the familiar. The spells gained depend upon the patron chosen. Each patron is
listed by its theme. Its actual name is up to the GM and the witch to decide.",
1521
"30f2f38633a144028aebecdd03391470",
1522 diety_selection.Icon,
1523 FeatureGroup.None);
1524 witch_patrons.AllFeatures = patrons;
1525 witch_patrons.Features = patrons;
1526 }
1527
1528
1529 static BlueprintSpellbook createWitchSpellbook()
1530 {
1531 var wizard_class = ResourcesLibrary.TryGetBlueprint<
BlueprintCharacterClass>("ba34257984f4c41408ce1dc2004e342e");
1532 var witch_spellbook = Helpers.Create<BlueprintSpellbook>();
1533 witch_spellbook.name = "WitchSpellbook";
1534 library.AddAsset(witch_spellbook, "be5817bb59c14526a99877f8a7f15d31");
1535 witch_spellbook.Name = witch_class.LocalizedName;
1536 witch_spellbook.SpellsPerDay = wizard_class.Spellbook.SpellsPerDay;
1537 witch_spellbook.SpellsKnown = wizard_class.Spellbook.SpellsKnown;
1538 witch_spellbook.Spontaneous = false;
1539 witch_spellbook.IsArcane = true;
1540 witch_spellbook.AllSpellsKnown = false;
1541 witch_spellbook.CanCopyScrolls = true;
1542 witch_spellbook.CastingAttribute = StatType.Intelligence;
1543 witch_spellbook.CharacterClass = witch_class;
1544 witch_spellbook.CasterLevelModifier = 0;
1545 witch_spellbook.CantripsType = CantripsType.Cantrips;
1546 witch_spellbook.SpellsPerLevel = wizard_class.Spellbook.SpellsPerLevel;
1547
1548 witch_spellbook.SpellList = Helpers.Create<BlueprintSpellList>();
1549 witch_spellbook.SpellList.name = "WitchSpellList";
1550 library.AddAsset(witch_spellbook.SpellList,
"422490cf62744e16a3e131efd94cf290");
1551 witch_spellbook.SpellList.SpellsByLevel = new SpellLevelList[10];
1552 for (int i = 0; i < witch_spellbook.SpellList.SpellsByLevel.Length; i++)
1553 {
1554 witch_spellbook.SpellList.SpellsByLevel[i] = new SpellLevelList(i);
1555
1556 }
1557
1558 Common.SpellId[] spells = new Common.SpellId[]
1559 {
1560 new Common.SpellId( "55f14bc84d7c85446b07a1b5dd6b2b4c", 0), //daze
1561 new Common.SpellId( "c3a8f31778c3980498d8f00c980be5f5", 0), //guidance
1562 new Common.SpellId( "95f206566c5261c42aa5b3e7e0d1e36c", 0), //mage
light
1563 new Common.SpellId( "7bc8e27cba24f0e43ae64ed201ad5785", 0),
//resistance
1564 new Common.SpellId( "5bf3315ce1ed4d94e8805706820ef64d", 0), //touch
of fatigue
1565
1566 new Common.SpellId( "4783c3709a74a794dbe7c8e7e0b1b038", 1),
//burning hands
1567 new Common.SpellId( "bd81a3931aa285a4f9844585b5d97e51", 1), //cause
fear
1568 new Common.SpellId( NewSpells.chill_touch.AssetGuid, 1),
1569 new Common.SpellId( "5590652e1c2225c4ca30c4a699ab3649", 1), //cure
light wounds
1570 new Common.SpellId( "8e7cfa5f213a90549aadd18f8f6f4664", 1), //ear
piercing scream
1571 new Common.SpellId( "c60969e7f264e6d4b84a1499fdcf9039", 1),
//enlarge person
1572 new Common.SpellId( NewSpells.frost_bite.AssetGuid, 1),
1573 new Common.SpellId( "88367310478c10b47903463c5d0152b0", 1),
//hypnotism
1574 new Common.SpellId( "e5af3674bb241f14b9a9f6b0c7dc3d27", 1),
//inflict light wounds
1575 new Common.SpellId( NewSpells.long_arm.AssetGuid, 1),
1576 new Common.SpellId( "9e1ad5d6f87d19e4d8883d63a6e35568", 1), //mage
armor
1577 new Common.SpellId( NewSpells.obscuring_mist.AssetGuid, 1),
1578 new Common.SpellId( "450af0402422b0b4980d9c2175869612", 1), //ray of
enfeeblement
1579 new Common.SpellId( "fa3078b9976a5b24caf92e20ee9c0f54", 1), //ray of
sickening
1580 new Common.SpellId( "4e0e9aba6447d514f88eff1464cc4763", 1), //reduce
person
1581 new Common.SpellId( "f6f95242abdfac346befd6f4f6222140", 1), //remove
sickness
1582 new Common.SpellId( "bb7ecad2d3d2c8247a38f44855c99061", 1), //sleep
1583 new Common.SpellId( "9f10909f0be1f5141bf1c102041f93d9", 1), //snowball
1584 new Common.SpellId( "8fd74eddd9b6c224693d9ab241f25e84", 1), //summon
monster 1
1585 new Common.SpellId( "dd38f33c56ad00a4da386c1afaa49967", 1),
//ubreakable heart
1586 new Common.SpellId( HexEngine.hex_vulnerability_spell.AssetGuid, 1),
//hex vilnerability
1587 new Common.SpellId( NewSpells.command.AssetGuid, 1), //command
1588
1589 new Common.SpellId( NewSpells.aggressive_thundercloud.AssetGuid, 2),
1590 new Common.SpellId( "46fd02ad56c35224c9c91c88cd457791", 2),
//blindness
1591 new Common.SpellId( NewSpells.blood_armor.AssetGuid, 2),
1592 new Common.SpellId( NewSpells.bone_fists.AssetGuid, 2),
1593 new Common.SpellId( "b7731c2b4fa1c9844a092329177be4c3", 2),
//boneshaker
1594 new Common.SpellId( "6b90c773a6543dc49b2505858ce33db5", 2), //cure
moderate wounds
1595 new Common.SpellId( "b48b4c5ffb4eab0469feba27fc86a023", 2), //delay
poison
1596 new Common.SpellId( "7a5b5bf845779a941a67251539545762", 2), //false
life
1597 new Common.SpellId( "2dbe271c979d9104c8e2e6b42e208e32", 2), //fester
1598 new Common.SpellId( NewSpells.flurry_of_snowballs.AssetGuid, 2),
1599 new Common.SpellId( NewSpells.force_sword.AssetGuid, 2),
1600 new Common.SpellId( "ce7dad2b25acf85429b6c9550787b2d9", 2),
//glitterdust
1601 new Common.SpellId( NewSpells.haunting_mists.AssetGuid, 2),
1602 new Common.SpellId( "c7104f7526c4c524f91474614054547e", 2), //hold
person
1603 new Common.SpellId( "65f0b63c45ea82a4f8b8325768a3832d", 2),
//inflict moderate wounds
1604 new Common.SpellId( NewSpells.ice_slick.AssetGuid, 2),
1605 new Common.SpellId( "42a65895ba0cb3a42b6019039dd2bff1", 2), //molten
orb
1606 new Common.SpellId( "dee3074b2fbfb064b80b973f9b56319e", 2),
//pernicious poison"
1607 new Common.SpellId( "bc153808ef4884a4594bc9bec2299b69", 2), //pox
postules
1608 new Common.SpellId( "08cb5f4c3b2695e44971bf5c45205df0", 2), //scare
1609 new Common.SpellId( "30e5dc243f937fc4b95d2f8f4e1b7ff3", 2), //see
invisibility
1610 new Common.SpellId( NewSpells.stricken_heart.AssetGuid, 2),
1611 new Common.SpellId( "1724061e89c667045a6891179ee2e8e7", 2), //summon
monster 2
1612 new Common.SpellId( "970c6db48ff0c6f43afc9dbb48780d03", 2), //summon
small elemental
1613 new Common.SpellId( NewSpells.touch_of_blood_letting.AssetGuid, 2),
1614 new Common.SpellId( "134cb6d492269aa4f8662700ef57449f", 2), //web
1615 new Common.SpellId( NewSpells.winter_grasp.AssetGuid, 2),
1616
1617 new Common.SpellId( NewSpells.accursed_glare.AssetGuid, 3),
1618 new Common.SpellId( NewSpells.babble.AssetGuid, 3),
1619 new Common.SpellId( NewSpells.barrow_haze.AssetGuid, 3),
1620 new Common.SpellId( "989ab5c44240907489aba0a8568d0603", 3), //bestow
curse
1621 new Common.SpellId( NewSpells.burning_entanglement.AssetGuid, 3),
1622 new Common.SpellId( NewSpells.countless_eyes.AssetGuid, 3),
1623 new Common.SpellId( "7658b74f626c56a49939d9c20580885e", 3), //deep
slumber
1624 new Common.SpellId( "04e820e1ce3a66f47a50ad5074d3ae40", 3), //delay
posion communal
1625 new Common.SpellId( "92681f181b507b34ea87018e8f7a528a", 3), //dispel
magic
1626 new Common.SpellId( NewSpells.earth_tremor.AssetGuid, 3),
1627 new Common.SpellId( NewSpells.eruptive_postules.AssetGuid, 3),
1628 new Common.SpellId( NewSpells.fly.AssetGuid, 3),
1629 new Common.SpellId( "5ab0d42fb68c9e34abae4921822b9d63", 3), //heroism
1630 new Common.SpellId( NewSpells.howling_agony.AssetGuid, 3),
1631 new Common.SpellId( NewSpells.inflict_pain.AssetGuid, 3),
1632 new Common.SpellId( "d2cff9243a7ee804cb6d5be47af30c73", 3),
//lightning bolt
1633 new Common.SpellId( NewSpells.locate_weakness.AssetGuid, 3),
1634 new Common.SpellId( NewSpells.pain_strike.AssetGuid, 3),
1635 new Common.SpellId( "97b991256e43bb140b263c326f690ce2", 3), //rage
1636 new Common.SpellId( NewSpells.ray_of_exhaustion.AssetGuid, 3),
1637 new Common.SpellId( "c927a8b0cd3f5174f8c0b67cdbfde539", 3), //remove
blindness
1638 new Common.SpellId( "b48674cef2bff5e478a007cf57d8345b", 3), //remove
curse
1639 new Common.SpellId( "4093d5a0eb5cae94e909eb1e0e1a6b36", 3), //remove
disease
1640 new Common.SpellId( NewSpells.sands_of_time.AssetGuid, 3),
1641 new Common.SpellId( NewSpells.sleet_storm.AssetGuid, 3),
1642 new Common.SpellId( "9779c8578acd919419f563c33d7b2af5", 3), //spit
venom
1643 new Common.SpellId( "68a9e6d7256f1354289a39003a46d826", 3),
//stinking cloud
1644 new Common.SpellId( "5d61dde0020bbf54ba1521f7ca0229dc", 3), //summon
monster 3
1645 new Common.SpellId( SpiritualWeapons.twilight_knife.AssetGuid, 3),
1646 new Common.SpellId( "8a28a811ca5d20d49a863e832c31cce1", 3),
//vampyric touch
1647
1648 new Common.SpellId( NewSpells.aggressive_thundercloud_greater.
AssetGuid, 4),
1649 new Common.SpellId( NewSpells.arcane_eye.AssetGuid, 4),
1650 new Common.SpellId( NewSpells.daze_mass.AssetGuid, 4),
1651 new Common.SpellId( "e418c20c8ce362943a8025d82c865c1c", 4), //cape
of vasps
1652 new Common.SpellId( "cf6c901fb7acc904e85c63b342e9c949", 4),
//confusion
1653 new Common.SpellId( "4baf4109145de4345861fe0f2209d903", 4),
//crushing despair
1654 new Common.SpellId( "3361c5df793b4c8448756146a88026ad", 4), //cure
serious wounds
1655 new Common.SpellId( NewSpells.daze_mass.AssetGuid, 4),
1656 new Common.SpellId( "0413915f355a38146bc6ad40cdf27b3f", 4), //death
ward
1657 new Common.SpellId( NewSpells.debilitating_portent.AssetGuid, 4),
1658 new Common.SpellId( "4a648b57935a59547b7a2ee86fb4f26a", 4),
//dimension door
1659 new Common.SpellId( "f34fb78eaaec141469079af124bcfa0f", 4),
//enervation
1660 new Common.SpellId( "dc6af3b4fd149f841912d8a3ce0983de", 4), //false
life, greater
1661 new Common.SpellId( "d2aeac47450c76347aebbc02e4f463e0", 4), //fear
1662 new Common.SpellId( NewSpells.fleshworm_infestation.AssetGuid, 4),
1663 new Common.SpellId( "fcb028205a71ee64d98175ff39a0abf9", 4), //ice
storm
1664 new Common.SpellId( "bd5da98859cf2b3418f6d68ea66cabbe", 4),
//inflict serious wounds
1665 new Common.SpellId( "e7240516af4241b42b2cd819929ea9da", 4),
//neutralize poison
1666 new Common.SpellId( "6717dbaef00c0eb4897a1c908a75dfe5", 4),
//phantasmal killer
1667 new Common.SpellId( "2a6eda8ef30379142a4b75448fb214a3", 4), //poison
1668 new Common.SpellId( NewSpells.rigor_mortis.AssetGuid, 4),
1669 new Common.SpellId( NewSpells.solid_fog.AssetGuid, 4),
1670 new Common.SpellId( NewSpells.spite.AssetGuid, 4),
1671 new Common.SpellId( "e42b1dbff4262c6469a9ff0a6ce730e3", 4), //summon
medium elemental
1672 new Common.SpellId( "7ed74a3ec8c458d4fb50b192fd7be6ef", 4), //summon
monster 4
1673 new Common.SpellId( NewSpells.threefold_aspect.AssetGuid, 4),
1674 new Common.SpellId( "1e481e03d9cf1564bae6b4f63aed2d1a", 4), //touch
of slime
1675 new Common.SpellId( "16ce660837fb2544e96c3b7eaad73c63", 4),
//volcanic storm
1676
1677 new Common.SpellId( "3105d6e9febdc3f41a08d2b7dda1fe74", 5),
//baleful polymorph
1678 new Common.SpellId( "7792da00c85b9e042a0fdfc2b66ec9a8", 5), //break
enchantment
1679 new Common.SpellId( "bacba2ff48d498b46b86384053945e83", 5), //cave
fangs
1680 new Common.SpellId( "548d339ba87ee56459c98e80167bdf10", 5),
//cloudkill
1681 new Common.SpellId( "41c9016596fe1de4faf67425ed691203", 5), //cure
critical wounds
1682 new Common.SpellId( NewSpells.curse_major.AssetGuid, 5),
1683 new Common.SpellId( "d7cbd2004ce66a042aeab2e95a3c5c61", 5),
//dominate person
1684 new Common.SpellId( "444eed6e26f773a40ab6e4d160c67faa", 5),
//feeblemind
1685 new Common.SpellId( "41e8a952da7a5c247b3ec1c2dbb73018", 5), //hold
monster
1686 new Common.SpellId( "651110ed4f117a948b41c05c5c7624c0", 5),
//inflict critical wounds
1687 new Common.SpellId( "eabf94e4edc6e714cabd96aa69f8b207", 5), //mind fog
1688 new Common.SpellId( NewSpells.overland_flight.AssetGuid, 5),
1689 new Common.SpellId( NewSpells.pain_strike_mass.AssetGuid, 5),
1690 new Common.SpellId( NewSpells.suffocation.AssetGuid, 5),
1691 new Common.SpellId( "89404dd71edc1aa42962824b44156fe5", 5), //summon
large elemental
1692 new Common.SpellId( "630c8b85d9f07a64f917d79cb5905741", 5), //summon
monster 5
1693 new Common.SpellId( NewSpells.wall_of_blindness.AssetGuid, 5),
1694 new Common.SpellId( "8878d0c46dfbd564e9d5756349d5e439", 5), //waves
of fatigue
1695 new Common.SpellId( NewSpells.wracking_ray.AssetGuid, 5),
1696
1697 new Common.SpellId( "d42c6d3f29e07b6409d670792d72bc82", 6),
//banshee blast
1698 new Common.SpellId( "7f71a70d822af94458dc1a235507e972", 6), //cloak
of dreams
1699 new Common.SpellId( "e7c530f8137630f4d9d7ee1aa7b1edc0", 6), //cone
of cold
1700 new Common.SpellId( "5d3d689392e4ff740a761ef346815074", 6), //cure
light wounds mass
1701 new Common.SpellId( "f0f761b808dc4b149b08eaf44b99f633", 6), //dispel
magic greater
1702 new Common.SpellId( "3167d30dd3c622c46b0c0cb242061642", 6), //eyebyte
1703 new Common.SpellId( "52b8b14360a87104482b2735c7fc8606", 6), //fester
mass
1704 new Common.SpellId( "700cfcbd0cb2975419bcab7dbb8c6210", 6),
//hellfire ray
1705 new Common.SpellId( "e15e5e7045fda2244b98c8f010adfe31", 6),
//heroism greater
1706 new Common.SpellId( "9da37873d79ef0a468f969e4e5116ad2", 6),
//inflict light wounds mass
1707 new Common.SpellId( "1f2e6019ece86d64baa5effa15e81ecc", 6),
//phantasmal putrefecation
1708 new Common.SpellId( "82a5b848c05e3f342b893dedb1f9b446", 6), //plague
storm
1709 new Common.SpellId( "a0fc99f0933d01643b2b8fe570caa4c5", 6), //raise
dead
1710 new Common.SpellId( "a6e59e74cba46a44093babf6aec250fc", 6), //slay
living
1711 new Common.SpellId( "e243740dfdb17a246b116b334ed0b165", 6), //stone
to flesh
1712 new Common.SpellId( "766ec978fa993034f86a372c8eb1fc10", 6), //summon
huge elemental
1713 new Common.SpellId( "e740afbab0147944dab35d83faa0ae1c", 6), //summon
monster 6
1714 new Common.SpellId( "27203d62eb3d4184c9aced94f22e1806", 6),
//transformation
1715 new Common.SpellId( "b3da3fbee6a751d4197e446c7e852bcb", 6), //true
seeing
1716
1717 new Common.SpellId( "645558d63604747428d55f0dd3a4cb58", 7), //chain
lightning
1718 new Common.SpellId( "571221cc141bc21449ae96b3944652aa", 7), //cure
moderate wounds mass
1719 new Common.SpellId( "137af566f68fd9b428e2e12da43c1482", 7), //harm
1720 new Common.SpellId( "ff8f1534f66559c478448723e16b6624", 7), //heal
1721 new Common.SpellId( NewSpells.hold_person_mass.AssetGuid, 7),
1722 new Common.SpellId( NewSpells.ice_body.AssetGuid, 7),
1723 new Common.SpellId( NewSpells.inflict_pain_mass.AssetGuid, 7),
1724 new Common.SpellId( "03944622fbe04824684ec29ff2cec6a7", 7),
//inflict moderate wounds mass
1725 new Common.SpellId( "2b044152b3620c841badb090e01ed9de", 7), //insanity
1726 new Common.SpellId( "da1b292d91ba37948893cdbe9ea89e28", 7),
//legendary proportions
1727 new Common.SpellId( NewSpells.particulate_form.AssetGuid, 7),
1728 new Common.SpellId( NewSpells.poison_breath.AssetGuid, 7),
1729 new Common.SpellId( "261e1788bfc5ac1419eec68b1d485dbc", 7), //power
word blind
1730 new Common.SpellId( "07d577a74441a3a44890e3006efcf604", 7), //primal
regression
1731 new Common.SpellId( NewSpells.scouring_winds.AssetGuid, 7),
1732 new Common.SpellId( "8eb769e3b583f594faabe1cfdb0bb696", 7), //summon
greater elemental
1733 new Common.SpellId( "ab167fd8203c1314bac6568932f1752f", 7), //summon
monster 7
1734 new Common.SpellId( "474ed0aa656cc38499cc9a073d113716", 7), //umbral
strike
1735 new Common.SpellId( "1e2d1489781b10a45a3b70192bba9be3", 7), //waves
of Ectasy
1736 new Common.SpellId( "3e4d3b9a5bd03734d9b053b9067c2f38", 7), //waves
of exhaustion
1737
1738 new Common.SpellId( "0cea35de4d553cc439ae80b3a8724397", 8), //cure
serious wounds mass
1739 new Common.SpellId( "c3d2294a6740bc147870fff652f3ced5", 8), //death
clutch
1740 new Common.SpellId( "e788b02f8d21014488067bdd3ba7b325", 8),
//frightfull aspect
1741 new Common.SpellId( "08323922485f7e246acb3d2276515526", 8), //horrid
wilting
1742 new Common.SpellId( "820170444d4d2a14abc480fcbdb49535", 8),
//inflict serious wounds mass
1743 new Common.SpellId( NewSpells.irresistible_dance.AssetGuid, 8),
1744 new Common.SpellId( "f958ef62eea5050418fb92dfa944c631", 8), //power
word stun
1745 new Common.SpellId( "0e67fa8f011662c43934d486acc50253", 8),
//prediction of failure
1746 new Common.SpellId( "80a1a388ee938aa4e90d427ce9a7a3e9", 8),
//resurrection
1747 new Common.SpellId( "7cfbefe0931257344b2cb7ddc4cdff6f", 8),
//stormbolts
1748 new Common.SpellId( "8a7f8c1223bda1541b42fd0320cdbe2b", 8), //summon
elder elemental
1749 new Common.SpellId( "d3ac756a229830243a72e84f3ab050d0", 8), //summon
monster 8
1750 new Common.SpellId( "df2a0ba6b6dcecf429cbb80a56fee5cf", 8), //mind
blank
1751
1752 new Common.SpellId( "1f173a16120359e41a20fc75bb53d449", 9), //cure
critical wounds mass
1753 new Common.SpellId( "3c17035ec4717674cae2e841a190e757", 9),
//dominate monster
1754 new Common.SpellId( "43740dab07286fe4aa00a6ee104ce7c1", 9), //heroic
invocation
1755 new Common.SpellId( "0340fe43f35e7a448981b646c638c83d", 9),
//elemental swarm
1756 new Common.SpellId( "37302f72b06ced1408bf5bb965766d46", 9), //energy
drain
1757 new Common.SpellId( "5ee395a2423808c4baf342a4f8395b19", 9),
//inflict critical wounds mass
1758 new Common.SpellId( "1f01a098d737ec6419aedc4e7ad61fdd", 9),
//foresight
1759 new Common.SpellId( NewSpells.hold_monster_mass.AssetGuid, 9),
1760 new Common.SpellId( "87a29febd010993419f2a4a9bee11cfc", 9), //mind
blank communal
1761 new Common.SpellId( "ba48abb52b142164eba309fd09898856", 9), //polar
midnight
1762 new Common.SpellId( "2f8a67c483dfa0f439b293e094ca9e3c", 9), //power
word kill
1763 new Common.SpellId( NewSpells.mass_suffocation.AssetGuid, 9),
1764 new Common.SpellId( "52b5df2a97df18242aec67610616ded0", 9), //summon
monster 9
1765 new Common.SpellId( "b24583190f36a8442b212e45226c54fc", 9) //wail of
banshee
1766 };
1767
1768 foreach (var spell_id in spells)
1769 {
1770 var spell = library.Get<BlueprintAbility>(spell_id.guid);
1771 spell.AddToSpellList(witch_spellbook.SpellList, spell_id.level);
1772 }
1773
1774 HexEngine.hex_vulnerability_spell.AddSpellAndScroll(
"e236e280f8be487428dcc09fe44dd5fd"); //hold person
1775 NewSpells.spite.AddSpellAndScroll("beab337b352b5ac479698e2bbc08f4ce");
//circle of death
1776
1777 return witch_spellbook;
1778 }
1779
1780
1781 static void createIllOmen()
1782 {
1783 var buff0 = library.CopyAndAdd<BlueprintBuff>(
"96bbd279e0bed0f4fb208a1761f566b5", "IllOmen1Buff", "");
1784 buff0.SetName("Ill Omen");
1785 buff0.SetDescription("You afflict the target with bad luck. On the next
d20 roll the target makes, it must roll twice and take the less favorable result.
For every five caster levels you have, the target must roll twice on an additional
d20 roll (to a maximum of five rolls at 20th level).");
1786 buff0.ReplaceComponent<ModifyD20>(m => m.DispellOnRerollFinished = true);
1787 buff0.SetBuffFlags(BuffFlags.HiddenInUi);
1788
1789 BlueprintBuff[] buffs = new BlueprintBuff[5];
1790 ActionList[] actions = new ActionList[5];
1791 GameAction[] removes = new GameAction[5];
1792 buffs[0] = buff0;
1793 actions[0] = Helpers.CreateActionList(Common.createContextActionApplyBuff
(buffs[0], Helpers.CreateContextDuration(), is_child: false, is_permanent: true,
dispellable: false));
1794 removes[0] = Common.createContextActionRemoveBuffFromCaster(buff0);
1795
1796 for (int i = 1; i < 5; i++)
1797 {
1798 buffs[i] = library.CopyAndAdd<BlueprintBuff>(buff0.AssetGuid, $
"IllOmen{i + 1}Buff", "");
1799
1800 buffs[i].AddComponent(Helpers.CreateAddFactContextActions(deactivated
: actions[i - 1].Actions[0]));
1801 actions[i] = Helpers.CreateActionList(Common.
createContextActionApplyBuff(buffs[i], Helpers.CreateContextDuration(), is_child:
false, is_permanent: true, dispellable: false));
1802 removes[i] = Common.createContextActionRemoveBuffFromCaster(buffs[i]);
1803 }
1804
1805 var buff = Helpers.CreateBuff("IllOmenBuff",
1806 buff0.Name,
1807 buff0.Description,
1808 "",
1809 buff0.Icon,
1810 null,
1811 Helpers.CreateAddFactContextActions(
activated: new GameAction[] { Common.createRunActionsDependingOnContextValue(Helpers.
CreateContextValue(AbilityRankType.StatBonus), actions) },
1812
deactivated: removes),
1813 Helpers.CreateContextRankConfig(progression
: ContextRankProgression.OnePlusDivStep, stepLevel: 5, type: AbilityRankType.
StatBonus)
1814 );
1815 buff0.AddComponent(Helpers.CreateAddFactContextActions(deactivated:
Common.createContextActionRemoveBuffFromCaster(buff)));
1816
1817 var apply_buff = Common.createContextActionApplyBuff(buff, Helpers.
CreateContextDuration(Helpers.CreateContextValue(AbilityRankType.Default)),
is_from_spell: true);
1818
1819 ill_omen = Helpers.CreateAbility("IllOmenAbility",
1820 buff.Name,
1821 buff.Description,
1822 "",
1823 buff.Icon,
1824 AbilityType.Spell,
1825 UnitCommand.CommandType.Standard,
1826 AbilityRange.Close,
1827 Helpers.roundsPerLevelDuration,
1828 Helpers.savingThrowNone,
1829 Helpers.CreateRunActions(apply_buff),
1830 Helpers.CreateSpellComponent(SpellSchool
.Enchantment),
1831 Helpers.CreateSpellDescriptor(
SpellDescriptor.Curse | SpellDescriptor.MindAffecting),
1832 Helpers.CreateContextRankConfig()
1833 );
1834 var dominate_monster = library.Get<BlueprintAbility>(
"3c17035ec4717674cae2e841a190e757");
1835 ill_omen.AddComponents(dominate_monster.GetComponents<
AbilityTargetHasFact>());
1836 ill_omen.AddComponents(dominate_monster.GetComponents<
AbilityTargetHasNoFactUnless>());
1837
1838 ill_omen.SpellResistance = true;
1839 ill_omen.setMiscAbilityParametersSingleTargetRangedHarmful(true);
1840 ill_omen.AvailableMetamagic = Metamagic.Extend | Metamagic.Heighten |
Metamagic.Quicken | Metamagic.Reach | (Metamagic)MetamagicFeats.MetamagicExtender.
Piercing;
1841
1842 ill_omen.AddToSpellList(witch_class.Spellbook.SpellList, 1);
1843 ill_omen.AddSpellAndScroll("3bbf0e0edd3e78f42a42b0dd85c3a53a"); //doom
1844 }
1845
1846 static void createHermeanPotential()
1847 {
1848 var buff0 = library.CopyAndAdd<BlueprintBuff>(
"3bc40c9cbf9a0db4b8b43d8eedf2e6ec", "HermeanPotential1Buff", "");
1849 buff0.SetName("Hermean Potential");
1850 buff0.SetDescription("You gift the target with the ability to perfect
its actions via mental clarity. On the next attack roll, saving throw, ability
check, or skill check the target attempts, it rolls twice and takes the more
favorable result. For every 5 caster levels you have, the target can roll twice on
an additional attack roll, saving throw, ability check, or skill check (to a maximum
of 5 rolls at 20th level).");
1851 buff0.ReplaceComponent<ModifyD20>(m => m.DispellOnRerollFinished = true);
1852 buff0.SetBuffFlags(BuffFlags.HiddenInUi);
1853
1854 BlueprintBuff[] buffs = new BlueprintBuff[5];
1855 ActionList[] actions = new ActionList[5];
1856 GameAction[] removes = new GameAction[5];
1857 buffs[0] = buff0;
1858 actions[0] = Helpers.CreateActionList(Common.createContextActionApplyBuff
(buffs[0], Helpers.CreateContextDuration(), is_child: false, is_permanent: true,
dispellable: false));
1859 removes[0] = Common.createContextActionRemoveBuffFromCaster(buff0);
1860
1861 for (int i = 1; i < 5; i++)
1862 {
1863 buffs[i] = library.CopyAndAdd<BlueprintBuff>(buff0.AssetGuid, $
"HermeanPotential{i + 1}Buff", "");
1864
1865 buffs[i].AddComponent(Helpers.CreateAddFactContextActions(deactivated
: actions[i - 1].Actions[0]));
1866 actions[i] = Helpers.CreateActionList(Common.
createContextActionApplyBuff(buffs[i], Helpers.CreateContextDuration(), is_child:
false, is_permanent: true, dispellable: false));
1867 removes[i] = Common.createContextActionRemoveBuffFromCaster(buffs[i]);
1868 }
1869
1870 var buff = Helpers.CreateBuff("HermeanPotentialBuff",
1871 buff0.Name,
1872 buff0.Description,
1873 "",
1874 buff0.Icon,
1875 null,
1876 Helpers.CreateAddFactContextActions(
activated: new GameAction[] { Common.createRunActionsDependingOnContextValue(Helpers.
CreateContextValue(AbilityRankType.StatBonus), actions) },
1877
deactivated: removes),
1878 Helpers.CreateContextRankConfig(progression
: ContextRankProgression.OnePlusDivStep, stepLevel: 5, type: AbilityRankType.
StatBonus)
1879 );
1880 buff0.AddComponent(Helpers.CreateAddFactContextActions(deactivated:
Common.createContextActionRemoveBuffFromCaster(buff)));
1881
1882 var apply_buff = Common.createContextActionApplyBuff(buff, Helpers.
CreateContextDuration(Helpers.CreateContextValue(AbilityRankType.Default)),
is_from_spell: true);
1883
1884 hermean_potential = Helpers.CreateAbility("HermeanPotentialAbility",
1885 buff.Name,
1886 buff.Description,
1887 "",
1888 buff.Icon,
1889 AbilityType.Spell,
1890 UnitCommand.CommandType.Standard,
1891 AbilityRange.Touch,
1892 Helpers.roundsPerLevelDuration,
1893 HarmlessSaves.HarmlessSaves.
will_harmless,
1894 Helpers.CreateRunActions(apply_buff),
1895 Helpers.CreateSpellComponent(SpellSchool
.Enchantment),
1896 Helpers.CreateSpellDescriptor(
SpellDescriptor.Compulsion | SpellDescriptor.MindAffecting),
1897 Helpers.CreateContextRankConfig(),
1898 Helpers.Create<HarmlessSaves.
HarmlessSpell>()
1899 );
1900
1901
1902 hermean_potential.SpellResistance = true;
1903 hermean_potential.setMiscAbilityParametersTouchFriendly();
1904 hermean_potential.AvailableMetamagic = Metamagic.Extend | Metamagic.
Heighten | Metamagic.Quicken | Metamagic.Reach;
1905
1906 hermean_potential.AddToSpellList(witch_class.Spellbook.SpellList, 1);
1907 hermean_potential.AddSpellAndScroll("08cf11d25aaab074388207b66f64a162");
//aid
1908 }
1909
1910
1911 static void createScreech()
1912 {
1913 screech = Helpers.CreateAbility("ScreechAbility",
1914 "Screech",
1915 "You emit a shrill, piercing shriek,
startling those around you into dropping their guard. Enemies in the area must make
a successful Saving Throw or immediately provoke attacks of opportunity from foes
that threaten them. You and your allies are unaffected by your own screech.",
1916 "",
1917 Helpers.GetIcon(
"8e7cfa5f213a90549aadd18f8f6f4664"),
1918 AbilityType.Spell,
1919 UnitCommand.CommandType.Standard,
1920 AbilityRange.Personal,
1921 "",
1922 Helpers.fortNegates,
1923 Helpers.CreateRunActions(Helpers.
CreateActionSavingThrow(SavingThrowType.Fortitude,
1924
null, Helpers.Create<ContextActionProvokeAttackOfOpportunity>()
1925
)
1926 ),
1927 Helpers.CreateSpellComponent(SpellSchool
.Evocation),
1928 Helpers.CreateSpellDescriptor(
SpellDescriptor.Sonic),
1929 Helpers.CreateAbilityTargetsAround(
30.Feet(), TargetType.Enemy),
1930 Common.createAbilitySpawnFx(
"dce448e95ca41aa49962bbb66a67c32c", anchor: AbilitySpawnFxAnchor.ClickedTarget),
1931 Common.createAbilitySpawnFx(
"73e103c66e0d15545bf0f7d114d3339e", anchor: AbilitySpawnFxAnchor.ClickedTarget),
1932 Helpers.Create<SharedSpells.
CannotBeShared>()
1933 );
1934
1935 screech.SpellResistance = true;
1936 screech.setMiscAbilityParametersSelfOnly();
1937 screech.AvailableMetamagic = Metamagic.Heighten | Metamagic.Quicken | (
Metamagic)MetamagicFeats.MetamagicExtender.Persistent | (Metamagic)MetamagicFeats.
MetamagicExtender.Piercing;
1938
1939 screech.AddToSpellList(witch_class.Spellbook.SpellList, 3);
1940 screech.AddSpellAndScroll("17afee356af23734393bb157daa8b29c");
//ear-piercing scream
1941 }
1942
1943
1944 static BlueprintFeature createWitchPatronFeature(string name, string
spell_list_guid, string feature_guid, bool is_winter, params string[] spell_guids)
1945 {
1946 var extra_spell_list = new Common.ExtraSpellList(spell_guids);
1947 patron_spelllist_map.Add(name, extra_spell_list);
1948 var learn_spell_list = extra_spell_list.createLearnSpellList("Witch" +
name + "PatronSpellList", spell_list_guid, witch_class);
1949 string description = name + " patron grants witch the following spells: ";
1950 for (int i = 1; i <= 9; i++)
1951 {
1952 description += learn_spell_list.SpellList.SpellsByLevel[i].Spells[0].
Name + ((i == 9) ? "" :", ");
1953 }
1954 description += ".";
1955
1956 var patron =
Helpers.CreateProgression("Witch" + name + "PatronFeature",
1957 name + " Patron",
1958 description,
1959 feature_guid,
1960 null,
1961 FeatureGroup.None,
1962 //learn_spell_list,
1963 Helpers.Create<SpellDuplicates.
AddCasterLevelForSpellsOrDuplicates>(a => { a.Value = Helpers.CreateContextValue(
AbilityRankType.Default); a.Spells = Common.getSpellsFromSpellList(learn_spell_list.
SpellList); }),
1964 Helpers.CreateContextRankConfig(
ContextRankBaseValueType.FeatureRank, feature: patron_cl_fcb)
1965 );
1966 patron.Classes = getWitchArray();
1967
1968 patron.LevelEntries = extra_spell_list.createLearnSpellLevelEntries(
"Witch" + name + "PatronSpell",
1969
description,
1970
learn_spell_list.SpellList.AssetGuid,
1971 new
int[] { 2, 4, 6, 8, 10, 12, 14, 16, 18 },
1972
witch_class);
1973
1974
1975 var witch_knife_bonus = Helpers.CreateFeature("WitchKnife" + patron.name,
1976 "",
1977 "",
1978 "",
1979 null,
1980 FeatureGroup.None,
1981 Helpers.Create<
SpellDuplicates.IncreaseDCForSpellsOrDuplicates>(s =>
1982
{
1983
s.Value = 1;
1984
s.Spells = Common.getSpellsFromSpellList(
learn_spell_list.SpellList);
1985
}
1986
)
1987 );
1988 witch_knife_bonus.HideInCharacterSheetAndLevelUp = true;
1989 witch_knife.AddComponent(Common.createAddFeatureIfHasFact(patron,
witch_knife_bonus));
1990
1991 if (is_winter)
1992 {
1993 winter_witch_patrons.Add(patron);
1994 }
1995
1996 patron_spells_map.Add(patron, Common.getSpellsFromSpellList(
learn_spell_list.SpellList));
1997 return patron;
1998 }
1999
2000 static BlueprintCharacterClass[] getWitchArray()
2001 {
2002 return new BlueprintCharacterClass[] { witch_class };
2003 }
2004
2005
2006 static void createHealing()
2007 {
2008 healing = hex_engine.createHealing("WitchHealing", "Healing",
2009 "A witch can soothe the wounds of those she
touches.\n"
2010 + "Effect: This acts as a cure light wounds
spell, using the witch’s caster level.Once a creature has benefited from the healing
hex, it cannot benefit from it again for 24 hours. At 5th level, this hex acts like
cure moderate wounds.",
2011 "a9f6f1aa9d46452aa5720c472b8926e2",
2012 "8ea243ac42aa4959ba131cbd5ff0118b",
2013 "a9d436988d044916b7bf61a58725725b",
2014 "6fe1054367f149939edc7f576d157bfa",
2015 "abec18ed55414a52a6d09457b734a5ca",
2016 "67e655e5a20640519d387e08298de728");
2017 }
2018
2019
2020 static void createBeastOfIllOmen()
2021 {
2022 beast_of_ill_omen = hex_engine.createBeastOfIllOmen("BeastOfIllOmen",
"Beast of Ill-Omen",
2023 "The witch imbues
her familiar with strange magic, putting a minor curse upon the next enemy to see
it.\n"
2024 + "Effect: The
target enemy must make a Will save or be affected by bane (caster level equal to the
witch’s level).\n"
2025 + " Whether or not
the target’s save is successful, the creature cannot be the target of the bane
effect for 1 day (later uses of this hex ignore that creature when determining who
is affected).\n"
2026 + "Note: using hex
is a free action, but you must wait at least one minute between two susequent
useses.",
2027
"c19d55421e6f436580423fffc78c11bd",
2028
"fb3278a3b552414faaecb4189818b32e",
2029
"ef6b3d4ad22644628aacfd3eaa4783e9"
2030 );
2031 }
2032
2033
2034 static void createSlumber()
2035 {
2036 slumber_hex = hex_engine.createSlumber("Slumber", "Slumber",
2037 "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"
2038 + "This hex can affect a
creature with total HD less or equal to your character level. 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.",
2039 "31f0fa4235ad435e95ebc89d8549c2ce",
2040 "c086eeb69a4442df9c4bb8469a2c362d",
2041 "0ccdbefa7f304a5788c4369b0a988e21"
);
2042 }
2043
2044
2045 static void createMisfortune()
2046 {
2047 misfortune_hex = hex_engine.createMisfortune("Misfortune", "Misfortune",
2048 "Effect: The witch can
cause a creature within 30 feet to suffer grave misfortune for 1 round. Anytime the
creature makes an ability check, attack roll, saving throw, or skill check, it must
roll twice and take the worse result. A Will save negates this hex. At 8th level and
16th level, the duration of this hex is extended by 1 round. This hex affects all
rolls the target must make while it lasts. Whether or not the save is successful, a
creature cannot be the target of this hex again for 1 day.",
2049
"08b6595f503f4d3c973424c217f7610e",
2050 "",
2051
"d7d51941f7684c4c92eb2232a5dd600f",
2052
"3c8c06c506cd45d29e35e2e6507c659a");
2053 }
2054
2055
2056 static void createFortuneHex()
2057 {
2058 fortune_hex = hex_engine.createFortuneHex("Fortune", "Fortune",
2059 "The witch can grant a
creature within 30 feet a bit of good luck for 1 round. The target can call upon
this good luck once per round, allowing him to reroll any ability check, attack
roll, saving throw, or skill check, taking the better result. At 8th level and 16th
level, the duration of this hex is extended by 1 round. Once a creature has
benefited from the fortune hex, it cannot benefit from it again for 24 hours.",
2060
"986017ba2747495cb29cd37432140391",
2061 "",
2062
"b308ce2d429d4c1ea048fb7a69f65002",
2063
"ffaf306fa3aa41e183dba5866bee9210");
2064 }
2065
2066
2067 static void createIceplantHex()
2068 {
2069 iceplant_hex = hex_engine.createIceplantHex("Iceplant", "Iceplant",
2070 "This hex grants the witch
and her familiar a +2 natural armor bonus and the constant effects of endure
elements.\n"
2071 + "The effect leaves the
witch’s skin thick and stiff to the touch.",
2072
"9828e12570414e6eb4cf42e00f303eab");
2073 }
2074
2075
2076 static void createMurksightHex()
2077 {
2078 murksight_hex = hex_engine.createMurksightHex("Murksight", "Murksight",
2079 "The witch can see through
natural or magical fog, mist, and rain without penalty, ignoring any concealment
bonuses gained from such effects.",
2080
"e860bd889e494cd583b59bc5df42e7ef");
2081 }
2082
2083
2084 static void createFlightHex()
2085 {
2086 flight_hex = hex_engine.CreateFlightHex("Flight", "Flight",
2087 "The witch can fly as per fly
spell.");
2088 flight_hex.AddComponent(Helpers.PrerequisiteClassLevel(witch_class, 5));
2089 }
2090
2091
2092 static void createAmeliorating()
2093 {
2094 ameliorating = hex_engine.createAmeliorating("Ameliorating",
"Ameliorating",
2095 "The witch can touch a
creature to suppress or protect it from negative conditions. The hex effects the
following conditions: dazzled, fatigued, shaken, or sickened. If the target is
afflicted with these conditions, they are suppressed for a number of minutes equal
to the witch’s level. Alternatively, the witch can grant her target a +4
circumstance bonus on saving throws against effects that cause any of the listed
conditions for 24 hours. Once a creature has benefited from this hex, it cannot
benefit from the hex again for 24 hours.",
2096
"414d6c8fd5fc46c5a83b596a9bcf3322",
2097
"a88b55579cd44dd5b78a27dcc6862ae1",
2098
"09e35a74b871478eb1fb9480eae1f773",
2099
"e7861746a94347cabec03c43b13f1223",
2100
"cdf8ea7144b0454786273b68c97f3cfe",
2101
"b58d93d94e834ada903a91d8cf46d650");
2102 }
2103
2104
2105 static void createEvilEye()
2106 {
2107 evil_eye = hex_engine.createEvilEye("EvilEye", "Evil Eye",
2108 "The witch can cause doubt to creep
into the mind of a foe within 30 feet that she can see.\n"
2109 + "Effect: The target takes a –2
penalty on one of the following(witch’s choice): AC, attack rolls or saving throws.
This hex lasts for a number of rounds equal to 3 + the witch’s Intelligence
modifier.A Will save reduces this to just 1 round.\n"
2110 + "This is a mind - affecting
effect. At 8th level the penalty increases to –4.",
2111 "32cbc5579f784bfb87bb1ae9ef3bb59e",
2112 "1c8855dc3c9846a8addb4db4375eafe8",
"ad14718b3f65491183dd97c4b9f57246", "cb406009170b447489b32d5b43d88f3f",
2113 "7a23bee9c3b04801bcd08ab8ef369341",
2114 "4a8fcd47dc9244f7ac6deb8dd9b741e2",
"a11119164c7d430f81f6f3ec15e56e44", "2598782fac2a44b6a607f5d0d2a059bb");
2115 }
2116
2117
2118 static void createSummerHeat()
2119 {
2120 summer_heat = hex_engine.createSummerHeat("WitchSummerHeat", "Summer's
Heat",
2121 "Effect: The witch surrounds
her target with oppressive heat, dealing a number of points of fire damage equal to
her witch level and causing the target to become fatigued. The target can attempt a
Fortitude save to reduce this damage by half and negate the fatigued condition.
Whether or not the target succeeds at this save, it can’t be the target of this hex
again for 1 day.",
2122
"008a70774dbf48058810c565dad93fce",
2123
"0c2bce51244647329e7e753b07548d10",
2124
"383672cfa7804b20b3c27d20cf62bc73",
2125
"7e5ed75385894376833e5dda98b12f8d",
2126
"4ade4bcdcef14344b7f09c99fb60a672");
2127 }
2128
2129
2130 static void createWard()
2131 {
2132 ward = hex_engine.createWardHex("WitchWard", "Ward",
2133 "Effect: The warded creature receives a
+2 deflection bonus to AC and a +2 resistance bonus on saving throws. This ward
lasts until the warded creature is hit or fails a saving throw. A witch knows when a
warded creature is no longer protected. A witch can have only one ward active at a
time. If the witch uses this ability again, the previous ward immediately ends. A
witch cannot use this ability on herself. At 8th level and 16th level, the bonuses
provided by this ward increase by +1."
2134 );
2135 }
2136
2137
2138 static void createSwampsGrasp()
2139 {
2140 swamps_grasp = hex_engine.createSwampsGrasp("WitchSwampsGrasp", "Swamp's
Grasp",
2141 "Effect: A 20-ft radius burst within
medium range becomes difficult terrain for a number of rounds equal to 3 + the
witch’s Intelligence modifier. If the witch uses this hex again before the duration
of the previous use has expired, the effects of the previous use of this hex end
immediately."
2142 );
2143 }
2144
2145
2146 static void createMajorHealing()
2147 {
2148 major_healing = hex_engine.createMajorHealing("WitchMajorHealing",
"Major Healing",
2149 "By calling upon eerie
powers, the witch’s touch can mend even the most terrible wounds of those she
touches.\n"
2150 + "Effect:
This hex acts as cure serious wounds, using the witch’s caster level. Once a
creature has benefited from the major healing hex, it cannot benefit from it again
for 24 hours. At 15th level, this hex acts like cure critical wounds.",
2151
"8edb4d0c196a45c3a19a9b15272690ed",
2152
"20fd1e6465a74433b9da13ef44a9c1bf",
2153
"b247577f3d1b4abba1b412c3b694c741",
2154
"2cffb51f4dcf4eec90d70cef7157ceca",
2155
"b5614740fd784ec5b8e68bc9fbd4f0bd",
2156
"8850ad9fb25148bb8732ca19076b15ec");
2157 }
2158
2159
2160 static void createMajorAmeliorating()
2161 {
2162 major_ameliorating = hex_engine.createMajorAmeliorating(
"MajorAmeliorating", "Major Ameliorating",
2163 "The witch can
touch a creature to suppress or protect it from more debilitating negative
conditions. The witch can suppress blinded, curse, disease, or poison conditions for
a number of minutes equal to the witch’s level. Alternatively, for 24 hours the
witch can grant her target a +4 circumstance bonus on saving throws against effects
that cause any of the above conditions or effects. Once a creature has benefited
from this hex, it cannot benefit from it again for 24 hours.",
2164
"6c9027c8518b4e5abb5e6910b1bfd929",
2165
"b9e4db8a1dad4f3a86576a31c665fc93",
2166
"2c4d412a48844be184f2bd2ecc587ea6",
2167
"aca5d3e6f2c84e48b05f4aeded732ea4",
2168
"0d1b469f355b44129ef4236d0feabfce",
2169
"c580d3007f4948b38150aa347b9d9a9f");
2170 }
2171
2172
2173 static void createAnimalSkin()
2174 {
2175 animal_skin = hex_engine.createAnimalSkin("WitchAnimalSkin", "Animal
Skin",
2176 "The witch can become any
animal of a size from Medium to Large. This ability is similar to beast shape II.",
2177
"db93b8d7ae754858a81da32c121036a4",
2178 "",
2179 "",
2180
"3c7752fbba7949dfb8ff07044c4db11d");
2181 }
2182
2183
2184 static void createRestlessSlumber()
2185 {
2186 restless_slumber = hex_engine.createRestlessSlumber("RestlessSlumber",
"Restless Slumber",
2187 "The witch causes a creature
within 30 feet to fall into a sleep riddled with nightmares. This functions as the
slumber hex. Additionally, the restless nature of the sleep causes the creature to
violently toss and turn, dealing 1d10 points of damage to itself each turn.\n"
2188 + "This damage does not wake the
creature. When it wakes, the creature’s addled state causes it to be confused for a
number of rounds equal to half the witch’s level. The witch must have the slumber
hex to select this hex."
2189 );
2190 restless_slumber.AddComponent(Helpers.PrerequisiteFeature(slumber_hex));
2191 }
2192
2193
2194 static void createAgony()
2195 {
2196 agony = hex_engine.createAgony("WitchAgony", "Agony",
2197 "Effect: With a quick incantation, a
witch can place this hex on one creature within 60 feet, causing them to suffer
intense pain. The target is nauseated for a number of rounds equal to the witch’s
level. A Fortitude save negates this effect. If the saving throw is failed, the
target can attempt a new save each round to end the effect. Whether or not the save
is successful, a creature cannot be the target of this hex again for 1 day.",
2198 "0229165c289947968a20550817524590",
2199 "824364df0dc3420d98c699f95dc250c0",
2200 "77d75c4d05a94141a461b29198a59f0b",
2201 "512e6a19428047038a4abd8ee368dc99");
2202 }
2203
2204
2205 static void createBeastGift()
2206 {
2207 beast_gift = hex_engine.createBeastGift("WitchBeastGift", "Beast’s Gift",
2208 "Effect: The witch can use her
magic to grant her allies ferocious animal abilities. The witch can partially
transform a willing ally, granting him one bite attack dealing 1d8 points of damage
and one secondary gore attack dealing 1d6 points of damage for a number of minutes
equal to the witch’s level. Once a creature has benefited from this hex, it cannot
benefit from it again for 24 hours.",
2209
"b87be54ce5ef465786f74d89efa53678",
2210
"9007fc6505104436b01dfc7f989e82c4",
2211
"fb4abd4dec1f4a029ebbc39c28139e8c",
2212
"0dde3620e1394115a8785454170d8108");
2213 }
2214
2215
2216 static void createHarrowingCurse()
2217 {
2218 harrowing_curse = hex_engine.createHarrowingCurse("WitchHarrowingCurse",
"Harrowing Curse",
2219 "Effect: The witch
can curse a target creature by touching it with a card randomly drawn from a harrow
deck she owns. The target is affected as if by the spell bestow curse using the
witch’s caster level, except that the witch can decrease only the ability score that
corresponds to the suit of the card drawn. Whether or not the save is successful, a
creature cannot be targeted by this hex more than once in 24 hours.",
2220
"39cd09cc131e40b49ca20213094d1190",
2221
"5ca58e3854444a869808889a3cbf20d9",
2222
"b706bf0a946d4d1d9a49040efb3595c9");
2223 }
2224
2225
2226 static void createRetribution()
2227 {
2228 retribution = hex_engine.createRetribution("WitchRetribution",
"Retribution",
2229 "Effect: A witch can place a
retribution hex on a creature within 60 feet, causing terrible wounds to open across
the target’s flesh whenever it deals damage to another creature in melee.Immediately
after the hexed creature deals damage in melee, it takes half that damage(round
down).This damage bypasses any resistances, immunities, or damage reduction the
creature possesses.This effect lasts for a number of rounds equal to the witch’s
Intelligence modifier.A Will save negates this effect.",
2230 "",
2231 "",
2232 "");
2233 }
2234
2235
2236 static void createIceTomb()
2237 {
2238 ice_tomb = hex_engine.createIceTomb("WitchIceTomb", "Ice Tomb",
2239 $"Effect: A storm of ice and
freezing wind envelops the target, which takes
3d{BalanceFixes.getDamageDieString(DiceType.D8)} points of cold damage (Fortitude
half). If the target fails its save, it is paralyzed and unconscious but does not
need to eat or breathe while the ice lasts. Destroying the ice, by dealing any
damage to it, frees the creature, which is staggered for 1d4 rounds after being
released. Whether or not the target’s saving throw is successful, it cannot be the
target of this hex again for 1 day.",
2240 "a680c3c5fd7646499f1b7e8d95b0f5df",
2241 "7e75ef2ae6984d80a98f47f7a5a2a8a8",
2242 "f983760c33db49b5ae58e3c60ad0014b",
2243 "99e48705252147f6a8c395394ba77faa");
2244 }
2245
2246
2247 static void createRegenerativeSinew()
2248 {
2249 regenerative_sinew = hex_engine.createRegenerativeSinew(
"WitchRegenerativeSinew", "Regenerative Sinew",
2250 "The witch can
cause the debilitating wounds of a creature she touches to quickly close, helping it
heal rapidly.\n"
2251 + "The target
either gains fast healing 5 for a number of rounds equal to 1/2 the witch’s class
level or it heals ability score damage for one ability score.\n"
2252 + "Once a
creature has benefited from this hex, it cannot benefit from it again for 24 hours.",
2253
"6fab21ff649245babdb6f1155579f6b0",
2254
"03963bcf8dd64abea3757311c1e8a79c",
2255
"f6de4a3f23ec4e319f574e3900002919",
2256
"b7f1e7aee027492e8f474a1f5e419194",
2257
"a367881ee1704b1ab509758f5799369d");
2258 }
2259
2260 static void createAnimalServant()
2261 {
2262 animal_servant = hex_engine.createAnimalServant("WitchAnimalServant",
"Animal Servant",
2263 "Effect: The witch can
use this hex to turn a humanoid enemy into an animal and rob it of its free will.\n"
2264 + "The transformation
works as beast shape II and is negated by a successful Will save. The transformed
creature retains its Intelligence score and known languages, if any, but the witch
controls its mind. This effect functions as dominate monster, except the creature
does not receive further saving throws to resist the hex. The effect can be removed
only with wish or similar magic, although slaying the witch also ends the effect.
Whether or not the save is successful, a creature cannot be the target of this hex
again for 1 day.",
2265
"583e661fe4244a319672bc6ccdc51294",
2266
"32b4b11964724f59a9034e61014dbb3c",
2267
"92859cd9f42a4fae95462e27e3a940fb",
2268
"73b1287891e7441bbfc663c5f937083c");
2269 }
2270
2271
2272 static void createDeathCurse()
2273 {
2274 death_curse = hex_engine.createDeathCurse("WitchDeathCurse", "Death
Curse",
2275 "This powerful hex seizes a
creature’s heart, causing death within just a few moments.\n"
2276 + $"Effect: This hex has a
range of 30 feet. The hexed creature receives a Will save to negate the effect. If
this save is failed, the creature becomes fatigued the first round of the hex. On
the second round of the hex, the creature becomes exhausted. On the third round, the
creature dies unless it succeeds at a Fort save. Creatures that fail the first save
but succeed at the second remain exhausted and take
4d{BalanceFixes.getDamageDieString(DiceType.D6)} points of damage + 1 point of
damage per level of the witch. Slaying the witch that hexed the creature ends the
effect, but any fatigue or exhaustion remains. Whether or not the saves are
successful, a creature cannot be the target of this hex again for 1 day.",
2277
"6913bcf974004951a0542e906b4c201c",
2278
"617290b83ca04f01adc23e0416758dfb",
2279
"cf27f36d30cd4ce8baaa3a52cf9e08f1",
2280
"f172135df37a40e8aa7cb7be29d2a72d");
2281 }
2282
2283
2284 static void createLayToRest()
2285 {
2286 lay_to_rest = hex_engine.createLayToRest("WitchLayToRest", "Lay to Rest",
2287 "Effect: The witch may target a
single undead creature with this hex as if with an undeath to death spell. A Will
save negates this effect. Whether or not the save is successful, a creature cannot
be the target of this hex again for 1 day.",
2288
"948b588bb57d4ef1bf96940c0bba95c9",
2289
"3fcdc34afbb74b15a4236740d299afaf",
2290
"8a0733cfc0844297b4db7f3351714744");
2291 }
2292
2293
2294 static void createLifeGiver()
2295 {
2296 life_giver = hex_engine.createLifeGiver("WitchLifeGiver", "Life Giver",
2297 "Effect: Once per day the witch
can, as a full round action, touch a dead creature and bring it back to life. This
functions as resurrection, but it does not require a material component.",
2298
"7924a8779bc442c2b5cfd472f9ba028f",
2299
"272749f543954f77a4180370207e1159",
2300
"34e471a5196247e4b2daecf9bc38c105");
2301 }
2302
2303
2304 static void createEternalSlumber()
2305 {
2306 eternal_slumber = hex_engine.createEternalSlumber("WitchEternalSlumber",
"Eternal Slumber",
2307 "The witch can touch
a creature, causing it to drift off into a permanent slumber.\n"
2308 + "Effect: The
creature receives a Will save to negate this effect. If the save fails, the creature
falls asleep and cannot be woken. The effect can only be removed with a wish or
similar magic, although slaying the witch ends the effect. Whether or not the save
is successful, a creature cannot be the target of this hex again for 1 day.",
2309
"b03f4347c1974e38acff99a2af092461",
2310
"0a2763d71f274a25b053647ea5053b40",
2311
"8e7292d4fb9346a3bc71f653d539d0ca",
2312
"2214659c18824be4af8a662485b6f341");
2313 }
2314
2315
2316 static void createCackle()
2317 {
2318 cackle = hex_engine.createCackle("WitchCackle", "Cackle",
2319 "Effect: A witch can cackle madly as a
move action. Any creature that is within 30 feet that is under the effects of an
agony hex, charm hex, evil eye hex, fortune hex, or misfortune hex caused by the
witch has the duration of that hex extended by 1 round.",
2320 "",
2321 "",
2322 "",
2323 "",
2324 "CreateCackleToggleAbility");
2325 }
2326
2327
2328 static void createExtraHexFeat()
2329 {
2330 var extra_hex_feat_selection = Helpers.CreateFeatureSelection(
"ExtraHexFeat",
2331 "Extra Hex",
2332 "You gain one additional
hex. You must meet the prerequisites for this hex. If you are a shaman, it must be a
hex granted by your spirit rather than one from a wandering spirit.\n"
2333 + "Special: You can take
this feat multiple times. Each time you do, you gain another hex.",
2334
"5d3b5b72afb940d4b9aab740d8925b53",
2335 LoadIcons.Image2Sprite.
Create(@"FeatIcons/Icon_Hex_Extra.png"),
2336 FeatureGroup.Feat,
2337 Helpers.
PrerequisiteClassLevel(witch_class, 1));
2338 extra_hex_feat_selection.AllFeatures = hex_selection.Features;
2339 extra_hex_feat_selection.Features = hex_selection.Features;
2340 extra_hex_feat = extra_hex_feat_selection;
2341 extra_hex_feat.Ranks = 10;
2342 extra_hex_feat.Groups = new FeatureGroup[] { FeatureGroup.Feat };
2343 library.AddFeats(extra_hex_feat);
2344 }
2345
2346
2347
2348 }
2349 }
2350

You might also like