AnyDice — efficiency of code calculating rolls hitting a target with mixed pools; hitting the 5 second barrier

I have some code that is hitting the 5 second barrier;

function: target N:n of A:s B:s C:s {     result: [count {1..N, 1..(N/2)} in [sort {A, B, C}]] } output [target 7 of 4d12 0d20 0d8] output [target 7 of 4d12 2d20 0d8] output [target 7 of 4d12 4d20 0d8] 

Even if I remove the final output line, it still fails.

I believe the code does what I want it to – calculate the number of dice rolling at or under the target from mixed pools (it runs when using other pools: d20s seem to be a problem).

Is there anyway I can improve it so that at least the first two of these output lines will run (or better yet, all three of them)?

N.b. from my perspective these were some of the simplest pools I wanted to look at.

Is there a way to deal damage to a target without them knowing?

I’m playing a sneaky Poison Dusk Lizardfolk who dabbles a lot in poisons. I want to use a blowgun to inflict poisons on my targets, but I don’t want them to know they’ve been damaged. Basically, imagine someone walking down the road, and then suddenly being paralyzed. I know there’s rules for "sniping," or making a ranged attack and then hiding, but that doesn’t stop the opponent from knowing they’ve been damaged. It just stops them from finding who did it.

Does a target affected by compulsion have to dash?

Compulsion states:

Creatures of your choice that you can see within range and that can hear you must make a Wisdom saving throw. A target automatically succeeds on this saving throw if it can’t be charmed. On a failed save, a target is affected by this spell. Until the spell ends, you can use a bonus action on each of your turns to designate a direction that is horizontal to you.

Each affected target must use as much of its movement as possible to move in that direction on its next turn. It can take its action before it moves. After moving in this way, it can make another Wisdom saving throw to try to end the effect.

A target isn’t compelled to move into an obviously deadly hazard, such as a fire or pit, but it will provoke opportunity attacks to move in the designated direction.

Reading the spell again it says they can use their action before moving but what if they don’t? Do they then have to dash to use "as much of [their] movement as possible"?

What about rogues? If they are affected by it (say by either a party member looking for a funny prank, or by an enemy that can cast that spell) do they have to use their cunning action to dash? The spell only permits their action, not their bonus action.

Can Cure Light Wounds Mass target the same creature more than once on its casting?

When you cast the mass version of the cure light wounds spell, its range changes from touch to close and from creature touched to creature touched/level with targets within 30 feet of each other. To this sounds like a ray spell as you would have to make an attack roll vs every creature (this is because you could target undead and living creatures with the same casting). Is it possible to have the same creature targeted by the spell more than once? I dont see any place which states you can only affect a creature once with the casting.


Since there has been debate over how the rules should be applied in this case, lets do a comparison with out multiple touch spells.

  • Cure Wounds mass spells “Target one creature/level, no two of which can be more than 30 ft. apart”
  • Chill Touch “Targets creature or creatures touched (up to one/level)”
  • Haste “Targets one creature/level, no two of which can be more than 30 ft. apart”
  • Bull’s Strength mass “Targets one creature/level, no two of which can be more than 30 ft. apart”
  • Cat’s Grace mass – “Targets one creature/level, no two of which can be more than 30 ft. apart”

Since I dont know of anyone who can successfully claim that Chill Touch cant be applied to the same target multiple times in a round assuming a sufficient bab or hasted. Someone can be affected by multiple haste spells, but only one has the effect, and is not helpful doubling up in this case because its part of the same spell so any effect that would dispel or counter one would get all instances of it. Same with Bulls and Cats. The most important difference is that the others except for Chill Touch say “One creature” but that can be thought of in two ways. The one likely intended being that a creature can only be selected once for the spell, or the creature can be selected multiple times each time taking up one of the creature targets.

Are there any monsters that can target more than one target/creature?

I noticed that the attacks in Statblocks mention one target (and sometimes one creature). This made me curious. I have been pouring over the MM and VGtM, but have not found any monster that can make a melee/ranged attack against more than one target / one creature.

  1. Do we know of any example within the ‘official’ books where this is more than one?
  2. If it’s always one, do we know of any reason why this is at all mentioned in the statblocks?

Related: Are there any issues with creating creatures that can make multi-target melee attacks?

Related: In the descriptions of monster action options, what's the difference between "one target" and "one creature"?

Can creature swarms be targeted by spells that target 1 creature?

In Pathfinder 2, are swarms considered a single creature for purposes of spellcasting?

During game, a spellcaster attempted to target a raven swarm with fire ray. The spell states that it targets ‘1 creature or object’.

For clarity, swarm traits specifies ‘A swarm is a mass or cloud of creatures that functions as one monster. Its size entry gives the size of the entire mass, though for most swarms the individual creatures that make up that mass are Tiny.’

This question is relevant because in Pathfinder 1, swarms were immune to single target spells and effects.

Swarm Traits:

Fire Ray:

Regarding submission of multiple target URL.

I have a query about submission. Suppose I am adding more than 1 URL an instance 10 URLs. And I am not choosing option “RANDOM submission from the above list”.  I have a list of 1000 web directories in my ser list then what would be the result? Are 10 URLs submitted to 1000 directories or each 1 URL will be submitted to 1000 directories?

When blinded, could I use Detect Evil and Good to target an enemy?

I’m planning on running a Monk/Cleric (14 in Monk and 6 in Cleric, if my character survives that long, I haven’t yet multi-classed into Cleric), and we’ve come across a few enemies that are able to blind members of our group, and as a halfling, I don’t have the benefit of dark vision (which is fine, we have members of the party who are able to light up the room).

But with some of the context out of the way, Detect Evil and Good states:

For the duration, you know if there is an aberration, celestial, elemental, fey, fiend, or undead within 30 feet of you, as well as where the creature is located.

As I wouldn’t be concentrating on another spell, I should be able to make unarmed strikes while using this spell, but that leads to the question:

Would I still have disadvantage on my attack rolls (while blind) as a monk, if I know their location via this spell?