Beispiel #1
0
void
objfun_sword_aggro(OBJ_DATA *obj, CHAR_DATA *keeper)
{
    /* Weapon 'draws' an aggro mob's attention to the player */
    /* If fighting,  make cast spells? */
    CHAR_DATA          *vch;

    if (obj->item_type != ITEM_WEAPON)
        return;
    if ((keeper == NULL) || (obj == NULL))
        return;

    if ((get_eq_char(keeper, WEAR_WIELD) != obj)
        && (get_eq_char(keeper, WEAR_WIELD_2) != obj))
        return;
    if (keeper == NULL || keeper->fighting == NULL)
        return;

    for (vch = keeper->in_room->first_person; vch != NULL; vch = vch->next_in_room) {
        if (IS_NPC(vch)
            && (vch->level > keeper->level)
            && IS_SET(vch->act, ACT_AGGRESSIVE)
            && vch->fighting == NULL && number_bits(4) == 0) {
            act("$p carried by $n glows in $s hands.", keeper, obj, NULL, TO_ROOM);
            act("$p carried by you glows in your hands.", keeper, obj, NULL, TO_CHAR);
            act("$p says 'LOOK! LOOK!  $n is here!!'", keeper, obj, NULL, TO_ROOM);
            act("$p says 'LOOK! LOOK!  $n is here!!'", keeper, obj, NULL, TO_CHAR);
            multi_hit(vch, keeper, TYPE_UNDEFINED);
            break;
        }
    }
    return;
}
Beispiel #2
0
// Check if CH can do mf with current weapons
bool check_mf(CHAR_DATA *ch, sh_int gsn)
{
  OBJ_DATA * wield1;
  OBJ_DATA * wield2;

  wield1 = get_eq_char(ch,WEAR_WIELD);
  wield2 = get_eq_char(ch,WEAR_SECOND_WIELD);
 
  if (!wield1)
  { 
      if (gsn != gsn_martialarts)
      {
  	  return FALSE;
      }
      else
      {
	return TRUE;
      }
  }

  if (wield1->item_type != ITEM_WEAPON) {
	return FALSE;
  }

  if (wield1->value[0] != get_mf_weapontype(gsn))
  {
  	return FALSE;
  }
  
  if ((gsn == gsn_duelling) && wield1 != NULL && wield2 != NULL && (wield1->value[0]== WEAPON_DAGGER && wield2->value[0] == WEAPON_DAGGER)) //duelling
  {
  	 	return TRUE;
  } 
  
  if ((gsn == gsn_speardancer) && wield1 != NULL && wield2 != NULL && (wield1->value[0]== WEAPON_SPEAR && wield2->value[0] == WEAPON_SPEAR)) //Speardancer
  {
  	 	return TRUE;
  } 

  //Shields allowed with speardancer
  if ((gsn == gsn_speardancer) && wield1 != NULL && wield1->value[0] == WEAPON_SPEAR && get_eq_char(ch, WEAR_SHIELD != NULL))
  {
    return TRUE;
  }
  
  // If wielding a shield also
  if (get_eq_char(ch, WEAR_SHIELD) != NULL && !IS_SET(ch->merits, MERIT_AMBIDEXTROUS)) {
    return FALSE;
  }

  // Only with 1 weapon unless ambidex merit
  if (get_eq_char(ch, WEAR_SECOND_WIELD) != NULL && !IS_SET(ch->merits, MERIT_AMBIDEXTROUS))
  {
    return FALSE;
  }
  
  return TRUE;
}	
Beispiel #3
0
bool check_razorblade(CHAR_DATA *ch, CHAR_DATA *victim, int type, int spell)
{
    if(get_eq_char(ch,WEAR_WIELD))
        return TRUE;

    if(get_eq_char(ch,WEAR_HOLD))
        return TRUE;

    if(get_eq_char(ch,WEAR_SECOND))
        return TRUE;

    if(get_eq_char(ch,WEAR_HANDS))
        return TRUE;

    if(get_eq_char(ch,WEAR_WRIST_R))
        return TRUE;

    if(get_eq_char(ch,WEAR_WRIST_L))
        return TRUE;

    if(get_eq_char(ch,WEAR_LIGHT))
        return TRUE;

    if(get_eq_char(ch,WEAR_SHIELD))
        return TRUE;

    if(get_eq_char(ch,WEAR_INSTRUMENT))
        return TRUE;


    return FALSE;
}
Beispiel #4
0
void
objfun_cast_fight(OBJ_DATA *obj, CHAR_DATA *keeper)
{
    int                 sn;
    CHAR_DATA          *victim;
    int                 min_lev;
    char               *spell = "";

    if (keeper == NULL || (keeper->fighting == NULL)
        || (obj->item_type != ITEM_WEAPON))
        return;
    if ((get_eq_char(keeper, WEAR_WIELD) != obj)
        && (get_eq_char(keeper, WEAR_WIELD_2) != obj))
        return;                    /* Must be wielded to work */
    for (victim = keeper->in_room->first_person; victim != NULL; victim = victim->next_in_room)
        if (victim->fighting == keeper && number_bits(2) == 0)
            break;

    if ((victim == NULL)
        || (victim->is_free != FALSE))
        return;
    switch (number_range(0, 5)) {
        case 0:
            min_lev = 5;
            spell = "magic missile";
            break;
        case 1:
            min_lev = 7;
            spell = "colour spray";
            break;
        case 2:
            min_lev = 8;
            spell = "chill touch";
            break;
        case 3:
            min_lev = 30;
            spell = "fireball";
            break;
        case 4:
            min_lev = 55;
            spell = "flamestrike";
            break;
        case 5:
            min_lev = 30;
            spell = "lightning bolt";
            break;
    }
    if ((sn = skill_lookup(spell)) < 0)
        return;
    act("$p glows brightly at $n!", victim, obj, NULL, TO_ROOM);
    act("$p glows brightly at you!", victim, obj, NULL, TO_CHAR);
    obj_cast_spell(sn, obj->level, keeper, victim, obj);
    return;
}
/*
 * Check for parry.
 */
bool check_parry( CHAR_DATA *ch, CHAR_DATA *victim )
{
	int chance;

	if ( !IS_AWAKE(victim) )
		return FALSE;

	chance = get_skill(victim,gsn_parry) / 2;

	if ( get_eq_char( victim, WEAR_WIELD ) == NULL )
	{
		if (IS_NPC(victim))
			chance /= 2;
		else
			return FALSE;
	}

	if (!can_see(ch,victim))
		return FALSE;

	if ( dice_rolls(ch, chance,8) >= 1 )
		return FALSE;

	act( "You parry $n's attack.",  ch, NULL, victim, TO_VICT, 1 );
	act( "$N parries your attack.", ch, NULL, victim, TO_CHAR, 1 );
	return TRUE;
}
Beispiel #6
0
void spell_portal( int sn, int level, CHAR_DATA *ch, void *vo,int target)
{
    CHAR_DATA *victim;
    OBJ_DATA *portal, *stone;

        if ( ( victim = get_char_world( ch, target_name ) ) == NULL
    ||   victim == ch
    ||   victim->in_room == NULL
    ||   !can_see_room(ch,victim->in_room)
    ||   IS_SET(victim->in_room->room_flags, ROOM_SAFE)
    ||   IS_SET(victim->in_room->room_flags, ROOM_PRIVATE)
    ||   IS_SET(victim->in_room->room_flags, ROOM_SOLITARY)
    ||   IS_SET(victim->in_room->room_flags, ROOM_DRAGONPIT)
    ||   IS_SET(ch->in_room->room_flags, ROOM_DRAGONPIT)
    ||   IS_SET(victim->in_room->room_flags, ROOM_NO_RECALL)
    ||   IS_SET(victim->in_room->area->area_flags, AREA_PROTO )
    ||   IS_SET(ch->in_room->room_flags, ROOM_NO_RECALL)
    ||   victim->level >= level + 3
    ||   (!IS_NPC(victim) && victim->level >= LEVEL_HERO) 
    ||   (IS_NPC(victim) && IS_SET(victim->imm_flags,IMM_SUMMON))
    ||   (IS_NPC(victim) && saves_spell( level, victim,DAM_NONE) )
    ||   (is_clan(victim) && !is_same_clan(ch,victim)))
    {
        send_to_char( "You failed.\n\r", ch );
        return;
    }   

 if (!IS_IMP(ch))
    {
    if (IS_IMMORTAL(ch))
      {
       send_to_char("\n\r{rIMMs can use {RGOTO{r so there is no reason to be opening {RPORTAL{r.{x\n\r",ch);
       return;
      }
    }

    stone = get_eq_char(ch,WEAR_HOLD);
    if (!IS_IMMORTAL(ch) 
    &&  (stone == NULL || stone->item_type != ITEM_WARP_STONE))
    {
	send_to_char("You lack the proper component for this spell.\n\r",ch);
	return;
    }

    if (stone != NULL && stone->item_type == ITEM_WARP_STONE)
    {
     	act("You draw upon the power of $p.",ch,stone,NULL,TO_CHAR);
     	//act("It flares brightly and vanishes!",ch,stone,NULL,TO_CHAR);
     	//extract_obj(stone);
    }

    portal = create_object(get_obj_index(OBJ_VNUM_PORTAL),0);
    portal->timer = 2 + level / 25; 
    portal->value[3] = victim->in_room->vnum;

    obj_to_room(portal,ch->in_room);

    act("$p rises up from the ground.",ch,portal,NULL,TO_ROOM);
    act("$p rises up before you.",ch,portal,NULL,TO_CHAR);
}
Beispiel #7
0
bool check_sp_hammer(CHAR_DATA *ch, CHAR_DATA *victim, int type, int spell)
{
    if(get_eq_char(ch,WEAR_WIELD))
        return TRUE;

    return FALSE;
}
/*
 * Disarm a creature.
 * Caller must check for successful attack.
 */
void disarm( CHAR_DATA *ch, CHAR_DATA *victim )
{
    OBJ_DATA *obj;

    if ( ( obj = get_eq_char( victim, WEAR_WIELD ) ) == NULL )
	return;

    if ( IS_OBJ_STAT(obj,ITEM_NOREMOVE))
    {
	act("$S weapon won't budge!",ch,NULL,victim,TO_CHAR, 1);
	act("$n tries to disarm you, but your weapon won't budge!",
	    ch,NULL,victim,TO_VICT, 0);
	act("$n tries to disarm $N, but fails.",ch,NULL,victim,TO_NOTVICT, 0);
	return;
    }

    act( "$n DISARMS you and sends your weapon flying!",
	 ch, NULL, victim, TO_VICT, 1 );
    act( "You disarm $N!",  ch, NULL, victim, TO_CHAR, 1 );
    act( "$n disarms $N!",  ch, NULL, victim, TO_NOTVICT, 0 );

    obj_from_char( obj );
    if ( IS_OBJ_STAT(obj,ITEM_NODROP) || IS_OBJ_STAT(obj,ITEM_INVENTORY) )
	obj_to_char( obj, victim );
    else
    {
	obj_to_room( obj, victim->in_room );
	if (IS_NPC(victim) && victim->wait == 0 && can_see_obj(victim,obj))
	    get_obj(victim,obj,NULL);
    }

    return;
}
Beispiel #9
0
void soul_sword (CHAR_DATA *ch)
{
	//Soul Sword can rarely kill victims outright, and does 1 dmg, and is VERY unlikely to hit. UNGODLY Expensive
	CHAR_DATA *victim;
	OBJ_DATA *katana;
	char buf[MAX_STRING_LENGTH];
	int thebonus = 0;
	
	if (IS_NPC(ch))		return;

	katana = get_eq_char(ch, WEAR_WIELD);
	
	if ((victim = ch->fighting) == NULL)
	{
		send_to_char("You find no need for this now.\n\r",ch);
		return;
	}
	
	if (IS_NPC(victim))		thebonus = 45;
		else				thebonus = 7;
	if (ch->mana < 30000)
	{
		send_to_char("You have not the 30000 mana power to use this.\n\r",ch);
		return;
	}
	
	if ((katana == NULL) || (katana->pIndexData->vnum != 33176))
	{
		send_to_char("Without a proper katana the energy will destroy your weapon.\n\r",ch);
		return;
	}
	ch->mana -= 30000;
	send_to_char("You channel mystical energy into your katana.\n\r",ch);
	do_say(ch,"#0SOUL #nSWORD!");
	
	act("A bolt of light shoots out of your katana and into $N",ch, NULL, victim, TO_CHAR);
	act("A bolt of light shoots out of $n's katana and into you!", ch, NULL, victim, TO_VICT);
	act("A bolt of light shoots out of $n's katana and into $N!", ch, NULL, victim, TO_NOTVICT);

	if (number_range(0,250) > (4 + thebonus))  // Was .5% now it's 5%/20%
	{
		act("Your attack was ineffective.", ch, NULL, victim, TO_CHAR);
		act("$n looks confused as nothing happens.", ch, NULL, NULL, TO_ROOM);
		multi_hit( ch, victim, TYPE_UNDEFINED );
		WAIT_STATE(ch, (PULSE_VIOLENCE * 5));
		return;
	}
	
	xprintf(buf,"$N screams as $E is ripped apart by the dark energy. #R[#y#b MORTAL #n#R]#n");
	act(buf, ch, NULL, victim, TO_CHAR);
	xprintf(buf,"$n looks on as you start screaming while dark energy rips you apart from the inside out. #R[#y#b MORTAL #n#R]#n");
	act(buf, ch, NULL, victim, TO_VICT);
	send_to_char("You crumple to the ground.\n\r", victim);
	act("$n looks on as $N starts screaming.  Weakened $N crumples to the ground.", ch, NULL, victim, TO_NOTVICT);
	WAIT_STATE(ch, (PULSE_VIOLENCE * 5));
	victim->hit = -10;
	hurt_person(ch, victim, 1);
	return;
}
Beispiel #10
0
void drain_sword (CHAR_DATA *ch)
{
	//Drain Sword sucks health from a victim, and is moderately likely to hit. Avg Expense, Low Dmg
	CHAR_DATA *victim;
	OBJ_DATA *katana;
	char buf[MAX_STRING_LENGTH];
	int dmg;
	int heal;
	
	if (IS_NPC(ch))	return;

	katana = get_eq_char(ch, WEAR_WIELD);
	
	if ((victim = ch->fighting) == NULL)
	{
		send_to_char("You find no need for this now.\n\r",ch);
		return;
	}
	
	if (ch->mana < 4000)
	{
		send_to_char("You have not the 4000 mystical power to use this.\n\r",ch);
		return;
	}
	
	if ((katana == NULL) || (katana->pIndexData->vnum != 33176))
	{
		send_to_char("Without a proper katana the energy will destroy your weapon.\n\r",ch);
		return;
	}
	ch->mana -= 4000;
	send_to_char("You channel mystical energy into your katana.\n\r",ch);
	do_say(ch,"#nD#0R#yA#0I#nN #nSWORD!");
	send_to_char("A wave of energy launches itself from your katana.\n\r",ch);
	act("A wave of energy launches itself from $n's katana!", ch, NULL, NULL, TO_ROOM);

	if (number_range(0,100) < 20)
	{
		act("Your wave of energy goes through $N, continues on a bit then fades.", ch, NULL, victim, TO_CHAR);
		act("The wave of energy goes through you, continues on a bit then fades.", ch, NULL, victim, TO_VICT);
		act("The wave of energy goes through $N, continues on a bit then fades.", ch, NULL, victim, TO_NOTVICT);
		return;
	}

	dmg = number_range(ch->wpn[1], ch->wpn[1] * 2);
	heal = number_range(dmg / 3, dmg / 2);
	
	xprintf(buf,"Your wave of energy enters $N's body and drains %d health painfully from $N. #R[#R#b %d #n#R]#n", heal, dmg);
	act(buf, ch, NULL, victim, TO_CHAR);
	xprintf(buf,"$n's wave of energy enters your body and drains you painfully. #R[#R#b %d #n#R]#n", dmg);
	act(buf, ch, NULL, victim, TO_VICT);
	act("$n's wave of energy enters $N's body causing $N to look weak.", ch, NULL, victim, TO_NOTVICT);
	hurt_person(ch, victim, dmg);
	ch->hit += heal;
	if (ch->hit > ch->max_hit)	ch->hit = ch->max_hit;	
	WAIT_STATE(ch, (PULSE_VIOLENCE * 3));
	return;
}
Beispiel #11
0
void fire_sword (CHAR_DATA *ch)
{
	//Flame Cone Sword sets victim aflame, and is VERY likely to hit. More Expense, Low Dmg
	CHAR_DATA *victim;
	OBJ_DATA *katana;
	char buf[MAX_STRING_LENGTH];
	int dmg;
	
	if (IS_NPC(ch))	return;

	katana = get_eq_char(ch, WEAR_WIELD);
	
	if ((victim = ch->fighting) == NULL)
	{
		send_to_char("You find no need for this now.\n\r",ch);
		return;
	}
	
	if (ch->mana < 3500)
	{
		send_to_char("You have not the 3500 mystical power to use this.\n\r",ch);
		return;
	}
	
	if ((katana == NULL) || (katana->pIndexData->vnum != 33176))
	{
		send_to_char("Without a proper katana the energy will destroy your weapon.\n\r",ch);
		return;
	}
	ch->mana -= 3500;
	send_to_char("You channel mystical energy into your katana.\n\r",ch);
	do_say(ch,"#rF#RIR#rE #nSWORD!");
	send_to_char("A tremendous cone of flame shoots from your katana.\n\r",ch);
	act("A tremendous cone of flame shoots from $n's katana!", ch, NULL, NULL, TO_ROOM);

	if (number_range(0,100) < 5)
	{
		act("Your cone of flame flashes past $N and scorches the ground.", ch, NULL, victim, TO_CHAR);
		act("The cone of flame flashes past you and scorches the ground.", ch, NULL, victim, TO_VICT);
		act("The cone of flame flashes past $N and scorches the ground.", ch, NULL, victim, TO_NOTVICT);
		return;
	}

	dmg = number_range(ch->wpn[1], ch->wpn[1] * 2);
	
	xprintf(buf,"Your cone of flame engulfs $N's in a sheet of flame. #R[#R#b %d #n#R]#n", dmg);
	act(buf, ch, NULL, victim, TO_CHAR);
	xprintf(buf,"$n's cone of flame engulfs you in a sheet of flame. #R[#R#b %d #n#R]#n", dmg);
	act(buf, ch, NULL, victim, TO_VICT);
	act("$n's engulfs $N's in a sheet of flame.", ch, NULL, victim, TO_NOTVICT);
	hurt_person(ch, victim, dmg);	
	WAIT_STATE(ch, (PULSE_VIOLENCE * 3));
	if (!IS_SET(victim->affected_by, AFF_FLAMING))
		SET_BIT(victim->affected_by, AFF_FLAMING);
	return;
}
Beispiel #12
0
void lightning_sword (CHAR_DATA *ch)
{
	//Lightning Stuns Victim and is fairly likely to hit, Avg Expense, Avg Damage

	CHAR_DATA *victim;
	OBJ_DATA *katana;
	char buf[MAX_STRING_LENGTH];
	int dmg;
	
	if (IS_NPC(ch))	return;
	
	katana = get_eq_char(ch, WEAR_WIELD);
	
	if ((victim = ch->fighting) == NULL)
	{
		send_to_char("You find no need for this now.\n\r",ch);
		return;
	}
	
	if (ch->mana < 2500)
	{
		send_to_char("You have not the 2500 mana to use this.\n\r",ch);
		return;
	}
	
	if ((katana == NULL) || (katana->pIndexData->vnum != 33176))
	{
		send_to_char("Without a proper katana the energy will destroy your weapon.\n\r",ch);
		return;
	}
	ch->mana -= 2500;
	send_to_char("You channel mystical energy into your katana.\n\r",ch);
	do_say(ch,"#b#cL#CI#cG#CH#cT#CN#cI#CN#cG #nSWORD!");
	send_to_char("A humongous bolt of lightning blasts from your katana.\n\r",ch);
	act("A humongous bolt of lightning blasts from $n's katana!", ch, NULL, NULL, TO_ROOM);

	if (number_range(0,100) < 16)
	{
		act("Your lightning blast flies past $N and is absorbed by the ground.", ch, NULL, victim, TO_CHAR);
		act("The lightning blast slams into the ground and is absorbed.", ch, NULL, NULL, TO_ROOM);
		return;
	}

	dmg = number_range(ch->wpn[1], ch->wpn[1] * 3);
	
	xprintf(buf,"Your lightning blast slams into $N's and crackles around $S body sending them sprawling. #R[#C#b %d #n#R]#n", dmg);
		act(buf, ch, NULL, victim, TO_CHAR);
	xprintf(buf,"$n's lightning blast slams into you and crackles around your body sending you sprawling. #R[#C#b %d #n#R]#n", dmg);
		act(buf, ch, NULL, victim, TO_VICT);
		act("$n's lightning blast slams into $N's and crackles around $S body sending $N sprawling.", ch, NULL, victim, TO_NOTVICT);
	hurt_person(ch, victim, dmg);	
	WAIT_STATE(ch, (PULSE_VIOLENCE * 3));
	if (victim->position > POS_STUNNED)
		victim->position = POS_STUNNED;
	return;
}
Beispiel #13
0
bool remove_obj(Character *ch, int iWear, bool fReplace)
{
    Object *obj;

    if ((obj = get_eq_char(ch, iWear)) == NULL) {
        return true;
    }

    if (!fReplace) {
        return false;
    }
    unequip_char(ch, obj);
    act(TO_ROOM, ch, obj, 0, "$n stops using $p.");
    act(TO_CHAR, ch, obj, 0, "You stop using $p.");
    return true;
}
Beispiel #14
0
/* ciut przerobione */
void found_prey( CHAR_DATA *ch, CHAR_DATA *victim )
{
	OBJ_DATA *weapon;
	char * target;

	if ( !victim )
	{
	bug( "Found_prey: null victim", 0 );
	return;
	}

	if ( !victim->in_room )
	{
		bug( "Found_prey: null victim->in_room", 0 );
		return;
	}

	if ( !can_see( ch, victim ) )
	return;

	if ( is_safe( ch, victim ) )
	return;

	stop_hunting( ch );

	if( (weapon = get_eq_char(ch, WEAR_WIELD)) != NULL )
	{
		if( (target = get_target_by_name(ch,victim)) == NULL)
		target = victim->name;

	if(weapon->value[0] == WEAPON_DAGGER && get_skill(ch, gsn_backstab) > 0)
	{
		do_function(ch, &do_backstab, target );
	}
		else if ( get_skill(ch, gsn_charge) > 0 && IS_WEAPON_STAT( weapon, WEAPON_TWO_HANDS ) && weapon->value[0] != WEAPON_WHIP && weapon->value[0] != WEAPON_SHORTSWORD && weapon->value[0] != WEAPON_DAGGER )
	{
		do_function(ch, &do_charge, target );
	}
	else
		multi_hit( ch, victim, TYPE_UNDEFINED );
	return;
	}

	multi_hit( ch, victim, TYPE_UNDEFINED );
	return;
}
void show_char_to_char_2(struct char_data *victim, struct char_data *ch)
{
    struct gameobject *obj;
    struct dynamic_skill *skill_peek;
    int iWear;
    bool found;

    if (can_see(victim, ch)) {
	if (ch == victim) {
	    act("$n glances at $mself.", ch, NULL, NULL, TO_ROOM);
	} else {
	    act("$n glances at you.", ch, NULL, victim, TO_VICT);
	    act("$n glances at $N.", ch, NULL, victim, TO_NOTVICT);
	}
    }

    show_damage_display(ch, victim);

    found = false;
    for (iWear = 0; where_name[iWear].wear_loc >= 0; iWear++) {
	if ((obj = get_eq_char(victim, where_name[iWear].wear_loc)) != NULL
		&& can_see_obj(ch, obj)) {
	    if (!found) {
		send_to_char("\n\r", ch);
		act("$N is using:", ch, NULL, victim, TO_CHAR);
		found = true;
	    }
	    send_to_char(where_name[iWear].desc, ch);
	    send_to_char("(", ch);
	    send_to_char(format_obj_to_char(obj, ch, true), ch);
	    send_to_char(")", ch);
	    send_to_char("\n\r", ch);
	}
    }

    if (victim != ch && !IS_NPC(ch)
	    && (skill_peek = gsp_peek) != NULL
	    && number_percent() < get_learned_percent(ch, skill_peek)) {
	send_to_char("\n\rYou peek at the inventory:\n\r", ch);
	check_improve(ch, skill_peek, true, 4);
	show_list_to_char(victim->carrying, ch, true, true);
    }

    return;
}
void look_equipment(struct char_data *ch) {
    struct gameobject *obj;
    int iWear;

    send_to_char("`&  You are using: \n\r ------------------``\n\r", ch);
    for (iWear = 0; where_name[iWear].wear_loc >= 0; iWear++) {
	if ((obj = get_eq_char(ch, where_name[iWear].wear_loc)) == NULL) {
	    if (!(IS_SET(ch->act, PLR_AUTOEQ)))
		continue;

	    send_to_char("`1", ch);
	    send_to_char(where_name[iWear].desc, ch);

	    if (where_name[iWear].wear_loc == WEAR_THIRD) {
		send_to_char("`1     --Not Available--``\r\n", ch);
	    } else {
		if ((where_name[iWear].wear_loc == WEAR_FINGER_L2)) {
		    send_to_char("`1     --Not Available--``\r\n", ch);
		} else {
		    if ((where_name[iWear].wear_loc == WEAR_FINGER_R2)) {
			send_to_char("`1     --Not Available--``\r\n", ch);
		    } else {
			send_to_char("`1     --Empty--``\r\n", ch);
		    }
		}
	    }
	    continue;
	}

	send_to_char("`7", ch);
	send_to_char(where_name[iWear].desc, ch);
	send_to_char("`&", ch);
	if (can_see_obj(ch, obj)) {
	    send_to_char("`&", ch);
	    send_to_char(format_obj_to_char(obj, ch, true), ch);
	    send_to_char("``\n\r", ch);
	} else {
	    send_to_char("`&something.\n\r", ch);
	}
    }

    send_to_char("`8", ch);
}
Beispiel #17
0
bool check_sp_armor(CHAR_DATA *ch, CHAR_DATA *victim, int type, int spell)
{
    /* tylko dla personow */
    if(!IS_SET(race_table[GET_RACE(ch)].type, PERSON))
        return TRUE;

    if( !get_eq_char(ch,WEAR_HEAD) ||
            !get_eq_char(ch,WEAR_BODY) ||
            !get_eq_char(ch,WEAR_LEGS) ||
            !get_eq_char(ch,WEAR_ARMS) ||
            !get_eq_char(ch,WEAR_HANDS) ||
            !get_eq_char(ch,WEAR_FEET))
        return FALSE;

    return TRUE;
}
Beispiel #18
0
sh_int find_relevant_masterform(CHAR_DATA *ch)
{
	OBJ_DATA * obj;
	int weapon_type = WEAPON_NONE;
	sh_int masterform = 0;
	int i;
	obj = get_eq_char( ch, WEAR_WIELD );
			
	if (obj != NULL)
		weapon_type = obj->value[0];
		
	for (i = 0; i < MASTERFORMS; i++)
	{
		if (masterformslookup_table[i].weapontype == weapon_type)
	   {
			masterform = masterformslookup_table[i].gsn;   	
	   		break;
	   }
	}
	return masterform;
	
}
Beispiel #19
0
bool check_holy_wea(CHAR_DATA *ch, CHAR_DATA *victim, int type, int spell)
{
    if(get_eq_char(ch,WEAR_WIELD))
        return TRUE;

    if(get_eq_char(ch,WEAR_HOLD))
        return TRUE;

    if(get_eq_char(ch,WEAR_SECOND))
        return TRUE;

    if(get_eq_char(ch,WEAR_LIGHT))
        return TRUE;

    if(get_eq_char(ch,WEAR_SHIELD))
        return TRUE;

    if(get_eq_char(ch,WEAR_INSTRUMENT))
        return TRUE;

    return FALSE;
}
Beispiel #20
0
void do_pipe ( CHAR_DATA *ch, char *argument )
{
	OBJ_DATA * pObj;
	OBJ_DATA * qObj;
	char *pipe_name;
	char pipe_name_2[MAX_INPUT_LENGTH];
	int amount, range, weed_amount, weed_type, dex, wis, con;
	AFFECT_DATA *old_smoke, *old_poison;
	AFFECT_DATA new_smoke, poison;
	int dur = 1, old_dur = 0, old_level = 0, level = 1;

	char buf[ MAX_INPUT_LENGTH ];

	char arg1[ MAX_INPUT_LENGTH ];
	char arg2[ MAX_INPUT_LENGTH ];
	char arg3[ MAX_INPUT_LENGTH ];
	char arg4[ MAX_INPUT_LENGTH ];

	// mobom dziêkujemy bez komunikatu
	if ( IS_NPC( ch ) )
	{
		return ;
	}

    // w czasie walki dziêkujemy z komunikatem
    if ( ch->position == POS_FIGHTING || ch->fighting != NULL )
	{
		send_to_char( "Lepiej skup siê na walce.\n\r", ch );
		return;
    }

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

	pObj = get_obj_carry( ch, arg2, ch );

	if ( arg1[ 0 ] == '\0' )
	{
		send_to_char( "Co takiego chcesz zrobiæ z fajk±?\n\r", ch );
		send_to_char( "{R[PORADA]:{y 'Je¿eli nie wiesz, co mo¿esz, wpisz {Rhelp pipe{x / {Cpomoc fajka{x.{Y'{x\n\r", ch );
		return;
	}

	if ( !str_prefix( arg1, "smoke" ) || !str_prefix( arg1, "pal" ))
	{
		if ( arg2[ 0 ] == '\0' )
		{
			send_to_char( "Paliæ co?\n\r", ch );
			return ;
		}

		// je¿eli obiekt nieistnieje w inventory, to mo¿e kto¶ co¶ takiego trzyma

		if ( pObj == NULL ) pObj = get_eq_char( ch, WEAR_HOLD );

		if ( pObj == NULL )
		{
			send_to_char( "Potrzebujesz fajki ¿eby paliæ ziele fajkowe.\n\r", ch );
			return ;
		}

		/*if ( ( pObj = get_obj_carry( ch, arg2, ch ) ) == NULL )
		{
			send_to_char( "Potrzebujesz fajki ¿eby paliæ ziele fajkowe.\n\r", ch );
			return ;
		}*/

		if ( pObj->item_type != ITEM_PIPE )
		{
			send_to_char( "Potrzebujesz fajki ¿eby paliæ ziele fajkowe.\n\r", ch );
			return ;
		}

		/* Gdy fajka jest pusta... */
		if ( pObj->value[ 1 ] <= 0 )
		{
			act( "W $j nie ma niczego, co móg³by¶ paliæ! Jest pusta.", ch, pObj, NULL, TO_CHAR );
			act( "$n spogl±da z dziwnym smutkiem na $h.", ch, pObj, NULL, TO_ROOM );
			return ;
		}

		/* Gdy fajka jest zgaszona*/
		if ( pObj->value[ 0 ] == 0 )
		{
			act( "Przecie¿ $p jest zgaszona!", ch, pObj, NULL, TO_CHAR );
			return ;
		}

		/* Flaga informujaca o tym, ze gracz sobie pociagnal dymka... */
		if ( !EXT_IS_SET( ch->act, PLR_SMOKED ) )
			EXT_SET_BIT( ch->act, PLR_SMOKED );

		if ( is_affected( ch, gsn_on_smoke ) )
		{
			old_smoke = affect_find( ch->affected, gsn_on_smoke );
			old_dur = old_smoke->duration;
			old_level = old_smoke->level;
			affect_strip( ch, gsn_on_smoke );
		}

		level = weed_table[ pObj->value[2] ].weed_affect[0];

		dur += old_dur;
		level += old_level;

		new_smoke.where = TO_AFFECTS;
		new_smoke.type = gsn_on_smoke;
		new_smoke.level = level;
		new_smoke.duration = UMIN( dur, number_range( 5, 7 ) );
		new_smoke.rt_duration = 0;
		new_smoke.location = APPLY_NONE;
		new_smoke.modifier = 0;
		new_smoke.bitvector = &AFF_NONE;

		if ( level > number_range( 5, 7 ) && weed_table[ pObj->value[2] ].weed_affect[0] && number_percent() < weed_table[ pObj->value[2] ].weed_affect[1] )
		{
			send_to_char( "\n\rZaczynasz czuæ siê jako¶ dziwnie. Przed oczyma zaczynaj± lataæ ci kolorowe plamki.\n\r", ch );
			act( "\n\r$n zaczyna wygl±dajaæ jako¶ dziwnie blado.", ch, pObj, NULL, TO_ROOM );
			if ( dice( 1, 2 ) == 1 )
				new_smoke.bitvector = &AFF_HALLUCINATIONS_NEGATIVE;
			else
				new_smoke.bitvector = &AFF_HALLUCINATIONS_POSITIVE;
		}
		new_smoke.visible = FALSE;
		affect_to_char( ch, &new_smoke, NULL, FALSE );

		if ( number_percent() < weed_table[ pObj->value[2] ].weed_affect[2] )
		{
			if( is_affected(ch,gsn_poison ))
			{
				old_poison = affect_find( ch->affected, gsn_poison );
				old_poison->duration += stat_throw(ch,STAT_CON) ? number_range(2,4) : number_range(4,8);
				if( old_poison->level < UMIN( weed_table[ pObj->value[2] ].weed_affect[0], 3) )
					old_poison->level = UMIN( weed_table[ pObj->value[2] ].weed_affect[0], 3);
				act( "$n jeszcze bardziej zielenieje na twarzy.", ch, pObj, NULL, TO_ROOM );
				send_to_char( "Czujesz siê jeszcze gorzej.\n\r", ch );
			}
			else
			{
				poison.where = TO_AFFECTS;
				poison.type = gsn_poison;
				poison.level = UMIN( weed_table[ pObj->value[2] ].weed_affect[0], 3);
				poison.duration = stat_throw(ch,STAT_CON) ? number_range(2,4) : number_range(4,8);
				poison.rt_duration = 0;
				poison.location = APPLY_NONE;
				poison.modifier = 0;
				poison.bitvector = &AFF_NONE;
				poison.visible = FALSE;
				affect_to_char( ch, &poison, NULL, FALSE );
				send_to_char( "Momentalnie zaczynasz czuæ siê jako¶ niedobrze. Bardzo niedobrze.\n\r", ch );
				act( "$n widocznie zielenieje na twarzy.", ch, pObj, NULL, TO_ROOM );
			}
		}

		/* Troche losowosci */
		range = number_range( 1, 9 );
		switch ( range )
		{
			case 1:
				act( "$n zaci±ga siê g³êboko $j.", ch, pObj, NULL, TO_ROOM );
				act( "Zaci±gasz siê g³êboko $j.", ch, pObj, NULL, TO_CHAR );
				break;
			case 2:
				act( "$n pyka sobie $h przez chwilê.", ch, pObj, NULL, TO_ROOM );
				act( "Pykasz sobie $h przez chwilê.", ch, pObj, NULL, TO_CHAR );
				break;
			case 3:
				act( "$n wci±ga gwa³townie dym z $f.", ch, pObj, NULL, TO_ROOM );
				act( "Wci±gasz gwa³townie dym z $f.", ch, pObj, NULL, TO_CHAR );
				break;
			case 4:
				act( "$n zaci±ga siê delikatnie $j.", ch, pObj, NULL, TO_ROOM );
				act( "Zaci±gasz siê delikatnie $j.", ch, pObj, NULL, TO_CHAR );
				break;
			case 5:
				act( "Widzisz jak $n zaci±ga siê lekko $j.", ch, pObj, NULL, TO_ROOM );
				act( "Zaci±gasz siê lekko $j.", ch, pObj, NULL, TO_CHAR );
				break;
			case 6:
				act( "Dostrzegasz, jak $n z wpraw± zaci±ga siê dymkiem z $f.", ch, pObj, NULL, TO_ROOM );
				act( "Z wielk± wpraw± zaci±gasz siê dymkiem z $f.", ch, pObj, NULL, TO_CHAR );
				break;
			case 7:
				act( "$n jakby od niechcenia pali przez chwilê swoj± $h.", ch, pObj, NULL, TO_ROOM );
				act( "Przez chwilkê machinalnie palisz sobie swoj± $h.", ch, pObj, NULL, TO_CHAR );
				break;
			case 8:
				act( "$n z u¶miechem kurzy sobie $h.", ch, pObj, NULL, TO_ROOM );
				act( "Kurzysz sobiê $h, u¶miechaj±c siê przy tym b³ogo.", ch, pObj, NULL, TO_CHAR );
				break;
			default:
				act( "$n pali sobie przez chwilkê $h.", ch, pObj, NULL, TO_ROOM );
				act( "Palisz sobie przez chwilkê $h.", ch, pObj, NULL, TO_CHAR );
				break;
		}

		amount = number_range( 1, 3 ); // moze sie palic szybciej, lub wolniej (o 1, 2 lub o 3)
		if ( pObj->value[ 0 ] == 1 )     // sprawdzamy czy fajeczka jest zapalona
		{
			pObj->value[ 1 ] -= amount; // wypalamy zawartosc fajeczki
			//pObj->short_descr = capitalize(pObj->short_descr );
			amount = number_range( 1, 7 );
			switch ( amount )
			{
				case 1:
					act( "Nad $j trzyman± przez $z unosi siê w±ska stru¿ka dymu.", ch, pObj, NULL, TO_ROOM );
					act( "Nad $j unosi siê w±ska stru¿ka dymu.", ch, pObj, NULL, TO_CHAR );
					break;
				case 2:
					act( "Nad $j $z unosz± siê ma³e, ciemne chmurki dymu.", ch, pObj, NULL, TO_ROOM );
					act( "Nad $j unosz± siê ma³e, ciemne chmurki dymu.", ch, pObj, NULL, TO_CHAR );
					break;
				case 3:
					act( "Widzisz jak w $f $z tl± siê ma³e, jasne iskierki.", ch, pObj, NULL, TO_ROOM );
					act( "Widzisz kilka ma³ych, jasnych iskierek tl±cych siê w $k.", ch, pObj, NULL, TO_CHAR );
					break;
				case 4:
					act( "Dostrzegasz, ¿e nad $f trzyman± przez $z unosi siê gêsta smuga dymu.", ch, pObj, NULL, TO_ROOM );
					act( "Dosrzegasz unosz±c± siê nad $f gêst± smugê dymu.", ch, pObj, NULL, TO_CHAR );
					break;
				case 5:
					act( "S³yszysz jak zawarto¶æ $f $z lekko syczy tl±c siê.", ch, pObj, NULL, TO_ROOM );
					act( "S³yszysz jak zawarto¶æ $f lekko syczy tl±c siê.", ch, pObj, NULL, TO_CHAR );
					break;
				case 6:
					act( "Czujesz delikatny aromat jakoby zio³owego dymu, bij±cy od $z i jego $f.", ch, pObj, NULL, TO_ROOM );
					act( "Czujesz bij±cy od $f lekki, jakby zio³owy aromat.", ch, pObj, NULL, TO_CHAR );
					break;
				default:
					act( "Zawarto¶æ $f nale¿±cej do $z tli siê lekko.", ch, pObj, NULL, TO_ROOM );
					act( "Zawarto¶æ $f tli siê lekko.", ch, pObj, NULL, TO_CHAR );
					break;
			}

			if ( pObj->value[ 1 ] <= 0 )
			{
				act( "Ostatnie, tl±ce siê iskierki gasn±, kiedy wypali³a siê ca³a zawarto¶æ $f.", ch, pObj, NULL, TO_CHAR );
				act( "Widzisz jak $p $z ga¶nie z lekkim sykiem.", ch, pObj, NULL, TO_ROOM );
				pObj->value[ 0 ] = 0;
				pObj->value[ 1 ] = 0;
				pObj->value [ 2 ] = 0;
			}
		}
		return ;
	}


	if ( !str_prefix( arg1, "exhale" ) || !str_prefix( arg1, "wydech" ))
	{
		// Potrzebne staty do testow na 'triki'...
		dex = get_curr_stat_deprecated(ch,STAT_DEX);
		con = get_curr_stat_deprecated(ch,STAT_CON);
		wis = get_curr_stat_deprecated(ch,STAT_WIS);

		/* Zeby "wydychac" flaga palenia musi byc nalozona na gracza - sprawdzanie */
		if ( !EXT_IS_SET( ch->act, PLR_SMOKED ) )
		{
			send_to_char( "Jak chcesz to zrobiæ? Najpierw musisz zaci±gn±æ siê dymem!\n\r", ch );
			return ;
		}

		/* Pomocy!
		if ( !str_prefix( arg2, "help" ) || !str_prefix( arg2, "pomoc" ))
		{
			act( "{R[PORADA]:{x\n\r", ch, NULL, NULL, TO_CHAR );
			act( "{YZanim bêdziesz <&móg³/mog³a/mog³o> wydychaæ dym musisz paliæ fajkê.{x", ch, NULL, NULL, TO_CHAR );
			act( "{YPo tym jak skoñczysz rozkoszowaæ siê bogatym smakiem ziela fajkowego...{x", ch, NULL, NULL, TO_CHAR );
			act( "{YMo¿esz wydychaæ tytoniowy dym na ró¿ne sposoby, ¿eby uatrakcyjniæ palenie.{x", ch, NULL, NULL, TO_CHAR );
			act( "{YSpróbuj tych oto typów wydechu, aby zadziwiæ znajomych:{x \n\r", ch, NULL, NULL, TO_CHAR );
			act( "Angielskie komendy: RINGS, LINES, SPHERE, WEB, PHOENIX, HORNS, NAME", ch, NULL, NULL, TO_CHAR );
			act( "Polskie komendy: KO£A, LINIE, KULA, SIEÆ, FENIKS, ROGI, IMIÊ\n\r", ch, NULL, NULL, TO_CHAR );
			act( "\n\r{YSk³adnia angielska: {Gpipe exhale <nazwa figury>{x.", ch, NULL, NULL, TO_CHAR );
			act( "{YSk³adnia polska: {Gfajka wydech <nazwa figury>{x.\n\r", ch, NULL, NULL, TO_CHAR );
			return ;
		}*/

		if ( arg2[ 0 ] == '\0' )
		{
			switch ( number_range ( 1, 5 ) )
			{
				case 1:
					act( "$n wydycha ustami ob³ok bladego, szarego dymu.", ch, NULL, NULL, TO_ROOM );
					act( "Wydychasz ustami ob³ok szarego, bladego dymu.", ch, NULL, NULL, TO_CHAR );
					EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
					return ;
				case 2:
					act( "$n wydycha nosem ob³ok bladego, szarego dymu.", ch, NULL, NULL, TO_ROOM );
					act( "Wydychasz nosem ob³ok szarego, bladego dymu.", ch, NULL, NULL, TO_CHAR );
					EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
					return ;
				case 3:
					act( "$n spokojnie wydycha ustami ob³ok bladego, szarego dymu.", ch, NULL, NULL, TO_ROOM );
					act( "Spokojnie wydychasz ustami ob³ok szarego, bladego dymu.", ch, NULL, NULL, TO_CHAR );
					EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
					return ;
				case 4:
					act( "$n spokojnie wydycha nosem ob³ok bladego, szarego dymu.", ch, NULL, NULL, TO_ROOM );
					act( "Spokojnie wydychasz nosem ob³ok szarego, bladego dymu.", ch, NULL, NULL, TO_CHAR );
					EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
					return ;
				default:
					act( "$n wydycha ob³ok bladego, szarego dymu.", ch, NULL, NULL, TO_ROOM );
					act( "Wydychasz ob³ok szarego, bladego dymu.", ch, NULL, NULL, TO_CHAR );
					EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
					return ;
			}
		}
		else if ( !str_prefix( arg2, "ko³a" ) || !str_prefix( arg2, "rings" ) )
		{
			if ( dice( 2, dex - 10 ) >= 4 && dice( 2, con - 6 ) > 6 )
			{
				act( "$n niespodziewanie wypuszcza z ust kilka du¿ych, zadziwiaj±co okr±g³ych kó³ z dymu, które uk³adaj± siê w ¶mieszny tunel zawieszony w powietrzu!", ch, NULL, NULL, TO_ROOM );
				act( "Wypuszczasz z ust kilka du¿ych, zadziwiaj±co okr±g³ych kó³ z dymu, które uk³adaj± siê w ¶mieszny tunel zawieszony w powietrzu!", ch, NULL, NULL, TO_CHAR );
				EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
				return ;
			}
			else
			{
				switch ( number_range ( 1, 4 ) )
				{
					case 1:
						act( "$n nagle robi dziwn± minê, po czym momentalnie dostaje ataku kaszlu.", ch, pObj, NULL, TO_ROOM );
						act( "Próbujesz zrobiæ sztuczkê, jednak w ostatniej chwili dym zacz±³ gry¼æ ciê w gar³o i <&dosta³e¶/dosta³a¶/dosta³o¶> ataku kaszlu!", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 2:
						act( "Widzisz jak $n koncentruje siê przez chwilkê, aby po chwili wypu¶ciæ z ust niekszta³tn± chmurê dymu.", ch, pObj, NULL, TO_ROOM );
						act( "Koncentrujesz siê przez chwilkê, chc±c wypu¶ciæ z ust chmurê dymu w kszta³cie ko³a, jednak nie udaje ci siê to.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 3:
						act( "$n nagle zielenieje na twarzy, a z jego nosa zaczynaj± wylatywaæ szare stru¿ki dymu.", ch, pObj, NULL, TO_ROOM );
						act( "W ostatniej chwili przygotowañ do zrobienia sztuczki krztusisz siê i bezwiednie wypuszczasz dym nosem.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					default:
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						act( "$n próbuje zrobiæ jak±¶ sztuczkê z wypuszczeniem z ust dymu, jednak udaje mu siê jedynie uformowaæ dym w bezkszta³tn± chmurê.", ch, pObj, NULL, TO_ROOM );
						act( "Starasz siê wypu¶ciæ z ust kilka kszta³tnych kó³, jednak nie udaje ci siê, a dym przybiera kszta³t nieforemnej chmury.", ch, pObj, NULL, TO_CHAR );
						break;
				}
			}
		}
		else if ( !str_prefix( arg2, "linie" ) || !str_prefix( arg2, "lines" ))
		{
			if ( dice( 2, dex - 10 ) > 5 && dice( 2, con - 8 ) >= 5 )
			{
				act( "$n wydycha d³ug± smugê dymu w kszta³cie piêknej, prostej linii, zdaj±c± siê pi±æ w kierunku nieba!", ch, NULL, NULL, TO_ROOM );
				act( "Wydychasz d³ug± smugê dymu w kszta³cie piêknej, prostej linii, zdaj±c± siê pi±æ w kierunku nieba!", ch, NULL, NULL, TO_CHAR );
				EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
				return ;
			}
			else
			{
				switch ( number_range ( 1, 5 ) )
				{
					case 1:
						act( "$n nagle robi dziwn± minê, po czym momentalnie dostaje ataku kaszlu.", ch, pObj, NULL, TO_ROOM );
						act( "Próbujesz zrobiæ sztuczkê, jednak w ostatniej chwili dym zacz±³ gry¼æ ciê w gar³o i <&dosta³e¶/dosta³a¶/dosta³o¶> ataku kaszlu!", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 2:
						act( "Widzisz jak $n koncentruje siê przez chwilkê, aby po chwili wypu¶ciæ z ust niekszta³tn± chmurê dymu.", ch, pObj, NULL, TO_ROOM );
						act( "Koncentrujesz siê przez chwilkê, chc±c wypu¶ciæ z ust chmurê dymu w kszta³cie linii, jednak nie udaje ci siê to.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 3:
						act( "$n nagle zielenieje na twarzy, a z jego nosa zaczynaj± wylatywaæ szare stru¿ki dymu.", ch, pObj, NULL, TO_ROOM );
						act( "W ostatniej chwili przygotowañ do zrobienia sztuczki krztusisz siê i bezwiednie wypuszczasz dym nosem.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 4:
						act( "$n z gracj± zaczyna wypuszczaæ z ust kilka chmurek dymu, które niespodziewanie szybko rozp³ywaj± siê w powietrzu.", ch, pObj, NULL, TO_ROOM );
						act( "W skupieniu wypuszczasz z ust kilka chmurek dymu, te jednak rozp³ywaj± siê szybko w powietrzu zanim zd±zy³y siê uformowaæ w jaki¶ kszta³t.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					default:
						act( "$n próbuje zrobiæ jak±¶ sztuczkê z wypuszczeniem z ust dymu, jednak udaje mu siê jedynie uformowaæ dym w bezkszta³tn± chmurê.", ch, pObj, NULL, TO_ROOM );
						act( "Starasz siê wypu¶ciæ z ust prost± liniê dymu, jednak nie udaje ci siê, a dym przybiera kszta³t nieforemnej chmury.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
				}
			}
		}
		else if ( !str_prefix( arg2, "kula" ) || !str_prefix( arg2, "sphere" ))
		{
			if ( dice( 2, dex - 5 ) >= 7 && dice( 3, con - 2 ) > 15 )
			{
				act( "$n wypuszcza z ust jedn±, niesamowicie okr±g³a, chmurê dymu w kszta³cie idealnej kuli!", ch, NULL, NULL, TO_ROOM );
				act( "Wypuszczasz z ust du¿±, niesamowicie okr±g³±, chmurê dymu w kszta³cie idealnej kuli!", ch, NULL, NULL, TO_CHAR );
				EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
				return ;
			}
			else
			{
				switch ( number_range ( 1, 5 ) )
				{
					case 1:
						act( "$n nagle robi dziwn± minê, po czym momentalnie dostaje ataku kaszlu.", ch, pObj, NULL, TO_ROOM );
						act( "Próbujesz zrobiæ sztuczkê, jednak w ostatniej chwili dym zacz±³ gry¼æ ciê w gar³o i <&dosta³e¶/dosta³a¶/dosta³o¶> ataku kaszlu!", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 2:
						act( "Widzisz jak $n koncentruje siê przez chwilkê, aby po chwili wypu¶ciæ z ust niekszta³tn± chmurê dymu.", ch, pObj, NULL, TO_ROOM );
						act( "Koncentrujesz siê przez chwilkê, chc±c wypu¶ciæ z ust chmurê dymu w kszta³cie kuli, jednak nie udaje ci siê to.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 3:
						act( "$n nagle zielenieje na twarzy, a z jego nosa zaczynaj± wylatywaæ szare stru¿ki dymu.", ch, pObj, NULL, TO_ROOM );
						act( "W ostatniej chwili przygotowañ do zrobienia sztuczki krztusisz siê i bezwiednie wypuszczasz dym nosem.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 4:
						act( "$n nagle zaczyna kaszlaæ dymem, a dym który ulatuje z jego ust tworzy dziwn± chmurkê.", ch, pObj, NULL, TO_ROOM );
						act( "Niespodziewanie co¶ ci nie wychodzi, krztusisz siê i kaszlaj±c panicznie wypuszczasz z ust resztki dymu.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					default:
						act( "$n próbuje zrobiæ jak±¶ sztuczkê z wypuszczeniem z ust dymu, jednak udaje mu siê jedynie uformowaæ dym w bezkszta³tn± chmurê.", ch, pObj, NULL, TO_ROOM );
						act( "Starasz siê wypu¶ciæ z ust kulê dymu, jednak nie udaje ci siê, a dym przybiera kszta³t nieforemnej chmury.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
				}
			}
		}
		else if ( !str_prefix( arg2, "sieæ" ) || !str_prefix( arg2, "web" ))
		{
			if ( dice( 2, dex - 5 ) >= 15 && dice( 2, con - 8 ) > 6 )
			{
				act( "$n wydycha kilkana¶cie cieniutkich, zwiewnych pasemek dymu, które niespodziewanie ³±cz± siê tworz±c delikatn±, prawie pajêcz±, sieæ w powietrzu!", ch, NULL, NULL, TO_ROOM );
				act( "Wydychasz kilkana¶cie cieniutkich, zwiewnych pasemek dymu, które niespodziewanie ³±cz± siê tworz±c delikatn±, prawie pajêcz±, sieæ w powietrzu!", ch, NULL, NULL, TO_CHAR );
				EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
				return ;
			}
			else
			{
				switch ( number_range ( 1, 5 ) )
				{
					case 1:
						act( "$n nagle robi dziwn± minê, po czym momentalnie dostaje ataku kaszlu.", ch, pObj, NULL, TO_ROOM );
						act( "Próbujesz zrobiæ sztuczkê, jednak w ostatniej chwili dym zacz±³ gry¼æ ciê w gar³o i <&dosta³e¶/dosta³a¶/dosta³o¶> ataku kaszlu!", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 2:
						act( "Widzisz jak $n koncentruje siê przez chwilkê, aby po chwili wypu¶ciæ z ust niekszta³tn± chmurê dymu.", ch, pObj, NULL, TO_ROOM );
						act( "Koncentrujesz siê przez chwilkê, chc±c wypu¶ciæ z ust chmurê dymu w kszta³cie kuli, jednak nie udaje ci siê to.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 3:
						act( "$n nagle zielenieje na twarzy, a z jego nosa zaczynaj± wylatywaæ szare stru¿ki dymu.", ch, pObj, NULL, TO_ROOM );
						act( "W ostatniej chwili przygotowañ do zrobienia sztuczki krztusisz siê i bezwiednie wypuszczasz dym nosem.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 4:
						act( "$n wydycha szybk± seriê w±skich dymków, które wydaj± siê pe³zaæ w powietrzu jak niepos³usze robaczki, szybko rozp³ywaj±ce siê w powietrzu.", ch, pObj, NULL, TO_ROOM );
						act( "Szybko wydychasz seriê w±skich dymków chc±c z nich uformowaæ pajêczynê, te jednak szybko rozp³ywaj± siê w powietrzu.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					default:
						act( "$n próbuje zrobiæ jak±¶ sztuczkê z wypuszczeniem z ust dymu, jednak udaje mu siê jedynie uformowaæ dym w bezkszta³tn± chmurê.", ch, pObj, NULL, TO_ROOM );
						act( "Starasz siê wypu¶ciæ z ust seriê dymków, jednak nie udaje ci siê, a sam dym przybiera kszta³t nieforemnej chmury.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
				}
			}
		}
		else if ( !str_prefix( arg2, "feniks" ) || !str_prefix( arg2, "phoenix" ) || !str_prefix( arg2, "fenix" ) )
		{
			if ( dice( 2, dex - 10 ) >= 8 && dice( 2, con - 10 ) >= 8 && dice( 2, wis - 10 ) >= 5 )
			{
				act( "$n wydycha serie ma³ych chmurek dymu, które na chwilê uk³adaj± siê w wizerunek feniksa, tylko po to, aby chwilê pó¼niej rozp³ynê³y siê, niczym proch.", ch, NULL, NULL, TO_ROOM );
				act( "Wydychasz serie ma³ych chmurek dymu, które na chwilê uk³adaj± siê w wizerunek feniksa, tylko po to, aby chwilê pó¼niej rozp³ynê³y siê, niczym proch.", ch, NULL, NULL, TO_CHAR );
				EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
				return ;
			}
			else
			{
				switch ( number_range ( 1, 7 ) )
				{
					case 1:
						act( "$n nagle robi dziwn± minê, po czym momentalnie dostaje ataku kaszlu.", ch, pObj, NULL, TO_ROOM );
						act( "Próbujesz zrobiæ sztuczkê, jednak w ostatniej chwili dym zacz±³ gry¼æ ciê w gar³o i <&dosta³e¶/dosta³a¶/dosta³o¶> ataku kaszlu!", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 2:
						act( "Widzisz jak $n koncentruje siê przez chwilkê, aby po chwili wypu¶ciæ z ust niekszta³tn± chmurê dymu.", ch, pObj, NULL, TO_ROOM );
						act( "Koncentrujesz siê przez chwilkê, chc±c wypu¶ciæ z ust chmurê dymu w kszta³cie linii, jednak nie udaje ci siê to.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 3:
						act( "$n nagle zielenieje na twarzy, a z jego nosa zaczynaj± wylatywaæ szare stru¿ki dymu.", ch, pObj, NULL, TO_ROOM );
						act( "W ostatniej chwili przygotowañ do zrobienia sztuczki krztusisz siê i bezwiednie wypuszczasz dym nosem.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 4:
						act( "$n w wielkim skupieniu wydycha kilkana¶cie dymków, które zaczynaj± uk³adaæ siê w powietrzu w co¶ przypominaj±cego hybrydê szczura z ludzkimi nogami... Czy to by³o zamierzone?", ch, pObj, NULL, TO_ROOM );
						act( "W wielkim skupieniu wydychasz kilkana¶cie dymków, które niespodziewanie zamiast feniksa uk³adaj± siê w co¶ przypominaj±cego po³±czenie szczura z ludzkimi nogami! Okropne.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 5:
						act( "$n, z grymasem na twarzy, wypuszcza z ust kilkana¶cie dymków, które uk³adaj± siê w powietrzu w jaki¶ dziwny ptakopodobny twór, wygl±daj±cy dosyæ ohydnie.", ch, pObj, NULL, TO_ROOM );
						act( "Czuj±c, ¿e co¶ pójdzie ¼le wypuszczasz z ust kilkana¶cie dymków, które uk³adaj± siê w powietrzu w jaki¶ bezkszta³tny, ptakopodobny twór.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 6:
						act( "$n, z wyrazem pewno¶ci siebie na twarzy, wydycha seriê ma³ych dymków, które nagle ³±cz± siê w powietrzu tworz±c pewien du¿y, oble¶ny kszta³t... Hmm, to ciekawe. K±tem oka widzisz, ¿e $n siê rumieni na widok swojego dzie³a.", ch, pObj, NULL, TO_ROOM );
						act( "Wypuszczasz z ust kilkana¶cie ma³ych dymków, które nagle ³±cz± siê w powietrzu, tworz±c naprawdê du¿y, oble¶ny kszta³t. Chyba siê zaraz spalisz ze wstydu!", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					default:
						act( "$n próbuje zrobiæ jak±¶ sztuczkê z wypuszczeniem z ust dymu, jednak udaje mu siê jedynie uformowaæ dym w bezkszta³tn± chmurê.", ch, pObj, NULL, TO_ROOM );
						act( "Starasz siê wypu¶ciæ z ust kilkana¶cie dymków, jednak nie udaje ci siê, a sam dym przybiera kszta³t nieforemnej chmury.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
				}
			}
		}
		else if ( !str_prefix( arg2, "rogi" ) || !str_prefix( arg2, "horns" ))
		{
			if ( dice( 2, dex - 10 ) >= 9 && dice( 2, con - 6 ) >= 10 )
			{
				act( "$n wydycha dwie grube smugi dymu, które uk³adaj± siê nad $m niczym para wielkich rogów!", ch, NULL, NULL, TO_ROOM );
				act( "Wydychasz dwie grube smugi dymu, które uk³adaj± sie nad tob± niczym para wielkich rogów!", ch, NULL, NULL, TO_CHAR );
				EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
				return ;
			}
			else
			{
				switch ( number_range ( 1, 4 ) )
				{
					case 1:
						act( "$n nagle robi dziwn± minê, po czym momentalnie dostaje ataku kaszlu.", ch, pObj, NULL, TO_ROOM );
						act( "Próbujesz zrobiæ sztuczkê, jednak w ostatniej chwili dym zacz±³ gry¼æ ciê w gar³o i <&dosta³e¶/dosta³a¶/dosta³o¶> ataku kaszlu!", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 2:
						act( "Widzisz jak $n koncentruje siê przez chwilkê, aby po chwili wypu¶ciæ z ust niekszta³tn± chmurê dymu.", ch, pObj, NULL, TO_ROOM );
						act( "Koncentrujesz siê przez chwilkê, chc±c wypu¶ciæ z ust chmurê dymu w kszta³cie linii, jednak nie udaje ci siê to.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 3:
						act( "$n nagle zielenieje na twarzy, a z jego nosa zaczynaj± wylatywaæ szare stru¿ki dymu.", ch, pObj, NULL, TO_ROOM );
						act( "W ostatniej chwili przygotowañ do zrobienia sztuczki krztusisz siê i bezwiednie wypuszczasz dym nosem.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					default:
						act( "$n próbuje zrobiæ jak±¶ sztuczkê z wypuszczeniem z ust dymu, jednak udaje mu siê jedynie uformowaæ dym w bezkszta³tn± chmurê.", ch, pObj, NULL, TO_ROOM );
						act( "Starasz siê wypu¶ciæ z ust prost± liniê dymu, jednak nie udaje ci siê, a dym przybiera kszta³t nieforemnej chmury.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
				}
			}
		}
		else if ( !str_prefix( arg2, "imiê" ) || !str_prefix( arg2, "name" ))
		{
			if ( dice( 2, dex - 10 ) >= 8 && dice( 2, con - 8 ) >= 9 && dice( 2, wis - 10 ) > 6 )
			{
				act( "$n wypuszcza z ust kilkana¶cie ma³ych dymków, które niespodziewanie tworz± w powietrzu napis '$n'! Niesamowite!", ch, NULL, NULL, TO_ROOM );
				act( "Wypuszczasz z ust kilkana¶cie ma³ych dymków, które niespodziewanie tworz± w powietrzu napis '$n'! ¦wietnie!", ch, NULL, NULL, TO_CHAR );
				EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
				return ;
			}
			else
			{
				switch ( number_range ( 1, 6 ) )
				{
					case 1:
						act( "$n nagle robi dziwn± minê, po czym momentalnie dostaje ataku kaszlu.", ch, pObj, NULL, TO_ROOM );
						act( "Próbujesz zrobiæ sztuczkê, jednak w ostatniej chwili dym zacz±³ gry¼æ ciê w gar³o i <&dosta³e¶/dosta³a¶/dosta³o¶> ataku kaszlu!", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 2:
						act( "Widzisz jak $n koncentruje siê przez chwilkê, aby po chwili wypu¶ciæ z ust niekszta³tn± chmurê dymu.", ch, pObj, NULL, TO_ROOM );
						act( "Koncentrujesz siê przez chwilkê, chc±c wypu¶ciæ z ust chmurê dymu w kszta³cie linii, jednak nie udaje ci siê to.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 3:
						act( "$n nagle zielenieje na twarzy, a z jego nosa zaczynaj± wylatywaæ szare stru¿ki dymu.", ch, pObj, NULL, TO_ROOM );
						act( "W ostatniej chwili przygotowañ do zrobienia sztuczki krztusisz siê i bezwiednie wypuszczasz dym nosem.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 4:
						act( "$n, z wyrazem pewno¶ci siebie na twarzy, wydycha seriê ma³ych dymków, które nagle ³±cz± siê w powietrzu tworz±c pewien du¿y, oble¶ny kszta³t... Hmm, to ciekawe. K±tem oka widzisz, ¿e $n siê rumieni na widok swojego dzie³a.", ch, pObj, NULL, TO_ROOM );
						act( "Wypuszczasz z ust kilkana¶cie ma³ych dymków, które nagle ³±cz± siê w powietrzu, tworz±c naprawdê du¿y, oble¶ny kszta³t. Chyba siê zaraz spalisz ze wstydu!", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					case 5:
						print_char( ch, "Wydychasz w wielkim skupieniu kilkana¶cie szarych dymków, które niespodziewanie tworz± w powietrzu bezsensowny napis '%s'!", gen_random_str( 4, 8 ) );
						sprintf( buf, "$n wydycha w wielkim skupieniu kilkana¶cie szarych dymków, które niespodziewanie tworz± w powietrzu bezsensowny napis '%s'!\n\r", gen_random_str( 4, 8 ) );
						act( buf, ch, NULL, NULL, TO_ROOM );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
					default:
						act( "$n próbuje zrobiæ jak±¶ sztuczkê z wypuszczeniem z ust dymu, jednak udaje mu siê jedynie uformowaæ dym w bezkszta³tn± chmurê.", ch, pObj, NULL, TO_ROOM );
						act( "Starasz siê wypu¶ciæ z ust kilka dziwnych chmurek dymu, jednak nie udaje ci siê, a dym przybiera kszta³t nieforemnej chmury.", ch, pObj, NULL, TO_CHAR );
						EXT_REMOVE_BIT( ch->act, PLR_SMOKED );
						break;
				}
			}
		}
		else
		{
			send_to_char( "Huh?! Nie znasz takiej sztuczki!\n\r", ch );
			return;
		}
	}


	// Nabijanie fajki
	if ( !str_prefix( arg1, "tamp" ) || !str_prefix( arg1, "nabij" ))
	{
		// Seria zabezpieczen...
		if ( pObj == NULL ) pObj = get_eq_char( ch, WEAR_HOLD );

		if ( pObj == NULL )
		{
			act( "Co chcesz nabiæ?", ch, pObj, NULL, TO_CHAR );
			return ;
		}

		if ( pObj->item_type != ITEM_PIPE )
		{
			send_to_char( "Mo¿esz nabijaæ jedynie fajki!\n\r", ch );
			return ;
		}

		if ( ( qObj = get_obj_carry( ch, arg3, ch ) ) == NULL )
		{
			act( "Czym chcesz nabiæ $h?", ch, pObj, NULL, TO_CHAR );
			return ;
		}

		if ( qObj->item_type != ITEM_WEED )
		{
			pipe_name = capitalize( pObj->name4 );
			sprintf( pipe_name_2, "%s mo¿esz nabiæ jedynie jakim¶ rodzajem ziela.", pipe_name );
			act( pipe_name_2, ch, pObj, NULL, TO_CHAR );
		}
		else if ( pObj->value[ 0 ] == 1 )
		{
			pipe_name = capitalize( pObj->short_descr );
			sprintf( pipe_name_2, "%s jest zapalona, nie mo¿esz jej teraz nabijaæ!", pipe_name );
			act( pipe_name_2, ch, pObj, NULL, TO_CHAR );
			return ;
		}
		else if ( pObj->value[ 1 ] > 0 )
		{
			pipe_name = capitalize( pObj->short_descr );
			sprintf( pipe_name_2, "%s jest ju¿ czym¶ nabita. Przed ponownym nabiciem opró¿nij j±.", pipe_name );
			act( pipe_name_2, ch, pObj, NULL, TO_CHAR );
			return ;
		}
		else
		{
			// Nabijanie fajki, przepisywanie wartosci ziela do fajeczki.
			weed_amount = qObj->value [ 0 ];
			weed_type = qObj->value [ 1 ];
			pObj->value [ 1 ] = weed_amount;
			pObj->value [ 2 ] = weed_type;
			print_char( ch, "Nabijasz %s %s.\n\r", pObj->name4, qObj->name5 );
			sprintf( buf, "$n nabija %s %s.\n\r", pObj->name4, qObj->name5 );
			act( buf, ch, NULL, NULL, TO_ROOM );
			extract_obj( qObj );
			return ;
		}


	}

	// zapalanie
	if ( !str_prefix( arg1, "light" ) || !str_prefix( arg1, "zapal" ))
	{
		pObj = get_obj_carry( ch, arg2, ch );

		if ( pObj == NULL ) pObj = get_eq_char( ch, WEAR_HOLD );

		if ( pObj == NULL )
		{
			act( "Co chcesz zapaliæ?", ch, pObj, NULL, TO_CHAR );
			return ;
		}

		if ( pObj->item_type != ITEM_PIPE )
		{
			send_to_char( "Mo¿esz zapalaæ jedynie fajki!\n\r", ch );
			return ;
		}
		else if ( pObj->value[ 0 ] == 1 )
		{
			pipe_name = capitalize( pObj->short_descr );
			sprintf( pipe_name_2, "%s jest ju¿ zapalona.", pipe_name );
			act( pipe_name_2, ch, pObj, NULL, TO_CHAR );
			return ;
		}
		else if ( pObj->value[ 2 ] == 4 )
		{
			act( "Zawarto¶æ $f jest mokra! Nie dasz rady tego zapaliæ.", ch, pObj, NULL, TO_CHAR );
			act( "Lepiej wyczy¶æ $h i nape³nij j± czym¶ suchym, najlepiej zielem fajkowym.", ch, pObj, NULL, TO_CHAR );
			return ;
		}
		else
		{
			pObj->value [ 0 ] = 1;
			act( "Zapalaj±c $h zaczynasz czuæ przyjemny, delikatny zapach palonego ziela.", ch, pObj, NULL, TO_CHAR );
			act( "$n zapala $h. Czujesz jak w powietrzu zaczyna unosiæ siê lekki zapach palonego ziela.", ch, pObj, NULL, TO_ROOM );
			return ;
		}
	}

	// gaszenie
	if ( !str_prefix( arg1, "extinguish" ) || !str_prefix( arg1, "zga¶" ))
	{

		/*if ( ( pObj = get_obj_carry( ch, arg2, ch ) ) == NULL )
		{
			act( "Co chcesz zgasiæ?", ch, pObj, NULL, TO_CHAR );
			return ;
		}*/

		if ( pObj == NULL ) pObj = get_eq_char( ch, WEAR_HOLD );

		if ( pObj == NULL )
		{
			act( "Co chcesz zgasiæ?", ch, pObj, NULL, TO_CHAR );
			return ;
		}

		if ( pObj->item_type != ITEM_PIPE )
		{
			send_to_char( "Mo¿esz gasiæ jedynie fajki!\n\r", ch );
			return ;
		}
		else if ( pObj->value[ 0 ] == 0 )
		{
			pipe_name = capitalize( pObj->short_descr );
			sprintf( pipe_name_2, "%s jest ju¿ zgaszona.", pipe_name );
			act( pipe_name_2, ch, pObj, NULL, TO_CHAR );
			return ;
		}
		else
		{
			pObj->value [ 0 ] = 0;
			act( "Gasz±c $h widzisz jak ostatnie iskierki ognia bledn± i znikaj±.", ch, pObj, NULL, TO_CHAR );
			act( "$n gasi $h.", ch, pObj, NULL, TO_ROOM );
			return ;
		}
	}

	// czyszczenie / opró¿nianie
	if ( !str_prefix( arg1, "clean" ) || !str_prefix( arg1, "wyczy¶æ" ))
	{

		/*if ( ( pObj = get_obj_carry( ch, arg2, ch ) ) == NULL )
		{
			act( "Co chcesz wyczy¶ciæ?", ch, pObj, NULL, TO_CHAR );
			return ;
		}*/

		if ( pObj == NULL ) pObj = get_eq_char( ch, WEAR_HOLD );

		if ( pObj == NULL )
		{
			act( "Co chcesz wyczy¶ciæ?", ch, pObj, NULL, TO_CHAR );
			return ;
		}

		if ( pObj->item_type != ITEM_PIPE )
		{
			send_to_char( "Mo¿esz czy¶ciæ jedynie fajki!\n\r", ch );
			return ;
		}
		else if ( pObj->value[ 0 ] == 1 )
		{
			act( "Mo¿e lepiej najpierw zga¶ $h?", ch, pObj, NULL, TO_CHAR );
			return ;
		}
		else if ( pObj->value[ 1 ] == 0 )
		{
			act( "Ogl±dasz z dum± $h, po czym pucujesz j± dok³adnie rêkawem. Teraz jest naprawdê czysta!", ch, pObj, NULL, TO_CHAR );
			act( "$n z dum± pucuje $h, u¶miechaj±c siê przy tym tajemniczo.", ch, pObj, NULL, TO_ROOM );
			return ;
		}
		else
		{
			pObj->value [ 1 ] = 0;
			pObj->value [ 2 ] = 0;
			act( "Wysypujesz zawarto¶æ $f. Teraz jest pusta.", ch, pObj, NULL, TO_CHAR );
			act( "$n wysypuje zawarto¶æ $f.", ch, pObj, NULL, TO_ROOM );
			return ;
		}
	}

	send_to_char( "Huh?\n\r", ch );
	return;
}
Beispiel #21
0
void spell_nexus( int sn, int level, Character *ch, void *vo, int target)
{
    Character *victim;
    OBJ_DATA *portal, *stone;
    ROOM_INDEX_DATA *to_room, *from_room;

    from_room = ch->in_room;
 
        if ( ( victim = get_char_world( ch, target_name ) ) == NULL
    ||   victim == ch
    ||   (to_room = victim->in_room) == NULL
    ||   !can_see_room(ch,to_room) || !can_see_room(ch,from_room)
    ||   IS_SET(to_room->room_flags, ROOM_SAFE)
    ||	 IS_SET(from_room->room_flags,ROOM_SAFE)
    ||   IS_SET(to_room->room_flags, ROOM_PRIVATE)
    ||   IS_SET(to_room->room_flags, ROOM_SOLITARY)
    ||   IS_SET(to_room->room_flags, ROOM_NO_RECALL)
    ||   IS_SET(from_room->room_flags,ROOM_NO_RECALL)
    ||   victim->level >= level + 3
    ||   (!IS_NPC(victim) && victim->level >= LEVEL_HERO)  /* NOT trust */
    ||   (IS_NPC(victim) && IS_SET(victim->imm_flags,IMM_SUMMON))
    ||   (IS_NPC(victim) && saves_spell( level, victim,DAM_NONE) ) 
    ||	 (IS_CLANNED(victim) && !is_same_clan(ch,victim)))
    {
        send_to_char( "You failed.\n\r", ch );
        return;
    }   
 
    stone = get_eq_char(ch,WEAR_HOLD);
    if (!IS_IMMORTAL(ch)
    &&  (stone == NULL || stone->item_type != ITEM_WARP_STONE))
    {
        send_to_char("You lack the proper component for this spell.\n\r",ch);
        return;
    }
 
    if (stone != NULL && stone->item_type == ITEM_WARP_STONE)
    {
        act("You draw upon the power of $p.",ch,stone,NULL,TO_CHAR);
        act("It flares brightly and vanishes!",ch,stone,NULL,TO_CHAR);
        extract_obj(stone);
    }

    /* portal one */ 
    portal = create_object(get_obj_index(OBJ_VNUM_PORTAL),0);
    portal->timer = 1 + level / 10;
    portal->value[3] = to_room->vnum;
 
    obj_to_room(portal,from_room);
 
    act("$p rises up from the ground.",ch,portal,NULL,TO_ROOM);
    act("$p rises up before you.",ch,portal,NULL,TO_CHAR);

    /* no second portal if rooms are the same */
    if (to_room == from_room)
	return;

    /* portal two */
    portal = create_object(get_obj_index(OBJ_VNUM_PORTAL),0);
    portal->timer = 1 + level/10;
    portal->value[3] = from_room->vnum;

    obj_to_room(portal,to_room);

    if (to_room->people != NULL)
    {
	act("$p rises up from the ground.",to_room->people,portal,NULL,TO_ROOM);
	act("$p rises up from the ground.",to_room->people,portal,NULL,TO_CHAR);
    }
}
void do_disarm( CHAR_DATA *ch, char *argument )
{
	CHAR_DATA *victim;
	OBJ_DATA *obj;
	int chance,hth,ch_weapon,vict_weapon,ch_vict_weapon;

	hth = 0;

	if ((chance = get_skill(ch,gsn_disarm)) == 0)
	{
		send_to_char( "You don't know how to disarm opponents.\n\r", ch );
		return;
	}

	if ( get_eq_char( ch, WEAR_WIELD ) == NULL
			&&   ((hth = get_skill(ch,gsn_brawl)) == 0
					||    (IS_NPC(ch) && !IS_SET(ch->off_flags,OFF_DISARM))))
	{
		send_to_char( "You must wield a weapon to disarm.\n\r", ch );
		return;
	}

	if ( ( victim = ch->fighting ) == NULL )
	{
		send_to_char( "You aren't fighting anyone.\n\r", ch );
		return;
	}

	if ( ( obj = get_eq_char( victim, WEAR_WIELD ) ) == NULL )
	{
		send_to_char( "Your opponent is not wielding a weapon.\n\r", ch );
		return;
	}

	/* find weapon skills */
	ch_weapon = get_weapon_skill(ch,get_weapon_sn(ch));
	vict_weapon = get_weapon_skill(victim,get_weapon_sn(victim));
	ch_vict_weapon = get_weapon_skill(ch,get_weapon_sn(victim));

	/* skill */
	if ( get_eq_char(ch,WEAR_WIELD) == NULL)
		chance = chance * hth/150;
	else
		chance = chance * ch_weapon/100;

	chance += (ch_vict_weapon/2 - vict_weapon) / 2;

	/* dex vs. strength */
	chance += get_curr_stat(ch,STAT_DEX);
	chance -= 2 * get_curr_stat(victim,STAT_STR);

	/* and now the attack */
	if (number_percent() < chance)
	{
		WAIT_STATE( ch, skill_table[gsn_disarm].beats );
		disarm( ch, victim );
	}
	else
	{
		WAIT_STATE(ch,skill_table[gsn_disarm].beats);
		act("You fail to disarm $N.",ch,NULL,victim,TO_CHAR,1);
		act("$n tries to disarm you, but fails.",ch,NULL,victim,TO_VICT,0);
		act("$n tries to disarm $N, but fails.",ch,NULL,victim,TO_NOTVICT,0);
	}
	return;
}
/*
 * Hit one guy once.
 */
void one_hit( CHAR_DATA *ch, CHAR_DATA *victim, int dt )
{
	OBJ_DATA *wield;
	OBJ_INDEX_DATA *ammo = NULL;
	int diceroll;
	int sn;
	int dam_type;

	sn = -1;


	/* just in case */
	if (victim == ch || ch == NULL || victim == NULL)
		return;

	/*
	 * Can't beat a dead char!
	 * Guard against weird room-leavings.
	 */
	if ( victim->position == P_DEAD || ch->in_room != victim->in_room )
		return;

	/*
	 * Figure out the type of damage message.
	 */
	wield = get_eq_char( ch, WEAR_WIELD );
	if(wield != NULL && wield->value[0] == WEAPON_FIREARM)
		ammo = get_obj_index(wield->value[2]);

	if ( dt == TYPE_UNDEFINED )
	{
		dt = TYPE_HIT;
		if ( wield != NULL && wield->item_type == ITEM_WEAPON )
		{
			if(wield->value[0] == WEAPON_FIREARM) {
				if(ammo) dt += ammo->value[3];
			}
			else
				dt += wield->value[3];
		} else
			dt += ch->dam_type;
	}

	if (dt < TYPE_HIT)
		if (wield != NULL)
		{
			if(wield->value[0] == WEAPON_FIREARM) {
				if(ammo) dam_type = attack_table[ammo->value[3]].damage;
				else dam_type = attack_table[0].damage;
			}
			else
				dam_type = attack_table[wield->value[3]].damage;
		} else
			dam_type = attack_table[ch->dam_type].damage;
	else
		dam_type = attack_table[dt - TYPE_HIT].damage;

	if (dam_type == -1)
		dam_type = DAM_BASH;

	/*
	 * The moment of excitement!
	 */
	while ( ( diceroll = number_bits( 5 ) ) >= 20 )
		;

	if( wield == NULL || (wield->value[0] > 1) || (wield->value[0] == 0) )
	{
		strike(ch, victim);
	}
	else if(wield->value[0] == 1)
	{
		shooting(ch, victim, NULL);
	}

	if(!IS_SET(victim->act2, ACT2_NOWARRANT))
		add_warrant(ch, 20, FALSE);

	/*
	 * Funky weapon s***e
	 */
	/*    if (result && wield != NULL)
    { 
	int dam;

	if (ch->fighting == victim && IS_WEAPON_STAT(wield,WEAPON_POISON))
	{
	    int level;
	    AFFECT_DATA *poison = NULL;
	    AFFECT_DATA af;

	    level = 2;

	    if (!saves_spell(1,victim,DAM_POISON)) 
	    {
		send_to_char("You feel poison coursing through your veins.", victim);
		act("$n is poisoned by the venom on $p.",
		    victim,wield,NULL,TO_ROOM, 0);

    		af.where     = TO_AFFECTS;
    		af.type      = gsn_poison;
    		af.level     = level * 3/4;
    		af.duration  = level / 2;
    		af.location  = APPLY_STR;
    		af.modifier  = -1;
    		af.bitvector = AFF_POISON;
    		affect_join( victim, &af );
	    }
	 */
	/* weaken the poison if it's temporary */
	/*	    if (poison != NULL)
	    {
	    	poison->level = UMAX(0,poison->level - 2);
	    	poison->duration = UMAX(0,poison->duration - 1);

	    	if (poison->level == 0 || poison->duration == 0)
		    act("The poison on $p has worn off.",
			ch,wield,NULL,TO_CHAR,1);
	    }
 	}


    	if (ch->fighting == victim && IS_WEAPON_STAT(wield,WEAPON_VAMPIRIC))
	{
	    dam = number_range(1,2);
	    act("$p draws life from $n.",victim,wield,NULL,TO_ROOM,0);
	    act("You feel $p drawing your life away.",
		victim,wield,NULL,TO_CHAR,1);
	    damage(ch,victim,dam,0,DAM_NEGATIVE,FALSE,1,-1);
	    ch->RBPG += dam/2;
	}

	if (ch->fighting == victim && IS_WEAPON_STAT(wield,WEAPON_FLAMING))
	{
	    dam = number_range(1,2);
	    act("$n is burned by $p.",victim,wield,NULL,TO_ROOM,0);
	    act("$p sears your flesh.",victim,wield,NULL,TO_CHAR,1);
	    fire_effect( (void *) victim,2,dam,TARGET_CHAR);
	    damage(ch,victim,dam,0,DAM_FIRE,FALSE,1,-1);
	}

	if (ch->fighting == victim && IS_WEAPON_STAT(wield,WEAPON_FROST))
	{
	    dam = number_range(1, 2);
	    act("$p freezes $n.",victim,wield,NULL,TO_ROOM,0);
	    act("The cold touch of $p surrounds you with ice.",
		victim,wield,NULL,TO_CHAR,1);
	    cold_effect(victim,2,dam,TARGET_CHAR);
	    damage(ch,victim,dam,0,DAM_COLD,FALSE,0,-1);
	}

	if (ch->fighting == victim && IS_WEAPON_STAT(wield,WEAPON_SHOCKING))
	{
	    dam = number_range(1,2);
	    act("$n is struck by lightning from $p.",
		victim,wield,NULL,TO_ROOM,0);
	    act("You are shocked by $p.",victim,wield,NULL,TO_CHAR,1);
	    shock_effect(victim,2,dam,TARGET_CHAR);
	    damage(ch,victim,dam,0,DAM_LIGHTNING,FALSE,1,-1);
	}
    }
	 */
	tail_chain( );
	return;
}
Beispiel #24
0
void do_unbind( CHAR_DATA * ch, char *argument )
{
   OBJ_DATA *obj;
   bool checkbinders = FALSE;
   char buf[MAX_STRING_LENGTH];
   CHAR_DATA *victim;

   if( IS_NPC( ch ) )
   {
      send_to_char( "You're a mob.\n\r", ch );
      return;
   }

   if( argument[0] == '\0' )
   {
      send_to_char( "Syntax: Unbind <victim>\n\r", ch );
      return;
   }

   if( ( victim = get_char_room( ch, argument ) ) == NULL )
   {
      send_to_char( "They aren't here.\n\r", ch );
      return;
   }

   if( victim == ch )
   {
      send_to_char( "You can not unbind yourself!\n\r", ch );
      return;
   }

   if( IS_NPC( victim ) )
   {
      send_to_char( "You can only unbind players.\n\r", ch );
      return;
   }

   if( IS_SET( ch->pcdata->act2, ACT_BOUND ) )
   {
      send_to_char( "Nice try. You're bound yourself!\n\r", ch );
      return;
   }

   if( !IS_SET( victim->pcdata->act2, ACT_BOUND ) )
   {
      send_to_char( "But they're not bound.\n\r", ch );
      return;
   }


   obj = get_eq_char( victim, WEAR_BOTH_WRISTS );
   if( obj )
      unequip_char( victim, obj );
   else
   {
      send_to_char( "Something went wrong. get an imm.\n\r", ch );
      sprintf( buf, "%s unbinding %s: has no bothwrists object!", ch->name, victim->name );
      bug( buf );
      return;
   }

   for( obj = victim->last_carrying; obj; obj = obj->prev_content )
      if( obj->item_type == ITEM_BINDERS )
      {
         checkbinders = TRUE;
         break;
      }

   if( checkbinders == FALSE )
   {
      bug( "Unbind: no binders in victims inventory." );
      send_to_char( "Something went wrong. get an imm.\n\r", ch );
      return;
   }

   separate_obj( obj );
   obj_from_char( obj );
   obj_to_char( obj, ch );
   act( AT_WHITE, "You quickly unbind $N's wrists.", ch, NULL, victim, TO_CHAR );
   act( AT_WHITE, "$n quickly unbinds your wrists.", ch, NULL, victim, TO_VICT );
   act( AT_WHITE, "$n quickly unbinds $N's wrists.", ch, NULL, victim, TO_NOTVICT );
   REMOVE_BIT( victim->pcdata->act2, ACT_BOUND );
}
Beispiel #25
0
void do_bind( CHAR_DATA * ch, char *argument )
{
   OBJ_DATA *obj;
   OBJ_DATA *tobj;
   int schance;
   CHAR_DATA *victim;
   bool checkbinders = FALSE;

   if( argument[0] == '\0' )
   {
      send_to_char( "Syntax: Bind <victim>\n\r", ch );
      return;
   }

   if( ( victim = get_char_room( ch, argument ) ) == NULL )
   {
      send_to_char( "They are not here.\n\r", ch );
      return;
   }

   if( victim == ch )
   {
      send_to_char( "You can not bind yourself!\n\r", ch );
      return;
   }

   if( IS_NPC( victim ) )
   {
      send_to_char( "You can only bind players.\n\r", ch );
      return;
   }

   if( IS_SET( victim->pcdata->act2, ACT_BOUND ) )
   {
      send_to_char( "They've already been bound!\n\r", ch );
      return;
   }

   for( obj = ch->last_carrying; obj; obj = obj->prev_content )
      if( obj->item_type == ITEM_BINDERS )
      {
         checkbinders = TRUE;
         break;
      }

   if( checkbinders == FALSE )
   {
      send_to_char( "You don't have any binders to bind them with.\n\r", ch );
      return;
   }

   if( victim->position != POS_STUNNED && victim->position != POS_SLEEPING )
   {
      send_to_char( "They need to be stunned or asleep.\n\r", ch );
      return;
   }

   schance = ( int )( ch->pcdata->learned[gsn_bind] );

   if( number_percent(  ) < schance )
   {
      separate_obj( obj );
      obj_from_char( obj );
      obj_to_char( obj, victim );
      act( AT_WHITE, "You quickly bind $N's wrists.", ch, NULL, victim, TO_CHAR );
      act( AT_WHITE, "$n quickly binds your wrists.", ch, NULL, victim, TO_VICT );
      act( AT_WHITE, "$n quickly binds $N's wrists.", ch, NULL, victim, TO_NOTVICT );
      tobj = get_eq_char( ch, WEAR_BOTH_WRISTS );
      if( tobj )
         unequip_char( ch, tobj );

      equip_char( victim, obj, WEAR_BOTH_WRISTS );
      SET_BIT( victim->pcdata->act2, ACT_BOUND );
      learn_from_success( ch, gsn_bind );
   }
   else
   {
      send_to_char( "You peer at the binders, curious upon how to use them.\n\r", ch );
      learn_from_failure( ch, gsn_bind );
   }

   return;
}
Beispiel #26
0
void do_swordtech(CHAR_DATA * ch, char *argument)
{
	char buf[MAX_STRING_LENGTH];
	CHAR_DATA *victim = 0;
	OBJ_DATA *obj;
	AFFECT_DATA af;
	long chance;

	if(!ch || IS_NPC(ch))
		return;

	if(!IS_CLASS(ch, CLASS_HIGHLANDER))
	{
		send_to_char("You are not one of the chosen.\n\r", ch);
		return;
	}

	if(!argument || argument[0] == '\0')
	{
		send_to_char("What type of swordtech manuever do you want to attempt?\n\r", ch);
		send_to_char("Types are: fury, disarm, berserk, stun, decapitate, concentrate\n\r", ch);
		return;
	}

	if((obj = get_eq_char(ch, WEAR_WIELD)) == 0 || obj->pIndexData->vnum != 29695)
	{
		send_to_char("You must be wielding your Katana to do a swordtech manuever.\n\r", ch);
		return;
	}

	if(is_affected(ch, gsn_swordtech))
	{
		send_to_char("You are not ready for another swordtech manuever yet!\n\r", ch);
		return;
	}

	if(ch->move < 850)
	{
		send_to_char("You need 850 movement points to do a swordtech manuever!\n\r", ch);
		return;
	}

	ch->move -= 600;

	if(ch->pcdata->stats[UNI_GEN] == 1)
		chance = 55;
	else if(ch->pcdata->stats[UNI_GEN] == 2)
		chance = 35;
	else
		chance = 0;

	chance += 35;

	act("{G$n holds $p in front of $m and a spiral of silver energy swirls around $s body.{x", ch, obj, 0, TO_ROOM);
	act("{GYou holds $p in front of you and a spiral of silver energy swirls around your body.{x",
	    ch, obj, 0, TO_CHAR);

	if(chance < number_percent())
	{
		af.type = gsn_swordtech;
		af.duration = 3 + ch->pcdata->stats[UNI_GEN];
		af.modifier = 0;
		af.location = 0;
		af.bitvector = 0;
		affect_to_char(ch, &af);

		act("{gYou fail the manuever and the energy leaves you.{x", ch, 0, 0, TO_CHAR);
		act("{g$n fails the manuever and the energy leaves $m.{x", ch, 0, 0, TO_ROOM);
		return;
	}

	if(!str_prefix(argument, "berserk")
	   || !str_prefix(argument, "bezerk") || !str_prefix(argument, "beserk") || !str_prefix(argument, "berzerk"))
	{
		af.type = gsn_swordtech;
		af.duration = 5 + ((3 - ch->pcdata->stats[UNI_GEN]) * 2);
		af.modifier = 0;
		af.location = 0;
		af.bitvector = STECH_BERSERK;
		affect_to_char(ch, &af);
		act("You go berserk!", ch, 0, 0, TO_CHAR);
		act("$n goes berserk!", ch, 0, 0, TO_ROOM);
		return;
	}

	if(!str_prefix(argument, "concentrate"))
	{
		af.type = gsn_swordtech;
		af.duration = 5 + ((3 - ch->pcdata->stats[UNI_GEN]) * 2);
		af.modifier = 0;
		af.location = 0;
		af.bitvector = STECH_CONCENTRATE;
		affect_to_char(ch, &af);
		act("A deep calm overcomes you and you begin examining your opponent very carefully.", ch, 0, 0,
		    TO_CHAR);
		act("$n appears to get very calm and more alertive.", ch, 0, 0, TO_ROOM);
		return;
	}

	if(!str_prefix(argument, "decapitate"))
	{
		if((victim = ch->fighting) == 0)
		{
			send_to_char("You have to be fighting to do this manuever.\n\r", ch);
			return;
		}
		if(IS_NPC(victim) || number_percent() < 50)
		{
			act("You bring your sword up for a masterful swing and......miss horribly.", ch, 0, victim,
			    TO_CHAR);
			act("$n brings $s sword up for a masterful swing and......misses $N's head by a mile.", ch, 0,
			    victim, TO_NOTVICT);
			act("$n brings $s sword up for a masterful swing and......misses your head by a mile.", ch, 0,
			    victim, TO_VICT);
			act("You drop your weapons!", ch, 0, 0, TO_CHAR);
			act("$n drops $s weapons!", ch, 0, 0, TO_ROOM);
			obj_from_char(obj);
			obj_to_room(obj, ch->in_room);
			if((obj = get_eq_char(ch, WEAR_HOLD)) != 0)
			{
				obj_from_char(obj);
				obj_to_room(obj, ch->in_room);
			}
			return;
		}
		act("You bring your sword up for a masterful swing and whack $N's head clean off!", ch, 0, victim,
		    TO_CHAR);
		act("$n brings $s sword up for a masterful swing and whacks $N's head clean off!", ch, 0, victim,
		    TO_NOTVICT);
		act("$n brings $s sword up for a masterful swing and......you are now missing a head?!", ch, 0, victim,
		    TO_VICT);
		sprintf(buf, "{B%s swordtech decapitates %s!  Ooooh that's gotta hurt!{X", ch->name, victim->name);
		do_info(ch, buf);
		behead(victim);
		return;
	}

	if(!str_prefix(argument, "stun"))
	{
		if((victim = ch->fighting) == 0)
		{
			send_to_char("You have to be fighting to do this manuever.\n\r", ch);
			return;
		}
		act("You knock the hell out of $N's head with the side of your sword!", ch, 0, victim, TO_CHAR);
		act("$n knocks the hell out of $N's head with the side of $s sword!", ch, 0, victim, TO_NOTVICT);
		act("$n knocks the hell out of your head with the side of $s sword!", ch, 0, victim, TO_VICT);
		WAIT_STATE(victim, number_range(24, 60));
		return;
	}

	if(!str_prefix(argument, "fury"))
	{
		if((victim = ch->fighting) == 0)
		{
			send_to_char("You have to be fighting to do this manuever.\n\r", ch);
			return;
		}
		af.type = gsn_swordtech;
		af.duration = 3 + (ch->pcdata->stats[UNI_GEN] * 2);
		af.modifier = APPLY_STR;
		af.location = 0;
		af.bitvector = STECH_FURY;
		affect_to_char(ch, &af);
		act("You attack in a wild fury!", ch, 0, 0, TO_CHAR);
		act("$n attacks in a wild fury!", ch, 0, 0, TO_ROOM);
		multi_hit(ch, ch->fighting, TYPE_UNDEFINED);
		multi_hit(ch, ch->fighting, TYPE_UNDEFINED);
		multi_hit(ch, ch->fighting, TYPE_UNDEFINED);
		return;
	}

	if(!str_prefix(argument, "disarm"))
	{
		if((victim = ch->fighting) == 0 && !ch->in_room)
		{
			send_to_char("You have to be fighting to do this manuever.\n\r", ch);
			return;
		}
		if(IS_NPC(victim))
		{
			send_to_char("Not on NPC's.\n\r", ch);
			return;
		}
		if((obj = get_eq_char(victim, WEAR_WIELD)) == 0)
		{
			send_to_char("They aren't wielding a weapon!\n\r", ch);
			return;
		}
		obj_from_char(obj);
		obj_to_room(obj, ch->in_room);
		af.type = gsn_swordtech;
		af.duration = 5 + (ch->pcdata->stats[UNI_GEN] * 2);
		af.modifier = 0;
		af.location = 0;
		af.bitvector = STECH_DISARM;
		affect_to_char(ch, &af);
		act("$n disarms YOU!", ch, 0, victim, TO_VICT);
		act("$n disarms $N!", ch, 0, victim, TO_NOTVICT);
		act("You disarm $N!", ch, 0, victim, TO_CHAR);
		return;
	}

	send_to_char("Nothing happens.\n\r", ch);
}
Beispiel #27
0
void do_hellblades( CHAR_DATA *ch, char *argument )
{
    char arg1[MAX_INPUT_LENGTH];
    char buf[MAX_STRING_LENGTH];
    CHAR_DATA *victim;
    OBJ_DATA *obj;
    int cost = 0;
    argument = one_argument( argument, arg1);

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

    if ( arg1[0] == '\0' )
    {
        stc("#CUse #RHell#LBlades#C on who?\n\r",ch);
        return;
    }

    if ((victim = get_char_room(ch, arg1)) == NULL)
    {
        stc("#CThey aren't here.\n\r", ch);
        return;
    }

    if (victim == ch)
    {
        stc("#CYeah ok..... #sd#so#sr#sk#C....\n\r",ch);
        return;
    }

    if (!IS_CLASS(ch, CLASS_WIZARD))
    {
        stc("#CHuh?\n\r",ch);
        return;

    }

    if (ch->pcdata->stats[WL_SPELLS] < 7)
    {
        stc("#RYou do not yet have mastery of this spell.\n\r",ch);
        return;
    }

    if (is_safe(ch,victim)) return;

    if (ch->pcdata->powers[WL_SKILLS] < 4) cost = 20000;
    if (ch->pcdata->powers[WL_SKILLS] > 3) cost = 10000;

    if (ch->mana < 20000 && ch->pcdata->powers[WL_SKILLS] < 4)
    {
        stc("#CYou do not have the #c20000#C required mana.\r\n",ch);
        return;
    }
    else if (ch->mana < 10000 && ch->pcdata->powers[WL_SKILLS] > 3)
    {
        stc("#CYou do not have the #c10000#C required mana.\r\n",ch);
        return;
    }

    if (ch->pcdata->powers[WL_SKILLS] > 3 && number_range(1, 100) < 10)
    {
        if (IS_LEG_L(victim,LOST_LEG))
        {
            sprintf( buf, "#7%s#C has already lost their left leg.\n\r", victim->name);
            stc( buf, ch);
            return;
        }

        if (!IS_LEG_L(victim,LOST_LEG))
            SET_BIT(victim->loc_hp[4],LOST_LEG);
        else
        {
            sprintf( buf, "#7%s#C has already lost theit left leg.\n\r", victim->name);
            stc( buf, ch);
            return;
        }

        if (!IS_BLEEDING(victim,BLEEDING_LEG_L))
            SET_BIT(victim->loc_hp[6],BLEEDING_LEG_L);
        if (IS_BLEEDING(victim,BLEEDING_FOOT_L))
            REMOVE_BIT(victim->loc_hp[6],BLEEDING_FOOT_L);
        act("#CYour hellblades spin around you, cutting off #7$N's#C left leg!",ch,NULL,victim,TO_CHAR);
        act("#7$n's#C hellblades spin around them, cutting off #7$N's#C left leg!",ch,NULL,victim,TO_NOTVICT);
        act("#7$n's#C hellblades spin around them, cutting off your left leg!",ch,NULL,victim,TO_VICT);
        make_part(victim,"leg");
        if (IS_LEG_L(victim,LOST_LEG) && IS_LEG_R(victim,LOST_LEG))
        {
            if ((obj = get_eq_char( victim, WEAR_LEGS )) != NULL)
                take_item(victim,obj);
        }
        if ((obj = get_eq_char( victim, WEAR_FEET )) != NULL)
            take_item(victim,obj);

        if (IS_LEG_R(victim,LOST_LEG))
        {
            sprintf( buf, "#7%s#C has already lost their right leg.\n\r", victim->name);
            stc( buf, ch);
            return;
        }

        if (!IS_LEG_R(victim,LOST_LEG))
            SET_BIT(victim->loc_hp[5],LOST_LEG);
        else
        {
            sprintf( buf, "#7%s#C has already lost their right leg.\n\r", victim->name);
            stc( buf, ch);
            return;
        }

        if (!IS_BLEEDING(victim,BLEEDING_LEG_R))
            SET_BIT(victim->loc_hp[6],BLEEDING_LEG_R);
        if (IS_BLEEDING(victim,BLEEDING_FOOT_R))
            REMOVE_BIT(victim->loc_hp[6],BLEEDING_FOOT_R);
        act("#CYour hellblades spin around you, cutting off #7$N's#C right leg!",ch,NULL,victim,TO_CHAR);
        act("#7$n's#C hellblades spin around them, cutting off #7$N's#C right leg!",ch,NULL,victim,TO_NOTVICT);
        act("#7$n's#C hellblades spin around him, cutting off your right leg!",ch,NULL,victim,TO_VICT);
        make_part(victim,"leg");
        if (IS_LEG_L(victim,LOST_LEG) && IS_LEG_R(victim,LOST_LEG))
        {
            if ((obj = get_eq_char( victim, WEAR_LEGS )) != NULL)
                take_item(victim,obj);
        }
        if ((obj = get_eq_char( victim, WEAR_FEET )) != NULL)
            take_item(victim,obj);

    }

    /*                if (ch->pcdata->powers[WL_SKILLS] > 3 && number_range(1, 75) < 5 && !IS_NPC(victim))
                    {
                            behead( victim );
                            sprintf( buf, "#7%s#C is cut to pieces by #7%s's#C hellblades.\n\r", victim->name, ch->name);
                            do_info( ch, buf);
                            ch->pkill ++;
                            victim->pdeath -= 1;
                            ch->race ++;
                            return;
                    }*/
    WAIT_STATE(ch, 17);
    victim->hit *= .95;
    ch->mana -= cost;
    return;
}
Beispiel #28
0
void calc_move(CHAR_DATA *ch)
{
OBJ_DATA * tObj;
int total = job_table[ch->jobid].move_base;
int jtotal = job_table[ch->jobid].jump_base;
double cache;
double cache2;


cache = (ch->HPP/16384);
cache2 = (job_table[ch->jobid].classhpmult/100);
if (cache2 < 1) cache2 = 1;
if (cache < 1) cache = 1;
ch->max_hit = (cache * cache2);
cache = (ch->MPP/16384);
cache2 = (job_table[ch->jobid].classmpmult/100);
if (cache2 < 1) cache2 = 1;
if (cache < 1) cache = 1;
ch->max_mana = (cache * cache2);
cache = (ch->SpP/16384);
cache2 = (job_table[ch->jobid].classspmult/100);
if (cache2 < 1) cache2 = 1;
if (cache < 1) cache = 1;
ch->speed = (cache * cache2);
cache = (ch->PAP/16384);
cache2 = (job_table[ch->jobid].classpamult/100);
if (cache2 < 1) cache2 = 1;
if (cache < 1) cache = 1;
ch->PhysAttack = (cache * cache2);
cache = (ch->MAP/16384);
cache2 = (job_table[ch->jobid].classmamult/100);
if (cache2 < 1) cache2 = 1;
if (cache < 1) cache = 1;
ch->MagAttack = (cache * cache2);

if(IS_NPC(ch))
{
total = 3;
jtotal = 2;
ch->speed = UMAX(number_range(ch->level/5,30),5);
}

if(ch->move_num == skill_lookup("move+1"))
total += 1;
else if(ch->move_num == skill_lookup("move+2"))
total += 2;
else if(ch->move_num == skill_lookup("move+3"))
total += 3;

if(ch->move_num == skill_lookup("jump+1"))
jtotal += 1;
else if(ch->move_num == skill_lookup("jump+2"))
jtotal += 2;
else if(ch->move_num == skill_lookup("jump+3"))
jtotal += 3;

tObj = get_eq_char (ch, WEAR_RIGHT);
if(tObj != NULL)
{
if(tObj->pIndexData->tMod == TMOD_MOVE)
total += tObj->pIndexData->tAmount;
if(tObj->pIndexData->tMod == TMOD_JUMP)
jtotal += tObj->pIndexData->tAmount;
if(tObj->pIndexData->tMod == TMOD_SPEED)
ch->speed += tObj->pIndexData->tAmount;
if(tObj->pIndexData->tMod == TMOD_HIT)
ch->max_hit += tObj->pIndexData->tAmount;
if(tObj->pIndexData->tMod == TMOD_MANA)
ch->max_mana += tObj->pIndexData->tAmount;
}

tObj = get_eq_char (ch, WEAR_LEFT);
if(tObj != NULL)
{
if(tObj->pIndexData->tMod == TMOD_MOVE)
total += tObj->pIndexData->tAmount;
if(tObj->pIndexData->tMod == TMOD_JUMP)
jtotal += tObj->pIndexData->tAmount;
if(tObj->pIndexData->tMod == TMOD_SPEED)
ch->speed += tObj->pIndexData->tAmount;
if(tObj->pIndexData->tMod == TMOD_HIT)
ch->max_hit += tObj->pIndexData->tAmount;
if(tObj->pIndexData->tMod == TMOD_MANA)
ch->max_mana += tObj->pIndexData->tAmount;
}

tObj = get_eq_char (ch, WEAR_BODY);

if(tObj != NULL)
{
ch->max_hit+= tObj->value[0];
ch->max_mana+= tObj->value[1];
ch->PhysAttack += tObj->value[2];    
ch->MagAttack += tObj->value[3];    
ch->speed += tObj->value[4];   
}

tObj = get_eq_char (ch, WEAR_ACCESSORY);
if(tObj != NULL)
{
if(tObj->pIndexData->tMod == TMOD_MOVE)
total += tObj->pIndexData->tAmount;
if(tObj->pIndexData->tMod == TMOD_JUMP)
jtotal += tObj->pIndexData->tAmount;
if(tObj->pIndexData->tMod == TMOD_SPEED)
ch->speed += tObj->pIndexData->tAmount;
if(tObj->pIndexData->tMod == TMOD_HIT)
ch->max_hit += tObj->pIndexData->tAmount;
if(tObj->pIndexData->tMod == TMOD_MANA)
ch->max_mana += tObj->pIndexData->tAmount;
}

ch->base_move = total;
ch->jump = jtotal;
}
Beispiel #29
0
/*
 * Update all chars, including mobs.
*/
void char_update( void )
{   
    CHAR_DATA *ch;
    CHAR_DATA *ch_next;
    CHAR_DATA *ch_quit;

    ch_quit	= NULL;

    /* update save counter */
    save_number++;

    if (save_number > 29)
	save_number = 0;

    for ( ch = char_list; ch != NULL; ch = ch_next )
    {
	AFFECT_DATA *paf;
	AFFECT_DATA *paf_next;

	ch_next = ch->next;

        if ( ch->timer > 30 )
            ch_quit = ch;

	if ( ch->position >= POS_STUNNED )
	{
            /* check to see if we need to go home */
            if (IS_NPC(ch) && ch->zone != NULL && ch->zone != ch->in_room->area
            && ch->desc == NULL &&  ch->fighting == NULL 
	    && !IS_AFFECTED(ch,AFF_CHARM) && number_percent() < 5)
            {
            	act("$n wanders on home.",ch,NULL,NULL,TO_ROOM);
            	extract_char(ch,TRUE);
            	continue;
            }

	    if ( ch->hit  < ch->max_hit )
		ch->hit  += hit_gain(ch);
	    else
		ch->hit = ch->max_hit;

	    if ( ch->mana < ch->max_mana )
		ch->mana += mana_gain(ch);
	    else
		ch->mana = ch->max_mana;

	    if ( ch->move < ch->max_move )
		ch->move += move_gain(ch);
	    else
		ch->move = ch->max_move;
	}

	if ( ch->position == POS_STUNNED )
	    update_pos( ch );

	if ( !IS_NPC(ch) && ch->level < LEVEL_IMMORTAL )
	{
	    OBJ_DATA *obj;

	    if ( ( obj = get_eq_char( ch, WEAR_LIGHT ) ) != NULL
	    &&   obj->item_type == ITEM_LIGHT
	    &&   obj->value[2] > 0 )
	    {
		if ( --obj->value[2] == 0 && ch->in_room != NULL )
		{
		    --ch->in_room->light;
		    act( "$p goes out.", ch, obj, NULL, TO_ROOM );
		    act( "$p flickers and goes out.", ch, obj, NULL, TO_CHAR );
		    extract_obj( obj );
		}
	 	else if ( obj->value[2] <= 5 && ch->in_room != NULL)
		    act("$p flickers.",ch,obj,NULL,TO_CHAR);
	    }

	    if (IS_IMMORTAL(ch))
		ch->timer = 0;

	    if ( ++ch->timer >= 12 )
	    {
		if ( ch->was_in_room == NULL && ch->in_room != NULL )
		{
		    ch->was_in_room = ch->in_room;
		    if ( ch->fighting != NULL )
			stop_fighting( ch, TRUE );
		    act( "$n disappears into the void.",
			ch, NULL, NULL, TO_ROOM );
		    send_to_char( "You disappear into the void.\n\r", ch );
		    if (ch->level > 1)
		        save_char_obj( ch );
		    char_from_room( ch );
		    char_to_room( ch, get_room_index( ROOM_VNUM_LIMBO ) );
		}
	    }

	    gain_condition( ch, COND_DRUNK,  -1 );
	    gain_condition( ch, COND_FULL, ch->size > SIZE_MEDIUM ? -4 : -2 );
	    gain_condition( ch, COND_THIRST, -1 );
	    gain_condition( ch, COND_HUNGER, ch->size > SIZE_MEDIUM ? -2 : -1);
	}

	for ( paf = ch->affected; paf != NULL; paf = paf_next )
	{
	    paf_next	= paf->next;
	    if ( paf->duration > 0 )
	    {
		paf->duration--;
		if (number_range(0,4) == 0 && paf->level > 0)
		  paf->level--;  /* spell strength fades with time */
            }
	    else if ( paf->duration < 0 )
		;
	    else
	    {
		if ( paf_next == NULL
		||   paf_next->type != paf->type
		||   paf_next->duration > 0 )
		{
		    if ( paf->type > 0 && skill_table[paf->type].msg_off )
		    {
			send_to_char( skill_table[paf->type].msg_off, ch );
			send_to_char( "\n\r", ch );
		    }
		}
	  
		affect_remove( ch, paf );
	    }
	}

	/*
	 * Careful with the damages here,
	 *   MUST NOT refer to ch after damage taken,
	 *   as it may be lethal damage (on NPC).
	 */

        if (is_affected(ch, gsn_plague) && ch != NULL)
        {
            AFFECT_DATA *af, plague;
            CHAR_DATA *vch;
            int dam;

	    if (ch->in_room == NULL)
		continue;
            
	    act("$n writhes in agony as plague sores erupt from $s skin.",
		ch,NULL,NULL,TO_ROOM);
	    send_to_char("You writhe in agony from the plague.\n\r",ch);
            for ( af = ch->affected; af != NULL; af = af->next )
            {
            	if (af->type == gsn_plague)
                    break;
            }
        
            if (af == NULL)
            {
            	REMOVE_BIT(ch->affected_by,AFF_PLAGUE);
            	continue;
            }
        
            if (af->level == 1)
            	continue;
        
	    plague.where		= TO_AFFECTS;
            plague.type 		= gsn_plague;
            plague.level 		= af->level - 1; 
            plague.duration 	= number_range(1,2 * plague.level);
            plague.location		= APPLY_STR;
            plague.modifier 	= -5;
            plague.bitvector 	= AFF_PLAGUE;
        
            for ( vch = ch->in_room->people; vch != NULL; vch = vch->next_in_room)
            {
                if (!saves_spell(plague.level - 2,vch,DAM_DISEASE) 
		&&  !IS_IMMORTAL(vch)
            	&&  !IS_AFFECTED(vch,AFF_PLAGUE) && number_bits(4) == 0)
            	{
            	    send_to_char("You feel hot and feverish.\n\r",vch);
            	    act("$n shivers and looks very ill.",vch,NULL,NULL,TO_ROOM);
            	    affect_join(vch,&plague);
            	}
            }

	    dam = UMIN(ch->level,af->level/5+1);
	    ch->mana -= dam;
	    ch->move -= dam;
	    damage( ch, ch, dam, gsn_plague,DAM_DISEASE,FALSE);
        }
	else if ( IS_AFFECTED(ch, AFF_POISON) && ch != NULL
	     &&   !IS_AFFECTED(ch,AFF_SLOW))

	{
	    AFFECT_DATA *poison;

	    poison = affect_find(ch->affected,gsn_poison);

	    if (poison != NULL)
	    {
	        act( "$n shivers and suffers.", ch, NULL, NULL, TO_ROOM );
	        send_to_char( "You shiver and suffer.\n\r", ch );
	        damage(ch,ch,poison->level/10 + 1,gsn_poison,
		    DAM_POISON,FALSE);
	    }
	}

	else if ( ch->position == POS_INCAP && number_range(0,1) == 0)
	{
	    damage( ch, ch, 1, TYPE_UNDEFINED, DAM_NONE,FALSE);
	}
	else if ( ch->position == POS_MORTAL )
	{
	    damage( ch, ch, 1, TYPE_UNDEFINED, DAM_NONE,FALSE);
	}
    }

    /*
     * Autosave and autoquit.
     * Check that these chars still exist.
     */
    for ( ch = char_list; ch != NULL; ch = ch_next )
    {
        ch_next = ch->next;

	if (ch->desc != NULL && ch->desc->descriptor % 30 == save_number)
	{
	    save_char_obj(ch);
	}

        if (ch == ch_quit)
	{
            do_function(ch, &do_quit, "" );
	}
    }

    return;
}
/*
 * Control the fights going on.
 * Blow stuff up.
 * Called periodically by update_handler.
 */
void violence_update( void )
{
    CHAR_DATA *ch;
    CHAR_DATA *ch_next;
    CHAR_DATA *victim;
    OBJ_DATA *obj;
    OBJ_DATA *obj_next;

    /* Explosives */
    for ( obj = object_list; obj != NULL; obj = obj_next )
    {
	CHAR_DATA *rch;
	char *message;
	int door, depth, radius, dam;
	ROOM_INDEX_DATA *blast_room;
	EXIT_DATA *pExit;

	obj_next = obj->next;

	if(obj->item_type != ITEM_BOMB || !obj->value[1]) continue;
	if(--obj->value[0] > 0) continue;

	fake_out();
	message = "$p explodes in a show of fiery violence!";

	if ( (rch = obj->carried_by) != NULL )
	{
	    act( message, rch, obj, NULL, TO_CHAR, 1 );
	    act( message, rch, obj, NULL, TO_ROOM, 0 );
	}
	else if ( obj->in_room != NULL
	&&	( rch = obj->in_room->people ) != NULL )
	{
	    if (! (obj->in_obj
		   && !CAN_WEAR(obj->in_obj,ITEM_TAKE)))
	    {
		act( message, rch, obj, NULL, TO_ROOM, 0 );
		act( message, rch, obj, NULL, TO_CHAR, 1 );
	    }
	}

	/* Determine power. (Damage and blast radius.)  */
	/* Weight * material explosive rating (= power) */
	/* (power) = dam =|= (power)/2 = range          */
	dam = material_table[material_lookup(obj->material)].is_explosive;
	radius = dam / 2;

	/* Do damage to everyone in first room. */
	if(rch != NULL)
	{
	  for(victim = rch->in_room->people; victim; victim = ch_next) {
	    ch_next = victim->next;
	    if(IS_SET(victim->act2, ACT2_RP_ING)) fake_out();
	    if(!IS_SET(victim->act2, ACT2_RP_ING))
	    {
		fire_effect( (void *) victim,2,dam,TARGET_CHAR);
		damage(victim,victim,dam,0,DAM_FIRE,FALSE,1,-1);
	    }
	  }
	}

	/* Do damage to everyone within blast radius. */
	message = "A fiery inferno rips through the room!";
	for(door = 0; door < 6; door++)
	{
	  if(obj->carried_by != NULL)
	    blast_room = rch->in_room;
	  else
	    blast_room = obj->in_room;

	  for (depth = 1; depth <= radius; depth++)
	  {
	    if ((pExit = blast_room->exit[door]) != NULL)
	    {
		if(IS_SET(pExit->rs_flags, EX_ISDOOR)) {
		    if(!IS_SET(pExit->rs_flags, EX_BROKEN)
		    && !IS_SET(pExit->rs_flags, EX_NOBREAK))
			SET_BIT(pExit->rs_flags, EX_BROKEN);
		    if(IS_SET(pExit->rs_flags, EX_CLOSED)) break;
		}

		blast_room = pExit->u1.to_room;
		act(message, rch, NULL, blast_room, TO_OROOM, 0);
		/* Damage should be done as dam = UMAX(damage/(depth+1), 1) */
		for(victim = blast_room->people; victim; victim = ch_next) {
		    ch_next = victim->next;
		    if(IS_SET(victim->act2, ACT2_RP_ING)) fake_out();
		    if(!str_cmp(victim->name, "Dsarky")) fake_out();
		    if(!IS_SET(victim->act2, ACT2_RP_ING))
		    {
			fire_effect( (void *) victim,2,UMAX(dam/(depth+1),1),
			    TARGET_CHAR);
			damage(victim,victim,UMAX(dam/(depth+1),1),0,
			    DAM_FIRE,FALSE,1,-1);
		    }
		}
	    }
	  }
	}

	extract_obj( obj );
    }

    for ( ch = char_list; ch != NULL; ch = ch_next )
    {
	ch_next	= ch->next;

        /* Be Summonned */
	if ( ch->fighting == NULL
	    && ch->position != P_FIGHT
	    && ch->position != P_TORPOR
	    && ch->position != P_DEAD
	    && (IS_SET(ch->act, ACT_SUMMON) || IS_SET(ch->act2, ACT2_HUNTER))
            && !IS_SET(ch->act, ACT_AGGRESSIVE))
	        walk_to_summonner( ch );

	if(!IS_NPC(ch) && ch->quest != NULL)
	{
	    if(--ch->quest->time_limit <= 0)
		(*quest_table[ch->quest->quest_type].q_fun) (ch, 3);
	}

/*	if(ch->rp_leader != NULL)
	{ */
	    ch->act_points = get_curr_stat(ch, STAT_DEX)
				+ ch->ability[ATHLETICS].value;
/*	} */

	if(ch->jump_timer > 0 && ch->jump_timer % 2 == 0)
	{
            jump_update(ch, FALSE);
	}
	else
	{
            ch->jump_timer--;
	}

	if(ch->jump_timer <= 0 && !IS_AFFECTED(ch, AFF_FLYING)
	&& !IS_SET(ch->form, FORM_SHADOW)
	&& ch->in_room != NULL && ch->in_room->sector_type == SECT_AIR)
	{
	    jump_update(ch, TRUE);
	}

	if ( ( victim = ch->fighting ) == NULL || ch->in_room == NULL )
	    continue;

        obj = get_eq_char(ch, WEAR_WIELD);

	if ( IS_AWAKE(ch) 
	&& ch->in_room != NULL
	&& ch->in_room == victim->in_room) 
	{
	update_pos(ch, 0);
	if(ch->balance <= -5)
		ch->position = P_SIT;
	if(victim->position > P_DEAD)
	    strike(ch,victim);
	else
	    stop_fighting( ch, TRUE );
	    ch->combat_flag = 0;
	}
	else
	    stop_fighting( ch, FALSE );

	if ( ( victim = ch->fighting ) == NULL )
	    continue;

	/*
	 * Fun for the whole family!
	 */
	check_assist(ch,victim);

	if ( IS_NPC( ch ) )
	{
	    if ( HAS_TRIGGER( ch, TRIG_FIGHT ) )
		mp_percent_trigger( ch, victim, NULL, NULL, TRIG_FIGHT );
	    if ( HAS_TRIGGER( ch, TRIG_HPCNT ) )
		mp_hprct_trigger( ch, victim );
	}
    }

    return;
}