Rainbow Gravitation

matt.chugg

Moderator
Should use_skill(1, $skill[Rainbow Gravitation]) return false if you don't have the correct wads?

It returns false if I don't have enough mp, but if I am missing one of the elemental wads it still returns true even though the skill wasn't really successfully cast ?

Possibly a feature? possibly a bug?
 

Bale

Minion
A lot of functions like that will return true regardless of failing. It's rather annoying actually, but no longer expected. Long gone are the days when I thought use(1, item) would return false if the item was not used. That bug was rather troublesome to figure out...
 

zarqon

Well-known member
I still smile at the filthworm sidequest function of OCW:

if (!use(1,$item[filthworm hatchling scent gland])) print("You smell like a hatchling.");

If you don't use it, you get the effect!
 

Bale

Minion
That is so counter-intuitive that I'd refuse to write such code simply because it is evil. Very tight and compact and clever, but evil. I might confuse myself with that, let alone a third party that was trying to modify my code.
 
Top