How to make a projectile's damage scale with creatures melee damage.

Iv been working on a new creature for my mod and have been trying to figure out how to scale a projectiles damage to my creatures melee damage so that it does more damage the more melee damage they have, anyone know how i can do this?