Finished the Sundial.

Added tooltips to the Staff of Shifting Sands and the Timekeeper.
This commit is contained in:
FyloZ 2020-07-01 12:02:21 -04:00
parent 4b1af70d9b
commit 317b3759c8
5 changed files with 36 additions and 4 deletions

View File

@ -8,6 +8,7 @@ using Terraria.ModLoader.IO;
using Decimation.Content.Structures; using Decimation.Content.Structures;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using System; using System;
using Decimation.Content.Projectiles.DuneWyrm;
using Terraria.ID; using Terraria.ID;
namespace Decimation.Content namespace Decimation.Content
@ -45,6 +46,8 @@ namespace Decimation.Content
downedDuneWyrm = downed.Contains("downedDuneWyrm"); downedDuneWyrm = downed.Contains("downedDuneWyrm");
downedArachnus = downed.Contains("downedArachnus"); downedArachnus = downed.Contains("downedArachnus");
downedWyvern = downed.Contains("downedWyvern"); downedWyvern = downed.Contains("downedWyvern");
Sundial.Reset();
} }
public override void NetSend(BinaryWriter writer) public override void NetSend(BinaryWriter writer)
{ {

View File

@ -13,6 +13,7 @@ namespace Decimation.Content.Items.Weapons.DuneWyrm
public class StaffofShiftingSands : DecimationWeapon public class StaffofShiftingSands : DecimationWeapon
{ {
protected override string ItemName => "Staff of Shifting Sands"; protected override string ItemName => "Staff of Shifting Sands";
protected override string ItemTooltip => "Its... kinda cute...i guess..?";
protected override int Damages => 30; protected override int Damages => 30;
protected override DamageType DamagesType => DamageType.Summon; protected override DamageType DamagesType => DamageType.Summon;
protected override int ProjectileId => ModContent.ProjectileType<AncientTombCrawlerHead>(); protected override int ProjectileId => ModContent.ProjectileType<AncientTombCrawlerHead>();

View File

@ -12,6 +12,7 @@ namespace Decimation.Content.Items.Weapons.DuneWyrm
public class Sundial : DecimationWeapon public class Sundial : DecimationWeapon
{ {
protected override string ItemName => "Sundial"; 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 int Damages => 15;
protected override DamageType DamagesType => DamageType.Magic; protected override DamageType DamagesType => DamageType.Magic;
protected override int ProjectileId => ModContent.ProjectileType<Projectiles.DuneWyrm.Sundial>(); protected override int ProjectileId => ModContent.ProjectileType<Projectiles.DuneWyrm.Sundial>();
@ -29,6 +30,7 @@ namespace Decimation.Content.Items.Weapons.DuneWyrm
item.crit = 15; item.crit = 15;
item.rare = Rarity.LightRed.GetRarityValue(); item.rare = Rarity.LightRed.GetRarityValue();
item.value = Item.buyPrice(gold: 1, silver: 50); item.value = Item.buyPrice(gold: 1, silver: 50);
item.UseSound = SoundID.Item28;
} }
protected override List<ModRecipe> GetRecipes() protected override List<ModRecipe> GetRecipes()

View File

@ -13,6 +13,7 @@ namespace Decimation.Content.Items.Weapons.DuneWyrm
public class Timekeeper : DecimationWeapon public class Timekeeper : DecimationWeapon
{ {
protected override string ItemName => "The Timekeeper"; protected override string ItemName => "The Timekeeper";
protected override string ItemTooltip => "Their time has come...";
protected override int Damages => 45; protected override int Damages => 45;
protected override DamageType DamagesType => DamageType.Ranged; protected override DamageType DamagesType => DamageType.Ranged;
protected override int ProjectileId => ModContent.ProjectileType<Projectiles.DuneWyrm.Timekeeper>(); protected override int ProjectileId => ModContent.ProjectileType<Projectiles.DuneWyrm.Timekeeper>();

View File

@ -11,24 +11,32 @@ namespace Decimation.Content.Projectiles.DuneWyrm
{ {
private static readonly IDictionary<int, int> ProjectilesIndex = new Dictionary<int, int>(); private static readonly IDictionary<int, int> ProjectilesIndex = new Dictionary<int, int>();
private static readonly IDictionary<int, int> ProjectilesCount = new Dictionary<int, int>(); private static readonly IDictionary<int, int> ProjectilesCount = new Dictionary<int, int>();
private static readonly int IndexResetCounterMax = 60;
public static void Reset()
{
ProjectilesIndex.Clear();
ProjectilesCount.Clear();
}
protected override int AnimationFrames => 12; protected override int AnimationFrames => 12;
protected override int AnimationFps => 1; protected override int AnimationFps => 1;
protected override DecimationWeapon.DamageType DamageType => DecimationWeapon.DamageType.Magic; protected override DecimationWeapon.DamageType DamageType => DecimationWeapon.DamageType.Magic;
protected override int Damages => 15; protected override int Damages => 15;
private const int IndexResetCounterMax = 30;
private bool _killAnimationPlayer = false;
private int ProjectileIndex private int ProjectileIndex
{ {
get get
{ {
if (!ProjectilesIndex.ContainsKey(Owner)) ProjectilesIndex[Owner] = -1; if (!ProjectilesIndex.ContainsKey(Owner)) ProjectilesIndex[Owner] = 0;
return ProjectilesIndex[Owner]; return ProjectilesIndex[Owner];
} }
set set
{ {
int index = value; int index = value;
if (index > AnimationFrames) index = AnimationFrames; if (index >= AnimationFrames) index = 0;
ProjectilesIndex[Owner] = index; ProjectilesIndex[Owner] = index;
} }
} }
@ -37,7 +45,7 @@ namespace Decimation.Content.Projectiles.DuneWyrm
{ {
get get
{ {
if (!ProjectilesCount.ContainsKey(Owner)) Count = -1; if (!ProjectilesCount.ContainsKey(Owner)) Count = 0;
return ProjectilesCount[Owner]; return ProjectilesCount[Owner];
} }
set => ProjectilesCount[Owner] = value; set => ProjectilesCount[Owner] = value;
@ -97,10 +105,27 @@ namespace Decimation.Content.Projectiles.DuneWyrm
projectile.penetrate = -1; projectile.penetrate = -1;
projectile.damage = 0; projectile.damage = 0;
projectile.alpha = 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 else
{ {
Lighting.AddLight(projectile.Center, 0, 0.8f, 1); 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.Normalize();
projectile.velocity *= Index; projectile.velocity *= Index;