diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 21805caabe..1d3950412b 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -20,6 +20,7 @@ using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs; using CalamityMod.NPCs.Astral; using CalamityMod.NPCs.Calamitas; @@ -9296,13 +9297,17 @@ namespace CalamityMod.CalPlayer effect = SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically; } - if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) + // Staff + if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || + item.type == ModContent.ItemType()) { Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/DeathhailStaffGlow"); - if (item.type == ModContent.ItemType()) - texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/VesuviusGlow"); - else if (item.type == ModContent.ItemType()) - texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/SoulPiercerGlow"); + if (item.type == ModContent.ItemType()) + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/VesuviusGlow"); + else if (item.type == ModContent.ItemType()) + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/SoulPiercerGlow"); + else if (item.type == ModContent.ItemType()) + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/FatesRevealGlow"); float num104 = drawPlayer.itemRotation + 0.785f * (float)drawPlayer.direction; int num105 = 0; @@ -9341,6 +9346,7 @@ namespace CalamityMod.CalPlayer Main.playerDrawData.Add(data); } + // Bow and Book else if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) { @@ -9362,7 +9368,7 @@ namespace CalamityMod.CalPlayer offsetX = 9; } - Vector2 vector13 = new Vector2((float)(Main.itemTexture[item.type].Width / 2), (float)(Main.itemTexture[item.type].Height / 2)); + Vector2 vector13 = new Vector2((float)(Main.itemTexture[item.type].Width / 2), (float)(Main.itemTexture[item.type].Height / 2)); Vector2 vector14 = vector13; int num107 = (int)vector14.X - offsetX; vector13.Y = vector14.Y; @@ -9384,8 +9390,9 @@ namespace CalamityMod.CalPlayer Main.playerDrawData.Add(data); } + // Sword else if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || - item.type == ModContent.ItemType()) + item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) { Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/ExcelsusGlow"); if (item.type == ModContent.ItemType()) @@ -9394,8 +9401,12 @@ namespace CalamityMod.CalPlayer texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/TheEnforcerGlow"); else if (item.type == ModContent.ItemType()) texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/ElementalExcaliburGlow"); + else if (item.type == ModContent.ItemType()) + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/TerrorBladeGlow"); + else if (item.type == ModContent.ItemType()) + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Summon/EtherealSubjugatorGlow"); - float yOffset = drawPlayer.gravDir == -1f ? 0f : (float)Main.itemTexture[item.type].Height; + float yOffset = drawPlayer.gravDir == -1f ? 0f : (float)Main.itemTexture[item.type].Height; DrawData data = new DrawData(texture, new Vector2((float)(int)(vector.X - Main.screenPosition.X), (float)(int)(vector.Y - Main.screenPosition.Y)), diff --git a/Items/Accessories/Affliction.cs b/Items/Accessories/Affliction.cs index f0c21bffb2..6648787451 100644 --- a/Items/Accessories/Affliction.cs +++ b/Items/Accessories/Affliction.cs @@ -1,7 +1,10 @@ using CalamityMod.Buffs.StatBuffs; using CalamityMod.CalPlayer; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; + namespace CalamityMod.Items.Accessories { public class Affliction : ModItem @@ -15,15 +18,21 @@ namespace CalamityMod.Items.Accessories public override void SetDefaults() { - item.width = 20; - item.height = 20; + item.width = 38; + item.height = 44; item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; item.expert = true; item.rare = 9; } - public override void UpdateAccessory(Player player, bool hideVisual) + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Vector2 origin = new Vector2(19f, 20f); + spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Items/Accessories/Affliction"), item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f); + } + + public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); modPlayer.affliction = true; diff --git a/Items/Accessories/AfflictionGlow.png b/Items/Accessories/AfflictionGlow.png new file mode 100644 index 0000000000..e8f6427985 Binary files /dev/null and b/Items/Accessories/AfflictionGlow.png differ diff --git a/Items/PermanentBoosters/EctoheartGlow.png b/Items/PermanentBoosters/EctoheartGlow.png new file mode 100644 index 0000000000..c4f073a2b1 Binary files /dev/null and b/Items/PermanentBoosters/EctoheartGlow.png differ diff --git a/Items/SummonItems/NecroplasmicBeacon.cs b/Items/SummonItems/NecroplasmicBeacon.cs index 19df9aef26..4cdb3d249a 100644 --- a/Items/SummonItems/NecroplasmicBeacon.cs +++ b/Items/SummonItems/NecroplasmicBeacon.cs @@ -1,6 +1,8 @@ using CalamityMod.Items.Materials; using CalamityMod.NPCs.Polterghast; using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -19,8 +21,8 @@ namespace CalamityMod.Items.SummonItems public override void SetDefaults() { - item.width = 28; - item.height = 18; + item.width = 42; + item.height = 58; item.useAnimation = 45; item.useTime = 45; item.useStyle = 4; @@ -28,7 +30,13 @@ namespace CalamityMod.Items.SummonItems item.Calamity().postMoonLordRarity = 13; } - public override bool CanUseItem(Player player) + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Vector2 origin = new Vector2(21f, 27f); //21, 29 + spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Items/SummonItems/NecroplasmicBeaconGlow"), item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f); + } + + public override bool CanUseItem(Player player) { return player.ZoneDungeon && !NPC.AnyNPCs(ModContent.NPCType()) && CalamityWorld.downedBossAny; } diff --git a/Items/SummonItems/NecroplasmicBeaconGlow.png b/Items/SummonItems/NecroplasmicBeaconGlow.png new file mode 100644 index 0000000000..4d35a4e03e Binary files /dev/null and b/Items/SummonItems/NecroplasmicBeaconGlow.png differ diff --git a/Items/TreasureBags/PolterghastBag.cs b/Items/TreasureBags/PolterghastBag.cs index 90509615a3..06c0b65f12 100644 --- a/Items/TreasureBags/PolterghastBag.cs +++ b/Items/TreasureBags/PolterghastBag.cs @@ -8,6 +8,8 @@ using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs.Polterghast; using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; @@ -33,7 +35,13 @@ namespace CalamityMod.Items.TreasureBags item.expert = true; } - public override bool CanRightClick() + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Vector2 origin = new Vector2(16f, 20f); //16, 17 + spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Items/TreasureBags/PolterghastBagGlow"), item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f); + } + + public override bool CanRightClick() { return true; } diff --git a/Items/TreasureBags/PolterghastBagGlow.png b/Items/TreasureBags/PolterghastBagGlow.png new file mode 100644 index 0000000000..0f04697371 Binary files /dev/null and b/Items/TreasureBags/PolterghastBagGlow.png differ diff --git a/Items/Weapons/Magic/FatesReveal.cs b/Items/Weapons/Magic/FatesReveal.cs index be4ed206c0..88f1f417b5 100644 --- a/Items/Weapons/Magic/FatesReveal.cs +++ b/Items/Weapons/Magic/FatesReveal.cs @@ -1,5 +1,6 @@ using CalamityMod.Projectiles.Magic; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ID; @@ -21,8 +22,8 @@ namespace CalamityMod.Items.Weapons.Magic item.damage = 60; item.magic = true; item.mana = 20; - item.width = 68; - item.height = 72; + item.width = 80; + item.height = 86; item.useTime = 16; item.useAnimation = 16; item.useStyle = 5; @@ -37,7 +38,13 @@ namespace CalamityMod.Items.Weapons.Magic item.Calamity().postMoonLordRarity = 13; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Vector2 origin = new Vector2(40f, 41f); + spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/FatesRevealGlow"), item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f); + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { Vector2 vector = player.RotatedRelativePoint(player.MountedCenter, true); float num78 = (float)Main.mouseX + Main.screenPosition.X - vector.X; diff --git a/Items/Weapons/Magic/FatesRevealGlow.png b/Items/Weapons/Magic/FatesRevealGlow.png new file mode 100644 index 0000000000..fa7e8687ae Binary files /dev/null and b/Items/Weapons/Magic/FatesRevealGlow.png differ diff --git a/Items/Weapons/Magic/GhastlyVisage.cs b/Items/Weapons/Magic/GhastlyVisage.cs index 508abe48a0..8dc44e903b 100644 --- a/Items/Weapons/Magic/GhastlyVisage.cs +++ b/Items/Weapons/Magic/GhastlyVisage.cs @@ -1,6 +1,9 @@ using CalamityMod.Projectiles.Magic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; + namespace CalamityMod.Items.Weapons.Magic { public class GhastlyVisage : ModItem @@ -18,8 +21,8 @@ namespace CalamityMod.Items.Weapons.Magic item.noUseGraphic = true; item.channel = true; item.mana = 20; - item.width = 78; - item.height = 70; + item.width = 32; + item.height = 36; item.useTime = 27; item.useAnimation = 27; item.useStyle = 5; @@ -32,7 +35,13 @@ namespace CalamityMod.Items.Weapons.Magic item.Calamity().postMoonLordRarity = 13; } - public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Vector2 origin = new Vector2(16f, 16f); + spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/GhastlyVisageGlow"), item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f); + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 0f); return false; diff --git a/Items/Weapons/Magic/GhastlyVisageGlow.png b/Items/Weapons/Magic/GhastlyVisageGlow.png new file mode 100644 index 0000000000..c291fa5f3b Binary files /dev/null and b/Items/Weapons/Magic/GhastlyVisageGlow.png differ diff --git a/Items/Weapons/Melee/BansheeHook.cs b/Items/Weapons/Melee/BansheeHook.cs index df969d2b34..b894196a64 100644 --- a/Items/Weapons/Melee/BansheeHook.cs +++ b/Items/Weapons/Melee/BansheeHook.cs @@ -1,5 +1,6 @@ using CalamityMod.Projectiles.Melee.Spears; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ID; @@ -17,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - item.width = 16; + item.width = 120; item.damage = 155; item.noMelee = true; item.noUseGraphic = true; @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 8.5f; item.UseSound = SoundID.DD2_GhastlyGlaivePierce; item.autoReuse = true; - item.height = 16; + item.height = 108; item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; item.shoot = ModContent.ProjectileType(); @@ -37,7 +38,13 @@ namespace CalamityMod.Items.Weapons.Melee item.Calamity().postMoonLordRarity = 13; } - public override bool CanUseItem(Player player) + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Vector2 origin = new Vector2(60f, 52f); + spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/BansheeHookGlow"), item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f); + } + + public override bool CanUseItem(Player player) { for (int i = 0; i < 1000; ++i) { diff --git a/Items/Weapons/Melee/BansheeHookGlow.png b/Items/Weapons/Melee/BansheeHookGlow.png new file mode 100644 index 0000000000..5cce2839a5 Binary files /dev/null and b/Items/Weapons/Melee/BansheeHookGlow.png differ diff --git a/Items/Weapons/Melee/TerrorBlade.cs b/Items/Weapons/Melee/TerrorBlade.cs index 976dfacecb..42a23a0a76 100644 --- a/Items/Weapons/Melee/TerrorBlade.cs +++ b/Items/Weapons/Melee/TerrorBlade.cs @@ -1,5 +1,6 @@ using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -35,7 +36,13 @@ namespace CalamityMod.Items.Weapons.Melee item.Calamity().postMoonLordRarity = 13; } - public override void MeleeEffects(Player player, Rectangle hitbox) + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Vector2 origin = new Vector2(44f, 38f); + spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/TerrorBladeGlow"), item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f); + } + + public override void MeleeEffects(Player player, Rectangle hitbox) { if (Main.rand.NextBool(3)) { diff --git a/Items/Weapons/Melee/TerrorBladeGlow.png b/Items/Weapons/Melee/TerrorBladeGlow.png new file mode 100644 index 0000000000..e12a84b956 Binary files /dev/null and b/Items/Weapons/Melee/TerrorBladeGlow.png differ diff --git a/Items/Weapons/Ranged/DaemonsFlame.cs b/Items/Weapons/Ranged/DaemonsFlame.cs index d237368b6d..f520d0560f 100644 --- a/Items/Weapons/Ranged/DaemonsFlame.cs +++ b/Items/Weapons/Ranged/DaemonsFlame.cs @@ -1,5 +1,6 @@ using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -17,8 +18,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { item.damage = 160; - item.width = 20; - item.height = 12; + item.width = 62; + item.height = 128; item.useTime = 12; item.useAnimation = 12; item.useStyle = 5; @@ -37,7 +38,13 @@ namespace CalamityMod.Items.Weapons.Ranged item.Calamity().postMoonLordRarity = 13; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Vector2 origin = new Vector2(31f, 62f); + spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Items/Weapons/Ranged/DaemonsFlameGlow"), item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f); + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 0f); return false; diff --git a/Items/Weapons/Ranged/DaemonsFlameGlow.png b/Items/Weapons/Ranged/DaemonsFlameGlow.png new file mode 100644 index 0000000000..cfb5061ed9 Binary files /dev/null and b/Items/Weapons/Ranged/DaemonsFlameGlow.png differ diff --git a/Items/Weapons/Rogue/GhoulishGouger.cs b/Items/Weapons/Rogue/GhoulishGouger.cs index 8fc2294e21..f38b553be0 100644 --- a/Items/Weapons/Rogue/GhoulishGouger.cs +++ b/Items/Weapons/Rogue/GhoulishGouger.cs @@ -1,4 +1,6 @@ using CalamityMod.Projectiles.Rogue; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -15,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { - item.width = 68; + item.width = 74; item.damage = 160; item.noMelee = true; item.noUseGraphic = true; @@ -25,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.knockBack = 7.5f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 60; + item.height = 68; item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; item.shoot = ModContent.ProjectileType(); @@ -33,5 +35,11 @@ namespace CalamityMod.Items.Weapons.Rogue item.Calamity().rogue = true; item.Calamity().postMoonLordRarity = 13; } - } + + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Vector2 origin = new Vector2(37f, 32f); + spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Items/Weapons/Rogue/GhoulishGougerGlow"), item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f); + } + } } diff --git a/Items/Weapons/Rogue/GhoulishGougerGlow.png b/Items/Weapons/Rogue/GhoulishGougerGlow.png new file mode 100644 index 0000000000..6e9fbc3de3 Binary files /dev/null and b/Items/Weapons/Rogue/GhoulishGougerGlow.png differ diff --git a/Items/Weapons/Summon/EtherealSubjugator.cs b/Items/Weapons/Summon/EtherealSubjugator.cs index d08423b872..3ea60136f4 100644 --- a/Items/Weapons/Summon/EtherealSubjugator.cs +++ b/Items/Weapons/Summon/EtherealSubjugator.cs @@ -1,5 +1,6 @@ using CalamityMod.Projectiles.Summon; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ID; @@ -36,7 +37,13 @@ namespace CalamityMod.Items.Weapons.Summon item.Calamity().postMoonLordRarity = 13; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Vector2 origin = new Vector2(33f, 33f); + spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Items/Weapons/Summon/EtherealSubjugatorGlow"), item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f); + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { int i = Main.myPlayer; float num72 = item.shootSpeed; diff --git a/Items/Weapons/Summon/EtherealSubjugatorGlow.png b/Items/Weapons/Summon/EtherealSubjugatorGlow.png new file mode 100644 index 0000000000..23f497f9f8 Binary files /dev/null and b/Items/Weapons/Summon/EtherealSubjugatorGlow.png differ diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 187fe983f2..706421ce8b 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -11877,7 +11877,7 @@ namespace CalamityMod.NPCs if (flag86) { - MoonlordDeathDrama.AddExplosion(vector159); + //MoonlordDeathDrama.AddExplosion(vector159); for (float num1168 = 0f; num1168 < num1163 * 2f; num1168 = ai1 + 1f) { Dust dust2 = Main.dust[Dust.NewDust(vector159, 0, 0, 229, 0f, 0f, 0, default, 1f)]; diff --git a/Projectiles/Magic/GhastlyVisageProj.cs b/Projectiles/Magic/GhastlyVisageProj.cs index 42a855bb17..d867918511 100644 --- a/Projectiles/Magic/GhastlyVisageProj.cs +++ b/Projectiles/Magic/GhastlyVisageProj.cs @@ -1,4 +1,5 @@ using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ID; @@ -191,5 +192,18 @@ namespace CalamityMod.Projectiles.Magic player.itemAnimation = 2; player.itemRotation = (float)Math.Atan2((double)(projectile.velocity.Y * (float)projectile.direction), (double)(projectile.velocity.X * (float)projectile.direction)); } - } + + public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D texture2D13 = Main.projectileTexture[projectile.type]; + int num214 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; + int y6 = num214 * projectile.frame; + Vector2 origin = new Vector2(13f, 16f); + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Magic/GhastlyVisageProjGlow"), projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Color.White, projectile.rotation, origin, projectile.scale, spriteEffects, 0f); + } + } } diff --git a/Projectiles/Magic/GhastlyVisageProjGlow.png b/Projectiles/Magic/GhastlyVisageProjGlow.png new file mode 100644 index 0000000000..d950c9bb68 Binary files /dev/null and b/Projectiles/Magic/GhastlyVisageProjGlow.png differ diff --git a/Projectiles/Melee/Spears/BansheeHookAltGlow.png b/Projectiles/Melee/Spears/BansheeHookAltGlow.png new file mode 100644 index 0000000000..0c637ea061 Binary files /dev/null and b/Projectiles/Melee/Spears/BansheeHookAltGlow.png differ diff --git a/Projectiles/Melee/Spears/BansheeHookGlow.png b/Projectiles/Melee/Spears/BansheeHookGlow.png new file mode 100644 index 0000000000..5cce2839a5 Binary files /dev/null and b/Projectiles/Melee/Spears/BansheeHookGlow.png differ diff --git a/Projectiles/Melee/Spears/BansheeHookProj.cs b/Projectiles/Melee/Spears/BansheeHookProj.cs index 6671d12dbe..72138728cb 100644 --- a/Projectiles/Melee/Spears/BansheeHookProj.cs +++ b/Projectiles/Melee/Spears/BansheeHookProj.cs @@ -108,20 +108,22 @@ namespace CalamityMod.Projectiles.Melee.Spears public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Color color25 = Lighting.GetColor((int)(projectile.position.X + projectile.width * 0.5) / 16, (int)((projectile.position.Y + projectile.height * 0.5) / 16.0)); Vector2 vector53 = projectile.position + new Vector2(projectile.width, projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; Texture2D texture2D31 = projectile.spriteDirection == -1 ? ModContent.GetTexture("CalamityMod/Projectiles/Melee/Spears/BansheeHookAlt") : Main.projectileTexture[projectile.type]; - Color alpha4 = projectile.GetAlpha(color25); - Vector2 origin8 = new Vector2(texture2D31.Width, texture2D31.Height) / 2f; - origin8 = new Vector2(projectile.spriteDirection == 1 ? texture2D31.Width - -8f : -8f, -8f); //-8 -8 - SpriteBatch arg_E055_0 = Main.spriteBatch; - Vector2 arg_E055_2 = vector53; - Rectangle? sourceRectangle2 = null; - arg_E055_0.Draw(texture2D31, arg_E055_2, sourceRectangle2, new Color(255, 255, 255, 127), projectile.rotation, origin8, projectile.scale, SpriteEffects.None, 0f); + Vector2 origin8 = new Vector2(projectile.spriteDirection == 1 ? texture2D31.Width - -8f : -8f, -8f); //-8 -8 + spriteBatch.Draw(texture2D31, vector53, null, new Color(255, 255, 255, 127), projectile.rotation, origin8, projectile.scale, SpriteEffects.None, 0f); return false; } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) + { + Vector2 vector53 = projectile.position + new Vector2(projectile.width, projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Texture2D texture = projectile.spriteDirection == -1 ? ModContent.GetTexture("CalamityMod/Projectiles/Melee/Spears/BansheeHookAltGlow") : ModContent.GetTexture("CalamityMod/Projectiles/Melee/Spears/BansheeHookGlow"); + Vector2 origin8 = new Vector2(projectile.spriteDirection == 1 ? texture.Width - -8f : -8f, -8f); //-8 -8 + spriteBatch.Draw(texture, vector53, null, Color.White, projectile.rotation, origin8, 1f, SpriteEffects.None, 0f); + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { float f2 = projectile.rotation - 0.7853982f * Math.Sign(projectile.velocity.X) + (projectile.spriteDirection == -1 ? 3.14159274f : 0f); float num4 = 0f; diff --git a/Projectiles/Melee/Spears/StreamGougeProj.cs b/Projectiles/Melee/Spears/StreamGougeProj.cs index f72830bb8d..152543307d 100644 --- a/Projectiles/Melee/Spears/StreamGougeProj.cs +++ b/Projectiles/Melee/Spears/StreamGougeProj.cs @@ -15,11 +15,11 @@ namespace CalamityMod.Projectiles.Melee.Spears public override void SetDefaults() { - projectile.width = 40; //The width of the .png file in pixels divided by 2. + projectile.width = 40; projectile.aiStyle = 19; - projectile.melee = true; //Dictates whether this is a melee-class weapon. + projectile.melee = true; projectile.timeLeft = 90; - projectile.height = 40; //The height of the .png file in pixels divided by 2. + projectile.height = 40; projectile.friendly = true; projectile.hostile = false; projectile.tileCollide = false; diff --git a/Projectiles/Melee/TyphonsGreed.cs b/Projectiles/Melee/TyphonsGreed.cs index 1cb081a457..4ca1979fd7 100644 --- a/Projectiles/Melee/TyphonsGreed.cs +++ b/Projectiles/Melee/TyphonsGreed.cs @@ -54,12 +54,11 @@ namespace CalamityMod.Projectiles.Melee projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); } Lighting.AddLight(projectile.Center, 0f, 0.1f, 0.7f); - int num959 = (int)projectile.ai[0]; - if (num959 >= 0 && Main.player[num959].active && !Main.player[num959].dead) + if (Main.player[projectile.owner].active && !Main.player[projectile.owner].dead) { - if (projectile.Distance(Main.player[num959].Center) > num954) + if (projectile.Distance(Main.player[projectile.owner].Center) > num954) { - Vector2 vector102 = projectile.DirectionTo(Main.player[num959].Center); + Vector2 vector102 = projectile.DirectionTo(Main.player[projectile.owner].Center); if (vector102.HasNaNs()) { vector102 = Vector2.UnitY; @@ -73,11 +72,6 @@ namespace CalamityMod.Projectiles.Melee { projectile.timeLeft = 30; } - if (projectile.ai[0] != -1f) - { - projectile.ai[0] = -1f; - projectile.netUpdate = true; - } } } diff --git a/Projectiles/Ranged/DaemonsFlameBow.cs b/Projectiles/Ranged/DaemonsFlameBow.cs index e894eff06f..e86672be02 100644 --- a/Projectiles/Ranged/DaemonsFlameBow.cs +++ b/Projectiles/Ranged/DaemonsFlameBow.cs @@ -1,4 +1,5 @@ using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ID; @@ -150,5 +151,18 @@ namespace CalamityMod.Projectiles.Ranged player.itemAnimation = 2; player.itemRotation = (float)Math.Atan2((double)(projectile.velocity.Y * (float)projectile.direction), (double)(projectile.velocity.X * (float)projectile.direction)); } - } + + public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D texture2D13 = Main.projectileTexture[projectile.type]; + int num214 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; + int y6 = num214 * projectile.frame; + Vector2 origin = new Vector2(27f, 58f); + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Ranged/DaemonsFlameBowGlow"), projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Color.White, projectile.rotation, origin, projectile.scale, spriteEffects, 0f); + } + } } diff --git a/Projectiles/Ranged/DaemonsFlameBowGlow.png b/Projectiles/Ranged/DaemonsFlameBowGlow.png new file mode 100644 index 0000000000..6ec0fec437 Binary files /dev/null and b/Projectiles/Ranged/DaemonsFlameBowGlow.png differ diff --git a/Projectiles/Rogue/GhoulishGougerBoomerang.cs b/Projectiles/Rogue/GhoulishGougerBoomerang.cs index 125585e087..2615f4bf6e 100644 --- a/Projectiles/Rogue/GhoulishGougerBoomerang.cs +++ b/Projectiles/Rogue/GhoulishGougerBoomerang.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 60; - projectile.height = 60; + projectile.width = 74; + projectile.height = 68; projectile.friendly = true; projectile.tileCollide = false; projectile.penetrate = -1; @@ -118,5 +118,11 @@ namespace CalamityMod.Projectiles.Rogue CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); return false; } - } + + public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) + { + Vector2 origin = new Vector2(37f, 34f); + spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Rogue/GhoulishGougerBoomerangGlow"), projectile.Center - Main.screenPosition, null, Color.White, projectile.rotation, origin, 1f, SpriteEffects.None, 0f); + } + } } diff --git a/Projectiles/Rogue/GhoulishGougerBoomerangGlow.png b/Projectiles/Rogue/GhoulishGougerBoomerangGlow.png new file mode 100644 index 0000000000..6e9fbc3de3 Binary files /dev/null and b/Projectiles/Rogue/GhoulishGougerBoomerangGlow.png differ diff --git a/build.txt b/build.txt index 56c9c6256b..c0d0a742e5 100644 --- a/build.txt +++ b/build.txt @@ -1,5 +1,5 @@ author = MountainDrew -version = 1.4.2.106 +version = 1.4.2.107 displayName = Calamity Mod (No Calamity Music) homepage = https://forums.terraria.org/index.php?threads/calamity-mod.44065/ buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*, LICENSE, README.md, .editorconfig, .gitignore, .gitattributes