Welcome to the Builder Academy

Question Spell heroes feast

More
03 Sep 2017 18:50 #6856 by thomas
Replied by thomas on topic Spell heroes feast

Jan wrote: Here is what iwe done...what is then missing sense you say the code isnt called ?

Code:
TAR_CHAR_ROOM, FALSE, MAG_POINTS,

Here, you're telling the magic system that the spell needs to use the mag_points subfunction.

This would have been alright, had you added the code to the mag_points function instead of making a new one.
However, in this case you need to use MAG_MANUAL instead (since you've "manual"-ly implemented the functionality) and to add the spell definition around line 270 in spell_assign.c:
Code:
if (IS_SET(SINFO.routines, MAG_MANUAL)) switch (spellnum) { case SPELL_CHARM: MANUAL_SPELL(spell_charm); break; case SPELL_CREATE_WATER: MANUAL_SPELL(spell_create_water); break; case SPELL_DETECT_POISON: MANUAL_SPELL(spell_detect_poison); break; case SPELL_ENCHANT_WEAPON: MANUAL_SPELL(spell_enchant_weapon); break; case SPELL_IDENTIFY: MANUAL_SPELL(spell_identify); break; case SPELL_LOCATE_OBJECT: MANUAL_SPELL(spell_locate_object); break; case SPELL_SUMMON: MANUAL_SPELL(spell_summon); break; case SPELL_WORD_OF_RECALL: MANUAL_SPELL(spell_recall); break; case SPELL_TELEPORT: MANUAL_SPELL(spell_teleport); break; + case SPELL_HEROES_FEAST: MANUAL_SPELL(spell_heroes_feast);break; }
MANUAL_SPELL is a macro that calls the named function.

Please Log in or Create an account to join the conversation.

More
03 Sep 2017 19:17 #6858 by JTP
Replied by JTP on topic Spell heroes feast
That did it.. Now its working. Thanks alot.

Please Log in or Create an account to join the conversation.

Time to create page: 0.351 seconds