Page 1 of 1

Magic Vestment not able to enchant anything

Posted: Mon Jan 13, 2014 1:17 am
by Gwain
Magic vestment does not seem to be functioning, tried it on a variety of armour, including masterwork leg armour and mundane leather gloves to a cloth cap. All you get is this echo:

Code: Select all

The enchantments already on a grey silk cap with three green feathers prevent the success of your spell.

Re: Magic Vestment not able to enchant anything

Posted: Wed Jan 15, 2014 3:17 pm
by Raona
Looks like there is something wrong with the IF check.
Log: [*****] BUG: Attempt to mprog_do_ifcheck 'getapply($o,armour) > 0' returned BERR!
It currently reads
if getapply($o,armour) > 0 then
and I'm guessing it should be
if getapply($o,ac_armour) > 0 then

Anyone sure on the syntax here?

In any case, the fail echo should be changed to something broader, perhaps
This object is not a viable target for the Magic Vestment spell.
because the two ways this spell can fail are 1) it's already got an apply_ac_armour or 2) it's not armour. The current failure echo is only appropriate for the former failure mode.

I can fix these but if there's someone who can confirm that
if getapply($o,ac_armour) > 0
is legit, I'll be less skittish about trying it. It's the underscore I'm not sure about.