Weapon of Energy

This contains bug reports which the test team have confirmed and are now in the queue to be fixed.
Post Reply
Orplar
Sword Grand Master
Sword Grand Master
Posts: 694
Joined: Tue Feb 01, 2005 4:33 pm
Location: Forests of Fearun

Weapon of Energy

Post by Orplar » Sat Aug 17, 2013 9:37 pm

Weapon of Energy
================
Transmutation
Range: Personal
Target: Inventory
Syntax: cast 'weapon of energy' <object> <fire/cold/acid/electricity>

This spell imbues a weapon in the caster's hand with one of four forms of
energy, making it cause energy damage in addition to the weapon's base
damage

* In order to activate the energy with which the weapon is magically imbued,
you must 'use' the weapon subsequent to casting this spell.

This spell cannot be learned by an abjurer

(A) 7th Level Cleric Spells (B) 7th Level Wizard Spells
(C) Magic Domain (D) Transmutation Spells



It appears acid is not an accepted syntax
You are carrying:
a spiked warhammer (perfect)


c 'weapon of energy' spiked acid
You begin to chant.
An expensive diamond glows briefly.
Some gem powder glows briefly.
Syntax is: cast 'weapon of energy' object fire/cold/electricity.
"Be bold and let your feet guide you upon your own path. With any Luck, you'll wind up in a fabulous place. Work upon your skills, perfect them. You will be rewarded as you want" - Orplar Leafall, Lucks Guide
Orplar
Sword Grand Master
Sword Grand Master
Posts: 694
Joined: Tue Feb 01, 2005 4:33 pm
Location: Forests of Fearun

Re: Weapon of Energy

Post by Orplar » Sun Aug 18, 2013 3:00 am

also,

Should this remove (glowing) flags?
"Be bold and let your feet guide you upon your own path. With any Luck, you'll wind up in a fabulous place. Work upon your skills, perfect them. You will be rewarded as you want" - Orplar Leafall, Lucks Guide
User avatar
Raona
Staff
Staff
Posts: 4944
Joined: Fri Aug 19, 2005 3:40 pm
Location: Waterdeep - Halls of Justice
Contact:

Re: Weapon of Energy

Post by Raona » Mon Aug 19, 2013 2:09 am

Well, this is all in the spell code, and I have to say I'm rather confused by it:

Code: Select all

Affect        '
if objtype($o) != weapon then
	0
else if string($2) == fire then
	L*m
else
    0' APPLY_WEAPON_FLAG 'weapon of energy' AFF_BLIND GENERIC_SPELL_FLAG_NORMAL
Affect        '
if objtype($o) != weapon then
	0
else if string($2) == cold then
	L*m
else
    0' APPLY_WEAPON_FLAG 'weapon of energy' AFF_INVIS GENERIC_SPELL_FLAG_NORMAL
Affect        '
if objtype($o) != weapon then
	0
else if string($2) == electricity then
	L*m
else
    0' APPLY_WEAPON_FLAG 'weapon of energy' AFF_DETECT_MAGIC GENERIC_SPELL_FLAG_NORMAL
End
If I could make sense of what it is up to with the other three, adding acid should not be overly difficult. Was its omission intentional, though?

If anyone understands how the AFF flags chosen make sense...please enlighten me! Something's up, because the spell does work, right? (At least for cold, fire, and electricity?)

This spell should not strip glowing flags, if it does so that may be a hard code issue. Is it permanent, or just for the duration of the spell?
User avatar
Gwain
Sword Grand Master
Sword Grand Master
Posts: 2354
Joined: Tue Nov 01, 2005 9:25 pm
Location: Waterdeep

Re: Weapon of Energy

Post by Gwain » Mon Aug 19, 2013 2:40 am

It is permanent. I lost a glow flag on a weapon. I had to restore it.
Justice is not neccesarily honourable, it is a tolerable business, in essence you tolerate honour until it impedes justice, then you do what is right.

Spelling is not necessarily correct :)
Orplar
Sword Grand Master
Sword Grand Master
Posts: 694
Joined: Tue Feb 01, 2005 4:33 pm
Location: Forests of Fearun

Re: Weapon of Energy

Post by Orplar » Mon Aug 19, 2013 2:48 am

The glow flag removal has been permanent, unless Im just bonkers and that is likely. All other aspects of the item have stayed the same. Havent tried re adding the flag and testing again as i lack bright stones at the moment. Fire/cold/electricity all work beautifully.
"Be bold and let your feet guide you upon your own path. With any Luck, you'll wind up in a fabulous place. Work upon your skills, perfect them. You will be rewarded as you want" - Orplar Leafall, Lucks Guide
User avatar
Raona
Staff
Staff
Posts: 4944
Joined: Fri Aug 19, 2005 3:40 pm
Location: Waterdeep - Halls of Justice
Contact:

Re: Weapon of Energy

Post by Raona » Mon Aug 19, 2013 1:52 pm

Right, moving to confirmed. I'm going to need help figuring this one out, though, sorry!
User avatar
Algon
Sword Grand Master
Sword Grand Master
Posts: 1070
Joined: Thu Aug 14, 2003 12:44 am
Location: Waterdeep

Re: Weapon of Energy

Post by Algon » Mon Aug 19, 2013 3:29 pm

Would there by a way to add an if check to see if the item is glowing before the actual spell takes place, and then just re-add the glow flag at the end of the spell?
Counting bodies like sheep...to the rhythm of the war drums. ~~~ Maynard
User avatar
Raona
Staff
Staff
Posts: 4944
Joined: Fri Aug 19, 2005 3:40 pm
Location: Waterdeep - Halls of Justice
Contact:

Re: Weapon of Energy

Post by Raona » Tue Aug 20, 2013 1:48 am

Honestly, I don't understand the spell code up above (I don't see how the spell should work at all, but it does!) and I don't see how it should strip a flag (at least not a glowing flag) even if it acted the way I would naively expect it to based on the above. So there's either some hardcode at work that I can't see, or I need some tutoring on this aspect of the spell code. I'm wondering if the bit correspondencies didn't get messed up when new affects were brought in for the elemental flags.
Althasizor
Sword Grand Master
Sword Grand Master
Posts: 585
Joined: Sun May 22, 2011 6:05 am
Location: Ba Sing Se
Contact:

Re: Weapon of Energy

Post by Althasizor » Mon May 12, 2014 11:18 pm

Giving this a little nudge, because this spell permanently removing flags is still an issue. I used it a few minutes ago, and while it didn't remove the glowing flag on my weapon, it did remove the more fun and less replaceable (Humming) flag.

Before: <right hand> (Glowing) (Humming) a black warhammer (perfect)
During: <right hand> (Glowing) (Humming) (Icy) a black warhammer (perfect)
After: <right hand> (Glowing) a black warhammer (perfect)
What are you talking about? What, that guy?
That was like that when I got here.
User avatar
Gwain
Sword Grand Master
Sword Grand Master
Posts: 2354
Joined: Tue Nov 01, 2005 9:25 pm
Location: Waterdeep

Re: Weapon of Energy

Post by Gwain » Tue May 13, 2014 12:05 am

Yes, I think the different flags are stripping other flags, fire tends to remove glowing, and ice will probably take the humming.
Justice is not neccesarily honourable, it is a tolerable business, in essence you tolerate honour until it impedes justice, then you do what is right.

Spelling is not necessarily correct :)
User avatar
Raona
Staff
Staff
Posts: 4944
Joined: Fri Aug 19, 2005 3:40 pm
Location: Waterdeep - Halls of Justice
Contact:

Re: Weapon of Energy

Post by Raona » Tue May 13, 2014 3:02 am

Canon has this spell only offering electricity, fire, and ice as options, so I've stripped acid from the helpfile; I think that was just a typo.

As for the flag stripping, that's a knottier bit of tree. Working on it.
User avatar
Raona
Staff
Staff
Posts: 4944
Joined: Fri Aug 19, 2005 3:40 pm
Location: Waterdeep - Halls of Justice
Contact:

Re: Weapon of Energy

Post by Raona » Wed May 14, 2014 9:07 am

Gwain wrote:Yes, I think the different flags are stripping other flags, fire tends to remove glowing, and ice will probably take the humming.
Gwain's right on the mark, here. An active flaming flag will remove the glowing flag when it expires, and an active icy flag will remove the humming flag when it expires. I suspect this is in hardcode, as even the spell code flag modifications don't make any sense to me, but I will try fiddling with them.
Post Reply