diff --git a/Content/DecimationWorld.cs b/Content/DecimationWorld.cs index b95083e..f98c062 100644 --- a/Content/DecimationWorld.cs +++ b/Content/DecimationWorld.cs @@ -8,6 +8,7 @@ using Terraria.ModLoader.IO; using Decimation.Content.Structures; using Microsoft.Xna.Framework; using System; +using Decimation.Content.Projectiles.DuneWyrm; using Terraria.ID; namespace Decimation.Content @@ -45,6 +46,8 @@ namespace Decimation.Content downedDuneWyrm = downed.Contains("downedDuneWyrm"); downedArachnus = downed.Contains("downedArachnus"); downedWyvern = downed.Contains("downedWyvern"); + + Sundial.Reset(); } public override void NetSend(BinaryWriter writer) { diff --git a/Content/Items/Weapons/DuneWyrm/StaffofShiftingSands.cs b/Content/Items/Weapons/DuneWyrm/StaffofShiftingSands.cs index e449548..b03e0ec 100644 --- a/Content/Items/Weapons/DuneWyrm/StaffofShiftingSands.cs +++ b/Content/Items/Weapons/DuneWyrm/StaffofShiftingSands.cs @@ -13,6 +13,7 @@ namespace Decimation.Content.Items.Weapons.DuneWyrm public class StaffofShiftingSands : DecimationWeapon { protected override string ItemName => "Staff of Shifting Sands"; + protected override string ItemTooltip => "Its... kinda cute...i guess..?"; protected override int Damages => 30; protected override DamageType DamagesType => DamageType.Summon; protected override int ProjectileId => ModContent.ProjectileType(); diff --git a/Content/Items/Weapons/DuneWyrm/Sundial.cs b/Content/Items/Weapons/DuneWyrm/Sundial.cs index 196861a..789512c 100644 --- a/Content/Items/Weapons/DuneWyrm/Sundial.cs +++ b/Content/Items/Weapons/DuneWyrm/Sundial.cs @@ -12,6 +12,7 @@ namespace Decimation.Content.Items.Weapons.DuneWyrm public class Sundial : DecimationWeapon { protected override string ItemName => "Sundial"; + protected override string ItemTooltip => "Fire bolts of pure time to eradicate your opposition"; protected override int Damages => 15; protected override DamageType DamagesType => DamageType.Magic; protected override int ProjectileId => ModContent.ProjectileType(); @@ -29,6 +30,7 @@ namespace Decimation.Content.Items.Weapons.DuneWyrm item.crit = 15; item.rare = Rarity.LightRed.GetRarityValue(); item.value = Item.buyPrice(gold: 1, silver: 50); + item.UseSound = SoundID.Item28; } protected override List GetRecipes() diff --git a/Content/Items/Weapons/DuneWyrm/Timekeeper.cs b/Content/Items/Weapons/DuneWyrm/Timekeeper.cs index 7bb6fac..a90ad03 100644 --- a/Content/Items/Weapons/DuneWyrm/Timekeeper.cs +++ b/Content/Items/Weapons/DuneWyrm/Timekeeper.cs @@ -13,6 +13,7 @@ namespace Decimation.Content.Items.Weapons.DuneWyrm public class Timekeeper : DecimationWeapon { protected override string ItemName => "The Timekeeper"; + protected override string ItemTooltip => "Their time has come..."; protected override int Damages => 45; protected override DamageType DamagesType => DamageType.Ranged; protected override int ProjectileId => ModContent.ProjectileType(); diff --git a/Content/Projectiles/DuneWyrm/Sundial.cs b/Content/Projectiles/DuneWyrm/Sundial.cs index 03543d4..6d78cdd 100644 --- a/Content/Projectiles/DuneWyrm/Sundial.cs +++ b/Content/Projectiles/DuneWyrm/Sundial.cs @@ -11,24 +11,32 @@ namespace Decimation.Content.Projectiles.DuneWyrm { private static readonly IDictionary ProjectilesIndex = new Dictionary(); private static readonly IDictionary ProjectilesCount = new Dictionary(); - private static readonly int IndexResetCounterMax = 60; + + public static void Reset() + { + ProjectilesIndex.Clear(); + ProjectilesCount.Clear(); + } protected override int AnimationFrames => 12; protected override int AnimationFps => 1; protected override DecimationWeapon.DamageType DamageType => DecimationWeapon.DamageType.Magic; protected override int Damages => 15; + private const int IndexResetCounterMax = 30; + private bool _killAnimationPlayer = false; + private int ProjectileIndex { get { - if (!ProjectilesIndex.ContainsKey(Owner)) ProjectilesIndex[Owner] = -1; + if (!ProjectilesIndex.ContainsKey(Owner)) ProjectilesIndex[Owner] = 0; return ProjectilesIndex[Owner]; } set { int index = value; - if (index > AnimationFrames) index = AnimationFrames; + if (index >= AnimationFrames) index = 0; ProjectilesIndex[Owner] = index; } } @@ -37,7 +45,7 @@ namespace Decimation.Content.Projectiles.DuneWyrm { get { - if (!ProjectilesCount.ContainsKey(Owner)) Count = -1; + if (!ProjectilesCount.ContainsKey(Owner)) Count = 0; return ProjectilesCount[Owner]; } set => ProjectilesCount[Owner] = value; @@ -97,10 +105,27 @@ namespace Decimation.Content.Projectiles.DuneWyrm projectile.penetrate = -1; projectile.damage = 0; projectile.alpha = 0; + + if (!_killAnimationPlayer) + { + Main.PlaySound(SoundID.Item27, projectile.Center); + + for (int i = 0; i < 4; i++) + { + Dust.NewDust(projectile.position, projectile.width, projectile.height, 135, 0, + 0, 100, default, 4f * projectile.scale); + } + + _killAnimationPlayer = true; + } } else { Lighting.AddLight(projectile.Center, 0, 0.8f, 1); + Dust.NewDust(projectile.position, projectile.width, projectile.height, 135, + projectile.velocity.X * 0.2f, + projectile.velocity.Y * 0.2f, 100, default, 1f * projectile.scale); + projectile.velocity.Normalize(); projectile.velocity *= Index;