From 561aa92a6066e9724e804cb21d45df25e93766c8 Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 2 Jun 2022 23:02:26 -0500 Subject: [PATCH 01/30] The Flamsteed Robot doesn't draw player parts anymore --- CalPlayer/CalamityPlayerDrawEffects.cs | 9 +++++++++ CalPlayer/DrawLayers/AndromedaMechLayer.cs | 6 ++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index 8a195b38e8..3c9b153fad 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -51,6 +51,15 @@ namespace CalamityMod.CalPlayer { PlayerDrawLayers.Shoes.Hide(); } + + if (drawInfo.drawPlayer.Calamity().andromedaState != AndromedaPlayerState.Inactive) + { + foreach (var layer in PlayerDrawLayerLoader.Layers) + { + if (layer != PlayerDrawLayers.BackAcc) + layer.Hide(); + } + } } public override void DrawEffects(PlayerDrawSet drawInfo, ref float r, ref float g, ref float b, ref float a, ref bool fullBright) diff --git a/CalPlayer/DrawLayers/AndromedaMechLayer.cs b/CalPlayer/DrawLayers/AndromedaMechLayer.cs index dd3d4e3f68..0a11aaed4b 100644 --- a/CalPlayer/DrawLayers/AndromedaMechLayer.cs +++ b/CalPlayer/DrawLayers/AndromedaMechLayer.cs @@ -1,6 +1,4 @@ -using System.Linq; -using CalamityMod.Items.Dyes; -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -11,7 +9,7 @@ namespace CalamityMod.CalPlayer.DrawLayers { public class AndromedaMechLayer : PlayerDrawLayer { - public override Position GetDefaultPosition() => new AfterParent(PlayerDrawLayers.Skin); + public override Position GetDefaultPosition() => new AfterParent(PlayerDrawLayers.BackAcc); public override bool GetDefaultVisibility(PlayerDrawSet drawInfo) { From e31ed80ab7fb4a3fee909e55df35ab7d4bc4e3a9 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 2 Jun 2022 20:43:26 -0400 Subject: [PATCH 02/30] Fix mechanics of defense damage with Adamantite --- CalPlayer/CalamityPlayer.cs | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 4c15f8fb95..53a6fbde73 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4538,12 +4538,6 @@ namespace CalamityMod.CalPlayer } #endregion - if (draedonsHeart) - { - if (Player.StandingStill() && Player.itemAnimation == 0) - damage = (int)(damage * 0.5); - } - if ((target.damage > 0 || target.boss) && !target.SpawnedFromStatue && Player.whoAmI == Main.myPlayer) { if (CalamityConfig.Instance.Proficiency) @@ -4724,12 +4718,6 @@ namespace CalamityMod.CalPlayer if (proj.type == ProjectileID.SpectreWrath && Player.ghostHurt) damage = (int)(damage * 0.7); - if (draedonsHeart) - { - if (Player.StandingStill() && Player.itemAnimation == 0) - damage = (int)(damage * 0.5); - } - #endregion // Handle on-hit ranged effects for the gem tech armor set. @@ -8147,7 +8135,20 @@ namespace CalamityMod.CalPlayer defenseDamageTaken = cap; // Apply defense damage to the adamantite armor set boost. - AdamantiteSetDefenseBoost -= defenseDamageTaken; + if (AdamantiteSetDefenseBoost > 0) + { + int defenseDamageToAdamantite = Math.Min(AdamantiteSetDefenseBoost, defenseDamageTaken); + AdamantiteSetDefenseBoost -= defenseDamageToAdamantite; + defenseDamageTaken -= defenseDamageToAdamantite; + + // If Adamantite Armor's set bonus entirely absorbed the defense damage, then display the number and play the sound, + // but don't actually reduce defense or trigger the defense damage recovery cooldown. + if (defenseDamageTaken <= 0) + { + ShowDefenseDamageEffects(defenseDamageToAdamantite); + return; + } + } // Apply that defense damage on top of whatever defense damage the player currently has. int previousDefenseDamage = CurrentDefenseDamage; @@ -8168,6 +8169,12 @@ namespace CalamityMod.CalPlayer // Reset the delay between iframes and being able to recover from defense damage. defenseDamageDelayFrames = DefenseDamageRecoveryDelay; + // Audiovisual effects + ShowDefenseDamageEffects(defenseDamageTaken); + } + + private void ShowDefenseDamageEffects(int defDamage) + { // Play a sound from taking defense damage. if (hurtSoundTimer == 0) { @@ -8176,7 +8183,7 @@ namespace CalamityMod.CalPlayer } // Display text indicating that defense damage was taken. - string text = (-defenseDamageTaken).ToString(); + string text = (-defDamage).ToString(); Color messageColor = Color.LightGray; Rectangle location = new Rectangle((int)Player.position.X, (int)Player.position.Y - 16, Player.width, Player.height); CombatText.NewText(location, messageColor, Language.GetTextValue(text)); From f386fdf1f629aacc60d384ae679539b11ebabd3c Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 2 Jun 2022 22:12:06 -0400 Subject: [PATCH 03/30] 1 - Rippers work outside Rev+, if enabled. 2 - Shattered Community enables Rage in Normal and Expert. 3 - Draedon's Heart rework (in progress). Draedon's Heart enables Adrenaline in Normal and Expert. 4 - Fixed crit chance bug with Daawnlight Spirit Origin. --- CalPlayer/CalamityPlayer.cs | 27 ++++--- CalPlayer/CalamityPlayerDrawEffects.cs | 10 --- CalPlayer/CalamityPlayerLifeRegen.cs | 22 +---- CalPlayer/CalamityPlayerMiscEffects.cs | 103 ++++++++++++------------ Items/Accessories/DraedonsHeart.cs | 39 ++++++++- Items/Accessories/ShatteredCommunity.cs | 15 +++- UI/RipperUI.cs | 10 +-- 7 files changed, 120 insertions(+), 106 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 53a6fbde73..4f79d6b6fe 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -333,6 +333,7 @@ namespace CalamityMod.CalPlayer #endregion #region Rage + public bool RageEnabled => CalamityWorld.revenge || shatteredCommunity; public bool rageModeActive = false; public float rage = 0f; public float rageMax = 100f; // 0 to 100% by default @@ -349,6 +350,7 @@ namespace CalamityMod.CalPlayer #endregion #region Adrenaline + public bool AdrenalineEnabled => CalamityWorld.revenge || draedonsHeart; public bool adrenalineModeActive = false; public float adrenaline = 0f; public float adrenalineMax = 100f; // 0 to 100% by default @@ -432,6 +434,7 @@ namespace CalamityMod.CalPlayer public bool laudanum = false; public bool heartOfDarkness = false; public bool draedonsHeart = false; + public int nanomachinesTimer = 0; public bool vexation = false; public bool dodgeScarf = false; public bool evasionScarf = false; @@ -2312,6 +2315,7 @@ namespace CalamityMod.CalPlayer triumph = false; penumbra = false; shadow = false; + nanomachinesTimer = 0; photosynthesis = false; astralInjection = false; gravityNormalizer = false; @@ -3002,7 +3006,7 @@ namespace CalamityMod.CalPlayer } // Trigger for pressing the Adrenaline hotkey. - if (CalamityKeybinds.AdrenalineHotKey.JustPressed && CalamityWorld.revenge) + if (CalamityKeybinds.AdrenalineHotKey.JustPressed && AdrenalineEnabled) { if (adrenaline == adrenalineMax && !adrenalineModeActive) { @@ -4503,8 +4507,8 @@ namespace CalamityMod.CalPlayer if (witheredDebuff && witheringWeaponEnchant) damageMult += 0.6; - if (CalamityWorld.revenge) - CalamityUtils.ApplyRippersToDamage(this, isTrueMelee, ref damageMult); + // Rippers are always checked for application, because there are ways to get rippers outside of Rev now + CalamityUtils.ApplyRippersToDamage(this, isTrueMelee, ref damageMult); damage = (int)(damage * damageMult); #endregion @@ -4608,8 +4612,8 @@ namespace CalamityMod.CalPlayer if (witheredDebuff) damageMult += 0.6; - if (CalamityWorld.revenge) - CalamityUtils.ApplyRippersToDamage(this, isTrueMelee, ref damageMult); + // Rippers are always checked for application, because there are ways to get rippers outside of Rev now + CalamityUtils.ApplyRippersToDamage(this, isTrueMelee, ref damageMult); if (filthyGlove && proj.Calamity().stealthStrike && proj.CountsAsClass()) { @@ -5025,7 +5029,8 @@ namespace CalamityMod.CalPlayer theBeeCooldown = 600; } - if (CalamityWorld.revenge) + // Full Adrenaline DR does not apply when using Draedon's Heart + if (AdrenalineEnabled && !draedonsHeart) { if (adrenaline == adrenalineMax && !adrenalineModeActive) { @@ -5269,7 +5274,8 @@ namespace CalamityMod.CalPlayer theBeeCooldown = 600; } - if (CalamityWorld.revenge) + // Full Adrenaline DR does not apply when using Draedon's Heart + if (AdrenalineEnabled && !draedonsHeart) { if (adrenaline == adrenalineMax && !adrenalineModeActive) { @@ -5948,7 +5954,7 @@ namespace CalamityMod.CalPlayer // Shattered Community makes the player gain rage based on the amount of damage taken. // Also set the Rage gain cooldown to prevent bizarre abuse cases. - if (CalamityWorld.revenge && shatteredCommunity && rageGainCooldown == 0) + if (shatteredCommunity && rageGainCooldown == 0) { float HPRatio = (float)damage / Player.statLifeMax2; float rageConversionRatio = 0.8f; @@ -5979,7 +5985,7 @@ namespace CalamityMod.CalPlayer modStealth = 1f; // Give Rage combat frames because being hurt counts as combat. - if (CalamityWorld.revenge) + if (RageEnabled) rageCombatFrames = RageCombatDelayTime; if (Player.whoAmI == Main.myPlayer) @@ -6031,7 +6037,8 @@ namespace CalamityMod.CalPlayer witheringDamageDone = 0; } - if (CalamityWorld.revenge) + // Lose adrenaline on hit, unless using Draedon's Heart. + if (AdrenalineEnabled && !draedonsHeart) { if (!adrenalineModeActive && damage > 0) // To prevent paladin's shield ruining adren even with 0 dmg taken { diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index 3c9b153fad..70e98bab89 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -706,16 +706,6 @@ namespace CalamityMod.CalPlayer fullBright = true; } } - if (calamityPlayer.draedonsHeart && !calamityPlayer.shadeRegen && !calamityPlayer.cFreeze && Player.StandingStill() && Player.itemAnimation == 0) - { - if (noRogueStealth) - { - r *= 0f; - g *= 0.5f; - b *= 0f; - fullBright = true; - } - } if (calamityPlayer.bBlood) { if (Main.rand.NextBool(6) && drawInfo.shadow == 0f) diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 020b0c2646..412dab6f9a 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -871,24 +871,6 @@ namespace CalamityMod.CalPlayer } } } - else if (draedonsHeart) - { - boostedRegen = true; - if (Player.lifeRegen > 0 && Player.statLife < actualMaxLife) - { - if (Main.rand.Next(30000) < Player.lifeRegenTime || Main.rand.NextBool(2)) - { - int regen = Dust.NewDust(Player.position, Player.width, Player.height, 107, 0f, 0f, 200, default, 1f); - Main.dust[regen].noGravity = true; - Main.dust[regen].fadeIn = 1.3f; - Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f); - Main.dust[regen].velocity = velocity; - velocity.Normalize(); - velocity *= 34f; - Main.dust[regen].position = Player.Center - velocity; - } - } - } else if (photosynthesis) { boostedRegen = true; @@ -962,8 +944,8 @@ namespace CalamityMod.CalPlayer if (Player.statLife < actualMaxLife) { // The soft cap doesn't apply if the player is not moving and not using a weapon while having any of the following: - // Shiny Stone, Draedon's Heart, Cosmic Freeze buff from the Cosmic Discharge, Demonshade Armor, Photosynthesis Potion buff or The Camper. - bool noLifeRegenCap = (Player.shinyStone || draedonsHeart || cFreeze || shadeRegen || photosynthesis || camper) && + // Shiny Stone, Cosmic Freeze buff from the Cosmic Discharge, Demonshade Armor, Photosynthesis Potion buff or The Camper. + bool noLifeRegenCap = (Player.shinyStone || cFreeze || shadeRegen || photosynthesis || camper) && Player.StandingStill() && Player.itemAnimation == 0; if (!noLifeRegenCap) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 6d898078cb..f2cf6b5144 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -172,8 +172,8 @@ namespace CalamityMod.CalPlayer { // player.rangedCrit already contains the crit stat of the held item, no need to grab it separately. // Don't store the base 4% because you're not removing it. - spiritOriginConvertedCrit = (int)(Player.GetCritChance() - 4); - Player.GetCritChance() = 4; + spiritOriginConvertedCrit = (int)(Player.GetTotalCritChance() - 4); + Player.GetCritChance() = -spiritOriginConvertedCrit; } if (Player.ActiveItem().type == ModContent.ItemType()) @@ -191,7 +191,7 @@ namespace CalamityMod.CalPlayer #region Revengeance Effects private void RevengeanceModeMiscEffects() { - if (CalamityWorld.revenge || BossRushEvent.BossRushActive) + if (CalamityWorld.revenge) { // Adjusts the life steal cap in rev/death float lifeStealCap = (CalamityWorld.malice || BossRushEvent.BossRushActive) ? 30f : CalamityWorld.death ? 45f : 60f; @@ -221,23 +221,16 @@ namespace CalamityMod.CalPlayer if (Player.hurtCooldowns[k] > immuneTimeLimit) Player.hurtCooldowns[k] = immuneTimeLimit; } - - // Adrenaline and Rage - if (CalamityWorld.revenge) - UpdateRippers(); } } - // If Revengeance Mode is not active, then set rippers to zero - else if (Player.whoAmI == Main.myPlayer) - { - rage = 0; - adrenaline = 0; - } + // Adrenaline and Rage + UpdateRippers(); } private void UpdateRippers() { + #region Rage // Figure out Rage's current duration based on boosts. if (rageBoostOne) RageDuration += RageDurationPerBooster; @@ -364,31 +357,37 @@ namespace CalamityMod.CalPlayer rageDiff -= rageMax / RageFadeTime; // Apply the rage change and cap rage in both directions. - rage += rageDiff; - if (rage < 0) - rage = 0; - - if (rage >= rageMax) + // Changes are only applied if the Rage mechanic is available. + if (RageEnabled) { - // If Rage is not active, it is capped at 100%. - if (!rageModeActive) - rage = rageMax; + rage += rageDiff; + if (rage < 0) + rage = 0; - // If using the Shattered Community, Rage is capped at 200% while it's active. - // This prevents infinitely stacking rage before a fight by standing on spikes/lava with a regen build or the Nurse handy. - else if (shatteredCommunity && rage >= 2f * rageMax) - rage = 2f * rageMax; - - // Play a sound when the Rage Meter is full - if (playFullRageSound) + if (rage >= rageMax) { - playFullRageSound = false; - SoundEngine.PlaySound(RageFilledSound, Player.position); - } - } - else - playFullRageSound = true; + // If Rage is not active, it is capped at 100%. + if (!rageModeActive) + rage = rageMax; + // If using the Shattered Community, Rage is capped at 200% while it's active. + // This prevents infinitely stacking rage before a fight by standing on spikes/lava with a regen build or the Nurse handy. + else if (shatteredCommunity && rage >= 2f * rageMax) + rage = 2f * rageMax; + + // Play a sound when the Rage Meter is full + if (playFullRageSound) + { + playFullRageSound = false; + SoundEngine.PlaySound(RageFilledSound, Player.position); + } + } + else + playFullRageSound = true; + } + #endregion + + #region Adrenaline // This is how much Adrenaline will be changed by this frame. float adrenalineDiff = 0; bool SCalAlive = NPC.AnyNPCs(ModContent.NPCType()); @@ -414,23 +413,28 @@ namespace CalamityMod.CalPlayer adrenalineDiff *= 0.67f; // Apply the adrenaline change and cap adrenaline in both directions. - adrenaline += adrenalineDiff; - if (adrenaline < 0) - adrenaline = 0; - - if (adrenaline >= adrenalineMax) + // Changes are only applied if the Adrenaline mechanic is available. + if (AdrenalineEnabled) { - adrenaline = adrenalineMax; + adrenaline += adrenalineDiff; + if (adrenaline < 0) + adrenaline = 0; - // Play a sound when the Adrenaline Meter is full - if (playFullAdrenalineSound) + if (adrenaline >= adrenalineMax) { - playFullAdrenalineSound = false; - SoundEngine.PlaySound(AdrenalineFilledSound, Player.position); + adrenaline = adrenalineMax; + + // Play a sound when the Adrenaline Meter is full + if (playFullAdrenalineSound) + { + playFullAdrenalineSound = false; + SoundEngine.PlaySound(AdrenalineFilledSound, Player.position); + } } + else + playFullAdrenalineSound = true; } - else - playFullAdrenalineSound = true; + #endregion } #endregion @@ -3682,13 +3686,6 @@ namespace CalamityMod.CalPlayer } } - // Draedon's Heart bonus - if (draedonsHeart) - { - if (Player.StandingStill() && Player.itemAnimation == 0) - Player.statDefense += (int)(Player.statDefense * 0.75); - } - // Endurance reductions EnduranceReductions(); diff --git a/Items/Accessories/DraedonsHeart.cs b/Items/Accessories/DraedonsHeart.cs index f026431b6c..6cc3fdcc72 100644 --- a/Items/Accessories/DraedonsHeart.cs +++ b/Items/Accessories/DraedonsHeart.cs @@ -3,18 +3,27 @@ using Terraria; using Terraria.ID; using Terraria.DataStructures; using Terraria.ModLoader; +using System.Collections.Generic; +using System.Linq; +using CalamityMod.World; namespace CalamityMod.Items.Accessories { public class DraedonsHeart : ModItem { + private const double ContactDamageReduction = 0.15D; + public override void SetStaticDefaults() { SacrificeTotal = 1; DisplayName.SetDefault("Draedon's Heart"); - Tooltip.SetDefault("Reduces the amount of defense damage you take by 50%\n" + - "Standing still regenerates your life quickly, reduces your damage by 50% and boosts your defense by 75%\n" + - "Nanomachines, son"); + Tooltip.SetDefault(@"15% reduced contact damage from enemies +Reduces defense damage taken by 50% +Replaces Adrenaline with the Nanomachines meter +Unlike Adrenaline, you lose no Nanomachines when you take damage, but it stops generating for 4 seconds +With full Nanomachines, press & to heal 300 health over 2 seconds +While healing, wings are disabled and your mobility is crippled +Nanomachines, son"); Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 11)); } @@ -23,6 +32,7 @@ namespace CalamityMod.Items.Accessories Item.width = 52; Item.height = 68; Item.accessory = true; + Item.defense = 48; Item.rare = ItemRarityID.Red; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; Item.Calamity().customRarity = CalamityRarity.Violet; @@ -32,6 +42,29 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.draedonsHeart = true; + modPlayer.contactDamageReduction += ContactDamageReduction; + } + + public override void ModifyTooltips(List list) + { + // The 3rd tooltip line "Replaces Adrenaline..." is replaced on Normal or Expert + TooltipLine nanomachineMeterLine = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip2"); + if (nanomachineMeterLine != null && !CalamityWorld.revenge) + nanomachineMeterLine.Text = "Adds the Nanomachines meter"; + + // The 4th tooltip line "Unlike Adrenaline..." is replaced on Normal or Expert + TooltipLine doesntStopOnDamageLine = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip3"); + if (doesntStopOnDamageLine != null && !CalamityWorld.revenge) + doesntStopOnDamageLine.Text = "Nanomachines generates over time when fighting bosses\nTaking damage stops its generation for 4 seconds"; + + // The 5th tooltip line "With full Nanomachines" has the & replaced with the hotkey. + string adrenKey = CalamityKeybinds.AdrenalineHotKey.TooltipHotkeyString(); + TooltipLine hotkeyLine = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip4"); + if (hotkeyLine != null) + { + string tooltipWithHotkey = hotkeyLine.Text.Replace("&", adrenKey); + hotkeyLine.Text = tooltipWithHotkey; + } } } } diff --git a/Items/Accessories/ShatteredCommunity.cs b/Items/Accessories/ShatteredCommunity.cs index 2f9fb0e317..c1bbda5f7e 100644 --- a/Items/Accessories/ShatteredCommunity.cs +++ b/Items/Accessories/ShatteredCommunity.cs @@ -1,14 +1,16 @@ -using CalamityMod.CalPlayer; -using Microsoft.Xna.Framework; -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; +using System.Linq; using System.Text; +using CalamityMod.CalPlayer; +using CalamityMod.World; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using Terraria.ModLoader.IO; -using Terraria.Audio; namespace CalamityMod.Items.Accessories { @@ -155,6 +157,11 @@ namespace CalamityMod.Items.Accessories // Stat tooltips are added dynamically. StringBuilder sb = new StringBuilder(256); + // Line 1: If not on Rev+, note that the accessory enables Rage. + TooltipLine rageOverTimeLine = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1"); + if (rageOverTimeLine != null && !CalamityWorld.revenge) + rageOverTimeLine.Text = "Adds the Rage meter\n" + rageOverTimeLine.Text; + // Line 6: Current level sb.Append("Current level: "); sb.Append(level); diff --git a/UI/RipperUI.cs b/UI/RipperUI.cs index b751417d83..4af5ce45e3 100644 --- a/UI/RipperUI.cs +++ b/UI/RipperUI.cs @@ -96,10 +96,6 @@ namespace CalamityMod.UI public static void Draw(SpriteBatch spriteBatch, Player player) { - // If Revengeance isn't on, or Rage and Adrenaline are turned off, don't draw anything. - if (!CalamityWorld.revenge) - return; - // If for some reason either of the bars has been thrown into the corner (likely to 0,0 by default), put them at their default positions CheckGarbageCornerPos(); @@ -111,8 +107,10 @@ namespace CalamityMod.UI // Grab the ModPlayer object and then start drawing CalamityPlayer modPlayer = player.Calamity(); - DrawRageBar(spriteBatch, modPlayer); - DrawAdrenalineBar(spriteBatch, modPlayer); + if (modPlayer.RageEnabled) + DrawRageBar(spriteBatch, modPlayer); + if (modPlayer.AdrenalineEnabled) + DrawAdrenalineBar(spriteBatch, modPlayer); HandleMouseInteraction(modPlayer, rageBorderTex.Size(), adrenBorderTex.Size()); } From 20c79a32480157d1def7e6205b29a61b58b47f7b Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 2 Jun 2022 22:19:15 -0400 Subject: [PATCH 04/30] Fixed DH tooltip --- Items/Accessories/DraedonsHeart.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Items/Accessories/DraedonsHeart.cs b/Items/Accessories/DraedonsHeart.cs index 6cc3fdcc72..e0efeb6e48 100644 --- a/Items/Accessories/DraedonsHeart.cs +++ b/Items/Accessories/DraedonsHeart.cs @@ -17,13 +17,12 @@ namespace CalamityMod.Items.Accessories { SacrificeTotal = 1; DisplayName.SetDefault("Draedon's Heart"); - Tooltip.SetDefault(@"15% reduced contact damage from enemies -Reduces defense damage taken by 50% -Replaces Adrenaline with the Nanomachines meter -Unlike Adrenaline, you lose no Nanomachines when you take damage, but it stops generating for 4 seconds -With full Nanomachines, press & to heal 300 health over 2 seconds -While healing, wings are disabled and your mobility is crippled -Nanomachines, son"); + Tooltip.SetDefault("15% reduced contact damage from enemies\n" + + "Reduces defense damage taken by 50%\n" + "Replaces Adrenaline with the Nanomachines meter\n" + + "Unlike Adrenaline, you lose no Nanomachines when you take damage, but it stops generating for 4 seconds\n" + + "With full Nanomachines, press & to heal 300 health over 2 seconds\n" + + "While healing, wings are disabled and your mobility is crippled\n" + + "'Nanomachines, son.'"); Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 11)); } From 0bda8d8ecb5385e92fff233eab90715fad849bf9 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 2 Jun 2022 22:21:56 -0400 Subject: [PATCH 05/30] 1 - Adrenaline bar now says "Nanomachines" for DH. 2 - Fixed tooltips from invisible ripper bars. --- UI/RipperUI.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/UI/RipperUI.cs b/UI/RipperUI.cs index 4af5ce45e3..c402cc3185 100644 --- a/UI/RipperUI.cs +++ b/UI/RipperUI.cs @@ -148,7 +148,7 @@ namespace CalamityMod.UI // The amount of the bar to draw depends on the player's current Rage level // offset calculates the deadspace that is the border and not the bar. Bar is 24 pixels tall int barWidth = rageBarTex.Width; - float offset = (rageBorderTex.Width - rageBarTex.Width) * 0.5f; + float offset = (rageBorderTex.Width - rageBarTex.Width) * 0.5f; Rectangle cropRect = new Rectangle(0, 0, (int)(barWidth * rageRatio), rageBarTex.Height); spriteBatch.Draw(rageBarTex, rageDrawPos + shakeOffset + new Vector2(offset * uiScale, 0), cropRect, Color.White, 0f, rageBorderTex.Size() * 0.5f, uiScale, SpriteEffects.None, 0); @@ -214,7 +214,7 @@ namespace CalamityMod.UI // The amount of the bar to draw depends on the player's current Adrenaline level // offset calculates the deadspace that is the border and not the bar. Bar is 24 pixels tall int barWidth = adrenBarTex.Width; - float offset = (adrenBorderTex.Width - adrenBarTex.Width) * 0.5f; + float offset = (adrenBorderTex.Width - adrenBarTex.Width) * 0.5f; Rectangle cropRect = new Rectangle(0, 0, (int)(barWidth * adrenRatio), adrenBarTex.Height); spriteBatch.Draw(adrenBarTex, adrenDrawPos + shakeOffset + new Vector2(offset * uiScale, 0), cropRect, Color.White, 0f, adrenBorderTex.Size() * 0.5f, uiScale, SpriteEffects.None, 0); @@ -252,8 +252,8 @@ namespace CalamityMod.UI Rectangle rageBar = Utils.CenteredRectangle(rageDrawPos, rageBarSize * uiScale); Rectangle adrenBar = Utils.CenteredRectangle(adrenDrawPos, adrenBarSize * uiScale); - bool rageHover = mouse.Intersects(rageBar); - bool adrenHover = mouse.Intersects(adrenBar); + bool rageHover = mouse.Intersects(rageBar) && modPlayer.RageEnabled; + bool adrenHover = mouse.Intersects(adrenBar) && modPlayer.AdrenalineEnabled; MouseState mouseInput = Mouse.GetState(); Vector2 mousePos = Main.MouseScreen; @@ -280,8 +280,9 @@ namespace CalamityMod.UI // Add hover text if the mouse is over the bar if (!CalamityConfig.Instance.MeterPosLock) Main.LocalPlayer.mouseInterface = true; - string adrenStr = MakeRipperPercentString(modPlayer.adrenaline, modPlayer.adrenalineMax); - Main.instance.MouseText($"Adrenaline: {adrenStr}"); + string adrenNameStr = modPlayer.draedonsHeart ? "Nanomachines" : "Adrenaline"; + string adrenAmountStr = MakeRipperPercentString(modPlayer.adrenaline, modPlayer.adrenalineMax); + Main.instance.MouseText($"{adrenNameStr}: {adrenAmountStr}"); // The bar is draggable if enabled in config. if (!CalamityConfig.Instance.MeterPosLock && mouseInput.LeftButton == ButtonState.Pressed) From 938ca5b32a5963c6b2cdbbae09b40e53c1605b22 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 2 Jun 2022 23:08:10 -0400 Subject: [PATCH 06/30] Draedon's Heart is fully implemented except for movement cripple. --- CalPlayer/CalamityPlayer.cs | 14 +++++--- CalPlayer/CalamityPlayerMiscEffects.cs | 48 +++++++++++++++++++------- Items/Accessories/DraedonsHeart.cs | 16 +++++++-- Utilities/PlayerUtils.cs | 3 +- 4 files changed, 61 insertions(+), 20 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 4f79d6b6fe..97c360690d 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -434,7 +434,7 @@ namespace CalamityMod.CalPlayer public bool laudanum = false; public bool heartOfDarkness = false; public bool draedonsHeart = false; - public int nanomachinesTimer = 0; + public int nanomachinesLockoutTimer = 0; public bool vexation = false; public bool dodgeScarf = false; public bool evasionScarf = false; @@ -1474,6 +1474,9 @@ namespace CalamityMod.CalPlayer ResetRogueStealth(); + // Reset adrenaline duration to default. If Draedon's Heart is equipped, it'll change itself every frame. + AdrenalineDuration = CalamityUtils.SecondsToFrames(5); + contactDamageReduction = 0D; projectileDamageReduction = 0D; rogueVelocity = 1f; @@ -2315,7 +2318,7 @@ namespace CalamityMod.CalPlayer triumph = false; penumbra = false; shadow = false; - nanomachinesTimer = 0; + nanomachinesLockoutTimer = 0; photosynthesis = false; astralInjection = false; gravityNormalizer = false; @@ -5030,9 +5033,12 @@ namespace CalamityMod.CalPlayer } // Full Adrenaline DR does not apply when using Draedon's Heart - if (AdrenalineEnabled && !draedonsHeart) + // Instead, nanomachine accumulation is stopped for a while + if (AdrenalineEnabled) { - if (adrenaline == adrenalineMax && !adrenalineModeActive) + if (draedonsHeart) + nanomachinesLockoutTimer = DraedonsHeart.NanomachinePauseAfterDamage; + else if (adrenaline == adrenalineMax && !adrenalineModeActive) { double adrenalineDRBoost = 0D + (adrenalineBoostOne ? 0.05 : 0D) + diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index f2cf6b5144..a0996f58fe 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1,4 +1,7 @@ -using CalamityMod.Balancing; +using System; +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Balancing; using CalamityMod.Buffs.Alcohol; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.Potions; @@ -9,6 +12,7 @@ using CalamityMod.Cooldowns; using CalamityMod.CustomRecipes; using CalamityMod.DataStructures; using CalamityMod.Dusts; +using CalamityMod.EntitySources; using CalamityMod.Events; using CalamityMod.Items; using CalamityMod.Items.Accessories; @@ -42,22 +46,17 @@ using CalamityMod.UI; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; -using System.Collections.Generic; -using System.Linq; +using ReLogic.Content; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent; using Terraria.GameContent.Events; using Terraria.GameInput; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; using ProvidenceBoss = CalamityMod.NPCs.Providence.Providence; -using Terraria.Audio; -using Terraria.DataStructures; -using CalamityMod.EntitySources; -using ReLogic.Content; -using Terraria.GameContent; -using CalamityMod.Systems; namespace CalamityMod.CalPlayer { @@ -395,7 +394,30 @@ namespace CalamityMod.CalPlayer // If Adrenaline Mode is currently active, you smoothly lose all adrenaline over the duration. if (adrenalineModeActive) + { adrenalineDiff = -adrenalineMax / AdrenalineDuration; + + // If using Draedon's Heart, you get healing instead of damage. + if (draedonsHeart) + { + Player.statLife += DraedonsHeart.NanomachinesHeal / DraedonsHeart.NanomachinesDuration; + if (Player.statLife >= Player.statLifeMax2) + Player.statLife = Player.statLifeMax2; + + // Old Draedon's Heart dust effect from its standing still regen. Works just fine. + int dustID = DustID.TerraBlade; + { + int regen = Dust.NewDust(Player.position, Player.width, Player.height, dustID, 0f, 0f, 200, default, 1f); + Main.dust[regen].noGravity = true; + Main.dust[regen].fadeIn = 1.3f; + Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f); + Main.dust[regen].velocity = velocity; + velocity.Normalize(); + velocity *= 34f; + Main.dust[regen].position = Player.Center - velocity; + } + } + } else { // If any boss is alive (or you are between DoG phases or Boss Rush is active), you gain adrenaline smoothly. @@ -414,7 +436,7 @@ namespace CalamityMod.CalPlayer // Apply the adrenaline change and cap adrenaline in both directions. // Changes are only applied if the Adrenaline mechanic is available. - if (AdrenalineEnabled) + if (AdrenalineEnabled && nanomachinesLockoutTimer == 0) { adrenaline += adrenalineDiff; if (adrenaline < 0) @@ -434,12 +456,14 @@ namespace CalamityMod.CalPlayer else playFullAdrenalineSound = true; } + + if (nanomachinesLockoutTimer > 0) + nanomachinesLockoutTimer--; #endregion } #endregion #region Misc Effects - private void HandleBlazingMouseEffects() { // The sigil's brightness slowly fades away every frame if not incinerating anything. diff --git a/Items/Accessories/DraedonsHeart.cs b/Items/Accessories/DraedonsHeart.cs index e0efeb6e48..553153f2ac 100644 --- a/Items/Accessories/DraedonsHeart.cs +++ b/Items/Accessories/DraedonsHeart.cs @@ -13,14 +13,22 @@ namespace CalamityMod.Items.Accessories { private const double ContactDamageReduction = 0.15D; + // Duration of Nanomachines in frames. + internal static readonly int NanomachinesDuration = 120; + + // Duration of time where Nanomachines won't accumulate after taking damage, in frames. + internal static readonly int NanomachinePauseAfterDamage = 240; + + internal static readonly int NanomachinesHeal = 240; + public override void SetStaticDefaults() { SacrificeTotal = 1; DisplayName.SetDefault("Draedon's Heart"); Tooltip.SetDefault("15% reduced contact damage from enemies\n" + "Reduces defense damage taken by 50%\n" + "Replaces Adrenaline with the Nanomachines meter\n" + - "Unlike Adrenaline, you lose no Nanomachines when you take damage, but it stops generating for 4 seconds\n" + - "With full Nanomachines, press & to heal 300 health over 2 seconds\n" + + $"Unlike Adrenaline, you lose no Nanomachines when you take damage, but they stop accumulating for {NanomachinePauseAfterDamage / 60} seconds\n" + + $"With full Nanomachines, press & to heal {NanomachinesHeal} health over {NanomachinesDuration / 60} seconds\n" + "While healing, wings are disabled and your mobility is crippled\n" + "'Nanomachines, son.'"); Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 11)); @@ -41,6 +49,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.draedonsHeart = true; + modPlayer.AdrenalineDuration = NanomachinesDuration; modPlayer.contactDamageReduction += ContactDamageReduction; } @@ -54,7 +63,8 @@ namespace CalamityMod.Items.Accessories // The 4th tooltip line "Unlike Adrenaline..." is replaced on Normal or Expert TooltipLine doesntStopOnDamageLine = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip3"); if (doesntStopOnDamageLine != null && !CalamityWorld.revenge) - doesntStopOnDamageLine.Text = "Nanomachines generates over time when fighting bosses\nTaking damage stops its generation for 4 seconds"; + doesntStopOnDamageLine.Text = "Nanomachines accumulate over time while fighting bosses\n" + + $"Taking damage stops the accumulation for {NanomachinePauseAfterDamage / 60} seconds"; // The 5th tooltip line "With full Nanomachines" has the & replaced with the hotkey. string adrenKey = CalamityKeybinds.AdrenalineHotKey.TooltipHotkeyString(); diff --git a/Utilities/PlayerUtils.cs b/Utilities/PlayerUtils.cs index 1be0f23266..a11d6e43b2 100644 --- a/Utilities/PlayerUtils.cs +++ b/Utilities/PlayerUtils.cs @@ -357,7 +357,8 @@ namespace CalamityMod // Rage and Adrenaline now stack additively with no special cases. if (mp.rageModeActive) damageMult += trueMelee ? mp.RageDamageBoost * rageAndAdrenalineTrueMeleeDamageMult : mp.RageDamageBoost; - if (mp.adrenalineModeActive) + // Draedon's Heart disables Adrenaline damage. + if (mp.adrenalineModeActive && !mp.draedonsHeart) damageMult += trueMelee ? mp.GetAdrenalineDamage() * rageAndAdrenalineTrueMeleeDamageMult : mp.GetAdrenalineDamage(); } #endregion From 63ec32af91cdb70b6651307a171cc82110400bdc Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 3 Jun 2022 00:09:00 -0400 Subject: [PATCH 07/30] 1 - Activating Adrenaline produces a green lightning bolt. 2 - Adrenaline effect changed to blue sparks flying from the player. 3 - Activating Rage produces a sparse puff of brimstone flames. 4 - Rage effect changed to Brimstone cinders flying off the player. Shattered Community makes some of them purple. --- CalPlayer/CalamityPlayer.cs | 93 +++++++++++++++++--------- CalPlayer/CalamityPlayerDrawEffects.cs | 53 +++++++++++---- Items/Accessories/DraedonsHeart.cs | 2 + 3 files changed, 101 insertions(+), 47 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 97c360690d..0137862da5 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -2985,25 +2985,22 @@ namespace CalamityMod.CalPlayer Player.AddBuff(ModContent.BuffType(), 2); // Play Rage Activation sound - SoundEngine.PlaySound( RageActivationSound, Player.position); + SoundEngine.PlaySound(RageActivationSound, Player.position); - // TODO -- improve Rage activation visuals - for (int num502 = 0; num502 < 64; num502++) + // TODO -- Rage should provide glowy red afterimages to the player for the duration. + // If Shattered Community is equipped, the afterimages are magenta instead. + int rageDustID = 235; + int dustCount = 132; + float minSpeed = 4f; + float maxSpeed = 11f; + for (int i = 0; i < dustCount; ++i) { - int dust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f); - Main.dust[dust].velocity *= 3f; - Main.dust[dust].scale *= 1.15f; - } - int num226 = 36; - for (int num227 = 0; num227 < num226; num227++) - { - Vector2 vector6 = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f; - vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + Player.Center; - Vector2 vector7 = vector6 - Player.Center; - int num228 = Dust.NewDust(vector6 + vector7, 0, 0, (int)CalamityDusts.Brimstone, vector7.X * 1.5f, vector7.Y * 1.5f, 100, default, 1.4f); - Main.dust[num228].noGravity = true; - Main.dust[num228].noLight = true; - Main.dust[num228].velocity = vector7; + float speed = (float)Math.Sqrt(Main.rand.NextFloat(minSpeed * minSpeed, maxSpeed * maxSpeed)); + Vector2 dustVel = Main.rand.NextVector2Unit() * speed; + Dust d = Dust.NewDustPerfect(Player.Center, rageDustID, dustVel); + d.noGravity = !Main.rand.NextBool(4); // 25% of dust has gravity + d.noLight = false; + d.scale = Main.rand.NextFloat(0.9f, 2.1f); } } } @@ -3018,23 +3015,53 @@ namespace CalamityMod.CalPlayer // Play Adrenaline Activation sound SoundEngine.PlaySound(AdrenalineActivationSound, Player.position); - // TODO -- improve Adrenaline activation visuals - for (int num502 = 0; num502 < 64; num502++) + // TODO -- Adrenaline should provide bright green vibrating afterimages on the player for the duration. + int dustPerSegment = 96; + + // Parametric segment 1: y = 3x + 120 + Vector2 segmentOneStart = new Vector2(0f, -120f); + Vector2 segmentOneEnd = new Vector2(-48f, 24f); + Vector2 segmentOneIncrement = (segmentOneEnd - segmentOneStart) / dustPerSegment; + + // Parametric segment 2: y = 0.5x + Vector2 segmentTwoStart = segmentOneEnd; + Vector2 segmentTwoEnd = new Vector2(48f, -24f); + Vector2 segmentTwoIncrement = (segmentTwoEnd - segmentTwoStart) / dustPerSegment; + + // Parametric segment 3: y = 3x - 120 + Vector2 segmentThreeStart = segmentTwoEnd; + Vector2 segmentThreeEnd = new Vector2(0f, 120f); + Vector2 segmentThreeIncrement = (segmentThreeEnd - segmentThreeStart) / dustPerSegment; + + float maxDustVelSpread = 1.2f; + for (int i = 0; i < dustPerSegment; ++i) { - int dust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, 206, 0f, 0f, 0, default, 1f); - Main.dust[dust].velocity *= 3f; - Main.dust[dust].scale *= 2f; - } - int num226 = 36; - for (int num227 = 0; num227 < num226; num227++) - { - Vector2 vector6 = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f; - vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + Player.Center; - Vector2 vector7 = vector6 - Player.Center; - int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 206, vector7.X * 1.5f, vector7.Y * 1.5f, 100, default, 1.4f); - Main.dust[num228].noGravity = true; - Main.dust[num228].noLight = true; - Main.dust[num228].velocity = vector7; + bool electricity = Main.rand.NextBool(4); + int dustID = electricity ? 132 : DustID.TerraBlade; + + float interpolant = i + 0.5f; + float spreadSpeed = Main.rand.NextFloat(0.5f, maxDustVelSpread); + if (electricity) + spreadSpeed *= 4f; + + Vector2 segmentOnePos = Player.Center + segmentOneStart + segmentOneIncrement * interpolant; + Dust d = Dust.NewDustPerfect(segmentOnePos, dustID, Vector2.Zero); + if (electricity) + d.noGravity = false; + d.scale = Main.rand.NextFloat(0.8f, 1.4f); + d.velocity = Main.rand.NextVector2Unit() * spreadSpeed; + + Vector2 segmentTwoPos = Player.Center + segmentTwoStart + segmentTwoIncrement * interpolant; + d = Dust.CloneDust(d); + d.position = segmentTwoPos; + d.scale = Main.rand.NextFloat(0.8f, 1.4f); + d.velocity = Main.rand.NextVector2Unit() * spreadSpeed; + + Vector2 segmentThreePos = Player.Center + segmentThreeStart + segmentThreeIncrement * interpolant; + d = Dust.CloneDust(d); + d.position = segmentThreePos; + d.scale = Main.rand.NextFloat(0.8f, 1.4f); + d.velocity = Main.rand.NextVector2Unit() * spreadSpeed; } } } diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index 70e98bab89..5b8c937ee5 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -494,7 +494,7 @@ namespace CalamityMod.CalPlayer } } } - if (calamityPlayer.bFlames || calamityPlayer.aFlames || calamityPlayer.rageModeActive) + if (calamityPlayer.bFlames || calamityPlayer.aFlames) { if (Main.rand.NextBool(4) && drawInfo.shadow == 0f) { @@ -550,23 +550,48 @@ namespace CalamityMod.CalPlayer fullBright = true; } } - if (calamityPlayer.adrenalineModeActive) + + // Dust while Rage Mode is active + if (calamityPlayer.rageModeActive) { - if (Main.rand.NextBool(4) && drawInfo.shadow == 0f) + if (drawInfo.shadow == 0f) { - int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 206, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 3f); - Main.dust[dust].velocity *= 1.8f; - Main.dust[dust].velocity.Y -= 0.5f; - drawInfo.DustCache.Add(dust); - } - if (noRogueStealth) - { - r *= 0.01f; - g *= 0.15f; - b *= 0.1f; - fullBright = true; + int dustCount = Main.rand.NextBool() ? 2 : 3; + for (int i = 0; i < dustCount; ++i) + { + int dustID = ModContent.DustType(); + if (shatteredCommunity && Main.rand.NextBool(3)) + dustID = DustID.DemonTorch; + + Vector2 dustVel = Player.velocity * 0.5f; + int idx = Dust.NewDust(drawInfo.Position, Player.width, Player.height, dustID, dustVel.X, dustVel.Y); + Dust d = Main.dust[idx]; + d.fadeIn = 0.4f; + d.scale = Main.rand.NextFloat(0.8f, 1.5f); + d.noGravity = true; + d.noLight = false; + drawInfo.DustCache.Add(idx); + } } } + + // Dust while Adrenaline Mode is active + if (calamityPlayer.adrenalineModeActive) + { + if (drawInfo.shadow == 0f) + { + int dustID = 132; + Vector2 dustVel = Player.velocity * 0.5f; + int idx = Dust.NewDust(drawInfo.Position, Player.width, Player.height, dustID, dustVel.X, dustVel.Y); + Dust d = Main.dust[idx]; + d.fadeIn = 1.1f; + d.scale = Main.rand.NextFloat(0.8f, 1.5f); + d.noGravity = Main.rand.NextBool(4); + d.noLight = false; + drawInfo.DustCache.Add(idx); + } + } + if (calamityPlayer.gsInferno) { if (Main.rand.NextBool(4) && drawInfo.shadow == 0f) diff --git a/Items/Accessories/DraedonsHeart.cs b/Items/Accessories/DraedonsHeart.cs index 553153f2ac..de265c33bc 100644 --- a/Items/Accessories/DraedonsHeart.cs +++ b/Items/Accessories/DraedonsHeart.cs @@ -45,6 +45,8 @@ namespace CalamityMod.Items.Accessories Item.Calamity().customRarity = CalamityRarity.Violet; } + // TODO -- If you unequip Draedon's Heart, you should lose all Adrenaline. + // TODO -- You should not be able to equip or unequip Draedon's Heart while Adrenaline is active. public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); From ee1f0645d9a8bb1fd0a98548ad9894fabfa41e91 Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 2 Jun 2022 23:14:09 -0500 Subject: [PATCH 08/30] Fixed a lot of minions not being affected by critter shampoo --- Projectiles/Summon/AndromedaDeathRay.cs | 6 ++-- Projectiles/Summon/AndromedaRegislash.cs | 2 +- .../Summon/AngelicAllianceArchangel.cs | 2 +- Projectiles/Summon/AstrageldonSummon.cs | 2 +- Projectiles/Summon/BabyPlaguebringer.cs | 2 +- Projectiles/Summon/CalamariInk.cs | 2 +- Projectiles/Summon/CalamariMinion.cs | 2 +- Projectiles/Summon/Calamitamini.cs | 2 +- Projectiles/Summon/Cataclymini.cs | 2 +- Projectiles/Summon/CataclysmSummon.cs | 4 +-- Projectiles/Summon/Catastromini.cs | 2 +- Projectiles/Summon/CatastropheSummon.cs | 4 +-- Projectiles/Summon/CorroslimeMinion.cs | 2 +- Projectiles/Summon/CosmicBlast.cs | 2 +- Projectiles/Summon/CosmicViperSplitRocket1.cs | 2 +- Projectiles/Summon/CosmicViperSummon.cs | 4 +-- Projectiles/Summon/CrimslimeMinion.cs | 2 +- Projectiles/Summon/DankCreeperMinion.cs | 2 +- Projectiles/Summon/DazzlingStabber.cs | 4 +-- Projectiles/Summon/DeathstareEyeball.cs | 4 +-- Projectiles/Summon/DormantBrimseekerBab.cs | 4 +-- Projectiles/Summon/ElementalAxeMinion.cs | 2 +- Projectiles/Summon/EndoBeam.cs | 6 ++-- Projectiles/Summon/EndoCooperBody.cs | 2 +- Projectiles/Summon/EndoCooperLimbs.cs | 2 +- Projectiles/Summon/EndoHydraHead.cs | 8 ++--- Projectiles/Summon/FlowersOfMortalityPetal.cs | 4 +-- Projectiles/Summon/FrostMistFriendly.cs | 2 +- Projectiles/Summon/GammaHead.cs | 8 ++--- Projectiles/Summon/HerringMinion.cs | 2 +- Projectiles/Summon/IceClasperMinion.cs | 2 +- Projectiles/Summon/IgneousBlade.cs | 4 +-- Projectiles/Summon/LostSoulGiant.cs | 2 +- Projectiles/Summon/LostSoulGold.cs | 2 +- Projectiles/Summon/LostSoulLarge.cs | 2 +- Projectiles/Summon/LostSoulSmall.cs | 2 +- Projectiles/Summon/MagicBat.cs | 2 +- Projectiles/Summon/MechwormBody.cs | 2 +- Projectiles/Summon/MechwormHead.cs | 4 +-- Projectiles/Summon/MechwormTail.cs | 2 +- Projectiles/Summon/MechwormTeleportRift.cs | 32 +++++++++---------- Projectiles/Summon/MidnightSunBeam.cs | 6 ++-- Projectiles/Summon/MiniSandShark.cs | 2 +- Projectiles/Summon/OldDukeSharkVomit.cs | 2 +- Projectiles/Summon/PerditionBeacon.cs | 2 +- Projectiles/Summon/PinkButterfly.cs | 2 +- Projectiles/Summon/PlagueBeeSmall.cs | 2 +- Projectiles/Summon/PlantSummon.cs | 2 +- Projectiles/Summon/PlantTentacle.cs | 4 +-- Projectiles/Summon/PolypLauncherShrapnel.cs | 2 +- .../Summon/ProfanedSoulCrystalProjectiles.cs | 2 +- Projectiles/Summon/PurpleButterfly.cs | 2 +- Projectiles/Summon/SandMark.cs | 6 ++-- Projectiles/Summon/SandTornado.cs | 2 +- Projectiles/Summon/SandnadoMinion.cs | 2 +- Projectiles/Summon/SilvaCrystalExplosion.cs | 8 ++--- Projectiles/Summon/SiriusExplosion.cs | 8 ++--- Projectiles/Summon/SonOfYharon.cs | 2 +- Projectiles/Summon/StormMarkSummon.cs | 6 ++-- .../Summon/UniverseSplitterHugeBeam.cs | 4 +-- .../Summon/UniverseSplitterSmallBeam.cs | 6 ++-- Projectiles/Summon/Valkyrie.cs | 2 +- Projectiles/Summon/VileFeederSummon.cs | 2 +- Projectiles/Summon/ViridVanguardBlade.cs | 4 +-- 64 files changed, 115 insertions(+), 115 deletions(-) diff --git a/Projectiles/Summon/AndromedaDeathRay.cs b/Projectiles/Summon/AndromedaDeathRay.cs index acb43562d4..3433c59a0e 100644 --- a/Projectiles/Summon/AndromedaDeathRay.cs +++ b/Projectiles/Summon/AndromedaDeathRay.cs @@ -161,7 +161,7 @@ namespace CalamityMod.Projectiles.Summon // Laser tail logic - Main.spriteBatch.Draw(laserTailTexture, Projectile.Center - Main.screenPosition, null, drawColor, Projectile.rotation, laserTailTexture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(laserTailTexture, Projectile.Center - Main.screenPosition, null, drawColor, Projectile.rotation, laserTailTexture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); // Laser body logic @@ -178,7 +178,7 @@ namespace CalamityMod.Projectiles.Summon { sourceRectangle.Height = (int)(laserLength - laserLengthDelta); } - Main.spriteBatch.Draw(laserBodyTexture, centerDelta - Main.screenPosition, new Rectangle?(sourceRectangle), drawColor, Projectile.rotation, new Vector2(sourceRectangle.Width / 2f, 0f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(laserBodyTexture, centerDelta - Main.screenPosition, new Rectangle?(sourceRectangle), drawColor, Projectile.rotation, new Vector2(sourceRectangle.Width / 2f, 0f), Projectile.scale, SpriteEffects.None, 0); laserLengthDelta += sourceRectangle.Height * Projectile.scale; centerDelta += Projectile.velocity * sourceRectangle.Height * Projectile.scale; sourceRectangle.Y += 16; @@ -191,7 +191,7 @@ namespace CalamityMod.Projectiles.Summon // Laser head logic - Main.spriteBatch.Draw(laserHeadTexture, centerDelta - Main.screenPosition, null, drawColor, Projectile.rotation, laserHeadTexture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(laserHeadTexture, centerDelta - Main.screenPosition, null, drawColor, Projectile.rotation, laserHeadTexture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/AndromedaRegislash.cs b/Projectiles/Summon/AndromedaRegislash.cs index a40ead9b3d..2e43c67237 100644 --- a/Projectiles/Summon/AndromedaRegislash.cs +++ b/Projectiles/Summon/AndromedaRegislash.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipVertically; - Main.spriteBatch.Draw(texture, startPos, rectangle, Projectile.GetAlpha(lightColor), rotation, origin, scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, startPos, rectangle, Projectile.GetAlpha(lightColor), rotation, origin, scale, spriteEffects, 0); return false; } } diff --git a/Projectiles/Summon/AngelicAllianceArchangel.cs b/Projectiles/Summon/AngelicAllianceArchangel.cs index 43e4f65ad5..0df93ef0f2 100644 --- a/Projectiles/Summon/AngelicAllianceArchangel.cs +++ b/Projectiles/Summon/AngelicAllianceArchangel.cs @@ -151,7 +151,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture = ModContent.Request(Texture).Value; int frameHeight = texture.Height / Main.projFrames[Projectile.type]; int frameY = frameHeight * Projectile.frame; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameY, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameY, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/AstrageldonSummon.cs b/Projectiles/Summon/AstrageldonSummon.cs index aace28f86d..a288773e20 100644 --- a/Projectiles/Summon/AstrageldonSummon.cs +++ b/Projectiles/Summon/AstrageldonSummon.cs @@ -224,7 +224,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture = ModContent.Request(Texture).Value; int height = texture.Height / Main.projFrames[Projectile.type]; int y6 = height * Projectile.frame; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } } diff --git a/Projectiles/Summon/BabyPlaguebringer.cs b/Projectiles/Summon/BabyPlaguebringer.cs index 6d33cceed7..86f1669d05 100644 --- a/Projectiles/Summon/BabyPlaguebringer.cs +++ b/Projectiles/Summon/BabyPlaguebringer.cs @@ -238,7 +238,7 @@ namespace CalamityMod.Projectiles.Summon int num214 = texture.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; Vector2 origin = new Vector2(texture.Width / 2f, num214 / 2f); - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Rectangle(0, y6, texture.Width, num214), Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Rectangle(0, y6, texture.Width, num214), Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/CalamariInk.cs b/Projectiles/Summon/CalamariInk.cs index f9f2621139..2398177e1c 100644 --- a/Projectiles/Summon/CalamariInk.cs +++ b/Projectiles/Summon/CalamariInk.cs @@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture2D13 = ModContent.Request(Texture).Value; int num214 = texture2D13.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/CalamariMinion.cs b/Projectiles/Summon/CalamariMinion.cs index cc6d765370..1a59f94642 100644 --- a/Projectiles/Summon/CalamariMinion.cs +++ b/Projectiles/Summon/CalamariMinion.cs @@ -329,7 +329,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture2D13 = ModContent.Request(Texture).Value; int num214 = texture2D13.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/Calamitamini.cs b/Projectiles/Summon/Calamitamini.cs index cbd41d7ff3..be4bf017a1 100644 --- a/Projectiles/Summon/Calamitamini.cs +++ b/Projectiles/Summon/Calamitamini.cs @@ -242,7 +242,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture = ModContent.Request(Texture).Value; int frameHeight = texture.Height / Main.projFrames[Projectile.type]; int yStart = frameHeight * Projectile.frame; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, yStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, yStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/Cataclymini.cs b/Projectiles/Summon/Cataclymini.cs index 052aaa539f..52923d3b86 100644 --- a/Projectiles/Summon/Cataclymini.cs +++ b/Projectiles/Summon/Cataclymini.cs @@ -236,7 +236,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture = ModContent.Request(Texture).Value; int frameHeight = texture.Height / Main.projFrames[Projectile.type]; int yStart = frameHeight * Projectile.frame; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, yStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, yStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/CataclysmSummon.cs b/Projectiles/Summon/CataclysmSummon.cs index 0b57338b9d..71076acea3 100644 --- a/Projectiles/Summon/CataclysmSummon.cs +++ b/Projectiles/Summon/CataclysmSummon.cs @@ -113,11 +113,11 @@ namespace CalamityMod.Projectiles.Summon Vector2 drawPos = Projectile.oldPos[i] + Projectile.Size * 0.5f - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY; Color color = Projectile.GetAlpha(lightColor) * ((float)(Projectile.oldPos.Length - i) / Projectile.oldPos.Length); - Main.spriteBatch.Draw(texture, drawPos, frame, color, afterimageRot, origin, Projectile.scale, sfxForThisAfterimage, 0f); + Main.EntitySpriteDraw(texture, drawPos, frame, color, afterimageRot, origin, Projectile.scale, sfxForThisAfterimage, 0); } SpriteEffects direction = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, direction, 0f); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, direction, 0); return false; } diff --git a/Projectiles/Summon/Catastromini.cs b/Projectiles/Summon/Catastromini.cs index 635aa72e1e..c0155235f4 100644 --- a/Projectiles/Summon/Catastromini.cs +++ b/Projectiles/Summon/Catastromini.cs @@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture = ModContent.Request(Texture).Value; int frameHeight = texture.Height / Main.projFrames[Projectile.type]; int yStart = frameHeight * Projectile.frame; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, yStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, yStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } } diff --git a/Projectiles/Summon/CatastropheSummon.cs b/Projectiles/Summon/CatastropheSummon.cs index f414efbd18..8afec3f1a1 100644 --- a/Projectiles/Summon/CatastropheSummon.cs +++ b/Projectiles/Summon/CatastropheSummon.cs @@ -61,11 +61,11 @@ namespace CalamityMod.Projectiles.Summon Vector2 drawPos = Projectile.oldPos[i] + Projectile.Size * 0.5f - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY; Color color = Projectile.GetAlpha(lightColor) * ((float)(Projectile.oldPos.Length - i) / Projectile.oldPos.Length); - Main.spriteBatch.Draw(texture, drawPos, frame, color, afterimageRot, origin, Projectile.scale, sfxForThisAfterimage, 0f); + Main.EntitySpriteDraw(texture, drawPos, frame, color, afterimageRot, origin, Projectile.scale, sfxForThisAfterimage, 0); } SpriteEffects direction = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, direction, 0f); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, direction, 0); return false; } diff --git a/Projectiles/Summon/CorroslimeMinion.cs b/Projectiles/Summon/CorroslimeMinion.cs index 6dde422a6c..be15e95005 100644 --- a/Projectiles/Summon/CorroslimeMinion.cs +++ b/Projectiles/Summon/CorroslimeMinion.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture2D13 = ModContent.Request(Texture).Value; int num214 = ModContent.Request(Texture).Value.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/CosmicBlast.cs b/Projectiles/Summon/CosmicBlast.cs index 6c4dc951b8..b0437b1e3f 100644 --- a/Projectiles/Summon/CosmicBlast.cs +++ b/Projectiles/Summon/CosmicBlast.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture2D13 = ModContent.Request(Texture).Value; int num214 = ModContent.Request(Texture).Value.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/CosmicViperSplitRocket1.cs b/Projectiles/Summon/CosmicViperSplitRocket1.cs index 1ce0426aeb..c7b935969b 100644 --- a/Projectiles/Summon/CosmicViperSplitRocket1.cs +++ b/Projectiles/Summon/CosmicViperSplitRocket1.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.ai[0] == 1f) { Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Summon/CosmicViperSplitRocket2").Value; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, texture.Height / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, texture.Height / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } return true; diff --git a/Projectiles/Summon/CosmicViperSummon.cs b/Projectiles/Summon/CosmicViperSummon.cs index 917f6fe491..8488a8e47d 100644 --- a/Projectiles/Summon/CosmicViperSummon.cs +++ b/Projectiles/Summon/CosmicViperSummon.cs @@ -276,7 +276,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, spriteEffects, 0); return false; } @@ -290,7 +290,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, frameHeight)), Color.White, Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, frameHeight)), Color.White, Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, spriteEffects, 0); } } } diff --git a/Projectiles/Summon/CrimslimeMinion.cs b/Projectiles/Summon/CrimslimeMinion.cs index 955c66c1e0..740f74ceca 100644 --- a/Projectiles/Summon/CrimslimeMinion.cs +++ b/Projectiles/Summon/CrimslimeMinion.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture2D13 = ModContent.Request(Texture).Value; int num214 = texture2D13.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/DankCreeperMinion.cs b/Projectiles/Summon/DankCreeperMinion.cs index 53150ca0b1..e190ad9d4a 100644 --- a/Projectiles/Summon/DankCreeperMinion.cs +++ b/Projectiles/Summon/DankCreeperMinion.cs @@ -217,7 +217,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { Texture2D tex = ModContent.Request(Texture).Value; - Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } } diff --git a/Projectiles/Summon/DazzlingStabber.cs b/Projectiles/Summon/DazzlingStabber.cs index 4a1ebc47f0..eae0446506 100644 --- a/Projectiles/Summon/DazzlingStabber.cs +++ b/Projectiles/Summon/DazzlingStabber.cs @@ -143,7 +143,7 @@ namespace CalamityMod.Projectiles.Summon // As well as how close the projectile is to pointing away from its rotation. color *= Utils.GetLerpValue(0.65f, 0.45f, Projectile.velocity.AngleBetween(-(Projectile.rotation + MathHelper.PiOver2).ToRotationVector2()) / MathHelper.Pi, true); - Main.spriteBatch.Draw(trailSegmentTexture, + Main.EntitySpriteDraw(trailSegmentTexture, Projectile.oldPos[i] + Projectile.Size * 0.5f + new Vector2(0f, 8f).RotatedBy(Projectile.rotation) - Main.screenPosition, null, color, @@ -151,7 +151,7 @@ namespace CalamityMod.Projectiles.Summon trailSegmentTexture.Size() * 0.5f, scale, SpriteEffects.None, - 0f); + 0); } } diff --git a/Projectiles/Summon/DeathstareEyeball.cs b/Projectiles/Summon/DeathstareEyeball.cs index 51bca756e8..4f9c37bb22 100644 --- a/Projectiles/Summon/DeathstareEyeball.cs +++ b/Projectiles/Summon/DeathstareEyeball.cs @@ -159,13 +159,13 @@ namespace CalamityMod.Projectiles.Summon Rectangle frame = eyeTexture.Frame(1, 4, 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; SpriteEffects spriteEffects = Owner.gravDir == 1 ? SpriteEffects.None : SpriteEffects.FlipVertically; - Main.spriteBatch.Draw(eyeTexture, Projectile.Center - Main.screenPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(eyeTexture, Projectile.Center - Main.screenPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); // Pupil drawing. Texture2D pupilTexture = ModContent.Request("CalamityMod/Projectiles/Summon/DeathstareEyePupil").Value; Vector2 pupilDrawPosition = Projectile.Center - Main.screenPosition + PupilAngle.ToRotationVector2() * PupilOutwardness; pupilDrawPosition -= Vector2.UnitY * 4f; - Main.spriteBatch.Draw(pupilTexture, pupilDrawPosition, null, Projectile.GetAlpha(lightColor), PupilAngle, pupilTexture.Size() * 0.5f, PupilScale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(pupilTexture, pupilDrawPosition, null, Projectile.GetAlpha(lightColor), PupilAngle, pupilTexture.Size() * 0.5f, PupilScale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/DormantBrimseekerBab.cs b/Projectiles/Summon/DormantBrimseekerBab.cs index 4948e881c7..acc04c7c5f 100644 --- a/Projectiles/Summon/DormantBrimseekerBab.cs +++ b/Projectiles/Summon/DormantBrimseekerBab.cs @@ -184,7 +184,7 @@ namespace CalamityMod.Projectiles.Summon } Rectangle flameFrameRectangle = flameTexture.Frame(1, 4, 0, yFrame); Vector2 flameOrigin = new Vector2(flameTexture.Width / 2, flameTexture.Height / 8 + 14); - Main.spriteBatch.Draw(flameTexture, + Main.EntitySpriteDraw(flameTexture, new Vector2(Projectile.oldPos[oldPositionDrawIndex].X - Main.screenPosition.X + Projectile.width / 2 - projectileTexture.Width * Projectile.scale / 2f + modifiedProjectileTexture.X * Projectile.scale, Projectile.oldPos[oldPositionDrawIndex].Y - Main.screenPosition.Y + Projectile.height - projectileTexture.Height * Projectile.scale / Main.projFrames[Projectile.type] + 4f + modifiedProjectileTexture.Y * Projectile.scale + Projectile.gfxOffY), new Rectangle?(flameFrameRectangle), drawColor, @@ -192,7 +192,7 @@ namespace CalamityMod.Projectiles.Summon flameOrigin, MathHelper.Lerp(0.1f, 1.2f, (10f - oldPositionDrawIndex) / 10f), spriteEffects, - 0f); + 0); } } } diff --git a/Projectiles/Summon/ElementalAxeMinion.cs b/Projectiles/Summon/ElementalAxeMinion.cs index 8f3850b45f..17db7ea70f 100644 --- a/Projectiles/Summon/ElementalAxeMinion.cs +++ b/Projectiles/Summon/ElementalAxeMinion.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { Texture2D tex = ModContent.Request(Texture).Value; - Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/EndoBeam.cs b/Projectiles/Summon/EndoBeam.cs index 734bcab70b..12f89ebcca 100644 --- a/Projectiles/Summon/EndoBeam.cs +++ b/Projectiles/Summon/EndoBeam.cs @@ -149,7 +149,7 @@ namespace CalamityMod.Projectiles.Summon // Laser tail logic - Main.spriteBatch.Draw(laserTailTexture, Projectile.Center - Main.screenPosition, null, drawColor, Projectile.rotation, laserTailTexture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(laserTailTexture, Projectile.Center - Main.screenPosition, null, drawColor, Projectile.rotation, laserTailTexture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); // Laser body logic @@ -166,7 +166,7 @@ namespace CalamityMod.Projectiles.Summon { sourceRectangle.Height = (int)(laserLength - laserLengthDelta); } - Main.spriteBatch.Draw(laserBodyTexture, centerDelta - Main.screenPosition, new Rectangle?(sourceRectangle), drawColor, Projectile.rotation, new Vector2((float)(sourceRectangle.Width / 2), 0f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(laserBodyTexture, centerDelta - Main.screenPosition, new Rectangle?(sourceRectangle), drawColor, Projectile.rotation, new Vector2((float)(sourceRectangle.Width / 2), 0f), Projectile.scale, SpriteEffects.None, 0); laserLengthDelta += (float)sourceRectangle.Height * Projectile.scale; centerDelta += Projectile.velocity * (float)sourceRectangle.Height * Projectile.scale; sourceRectangle.Y += 16; @@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Summon // Laser head logic - Main.spriteBatch.Draw(laserHeadTexture, centerDelta - Main.screenPosition, null, drawColor, Projectile.rotation, laserHeadTexture.Frame(1, 1, 0, 0).Top(), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(laserHeadTexture, centerDelta - Main.screenPosition, null, drawColor, Projectile.rotation, laserHeadTexture.Frame(1, 1, 0, 0).Top(), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/EndoCooperBody.cs b/Projectiles/Summon/EndoCooperBody.cs index 83f235202a..ef8563085b 100644 --- a/Projectiles/Summon/EndoCooperBody.cs +++ b/Projectiles/Summon/EndoCooperBody.cs @@ -341,7 +341,7 @@ namespace CalamityMod.Projectiles.Summon { Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Summon/EndoCooperBody_Glow").Value; Rectangle frame = new Rectangle(0, 0, texture.Width, texture.Height); - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, frame, Color.LightSkyBlue, Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Color.LightSkyBlue, Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Summon/EndoCooperLimbs.cs b/Projectiles/Summon/EndoCooperLimbs.cs index 9c499acc5c..1288676c57 100644 --- a/Projectiles/Summon/EndoCooperLimbs.cs +++ b/Projectiles/Summon/EndoCooperLimbs.cs @@ -138,7 +138,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Summon/EndoCooperBody_Glow").Value; Rectangle frame = new Rectangle(0, 0, texture.Width, texture.Height); - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, frame, Color.LightSkyBlue, Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Color.LightSkyBlue, Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Summon/EndoHydraHead.cs b/Projectiles/Summon/EndoHydraHead.cs index 08e2418964..33877ad532 100644 --- a/Projectiles/Summon/EndoHydraHead.cs +++ b/Projectiles/Summon/EndoHydraHead.cs @@ -217,7 +217,7 @@ namespace CalamityMod.Projectiles.Summon continue; float angleAtPoint = i == chainPoints.Count - 1 ? (end - chainPoints[i]).ToRotation() : (chainPoints[i + 1] - chainPoints[i]).ToRotation(); angleAtPoint += MathHelper.PiOver2; - Main.spriteBatch.Draw(chain, + Main.EntitySpriteDraw(chain, positionAtPoint - Main.screenPosition, null, Color.Lerp(Color.White, Color.Transparent, 0.6f), @@ -225,13 +225,13 @@ namespace CalamityMod.Projectiles.Summon chain.Size() / 2f, 1f, SpriteEffects.None, - 0f); + 0); } // PreDraw is used instead of PostDraw because of draw order. Drawing the chains after the head // would cause them to be drawn on top of the head, which we do not want. Texture2D headTexture = ModContent.Request(Texture).Value; - Main.spriteBatch.Draw(headTexture, + Main.EntitySpriteDraw(headTexture, Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY, headTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame), lightColor, @@ -239,7 +239,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.Size * 0.5f, Projectile.scale, Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, - 0f); + 0); return false; } public override bool? CanDamage() => false; diff --git a/Projectiles/Summon/FlowersOfMortalityPetal.cs b/Projectiles/Summon/FlowersOfMortalityPetal.cs index e47d75814e..0d4bded368 100644 --- a/Projectiles/Summon/FlowersOfMortalityPetal.cs +++ b/Projectiles/Summon/FlowersOfMortalityPetal.cs @@ -88,8 +88,8 @@ namespace CalamityMod.Projectiles.Summon Color drawColor = Main.hslToRgb(Hue, 0.95f, 0.5f) * 2.3f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; - Main.spriteBatch.Draw(petalTexture, drawPosition, null, Projectile.GetAlpha(drawColor), Projectile.rotation, petalTexture.Size() * 0.5f, Projectile.scale, SpriteEffects.None, 0); - Main.spriteBatch.Draw(coreTexture, drawPosition, null, Projectile.GetAlpha(lightColor), 0f, coreTexture.Size() * 0.5f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(petalTexture, drawPosition, null, Projectile.GetAlpha(drawColor), Projectile.rotation, petalTexture.Size() * 0.5f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(coreTexture, drawPosition, null, Projectile.GetAlpha(lightColor), 0f, coreTexture.Size() * 0.5f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/FrostMistFriendly.cs b/Projectiles/Summon/FrostMistFriendly.cs index 6f9d64a854..58c17ceb66 100644 --- a/Projectiles/Summon/FrostMistFriendly.cs +++ b/Projectiles/Summon/FrostMistFriendly.cs @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture2D13 = ModContent.Request(Texture).Value; int num214 = texture2D13.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/GammaHead.cs b/Projectiles/Summon/GammaHead.cs index ba4de326b6..5d97f162b7 100644 --- a/Projectiles/Summon/GammaHead.cs +++ b/Projectiles/Summon/GammaHead.cs @@ -241,7 +241,7 @@ namespace CalamityMod.Projectiles.Summon continue; float angleAtPoint = i == chainPoints.Count - 1 ? (end - chainPoints[i]).ToRotation() : (chainPoints[i + 1] - chainPoints[i]).ToRotation(); angleAtPoint += MathHelper.PiOver2; - Main.spriteBatch.Draw(chain, + Main.EntitySpriteDraw(chain, positionAtPoint - Main.screenPosition, null, Color.Lerp(Color.White, Color.Transparent, 0.6f), @@ -249,11 +249,11 @@ namespace CalamityMod.Projectiles.Summon chain.Size() / 2f, 1f, SpriteEffects.None, - 0f); + 0); } Texture2D headTexture = ModContent.Request(Texture).Value; - Main.spriteBatch.Draw(headTexture, + Main.EntitySpriteDraw(headTexture, Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY, headTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame), lightColor, @@ -261,7 +261,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.Size * 0.5f, Projectile.scale, Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, - 0f); + 0); return false; } diff --git a/Projectiles/Summon/HerringMinion.cs b/Projectiles/Summon/HerringMinion.cs index 3ce4042494..137fa312de 100644 --- a/Projectiles/Summon/HerringMinion.cs +++ b/Projectiles/Summon/HerringMinion.cs @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture2D13 = ModContent.Request(Texture).Value; int num214 = texture2D13.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/IceClasperMinion.cs b/Projectiles/Summon/IceClasperMinion.cs index 6cda1e8c30..cca625285e 100644 --- a/Projectiles/Summon/IceClasperMinion.cs +++ b/Projectiles/Summon/IceClasperMinion.cs @@ -90,7 +90,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture2D13 = ModContent.Request(Texture).Value; int num214 = texture2D13.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/IgneousBlade.cs b/Projectiles/Summon/IgneousBlade.cs index 765d72a531..a8c3ad8692 100644 --- a/Projectiles/Summon/IgneousBlade.cs +++ b/Projectiles/Summon/IgneousBlade.cs @@ -141,12 +141,12 @@ namespace CalamityMod.Projectiles.Summon Color color = Color.Lerp(Color.White, Color.Red, i / (float)Projectile.oldPos.Length) * ((Projectile.oldPos.Length - i) / (float)Projectile.oldPos.Length); float scale = MathHelper.Lerp(Projectile.scale * 1.35f, Projectile.scale * 0.6f, i / (float)Projectile.oldPos.Length); - Main.spriteBatch.Draw(texture, drawPos, new Rectangle?(rectangle), color, + Main.EntitySpriteDraw(texture, drawPos, new Rectangle?(rectangle), color, Projectile.rotation, rectangle.Size() / 2f, scale, SpriteEffects.None, 0); } } - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Rectangle?(rectangle), Color.White, + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Rectangle?(rectangle), Color.White, Projectile.rotation, rectangle.Size() / 2f, 1.35f, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Summon/LostSoulGiant.cs b/Projectiles/Summon/LostSoulGiant.cs index f0fba47dcd..b4f5df8a06 100644 --- a/Projectiles/Summon/LostSoulGiant.cs +++ b/Projectiles/Summon/LostSoulGiant.cs @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 drawPosition = Projectile.oldPos[j] + Projectile.Size * 0.5f + (MathHelper.TwoPi * i / 4f).ToRotationVector2() * 1.5f - Main.screenPosition; float rotation = Projectile.oldRot[j]; - Main.spriteBatch.Draw(texture, drawPosition, frame, drawColor, rotation, frame.Size() * 0.5f, Projectile.scale, direction, 0f); + Main.EntitySpriteDraw(texture, drawPosition, frame, drawColor, rotation, frame.Size() * 0.5f, Projectile.scale, direction, 0); } } diff --git a/Projectiles/Summon/LostSoulGold.cs b/Projectiles/Summon/LostSoulGold.cs index d0d78bc3c8..6ef69c1fda 100644 --- a/Projectiles/Summon/LostSoulGold.cs +++ b/Projectiles/Summon/LostSoulGold.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 drawPosition = Projectile.oldPos[j] + Projectile.Size * 0.5f + (MathHelper.TwoPi * i / 4f).ToRotationVector2() * 0.8f - Main.screenPosition; float rotation = Projectile.oldRot[j]; - Main.spriteBatch.Draw(texture, drawPosition, frame, drawColor, rotation, frame.Size() * 0.5f, Projectile.scale, direction, 0f); + Main.EntitySpriteDraw(texture, drawPosition, frame, drawColor, rotation, frame.Size() * 0.5f, Projectile.scale, direction, 0); } } diff --git a/Projectiles/Summon/LostSoulLarge.cs b/Projectiles/Summon/LostSoulLarge.cs index 3c99949de8..3019e30bad 100644 --- a/Projectiles/Summon/LostSoulLarge.cs +++ b/Projectiles/Summon/LostSoulLarge.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 drawPosition = Projectile.oldPos[j] + Projectile.Size * 0.5f + (MathHelper.TwoPi * i / 4f).ToRotationVector2() * 1.25f - Main.screenPosition; float rotation = Projectile.oldRot[j]; - Main.spriteBatch.Draw(texture, drawPosition, frame, drawColor, rotation, frame.Size() * 0.5f, Projectile.scale, direction, 0f); + Main.EntitySpriteDraw(texture, drawPosition, frame, drawColor, rotation, frame.Size() * 0.5f, Projectile.scale, direction, 0); } } diff --git a/Projectiles/Summon/LostSoulSmall.cs b/Projectiles/Summon/LostSoulSmall.cs index fe24660f40..5ba4d93582 100644 --- a/Projectiles/Summon/LostSoulSmall.cs +++ b/Projectiles/Summon/LostSoulSmall.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 drawPosition = Projectile.oldPos[j] + Projectile.Size * 0.5f + (MathHelper.TwoPi * i / 4f).ToRotationVector2() * 0.8f - Main.screenPosition; float rotation = Projectile.oldRot[j]; - Main.spriteBatch.Draw(texture, drawPosition, frame, drawColor, rotation, frame.Size() * 0.5f, Projectile.scale, direction, 0f); + Main.EntitySpriteDraw(texture, drawPosition, frame, drawColor, rotation, frame.Size() * 0.5f, Projectile.scale, direction, 0); } } diff --git a/Projectiles/Summon/MagicBat.cs b/Projectiles/Summon/MagicBat.cs index bf9ed7c0af..618db67ee6 100644 --- a/Projectiles/Summon/MagicBat.cs +++ b/Projectiles/Summon/MagicBat.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { Texture2D tex = ModContent.Request(Texture).Value; - Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } } diff --git a/Projectiles/Summon/MechwormBody.cs b/Projectiles/Summon/MechwormBody.cs index ebebb134eb..41f213b321 100644 --- a/Projectiles/Summon/MechwormBody.cs +++ b/Projectiles/Summon/MechwormBody.cs @@ -189,7 +189,7 @@ namespace CalamityMod.Projectiles.Summon { Texture2D tex = ModContent.Request(Texture).Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; - Main.spriteBatch.Draw(tex, drawPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(tex, drawPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/MechwormHead.cs b/Projectiles/Summon/MechwormHead.cs index d6e51bb3ac..5207fd3008 100644 --- a/Projectiles/Summon/MechwormHead.cs +++ b/Projectiles/Summon/MechwormHead.cs @@ -417,7 +417,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { Texture2D tex = ModContent.Request(Texture).Value; - Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } @@ -427,7 +427,7 @@ namespace CalamityMod.Projectiles.Summon return; Vector2 origin = new Vector2(21f, 25f); - Main.spriteBatch.Draw(ModContent.Request("CalamityMod/Projectiles/Summon/MechwormHeadGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Summon/MechwormHeadGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); } public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) diff --git a/Projectiles/Summon/MechwormTail.cs b/Projectiles/Summon/MechwormTail.cs index d89ed799f7..6f084ff56a 100644 --- a/Projectiles/Summon/MechwormTail.cs +++ b/Projectiles/Summon/MechwormTail.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Summon { Texture2D tex = ModContent.Request(Texture).Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; - Main.spriteBatch.Draw(tex, drawPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(tex, drawPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/MechwormTeleportRift.cs b/Projectiles/Summon/MechwormTeleportRift.cs index ebcd975663..284ede4892 100644 --- a/Projectiles/Summon/MechwormTeleportRift.cs +++ b/Projectiles/Summon/MechwormTeleportRift.cs @@ -71,25 +71,25 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - Main.spriteBatch.Draw(texture, drawPos, null, colorA, MathHelper.PiOver2, origin, scale, spriteEffects, 0); - Main.spriteBatch.Draw(texture, drawPos, null, colorA, 0f, origin, scale, spriteEffects, 0); - Main.spriteBatch.Draw(texture, drawPos, null, colorB, MathHelper.PiOver2, origin, scale * 0.8f, spriteEffects, 0); - Main.spriteBatch.Draw(texture, drawPos, null, colorB, 0f, origin, scale * 0.8f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorA, MathHelper.PiOver2, origin, scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorA, 0f, origin, scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorB, MathHelper.PiOver2, origin, scale * 0.8f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorB, 0f, origin, scale * 0.8f, spriteEffects, 0); - Main.spriteBatch.Draw(texture, drawPos, null, colorA, MathHelper.PiOver2 + GeneralRotationalOffset * 0.25f, origin, scale, spriteEffects, 0); - Main.spriteBatch.Draw(texture, drawPos, null, colorA, GeneralRotationalOffset * 0.25f, origin, scale, spriteEffects, 0); - Main.spriteBatch.Draw(texture, drawPos, null, colorB, MathHelper.PiOver2 + GeneralRotationalOffset * 0.5f, origin, scale * 0.8f, spriteEffects, 0); - Main.spriteBatch.Draw(texture, drawPos, null, colorB, GeneralRotationalOffset * 0.5f, origin, scale * 0.8f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorA, MathHelper.PiOver2 + GeneralRotationalOffset * 0.25f, origin, scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorA, GeneralRotationalOffset * 0.25f, origin, scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorB, MathHelper.PiOver2 + GeneralRotationalOffset * 0.5f, origin, scale * 0.8f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorB, GeneralRotationalOffset * 0.5f, origin, scale * 0.8f, spriteEffects, 0); - Main.spriteBatch.Draw(texture, drawPos, null, colorA, MathHelper.PiOver4, origin, scale * 0.6f, spriteEffects, 0); - Main.spriteBatch.Draw(texture, drawPos, null, colorA, MathHelper.PiOver4 * 3f, origin, scale * 0.6f, spriteEffects, 0); - Main.spriteBatch.Draw(texture, drawPos, null, colorB, MathHelper.PiOver4, origin, scale * 0.4f, spriteEffects, 0); - Main.spriteBatch.Draw(texture, drawPos, null, colorB, MathHelper.PiOver4 * 3f, origin, scale * 0.4f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorA, MathHelper.PiOver4, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorA, MathHelper.PiOver4 * 3f, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorB, MathHelper.PiOver4, origin, scale * 0.4f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorB, MathHelper.PiOver4 * 3f, origin, scale * 0.4f, spriteEffects, 0); - Main.spriteBatch.Draw(texture, drawPos, null, colorA, MathHelper.PiOver4 + GeneralRotationalOffset * 0.75f, origin, scale * 0.6f, spriteEffects, 0); - Main.spriteBatch.Draw(texture, drawPos, null, colorA, MathHelper.PiOver4 * 3f + GeneralRotationalOffset * 0.75f, origin, scale * 0.6f, spriteEffects, 0); - Main.spriteBatch.Draw(texture, drawPos, null, colorB, MathHelper.PiOver4 + GeneralRotationalOffset, origin, scale * 0.4f, spriteEffects, 0); - Main.spriteBatch.Draw(texture, drawPos, null, colorB, MathHelper.PiOver4 * 3f + GeneralRotationalOffset, origin, scale * 0.4f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorA, MathHelper.PiOver4 + GeneralRotationalOffset * 0.75f, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorA, MathHelper.PiOver4 * 3f + GeneralRotationalOffset * 0.75f, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorB, MathHelper.PiOver4 + GeneralRotationalOffset, origin, scale * 0.4f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, colorB, MathHelper.PiOver4 * 3f + GeneralRotationalOffset, origin, scale * 0.4f, spriteEffects, 0); return false; } diff --git a/Projectiles/Summon/MidnightSunBeam.cs b/Projectiles/Summon/MidnightSunBeam.cs index 7bff9a5bbf..93d050a24c 100644 --- a/Projectiles/Summon/MidnightSunBeam.cs +++ b/Projectiles/Summon/MidnightSunBeam.cs @@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Summon // Laser tail logic - Main.spriteBatch.Draw(laserTailTexture, Projectile.Center - Main.screenPosition, null, drawColor, Projectile.rotation, laserTailTexture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(laserTailTexture, Projectile.Center - Main.screenPosition, null, drawColor, Projectile.rotation, laserTailTexture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); // Laser body logic @@ -137,7 +137,7 @@ namespace CalamityMod.Projectiles.Summon { sourceRectangle.Height = (int)(laserLength - laserLengthDelta); } - Main.spriteBatch.Draw(laserBodyTexture, centerDelta - Main.screenPosition, new Rectangle?(sourceRectangle), drawColor, Projectile.rotation, new Vector2(sourceRectangle.Width / 2f, 0f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(laserBodyTexture, centerDelta - Main.screenPosition, new Rectangle?(sourceRectangle), drawColor, Projectile.rotation, new Vector2(sourceRectangle.Width / 2f, 0f), Projectile.scale, SpriteEffects.None, 0); laserLengthDelta += sourceRectangle.Height * Projectile.scale; centerDelta += Projectile.velocity * sourceRectangle.Height * Projectile.scale; sourceRectangle.Y += 16; @@ -150,7 +150,7 @@ namespace CalamityMod.Projectiles.Summon // Laser head logic - Main.spriteBatch.Draw(laserHeadTexture, centerDelta - Main.screenPosition, null, drawColor, Projectile.rotation, laserHeadTexture.Frame(1, 1, 0, 0).Top(), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(laserHeadTexture, centerDelta - Main.screenPosition, null, drawColor, Projectile.rotation, laserHeadTexture.Frame(1, 1, 0, 0).Top(), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/MiniSandShark.cs b/Projectiles/Summon/MiniSandShark.cs index f4a831cfdc..08c8841a73 100644 --- a/Projectiles/Summon/MiniSandShark.cs +++ b/Projectiles/Summon/MiniSandShark.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Summon { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; Texture2D texture = ModContent.Request(Texture).Value; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, texture.Size() / 2f, Projectile.scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, texture.Size() / 2f, Projectile.scale, spriteEffects, 0); return false; } diff --git a/Projectiles/Summon/OldDukeSharkVomit.cs b/Projectiles/Summon/OldDukeSharkVomit.cs index 0dc292b570..943c10e080 100644 --- a/Projectiles/Summon/OldDukeSharkVomit.cs +++ b/Projectiles/Summon/OldDukeSharkVomit.cs @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Summon { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; Texture2D texture = ModContent.Request(Texture).Value; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, texture.Size() / 2f, Projectile.scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, texture.Size() / 2f, Projectile.scale, spriteEffects, 0); return false; } diff --git a/Projectiles/Summon/PerditionBeacon.cs b/Projectiles/Summon/PerditionBeacon.cs index 25f1e0d07e..cb0752680d 100644 --- a/Projectiles/Summon/PerditionBeacon.cs +++ b/Projectiles/Summon/PerditionBeacon.cs @@ -160,7 +160,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 drawPosition = Target.Bottom - Main.screenPosition; drawPosition.Y -= 12f; Color drawColor = Color.White * DownwardCrossFade; - Main.spriteBatch.Draw(crossTexture, drawPosition, null, drawColor, Projectile.rotation, crossTexture.Size() * 0.5f, Projectile.scale * 0.85f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(crossTexture, drawPosition, null, drawColor, Projectile.rotation, crossTexture.Size() * 0.5f, Projectile.scale * 0.85f, SpriteEffects.None, 0); } public override bool? CanDamage() => false; diff --git a/Projectiles/Summon/PinkButterfly.cs b/Projectiles/Summon/PinkButterfly.cs index fd2b9cb4f7..3499f5e579 100644 --- a/Projectiles/Summon/PinkButterfly.cs +++ b/Projectiles/Summon/PinkButterfly.cs @@ -246,7 +246,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture2D13 = ModContent.Request(Texture).Value; int num214 = ModContent.Request(Texture).Value.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, spriteEffects, 0); return false; } diff --git a/Projectiles/Summon/PlagueBeeSmall.cs b/Projectiles/Summon/PlagueBeeSmall.cs index 59e064945f..6be4e0d844 100644 --- a/Projectiles/Summon/PlagueBeeSmall.cs +++ b/Projectiles/Summon/PlagueBeeSmall.cs @@ -163,7 +163,7 @@ namespace CalamityMod.Projectiles.Summon SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), Projectile.scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), Projectile.scale, spriteEffects, 0); return false; } diff --git a/Projectiles/Summon/PlantSummon.cs b/Projectiles/Summon/PlantSummon.cs index db2df809af..61f73c64c5 100644 --- a/Projectiles/Summon/PlantSummon.cs +++ b/Projectiles/Summon/PlantSummon.cs @@ -493,7 +493,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), Projectile.scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), Projectile.scale, spriteEffects, 0); return false; } } diff --git a/Projectiles/Summon/PlantTentacle.cs b/Projectiles/Summon/PlantTentacle.cs index ff7d962a23..8a2bae95dd 100644 --- a/Projectiles/Summon/PlantTentacle.cs +++ b/Projectiles/Summon/PlantTentacle.cs @@ -183,7 +183,7 @@ namespace CalamityMod.Projectiles.Summon goal += value2 * textureHeight; drawVector = source - goal; Color color = Lighting.GetColor((int)goal.X / 16, (int)(goal.Y / 16f)); - Main.spriteBatch.Draw(chain, goal - Main.screenPosition, sourceRectangle, color, rotation, chain.Size() / 2f, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(chain, goal - Main.screenPosition, sourceRectangle, color, rotation, chain.Size() / 2f, 1f, SpriteEffects.None, 0); } } return true; @@ -218,7 +218,7 @@ namespace CalamityMod.Projectiles.Summon spriteEffects = SpriteEffects.FlipHorizontally; Color color = Lighting.GetColor((int)hostPlant.Center.X / 16, (int)(hostPlant.Center.Y / 16f)); - Main.spriteBatch.Draw(texture, hostPlant.Center - Main.screenPosition + new Vector2(0f, hostPlant.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), color, hostPlant.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), hostPlant.scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, hostPlant.Center - Main.screenPosition + new Vector2(0f, hostPlant.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), color, hostPlant.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), hostPlant.scale, spriteEffects, 0); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Summon/PolypLauncherShrapnel.cs b/Projectiles/Summon/PolypLauncherShrapnel.cs index 7229d636cf..00fbb6c653 100644 --- a/Projectiles/Summon/PolypLauncherShrapnel.cs +++ b/Projectiles/Summon/PolypLauncherShrapnel.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Summon { texture = ModContent.Request("CalamityMod/Projectiles/Summon/PolypLauncherShrapnel3").Value; } - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, texture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, texture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } } diff --git a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs index 81ce0e37f1..ad996db2bd 100644 --- a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs +++ b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs @@ -127,7 +127,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture2D13 = ModContent.Request(Texture).Value; int num214 = ModContent.Request(Texture).Value.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 3, texture2D13); return false; } diff --git a/Projectiles/Summon/PurpleButterfly.cs b/Projectiles/Summon/PurpleButterfly.cs index e25f4c5811..8443681b48 100644 --- a/Projectiles/Summon/PurpleButterfly.cs +++ b/Projectiles/Summon/PurpleButterfly.cs @@ -90,7 +90,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture2D13 = ModContent.Request(Texture).Value; int num214 = ModContent.Request(Texture).Value.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, spriteEffects, 0); return false; } diff --git a/Projectiles/Summon/SandMark.cs b/Projectiles/Summon/SandMark.cs index 74d5c37441..bbfd3a07ba 100644 --- a/Projectiles/Summon/SandMark.cs +++ b/Projectiles/Summon/SandMark.cs @@ -149,9 +149,9 @@ namespace CalamityMod.Projectiles.Summon Color alpha5 = Projectile.GetAlpha(color25); Vector2 origin7 = rectangle11.Size() / 2f; Color color47 = Main.hslToRgb(0.25f, 1f, 1f).MultiplyRGBA(new Color(255, 255, 255, 0)); - Main.spriteBatch.Draw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), color47, 0f, origin7, new Vector2(1f, 5f) * Projectile.scale * 2f, SpriteEffects.None, 0); - Main.spriteBatch.Draw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), alpha5, Projectile.rotation, origin7, Projectile.scale, SpriteEffects.None, 0); - Main.spriteBatch.Draw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), alpha5, 0f, origin7, new Vector2(1f, 8f) * Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), color47, 0f, origin7, new Vector2(1f, 5f) * Projectile.scale * 2f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), alpha5, Projectile.rotation, origin7, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), alpha5, 0f, origin7, new Vector2(1f, 8f) * Projectile.scale, SpriteEffects.None, 0); return false; } } diff --git a/Projectiles/Summon/SandTornado.cs b/Projectiles/Summon/SandTornado.cs index 727bb1a00c..de78247c67 100644 --- a/Projectiles/Summon/SandTornado.cs +++ b/Projectiles/Summon/SandTornado.cs @@ -147,7 +147,7 @@ namespace CalamityMod.Projectiles.Summon vector34.Y = 0f; vector34.X = 0f; vector34 += new Vector2(value33.X, num236) - Main.screenPosition; - Main.spriteBatch.Draw(texture2D23, vector34, new Microsoft.Xna.Framework.Rectangle?(rectangle9), color39, num233 + num238, origin3, 1f + num239, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D23, vector34, new Microsoft.Xna.Framework.Rectangle?(rectangle9), color39, num233 + num238, origin3, 1f + num239, SpriteEffects.None, 0); } return false; } diff --git a/Projectiles/Summon/SandnadoMinion.cs b/Projectiles/Summon/SandnadoMinion.cs index 79218e662a..1a26afd25c 100644 --- a/Projectiles/Summon/SandnadoMinion.cs +++ b/Projectiles/Summon/SandnadoMinion.cs @@ -262,7 +262,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture = ModContent.Request(Texture).Value; int frameHeight = texture.Height / Main.projFrames[Projectile.type]; int frame = frameHeight * Projectile.frame; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frame, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frame, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/SilvaCrystalExplosion.cs b/Projectiles/Summon/SilvaCrystalExplosion.cs index bdc827c71f..c0b0a494be 100644 --- a/Projectiles/Summon/SilvaCrystalExplosion.cs +++ b/Projectiles/Summon/SilvaCrystalExplosion.cs @@ -144,8 +144,8 @@ namespace CalamityMod.Projectiles.Summon Color alpha5 = Projectile.GetAlpha(color25); Vector2 origin11 = rectangle17.Size() / 2f; Color color60 = Main.hslToRgb(Projectile.ai[0], 1f, 0.5f).MultiplyRGBA(new Color(255, 255, 255, 0)); - Main.spriteBatch.Draw(texture2D34, vector59, new Microsoft.Xna.Framework.Rectangle?(rectangle17), color60, Projectile.rotation, origin11, Projectile.scale * 2f, SpriteEffects.None, 0); - Main.spriteBatch.Draw(texture2D34, vector59, new Microsoft.Xna.Framework.Rectangle?(rectangle17), color60, 0f, origin11, Projectile.scale * 2f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D34, vector59, new Microsoft.Xna.Framework.Rectangle?(rectangle17), color60, Projectile.rotation, origin11, Projectile.scale * 2f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D34, vector59, new Microsoft.Xna.Framework.Rectangle?(rectangle17), color60, 0f, origin11, Projectile.scale * 2f, SpriteEffects.None, 0); if (Projectile.ai[1] != -1f && Projectile.Opacity > 0.3f) { Vector2 vector61 = Main.projectile[(int)Projectile.ai[1]].Center - Projectile.Center; @@ -155,8 +155,8 @@ namespace CalamityMod.Projectiles.Summon num279 = MathHelper.Clamp(num279, 0f, 1f); if (num279 > 0f) { - Main.spriteBatch.Draw(texture2D34, vector59 + vector61 / 2f, new Microsoft.Xna.Framework.Rectangle?(rectangle17), color60 * num279, rotation27, origin11, vector62, SpriteEffects.None, 0); - Main.spriteBatch.Draw(texture2D34, vector59 + vector61 / 2f, new Microsoft.Xna.Framework.Rectangle?(rectangle17), alpha5 * num279, rotation27, origin11, vector62 / 2f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D34, vector59 + vector61 / 2f, new Microsoft.Xna.Framework.Rectangle?(rectangle17), color60 * num279, rotation27, origin11, vector62, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D34, vector59 + vector61 / 2f, new Microsoft.Xna.Framework.Rectangle?(rectangle17), alpha5 * num279, rotation27, origin11, vector62 / 2f, SpriteEffects.None, 0); } } return false; diff --git a/Projectiles/Summon/SiriusExplosion.cs b/Projectiles/Summon/SiriusExplosion.cs index 9abb9823a5..a40b0f7de5 100644 --- a/Projectiles/Summon/SiriusExplosion.cs +++ b/Projectiles/Summon/SiriusExplosion.cs @@ -146,8 +146,8 @@ namespace CalamityMod.Projectiles.Summon Color alpha5 = Projectile.GetAlpha(color25); Vector2 origin11 = rectangle17.Size() / 2f; Color color60 = Main.hslToRgb(0.5f, 1f, Projectile.ai[0]).MultiplyRGBA(new Color(255, 255, 255, 0)); - Main.spriteBatch.Draw(texture2D34, vector59, new Microsoft.Xna.Framework.Rectangle?(rectangle17), color60, Projectile.rotation, origin11, Projectile.scale * 2f, SpriteEffects.None, 0); - Main.spriteBatch.Draw(texture2D34, vector59, new Microsoft.Xna.Framework.Rectangle?(rectangle17), color60, 0f, origin11, Projectile.scale * 2f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D34, vector59, new Microsoft.Xna.Framework.Rectangle?(rectangle17), color60, Projectile.rotation, origin11, Projectile.scale * 2f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D34, vector59, new Microsoft.Xna.Framework.Rectangle?(rectangle17), color60, 0f, origin11, Projectile.scale * 2f, SpriteEffects.None, 0); if (Projectile.ai[1] != -1f && Projectile.Opacity > 0.3f) { Vector2 vector61 = Main.projectile[(int)Projectile.ai[1]].Center - Projectile.Center; @@ -157,8 +157,8 @@ namespace CalamityMod.Projectiles.Summon num279 = MathHelper.Clamp(num279, 0f, 1f); if (num279 > 0f) { - Main.spriteBatch.Draw(texture2D34, vector59 + vector61 / 2f, new Microsoft.Xna.Framework.Rectangle?(rectangle17), color60 * num279, rotation27, origin11, vector62, SpriteEffects.None, 0); - Main.spriteBatch.Draw(texture2D34, vector59 + vector61 / 2f, new Microsoft.Xna.Framework.Rectangle?(rectangle17), alpha5 * num279, rotation27, origin11, vector62 / 2f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D34, vector59 + vector61 / 2f, new Microsoft.Xna.Framework.Rectangle?(rectangle17), color60 * num279, rotation27, origin11, vector62, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D34, vector59 + vector61 / 2f, new Microsoft.Xna.Framework.Rectangle?(rectangle17), alpha5 * num279, rotation27, origin11, vector62 / 2f, SpriteEffects.None, 0); } } return false; diff --git a/Projectiles/Summon/SonOfYharon.cs b/Projectiles/Summon/SonOfYharon.cs index 9dbad68088..0fc7c23a68 100644 --- a/Projectiles/Summon/SonOfYharon.cs +++ b/Projectiles/Summon/SonOfYharon.cs @@ -239,7 +239,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture2D13 = ModContent.Request(Texture).Value; int num214 = ModContent.Request(Texture).Value.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Rectangle(0, y6, texture2D13.Width, num214), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture2D13.Width / 2f, num214 / 2f), Projectile.scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Rectangle(0, y6, texture2D13.Width, num214), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture2D13.Width / 2f, num214 / 2f), Projectile.scale, spriteEffects, 0); return false; } } diff --git a/Projectiles/Summon/StormMarkSummon.cs b/Projectiles/Summon/StormMarkSummon.cs index ea6c8dae39..76521a73bd 100644 --- a/Projectiles/Summon/StormMarkSummon.cs +++ b/Projectiles/Summon/StormMarkSummon.cs @@ -149,9 +149,9 @@ namespace CalamityMod.Projectiles.Summon Color alpha5 = Projectile.GetAlpha(color25); Vector2 origin7 = rectangle11.Size() / 2f; Color color47 = Main.hslToRgb(0.25f, 1f, 1f).MultiplyRGBA(new Color(255, 255, 255, 0)); - Main.spriteBatch.Draw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), color47, 0f, origin7, new Vector2(1f, 5f) * Projectile.scale * 2f, SpriteEffects.None, 0); - Main.spriteBatch.Draw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), alpha5, Projectile.rotation, origin7, Projectile.scale, SpriteEffects.None, 0); - Main.spriteBatch.Draw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), alpha5, 0f, origin7, new Vector2(1f, 8f) * Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), color47, 0f, origin7, new Vector2(1f, 5f) * Projectile.scale * 2f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), alpha5, Projectile.rotation, origin7, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), alpha5, 0f, origin7, new Vector2(1f, 8f) * Projectile.scale, SpriteEffects.None, 0); return false; } } diff --git a/Projectiles/Summon/UniverseSplitterHugeBeam.cs b/Projectiles/Summon/UniverseSplitterHugeBeam.cs index b602ee51f6..f8c0db655f 100644 --- a/Projectiles/Summon/UniverseSplitterHugeBeam.cs +++ b/Projectiles/Summon/UniverseSplitterHugeBeam.cs @@ -154,7 +154,7 @@ namespace CalamityMod.Projectiles.Summon { sourceRectangle.Height = (int)(laserLength - laserLengthDelta); } - Main.spriteBatch.Draw(laserBodyTexture, centerDelta - Main.screenPosition, new Rectangle?(sourceRectangle), drawColor, Projectile.rotation, new Vector2(sourceRectangle.Width / 2f, 0f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(laserBodyTexture, centerDelta - Main.screenPosition, new Rectangle?(sourceRectangle), drawColor, Projectile.rotation, new Vector2(sourceRectangle.Width / 2f, 0f), Projectile.scale, SpriteEffects.None, 0); laserLengthDelta += sourceRectangle.Height * Projectile.scale; centerDelta += Projectile.velocity * sourceRectangle.Height * Projectile.scale; sourceRectangle.Y += (int)(76 * Projectile.scale); @@ -168,7 +168,7 @@ namespace CalamityMod.Projectiles.Summon // Laser tail logic centerDelta += Projectile.velocity * Projectile.scale * 38f; Rectangle tailFrameRectangle = new Rectangle(0, 76 * (Projectile.timeLeft / 3 % 5), laserTailTexture.Width, 76); - Main.spriteBatch.Draw(laserTailTexture, centerDelta - Main.screenPosition, tailFrameRectangle, drawColor, Projectile.rotation, new Vector2(148f, 76f) / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(laserTailTexture, centerDelta - Main.screenPosition, tailFrameRectangle, drawColor, Projectile.rotation, new Vector2(148f, 76f) / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/UniverseSplitterSmallBeam.cs b/Projectiles/Summon/UniverseSplitterSmallBeam.cs index b868312156..5bd3e80127 100644 --- a/Projectiles/Summon/UniverseSplitterSmallBeam.cs +++ b/Projectiles/Summon/UniverseSplitterSmallBeam.cs @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Summon // Laser tail logic - Main.spriteBatch.Draw(laserTailTexture, Projectile.Center - Main.screenPosition, null, drawColor, Projectile.rotation, laserTailTexture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(laserTailTexture, Projectile.Center - Main.screenPosition, null, drawColor, Projectile.rotation, laserTailTexture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); // Laser body logic @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Summon { sourceRectangle.Height = (int)(laserLength - laserLengthDelta); } - Main.spriteBatch.Draw(laserBodyTexture, centerDelta - Main.screenPosition, new Rectangle?(sourceRectangle), drawColor, Projectile.rotation, new Vector2(sourceRectangle.Width / 2f, 0f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(laserBodyTexture, centerDelta - Main.screenPosition, new Rectangle?(sourceRectangle), drawColor, Projectile.rotation, new Vector2(sourceRectangle.Width / 2f, 0f), Projectile.scale, SpriteEffects.None, 0); laserLengthDelta += sourceRectangle.Height * Projectile.scale; centerDelta += Projectile.velocity * sourceRectangle.Height * Projectile.scale; sourceRectangle.Y += 14; @@ -139,7 +139,7 @@ namespace CalamityMod.Projectiles.Summon // Laser head logic - Main.spriteBatch.Draw(laserHeadTexture, centerDelta - Main.screenPosition, null, drawColor, Projectile.rotation, laserHeadTexture.Frame(1, 1, 0, 0).Top(), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(laserHeadTexture, centerDelta - Main.screenPosition, null, drawColor, Projectile.rotation, laserHeadTexture.Frame(1, 1, 0, 0).Top(), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/Valkyrie.cs b/Projectiles/Summon/Valkyrie.cs index 7f8c8190ce..60743c9447 100644 --- a/Projectiles/Summon/Valkyrie.cs +++ b/Projectiles/Summon/Valkyrie.cs @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture2D13 = ModContent.Request(Texture).Value; int num214 = ModContent.Request(Texture).Value.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), Projectile.scale, spriteEffects, 0); return false; } } diff --git a/Projectiles/Summon/VileFeederSummon.cs b/Projectiles/Summon/VileFeederSummon.cs index 9b283e37ee..9214d3ea76 100644 --- a/Projectiles/Summon/VileFeederSummon.cs +++ b/Projectiles/Summon/VileFeederSummon.cs @@ -262,7 +262,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture = ModContent.Request(Texture).Value; int num214 = texture.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)num214 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/ViridVanguardBlade.cs b/Projectiles/Summon/ViridVanguardBlade.cs index 1f4c2447c1..5f11fe742c 100644 --- a/Projectiles/Summon/ViridVanguardBlade.cs +++ b/Projectiles/Summon/ViridVanguardBlade.cs @@ -171,12 +171,12 @@ namespace CalamityMod.Projectiles.Summon Color color = Color.Lerp(Color.White, Color.DarkOliveGreen, i / (float)Projectile.oldPos.Length) * ((Projectile.oldPos.Length - i) / (float)Projectile.oldPos.Length); float scale = MathHelper.Lerp(Projectile.scale * 1f, Projectile.scale * 0.5f, i / (float)Projectile.oldPos.Length); - Main.spriteBatch.Draw(texture, drawPos, new Rectangle?(rectangle), color, + Main.EntitySpriteDraw(texture, drawPos, new Rectangle?(rectangle), color, Projectile.rotation, rectangle.Size() / 2f, scale, SpriteEffects.None, 0); } } - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Rectangle?(rectangle), Color.White, + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Rectangle?(rectangle), Color.White, Projectile.rotation, rectangle.Size() / 2f, 1f, spriteEffects, 0); return false; From b0f41dffa08fb3e69a4d61c16c5258221d779420 Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 2 Jun 2022 23:22:39 -0500 Subject: [PATCH 09/30] Why are HLSL cosines fucked --- Effects/Dyes/ProfanedMoonlightDye.fx | 2 +- Effects/Dyes/ProfanedMoonlightDye.xnb | Bin 2592 -> 2592 bytes Effects/RancorMagicCircle.fx | 4 ++-- Effects/RancorMagicCircle.xnb | Bin 5292 -> 5828 bytes 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Effects/Dyes/ProfanedMoonlightDye.fx b/Effects/Dyes/ProfanedMoonlightDye.fx index bec949f33b..467893fac2 100644 --- a/Effects/Dyes/ProfanedMoonlightDye.fx +++ b/Effects/Dyes/ProfanedMoonlightDye.fx @@ -19,7 +19,7 @@ float2 uLegacyArmorSheetSize; float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0 { float4 returnColor = tex2D(uImage0, coords); - returnColor.rgb *= uColor * max(1, (cos(uTime) * 0.5 + 0.5) * 0.3 + 1.3); + returnColor.rgb *= uColor * max(1, (sin(uTime) * 0.5 + 0.5) * 0.3 + 1.3); return returnColor; } technique Technique1 diff --git a/Effects/Dyes/ProfanedMoonlightDye.xnb b/Effects/Dyes/ProfanedMoonlightDye.xnb index 38f1f5943360f5d1c02e328152d0cd88a3cc93c5..03bdc522c0fb27be4944e85e422aac000dc7b1ee 100644 GIT binary patch delta 88 zcmZ1=vOr{mJtJeoWCzAfMyAQD7!w!`CUY|_U}T%ThAESgVX_$WOGbuCEX9n|H+P*85kHge__txVoKqd9LM*7anfdcett%FB?f07&k%vhiJZ=pX9y^8$hW=@+#&bV zezG8o1n0m1T8wTHKF)HJ4+>nJyiL$yvY60?$!x+7lij%ZCg0)aU}Xdv%QHEVOMUVk z0fEUWf(ny)1bH}tf((od4g!pmA99IL-XO>}nTwlmvW_6f Date: Thu, 2 Jun 2022 23:47:19 -0500 Subject: [PATCH 10/30] Cosine. Fixed Defiled Flame Dye --- Effects/Dyes/DefiledFlameDyeShader.fx | 4 ++-- Effects/Dyes/DefiledFlameDyeShader.xnb | Bin 3692 -> 3732 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Effects/Dyes/DefiledFlameDyeShader.fx b/Effects/Dyes/DefiledFlameDyeShader.fx index 360c393701..7c56288de8 100644 --- a/Effects/Dyes/DefiledFlameDyeShader.fx +++ b/Effects/Dyes/DefiledFlameDyeShader.fx @@ -31,9 +31,9 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO float4 color = tex2D(uImage0, coords); float4 noiseColor = tex2D(uImage1, coords); - float interval = cos(uTime * 7 + framedCoords.y * 6) * 0.5 + 0.5; + float interval = sin(uTime * 7 + framedCoords.y * 6 + 1.57) * 0.5 + 0.5; - float brightness = pow((interval + sin(uTime + framedCoords.x * uTime * framedCoords.y * cos(uTime)) * 0.5 + 0.5) * 0.5, 2); // Force the brightness to rise to 1 more quickly + float brightness = pow((interval + sin(uTime + framedCoords.x * uTime * framedCoords.y * sin(uTime)) * 0.5 + 0.5) * 0.5, 2); // Force the brightness to rise to 1 more quickly brightness = brightness * (MaxBrightness - MinBrightness) + MinBrightness; // And bring it to a specified range float4 colorMap = float4(lerp(uColor, uSecondaryColor, interval) + noiseColor.rgb * 0.4, 1); diff --git a/Effects/Dyes/DefiledFlameDyeShader.xnb b/Effects/Dyes/DefiledFlameDyeShader.xnb index b0bbe6d038f7f5047f78d70d2af7a45a78f4d10a..fa0bc32b1ee34f6f0f9e325d7ae5f3e4261e05c1 100644 GIT binary patch delta 444 zcmYk3JxBvF7>3{6^|-dV>lGYSRIoY}1aT0-Qs@=8A_yG{6(_+#a1|VlxYV)4Ne~Xi ze|Yl#g6OtDeKkGPneKJ z_H6)i**Ig6??%pCf3ccl<_2Ti&E41*W7o|$t7MrX&E!FHWZVW|Q5cY>=ub0Q=Gp!G zuLu9|XQn{dFO!&n7j(SGV#h1BfR_K%ZWk0!5(k8@+XsWa+3!<#FD21+8L8;;yhI3ZZ9R!~fLqN7$O|gx&F&@3f0@C~ gG_tt!+Y1^t5ZnB#zFfy&Ew+%0jmkD9;-nJ%0Fka)pa1{> From 46eb2b5a01555ef4deb4f17192e874b318a9dfef Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 3 Jun 2022 00:14:22 -0500 Subject: [PATCH 11/30] Fixed pretty much all dye shaders + Stream Gouge --- Effects/Dyes/AerialiteDyeShader.fx | 4 ++-- Effects/Dyes/AerialiteDyeShader.xnb | Bin 3908 -> 3936 bytes Effects/Dyes/AstralBlueDyeShader.fx | 4 ++-- Effects/Dyes/AstralBlueDyeShader.xnb | Bin 2884 -> 2912 bytes Effects/Dyes/AstralDyeShader.fx | 4 ++-- Effects/Dyes/AstralDyeShader.xnb | Bin 3048 -> 3076 bytes Effects/Dyes/AstralOrangeDyeShader.fx | 6 +++--- Effects/Dyes/AstralOrangeDyeShader.xnb | Bin 2928 -> 2956 bytes Effects/Dyes/AstralSwirlDyeShader.fx | 10 +++++----- Effects/Dyes/AstralSwirlDyeShader.xnb | Bin 4496 -> 4484 bytes Effects/Dyes/AuricDyeShader.fx | 6 +++--- Effects/Dyes/AuricDyeShader.xnb | Bin 3300 -> 3240 bytes Effects/Dyes/BloodflareDyeShader.fx | 4 ++-- Effects/Dyes/BloodflareDyeShader.xnb | Bin 3600 -> 3628 bytes Effects/Dyes/BrimflameDyeShader.fx | 4 ++-- Effects/Dyes/BrimflameDyeShader.xnb | Bin 3128 -> 3156 bytes Effects/Dyes/CalamitousDyeShader.fx | 6 +++--- Effects/Dyes/CalamitousDyeShader.xnb | Bin 3520 -> 3444 bytes Effects/Dyes/CeaselessDyeShader.fx | 4 ++-- Effects/Dyes/CeaselessDyeShader.xnb | Bin 2644 -> 2672 bytes Effects/Dyes/CosmicFlameShader.fx | 6 +++--- Effects/Dyes/CosmicFlameShader.xnb | Bin 5092 -> 5008 bytes Effects/Dyes/CosmiliteDyeShader.fx | 4 ++-- Effects/Dyes/CosmiliteDyeShader.xnb | Bin 3260 -> 3288 bytes Effects/Dyes/CryonicDyeShader.fx | 4 ++-- Effects/Dyes/CryonicDyeShader.xnb | Bin 3536 -> 3564 bytes Effects/Dyes/DefiledFlameDyeShader.fx | 4 ++-- Effects/Dyes/DefiledFlameDyeShader.xnb | Bin 3732 -> 3812 bytes Effects/Dyes/DragonSoulDyeShader.fx | 8 ++++---- Effects/Dyes/DragonSoulDyeShader.xnb | Bin 3400 -> 3312 bytes Effects/Dyes/ElementalDyeShader.fx | 8 ++++---- Effects/Dyes/ElementalDyeShader.xnb | Bin 3244 -> 3160 bytes Effects/Dyes/EndothermicDyeShader.fx | 4 ++-- Effects/Dyes/EndothermicDyeShader.xnb | Bin 2584 -> 2636 bytes Effects/Dyes/ExoDyeShader.fx | 6 +++--- Effects/Dyes/ExoDyeShader.xnb | Bin 4068 -> 3992 bytes Effects/Dyes/NightmareDyeShader.fx | 4 ++-- Effects/Dyes/NightmareDyeShader.xnb | Bin 3064 -> 3116 bytes Effects/Dyes/PhantoplasmDyeShader.fx | 4 ++-- Effects/Dyes/PhantoplasmDyeShader.xnb | Bin 3608 -> 3636 bytes Effects/Dyes/ProfanedFlameDyeShader.fx | 6 +++--- Effects/Dyes/ProfanedFlameDyeShader.xnb | Bin 3512 -> 3540 bytes Effects/Dyes/ProfanedMoonlightDye.fx | 2 +- Effects/Dyes/ProfanedMoonlightDye.xnb | Bin 2592 -> 2620 bytes Effects/Dyes/ReaverDyeShader.fx | 4 ++-- Effects/Dyes/ReaverDyeShader.xnb | Bin 3116 -> 3144 bytes Effects/Dyes/ShadowspecDyeShader.fx | 10 +++++----- Effects/Dyes/ShadowspecDyeShader.xnb | Bin 4152 -> 4372 bytes Effects/Dyes/SlimeGodDyeShader.fx | 4 ++-- Effects/Dyes/SlimeGodDyeShader.xnb | Bin 3744 -> 3772 bytes Effects/Dyes/StratusDyeShader.fx | 8 ++++---- Effects/Dyes/StratusDyeShader.xnb | Bin 3816 -> 3912 bytes Effects/IntersectionClipShader.fx | 6 +++--- Effects/IntersectionClipShader.xnb | Bin 3148 -> 3404 bytes Projectiles/Melee/Spears/StreamGougeProj.cs | 4 ++-- 55 files changed, 74 insertions(+), 74 deletions(-) diff --git a/Effects/Dyes/AerialiteDyeShader.fx b/Effects/Dyes/AerialiteDyeShader.fx index fbe1872edd..22b2b4ee27 100644 --- a/Effects/Dyes/AerialiteDyeShader.fx +++ b/Effects/Dyes/AerialiteDyeShader.fx @@ -29,7 +29,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x) return saturate((x - start) / (end - start)); } -float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0 +float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0 { float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw; @@ -52,7 +52,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO float4 metalColor = lerp(color, float4(BlendColor(color.rgb * 0.6, uColor), 1), 0.7); // And mix it all together. - return (color * 0.35 + metalColor * 0.65 + updraftColor * 0.8 + cloudColor * 0.3) * color.a * 0.85; + return (color * 0.35 + metalColor * 0.65 + updraftColor * 0.8 + cloudColor * 0.3) * color.a * sampleColor * 0.85; } technique Technique1 { diff --git a/Effects/Dyes/AerialiteDyeShader.xnb b/Effects/Dyes/AerialiteDyeShader.xnb index 38221656d5a9ca2154360cf0c7c63a6226a47d7c..079c6f5f7b57a0d626d6b5519b08c1d61ef12aa3 100644 GIT binary patch delta 96 zcmX>i_dt$4!q2Ikl`&x=`&`By8<(;$GP^Sz*t~{OpOKMa^Btx?OpGm?Z?e|2334$o uG%zsmPmpI|U}6Qb87If`02OWS<&kCtQY(3T7`Ykvfl8i$@Px?*{2~A=yBUE1 delta 84 zcmaDLcSMdo!q2IkmCU P*#%VulR66elSB&~4M!3q diff --git a/Effects/Dyes/AstralDyeShader.fx b/Effects/Dyes/AstralDyeShader.fx index d894a8dd54..d3539b40f6 100644 --- a/Effects/Dyes/AstralDyeShader.fx +++ b/Effects/Dyes/AstralDyeShader.fx @@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x) return saturate((x - start) / (end - start)); } -float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0 +float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0 { float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw; @@ -42,7 +42,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO // Become notably darker to reinforce the stone aesthetic. stoneColor.rgb *= 0.2 + noiseColor.r * 0.65; - return (stoneColor + flameColor * 0.4) * color.a; + return (stoneColor + flameColor * 0.4) * sampleColor * color.a; } technique Technique1 { diff --git a/Effects/Dyes/AstralDyeShader.xnb b/Effects/Dyes/AstralDyeShader.xnb index 49f8351accf1a8ad266664266d9fe9442be62051..0f7330cf1be34d58f68a27dba7d9feff6129d59c 100644 GIT binary patch delta 84 zcmaDM-Xg&f;pbG&%E-bqkz)>H%*3U$7#k)#Fn(iVW|(ZjRLsaQc@0x0b5a4@W(nqK oMn;v*B`hh7j2fG7vVLS{;-9ej0H**G2Lr>C1|Xg=`2@ED00KD}vj6}9 delta 72 zcmV-O0Jr~y80Z%WSWZHB1p(*_kqDdtK#`@I0RWRg0rmo_pp!TPa{&dDtO98R0RRBA e7z0}Y0Zy}Y1Y`jL471q<@dLBg2?hd_>vNX4=0xJUp aGXn#E0|Ubo5S{>3%f!F|;s5{7zyJVpP9jYJ delta 93 zcmV-j0HXhl7w{GbSWZHB1p#o82b}@Pk)@ge0FyugX#on8ssW7wfRi`^a{&dDtO98R z%VY(!7z4lp0hF`Z1%U*UW(ueQ0h1347Xbj1CksUo0RR9300<9&0088G|Nj60I^i1A diff --git a/Effects/Dyes/AstralSwirlDyeShader.fx b/Effects/Dyes/AstralSwirlDyeShader.fx index 33f9cb17f5..4ca2d68511 100644 --- a/Effects/Dyes/AstralSwirlDyeShader.fx +++ b/Effects/Dyes/AstralSwirlDyeShader.fx @@ -26,18 +26,18 @@ float2 InverseLerp(float2 start, float2 end, float2 x) return saturate((x - start) / (end - start)); } -float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0 +float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0 { float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw; float4 color = tex2D(uImage0, coords); - float interval = (cos(uTime * 2.2 + framedCoords.x * framedCoords.y * 1.55) * 0.5 + 0.5) * 0.6 + 0.2; // A complex function that works based on the X and Y coords with a 0.2-0.8 range. + float interval = (sin(uTime * 2.2 + framedCoords.x * framedCoords.y * 1.55 + 1.57) * 0.5 + 0.5) * 0.6 + 0.2; // A complex function that works based on the X and Y coords with a 0.2-0.8 range. float brightness = 1.35; float3 returnColor = uColor; // Rotate the colors around and adjust the brightness. for (int i = 0; i < 4; i++) { float2 positionAt = float2(interval, 1 - interval); - positionAt = (RotatedBy(float2(cos(uTime * 1.7 + i / 4 * 6.283), cos(uTime * 1.9 + i / 4 * 6.283)), uTime + i / 4 * 6.283) * 0.5 + 0.5) - positionAt; + positionAt = (RotatedBy(float2(sin(uTime * 1.7 + i / 4 * 6.283), sin(uTime * 1.9 + i / 4 * 6.283)), uTime + i / 4 * 6.283) * 0.5 + 0.5) - positionAt; float dist = distance(coords, positionAt); if (dist < 0.35) { @@ -52,12 +52,12 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO returnColor = lerp(returnColor, uSecondaryColor, (framedCoords.y - 0.5) * 3); } - return float4(returnColor, 1) * color * brightness; + return float4(returnColor, 1) * color * sampleColor * brightness; } technique Technique1 { pass DyePass { - PixelShader = compile ps_2_0 PixelShaderFunction(); + PixelShader = compile ps_3_0 PixelShaderFunction(); } } \ No newline at end of file diff --git a/Effects/Dyes/AstralSwirlDyeShader.xnb b/Effects/Dyes/AstralSwirlDyeShader.xnb index 3149938b49b883b20ce6f7dffecc2d1b5bc1fcbc..82bf612a58f48fd3a4adb9f744dedbd8c26fee67 100644 GIT binary patch delta 902 zcmY*XF^dyH6n--T1oyK~vM%zN*9@B7}HExNniWc&W`c`SDKlUL%$ z+t>R-t`E$Hd?tRG1Nlfkd0L)VpX7x%O(IfN^|#uhdk^joFT!mLj+MV-Aw;h{s=ZfA zpAlx7t(lK$Bw}+p>ll}An49TK^R9W@>}6Sb)Rf{sSZ>bd9g&;${D#QOoxCfu&wsx3 zUo5U{qJ7`&wJwc&y>j#0*MmL+cm{(lqBx_rCDJ~I{D;Ti?+k7s4qbOiWK^z$(+p&;R|X9P~F*(7s$BYedASL(FmlK zZ@@9RBuQz8n#vPP)Ih)_I~EedpHCD93&MC%HxV>19*+GwSj10n8Hf|FEC{QeI)~y2 zIMNviSE7PnO_?xkCeiV7Gm2UsA5j7FLUWB;ipGCu$4wA&QH0>hxrGLWy@nk^>ESkt zB3uWrKO(0U>^fLa1dNayO(j*H0PWak18Fsh{dI&`6I(imQb`HtcXZ7wU1%mDA0#wc lU}cW)5<}N9E!oh-{}U*55Xg7Tq8wY{{d$`P_*hjD{R8X1vY`L~ delta 900 zcmY*XJ!lj`6#m}q?fva;4z&=1ki)}9D-DE*kc(#@2zU?#3(GV%7Fv08Xb~aBh3y1k zudvyqI9ZL2L@WaeVr#pFwWP6e{od?)o(Fq7@0<7iyxDo)oAeqxTZ6~GOb!~amxj=Nzu z&fDwplkh3)t$4rPjAv0TI}40xgM{(9XodgRqiYgo_oJSK&wgFrpje*|;{B!W=;8OZ zO~Ce7SF?>TpO5<6fFGih0Gq`B{S=QJZb`Nub%&f2#g~Xn^!43?;Q0MvdiB?UEhGw2{W+U)y6M0etYP!}vL2et! zr#|}yz7?DjKTXP7Sc6ZhZ)4!w)|_AN(NOm)%~1)qFicuVlMBwY#7fh0-6o;Uo+}LE zp~RLb+*uH3dYYw9=YMWWZc!O(VAzO(BXZ4XK1DwE2r`{#IH};jBa1VCp&CZ+Is|SlgGCmtVbY$_EJPF=j?wq@gtG>Sy$*TM4Mz)tR0N*sf z%{fjlPKG;dw?wh(tJ4+9tDku6)5+xhD9`ib`E~EGzYDk?5P+=Ey2D!Fi}|v5Fcs7V zP=^ThGj*K6kvJ+NfS=VQk9bgW&;!DI6+^j6!kW|GwS0Ok_y4tYmb}PxTAt_pM~E?+ zmO~TG2-HE+y4+(gt4CtImOAW^1c%y82{u%aeGxng!yLR}2{{QqP17SI#&FcsFhUK_ zH|S(0_zr5sW11;o7i*HUw6$TWnMqa1PGYIFZ|GjP)z;LYX{%>3no@f;&AD01ULR8f zs*|pQSg1<^U9P@M(wHv2ks2d1aZpqIZ?>I;zeN+YD{L`tt*}1Lf~P6nV$%SBu_}6t delta 633 zcmX|8u}T9$5PiFs%Uu#Ag@{H3ZEVEK*oeVk>?5L)fHp!%F9?>|bg`7w!dVF6(nNyV zh~MBxEPjBsxW3tofgN^d=FOWov!jZwMD1qdHdOXLdQi3Jr)#Y{;dCXqP^vk-$#v9f z90AbI{kl^eogFsT=q@XXO~1o}QajV1d^?D%)oQ)l{W=(47I$kWKv+aMQ460hSEbjt zak{mCHyG?myu|o8P2b7z0hl`P`a0Qo8z7hrN5$<;!vq|NHjBlx8n7lCOmOT=jOz=Q;(MH|{2w$j zy(UPM3P8ZI7bIlXTg2%#x23rqPCS28AcgyQKTnb3&qVfP`m(8vTR8tko=3h>f!|Od js7(RN3vj-fh{(RgZ^&;zL}hCi;Z8Qk8|8*BNF7Rt5%U1_u5H28JgfJb{scfr)_w K!vFuDfdK$xryQFA delta 92 zcmV-i0Hgn`9FQCbSWZHB1pyF|2b}?Ev84n70ssJ$s{xAw|A3P?0&@WcldJ+S0d$kx y0yzWJWCgPr16u(BPP23bWB~y*v)Kh@1hYyC!UGTi000622oHb&0OWxG{{R5gG8$X} diff --git a/Effects/Dyes/BrimflameDyeShader.fx b/Effects/Dyes/BrimflameDyeShader.fx index 76224fb027..069956a418 100644 --- a/Effects/Dyes/BrimflameDyeShader.fx +++ b/Effects/Dyes/BrimflameDyeShader.fx @@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x) return saturate((x - start) / (end - start)); } -float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0 +float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0 { float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw; float4 color = tex2D(uImage0, coords); @@ -36,7 +36,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO float3 flameColor = lerp(alteredColor, alteredSecondaryColor, fadeToRed); flameColor.r = 0.6 + sqrt(fadeToRed) * 0.4; color = lerp(color, float4(flameColor, 1), 0.45) * color.a; - return color * lerp(1.3, 5.4, pow(flameStreakBrightness, 4.44)); + return color * lerp(1.3, 5.4, pow(flameStreakBrightness, 4.44)) * sampleColor; } technique Technique1 { diff --git a/Effects/Dyes/BrimflameDyeShader.xnb b/Effects/Dyes/BrimflameDyeShader.xnb index 6e1bf8331b896ead6b81941c744c5dea73d509ab..74666725e8229b8e78507ed73f07f336ddf9e853 100644 GIT binary patch delta 117 zcmdlXaYceX!q2Ikl`&)@`&`B~6PM0nY?$o8n8}=3k~w(|V;m#HWNs#HCI*Jd7EHxJ z&Kjmn=A;6)%@WMfjEoGMOIT7E87ns5WWCD5#6My460R0T1y%+IW(EfS1_p*FAUuJQ Pfq{vE1H%9RpMe1Ywr(I8 delta 98 zcmV-o0GMiC+9xAtBp-C zzh$2p%-`Fm34r!e^2C^4dz4Pi?(3XL;{6~05Vs#4jIXfVF~Zs(S>Kql{oT8pJa!|X zK6vr#+8$f`4}h$|(47uHk4}eomSy>ERF>_Y@ILV`C-*)A%YC5Y!KbT$-C_X@Yuz*6 z4U&5Pb?e3~=XF&Bt1824!4@+PNPWvQb&O&SOw|Wm3g{!=@J!U>topXfS*s~70zRp1 zHzQ2k9F5E2-NjB*SUT&5R1_R2D0H0!+YN0*DMkSw1fpq5e&b>&t3Whqj+y>H?5rte z1Mlq2{N-RU3vN<~>sv(+ZX5R)-#c-}d?Je>mA+S|Si3l5!c4)0amI#~RfAd^4&bQ^ zZUI^-jjwu`Z3?ZR)%8!-K}dI*TCA&-SQJXsCywfn&&NExHytLPu#_11-~59AZV`10 z){WBwh6_-m1{c_#lAVN&nqVYx8AXz>lCB0!CpvMA&!>*>DbX10Lg>qQJ7_ArLNw0K YkI(Pil=43{y`ff)ZYWf*b!zW{zkzS2P5=M^ delta 913 zcmZ8fF>4e-7=1Ido87z1abUn4Q4j<{(&;sdkh`3fB7*2az)DDCVWnWXBQ~*%T&plP z78{Gmp(04QR#31{>HY$-5ybVq*<28p9oX;9_r3SN@7tei^HbT@&GF;Z%%5j3ZNK~W z^{%n-(@XZDNvCh@eP_1QS>N3?2D3-Wwppt(0Jg6G)VFc<&gS?u!&M_}_9JZ>b8+^2 z>AEX+H=q7GyFqw37nFTB#(?ra`h@hQU)1P3XMRo#=h%jgdZlml ziYlmY;?eg)tVxpZGKgTz9ETnaRNmxOP@FK1^JCm_STEE0kzorPITdRLiySr40@xTV z3JMEYii1f=SZavYAd^_^Qr`_;v8zVRMe?|eNUSMp@DkdJ%hDpXh>E6E2fYz%Q@qV- zNaum!hFf%ag10tyBm*kYUjZj9;kHGjSor{0GYJ%A!-lasDnoPMXTAQ8+Kbc0M(TKP ZrWd-a=NFcgji`vIC_BjGOnqGge*rszz2pD@ diff --git a/Effects/Dyes/CeaselessDyeShader.fx b/Effects/Dyes/CeaselessDyeShader.fx index 8b6b8554af..0fbb61a21a 100644 --- a/Effects/Dyes/CeaselessDyeShader.fx +++ b/Effects/Dyes/CeaselessDyeShader.fx @@ -27,14 +27,14 @@ float2 InverseLerp(float2 start, float2 end, float2 x) return saturate((x - start) / (end - start)); } -float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0 +float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0 { float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw; coords.x += randomness(uTime + framedCoords.y).x * (1 - framedCoords.y) * 6 / uImageSize0.x; // Add an X offset based on a noise function, giving a moon lord void-esque shader effect. float4 color = tex2D(uImage0, coords); float4 returnColor = color * 0.1; returnColor.a = color.a; - return returnColor; + return returnColor * sampleColor; } technique Technique1 { diff --git a/Effects/Dyes/CeaselessDyeShader.xnb b/Effects/Dyes/CeaselessDyeShader.xnb index 2d2971eff7122a7c6b0577f53c1b1a918e53eba9..02571b5f184576cd74fe50eb49199b730882cb46 100644 GIT binary patch delta 187 zcmca2@!q2Ikm9bzV`&`Bo6PM0nY?$o8_>GBS|6~iMVn(*fYnU>b!wT3oOE5<> zGOBDYVM$?RoU-{Q>vbm8vuDoOG5|p!0|P4u1OEa>-V0k3xwma!y-Lfvv!lZjB+fbc zEr%=<|Aa}L2Y_mxEa04cl(W={y@7$@2?$SMWME)oWMFS#XIQlW!sY;q|DV9hz`)GF VzzGCFVX_5NF(d2bHB6bzj0~)sC77cb z8T~ewu%s|DR&2h>dYws?0SW>c7+5(N_!pc#bH)~i85kPuLE@Z~_i~7fZ~*;t|NjgO0Lw)%#sB~S diff --git a/Effects/Dyes/CosmicFlameShader.fx b/Effects/Dyes/CosmicFlameShader.fx index 624511762c..5ecb960b59 100644 --- a/Effects/Dyes/CosmicFlameShader.fx +++ b/Effects/Dyes/CosmicFlameShader.fx @@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x) return saturate((x - start) / (end - start)); } -float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0 +float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0 { float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw; float2 swirlOffset = float2(sin(uTime * 0.26 + 1.754) * 0.31, sin(uTime * 0.26) * 0.16) * uSaturation; @@ -46,12 +46,12 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO // And create stars based on a noise texture that rise upward. color = lerp(color, float4(starColor, 1) * color.a, fadeToNormal * pow(brightnessFactor, 6) * 0.15); - return color * (1 + brightnessFactor); + return color * (1 + brightnessFactor) * sampleColor; } technique Technique1 { pass DyePass { - PixelShader = compile ps_2_0 PixelShaderFunction(); + PixelShader = compile ps_3_0 PixelShaderFunction(); } } \ No newline at end of file diff --git a/Effects/Dyes/CosmicFlameShader.xnb b/Effects/Dyes/CosmicFlameShader.xnb index b2851d29389e3b65d7593466d0aa590036f77534..77399b244c8b9ec062c7bcbbcaea96377df5bd4c 100644 GIT binary patch delta 801 zcmY*VJ!=$E6g_X=t}~k1o$Rgz4Z>Ekg((CrqQzugQ)m+qG9X&mtcxNdXuxvc7FH=7 znaTxW(pZFu$XdiIY5fhsZjcql!XM!C+&AM_apB!_&b#N_TlCVNe{*B-w64+@{wr_Z ze)n1{{p9{uwx_lgvQ_Vse)Jf#Q~I`2li5~nsFvS10BCD}+5}fOuMEzx?JB`$Kk6-| zFWfnwO@oWG%lxjuX=OC# z{9F9#X-cfv=`fD)?5`OysTvN13!xZ7#1f+IOg+)%m4UhCFh$dEt`=akudUt#b30Yr^S6Sm?5$A{!)?aDC)9c3jsgMu{?<1@)bFwuY*S28Ml*uFFl*(auf zlX-)>($}jn{MU<4*5(-UyGG{yeuqFFGWS_`7Ww~|myPB0Qamls<{O`0F3$!V5zDEL xxu7BlxU?+=)fqKI^X`)}pae)<{TrBbvge(yvf0~CciFm`jt^w%LMpWu_ytWxups~d delta 867 zcmYLHO>5Lp6umDmF@c#(CKIS16|#~6?Lv#7^22i!R5Sx3Kcg> zRt|{i#zk78GN=`#b?eTByW%d0Zv6p1&wZJ(i;&!N&pG$J`|`Y9w%z4hy~mCyU%0QV zE77|*Qb;1ow#75CmtC}e$nUGpSH%ghfxe~nU!BtR{4-GdN41RVP zZy20e)Qz8<*-z87%Xk3%?e;?F_pi0ir`=unsD$w*@M@k)jEd;084#i&{BQ3c)INON zDo$U1y0Njuf)?UN8r|o@*Zl70^={d($o^Q1b135OB(>E zArROA86Y4S=uHj;$e0U=faNWNc|0ta2nm6@XE0%S90Yfny$;(eY2Kh>>KdX;=;-MY zm`x)eF4a^%HYp!{o+^;aCanT0QJ13`R;{K~c6P3{G-Qp2Ce3}!sa8>~uS#Bh*D<3G z&MD(tVIh25#+yL3%)0r+{NS&%1i8wc_W64@_Xx16?gQx;?1W^v{iM#hHCB`hh7 gjDI%YWPQoP#6My44z4$h91ILk8i07hSWZHB1p&N~2b}>Fv89m#0zeRxI0AD41(U1-Y5@SV7Xw@Y0id&V W1Y`jL;Ir8U=>)UR3gQ8izzi6NClv$$ diff --git a/Effects/Dyes/CryonicDyeShader.fx b/Effects/Dyes/CryonicDyeShader.fx index cdd28b50c5..cc73f53ef9 100644 --- a/Effects/Dyes/CryonicDyeShader.fx +++ b/Effects/Dyes/CryonicDyeShader.fx @@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x) return saturate((x - start) / (end - start)); } -float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0 +float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0 { float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw; float4 noiseColor = tex2D(uImage1, float2(frac(framedCoords.x + uTime * 0.1), framedCoords.y)); @@ -39,7 +39,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO if (normalizedDistanceFromCenter > 0.7) fadeToSecondaryColor *= saturate(1 - (normalizedDistanceFromCenter - 0.7) / 0.2); float4 endFadeColor = lerp(float4(uColor, 1), float4(uSecondaryColor, 1), 0.5); - return (lerp(color, endFadeColor, 0.3 + fadeToSecondaryColor * 0.6) * color.a) * (1 + brightness); + return (lerp(color, endFadeColor, 0.3 + fadeToSecondaryColor * 0.6) * color.a) * sampleColor * (1 + brightness); } technique Technique1 { diff --git a/Effects/Dyes/CryonicDyeShader.xnb b/Effects/Dyes/CryonicDyeShader.xnb index e7e3077218f2c7193ac53d3c85ae16800cff025b..b2bbcb543a627cca733dc5d2d5090b3769de3abe 100644 GIT binary patch delta 91 zcmca0{YIKS!q2IkmGR9)_PLBM6PM0nY?$o8_>HMiaIytcF(cdLHB4Ddc?_E+n4=jP u88(-&q%blGaBRNCn!w7$KVh>0w+xd2D+2>F0|S2p1H%&#o-o;mw*>(52pK*A delta 71 zcmaDOeLGByd9nplF_5!{DT|4Lb+ZI>G$W(m b<`R|^My4<9n{Tluux@ta7Gj#5!P^1=1}zl9 diff --git a/Effects/Dyes/DefiledFlameDyeShader.fx b/Effects/Dyes/DefiledFlameDyeShader.fx index 7c56288de8..d2a82133cd 100644 --- a/Effects/Dyes/DefiledFlameDyeShader.fx +++ b/Effects/Dyes/DefiledFlameDyeShader.fx @@ -25,7 +25,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x) return saturate((x - start) / (end - start)); } -float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0 +float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0 { float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw; float4 color = tex2D(uImage0, coords); @@ -40,7 +40,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO colorMap.rgb *= brightness; colorMap.rgb = colorMap.rgb - colorMap.rgb % Variance; // Slice the return color map to make pixels appear less varied and more extreme - return colorMap * color; + return colorMap * color * sampleColor * sampleColor.a; } technique Technique1 { diff --git a/Effects/Dyes/DefiledFlameDyeShader.xnb b/Effects/Dyes/DefiledFlameDyeShader.xnb index fa0bc32b1ee34f6f0f9e325d7ae5f3e4261e05c1..9ad552827de0f0e09911ccb90033d6423b9863df 100644 GIT binary patch delta 132 zcmbOt`$U#K!q2IkmGQ|$_PIaa2KPuTp2yNAh^k%7H|f#FF5P#qH^0|$`(e*!B515h77Q0xgvZURV- S0jv%p#{iTA>zUlhCkz0jrXK15 delta 67 zcmV-J0KEU?9h4mhSWZHB1p$TZ@c6s0Iz8t-Y)n$5Mj?~t{=R;*@ zLv^M1lG#)JJ$km6oZO2RdTq4}Aad@ndydUl8>5GWU%3#?e#BqYlao)$d%d#`*x@!1 z8)Sv-xrAGAoeJOcJS?$PlOHaG@00)Y`|aT97~>*FS={l$AukAreZu^NIgc4vSdM!kd%Zqz9po~3 z0Lu-uZvYzv6o(nxgyM?-hU4^>H&=8iDppWePUP3kAsdad-~sn{y<@4RKCHou!qAr3 zH!*b+?*N-Ng|3bV+-;o*IMg;VSGy#=oDH!K_oc^SIEj@u50kgSeZdNu5B4~eOsdh9 zE1IOlDclk_p7hCS-m&B%6!&s*`p ziTJ#b2Nvv^t`8$`4EV`I?NoN;ZO;h!dQEt#8ix1XSe~(Q#e%A~Qrz)) N>a8^a_nGe;@DG=B%P#-` delta 1090 zcmZWoziSjh6n-U}m|}$3 zOqxhg8;JoeV&^|#w|{_G2!c9(Z{F=CmlVU!``&xs_sz`PA7>91velczhlyJ0t!JCc zuD{t(R4=Jtny9{_zenl;?VgGD^}_v>h_v_r{B>HsePehY;U_H8_0Qz3y1cv9d7+CX zBC~&sD9P%(`Mk>OC;5C?P~QSy#M;|<`Fp@!T+;>q<@563>%q$6^Jk}#7kmcz-#?EA zo3GA=+7|BtSG{lV?seaP*mjq$JziV8$~?2cx1IZlx;8 zmD6BCBb$)3r-HB)im>cEAnBmyBFtzKtOv2#V}jE>VnTRiKjA4s6p?_(iEtIB12Y9NvOYBf>~l9Ba%1=Q3O`H*>7<*1XtUL@D=G zUF5qkcZiLu8DN-^P^UwktMU_A=|dqCvU45Ggn@yWoE(D^%tS%lPt0)40M|}~zc5&3`jao*@s9u9oZH+Eo|@Iy#hLy! zzz@*NSxfo6;~O!?_)&P`tO5aFwzdSOA}^8be?1o6ejfMV@1C+`;qCF;a3$%mx-psb zKYzLs6|YXut6kzdzwSg&)(%AQ0iRg9aorg7iD5E7?_mI=>?BPHP)aeR*(~uQ{)Hj5RY|X&|_mZ&wX-EvToos z>V~m;#yZ(UcZ4Nz>Y>UB@|=N+n}h1h&APvD(Bi&^NTgo!xUGaB_5Tqb(;?OpTa>Ee zp#Xyx<2VgypK=F1o41$`t-u3vX4FNNcPV^<#iI@}*{Y#()X*KD9Jy8J5;3dQf|6MS z4jZ+n4Hj5DTH1#d|KU~h;q@@b{(SX95@M~NE*RK6z_u1l?1m!DHZ3;uAPD`;b5X(z%4SHY`<0|Qss2$muUf>rv~O z_T!f?Jf-4Ep>8R4d$QtPSIVE<^>3;Z(@;coRsE^fybFV|8UU&O~fvrZ*tj`KV~0131`kQksP%0aFJeE0+jD#XoW z1vn`H_aF^i{L~7|- zVGc`&k@PY{#WP}IiHleTwLQz@Zn-;(q42r8orso@ID~#NO=Gm#*g+WVB&mcrt;Jfq{vUfxUs1;r{{%o1=k&;r|3y1_ovZ27Vy> TNdqGoGcYl5K=}XvGcW)E&K(|j delta 83 zcmV-Z0IdJa6qpnTSWZHB1pye52b}?Mv881J0%>%U3<4?wba|6F0^I`u006TX16u(B pPP23bWB~y@v)KhT1CtsF_7nvG|DXW?00ICA4}bswW2^ZUdHP9sQy;} zzIgQEjZ%3}eO1Vt`nrDfG{2>vt6Kh1-z0RVZ>wkHP4h(&I*YbdZQP1qsLQPt0LHn$ z?iKbQ-`%^y@RJg3{H``qYJ1#kyx04%fITHV0eX{%K-@-BFy=4d{eG<{c!&7+Z})e| z+wJ%JyS(2Kd_BL@+&t)ptRB;NBWgI6+YOHwj3@kl^0SjIK(F!uBttpJJS&)Co;7b= zQ>cbOWiOx_(XLj|b_Hn>0rF>3N^+Y2XxMOfNLaJ98^mUL1}=+G4LoT9B8#Vq3oOlQ=dd!XFBPc!0&S1M zMDv2VFBsFPVMAhm(NL4vAf@}0BF4$QOM}w8H~2HhbZ}eDI+qD?l-}$z7R)YV!R#{T zvIfnV0Y}u~C?g62j*etxmE}H-h9OpQb(LS8M#R{!&T{u7;qXuXFRl*7o{weJl~s+9 z!|lroxNc|H$O%tCu++BUMgtL)Q3GpUyo-aP%Ys2%drXY2Q%S^xAMP4Fmp&Fz1vQUb z^S35^&v~7|`BjJp-ggNcBNN=44jjksXYmuCMA2#}fUZ^4TWTNsW%de VL2EIVe@-qX4cUjxzp~B&{{R-G|A_zq delta 1258 zcmZXSO=}cE5Qg9GnayrKWV6|Pp+b%x6a>A9NV3M0AcEjP4jyHXiYSPu>G=s^E=Evh zJ$M)d1Ni~jgO`Y&yhiXazr*%@yEos<_OkVKRlU_!^?t2cYi~W?eA_b3cKf5f*WLcI zV^9vv5A&j&wb$+QR(Z$1Ci-e`nwRCFy=$ABHzT(9X=-H5t-V3#v+cVvQ1Og;{*IpjtzP+OW+h)hw;B$o1^{%%JR7?0lj}dv z{%|1ZGp5XVjl~H7iPhj|Z8)ncec*ICBsC?>(2>+)`k0S0Yy6wFyA zsND(63PZ+oiq!>koMXO7CX9K47MN!qOglZug@GO5n_;!ea-@cx`oR4jzhNTG{M%cgdL-;@o-&u57$Q>_Jy_ZUN)*e_b&QGCJl`c z2u0+qBC8e{NN09TPO%7ZX~872Rdp;d+P&jt4oT!wbm1rBCKMB6eTbciQOi@ySIQT) za=0ZXTVes)`jnzfK2po|>L}iXw(AvQmaSAbWT#lAk8+%CZJ#3QY!r$`F4AW)JQk_t gI8)~7%~MQUE^#aI@>O^BN>D~n(FHo8-_CpBKiC%Of$S#@ Rj9|>b#J~aJ|Nqax001fWA8P;r delta 81 zcmZ1@@k5*=!q2IkmGKAnM2vrVFfcr6`2U}Q0RYAH7OemP diff --git a/Effects/Dyes/PhantoplasmDyeShader.fx b/Effects/Dyes/PhantoplasmDyeShader.fx index 5e48cfc31e..dc937ddf26 100644 --- a/Effects/Dyes/PhantoplasmDyeShader.fx +++ b/Effects/Dyes/PhantoplasmDyeShader.fx @@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x) return saturate((x - start) / (end - start)); } -float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0 +float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0 { float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw; float4 noiseColor = tex2D(uImage1, float2(framedCoords.x, frac(framedCoords.y + uTime * 0.7))); @@ -39,7 +39,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO float4 blendedColor = (color + endFadeColor) * 0.5 - 0.05; blendedColor *= 1.4; blendedColor.a = 1; - return blendedColor * color.a * (1 + lerp(0.07, 0.3, fadeToSecondaryColor) + noiseColor.g * 0.1); + return blendedColor * color.a * (1 + lerp(0.07, 0.3, fadeToSecondaryColor) + noiseColor.g * 0.1) * sampleColor; } technique Technique1 { diff --git a/Effects/Dyes/PhantoplasmDyeShader.xnb b/Effects/Dyes/PhantoplasmDyeShader.xnb index 40f81c156e6b331dc213eecb12f6e2e3d616b8e7..d49d7dcf29c1cc56fb598d2121768ebd5640a524 100644 GIT binary patch delta 110 zcmbOsvqgqI!q2IkmC|GlETOsvH2#eD=QQKgv}z{UzikF85o!u82B3)7@mOe1V#o1CI$`& J|Nnmm1^_G^A4UKG delta 91 zcmdlYGed?w!q2Ikl~H0M`&`C?iA!fOGE8=0%w%R@V3@py@jsBahDjet-eIz2W=vt- uEWsSj$jGp{ge8TM(Pr~aR#(=|THLRg1Q;0@m>4+t8yFa#H2nY1zyJVhju<-t diff --git a/Effects/Dyes/ProfanedFlameDyeShader.fx b/Effects/Dyes/ProfanedFlameDyeShader.fx index 9c47314e41..8c4ecb6817 100644 --- a/Effects/Dyes/ProfanedFlameDyeShader.fx +++ b/Effects/Dyes/ProfanedFlameDyeShader.fx @@ -21,13 +21,13 @@ float2 InverseLerp(float2 start, float2 end, float2 x) return saturate((x - start) / (end - start)); } -float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0 +float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0 { float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw; float4 color = tex2D(uImage0, coords); // Read the fade map as a streak. - float4 fadeMapColor = tex2D(uImage1, float2(frac(framedCoords.x * 0.18 + cos(uTime * 0.9) * 0.021), frac(framedCoords.y * 0.32 + uTime * 0.2))); + float4 fadeMapColor = tex2D(uImage1, float2(frac(framedCoords.x * 0.18 + sin(uTime * 0.9) * 0.021), frac(framedCoords.y * 0.32 + uTime * 0.2))); fadeMapColor.r *= pow(framedCoords.x, 0.2); float opacity = lerp(1.05, 1.95, fadeMapColor.r); @@ -41,7 +41,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO transformColor = lerp(transformColor, float3(206 / 255, 116 / 255, 59 / 255), orangeFade); color.rgb = lerp(color.rgb, transformColor, fadeMapColor.r); opacity *= color.a; - return color * opacity; + return color * sampleColor * opacity; } technique Technique1 { diff --git a/Effects/Dyes/ProfanedFlameDyeShader.xnb b/Effects/Dyes/ProfanedFlameDyeShader.xnb index 5e2e87ffde14517cf3ff8e4da9ad22e21603235f..6312ce8a11dcf792f769da8f5067aae49830277a 100644 GIT binary patch delta 115 zcmdlXeMOo*!q2IkmGR0%_PLBY8<(;$GBGf0Ud@;drX`pUFfsnve3KO@-Y~hIOOlaw zvLcr-kX+04k%@o8<|*79OgfAV{0&SDPZ}5)o=jk6U|?nd@);Ny8W@3Mj0_A+3>+Z- KlZOBQ85jUEMjk5w delta 83 zcmV-Z0IdJi8@L+>SWZHB1p&B`2b}>Bv84n70&i}!s{v~P0%QfV7z4lp0o=3M1*HT5 pkduE38I!~c5R)(p1OWt-tqSq8stf)B2><{OfB*mhfC7`j4HH+&8G!%* diff --git a/Effects/Dyes/ProfanedMoonlightDye.fx b/Effects/Dyes/ProfanedMoonlightDye.fx index 467893fac2..75894ab43c 100644 --- a/Effects/Dyes/ProfanedMoonlightDye.fx +++ b/Effects/Dyes/ProfanedMoonlightDye.fx @@ -20,7 +20,7 @@ float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD { float4 returnColor = tex2D(uImage0, coords); returnColor.rgb *= uColor * max(1, (sin(uTime) * 0.5 + 0.5) * 0.3 + 1.3); - return returnColor; + return returnColor * sampleColor; } technique Technique1 { diff --git a/Effects/Dyes/ProfanedMoonlightDye.xnb b/Effects/Dyes/ProfanedMoonlightDye.xnb index 03bdc522c0fb27be4944e85e422aac000dc7b1ee..b40474568330cab640eff03407c76a996f145f45 100644 GIT binary patch delta 101 zcmZ1=vPXnH!q2IkmCvvdSx0Rcp_*#!v%lkN#F5CH%H0ssgPfB*pGfdBsh0E^ER*Z=?k diff --git a/Effects/Dyes/ReaverDyeShader.fx b/Effects/Dyes/ReaverDyeShader.fx index db0966aafd..fd945f8736 100644 --- a/Effects/Dyes/ReaverDyeShader.fx +++ b/Effects/Dyes/ReaverDyeShader.fx @@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x) return saturate((x - start) / (end - start)); } -float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0 +float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0 { float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw; float4 color = tex2D(uImage0, coords); @@ -30,7 +30,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO color.rgb *= ((framedCoords.x * uColor * (1 - yMultiplier) * 1.4) + ((1 - framedCoords.x) * uSecondaryColor * yMultiplier * 1.7)) * luminosity * 2.1; color.rgb *= clamp(1.6 * saturate(distance((0.5, 0.5), framedCoords)), 0.8, 1.6); // Intensify the colors based on how far they are from the center of the sprite. - return color; + return color * sampleColor; } technique Technique1 { diff --git a/Effects/Dyes/ReaverDyeShader.xnb b/Effects/Dyes/ReaverDyeShader.xnb index 877b808101e1faddbb9bd88d5f1177badc84475e..9265449b0058b68a317c6d747bf7ca0a84944b6b 100644 GIT binary patch delta 112 zcmZ1@aYBMU!q2IkmC<7&`&`Ba8<(;$GBQkF#n{7?pF7!tshE*%@*1X0#=Oa5%r6-k zCb8H9WgS?I85uU0u%s|D=4`&ndY74rf5PT9oCQn@tPBjy3=I4Y3=B^|cmg8>0}}%W Kg#Z6P0|Nl?q#k|% delta 93 zcmX>hu||SD!q2Ikl~HFR`&`DBjZ0Y=8967fV(ejJV3=&dRLsaQc@0x0kQ8Hn$=EQ7 x#h$TYvIC1TW8&r#mJ~+DfXz2q?=o*b#F@qqb zNRM1mn9?e+_?)1hZWSl#x>uzc;ZP(j`tGgMx~NgTP@#`rN#)QI?;dm4ym7NxLb~sk z>793ixTV*SvQS#7N-4}%lCk0NtO@`C delta 829 zcmY*XO=uHQ5T4o1x|{utrq!B=+KM3J$)G4g5)%=HA_xWwibW_2;!*J6Ay2&2Tjl8? z#lw0jvc0SXe-0v^1VzE4(u0>ht9XzKrR(?JhGK?&``&yr^UXK=_R-Ai{m$Hl&K-+S zR317{jHT%L$^siiL*FQ~NjOZImzi%2ZGxHm!fzr`p{mB z&c8!a`}3#SrouhojYhS7|L;r_IE0Co!hMZ5TFZk$b9wMh3s!gloP#efu6ZwCttN+0 zJy={ksqhf^YLdJG$6Ii0R|Tzo_!!s)k(tV8;StEoQu#I9+joRV6vM~Eh?8K-g$)eD zpr#~TN=9)5@g7zpa0g?UN4?lXURBo=c?D;2#tp?Tat?x!slWot;_xP3=mI_ije8K2 zkBAE~0RaG$ tKm;=ZZ?kj+WB~!-v)Khf1p*I{vk(h(0}KHG4}bvx0RpOllQ;r%0RWS%0%-vOvlas>0Re!M dKm;=ZZL@R)WB~!hv)Khf1+yj#Y6Fv?4jd;%6{-LL diff --git a/Effects/Dyes/StratusDyeShader.fx b/Effects/Dyes/StratusDyeShader.fx index 6a8ce34270..f9b8c23901 100644 --- a/Effects/Dyes/StratusDyeShader.fx +++ b/Effects/Dyes/StratusDyeShader.fx @@ -22,17 +22,17 @@ float2 InverseLerp(float2 start, float2 end, float2 x) return saturate((x - start) / (end - start)); } -float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0 +float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0 { float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw; float4 color = tex2D(uImage0, coords); float sineTime = sin(uTime); // Saved so that I don't have the compute this multiple times. Shaders have a limited number of mathematical instructions you can use - 64. float2 modifiedCoords = coords; - modifiedCoords.x += cos(uTime + framedCoords.y) * 0.5 + 0.5; // Cause the effect to sway around a bit with time. + modifiedCoords.x += sin(uTime + framedCoords.y + 1.57) * 0.5 + 0.5; // Cause the effect to sway around a bit with time. float4 noiseColor = tex2D(uImage1, frac(modifiedCoords)); - float xMultiplier = cos(framedCoords.x * 2.3 + uTime * 1.15) + 0.5; + float xMultiplier = sin(framedCoords.x * 2.3 + uTime * 1.15 + 1.57) + 0.5; float yMultiplier = (sin(framedCoords.y * 2 + uTime * 1.4) + 1) * 0.5; color.rgb *= lerp(uColor, uSecondaryColor, saturate(xMultiplier * yMultiplier * 1.6)); @@ -41,7 +41,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO color.rgb *= 1.6; // Sometimes give light "patches" depending on the swaying noise image. } color.rgb *= 1.6; // Brighten the shader over time. - return color; + return color * sampleColor; } technique Technique1 { diff --git a/Effects/Dyes/StratusDyeShader.xnb b/Effects/Dyes/StratusDyeShader.xnb index b7107324ff3e2fd71b1ade9d2e92eb3e782abcfe..f2d450e689a0dc4db1b55f6f4cba7324ec953562 100644 GIT binary patch delta 547 zcmZWlJxc>Y5PiGm^m4gml~gGdRDwSsO$u>Cs)!$8ao`WIv`fI!75_lOwiesi92Uy` z0l~ru3D%PKK>vV+)j50X5krcBnR)Zx%$u*x@s@vn+P(5vPmKIKW}faxjHgPsd7rH& z5B!y}n`BVBVC*va@G`Ic@;#QfKRX8iWUE#0oB>_{VP@j3GZTl;)b9XF+J1%l)5)=% zP9{>Xhg~j)x)%<1Ij{nh6cDR2U`kZX>&TQ5>-VrB1HuACrb!?J&*wv=rbf*-B|BcPp$!<@a%7%kp?I-#YmfiD834a@AT}BD8~s{=#}XXyQiLW+}wZ8@~x4g zTlHtP-pq`<%x#}LE^6mk)EY<2DzGZK<3giw?B!py8unr+S8wEb1icX;<`oPhtywxF#OLb84 z1>96fKY(;_=}_n=aC+V}iBfnM-aGf4!|#1;&AZOo$>3JdJRCU>l)OHU$O3fVx+al7 zTkk~3Z(0{be*Ptl=->V98~~8h=rfr{hi|8V@DOFaUYxMbqvWJGlBM2eeNq&Xb?9|} zpwIowxCN9)0b}I?nTu2}{El=n=DW%EcuAn;-p4Epc$y4xJNq*LFHC9w_oR9l91jV$ z^8Wl~2UMBisXHvzQhuk3^DA1z@*Q;6Y8GvR-TiUxs@iH-76V*RX%$_wU-^Z;3OB`) eS>K0U+k??hp(N-jaYl+G!q2IkmC=WHBF9`to{h_x85#K|uVUv3~9E^$pIkg!%CI@oKPrkv)BgzU^!63j0q(Oikh*>9Zjbw+|C!q2IkmBEK+BF9`t?v2Zs85tQSuVU6VDbW Date: Fri, 3 Jun 2022 00:17:54 -0500 Subject: [PATCH 12/30] Yet another cosine --- Effects/Dyes/AstralSwirlDyeShader.fx | 2 +- Effects/Dyes/AstralSwirlDyeShader.xnb | Bin 4484 -> 4780 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Effects/Dyes/AstralSwirlDyeShader.fx b/Effects/Dyes/AstralSwirlDyeShader.fx index 4ca2d68511..861b345b3b 100644 --- a/Effects/Dyes/AstralSwirlDyeShader.fx +++ b/Effects/Dyes/AstralSwirlDyeShader.fx @@ -18,7 +18,7 @@ float2 uLegacyArmorSheetSize; float2 RotatedBy(float2 xy, float theta) { - return float2(xy.x * cos(theta) + xy.y * sin(theta), xy.x * sin(theta) - xy.y * cos(theta)); + return float2(xy.x * sin(theta + 1.57) + xy.y * sin(theta), xy.x * sin(theta) - xy.y * sin(theta + 1.57)); } float2 InverseLerp(float2 start, float2 end, float2 x) diff --git a/Effects/Dyes/AstralSwirlDyeShader.xnb b/Effects/Dyes/AstralSwirlDyeShader.xnb index 82bf612a58f48fd3a4adb9f744dedbd8c26fee67..85a3f660300749b2c2f6fe8912e6ffaaf5963474 100644 GIT binary patch delta 484 zcmaiwF-TiM7{|Zwd?D}M`%W*3B}Al2Q4usyB|~*-f`XGRbtpKrw4#FnMMR`a2cZfM zage`52a&jRC;^p+;MjtLLJNvc(xF4QP6d}Pwf7>pdfa{7aliZj|KF{4HG2HX=OgbD z+(>Ww+saEHe41gEOF~qiT3W!6T4F*&RTWW`ZTYIynM7BK7pyu}R7`fOTz>8M#L>gQ za`>gw*pUv-VqW)SP9z{Vm@1aBD;a#z9tvVn zFdk}JFz42|6!1|Cd-&ssn)b18JZ3zSJg$SEP4>MJ)I`_^JLWo!T{H%y6SJnB6{aMM zqAs{y%4FiR9(6U=TQ|Z%tmQJjHu?KlSW~=Jf%6QS@m&W=oClfP)FOE0G#RY#(#9;d zOgr9+-|W%3;xe>2Ge2Dm3vmlp>-#$w{`415xd07Ae delta 355 zcmXX=J4gdT5Z&3_;pKMN>?MW}5foHJIWdwV7NVyCs~}nksSKh`#325#4VcPGGmVA9 z*@%WTa;;6kLP3jIO6)B}EG)&ifeiCr^Jd_83&Wn6!FGz$MoZpDx&0Gfl3W3`*%#+8DPo-4hVUBg@ubqX(d@egk#qcg| zNxLe(t3uIFI7&6Uk7mRPoKnF~f<+B6Kp#@kfrb@PAz(@?W1aIHBJ~S5Y-(Fzo&qY# z1i7e4*^16>1e2N=(|jv3gwpM5hBiWSWt7%XQcfbZH11_DdA3D98nkVr4*iU$)4}Y^ zbG=*K^Hvx$k(!ZM@Eb`1AWb-F&Fju+99hjb7}E=7-KUJKeT8)COge%wU$9jl7~_Uk R1-&~PAZR|?`8|wg{sD$YTcrR1 From 895f926b10e93593b16a0269d128ba2246884815 Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 3 Jun 2022 01:30:09 -0500 Subject: [PATCH 13/30] Re-added title music --- MainMenu/CalamityMainMenu.cs | 3 +++ Projectiles/CalamityGlobalProjectile.cs | 5 +---- .../VanillaProjectileOverrides/ChlorophyteCrystalAI.cs | 7 ++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/MainMenu/CalamityMainMenu.cs b/MainMenu/CalamityMainMenu.cs index 154f7c6a00..ec4d1c9d16 100644 --- a/MainMenu/CalamityMainMenu.cs +++ b/MainMenu/CalamityMainMenu.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.MainMenu @@ -44,6 +45,8 @@ namespace CalamityMod.MainMenu public override Asset SunTexture => ModContent.Request("CalamityMod/Backgrounds/BlankPixel"); public override Asset MoonTexture => ModContent.Request("CalamityMod/Backgrounds/BlankPixel"); + public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("Calamity") ?? MusicID.Title; + public override ModSurfaceBackgroundStyle MenuBackgroundStyle => ModContent.GetInstance(); // Before drawing the logo, draw the entire Calamity background. This way, the typical parallax background is skipped entirely. diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 8e4a626028..9b9db271cf 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -446,10 +446,7 @@ namespace CalamityMod.Projectiles // Chlorophyte Crystal AI rework. if (projectile.type == ProjectileID.CrystalLeaf) - { - ChlorophyteCrystalAI.DoChlorophyteCrystalAI(projectile); - return false; - } + return ChlorophyteCrystalAI.DoChlorophyteCrystalAI(projectile); // WHY DOES THE CYRSTAL STILL SHOOT THESE FUCKING THINGS??? if (projectile.type == ProjectileID.CrystalLeafShot) diff --git a/Projectiles/VanillaProjectileOverrides/ChlorophyteCrystalAI.cs b/Projectiles/VanillaProjectileOverrides/ChlorophyteCrystalAI.cs index 3de3e1f1d8..2c6382f863 100644 --- a/Projectiles/VanillaProjectileOverrides/ChlorophyteCrystalAI.cs +++ b/Projectiles/VanillaProjectileOverrides/ChlorophyteCrystalAI.cs @@ -10,6 +10,7 @@ using Terraria.GameContent; namespace CalamityMod.Projectiles.VanillaProjectileOverrides { + // TODO -- Finish this armor rework eventually. public static class ChlorophyteCrystalAI { public const int AmountToHealPerPulse = 10; @@ -17,6 +18,8 @@ namespace CalamityMod.Projectiles.VanillaProjectileOverrides public const int DelayBetweenHeals = 150; public static bool DoChlorophyteCrystalAI(Projectile projectile) { + return true; + Player owner = Main.player[projectile.owner]; ref float timer = ref projectile.ai[1]; @@ -58,7 +61,9 @@ namespace CalamityMod.Projectiles.VanillaProjectileOverrides public static bool DoChlorophyteCrystalDrawing(SpriteBatch spriteBatch, Projectile projectile) { - //Why doesn't this work? How does one access the texture path of a vanilla projectile? Left bugged for someone else to figure out :) + return true; + + // Why doesn't this work? How does one access the texture path of a vanilla projectile? Left bugged for someone else to figure out :) // It's me. I was that someone - Dominic // TextureAssets is the answer, along with Main.instance.LoadProjectile(projID), to ensure that the texture is loaded into memory. // In this instance, however, that should happen already on vanilla's end. From d8365eceb4c50de58dcbbdb25adef55ca48269ae Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 3 Jun 2022 01:37:01 -0500 Subject: [PATCH 14/30] Improved Boss Rush's dimness effect --- Systems/LightingEffectsSystem.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Systems/LightingEffectsSystem.cs b/Systems/LightingEffectsSystem.cs index 760cac8850..6a4a8bcd41 100644 --- a/Systems/LightingEffectsSystem.cs +++ b/Systems/LightingEffectsSystem.cs @@ -76,9 +76,13 @@ namespace CalamityMod.Systems if (BossRushEvent.BossRushActive || BossRushEvent.StartTimer > 0 || BossRushSky.ShouldDrawRegularly) { + float fadeToBlack = BossRushEvent.WhiteDimness; backgroundColor = Color.Lerp(backgroundColor, Color.LightGray, bossRushWhiteFade); + backgroundColor = Color.Lerp(backgroundColor, Color.Black, fadeToBlack); tileColor = Color.Lerp(tileColor, Color.LightGray, bossRushWhiteFade); + tileColor = Color.Lerp(tileColor, Color.Black, fadeToBlack); Main.ColorOfTheSkies = Color.Lerp(Main.ColorOfTheSkies, Color.Gray, bossRushWhiteFade); + Main.ColorOfTheSkies = Color.Lerp(Main.ColorOfTheSkies, Color.Black, fadeToBlack); } else if (SkyManager.Instance["CalamityMod:ExoMechs"].IsActive()) { From 08a90e0a2d98bc3454624179ada7c8af5a999033 Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 3 Jun 2022 01:42:10 -0500 Subject: [PATCH 15/30] Fixed DoG's sky --- NPCs/DevourerofGods/DoGSky.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NPCs/DevourerofGods/DoGSky.cs b/NPCs/DevourerofGods/DoGSky.cs index 06434f1260..3f4d412c3e 100644 --- a/NPCs/DevourerofGods/DoGSky.cs +++ b/NPCs/DevourerofGods/DoGSky.cs @@ -84,12 +84,12 @@ namespace CalamityMod.NPCs.DevourerofGods double blackScreenLife_GateValue = (lifeRatio < 0.6f && Main.npc[DoGIndex].localAI[2] <= 2f) ? 0.15 : 0.75; if (Main.npc[DoGIndex].life < Main.npc[DoGIndex].lifeMax * blackScreenLife_GateValue || CalamityWorld.death || BossRushEvent.BossRushActive) { - spriteBatch.Draw(TextureAssets.BlackTile.Value, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), + spriteBatch.Draw(TextureAssets.BlackTile.Value, new Rectangle(0, 0, Main.screenWidth * 2, Main.screenHeight * 2), Color.Black * (intensity + 0.5f)); } else { - spriteBatch.Draw(TextureAssets.BlackTile.Value, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), + spriteBatch.Draw(TextureAssets.BlackTile.Value, new Rectangle(0, 0, Main.screenWidth * 2, Main.screenHeight * 2), (Main.npc[DoGIndex].ai[3] == 0f ? Color.Cyan : Color.Fuchsia) * intensity); } } From 15a83826be4ff841f9b0d755386a0406b231ea8b Mon Sep 17 00:00:00 2001 From: Uncle Danny Date: Fri, 3 Jun 2022 14:21:50 +0200 Subject: [PATCH 16/30] Fix tier check + massive switch case blocks > switch expressions --- Items/CalamityGlobalItem.cs | 923 ++++++++++-------------------------- 1 file changed, 253 insertions(+), 670 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 883be5ab78..539880775f 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -396,8 +396,8 @@ namespace CalamityMod.Items } if (modPlayer.victideSet) { - if ((item.CountsAsClass() || item.CountsAsClass() || item.CountsAsClass() || - item.CountsAsClass() || item.CountsAsClass()) && + if ((item.CountsAsClass() || item.CountsAsClass() || item.CountsAsClass() || + item.CountsAsClass() || item.CountsAsClass()) && Main.rand.NextBool(10)) { if (player.whoAmI == Main.myPlayer) @@ -505,7 +505,7 @@ namespace CalamityMod.Items tag.Add("canFirePointBlankShots", canFirePointBlankShots); tag.Add("trueMelee", trueMelee); } - + public override void LoadData(Item item, TagCompound tag) { canFirePointBlankShots = tag.GetBool("canFirePointBlankShots"); @@ -1733,678 +1733,277 @@ namespace CalamityMod.Items int prefix = -2; if (item.accessory) { - if (Main.player[Main.myPlayer].Calamity().finalTierAccessoryReforge) + if (Main.LocalPlayer.Calamity().finalTierAccessoryReforge) { // Warding = 18, Menacing = 19, Quick = 20, Violent = 21, Lucky = 22, Silent = 23 prefix = Main.rand.Next(18, 24); } else { - switch (reforgeTier) + prefix = reforgeTier switch { - case 0: - break; - case 1: - // Hard = 1, Jagged = 2, Brisk = 3, Wild = 4, Quiet = 5 - prefix = Main.rand.Next(1, 6); - break; - case 2: - // Guarding = 6, Spiked = 7, Fleeting = 8, Rash = 9, Cloaked = 10 - prefix = Main.rand.Next(6, 11); - break; - case 3: - // Precise = 11, Arcane = 12 - prefix = Main.rand.Next(11, 13); - break; - case 4: - // Armored = 13, Angry = 14, Hasty = 15, Intrepid = 16, Camouflaged = 17 - prefix = Main.rand.Next(13, 18); - break; - case 5: - case 6: - // Warding = 18, Menacing = 19, Quick = 20, Violent = 21, Lucky = 22, Silent = 23 - prefix = Main.rand.Next(18, 24); - break; - } + 1 => Main.rand.Next(1, 6), // Hard = 1, Jagged = 2, Brisk = 3, Wild = 4, Quiet = 5 + 2 => Main.rand.Next(6, 11), // Guarding = 6, Spiked = 7, Fleeting = 8, Rash = 9, Cloaked = 10 + 3 => Main.rand.Next(11, 13), // Precise = 11, Arcane = 12 + 4 => Main.rand.Next(13, 18), // Armored = 13, Angry = 14, Hasty = 15, Intrepid = 16, Camouflaged = 17 + 5 or 6 => Main.rand.Next(18, 24), // Warding = 18, Menacing = 19, Quick = 20, Violent = 21, Lucky = 22, Silent = 23 + _ => prefix + }; } - switch (prefix) + + prefix = prefix switch { - case -2: - break; - case 1: - prefix = PrefixID.Hard; - break; - case 2: - prefix = PrefixID.Jagged; - break; - case 3: - prefix = PrefixID.Brisk; - break; - case 4: - prefix = PrefixID.Wild; - break; - case 5: - prefix = Mod.Find("Quiet").Type; - break; - case 6: - prefix = PrefixID.Guarding; - break; - case 7: - prefix = PrefixID.Spiked; - break; - case 8: - prefix = PrefixID.Fleeting; - break; - case 9: - prefix = PrefixID.Rash; - break; - case 10: - prefix = Mod.Find("Cloaked").Type; - break; - case 11: - prefix = PrefixID.Precise; - break; - case 12: - prefix = PrefixID.Arcane; - break; - case 13: - prefix = PrefixID.Armored; - break; - case 14: - prefix = PrefixID.Angry; - break; - case 15: - prefix = PrefixID.Hasty2; - break; - case 16: - prefix = PrefixID.Intrepid; - break; - case 17: - prefix = Mod.Find("Camouflaged").Type; - break; - case 18: - prefix = PrefixID.Warding; - break; - case 19: - prefix = PrefixID.Menacing; - break; - case 20: - prefix = PrefixID.Quick2; - break; - case 21: - prefix = PrefixID.Violent; - break; - case 22: - prefix = PrefixID.Lucky; - break; - case 23: - prefix = Mod.Find("Silent").Type; - break; - } + 1 => PrefixID.Hard, + 2 => PrefixID.Jagged, + 3 => PrefixID.Brisk, + 4 => PrefixID.Wild, + 5 => Mod.Find("Quiet").Type, + 6 => PrefixID.Guarding, + 7 => PrefixID.Spiked, + 8 => PrefixID.Fleeting, + 9 => PrefixID.Rash, + 10 => Mod.Find("Cloaked").Type, + 11 => PrefixID.Precise, + 12 => PrefixID.Arcane, + 13 => PrefixID.Armored, + 14 => PrefixID.Angry, + 15 => PrefixID.Hasty2, + 16 => PrefixID.Intrepid, + 17 => Mod.Find("Camouflaged").Type, + 18 => PrefixID.Warding, + 19 => PrefixID.Menacing, + 20 => PrefixID.Quick2, + 21 => PrefixID.Violent, + 22 => PrefixID.Lucky, + 23 => Mod.Find("Silent").Type, + _ => prefix, + }; } else if (item.CountsAsClass()) { // Yoyos, Flails, Spears, etc. if (item.channel || item.noMelee) { - switch (reforgeTier) + prefix = reforgeTier switch { - case 0: - break; - case 1: - // Keen = 1, Ruthless = 2 - prefix = Main.rand.Next(1, 3); - break; - case 2: - // Hurtful = 3, Zealous = 4 - prefix = Main.rand.Next(3, 5); - break; - case 3: - // Forceful = 5, Strong = 6 - prefix = Main.rand.Next(5, 7); - break; - case 4: - // Demonic = 7 - prefix = 7; - break; - case 5: - // Superior = 8 - prefix = 8; - break; - case 6: - // Godly = 9 - prefix = 9; - break; - } - switch (prefix) + 1 => Main.rand.Next(1, 3),// Keen = 1, Ruthless = 2 + 2 => Main.rand.Next(3, 5),// Hurtful = 3, Zealous = 4 + 3 => Main.rand.Next(5, 7),// Forceful = 5, Strong = 6 + 4 => 7,// Demonic = 7 + 5 => 8,// Superior = 8 + 6 => 9,// Godly = 9 + _ => prefix, + }; + + prefix = prefix switch { - case -2: - break; - case 1: - prefix = PrefixID.Keen; - break; - case 2: - prefix = PrefixID.Ruthless; - break; - case 3: - prefix = PrefixID.Hurtful; - break; - case 4: - prefix = PrefixID.Zealous; - break; - case 5: - prefix = PrefixID.Forceful; - break; - case 6: - prefix = PrefixID.Strong; - break; - case 7: - prefix = PrefixID.Demonic; - break; - case 8: - prefix = PrefixID.Superior; - break; - case 9: - prefix = PrefixID.Godly; - break; - } + 1 => PrefixID.Keen, + 2 => PrefixID.Ruthless, + 3 => PrefixID.Hurtful, + 4 => PrefixID.Zealous, + 5 => PrefixID.Forceful, + 6 => PrefixID.Strong, + 7 => PrefixID.Demonic, + 8 => PrefixID.Superior, + 9 => PrefixID.Godly, + _ => prefix, + }; } // All other melee weapons else { - switch (reforgeTier) + prefix = reforgeTier switch { - case 0: - break; - case 1: - // Keen = 1, Ruthless = 2, Nimble = 3, Nasty = 4, Heavy = 5, Light = 6 - prefix = Main.rand.Next(1, 7); - break; - case 2: - // Hurtful = 7, Zealous = 8, Quick = 9, Pointy = 10, Bulky = 11 - prefix = Main.rand.Next(7, 12); - break; - case 3: - // Forceful = 12, Strong = 13, Agile = 14, Large = 15, Dangerous = 16, Sharp = 17 - prefix = Main.rand.Next(12, 18); - break; - case 4: - // Murderous = 18, Massive = 19, Unpleasant = 20, Deadly2 = 21 - prefix = Main.rand.Next(18, 22); - break; - case 5: - // Superior = 22, Demonic = 23, Savage = 24 - prefix = Main.rand.Next(22, 25); - break; - case 6: - // Legendary = 25, Light = 6 ~We are tool friendly (= - if (item.pick > 0 || item.axe > 0 || item.hammer > 0) - prefix = Main.rand.NextBool() ? 25 : 6; - else - prefix = 25; - break; - } - switch (prefix) + 1 => Main.rand.Next(1, 7),// Keen = 1, Ruthless = 2, Nimble = 3, Nasty = 4, Heavy = 5, Light = 6 + 2 => Main.rand.Next(7, 12),// Hurtful = 7, Zealous = 8, Quick = 9, Pointy = 10, Bulky = 11 + 3 => Main.rand.Next(12, 18),// Forceful = 12, Strong = 13, Agile = 14, Large = 15, Dangerous = 16, Sharp = 17 + 4 => Main.rand.Next(18, 22),// Murderous = 18, Massive = 19, Unpleasant = 20, Deadly2 = 21 + 5 => Main.rand.Next(22, 25),// Superior = 22, Demonic = 23, Savage = 24 + 6 => item.pick > 0 || item.axe > 0 || item.hammer > 0 ? (Main.rand.NextBool() ? 25 : 6) : 25,// Legendary = 25, Light = 6 ~We are tool friendly (= + _ => prefix, + }; + + prefix = prefix switch { - case -2: - break; - case 1: - prefix = PrefixID.Keen; - break; - case 2: - prefix = PrefixID.Ruthless; - break; - case 3: - prefix = PrefixID.Nimble; - break; - case 4: - prefix = PrefixID.Nasty; - break; - case 5: - prefix = PrefixID.Heavy; - break; - case 6: - prefix = PrefixID.Light; - break; - case 7: - prefix = PrefixID.Hurtful; - break; - case 8: - prefix = PrefixID.Zealous; - break; - case 9: - prefix = PrefixID.Quick; - break; - case 10: - prefix = PrefixID.Pointy; - break; - case 11: - prefix = PrefixID.Bulky; - break; - case 12: - prefix = PrefixID.Forceful; - break; - case 13: - prefix = PrefixID.Strong; - break; - case 14: - prefix = PrefixID.Agile; - break; - case 15: - prefix = PrefixID.Large; - break; - case 16: - prefix = PrefixID.Dangerous; - break; - case 17: - prefix = PrefixID.Sharp; - break; - case 18: - prefix = PrefixID.Murderous; - break; - case 19: - prefix = PrefixID.Massive; - break; - case 20: - prefix = PrefixID.Unpleasant; - break; - case 21: - prefix = PrefixID.Deadly2; - break; - case 22: - prefix = PrefixID.Superior; - break; - case 23: - prefix = PrefixID.Demonic; - break; - case 24: - prefix = PrefixID.Savage; - break; - case 25: - prefix = PrefixID.Legendary; - break; - } + 1 => PrefixID.Keen, + 2 => PrefixID.Ruthless, + 3 => PrefixID.Nimble, + 4 => PrefixID.Nasty, + 5 => PrefixID.Heavy, + 6 => PrefixID.Light, + 7 => PrefixID.Hurtful, + 8 => PrefixID.Zealous, + 9 => PrefixID.Quick, + 10 => PrefixID.Pointy, + 11 => PrefixID.Bulky, + 12 => PrefixID.Forceful, + 13 => PrefixID.Strong, + 14 => PrefixID.Agile, + 15 => PrefixID.Large, + 16 => PrefixID.Dangerous, + 17 => PrefixID.Sharp, + 18 => PrefixID.Murderous, + 19 => PrefixID.Massive, + 20 => PrefixID.Unpleasant, + 21 => PrefixID.Deadly2, + 22 => PrefixID.Superior, + 23 => PrefixID.Demonic, + 24 => PrefixID.Savage, + 25 => PrefixID.Legendary, + _ => prefix, + }; } } else if (item.CountsAsClass()) { - switch (reforgeTier) + prefix = reforgeTier switch { - case 0: - break; - case 1: - // Keen = 1, Ruthless = 2, Nimble = 3, Nasty = 4, Powerful = 5 - prefix = Main.rand.Next(1, 6); - break; - case 2: - // Hurtful = 6, Zealous = 7, Quick = 8 - prefix = Main.rand.Next(6, 9); - break; - case 3: - // Forceful = 9, Strong = 10, Agile = 11, Sighted = 12, Murderous = 13 - prefix = Main.rand.Next(9, 14); - break; - case 4: - // Superior = 14, Demonic = 15, Deadly2 = 16, Intimidating = 17, Unpleasant = 18 - prefix = Main.rand.Next(14, 19); - break; - case 5: - // Godly = 19, Rapid = 20, Hasty = 21, Deadly = 22, Staunch = 23 - prefix = Main.rand.Next(19, 24); - break; - case 6: - // Unreal = 24 - prefix = 24; - break; - } - switch (prefix) + 1 => Main.rand.Next(1, 6),// Keen = 1, Ruthless = 2, Nimble = 3, Nasty = 4, Powerful = 5 + 2 => Main.rand.Next(6, 9),// Hurtful = 6, Zealous = 7, Quick = 8 + 3 => Main.rand.Next(9, 14),// Forceful = 9, Strong = 10, Agile = 11, Sighted = 12, Murderous = 13 + 4 => Main.rand.Next(14, 19),// Superior = 14, Demonic = 15, Deadly2 = 16, Intimidating = 17, Unpleasant = 18 + 5 => Main.rand.Next(19, 24),// Godly = 19, Rapid = 20, Hasty = 21, Deadly = 22, Staunch = 23 + 6 => 24,// Unreal = 24 + _ => prefix, + }; + + prefix = prefix switch { - case -2: - break; - case 1: - prefix = PrefixID.Keen; - break; - case 2: - prefix = PrefixID.Ruthless; - break; - case 3: - prefix = PrefixID.Nimble; - break; - case 4: - prefix = PrefixID.Nasty; - break; - case 5: - prefix = PrefixID.Powerful; - break; - case 6: - prefix = PrefixID.Hurtful; - break; - case 7: - prefix = PrefixID.Zealous; - break; - case 8: - prefix = PrefixID.Quick; - break; - case 9: - prefix = PrefixID.Forceful; - break; - case 10: - prefix = PrefixID.Strong; - break; - case 11: - prefix = PrefixID.Agile; - break; - case 12: - prefix = PrefixID.Sighted; - break; - case 13: - prefix = PrefixID.Murderous; - break; - case 14: - prefix = PrefixID.Superior; - break; - case 15: - prefix = PrefixID.Demonic; - break; - case 16: - prefix = PrefixID.Deadly2; - break; - case 17: - prefix = PrefixID.Intimidating; - break; - case 18: - prefix = PrefixID.Unpleasant; - break; - case 19: - prefix = PrefixID.Godly; - break; - case 20: - prefix = PrefixID.Rapid; - break; - case 21: - prefix = PrefixID.Hasty; - break; - case 22: - prefix = PrefixID.Deadly; - break; - case 23: - prefix = PrefixID.Staunch; - break; - case 24: - prefix = PrefixID.Unreal; - break; - } + 1 => PrefixID.Keen, + 2 => PrefixID.Ruthless, + 3 => PrefixID.Nimble, + 4 => PrefixID.Nasty, + 5 => PrefixID.Powerful, + 6 => PrefixID.Hurtful, + 7 => PrefixID.Zealous, + 8 => PrefixID.Quick, + 9 => PrefixID.Forceful, + 10 => PrefixID.Strong, + 11 => PrefixID.Agile, + 12 => PrefixID.Sighted, + 13 => PrefixID.Murderous, + 14 => PrefixID.Superior, + 15 => PrefixID.Demonic, + 16 => PrefixID.Deadly2, + 17 => PrefixID.Intimidating, + 18 => PrefixID.Unpleasant, + 19 => PrefixID.Godly, + 20 => PrefixID.Rapid, + 21 => PrefixID.Hasty, + 22 => PrefixID.Deadly, + 23 => PrefixID.Staunch, + 24 => PrefixID.Unreal, + _ => prefix, + }; } else if (item.CountsAsClass()) { - switch (reforgeTier) + prefix = reforgeTier switch { - case 0: - break; - case 1: - // Keen = 1, Ruthless = 2, Nimble = 3, Nasty = 4, Furious = 5 - prefix = Main.rand.Next(1, 6); - break; - case 2: - // Hurtful = 6, Zealous = 7, Quick = 8, Taboo = 9, Manic = 10 - prefix = Main.rand.Next(6, 11); - break; - case 3: - // Forceful = 11, Strong = 12, Agile = 13, Murderous = 14, Adept = 15, Celestial = 16 - prefix = Main.rand.Next(11, 17); - break; - case 4: - // Superior = 17, Demonic = 18, Deadly2 = 19, Mystic = 20 - prefix = Main.rand.Next(17, 21); - break; - case 5: - // Godly = 21, Masterful = 22 - prefix = Main.rand.Next(21, 23); - break; - case 6: - // Mythical = 23 - prefix = 23; - break; - } - switch (prefix) + 1 => Main.rand.Next(1, 6),// Keen = 1, Ruthless = 2, Nimble = 3, Nasty = 4, Furious = 5 + 2 => Main.rand.Next(6, 11),// Hurtful = 6, Zealous = 7, Quick = 8, Taboo = 9, Manic = 10 + 3 => Main.rand.Next(11, 17),// Forceful = 11, Strong = 12, Agile = 13, Murderous = 14, Adept = 15, Celestial = 16 + 4 => Main.rand.Next(17, 21),// Superior = 17, Demonic = 18, Deadly2 = 19, Mystic = 20 + 5 => Main.rand.Next(21, 23),// Godly = 21, Masterful = 22 + 6 => 23,// Mythical = 23 + _ => prefix, + }; + + prefix = prefix switch { - case -2: - break; - case 1: - prefix = PrefixID.Keen; - break; - case 2: - prefix = PrefixID.Ruthless; - break; - case 3: - prefix = PrefixID.Nimble; - break; - case 4: - prefix = PrefixID.Nasty; - break; - case 5: - prefix = PrefixID.Furious; - break; - case 6: - prefix = PrefixID.Hurtful; - break; - case 7: - prefix = PrefixID.Zealous; - break; - case 8: - prefix = PrefixID.Quick; - break; - case 9: - prefix = PrefixID.Taboo; - break; - case 10: - prefix = PrefixID.Manic; - break; - case 11: - prefix = PrefixID.Forceful; - break; - case 12: - prefix = PrefixID.Strong; - break; - case 13: - prefix = PrefixID.Agile; - break; - case 14: - prefix = PrefixID.Murderous; - break; - case 15: - prefix = PrefixID.Adept; - break; - case 16: - prefix = PrefixID.Celestial; - break; - case 17: - prefix = PrefixID.Superior; - break; - case 18: - prefix = PrefixID.Demonic; - break; - case 19: - prefix = PrefixID.Deadly2; - break; - case 20: - prefix = PrefixID.Mystic; - break; - case 21: - prefix = PrefixID.Godly; - break; - case 22: - prefix = PrefixID.Masterful; - break; - case 23: - prefix = PrefixID.Mythical; - break; - } + 1 => PrefixID.Keen, + 2 => PrefixID.Ruthless, + 3 => PrefixID.Nimble, + 4 => PrefixID.Nasty, + 5 => PrefixID.Furious, + 6 => PrefixID.Hurtful, + 7 => PrefixID.Zealous, + 8 => PrefixID.Quick, + 9 => PrefixID.Taboo, + 10 => PrefixID.Manic, + 11 => PrefixID.Forceful, + 12 => PrefixID.Strong, + 13 => PrefixID.Agile, + 14 => PrefixID.Murderous, + 15 => PrefixID.Adept, + 16 => PrefixID.Celestial, + 17 => PrefixID.Superior, + 18 => PrefixID.Demonic, + 19 => PrefixID.Deadly2, + 20 => PrefixID.Mystic, + 21 => PrefixID.Godly, + 22 => PrefixID.Masterful, + 23 => PrefixID.Mythical, + _ => prefix, + }; } else if (item.CountsAsClass()) { - switch (reforgeTier) + prefix = reforgeTier switch { - case 0: - break; - case 1: - // Nimble = 1, Furious = 2 - prefix = Main.rand.Next(1, 3); - break; - case 2: - // Hurtful = 3, Quick = 4, Taboo = 5, Manic = 6 - prefix = Main.rand.Next(3, 7); - break; - case 3: - // Forceful = 7, Strong = 8, Adept = 9, Celestial = 10 - prefix = Main.rand.Next(7, 11); - break; - case 4: - // Deadly2 = 11, Mystic = 12, Superior = 13, Demonic = 14 - prefix = Main.rand.Next(11, 15); - break; - case 5: - // Masterful = 15, Mythical = 16, Godly = 17 - prefix = Main.rand.Next(15, 18); - break; - case 6: - // Ruthless = 18 - prefix = 18; - break; - } - switch (prefix) + 1 => Main.rand.Next(1, 3),// Nimble = 1, Furious = 2 + 2 => Main.rand.Next(3, 7),// Hurtful = 3, Quick = 4, Taboo = 5, Manic = 6 + 3 => Main.rand.Next(7, 11),// Forceful = 7, Strong = 8, Adept = 9, Celestial = 10 + 4 => Main.rand.Next(11, 15),// Deadly2 = 11, Mystic = 12, Superior = 13, Demonic = 14 + 5 => Main.rand.Next(15, 18),// Masterful = 15, Mythical = 16, Godly = 17 + 6 => 18,// Ruthless = 18 + _ => prefix, + }; + + prefix = prefix switch { - case -2: - break; - case 1: - prefix = PrefixID.Nimble; - break; - case 2: - prefix = PrefixID.Furious; - break; - case 3: - prefix = PrefixID.Hurtful; - break; - case 4: - prefix = PrefixID.Quick; - break; - case 5: - prefix = PrefixID.Taboo; - break; - case 6: - prefix = PrefixID.Manic; - break; - case 7: - prefix = PrefixID.Forceful; - break; - case 8: - prefix = PrefixID.Strong; - break; - case 9: - prefix = PrefixID.Adept; - break; - case 10: - prefix = PrefixID.Celestial; - break; - case 11: - prefix = PrefixID.Deadly2; - break; - case 12: - prefix = PrefixID.Mystic; - break; - case 13: - prefix = PrefixID.Superior; - break; - case 14: - prefix = PrefixID.Demonic; - break; - case 15: - prefix = PrefixID.Masterful; - break; - case 16: - prefix = PrefixID.Mythical; - break; - case 17: - prefix = PrefixID.Godly; - break; - case 18: - prefix = PrefixID.Ruthless; - break; - } + 1 => PrefixID.Nimble, + 2 => PrefixID.Furious, + 3 => PrefixID.Hurtful, + 4 => PrefixID.Quick, + 5 => PrefixID.Taboo, + 6 => PrefixID.Manic, + 7 => PrefixID.Forceful, + 8 => PrefixID.Strong, + 9 => PrefixID.Adept, + 10 => PrefixID.Celestial, + 11 => PrefixID.Deadly2, + 12 => PrefixID.Mystic, + 13 => PrefixID.Superior, + 14 => PrefixID.Demonic, + 15 => PrefixID.Masterful, + 16 => PrefixID.Mythical, + 17 => PrefixID.Godly, + 18 => PrefixID.Ruthless, + _ => prefix, + }; } else if (item.CountsAsClass()) { - switch (reforgeTier) + prefix = reforgeTier switch { - case 0: - break; - case 1: - // Radical = 1, Pointy = 2 - prefix = Main.rand.Next(1, 3); - break; - case 2: - // Sharp = 3, Glorious = 4 - prefix = Main.rand.Next(3, 5); - break; - case 3: - // Feathered = 5, Sleek = 6, Hefty = 7 - prefix = Main.rand.Next(5, 8); - break; - case 4: - // Mighty = 8, Serrated = 9 - prefix = Main.rand.Next(8, 10); - break; - case 5: - // Vicious = 10, Lethal = 11 - prefix = Main.rand.Next(10, 12); - break; - case 6: - // Flawless = 12 - prefix = 12; - break; - } - switch (prefix) + 1 => Main.rand.Next(1, 3),// Radical = 1, Pointy = 2 + 2 => Main.rand.Next(3, 5),// Sharp = 3, Glorious = 4 + 3 => Main.rand.Next(5, 8),// Feathered = 5, Sleek = 6, Hefty = 7 + 4 => Main.rand.Next(8, 10),// Mighty = 8, Serrated = 9 + 5 => Main.rand.Next(10, 12),// Vicious = 10, Lethal = 11 + 6 => 12,// Flawless = 12 + _ => prefix, + }; + + prefix = prefix switch { - case -2: - break; - case 1: - prefix = Mod.Find("Radical").Type; - break; - case 2: - prefix = Mod.Find("Pointy").Type; - break; - case 3: - prefix = Mod.Find("Sharp").Type; - break; - case 4: - prefix = Mod.Find("Glorious").Type; - break; - case 5: - prefix = Mod.Find("Feathered").Type; - break; - case 6: - prefix = Mod.Find("Sleek").Type; - break; - case 7: - prefix = Mod.Find("Hefty").Type; - break; - case 8: - prefix = Mod.Find("Mighty").Type; - break; - case 9: - prefix = Mod.Find("Serrated").Type; - break; - case 10: - prefix = Mod.Find("Vicious").Type; - break; - case 11: - prefix = Mod.Find("Lethal").Type; - break; - case 12: - prefix = Mod.Find("Flawless").Type; - break; - } + 1 => Mod.Find("Radical").Type, + 2 => Mod.Find("Pointy").Type, + 3 => Mod.Find("Sharp").Type, + 4 => Mod.Find("Glorious").Type, + 5 => Mod.Find("Feathered").Type, + 6 => Mod.Find("Sleek").Type, + 7 => Mod.Find("Hefty").Type, + 8 => Mod.Find("Mighty").Type, + 9 => Mod.Find("Serrated").Type, + 10 => Mod.Find("Vicious").Type, + 11 => Mod.Find("Lethal").Type, + 12 => Mod.Find("Flawless").Type, + _ => prefix, + }; } + return prefix; } @@ -2418,7 +2017,7 @@ namespace CalamityMod.Items // Get cash from dickhead goblin fuck public override void PostReforge(Item item) { - CalamityPlayer modPlayer = Main.player[Main.myPlayer].Calamity(); + CalamityPlayer modPlayer = Main.LocalPlayer.Calamity(); if (modPlayer.itemTypeLastReforged != item.type) { modPlayer.reforgeTierSafety = 0; @@ -2427,7 +2026,7 @@ namespace CalamityMod.Items modPlayer.itemTypeLastReforged = item.type; - if (modPlayer.reforgeTierSafety > 6) + if (modPlayer.reforgeTierSafety >= 6) { modPlayer.reforgeTierSafety = 0; modPlayer.finalTierAccessoryReforge = true; @@ -2440,7 +2039,7 @@ namespace CalamityMod.Items item.netDefaults(item.netID); item.Prefix(NewPrefixType(item)); - item.Center = Main.player[Main.myPlayer].Center; + item.Center = Main.LocalPlayer.Center; item.favorited = favorited; if (NPC.AnyNPCs(ModContent.NPCType())) @@ -2481,45 +2080,29 @@ namespace CalamityMod.Items public static int GetBuyPrice(int rarity) { - switch (rarity) + return rarity switch { - case 0: - return Rarity0BuyPrice; - case 1: - return Rarity1BuyPrice; - case 2: - return Rarity2BuyPrice; - case 3: - return Rarity3BuyPrice; - case 4: - return Rarity4BuyPrice; - case 5: - return Rarity5BuyPrice; - case 6: - return Rarity6BuyPrice; - case 7: - return Rarity7BuyPrice; - case 8: - return Rarity8BuyPrice; - case 9: - return Rarity9BuyPrice; - case 10: - return Rarity10BuyPrice; - case 11: - return Rarity11BuyPrice; - case (int)CalamityRarity.Turquoise: - return RarityTurquoiseBuyPrice; - case (int)CalamityRarity.PureGreen: - return RarityPureGreenBuyPrice; - case (int)CalamityRarity.DarkBlue: - return RarityDarkBlueBuyPrice; - case (int)CalamityRarity.Violet: - return RarityVioletBuyPrice; - case (int)CalamityRarity.HotPink: - return RarityHotPinkBuyPrice; - } - return 0; + 0 => Rarity0BuyPrice, + 1 => Rarity1BuyPrice, + 2 => Rarity2BuyPrice, + 3 => Rarity3BuyPrice, + 4 => Rarity4BuyPrice, + 5 => Rarity5BuyPrice, + 6 => Rarity6BuyPrice, + 7 => Rarity7BuyPrice, + 8 => Rarity8BuyPrice, + 9 => Rarity9BuyPrice, + 10 => Rarity10BuyPrice, + 11 => Rarity11BuyPrice, + (int)CalamityRarity.Turquoise => RarityTurquoiseBuyPrice, + (int)CalamityRarity.PureGreen => RarityPureGreenBuyPrice, + (int)CalamityRarity.DarkBlue => RarityDarkBlueBuyPrice, + (int)CalamityRarity.Violet => RarityVioletBuyPrice, + (int)CalamityRarity.HotPink => RarityHotPinkBuyPrice, + _ => 0, + }; } + public static int GetBuyPrice(Item item) { return GetBuyPrice(item.rare); From 6d9739a26c15e315200c0bf9aa25ce8c4be8b260 Mon Sep 17 00:00:00 2001 From: Merkalto Date: Fri, 3 Jun 2022 09:02:16 -0500 Subject: [PATCH 17/30] Zoologist, Golfer, and Princess NPC shop icon alert support. --- CalPlayer/CalamityPlayer.cs | 12 ++++++++++++ NPCs/CalamityGlobalTownNPC.cs | 30 ++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 0137862da5..71a5edeabd 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -153,6 +153,8 @@ namespace CalamityMod.CalPlayer #region Town NPC Shop Variables public bool newMerchantInventory = false; public bool newPainterInventory = false; + public bool newGolferInventory = false; + public bool newZoologistInventory = false; public bool newDyeTraderInventory = false; public bool newPartyGirlInventory = false; public bool newStylistInventory = false; @@ -169,6 +171,7 @@ namespace CalamityMod.CalPlayer public bool newWizardInventory = false; public bool newSteampunkerInventory = false; public bool newCyborgInventory = false; + public bool newPrincessInventory = false; public bool newSkeletonMerchantInventory = false; public bool newPermafrostInventory = false; public bool newCirrusInventory = false; @@ -1159,6 +1162,8 @@ namespace CalamityMod.CalPlayer newMerchantInventory = false; newPainterInventory = false; + newGolferInventory = false; + newZoologistInventory = false; newDyeTraderInventory = false; newPartyGirlInventory = false; newStylistInventory = false; @@ -1175,6 +1180,7 @@ namespace CalamityMod.CalPlayer newWizardInventory = false; newSteampunkerInventory = false; newCyborgInventory = false; + newPrincessInventory = false; newSkeletonMerchantInventory = false; newPermafrostInventory = false; newCirrusInventory = false; @@ -1210,6 +1216,8 @@ namespace CalamityMod.CalPlayer boost.AddWithCondition("newMerchantInventory", newMerchantInventory); boost.AddWithCondition("newPainterInventory", newPainterInventory); + boost.AddWithCondition("newGolferInventory", newGolferInventory); + boost.AddWithCondition("newZoologistInventory", newZoologistInventory); boost.AddWithCondition("newDyeTraderInventory", newDyeTraderInventory); boost.AddWithCondition("newPartyGirlInventory", newPartyGirlInventory); boost.AddWithCondition("newStylistInventory", newStylistInventory); @@ -1226,6 +1234,7 @@ namespace CalamityMod.CalPlayer boost.AddWithCondition("newWizardInventory", newWizardInventory); boost.AddWithCondition("newSteampunkerInventory", newSteampunkerInventory); boost.AddWithCondition("newCyborgInventory", newCyborgInventory); + boost.AddWithCondition("newPrincessInventory", newPrincessInventory); boost.AddWithCondition("newSkeletonMerchantInventory", newSkeletonMerchantInventory); boost.AddWithCondition("newPermafrostInventory", newPermafrostInventory); boost.AddWithCondition("newCirrusInventory", newCirrusInventory); @@ -1313,6 +1322,8 @@ namespace CalamityMod.CalPlayer newMerchantInventory = boost.Contains("newMerchantInventory"); newPainterInventory = boost.Contains("newPainterInventory"); + newGolferInventory = boost.Contains("newGolferInventory"); + newZoologistInventory = boost.Contains("newZoologistInventory"); newDyeTraderInventory = boost.Contains("newDyeTraderInventory"); newPartyGirlInventory = boost.Contains("newPartyGirlInventory"); newStylistInventory = boost.Contains("newStylistInventory"); @@ -1329,6 +1340,7 @@ namespace CalamityMod.CalPlayer newWizardInventory = boost.Contains("newWizardInventory"); newSteampunkerInventory = boost.Contains("newSteampunkerInventory"); newCyborgInventory = boost.Contains("newCyborgInventory"); + newPrincessInventory = boost.Contains("newPrincessInventory"); newSkeletonMerchantInventory = boost.Contains("newSkeletonMerchantInventory"); newPermafrostInventory = boost.Contains("newPermafrostInventory"); newCirrusInventory = boost.Contains("newCirrusInventory"); diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 4c0f588078..c6a1e35c44 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -401,6 +401,14 @@ namespace CalamityMod.NPCs if (Main.LocalPlayer.Calamity().newPainterInventory) DrawNewInventoryAlert(npc); break; + case NPCID.Golfer: + if (Main.LocalPlayer.Calamity().newGolferInventory) + DrawNewInventoryAlert(npc); + break; + case NPCID.BestiaryGirl: + if (Main.LocalPlayer.Calamity().newZoologistInventory) + DrawNewInventoryAlert(npc); + break; case NPCID.DyeTrader: if (Main.LocalPlayer.Calamity().newDyeTraderInventory) DrawNewInventoryAlert(npc); @@ -465,6 +473,10 @@ namespace CalamityMod.NPCs if (Main.LocalPlayer.Calamity().newCyborgInventory) DrawNewInventoryAlert(npc); break; + case NPCID.Princess: + if (Main.LocalPlayer.Calamity().newPrincessInventory) + DrawNewInventoryAlert(npc); + break; case NPCID.SkeletonMerchant: if (Main.LocalPlayer.Calamity().newSkeletonMerchantInventory) DrawNewInventoryAlert(npc); @@ -516,6 +528,12 @@ namespace CalamityMod.NPCs case NPCID.Painter: Main.LocalPlayer.Calamity().newPainterInventory = false; break; + case NPCID.Golfer: + Main.LocalPlayer.Calamity().newGolferInventory = false; + break; + case NPCID.BestiaryGirl: + Main.LocalPlayer.Calamity().newZoologistInventory = false; + break; case NPCID.DyeTrader: Main.LocalPlayer.Calamity().newDyeTraderInventory = false; break; @@ -564,6 +582,9 @@ namespace CalamityMod.NPCs case NPCID.Cyborg: Main.LocalPlayer.Calamity().newCyborgInventory = false; break; + case NPCID.Princess: + Main.LocalPlayer.Calamity().newPrincessInventory = false; + break; case NPCID.SkeletonMerchant: Main.LocalPlayer.Calamity().newSkeletonMerchantInventory = false; break; @@ -605,6 +626,12 @@ namespace CalamityMod.NPCs case NPCID.Painter: Main.LocalPlayer.Calamity().newPainterInventory = true; break; + case NPCID.Golfer: + Main.LocalPlayer.Calamity().newGolferInventory = true; + break; + case NPCID.BestiaryGirl: + Main.LocalPlayer.Calamity().newZoologistInventory = true; + break; case NPCID.DyeTrader: Main.LocalPlayer.Calamity().newDyeTraderInventory = true; break; @@ -653,6 +680,9 @@ namespace CalamityMod.NPCs case NPCID.Cyborg: Main.LocalPlayer.Calamity().newCyborgInventory = true; break; + case NPCID.Princess: + Main.LocalPlayer.Calamity().newPrincessInventory = true; + break; case NPCID.SkeletonMerchant: Main.LocalPlayer.Calamity().newSkeletonMerchantInventory = true; break; From 6b4c55c2f648b7948244de68f86ccc1373bf526c Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 3 Jun 2022 13:49:50 -0400 Subject: [PATCH 18/30] Tested a few renames with LegacyName. Item Frames, Weapon Racks and Mannequins are all stable. 1 - Renamed AtaxiaArmor to HydrothermicArmor. 2 - Renamed StardustStaff to EidolonStaff. 3 - Renamed MepheticSprayer to BlightSpewer. --- CalPlayer/CalamityPlayerDrawEffects.cs | 2 +- Items/Accessories/Wings/HadalMantle.cs | 2 +- Items/Armor/AtaxiaHeadgear.cs | 2 +- Items/Armor/AtaxiaHelm.cs | 2 +- Items/Armor/AtaxiaHelmet.cs | 2 +- Items/Armor/AtaxiaHood.cs | 2 +- Items/Armor/AtaxiaMask.cs | 2 +- .../Armor/{AtaxiaArmor.cs => HydrothermicArmor.cs} | 3 ++- .../{AtaxiaArmor.png => HydrothermicArmor.png} | Bin ...xiaArmor_Body.png => HydrothermicArmor_Body.png} | Bin Items/TreasureBags/PlaguebringerGoliathBag.cs | 2 +- .../Magic/{StardustStaff.cs => EidolonStaff.cs} | 3 ++- .../Magic/{StardustStaff.png => EidolonStaff.png} | Bin .../Ranged/{MepheticSprayer.cs => BlightSpewer.cs} | 3 ++- .../{MepheticSprayer.png => BlightSpewer.png} | Bin Items/Weapons/Ranged/ElementalEruption.cs | 2 +- ModSupport/WeakReferenceSupport.cs | 2 +- NPCs/Abyss/EidolonWyrmHead.cs | 2 +- NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs | 2 +- 19 files changed, 18 insertions(+), 15 deletions(-) rename Items/Armor/{AtaxiaArmor.cs => HydrothermicArmor.cs} (94%) rename Items/Armor/{AtaxiaArmor.png => HydrothermicArmor.png} (100%) rename Items/Armor/{AtaxiaArmor_Body.png => HydrothermicArmor_Body.png} (100%) rename Items/Weapons/Magic/{StardustStaff.cs => EidolonStaff.cs} (98%) rename Items/Weapons/Magic/{StardustStaff.png => EidolonStaff.png} (100%) rename Items/Weapons/Ranged/{MepheticSprayer.cs => BlightSpewer.cs} (93%) rename Items/Weapons/Ranged/{MepheticSprayer.png => BlightSpewer.png} (100%) diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index 5b8c937ee5..7d1caf1c15 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -868,7 +868,7 @@ namespace CalamityMod.CalPlayer List tankItems = new List() { ModContent.ItemType(), - ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), diff --git a/Items/Accessories/Wings/HadalMantle.cs b/Items/Accessories/Wings/HadalMantle.cs index 63738c735c..7b8e37c3be 100644 --- a/Items/Accessories/Wings/HadalMantle.cs +++ b/Items/Accessories/Wings/HadalMantle.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Accessories.Wings if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType()) && - player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) + player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) { player.GetDamage() += 0.05f; } diff --git a/Items/Armor/AtaxiaHeadgear.cs b/Items/Armor/AtaxiaHeadgear.cs index 074f53ba72..915e2ba18c 100644 --- a/Items/Armor/AtaxiaHeadgear.cs +++ b/Items/Armor/AtaxiaHeadgear.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor public override bool IsArmorSet(Item head, Item body, Item legs) { - return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); + return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); } public override void ArmorSetShadows(Player player) diff --git a/Items/Armor/AtaxiaHelm.cs b/Items/Armor/AtaxiaHelm.cs index 4f170a7003..8077b4873f 100644 --- a/Items/Armor/AtaxiaHelm.cs +++ b/Items/Armor/AtaxiaHelm.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Armor public override bool IsArmorSet(Item head, Item body, Item legs) { - return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); + return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); } public override void ArmorSetShadows(Player player) diff --git a/Items/Armor/AtaxiaHelmet.cs b/Items/Armor/AtaxiaHelmet.cs index 5987f852bd..a33c37f12d 100644 --- a/Items/Armor/AtaxiaHelmet.cs +++ b/Items/Armor/AtaxiaHelmet.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Armor public override bool IsArmorSet(Item head, Item body, Item legs) { - return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); + return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); } public override void ArmorSetShadows(Player player) diff --git a/Items/Armor/AtaxiaHood.cs b/Items/Armor/AtaxiaHood.cs index e7ccbd7f2c..f12bfb6ff4 100644 --- a/Items/Armor/AtaxiaHood.cs +++ b/Items/Armor/AtaxiaHood.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Armor public override bool IsArmorSet(Item head, Item body, Item legs) { - return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); + return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); } public override void ArmorSetShadows(Player player) diff --git a/Items/Armor/AtaxiaMask.cs b/Items/Armor/AtaxiaMask.cs index 2095d45546..11bedc9db0 100644 --- a/Items/Armor/AtaxiaMask.cs +++ b/Items/Armor/AtaxiaMask.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor public override bool IsArmorSet(Item head, Item body, Item legs) { - return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); + return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); } public override void ArmorSetShadows(Player player) diff --git a/Items/Armor/AtaxiaArmor.cs b/Items/Armor/HydrothermicArmor.cs similarity index 94% rename from Items/Armor/AtaxiaArmor.cs rename to Items/Armor/HydrothermicArmor.cs index 48742ab5d2..c150c03481 100644 --- a/Items/Armor/AtaxiaArmor.cs +++ b/Items/Armor/HydrothermicArmor.cs @@ -6,7 +6,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Body)] - public class AtaxiaArmor : ModItem + [LegacyName("AtaxiaArmor")] + public class HydrothermicArmor : ModItem { public override void SetStaticDefaults() { diff --git a/Items/Armor/AtaxiaArmor.png b/Items/Armor/HydrothermicArmor.png similarity index 100% rename from Items/Armor/AtaxiaArmor.png rename to Items/Armor/HydrothermicArmor.png diff --git a/Items/Armor/AtaxiaArmor_Body.png b/Items/Armor/HydrothermicArmor_Body.png similarity index 100% rename from Items/Armor/AtaxiaArmor_Body.png rename to Items/Armor/HydrothermicArmor_Body.png diff --git a/Items/TreasureBags/PlaguebringerGoliathBag.cs b/Items/TreasureBags/PlaguebringerGoliathBag.cs index 47ef2401c0..59dbd78990 100644 --- a/Items/TreasureBags/PlaguebringerGoliathBag.cs +++ b/Items/TreasureBags/PlaguebringerGoliathBag.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Items.TreasureBags DropHelper.WeightStack(w), DropHelper.WeightStack(w), DropHelper.WeightStack(w), - DropHelper.WeightStack(w), // Blight Spewer + DropHelper.WeightStack(w), // Blight Spewer DropHelper.WeightStack(w), DropHelper.WeightStack(w), DropHelper.WeightStack(w), diff --git a/Items/Weapons/Magic/StardustStaff.cs b/Items/Weapons/Magic/EidolonStaff.cs similarity index 98% rename from Items/Weapons/Magic/StardustStaff.cs rename to Items/Weapons/Magic/EidolonStaff.cs index 304ed3b168..da3fb6d1e2 100644 --- a/Items/Weapons/Magic/StardustStaff.cs +++ b/Items/Weapons/Magic/EidolonStaff.cs @@ -8,7 +8,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Magic { - public class StardustStaff : ModItem + [LegacyName("StardustStaff")] + public class EidolonStaff : ModItem { public override void SetStaticDefaults() { diff --git a/Items/Weapons/Magic/StardustStaff.png b/Items/Weapons/Magic/EidolonStaff.png similarity index 100% rename from Items/Weapons/Magic/StardustStaff.png rename to Items/Weapons/Magic/EidolonStaff.png diff --git a/Items/Weapons/Ranged/MepheticSprayer.cs b/Items/Weapons/Ranged/BlightSpewer.cs similarity index 93% rename from Items/Weapons/Ranged/MepheticSprayer.cs rename to Items/Weapons/Ranged/BlightSpewer.cs index e5b1a4c732..4f50043171 100644 --- a/Items/Weapons/Ranged/MepheticSprayer.cs +++ b/Items/Weapons/Ranged/BlightSpewer.cs @@ -6,7 +6,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Ranged { - public class MepheticSprayer : ModItem + [LegacyName("MepheticSprayer")] + public class BlightSpewer : ModItem { public override void SetStaticDefaults() { diff --git a/Items/Weapons/Ranged/MepheticSprayer.png b/Items/Weapons/Ranged/BlightSpewer.png similarity index 100% rename from Items/Weapons/Ranged/MepheticSprayer.png rename to Items/Weapons/Ranged/BlightSpewer.png diff --git a/Items/Weapons/Ranged/ElementalEruption.cs b/Items/Weapons/Ranged/ElementalEruption.cs index 68dee3591d..848d2bf240 100644 --- a/Items/Weapons/Ranged/ElementalEruption.cs +++ b/Items/Weapons/Ranged/ElementalEruption.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Items.Weapons.Ranged CreateRecipe(). AddIngredient(). AddIngredient(). - AddIngredient(). + AddIngredient(). AddIngredient(). AddIngredient(5). AddIngredient(ItemID.LunarBar, 5). diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 544e749ab5..6f1cb3c2dc 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -412,7 +412,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("PlaguebringerGoliath", out float order); int type = NPCType(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemType(), ItemID.Stinger, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemID.Stinger, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; string instructions = $"Use an [i:{summon}] in the Jungle Biome"; string despawn = CalamityUtils.ColorMessage("HOSTILE SPECIMENS TERMINATED. INITIATE RECALL TO HOME BASE.", new Color(0x00, 0xFF, 0x00)); diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index 80842bd210..552fac7b53 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -511,7 +511,7 @@ namespace CalamityMod.NPCs.Abyss aewMinionCondition.Add(postPolter); postPolter.Add(ModContent.ItemType(), 3); postPolter.Add(ModContent.ItemType(), 3); - postPolter.Add(ModContent.ItemType(), 3); + postPolter.Add(ModContent.ItemType(), 3); // Post-Clone: 6-8 Lumenyl (8-11 on Expert) LeadingConditionRule postClone = new(DropHelper.If(() => DownedBossSystem.downedCalamitas)); diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 0a98e0b274..43f294a884 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -1232,7 +1232,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType(), // Blight Spewer + ModContent.ItemType(), // Blight Spewer ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), From 6b49674a93fb46954a4f769e4b562bbf13e5e425 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 3 Jun 2022 13:52:41 -0400 Subject: [PATCH 19/30] Added LegacyName for Merk's workbench renames --- Items/Placeables/FurnitureAbyss/AbyssWorkBench.cs | 1 + Items/Placeables/FurnitureAcidwood/AcidwoodWorkBench.cs | 1 + Items/Placeables/FurnitureAncient/AncientWorkBench.cs | 1 + Items/Placeables/FurnitureAshen/AshenWorkBench.cs | 1 + Items/Placeables/FurnitureCosmilite/CosmiliteWorkBench.cs | 1 + Tiles/FurnitureAbyss/AbyssWorkBench.cs | 1 + Tiles/FurnitureAcidwood/AcidwoodWorkBenchTile.cs | 1 + Tiles/FurnitureAncient/AncientWorkBench.cs | 1 + Tiles/FurnitureAshen/AshenWorkBench.cs | 1 + Tiles/FurnitureCosmilite/CosmiliteWorkBench.cs | 1 + 10 files changed, 10 insertions(+) diff --git a/Items/Placeables/FurnitureAbyss/AbyssWorkBench.cs b/Items/Placeables/FurnitureAbyss/AbyssWorkBench.cs index 21cbb681df..57a2b33211 100644 --- a/Items/Placeables/FurnitureAbyss/AbyssWorkBench.cs +++ b/Items/Placeables/FurnitureAbyss/AbyssWorkBench.cs @@ -4,6 +4,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureAbyss { + [LegacyName("AbyssWorkbench")] public class AbyssWorkBench : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureAcidwood/AcidwoodWorkBench.cs b/Items/Placeables/FurnitureAcidwood/AcidwoodWorkBench.cs index f909d550c7..8a27d3a9f4 100644 --- a/Items/Placeables/FurnitureAcidwood/AcidwoodWorkBench.cs +++ b/Items/Placeables/FurnitureAcidwood/AcidwoodWorkBench.cs @@ -3,6 +3,7 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureAcidwood { + [LegacyName("AcidwoodWorkbench")] public class AcidwoodWorkBench : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureAncient/AncientWorkBench.cs b/Items/Placeables/FurnitureAncient/AncientWorkBench.cs index 3b6f88101f..9baf7218ea 100644 --- a/Items/Placeables/FurnitureAncient/AncientWorkBench.cs +++ b/Items/Placeables/FurnitureAncient/AncientWorkBench.cs @@ -4,6 +4,7 @@ using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureAncient { + [LegacyName("AncientWorkbench")] public class AncientWorkBench : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureAshen/AshenWorkBench.cs b/Items/Placeables/FurnitureAshen/AshenWorkBench.cs index 89840efb8d..6fb9b7a851 100644 --- a/Items/Placeables/FurnitureAshen/AshenWorkBench.cs +++ b/Items/Placeables/FurnitureAshen/AshenWorkBench.cs @@ -4,6 +4,7 @@ using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureAshen { + [LegacyName("AshenWorkbench")] public class AshenWorkBench : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureCosmilite/CosmiliteWorkBench.cs b/Items/Placeables/FurnitureCosmilite/CosmiliteWorkBench.cs index e55c317ce1..5fd662aee0 100644 --- a/Items/Placeables/FurnitureCosmilite/CosmiliteWorkBench.cs +++ b/Items/Placeables/FurnitureCosmilite/CosmiliteWorkBench.cs @@ -4,6 +4,7 @@ using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureCosmilite { + [LegacyName("CosmiliteWorkbench")] public class CosmiliteWorkBench : ModItem { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureAbyss/AbyssWorkBench.cs b/Tiles/FurnitureAbyss/AbyssWorkBench.cs index c4830b9aa6..1c910c151d 100644 --- a/Tiles/FurnitureAbyss/AbyssWorkBench.cs +++ b/Tiles/FurnitureAbyss/AbyssWorkBench.cs @@ -6,6 +6,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureAbyss { + [LegacyName("AbyssWorkbench")] public class AbyssWorkBench : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureAcidwood/AcidwoodWorkBenchTile.cs b/Tiles/FurnitureAcidwood/AcidwoodWorkBenchTile.cs index 8ddb87a534..1f5d475923 100644 --- a/Tiles/FurnitureAcidwood/AcidwoodWorkBenchTile.cs +++ b/Tiles/FurnitureAcidwood/AcidwoodWorkBenchTile.cs @@ -7,6 +7,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureAcidwood { + [LegacyName("AcidwoodWorkbenchTile")] public class AcidwoodWorkBenchTile : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureAncient/AncientWorkBench.cs b/Tiles/FurnitureAncient/AncientWorkBench.cs index 07f03e6c74..9430a3d26c 100644 --- a/Tiles/FurnitureAncient/AncientWorkBench.cs +++ b/Tiles/FurnitureAncient/AncientWorkBench.cs @@ -6,6 +6,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureAncient { + [LegacyName("AncientWorkbench")] public class AncientWorkBench : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureAshen/AshenWorkBench.cs b/Tiles/FurnitureAshen/AshenWorkBench.cs index a706d45812..aa8adb7278 100644 --- a/Tiles/FurnitureAshen/AshenWorkBench.cs +++ b/Tiles/FurnitureAshen/AshenWorkBench.cs @@ -6,6 +6,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureAshen { + [LegacyName("AshenWorkbench")] public class AshenWorkBench : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureCosmilite/CosmiliteWorkBench.cs b/Tiles/FurnitureCosmilite/CosmiliteWorkBench.cs index c9d2cb4337..5e67fb2585 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteWorkBench.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteWorkBench.cs @@ -6,6 +6,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureCosmilite { + [LegacyName("CosmiliteWorkbench")] public class CosmiliteWorkBench : ModTile { public override void SetStaticDefaults() From f3ff6b90e513e621323b07cd54835f586008e3ab Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 3 Jun 2022 14:00:27 -0400 Subject: [PATCH 20/30] Otherworldly Furniture legacy names --- .../OtherworldlyBathtub.cs | 1 + .../FurnitureOtherworldly/OtherworldlyBed.cs | 3 +- .../OtherworldlyBookcase.cs | 3 +- .../OtherworldlyCandelabra.cs | 3 +- .../OtherworldlyCandle.cs | 3 +- .../OtherworldlyChair.cs | 1 + .../OtherworldlyChandelier.cs | 3 +- .../OtherworldlyChest.cs | 3 +- .../OtherworldlyClock.cs | 3 +- .../FurnitureOtherworldly/OtherworldlyDoor.cs | 3 +- .../OtherworldlyDresser.cs | 3 +- .../FurnitureOtherworldly/OtherworldlyLamp.cs | 3 +- .../OtherworldlyLantern.cs | 3 +- .../OtherworldlyPiano.cs | 3 +- .../OtherworldlyPlatform.cs | 1 + .../FurnitureOtherworldly/OtherworldlySink.cs | 3 +- .../FurnitureOtherworldly/OtherworldlySofa.cs | 3 +- .../OtherworldlyStone.cs | 1 + .../OtherworldlyTable.cs | 3 +- .../OtherworldlyWorkBench.cs | 3 +- .../OtherworldlyBathtub.cs | 1 + .../FurnitureOtherworldly/OtherworldlyBed.cs | 1 + .../OtherworldlyBookcase.cs | 1 + .../OtherworldlyCandelabra.cs | 1 + .../OtherworldlyCandle.cs | 3 +- .../OtherworldlyChair.cs | 1 + .../OtherworldlyChandelier.cs | 1 + .../OtherworldlyChest.cs | 1 + .../OtherworldlyClock.cs | 1 + .../OtherworldlyDoorClosed.cs | 1 + .../OtherworldlyDoorOpen.cs | 1 + .../OtherworldlyDresser.cs | 1 + .../FurnitureOtherworldly/OtherworldlyLamp.cs | 1 + .../OtherworldlyLantern.cs | 1 + .../OtherworldlyPiano.cs | 1 + .../OtherworldlyPlatform.cs | 3 +- .../FurnitureOtherworldly/OtherworldlySink.cs | 1 + .../FurnitureOtherworldly/OtherworldlySofa.cs | 1 + .../OtherworldlyStone.cs | 1 + .../OtherworldlyTable.cs | 1 + .../OtherworldlyWorkBench.cs | 40 +++++++++++++++++++ .../OtherworldlyWorkbench.cs | 1 + 42 files changed, 99 insertions(+), 18 deletions(-) create mode 100644 Tiles/FurnitureOtherworldly/OtherworldlyWorkBench.cs diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyBathtub.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyBathtub.cs index f85cc0c957..1369d64de0 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyBathtub.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyBathtub.cs @@ -2,6 +2,7 @@ using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultBathtub")] public class OtherworldlyBathtub : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyBed.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyBed.cs index d9639383de..83710edde7 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyBed.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyBed.cs @@ -1,7 +1,8 @@ -using Terraria.ID; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultBed")] public class OtherworldlyBed : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyBookcase.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyBookcase.cs index b50b25f69e..0467aa0fe0 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyBookcase.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyBookcase.cs @@ -1,7 +1,8 @@ -using Terraria.ID; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultBookcase")] public class OtherworldlyBookcase : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyCandelabra.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyCandelabra.cs index 0146407c46..5b1e1d0534 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyCandelabra.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyCandelabra.cs @@ -1,8 +1,9 @@ -using CalamityMod.Items.Placeables.FurnitureCosmilite; +using CalamityMod.Items.Placeables.FurnitureCosmilite; using Terraria.ModLoader; using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultCandelabra")] public class OtherworldlyCandelabra : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyCandle.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyCandle.cs index af3380d849..ac4318b09b 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyCandle.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyCandle.cs @@ -1,8 +1,9 @@ -using CalamityMod.Items.Placeables.FurnitureCosmilite; +using CalamityMod.Items.Placeables.FurnitureCosmilite; using Terraria.ModLoader; using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultCandle")] public class OtherworldlyCandle : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyChair.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyChair.cs index f460580949..cfcad6fccd 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyChair.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyChair.cs @@ -2,6 +2,7 @@ using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultChair")] public class OtherworldlyChair : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyChandelier.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyChandelier.cs index fa62aad08a..a3f57a8e30 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyChandelier.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyChandelier.cs @@ -1,8 +1,9 @@ -using CalamityMod.Items.Placeables.FurnitureCosmilite; +using CalamityMod.Items.Placeables.FurnitureCosmilite; using Terraria.ModLoader; using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultChandelier")] public class OtherworldlyChandelier : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyChest.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyChest.cs index c61b048fbc..19c8634ed9 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyChest.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyChest.cs @@ -1,8 +1,9 @@ -using CalamityMod.Items.Placeables.FurnitureCosmilite; +using CalamityMod.Items.Placeables.FurnitureCosmilite; using Terraria.ModLoader; using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultChest")] public class OtherworldlyChest : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyClock.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyClock.cs index 4440a41e03..3c08890793 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyClock.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyClock.cs @@ -1,8 +1,9 @@ -using CalamityMod.Items.Placeables.FurnitureCosmilite; +using CalamityMod.Items.Placeables.FurnitureCosmilite; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultClock")] public class OtherworldlyClock : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyDoor.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyDoor.cs index 129c0135c4..29ab8d75b0 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyDoor.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyDoor.cs @@ -1,8 +1,9 @@ -using CalamityMod.Tiles.FurnitureOtherworldly; +using CalamityMod.Tiles.FurnitureOtherworldly; using Terraria.ModLoader; using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultDoor")] public class OtherworldlyDoor : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyDresser.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyDresser.cs index 5cde375ea8..1be1c1a889 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyDresser.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyDresser.cs @@ -1,7 +1,8 @@ -using Terraria.ModLoader; +using Terraria.ModLoader; using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultDresser")] public class OtherworldlyDresser : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyLamp.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyLamp.cs index 1000e13b48..f479897fad 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyLamp.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyLamp.cs @@ -1,8 +1,9 @@ -using CalamityMod.Items.Placeables.FurnitureCosmilite; +using CalamityMod.Items.Placeables.FurnitureCosmilite; using Terraria.ModLoader; using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultLamp")] public class OtherworldlyLamp : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyLantern.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyLantern.cs index 33ab65cbbb..6aaaa3d28a 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyLantern.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyLantern.cs @@ -1,8 +1,9 @@ -using CalamityMod.Items.Placeables.FurnitureCosmilite; +using CalamityMod.Items.Placeables.FurnitureCosmilite; using Terraria.ModLoader; using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultLantern")] public class OtherworldlyLantern : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyPiano.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyPiano.cs index 99c24d961e..755100f99c 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyPiano.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyPiano.cs @@ -1,7 +1,8 @@ -using Terraria.ID; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultPiano")] public class OtherworldlyPiano : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyPlatform.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyPlatform.cs index 885eff2609..4194361a98 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyPlatform.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyPlatform.cs @@ -2,6 +2,7 @@ using Terraria.ID; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultPlatform")] public class OtherworldlyPlatform : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlySink.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlySink.cs index 46704aee31..4fed9728f3 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlySink.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlySink.cs @@ -1,7 +1,8 @@ -using Terraria.ID; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultSink")] public class OtherworldlySink : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlySofa.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlySofa.cs index 25e1f24ae4..65a380519a 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlySofa.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlySofa.cs @@ -1,7 +1,8 @@ -using Terraria.ID; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultSofa")] public class OtherworldlySofa : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyStone.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyStone.cs index 271bcdc39e..d8ddcbc6b9 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyStone.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyStone.cs @@ -5,6 +5,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultStone")] public class OtherworldlyStone : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyTable.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyTable.cs index 7e2e5df1c5..dc42a92a5f 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyTable.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyTable.cs @@ -1,7 +1,8 @@ -using Terraria.ID; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultTable")] public class OtherworldlyTable : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureOtherworldly/OtherworldlyWorkBench.cs b/Items/Placeables/FurnitureOtherworldly/OtherworldlyWorkBench.cs index 994e3fea56..55b6505f3b 100644 --- a/Items/Placeables/FurnitureOtherworldly/OtherworldlyWorkBench.cs +++ b/Items/Placeables/FurnitureOtherworldly/OtherworldlyWorkBench.cs @@ -1,7 +1,8 @@ -using Terraria.ID; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureOtherworldly { + [LegacyName("OccultWorkbench", "OccultWorkBench")] public class OtherworldlyWorkBench : ModItem { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyBathtub.cs b/Tiles/FurnitureOtherworldly/OtherworldlyBathtub.cs index 7c3126708e..c9798b3d55 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyBathtub.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyBathtub.cs @@ -5,6 +5,7 @@ using Terraria.DataStructures; using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultBathtub")] public class OtherworldlyBathtub : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyBed.cs b/Tiles/FurnitureOtherworldly/OtherworldlyBed.cs index 822d5ddae4..f059ff6074 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyBed.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyBed.cs @@ -8,6 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultBed")] public class OtherworldlyBed : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyBookcase.cs b/Tiles/FurnitureOtherworldly/OtherworldlyBookcase.cs index ee44499a0b..c687a7d0cf 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyBookcase.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyBookcase.cs @@ -7,6 +7,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultBookcase")] public class OtherworldlyBookcase : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyCandelabra.cs b/Tiles/FurnitureOtherworldly/OtherworldlyCandelabra.cs index 212387a356..3fb8a578b3 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyCandelabra.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyCandelabra.cs @@ -7,6 +7,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultCandelabra")] public class OtherworldlyCandelabra : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyCandle.cs b/Tiles/FurnitureOtherworldly/OtherworldlyCandle.cs index fa5ef79a08..8d774d8858 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyCandle.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyCandle.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts.Furniture; +using CalamityMod.Dusts.Furniture; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -6,6 +6,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultCandle")] public class OtherworldlyCandle : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyChair.cs b/Tiles/FurnitureOtherworldly/OtherworldlyChair.cs index 6e361cdf71..2d59ac791a 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyChair.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyChair.cs @@ -10,6 +10,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultChair")] public class OtherworldlyChair : ModTile { public const int NextStyleHeight = 40; diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyChandelier.cs b/Tiles/FurnitureOtherworldly/OtherworldlyChandelier.cs index 3507fd59b6..8d7e712c30 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyChandelier.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyChandelier.cs @@ -8,6 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultChandelier")] public class OtherworldlyChandelier : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyChest.cs b/Tiles/FurnitureOtherworldly/OtherworldlyChest.cs index c256871577..9b6adc433b 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyChest.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyChest.cs @@ -8,6 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultChest")] public class OtherworldlyChest : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyClock.cs b/Tiles/FurnitureOtherworldly/OtherworldlyClock.cs index b9b80d531a..c90e810974 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyClock.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyClock.cs @@ -8,6 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultClock")] public class OtherworldlyClock : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyDoorClosed.cs b/Tiles/FurnitureOtherworldly/OtherworldlyDoorClosed.cs index 76f4eeab53..371aaeb6ab 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyDoorClosed.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyDoorClosed.cs @@ -9,6 +9,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultDoorClosed")] public class OtherworldlyDoorClosed : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyDoorOpen.cs b/Tiles/FurnitureOtherworldly/OtherworldlyDoorOpen.cs index 9d703af5db..0cc23c09cf 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyDoorOpen.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyDoorOpen.cs @@ -9,6 +9,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultDoorOpen")] public class OtherworldlyDoorOpen : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyDresser.cs b/Tiles/FurnitureOtherworldly/OtherworldlyDresser.cs index 0105c24c21..6a05eb81c0 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyDresser.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyDresser.cs @@ -8,6 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultDresser")] public class OtherworldlyDresser : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyLamp.cs b/Tiles/FurnitureOtherworldly/OtherworldlyLamp.cs index 005c5c80f8..187b4558df 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyLamp.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyLamp.cs @@ -8,6 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultLamp")] public class OtherworldlyLamp : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyLantern.cs b/Tiles/FurnitureOtherworldly/OtherworldlyLantern.cs index 9d9a400661..2b971fe0bd 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyLantern.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyLantern.cs @@ -8,6 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultLantern")] public class OtherworldlyLantern : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyPiano.cs b/Tiles/FurnitureOtherworldly/OtherworldlyPiano.cs index 702988e866..4fd7a717f8 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyPiano.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyPiano.cs @@ -5,6 +5,7 @@ using Terraria.DataStructures; using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultPiano")] public class OtherworldlyPiano : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyPlatform.cs b/Tiles/FurnitureOtherworldly/OtherworldlyPlatform.cs index d89ef6bb63..b54ef2fcec 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyPlatform.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyPlatform.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts.Furniture; +using CalamityMod.Dusts.Furniture; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -6,6 +6,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultPlatform")] public class OtherworldlyPlatform : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlySink.cs b/Tiles/FurnitureOtherworldly/OtherworldlySink.cs index 205685963b..08da863263 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlySink.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlySink.cs @@ -8,6 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultSink")] public class OtherworldlySink : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlySofa.cs b/Tiles/FurnitureOtherworldly/OtherworldlySofa.cs index 403440e4a1..11c124f3a1 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlySofa.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlySofa.cs @@ -5,6 +5,7 @@ using Terraria.DataStructures; using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultSofa")] public class OtherworldlySofa : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyStone.cs b/Tiles/FurnitureOtherworldly/OtherworldlyStone.cs index 2afb78e65c..dd5f32d86d 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyStone.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyStone.cs @@ -7,6 +7,7 @@ using Terraria.ID; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultStone")] public class OtherworldlyStone : ModTile { private int extraFrameHeight = 36; diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyTable.cs b/Tiles/FurnitureOtherworldly/OtherworldlyTable.cs index 05a6f3ab9f..96fd69ae88 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyTable.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyTable.cs @@ -8,6 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultTable")] public class OtherworldlyTable : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyWorkBench.cs b/Tiles/FurnitureOtherworldly/OtherworldlyWorkBench.cs new file mode 100644 index 0000000000..d0d5882fa5 --- /dev/null +++ b/Tiles/FurnitureOtherworldly/OtherworldlyWorkBench.cs @@ -0,0 +1,40 @@ +using CalamityMod.Dusts.Furniture; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureOtherworldly +{ + [LegacyName("OccultWorkbench", "OccultWorkBench")] + public class OtherworldlyWorkBench : ModTile + { + public override void SetStaticDefaults() + { + this.SetUpWorkBench(true); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Work Bench"); + AddMapEntry(new Color(191, 142, 111), name); + TileID.Sets.DisableSmartCursor[Type] = true; + AdjTiles = new int[] { TileID.WorkBenches }; + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 1, 0f, 0f, 1, new Color(125, 94, 128), 1f); + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, ModContent.DustType(), 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 16, ModContent.ItemType()); + } + } +} diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyWorkbench.cs b/Tiles/FurnitureOtherworldly/OtherworldlyWorkbench.cs index 9828b343a0..d0d5882fa5 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyWorkbench.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyWorkbench.cs @@ -7,6 +7,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureOtherworldly { + [LegacyName("OccultWorkbench", "OccultWorkBench")] public class OtherworldlyWorkBench : ModTile { public override void SetStaticDefaults() From d7ce1c05c25cccad6ef18afc107d2ec5281402e4 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 3 Jun 2022 14:03:35 -0400 Subject: [PATCH 21/30] Ancient and Ashen Pipe Organ legacy names --- Items/Placeables/FurnitureAncient/AncientPipeOrgan.cs | 1 + Items/Placeables/FurnitureAshen/AshenPipeOrgan.cs | 1 + Tiles/FurnitureAncient/AncientPipeOrgan.cs | 1 + Tiles/FurnitureAshen/AshenPipeOrgan.cs | 1 + 4 files changed, 4 insertions(+) diff --git a/Items/Placeables/FurnitureAncient/AncientPipeOrgan.cs b/Items/Placeables/FurnitureAncient/AncientPipeOrgan.cs index 36a2f79970..15cd992fd6 100644 --- a/Items/Placeables/FurnitureAncient/AncientPipeOrgan.cs +++ b/Items/Placeables/FurnitureAncient/AncientPipeOrgan.cs @@ -3,6 +3,7 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureAncient { + [LegacyName("AncientPiano")] public class AncientPipeOrgan : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/FurnitureAshen/AshenPipeOrgan.cs b/Items/Placeables/FurnitureAshen/AshenPipeOrgan.cs index a9032990f8..abec672873 100644 --- a/Items/Placeables/FurnitureAshen/AshenPipeOrgan.cs +++ b/Items/Placeables/FurnitureAshen/AshenPipeOrgan.cs @@ -3,6 +3,7 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureAshen { + [LegacyName("AshenPiano")] public class AshenPipeOrgan : ModItem { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureAncient/AncientPipeOrgan.cs b/Tiles/FurnitureAncient/AncientPipeOrgan.cs index b5a53d6b35..89aabfbafe 100644 --- a/Tiles/FurnitureAncient/AncientPipeOrgan.cs +++ b/Tiles/FurnitureAncient/AncientPipeOrgan.cs @@ -6,6 +6,7 @@ using Terraria.ObjectData; namespace CalamityMod.Tiles.FurnitureAncient { + [LegacyName("AncientPiano")] public class AncientPipeOrgan : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureAshen/AshenPipeOrgan.cs b/Tiles/FurnitureAshen/AshenPipeOrgan.cs index 00ae6d2de0..d74ff56901 100644 --- a/Tiles/FurnitureAshen/AshenPipeOrgan.cs +++ b/Tiles/FurnitureAshen/AshenPipeOrgan.cs @@ -6,6 +6,7 @@ using Terraria.ObjectData; namespace CalamityMod.Tiles.FurnitureAshen { + [LegacyName("AshenPiano")] public class AshenPipeOrgan : ModTile { public override void SetStaticDefaults() From 4127e9c09ab50e41f2741026dcdad3034010294e Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 3 Jun 2022 14:03:59 -0400 Subject: [PATCH 22/30] Abyss Synth legacy name --- Items/Placeables/FurnitureAbyss/AbyssSynth.cs | 1 + Tiles/FurnitureAbyss/AbyssSynth.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/Items/Placeables/FurnitureAbyss/AbyssSynth.cs b/Items/Placeables/FurnitureAbyss/AbyssSynth.cs index b5bd33fbff..140218bc84 100644 --- a/Items/Placeables/FurnitureAbyss/AbyssSynth.cs +++ b/Items/Placeables/FurnitureAbyss/AbyssSynth.cs @@ -3,6 +3,7 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureAbyss { + [LegacyName("AbyssPiano")] public class AbyssSynth : ModItem { public override void SetStaticDefaults() diff --git a/Tiles/FurnitureAbyss/AbyssSynth.cs b/Tiles/FurnitureAbyss/AbyssSynth.cs index 504f6523f0..1db862205a 100644 --- a/Tiles/FurnitureAbyss/AbyssSynth.cs +++ b/Tiles/FurnitureAbyss/AbyssSynth.cs @@ -4,6 +4,7 @@ using Terraria.DataStructures; using Terraria.ModLoader; namespace CalamityMod.Tiles.FurnitureAbyss { + [LegacyName("AbyssPiano")] public class AbyssSynth : ModTile { public override void SetStaticDefaults() From 582fac08db1f9971be74c3c7e41d0866021f6286 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 3 Jun 2022 14:04:26 -0400 Subject: [PATCH 23/30] Profaned Crucible legacy name --- Items/Placeables/Furniture/CraftingStations/ProfanedCrucible.cs | 1 + Tiles/Furniture/CraftingStations/ProfanedCrucible.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/Items/Placeables/Furniture/CraftingStations/ProfanedCrucible.cs b/Items/Placeables/Furniture/CraftingStations/ProfanedCrucible.cs index 588a53c30f..2ccb4806ce 100644 --- a/Items/Placeables/Furniture/CraftingStations/ProfanedCrucible.cs +++ b/Items/Placeables/Furniture/CraftingStations/ProfanedCrucible.cs @@ -4,6 +4,7 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.Furniture.CraftingStations { + [LegacyName("ProfanedBasin")] public class ProfanedCrucible : ModItem { public override void SetStaticDefaults() diff --git a/Tiles/Furniture/CraftingStations/ProfanedCrucible.cs b/Tiles/Furniture/CraftingStations/ProfanedCrucible.cs index 80215b2e45..e54d354c74 100644 --- a/Tiles/Furniture/CraftingStations/ProfanedCrucible.cs +++ b/Tiles/Furniture/CraftingStations/ProfanedCrucible.cs @@ -8,6 +8,7 @@ using Terraria.ObjectData; namespace CalamityMod.Tiles.Furniture.CraftingStations { + [LegacyName("ProfanedBasin")] public class ProfanedCrucible : ModTile { public override void SetStaticDefaults() From 9421977aff10dc26f55e2a72d7aa706858deed6a Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 3 Jun 2022 14:25:13 -0400 Subject: [PATCH 24/30] Legacy names for last remaining Merk renames --- Items/Placeables/CelestialRemains.cs | 8 ++++---- .../Furniture/CraftingStations/EutrophicShelf.cs | 1 + .../Furniture/CraftingStations/MonolithAmalgam.cs | 1 + Items/Placeables/NovaeSlag.cs | 4 ++-- Items/Placeables/Walls/CelestialRemainsWall.cs | 1 + Tiles/Astral/NovaeSlag.cs | 4 ++-- Tiles/AstralDesert/CelestialRemains.cs | 1 + Tiles/Furniture/CraftingStations/EutrophicShelf.cs | 1 + Tiles/Furniture/CraftingStations/MonolithAmalgam.cs | 1 + Walls/CelestialRemainsWall.cs | 3 ++- 10 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Items/Placeables/CelestialRemains.cs b/Items/Placeables/CelestialRemains.cs index 87c4221f02..26165387c8 100644 --- a/Items/Placeables/CelestialRemains.cs +++ b/Items/Placeables/CelestialRemains.cs @@ -1,12 +1,12 @@ -using CalamityMod.Items.Placeables.Walls; -using CalamityMod.Items.Materials; -using Terraria.ID; +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Walls; using Terraria; +using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.World; namespace CalamityMod.Items.Placeables { + [LegacyName("AstralFossil")] public class CelestialRemains : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/Furniture/CraftingStations/EutrophicShelf.cs b/Items/Placeables/Furniture/CraftingStations/EutrophicShelf.cs index e3759814e6..6b6bcca0bf 100644 --- a/Items/Placeables/Furniture/CraftingStations/EutrophicShelf.cs +++ b/Items/Placeables/Furniture/CraftingStations/EutrophicShelf.cs @@ -2,6 +2,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.Furniture.CraftingStations { + [LegacyName("EutrophicCrafting")] public class EutrophicShelf : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/Furniture/CraftingStations/MonolithAmalgam.cs b/Items/Placeables/Furniture/CraftingStations/MonolithAmalgam.cs index b3e89fffa2..3f4e2b99be 100644 --- a/Items/Placeables/Furniture/CraftingStations/MonolithAmalgam.cs +++ b/Items/Placeables/Furniture/CraftingStations/MonolithAmalgam.cs @@ -2,6 +2,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.Furniture.CraftingStations { + [LegacyName("MonolithCrafting")] public class MonolithAmalgam : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/NovaeSlag.cs b/Items/Placeables/NovaeSlag.cs index 9b10cf98e4..e664eee567 100644 --- a/Items/Placeables/NovaeSlag.cs +++ b/Items/Placeables/NovaeSlag.cs @@ -1,11 +1,11 @@ using CalamityMod.Items.Materials; -using Terraria.ID; using Terraria; +using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.World; namespace CalamityMod.Items.Placeables { + [LegacyName("AstralSilt")] public class NovaeSlag : ModItem { public override void SetStaticDefaults() diff --git a/Items/Placeables/Walls/CelestialRemainsWall.cs b/Items/Placeables/Walls/CelestialRemainsWall.cs index 218b88cdbc..af02d8c0a5 100644 --- a/Items/Placeables/Walls/CelestialRemainsWall.cs +++ b/Items/Placeables/Walls/CelestialRemainsWall.cs @@ -4,6 +4,7 @@ using Terraria.ID; namespace CalamityMod.Items.Placeables.Walls { + [LegacyName("AstralFossilWall")] public class CelestialRemainsWall : ModItem { public override void SetStaticDefaults() diff --git a/Tiles/Astral/NovaeSlag.cs b/Tiles/Astral/NovaeSlag.cs index 1a79e67511..8f0fba779a 100644 --- a/Tiles/Astral/NovaeSlag.cs +++ b/Tiles/Astral/NovaeSlag.cs @@ -1,5 +1,4 @@ - -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -7,6 +6,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Astral { + [LegacyName("AstralSilt")] public class NovaeSlag : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/AstralDesert/CelestialRemains.cs b/Tiles/AstralDesert/CelestialRemains.cs index d0ffeb1573..979f464b58 100644 --- a/Tiles/AstralDesert/CelestialRemains.cs +++ b/Tiles/AstralDesert/CelestialRemains.cs @@ -6,6 +6,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.AstralDesert { + [LegacyName("AstralFossil")] public class CelestialRemains : ModTile { public override void SetStaticDefaults() diff --git a/Tiles/Furniture/CraftingStations/EutrophicShelf.cs b/Tiles/Furniture/CraftingStations/EutrophicShelf.cs index ac559b9d42..f79d43bd9d 100644 --- a/Tiles/Furniture/CraftingStations/EutrophicShelf.cs +++ b/Tiles/Furniture/CraftingStations/EutrophicShelf.cs @@ -8,6 +8,7 @@ using Terraria.ObjectData; namespace CalamityMod.Tiles.Furniture.CraftingStations { + [LegacyName("EutrophicCrafting")] public class EutrophicShelf : ModTile { // diff --git a/Tiles/Furniture/CraftingStations/MonolithAmalgam.cs b/Tiles/Furniture/CraftingStations/MonolithAmalgam.cs index 583868d181..569034652c 100644 --- a/Tiles/Furniture/CraftingStations/MonolithAmalgam.cs +++ b/Tiles/Furniture/CraftingStations/MonolithAmalgam.cs @@ -7,6 +7,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Furniture.CraftingStations { + [LegacyName("MonolithCrafting")] public class MonolithAmalgam : ModTile { public override void SetStaticDefaults() diff --git a/Walls/CelestialRemainsWall.cs b/Walls/CelestialRemainsWall.cs index 516a305a7a..67fc2ec7ca 100644 --- a/Walls/CelestialRemainsWall.cs +++ b/Walls/CelestialRemainsWall.cs @@ -1,11 +1,12 @@ using Terraria; using Microsoft.Xna.Framework; using Terraria.ModLoader; + namespace CalamityMod.Walls { + [LegacyName("AstralFossilWall")] public class CelestialRemainsWall : ModWall { - public override void SetStaticDefaults() { DustType = ModContent.DustType(); From c6b27bb34deb865f7609bd0be59b319fa6acc606 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 3 Jun 2022 14:36:31 -0400 Subject: [PATCH 25/30] 1 - A lot of legacy names. 2 - Artemis Emblem -> Deadshot Brooch 3 - Internally renamed Statis' Void Sash dash to be correct --- CalPlayer/CalamityPlayer.cs | 4 ++-- ...tisBeltOfCursesDash.cs => StatisVoidSashDash.cs} | 4 ++-- Items/Accessories/AquaticHeart.cs | 1 + Items/Accessories/DaawnlightSpiritOrigin.cs | 2 +- .../{ArtemisEmblem.cs => DeadshotBrooch.cs} | 7 ++++--- .../{ArtemisEmblem.png => DeadshotBrooch.png} | Bin Items/Accessories/ElementalQuiver.cs | 4 ++-- Items/Accessories/FlameLickedShell.cs | 1 + Items/Accessories/OldDukeScales.cs | 1 + Items/Accessories/SpelunkersAmulet.cs | 1 + Items/Accessories/SpiritGlyph.cs | 1 + Items/Accessories/StatisVoidSash.cs | 3 ++- Items/Accessories/TheSponge.cs | 1 + Items/Accessories/UnstableGraniteCore.cs | 1 + Items/Accessories/VoidofCalamity.cs | 1 + Items/Accessories/WarbanneroftheSun.cs | 1 + Items/Accessories/Wings/AureateBooster.cs | 1 + Items/Accessories/Wings/HadalMantle.cs | 1 + Items/Accessories/Wings/SeraphTracers.cs | 1 + Items/Ammo/AccelerationRound.cs | 1 + Items/Ammo/AcidRound.cs | 1 + Items/Ammo/FlashRound.cs | 1 + Projectiles/CalamityGlobalProjectile.cs | 2 +- 23 files changed, 29 insertions(+), 12 deletions(-) rename CalPlayer/Dashes/{StatisBeltOfCursesDash.cs => StatisVoidSashDash.cs} (96%) rename Items/Accessories/{ArtemisEmblem.cs => DeadshotBrooch.cs} (87%) rename Items/Accessories/{ArtemisEmblem.png => DeadshotBrooch.png} (100%) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 71a5edeabd..c96b3f75bc 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -495,7 +495,7 @@ namespace CalamityMod.CalPlayer public bool projRefRare = false; public int projRefRareLifeRegenCounter = 0; public bool nanotech = false; - public bool artemisEmblem = false; + public bool deadshotBrooch = false; public bool shadowMinions = false; public bool holyMinions = false; public bool alchFlask = false; @@ -1645,7 +1645,7 @@ namespace CalamityMod.CalPlayer uberBees = false; projRefRare = false; nanotech = false; - artemisEmblem = false; + deadshotBrooch = false; cryogenSoul = false; yInsignia = false; eGauntlet = false; diff --git a/CalPlayer/Dashes/StatisBeltOfCursesDash.cs b/CalPlayer/Dashes/StatisVoidSashDash.cs similarity index 96% rename from CalPlayer/Dashes/StatisBeltOfCursesDash.cs rename to CalPlayer/Dashes/StatisVoidSashDash.cs index 8bc2bcb4c0..4b8b437867 100644 --- a/CalPlayer/Dashes/StatisBeltOfCursesDash.cs +++ b/CalPlayer/Dashes/StatisVoidSashDash.cs @@ -7,9 +7,9 @@ using Terraria.ModLoader; namespace CalamityMod.CalPlayer.Dashes { - public class StatisBeltOfCursesDash : PlayerDashEffect + public class StatisVoidSashDash : PlayerDashEffect { - public static new string ID => "Statis' Belt of Curses"; + public static new string ID => "Statis' Void Sash"; public override DashCollisionType CollisionType => DashCollisionType.NoCollision; diff --git a/Items/Accessories/AquaticHeart.cs b/Items/Accessories/AquaticHeart.cs index c2e23bb6b1..803bb83f19 100644 --- a/Items/Accessories/AquaticHeart.cs +++ b/Items/Accessories/AquaticHeart.cs @@ -5,6 +5,7 @@ using Terraria.ID; namespace CalamityMod.Items.Accessories { + [LegacyName("SirensHeart")] public class AquaticHeart : ModItem { public override void Load() diff --git a/Items/Accessories/DaawnlightSpiritOrigin.cs b/Items/Accessories/DaawnlightSpiritOrigin.cs index 24dc2e381e..d0810fbbfc 100644 --- a/Items/Accessories/DaawnlightSpiritOrigin.cs +++ b/Items/Accessories/DaawnlightSpiritOrigin.cs @@ -87,7 +87,7 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { CreateRecipe(). - AddIngredient(). + AddIngredient(). AddIngredient(ItemID.LunarBar). AddIngredient(15). AddIngredient(15). diff --git a/Items/Accessories/ArtemisEmblem.cs b/Items/Accessories/DeadshotBrooch.cs similarity index 87% rename from Items/Accessories/ArtemisEmblem.cs rename to Items/Accessories/DeadshotBrooch.cs index 2c69a9eb9e..73f041347d 100644 --- a/Items/Accessories/ArtemisEmblem.cs +++ b/Items/Accessories/DeadshotBrooch.cs @@ -5,12 +5,13 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { - public class ArtemisEmblem : ModItem + [LegacyName("DaedalusEmblem")] + public class DeadshotBrooch : ModItem { public override void SetStaticDefaults() { SacrificeTotal = 1; - DisplayName.SetDefault("Artemis Emblem"); + DisplayName.SetDefault("Deadshot Brooch"); Tooltip.SetDefault("10% increased ranged damage, 5% increased ranged critical strike chance and 20% reduced ammo usage\n" + "Greatly increases all ranged projectile velocity"); } @@ -26,7 +27,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - player.Calamity().artemisEmblem = true; + player.Calamity().deadshotBrooch = true; player.Calamity().rangedAmmoCost *= 0.8f; player.GetDamage() += 0.1f; player.GetCritChance() += 5; diff --git a/Items/Accessories/ArtemisEmblem.png b/Items/Accessories/DeadshotBrooch.png similarity index 100% rename from Items/Accessories/ArtemisEmblem.png rename to Items/Accessories/DeadshotBrooch.png diff --git a/Items/Accessories/ElementalQuiver.cs b/Items/Accessories/ElementalQuiver.cs index aeecaab4a5..40e9a723a8 100644 --- a/Items/Accessories/ElementalQuiver.cs +++ b/Items/Accessories/ElementalQuiver.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories player.GetCritChance() += 5; player.magicQuiver = true; CalamityPlayer modPlayer = player.Calamity(); - modPlayer.artemisEmblem = true; + modPlayer.deadshotBrooch = true; modPlayer.rangedAmmoCost *= 0.8f; } @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Accessories { CreateRecipe(). AddRecipeGroup("QuiversGroup"). - AddIngredient(). + AddIngredient(). AddIngredient(ItemID.LunarBar, 8). AddIngredient(4). AddIngredient(4). diff --git a/Items/Accessories/FlameLickedShell.cs b/Items/Accessories/FlameLickedShell.cs index 5685a25882..9e99720081 100644 --- a/Items/Accessories/FlameLickedShell.cs +++ b/Items/Accessories/FlameLickedShell.cs @@ -6,6 +6,7 @@ using Terraria.ID; namespace CalamityMod.Items.Accessories { + [LegacyName("FabledTortoiseShell")] public class FlameLickedShell : ModItem { public override void SetStaticDefaults() diff --git a/Items/Accessories/OldDukeScales.cs b/Items/Accessories/OldDukeScales.cs index fbcde0ff12..24496581bc 100644 --- a/Items/Accessories/OldDukeScales.cs +++ b/Items/Accessories/OldDukeScales.cs @@ -4,6 +4,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { + [LegacyName("DukeScales")] public class OldDukeScales : ModItem { public override void SetStaticDefaults() diff --git a/Items/Accessories/SpelunkersAmulet.cs b/Items/Accessories/SpelunkersAmulet.cs index 786ca988cb..c047503d4e 100644 --- a/Items/Accessories/SpelunkersAmulet.cs +++ b/Items/Accessories/SpelunkersAmulet.cs @@ -4,6 +4,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { + [LegacyName("ChaosAmulet")] public class SpelunkersAmulet : ModItem { public override void SetStaticDefaults() diff --git a/Items/Accessories/SpiritGlyph.cs b/Items/Accessories/SpiritGlyph.cs index 6a54cbf97a..e571d4e325 100644 --- a/Items/Accessories/SpiritGlyph.cs +++ b/Items/Accessories/SpiritGlyph.cs @@ -5,6 +5,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { + [LegacyName("SpiritGenerator")] public class SpiritGlyph : ModItem { public override void SetStaticDefaults() diff --git a/Items/Accessories/StatisVoidSash.cs b/Items/Accessories/StatisVoidSash.cs index dd61fffbb6..3254f647ba 100644 --- a/Items/Accessories/StatisVoidSash.cs +++ b/Items/Accessories/StatisVoidSash.cs @@ -8,6 +8,7 @@ using CalamityMod.CalPlayer.Dashes; namespace CalamityMod.Items.Accessories { + [LegacyName("StatisBeltofCurses")] public class StatisVoidSash : ModItem { public override void SetStaticDefaults() @@ -39,7 +40,7 @@ namespace CalamityMod.Items.Accessories player.jumpSpeedBoost += 0.6f; player.noFallDmg = true; player.blackBelt = true; - modPlayer.DashID = StatisBeltOfCursesDash.ID; + modPlayer.DashID = StatisVoidSashDash.ID; player.dash = 0; player.spikedBoots = 2; } diff --git a/Items/Accessories/TheSponge.cs b/Items/Accessories/TheSponge.cs index 95c5e97f11..84f07088ac 100644 --- a/Items/Accessories/TheSponge.cs +++ b/Items/Accessories/TheSponge.cs @@ -11,6 +11,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { + [LegacyName("Sponge")] public class TheSponge : ModItem { public override string Texture => (DateTime.Now.Month == 4 && DateTime.Now.Day == 1) ? "CalamityMod/Items/Accessories/TheSpongeReal" : "CalamityMod/Items/Accessories/TheSponge"; diff --git a/Items/Accessories/UnstableGraniteCore.cs b/Items/Accessories/UnstableGraniteCore.cs index acb52ceaae..a378f243a4 100644 --- a/Items/Accessories/UnstableGraniteCore.cs +++ b/Items/Accessories/UnstableGraniteCore.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; namespace CalamityMod.Items.Accessories { + [LegacyName("UnstablePrism")] public class UnstableGraniteCore : ModItem { public override void SetStaticDefaults() diff --git a/Items/Accessories/VoidofCalamity.cs b/Items/Accessories/VoidofCalamity.cs index b6ce55bac5..f1b953e39a 100644 --- a/Items/Accessories/VoidofCalamity.cs +++ b/Items/Accessories/VoidofCalamity.cs @@ -6,6 +6,7 @@ using Terraria.ID; namespace CalamityMod.Items.Accessories { + [LegacyName("CalamityRing")] public class VoidofCalamity : ModItem { public override void SetStaticDefaults() diff --git a/Items/Accessories/WarbanneroftheSun.cs b/Items/Accessories/WarbanneroftheSun.cs index 17a164d58d..643d30801b 100644 --- a/Items/Accessories/WarbanneroftheSun.cs +++ b/Items/Accessories/WarbanneroftheSun.cs @@ -9,6 +9,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { [AutoloadEquip(EquipType.Balloon)] + [LegacyName("SamuraiBadge")] public class WarbanneroftheSun : ModItem { internal const float MaxBonus = 0.2f; diff --git a/Items/Accessories/Wings/AureateBooster.cs b/Items/Accessories/Wings/AureateBooster.cs index f73d293c3c..c88f54c59c 100644 --- a/Items/Accessories/Wings/AureateBooster.cs +++ b/Items/Accessories/Wings/AureateBooster.cs @@ -10,6 +10,7 @@ using Terraria.DataStructures; namespace CalamityMod.Items.Accessories.Wings { [AutoloadEquip(EquipType.Wings)] + [LegacyName("AureateWings")] public class AureateBooster : ModItem { public override void SetStaticDefaults() diff --git a/Items/Accessories/Wings/HadalMantle.cs b/Items/Accessories/Wings/HadalMantle.cs index 7b8e37c3be..3a2068238c 100644 --- a/Items/Accessories/Wings/HadalMantle.cs +++ b/Items/Accessories/Wings/HadalMantle.cs @@ -10,6 +10,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories.Wings { [AutoloadEquip(EquipType.Wings)] + [LegacyName("DiscordianWings")] public class HadalMantle : ModItem { public override void SetStaticDefaults() diff --git a/Items/Accessories/Wings/SeraphTracers.cs b/Items/Accessories/Wings/SeraphTracers.cs index a80a788a08..f8d81e3968 100644 --- a/Items/Accessories/Wings/SeraphTracers.cs +++ b/Items/Accessories/Wings/SeraphTracers.cs @@ -10,6 +10,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories.Wings { [AutoloadEquip(EquipType.Wings, EquipType.Shoes)] + [LegacyName("InfinityBoots")] public class SeraphTracers : ModItem { public override void SetStaticDefaults() diff --git a/Items/Ammo/AccelerationRound.cs b/Items/Ammo/AccelerationRound.cs index 6ab873cdff..0a6aa526ea 100644 --- a/Items/Ammo/AccelerationRound.cs +++ b/Items/Ammo/AccelerationRound.cs @@ -6,6 +6,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Ammo { + [LegacyName("AccelerationBullet")] public class AccelerationRound : ModItem { public override void SetStaticDefaults() diff --git a/Items/Ammo/AcidRound.cs b/Items/Ammo/AcidRound.cs index 016ece855b..9f74c0d4ef 100644 --- a/Items/Ammo/AcidRound.cs +++ b/Items/Ammo/AcidRound.cs @@ -6,6 +6,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Ammo { + [LegacyName("AcidBullet")] public class AcidRound : ModItem { public override void SetStaticDefaults() diff --git a/Items/Ammo/FlashRound.cs b/Items/Ammo/FlashRound.cs index 12faf976a7..c6d16ff54d 100644 --- a/Items/Ammo/FlashRound.cs +++ b/Items/Ammo/FlashRound.cs @@ -5,6 +5,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Ammo { + [LegacyName("FlashBullet")] public class FlashRound : ModItem { public override void SetStaticDefaults() diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 9b9db271cf..fc392ab319 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -2033,7 +2033,7 @@ namespace CalamityMod.Projectiles } else { - if (modPlayer.artemisEmblem && projectile.CountsAsClass() && player.heldProj != projectile.whoAmI) + if (modPlayer.deadshotBrooch && projectile.CountsAsClass() && player.heldProj != projectile.whoAmI) projectile.extraUpdates += 1; if (modPlayer.camper && !player.StandingStill()) From 791d2309eac8b530afeebca8a27c1c99eec64c9e Mon Sep 17 00:00:00 2001 From: Cameron Ewell Date: Fri, 3 Jun 2022 14:39:07 -0400 Subject: [PATCH 26/30] Destroy incorrectly cased Otherworldly Work Bench --- .../OtherworldlyWorkbench.cs | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 Tiles/FurnitureOtherworldly/OtherworldlyWorkbench.cs diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyWorkbench.cs b/Tiles/FurnitureOtherworldly/OtherworldlyWorkbench.cs deleted file mode 100644 index d0d5882fa5..0000000000 --- a/Tiles/FurnitureOtherworldly/OtherworldlyWorkbench.cs +++ /dev/null @@ -1,40 +0,0 @@ -using CalamityMod.Dusts.Furniture; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.DataStructures; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Tiles.FurnitureOtherworldly -{ - [LegacyName("OccultWorkbench", "OccultWorkBench")] - public class OtherworldlyWorkBench : ModTile - { - public override void SetStaticDefaults() - { - this.SetUpWorkBench(true); - ModTranslation name = CreateMapEntryName(); - name.SetDefault("Work Bench"); - AddMapEntry(new Color(191, 142, 111), name); - TileID.Sets.DisableSmartCursor[Type] = true; - AdjTiles = new int[] { TileID.WorkBenches }; - } - - public override bool CreateDust(int i, int j, ref int type) - { - Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 1, 0f, 0f, 1, new Color(125, 94, 128), 1f); - Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, ModContent.DustType(), 0f, 0f, 1, new Color(255, 255, 255), 1f); - return false; - } - - public override void NumDust(int i, int j, bool fail, ref int num) - { - num = fail ? 1 : 3; - } - - public override void KillMultiTile(int i, int j, int frameX, int frameY) - { - Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 16, ModContent.ItemType()); - } - } -} From 7516e4349051c73e819b487ee2c7584bfa9cf079 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 3 Jun 2022 14:48:34 -0400 Subject: [PATCH 27/30] Fixed Daedalus armor internal names. Going forward I expect all armors to have standardized internal head names following this example. --- Items/Accessories/OrnateShield.cs | 6 +++--- Items/Accessories/Wings/StarlightWings.cs | 6 +++--- .../Armor/{DaedalusHat.cs => DaedalusHeadMagic.cs} | 3 ++- .../{DaedalusHat.png => DaedalusHeadMagic.png} | Bin ...dalusHat_Head.png => DaedalusHeadMagic_Head.png} | Bin .../Armor/{DaedalusHelm.cs => DaedalusHeadMelee.cs} | 3 ++- .../{DaedalusHelm.png => DaedalusHeadMelee.png} | Bin ...alusHelm_Head.png => DaedalusHeadMelee_Head.png} | Bin .../{DaedalusHelmet.cs => DaedalusHeadRanged.cs} | 3 ++- .../{DaedalusHelmet.png => DaedalusHeadRanged.png} | Bin ...sHelmet_Head.png => DaedalusHeadRanged_Head.png} | Bin .../{DaedalusVisor.cs => DaedalusHeadRogue.cs} | 3 ++- .../{DaedalusVisor.png => DaedalusHeadRogue.png} | Bin ...lusVisor_Head.png => DaedalusHeadRogue_Head.png} | Bin .../{DaedalusHeadgear.cs => DaedalusHeadSummon.cs} | 3 ++- ...{DaedalusHeadgear.png => DaedalusHeadSummon.png} | Bin ...eadgear_Head.png => DaedalusHeadSummon_Head.png} | Bin 17 files changed, 16 insertions(+), 11 deletions(-) rename Items/Armor/{DaedalusHat.cs => DaedalusHeadMagic.cs} (96%) rename Items/Armor/{DaedalusHat.png => DaedalusHeadMagic.png} (100%) rename Items/Armor/{DaedalusHat_Head.png => DaedalusHeadMagic_Head.png} (100%) rename Items/Armor/{DaedalusHelm.cs => DaedalusHeadMelee.cs} (96%) rename Items/Armor/{DaedalusHelm.png => DaedalusHeadMelee.png} (100%) rename Items/Armor/{DaedalusHelm_Head.png => DaedalusHeadMelee_Head.png} (100%) rename Items/Armor/{DaedalusHelmet.cs => DaedalusHeadRanged.cs} (96%) rename Items/Armor/{DaedalusHelmet.png => DaedalusHeadRanged.png} (100%) rename Items/Armor/{DaedalusHelmet_Head.png => DaedalusHeadRanged_Head.png} (100%) rename Items/Armor/{DaedalusVisor.cs => DaedalusHeadRogue.cs} (97%) rename Items/Armor/{DaedalusVisor.png => DaedalusHeadRogue.png} (100%) rename Items/Armor/{DaedalusVisor_Head.png => DaedalusHeadRogue_Head.png} (100%) rename Items/Armor/{DaedalusHeadgear.cs => DaedalusHeadSummon.cs} (97%) rename Items/Armor/{DaedalusHeadgear.png => DaedalusHeadSummon.png} (100%) rename Items/Armor/{DaedalusHeadgear_Head.png => DaedalusHeadSummon_Head.png} (100%) diff --git a/Items/Accessories/OrnateShield.cs b/Items/Accessories/OrnateShield.cs index 746be83076..82dcffd96a 100644 --- a/Items/Accessories/OrnateShield.cs +++ b/Items/Accessories/OrnateShield.cs @@ -32,9 +32,9 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType()) && + if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType()) && player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) { player.endurance += 0.08f; diff --git a/Items/Accessories/Wings/StarlightWings.cs b/Items/Accessories/Wings/StarlightWings.cs index 5bdb79e494..ab44067b33 100644 --- a/Items/Accessories/Wings/StarlightWings.cs +++ b/Items/Accessories/Wings/StarlightWings.cs @@ -36,9 +36,9 @@ namespace CalamityMod.Items.Accessories.Wings public override void UpdateAccessory(Player player, bool hideVisual) { - if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType()) && + if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType()) && player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) { player.GetDamage() += 0.05f; diff --git a/Items/Armor/DaedalusHat.cs b/Items/Armor/DaedalusHeadMagic.cs similarity index 96% rename from Items/Armor/DaedalusHat.cs rename to Items/Armor/DaedalusHeadMagic.cs index d78d2ccdd4..c95c731b2d 100644 --- a/Items/Armor/DaedalusHat.cs +++ b/Items/Armor/DaedalusHeadMagic.cs @@ -7,7 +7,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] - public class DaedalusHat : ModItem + [LegacyName("DaedalusHat")] + public class DaedalusHeadMagic : ModItem { public override void SetStaticDefaults() { diff --git a/Items/Armor/DaedalusHat.png b/Items/Armor/DaedalusHeadMagic.png similarity index 100% rename from Items/Armor/DaedalusHat.png rename to Items/Armor/DaedalusHeadMagic.png diff --git a/Items/Armor/DaedalusHat_Head.png b/Items/Armor/DaedalusHeadMagic_Head.png similarity index 100% rename from Items/Armor/DaedalusHat_Head.png rename to Items/Armor/DaedalusHeadMagic_Head.png diff --git a/Items/Armor/DaedalusHelm.cs b/Items/Armor/DaedalusHeadMelee.cs similarity index 96% rename from Items/Armor/DaedalusHelm.cs rename to Items/Armor/DaedalusHeadMelee.cs index c85b51fa15..0eb1c5af30 100644 --- a/Items/Armor/DaedalusHelm.cs +++ b/Items/Armor/DaedalusHeadMelee.cs @@ -7,7 +7,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] - public class DaedalusHelm : ModItem + [LegacyName("DaedalusHelm")] + public class DaedalusHeadMelee : ModItem { public override void SetStaticDefaults() { diff --git a/Items/Armor/DaedalusHelm.png b/Items/Armor/DaedalusHeadMelee.png similarity index 100% rename from Items/Armor/DaedalusHelm.png rename to Items/Armor/DaedalusHeadMelee.png diff --git a/Items/Armor/DaedalusHelm_Head.png b/Items/Armor/DaedalusHeadMelee_Head.png similarity index 100% rename from Items/Armor/DaedalusHelm_Head.png rename to Items/Armor/DaedalusHeadMelee_Head.png diff --git a/Items/Armor/DaedalusHelmet.cs b/Items/Armor/DaedalusHeadRanged.cs similarity index 96% rename from Items/Armor/DaedalusHelmet.cs rename to Items/Armor/DaedalusHeadRanged.cs index 39c7af4a53..3f2e878d1a 100644 --- a/Items/Armor/DaedalusHelmet.cs +++ b/Items/Armor/DaedalusHeadRanged.cs @@ -7,7 +7,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] - public class DaedalusHelmet : ModItem + [LegacyName("DaedalusHelmet")] + public class DaedalusHeadRanged : ModItem { public override void SetStaticDefaults() { diff --git a/Items/Armor/DaedalusHelmet.png b/Items/Armor/DaedalusHeadRanged.png similarity index 100% rename from Items/Armor/DaedalusHelmet.png rename to Items/Armor/DaedalusHeadRanged.png diff --git a/Items/Armor/DaedalusHelmet_Head.png b/Items/Armor/DaedalusHeadRanged_Head.png similarity index 100% rename from Items/Armor/DaedalusHelmet_Head.png rename to Items/Armor/DaedalusHeadRanged_Head.png diff --git a/Items/Armor/DaedalusVisor.cs b/Items/Armor/DaedalusHeadRogue.cs similarity index 97% rename from Items/Armor/DaedalusVisor.cs rename to Items/Armor/DaedalusHeadRogue.cs index 4da76e7576..09296affeb 100644 --- a/Items/Armor/DaedalusVisor.cs +++ b/Items/Armor/DaedalusHeadRogue.cs @@ -7,7 +7,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] - public class DaedalusVisor : ModItem + [LegacyName("DaedalusVisor")] + public class DaedalusHeadRogue : ModItem { public override void SetStaticDefaults() { diff --git a/Items/Armor/DaedalusVisor.png b/Items/Armor/DaedalusHeadRogue.png similarity index 100% rename from Items/Armor/DaedalusVisor.png rename to Items/Armor/DaedalusHeadRogue.png diff --git a/Items/Armor/DaedalusVisor_Head.png b/Items/Armor/DaedalusHeadRogue_Head.png similarity index 100% rename from Items/Armor/DaedalusVisor_Head.png rename to Items/Armor/DaedalusHeadRogue_Head.png diff --git a/Items/Armor/DaedalusHeadgear.cs b/Items/Armor/DaedalusHeadSummon.cs similarity index 97% rename from Items/Armor/DaedalusHeadgear.cs rename to Items/Armor/DaedalusHeadSummon.cs index 80d7a62216..fb30c969d6 100644 --- a/Items/Armor/DaedalusHeadgear.cs +++ b/Items/Armor/DaedalusHeadSummon.cs @@ -10,7 +10,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] - public class DaedalusHeadgear : ModItem + [LegacyName("DaedalusHeadgear")] + public class DaedalusHeadSummon : ModItem { public override void SetStaticDefaults() { diff --git a/Items/Armor/DaedalusHeadgear.png b/Items/Armor/DaedalusHeadSummon.png similarity index 100% rename from Items/Armor/DaedalusHeadgear.png rename to Items/Armor/DaedalusHeadSummon.png diff --git a/Items/Armor/DaedalusHeadgear_Head.png b/Items/Armor/DaedalusHeadSummon_Head.png similarity index 100% rename from Items/Armor/DaedalusHeadgear_Head.png rename to Items/Armor/DaedalusHeadSummon_Head.png From e991a049f4913340eb4d6658abcb5e4ca42f5bc4 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 3 Jun 2022 15:00:24 -0400 Subject: [PATCH 28/30] Removed lul, as modern godmode does its job correctly. --- CalPlayer/CalamityPlayer.cs | 16 +++++--------- CalPlayer/CalamityPlayerLifeRegen.cs | 2 +- CalPlayer/CalamityPlayerMiscEffects.cs | 4 ++-- Items/Accessories/CheatTestThing.cs | 28 ------------------------- Items/Accessories/CheatTestThing.png | Bin 3301 -> 0 bytes 5 files changed, 8 insertions(+), 42 deletions(-) delete mode 100644 Items/Accessories/CheatTestThing.cs delete mode 100644 Items/Accessories/CheatTestThing.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index c96b3f75bc..6799aca777 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -475,7 +475,6 @@ namespace CalamityMod.CalPlayer public bool fBarrier = false; public bool aBrain = false; public bool amalgam = false; - public bool lol = false; public bool raiderTalisman = false; public int raiderStack = 0; public int raiderCooldown = 0; @@ -1688,7 +1687,6 @@ namespace CalamityMod.CalPlayer manaOverloader = false; royalGel = false; handWarmer = false; - lol = false; raiderTalisman = false; gSabaton = false; sGlyph = false; @@ -4973,8 +4971,8 @@ namespace CalamityMod.CalPlayer hasIFrames = true; // If this NPC deals defense damage with contact damage, then apply defense damage. - // Defense damage is not applied if the player has iframes, is otherwise invincible, or has Lul equipped. - if (npc.Calamity().canBreakPlayerDefense && !hasIFrames && !invincible && !lol) + // Defense damage is not applied if the player has iframes or is otherwise invincible. + if (npc.Calamity().canBreakPlayerDefense && !hasIFrames && !invincible) DealDefenseDamage(damage); if (areThereAnyDamnBosses && CalamityMod.bossVelocityDamageScaleValues.ContainsKey(npc.type)) @@ -5263,8 +5261,8 @@ namespace CalamityMod.CalPlayer hasIFrames = true; // If this projectile is capable of dealing defense damage, then apply defense damage. - // Defense damage is not applied if the player has iframes, is otherwise invincible, or has Lul equipped. - if (proj.Calamity().canBreakPlayerDefense && !hasIFrames && !invincible && !lol) + // Defense damage is not applied if the player has iframes or is otherwise invincible. + if (proj.Calamity().canBreakPlayerDefense && !hasIFrames && !invincible) DealDefenseDamage(damage); if (projRefRare) @@ -5813,7 +5811,7 @@ namespace CalamityMod.CalPlayer Player.eocDash = 0; } - if (lol || (silvaCountdown > 0 && hasSilvaEffect && silvaSet) || (DashID == GodslayerArmorDash.ID && Player.dashDelay < 0)) + if ((silvaCountdown > 0 && hasSilvaEffect && silvaSet) || (DashID == GodslayerArmorDash.ID && Player.dashDelay < 0)) { if (Player.lifeRegen < 0) Player.lifeRegen = 0; @@ -5911,10 +5909,6 @@ namespace CalamityMod.CalPlayer if (HandleDodges()) return false; - // Lul makes the player completely invincible. - if (lol) - return false; - // Unless holding Coldheart Icicle, the Purified Jam makes you completely invincible. if (invincible && Player.ActiveItem().type != ModContent.ItemType()) return false; diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 412dab6f9a..c128ed481b 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -601,7 +601,7 @@ namespace CalamityMod.CalPlayer Player.mount.Dismount(Player); } - if (lol || (silvaCountdown > 0 && hasSilvaEffect && silvaSet) || (DashID == GodSlayerDash.ID && Player.dashDelay < 0)) + if ((silvaCountdown > 0 && hasSilvaEffect && silvaSet) || (DashID == GodSlayerDash.ID && Player.dashDelay < 0)) { if (Player.lifeRegen < 0) Player.lifeRegen = 0; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index a0996f58fe..9ba4e9fed6 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1505,8 +1505,8 @@ namespace CalamityMod.CalPlayer } } - // Remove Purified Jam and Lul accessory thorn damage exploits - if (invincible || lol) + // Remove Purified Jam thorn damage exploits + if (invincible) { Player.thorns = 0f; Player.turtleThorns = false; diff --git a/Items/Accessories/CheatTestThing.cs b/Items/Accessories/CheatTestThing.cs deleted file mode 100644 index c47300a4a3..0000000000 --- a/Items/Accessories/CheatTestThing.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Terraria; -using Terraria.ModLoader; - -namespace CalamityMod.Items.Accessories -{ - public class CheatTestThing : ModItem - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("lul"); - Tooltip.SetDefault("Grants complete invulnerability to almost everything"); - } - - public override void SetDefaults() - { - Item.width = 26; - Item.height = 26; - Item.value = 0; // lul intentionally has zero value - Item.Calamity().customRarity = CalamityRarity.HotPink; - Item.accessory = true; // lul cannot be duplicated in Journey Mode - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - player.Calamity().lol = true; - } - } -} diff --git a/Items/Accessories/CheatTestThing.png b/Items/Accessories/CheatTestThing.png deleted file mode 100644 index a3aaf9f07f68471ef44627cb926aca3c2db13dd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3301 zcmVx!^P)t0000PbVXQn zQ*UN;cVTj60B~VxZgehgWpp4kE-)@KG4UX2l>h(?Pf0{URCr$P+X+w0JAr4DZzm zAHLH8)`NPWuVrf(&+}XBG%TdHgU^z>4&y?en?Tg_8ZW%~urG2CZpFQv{g4X}Lz{g7 zHxqmjzQP8R2fcxTZ?wjsZtd}2Hw&oq|609!j01)`o$UEqGtl_*K@ zgC;))x|_++R-D&+P^ecTekVv5W1u}7iOTpuge;tlk3>5uhV-yNPZ5sd*Mc!D(D=a9 zqMq-$4@5nWx*(6a<4|=z98%sv$QPrb`{@|u8^<9PC+S^|g)Z+9q?{SQpa3lWen#X`CyT0wCoPOtDN zBJsr4hJB6`)YjDyE6v7*$V1IZGs zen?m1p({F}clD^=K#YSpy>&6t-Dlx?=xW^j!3C~Uhau2@0yJqqK$mkE(vM;jrnp+8=C$s|Nj(vY zLb`Me+MGD3w_#192t_Ck-GZePK7jS$?l1-NtO79(qA=PWxxq`ZW7+_C&KQmu=dWDfm0PiJHX2pQVh*7qAqXW0ePBOY zw5nj-GKTf5Kh##_?_rqG6o{TW@s&UaRA%mlu1MTEg$EhCkm)rCF%ILfckvjM#(F}^ z7Ta*)Mz|Zir;oy4hFD?6#9_D^69BpJ1f*;cgdnGf<6-h{R3z&C6tM+!KYJe|d$+-7 zLwi77zbTNq4n+ODI$_aX4`@$^LYFT#OM-k!Y^Ve&V=pu*KDeK_9opaY&0r!sVM0r9mF7Dn4yRidcJ*W#Nj2Z}2AWth0 zb)qvnR^fW6EAGYnLYEl@O`_N!33nnkL32txfCO~UMxmaSow4%o(N8 zn{h885Vu4-DfX|L2V3zVsTlE&1qO>vnPNaM3z!0VT7jf){szb0<|1R`eE8cA!J5yz zVe8a)v35cqY@hKlX1(7Pi+a6|E8fd-Ki&`8>_d>0Tec!UUN1-a1M{Kks+1s9B>JK( zW;+VLUkA^5<1uEi72fV_2CGiZ(XVG`m;$M*K-BlE6Qp^}!8soXB&?Z&Wg{)I<)c3# zVa^zogt;Mn;aF^$JOEifj;K5yirf3QK>Je~q|&o`1xF#DiiGB9Aa2KQL*d?y*tc>H z9437L>%ra7qoWzxwQLBr4ntk)549Cv8^Z@pf#|6dM7Y=^-PZw`K1-44G6k`VzC`ru z@hHD>5I@GcN5pWM}Y)6OhMY#rO4R20GVF%5HPwwW>|HE?R(u3 z;qMI1^*AItPsh=}et`py6OiR;kBazUJWLXsHsP0Of85yXg&dz%$nso{g!K!seYQ1X z9c>XccQS_ewuD-Tas8%1>M9VsPkJHDaVp|ge~HV1%W?L*ZxK1i8taDiM!)*?Ft$$* zL~oo0?{R&w5NtgXD+cz#;Knau ziP$tL_AMTbb6)ny-{pdg9Zo0+6dNw#+zw|H1Z}_tzx7Dk@D09u_bog)v=bFOw?JM0 zf2!LQh;e;S8px!fT@bhJTa+hkhWa&!s5B7WGp9HgupW_4cDQ#W1Qq8F;&!Azek}-`>sNU|5`Xr7=|0$Tu~Y+LKc2&5Gqq3MhtFUO$lw74A$32SHL`-Ni=x@;=W_^d$Q?hQEMxfIDYGK1G4 zYONi{y!|?Qw0srn`qjE>E50`W5{5#ZNcG$XqE7I3Cvyz#rF=21ef7128z5a#zA7n- zsmO%pW)gIgC|Duq=~d-Is?5@RmWwA)zKXNx_8Db@#wBN=4yjG$NV6d9D`1i z4YhDtC)z}KB;`Y{5-lUB$8}2kC~hcUhf1za+v5hGh2t@~Uk7;Fjz;j3ui!CnECQE& z0k@f>;52n4+@_C)TE~+Hp;Cq^kjE&4iQctphqwON2L0Y_i(#UD6n+cFp&}y`Qu#^f zG@@9Ap=I~U}yHv(!Mra+!nAeQaT(X~d84lU8O#mgAbr8{EQ%!Bq)G$f5^3qckaQpF>! zo-9IA=>CzecPAC{&!Xjo%A#2K*-b>;s#)0QJR9q$eFV=16S2v5Je($fj431f!}vB^ zTamwqGE9LyMj1@hwS5a%S%{0P(9NO+TA4S))F~_AIKviqQ-dIj2R2339r3s?=qkm< zR*>(Djhdjle-4teeHXMP$MtG9XoubBA#~YvY?^J2=VW0b)JZ(20hYp2(#t)69tsJCLREVN8*;Pkc*EXaK&^C?cNrBJGaAYufB{1^&6l?%cd}I))+6n z^a2_+7QqPh>;D1uUVH&+U8X?lDiF)p&Ctc78O)kAfQ7|Cw0Z4Kv}n-|2V7^M?9^_Q zr-wj$?HHsA(I$d?TZEywa|+VWNvJG}!8+TqsP|$$G-{xY=GwLo{gcB3id@ingyehgzR0kpF8S9bapL4sG00000NkvXXu0mjf`sW?n From 548f70d63d03aed78570bf298630394a45b57ff4 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 3 Jun 2022 15:25:18 -0400 Subject: [PATCH 29/30] Fully renamed Ataxia to Hydrothermic --- Items/Accessories/Wings/HadalMantle.cs | 8 ++++---- .../{AtaxiaMask.cs => HydrothermicHeadMagic.cs} | 5 +++-- .../{AtaxiaMask.png => HydrothermicHeadMagic.png} | Bin ...Mask_Head.png => HydrothermicHeadMagic_Head.png} | Bin .../{AtaxiaHelm.cs => HydrothermicHeadMelee.cs} | 6 ++++-- .../{AtaxiaHelm.png => HydrothermicHeadMelee.png} | Bin ...Helm_Head.png => HydrothermicHeadMelee_Head.png} | Bin ...{AtaxiaHeadgear.cs => HydrothermicHeadRanged.cs} | 5 +++-- ...taxiaHeadgear.png => HydrothermicHeadRanged.png} | Bin ...ear_Head.png => HydrothermicHeadRanged_Head.png} | Bin .../{AtaxiaHood.cs => HydrothermicHeadRogue.cs} | 5 +++-- .../{AtaxiaHood.png => HydrothermicHeadRogue.png} | Bin ...Hood_Head.png => HydrothermicHeadRogue_Head.png} | Bin .../{AtaxiaHelmet.cs => HydrothermicHeadSummon.cs} | 5 +++-- ...{AtaxiaHelmet.png => HydrothermicHeadSummon.png} | Bin ...met_Head.png => HydrothermicHeadSummon_Head.png} | Bin .../{AtaxiaSubligar.cs => HydrothermicSubligar.cs} | 3 ++- ...{AtaxiaSubligar.png => HydrothermicSubligar.png} | Bin ...ligar_Legs.png => HydrothermicSubligar_Legs.png} | Bin 19 files changed, 22 insertions(+), 15 deletions(-) rename Items/Armor/{AtaxiaMask.cs => HydrothermicHeadMagic.cs} (94%) rename Items/Armor/{AtaxiaMask.png => HydrothermicHeadMagic.png} (100%) rename Items/Armor/{AtaxiaMask_Head.png => HydrothermicHeadMagic_Head.png} (100%) rename Items/Armor/{AtaxiaHelm.cs => HydrothermicHeadMelee.cs} (94%) rename Items/Armor/{AtaxiaHelm.png => HydrothermicHeadMelee.png} (100%) rename Items/Armor/{AtaxiaHelm_Head.png => HydrothermicHeadMelee_Head.png} (100%) rename Items/Armor/{AtaxiaHeadgear.cs => HydrothermicHeadRanged.cs} (93%) rename Items/Armor/{AtaxiaHeadgear.png => HydrothermicHeadRanged.png} (100%) rename Items/Armor/{AtaxiaHeadgear_Head.png => HydrothermicHeadRanged_Head.png} (100%) rename Items/Armor/{AtaxiaHood.cs => HydrothermicHeadRogue.cs} (95%) rename Items/Armor/{AtaxiaHood.png => HydrothermicHeadRogue.png} (100%) rename Items/Armor/{AtaxiaHood_Head.png => HydrothermicHeadRogue_Head.png} (100%) rename Items/Armor/{AtaxiaHelmet.cs => HydrothermicHeadSummon.cs} (95%) rename Items/Armor/{AtaxiaHelmet.png => HydrothermicHeadSummon.png} (100%) rename Items/Armor/{AtaxiaHelmet_Head.png => HydrothermicHeadSummon_Head.png} (100%) rename Items/Armor/{AtaxiaSubligar.cs => HydrothermicSubligar.cs} (93%) rename Items/Armor/{AtaxiaSubligar.png => HydrothermicSubligar.png} (100%) rename Items/Armor/{AtaxiaSubligar_Legs.png => HydrothermicSubligar_Legs.png} (100%) diff --git a/Items/Accessories/Wings/HadalMantle.cs b/Items/Accessories/Wings/HadalMantle.cs index 3a2068238c..f2d6504d18 100644 --- a/Items/Accessories/Wings/HadalMantle.cs +++ b/Items/Accessories/Wings/HadalMantle.cs @@ -37,10 +37,10 @@ namespace CalamityMod.Items.Accessories.Wings public override void UpdateAccessory(Player player, bool hideVisual) { - if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType()) && - player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) + if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType()) && + player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) { player.GetDamage() += 0.05f; } diff --git a/Items/Armor/AtaxiaMask.cs b/Items/Armor/HydrothermicHeadMagic.cs similarity index 94% rename from Items/Armor/AtaxiaMask.cs rename to Items/Armor/HydrothermicHeadMagic.cs index 11bedc9db0..4a62e56a61 100644 --- a/Items/Armor/AtaxiaMask.cs +++ b/Items/Armor/HydrothermicHeadMagic.cs @@ -7,7 +7,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] - public class AtaxiaMask : ModItem + [LegacyName("AtaxiaMask")] + public class HydrothermicHeadMagic : ModItem { public override void SetStaticDefaults() { @@ -28,7 +29,7 @@ namespace CalamityMod.Items.Armor public override bool IsArmorSet(Item head, Item body, Item legs) { - return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); + return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); } public override void ArmorSetShadows(Player player) diff --git a/Items/Armor/AtaxiaMask.png b/Items/Armor/HydrothermicHeadMagic.png similarity index 100% rename from Items/Armor/AtaxiaMask.png rename to Items/Armor/HydrothermicHeadMagic.png diff --git a/Items/Armor/AtaxiaMask_Head.png b/Items/Armor/HydrothermicHeadMagic_Head.png similarity index 100% rename from Items/Armor/AtaxiaMask_Head.png rename to Items/Armor/HydrothermicHeadMagic_Head.png diff --git a/Items/Armor/AtaxiaHelm.cs b/Items/Armor/HydrothermicHeadMelee.cs similarity index 94% rename from Items/Armor/AtaxiaHelm.cs rename to Items/Armor/HydrothermicHeadMelee.cs index 8077b4873f..a26611b0d2 100644 --- a/Items/Armor/AtaxiaHelm.cs +++ b/Items/Armor/HydrothermicHeadMelee.cs @@ -7,7 +7,9 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] - public class AtaxiaHelm : ModItem + [LegacyName("AtaxiaHelm")] + + public class HydrothermicHeadMelee : ModItem { public override void SetStaticDefaults() { @@ -30,7 +32,7 @@ namespace CalamityMod.Items.Armor public override bool IsArmorSet(Item head, Item body, Item legs) { - return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); + return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); } public override void ArmorSetShadows(Player player) diff --git a/Items/Armor/AtaxiaHelm.png b/Items/Armor/HydrothermicHeadMelee.png similarity index 100% rename from Items/Armor/AtaxiaHelm.png rename to Items/Armor/HydrothermicHeadMelee.png diff --git a/Items/Armor/AtaxiaHelm_Head.png b/Items/Armor/HydrothermicHeadMelee_Head.png similarity index 100% rename from Items/Armor/AtaxiaHelm_Head.png rename to Items/Armor/HydrothermicHeadMelee_Head.png diff --git a/Items/Armor/AtaxiaHeadgear.cs b/Items/Armor/HydrothermicHeadRanged.cs similarity index 93% rename from Items/Armor/AtaxiaHeadgear.cs rename to Items/Armor/HydrothermicHeadRanged.cs index 915e2ba18c..8d6f142c0e 100644 --- a/Items/Armor/AtaxiaHeadgear.cs +++ b/Items/Armor/HydrothermicHeadRanged.cs @@ -7,7 +7,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] - public class AtaxiaHeadgear : ModItem + [LegacyName("AtaxiaHeadgear")] + public class HydrothermicHeadRanged : ModItem { public override void SetStaticDefaults() { @@ -28,7 +29,7 @@ namespace CalamityMod.Items.Armor public override bool IsArmorSet(Item head, Item body, Item legs) { - return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); + return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); } public override void ArmorSetShadows(Player player) diff --git a/Items/Armor/AtaxiaHeadgear.png b/Items/Armor/HydrothermicHeadRanged.png similarity index 100% rename from Items/Armor/AtaxiaHeadgear.png rename to Items/Armor/HydrothermicHeadRanged.png diff --git a/Items/Armor/AtaxiaHeadgear_Head.png b/Items/Armor/HydrothermicHeadRanged_Head.png similarity index 100% rename from Items/Armor/AtaxiaHeadgear_Head.png rename to Items/Armor/HydrothermicHeadRanged_Head.png diff --git a/Items/Armor/AtaxiaHood.cs b/Items/Armor/HydrothermicHeadRogue.cs similarity index 95% rename from Items/Armor/AtaxiaHood.cs rename to Items/Armor/HydrothermicHeadRogue.cs index f12bfb6ff4..6b80031169 100644 --- a/Items/Armor/AtaxiaHood.cs +++ b/Items/Armor/HydrothermicHeadRogue.cs @@ -7,7 +7,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] - public class AtaxiaHood : ModItem + [LegacyName("AtaxiaHood")] + public class HydrothermicHeadRogue : ModItem { public override void SetStaticDefaults() { @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Armor public override bool IsArmorSet(Item head, Item body, Item legs) { - return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); + return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); } public override void ArmorSetShadows(Player player) diff --git a/Items/Armor/AtaxiaHood.png b/Items/Armor/HydrothermicHeadRogue.png similarity index 100% rename from Items/Armor/AtaxiaHood.png rename to Items/Armor/HydrothermicHeadRogue.png diff --git a/Items/Armor/AtaxiaHood_Head.png b/Items/Armor/HydrothermicHeadRogue_Head.png similarity index 100% rename from Items/Armor/AtaxiaHood_Head.png rename to Items/Armor/HydrothermicHeadRogue_Head.png diff --git a/Items/Armor/AtaxiaHelmet.cs b/Items/Armor/HydrothermicHeadSummon.cs similarity index 95% rename from Items/Armor/AtaxiaHelmet.cs rename to Items/Armor/HydrothermicHeadSummon.cs index a33c37f12d..4c316bd6cb 100644 --- a/Items/Armor/AtaxiaHelmet.cs +++ b/Items/Armor/HydrothermicHeadSummon.cs @@ -9,7 +9,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] - public class AtaxiaHelmet : ModItem + [LegacyName("AtaxiaHelmet")] + public class HydrothermicHeadSummon : ModItem { public override void SetStaticDefaults() { @@ -30,7 +31,7 @@ namespace CalamityMod.Items.Armor public override bool IsArmorSet(Item head, Item body, Item legs) { - return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); + return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); } public override void ArmorSetShadows(Player player) diff --git a/Items/Armor/AtaxiaHelmet.png b/Items/Armor/HydrothermicHeadSummon.png similarity index 100% rename from Items/Armor/AtaxiaHelmet.png rename to Items/Armor/HydrothermicHeadSummon.png diff --git a/Items/Armor/AtaxiaHelmet_Head.png b/Items/Armor/HydrothermicHeadSummon_Head.png similarity index 100% rename from Items/Armor/AtaxiaHelmet_Head.png rename to Items/Armor/HydrothermicHeadSummon_Head.png diff --git a/Items/Armor/AtaxiaSubligar.cs b/Items/Armor/HydrothermicSubligar.cs similarity index 93% rename from Items/Armor/AtaxiaSubligar.cs rename to Items/Armor/HydrothermicSubligar.cs index 4639e1d5e2..cee2e99f1c 100644 --- a/Items/Armor/AtaxiaSubligar.cs +++ b/Items/Armor/HydrothermicSubligar.cs @@ -6,7 +6,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Legs)] - public class AtaxiaSubligar : ModItem + [LegacyName("AtaxiaSubligar")] + public class HydrothermicSubligar : ModItem { public override void SetStaticDefaults() { diff --git a/Items/Armor/AtaxiaSubligar.png b/Items/Armor/HydrothermicSubligar.png similarity index 100% rename from Items/Armor/AtaxiaSubligar.png rename to Items/Armor/HydrothermicSubligar.png diff --git a/Items/Armor/AtaxiaSubligar_Legs.png b/Items/Armor/HydrothermicSubligar_Legs.png similarity index 100% rename from Items/Armor/AtaxiaSubligar_Legs.png rename to Items/Armor/HydrothermicSubligar_Legs.png From f93ec03426028b272f43a0063dd8b690fbcb0c80 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 3 Jun 2022 15:30:51 -0400 Subject: [PATCH 30/30] AuricTeslaHelm -> AuricTeslaRoyalHelm --- .../{AuricTeslaHelm.cs => AuricTeslaRoyalHelm.cs} | 3 ++- .../{AuricTeslaHelm.png => AuricTeslaRoyalHelm.png} | Bin ...laHelm_Head.png => AuricTeslaRoyalHelm_Head.png} | Bin 3 files changed, 2 insertions(+), 1 deletion(-) rename Items/Armor/{AuricTeslaHelm.cs => AuricTeslaRoyalHelm.cs} (97%) rename Items/Armor/{AuricTeslaHelm.png => AuricTeslaRoyalHelm.png} (100%) rename Items/Armor/{AuricTeslaHelm_Head.png => AuricTeslaRoyalHelm_Head.png} (100%) diff --git a/Items/Armor/AuricTeslaHelm.cs b/Items/Armor/AuricTeslaRoyalHelm.cs similarity index 97% rename from Items/Armor/AuricTeslaHelm.cs rename to Items/Armor/AuricTeslaRoyalHelm.cs index eb97251128..1367b890db 100644 --- a/Items/Armor/AuricTeslaHelm.cs +++ b/Items/Armor/AuricTeslaRoyalHelm.cs @@ -9,7 +9,8 @@ using CalamityMod.CalPlayer.Dashes; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] - public class AuricTeslaHelm : ModItem + [LegacyName("AuricTeslaHelm")] + public class AuricTeslaRoyalHelm : ModItem { public override void SetStaticDefaults() { diff --git a/Items/Armor/AuricTeslaHelm.png b/Items/Armor/AuricTeslaRoyalHelm.png similarity index 100% rename from Items/Armor/AuricTeslaHelm.png rename to Items/Armor/AuricTeslaRoyalHelm.png diff --git a/Items/Armor/AuricTeslaHelm_Head.png b/Items/Armor/AuricTeslaRoyalHelm_Head.png similarity index 100% rename from Items/Armor/AuricTeslaHelm_Head.png rename to Items/Armor/AuricTeslaRoyalHelm_Head.png