diff --git a/Items/Weapons/Rogue/EclipsesFall.cs b/Items/Weapons/Rogue/EclipsesFall.cs index e352d26708..b914c5c93a 100644 --- a/Items/Weapons/Rogue/EclipsesFall.cs +++ b/Items/Weapons/Rogue/EclipsesFall.cs @@ -3,6 +3,7 @@ using CalamityMod.Projectiles.Rogue; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -43,6 +44,8 @@ namespace CalamityMod.Items.Weapons.Rogue return false; } + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) => Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request(Texture + "Glow").Value); + public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Rogue/EclipsesFallGlow.png b/Items/Weapons/Rogue/EclipsesFallGlow.png new file mode 100644 index 0000000000..f0cd455dd5 Binary files /dev/null and b/Items/Weapons/Rogue/EclipsesFallGlow.png differ diff --git a/Projectiles/Rogue/EclipseStealthBoom.cs b/Projectiles/Rogue/EclipseStealthBoom.cs index 3d851ae51f..dc1441f7be 100644 --- a/Projectiles/Rogue/EclipseStealthBoom.cs +++ b/Projectiles/Rogue/EclipseStealthBoom.cs @@ -1,4 +1,6 @@ -using Terraria; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue @@ -35,5 +37,12 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.frameCounter > Lifetime) Projectile.Kill(); } + + public override void PostDraw(Color lightColor) + { + Texture2D glow = ModContent.Request(Texture + "Glow").Value; + Rectangle frame = glow.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + } } } diff --git a/Projectiles/Rogue/EclipseStealthBoomGlow.png b/Projectiles/Rogue/EclipseStealthBoomGlow.png new file mode 100644 index 0000000000..afa3ecf883 Binary files /dev/null and b/Projectiles/Rogue/EclipseStealthBoomGlow.png differ diff --git a/Projectiles/Rogue/EclipsesFallMain.cs b/Projectiles/Rogue/EclipsesFallMain.cs index 099b807166..c533adb17c 100644 --- a/Projectiles/Rogue/EclipsesFallMain.cs +++ b/Projectiles/Rogue/EclipsesFallMain.cs @@ -1,5 +1,6 @@ using CalamityMod.Particles; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -17,8 +18,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -66,8 +67,14 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } + + public override void PostDraw(Color lightColor) + { + Texture2D glow = ModContent.Request(Texture + "Glow").Value; + Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + } } } diff --git a/Projectiles/Rogue/EclipsesSmol.cs b/Projectiles/Rogue/EclipsesSmol.cs index a4073c7426..1000f9603e 100644 --- a/Projectiles/Rogue/EclipsesSmol.cs +++ b/Projectiles/Rogue/EclipsesSmol.cs @@ -32,5 +32,11 @@ namespace CalamityMod.Projectiles.Rogue Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } + + public override void PostDraw(Color lightColor) + { + Texture2D glow = ModContent.Request(Texture + "Glow").Value; + Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + } } } diff --git a/Projectiles/Rogue/EclipsesSmolGlow.png b/Projectiles/Rogue/EclipsesSmolGlow.png new file mode 100644 index 0000000000..0539d70e64 Binary files /dev/null and b/Projectiles/Rogue/EclipsesSmolGlow.png differ diff --git a/Projectiles/Rogue/EclipsesStealth.cs b/Projectiles/Rogue/EclipsesStealth.cs index 9f935f2652..1b71e7d58d 100644 --- a/Projectiles/Rogue/EclipsesStealth.cs +++ b/Projectiles/Rogue/EclipsesStealth.cs @@ -1,5 +1,6 @@ using CalamityMod.Particles; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; using Terraria.ID; @@ -22,8 +23,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -65,12 +66,13 @@ namespace CalamityMod.Projectiles.Rogue // Eclipse's Fall is guaranteed to impale for 10 seconds, no more, no less if (!changedTimeLeft) { - Projectile.timeLeft = 600 * Projectile.MaxUpdates; + Projectile.MaxUpdates = 1; + Projectile.timeLeft = 600; changedTimeLeft = true; } // Spawn spears. As this uses local AI, it's done client-side only. - if (Projectile.owner == Main.myPlayer && Projectile.FinalExtraUpdate()) + if (Projectile.owner == Main.myPlayer) { Projectile.localAI[1] -= 1f; @@ -107,10 +109,16 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } + public override void PostDraw(Color lightColor) + { + Texture2D glow = ModContent.Request(Texture + "Glow").Value; + Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + } + public override bool? CanHitNPC(NPC target) => Projectile.ai[0] == 1f ? false : base.CanHitNPC(target); public override bool CanHitPvp(Player target) => Projectile.ai[0] != 1f; diff --git a/Projectiles/Rogue/UmbraphileBoom.cs b/Projectiles/Rogue/UmbraphileBoom.cs index 86ae946f4e..fb9924cd18 100644 --- a/Projectiles/Rogue/UmbraphileBoom.cs +++ b/Projectiles/Rogue/UmbraphileBoom.cs @@ -1,4 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -54,5 +56,12 @@ namespace CalamityMod.Projectiles.Rogue if (!Main.dayTime || Main.rand.NextBool(3)) //100% at night, 33.33% chance during day target.AddBuff(ModContent.BuffType(), 45); } + + public override void PostDraw(Color lightColor) + { + Texture2D glow = ModContent.Request(Texture + "Glow").Value; + Rectangle frame = glow.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + } } } diff --git a/Projectiles/Rogue/UmbraphileBoomGlow.png b/Projectiles/Rogue/UmbraphileBoomGlow.png new file mode 100644 index 0000000000..b4c9459bdd Binary files /dev/null and b/Projectiles/Rogue/UmbraphileBoomGlow.png differ