
Pages:<< prev 1 next >>



Apprentice

GroupMembers
Posts57
JoinedNov 24, 2016
I think I might have found a bug. Only affects non code spell_smaug spells.
obj_cast_spell ignores obj->value[0] when it goes to hard coded spell that has level set.
For instance af.level = ch->level in a hard coded spell
I have the spell fly coded to af.level = ch->level so if a object has fly spell as brandish.
Instead of looking for obj->value[0] for spell level the builder sets it too, it goes right to spell_fly af.level
Anyway, maybe not a bug anyone else still has, but I have it.
obj_cast_spell ignores obj->value[0] when it goes to hard coded spell that has level set.
For instance af.level = ch->level in a hard coded spell
I have the spell fly coded to af.level = ch->level so if a object has fly spell as brandish.
Instead of looking for obj->value[0] for spell level the builder sets it too, it goes right to spell_fly af.level
Anyway, maybe not a bug anyone else still has, but I have it.


Apprentice

GroupMembers
Posts57
JoinedNov 24, 2016
Maybe this is a old bug that Druid fixed years ago, but I think smaugfuss has same function.
I think the way to fix it, is to use skill_lookup function like spec fun stuff does instead of return retcode that obj_cast_spell currently does. Than you could still change the level to obj->value[0].
Prob could still retcode return if skill->type smaug_spell
I think the way to fix it, is to use skill_lookup function like spec fun stuff does instead of return retcode that obj_cast_spell currently does. Than you could still change the level to obj->value[0].
Prob could still retcode return if skill->type smaug_spell


Apprentice

GroupMembers
Posts57
JoinedNov 24, 2016
Well I tried putting this in place in obj_cast_spell function and found it will cast the spell but still goes by the hard coded spell level and not obj->value[0] that the builder sets a wand or staff to be brandished too.
if ( skill->spell_fun != spell_smaug && obj ) { if((sn = skill_lookup(skill->name)) < 0) return 0; (*skill_table[sn]->spell_fun) (sn, obj->value[0], ch, vo); return 0; } else retcode = (*skill->spell_fun) (sn, level, ch, vo);



Conjurer

GroupMembers
Posts428
JoinedMar 7, 2005
Would you want to address this in things like do_brandish( ) and do_zap( ) rather than in obj_cast_spell( )?
What do yours currently look like where they call obj_cast_spell( )?
What do yours currently look like where they call obj_cast_spell( )?
Pages:<< prev 1 next >>