/********************************************************************************************************** * * * * wolf.c by Spiralsoft (Dan Mendek) all rights reserved * copyright Lurking Fear.. Not to be used anywhere else * use anywhere else will will cause me to violate your * civils rights and find you and Kill you. * Have a nice day. * * *************************************************************************************************************/ #include <glib.h> #if defined(macintosh) #include <types.h> #else #include <sys/types.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <merc.h> #include <interp.h> #include <player.h> #include <tables.h> #include <fight.h> #include <power.h> #include <recycle.h> // Werewolf notes.... /* * Renown = hours (base on vamp age) and temp renown. */ void get_obj args( ( CHAR_DATA *ch, OBJ_DATA *obj, OBJ_DATA *container ) ); char *get_shape_name( CHAR_DATA *ch ) { static char buf[MAX_STRING_LENGTH]; switch (ch->pcdata->wwf_shape) { case SHAPE_CRINOS: str_cpy(buf,"crinos"); return buf; case SHAPE_HISPO: str_cpy(buf,"hispo"); return buf; case SHAPE_HOMID: str_cpy(buf,"homid"); return buf; case SHAPE_GLABRO: str_cpy(buf,"glabro"); return buf; case SHAPE_LUPUS: str_cpy(buf,"lupus"); return buf; default: str_cpy(buf, "ERROR IN SHAPE Note Spiral or Dominion for support"); return buf; } str_cpy(buf, ""); return buf; } void retract_extra ( CHAR_DATA *ch ) { ch->morph = g_string_assign(ch->morph,""); if (IS_VAMPAFF(ch,VAM_CLAWS)) { send_to_char("Your talons slide back into your fingers.\n\r",ch); act("$n's talons slide back into $s fingers.",ch,NULL,NULL,TO_ROOM); REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_CLAWS); } if (IS_VAMPAFF(ch,VAM_FANGS)) { send_to_char("Your fangs slide back into your mouth.\n\r",ch); act("$n's fangs slide back into $s mouth.",ch,NULL,NULL,TO_ROOM); REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_FANGS); } if (IS_VAMPAFF(ch,VAM_NIGHTSIGHT)) { send_to_char("The red glow in your eyes fades.\n\r",ch); act("The red glow in $n's eyes fades.",ch,NULL,NULL,TO_ROOM); REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT); } } void extend_extra ( CHAR_DATA *ch ) { if (!IS_VAMPAFF(ch,VAM_NIGHTSIGHT)) { send_to_char("Your eyes start glowing red.\n\r",ch); act("$n's eyes start glowing red.",ch,NULL,NULL,TO_ROOM); SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT); } if (!IS_VAMPAFF(ch,VAM_FANGS)) { send_to_char("A pair of long fangs extend from your mouth.\n\r",ch); act("A pair of long fangs extend from $n's mouth.",ch,NULL,NULL,TO_ROOM); SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_FANGS); } if (!IS_VAMPAFF(ch,VAM_CLAWS)) { send_to_char("Razor sharp talons extend from your fingers.\n\r",ch); act("Razor sharp talons extend from $n's fingers.",ch,NULL,NULL,TO_ROOM); SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_CLAWS); } SET_BIT(ch->affected_by, AFF_POLYMORPH); SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_DISGUISED); } void change_string (CHAR_DATA *ch) { char buf[MAX_STRING_LENGTH]; switch ( ch->pcdata->wwf_shape) { case SHAPE_CRINOS: str_cpy(buf,"a strange beast"); ch->morph = g_string_assign(ch->morph,buf); if (!IS_SET(ch->affected_by,AFF_POLYMORPH)) SET_BIT(ch->affected_by, AFF_POLYMORPH); break; case SHAPE_GLABRO: sprintf(buf,"a strange human"); ch->morph = g_string_assign(ch->morph,buf); if (!IS_SET(ch->affected_by,AFF_POLYMORPH)) SET_BIT(ch->affected_by, AFF_POLYMORPH); break; case SHAPE_HOMID: if (ch->sex == 1) { if (IS_SET(ch->affected_by,AFF_POLYMORPH)) REMOVE_BIT(ch->affected_by, AFF_POLYMORPH); ch->morph = g_string_assign(ch->morph,""); } else { if (IS_SET(ch->affected_by,AFF_POLYMORPH)) REMOVE_BIT(ch->affected_by, AFF_POLYMORPH); ch->morph = g_string_assign(ch->morph,""); } break; case SHAPE_HISPO: sprintf(buf,"a very large wolf"); ch->morph = g_string_assign(ch->morph,buf); if (!IS_SET(ch->affected_by,AFF_POLYMORPH)) SET_BIT(ch->affected_by, AFF_POLYMORPH); break; case SHAPE_LUPUS: sprintf(buf,"a wolf"); ch->morph = g_string_assign(ch->morph,buf); if (!IS_SET(ch->affected_by,AFF_POLYMORPH)) SET_BIT(ch->affected_by, AFF_POLYMORPH); break; } } void wwf_wear( CHAR_DATA *ch, OBJ_DATA *obj) { if ( CAN_WEAR( obj, ITEM_WIELD ) || CAN_WEAR( obj, ITEM_HOLD ) || CAN_WEAR( obj, ITEM_WEAR_SHIELD )) { if (get_eq_char( ch, WEAR_WIELD ) == NULL ) { if (obj->item_type == ITEM_WEAPON) { equip_char( ch, obj, WEAR_WIELD ); return; } equip_char( ch, obj, WEAR_WIELD ); return; } else if (get_eq_char( ch, WEAR_HOLD ) == NULL ) { if (obj->item_type == ITEM_WEAPON) { equip_char( ch, obj, WEAR_HOLD ); return; } equip_char( ch, obj, WEAR_HOLD ); return; } return; } if ( obj->item_type == ITEM_LIGHT ) { equip_char( ch, obj, WEAR_LIGHT ); return; } if ( obj->item_type == ITEM_WWF_CONT ) { equip_char( ch, obj, WEAR_HIDDEN ); return; } if ( CAN_WEAR( obj, ITEM_WEAR_FINGER ) ) { if ( get_eq_char( ch, WEAR_FINGER_L ) == NULL ) { equip_char( ch, obj, WEAR_FINGER_L ); return; } else if ( get_eq_char( ch, WEAR_FINGER_R ) == NULL ) { equip_char( ch, obj, WEAR_FINGER_R ); return; } return; } if ( CAN_WEAR( obj, ITEM_WEAR_NECK ) ) { if ( get_eq_char( ch, WEAR_NECK_1 ) == NULL ) { equip_char( ch, obj, WEAR_NECK_1 ); return; } if ( get_eq_char( ch, WEAR_NECK_2 ) == NULL ) { equip_char( ch, obj, WEAR_NECK_2 ); return; } return; } if ( CAN_WEAR( obj, ITEM_WEAR_BODY ) ) { equip_char( ch, obj, WEAR_BODY ); return; } if ( CAN_WEAR( obj, ITEM_WEAR_HEAD ) ) { equip_char( ch, obj, WEAR_HEAD ); return; } if ( CAN_WEAR( obj, ITEM_WEAR_FACE ) ) { equip_char( ch, obj, WEAR_FACE ); return; } if ( CAN_WEAR( obj, ITEM_WEAR_LEGS ) ) { equip_char( ch, obj, WEAR_LEGS ); return; } if ( CAN_WEAR( obj, ITEM_WEAR_FEET ) ) { equip_char( ch, obj, WEAR_FEET ); return; } if ( CAN_WEAR( obj, ITEM_WEAR_HANDS ) ) { equip_char( ch, obj, WEAR_HANDS ); return; } if ( CAN_WEAR( obj, ITEM_WEAR_ARMS ) ) { equip_char( ch, obj, WEAR_ARMS ); return; } if ( CAN_WEAR( obj, ITEM_WEAR_ABOUT ) ) { equip_char( ch, obj, WEAR_ABOUT ); return; } if ( CAN_WEAR( obj, ITEM_WEAR_WAIST ) ) { equip_char( ch, obj, WEAR_WAIST ); return; } if ( CAN_WEAR( obj, ITEM_WEAR_WRIST ) ) { if ( get_eq_char( ch, WEAR_WRIST_L ) == NULL ) { equip_char( ch, obj, WEAR_WRIST_L ); return; } else if ( get_eq_char( ch, WEAR_WRIST_R ) == NULL ) { equip_char( ch, obj, WEAR_WRIST_R ); return; } return; } if ( CAN_WEAR( obj, ITEM_WEAR_SHIELD ) ) { equip_char( ch, obj, WEAR_SHIELD ); return; } if ( CAN_WEAR( obj, ITEM_WIELD ) ) { equip_char( ch, obj, WEAR_WIELD ); return; } return; } void remaff( OBJ_DATA *obj) { AFFECT_DATA *paf,*paf_next; for ( paf = obj->affected; paf != NULL; paf = paf_next ) { paf_next = paf->next; affect_remove_obj(obj,paf); } return; } void convert_stats( OBJ_DATA *obj, OBJ_DATA *objcont) { AFFECT_DATA *paf; int sn; for ( paf = obj->affected; paf != NULL; paf = paf->next ) { if ( paf->bitvector != 1 && obj->value[0] != 5) affect_to_obj(objcont,paf); } if (obj->item_type == ITEM_ARMOR) sn = obj->value[3]; else sn = obj->value[0] / 1000; if (sn == 4) SET_BIT(objcont->value[0], AFF_BLIND); if (sn == 39) SET_BIT(objcont->value[0], AFF_FLYING); if (sn == 46) SET_BIT(objcont->value[0], AFF_INVISIBLE); if (sn == 52) SET_BIT(objcont->value[0], AFF_PASS_DOOR); if (sn == 54) SET_BIT(objcont->value[0], AFF_PROTECT); if (sn == 57) SET_BIT(objcont->value[0], AFF_SANCTUARY); if (sn == 3 ) SET_BIT(objcont->value[0], AFF_FLYING); if (sn == 5 ) SET_BIT(objcont->value[0], AFF_INVISIBLE); if (sn == 6 ) SET_BIT(objcont->value[0], AFF_PASS_DOOR); if (sn == 7 ) SET_BIT(objcont->value[0], AFF_PROTECT); if (sn == 8 ) SET_BIT(objcont->value[0], AFF_SANCTUARY); if (sn == 9 ) SET_BIT(objcont->value[0], AFF_SNEAK); if (sn == 10) SET_BIT(objcont->value[1], ITEMA_SHOCKSHIELD); if (sn == 11) SET_BIT(objcont->value[1], ITEMA_FIRESHIELD); if (sn == 12) SET_BIT(objcont->value[1], ITEMA_ICESHIELD); if (sn == 13) SET_BIT(objcont->value[1], ITEMA_ACIDSHIELD); if (sn == 14) SET_BIT(objcont->value[1], ITEMA_DBPASS); if (sn == 15) SET_BIT(objcont->value[1], ITEMA_CHAOSSHIELD); if (sn == 16) SET_BIT(objcont->value[1], ITEMA_REGENERATE); if (sn == 17) SET_BIT(objcont->value[1], ITEMA_SPEED); if (sn == 18) SET_BIT(objcont->value[1], ITEMA_VORPAL); if (sn == 19) SET_BIT(objcont->value[1], ITEMA_PEACE); if (sn == 20) SET_BIT(objcont->value[1], ITEMA_REFLECT); if (sn == 21) SET_BIT(objcont->value[1], ITEMA_RESISTANCE); if (sn == 22) SET_BIT(objcont->value[1], ITEMA_VISION); if (sn == 23) SET_BIT(objcont->value[1], ITEMA_STALKER); if (sn == 24) SET_BIT(objcont->value[1], ITEMA_VANISH); if (sn == 25) SET_BIT(objcont->value[1], ITEMA_RAGER); if (sn == 66) SET_BIT(objcont->value[1], ITEMA_FORTITUDE); } void shape_shift( CHAR_DATA *ch, int change) { OBJ_DATA *obj,*obj_con,*obj_next; if (ch->pcdata->wwf_shape == change) return; switch (ch->pcdata->wwf_shape) { case SHAPE_HOMID: /* put sprintf here on description of transformation */ send_to_char("You howl as your body starts to change.\n\r",ch); send_to_char("Your hair starts to grow longer then it usally is.\n\r",ch); send_to_char("You feel your body grow with a surge of power!.\n\r",ch); act("$n grins as thier body grow with a surge of power!",ch,NULL,NULL,TO_ROOM); extend_extra(ch); break; case SHAPE_GLABRO: send_to_char("You howl as your body starts to change.\n\r",ch); if ( change == SHAPE_HOMID ) { send_to_char("Your body returns to normal weight.\n\r",ch); act("$n's body returns to normal weight.",ch,NULL,NULL,TO_ROOM); retract_extra(ch); } else { send_to_char("You feel your body grow with a surge of power!\n\r",ch); act("$n grins as thier body grow with a surge of power!",ch,NULL,NULL,TO_ROOM); } /* put sprintf here on description of transformation */ break; case SHAPE_CRINOS: if ( change == SHAPE_HISPO ) { send_to_char("You scream with rage as your body hunches over into the form of a wolf.\n\r",ch); act("$n screams with rage as thier body hunches over into the form of a wolf.",ch,NULL,NULL,TO_ROOM); } else { send_to_char("Your body weight and size starts to shrink.\n\r",ch); act("$n's body weight and size starts to shrink.",ch,NULL,NULL,TO_ROOM); } /* put sprintf here on description of transformation */ break; case SHAPE_HISPO: if ( change == SHAPE_CRINOS ) { send_to_char("You feel your body grow with a surge of power!\n\r",ch); act("$n's body grows past 6 feet tall as you watch in horror to a transformation in to a walking beast!",ch,NULL,NULL,TO_ROOM); extend_extra(ch); } else { send_to_char("You body shrinks to that of a normal wolf.\n\r",ch); act("$n's body shrinks to that of a normal wolf.",ch,NULL,NULL,TO_ROOM); retract_extra(ch); } /* put sprintf here on description of transformation */ break; case SHAPE_LUPUS: /* put sprintf here on description of transformation */ send_to_char("Your body mass grows to the size of a large wolf.\n\r",ch); act("$n's body mass grows to the size of a large wolf",ch,NULL,NULL,TO_ROOM); break; } /* success! transform them in to what they want */ if (change == SHAPE_CRINOS || change == SHAPE_HISPO || change == SHAPE_LUPUS) { //Create the Container if ((obj_con = get_eq_char(ch,WEAR_HIDDEN)) == NULL ) { //send_to_char("Bug, container should be there.\n\r",ch); obj_con = create_object(get_obj_index(OBJ_VNUM_FEARBAG),ch->level); obj_con->item_type = ITEM_WWF_CONT; obj_to_char(obj_con,ch); wwf_wear(ch,obj_con); } unequip_char(ch,obj_con); if ((obj = get_eq_char(ch,WEAR_LIGHT)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT)) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_FINGER_L)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT)) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_FINGER_R)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT) ) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_NECK_1)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT)) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_NECK_2)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT)) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_BODY)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT)) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_HEAD)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT) ) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_LEGS)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT) ) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_FEET)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT)) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_SHIELD)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT)) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_HANDS)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT) ) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_ARMS)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT) ) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_ABOUT)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT) ) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_WAIST)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT)) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_WIELD)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT)) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_HOLD)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT)) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_WRIST_L)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT) ) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_WRIST_R)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT) ) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_FACE)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT)) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_SCABBARD_L)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT)) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_SCABBARD_R)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT)) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } //wear the eq.. wwf_wear(ch,obj_con); } if (change == SHAPE_HOMID) { //Give back all thier eq.. if ((obj_con = get_eq_char(ch,WEAR_HIDDEN)) != NULL ) { unequip_char(ch,obj_con); for (obj = obj_con->contains; obj != NULL; obj = obj_next) { obj_next = obj->next_content; if (obj->item_type == ITEM_WWF_CONT) continue; obj_from_obj(obj); remaff(obj_con); obj_to_char(obj,ch); wwf_wear(ch,obj); } obj_from_char(obj_con); extract_obj(obj_con); } retract_extra(ch); } if (change == SHAPE_GLABRO) { if ((obj_con = get_eq_char(ch,WEAR_HIDDEN)) == NULL ) { obj_con = create_object(get_obj_index(OBJ_VNUM_FEARBAG),ch->level); obj_con->item_type = ITEM_WWF_CONT; obj_to_char(obj_con,ch); wwf_wear(ch,obj_con); } else { //remove_obj(ch,WEAR_HIDDEN,TRUE); //Get all the eq OUT!! //DEVON!! GET THE TABLES!!!! for (obj = obj_con->contains; obj != NULL; obj = obj_next) { obj_next = obj->next_content; unequip_char(ch,obj_con); if (obj->item_type == ITEM_WWF_CONT) continue; if (obj->wear_loc == WEAR_HOLD || obj->wear_loc == WEAR_WIELD) continue; obj_from_obj(obj); obj_to_char(obj,ch); remaff(obj_con); wwf_wear(ch,obj); wwf_wear(ch,obj_con); //wear_obj(ch,obj,TRUE); } } unequip_char(ch,obj_con); if ((obj = get_eq_char(ch,WEAR_WIELD)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT) ) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } if ((obj = get_eq_char(ch,WEAR_HOLD)) != NULL && !IS_SET(obj->quest, QUEST_ARTIFACT) ) { unequip_char( ch, obj ); obj_from_char(obj); convert_stats(obj,obj_con); obj_to_obj(obj, obj_con); } wwf_wear(ch,obj_con); } ch->pcdata->wwf_shape = change; change_string(ch); ch->pcdata->rage_points--; } void do_shapeshift( CHAR_DATA *ch, char *argument ) { char arg[MAX_STRING_LENGTH]; //char buf[MAX_STRING_LENGTH]; sh_int change = 0; argument = one_argument(argument,arg); if (IS_NPC(ch)) { do_say(ch,"Yea right buddie, like i'm a werewolf"); return; } if (!IS_CLASS(ch,CLASS_SWWF)) { send_to_char("huh?\n\r",ch); return; } if ( arg[0] == '\0' ) { send_to_char( "Forms: homid, glabro, crinos, hispo, lupus.\n\r", ch ); return; } if (!strcmp(arg,"homid")) change = SHAPE_HOMID; if (!strcmp(arg,"glabro")) change = SHAPE_GLABRO; if (!strcmp(arg,"crinos")) change = SHAPE_CRINOS; if (!strcmp(arg,"hispo")) change = SHAPE_HISPO; if (!strcmp(arg,"lupus")) change = SHAPE_LUPUS; /* find out what current shape they are in and if they can transform */ if ( ch->pcdata->rage_points <= 0 ) { send_to_char("You must have a bit of rage to perform this feat.\n\r",ch); return; } if (number_percent() < 25 && ch->pcdata->gnosis < number_range(1,20)) { send_to_char("Your rage has taken over your mind, not allowing you to concentrait.\n\r",ch); return; } switch (ch->pcdata->wwf_shape) { case SHAPE_HOMID: if ( change != SHAPE_GLABRO ) { send_to_char("You can only change in to glabro form from homid.\n\r",ch); return; } break; case SHAPE_GLABRO: if ( change != SHAPE_HOMID && change != SHAPE_CRINOS ) { send_to_char("Homid and Crinos are only availble in this form.\n\r",ch); return; } break; case SHAPE_CRINOS: if ( change != SHAPE_GLABRO && change != SHAPE_HISPO ) { send_to_char("Glabro and Hispo are only availble in this form.\n\r",ch); return; } break; case SHAPE_HISPO: if ( change != SHAPE_CRINOS && change != SHAPE_LUPUS ) { send_to_char("Crinos and Lupus are only availble in this form.\n\r",ch); return; } break; case SHAPE_LUPUS: if ( change != SHAPE_HISPO ) { send_to_char("You can only change in to hispo form from lupus.\n\r",ch); return; } /* put sprintf here on description of transformation */ break; } shape_shift(ch,change); } sh_int get_renown( CHAR_DATA *ch ) { sh_int l_table; switch (ch->pcdata->sgift[2]) { case AUSPICE_RAGABASH: for (l_table = 0; l_table < 6;l_table++) { if (ch->pcdata->renown[RENOWN_HONOR] >= ragabash_table[l_table].honor && ch->pcdata->renown[RENOWN_GLORY] >= ragabash_table[l_table].glory && ch->pcdata->renown[RENOWN_WISDOM] >= ragabash_table[l_table].wisdom) continue; return l_table -1; } return 5; break; case AUSPICE_THEURGE: for (l_table = 0; l_table < 6;l_table++) { if (ch->pcdata->renown[RENOWN_HONOR] >= theurge_table[l_table].honor && ch->pcdata->renown[RENOWN_GLORY] >= theurge_table[l_table].glory && ch->pcdata->renown[RENOWN_WISDOM] >= theurge_table[l_table].wisdom) continue; return l_table -1; } return 5; break; case AUSPICE_PHILODOX: for (l_table = 0; l_table < 6;l_table++) { if (ch->pcdata->renown[RENOWN_HONOR] >= philodox_table[l_table].honor && ch->pcdata->renown[RENOWN_GLORY] >= philodox_table[l_table].glory && ch->pcdata->renown[RENOWN_WISDOM] >= philodox_table[l_table].wisdom) continue; return l_table -1; } return 5; break; case AUSPICE_GALLIARD: for (l_table = 0; l_table < 6;l_table++) { if (ch->pcdata->renown[RENOWN_HONOR] >= galliard_table[l_table].honor && ch->pcdata->renown[RENOWN_GLORY] >= galliard_table[l_table].glory && ch->pcdata->renown[RENOWN_WISDOM] >= galliard_table[l_table].wisdom) continue; return l_table -1; } return 5; break; case AUSPICE_AHROUN: for (l_table = 0; l_table < 6;l_table++) { if (ch->pcdata->renown[RENOWN_HONOR] >= ahroun_table[l_table].honor && ch->pcdata->renown[RENOWN_GLORY] >= ahroun_table[l_table].glory && ch->pcdata->renown[RENOWN_WISDOM] >= ahroun_table[l_table].wisdom) continue; return l_table -1; } return 5; break; } return 1; } /* ** get_max_rage * * FILENAME: C:\LURF\CODE\wolf.c * * PARAMETERS: CHAR_DATA *ch * * DESCRIPTION: this function finds out our max rage for a player. Rage depends on how * much you play lurf = vampire age. * * RETURNS: 100-500 rage points are max rage. * */ int get_max_rage( CHAR_DATA *ch ) { int ch_age = (get_age(ch) - 17) * 2; /* hours calculation */ int RAGE; if (ch_age >= 1500 && get_renown(ch) >= 4) RAGE = 500; else if (ch_age >= 800 && get_renown(ch) >= 3) RAGE = 400; else if (ch_age >= 400 && get_renown(ch) >= 2) RAGE = 300; else if (ch_age >= 200 && get_renown(ch) >= 1) RAGE = 200; else RAGE = 100; if (IS_ITEMAFF(ch,ITEMA_RAGER)) { RAGE += 100; } return RAGE; } char *get_renown_rankname( int rank ){ switch (rank){ case 0: return "Renown Lacking"; break; case 1: return "Cliath"; break; case 2: return "Fostern"; break; case 3: return "Adren"; break; case 4: return "Athro"; break; case 5: return "Elder"; break; default: return "Renown is broke on you!"; break; } } /* * Show the status of the garou in question * */ void do_garou_status ( CHAR_DATA *ch, char *argument ) { char arg[MAX_STRING_LENGTH]; char buf[MAX_STRING_LENGTH]; CHAR_DATA *vch; argument = one_argument(argument,arg); if (!IS_CLASS(ch,CLASS_SWWF) && !IS_IMMORTAL(ch)) { send_to_char("huh?\n\r",ch); return; } if ( arg[0] == '\0' || !IS_IMMORTAL(ch) ) vch = ch; else if ( (vch = get_char_world(ch,arg)) == NULL ) { send_to_char("Get a garoustat on who?\n\r", ch); return; } if (!IS_CLASS(vch,CLASS_SWWF)) { send_to_char("Your victim is not Garou!\n\r",ch); return; } send_to_char("\n\r",ch); sprintf(buf,"%s%s\n\r",vch->name->str,vch->pcdata->title->str); send_to_char(buf,ch); send_to_char("--------------------------------------------------------------------------------\n\r",ch); sprintf(buf,"{RRenown: {W [{C%2d {W] [{C%4s{W] ( {RHonor: {W[{C%2d {W] {RGlory: {W[{C%2d {W] {RWisdom: {W[{C%2d {W]{w ){x\n\r", get_renown(vch), get_renown_rankname(get_renown(vch)), vch->pcdata->renown[RENOWN_HONOR], vch->pcdata->renown[RENOWN_GLORY], vch->pcdata->renown[RENOWN_WISDOM]); send_to_char(buf,ch); sprintf(buf,"{RTemporay: {W( {RHonor: {W[{C%2d {W] {RGlory: {W[{C%2d {W] {RWisdom: {W[{C%2d {W]{w ){x\n\r", vch->pcdata->Trenown[TRENOWN_HONOR], vch->pcdata->Trenown[TRENOWN_GLORY], vch->pcdata->Trenown[TRENOWN_WISDOM]); send_to_char(buf,ch); sprintf(buf,"{RRage Points {W[{C%3d{W] {RGnosis {W[{C%2d{W]{x\n\r", vch->pcdata->rage_points, vch->pcdata->gnosis); send_to_char(buf,ch); sprintf(buf,"{RForm: {W[{C%s{W] {RTribe {W[{C%s{W]{x\n\r", get_shape_name(vch),iclan_table[vch->clan].pretty_name); send_to_char(buf,ch); sprintf(buf,"{RBreed: {W[{C%s{W] {RAuspice {W[{C%s{W]{x\n\r", breed_table[vch->pcdata->sgift[1]].haunt, auspice_table[vch->pcdata->sgift[2]].haunt); send_to_char(buf,ch); send_to_char("--------------------------------------------------------------------------------\n\r",ch); } /* update only for the very special wwf */ void update_wwf () { CHAR_DATA *wch,*wch_next; int rage_gain = 1; int rage_loss = 1; for ( wch = char_list; wch != NULL; wch = wch_next ) { wch_next = wch->next; //check for linky dead people if (!IS_NPC(wch) && wch->desc == NULL) continue; if (IS_NPC(wch)) continue; if (!IS_CLASS(wch,CLASS_SWWF)) continue; if (!IS_AVATAR(wch)) continue; if (IS_IMMORTAL(wch)) continue; if (IS_SET(wch->added, ADDED_FRENZY) && wch->fighting == NULL) REMOVE_BIT(wch->added, ADDED_FRENZY); //Wwf mana regen if (wch->mana < wch->max_mana) wch->mana += number_range(1,(int)((double)wch->max_mana * .1)); //Wwf heal.. Book says one rank per turn.. turn = (Ummmm) if (wch->hit < wch->max_hit) { if (wch->fighting != NULL || IS_AFFECTED(wch,AFF_AGGDAM)) wch->hit += (int)((double)wch->max_hit * .05); else wch->hit += (int)((double)wch->max_hit * .1); update_pos(wch); } spell_clot(skill_lookup("clot"), AUTO_REGEN, wch, wch); spell_mend(skill_lookup("mend"), AUTO_REGEN, wch, wch); if (wch->loc_hp[6] > 0) { int sn = skill_lookup( "clot" ); (*skill_table[sn].spell_fun) (sn,wch->level,wch,wch); } else { if ((wch->loc_hp[0] + wch->loc_hp[1] + wch->loc_hp[2] + wch->loc_hp[3] + wch->loc_hp[4] + wch->loc_hp[5]) != 0) reg_mend(wch); } //Check for freenzy... if ( wch->pcdata->rage_points > (int)((double)get_max_rage(wch) * .75 )) { if ( wch->fighting != NULL && wch->pcdata->willpower < number_range(1,20) && wch->pcdata->gnosis < number_range(1,20)) { //enter the FRENZY!!! send_to_char("You start to howl as your world turns {RRED{x\n\r",wch); //if not crinos make it so... if ( wch->pcdata->wwf_shape != SHAPE_CRINOS ) { shape_shift(wch,SHAPE_CRINOS); } SET_BIT(wch->added, ADDED_FRENZY); //fight or flight... if (number_percent() < 50) wch->pcdata->frenzy_action = FRENZY_FIGHT; else wch->pcdata->frenzy_action = FRENZY_FLIGHT; } } if (time_info.hour < 6 || time_info.hour > 18) { switch (weather_info[wch->in_room->sector_type].moon) { default: rage_gain = 1; break; case MOON_FULL: switch (wch->pcdata->sgift[2]) { case AUSPICE_RAGABASH: rage_gain = 13; break; case AUSPICE_THEURGE: rage_gain = 20; break; case AUSPICE_PHILODOX: rage_gain = 13; break; case AUSPICE_GALLIARD: rage_gain = 20; break; case AUSPICE_AHROUN: rage_gain = 40; break; } break; case MOON_NEW: switch (wch->pcdata->sgift[2]) { case AUSPICE_RAGABASH: rage_gain = 50; break; case AUSPICE_THEURGE: rage_gain = 13; break; case AUSPICE_PHILODOX: rage_gain = 13; break; case AUSPICE_GALLIARD: rage_gain = 20; break; case AUSPICE_AHROUN: rage_gain = 20; break; } break; case MOON_1_QUART: switch (wch->pcdata->sgift[2]) { case AUSPICE_RAGABASH: rage_gain = 13; break; case AUSPICE_THEURGE: rage_gain = 40; break; case AUSPICE_PHILODOX: rage_gain = 13; break; case AUSPICE_GALLIARD: rage_gain = 13; break; case AUSPICE_AHROUN: rage_gain = 20; break; } break; case MOON_LAST_QUART: switch (wch->pcdata->sgift[2]) { case AUSPICE_RAGABASH: rage_gain = 20; break; case AUSPICE_THEURGE: rage_gain = 15; break; case AUSPICE_PHILODOX: rage_gain = 20; break; case AUSPICE_GALLIARD: rage_gain = 40; break; case AUSPICE_AHROUN: rage_gain = 20; break; } break; case MOON_HALF: switch (wch->pcdata->sgift[2]) { case AUSPICE_RAGABASH: rage_gain = 13; break; case AUSPICE_THEURGE: rage_gain = 20; break; case AUSPICE_PHILODOX: rage_gain = 40; break; case AUSPICE_GALLIARD: rage_gain = 20; break; case AUSPICE_AHROUN: rage_gain = 13; break; } break; } if (wch->pcdata->rage_points < get_max_rage(wch) ) { wch->pcdata->rage_points += (rage_gain * 2); } } if ( wch->position == POS_FIGHTING && wch->fighting != NULL ) { if (IS_ADDED(wch,ADDED_FRENZY) && wch->pcdata->frenzy_action == FRENZY_FLIGHT) do_flee(wch,""); if (wch->pcdata->rage_points < get_max_rage(wch) ) { wch->pcdata->rage_points += number_range(10,35); } } //Garou Upkeep rage_loss = 1; if (IS_SET(wch->act,PLR_WIZINVIS ) ) rage_loss += 5; if (IS_VAMPAFF(wch,VAM_CLAWS) ) rage_loss += number_range(1,3); if (wch->pcdata->wwf_shape == SHAPE_CRINOS && wch->pcdata->sgift[1] != BREED_METIS) rage_loss += 5; if (wch->pcdata->wwf_shape == SHAPE_GLABRO) rage_loss += 3; if (IS_SET(wch->pcdata->comm,COMM_MIND_BLOCK)) rage_loss += 40; if (wch->pcdata->wwf_shape == SHAPE_HISPO) rage_loss += 3; if (IS_ADDED(wch,ADDED_BRISTLES) ) rage_loss += number_range(1,3); if (IS_AFFECTED(wch, AFF_HIDE)) rage_loss += number_range(1,5); if (IS_ITEMAFF(wch,ITEMA_SUNSHIELD) ) rage_loss += number_range(1,7); if (IS_ADDED(wch,ADDED_ANIMAL_MASTER) ) rage_loss += number_range(1,5); if ( ( ( wch->hit - wch->pcdata->absorb[ABS_MOB_HP] ) < 1 ) || ( ( wch->max_hit - wch->pcdata->absorb[ABS_MOB_MAX_HP]) < 1 ) ) rage_loss += number_range(5,15); if (IS_ADDED(wch,ADDED_HAND_FLAME) ) rage_loss += number_range(1,5); wch->pcdata->rage_points -= rage_loss; if (wch->pcdata->rage_points < 0) { if (IS_SET(wch->act,PLR_WIZINVIS ) ) power_blur(wch,wch,""); if (IS_VAMPAFF(wch,VAM_CLAWS) ) power_claws(wch,wch,""); if (IS_ADDED(wch,ADDED_BRISTLES) ) power_porcupine( wch,wch, "" ); if (IS_AFFECTED(wch, AFF_HIDE)) REMOVE_BIT(wch->affected_by, AFF_HIDE); if (IS_ITEMAFF(wch,ITEMA_SUNSHIELD) ) power_halosun(wch,wch,""); if (IS_ADDED(wch,ADDED_ANIMAL_MASTER) ) power_animal(wch,wch,""); if ( ( ( wch->hit - wch->pcdata->absorb[ABS_MOB_HP] ) < 1 ) || ( ( wch->max_hit - wch->pcdata->absorb[ABS_MOB_MAX_HP]) < 1 ) ) power_fleshbond( wch,wch,""); if (IS_ADDED(wch,ADDED_HAND_FLAME) ) power_hand(wch,wch,""); wch->pcdata->rage_points = 0; } if (wch->pcdata->rage_points > get_max_rage(wch)) wch->pcdata->rage_points = get_max_rage(wch); if (wch->hit > wch->max_hit) wch->hit = wch->max_hit; // Okies if there under a percent of rage.. then change them... if ((wch->pcdata->rage_points * 100 / get_max_rage(wch)) < 5) { //Breed form.. chbreed_form(wch,""); } else if ((wch->pcdata->rage_points * 100 / get_max_rage(wch)) < 15 ) { switch (wch->pcdata->sgift[1]) { case BREED_HOMID: if ( wch->pcdata->wwf_shape != SHAPE_GLABRO) { shape_shift(wch,SHAPE_GLABRO); } break; case BREED_LUPUS: if ( wch->pcdata->wwf_shape != SHAPE_HISPO) { shape_shift(wch,SHAPE_GLABRO); } break; } } } mudsetting->last_proc_logged = 95; return; } void do_give_renown( CHAR_DATA *ch, char *argument) { char arg1[MAX_STRING_LENGTH]; char arg2[MAX_STRING_LENGTH]; CHAR_DATA *victim; argument = one_argument(argument,arg1); argument = one_argument(argument,arg2); if (IS_NPC(ch)) { send_to_char("You a mobile!.\n\r",ch); return; } if (!IS_SWWF(ch) && !IS_IMMORTAL(ch)) { send_to_char("Huh?\n\r",ch); return; } if (!IS_SET(ch->special,SPC_ELDER) && !IS_IMMORTAL(ch)) { send_to_char("You must be a elder to use this command.\n\r",ch); return; } if (arg1[0] == '\0') { send_to_char("Syntax: grenown (renown type) (player).\n\r",ch); send_to_char("Renown Types: Honor, Glory, and Wisdom.\n\r",ch); return; } if (arg2[0] == '\0') { send_to_char("Give renown to who?.\n\r",ch); return; } if ((victim = get_char_room(ch,arg2)) == NULL) { send_to_char("There not here.\n\r",ch); return; } if (victim == ch) { send_to_char("You give your self renown.\n\r",ch); return; } if (!str_cmp(arg1,"honor")) { if ( ch->pcdata->Trenown[TRENOWN_HONOR] <= 5 && !IS_IMMORTAL(ch) && get_renown(ch) < 5) { send_to_char("You must have at least over 5 renown in Honor to give someone renown.\n\r",ch); return; } if ( victim->pcdata->Trenown[TRENOWN_HONOR] >= 20 && !IS_IMMORTAL(ch) ) { send_to_char("They must perform a rite of renown before they can accept any more.\n\r",ch); return; } ch->pcdata->Trenown[TRENOWN_HONOR]--; victim->pcdata->Trenown[TRENOWN_HONOR]++; send_to_char("For your honrable deed you have gained renown!\n\r",victim); send_to_char("Ok\n\r",ch); return; } else if (!str_cmp(arg1,"glory")) { if ( ch->pcdata->Trenown[TRENOWN_GLORY] <= 5 && !IS_IMMORTAL(ch) && get_renown(ch) < 5) { send_to_char("You must have at least over 5 renown in Glory to give someone renown.\n\r",ch); return; } if ( victim->pcdata->Trenown[TRENOWN_GLORY] >= 20 && !IS_IMMORTAL(ch) ) { send_to_char("They must perform a rite of renown before they can accept any more.\n\r",ch); return; } ch->pcdata->Trenown[TRENOWN_GLORY]--; victim->pcdata->Trenown[TRENOWN_GLORY]++; send_to_char("For your glorious deed you have gained renown!\n\r",victim); send_to_char("Ok\n\r",ch); return; } else if (!str_cmp(arg1,"wisdom")) { if ( ch->pcdata->Trenown[TRENOWN_WISDOM] <= 5 && !IS_IMMORTAL(ch) && get_renown(ch) < 5) { send_to_char("You must have at least over 5 renown in Wisdom to give someone renown.\n\r",ch); return; } if ( victim->pcdata->Trenown[TRENOWN_WISDOM] >= 20 && !IS_IMMORTAL(ch) ) { send_to_char("They must perform a rite of renown before they can accept any more.\n\r",ch); return; } ch->pcdata->Trenown[TRENOWN_WISDOM]--; victim->pcdata->Trenown[TRENOWN_WISDOM]++; send_to_char("For your wisdom doing your deed, you have gained renown!\n\r",victim); send_to_char("Ok\n\r",ch); return; } } void do_perm_renown(CHAR_DATA *ch, char *argument) { char arg1[MAX_STRING_LENGTH]; char arg2[MAX_STRING_LENGTH]; CHAR_DATA *victim; argument = one_argument(argument,arg1); argument = one_argument(argument,arg2); if (IS_NPC(ch)) return; if (!IS_SWWF(ch) && !IS_IMMORTAL(ch)) return; if (!IS_SET(ch->special,SPC_ELDER) && !IS_IMMORTAL(ch)) { send_to_char("You must be a elder to use this command.\n\r",ch); return; } if (arg1[0] == '\0' || arg2[0] == '\0') { send_to_char("Syntax: permr (renown type) (victim).\n\r",ch); return; } if ((victim = get_char_room(ch,arg2)) == NULL) { send_to_char("You do not see them here.\n\r",ch); return; } if (victim == ch) { send_to_char("Umm no it don't work that way.\n\r",ch); return; } if (!str_cmp(arg1,"honor")) { if (victim->pcdata->Trenown[TRENOWN_HONOR] < 10) { send_to_char("You must have at least 10 temporary renown to convert it to permanent.\n\r",victim); send_to_char("They must have at least 10 temporary renown to convert it to permanent.\n\r",ch); return; } victim->pcdata->Trenown[TRENOWN_HONOR] -= 10; victim->pcdata->renown[RENOWN_HONOR] += 1; send_to_char("You have succesfuly gained a point of permanent honor.\n\r",victim); send_to_char("They have succesfuly gained a point of permanent honor.\n\r",ch); } else if (!str_cmp(arg1,"glory")) { if (victim->pcdata->Trenown[TRENOWN_GLORY] < 10) { send_to_char("You must have at least 10 temporary renown to convert it to permanent.\n\r",victim); send_to_char("They must have at least 10 temporary renown to convert it to permanent.\n\r",ch); return; } victim->pcdata->Trenown[TRENOWN_GLORY] -= 10; victim->pcdata->renown[RENOWN_GLORY] += 1; send_to_char("You have succesfuly gained a point of permanent glory.\n\r",victim); send_to_char("They have succesfuly gained a point of permanent glory.\n\r",ch); } else if (!str_cmp(arg1,"wisdom")) { if (victim->pcdata->Trenown[TRENOWN_WISDOM] < 10) { send_to_char("You must have at least 10 temporary renown to convert it to permanent.\n\r",victim); send_to_char("They must have at least 10 temporary renown to convert it to permanent.\n\r",ch); return; } victim->pcdata->Trenown[TRENOWN_WISDOM] -= 10; victim->pcdata->renown[RENOWN_WISDOM] += 1; send_to_char("You have succesfuly gained a point of permanent wisdom.\n\r",victim); send_to_char("They have succesfuly gained a point of permanent wisdom.\n\r",ch); } //check rank... if (victim->pcdata->rank < get_renown(victim)) { send_to_char("You have risen a rank of renown! Congradulations!\n\r",ch); victim->pcdata->rank = get_renown(victim); } return; } void do_penalty_renown(CHAR_DATA *ch, char *argument) { char arg1[MAX_STRING_LENGTH]; char arg2[MAX_STRING_LENGTH]; CHAR_DATA *victim; argument = one_argument(argument,arg1); argument = one_argument(argument,arg2); if (IS_NPC(ch)) return; if (!IS_SWWF(ch) && !IS_IMMORTAL(ch)) return; if (!IS_SET(ch->special,SPC_ELDER) && !IS_IMMORTAL(ch)) { send_to_char("You must be a elder to use this command.\n\r",ch); return; } if (arg1[0] == '\0' || arg2[0] == '\0') { send_to_char("Syntax: permr (renown type) (victim).\n\r",ch); return; } if ((victim = get_char_room(ch,arg2)) == NULL) { send_to_char("You do not see them here.\n\r",ch); return; } if (victim == ch) { send_to_char("Umm no it don't work that way.\n\r",ch); return; } if (!str_cmp(arg1,"honor")) { victim->pcdata->renown[RENOWN_HONOR] -= 1; send_to_char("For your dishonoring your tribe and your self you loose renown in honor.\n\r",ch); } else if (!str_cmp(arg1,"glory")) { victim->pcdata->renown[RENOWN_GLORY] -= 1; send_to_char("For your dishonoring your tribe and your self you loose renown in glory.\n\r",ch); } else if (!str_cmp(arg1,"wisdom")) { victim->pcdata->renown[RENOWN_WISDOM] -= 1; send_to_char("For your dishonoring your tribe and your self you loose renown in wisdom.\n\r",ch); } return; } void chbreed_form( CHAR_DATA *ch, char *argument) { if (IS_NPC(ch)){ return; } switch (ch->pcdata->sgift[1]) { case BREED_HOMID: if ( ch->pcdata->wwf_shape != SHAPE_HOMID) { shape_shift(ch,SHAPE_HOMID); } break; case BREED_METIS: if ( ch->pcdata->wwf_shape != SHAPE_CRINOS) { shape_shift(ch,SHAPE_CRINOS); } break; case BREED_LUPUS: if ( ch->pcdata->wwf_shape != SHAPE_LUPUS) { shape_shift(ch,SHAPE_LUPUS); } break; } }