diff --git a/Buffs/DamageOverTime/Nightwither.png b/Buffs/DamageOverTime/Nightwither.png index b750e180e2..7a68497f9b 100644 Binary files a/Buffs/DamageOverTime/Nightwither.png and b/Buffs/DamageOverTime/Nightwither.png differ diff --git a/Buffs/Summon/BelladonnaSpiritBuff.png b/Buffs/Summon/BelladonnaSpiritBuff.png index 1e1c15157c..ee6006b58d 100644 Binary files a/Buffs/Summon/BelladonnaSpiritBuff.png and b/Buffs/Summon/BelladonnaSpiritBuff.png differ diff --git a/Buffs/Summon/SiriusBuff.png b/Buffs/Summon/SiriusBuff.png index 56f76ed72a..33c7e306b6 100644 Binary files a/Buffs/Summon/SiriusBuff.png and b/Buffs/Summon/SiriusBuff.png differ diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 019bce7efe..2435822300 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -25,6 +25,7 @@ using CalamityMod.Items.Weapons.Typeless; using CalamityMod.NPCs; using CalamityMod.NPCs.Abyss; using CalamityMod.NPCs.AcidRain; +using CalamityMod.NPCs.AdultEidolonWyrm; using CalamityMod.NPCs.Astral; using CalamityMod.NPCs.BrimstoneElemental; using CalamityMod.NPCs.Calamitas; @@ -783,7 +784,9 @@ namespace CalamityMod.CalPlayer public int silvaMageCooldown = 0; public bool silvaSummon = false; public bool hasSilvaEffect = false; - public int silvaCountdown = 480; + public static int silvaReviveDuration = 480; + public int silvaCountdown = silvaReviveDuration; + public int silvaReviveCooldown = 0; public bool auricSet = false; public bool omegaBlueChestplate = false; public bool omegaBlueSet = false; @@ -2444,7 +2447,7 @@ namespace CalamityMod.CalPlayer silvaMage = false; silvaSummon = false; hasSilvaEffect = false; - silvaCountdown = 480; + silvaCountdown = silvaReviveDuration; auricSet = false; GemTechSet = false; omegaBlueChestplate = false; @@ -2582,10 +2585,7 @@ namespace CalamityMod.CalPlayer public override void UpdateBiomeVisuals() { - bool useBossRushBackground = BossRushEvent.BossRushActive && BossRushEvent.StartTimer > 100; - - player.ManageSpecialBiomeVisuals("CalamityMod:BossRush", useBossRushBackground); - if (useBossRushBackground) + if (BossRushSky.DetermineDrawEligibility()) { // Clear all other skies, including the vanilla ones. Dictionary skies = EffectsField.GetValue(SkyManager.Instance) as Dictionary; @@ -2663,15 +2663,7 @@ namespace CalamityMod.CalPlayer bool inAstral = ZoneAstral; player.ManageSpecialBiomeVisuals("CalamityMod:Astral", inAstral); - bool cryogenActive = NPC.AnyNPCs(ModContent.NPCType()); - - if (SkyManager.Instance["CalamityMod:Cryogen"] != null && cryogenActive != SkyManager.Instance["CalamityMod:Cryogen"].IsActive()) - { - if (cryogenActive) - SkyManager.Instance.Activate("CalamityMod:Cryogen"); - else - SkyManager.Instance.Deactivate("CalamityMod:Cryogen"); - } + CryogenSky.UpdateDrawEligibility(); if (SkyManager.Instance["CalamityMod:StormWeaverFlash"] != null && useFlash != SkyManager.Instance["CalamityMod:StormWeaverFlash"].IsActive()) { @@ -2840,7 +2832,6 @@ namespace CalamityMod.CalPlayer if (!mediumcoreDeath) { items.Add(createItem(ModContent.ItemType())); - items.Add(createItem(ModContent.ItemType())); } } #endregion @@ -4485,11 +4476,11 @@ namespace CalamityMod.CalPlayer if (silvaSet && silvaCountdown > 0) { - if (silvaCountdown == 480 && !hasSilvaEffect) + if (silvaCountdown == silvaReviveDuration && !hasSilvaEffect) { Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaActivation"), (int)player.position.X, (int)player.position.Y); - player.AddBuff(ModContent.BuffType(), 480); + player.AddBuff(ModContent.BuffType(), silvaReviveDuration); if (draconicSurge && !draconicSurgeCooldown) { @@ -5751,6 +5742,17 @@ namespace CalamityMod.CalPlayer hasBanner = true; } } + if (tile.type == ModContent.TileType()) + { + int bannerType = tile.frameX / 18; + + int bannerItemType = CalamityUtils.GetBannerItem(bannerType); + if (ItemID.Sets.BannerStrength[bannerItemType].Enabled) + { + NPCBannerBuff[bannerType] = true; + hasBanner = true; + } + } } } @@ -5766,7 +5768,7 @@ namespace CalamityMod.CalPlayer if (aSparkRare) { - if (proj.type == ProjectileID.MartianTurretBolt || proj.type == ProjectileID.GigaZapperSpear || proj.type == ProjectileID.CultistBossLightningOrbArc || proj.type == ModContent.ProjectileType() || proj.type == ProjectileID.VortexLightning || + if (proj.type == ProjectileID.MartianTurretBolt || proj.type == ProjectileID.GigaZapperSpear || proj.type == ProjectileID.CultistBossLightningOrbArc || proj.type == ModContent.ProjectileType() || proj.type == ProjectileID.VortexLightning || proj.type == ModContent.ProjectileType() || proj.type == ProjectileID.BulletSnowman || proj.type == ProjectileID.BulletDeadeye || proj.type == ProjectileID.SniperBullet || proj.type == ProjectileID.VortexLaser) projectileDamageReduction += 0.5; } @@ -6788,10 +6790,6 @@ namespace CalamityMod.CalPlayer player.yoraiz0rEye = 0; } - private void RemoveWingTime() - { - player.wingTimeMax = 0; - } private void DisableDashes() { // Set the player to have no registered dashes. diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index f055ef5baf..3461b51f64 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -6,7 +6,7 @@ using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Summon; -using CalamityMod.NPCs.Abyss; +using CalamityMod.NPCs.AdultEidolonWyrm; using CalamityMod.NPCs.AquaticScourge; using CalamityMod.NPCs.AstrumAureus; using CalamityMod.NPCs.AstrumDeus; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index c5f3fe7bfa..4b21257aa2 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1322,6 +1322,8 @@ namespace CalamityMod.CalPlayer auralisAurora--; if (auralisAuroraCooldown > 0) auralisAuroraCooldown--; + if (silvaReviveCooldown > 0 && !areThereAnyDamnBosses && !areThereAnyDamnEvents) + silvaReviveCooldown--; // God Slayer Armor dash debuff immunity if (dashMod == 9 && player.dashDelay < 0) @@ -1352,7 +1354,11 @@ namespace CalamityMod.CalPlayer silvaCountdown -= 1; if (silvaCountdown <= 0) + { Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), player.Center); + // 5 minutes + silvaReviveCooldown = 18000; + } for (int j = 0; j < 2; j++) { @@ -1367,6 +1373,11 @@ namespace CalamityMod.CalPlayer Main.dust[green].scale *= 1f + (float)Main.rand.Next(40) * 0.01f; } } + if (silvaReviveCooldown <= 0 && hasSilvaEffect && silvaCountdown <= 0 && !areThereAnyDamnBosses && !areThereAnyDamnEvents) + { + silvaCountdown = 480; + hasSilvaEffect = false; + } // Tarragon cloak effects if (tarragonCloak) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index d4cbd2e1e1..0d344cff30 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1324,7 +1324,7 @@ namespace CalamityMod.CalPlayer } if (titanHeartMask) { - target.AddBuff(BuffType(), 60 * Main.rand.Next(1, 6), false); // 1 to 5 seconds + target.AddBuff(BuffType(), 120); } if (corrosiveSpine) { @@ -1468,7 +1468,7 @@ namespace CalamityMod.CalPlayer } if (titanHeartMask) { - target.AddBuff(BuffType(), 60 * Main.rand.Next(1, 6), false); // 1 to 5 seconds + target.AddBuff(BuffType(), 120); } if (corrosiveSpine) { diff --git a/CalamityLists.cs b/CalamityLists.cs index 1f59420143..413e6db2f7 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -24,6 +24,7 @@ using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs.Abyss; using CalamityMod.NPCs.AcidRain; +using CalamityMod.NPCs.AdultEidolonWyrm; using CalamityMod.NPCs.AquaticScourge; using CalamityMod.NPCs.Astral; using CalamityMod.NPCs.AstrumAureus; diff --git a/CalamityMod.cs b/CalamityMod.cs index 952280e2da..c8afc7179d 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -12,6 +12,7 @@ using CalamityMod.Items.Dyes.HairDye; using CalamityMod.Localization; using CalamityMod.NPCs; using CalamityMod.NPCs.Abyss; +using CalamityMod.NPCs.AdultEidolonWyrm; using CalamityMod.NPCs.AquaticScourge; using CalamityMod.NPCs.AstrumAureus; using CalamityMod.NPCs.AstrumDeus; @@ -259,6 +260,8 @@ namespace CalamityMod AddEquipTexture(new FeatherCrownHair(), null, EquipType.Head, "FeatherCrownHead", "CalamityMod/Items/Accessories/FeatherCrown_Face"); AddEquipTexture(new MoonstoneCrownHair(), null, EquipType.Head, "MoonstoneCrownHead", "CalamityMod/Items/Accessories/MoonstoneCrown_Face"); + AddEquipTexture(null, EquipType.Legs, "CirrusDress_Legs", "CalamityMod/Items/Armor/CirrusDress_Legs"); + AstralCactusTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/Tiles/AstralCactus"); AstralCactusGlowTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/Tiles/AstralCactusGlow"); AstralSky = ModContent.GetTexture("CalamityMod/ExtraTextures/AstralSky"); @@ -893,10 +896,14 @@ namespace CalamityMod if (Main.gameMenu) BossRushEvent.StartTimer = 0; - if (BossRushEvent.BossRushActive || BossRushEvent.StartTimer > 0) + float bossRushWhiteFade = BossRushEvent.StartTimer / (float)BossRushEvent.StartEffectTotalTime; + if (BossRushSky.ShouldDrawRegularly) + bossRushWhiteFade = 1f; + + if (BossRushEvent.BossRushActive || BossRushEvent.StartTimer > 0 || BossRushSky.ShouldDrawRegularly) { - backgroundColor = Color.Lerp(backgroundColor, Color.LightGray, BossRushEvent.StartTimer / (float)BossRushEvent.StartEffectTotalTime); - tileColor = Color.Lerp(tileColor, Color.LightGray, BossRushEvent.StartTimer / (float)BossRushEvent.StartEffectTotalTime); + backgroundColor = Color.Lerp(backgroundColor, Color.LightGray, bossRushWhiteFade); + tileColor = Color.Lerp(tileColor, Color.LightGray, bossRushWhiteFade); } else if (SkyManager.Instance["CalamityMod:ExoMechs"].IsActive()) { diff --git a/Events/BossRushSky.cs b/Events/BossRushSky.cs index 9f8cb29231..e552385f28 100644 --- a/Events/BossRushSky.cs +++ b/Events/BossRushSky.cs @@ -9,14 +9,40 @@ namespace CalamityMod.Events { public class BossRushSky : CustomSky { - public bool CurrentlyActive = false; + public bool CurrentlyActive; public float Intensity = 0f; public static float IdleTimer = 0f; public static float CurrentInterest = 0f; public static float IncrementalInterest = 0f; public static float CurrentInterestMin = 0f; + public static bool ShouldDrawRegularly; public static Color GeneralColor => Color.Lerp(Color.LightGray, Color.Black, BossRushEvent.WhiteDimness) * 0.2f; + public static bool DetermineDrawEligibility() + { + bool useEffect = (BossRushEvent.BossRushActive && BossRushEvent.StartTimer > 100) || ShouldDrawRegularly; + + if (SkyManager.Instance["CalamityMod:BossRush"] != null && useEffect != SkyManager.Instance["CalamityMod:BossRush"].IsActive()) + { + if (useEffect) + SkyManager.Instance.Activate("CalamityMod:BossRush"); + + else + { + SkyManager.Instance.Deactivate("CalamityMod:BossRush", new object[0]); + } + } + if (useEffect != Filters.Scene["CalamityMod:BossRush"].IsActive()) + { + if (useEffect) + Filters.Scene.Activate("CalamityMod:BossRush"); + else + Filters.Scene["CalamityMod:BossRush"].Deactivate(new object[0]); + } + + return useEffect; + } + public override void Update(GameTime gameTime) { if (CurrentlyActive) @@ -37,7 +63,10 @@ namespace CalamityMod.Events } private float GetIntensity() - { + { + if (ShouldDrawRegularly) + return 1f; + float fadeRatio = BossRushEvent.StartTimer / (float)BossRushEvent.StartEffectTotalTime; return Utils.InverseLerp(0.57f, 1f, fadeRatio, true); } @@ -71,8 +100,8 @@ namespace CalamityMod.Events Main.spriteBatch.End(); Main.spriteBatch.Begin(); - // Draw the Xeroc eye at the back of the background. - if (maxDepth >= float.MaxValue && minDepth < float.MaxValue && BossRushEvent.EndTimer < BossRushEvent.EndVisualEffectTime - 40f) + // Draw the Xeroc eye at the back of the sky. + if (maxDepth >= float.MaxValue && minDepth < float.MaxValue && (BossRushEvent.EndTimer < BossRushEvent.EndVisualEffectTime - 40f || ShouldDrawRegularly)) { Vector2 screenCenter = Main.screenPosition + new Vector2(Main.screenWidth, Main.screenHeight) * 0.5f; float scale = MathHelper.Lerp(0.8f, 0.9f, IncrementalInterest) + (float)Math.Sin(IdleTimer) * 0.01f; @@ -94,6 +123,9 @@ namespace CalamityMod.Events spriteBatch.Draw(eyeTexture, drawPosition + drawOffset, null, fadedColor, 0f, eyeTexture.Size() * 0.5f, scale, SpriteEffects.None, 0f); } } + + if (ShouldDrawRegularly) + ShouldDrawRegularly = false; } public override float GetCloudAlpha() => 1f - GetIntensity(); diff --git a/ExtraTextures/Tanks/Backpack_HalleysInferno.png b/ExtraTextures/Tanks/Backpack_HalleysInferno.png index 9c7967d20c..cf380d95ed 100644 Binary files a/ExtraTextures/Tanks/Backpack_HalleysInferno.png and b/ExtraTextures/Tanks/Backpack_HalleysInferno.png differ diff --git a/Gores/WyvernWeapons/ClamorNoctusBody.png b/Gores/WyvernWeapons/ClamorNoctusBody.png index 20b5978107..fed1db2d2e 100644 Binary files a/Gores/WyvernWeapons/ClamorNoctusBody.png and b/Gores/WyvernWeapons/ClamorNoctusBody.png differ diff --git a/Gores/WyvernWeapons/ClamorNoctusHead.png b/Gores/WyvernWeapons/ClamorNoctusHead.png index 92308b8f97..7ab312edd3 100644 Binary files a/Gores/WyvernWeapons/ClamorNoctusHead.png and b/Gores/WyvernWeapons/ClamorNoctusHead.png differ diff --git a/Gores/WyvernWeapons/ClamorNoctusTail.png b/Gores/WyvernWeapons/ClamorNoctusTail.png index 9a3e618fe3..02d8c84a0c 100644 Binary files a/Gores/WyvernWeapons/ClamorNoctusTail.png and b/Gores/WyvernWeapons/ClamorNoctusTail.png differ diff --git a/Items/Accessories/AngelTreads.cs b/Items/Accessories/AngelTreads.cs index 723b96c2af..109e396cde 100644 --- a/Items/Accessories/AngelTreads.cs +++ b/Items/Accessories/AngelTreads.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Items.Accessories "Increased flight time\n" + "Greater mobility on ice\n" + "Water and lava walking\n" + + "Immunity to the On Fire! debuff\n" + "Temporary immunity to lava"); } @@ -57,6 +58,7 @@ namespace CalamityMod.Items.Accessories player.waterWalk = true; player.fireWalk = true; player.lavaMax += 240; + player.buffImmune[BuffID.OnFire] = true; } public override void AddRecipes() diff --git a/Items/Accessories/AsgardianAegis.cs b/Items/Accessories/AsgardianAegis.cs index 224ff5ee72..3e860b30b3 100644 --- a/Items/Accessories/AsgardianAegis.cs +++ b/Items/Accessories/AsgardianAegis.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Asgardian Aegis"); - Tooltip.SetDefault("Grants immunity to fire blocks and knockback\n" + + Tooltip.SetDefault("Grants immunity to knockback\n" + "Immune to most debuffs\n" + "+40 max life and increased life regeneration\n" + "Grants a supreme holy flame dash\n" + @@ -59,6 +59,7 @@ namespace CalamityMod.Items.Accessories player.fireWalk = true; player.statLifeMax2 += 40; player.lifeRegen++; + player.buffImmune[BuffID.OnFire] = true; player.buffImmune[BuffID.Chilled] = true; player.buffImmune[BuffID.Frostburn] = true; player.buffImmune[BuffID.Weak] = true; diff --git a/Items/Accessories/AsgardsValor.cs b/Items/Accessories/AsgardsValor.cs index 1f2426e97a..a3825a44b7 100644 --- a/Items/Accessories/AsgardsValor.cs +++ b/Items/Accessories/AsgardsValor.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Asgard's Valor"); - Tooltip.SetDefault("Grants immunity to fire blocks and knockback\n" + + Tooltip.SetDefault("Grants immunity to knockback\n" + "Immune to most debuffs and reduces the damage caused by the Brimstone Flames debuff\n" + "+16 defense while submerged in liquid\n" + "+20 max life\n" + @@ -38,6 +38,7 @@ namespace CalamityMod.Items.Accessories player.noKnockback = true; player.fireWalk = true; modPlayer.abaddon = true; + player.buffImmune[BuffID.OnFire] = true; player.buffImmune[BuffID.Chilled] = true; player.buffImmune[BuffID.Frostburn] = true; player.buffImmune[BuffID.Weak] = true; diff --git a/Items/Accessories/CelestialJewel.cs b/Items/Accessories/CelestialJewel.cs index 4bc94e17ec..f6ac5bd195 100644 --- a/Items/Accessories/CelestialJewel.cs +++ b/Items/Accessories/CelestialJewel.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddRecipeGroup("AnyLargeGem"); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ItemID.TeleportationPotion, 3); recipe.AddIngredient(ModContent.ItemType(), 15); recipe.AddIngredient(ModContent.ItemType(), 15); diff --git a/Items/Accessories/DeificAmulet.cs b/Items/Accessories/DeificAmulet.cs index b4f18b56df..af3790e499 100644 --- a/Items/Accessories/DeificAmulet.cs +++ b/Items/Accessories/DeificAmulet.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.rare = ItemRarityID.Pink; - item.value = CalamityGlobalItem.Rarity5BuyPrice; + item.rare = ItemRarityID.Cyan; + item.value = CalamityGlobalItem.Rarity9BuyPrice; item.accessory = true; } diff --git a/Items/Accessories/ElysianAegis.cs b/Items/Accessories/ElysianAegis.cs index ae3f1fc771..c3e28f477e 100644 --- a/Items/Accessories/ElysianAegis.cs +++ b/Items/Accessories/ElysianAegis.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Elysian Aegis"); Tooltip.SetDefault("Blessed by the Profaned Flame\n" + - "Grants immunity to fire blocks, knockback, and Holy Flames\n" + + "Grants immunity to knockback, and the Burning, On Fire!, and Holy Flames debuffs\n" + "+30 max life\n" + "Grants a supreme holy flame dash\n" + "Can be used to ram enemies\n" + @@ -52,6 +52,7 @@ namespace CalamityMod.Items.Accessories CalamityPlayer modPlayer = player.Calamity(); modPlayer.dashMod = 3; modPlayer.elysianAegis = true; + player.buffImmune[BuffID.OnFire] = true; player.buffImmune[ModContent.BuffType()] = true; player.noKnockback = true; player.fireWalk = true; diff --git a/Items/Accessories/EvasionScarf.cs b/Items/Accessories/EvasionScarf.cs index 84422b0010..fc6a945870 100644 --- a/Items/Accessories/EvasionScarf.cs +++ b/Items/Accessories/EvasionScarf.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.RedandBlackDye); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ItemID.SoulofNight, 5); recipe.AddIngredient(ItemID.SoulofLight, 5); recipe.AddIngredient(ItemID.Silk, 15); diff --git a/Items/Accessories/OccultSkullCrown.cs b/Items/Accessories/OccultSkullCrown.cs index 94ec94d71b..0618e01010 100644 --- a/Items/Accessories/OccultSkullCrown.cs +++ b/Items/Accessories/OccultSkullCrown.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories "Debuffs affected: Darkness, Blackout, Confused, Slow, Weak, Broken Armor,\n" + "Armor Crunch, War Cleave, Chilled, Ichor and Obstructed\n" + "Getting hit causes you to only lose half of your max adrenaline rather than all of it\n" + - "Boosts your defense by 5 and max movement speed and acceleration by 5%\n" + + "Increases your max movement speed and acceleration by 5%\n" + "Can also be worn as a helmet\n" + "Revengeance item"); } @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories { item.width = 82; item.height = 62; - + item.defense = 5; item.rare = ItemRarityID.Purple; item.Calamity().customRarity = CalamityRarity.DarkBlue; item.value = CalamityGlobalItem.Rarity14BuyPrice; @@ -36,7 +36,6 @@ namespace CalamityMod.Items.Accessories public override void UpdateEquip(Player player) { - player.statDefense += 5; CalamityPlayer modPlayer = player.Calamity(); modPlayer.laudanum = true; modPlayer.heartOfDarkness = true; diff --git a/Items/Accessories/PlagueHive.cs b/Items/Accessories/PlagueHive.cs index c728de6a65..aad91a0120 100644 --- a/Items/Accessories/PlagueHive.cs +++ b/Items/Accessories/PlagueHive.cs @@ -13,8 +13,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Plague Hive"); - Tooltip.SetDefault("The power of bees and wasps will rival the Moon Lord himself\n" + - "All attacks inflict the Plague debuff\n" + + Tooltip.SetDefault("All attacks inflict the Plague debuff\n" + "Releases bees when damaged that inflict the Plague\n" + "Projectiles spawn plague seekers on enemy hits"); } diff --git a/Items/Accessories/ReaperToothNecklace.cs b/Items/Accessories/ReaperToothNecklace.cs index df1cfcf6cc..468dd3a7c5 100644 --- a/Items/Accessories/ReaperToothNecklace.cs +++ b/Items/Accessories/ReaperToothNecklace.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Reaper Tooth Necklace"); - Tooltip.SetDefault("A grisly trophy from the ultimate predator\n" + "10% increased damage\n" + "Increases armor penetration by 15"); + Tooltip.SetDefault("A grisly trophy from the ultimate predator\n" + "15% increased damage\n" + "Increases armor penetration by 15"); } public override void SetDefaults() @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - player.allDamage += 0.1f; + player.allDamage += 0.15f; player.armorPenetration += 15; } diff --git a/Items/Accessories/Wings/CelestialTracers.cs b/Items/Accessories/Wings/CelestialTracers.cs index 2f7639ed9e..8744beaefd 100644 --- a/Items/Accessories/Wings/CelestialTracers.cs +++ b/Items/Accessories/Wings/CelestialTracers.cs @@ -5,6 +5,7 @@ using CalamityMod.World; using Microsoft.Xna.Framework; using System.Collections.Generic; using Terraria; +using Terraria.ID; using Terraria.Graphics.Shaders; using Terraria.ModLoader; @@ -25,6 +26,7 @@ namespace CalamityMod.Items.Accessories.Wings "50% increased running acceleration\n" + "Greater mobility on ice\n" + "Water and lava walking\n" + + "Immunity to the On Fire! debuff\n" + "Temporary immunity to lava\n" + "Being hit for over 200 damage will make you immune for an extended period of time"); } @@ -78,6 +80,7 @@ namespace CalamityMod.Items.Accessories.Wings player.waterWalk = true; player.fireWalk = true; player.lavaMax += 240; + player.buffImmune[BuffID.OnFire] = true; player.wingTimeMax = 250; player.noFallDmg = true; modPlayer.IBoots = !hideVisual; diff --git a/Items/Accessories/Wings/ElysianTracers.cs b/Items/Accessories/Wings/ElysianTracers.cs index 82bda4fb23..c6eaf42acd 100644 --- a/Items/Accessories/Wings/ElysianTracers.cs +++ b/Items/Accessories/Wings/ElysianTracers.cs @@ -5,6 +5,7 @@ using CalamityMod.World; using Microsoft.Xna.Framework; using System.Collections.Generic; using Terraria; +using Terraria.ID; using Terraria.Graphics.Shaders; using Terraria.ModLoader; @@ -25,6 +26,7 @@ namespace CalamityMod.Items.Accessories.Wings "36% increased running acceleration\n" + "Greater mobility on ice\n" + "Water and lava walking\n" + + "Immunity to the On Fire! debuff\n" + "Temporary immunity to lava"); } @@ -77,6 +79,7 @@ namespace CalamityMod.Items.Accessories.Wings player.waterWalk = true; player.fireWalk = true; player.lavaMax += 240; + player.buffImmune[BuffID.OnFire] = true; player.wingTimeMax = 180; player.noFallDmg = true; modPlayer.IBoots = !hideVisual; diff --git a/Items/Accessories/Wings/InfinityBoots.cs b/Items/Accessories/Wings/InfinityBoots.cs index 0f3398dc86..8afce14b63 100644 --- a/Items/Accessories/Wings/InfinityBoots.cs +++ b/Items/Accessories/Wings/InfinityBoots.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Items.Accessories.Wings "24% increased running acceleration\n" + "Greater mobility on ice\n" + "Water and lava walking\n" + + "Immunity to the On Fire! debuff\n" + "Temporary immunity to lava"); } @@ -77,6 +78,7 @@ namespace CalamityMod.Items.Accessories.Wings player.waterWalk = true; player.fireWalk = true; player.lavaMax += 240; + player.buffImmune[BuffID.OnFire] = true; player.wingTimeMax = 140; player.noFallDmg = true; modPlayer.IBoots = !hideVisual; diff --git a/Items/Armor/CirrusDress.cs b/Items/Armor/CirrusDress.cs index 079da1bea7..578980917f 100644 --- a/Items/Armor/CirrusDress.cs +++ b/Items/Armor/CirrusDress.cs @@ -4,7 +4,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor { - [AutoloadEquip(EquipType.Body, EquipType.Legs)] + [AutoloadEquip(EquipType.Body)] public class CirrusDress : ModItem { /* How to obtain @@ -37,5 +37,17 @@ namespace CalamityMod.Items.Armor player.magicDamage += 0.05f; player.magicCrit += 5; } + + public override void SetMatch(bool male, ref int equipSlot, ref bool robes) + { + robes = true; + // The equipSlot is added in CalamityMod.cs --> Load hook + equipSlot = mod.GetEquipSlot("CirrusDress_Legs", EquipType.Legs); + } + + public override void DrawHands(ref bool drawHands, ref bool drawArms) + { + drawHands = true; + } } } diff --git a/Items/Armor/SilvaHelmet.cs b/Items/Armor/SilvaHelmet.cs index 0036807e62..16eca8894c 100644 --- a/Items/Armor/SilvaHelmet.cs +++ b/Items/Armor/SilvaHelmet.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Armor "All projectiles spawn healing leaf orbs on enemy hits\n" + "Max run speed and acceleration boosted by 5%\n" + "If you are reduced to 1 HP you will not die from any further damage for 8 seconds\n" + - "This effect only triggers once per life\n" + + "This effect has a 5 minute cooldown. The cooldown does not decrement if any bosses or events are active.\n" + "Summons an ancient leaf prism to blast your enemies with life energy"; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Armor/SilvaMaskedCap.cs b/Items/Armor/SilvaMaskedCap.cs index 5714cebda5..3090832094 100644 --- a/Items/Armor/SilvaMaskedCap.cs +++ b/Items/Armor/SilvaMaskedCap.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "All projectiles spawn healing leaf orbs on enemy hits\n" + "Max run speed and acceleration boosted by 5%\n" + "If you are reduced to 1 HP you will not die from any further damage for 8 seconds\n" + - "This effect only triggers once per life\n" + + "This effect has a 5 minute cooldown. The cooldown does not decrement if any bosses or events are active.\n" + "Magic projectiles which cannot pierce will occasionally set off potent blasts of nature energy"; } diff --git a/Items/Armor/TitanHeartMask.cs b/Items/Armor/TitanHeartMask.cs index ddeb4c0101..f24d5510d7 100644 --- a/Items/Armor/TitanHeartMask.cs +++ b/Items/Armor/TitanHeartMask.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Armor { DisplayName.SetDefault("Titan Heart Mask"); Tooltip.SetDefault("5% increased rogue damage and knockback\n" + - "Rogue weapons spread the astral infection"); + "Rogue weapons inflict the Astral Infection debuff"); } public override void SetDefaults() diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 9a3ab2d8d8..a013d48488 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1251,7 +1251,11 @@ namespace CalamityMod.Items } } - if (item.type == ItemID.FrogLeg) + // Obsidian Skull and its upgrades make you immune to On Fire! + if (item.type == ItemID.ObsidianSkull || item.type == ItemID.ObsidianHorseshoe || item.type == ItemID.ObsidianShield || item.type == ItemID.AnkhShield || item.type == ItemID.ObsidianWaterWalkingBoots || item.type == ItemID.LavaWaders) + player.buffImmune[BuffID.OnFire] = true; + + if (item.type == ItemID.FrogLeg) player.jumpSpeedBoost -= 1.2f; if (item.type == ItemID.FireGauntlet) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 25dfc90d8b..e07fd2482b 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -551,8 +551,15 @@ namespace CalamityMod.Items EditTooltipByNum(1, (line) => line.text = line.text.Replace("10%", "14%") + extraLine); } - // Spectre Hood's lifesteal is heavily nerfed, so it only reduces magic damage by 20% instead of 40% - if (item.type == ItemID.SpectreHood) + // On Fire! debuff immunities + if (item.type == ItemID.ObsidianSkull || item.type == ItemID.AnkhShield) + EditTooltipByNum(0, (line) => line.text = line.text.Replace("fire blocks", "the Burning and On Fire! debuffs")); + + if (item.type == ItemID.ObsidianHorseshoe || item.type == ItemID.ObsidianShield || item.type == ItemID.ObsidianWaterWalkingBoots || item.type == ItemID.LavaWaders) + EditTooltipByNum(1, (line) => line.text = line.text.Replace("fire blocks", "the Burning and On Fire! debuffs")); + + // Spectre Hood's lifesteal is heavily nerfed, so it only reduces magic damage by 20% instead of 40% + if (item.type == ItemID.SpectreHood) EditTooltipByNum(0, (line) => line.text = line.text.Replace("40%", "20%")); // Yoyo Glove/Bag apply a 0.66x damage multiplier on yoyos diff --git a/Items/Dyes/StratusDye.png b/Items/Dyes/StratusDye.png index c46981da43..415f190397 100644 Binary files a/Items/Dyes/StratusDye.png and b/Items/Dyes/StratusDye.png differ diff --git a/Items/Mounts/AlicornMountExtra.png b/Items/Mounts/AlicornMountExtra.png index 49bad1ec68..64fb381904 100644 Binary files a/Items/Mounts/AlicornMountExtra.png and b/Items/Mounts/AlicornMountExtra.png differ diff --git a/Items/Mounts/AlicornMount_Back.png b/Items/Mounts/AlicornMount_Back.png index ea6c2f5de6..fcb20c4308 100644 Binary files a/Items/Mounts/AlicornMount_Back.png and b/Items/Mounts/AlicornMount_Back.png differ diff --git a/Items/Mounts/AlicornMount_Front.png b/Items/Mounts/AlicornMount_Front.png index 1c35307537..821fd8bbfc 100644 Binary files a/Items/Mounts/AlicornMount_Front.png and b/Items/Mounts/AlicornMount_Front.png differ diff --git a/Items/Potions/Alcohol/CaribbeanRum.png b/Items/Potions/Alcohol/CaribbeanRum.png index dbbd84b161..834ce1a26a 100644 Binary files a/Items/Potions/Alcohol/CaribbeanRum.png and b/Items/Potions/Alcohol/CaribbeanRum.png differ diff --git a/Items/Potions/Alcohol/GrapeBeer.png b/Items/Potions/Alcohol/GrapeBeer.png index 27c0b23a27..1727991aa4 100644 Binary files a/Items/Potions/Alcohol/GrapeBeer.png and b/Items/Potions/Alcohol/GrapeBeer.png differ diff --git a/Items/Potions/Alcohol/Moonshine.png b/Items/Potions/Alcohol/Moonshine.png index a8721c640e..f4131089b9 100644 Binary files a/Items/Potions/Alcohol/Moonshine.png and b/Items/Potions/Alcohol/Moonshine.png differ diff --git a/Items/Potions/Alcohol/RedWine.png b/Items/Potions/Alcohol/RedWine.png index 3a05fd0de6..025a1ad4fa 100644 Binary files a/Items/Potions/Alcohol/RedWine.png and b/Items/Potions/Alcohol/RedWine.png differ diff --git a/Items/Potions/Alcohol/Rum.png b/Items/Potions/Alcohol/Rum.png index 3daa5a32f3..1f582e6294 100644 Binary files a/Items/Potions/Alcohol/Rum.png and b/Items/Potions/Alcohol/Rum.png differ diff --git a/Items/Potions/Alcohol/Whiskey.png b/Items/Potions/Alcohol/Whiskey.png index fd471d5275..351f288939 100644 Binary files a/Items/Potions/Alcohol/Whiskey.png and b/Items/Potions/Alcohol/Whiskey.png differ diff --git a/Items/Potions/DraconicElixir.cs b/Items/Potions/DraconicElixir.cs index 1749fd7577..5b04dd096f 100644 --- a/Items/Potions/DraconicElixir.cs +++ b/Items/Potions/DraconicElixir.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Items.Potions public override void SetDefaults() { - item.width = 28; - item.height = 18; + item.width = 50; + item.height = 44; item.useTurn = true; item.maxStack = 30; item.rare = ItemRarityID.Orange; diff --git a/Items/SummonItems/Seafood.cs b/Items/SummonItems/Seafood.cs index 0da71ae88e..e8f1645a0f 100644 --- a/Items/SummonItems/Seafood.cs +++ b/Items/SummonItems/Seafood.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.SummonItems recipe.AddIngredient(ModContent.ItemType(), 20); recipe.AddIngredient(ItemID.Starfish, 10); recipe.AddIngredient(ItemID.SharkFin, 5); - recipe.AddTile(TileID.MythrilAnvil); + recipe.AddTile(TileID.Anvils); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Items/TreasureBags/StarterBag.cs b/Items/TreasureBags/StarterBag.cs index de006863ae..c207d172bd 100644 --- a/Items/TreasureBags/StarterBag.cs +++ b/Items/TreasureBags/StarterBag.cs @@ -54,7 +54,8 @@ namespace CalamityMod.Items.TreasureBags // Malice item DropHelper.DropItem(player, ModContent.ItemType()); - // Difficulty items (Death doesn't drop in Normal) + // Difficulty items (Revengeance and Death don't drop in Normal) + DropHelper.DropItemCondition(player, ModContent.ItemType(), Main.expertMode); DropHelper.DropItemCondition(player, ModContent.ItemType(), Main.expertMode); // The Lad diff --git a/Items/Weapons/Magic/ClamorNoctus.png b/Items/Weapons/Magic/ClamorNoctus.png index 3e3a523ae8..1dcf92a777 100644 Binary files a/Items/Weapons/Magic/ClamorNoctus.png and b/Items/Weapons/Magic/ClamorNoctus.png differ diff --git a/Items/Weapons/Magic/PlasmaRifle.cs b/Items/Weapons/Magic/PlasmaRifle.cs index 4835bc027c..157177884f 100644 --- a/Items/Weapons/Magic/PlasmaRifle.cs +++ b/Items/Weapons/Magic/PlasmaRifle.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Items.Weapons.Magic item.damage = 160; item.mana = 40; item.magic = true; - item.width = 48; - item.height = 22; + item.width = 72; + item.height = 20; item.useTime = item.useAnimation = 8; item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; diff --git a/Items/Weapons/Magic/PlasmaRifle.png b/Items/Weapons/Magic/PlasmaRifle.png index 7623823a35..3c01d80ac2 100644 Binary files a/Items/Weapons/Magic/PlasmaRifle.png and b/Items/Weapons/Magic/PlasmaRifle.png differ diff --git a/Items/Weapons/Magic/StratusSphere.png b/Items/Weapons/Magic/StratusSphere.png index e0affc9ac3..b26cd057fc 100644 Binary files a/Items/Weapons/Magic/StratusSphere.png and b/Items/Weapons/Magic/StratusSphere.png differ diff --git a/Items/Weapons/Magic/TacticiansTrumpCard.cs b/Items/Weapons/Magic/TacticiansTrumpCard.cs index 8384c6f9c3..78fc1645e5 100644 --- a/Items/Weapons/Magic/TacticiansTrumpCard.cs +++ b/Items/Weapons/Magic/TacticiansTrumpCard.cs @@ -34,7 +34,8 @@ namespace CalamityMod.Items.Weapons.Magic item.value = CalamityGlobalItem.Rarity12BuyPrice; item.rare = ItemRarityID.Purple; item.Calamity().customRarity = CalamityRarity.Turquoise; - } + item.Calamity().donorItem = true; + } public override void MeleeEffects(Player player, Rectangle hitbox) { diff --git a/Items/Weapons/Melee/CrescentMoon.png b/Items/Weapons/Melee/CrescentMoon.png index 418d2481fd..7d78a850cf 100644 Binary files a/Items/Weapons/Melee/CrescentMoon.png and b/Items/Weapons/Melee/CrescentMoon.png differ diff --git a/Items/Weapons/Melee/Floodtide.cs b/Items/Weapons/Melee/Floodtide.cs index 338bba2c98..a0b2733e6c 100644 --- a/Items/Weapons/Melee/Floodtide.cs +++ b/Items/Weapons/Melee/Floodtide.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Items.Weapons.Melee { item.damage = 89; item.melee = true; - item.width = 60; - item.height = 64; + item.width = 80; + item.height = 92; item.useTime = 21; item.useAnimation = 21; item.useTurn = true; @@ -35,6 +35,11 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 18f; } + public override void UseStyle(Player player) + { + player.itemLocation += new Vector2(-4f * player.direction, 2f * player.gravDir).RotatedBy(player.itemRotation); + } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { for (int i = 0; i < 2; i++) diff --git a/Items/Weapons/Melee/Floodtide.png b/Items/Weapons/Melee/Floodtide.png index 865c89cf71..ac2f6426c7 100644 Binary files a/Items/Weapons/Melee/Floodtide.png and b/Items/Weapons/Melee/Floodtide.png differ diff --git a/Items/Weapons/Melee/GalileoGladius.png b/Items/Weapons/Melee/GalileoGladius.png index e86d4d80e8..9fb7a43132 100644 Binary files a/Items/Weapons/Melee/GalileoGladius.png and b/Items/Weapons/Melee/GalileoGladius.png differ diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index abe904e2f2..6dc37762b3 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -1,5 +1,7 @@ using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.Melee; +using CalamityMod.Items.Placeables.Ores; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -51,9 +53,9 @@ namespace CalamityMod.Items.Weapons.Melee ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 3); recipe.AddIngredient(ModContent.ItemType(), 3); - recipe.AddIngredient(ModContent.ItemType(), 3); - recipe.AddIngredient(ItemID.LunarBar, 5); + recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/Melee/RoyalKnivesMelee.cs b/Items/Weapons/Melee/RoyalKnivesMelee.cs index 4df0a352a5..a9eb098d25 100644 --- a/Items/Weapons/Melee/RoyalKnivesMelee.cs +++ b/Items/Weapons/Melee/RoyalKnivesMelee.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - item.width = 18; + item.width = 44; item.damage = 400; item.melee = true; item.noMelee = true; @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 3f; item.UseSound = SoundID.Item39; item.autoReuse = true; - item.height = 20; + item.height = 62; item.value = CalamityGlobalItem.Rarity16BuyPrice; item.Calamity().customRarity = CalamityRarity.HotPink; diff --git a/Items/Weapons/Melee/RoyalKnivesMelee.png b/Items/Weapons/Melee/RoyalKnivesMelee.png index 4d31893202..cfbcd39a66 100644 Binary files a/Items/Weapons/Melee/RoyalKnivesMelee.png and b/Items/Weapons/Melee/RoyalKnivesMelee.png differ diff --git a/Items/Weapons/Ranged/AMR.cs b/Items/Weapons/Ranged/AMR.cs index 4a4a709eec..ae124fa936 100644 --- a/Items/Weapons/Ranged/AMR.cs +++ b/Items/Weapons/Ranged/AMR.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Items.Weapons.Ranged { item.damage = 3240; item.ranged = true; - item.width = 76; - item.height = 30; + item.width = 140; + item.height = 36; item.useTime = 60; item.useAnimation = 60; item.useStyle = ItemUseStyleID.HoldingOut; diff --git a/Items/Weapons/Ranged/AMR.png b/Items/Weapons/Ranged/AMR.png index d640a68464..a4a73a4a21 100644 Binary files a/Items/Weapons/Ranged/AMR.png and b/Items/Weapons/Ranged/AMR.png differ diff --git a/Items/Weapons/Ranged/FetidEmesis.cs b/Items/Weapons/Ranged/FetidEmesis.cs index c504882bee..acdd07c794 100644 --- a/Items/Weapons/Ranged/FetidEmesis.cs +++ b/Items/Weapons/Ranged/FetidEmesis.cs @@ -11,7 +11,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { DisplayName.SetDefault("Fetid Emesis"); - Tooltip.SetDefault("Has a chance to release rotten chunks instead of bullets"); + Tooltip.SetDefault("40% chance to not consume ammo\n" + + "Has a chance to release rotten chunks instead of bullets"); } public override void SetDefaults() @@ -35,6 +36,8 @@ namespace CalamityMod.Items.Weapons.Ranged item.Calamity().canFirePointBlankShots = true; } + public override bool ConsumeAmmo(Player player) => Main.rand.Next(100) > 40; + public override Vector2? HoldoutOffset() => new Vector2(-5, 0); public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Ranged/HalleysInferno.png b/Items/Weapons/Ranged/HalleysInferno.png index 8888f3609e..90cb0e593a 100644 Binary files a/Items/Weapons/Ranged/HalleysInferno.png and b/Items/Weapons/Ranged/HalleysInferno.png differ diff --git a/Items/Weapons/Ranged/ProporsePistol.cs b/Items/Weapons/Ranged/ProporsePistol.cs index 9e492d98cc..1d48562392 100644 --- a/Items/Weapons/Ranged/ProporsePistol.cs +++ b/Items/Weapons/Ranged/ProporsePistol.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged { item.damage = 90; item.ranged = true; - item.width = 36; + item.width = 40; item.height = 20; item.useTime = 25; item.useAnimation = 25; diff --git a/Items/Weapons/Ranged/ProporsePistol.png b/Items/Weapons/Ranged/ProporsePistol.png index f9f6d2561a..51de3902ad 100644 Binary files a/Items/Weapons/Ranged/ProporsePistol.png and b/Items/Weapons/Ranged/ProporsePistol.png differ diff --git a/Items/Weapons/Rogue/AlphaVirus.cs b/Items/Weapons/Rogue/AlphaVirus.cs index 163e5e6fa7..938a5f388f 100644 --- a/Items/Weapons/Rogue/AlphaVirus.cs +++ b/Items/Weapons/Rogue/AlphaVirus.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetStaticDefaults() { DisplayName.SetDefault("Alpha Virus"); - Tooltip.SetDefault("Throws a giant plague cell with a lethal aura that splits into 6 plague seekers in death\n" + + Tooltip.SetDefault("Throws a giant plague cell with a lethal aura that splits into 6 plague seekers on death\n" + "Stealth strikes cause the plague cell to move slower, accumulating an aura of swirling plague seekers as it flies"); } diff --git a/Items/Weapons/Rogue/GildedDagger.cs b/Items/Weapons/Rogue/GildedDagger.cs index e595f23e2a..dc9c1efa04 100644 --- a/Items/Weapons/Rogue/GildedDagger.cs +++ b/Items/Weapons/Rogue/GildedDagger.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { - item.width = 40; + item.width = 32; item.damage = 14; item.noMelee = true; item.noUseGraphic = true; @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.knockBack = 1f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 36; + item.height = 26; item.maxStack = 1; item.value = CalamityGlobalItem.Rarity1BuyPrice; item.rare = ItemRarityID.Blue; diff --git a/Items/Weapons/Rogue/GildedDagger.png b/Items/Weapons/Rogue/GildedDagger.png index 825cade719..efebcc8f6a 100644 Binary files a/Items/Weapons/Rogue/GildedDagger.png and b/Items/Weapons/Rogue/GildedDagger.png differ diff --git a/Items/Weapons/Rogue/GleamingDagger.cs b/Items/Weapons/Rogue/GleamingDagger.cs index 62111e83dd..beea3e7562 100644 --- a/Items/Weapons/Rogue/GleamingDagger.cs +++ b/Items/Weapons/Rogue/GleamingDagger.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { - item.width = 40; + item.width = 32; item.damage = 14; item.noMelee = true; item.noUseGraphic = true; @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.knockBack = 1f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 36; + item.height = 26; item.maxStack = 1; item.value = CalamityGlobalItem.Rarity1BuyPrice; item.rare = ItemRarityID.Blue; diff --git a/Items/Weapons/Rogue/GleamingDagger.png b/Items/Weapons/Rogue/GleamingDagger.png index 74fa7601a8..c4ae494649 100644 Binary files a/Items/Weapons/Rogue/GleamingDagger.png and b/Items/Weapons/Rogue/GleamingDagger.png differ diff --git a/Items/Weapons/Rogue/NightsGaze.png b/Items/Weapons/Rogue/NightsGaze.png index 6b12c7754c..ee8352affa 100644 Binary files a/Items/Weapons/Rogue/NightsGaze.png and b/Items/Weapons/Rogue/NightsGaze.png differ diff --git a/Items/Weapons/Rogue/SearedPan.cs b/Items/Weapons/Rogue/SearedPan.cs index fa5be6dd48..353ebb821c 100644 --- a/Items/Weapons/Rogue/SearedPan.cs +++ b/Items/Weapons/Rogue/SearedPan.cs @@ -10,31 +10,32 @@ namespace CalamityMod.Items.Weapons.Rogue { public class SearedPan : RogueWeapon { - // Attacks must be within 48 frames of each other to count as "consecutive" hits + // Attacks must be within 40 frames of each other to count as "consecutive" hits // This is a little less than double the use time - public static int ConsecutiveHitOpening = 48; + public static int ConsecutiveHitOpening = 40; public override void SetStaticDefaults() { DisplayName.SetDefault("Seared Pan"); Tooltip.SetDefault("dAMaGe iS rAthEr cOnSisTeNT\n" + "Fires a frying pan at high velocity\n" + "Enemy hits summon fireballs that linger around the target\n" + - "Landing three consecutive hits grants full stealth\n" + - "Stealth strikes explode into golden sparks, and after hitting an enemy,\n" + - "they cause all fireballs to aggressively home in on their target"); + "Landing three consecutive hits grants will launch a golden pan\n" + + "Golden pans cause all fireballs to aggressively home in on their target\n" + + "Stealth strikes act similar to golden pans but also explode into golden sparks\n" + + "Stealth strikes also summon additional fireballs on hit"); } public override void SafeSetDefaults() { item.width = 60; item.height = 36; - item.damage = 666; + item.damage = 777; item.Calamity().rogue = true; item.knockBack = 10f; item.noMelee = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.SwingThrow; - item.useTime = item.useAnimation = 28; + item.useTime = item.useAnimation = 25; item.reuseDelay = 1; item.UseSound = SoundID.Item1; item.autoReuse = true; @@ -47,11 +48,23 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - int pan = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); - if (player.Calamity().StealthStrikeAvailable() && pan.WithinBounds(Main.maxProjectiles)) + float mode = 1f; + if (player.Calamity().searedPanCounter >= 3) + { + player.Calamity().searedPanCounter = 0; + mode = 2f; + } + if (player.Calamity().StealthStrikeAvailable()) + { + player.Calamity().searedPanCounter = 0; + mode = 3f; + } + int pan = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, mode); + if (mode > 1f && pan.WithinBounds(Main.maxProjectiles)) { - Main.projectile[pan].Calamity().stealthStrike = true; Main.projectile[pan].extraUpdates++; + if (mode == 3f) + Main.projectile[pan].Calamity().stealthStrike = true; } return false; } diff --git a/Items/Weapons/Summon/BelladonnaSpiritStaff.cs b/Items/Weapons/Summon/BelladonnaSpiritStaff.cs index 717ff7121d..cbcbbe8c80 100644 --- a/Items/Weapons/Summon/BelladonnaSpiritStaff.cs +++ b/Items/Weapons/Summon/BelladonnaSpiritStaff.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon item.damage = 5; item.mana = 10; item.width = 40; - item.height = 40; + item.height = 42; item.useTime = item.useAnimation = 35; item.useStyle = ItemUseStyleID.SwingThrow; item.noMelee = true; diff --git a/Items/Weapons/Summon/BelladonnaSpiritStaff.png b/Items/Weapons/Summon/BelladonnaSpiritStaff.png index 93ed75fad4..95ff1f0ba5 100644 Binary files a/Items/Weapons/Summon/BelladonnaSpiritStaff.png and b/Items/Weapons/Summon/BelladonnaSpiritStaff.png differ diff --git a/Items/Weapons/Summon/CryogenicStaff.cs b/Items/Weapons/Summon/CryogenicStaff.cs index ce9f23f9a3..0b2dec1526 100644 --- a/Items/Weapons/Summon/CryogenicStaff.cs +++ b/Items/Weapons/Summon/CryogenicStaff.cs @@ -21,8 +21,8 @@ Fire rate and range increase the longer it targets an enemy"); item.mana = 10; item.summon = true; item.sentry = true; - item.width = 40; - item.height = 40; + item.width = 82; + item.height = 84; item.useTime = item.useAnimation = 25; item.useStyle = ItemUseStyleID.SwingThrow; item.noMelee = true; diff --git a/Items/Weapons/Summon/CryogenicStaff.png b/Items/Weapons/Summon/CryogenicStaff.png index 931b640cb7..5d8055a244 100644 Binary files a/Items/Weapons/Summon/CryogenicStaff.png and b/Items/Weapons/Summon/CryogenicStaff.png differ diff --git a/Items/Weapons/Summon/Sirius.png b/Items/Weapons/Summon/Sirius.png index 14125d49e9..7acb80d481 100644 Binary files a/Items/Weapons/Summon/Sirius.png and b/Items/Weapons/Summon/Sirius.png differ diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index 82cc1f989f..8e6efcb85a 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -1466,6 +1466,12 @@ namespace CalamityMod public static bool SetBossHealthBarVisible(bool visible) => Main.LocalPlayer.Calamity().drawBossHPBar = visible; #endregion + #region Dodge Disabling + public static bool AreDodgesDisabled() => Main.LocalPlayer.Calamity().disableAllDodges; + + public static bool DisableAllDodges(bool disable) => Main.LocalPlayer.Calamity().disableAllDodges = disable; + #endregion + #region Item Rarity public static int GetCalamityRarity(Item item) { @@ -1802,6 +1808,18 @@ namespace CalamityMod return new ArgumentNullException("ERROR: Must specify a bool."); return SetBossHealthBarVisible(bossBarEnabled); + case "NoDodges": + case "DodgesDisabled": + case "GetDodgesDisabled": + return AreDodgesDisabled(); + + case "DisableDodges": + case "DisableAllDodges": + case "SetDodgesDisabled": + if (args.Length < 2 || !(args[1] is bool disableDodges)) + return new ArgumentNullException("ERROR: Must specify a bool."); + return DisableAllDodges(disableDodges); + case "GetRarity": case "GetItemRarity": case "GetCalamityRarity": diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index a5888f79d0..83f5915271 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -29,8 +29,8 @@ using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Items.Weapons.Summon; using CalamityMod.Items.Weapons.Typeless; -using CalamityMod.NPCs.Abyss; using CalamityMod.NPCs.AcidRain; +using CalamityMod.NPCs.AdultEidolonWyrm; using CalamityMod.NPCs.AquaticScourge; using CalamityMod.NPCs.AstrumAureus; using CalamityMod.NPCs.AstrumDeus; @@ -617,7 +617,7 @@ namespace CalamityMod List collection = new List() { }; string instructions = $"While in the Abyss, use an item that inflicts Chaos State"; string despawn = CalamityUtils.ColorMessage("...", new Color(0x7F, 0xFF, 0xD4)); - string bossLogTex = "CalamityMod/NPCs/Abyss/AdultEidolonWyrm_BossChecklist"; + string bossLogTex = "CalamityMod/NPCs/AdultEidolonWyrm/AdultEidolonWyrm_BossChecklist"; AddBoss(bossChecklist, calamity, "Adult Eidolon Wyrm", order, type, DownedAdultEidolonWyrm, summon, loot, collection, instructions, despawn, bossLogTex); } } diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index eba1325a0f..b8c045e3f2 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -503,8 +503,9 @@ namespace CalamityMod.NPCs.Abyss DropHelper.DropItem(npc, ModContent.ItemType(), 30, 40); DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedPolterghast, 3, 1, 1); DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedPolterghast, 3, 1, 1); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas, 1, 6, 8); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas && Main.expertMode, 2, 2, 3); + int minLumenyl = Main.expertMode ? 8 : 6; + int maxLumenyl = Main.expertMode ? 11 : 8; + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas, 1f, minLumenyl, maxLumenyl); DropHelper.DropItemCondition(npc, ItemID.Ectoplasm, NPC.downedPlantBoss, 1, 8, 12); } diff --git a/NPCs/Abyss/GulperEelHead.cs b/NPCs/Abyss/GulperEelHead.cs index 447e717ab0..410081f2b0 100644 --- a/NPCs/Abyss/GulperEelHead.cs +++ b/NPCs/Abyss/GulperEelHead.cs @@ -339,8 +339,9 @@ namespace CalamityMod.NPCs.Abyss public override void NPCLoot() { - DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas, 0.5f, 2, 3); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas && Main.expertMode, 0.5f); + int minLumenyl = Main.expertMode ? 3 : 2; + int maxLumenyl = Main.expertMode ? 4 : 3; + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas, 0.5f, minLumenyl, maxLumenyl); int minCells = Main.expertMode ? 8 : 6; int maxCells = Main.expertMode ? 11 : 8; DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas, 0.5f, minCells, maxCells); diff --git a/NPCs/Abyss/AEWScreenShaderData.cs b/NPCs/AdultEidolonWyrm/AEWScreenShaderData.cs similarity index 96% rename from NPCs/Abyss/AEWScreenShaderData.cs rename to NPCs/AdultEidolonWyrm/AEWScreenShaderData.cs index 4d0c5fc4ab..99ba5112dd 100644 --- a/NPCs/Abyss/AEWScreenShaderData.cs +++ b/NPCs/AdultEidolonWyrm/AEWScreenShaderData.cs @@ -2,7 +2,7 @@ using Terraria; using Terraria.Graphics.Shaders; using Terraria.ModLoader; -namespace CalamityMod.NPCs.Abyss +namespace CalamityMod.NPCs.AdultEidolonWyrm { public class AEWScreenShaderData : ScreenShaderData { diff --git a/NPCs/Abyss/AEWSky.cs b/NPCs/AdultEidolonWyrm/AEWSky.cs similarity index 98% rename from NPCs/Abyss/AEWSky.cs rename to NPCs/AdultEidolonWyrm/AEWSky.cs index 074be772c1..aadf37d301 100644 --- a/NPCs/Abyss/AEWSky.cs +++ b/NPCs/AdultEidolonWyrm/AEWSky.cs @@ -4,7 +4,7 @@ using Terraria; using Terraria.Graphics.Effects; using Terraria.ModLoader; -namespace CalamityMod.NPCs.Abyss +namespace CalamityMod.NPCs.AdultEidolonWyrm { public class AEWSky : CustomSky { diff --git a/NPCs/Abyss/AdultEidolonWyrm_BossChecklist.png b/NPCs/AdultEidolonWyrm/AdultEidolonWyrm_BossChecklist.png similarity index 100% rename from NPCs/Abyss/AdultEidolonWyrm_BossChecklist.png rename to NPCs/AdultEidolonWyrm/AdultEidolonWyrm_BossChecklist.png diff --git a/NPCs/Abyss/EidolonWyrmBodyAltGlowHuge.png b/NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltGlowHuge.png similarity index 100% rename from NPCs/Abyss/EidolonWyrmBodyAltGlowHuge.png rename to NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltGlowHuge.png diff --git a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs b/NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltHuge.cs similarity index 96% rename from NPCs/Abyss/EidolonWyrmBodyAltHuge.cs rename to NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltHuge.cs index 6acca26867..764caf17c5 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs +++ b/NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltHuge.cs @@ -7,13 +7,13 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.NPCs.Abyss +namespace CalamityMod.NPCs.AdultEidolonWyrm { public class EidolonWyrmBodyAltHuge : ModNPC { public override void SetStaticDefaults() { - DisplayName.SetDefault("Eidolon Wyrm"); + DisplayName.SetDefault("Adult Eidolon Wyrm"); } public override void SetDefaults() @@ -183,10 +183,10 @@ namespace CalamityMod.NPCs.Abyss Vector2 center = new Vector2(npc.Center.X, npc.Center.Y); Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); Vector2 vector = center - Main.screenPosition; - vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlowHuge").Width, ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlowHuge").Height) * 0.5f; + vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltGlowHuge").Width, ModContent.GetTexture("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltGlowHuge").Height) * 0.5f; vector += vector11 * 1f + new Vector2(0f, 4f + npc.gfxOffY); Color color = new Color(127, 127, 127, 0).MultiplyRGBA(Color.LightYellow) * npc.Opacity; - Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlowHuge"), vector, + Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltGlowHuge"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); } diff --git a/NPCs/Abyss/EidolonWyrmBodyAltHuge.png b/NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltHuge.png similarity index 100% rename from NPCs/Abyss/EidolonWyrmBodyAltHuge.png rename to NPCs/AdultEidolonWyrm/EidolonWyrmBodyAltHuge.png diff --git a/NPCs/Abyss/EidolonWyrmBodyGlowHuge.png b/NPCs/AdultEidolonWyrm/EidolonWyrmBodyGlowHuge.png similarity index 100% rename from NPCs/Abyss/EidolonWyrmBodyGlowHuge.png rename to NPCs/AdultEidolonWyrm/EidolonWyrmBodyGlowHuge.png diff --git a/NPCs/Abyss/EidolonWyrmBodyHuge.cs b/NPCs/AdultEidolonWyrm/EidolonWyrmBodyHuge.cs similarity index 96% rename from NPCs/Abyss/EidolonWyrmBodyHuge.cs rename to NPCs/AdultEidolonWyrm/EidolonWyrmBodyHuge.cs index 72d2b159e1..e7db6ff9e9 100644 --- a/NPCs/Abyss/EidolonWyrmBodyHuge.cs +++ b/NPCs/AdultEidolonWyrm/EidolonWyrmBodyHuge.cs @@ -7,13 +7,13 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.NPCs.Abyss +namespace CalamityMod.NPCs.AdultEidolonWyrm { public class EidolonWyrmBodyHuge : ModNPC { public override void SetStaticDefaults() { - DisplayName.SetDefault("Eidolon Wyrm"); + DisplayName.SetDefault("Adult Eidolon Wyrm"); } public override void SetDefaults() @@ -183,10 +183,10 @@ namespace CalamityMod.NPCs.Abyss Vector2 center = new Vector2(npc.Center.X, npc.Center.Y); Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); Vector2 vector = center - Main.screenPosition; - vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlowHuge").Width, ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlowHuge").Height) * 0.5f; + vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmBodyGlowHuge").Width, ModContent.GetTexture("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmBodyGlowHuge").Height) * 0.5f; vector += vector11 * 1f + new Vector2(0f, 4f + npc.gfxOffY); Color color = new Color(127, 127, 127, 0).MultiplyRGBA(Color.LightYellow) * npc.Opacity; - Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlowHuge"), vector, + Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmBodyGlowHuge"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); } diff --git a/NPCs/Abyss/EidolonWyrmBodyHuge.png b/NPCs/AdultEidolonWyrm/EidolonWyrmBodyHuge.png similarity index 100% rename from NPCs/Abyss/EidolonWyrmBodyHuge.png rename to NPCs/AdultEidolonWyrm/EidolonWyrmBodyHuge.png diff --git a/NPCs/Abyss/EidolonWyrmHeadGlowHuge.png b/NPCs/AdultEidolonWyrm/EidolonWyrmHeadGlowHuge.png similarity index 100% rename from NPCs/Abyss/EidolonWyrmHeadGlowHuge.png rename to NPCs/AdultEidolonWyrm/EidolonWyrmHeadGlowHuge.png diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs similarity index 98% rename from NPCs/Abyss/EidolonWyrmHeadHuge.cs rename to NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs index cd61e37116..d916714f4a 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs @@ -6,6 +6,7 @@ using CalamityMod.Items.Potions; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.NPCs.Abyss; using CalamityMod.NPCs.NormalNPCs; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -16,7 +17,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.NPCs.Abyss +namespace CalamityMod.NPCs.AdultEidolonWyrm { [AutoloadBossHead] public class EidolonWyrmHeadHuge : ModNPC @@ -72,7 +73,7 @@ namespace CalamityMod.NPCs.Abyss public override void SetStaticDefaults() { - DisplayName.SetDefault("Eidolon Wyrm"); + DisplayName.SetDefault("Adult Eidolon Wyrm"); } public override void SetDefaults() @@ -1339,10 +1340,10 @@ namespace CalamityMod.NPCs.Abyss Vector2 center = npc.Center; Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); Vector2 vector = center - Main.screenPosition; - vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlowHuge").Width, ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlowHuge").Height) * 0.5f; + vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmHeadGlowHuge").Width, ModContent.GetTexture("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmHeadGlowHuge").Height) * 0.5f; vector += vector11 * 1f + new Vector2(0f, 4f + npc.gfxOffY); Color color = new Color(127, 127, 127, 0).MultiplyRGBA(Color.LightYellow) * npc.Opacity; - Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlowHuge"), vector, + Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmHeadGlowHuge"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); } @@ -1360,8 +1361,9 @@ namespace CalamityMod.NPCs.Abyss DropHelper.DropItem(npc, ModContent.ItemType()); DropHelper.DropItem(npc, ModContent.ItemType()); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas, 1, 50, 108); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas && Main.expertMode, 2, 15, 27); + int minLumenyl = Main.expertMode ? 65 : 50; + int maxLumenyl = Main.expertMode ? 135 : 108; + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas, 1f, minLumenyl, maxLumenyl); DropHelper.DropItemCondition(npc, ItemID.Ectoplasm, NPC.downedPlantBoss, 1, 21, 32); // Mark Adult Eidolon Wyrm as defeated diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.png b/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.png similarity index 100% rename from NPCs/Abyss/EidolonWyrmHeadHuge.png rename to NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.png diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge_Head_Boss.png b/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge_Head_Boss.png similarity index 100% rename from NPCs/Abyss/EidolonWyrmHeadHuge_Head_Boss.png rename to NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge_Head_Boss.png diff --git a/NPCs/Abyss/EidolonWyrmTailGlowHuge.png b/NPCs/AdultEidolonWyrm/EidolonWyrmTailGlowHuge.png similarity index 100% rename from NPCs/Abyss/EidolonWyrmTailGlowHuge.png rename to NPCs/AdultEidolonWyrm/EidolonWyrmTailGlowHuge.png diff --git a/NPCs/Abyss/EidolonWyrmTailHuge.cs b/NPCs/AdultEidolonWyrm/EidolonWyrmTailHuge.cs similarity index 95% rename from NPCs/Abyss/EidolonWyrmTailHuge.cs rename to NPCs/AdultEidolonWyrm/EidolonWyrmTailHuge.cs index 11f9b2e6be..2df85028f0 100644 --- a/NPCs/Abyss/EidolonWyrmTailHuge.cs +++ b/NPCs/AdultEidolonWyrm/EidolonWyrmTailHuge.cs @@ -6,13 +6,13 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.NPCs.Abyss +namespace CalamityMod.NPCs.AdultEidolonWyrm { public class EidolonWyrmTailHuge : ModNPC { public override void SetStaticDefaults() { - DisplayName.SetDefault("Eidolon Wyrm"); + DisplayName.SetDefault("Adult Eidolon Wyrm"); } public override void SetDefaults() @@ -148,10 +148,10 @@ namespace CalamityMod.NPCs.Abyss Vector2 center = new Vector2(npc.Center.X, npc.Center.Y); Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); Vector2 vector = center - Main.screenPosition; - vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlowHuge").Width, ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlowHuge").Height) * 0.5f; + vector -= new Vector2(ModContent.GetTexture("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmTailGlowHuge").Width, ModContent.GetTexture("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmTailGlowHuge").Height) * 0.5f; vector += vector11 * 1f + new Vector2(0f, 4f + npc.gfxOffY); Color color = new Color(127, 127, 127, 0).MultiplyRGBA(Color.LightYellow) * npc.Opacity; - Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlowHuge"), vector, + Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/NPCs/AdultEidolonWyrm/EidolonWyrmTailGlowHuge"), vector, new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); } diff --git a/NPCs/Abyss/EidolonWyrmTailHuge.png b/NPCs/AdultEidolonWyrm/EidolonWyrmTailHuge.png similarity index 100% rename from NPCs/Abyss/EidolonWyrmTailHuge.png rename to NPCs/AdultEidolonWyrm/EidolonWyrmTailHuge.png diff --git a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs index f182912623..e006cf460a 100644 --- a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs @@ -214,11 +214,11 @@ namespace CalamityMod.NPCs.AstrumDeus return false; } - public override void NPCLoot() + public override bool PreNPCLoot() { // Unsplit Deus does not drop anything when killed/despawned. - if (npc.Calamity().newAI[0] == 0f) - return; + if (npc.Calamity().newAI[0] == 0f) + return false; // Killing ANY split Deus makes all other Deus heads die immediately. for (int i = 0; i < Main.maxNPCs; ++i) @@ -233,6 +233,14 @@ namespace CalamityMod.NPCs.AstrumDeus otherWormHead.netUpdate = true; } } + return true; + } + + public override void NPCLoot() + { + // Unsplit Deus does not drop anything when killed/despawned. + if (npc.Calamity().newAI[0] == 0f) + return; CalamityGlobalNPC.SetNewBossJustDowned(npc); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index d68a803374..a50de7cb69 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -9,6 +9,7 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Tools; using CalamityMod.Items.Weapons.Melee; using CalamityMod.NPCs.Abyss; +using CalamityMod.NPCs.AdultEidolonWyrm; using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.AquaticScourge; using CalamityMod.NPCs.Astral; diff --git a/NPCs/NormalNPCs/Eidolist.cs b/NPCs/NormalNPCs/Eidolist.cs index a372a5f706..4cefbade13 100644 --- a/NPCs/NormalNPCs/Eidolist.cs +++ b/NPCs/NormalNPCs/Eidolist.cs @@ -334,8 +334,9 @@ namespace CalamityMod.NPCs.NormalNPCs DropHelper.DropItem(npc, ItemID.BlueLunaticRobe); } DropHelper.DropItemCondition(npc, ModContent.ItemType(), !NPC.LunarApocalypseIsUp, 0.25f); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas, 1f, 8, 10); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas && Main.expertMode, 0.5f, 2, 4); + int minLumenyl = Main.expertMode ? 10 : 8; + int maxLumenyl = Main.expertMode ? 14 : 10; + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas, 1f, minLumenyl, maxLumenyl); DropHelper.DropItemCondition(npc, ItemID.Ectoplasm, NPC.downedPlantBoss, 1f, 3, 5); } } diff --git a/NPCs/NormalNPCs/WulfrumDrone.cs b/NPCs/NormalNPCs/WulfrumDrone.cs index 484664297d..c7b79f9929 100644 --- a/NPCs/NormalNPCs/WulfrumDrone.cs +++ b/NPCs/NormalNPCs/WulfrumDrone.cs @@ -183,7 +183,7 @@ namespace CalamityMod.NPCs.NormalNPCs if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneSulphur) return 0f; - return SpawnCondition.OverworldDaySlime.Chance * (Main.hardMode ? 0.025f : 0.1f) * pylonMult; + return SpawnCondition.OverworldDaySlime.Chance * (Main.hardMode ? 0.010f : 0.1f) * pylonMult; } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/WulfrumGyrator.cs b/NPCs/NormalNPCs/WulfrumGyrator.cs index 3efa13cd5c..3190b0ae51 100644 --- a/NPCs/NormalNPCs/WulfrumGyrator.cs +++ b/NPCs/NormalNPCs/WulfrumGyrator.cs @@ -160,7 +160,7 @@ namespace CalamityMod.NPCs.NormalNPCs float pylonMult = NPC.AnyNPCs(ModContent.NPCType()) ? 5.5f : 1f; if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneSulphur) return 0f; - return SpawnCondition.OverworldDaySlime.Chance * (Main.hardMode ? 0.0333f : 0.115f) * pylonMult; + return SpawnCondition.OverworldDaySlime.Chance * (Main.hardMode ? 0.020f : 0.115f) * pylonMult; } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/WulfrumHovercraft.cs b/NPCs/NormalNPCs/WulfrumHovercraft.cs index 257f5e8666..ed1da85d81 100644 --- a/NPCs/NormalNPCs/WulfrumHovercraft.cs +++ b/NPCs/NormalNPCs/WulfrumHovercraft.cs @@ -251,7 +251,7 @@ namespace CalamityMod.NPCs.NormalNPCs if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneSulphur) return 0f; - return SpawnCondition.OverworldDaySlime.Chance * (Main.hardMode ? 0.025f : 0.1f) * pylonMult; + return SpawnCondition.OverworldDaySlime.Chance * (Main.hardMode ? 0.015f : 0.1f) * pylonMult; } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/WulfrumPylon.cs b/NPCs/NormalNPCs/WulfrumPylon.cs index 441fafd95b..2e7a44c638 100644 --- a/NPCs/NormalNPCs/WulfrumPylon.cs +++ b/NPCs/NormalNPCs/WulfrumPylon.cs @@ -161,7 +161,7 @@ namespace CalamityMod.NPCs.NormalNPCs if (spawnInfo.playerFloorX > Main.maxTilesX * 0.333f && spawnInfo.playerFloorX < Main.maxTilesX - Main.maxTilesX * 0.333f) return SpawnCondition.OverworldDaySlime.Chance * (Main.hardMode ? 0.01f : 0.06f) * pylonMult; - return SpawnCondition.OverworldDaySlime.Chance * (Main.hardMode ? 0.06f : 0.15f) * pylonMult; + return SpawnCondition.OverworldDaySlime.Chance * (Main.hardMode ? 0.033f : 0.15f) * pylonMult; } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/WulfrumRover.cs b/NPCs/NormalNPCs/WulfrumRover.cs index 4c2124e656..e00cbde270 100644 --- a/NPCs/NormalNPCs/WulfrumRover.cs +++ b/NPCs/NormalNPCs/WulfrumRover.cs @@ -120,7 +120,7 @@ namespace CalamityMod.NPCs.NormalNPCs float pylonMult = NPC.AnyNPCs(ModContent.NPCType()) ? 5.5f : 1f; if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneSulphur) return 0f; - return SpawnCondition.OverworldDaySlime.Chance * (Main.hardMode ? 0.05f : 0.135f) * pylonMult; + return SpawnCondition.OverworldDaySlime.Chance * (Main.hardMode ? 0.010f : 0.135f) * pylonMult; } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs b/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs index a8f4c28c7d..fb62a5b67d 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs @@ -1,5 +1,5 @@ using CalamityMod.Events; -using CalamityMod.NPCs.Abyss; +using CalamityMod.NPCs.AdultEidolonWyrm; using CalamityMod.World; using Microsoft.Xna.Framework; using System; diff --git a/Projectiles/Magic/ClamorNoctusWyvern.png b/Projectiles/Magic/ClamorNoctusWyvern.png index 7a244dd21c..514dbd4679 100644 Binary files a/Projectiles/Magic/ClamorNoctusWyvern.png and b/Projectiles/Magic/ClamorNoctusWyvern.png differ diff --git a/Projectiles/Magic/Crescent.png b/Projectiles/Magic/Crescent.png index 6d0844d54a..ca8f2ad58d 100644 Binary files a/Projectiles/Magic/Crescent.png and b/Projectiles/Magic/Crescent.png differ diff --git a/Projectiles/Melee/CrescentMoonFlail.png b/Projectiles/Melee/CrescentMoonFlail.png index c9843d69f4..b9ea952ecf 100644 Binary files a/Projectiles/Melee/CrescentMoonFlail.png and b/Projectiles/Melee/CrescentMoonFlail.png differ diff --git a/Projectiles/Melee/IllustriousKnife.cs b/Projectiles/Melee/IllustriousKnife.cs index cf0e1afd23..3908c920f7 100644 --- a/Projectiles/Melee/IllustriousKnife.cs +++ b/Projectiles/Melee/IllustriousKnife.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { - projectile.width = 18; - projectile.height = 18; + projectile.width = 14; + projectile.height = 50; projectile.friendly = true; projectile.melee = true; projectile.penetrate = 1; diff --git a/Projectiles/Melee/IllustriousKnife.png b/Projectiles/Melee/IllustriousKnife.png index d8793dd624..167d5ab8eb 100644 Binary files a/Projectiles/Melee/IllustriousKnife.png and b/Projectiles/Melee/IllustriousKnife.png differ diff --git a/Projectiles/Ranged/SeaDragonRocket.png b/Projectiles/Ranged/SeaDragonRocket.png index 2c1206e1ee..2c581d19f6 100644 Binary files a/Projectiles/Ranged/SeaDragonRocket.png and b/Projectiles/Ranged/SeaDragonRocket.png differ diff --git a/Projectiles/Rogue/GildedDaggerProj.cs b/Projectiles/Rogue/GildedDaggerProj.cs index 5a584fe74c..0f5a501fac 100644 --- a/Projectiles/Rogue/GildedDaggerProj.cs +++ b/Projectiles/Rogue/GildedDaggerProj.cs @@ -9,8 +9,6 @@ namespace CalamityMod.Projectiles.Rogue { public class GildedDaggerProj : ModProjectile { - public override string Texture => "CalamityMod/Items/Weapons/Rogue/GildedDagger"; - private bool hasHitEnemy = false; private int targetNPC = -1; private List previousNPCs = new List() { -1 }; @@ -44,15 +42,10 @@ namespace CalamityMod.Projectiles.Rogue { projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt(); projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.PiOver2); - //Rotating 45 degrees if shooting right + //Rotating 90 degrees if shooting right if (projectile.spriteDirection == 1) { - projectile.rotation += MathHelper.ToRadians(45f); - } - //Rotating 45 degrees if shooting left - if (projectile.spriteDirection == -1) - { - projectile.rotation -= MathHelper.ToRadians(45f); + projectile.rotation += MathHelper.ToRadians(90f); } } diff --git a/Projectiles/Rogue/GildedDaggerProj.png b/Projectiles/Rogue/GildedDaggerProj.png new file mode 100644 index 0000000000..2dbcf289d2 Binary files /dev/null and b/Projectiles/Rogue/GildedDaggerProj.png differ diff --git a/Projectiles/Rogue/GleamingDaggerProj.cs b/Projectiles/Rogue/GleamingDaggerProj.cs index b84a1832a5..c3b21e498f 100644 --- a/Projectiles/Rogue/GleamingDaggerProj.cs +++ b/Projectiles/Rogue/GleamingDaggerProj.cs @@ -9,8 +9,6 @@ namespace CalamityMod.Projectiles.Rogue { public class GleamingDaggerProj : ModProjectile { - public override string Texture => "CalamityMod/Items/Weapons/Rogue/GleamingDagger"; - private bool hasHitEnemy = false; private int targetNPC = -1; private List previousNPCs = new List() { -1 }; @@ -44,15 +42,10 @@ namespace CalamityMod.Projectiles.Rogue { projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt(); projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.PiOver2); - //Rotating 45 degrees if shooting right + //Rotating 90 degrees if shooting right if (projectile.spriteDirection == 1) { - projectile.rotation += MathHelper.ToRadians(45f); - } - //Rotating 45 degrees if shooting left - if (projectile.spriteDirection == -1) - { - projectile.rotation -= MathHelper.ToRadians(45f); + projectile.rotation += MathHelper.ToRadians(90f); } } diff --git a/Projectiles/Rogue/GleamingDaggerProj.png b/Projectiles/Rogue/GleamingDaggerProj.png new file mode 100644 index 0000000000..6abf63a518 Binary files /dev/null and b/Projectiles/Rogue/GleamingDaggerProj.png differ diff --git a/Projectiles/Rogue/MangroveChakramProjectile.cs b/Projectiles/Rogue/MangroveChakramProjectile.cs index a7d3ca2287..2bbb51de92 100644 --- a/Projectiles/Rogue/MangroveChakramProjectile.cs +++ b/Projectiles/Rogue/MangroveChakramProjectile.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 3; projectile.timeLeft = 600; aiType = ProjectileID.WoodenBoomerang; - projectile.melee = true; - } + projectile.Calamity().rogue = true; + } public override void AI() { diff --git a/Projectiles/Rogue/NiceCock.cs b/Projectiles/Rogue/NiceCock.cs index 529dda0f6c..2f841f3054 100644 --- a/Projectiles/Rogue/NiceCock.cs +++ b/Projectiles/Rogue/NiceCock.cs @@ -11,6 +11,7 @@ namespace CalamityMod.Projectiles.Rogue public class NiceCock : ModProjectile { public bool homing = false; + public int Timer = 0; private bool initialized = false; private Color[] colors = new Color[] { @@ -95,6 +96,12 @@ namespace CalamityMod.Projectiles.Rogue if (Main.npc[index] is null || !Main.npc[index].active || Main.npc[index].life < 0) projectile.Kill(); + // Decrement the timer. This should last a second as stealth strikes will initialize this at 61. + if (Timer > 1) + Timer --; + if (Timer == 1) + homing = true; + NPC target = Main.npc[index]; if (homing) diff --git a/Projectiles/Rogue/NightsGazeStar.png b/Projectiles/Rogue/NightsGazeStar.png index 1db97cb7ea..8cb0af2395 100644 Binary files a/Projectiles/Rogue/NightsGazeStar.png and b/Projectiles/Rogue/NightsGazeStar.png differ diff --git a/Projectiles/Rogue/SearedPanProjectile.cs b/Projectiles/Rogue/SearedPanProjectile.cs index 3461b4b344..0a5e76f5a2 100644 --- a/Projectiles/Rogue/SearedPanProjectile.cs +++ b/Projectiles/Rogue/SearedPanProjectile.cs @@ -10,6 +10,20 @@ namespace CalamityMod.Projectiles.Rogue { public class SearedPanProjectile : ModProjectile { + internal enum SearedPanTypes + { + VenLocket = 0, + Normal = 1, + Golden = 2, + StealthStrike = 3 + } + + internal SearedPanTypes PanType + { + get => (SearedPanTypes)(int)projectile.ai[0]; + set => projectile.ai[0] = (int)value; + } + public override void SetStaticDefaults() { DisplayName.SetDefault("Pan"); @@ -63,67 +77,51 @@ namespace CalamityMod.Projectiles.Rogue if (!playerCanStealthStrike) return; - // Increment the seared pan counter and refill stealth after three consecutive hits + // Increment the seared pan counter. Pans summoned via the Venerated Locket shouldn't increment the counter. // See CalamityPlayerMiscEffects.cs for code that resets the counter after 40 frames modPlayer.searedPanTimer = 0; - if (!projectile.Calamity().stealthStrike && specialEffects) + if (specialEffects && PanType != SearedPanTypes.VenLocket) modPlayer.searedPanCounter++; - if (modPlayer.searedPanCounter >= 3 && !projectile.Calamity().stealthStrike && specialEffects) - { - modPlayer.searedPanCounter = 0; - modPlayer.rogueStealth = modPlayer.rogueStealthMax; - } - // Stealth strikes spawn four golden sparks on hit - if (projectile.Calamity().stealthStrike) + // Pans summoned via the Venerated Locket have zero special effects + if (PanType == SearedPanTypes.StealthStrike) { modPlayer.searedPanCounter = 0; + // Stealth strikes spawn four golden sparks on hit for (int t = 0; t < 4; t++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.2), 0f, projectile.owner); } Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/SearedPanSmash"), (int)projectile.position.X, (int)projectile.position.Y); - // Stealth strikes also cause any fireballs to home in on their targets + // Stealth strikes also cause any existing fireballs to home in on their targets + FireballStuff(true); + + if (!specialEffects) + return; + // Stealth strikes then summon five fireballs to circle the hit enemy, they will home in on their own after a second. + for (int t = 0; t < 5; t++) + { + int i = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(projectile.damage * 0.1), 0f, projectile.owner, 0f, targetIndex); + Main.projectile[i].ModProjectile().Timer = 61; + } + FireballPositions(targetIndex); + } + else if (PanType == SearedPanTypes.Golden) + { + modPlayer.searedPanCounter = 0; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/SearedPanSmash"), (int)projectile.position.X, (int)projectile.position.Y); + // Golden pans simply cause all fireballs to home in on their targets FireballStuff(true); } - else if (targetIndex != -1 && health > 0) + else if (PanType == SearedPanTypes.Normal && targetIndex != -1 && health > 0 && specialEffects) { // Summon three fireballs to circle the hit enemy for (int t = 0; t < 3; t++) { Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(projectile.damage * 0.1), 0f, projectile.owner, 0f, targetIndex); } - int fireballCount = 0; - // Count how many fireballs exist already around the given target - for (int i = 0; i < Main.maxProjectiles; i++) - { - // Keep the loop as short as possible - if (!Main.projectile[i].active || Main.projectile[i].owner != projectile.owner || !Main.projectile[i].Calamity().rogue || targetIndex != (int)Main.projectile[i].ai[1]) - continue; - if (Main.projectile[i].modProjectile is NiceCock) - { - if (Main.projectile[i].ModProjectile().homing) - continue; - fireballCount++; - } - } - // Adjust the angle of the existing fireballs around a target - float angleVariance = MathHelper.TwoPi / fireballCount; - float angle = 0f; - for (int i = 0; i < Main.maxProjectiles; i++) - { - if (!Main.projectile[i].active || Main.projectile[i].owner != projectile.owner || !Main.projectile[i].Calamity().rogue || targetIndex != (int)Main.projectile[i].ai[1]) - continue; - if (Main.projectile[i].modProjectile is NiceCock) - { - if (Main.projectile[i].ModProjectile().homing) - continue; - Main.projectile[i].ai[0] = angle; - Main.projectile[i].netUpdate = true; - angle += angleVariance; - } - } + FireballPositions(targetIndex); } } @@ -149,18 +147,52 @@ namespace CalamityMod.Projectiles.Rogue } } + private void FireballPositions(int targetIndex) + { + int fireballCount = 0; + // Count how many fireballs exist already around the given target + for (int i = 0; i < Main.maxProjectiles; i++) + { + // Keep the loop as short as possible + if (!Main.projectile[i].active || Main.projectile[i].owner != projectile.owner || !Main.projectile[i].Calamity().rogue || targetIndex != (int)Main.projectile[i].ai[1]) + continue; + if (Main.projectile[i].modProjectile is NiceCock) + { + if (Main.projectile[i].ModProjectile().homing) + continue; + fireballCount++; + } + } + // Adjust the angle of the existing fireballs around a target + float angleVariance = MathHelper.TwoPi / fireballCount; + float angle = 0f; + for (int i = 0; i < Main.maxProjectiles; i++) + { + if (!Main.projectile[i].active || Main.projectile[i].owner != projectile.owner || !Main.projectile[i].Calamity().rogue || targetIndex != (int)Main.projectile[i].ai[1]) + continue; + if (Main.projectile[i].modProjectile is NiceCock) + { + if (Main.projectile[i].ModProjectile().homing) + continue; + Main.projectile[i].ai[0] = angle; + Main.projectile[i].netUpdate = true; + angle += angleVariance; + } + } + } + public override bool OnTileCollide(Vector2 oldVelocity) { - // Kill all fireballs if you miss a stealth strike - if (projectile.Calamity().stealthStrike) + // Kill all fireballs if you miss a stealth strike or golden pan + if (PanType == SearedPanTypes.Golden || PanType == SearedPanTypes.StealthStrike) FireballStuff(false); return true; } public override Color? GetAlpha(Color lightColor) { - // Stealth strikes are golden colored - if (projectile.Calamity().stealthStrike) + // Stealth strikes and golden pans are golden colored + if (PanType == SearedPanTypes.Golden || PanType == SearedPanTypes.StealthStrike) return new Color(255, 222, 0); return null; } diff --git a/Projectiles/Summon/BelladonnaPetal.png b/Projectiles/Summon/BelladonnaPetal.png index 7eed93a980..ddd5d1aac1 100644 Binary files a/Projectiles/Summon/BelladonnaPetal.png and b/Projectiles/Summon/BelladonnaPetal.png differ diff --git a/Projectiles/Summon/BelladonnaSpirit.cs b/Projectiles/Summon/BelladonnaSpirit.cs index 7eaa0c7ad6..7905a16228 100644 --- a/Projectiles/Summon/BelladonnaSpirit.cs +++ b/Projectiles/Summon/BelladonnaSpirit.cs @@ -17,15 +17,15 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { DisplayName.SetDefault("Belladonna Spirit"); - Main.projFrames[projectile.type] = 4; + Main.projFrames[projectile.type] = 5; ProjectileID.Sets.MinionSacrificable[projectile.type] = true; ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; } public override void SetDefaults() { - projectile.width = 38; - projectile.height = 36; + projectile.width = 28; + projectile.height = 48; projectile.netImportant = true; projectile.friendly = true; projectile.minionSlots = 1; diff --git a/Projectiles/Summon/BelladonnaSpirit.png b/Projectiles/Summon/BelladonnaSpirit.png index 10ab7ca0a4..3f62956805 100644 Binary files a/Projectiles/Summon/BelladonnaSpirit.png and b/Projectiles/Summon/BelladonnaSpirit.png differ diff --git a/Projectiles/Summon/IceSentry.cs b/Projectiles/Summon/IceSentry.cs index b41df48151..d118f88681 100644 --- a/Projectiles/Summon/IceSentry.cs +++ b/Projectiles/Summon/IceSentry.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetDefaults() { - projectile.width = 102; + projectile.width = 94; projectile.height = 94; projectile.timeLeft = Projectile.SentryLifeTime; projectile.ignoreWater = true; diff --git a/Projectiles/Summon/IceSentry.png b/Projectiles/Summon/IceSentry.png index ddbce1dbb9..76390915a6 100644 Binary files a/Projectiles/Summon/IceSentry.png and b/Projectiles/Summon/IceSentry.png differ diff --git a/Projectiles/Summon/SiriusMinion.png b/Projectiles/Summon/SiriusMinion.png index dd846897b8..a37b045183 100644 Binary files a/Projectiles/Summon/SiriusMinion.png and b/Projectiles/Summon/SiriusMinion.png differ diff --git a/Projectiles/Summon/StormjawBaby.cs b/Projectiles/Summon/StormjawBaby.cs index b691a22377..231b1414ba 100644 --- a/Projectiles/Summon/StormjawBaby.cs +++ b/Projectiles/Summon/StormjawBaby.cs @@ -14,6 +14,9 @@ namespace CalamityMod.Projectiles.Summon { public float dust = 0f; private int sparkCounter = 0; + private int targetIndex = -1; + private Vector2 idlePos = Vector2.Zero; + public Player player => Main.player[projectile.owner]; public override void SetStaticDefaults() { @@ -40,13 +43,27 @@ namespace CalamityMod.Projectiles.Summon public override void AI() { - Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - CalamityGlobalProjectile modProj = projectile.Calamity(); + OnSpawn(); + SummonChecks(); + + idlePos = player.Center; + idlePos.X -= (15f + player.width / 2f) * player.direction; + idlePos.X -= projectile.minionPos * 40f * player.direction; + + FindTarget(); + FlyBackToPlayer(); + AttackTarget(); + GoToTarget(); + IdleBehavior(); + } + + private void OnSpawn() + { + // Handle stuff on spawn & variable damage if (dust == 0f) { - modProj.spawnedPlayerMinionDamageValue = player.MinionDamage(); - modProj.spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage(); + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int dustAmt = 36; for (int d = 0; d < dustAmt; d++) { @@ -60,31 +77,35 @@ namespace CalamityMod.Projectiles.Summon } dust += 1f; } - if (player.MinionDamage() != modProj.spawnedPlayerMinionDamageValue) + } + + private void SummonChecks() + { + if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)((float)modProj.spawnedPlayerMinionProjectileDamageValue / - modProj.spawnedPlayerMinionDamageValue * player.MinionDamage()); + int damage2 = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue * player.MinionDamage()); projectile.damage = damage2; } + bool projTypeCheck = projectile.type == ModContent.ProjectileType(); player.AddBuff(ModContent.BuffType(), 3600); if (projTypeCheck) { if (player.dead) { - modPlayer.stormjaw = false; + player.Calamity().stormjaw = false; } - if (modPlayer.stormjaw) + if (player.Calamity().stormjaw) { projectile.timeLeft = 2; } } + } - Vector2 idlePos = player.Center; - idlePos.X -= (15f + player.width / 2f) * player.direction; - idlePos.X -= projectile.minionPos * 40f * player.direction; - - int targetIndex = -1; + private void FindTarget() + { + targetIndex = -1; float maxDistance = 800f; if (projectile.ai[0] == 0f) //find target { @@ -115,6 +136,10 @@ namespace CalamityMod.Projectiles.Summon } } } + } + + private void FlyBackToPlayer() + { if (projectile.ai[0] == 1f) //returning to player { projectile.tileCollide = false; @@ -216,6 +241,10 @@ namespace CalamityMod.Projectiles.Summon projectile.spriteDirection = -1; projectile.rotation = projectile.velocity.ToRotation() + projectile.spriteDirection != 1 ? MathHelper.Pi : 0f; } + } + + private void AttackTarget() + { if (projectile.ai[0] == 2f) //attack target { projectile.spriteDirection = -projectile.direction; @@ -286,6 +315,47 @@ namespace CalamityMod.Projectiles.Summon return; } } + else + { + Rectangle rectangle = new Rectangle((int)(projectile.position.X + projectile.velocity.X * 0.5f - 4f), (int)(projectile.position.Y + projectile.velocity.Y * 0.5f - 4f), projectile.width + 8, projectile.height + 8); + for (int i = 0; i < Main.maxNPCs; i++) + { + NPC npc = Main.npc[i]; + if (npc.CanBeChasedBy(projectile, false) && npc.immune[projectile.owner] <= 0) + { + Rectangle rect = npc.getRect(); + if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc))) + { + sparkCounter += Main.rand.Next(1,3); + if (sparkCounter >= 20) + { + if (Main.myPlayer == projectile.owner) + { + for (int j = 0; j < Main.rand.Next(1,4); j++) + { + Vector2 sparkS = new Vector2(Main.rand.NextFloat(-5f, 5f), Main.rand.NextFloat(-5f, 5f)); + int spark = Projectile.NewProjectile(projectile.Center, sparkS, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner); + if (spark.WithinBounds(Main.maxProjectiles)) + { + Main.projectile[spark].Calamity().forceMinion = true; + Main.projectile[spark].timeLeft = 120; + Main.projectile[spark].penetrate = 3; + Main.projectile[spark].usesIDStaticNPCImmunity = true; + Main.projectile[spark].idStaticNPCHitCooldown = 10; + Main.projectile[spark].usesLocalNPCImmunity = false; + } + } + sparkCounter = 0; + } + } + } + } + } + } + } + + private void GoToTarget() + { if (targetIndex >= 0) //go to target { float rangeofSight = 700f; @@ -320,6 +390,10 @@ namespace CalamityMod.Projectiles.Summon projectile.netUpdate = true; } } + } + + private void IdleBehavior() + { if (projectile.ai[0] == 0f && targetIndex < 0) //passive AI { if (sparkCounter > 0) @@ -329,8 +403,10 @@ namespace CalamityMod.Projectiles.Summon float sepAnxietyDist = 500f; Vector2 playerDist = player.Center - projectile.Center; + // Teleport to the player if too far if (playerDist.Length() > 2000f) projectile.position = player.Center - projectile.Size / 2f; + // Fly back if too far from the player else if (playerDist.Length() > sepAnxietyDist || Math.Abs(playerDist.Y) > 300f) { projectile.ai[0] = 1f; @@ -341,26 +417,27 @@ namespace CalamityMod.Projectiles.Summon projectile.velocity.Y = 0f; } } + if (projectile.ai[0] == 0f) { projectile.tileCollide = true; float accelFast = 0.5f; float maxSpeed = 4f; - float num3 = 4f; + float xVel = 4f; float accelSlow = 0.1f; - if (num3 < Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y)) + if (xVel < Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y)) { - num3 = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y); + xVel = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y); accelFast = 0.7f; } - int num7 = 0; + int direction = 0; bool flag3 = false; float idleDist = idlePos.X - projectile.Center.X; if (Math.Abs(idleDist) > 5f) { if (idleDist < 0f) { - num7 = -1; + direction = -1; if (projectile.velocity.X > -maxSpeed) { projectile.velocity.X -= accelFast; @@ -372,7 +449,7 @@ namespace CalamityMod.Projectiles.Summon } else { - num7 = 1; + direction = 1; if (projectile.velocity.X < maxSpeed) { projectile.velocity.X += accelFast; @@ -389,12 +466,12 @@ namespace CalamityMod.Projectiles.Summon if (Math.Abs(projectile.velocity.X) < accelFast * 2f) projectile.velocity.X = 0.0f; } - if (num7 != 0) + if (direction != 0) { - int num9 = (int)projectile.Center.X / 16; - int num10 = (int)projectile.position.Y / 16; - int x = num9 + num7 + (int) projectile.velocity.X; - for (int y = num10; y < num10 + projectile.height / 16 + 1; ++y) + int xPos = (int)projectile.Center.X / 16; + int yPos = (int)projectile.position.Y / 16; + int x = xPos + direction + (int) projectile.velocity.X; + for (int y = yPos; y < yPos + projectile.height / 16 + 1; ++y) { if (WorldGen.SolidTile(x, y)) flag3 = true; @@ -407,25 +484,25 @@ namespace CalamityMod.Projectiles.Summon { int x = (int)projectile.Center.X / 16; if (i == 0) - x = (int)projectile.position.X / 16; + x = (int)projectile.Left.X / 16; if (i == 2) - x = (int)(projectile.position.X + projectile.width) / 16; + x = (int)projectile.Right.X / 16; int y = (int)projectile.Bottom.Y / 16; Tile tile = Main.tile[x, y]; if (WorldGen.SolidTile(x, y) || tile.halfBrick() || tile.slope() > 0 || TileID.Sets.Platforms[tile.type] && tile.active() && !tile.inActive()) { try { - int num9 = (int)projectile.Center.X / 16; - int num10 = (int)projectile.Center.Y / 16; - int i2 = num9 + num7 + (int)projectile.velocity.X; - if (!WorldGen.SolidTile(i2, num10 - 1) && !WorldGen.SolidTile(i2, num10 - 2)) + int xPos = (int)projectile.Center.X / 16; + int yPos = (int)projectile.Center.Y / 16; + int i2 = xPos + direction + (int)projectile.velocity.X; + if (!WorldGen.SolidTile(i2, yPos - 1) && !WorldGen.SolidTile(i2, yPos - 2)) projectile.velocity.Y = -5.1f; - else if (!WorldGen.SolidTile(i2, num10 - 2)) + else if (!WorldGen.SolidTile(i2, yPos - 2)) projectile.velocity.Y = -7.1f; - else if (WorldGen.SolidTile(i2, num10 - 5)) + else if (WorldGen.SolidTile(i2, yPos - 5)) projectile.velocity.Y = -11.1f; - else if (WorldGen.SolidTile(i2, num10 - 4)) + else if (WorldGen.SolidTile(i2, yPos - 4)) projectile.velocity.Y = -10.1f; else projectile.velocity.Y = -9.1f; @@ -437,17 +514,17 @@ namespace CalamityMod.Projectiles.Summon } } } - if (projectile.velocity.X > num3) - projectile.velocity.X = num3; - if (projectile.velocity.X < -num3) - projectile.velocity.X = -num3; + if (projectile.velocity.X > xVel) + projectile.velocity.X = xVel; + if (projectile.velocity.X < -xVel) + projectile.velocity.X = -xVel; if (projectile.velocity.X < 0f) projectile.direction = -1; if (projectile.velocity.X > 0f) projectile.direction = 1; - if (projectile.velocity.X > accelFast && num7 == 1) + if (projectile.velocity.X > accelFast && direction == 1) projectile.direction = 1; - if (projectile.velocity.X < -accelFast && num7 == -1) + if (projectile.velocity.X < -accelFast && direction == -1) projectile.direction = -1; projectile.spriteDirection = -projectile.direction; projectile.rotation = 0f; @@ -490,48 +567,14 @@ namespace CalamityMod.Projectiles.Summon if (projectile.velocity.Y > 10f) projectile.velocity.Y = 10f; } - if (projectile.ai[0] != 2f) - { - Rectangle rectangle = new Rectangle((int)(projectile.position.X + projectile.velocity.X * 0.5f - 4f), (int)(projectile.position.Y + projectile.velocity.Y * 0.5f - 4f), projectile.width + 8, projectile.height + 8); - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC npc = Main.npc[i]; - if (npc.CanBeChasedBy(projectile, false) && npc.immune[projectile.owner] <= 0) - { - Rectangle rect = npc.getRect(); - if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc))) - { - sparkCounter += Main.rand.Next(1,3); - if (sparkCounter >= 20) - { - if (Main.myPlayer == projectile.owner) - { - for (int j = 0; j < Main.rand.Next(1,4); j++) - { - Vector2 sparkS = new Vector2(Main.rand.NextFloat(-5f, 5f), Main.rand.NextFloat(-5f, 5f)); - int spark = Projectile.NewProjectile(projectile.Center, sparkS, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner); - if (spark.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[spark].Calamity().forceMinion = true; - Main.projectile[spark].timeLeft = 120; - Main.projectile[spark].penetrate = 3; - Main.projectile[spark].usesIDStaticNPCImmunity = true; - Main.projectile[spark].idStaticNPCHitCooldown = 10; - Main.projectile[spark].usesLocalNPCImmunity = false; - } - } - sparkCounter = 0; - } - } - } - } - } - } } public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough) { - fallThrough = false; + if (targetIndex < 0) + fallThrough = projectile.Bottom.Y < player.Top.Y; + else + fallThrough = projectile.Bottom.Y < Main.npc[targetIndex].Top.Y; return true; } diff --git a/Skies/CryogenSky.cs b/Skies/CryogenSky.cs index bd4fd5ca4f..d67c777d02 100644 --- a/Skies/CryogenSky.cs +++ b/Skies/CryogenSky.cs @@ -18,90 +18,115 @@ namespace CalamityMod.Skies public Vector2 Center; public SpriteEffects DirectionEffect; } - private int cryogenIndex = -1; - private float fadeIn = 0f; - private float fadeOut = 0f; - private CryogenAurora[] Auroras; + public int CryogenIndex = -1; + public float FadeInCountdown = 0f; + public float FadeoutTimer = 0f; + public CryogenAurora[] Auroras; + + public static bool ShouldDrawRegularly; - internal const int TimePerRotation = 75; internal static Texture2D AuroraTexture => ModContent.GetTexture("CalamityMod/ExtraTextures/AuroraTexture"); + public static void UpdateDrawEligibility() + { + bool useEffect = NPC.AnyNPCs(ModContent.NPCType()) || ShouldDrawRegularly; + + if (SkyManager.Instance["CalamityMod:Cryogen"] != null && useEffect != SkyManager.Instance["CalamityMod:Cryogen"].IsActive()) + { + if (useEffect) + SkyManager.Instance.Activate("CalamityMod:Cryogen"); + else + SkyManager.Instance.Deactivate("CalamityMod:Cryogen"); + } + + if (ShouldDrawRegularly) + ShouldDrawRegularly = false; + } + public override void Update(GameTime gameTime) { - if (fadeIn > 0) - fadeIn--; + if (FadeInCountdown > 0) + FadeInCountdown--; - if (cryogenIndex == -1) + if (CryogenIndex == -1 && !ShouldDrawRegularly) { UpdateCryogenIndex(); - if (fadeOut == 0) - fadeOut = 45f; - fadeOut--; - if (fadeOut <= 0f) + if (FadeoutTimer == 0) + FadeoutTimer = 45f; + FadeoutTimer--; + if (FadeoutTimer <= 0f) Deactivate(); } + + float auroraStrength = CalculateAuroraStrength(); for (int i = 0; i < Auroras.Length; i++) { Vector2 centerRange = new Vector2(Main.screenWidth * 0.5f, Main.screenHeight * 0.1f / Auroras[i].Depth); Auroras[i].Center = centerRange * (Auroras[i].CenterOffsetRatio * MathHelper.TwoPi).ToRotationVector2() + Vector2.UnitX * Main.screenWidth * 0.5f; Auroras[i].Center.Y -= 180f + (float)Math.Cos(Main.GlobalTime * 1.2f + Auroras[i].CenterOffsetRatio * MathHelper.Pi) * 50f; - Auroras[i].CenterOffsetRatio += 1f / 1800f * MathHelper.Lerp(0.2f, 1f, 1f - GetCryogenLifeRatio()) * (float)Math.Sin(Main.GlobalTime * 0.9f); + Auroras[i].CenterOffsetRatio += 1f / 1800f * MathHelper.Lerp(0.2f, 1f, auroraStrength) * (float)Math.Sin(Main.GlobalTime * 0.9f); } } - private float GetCryogenLifeRatio() + public float GetCryogenLifeRatio() { if (UpdateCryogenIndex()) { - float localIntensity = 0f; - if (cryogenIndex != -1) - { - localIntensity = Main.npc[cryogenIndex].life / (float)Main.npc[cryogenIndex].lifeMax; - } - return localIntensity; + float lifeRatio = 0f; + if (CryogenIndex != -1) + lifeRatio = Main.npc[CryogenIndex].life / (float)Main.npc[CryogenIndex].lifeMax; + + return lifeRatio; } return 0f; } - private bool UpdateCryogenIndex() + public float CalculateAuroraStrength() + { + if (ShouldDrawRegularly) + return 1f; + + return 1f - GetCryogenLifeRatio(); + } + + public bool UpdateCryogenIndex() { int cryogenType = ModContent.NPCType(); - if (cryogenIndex >= 0 && Main.npc[cryogenIndex].active && Main.npc[cryogenIndex].type == cryogenType) - { + if (CryogenIndex >= 0 && Main.npc[CryogenIndex].active && Main.npc[CryogenIndex].type == cryogenType) return true; - } - cryogenIndex = -1; + + CryogenIndex = -1; for (int i = 0; i < Main.npc.Length; i++) { if (Main.npc[i].active && Main.npc[i].type == cryogenType) { - cryogenIndex = i; + CryogenIndex = i; break; } } - return cryogenIndex != -1; + return CryogenIndex != -1; } public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) { if (maxDepth >= float.MaxValue && minDepth < float.MaxValue) { - float drawPower = 1f - GetCryogenLifeRatio(); + float auroraStrength = CalculateAuroraStrength(); for (int i = 0; i < Auroras.Length; i++) { - float hue = 0.5f + Auroras[i].ColorHueOffset * 0.5f * MathHelper.Lerp(0.15f, 0.95f, drawPower); + float hue = 0.5f + Auroras[i].ColorHueOffset * 0.5f * MathHelper.Lerp(0.15f, 0.95f, auroraStrength); hue += (float)Math.Cos(Main.GlobalTime * 1.2f) * 0.25f; hue %= 1f; float scale = 1.4f / Auroras[i].Depth; scale += (float)Math.Cos(Main.GlobalTime * 0.7f + Auroras[i].CenterOffsetRatio * MathHelper.TwoPi) * 0.2f; Color auroraColor = Main.hslToRgb(hue, 1f, 0.825f) * 0.85f; - auroraColor *= MathHelper.Lerp(0.3f, 1f, drawPower); + auroraColor *= MathHelper.Lerp(0.3f, 1f, auroraStrength); - if (fadeIn > 0f) - auroraColor *= Utils.InverseLerp(45f, 0f, fadeIn); - if (fadeOut > 0f) - auroraColor *= Utils.InverseLerp(0f, 45f, fadeOut); + if (FadeInCountdown > 0f) + auroraColor *= Utils.InverseLerp(45f, 0f, FadeInCountdown); + if (FadeoutTimer > 0f) + auroraColor *= Utils.InverseLerp(0f, 45f, FadeoutTimer); if (Main.dayTime) auroraColor *= 0.4f; @@ -126,7 +151,7 @@ namespace CalamityMod.Skies public override void Activate(Vector2 position, params object[] args) { - fadeIn = 45f; + FadeInCountdown = 45f; Auroras = new CryogenAurora[150]; for (int i = 0; i < Auroras.Length; i++) { @@ -137,11 +162,10 @@ namespace CalamityMod.Skies } } - public override void Deactivate(params object[] args) - { - } + public override void Reset() { } - public override void Reset() { } // a - public override bool IsActive() => (cryogenIndex != -1 || fadeOut > 0 || fadeIn > 0) && !Main.gameMenu; + public override void Deactivate(params object[] args) { } + + public override bool IsActive() => (CryogenIndex != -1 || FadeoutTimer > 0 || FadeInCountdown > 0) && !Main.gameMenu; } } diff --git a/Tiles/DraedonStructures/AgedLaboratoryDoorClosed.png b/Tiles/DraedonStructures/AgedLaboratoryDoorClosed.png index 95d6be2a76..9c9a428add 100644 Binary files a/Tiles/DraedonStructures/AgedLaboratoryDoorClosed.png and b/Tiles/DraedonStructures/AgedLaboratoryDoorClosed.png differ diff --git a/Tiles/DraedonStructures/AgedLaboratoryDoorClosed_Highlight.png b/Tiles/DraedonStructures/AgedLaboratoryDoorClosed_Highlight.png index 6e7c679e06..5bddc040bd 100644 Binary files a/Tiles/DraedonStructures/AgedLaboratoryDoorClosed_Highlight.png and b/Tiles/DraedonStructures/AgedLaboratoryDoorClosed_Highlight.png differ diff --git a/Tiles/DraedonStructures/AgedLaboratoryDoorOpen.png b/Tiles/DraedonStructures/AgedLaboratoryDoorOpen.png index f81ecd2a79..bf15a23f2d 100644 Binary files a/Tiles/DraedonStructures/AgedLaboratoryDoorOpen.png and b/Tiles/DraedonStructures/AgedLaboratoryDoorOpen.png differ diff --git a/Tiles/DraedonStructures/AgedLaboratoryDoorOpen_Highlight.png b/Tiles/DraedonStructures/AgedLaboratoryDoorOpen_Highlight.png index 67d4102d82..db5e0740ae 100644 Binary files a/Tiles/DraedonStructures/AgedLaboratoryDoorOpen_Highlight.png and b/Tiles/DraedonStructures/AgedLaboratoryDoorOpen_Highlight.png differ diff --git a/Tiles/DraedonStructures/LaboratoryDoorClosed.png b/Tiles/DraedonStructures/LaboratoryDoorClosed.png index 7e05cf6076..15e66321c3 100644 Binary files a/Tiles/DraedonStructures/LaboratoryDoorClosed.png and b/Tiles/DraedonStructures/LaboratoryDoorClosed.png differ diff --git a/Tiles/DraedonStructures/LaboratoryDoorClosed_Highlight.png b/Tiles/DraedonStructures/LaboratoryDoorClosed_Highlight.png index 6e7c679e06..5bddc040bd 100644 Binary files a/Tiles/DraedonStructures/LaboratoryDoorClosed_Highlight.png and b/Tiles/DraedonStructures/LaboratoryDoorClosed_Highlight.png differ diff --git a/Tiles/DraedonStructures/LaboratoryDoorOpen.png b/Tiles/DraedonStructures/LaboratoryDoorOpen.png index e2756de99d..90794cfcbf 100644 Binary files a/Tiles/DraedonStructures/LaboratoryDoorOpen.png and b/Tiles/DraedonStructures/LaboratoryDoorOpen.png differ diff --git a/Tiles/DraedonStructures/LaboratoryDoorOpen_Highlight.png b/Tiles/DraedonStructures/LaboratoryDoorOpen_Highlight.png index 67d4102d82..db5e0740ae 100644 Binary files a/Tiles/DraedonStructures/LaboratoryDoorOpen_Highlight.png and b/Tiles/DraedonStructures/LaboratoryDoorOpen_Highlight.png differ diff --git a/Tiles/MonsterBanner.cs b/Tiles/MonsterBanner.cs index 7ecc55890d..483bec02db 100644 --- a/Tiles/MonsterBanner.cs +++ b/Tiles/MonsterBanner.cs @@ -31,394 +31,9 @@ namespace CalamityMod.Tiles public override void KillMultiTile(int i, int j, int frameX, int frameY) { int style = frameX / 18; - string item; - switch (style) - { - case 0: - item = "AquaticParasiteBanner"; - break; - case 1: - item = "FlounderBanner"; - break; - case 2: - item = "GnasherBanner"; - break; - case 3: - item = "TrasherBanner"; - break; - case 4: - item = "CatfishBanner"; - break; - case 5: - item = "MaulerBanner"; - break; - case 6: - item = "AquaticSeekerBanner"; - break; - case 7: - item = "AquaticUrchinBanner"; - break; - case 8: - item = "FrogfishBanner"; - break; - case 9: - item = "MantisShrimpBanner"; - break; - case 10: - item = "AquaticAberrationBanner"; - break; - case 11: - item = "ParaseaBanner"; - break; - case 12: - item = "SeaUrchinBanner"; - break; - case 13: - item = "BoxJellyfishBanner"; - break; - case 14: - item = "MorayEelBanner"; - break; - case 15: - item = "DevilFishBanner"; - break; - case 16: - item = "CuttlefishBanner"; - break; - case 17: - item = "ToxicMinnowBanner"; - break; - case 18: - item = "ViperfishBanner"; - break; - case 19: - item = "LuminousCorvinaBanner"; - break; - case 20: - item = "GiantSquidBanner"; - break; - case 21: - item = "LaserfishBanner"; - break; - case 22: - item = "OarfishBanner"; - break; - case 23: - item = "ColossalSquidBanner"; - break; - case 24: - item = "MirageJellyBanner"; - break; - case 25: - item = "EidolistBanner"; - break; - case 26: - item = "GulperEelBanner"; - break; - case 27: - item = "EidolonWyrmJuvenileBanner"; - break; - case 28: - item = "BloatfishBanner"; - break; - case 29: - item = "BobbitWormBanner"; - break; - case 30: - item = "ChaoticPufferBanner"; - break; - case 31: - item = "AstralProbeBanner"; - break; - case 32: - item = "SmallSightseerBanner"; - break; - case 33: - item = "BigSightseerBanner"; - break; - case 34: - item = "AriesBanner"; - break; - case 35: - item = "AstralSlimeBanner"; - break; - case 36: - item = "AtlasBanner"; - break; - case 37: - item = "MantisBanner"; - break; - case 38: - item = "NovaBanner"; - break; - case 39: - item = "AstralachneaBanner"; - break; - case 40: - item = "HiveBanner"; - break; - case 41: - item = "StellarCullexBanner"; - break; - case 42: - item = "FusionFeederBanner"; - break; - case 43: - item = "HadarianBanner"; - break; - case 44: - item = "HeatSpiritBanner"; - break; - case 45: - item = "ScryllarBanner"; - break; - case 46: - item = "DespairStoneBanner"; - break; - case 47: - item = "SoulSlurperBanner"; - break; - case 48: - item = "ImpiousImmolatorBanner"; - break; - case 49: - item = "ScornEaterBanner"; - break; - case 50: - item = "ProfanedEnergyBanner"; - break; - case 51: - item = "WulfrumSlimeBanner"; - break; - case 52: - item = "WulfrumDroneBanner"; - break; - case 53: - item = "PitbullBanner"; - break; - case 54: - item = "BlightedEyeBanner"; - break; - case 55: - item = "CalamityEyeBanner"; - break; - case 56: - item = "SunskaterBanner"; - break; - case 57: - item = "ShockstormShuttleBanner"; - break; - case 58: - item = "CloudElementalBanner"; - break; - case 59: - item = "AngryDogBanner"; - break; - case 60: - item = "CryonBanner"; - break; - case 61: - item = "IceClasperBanner"; - break; - case 62: - item = "StormlionBanner"; - break; - case 63: - item = "CnidrionBanner"; - break; - case 64: - item = "SandTortoiseBanner"; - break; - case 65: - item = "GreatSandSharkBanner"; - break; - case 66: - item = "AmethystCrawlerBanner"; - break; - case 67: - item = "TopazCrawlerBanner"; - break; - case 68: - item = "SapphireCrawlerBanner"; - break; - case 69: - item = "EmeraldCrawlerBanner"; - break; - case 70: - item = "RubyCrawlerBanner"; - break; - case 71: - item = "DiamondCrawlerBanner"; - break; - case 72: - item = "AmberCrawlerBanner"; - break; - case 73: - item = "CrystalCrawlerBanner"; - break; - case 74: - item = "SunBatBanner"; - break; - case 75: - item = "CosmicElementalBanner"; - break; - case 76: - item = "EarthElementalBanner"; - break; - case 77: - item = "ArmoredDiggerBanner"; - break; - case 78: - item = "MelterBanner"; - break; - case 79: - item = "PestilentSlimeBanner"; - break; - case 80: - item = "PlagueshellBanner"; - break; - case 81: - item = "PlagueChargerBanner"; - break; - case 82: - item = "VirulingBanner"; - break; - case 83: - item = "PlaguebringerBanner"; - break; - case 84: - item = "PhantomSpiritBanner"; - break; - case 85: - item = "OverloadedSoldierBanner"; - break; - case 86: - item = "PhantomDebrisBanner"; - break; - case 87: - item = "BOHLDOHRBanner"; - break; - case 88: - item = "EbonianBlightSlimeBanner"; - break; - case 89: - item = "CrimulanBlightSlimeBanner"; - break; - case 90: - item = "AeroSlimeBanner"; - break; - case 91: - item = "CryoSlimeBanner"; - break; - case 92: - item = "PerennialSlimeBanner"; - break; - case 93: - item = "CharredSlimeBanner"; - break; - case 94: - item = "BloomSlimeBanner"; - break; - case 95: - item = "CultistAssassinBanner"; - break; - case 96: - item = "ReaperSharkBanner"; - break; - case 97: - item = "IrradiatedSlimeBanner"; - break; - case 98: - item = "PrismTurtleBanner"; - break; - case 99: - item = "ClamBanner"; - break; - case 100: - item = "EutrophicRayBanner"; - break; - case 101: - item = "GhostBellBanner"; - break; - case 102: - item = "GhostBellSmallBanner"; - break; - case 103: - item = "SeaFloatyBanner"; - break; - case 104: - item = "BlindedAnglerBanner"; - break; - case 105: - item = "SeaMinnowBanner"; - break; - case 106: - item = "SeaSerpentBanner"; - break; - case 107: - item = "GiantClamBanner"; - break; - case 108: - item = "PiggyBanner"; - break; - case 109: - item = "FearlessGoldfishWarriorBanner"; - break; - case 110: - item = "RadiatorBanner"; - break; - case 111: - item = "TrilobiteBanner"; - break; - case 112: - item = "OrthoceraBanner"; - break; - case 113: - item = "SkyfinBanner"; - break; - case 114: - item = "WaterLeechBanner"; - break; - case 115: - item = "AcidEelBanner"; - break; - case 116: - item = "NuclearToadBanner"; - break; - case 117: - item = "FlakCrabBanner"; - break; - case 118: - item = "SulfurousSkaterBanner"; - break; - case 119: - item = "FlakBabyBanner"; - break; - case 120: - item = "AnthozoanCrabBanner"; - break; - case 121: - item = "BelchingCoralBanner"; - break; - case 122: - item = "GammaSlimeBanner"; - break; - case 123: - item = "WulfrumGyratorBanner"; - break; - case 124: - item = "WulfrumHovercraftBanner"; - break; - case 125: - item = "WulfrumRoverBanner"; - break; - case 126: - item = "WulfrumPylonBanner"; - break; - default: - return; - } - Item.NewItem(i * 16, j * 16, 16, 48, mod.ItemType(item)); + int banner = CalamityUtils.GetBannerItem(style); + if (banner != -1) + Item.NewItem(i * 16, j * 16, 16, 48, banner); } public override void NearbyEffects(int i, int j, bool closer) @@ -430,393 +45,10 @@ namespace CalamityMod.Tiles return; int style = Main.tile[i, j].frameX / 18; - string type; - switch (style) - { - case 0: - type = "AquaticParasite"; - break; - case 1: - type = "Flounder"; - break; - case 2: - type = "Gnasher"; - break; - case 3: - type = "Trasher"; - break; - case 4: - type = "Catfish"; - break; - case 5: - type = "Mauler"; - break; - case 6: - type = "AquaticSeekerHead"; - break; - case 7: - type = "AquaticUrchin"; - break; - case 8: - type = "Frogfish"; - break; - case 9: - type = "MantisShrimp"; - break; - case 10: - type = "AquaticAberration"; - break; - case 11: - type = "Parasea"; - break; - case 12: - type = "SeaUrchin"; - break; - case 13: - type = "BoxJellyfish"; - break; - case 14: - type = "MorayEel"; - break; - case 15: - type = "DevilFish"; - break; - case 16: - type = "Cuttlefish"; - break; - case 17: - type = "ToxicMinnow"; - break; - case 18: - type = "Viperfish"; - break; - case 19: - type = "LuminousCorvina"; - break; - case 20: - type = "GiantSquid"; - break; - case 21: - type = "Laserfish"; - break; - case 22: - type = "OarfishHead"; - break; - case 23: - type = "ColossalSquid"; - break; - case 24: - type = "MirageJelly"; - break; - case 25: - type = "Eidolist"; - break; - case 26: - type = "GulperEelHead"; - break; - case 27: - type = "EidolonWyrmHead"; - break; - case 28: - type = "Bloatfish"; - break; - case 29: - type = "BobbitWormHead"; - break; - case 30: - type = "ChaoticPuffer"; - break; - case 31: - type = "AstralProbe"; - break; - case 32: - type = "SmallSightseer"; - break; - case 33: - type = "BigSightseer"; - break; - case 34: - type = "Aries"; - break; - case 35: - type = "AstralSlime"; - break; - case 36: - type = "Atlas"; - break; - case 37: - type = "Mantis"; - break; - case 38: - type = "Nova"; - break; - case 39: - type = "AstralachneaGround"; - break; - case 40: - type = "Hive"; - break; - case 41: - type = "StellarCulex"; - break; - case 42: - type = "FusionFeeder"; - break; - case 43: - type = "Hadarian"; - break; - case 44: - type = "HeatSpirit"; - break; - case 45: - type = "Scryllar"; - break; - case 46: - type = "DespairStone"; - break; - case 47: - type = "SoulSlurper"; - break; - case 48: - type = "ImpiousImmolator"; - break; - case 49: - type = "ScornEater"; - break; - case 50: - type = "ProfanedEnergyBody"; - break; - case 52: - type = "WulfrumDrone"; - break; - case 53: - type = "Pitbull"; - break; - case 54: - type = "BlightedEye"; - break; - case 55: - type = "CalamityEye"; - break; - case 56: - type = "Sunskater"; - break; - case 57: - type = "ShockstormShuttle"; - break; - case 58: - type = "ThiccWaifu"; - break; - case 59: - type = "AngryDog"; - break; - case 60: - type = "Cryon"; - break; - case 61: - type = "IceClasper"; - break; - case 62: - type = "StormlionCharger"; - break; - case 63: - type = "Cnidrion"; - break; - case 64: - type = "SandTortoise"; - break; - case 65: - type = "GreatSandShark"; - break; - case 66: - type = "CrawlerAmethyst"; - break; - case 67: - type = "CrawlerTopaz"; - break; - case 68: - type = "CrawlerSapphire"; - break; - case 69: - type = "CrawlerEmerald"; - break; - case 70: - type = "CrawlerRuby"; - break; - case 71: - type = "CrawlerDiamond"; - break; - case 72: - type = "CrawlerAmber"; - break; - case 73: - type = "CrawlerCrystal"; - break; - case 74: - type = "SunBat"; - break; - case 75: - type = "CosmicElemental"; - break; - case 76: - type = "Horse"; - break; - case 77: - type = "ArmoredDiggerHead"; - break; - case 78: - type = "PlaguedFlyingFox"; - break; - case 79: - type = "PlaguedJungleSlime"; - break; - case 80: - type = "PlaguedTortoise"; - break; - case 81: - type = "PlagueBee"; - break; - case 82: - type = "PlaguedDerpling"; - break; - case 83: - type = "PlaguebringerShade"; - break; - case 84: - type = "PhantomSpirit"; - break; - case 85: - type = "OverloadedSoldier"; - break; - case 86: - type = "PhantomDebris"; - break; - case 87: - type = "Bohldohr"; - break; - case 88: - type = "EbonianBlightSlime"; - break; - case 89: - type = "CrimulanBlightSlime"; - break; - case 90: - type = "AeroSlime"; - break; - case 91: - type = "CryoSlime"; - break; - case 92: - type = "PerennialSlime"; - break; - case 93: - type = "CharredSlime"; - break; - case 94: - type = "BloomSlime"; - break; - case 95: - type = "CultistAssassin"; - break; - case 96: - type = "Reaper"; - break; - case 97: - type = "IrradiatedSlime"; - break; - case 98: - type = "PrismTurtle"; - break; - case 99: - type = "Clam"; - break; - case 100: - type = "EutrophicRay"; - break; - case 101: - type = "GhostBell"; - break; - case 102: - type = "GhostBellSmall"; - break; - case 103: - type = "SeaFloaty"; - break; - case 104: - type = "BlindedAngler"; - break; - case 105: - type = "SeaMinnow"; - break; - case 106: - type = "SeaSerpent1"; - break; - case 107: - type = "GiantClam"; - break; - case 108: - type = "Piggy"; - break; - case 109: - type = "FearlessGoldfishWarrior"; - break; - case 110: - type = "Radiator"; - break; - case 111: - type = "Trilobite"; - break; - case 112: - type = "Orthocera"; - break; - case 113: - type = "Skyfin"; - break; - case 114: - type = "WaterLeech"; - break; - case 115: - type = "AcidEel"; - break; - case 116: - type = "NuclearToad"; - break; - case 117: - type = "FlakCrab"; - break; - case 118: - type = "SulfurousSkater"; - break; - case 119: - type = "FlakBaby"; - break; - case 120: - type = "AnthozoanCrab"; - break; - case 121: - type = "BelchingCoral"; - break; - case 122: - type = "GammaSlime"; - break; - case 123: - type = "WulfrumGyrator"; - break; - case 124: - type = "WulfrumHovercraft"; - break; - case 125: - type = "WulfrumRover"; - break; - case 126: - type = "WulfrumPylon"; - break; - default: - return; - } - if (type.Length > 0) + int npc = CalamityUtils.GetBannerNPC(style); + if (npc != -1) { - player.NPCBannerBuff[mod.NPCType(type)] = true; + player.NPCBannerBuff[npc] = true; player.hasBanner = true; } } diff --git a/Utilities/MiscUtils.cs b/Utilities/MiscUtils.cs index 5ced6652fa..c84df23fda 100644 --- a/Utilities/MiscUtils.cs +++ b/Utilities/MiscUtils.cs @@ -1,4 +1,16 @@ +using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Tools.ClimateChange; +using CalamityMod.NPCs.Abyss; +using CalamityMod.NPCs.AcidRain; +using CalamityMod.NPCs.AquaticScourge; +using CalamityMod.NPCs.Astral; +using CalamityMod.NPCs.Crags; +using CalamityMod.NPCs.GreatSandShark; +using CalamityMod.NPCs.Leviathan; +using CalamityMod.NPCs.NormalNPCs; +using CalamityMod.NPCs.PlagueEnemies; +using CalamityMod.NPCs.SulphurousSea; +using CalamityMod.NPCs.SunkenSea; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Graphics; @@ -315,5 +327,786 @@ namespace CalamityMod Main.dayTime = changeToDay; CalamityNetcode.SyncWorld(); } + + public static int GetBannerItem(int style) + { + int item = -1; + switch (style) + { + case 0: + item = ModContent.ItemType(); + break; + case 1: + item = ModContent.ItemType(); + break; + case 2: + item = ModContent.ItemType(); + break; + case 3: + item = ModContent.ItemType(); + break; + case 4: + item = ModContent.ItemType(); + break; + case 5: + item = ModContent.ItemType(); + break; + case 6: + item = ModContent.ItemType(); + break; + case 7: + item = ModContent.ItemType(); + break; + case 8: + item = ModContent.ItemType(); + break; + case 9: + item = ModContent.ItemType(); + break; + case 10: + item = ModContent.ItemType(); + break; + case 11: + item = ModContent.ItemType(); + break; + case 12: + item = ModContent.ItemType(); + break; + case 13: + item = ModContent.ItemType(); + break; + case 14: + item = ModContent.ItemType(); + break; + case 15: + item = ModContent.ItemType(); + break; + case 16: + item = ModContent.ItemType(); + break; + case 17: + item = ModContent.ItemType(); + break; + case 18: + item = ModContent.ItemType(); + break; + case 19: + item = ModContent.ItemType(); + break; + case 20: + item = ModContent.ItemType(); + break; + case 21: + item = ModContent.ItemType(); + break; + case 22: + item = ModContent.ItemType(); + break; + case 23: + item = ModContent.ItemType(); + break; + case 24: + item = ModContent.ItemType(); + break; + case 25: + item = ModContent.ItemType(); + break; + case 26: + item = ModContent.ItemType(); + break; + case 27: + item = ModContent.ItemType(); + break; + case 28: + item = ModContent.ItemType(); + break; + case 29: + item = ModContent.ItemType(); + break; + case 30: + item = ModContent.ItemType(); + break; + case 31: + item = ModContent.ItemType(); + break; + case 32: + item = ModContent.ItemType(); + break; + case 33: + item = ModContent.ItemType(); + break; + case 34: + item = ModContent.ItemType(); + break; + case 35: + item = ModContent.ItemType(); + break; + case 36: + item = ModContent.ItemType(); + break; + case 37: + item = ModContent.ItemType(); + break; + case 38: + item = ModContent.ItemType(); + break; + case 39: + item = ModContent.ItemType(); + break; + case 40: + item = ModContent.ItemType(); + break; + case 41: + item = ModContent.ItemType(); + break; + case 42: + item = ModContent.ItemType(); + break; + case 43: + item = ModContent.ItemType(); + break; + case 44: + item = ModContent.ItemType(); + break; + case 45: + item = ModContent.ItemType(); + break; + case 46: + item = ModContent.ItemType(); + break; + case 47: + item = ModContent.ItemType(); + break; + case 48: + item = ModContent.ItemType(); + break; + case 49: + item = ModContent.ItemType(); + break; + case 50: + item = ModContent.ItemType(); + break; + case 51: + item = ModContent.ItemType(); + break; + case 52: + item = ModContent.ItemType(); + break; + case 53: + item = ModContent.ItemType(); + break; + case 54: + item = ModContent.ItemType(); + break; + case 55: + item = ModContent.ItemType(); + break; + case 56: + item = ModContent.ItemType(); + break; + case 57: + item = ModContent.ItemType(); + break; + case 58: + item = ModContent.ItemType(); + break; + case 59: + item = ModContent.ItemType(); + break; + case 60: + item = ModContent.ItemType(); + break; + case 61: + item = ModContent.ItemType(); + break; + case 62: + item = ModContent.ItemType(); + break; + case 63: + item = ModContent.ItemType(); + break; + case 64: + item = ModContent.ItemType(); + break; + case 65: + item = ModContent.ItemType(); + break; + case 66: + item = ModContent.ItemType(); + break; + case 67: + item = ModContent.ItemType(); + break; + case 68: + item = ModContent.ItemType(); + break; + case 69: + item = ModContent.ItemType(); + break; + case 70: + item = ModContent.ItemType(); + break; + case 71: + item = ModContent.ItemType(); + break; + case 72: + item = ModContent.ItemType(); + break; + case 73: + item = ModContent.ItemType(); + break; + case 74: + item = ModContent.ItemType(); + break; + case 75: + item = ModContent.ItemType(); + break; + case 76: + item = ModContent.ItemType(); + break; + case 77: + item = ModContent.ItemType(); + break; + case 78: + item = ModContent.ItemType(); + break; + case 79: + item = ModContent.ItemType(); + break; + case 80: + item = ModContent.ItemType(); + break; + case 81: + item = ModContent.ItemType(); + break; + case 82: + item = ModContent.ItemType(); + break; + case 83: + item = ModContent.ItemType(); + break; + case 84: + item = ModContent.ItemType(); + break; + case 85: + item = ModContent.ItemType(); + break; + case 86: + item = ModContent.ItemType(); + break; + case 87: + item = ModContent.ItemType(); + break; + case 88: + item = ModContent.ItemType(); + break; + case 89: + item = ModContent.ItemType(); + break; + case 90: + item = ModContent.ItemType(); + break; + case 91: + item = ModContent.ItemType(); + break; + case 92: + item = ModContent.ItemType(); + break; + case 93: + item = ModContent.ItemType(); + break; + case 94: + item = ModContent.ItemType(); + break; + case 95: + item = ModContent.ItemType(); + break; + case 96: + item = ModContent.ItemType(); + break; + case 97: + item = ModContent.ItemType(); + break; + case 98: + item = ModContent.ItemType(); + break; + case 99: + item = ModContent.ItemType(); + break; + case 100: + item = ModContent.ItemType(); + break; + case 101: + item = ModContent.ItemType(); + break; + case 102: + item = ModContent.ItemType(); + break; + case 103: + item = ModContent.ItemType(); + break; + case 104: + item = ModContent.ItemType(); + break; + case 105: + item = ModContent.ItemType(); + break; + case 106: + item = ModContent.ItemType(); + break; + case 107: + item = ModContent.ItemType(); + break; + case 108: + item = ModContent.ItemType(); + break; + case 109: + item = ModContent.ItemType(); + break; + case 110: + item = ModContent.ItemType(); + break; + case 111: + item = ModContent.ItemType(); + break; + case 112: + item = ModContent.ItemType(); + break; + case 113: + item = ModContent.ItemType(); + break; + case 114: + item = ModContent.ItemType(); + break; + case 115: + item = ModContent.ItemType(); + break; + case 116: + item = ModContent.ItemType(); + break; + case 117: + item = ModContent.ItemType(); + break; + case 118: + item = ModContent.ItemType(); + break; + case 119: + item = ModContent.ItemType(); + break; + case 120: + item = ModContent.ItemType(); + break; + case 121: + item = ModContent.ItemType(); + break; + case 122: + item = ModContent.ItemType(); + break; + case 123: + item = ModContent.ItemType(); + break; + case 124: + item = ModContent.ItemType(); + break; + case 125: + item = ModContent.ItemType(); + break; + case 126: + item = ModContent.ItemType(); + break; + default: + break; + } + return item; + } + + public static int GetBannerNPC(int style) + { + int npc = -1; + switch (style) + { + case 0: + npc = ModContent.NPCType(); + break; + case 1: + npc = ModContent.NPCType(); + break; + case 2: + npc = ModContent.NPCType(); + break; + case 3: + npc = ModContent.NPCType(); + break; + case 4: + npc = ModContent.NPCType(); + break; + case 5: + npc = ModContent.NPCType(); + break; + case 6: + npc = ModContent.NPCType(); + break; + case 7: + npc = ModContent.NPCType(); + break; + case 8: + npc = ModContent.NPCType(); + break; + case 9: + npc = ModContent.NPCType(); + break; + case 10: + npc = ModContent.NPCType(); + break; + case 11: + npc = ModContent.NPCType(); + break; + case 12: + npc = ModContent.NPCType(); + break; + case 13: + npc = ModContent.NPCType(); + break; + case 14: + npc = ModContent.NPCType(); + break; + case 15: + npc = ModContent.NPCType(); + break; + case 16: + npc = ModContent.NPCType(); + break; + case 17: + npc = ModContent.NPCType(); + break; + case 18: + npc = ModContent.NPCType(); + break; + case 19: + npc = ModContent.NPCType(); + break; + case 20: + npc = ModContent.NPCType(); + break; + case 21: + npc = ModContent.NPCType(); + break; + case 22: + npc = ModContent.NPCType(); + break; + case 23: + npc = ModContent.NPCType(); + break; + case 24: + npc = ModContent.NPCType(); + break; + case 25: + npc = ModContent.NPCType(); + break; + case 26: + npc = ModContent.NPCType(); + break; + case 27: + npc = ModContent.NPCType(); + break; + case 28: + npc = ModContent.NPCType(); + break; + case 29: + npc = ModContent.NPCType(); + break; + case 30: + npc = ModContent.NPCType(); + break; + case 31: + npc = ModContent.NPCType(); + break; + case 32: + npc = ModContent.NPCType(); + break; + case 33: + npc = ModContent.NPCType(); + break; + case 34: + npc = ModContent.NPCType(); + break; + case 35: + npc = ModContent.NPCType(); + break; + case 36: + npc = ModContent.NPCType(); + break; + case 37: + npc = ModContent.NPCType(); + break; + case 38: + npc = ModContent.NPCType(); + break; + case 39: + npc = ModContent.NPCType(); + break; + case 40: + npc = ModContent.NPCType(); + break; + case 41: + npc = ModContent.NPCType(); + break; + case 42: + npc = ModContent.NPCType(); + break; + case 43: + npc = ModContent.NPCType(); + break; + case 44: + npc = ModContent.NPCType(); + break; + case 45: + npc = ModContent.NPCType(); + break; + case 46: + npc = ModContent.NPCType(); + break; + case 47: + npc = ModContent.NPCType(); + break; + case 48: + npc = ModContent.NPCType(); + break; + case 49: + npc = ModContent.NPCType(); + break; + case 50: + npc = ModContent.NPCType(); + break; + case 52: + npc = ModContent.NPCType(); + break; + case 53: + npc = ModContent.NPCType(); + break; + case 54: + npc = ModContent.NPCType(); + break; + case 55: + npc = ModContent.NPCType(); + break; + case 56: + npc = ModContent.NPCType(); + break; + case 57: + npc = ModContent.NPCType(); + break; + case 58: + npc = ModContent.NPCType(); + break; + case 59: + npc = ModContent.NPCType(); + break; + case 60: + npc = ModContent.NPCType(); + break; + case 61: + npc = ModContent.NPCType(); + break; + case 62: + npc = ModContent.NPCType(); + break; + case 63: + npc = ModContent.NPCType(); + break; + case 64: + npc = ModContent.NPCType(); + break; + case 65: + npc = ModContent.NPCType(); + break; + case 66: + npc = ModContent.NPCType(); + break; + case 67: + npc = ModContent.NPCType(); + break; + case 68: + npc = ModContent.NPCType(); + break; + case 69: + npc = ModContent.NPCType(); + break; + case 70: + npc = ModContent.NPCType(); + break; + case 71: + npc = ModContent.NPCType(); + break; + case 72: + npc = ModContent.NPCType(); + break; + case 73: + npc = ModContent.NPCType(); + break; + case 74: + npc = ModContent.NPCType(); + break; + case 75: + npc = ModContent.NPCType(); + break; + case 76: + npc = ModContent.NPCType(); + break; + case 77: + npc = ModContent.NPCType(); + break; + case 78: + npc = ModContent.NPCType(); + break; + case 79: + npc = ModContent.NPCType(); + break; + case 80: + npc = ModContent.NPCType(); + break; + case 81: + npc = ModContent.NPCType(); + break; + case 82: + npc = ModContent.NPCType(); + break; + case 83: + npc = ModContent.NPCType(); + break; + case 84: + npc = ModContent.NPCType(); + break; + case 85: + npc = ModContent.NPCType(); + break; + case 86: + npc = ModContent.NPCType(); + break; + case 87: + npc = ModContent.NPCType(); + break; + case 88: + npc = ModContent.NPCType(); + break; + case 89: + npc = ModContent.NPCType(); + break; + case 90: + npc = ModContent.NPCType(); + break; + case 91: + npc = ModContent.NPCType(); + break; + case 92: + npc = ModContent.NPCType(); + break; + case 93: + npc = ModContent.NPCType(); + break; + case 94: + npc = ModContent.NPCType(); + break; + case 95: + npc = ModContent.NPCType(); + break; + case 96: + npc = ModContent.NPCType(); + break; + case 97: + npc = ModContent.NPCType(); + break; + case 98: + npc = ModContent.NPCType(); + break; + case 99: + npc = ModContent.NPCType(); + break; + case 100: + npc = ModContent.NPCType(); + break; + case 101: + npc = ModContent.NPCType(); + break; + case 102: + npc = ModContent.NPCType(); + break; + case 103: + npc = ModContent.NPCType(); + break; + case 104: + npc = ModContent.NPCType(); + break; + case 105: + npc = ModContent.NPCType(); + break; + case 106: + npc = ModContent.NPCType(); + break; + case 107: + npc = ModContent.NPCType(); + break; + case 108: + npc = ModContent.NPCType(); + break; + case 109: + npc = ModContent.NPCType(); + break; + case 110: + npc = ModContent.NPCType(); + break; + case 111: + npc = ModContent.NPCType(); + break; + case 112: + npc = ModContent.NPCType(); + break; + case 113: + npc = ModContent.NPCType(); + break; + case 114: + npc = ModContent.NPCType(); + break; + case 115: + npc = ModContent.NPCType(); + break; + case 116: + npc = ModContent.NPCType(); + break; + case 117: + npc = ModContent.NPCType(); + break; + case 118: + npc = ModContent.NPCType(); + break; + case 119: + npc = ModContent.NPCType(); + break; + case 120: + npc = ModContent.NPCType(); + break; + case 121: + npc = ModContent.NPCType(); + break; + case 122: + npc = ModContent.NPCType(); + break; + case 123: + npc = ModContent.NPCType(); + break; + case 124: + npc = ModContent.NPCType(); + break; + case 125: + npc = ModContent.NPCType(); + break; + case 126: + npc = ModContent.NPCType(); + break; + default: + break; + } + return npc; + } } } diff --git a/Utilities/NPCDebuffs.cs b/Utilities/NPCDebuffs.cs index 42231f5dc1..21aedc4a7e 100644 --- a/Utilities/NPCDebuffs.cs +++ b/Utilities/NPCDebuffs.cs @@ -2,6 +2,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.NPCs.Abyss; using CalamityMod.NPCs.AcidRain; +using CalamityMod.NPCs.AdultEidolonWyrm; using CalamityMod.NPCs.AquaticScourge; using CalamityMod.NPCs.Astral; using CalamityMod.NPCs.AstrumAureus; diff --git a/Utilities/NPCStats.cs b/Utilities/NPCStats.cs index 63922aaa04..039e87894c 100644 --- a/Utilities/NPCStats.cs +++ b/Utilities/NPCStats.cs @@ -1,5 +1,5 @@ using CalamityMod.NPCs; -using CalamityMod.NPCs.Abyss; +using CalamityMod.NPCs.AdultEidolonWyrm; using CalamityMod.NPCs.AquaticScourge; using CalamityMod.NPCs.AstrumAureus; using CalamityMod.NPCs.AstrumDeus; diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index 2ceea34ab5..d1a5525e93 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -27,7 +27,7 @@ using Terraria.World.Generation; namespace CalamityMod.World { - public class CalamityWorld : ModWorld + public partial class CalamityWorld : ModWorld { #region Vars public static int DoGSecondStageCountdown = 0; @@ -1297,9 +1297,5 @@ namespace CalamityMod.World } } #endregion - - #region PostUpdate - public override void PostUpdate() => WorldUpdateMiscEffects.PerformWorldUpdates(); - #endregion } } diff --git a/World/WorldUpdateMiscEffects.cs b/World/WorldUpdateMiscEffects.cs index 649d317c1b..c799934fdd 100644 --- a/World/WorldUpdateMiscEffects.cs +++ b/World/WorldUpdateMiscEffects.cs @@ -2,7 +2,7 @@ using CalamityMod.CalPlayer; using CalamityMod.DataStructures; using CalamityMod.Events; using CalamityMod.NPCs; -using CalamityMod.NPCs.Abyss; +using CalamityMod.NPCs.AdultEidolonWyrm; using CalamityMod.NPCs.AstrumAureus; using CalamityMod.NPCs.Bumblebirb; using CalamityMod.NPCs.Calamitas; @@ -34,10 +34,14 @@ using static CalamityMod.World.CalamityWorld; namespace CalamityMod.World { - public class WorldUpdateMiscEffects + public partial class CalamityWorld : ModWorld { - public static void PerformWorldUpdates() + public override void PostUpdate() { + // Reset this int because it causes bugs with other mods if you delete Dr. Draedon through abnormal means + if (!NPC.AnyNPCs(ModContent.NPCType())) + CalamityGlobalNPC.draedon = -1; + // Reset the exo mech to summon if Draedon is absent. if (DraedonMechToSummon != ExoMech.None && CalamityGlobalNPC.draedon == -1) DraedonMechToSummon = ExoMech.None;