That's actually pretty easy. Aside from numbers, you can use the following entries.
a: represent the attacker.
b: the victim.
atk: physical attack.
def: physical defense.
mat: magic attack.
mdf: magiic defense.
agi: agility.
luk: luck.
mhp: max HP.
mmp: max MP.
hp: current HP.
mp: current MP.
tp: current TP.
level: well, the level.
\v[n]: the value of the variable ID "n".
Now, each of this properties can be linked to either the attacker (a) or the target ( b ). For instance, this:
CODE
a.atk * 4 - b.def * 2
means "Attacker Attack value * 4 - Target Defense value * 2".