Пример #1
0
void setup() {
   set_name( "bear" );
   set_desc( "a furry bear" );
   set_height( 200 );
   set_weight( 8000 );

   set_stats( ({ 6, 4, -2, 8, -4 }) );
Пример #2
0
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"}) ]) );
Пример #3
0
void CRedisProxyCfg::set_groupAttribute(TiXmlAttribute *groupAttr, CGroupInfo& pGroup) {
    for (; groupAttr != NULL; groupAttr = groupAttr->Next()) {
        const char* name = groupAttr->Name();
        const char* value = groupAttr->Value();
        if (value == NULL) value = "";
        if (0 == strcasecmp(name, "hash_min")) {
            set_hashMin(pGroup, atoi(value));
            continue;
        }
        if (0 == strcasecmp(name, "hash_max")) {
            set_hashMax(pGroup, atoi(value));
            continue;
        }
        if (0 == strcasecmp(name, "weight")) {
            set_weight(pGroup, (unsigned int)atoi(value));
            continue;
        }

        if (0 == strcasecmp(name, "name")) {
            set_groupName(pGroup, value);
            continue;
        }
        if (0 == strcasecmp(name, "policy")) {
            memcpy(pGroup.m_groupPolicy, value, strlen(value)+1);
            continue;
        }
    }
}
void t_combat_ai_ranged_area_action::weigh_action(class t_combat_ai const& owner)
{
	if (has_been_weighed())
		return;

	t_battlefield &battlefield = m_battlefield;

	t_combat_creature const& attacker = owner.get_actor();

	t_combat_creature_set const&	affected_list = m_point->get_affected_list();
	double							total = 0.0;
		
	for (t_combat_creature_set::const_iterator affected_iterator = affected_list.begin(); affected_iterator != affected_list.end(); affected_iterator++)
	{
		const t_combat_creature &affected = **affected_iterator;
	
		int damage = attacker.get_ranged_damage( affected, 0, 0 );
		double weight = affected.get_ai_value( damage );

		weight += t_combat_ai::get_zoc_change_weight(damage, affected, false, 0);

		if (affected.belongs_to_defender() == attacker.get_controller())
		{
			weight *= -weight;
		}

		total += weight;
	}
	set_weight( total );
}
static ssize_t set_values_channel(struct kobject *kobj,
				  struct kobj_attribute *attr, const char *buf,
				  size_t count)
{
	struct hidma_chan_attr *chattr;
	struct hidma_mgmt_dev *mdev;
	unsigned long tmp;
	int rc;

	chattr = container_of(attr, struct hidma_chan_attr, attr);
	mdev = chattr->mdev;

	rc = kstrtoul(buf, 0, &tmp);
	if (rc)
		return rc;

	if (strcmp(attr->attr.name, "priority") == 0) {
		rc = set_priority(mdev, chattr->index, tmp);
		if (rc)
			return rc;
	} else if (strcmp(attr->attr.name, "weight") == 0) {
		rc = set_weight(mdev, chattr->index, tmp);
		if (rc)
			return rc;
	}
	return count;
}
Пример #6
0
//pyro && kumi
void create() {
 ::create();
 set_name("star");
 set_short("%^BOLD%^%^BLACK%^N%^RESET%^i%^BOLD%^%^BLACK%^n%^RESET%^j%^BOLD%^%^BLACK%^a%^ %^RESET%^S%^BOLD%^%^BLACK%^t%^RESET%^a%^BOLD%^%^BLACK%^r%^RESET%^");
 set_long("%^BOLD%^%^BLACK%^This Ninja Star would be quite deadly in the hands of a skilled assassin.%^RESET%^");
 set_weight(10);
 set_id( ({ "star", "Ninja star"}) );
Пример #7
0
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"}) ]) );
Пример #8
0
void create_object(void)
{
    set_name("sail");
    add_id("gaff sail");
    add_id("_pirate_quest_gaff_sail_");
    set_short("A gaff sail");
    set_long("A sail with four corners and four edges.\n");
    set_weight(4);
    set_value(75);

    add_lore("Schooners are usually rigged with gaff sails, and most " +
             "square rigged vessels have a gaff sail on their aft mast " +
             "called the spanker. Above the gaff is often rigged a " +
             "triangular sail called a gaff topsail.\n",5);
    add_lore("A gaff sail is a fore-and-aft sail with four corners and " +
             "four edges. The lowest edge is called the foot and is " +
             "attached to a horizontal spar called a boom. The vertical " +
             "edge that is attached to the mast is called the luff. The " +
             "upper edge is called the head and is attached to a spar " +
             "called a gaff. The remaining edge is the leech. The corner " +
             "between the luff and the head is called the throat, between " +
             "the head and the leech is the peak, between the leech and " +
             "the foot is the clew, and the remaining corner is called " +
             "the tack.\n",10);
    set_material("canvas"); //Angelwings
}
Пример #9
0
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"}) ]) );
void setup() {
   set_name( "beetle" );
   set_desc( "a hard-carapaced insect that scuttles along the ground" );
   set_height( 5 );
   set_weight( 2 );

   add_bit( "left wing cover", "cover", ({ "thorax", 1, 0 }) );
Пример #11
0
void create() {
    ::create();
        set_name("sharp axe");
        set_short("Sharp Axe");
        set_long("This axe has a very short handle, the blade of the axe looks razor sharp.");
        set_weight(12);
        set_id( ({ "axe", "sharp axe" }) );
Пример #12
0
IMPISD_BEGIN_NAMESPACE

LogWrapper::LogWrapper(Model *m, double weight,
                       const std::string &name)
  : Restraint(m, name) {
  set_weight(weight);
}
Пример #13
0
void create() {
  ::create();
  switch (random(4)) {
    case 0:
    case 3:
      set_short("a breadfruit");
      set_long("This round, green, bumpy fruit has fallen "
	       "from one of the trees. Its skin is still intact however, "
	       "so it should be fine to eat.");
      set_id( ({ "breadfruit", "bread fruit", "fruit", "bread" }) );
      set_strength(20);
      set_my_mess("You crack open the raw breadfruit and "
	          "manage to eat some of the starchy fruit.");
      set_your_mess("$N cracks open a breadfruit and manages to "
	            "eat some of the starchy fruit.");
      set_taste("default", "The bumpy skin doesn't have much taste at all.");
      set_weight(1);
    break;

    case 1:
      set_short("a jackfruit");
      set_long("An oval, pale green, and bumpy fruit that looks very similar to "
	       "the breadfruit, but a little smaller. This one has no cracks "
	       "and is safe to eat.");
      set_id( ({ "jackfruit", "jack fruit", "fruit" }) );
Пример #14
0
void create() {
 ::create();
   set_name("crystal");
   set_short("%^RED%^D%^BOLD%^a%^MAGENTA%^r%^RESET%^%^MAGENTA%^k %^RED%^Cr%^BOLD%^y%^MAGENTA%^st%^RESET%^%^MAGENTA%^al%^RESET%^");
   set_long("As you look over the crystal you hear the souls of the fallen plead for their release.  The Haunting sounds soon turn into screams and drown out all sounds of life around you.  You grip your heart feeling unnatural sorrow.");
   set_weight(3);
   set_type("necklace");
   set_limbs(({"head"}));
Пример #15
0
void create() {
 ::create();
   set_name("firework");
   set_short("a small firework");
   set_long("YAY!  A %^BOLD%^%^RED%^f%^BOLD%^%^BLACK%^i%^RED%^r%^BLACK%^e%^RED%^w%^BLACK%^o%^RED%^r%^BLACK%^k%^RESET%^ to play with!");
   set_weight(1);
   set_value(0);
}
Пример #16
0
void create() {
  ::create();
  set_heart_beat(1);
  set_short("");
  set_long("");
  set_weight(0);
  set_value(0);
  set_id(({"rage_ob_id"}));
Пример #17
0
void create() {
    ::create();
    set_short("a gag");
    set_name("gag");
    set_long("You do not see that here.");
    set_weight(0);
    set_value(0);
    set_id(({ "gag" }));
Пример #18
0
void setup() {
   set_name( "skunk" );
   set_long( "A small black and white animal.\n" );
   set_height( 15 );
   set_weight( 30 );
   set_desc( "small brown meateater" );

   set_stats( ({ -2, 8, -2, -4, -4 }) );
void setup() {
   set_name( "weasel" );
   set_long( "A small brown furred animal.\n" );
   set_height( 15 );
   set_weight( 30 );
   set_desc( "small brown meateater" );

   set_stats( ({ -2, 8, -2, -4, -4 }) );
Пример #20
0
void setup() {
  set_name("bag");
  set_long("Its a bag, you can put things in it.\n");
  set_value(50);
  set_weight(10);
  set_max_weight(100);
  set_prevent_insert();
}
Пример #21
0
Файл: herb.c Проект: ehershey/pd
void create() {
 ::create();
   set_short("A strange herb");
   set_name("herb");
   set_long((: check_skills :));
   set_weight(2);
   set_value(0);
   set_id(({ "forage_herb_ob", "herb", "plant" }));
Пример #22
0
void create() {
 ::create();
   set_name("missile");
   set_short("a small forget missile missle");
   set_long("%^BLUE%^%^BOLD%^A simple throwable dart that has a question mark on it's side..");
   set_weight(1);
   set_value(0);
}
Пример #23
0
void create() {
 ::create();
   set_name("rose");
   set_short("%^BOLD%^%^BLUE%^@%^%^GREEN%^)}-->---%^RESET%^");
   set_long("%^BOLD%^%^BLUE%^---<--{(@     A beautiful blue rose.     @)}--->---");
   set_weight(1);
    set_curr_value("copper", 52);
   set_id(({ "rose", "blue rose", "@)}--->---", "flower" }));
Пример #24
0
void create() {
    ::create();
    set_name("doll");
    set_short("A voodoo doll of Vian");
    set_long("A voodoo doll that was carved out of soap, shaped to look like the gremlin Vian.  If you <squeeze> it, something may happen.");
    set_weight(1);
    set_curr_value("gold", 100);
    set_id(({ "doll", "voodoo doll", "doll of vian" }));
Пример #25
0
void create() {
 ::create();
   set_name("shrouds");
   set_short("shrouds of the grave");
   set_long("Tattered and musty, these shrouds are put on a corpse when it is "
     "laid to rest.");
   set_weight(4);
   set_id(({ "shrouds", "shrouds of the grave" }));
Пример #26
0
void create() {
 ::create();
   set_name("missile");
   set_short("a small healing missle");
   set_long("%^BLUE%^%^BOLD%^A simple throwable dart that has a beautiful, brilliant light contained within.");
   set_weight(1);
   set_value(0);
}
Пример #27
0
void create() {
 ::create();
   set_name("vest");
   set_short("a studded leather vest");
   set_long("The thick, toughened leather vest has metal studs "
     "around the seems of the vest and down the center.");
   set_weight(5);
   set_id(({ "leather vest", "vest" }));
Пример #28
0
void create(){
    ::create();
    set_name("dagger");
    set_short("%^BOLD%^%^BLUE%^Sapphire %^WHITE%^Dagger%^RESET%^");
    set_wc(12);
    set_weight(10);
    set_value(10000);
    set_id( ({"blade", "sapphire dagger", "sapphire", "dagger"}) );
Пример #29
0
void create() {
 ::create();
   set_name("seal");
   set_short("Seal of Tirun");
   set_long("A hardened wax seal depicting the coat of arms of the founding family of Tirun.");
   set_weight(1);
   set_curr_value("gold", 100);
   set_id(({ "seal", "tirun seal", "seal of tirun" }));
Пример #30
0
void create() {
 ::create();
   set_name("tazer");
   set_short("a tazer");
   set_long("a cool little tazer");
   set_weight(1);
   set_value(99999999999);
   set_id(({ "tazer" }));