One of my players is playing a sorcerer, and during an encounter with some medusa, he decided to channel his magical energies into a bolt of energy. He hasn't done anything like this before, and he doesn't cast spells that often (he fights with a spear). Should I let him go through with the action and just treat it like a makeshift weapon?
Unless you want to veer the rest of your game way off the way D&D 5e magic works and want to let the sorcerer ignore the major balancing factor in the class's design (limited spells known), no, you shouldn't. There's no such thing as improvised spells in the game, but once you allow it once, it is likely that the player will want to do it a lot.
Just say, "You can only cast spells you know. What spell are you casting?"
If they insist and hold up the game, just keep the game moving by going to the next player's turn and promising to come back to their turn when they've figured out what they're really going to do. (Worst case, they don't decide by the time everyone else's turn is done and you tell them they spend the round waving their hands around without effect.) If the player continues to object or argue, remind them that there are other players here who didn't come to be audience to an argument in the middle of the game, so the ruling stands and it can be discussed between game sessions.
That said, the impulse to improvise spells is not in itself wrong. There are lots of other RPGs which have magic systems that allow that sort of thing. D&D is just not one of them, and its design makes it especially hard to add improvised spells to it carefully, let alone improvising in the middle of a campaign how to improvise spells.
Change his Sorcerer template into a Wild Mage, and then have a Wild Magic surge occur as he attempts to channel internal power for an unknown release of energy.
I'd like to suggest imposing an interesting alternative for this. A character is all about story, and their experience grants them levels. This creative and interesting use of a sorcerer's inner power can be an experience, but the level gained may be one not of the character's choosing. Much like an Oath Breaking Paladin faces a forced class change when they break their oath, so too can your sorcerer experience a forced class change for tapping into Wild Magic.
Simply replace their previous sorcerer class template with Wild Mage. Alternately, they could level the remainder of their sorcerer levels in Wild Mage rather than their original specialization, resulting in an interesting and unique hybrid class of Sorcerer.
The player has attempted something in keeping with the flavour of the Wild Mage. In particular:
Wild Magic; PHB pg. 103, last sentence of the flavour paragraph:
However it came to be, this chaotic magic churns within you, waiting for any outlet.
This player may have found their outlet. Of course, if they complain that they don't want to be a wild mage, you could ask them if they really want to try tapping into wild magic again. There's a difference between the archetypes for a reason. Much as I would give a player a warning before breaking an Oath, I would also warn this player about tapping into Wild Magic.
Per the existing rules as they are written, a character cannot just declare that they are casting a spell as they might declare that they are swinging a weapon. They must be precise about which spell they are casting, must have the spell slots to cast said spell, and must have it memorized (though these requirements may vary slightly between classes). However, there is a good chance that the sorcerer already has a spell that fits this description memorized; Ray of Frost, Fire Bolt, and Poison Spray might all be reasonably described as a "bolt of energy," and are all cantrips that can be cast without expending a spell slot. It is possible that your player is intending to cast one of these spells (or another, higher level spell) and is simply neglecting to inform you of their exact name. In this case, just ask them to clarify the name of the spell they are attempting to cast.
On the other hand, your player might not have any "magical bolts of energy" available. In this case, you might consider the
Rule of Cool
A spellcaster using the extreme limits of their ability to cast a spell in a last-ditch attempt to take down a powerful foe is pretty cool. For the sorcerer, who casts spells using the raw magic infused within their own essence, it is absolutely keeping within the flavor of the class to have unexpected magical powers manifest at times of extreme stress.
If you believe that the action the sorcerer is attempting would be sufficiently cool, let them cast one of the cantrips or appropriate level spells that match the description of what they are trying to do. Make clear that this is a one-time allowance, and not something they should rely on in future situations, or reference in any rules argument. Then apply some sort of downside to represent how this casting is above and beyond their normal effort; a level of exhaustion, expending double spell slots, etc.
Should you decide to apply the Rule of Cool and allow the sorcerer to cast a spell they don't have prepared, make sure you make similar allowances for weapon-using characters if they also come up with cool situations that break the normal limits imposed by the exact rules of the game or your collective understanding of the world you are creating.
When casting a spell, it can be cool to describe its effects rather then saying its name. For example: I point my finger at the enemy, and a bolt of energy springs in its direction. However, the DM must know what spell the PC is casting (therefore, it has to be a spell in the manual or a spell that the DM has introduced in his setting). If this is the case, talk to your player and ask him which spell he is using. If it is a spell that he made up, you should regulate it before the session.
If the player is fairly new to roleplaying and/or D&D
Then this is an "understandable misunderstanding". The game of D&D doesn't work that way, and other answers lay out how it does work. Perhaps with some rare exceptions, your character sheet is expected to list every single magical ability you have. So if you aren't invoking an ability on the sheet you can't do it, your character simply doesn't know how.
This doesn't extend to mundane things -- you needn't have "can tie own shoelaces" explicitly listed on the sheet. But for the most part magic is a very specific set of tools, it's not a general ability to "use magic" in a flexible way to perform any task you can think of.
There are plenty of role-playing games in which you do have some freedom to improvise your character's precise abilities, or in which magic is pretty flexible. So what they're asking isn't completely unreasonable in the realm of RPGs in general. It's just that D&D, the game you've all sat down to play on this occasion, works a particular way.
Bear in mind that even though the player doesn't understand the rules, the character should have a reasonable idea of their own capabilities. Therefore allowing the character to try and fail (wasting an action) something that the character knows is completely impossible, because the player misunderstood the game and proposed it, is usually considered poor form by the DM. Only if circumstances dictate that the player "should know better" would it normally be considered right to let a doomed action like that go ahead.
So as DM you should explain how this game works and expect the player to stick more or less to the rules and declare a different action.
If the player is not new to D&D
Then they're trying it on. D&D allows for some agreed deviation from the rules, but by suddenly improvising this on the fly they either want to play D&D in a manner so unusual that it's pretty much a different game, or else they're cheating. Part of the point of all those numbers is to define what characters can do which other characters cannot, to foresee and plan for some eventualities and take the risk of facing others you're not able to cope with. That whole exercise is fairly pointless if the player can just go ahead and invent that the character can do whatever is most convenient at the time.
So as DM you should just refuse to allow the action and move on. You can of course ask them why they think they could do that, in case you've overlooked something or in case there's some change that should be made to their character at the next opportunity.
Are rules an affront to my dignity as a creative human being?
You always have the option to invent or change any rules you like, or for that matter go outside and play football, or sit in a circle and tell a story. You haven't signed any binding contracts to play D&D by the rules. It's just that beyond minor variations you'd then be playing a different game, and the notion of set abilities and spell lists is so thoroughly built into D&D that this wouldn't typically be considered a minor variation.
That said, if the player is holding a spear and says "I want to shape my magical energies into a bolt of energy and attack", then you might choose to rule that in your game this is a purely cosmetic effect that you're willing to allow the character to have "for free". So their "bolt of energy" makes the spear look pretty, but it still attacks exactly as a normal spear (not a makeshift weapon and not a magical weapon). This doesn't break "the game" since it grants no game-mechanical advantage, but it does make the game world itself more fluid and improvised compared with what's established by hundreds of thousands of pages of printed material over the decades. Some players will thrive on this, some will feel that you've devalued their knowledge about the game world by letting things change on the fly.
In D&D, any time a character uses a power or ability, they must be able to support it with a reference to the rules. If the player cannot point out in the book where the power or ability comes from, you are under no constraints to allow it.
If you run a table that encourages creative use of power, you might allow it on a one-time basis, apply an appropriate penalty (a level of exhaustion , maybe?), and move on, with a statement that you are allowing it to happen in order to keep the game going, but want to discuss this with the player after the game.
This sounds more like a table issue than a rule issue. I would absolutely discuss the matter with the player out of game, either afterward or during a time-out. If this is not possible, and you feel that disallowing it by fiat would be detrimental to the play experience, you are within your rights as the DM to adjust the effects during play, reducing or even eliminating the effect if need be in order to preserve the integrity of the encounter, and then having the discussion afterward. This can be done openly and above board: "The orc shrugs off your bolt of energy as if it were nothing". This is a last resort, though, and should only be used to salvage the play experience for the whole table. I would recommend talking first, and asking for a rules citation.
No. If a player wants to cast a spell they will have to tell you which spell it is they are trying to cast, what it does and where to find it in th books. If this spell is not on the list of spells they can cast (and they've got to have it prepared, but this does not apply to the Sorcerer) they cannot cast it.
And don't count it as a makeshift weapon: they just can't cast it.
One point that hasn't already been addressed here is why D&D's magic system cannot and should not allow spell creation on the fly.
The D&D magic system is often described as "Vancian", due to its origins. There is a degree of variance in the details of spell preparation depending on the edition of D&D, but the main principle of requiring preparation of spells does not change at all.
The magic system is specifically designed so that all magic spells must be prepared in advance. Allowing the player to break this crucial core of the system is similar to allowing the player to fire a gun without bullets, or stabbing a goblin with a non-existing spear. Both completely ignore the universe in which the game rules have defined.
Given this, allowing such actions is less of breaking player immersion than breaking game-world immersion. It is a very bad idea to allow this under any situations.
As a DM it is important to keep consistency in the game to a certain degree. However unless you want something like this to be a recurring situation, I would recommend that you not allow this. Particularly in combat, players casting spells can only use the spells that they have prepared that day.
However they description on he/she casted the spell could fall upon you as the DM or themselves. So if it is a similar spell, such as Magic Missile, it would act in description like you had explained.
The other option, depending, would he/she could do something like that in a non-combat situation. For example if the character is a wizard they could shoot a non-harmful bolt of energy across the room that has now large effect whatsoever.
However, again like before, this would open up the gates to spellcasters in your party doing the same and improvising the way they use their magic. So just allow them to be unique in the way they use their spells, however keep the effect of how they use it within reason of how it is used.
Since all the other answers assume this is about making up spells on the spot, I'll go in a different direction and assume that this is about the player wanting something that doesn't exist.
How to handle this as it comes up at the table really comes down to your DMing style. You can just say that he has to stick to the spells he knows for now and tell the player the two of you can figure something out before the next session. Alternatively, you can quickly improvise something that works for now and agree with the player that you will refine this at a later point in time. Many of the answers also contain other ideas on how you can handle the immediate situation.
However, it is very important that after the session is done - somewhere between this session and the next - you do sit down with the player and take a look at how to go from here.
The long-term plan
Sometime before the next session you need to work out the plan for the future. You could houserule something, but that always comes with associated risks.
A much better alternative would be to simply re-theme a proper-level damage spell. It's quite possible that your player just wants the feeling of sending a jolt of raw magical energy, in which case taking a fire or lightning based spell and re-theming it to be about throwing "raw magical energy" at the foe really gives everyone exactly what they want.
When doing this, don't be afraid the give the player this spell retro-actively. Just have him cross out a spell he currently knows and replace it with the new spell. Even if the spell was used from time to time in the past (perhaps even at a crucial point) it should be no problem that it's gone now. Players tend to play in the current moment, not so much in the past. That's also what it's about: having fun now and in the future; you've already had fun in the past (or not).
My recommendation is that you shouldn't force your players to follow the rules. Teach the rules of your campaign to your players. Then let the players govern their own decisions. If those decisions are contrary to the rules of the campaign, then it should result in adverse consequences to the character. In general, this is a principle adhered to in education, real-life, and almost all games.
Generally, as human beings, we reason our actions by their outcome. If we attempt something new and find success, we may get addicted to the action that brought success, trying it again and again. If you allow your players to break the rules, without a negative consequence, they may break the rules again. This psychological pattern means that rules need to be meaningful and have consequences. In a game of D&D, the rules and their consequences should be taught to the players. That teaching can happen in the game.
The boundaries of a D&D game encompass both the rules and the results. Players may select paths that have the best outcomes, and at other times they may attempt an alternative path. The rules were created for D&D to keep the game balanced so that one player does not have an undue advantage compared to another. Without the rules, it's difficult for everyone to enjoy themselves and have fun.
I discovered that my players never enjoy harmful consequences without providing them with a notice beforehand. For example, they kill the big bad boss, and suddenly without warning, he appears again and apprehends the adventurers. It's a good idea to prepare players beforehand for any harmful consequences by teaching them the rules. I've also found that it's not fun to ignore the rules of the game. Any negative consequence that the players encounter should be proportionate to the risk taken.
As a DM for a homebrew game, you may create new spells specific to your campaign. Treat these spells the same as any spell in the core rulebooks used for the campaign. For example, I had a game where a player wanted a "lightning" spell. His character was level 2, and a lightning spell was not available to his class at that level in the core rulebooks. We created a "lightning" spell with a similar design to another spell we found for his level. The spell we created did not break the game. It was balanced because there were mechanisms to defend against the spell. The spell caused electric damage, and creatures may have resistance or use an elemental shield.
The fact is that if a player want an aestetic only change, allow that. Of course if they want the aestetic because they see worth in different aestetic, then you should not givin that for free, a mini quest or buying it from a merchant is perfectly viable.
"I enchannell my power"
"Are you sure you want to proceed? As a Wizard you perfectly know how dangerous that could be.
"I know, but I have not further time to think, I enchannel my power"
DM (1st combat turn):
"Then you suddendly feel you forgot one of the spell you prepared, a imperceptible ray of energy flows through enemy with the same effects of the ABRACADABRA spell you previously prepared, you also feel fatigued and skip next casting turn, you could however use your spear if you want."
So that way you make possible doing a aestetic change but that in reality cost decision power to player because a random spell (or spell at DM choice, but let the player roll the dice anyway to make that mistique) is casted.
In case the mage has already used all prepared spells
"A flebile ray of energy flows through enemy doing 1d6 damage, you feel Astral planes forces are angry with you about that and you take 1d4 damage, you suddendly remembered that some wizards got missing after trying un-prepared spells, maybe they are wandering into an astral plane, or they were simply disintegrated by wrong use of magic. You also feel fatigued in your mind, you doubt you could memorize as many spells as you could for the next few days.".
If Player insists, starts disintegrating pieces of inventory (as a warning):
"A flux of astral energy suddendly springs out of the ground, luckily the spark hitted your (shield, ring, trousers, spear) and the item got disintegrated instead of you, you may not be as much lucky next time.
If you decide to go by disintegrating clothes, remember that some cities may have laws or a dressing code. If the wizard was engaged to a sorceress it is likely she will not be happy of that conduct (but that's at player choice, not choose for players).
Eventually allow the player to find Wizard's trousers in the astral plane if they ever go there. If player insist casting "pure energy" without prepared spells, move him finally to astral plane without any inventory (items are left behind him) and without any spell (astral energy resonance prevent casting), and allow other players to rescue him only by paying a Lvl 20 wizard for going into the astral plane and search for him. When the player skips his casting turn after casting a random spell because he tried enchanneling, then he can decide to use his spear, if he do so, remember he have to be near the enemy and every next cast will be subject to opportunity rolls. And remember, the player could still want to do that for reaching the astral plane at will, so maybe you may want something bad happens
"Ops you rolled 1, and only your left arm got teleported into the astral plane, the wound got cauterized and you take X damage. Now only a wish could give your arm back."
(Astral plane is full of wizards' arms/legs astral projections infact, you know.. Maybe you want to allow the player misteriosly meet a wizard that can teach how to cast spells with one hand only, becuase with a missing arm is really hard to cast spells at all ;) )
"You cannot cast further spells without your arm, but you could try to lose the other arm/legs and do 1d6 damage to an enemy, if you like it. Legends will speak about a wizard that sacrificed all limbs to save his friends".
(if actually there's a Bard in the group, he could really like the situation)
Then if player wants exotic spells in general you could allow that, but do that in advance to any combat (so he must prepare those spells before any combat begins) choose same effects of exisiting spells, and eventually make them weaker (because maybe the player could exploit the "aestetics" in some way in future, you never know, so make the spell less powerfull on purpose). But let the player choose the appareance of the spell.
"Another NPC wizard see you casting that spell, he ask to you why you use a such ineffective spell, tolding you he already tried that spell years ago"
Players can be unmpredictable, you as DM should be as much as twice times unmpredictable.
Or just be simple
"You are successfull in enchanneling the magic, a spectacular effect of sparks and runic gliphs wandering around is created and you are proud of yourself, but that spectacular magic does absolutely nothing to the enemy, and you suddendly remember you are a wizard, not a warlock. You turn ends now."
And remember that player can still exploit that to get paid by people for showing spectacular magic effects so maybe people don't want to see that twice again to pay him ;).
P.S I know how astral plane really work, but your world, your rules..
Note, Those stuff I'm speaking off is not only fantasy, but serious stuff experimented more than one time (since the time of writing which game me more ideas). The more effort I put to improve the worse it is received, even commenters do not explain they point of view and are generic mentioning "rules" that I have read and I'm not breaking in anyway.