This reminds me of FF9. You equip a weapon or armor and you fight with it equipped. AP is gained and a little bar is filled. When the bar fills you get a stone with a stat corresponding with the equipped weapon/armor. I see it as random materia output, like a Silver Scepter can create MP+1% or Water+2 Materia.