#SKILL
Name iceshield~
Type Spell
Info 0
Flags 0
Target 2
Minpos 112
Slot 221
Mana 85
Rounds 12
Code spell_smaug
Dammsg ~
Wearoff The hail of ice rapidly melts and evaporates into nothingness.~
Hitchar A glistening hail of ice encompasses $N.~
Hitvict A glistening hail of ice encompasses you.~
Hitroom A glistening hail of ice encompasses $N.~
Affect '(l*4)+8' 26 'iceshield' 28
Minlevel 101
End
When something with this affect on it is attacked, this bug comes up:
Log: [*****] BUG: spell_smaug: Called with a null skill for sn -1
Does anyone see anything wrong with the skill or what is wrong?
[EDIT] Turns out the spell calls iceshard. Does anyone see where it shows that?
You should have something like that in your fight.c file. If the target has an iceshield, and is hit, the reflected damage is done by the iceshard spell with the above code.
While a bunch of the spells are coded into the system, not all of them are. Many of the spells are just spell_smaug rather than spell_<coded spell name>.
Hard-coded spells are the least of your worries, I've found. It seems that almost everything is hard-coded. There can be lots of little problems that crop up because of that in lots of unexpected places in the code. This is a good example of one of them.
Nah, that's what I mean, a bunch of them are not hard-coded, even effects, they're entirely editable/creatable online using the sset and slookup commands with the help category of smaugspells... on the other hand, yes, this one is hard-coded and is just one of the many things that are hard-coded and can give you all sorts of headaches along the way. But it's not as bad as some would have you believe either.
I wasn't talking about skills and spells. I was talking about all the hard-coded, hidden dependencies in SMAUG. This iceshard thing is an example of a hidden, hard-coded dependency, but there are many more. It's to be expected; the codebase grew from accretion and it seems that nobody ever took the time to go in and clean up the house.