question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Convert Spellcasting Ability information into a full object

See original GitHub issue
"special_abilities": [{
    "name": "Spellcasting",
    "desc": "The acolyte is a 1st-level spellcaster. Its spellcasting ability is Wisdom (spell save DC 12, +4 to hit with spell attacks). The acolyte has following cleric spells prepared:\n\n• Cantrips (at will): light, sacred flame, thaumaturgy\n• 1st level (3 slots): bless, cure wounds, sanctuary",
    "attack_bonus": 0
}]

would read something like

"special_abilities": [
    {
        "name": "Spellcasting",
        "desc": {
            "spellcasting_level":1,
            "spellcasting_ability":"wisdom",
            "spellcasting_dc":12,
            "spellcasting_attack_modifier":4,
            "spellcasting_school":"cleric",
            "spells":{
                "cantrips": [ "light", "sacred flame", "thaumaturgy" ],
                "1st":[ "bless", "cure wounds", "sanctuary" ]
            },
            "spell_slots":{
                "1st":3
            }
        }
    }
]

I’d love input/thoughts on structure, key names, etc above.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:65 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ogregoirecommented, Nov 5, 2019

Indeed, but my point about spells being just spells and the fact that they’re cantrips, level 1 or 9 is relevant to the spell, not to the monster. So I would keep the following structure with the spells slots adapted. Here’s my take with the archmage:

"spellcasting": {
	... ,
	"slots": {
		"1": 4,
		"2": 3,
		"3": 3,
		"4": 3,
		"5": 3,
		"6": 1,
		"7": 1,
		"8": 1,
		"9": 1,
	},
	"spells": [
		{
			"name": "Fire Bolt",
			"url": "..."
		},
		{
			"name": "Light",
			"url": "..."
		},
		{
			"name": "Mage Hand",
			"url": "..."
		},
		{
			"name": "Prestidigitation",
			"url": "..."
		},
		{
			"name": "Shocking Grasp",
			"url": "..."
		},
		{
			"name": "Detect Magic",
			"url": "..."
		},
		{
			"name": "Identify",
			"url": "..."
		},
		{
			"name": "Mage Armor",
			"url": "..."
		},
		{
			"name": "Magic Missile",
			"url": "..."
		},
		{
			"name": "Detect Thoughts",
			"url": "..."
		},
		{
			"name": "Mirror Image",
			"url": "..."
		},
		{
			"name": "Misty Step",
			"url": "..."
		},
		{
			"name": "Counterspell",
			"url": "..."
		},
		{
			"name": "Fly",
			"url": "..."
		},
		{
			"name": "Lightning Bolt",
			"url": "..."
		},
		{
			"name": "Banishment",
			"url": "..."
		},
		{
			"name": "Fire Shield",
			"url": "..."
		},
		{
			"name": "Stoneskin",
			"url": "..."
		},
		{
			"name": "Cone of Cold",
			"url": "..."
		},
		{
			"name": "Scrying",
			"url": "..."
		},
		{
			"name": "Wall of Force",
			"url": "..."
		},
		{
			"name": "Globe of Invulnerability",
			"url": "..."
		},
		{
			"name": "Teleport",
			"url": "..."
		},
		{
			"name": "Mind Blank",
			"url": "..."
		},
		{
			"name": "Time Stop",
			"url": "..."
		}
	]
}
1reaction
bagelbitscommented, Nov 5, 2019

Lol. I just realize that @Alex-frazer said that to both of us a bit ago.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Convert Spellcasting Ability information into a full object · Issue #4 ...
Its spellcasting ability is Wisdom (spell save DC 12, +4 to hit with spell attacks). ... Convert Spellcasting Ability information into a full...
Read more >
dnd 5e - Does casting a spell from an item allow you to apply ...
You can apply class abilities to spell casting from magical items. While casting from an item is not the same as a Casting...
Read more >
DnD 5e - How to Play 6.2 - Spellcasting Class Features
Each class has a “spellcasting ability”. This is the ability score used to determine how effective you spells are, and affects a number...
Read more >
CR 706. Copying Objects - Rules Resources
A copy of a spell or ability copies both the characteristics of the spell or ability and all decisions made for it, including...
Read more >
Spell Attack Bonus D&D 5e - Calculate, Use & Increase!
Your Spell Attack bonus = your Spellcasting Ability modifier + your Proficiency bonus. To learn all about your proficiency bonus, see our full...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found