The Dink Network

Reply to Dink Engine bug - global variables get confused

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
November 9th 2002, 02:45 AM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
I've come across a bug... or rather WC did, in PQ in which the powerful magic spells are instantly recharged.

It seems that the global varilables &magic_level and &magic_cost get confused with the variable &magic (as all three have the first 5 letters in common) so that if your &magic is say 18 then &magic_level becomes 18_level and &magic_cost becomes 18_cost.

When this happens and you arm a new weapon (not magic, arming a new magic resets things properly, though I don't know why) - you get instant (in human time) magic... be it Deus Strike or whatever.

I can't think of a way around this as I can't guarantee what magic is in which slot (or I'd do a quick change magic to fireball, arm it, change to &cur_magic and re-arm it) - compare_magic doesn't work, of course.

Any takers on this one?