/*** New KNOW ALIGNMENT spell for CircleMUD 3.0 bpl17 **** **** Written By Russell Brown aka Walker of Mosaic **** russelltbrown@netzero.net **** Mosaic: The Art of Fantasy bb10.betterbox.net 8000 ****/ This is a new know alignment spell that I wrote for wizards on Mosaic. I reserve detect alignment for priests, so I made this alternative for wizards. You cast the spell on a creature to learn its alignment. The upside is that it can also be cast on objects to learn if they are antigood, antievil or any combination thereof. Just make the following changes to implement the spell. ****in spell_parser.c add this in with the other spello calls: spello(SPELL_KNOW_ALIGN, "know alignment", 20, 10, 2, POS_STANDING, TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM | TAR_OBJ_EQUIP, FALSE, MAG_MANUAL); find the switch statement with MANUAL_SPELL calls and add: case SPELL_KNOW_ALIGN: MANUAL_SPELL(spell_know_align); break; ****in spells.h dont forget to: #define SPELL_KNOW_ALIGN and near the end with the other ASPELL declarations: ASPELL(spell_know_align); ****in spells.c add this function: ASPELL(spell_know_align) { if ((victim == NULL) && (obj == NULL)) return; if (victim) { if IS_EVIL(victim) { if (GET_ALIGNMENT(victim) <= -800) act("$N is evil incarnate!", FALSE, ch, 0, victim, TO_CHAR); else act("$N is evil!", FALSE, ch, 0, victim, TO_CHAR); } else if IS_GOOD(victim) { if (GET_ALIGNMENT(victim) >= 800) act("$N is the personification of goodness!", FALSE, ch, 0, victim, TO_CHAR); else act("$N is good!", FALSE, ch, 0, victim, TO_CHAR); } else /* must be neutral */ act("$N is neutral!", FALSE, ch, 0, victim, TO_CHAR); } if (obj) { if (OBJ_FLAGGED(obj, ITEM_ANTI_EVIL) && OBJ_FLAGGED(obj, ITEM_ANTI_NEUTRAL) && OBJ_FLAGGED(obj, ITEM_ANTI_GOOD)) act("$p is mis-flagged, please report with BUG command!", FALSE, ch, obj, 0, TO_CHAR); else if (OBJ_FLAGGED(obj, ITEM_ANTI_EVIL) && OBJ_FLAGGED(obj, ITEM_ANTI_NEUTRAL)) act("$p is strictly good!", FALSE, ch, obj, 0, TO_CHAR); else if (OBJ_FLAGGED(obj, ITEM_ANTI_GOOD) && OBJ_FLAGGED(obj, ITEM_ANTI_NEUTRAL)) act("$p is strictly evil!", FALSE, ch, obj, 0, TO_CHAR); else if (OBJ_FLAGGED(obj, ITEM_ANTI_GOOD) && OBJ_FLAGGED(obj, ITEM_ANTI_EVIL)) act("$p is strictly neutral!", FALSE, ch, obj, 0, TO_CHAR); else if (OBJ_FLAGGED(obj, ITEM_ANTI_EVIL)) act("$p is anti-evil!", FALSE, ch, obj, 0, TO_CHAR); else if (OBJ_FLAGGED(obj, ITEM_ANTI_GOOD)) act("$p is anti-good!", FALSE, ch, obj, 0, TO_CHAR); else if (OBJ_FLAGGED(obj, ITEM_ANTI_NEUTRAL)) act("$p is anti-neutral!", FALSE, ch, obj, 0, TO_CHAR); else act("$p has no alignment!", FALSE, ch, obj, 0, TO_CHAR); } }