You could try.. (FindItemByType instead of FindItemsByType)
if (from.Backpack.FindItemByType(typeof(PortableAnvil)) != null && from.Backpack.FindItemByType(typeof(PortableForge)) != null)
return 0; // if both are found
If you want all indirect damage to work in the same way, I think just, return true; at the original place I showed.
Line 571 of SpellHelper.cs
It's part of public static bool ValidIndirectTarget(Mobile from, Mobile to), which is what you want with an explosion potion.
Look to Explode in BaseExplosionPotion.cs to see where its called. (Indirect Targets..)
Check out all my videos of UO features at https://www.youtube.com/channel/UCYXr7jC9TBB_B8tZfI-70rA
Share! Like! and Subscribe! If you'd like to.
A random subscriber will be selected to receive a feature at special milestones.