diff --git a/Buffs/StatBuffs/EvasionScarfBoost.cs b/Buffs/StatBuffs/EvasionScarfBoost.cs deleted file mode 100644 index 8e06699c94..0000000000 --- a/Buffs/StatBuffs/EvasionScarfBoost.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Terraria; -using Terraria.ModLoader; - -namespace CalamityMod.Buffs.StatBuffs -{ - public class EvasionScarfBoost : ModBuff - { - public override void SetDefaults() - { - DisplayName.SetDefault("Evasion Scarf Boost"); - Description.SetDefault("10% increased damage, 10% increased crit chance, and 15% increased melee speed"); - Main.debuff[Type] = false; - Main.pvpBuff[Type] = true; - Main.buffNoSave[Type] = true; - longerExpertDebuff = false; - } - - public override void Update(Player player, ref int buffIndex) - { - player.Calamity().eScarfBoost = true; - } - } -} diff --git a/Buffs/StatBuffs/EvasionScarfBoost.png b/Buffs/StatBuffs/EvasionScarfBoost.png deleted file mode 100644 index 5e45380f0e..0000000000 Binary files a/Buffs/StatBuffs/EvasionScarfBoost.png and /dev/null differ diff --git a/Buffs/StatBuffs/ScarfMeleeBoost.cs b/Buffs/StatBuffs/ScarfMeleeBoost.cs deleted file mode 100644 index 2a769c3254..0000000000 --- a/Buffs/StatBuffs/ScarfMeleeBoost.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Terraria; -using Terraria.ModLoader; - -namespace CalamityMod.Buffs.StatBuffs -{ - public class ScarfMeleeBoost : ModBuff - { - public override void SetDefaults() - { - DisplayName.SetDefault("Scarf Boost"); - Description.SetDefault("10% increased damage, 5% increased crit chance, and 5% increased melee speed"); - Main.debuff[Type] = false; - Main.pvpBuff[Type] = true; - Main.buffNoSave[Type] = true; - longerExpertDebuff = false; - } - - public override void Update(Player player, ref int buffIndex) - { - player.Calamity().sMeleeBoost = true; - } - } -} diff --git a/Buffs/StatBuffs/ScarfMeleeBoost.png b/Buffs/StatBuffs/ScarfMeleeBoost.png deleted file mode 100644 index 60b9c9e6db..0000000000 Binary files a/Buffs/StatBuffs/ScarfMeleeBoost.png and /dev/null differ diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index f655d01945..67dbf31df0 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -613,7 +613,8 @@ namespace CalamityMod.CalPlayer public int tarraMageHealCooldown = 0; public int tarraCrits = 0; public bool tarraRanged = false; - public bool tarraThrowing = false; + public int tarraRangedCooldown = 0; + public bool tarraThrowing = false; public bool tarragonImmunityCooldown = false; public bool tarragonImmunity = false; public int tarraThrowingCrits = 0; @@ -765,8 +766,6 @@ namespace CalamityMod.CalPlayer public bool xWrath = false; public bool graxDefense = false; public bool encased = false; - public bool sMeleeBoost = false; - public bool eScarfBoost = false; public bool tFury = false; public bool cadence = false; public bool omniscience = false; @@ -1796,8 +1795,6 @@ namespace CalamityMod.CalPlayer xWrath = false; graxDefense = false; encased = false; - sMeleeBoost = false; - eScarfBoost = false; tFury = false; cadence = false; omniscience = false; @@ -2080,7 +2077,8 @@ namespace CalamityMod.CalPlayer gSabatonCooldown = 0; astralStarRainCooldown = 0; bloodflareMageCooldown = 0; - tarraMageHealCooldown = 0; + tarraRangedCooldown = 0; + tarraMageHealCooldown = 0; bossRushImmunityFrameCurseTimer = 0; aBulwarkRareMeleeBoostTimer = 0; acidRoundMultiplier = 1D; @@ -2201,8 +2199,6 @@ namespace CalamityMod.CalPlayer kamiBoost = false; graxDefense = false; encased = false; - sMeleeBoost = false; - eScarfBoost = false; tFury = false; cadence = false; omniscience = false; @@ -3612,14 +3608,6 @@ namespace CalamityMod.CalPlayer { meleeSpeedMult += 0.1f; } - if (sMeleeBoost) - { - meleeSpeedMult += 0.05f; - } - if (eScarfBoost) - { - meleeSpeedMult += 0.15f; - } if (yPower) { meleeSpeedMult += 0.05f; @@ -4050,15 +4038,9 @@ namespace CalamityMod.CalPlayer private void OnDodge() { if (evasionScarf) - { - player.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(9f)); player.AddBuff(ModContent.BuffType(), player.chaosState ? CalamityUtils.SecondsToFrames(20f) : CalamityUtils.SecondsToFrames(13f)); - } else - { - player.AddBuff(ModContent.BuffType(), 540); player.AddBuff(ModContent.BuffType(), player.chaosState ? 1800 : 900); - } player.immune = true; player.immuneTime = player.longInvince ? 100 : 60; @@ -4518,24 +4500,6 @@ namespace CalamityMod.CalPlayer } #endregion - #region Use Time Mult - public override float UseTimeMultiplier(Item item) - { - if (auricSet && godSlayerRanged) - { - if (item.ranged && item.useTime > 3) - return 1.05f; - } - if (auricSet && godSlayerThrowing) - { - if (player.statLife > (int)(player.statLifeMax2 * 0.5) && - item.Calamity().rogue && item.useTime > 3) - return 1.05f; - } - return 1f; - } - #endregion - #region Get Heal Life public override void GetHealLife(Item item, bool quickHeal, ref int healValue) { @@ -5210,10 +5174,6 @@ namespace CalamityMod.CalPlayer { #region MultiplierBoosts double damageMult = 1.0; - if (auricSet && godSlayerDamage && item.melee) - { - damageMult += 0.15; - } if (item.melee && item.type != ModContent.ItemType() && item.type != ModContent.ItemType()) { damageMult += trueMeleeDamage; @@ -5341,9 +5301,6 @@ namespace CalamityMod.CalPlayer damageMult += 0.05; } - if (auricSet && godSlayerDamage && isTrueMelee) - damageMult += 0.15; - if (enraged) damageMult += 1.25; @@ -5353,12 +5310,6 @@ namespace CalamityMod.CalPlayer if (silvaCountdown <= 0 && hasSilvaEffect && silvaSummon && isSummon) damageMult += 0.1; - if (proj.type == ModContent.ProjectileType()) - { - if (target.buffImmune[ModContent.BuffType()]) - damageMult += 0.1; - } - else if (proj.type == ProjectileID.InfernoFriendlyBlast) { damageMult += 0.33; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index c9a72632fc..e64e0d928a 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1152,6 +1152,8 @@ namespace CalamityMod.CalPlayer modPlayer.gSabatonFall--; if (modPlayer.astralStarRainCooldown > 0) modPlayer.astralStarRainCooldown--; + if (modPlayer.tarraRangedCooldown > 0) + modPlayer.tarraRangedCooldown--; if (modPlayer.bloodflareMageCooldown > 0) modPlayer.bloodflareMageCooldown--; if (modPlayer.tarraMageHealCooldown > 0) @@ -2524,17 +2526,6 @@ namespace CalamityMod.CalPlayer player.meleeDamage += 0.2f; } - if (modPlayer.eScarfBoost) - { - player.allDamage += 0.1f; - modPlayer.AllCritBoost(10); - } - if (modPlayer.sMeleeBoost) - { - player.allDamage += 0.1f; - modPlayer.AllCritBoost(5); - } - if (modPlayer.tFury) { player.meleeDamage += 0.3f; @@ -3690,8 +3681,8 @@ namespace CalamityMod.CalPlayer modPlayer.GetStatBonuses(); // True melee damage bonuses - double damageAdd = (modPlayer.dodgeScarf ? 0.15 : 0) + - (modPlayer.evasionScarf ? 0.1 : 0) + + double damageAdd = (modPlayer.dodgeScarf ? 0.1 : 0) + + (modPlayer.evasionScarf ? 0.05 : 0) + ((modPlayer.aBulwarkRare && modPlayer.aBulwarkRareMeleeBoostTimer > 0) ? 0.5 : 0) + (modPlayer.fungalSymbiote ? 0.15 : 0) + ((player.head == ArmorIDs.Head.MoltenHelmet && player.body == ArmorIDs.Body.MoltenBreastplate && player.legs == ArmorIDs.Legs.MoltenGreaves) ? 0.2 : 0) + diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 8a7635bdce..424dcd5334 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -242,21 +242,12 @@ namespace CalamityMod.CalPlayer } } } - if (modPlayer.tarraRanged && Main.rand.Next(0, 100) >= 88 && player.ownedProjectileCounts[ProjectileType()] < 5 && (proj.timeLeft <= 2 || proj.penetrate <= 1)) - { - int projAmt = Main.rand.Next(2, 4); - for (int projCount = 0; projCount < projAmt; projCount++) - { - Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(proj.Center, velocity, ProjectileType(), CalamityUtils.DamageSoftCap(proj.damage * 0.33, 65), 0f, proj.owner); - } - } if (npcCheck) { - if (modPlayer.tarraRanged && crit && proj.ranged) + if (modPlayer.tarraRanged && proj.ranged && modPlayer.tarraRangedCooldown <= 0) { - int leafAmt = Main.rand.Next(2, 4); - for (int l = 0; l < leafAmt; l++) + modPlayer.tarraRangedCooldown = 60; + for (int l = 0; l < 2; l++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); int FUCKYOU = Projectile.NewProjectile(position, velocity, ProjectileID.Leaf, CalamityUtils.DamageSoftCap(proj.damage * 0.25, 60), 0f, player.whoAmI); @@ -266,7 +257,15 @@ namespace CalamityMod.CalPlayer Main.projectile[FUCKYOU].netUpdate = true; } } - } + if (player.ownedProjectileCounts[ProjectileType()] < 2) + { + for (int projCount = 0; projCount < 2; projCount++) + { + Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); + Projectile.NewProjectile(proj.Center, velocity, ProjectileType(), CalamityUtils.DamageSoftCap(proj.damage * 0.33, 65), 0f, proj.owner); + } + } + } if (proj.type == ProjectileType()) { modPlayer.polarisBoostCounter += 1; diff --git a/ExtraTextures/ThanatosVentParticle.png b/ExtraTextures/ThanatosVentParticle.png new file mode 100644 index 0000000000..a66a5aa743 Binary files /dev/null and b/ExtraTextures/ThanatosVentParticle.png differ diff --git a/Gores/Thanatos/ThanatosVentParticle1.png b/Gores/Thanatos/ThanatosVentParticle1.png deleted file mode 100644 index ec84d9232c..0000000000 Binary files a/Gores/Thanatos/ThanatosVentParticle1.png and /dev/null differ diff --git a/Gores/Thanatos/ThanatosVentParticle2.png b/Gores/Thanatos/ThanatosVentParticle2.png deleted file mode 100644 index 50a693e93e..0000000000 Binary files a/Gores/Thanatos/ThanatosVentParticle2.png and /dev/null differ diff --git a/Gores/Thanatos/ThanatosVentParticle3.png b/Gores/Thanatos/ThanatosVentParticle3.png deleted file mode 100644 index 221e95e948..0000000000 Binary files a/Gores/Thanatos/ThanatosVentParticle3.png and /dev/null differ diff --git a/ILEditing/ILChanges.cs b/ILEditing/ILChanges.cs index 17cb98efd1..78f6e62361 100644 --- a/ILEditing/ILChanges.cs +++ b/ILEditing/ILChanges.cs @@ -107,6 +107,7 @@ namespace CalamityMod.ILEditing ApplyLifeBytesChanges(); AdjustChlorophyteBullets(); + AdjustCultistCloneFireballDust(); RemoveAerialBaneDamageBoost(); AdjustDamageVariance(); RemoveExpertHardmodeScaling(); @@ -155,6 +156,19 @@ namespace CalamityMod.ILEditing }; } + private static void AdjustCultistCloneFireballDust() + { + // Reduce dust from 10 to 5 and homing range. + IL.Terraria.Projectile.AI_001 += (il) => + { + var cursor = new ILCursor(il); + cursor.GotoNext(MoveType.Before, i => i.MatchLdcI4(468)); // The ID of Cultist Clone Fireballs. + cursor.GotoNext(MoveType.Before, i => i.MatchLdcR4(12f)); // The gate value for spawning dust circles. + cursor.Remove(); + cursor.Emit(OpCodes.Ldc_R4, 60f); // Increase to 60f. + }; + } + private static void RemoveAerialBaneDamageBoost() { IL.Terraria.Projectile.Damage += (il) => diff --git a/Items/Accessories/CounterScarf.cs b/Items/Accessories/CounterScarf.cs index 18080d81f2..8130cd6267 100644 --- a/Items/Accessories/CounterScarf.cs +++ b/Items/Accessories/CounterScarf.cs @@ -11,9 +11,8 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Counter Scarf"); - Tooltip.SetDefault("True melee strikes deal 15% more damage\n" + + Tooltip.SetDefault("True melee strikes deal 10% more damage\n" + "Grants the ability to dash; dashing into an attack will cause you to dodge it\n" + - "After a dodge you will be granted a buff to all damage, melee speed, and all crit chance for a short time\n" + "After a successful dodge you must wait 15 seconds before you can dodge again\n" + "This cooldown will be twice as long if you have Chaos State\n" + "While on cooldown, Chaos State will last twice as long"); diff --git a/Items/Accessories/EvasionScarf.cs b/Items/Accessories/EvasionScarf.cs index fbebe616b3..c6a06dc16d 100644 --- a/Items/Accessories/EvasionScarf.cs +++ b/Items/Accessories/EvasionScarf.cs @@ -11,9 +11,8 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Evasion Scarf"); - Tooltip.SetDefault("True melee strikes deal 25% more damage\n" + + Tooltip.SetDefault("True melee strikes deal 15% more damage\n" + "Grants the ability to dash; dashing into an attack will cause you to dodge it\n" + - "After a dodge you will be granted a buff to all damage, melee speed, and all crit chance for a short time\n" + "After a successful dodge you must wait 13 seconds before you can dodge again\n" + "This cooldown will be 50 percent longer if you have Chaos State\n" + "While on cooldown, Chaos State will be 50 percent longer"); diff --git a/Items/Armor/AuricTeslaHelm.cs b/Items/Armor/AuricTeslaHelm.cs index 8a31de43d9..de05c1cd72 100644 --- a/Items/Armor/AuricTeslaHelm.cs +++ b/Items/Armor/AuricTeslaHelm.cs @@ -41,8 +41,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "Melee Tarragon, Bloodflare and God Slayer effects\n" + "Enemies are more likely to target you\n" + "All projectiles spawn healing auric orbs on enemy hits\n" + - "Max run speed and acceleration boosted by 10%\n" + - "Your melee damage is multiplied based on how high your HP is; at full HP this effect is at max"; + "Max run speed and acceleration boosted by 10%"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.tarraSet = true; modPlayer.tarraMelee = true; diff --git a/Items/Armor/AuricTeslaPlumedHelm.cs b/Items/Armor/AuricTeslaPlumedHelm.cs index 025e00b689..0975186372 100644 --- a/Items/Armor/AuricTeslaPlumedHelm.cs +++ b/Items/Armor/AuricTeslaPlumedHelm.cs @@ -41,7 +41,6 @@ namespace CalamityMod.Items.Armor player.setBonus = "Rogue Tarragon, Bloodflare and God Slayer armor effects\n" + "All projectiles spawn healing auric orbs on enemy hits\n" + "Max run speed and acceleration boosted by 10%\n" + - "Rogue weapon critical strikes will do 1.25 times damage while you are above 50% HP\n" + "Rogue stealth builds while not attacking and slower while moving, up to a max of 130\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + diff --git a/Items/Armor/TarragonVisage.cs b/Items/Armor/TarragonVisage.cs index acf2a59ff7..f236ffe489 100644 --- a/Items/Armor/TarragonVisage.cs +++ b/Items/Armor/TarragonVisage.cs @@ -63,8 +63,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "Reduces enemy spawn rates\n" + "Increased heart pickup range\n" + "Enemies have a chance to drop extra hearts on death\n" + - "Ranged critical strikes will cause an explosion of leaves\n" + - "Ranged projectiles have a chance to split into life energy on death by hitting an enemy"; + "Ranged projectiles split into homing life energy and leaves on death"; } public override void UpdateEquip(Player player) diff --git a/Items/Weapons/Melee/Terratomere.cs b/Items/Weapons/Melee/Terratomere.cs index 3aaf0a99a3..d06acaa6a6 100644 --- a/Items/Weapons/Melee/Terratomere.cs +++ b/Items/Weapons/Melee/Terratomere.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 64; - item.damage = 160; + item.damage = 260; item.melee = true; item.useAnimation = 21; item.useStyle = ItemUseStyleID.SwingThrow; diff --git a/NPCs/Abyss/ChaoticPuffer.cs b/NPCs/Abyss/ChaoticPuffer.cs index fcd393680e..444abd85a8 100644 --- a/NPCs/Abyss/ChaoticPuffer.cs +++ b/NPCs/Abyss/ChaoticPuffer.cs @@ -139,7 +139,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/ChaoticPufferGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/ChaoticPufferGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.GetTexture("CalamityMod/NPCs/Abyss/ChaoticPufferGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/Cuttlefish.cs b/NPCs/Abyss/Cuttlefish.cs index 6d8a317490..aba420d53a 100644 --- a/NPCs/Abyss/Cuttlefish.cs +++ b/NPCs/Abyss/Cuttlefish.cs @@ -361,7 +361,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/CuttlefishGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/CuttlefishGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.GetTexture("CalamityMod/NPCs/Abyss/CuttlefishGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/DevilFish.cs b/NPCs/Abyss/DevilFish.cs index a243cacb4a..36e7903cc0 100644 --- a/NPCs/Abyss/DevilFish.cs +++ b/NPCs/Abyss/DevilFish.cs @@ -274,7 +274,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/DevilFishGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/DevilFishGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.GetTexture("CalamityMod/NPCs/Abyss/DevilFishGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/DevilFishAlt.cs b/NPCs/Abyss/DevilFishAlt.cs index 6ae16ff161..e51d360bd4 100644 --- a/NPCs/Abyss/DevilFishAlt.cs +++ b/NPCs/Abyss/DevilFishAlt.cs @@ -274,7 +274,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/DevilFishGlowAlt").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/DevilFishGlowAlt").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.GetTexture("CalamityMod/NPCs/Abyss/DevilFishGlowAlt"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/EidolonWyrmBody.cs b/NPCs/Abyss/EidolonWyrmBody.cs index b52e8ce6c9..130360d7ec 100644 --- a/NPCs/Abyss/EidolonWyrmBody.cs +++ b/NPCs/Abyss/EidolonWyrmBody.cs @@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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); Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/EidolonWyrmBodyAlt.cs b/NPCs/Abyss/EidolonWyrmBodyAlt.cs index 9af8ed6677..03a97848a6 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAlt.cs +++ b/NPCs/Abyss/EidolonWyrmBodyAlt.cs @@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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); Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs index 9302bb29e3..6e947548cf 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs @@ -163,7 +163,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); Vector2 vector = center - Main.screenPosition; vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlowHuge").Width, ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlowHuge").Height) * 0.5f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + vector += vector11 * 1f + new Vector2(0f, 4f + npc.gfxOffY); Color color = new Color(127, 127, 127, 0).MultiplyRGBA(Color.LightYellow) * npc.Opacity; Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlowHuge"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/EidolonWyrmBodyHuge.cs b/NPCs/Abyss/EidolonWyrmBodyHuge.cs index 197f7113c1..fe9409cff3 100644 --- a/NPCs/Abyss/EidolonWyrmBodyHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyHuge.cs @@ -163,7 +163,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); Vector2 vector = center - Main.screenPosition; vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlowHuge").Width, ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlowHuge").Height) * 0.5f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + vector += vector11 * 1f + new Vector2(0f, 4f + npc.gfxOffY); Color color = new Color(127, 127, 127, 0).MultiplyRGBA(Color.LightYellow) * npc.Opacity; Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlowHuge"), 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 6e15d84c4f..7515be8701 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -431,7 +431,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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); Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index a7182ef055..918af1f755 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Items.Weapons.Magic; @@ -168,6 +169,7 @@ namespace CalamityMod.NPCs.Abyss Player player = Main.player[npc.target]; bool targetDownDeep = player.Calamity().ZoneAbyssLayer4; + bool targetOnMount = player.mount.Active; if (npc.ai[2] > 0f) npc.realLife = (int)npc.ai[2]; @@ -213,17 +215,32 @@ namespace CalamityMod.NPCs.Abyss if (player.dead) { npc.TargetClosest(false); - - npc.velocity.Y += 2f; - if (npc.position.Y > Main.worldSurface * 16.0) - npc.velocity.Y += 2f; - - if (npc.position.Y > Main.rockLayer * 16.0) + player = Main.player[npc.target]; + if (player.dead) { - for (int a = 0; a < Main.maxNPCs; a++) + npc.ai[3] = 0f; + npc.localAI[0] = 0f; + npc.localAI[1] = 0f; + npc.localAI[2] = 0f; + npc.localAI[3] = 0f; + AIState = (float)Phase.ChargeOne; + calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 1f; + chargeVelocityScalar = 0f; + rotationDirection = 0; + + npc.velocity.Y += 2f; + if (npc.position.Y > Main.worldSurface * 16.0) + npc.velocity.Y += 2f; + + if (npc.position.Y > Main.rockLayer * 16.0) { - if (Main.npc[a].type == npc.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) - Main.npc[a].active = false; + for (int a = 0; a < Main.maxNPCs; a++) + { + if (Main.npc[a].type == npc.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) + Main.npc[a].active = false; + } } } } @@ -264,6 +281,20 @@ namespace CalamityMod.NPCs.Abyss float ancientDoomGateValue = 120f; float lightningChargePhaseGateValue = 180f; + // Adjust slowing debuff immunity + bool immuneToSlowingDebuffs = AIState == (float)Phase.FinalPhase || AIState == (float)Phase.ShadowFireballSpin; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; + npc.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; + // Adjust opacity bool invisiblePartOfChargePhase = calamityGlobalNPC.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC.newAI[2] <= chargePhaseGateValue + 1f && (AIState == (float)Phase.ChargeOne || AIState == (float)Phase.ChargeTwo || AIState == (float)Phase.FastCharge); bool invisiblePartOfLightningChargePhase = calamityGlobalNPC.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC.newAI[2] <= lightningChargePhaseGateValue + 1f && AIState == (float)Phase.LightningCharge; @@ -513,7 +544,7 @@ namespace CalamityMod.NPCs.Abyss } float predictionAmt = targetDownDeep ? 45f : 60f; - float lightningVelocity = targetDownDeep ? 6f : 8f; + float lightningVelocity = (targetDownDeep && !targetOnMount) ? 6f : 8f; for (int i = 0; i < numProjectiles; i++) { // Predictive bolt @@ -1357,7 +1388,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); Vector2 vector = center - Main.screenPosition; vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlowHuge").Width, ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlowHuge").Height) * 0.5f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + vector += vector11 * 1f + new Vector2(0f, 4f + npc.gfxOffY); Color color = new Color(127, 127, 127, 0).MultiplyRGBA(Color.LightYellow) * npc.Opacity; Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlowHuge"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/EidolonWyrmTail.cs b/NPCs/Abyss/EidolonWyrmTail.cs index d39e8fde54..7220f9aa9a 100644 --- a/NPCs/Abyss/EidolonWyrmTail.cs +++ b/NPCs/Abyss/EidolonWyrmTail.cs @@ -126,7 +126,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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); Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/EidolonWyrmTailHuge.cs b/NPCs/Abyss/EidolonWyrmTailHuge.cs index bec65dd492..0c16cde15c 100644 --- a/NPCs/Abyss/EidolonWyrmTailHuge.cs +++ b/NPCs/Abyss/EidolonWyrmTailHuge.cs @@ -139,7 +139,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); Vector2 vector = center - Main.screenPosition; vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlowHuge").Width, ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlowHuge").Height) * 0.5f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + vector += vector11 * 1f + new Vector2(0f, 4f + npc.gfxOffY); Color color = new Color(127, 127, 127, 0).MultiplyRGBA(Color.LightYellow) * npc.Opacity; Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlowHuge"), 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 14c107de58..f9f9b6677f 100644 --- a/NPCs/Abyss/GiantSquid.cs +++ b/NPCs/Abyss/GiantSquid.cs @@ -220,7 +220,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/GiantSquidGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/GiantSquidGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.Cyan); Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/GiantSquidGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/GulperEelBody.cs b/NPCs/Abyss/GulperEelBody.cs index a4384fb3ac..a8a8cf7e47 100644 --- a/NPCs/Abyss/GulperEelBody.cs +++ b/NPCs/Abyss/GulperEelBody.cs @@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/GulperEelBodyGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/GulperEelBodyGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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); Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/GulperEelBodyGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/GulperEelBodyAlt.cs b/NPCs/Abyss/GulperEelBodyAlt.cs index 5bbe2a2c98..e5a02e6d21 100644 --- a/NPCs/Abyss/GulperEelBodyAlt.cs +++ b/NPCs/Abyss/GulperEelBodyAlt.cs @@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/GulperEelBodyAltGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/GulperEelBodyAltGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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); Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/GulperEelBodyAltGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/GulperEelHead.cs b/NPCs/Abyss/GulperEelHead.cs index 2c863ba15f..d022691127 100644 --- a/NPCs/Abyss/GulperEelHead.cs +++ b/NPCs/Abyss/GulperEelHead.cs @@ -314,7 +314,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/GulperEelHeadGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/GulperEelHeadGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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); Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/GulperEelHeadGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/GulperEelTail.cs b/NPCs/Abyss/GulperEelTail.cs index 5adc3cf9db..9ffad34b42 100644 --- a/NPCs/Abyss/GulperEelTail.cs +++ b/NPCs/Abyss/GulperEelTail.cs @@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/GulperEelTailGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/GulperEelTailGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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); Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/GulperEelTailGlow"), 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 0074ae953e..c2f0ead0b8 100644 --- a/NPCs/Abyss/Laserfish.cs +++ b/NPCs/Abyss/Laserfish.cs @@ -90,7 +90,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/LaserfishGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/LaserfishGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.GetTexture("CalamityMod/NPCs/Abyss/LaserfishGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/LuminousCorvina.cs b/NPCs/Abyss/LuminousCorvina.cs index bcde43b0ae..2a464acdf2 100644 --- a/NPCs/Abyss/LuminousCorvina.cs +++ b/NPCs/Abyss/LuminousCorvina.cs @@ -262,7 +262,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/LuminousCorvinaGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/LuminousCorvinaGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.GetTexture("CalamityMod/NPCs/Abyss/LuminousCorvinaGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/MirageJelly.cs b/NPCs/Abyss/MirageJelly.cs index a081bd6e18..4df2aebc7f 100644 --- a/NPCs/Abyss/MirageJelly.cs +++ b/NPCs/Abyss/MirageJelly.cs @@ -181,7 +181,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/MirageJellyGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/MirageJellyGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.GetTexture("CalamityMod/NPCs/Abyss/MirageJellyGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/ToxicMinnow.cs b/NPCs/Abyss/ToxicMinnow.cs index 00fe9f0ebe..519f43f74c 100644 --- a/NPCs/Abyss/ToxicMinnow.cs +++ b/NPCs/Abyss/ToxicMinnow.cs @@ -105,7 +105,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/ToxicMinnowGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/ToxicMinnowGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.GetTexture("CalamityMod/NPCs/Abyss/ToxicMinnowGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Abyss/Viperfish.cs b/NPCs/Abyss/Viperfish.cs index 3baa6e3ecb..bd3f24e2a3 100644 --- a/NPCs/Abyss/Viperfish.cs +++ b/NPCs/Abyss/Viperfish.cs @@ -88,7 +88,7 @@ namespace CalamityMod.NPCs.Abyss Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/Abyss/ViperfishGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/Abyss/ViperfishGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.GetTexture("CalamityMod/NPCs/Abyss/ViperfishGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/AquaticScourge/AquaticScourgeBody.cs b/NPCs/AquaticScourge/AquaticScourgeBody.cs index e334514fd5..0e341dc802 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBody.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBody.cs @@ -82,7 +82,7 @@ namespace CalamityMod.NPCs.AquaticScourge Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); Color color = npc.GetAlpha(lightColor); if (Main.npc[(int)npc.ai[2]].Calamity().newAI[3] > 480f && (CalamityWorld.revenge || BossRushEvent.BossRushActive || CalamityWorld.malice)) diff --git a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs index 8d556fec1a..59f2339a34 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs @@ -81,7 +81,7 @@ namespace CalamityMod.NPCs.AquaticScourge Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); Color color = npc.GetAlpha(lightColor); if (Main.npc[(int)npc.ai[2]].Calamity().newAI[3] > 480f && (CalamityWorld.revenge || BossRushEvent.BossRushActive || CalamityWorld.malice)) diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 18ebbb9351..e7bb9fe125 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -97,7 +97,7 @@ namespace CalamityMod.NPCs.AquaticScourge Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); Color color = npc.GetAlpha(lightColor); if (npc.Calamity().newAI[3] > 480f && (CalamityWorld.revenge || BossRushEvent.BossRushActive || CalamityWorld.malice)) diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.cs b/NPCs/AquaticScourge/AquaticScourgeTail.cs index 66b9a95990..147fd4bd66 100644 --- a/NPCs/AquaticScourge/AquaticScourgeTail.cs +++ b/NPCs/AquaticScourge/AquaticScourgeTail.cs @@ -81,7 +81,7 @@ namespace CalamityMod.NPCs.AquaticScourge Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); Color color = npc.GetAlpha(lightColor); if (Main.npc[(int)npc.ai[2]].Calamity().newAI[3] > 480f && (CalamityWorld.revenge || BossRushEvent.BossRushActive || CalamityWorld.malice)) diff --git a/NPCs/Astral/AstralProbe.cs b/NPCs/Astral/AstralProbe.cs index b6d9be2fb1..19031a1f44 100644 --- a/NPCs/Astral/AstralProbe.cs +++ b/NPCs/Astral/AstralProbe.cs @@ -221,7 +221,7 @@ namespace CalamityMod.NPCs.Astral Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / 2)); Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); diff --git a/NPCs/AstrumAureus/AureusSpawn.cs b/NPCs/AstrumAureus/AureusSpawn.cs index eafd67ab14..542c154698 100644 --- a/NPCs/AstrumAureus/AureusSpawn.cs +++ b/NPCs/AstrumAureus/AureusSpawn.cs @@ -243,14 +243,14 @@ namespace CalamityMod.NPCs.AstrumAureus color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/AstrumAureus/AureusSpawnGlow"); @@ -265,7 +265,7 @@ namespace CalamityMod.NPCs.AstrumAureus color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs b/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs index 807d4f4d5b..f4ac21e06f 100644 --- a/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs @@ -97,14 +97,14 @@ namespace CalamityMod.NPCs.AstrumDeus color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = npc.localAI[3] == 1f ? ModContent.GetTexture("CalamityMod/NPCs/AstrumDeus/AstrumDeusBodyAltGlow") : ModContent.GetTexture("CalamityMod/NPCs/AstrumDeus/AstrumDeusBodyGlow"); @@ -121,7 +121,7 @@ namespace CalamityMod.NPCs.AstrumDeus color41 *= (num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); if (npc.localAI[3] != 1f) diff --git a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs index cbc4ff0eb1..2723515d0a 100644 --- a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs @@ -112,14 +112,14 @@ namespace CalamityMod.NPCs.AstrumDeus color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/AstrumDeus/AstrumDeusHeadGlow"); @@ -136,7 +136,7 @@ namespace CalamityMod.NPCs.AstrumDeus color41 *= (num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); Color color43 = color42; diff --git a/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs b/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs index 210133b3d9..ffcde84d21 100644 --- a/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs @@ -96,14 +96,14 @@ namespace CalamityMod.NPCs.AstrumDeus color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/AstrumDeus/AstrumDeusTailGlow"); @@ -119,7 +119,7 @@ namespace CalamityMod.NPCs.AstrumDeus color41 *= (num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/Bumblebirb/Bumblefuck.cs b/NPCs/Bumblebirb/Bumblefuck.cs index 5a37e2156b..ce206c6ccb 100644 --- a/NPCs/Bumblebirb/Bumblefuck.cs +++ b/NPCs/Bumblebirb/Bumblefuck.cs @@ -264,7 +264,7 @@ namespace CalamityMod.NPCs.Bumblebirb color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } @@ -319,7 +319,7 @@ namespace CalamityMod.NPCs.Bumblebirb color39 *= 1f - num157; Vector2 vector42 = npc.Center + ((float)num160 / (float)num156 * MathHelper.TwoPi + npc.rotation).ToRotationVector2() * scaleFactor9 * num157 - Main.screenPosition; vector42 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector42 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector42 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector42, npc.frame, color39, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } @@ -329,7 +329,7 @@ namespace CalamityMod.NPCs.Bumblebirb color2 = npc.GetAlpha(color2); Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, (phase3 && calamityGlobalNPC.newAI[3] == 1f ? color2 : npc.GetAlpha(lightColor)), npc.rotation, vector11, npc.scale, spriteEffects, 0f); if (phase2) @@ -360,7 +360,7 @@ namespace CalamityMod.NPCs.Bumblebirb color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } @@ -372,7 +372,7 @@ namespace CalamityMod.NPCs.Bumblebirb color42 *= 1f - num157; Vector2 vector45 = npc.Center + ((float)num164 / (float)num156 * MathHelper.TwoPi + npc.rotation).ToRotationVector2() * scaleFactor9 * num157 - Main.screenPosition; vector45 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector45 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector45 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector45, npc.frame, color42, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/Bumblebirb/Bumblefuck2.cs b/NPCs/Bumblebirb/Bumblefuck2.cs index bc99f15fa2..c300b0016f 100644 --- a/NPCs/Bumblebirb/Bumblefuck2.cs +++ b/NPCs/Bumblebirb/Bumblefuck2.cs @@ -344,14 +344,14 @@ namespace CalamityMod.NPCs.Bumblebirb color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); return false; diff --git a/NPCs/Calamitas/Calamitas.cs b/NPCs/Calamitas/Calamitas.cs index 522c9e1df1..8f17bfe511 100644 --- a/NPCs/Calamitas/Calamitas.cs +++ b/NPCs/Calamitas/Calamitas.cs @@ -100,14 +100,14 @@ namespace CalamityMod.NPCs.Calamitas color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Calamitas/CalamitasGlow"); @@ -122,7 +122,7 @@ namespace CalamityMod.NPCs.Calamitas color41 *= (num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/Calamitas/CalamitasRun.cs b/NPCs/Calamitas/CalamitasRun.cs index 203f7699c2..bcbe90e9e1 100644 --- a/NPCs/Calamitas/CalamitasRun.cs +++ b/NPCs/Calamitas/CalamitasRun.cs @@ -98,14 +98,14 @@ namespace CalamityMod.NPCs.Calamitas color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Calamitas/CalamitasRunGlow"); @@ -120,7 +120,7 @@ namespace CalamityMod.NPCs.Calamitas color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/Calamitas/CalamitasRun2.cs b/NPCs/Calamitas/CalamitasRun2.cs index efa62c49fd..4f297c5c02 100644 --- a/NPCs/Calamitas/CalamitasRun2.cs +++ b/NPCs/Calamitas/CalamitasRun2.cs @@ -98,14 +98,14 @@ namespace CalamityMod.NPCs.Calamitas color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Calamitas/CalamitasRun2Glow"); @@ -120,7 +120,7 @@ namespace CalamityMod.NPCs.Calamitas color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/Calamitas/CalamitasRun3.cs b/NPCs/Calamitas/CalamitasRun3.cs index e2fc49af79..47d4ebff58 100644 --- a/NPCs/Calamitas/CalamitasRun3.cs +++ b/NPCs/Calamitas/CalamitasRun3.cs @@ -117,14 +117,14 @@ namespace CalamityMod.NPCs.Calamitas color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Calamitas/CalamitasRun3Glow"); @@ -139,7 +139,7 @@ namespace CalamityMod.NPCs.Calamitas color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/Calamitas/LifeSeeker.cs b/NPCs/Calamitas/LifeSeeker.cs index df1f69aa99..ecae78c18f 100644 --- a/NPCs/Calamitas/LifeSeeker.cs +++ b/NPCs/Calamitas/LifeSeeker.cs @@ -76,14 +76,14 @@ namespace CalamityMod.NPCs.Calamitas color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture = ModContent.GetTexture("CalamityMod/NPCs/Calamitas/LifeSeekerGlow"); @@ -98,7 +98,7 @@ namespace CalamityMod.NPCs.Calamitas color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/Calamitas/SoulSeeker.cs b/NPCs/Calamitas/SoulSeeker.cs index 2fd1154521..dcf59123b9 100644 --- a/NPCs/Calamitas/SoulSeeker.cs +++ b/NPCs/Calamitas/SoulSeeker.cs @@ -173,14 +173,14 @@ namespace CalamityMod.NPCs.Calamitas afterImageColor *= (afterImageAmt - a) / 15f; Vector2 afterimagePos = npc.oldPos[a] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; afterimagePos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - afterimagePos += origin * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + afterimagePos += origin * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, afterimagePos, npc.frame, afterImageColor, npc.rotation, origin, npc.scale, spriteEffects, 0f); } } Vector2 drawPos = npc.Center - Main.screenPosition; drawPos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - drawPos += origin * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + drawPos += origin * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, drawPos, npc.frame, npc.GetAlpha(lightColor), npc.rotation, origin, npc.scale, spriteEffects, 0f); texture = ModContent.GetTexture("CalamityMod/NPCs/Calamitas/SoulSeekerGlow"); @@ -195,7 +195,7 @@ namespace CalamityMod.NPCs.Calamitas glowColor *= (afterImageAmt - a) / 15f; Vector2 afterimagePos = npc.oldPos[a] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; afterimagePos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - afterimagePos += origin * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + afterimagePos += origin * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, afterimagePos, npc.frame, glowColor, npc.rotation, origin, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 3ce8203a46..7050e66ff8 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -1,3 +1,4 @@ +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer; using CalamityMod.Dusts; @@ -187,6 +188,20 @@ namespace CalamityMod.NPCs } } + // Adjust slowing debuff immunity + bool immuneToSlowingDebuffs = doSpiral; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; + npc.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; + if (Main.netMode != NetmodeID.MultiplayerClient) { if (head) @@ -4590,6 +4605,20 @@ namespace CalamityMod.NPCs bool death = CalamityWorld.death || malice; Vector2 vector = npc.Center; + // Adjust slowing debuff immunity + bool immuneToSlowingDebuffs = npc.ai[0] == 3f || npc.ai[0] == 3.1f || npc.ai[0] == 3.2f; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; + npc.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; + // If target is outside the jungle for more than 3 seconds, enrage if (!player.ZoneJungle) { diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 67ad19225b..dc373978cf 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -1,3 +1,5 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Events; using CalamityMod.NPCs.Abyss; using CalamityMod.NPCs.AcidRain; @@ -2661,6 +2663,20 @@ namespace CalamityMod.NPCs if (Main.player[npc.target].dead) npc.ai[0] = 5f; + // Adjust slowing debuff immunity + bool immuneToSlowingDebuffs = npc.ai[0] == 0f; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; + npc.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; + if (npc.ai[0] == 5f) { npc.velocity.Y *= 0.98f; @@ -7199,8 +7215,22 @@ namespace CalamityMod.NPCs Main.PlaySound(SoundID.Roar, (int)npc.position.X, (int)npc.position.Y, 0, 1f, 0f); } - // Float near player - if (npc.ai[1] == 0f || npc.ai[1] == 4f) + // Adjust slowing debuff immunity + bool immuneToSlowingDebuffs = npc.ai[1] == 5f; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; + npc.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; + + // Float near player + if (npc.ai[1] == 0f || npc.ai[1] == 4f) { // Start other phases if arms are dead, start with spinning phase if (allArmsDead) diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index a47c0c1739..6e040ed565 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -120,14 +120,14 @@ namespace CalamityMod.NPCs.CeaselessVoid color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/CeaselessVoid/CeaselessVoidGlow"); @@ -142,7 +142,7 @@ namespace CalamityMod.NPCs.CeaselessVoid color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/CeaselessVoid/DarkEnergy.cs b/NPCs/CeaselessVoid/DarkEnergy.cs index b21d9612ab..9412cd31e6 100644 --- a/NPCs/CeaselessVoid/DarkEnergy.cs +++ b/NPCs/CeaselessVoid/DarkEnergy.cs @@ -199,7 +199,7 @@ namespace CalamityMod.NPCs.CeaselessVoid Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); if (CalamityConfig.Instance.Afterimages) { @@ -211,7 +211,7 @@ namespace CalamityMod.NPCs.CeaselessVoid color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } @@ -232,7 +232,7 @@ namespace CalamityMod.NPCs.CeaselessVoid color41 *= (num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); Color color43 = color42; diff --git a/NPCs/Crabulon/CrabShroom.cs b/NPCs/Crabulon/CrabShroom.cs index ba46c99cd3..fa2a3ea716 100644 --- a/NPCs/Crabulon/CrabShroom.cs +++ b/NPCs/Crabulon/CrabShroom.cs @@ -92,7 +92,7 @@ namespace CalamityMod.NPCs.Crabulon Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Crabulon/CrabShroomGlow"); diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index fc3221a734..3898ad1aaa 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -625,7 +625,7 @@ namespace CalamityMod.NPCs.Crabulon Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2); Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(Main.npcTexture[npc.type].Width, Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); Color color37 = Color.Lerp(Color.White, Color.Cyan, 0.5f); if (npc.ai[0] > 2f) @@ -633,7 +633,7 @@ namespace CalamityMod.NPCs.Crabulon vector11 = new Vector2(textureAttack.Width / 2, textureAttack.Height / 2); vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(textureAttack.Width, textureAttack.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(textureAttack, vector43, npc.frame, npc.GetAlpha(drawColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); @@ -644,7 +644,7 @@ namespace CalamityMod.NPCs.Crabulon vector11 = new Vector2(texture.Width / 2, texture.Height / 2); vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, vector43, npc.frame, npc.GetAlpha(drawColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); diff --git a/NPCs/Crags/SoulSlurper.cs b/NPCs/Crags/SoulSlurper.cs index 13eedfc458..b6dffd4fc4 100644 --- a/NPCs/Crags/SoulSlurper.cs +++ b/NPCs/Crags/SoulSlurper.cs @@ -241,14 +241,14 @@ namespace CalamityMod.NPCs.Crags color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture.Width, (float)(texture.Height)) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture.Width, (float)(texture.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture = ModContent.GetTexture("CalamityMod/NPCs/Crags/SoulSlurperGlow"); @@ -263,7 +263,7 @@ namespace CalamityMod.NPCs.Crags color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture.Width, (float)(texture.Height)) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, npc.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f); } } diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index 2ce5d9644b..d3c2e2fb14 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -1009,7 +1009,7 @@ namespace CalamityMod.NPCs.Cryogen Vector2 origin = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2); Vector2 drawPos = npc.Center - Main.screenPosition; drawPos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - drawPos += origin * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + drawPos += origin * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, drawPos, npc.frame, npc.GetAlpha(drawColor), npc.rotation, origin, npc.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index eedb1ac7ce..f40071661d 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -180,7 +180,7 @@ namespace CalamityMod.NPCs.DevourerofGods Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/DevourerofGods/DevourerofGodsBodyGlow"); diff --git a/NPCs/DevourerofGods/DevourerofGodsBody2.cs b/NPCs/DevourerofGods/DevourerofGodsBody2.cs index 14193dafde..2a8e7670cc 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody2.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody2.cs @@ -154,7 +154,7 @@ namespace CalamityMod.NPCs.DevourerofGods Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/DevourerofGods/DevourerofGodsBody2Glow"); diff --git a/NPCs/DevourerofGods/DevourerofGodsBodyS.cs b/NPCs/DevourerofGods/DevourerofGodsBodyS.cs index 15a07e3ff6..8e95007eec 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBodyS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBodyS.cs @@ -200,7 +200,7 @@ namespace CalamityMod.NPCs.DevourerofGods Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); if (!npc.dontTakeDamage) diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index 3dc0107f23..70d762a4dc 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -877,7 +877,7 @@ namespace CalamityMod.NPCs.DevourerofGods Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/DevourerofGods/DevourerofGodsHeadGlow"); diff --git a/NPCs/DevourerofGods/DevourerofGodsHead2.cs b/NPCs/DevourerofGods/DevourerofGodsHead2.cs index daa98fb752..345e53a3f7 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead2.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead2.cs @@ -320,7 +320,7 @@ namespace CalamityMod.NPCs.DevourerofGods Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/DevourerofGods/DevourerofGodsHead2Glow"); diff --git a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs index 393cc02709..627b9464c0 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs @@ -1173,7 +1173,7 @@ namespace CalamityMod.NPCs.DevourerofGods Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); if (!npc.dontTakeDamage) diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index f95b708ee2..09348e7048 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -163,7 +163,7 @@ namespace CalamityMod.NPCs.DevourerofGods Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/DevourerofGods/DevourerofGodsTailGlow"); diff --git a/NPCs/DevourerofGods/DevourerofGodsTail2.cs b/NPCs/DevourerofGods/DevourerofGodsTail2.cs index 9a38cd2818..56d963d099 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail2.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail2.cs @@ -151,7 +151,7 @@ namespace CalamityMod.NPCs.DevourerofGods Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/DevourerofGods/DevourerofGodsTail2Glow"); diff --git a/NPCs/DevourerofGods/DevourerofGodsTailS.cs b/NPCs/DevourerofGods/DevourerofGodsTailS.cs index 5d2bcd4595..2bc0b738b9 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTailS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTailS.cs @@ -196,7 +196,7 @@ namespace CalamityMod.NPCs.DevourerofGods Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); if (!npc.dontTakeDamage) diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index a994d1eb50..5d3e744b28 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Events; +using CalamityMod.Particles; using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -17,6 +18,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos { // Whether the body is venting heat or not, it is vulnerable to damage during venting private bool vulnerable = false; + public ThanatosSmokeParticleSet SmokeDrawer = new ThanatosSmokeParticleSet(-1, 4, 0f, 16f, 1.5f); public override void SetStaticDefaults() { @@ -29,8 +31,8 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.Calamity().canBreakPlayerDefense = true; npc.npcSlots = 5f; npc.GetNPCDamage(); - npc.width = 148; - npc.height = 98; + npc.width = 88; + npc.height = 88; npc.defense = 100; npc.DR_NERD(0.99f); npc.Calamity().unbreakableDR = true; @@ -323,25 +325,28 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.Calamity().unbreakableDR = !vulnerable; // Vent noise and steam + SmokeDrawer.ParticleSpawnRate = 9999999; if (vulnerable) { // Noise + float volume = calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge ? 0.25f : 1f; if (npc.localAI[0] == 0f) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThanatosVent"), npc.Center); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThanatosVent").WithVolume(volume), npc.Center); // Steam float maxSteamTime = 180f; - int maxGores = 4; + npc.localAI[0] += 1f; if (npc.localAI[0] < maxSteamTime) { - npc.localAI[0] += 1f; - int goreAmt = maxGores - (int)Math.Round(npc.localAI[0] / 60f); - CalamityUtils.ExplosionGores(npc.Center, goreAmt, true, npc.velocity); + SmokeDrawer.BaseMoveRotation = npc.rotation - MathHelper.PiOver2; + SmokeDrawer.ParticleSpawnRate = 3; } } else npc.localAI[0] = 0f; + SmokeDrawer.Update(); + Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); float num191 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2); float num192 = Main.player[npc.target].position.Y + (Main.player[npc.target].height / 2); @@ -413,22 +418,22 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos // Swap between venting and non-venting frames CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); bool shootTrackingLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage) && calamityGlobalNPC_Head.newAI[2] > 0f; + npc.frameCounter += 1D; if (shootTrackingLasers) { - npc.frameCounter += 1D; - if (npc.Calamity().newAI[1] == 0f) + if (npc.Calamity().newAI[1] == 0f && npc.Calamity().newAI[0] > 0f) { if (npc.frameCounter >= 12D) { npc.frame.Y += frameHeight; npc.frameCounter = 0D; } - if (npc.frame.Y >= frameHeight * Main.npcFrameCount[npc.type]) - npc.frame.Y = frameHeight * Main.npcFrameCount[npc.type]; + int finalFrame = Main.npcFrameCount[npc.type] - 1; + if (npc.frame.Y > frameHeight * finalFrame) + npc.frame.Y = frameHeight * finalFrame; } else { - npc.frameCounter += 1D; if (npc.frameCounter >= 12D) { npc.frame.Y -= frameHeight; @@ -440,7 +445,6 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } else { - npc.frameCounter += 1D; if (npc.frameCounter >= 12D) { npc.frame.Y -= frameHeight; @@ -451,7 +455,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } - public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (npc.spriteDirection == 1) @@ -462,11 +466,14 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos Vector2 center = npc.Center - Main.screenPosition; center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - center += vector * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + center += vector * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, center, npc.frame, npc.GetAlpha(drawColor), npc.rotation, vector, npc.scale, spriteEffects, 0f); texture = ModContent.GetTexture("CalamityMod/NPCs/ExoMechs/Thanatos/ThanatosBody1Glow"); spriteBatch.Draw(texture, center, npc.frame, Color.White * npc.Opacity, npc.rotation, vector, npc.scale, spriteEffects, 0f); + SmokeDrawer.DrawSet(npc.Center); + + return false; } public override bool CheckActive() => false; @@ -514,7 +521,6 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos int duration = vulnerable ? 120 : 60; player.AddBuff(BuffID.Ichor, duration); player.AddBuff(BuffID.CursedInferno, duration); - player.AddBuff(ModContent.BuffType(), duration / 4); player.AddBuff(ModContent.BuffType(), duration); player.AddBuff(ModContent.BuffType(), duration); player.AddBuff(ModContent.BuffType(), duration); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index fe0c033757..c4442892e4 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Events; +using CalamityMod.Particles; using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -17,6 +18,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos { // Whether the body is venting heat or not, it is vulnerable to damage during venting private bool vulnerable = false; + public ThanatosSmokeParticleSet SmokeDrawer = new ThanatosSmokeParticleSet(-1, 4, 0f, 16f, 1.5f); public override void SetStaticDefaults() { @@ -29,8 +31,8 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.Calamity().canBreakPlayerDefense = true; npc.npcSlots = 5f; npc.GetNPCDamage(); - npc.width = 136; - npc.height = 100; + npc.width = 90; + npc.height = 90; npc.defense = 100; npc.DR_NERD(0.99f); npc.Calamity().unbreakableDR = true; @@ -323,25 +325,28 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.Calamity().unbreakableDR = !vulnerable; // Vent noise and steam + SmokeDrawer.ParticleSpawnRate = 9999999; if (vulnerable) { // Noise + float volume = calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge ? 0.25f : 1f; if (npc.localAI[0] == 0f) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThanatosVent"), npc.Center); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThanatosVent").WithVolume(volume), npc.Center); // Steam float maxSteamTime = 180f; - int maxGores = 4; + npc.localAI[0] += 1f; if (npc.localAI[0] < maxSteamTime) { - npc.localAI[0] += 1f; - int goreAmt = maxGores - (int)Math.Round(npc.localAI[0] / 60f); - CalamityUtils.ExplosionGores(npc.Center, goreAmt, true, npc.velocity); + SmokeDrawer.BaseMoveRotation = npc.rotation - MathHelper.PiOver2; + SmokeDrawer.ParticleSpawnRate = 3; } } else npc.localAI[0] = 0f; + SmokeDrawer.Update(); + Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); float num191 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2); float num192 = Main.player[npc.target].position.Y + (Main.player[npc.target].height / 2); @@ -413,22 +418,22 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos // Swap between venting and non-venting frames CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); bool shootTrackingLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage) && calamityGlobalNPC_Head.newAI[2] > 0f; + npc.frameCounter += 1D; if (shootTrackingLasers) { - npc.frameCounter += 1D; - if (npc.Calamity().newAI[1] == 0f) + if (npc.Calamity().newAI[1] == 0f && npc.Calamity().newAI[0] > 0f) { if (npc.frameCounter >= 12D) { npc.frame.Y += frameHeight; npc.frameCounter = 0D; } - if (npc.frame.Y >= frameHeight * Main.npcFrameCount[npc.type]) - npc.frame.Y = frameHeight * Main.npcFrameCount[npc.type]; + int finalFrame = Main.npcFrameCount[npc.type] - 1; + if (npc.frame.Y > frameHeight * finalFrame) + npc.frame.Y = frameHeight * finalFrame; } else { - npc.frameCounter += 1D; if (npc.frameCounter >= 12D) { npc.frame.Y -= frameHeight; @@ -440,7 +445,6 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } else { - npc.frameCounter += 1D; if (npc.frameCounter >= 12D) { npc.frame.Y -= frameHeight; @@ -451,7 +455,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } - public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (npc.spriteDirection == 1) @@ -462,11 +466,14 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos Vector2 center = npc.Center - Main.screenPosition; center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - center += vector * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + center += vector * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, center, npc.frame, npc.GetAlpha(drawColor), npc.rotation, vector, npc.scale, spriteEffects, 0f); texture = ModContent.GetTexture("CalamityMod/NPCs/ExoMechs/Thanatos/ThanatosBody2Glow"); spriteBatch.Draw(texture, center, npc.frame, Color.White * npc.Opacity, npc.rotation, vector, npc.scale, spriteEffects, 0f); + SmokeDrawer.DrawSet(npc.Center); + + return false; } public override bool CheckActive() => false; @@ -514,7 +521,6 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos int duration = vulnerable ? 120 : 60; player.AddBuff(BuffID.Ichor, duration); player.AddBuff(BuffID.CursedInferno, duration); - player.AddBuff(ModContent.BuffType(), duration / 4); player.AddBuff(ModContent.BuffType(), duration); player.AddBuff(ModContent.BuffType(), duration); player.AddBuff(ModContent.BuffType(), duration); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs index 25ac275364..fc7a8922be 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -84,8 +84,8 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.Calamity().canBreakPlayerDefense = true; npc.npcSlots = 5f; npc.GetNPCDamage(); - npc.width = 104; - npc.height = 174; + npc.width = 164; + npc.height = 164; npc.defense = 80; npc.DR_NERD(0.99f); npc.Calamity().unbreakableDR = true; @@ -312,7 +312,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos // Phase gate values float velocityAdjustTime = 20f; - float speedUpTime = 300f; + float speedUpTime = 480f; float slowDownTime = 120f; float chargePhaseGateValue = speedUpTime + slowDownTime; @@ -353,18 +353,19 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos float laserBarrageLocationDistance = turnDistance * 5f; // Velocity and turn speed values - float baseVelocity = malice ? 12f : death ? 11f : revenge ? 10.5f : expertMode ? 10f : 9f; - float turnDegrees = malice ? 1.33f : death ? 1.22f : revenge ? 1.17f : expertMode ? 1.11f : 1f; + float baseVelocityMult = malice ? 1.3f : death ? 1.2f : revenge ? 1.15f : expertMode ? 1.1f : 1f; + float baseVelocity = 7f * baseVelocityMult; + float turnDegrees = baseVelocity * 0.11f; if (berserk) { baseVelocity *= 1.2f; turnDegrees *= 1.2f; } float turnSpeed = MathHelper.ToRadians(turnDegrees); - float chargeVelocityMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); - float chargeTurnSpeedMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); - float laserBarragePhaseVelocityMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); - float laserBarragePhaseTurnSpeedMult = MathHelper.Lerp(1f, 8f, chargeVelocityScalar); + float chargeVelocityMult = MathHelper.Lerp(1f, 1.5f, chargeVelocityScalar); + float chargeTurnSpeedMult = MathHelper.Lerp(1f, 1.5f, chargeVelocityScalar); + float laserBarragePhaseVelocityMult = MathHelper.Lerp(1f, 1.5f, chargeVelocityScalar); + float laserBarragePhaseTurnSpeedMult = MathHelper.Lerp(1f, 3f, chargeVelocityScalar); float deathrayVelocityMult = MathHelper.Lerp(1f, 4f, chargeVelocityScalar); float deathrayTurnSpeedMult = MathHelper.Lerp(1f, 4f, chargeVelocityScalar); @@ -372,6 +373,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos float chargeVelocityScalarIncrement = 1f / speedUpTime; float chargeVelocityScalarDecrement = 1f / slowDownTime; + // Scalar to use during deathray phase + float deathrayVelocityScalarIncrement = 1f / deathrayDuration; + // Scalar to use during laser barrage, passive and immune phases float laserBarrageVelocityScalarIncrement = 0.01f; float laserBarrageVelocityScalarDecrement = 1f / velocityAdjustTime; @@ -567,7 +571,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos // Use a lerp to smoothly scale up velocity and turn speed if (calamityGlobalNPC.newAI[3] == 0f) { - chargeVelocityScalar += chargeVelocityScalarIncrement; + chargeVelocityScalar += deathrayVelocityScalarIncrement; if (chargeVelocityScalar >= 1f) { chargeVelocityScalar = 1f; @@ -579,7 +583,8 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } else { - chargeVelocityScalar -= chargeVelocityScalarDecrement; + // Reduce velocity scalar very quickly + chargeVelocityScalar -= deathrayVelocityScalarIncrement * 5f; if (chargeVelocityScalar < 0f) chargeVelocityScalar = 0f; } @@ -665,10 +670,10 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos // Steam float maxSteamTime = 180f; int maxGores = 4; - if (npc.localAI[1] < maxSteamTime) + npc.localAI[0] += 1f; + if (npc.localAI[0] < maxSteamTime && npc.localAI[0] % 18f == 0f) { - npc.localAI[1] += 1f; - int goreAmt = maxGores - (int)Math.Round(npc.localAI[1] / 60f); + int goreAmt = maxGores - (int)Math.Round(npc.localAI[0] / 60f); CalamityUtils.ExplosionGores(npc.Center, goreAmt, true, npc.velocity); } } @@ -732,9 +737,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos public override void FindFrame(int frameHeight) // 5 total frames { // Swap between venting and non-venting frames + npc.frameCounter += 1D; if (AIState == (float)Phase.Charge || AIState == (float)Phase.UndergroundLaserBarrage) { - npc.frameCounter += 1D; if (npc.frameCounter >= 12D) { npc.frame.Y -= frameHeight; @@ -745,14 +750,14 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } else { - npc.frameCounter += 1D; if (npc.frameCounter >= 12D) { npc.frame.Y += frameHeight; npc.frameCounter = 0D; } - if (npc.frame.Y >= frameHeight * Main.npcFrameCount[npc.type]) - npc.frame.Y = frameHeight * Main.npcFrameCount[npc.type]; + int finalFrame = Main.npcFrameCount[npc.type] - 1; + if (npc.frame.Y >= frameHeight * finalFrame) + npc.frame.Y = frameHeight * finalFrame; } } @@ -767,7 +772,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos Vector2 center = npc.Center - Main.screenPosition; center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - center += vector * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + center += vector * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, center, npc.frame, npc.GetAlpha(drawColor), npc.rotation, vector, npc.scale, spriteEffects, 0f); texture = ModContent.GetTexture("CalamityMod/NPCs/ExoMechs/Thanatos/ThanatosHeadGlow"); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 5c195cc6f9..b8752759b3 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -29,8 +29,8 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.Calamity().canBreakPlayerDefense = true; npc.npcSlots = 5f; npc.GetNPCDamage(); - npc.width = 84; - npc.height = 118; + npc.width = 76; + npc.height = 110; npc.defense = 120; npc.DR_NERD(0.99f); npc.Calamity().unbreakableDR = true; @@ -326,15 +326,16 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (vulnerable) { // Noise + float volume = calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge ? 0.25f : 1f; if (npc.localAI[0] == 0f) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThanatosVent"), npc.Center); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThanatosVent").WithVolume(volume), npc.Center); // Steam float maxSteamTime = 180f; int maxGores = 4; - if (npc.localAI[0] < maxSteamTime) + npc.localAI[0] += 1f; + if (npc.localAI[0] < maxSteamTime && npc.localAI[0] % 18f == 0f) { - npc.localAI[0] += 1f; int goreAmt = maxGores - (int)Math.Round(npc.localAI[0] / 60f); CalamityUtils.ExplosionGores(npc.Center, goreAmt, true, npc.velocity); } @@ -413,22 +414,22 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos // Swap between venting and non-venting frames CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); bool shootTrackingLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage) && calamityGlobalNPC_Head.newAI[2] > 0f; + npc.frameCounter += 1D; if (shootTrackingLasers) { - npc.frameCounter += 1D; - if (npc.Calamity().newAI[1] == 0f) + if (npc.Calamity().newAI[1] == 0f && npc.Calamity().newAI[0] > 0f) { if (npc.frameCounter >= 12D) { npc.frame.Y += frameHeight; npc.frameCounter = 0D; } - if (npc.frame.Y >= frameHeight * Main.npcFrameCount[npc.type]) - npc.frame.Y = frameHeight * Main.npcFrameCount[npc.type]; + int finalFrame = Main.npcFrameCount[npc.type] - 1; + if (npc.frame.Y > frameHeight * finalFrame) + npc.frame.Y = frameHeight * finalFrame; } else { - npc.frameCounter += 1D; if (npc.frameCounter >= 12D) { npc.frame.Y -= frameHeight; @@ -440,7 +441,6 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } else { - npc.frameCounter += 1D; if (npc.frameCounter >= 12D) { npc.frame.Y -= frameHeight; @@ -451,7 +451,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } - public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (npc.spriteDirection == 1) @@ -462,11 +462,13 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos Vector2 center = npc.Center - Main.screenPosition; center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - center += vector * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + center += vector * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, center, npc.frame, npc.GetAlpha(drawColor), npc.rotation, vector, npc.scale, spriteEffects, 0f); texture = ModContent.GetTexture("CalamityMod/NPCs/ExoMechs/Thanatos/ThanatosTailGlow"); spriteBatch.Draw(texture, center, npc.frame, Color.White * npc.Opacity, npc.rotation, vector, npc.scale, spriteEffects, 0f); + + return false; } public override bool CheckActive() => false; @@ -515,7 +517,6 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos int duration = vulnerable ? 60 : 30; player.AddBuff(BuffID.Ichor, duration); player.AddBuff(BuffID.CursedInferno, duration); - player.AddBuff(ModContent.BuffType(), duration / 4); player.AddBuff(ModContent.BuffType(), duration); player.AddBuff(ModContent.BuffType(), duration); player.AddBuff(ModContent.BuffType(), duration); diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index ac1f344a3f..19ffe9175f 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -1,4 +1,6 @@ -using CalamityMod.Events; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Events; using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; @@ -169,7 +171,21 @@ namespace CalamityMod.NPCs.Leviathan npc.dontTakeDamage = spawnAnimation; - if (!player.active || player.dead || Vector2.Distance(player.Center, vector) > 5600f) + // Adjust slowing debuff immunity + bool immuneToSlowingDebuffs = npc.ai[0] == 2f; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; + npc.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; + + if (!player.active || player.dead || Vector2.Distance(player.Center, vector) > 5600f) { npc.TargetClosest(false); player = Main.player[npc.target]; diff --git a/NPCs/Leviathan/LeviathanStart.cs b/NPCs/Leviathan/LeviathanStart.cs index 7ff862c89c..c0bc063028 100644 --- a/NPCs/Leviathan/LeviathanStart.cs +++ b/NPCs/Leviathan/LeviathanStart.cs @@ -92,7 +92,7 @@ namespace CalamityMod.NPCs.Leviathan Vector2 drawPos = npc.Center - Main.screenPosition; drawPos -= new Vector2(drawTex.Width, drawTex.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - drawPos += origin * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + drawPos += origin * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(drawTex, drawPos, npc.frame, npc.GetAlpha(lightColor), npc.rotation, origin, npc.scale, spriteEffects, 0f); drawTex = ModContent.GetTexture("CalamityMod/NPCs/Leviathan/LeviathanStartGlow"); diff --git a/NPCs/NormalNPCs/PlagueBee.cs b/NPCs/NormalNPCs/PlagueBee.cs index 3856a5a576..1b0f611b1a 100644 --- a/NPCs/NormalNPCs/PlagueBee.cs +++ b/NPCs/NormalNPCs/PlagueBee.cs @@ -62,14 +62,14 @@ namespace CalamityMod.NPCs.NormalNPCs color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/NormalNPCs/PlagueBeeGlow"); @@ -84,7 +84,7 @@ namespace CalamityMod.NPCs.NormalNPCs color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/NormalNPCs/PlagueBeeLarge.cs b/NPCs/NormalNPCs/PlagueBeeLarge.cs index 4fb181ef52..9c52f04569 100644 --- a/NPCs/NormalNPCs/PlagueBeeLarge.cs +++ b/NPCs/NormalNPCs/PlagueBeeLarge.cs @@ -61,14 +61,14 @@ namespace CalamityMod.NPCs.NormalNPCs color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/NormalNPCs/PlagueBeeGlow"); @@ -83,7 +83,7 @@ namespace CalamityMod.NPCs.NormalNPCs color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index f64d4e9fb2..18fc5484d2 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -232,7 +232,7 @@ namespace CalamityMod.NPCs.OldDuke color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } @@ -285,7 +285,7 @@ namespace CalamityMod.NPCs.OldDuke color39 *= 1f - num157; Vector2 vector42 = npc.Center + (num160 / (float)num156 * MathHelper.TwoPi + npc.rotation).ToRotationVector2() * scaleFactor9 * num157 - Main.screenPosition; vector42 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector42 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector42 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector42, npc.frame, color39, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } @@ -295,7 +295,7 @@ namespace CalamityMod.NPCs.OldDuke color2 = npc.GetAlpha(color2); Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, (npc.ai[0] > 9f ? color2 : npc.GetAlpha(lightColor)), npc.rotation, vector11, npc.scale, spriteEffects, 0f); if (npc.ai[0] >= 4f && npc.Calamity().newAI[1] != 1f) @@ -340,7 +340,7 @@ namespace CalamityMod.NPCs.OldDuke color41 *= (num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } @@ -352,7 +352,7 @@ namespace CalamityMod.NPCs.OldDuke color42 *= 1f - num157; Vector2 vector45 = npc.Center + (num164 / (float)num156 * MathHelper.TwoPi + npc.rotation).ToRotationVector2() * scaleFactor9 * num157 - Main.screenPosition; vector45 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector45 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector45 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector45, npc.frame, color42, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/OldDuke/OldDukeSharkron.cs b/NPCs/OldDuke/OldDukeSharkron.cs index 48dd29b190..12988856b5 100644 --- a/NPCs/OldDuke/OldDukeSharkron.cs +++ b/NPCs/OldDuke/OldDukeSharkron.cs @@ -183,14 +183,14 @@ namespace CalamityMod.NPCs.OldDuke color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); return false; diff --git a/NPCs/Perforator/PerforatorBodyLarge.cs b/NPCs/Perforator/PerforatorBodyLarge.cs index c4c1ba793d..4d31e22e11 100644 --- a/NPCs/Perforator/PerforatorBodyLarge.cs +++ b/NPCs/Perforator/PerforatorBodyLarge.cs @@ -92,7 +92,7 @@ namespace CalamityMod.NPCs.Perforator Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = npc.localAI[3] == 1f ? ModContent.GetTexture("CalamityMod/NPCs/Perforator/PerforatorBodyLargeAltGlow") : ModContent.GetTexture("CalamityMod/NPCs/Perforator/PerforatorBodyLargeGlow"); diff --git a/NPCs/Perforator/PerforatorBodyMedium.cs b/NPCs/Perforator/PerforatorBodyMedium.cs index e30a2177d4..d581177a2d 100644 --- a/NPCs/Perforator/PerforatorBodyMedium.cs +++ b/NPCs/Perforator/PerforatorBodyMedium.cs @@ -171,7 +171,7 @@ namespace CalamityMod.NPCs.Perforator Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Perforator/PerforatorBodyMediumGlow"); diff --git a/NPCs/Perforator/PerforatorBodySmall.cs b/NPCs/Perforator/PerforatorBodySmall.cs index b38d262a4d..6bb0b5b173 100644 --- a/NPCs/Perforator/PerforatorBodySmall.cs +++ b/NPCs/Perforator/PerforatorBodySmall.cs @@ -92,7 +92,7 @@ namespace CalamityMod.NPCs.Perforator Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Perforator/PerforatorBodySmallGlow"); diff --git a/NPCs/Perforator/PerforatorCyst.cs b/NPCs/Perforator/PerforatorCyst.cs index 36052600a3..a39976d752 100644 --- a/NPCs/Perforator/PerforatorCyst.cs +++ b/NPCs/Perforator/PerforatorCyst.cs @@ -50,7 +50,7 @@ namespace CalamityMod.NPCs.Perforator Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Perforator/PerforatorCystGlow"); diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index d346c16b8c..f99789bd6f 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -502,7 +502,7 @@ namespace CalamityMod.NPCs.Perforator Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Perforator/PerforatorHeadLargeGlow"); diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index 889b259962..74a3e72e3a 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -383,7 +383,7 @@ namespace CalamityMod.NPCs.Perforator Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Perforator/PerforatorHeadMediumGlow"); diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index c7e1737b49..9b8705e5c8 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -437,7 +437,7 @@ namespace CalamityMod.NPCs.Perforator Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Perforator/PerforatorHeadSmallGlow"); diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 23b73d341a..ba94da2886 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -413,7 +413,7 @@ namespace CalamityMod.NPCs.Perforator Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Perforator/PerforatorHiveGlow"); diff --git a/NPCs/Perforator/PerforatorTailLarge.cs b/NPCs/Perforator/PerforatorTailLarge.cs index 57d0f734ea..6b15f31b17 100644 --- a/NPCs/Perforator/PerforatorTailLarge.cs +++ b/NPCs/Perforator/PerforatorTailLarge.cs @@ -81,7 +81,7 @@ namespace CalamityMod.NPCs.Perforator Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Perforator/PerforatorTailLargeGlow"); diff --git a/NPCs/Perforator/PerforatorTailMedium.cs b/NPCs/Perforator/PerforatorTailMedium.cs index 244853f4b2..28b35c0ac9 100644 --- a/NPCs/Perforator/PerforatorTailMedium.cs +++ b/NPCs/Perforator/PerforatorTailMedium.cs @@ -138,7 +138,7 @@ namespace CalamityMod.NPCs.Perforator Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Perforator/PerforatorTailMediumGlow"); diff --git a/NPCs/Perforator/PerforatorTailSmall.cs b/NPCs/Perforator/PerforatorTailSmall.cs index 87edea613e..354aa2f694 100644 --- a/NPCs/Perforator/PerforatorTailSmall.cs +++ b/NPCs/Perforator/PerforatorTailSmall.cs @@ -82,7 +82,7 @@ namespace CalamityMod.NPCs.Perforator Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Perforator/PerforatorTailSmallGlow"); diff --git a/NPCs/PlaguebringerGoliath/PlagueBeeG.cs b/NPCs/PlaguebringerGoliath/PlagueBeeG.cs index faab243375..26ea15450a 100644 --- a/NPCs/PlaguebringerGoliath/PlagueBeeG.cs +++ b/NPCs/PlaguebringerGoliath/PlagueBeeG.cs @@ -219,14 +219,14 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/NormalNPCs/PlagueBeeGlow"); @@ -241,7 +241,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/PlaguebringerGoliath/PlagueBeeLargeG.cs b/NPCs/PlaguebringerGoliath/PlagueBeeLargeG.cs index 81ae75a984..9e71e33082 100644 --- a/NPCs/PlaguebringerGoliath/PlagueBeeLargeG.cs +++ b/NPCs/PlaguebringerGoliath/PlagueBeeLargeG.cs @@ -112,14 +112,14 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/NormalNPCs/PlagueBeeGlow"); @@ -134,7 +134,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs index a4e3bd7450..6e5178b3a5 100644 --- a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs +++ b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs @@ -151,14 +151,14 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/PlaguebringerGoliath/PlagueHomingMissileGlow"); @@ -173,7 +173,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/PlaguebringerGoliath/PlagueMine.cs b/NPCs/PlaguebringerGoliath/PlagueMine.cs index ea383d9e3a..12ce326a39 100644 --- a/NPCs/PlaguebringerGoliath/PlagueMine.cs +++ b/NPCs/PlaguebringerGoliath/PlagueMine.cs @@ -143,7 +143,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 7b4e654352..3ae0ed95eb 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -127,8 +127,22 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath bool revenge = CalamityWorld.revenge || malice; bool expertMode = Main.expertMode || malice; - // Light - Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0.3f, 0.7f, 0f); + // Adjust slowing debuff immunity + bool immuneToSlowingDebuffs = npc.ai[0] == 0f || npc.ai[0] == 4f; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + npc.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; + npc.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; + + // Light + Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0.3f, 0.7f, 0f); // Show message if (!halfLife && phase3 && expertMode) diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs b/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs index 1eed0ee6a4..2ada7a26c3 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs @@ -565,14 +565,14 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); return false; diff --git a/NPCs/Polterghast/PhantomFuckYou.cs b/NPCs/Polterghast/PhantomFuckYou.cs index e1f431f5ee..9015c5b4dd 100644 --- a/NPCs/Polterghast/PhantomFuckYou.cs +++ b/NPCs/Polterghast/PhantomFuckYou.cs @@ -144,14 +144,14 @@ namespace CalamityMod.NPCs.Polterghast color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); return false; diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index 5cd1258aa3..c4f8ab0315 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -418,7 +418,7 @@ namespace CalamityMod.NPCs.Polterghast color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } @@ -430,7 +430,7 @@ namespace CalamityMod.NPCs.Polterghast Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, color, npc.rotation, vector11, npc.scale, spriteEffects, 0f); Texture2D texture2D16 = ModContent.GetTexture("CalamityMod/NPCs/Polterghast/PolterPhantomGlow"); @@ -442,7 +442,7 @@ namespace CalamityMod.NPCs.Polterghast { Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); Color color43 = color42; color43 = Color.Lerp(color43, color36, amount9); color43 = npc.GetAlpha(color43); diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 91afd6a9b0..07781cbfa9 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -1019,14 +1019,14 @@ namespace CalamityMod.NPCs.Polterghast color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Polterghast/PolterghastGlow"); @@ -1048,7 +1048,7 @@ namespace CalamityMod.NPCs.Polterghast color41 *= (num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); Color color43 = color42; diff --git a/NPCs/Polterghast/PolterghastHook.cs b/NPCs/Polterghast/PolterghastHook.cs index 32ba38daa4..4acb4bfdac 100644 --- a/NPCs/Polterghast/PolterghastHook.cs +++ b/NPCs/Polterghast/PolterghastHook.cs @@ -356,14 +356,14 @@ namespace CalamityMod.NPCs.Polterghast color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Polterghast/PolterghastHookGlow"); @@ -382,7 +382,7 @@ namespace CalamityMod.NPCs.Polterghast color41 *= (num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs index 69783fe160..671c920b85 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs @@ -385,14 +385,14 @@ namespace CalamityMod.NPCs.ProfanedGuardians color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianBossGlow"); @@ -408,7 +408,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians color41 *= (num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs index 196eae8887..5beea4876f 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs @@ -232,14 +232,14 @@ namespace CalamityMod.NPCs.ProfanedGuardians color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianBoss2Glow"); @@ -255,7 +255,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians color41 *= (num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs index 772cc7d613..8f0f4d1d9b 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs @@ -231,14 +231,14 @@ namespace CalamityMod.NPCs.ProfanedGuardians color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianBoss3Glow"); @@ -255,7 +255,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians color41 *= (num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); Color color43 = color42; diff --git a/NPCs/Providence/ProvSpawnDefense.cs b/NPCs/Providence/ProvSpawnDefense.cs index 1bb61cae78..2e44c17f11 100644 --- a/NPCs/Providence/ProvSpawnDefense.cs +++ b/NPCs/Providence/ProvSpawnDefense.cs @@ -147,14 +147,14 @@ namespace CalamityMod.NPCs.Providence color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianBoss2Glow"); @@ -170,7 +170,7 @@ namespace CalamityMod.NPCs.Providence color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/Providence/ProvSpawnHealer.cs b/NPCs/Providence/ProvSpawnHealer.cs index 411f7d0e2f..059aa6a8af 100644 --- a/NPCs/Providence/ProvSpawnHealer.cs +++ b/NPCs/Providence/ProvSpawnHealer.cs @@ -134,14 +134,14 @@ namespace CalamityMod.NPCs.Providence color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianBoss3Glow"); @@ -158,7 +158,7 @@ namespace CalamityMod.NPCs.Providence color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); Color color43 = color42; diff --git a/NPCs/Providence/ProvSpawnOffense.cs b/NPCs/Providence/ProvSpawnOffense.cs index 73c8e224e0..557065ce86 100644 --- a/NPCs/Providence/ProvSpawnOffense.cs +++ b/NPCs/Providence/ProvSpawnOffense.cs @@ -224,14 +224,14 @@ namespace CalamityMod.NPCs.Providence color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianBossGlow"); @@ -247,7 +247,7 @@ namespace CalamityMod.NPCs.Providence color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 25cf8a729f..996af43130 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -1490,14 +1490,14 @@ namespace CalamityMod.NPCs.Providence color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); Color color37 = Color.Lerp(Color.White, nightTime ? Color.Cyan : Color.Yellow, 0.5f) * npc.Opacity; @@ -1513,7 +1513,7 @@ namespace CalamityMod.NPCs.Providence color41 *= (num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2(textureGlow.Width, textureGlow.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(textureGlow, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); Color color43 = color42; diff --git a/NPCs/Ravager/FlamePillar.cs b/NPCs/Ravager/FlamePillar.cs index 1716588517..5f1d4159f3 100644 --- a/NPCs/Ravager/FlamePillar.cs +++ b/NPCs/Ravager/FlamePillar.cs @@ -139,7 +139,7 @@ namespace CalamityMod.NPCs.Ravager Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index a37ea32161..b2fd9a1f86 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -636,7 +636,7 @@ namespace CalamityMod.NPCs.Ravager Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2); Vector2 vector = center - Main.screenPosition; vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/Ravager/RavagerBodyGlow").Width, ModContent.GetTexture("CalamityMod/NPCs/Ravager/RavagerBodyGlow").Height / Main.npcFrameCount[npc.type]) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.Blue); spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Ravager/RavagerBodyGlow"), vector, npc.frame, color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/Signus/CosmicLantern.cs b/NPCs/Signus/CosmicLantern.cs index 7c8ca41672..b0206589a0 100644 --- a/NPCs/Signus/CosmicLantern.cs +++ b/NPCs/Signus/CosmicLantern.cs @@ -105,14 +105,14 @@ namespace CalamityMod.NPCs.Signus color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Signus/CosmicLanternGlow"); @@ -128,7 +128,7 @@ namespace CalamityMod.NPCs.Signus color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/Signus/SignusBomb.cs b/NPCs/Signus/SignusBomb.cs index 49bf6e8a3e..fcb17a0a24 100644 --- a/NPCs/Signus/SignusBomb.cs +++ b/NPCs/Signus/SignusBomb.cs @@ -183,14 +183,14 @@ namespace CalamityMod.NPCs.Signus color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); return false; diff --git a/NPCs/StormWeaver/StormWeaverBodyNaked.cs b/NPCs/StormWeaver/StormWeaverBodyNaked.cs index 8e8733d12b..61728c5214 100644 --- a/NPCs/StormWeaver/StormWeaverBodyNaked.cs +++ b/NPCs/StormWeaver/StormWeaverBodyNaked.cs @@ -195,14 +195,14 @@ namespace CalamityMod.NPCs.StormWeaver color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); Color color = npc.GetAlpha(lightColor); if (Main.npc[(int)npc.ai[2]].Calamity().newAI[0] > 280f && (CalamityWorld.revenge || BossRushEvent.BossRushActive || CalamityWorld.malice)) diff --git a/NPCs/StormWeaver/StormWeaverHeadNaked.cs b/NPCs/StormWeaver/StormWeaverHeadNaked.cs index c256241bd9..de834511bd 100644 --- a/NPCs/StormWeaver/StormWeaverHeadNaked.cs +++ b/NPCs/StormWeaver/StormWeaverHeadNaked.cs @@ -580,14 +580,14 @@ namespace CalamityMod.NPCs.StormWeaver color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); Color color = npc.GetAlpha(lightColor); if (npc.Calamity().newAI[0] > 280f && (CalamityWorld.revenge || BossRushEvent.BossRushActive || CalamityWorld.malice)) diff --git a/NPCs/StormWeaver/StormWeaverTail.cs b/NPCs/StormWeaver/StormWeaverTail.cs index d12af0f5b2..467d5c8dfe 100644 --- a/NPCs/StormWeaver/StormWeaverTail.cs +++ b/NPCs/StormWeaver/StormWeaverTail.cs @@ -213,7 +213,7 @@ namespace CalamityMod.NPCs.StormWeaver Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/StormWeaver/StormWeaverTailGlow"); diff --git a/NPCs/StormWeaver/StormWeaverTailNaked.cs b/NPCs/StormWeaver/StormWeaverTailNaked.cs index d1de56d76c..cb35add269 100644 --- a/NPCs/StormWeaver/StormWeaverTailNaked.cs +++ b/NPCs/StormWeaver/StormWeaverTailNaked.cs @@ -195,14 +195,14 @@ namespace CalamityMod.NPCs.StormWeaver color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); Color color = npc.GetAlpha(lightColor); if (Main.npc[(int)npc.ai[2]].Calamity().newAI[0] > 280f && (CalamityWorld.revenge || BossRushEvent.BossRushActive || CalamityWorld.malice)) diff --git a/NPCs/SunkenSea/BlindedAngler.cs b/NPCs/SunkenSea/BlindedAngler.cs index 9a68f4b1e5..96b1ba525c 100644 --- a/NPCs/SunkenSea/BlindedAngler.cs +++ b/NPCs/SunkenSea/BlindedAngler.cs @@ -72,7 +72,7 @@ namespace CalamityMod.NPCs.SunkenSea Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/SunkenSea/BlindedAnglerGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/SunkenSea/BlindedAnglerGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.GetTexture("CalamityMod/NPCs/SunkenSea/BlindedAnglerGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/SunkenSea/EutrophicRay.cs b/NPCs/SunkenSea/EutrophicRay.cs index a5e9279d71..3de601059d 100644 --- a/NPCs/SunkenSea/EutrophicRay.cs +++ b/NPCs/SunkenSea/EutrophicRay.cs @@ -169,7 +169,7 @@ namespace CalamityMod.NPCs.SunkenSea Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/SunkenSea/EutrophicRayGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/SunkenSea/EutrophicRayGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.GetTexture("CalamityMod/NPCs/SunkenSea/EutrophicRayGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/SunkenSea/GhostBell.cs b/NPCs/SunkenSea/GhostBell.cs index 7374f4500c..249847c733 100644 --- a/NPCs/SunkenSea/GhostBell.cs +++ b/NPCs/SunkenSea/GhostBell.cs @@ -126,7 +126,7 @@ namespace CalamityMod.NPCs.SunkenSea Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/SunkenSea/GhostBellGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/SunkenSea/GhostBellGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.GetTexture("CalamityMod/NPCs/SunkenSea/GhostBellGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/SunkenSea/GhostBellSmall.cs b/NPCs/SunkenSea/GhostBellSmall.cs index 45cd962756..45bc1f1ada 100644 --- a/NPCs/SunkenSea/GhostBellSmall.cs +++ b/NPCs/SunkenSea/GhostBellSmall.cs @@ -132,7 +132,7 @@ namespace CalamityMod.NPCs.SunkenSea Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/SunkenSea/GhostBellSmallGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/SunkenSea/GhostBellSmallGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.GetTexture("CalamityMod/NPCs/SunkenSea/GhostBellSmallGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/SunkenSea/GiantClam.cs b/NPCs/SunkenSea/GiantClam.cs index e5cdc81ffe..02728272db 100644 --- a/NPCs/SunkenSea/GiantClam.cs +++ b/NPCs/SunkenSea/GiantClam.cs @@ -393,7 +393,7 @@ namespace CalamityMod.NPCs.SunkenSea Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/SunkenSea/GiantClamGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/SunkenSea/GiantClamGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.GetTexture("CalamityMod/NPCs/SunkenSea/GiantClamGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/SunkenSea/PrismTurtle.cs b/NPCs/SunkenSea/PrismTurtle.cs index 3cb89292a7..a76e13742d 100644 --- a/NPCs/SunkenSea/PrismTurtle.cs +++ b/NPCs/SunkenSea/PrismTurtle.cs @@ -110,7 +110,7 @@ namespace CalamityMod.NPCs.SunkenSea Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/NPCs/SunkenSea/PrismTurtleGlow").Width, (float)(ModContent.GetTexture("CalamityMod/NPCs/SunkenSea/PrismTurtleGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + 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.Blue); Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/SunkenSea/PrismTurtleGlow"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); diff --git a/NPCs/SupremeCalamitas/SCalWormBody.cs b/NPCs/SupremeCalamitas/SCalWormBody.cs index 086b3c147d..a6265bf8d7 100644 --- a/NPCs/SupremeCalamitas/SCalWormBody.cs +++ b/NPCs/SupremeCalamitas/SCalWormBody.cs @@ -179,7 +179,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); if (npc.localAI[3] == 1f) diff --git a/NPCs/SupremeCalamitas/SCalWormHead.cs b/NPCs/SupremeCalamitas/SCalWormHead.cs index 45806567e3..bf98c7ff11 100644 --- a/NPCs/SupremeCalamitas/SCalWormHead.cs +++ b/NPCs/SupremeCalamitas/SCalWormHead.cs @@ -301,7 +301,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/SupremeCalamitas/SCalWormHeadGlow"); diff --git a/NPCs/SupremeCalamitas/SCalWormTail.cs b/NPCs/SupremeCalamitas/SCalWormTail.cs index de21c5caee..3fb861c106 100644 --- a/NPCs/SupremeCalamitas/SCalWormTail.cs +++ b/NPCs/SupremeCalamitas/SCalWormTail.cs @@ -161,7 +161,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/SupremeCalamitas/SCalWormTailGlow"); diff --git a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs index 3be7354009..894bb0b395 100644 --- a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs +++ b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs @@ -192,14 +192,14 @@ namespace CalamityMod.NPCs.SupremeCalamitas color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/SupremeCalamitas/SoulSeekerSupremeGlow"); @@ -214,7 +214,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 62abf5c11a..b4a236dd09 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -2874,7 +2874,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture2D15.Width / 2f, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } @@ -2882,7 +2882,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas bool inPhase2 = npc.ai[0] >= 3f && npc.life > npc.lifeMax * 0.01; Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width / 2f, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); if (inPhase2) { diff --git a/NPCs/SupremeCalamitas/SupremeCataclysm.cs b/NPCs/SupremeCalamitas/SupremeCataclysm.cs index 1b7d98e028..d9a3d44f1b 100644 --- a/NPCs/SupremeCalamitas/SupremeCataclysm.cs +++ b/NPCs/SupremeCalamitas/SupremeCataclysm.cs @@ -231,14 +231,14 @@ namespace CalamityMod.NPCs.SupremeCalamitas color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/SupremeCalamitas/SupremeCataclysmGlow"); @@ -253,7 +253,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs index cc53500596..238c64950e 100644 --- a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs +++ b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs @@ -231,14 +231,14 @@ namespace CalamityMod.NPCs.SupremeCalamitas color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/SupremeCalamitas/SupremeCatastropheGlow"); @@ -253,7 +253,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } diff --git a/NPCs/Yharon/DetonatingFlare.cs b/NPCs/Yharon/DetonatingFlare.cs index 0d3cdb7b7c..3106e6a234 100644 --- a/NPCs/Yharon/DetonatingFlare.cs +++ b/NPCs/Yharon/DetonatingFlare.cs @@ -263,14 +263,14 @@ namespace CalamityMod.NPCs.Yharon color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); return false; diff --git a/NPCs/Yharon/DetonatingFlare2.cs b/NPCs/Yharon/DetonatingFlare2.cs index 7c2e284572..6af9c4baf2 100644 --- a/NPCs/Yharon/DetonatingFlare2.cs +++ b/NPCs/Yharon/DetonatingFlare2.cs @@ -95,14 +95,14 @@ namespace CalamityMod.NPCs.Yharon color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, SpriteEffects.None, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, SpriteEffects.None, 0f); return false; diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index f796b9c74a..15ed5177a4 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -2674,7 +2674,7 @@ namespace CalamityMod.NPCs.Yharon color38 *= (num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector41 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } @@ -2725,14 +2725,14 @@ namespace CalamityMod.NPCs.Yharon color39 *= 1f - num157; Vector2 vector42 = npc.Center + (num160 / (float)num156 * MathHelper.TwoPi + npc.rotation).ToRotationVector2() * scaleFactor9 * num157 - Main.screenPosition; vector42 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector42 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector42 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, vector42, npc.frame, color39, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, vector43, npc.frame, invincible ? invincibleColor : npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); if (flag8 || npc.ai[0] == 4f || startSecondAI) @@ -2801,7 +2801,7 @@ namespace CalamityMod.NPCs.Yharon color41 *= (num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; vector44 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); if (flag9 || npc.ai[0] == 10f || startSecondAI) @@ -2829,7 +2829,7 @@ namespace CalamityMod.NPCs.Yharon color42 *= 1f - num157; Vector2 vector45 = npc.Center + (num164 / (float)num156 * MathHelper.TwoPi + npc.rotation).ToRotationVector2() * scaleFactor9 * num157 - Main.screenPosition; vector45 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector45 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + vector45 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); spriteBatch.Draw(texture, vector45, npc.frame, color42, npc.rotation, vector11, npc.scale, spriteEffects, 0f); if (flag9 || npc.ai[0] == 10f || startSecondAI) diff --git a/Particles/BaseParticleSet.cs b/Particles/BaseParticleSet.cs new file mode 100644 index 0000000000..8490181b26 --- /dev/null +++ b/Particles/BaseParticleSet.cs @@ -0,0 +1,77 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria; +using Terraria.ID; + +namespace CalamityMod.Particles +{ + public abstract class BaseParticleSet + { + public int LocalTimer { get; internal set; } + public int SetLifetime { get; internal set; } + public int ParticleSpawnRate; + public List Particles = new List(); + public abstract int ParticleLifetime { get; } + public abstract void UpdateBehavior(Particle particle); + public abstract Particle SpawnParticle(); + public abstract Color DetermineParticleColor(float lifetimeCompletion); + public abstract Texture2D ParticleTexture { get; } + public virtual int ParticleFrameVariants => 1; + public virtual Func OrderFunction { get; } = null; + + public BaseParticleSet(int setLifetime, int particleSpawnRate) + { + SetLifetime = setLifetime; + ParticleSpawnRate = particleSpawnRate; + } + + public virtual void Update() + { + // Don't perform any operations on the server. Doing so would be a waste of space as these sets are entirely based on drawcode. + if (Main.netMode == NetmodeID.Server) + return; + + bool closeToDeath = LocalTimer >= SetLifetime - ParticleLifetime && SetLifetime > 0; + if (LocalTimer % ParticleSpawnRate == 0 && !closeToDeath) + { + Particle particle = SpawnParticle(); + particle.Lifetime = ParticleLifetime; + particle.Variant = Main.rand.Next(ParticleFrameVariants); + Particles.Add(particle); + } + + // Update and increment the time of all particles. + for (int i = 0; i < Particles.Count; i++) + { + Particles[i].Time++; + UpdateBehavior(Particles[i]); + } + + // Clear all expired particles. + Particles.RemoveAll(particle => particle.Time >= particle.Lifetime); + LocalTimer++; + } + + public virtual void DrawSet(Vector2 basePosition) + { + if (Main.netMode == NetmodeID.Server) + return; + + IEnumerable orderedParticles = Particles; + if (OrderFunction != null) + orderedParticles = orderedParticles.OrderBy(OrderFunction); + + foreach (Particle particle in Particles.OrderBy(p => p.Time)) + { + Vector2 drawPosition = basePosition - Main.screenPosition + particle.RelativeOffset; + Color particleColor = DetermineParticleColor(particle.Time / (float)particle.Lifetime); + Rectangle frame = ParticleTexture.Frame(1, ParticleFrameVariants, 0, particle.Variant); + + Main.spriteBatch.Draw(ParticleTexture, drawPosition, frame, particleColor, 0f, frame.Size() * 0.5f, particle.Scale, SpriteEffects.None, 0f); + } + } + } +} \ No newline at end of file diff --git a/Particles/Particle.cs b/Particles/Particle.cs new file mode 100644 index 0000000000..cf3bac931f --- /dev/null +++ b/Particles/Particle.cs @@ -0,0 +1,21 @@ +using Microsoft.Xna.Framework; + +namespace CalamityMod.Particles +{ + public class Particle + { + public int Time; + public int Lifetime; + public int Variant; + public float Scale; + public Vector2 RelativeOffset; + public Particle(int lifetime, Vector2 relativeOffset, float scale, int variant = 0) + { + Time = 0; + Lifetime = lifetime; + Variant = variant; + Scale = scale; + RelativeOffset = relativeOffset; + } + } +} \ No newline at end of file diff --git a/Particles/ThanatosSmokeParticleSet.cs b/Particles/ThanatosSmokeParticleSet.cs new file mode 100644 index 0000000000..dba17d45f6 --- /dev/null +++ b/Particles/ThanatosSmokeParticleSet.cs @@ -0,0 +1,36 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class ThanatosSmokeParticleSet : BaseParticleSet + { + public float SpawnAreaCompactness; + public float RelativePower; + public float BaseMoveRotation; + public float MoveRotationOffset; + public override int ParticleLifetime => 50; + public override int ParticleFrameVariants => 3; + public override Texture2D ParticleTexture => ModContent.GetTexture("CalamityMod/ExtraTextures/ThanatosVentParticle"); + public ThanatosSmokeParticleSet(int setLifetime, int particleSpawnRate, float baseMoveRotation, float spawnAreaCompactness, float relativePower) : + base(setLifetime, particleSpawnRate) + { + MoveRotationOffset = Main.rand.NextFloat(-0.36f, 0.36f); + BaseMoveRotation = baseMoveRotation; + SpawnAreaCompactness = spawnAreaCompactness; + RelativePower = relativePower; + } + + public override void UpdateBehavior(Particle particle) + { + particle.Scale += RelativePower * 0.02f; + particle.RelativeOffset -= (BaseMoveRotation + Main.rand.NextFloat(-0.38f, 0.38f)).ToRotationVector2() * RelativePower * 4.5f; + } + + public override Color DetermineParticleColor(float lifetimeCompletion) => Color.White * Utils.InverseLerp(1f, 0.85f, lifetimeCompletion, true); + + public override Particle SpawnParticle() => new Particle(ParticleLifetime, Main.rand.NextVector2Circular(1f, 1f) * SpawnAreaCompactness, 0.06f, Main.rand.Next(3)); + } +} \ No newline at end of file diff --git a/Projectiles/Melee/DragonRageStaff.cs b/Projectiles/Melee/DragonRageStaff.cs index cefe9f0692..43dfe695e1 100644 --- a/Projectiles/Melee/DragonRageStaff.cs +++ b/Projectiles/Melee/DragonRageStaff.cs @@ -174,7 +174,7 @@ namespace CalamityMod.Projectiles.Melee modPlayer.dragonRageHits = 0; } - int proj = Projectile.NewProjectile(position, Vector2.Zero, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); + int proj = Projectile.NewProjectile(position, Vector2.Zero, ModContent.ProjectileType(), projectile.damage / 4, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); Main.projectile[proj].Calamity().forceMelee = true; } } @@ -190,7 +190,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 velocity = new Vector2(0f, speed); velocity = velocity.RotatedBy(angleStep * i * Main.rand.NextFloat(0.9f, 1.1f)); - Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), projectile.damage / 3, projectile.knockBack / 3f, projectile.owner); + Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), projectile.damage / 8, projectile.knockBack / 3f, projectile.owner); } } diff --git a/Projectiles/Typeless/TarraEnergy.cs b/Projectiles/Typeless/TarraEnergy.cs index da23fa7c71..19236f4bfc 100644 --- a/Projectiles/Typeless/TarraEnergy.cs +++ b/Projectiles/Typeless/TarraEnergy.cs @@ -13,29 +13,26 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - DisplayName.SetDefault("Round"); - ProjectileID.Sets.TrailCacheLength[projectile.type] = 3; - ProjectileID.Sets.TrailingMode[projectile.type] = 0; + DisplayName.SetDefault("Tarra Energy"); } public override void SetDefaults() { - projectile.width = 8; - projectile.height = 8; - projectile.aiStyle = 1; + projectile.width = 4; + projectile.height = 4; projectile.friendly = true; projectile.penetrate = 1; - projectile.alpha = 255; - projectile.timeLeft = 120; + projectile.timeLeft = 200; projectile.extraUpdates = 1; - aiType = ProjectileID.Bullet; } + public override bool? CanHitNPC(NPC target) => projectile.timeLeft < 170 && target.CanBeChasedBy(projectile); + // Reduce damage of projectiles if more than the cap are active public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { int projectileCount = Main.player[projectile.owner].ownedProjectileCounts[projectile.type]; - int cap = 5; + int cap = 2; int oldDamage = damage; if (projectileCount > cap) { @@ -45,40 +42,24 @@ namespace CalamityMod.Projectiles.Typeless } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - Vector2 drawOrigin = new Vector2(Main.projectileTexture[projectile.type].Width * 0.5f, projectile.height * 0.5f); - for (int k = 0; k < projectile.oldPos.Length; k++) - { - Vector2 drawPos = projectile.oldPos[k] - Main.screenPosition + drawOrigin + new Vector2(0f, projectile.gfxOffY); - Color color = projectile.GetAlpha(lightColor) * ((float)(projectile.oldPos.Length - k) / (float)projectile.oldPos.Length); - spriteBatch.Draw(Main.projectileTexture[projectile.type], drawPos, null, color, projectile.rotation, drawOrigin, projectile.scale, SpriteEffects.None, 0f); - } - return true; - } + public override void AI() + { + for (int num136 = 0; num136 < 2; num136++) + { + float x2 = projectile.position.X - projectile.velocity.X / 10f * (float)num136; + float y2 = projectile.position.Y - projectile.velocity.Y / 10f * (float)num136; + Vector2 dspeed = projectile.velocity * Main.rand.NextFloat(0.7f, 0.4f); + int num137 = Dust.NewDust(new Vector2(x2, y2), 1, 1, 107, 0f, 0f, 0, default, 1f); + Main.dust[num137].alpha = projectile.alpha; + Main.dust[num137].position.X = x2; + Main.dust[num137].position.Y = y2; + Main.dust[num137].velocity = dspeed; + Main.dust[num137].noGravity = true; + Main.dust[num137].noLight = true; + } - public override bool PreAI() - { - for (int num136 = 0; num136 < 2; num136++) - { - float x2 = projectile.position.X - projectile.velocity.X / 10f * (float)num136; - float y2 = projectile.position.Y - projectile.velocity.Y / 10f * (float)num136; - Vector2 dspeed = projectile.velocity * Main.rand.NextFloat(0.7f, 0.4f); - int num137 = Dust.NewDust(new Vector2(x2, y2), 1, 1, 107, 0f, 0f, 0, default, 1f); - Main.dust[num137].alpha = projectile.alpha; - Main.dust[num137].position.X = x2; - Main.dust[num137].position.Y = y2; - Main.dust[num137].velocity = dspeed; - Main.dust[num137].noGravity = true; - Main.dust[num137].noLight = true; - } - float num138 = (float)Math.Sqrt((double)(projectile.velocity.X * projectile.velocity.X + projectile.velocity.Y * projectile.velocity.Y)); - float num139 = projectile.localAI[0]; - if (num139 == 0f) - { - projectile.localAI[0] = num138; - } - return false; - } + if (projectile.timeLeft < 170) + CalamityGlobalProjectile.HomeInOnNPC(projectile, true, 600f, 9f, 20f); + } } } diff --git a/Sounds/Custom/ThanatosVent.cs b/Sounds/Custom/ThanatosVent.cs new file mode 100644 index 0000000000..0f1a0799d7 --- /dev/null +++ b/Sounds/Custom/ThanatosVent.cs @@ -0,0 +1,18 @@ +using Microsoft.Xna.Framework.Audio; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Sounds.Custom +{ + public class ThanatosVent : ModSound + { + public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type) + { + soundInstance = sound.CreateInstance(); + soundInstance.Volume = volume * 1f; + soundInstance.Pan = pan; + Main.PlaySoundInstance(soundInstance); + return soundInstance; + } + } +} diff --git a/UI/BossHealthBarManager.cs b/UI/BossHealthBarManager.cs index 5ac30a1d5f..5c5cdae84a 100644 --- a/UI/BossHealthBarManager.cs +++ b/UI/BossHealthBarManager.cs @@ -592,7 +592,7 @@ namespace CalamityMod.UI return; int currentLife = _npc.life; - bool enraged = _npc.Calamity().CurrentlyEnraged; + bool enraged = _npc.active && _npc.Calamity().CurrentlyEnraged; // Calculate current life based all types that are available and considered part of one boss if (_oneToMany)