That's an interesting idea. I wish I could find more corroboration for this, but it looks like it can be used for negative (and possibly horrifying) effect:
Looking at Petrified condition description:
[...] If a petrified character cracks or breaks, but the broken pieces are joined with the body as he returns to flesh, he is unharmed. If the character's petrified body is incomplete when it returns to flesh, the body is likewise incomplete and there is some amount of permanent hit point loss and/or debilitation.
(All emphasis here and below are mine)
So, at the very least, you could maim or cripple someone with this procedure, e.g. deforming or removing his limbs, damaging his face to ruin his appearance or senses, or leaving gashes and holes in his flesh.
Moreover, note the difference in description of Stone to Flesh in PF versus 3.5E:
Pathfinder:
This spell restores a petrified creature to its normal state, restoring life and goods. The creature must make a DC 15 Fortitude save to survive the process. Any petrified creature, regardless of size, can be restored. The spell also can convert a mass of stone into a fleshy substance. Such flesh is inert and lacking a vital life force unless a life force or magical energy is available. For example, this spell would turn an animated stone statue into an animated flesh statue, but an ordinary statue would become a mass of inert flesh in the shape of the statue.
3.5 Edition:
This spell restores a petrified creature to its normal state, restoring life and goods. The creature must make a DC 15 Fortitude save to survive the process. Any petrified creature, regardless of size, can be restored.
The spell also can convert a mass of stone into a fleshy substance. Such flesh is inert and lacking a vital life force unless a life force or magical energy is available. (For example, this spell would turn a stone golem into a flesh golem, but an ordinary statue would become a corpse.) You can affect an object that fits within a cylinder from 1 foot to 3 feet in diameter and up to 10 feet long or a cylinder of up to those dimensions in a larger mass of stone.
Maybe I'm reading too much into this, but note that between editions, an ordinary statue now becomes "a mass of inert flesh in the shape of the statue" rather than "a corpse". This suggests that any mass of stone added to the petrified character is something the spell 'doesn't know how to handle' - it won't create a complete and whole anatomy out of it (as in a corpse), but merely a mass of generic flesh.
So if you added stone wings to a petrified human, you won't end up with a winged human, but rather with a human with a pair of inert, fleshy growths generally shaped like wings - he won't be able to move them, and they'll just encumber him (and probably look quite grotesque, too).
I can't find much in the RAW to support this, and couldn't find anything to suggest you may gain a permanent benefit from this procedure. It obviously boils down to how your DM sees it.
However, it wouldn't make sense that this chain of effects will be a cheaper, stronger alternative to the effects of Permanency, which, for example, requires 2,500gp to permanently enlarge a target. Similarly, I couldn't find any permanent polymorph effect weaker than the 8th level spell Polymorph Any Object, so adding wings, limbs or other beneficial changes using the flesh-to-stone-to-flesh procedure seems really unbalanced.
Almost any creature could escape before suffocating
In most circumstances, the victim would have ample time to chisel their way out.
Wall of Stone creates 10 foot panels (or larger). So let’s assume: (1) your spellcaster trapped their victim in the minimum size, 10' cube, and (2) they concentrated on the spell for 10 minutes, making the stone permanent.
I’m not aware of any rules that would cover suffocation in these conditions, so let’s fall-back on real-world facts. This Friday Fiction Facts: Trapped in an airtight room! article calculates it would take hours]for a person to suffocate in those conditions
“A moderately active or stressed person” would have about 17 hours until they experience symptoms such as “panting, dizziness, severe headache, vision disturbances” at which point we will assume they can not longer effectively chisel at the wall.
The wall is an object made of stone that can be damaged and thus
breached. Each panel has AC 15 and 30 hit points per inch of
thickness.
At 30 HP/inch times 6 inches, the victim needs to do 180 HP of damage to the AC 15 wall to escape.
Let’s assume our victim is a human commoner with no strength bonus. We’ll even take away their club listed in their stat block, and just give them an improvised weapons, with which they get no attack bonus. Each round, they can do 1d4 points of damage to the wall if they “hit” with a roll of 15 or higher.
With those assumptions, the commoner’s average damage-per-round would be 0.75 HP. On average (and with this many “rolls,” most attempts would be very close to average) it would take 240 rounds to chisel out.
A round is 6 seconds; there are 600 rounds in an hour, so our mild-mannered commoner can chisel free in 0.4 hours, or 24 minutes.
- (240 rounds) / (600 rounds per hour) = 0.4 hours = 24 minutes for a commoner to escape
So even if we make assumptions that our victim needs to rest three-quarters of the time they still get out with hours to spare.
If you are trapping an armed and dangerous creature, they are likely to be able to escape in even less time.
Edge cases
It’s easy to come up with edge cases where someone would not be able to dig out, or if the wall were made double thick, or more (which would require a lot of time since you have to concentrate for 10 minutes for each effect). In these cases the rules pretty much silent (the Portable Hole mentions death by suffocation in an enclosed space, but that’s a pretty different case).
Would there be tiny cracks in the wall, or the floor beneath it that allow air to seep in (like there are in the building where you sleep)? I think that is simply up to the DM. This is a world where you can breathe miles deep in the Underdark — the whole “how do we breathe” issue gets a little glossed over.
Best Answer
First of all, it’s not immediately obvious that stone shape could do this—at least by my reading, it kind of sounds like you kind of need to use your hands to shape it into the desired shape and there isn’t anything in the spell about moving stone from one place to another. You’re also only touching the surface of the floor and it’s not clear how “deep” into the stone the magic can penetrate to pull up into the wall.
Also, wall of stone exists, and is two spell levels higher. That alone should give one pause here. True, wall of stone produces larger walls, and has vastly superior range, but I’m not sure those benefits are sufficient to justify two spell levels difference.
But we’ll assume that works, for the sake of the question.
This wouldn’t block flesh golems. They are Large, and have a Space of 10’×10’, but they can squeeze down to a 5’×5’ space and pass through the blockade, and all it would cost them is a single extra square worth of movement (they’d take some penalties too but those would only be relevant if they acted or were acted upon while in the tight space).
More appropriate would be a full wall across the entire 15-foot gap. If the wall is an inch thick, caster level 13th would be sufficient for that (with some left over). If a half-inch thick, CL 7th would do it. Note that at some point a thin-enough wall becomes implausible—as soon as the magic is removed it would just fall apart under its own weight. The rules note that a foot is the minimum thickness for a load-bearing stone wall, but that clearly isn’t the case here. Also note that, even if the wall isn’t collapsing under its own weight, stone’s hardness is 8, which means a flesh golem is capable of damaging the wall, and has 15 hp per inch, so thin walls might not last very long. However, unless they were controlled, mindless golems aren’t going to even try unless they can still perceive the party through the wall somehow.
Which is where that line-of-effect comes in. Leaving a small hole in the wall is well within stone shape’s abilities—it even might reduce the necessary caster level some. But care would have to be taken to ensure the golems could not perceive the party through this gap, or else they would start bashing the wall down—and with a bit of luck they could do that in two attacks for the inch-thick version.¹
All that covers, effectively, whether or not the party could wall off the passage, and whether the flesh golems could get past it. It doesn’t address what happens if the stone is created with the golems in the way.
The only rules I can find for something like this are for Conjuration—which simply say you cannot, something can only be conjured into “an open location capable of supporting it.” That seems like a reasonable rule to apply to a Transmutation used to move material into a new space where it wasn’t before—particularly since, as mentioned, it doesn’t appear that the developers ever considered the possibility that Transmutations could or would be used in such a manner.
However, if you really want to allow it to happen, one thing I have used is to allow the creature a Reflex save. Success means it can hop to one side or the other of the new object, as it likes. Failure means the caster can choose which side of it the creature remains on. This, by the way, is fairly analogous to how wall of stone works when trying to imprison a creature. Regardless, I wouldn’t allow anything like this to actually damage or pin a creature.