Flash
This spell costs {1} less to cast for each attacking creature.
Trample
When Ancient Stone Idol dies, create a 6/12 colorless Construct artifact creature token with trample.
Ancient Stone Idol's cost is reduced for each attacking creature, not just creatures attacking you. It even counts your attacking creatures.
If there are enough attacking creatures, Ancient Stone Idol's cost can be reduced to {0}.
The total cost to cast a spell is locked in before you pay that cost. For example, if you control five attacking creatures, including one you can sacrifice to add {C} to your mana pool, Ancient Stone Idol costs {5} to cast. Then you can sacrifice the creature when you activate mana abilities just before paying the cost, and it still costs only {5} to cast.