Updated the Hour Hand

This commit is contained in:
FyloZ 2020-06-23 14:28:18 -04:00
parent f67fdce869
commit 340d245cbd
2 changed files with 13 additions and 4 deletions

View File

@ -1,7 +1,9 @@
using Decimation.Content.Projectiles;
using Decimation.Lib.Items; using Decimation.Lib.Items;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Terraria; using Terraria;
using Terraria.ID; using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Content.Items.Weapons namespace Decimation.Content.Items.Weapons
{ {
@ -10,8 +12,8 @@ namespace Decimation.Content.Items.Weapons
protected override string ItemName => "Hour Hand"; protected override string ItemName => "Hour Hand";
protected override string ItemTooltip => "The sands of time flow in your favor!"; protected override string ItemTooltip => "The sands of time flow in your favor!";
protected override int Damages => 45; protected override int Damages => 45;
protected override string ProjectileName => "HourHandProjectile"; protected override int ProjectileId => ModContent.ProjectileType<HourHandProjectile>();
protected override void InitWeapon() protected override void InitWeapon()
{ {
item.width = 32; item.width = 32;
@ -23,19 +25,26 @@ namespace Decimation.Content.Items.Weapons
item.rare = 2; item.rare = 2;
item.crit = 7; item.crit = 7;
item.shootSpeed = 10f; item.shootSpeed = 10f;
item.autoReuse = true;
} }
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage,
ref float knockBack) ref float knockBack)
{ {
if (Main.rand.NextBool()) player.AddBuff(BuffID.Swiftness, 1500); if (Main.rand.NextBool()) player.AddBuff(BuffID.Swiftness, 300);
return true; return true;
} }
public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit)
{
if (Main.rand.NextBool()) target.AddBuff(BuffID.Slow, 300);
}
public override void MeleeEffects(Player player, Rectangle hitbox) public override void MeleeEffects(Player player, Rectangle hitbox)
{ {
Lighting.AddLight(item.Center, 0f, 0f, 1f); Lighting.AddLight(item.Center, 0f, 0f, 1f);
} }
} }
} }

View File

@ -14,7 +14,7 @@ namespace Decimation.Content.Projectiles
projectile.width = 10; projectile.width = 10;
projectile.height = 10; projectile.height = 10;
projectile.timeLeft = 600; projectile.timeLeft = 600;
projectile.penetrate = 1; projectile.penetrate = -1;
projectile.aiStyle = 8; projectile.aiStyle = 8;
aiType = 253; aiType = 253;
} }