• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ REMOVE_BIT函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中REMOVE_BIT函数的典型用法代码示例。如果您正苦于以下问题:C++ REMOVE_BIT函数的具体用法?C++ REMOVE_BIT怎么用?C++ REMOVE_BIT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了REMOVE_BIT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: do_clantalk

/* clan channels */
void do_clantalk( CHAR_DATA *ch, char *argument )
{
    char buf[MAX_STRING_LENGTH];
    DESCRIPTOR_DATA *d;

    if (!is_clan(ch))
    {
	send_to_char("You aren't in a clan.\n\r",ch);
	return;
    }
    if ( argument[0] == '\0' )
    {
      if (IS_SET(ch->comm,COMM_NOCLAN))
      {
        send_to_char("Clan channel is now ON\n\r",ch);
        REMOVE_BIT(ch->comm,COMM_NOCLAN);
      }
      else
      {
        send_to_char("Clan channel is now OFF\n\r",ch);
        SET_BIT(ch->comm,COMM_NOCLAN);
      }
      return;
    }

        if (IS_SET(ch->comm,COMM_NOCHANNELS))
        {
         send_to_char("The gods have revoked your channel priviliges.\n\r",ch);
          return;
        }

        REMOVE_BIT(ch->comm,COMM_NOCLAN);
	  if(!IS_NPC(ch) && ch->pcdata->condition[COND_DRUNK] > 10)
		  argument = makedrunk(argument,ch);

      sprintf( buf, "You clan '%s'{x\n\r", argument );
      send_to_char( buf, ch );
      sprintf( buf, "$n clans '%s'{x", argument );
    for ( d = descriptor_list; d != NULL; d = d->next )
    {
        if ( d->connected == CON_PLAYING &&
			is_same_clan(ch,d->character) &&
	     is_same_clan(ch,d->character) &&
         !IS_SET(d->character->comm,COMM_NOCLAN) &&
	     !IS_SET(d->character->comm,COMM_QUIET) )
        {
            act_new("$n clans '$t'{x",ch,argument,d->character,TO_VICT,POS_DEAD);
        }
		if(IS_SET(d->character->comm,COMM_ALLCLAN) &&
			d->connected == CON_PLAYING &&
             d->character != ch
			 && !is_same_clan(d->character, ch))
		{
			send_to_one(d->character,"[ %s ] %s clans '%s'{x",clan_table[ch->clan].name,ch->name,
				argument);
		}
    }

    return;
}
开发者ID:verias,项目名称:SRMud,代码行数:61,代码来源:clan.c


示例2: do_afk

void do_afk ( CHAR_DATA *ch, char *argument)
{
    // unswitched mobs can't be afk
    if (IS_UNSWITCHED_MOB(ch)) {
	send_to_char("No.\n\r", ch);
        return;
    }

    if (!IS_NULLSTR(argument)) {
    // so you can change your afk message without turning afk off
	REMOVE_BIT(ch->act, PLR_AFK);
    }

    if (IS_SET(ch->act, PLR_AFK)) {
       act("$n has returned from being AFK.",ch,NULL,NULL,NULL,NULL,TO_ROOM,SENSE_SIGHT);
       send_to_char("AFK mode removed.\n\r", ch);
       REMOVE_BIT(ch->act, PLR_AFK);
    } else {
	if(IS_NULLSTR(argument)) {
	    act("$n has gone AFK.",ch,NULL,NULL,NULL,NULL,TO_ROOM,SENSE_SIGHT);
	    send_to_char( "You are now in AFK mode.\n\r", ch);
	} else {
	    act("$n has gone AFK ($t).",ch,NULL,NULL,argument,NULL,TO_ROOM,SENSE_SIGHT);
	    send_to_char( "You are now in AFK mode.\n\r", ch);
	}
	SET_BIT(ch->act, PLR_AFK);
    }
}
开发者ID:YourCyborg,项目名称:Sun-RPI,代码行数:28,代码来源:act_comm.c


示例3: do_fixhead

void do_fixhead( CHAR_DATA *ch, char *argument )
{
    char arg1[MSL];
    CHAR_DATA *victim;

    argument = one_argument( argument, arg1 );
    victim = get_char_world(ch, arg1);

    if ( arg1[0] == '\0' )
    {
        send_to_char("Syntax: fixhead <player name>\n\r",ch);
        return;
    }
    if (victim == NULL)
    {
        send_to_char("They must be playing.\n\r", ch);
        return;
    }
    if (IS_NPC(victim))
    {
        send_to_char("Not on NPC's\n\r", ch);
        return;
    }

    if ( !IS_HEAD(victim,LOST_HEAD) )
        return stcf(ch,"They're not a head!\n\r");

    REMOVE_BIT(victim->loc_hp[0],LOST_HEAD);
    REMOVE_BIT(victim->affected_by,AFF_POLYMORPH);
    if ( victim->morph ) free_string(victim->morph);
    stcf(ch,"%s has been fixed.\n\r",victim->name);
    stcf(victim,"You have been fixed!\n\r");
}
开发者ID:raziel23x,项目名称:Anotherland_Mud,代码行数:33,代码来源:devik.c


示例4: do_approve

void do_approve( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *ach;
    char buf[MAX_STRING_LENGTH];

    ach = get_char_world( ch, argument );
    if ( ach == NULL || IS_NPC( ach ) )
    {
	send_to_char( "No such character to approve.\n\r", ch );
	return;
    }

    if ( !IS_SET( ach->act, PLR_REVIEWING ) )
    {
	send_to_char( "That character is not being reviewed.\n\r", ch );
	return;
    }

    REMOVE_BIT( ach->act, PLR_REJECTED );
    REMOVE_BIT( ach->act, PLR_UNAPPROVED );

    sprintf( buf, "rm -f %s%s", REJECTED_DIR, capitalize( ach->name ) );
    system( buf );
    sprintf( buf, "rm -f %s%s", UNAPPROVED_DIR, capitalize( ach->name ) );
    system( buf );

    save_char_obj( ach );
    do_quit( ach, "" );

    send_to_char( "Character approved.\n\r", ch );
    return;
}
开发者ID:YourCyborg,项目名称:Sun-RPI,代码行数:32,代码来源:review.c


示例5: REMOVE_BIT

uint8_t DHT::getStatus(void) {
    // If temperature is at an extreme, set to warning...
    if (_lastTemperature > 100 || _lastTemperature < 60) {
        REMOVE_BIT(_status, STATUS_TEMP_GOOD);
        ADD_BIT(_status, STATUS_TEMP_WARN);
        // If temperature is really extreme, set to alert...
        if (_lastTemperature > 110 || _lastTemperature < 40) {
            REMOVE_BIT(_status, STATUS_TEMP_WARN);
            ADD_BIT(_status, STATUS_TEMP_ALRT);
        }
    }

    // If humidity is low, set to warning...
    if (_lastHumidity < 60) {
        REMOVE_BIT(_status, STATUS_HUMI_GOOD);
        ADD_BIT(_status, STATUS_HUMI_WARN);
        // If humidity is extreme, set to alert...
        if (_lastHumidity < 20) {
            REMOVE_BIT(_status, STATUS_HUMI_WARN);
            ADD_BIT(_status, STATUS_HUMI_ALRT);
        }
    }

    return (_status);
}
开发者ID:anth-3,项目名称:libraries,代码行数:25,代码来源:DHT.cpp


示例6: do_infravision

void do_infravision( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;

    if (!IS_CLASS(ch, CLASS_DROID))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }

    if (ch->pcdata->powers[CYBORG_FACE] < 1)
    {
        send_to_char("You need at least 1 implant on your face to use your unholy sight.\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[CYBORG_FACE] > 2)
    {
        if (IS_SET(ch->act, PLR_HOLYLIGHT))
        {
            REMOVE_BIT(ch->act, PLR_HOLYLIGHT);
            send_to_char("You turn off your unholy sight.\n\r",ch);
        }
        else
        {
            SET_BIT(ch->act, PLR_HOLYLIGHT);
            send_to_char("You turn on your unholy sight.\n\r",ch);
        }
    }
    else if (ch->pcdata->powers[CYBORG_FACE] == 2)
    {
        if (IS_SET(ch->affected_by, AFF_SHADOWSIGHT) && IS_SET(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT))
        {
            REMOVE_BIT(ch->affected_by, AFF_SHADOWSIGHT);
            REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT);
            send_to_char("You turn off your unholy sight.\n\r",ch);
        }
        else
        {
            SET_BIT(ch->affected_by, AFF_SHADOWSIGHT);
            SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT);
            send_to_char("You turn on your unholy sight.\n\r",ch);
        }
    }
    else if ((ch->pcdata->powers[CYBORG_FACE] == 1))
    {
        if (IS_SET(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT))
        {
            REMOVE_BIT(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT);
            send_to_char("You turn off your unholy sight.\n\r",ch);
        }
        else
        {
            SET_BIT(ch->pcdata->stats[UNI_AFF], VAM_NIGHTSIGHT);
            send_to_char("You turn on your unholy sight.\n\r",ch);
        }
    }
    return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:58,代码来源:spiderdroid.c


示例7: do_quote

void do_quote( CHAR_DATA *ch, char *argument )
{
    char buf[MAX_STRING_LENGTH];
    DESCRIPTOR_DATA *d;
 
    if (argument[0] == '\0' )
    {
      if (IS_SET(ch->comm,COMM_NOQUOTE))
      {
        send_to_char("{hQuote channel is now ON.{x\n\r",ch);
        REMOVE_BIT(ch->comm,COMM_NOQUOTE);
      }
      else
      {
        send_to_char("{hQuote channel is now OFF.{x\n\r",ch);
        SET_BIT(ch->comm,COMM_NOQUOTE);
      }
    }
    else  /* quote message sent, turn quote on if it isn't already */
    {
        if (IS_SET(ch->comm,COMM_QUIET))
        {
          send_to_char("You must turn off quiet mode first.\n\r",ch);
          return;
        }
 
        if (IS_SET(ch->comm,COMM_NOCHANNELS))
        {
          send_to_char("The gods have revoked your channel priviliges.\n\r",ch);
          return;
 
        }
 
      REMOVE_BIT(ch->comm,COMM_NOQUOTE);
 
	  if(!IS_NPC(ch) && ch->pcdata->condition[COND_DRUNK] > 10)
		  argument = makedrunk(argument,ch);

      sprintf( buf, "{hYou quote '{H%s{h'{x\n\r", argument );
      send_to_char( buf, ch );
      for ( d = descriptor_list; d != NULL; d = d->next )
      {
        CHAR_DATA *victim;
 
        victim = d->original ? d->original : d->character;
 
        if ( d->connected == CON_PLAYING &&
             d->character != ch &&
             !IS_SET(victim->comm,COMM_NOQUOTE) &&
             !IS_SET(victim->comm,COMM_QUIET) )
        {
          act_new( "{h$n quotes '{H$t{h'{x",
                   ch,argument, d->character, TO_VICT,POS_SLEEPING );
        }
      }
    }
}
开发者ID:verias,项目名称:SRMud,代码行数:57,代码来源:send.c


示例8: do_spiderform

void do_spiderform( CHAR_DATA *ch, char *argument ) 
{
	char arg[MAX_INPUT_LENGTH];
	char buf[MAX_STRING_LENGTH];
 
	argument = one_argument(argument,arg);

	if (IS_NPC(ch)) return;

	if (!IS_CLASS(ch, CLASS_DROW) ||!IS_SET(ch->pcdata->powers[1], DPOWER_SPIDERFORM))
	{send_to_char("Huh?\n\r", ch );
	return;}

	if (IS_AFFECTED(ch, AFF_POLYMORPH)) 
      {
	send_to_char("You can't spiderform while changed.\n\r", ch );
	return;
      }

      if (IS_SET(ch->newbits,NEW_DFORM))
      {
	sprintf(buf, "$n morphs back into %s.", GET_PROPER_NAME(ch));
        act(buf, ch, NULL, NULL, TO_ROOM);
        stc("You return to your normal form.\n\r", ch);
        free_string(ch->morph);
        ch->morph = str_dup("");
        ch->hitroll -= 400;
        ch->damroll -= 400;
        ch->armor   += 1000;
        REMOVE_BIT(ch->newbits,NEW_DFORM);
	REMOVE_BIT(ch->newbits,THIRD_HAND);
	REMOVE_BIT(ch->newbits,FOURTH_HAND);
        WAIT_STATE(ch, 7);
        return;   
      }

      else if (!IS_SET(ch->newbits,NEW_DFORM))
      {
	
	act("You mutate into a giant spider.",ch,NULL,NULL,TO_CHAR);
        act("$n mutates into a giant spider.",ch,NULL,NULL,TO_ROOM);
        sprintf(buf,"%s the giant mylochar",ch->name);
        free_string(ch->morph);
        ch->morph = str_dup(buf);
        ch->hitroll += 400;
        ch->damroll += 400;
        ch->armor   -= 1000;
        SET_BIT(ch->newbits,NEW_DFORM);
	SET_BIT(ch->newbits,THIRD_HAND);
	SET_BIT(ch->newbits,FOURTH_HAND);
	return;
    }

	return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:55,代码来源:drow.c


示例9: RemHatred

void RemHatred( struct char_data *ch, unsigned short bitv)
{
  if( IS_PC( ch ) )
  { 
    return;
  }

  REMOVE_BIT(ch->hatefield, bitv);
  if (!ch->hatefield)
    REMOVE_BIT(ch->specials.act, ACT_HATEFUL);
}
开发者ID:frasten,项目名称:openleu,代码行数:11,代码来源:Opinion.c


示例10: do_enmity

void do_enmity(CHAR_DATA *ch, char *argument)
{
    char arg1[MAX_INPUT_LENGTH];
    char arg2[MAX_INPUT_LENGTH];
    CHAR_DATA *victim1;
    CHAR_DATA *victim2;

    argument = one_argument( argument, arg1 );
    argument = one_argument( argument, arg2 );

    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_TANARRI))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (!IS_SET(ch->pcdata->powers[TANARRI_POWER], TANARRI_EMNITY))
    {
        send_to_char("you don't have that power yet.\n\r",ch);
        return;
    }
    if ((victim1 = get_char_room(ch, NULL, arg1)) == NULL)
    {
        send_to_char("They are not here.\n\r", ch);
        return;
    }
    if ((victim2 = get_char_room(ch, NULL, arg2)) == NULL)
    {
        send_to_char("They are not here.\n\r", ch);
        return;
    }
    if (IS_NPC(victim1) || IS_NPC(victim2))
    {
        send_to_char("Not on NPC's\n\r",ch);
        return;
    }
    do_say(ch,"Xenus, Morkain, Hau!");
    if (number_percent() > 60)
    {
        SET_BIT(victim1->pcdata->tempflag, TEMP_AGGRESSIVE);
        do_kill(victim1, victim2->pcdata->switchname);
        REMOVE_BIT(victim1->pcdata->tempflag, TEMP_AGGRESSIVE);
    }
    else send_to_char("#RSomeone is trying to control your actions!!!#n\n\r",victim1);
    if (number_percent() > 60)
    {
        SET_BIT(victim2->pcdata->tempflag, TEMP_AGGRESSIVE);
        do_kill(victim2, victim1->pcdata->switchname);
        REMOVE_BIT(victim2->pcdata->tempflag, TEMP_AGGRESSIVE);
    }
    else send_to_char("#RSomeone is trying to control your actions!!!#n\n\r",victim2);
    WAIT_STATE(ch,24);
    return;
}
开发者ID:smthbh,项目名称:Mindcloud-2.5-MUD,代码行数:54,代码来源:tanarri.c


示例11: do_cubeform

void do_cubeform( CHAR_DATA *ch, char *argument )
{
    char buf [MAX_STRING_LENGTH];

    if (IS_NPC(ch)) return;

    if (!IS_CLASS(ch, CLASS_DROID) )
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }

    if (ch->pcdata->powers[CYBORG_BODY] < 5)
    {
        send_to_char("You must have level 5 body.\n\r",ch);
        return;
    }

    if ( IS_SET(ch->newbits, NEW_CUBEFORM))
    {
        REMOVE_BIT(ch->newbits, NEW_CUBEFORM);
        REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
        act( "$n turns into a spider droid.",ch,NULL,NULL,TO_ROOM);
        send_to_char("You turn into your normal form.\n\r",ch);
        ch->damroll -=250;
        ch->hitroll -=250;
        free_string(ch->morph);
        ch->morph=str_dup("");
        return;
    }

    if (ch->move < 2000 || ch->mana < 2000)
    {
        send_to_char("You need 2000 mana and 2000 move to make yourself an avatar of Lloth.\n\r",ch);
        return;
    }

    else
    {
        act( "$n eyes flicker as an evil presence enter it's body.",ch,NULL,NULL,TO_ROOM);
        send_to_char("You let the essence of Lloth invade your body.\n\r",ch);
        SET_BIT(ch->newbits, NEW_CUBEFORM);
        SET_BIT(ch->affected_by, AFF_POLYMORPH);
        sprintf(buf,"%s the avatar of Lloth",ch->name);
        free_string(ch->morph);
        ch->morph = str_dup(buf);
        ch->move -= 2000;
        ch->mana -= 2000;
        ch->damroll +=250;
        ch->hitroll +=250;
        return;
    }
    return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:54,代码来源:spiderdroid.c


示例12: do_shout

void do_shout( CHAR_DATA *ch, char *argument )
{
    DESCRIPTOR_DATA *d;

    if (argument[0] == '\0' )
    {
      	if (IS_SET(ch->comm,COMM_SHOUTSOFF))
      	{
            send_to_char("You can hear shouts again.\n\r",ch);
            REMOVE_BIT(ch->comm,COMM_SHOUTSOFF);
      	}
      	else
      	{
            send_to_char("You will no longer hear shouts.\n\r",ch);
            SET_BIT(ch->comm,COMM_SHOUTSOFF);
      	}
      	return;
    }

    if ( IS_SET(ch->comm, COMM_NOSHOUT) )
    {
        send_to_char( "You can't shout.\n\r", ch );
        return;
    }
 
    REMOVE_BIT(ch->comm,COMM_SHOUTSOFF);

    WAIT_STATE( ch, 12 );

	if(!IS_NPC(ch) && ch->pcdata->condition[COND_DRUNK] > 10)
		  argument = makedrunk(argument,ch);


    act( "{tYou shout '$T'{x", ch, NULL, argument, TO_CHAR );
    for ( d = descriptor_list; d != NULL; d = d->next )
    {
	CHAR_DATA *victim;

	victim = d->original ? d->original : d->character;

	if ( d->connected == CON_PLAYING &&
	     d->character != ch &&
	     !IS_SET(victim->comm, COMM_SHOUTSOFF) &&
	     !IS_SET(victim->comm, COMM_QUIET) ) 
	{
	    act("{t$n shouts '$t'{x",ch,argument,d->character,TO_VICT);
	}
    }

    return;
}
开发者ID:verias,项目名称:SRMud,代码行数:51,代码来源:send.c


示例13: do_gfavor

void do_gfavor( CHAR_DATA *ch, char *argument )
{
    char buf [MAX_STRING_LENGTH];

    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_LOVE] < 2)
    {
        send_to_char("God does not love you enough to grant his divine favor.\n\r",ch);
        return;
    }
    if (ch->alignment != 1000) ch->alignment = 1000;
    if (IS_SET(ch->newbits, NEW_CUBEFORM))
    {
        REMOVE_BIT(ch->newbits, NEW_CUBEFORM);
        REMOVE_BIT(ch->affected_by, AFF_POLYMORPH);
        act( "$n turns into a human.",ch,NULL,NULL,TO_ROOM);
        send_to_char("You turn into your normal form.\n\r",ch);
        ch->damroll -=400;
        ch->hitroll -=400;
        free_string(ch->morph);
        ch->morph=str_dup("");
        return;
    }
    if (ch->move < 2000 || ch->mana < 2000)
    {
        send_to_char("You need 2000 mana and 2000 move to make yourself a true angel.\n\r",ch);
        return;
    }
    else
    {
        act( "$n transforms into an angel.",ch,NULL,NULL,TO_ROOM);
        send_to_char("God is with you, your now one of his divine.\n\r",ch);
        SET_BIT(ch->newbits, NEW_CUBEFORM);
        SET_BIT(ch->affected_by, AFF_POLYMORPH);
        sprintf(buf,"%s the angel",ch->name);
        free_string(ch->morph);
        ch->morph = str_dup(buf);
        ch->move -= 2000;
        ch->mana -= 2000;
        ch->damroll +=400;
        ch->hitroll +=400;
        return;
    }
    return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:50,代码来源:angel.c


示例14: do_darkness

void do_darkness(CHAR_DATA *ch, char *argument) 
{
	bool blah = FALSE;

	if (IS_NPC(ch)) return;

	if ((!IS_CLASS(ch, CLASS_DROW) && !IS_CLASS(ch, CLASS_DROID))
        || (!IS_SET(ch->pcdata->powers[1], DPOWER_DARKNESS) && !IS_CLASS(ch, CLASS_DROID)))
        {
	do_vampdarkness(ch,argument);
	return;}

	if (ch->fight_timer>0) {
	  send_to_char("Not until your fighttimer expires.\n\r",ch);
	  return;
	}

	if (IS_SET(ch->newbits, NEW_DARKNESS)) {
	send_to_char("You banish your globe of darkness.\n\r", ch );
	act("The globe of darkness around $n disappears.",ch,NULL,NULL,TO_ROOM);
	REMOVE_BIT(ch->newbits, NEW_DARKNESS);
	if (ch->in_room != NULL)
	if (IS_SET(ch->in_room->room_flags, ROOM_TOTAL_DARKNESS))
	REMOVE_BIT(ch->in_room->room_flags, ROOM_TOTAL_DARKNESS);
	return;
	}

	if (ch->mana < 500) {
	send_to_char("You don't have enough mana to summon the darkness.\n\r",ch );
	return;}

	send_to_char("You summon a globe of darkness.\n\r", ch );
	act("$n summons a globe of darkness.",ch,NULL,NULL,TO_ROOM);
	ch->mana -= 500;
	if (IS_SET(ch->extra, TIED_UP)) {
		REMOVE_BIT(ch->extra, TIED_UP);
		blah = TRUE;}

	if (IS_AFFECTED(ch, AFF_WEBBED)) {
		REMOVE_BIT(ch->affected_by, AFF_WEBBED);
		blah = TRUE;}

	if (blah) send_to_char("The darkness sets you free.\n\r", ch );		

	SET_BIT(ch->newbits, NEW_DARKNESS);
	if (!IS_SET(ch->in_room->room_flags, ROOM_TOTAL_DARKNESS))
	SET_BIT(ch->in_room->room_flags, ROOM_TOTAL_DARKNESS);
	return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:49,代码来源:drow.c


示例15: do_pass_remort_test

int
do_pass_remort_test(struct creature *ch)
{
    int i;

    // Wipe thier skills
    for (i = 1; i <= MAX_SKILLS; i++)
        SET_SKILL(ch, i, 0);

    do_start(ch, false);

    REMOVE_BIT(PRF_FLAGS(ch),
        PRF_NOPROJECT | PRF_ROOMFLAGS | PRF_HOLYLIGHT | PRF_NOHASSLE |
        PRF_LOG1 | PRF_LOG2 | PRF_NOWIZ);

    REMOVE_BIT(PLR_FLAGS(ch), PLR_HALT | PLR_INVSTART | PLR_MORTALIZED |
        PLR_OLCGOD);

    GET_INVIS_LVL(ch) = 0;
    GET_COND(ch, DRUNK) = 0;
    GET_COND(ch, FULL) = 0;
    GET_COND(ch, THIRST) = 0;

    // Give em another gen
    if (GET_REMORT_GEN(ch) == 10)
        account_set_quest_points(ch->account, ch->account->quest_points + 1);
    else
        GET_REMORT_GEN(ch)++;

    // At gen 1 they enter the world of pk, like it or not
    if (GET_REMORT_GEN(ch) >= 1 && RAW_REPUTATION_OF(ch) <= 0)
        gain_reputation(ch, 5);
    // Whack thier remort invis
    GET_WIMP_LEV(ch) = 0;       // wimpy
    GET_TOT_DAM(ch) = 0;        // cyborg damage

    // Tell everyone that they remorted
    char *msg = tmp_sprintf("%s completed gen %d remort test",
        GET_NAME(ch), GET_REMORT_GEN(ch));
    mudlog(LVL_IMMORT, BRF, false, "%s", msg);

    REMOVE_BIT(ch->in_room->room_flags, ROOM_NORECALL);

    // Save the char and its implants but not its eq
    creature_remort(ch);

    return 1;
}
开发者ID:TempusMUD,项目名称:Tempuscode,代码行数:48,代码来源:remorter.c


示例16: do_halo

void do_halo( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_JUSTICE] < 2)
    {
        send_to_char("You haven't gotten your halo yet.\n\r",ch);
        return;
    }
    if (IS_SET(ch->pcdata->powers[ANGEL_POWERS], ANGEL_HALO))
    {
        REMOVE_BIT(ch->pcdata->powers[ANGEL_POWERS], ANGEL_HALO);
        act("Your halo flickers and disappears.", ch, NULL, NULL, TO_CHAR);
        act("$n's halo flickers and disappears.", ch, NULL, NULL, TO_ROOM );
        return;
    }
    SET_BIT(ch->pcdata->powers[ANGEL_POWERS], ANGEL_HALO);
    act("A halo appears over your head.", ch, NULL, NULL, TO_CHAR);
    act("A halo appears over $n's head.", ch, NULL, NULL, TO_ROOM);
    return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:25,代码来源:angel.c


示例17: do_awings

void do_awings( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_JUSTICE] < 1)
    {
        send_to_char("Your don't have wings yet.\n\r",ch);
        return;
    }
    if (IS_SET(ch->pcdata->powers[ANGEL_POWERS], ANGEL_WINGS))
    {
        REMOVE_BIT(ch->pcdata->powers[ANGEL_POWERS], ANGEL_WINGS);
        act("You fold your wings back into your body.", ch, NULL, NULL, TO_CHAR);
        act("$n fold $s wings back into $s body.", ch, NULL, NULL, TO_ROOM );
        return;
    }
    SET_BIT(ch->pcdata->powers[ANGEL_POWERS], ANGEL_WINGS);
    act("You spread your wings.", ch, NULL, NULL, TO_CHAR);
    act("$n spread $s wings.", ch, NULL, NULL, TO_ROOM);
    return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:25,代码来源:angel.c


示例18: do_spiritform

void do_spiritform( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_PEACE] < 2)
    {
        send_to_char("Your not peaceful enough.\n\r",ch);
        return;
    }
    if (has_timer(ch)) return;
    if (IS_AFFECTED(ch, AFF_ETHEREAL))
    {
        REMOVE_BIT(ch->affected_by, AFF_ETHEREAL);
        act("You regain your form and become solid.",  ch, NULL, NULL, TO_CHAR);
        act("$n regains $s form and becomes solid again.",  ch, NULL, NULL, TO_ROOM);
        return;
    }
    SET_BIT(ch->affected_by, AFF_ETHEREAL);
    act("You transform into pure spiritual matter.", ch, NULL, NULL, TO_CHAR);
    act("$n glows and fades into a form of pure energy.", ch, NULL, NULL, TO_ROOM);
    return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:26,代码来源:angel.c


示例19: do_gsenses

void do_gsenses( CHAR_DATA *ch, char *argument )
{
    if (IS_NPC(ch)) return;
    if (!IS_CLASS(ch, CLASS_ANGEL))
    {
        send_to_char("Huh?\n\r",ch);
        return;
    }
    if (ch->pcdata->powers[ANGEL_LOVE] < 1)
    {
        send_to_char("God does not love you enough to grant you sight.\n\r",ch);
        return;
    }
    if (IS_SET(ch->act, PLR_HOLYLIGHT))
    {
        REMOVE_BIT(ch->act, PLR_HOLYLIGHT);
        send_to_char("Your holy vision fades.\n\r", ch);
    }
    else
    {
        SET_BIT(ch->act, PLR_HOLYLIGHT);
        send_to_char( "You see through God's own eyes.\n\r", ch );
    }
    return;
}
开发者ID:smthbh,项目名称:dystopia-mud,代码行数:25,代码来源:angel.c


示例20: die

void die(struct char_data *ch)
{
  gain_exp(ch, -(GET_EXP(ch) / 2));
  if (!IS_NPC(ch))
    REMOVE_BIT(PLR_FLAGS(ch), PLR_KILLER | PLR_THIEF);
  raw_kill(ch);
}
开发者ID:stefan-lindstrom,项目名称:circpp,代码行数:7,代码来源:fight.cpp



注:本文中的REMOVE_BIT函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ REMOVE_ENTITY函数代码示例发布时间:2022-05-30
下一篇:
C++ REMARK函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap