Found a bit of a bug. I'll post it on Redmine but if people don't mind I'll use this post for the files needed to reproduce.
Opcode 321, "cancel effect by resource," is meant to cancel the effects of a specified spell. However, it fails on effects that use opcode 0 (armor class bonus) with permanent timing. Note: it doesn't fail to cancel the target spell; it only fails to cancel any permanent opcode 0 effects within
the target spell.
Steps to reproduce:
1) Download the three files attached to this post, unzip them and drop them in your override folder.
2) Start up any game, and type the following into the CLUA Console:
3) Use the newly-granted innate ability with the Shield icon. Observe that your armor class and thac0 have both been improved by 2 points.
4) Now use the newly-granted innate ability with the Remove Magic icon.
Both the AC and thac0 bonuses should disappear.
Only the thac0 bonus disappears. The AC bonus survives the removal.
You can keep using the bonus ability and the removal ability, and you will see that your thac0 score bounces back and forth, while your AC score continually ratchets down.