On Fri, 26 Jan 2001, Andrej Kacian wrote: > generic 'You lost your concentration' message and move handling of > success/failure into spell body.. I am curious as to why you would like this? Then you'll have a "Check if you fail the spell" for each spell, would be rather inefficient, of course the call could just be made to look something like this: // MAILERODE int fail_skill(struct char_data * ch, int skill) { if (((GET_WIS(ch)*4 + GET_INT(ch))*4 /2 ) < Number(1, 101)) { return FALSE; // Here you can insert even more conditions if you like.. // ie // } else if (GET_SKILL(ch, skill) < number(1,101)) { // return FALSE; } else { return TRUE; } } Then call it from the skill/spell you wish to call it from: if (fail_skill(ch, spell)) { // Do whatever you want to do here return; } But what about spells that aren't manual? mag_damage, mag_area, mag_group etc type spells? (Perhaps I missed something in the thread :). /S -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/03/01 PST