Added Wasp Necklace

This commit is contained in:
FyloZ 2020-06-10 19:35:55 -04:00
parent 0510b2f3c9
commit 2520570fa6

View File

@ -349,24 +349,7 @@ namespace Decimation.Content
if (this.HasEquippedAccessory(ModContent.ItemType<WaspNecklace>()))
{
player.AddBuff(BuffID.Panic, 300);
// Wasps
int waspsCount = 1;
for (int i = 0; i < 3; i++)
{
if (Main.rand.NextBool(3))
waspsCount++;
}
Vector2 position = player.position;
Vector2 speed = new Vector2(Main.rand.Next(-35, 36) * 0.02f, Main.rand.Next(-35, 36) * 0.02f);
int damages = 10 + Main.rand.Next(1, 4);
const float kb = 0.5f;
for (int i = 0; i < waspsCount; i++)
{
Projectile.NewProjectile(position, speed, ProjectileID.Wasp, damages, kb, player.whoAmI);
}
SpawnWaspNecklaceWasps();
}
}
@ -410,6 +393,12 @@ namespace Decimation.Content
if (AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>() && Main.rand.NextBool(25))
CrystalAmuletEffect();
if (this.HasEquippedAccessory(ModContent.ItemType<WaspNecklace>()))
{
player.AddBuff(BuffID.Panic, 300);
SpawnWaspNecklaceWasps();
}
}
public override void ModifyHitByNPC(NPC npc, ref int damage, ref bool crit)
@ -422,6 +411,26 @@ namespace Decimation.Content
_amuletSlotAmulet?.Synergy.OnPlayerHit(this, ref damage);
}
private void SpawnWaspNecklaceWasps()
{
int waspsCount = 1;
for (int i = 0; i < 3; i++)
{
if (Main.rand.NextBool(3))
waspsCount++;
}
Vector2 position = player.position;
Vector2 speed = new Vector2(Main.rand.Next(-35, 36) * 0.02f, Main.rand.Next(-35, 36) * 0.02f);
int damages = 10 + Main.rand.Next(1, 4);
const float kb = 0.5f;
for (int i = 0; i < waspsCount; i++)
{
Projectile.NewProjectile(position, speed, ProjectileID.Wasp, damages, kb, player.whoAmI);
}
}
public void DashMovement()
{
if (dash == 2 && ttDash > 0)