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.

Monster multiattacks hard to parse

See original GitHub issue

I’m wondering if it’s possible to define multiattacks in a way that’s more easily parsed in code. Right now, the only place that specifies all of the possible attacks is the “desc” field of the “Multiattack” action. For example, in trying to figure out which attacks are available to the “Bandit Captain” on their turn, the only information I have is, “The captain makes three melee attacks: two with its scimitar and one with its dagger. Or the captain makes two ranged attacks with its daggers.”

This is tricky to parse out programmatically. One option I can think of is to maybe add an explicit list of “action sets”, where each set is considered a potential set of actions for each turn, something like:

"action_sets": [
 	{
		"name": "Multiattack",
		"actions": [
			{
				"name": "Scimitar",
				"count":  2,
				"type": "melee"
			},
			{
				"name": "Dagger",
				"count":  1,
				"type": "melee"
			}
		]
	},
 	{
		"name": "Multiattack",
		"actions": [
			{
				"name": "Dagger",
				"count":  2,
				"type": "ranged"
			}
		]
	}
]

I wouldn’t mind giving this a shot if we can agree on a format.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
bagelbitscommented, Dec 2, 2019

In most (if not all) cases, Multiattack is just using the already defined attacks on a monster. So you probably only need the name and count.

0reactions
bagelbitscommented, Jun 11, 2020

I’m going to close this out for now as it’s technically done. Feel free to open a separate issue for parsing the notes field.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[DMing] multiattack monsters, how to you split the attacks?
When I DM I split multiattack damage amonst all players with a focus on whoever is the most dmg. How do your dms...
Read more >
D&D 5E - Surprisingly Lethal Side Effect of Multiattack
I've run into an odd, and rather lethal, side effect of monsters with Multi-attack. My PCs are currently 4th level, and at one...
Read more >
Can a creature with multiattack make more than one attack as ...
The rules for Multiattack in the Monster Manual (page 11) are perfectly clear: A creature that can make multiple attacks on its turn...
Read more >
How do multiattacks for monsters work in dnd 5e work ... - Quora
Yes, multiattack works every turn for a monster, and you should use it every time. That said, the monster always has a multiattack...
Read more >
Rules Questions: Can monsters full attack? - Paizo
Now one interpretation is that only monsters that have a multiattack section would be able to full attack. Another interpretation is that ...
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