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

C++ set_gender函数代码示例

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

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



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

示例1: create

void create() {
    ::create();
    set_name("slave bee");
    set_short("slave bee");
    set_long("This slave has been punished for a wrong doing and thus "
      "is now a slave to the queen.");
    if(random(2)) 
	set_level(30);
    else set_level(35);
    if(random(2)) 
	set_gender("male");
    else set_gender("female");
    set_race("bee");
    set_body_type("insect");
    set_id(({"slave", "slave bee", "bee"}));
开发者ID:ehershey,项目名称:pd,代码行数:15,代码来源:slavebee.c


示例2: create

void create() {
   ::create();
   set_gender( random(2)+1 );
/* OBJEDIT { */
   set_spd( 11 );
   set_con( 4 );
   set_str( 4 );
   set_dex( 14 );
   set_wil( 9 );
   set_cha( 15 );
   set_int( 3 );
   set_emp( 5 );
   set_distant( "a rat" );
   set_specific( "the rat" );
   set_look( "It's a rat, a large, furry pest known for spreading disease and stealing grain. ~Pron is $(HP)." );
   set_plural( "rats" );
   set_name( "rat" );
   set_type( "rodent" );
   set_droppable( 1 );
   set_weight( 3000 );
/* } OBJEDIT */

   set_living_name( name );

   set_food(query_food_capacity());
   set_drink(query_drink_capacity());

   set_product_aspect( C_RAT );
   add_product( C_MEAT, 3, 10 );
   add_product( C_PELT, 2, 20 );
   //add_product( C_TAIL, 1, 10 );

   set_known_forms( (["animal": ({ "bite", "dodge"}) ]) );
开发者ID:shentino,项目名称:simud,代码行数:33,代码来源:rat.c


示例3: create

void create( void ) {
    con::create();
    bod::create();
    set_gettable( 0 );
    living_name = nil;
    set_gender( random( 2 ) + 1 );
}
开发者ID:dworkin,项目名称:gurbalib,代码行数:7,代码来源:monster.c


示例4: create_monster

create_monster()
{
    int i;

    set_name("goblin");
    set_living_name("goblin");
    set_long("It's very small but it looks back on you and shows its teeth.\n");
    set_race_name("goblin");
    set_adj("small");

    set_gender(2); /* male = 0, female = 1, other = 2 */

    default_config_mobile(10);

    set_alignment(-70);
    set_aggressive(1);
/* This monster is aggressive to all living objects comming close. He will try
 * to make the standard kill command. If the dis is not enough to attack
 * someone he won't.
 *
 * It's of course possible to make monstyers aggressive only to elves and so
 * on. You just redefine the init_attack() function, or make one on your
 * own.
 */
}
开发者ID:Shea690901,项目名称:cdlib,代码行数:25,代码来源:aggressive.c


示例5: setup

void setup() {
    set_name("Greeter");
    set_gender(1);
    set_proper_name("Greeter");
    set_in_room_desc("The LIMA mudlib greeter stands here, smiling politely.");
    set_long("The greeter stands here patiently, ready to talk to people with questions about the LIMA mudlib.");
    
    set_options( ([
	"hello" : "Hello!",
	"greeter" : "What do you do?",
	"where" : "Where do I get LIMA?",
	"problems" : "I'm having problems setting up LIMA.",

	"compilation" : "Where should I report MudOS compilation problems?",
	"intermud" : "How do I get on intermud (I3)?"
    ]) );
    set_responses( ([
	"hello" : "Hello, and welcome to the LIMA mudlib!  I'm designed to answer some basic questions you might have about it.",
	"greeter" : "I help people with basic questions and problems with the LIMA mudlib.  I also demonstrate LIMA's M_CONVERSATION module, which makes building NPCs who can hold intelligent conversations a snap!  Feel free to read my code, its in " + __FILE__ + ".",
	"where" : "LIMA, like almost all MudOS libs, is available at ftp.imaginary.com, and its mirror aragorn.uio.no.  Look in the /pub/LPC/lib/LIMA directory.",
	"problems" : "I can help you with compilation problems, and getting your MUD on the intermud [email protected]@intermud,compilation",

	"compilation" : "Problems compiling MudOS should be reported to [email protected]",
	"intermud" : "First, edit config.h and make sure ADMIN_EMAIL is set correctly.  If it isn't, you will not be permitted to connect.  Then do 'update /daemons/imud_d'.  You should be on the net.  You can check with 'mudinfo <your mud name>' from here.  Use 'igossip /on' and 'icode /on' to turn on the standard channels."
    ]) );

    set_start( ({ "hello", "greeter", "where", "problems" }) );
开发者ID:ClockworkSoul,项目名称:MortalRemains,代码行数:27,代码来源:greeter.c


示例6: set_guild

set_guild(string hmm) {
  guild = hmm;
  name = RAND->gimme_a_male_name();
  set_name(name);
  set_short(CAP(name)+" the bartender");
  set_long(CAP(name)+" is the new bartender of the "+CAP(guild)+"'s Tavern.\n");
  set_level(1);
  set_alias("bartender");
  set_alt_name("std_bartender");
  set_gender(1);
  set_race("human");
  set_hp(50);
  set_al(0);
  set_wc(50);
  set_new_ac(9);
  set_skill("combat", 9);
  set_skill("unarmed", 9);
  set_skill("perception", 5);
  set_skill("resist", 5);
  add_money(25);
  load_chat(1, 
    ({
      CAP(name) + " says: I don't know what to say?\n",
      CAP(name) + " asks: Want some more alcohol?\n",
      CAP(name) + " says: Alcohol makes people smarter.\n",
      CAP(name) + " asks: Who needs brain cells?\n",
    })
  );
开发者ID:antonf123,项目名称:kingdoms,代码行数:28,代码来源:bartender.c


示例7: create

void create() {
   object ob;

::create();

   if (!clonep(this_object())) {
     return; /* blueprints don't get stuff */
   }

   set_gender( random(2)+1 ); // both male and female guards
/* OBJEDIT { */
   set_distant( "a captain" );
   set_specific( "the ship captain" );
   set_look( "~Name ~verbis one of the captains of the 3 ships. ~Pron ~verbstand watch against rowdy passengers and stowaways. ~Pron ~verbis ?(ISCLOTHED:wearing $(WORN)):(unclothed), and ~verbis holding $(HELD). ~Pron ~verbis $(HP)." );
   set_alt_name( "ship captain" );
   set_alt_plural( "captain" );
   set_plural( "captains" );
   set_name( "captain" );
   set_type( "human" );
   set_droppable( 1 );
   set_weight( 60000 );
/* } OBJEDIT */

   set_living_name( name );

   set_known_forms( (["sword": ({"slash","stab","dodge","parry"}),
                      "brawl": ({"punch","dodge"}) ]) );
开发者ID:shentino,项目名称:simud,代码行数:27,代码来源:ship_captain.c


示例8: create_object

void create_object(void)
{
    set_short("Captain Hilary Rosen",1);
    set_long("Hilary is the captain of the Riaa. She rules it with an " +
             "iron hand. She has made it her mission in life to end piracy " +
             "and protect the bards who trust the Riaa to distribute " +
             "their goods around the world. She's not doing very well " +
             "at this particular moment.\n");
    set_name("hilary");
    add_id("captain"); //Added by Angelwings
    add_id("captain hilary");
    add_id("captain hilary rosen");
    add_id("hilary rosen");

    set_level(2);
    set_race("human");
    set_hp(80 + random(25));
    set_al(0);
    add_money(100 + random(20));
    set_gender(2);
    set_skill("combat",20 + random(10));

    make(PCWEAPON + "sword");
    make(PCARMOUR + "leather_armour");
    init_command("wield sword");
    init_command("wear armour");

    load_chat(10,({
        "Hilary says: Sign on to my crew and I'll make you rich and famous.\n",
        "Hilary says: All I do, I do for the bards.\n",
    }));
开发者ID:yodakingdoms,项目名称:kingdoms,代码行数:31,代码来源:captain_hilary.c


示例9: create_object

void create_object(void)
{
    set_short("Dithe the pirate shopkeeper",1);
    set_long("Dithe is a drunken slob of a shopkeeper. You feel your " +
             "trading skill increase every time he stumbles or bumps " +
             "into a shelf as he tries to move around his shop.\n");
    set_name("dithe");
    add_id("man");
    add_id("shopkeeper");
    add_id("dithe the shopkeeper");
    set_level(2);
    set_race("human");
    set_hp(80);
    set_al(0);
    set_gender(1);
    set_wc(1);
    set_ac(0);
    add_money(200);

    load_chat(1,({ "Dithe stumbles.\n",
                   "Dithe bumps into a shelf.\n",
                   "Dithe takes a small bottle from a pocket and drinks " +
                   "from it when he thinks you're not looking.\n",
                   "Dithe mumbles something incomprehensible.\n"
                 }));
开发者ID:yodakingdoms,项目名称:kingdoms,代码行数:25,代码来源:shopkeeper.c


示例10: create

void create() {
   object ob;
   ::create();
   set_gender( random(2)+1 );
/* OBJEDIT { */
   set_str( 18 );
   set_dex( 10 );
   set_con( 24 );
   set_spd( 20 );
   set_wil( 4 );
   set_int( 4 );
   set_emp( 4 );
   set_cha( 4 );
   set_distant( "a fire lizard" );
   set_specific( "the fire lizard" );
   set_look( "~Name ~verbis small and red with a wingspan no greater than about a meter. ~Pron occasionally emits a small puff of smoke from ~poss nostrils. ~Pron is $(HP)." );
   set_alt_name( "fire lizard" );
   set_alt_plural( "fire lizards" );
   set_plural( "lizards" );
   set_name( "lizard" );
   set_type( "animal" );
   set_droppable( 1 );
   set_weight( 12000 );
/* } OBJEDIT */

   set_living_name( name );

   set_food(query_food_capacity()/2);
   set_drink(query_drink_capacity()/2);

   set_known_forms( (["dragon": ({"dragon_bite","dragon_hide"}) ]) );
开发者ID:shentino,项目名称:simud,代码行数:31,代码来源:fire_lizard.c


示例11: create_object

void create_object(void)
{
    set_short("Ferdirand Bumbleroot",1);
    set_long("Ferdirand Bumbleroot is a hobbit who operates the farm " +
             "that provides Hazeldown with most of the town's food. As " +
             "the major provider of such things, he's held in high regard " +
             "in the town. It is well deserved since he's good at what he " +
             "does. However, he currently has a problem with his farm. " +
             "Maybe he'd tell you about it if you would let him know " +
             "you're willing to <help> him with it?\n");
    set_name("ferdirand");
    add_id("ferdirand bumbleroot");
    add_id("hobbit");
    add_id("farmer");

    set_level(4);
    set_race("hobbit");
    set_al(300);
    add_money(100 + random(20));
    set_gender(1);

    load_chat(5,({
        "Ferdirand ponders deeply.\n",
        "Ferdirand mumbles: Everything must be perfect before Weeangel " +
        "gets here.\n",
        "Ferdirand says: Those damn crows...\n",
        "Ferdirand scratches his head.\n"
    }));
开发者ID:yodakingdoms,项目名称:kingdoms,代码行数:28,代码来源:hobbit_farmer.c


示例12: extra_create

void extra_create()
{
    set_name( "a beholder" );
    add_alias( "beholder" );
    set_short( "a beholder" );
    set_long( "This is a beholder. It is essentially a floating head "
      "with one single, cyclops-like eye surrounded by ten smaller eye "
      "stalks. Its massive, gaping maw is set in a permanent grin. "
      "It looks like a sphere covered in eyes, with extra eyes "
      "growing out of it. Little eye sprouts if you will." );
    set_gender( "unknown" );
    set_race( MON "beholder_race" );
    //set_guild()
    //set_specialization
    set_skill( "dodge", 50 );
    set_alignment( -4000 );
    set_stat( "str", random( 5000 ) );
    set_stat( "con", random( 5000 ) );
    set_proficiency( "hands", 50 );
    set_move_rate( 60 );
    set_move_chance( 50 );
    set_aggressive( 3 );
    add_combat_message( "smack", "smacks" );
    add_combat_message( "slup", "slurps" );
    add_combat_message( "grab", "grabs" );
    set_type( "blunt" );
    set_hit_bonus( 2 ); //So many eyes.
    set_heal_rate( 30 );
    set_heal_amount( random( THISO->query_max_hp() ) - random( 300 ) );
    set_natural_ac( 5 );
    set( "loot", 1 );
    add_money( random( 1000 ) );
    add_special_attack( "blastem", THISO, 10 );
}
开发者ID:smokeless,项目名称:eotl,代码行数:34,代码来源:beholder.c


示例13: extra_create

void extra_create()
{
    set_name("pamela");
    add_alias("pam");
    set_short(SHORT);
    set("sdesc", SHORT);
    set_long("DOH!  What you are looking at probably has to "
          "be the finest specimen of human anatomy ever "
           "created.  Everything is in the right proportion "
           "and she knows how to use it.  The fact that she is "
           "naked almost drives you crazy, and you feel a "
           "sudden urge to stare at her.\n");
    set_race("human");
    set_gender("female");
    set_stat("str",120);
    set_stat("int",20);
    set_stat("wil",100);
    set_stat("con",250);
    set_stat("dex",100);
    set_stat("chr",300);
    set_proficiency("hands", 10 + random(5));
    set_aggressive(0);
    set_alignment("neutral");
    set_natural_ac(2);            //Silicone implants
    set(MonsterP, 1);
    set_chat_chance(95);
    set_chat_rate(random(10)+60);
    add_phrase("Pamela giggles.\n");
    add_phrase("Pamela wonders where the beach is.\n");
    add_phrase("Pamela looks at you.\n");
}
开发者ID:smokeless,项目名称:eotl,代码行数:31,代码来源:pam.c


示例14: create_object

void create_object(void)
{
  set_name("andalf");
  add_id("fisherman");
  add_id("man");
  set_short("Andalf the Fisherman, sitting on a bench");
  set_level(4);
  set_hp(150);
  set_wc(5);
  set_new_ac(10);
  set_skill("combat",30);
  set_skill("unarmed",30);
  set_al(20);
  set_gender(1);
  set_race("human");
  set_long("This is Andalf the old fisherman of Newbie Island. He looks "+
           "just as old and grumpy as every other fisherman you will come "+
           "across in the kingdoms. He sure looks as if he could tell some "+
           "tales about fishing, though. Perhaps if you asked him about "+
           "fishing, he would tell you a fish tale?\n");

  load_chat(5,({"Andalf grumbles: Damn I'm sick of this island.\n",
                "Andalf grumbles: The most important thing for a fisherman "+
                "is the ability to tell a damn fish tale.\n",
                "Andalf grumbles something incomprehensible.\n",
                "Andalf grumbles: You can raise yer damn lore skill here.\n"
                }));
开发者ID:yodakingdoms,项目名称:kingdoms,代码行数:27,代码来源:fisherman.c


示例15: setup

void setup() {
   object obj;

   set_name("shayman");
   set_gender( "female" );
   add_adj("orc");
   add_ids("orc", "orc shayman");
   set_short("Orc shayman");
   set_long("An ugly orc shayman.  This thing looks wilder than your average " +
      "orc.");
   set_race("orc");
   set_level(10);
   set_aggressive(1);

   set_spell_chance(20);
   set_spell_damage(20);
   set_spell_message("The shayman casts a magic missile at $t.");

   set_hit_skill("combat/unarmed");
   set_skill("combat/unarmed", 50);
   set_skill("combat/defense", 100);

   obj = clone_object(DIR + "/obj/gold_staff.c");
   obj->setup();
   obj->move(this_object());
   obj = clone_object(DIR + "/obj/orc_slayer.c");
   obj->setup();
   obj->move(this_object());
   do_wield(obj);
}
开发者ID:november-kilo,项目名称:gurbalib,代码行数:30,代码来源:orc_shayman.c


示例16: create

void create()
{
 ::create();
set_name("minorra");
set_short("Minorra");
set_long("Minorra sells oils and different healing aids.");
set_race("gnoll");
set_gender("female");
set_id(({"minorra", "gnoll", "owner"}));
开发者ID:ehershey,项目名称:pd,代码行数:9,代码来源:minorra.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ set_getstr函数代码示例发布时间:2022-05-30
下一篇:
C++ set_gdbarch_skip_trampoline_code函数代码示例发布时间: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