Guest User

Soulknife Script

a guest
Jun 9th, 2018
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var iFileName = "Soulknife.js";
  2.  
  3. ClassList["soulknife"] = {
  4.     regExpSearch : /^(?=.*soul)(?=.*knife).*$/i,
  5.     name : "Soulknife",
  6.     source : ["HB", 0],
  7.     primaryAbility : "\n \u2022 Soulknife: Dexterity and Intelligence;",
  8.     prereqs : "\n \u2022 MyClass: Dexterity and Intelligence 13;",
  9.     die : 8,
  10.     improvements : [0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5],
  11.     saves : ["Dex", "Int"],
  12.     skills : ["\n\n" + toUni("Soulknife") + ": Choose three from Arcana, Athletics, Deception, Insight, Perception, Performance, Sleight of Hand and Stealth.", "\n\n" + toUni("Soulknife") + ": Arcana or Insight"],
  13.     armor : [
  14.         [true, false, false, true],
  15.         [true, false, false, true]
  16.     ],
  17.     weapons : [
  18.         [true, false, ["shortsword"]],
  19.         [true, false, ["shortsword"]]
  20.     ],
  21.     equipment : "Soulknife starting equipment:\n \u2022 studded leather -or- leather armor, a shortbow, and 20 arrows;\n \u2022 A shortsword and a shield -or- two simple melee weapons;\n \u2022 10 darts;\n \u2022 A dungeoneer's pack -or- an explorer's pack.",
  22.     subclasses : ["Soulknife Archetype", ["soul shaper", "seeker"]],
  23.     attacks : [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
  24.     abilitySave : 4,
  25.     features : {
  26.         "mind blade" : {
  27.             name : "Mind Blade",
  28.             source : ["HB", 0],
  29.             minlevel : 1,
  30.             description : desc([
  31.                 "As a bonus action, I can create a mind blade, which is the same as a shortsword, which uses my Intelligence modifier for attacks",
  32.             ]),
  33.             action : ["bonus action", " (create)"],
  34.             eval : "AddWeapon('Mind Blade');",
  35.             removeeval : "RemoveWeapon('Mind Blade');"
  36.         },
  37.         "soul sight" : {
  38.             name : "Soul Sight",
  39.             source : ["HB", 0],
  40.             minlevel : 1,
  41.             description : "\n   " + "I can see the souls of creatures, so long as my vision is not blocked by magical darkness or through large objects or walls thicker than 1 foot. See the Notes page for identifying colors." + "\n   " + "I have advantage on Intelligence (Investigation) checks to discern whether something is an illusion or not." + "\n   " + "As an action, I can sense living creatures within 60 feet of me that aren't behind total cover.",
  42.             extraname : "Soul Sight Colors",
  43.             "soul sight colors" : {
  44.                 name : "Soul Sight Colors",
  45.                 source : ["HB", 0],
  46.                 description : "\n   " + "Aberrations : Dark Purple" + "\n   " + "Beasts : White" + "\n   " + "Celestials: Gold" + "\n   " + "Constructs:  Varies, but is usually either humanoid, aberration, celestial, fiend, elemental or fey." + "\n   " + "Good Dragons: Platinum Silver" + "\n   " + "Evil Dragons:  Deep Red" + "\n   " + "Elementals: Varies dependent on the elemental, but is usually the same color as the elemental itself" + "\n   " + "Fey: Twilight Orange" + "\n   " + "Fiends: Black" + "\n   " + "Giants: Dark Grey" + "\n   " + "Humanoids: Pale blue. It can be lighter or darker, dependent on the humanoids emotions" + "\n   " + "Monstrosities: A mixture of colors." + "\n   " + "Oozes: Usually none, as oozes do not have souls, but if an ooze has one, it is the color of whatever created it" + "\n   " + "Plants: Green" + "\n   " + "Undead: No color, as undead usually do not have souls, but if an undead has one, it is the color of whatever type it was before becoming undead.",
  47.             },
  48.             usages : "Intelligence modifier + 1 per ",
  49.             usagescalc : "event.value = Math.max(1, 1 + What('Int Mod'));",
  50.             recovery : "short rest",
  51.             action : ["action", " (sense creatures)"],
  52.             eval : "ClassFeatureOptions(['soulknife', 'soul sight', 'soul sight colors', 'extra']);",
  53.             removeeval : "ClassFeatureOptions(['soulknife', 'soul sight', 'soul sight colors', 'extra'], 'remove');"
  54.         },
  55.         "psychic strike" : {
  56.             name : "Psychic Strike",
  57.             source : ["HB", 0],
  58.             minlevel : 2,
  59.             description : "\n   " + "Whenever I hit a creature with an attack, I deal extra psychic damage.",
  60.             additional : levels.map(function (n) {
  61.                     if (n < 2) return "";
  62.                     return "+" + (n < 7 ? 1 : n < 12 ? 2 : n < 17 ? 3 : 4) + "d6 psychic damage";
  63.             }),
  64.             calcChanges : {
  65.                 atkAdd : ["if (classes.known.soulknife && classes.known.soulknife.level > 1 && !isSpell) {fields.Description += (fields.Description ? '; ' : '') + (classes.known.soulknife.level < 7 ? 1 : classes.known.soulknife.level < 12 ? 2 : classes.known.soulknife.level < 17 ? 3 : 4) + 'd6 psychic damage'; };", "I can have my weapon attacks that hit do extra psychic damage."]
  66.             }
  67.         },
  68.         "subclassfeature3" : {
  69.             name : "Soulknife Archetype",
  70.             source : ["HB", 0],
  71.             minlevel : 3,
  72.             description : "\n   " + "Choose a Soulknife Archetype you wish to specialize in and put it in the \"Class\" field" + "\n   " + "Choose either Soul Shaper or Seeker",
  73.         },
  74.         "mind blade improvement" : {
  75.             name : "Mind Blade Improvement",
  76.             source : ["HB", 0],
  77.             minlevel : 3,
  78.             description : "\n   " + "My Mind Blades now count as magical for the purpose of overcoming resistances and immunities." + "\n   " + "I can now summon 2 mind blades at the same time, and use both if I so choose.",
  79.             calcChanges : {
  80.                 atkAdd : ["if ((/mind blade/i).test(WeaponName) || (/soul blade/i).test(WeaponName) || (/\\bmind\\b/i).test(WeaponText)) {fields.Description += (fields.Description ? '; ' : '') + 'Counts as magical';}; ", "My mind blades count as magical for overcoming resistances and immunities."]
  81.             },
  82.         },
  83.         "soul weapon" : {
  84.             name: "Soul Weapon",
  85.             source : ["HB", 0],
  86.             minlevel : 5,
  87.             description : "\n   " + "I can fuse one magical weapon into me over a long rest via a 1 hour ritual" + "\n   " + "I can summon it as a bonus action, and am considered proficient with it",
  88.             calcChanges : {
  89.                         atkAdd : ["if (/\\bsoul\\b/i).test(WeaponText) {fields.Proficiency = true; fields.Description += thisWeapon[1] ? '' : (fields.Description ? '; ' : '') + 'Counts as magical'; }; ", "If I include the word 'Soul' in a weapon's name, it gets treated as my Soul Weapon."]
  90.             }
  91.         },
  92.         "enhanced mind blade" : {
  93.             name : "Enhanced Mind Blade",
  94.             source : ["HB", 0],
  95.             minlevel : 5,
  96.             description : "\n   " + "My mind blade and soul weapon get a bonus to attack and damage",
  97.             additional : levels.map(function (n) {
  98.                 if (n < 6) return "";
  99.                 if (n < 11) return "+1 bonus";
  100.                 if (n < 17) return "+2 bonus";
  101.                 return "+3 bonus";
  102.             }),
  103.             calcChanges : {
  104.                 atkCalc : ["if (classes.known.soulknife && class.known.soulknife.level > 6 && ((/mind blade/i).test(WeaponName) || (/soul blade/i).test(WeaponName) || (/\\bsoul\\b/i).test(WeaponText) || (/\\bmind\\b/i).test(WeaponText)) { var soulMag = (classes.known.soulknife.level < 12 ? 1 : classes.known.soulknife.level < 17 ?  2 : 3); output.magic += soulMag; }; ", "I gain a bonus to hit and damage with my mind blades and soul weapon."]
  105.             }
  106.         },
  107.         "speed of thought" : {
  108.             name : "Speed of Thought",
  109.             source : ["HB", 0],
  110.             minlevel : 7,
  111.             description : "\n   " + "I gain a 10 foot bonus to my movement speed" + "\n   " + "My Dexterity saves vs. areas of effect negate damage on success and halve it on failure" + "\n   " + "As a reaction, I halve the damage of an attack from an attacker that I can see",
  112.             action : ["reaction", " (uncanny dodge)"],
  113.             savetxt : { text : ["Dex save vs. area effects: fail \u2015 half dmg, success \u2015 no dmg"] },
  114.             speed : { allmodes : "+10" }
  115.         },
  116.         "psychic assault" : {
  117.             name : "Psychic Assault",
  118.             source : ["HB", 0],
  119.             minlevel : 9,
  120.             description : desc([
  121.                 "I may manifest many blades and throw them at targets within 60 feet, rolling a separate ranged attack roll for each.",
  122.                 "On a hit, the blades deal damage and embed themselves in the target.",
  123.                 "One blade embedded: disadvantage vs. Dex saves, cannot use Dodge action, -10 foot movement speed.",
  124.                 "Two or more blades embedded: automatically fails Dex saves, cannot use Dodge action, cannot move.",
  125.                 "These blades are irremovable, and the effects persist until the end of my next turn."
  126.                 ]),
  127.             usages : "Intelligence modifier per ",
  128.             usagescalc : "event.value = Math.max(1, What('Int Mod'));",
  129.             recovery : "long rest",
  130.             action : ["action", ""]
  131.         },
  132.         "shatter strike" : {
  133.             name : "Shatter Strike",
  134.             source : ["HB", 0],
  135.             minlevel : 9,
  136.             description : "\n   " + "I score a critical hit with my weapon attacks on a roll of 19 and 20" + "\n   " + "I may reroll any damage dice on a weapon attack that results in a 1",
  137.                 calcChanges : {
  138.                     atkAdd : ["if (!isSpell && classes.known.soulknife && classes.known.soulknife.level > 8 && classes.known.soulknife.level < 15 && !CritChance) {var CritChance = 19; fields.Description += (fields.Description ? '; ' : '') + 'Crit on 19-20, can reroll 1's'; }; ", "My weapon attacks score a critical on a to hit roll of both 19 and 20, can reroll 1's"]
  139.             },
  140.         },
  141.         "mind barrier" : {
  142.             name : "Mind Barrier",
  143.             source : ["HB", 0],
  144.             minlevel : 10,
  145.             description : "\n   " + "I am resistant to psychic damage, and have advantage on saves vs. being frightened, charmed, and mind altering/controlling effects",
  146.             savetxt : { adv_vs : ["frightened", "charmed", "mind altering/controlling effects"] },
  147.             dmgres : ["Psychic"]
  148.         },
  149.         "soul sever" : {
  150.             name : "Soul Sever",
  151.             source : ["HB", 0],
  152.             minlevel : 13,
  153.             description : desc ([
  154.                 "As an action, I can choose a creature within 30 feet of me, and force it to make a Wisdom save vs. my ability DC.",
  155.                 "If it fails, it takes 3d10 psychic damage, and has disadvantage on all rolls for 1 minute. The creature can remake the save at the end of each of its turns, ending the effect on a success.",
  156.                 "Each time the creature fails a saving throw vs. this effect, it takes an additional 3d10 psychic damage. Should a creature fail this save twice after the initial failure, it gets advantage on the roll."
  157.             ]),
  158.             usages : "Intelligence modifier + 1 per ",
  159.             usagescalc : "event.value = Math.max(1, 1 + What('Int Mod'));",
  160.             recovery : "long rest",
  161.             action : ["action", ""]
  162.         },
  163.         "phantom knife" : {
  164.             name : "Phantom Knife",
  165.             source : [["HB", 0,],["UA:TMC", 8]],
  166.             minlevel : 14,
  167.             description : desc([
  168.                 "As an action, I can make one attack with my soul knife, treating the target's AC as 10"
  169.             ]),
  170.             action : ["action", ""]
  171.         },
  172.         "knife to the soul" : {
  173.             name : "Knife to the Soul",
  174.             source : ["HB", 0],
  175.             minlevel : 18,
  176.             description : desc([
  177.                 "When I strike a creature with my mind blade, I may choose to not do damage and instead choose either Intelligence, Wisdom or Charisma.",
  178.                 "I then roll 4d6 and subtract the result from the chosen ability score, to a minimum of 0.",
  179.                 "A creature affected by this feature is then immune to subsequent uses of this feature until it takes a long rest, when its ability scores are restored."
  180.                 ]),
  181.             usages : "Intelligence modifier per ",
  182.             usagescalc : "event.value = Math.max(1, What('Int Mod'));",
  183.             recovery : "long rest"
  184.         },
  185.         "mind over body" : {
  186.             name : "Mind Over Body",
  187.             source : ["HB", 0],
  188.             minlevel : 20,
  189.             description : desc([
  190.                 "I no longer age and I have resistance to bludgeoning, piercing, and slashing damage",
  191.                 "I'm immune to effects that cause me to be frightened or charmed, and any mind altering/controlling effects",
  192.                 "If I die, I have a 55% chance of discorporating instead and returning 1d4 days later"
  193.             ]),
  194.             savetxt : { immune : ["frightened", "charmed", "mind altering/controlling effects"] },
  195.             dmgres : ["Bludgeoning", "Piercing", "Slashing"]
  196.         },
  197.     }
  198. };
  199. ClassSubList["soul shaper"] = {
  200.     regExpSearch : /^(?=.*soul)(?=.*shaper).*$/i,
  201.     subname : "Soul Shaper",
  202.     fullname : "Soul Shaper",
  203.     source : ["HB", 0],
  204.     features : {
  205.         "subclassfeature3" : {
  206.             name : "Shape Soul",
  207.             source : ["HB", 0],
  208.             minlevel : 3,
  209.             description : "\n   " + "I can form my mind blade into any non-magical weapon, and use its properties. I am considered proficient with it regardless of its form." + "\n   " + "I can transform two mind blades into a two handed weapon.",
  210.             calcChanges : {
  211.                         atkAdd : ["if (/\\bmind\\b/i).test(WeaponText) {fields.Proficiency = true; fields.Description += thisWeapon[1] ? '' : (fields.Description ? '; ' : '') + 'Counts as magical'; }; ", "If I include the word 'mind' in a weapon's name, it gets treated as a Mind Weapon."]
  212.             }
  213.         },
  214.         "subclassfeature3.1" : {
  215.             name : "Soul Armor",
  216.             source : ["HB", 0],
  217.             minlevel : 3,
  218.             description : "\n   " + "Whilst not wearing armor, my AC is 10 + Dexterity Modifier + Intelligence Modifier. I can use a shield, and still gain this benefit." + "\n   " + "I can turn one of my Mind Blades into a shield. When transformed in this way, it does not get its enhancement bonus.",
  219.             addarmor : "Unarmored Defense (Int)",
  220.         },
  221.         "subclassfeature7" : {
  222.             name : "Soul Shackle",
  223.             source : ["HB", 0],
  224.             minlevel : 7,
  225.             description : desc([
  226.             "I can choose up to four creatures within 30 feet of me as an action, and force them to make Wisdom saving throws.",
  227.             "On a failure, the creatures are shackled to each other and take 5d8 psychic damage. If they are further than 10 feet from each other, they are dragged towards the creature closest to you so that they are within 10 feet of it.",
  228.             "A shackled creature that tries to move more than 10 feet away from any creature that it is shackled to must remake the save, taking 5d8 damage on a failure, and breaking free on a success."
  229.             ]),
  230.         usages : "Half of Intelligence Modifier per ",
  231.         usagescalc : "event.value = Math.max(1, What('Int Mod')/2);",
  232.         recovery : "long rest",
  233.         action : ["action", ""]
  234.         },
  235.         "subclassfeature7.1" : {
  236.             name : "Power of the Soul",
  237.             source : ["HB", 0],
  238.             minlevel : 7,
  239.             description : desc([
  240.                 "When I hit a creature, or as a bonus action on my turn, I can choose to activate one of the following effects."
  241.                 ]),
  242.             usages : "Intelligence Modifier + Proficiency Bonus per ",
  243.             usagescalc : "event.value = Math.max(1, What('Int Mod') + What('Proficiency Bonus'));",
  244.             recovery : "short rest",
  245.             extraname : "Soul Power",
  246.             "flames of hatred" : {
  247.                 name : "Flames of Hatred",
  248.                 source : ["HB", 0],
  249.                 description : "\n   " + "The attack's damage type becomes fire, and the target must make a Dexterity saving throw or be set on fire. The creature takes fire damage at the beginning of its turn, until it or another creature uses its action to douse the flames.",
  250.                 additional : levels.map(function (n) {
  251.                 if (n < 10) return "1d10 fire damage";
  252.                 if (n < 17) return "2d10 fire damage";
  253.                 return "3d10 fire damage";
  254.                 }),
  255.             },
  256.             "calm waters" : {
  257.                 name : "Calm Waters",
  258.                 source : ["HB", 0],
  259.                 description : "\n   " + "The target must make a Wisdom saving throw or be put to sleep. The target reawakens if it takes any damage or another creature uses its action to wake it.",
  260.                 additional : levels.map(function (n) {
  261.                 if (n < 10) return "1 minute";
  262.                 if (n < 17) return "2 minutes";
  263.                 return "3 minutes";
  264.                 }),
  265.             },
  266.             "fury of the gods" : {
  267.                 name : "Fury of the Gods",
  268.                 source : ["HB", 0],
  269.                 description : "\n   " + "The creature must make a Wisdom saving throw or become infuriated." + "\n   " + "An infuriated creature must spend its turn moving towards the closest creature and attack it if possible. A creature affected by this may remake the save at the end of its turn."
  270.             },
  271.             "inferior souls" : {
  272.                 name : "Inferior Souls",
  273.                 source : ["HB", 0],
  274.                 description : "\n   " + "Each creature with fewer total hitdice than you within 30 feet that can see you must make a Wisdom saving throw or become frightened of me until the end of their next turn."
  275.             },
  276.             "baneful Strike" : {
  277.                 name : "Baneful Strike",
  278.                 source : ["HB", 0],
  279.                 description : "\n   " + "The creature must make a Constitution saving throw or drop one item of my choice that it's holding."
  280.             },
  281.             "soul force" : {
  282.                 name : "Soul Force",
  283.                 source : ["HB", 0],
  284.                 description : "\n   " + "A Large or smaller creature must make a Strength saving throw or be pushed back 15 feet and lose its reaction until its next turn."
  285.             },
  286.             "blinding strike" : {
  287.                 name : "Blinding Strike",
  288.                 source : ["HB", 0],
  289.                 description : "\n   " + "The creature must make a Wisdom saving throw or be blinded until the end of my next turn."
  290.             },
  291.             "freedom of will" : {
  292.                 name : "Freedom of Will",
  293.                 source : ["HB", 0],
  294.                 description : "\n   " + "I can end one condition of my choice on yourself or a creature within 30 feet, provided that my target has at least one hit point."
  295.             },
  296.             "spirit command" : {
  297.                 name : "Spirit Command",
  298.                 source : ["HB", 0],
  299.                 description : "\n   " + "I can allow one allied creature within 30 feet of me to move up to half its movement speed, and use its reaction to take either the Attack or Dodge action."
  300.             },
  301.             "warp strike" : {
  302.                 name : "Freedom of Will",
  303.                 source : ["HB", 0],
  304.                 description : "\n   " + "I can choose to teleport to a space up to 30 feet away that is within 5 feet of another creature."
  305.             },
  306.             eval : "ClassFeatureOptions(['soulknife', 'power of the soul', 'flames of hatred', 'extra']); ClassFeatureOptions(['soulknife', 'power of the soul', 'calm waters', 'extra']); ClassFeatureOptions(['soulknife', 'power of the soul', 'fury of the gods', 'extra']); ClassFeatureOptions(['soulknife', 'power of the soul', 'inferior souls', 'extra']); ClassFeatureOptions(['soulknife', 'power of the soul', 'freedom of will', 'extra']); ClassFeatureOptions(['soulknife', 'power of the soul', 'spirit command', 'extra']); ClassFeatureOptions(['soulknife', 'power of the soul', 'baneful strike', 'extra']); ClassFeatureOptions(['soulknife', 'power of the soul', 'soul force', 'extra']);  ClassFeatureOptions(['soulknife', 'power of the soul', 'blinding strike', 'extra']); ClassFeatureOptions(['soulknife', 'power of the soul', 'warp strike', 'extra']);",
  307.             removeeval : "ClassFeatureOptions(['soulknife', 'power of the soul', 'flames of hatred', 'extra'], 'remove'); ClassFeatureOptions(['soulknife', 'power of the soul', 'calm waters', 'extra'], 'remove'); ClassFeatureOptions(['soulknife', 'power of the soul', 'fury of the gods', 'extra'], 'remove'); ClassFeatureOptions(['soulknife', 'power of the soul', 'inferior souls', 'extra'], 'remove'); ClassFeatureOptions(['soulknife', 'power of the soul', 'freedom of will', 'extra'], 'remove'); ClassFeatureOptions(['soulknife', 'power of the soul', 'spirit command', 'extra'], 'remove'); ClassFeatureOptions(['soulknife', 'power of the soul', 'baneful strike', 'extra'], 'remove'); ClassFeatureOptions(['soulknife', 'power of the soul', 'soul force', 'extra'], 'remove');  ClassFeatureOptions(['soulknife', 'power of the soul', 'blinding strike', 'extra'], 'remove'); ClassFeatureOptions(['soulknife', 'power of the soul', 'warp strike', 'extra'], 'remove');"
  308.         },
  309.         "subclassfeature11" : {
  310.             name : "Soul Barrier",
  311.             source : ["HB", 0],
  312.             description : desc([
  313.                 "I can create a 40 ft by 20 ft line that prevents anything with a soul from crossing.",
  314.                 "Each creature with a soul that tries must make an Intelligence saving throw or take 8d6 + Int modifier psychic damage and be bounced back on a failed save, or half damage and are allowed to cross on a successful one.",
  315.                 "This barrier lasts for 1 minute, and is invisible to creatures without soul sight."
  316.             ]),
  317.             usages : 1,
  318.             recovery : "long rest",
  319.             action : ["action", ""]
  320.         },
  321.         "subclassfeature17" : {
  322.             name : "Soul Crush",
  323.             source : ["HB", 0],
  324.             description : "\n   " + "As an action, I may force a creature within 5 feet of me to make an Intelligence saving throw." + "\n   " + "On a failed save, it loses all personality traits and its alignment. If it was hostile, it is no longer. If it was a spirit or ethereal creature, it is immediately destroyed.",
  325.             usages : "Intelligence modifier per ",
  326.             usagescalc : "event.value = Math.max(1, What('Int Mod'));",
  327.             recovery : "long rest",
  328.             action : ["action", ""]
  329.         },
  330.     },
  331. };
  332. ClassSubList["seeker"] = {
  333.     regExpSearch : /^(?=.*seeker).*$/i,
  334.     subname : "Seeker",
  335.     fullname : "Seeker",
  336.     source : ["HB", 0],
  337.     abilitySave : 4,
  338.     spellcastingFactor : 3,
  339.     spellcastingList : {
  340.         class : "druid",
  341.         level : [0, 4] 
  342.     },
  343.     spellcastingTable : [
  344.         [0, 0, 0, 0, 0, 0, 0, 0, 0], //lvl 0
  345.         [0, 0, 0, 0, 0, 0, 0, 0, 0], //lvl 1
  346.         [0, 0, 0, 0, 0, 0, 0, 0, 0], //lvl 2
  347.         [2, 0, 0, 0, 0, 0, 0, 0, 0], //lvl 3
  348.         [3, 0, 0, 0, 0, 0, 0, 0, 0], //lvl 4
  349.         [3, 0, 0, 0, 0, 0, 0, 0, 0], //lvl 5
  350.         [3, 0, 0, 0, 0, 0, 0, 0, 0], //lvl 6
  351.         [4, 2, 0, 0, 0, 0, 0, 0, 0], //lvl 7
  352.         [4, 2, 0, 0, 0, 0, 0, 0, 0], //lvl 8
  353.         [4, 2, 0, 0, 0, 0, 0, 0, 0], //lvl 9
  354.         [4, 3, 0, 0, 0, 0, 0, 0, 0], //lvl10
  355.         [4, 3, 0, 0, 0, 0, 0, 0, 0], //lvl11
  356.         [4, 3, 0, 0, 0, 0, 0, 0, 0], //lvl12
  357.         [4, 3, 2, 0, 0, 0, 0, 0, 0], //lvl13
  358.         [4, 3, 2, 0, 0, 0, 0, 0, 0], //lvl14
  359.         [4, 3, 2, 0, 0, 0, 0, 0, 0], //lvl15
  360.         [4, 3, 3, 0, 0, 0, 0, 0, 0], //lvl16
  361.         [4, 3, 3, 0, 0, 0, 0, 0, 0], //lvl17
  362.         [4, 3, 3, 0, 0, 0, 0, 0, 0], //lvl18
  363.         [4, 3, 3, 1, 0, 0, 0, 0, 0], //lvl19
  364.         [4, 3, 3, 1, 0, 0, 0, 0, 0] //lvl20
  365.     ],
  366.     spellcastingKnown : {
  367.         cantrips : [0, 0, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],
  368.         spells : [0, 0, 3, 4, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 10, 11, 11, 11, 12, 13]
  369.     },
  370.     features : {
  371.         "subclassfeature3" : {
  372.             name : "Spellcasting",
  373.             source : ["HB", 0],
  374.             minlevel : 3,
  375.             description : "\n   " + "I can cast known druid cantrips/spells, using Intelligence as my spellcasting ability",
  376.             additional : ["2 cantrips known", "2 cantrips known", "2 cantrips \u0026 3 spells known", "3 cantrips \u0026 4 spells known", "3 cantrips \u0026 4 spells known", "3 cantrips \u0026 4 spells known", "3 cantrips \u0026 5 spells known", "2 cantrips \u0026 6 spells known", "3 cantrips \u0026 6 spells known", "4 cantrips \u0026 7 spells known", "4 cantrips \u0026 8 spells known", "4 cantrips \u0026 8 spells known", "4 cantrips \u0026 9 spells known", "4 cantrips \u0026 10 spells known", "4 cantrips \u0026 10 spells known", "4 cantrips \u0026 11 spells known", "3 cantrips \u0026 11 spells known", "4 cantrips \u0026 11 spells known", "4 cantrips \u0026 12 spells known", "4 cantrips \u0026 13 spells known"]
  377.         },
  378.         "subclassfeature3.1" : {
  379.             name : "Spiritbond",
  380.             source : ["HB", 0],
  381.             minlevel : 3,
  382.             description : "\n   " + "I gain proficiency in Nature and Survival, and my proficiency bonus is doubled for checks that use either of those skills.",
  383.             skillstxt : "\n\n" + toUni("Seeker (Spiritbond)") + ": Nature and Survival proficiency and expertise",
  384.             eval : "AddSkillProf('Nature', true, true); AddSkillProf('Survival', true, true);",
  385.             removeeval : "AddSkillProf('Nature', false, true); AddSkillProf('Survival', false, true);"
  386.         },
  387.         "subclassfeature3.2" : {
  388.             name : "Inevitable Shot",
  389.             source : ["HB", 0],
  390.             minlevel : 3,
  391.             description : "\n   " + "The range at which you can throw a mind blade doubles, and each Soulknife feature (no spells) that has a range less than 60 feet has its range increased to 60 feet." + "\n   " + "Additionally, when you miss a ranged attack, you can choose to make a ranged attack with advantage against a creature within 60 feet of the original target.",
  392.             usages : "Intelligence Modifier + Proficiency Bonus per ",
  393.             usagescalc : "event.value = Math.max(1, What('Int Mod') + What('Proficiency Bonus'));",
  394.             recovery : "long rest",
  395.             eval : "RemoveWeapon('Mind Blade');AddWeapon('Soul Blade');",
  396.             removeeval : "RemoveWeapon('Soul Blade');AddWeapon('Mind Blade')"
  397.         },
  398.         "subclassfeature7" : {
  399.             name : "Primal Spirit",
  400.             source : ["HB", 0],
  401.             minlevel : 7,
  402.             description : "\n   " + "I can add my Intelligence modifier to Perception and Insight checks I make.",
  403.             addMod : { type : "skill", field : ["Insight", "Perception"], mod : "Int", text : "I add my Intelligence Modifier to Insight and Perception checks I make." }
  404.         },
  405.         "subclass7.1" : {
  406.             name : "Primal Awareness",
  407.             source : ["HB", 0],
  408.             minlevel : 7,
  409.             description : "\n   " + "I can add my Intelligence modifier to my initiative." + "\n   " + "When I throw a Mind Blade, I can call it back to me (no action required)" + "\n   " + "The damage of my Mind Blade increases.",
  410.             additional : levels.map(function (n) {
  411.                     if (n < 7) return "1d6";
  412.                     if (n < 13) return "1d8";
  413.                     if (n < 19) return "1d10";
  414.                     return "1d12";
  415.             }),
  416.             addMod : { type : "skill", field : "Init", mod : "Int", text : "I can add my Intelligence Modifier to my Initiative." },
  417.             calcChanges : {
  418.                     atkAdd : ["var soulDie = function(n) {return n < 7 ? 6 : n < 13 ? 8 : n < 19 ? 10 : 12;}; if (classes.known.soulknife && classes.known.soulknife.level && theWea && (/soul blade/i).test(theWea.Name)) {var aSoulDie = soulDie(classes.known.soulknife.level); try {var curDie = eval(fields.Damage_Die.replace('d', '*'));} catch (e) {var curDie = 'x';}; if (isNaN(curDie) || curDie < aSoulDie) {fields.Damage_Die = '1d' + aSoulDie;};}; ", "The damage of my Mind Blade increases as I gain levels in this class."]
  419.             }
  420.         },
  421.         "subclassfeature11" : {
  422.             name : "Primal Smite",
  423.             source : ["HB", 0],
  424.             minlevel : 11,
  425.             description : "\n   " + "At the beginning of my turn, I can choose to imbue my attacks with primal energies." + "\n   " + "When I hit a creature with a ranged attack on my turn after using this ability, the target's speed is reduced to 0 ft, and attack rolls from allies against the target have advantage until the end of my next turn.",
  426.             usages : "Intelligence Modifier + Proficiency Bonus per ",
  427.             usagescalc : "event.value = Math.max(1, What('Int Mod') + What('Proficiency Bonus'));",
  428.             recovery : "short rest"
  429.         },
  430.         "subclassfeature17" : {
  431.             name : "Spiritual Assault",
  432.             source : ["HB", 0],
  433.             minlevel : 17,
  434.             description : "[Intelligence Modifier to attack and damage rolls]" + "\n   " + "If I move at least 15 feet from my starting position in a turn, I can add my Intelligence modifier to attack and damage rolls I make during that turn." + "\n   " + "I can make a ranged weapon attack instead of a melee one when making an opportunity attack." + "\n   " + "My ranged attacks against a target within 5 feet of me do not have disadvantage."
  435.         },
  436.     }
  437. };
  438.  
  439. WeaponsList["mind blade"] = {
  440.     regExpSearch : /^(?=.*mind)(?=.*blade).*$/i,
  441.     name : "Mind Blade",
  442.     source : ["HB", 0],
  443.     list : "melee",
  444.     ability : 4,
  445.     type : "Simple",
  446.     damage : [1, 6, "piercing"],
  447.     range : "Melee, 30/60 ft",
  448.     weight : 0,
  449.     description : "Thrown, finesse, light",
  450.     monkweapon : false,
  451.     abilitytodamage : true
  452. };
  453.  
  454. WeaponsList["soul blade"] = {
  455.     regExpSearch : /^(?=.*soul)(?=.*blade).*$/i,
  456.     name : "Soul Blade",
  457.     source : ["HB", 0],
  458.     list : "melee",
  459.     ability : 4,
  460.     type : "Simple",
  461.     damage : [1, 6, "piercing"],
  462.     range : "Melee, 60/120 ft",
  463.     weight : 0,
  464.     description : "Thrown, finesse, light",
  465.     monkweapon : false,
  466.     abilitytodamage : true
  467. };
Advertisement
Add Comment
Please, Sign In to add comment