you would have to create a point counter(p) on that attack and a increase rate(r), then you multiply the rate by the points then add to the damage(d) so you would make a equation for damage from that:
nd=r*p+d
nd stands for new damage aka the amount of stack-able damage.
went to a school for minor programming and more graphical design :3