diff -i smaug14/src/misc.c smaug18/src/misc.c 8c8 < * Tricops and Fireblade | * --- > * Tricops, Fireblade, Edmond, Conran | * 37a38,39 > char buf[20]; > char buf2[70]; 82a85 > src_item3 = ITEM_PUDDLE; 172a176 > 185a190,191 > || IS_OBJ_STAT( source, ITEM_NOFILL ) > || IS_SET( source->magic_flags, ITEM_PKDISARMED ) 218c224 < send_to_char( "There is no fountain or pool here!\n\r", ch ); --- > send_to_char( "There is no fountain, pool or puddle here!\n\r", ch ); 230a237 > 234a242,247 > if ( obj->level > ch->level ) > act( AT_DANGER, > "This container's level is higher than your own and will vanish along with its contents when you log out. You should remove all items from it and find a different container.", > ch, NULL, NULL, TO_CHAR ); > if ( xIS_SET( ch->in_room->room_flags, ROOM_HOUSE ) ); > save_house_by_vnum( ch->in_room->vnum ); 257a271,272 > || IS_OBJ_STAT( source, ITEM_NOFILL ) > || IS_SET( source->magic_flags, ITEM_PKDISARMED ) 331a347 > || IS_OBJ_STAT( otmp, ITEM_NOFILL ) 342a359,360 > if ( xIS_SET( ch->in_room->room_flags, ROOM_HOUSE ) ); > save_house_by_vnum( ch->in_room->vnum ); 365c383 < bug( "do_fill: got bad item type: %d", source->item_type ); --- > bug( "do_fill: got bad item type: %d, %s", source->item_type, ch->name ); 439a458,491 > case ITEM_PUDDLE: > if ( obj->value[1] != 0 && obj->value[2] != source->value[2] ) > { > send_to_char( "There is already another liquid in it.\n\r", ch ); > return; > } > obj->value[2] = source->value[2]; > if ( source->value[1] < diff ) > diff = source->value[1]; > obj->value[1] += diff; > source->value[1] -= diff; > if ( source->item_type == ITEM_PUDDLE ) > { > if ( source->value[1] > 15 ) > sprintf( buf, "large" ); > else if ( source->value[1] > 10 ) > sprintf( buf, "rather large" ); > else if ( source->value[1] > 5 ) > sprintf( buf, "rather small" ); > else > sprintf( buf, "small" ); > sprintf( buf2, "There is a %s puddle of %s.", buf, > ( source->value[2] >= LIQ_MAX ? "water" : liq_table[source->value[2]].liq_name ) ); > source->description = STRALLOC( buf2 ); > } > act( AT_ACTION, "You fill $p from $P.", ch, obj, source, TO_CHAR ); > act( AT_ACTION, "$n fills $p from $P.", ch, obj, source, TO_ROOM ); > if ( source->value[1] < 1 ) > { > act( AT_ACTION, "The remaining contents of the puddle seep into the ground.", ch, NULL, NULL, TO_CHAR ); > act( AT_ACTION, "The remaining contents of the puddle seep into the ground.", ch, NULL, NULL, TO_ROOM ); > extract_obj( source ); > } > return; 460c512,513 < if ( ( obj->item_type == ITEM_FOUNTAIN ) || ( obj->item_type == ITEM_BLOOD ) ) --- > if ( ( obj->item_type == ITEM_FOUNTAIN ) > || ( obj->item_type == ITEM_BLOOD ) || ( obj->item_type == ITEM_PUDDLE ) ) 564c617 < send_to_char( "You take a long thirst quenching drink.\n\r", ch ); --- > send_to_char( "You take a long thirst-quenching drink.\n\r", ch ); 650a704,787 > /* > * puddle - modified from the ITEM_DRINK_CON case > */ > case ITEM_PUDDLE: > if ( obj->value[1] <= 0 ) > { > bug( "Do_drink: empty puddle %d.", obj->in_room->vnum ); > return; > } > > if ( ( liquid = obj->value[2] ) >= LIQ_MAX ) > { > bug( "Do_drink: bad liquid number %d.", liquid ); > liquid = obj->value[2] = 0; > } > > if ( !oprog_use_trigger( ch, obj, NULL, NULL, NULL ) ) > { > act( AT_ACTION, "$n stoops to the ground and drinks from $p.", ch, obj, NULL, TO_ROOM ); > act( AT_ACTION, "You stoop to the ground and drink $T from $p.", > ch, obj, liq_table[liquid].liq_name, TO_CHAR ); > } > > amount = 1; /* UMIN(amount, obj->value[1]); */ > /* > * what was this? concentrated drinks? concentrated water > * too I suppose... sheesh! > */ > > gain_condition( ch, COND_DRUNK, amount * liq_table[liquid].liq_affect[COND_DRUNK] ); > gain_condition( ch, COND_FULL, amount * liq_table[liquid].liq_affect[COND_FULL] ); > gain_condition( ch, COND_THIRST, amount * liq_table[liquid].liq_affect[COND_THIRST] ); > > if ( !IS_NPC( ch ) ) > { > if ( ch->pcdata->condition[COND_DRUNK] > 24 ) > send_to_char( "You feel quite sloshed.\n\r", ch ); > else if ( ch->pcdata->condition[COND_DRUNK] > 18 ) > send_to_char( "You feel very drunk.\n\r", ch ); > else if ( ch->pcdata->condition[COND_DRUNK] > 12 ) > send_to_char( "You feel drunk.\n\r", ch ); > else if ( ch->pcdata->condition[COND_DRUNK] > 8 ) > send_to_char( "You feel a little drunk.\n\r", ch ); > else if ( ch->pcdata->condition[COND_DRUNK] > 5 ) > send_to_char( "You feel light headed.\n\r", ch ); > > if ( ch->pcdata->condition[COND_FULL] > 40 ) > send_to_char( "You are full.\n\r", ch ); > > if ( ch->pcdata->condition[COND_THIRST] > 40 ) > send_to_char( "You feel bloated.\n\r", ch ); > else if ( ch->pcdata->condition[COND_THIRST] > 36 ) > send_to_char( "Your stomach is sloshing around.\n\r", ch ); > else if ( ch->pcdata->condition[COND_THIRST] > 30 ) > send_to_char( "You do not feel thirsty.\n\r", ch ); > } > > if ( obj->value[3] ) > { > /* > * The drink was poisoned! > */ > AFFECT_DATA af; > > act( AT_POISON, "$n sputters and gags.", ch, NULL, NULL, TO_ROOM ); > act( AT_POISON, "You sputter and gag.", ch, NULL, NULL, TO_CHAR ); > ch->mental_state = URANGE( 20, ch->mental_state + 5, 100 ); > af.type = gsn_poison; > af.duration = 3 * obj->value[3]; > af.location = APPLY_NONE; > af.modifier = 0; > af.bitvector = meb( AFF_POISON ); > affect_join( ch, &af ); > } > > obj->value[1] -= amount; > if ( obj->value[1] <= 0 ) > { > send_to_char( "The remainder of the puddle seeps into the ground.\n\r", ch ); > if ( cur_obj == obj->serial ) > global_objcode = rOBJ_DRUNK; > extract_obj( obj ); > } > break; 715,716c852 < ( ch->in_room->sector_type == SECT_AIR || < IS_SET( ch->in_room->room_flags, ROOM_NOFLOOR ) ) ? "falls far below" : "is trampled underfoot" ); --- > ( xIS_SET( ch->in_room->room_flags, ROOM_NOFLOOR ) ) ? "falls far below" : "is trampled underfoot" ); 839c975 < if ( !IS_NPC( ch ) && IS_AFFECTED( ch, AFF_CHARM ) ) --- > if ( IS_NPC( ch ) && IS_AFFECTED( ch, AFF_CHARM ) ) 938c1074 < act( AT_ACTION, "Your stomach is nearing its capacity.", ch, NULL, NULL, TO_CHAR ); --- > act( AT_ACTION, "You are getting full.", ch, NULL, NULL, TO_CHAR ); 1483c1619 < void do_light( CHAR_DATA * ch, char *argument ) --- > OBJ_DATA *find_tinder( CHAR_DATA * ch ) 1485c1621,1631 < OBJ_DATA *pipe; --- > OBJ_DATA *tinder; > > for ( tinder = ch->last_carrying; tinder; tinder = tinder->prev_content ) > if ( ( tinder->item_type == ITEM_TINDER ) && can_see_obj( ch, tinder ) ) > return tinder; > return NULL; > } > > void do_extinguish( CHAR_DATA * ch, char *argument ) > { > OBJ_DATA *obj; 1491c1637 < send_to_char( "Light what?\n\r", ch ); --- > send_to_char( "Extinguish what?\n\r", ch ); 1498c1644,1654 < if ( ( pipe = get_obj_carry( ch, arg ) ) == NULL ) --- > if ( ( obj = get_obj_wear( ch, arg ) ) == NULL ) > if ( ( obj = get_obj_carry( ch, arg ) ) == NULL ) > if ( ( obj = get_obj_list_rev( ch, arg, ch->in_room->last_content ) ) == NULL ) > { > send_to_char( "You aren't carrying that.\n\r", ch ); > return; > } > > separate_obj( obj ); > > if ( obj->item_type != ITEM_LIGHT || ( obj->value[1] < 1 ) ) 1500c1656 < send_to_char( "You aren't carrying that.\n\r", ch ); --- > send_to_char( "You can't extinguish that.\n\r", ch ); 1503c1659,1660 < if ( pipe->item_type != ITEM_PIPE ) --- > > if ( IS_SET( obj->value[3], PIPE_LIT ) ) 1505c1662,1664 < send_to_char( "You can't light that.\n\r", ch ); --- > act( AT_ACTION, "You extinguish $p.", ch, obj, NULL, TO_CHAR ); > act( AT_ACTION, "$n extinguishes $p.", ch, obj, NULL, TO_ROOM ); > REMOVE_BIT( obj->value[3], PIPE_LIT ); 1508c1667 < if ( !IS_SET( pipe->value[3], PIPE_LIT ) ) --- > else 1510,1518c1669 < if ( pipe->value[1] < 1 ) < { < act( AT_ACTION, "You try to light $p, but it's empty.", ch, pipe, NULL, TO_CHAR ); < act( AT_ACTION, "$n tries to light $p, but it's empty.", ch, pipe, NULL, TO_ROOM ); < return; < } < act( AT_ACTION, "You carefully light $p.", ch, pipe, NULL, TO_CHAR ); < act( AT_ACTION, "$n carefully lights $p.", ch, pipe, NULL, TO_ROOM ); < SET_BIT( pipe->value[3], PIPE_LIT ); --- > send_to_char( "It's not lit.\n\r", ch ); 1521d1671 < send_to_char( "It's already lit.\n\r", ch ); 1523a1674,1794 > /* > void do_light( CHAR_DATA *ch, char *argument ) > { > OBJ_DATA *pipe; > char arg[MAX_INPUT_LENGTH]; > > one_argument( argument, arg ); > if ( arg[0] == '\0' ) > { > send_to_char( "Light what?\n\r", ch ); > return; > } > > if ( ms_find_obj(ch) ) > return; > > if ( (pipe = get_obj_carry( ch, arg )) == NULL ) > { > send_to_char( "You aren't carrying that.\n\r", ch ); > return; > } > if ( pipe->item_type != ITEM_PIPE ) > { > send_to_char( "You can't light that.\n\r", ch ); > return; > } > separate_obj( pipe ); > if ( !IS_SET( pipe->value[3], PIPE_LIT ) ) > { > if ( pipe->value[1] < 1 ) > { > act( AT_ACTION, "You try to light $p, but it's empty.", ch, pipe, NULL, TO_CHAR ); > act( AT_ACTION, "$n tries to light $p, but it's empty.", ch, pipe, NULL, TO_ROOM ); > return; > } > act( AT_ACTION, "You carefully light $p.", ch, pipe, NULL, TO_CHAR ); > act( AT_ACTION, "$n carefully lights $p.", ch, pipe, NULL, TO_ROOM ); > SET_BIT( pipe->value[3], PIPE_LIT ); > return; > } > send_to_char( "It's already lit.\n\r", ch ); > } > */ > > void do_light( CHAR_DATA * ch, char *argument ) > { > OBJ_DATA *obj; > char arg[MAX_INPUT_LENGTH]; > > one_argument( argument, arg ); > > if ( arg[0] == '\0' ) > { > send_to_char( "Light what?\n\r", ch ); > return; > } > > if ( ms_find_obj( ch ) ) > return; > > if ( ( obj = get_obj_wear( ch, arg ) ) == NULL ) > if ( ( obj = get_obj_carry( ch, arg ) ) == NULL ) > if ( ( obj = get_obj_list_rev( ch, arg, ch->in_room->last_content ) ) == NULL ) > { > send_to_char( "You aren't carrying that.\n\r", ch ); > return; > } > > if ( !find_tinder( ch ) ) > { > send_to_char( "You need some tinder to light with.\n\r", ch ); > return; > } > > separate_obj( obj ); > > switch ( obj->item_type ) > { > default: > send_to_char( "You can't light that.\n\r", ch ); > return; > > case ITEM_PIPE: > if ( !IS_SET( obj->value[3], PIPE_LIT ) ) > { > if ( obj->value[1] < 1 ) > { > act( AT_ACTION, "You try to light $p, but it's empty.", ch, obj, NULL, TO_CHAR ); > act( AT_ACTION, "$n tries to light $p, but it's empty.", ch, obj, NULL, TO_ROOM ); > return; > } > act( AT_ACTION, "You carefully light $p.", ch, obj, NULL, TO_CHAR ); > act( AT_ACTION, "$n carefully lights $p.", ch, obj, NULL, TO_ROOM ); > SET_BIT( obj->value[3], PIPE_LIT ); > return; > } > send_to_char( "It's already lit.\n\r", ch ); > break; > > case ITEM_LIGHT: > if ( obj->value[1] > 0 ) > { > if ( !IS_SET( obj->value[3], PIPE_LIT ) ) > { > act( AT_ACTION, "You carefully light $p.", ch, obj, NULL, TO_CHAR ); > act( AT_ACTION, "$n carefully lights $p.", ch, obj, NULL, TO_ROOM ); > SET_BIT( obj->value[3], PIPE_LIT ); > } > else > send_to_char( "It's already lit.\n\r", ch ); > return; > } > else > send_to_char( "You can't light that.\n\r", ch ); > break; > } > > return; > } > > 1569a1841 > make_puddle( ch, obj ); 1589c1861,1862 < if ( IS_SET( ch->in_room->room_flags, ROOM_NODROP ) || xIS_SET( ch->act, PLR_LITTERBUG ) ) --- > if ( xIS_SET( ch->in_room->room_flags, ROOM_NODROP ) > || ( !IS_NPC( ch ) && xIS_SET( ch->act, PLR_LITTERBUG ) ) ) 1597,1598c1870,1871 < if ( IS_SET( ch->in_room->room_flags, ROOM_NODROPALL ) < || IS_SET( ch->in_room->room_flags, ROOM_CLANSTOREROOM ) ) --- > if ( xIS_SET( ch->in_room->room_flags, ROOM_NODROPALL ) > || xIS_SET( ch->in_room->room_flags, ROOM_CLANSTOREROOM ) ) 1648a1922,1937 > if ( xIS_SET( ch->in_room->room_flags, ROOM_CLANSTOREROOM ) ) > { > VAULT_DATA *vault; > char buf[20]; > > for ( vault = first_vault; vault; vault = vault->next ) > if ( vault->vnum == ch->in_room->vnum ) > { > sprintf( buf, "%d", vault->vnum ); > save_storeroom( ch, buf ); > } > } > > > if ( ch->in_room && xIS_SET( ch->in_room->room_flags, ROOM_HOUSE ) ); > save_house_by_vnum( ch->in_room->vnum );