Damage Formula for Actor Only? [Solved]

I want to set it up so that an actor (actor 3) draws from their MAT rather than ATK for their normal attack. I figured the formula that works for this is:
Code:
a.id == 3 ? a.mat * 4 - b.def * 2 : a.atk * 4 - b.def * 2

My question is this: Am I correct in thinking think that this formula, as written, also applies to the third enemy in the database as well as the third actor? And if so, how can I get it to be actor only?
Assuming your formula works as it is, then do it like this to make it actor access only

Code:
if (a.isActor()) {a.id == 3 ? a.mat * 4 - b.def * 2 : a.atk * 4 - b.def * 2} else {<formula if enemy uses same skill, but different formula>}

just remove "else" and beyond if not needed obviously 😀
Is there a way to abbreviate that? It doesn't fit in the formula field as is.
Also, Is "isActor" a valid ruby eval? I can't seem to find it elsewhere in the VX Ace code but googling the term sends me to MV/MZ parts of the forum.
You could do:
Ruby:
pow = a.is_a?(Game_Actor) && a.id == 3 ? a.mat : a.atk; pow * 4 - b.def * 2
That works. Thanks a lot.

Original thread: https://forums.rpgmakerweb.com/threads/damage-formula-for-actor-only-solved.126674/