Killingsworth@PCIS.NET wrote: > > > > > One of my builders gave me an idea for a few things one is > > artifacts or weapons that when wielded and say your fighting and your > > artifact weapon is the sword of flames that sword would cast like > > fireball but wouldn't cost the wielder and mana. > > > > The other idea is for a spell fireshield when cast and durring a > > fight the fireshield would cat fireball or some other firespell but cost > > no mana to the person who the shield was cast on. > > > > Thanx, > > Demond > > > OK, here it is. in perform_violence (fight.c) add: if (GET_EQ(ch, WEAR_WIELD) != NULL) { obj = GET_EQ(ch, WEAR_WIELD); if (obj_index[GET_OBJ_RNUM(obj)].func != NULL) (obj_index[GET_OBJ_RNUM(obj)].func) (ch, ch, 0,""); } That will call the spec_procs you have written. the spec_proc may go something like this. SPECIAL(sword_fire) { struct char_data *vict; struct obj_data *obj; if ( cmd ) return ( FALSE ); if ( !ch ) return ( FALSE ); if ( ch->equipment[ WEAR_WIELD ]->item_number == real_object( # ) ) replace with vnum ^ obj = GET_EQ( WEAR_WIELD ); else return ( FALSE); vict = FIGHTING( ch ); if ( !vict ) return ( FALSE ); /* here is where the spec comes in */ if (number(0, 2) == 2) { act("Your $p glows as it spits out flames!!", TRUE, ch, obj, 0, TO_CHAR); act("$n's $p glows as it spits out flames!!", TRUE, ch, obj, 0, TO_ROOM); call_magic(ch, FIGHTING(ch), 0, SPELL_FIREBALL, GET_LEVEL(ch), CAST_SPELL); return ( TRUE ); } else return ( FALSE ); } This is mailer code, although I think it should work. As far as fireshield is concerned, put a call in hit() to check if the victim is affected and then take off the damage, rather than going thru the spell process +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST