The Doge
Steampunker
error CS1703: An assembly with the same identity 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' has already been imported. Try removing one of the duplicate references.
What am i doing wrong?
What am i doing wrong?
Code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace TrueBlades.Items.Weapons
{
public class TrueHorsemansBlade : ModItem
{
public override void SetDefaults()
{
item.name = "True Horseman's Blade";
item.damage = 201;
item.melee = true;
item.width = 65; //Sword width
item.height = 65; //Sword height
item.toolTip = //Item Description
item.useTime = 20; //how fast
item.useAnimation = 25;
item.useStyle = 1; //Style is how this item is used, 1 is the style of the sword
item.knockBack = 10; //Sword knockback
item.value = 100;
item.rare = 10;
item.useSound = 1; //1 is the sound of the sword
item.autoReuse = true; //if it's capable of autoswing.
item.useTurn = true;
item.shoot = mod.ProjectileType();
item.shootSpeed = 8f; //projectile speed
}
public override void AddRecipes() //How to craft this sword
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.TheHorsemansBlade, 1826);
recipe.AddIngredient(ItemID.BrokenHeroSword, 1570);
recipe.AddTile(TileID.MythrillAnvil);
recipe.AddTile(TileID.OrichalcumAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
player.AddBuff(mod.BuffType(), 400); //400 is the buff time
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.Next(1) == 0)
{
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, mod.DustType("DustName"));
}
}
}
}