Battleflies were added in Beta 39.1. Previous Versions can be found here.
Since Beta 55.0, Battleflies as 2 ATK by default, but would gain 2 more ATK if you cast at least 1 spell. It keeps this buff until the start of your next turn and you'll have to cast a new spell.
A helpful to remember is that due to this being an Aura effect that also lasts during the enemy's next turn, if you've casted a spell, its ATK is unable to go below 2, even if you attack something like an Ugly Fish or an enemy Toriel is used on it.
As such, its effect can be read as followed:
"If you cast a spell, gain +2 ATK (can't stack or be removed by other cards). Turn start: If you casted a spell last turn, gain -2 ATK."