The 27th Chapter of the Lalitopakhyana, from Brahmanda Purana, describes this story of the army of Lalitambika refusing to fight due to the Maya of Vishukra, the brother of Bhandasura.
During the battle of Lalitambika's army versus Bhandasura's army, due to the constant victory of Lalitambika and the decimation of Bhandasura's forces, his brother Vishukra was suggested by Bhandasura to cast a Magical Spell known as Jaya Vighna Yantra on the army.
After hearing this utterance full of haughtiness and pride, the furious Daitya spoke these words with his eyes turned red due to
wrath.
“O Viśukra, you go to the camp of the enemy with your body concealed by means of Māyā and operate the great Yantra (mystical
diagram) Jayavighna”.
On hearing his words Viśukra went towards the army of Lalitā in great fury, with his body concealed by means of Māyā.
This Yantra literally Means "Obstruction To Victory", and would affect the morale of any army it was cast upon.
36-39. He wrote (inscribed) the excellent Tantra in a huge rocky slab
a Gavyūti (i.e. 3 kilometres) in length and the same in width. In the
eight directions he drew the figures of eight tridents with the
Saṃhārākṣara, (syllables signifying Death or killing) on the top. The
Yantra (amulet) had eight presiding deities namely Alasā, Kṛpaṇā,
Dinā, Nitandrā, Pramīlikā, Klībā, Gītā and Ahaṃkārā. He joined these
eight deities over the eight tridents. Viśukra who was an expert in
Māyā, infused the Yantra with a Mantra.
- He performed the worship of Yantra and offered goats etc. as oblation. In the course of battle, (?) that Asura hurled the Yantra
into the enemy camp.
We can see that the inscriptions on the Yantra namely Alasa, Kripana, Nitandra, etc are basically human flaws such as laziness, self-pity, lethargy and so on.
As a result of this Jayavighna Yantra, the Shaktis of Lalitambika's army lost their will to fight, and began to question the superiority of Lalita Devi.
43-52. “What is to be done by killing Asuras? Enough of this clash of
weapons with other weapons. What is the benefit achieved by victory?
Injury to living beings yields sin.
Is this for the sake of Devas? What shall befall us then? It is futile
to make a tumultuous sound. Excepting this there is no other benefit
from warlike activities. Who is our mistress and great queen? And who
is this Daṇḍanāyikā? Who is that Mantriṇī of dark complexion (Śyāmā)?
Whence is our state of being servants and only one lady is the
Mistress? What, then is the great benefit that is enjoyed? No purpose
is served by weapons that pierce through the vital parts of the enemy.
Let this war that brings about wounds in the body and loss of weapons
to us come to a close. It is sure that death will befall us in the
course of battle.
......
In this manner, Śaktis left off all their preparations for war and
cast away their weapons. Overwhelmed by sleep, they appeared to be
reeling and moving unsteadily at the entrance.
When Mantrini and Dandanatha (the Commanders of the Army) informed Lalitambika, she laughed, and through the combined laughter of Lalitambika and the smile of Kameshvara, was born Lord Mahaganapati with ten hands and a reddish hue. Lord Ganesha, being Vighna-harta (the destroyer of Obstacles), then proceeded to destroy the Jayavighna Yantra of Vishukra.
Thereupon, goddess Lalitā glanced at the face of Kāmeśvara, she then laughed displaying a row of extremely red teeth.
In the mass of lustre of her smile, a certain god became visible. His face had the features of an elephant. Ichor was oozing from the
middle of his temple.
69-71. The mass of matted hair of his head appeared like a mass of Pāṭalā
(the tree bearing trumpet) flowers. He held the crescent moon (on his
head). In his ten hands he held citron fruit, mace, sugarcane-bow,
trident (that had a fine form), lotus, noose, (a blue lotus), bunch of
(rice) grain that grants boons, the goad, and a jewelset pot. He had a
pot-belly. He was moon-crested. He had a pleasant rumbling sound. He
was embraced by Siddhilakṣmī. He bowed down to Maheśvarī.
...
The elephant-faced lord moving about within enclosure saw Jayavighna the amulet
secretly fixed somewhere.
By hitting with his tusks that produced dreadful noise very difficult to bear, that lord reduced the huge slab of Jayavighna to powder instantaneously.
Along with the wicked deities posted there, he reduced that Yantra to powder and cast it off in air.
Following this, the Shaktis regained their original valour, and were able to resume their battle with vigour.
- Thereupon, Śaktis got rid of their lethargy. Making a tumultuous uproar, they prepared themselves for carrying on fight with weapons in their arms.
Thus, the Jayavighna Yantra, cast by Vishukra to disillusion the Shaktis of Lalitambika's army, was destroyed by Lord Mahaganapati, and the army was re-invigorated and resumed battle, leading to the victory of Lalitambika over Bhandasura.