Ejemplo n.º 1
0
void monster_fire_sword (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int flashtype)
{
	damage = monster_increaseDamageByTalent(self->activator, damage);
	fire_sword (self, start, aimdir, damage, kick);

	gi.WriteByte (svc_muzzleflash2);
	gi.WriteShort (self - g_edicts);
	gi.WriteByte (flashtype);
	gi.multicast (start, MULTICAST_PVS);
}
Ejemplo n.º 2
0
void sword_attack (edict_t *ent, vec3_t g_offset, int damage)
{
  vec3_t  forward, right;
  vec3_t  start;
  vec3_t  offset;
 
  /*if (is_quad)
         damage *= 4;
  AngleVectors (ent->client->v_angle, forward, right, NULL);
  VectorSet(offset, 24, 8, ent->viewheight-8);
  VectorAdd (offset, g_offset, offset);
  P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start);
 
  VectorScale (forward, -2, ent->client->kick_origin);
  ent->client->kick_angles[0] = -1;
 */
  fire_sword (ent, start, forward, damage, 100 );
}
Ejemplo n.º 3
0
void do_sword(CHAR_DATA *ch, char *argument)
{
	char arg[MAX_STRING_LENGTH];
	bool lit = FALSE;
	bool fire = FALSE;
	bool ice = FALSE;
	bool drain = FALSE;
	bool soul = FALSE;
	
	argument = one_argument(argument, arg);
	
	if (IS_NPC(ch)) return;
	
	if (!IS_CLASS(ch, CLASS_SAMURAI))
	{
		do_rand_typo(ch,"");
		return;
	}
	
	  if (arg[0] == '\0')
  {
    send_to_char("----------------------------------------------------------------------------\n\r",ch);
	send_to_char("                           -= Samurai Sword Skills =-\n\r",ch);
	send_to_char("----------------------------------------------------------------------------\n\r",ch);
	if (!IS_SAMPOWER(ch,SAM_SWORD))
		send_to_char("None",ch);
	if (IS_SAMPOWER(ch,SAM_SWORD))
		send_to_char("     Sword: ",ch);
	if (IS_SAMPOWER(ch,SAM_LITSWORD))
		send_to_char("#YLightning#n",ch);
	if (IS_SAMPOWER(ch,SAM_FIRESWORD))
		send_to_char(", #RFire#n",ch);
	if (IS_SAMPOWER(ch,SAM_ICESWORD))
		send_to_char(", #CIce#n",ch);
	if (IS_SAMPOWER(ch,SAM_DRAINSWORD))
		send_to_char(", #0Drain#n",ch);
	if (IS_SAMPOWER(ch,SAM_SOULSWORD))
		send_to_char(", #WSoul#n.",ch);
	send_to_char("\n\r",ch);
	if (IS_SAMPOWER(ch,SAM_SWORD))
	send_to_char("     Type sword <skill> to use that skill.\n\r",ch);
	send_to_char("\n\r",ch);
    return;
  }
	
	if (!IS_SAMPOWER(ch,SAM_SWORD))
	{
		send_to_char("You have not yet learned how to do sword techniques.\n\r",ch);
		return;
	}
	
	if (!str_cmp(arg, "lightning"))		lit = TRUE;
	if (!str_cmp(arg, "fire"))			fire = TRUE;
	if (!str_cmp(arg, "ice"))			ice = TRUE;
	if (!str_cmp(arg, "drain"))			drain = TRUE;
	if (!str_cmp(arg, "soul"))			soul = TRUE;
	
	if ((!lit) && (!fire) && (!ice) && (!drain) && (!soul))
	{
		send_to_char("That is not a technique, try lightning, fire, ice, drain or soul.\n\r",ch);
		return;
	}

	if (lit)
	{
		if (!IS_SAMPOWER(ch,SAM_LITSWORD))
		{
			send_to_char("You have not yet learned this technique.\n\r",ch);
			return;
		}
		else
		{
			lightning_sword(ch);
			return;
		}
	}
	
	if (fire)
	{
		if (!IS_SAMPOWER(ch,SAM_FIRESWORD))
		{
			send_to_char("You have not yet learned this technique.\n\r",ch);
			return;
		}
		else
		{
			fire_sword(ch);
			return;
		}
	}
	
	if (ice)
	{
		if (!IS_SAMPOWER(ch,SAM_ICESWORD))
		{
			send_to_char("You have not yet learned this technique.\n\r",ch);
			return;
		}
		else
		{
			ice_sword(ch);
			return;
		}
	}
	
	if (drain)
	{
		if (!IS_SAMPOWER(ch,SAM_DRAINSWORD))
		{
			send_to_char("You have not yet learned this technique.\n\r",ch);
			return;
		}
		else
		{
			drain_sword(ch);
			return;
		}
	}
	
	if (soul)
	{
		if (!IS_SAMPOWER(ch,SAM_SOULSWORD))
		{
			send_to_char("You have not yet learned this technique.\n\r",ch);
			return;
		}
		else
		{
			soul_sword(ch);
			return;
		}
	}
}