master 22c03d18558f cached
142 files
13.9 MB
3.7M tokens
8 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (14,623K chars total). Download the full file to get everything.
Repository: safety-orange/Imports-for-MPMB-s-Character-Sheet
Branch: master
Commit: 22c03d18558f
Files: 142
Total size: 13.9 MB

Directory structure:
gitextract_021fw7i8/

├── .github/
│   └── workflows/
│       └── main.yml
├── .gitignore
├── Homebrew/
│   └── reddit_20180203_Tome-of-Monstrous-Races.js
├── README.md
├── WotC 2024/
│   ├── not-reprinted_20140819_PHB.js
│   ├── not-reprinted_20201117_TCoE.js
│   ├── pub_20240917_PHB.js
│   └── pub_20250218_MM.js
├── WotC material/
│   ├── all_WotC_pub+UA.js
│   ├── all_WotC_published.js
│   ├── all_WotC_unearthed_arcana.js
│   ├── ps_20160427_Zendikar.js
│   ├── ps_20160712_Innistrad.js
│   ├── ps_20170216_Kaladesh.js
│   ├── ps_20170705_Amonkhet.js
│   ├── ps_20180109_Ixalan.js
│   ├── ps_20180731_Dominaria.js
│   ├── pub_20140715_LMoP.js
│   ├── pub_20140818_PHB.js
│   ├── pub_20140819_HotDQ+20141104_RoT.js
│   ├── pub_20140930_MM.js
│   ├── pub_20141209_DMG.js
│   ├── pub_20150407_PotA.js
│   ├── pub_20150415_AL-EE.js
│   ├── pub_20150416_EE.js
│   ├── pub_20150714_AL-RoD.js
│   ├── pub_20150915_OotA.js
│   ├── pub_20151103_SCAG.js
│   ├── pub_20160315_CoS.js
│   ├── pub_20160906_SKT.js
│   ├── pub_20161115_VGtM.js
│   ├── pub_20170404_TftYP.js
│   ├── pub_20170915_Tortle.js
│   ├── pub_20170919_ToA.js
│   ├── pub_20171011_Grung.js
│   ├── pub_20171121_XGtE.js
│   ├── pub_20180529_MToF.js
│   ├── pub_20180723_WGtE_dupl.js
│   ├── pub_20180918_WDH.js
│   ├── pub_20181107_LLoK.js
│   ├── pub_20181120_GGtR.js
│   ├── pub_20181120_WDotMM.js
│   ├── pub_20190521_GoS.js
│   ├── pub_20190618_AcqInc.js
│   ├── pub_20190903_DnDEK_dupl.js
│   ├── pub_20190917_DiA.js
│   ├── pub_20190919_LR.js
│   ├── pub_20191112_AWM.js
│   ├── pub_20191119_ERftLW.js
│   ├── pub_20200317_EGtW.js
│   ├── pub_20200721_MOT.js
│   ├── pub_20200915_RotF.js
│   ├── pub_20201117-2_TCoE-sidekicks.js
│   ├── pub_20201117_TCoE.js
│   ├── pub_20210316_CM.js
│   ├── pub_20210518_VRGtR.js
│   ├── pub_20210921_WBtW.js
│   ├── pub_20211019_FToD.js
│   ├── pub_20211207_SCC.js
│   ├── pub_20220125_MotM.js
│   ├── pub_20220315_CotN.js
│   ├── pub_20220816_Spelljammer.js
│   ├── pub_20221206_Dragonlance.js
│   ├── pub_20230221_KftGV.js
│   ├── pub_20230815_GotG.js
│   ├── pub_20230919_PaBTSO.js
│   ├── pub_20231017_Planescape.js
│   ├── pub_20231030_CoA.js
│   ├── pub_20231114_BoMT.js
│   ├── pub_20240521_VEoR.js
│   ├── pub_20240716_QftIS.js
│   ├── pub_al_20190917_ALPG-v9.1.js
│   ├── ua_20150202_Eberron.js
│   ├── ua_20150406_Modifying-Classes.js
│   ├── ua_20150504_Waterborne-Adventures.js
│   ├── ua_20150803_Modern-Magic.js
│   ├── ua_20150909_Ranger.js
│   ├── ua_20151005_Prestige Classes and Rune Magic.js
│   ├── ua_20151102_Light,-Dark,-Underdark!.js
│   ├── ua_20151217_That-Old-Black-Magic.js
│   ├── ua_20160104_Kits-of-Old.js
│   ├── ua_20160404_Gothic-Heroes.js
│   ├── ua_20160606_Feats.js
│   ├── ua_20160801_The-Faithful.js
│   ├── ua_20160912_The-Ranger,-Revised.js
│   ├── ua_20161107_Barbarian-Primal-Paths.js
│   ├── ua_20161114_Bard-Colleges.js
│   ├── ua_20161121_Cleric-Divine-Domains.js
│   ├── ua_20161128_Druid-Circles.js
│   ├── ua_20161205_Fighter-Martial-Archetypes.js
│   ├── ua_20161212_Monk-Monastic-Traditions.js
│   ├── ua_20161219_Paladin-Sacred-Oaths.js
│   ├── ua_20170109_Artificer_dupl.js
│   ├── ua_20170116_Ranger-and-Rogue.js
│   ├── ua_20170206_Sorcerous-Origins.js
│   ├── ua_20170213_Warlock-and-Wizard.js
│   ├── ua_20170313_The-Mystic-Class.js
│   ├── ua_20170320_Wizard-Revisited.js
│   ├── ua_20170327_A-Trio-of-Subclasses.js
│   ├── ua_20170403_Starter-Spells.js
│   ├── ua_20170417_Feats-for-Skills.js
│   ├── ua_20170424_Feats-for-Races.js
│   ├── ua_20170501_Revised-Subclasses.js
│   ├── ua_20170605_Revised-Class-Options.js
│   ├── ua_20170911_Eladrin-and-Gith.js
│   ├── ua_20171009_Fiendish-Options.js
│   ├── ua_20171113_Elf-Subraces.js
│   ├── ua_20180108_Three-Subclasses.js
│   ├── ua_20180409_Order-Domain.js
│   ├── ua_20180514_Centaur-and-Minotaur.js
│   ├── ua_20180611_Giant-Soul-Sorcerer.js
│   ├── ua_20180723_Races-of-Eberron.js
│   ├── ua_20180810_Magic-Items-of-Eberron.js
│   ├── ua_20180813_Races-of-Ravnica.js
│   ├── ua_20180910_Dragonmarks.js
│   ├── ua_20190228_Artificer_dupl.js
│   ├── ua_20190514_Artificer_dupl.js
│   ├── ua_20190815_Barbarian-and-Monk.js
│   ├── ua_20190905_Sorcerer-and-Warlock.js
│   ├── ua_20190918_Bard-and-Paladin.js
│   ├── ua_20191003_Cleric-Druid-and-Wizard.js
│   ├── ua_20191017_Fighter-Ranger-and-Rogue.js
│   ├── ua_20191104_Class-Feature-Variants.js
│   ├── ua_20191125_Fighter-Rogue-and-Wizard.js
│   ├── ua_20200114_Subclasses-Part-1.js
│   ├── ua_20200206_Subclasses-Part-2.js
│   ├── ua_20200224_Subclasses-Part-3.js
│   ├── ua_20200512_Subclasses-Revisited.js
│   ├── ua_20200713_Feats-2020.js
│   ├── ua_20200805_Subclasses-Part-4.js
│   ├── ua_20201026_Subclasses-Part-5.js
│   ├── ua_20210126_Gothic-Lineages.js
│   ├── ua_20210311_Folk-of-the-Feywild.js
│   ├── ua_20210414_Draconic-Options.js
│   ├── ua_20211008_Travelers-of-the-Multiverse.js
│   ├── ua_20220308_Heroes-of-Krynn.js
│   ├── ua_20220425_Heroes-of-Krynn-Revisited.js
│   ├── ua_20220523_Giant-Options.js
│   ├── ua_20220718_Wonders-of-the-Multiverse.js
│   └── wip_excluded-magic-items.js
├── gulpfile.js
└── package.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/workflows/main.yml
================================================
name: Release Creation

on:
  release:
    types: [published]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4.1.6

      # Run minify
      # - uses: actions/setup-node@v4.0.2
      #   with:
      #     node-version: '20'
      # - run: npm install
      # - run: npm run minify

      # Update the GitHub release with the manifest and module archive files.
      - name: Update Release with Files
        id: create_version_release
        uses: ncipollo/release-action@v1
        with:
          allowUpdates: true
          name: ${{ github.event.release.name }}
          draft: ${{ github.event.release.unpublished }}
          prerelease: ${{ github.event.release.prerelease }}
          token: ${{ secrets.GITHUB_TOKEN }}
          artifacts: "./WotC material/all_WotC_*.js"
          tag: ${{ github.event.release.tag_name }}
          body: ${{ github.event.release.body }}


================================================
FILE: .gitignore
================================================
node_modules/
debug.log

================================================
FILE: Homebrew/reddit_20180203_Tome-of-Monstrous-Races.js
================================================
/*	-WHAT IS THIS?-
	This file adds optional material to "MPMB's Character Record Sheet" found at https://flapkan.com/mpmb/charsheets
	Import this file using the "Add Extra Materials" bookmark.

	-KEEP IN MIND-
	It is recommended to enter the code in a fresh sheet before adding any other information (i.e. before making your character with it).
*/

/*	-INFORMATION-
	Subject:	Race: Gnoll
	Effect:		This script adds the Gnoll race from the Tome of Monstrous Races by /u/revlid on /r/UnearthedArcana (https://redd.it/7uzdvb)
				This homebrew was created by revlid and is available here: http://homebrewery.naturalcrit.com/share/S1x4kCFv-
	Code by:	/u/sea__ (edits by /u/safety-orange)
	Date:		2018-02-12 (sheet v12.999)
*/

var iFileName = "Tome of Monstrous Races: Gnoll [revlid's work, transcribed by /u/sea__].js";
RequiredSheetVersion(12.999);

SourceList["ToMR"] = {
	name : "/u/revlid's Tome of Monstrous Races",
	abbreviation : "ToMR",
	group : "Reddit/r/UnearthedArcana",
	url : "http://homebrewery.naturalcrit.com/share/S1x4kCFv-",
	date : "2018/02/03"
};

RaceList["gnoll-cult"] = {
	regExpSearch : /^(?=.*gnoll)(?=.*cult).*$/i,
	name : "Cult Gnoll",
	sortname : "Gnoll, Cult",
	source : ["ToMR", 8],
	plural : "Gnolls",
	size : 3,
	speed : { walk : { spd : 30, enc : 20 } },
	languageProfs : ["Common", "Abyssal"],
	weapons: ["gnoll bite"],
	vision : [["Darkvision", 60]],
	age : " rarely live longer than 30 years, but mature to adulthood in their first few years, and show no signs of age until a sudden collapse in their last year of life.",
	height : " normally stand between 7 and 8 feet tall, even in their characteristic hunched posture.",
	weight : " weigh around 300 pounds.",
	savetxt : { immune : ["disease"] },
	skills : ["Intimidation"],
	improvements : "Cult Gnoll: +1 Strength, +2 Constitution;",
	scores : [1, 0, 2, 0, 0, 0],
	features : {
		"carrion eater" : {
			name : "Carrion Eater",
			minlevel : 1,
			usages : 1,
			recovery : "long rest",
			tooltip : ""
		},
		"rampage" : {
			name : "Rampage",
			minlevel : 1,
			action : ["bonus action",""],
			tooltip : ""
		}
	},
	trait : "Cult Gnoll (+1 Strength, +2 Constitution)\nBite: I can bite for 1d6 piercing damage instead of using unarmed strikes.\nCarrion Eater: Once per long rest, I can feed on a corpse during a short rest. At the end of the rest, I regain HP equal to the consumed creature's HD + my Constitution modifier.\nRampage: As a bonus action when I reduce a creature to 0 HP with a melee attack on my turn, I can move up to half my speed and make a bite attack."
};

RaceList["gnoll-spotted"] = {
	regExpSearch : /^(?=.*gnoll)(?=.*spotted).*$/i,
	name : "Spotted Gnoll",
	sortname : "Gnoll, Spotted",
	source : ["ToMR", 8],
	plural : "Gnolls",
	size : 3,
	speed : { walk : { spd : 30, enc : 20 } },
	languageProfs : ["Common", "Abyssal", 1],
	weapons: ["gnoll bite"],
	vision : [["Darkvision", 60]],
	age : " rarely live longer than 30 years, but mature to adulthood in their first few years, and show no signs of age until a sudden collapse in their last year of life.",
	height : " normally stand between 7 and 8 feet tall, even in their characteristic hunched posture.",
	weight : " weigh around 300 pounds.",
	savetxt : { immune : ["disease"] },
	skills : ["Intimidation", "Deception"],
	improvements : "Spotted Gnoll: +2 Constitution, +1 Charisma;",
	scores : [0, 0, 2, 0, 0, 1],
	spellcastingAbility : 6,
	features : {
		"carrion eater" : {
			name : "Carrion Eater",
			minlevel : 1,
			usages : 1,
			recovery : "long rest",
			tooltip : ""
		},
		"butchers lure" : {
			name : "Butcher's Lure",
			minlevel : 1,
			action : ["action",""],
			tooltip : ", and can only be used to create illusory sounds",
			spellcastingBonus : {
				name : "Butcher's Lure",
				spells : ["minor illusion"],
				selection : ["minor illusion"]
			}
		}
	},
	trait : "Spotted Gnoll (+2 Constitution, +1 Charisma)\nBite: I can bite for 1d6 piercing damage instead of using unarmed strikes.\nCarrion Eater: Once per long rest, I can feed on a corpse during a short rest. At the end of the rest, I regain HP equal to the consumed creature's HD + my Constitution modifier.\nButcher's Lure: I know the Minor Illusion cantrip and can cast it without components. I can only use it to create illusory sounds, but others have disadvantage on checks to determine they are illusions. Charisma is my spellcasting ability for this."
};

RaceList["gnoll-tearer"] = {
	regExpSearch : /^(?=.*gnoll)(?=.*tearer).*$/i,
	name : "Tearer Gnoll",
	sortname : "Gnoll, Tearer",
	source : ["ToMR", 8],
	plural : "Gnolls",
	size : 3,
	speed : { walk : { spd : 35, enc : 25 } },
	languageProfs : ["Common", "Abyssal"],
	weapons: ["gnoll tearer bite"],
	vision : [["Darkvision", 60]],
	age : " rarely live longer than 30 years, but mature to adulthood in their first few years, and show no signs of age until a sudden collapse in their last year of life.",
	height : " normally stand between 7 and 8 feet tall, even in their characteristic hunched posture.",
	weight : " weigh around 300 pounds.",
	savetxt : { immune : ["disease"] },
	skills : ["Intimidation"],
	improvements : "Tearer Gnoll: +1 Dexterity, +2 Constitution;",
	scores : [0, 1, 2, 0, 0, 0],
	features : {
		"carrion eater" : {
			name : "Carrion Eater",
			minlevel : 1,
			usages : 1,
			recovery : "long rest",
			tooltip : ""
		}
	},
	trait : "Tearer Gnoll (+1 Dexterity, +2 Constitution)\nBite: I can bite for 1d6 piercing damage instead of using unarmed strikes. This bite attack is treated as a finesse weapon and as a light weapon for the purpose of two-weapon fighting.\nCarrion Eater: Once per long rest, I can feed on a corpse during a short rest. At the end of the rest, I regain HP equal to the consumed creature's HD + my Constitution modifier."
};

WeaponsList["gnoll bite"] = {
	regExpSearch : /^(?=.*gnoll)(?=.*bite).*$/i,
	name : "Bite (Gnoll)",
	source : ["ToMR", 9],
	list : "melee",
	ability : 1,
	type : "Natural",
	damage : [1, 6, "piercing"],
	range : "Melee",
	description : "",
	abilitytodamage : true
};

WeaponsList["gnoll tearer bite"] = {
	regExpSearch : /^(?=.*gnoll)(?=.*bite)(?=.*tearer).*$/i,
	name : "Bite (Gnoll, Tearer)",
	source : ["ToMR", 9],
	list : "melee",
	ability : 2,
	type : "Natural",
	damage : [1, 6, "piercing"],
	range : "Melee",
	description : "Finesse, Light",
	abilitytodamage : true
};

================================================
FILE: README.md
================================================
# Imports for MPMB's Character Sheet
This git repository holds different fan-created materials that can be used with **MorePurpleMoreBetter's D&D 5e Character Record Sheet**. The repository for the sheet is [found on MPMB's GitHub](https://github.com/morepurplemorebetter/MPMBs-Character-Record-Sheet).

You can get the sheet for free on [MPMB's website](https://www.flapkan.com/#download).

 

## Join the discussion
Questions or remarks are best made on the MPMB [Discord server](https://discord.gg/P6drkuk9bt) or the [subreddit](https://www.reddit.com/r/mpmb/).

 

## How to use
To get all the non-duplicate WotC content, all you need is the **all_WotC** files from a [release](../../releases). Be aware that the files above might be for a version of MPMB's that is still under development.

1. Download the latest version of the PDF from [MPMB's website](https://www.flapkan.com/#download).
2. [Click here](https://github.com/safety-orange/Imports-for-MPMB-s-Character-Sheet/releases/latest/download/all_WotC_pub+UA.min.js) to download the latest all_WotC_pub+UA.min.js release, and save it somewhere on your machine.
3. Open the PDF and click on the bookmark **Functions** >> **Add Extra Materials**.
4. From the menu that appears, select the option **Import a file with additional material**.
5. In the dialog that opens, click **Add file**, and open the file you saved in step 1.
6. Click **Apply changes** in the Import Files dialog and the sheet will process the file you added. You will get a pop-up message if it was successful or not.

MPMB has a more flashy explanation, along with a video, on how to do this in [this how-to guide on his website](https://www.flapkan.com/how-to/add-more-content).

 

## Different Versions
The code above is under development, [see releases](../../releases) for the latest stable build. It is updated along with the development of MPMB's Character Record Sheet and thus might be ahead of the latest stable version of MPMB's.

In [releases](../../releases) you can find the files for the latest version of MPMB's Character Record Sheet as well as for older versions (v13.1.13 or later).

If you are looking for versions before v13.1.13, see [tags](../../releases).

Be aware that this content is for the 5th edition of Dungeon & Dragons (2014).

 

## Concatenation and Minification

### Setup
Ensure you have `node` and `npm` installed, then:
```sh
npm install
```

### Use
To minify run one of these three commands:
```sh
# For all (stable and beta)
npm run minify
# Just stable
npm run minifyStable
# Just beta
npm run minifyBeta
```

================================================
FILE: WotC 2024/not-reprinted_20140819_PHB.js
================================================
var iFileName = "not-reprinted_20140819_PHB.js";
RequiredSheetVersion("24.0.5-beta");
// This file adds options from the 2014 Player's Handbook to MPMB's Character Record Sheet that have not been replaced with new options in the 2024 Player's Handbook

// Define the source
SourceList["P"] = {
	name: "2014 Player's Handbook",
	abbreviation: "PHB'14",
	abbreviationSpellsheet: "P",
	group: "Legacy Sources",
	url: "https://dnd.wizards.com/products/rpg_playershandbook",
	date: "2014/08/19",
	defaultExcluded: true,
};

// Races
RaceList["half-elf"] = {
	regExpSearch: /^(?=.*half)(?=.*(elf|elv|drow|silvanesti|qualinesti|grugach|kagonesti)).*$/i,
	name: "Half-elf",
	source: [["SRD", 6], ["P", 39]],
	plural: "Half-elves",
	size: 3,
	speed: {
		walk: { spd: 30, enc: 20 },
	},
	languageProfs: ["Common", "Elvish", 1],
	vision: [["Darkvision", 60]],
	savetxt: {
		text: ["Magic can't put me to sleep"],
		adv_vs: ["charmed"],
	},
	skillstxt: "Choose any two skills",
	age: " reach adulthood around age 20 and often live over 180 years",
	height: " range from 5 to 6 feet tall (4'9\" + 2d8\")",
	weight: " weigh around 155 lb (110 + 2d8 \xD7 2d4 lb)",
	heightMetric: " range from 1,5 to 1,8 metres tall (145 + 5d8 cm)",
	weightMetric: " weigh around 70 kg (50 + 5d8 \xD7 4d4 / 10 kg)",
	scorestxt: "+2 Charisma and +1 to two other ability scores of my choice",
	trait: "Half-Elf"+
	"\n##\u25C6 Fey Ancestry##. I have Advantage on saving throws against being charmed, and magic can't put me to sleep."+
	"\n##\u25C6 Skill Versatility##. I gain proficiency in two skills of my choice.",
};
RaceList["half-orc"] = {
	regExpSearch: /^(?=.*half)(?=.*\bor(c|k)).*$/i,
	name: "Half-orc",
	source: [["SRD", 7], ["P", 41]],
	plural: "Half-orcs",
	size: 3,
	speed: {
		walk: { spd: 30, enc: 20 },
	},
	languageProfs: ["Common", "Orc"],
	vision: [["Darkvision", 60]],
	skills: ["Intimidation"],
	age: " reach adulthood around age 14 and rarely live longer than 75 years",
	height: " range from 5 to well over 6 feet tall (4'10\" + 2d10\")",
	weight: " weigh around 215 lb (140 + 2d10 \xD7 2d6 lb)",
	heightMetric: " range from 1,5 to well over 1,8 metres tall (150 + 5d10 cm)",
	weightMetric: " weigh around 100 kg (65 + 5d10 \xD7 4d6 / 10 kg)",
	features: {
		"relentless endurance": {
			name: "Relentless Endurance",
			minlevel: 1,
			usages: 1,
			recovery: "long rest",
		},
		"savage attacks": {
			name: "Savage Attacks",
			minlevel: 1,
			calcChanges: {
				atkAdd: [
					function (fields, v) {
						if (v.isMeleeWeapon && (/d\d+/).test(fields.Damage_Die)) {
							if (v.extraCritM) {
								v.extraCritM += 1;
								var extraCritRegex = /\d+(d\d+ extra on a crit(ical)?( hit)? in melee)/i;
								fields.Description = fields.Description.replace(extraCritRegex, v.extraCritM + '$1');
							} else {
								v.extraCritM = 1;
								fields.Description += (fields.Description ? '; ' : '') + v.extraCritM + fields.Damage_Die.replace(/.*(d\d+).*/, '$1') + ' extra on a crit in melee';
							};
						};
					},
					"My melee weapon attacks roll 1 additional dice on a critical hit.",
					900,
				],
			},
		},
	},
	trait: "Half-Orc"+
	"\n##\u25C6 Relentless Endurance##. When I am reduced to 0 hit points but not killed outright, I can drop to 1 hit point instead. I can't use this feature again until I finish a Long Rest."+
	"\n##\u25C6 Savage Attacks##. When I score a critical hit with a melee weapon attack, I can roll one of the weapon's damage dice one additional time and add it to the extra damage of the critical hit.",
};

// Eldritch Invocations
AddWarlockInvocation("Beast Speech", {
	name: "Beast Speech",
	source: [["SRD", 48], ["P", 110]],
	description: desc("I can cast Speak with Animals without using a spell slot."),
	spellcastingBonus: [{
		name: "Beast Speech",
		spells: ["speak with animals"],
		selection: ["speak with animals"],
		firstCol: "atwill",
	}],
});
AddWarlockInvocation("Beguiling Influence", {
	name: "Beguiling Influence",
	source: [["SRD", 48], ["P", 110]],
	description: desc("I gain proficiencies with the Deception and Persuasion skills."),
	skills: ["Deception", "Persuasion"],
});
AddWarlockInvocation("Bewitching Whispers (req: lvl 7+)", {
	name: "Bewitching Whispers",
	source: [["SRD", 48], ["P", 110]],
	minlevel: 7,
	submenu: "[Warlock level  7+]",
	description: desc("Once per Long Rest, I can cast Compulsion using a Pact Magic spell slot."),
	spellcastingBonus : [{
		name: "Bewitching Whispers",
		spells: ["compulsion"],
		selection: ["compulsion"],
		firstCol: "oncelr",
	}],
});
AddWarlockInvocation("Book of Ancient Secrets (req: Pact of the Tome)", {
	name: "Book of Ancient Secrets",
	description: desc("My Book of Shadows is inscribed with two 1st-level Ritual spells of my choice. When I come across other Ritual spell, I can inscribe them as well. I can cast these inscribed spells as Rituals, they are not automatically prepared. (Select only these inscribed spells in the 'Spells' column.)"),
	source: [["SRD", 48], ["P", 110]],
	submenu: "[improves Pact of the Tome]",
	prereqeval: function(v) { return v.choiceActive.indexOf('pact of the tome') !== -1; },
	eval: function() {
		var oSpells = CurrentSpells['warlock-book of shadows'];
		if (!oSpells) return;
		// Change into a "book" caster that has access to ritual spells from any level
		oSpells.known.spells = "book";
		oSpells.typeSp = "book";
		oSpells.typeList = 2;
		oSpells.list.level = [0, 9];
		// Make it so that all cantrips are always displayed
		oSpells.known.cantripsPrepare = true;
		oSpells.preparedCantrips = true;
		// Add it so that all 1st-level ritual spells are always displayed
		oSpells.extra = CreateSpellList({ritual: true, level : [1, 1]});
		oSpells.extraSpecial = true;
		SetStringifieds('spells'); CurrentUpdates.types.push('spells');
		// cleanup old versions of this invocation
		if (CurrentSpells['warlock-book of ancient secrets'] || CurrentSpells['book of ancient secrets']) {
			var oSpellsOld = CurrentSpells['book of ancient secrets'] ? CurrentSpells['book of ancient secrets'] : CurrentSpells['warlock-book of ancient secrets'];
			if (oSpellsOld.selectSp) oSpells.selectSp = oSpellsOld.selectSp;
			if (oSpellsOld.offsetBo) oSpells.offsetBo = oSpellsOld.offsetBo;
			if (oSpellsOld.selectBo) oSpells.selectBo = oSpellsOld.selectBo;
			delete CurrentSpells['warlock-book of ancient secrets'];
			delete CurrentSpells['book of ancient secrets'];
		};
	},
	removeeval: function() {
		if (CurrentSpells['book of ancient secrets']) delete CurrentSpells['book of ancient secrets'];
		var oSpells = CurrentSpells['warlock-book of shadows'];
		if (!oSpells) return;
		oSpells.known.spells = "list";
		oSpells.typeSp = "list";
		oSpells.list.level = [0, 1];
		delete oSpells.known.cantripsPrepare;
		delete oSpells.preparedCantrips;
		delete oSpells.extra;
		delete oSpells.extraSpecial;
		SetStringifieds('spells'); CurrentUpdates.types.push('spells');
	},
	calcChanges: {
		spellAdd: [
			function (spellKey, spellObj, spName) {
				if (spName !== "warlock-book of shadows") return;
				var oSpells = CurrentSpells[spName];
				if (oSpells.selectSp.indexOf(spellKey)) {
					spellObj.firstCol = SpellRitualTag;
					if (!(/.*(\d+ ?h\b|special|see b).*/i).test(spellObj.time)) {
						var numMinutes = Number(spellObj.time.replace(/(\d+) ?min.*/, "$1"));
						if (isNaN(numMinutes)) numMinutes = 0;
						spellObj.time = (numMinutes + 10) + " min";
					};
					return true;
				};
			},
			"By the Book of Ancient Secrets invocation, I can cast any Ritual spells I've added to my Book of Shadows, but only as a Ritual. Ritual spell always have a casting time of 10 minutes or more. The sheet assumes any Ritual spells above 1st-level are manual additions.",
		],
	},
});
AddWarlockInvocation("Chains of Carceri (req: lvl 15+, Pact of the Chain)", {
	name : "Chains of Carceri",
	source : [["SRD", 49], ["P", 110]],
	minlevel: 15,
	submenu: ["[Warlock level 15+]", "[improves Pact of the Chain]"],
	prereqeval: function(v) { return v.choiceActive.indexOf('pact of the chain') !== -1; },
	description: desc("I can cast Hold Monster without expending a spell slot or material components, but only on a Celestial, Fiend, or Elemental. I can only target a specific individual once per Long Rest."),
	spellcastingBonus: [{
		name: "Chains of Carceri",
		spells: ["hold monster"],
		selection: ["hold monster"],
		firstCol: "atwill",
	}],
	spellChanges: {
		"hold monster": {
			components: "V,S",
			compMaterial: "",
			description: "1 Celestial, Fiend, or Elemental, save or paralyzed; extra save at end of each turn",
			changes: "With the Chains of Carceri invocation I can cast Hold Monster without a material component, but only on a Celestial, Fiend, or Elemental.",
		},
	},
});
AddWarlockInvocation("Dreadful Word (req: lvl 7+)", {
	name: "Dreadful Word",
	source: [["SRD", 49], ["P", 110]],
	minlevel: 7,
	submenu: "[Warlock level  7+]",
	description: desc("Once per Long Rest, I can cast Confusion using a Pact Magic spell slot."),
	spellcastingBonus: [{
		name: "Dreadful Word",
		spells: ["confusion"],
		selection: ["confusion"],
		firstCol: "oncelr",
	}],
});
AddWarlockInvocation("Eldritch Sight", {
	name: "Eldritch Sight",
	source: [["SRD", 49], ["P", 110]],
	description: desc("I can cast Detect Magic without expending a spell slot."),
	spellcastingBonus: [{
		name: "Eldritch Sight",
		spells: ["detect magic"],
		selection: ["detect magic"],
		firstCol: "atwill",
	}],
});
AddWarlockInvocation("Eyes of the Rune Keeper", {
	name: "Eyes of the Rune Keeper",
	source: [["SRD", 49], ["P", 111]],
	description: " [I can read all writing]",
});
AddWarlockInvocation("Minions of Chaos", {
	name: "Minions of Chaos",
	source: [["SRD", 49], ["P", 111]],
	minlevel: 9,
	submenu: "[Warlock level  9+]",
	description: desc("Once per Long Rest, I can cast Conjure Elemental using a Pact Magic spell slot."),
	spellcastingBonus: [{
		name: "Minions of Chaos",
		spells: ["conjure elemental"],
		selection: ["conjure elemental"],
		firstCol: "oncelr",
	}],
});
AddWarlockInvocation("Mire the Mind", {
	name: "Mire the Mind",
	source: [["SRD", 49], ["P", 111]],
	minlevel: 5,
	submenu: "[Warlock level  5+]",
	description: desc("Once per Long Rest, I can cast Slow using a Pact Magic spell slot."),
	spellcastingBonus: [{
		name: "Mire the Mind",
		spells: ["slow"],
		selection: ["slow"],
		firstCol: "oncelr",
	}],
});
AddWarlockInvocation("Sculptor of Flesh", {
	name: "Sculptor of Flesh",
	source: [["SRD", 50], ["P", 111]],
	minlevel: 7,
	submenu: "[Warlock level  7+]",
	description: desc("Once per Long Rest, I can cast Polymorph using a Pact Magic spell slot."),
	spellcastingBonus: [{
		name: "Sculptor of Flesh",
		spells: ["polymorph"],
		selection: ["polymorph"],
		firstCol: "oncelr",
	}],
});
AddWarlockInvocation("Sign of Ill Omen", {
	name: "Sign of Ill Omen",
	source: [["SRD", 50], ["P", 111]],
	minlevel: 5,
	submenu: "[Warlock level  5+]",
	description: desc("Once per Long Rest, I can cast Bestow Curse using a Pact Magic spell slot."),
	spellcastingBonus: [{
		name: "Sign of Ill Omen",
		spells: ["bestow curse"],
		selection: ["bestow curse"],
		firstCol: "oncelr",
	}],
});
AddWarlockInvocation("Thief of Five Fates", {
	name: "Thief of Five Fates",
	source: [["SRD", 50], ["P", 111]],
	description: desc("Once per Long Rest, I can cast Bane using a Pact Magic spell slot."),
	spellcastingBonus: [{
		name: "Thief of Five Fates",
		spells: ["bane"],
		selection: ["bane"],
		firstCol: "oncelr",
	}],
});
AddWarlockInvocation("Voice of the Chain Master", {
	name : "Voice of the Chain Master",
	source: [["SRD", 50], ["P", 111]],
	submenu: "[improves Pact of the Chain]",
	prereqeval: function(v) { return v.choiceActive.indexOf('pact of the chain') !== -1; },
	description: desc("While on the same plane as my familiar, I can communicate telepathically with it and I can perceive through its senses. While doing the latter, I can speak through it with my voice."),
});

// Subclasses
AddSubClass("wizard", "necromancy", {
	regExpSearch: /necromancy|necromancer|necromantic/i,
	subname: "School of Necromancy",
	subnameShort: "Necromancy",
	fullname: "Necromancer",
	source: [["P", 118]],
	features: {
		"subclassfeature3" : {
			name: "Necromancy Savant",
			source: [["P", 118]],
			minlevel: 3,
			description: desc("I halve the gp and time needed to copy necromancy spells into my spellbook"),
		},
		"subclassfeature3.1": {
			name: "Grim Harvest",
			source: [["P", 118]],
			minlevel: 3,
			description: desc([
				"Once per turn, when I kill something with a 1st-level or higher spell, I regain hit points",
				"The number of hit points regained is 2\xD7 the spell's level (or 3\xD7 with necromancy spells)",
				"This doesn't occur for constructs/undead",
			]),
		},
		"subclassfeature6": {
			name: "Undead Thralls",
			source: [["P", 119]],
			minlevel: 6,
			description: desc([
				"I add Animate Dead to my spellbook and can have an additional target when casting it",
				"Undead created by my necromancy spells have the following benefits:",
				"They add my proficiency bonus to damage and my wizard level to their HP maximums",
			]),
			spellcastingBonus: [{
				name: "Undead Thralls",
				spells: ["animate dead"],
				selection: ["animate dead"],
			}],
			spellChanges: {
				"animate dead": {
					description: "Turn corpses into 2+2/SL Skeletons or Zombies; control for 24h; Bns command within 60 ft",
					changes: "My Undead Thralls class feature allows me to animate one more corpse than normal with Animate Dead.",
				},
			},
		},
		"subclassfeature10": {
			name: "Inured to Undead",
			source: [["P", 119]],
			minlevel: 10,
			description: desc("I have resistance to necrotic damage and my hit point maximum can't be reduced"),
			dmgres: ["Necrotic"],
		},
		"subclassfeature14": {
			name: "Command Undead",
			source: [["P", 11]],
			minlevel: 14,
			description: desc([
				"As an action, an undead within 60 ft that I can see must make a Charisma save",
				"If its Int is > 7, it has adv. on the save; If its Int is > 11, it repeats the save every hour",
				"If failed, it becomes friendly to me and obeys my commands until I use this on another",
				"On success, it becomes permanently immune to my further attempts",
			]),
			action: [["action", ""]],
		},
	},
});
CompanionList["undead_thrall"] = {
	name: "Undead Thralls",
	nameOrigin: "School of Necromancy 6",
	nameMenu : "Undead Thrall (School of Necromancy feature)",
	source: [["P", 119]],
	includeCheck: function(sCrea, objCrea, iCreaCR, bIsAL) {
		return /undead/i.test(objCrea.type);
	},
	attributesChange: function(sCrea, objCrea) {
		objCrea.hp += classes.known.wizard ? classes.known.wizard.level : classes.totallevel;
		if (!objCrea.attacks) return;
		objCrea.attacks = objCrea.attacks.map(function(oAtk) {
			if (oAtk.abilitytodamage !== false && !oAtk.dc) {
				if (!oAtk.modifiers) {
					oAtk.modifiers = ["", "oProf"];
				} else {
					oAtk.modifiers[1] += "+oProf";
				}
			}
			return oAtk;
		});
	},
	calcChanges: {
		hp: function (totalHD, HDobj, prefix) {
			if (classes.known.wizard) {
				return [classes.known.wizard.level, "Undead Thralls (wizard level)"];
			} else {
				return [classes.totallevel, "Undead Thralls (character level)"];
			}
		},
	},
	notes: [{
		name: "Undead I create with a necromancy spell",
		description: "add my wizard level to their hit point maximum and add my proficiency bonus to their weapon damage rolls.",
		joinString: " ",
	}],
	eval: function(prefix, lvl) {
		// Set HP to use average value, so that the level bonus is automatically included
		var sHPfld = prefix + "Comp.Use.HP.Max";
		var aHPsets = How(sHPfld).split(",");
		aHPsets[3] = "average";
		AddTooltip(sHPfld, undefined, aHPsets.toString());
	},
};

// Background Features
BackgroundFeatureList["shelter of the faithful"] = { // from Acolyte
	description: "I command the respect of those who share my faith. I can perform the religious ceremonies of my faith. My companions and I can expect free healing and care at an establishment of my faith, though I must provide any material components needed for spells. Those who share my religion will support me at a modest lifestyle.",
	source: [["SRD", 61], ["P", 127]],
};
BackgroundFeatureList["false identity"] = { // from Charlatan
	description: "I have created a second identity that includes documentation, established acquaintances, and disguises that allow me to assume that persona. Additionally, I can forge documents, including official papers and personal letters, as long as I have seen an example of the kind of document or the handwriting I am trying to copy.",
	source: [["P", 128]],
};
BackgroundFeatureList["criminal contact"] = { // from Criminal
	description: "I have a reliable and trustworthy contact who acts as my liaison to a network of other criminals. I know how to get messages to and from my contact, even over great distances; specifically, I know the local messengers, corrupt caravan masters, and seedy sailors who can deliver my messages.",
	source: [["P", 129]],
};
BackgroundFeatureList["by popular demand"] = { // from Entertainer
	description: "I can always find a place to perform (inn/tavern/circus/etc.), where I receive free lodging and food of a modest or comfortable standard, as long as I perform each night. In addition, my performance makes me something of a local figure. When strangers recognize me in a town where I have performed, they typically take a liking to me.",
	source: [["P", 130]],
};
BackgroundFeatureList["are you entertained?"] = { // from Gladiator
	description: "I can always find a place to perform (arena/pit fight), where I receive free lodging and food of a modest or comfortable standard, as long as I perform each night. In addition, my performance makes me something of a local figure. When strangers recognize me in a town where I have performed, they typically take a liking to me.",
	source: [["P", 131]],
};
BackgroundFeatureList["rustic hospitality"] = { // from Folk Hero
	description: "Since I come from the ranks of the common folk, I fit in among them with ease. I can find a place to hide, rest, or recuperate among other commoners, unless I have shown myself to be a danger to them. They will shield me from the law or anyone else searching for me, though they will not risk their lives for me.",
	source: [["P", 131]],
};
BackgroundFeatureList["guild membership"] = { // from Guild Artisan
	description: "5 gp membership fees per month: The guild offers lodging if possible. In case of being accused of a crime, the guild will support me if a good case can be made for my innocence or the crime is justifiable. I can also gain access to powerful political figures through the guild, as long as I'm in good standing and the guild is paid enough.",
	source: [["P", 133]],
};
BackgroundFeatureList["discovery"] = { // from Hermit
	description: "The quiet seclusion of my extended hermitage gave me access to a unique and powerful discovery. The exact nature of this revelation depends on the nature of my seclusion. It might be a great truth, a hidden site, a long forgotten fact, or unearthed some relic of the past that could rewrite history.",
	source: [["P", 134]],
};
BackgroundFeatureList["position of privilege"] = { // from Noble
	description: "I am welcome in high society, and people assume I have the right to be wherever I am. The common folk make every effort to accommodate me and avoid my displeasure, and other people of high birth treat me as a member of the same social sphere. I can secure an audience with a local noble if I need to.",
	source: [["P", 135]],
};
BackgroundFeatureList["retainers"] = { // from Knight
	description: "I have the service of three retainers loyal to my family, one of whom is another noble and my squire. My other retainers are commoners who can perform mundane tasks for me, but they do not fight for me, will not follow me into obviously dangerous areas (such as dungeons), and will leave if they are frequently endangered or abused.",
	source: [["P", 136]],
};
BackgroundFeatureList["wanderer"] = { // from Outlander
	description: "I have an excellent memory for maps and geography, and I can always recall the general layout of terrain, settlements, and other features around me. In addition, I can find food and fresh water for myself and up to five other people each day, provided that the land offers berries, small game, water, and so forth.",
	source: [["P", 136]],
};
BackgroundFeatureList["researcher"] = { // from Researcher
	description: "When I attempt to learn or recall a piece of lore, if I do not know that information, I often know where and from whom I can obtain it. Usually, this information comes from a library, scriptorium, university, or a sage or other learned person or creature. Unearthing the deepest secrets of the multiverse can require an adventure or even a whole campaign.",
	source: [["P", 138]],
};
BackgroundFeatureList["ship's passage"] = { // from Sailor
	description: "When I need to, I can secure free passage on a sailing ship for myself and my companions. I might sail on the ship I served on, or another ship I have good relations with. Because I'm calling in a favor, I can't be certain of a schedule or route that will meet my every need. My companions and I are expected to assist the crew during the voyage.",
	source: [["P", 139]],
};
BackgroundFeatureList["bad reputation"] = { // from Pirate
	description: "No matter where I go, people are afraid of me due to my reputation. When I am in a civilized settlement, I can get away with minor criminal offenses, such as refusing to pay for food at a tavern or breaking down doors at a local shop, since most people will not report my activity to the authorities.",
	source: [["P", 139]],
};
BackgroundFeatureList["military rank"] = { // from Soldier
	description: "I have a military rank from my career as a soldier. Soldiers loyal to my former military organization still recognize my authority and influence. I can invoke my rank to influence soldiers and temporarily requisition simple equipment or horses. I can usually gain access to friendly military encampments and fortresses where my rank is recognized.",
	source: [["P", 140]],
};
BackgroundFeatureList["city secrets"] = { // from Urchin
	description: "I know the secret patterns and flow to cities and can find passages through the urban sprawl that others would miss. When I am not in combat, I (and companions I lead) can travel between any two locations in the city twice as fast as my speed would normally allow.",
	source: [["P", 141]],
};

// Feats
FeatsList["dungeon delver"] = {
	name: "Dungeon Delver",
	source: [["P", 166]],
	description: "I have adv. on Wis (Perception) and Int (Investigation) checks made to detect the presence of secret doors. I have resistance to damage dealt by traps and advantage on saves to avoid or resist traps. Travelling at a fast pace doesn't impose -5 on my passive Perception.",
	descriptionFull: [
		"Alert to the hidden traps and secret doors found in many dungeons, you gain the following benefits:",
		" \u2022 You have advantage on Wisdom (Perception) and Intelligence (Investigation) checks made to detect the presence of secret doors.",
		" \u2022 You have advantage on saving throws made to avoid or resist traps.",
		" \u2022 You have resistance to the damage dealt by traps.",
		" \u2022 Traveling at a fast pace doesn't impose the normal -5 penalty on your passive Wisdom (Perception) score.",
	],
	dmgres: ["Traps"],
	savetxt: { adv_vs: ["traps"] },
	vision: [
		["Adv. on Perception and Investigation for secret doors", 0],
		["No -5 for travelling at fast pace", 0],
	],
};
FeatsList["linguist"] = {
	name: "Linguist",
	source: [["P", 167]],
	description: "",
	calculate: "event.value = \"I can ably create written ciphers that others can't decipher unless I teach them, they succeed on an Intelligence check DC \" + (Number(What('Int')) + Number(How('Proficiency Bonus'))) + ' (Intelligence score + proficiency bonus), or they use magic to decipher it. I learn three languages of my choice. [+1 Intelligence]';",
	descriptionFull: [
		"You have studied languages and codes, gaining the following benefits:",
		" \u2022 Increase your Intelligence score by 1, to a maximum of 20.",
		" \u2022 You learn three languages of your choice.",
		" \u2022 You can ably create written ciphers. Others can't decipher a code you create unless you teach them, they succeed on an Intelligence check (DC equal to your Intelligence score + your proficiency bonus), or they use magic to decipher it.",
	],
	scores: [0, 0, 0, 1, 0, 0],
	languageProfs: [3],
};
FeatsList["martial adept"] = {
	name: "Martial Adept",
	source: [["P", 168]],
	description: "",
	calculate: "event.value = 'I learn two maneuvers of my choice from those available to the Battle Master (2nd page \"Choose Feature\" button). The saving throw DC for this is ' + (8 + Number(How('Proficiency Bonus')) + Math.max(Number(What('Str Mod')), Number(What('Dex Mod')))) + ' (8 + proficiency bonus + Str/Dex mod). I gain one superiority die (d6), which I regain when I finish a short rest.';",
	descriptionFull: [
		"You have martial training that allows you to perform special combat maneuvers. You gain the following benefits:",
		" \u2022 You learn two maneuvers of your choice from among those available to the Battle Master archetype in the fighter class. If a maneuver you use requires your target to make a saving throw to resist the maneuver's effects, the saving throw DC equals 8 + your proficiency bonus + your Strength or Dexterity modifier (your choice).",
		" \u2022 You gain one superiority die, which is a d6 (this die is added to any superiority dice you have from another source). This die is used to fuel your maneuvers. A superiority die is expended when you use it. You regain your expended superiority dice when you finish a short or long rest.",
	],
	bonusClassExtrachoices: [{
		"class": "fighter",
		subclass: "fighter-battle master",
		feature: "subclassfeature3.1",
		bonus: 2,
	}],
	extraLimitedFeatures: [{
		name: "Superiority Dice",
		usages: 1,
		additional: 'd6',
		recovery: "short rest",
		addToExisting: true,
	}],
};

================================================
FILE: WotC 2024/not-reprinted_20201117_TCoE.js
================================================
var iFileName = "not-reprinted_20201117_TCoE.js";
RequiredSheetVersion("24.0.5-beta");
// This file adds options from Tasha's Cauldron of Everything to MPMB's Character Record Sheet that have not been replaced with new options published specifically for the 2024 (5.5e) rules

// Define the source
SourceList.T = {
	name: "Tasha's Cauldron of Everything",
	abbreviation: "TCoE",
	abbreviationSpellsheet: "T",
	group: "Legacy Sources",
	url: "https://dnd.wizards.com/products/tashas-cauldron-everything",
	date: "2020/11/17",
	defaultExcluded: true,
};

AddSubClass("bard", "college of eloquence", {
	regExpSearch: /^(?=.*(college|bard|minstrel|troubadour|jongleur))(?=.*eloquence).*$/i,
	subname: "College of Eloquence",
	subnameShort: "Eloquence",
	source: [["T", 29], ["MOT", 28]],
	features: {
		"subclassfeature3": {
			name: "Silver Tongue",
			source: [["T", 30], ["MOT", 28]],
			minlevel: 3,
			description: desc("When I make a Persuasion or Deception check, I can treat a roll of 9 or lower as a 10."),
		},
		"subclassfeature3.1": {
			name: "Unsettling Words",
			source: [["T", 30], ["MOT", 28]],
			minlevel: 3,
			description: desc("As a Bonus Action, I can expend and roll a Bardic Inspiration Die to have a creature I can see within 60 ft subtract the result from the next save it makes before my next turn starts."),
			action: [["bonus action", ""]],
		},
		"subclassfeature6": {
			name: "Unfailing Inspiration",
			source: [["T", 30], ["MOT", 28]],
			minlevel: 6,
			description: desc("When a creature adds my Bardic Inspiration Die to a roll but fails, they can keep the die."),
		},
		"subclassfeature6.1": {
			name: "Universal Speech",
			source: [["T", 30], ["MOT", 28]],
			minlevel: 6,
			description: desc([
				"As an Action, I can choose a number of creatures equal to my Charisma modifier (min 1). They can magically understand me, regardless of the language I speak, for 1 hour.",
				"I can do this once per Long Rest, or by expending a 1st-level or higher spell slot (SS 1+).",
			]),
			recovery: "Long Rest",
			usages: 1,
			altResource: "SS 1+",
			action: [["action", ""]],
		},
		"subclassfeature14": {
			name: "Infectious Inspiration",
			source: [["T", 30], ["MOT", 28]],
			minlevel: 14,
			description: desc("As a Reaction when a creature uses my Bardic Inspiration Die and succeeds, I can give another creature within 60 ft that can hear me a " + (typePF ? "Bardic Inspiration Die" : "BID") + " without expending any."),
			action: [["reaction", ""]],
			usages: "Charisma modifier per ",
			usagescalc: "event.value = Math.max(1, What('Cha Mod'));",
			recovery: "Long Rest",
		},
	},
});

================================================
FILE: WotC 2024/pub_20240917_PHB.js
================================================
var iFileName = "pub_20240917_PHB.js";
RequiredSheetVersion("24.0.6-beta");
// This file adds material from the 2024 Player's Handbook that isn't in the SRD v5.2.1 to MPMB's Character Record Sheet

// Define the source
SourceList["P24"] = {
	name: "2024 Player's Handbook",
	abbreviation: "PHB'24",
	abbreviationSpellsheet: "P2",
	group: "Primary Sources",
	url: "https://marketplace.dndbeyond.com/core-rules/3709000",
	date: "2024/09/17",
};

// Barbarian Subclasses
AddSubClass("barbarian", "wild heart", {
	regExpSearch: /^(?=.*barbarian)(?=.*wild)(?=.*heart).*$/i,
	subname: "Path of the Wild Heart",
	subnameShort: "Wild Heart",
	source: [["P24", 55]],
	abilitySave: 5,
	features: {
		"subclassfeature3": {
			name: "Animal Speaker",
			source: [["P24", 55]],
			minlevel: 3,
			description: levels.map(function (n) {
				return n < 14 ? desc("I can cast *Beast Sense* and *Speak with Animals* using Wisdom, but only as Rituals.") : " [*Beast Sense* \x26 *Speak with Animals* as Ritual]";
			}),
			spellcastingBonus: [{
				name: "Animal Speaker",
				spells: ["beast sense", "speak with animals"],
				selection: ["beast sense", "speak with animals"],
				times: 2,
				firstCol: SpellRitualTag,
				spellcastingAbility: 5,
			}],
		},
		"subclassfeature3.1": {
			name: "Rage of the Wilds",
			source: [["P24", 55]],
			minlevel: 3,
			description: desc([
				"Whenever I enter Rage, I can gain one of the following benefits during that Rage.",
				" \u2022 ***Bear***. Resistance to all damage types except Force, Necrotic, Psychic, and Radiant.",
				" \u2022 ***Eagle***. Can Disengage or Dash when entering Rage. As Bonus Action, take both actions.",
				" \u2022 ***Wolf***. Allies have Advantage on attack rolls against any enemy within 5 ft of me.",
			]),
		},
		"subclassfeature6": {
			name: "Aspect of the Wilds",
			source: [["P24", 55]],
			minlevel: 6,
			description: ' #[Select option with "Choose Feature"]#' + desc('Use the "Choose Feature" button to select which aspect (Owl, Panther, or Salmon) is currently active and automated, or select to show all of them but have none of them added to the automation.'),
			choices: ["Owl", "Panther", "Salmon", "show all (bonuses not automated)"],
			"owl": {
				name: "Owl Aspect of the Wilds",
				description: desc([
					"I have Darkvision 60 ft. If I already have Darkvision, its range increases with 60 ft instead.",
					"After I finish a Long Rest, I can switch to: ***Panther*** (Climb Speed) or ***Salmon*** (Swim Speed).",
				]),
				vision: [["Darkvision", "fixed 60"], ["Darkvision", "+60"]],
			},
			"panther": {
				name: "Panther Aspect of the Wilds",
				description: desc([
					"I have a Climb Speed equal to my Speed.",
					"After I finish a Long Rest, I can switch to: ***Owl*** (+60ft Darkvision) or ***Salmon*** (Swim Speed).",
				]),
				speed: { climb: { spd: "walk", enc: "walk" } },
			},
			"salmon": {
				name: "Salmon Aspect of the Wilds",
				description: desc([
					"I have a Swim Speed equal to my Speed.",
					"After I finish a Long Rest, I can switch to: ***Owl*** (+60ft Darkvision) or ***Panther*** (Climb Speed).",
				]),
				speed: { swim: { spd: "walk", enc: "walk" } },
			},
			"show all (bonuses not automated)": {
				name: "Aspect of the Wilds",
				description: desc("I gain one option, which I can change when I finish a Long Rest. ***Owl***. +60 ft Darkvision. ***Panther***. Climb Speed equal to my Speed. ***Salmon***. Swim Speed equal to my Speed."),
			},
		},
		"subclassfeature10": {
			name: "Nature Speaker",
			source: [["P24", 55]],
			minlevel: 10,
			description: levels.map(function (n) {
				return n < 10 ? "" : n < 14 ? desc("I can cast *Commune with Nature* using Wisdom, but only as a Ritual.") : " [*Commune with Nature* as Ritual]";
			}),
			spellcastingBonus: [{
				name: "Nature Speaker",
				spells: ["commune with nature"],
				selection: ["commune with nature"],
				firstCol: SpellRitualTag,
			}],
		},
		"subclassfeature14": {
			name: "Power of the Wilds",
			source: [["P24", 55]],
			minlevel: 14,
			description: " [choose one benefit per Rage]" + desc([
				" \u2022 ***Falcon***. I have a Fly Speed equal to my Speed if I'm not wearing any armor.",
				" \u2022 ***Lion***. Any enemy within 5 ft of me has Disadvantage on attacks against others than me.",
				" \u2022 ***Ram***. When I hit a Large or smaller creature with a melee attack, I can knock it Prone.",
			]),
		},
	},
});
AddSubClass("barbarian", "world tree", {
	regExpSearch: /^(?=.*barbarian)((?=.*world)(?=.*tree)|(?=.*yggdrasil)).*$/i,
	subname: "Path of the World Tree",
	subnameShort: "World Tree",
	source: [["P24", 56]],
	features: {
		"subclassfeature3": {
			name: "Vitality of the Tree",
			source: [["P24", 56]],
			minlevel: 3,
			description: levels.map(function (n) {
				var rageDamage = n < 9 ? 2 : n < 16 ? 3 : 4;
				return desc("When I enter Rage, I gain " + n + " Temp HP (level). At the start of my turn while in Rage, I can give another within 10 ft " + rageDamage + "d6 Temp HP (1d6 per Rage damage) until my Rage ends.");
			}),
			additional: levels.map(function (n) {
				return n < 3 ? "" : "me " + n + ", others " + (n < 9 ? 2 : n < 16 ? 3 : 4) + "d6 Temp HP";
			}),
		},
		"subclassfeature6": {
			name: "Branches of the Tree",
			source: [["P24", 56]],
			minlevel: 6,
			description: desc("As a Reaction while in Rage when a creature I can see starts its turn within 30 ft, I can have it make a Strength save or teleport it to the empty space of my choice nearest to me that I can see. After it teleports, I can reduce its Speed to 0 until the end of its turn."),
			action: [["reaction", " (in Rage)"]],
			additional: "DC 8 + Str mod + Prof Bonus",
		},
		"subclassfeature10": {
			name: "Battering Roots",
			source: [["P24", 56]],
			minlevel: 10,
			description: desc("On my turn, I have +10 ft reach with Heavy and Versatile melee weapons. With those, I can use the Push or Topple mastery in addition to a different mastery I'm using with it."),
			calcChanges: {
				atkAdd: [
					function (fields, v) {
						if (v.isMeleeWeapon && /heavy|versatile/i.test(fields.Description)) {
							var text = "+10 ft reach on my turn";
							if (!/\b(topple|push)\b/i.test(fields.Description)) {
								text = "Push or Topple; " + text;
							} else if (!/\bpush\b/i.test(fields.Description)) {
								text = "Push; " + text;
							} else if (!/\btopple\b/i.test(fields.Description)) {
								text = "Topple; " + text;
							}
							fields.Description += (fields.Description ? '; ' : '') + text;
						}
					},
					"Heavy and Versatile melee weapons get the Push and Topple masteries added to their description if they don't already have it. With those weapons, I have +10 ft reach on my turn.",
				],
			},
		},
		"subclassfeature14": {
			name: "Travel along the Tree",
			source: [["P24", 56]],
			minlevel: 14,
			description: desc("When I enter Rage and as a Bonus Action during, I can teleport up to 60 ft to an empty space I can see. Once per Rage, I can teleport up to 150 ft and bring along up to 6 willing creatures within 10 ft, who each arrive in an empty space of my choice within 10 ft of " + (typePF ? "where I arrive." : "me.")),
			action: [["bonus action", " (in Rage)"]],
			usages: 1,
			recovery: "Rage",
			additional: "150 ft \x26 bring 6",
		},
	},
});
AddSubClass("barbarian", "zealot", {
	regExpSearch: /zealot/i,
	subname: "Path of the Zealot",
	subnameShort: "Zealot",
	fullname: "Zealot",
	source: [["P24", 57]],
	features: {
		"subclassfeature3": {
			name: "Divine Fury",
			source: [["P24", 57]],
			minlevel: 3,
			description: levels.map(function (n) {
				return desc("While in Rage, the first creature I hit with a weapon or Unarmed Strike on my turn takes +1d6 + " + Math.floor(n / 2) + " (half level) Necrotic or Radiant damage; I choose the type each time.");
			}),
			additional: levels.map(function (n) {
				return n < 3 ? "" : "+1d6 + " + Math.floor(n / 2) + " damage";
			}),
			calcChanges: {
				atkAdd: [
					function (fields, v) {
						var lvl = classes.known.barbarian ? classes.known.barbarian.level : false;
						if (lvl && (v.isWeapon || v.baseWeaponName === "unarmed strike") && /\brage\b/i.test(v.WeaponTextName)) {
							fields.Description += (fields.Description ? '; ' : '') + "1/turn +1d6+" + Math.floor(lvl / 2) + " Necrotic/Radiant dmg";
						}
					},
					"",
				],
			},
		},
		"subclassfeature3.1": {
			name: "Warrior of the Gods",
			source: [["P24", 57]],
			minlevel: 3,
			description: desc("As a Bonus Action, I can expend dice from my pool of d12s to regain HP equal to their roll."),
			usages: levels.map(function (n) {
				return n < 3 ? "" : (n < 6 ? 4 : n < 12 ? 5 : n < 17 ? 6 : 7) + "d12 per ";
			}),
			recovery: "Long Rest",
			action: [["bonus action", ""]],
		},
		"subclassfeature6": {
			name: "Fanatical Focus",
			source: [["P24", 57]],
			minlevel: 6,
			description: levels.map(function (n) {
				var rageDamageBonus = n < 9 ? 2 : n < 16 ? 3 : 4;
				return n < 6 ? "" : desc("Once per Rage, I can reroll a failed save with a +" + rageDamageBonus + " (Rage damage), but must use the result.");
			}),
			additional: levels.map(function (n) {
				var rageDamageBonus = n < 9 ? 2 : n < 16 ? 3 : 4;
				return n < 6 ? "" : "reroll save with +" + rageDamageBonus;
			}),
			usages: "1\xD7 each ",
			recovery: "Rage",
		},
		"subclassfeature10": {
			name: "Zealous Presence",
			source: [["P24", 57]],
			minlevel: 10,
			description: desc("As a Bonus Action, I can give up to 10 creatures of my choice within 60 ft Adv. on attacks and saves until my next turn starts. I can expend a use of Rage to regain use of this."),
			usages: 1,
			recovery: "Long Rest",
			altResource: "Rage",
			action: [["bonus action", ""]],
		},
		"subclassfeature14": {
			name: "Rage of the Gods",
			source: [["P24", 57]],
			minlevel: 14,
			description: levels.map(function (n) {
				return n < 14 ? "" : desc("When I enter Rage, I can gain benefits for 1 minute or until I'm at 0 HP. ***Fly Speed*** equal to my Speed. ***Resistance*** to Necrotic, Psychic, and Radiant. ***Revivification***. As a Reaction when a creature within 30 ft drops to 0 HP, I can expend a Rage use to give it " + n + " HP (level).");
			}),
			usages: 1,
			recovery: "Long Rest",
			action: [["reaction", " (Revivification)"]],
		},
	},
});

// Bard Subclasses
AddSubClass("bard", "dance", {
	regExpSearch: /^(?=.*(college|bard|minstrel|troubadour|jongleur))(?=.*dance).*$/i,
	subname: "College of Dance",
	subnameShort: "Dance",
	source: [["P24", 64]],
	features: {
		"subclassfeature3": {
			name: "Dazzling Footwork",
			source: [["P24", 64]],
			minlevel: 3,
			description: desc([
				"While I'm not wearing armor or wielding a Shield, I gain the following benefits:",
				"***Dance Virtuoso***. I have Advantage on any Charisma (Performance) checks involving dancing.",
				"***Unarmored Defense***. My AC is 10 + Dexterity modifier + Charisma modifier.",
				"***Agile Strikes***. When I use Bardic Inspiration as part of an action, Bonus Action, or Reaction, I can make one Unarmed Strike as part of that action, Bonus Action, or Reaction.",
				"***Bardic Damage***. My Unarmed Strikes can use Dexterity and deal damage equal to my BID.",
			]),
			calcChanges: {
				atkAdd: [
					function (fields, v) {
						var n = classes.known.bard ? classes.known.bard.level : false;
						if (n && v.baseWeaponName.indexOf("unarmed strike") !== -1) {
							// Set the ability to the highest of Str and Dex, if currently one of those or lower than Str or Dex
							if (fields.Mod === 1 || fields.Mod === 2 || What(AbilityScores.abbreviations[fields.Mod - 1] + " Mod") < What(AbilityScores.abbreviations[v.StrDex - 1] + " Mod")) {
								fields.Mod = v.StrDex;
							}
							// Improve the damage die if there is one and the Bardic Inspiration Die is better
							var bardInspDie = n < 5 ? 6 : n < 10 ? 8 : n < 15 ? 10 : 12;
							var rxDice = /(\d+)d?(\d*)/;
							if (rxDice.test(fields.Damage_Die)) {
								var curDie = fields.Damage_Die.match(rxDice);
								var curDieSize = Math.max(Number(curDie[1]), 1) * Math.max(Number(curDie[2]), 1);
								if (curDieSize < bardInspDie) {
									fields.Damage_Die = fields.Damage_Die.replace(curDie[0], '1d' + bardInspDie);
								}
							}
						}
					},
					"Unarmed Strikes can use Dexterity and deal Bardic Inspiration Die damage.",
				],
			},
			armorOptions: [{
				regExpSearch: /justToAddToDropDownAndAffectWildShape/,
				name: "Unarmored Defense (Cha)",
				source: [["P24", 64]],
				ac: "10+Cha",
				affectsWildShape: true,
				selectNow: true,
			}],
		},
		"subclassfeature6": {
			name: "Inspiring Movement",
			source: [["P24", 64]],
			minlevel: 6,
			description: desc("As a Reaction when an enemy I can see ends its turn within 5 ft, I can expend a use of Bardic Inspiration to move up to half my Speed without provoking Opportunity Attacks. Then one ally of my choice within 30 ft can do the same with their Reaction."),
			additional: "1 Bardic Inspiration",
			action: [["reaction", " (1 BID)"]],
		},
		"subclassfeature6.1": {
			name: "Tandem Footwork",
			source: [["P24", 64]],
			minlevel: 6,
			description: desc("When I roll Initiative and I'm not Incapacitated, I can expend and roll one Bardic Inspiration Die and add it to the Initiative of every ally within 30 ft that can see or hear me."),
			additional: "1 Bardic Inspiration",
		},
		"subclassfeature14": {
			name: "Leading Evasion",
			source: [["P24", 65]],
			minlevel: 14,
			description: " [if not Incapacitated]" + desc([
				"When I make a Dex save to halve damage, I instead take none if I succeed and half if I fail.",
				"I can share this benefit with creatures within 5 ft making the same save.",
			]),
			savetxt: { text: ["**Dex Save for Half**. *Failure:* half dmg, *Success:* no dmg"] },
		},
	},
});
AddSubClass("bard", "glamour", {
	regExpSearch: /^(?=.*(college|bard|minstrel|troubadour|jongleur))(?=.*glamour).*$/i,
	subname: "College of Glamour",
	subnameShort: "Glamour",
	source: [["P24", 65]],
	features: {
		"subclassfeature3": {
			name: "Beguiling Magic",
			source: [["P24", 65]],
			minlevel: 3,
			description: desc("Immediately after I use a spell slot to cast an Enchantment or Illusion spell, I can have a creature I can see within 60 ft make a Wisdom save or be either Charmed or Frightened for 1 minute, repeating the save as each of its turns end. I can expend a Bardic Inspiration Die to regain use of this. I always have *Charm Person* and *Mirror Image* prepared."),
			usages: 1,
			recovery: "Long Rest",
			altResource: "BID",
			spellcastingBonus: [{
				name: "Beguiling Magic",
				spells: ["charm person", "mirror image"],
				selection: ["charm person", "mirror image"],
				times: 2,
				firstCol: "markedbox",
			}],
		},
		"subclassfeature3.1": {
			name: "Mantle of Inspiration",
			source: [["P24", 65]],
			minlevel: 3,
			description: desc([
				"As a Bonus Action, I can expend and roll a Bardic Inspiration Die to grant other creatures within 60 ft of me Temporary Hit Points equal to twice the number rolled, and then each can use its Reaction to move up to its Speed without provoking Opportunity Attacks.",
				"I can choose up to my Charisma modifier (minimum 1) number of creatures to affect.",
			]),
			additional: levels.map(function (n) {
				var bardInspDie = n < 5 ? 6 : n < 10 ? 8 : n < 15 ? 10 : 12;
				return n < 3 ? "" : "1 BID; 1d" + bardInspDie + " \xD7 2 Temp HP";
			}),
			action: [["bonus action", ""]],
		},
		"subclassfeature6": {
			name: "Mantle of Majesty",
			source: [["P24", 65]],
			minlevel: 6,
			description: desc("As a Bonus Action, I can take on an unearthly appearance for 1 minute, requiring Concentration. When I do so and as a Bonus Action during, I can cast *Command* without using a spell slot. Creatures Charmed by me automatically fail their save against it. I can expend a level 3+ spell slot (SS 3+) to regain use of this. I always have *Command* prepared."),
			usages: 1,
			recovery: "Long Rest",
			altResource: "SS 3+",
			spellcastingBonus: [{
				name: "Mantle of Majesty",
				spells: ["command"],
				selection: ["command"],
				firstCol: "markedbox",
			}],
			action: [["bonus action", ""]],
		},
		"subclassfeature14": {
			name: "Unbreakable Majesty",
			source: [["P24", 66]],
			minlevel: 14,
			description: desc([
				"As a Bonus Action, I can gain a majestic presence for 1 minute or until I'm Incapacitated.",
				"While active, whenever any creature hits me with an attack roll for the first time on a turn, it has to make a Charisma save or miss instead.",
			]),
			usages: 1,
			recovery: "Short Rest",
			action: [["bonus action", ""]],
		},
	},
});
AddSubClass("bard", "valor", {
	regExpSearch: /^(?=.*(college|bard|minstrel|troubadour|jongleur))(?=.*valor).*$/i,
	subname: "College of Valor",
	subnameShort: "Valor",
	source: [["P24", 67]],
	attacks: [1, 1, 1, 1, 2],
	features: {
		"subclassfeature3": {
			name: "Combat Inspiration",
			source: [["P24", 67]],
			minlevel: 3,
			description: desc([
				"A creature that has a Bardic Inspiration Die (BID) from me can use it in one of these ways.",
				"***Defense***. As a Reaction when hit by an attack, it can add the BID to " + (typePF ? "its " : "") + "AC against that attack.",
				"***Offense***. After it hits with an attack roll, it can add the BID to that attack's damage.",
			]),
		},
		"subclassfeature3.1": {
			name: "Martial Training",
			source: [["P24", 67]],
			minlevel: 3,
			description: desc([
				"I have proficiency with Martial weapons, Medium armor, and Shields.",
				"I can use a Simple or Martial weapon as a Spellcasting Focus for my Bard spells."
			]),
			armorProfs: [false, true, false, true],
			weaponProfs: [false, true],
		},
		"subclassfeature6": {
			name: "Extra Attack",
			source: [["P24", 67]],
			minlevel: 6,
			description: desc([
				"I can attack twice instead of once when I take the Attack action on my turn.",
				"I can cast a cantrip with a casting time of one action in place of one of those attacks.",
			]),
			action: [["action", "1 Attack and cast Cantrip"]]
		},
		"subclassfeature14": {
			name: "Battle Magic",
			source: [["P24", 67]],
			minlevel: 14,
			description: desc("As a Bonus Action after I cast a spell that takes an action, I can make one weapon attack."),
			action: [["bonus action", "Weapon attack (after cast spell)"]],
		},
	},
});

// Cleric subclasses

// Druid subclasses

// Druid Subclasses
AddSubClass("druid", "moon", {
	regExpSearch: /^(?=.*druid)((?=.*\bmoon\b)|((?=.*\bmany\b)(?=.*\bforms?\b))).*$/i,
	subname: "Circle of the Moon",
	subnameShort: "Moon",
	source: [["P24", 86]],
	features: {
		"subclassfeature3": {
			name: "Circle Forms",
			source: [["P24", 86]],
			minlevel: 3,
			description: desc("The max CR for my Wild Shape forms is my Druid level divided by 3. While in WS, my AC can be 13 + my Wisdom modifier. I gain 3\xD7 my Druid level in temp HP when I shape-shift."),
			wildshapePageInfo: {
				duration: ClassList.druid.features["wild shape"].wildshapePageInfo.duration,
				knownForms: ClassList.druid.features["wild shape"].wildshapePageInfo.knownForms,
				tempHP: levels.map(function (n) {
					return n < 3 ? n : n*3;
				}),
				limitations: levels.map(function (n) {
					var CR = n < 3 ? "1/4" : Math.floor(n/3);
					return n < 8 ? "max CR " + CR + ", no Fly Speed" : "CR " + CR + " or lower";
				}),
			},
			"wild shape rules": {
				name: "Circle Forms Wild Shape Rules",
				source: [["P24", "80-86"]],
				extraname: "Moon 3",
				description: levels.map(function (n) {
					if (n < 3) return "";
					var tempHP = n*3;
					var duration = Math.floor(n/2) + " hour" + (n > 3 ? "s" : "");
					var knownForms = n < 4 ? 4 : n < 8 ? 6 : 8;
					var CR = Math.floor(n/3);
					var canFly = n < 8 ? "can't" : "can";
					return desc([
						"As a Bonus Action, I can expend a Wild Shape (WS) use to shape-shift into a known Beast form and gain **" + tempHP + " Temp HP** (3\xD7 Druid level). I stay in that form for **" + duration + "** (half Druid level), until I use Wild Shape again, end it as a Bonus Action, become Incapacitated, or die.",
						"I know **" + knownForms + " forms** of **max CR " + CR + "** (one-third Druid level) that **" + canFly + " have a Fly Speed**. " + (typePF ? "Whenever I finish" : "After") + " a Long Rest, I can change one known form for another eligible Beast form.",
						"In Wild Shape, I use the Beast's stats, but retain my type, HP, HD, Int, Wis, Cha, feats, class features, and ability to speak. I retain my skill and save proficiencies with my Prof Bonus and gain the beast's, using its bonus if higher. My AC is 13 + my Wisdom mod, unless the Beast's AC is higher. I can't cast spells except my Circle of the Moon Spells, but shape-shifting doesn't break concentration. I choose what equipment falls to the ground, merges, or stays worn.",
						"Use the Wild Shape page to track known forms and their stats.",
					]);
				}),
			},
			autoSelectExtrachoices: [{
				extrachoice: "wild shape rules",
			}],
			eval: function() {
				// Remove the Wild Shape Rules set by the default Wild Shape feature so they can be replaced by the ones from this feature
				ClassFeatureOptions(["druid", "wild shape", "wild shape rules", true], "remove");
			},
			removeeval: function(lvlA) {
				// Return the Wild Shape Rules from the default Wild Shape feature as the ones from this feature are removed, but the new level is still 2 or higher
				if (lvlA[1] >= 2) ClassFeatureOptions(["druid", "wild shape", "wild shape rules", true], "add");
			},
			calcChanges: {
				wildshapeCallback: [
					function(prefix, fieldNo, oWildshape, sCrea) {
						oWildshape.acOptions.push({
							name: "Circle of the Moon: Circle Forms",
							ac: "13+Wis",
						});
					},
					"While in Wild Shape, my AC equals 13 plus my Wisdom modifier if that total is higher than the Beast's AC.",
				],
			},
		},
		"subclassfeature3.1": {
			name: "Circle of the Moon Spells",
			source: [["P24", 86]],
			minlevel: 3,
			description: desc("I always have these spells prepared and can cast them even when I'm in a Wild Shape form."),
			spellcastingExtra: ["starry wisp", "cure wounds", "moonbeam", "conjure animals", "fount of moonlight", "mass cure wounds"],
		},
		"subclassfeature6": {
			name: "Improved Circle Forms",
			source: [["P24", 87]],
			minlevel: 6,
			description: desc("While in Wild Shape form, I gain ***Lunar Radiance***: my attacks can deal Radiant damage, and ***Increased Toughness***: I add my Wisdom modifier to my Constitution saving throws."),
			calcChanges: {
				wildshapeCallback: [
					function(prefix, fieldNo, oWildshape, sCrea) {
						oWildshape.save.Con.creature.bonus += "+Wis";
						if (!classes.known.druid) return;
						var regularLunarRadiance = classes.known.druid.level < 14;
						oWildshape.wildshapeTraits.push({
							name: "Lunar Radiance",
							description: regularLunarRadiance ? "(Moon 6). Attacks can deal Radiant." : "(Moon 14). Attacks can deal Radiant. Once per turn after a hit, deal +2d10 Radiant damage.",
							joinString: " ",
						});
					},
					"While in a Wild Shape form, I can have my attacks deal Radiant damage and I can add my Wisdom modifier to my Constitution saving throws. Once per turn from level 14 onwards, I can deal an extra 2d10 Radiant damage to a target I hit with a Wild Shape form's attack.",
				],
			},
		},
		"subclassfeature10": {
			name: "Moonlight Step",
			source: [["P24", 87]],
			minlevel: 10,
			description: levels.map(function (n) {
				return n < 10 ? "" : n < 14 ?
					desc("As a Bonus Action, I can teleport up to 30 ft to an empty space I can see, and I gain Adv. on my next attack roll this turn. I can expend a level 2+ spell slot (SS 2+) to regain 1 use.") :
					desc("As a Bonus Action, I and a willing creature within 10 ft can teleport up to 30 ft to an empty space I can see, with the creature appearing within 10 ft of me. I then gain Adv. on my next attack roll this turn. I can expend a level 2+ spell slot (SS 2+) to regain 1 use.");
			}),
			usages: typePF ? "" : "Wisdom modifier per ",
			usagescalc: "event.value = Math.max(1, What('Wis Mod'));",
			altResource: "SS 2+",
			recovery: "Long Rest",
			action: [["bonus action", ""]],
		},
		"subclassfeature14": {
			name: "Lunar Form",
			source: [["P24", 87]],
			minlevel: 14,
			description: desc("***Improved Lunar Radiance***. Once per turn, I can deal +2d10 Radiant damage on a hit with a WS attack. ***Shared Moonlight***. I can bring along an ally with Moonlight Step, see above."),
		},
	},
});
AddSubClass("druid", "sea", {
	regExpSearch: /^(?=.*druid)(?=.*\b(sea|waves|tides)\b).*$/i,
	subname: "Circle of the Sea",
	subnameShort: "Sea",
	source: [["P24", 87]],
	features: {
		"subclassfeature3": {
			name: "Wrath of the Sea",
			source: [["P24", 87]],
			minlevel: 3,
			description: levels.map(function (n) {
				var part = {
					range: n < 6 ? 5 : 10,
					target: n < 14 ? "" : " or around an ally within 60 ft that I can see, or around both by expending 2 WS uses",
					turn: n < 14 ? "my turn" : "turns",
					bearer: n < 14 ? "I" : "the bearer",
					subject: n < 14 ? "I" : "they",
				}
				var text = [
					"As a Bonus Action, I can expend 1 Wild Shape use to create a " + part.range + "-ft Emanation of ocean spray around me" + part.target + ". When manifested and as a Bonus Actions on " + part.turn + " thereafter, " + part.bearer + " can have a creature " + part.subject + " can see in the area make a Constitution save or take 1d6 Cold damage per my Wisdom modifier and, if it's Large or smaller, be pushed 15 ft away.",
					"This lasts for 10 " + (typePF ? "minutes" : "min") + " or until I dismiss it (no action), manifest it again, or I'm Incapacitated.",
				];
				return desc(text);
			}),
			spellcastingExtra: ["ray of frost", "fog cloud", "thunderwave", "gust of wind", "shatter", "lightning bolt", "water breathing", "control water", "ice storm", "conjure elemental", "hold monster"],
			action: [["bonus action", " (1 WS to create)"]],
			additional: levels.map(function (n) {
				var WSuses = n < 14 ? "1 WS use" : "1-2 WS uses";
				var emanation = n < 6 ? 5 : 10;
				return n < 3 ? "" : WSuses + "; Wis mod \xD7 d6 dmg; " + emanation + "-ft rad"
			}),
		},
		"subclassfeature6": {
			name: "Aquatic Affinity",
			source: [["P24", 87]],
			minlevel: 6,
			description: desc("I gain a Swim Speed equal to my Speed and Wrath of the Sea is now a 10-ft Emanation."),
			speed: { swim: { spd: "walk", end: "walk" } },
		},
		"subclassfeature10": {
			name: "Stormborn",
			source: [["P24", 87]],
			minlevel: 10,
			description: desc("While my Wrath of the Sea is active, it now also grants: ***Resistance*** to Cold, Lightning, and Thunder damage, and ***Flight***. A Fly Speed equal to my Speed."),
			dmgres: [
				["Cold",      "Cold (in WotS)"],
				["Lightning", "Lightn. (in WotS)"],
				["Thunder",   "Thunder (in WotS)"],
			],
		},
		"subclassfeature14": {
			name: "Oceanic Gift",
			source: [["P24", 88]],
			minlevel: 14,
			description: desc([
				"I can create Wrath of the Sea around an ally within 60 ft that I can see instead of myself, or around both my and the ally by expending 2 Wild Shape uses.",
				"It grants all benefits to the bearer, but always uses my spell save DC and my Wisdom " + (typePF ? "modifier" : "mod") + ".",
			]),
		},
	},
});
AddSubClass("druid", "stars", {
	regExpSearch: /^(?=.*druid)(?=.*\b(stars?|constellations?)\b).*$/i,
	subname: "Circle of the Stars",
	subnameShort: "Stars",
	source: [["P24", 88]],
	features: {
		"subclassfeature3": {
			name: "Star Map",
			source: [["P24", 88]],
			minlevel: 3,
			description: desc("I can use this Tiny object as my spellcasting focus. While holding it, I know *Guidance* and always have *Guiding Bolt* prepared, which I can cast my Wisdom mod times per Long Rest without a spell slot. I can recreate it with a 1-hour ceremony during a Short or Long Rest."),
			additional: "Guiding Bolt",
			usages: "Wisdom modifier per ",
			usagescalc: "event.value = Math.max(1, What('Wis Mod'));",
			recovery: "Long Rest",
			spellcastingBonus: [{
				name: "Star Map",
				spells: ["guidance"],
				selection: ["guidance"],
			}, {
				name: "Star Map",
				spells: ["guiding bolt"],
				selection: ["guiding bolt"],
				firstCol: "oncelr+markedbox",
			}],
		},
		"subclassfeature3.1": {
			name: "Starry Form",
			source: [["P24", 88]],
			minlevel: 3,
			description: desc([
				"As a Bonus Action, I can expend a WS use to take on a glowing form with the benefits of a constellation (3rd page). I shed Bright Light in " + (typePF ? "10-ft radius" : "10 ft") + " and Dim Light for an additional 10 ft.",
				"This lasts for 10 minutes or until I dismiss it (no action), use it again, or I'm Incapacitated.",
			]),
			action: [["bonus action", " (1 WS)"]],
			additional: "1 Wild Shape use",
			weaponOptions: [{
				regExpSearch: /^(?=.*luminous)(?=.*arrow).*$/i,
				name: "Luminous Arrow",
				source: [["P24", 89]],
				ability: 5,
				type: "Spell",
				damage: [1, 8, "radiant"],
				range: "60 ft",
				description: "Use as a Bonus Action",
				abilitytodamage: true,
				useSpellMod: "druid",
				selectNow: true,
				isLuminousArrow: true,
			}],
			extraname: "Starry Form",
			"archer constellation": {
				name: "Archer Constellation",
				source: [["P24", 89]],
				description: levels.map(function (n) {
					return desc("As a Bonus Action, including the one to take this Starry Form, I can make a ranged spell attack to hurl a luminous arrow 60 ft that deals " + (n < 10 ? 1 : 2) + "d8 + Wisdom modifier Radiant damage.");
				}),
				additional: levels.map(function (n) {
					return n < 3 ? "" : (n < 10 ? 1 : 2) + "d8 damage";
				}),
				action: [["bonus action", "Archer (Luminous Arrow)"]],
			},
			"chalice constellation": {
				name: "Chalice Constellation",
				source: [["P24", 89]],
				description: levels.map(function (n) {
					return desc("Whenever I cast a healing spell using a spell slot, I can also heal myself or another within 30 ft for " + (n < 10 ? 1 : 2) + "d8 + Wisdom modifier HP.");
				}),
				additional: levels.map(function (n) {
					return n < 3 ? "" : (n < 10 ? 1 : 2) + "d8 healing";
				}),
			},
			"dragon constellation": {
				name: "Dragon Constellation",
				source: [["P24", 89]],
				description: levels.map(function (n) {
					var text = [
						"When I make an Intelligence or Wisdom check, or make a Con save to maintain Concentration,",
						"I can treat a roll of 9 or lower on the d20 as a 10.",
					];
					if (n >= 10) text[1] += " I also gain 20 ft Fly Speed and can hover.";
					return desc(text);
				}),
				additional: levels.map(function (n) {
					return n < 10 ? "" : "gain Fly Speed";
				}),
			},
			autoSelectExtrachoices : [{
				extrachoice: "archer constellation",
			}, {
				extrachoice: "chalice constellation",
			}, {
				extrachoice: "dragon constellation",
			}],
		},
		"subclassfeature6": {
			name: "Cosmic Omen",
			source: [["P24", 89]],
			minlevel: 6,
			description: desc([
				"When I finish a Long Rest, I roll a die to determine which omen I can use until my next LR.",
				"As a Reaction when I see a creature within 30 ft about to make a D20 test, I can use it to:",
				"**Weal (even)**. Add 1d6 to the total. **Woe (odd)**. Subtract 1d6 from the total.",
			]),
			action: [["reaction", ""]],
			usages: "Wisdom modifier per ",
			usagescalc: "event.value = Math.max(1, What('Wis Mod'));",
			recovery: "Long Rest",
		},
		"subclassfeature10": {
			name: "Twinkling Constellations",
			source: [["P24", 89]],
			minlevel: 10,
			description: " [improves constellations, see 3rd page]" + desc("While in my Starry Form, I can change the constellation at the start of each of my turns."),
			calcChanges: {
				atkAdd: [
					function (fields, v) {
						if (v.theWea.isLuminousArrow && fields.Damage_Die.indexOf('1d8') !== -1) {
							fields.Damage_Die = fields.Damage_Die.replace('1d8', '2d8');
						}
					},
					'',
				],
			},
		},
		"subclassfeature14": {
			name: "Full of Stars",
			source: [["P24", 89]],
			minlevel: 14,
			description: desc("While in my Starry Form, I have Resistance to Bludgeoning, Piercing, and Slashing damage."),
			dmgres: [
				["Bludgeoning", "Bludgeon. (in SF)"],
				["Piercing",    "Piercing (in SF)"],
				["Slashing",    "Slashing (in SF)"],
			],
		},
	},
});

// Fighter Subclasses
AddSubClass("fighter", "battle master", {
	regExpSearch: /^(?=.*(war|fighter|battle|martial))(?=.*master).*$/i,
	subname: "Battle Master",
	fullname: "Battle Master",
	source: [["P24", 93]],
	abilitySave: 1,
	abilitySaveAlt: 2,
	features: {
		"subclassfeature3": { // includes the level 10 and 18 Improved/Ultimate Combat Superiority features
			name: "Combat Superiority",
			source: [["P24", 93]],
			minlevel: 3,
			description: desc("I gain a number of Superiority Dice (SD) that I can use to fuel special Maneuvers."),
			additional: levels.map(function (n) {
				if (n < 3) return "";
				return "d" + (n < 10 ? 8 : n < 18 ? 10 : 12);
			}),
			limfeaname: "Superiority Dice",
			usages: levels.map(function (n) {
				return n < 3 ? 0 : n < 7 ? 4 : n < 15 ? 5 : 6;
			}),
			recovery: "Short Rest",
		},
		"subclassfeature3.1": {
			name: "Maneuvers",
			source: [["P24", 93]],
			minlevel: 3,
			description: desc([
				"I can expend one Superiority Die to do a Maneuver I know, but only one per attack.",
				"The save DC for my Maneuvers is 8 + my Prof. Bonus + my Str or Dex modifier (my choice).",
			]),
			additional: levels.map(function (n) {
				return n < 3 ? "" : (n < 7 ? 3 : n < 10 ? 5 : n < 15 ? 7 : 9) + " known";
			}),
			extraTimes: levels.map(function (n) {
				return n < 3 ? 0 : n < 7 ? 3 : n < 10 ? 5 : n < 15 ? 7 : 9;
			}),
			extraname: "Maneuver Options",
			extrachoices: ["Ambush", "Bait and Switch", "Commander's Strike", "Commanding Presence", "Disarming Attack", "Distracting Strike", "Evasive Footwork", "Feinting Attack", "Goading Attack", "Lunging Attack", "Maneuvering Attack", "Menacing Attack", "Parry", "Precision Attack", "Pushing Attack", "Rally", "Riposte", "Sweeping Attack", "Tactical Assessment", "Trip Attack"],
			"ambush": {
				name: "Ambush",
				extraname: "Maneuver",
				source: [["P24", 94]],
				description: desc("When I roll for Initiative or Dex (Stealth), I can expend and add 1 SD unless I'm Incapacitated."),
				additional: "add SD to Stealth or Initiative",
			},
			"bait and switch": {
				name: "Bait and Switch",
				extraname: "Maneuver",
				source: [["P24", 94]],
				description: desc([
					"On my turn, I can expend 1 SD to switch places with a willing, not-Incapacitated creature within 5 ft, if I spend at least 5 ft of movement. This doesn't provoke Opportunity Attacks.",
					"The other creature or I (my choice) can add the SD to AC until the start of my next turn.",
				]),
				additional: "add SD to my/ally's AC",
			},
			"commander's strike": {
				name: "Commander's Strike",
				extraname: "Maneuver",
				source: [["P24", 94]],
				description: desc("When I take the Attack action on my turn, I can forgo one attack to direct a willing creature I can see or hear to strike. I expend 1 SD and that creature can immediately use its Reaction to make one attack with a weapon or Unarmed Strike, adding the SD to the attack's damage."),
				additional: "ally adds SD to damage",
			},
			"commanding presence": {
				name: "Commanding Presence",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc("When I make an Intimidation, Performance, or Persuasion check, I can expend and add 1 SD."),
				additional: "add SD to Charisma skill check",
			},
			"disarming attack": {
				name: "Disarming Attack",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc("When I hit a creature with an attack, I can expend and add 1 SD to the damage. The target must make a Strength save or drop one object of my choice that it's holding in its space."),
				additional: "add SD to damage",
			},
			"distracting strike": {
				name: "Distracting Strike",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc("When I hit a creature with an attack, I can expend and add 1 SD to the damage. The next attack vs. the target by another than me has Advantage, if made before my next turn starts."),
				additional: "add SD to damage",
			},
			"evasive footwork": {
				name: "Evasive Footwork",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc([
					"As a Bonus Action, I can expend 1 SD to take the Disengage action.",
					"I add the Superiority Die to my AC until the start of my next turn.",
				]),
				additional: "add SD to AC",
				action: [["bonus action", ""]],
			},
			"feinting attack": {
				name: "Feinting Attack",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc("As a Bonus Action, I can expend 1 SD to gain Advantage on my next attack this turn against a creature within 5 ft. If that attack hits, I add the Superiority Die to its damage."),
				additional: "add SD to damage",
				action: [["bonus action", ""]],
			},
			"goading attack": {
				name: "Goading Attack",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc("When I hit a creature with an attack, I can expend and add 1 SD to the damage. The target must make a Wis save or have Disadvantage on attacks not vs. me until my next turn ends."),
				additional: "add SD to damage",
			},
			"lunging attack": {
				name: "Lunging Attack",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc("As a Bonus Action, I can expend 1 SD to take the Dash action. If I move 5 ft in a straight line before hitting a melee attack in the same turn's Attack action, I add the SD to the damage."),
				additional: "add SD to melee damage",
				action: [["bonus action", ""]],
			},
			"maneuvering attack": {
				name: "Maneuvering Attack",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc([
					"When I hit a creature with an attack, I can expend and add 1 SD to the damage.",
					"A willing creature of my choice who can see or hear me can then use its Reaction to move up to half its Speed without provoking an Opportunity Attack from the target of my attack.",
				]),
				additional: "add SD to damage",
			},
			"menacing attack": {
				name: "Menacing Attack",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc("When I hit a creature with an attack, I can expend and add 1 SD to the damage. The target must make a Wisdom save or have the Frightened condition until the end of my next turn."),
				additional: "add SD to damage",
			},
			"parry": {
				name: "Parry",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc("As a Reaction when I take damage from a melee attack, I can expend and roll 1 SD to reduce the damage by it plus my Strength or Dexterity modifier (my choice)."),
				additional: "reduce damage taken by SD + Str/Dex mod",
				action: [["reaction", ""]],
			},
			"precision attack": {
				name: "Precision Attack",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc("When I miss an attack, I can expend and add 1 SD to the roll, potentially causing it to hit."),
				additional: "add SD to attack roll",
			},
			"pushing attack": {
				name: "Pushing Attack",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc("When I hit a creature with a weapon or Unarmed Strike, I can expend and add 1 SD to the damage. If Large or smaller, it must make a Str save or be pushed up to 15 ft back from me."),
				additional: "add SD to damage",
			},
			"rally": {
				name: "Rally",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc("As a Bonus Action, I can expend 1 SD to grant an ally within 30 ft who can see or hear me Temporary Hit Points equal to the SD roll plus half my Fighter level."),
				additional: levels.map(function (n) {
					return "ally gains SD + " + Math.floor(n/2) + " Temp HP";
				}),
				action: [["bonus action", ""]],
			},
			"riposte": {
				name: "Riposte",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc("As a Reaction when a creature misses me with a melee attack, I can expend 1 SD to make a melee attack with a weapon or Unarmed Strike against it, adding the SD to the damage."),
				additional: "add SD to melee damage",
				action: [["reaction", ""]],
			},
			"sweeping attack": {
				name: "Sweeping Attack",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc("When I hit a creature with a melee weapon or Unarmed Strike, I can expend 1 SD to damage another creature within reach and within 5 ft of the first. If the original attack roll would hit the second creature, it takes 1 SD damage of the same type as the original attack."),
				additional: "deal SD damage",
			},
			"tactical assessment": {
				name: "Tactical Assessment",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc("When I make a History, Investigation, or Insight check, I can expend and add 1 SD to it."),
				additional: "add SD to certain skill checks",
			},
			"trip attack": {
				name: "Trip Attack",
				extraname: "Maneuver",
				source: [["P24", 95]],
				description: desc("When I hit a creature with a weapon or Unarmed Strike, I can expend and add 1 SD to the damage. If the target is Large or smaller, it must make a Strength save or be knocked Prone."),
				additional: "add SD to damage",
			},
		},
		"subclassfeature3.2": function () {
			var a = {
				name: "Student of War",
				source: [["P24", 94]],
				minlevel: 3,
				description: ' #[Select option with "Choose Feature"]#' + desc("I gain proficiency with one type of Artisan's Tools and in one skill from the Fighter list. Use the \"Choose Feature\" button to select a skill."),
				toolProfs: [["Artisan's tools", 1]],
				choices: ["Acrobatics", "Animal Handling", "Athletics", "History", "Insight", "Intimidation", "Persuasion", "Perception", "Survival"],
			};
			for (var i = 0; i < a.choices.length; i++) {
				var attr = a.choices[i].toLowerCase();
				var skill = a.choices[i];
				a[attr] = {
					name: "Student of War: " + skill,
					description: desc("I gain proficiency with one type of Artisan's Tools of my choice and " + skill + "."),
					skills: [skill],
					prereqeval: function (v) {
						return v.skillProfsLC.indexOf(v.choice) === -1 ? true : "markButDisable";
					},
				};
			}
			return a;
		}(),
		"subclassfeature7": {
			name: "Know Your Enemy",
			source: [["P24", 94]],
			minlevel: 7,
			description: desc("As a Bonus Action, I can learn the Immunities, Resistances, and Vulnerabilities of a creature I can see within 30 ft. I can expend a Superiority Die to regain use of this."),
			action: [["bonus action", ""]],
			usages: 1,
			recovery: "Long Rest",
			altResource: "1 SD",
		},
		"subclassfeature15": {
			name: "Relentless",
			source: [["P24", 94]],
			minlevel: 15,
			description: desc("Once per turn when I do a Maneuver, I can use a d8 instead of expending a Superiority Die."),
		},
	},
});

// Monk Subclasses
AddSubClass("monk", "shadow", {
	regExpSearch: /^(?=.*shadow)((?=.*(monk|monastic))|(((?=.*martial)(?=.*(artist|arts)))|((?=.*spiritual)(?=.*warrior)))).*$/i,
	subname: "Warrior of Shadow",
	subnameShort: "Shadow",
	source: [["P24", 105]],
	features: {
		"subclassfeature3": {
			name: "Shadow Arts",
			source: [["P24", 105]],
			minlevel: 3,
			description: desc("I gain +60 ft Darkvision. I know the *Minor Illusion* cantrip, using Wis as spellcasting ability."),
			vision: [["Darkvision", "fixed 60"], ["Darkvision", "+60"]],
			spellFirstColTitle : "Ki",
			spellcastingBonus: [{
				name: "Shadow Arts",
				spells: ["minor illusion"],
				selection: ["minor illusion"],
			}, {
				name: "Shadow Arts",
				spells: ["darkness"],
				selection: ["darkness"],
				firstCol: 1,
			}],
			spellChanges: {
				"darkness": {
					components: "",
					compMaterial: "",
					description: "15-ft rad darkness; blocks other's vision/nonmagical light; dispels magical light SL \u22642; my SoT move it",
					descriptionMetric: "4,5m rad darkness; blocks other's vision/nonmagical light; dispels magical light SL \u22642; my SoT move it",
					changes: "With the Shadow Arts feature I can cast Darkness without spell components, can see through it, and can move it to a space within 60 ft of me at the start of each of my turns.",
				},
			},
			extraname: "Focus Feature",
			"shadow arts: darkness": {
				name: "Shadow Arts: Darkness",
				extraname: "Warrior of Shadow 3",
				source: [["P24", 105]],
				description: desc("I can expend 1 Focus Point to cast *Darkness* without spell components. When I do so, I can see within its area and I can move it to a space within 60 ft at the start of each of my turns."),
				additional: "1 Focus Point",
			},
			autoSelectExtrachoices: [{ extrachoice: "shadow arts: darkness" }],
		},
		"subclassfeature6": {
			name: "Shadow Step",
			source: [["P24", 105]],
			minlevel: 6,
			description: desc("As a Bonus Action while in Dim Light or Darkness, I can teleport up to 60 ft to an empty " + (typePF ? "space" : "spot") + " I can see in Dim Light or Darkness. I then gain Adv" + (typePF ? "antage" : ".") + " on my next melee attack this turn."),
			action: [["bonus action", ""]],
		},
		"subclassfeature11": {
			name: "Improved Shadow Step",
			source: [["P24", 105]],
			minlevel: 11,
			extraname: "Focus Feature",
			"improved shadow step": {
				name: "Improved Shadow Step",
				extraname: "Warrior of Shadow 11",
				source: [["P24", 105]],
				description: desc("When I use Shadow Step, I can expend 1 Focus Point to remove the need to start and end in Dim Light or Darkness, and I can make an Unarmed Strike immediately after I teleport."),
				additional: "1 Focus Point",
			},
			autoSelectExtrachoices: [{ extrachoice: "improved shadow step" }],
		},
		"subclassfeature17": {
			name: "Cloak of Shadows",
			source: [["P24", 105]],
			minlevel: 17,
			action: [["action", " (3 FP)"]],
			extraname: "Focus Feature",
			"cloak of shadows": {
				name: "Cloak of Shadows",
				extraname: "Warrior of Shadow 17",
				source: [["P24", 105]],
				description: desc([
					"As a Magic action while in Dim Light or Darkness, I can expend 3 Focus Points to shroud myself in shadows for 1 min, until I'm Incapacitated, or I end my turn in Bright Light.",
					"While shrouded, I'm Invisible, using Flurry of Blows requires no Focus Points, and I can move through occupied spaces as if they were Difficult Terrain, but can't end my turn in one.",
				]),
				additional: "3 Focus Points",
			},
			autoSelectExtrachoices: [{ extrachoice: "cloak of shadows" }],
		},
	},
});

// Paladin Subclasses

// Ranger Subclasses

// Rogue Subclasses

// Sorcerer Subclasses

// Warlock Subclasses

// Wizard Subclasses

// Backgrounds and their corresponding Background Features (which grant the origin feats)
BackgroundList["artisan"] = {
	regExpSearch: /^(?!.*guild)(?=.*artisan).*$/i,
	name: "Artisan",
	source: [["P24", 178]],
	scorestxt: "+2 to one and +1 to another -or- +1 to all three: Strength, Dexterity, and Intelligence",
	skills: ["Investigation", "Persuasion"],
	toolProfs: [["Artisan's tools", 1]],
	gold: 32,
	equipleft: [
		["Artisan's tools (same as proficiency)", "", 5],
	],
	equipright: [
		["Traveler's clothes", "", 4],
		["Pouch", "", 1],
		["Belt pouch (with coins)", "", 1],
	],
	feature: "Artisan",
	// from PHB'14 (Guild Artisan):
	traitsOriginName: "Guild Artisan",
	traitsSourceString: "PHB'14 133",
	trait: [
		"I believe that anything worth doing is worth doing right. I can't help it\u2015 I'm a perfectionist.",
		"I'm a snob who looks down on those who can't appreciate fine art.",
		"I always want to know how things work and what makes people tick.",
		"I'm full of witty aphorisms and have a proverb for every occasion.",
		"I'm rude to people who lack my commitment to hard work and fair play.",
		"I like to talk at length about my profession.",
		"I don't part with my money easily and will haggle tirelessly to get the best deal possible.",
		"I'm well known for my work, and I want to make sure everyone appreciates it. I'm always taken aback when people haven't heard of me.",
	],
	ideal: [
		"**Community**. It is the duty of all civilized people to strengthen the bonds of community and the security of civilization. (Lawful)",
		"**Generosity**. My talents were given to me so that I could use them to benefit the world. (Good)",
		"**Freedom**. Everyone should be free to pursue his or her own livelihood. (Chaotic)",
		"**Greed**. I'm only in it for the money. (Evil)",
		"**People**. I'm committed to the people I care about, not to ideals. (Neutral)",
		"**Aspiration**. I work hard to be the best there is at my craft. (Any)",
	],
	bond: [
		"The workshop where I learned my trade is the most important place in the world to me.",
		"I created a great work for someone, and then found them unworthy to receive it. I'm still looking for someone worthy.",
		"I owe my guild a great debt for forging me into the person I am today.",
		"I pursue wealth to secure someone's love.",
		"One day I will return to my guild and prove that I am the greatest artisan of them all.",
		"I will get revenge on the evil forces that destroyed my place of business and ruined my livelihood.",
	],
	flaw: [
		"I'll do anything to get my hands on something rare or priceless.",
		"I'm quick to assume that someone is trying to cheat me.",
		"No one must ever learn that I once stole money from guild coffers.",
		"I'm never satisfied with what I have\u2015 I always want more.",
		"I would kill to acquire a noble title.",
		"I'm horribly jealous of anyone who can outshine my handiwork. Everywhere I go, I'm surrounded by rivals.",
	],
	extra: [
		"Select a Artisan Business",
		"Alchemists and apothecaries",
		"Armorers, locksmiths, and finesmiths",
		"Brewers, distillers, and vintners",
		"Calligraphers, scribes, and scriveners",
		"Carpenters, roofers, and plasterers",
		"Cartographers, surveyors, and chart-makers",
		"Cobblers and shoemakers",
		"Cooks and bakers",
		"Glassblowers and glaziers",
		"Jewelers and gemcutters",
		"Leatherworkers, skinners, and tanners",
		"Masons and stonecutters",
		"Painters, limners, and sign-makers",
		"Potters and tile-makers",
		"Shipwrights and sailmakers",
		"Smiths and metal-forgers",
		"Tinkers, pewterers, and casters",
		"Wagon-makers and wheelwrights",
		"Weavers and dyers",
		"Woodcarvers, coopers, and bowyers",
	],
};
BackgroundFeatureList["artisan"] = {
	description: "I began mopping floors and scrubbing counters in an artisan's workshop for a few coppers per day as soon as I was strong enough to carry a bucket. When I was old enough to apprentice, I learned to create basic crafts of my own, as well as how to sweet talk the occasional demanding customer. My trade has also given me a keen eye for detail.",
	source: [["P24", 178]],
	featsAdd: ["Crafter"],
};
BackgroundList["charlatan"] = {
	regExpSearch: /charlatan/i,
	name: "Charlatan",
	source: [["P24", 179]],
	scorestxt: "+2 to one and +1 to another -or- +1 to all three: Dexterity, Constitution, and Charisma",
	skills: ["Deception", "Sleight of Hand"],
	toolProfs: [["Forgery Kit", "Dex"]],
	gold: 15,
	equipleft: [
		["Forgery kit", "", 5],
		["Costume clothes", "", 1],
	],
	equipright: [
		["Fine clothes", "", 6],
		["Belt pouch (with coins)", "", 1],
	],
	feature: "Charlatan",
	// from PHB'14:
	traitsSourceString: "PHB'14 128",
	trait: [
		"I fall in and out of love easily, and am always pursuing someone.",
		"I have a joke for every occasion, especially occasions where humor is inappropriate.",
		"Flattery is my preferred trick for getting what I want.",
		"I'm a born gambler who can't resist taking a risk for a potential payoff.",
		"I lie about almost everything, even when there's no good reason to.",
		"Sarcasm and insults are my weapons of choice.",
		"I keep multiple holy symbols on me and invoke whatever deity might come in useful at any given moment.",
		"I pocket anything I see that might have some value.",
	],
	ideal: [
		"**Independence**. I am a free spirit \u2015 no one tells me what to do. (Chaotic)",
		"**Fairness**. I never target people who can't afford to lose a few coins. (Lawful)",
		"**Charity**. I distribute the money I acquire to the people who really need it. (Good)",
		"**Creativity**. I never run the same con twice. (Chaotic)",
		"**Friendship**. Material goods come and go. Bonds of friendship last forever. (Good)",
		"**Aspiration**. I'm determined to make something of myself. (Any)",
	],
	bond: [
		"I fleeced the wrong person and must work to ensure that this individual never crosses paths with me or those I care about.",
		"I owe everything to my mentor \u2015 a horrible person who's probably rotting in jail somewhere.",
		"Somewhere out there, I have a child who doesn't know me. I'm making the world better for him or her.",
		"I come from a noble family, and one day I'll reclaim my lands and title from those who stole them from me.",
		"A powerful person killed someone I love. Someday soon, I'll have my revenge.",
		"I swindled and ruined a person who didn't deserve it. I seek to atone for my misdeeds but might never be able to forgive myself.",
	],
	flaw: [
		"I can't resist a pretty face.",
		"I'm always in debt. I spend my ill-gotten gains on decadent luxuries faster than I bring them in.",
		"I'm convinced that no one could ever fool me the way I fool others.",
		"I'm too greedy for my own good. I can't resist taking a risk if there's money involved.",
		"I can't resist swindling people who are more powerful than me.",
		"I hate to admit it and will hate myself for it, but I'll run and preserve my own hide if the going gets tough.",
	],
	extra: [
		"Select a Favorite Scheme",
		"Cheat at games of chance",
		"Shave coins, forge documents",
		"User/manipulator",
		"Change identity",
		"Sleight-of-hand cons",
		"Sell junk as expensive necessities",
	],
};
BackgroundFeatureList["charlatan"] = {
	description: "Once I was old enough to order an ale, I soon had a favorite stool in every tavern within ten miles of where I was born. As I traveled the circuit from public house to watering hole, I learned to prey on unfortunates who were in the market for a comforting lie or two - perhaps a sham potion or forged ancestry records.",
	source: [["P24", 179]],
	featsAdd: ["Skilled"],
};
BackgroundList["entertainer"] = {
	regExpSearch: /(entertainer|actor|dancer|fire.?eater|jester|juggler|instrumentalist|poet|singer|storyteller|tumbler)/i,
	name: "Entertainer",
	source: [["P24", 180]],
	scorestxt: "+2 to one and +1 to another -or- +1 to all three: Strength, Dexterity, and Charisma",
	skills: ["Acrobatics", "Performance"],
	toolProfs: [["Musical Instrument", 1]],
	gold: 11,
	equipleft: [
		["Costume clothes", 2, 1],
		["Mirror", "", 0.5],
		["Perfume", "", ""],
	],
	equipright: [
		["Traveler's clothes", "", 4],
		["Musical instrument (choose one)", "", 1],
		["Belt pouch (with coins)", "", 1],
	],
	feature: "Entertainer",
	// from PHB'14:
	traitsSourceString: "PHB'14 130",
	trait: [
		"I know a story relevant to almost every situation.",
		"Whenever I come to a new place, I collect local rumors and spread gossip.",
		"I'm a hopeless romantic, always searching for that 'special someone'.",
		"Nobody stays angry at me or around me for long, since I can defuse any amount of tension.",
		"I love a good insult, even one directed at me.",
		"I get bitter if I'm not the center of attention.",
		"I'll settle for nothing less than perfection.",
		"I change my mood or my mind as quickly as I change key in a song.",
	],
	ideal: [
		"**Beauty**. When I perform, I make the world better than it was. (Good)",
		"**Tradition**. The stories, legends, and songs of the past must never be forgotten, for they teach us who we are. (Lawful)",
		"**Creativity**. The world is in need of new ideas and bold action. (Chaotic)",
		"**Greed**. I'm only in it for the money and fame. [Evil]",
		"**People**. I like seeing the smiles on people's faces when I perform. That's all that matters. (Neutral)",
		"**Honesty**. Art should reflect the soul; it should come from within and reveal who we really are. (Any)",
	],
	bond: [
		"My instrument is my most treasured possession, and it reminds me of someone I love.",
		"Someone stole my precious instrument, and someday I'll get it back.",
		"I want to be famous, whatever it takes.",
		"I idolize a hero of the old tales and measure my deeds against that person's.",
		"I will do anything to prove myself superior to my hated rival.",
		"I would do anything for the other members of my old troupe.",
	],
	flaw: [
		"I'll do anything to win fame and renown.",
		"I'm a sucker for a pretty face.",
		"A scandal prevents me from ever going home again. That kind of trouble seems to follow me around.",
		"I once satirized a noble who still wants my head. It was a mistake that I will likely repeat.",
		"I have trouble keeping my true feelings hidden. My sharp tongue lands me in trouble.",
		"Despite my best efforts, I am unreliable to my friends.",
	],
	extra: [
		"Select an Entertainer Routine",
		"Actor",
		"Dancer",
		"Fire-eater",
		"Jester",
		"Juggler",
		"Instrumentalist",
		"Poet",
		"Singer",
		"Storyteller",
		"Tumbler",
	],
};
BackgroundFeatureList["entertainer"] = {
	description: "I spent much of my youth following roving fairs and carnivals, performing odd jobs for musicians and acrobats in exchange for lessons. I may have learned how to walk a tightrope, how to play a lute in a distinct style, or how to recite poetry with impeccable diction. To this day, I thrive on applause and long for the stage.",
	source: [["P24", 180]],
	featsAdd: ["Musician"],
};
BackgroundList["farmer"] = {
	regExpSearch: /farmer/i,
	name: "Farmer",
	source: [["P24", 180]],
	scorestxt: "+2 to one and +1 to another -or- +1 to all three: Strength, Constitution, and Wisdom",
	skills: ["Animal Handling", "Nature"],
	toolProfs: [["Carpenter's Tools", "Str"]],
	gold: 30,
	equipleft: [
		["Iron pot", "", 10],
		["Shovel", "", 5],
		["Healer's kit", "", 3],
		["Carpenter's tools", "", 6],
	],
	equipright: [
		["Traveler's clothes", "", 4],
		["Belt pouch (with coins)", "", 1],
		["Sickle", "", 2],
	],
	equip1stPage: {
		weapons: ["Sickle"],
	},
	feature: "Farmer",
	// from PHB'14 (Folk Hero):
	traitsOriginName: "Folk Hero",
	traitsSourceString: "PHB'14 131",
	trait: [
		"I judge people by their actions, not their words.",
		"If someone is in trouble, I'm always ready to lend help.",
		"When I set my mind to something, I follow through no matter what gets in my way.",
		"I have a strong sense of fair play and always try to find the most equitable solution to arguments.",
		"I'm confident in my own abilities and do what I can to instill confidence in others.",
		"Thinking is for other people. I prefer action.",
		"I misuse long words in an attempt to sound smarter.",
		"I get bored easily. When am I going to get on with my destiny?",
	],
	ideal: [
		"**Respect**. People deserve to be treated with dignity and respect. (Good)",
		"**Fairness**. No one should get preferential treatment before the law, and no one is above the law. (Lawful)",
		"**Freedom**. Tyrants must not be allowed to oppress the people. (Chaotic)",
		"**Might**. If I become strong, I can take what I want\u2015 what I deserve. (Evil)",
		"**Sincerity**. There's no good in pretending to be something I'm not. (Neutral)",
		"**Destiny**. Nothing and no one can steer me away from my higher calling. (Any)",
	],
	bond: [
		"I have a family, but I have no idea where they are. One day, I hope to see them again.",
		"I worked the land, I love the land, and I will protect the land.",
		"A proud noble once gave me a horrible beating, and I will take my revenge on any bully I encounter.",
		"My tools are symbols of my past life, and I carry them so that I will never forget my roots.",
		"I protect those who cannot protect themselves.",
		"I wish my childhood sweetheart had come with me to pursue my destiny.",
	],
	flaw: [
		"The tyrant who rules my land will stop at nothing to see me killed.",
		"I'm convinced of the significance of my destiny, and blind to my shortcomings and the risk of failure.",
		"The people who knew me when I was young know my shameful secret, so I can never go home again.",
		"I have a weakness for the vices of the city, especially hard drink.",
		"Secretly, I believe that things would be better if I were a tyrant lording over the land.",
		"I have trouble trusting in my allies.",
	],
	extra: [
		"Select a Defining Event",
		"I stood up to a tyrant's agents",
		"I saved people during a natural disaster",
		"I stood alone against a terrible monster",
		"I stole from a corrupt merchant for the poor",
		"I led a militia to fight off an invading army",
		"I stole weapons from a tyrant to arm the people",
		"I trained peasantry to fight a tyrant with farm tools",
		"A decree was rescinded after I led a protest against it",
		"A magical creature gave me a blessing or insight",
		"I rose to leadership in a lord's army",
	],
};
BackgroundFeatureList["farmer"] = {
	description: "I grew up close to the land. Years tending animals and cultivating the earth rewarded me with patience and good health. I have a keen appreciation for nature's bounty alongside a healthy respect for nature's wrath.",
	source: [["P24", 180]],
	featsAdd: ["Tough"],
};
BackgroundList["guard"] = {
	regExpSearch: /guard/i,
	name: "Guard",
	source: [["P24", 181]],
	scorestxt: "+2 to one and +1 to another -or- +1 to all three: Strength, Intelligence, and Wisdom",
	skills: ["Athletics", "Perception"],
	toolProfs: [["Gaming Set", 1]],
	gold: 12,
	equipleft: [
		["Manacles", "", 6],
		["Hooded lantern", "", 2],
		["Gaming set (same as proficiency)", "", ""],
	],
	equipright: [
		["Traveler's clothes", "", 4],
		["Belt pouch (with coins)", "", 1],
		["Spear", "", 3],
		["Light crossbow", "", 5],
		["Crossbow bolt case, with:", "", 1],
		["- Crossbow bolts", 20, 0.075],
	],
	equip1stPage: {
		weapons: ["Spear", "Light Crossbow"],
		ammo: [["Bolts", 20]],
	},
	feature: "Guard",
};
BackgroundFeatureList["guard"] = {
	description: "My feet ache when I remember the countless hours I spent at my post in the tower. I was trained to keep one eye looking outside the wall watching for marauders sweeping from the nearby forest, and my other eye looking inside the wall searching for cut purses and troublemakers.",
	source: [["P24", 181]],
	featsAdd: ["Alert"],
};
BackgroundList["guide"] = {
	regExpSearch: /^(?!.*urban)(?=.*(guide|outlander|forester|trapper|homesteader|exile|outcast|bounty.?hunter|tribal nomad|hunter.?gatherer|tribal.?marauder)).*$/i,
	name: "Guide",
	source: [["P24", 181]],
	scorestxt: "+2 to one and +1 to another -or- +1 to all three: Dexterity, Constitution, and Wisdom",
	skills: ["Stealth", "Survival"],
	toolProfs: [["Cartographer's Tools", "Wis"]],
	gold: 3,
	equipleft: [
		["Bedroll", "", 7],
		["Cartographer's tools", "", 6],
		["Two-person tent", "", 20],
	],
	equipright: [
		["Traveler's clothes", "", 4],
		["Belt pouch (with coins)", "", 1],
		["Shortbow", "", 2],
		["Quiver, with:", "", 1],
		["- Arrows", 20, 0.05],
	],
	equip1stPage: {
		weapons: ["Shortbow"],
		ammo: [["Arrows", 20]],
	},
	feature: "Guide",
	// from PHB'14 (Outlander):
	traitsOriginName: "Outlander",
	traitsSourceString: "PHB'14 137",
	trait: [
		"I'm driven by a wanderlust that led me away from home.",
		"I watch over my friends as if they were a litter of newborn pups.",
		"I once ran twenty-five miles without stopping to warn to my clan of an approaching orc horde. I'd do it again if I had to.",
		"I have a lesson for every situation, drawn from observing nature.",
		"I place no stock in wealthy or well-mannered folk. Money and manners won't save you from a hungry owlbear.",
		"I'm always picking things up, absently fiddling with them, and sometimes accidentally breaking them.",
		"I feel far more comfortable around animals than people.",
		"I was, in fact, raised by wolves.",
	],
	ideal: [
		"**Change**. Life is like the seasons, in constant change, and we must change with it. (Chaotic)",
		"**Greater Good**. It is each person's responsibility to make the most happiness for the whole tribe. (Good)",
		"**Honor**. If I dishonor myself, I dishonor my whole clan. (Lawful)",
		"**Might**. The strongest are meant to rule. (Evil)",
		"**Nature**. The natural world is more important than all the constructs of civilization. (Neutral)",
		"**Glory**. I must earn glory in battle, for myself and my clan. (Any)",
	],
	bond: [
		"My family, clan, or tribe is the most important thing in my life, even when they are far from me.",
		"An injury to the unspoiled wilderness of my home is an injury to me.",
		"I will bring terrible wrath down on the evildoers who destroyed my homeland.",
		"I am the last of my tribe, and it is up to me to ensure their names enter legend.",
		"I suffer awful visions of a coming disaster and will do anything to prevent it.",
		"It is my duty to provide children to sustain my tribe.",
	],
	flaw: [
		"I am too enamored of ale, wine, and other intoxicants.",
		"There's no room for caution in a life lived to the fullest.",
		"I remember every insult I've received and nurse a silent resentment toward anyone who's ever wronged me.",
		"I am slow to trust members of other races, tribes, and societies.",
		"Violence is my answer to almost any challenge.",
		"Don't expect me to save those who can't save themselves. It is nature's way that the strong thrive and the weak perish.",
	],
	extra: ["Select an Origin",
		"Forester",
		"Trapper",
		"Homesteader",
		"Guide",
		"Exile or outcast",
		"Bounty hunter",
		"Pilgrim",
		"Tribal nomad",
		"Hunter-gatherer",
		"Tribal marauder",
	],
};
BackgroundFeatureList["guide"] = {
	description: "I came of age outdoors, far from settled lands. My home was anywhere I chose to spread my bedroll. The wilderness has wonders like strange monsters, pristine forests, streams, overgrown ruins, and I learned to fend for myself as I explored them. From time to time, I guided nature priests who taught me the fundamentals of using the magic of the wild.",
	source: [["P24", 181]],
	featsAdd: [{ key: "magic initiate", choice: "druid" }],
};
BackgroundList["hermit"] = {
	regExpSearch: /hermit/i,
	name: "Hermit",
	source: [["P24", 182]],
	scorestxt: "+2 to one and +1 to another -or- +1 to all three: Constitution, Wisdom, and Charisma",
	skills: ["Medicine", "Religion"],
	toolProfs: [["Herbalism Kit", "Int"]],
	gold: 16,
	equipleft: [
		["Bedroll", "", 7],
		["Book (philosophy)", "", 5],
		["Herbalism kit", "", 3],
		["Lamp", "", 1],
		["Oil, flasks of", 3, 1],
	],
	equipright: [
		["Traveler's clothes", "", 4],
		["Belt pouch (with coins)", "", 1],
		["Quarterstaff", "", 4],
	],
	equip1stPage: {
		weapons: ["Quarterstaff"],
	},
	feature: "Hermit",
	// from PHB'14:
	traitsSourceString: "PHB'14 134",
	trait: [
		"I've been isolated for so long that I rarely speak, preferring gestures and the occasional grunt.",
		"I am utterly serene, even in the face of disaster.",
		"The leader of my community had something wise to say on every topic, and I am eager to share that wisdom.",
		"I feel tremendous empathy for all who suffer.",
		"I'm oblivious to etiquette and social expectations.",
		"I connect everything that happens to me to a grand, cosmic plan.",
		"I often get lost in my own thoughts and contemplation, becoming oblivious to my surroundings.",
		"I am working on a grand philosophical theory and love sharing my ideas.",
	],
	ideal: [
		"**Greater Good**. My gifts are meant to be shared with all, not used for my own benefit. (Good)",
		"**Logic**. Emotions must not cloud our sense of what is right and true, or our logical thinking. (Lawful)",
		"**Free Thinking**. Inquiry and curiosity are the pillars of progress. (Chaotic)",
		"**Power**. Solitude and contemplation are paths toward mystical or magical power. (Evil)",
		"**Live and Let Live**. Meddling in the affairs of others only causes trouble. (Neutral)",
		"**Self-Knowledge**. If you know yourself, there's nothing left to know. (Any)",
	],
	bond: [
		"Nothing is more important than the other members of my hermitage, order, or association.",
		"I entered seclusion to hide from the ones who might still be hunting me. I must someday confront them.",
		"I'm still seeking the enlightenment I pursued in my seclusion, and it still eludes me.",
		"I entered seclusion because I loved someone I could not have.",
		"Should my discovery come to light, it could bring ruin to the world.",
		"My isolation gave me great insight into a great evil that only I can destroy.",
	],
	flaw: [
		"Now that I've returned to the world, I enjoy its delights a little too much.",
		"I harbor dark, bloodthirsty thoughts that my isolation and meditation failed to quell.",
		"I am dogmatic in my thoughts and philosophy.",
		"I let my need to win arguments overshadow friendships and harmony.",
		"I'd risk too much to uncover a lost bit of knowledge.",
		"I like keeping secrets and won't share them with anyone.",
	],
	extra: [
		"Select a Life of Seclusion",
		"Searching for spiritual enlightenment",
		"Living in accordance with a religious order",
		"Exiled for a crime I didn't commit",
		"Retreated from society after a life-altering event",
		"Worked on my art, literature, music, or manifesto",
		"Commune with nature, far from civilization",
		"Caretaker of an ancient ruin or relic",
		"Pilgrim in search of a thing of spiritual significance",
	],
};
BackgroundFeatureList["hermit"] = {
	description: "I spent my early years secluded in a hut or monastery located well beyond the outskirts of the nearest settlement. In those days, my only companions were the creatures of the forest and those who would occasionally visit to bring news of the outside world and supplies. The solitude allowed me to spend many hours pondering the mysteries of creation.",
	source: [["P24", 182]],
	featsAdd: ["Healer"],
};
BackgroundList["merchant"] = {
	regExpSearch: /^(?!.*guild)(?=.*merchant).*$/i,
	name: "Merchant",
	source: [["P24", 182]],
	scorestxt: "+2 to one and +1 to another -or- +1 to all three: Constitution, Intelligence, and Charisma",
	skills: ["Animal Handling", "Persuasion"],
	toolProfs: [["Navigator's Tools", "Wis"]],
	gold: 22,
	equipleft: [
		["Navigator's tools", "", 2],
	],
	equipright: [
		["Traveler's clothes", "", 4],
		["Pouch", "", 1],
		["Belt pouch (with coins)", "", 1],
	],
	feature: "Merchant",
	// from PHB'14 (Guild Merchant variant for the Guild Artisan):
	traitsOriginName: "Guild Merchant",
	traitsSourceString: "PHB'14 133",
	extra: [
		"Select a Business",
		"Trader",
		"Caravan master",
		"Shopkeeper",
	],
};
BackgroundFeatureList["merchant"] = {
	description: "I was apprenticed to a trader, caravan master, or shopkeeper, learning the fundamentals of commerce. I traveled broadly and earned a living by buying and selling raw materials artisans need to practice their craft, or their finished works. I transported goods from one place to another or bought them from traveling traders and sold them in my own shop.",
	source: [["P24", 182]],
	featsAdd: ["Lucky"],
};
BackgroundList["noble"] = {
	regExpSearch: /^(?!.*(waterdhavian|waterdeep|knight))(?=.*noble).*$/i,
	name: "Noble",
	source: [["P24", 183]],
	scorestxt: "+2 to one and +1 to another -or- +1 to all three: Strength, Intelligence, and Charisma",
	skills: ["History", "Persuasion"],
	toolProfs: [["Gaming Set", 1]],
	gold: 25,
	equipleft: [
		["Gaming set (same as proficiency)", "", ""],
		["Perfume", "", ""],
	],
	equipright: [
		["Fine clothes", "", 6],
		["Purse (with coins)", "", 1],
	],
	feature: "Noble",
	// from PHB'14:
	traitsSourceString: "PHB'14 135",
	trait: [
		"My eloquent flattery makes everyone I talk to feel like the most wonderful and important person in the world.",
		"The common folk love me for my kindness and generosity.",
		"No one could doubt by looking at my regal bearing that I am a cut above the unwashed masses.",
		"I take great pains to always look my best and follow the latest fashions.",
		"I don't like to get my hands dirty, and I won't be caught dead in unsuitable accommodations.",
		"Despite my noble birth, I do not place myself above other folk. We all have the same blood.",
		"My favor, once lost, is lost forever.",
		"If you do me an injury, I will crush you, ruin your name, and salt your fields.",
	],
	ideal: [
		"**Respect**. Respect is due to me because of my position, but all people regardless of station deserve to be treated with dignity. (Good)",
		"**Responsibility**. It is my duty to respect the authority of those above me, just as those below me must respect mine. (Lawful)",
		"**Independence**. I must prove that I can handle myself without the coddling of my family. (Chaotic)",
		"**Power**. If I can attain more power, no one will tell me what to do. (Evil)",
		"**Family**. Blood runs thicker than water. (Any)",
		"**Noble Obligation**. It is my duty to protect and care for the people beneath me. (Good)",
	],
	bond: [
		"I will face any challenge to win the approval of my family.",
		"My house's alliance with another noble family must be sustained at all costs.",
		"Nothing is more important than the other members of my family.",
		"I am in love with the heir of a family that my family despises.",
		"My loyalty to my sovereign is unwavering.",
		"The common folk must see me as a hero of the people.",
	],
	flaw: [
		"I secretly believe that everyone is beneath me.",
		"I hide a truly scandalous secret that could ruin my family forever.",
		"I too often hear veiled insults and threats in every word addressed to me, and I'm quick to anger.",
		"I have an insatiable desire for carnal pleasures.",
		"In fact, the world does revolve around me.",
		"By my words and actions, I often bring shame to my family.",
	],
};
BackgroundFeatureList["noble"] = {
	description: "I was raised in a castle, surrounded by wealth, power, and privilege. My family of minor aristocrats ensured that I received a first-class education, some of which I appreciated and some of which I resented. My time in the castle, especially the many hours I spent observing my family at court, also taught me a great deal about leadership.",
	source: [["P24", 183]],
	featsAdd: ["Skilled"],
};
BackgroundList["sailor"] = {
	regExpSearch: /sailor/i,
	name: "Sailor",
	source: [["P24", 184]],
	scorestxt: "+2 to one and +1 to another -or- +1 to all three: Strength, Dexterity, and Wisdom",
	skills: ["Acrobatics", "Perception"],
	toolProfs: [["Navigator's Tools", "Wis"]],
	gold: 20,
	equipleft: [
	  ["Navigator's tools", "", 2],
	  ["Rope", "", 5],
	],
	equipright: [
	  ["Traveler's clothes", "", 4],
	  ["Belt pouch (with coins)", "", 1],
	  ["Dagger", "", 1],
	],
	equip1stPage: {
		weapons: ["Dagger"],
	},
	feature: "Sailor",
	// from PHB'14:
	traitsSourceString: "PHB'14 139",
	trait: [
		"My friends know they can rely on me, no matter what.",
		"I work hard so that I can play hard when the work is done.",
		"I enjoy sailing into new ports and making new friends over a flagon of ale.",
		"I stretch the truth for the sake of a good story.",
		"To me, a tavern brawl is a nice way to get to know a new city.",
		"I never pass up a friendly wager.",
		"My language is as foul as an otyugh nest.",
		"I like a job well done, especially if I can convince someone else to do it.",
	],
	ideal: [
		"**Respect**. The thing that keeps a ship together is mutual respect between captain and crew. (Good)",
		"**Fairness**. We all do the work, so we all share in the rewards. (Lawful)",
		"**Freedom**. The sea is freedom\u2015 the freedom to go anywhere and do anything. (Chaotic)",
		"**Mastery**. I'm a predator, and the other ships on the sea are my prey. (Evil)",
		"**People**. I'm committed to my crewmates, not to ideals. (Neutral)",
		"**Aspiration**. Someday I'll own my own ship and chart my own destiny. (Any)",
	],
	bond: [
		"I'm loyal to my captain first, everything else second.",
		"The ship is most important\u2015 crewmates and captains come and go.",
		"I'll always remember my first ship.",
		"In a harbor town, I have a paramour whose eyes nearly stole me from the sea.",
		"I was cheated out of my fair share of the profits, and I want to get my due.",
		"Ruthless pirates murdered my captain and crewmates, plundered our ship, and left me to die. Vengeance will be mine.",
	],
	flaw: [
		"I follow orders, even if I think they're wrong.",
		"I'll say anything to avoid having to do extra work.",
		"Once someone questions my courage, I never back down no matter how dangerous the situation.",
		"Once I start drinking, it's hard for me to stop.",
		"I can't help but pocket loose coins and other trinkets I come across.",
		"My pride will probably lead to my destruction.",
	],
};
BackgroundFeatureList["sailor"] = {
	description: "I lived as a seafarer, wind at my back and decks swaying beneath my feet. I've perched on bar stools in more ports of call than I can remember, faced mighty storms, and swapped stories with folk who live beneath the waves.",
	source: [["P24", 184]],
	featsAdd: ["Tavern Brawler"],
};
BackgroundList["scribe"] = {
	regExpSearch: /scribe/i,
	name: "Scribe",
	source: [["P24", 184]],
	scorestxt: "+2 to one and +1 to another -or- +1 to all three: Dexterity, Intelligence, and Wisdom",
	skills: ["Investigation", "Perception"],
	toolProfs: [["Calligrapher's Supplies", "Dex"]],
	gold: 23,
	equipleft: [
		["Calligrapher's supplies", "", 5],
		["Lamp", "", 1],
		["Oil, flasks of", 3, 1],
		["Parchment, sheets of", 12, ""],
	],
	equipright: [
		["Fine clothes", "", 6],
		["Belt pouch (with coins)", "", 1],
	],
	feature: "Scribe",
};
BackgroundFeatureList["scribe"] = {
	description: "I spent formative years in a scriptorium, monastery, or government agency, where I learned to write with a clear hand and produce finely written texts. Perhaps I scribed government documents, or copied tomes, or perhaps I've written poetry, prose, or scholarly research. I have an attention to detail, helping me avoid mistakes in that I copy or create.",
	source: [["P24", 184]],
	featsAdd: ["Skilled"],
};
BackgroundList["wayfarer"] = {
	regExpSearch: /wayfarer/i,
	name: "Wayfarer",
	source: [["P24", 185]],
	scorestxt: "+2 to one and +1 to another -or- +1 to all three: Dexterity, Wisdom, and Charisma",
	skills: ["Insight", "Stealth"],
	toolProfs: [["Thieves' Tools", "Dex"]],
	gold: 16,
	equipleft: [
		["Bedroll", "", 7],
		["Gaming set (choose one)", "", ""],
		["Thieves' tools", "", 1],
	],
	equipright: [
		["Traveler's clothes", "", 4],
		["Pouch", "", 1],
		["Belt pouch (with coins)", "", 1],
		["Dagger", 2, 1],
	],
	equip1stPage: {
		weapons: ["Dagger", "Dagger (off-hand)"],
	},
	feature: "Wayfarer",
	// from PHB'14 (Urchin):
	traitsOriginName: "Urchin",
	traitsSourceString: "PHB'14 141",
	trait: [
		"I keep scraps of food and trinkets hidden away in my pockets.",
		"I ask questions all the time.",
		"I like to squeeze into compact places where nobody can harm me.",
		"I sleep with my back to solid surface, with all that I own embraced tightly in my arms.",
		"I have bad manners and eat like a pig.",
		"I expect that anybody who's nice to me is hiding malicious intent.",
		"I eschew bathing.",
		"I say, without reserve, what other people are implying or masking.",
	],
	ideal: [
		"**Respect**. Everybody, no matter their riches, deserves respect. (Good)",
		"**Community**. We have to take look out for each other, because nobody else will do it for us. (Lawful)",
		"**Change**. The low rise up, and the high and mighty come down. Change is natural. (Chaotic)",
		"**Retribution**. The rich need to be shown how it is to live and die in the poor quarters. (Evil)",
		"**People**. I help those who help me\u2015 that is what lets us stay alive. (Neutral)",
		"**Aspiration**. I'm going to prove that I'm worthy of a better life. (Any)",
	],
	bond: [
		"My town or city is my home, and I'll battle those that threaten it.",
		"I'm the benefactor of an orphanage so others may be kept from enduring what I was forced to endure.",
		"I owe my life to another urchin who taught me the ways of living in the gutters.",
		"I owe a debt I can never repay to the person who showed me sympathy.",
		"I got away from my life of poverty by robbing an influential person, and I'm wanted for it.",
		"No one else should have to suffer the difficulties I've been through.",
	],
	flaw: [
		"I will run away from a fight if I'm outnumbered.",
		"A gold piece already has a lot of value to me, and I'll do just about anything for more of it.",
		"I will never completely trust another. I only trust myself.",
		"I would rather use an unfair advantage than fight honorably.",
		"It's not theft if I have more use for it than someone else.",
		"People who are incapable of taking care of themselves get what they deserve.",
	],
};
BackgroundFeatureList["wayfarer"] = {
	description: "I grew up on the streets surrounded by similarly ill-fated castoffs, a few of them friends and a few of them rivals. I slept where I could and did odd jobs for food. At times, when the hunger became unbearable, I resorted to theft. Still, I never lost my pride and never abandoned hope. Fate is not yet finished with me.",
	source: [["P24", 185]],
	featsAdd: ["Lucky"],
};

// Species
RaceList["aasimar"] = {
	regExpSearch: /^((?=.*aasimar)|((?=.*planetouched)(?=.*(celestial|angel)))).*$/i,
	name: "Aasimar",
	source: [["P24", 186]],
	plural: "Aasimar",
	size: [3, 4],
	speed: { walk: { spd: 30, enc: 20 } },
	vision: [["Darkvision", 60]],
	dmgres: ["Necrotic", "Radiant"],
	spellcastingAbility: 6,
	spellcastingBonus: [{
		name: "Light Bearer",
		spells: ["light"],
		selection: ["light"],
	}],
	features: {
		"healing hands": {
			name: "Healing Hands",
			source: [["P24", 186]],
			minlevel: 1,
			usages: 1,
			recovery: "long rest",
			action: [["action", ""]],
			additional: ProficiencyBonusList.map(function(n) { return n + "d4 healing"; }),
		},
		"celestial revelation": {
			name: "Celestial Revelation",
			source: [["P24", 186]],
			minlevel: 3,
			usages: 1,
			recovery: "long rest",
			additional: ProficiencyBonusList.map(function(n) { return "+" + n + " damage"; }),
			action: [["bonus action", ""]],
			toNotesPage: [{
				name: "Celestial Revelation",
				note: [
					"As a Bonus Action once per Long Rest, I can transform using one of the options below (choose the option each time). This lasts for 1 min or until I end it (no action).",
					"While transformed, once on each of my turns when I deal damage with an attack or spell, I can deal my Proficiency Bonus in extra damage to one target. This extra damage's type is Necrotic for Necrotic Shroud, or Radiant for Heavenly Wings and Inner Radiance.",
					" **\u2022 Heavenly Wings**. Two spectral wings sprout from my back temporarily. Until the transformation ends, I have a Fly Speed equal to my Speed.",
					"While transformed like this, the extra damage on attacks/spells mentioned above is Radiant.",
					" **\u2022 Inner Radiance**. Searing light temporarily radiates from my eyes and mouth. For the duration, I shed Bright Light in a 10-ft radius and Dim Light for an additional 10 ft, and at the end of each of my turns, each creature within 10 ft of me takes Radiant damage equal to my Proficiency Bonus",
					"While transformed like this, the extra damage on attacks/spells mentioned above is Radiant.",
					" **\u2022 Necrotic Shroud**. My eyes briefly become pools of darkness, and flightless wings sprout from my back temporarily. Creatures other than my allies within 10 ft of me must succeed on a Charisma saving throw (DC 8 + Cha mod + Prof. Bonus) or have the Frightened condition until the end of my next turn.",
					"While transformed like this, the extra damage on attacks/spells mentioned above is Necrotic.",
				],
				additional: "1\xD7 per long rest",
			}],
		},
	},
	trait: [
		"**Aasimar**",
		"##\u25C6 Healing Hands##. As a Magic action once per Long Rest, I can touch a creature and restore HP to it for a number of d4s equal to my Proficiency Bonus.",
		"##\u25C6 Light Bearer##. I know the *Light* cantrip. Charisma is my spellcasting ability for it.",
		"##\u25C6 Celestial Revelation## (level 3). As a Bonus Action once per Long Rest, I can transform for 1 min or until I end it (no action). Once on each of my turns while transformed, I can deal my Prof. Bonus in extra damage. I choose how I transform each time. See Notes page.",
	].join("\n"),
	// from VGM:
	age : " reach adulthood in their late teens and live around 160 years",
	height: " are about 2-4 ft (small) or 4-7 ft (medium) tall (4'8\" + 2d10\")",
	weight : " weigh around 165 lb (110 + 2d10 \xD7 2d4 lb)",
	heightMetric: " are about 60-120 cm (small) or 120-210 cm (medium) tall (145 + 5d10 cm)",
	weightMetric : " weigh around 75 kg (50 + 5d10 \xD7 4d4 / 10 kg)",
};

// Origin feats
FeatsList["crafter"] = {
	name: "Crafter",
	source: [["P24", 200]],
	type: "origin",
	description: "I received a 20% discount on nonmagical items. I'm proficient with three Artisan's Tools of choice from the Fast Crafting table. Fast Crafting. I can craft one item from that table during a Long Rest, which lasts until I finish another Long Rest. I need to have the associated tools and proficiency to do this. [See Notes page]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Tool Proficiency***. You gain proficiency with three different Artisan's Tools of your choice from the Fast Crafting table.",
		"***Discount***. Whenever you buy a nonmagical item, you receive a 20 percent discount on it.",
		"***Fast Crafting***. When you finish a Long Rest, you can craft one piece of gear from the Fast Crafting table, provided you have the Artisan's Tools associated with that item and have proficiency with those tools. The item lasts until you finish another Long Rest, at which point the item falls apart.",
		[
			["Artisan's Tools", "Crafted Gear"],
			["Carpenter's Tools", "Ladder, Torch"],
			["Leatherworker's Tools", "Crossbow Bolt Case, Map or Scroll Case, Pouch"],
			["Mason's Tools", "Block and Tackle"],
			["Potter's Tools", "Jug, Lamp"],
			["Smith's Tools", "Ball Bearings, Bucket, Caltrops, Grappling Hook, Iron Pot"],
			["Tinker's Tools", "Bell, Shovel, Tinderbox"],
			["Weaver's Tools", "Basket, Rope, Net, Tent"],
			["Woodcarver's Tools", "Club, Greatclub, Quarterstaff"],
		],
	],
	toolProfs: [["Artisan's tools", 3]],
	toNotesPage: [
		{
			name: "Fast Crafting",
			note: [
				"When I finish a Long Rest, I can craft one piece of gear from the table below, provided I have the Artisan's Tools associated with that item and have proficiency with those tools. The item lasts until I finish another Long Rest, at which point the item falls apart.",
				[
					["Artisan's Tools", "Crafted Gear"],
					["Carpenter's Tools", "Ladder, Torch"],
					["Leatherworker's Tools", "Crossbow Bolt Case, Map or Scroll Case, Pouch"],
					["Mason's Tools", "Block and Tackle"],
					["Potter's Tools", "Jug, Lamp"],
					["Smith's Tools", "Ball Bearings, Bucket, Caltrops, Grappling Hook, Iron Pot"],
					["Tinker's Tools", "Bell, Shovel, Tinderbox"],
					["Weaver's Tools", "Basket, Rope, Net, Tent"],
					["Woodcarver's Tools", "Club, Greatclub, Quarterstaff"],
				],
			],
		},
	],
};
FeatsList["healer"] = {
	name: "Healer",
	source: [["P24", 201]],
	type: "origin",
	description: "##Battle Medic##. As a Utilize action, I can expend 1 use of a Healer's Kit to allow a creature within 5 ft of me to expend 1 Hit Die and regain HP equal to the HD's roll plus my Proficiency Bonus. ##Healing Rerolls##. Whenever I roll a 1 on the die to heal using a spell or this feat, I can reroll the die but must use the new roll.",
	descriptionFull: [
		"You gain the following benefits.",
		"***Battle Medic***. If you have a Healer's Kit, you can expend one use of it and tend to a creature within 5 feet of yourself as a Utilize action. That creature can expend one of its Hit Point Dice, and you then roll that die. The creature regains a number of Hit Points equal to the roll plus your Proficiency Bonus.",
		"***Healing Rerolls***. Whenever you roll a die to determine the number of Hit Points you restore with a spell or with this feat's Battle Medic benefit, you can reroll the die if it rolls a 1, and you must use the new roll.",
	],
	action: [["action", "Battle Medic"]],
};
FeatsList["lucky"] = {
	name: "Lucky",
	source: [["P24", 201]],
	type: "origin",
	description: [
		"I gain a number of ##Luck Points## equal to my Proficiency Bonus that I regain "+ (typePF ? "after" : "when") + " I finish a Long Rest. I can expend 1 of them to:",
		" \u2022 Give myself Advantage on a D20 Test.",
		" \u2022 Impose Disadvantage on an attack roll against me.",
	].join("\n"),
	descriptionFull: [
		"You gain the following benefits.",
		"***Luck Points***. You have a number of Luck Points equal to your Proficiency Bonus and can spend the points on the benefits below. You regain your expended Luck Points when you finish a Long Rest.",
		"***Advantage***. When you roll a d20 for a D20 Test, you can spend 1 Luck Point to give yourself Advantage on the roll.",
		"***Disadvantage***. When a creature rolls a d20 for an attack roll against you, you can spend 1 Luck Point to impose Disadvantage on that roll.",
	],
	limfeaname: "Luck Points",
	usages: "Proficiency bonus per ",
	usagescalc: "event.value = Number(How('Proficiency Bonus'));",
	recovery: "long rest",
};
FeatsList["musician"] = {
	name: "Musician",
	source: [["P24", 201]],
	type: "origin",
	description: [
		"At the end of a Short or Long Rest, I can play an instrument I'm proficient with to give Heroic Inspiration to a number of allies up to my Proficiency Bonus, if they hear the song.",
		"I gain proficiency with three Musical Instruments of my choice.",
	].join("\n"),
	descriptionFull: [
		"You gain the following benefits.",
		"***Instrument Training***. You gain proficiency with three Musical Instruments of your choice.",
		"***Encouraging Song***. As you finish a Short or Long Rest, you can play a song on a Musical Instrument with which you have proficiency and give Heroic Inspiration to allies who hear the song. The number of allies you can affect in this way equals your Proficiency Bonus.",
	],
	toolProfs: [["Musical Instrument", 3]],
};
FeatsList["tavern brawler"] = {
	name: "Tavern Brawler",
	source: [["P24", 202]],
	type: "origin",
	description: "Once per turn when I hit a creature with an Unarmed Strike as part of the Attack action on my turn, I can deal damage to the target and also push it 5 ft away from me. My Unarmed Strike deals 1d4 damage and I can reroll a 1 on its damage die, but must use the new roll. I'm proficient with improvised weapons. ",
	descriptionFull: [
		"You gain the following benefits.",
		"***Enhanced Unarmed Strike***. When you hit with your Unarmed Strike and deal damage, you can deal Bludgeoning damage equal to 1d4 plus your Strength modifier instead of the normal damage of an Unarmed Strike.",
		"***Damage Rerolls***. Whenever you roll a damage die for your Unarmed Strike, you can reroll the die if it rolls a 1, and you must use the new roll.",
		"***Improvised Weaponry***. You have proficiency with improvised weapons.",
		"***Push***. When you hit a creature with an Unarmed Strike as part of the Attack action on your turn, you can deal damage to the target and also push it 5 feet away from you. You can use this benefit only once per turn.",
	],
	weaponProfs: [false, false, ["Improvised weapons"]],
	calcChanges: {
		atkAdd: [
			function (fields, v) {
				if (v.baseWeaponName == "improvised weapon" || /improvised/i.test(v.WeaponName + v.baseWeaponName) || /improvised weapon/i.test(v.theWea.type)) {
					fields.Proficiency = true;
				};
				if (v.baseWeaponName == "unarmed strike") {
					fields.Description += (fields.Description ? "; " : "") + "1/turn also push 5 ft; reroll 1 on damage";
					if (fields.Damage_Die == 1) fields.Damage_Die = "1d4";
				};
			},
			"My Unarmed Strike deals 1d4 damage instead of 1.\n \u2022 Whenever I roll a 1 on the damage die of an Unarmed Strike, I can reroll it but must use the new roll.\n \u2022 Once per turn as part of the Attack action on my turn, I can deal damage and push the target 5 ft away from me.",
		],
	},
};
FeatsList["tough"] = {
	name: "Tough",
	source: [["P24", 202]],
	type: "origin",
	description: "My Hit Point maximum increases by an amount equal to twice my character level when I gain this feat. Whenever I gain a character level thereafter, my Hit Point maximum increases by an additional 2 Hit Points.",
	descriptionFull: [
		"Your Hit Point maximum increases by an amount equal to twice your character level when you gain this feat. Whenever you gain a character level thereafter, your Hit Point maximum increases by an additional 2 Hit Points.",
	],
	calcChanges: {
		hp: function (totalHD) {
			return [totalHD * 2, '\n + ' + totalHD + ' \xD7 2 from the Tough feat (' + (totalHD * 2) + ')', true];
		},
	},
};
// General feats
FeatsList["actor"] = {
	name: "Actor",
	source: [["P24", 202]],
	type: "general",
	prerequisite: "Level 4+, Charisma 13+",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && What("Cha") >= 13;
	},
	description: "While disguised as a specific person, I have Advantage on Charisma (Deception or Performance) checks to convince others that I am that person. I am able to mimic the sounds and speech of others. Wisdom (Insight) check (DC 8 + Cha mod + Prof Bonus) to determine the effect is faked. [+1 Charisma]",
	calculate: 'var dc = 8 + Number(How("Proficiency Bonus")) + Number(What("Cha Mod")); event.value = "While disguised as a specific person, I have Advantage on Charisma (Deception or Performance) checks to convince others that I am that person. I am able to mimic the sounds and speech of others. DC " + dc + " (8 + Cha mod + Prof Bonus) Wisdom (Insight) check to determine the effect is faked. [+1 Charisma]"',
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Charisma score by 1, to a maximum of 20.",
		"***Impersonation***. While you're disguised as a real or fictional person, you have Advantage on Charisma (Deception or Performance) checks to convince others that you are that person.",
		"***Mimicry***. You can mimic the sounds of other creatures, including speech. A creature that hears the mimicry must succeed on a Wisdom (Insight) check to determine the effect is faked (8 plus your Charisma modifier and Proficiency Bonus).",
	],
	scores: [0, 0, 0, 0, 0, 1],
};
FeatsList["athlete"] = {
	name: "Athlete",
	source: [["P24", 202]],
	type: "general",
	prerequisite: "Level 4+, Strength or Dexterity 13+",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && (What("Str") >= 13 || What("Dex") >= 13);
	},
	description: [
		"I gain a Climb Speed equal to my Speed.",
		"I can make a running Long or High Jump after moving only 5 ft.",
		"I can right myself from the Prone condition with only 5 ft of movement. [+1 Str or Dex]",
	].join("\n"),
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Strength or Dexterity score by 1, to a maximum of 20.",
		"***Climb Speed***. You gain a Climb Speed equal to your Speed.",
		"***Hop Up***. When you have the Prone condition, you can right yourself with only 5 feet of movement.",
		"***Jumping***. You can make a running Long or High Jump after moving only 5 feet.",
	],
	speed: { climb: { spd: "walk", enc: "walk" } },
	choices: ["Strength", "Dexterity"],
	choicesNotInMenu: true,
	"strength": {
		description: [
			"I gain a Climb Speed equal to my Speed.",
			"I can make a running Long or High Jump after moving only 5 ft.",
			"I can right myself from the Prone condition with only 5 ft of movement. [+1 Strength]",
		].join("\n"),
		scores: [1, 0, 0, 0, 0, 0],
	},
	"dexterity": {
		description: [
			"I gain a Climb Speed equal to my Speed.",
			"I can make a running Long or High Jump after moving only 5 ft.",
			"I can right myself from the Prone condition with only 5 ft of movement. [+1 Dexterity]",
		].join("\n"),
		scores: [0, 1, 0, 0, 0, 0],
	},
};
FeatsList["charger"] = {
	name: "Charger",
	source: [["P24", 202]],
	type: "general",
	prerequisite: "Level 4+, Strength or Dexterity 13+",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && (What("Str") >= 13 || What("Dex") >= 13);
	},
	description: "When I take the Dash action, my Speed increases by 10 ft for that action. If I move at least 10 ft in a straight line towards an enemy and hit it with a melee attack as part of the Attack action, once per turn I may either deal +1d8 damage or push the target 10 ft away from me if it's no more than 1 size larger. [+1 Str or Dex]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Strength or Dexterity score by 1, to a maximum of 20.",
		"***Improved Dash***. When you take the Dash action, your Speed increases by 10 feet for that action.",
		"***Charge Attack***. If you move at least 10 feet in a straight line toward a target immediately before hitting it with a melee attack roll as part of the Attack action, choose one of the following effects: gain a 1d8 bonus to the attack's damage roll, or push the target up to 10 feet away if it is no more than one size larger than you. You can use this benefit only once on each of your turns.",
	],
	choices: ["Strength", "Dexterity"],
	choicesNotInMenu: true,
	"strength": {
		description: "When I take the Dash action, my Speed increases by 10 ft for that action. If I move at least 10 ft in a straight line towards an enemy and hit it with a melee attack as part of the Attack action, once per turn I may either deal +1d8 damage or push the target 10 ft away from me if it's no more than 1 size larger. [+1 Str" + (typePF ? "]" : "ength]"),
		scores: [1, 0, 0, 0, 0, 0],
	},
	"dexterity": {
		description: "When I take the Dash action, my Speed increases by 10 ft for that action. If I move at least 10 ft in a straight line towards an enemy and hit it with a melee attack as part of the Attack action, once per turn I may either deal +1d8 damage or push the target 10 ft away from me if it's no more than 1 size larger. [+1 Dex" + (typePF ? "]" : "terity]"),
		scores: [0, 1, 0, 0, 0, 0],
	},
};
FeatsList["chef"] = {
	name: "Chef",
	source: [["P24", 202]],
	type: "general",
	prerequisite: "Level 4+",
	prereqeval: function (v) {
		return v.characterLevel >= 4;
	},
	description: "I'm proficient with Cook's Utensils. In a Short Rest I can cook for 4+Prof Bonus creatures. If they eat and spend 1+ HD in that rest, they heal +1d8 HP. In 1 hour or after a Long Rest, I can cook Prof Bonus of special treats that last for 8 hours. As a Bonus Action, one can eat a treat to gain my Prof Bonus of Temp HP.",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Constitution or Wisdom score by 1, to a maximum of 20.",
		"***Cook's Utensils***. You gain proficiency with Cook's Utensils if you don't already have it.",
		"***Replenishing Meal***. As part of a Short Rest, you can cook special food if you have ingredients and Cook's Utensils on hand. You can prepare enough of this food for a number of creatures equal to 4 plus your Proficiency Bonus. At the end of the Short Rest, any creature who eats the food and spends one or more Hit Dice to regain Hit Points regains an extra 1d8 Hit Points.",
		"***Bolstering Treats***. With 1 hour of work or when you finish a Long Rest, you can cook a number of treats equal to your Proficiency Bonus if you have ingredients and Cook's Utensils on hand. These special treats last 8 hours after being made. A creature can use a Bonus Action to eat one of those treats to gain a number of Temporary Hit Points equal to your Proficiency Bonus.",
	],
	toolProfs: ["Cook's Utensils"],
	toNotesPage: [{
		name: "Replenishing Meal",
		note: ["As part of a Short Rest, I can cook special food if I have ingredients and Cook's Utensils on hand. I can prepare enough of this food for a number of creatures equal to 4 plus my Proficiency Bonus. At the end of the Short Rest, any creature who eats the food and spends one or more Hit Dice to regain Hit Points regains an extra 1d8 Hit Points."],
	}, {
		name: "Bolstering Treats",
		note: [
			"With 1 hour of work or when I finish a Long Rest, I can cook a number of treats equal to my Proficiency Bonus if I have ingredients and Cook's Utensils on hand. These special treats last 8 hours after being made.",
			"As a Bonus Action, a creature can eat one of those treats to gain a number of Temporary Hit Points equal to my Proficiency Bonus.",
		],
		amendTo: "Replenishing Meal",
	}],
	choices: ["Constitution", "Wisdom"],
	choicesNotInMenu: true,
	"constitution": {
		description: "I'm proficient with Cook's Utensils. In a Short Rest I can cook for 4+Prof Bonus creatures. If they eat and spend 1+ HD in that rest, they heal +1d8 HP. In 1 hour or after a Long Rest, I can cook Prof Bonus of special treats that last for 8 hours. As a Bonus Action, one can eat a treat to gain my Prof Bonus of Temp HP." + (typePF ? "" : " [+1 Constitution]"),
		scores: [0, 0, 1, 0, 0, 0],
	},
	"wisdom": {
		description: "I'm proficient with Cook's Utensils. In a Short Rest I can cook for 4+Prof Bonus creatures. If they eat and spend 1+ HD in that rest, they heal +1d8 HP. In 1 hour or after a Long Rest, I can cook Prof Bonus of special treats that last for 8 hours. As a Bonus Action, one can eat a treat to gain my Prof Bonus of Temp HP." + (typePF ? "" : " [+1 Wisdom]"),
		scores: [0, 0, 0, 0, 1, 0],
	},
};
FeatsList["crossbow expert"] = {
	name: "Crossbow Expert",
	source: [["P24", 203]],
	type: "general",
	prerequisite: "Level 4+, Dexterity 13+",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && What("Dex") >= 13;
	},
	description: "I ignore the Loading property of Hand, Light, and Heavy Crossbows. Being within 5 ft of an enemy doesn't impose Disadvantage on my crossbow attacks. I can add my ability modifier to the damage of off-hand attacks I make with crossbows that have the light property. [+1 Dexterity]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Dexterity score by 1, to a maximum of 20.",
		"***Ignore Loading***. You ignore the Loading property of the Hand Crossbow, Heavy Crossbow, and Light Crossbow (all called crossbows elsewhere in this feat). If you're holding one of them, you can load a piece of ammunition into it even if you lack a free hand.",
		"***Firing in Melee***. Being within 5 feet of an enemy doesn't impose Disadvantage on your attack rolls with crossbows.",
		"***Dual Wielding***. When you make the extra attack of the Light property, you can add your ability modifier to the damage of the extra attack if that attack is with a crossbow that has the Light property and you aren't already adding that modifier to the damage.",
	],
	scores: [0, 1, 0, 0, 0, 0],
	calcChanges : {
		atkAdd : [
			function (fields, v) {
				if (/(hand|heavy|light) crossbow/i.test(v.baseWeaponName)) {
					fields.Description = fields.Description.replace(/([,;]? ?loading|loading[,;]? ?)/i, '');
					if (v.isOffHand && /\blight\b/i.test(fields.Description))  {
						output.modToDmg = true;
					};
				};
			},
			"I ignore the Loading property of the Hand Crossbow, Heavy Crossbow, and Light Crossbow.",
		],
	},
};
FeatsList["crusher"] = {
	name: "Crusher",
	source: [["P24", 203]],
	type: "general",
	prerequisite: "Level 4+",
	prereqeval: function (v) {
		return v.characterLevel >= 4;
	},
	description: "Once per turn when my attack deals Bludgeoning damage to a creature up to one size larger than me, I can move it 5 ft to an empty space. When I score a Critical Hit that deals Bludgeoning damage to a creature, attack rolls against that creature have Advantage until the start of my next turn. [+1 Str or Con]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Strength or Constitution score by 1, to a maximum of 20.",
		"***Push***. Once per turn, when you hit a creature with an attack that deals Bludgeoning damage, you can move it 5 feet to an unoccupied space if the target is no more than one size larger than you.",
		"***Enhanced Critical***. When you score a Critical Hit that deals Bludgeoning damage to a creature, attack rolls against that creature have Advantage until the start of your next turn.",
	],
	choices: ["Strength", "Constitution"],
	choicesNotInMenu: true,
	"strength": {
		description: "Once per turn when my attack deals Bludgeoning damage to a creature up to one size larger than me, I can move it 5 ft to an empty space. When I score a Critical Hit that deals Bludgeoning damage to a creature, attack rolls against that creature have Advantage until the start of my next turn. [+1 Strength]",
		scores: [1, 0, 0, 0, 0, 0],
	},
	"constitution": {
		description: "Once per turn when my attack deals Bludgeoning damage to a creature up to one size larger than me, I can move it 5 ft to an empty space. When I score a Critical Hit that deals Bludgeoning damage to a creature, attack rolls against that creature have Advantage until the start of my next turn. [+1 Constitution]",
		scores: [0, 0, 1, 0, 0, 0],
	},
};
FeatsList["defensive duelist"] = {
	name: "Defensive Duelist",
	source: [["P24", 203]],
	type: "general",
	prerequisite: "Level 4+, Dexterity 13+",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && What("Dex") >= 13;
	},
	description: "##Parry##. As a reaction when I'm holding a Finesse weapon and another creature hits me with a melee attack, I can add my Proficiency Bonus to my Armor Class, potentially causing the attack to miss me. I gain this bonus to my AC against melee attacks until the start of my next turn. [+1 Dexterity]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Dexterity score by 1, to a maximum of 20.",
		"***Parry***. If you're holding a Finesse weapon and another creature hits you with a melee attack, you can take a Reaction to add your Proficiency Bonus to your Armor Class, potentially causing the attack to miss you. You gain this bonus to your AC against melee attacks until the start of your next turn.",
	],
	scores: [0, 1, 0, 0, 0, 0],
	action: [["reaction", "Parry"]],
};
FeatsList["dual wielder"] = {
	name: "Dual Wielder",
	source: [["P24", 203]],
	type: "general",
	prerequisite: "Level 4+, Strength or Dexterity 13+",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && (What("Str") >= 13 || What("Dex") >= 13);
	},
	description: "I can draw and stow 2 non-Two-Handed weapons at a time. If I take the Attack action on my turn to attack with a Light weapon, I can make an off-hand attack with another non-Two-Handed weapon as a Bonus Action. I don't add my ability modifier to this attack's damage unless it is negative. [+1 Str or Dex]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Strength or Dexterity score by 1, to a maximum of 20.",
		"***Enhanced Dual Wielding***. When you take the Attack action on your turn and attack with a weapon that has the Light property, you can make one extra attack as a Bonus Action later on the same turn with a different weapon, which must be a Melee weapon that lacks the Two-Handed property. You don't add your ability modifier to the extra attack's damage unless that modifier is negative.",
		"***Quick Draw***. You can draw or stow two weapons that lack the Two-Handed property when you would normally be able to draw or stow only one.",
	],
	choices: ["Strength", "Dexterity"],
	choicesNotInMenu: true,
	"strength": {
		description: "I can draw and stow 2 non-Two-Handed weapons at a time. If I take the Attack action on my turn to attack with a Light weapon, I can make an off-hand attack with another non-Two-Handed weapon as a Bonus Action. I don't add my ability modifier to this attack's damage unless it is negative. [+1 Strength]",
		scores: [1, 0, 0, 0, 0, 0],
	},
	"dexterity": {
		description: "I can draw and stow 2 non-Two-Handed weapons at a time. If I take the Attack action on my turn to attack with a Light weapon, I can make an off-hand attack with another non-Two-Handed weapon as a Bonus Action. I don't add my ability modifier to this attack's damage unless it is negative. [+1 Dexterity]",
		scores: [0, 1, 0, 0, 0, 0],
	},
};
FeatsList["durable"] = {
	name: "Durable",
	source: [["P24", 203]],
	type: "general",
	prerequisite: "Level 4+",
	prereqeval: function (v) {
		return v.characterLevel >= 4;
	},
	description: [
		"##Defy Death##. I have Advantage on Death Saving Throws.",
		"##Speedy Recovery##. As a Bonus Action, I can expend and roll one of my Hit Dice to regain a number of Hit Points equal to the roll. [+1 Constitution]",
	].join("\n"),
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Constitution score by 1, to a maximum of 20.",
		"***Defy Death***. You have Advantage on Death Saving Throws.",
		"***Speedy Recovery***. As a Bonus Action, you can expend one of your Hit Point Dice, roll the die, and regain a number of Hit Points equal to the roll.",
	],
	scores: [0, 0, 1, 0, 0, 0],
	savetxt: {
		text: ["Adv. on Death Saves"],
	},
	action: [["bonus action", "Speedy Recovery (1 HD)"]],
};
FeatsList["elemental adept"] = {
	name: "Elemental Adept",
	source: [["P24", 203]],
	type: "general",
	prerequisite: "Level 4+, Spellcasting or Pact Magic Feature",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && v.isSpellcastingClass;
	},
	description: "Choose one of the damage types: Acid, Cold, Fire, Lightning, or Thunder. Spells I cast ignore resistance to damage from this damage type. For any spell I cast that deals this damage type, I can treat any 1 on a damage die as a 2. [+1 Int, Wis, or Cha]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Intelligence, Wisdom, or Charisma score by 1, to a maximum of 20.",
		"***Energy Mastery***. Choose one of the following damage types: Acid, Cold, Fire, Lightning, or Thunder. Spells you cast ignore Resistance to damage of the chosen type. In addition, when you roll damage for a spell you cast that deals damage of that type, you can treat any 1 on a damage die as a 2.",
		"***Repeatable***. You can take this feat more than once, but you must choose a different damage type each time for Energy Mastery.",
	],
	scorestxt: "+1 Intelligence, Wisdom, or Charisma",
	allowDuplicates: true,
	choices: ["Acid Energy Mastery", "Cold Energy Mastery", "Fire Energy Mastery", "Lightning Energy Mastery", "Thunder Energy Mastery"],
	"acid energy mastery": {
		name: "Elemental Adept [Acid]",
		description: [
			"Spells cast by me ignore Resistance to Acid damage.",
			"When I roll damage for a spell casted by me that deals Acid damage, I can treat any 1 on a damage die as a 2.",
			"[+1 Intelligence, Wisdom, or Charisma]",
		].join("\n"),
	},
	"cold energy mastery": {
		name: "Elemental Adept [Cold]",
		description: [
			"Spells cast by me ignore Resistance to Cold damage.",
			"When I roll damage for a spell casted by me that deals Cold damage, I can treat any 1 on a damage die as a 2.",
			"[+1 Intelligence, Wisdom, or Charisma]",
		].join("\n"),
	},
	"fire energy mastery": {
		name: "Elemental Adept [Fire]",
		description: [
			"Spells cast by me ignore Resistance to Fire damage.",
			"When I roll damage for a spell casted by me that deals Fire damage, I can treat any 1 on a damage die as a 2.",
			"[+1 Intelligence, Wisdom, or Charisma]",
		].join("\n"),
	},
	"lightning energy mastery": {
		name: "Elemental Adept [Lightning]",
		description: [
			"Spells cast by me ignore Resistance to Lightning damage.",
			"When I roll damage for a spell casted by me that deals Lightning damage, I can treat any 1 on a damage die as a 2.",
			"[+1 Intelligence, Wisdom, or Charisma]",
		].join("\n"),
	},
	"thunder energy mastery": {
		name: "Elemental Adept [Thunder]",
		description: [
			"Spells cast by me ignore Resistance to Thunder damage.",
			"When I roll damage for a spell casted by me that deals Thunder damage, I can treat any 1 on a damage die as a 2.",
			"[+1 Intelligence, Wisdom, or Charisma]",
		].join("\n"),
	},
};
FeatsList["fey-touched"] = {
	name: "Fey-Touched",
	source: [["P24", 204]],
	type: "general",
	prerequisite: "Level 4+",
	prereqeval: function (v) {
		return v.characterLevel >= 4;
	},
	description: "I learn *Misty Step* and one 1st-level Divination or Enchantment spell. I always have these spells prepared. I can cast each once per Long Rest at their lowest level without expending a spell slot and by expending a spell slot as normal. The spells' spellcasting ability is the ability increased by this feat. [+1 Int, Wis, or Cha]",
	descriptionFull: [
		"Your exposure to the Feywild's magic grants you the following benefits.",
		"***Ability Score Increase***. Increase your Intelligence, Wisdom, or Charisma score by 1, to a maximum of 20.",
		"***Fey Magic***. Choose one level 1 spell from the Divination or Enchantment school of magic. You always have that spell and the *Misty Step* spell prepared. You can cast each of these spells without expending a spell slot. Once you cast either spell in this way, you can't cast that spell in this way again until you finish a Long Rest. You can also cast these spells using spell slots you have of the appropriate level. The spells' spellcasting ability is the ability increased by this feat.",
	],
	spellFirstColTitle: "PR",
	spellcastingBonus: [{
		name: "Misty Step",
		spells: ["misty step"],
		selection: ["misty step"],
		firstCol: "oncelr+markedbox",
	}, {
		name: "1st-level Ench/Div spell",
		school: ["Ench", "Div"],
		level: [1, 1],
		firstCol: "oncelr+markedbox",
	}],
	choices: ["Intelligence", "Wisdom", "Charisma"],
	choicesNotInMenu: true,
	"intelligence": {
		description: "I learn Misty Step and one 1st-level Divination or Enchantment spell. I always have these spell prepared. I can cast each once per Long Rest at their lowest level without expending a spell slot and can cast them by expending a spell slot as normal. Intelligence is my spellcasting ability for these spells. [+1 Int" + (typePF ? "]" : "elligence]"),
		spellcastingAbility: 4,
		scores: [0, 0, 0, 1, 0, 0],
	},
	"wisdom": {
		description: "I learn Misty Step and one 1st-level Divination or Enchantment spell. I always have these spell prepared. I can cast each once per Long Rest at their lowest level without expending a spell slot and can cast them by expending a spell slot as normal. Wisdom is my spellcasting ability for these spells. [+1 Wisdom]",
		spellcastingAbility: 5,
		scores: [0, 0, 0, 0, 1, 0],
	},
	"charisma": {
		description: "I learn Misty Step and one 1st-level Divination or Enchantment spell. I always have these spell prepared. I can cast each once per Long Rest at their lowest level without expending a spell slot and can cast them by expending a spell slot as normal. Charisma is my spellcasting ability for these spells. [+1 Charisma]",
		spellcastingAbility: 6,
		scores: [0, 0, 0, 0, 0, 1],
	},
};
FeatsList["great weapon master"] = {
	name: "Great Weapon Master",
	source: [["P24", 204]],
	type: "general",
	prerequisite: "Level 4+, Strength 13+",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && What("Str") >= 13;
	},
	description: [
		"##Heavy Weapon Mastery##. During the Attack action on my turn, I can add my Proficiency Bonus to the damage of " + (typePF ? "Heavy weapons. " : "weapons with the Heavy property."),
		"##Hew##. Immediately after I reduce a creature to 0 HP with a melee weapon or score a Critical Hit with one, I can make another attack with that weapon as a Bonus Action. [+1 Str]",
	].join("\n"),
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Strength score by 1, to a maximum of 20.",
		"***Heavy Weapon Mastery***. When you hit a creature with a weapon that has the Heavy property as part of the Attack action on your turn, you can cause the weapon to deal extra damage to the target. The extra damage equals your Proficiency Bonus.",
		"***Hew***. Immediately after you score a Critical Hit with a Melee weapon or reduce a creature to 0 Hit Points with one, you can make one attack with the same weapon as a Bonus Action.",
	],
	scores: [1, 0, 0, 0, 0, 0],
	action: [["bonus action", "Hew (Great Weapon Master)"]],
	calcChanges: {
		atkCalc: [
			function (fields, v, output) {
				if (v.isWeapon && /heavy/i.test(fields.Description) && /\bgwm\b|power.{0,3}attack|great.{0,3}weapon.{0,3}master/i.test(v.WeaponTextName)) {
					output.extraDmg += Number(How("Proficiency Bonus"));
				};
			},
			"If I include the words 'Power Attack', 'Great Weapon Master', or 'GWM' in the name of a weapon with the Heavy property, my Proficiency Bonus is added to its damage.",
		],
	},
};
FeatsList["heavily armored"] = {
	name: "Heavily Armored",
	source: [["P24", 204]],
	type: "general",
	prerequisite: "Level 4+, Medium Armor Training",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && v.mediumArmorProf;
	},
	description: "I gain training with Heavy armor. [+1 Strength or Constitution]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Constitution or Strength score by 1, to a maximum of 20.",
		"***Armor Training***. You gain training with Heavy armor.",
	],
	armorProfs: [false, false, true, false],
	choices: ["Constitution", "Strength"],
	choicesNotInMenu: true,
	"strength": {
		description: "I gain training with Heavy armor. [+1 Strength]",
		scores: [1, 0, 0, 0, 0, 0],
	},
	"constitution": {
		description: "I gain training with Heavy armor. [+1 Constitution]",
		scores: [0, 0, 1, 0, 0, 0],
	},
};
FeatsList["heavy armor master"] = {
	name: "Heavy Armor Master",
	source: [["P24", 204]],
	type: "general",
	prerequisite: "Level 4+, Heavy Armor Training",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && v.heavyArmorProf;
	},
	description: "When I'm hit by an attack while I'm wearing Heavy armor, any Bludgeoning, Piercing, and Slashing damage dealt to me by that attack is reduced by an amount equal to my Proficiency Bonus. [+1 Strength or Constitution]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Constitution or Strength score by 1, to a maximum of 20.",
		"***Damage Reduction***. When you're hit by an attack while you're wearing Heavy armor, any Bludgeoning, Piercing, and Slashing damage dealt to you by that attack is reduced by an amount equal to your Proficiency Bonus.",
	],
	choices: ["Constitution", "Strength"],
	choicesNotInMenu: true,
	"strength": {
		description: "When I'm hit by an attack while I'm wearing Heavy armor, any Bludgeoning, Piercing, and Slashing damage dealt to me by that attack is reduced by an amount equal to my Proficiency Bonus. [+1 Strength]",
		scores: [1, 0, 0, 0, 0, 0],
	},
	"constitution": {
		description: "When I'm hit by an attack while I'm wearing Heavy armor, any Bludgeoning, Piercing, and Slashing damage dealt to me by that attack is reduced by an amount equal to my Proficiency Bonus. [+1 Constitution]",
		scores: [0, 0, 1, 0, 0, 0],
	},
};
FeatsList["inspiring leader"] = {
	name: "Inspiring Leader",
	source: [["P24", 204]],
	type: "general",
	prerequisite: "Level 4+, Wisdom or Charisma 13+",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && (What("Wis") >= 13 || What("Cha") >= 13);
	},
	description: "When I finish a Short or Long Rest, I can give an inspiring performance. Up to six allies (which can include myself) within 30 ft who witness this performance each gain Temporary Hit Points equal to my character level plus the modifier of the ability increased by this feat. [+1 Wisdom or Charisma]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Wisdom or Charisma score by 1, to a maximum of 20.",
		"***Bolstering Performance***. When you finish a Short or Long Rest, you can give an inspiring performance: a speech, song, or dance. When you do so, choose up to six allies (which can include yourself) within 30 feet of yourself who witness the performance. The chosen creatures each gain Temporary Hit Points equal to your character level plus the modifier of the ability you increased with this feat.",
	],
	choices: ["Wisdom", "Charisma"],
	choicesNotInMenu: true,
	"wisdom": {
		calculate: 'event.value = "When I finish a Short or Long Rest, I can give an inspiring performance. I can choose up to six allies (or five and myself) within 30 ft of myself who witness this performance to each gain " + ( Number(What("Character Level")) + Number(What("Wis Mod")) ) + " Temporary Hit Points (= character level + Wisdom modifier). [+1 Wisdom]";',
		scores: [0, 0, 0, 0, 1, 0],
	},
	"charisma": {
		calculate: 'event.value = "When I finish a Short or Long Rest, I can give an inspiring performance. I can choose up to six allies (or five and myself) within 30 ft of myself who witness this performance to each gain " + ( Number(What("Character Level")) + Number(What("Cha Mod")) ) + " Temporary Hit Points (= character level + Charisma modifier). [+1 Charisma]";',
		scores: [0, 0, 0, 0, 0, 1],
	},
};
FeatsList["keen mind"] = {
	name: "Keen Mind",
	source: [["P24", 205]],
	type: "general",
	prerequisite: "Level 4+, Intelligence 13+",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && What("Int") >= 13;
	},
	description: "##Quick Study##. I can take the Study action as a Bonus Action. ##Lore Knowledge##. I gain proficiency in one Intelligence skill of my choice. If I already have proficiency in it, I gain Expertise in it. [+1 Intelligence]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Intelligence score by 1, to a maximum of 20.",
		"***Lore Knowledge***. Choose one of the following skills: Arcana, History, Investigation, Nature, or Religion. If you lack proficiency in the chosen skill, you gain proficiency in it, and if you already have proficiency in it, you gain Expertise in it.",
		"***Quick Study***. You can take the Study action as a Bonus Action.",
	],
	scores: [0, 0, 0, 1, 0, 0],
	action: [["bonus action", "Study"]],
	choices: ["Arcana", "History", "Investigation", "Nature", "Religion"],
	choicesNotInMenu: true,
	"arcana": {
		description: [
			"##Quick Study##. I can take the Study action as a Bonus Action.",
			"##Lore Knowledge##. I gain proficiency in the Arcana skill. If I already have proficiency in it, I gain Expertise in it.",
			"[+1 Intelligence]",
		].join("\n"),
		skills: [["Arcana", "increment"]],
	},
	"history": {
		description: [
			"##Quick Study##. I can take the Study action as a Bonus Action.",
			"##Lore Knowledge##. I gain proficiency in the History skill. If I already have proficiency in it, I gain Expertise in it.",
			"[+1 Intelligence]",
		].join("\n"),
		skills: [["History", "increment"]],
	},
	"investigation": {
		description: [
			"##Quick Study##. I can take the Study action as a Bonus Action.",
			"##Lore Knowledge##. I gain proficiency in the Investigation skill. If I already have proficiency in it, I gain Expertise in it.",
			"[+1 Intelligence]",
		].join("\n"),
		skills: [["Investigation", "increment"]],
	},
	"nature": {
		description: [
			"##Quick Study##. I can take the Study action as a Bonus Action.",
			"##Lore Knowledge##. I gain proficiency in the Nature skill. If I already have proficiency in it, I gain Expertise in it.",
			"[+1 Intelligence]",
		].join("\n"),
		skills: [["Nature", "increment"]],
	},
	"religion": {
		description: [
			"##Quick Study##. I can take the Study action as a Bonus Action.",
			"##Lore Knowledge##. I gain proficiency in the Religion skill. If I already have proficiency in it, I gain Expertise in it.",
			"[+1 Intelligence]",
		].join("\n"),
		skills: [["Religion", "increment"]],
	},
};
FeatsList["lightly armored"] = {
	name: "Lightly Armored",
	source: [["P24", 205]],
	type: "general",
	prerequisite: "Level 4+",
	prereqeval: function (v) {
		return v.characterLevel >= 4;
	},
	description: "I gain training with Light armor and Shields. [+1 Strength or Dexterity]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Strength or Dexterity score by 1, to a maximum of 20.",
		"***Armor Training***. You gain training with Light armor and Shields.",
	],
	armorProfs: [true, false, false, true],
	choices: ["Strength", "Dexterity"],
	choicesNotInMenu: true,
	"strength": {
		description: "I gain training with Light armor and Shields. [+1 Strength]",
		scores: [1, 0, 0, 0, 0, 0],
	},
	"dexterity": {
		description: "I gain training with Light armor and Shields. [+1 Dexterity]",
		scores: [0, 1, 0, 0, 0, 0],
	},
};
FeatsList["mage slayer"] = {
	name: "Mage Slayer",
	source: [["P24", 205]],
	type: "general",
	prerequisite: "Level 4+",
	prereqeval: function (v) {
		return v.characterLevel >= 4;
	},
	description: "##Concentration Breaker##. When I damage a creature that is Concentrating, they have Disadvantage on their save to maintain it." + (typePF ? " " : "\n") + "##Guarded Mind##. Once per Short or Long Rest when I fail an Intelligence, Wisdom, or Charisma saving throw, I can cause myself to succeed instead. [+1 Strength or Dexterity]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Strength or Dexterity score by 1, to a maximum of 20.",
		"***Concentration Breaker***. When you damage a creature that is Concentrating, it has Disadvantage on the saving throw it makes to maintain Concentration.",
		"***Guarded Mind***. If you fail an Intelligence, a Wisdom, or a Charisma saving throw, you can cause yourself to succeed instead. Once you use this benefit, you can't use it again until you finish a Short or Long Rest.",
	],
	extraLimitedFeatures: [{
		name: "Guarded Mind (Mage Slayer)",
		usages: 1,
		recovery: "short rest",
	}],
	choices: ["Strength", "Dexterity"],
	choicesNotInMenu: true,
	"strength": {
		description: "##Concentration Breaker##. When I damage a creature that is Concentrating, they have Disadvantage on their save to maintain it." + (typePF ? " " : "\n") + "##Guarded Mind##. Once per Short or Long Rest when I fail an Intelligence, Wisdom, or Charisma saving throw, I can cause myself to succeed instead. [+1 Strength]",
		scores: [1, 0, 0, 0, 0, 0],
	},
	"dexterity": {
		description: "##Concentration Breaker##. When I damage a creature that is Concentrating, they have Disadvantage on their save to maintain it." + (typePF ? " " : "\n") + "##Guarded Mind##. Once per Short or Long Rest when I fail an Intelligence, Wisdom, or Charisma saving throw, I can cause myself to succeed instead. [+1 Dexterity]",
		scores: [0, 1, 0, 0, 0, 0],
	},
};
FeatsList["martial weapon training"] = {
	name: "Martial Weapon Training",
	source: [["P24", 205]],
	type: "general",
	prerequisite: "Level 4+",
	prereqeval: function (v) {
		return v.characterLevel >= 4;
	},
	description: "I gain proficiency with Martial weapons. [+1 Strength or Dexterity]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Strength or Dexterity score by 1, to a maximum of 20.",
		"***Weapon Proficiency***. You gain proficiency with Martial weapons.",
	],
	weaponProfs: [false, true],
	choices: ["Strength", "Dexterity"],
	choicesNotInMenu: true,
	"strength": {
		description: "I gain proficiency with Martial weapons. [+1 Strength]",
		scores: [1, 0, 0, 0, 0, 0],
	},
	"dexterity": {
		description: "I gain proficiency with Martial weapons. [+1 Dexterity]",
		scores: [0, 1, 0, 0, 0, 0],
	},
};
FeatsList["medium armor master"] = {
	name: "Medium Armor Master",
	source: [["P24", 205]],
	type: "general",
	prerequisite: "Level 4+, Medium Armor Training",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && v.mediumArmorProf;
	},
	description: "While I'm wearing Medium armor, I can add 3, rather than 2 to my AC if I have a Dexterity score of 16 or higher. [+1 Strength or Dexterity]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Strength or Dexterity score by 1, to a maximum of 20.",
		"***Dexterous Wearer***. While you're wearing Medium armor, you can add 3, rather than 2 to your AC if you have a Dexterity score of 16 or higher.",
	],
	eval: function () {
		Value("Medium Armor Max Mod", 3);
		ApplyArmor(What("AC Armor Description"));
	},
	removeeval: function () {
		tDoc.resetForm(["Medium Armor Max Mod"]);
		ApplyArmor(What("AC Armor Description"));
	},
	choices: ["Strength", "Dexterity"],
	choicesNotInMenu: true,
	"strength": {
		description: "While I'm wearing Medium armor, I can add 3, rather than 2 to my AC if I have a Dexterity score of 16 or higher. [+1 Strength]",
		scores: [1, 0, 0, 0, 0, 0],
	},
	"dexterity": {
		description: "While I'm wearing Medium armor, I can add 3, rather than 2 to my AC if I have a Dexterity score of 16 or higher. [+1 Dexterity]",
		scores: [0, 1, 0, 0, 0, 0],
	},
};
FeatsList["moderately armored"] = {
	name: "Moderately Armored",
	source: [["P24", 205]],
	type: "general",
	prerequisite: "Level 4+, Light Armor Training",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && v.lightArmorProf;
	},
	description: "I gain training with Medium armor. [+1 Strength or Dexterity]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Strength or Dexterity score by 1, to a maximum of 20.",
		"***Armor Training***. You gain training with Medium armor.",
	],
	armorProfs: [false, true, false, false],
	choices: ["Strength", "Dexterity"],
	choicesNotInMenu: true,
	"strength": {
		description: "I gain training with Medium armor. [+1 Strength]",
		scores: [1, 0, 0, 0, 0, 0],
	},
	"dexterity": {
		description: "I gain training with Medium armor. [+1 Dexterity]",
		scores: [0, 1, 0, 0, 0, 0],
	},
};
FeatsList["mounted combatant"] = {
	name: "Mounted Combatant",
	source: [["P24", 205]],
	type: "general",
	prerequisite: "Level 4+",
	prereqeval: function (v) {
		return v.characterLevel >= 4;
	},
	description: "While I'm mounted and not Incapacitated: ##\u2022 Mounted Strike##. I have Advantage on attacks against unmounted within 5 ft that are smaller than my mount. ##\u2022 Leap Aside##. If my mount is not Incapacitated and makes a Dex save to halve the damage, it takes none on a pass and half on a fail. ##\u2022 Veer##. When an attack hits my mount, I can have it hit me instead. [+1 Strength, Dexterity, or Wisdom]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Strength, Dexterity, or Wisdom score by 1, to a maximum of 20.",
		"***Mounted Strike***. While mounted, you have Advantage on attack rolls against any unmounted creature within 5 feet of your mount that is at least one size smaller than the mount.",
		"***Leap Aside***. If your mount is subjected to an effect that allows it to make a Dexterity saving throw to take only half damage, it instead takes no damage if it succeeds on the saving throw and only half damage if it fails. For your mount to gain this benefit, you must be riding it, and neither of you can have the Incapacitated condition.",
		"***Veer***. While mounted, you can force an attack that hits your mount to hit you instead if you don't have the Incapacitated condition.",
	],
	choices: ["Strength", "Dexterity", "Wisdom"],
	choicesNotInMenu: true,
	"strength": {
		description: "While I'm mounted and not Incapacitated:"+
			(typePF ? " \u2022 " : " ##\u2022 Mounted Strike##. ") + "I have Advantage on attacks against unmounted within 5 ft that are smaller than my mount."+
			(typePF ? " \u2022 " : " ##\u2022 Leap Aside##. ") + "If my mount is not Incapacitated and makes a Dex save to halve the damage, it takes none on a pass and half on a fail."+
			(typePF ? "\n\u2022 " : " ##\u2022 Veer##. ") + "When an attack hits my mount, I can have it hit me instead."+
			(typePF ? "" : " [+1 Str]"),
		scores: [1, 0, 0, 0, 0, 0],
	},
	"dexterity": {
		description: "While I'm mounted and not Incapacitated:"+
			(typePF ? " \u2022 " : " ##\u2022 Mounted Strike##. ") + "I have Advantage on attacks against unmounted within 5 ft that are smaller than my mount."+
			(typePF ? " \u2022 " : " ##\u2022 Leap Aside##. ") + "If my mount is not Incapacitated and makes a Dex save to halve the damage, it takes none on a pass and half on a fail."+
			(typePF ? "\n\u2022 " : " ##\u2022 Veer##. ") + "When an attack hits my mount, I can have it hit me instead."+
			(typePF ? "" : " [+1 Dex]"),
		scores: [0, 1, 0, 0, 0, 0],
	},
	"wisdom": {
		description: "While I'm mounted and not Incapacitated:"+
			(typePF ? " \u2022 " : " ##\u2022 Mounted Strike##. ") + "I have Advantage on attacks against unmounted within 5 ft that are smaller than my mount."+
			(typePF ? " \u2022 " : " ##\u2022 Leap Aside##. ") + "If my mount is not Incapacitated and makes a Dex save to halve the damage, it takes none on a pass and half on a fail."+
			(typePF ? "\n\u2022 " : " ##\u2022 Veer##. ") + "When an attack hits my mount, I can have it hit me instead."+
			(typePF ? "" : " [+1 Wis]"),
		scores: [0, 0, 0, 0, 1, 0],
	},
};
FeatsList["observant"] = {
	name: "Observant",
	source: [["P24", 205]],
	type: "general",
	prerequisite: "Level 4+, Intelligence or Wisdom 13+",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && (What("Int") >= 13 || What("Wis") >= 13);
	},
	description: "##Quick Search##. I can take the Search action as a Bonus Action. ##Keen Observer##. I gain proficiency in Insight, Investigation, or Perception. If I already have proficiency in it, I gain Expertise in it. [+1 Intelligence or Wisdom]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Intelligence or Wisdom score by 1, to a maximum of 20.",
		"***Keen Observer***. Choose one of the following skills: Insight, Investigation, or Perception. If you lack proficiency with the chosen skill, you gain proficiency in it, and if you already have proficiency in it, you gain Expertise in it.",
		"***Quick Search***. You can take the Search action as a Bonus Action.",
	],
	action: [["bonus action", "Search"]],
	choices: [
		"Intelligence, Insight", "Intelligence, Investigation", "Intelligence, Perception",
		"Wisdom, Insight", "Wisdom, Investigation", "Wisdom, Perception",
	],
	choicesNotInMenu: true,
	"intelligence, insight": {
		description: [
			"##Quick Search##. I can take the Search action as a Bonus Action.",
			"##Keen Observer##. I gain proficiency in the Insight skill. If I already have proficiency in it, I gain Expertise in it.",
			"[+1 Intelligence]",
		].join("\n"),
		scores: [0, 0, 0, 1, 0, 0],
		skills: [["Insight", "increment"]],
	},
	"intelligence, investigation": {
		description: [
			"##Quick Search##. I can take the Search action as a Bonus Action.",
			"##Keen Observer##. I gain proficiency in the Investigation skill. If I already have proficiency in it, I gain Expertise in it.",
			"[+1 Intelligence]",
		].join("\n"),
		scores: [0, 0, 0, 1, 0, 0],
		skills: [["Investigation", "increment"]],
	},
	"intelligence, perception": {
		description: [
			"##Quick Search##. I can take the Search action as a Bonus Action.",
			"##Keen Observer##. I gain proficiency in the Perception skill. If I already have proficiency in it, I gain Expertise in it.",
			"[+1 Intelligence]",
		].join("\n"),
		scores: [0, 0, 0, 1, 0, 0],
		skills: [["Perception", "increment"]],
	},
	"wisdom, insight": {
		description: [
			"##Quick Search##. I can take the Search action as a Bonus Action.",
			"##Keen Observer##. I gain proficiency in the Insight skill. If I already have proficiency in it, I gain Expertise in it.",
			"[+1 Wisdom]",
		].join("\n"),
		scores: [0, 0, 0, 0, 1, 0],
		skills: [["Insight", "increment"]],
	},
	"wisdom, investigation": {
		description: [
			"##Quick Search##. I can take the Search action as a Bonus Action.",
			"##Keen Observer##. I gain proficiency in the Investigation skill. If I already have proficiency in it, I gain Expertise in it.",
			"[+1 Wisdom]",
		].join("\n"),
		scores: [0, 0, 0, 0, 1, 0],
		skills: [["Investigation", "increment"]],
	},
	"wisdom, perception": {
		description: [
			"##Quick Search##. I can take the Search action as a Bonus Action.",
			"##Keen Observer##. I gain proficiency in the Perception skill. If I already have proficiency in it, I gain Expertise in it.",
			"[+1 Wisdom]",
		].join("\n"),
		scores: [0, 0, 0, 0, 1, 0],
		skills: [["Perception", "increment"]],
	},
};
FeatsList["piercer"] = {
	name: "Piercer",
	source: [["P24", 206]],
	type: "general",
	prerequisite: "Level 4+",
	prereqeval: function (v) {
		return v.characterLevel >= 4;
	},
	description: "##Puncture##. Once per turn when I hit a creature with an attack that deals Piercing damage, I can reroll one of its damage dice and must use this new roll. ##Enhanced Critical##. When I score a Critical Hit that deals Piercing damage to a creature, I add one extra damage die to the Piercing damage. [+1 Strength or Dexterity]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Strength or Dexterity score by 1, to a maximum of 20.",
		"***Puncture***. Once per turn, when you hit a creature with an attack that deals Piercing damage, you can reroll one of the attack's damage dice, and you must use the new roll.",
		"***Enhanced Critical***. When you score a Critical Hit that deals Piercing damage to a creature, you can roll one additional damage die when determining the extra Piercing damage the target takes.",
	],
	calcChanges: {
		atkAdd: [
			function (fields, v) {
				if (/pierc/i.test(fields.Damage_Type)) {
					var descrAdd = '1/turn reroll 1 dmg die';
					var dmgDice = fields.Damage_Die.match(/(\b\w|\b\d+|\b)d\d+/ig);
					if (dmgDice && !v.isDC) {
						var dieSize = dmgDice.reduce(function (acc, val) {
							var size = Number(val.replace(/.+d/, ''));
							return size > acc ? size : acc;
						}, 0);
						descrAdd += '; Crit: +1' + dieSize + ' dmg';
					};
					fields.Description += (fields.Description ? '; ' : '') + descrAdd;
				};
			},
			'Attacks that deal Piercing damage get the benefits from the Piercer feat added to their description: Once per turn reroll 1 damage die, and to roll an extra damage die on a Critical Hit.',
		],
	},
	choices: ["Strength", "Dexterity"],
	choicesNotInMenu: true,
	"strength": {
		description: "##Puncture##. Once per turn, when I hit a creature with an attack that deals Piercing damage, I can reroll one of its damage dice and must use this new roll."+
			(typePF ? " " : "\n") + "##Enhanced Critical##. When I score a Critical Hit that deals Piercing damage to a creature, I add one extra damage die to the Piercing damage. [+1 Strength]",
		scores: [1, 0, 0, 0, 0, 0],
	},
	"dexterity": {
		description: "##Puncture##. Once per turn, when I hit a creature with an attack that deals Piercing damage, I can reroll one of its damage dice and must use this new roll."+
			(typePF ? " " : "\n") + "##Enhanced Critical##. When I score a Critical Hit that deals Piercing damage to a creature, I add one extra damage die to the Piercing damage. [+1 Dexterity]",
		scores: [0, 1, 0, 0, 0, 0],
	},
};
FeatsList["poisoner"] = {
	name: "Poisoner",
	source: [["P24", 206]],
	type: "general",
	prerequisite: "Level 4+",
	prereqeval: function (v) {
		return v.characterLevel >= 4;
	},
	description: "As a Bonus Action, I can apply poison to weapon/ammo, lasting for 1 min or until used to damage. Creatures damaged this way must make a Con save (DC 8+Prof+mod) or take 2d8 Poison damage and be Poisoned until my next turn ends. Poison damage I deal ignores Resistance. I can create poisons. See Notes page. [+1 Dex or Int]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Dexterity or Intelligence score by 1, to a maximum of 20.",
		"***Potent Poison***. When you make a damage roll that deals Poison damage, it ignores Resistance to Poison damage.",
		"***Brew Poison***. You gain proficiency with the Poisoner's Kit. With 1 hour of work using such a kit and expending 50 GP worth of materials, you can create a number of poison doses equal to your Proficiency Bonus. As a Bonus Action, you can apply a poison dose to a weapon or piece of ammunition. Once applied, the poison retains its potency for 1 minute or until you deal damage with the poisoned item, whichever is shorter. When a creature takes damage from the poisoned item, that creature must succeed on a Constitution saving throw (8 plus the modifier of the ability increased by this feat and your Proficiency Bonus) or take 2d8 Poison damage and have the Poisoned condition until the end of your next turn.",
	],
	toolProfs: [["Poisoner's Kit"]],
	action: [["bonus action", "Apply Poison"]],
	toNotesPage: [{
		name: "Potent Poison",
		note: ["When I make a damage roll that deals Poison damage, it ignores Resistance to Poison damage."],
	}],
	choices: ["Dexterity", "Intelligence"],
	choicesNotInMenu: true,
	"dexterity": {
		calculate: 'var abi = "Dex";\n var dc = 8 + Number(How("Proficiency Bonus")) + Number(What(abi + " Mod"));\n event.value = "As a Bonus Action, I can apply poison to weapon/ammo, lasting for 1 min or until used to damage. Creatures damaged this way must make a DC " + dc + " Con save or take 2d8 Poison damage and be Poisoned until my next turn ends. Poison damage I deal ignores Resistance. I can create poisons. See Notes page. [+1 " + abi + "]";',
		scores: [0, 1, 0, 0, 0, 0],
		toNotesPage: [{
			name: "Brew Poison",
			note: [
				"I gain proficiency with the Poisoner's Kit. With 1 hour of work using such a kit and expending 50 GP worth of materials, I can create a number of poison doses equal to my Proficiency Bonus.",
				"As a Bonus Action, I can apply a poison dose to a weapon or piece of ammunition. Once applied, the poison retains its potency for 1 minute or until I deal damage with the poisoned item, whichever is shorter.",
				"When a creature takes damage from the poisoned item, that creature must succeed on a Constitution saving throw (8 + my Proficiency Bonus + my Dexterity modifier) or take 2d8 Poison damage and have the Poisoned condition until the end of my next turn.",
			],
			amendTo: "Potent Poison",
		}],
	},
	"intelligence": {
		calculate: 'var abi = "Int";\n var dc = 8 + Number(How("Proficiency Bonus")) + Number(What(abi + " Mod"));\n event.value = "As a Bonus Action, I can apply poison to weapon/ammo, lasting for 1 min or until used to damage. Creatures damaged this way must make a DC " + dc + " Con save or take 2d8 Poison damage and be Poisoned until my next turn ends. Poison damage I deal ignores Resistance. I can create poisons. See Notes page. [+1 " + abi + "]";',
		scores: [0, 0, 0, 1, 0, 0],
		toNotesPage: [{
			name: "Brew Poison",
			note: [
				"I gain proficiency with the Poisoner's Kit. With 1 hour of work using such a kit and expending 50 GP worth of materials, I can create a number of poison doses equal to my Proficiency Bonus.",
				"As a Bonus Action, I can apply a poison dose to a weapon or piece of ammunition. Once applied, the poison retains its potency for 1 minute or until I deal damage with the poisoned item, whichever is shorter.",
				"When a creature takes damage from the poisoned item, that creature must succeed on a Constitution saving throw (8 + my Proficiency Bonus + my Intelligence modifier) or take 2d8 Poison damage and have the Poisoned condition until the end of my next turn.",
			],
			amendTo: "Potent Poison",
		}],
	},
};
FeatsList["polearm master"] = {
	name: "Polearm Master",
	source: [["P24", 206]],
	type: "general",
	prerequisite: "Level 4+, Strength or Dexterity 13+",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && (What("Str") >= 13 || What("Dex") >= 13);
	},
	description: "While wielding a Quarterstaff, Spear, or Heavy Reach weapon: ##Pole Strike##. As a Bonus Action directly after an Attack action with it, I can make a 1d4 Bludgeoning attack with its other end. ##Reactive Strike##. As a Reaction when a creature enters my reach with it, I can make one melee attack against them. [+1 Strength or Dexterity]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Dexterity or Strength score by 1, to a maximum of 20.",
		"***Pole Strike***. Immediately after you take the Attack action and attack with a Quarterstaff, a Spear, or a weapon that has the Heavy and Reach properties, you can use a Bonus Action to make a melee attack with the opposite end of the weapon. The weapon deals Bludgeoning damage, and the weapon's damage die for this attack is a d4.",
		"***Reactive Strike***. While you're holding a Quarterstaff, a Spear, or a weapon that has the Heavy and Reach properties, you can take a Reaction to make one melee attack against a creature that enters the reach you have with that weapon.",
	],
	weaponOptions: [{
		name: "Pole Strike",
		regExpSearch : /pole strike|polearm master|^(?=.*(polearm|(quarterstaff|\bstaff\b|\bbo\b)|(spear|qiang|\byaris?\b)|(glaive|guandao|bisento|naginata)|(halberd|\bji\b|kamayari)|(lance|umayari)|(pike|\bmaos?\b|nagaeyari)))(?=.*butt)(?=.*end).*$/i,
		source: [["P24", 206]],
		ability: 1,
		type: "polearm master",
		damage: [1, 4, "bludgeoning"],
		range: "Melee",
		description: "As Bonus Action after Attack action with Quarterstaff, Spear, or Heavy Reach weapon",
		abilitytodamage: true,
		selectNow: true,
		isAlwaysProf: true,
	}],
	action: [
		["bonus action", "Pole Strike (after Attack action)"],
		["reaction", "Reactive Strike (if enters my reach)"],
	],
	choices: ["Strength", "Dexterity"],
	choicesNotInMenu: true,
	"strength": {
		description: "While wielding a Quarterstaff, Spear, or Heavy Reach weapon: ##Pole Strike##. As a Bonus Action directly after an Attack action with it, I can make a 1d4 Bludgeoning attack with its other end. ##Reactive Strike##. As a Reaction when a creature enters my reach with it, I can make one melee attack against them." + (typePF ? "" : " [+1 Strength]"),
		scores: [1, 0, 0, 0, 0, 0],
	},
	"dexterity": {
		description: "While wielding a Quarterstaff, Spear, or Heavy Reach weapon: ##Pole Strike##. As a Bonus Action directly after an Attack action with it, I can make a 1d4 Bludgeoning attack with its other end. ##Reactive Strike##. As a Reaction when a creature enters my reach with it, I can make one melee attack against them." + (typePF ? "" : " [+1 Dexterity]"),
		scores: [0, 1, 0, 0, 0, 0],
	},
};
FeatsList["resilient"] = {
	name: "Resilient",
	source: [["P24", 206]],
	type: "general",
	prerequisite: "Level 4+",
	prereqeval: function (v) {
		return v.characterLevel >= 4;
	},
	description: "Select an ability score using the square button on this feat line. I gain proficiency with the saving throw of that ability score and a +1 added to it.",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase one ability score of your choice by 1, to a maximum of 20.",
		"***Saving Throw Proficiency***. You gain saving throw proficiency with the chosen ability.",
	],
	choices: ["Strength", "Dexterity", "Constitution", "Intelligence", "Wisdom", "Charisma"],
	choicesNotInMenu: true,
	"strength": {
		description: "I gain proficiency with Strength saving throws. [+1 Strength]",
		scores: [1, 0, 0, 0, 0, 0],
		saves: ["Str"],
	},
	"dexterity": {
		description: "I gain proficiency with Dexterity saving throws. [+1 Dexterity]",
		scores: [0, 1, 0, 0, 0, 0],
		saves: ["Dex"],
	},
	"constitution": {
		description: "I gain proficiency with Constitution saving throws. [+1 Constitution]",
		scores: [0, 0, 1, 0, 0, 0],
		saves: ["Con"],
	},
	"intelligence": {
		description: "I gain proficiency with Intelligence saving throws. [+1 Intelligence]",
		scores: [0, 0, 0, 1, 0, 0],
		saves: ["Int"],
	},
	"wisdom": {
		description: "I gain proficiency with Wisdom saving throws. [+1 Wisdom]",
		scores: [0, 0, 0, 0, 1, 0],
		saves: ["Wis"],
	},
	"charisma": {
		description: "I gain proficiency with Charisma saving throws. [+1 Charisma]",
		scores: [0, 0, 0, 0, 0, 1],
		saves: ["Cha"],
	},
};
var PHB24_RitualCasterDescription = [
	"##Ritual Spells##. I know a number of 1st-level Ritual spells equal to my Proficiency Bonus." + (typePF ? " " : "\n") + "I always have these spells prepared and can cast them as a Ritual or using spell slots.",
	"##Quick Ritual##. Once per Long Rest, I can cast a prepared Ritual spell using its regular casting time without " + (typePF ? "using" : "expending") + " a spell slot.",
]; if (typePF) PHB24_RitualCasterDescription.reverse();
FeatsList["ritual caster"] = {
	name: "Ritual Caster",
	source: [["P24", 206]],
	type: "general",
	prerequisite: "Level 4+; Intelligence, Wisdom, or Charisma 13+",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && (What("Int") >= 13 || What("Wis") >= 13 || What("Cha") >= 13);
	},
	description: PHB24_RitualCasterDescription.join("\n") + " [+1 Intelligence, Wisdom, or Charisma]",
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Intelligence, Wisdom, or Charisma score by 1, to a maximum of 20.",
		"***Ritual Spells***. Choose a number of level 1 spells equal to your Proficiency Bonus that have the Ritual tag. You always have those spells prepared, and you can cast them with any spell slots you have. The spells' spellcasting ability is the ability increased by this feat. Whenever your Proficiency Bonus increases thereafter, you can add an additional level 1 spell with the Ritual tag to the spells always prepared with this feature.",
		"***Quick Ritual***. With this benefit, you can cast a Ritual spell that you have prepared using its regular casting time rather than the extended time for a Ritual. Doing so doesn't require a spell slot. Once you cast the spell in this way, you can't use this benefit again until you finish a Long Rest.",
	],
	spellcastingBonus: [{
		name: "1st-level Ritual spell",
		ritual: true,
		level: [1, 1],
		times: ProficiencyBonusList,
		firstCol: "markedbox",
	}],
	extraLimitedFeatures: [{
		name: "Quick Ritual",
		usages: 1,
		recovery: "long rest",
	}],
	choices: ["Intelligence", "Wisdom", "Charisma"],
	choicesNotInMenu: true,
	"intelligence": {
		description: PHB24_RitualCasterDescription.join("\n") + (typePF ? " [+1 Int]" : " [+1 Intelligence]"),
		scores: [0, 0, 0, 1, 0, 0],
		spellcastingAbility: 4,
	},
	"wisdom": {
		description: PHB24_RitualCasterDescription.join("\n") + (typePF ? " [+1 Wis]" : " [+1 Wisdom]"),
		scores: [0, 0, 0, 0, 1, 0],
		spellcastingAbility: 5,
	},
	"charisma": {
		description: PHB24_RitualCasterDescription.join("\n") + (typePF ? " [+1 Cha]" : " [+1 Charisma]"),
		scores: [0, 0, 0, 0, 0, 1],
		spellcastingAbility: 6,
	},
};
FeatsList["sentinel"] = {
	name: "Sentinel",
	source: [["P24", 207]],
	type: "general",
	prerequisite: "Level 4+, Strength or Dexterity 13+",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && (What("Str") >= 13 || What("Dex") >= 13);
	},
	description: [
		"##Guardian##. When a creature within 5 ft of me takes the Disengage action or hits a target other than me with an attack, I can make an Opportunity Attack against them.",
		"##Halt##. When I make an Opportunity Attack against a creature, its Speed becomes 0 for the rest of the current turn. [+1 Strength or Dexterity]",
	].join("\n"),
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Strength or Dexterity score by 1, to a maximum of 20.",
		"***Guardian***. Immediately after a creature within 5 feet of you takes the Disengage action or hits a target other than you with an attack, you can make an Opportunity Attack against that creature.",
		"***Halt***. When you hit a creature with an Opportunity Attack, the creature's Speed becomes 0 for the rest of the current turn.",
	],
	action: [["reaction", "Guardian (ally hit/enemy Disengages)"]],
	choices: ["Strength", "Dexterity"],
	choicesNotInMenu: true,
	"strength": {
		description: [
			"##Guardian##. When a creature within 5 ft of me takes the Disengage action or hits a target other than me with an attack, I can make an Opportunity Attack against them.",
			"##Halt##. When I make an Opportunity Attack against a creature, its Speed becomes 0 for the rest of the current turn. [+1 Strength]",
		].join("\n"),
		scores: [1, 0, 0, 0, 0, 0],
	},
	"dexterity": {
		description: [
			"##Guardian##. When a creature within 5 ft of me takes the Disengage action or hits a target other than me with an attack, I can make an Opportunity Attack against them.",
			"##Halt##. When I make an Opportunity Attack against a creature, its Speed becomes 0 for the rest of the current turn. [+1  Dexterity]",
		].join("\n"),
		scores: [0, 1, 0, 0, 0, 0],
	},
};
FeatsList["shadow-touched"] = {
	name: "Shadow-Touched",
	source: [["P24", 207]],
	type: "general",
	prerequisite: "Level 4+",
	prereqeval: function (v) {
		return v.characterLevel >= 4;
	},
	description: "I learn *Invisibility* and one 1st-level Illusion or Necromancy spell. I always have these spells prepared. I can cast each once per Long Rest at their lowest level without expending a spell slot and by expending a spell slot as normal. The spells' spellcasting ability is the ability increased by this feat. [+1 Int, Wis, or Cha]",
	descriptionFull: [
		"Your exposure to the Shadowfell's magic grants you the following benefits.",
		"***Ability Score Increase***. Increase your Intelligence, Wisdom, or Charisma score by 1, to a maximum of 20.",
		"***Shadow Magic***. Choose one level 1 spell from the Illusion or Necromancy school of magic. You always have that spell and the *Invisibility* spell prepared. You can cast each of these spells without expending a spell slot. Once you cast either spell in this way, you can't cast that spell in this way again until you finish a Long Rest. You can also cast these spells using spell slots you have of the appropriate level. The spells' spellcasting ability is the ability increased by this feat.",
	],
	spellFirstColTitle: "PR",
	spellcastingBonus: [{
		name: "Invisibility",
		spells: ["invisibility"],
		selection: ["invisibility"],
		firstCol: "oncelr+markedbox",
	}, {
		name: "1st-level Illus/Necro spell",
		school: ["Illus", "Necro"],
		level: [1, 1],
		firstCol: "oncelr+markedbox",
	}],
	choices: ["Intelligence", "Wisdom", "Charisma"],
	choicesNotInMenu: true,
	"intelligence": {
		description: "I learn Invisibility and one 1st-level Illusion or Necromancy spell. I always have these spell prepared. I can cast each once per Long Rest at their lowest level without expending a spell slot and can cast them by expending a spell slot as normal. Intelligence is my spellcasting ability for these spells. [+1 Intelligence]",
		spellcastingAbility: 4,
		scores: [0, 0, 0, 1, 0, 0],
	},
	"wisdom": {
		description: "I learn Invisibility and one 1st-level Illusion or Necromancy spell. I always have these spell prepared. I can cast each once per Long Rest at their lowest level without expending a spell slot and can cast them by expending a spell slot as normal. Wisdom is my spellcasting ability for these spells. [+1 Wisdom]",
		spellcastingAbility: 5,
		scores: [0, 0, 0, 0, 1, 0],
	},
	"charisma": {
		description: "I learn Invisibility and one 1st-level Illusion or Necromancy spell. I always have these spell prepared. I can cast each once per Long Rest at their lowest level without expending a spell slot and can cast them by expending a spell slot as normal. Charisma is my spellcasting ability for these spells. [+1 Charisma]",
		spellcastingAbility: 6,
		scores: [0, 0, 0, 0, 0, 1],
	},
};
FeatsList["sharpshooter"] = {
	name: "Sharpshooter",
	source: [["P24", 207]],
	type: "general",
	prerequisite: "Level 4+, Dexterity 13+",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && What("Dex") >= 13;
	},
	description: [
		"My attack rolls with Ranged weapons:",
		"\n##Bypass Cover##. Ignore Half Cover and Three-Quarters Cover.",
		"\n##Firing in Melee##. Suffer no Disadvantage when I'm within 5 ft of an enemy.",
		"\n##Long Shots##. Suffer no Disadvantage when used at long range.",
		" [+1 Dexterity]",
	].map(function (n, idx, arr) {
		// Swap 'Firing in Melee' with 'Long Shots' lines on the Printer Friendly sheet
		return typePF && idx === 2 ? arr[3] : typePF && idx === 3 ? arr[2] : n;
	}).join(""),
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Dexterity score by 1, to a maximum of 20.",
		"***Bypass Cover***. Your ranged attacks with weapons ignore Half Cover and Three-Quarters Cover.",
		"***Firing in Melee***. Being within 5 feet of an enemy doesn't impose Disadvantage on your attack rolls with Ranged weapons.",
		"***Long Shots***. Attacking at long range doesn't impose Disadvantage on your attack rolls with Ranged weapons.",
	],
	scores: [0, 1, 0, 0, 0, 0],
	calcChanges: {
		atkAdd: [
			function (fields, v) {
				if (v.isRangedWeapon || v.isThrownWeapon) {
					fields.Description += (fields.Description ? "; " : "") + "No Disadv. at long range; Ignores \u00BD \x26 \u00BE cover";
				};
			},
			"My attack rolls with Ranged weapons suffer no Disadvantage from being used at long range nor from me being within 5 ft of an enemy. They also ignore Half Cover and Three-Quarters Cover.",
		],
	},
};
FeatsList["shield master"] = {
	name: "Shield Master",
	source: [["P24", 207]],
	type: "general",
	prerequisite: "Level 4+, Shield Training",
	prereqeval: function (v) {
		return v.characterLevel >= 4 && v.shieldProf;
	},
	description: "##Shield Bash##. Once per turn after I hit a creature in 5 ft during the Attack action, I can have it make a Str save (DC 8 + Str mod + Prof B.) or be pushed 5 ft away or knocked Prone. ##Interpose Shield##. As a Reaction when I succeed on a Dex save to halve damage, I can interpose my shield to avoid all the damage. [+1 Strength]",
	calculate: 'var dc = 8 + Number(How("Proficiency Bonus")) + Number(What("Str Mod"));\n var txt = ["##Shield Bash##. Once per turn after I hit a creature in 5 ft during the Attack action, I can have it make a DC " + dc + " (8+Str+Prof) Str save or be pushed 5 ft away or knocked Prone.", "##Interpose Shield##. As a Reaction when I succeed on a Dex save to halve damage, I can interpose my shield to avoid all the damage."];\n if (typePF) { txt.reverse(); };\n event.value = txt.join("\\n") + " [+1 Strength]";',
	descriptionFull: [
		"You gain the following benefits.",
		"***Ability Score Increase***. Increase your Strength score by 1, to a maximum of 20.",
		"***Shield Bash***. If you attack a creature within 5 feet of you as part of the Attack action and hit with a Melee weapon, you can immediately bash the target with your Shield if it's equipped, forcing the target to make a Strength saving throw (8 plus your Strength modifier and Proficiency Bonus). On a failed save, you either push the target 5 feet from you or cause it to have the Prone condition (your choice). You can use this benefit only once on each of your turns.",
		"***Interpose Shield***. If you'r
Download .txt
gitextract_021fw7i8/

├── .github/
│   └── workflows/
│       └── main.yml
├── .gitignore
├── Homebrew/
│   └── reddit_20180203_Tome-of-Monstrous-Races.js
├── README.md
├── WotC 2024/
│   ├── not-reprinted_20140819_PHB.js
│   ├── not-reprinted_20201117_TCoE.js
│   ├── pub_20240917_PHB.js
│   └── pub_20250218_MM.js
├── WotC material/
│   ├── all_WotC_pub+UA.js
│   ├── all_WotC_published.js
│   ├── all_WotC_unearthed_arcana.js
│   ├── ps_20160427_Zendikar.js
│   ├── ps_20160712_Innistrad.js
│   ├── ps_20170216_Kaladesh.js
│   ├── ps_20170705_Amonkhet.js
│   ├── ps_20180109_Ixalan.js
│   ├── ps_20180731_Dominaria.js
│   ├── pub_20140715_LMoP.js
│   ├── pub_20140818_PHB.js
│   ├── pub_20140819_HotDQ+20141104_RoT.js
│   ├── pub_20140930_MM.js
│   ├── pub_20141209_DMG.js
│   ├── pub_20150407_PotA.js
│   ├── pub_20150415_AL-EE.js
│   ├── pub_20150416_EE.js
│   ├── pub_20150714_AL-RoD.js
│   ├── pub_20150915_OotA.js
│   ├── pub_20151103_SCAG.js
│   ├── pub_20160315_CoS.js
│   ├── pub_20160906_SKT.js
│   ├── pub_20161115_VGtM.js
│   ├── pub_20170404_TftYP.js
│   ├── pub_20170915_Tortle.js
│   ├── pub_20170919_ToA.js
│   ├── pub_20171011_Grung.js
│   ├── pub_20171121_XGtE.js
│   ├── pub_20180529_MToF.js
│   ├── pub_20180723_WGtE_dupl.js
│   ├── pub_20180918_WDH.js
│   ├── pub_20181107_LLoK.js
│   ├── pub_20181120_GGtR.js
│   ├── pub_20181120_WDotMM.js
│   ├── pub_20190521_GoS.js
│   ├── pub_20190618_AcqInc.js
│   ├── pub_20190903_DnDEK_dupl.js
│   ├── pub_20190917_DiA.js
│   ├── pub_20190919_LR.js
│   ├── pub_20191112_AWM.js
│   ├── pub_20191119_ERftLW.js
│   ├── pub_20200317_EGtW.js
│   ├── pub_20200721_MOT.js
│   ├── pub_20200915_RotF.js
│   ├── pub_20201117-2_TCoE-sidekicks.js
│   ├── pub_20201117_TCoE.js
│   ├── pub_20210316_CM.js
│   ├── pub_20210518_VRGtR.js
│   ├── pub_20210921_WBtW.js
│   ├── pub_20211019_FToD.js
│   ├── pub_20211207_SCC.js
│   ├── pub_20220125_MotM.js
│   ├── pub_20220315_CotN.js
│   ├── pub_20220816_Spelljammer.js
│   ├── pub_20221206_Dragonlance.js
│   ├── pub_20230221_KftGV.js
│   ├── pub_20230815_GotG.js
│   ├── pub_20230919_PaBTSO.js
│   ├── pub_20231017_Planescape.js
│   ├── pub_20231030_CoA.js
│   ├── pub_20231114_BoMT.js
│   ├── pub_20240521_VEoR.js
│   ├── pub_20240716_QftIS.js
│   ├── pub_al_20190917_ALPG-v9.1.js
│   ├── ua_20150202_Eberron.js
│   ├── ua_20150406_Modifying-Classes.js
│   ├── ua_20150504_Waterborne-Adventures.js
│   ├── ua_20150803_Modern-Magic.js
│   ├── ua_20150909_Ranger.js
│   ├── ua_20151005_Prestige Classes and Rune Magic.js
│   ├── ua_20151102_Light,-Dark,-Underdark!.js
│   ├── ua_20151217_That-Old-Black-Magic.js
│   ├── ua_20160104_Kits-of-Old.js
│   ├── ua_20160404_Gothic-Heroes.js
│   ├── ua_20160606_Feats.js
│   ├── ua_20160801_The-Faithful.js
│   ├── ua_20160912_The-Ranger,-Revised.js
│   ├── ua_20161107_Barbarian-Primal-Paths.js
│   ├── ua_20161114_Bard-Colleges.js
│   ├── ua_20161121_Cleric-Divine-Domains.js
│   ├── ua_20161128_Druid-Circles.js
│   ├── ua_20161205_Fighter-Martial-Archetypes.js
│   ├── ua_20161212_Monk-Monastic-Traditions.js
│   ├── ua_20161219_Paladin-Sacred-Oaths.js
│   ├── ua_20170109_Artificer_dupl.js
│   ├── ua_20170116_Ranger-and-Rogue.js
│   ├── ua_20170206_Sorcerous-Origins.js
│   ├── ua_20170213_Warlock-and-Wizard.js
│   ├── ua_20170313_The-Mystic-Class.js
│   ├── ua_20170320_Wizard-Revisited.js
│   ├── ua_20170327_A-Trio-of-Subclasses.js
│   ├── ua_20170403_Starter-Spells.js
│   ├── ua_20170417_Feats-for-Skills.js
│   ├── ua_20170424_Feats-for-Races.js
│   ├── ua_20170501_Revised-Subclasses.js
│   ├── ua_20170605_Revised-Class-Options.js
│   ├── ua_20170911_Eladrin-and-Gith.js
│   ├── ua_20171009_Fiendish-Options.js
│   ├── ua_20171113_Elf-Subraces.js
│   ├── ua_20180108_Three-Subclasses.js
│   ├── ua_20180409_Order-Domain.js
│   ├── ua_20180514_Centaur-and-Minotaur.js
│   ├── ua_20180611_Giant-Soul-Sorcerer.js
│   ├── ua_20180723_Races-of-Eberron.js
│   ├── ua_20180810_Magic-Items-of-Eberron.js
│   ├── ua_20180813_Races-of-Ravnica.js
│   ├── ua_20180910_Dragonmarks.js
│   ├── ua_20190228_Artificer_dupl.js
│   ├── ua_20190514_Artificer_dupl.js
│   ├── ua_20190815_Barbarian-and-Monk.js
│   ├── ua_20190905_Sorcerer-and-Warlock.js
│   ├── ua_20190918_Bard-and-Paladin.js
│   ├── ua_20191003_Cleric-Druid-and-Wizard.js
│   ├── ua_20191017_Fighter-Ranger-and-Rogue.js
│   ├── ua_20191104_Class-Feature-Variants.js
│   ├── ua_20191125_Fighter-Rogue-and-Wizard.js
│   ├── ua_20200114_Subclasses-Part-1.js
│   ├── ua_20200206_Subclasses-Part-2.js
│   ├── ua_20200224_Subclasses-Part-3.js
│   ├── ua_20200512_Subclasses-Revisited.js
│   ├── ua_20200713_Feats-2020.js
│   ├── ua_20200805_Subclasses-Part-4.js
│   ├── ua_20201026_Subclasses-Part-5.js
│   ├── ua_20210126_Gothic-Lineages.js
│   ├── ua_20210311_Folk-of-the-Feywild.js
│   ├── ua_20210414_Draconic-Options.js
│   ├── ua_20211008_Travelers-of-the-Multiverse.js
│   ├── ua_20220308_Heroes-of-Krynn.js
│   ├── ua_20220425_Heroes-of-Krynn-Revisited.js
│   ├── ua_20220523_Giant-Options.js
│   ├── ua_20220718_Wonders-of-the-Multiverse.js
│   └── wip_excluded-magic-items.js
├── gulpfile.js
└── package.json
Download .txt
SYMBOL INDEX (8 symbols across 1 files)

FILE: gulpfile.js
  function getTooOldCheck (line 20) | function getTooOldCheck(requiredVersion, maxVersion) {
  function getTooNewCheck (line 27) | function getTooNewCheck(requiredVersion, maxVersion) {
  function concatAndMin (line 34) | function concatAndMin(glob, fileName, beta) {
  function combine (line 54) | function combine(minified, beta) {
  function concatAndMinPub (line 104) | function concatAndMinPub() {
  function concatAndMinUA (line 108) | function concatAndMinUA() {
  function concatAndMinPubBeta (line 114) | function concatAndMinPubBeta() {
  function concatAndMinUABeta (line 118) | function concatAndMinUABeta() {
Copy disabled (too large) Download .json
Condensed preview — 142 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (16,046K chars).
[
  {
    "path": ".github/workflows/main.yml",
    "chars": 958,
    "preview": "name: Release Creation\n\non:\n  release:\n    types: [published]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n    "
  },
  {
    "path": ".gitignore",
    "chars": 24,
    "preview": "node_modules/\r\ndebug.log"
  },
  {
    "path": "Homebrew/reddit_20180203_Tome-of-Monstrous-Races.js",
    "chars": 6525,
    "preview": "/*\t-WHAT IS THIS?-\r\n\tThis file adds optional material to \"MPMB's Character Record Sheet\" found at https://flapkan.com/mp"
  },
  {
    "path": "README.md",
    "chars": 2602,
    "preview": "# Imports for MPMB's Character Sheet\nThis git repository holds different fan-created materials that can be used with **M"
  },
  {
    "path": "WotC 2024/not-reprinted_20140819_PHB.js",
    "chars": 26196,
    "preview": "var iFileName = \"not-reprinted_20140819_PHB.js\";\nRequiredSheetVersion(\"24.0.5-beta\");\n// This file adds options from the"
  },
  {
    "path": "WotC 2024/not-reprinted_20201117_TCoE.js",
    "chars": 2636,
    "preview": "var iFileName = \"not-reprinted_20201117_TCoE.js\";\nRequiredSheetVersion(\"24.0.5-beta\");\n// This file adds options from Ta"
  },
  {
    "path": "WotC 2024/pub_20240917_PHB.js",
    "chars": 251906,
    "preview": "var iFileName = \"pub_20240917_PHB.js\";\nRequiredSheetVersion(\"24.0.6-beta\");\n// This file adds material from the 2024 Pla"
  },
  {
    "path": "WotC 2024/pub_20250218_MM.js",
    "chars": 3571,
    "preview": "var iFileName = \"pub_20250218_MM.js\";\nRequiredSheetVersion(\"24.0.1-beta\");\n// This file adds material from the 2025 Mons"
  },
  {
    "path": "WotC material/all_WotC_pub+UA.js",
    "chars": 4452795,
    "preview": "if (sheetVersion < 14000006) { throw \"This add-on script was made for a newer version of the sheet (v14.0.6-beta). Pleas"
  },
  {
    "path": "WotC material/all_WotC_published.js",
    "chars": 3214657,
    "preview": "if (sheetVersion < 14000006) { throw \"This add-on script was made for a newer version of the sheet (v14.0.6-beta). Pleas"
  },
  {
    "path": "WotC material/all_WotC_unearthed_arcana.js",
    "chars": 1238990,
    "preview": "if (sheetVersion < 14000006) { throw \"This add-on script was made for a newer version of the sheet (v14.0.6-beta). Pleas"
  },
  {
    "path": "WotC material/ps_20160427_Zendikar.js",
    "chars": 21914,
    "preview": "var iFileName = \"ps_20160427_Zendikar.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds all material from th"
  },
  {
    "path": "WotC material/ps_20160712_Innistrad.js",
    "chars": 7514,
    "preview": "var iFileName = \"ps_20160712_Innistrad.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds all material from the Pl"
  },
  {
    "path": "WotC material/ps_20170216_Kaladesh.js",
    "chars": 18159,
    "preview": "var iFileName = \"ps_20170216_Kaladesh.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds all material from th"
  },
  {
    "path": "WotC material/ps_20170705_Amonkhet.js",
    "chars": 31318,
    "preview": "var iFileName = \"ps_20170705_Amonkhet.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds all material from th"
  },
  {
    "path": "WotC material/ps_20180109_Ixalan.js",
    "chars": 10236,
    "preview": "var iFileName = \"ps_20180109_Ixalan.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds all material from the "
  },
  {
    "path": "WotC material/ps_20180731_Dominaria.js",
    "chars": 4858,
    "preview": "var iFileName = \"ps_20180731_Dominaria.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds all material from the Pl"
  },
  {
    "path": "WotC material/pub_20140715_LMoP.js",
    "chars": 8302,
    "preview": "var iFileName = \"pub_20140715_LMoP.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the magic items from the Lo"
  },
  {
    "path": "WotC material/pub_20140818_PHB.js",
    "chars": 251404,
    "preview": "var iFileName = \"pub_20140818_PHB.js\";\r\nRequiredSheetVersion(\"14.0.6-beta\");\r\n// This file adds all material from the Pl"
  },
  {
    "path": "WotC material/pub_20140819_HotDQ+20141104_RoT.js",
    "chars": 33087,
    "preview": "var iFileName = \"pub_20140819_HotDQ+20141104_RoT.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the backgroun"
  },
  {
    "path": "WotC material/pub_20140930_MM.js",
    "chars": 39138,
    "preview": "var iFileName = \"pub_20140930_MM.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds all the player-material f"
  },
  {
    "path": "WotC material/pub_20141209_DMG.js",
    "chars": 103645,
    "preview": "var iFileName = \"pub_20141209_DMG.js\";\r\nRequiredSheetVersion(\"13.2.0\");\r\n// This file adds all the player-material from "
  },
  {
    "path": "WotC material/pub_20150407_PotA.js",
    "chars": 49116,
    "preview": "var iFileName = \"pub_20150407_PotA.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the magic items from the Pr"
  },
  {
    "path": "WotC material/pub_20150415_AL-EE.js",
    "chars": 18015,
    "preview": "var iFileName = \"pub_20150415_AL-EE.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the optional backgrounds fr"
  },
  {
    "path": "WotC material/pub_20150416_EE.js",
    "chars": 68008,
    "preview": "var iFileName = \"pub_20150416_EE.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds all the player-material from "
  },
  {
    "path": "WotC material/pub_20150714_AL-RoD.js",
    "chars": 24626,
    "preview": "var iFileName = \"pub_20150714_AL-RoD.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the optional backgrounds f"
  },
  {
    "path": "WotC material/pub_20150915_OotA.js",
    "chars": 30061,
    "preview": "var iFileName = \"pub_20150915_OotA.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds all the beasts and backgrou"
  },
  {
    "path": "WotC material/pub_20151103_SCAG.js",
    "chars": 71405,
    "preview": "var iFileName = \"pub_20151103_SCAG.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds all the player-material fro"
  },
  {
    "path": "WotC material/pub_20160315_CoS.js",
    "chars": 53659,
    "preview": "var iFileName = \"pub_20160315_CoS.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the backgrounds from the Cur"
  },
  {
    "path": "WotC material/pub_20160906_SKT.js",
    "chars": 58433,
    "preview": "var iFileName = \"pub_20160906_SKT.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds the beasts from the Stor"
  },
  {
    "path": "WotC material/pub_20161115_VGtM.js",
    "chars": 53950,
    "preview": "var iFileName = \"pub_20161115_VGtM.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds all the player-material"
  },
  {
    "path": "WotC material/pub_20170404_TftYP.js",
    "chars": 43232,
    "preview": "var iFileName = \"pub_20170404_TftYP.js\";\nRequiredSheetVersion(\"14.0.5-beta\");\n// This file adds the beasts from the Tale"
  },
  {
    "path": "WotC material/pub_20170915_Tortle.js",
    "chars": 2164,
    "preview": "var iFileName = \"pub_20170915_Tortle.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the Tortle Race from the "
  },
  {
    "path": "WotC material/pub_20170919_ToA.js",
    "chars": 35419,
    "preview": "var iFileName = \"pub_20170919_ToA.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds the backgrounds and beas"
  },
  {
    "path": "WotC material/pub_20171011_Grung.js",
    "chars": 1584,
    "preview": "var iFileName = \"pub_20171011_One-Grung-Above.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the Grung Race fr"
  },
  {
    "path": "WotC material/pub_20171121_XGtE.js",
    "chars": 324229,
    "preview": "var iFileName = \"pub_20171121_XGtE.js\";\r\nRequiredSheetVersion(\"14.0.1-beta\");\r\n// This file adds the backgrounds and bea"
  },
  {
    "path": "WotC material/pub_20180529_MToF.js",
    "chars": 39200,
    "preview": "var iFileName = \"pub_20180529_MToF.js\";\nRequiredSheetVersion(\"13.1.14\");\n// This file adds all the player-material from "
  },
  {
    "path": "WotC material/pub_20180723_WGtE_dupl.js",
    "chars": 129660,
    "preview": "var iFileName = \"pub_20180723_WGtE.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds the content from Wayfin"
  },
  {
    "path": "WotC material/pub_20180918_WDH.js",
    "chars": 28494,
    "preview": "var iFileName = \"pub_20180918_WDH.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the magic items from the Wat"
  },
  {
    "path": "WotC material/pub_20181107_LLoK.js",
    "chars": 35934,
    "preview": "var iFileName = \"pub_20181107_LLoK.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the magic items from the Lo"
  },
  {
    "path": "WotC material/pub_20181120_GGtR.js",
    "chars": 151726,
    "preview": "var iFileName = \"pub_20181120_GGtR.js\";\nRequiredSheetVersion(\"14.0.5-beta\");\n// This file adds all material from the Gui"
  },
  {
    "path": "WotC material/pub_20181120_WDotMM.js",
    "chars": 31332,
    "preview": "var iFileName = \"pub_20181120_WDotMM.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the magic items from the "
  },
  {
    "path": "WotC material/pub_20190521_GoS.js",
    "chars": 20974,
    "preview": "var iFileName = \"pub_20190521_GoS.js\";\nRequiredSheetVersion(\"13.0.8\");\n// This file adds all material from the Ghosts of"
  },
  {
    "path": "WotC material/pub_20190618_AcqInc.js",
    "chars": 28492,
    "preview": "var iFileName = \"pub_20190618_AcqInc.js\";\nRequiredSheetVersion(\"13.1.14\");\n// This file adds all material from the Acqui"
  },
  {
    "path": "WotC material/pub_20190903_DnDEK_dupl.js",
    "chars": 18063,
    "preview": "var iFileName = \"pub_20190903_DnDEK.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the sidekick rules from th"
  },
  {
    "path": "WotC material/pub_20190917_DiA.js",
    "chars": 39653,
    "preview": "var iFileName = \"pub_20190917_DiA.js\";\nRequiredSheetVersion(\"13.1.14\");\n// This file adds all material from the Baldur's"
  },
  {
    "path": "WotC material/pub_20190919_LR.js",
    "chars": 1715,
    "preview": "var iFileName = \"pub_20190919_LR.js\";\nRequiredSheetVersion(\"13.1.14\");\n// This file adds the Locathah from the Locathah "
  },
  {
    "path": "WotC material/pub_20191112_AWM.js",
    "chars": 1706,
    "preview": "var iFileName = \"pub_20191112_Adventure-with-Muk.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the Dankwood G"
  },
  {
    "path": "WotC material/pub_20191119_ERftLW.js",
    "chars": 193031,
    "preview": "var iFileName = \"pub_20191119_ERftLW.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds the content from Eber"
  },
  {
    "path": "WotC material/pub_20200317_EGtW.js",
    "chars": 190064,
    "preview": "var iFileName = \"pub_20200317_EGtW.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\", 15);\r\n// This file adds the content from Ex"
  },
  {
    "path": "WotC material/pub_20200721_MOT.js",
    "chars": 42783,
    "preview": "var iFileName = \"pub_20200721_MOT.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the content from Mythic Odys"
  },
  {
    "path": "WotC material/pub_20200915_RotF.js",
    "chars": 53471,
    "preview": "var iFileName = \"pub_20200915_RotF.js\";\nRequiredSheetVersion(\"14.0.5-beta\");\n// This file adds the content from the Icew"
  },
  {
    "path": "WotC material/pub_20201117-2_TCoE-sidekicks.js",
    "chars": 38979,
    "preview": "var iFileName = \"pub_20201117-2_TCoE-sidekicks.js\";\r\nRequiredSheetVersion(\"13.1.7\");\r\n// This file adds the sidekick cla"
  },
  {
    "path": "WotC material/pub_20201117_TCoE.js",
    "chars": 438541,
    "preview": "var iFileName = \"pub_20201117_TCoE.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\", 15);\r\n// This file adds the content from Ta"
  },
  {
    "path": "WotC material/pub_20210316_CM.js",
    "chars": 15032,
    "preview": "var iFileName = \"pub_20210316_CM.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the content from the Candleke"
  },
  {
    "path": "WotC material/pub_20210518_VRGtR.js",
    "chars": 49391,
    "preview": "var iFileName = \"pub_20210518_VRGtR.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds all the player-materia"
  },
  {
    "path": "WotC material/pub_20210921_WBtW.js",
    "chars": 51088,
    "preview": "var iFileName = \"pub_20210921_WBtW.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds the content from The Wi"
  },
  {
    "path": "WotC material/pub_20211019_FToD.js",
    "chars": 111313,
    "preview": "var iFileName = \"pub_20211019_FToD.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds all the player-material"
  },
  {
    "path": "WotC material/pub_20211207_SCC.js",
    "chars": 55267,
    "preview": "var iFileName = \"pub_20211207_SCC.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\", 15);\r\n// This file adds all the player-mater"
  },
  {
    "path": "WotC material/pub_20220125_MotM.js",
    "chars": 89366,
    "preview": "var iFileName = \"pub_20220125_MotM.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds all the player-material"
  },
  {
    "path": "WotC material/pub_20220315_CotN.js",
    "chars": 24837,
    "preview": "var iFileName = \"pub_20220315_CotN.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds all the magic items fro"
  },
  {
    "path": "WotC material/pub_20220816_Spelljammer.js",
    "chars": 26037,
    "preview": "var iFileName = \"pub_20220816_Spelljammer.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n/*\r\n\tThis file adds the Character "
  },
  {
    "path": "WotC material/pub_20221206_Dragonlance.js",
    "chars": 46198,
    "preview": "var iFileName = \"pub_20221206_Dragonlance.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds the Character Op"
  },
  {
    "path": "WotC material/pub_20230221_KftGV.js",
    "chars": 16413,
    "preview": "var iFileName = \"pub_20230221_KftGV.js\";\r\nRequiredSheetVersion(\"13.1.1\");\r\n// This file adds the magic items from the Ke"
  },
  {
    "path": "WotC material/pub_20230815_GotG.js",
    "chars": 106213,
    "preview": "var iFileName = \"pub_20230815_GotG.js\";\nRequiredSheetVersion(\"14.0.5-beta\");\n// This file adds the player-material from "
  },
  {
    "path": "WotC material/pub_20230919_PaBTSO.js",
    "chars": 27202,
    "preview": "var iFileName = \"pub_20230919_PaBTSO.js\";\nRequiredSheetVersion(\"13.2.0\");\n// This file adds the magic items from the Pha"
  },
  {
    "path": "WotC material/pub_20231017_Planescape.js",
    "chars": 35667,
    "preview": "var iFileName = \"pub_20231017_Planescape.js\";\nRequiredSheetVersion(\"14.0.5-beta\");\n// This file adds the Character Optio"
  },
  {
    "path": "WotC material/pub_20231030_CoA.js",
    "chars": 48412,
    "preview": "var iFileName = \"pub_20231030_CoA.js\";\nRequiredSheetVersion(\"13.1.14\");\n// This file adds the magic items from the Chain"
  },
  {
    "path": "WotC material/pub_20231114_BoMT.js",
    "chars": 152011,
    "preview": "var iFileName = \"pub_20231114_BoMT.js\";\nRequiredSheetVersion(\"14.0.5-beta\");\n// This file adds the Character Options con"
  },
  {
    "path": "WotC material/pub_20240521_VEoR.js",
    "chars": 1423,
    "preview": "var iFileName = \"pub_20240521_VEoR.js\";\nRequiredSheetVersion(\"13.1.14\");\n// This file adds the magic item from the Vecna"
  },
  {
    "path": "WotC material/pub_20240716_QftIS.js",
    "chars": 24690,
    "preview": "var iFileName = \"pub_20240716_QftIS.js\";\nRequiredSheetVersion(\"13.1.14\");\n// This file adds the futuristic and magic ite"
  },
  {
    "path": "WotC material/pub_al_20190917_ALPG-v9.1.js",
    "chars": 2046,
    "preview": "var iFileName = \"pub_al_20190917_ALPG-v9.1.js\";\nRequiredSheetVersion(\"13.0.8\");\n// This file adds the winged aasimar/tie"
  },
  {
    "path": "WotC material/ua_20150202_Eberron.js",
    "chars": 31134,
    "preview": "var iFileName = \"ua_20150202_Eberron.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the content from the Unea"
  },
  {
    "path": "WotC material/ua_20150406_Modifying-Classes.js",
    "chars": 15844,
    "preview": "var iFileName = \"ua_20150406_Modifying-Classes.js\";\r\nRequiredSheetVersion(\"13.0.8\", 15);\r\n// This file adds the content "
  },
  {
    "path": "WotC material/ua_20150504_Waterborne-Adventures.js",
    "chars": 5225,
    "preview": "var iFileName = \"ua_20150504_Waterborne-Adventures.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the content"
  },
  {
    "path": "WotC material/ua_20150803_Modern-Magic.js",
    "chars": 27150,
    "preview": "var iFileName = \"ua_20150803_Modern-Magic.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content from the "
  },
  {
    "path": "WotC material/ua_20150909_Ranger.js",
    "chars": 6964,
    "preview": "// This code was contributed by Lewis Henderson\r\n//\r\n// Please note that the original .pdf has the hit dice as 2d6 per "
  },
  {
    "path": "WotC material/ua_20151005_Prestige Classes and Rune Magic.js",
    "chars": 9990,
    "preview": "var iFileName = \"ua_20151005_Prestige Classes and Rune Magic.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds th"
  },
  {
    "path": "WotC material/ua_20151102_Light,-Dark,-Underdark!.js",
    "chars": 9784,
    "preview": "var iFileName = \"ua_20151102_Light,-Dark,-Underdark!.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the conten"
  },
  {
    "path": "WotC material/ua_20151217_That-Old-Black-Magic.js",
    "chars": 12222,
    "preview": "var iFileName = \"ua_20151217_That-Old-Black-Magic.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content f"
  },
  {
    "path": "WotC material/ua_20160104_Kits-of-Old.js",
    "chars": 12556,
    "preview": "var iFileName = \"ua_20160104_Kits-of-Old.js\";\r\nRequiredSheetVersion(\"13.0.8\", 15);\r\n// This file adds the content from t"
  },
  {
    "path": "WotC material/ua_20160404_Gothic-Heroes.js",
    "chars": 20350,
    "preview": "var iFileName = \"ua_20160404_Gothic-Heroes.js\";\r\nRequiredSheetVersion(\"14.0.1-beta\");\r\n// This file adds the content fro"
  },
  {
    "path": "WotC material/ua_20160606_Feats.js",
    "chars": 13776,
    "preview": "var iFileName = \"ua_20160606_Feats.js\";\nRequiredSheetVersion(\"13.0.8\");\n// This file adds the content from the Unearthed"
  },
  {
    "path": "WotC material/ua_20160801_The-Faithful.js",
    "chars": 11324,
    "preview": "var iFileName = \"ua_20160801_The-Faithful.js\";\nRequiredSheetVersion(\"14.0.1-beta\", 15);\n// This file adds the content fr"
  },
  {
    "path": "WotC material/ua_20160912_The-Ranger,-Revised.js",
    "chars": 29245,
    "preview": "var iFileName = \"ua_20160912_The-Ranger,-Revised.js\";\r\nRequiredSheetVersion(\"13.1.0\");\r\n// This file adds the content fr"
  },
  {
    "path": "WotC material/ua_20161107_Barbarian-Primal-Paths.js",
    "chars": 10424,
    "preview": "var iFileName = \"ua_20161107_Barbarian-Primal-Paths.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content"
  },
  {
    "path": "WotC material/ua_20161114_Bard-Colleges.js",
    "chars": 7367,
    "preview": "var iFileName = \"ua_20161114_Bard-Colleges.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content from the"
  },
  {
    "path": "WotC material/ua_20161121_Cleric-Divine-Domains.js",
    "chars": 12707,
    "preview": "var iFileName = \"ua_20161121_Cleric-Divine-Domains.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content "
  },
  {
    "path": "WotC material/ua_20161128_Druid-Circles.js",
    "chars": 9633,
    "preview": "var iFileName = \"ua_20161128_Druid-Circles.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content from the"
  },
  {
    "path": "WotC material/ua_20161205_Fighter-Martial-Archetypes.js",
    "chars": 17147,
    "preview": "var iFileName = \"ua_20161205_Fighter-Martial-Archetypes.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the con"
  },
  {
    "path": "WotC material/ua_20161212_Monk-Monastic-Traditions.js",
    "chars": 8310,
    "preview": "var iFileName = \"ua_20161212_Monk-Monastic-Traditions.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the conte"
  },
  {
    "path": "WotC material/ua_20161219_Paladin-Sacred-Oaths.js",
    "chars": 7124,
    "preview": "var iFileName = \"ua_20161219_Paladin-Sacred-Oaths.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content f"
  },
  {
    "path": "WotC material/ua_20170109_Artificer_dupl.js",
    "chars": 27675,
    "preview": "var iFileName = \"ua_20170109_Artificer.js\";\r\nRequiredSheetVersion(\"14.0.1-beta\");\r\n// This file adds the content from th"
  },
  {
    "path": "WotC material/ua_20170116_Ranger-and-Rogue.js",
    "chars": 9902,
    "preview": "var iFileName = \"ua_20170116_Ranger-and-Rogue.js\";\r\nRequiredSheetVersion(\"13.2.0\");\r\n// This file adds the content from "
  },
  {
    "path": "WotC material/ua_20170206_Sorcerous-Origins.js",
    "chars": 13335,
    "preview": "var iFileName = \"ua_20170206_Sorcerous-Origins.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the content fro"
  },
  {
    "path": "WotC material/ua_20170213_Warlock-and-Wizard.js",
    "chars": 29670,
    "preview": "var iFileName = \"ua_20170213_Warlock-and-Wizard.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds the conten"
  },
  {
    "path": "WotC material/ua_20170313_The-Mystic-Class.js",
    "chars": 187828,
    "preview": "var iFileName = \"ua_20170313_The-Mystic-Class.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the content from"
  },
  {
    "path": "WotC material/ua_20170320_Wizard-Revisited.js",
    "chars": 10614,
    "preview": "var iFileName = \"ua_20170320_Wizard-Revisited.js\";\nRequiredSheetVersion(\"13.0.8\", 15);\n// This file adds the content fro"
  },
  {
    "path": "WotC material/ua_20170327_A-Trio-of-Subclasses.js",
    "chars": 7368,
    "preview": "var iFileName = \"ua_20170327_A Trio-of-Subclasses.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the content "
  },
  {
    "path": "WotC material/ua_20170403_Starter-Spells.js",
    "chars": 20363,
    "preview": "var iFileName = \"ua_20170403_Starter-Spells.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content from th"
  },
  {
    "path": "WotC material/ua_20170417_Feats-for-Skills.js",
    "chars": 20017,
    "preview": "var iFileName = \"ua_20170417_Feats-for-Skills.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds the content "
  },
  {
    "path": "WotC material/ua_20170424_Feats-for-Races.js",
    "chars": 30145,
    "preview": "var iFileName = \"ua_20170424_Feats-for-Races.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the content from "
  },
  {
    "path": "WotC material/ua_20170501_Revised-Subclasses.js",
    "chars": 19535,
    "preview": "var iFileName = \"ua_20170501_Revised-Subclasses.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content fro"
  },
  {
    "path": "WotC material/ua_20170605_Revised-Class-Options.js",
    "chars": 25310,
    "preview": "var iFileName = \"ua_20170605_Revised-Class-Options.js\";\r\nRequiredSheetVersion(\"14.0.1-beta\");\r\n// This file adds the con"
  },
  {
    "path": "WotC material/ua_20170911_Eladrin-and-Gith.js",
    "chars": 7085,
    "preview": "var iFileName = \"ua_20170911_Eladrin-and-Gith.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content from "
  },
  {
    "path": "WotC material/ua_20171009_Fiendish-Options.js",
    "chars": 18765,
    "preview": "var iFileName = \"ua_20171009_Fiendish-Options.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content from "
  },
  {
    "path": "WotC material/ua_20171113_Elf-Subraces.js",
    "chars": 7561,
    "preview": "var iFileName = \"ua_20171113_Elf-Subraces.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content from the "
  },
  {
    "path": "WotC material/ua_20180108_Three-Subclasses.js",
    "chars": 11521,
    "preview": "var iFileName = \"ua_20180108_Three-Subclasses.js\";\nRequiredSheetVersion(\"13.1.14\", 15);\n// This file adds the content fr"
  },
  {
    "path": "WotC material/ua_20180409_Order-Domain.js",
    "chars": 3348,
    "preview": "var iFileName = \"ua_20180409_Order-Domain.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content from the "
  },
  {
    "path": "WotC material/ua_20180514_Centaur-and-Minotaur.js",
    "chars": 4118,
    "preview": "var iFileName = \"ua_20180514_Centaur-and-Minotaur.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the content "
  },
  {
    "path": "WotC material/ua_20180611_Giant-Soul-Sorcerer.js",
    "chars": 9176,
    "preview": "var iFileName = \"ua_20180611_Giant-Soul-Sorcerer.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content fr"
  },
  {
    "path": "WotC material/ua_20180723_Races-of-Eberron.js",
    "chars": 19771,
    "preview": "var iFileName = \"ua_20180723_Races-of-Eberron.js\";\nRequiredSheetVersion(\"13.1.14\");\n// This file adds the content from t"
  },
  {
    "path": "WotC material/ua_20180810_Magic-Items-of-Eberron.js",
    "chars": 32729,
    "preview": "var iFileName = \"ua_20180810_Magic-Items-of-Eberron.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content"
  },
  {
    "path": "WotC material/ua_20180813_Races-of-Ravnica.js",
    "chars": 12873,
    "preview": "var iFileName = \"ua_20180813_Races-of-Ravnica.js\";\nRequiredSheetVersion(\"13.1.14\");\n// This file adds the content from t"
  },
  {
    "path": "WotC material/ua_20180910_Dragonmarks.js",
    "chars": 56720,
    "preview": "var iFileName = \"ua_20180910_Dragonmarks.js\";\r\nRequiredSheetVersion(\"14.0.1-beta\");\r\n// This file adds the content from "
  },
  {
    "path": "WotC material/ua_20190228_Artificer_dupl.js",
    "chars": 45560,
    "preview": "var iFileName = \"ua_20190228_Artificer.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds the content from th"
  },
  {
    "path": "WotC material/ua_20190514_Artificer_dupl.js",
    "chars": 66385,
    "preview": "var iFileName = \"ua_20190514_Artificer.js\";\r\nRequiredSheetVersion(\"14.0.5-beta\");\r\n// This file adds the content from th"
  },
  {
    "path": "WotC material/ua_20190815_Barbarian-and-Monk.js",
    "chars": 11125,
    "preview": "var iFileName = \"ua_20190815_Barbarian-and-Monk.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the content fr"
  },
  {
    "path": "WotC material/ua_20190905_Sorcerer-and-Warlock.js",
    "chars": 11197,
    "preview": "var iFileName = \"ua_20190905_Sorcerer-and-Warlock.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the content "
  },
  {
    "path": "WotC material/ua_20190918_Bard-and-Paladin.js",
    "chars": 5793,
    "preview": "var iFileName = \"ua_20190918_Bard-and-Paladin.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the content from "
  },
  {
    "path": "WotC material/ua_20191003_Cleric-Druid-and-Wizard.js",
    "chars": 16039,
    "preview": "var iFileName = \"ua_20191003_Cleric-Druid-and-Wizard.js\";\r\nRequiredSheetVersion(\"13.0.8\");\r\n// This file adds the conten"
  },
  {
    "path": "WotC material/ua_20191017_Fighter-Ranger-and-Rogue.js",
    "chars": 17668,
    "preview": "var iFileName = \"ua_20191017_Fighter-Ranger-and-Rogue.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the cont"
  },
  {
    "path": "WotC material/ua_20191104_Class-Feature-Variants.js",
    "chars": 57754,
    "preview": "var iFileName = \"ua_20191104_Class-Feature-Variants.js\";\r\nRequiredSheetVersion(\"14.0.1-beta\", 15);\r\n// This file adds th"
  },
  {
    "path": "WotC material/ua_20191125_Fighter-Rogue-and-Wizard.js",
    "chars": 29521,
    "preview": "var iFileName = \"ua_20191125_Fighter-Rogue-and-Wizard.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the cont"
  },
  {
    "path": "WotC material/ua_20200114_Subclasses-Part-1.js",
    "chars": 15927,
    "preview": "var iFileName = \"ua_20200114_Subclasses-Part-1.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the content fro"
  },
  {
    "path": "WotC material/ua_20200206_Subclasses-Part-2.js",
    "chars": 12132,
    "preview": "var iFileName = \"ua_20200206_Subclasses-Part-2.js\";\r\nRequiredSheetVersion(\"13.1.14\");\r\n// This file adds the content fro"
  },
  {
    "path": "WotC material/ua_20200224_Subclasses-Part-3.js",
    "chars": 27438,
    "preview": "var iFileName = \"ua_20200206_Subclasses-Part-3.js\";\r\nRequiredSheetVersion(\"13.1.14\", 15);\r\n// This file adds the content"
  },
  {
    "path": "WotC material/ua_20200512_Subclasses-Revisited.js",
    "chars": 19496,
    "preview": "var iFileName = \"ua_20200512_Subclasses-Revisited.js\";\nRequiredSheetVersion(\"13.0.8\", 15);\n// This file adds the content"
  },
  {
    "path": "WotC material/ua_20200713_Feats-2020.js",
    "chars": 28281,
    "preview": "var iFileName = \"ua_20200713_Feats-2020.js\";\nRequiredSheetVersion(\"14.0.5-beta\", 15);\n// This file adds the content from"
  },
  {
    "path": "WotC material/ua_20200805_Subclasses-Part-4.js",
    "chars": 15399,
    "preview": "var iFileName = \"ua_20200805_Subclasses-Part-4.js\";\nRequiredSheetVersion(\"13.0.8\");\n// This file adds the content from t"
  },
  {
    "path": "WotC material/ua_20201026_Subclasses-Part-5.js",
    "chars": 15148,
    "preview": "var iFileName = \"ua_20201026_Subclasses-Part-5.js\";\r\nRequiredSheetVersion(\"14.0.0-beta\");\r\n// This file adds the content"
  },
  {
    "path": "WotC material/ua_20210126_Gothic-Lineages.js",
    "chars": 7323,
    "preview": "var iFileName = \"ua_20210126_Gothic-Lineages.js\";\nRequiredSheetVersion(\"14.0.1-beta\");\n// This file adds the content fro"
  },
  {
    "path": "WotC material/ua_20210311_Folk-of-the-Feywild.js",
    "chars": 6272,
    "preview": "var iFileName = \"ua_20210311_Folk-of-the-Feywild.js\";\nRequiredSheetVersion(\"13.0.8\");\n// This file adds the content from"
  },
  {
    "path": "WotC material/ua_20210414_Draconic-Options.js",
    "chars": 27031,
    "preview": "var iFileName = \"ua_20210414_Draconic-Options.js\";\nRequiredSheetVersion(\"13.1.14\");\n// This file adds the content from t"
  },
  {
    "path": "WotC material/ua_20211008_Travelers-of-the-Multiverse.js",
    "chars": 8862,
    "preview": "var iFileName = \"ua_20211008_Travelers-of-the-Multiverse.js\";\nRequiredSheetVersion(\"13.1.14\");\n// This file adds the con"
  },
  {
    "path": "WotC material/ua_20220308_Heroes-of-Krynn.js",
    "chars": 50721,
    "preview": "// This file adds the content from the Unearthed Arcana 2022: Heroes of Krynn article to MPMB's Character Record Sheet\r\n"
  },
  {
    "path": "WotC material/ua_20220425_Heroes-of-Krynn-Revisited.js",
    "chars": 29039,
    "preview": "// This file adds the content from the Unearthed Arcana 2022: Heroes of Krynn Revisited article to MPMB's Character Reco"
  },
  {
    "path": "WotC material/ua_20220523_Giant-Options.js",
    "chars": 32627,
    "preview": "// This file adds the content from the Unearthed Arcana 2022: Giant Options article to MPMB's Character Record Sheet\r\n//"
  },
  {
    "path": "WotC material/ua_20220718_Wonders-of-the-Multiverse.js",
    "chars": 89096,
    "preview": "// This file adds the content from the Unearthed Arcana 2022: Wonders of the Multiverse article to MPMB's Character Reco"
  },
  {
    "path": "WotC material/wip_excluded-magic-items.js",
    "chars": 147817,
    "preview": "/*\r\n\tThis file contains the magic items found in WotC publications that have been\r\n\texcluded from the first round of tra"
  },
  {
    "path": "gulpfile.js",
    "chars": 6146,
    "preview": "/*jshint esversion: 6 */\n\nconst { series, parallel, src, dest } = require('gulp');\nconst fs      = require('fs');\nconst "
  },
  {
    "path": "package.json",
    "chars": 1065,
    "preview": "{\n  \"name\": \"imports-for-mpmb-s-character-sheet\",\n  \"version\": \"1.0.0\",\n  \"description\": \"This git repository holds diff"
  }
]

About this extraction

This page contains the full source code of the safety-orange/Imports-for-MPMB-s-Character-Sheet GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 142 files (13.9 MB), approximately 3.7M tokens, and a symbol index with 8 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!