## Diamond shaped map: converting tile number to coordinates and back

I have a diamond shaped map that is deserialized/represented as follows:

j  0  1  2  3  4  5  6  7 i  0     *  *  *  0  1  *  *  * 1     *  *  2  3  4  5  *  * 2     *  6  7  8  9 10 11  * 3    12 13 14 15 16 17 18 19 4    20 21 22 23 24 25 26 27 5     * 28 29 30 31 32 33  * 6     *  * 34 35 36 37  *  * 7     *  *  * 38 39  *  *  *

I want to convert the tile number, to its coordinates (i, j) and back. I have managed to convert a coordinate to its tile number like so:

Given a map width and height n: if(i< (n/2):     number = i*(i+1) + j else:     number = (2*((n/2)*((n/2)+1))) - ((n-i)*(n-i+1))) + j  So: (0, 3) -> 0; (6, 2) -> 34;

However, I cannot figure out to go back to the coordinates from the tile numbers, because I have trouble with distilling the i parameter from the tile number.

I have tried googling with terms like "diamond shaped map tile numbers coordinates convert", but no luck.

Can someone point me in the right direction?

## How does resistance/vulnerability/immunity interact with carryover damage after reducing a Polymorphed (or Wild Shaped) form to 0 HP?

A caster casts polymorph on another creature. Let’s say the polymorphed creature has 10 HP in its new form, but takes 30 piercing damage and its current form is reduced to 0 HP. This causes it to revert back to its original form, with 20 more piercing damage that would carry over. However, its original form is resistant to piercing damage.

How much damage would the new form actually take? Would its original form’s resistance to the damage type apply to the carryover damage?

The same question can be extended to the original form having immunity or vulnerability, as the answer would ostensibly use the same logic.

The druid’s Wild Shape ability also works similarly to polymorph in this regard (if you reduce the new form to 0 HP, then any remaining damage carries over to its original form), so I suspect the answer would be similar for a similar question about Wild Shape.

## If your wild shaped form has damage resistance and you revert to your normal form, does your normal form take the halved damage?

Let’s say we had a druid with the Circle of the Moon archetype. They can use their wild shape feature to turn into an elemental as per their Elemental Wild Shape feature (PHB, p. 69):

Elemental Wild Shape
At 10th level, you can expend two uses of Wild Shape at the same time to transform into an air elemental, an earth elemental, a fire elemental, or a water elemental.

Those elemental creatures all have resistance to nonmagical bludgeoning, piercing and slashing damage, and some forms have other damage resistances too. Let’s say your elemental form was on 5 HP and you took 20 nonmagical slashing damage. Your elemental form would halve that damage to 10 damage. This exceeds the total HP the elemental form was on, and so you would revert back to your normal form, as per wild shape (PHB, p. 67):

… if you revert as a result of dropping to 0 hit points, any excess damage carries over to your normal form. For example, if you take 10 damage in animal form and have only 1 hit point left, you revert and take 9 damage.

Let’s assume that your normal form has no damage resistances. Does your normal form really take just 5 slashing damage, even though your normal form isn’t resistant to slashing damage, or would your normal form take 10 damage, since that’s what it would have been if it wasn’t halved by a resistance that no longer applies to your reverted form? Intuitively I think the normal form should take 5 damage, but the below related question’s answers (even through it’s the opposite scenario) would imply that it would take 10 damage.

Related (but the other way around, since that Q&A is talking about the normal form having the resistance, whereas I’m asking about the wild shaped form having the resistance): How does resistance/vulnerability/immunity interact with carryover damage after reducing Polymorphed (or Wild Shaped) form to 0 HP?

## Can you use a sending stone while you’re wild shaped

I’m torn as a sending stone is a magic item and it would greatly enhance communication while scouting ahead

## Does using an Owl’s “Talons” action while Wild Shaped count as taking the Attack action?

First, a reason this might matter would be a multiclassed Druid/Monk using Wild Shape and hoping to use Flurry of Blows, the latter of which states:

Immediately after you take the Attack action on your turn, you can spend 1 ki point to make two unarmed strikes as a bonus action.

So say we are transformed, via Wild Shape, into an Owl and we use our “Talons” action. Can we then use Flurry of Blows?

I’m unsure what the case is given that the Monster Manual states (page 10):

When a monster takes its action, it can choose from the options in the Actions section of its stat block or use one of the actions available to all creatures, such as the Dash or Hide action, as described in the Player’s Handbook.

“Talons” is not one of the actions available to all creatures, but the Attack action is so I’m unsure whether Talons also counts as the Attack action and if so, why/how?

In addition the Essentials Kit describes the “Use a Special Ability” action as follows (page 36):

Many class features give you special ways to use your action. Monsters also have their own special actions, as described in their stat blocks.

Are these “special actions” things like “Talons” or is “Talons” a use of the Attack action?

Can a Monk use Flurry of Blows while under the effects of Wild Shape; are actions such as the Owl’s “Talons” considered the Attack action?

## Determining Volume of an Irregularly Shaped Triangular Prism

I need help using Mathematica to determine the volume of an irregularly shaped triangular prism. I have very little experience with Mathematica but thought this task could easily be performed using the program.

The shape generated should look like:

Graphics3D[

Prism[{{3.767, 4.523, 1}, {0, 0, 0}, {7.948, -2.451, 0}, {3.699,

8.156, 1}, {1.146, 10.24, 0}, {4.837, 10.24, 0}}]]

I’ve tried using the Volume[] function but with no luck. Any help would be greatly appreciated!

## Context

My character is a druid 3 / ranger 2. I’m considering taking Hunter’s Mark as one of my ranger spells, but I’m not sure whether it would trigger while attacking in Wild Shape. The spell says:

You choose a creature you can see within range and mystically mark it as your quarry. Until the spell ends, you deal an extra 1d6 damage to the target whenever you hit it with a weapon attack. […]

So my question is: do the attacks in Wild Shape count as weapon attacks?

## Related

• Is a Wild Shape attack considered an unarmed strike?
• Are the beast shape weapon attacks of a Druid, simple or finesse?

## Programmatically create a trigger within abnormally shaped room

So I’m trying to create a trigger in each of my rooms. These rooms can be created by players. Basically, I need to know all the objects in a room. These rooms can be shaped in weird and wonderful ways. I’m struggling to figure out how to “fill” an area? The other problem is that some walls are curved.

My current thinking is:

• Loop over all the walls in a scene. Do 4 raycasts from each side of the wall and see if we hit other walls. If we do, we are likely in a room.

• From the offset, literally check each node adjacent to that until we fill the room. Once I have this though, Im not sure what to do with it.

How do I create bounds that I can check for collisions with this data?

## How much damage can a druid Wild Shaped into a spider take without dying instantly?

A human druid Wild Shapes into a spider and now has 1 maximum hit point. As a spider she gets bitten by a hungry lizard that deals 2 damage.

Does the druid die from Instant Death (PHB p. 197), or does she revert to her human form first (PHB pp. 66–7)?

## Can a druid who is wild shaped into an ape cast non-verbal & non-material (somatic only) spells, example thunderclap? [duplicate]

Similar questions do not deal with “somatic only” spells (they only say “no” due to lack of access to verbal or material components, see the link)

Wild Shape states:

You retain the benefit of any features from your class, race, or other source and can use them if the new form is physically capable of doing so.

Could a druid wild shaped into an ape still cast non-verbal & non-material (somatic only) spells, for example:

Thunderclap: [..] Components: S [..]

My logic: Ape has hands = can clap?