I know how to literally write out "if" and "then" and "end" and all that but, the damage formula has a 100 character limit and I've seen formulas with a format more like:
(a.atk > b.def) ? 10 : 5
And I get some of it. But, when I try to use it I always get *something* wrong somehow so I was hoping someone knew a guide on how to properly format formulas with this short-hand way?
And to be specific? How would you write out:
if(a.atk > b.atk)
b.hp -= (a.atk*2 - b.atk*2)
else 1
end
if(a.mat > b.mat)
a.mat*2 - b.atk*2
else 1
end
I need BOTH of these to happen in one damage formula.
(a.atk > b.def) ? 10 : 5
And I get some of it. But, when I try to use it I always get *something* wrong somehow so I was hoping someone knew a guide on how to properly format formulas with this short-hand way?
And to be specific? How would you write out:
if(a.atk > b.atk)
b.hp -= (a.atk*2 - b.atk*2)
else 1
end
if(a.mat > b.mat)
a.mat*2 - b.atk*2
else 1
end
I need BOTH of these to happen in one damage formula.