asoulliard

magus - paladin variant JS

Jan 17th, 2024
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.54 KB | None | 0 0
  1. var iFileName = "Magus [Paladin Variant].js";
  2. RequiredSheetVersion("13.0.6");
  3.  
  4. SourceList["AA:SM"] = {
  5. name : "Magus",
  6. abbreviation : "AA:SM",
  7. group : "Magus",
  8. url : "https://www.dmsguild.com/product/194217/Battlemage-Class",
  9. date : "2019/06/17"
  10. };
  11.  
  12. ClassList.wizard.regExpSearch = /wizard/i;
  13.  
  14. //first make the sheet know which spells are magus spells
  15. [//level 1
  16. "absorb elements","bane","command","compelled duel","comprehend languages","disguise self","dissonant whispers","faerie fire","find familiar","ice knife","mage armor","protection from evil and good","searing smite","shield","thunderous smite","wrathful smite",
  17. //level 2
  18. "blindness/deafness","branding smite","darkness","find steed","mind spike","mirror image","phantasmal force","silence","tasha's mind whip","warding bond","zone of truth",
  19. //level 3
  20. "blinding smite","counterspell","daylight","dispel magic","feign death","hunger of hadar","major image","sleet storm","slow","speak with dead","spirit shroud",
  21. //level 4
  22. "dimension door","find greater steed","greater invisibility","locate creature","phantasmal killer","raulothim's psychic lance","staggering smite",
  23. //level 5
  24. "animate objects", "cloudkill", "cone of cold", "far step", "immolation", "skill empowerment", "steel wind strike", "telekinesis", "teleportation circle"
  25. ].forEach(function (magusSpells) {
  26. if (SpellsList[magusSpells]) SpellsList[magusSpells].classes.push("magus");
  27. });
  28.  
  29. ClassList["magus"] = {
  30. regExpSearch : /^((?=.*magus)|((?=.*(exalted|sacred|holy|divine))(?=.*(knight|fighter|warrior|warlord|trooper)))).*$/i,
  31. name : "Magus",
  32. source : [["SRD", 30], ["P", 82]],
  33. primaryAbility : "Strength and Intelligence",
  34. abilitySave : 6,
  35. prereqs : "Strength 13 and Intelligence 13",
  36. improvements : [0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5],
  37. die : 10,
  38. saves : ["Wis", "Int"],
  39. skillstxt : {
  40. primary : "Choose two from Athletics, Insight, Intimidation, Medicine, Persuasion, and Religion"
  41. },
  42. armorProfs : {
  43. primary : [true, true, true, true],
  44. secondary : [true, true, false, true]
  45. },
  46. weaponProfs : {
  47. primary : [true, true],
  48. secondary : [true, true]
  49. },
  50. equipment : "Magus starting equipment:" +
  51. "\n \u2022 A martial weapon and a shield -or- two martial weapons;" +
  52. "\n \u2022 Five javelins -or- any simple melee weapon;" +
  53. "\n \u2022 A priest's pack -or- an explorer's pack;" +
  54. "\n \u2022 Chain mail and a holy symbol." +
  55. "\n\nAlternatively, choose 5d4 \xD7 10 gp worth of starting equipment instead of both the class' and the background's starting equipment.",
  56. subclasses : ["Sacred Oath", []],
  57. attacks : [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
  58. abilitySave : 4,
  59. spellcastingFactor : 2,
  60. spellcastingKnown : {
  61. spells : "list",
  62. prepared : true
  63. },
  64. features : {
  65. "arcane sight" : {
  66. name : "Arcane Sight",
  67. source : [["SRD", 30], ["P", 84]],
  68. minlevel : 1,
  69. description : desc([
  70. "I can cast detect magic as a ritual. Additionally, as an action, I can touch a creature",
  71. "or object and cast identify without requiring any components. I can cast it this way a",
  72. "number of times equal to my Int mod. When I finish a long rest, I regain all expended uses"
  73. ]),
  74. usages : "Intelligence modifier per ",
  75. usagescalc : "event.value = What('Int Mod');",
  76. recovery : "long rest",
  77. spellcastingBonus : [{
  78. name : "Detect Magic",
  79. spells : ["detect magic"],
  80. selection : ["detect magic"],
  81. firstCol : "(R)"
  82. }, {
  83. name : "Identify",
  84. spells : ["identify"],
  85. selection : ["identify"]
  86. }],
  87. spellChanges : {
  88. "detect magic" : {
  89. time : "10 min",
  90. changes : "I can cast this spell only as a ritual."
  91. },
  92. "identify" : {
  93. time : "10 min",
  94. changes : "I don't require spell slots or material components to cast this."
  95. }
  96. },
  97. action : ["action", ""]
  98. },
  99. "touch of magic" : {
  100. name : "Touch of Magic",
  101. source : [["SRD", 31], ["P", 84]],
  102. minlevel : 1,
  103. description : desc([
  104. "As an action, I can touch a creature and spend up to my Int mod. They gain 5 temp hp per use.",
  105. "At any point, they can give up remaining temp hp to get a bonus to an attack, check, or save",
  106. "equal to the uses spent."
  107. ]),
  108. usages : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
  109. recovery : "long rest",
  110. action : ["action", ""]
  111. },
  112. "fighting style" : {
  113. name : "Fighting Style",
  114. source : [["SRD", 31], ["P", 84]],
  115. minlevel : 2,
  116. description : desc('Choose a Fighting Style for the Magus using the "Choose Feature" button above'),
  117. choices : ["Defense", "Dueling", "Great Weapon Fighting", "Protection"],
  118. "defense" : FightingStyles.defense,
  119. "dueling" : FightingStyles.dueling,
  120. "great weapon fighting" : FightingStyles.great_weapon,
  121. "protection" : FightingStyles.protection
  122. },
  123. "spellcasting" : {
  124. name : "Spellcasting",
  125. source : [["SRD", 31], ["P", 84]],
  126. minlevel : 2,
  127. description : desc([
  128. "I can cast prepared Magus spells, using Intelligence as my spellcasting ability",
  129. "I can use an arcane focus as a spellcasting focus for my Magus spells"
  130. ])
  131. },
  132. "elemental smite" : {
  133. name : "Elemental Smite",
  134. source : [["SRD", 31], ["P", 85]],
  135. minlevel : 2,
  136. description : desc([
  137. "When I hit a melee weapon attack, I can expend a spell slot to do +2d8 radiant damage",
  138. "This damage must be of a type dealt by a leveled Magus spell I have prepared"
  139. ])
  140. },
  141. "subclassfeature3.0-channel arcana" : {
  142. name : "Channel Arcana",
  143. source : [["SRD", 32], ["P", 85]],
  144. minlevel : 3,
  145. description : "",
  146. usages : 1,
  147. recovery : "short rest"
  148. },
  149. "subclassfeature3" : {
  150. name : "Sacred Oath",
  151. source : [["SRD", 32], ["P", 85]],
  152. minlevel : 3,
  153. description : desc('Choose a Sacred Oath you swear to and put it in the "Class" field ')
  154. },
  155. "knowledge arcana" : {
  156. name : "Knowledge Arcana",
  157. source : [["SRD", 32], ["P", 85]],
  158. minlevel : 3,
  159. description : desc("I have advantage on Arcana checks to reveal info about something I see.")
  160. },
  161. "aura of protection" : {
  162. name : "Aura of Protection",
  163. source : [["SRD", 32], ["P", 85]],
  164. minlevel : 6,
  165. description : desc("While I'm conscious, allies within range and I can add my Int mod (min 1) to saves"),
  166. additional : ["", "", "", "", "", "10-foot aura", "10-foot aura", "10-foot aura", "10-foot aura", "10-foot aura", "10-foot aura", "10-foot aura", "10-foot aura", "10-foot aura", "10-foot aura", "10-foot aura", "10-foot aura", "30-foot aura", "30-foot aura", "30-foot aura"],
  167. addMod : { type : "save", field : "all", mod : "max(Int|1)", text : "While I'm conscious I can add my Int modifier (min 1) to all my saving throws." }
  168. },
  169. "aura of courage" : {
  170. name : "Aura of Courage",
  171. source : [["SRD", 32], ["P", 85]],
  172. minlevel : 10,
  173. description : desc("While I'm conscious, allies within range and I can't be frightened"),
  174. additional : ["", "", "", "", "", "", "", "", "", "10-foot aura", "10-foot aura", "10-foot aura", "10-foot aura", "10-foot aura", "10-foot aura", "10-foot aura", "10-foot aura", "30-foot aura", "30-foot aura", "30-foot aura"],
  175. savetxt : { immune : ["frightened"] }
  176. },
  177. "improved arcane smite" : {
  178. name : "Improved Arcane Smite",
  179. source : [["SRD", 32], ["P", 85]],
  180. minlevel : 11,
  181. description : desc(["Whenever I hit a creature with a melee weapon, I do an extra 1d8 damage",
  182. "This damage must be of a type dealt by a leveled Magus spell I have prepared"]),
  183. calcChanges : {
  184. atkAdd : [
  185. function (fields, v) {
  186. if (v.isMeleeWeapon) fields.Description += (fields.Description ? '; ' : '') + '+1d8 damage';
  187. },
  188. "With my melee weapon attacks I deal an extra 1d8 damage."
  189. ]
  190. }
  191. },
  192. "cleansing touch" : {
  193. name : "Cleansing Touch",
  194. source : [["SRD", 32], ["P", 85]],
  195. minlevel : 14,
  196. description : desc("As an action, I can end one spell on me or another willing creature by touch"),
  197. usages : "Intelligence modifier per ",
  198. usagescalc : "event.value = Math.max(1, What('Int Mod'));",
  199. recovery : "long rest",
  200. action : ["action", ""]
  201. }
  202. }
  203. };
  204.  
  205. AddSubClass("magus", "oath of conquest", {
  206. regExpSearch : /^((?=.*(knight tyrant|iron mongers))|((?=.*(conquest|tyranny|tyrant))(((?=.*Magus)|((?=.*(exalted|sacred|holy|divine))(?=.*(knight|fighter|warrior|warlord|trooper))))))).*$/i,
  207. subname : "Oath of Conquest",
  208. source : [["X", 37]],
  209. features : {
  210. "subclassfeature3" : {
  211. name : "Form of Dread",
  212. source : [["VRGtR", 30]],
  213. minlevel : 3,
  214. description : desc([
  215. "As a bonus action, I can transform for 1 minute and gain the following benefits:",
  216. " \u2022 Once per turns when I hit an attack, I can force the target to make a Wis save",
  217. " If the target fails this save, it is frightened of me until the end of my next turn"
  218. ]),
  219. action : [["bonus action", ""]],
  220. spellcastingExtra : ["armor of agathys", "command", "hold person", "spiritual weapon", "bestow curse", "fear", "dominate beast", "stoneskin", "cloudkill", "dominate person"]
  221. },
  222. "subclassfeature3.1" : {
  223. name : "Channel Divinity: Guided Strike",
  224. source : [["X", 38]],
  225. minlevel : 3,
  226. description : "\n " + "When I make an attack roll, I can add a +10 bonus to the roll after seeing the d20 roll"
  227. },
  228. "subclassfeature7" : {
  229. name : "Aura of Conquest",
  230. source : [["X", 38]],
  231. minlevel : 7,
  232. description : desc([
  233. "Creatures that are frightened of me have their speed reduced to 0 while in my aura",
  234. "They also take psychic damage whenever they start theirs turn within my aura"
  235. ]),
  236. additional : levels.map(function (n) {
  237. if (n < 7) return "";
  238. return (n < 18 ? 10 : 30) + "-foot aura; " + Math.floor(n / 2) + " psychic damage";
  239. })
  240. },
  241. "subclassfeature15" : {
  242. name : "Scornful Rebuke",
  243. source : [["X", 38]],
  244. minlevel : 15,
  245. description : desc([
  246. "Whenever I'm hit with an attack while I'm not incapacitated, the attacker takes damage",
  247. "This is psychic damage equal to my Intelligence modifier (minimum of 1)"
  248. ])
  249. },
  250. "subclassfeature20" : {
  251. name : "Invincible Conqueror",
  252. source : [["X", 38]],
  253. minlevel : 20,
  254. description : desc([
  255. "As an action, I can gain the following benefits for 1 minute:",
  256. " - I have resistance to all damage",
  257. " - I can make an additional attack as part of my Attack action",
  258. " - My melee weapons score critical hits on a roll of 19 or 20"
  259. ]),
  260. recovery : "long rest",
  261. usages : 1,
  262. action : ["action", ""]
  263. }
  264. }
  265. });
  266.  
  267. AddFightingStyle(["magus"], "Arcane Warrior", {
  268. name : "Arcane Warrior Fighting Style",
  269. source : [["T", 52], ["UA:CFV", 6]],
  270. description : desc([
  271. "I learn two wizard cantrips that count as magus spells for me and use Int for spellcasting",
  272. "Whenever I gain a magus level, I can swap one of these for another wizard cantrip"
  273. ]),
  274. spellcastingBonus : {
  275. name : "Arcane Warrior",
  276. "class" : "wizard",
  277. level : [0, 0],
  278. times : 2
  279. }
  280. });
  281.  
  282. AddFightingStyle(["magus"], "Blind Fighting", {
  283. name : "Blind Fighting Style",
  284. source : [["T", 41]],
  285. description : desc([
  286. "I have blindsight with 10 ft range, allowing me to see anything not behind total cover",
  287. "In range, I can see invisible, but not hidden, things, even when blinded or in darkness"
  288. ]),
  289. vision : [["Blindsight", 10]]
  290. });
  291. AddFightingStyle(["magus"], "Interception", {
  292. name : "Interception Fighting Style",
  293. source : [["T", 41], ["UA:CFV", 12]],
  294. description : desc([
  295. "As a reaction when a creature I can see hits another within 5 ft of me, I can intercept",
  296. "I reduce the damage the target takes by 1d10 + my Proficiency Bonus (min 0 damage)",
  297. "I can't be the target and it requires me wielding a shield or a simple or martial weapon"
  298. ]),
  299. action : [["reaction", ""]]
  300. });
  301.  
  302. AddFeatureChoice(ClassList.magus.features["subclassfeature3.0-channel arcana"], true, "Harness Arcane Power", {
  303. name : "Channel Arcana: Harness Arcane Power",
  304. extraname : "Optional Magus 3",
  305. source : [["T", 52]],
  306. description : desc([
  307. "As a bonus action, I can expend a use of my channel arcana to regain one used spell slot",
  308. "The level of this spell slot can be no more than half my Proficiency Bonus (rounded up)",
  309. "I can only do this so many times per long rest, even if I have uses of channel divinity left"
  310. ]),
  311. action : [["bonus action", ""]],
  312. usages : levels.map(function(n) {
  313. return n < 3 ? "" : n < 7 ? 1 : n < 15 ? 2 : 3;
  314. }),
  315. recovery : "long rest"
  316. }, "Optional 3rd-level magus features");
Add Comment
Please, Sign In to add comment