From 3b5877e2c135838cd091868f1152ecdabc899394 Mon Sep 17 00:00:00 2001 From: Mortis3 <53282720+DylanDoe21@users.noreply.github.com> Date: Thu, 2 Feb 2023 07:42:50 -0500 Subject: [PATCH 1/6] stuff --- NPCs/Abyss/ChaoticPuffer.cs | 22 +++---- NPCs/Abyss/Cuttlefish.cs | 26 +++----- NPCs/Abyss/DevilFish.cs | 22 +++---- NPCs/Abyss/DevilFishAlt.cs | 22 +++---- NPCs/Abyss/EidolonWyrmBodyAlt.cs | 4 +- NPCs/Abyss/EidolonWyrmHead.cs | 4 +- NPCs/Abyss/GiantSquid.cs | 22 +++---- NPCs/Abyss/GulperEelBody.cs | 4 +- NPCs/Abyss/Laserfish.cs | 22 +++---- NPCs/Abyss/LuminousCorvina.cs | 22 +++---- NPCs/Abyss/MirageJelly.cs | 22 +++---- NPCs/Abyss/ToxicMinnow.cs | 21 +++---- NPCs/Abyss/Viperfish.cs | 22 +++---- Projectiles/Enemy/InkBombHostile.cs | 15 ++--- Projectiles/Enemy/InkBombHostile.png | Bin 330 -> 363 bytes Projectiles/Enemy/InkPoisonCloud.cs | 13 ++-- Projectiles/Enemy/InkPoisonCloud.png | Bin 1541 -> 2319 bytes Projectiles/Enemy/InkPoisonCloud2.cs | 85 -------------------------- Projectiles/Enemy/InkPoisonCloud2.png | Bin 1270 -> 0 bytes Projectiles/Enemy/InkPoisonCloud3.cs | 85 -------------------------- Projectiles/Enemy/InkPoisonCloud3.png | Bin 1307 -> 0 bytes Tiles/Crags/Tree/SpineTree.cs | 62 +++++++++++++------ World/Abyss.cs | 10 ++- World/DungeonArchive.cs | 5 +- 24 files changed, 162 insertions(+), 348 deletions(-) delete mode 100644 Projectiles/Enemy/InkPoisonCloud2.cs delete mode 100644 Projectiles/Enemy/InkPoisonCloud2.png delete mode 100644 Projectiles/Enemy/InkPoisonCloud3.cs delete mode 100644 Projectiles/Enemy/InkPoisonCloud3.png diff --git a/NPCs/Abyss/ChaoticPuffer.cs b/NPCs/Abyss/ChaoticPuffer.cs index a222fe060d..6d853aee16 100644 --- a/NPCs/Abyss/ChaoticPuffer.cs +++ b/NPCs/Abyss/ChaoticPuffer.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.Abyss NPC.noGravity = true; NPC.lavaImmune = true; NPC.width = 78; - NPC.height = 70; + NPC.height = 78; NPC.defense = 50; NPC.lifeMax = 5625; NPC.aiStyle = -1; @@ -144,24 +144,16 @@ namespace CalamityMod.NPCs.Abyss NPC.netUpdate = true; } - public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { if (!NPC.IsABestiaryIconDummy) { - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) - { - spriteEffects = SpriteEffects.FlipHorizontally; - } - Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); - Vector2 vector = center - screenPos; - vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/ChaoticPufferGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/ChaoticPufferGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); - Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Yellow); - Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/ChaoticPufferGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + Texture2D tex = ModContent.Request("CalamityMod/NPCs/Abyss/ChaoticPufferGlow").Value; + + var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4), + NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0); } } diff --git a/NPCs/Abyss/Cuttlefish.cs b/NPCs/Abyss/Cuttlefish.cs index 1bb279ce65..b02c4fd856 100644 --- a/NPCs/Abyss/Cuttlefish.cs +++ b/NPCs/Abyss/Cuttlefish.cs @@ -28,8 +28,8 @@ namespace CalamityMod.NPCs.Abyss NPC.noGravity = true; NPC.chaseable = false; NPC.damage = 34; - NPC.width = 50; - NPC.height = 28; + NPC.width = 58; + NPC.height = 30; NPC.defense = 8; NPC.lifeMax = 110; NPC.aiStyle = -1; @@ -344,23 +344,15 @@ namespace CalamityMod.NPCs.Abyss public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - if (NPC.IsABestiaryIconDummy) + if (!NPC.IsABestiaryIconDummy) { - NPC.alpha = 0; + Texture2D tex = ModContent.Request("CalamityMod/NPCs/Abyss/CuttlefishGlow").Value; + + var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4), + NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0); } - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) - { - spriteEffects = SpriteEffects.FlipHorizontally; - } - Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); - Vector2 vector = center - screenPos; - vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/CuttlefishGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/CuttlefishGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); - Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Gold); - Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/CuttlefishGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); } public override void OnHitPlayer(Player player, int damage, bool crit) diff --git a/NPCs/Abyss/DevilFish.cs b/NPCs/Abyss/DevilFish.cs index c5391e8b37..915fd2ae4b 100644 --- a/NPCs/Abyss/DevilFish.cs +++ b/NPCs/Abyss/DevilFish.cs @@ -42,8 +42,8 @@ namespace CalamityMod.NPCs.Abyss NPC.lavaImmune = true; NPC.Calamity().canBreakPlayerDefense = true; NPC.damage = 90; - NPC.width = 126; - NPC.height = 66; + NPC.width = 136; + NPC.height = 62; NPC.defense = 999999; NPC.lifeMax = 400; NPC.aiStyle = -1; @@ -281,19 +281,15 @@ namespace CalamityMod.NPCs.Abyss public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) + if (!NPC.IsABestiaryIconDummy) { - spriteEffects = SpriteEffects.FlipHorizontally; + Texture2D tex = ModContent.Request("CalamityMod/NPCs/Abyss/DevilFishGlow").Value; + + var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4), + NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0); } - Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); - Vector2 vector = center - screenPos; - vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/DevilFishGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/DevilFishGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); - Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Red); - Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/DevilFishGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); } public override void OnHitPlayer(Player player, int damage, bool crit) diff --git a/NPCs/Abyss/DevilFishAlt.cs b/NPCs/Abyss/DevilFishAlt.cs index b2ba036f14..58beec7df5 100644 --- a/NPCs/Abyss/DevilFishAlt.cs +++ b/NPCs/Abyss/DevilFishAlt.cs @@ -38,8 +38,8 @@ namespace CalamityMod.NPCs.Abyss NPC.lavaImmune = true; NPC.Calamity().canBreakPlayerDefense = true; NPC.damage = 90; - NPC.width = 126; - NPC.height = 66; + NPC.width = 136; + NPC.height = 62; NPC.defense = 999999; NPC.lifeMax = 400; NPC.aiStyle = -1; @@ -277,19 +277,15 @@ namespace CalamityMod.NPCs.Abyss public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) + if (!NPC.IsABestiaryIconDummy) { - spriteEffects = SpriteEffects.FlipHorizontally; + Texture2D tex = ModContent.Request("CalamityMod/NPCs/Abyss/DevilFishGlowAlt").Value; + + var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4), + NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0); } - Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); - Vector2 vector = center - screenPos; - vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/DevilFishGlowAlt").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/DevilFishGlowAlt").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); - Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Red); - Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/DevilFishGlowAlt").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); } public override void OnHitPlayer(Player player, int damage, bool crit) diff --git a/NPCs/Abyss/EidolonWyrmBodyAlt.cs b/NPCs/Abyss/EidolonWyrmBodyAlt.cs index cad05ae0f6..1ce8c969a0 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAlt.cs +++ b/NPCs/Abyss/EidolonWyrmBodyAlt.cs @@ -129,8 +129,8 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); - Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); + vector += vector11 * 1f + new Vector2(0f, NPC.gfxOffY); + Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Color.White); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlow").Value, vector, new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); } diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index 371481a968..36514b12ff 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -428,8 +428,8 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); - Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); + vector += vector11 * 1f + new Vector2(0f, NPC.gfxOffY); + Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Color.White); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlow").Value, vector, new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); } diff --git a/NPCs/Abyss/GiantSquid.cs b/NPCs/Abyss/GiantSquid.cs index 01b7c9ccba..542e3cf6e2 100644 --- a/NPCs/Abyss/GiantSquid.cs +++ b/NPCs/Abyss/GiantSquid.cs @@ -30,8 +30,8 @@ namespace CalamityMod.NPCs.Abyss { NPC.noGravity = true; NPC.damage = 100; - NPC.width = 50; - NPC.height = 220; + NPC.width = 62; + NPC.height = 226; NPC.defense = 18; NPC.lifeMax = 800; NPC.aiStyle = -1; @@ -211,19 +211,15 @@ namespace CalamityMod.NPCs.Abyss public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) + if (!NPC.IsABestiaryIconDummy) { - spriteEffects = SpriteEffects.FlipHorizontally; + Texture2D tex = ModContent.Request("CalamityMod/NPCs/Abyss/GiantSquidGlow").Value; + + var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4), + NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0); } - Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); - Vector2 vector = center - screenPos; - vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/GiantSquidGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/GiantSquidGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, NPC.gfxOffY); - Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.White); - Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/GiantSquidGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/Abyss/GulperEelBody.cs b/NPCs/Abyss/GulperEelBody.cs index 867ea3fc7f..3fcb34ac26 100644 --- a/NPCs/Abyss/GulperEelBody.cs +++ b/NPCs/Abyss/GulperEelBody.cs @@ -134,8 +134,8 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/GulperEelBodyGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/GulperEelBodyGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); - Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); + vector += vector11 * 1f + new Vector2(0f, NPC.gfxOffY); + Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Color.White); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/GulperEelBodyGlow").Value, vector, new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); } diff --git a/NPCs/Abyss/Laserfish.cs b/NPCs/Abyss/Laserfish.cs index 1d6127b1c8..c3ec114a50 100644 --- a/NPCs/Abyss/Laserfish.cs +++ b/NPCs/Abyss/Laserfish.cs @@ -25,8 +25,8 @@ namespace CalamityMod.NPCs.Abyss { NPC.noGravity = true; NPC.damage = 40; - NPC.width = 60; - NPC.height = 26; + NPC.width = 58; + NPC.height = 32; NPC.defense = 15; NPC.lifeMax = 480; NPC.aiStyle = -1; @@ -96,19 +96,15 @@ namespace CalamityMod.NPCs.Abyss public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) + if (!NPC.IsABestiaryIconDummy) { - spriteEffects = SpriteEffects.FlipHorizontally; + Texture2D tex = ModContent.Request("CalamityMod/NPCs/Abyss/LaserfishGlow").Value; + + var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4), + NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0); } - Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); - Vector2 vector = center - screenPos; - vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/LaserfishGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/LaserfishGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); - Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Color.Yellow); - Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/LaserfishGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/Abyss/LuminousCorvina.cs b/NPCs/Abyss/LuminousCorvina.cs index 7f838fca3d..3b777a5c47 100644 --- a/NPCs/Abyss/LuminousCorvina.cs +++ b/NPCs/Abyss/LuminousCorvina.cs @@ -36,8 +36,8 @@ namespace CalamityMod.NPCs.Abyss { NPC.noGravity = true; NPC.damage = 10; - NPC.width = 74; - NPC.height = 56; + NPC.width = 68; + NPC.height = 58; NPC.defense = 12; NPC.lifeMax = 800; NPC.aiStyle = -1; @@ -276,19 +276,15 @@ namespace CalamityMod.NPCs.Abyss public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) + if (!NPC.IsABestiaryIconDummy) { - spriteEffects = SpriteEffects.FlipHorizontally; + Texture2D tex = ModContent.Request("CalamityMod/NPCs/Abyss/LuminousCorvinaGlow").Value; + + var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4), + NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0); } - Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); - Vector2 vector = center - screenPos; - vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/LuminousCorvinaGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/LuminousCorvinaGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); - Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightBlue); - Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/LuminousCorvinaGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); } public override void OnHitPlayer(Player player, int damage, bool crit) diff --git a/NPCs/Abyss/MirageJelly.cs b/NPCs/Abyss/MirageJelly.cs index 261fe3d889..89d40a4aab 100644 --- a/NPCs/Abyss/MirageJelly.cs +++ b/NPCs/Abyss/MirageJelly.cs @@ -39,8 +39,8 @@ namespace CalamityMod.NPCs.Abyss NPC.noGravity = true; NPC.noTileCollide = true; NPC.damage = 100; - NPC.width = 70; - NPC.height = 162; + NPC.width = 78; + NPC.height = 170; NPC.defense = 10; NPC.lifeMax = 6000; NPC.aiStyle = -1; @@ -189,19 +189,15 @@ namespace CalamityMod.NPCs.Abyss public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) + if (!NPC.IsABestiaryIconDummy) { - spriteEffects = SpriteEffects.FlipHorizontally; + Texture2D tex = ModContent.Request("CalamityMod/NPCs/Abyss/MirageJellyGlow").Value; + + var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4), + NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0); } - Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); - Vector2 vector = center - screenPos; - vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/MirageJellyGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/MirageJellyGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); - Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Purple); - Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/MirageJellyGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); } public override void FindFrame(int frameHeight) diff --git a/NPCs/Abyss/ToxicMinnow.cs b/NPCs/Abyss/ToxicMinnow.cs index 1ee64c4a3c..b8877a962f 100644 --- a/NPCs/Abyss/ToxicMinnow.cs +++ b/NPCs/Abyss/ToxicMinnow.cs @@ -117,22 +117,15 @@ namespace CalamityMod.NPCs.Abyss public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - if (NPC.IsABestiaryIconDummy) - return; - - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) + if (!NPC.IsABestiaryIconDummy) { - spriteEffects = SpriteEffects.FlipHorizontally; + Texture2D tex = ModContent.Request("CalamityMod/NPCs/Abyss/ToxicMinnowGlow").Value; + + var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4), + NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0); } - Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); - Vector2 vector = center - screenPos; - vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/ToxicMinnowGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/ToxicMinnowGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); - Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightGreen); - Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/ToxicMinnowGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); } public override void OnHitPlayer(Player player, int damage, bool crit) diff --git a/NPCs/Abyss/Viperfish.cs b/NPCs/Abyss/Viperfish.cs index 9a897baa6d..a2fcae1577 100644 --- a/NPCs/Abyss/Viperfish.cs +++ b/NPCs/Abyss/Viperfish.cs @@ -32,8 +32,8 @@ namespace CalamityMod.NPCs.Abyss { NPC.noGravity = true; NPC.damage = 75; - NPC.width = 72; - NPC.height = 30; + NPC.width = 76; + NPC.height = 36; NPC.defense = 10; NPC.lifeMax = 320; NPC.aiStyle = -1; @@ -116,19 +116,15 @@ namespace CalamityMod.NPCs.Abyss public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) + if (!NPC.IsABestiaryIconDummy) { - spriteEffects = SpriteEffects.FlipHorizontally; + Texture2D tex = ModContent.Request("CalamityMod/NPCs/Abyss/ViperfishGlow").Value; + + var effects = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(tex, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY + 4), + NPC.frame, Color.White * 0.5f, NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, effects, 0); } - Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); - Vector2 vector = center - screenPos; - vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/ViperfishGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/ViperfishGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); - Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Gold); - Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/ViperfishGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); } public override void OnHitPlayer(Player player, int damage, bool crit) diff --git a/Projectiles/Enemy/InkBombHostile.cs b/Projectiles/Enemy/InkBombHostile.cs index 978ae809b8..e3396590b8 100644 --- a/Projectiles/Enemy/InkBombHostile.cs +++ b/Projectiles/Enemy/InkBombHostile.cs @@ -1,4 +1,5 @@ using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ID; @@ -26,8 +27,6 @@ namespace CalamityMod.Projectiles.Enemy public override void AI() { - Lighting.AddLight(Projectile.Center, 0.5f * Projectile.Opacity, 0.5f * Projectile.Opacity, 0.5f * Projectile.Opacity); - Projectile.ai[0] += 1f; if (Projectile.ai[0] > 10f) { @@ -47,10 +46,12 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - lightColor.R = (byte)(255 * Projectile.Opacity); - lightColor.G = (byte)(255 * Projectile.Opacity); - lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + Texture2D tex = ModContent.Request(Texture).Value; + Vector2 drawOrigin = new(tex.Width * 0.5f, Projectile.height * 0.5f); + Vector2 vector = new Vector2(Projectile.Center.X, Projectile.Center.Y) - Main.screenPosition + new Vector2(0, Projectile.gfxOffY); + Rectangle rectangle = new(0, tex.Height / Main.projFrames[Projectile.type] * Projectile.frame, tex.Width, tex.Height / Main.projFrames[Projectile.type]); + Main.EntitySpriteDraw(tex, vector, rectangle, Color.DarkGray, Projectile.rotation, drawOrigin, Projectile.scale, SpriteEffects.None, 0); + return false; } @@ -65,7 +66,7 @@ namespace CalamityMod.Projectiles.Enemy Vector2 vector15 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); vector15.Normalize(); vector15 *= Main.rand.Next(50, 401) * 0.01f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, vector15.X, vector15.Y, ModContent.ProjectileType() + Main.rand.Next(3), (int)Math.Round(Projectile.damage * 0.165), 1f, Projectile.owner, Main.rand.Next(-45, 1)); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, vector15.X, vector15.Y, ModContent.ProjectileType(), (int)Math.Round(Projectile.damage * 0.165), 1f, Projectile.owner, Main.rand.Next(-45, 1)); } } Projectile.position.X = Projectile.position.X + (float)(Projectile.width / 2); diff --git a/Projectiles/Enemy/InkBombHostile.png b/Projectiles/Enemy/InkBombHostile.png index 867707bfc83f81798006456a7fad0cf20bb043d6..f5eebfc298cbb7badcb5d991a2621da081a239b8 100644 GIT binary patch delta 336 zcmV-W0k8hb0_y^hB!2;OQb$4nuFf3k0003cNklG#jJpJ5a=}d@7l>UAy&l=N@!E`s0Y)aVPK4|HexA)f iS8IZ~q1s=Vzkr`+Y490QcB+d20000Uc;A zfkElxhiE>0PQWZl93db-sC>*qgilXH>5pjYw9)uK(D={M%zu*~bUwxvr!b%L5t$R- zLuo-MeH)w42UQ%yeEI~3Ph|+0DLAN0E*30tiz~0okm*CLaXqNwn1M=hDFCJKqoo 9) { @@ -62,10 +61,12 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - lightColor.R = (byte)(255 * Projectile.Opacity); - lightColor.G = (byte)(255 * Projectile.Opacity); - lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + Texture2D tex = ModContent.Request(Texture).Value; + Vector2 drawOrigin = new(tex.Width * 0.5f, Projectile.height * 0.5f); + Vector2 vector = new Vector2(Projectile.Center.X, Projectile.Center.Y) - Main.screenPosition + new Vector2(0, Projectile.gfxOffY); + Rectangle rectangle = new(0, tex.Height / Main.projFrames[Projectile.type] * Projectile.frame, tex.Width, tex.Height / Main.projFrames[Projectile.type]); + Main.EntitySpriteDraw(tex, vector, rectangle, Color.DarkGray * 0.5f, Projectile.rotation, drawOrigin, Projectile.scale, SpriteEffects.None, 0); + return false; } diff --git a/Projectiles/Enemy/InkPoisonCloud.png b/Projectiles/Enemy/InkPoisonCloud.png index 284c8f4ec6cdb37c5622bb3c0a224f01228cbbe0..243c0a9c78d8934c97ad370ff13eeb775853a109 100644 GIT binary patch delta 2307 zcmV+e3H3M-4Bp%eb_=-`6DZ`A z-1GlWxhJPUA(-9*Z4AA)c-C6aJkcX*K6bq$;>&v9o%iFBMjxY*^u9X0@ZX!exBopp z!q@vRuU0(Dl8ekdNE$!_V@3O)Y1|Fe94fA}^<&FdmV-ygoo zp(!Fyojk*#?Es04Am~-vj1lu}97+R7Wa9Sb*Fr=QdZegmH5vE);h*c&a@ztzJM!DS^FJ*Ii?*^CfRdo51S59Eh4A?QBC8Z z&!0ZZA(f-(3W=6eDBW-rWwN@jdY`ZzN&|?gbJ1Frwtq5-BLwlZ6lz#?VJ+MmL8t08;0)XdC%4;Hwql zDfY;;Ta~P!>6^1dB1`B*?hHu0=f*WcdxT`fl_oRLxQ5(ixk zAXL)|Wg0*d0mYT25~~)w4AEFb_S$+1W`&d4h?W7Xy=c^B6cXm>gukl zl2C+y$ocfpMF4r%V80_F&H`YiFXsVG2S^3HI-Ts29Lf!dMSE7|$z4Q1YZj#ggu4*v zeSdpVB2NQdoI~jVq2XmdU(nc7hMm)}h77K^e27l9i%&V@!FpXQ6XQ#82p{M?fTH_0 z-V`v>&Mrc{(@in~iY6_Yt_<$rRUSY&4|9Da*1ejej~vPg27OSHZy!lB%NjFqP9!F#g7vWQt= zvN}GT>tpWFc~kD{0V#IIoVK|1?l|Avl%CmRRfRPwq}K=tJqcA-P%A0bkBvtWC4We7 zy=z3vk%LZ}?%dtk~%p5gIw zq34KREMx=7po=Ck{RA|_s!N=E2@YKX$LSu+0G&GzE=rZ3fRIwGmM*&E7JsFDblfzD z(g8xB&)Z>(QhIdUG>0+*GKqQVwrndnlnW56@4-4&L9N8TmlAdQV%q{@YkSPm!H!Da zo-BsDdUJblzK1!K1`q;~ytt~11X9zZKZ=?L&++LQeqArwRvW+#Er|bD*SB$ zVK^$VTTm#d?97<~O6h%tcBR)Yxg6RakW!uB*qLV;vioBPs{9*fu)G9CX8ZP7(*Z*5 z#yo?-W*JL*3I+S4-O3`qTqD$J0C^o|qa0FJf1bNFmCmMJT+Qk6GJhA92Oka6F9#&g zraq9^7Z!Ij%68PLj4N6BuJo1jI9pB)+abBp&VXcG- z%?;?;C2HRu;MI0}d3L>?LBtLz3acDawGRuDj22Q|5>TW4ST8J=Cnp(Jf{fTpv@Gb_Aqyihs!zTi@XEQM)rEL#7(PdO#h8x{U{bedD~gp#v@zQ(CsCkOmNo z#~Ew;hC|q`4An5kB)r_8j!x=2htdHGGz>?(peFt)H4=q_m2+FZGY)y3YMJ34Sr2Uo zsIfDZO7SdqvwmXzqgUHYlx*GrDnxi0=+c2Z(JJSL>W6BsLoC$5^;<3j3vcIYusr(f}Im zZRIWaynb?Ct;8^g(gBKgzf|m!nxN4UTR2a8Svo)y<$s*&j-GJH>#kzQ!2Ly{3NPhss7 dON;c>e-V00000NkvXXu0mjf0073sMv(vj delta 1523 zcmVu`+6-x=s^gf$Ti;c2MM8sPb@BqdE2|=dPTX7^N`OYgNs(? zJ~xMif%84WDc^f(ABv6)^AV58C9j;_dH!>c>?gS1*sKrv5jr?u8QpQ6^9diVF8@E1 zXy=*19Q3hWvwwMLCL@TBJA;v%0aAN+TnBs&AzH)~NZ#@GK@gpSBkd9GfseO=P=qP? zyfc946Rl(V;PE~2-K){ANre2pySOOT1rfI3@dZTDPr@0+whcs`l0-ObXNOF$iZ#d# z5a%)w{R+rOBgtDO$N}X;XoOFoZed*Ta^8EevJK@qMSr;~_0N#Z^rOp9hv0eEBtkXw za;Oe6Q1M>u4`J1{c}@t`<|QNb6UzLnRw0DY4W!syzzHC;MCJ;j3_}&G@j2!K<^%@d zD@$@NV^GBkkf~j*_DJ+eX3zuQYolU)tB77~KFu?T4ls()Jll=yYvwdHGB=Rz!2494 zBc^Z%n}3rPtPuJxHra;yIQh`V$Xu(B_DSX;gzja26=DILO+ zgnT~8s;LmN9mzXL`G`yiMcMKJ+~Wlx$dE0>Cx82(ProKYk=2J8_y}5oW4Z)1@=O!d zHR(e&I)x#5d>=fofIFfCzPuAcWW=)-X4GepqH&fFB}a@Qa|B47gMV8AYiD$>-T! zlz)stsA64<)H&!=S-qS!iBLw3WsVs{qu>G%iSAmN0J5rwy2|{*GCca8va*h9H_Fwj zu?*yw+BH?_U$Jye$I&9iBQch zNzV`p@d-cjel9z-`_b@PYuBs~&16o%kEoy1J^*A2xD%p#^KQ=mG>MRpV$uDqbCA1T zj{79cB9xb!K6>V`G0$M z09-9<(c`mPAhB(xKNy4Td<6L^s$YoutSVO4zbCq@WCGVm`Dbj}ht{aEkiL!W?MCOZ z4uFbsTlo@V;qL%RmbcVjuGX0PiuIMVE%Hv&2u;a~a|Th2^+8?Lld;J>gy!R>VCMGq z6zllM_CidmSVv}Q=s)uTIavu3;7c=(!2kGV3G6(~RWEG96 zJ4Fa>fY>UoCZ@2VP4`4XK2%|>-@+(_p5#ME!mdp|^kjrO@?KHyyX2wn8Hgwk-GMo5 z)pu@k??)k&9C5!J-_P>YG7A5_|EaR1IW?|8jP^rdDlgX8?rPo>LN|;(yMNfgTmxbl zSv6N_mMKKLFnc9PM@AZTRzlr4*`3iYm-F*!Y;U&rA+$cko`Se}U*H*AY z%@1k{p#|g%ZQ z>KR@)d~E?Ej;>o<4+$Z=QEZo7>-mPFQ3)cXr+sc!vCgFO%QFURT`_I&TP7P?;3vp%H~sjaRX%2Uci8!!t!?Njzj Z_7~ZFg}hbWBnkik002ovPDHLkV1i`=>s$Z; diff --git a/Projectiles/Enemy/InkPoisonCloud2.cs b/Projectiles/Enemy/InkPoisonCloud2.cs deleted file mode 100644 index d876cfe54f..0000000000 --- a/Projectiles/Enemy/InkPoisonCloud2.cs +++ /dev/null @@ -1,85 +0,0 @@ -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Enemy -{ - public class InkPoisonCloud2 : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ink Cloud"); - Main.projFrames[Projectile.type] = 4; - } - - public override void SetDefaults() - { - Projectile.width = 52; - Projectile.height = 48; - Projectile.hostile = true; - Projectile.Opacity = 0f; - Projectile.penetrate = -1; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.timeLeft = 3600; - } - - public override void AI() - { - Lighting.AddLight(Projectile.Center, 0.5f * Projectile.Opacity, 0.5f * Projectile.Opacity, 0.5f * Projectile.Opacity); - - Projectile.frameCounter++; - if (Projectile.frameCounter > 9) - { - Projectile.frame++; - Projectile.frameCounter = 0; - } - if (Projectile.frame > 3) - Projectile.frame = 0; - - Projectile.velocity *= 0.98f; - - Projectile.ai[0] += 1f; - if (Projectile.ai[0] >= 120f) - { - if (Projectile.Opacity > 0f) - { - Projectile.Opacity -= 0.02f; - if (Projectile.Opacity < 0f) - Projectile.Opacity = 0f; - } - else if (Projectile.owner == Main.myPlayer) - Projectile.Kill(); - } - else if (Projectile.Opacity < 0.9f) - { - Projectile.Opacity += 0.12f; - if (Projectile.Opacity > 0.9f) - Projectile.Opacity = 0.9f; - } - } - - public override bool PreDraw(ref Color lightColor) - { - lightColor.R = (byte)(255 * Projectile.Opacity); - lightColor.G = (byte)(255 * Projectile.Opacity); - lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); - return false; - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 20f, targetHitbox); - - public override bool CanHitPlayer(Player target) => Projectile.Opacity >= 0.9f; - - public override void OnHitPlayer(Player target, int damage, bool crit) - { - if (damage <= 0) - return; - - if (Projectile.Opacity >= 0.9f) - target.AddBuff(BuffID.Darkness, 300, true); - } - } -} diff --git a/Projectiles/Enemy/InkPoisonCloud2.png b/Projectiles/Enemy/InkPoisonCloud2.png deleted file mode 100644 index 1aa923904159157ba86fc7402dbd9e3567aee410..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1270 zcmV4=Gp;`91&u1cOOL zK~#9!?Oi=?^DqomiyT3t524k2u8`eZ(Gz{><~>*No>hnNm_vL^0u)4_`Dn{+U{Z_W zSW!?uJ^qNKn^KI|8gIm$QQQx&_=mh71(DOjv--H+AJ^;SIz6uWaV@WaX{XMC z2+0kkedOLBg`_`8gs$TILm(nXC$vxxo@elRFSL`C@T4Fd9FZd{pBK_z+{yK4foLGY zB2&rvMVXJDXG@&p0+EUIW~CQ=Chf~$Lx-&T7liG8i!`(J}cVJpJmS?ZqOtlC5a@S!M)XI^M^>; zxE4Yv0dE!|VTugn6y=))ClVoT9i%lQX19*qc)nF@9^bNW9o5K*rXvv9ar_vQht~SV zF@Z?&GdR*>uQottl{b87L{P;;Z$xG!=QTmvl^tRC?gZixlygLRmUAG|$O2pQ>?pEa zm3Mb-*+*sX7a?JEf~e);O?h{hh#;-h3rQDXm$DL{RIu(G93f-w3u#{}xjxDz&J0&v zYb|ZBYjMWK_&eDZN7h(&lmi@;d1s^VHj3vZ5Haq3ss9UUFYe@eoeQn?)_@z*H)890 zM`iEdE!r})*1{e~amG`EA7rFx%JRBEWK!$|>q}Kd8)*n?aZz`8U+XEse?W4Y*D5O_ zGz4aa6C==y$E*%I5fZj$n$}iCAg$CbA@Q8=A|7d#^Rre&$Z-bRF)aI5%b&r0lN}I< zY(QuiE*=Jv7#=yYc8p}C8Cq*E$)apBb;cZs7!X+7J#F&71Ca(upe*nZzE&dywC*+( zpHvW&CksNZGggb;X9?H9ClIG3z^y(wLUKaOUq}Sx`Pd+k-Fm7Y9AWFMMt~UN&P;MH z5RsB$yVd0LyArEcFfY4BM2j1&-D+$<`zmkO6-Q9z8Y|h6lq|~EBRk@!I!J1ZUeOlP zTOCO)Cf_iS75kLPb&uz3X>Z3sdm2efA}0IUB?3k9imA$M*R?1puF(3`*?xCaRV2Od z%Xh?F`dVxiDe7O>vb)+CmUc$e#($F#viP0igRLDU5CK}l>Wg(7xfl_mNozFV!Y1y- z*>3}nU=t?-k@VtkD|hYv%Cp=}9i4$l1FePnLiQRIH^Yt)lG8i{t8ceh0TGC#{rlHV zTnx*e{Any~^>uUc~XKRH+0;ejAcID7-@~=iObgv2rR;&4oN7#5pYNuWM*8`Ci g$fP|HI4mOn0fH4tZr3U)WB>pF07*qoM6N<$f(8XgasU7T diff --git a/Projectiles/Enemy/InkPoisonCloud3.cs b/Projectiles/Enemy/InkPoisonCloud3.cs deleted file mode 100644 index e76eecc286..0000000000 --- a/Projectiles/Enemy/InkPoisonCloud3.cs +++ /dev/null @@ -1,85 +0,0 @@ -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Enemy -{ - public class InkPoisonCloud3 : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ink Cloud"); - Main.projFrames[Projectile.type] = 4; - } - - public override void SetDefaults() - { - Projectile.width = 52; - Projectile.height = 48; - Projectile.hostile = true; - Projectile.Opacity = 0f; - Projectile.penetrate = -1; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.timeLeft = 3600; - } - - public override void AI() - { - Lighting.AddLight(Projectile.Center, 0.5f * Projectile.Opacity, 0.5f * Projectile.Opacity, 0.5f * Projectile.Opacity); - - Projectile.frameCounter++; - if (Projectile.frameCounter > 9) - { - Projectile.frame++; - Projectile.frameCounter = 0; - } - if (Projectile.frame > 3) - Projectile.frame = 0; - - Projectile.velocity *= 0.99f; - - Projectile.ai[0] += 1f; - if (Projectile.ai[0] >= 120f) - { - if (Projectile.Opacity > 0f) - { - Projectile.Opacity -= 0.02f; - if (Projectile.Opacity < 0f) - Projectile.Opacity = 0f; - } - else if (Projectile.owner == Main.myPlayer) - Projectile.Kill(); - } - else if (Projectile.Opacity < 0.9f) - { - Projectile.Opacity += 0.12f; - if (Projectile.Opacity > 0.9f) - Projectile.Opacity = 0.9f; - } - } - - public override bool PreDraw(ref Color lightColor) - { - lightColor.R = (byte)(255 * Projectile.Opacity); - lightColor.G = (byte)(255 * Projectile.Opacity); - lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); - return false; - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 20f, targetHitbox); - - public override bool CanHitPlayer(Player target) => Projectile.Opacity >= 0.9f; - - public override void OnHitPlayer(Player target, int damage, bool crit) - { - if (damage <= 0) - return; - - if (Projectile.Opacity >= 0.9f) - target.AddBuff(BuffID.Darkness, 300, true); - } - } -} diff --git a/Projectiles/Enemy/InkPoisonCloud3.png b/Projectiles/Enemy/InkPoisonCloud3.png deleted file mode 100644 index 97f095777d850a32ac3489ceeeec5b22c0b59265..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1307 zcmV+$1?2jPP)5D>~zf2aTe1gJ?w zK~#9!?Oi*L>Oc^j_q0cF$RV7Pa|Lo|D^B!8M$Q$;Nqq>1KEz9K(xRq%e#X15mR1&E z>@`JISI>-_5VjS!*I$+R8-8(oZ3wXtLU_KmkJq+)ZF?bS;?G9@kB50&gqV=4z#$ex z%ZuARa#qQ%k$n!Y?PT7w#L+yq`&UJDx5$mJ?QA~XA%g0~yf-)zTvYL&d3_LamDSQB zb~gEG23!h&bDcr_Spz|N%Sar-^PPD-5yWQaafMti=WYan9w;t~-sxS+fdw^E)9l@PPzk|!az(kFf-RRbG= z&f>6;%gArRAZNqQB~)F-Aa9uvX!Qac^GES4$#3FZf+`{vLzTDPA8|Gi6&2@7^H?CR z|C{7HmiG?gTp{NyH_$v9TN#u(^J+uhGL>^3dA@fd!PGPLed1hhrH#B{Px2tD9u7`~ z#W}A78Gy40q#77VUOPJLKbAj--6Ln!>TZxa0ZuT^ET8n%yxtKfasuC|C^vVhmMqVB z^U*(mEK^mlI*zf|cb(^QXH-Y0>-Tz7jiJ=8#Jyad3?g$&#N<#aMCW{6s~J9xTu;<; z)sR|NP|sB7A>$XUc#Pa(GEYl(9U1i#)41vL4J{3OmYM~qppWFFHW2*h>!M1 z5ptp4bXM&?DMF5M#`f47e!|7+j*tjPZlnUY@m%v8AhnFBC%T&o&GH1Ze`uNScBf=f z{?p8ANWaIlBV6o(qnT^wKUD>hd^I`Uey#o~Le9%M)c1sqW})LSZ#n~YyyZ9;c}qv$ zL$fxv{|Wl-R`d&mb`0n2RBLh0o4>3IqTYJTYQIb3`OZ?yN@FOg-f$u+%JQ1J0hdAqct5_zz$1HBZ*X Rtup`s002ovPDHLkV1jshY%Bl( diff --git a/Tiles/Crags/Tree/SpineTree.cs b/Tiles/Crags/Tree/SpineTree.cs index 5ab0eb0212..84e35eb84e 100644 --- a/Tiles/Crags/Tree/SpineTree.cs +++ b/Tiles/Crags/Tree/SpineTree.cs @@ -121,24 +121,16 @@ namespace CalamityMod.Tiles.Crags.Tree if (extraPlaces[k + 2]) { WorldGen.PlaceTile(i + k, j, ModContent.TileType(), true); + + Framing.GetTileSafely(i + k, j).TileFrameX = 1; } else { continue; } - - //always place the bottom segment on the first frame since it doesnt have variants - Framing.GetTileSafely(i + k, j).TileFrameX = 0; - Framing.GetTileSafely(i + k, j).TileFrameY = 0; - - if (!extraPlaces[1] && !extraPlaces[3] && k == 0) - { - Framing.GetTileSafely(i + k, j).TileFrameX = 0; - } } int branchSegmentDelay = 0; - int numSegments = 0; for (int k = 1; k < height; k++) { @@ -155,21 +147,19 @@ namespace CalamityMod.Tiles.Crags.Tree { float divide = 1.65f; - if (numSegments < 2) + if (k > 1 && k < 7) { Framing.GetTileSafely(i, j - k).TileFrameX = 3 * 18; } - if (numSegments < 6 && numSegments > 2) + if (k >= 7 && k < 15) { Framing.GetTileSafely(i, j - k).TileFrameX = 4 * 18; } - if (numSegments > 6) + if (k >= 15) { Framing.GetTileSafely(i, j - k).TileFrameX = 5 * 18; } - Framing.GetTileSafely(i, j - k).TileFrameY = (short)(Main.rand.Next(3) * 18); - numSegments++; branchSegmentDelay = 3; } //otherwise place a normal segment @@ -185,6 +175,8 @@ namespace CalamityMod.Tiles.Crags.Tree Framing.GetTileSafely(i, j - k).TileFrameX = 2 * 18; Framing.GetTileSafely(i, j - k).TileFrameY = (short)(Main.rand.Next(3) * 18); } + + Framing.GetTileSafely(i, j - k).TileFrameY = (short)(Main.rand.Next(3) * 18); } return true; @@ -279,6 +271,36 @@ namespace CalamityMod.Tiles.Crags.Tree Gore.NewGore(new EntitySource_TileInteraction(Main.LocalPlayer, i, j), (new Vector2(i, j - 2) * 16), new Vector2(Main.rand.Next(-3, 3), Main.rand.Next(-3, 3)), ModContent.Find("CalamityMod/WhateverGore").Type); */ + + //bottom segment + if (Framing.GetTileSafely(i, j).TileFrameX == 0) + { + } + + //regular segment + if (Framing.GetTileSafely(i, j).TileFrameX == 18) + { + } + + //small branch + if (Framing.GetTileSafely(i, j).TileFrameX == 54) + { + } + + //medium branch + if (Framing.GetTileSafely(i, j).TileFrameX == 72) + { + } + + //large branch + if (Framing.GetTileSafely(i, j).TileFrameX == 90) + { + } + + //top segment + if (Framing.GetTileSafely(i, j).TileFrameX == 36) + { + } } public static Vector2 TileOffset => Lighting.LegacyEngine.Mode > 1 ? Vector2.Zero : Vector2.One * 12; @@ -310,6 +332,7 @@ namespace CalamityMod.Tiles.Crags.Tree int frameSizeX = 16; int frameSizeY = 16; + int frameSize = 16; int frameOff = 0; Vector2 offset = new((xOff * 2) - (frameOff / 2), 0); @@ -387,7 +410,7 @@ namespace CalamityMod.Tiles.Crags.Tree Texture2D leftBranchTex = ModContent.Request("CalamityMod/Tiles/Crags/Tree/SpineRib3Left").Value; Texture2D rightBranchTex = ModContent.Request("CalamityMod/Tiles/Crags/Tree/SpineRib3Right").Value; - Vector2 leftBranchOffset = new Vector2((xOff * 2) - (frameOff / 2) + 80, 14); + Vector2 leftBranchOffset = new Vector2((xOff * 2) - (frameOff / 2) + 75, 14); Vector2 rightBranchOffset = new Vector2((xOff * 2) - (frameOff / 2) + 4, 14); DrawTreeSegments(i, j, leftBranchTex, new Rectangle(62 * frame, 0, 62, 60), TileOffset.ToWorldCoordinates(), leftBranchOffset, false); @@ -403,12 +426,17 @@ namespace CalamityMod.Tiles.Crags.Tree Texture2D topTex = ModContent.Request("CalamityMod/Tiles/Crags/Tree/SpineTop").Value; int frame = tile.TileFrameY / 18; - DrawTreeSegments(i, j, topTex, new Rectangle(26 * frame, 0, 24, 24), TileOffset.ToWorldCoordinates(), topSegmentOffset, false); + DrawTreeSegments(i, j - 1, topTex, new Rectangle(26 * frame, 0, 24, 24), TileOffset.ToWorldCoordinates(), topSegmentOffset, false); //draw segments DrawTreeSegments(i, j, segmentTex, new Rectangle(34 * frame, 0, 32, 20), TileOffset.ToWorldCoordinates(), treeSegmentOffset, false); } + Texture2D treeTex = ModContent.Request("CalamityMod/Tiles/Crags/Tree/SpineTree").Value; + + spriteBatch.Draw(treeTex, pos, new Rectangle(tile.TileFrameX + frameOff, tile.TileFrameY, frameSize, frameSizeY), + new Color(col.R, col.G, col.B, 255), 0f, new Vector2(0, 0), 1f, SpriteEffects.None, 0f); + return false; } diff --git a/World/Abyss.cs b/World/Abyss.cs index ed9db6a412..5de4a82dd5 100644 --- a/World/Abyss.cs +++ b/World/Abyss.cs @@ -307,6 +307,10 @@ namespace CalamityMod.World int realFossilY = 0; bool placedFossil = false; + //place islands to hide the fossil (funny) + AbyssIsland(abyssChasmX + 32, AbyssChasmBottom + 25, 55, 75, 35, 45, false, true, true); + AbyssIsland(abyssChasmX - 32, AbyssChasmBottom + 25, 55, 75, 35, 45, false, true, true); + while (!placedFossil) { //make sure it places at the very bottom, below where the terminus shrine is @@ -407,7 +411,7 @@ namespace CalamityMod.World { if (WorldGen.genRand.NextBool(8)) { - int randomIsland = WorldGen.genRand.Next(2); + int randomIsland = WorldGen.genRand.Next(3); switch (randomIsland) { case 0: @@ -416,6 +420,10 @@ namespace CalamityMod.World case 1: AbyssIsland(abyssChasmX - WorldGen.genRand.Next(42, 48), voidIslandY, 55, 75, 35, 45, false, true, true); break; + case 2: + AbyssIsland(abyssChasmX + WorldGen.genRand.Next(42, 48), voidIslandY, 55, 75, 35, 45, false, true, true); + AbyssIsland(abyssChasmX - WorldGen.genRand.Next(42, 48), voidIslandY, 55, 75, 35, 45, false, true, true); + break; } //increase y value so islands cant be spammed on top of each other diff --git a/World/DungeonArchive.cs b/World/DungeonArchive.cs index 86b7d39a64..8926aaed8d 100644 --- a/World/DungeonArchive.cs +++ b/World/DungeonArchive.cs @@ -75,10 +75,7 @@ namespace CalamityMod.World //this way it will keep checking upward so it places nicely and doesnt destroy other parts of the dungeon (or at least not as much) if (x >= Main.maxTilesX - 5 && y <= heightLimit + 5 && !foundValidPosition) { - x = xMin; - y = Main.maxTilesY - 5; - - heightLimit = heightLimit - 2; + heightLimit -= 1; } } } From 425c78efb6a743bbf6b1895962fa411a04945c97 Mon Sep 17 00:00:00 2001 From: Mortis3 <53282720+DylanDoe21@users.noreply.github.com> Date: Thu, 2 Feb 2023 07:56:06 -0500 Subject: [PATCH 2/6] spine trees should be fixed now --- Tiles/Crags/Tree/SpineTree.cs | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/Tiles/Crags/Tree/SpineTree.cs b/Tiles/Crags/Tree/SpineTree.cs index 84e35eb84e..7f6e19c1bc 100644 --- a/Tiles/Crags/Tree/SpineTree.cs +++ b/Tiles/Crags/Tree/SpineTree.cs @@ -122,7 +122,8 @@ namespace CalamityMod.Tiles.Crags.Tree { WorldGen.PlaceTile(i + k, j, ModContent.TileType(), true); - Framing.GetTileSafely(i + k, j).TileFrameX = 1; + Framing.GetTileSafely(i + k, j).TileFrameX = 0; + Framing.GetTileSafely(i, j - k).TileFrameY = (short)(Main.rand.Next(3) * 18); } else { @@ -147,19 +148,21 @@ namespace CalamityMod.Tiles.Crags.Tree { float divide = 1.65f; - if (k > 1 && k < 7) + if (k > 1 && k < 10) { Framing.GetTileSafely(i, j - k).TileFrameX = 3 * 18; } - if (k >= 7 && k < 15) + if (k >= 10 && k < 17) { Framing.GetTileSafely(i, j - k).TileFrameX = 4 * 18; } - if (k >= 15) + if (k >= 17) { Framing.GetTileSafely(i, j - k).TileFrameX = 5 * 18; } + Framing.GetTileSafely(i, j - k).TileFrameY = (short)(Main.rand.Next(3) * 18); + branchSegmentDelay = 3; } //otherwise place a normal segment @@ -175,8 +178,6 @@ namespace CalamityMod.Tiles.Crags.Tree Framing.GetTileSafely(i, j - k).TileFrameX = 2 * 18; Framing.GetTileSafely(i, j - k).TileFrameY = (short)(Main.rand.Next(3) * 18); } - - Framing.GetTileSafely(i, j - k).TileFrameY = (short)(Main.rand.Next(3) * 18); } return true; @@ -272,6 +273,8 @@ namespace CalamityMod.Tiles.Crags.Tree new Vector2(Main.rand.Next(-3, 3), Main.rand.Next(-3, 3)), ModContent.Find("CalamityMod/WhateverGore").Type); */ + //TODO: spawn all the gores here + //bottom segment if (Framing.GetTileSafely(i, j).TileFrameX == 0) { @@ -338,6 +341,7 @@ namespace CalamityMod.Tiles.Crags.Tree Vector2 offset = new((xOff * 2) - (frameOff / 2), 0); Vector2 pos = TileCustomPosition(i, j) - offset; + Vector2 baseSegmentOffset = new Vector2((xOff * 2) - (frameOff / 2) + 26, 14); Vector2 treeSegmentOffset = new Vector2((xOff * 2) - (frameOff / 2) + 25, 14); Vector2 topSegmentOffset = new Vector2((xOff * 2) - (frameOff / 2) + 20, 16); @@ -349,7 +353,7 @@ namespace CalamityMod.Tiles.Crags.Tree { int frame = tile.TileFrameY / 18; - DrawTreeSegments(i, j, baseTex, new Rectangle(34 * frame, 0, 32, 20), TileOffset.ToWorldCoordinates(), treeSegmentOffset, false); + DrawTreeSegments(i, j, baseTex, new Rectangle(34 * frame, 0, 32, 20), TileOffset.ToWorldCoordinates(), baseSegmentOffset, false); } //draw the different segments of the tree @@ -432,20 +436,15 @@ namespace CalamityMod.Tiles.Crags.Tree DrawTreeSegments(i, j, segmentTex, new Rectangle(34 * frame, 0, 32, 20), TileOffset.ToWorldCoordinates(), treeSegmentOffset, false); } + /* + //keep this here for debugging Texture2D treeTex = ModContent.Request("CalamityMod/Tiles/Crags/Tree/SpineTree").Value; spriteBatch.Draw(treeTex, pos, new Rectangle(tile.TileFrameX + frameOff, tile.TileFrameY, frameSize, frameSizeY), new Color(col.R, col.G, col.B, 255), 0f, new Vector2(0, 0), 1f, SpriteEffects.None, 0f); + */ return false; } - - /* - //this is where you can draw any glowmasks, if needed - //literally all you have to do is copy all the code from predraw and just get the glowmask textures instead of the regular ones - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) - { - } - */ } } From 46c70c665ae806b01dcfc28e7fe813125cf93e6d Mon Sep 17 00:00:00 2001 From: Mortis3 <53282720+DylanDoe21@users.noreply.github.com> Date: Thu, 2 Feb 2023 14:14:05 -0500 Subject: [PATCH 3/6] last fixes i think --- Projectiles/Pets/EidolonSnail.cs | 16 ++++++++-------- World/AstralBiome.cs | 2 +- World/DungeonArchive.cs | 27 +++++++++++++++++---------- 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/Projectiles/Pets/EidolonSnail.cs b/Projectiles/Pets/EidolonSnail.cs index a43725cc6e..3ccf890559 100644 --- a/Projectiles/Pets/EidolonSnail.cs +++ b/Projectiles/Pets/EidolonSnail.cs @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Pets Vector2 center2 = Projectile.Center; Vector2 vector48 = player.Center - center2; float playerDistance = vector48.Length(); - if (Projectile.velocity.Y == 0 && (HoleBelow() || (playerDistance > 110f && Projectile.position.X == Projectile.oldPosition.X))) + if (Projectile.velocity.Y == 0 && (HoleBelow() || (Projectile.position.X == Projectile.oldPosition.X))) { Projectile.velocity.Y = -8f; } @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Pets { Projectile.velocity.Y = 15f; } - if (playerDistance > 600f) + if (playerDistance > 520f) { fly = true; Projectile.velocity.X = 0f; @@ -114,18 +114,18 @@ namespace CalamityMod.Projectiles.Pets { if (player.position.X - Projectile.position.X > 0f) { - Projectile.velocity.X += 0.10f; - if (Projectile.velocity.X > 5f) + Projectile.velocity.X += 0.12f; + if (Projectile.velocity.X > 6f) { - Projectile.velocity.X = 5f; + Projectile.velocity.X = 6f; } } else { - Projectile.velocity.X -= 0.10f; - if (Projectile.velocity.X < -5f) + Projectile.velocity.X -= 0.12f; + if (Projectile.velocity.X < -6f) { - Projectile.velocity.X = -5f; + Projectile.velocity.X = -6f; } } } diff --git a/World/AstralBiome.cs b/World/AstralBiome.cs index 219ac5f8a0..f9c8bd6667 100644 --- a/World/AstralBiome.cs +++ b/World/AstralBiome.cs @@ -127,7 +127,7 @@ namespace CalamityMod.World { float worldEdgeMargin = (float)Main.maxTilesX * 0.08f; int xLimit = Main.maxTilesX / 2; - int x = Abyss.AtLeftSideOfWorld ? rand.Next(700, xLimit) : rand.Next(xLimit, Main.maxTilesX - 700); + int x = Abyss.AtLeftSideOfWorld ? rand.Next(575, xLimit) : rand.Next(xLimit, Main.maxTilesX - 575); /* while ((float)x > (float)Main.spawnTileX - worldEdgeMargin && (float)x < (float)Main.spawnTileX + worldEdgeMargin) { diff --git a/World/DungeonArchive.cs b/World/DungeonArchive.cs index 8926aaed8d..d63bb58129 100644 --- a/World/DungeonArchive.cs +++ b/World/DungeonArchive.cs @@ -24,25 +24,27 @@ namespace CalamityMod.World bool placedArchive = false; bool foundValidPosition = false; + bool shouldPlaceTheDamnThing = false; int dungeonArchiveColor = 0; //0 = blue, 1 = green, 2 = pink - int heightLimit = (Main.maxTilesY / 2) + (Main.maxTilesY / 9); + int heightLimit = (Main.maxTilesY / 2) + (Main.maxTilesY / 8); - int xMin = WorldGen.dungeonSide == -1 ? 5 : (Main.maxTilesX / 2) + 5; - int xMax = WorldGen.dungeonSide == -1 ? (Main.maxTilesX / 2) - 5 : Main.maxTilesX - 5; - - for (int x = xMin; x <= xMax; x++) + for (int x = WorldGen.dungeonX - 100; x <= WorldGen.dungeonX + 100; x++) { - for (int y = Main.maxTilesY - 5; y >= heightLimit; y--) + for (int y = Main.maxTilesY - 200; y >= heightLimit; y--) { Tile tile = Main.tile[x, y]; Tile tileUp = Main.tile[x, y - 1]; + Tile tileUp2 = Main.tile[x, y - 2]; + Tile tileUp3 = Main.tile[x, y - 3]; Tile tileDown = Main.tile[x, y + 1]; if ((tile.TileType == 41 || tile.TileType == 43 || tile.TileType == 44 || tile.TileType == 48) && !tileUp.HasTile) { //blue brick walls - if (tileUp.WallType == 7 || tileUp.WallType == 94 || tileUp.WallType == 95) + if ((tileUp.WallType == 7 || tileUp.WallType == 94 || tileUp.WallType == 95) && + (tileUp2.WallType == 7 || tileUp2.WallType == 94 || tileUp2.WallType == 95) && + (tileUp3.WallType == 7 || tileUp3.WallType == 94 || tileUp3.WallType == 95)) { dungeonArchiveColor = 0; archiveX = x; @@ -51,7 +53,9 @@ namespace CalamityMod.World foundValidPosition = true; } //green brick walls - if (tileUp.WallType == 8 || tileUp.WallType == 98 || tileUp.WallType == 99) + if ((tileUp.WallType == 8 || tileUp.WallType == 98 || tileUp.WallType == 99) && + (tileUp2.WallType == 8 || tileUp2.WallType == 98 || tileUp2.WallType == 99) && + (tileUp3.WallType == 8 || tileUp3.WallType == 98 || tileUp3.WallType == 99)) { dungeonArchiveColor = 1; archiveX = x; @@ -60,7 +64,9 @@ namespace CalamityMod.World foundValidPosition = true; } //pink brick walls - if (tileUp.WallType == 9 || tileUp.WallType == 96 || tileUp.WallType == 97) + if ((tileUp.WallType == 9 || tileUp.WallType == 96 || tileUp.WallType == 97) && + (tileUp2.WallType == 9 || tileUp2.WallType == 96 || tileUp2.WallType == 97) && + (tileUp3.WallType == 9 || tileUp3.WallType == 96 || tileUp3.WallType == 97)) { dungeonArchiveColor = 2; archiveX = x; @@ -73,8 +79,9 @@ namespace CalamityMod.World //in order to make sure the archive places at the very bottom of the dungeon //loop upward a certain amount, and if it doesnt place reset everything and increase the maximum check height before the loop ends //this way it will keep checking upward so it places nicely and doesnt destroy other parts of the dungeon (or at least not as much) - if (x >= Main.maxTilesX - 5 && y <= heightLimit + 5 && !foundValidPosition) + if (x >= (WorldGen.dungeonX + 100) - 5 && y <= heightLimit + 5 && !foundValidPosition) { + x = WorldGen.dungeonX - 100; heightLimit -= 1; } } From 81be743c90b26fa1fa3a135cb6b34d0ace01f051 Mon Sep 17 00:00:00 2001 From: Mortis3 <53282720+DylanDoe21@users.noreply.github.com> Date: Thu, 2 Feb 2023 14:16:54 -0500 Subject: [PATCH 4/6] Update EidolonSnail.cs --- Projectiles/Pets/EidolonSnail.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Pets/EidolonSnail.cs b/Projectiles/Pets/EidolonSnail.cs index 3ccf890559..d74f118e63 100644 --- a/Projectiles/Pets/EidolonSnail.cs +++ b/Projectiles/Pets/EidolonSnail.cs @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Pets Vector2 center2 = Projectile.Center; Vector2 vector48 = player.Center - center2; float playerDistance = vector48.Length(); - if (Projectile.velocity.Y == 0 && (HoleBelow() || (Projectile.position.X == Projectile.oldPosition.X))) + if (Projectile.velocity.Y == 0 && (HoleBelow() || (playerDistance > 130f && Projectile.position.X == Projectile.oldPosition.X))) { Projectile.velocity.Y = -8f; } From aaeb14b1a76b762e539c83647d130656882306e7 Mon Sep 17 00:00:00 2001 From: Mortis3 <53282720+DylanDoe21@users.noreply.github.com> Date: Thu, 2 Feb 2023 14:20:19 -0500 Subject: [PATCH 5/6] Update AstralBiome.cs --- World/AstralBiome.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/World/AstralBiome.cs b/World/AstralBiome.cs index f9c8bd6667..27720a95b1 100644 --- a/World/AstralBiome.cs +++ b/World/AstralBiome.cs @@ -127,7 +127,7 @@ namespace CalamityMod.World { float worldEdgeMargin = (float)Main.maxTilesX * 0.08f; int xLimit = Main.maxTilesX / 2; - int x = Abyss.AtLeftSideOfWorld ? rand.Next(575, xLimit) : rand.Next(xLimit, Main.maxTilesX - 575); + int x = Abyss.AtLeftSideOfWorld ? rand.Next(625, xLimit) : rand.Next(xLimit, Main.maxTilesX - 625); /* while ((float)x > (float)Main.spawnTileX - worldEdgeMargin && (float)x < (float)Main.spawnTileX + worldEdgeMargin) { From 1b4bff422fb339b089b2b4ae746a73f75b9a7224 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Wed, 1 Feb 2023 13:47:56 -0600 Subject: [PATCH 6/6] Nerfed problematic rogue accessories and buffed one: Ethereal Extorter was clearly too powerful and overshadowing Moonstone crown even, the dmg boost nerf and soul dmg nerf should allow Moonstone crown to shine more and for EE to not be viable endgame. Glove of precision was clearly extremely good at its role on both rogue styles it had to be dialed back, and with Electrician's glove nerfed quite heaviliy it would have seen its use skyrocket. Glove of recklessness got a miniscule nerf, although it occasionally gave accessories like Venerated locket a run for their money, it provides a way for rogue players to experiment and figure out which weapon benefit from the attack speed and which got hurt by the dmg decrease. I consider it to be good but slightly too strong, I didn't want to revert it to 1.5 stats cuz back then it felt horrible, the 15% attack speed will stay and damage decrease will be increased by 1%. Gave a big nerf to Scuttler as it made stealth strikes early game extremely strong and limited how they could be balanced resulting in cases like Wulfrum Knives being way too weak, even for a Wulfrum item (I'll make sure to buff that stealth strike before release). Its damage went from 20 per hit to 15 per hit, resulting on 45 total damage now. Venerated locket buffed by making its clone projectiles have a bit more damage to improve its use on its tier, stealth was greatly improved by stealth v2.5 so the knifes were left as is. We still need to figure out how to make it not go bonkers with Final Dawn. Rebalanced Grave Grim Reaver: Ah the weapon that singlehandedly destroyed Hardmode, I identified the skull generation to be the main problem as the player could just set the projectile and turn the arena into a mine field, reducing the rate of their generation as well as the lifetime will limit how much area denial and damage the thing does. Its stats were buffed to compensate for such a massive nerf. However that stealth strike was fucking ridiculous and the stealth damage multiplier had to be dumpstered. The port's changes to stealth took it and made it the most broken rogue weapon in the game. --- CalPlayer/CalamityPlayer.cs | 2 +- Items/Accessories/EtherealExtorter.cs | 4 ++-- Items/Accessories/GloveOfRecklessness.cs | 4 ++-- Items/Accessories/GloveofPrecision.cs | 4 ++-- Items/Weapons/Rogue/GraveGrimreaver.cs | 16 ++++++++-------- Projectiles/CalamityGlobalProjectile.cs | 4 ++-- Projectiles/Rogue/GraveGrimreaverProjectile.cs | 8 ++++---- Projectiles/Rogue/GrimreaverBat.cs | 2 +- Projectiles/Rogue/GrimreaverSkull.cs | 6 +++--- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 58d20f9951..5023b41395 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5196,7 +5196,7 @@ namespace CalamityMod.CalPlayer num79 *= num80; float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f; float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f; - int p = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, (int)(damage * 0.065), knockBack * 0.5f, Player.whoAmI); + int p = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, (int)(damage * 0.07), knockBack * 0.5f, Player.whoAmI); if (p.WithinBounds(Main.maxProjectiles)) Main.projectile[p].DamageType = DamageClass.Generic; //in case melee/rogue variants bug out diff --git a/Items/Accessories/EtherealExtorter.cs b/Items/Accessories/EtherealExtorter.cs index 395ea49ed3..87219854f0 100644 --- a/Items/Accessories/EtherealExtorter.cs +++ b/Items/Accessories/EtherealExtorter.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories SacrificeTotal = 1; DisplayName.SetDefault("Ethereal Extorter"); Tooltip.SetDefault(@"Rogue projectiles explode into homing souls on death -10% increased rogue damage and +10 maximum stealth"); +8% increased rogue damage and +10 maximum stealth"); } public override void SetDefaults() @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.etherealExtorter = true; - player.GetDamage() += 0.1f; + player.GetDamage() += 0.08f; modPlayer.rogueStealthMax += 0.1f; } } diff --git a/Items/Accessories/GloveOfRecklessness.cs b/Items/Accessories/GloveOfRecklessness.cs index 0bf8509182..15bf6fe3d4 100644 --- a/Items/Accessories/GloveOfRecklessness.cs +++ b/Items/Accessories/GloveOfRecklessness.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories { SacrificeTotal = 1; DisplayName.SetDefault("Glove of Recklessness"); - Tooltip.SetDefault("Increases rogue attack speed by 15% but decreases damage by 12%\n" + + Tooltip.SetDefault("Increases rogue attack speed by 15% but decreases damage by 13%\n" + "15% increased stealth regeneration\n" + "Adds inaccuracy to rogue weapons"); } @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Accessories modPlayer.gloveOfRecklessness = true; modPlayer.stealthGenStandstill += 0.15f; modPlayer.stealthGenMoving += 0.15f; - player.GetDamage() -= 0.12f; + player.GetDamage() -= 0.13f; player.GetAttackSpeed() += 0.15f; } } diff --git a/Items/Accessories/GloveofPrecision.cs b/Items/Accessories/GloveofPrecision.cs index 7622ff6918..be7f05d551 100644 --- a/Items/Accessories/GloveofPrecision.cs +++ b/Items/Accessories/GloveofPrecision.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories { SacrificeTotal = 1; DisplayName.SetDefault("Glove of Precision"); - Tooltip.SetDefault("Decreases rogue attack speed by 15% but increases damage and crit by 15% and velocity by 25%"); + Tooltip.SetDefault("Decreases rogue attack speed by 15% but increases damage by 12%, crit by 15% and velocity by 25%"); } public override void SetDefaults() @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.gloveOfPrecision = true; - player.GetDamage() += 0.15f; + player.GetDamage() += 0.12f; player.GetCritChance() += 15; modPlayer.rogueVelocity += 0.25f; player.GetAttackSpeed() -= 0.15f; diff --git a/Items/Weapons/Rogue/GraveGrimreaver.cs b/Items/Weapons/Rogue/GraveGrimreaver.cs index 435204e264..5e6c87d0b1 100644 --- a/Items/Weapons/Rogue/GraveGrimreaver.cs +++ b/Items/Weapons/Rogue/GraveGrimreaver.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue DisplayName.SetDefault("Grave Grimreaver"); Tooltip.SetDefault("Hurls a cursed scythe which homes in\n"+ "The scythe summons skulls as it flies and explodes into bats on hit\n"+ - "Stealth strikes spawn a flood of bats and falling skulls\n"+ + "Stealth strikes spawn a flood of bats and falling skulls when destroyed\n"+ "Inflicts cursed flames and confusion\n"+ "'A dapper skeleton's weapon of choice'"); SacrificeTotal = 1; @@ -23,26 +23,26 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 80; - Item.damage = 25; + Item.damage = 31; Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 50; - Item.useTime = 50; + Item.useAnimation = 48; + Item.useTime = 48; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 4f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 68; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 16f; + Item.shootSpeed = 16.5f; Item.DamageType = RogueDamageClass.Instance; Item.value = CalamityGlobalItem.Rarity5BuyPrice; - Item.rare = ItemRarityID.LightPurple; + Item.rare = ItemRarityID.Pink; Item.Calamity().donorItem = true; } - public override float StealthDamageMultiplier => 1.55f; - public override float StealthVelocityMultiplier => 1.1f; + public override float StealthDamageMultiplier => 0.45f; + public override float StealthVelocityMultiplier => 1f; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 7d6469cff3..2fc2299b57 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -2645,7 +2645,7 @@ namespace CalamityMod.Projectiles for (int i = 0; i < 2; i++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - int damage = (int)player.GetTotalDamage().ApplyTo(25); + int damage = (int)player.GetTotalDamage().ApplyTo(20); int soul = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, velocity, ProjectileType(), damage, 0f, projectile.owner); Main.projectile[soul].tileCollide = false; if (soul.WithinBounds(Main.maxProjectiles)) @@ -2655,7 +2655,7 @@ namespace CalamityMod.Projectiles if (modPlayer.scuttlersJewel && stealthStrike && modPlayer.scuttlerCooldown <= 0) { - int damage = (int)player.GetTotalDamage().ApplyTo(20); + int damage = (int)player.GetTotalDamage().ApplyTo(15); int spike = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType(), damage, projectile.knockBack, projectile.owner); Main.projectile[spike].frame = 4; if (spike.WithinBounds(Main.maxProjectiles)) diff --git a/Projectiles/Rogue/GraveGrimreaverProjectile.cs b/Projectiles/Rogue/GraveGrimreaverProjectile.cs index c2cbb911e6..183874ef9e 100644 --- a/Projectiles/Rogue/GraveGrimreaverProjectile.cs +++ b/Projectiles/Rogue/GraveGrimreaverProjectile.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.tileCollide = false; Projectile.ignoreWater = true; Projectile.penetrate = 1; - Projectile.timeLeft = 310; + Projectile.timeLeft = 210; Projectile.DamageType = RogueDamageClass.Instance; } @@ -38,15 +38,15 @@ namespace CalamityMod.Projectiles.Rogue SoundEngine.PlaySound(SoundID.Item7, Projectile.position); } - //Spawn a skull ever 20 frames - if (Projectile.timeLeft % 20 == 0) + //Spawn a skull every 30 frames + if (Projectile.timeLeft % 30 == 0) { Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity * 0.2f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 1f, 0f); } CalamityUtils.HomeInOnNPC(Projectile, true, 250f, 4f, 14f); - Projectile.spriteDirection = Projectile.direction = (Projectile.velocity.X > 0).ToDirectionInt(); + Projectile.spriteDirection = Projectile.direction = (Projectile.velocity.X > 1).ToDirectionInt(); Projectile.rotation += 0.1f * Projectile.spriteDirection; } diff --git a/Projectiles/Rogue/GrimreaverBat.cs b/Projectiles/Rogue/GrimreaverBat.cs index 107bf3eebe..ddce48cc32 100644 --- a/Projectiles/Rogue/GrimreaverBat.cs +++ b/Projectiles/Rogue/GrimreaverBat.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.DamageType = RogueDamageClass.Instance; Projectile.penetrate = 2; - Projectile.timeLeft = 320; + Projectile.timeLeft = 210; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 10; } diff --git a/Projectiles/Rogue/GrimreaverSkull.cs b/Projectiles/Rogue/GrimreaverSkull.cs index fbba3e6ee4..48496a8639 100644 --- a/Projectiles/Rogue/GrimreaverSkull.cs +++ b/Projectiles/Rogue/GrimreaverSkull.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.DamageType = RogueDamageClass.Instance; Projectile.penetrate = 1; - Projectile.timeLeft = 300; + Projectile.timeLeft = 210; Projectile.tileCollide = false; } @@ -68,12 +68,12 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.AddBuff(BuffID.CursedInferno, 240); + target.AddBuff(BuffID.CursedInferno, 180); } public override void OnHitPvp(Player target, int damage, bool crit) { - target.AddBuff(BuffID.CursedInferno, 240); + target.AddBuff(BuffID.CursedInferno, 180); } } }