Yllor’s trait (Iniquity) says “When this creature attacks, it has a 100% chance to attack an additional time. This trait’s effect can repeat multiple times in a row, but the chance decreases by 25% after each attack.” The extra attacks work fine, but a creature with this trait will occasionally randomly cast one of its non-ethereal spell gems after attacking (roughly 10% of the time).
This happens with both creatures that have this as an innate trait, as well as creatures that gain it later in the battle. None of theses creatures have any artifacts, relics, or spell gems with the “chance to cast after attacking” property. I have no perks or anointments, and no other traits that should be causing this. As far as I can tell, this doesn’t happen to creatures without the Iniquity trait.