diff --git a/Items/Weapons/Ranged/Phangasm.cs b/Items/Weapons/Ranged/Phangasm.cs index 4f19bfc7da..b8c1d1337d 100644 --- a/Items/Weapons/Ranged/Phangasm.cs +++ b/Items/Weapons/Ranged/Phangasm.cs @@ -3,6 +3,7 @@ using CalamityMod.Projectiles.Ranged; 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; @@ -22,8 +23,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { Item.damage = 180; - Item.width = 20; - Item.height = 12; + Item.width = 48; + Item.height = 82; Item.useTime = 12; Item.useAnimation = 12; Item.useStyle = ItemUseStyleID.Shoot; @@ -50,6 +51,11 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Ranged/PhangasmGlow").Value); + } + public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Ranged/Phangasm.png b/Items/Weapons/Ranged/Phangasm.png index c18ca4431f..afd265a4dd 100644 Binary files a/Items/Weapons/Ranged/Phangasm.png and b/Items/Weapons/Ranged/Phangasm.png differ diff --git a/Items/Weapons/Ranged/PhangasmGlow.png b/Items/Weapons/Ranged/PhangasmGlow.png new file mode 100644 index 0000000000..21d211a1ac Binary files /dev/null and b/Items/Weapons/Ranged/PhangasmGlow.png differ diff --git a/Projectiles/Ranged/PhangasmBow.cs b/Projectiles/Ranged/PhangasmBow.cs index ec156911ef..569c688ad2 100644 --- a/Projectiles/Ranged/PhangasmBow.cs +++ b/Projectiles/Ranged/PhangasmBow.cs @@ -1,4 +1,5 @@ using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ID; @@ -18,7 +19,7 @@ namespace CalamityMod.Projectiles.Ranged public override void SetDefaults() { - Projectile.width = 40; + Projectile.width = 48; Projectile.height = 82; Projectile.friendly = true; Projectile.penetrate = -1; @@ -132,6 +133,16 @@ namespace CalamityMod.Projectiles.Ranged player.itemRotation = (float)Math.Atan2((double)(Projectile.velocity.Y * (float)Projectile.direction), (double)(Projectile.velocity.X * (float)Projectile.direction)); } + public override void PostDraw(Color lightColor) + { + Texture2D texture = ModContent.Request("CalamityMod/Items/Weapons/Ranged/PhangasmGlow").Value; + SpriteEffects spriteEffects = SpriteEffects.None; + if (Projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, new Vector2(texture.Width / 2f, texture.Height / 2f), Projectile.scale, spriteEffects, 0); + } + public override bool? CanDamage() => false; } }