diff --git a/Buffs/DamageOverTime/SearingLava.cs b/Buffs/DamageOverTime/SearingLava.cs index ca5641a4ba..708af57feb 100644 --- a/Buffs/DamageOverTime/SearingLava.cs +++ b/Buffs/DamageOverTime/SearingLava.cs @@ -1,4 +1,5 @@ -using CalamityMod.DataStructures; +using System; +using CalamityMod.DataStructures; using Terraria; using Terraria.ModLoader; @@ -10,8 +11,22 @@ namespace CalamityMod.Buffs.DamageOverTime public static DebuffData debuffData = new DebuffData() { EnemyLostRegen = 40, - HeatDebuffScaling = 2 + HeatDebuffScaling = 2, + NPCLifeRegenMethod = CragsLavaScaling }; + + public static void CragsLavaScaling(NPC npc, int buffType, ref int buffIndex, ref int damage) + { + //Applies the double Heat scaling but completely ignores NPC weakness/resistance to heat. + + //We need to apply slimed as that isn't included in HeatDebuffMultiplier due to needing to dynamically update if slimed is applied + StatModifier multiplier = npc.Calamity().HeatDebuffMultiplier; + if (npc.drippingSlime || npc.drippingSparkleSlime) + multiplier += 1f; + + int dotValue = (int)DebuffData.ApplyScalingToStatModifer(multiplier, debuffData.HeatDebuffScaling).ApplyTo(debuffData.EnemyLostRegen); + npc.Calamity().ApplyDPSDebuff(dotValue, (int)Math.Max(dotValue * debuffData.MultiplierDamageTickSize, debuffData.MinimumDamageTickSize), ref npc.lifeRegen, ref damage); + } public override void SetStaticDefaults() { Main.buffNoTimeDisplay[Type] = true; diff --git a/Buffs/Summon/BaseSummonBuff.cs b/Buffs/Summon/BaseSummonBuff.cs index 9fede4e1a2..de0d355b89 100644 --- a/Buffs/Summon/BaseSummonBuff.cs +++ b/Buffs/Summon/BaseSummonBuff.cs @@ -37,8 +37,8 @@ namespace CalamityMod.Buffs.Summon public override void Update(Player player, ref int buffIndex) { - BuffOwner ??= player; - BuffModdedOwner ??= player.Calamity(); + BuffOwner = player; + BuffModdedOwner = player.Calamity(); if (player.ownedProjectileCounts[MinionProjectileType] > 0) MinionBool = true; diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index f25ba0ef6d..32eced86b8 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1463,7 +1463,6 @@ namespace CalamityMod.CalPlayer public bool redWine = false; public float redWineStoredY = 0; public bool grapeBeer = false; - public int grapeBeerTimer = 0; public bool moonshine = false; public bool rum = false; public bool whiskey = false; @@ -2753,8 +2752,6 @@ namespace CalamityMod.CalPlayer vodka = false; redWine = false; grapeBeer = false; - if (grapeBeerTimer > 0) - grapeBeerTimer--; moonshine = false; rum = false; whiskey = false; @@ -3819,6 +3816,14 @@ namespace CalamityMod.CalPlayer if (godSlayer && !Player.pulley && Player.grappling[0] == -1 && !Player.tongued && !Player.mount.Active && !Player.HasCooldown(GodSlayerDash.ID) && Player.dashDelay == 0) { godSlayerDashHotKeyPressed = true; + foreach (Projectile p in Main.ActiveProjectiles) + { + if (p.type == ProjectileType() && Player.whoAmI == p.owner) + { + (p.ModProjectile as RelicOfDeliveranceSpear).KillProj(); + return; + } + } } } diff --git a/CalPlayer/CalamityPlayerFishing.cs b/CalPlayer/CalamityPlayerFishing.cs index edd7792110..50bd493bad 100644 --- a/CalPlayer/CalamityPlayerFishing.cs +++ b/CalPlayer/CalamityPlayerFishing.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using CalamityMod.Events; using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; @@ -30,7 +31,6 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; -using Terraria.UI; namespace CalamityMod.CalPlayer { @@ -49,15 +49,15 @@ namespace CalamityMod.CalPlayer // If the player does get a crate (can be from the reroll above), give it increased chances of being rarer if (attempt.crate) { - int uncommonRate = Math.Clamp(240 / attempt.fishingLevel, 3, 240); // Iron/Mythril (originally 300) + int uncommonRate = Math.Clamp(240 / attempt.fishingLevel, 3, 240); // Iron/Mythril (originally 300) attempt.uncommon = Main.rand.NextBool(uncommonRate); // These roll result bools are individually stored for the rarifying visuals - int rareRate = Math.Clamp(840 / attempt.fishingLevel, 4, 840); // Biome (originally 1050) + int rareRate = Math.Clamp(840 / attempt.fishingLevel, 4, 840); // Biome (originally 1050) bool rareRoll = Main.rand.NextBool(rareRate); attempt.rare = rareRoll; - int veryRareRate = Math.Clamp(1800 / attempt.fishingLevel, 5, 1800); // Golden/Titanium (originally 2250) + int veryRareRate = Math.Clamp(1800 / attempt.fishingLevel, 5, 1800); // Golden/Titanium (originally 2250) bool veryRareRoll = Main.rand.NextBool(veryRareRate); attempt.veryrare = veryRareRoll; @@ -86,6 +86,13 @@ namespace CalamityMod.CalPlayer } #endregion + public override bool? CanConsumeBait(Item bait) + { + if (bait.type == ModContent.ItemType()) + return true; + return null; + } + #region Catch Fish public override void CatchFish(FishingAttempt attempt, ref int itemDrop, ref int npcSpawn, ref AdvancedPopupRequest sonar, ref Vector2 sonarPosition) { @@ -128,7 +135,7 @@ namespace CalamityMod.CalPlayer // Fishing in lava overrides the rest of logic if (lava) { - // Don't do anything if you can't fish in lava + // Don't do anything if you can't fish in lava if (!attempt.CanFishInLava) return; @@ -177,8 +184,10 @@ namespace CalamityMod.CalPlayer // Old Duke spawn if (canSulphurFish && bait == ModContent.ItemType() && !BossRushEvent.BossRushActive) { - CalamityGlobalNPC.OldDukeSpawn(Player.whoAmI, ModContent.NPCType(), bait); + if (!Main.projectile.Any(x => x.active && x.aiStyle == ProjAIStyleID.Bobber && x.ai[1] != 0 && x.localAI[1] == ModContent.NPCType() * -1)) + npcSpawn = ModContent.NPCType(); itemDrop = -1; + sonar.Text = ""; return; } @@ -246,7 +255,7 @@ namespace CalamityMod.CalPlayer return; // Add top priorities of our own - if (DownedBossSystem.downedLeviathan && attempt.legendary && poolSize > 1000) + if (DownedBossSystem.downedLeviathan && attempt.legendary && poolSize > 1000 && !Main.rand.NextBool(3)) { itemDrop = ModContent.ItemType(); return; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 5d5d891783..ee7799ea16 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1400,6 +1400,9 @@ namespace CalamityMod.CalPlayer Player.lavaTime++; } } + // Extra DoT in the lava of the crags. Negated by Flame-licked Shell. + else if (ZoneCalamity && !flameLickedShell) + Player.AddBuff(ModContent.BuffType(), 2, false); // Release irradiated slimes from the sky during the Acid Rain event. if (Player.whoAmI == Main.myPlayer) @@ -1890,7 +1893,7 @@ namespace CalamityMod.CalPlayer { if (numOfEnergy < energyCap) { - int energyDamage = (int)Player.GetBestClassDamage().ApplyTo(22); + int energyDamage = (int)Player.GetBestClassDamage().ApplyTo(8); Projectile energy = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, (Vector2.One * 4).RotatedByRandom(MathHelper.TwoPi), ModContent.ProjectileType(), energyDamage, 0f, Player.whoAmI, 0, numOfEnergy); if (numOfEnergy + 1 == energyCap && Player.Calamity().sSpiritAmuletVisual) { diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index ae4882d3f2..2d58819db4 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1315,7 +1315,7 @@ namespace CalamityMod.CalPlayer if (manaOverloader) { double healMult = 0.1D - proj.numHits * 0.025D; - Player.SpawnLifeStealProjectile(target, proj, ProjectileType(), (int)Math.Round(damage * healMult), 1.5f); + Player.SpawnLifeStealProjectile(target, proj, ProjectileType(), (int)Math.Round(damage * healMult), 1.75f); } if (ataxiaMage) diff --git a/Items/Accessories/BatholithBangle.cs b/Items/Accessories/BatholithBangle.cs index ef0d8c630f..c244cd51d4 100644 --- a/Items/Accessories/BatholithBangle.cs +++ b/Items/Accessories/BatholithBangle.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; public static int cooldown = 600; - public static int damage = 225; + public static int damage = 100; public override void SetDefaults() { Item.width = 36; diff --git a/Items/Accessories/BlackGlassBand.cs b/Items/Accessories/BlackGlassBand.cs index ff767add74..affacf97aa 100644 --- a/Items/Accessories/BlackGlassBand.cs +++ b/Items/Accessories/BlackGlassBand.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; public static int cooldown = 300; - public static int damage = 32; + public static int damage = 20; public override void SetDefaults() { Item.width = 30; diff --git a/Items/Accessories/ChaosStone.cs b/Items/Accessories/ChaosStone.cs index e339d2c5f8..8b743a1c10 100644 --- a/Items/Accessories/ChaosStone.cs +++ b/Items/Accessories/ChaosStone.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories public class ChaosStone : ModItem, ILocalizedModType { public static float LostRegenPer100Mana => 8; - public static float DamageMultPer100Mana => 0.03f; + public static float DamageMultPer100Mana => 0.04f; public new string LocalizationCategory => "Items.Accessories"; public override void ModifyTooltips(List tooltips) { diff --git a/Items/Accessories/ProtolithBangle.cs b/Items/Accessories/ProtolithBangle.cs index 70274095b3..b80f6f8225 100644 --- a/Items/Accessories/ProtolithBangle.cs +++ b/Items/Accessories/ProtolithBangle.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; public static int cooldown = 420; - public static int damage = 68; + public static int damage = 60; public override void SetDefaults() { Item.width = 34; diff --git a/Items/Accessories/TheAmalgam.cs b/Items/Accessories/TheAmalgam.cs index fdea11a01a..d54b5c5e34 100644 --- a/Items/Accessories/TheAmalgam.cs +++ b/Items/Accessories/TheAmalgam.cs @@ -39,11 +39,11 @@ namespace CalamityMod.Items.Accessories modPlayer.rBrain = true; // Handles shaderain cloud spawning on hit modPlayer.amalgam = true; player.brainOfConfusionItem = Item; - modPlayer.HeatDebuffMultiplier += 3f; - modPlayer.ColdDebuffMultiplier += 3f; - modPlayer.SicknessDebuffMultiplier += 3f; - modPlayer.WaterDebuffMultiplier += 3f; - modPlayer.ElectricDebuffMultiplier += 3f; + modPlayer.HeatDebuffMultiplier += 2f; + modPlayer.ColdDebuffMultiplier += 2f; + modPlayer.SicknessDebuffMultiplier += 2f; + modPlayer.WaterDebuffMultiplier += 2f; + modPlayer.ElectricDebuffMultiplier += 2f; } public override void AddRecipes() diff --git a/Items/Critters/BabyCannonballJellyfishItem.cs b/Items/Critters/BabyCannonballJellyfishItem.cs index d36cc2a4b9..644de42130 100644 --- a/Items/Critters/BabyCannonballJellyfishItem.cs +++ b/Items/Critters/BabyCannonballJellyfishItem.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Critters Item.DefaultToCapturedCritter(ModContent.NPCType()); Item.value = Item.sellPrice(silver: 10); Item.rare = ItemRarityID.Green; - Item.damage = 400; + Item.damage = 300; } } } diff --git a/Items/PermanentBoosters/MiracleFruit.cs b/Items/PermanentBoosters/MiracleFruit.cs index bd12178cf9..055e92bc5c 100644 --- a/Items/PermanentBoosters/MiracleFruit.cs +++ b/Items/PermanentBoosters/MiracleFruit.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.PermanentBoosters Item.useAnimation = Item.useTime = 30; Item.UseSound = UseSound; Item.useStyle = ItemUseStyleID.HoldUp; - Item.value = Item.sellPrice(gold: 30); + Item.value = Item.sellPrice(gold: 24); Item.rare = ItemRarityID.Yellow; } diff --git a/Items/PermanentBoosters/SacredStrawberry.cs b/Items/PermanentBoosters/SacredStrawberry.cs index 96e4dd00f7..50e53a941c 100644 --- a/Items/PermanentBoosters/SacredStrawberry.cs +++ b/Items/PermanentBoosters/SacredStrawberry.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.PermanentBoosters Item.useAnimation = Item.useTime = 30; Item.UseSound = UseSound; Item.useStyle = ItemUseStyleID.HoldUp; - Item.value = Item.sellPrice(gold: 48); + Item.value = Item.sellPrice(gold: 36); Item.rare = ModContent.RarityType(); } diff --git a/Items/PermanentBoosters/SanguineTangerine.cs b/Items/PermanentBoosters/SanguineTangerine.cs index 473b2b825b..2f8a6cb783 100644 --- a/Items/PermanentBoosters/SanguineTangerine.cs +++ b/Items/PermanentBoosters/SanguineTangerine.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.PermanentBoosters Item.useAnimation = Item.useTime = 30; Item.UseSound = UseSound; Item.useStyle = ItemUseStyleID.HoldUp; - Item.value = Item.sellPrice(gold: 24); + Item.value = Item.sellPrice(gold: 16); Item.rare = ItemRarityID.LightPurple; } diff --git a/Items/PermanentBoosters/TaintedCloudberry.cs b/Items/PermanentBoosters/TaintedCloudberry.cs index 93bcaf634f..8e4092d358 100644 --- a/Items/PermanentBoosters/TaintedCloudberry.cs +++ b/Items/PermanentBoosters/TaintedCloudberry.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.PermanentBoosters Item.useAnimation = Item.useTime = 30; Item.UseSound = UseSound; Item.useStyle = ItemUseStyleID.HoldUp; - Item.value = Item.sellPrice(gold: 36); + Item.value = Item.sellPrice(gold: 28); Item.rare = ModContent.RarityType(); } diff --git a/Items/SummonItems/BloodwormItem.cs b/Items/SummonItems/BloodwormItem.cs index be23362d9c..5bd5f6c758 100644 --- a/Items/SummonItems/BloodwormItem.cs +++ b/Items/SummonItems/BloodwormItem.cs @@ -1,7 +1,10 @@ -using CalamityMod.NPCs.AcidRain; +using System.Collections.Generic; +using System.Linq; +using CalamityMod.NPCs.AcidRain; using CalamityMod.Rarities; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.SummonItems @@ -9,6 +12,8 @@ namespace CalamityMod.Items.SummonItems public class BloodwormItem : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.SummonItems"; + + private const int SpoofBaitNumber = 4444; public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; @@ -20,7 +25,10 @@ namespace CalamityMod.Items.SummonItems Item.width = 28; Item.height = 28; Item.maxStack = Item.CommonMaxStack; - Item.bait = 4444; + // Why spoof this in the tooltip? + // To fix bugs related to how bait power affects hooking fish. + // Vanilla gets around this for Truffle Worm with a hundred hardcoded checks but we don't have the full luxury to do that. + Item.bait = 50; Item.useStyle = ItemUseStyleID.Swing; Item.autoReuse = true; Item.useTurn = true; @@ -38,5 +46,11 @@ namespace CalamityMod.Items.SummonItems { itemGroup = ContentSamples.CreativeHelper.ItemGroup.BossItem; } + + public override void ModifyTooltips(List tooltips) + { + TooltipLine bait = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "BaitPower"); + bait?.Text = Language.GetTextValue("GameUI.BaitPower", SpoofBaitNumber); + } } } diff --git a/Items/SummonItems/Terminus.cs b/Items/SummonItems/Terminus.cs index 71f0b167e4..c1432c9c8b 100644 --- a/Items/SummonItems/Terminus.cs +++ b/Items/SummonItems/Terminus.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Items.SummonItems public new string LocalizationCategory => "Items.SummonItems"; public override void SetDefaults() { - Item.width = Main.zenithWorld ? 54 : 28; - Item.height = Main.zenithWorld ? 78 : 28; + Item.width = Main.zenithWorld ? 54 : 70; + Item.height = Main.zenithWorld ? 78 : 80; Item.rare = ItemRarityID.Blue; Item.useAnimation = 45; Item.useTime = 45; @@ -31,17 +31,67 @@ namespace CalamityMod.Items.SummonItems Item.SetNameOverride(this.GetLocalizedValue("GFBName")); } - public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) + public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) { + // The wiki classifies Boss Rush as an event + itemGroup = ContentSamples.CreativeHelper.ItemGroup.EventItem; + } + + #region Sprite Drawing + public static void DrawTerminusGlow(SpriteBatch spriteBatch, Vector2 baseDrawPosition, Rectangle frame, float rotation, float baseScale) + { + Texture2D glowTexture = ModContent.Request("CalamityMod/Items/SummonItems/TerminusGlow").Value; + Vector2 origin = frame.Size() * 0.5f; + + float pulseRate = Main.GlobalTimeWrappedHourly % 5f; + float slowingRate = Main.GlobalTimeWrappedHourly * 0.4f; + float orbitRadius = baseScale != 1f ? 4f : 7f; + float glowCount = 3f; + + pulseRate /= 2.5f; + if (pulseRate >= 1f) + pulseRate = 2f - pulseRate; + pulseRate *= 0.6f; + + for (int i = 0; i < glowCount; i++) + { + float progress = i / glowCount; + float pulseRotation = (progress + slowingRate) * MathHelper.TwoPi; + + Vector2 offset = Vector2.UnitY * orbitRadius; + offset = offset.RotatedBy(pulseRotation) * pulseRate; + + spriteBatch.Draw(glowTexture, baseDrawPosition + offset, frame, new Color(56, 12, 115, 33), rotation, origin, baseScale, 0, 0); + } + + spriteBatch.Draw(glowTexture, baseDrawPosition, frame, Color.White, rotation, origin, baseScale, 0, 0); + } + + public static void DrawGlowInWorld(SpriteBatch spriteBatch, Vector2 baseDrawPosition, float rotation, float baseScale) + { + Texture2D glowTexture = ModContent.Request("CalamityMod/Items/SummonItems/TerminusGlow").Value; + Rectangle frame = glowTexture.Bounds; + DrawTerminusGlow(spriteBatch, baseDrawPosition + new Vector2(0, -1), frame, rotation, baseScale); + } + + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + Texture2D texture; + float invScale = scale * 1.4f; + if (Main.zenithWorld) { - Texture2D texture = ModContent.Request("CalamityMod/Items/SummonItems/Terminus_GFB").Value; - Color overlay = Color.White; - spriteBatch.Draw(texture, position, null, overlay, 0f, origin, scale, 0, 0); - return false; + texture = ModContent.Request("CalamityMod/Items/SummonItems/Terminus_GFB").Value; + spriteBatch.Draw(texture, position - new Vector2(-4, -1), null, Color.White, 0f, origin, invScale - 0.04f, 0, 0); } else - return true; + { + texture = ModContent.Request("CalamityMod/Items/SummonItems/Terminus").Value; + spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, invScale, 0, 0); + DrawTerminusGlow(spriteBatch, position, frame, 0f, invScale); + } + + return false; } public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) @@ -49,17 +99,20 @@ namespace CalamityMod.Items.SummonItems if (Main.zenithWorld) { Texture2D texture = ModContent.Request("CalamityMod/Items/SummonItems/Terminus_GFB").Value; - spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, 0, 0); + spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, rotation, Vector2.Zero, scale, 0, 0); return false; } else return true; } - public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { - // The wiki classifies Boss Rush as an event - itemGroup = ContentSamples.CreativeHelper.ItemGroup.EventItem; + if (!Main.zenithWorld) + { + DrawGlowInWorld(spriteBatch, Item.Center - Main.screenPosition, rotation, scale); + } } + #endregion } } diff --git a/Items/SummonItems/Terminus.png b/Items/SummonItems/Terminus.png index 9693d24bb8..b94449e1dd 100644 Binary files a/Items/SummonItems/Terminus.png and b/Items/SummonItems/Terminus.png differ diff --git a/Items/SummonItems/TerminusGlow.png b/Items/SummonItems/TerminusGlow.png new file mode 100644 index 0000000000..67ce074418 Binary files /dev/null and b/Items/SummonItems/TerminusGlow.png differ diff --git a/Items/Weapons/Melee/DeathsAscension.cs b/Items/Weapons/Melee/DeathsAscension.cs index 4d1b2516d2..8468e0ba75 100644 --- a/Items/Weapons/Melee/DeathsAscension.cs +++ b/Items/Weapons/Melee/DeathsAscension.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 70; Item.height = 70; - Item.damage = 900; + Item.damage = 700; Item.knockBack = 9f; Item.useAnimation = Item.useTime = 24; Item.DamageType = DamageClass.Melee; diff --git a/Items/Weapons/Melee/ExaltedOathblade.cs b/Items/Weapons/Melee/ExaltedOathblade.cs index 15f6113870..bfd403ae03 100644 --- a/Items/Weapons/Melee/ExaltedOathblade.cs +++ b/Items/Weapons/Melee/ExaltedOathblade.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Items.Weapons.Melee } if (player.Calamity().demonSwordKillMode && player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0 && player.Calamity().killModeCooldown == KillMode.cooldownMax + KillMode.buffMax) { - Projectile.NewProjectile(player.GetSource_FromThis(), player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), Item.damage * 14, Item.knockBack, player.whoAmI, 0, throwCount); //This used to be 23x damage. + Projectile.NewProjectile(player.GetSource_FromThis(), player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), Item.damage * 16, Item.knockBack, player.whoAmI, 0, throwCount); } } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Melee/ForbiddenOathblade.cs b/Items/Weapons/Melee/ForbiddenOathblade.cs index 8ee7e170fd..b8339e9b17 100644 --- a/Items/Weapons/Melee/ForbiddenOathblade.cs +++ b/Items/Weapons/Melee/ForbiddenOathblade.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Items.Weapons.Melee } if (player.Calamity().demonSwordKillMode && player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0 && player.Calamity().killModeCooldown == KillMode.cooldownMax + KillMode.buffMax) { - Projectile blade = Projectile.NewProjectileDirect(player.GetSource_FromThis(), player.MountedCenter,Vector2.Zero, ModContent.ProjectileType(), Item.damage * 10, Item.knockBack, player.whoAmI, 0, throwCount); // This used to be 12x damage. + Projectile blade = Projectile.NewProjectileDirect(player.GetSource_FromThis(), player.MountedCenter,Vector2.Zero, ModContent.ProjectileType(), Item.damage * 12, Item.knockBack, player.whoAmI, 0, throwCount); } } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Melee/HolyCollider.cs b/Items/Weapons/Melee/HolyCollider.cs index 481ff370dd..51133ffcf2 100644 --- a/Items/Weapons/Melee/HolyCollider.cs +++ b/Items/Weapons/Melee/HolyCollider.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 114; Item.height = 146; - Item.damage = 3140; + Item.damage = 2900; Item.DamageType = TrueMeleeDamageClass.Instance; Item.useAnimation = 45; Item.useStyle = ItemUseStyleID.Swing; diff --git a/Items/Weapons/Melee/Lucrecia.cs b/Items/Weapons/Melee/Lucrecia.cs index ff151ba276..6fd7a2d0d9 100644 --- a/Items/Weapons/Melee/Lucrecia.cs +++ b/Items/Weapons/Melee/Lucrecia.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 54; Item.height = 54; Item.useStyle = ItemUseStyleID.Shoot; - Item.damage = 170; + Item.damage = 150; Item.DamageType = DamageClass.Melee; Item.useAnimation = Item.useTime = 34; Item.shootSpeed = 10f; diff --git a/Items/Weapons/Melee/MonstrousKnives.cs b/Items/Weapons/Melee/MonstrousKnives.cs index 4dff8f0547..72d7cdd46c 100644 --- a/Items/Weapons/Melee/MonstrousKnives.cs +++ b/Items/Weapons/Melee/MonstrousKnives.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 18; Item.height = 20; - Item.damage = 9; + Item.damage = 8; Item.DamageType = DamageClass.MeleeNoSpeed; Item.noMelee = true; Item.noUseGraphic = true; diff --git a/Items/Weapons/Melee/TheBurningSky.cs b/Items/Weapons/Melee/TheBurningSky.cs index 161909dfc0..4147065fcb 100644 --- a/Items/Weapons/Melee/TheBurningSky.cs +++ b/Items/Weapons/Melee/TheBurningSky.cs @@ -6,6 +6,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; using Terraria.DataStructures; +using Terraria.GameContent.Prefixes; using Terraria.ID; using Terraria.ModLoader; @@ -44,6 +45,8 @@ namespace CalamityMod.Items.Weapons.Melee Item.value = CalamityGlobalItem.RarityVioletBuyPrice; Item.rare = ModContent.RarityType(); } + public override bool RangedPrefix() => true; //class identity is fake + public override bool MeleePrefix() => false; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { diff --git a/Items/Weapons/Ranged/FirestormCannon.cs b/Items/Weapons/Ranged/FirestormCannon.cs index f26eca63a1..bece6011c9 100644 --- a/Items/Weapons/Ranged/FirestormCannon.cs +++ b/Items/Weapons/Ranged/FirestormCannon.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.width = 56; Item.height = 28; - Item.damage = 17; + Item.damage = 15; Item.DamageType = DamageClass.Ranged; Item.useTime = Item.useAnimation = 11; Item.knockBack = 1.5f; diff --git a/Items/Weapons/Ranged/HalleysInferno.cs b/Items/Weapons/Ranged/HalleysInferno.cs index e17b40e422..69890dfbb8 100644 --- a/Items/Weapons/Ranged/HalleysInferno.cs +++ b/Items/Weapons/Ranged/HalleysInferno.cs @@ -20,13 +20,13 @@ namespace CalamityMod.Items.Weapons.Ranged public static readonly SoundStyle ShootSound = new("CalamityMod/Sounds/Item/HalleysInfernoShoot") { Volume = 0.68f }; public static readonly SoundStyle Hit = new("CalamityMod/Sounds/Item/HalleysInfernoHit") { Volume = 0.75f }; public static float MaxStarburstPerComet => 1; - public static float MaxStarburstPerStar => 0.25f; + public static float MaxStarburstPerStar => 0.5f; public static float LostAccuracyPerMiss => 4; public static float MaxAccuracy => 50; - public static float StarburstDmgMult => 1.25f; + public static float StarburstDmgMult => 2.5f; - public static float StarburstVelMult = 0.75f; + public static float StarburstVelMult => 0.75f; public override void SetDefaults() { Item.width = 84; diff --git a/Items/Weapons/Ranged/M1Garand.cs b/Items/Weapons/Ranged/M1Garand.cs index ff034f96b2..27254cb375 100644 --- a/Items/Weapons/Ranged/M1Garand.cs +++ b/Items/Weapons/Ranged/M1Garand.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Bullet; Item.noUseGraphic = true; - Item.value = CalamityGlobalItem.RarityOrangeBuyPrice; + Item.value = Item.buyPrice(gold: 20); // Sold by Arms Dealer Item.rare = ItemRarityID.Orange; } diff --git a/Items/Weapons/Rogue/RotBall.cs b/Items/Weapons/Rogue/RotBall.cs index 24d5f0bf51..a915b82bc8 100644 --- a/Items/Weapons/Rogue/RotBall.cs +++ b/Items/Weapons/Rogue/RotBall.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 30; Item.height = 30; - Item.damage = 20; + Item.damage = 16; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 16; diff --git a/Items/Weapons/Rogue/ToothBall.cs b/Items/Weapons/Rogue/ToothBall.cs index fd95ef183a..eada2f3536 100644 --- a/Items/Weapons/Rogue/ToothBall.cs +++ b/Items/Weapons/Rogue/ToothBall.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 30; Item.height = 30; - Item.damage = 20; + Item.damage = 16; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 16; diff --git a/Items/Weapons/Summon/DazzlingStabberStaff.cs b/Items/Weapons/Summon/DazzlingStabberStaff.cs index f66a47e2db..4ea967a21e 100644 --- a/Items/Weapons/Summon/DazzlingStabberStaff.cs +++ b/Items/Weapons/Summon/DazzlingStabberStaff.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.UseSound = SoundID.DD2_DarkMageHealImpact; Item.DamageType = DamageClass.Summon; Item.mana = 10; - Item.damage = 43; + Item.damage = 35; Item.knockBack = 2f; Item.autoReuse = true; Item.useAnimation = Item.useTime = 24; diff --git a/Items/Weapons/Summon/IgneousExaltation.cs b/Items/Weapons/Summon/IgneousExaltation.cs index 2523a46969..3b829ede05 100644 --- a/Items/Weapons/Summon/IgneousExaltation.cs +++ b/Items/Weapons/Summon/IgneousExaltation.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Items.Weapons.Summon { public class IgneousExaltation : ModItem, ILocalizedModType { - public static int ChargeDuration = 30; - public static int ChargeCooldown = 120; + public static int ChargeDuration => 25; + public static int ChargeCooldown => 120; public new string LocalizationCategory => "Items.Weapons.Summon"; private static Texture2D BladeOutline = null; public static Texture2D GetBladeOutlineTex() @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 52; Item.height = 50; - Item.damage = 34; + Item.damage = 30; Item.mana = 10; Item.useAnimation = Item.useTime = 36; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Summon/SanctifiedSpark.cs b/Items/Weapons/Summon/SanctifiedSpark.cs index 62798dbb63..0c10f1a1bb 100644 --- a/Items/Weapons/Summon/SanctifiedSpark.cs +++ b/Items/Weapons/Summon/SanctifiedSpark.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 66; Item.height = 68; - Item.damage = 128; + Item.damage = 100; Item.DamageType = DamageClass.Summon; Item.sentry = true; Item.mana = 100; diff --git a/Items/Weapons/Summon/Sirius.cs b/Items/Weapons/Summon/Sirius.cs index 3b90737476..9eb6828716 100644 --- a/Items/Weapons/Summon/Sirius.cs +++ b/Items/Weapons/Summon/Sirius.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { Item.width = Item.height = 62; - Item.damage = 150; + Item.damage = 90; Item.useAnimation = Item.useTime = 24; Item.mana = 10; Item.knockBack = 10f; diff --git a/Items/Weapons/Summon/VengefulSunStaff.cs b/Items/Weapons/Summon/VengefulSunStaff.cs index 7152f1617f..14f973ea85 100644 --- a/Items/Weapons/Summon/VengefulSunStaff.cs +++ b/Items/Weapons/Summon/VengefulSunStaff.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 72; Item.height = 72; - Item.damage = 40; + Item.damage = 35; Item.mana = 10; Item.useAnimation = Item.useTime = 36; Item.useStyle = ItemUseStyleID.Swing; diff --git a/Items/Weapons/Typeless/RelicOfDeliverance.cs b/Items/Weapons/Typeless/RelicOfDeliverance.cs index 52a8e2e512..8dd3c542b9 100644 --- a/Items/Weapons/Typeless/RelicOfDeliverance.cs +++ b/Items/Weapons/Typeless/RelicOfDeliverance.cs @@ -1,4 +1,5 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.CalPlayer.Dashes; +using CalamityMod.Projectiles.Typeless; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -40,6 +41,6 @@ namespace CalamityMod.Items.Weapons.Typeless // Terraria seems to really dislike high crit values in SetDefaults public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 55; - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0 && player.Calamity().DashID != GodslayerArmorDash.ID; } } diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 662e218299..7004c89c59 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -252,12 +252,22 @@ Plague: { SagePoison: { DisplayName: Sage Poison Description: Poisoned - ItemTooltip: Sickness - DPS scales with summoned Viral Sprout amount + ItemTooltip: + ''' + Sickness - 25 DPS per Viral Sprout / 50 DPS per Virid Vanguard + Ignores 75% of enemy sickness weaknesses and resistances + ''' } SearingLava: { DisplayName: Searing Lava Description: The brimstone lava sears your flesh + ItemTooltip: + ''' + Heat - 20 DPS + Ignores enemy heat weaknesses and resistances + Gains double effect from Heat debuff amplifiers + ''' } ShellfishClaps: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 6c0ceb42f3..99d4affdb6 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -13,7 +13,6 @@ AbyssalDivingGear: { Tooltip: ''' Reduces the damage caused by the pressure of the abyss while out of breath - Removes the bleed effect caused by the abyss Grants the ability to swim and greatly extends underwater breathing Provides light underwater and extra mobility on ice Provides a moderate amount of light and reduces breath loss in the abyss @@ -627,7 +626,7 @@ DynamoStemCells: { ''' 10% increased ranged damage and movement speed Ranged weapons fire a powerful mini swarmer every 3 seconds - Reduces damage taken from Dragonfire and Electrified + Reduces damage taken from Dragonfire ''' } @@ -1096,7 +1095,7 @@ ManaPolarizer: { Increases maximum mana by 50 Provides life regeneration and magic damage that scales based on how much mana you have Lower mana means more life regeneration, but less magic damage - These scale from -2 to 2 HP/sec, and 15% to 5% damage + These scale from -2 to +2 HP/s, and 15% to 5% damage The provided regeneration is halved when under Mana Sickness Magic projectiles steal enemy life while holding a magic weapon ''' @@ -1865,7 +1864,7 @@ TheAmalgam: { DisplayName: The Amalgam Tooltip: ''' - All attacks inflict a variety of debuffs, 300% increased elemental debuff damage + All attacks inflict a variety of debuffs, 200% increased elemental debuff damage Most buffs last twice as long, and persist after dying Taking damage confuses nearby enemies and spawns a dank creeper The dank creeper flies above you, exploding into several shaderain clouds diff --git a/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson b/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson index 7b5ef7a2e5..52b51c52c4 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson @@ -286,7 +286,7 @@ Teratoma: { Terminus: { DisplayName: Terminus GFBName: Ogscule - Tooltip: Activates Boss Rush Mode, using it again will deactivate Boss Rush Mode + Tooltip: Hold to start or end the Boss Rush } YharonEgg: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index ee926c25be..63e3fc1bb0 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -1135,8 +1135,8 @@ SlagfireDouser: { DisplayName: Slagfire Douser Tooltip: ''' - Lobs armor-penetrating lava in bursts - Armor-penetrating lava ignores 10 points of enemy defense + Sprays bursts of molten pollen + Molten pollen ignores 10 points of enemy defense and inflicts [cbuff:CalamityMod/SearingLava] [c/FF9900:Capable of dousing townsfolk in lava too...] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index 63f07d4fc8..1c30610f69 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -865,7 +865,7 @@ ViralSprout: { Tooltip: ''' Summons a sage spirit to fight for you - Inflicts Sage Poison, a debuff that becomes stronger the more spirits you own + Inflicts [cbuff:CalamityMod/SagePoison], a debuff that becomes stronger the more spirits you own ''' } @@ -876,7 +876,7 @@ ViridVanguard: { Alternates between summoning axes and swords, both laced with a powerful poison Axes orbit the player, dealing high damage at a close range Swords chase down enemies with extreme precision, tearing them to shreds - All weapons inflict Sage Poison, which becomes more powerful the more weapons are summoned + All weapons inflict [cbuff:CalamityMod/Sage Poison], which becomes more powerful the more weapons are summoned When all minion slots are full, again to spin up a flurry of slashes aimed at your cursor This ability has a five-second cooldown that requires holding this item Shift- this item in your inventory to change the rotation direction diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 22f3ea08cd..12a58c2e4b 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -567,3 +567,4 @@ Dragonfolly.DisplayName: Dragonfolly Shoreskipper.DisplayName: Shoreskipper BrainIllusion.DisplayName: Brain Illusion FalseBrain.DisplayName: False Brain +BloodBomb.DisplayName: Blood Bomb diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson index 576280052c..c394d0ba93 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson @@ -23,6 +23,7 @@ BigFlare.DisplayName: Big Flare BigFlare2.DisplayName: Big Flare BirbAura.DisplayName: Draconic Aura BirbAuraFlare.DisplayName: Draconic Aura Flare +BloodBombRTS.DisplayName: Blood Bomb BloodGeyser.DisplayName: Blood Geyser BloodScythe.DisplayName: Blood Scythe BrimstoneBall.DisplayName: Brimstone Fireball diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 0f2bf130da..0fcbeb04a1 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -180,9 +180,13 @@ namespace CalamityMod // { "Xeroc", 26f }, }; - public override void PostSetupContent() + public override void Load() { LavaStyleToBiomeLava(); + } + + public override void PostSetupContent() + { BossChecklistSupport(); FargosSupport(); DialogueTweakSupport(); @@ -214,7 +218,7 @@ namespace CalamityMod Func ModifyLightFunc = ModifyLight; Func IsLavaActive = lavaStyle.IsLavaActive; Func lavafallGlowmask = lavaStyle.LavafallGlowmask; - Func InflictDebuffFunc = InflictDebuff; + Action InflictDebuffFunc = InflictDebuff; Func yes = InflictsOnFire; Vector3 ModifyLight(int x, int y, float r, float g, float b) @@ -223,13 +227,12 @@ namespace CalamityMod return new Vector3(r, g, b); } - Action InflictDebuff(Player player, NPC npc, int onfireDuration) + void InflictDebuff(Player player, NPC npc, int onfireDuration) { if (player != null && npc == null) { lavaStyle.InflictDebuff(player, onfireDuration); } - return null; } bool InflictsOnFire() diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index f01e24fb37..00d7c4dbd7 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -891,11 +891,6 @@ namespace CalamityMod.NPCs { ActiveWaterDebuffMultiplier += 1; } - - if (npc.HasBuff()) //Searing Lava is so hot it makes cold less strong - { - ActiveColdDebuffMultiplier -= 0.5f; - } if (VulnerableToHeat.HasValue) { if (VulnerableToHeat.Value) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 2e8d54eebc..21bdbb8ca3 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -1253,7 +1253,7 @@ namespace CalamityMod.NPCs if (type == NPCID.ArmsDealer) { - shop.AddWithCustomValue(ItemType(), Item.buyPrice(gold: 20), Condition.DownedSkeletron) + shop.Add(Condition.DownedSkeletron) .Add(Condition.Hardmode) .AddWithCustomValue(ItemID.Boomstick, Item.buyPrice(gold: 25), Condition.DownedQueenBee) .AddWithCustomValue(ItemID.Uzi, Item.buyPrice(gold: 50), Condition.DownedPlantera); diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index bacd9e74db..6ed76faa1a 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -617,6 +617,8 @@ namespace CalamityMod.NPCs.OldDuke CalamityUtils.AddScreenshakeAt(NPC.Center, 14); SoundEngine.PlaySound(SoundID.DD2_BetsyFlameBreath.WithPitchOffset(-0.5f), NPC.Center); SoundEngine.PlaySound(DashSoundP3, NPC.Center); + if (Main.netMode != NetmodeID.MultiplayerClient) + CalamityUtils.BossAwakenMessage(NPC.whoAmI); } if (NPC.ai[2] >= 75f) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs index 0fb08a8dd9..9b70e6bac4 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs @@ -41,6 +41,7 @@ public class BrainOfCthulhuAI : VanillaAIOverride private static SoundStyle Growl = new SoundStyle("CalamityMod/Sounds/Custom/BrainOfCthulhu/BoC_Rev_Growl", 2) with { PauseBehavior = PauseBehavior.PauseWithGame }; private static SoundStyle Death = new SoundStyle("CalamityMod/Sounds/Custom/BrainOfCthulhu/BoC_Rev_Death_Roar") with { PauseBehavior = PauseBehavior.PauseWithGame }; private static SoundStyle BloodShot = new SoundStyle("CalamityMod/Sounds/Custom/BrainOfCthulhu/BoC_Rev_BloodShot"); + private static SoundStyle BloodBomb = new SoundStyle("CalamityMod/Sounds/Custom/BrainOfCthulhu/BoC_Rev_BloodBomb"); private static SoundStyle BloodExplosion = new SoundStyle("CalamityMod/Sounds/Custom/BrainOfCthulhu/BoC_Rev_Explosion", 2); @@ -153,7 +154,7 @@ public class BrainOfCthulhuAI : VanillaAIOverride internal static int BloodlettingDuration => 675; internal static Vector2 HoverDistance => new (420f, 300f); internal static float HoverEndHeight => 300f; - internal static int IchorRate => CalamityWorld.death ? 9 : 10; + internal static int IchorRate => CalamityWorld.death ? 10 : 12; internal static float IchorSpread => 1.5f; internal static float IchorVelocity => 3f; internal static int BloodshotRate => 90; @@ -1887,20 +1888,29 @@ public class BrainOfCthulhuAI : VanillaAIOverride { if (Time % IchorRate == 0) { - if (Time % (IchorRate * 2) == 0) - SoundEngine.PlaySound(SoundID.Item17, NPC.Center); - - if(Main.netMode == NetmodeID.SinglePlayer) - Projectile.NewProjectile(NPC.GetSource_FromThis(), NPC.Center + NPC.velocity + Main.rand.NextVector2Circular(72, 72), new Vector2(Main.rand.NextFloat(-IchorSpread, IchorSpread), -IchorVelocity), ModContent.ProjectileType(), IchorShotDamage, 0.5f); - else if(Main.dedServ) + if (Time > BloodshotRate + 30 && Time % (IchorRate * 10) == 0) { - Player furthestLeft = Main.player[AttackList[0]]; - Player furthestRight = Main.player[AttackList[1]]; - float xDist = furthestRight.Center.X - furthestLeft.Center.X; - int projCount = 1 + (int)(xDist / 360); + SoundEngine.PlaySound(BloodBomb, NPC.Center); + if (Main.netMode != NetmodeID.MultiplayerClient) + NPC.NewNPC(NPC.GetSource_FromThis(), (int)NPC.Center.X, (int)NPC.Center.Y, ModContent.NPCType(), NPC.whoAmI); + } + else + { + if (Time % (IchorRate * 2) == 0) + SoundEngine.PlaySound(SoundID.Item17, NPC.Center); - for(int i = 0; i < projCount; i++) + if (Main.netMode == NetmodeID.SinglePlayer) Projectile.NewProjectile(NPC.GetSource_FromThis(), NPC.Center + NPC.velocity + Main.rand.NextVector2Circular(72, 72), new Vector2(Main.rand.NextFloat(-IchorSpread, IchorSpread), -IchorVelocity), ModContent.ProjectileType(), IchorShotDamage, 0.5f); + else if (Main.dedServ) + { + Player furthestLeft = Main.player[AttackList[0]]; + Player furthestRight = Main.player[AttackList[1]]; + float xDist = furthestRight.Center.X - furthestLeft.Center.X; + int projCount = 1 + (int)(xDist / 360); + + for (int i = 0; i < projCount; i++) + Projectile.NewProjectile(NPC.GetSource_FromThis(), NPC.Center + NPC.velocity + Main.rand.NextVector2Circular(72, 72), new Vector2(Main.rand.NextFloat(-IchorSpread, IchorSpread), -IchorVelocity), ModContent.ProjectileType(), IchorShotDamage, 0.5f); + } } } @@ -2479,13 +2489,15 @@ public class BrainOfCthulhuAI : VanillaAIOverride NPC.velocity *= 0.9f; if (startTime % 15 == 5 && startTime > 60 + IllusionDashSpinDuration + 30 + IllusionDashFakeoutTeleportDuration) { + Vector2 dir = NPC.DirectionTo(Target.Center); + for (int i = 0; i < (CalamityWorld.death ? 2 : 1); i++) { - Vector2 dir = NPC.DirectionTo(Target.Center); if (Main.netMode != NetmodeID.MultiplayerClient) { Vector2 initialDir = dir.RotatedBy(MathHelper.Pi + Main.rand.NextFloat(-0.01f, 0.01f)); - Projectile.NewProjectile(NPC.GetSource_FromThis(), NPC.Center + Main.rand.NextVector2Circular(NPC.width, NPC.width), initialDir * Main.rand.NextFloat(6f, 8f), ProjectileID.BloodNautilusShot, BloodShotDamage, 0.5f, ai0: dir.ToRotation() + MathHelper.TwoPi, ai1: initialDir.ToRotation()); + Vector2 spawnPos = NPC.Center + (dir.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(-NPC.width, NPC.width) - (dir * 48)); + Projectile.NewProjectile(NPC.GetSource_FromThis(), spawnPos, initialDir * Main.rand.NextFloat(6f, 8f), ProjectileID.BloodNautilusShot, BloodShotDamage, 0.5f, ai0: dir.ToRotation() + MathHelper.TwoPi, ai1: initialDir.ToRotation()); } NPC.velocity -= dir; } diff --git a/Prefixes/ReforgeChange.cs b/Prefixes/ReforgeChange.cs index 7334129f63..5a42927f66 100644 --- a/Prefixes/ReforgeChange.cs +++ b/Prefixes/ReforgeChange.cs @@ -1,5 +1,6 @@ using System; using System.Linq; +using CalamityMod.Items.Weapons.Melee; using CalamityMod.NPCs.TownNPCs; using CalamityMod.Packets; using CalamityMod.World; @@ -193,7 +194,7 @@ namespace CalamityMod.Prefixes // MELEE (includes tools and whips) // Melee-ranged hybrid weapons prioritize Legendary if available, otherwise go for Unreal - if ((item.CountsAsClass() || item.CountsAsClass()) && !(item.CountsAsClass() && !supportsLegendary)) + if ((item.CountsAsClass() || item.CountsAsClass()) && !(item.CountsAsClass() && !supportsLegendary) && !(item.type == ItemType())) { // Terrarian (has its own special "Legendary" for marketing reasons) // Other items that want to use Legendary2 are also compatible @@ -218,8 +219,8 @@ namespace CalamityMod.Prefixes } } - // RANGED - else if (item.CountsAsClass()) + // RANGED (and also Burning Sky) + else if (item.CountsAsClass() || item.type == ItemType()) { prefix = IteratePrefix(rand, RangedPrefixTiers, currentPrefix); } diff --git a/Projectiles/Boss/BrainOfCthulhu/BloodBomb.cs b/Projectiles/Boss/BrainOfCthulhu/BloodBomb.cs new file mode 100644 index 0000000000..686fb8adac --- /dev/null +++ b/Projectiles/Boss/BrainOfCthulhu/BloodBomb.cs @@ -0,0 +1,267 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CalamityMod.Items.Placeables.Banners; +using CalamityMod.Particles; +using CalamityMod.Projectiles.Typeless; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Boss.BrainOfCthulhu; + +public class BloodBomb : ModNPC, ILocalizedModType +{ + public new string LocalizationCategory => "NPCs"; + + internal static Asset BloodBombYellow; + internal static Texture2D BloodBombGlow; + + public override void SetStaticDefaults() + { + NPCID.Sets.ProjectileNPC[Type] = true; + BloodBombYellow = ModContent.Request("CalamityMod/Projectiles/Boss/BrainOfCthulhu/BloodBomb2"); + } + + internal static Texture2D GetBombGlow() + { + if (BloodBombGlow == null) + { + var tex = new Texture2D(Main.graphics.GraphicsDevice, BloodBombYellow.Value.Width, BloodBombYellow.Value.Height); + + var BaseArray = new Color[tex.Width * tex.Height]; + var ColorArray = new Color[tex.Width * tex.Height]; + BloodBombYellow.Value.GetData(BaseArray); + for (var i = 0; i < BaseArray.Length; i++) + { + ColorArray[i] = new Color(255, 255, 255) * (((float)BaseArray[i].A) / 255f); + } + tex.SetData(ColorArray); + BloodBombGlow = tex; + } + + return BloodBombGlow; + } + + public override void SetDefaults() + { + NPC.width = 30; + NPC.height = 30; + NPC.noGravity = true; + NPC.damage = 10; + NPC.defense = 5; + NPC.lifeMax = 60; + NPC.Calamity().canBreakPlayerDefense = true; + NPC.lavaImmune = true; + NPC.aiStyle = -1; + AIType = -1; + NPC.value = 0; + NPC.HitSound = SoundID.NPCHit1; + NPC.DeathSound = SoundID.NPCHit1 with { Pitch = 0.5f }; + NPC.knockBackResist = 0f; + NPC.chaseable = false; + NPC.noTileCollide = true; + NPC.ShowNameOnHover = false; + } + + public override void OnSpawn(IEntitySource source) + { + if (source is EntitySource_Parent { Entity: NPC n }) + NPC.ai[1] = n.whoAmI; + else + NPC.ai[1] = -1; + + Vector2 goal = Main.player[0].Center - NPC.Center; + + float vyi = 6; + float vyisq = 36; + float g = 0.2f; + + float vyf = -MathF.Sqrt(vyisq + 2 * g * goal.Y); + float t = Math.Abs((vyf - vyi) / g); + + float vxi = goal.X / t; + + NPC.velocity = new Vector2(float.IsNaN(vxi) ? (goal.X > 0 ? 10 : -10) : vxi, -vyi); + + for (int i = 0; i < 3; i++) + { + BloodParticle p = new(NPC.Center, NPC.velocity.RotatedBy(Main.rand.NextFloat(-MathHelper.Pi / 6f, MathHelper.Pi / 6f)) * Main.rand.NextFloat(2f, 3f), 32, 1f, Color.Red); + GeneralParticleHandler.SpawnParticle(p); + } + BloodParticle2 p2 = new(NPC.Center, NPC.velocity * 2.5f, 16, 0.5f, Color.Red); + GeneralParticleHandler.SpawnParticle(p2); + } + + public override void AI() + { + if (NPC.ai[0] > 1200) + NPC.active = false; + + NPC.velocity.Y += 0.2f; + + NPC.rotation += Math.Sign(NPC.velocity.X) * (NPC.velocity.Length()) * 0.01f; + + if (NPC.ai[0] % 3 == 0) + { + float deathRatio = 1 - (NPC.life / NPC.lifeMax); + float time = Main.GlobalTimeWrappedHourly * (10f + (10f * deathRatio)); + float lerp = MathF.Sin(time) / 2f + 0.5f; + Color color = Color.Lerp(Color.Red, Color.Yellow, lerp); + + BloodParticle p = new(NPC.Center + Main.rand.NextVector2Circular(NPC.width, NPC.height), (-NPC.velocity).RotatedBy(Main.rand.NextFloat(-MathHelper.Pi / 6f, MathHelper.Pi / 6f)) * Main.rand.NextFloat(0.25f, 0.75f), Main.rand.Next(10, 17), Main.rand.NextFloat(0.5f, 1f), color); + GeneralParticleHandler.SpawnParticle(p); + } + + NPC.ai[0]++; + } + + public override void ModifyHitByItem(Player player, Item item, ref NPC.HitModifiers modifiers) + { + if (modifiers.DamageType == TrueMeleeDamageClass.Instance) + { + modifiers.FinalDamage *= 1.5f; + return; + } + + float dist = player.DistanceSQ(NPC.Center); + dist = MathHelper.Clamp(dist - 10000, 0, 160000); + if (dist > 160000) + modifiers.FinalDamage *= 0; + else + modifiers.FinalDamage *= MathHelper.Lerp(1f, 0f, dist / 160000f); + } + + public override void ModifyHitByProjectile(Projectile projectile, ref NPC.HitModifiers modifiers) + { + if (modifiers.DamageType == TrueMeleeDamageClass.Instance) + { + modifiers.FinalDamage *= 1.5f; + return; + } + + if (projectile.owner == -1) + { + modifiers.FinalDamage *= 0; + return; + } + + float dist = Main.player[projectile.owner].DistanceSQ(NPC.Center); + dist = MathHelper.Clamp(dist - 10000, 0, 160000); + if (dist > 160000f) + modifiers.FinalDamage *= 0; + else + modifiers.FinalDamage *= MathHelper.Lerp(1f, 0f, dist / 160000f); + } + + public override void HitEffect(NPC.HitInfo hit) + { + if(NPC.life <= 0) + { + if (NPC.ai[1] == -1) + NPC.ai[1] = NPC.Center.ClosestNPCAt(1200, true, true).whoAmI; + Projectile.NewProjectile(NPC.GetSource_FromThis(), NPC.Center, NPC.DirectionTo(Main.npc[(int)NPC.ai[1]].Center) * 16f, ModContent.ProjectileType(), 40, 1f, -1, NPC.ai[1]); + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) + { + float deathRatio = 1 - (NPC.life / NPC.lifeMax); + float time = Main.GlobalTimeWrappedHourly * (10f + (10f * deathRatio)); + float lerp = MathF.Sin(time) / 2f + 0.5f; + + Texture2D baseTex = TextureAssets.Npc[Type].Value; + Texture2D overlayTex = BloodBombYellow.Value; + + Vector2 drawPos = NPC.Center - Main.screenPosition + Main.rand.NextVector2CircularEdge((2 * deathRatio), (2 * deathRatio)); + float scale = 1.5f + (MathF.Sin(time) * 0.25f); + + if (Main.LocalPlayer.HasBuff(BuffID.Hunter)) + spriteBatch.Draw(GetBombGlow(), drawPos, null, Color.OrangeRed, NPC.rotation, BloodBombGlow.Size() * 0.5f, scale + 0.15f, 0, 0); + + spriteBatch.Draw(baseTex, drawPos, null, Color.White, NPC.rotation, baseTex.Size() * 0.5f, scale, 0, 0); + spriteBatch.Draw(overlayTex, drawPos, null, Color.White * lerp, NPC.rotation, overlayTex.Size() * 0.5f, scale, 0, 0); + return false; + } +} + +public class BloodBombRTS : ModProjectile, ILocalizedModType +{ + public new string LocalizationCategory => "Projectiles.Boss"; + public override string Texture => "CalamityMod/Projectiles/Boss/BrainOfCthulhu/BloodBomb"; + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 2; + } + + public override void SetDefaults() + { + Projectile.width = 30; + Projectile.height = 30; + Projectile.penetrate = 1; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.damage = 10; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.tileCollide = false; + Projectile.timeLeft = 360; + } + + public override void AI() + { + NPC npc = Main.npc[(int)Projectile.ai[0]]; + if(npc.active && !npc.dontTakeDamage) + Projectile.velocity = Projectile.DirectionTo(npc.Center) * 16f; + } + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + modifiers.SetCrit(); + } + + public override void OnKill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.DD2_ExplosiveTrapExplode, Projectile.Center); + + CustomPulse explosion1 = new(Projectile.Center, Vector2.Zero, Color.OrangeRed, "CalamityMod/Particles/FlameExplosion", Vector2.One, Main.rand.NextFloat(0f, MathHelper.Pi), 0f, 0.1f, 24); + GeneralParticleHandler.SpawnParticle(explosion1); + + CustomPulse explosion2 = new(Projectile.Center, Vector2.Zero, Color.Red, "CalamityMod/Particles/FlameExplosion", Vector2.One, Main.rand.NextFloat(0f, MathHelper.Pi), 0f, 0.075f, 24); + GeneralParticleHandler.SpawnParticle(explosion2); + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = TextureAssets.Projectile[Type].Value; + Texture2D overlayTex = BloodBomb.BloodBombYellow.Value; + + + for (int i = 0; i < (CalamityClientConfig.Instance.Afterimages ? Projectile.oldPos.Length : 1); ++i) + { + float time = (Main.GlobalTimeWrappedHourly * 30) - (i / 2f); + float lerp = MathF.Sin(time) / 2f + 0.5f; + Color color = Color.White; + float afterimageRot = Projectile.oldRot[i]; + Vector2 drawPos = Projectile.oldPos[i] + (Projectile.Size / 2f) - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); + if (i != 0) + color *= 0.75f; + + // DO NOT REMOVE THESE "UNNECESSARY" FLOAT CASTS. THIS WILL BREAK THE AFTERIMAGES. + float interpolant = ((float)(Projectile.oldPos.Length - i) / (float)Projectile.oldPos.Length); + Main.spriteBatch.Draw(tex, drawPos, null, color * (1 - lerp), afterimageRot, tex.Size() * 0.5f, (Projectile.scale + MathF.Sin(time) / 2f + 0.5f) * interpolant, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(overlayTex, drawPos, null, color * lerp, afterimageRot, overlayTex.Size() * 0.5f, (Projectile.scale + MathF.Sin(time) / 2f + 0.5f) * interpolant, SpriteEffects.None, 0f); + + } + return false; + } +} diff --git a/Projectiles/Boss/BrainOfCthulhu/BloodBomb.png b/Projectiles/Boss/BrainOfCthulhu/BloodBomb.png new file mode 100644 index 0000000000..ab2860fe7b Binary files /dev/null and b/Projectiles/Boss/BrainOfCthulhu/BloodBomb.png differ diff --git a/Projectiles/Boss/BrainOfCthulhu/BloodBomb2.png b/Projectiles/Boss/BrainOfCthulhu/BloodBomb2.png new file mode 100644 index 0000000000..47c4444e55 Binary files /dev/null and b/Projectiles/Boss/BrainOfCthulhu/BloodBomb2.png differ diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index d948592299..3ef1da8963 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -18,8 +18,10 @@ using CalamityMod.Items.Armor.Daedalus; using CalamityMod.Items.Armor.Reaver; using CalamityMod.Items.Fishing.FishingRods; using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.Items.SummonItems; using CalamityMod.Items.VanillaArmorChanges; using CalamityMod.NPCs; +using CalamityMod.NPCs.OldDuke; using CalamityMod.NPCs.PlagueEnemies; using CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses; using CalamityMod.Packets.Entities; @@ -336,7 +338,7 @@ namespace CalamityMod.Projectiles { if (player.Calamity().grapeBeer && (item.useAmmo == AmmoID.Bullet || item.useAmmo == AmmoID.Arrow || item.useAmmo == AmmoID.Dart || item.useAmmo == AmmoID.Rocket)) { - if (player.heldProj != projectile.whoAmI && projectile.aiStyle != ProjAIStyleID.HeldProjectile && projectile.damage > 0 && player.Calamity().grapeBeerTimer < 5 && !CalamityProjectileSets.DoesNotGetHomingWithGrapeBeer[projectile.type]) + if (player.heldProj != projectile.whoAmI && projectile.aiStyle != ProjAIStyleID.HeldProjectile && projectile.damage > 0 && !CalamityProjectileSets.DoesNotGetHomingWithGrapeBeer[projectile.type]) ApplyGrapeBeer(); else grapeBeer = true; @@ -357,7 +359,7 @@ namespace CalamityMod.Projectiles //Grape Beer homing if (parent.Calamity().grapeBeer) { - if (Main.player[projectile.owner].heldProj != projectile.whoAmI && projectile.aiStyle != ProjAIStyleID.HeldProjectile && projectile.damage > 0 && Main.player[projectile.owner].Calamity().grapeBeerTimer < 5 && !CalamityProjectileSets.DoesNotGetHomingWithGrapeBeer[projectile.type]) + if (Main.player[projectile.owner].heldProj != projectile.whoAmI && projectile.aiStyle != ProjAIStyleID.HeldProjectile && projectile.damage > 0 && !CalamityProjectileSets.DoesNotGetHomingWithGrapeBeer[projectile.type]) ApplyGrapeBeer(); else grapeBeer = true; @@ -2967,6 +2969,10 @@ namespace CalamityMod.Projectiles { NPC.SpawnOnPlayer(owner.whoAmI, 370); } + else + { + NetMessage.SendData(MessageID.SpawnBossUseLicenseStartEvent, -1, -1, null, owner.whoAmI, 370f); + } projectile.ai[0] = 2f; } else if (projectile.localAI[1] < 1) @@ -3313,7 +3319,29 @@ namespace CalamityMod.Projectiles if (cplayer.mouseRight && projectile.ai[1] == 0 && owner.miscCounter % 10 == 0) { owner.lifeRegenCount -= 600; // -5 health per 10 ticks - var projID = Projectile.NewProjectile(projectile.GetSource_FromThis(), Main.npc[(int)PersistentFishingData].Center, Vector2.Zero, ModContent.ProjectileType(), (int)owner.GetBestClassDamage().ApplyTo(owner.HeldItem.fishingPole + owner.fishingSkill + owner.ChooseAmmo(owner.HeldItem).bait), 0f, owner.whoAmI, Main.npc[(int)PersistentFishingData].whoAmI); + owner.Fishing_GetBait(out Item baitItem); + + // Diminishing returns on bait power beyond 75 + int baitPower = baitItem?.bait ?? 0; + if (baitItem?.type == ItemID.TruffleWorm) + { + projectile.ai[0] = 1; + projectile.localAI[1] = 1; + ReelTheBobberChecks(); + } + else if (baitItem?.type == ItemType()) + { + projectile.ai[0] = 1; + projectile.localAI[1] = NPCType() * -1; + baitPower = 4444; // Manually set the power to the displayed value + ReelTheBobberChecks(); + } + else if (baitPower > 75) + { + baitPower = (int)Math.Pow((baitPower - 75), 0.5f) + 75; + } + + var projID = Projectile.NewProjectile(projectile.GetSource_FromThis(), Main.npc[(int)PersistentFishingData].Center, Vector2.Zero, ModContent.ProjectileType(), (int)owner.GetBestClassDamage().ApplyTo(owner.HeldItem.fishingPole + owner.fishingSkill + baitPower), 0f, owner.whoAmI, Main.npc[(int)PersistentFishingData].whoAmI); if (Main.projectile.IndexInRange(projID)) { Main.projectile[projID].ArmorPenetration = 100; //This should ignore almost all armor @@ -4687,7 +4715,7 @@ namespace CalamityMod.Projectiles { var player = Main.player[projectile.owner]; float burnRatio = (-player.statMana / 100) * ChaosStone.DamageMultPer100Mana; - target.Calamity().manaBurn += damageDone * burnRatio * (player.Calamity().oldFashioned ? OldFashioned.DamageBoostMultiplier : 1) * (player.Calamity().ivDrip ? IVDripOnTheRocks.DamageBoostMultiplier : 1); + target.Calamity().manaBurn += damageDone * burnRatio * (player.Calamity().oldFashioned ? OldFashioned.DamageBoostMultiplier : 1) * (player.Calamity().ivDrip ? IVDripOnTheRocks.DamageBoostMultiplier : 1) * (player.Calamity().vodka ? 1+Vodka.DebuffBoost : 1); target.Calamity().playerManaBurnIntensity = -player.statMana / (float)player.statManaMax2; if (Main.netMode != NetmodeID.SinglePlayer) ManaBurnSyncPacket.Send(target); diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 9d21db0c48..3c9e997be9 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -138,7 +138,7 @@ namespace CalamityMod.Projectiles { ProjectileID.ClusterFragmentsII, Do(IDStaticIFrames(15)) }, { ProjectileID.ClusterSnowmanRocketI, Do(LocalIFrames(15)) }, { ProjectileID.ClusterSnowmanRocketII, Do(LocalIFrames(15)) }, - { ProjectileID.DangerousSpider, Do( ExtraUpdatesExact(2), LocalIFrames(45)) }, //Spider Staff spiders. It has Venom, Dangerous, and Jumping spiders. + { ProjectileID.DangerousSpider, Do( ExtraUpdatesExact(2), LocalIFrames(90)) }, //Spider Staff spiders. It has Venom, Dangerous, and Jumping spiders. { ProjectileID.DD2SquireSonicBoom, Do(PiercingExact(3), DefaultIDStaticIFrames) }, // Flying Dragon { ProjectileID.DeadlySphere, Do(LocalIFrames(30)) }, { ProjectileID.EmeraldBolt, Do(NoPiercing) }, @@ -165,7 +165,7 @@ namespace CalamityMod.Projectiles { ProjectileID.InfluxWaver, Do(ExtraUpdatesExact(1)) }, { ProjectileID.InfernoFriendlyBolt, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, { ProjectileID.InfernoFriendlyBlast, Do(ExtraUpdatesExact(2), DefaultIDStaticIFrames) }, - { ProjectileID.JumperSpider, Do( ExtraUpdatesExact(2), LocalIFrames(45)) }, //Spider Staff spiders. It has Venom, Dangerous, and Jumping spiders. + { ProjectileID.JumperSpider, Do( ExtraUpdatesExact(2), LocalIFrames(90)) }, //Spider Staff spiders. It has Venom, Dangerous, and Jumping spiders. { ProjectileID.LaserDrill, Do(ArmorPenetrationDelta(+25), LocalIFrames(5)) }, { ProjectileID.LightDisc, Do(MaxUpdatesExact(3), DefaultIDStaticIFrames) }, { ProjectileID.LostSoulHostile, Do(TileCollide) }, // Ragged Caster @@ -209,7 +209,7 @@ namespace CalamityMod.Projectiles { ProjectileID.Trimarang, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, { ProjectileID.TrueNightsEdge, Do(PiercingExact(4)) }, { ProjectileID.VenomBullet, Do(ExtraUpdatesDelta(+2), DefaultIDStaticIFrames) }, - { ProjectileID.VenomSpider, Do( ExtraUpdatesExact(2), LocalIFrames(45)) }, //Spider Staff spiders. It has Venom, Dangerous, and Jumping spiders. + { ProjectileID.VenomSpider, Do( ExtraUpdatesExact(2), LocalIFrames(90)) }, //Spider Staff spiders. It has Venom, Dangerous, and Jumping spiders. { ProjectileID.VortexDrill, standardDrillTweaks }, { ProjectileID.Wasp, Do(PiercingExact(2)) }, { ProjectileID.WeatherPainShot, Do(ExtraUpdatesExact(3), TimeLeftExact(1920)) }, @@ -328,7 +328,7 @@ namespace CalamityMod.Projectiles { ProjectileID.CrimsandBallGun, defaultIFrames }, { ProjectileID.CrimsonHeart, defaultIFrames }, { ProjectileID.CrimsonSpray, defaultIFrames }, - { ProjectileID.CrystalDart, Do( ExtraUpdatesExact(2), LocalIFrames(-1)) }, + { ProjectileID.CrystalDart, Do(ExtraUpdatesExact(2), LocalIFrames(-1)) }, { ProjectileID.CrystalLeaf, defaultIFrames }, { ProjectileID.CrystalLeafShot, defaultIFrames }, { ProjectileID.CrystalPulse, defaultIFrames }, @@ -338,7 +338,7 @@ namespace CalamityMod.Projectiles { ProjectileID.CrystalVileShardHead, defaultIFrames }, { ProjectileID.CrystalVileShardShaft, defaultIFrames }, { ProjectileID.CursedArrow, defaultIFrames }, - { ProjectileID.CursedDart, Do( ExtraUpdatesExact(1), LocalIFrames(20)) }, + { ProjectileID.CursedDart, Do(ExtraUpdatesExact(1), LocalIFrames(20)) }, { ProjectileID.CursedDartFlame, defaultIFrames }, { ProjectileID.CursedFlameFriendly, defaultIFrames }, { ProjectileID.CursedFlare, defaultIFrames }, @@ -397,7 +397,7 @@ namespace CalamityMod.Projectiles { ProjectileID.IceBlock, defaultIFrames }, { ProjectileID.IceBolt, defaultIFrames }, { ProjectileID.IchorArrow, defaultIFrames }, - { ProjectileID.IchorDart, Do( ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, + { ProjectileID.IchorDart, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, { ProjectileID.JackOLantern, defaultIFrames }, { ProjectileID.JavelinFriendly, defaultIFrames }, { ProjectileID.JestersArrow, defaultIFrames }, @@ -412,13 +412,9 @@ namespace CalamityMod.Projectiles { ProjectileID.LavaSnowmanRocket, defaultIFrames }, { ProjectileID.Leaf, defaultIFrames }, { ProjectileID.LifeCrystalBoulder, defaultIFrames }, - { ProjectileID.MagicMissile, Do(IDStaticIFrames(8)) }, // Has an exception in Vanilla iframe code, uses 8 iframes { ProjectileID.MagnetSphereBolt, defaultIFrames }, { ProjectileID.MedusaHead, defaultIFrames }, { ProjectileID.MedusaHeadRay, defaultIFrames }, - { ProjectileID.Meteor1, Do(IDStaticIFrames(5)) }, // Has an exception in Vanilla iframe code, uses 5 iframes - { ProjectileID.Meteor2, Do(IDStaticIFrames(5)) }, // Has an exception in Vanilla iframe code, uses 5 iframes - { ProjectileID.Meteor3, Do(IDStaticIFrames(5)) }, // Has an exception in Vanilla iframe code, uses 5 iframes { ProjectileID.MinecartMechLaser, defaultIFrames }, { ProjectileID.MiniBoulder, defaultIFrames }, { ProjectileID.MiniMinotaur, defaultIFrames }, @@ -441,8 +437,6 @@ namespace CalamityMod.Projectiles { ProjectileID.NailFriendly, Do(IDStaticIFrames(1)) }, // Has an exception in Vanilla iframe code, uses 1 iframe { ProjectileID.NebulaArcanumExplosionShot, defaultIFrames }, { ProjectileID.NebulaArcanumExplosionShotShard, defaultIFrames }, - { ProjectileID.NebulaBlaze1, Do(IDStaticIFrames(5)) }, // Has an exception in Vanilla iframe code, uses 5 iframes - { ProjectileID.NebulaBlaze2, Do(IDStaticIFrames(5)) }, // Has an exception in Vanilla iframe code, uses 5 iframes { ProjectileID.NettleBurstEnd, defaultIFrames }, { ProjectileID.NettleBurstLeft, defaultIFrames }, { ProjectileID.NettleBurstRight, defaultIFrames }, @@ -466,7 +460,7 @@ namespace CalamityMod.Projectiles { ProjectileID.PhantasmArrow, defaultIFrames }, { ProjectileID.PineNeedleFriendly, defaultIFrames }, { ProjectileID.PlatinumCoin, defaultIFrames }, - { ProjectileID.PoisonDart, Do( ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, + { ProjectileID.PoisonDart, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, { ProjectileID.PoisonDartBlowgun, defaultIFrames }, { ProjectileID.PoisonDartTrap, defaultIFrames }, { ProjectileID.PoisonedKnife, defaultIFrames }, @@ -549,7 +543,6 @@ namespace CalamityMod.Projectiles { ProjectileID.StickyDynamite, defaultIFrames }, { ProjectileID.StickyGrenade, defaultIFrames }, { ProjectileID.StormTigerGem, defaultIFrames }, - { ProjectileID.Stynger, Do(IDStaticIFrames(7)) }, // Has an exception in Vanilla iframe code, uses 7 iframes { ProjectileID.StyngerShrapnel, defaultIFrames }, { ProjectileID.TentacleSpike, defaultIFrames }, { ProjectileID.ThornChakram, defaultIFrames }, @@ -566,7 +559,6 @@ namespace CalamityMod.Projectiles { ProjectileID.ToxicFlask, defaultIFrames }, { ProjectileID.Truffle, defaultIFrames }, { ProjectileID.TruffleSpore, defaultIFrames }, - { ProjectileID.Typhoon, Do(IDStaticIFrames(6)) }, // Has an exception in Vanilla iframe code, uses 6 iframes { ProjectileID.UFOLaser, defaultIFrames }, { ProjectileID.UFOMinion, defaultIFrames }, { ProjectileID.UnholyArrow, defaultIFrames }, diff --git a/Projectiles/Magic/HyperdeathRiftScepterBeam.cs b/Projectiles/Magic/HyperdeathRiftScepterBeam.cs index 284db13562..3a44dcb13b 100644 --- a/Projectiles/Magic/HyperdeathRiftScepterBeam.cs +++ b/Projectiles/Magic/HyperdeathRiftScepterBeam.cs @@ -45,6 +45,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.scale = 2; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; + Projectile.DamageType = DamageClass.Magic; } public override void AI() { diff --git a/Projectiles/Melee/DevilsDevastationHoldout.cs b/Projectiles/Melee/DevilsDevastationHoldout.cs index 3f526d4002..501bccd737 100644 --- a/Projectiles/Melee/DevilsDevastationHoldout.cs +++ b/Projectiles/Melee/DevilsDevastationHoldout.cs @@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 vel = (MathHelper.TwoPi * i / 4f).ToRotationVector2() * 2; Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), lastHitTarget.Center, vel.RotatedBy(MathHelper.ToRadians(45)), ModContent.ProjectileType(), 0, 0f, Owner.whoAmI, 1, 0); } - Projectile strike = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), lastHitTarget.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 1.5f), 0f, Owner.whoAmI, lastHitTarget.whoAmI, 0); + Projectile strike = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), lastHitTarget.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 1.666f), 0f, Owner.whoAmI, lastHitTarget.whoAmI, 0); strike.DamageType = DamageClass.Melee; SoundStyle dieSound = new("CalamityMod/Sounds/Item/LanceofDestinyStrong"); SoundEngine.PlaySound(dieSound with { Volume = 0.9f, Pitch = 0.3f }, lastHitTarget.Center); diff --git a/Projectiles/Melee/MonstrousKnife.cs b/Projectiles/Melee/MonstrousKnife.cs index 7cfb2d2d45..8f2abedb44 100644 --- a/Projectiles/Melee/MonstrousKnife.cs +++ b/Projectiles/Melee/MonstrousKnife.cs @@ -45,6 +45,6 @@ namespace CalamityMod.Projectiles.Melee } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ProjectileID.VampireHeal, 1, 3f); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ProjectileID.VampireHeal, 1, 4f); //4x cooldown = 23.3 HP bank, 2.25 hp/s refill } } diff --git a/Projectiles/Melee/Shortswords/GalileoGladiusThrown.cs b/Projectiles/Melee/Shortswords/GalileoGladiusThrown.cs index 83f946ec7a..ae618ec5b3 100644 --- a/Projectiles/Melee/Shortswords/GalileoGladiusThrown.cs +++ b/Projectiles/Melee/Shortswords/GalileoGladiusThrown.cs @@ -140,7 +140,7 @@ namespace CalamityMod.Projectiles.Melee.Shortswords { for (var i = 0; i < 10; i++) GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center, (Projectile.rotation-MathHelper.PiOver4).ToRotationVector2().RotatedByRandom(0.4f) * -Main.rand.Next(10,20), false, 30, 2, new Color(69, 69, 200))); - Projectile.damage = (int)(Projectile.damage*15f); + Projectile.damage = (int)(Projectile.damage*10f); Projectile.Damage(); Owner.Calamity().StratusStarburst -= 10; for (int i = 0; i < 3; i++) @@ -153,6 +153,7 @@ namespace CalamityMod.Projectiles.Melee.Shortswords Main.projectile[proj].usesIDStaticNPCImmunity = false; Main.projectile[proj].usesLocalNPCImmunity = true; Main.projectile[proj].localNPCHitCooldown = 20; + Main.projectile[proj].timeLeft = Main.projectile[proj].MaxUpdates * 600; } } Projectile.velocity = (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2() * -15; @@ -184,7 +185,7 @@ namespace CalamityMod.Projectiles.Melee.Shortswords Projectile.damage = Projectile.originalDamage; if (Owner.Calamity().AvaliableStarburst >= 20) { - Projectile.damage = (int)(Projectile.damage* 30f); + Projectile.damage = (int)(Projectile.damage*20f); Owner.SetImmuneTimeForAllTypes(Owner.longInvince ? 40 : 20); Owner.Calamity().StratusStarburst -= 20; SoundEngine.PlaySound(SoundID.DD2_MonkStaffGroundImpact, Owner.Center); @@ -201,6 +202,8 @@ namespace CalamityMod.Projectiles.Melee.Shortswords Main.projectile[proj].usesIDStaticNPCImmunity = false; Main.projectile[proj].usesLocalNPCImmunity = true; Main.projectile[proj].localNPCHitCooldown = 20; + Main.projectile[proj].timeLeft = Main.projectile[proj].MaxUpdates * 600; + } } } diff --git a/Projectiles/Ranged/HalleysInfernoHoldout.cs b/Projectiles/Ranged/HalleysInfernoHoldout.cs index 166b8d838d..9d09b629f1 100644 --- a/Projectiles/Ranged/HalleysInfernoHoldout.cs +++ b/Projectiles/Ranged/HalleysInfernoHoldout.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Ranged } else if (Owner.controlUseTile) { - if (ShotTimer <= 0 && Owner.Calamity().AvaliableStarburst > 0) + if (ShotTimer <= 0 && Owner.Calamity().AvaliableStarburst > 1) { ShotTimer = 4; var spawnpos = Projectile.Center; @@ -97,8 +97,8 @@ namespace CalamityMod.Projectiles.Ranged for (var i = 0; i < 5; i++) GeneralParticleHandler.SpawnParticle(new GlowSparkParticle(spawnpos + dir * 36, (dir * Halley.shootSpeed).RotatedByRandom(0.75f) * Main.rand.NextFloat(0.5f, 1.5f), false, 7, 0.02f, drawColor, new Vector2(0.5f, 1f))); if (Projectile.owner == Main.myPlayer) - Projectile.NewProjectile(Owner.GetSource_ItemUse_WithPotentialAmmo(Halley, AmmoID.Gel), spawnpos + dir * 16,dir * Halley.shootSpeed * 0.75f, ModContent.ProjectileType(), (int)Owner.GetDamage(DamageClass.Ranged).ApplyTo(Halley.damage), Halley.knockBack, Projectile.owner, color); - Owner.Calamity().StratusStarburst--; + Projectile.NewProjectile(Owner.GetSource_ItemUse_WithPotentialAmmo(Halley, AmmoID.Gel), spawnpos + dir * 16,dir * Halley.shootSpeed * HalleysInferno.StarburstVelMult, ModContent.ProjectileType(), (int)(Owner.GetDamage(DamageClass.Ranged).ApplyTo(Halley.damage) * HalleysInferno.StarburstDmgMult), Halley.knockBack, Projectile.owner, color); + Owner.Calamity().StratusStarburst -= 2; SoundEngine.PlaySound(HalleysInferno.ShootSound); RecoilAmount = 4; } diff --git a/Projectiles/Rogue/ToothBallProjectile.cs b/Projectiles/Rogue/ToothBallProjectile.cs index 8592253161..59634c5d7c 100644 --- a/Projectiles/Rogue/ToothBallProjectile.cs +++ b/Projectiles/Rogue/ToothBallProjectile.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - Projectile.width = 12; - Projectile.height = 12; + Projectile.width = 30; + Projectile.height = 30; Projectile.friendly = true; Projectile.penetrate = 3; Projectile.aiStyle = ProjAIStyleID.ThrownProjectile; diff --git a/Projectiles/Summon/IgneousBlade.cs b/Projectiles/Summon/IgneousBlade.cs index 7fca4f2e51..4a0edee62a 100644 --- a/Projectiles/Summon/IgneousBlade.cs +++ b/Projectiles/Summon/IgneousBlade.cs @@ -118,11 +118,12 @@ namespace CalamityMod.Projectiles.Summon CircleOwner(); break; case AIState.TransitionToLaunch: - ChargeTargetPos = Owner.Calamity().mouseWorld; + Owner.Calamity().mouseWorldListener = true; + ChargeTargetPos = Owner.Calamity().mouseWorldDeltaFromPlayer; ChargeStartPos = Owner.Center; CurrentState = AIState.LaunchAtPos; AITimer = 0; - Projectile.penetrate = 50; + Projectile.penetrate = 15; LaunchAtTargetPos(); break; case AIState.LaunchAtPos: @@ -161,13 +162,11 @@ namespace CalamityMod.Projectiles.Summon public void LaunchAtTargetPos() { - Projectile.damage = Projectile.originalDamage; - if (Projectile.penetrate > 40) //First 10 hits do 2x damage - Projectile.damage *= 2; int chargeTime = IgneousExaltation.ChargeDuration * 2; int chargeLength = 2000; float circleWidth = Math.Min(75, Owner.ownedProjectileCounts[Type] * 4); - var CurrentPlace = Vector2.Lerp(ChargeStartPos, ChargeStartPos + ChargeStartPos.DirectionTo(ChargeTargetPos) * chargeLength, MathF.Pow(AITimer / chargeTime, 3)); + var CurrentPlace = Vector2.Lerp(ChargeStartPos, ChargeStartPos + ChargeTargetPos.SafeNormalize(Vector2.UnitX) * chargeLength, MathF.Pow(AITimer / chargeTime, 3)); + Projectile.Center = CurrentPlace + BladeHoverOffsetAngle.ToRotationVector2() * Math.Max(MathHelper.Lerp(100f, 25f, AITimer / 10f), circleWidth); Projectile.rotation = Projectile.AngleFrom(CurrentPlace) + MathHelper.PiOver2; if (AITimer >= chargeTime) @@ -193,9 +192,14 @@ namespace CalamityMod.Projectiles.Summon } } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (Projectile.penetrate >= 10) // First 5 hits deal 2x dmg + modifiers.SourceDamage *= 2; + } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - if (Projectile.penetrate >= 40 && CurrentState != AIState.CircleOwner) //The first 10 hits per launch can spawn blades + if (Projectile.penetrate >= 10 && CurrentState != AIState.CircleOwner) //The first 5 hits per launch can spawn blades if (Main.myPlayer == Projectile.owner) { for (int i = 0; i < 1; i++) diff --git a/Projectiles/Summon/ProfanedEnergy.cs b/Projectiles/Summon/ProfanedEnergy.cs index fadd5344d5..19db3f0522 100644 --- a/Projectiles/Summon/ProfanedEnergy.cs +++ b/Projectiles/Summon/ProfanedEnergy.cs @@ -186,7 +186,7 @@ namespace CalamityMod.Projectiles.Summon if (healShots != 0 && attackCooldown != maxRechargeTime && (attackCooldown % (maxRechargeTime / (healShots + 1)) == 0)) { Vector2 vel = ((Projectile.Center - player.Center) - player.velocity * 10).SafeNormalize(Vector2.UnitX) * -10; - Projectile healStar = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, vel, ModContent.ProjectileType(), 0, Projectile.knockBack, Projectile.owner, 0, 10, 5); + Projectile healStar = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, vel, ModContent.ProjectileType(), 0, Projectile.knockBack, Projectile.owner, 0, 5, 5); healStar.extraUpdates = 2; SoundStyle fireHeal = new("CalamityMod/Sounds/Custom/ProfanedGuardians/GuardianDash"); SoundEngine.PlaySound(fireHeal with { Volume = 0.7f, Pitch = 0.3f }, Projectile.Center); diff --git a/Projectiles/Summon/SiriusMinion.cs b/Projectiles/Summon/SiriusMinion.cs index e41364e24c..f85c8e11d3 100644 --- a/Projectiles/Summon/SiriusMinion.cs +++ b/Projectiles/Summon/SiriusMinion.cs @@ -89,11 +89,16 @@ namespace CalamityMod.Projectiles.Summon SpawnEffect(); // Does a dust spawn effect. ShootTarget(target); // If there's a target, shoot at the target. - if (target is not null && Owner.miscCounter % 30 == 0) { - - if (moddedOwner.StratusStarburst <= CalamityPlayer.MaxStratusStarburst) + if (target is not null) + { + moddedOwner.StarburstSpawnFrameCounter += Projectile.minionSlots / (float)CalamityUtils.SecondsToFrames(3f); //0.33 starbursts per seconds per minion slot + while (moddedOwner.StarburstSpawnFrameCounter >= 1 && moddedOwner.StratusStarburst <= CalamityPlayer.MaxStratusStarburst) + { + moddedOwner.StratusStarburst++; moddedOwner.StarburstEntities.Add(new StarburstEntity(Projectile.Center)); - moddedOwner.StratusStarburst++; + moddedOwner.StarburstSpawnFrameCounter--; + } + } Lighting.AddLight(Projectile.Center, 0.5f, 0.5f, 1f); // Passively makes blue light. diff --git a/Projectiles/Summon/SiriusQuasar.cs b/Projectiles/Summon/SiriusQuasar.cs index 568d8abe34..8caa8b3348 100644 --- a/Projectiles/Summon/SiriusQuasar.cs +++ b/Projectiles/Summon/SiriusQuasar.cs @@ -14,6 +14,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + bool hasExploded = false; public override void SetStaticDefaults() { ProjectileID.Sets.MinionShot[Type] = true; @@ -75,8 +76,9 @@ namespace CalamityMod.Projectiles.Summon //Due to Sirius's high Starburst consumption, it inflicts long amounts of Voidfrost on hit target.AddBuff(ModContent.BuffType(), 600); float x4 = Main.rgbToHsl(new Color(103, 203, Main.DiscoB)).X; - if (Projectile.numHits == 0) + if (!hasExploded && !target.Calamity().IsArmored()) { + hasExploded = true; SoundStyle fire = new("CalamityMod/Sounds/Item/ScorpioNukeHit"); SoundEngine.PlaySound(fire with { Volume = 0.75f, Pitch = 0.6f, PitchVariance = 0.2f }, Projectile.Center); float numberOfDusts = 156f; diff --git a/Projectiles/Summon/VengefulSunSpiritMinion.cs b/Projectiles/Summon/VengefulSunSpiritMinion.cs index 5e6685008e..f298bbd61d 100644 --- a/Projectiles/Summon/VengefulSunSpiritMinion.cs +++ b/Projectiles/Summon/VengefulSunSpiritMinion.cs @@ -147,7 +147,6 @@ namespace CalamityMod.Projectiles.Summon public static Asset circle; public override bool PreDraw(ref Color lightColor) { - AllWhiteVersion = null; var spTex = TextureAssets.Projectile[Type].Value; var whiteTex = GetWhiteTex(); var ciTex = CalamityUtils.GetTextureEfficient(ref circle, "CalamityMod/ExtraTextures/GreyscaleOpenCircleButBigger").Value; diff --git a/Projectiles/Typeless/AmuletEnergy.cs b/Projectiles/Typeless/AmuletEnergy.cs index fb3ec36405..278b83fa31 100644 --- a/Projectiles/Typeless/AmuletEnergy.cs +++ b/Projectiles/Typeless/AmuletEnergy.cs @@ -199,7 +199,7 @@ namespace CalamityMod.Projectiles.Typeless } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - target.AddBuff(ModContent.BuffType(), 540); + target.AddBuff(ModContent.BuffType(), 180); Projectile.netUpdate = true; } public override void OnKill(int timeLeft) diff --git a/Projectiles/Typeless/BabyCannonballProjectile.cs b/Projectiles/Typeless/BabyCannonballProjectile.cs index 2dcca5f59d..81dd4c3a93 100644 --- a/Projectiles/Typeless/BabyCannonballProjectile.cs +++ b/Projectiles/Typeless/BabyCannonballProjectile.cs @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Ranged SoundEngine.PlaySound(SoundID.Item88, Projectile.Center); if (Projectile.owner == Main.myPlayer) { - int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack, Projectile.owner); Main.projectile[p].DamageType = DamageClass.Default; } // Circular spread of clouds and bubbles for impact diff --git a/Projectiles/Typeless/StratusBlackHole.cs b/Projectiles/Typeless/StratusBlackHole.cs index 032903d270..b803f42dfa 100644 --- a/Projectiles/Typeless/StratusBlackHole.cs +++ b/Projectiles/Typeless/StratusBlackHole.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Typeless } foreach (var player in Main.ActivePlayers) { - if (player.Distance(Projectile.Center) <= 600) + if (player.Distance(Projectile.Center) <= 600 && !player.dead) { if (player.miscCounter % 30 == 15) { @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Typeless player.Calamity().StarburstEntities.Add(new StarburstEntity(Projectile.Center)); player.Calamity().StratusStarburstResetTimer = (int)MathHelper.Max(player.Calamity().StratusStarburstResetTimer, 180); } - if (player.wingsLogic > 0) + if (player.wingsLogic > 0 && player.wingTimeMax > 0) { if (player.wingTime <= 0 && player.Calamity().AvaliableStarburst > 0) { diff --git a/Projectiles/Typeless/TerminusHoldout.cs b/Projectiles/Typeless/TerminusHoldout.cs index c444e4d74e..52a48fc9ba 100644 --- a/Projectiles/Typeless/TerminusHoldout.cs +++ b/Projectiles/Typeless/TerminusHoldout.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetDefaults() { - Projectile.width = 50; - Projectile.height = 50; + Projectile.width = 70; + Projectile.height = 80; Projectile.aiStyle = -1; Projectile.ignoreWater = true; Projectile.tileCollide = false; @@ -130,6 +130,8 @@ namespace CalamityMod.Projectiles.Typeless int dustCount = (int)Math.Round(MathHelper.SmoothStep(1f, 5f, Time / Lifetime)); float outwardness = MathHelper.SmoothStep(40f, 150f, Time / Lifetime); float dustScale = MathHelper.Lerp(1.15f, 1.725f, Time / Lifetime); + float colorTime = Time / Lifetime * Main.rand.NextFloat(0.65f, 1f); + for (int i = 0; i < dustCount; i++) { Vector2 spawnPosition = Projectile.Center + Main.rand.NextVector2Unit() * outwardness * Main.rand.NextFloat(0.75f, 1.1f); @@ -138,7 +140,7 @@ namespace CalamityMod.Projectiles.Typeless Dust paleMagic = Dust.NewDustPerfect(spawnPosition, DustID.PortalBoltTrail); paleMagic.velocity = dustVelocity; paleMagic.scale = dustScale * Main.rand.NextFloat(0.75f, 1.15f); - paleMagic.color = Color.Lerp(Color.LightCoral, Color.White, Time / Lifetime * Main.rand.NextFloat(0.65f, 1f)); + paleMagic.color = Main.zenithWorld ? Color.Lerp(Color.LightCoral, Color.White, colorTime) : Color.Lerp(Color.Violet, Color.Goldenrod, colorTime); paleMagic.noGravity = true; paleMagic.noLight = true; } @@ -169,8 +171,8 @@ namespace CalamityMod.Projectiles.Typeless SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; if (Time >= 150f) { - float outwardness = MathHelper.SmoothStep(1f, 15f, Utils.GetLerpValue(150f, Lifetime - 30f, Time, true)); - Color afterimageColor = Color.Lerp(baseColor, Color.LightCoral, Utils.GetLerpValue(150f, 195f, Time, true)) * 0.225f; + float outwardness = MathHelper.SmoothStep(0f, 12f, Utils.GetLerpValue(150f, Lifetime - 30f, Time, true)); + Color afterimageColor = Color.Lerp(baseColor, Color.PaleGoldenrod, Utils.GetLerpValue(150f, 195f, Time, true)) * 0.225f; afterimageColor.A = 0; for (int i = 0; i < 10; i++) @@ -179,9 +181,34 @@ namespace CalamityMod.Projectiles.Typeless Main.EntitySpriteDraw(texture, baseDrawPosition + drawOffset, null, afterimageColor, 0f, origin, Projectile.scale, direction, 0); } } - Main.EntitySpriteDraw(texture, baseDrawPosition, null, baseColor, 0f, origin, Projectile.scale, direction, 0); + Main.EntitySpriteDraw(texture, baseDrawPosition, null, baseColor, 0f, origin, Projectile.scale, direction, 0); return false; } + + public override void PostDraw(Color lightColor) + { + if (Main.zenithWorld) + return; + + Texture2D texture = ModContent.Request("CalamityMod/Items/SummonItems/TerminusGlow").Value; + Vector2 baseDrawPosition = Projectile.Center - Main.screenPosition; + Vector2 origin = texture.Size() * 0.5f; + SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + + if (Time >= 75f) + { + float outwardness = MathHelper.SmoothStep(0f, 4f, Utils.GetLerpValue(75f, Lifetime - 30f, Time, true)); + + for (int i = 0; i < 3; i++) + { + Vector2 drawOffset = (MathHelper.TwoPi * i / 4f + Main.GlobalTimeWrappedHourly * 4.4f).ToRotationVector2() * outwardness; + + Main.EntitySpriteDraw(texture, baseDrawPosition + drawOffset, null, new Color(56, 12, 115, 0), 0f, origin, Projectile.scale, direction, 0); + } + } + + Main.EntitySpriteDraw(texture, baseDrawPosition, null, Color.White, 0f, origin, Projectile.scale, direction, 0); + } } } diff --git a/Sounds/Custom/BrainOfCthulhu/BoC_Rev_BloodBomb.ogg b/Sounds/Custom/BrainOfCthulhu/BoC_Rev_BloodBomb.ogg new file mode 100644 index 0000000000..27b0983094 Binary files /dev/null and b/Sounds/Custom/BrainOfCthulhu/BoC_Rev_BloodBomb.ogg differ diff --git a/Tiles/Abyss/AcidWoodTreeSapling.cs b/Tiles/Abyss/AcidWoodTreeSapling.cs index ecc1de60bf..2ebd617ecf 100644 --- a/Tiles/Abyss/AcidWoodTreeSapling.cs +++ b/Tiles/Abyss/AcidWoodTreeSapling.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Tiles.Abyss { return; } - if (!WorldGen.EmptyTileCheck(i - 1, i + 1, trueStartingPositionY - 20, trueStartingPositionY, Type)) + if (!WorldGen.EmptyTileCheck(i - 1, i + 1, trueStartingPositionY - 20, trueStartingPositionY-1, Type)) { return; } diff --git a/Tiles/FurnitureExo/ExoWorkBenchTile.cs b/Tiles/FurnitureExo/ExoWorkBenchTile.cs index d77a9b53bb..fdd26e7386 100644 --- a/Tiles/FurnitureExo/ExoWorkBenchTile.cs +++ b/Tiles/FurnitureExo/ExoWorkBenchTile.cs @@ -29,11 +29,6 @@ namespace CalamityMod.Tiles.FurnitureExo num = fail ? 1 : 3; } - public override void KillMultiTile(int i, int j, int frameX, int frameY) - { - Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 16, ModContent.ItemType()); - } - public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { if (Main.tile[i, j].IsTileActuallyInvisible()) diff --git a/UI/DraedonSummoning/CodebreakerUI.Communication.cs b/UI/DraedonSummoning/CodebreakerUI.Communication.cs index 223f642127..e4b9f39545 100644 --- a/UI/DraedonSummoning/CodebreakerUI.Communication.cs +++ b/UI/DraedonSummoning/CodebreakerUI.Communication.cs @@ -358,7 +358,8 @@ namespace CalamityMod.UI.DraedonSummoning // Draw and update the text scroller if there is some cut off text. Vector2 textTopLeft = selectionArea.TopLeft() + new Vector2(20f, 12f) * panelScale + Vector2.UnitY * OptionsTextVerticalOffset; - float cutoffDistance = OptionsTextHeight / GeneralScale - selectionOutline.Height; + float bottomPadding = panelScale.Y * 24f; + float cutoffDistance = OptionsTextHeight - selectionOutline.Height * panelScale.Y + bottomPadding; if (cutoffDistance > 0f && OptionsTextOpacity > 0f) { if (MouseScreenArea.Intersects(selectionArea)) @@ -476,7 +477,9 @@ namespace CalamityMod.UI.DraedonSummoning // Ensure that the player starts at the bottom of the scoller, now that new text is generating there. Texture2D dialogOutline = ModContent.Request("CalamityMod/UI/DraedonSummoning/DraedonDialogOutline").Value; Rectangle dialogArea = Utils.CenteredRectangle(selectionCenter, dialogOutline.Size() * panelScale); - DialogVerticalOffset = -DialogHeight * GeneralScale; + float scaledLineSpacing = FontAssetSystem.CodebreakerDialog.Value.LineSpacing * panelScale.Y; + bottomPadding = scaledLineSpacing * 3f; + DialogVerticalOffset = -(DialogHeight - dialogOutline.Height * panelScale.Y + bottomPadding); DialogScroller.PositionYInterpolant = 1f; if (DialogVerticalOffset > 0f) DialogVerticalOffset = 0f; @@ -579,7 +582,9 @@ namespace CalamityMod.UI.DraedonSummoning // Draw and update the text scroller if there is some cut off text. Vector2 textTopLeft = dialogArea.TopLeft() + new Vector2(20f, 14f) * panelScale; - float cutoffDistance = DialogHeight - dialogOutline.Height; + float scaledLineSpacing = FontAssetSystem.CodebreakerDialog.Value.LineSpacing * panelScale.Y; + float bottomPadding = scaledLineSpacing * 3f; + float cutoffDistance = DialogHeight - (dialogOutline.Height * panelScale.Y - bottomPadding); if (cutoffDistance > 0f && OptionsTextOpacity > 0f) { if (MouseScreenArea.Intersects(dialogArea)) diff --git a/Waters/CragsLava.cs b/Waters/CragsLava.cs index 4c9340658c..778df3f4dd 100644 --- a/Waters/CragsLava.cs +++ b/Waters/CragsLava.cs @@ -26,9 +26,6 @@ namespace CalamityMod.Waters public override void InflictDebuff(Player player, int onfireDuration) { - // Extra DoT in the lava of the crags. Negated by Flame-licked Shell. - if (!player.Calamity().flameLickedShell) - player.AddBuff(ModContent.BuffType(), 2, false); } } } diff --git a/World/Abyss.cs b/World/Abyss.cs index e36254d037..ca8dca54fe 100644 --- a/World/Abyss.cs +++ b/World/Abyss.cs @@ -245,7 +245,7 @@ namespace CalamityMod.World else { tile.TileType = (ushort)ModContent.TileType(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } } //basically places smaller clusters everywhere else? @@ -301,7 +301,7 @@ namespace CalamityMod.World else { tile.TileType = (ushort)ModContent.TileType(); - tile.WallType = (ushort)ModContent.WallType(); + tile.WallType = (ushort)ModContent.WallType(); } } }