What happens if spell is cast on impossible/invalid target


Impossible targets have different categories, some are straightforward, but some are less so.

  1. if a wizard tries to cast Enlarge Person (target humanoid) on a beast (or a beast that looks exactly like a human, possibly through illusion), does the wizard waste his action, spell slot, and the spell silently has no effect?
  2. if a wizard tries to cast Stone to Mud on an illusional stone wall, does the same thing happen?
  3. if a wizard tries to cast Sleetstorm into darkness, but the point of origin chosen is in fact within a wall. does the same thing happen? Does the point of origin move to the closest point on the line of effect that can be used?
  4. Can caster choose a location in darkness to cast spell? If so, what happens if the target is not on that square?
  5. if a wizard tries to teleport to an area wanded by a dimensional lock (makes extradimensional travel into or out of the area is not possible), does the same thing happen? If so, does this give the caster enough information to make a knowledgeable guess on what happens (possibly with an Arcane knowledge of spellcraft check)?