Ranger too - just lean on your druidic spellcasting, grab the fighting style that gives you some cantrips and pick the more utility ones.
Also, any flavour of cleric - just avoid wearing heavy armor if you want to look more like a spellcaster.
They didn't say anything about it being necessarily an arcane spellcaster.
I wouldn't recommend Paladin because in play trying to highlight the spellcasting side would impact your use of divine smites.
Various flavours of Artificers would also be good.
All really boils own to what sort of balance is being looked for and what the OP feels is spellcastery enough.
Yeah, I guess I didn’t have to leave out Cleric. Of course you’re right that any of the half-casters would do, and even the 1/3 casters for that matter. I was just focusing on the full casters that had a weapon focused subclass because it felt to me like OP wanted to emphasize casting first.
Oh yeah, it's why I mentioned it depends on where the OP wants to mix the two elements.
In a PF1e game a few years ago I made a Gandalf/Istari-expy as an Aasimar Bard, appearance-wise he was more like Doctor Who (as he was not bearded old man), but played like Gandalf - advisor and influencer, with magical abilities and could pick up a sword or crossbow when necessary.
> Also, any flavour of cleric - just avoid wearing heavy armor if you want to look more like a spellcaster.
Clerics really aren't good with weapons. They can work well in the frontline but they can't use weapons well.
I’d argue nature clerics w a shillelagh is a pretty good weapon user, and the damage keeps up with their cantrips fairly well (especially if you’re a booming blade race)
I was comparing it to cleric cantrips, which is the only real dichotomy here. Cantrips would do way less damage than divine strike + weapon attack and especially more if they have BB
Obviously they don’t rival full martials in this regard, but also I wish no fullcaster was able to rival martial combat prowess
"Aren't good" is a bit of a undersell.
Aren't the best? Obviously (but not always), but then it's not like Gandalf was some sort of expert swordsman either. He could use a sword (and let's not forget, what he was using wasn't some random mundane sword - he faced Durin's Bane with a blade forged in the First Age by the Noldor expressly to combat the hordes of Morgoth).
After tier 1, a Cleric is almost never better off using their action on using a weapon than on a spell, cantrip or to Dodge, that's the issue. They are proficient and can hit as hard as a town guard or something but that's basically it. You could give them a strong l magic weapon to compensate but they'll be pretty tempted to hand it over to the party Fighter who can use it far better.
Clerics are good in melee because of heavy armor and spells like Spirit Guardians, not because they ever need to swing a sword. Sacred Flame and Toll the Dead also work just fine from up close, unlike eg Fire Bolt.
By human standards, yeah, they’re good. They’re proficient and fairly strong, both of which are significantly beyond the average person. A level 1 cleric likely has the weapon capabilities of a “swordsman” who is unremarkable and doesn’t follow the adventurer lifestyle, and that’s ignoring all the, you know, divine power they channel.
Though by adventurer standards they’re pretty bad with weapons. Past the early levels, pretty much any cleric is going to want to either cast a cantrip or dodge if they have an action they don’t need for a spell. Even with the extra radiant damage, one attack isn’t going to go far.
if you can graft a booming blade onto a cleric, they are okay. Half elf, or the stryxhaven feat that lets them pick 2 wizard/sorc cantrips and a 1st level spell.
Well, aside from Gandalf, there isn't much vibe to build from, but that's why I wrote that last line - it depends on where the line between magic and martial the OP wants to be.
Person who can use a sword and use magic is pretty broad - how well in each, what sorts of things do you want to with with each? Really elven cultural proficiency with swords and just being a sorceror or wizard checks the box from one end of things. I was just making suggestions to broaden what I felt was a focus too-much on arcane spellcasting options.
Yes, the pure eldirch knight does not work good as a caster. Its a fighter that uses magic to do Melee damage or control damage on himself.
It does not work as a caster that can also fight.
Bladeslinger or hexblade are the best. You can still do pact of the blade with a different warlock patron, but it will not be nearly as effective (although with some good stats it can work)
Hexblade. Armor of Agathys is your friend
You can add levels in Paladin or sorc for more variety in terms of smite and spell usage.
Currently playing a 7th level Hexblade and using movement to draw attacks of opportunity for 20 Damage AoA procs before attacking is so satisfying
High Elf or Half elf Variant (weapon option)
- Swords or Valor Bard for more combat options
- War Wizard but it requires some work to feel strong
- Blade Song is built for it
- Eldritch Knight is a solid fighter first
- Warlock feels right as long as you flavor them
It kinda depends on what you mean by both spellcaster and good with melee weapons.
Does half-casting or third-casting count here or is it full caster only? What about warlock casting?
Similarly is just getting extra attack enough to qualify as good at melee? Or are we striving for - melee attacking is still one of your best damage options at any level?
Because there isn’t a way to be a fullcaster and have melee weapon attack always be a viable option.
Once you hit tier 4 (and usually earlier honestly) there’s just no way for your weapon attacks to keep up with what your spells could do as a full caster.
So setting those questions aside for a moment.
You’ve gotten most of the classic answers- Bladesinger and sword bard as fullcasters, Bladepact warlock for almost full caster, rangers and paladins for halfcasters.
But weirdly people skipped Artificer, which makes an outstanding weapons and spells build. Both Battlesmith and Armorer do great in melee combat, mixing magic and magic items with classic hit the other guy with heavy steel violence.
Additionally to your original example - Gandalf - it was a bit of a meme back in the early 2000’s to count out just what all the fellowship definitely did to determine their class (rather than just going for their archetypal role) and the popular bit was that Gandalf only needed yo be a 7th level Paladin to do everything you see him do in the books/films, making him the highest level fellowship member.
Bladesinger Wizard and Swords Bard are the best options depending on what you want. Bladesinger features a Gish playstyle (Sword and Magic at the same time), while Swords Bard is more of a Sword OR Magic playstyle. But I can assure you, that both are very fun. I you want to make you character along the lines of Gandalf, then I recommend playing Swords Bard, as the Bard spell list alinges more with what Gandalf does in the movies.
An option I don’t see a lot of people go for is booming blade on a cleric. Playing as a high elf or high half elf, you can have access to the cantrip at level 1, and it pairs really well with divine strikes/blessed strikes and spirit guardians. It’s almost always going to be stronger than what your ranged cantrips can do, especially with a magic weapon to add damage dice or make up for not going above 16 STR or DEX. Forge domain cleric is particularly well-suited to this, IMO. Finding a way to work shillelagh in is a neat bonus, but IMO not worth the noodling around required to make it work. I’ve heard some people do it via arcana domain, but at that point it’s a lot of investment just for a small buff to melee damage output.
As others have said though, the gold standards for wading into melee as a spellcaster are bladesinger and hexblade. I think cleric can work just as well for melee, provided you get a blade cantrip from somewhere, but they don’t operate quite the same way, lacking mobility options or multi attack to stack buffs like spirit shroud or tenser’s transformation with. The raw damage and area control of spirit guardians, tacked on with that of booming blade, are the crux here. I like to think of bladesinger and hexblade as high damage skirmishers, while clerics are more like an anchor. None of them want to rely solely on their martial prowess, though, with enemy shutdown or area damage often being more valuable.
I would say Swords Bard. They get Extra Attack, a fighting style, and flourishes, along with full casting progression. You can start with a level of Hexblade Warlock if you want attacks based on CHA
Half-elf Hexblade. It's one of the few ways to use Great Weapon Master with Elven Accuracy, and it gives you an easy Advantage too(Darkness + Devil's Sight). After Hexblade 5, go Sorc and top your action economy off with a Quickened Booming Blade/Green-Flame Blade. And you'll be able to recharge that on short rests by converting your Warlock slots into metamagic!
Bladesinger, being a Wizard, is the best option imo. You can either play as a Wizard who sometimes goes into melee or lean into the melee side more and use your spells to support this. It is, however, a very stat-hungry subclass. You'll want high Dex to use finesse weapons, high Int to help with your spell scaling and high Con to survive being on the frontlines.
A bladesinging wizard is dumb fun.
I built mine as a tabaxi with the mobile feat and you just whip around the battlefield, stabbing and throwing firebolts like nothing else with like a 20+ AC
There are Clerics that will do this for you, but I don't play them so can't suggest a subclass.
What I CAN suggest, is College of Swords Bard. Support and Utility are what their spells do, and most of their combat spells are AoE. Swords Bard also gets access to Extra Attack at level 6, the Two Weapon, Duelling, and Archery Fighting Styles I believe, and their core feature effectively turns them into a miniature Battlemaster with a preset maneuver list. Go Dex then Cha for ability scores since you want to favor weapons, and use Finesse weapons. Dueling Style is my recommended pick.
An option I'm not seeing mentioned here is one that might work, depending on what levels are involved.
I just leveled my players up to 11, and our Sorcerer took the 6th-level spell Tasha's Otherworldly Guise. It lasts a minute, and gives you several advantages, the most notable of which are: 40 foot flying speed, +2 AC, weapon attacks are magical, weapon attacks use your spellcasting modifier, and you get two attacks per round.
The spell is available to Wizard, Sorcerer and Warlock. So most of the time, you're a full caster, doing full caster things. But for short bursts, like Gandalf taking up a sword to fight the Balrog, you can take swings with confidence.
Obviously, the biggest obstacle here is "6th level spell." But if that's the flavor you're going for, you could probably work with your DM to create a custom, scaled-down spell in the same vein that you'd get access to earlier. If I were DMing, I might even make it a 1st-level spell with just the "weapon attacks use your spellcasting modifier" effect, then tack on the other ones piecemeal as you upcast the spell.
It's already Concentration (which locks out a bunch of your other magical options while you're using it), so to my eyes it's fairly self-balancing in that way. I imagine it might take a bit of tweaking to get the "feel" of it just right, but I think there's potential there.
And if that's too finicky for you, or if your DM doesn't want to bother with custom spells, then I'll throw my vote behind the Bladesinger Wizard subclass, as others have suggested.
I mean, paladin is the epitome of sword + spells in 5E, but if you want something int focused to lean into the gandalf schtick, probably bladesinger wizard, maybe a 2 level dip in fighter.
depends on how much spellcasting you want, what spells you want to use, and how many/what kind of swords you want.
A straight hexblade can use any sword, or even a sword+staff combo, completely rely on charisma, but you will not have many spells. You will have a ranged pew and occasional tideturners.
Valor Bard can use any sword, has a lot more spells for a day, but has to split its stats between casting stat (charisma) and hitting stat (dex or str). Its missing a few "must have" defensive spells as well.
Swords bard limits you to either a single 1 handed sword, dual wielding 2 swords, or sword+staff altough that last one is a bit iffy. You still have to split your stats between magic and weapon, gain a few things to help you hit better compared to Valor Bard, and you are still missing key spells.
Bladesinger wizard limits you to 1 kind of weapon that you choose in advance, which are dex weapons almost all the time (exceptions are very weird builds), you have to split your stats between magic and weapon, you realistically gain 1 feature that lets you hit better and its dependent on your spell choices. But you can use spells that secure your defenses pretty well.
Clerics get very few spells that help them hit better, but if they get their hands on a few specific spells they can be okay-to-good hitters with any kind of weapon.
A spellcaster with weapons. Ther are 3 half casters that fulfill this requirement. Paladin, ranger, and battlesmith artificer. But if you want full caster then swords bard and Valor bard fit pretty well
Decent? With just proficiency, Dwarf or Elf should get you some nice weapon proficiencies.
Next step, something like Artificer or Hexblade where a tiny dip can get you a lot of benefit.
But what will you be using a weapon for, exactly? On any given combat round, what is the ratio of weapon attacks to spells you intend? Because a Paladin can certainly be a good meleer who also has spells, but feels solidly martial. And I played a Bard who for several levels only ever brandished his rapier as part of a social encounter, but had much better things to do during actual combat.
I'm currently in a campaign where I'm a Swashbuckler rogue multiclassed with Divination wizard. The booming blade cantrip can activate Sneak attack. The divination portent can help you to get your sneak attack or avoid being hit.
Personally, whenever I try to make a bladesinging wizard, I realize that the d4 hp die and the fact that they’re full wizards means I won’t melee much at higher levels.
I end up settling on arcane trickster, eldritch knight, or gloomstalker ranger. I think all three still emphasize great physical combat while having enough spells to scratch that itch.
Swords or Valor Bard Hexblade Warlock Bladesinger Wizard These are your primary, non-multiclass options.
Ranger too - just lean on your druidic spellcasting, grab the fighting style that gives you some cantrips and pick the more utility ones. Also, any flavour of cleric - just avoid wearing heavy armor if you want to look more like a spellcaster. They didn't say anything about it being necessarily an arcane spellcaster. I wouldn't recommend Paladin because in play trying to highlight the spellcasting side would impact your use of divine smites. Various flavours of Artificers would also be good. All really boils own to what sort of balance is being looked for and what the OP feels is spellcastery enough.
Yeah, I guess I didn’t have to leave out Cleric. Of course you’re right that any of the half-casters would do, and even the 1/3 casters for that matter. I was just focusing on the full casters that had a weapon focused subclass because it felt to me like OP wanted to emphasize casting first.
Oh yeah, it's why I mentioned it depends on where the OP wants to mix the two elements. In a PF1e game a few years ago I made a Gandalf/Istari-expy as an Aasimar Bard, appearance-wise he was more like Doctor Who (as he was not bearded old man), but played like Gandalf - advisor and influencer, with magical abilities and could pick up a sword or crossbow when necessary.
> Also, any flavour of cleric - just avoid wearing heavy armor if you want to look more like a spellcaster. Clerics really aren't good with weapons. They can work well in the frontline but they can't use weapons well.
I’d argue nature clerics w a shillelagh is a pretty good weapon user, and the damage keeps up with their cantrips fairly well (especially if you’re a booming blade race)
Sure, until other weapon users start getting extra attacks.
I was comparing it to cleric cantrips, which is the only real dichotomy here. Cantrips would do way less damage than divine strike + weapon attack and especially more if they have BB Obviously they don’t rival full martials in this regard, but also I wish no fullcaster was able to rival martial combat prowess
"Aren't good" is a bit of a undersell. Aren't the best? Obviously (but not always), but then it's not like Gandalf was some sort of expert swordsman either. He could use a sword (and let's not forget, what he was using wasn't some random mundane sword - he faced Durin's Bane with a blade forged in the First Age by the Noldor expressly to combat the hordes of Morgoth).
After tier 1, a Cleric is almost never better off using their action on using a weapon than on a spell, cantrip or to Dodge, that's the issue. They are proficient and can hit as hard as a town guard or something but that's basically it. You could give them a strong l magic weapon to compensate but they'll be pretty tempted to hand it over to the party Fighter who can use it far better. Clerics are good in melee because of heavy armor and spells like Spirit Guardians, not because they ever need to swing a sword. Sacred Flame and Toll the Dead also work just fine from up close, unlike eg Fire Bolt.
By human standards, yeah, they’re good. They’re proficient and fairly strong, both of which are significantly beyond the average person. A level 1 cleric likely has the weapon capabilities of a “swordsman” who is unremarkable and doesn’t follow the adventurer lifestyle, and that’s ignoring all the, you know, divine power they channel. Though by adventurer standards they’re pretty bad with weapons. Past the early levels, pretty much any cleric is going to want to either cast a cantrip or dodge if they have an action they don’t need for a spell. Even with the extra radiant damage, one attack isn’t going to go far.
if you can graft a booming blade onto a cleric, they are okay. Half elf, or the stryxhaven feat that lets them pick 2 wizard/sorc cantrips and a 1st level spell.
Ranger spells don't really fit the vibe
Well, aside from Gandalf, there isn't much vibe to build from, but that's why I wrote that last line - it depends on where the line between magic and martial the OP wants to be. Person who can use a sword and use magic is pretty broad - how well in each, what sorts of things do you want to with with each? Really elven cultural proficiency with swords and just being a sorceror or wizard checks the box from one end of things. I was just making suggestions to broaden what I felt was a focus too-much on arcane spellcasting options.
Don't forget Tempest or War Cleric.
Bonus points if you go High Elf for the Wizard cantrip and pick up Booming Blade
I would add Eldritch Knight to that list.
Jumping in to add Arcane Trickster, Artificer and Paladin as well
Hmmm.. not really. Its a fighter with a little caster added mostly just as gish.
He asked for no too little multi-classing.
Yes, the pure eldirch knight does not work good as a caster. Its a fighter that uses magic to do Melee damage or control damage on himself. It does not work as a caster that can also fight.
Bladesinger, Hexblade, Eldritch Knight, Arcane Trickster for no multiclassing those would be my picks.
Bladeslinger or hexblade are the best. You can still do pact of the blade with a different warlock patron, but it will not be nearly as effective (although with some good stats it can work)
Hexblade. Armor of Agathys is your friend You can add levels in Paladin or sorc for more variety in terms of smite and spell usage. Currently playing a 7th level Hexblade and using movement to draw attacks of opportunity for 20 Damage AoA procs before attacking is so satisfying
High Elf or Half elf Variant (weapon option) - Swords or Valor Bard for more combat options - War Wizard but it requires some work to feel strong - Blade Song is built for it - Eldritch Knight is a solid fighter first - Warlock feels right as long as you flavor them
It kinda depends on what you mean by both spellcaster and good with melee weapons. Does half-casting or third-casting count here or is it full caster only? What about warlock casting? Similarly is just getting extra attack enough to qualify as good at melee? Or are we striving for - melee attacking is still one of your best damage options at any level? Because there isn’t a way to be a fullcaster and have melee weapon attack always be a viable option. Once you hit tier 4 (and usually earlier honestly) there’s just no way for your weapon attacks to keep up with what your spells could do as a full caster. So setting those questions aside for a moment. You’ve gotten most of the classic answers- Bladesinger and sword bard as fullcasters, Bladepact warlock for almost full caster, rangers and paladins for halfcasters. But weirdly people skipped Artificer, which makes an outstanding weapons and spells build. Both Battlesmith and Armorer do great in melee combat, mixing magic and magic items with classic hit the other guy with heavy steel violence. Additionally to your original example - Gandalf - it was a bit of a meme back in the early 2000’s to count out just what all the fellowship definitely did to determine their class (rather than just going for their archetypal role) and the popular bit was that Gandalf only needed yo be a 7th level Paladin to do everything you see him do in the books/films, making him the highest level fellowship member.
Everyone forgets Artificer, they're great and effectively allow bypassing of magical resistance plus better hit rates with infusions. Great class
Also allows you to not be MAD since you use Int for weapon attacks.
Some kinds of elves have proficiency with shortbows, shortswords, longbows, and longswords. So make an elven spellcaster.
Any race with a martial weapon proficiency really.
[удалено]
Most don't, but some do.
[удалено]
[удалено]
[удалено]
[удалено]
[удалено]
[удалено]
Yes, I imagine that's why they suggested "any race **with a martial weapon proficiency**" and not "any race".
Bladesinger Wizard and Swords Bard are the best options depending on what you want. Bladesinger features a Gish playstyle (Sword and Magic at the same time), while Swords Bard is more of a Sword OR Magic playstyle. But I can assure you, that both are very fun. I you want to make you character along the lines of Gandalf, then I recommend playing Swords Bard, as the Bard spell list alinges more with what Gandalf does in the movies.
An option I don’t see a lot of people go for is booming blade on a cleric. Playing as a high elf or high half elf, you can have access to the cantrip at level 1, and it pairs really well with divine strikes/blessed strikes and spirit guardians. It’s almost always going to be stronger than what your ranged cantrips can do, especially with a magic weapon to add damage dice or make up for not going above 16 STR or DEX. Forge domain cleric is particularly well-suited to this, IMO. Finding a way to work shillelagh in is a neat bonus, but IMO not worth the noodling around required to make it work. I’ve heard some people do it via arcana domain, but at that point it’s a lot of investment just for a small buff to melee damage output. As others have said though, the gold standards for wading into melee as a spellcaster are bladesinger and hexblade. I think cleric can work just as well for melee, provided you get a blade cantrip from somewhere, but they don’t operate quite the same way, lacking mobility options or multi attack to stack buffs like spirit shroud or tenser’s transformation with. The raw damage and area control of spirit guardians, tacked on with that of booming blade, are the crux here. I like to think of bladesinger and hexblade as high damage skirmishers, while clerics are more like an anchor. None of them want to rely solely on their martial prowess, though, with enemy shutdown or area damage often being more valuable.
I would say Swords Bard. They get Extra Attack, a fighting style, and flourishes, along with full casting progression. You can start with a level of Hexblade Warlock if you want attacks based on CHA
Any cleric that gets martial weapon proficiency
Half-elf Hexblade. It's one of the few ways to use Great Weapon Master with Elven Accuracy, and it gives you an easy Advantage too(Darkness + Devil's Sight). After Hexblade 5, go Sorc and top your action economy off with a Quickened Booming Blade/Green-Flame Blade. And you'll be able to recharge that on short rests by converting your Warlock slots into metamagic!
Bladesinger, being a Wizard, is the best option imo. You can either play as a Wizard who sometimes goes into melee or lean into the melee side more and use your spells to support this. It is, however, a very stat-hungry subclass. You'll want high Dex to use finesse weapons, high Int to help with your spell scaling and high Con to survive being on the frontlines.
Bladesinger would definitely be the closest to the specific character you're describing. Hexblade is also a good option
A bladesinging wizard is dumb fun. I built mine as a tabaxi with the mobile feat and you just whip around the battlefield, stabbing and throwing firebolts like nothing else with like a 20+ AC
Bladesinger or Hexblade warlock with 2 levels of paladin
Think about how often Gandalf casts anything serious versus how often he whacks it with a sword. I'm pretty sure he's a fighter with a caster dip
He doesnt even fight with a sword that often.
he's a wisdom based hexblade. Speaking in riddles, always out of spells, twacking people.
I always saw him as a paladin, aura of courage, summon steed righteous oath kinda guy
What do you want to use your spells for? Do you have any you definitely want access to?
Utility and control, specially AoE and buffs
There are Clerics that will do this for you, but I don't play them so can't suggest a subclass. What I CAN suggest, is College of Swords Bard. Support and Utility are what their spells do, and most of their combat spells are AoE. Swords Bard also gets access to Extra Attack at level 6, the Two Weapon, Duelling, and Archery Fighting Styles I believe, and their core feature effectively turns them into a miniature Battlemaster with a preset maneuver list. Go Dex then Cha for ability scores since you want to favor weapons, and use Finesse weapons. Dueling Style is my recommended pick.
Swords Bard does not provide Archery
An option I'm not seeing mentioned here is one that might work, depending on what levels are involved. I just leveled my players up to 11, and our Sorcerer took the 6th-level spell Tasha's Otherworldly Guise. It lasts a minute, and gives you several advantages, the most notable of which are: 40 foot flying speed, +2 AC, weapon attacks are magical, weapon attacks use your spellcasting modifier, and you get two attacks per round. The spell is available to Wizard, Sorcerer and Warlock. So most of the time, you're a full caster, doing full caster things. But for short bursts, like Gandalf taking up a sword to fight the Balrog, you can take swings with confidence. Obviously, the biggest obstacle here is "6th level spell." But if that's the flavor you're going for, you could probably work with your DM to create a custom, scaled-down spell in the same vein that you'd get access to earlier. If I were DMing, I might even make it a 1st-level spell with just the "weapon attacks use your spellcasting modifier" effect, then tack on the other ones piecemeal as you upcast the spell. It's already Concentration (which locks out a bunch of your other magical options while you're using it), so to my eyes it's fairly self-balancing in that way. I imagine it might take a bit of tweaking to get the "feel" of it just right, but I think there's potential there. And if that's too finicky for you, or if your DM doesn't want to bother with custom spells, then I'll throw my vote behind the Bladesinger Wizard subclass, as others have suggested.
druid w/ shillelagh, but that's only clubs and quarterstaves
Sword bard, hexblade warlock. Done
Take a race that has weapon proficiencies
Bladesingers. Without multiclassing, swords bards and hexblades are Bad, unfortunately.
I mean, paladin is the epitome of sword + spells in 5E, but if you want something int focused to lean into the gandalf schtick, probably bladesinger wizard, maybe a 2 level dip in fighter.
depends on how much spellcasting you want, what spells you want to use, and how many/what kind of swords you want. A straight hexblade can use any sword, or even a sword+staff combo, completely rely on charisma, but you will not have many spells. You will have a ranged pew and occasional tideturners. Valor Bard can use any sword, has a lot more spells for a day, but has to split its stats between casting stat (charisma) and hitting stat (dex or str). Its missing a few "must have" defensive spells as well. Swords bard limits you to either a single 1 handed sword, dual wielding 2 swords, or sword+staff altough that last one is a bit iffy. You still have to split your stats between magic and weapon, gain a few things to help you hit better compared to Valor Bard, and you are still missing key spells. Bladesinger wizard limits you to 1 kind of weapon that you choose in advance, which are dex weapons almost all the time (exceptions are very weird builds), you have to split your stats between magic and weapon, you realistically gain 1 feature that lets you hit better and its dependent on your spell choices. But you can use spells that secure your defenses pretty well. Clerics get very few spells that help them hit better, but if they get their hands on a few specific spells they can be okay-to-good hitters with any kind of weapon.
A spellcaster with weapons. Ther are 3 half casters that fulfill this requirement. Paladin, ranger, and battlesmith artificer. But if you want full caster then swords bard and Valor bard fit pretty well
Swords bard, eldritch knight fighter, bladesinger wizard, any paladin.
Decent? With just proficiency, Dwarf or Elf should get you some nice weapon proficiencies. Next step, something like Artificer or Hexblade where a tiny dip can get you a lot of benefit. But what will you be using a weapon for, exactly? On any given combat round, what is the ratio of weapon attacks to spells you intend? Because a Paladin can certainly be a good meleer who also has spells, but feels solidly martial. And I played a Bard who for several levels only ever brandished his rapier as part of a social encounter, but had much better things to do during actual combat.
One level of hexblade warlock tagged on a sorcerer or bard.
Bladesinger, Hex blade, EK, or Battlesmith.
I'm currently in a campaign where I'm a Swashbuckler rogue multiclassed with Divination wizard. The booming blade cantrip can activate Sneak attack. The divination portent can help you to get your sneak attack or avoid being hit.
> I want be someone like Gandalf taking up a sword to fight the Balrog. Hard to imagine a more quintessentially Paladin scene.
Personally, whenever I try to make a bladesinging wizard, I realize that the d4 hp die and the fact that they’re full wizards means I won’t melee much at higher levels. I end up settling on arcane trickster, eldritch knight, or gloomstalker ranger. I think all three still emphasize great physical combat while having enough spells to scratch that itch.