If I have a high-enough BAB to earn two attacks per round as a full-round action, can I attack with a two-handed weapon (1st attack), remove one hand from the weapon (free action) and, say, make a touch attack (2nd attack) using Shocking Grasp?
As per the Paizo FAQ:
What kind of action is it to remove your hand from a two-handed weapon or re-grab it with both hands?
Both are free actions. For example, a wizard wielding a quarterstaff can let go of the weapon with one hand as a free action, cast a spell as a standard action, and grasp the weapon again with that hand as a free action; this means the wizard is still able to make attacks of opportunity with the weapon (which requires using two hands).
As with any free action, the GM may decide a reasonable limit to how many times per round you can release and re-grasp the weapon (one release and re-grasp per round is fair).
However, casting a spell is a standard action, and an increase to your BAB has no effect on your inability to perform multiple standard actions in a turn.
If you were using a one-handed weapon, you could cast shocking grasp beforehand with one hand and hold the charge; on your next turn you could make a full-attack with your BAB and then discharge the shocking grasp as a free action. A two handed weapon would not work in this case as it would problematically discharge on your weapon as soon as you touched it:
Holding the Charge: If you don't discharge the spell in the round when you cast the spell, you can hold the charge indefinitely. You can continue to make touch attacks round after round. If you touch anything or anyone while holding a charge, even unintentionally, the spell discharges.
You'd have to release the discharged spell before making your full attack with a two-handed weapon.
I second HeyICanChan - it is not 100%clear, how Shocking Grasp has come to be in your example, but either way the answer is "no".
If you are asking whether you can CAST the touch spell instead of an attack the answer is:
No. Spells do not iterate like attacks.
Spells either consume a standard action, a swift action, a free action, a full round action or a longer time, but they never take the place of an attack. Otherwise a caster would be able to cast more spells with rising base attack bonus. That is not intended.
If the question is, if you could use a PREVIOUSLY CAST touch spell - the answer has been given by Dumpcats: No, a held charge would have gone off in the moment you touched your weapon.
But you could combine full attack with a quickened Shocking Grasp.
A quickened spell requires the meta-magic feat Quicken spell (PHB, 98f). You have to cast the spell as 4 levels higher, so Shocking Grasp would take a 5th level spell slot. It allows you to cast the spell as a swift action. (Spell Compendium p. 4) If you cast a touch spell as swift action, attacking the opponent is part of the action.
Reference for D&D 3.5 only:
FAQ D&D 3.5, p. 76, on casting a quickened ranged touch spell:
Casting a quickened version of either example spell works exactly the same way (...); the caster makes all the ranged touch attacks the spell allows as part of the free action he used to cast the spell. The caster generally uses his full attack bonus for each ranged touch attack. Any other attacks the caster might make during the same round as the quickened spell have no effect on the caster’s attack bonus for the ranged touch attacks; however, if the caster does something that gives him an attack penalty on all his attack rolls until his next turn, such as fighting defensively, that attack penalty also applies to his ranged touch attacks from the quickened spell. [That a quickened spell uses only a free action has been updated later on, e.g. in the Spell Compendium p.4 - Giorin]
There is no reason why this should not apply to touch spells instead of ranged touch spells.
So you could
- use your full attack with your two-handed weapon (full-round-action)
- take one hand off the weapon - no matter which - (free action)
- cast a quickened Shocking Grasp and touch your opponent as part of the action (swift action). This attack would be extra and made with your full attack bonus.
This course of action is still different from what you describe above, because the spell would not take the place of an attack because of high BAB, but it comes close.
Other possibilities of combining melee attacks and spell casting:
- Holding the charge of a spell, attacking with a melee weapon and then using the touch spell would work with a one-handed weapon. But in that case we are talking about two-weapon-fighting, which grants you an extra attack but severe penalties on your attacks. (PHB, p. 160; penalties without feats: -4 on your primary hand melee weapon attacks, -8 on the off-hand extra touch attack with the spell)
- You can combine an attack with a spell if you use a spell storing weapon. In this case discharging the spell is a free action. This comes close to what you describe in your question - but you would not have to bother taking your hands off the weapon or using an attack for the spell. The stored spell is exhausted after this hit.
- If you have previously channeled a spell into your weapon using the Channel Spell class feature of the Spellsword prestige class (Complete Warrior) the spell would go off at the first hit - no extra action required, so a full attack would be possible.
- The Arcane Channeling class feature of the Duskblade base class (PHB II) also allows combining a spell with a melee attack, but does not allow a full attack before level 13.