Example: Allied General (green)

-basic atk: Deals magic damage, damage scales off your MAX HP

Question, does its basic attack scale with MAGIC stat or only MAX HP stat?? Also does ATK stat add dmg to it at all?