diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index 0748603c73..0c450ba4f3 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -153,6 +153,10 @@ namespace CalamityMod.Balancing // 25% resist to The Ballista's greatarrows. NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), Do(new ProjectileResistBalancingRule(0.75f, ProjectileType())))); + + // 15% resist to Dryad's Tears. + NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), Do(new ProjectileResistBalancingRule(0.85f, ProjectileType(), ProjectileType())))); + #endregion #region Duke Fishron @@ -298,12 +302,16 @@ namespace CalamityMod.Balancing // 60% resist to Corinth Prime's grenades. NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType())))); - + + // 50% resist to Stratus Sphere + NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType())))); + // 35% resist to Sulphuric Acid Cannon's explosions. NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType())))); // 20% resist to Valediction's typhoons; will catch Nuclear Fury as well but that doesn't matter. NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType())))); + #endregion The Devourer of Gods #region Exo Mechs: Ares diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index a5a4cd48d5..4ae1be4f13 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -40,11 +40,6 @@ namespace CalamityMod.Buffs { player.GetDamage() -= 0.1f; } - else if (type == BuffID.Clairvoyance) - { - player.GetDamage() -= 0.02f; - player.GetCritChance() -= 2; - } else if (type == BuffID.SugarRush) { player.moveSpeed -= 0.1f; diff --git a/Buffs/Potions/Soaring.cs b/Buffs/Potions/Soaring.cs index a9a75af3c5..f3b261e533 100644 --- a/Buffs/Potions/Soaring.cs +++ b/Buffs/Potions/Soaring.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Buffs.Potions { public class Soaring : ModBuff { - public override LocalizedText Description => base.Description.WithFormatArgs(SoaringPotion.FlightBoost.ToPercent()); + public override LocalizedText Description => base.Description.WithFormatArgs(SoaringPotion.FlightTimeBoost.ToPercent()); public override void SetStaticDefaults() { diff --git a/Buffs/StatBuffs/FulfilledContract.cs b/Buffs/StatBuffs/FulfilledContract.cs new file mode 100644 index 0000000000..1134aa059e --- /dev/null +++ b/Buffs/StatBuffs/FulfilledContract.cs @@ -0,0 +1,21 @@ +using CalamityMod.Items.Accessories; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.StatBuffs +{ + public class FulfilledContract : ModBuff + { + public override void SetStaticDefaults() + { + Main.debuff[Type] = false; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + Main.buffNoTimeDisplay[Type] = false; + } + } +} diff --git a/Buffs/StatBuffs/FulfilledContract.png b/Buffs/StatBuffs/FulfilledContract.png new file mode 100644 index 0000000000..e365757d90 Binary files /dev/null and b/Buffs/StatBuffs/FulfilledContract.png differ diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 4a53e1304f..c0ded3f947 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -842,7 +842,7 @@ namespace CalamityMod.CalPlayer public int theBeeCooldown = 0; public bool aFossil = false; public bool fallingBlockProtection = false; - public bool trapProtection = false; + public bool archaicPowder = false; public bool alluringBait = false; public bool enchantedPearl = false; public bool rBrain = false; @@ -877,6 +877,7 @@ namespace CalamityMod.CalPlayer public bool eGauntlet = false; /// public bool eGauntletVisuals = true; + public bool volatileGelatinVisuals = true; /// /// Used to prevent melee speed stacking with Feral Claws and its upgrades.
/// Feral Claws = 1, Power Glove = 2, Mechanical Glove = 3, Fire Gauntlet = 4, Elemental Gauntlet = 5 @@ -981,6 +982,7 @@ namespace CalamityMod.CalPlayer public bool fleshTotemVisual = false; public int fleshTotemManaStorage = 0; public bool bloodPact = false; + public bool CanBeCritByThePact = false; public bool bloodflareCore = false; public int bloodflareCoreRemainingHealOverTime = 0; @@ -1069,10 +1071,10 @@ namespace CalamityMod.CalPlayer public bool dynamoStemCells = false; public bool etherealExtorter = false; public Item AccessoryParryItem = null; - public bool blazingCore = false; - public int blazingCoreParry = 0; - public int blazingCoreSuccessfulParry = 0; - public bool blazingCoreEmpoweredParry = false; + public bool divineProvidence = false; + public int divineProvParry = 0; + public int divineProvSuccessfulParry = 0; + public bool divineProvEmpoweredParry = false; public bool voltaicJelly = false; public bool jellyChargedBattery = false; /// General cooldown for accessories which spawn projectiles on minion hits. @@ -1151,6 +1153,7 @@ namespace CalamityMod.CalPlayer public int voidFrameCounter = 0; /// public int voidFrame = 0; + public int volatileGelHits = 0; public bool rottenDogTooth = false; public bool angelicAlliance = false; public int angelicActivate = -1; @@ -2122,6 +2125,9 @@ namespace CalamityMod.CalPlayer if (crimEffigy) Player.statLifeMax2 = (int)(Player.statLifeMax2 * (1f - CrimsonEffigy.MaxHealthLossPercent)); + if (CanBeCritByThePact) + Player.statLifeMax2 = (int)(Player.statLifeMax2 * ThePact.MaxLifeMult); + ResetRogueStealth(); calamityBonusLuck = 0f; @@ -2359,7 +2365,7 @@ namespace CalamityMod.CalPlayer protolithBangleVisual = false; aFossil = false; fallingBlockProtection = false; - trapProtection = false; + archaicPowder = false; alluringBait = false; enchantedPearl = false; rBrain = false; @@ -2400,6 +2406,7 @@ namespace CalamityMod.CalPlayer ascendantInsignia = false; fishStocks = false; magmaStoneVisuals = true; + volatileGelatinVisuals = true; eGauntlet = false; eGauntletVisuals = true; gloveLevel = 0; @@ -2430,6 +2437,7 @@ namespace CalamityMod.CalPlayer fleshTotemVisual = false; fleshTotemMinion = false; bloodPact = false; + CanBeCritByThePact = false; bloodflareCore = false; chaliceOfTheBloodGod = false; chaliceHeartStyle = false; @@ -2473,7 +2481,7 @@ namespace CalamityMod.CalPlayer dynamoStemCells = false; etherealExtorter = false; AccessoryParryItem = null; - blazingCore = false; + divineProvidence = false; voltaicJelly = false; jellyChargedBattery = false; starbusterCore = false; @@ -2974,6 +2982,9 @@ namespace CalamityMod.CalPlayer #endregion #region Screen Position Movements + + float HalleyScopeLerp = 0; + bool HalleyToggle = false; public override void ModifyScreenPosition() { // CIT 08FEB2025: Photosensitivity config also disables screenshake @@ -2983,6 +2994,19 @@ namespace CalamityMod.CalPlayer Main.screenPosition += Main.rand.NextVector2Circular(GeneralScreenShakePower * CalamityClientConfig.Instance.ScreenshakePower, GeneralScreenShakePower * CalamityClientConfig.Instance.ScreenshakePower); GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f * CalamityClientConfig.Instance.ScreenshakePower); + + if (Player.HeldItem.type != ModContent.ItemType()) + HalleyToggle = false; + else if (Player.HeldItem.JustPressedKeybind()) + HalleyToggle = !HalleyToggle; + + HalleyScopeLerp = MathHelper.Clamp(HalleyScopeLerp + (HalleyToggle ? 0.05f : -0.05f), 0, 1); + if (HalleyScopeLerp > 0) + { + var screenSize = new Vector2(Main.screenWidth, Main.screenHeight); + Vector2 center = Main.screenPosition + screenSize * 0.5f; + Main.screenPosition -= (Vector2.Clamp((center - Main.MouseWorld) / screenSize, new(-0.5f), new(0.5f)) / Main.GameZoomTarget * MathHelper.SmoothStep(0, 1, HalleyScopeLerp)) * new Vector2(1920, 1200) * 0.9f; + } } #endregion @@ -3378,9 +3402,9 @@ namespace CalamityMod.CalPlayer xerocSet = false; tracersDust = false; GemTechState.OnDeathEffects(); - blazingCoreParry = 0; - blazingCoreEmpoweredParry = false; - blazingCoreSuccessfulParry = 0; + divineProvParry = 0; + divineProvEmpoweredParry = false; + divineProvSuccessfulParry = 0; flameLickedShellParry = 0; flameLickedShellEmpoweredParry = false; profanedCrystalAnim = -1; @@ -3733,7 +3757,7 @@ namespace CalamityMod.CalPlayer if (AccessoryParryItem != null && AccessoryParryItem.JustPressedKeybind()) { - if (blazingCore && blazingCoreParry == 0 && blazingCoreSuccessfulParry == 0) + if (divineProvidence && divineProvParry == 0 && divineProvSuccessfulParry == 0) { //minor cheese prevention with standing on a spike with later game gear spamming parry :skull: //because of ordering, if they do not have the cooldown, it will not check the projectile array. Likewise if there are no bosses alive. @@ -3741,8 +3765,8 @@ namespace CalamityMod.CalPlayer if (!Player.HasCooldown(ParryCooldown.ID) || Player.ownedProjectileCounts[ProjectileType()] == 0) { Player.SetScreenshake(3.5f); - blazingCoreParry = 30; - SoundEngine.PlaySound(BlazingCore.ParryActivateSound, Player.Center); + divineProvParry = 30; + SoundEngine.PlaySound(DivineProvidence.ParryActivateSound, Player.Center); var mySourceIsIMadeItUp = Player.GetSource_FromThis(); int blazingSun = Projectile.NewProjectile(mySourceIsIMadeItUp, Player.Center, Vector2.Zero, ProjectileType(), 0, 0f, Player.whoAmI, 0f, 0f); Main.projectile[blazingSun].Center = Player.Center; @@ -4812,7 +4836,7 @@ namespace CalamityMod.CalPlayer Player.velocity.Y = 0.5f; } else - Player.velocity.Y = 0f; + Player.velocity.Y = 1E-05f; if (CalamityKeybinds.ExoChairSlowdownHotkey.Current) Player.velocity *= 0.5f; @@ -5198,6 +5222,15 @@ namespace CalamityMod.CalPlayer if (Player.chiselSpeed) Player.pickSpeed += 0.1f; + // Prevent Archaic Powder mining speed from stacking with Ancient Chisel or Ancient Fossil + if (archaicPowder) + { + if (Player.chiselSpeed) + Player.pickSpeed += 0.15f; + if (aFossil) + Player.pickSpeed += AncientFossil.MiningSpeedBoost; + } + if (oceanCrest) { bool surface = Player.Center.Y < Main.worldSurface * 16.0; @@ -6053,7 +6086,10 @@ namespace CalamityMod.CalPlayer float scale = MathHelper.Max(Main.screenWidth, Main.screenHeight) / size * 0.4f; if (ProfanedMoonlightAuroraDrawer is null || ProfanedMoonlightAuroraDrawer.Size != size) + { + ProfanedMoonlightAuroraDrawer?.Dispose(); ProfanedMoonlightAuroraDrawer = FluidFieldManager.CreateField(size, scale, 0.1f, 50f, 0.992f); + } int sourceArea = (int)Math.Ceiling(6f / ProfanedMoonlightAuroraDrawer.Scale) + 1; ProfanedMoonlightAuroraDrawer.ShouldUpdate = Player.miscCounter % 2 == 0; diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 3f03418614..6703ccd155 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -7,7 +7,6 @@ using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer.Dashes; using CalamityMod.Cooldowns; -using CalamityMod.DataStructures; using CalamityMod.Dusts; using CalamityMod.Enums; using CalamityMod.Events; @@ -24,7 +23,6 @@ using CalamityMod.Items.Armor.Reaver; using CalamityMod.Items.Armor.Silva; using CalamityMod.Items.Armor.Sulphurous; using CalamityMod.Items.Armor.Tarragon; -using CalamityMod.Items.Armor.Victide; using CalamityMod.Items.Armor.Wulfrum; using CalamityMod.Items.Potions; using CalamityMod.Items.Tools; @@ -42,7 +40,6 @@ using CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses; using CalamityMod.Particles; using CalamityMod.Projectiles.Magic; using CalamityMod.Projectiles.Melee; -using CalamityMod.Projectiles.Pets; using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Rogue; using CalamityMod.Projectiles.Typeless; @@ -146,7 +143,7 @@ namespace CalamityMod.CalPlayer NetMessage.SendData(MessageID.Dodge, -1, -1, null, Player.whoAmI, 1f, 0f, 0f, 0, 0, 0); } - + #endregion #region Pre Kill @@ -209,9 +206,9 @@ namespace CalamityMod.CalPlayer chaliceBleedoutBuffer = 0D; chaliceDamagePointPartialProgress = 0D; } - Player.HealPlayer(100); + Player.HealPlayer(Items.Accessories.NebulousCore.HealLifeOnRevive); - Player.AddCooldown(Cooldowns.NebulousCore.ID, CalamityUtils.SecondsToFrames(90)); + Player.AddCooldown(Cooldowns.NebulousCore.ID, Items.Accessories.NebulousCore.ReviveCooldown); return false; } @@ -393,7 +390,7 @@ namespace CalamityMod.CalPlayer var npc = Main.npc[damageSource.SourceNPCIndex]; if (npc.ai[3] < 2) //Divinity Devourer { - damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.DivinityDevourer"+Main.rand.Next(1,4)).ToNetworkText(Player.name)); + damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.DivinityDevourer" + Main.rand.Next(1, 4)).ToNetworkText(Player.name)); } else if (npc.ai[3] >= 3) { @@ -427,9 +424,13 @@ namespace CalamityMod.CalPlayer public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { if (Player.Calamity().yharimsGift) - target.AddBuff(ModContent.BuffType(),120); + target.AddBuff(ModContent.BuffType(), 120); - int debuffSpreadProj = ModContent.ProjectileType(); + + if (Player.HasBuff()) + target.AddBuff(ModContent.BuffType(), ThePact.DebuffInflictionDuration); + + int debuffSpreadProj = ModContent.ProjectileType(); if ((Player.Calamity().abaddon || Player.Calamity().apollyon) && (target.Calamity().abaddonEffected || target.Calamity().apollyonEffected) && hit.Crit && abaddonCooldown == 0 && Player.ownedProjectileCounts[debuffSpreadProj] == 0) { int maxTargetNum = target.Calamity().apollyonEffected ? 10 : 6; @@ -895,11 +896,11 @@ namespace CalamityMod.CalPlayer modifiers.Cancel(); bool isIgnoredTrap = (proj.type == ProjectileID.PoisonDartTrap) || (proj.type == ProjectileID.VenomDartTrap) || (proj.type == ProjectileID.PoisonDart); - if (Player.Calamity().trapProtection && isIgnoredTrap) + if (Player.Calamity().archaicPowder && isIgnoredTrap) modifiers.Cancel(); bool isReducedTrap = (proj.trap || proj.type == ProjectileID.RollingCactusSpike || proj.type == ProjectileID.Landmine) && !isIgnoredTrap; - if (Player.Calamity().trapProtection && isReducedTrap) + if (Player.Calamity().archaicPowder && isReducedTrap) modifiers.SourceDamage *= (1f - ArchaicPowder.TrapDamageReduction); // Reduce damage dealt by rainbow trails @@ -1120,7 +1121,7 @@ namespace CalamityMod.CalPlayer { if (sulphurSet) Main.npc[proj.Calamity().ParentNPCIndex].AddBuff(BuffID.Poisoned, SulphurousHelmet.SetBonusPoisonDuration); - } + } } if (proj.hostile && hurtInfo.Damage > 0) @@ -1405,7 +1406,8 @@ namespace CalamityMod.CalPlayer bool sufficientDamageForDodging = actualDamageTaken >= dodgeDamageGateValue; //This is in a method here so the logic below can call it in multiple places - void GenericDodgeEffects() { + void GenericDodgeEffects() + { double maxCooldownDurationDamagePercent = 0.5; int maxCooldownDurationDamageValue = (int)Math.Round(Player.statLifeMax2 * (maxCooldownDurationDamagePercent - dodgeDamageGateValuePercent)); @@ -1465,7 +1467,7 @@ namespace CalamityMod.CalPlayer storedShadowDodge = false; return true; } - + if (!Player.HasCooldown(GlobalDodge.ID) && sufficientDamageForDodging && DodgeEffects.Count > 0) { GenericDodgeEffects(); @@ -1488,6 +1490,14 @@ namespace CalamityMod.CalPlayer #region Modify Hurt public override void ModifyHurt(ref Player.HurtModifiers modifiers) { + if (CanBeCritByThePact && Main.rand.NextFloat() < ThePact.ChanceToBeCrit) + { + modifiers.SourceDamage *= ThePact.CritDmgTaken; + Player.AddBuff(ModContent.BuffType(), ThePact.BoostDuration); + SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Custom/BloodPactCrit")); + } + + // Calcium Potion knockback reduction if (calcium) modifiers.Knockback *= (1f - CalciumPotion.KnockbackResistance); @@ -1498,7 +1508,7 @@ namespace CalamityMod.CalPlayer #region Custom Hurt Sounds if (hurtSoundTimer == 0) { - if(Player.Transformation().Type != -1 && Player.Transformation().currentTransformation.HurtSound(Player) != null) + if (Player.Transformation().Type != -1 && Player.Transformation().currentTransformation.HurtSound(Player) != null) { var hurtSound = Player.Transformation().currentTransformation.HurtSound(Player).Value; modifiers.DisableSound(); @@ -1553,23 +1563,23 @@ namespace CalamityMod.CalPlayer // It has not yet been mitigated by any means. // - if (blazingCoreParry > 0) //check for active parry + if (divineProvParry > 0) //check for active parry { - if (blazingCoreParry >= 12) //only the first 18 frames (0.3 seconds) counts for a valid parry + if (divineProvParry >= 12) //only the first 18 frames (0.3 seconds) counts for a valid parry { if (!Player.HasCooldown(ParryCooldown.ID)) { - // 17APR2024: Ozzatron: Blazing Core is a parry. It uses vanilla parry iframes and benefits from Cross Necklace. - int blazingCoreParryIFrames = Player.ComputeParryIFrames(); - Player.GiveUniversalIFrames(blazingCoreParryIFrames, true); + // 17APR2024: Ozzatron: Divine Providence is a parry. It uses vanilla parry iframes and benefits from Cross Necklace. + int divineProvParryIFrames = Player.ComputeParryIFrames(); + Player.GiveUniversalIFrames(divineProvParryIFrames, true); - blazingCoreEmpoweredParry = true; + divineProvEmpoweredParry = true; modifiers.Cancel(); modifiers.DisableSound(); //prevents hurt sound from playing, had no idea this was a thing } - SoundEngine.PlaySound(BlazingCore.ParrySuccessSound, Player.Center); + SoundEngine.PlaySound(DivineProvidence.ParrySuccessSound, Player.Center); float power = 2; for (int i = 0; i < (int)(20 * power); i++) @@ -1599,12 +1609,12 @@ namespace CalamityMod.CalPlayer Particle orb2 = new CustomPulse(Player.Center, Vector2.Zero, Color.Khaki, "CalamityMod/Particles/BloomRing", new Vector2(1f, 0.5f), 0, 0, 2.1f * power, 25); GeneralParticleHandler.SpawnParticle(orb2); - blazingCoreSuccessfulParry = 60; + divineProvSuccessfulParry = 60; Player.AddCooldown(ParryCooldown.ID, 60 * 30, false, "blazingcore"); //cooldown is frames in seconds multiplied by the desired amount of seconds } - if (blazingCoreParry > 1) - blazingCoreParry = 1; //schedule parry to end next frame + if (divineProvParry > 1) + divineProvParry = 1; //schedule parry to end next frame } else if (flameLickedShellParry > 0) { @@ -2220,12 +2230,13 @@ namespace CalamityMod.CalPlayer } } - if (fleshTotem && hurtInfo.Damage > 0) + if (fleshTotem && hurtInfo.Damage > 0 && fleshTotemManaStorage > 0) { SoundStyle Counter = new SoundStyle("CalamityMod/Sounds/Custom/BrainOfCthulhu/BoC_Rev_Shield_Down"); if (fleshTotemManaStorage >= 100 && fleshTotemVisual) - SoundEngine.PlaySound(Counter with { Volume = 0.75f}, Player.Center); - int lostSoulAmount = fleshTotemManaStorage / 25; + SoundEngine.PlaySound(Counter with { Volume = 0.75f }, Player.Center); + int lostSoulAmount = (fleshTotemManaStorage / 2) / 25; + int lostSoulDamage = (int)Player.GetTotalDamage().ApplyTo(FleshTotem.lostSoulDamage); if (Player.ownedProjectileCounts[ModContent.ProjectileType()] != 0) { for (int i = 0; i < Main.maxProjectiles; i++) @@ -2235,13 +2246,13 @@ namespace CalamityMod.CalPlayer { for (int k = 0; k < lostSoulAmount; k++) { - Projectile.NewProjectile(Player.GetSource_Accessory_OnHurt(FindAccessory(), hurtInfo.DamageSource), proj.Center, new Vector2(10, 10).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.55f), ModContent.ProjectileType(), FleshTotem.lostSoulDamage, 0f, Main.myPlayer, 0f, 0f, 3f); + Projectile.NewProjectile(Player.GetSource_Accessory_OnHurt(FindAccessory(), hurtInfo.DamageSource), proj.Center, new Vector2(10, 10).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.55f), ModContent.ProjectileType(), lostSoulDamage, 0f, Main.myPlayer, 0f, 0f, 3f); } break; } } } - fleshTotemManaStorage = 0; + fleshTotemManaStorage = fleshTotemManaStorage / 2; } // By setting brainOfConfusionItem, these accessories have this code already, @@ -2369,7 +2380,7 @@ namespace CalamityMod.CalPlayer { int deificProjDamage = (int)(Player.GetBestClassDamage().ApplyTo(DeificAmulet.StarDamage)); - Projectile onHitProj = Main.projectile[Projectile.NewProjectile(source, Player.Center, new Vector2(0,-15 * (rampartOfDeities && n % 2 == 0 ? 0.75f: 1.25f)).RotatedBy(MathHelper.TwoPi/projAmount*n), ModContent.ProjectileType(), deificProjDamage, 4f, Player.whoAmI)]; + Projectile onHitProj = Main.projectile[Projectile.NewProjectile(source, Player.Center, new Vector2(0, -15 * (rampartOfDeities && n % 2 == 0 ? 0.75f : 1.25f)).RotatedBy(MathHelper.TwoPi / projAmount * n), ModContent.ProjectileType(), deificProjDamage, 4f, Player.whoAmI)]; if (onHitProj.whoAmI.WithinBounds(Main.maxProjectiles)) { onHitProj.DamageType = DamageClass.Generic; diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index da9c899e07..774f52511e 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -275,7 +275,7 @@ namespace CalamityMod.CalPlayer if (Player.statMana < 0 && Player.Calamity().ChaosStone) { - totalNegativeLifeRegen -= Player.statMana/100f * Items.Accessories.ChaosStone.LostRegenPer100Mana; + totalNegativeLifeRegen -= (Player.statMana/100f * Items.Accessories.ChaosStone.LostRegenPer100Mana) + Items.Accessories.ChaosStone.BaseLostRegen; } // @@ -707,6 +707,9 @@ namespace CalamityMod.CalPlayer regen *= LivingDew.NaturalRegenPower; else if (honeyDew) regen *= HoneyDew.NaturalRegenPower; + + if (Player.HasBuff()) + regen *= ThePact.NaturalRegenBoost; // The Camper counteracts the regen loss while moving horizontally if (camper && (Player.velocity.X != 0 && Player.grappling[0] <= 0)) { @@ -738,7 +741,6 @@ namespace CalamityMod.CalPlayer finalRegen += 4f; regeneratorDamage = finalRegen * Regenerator.RegenToDamageRatio; - Player.GetDamage() += regeneratorDamage; if (Player.lifeRegen > 0) Player.lifeRegen = 0; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 4eeef63f01..a1b8566dc6 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2026,8 +2026,8 @@ namespace CalamityMod.CalPlayer if (Player.velocity.Y == 0 && fallingBootVelCheckTimer > 10) { float power = Utils.Remap(fallingBootVelCheckTimer, 10, 40, 0.1f, 1); - float scaledPower = (float)Math.Pow(power, 3); - int damage = (int)Player.GetBestClassDamage().ApplyTo(1500 * scaledPower); // Damage scales down thrice + float scaledPower = (float)Math.Pow(power, 2); + int damage = (int)Player.GetBestClassDamage().ApplyTo(300 * scaledPower); // Damage scales down thrice Vector2 playerFeet = Player.Center + Vector2.UnitY * 26 * Player.gravDir; float blastSize = 120 * power; @@ -2535,15 +2535,15 @@ namespace CalamityMod.CalPlayer if (auralisAuroraCooldown > 0) auralisAuroraCooldown--; - if (blazingCore) + if (divineProvidence) { - if (blazingCoreSuccessfulParry > 0) - BlazingCore.HandleStars(Player); - else if (blazingCoreParry > 0) - BlazingCore.HandleParryCountdown(Player); + if (divineProvSuccessfulParry > 0) + DivineProvidence.HandleStars(Player); + else if (divineProvParry > 0) + DivineProvidence.HandleParryCountdown(Player); } - else if (blazingCoreParry > 0) - blazingCoreParry--; + else if (divineProvParry > 0) + divineProvParry--; else if (flameLickedShellParry > 0) { if (flameLickedShell) @@ -2941,6 +2941,29 @@ namespace CalamityMod.CalPlayer } } + if (Player.volatileGelatin) + { + Player.volatileGelatinCounter++; + + int npcCount = 0; + int npcType = ModContent.NPCType(); + for (int x = 0; x < Main.maxNPCs; x++) + { + NPC npc = Main.npc[x]; + if (npc.active && npc.type == npcType && npc.ai[1] == Player.whoAmI && npc.ai[3] == 0) + npcCount++; + } + int wingFlatBoost = 15; // 0.3 seconds of flight + float jumpSpeedBoost = 0.25f; // 5% jump speed + + if (Player.wingTimeMax > 0) + Player.wingTimeMax += (wingFlatBoost * npcCount); + Player.jumpSpeedBoost += (jumpSpeedBoost * npcCount); + } + else + volatileGelHits = 0; + + // Vortex Armor nerf if (Player.vortexStealthActive && Player.HeldItem.type != ItemID.PsychoKnife) { @@ -3752,10 +3775,9 @@ namespace CalamityMod.CalPlayer (reaverSpeed ? ReaverHeadMobility.SetBonusFlightBoost : 0D) + (angelTreads ? AngelTreads.FlightTimeBoost : 0D) + (blueCandle ? WeightlessCandle.WingTimeBoost : 0D) + - (soaring ? SoaringPotion.FlightBoost : 0D) + + (soaring ? SoaringPotion.FlightTimeBoost : 0D) + (prismaticGreaves ? PrismaticGreaves.FlightTimeBoost : 0D) + (plagueReaper ? PlagueReaperMask.SetBonusFlightTimeBoost : 0D) + - (ascendantInsignia ? AscendantInsignia.FlightTimeBoost : Player.empressBrooch ? 0.33D : 0D) + externalFlightTimeMultBoost; if (community) @@ -4139,9 +4161,9 @@ namespace CalamityMod.CalPlayer Player.lavaImmune = true; Player.fireWalk = true; Player.buffImmune[ModContent.BuffType()] = true; + Player.buffImmune[ModContent.BuffType()] = true; Player.buffImmune[BuffID.OnFire] = true; Player.buffImmune[BuffID.Burning] = true; - Player.buffImmune[BuffID.Daybreak] = true; if (Player.wingTimeMax > 0) Player.wingTimeMax = (int)(Player.wingTimeMax * 1.1D); diff --git a/CalPlayer/DrawLayers/EncasementParryLayer.cs b/CalPlayer/DrawLayers/EncasementParryLayer.cs index 4e3deb92bc..12e96039d4 100644 --- a/CalPlayer/DrawLayers/EncasementParryLayer.cs +++ b/CalPlayer/DrawLayers/EncasementParryLayer.cs @@ -15,7 +15,7 @@ namespace CalamityMod.CalPlayer.DrawLayers } public override Position GetDefaultPosition() => new BeforeParent(PlayerDrawLayers.FrontAccFront); //me when the player layer is called front acc front :skull: - public EncasementType GetEncasementTypeFor(CalamityPlayer modPlayer) => modPlayer.blazingCore ? EncasementType.BlazingCore : EncasementType.FlameLickedShell; + public EncasementType GetEncasementTypeFor(CalamityPlayer modPlayer) => modPlayer.divineProvidence ? EncasementType.BlazingCore : EncasementType.FlameLickedShell; public override bool GetDefaultVisibility(PlayerDrawSet drawInfo) { @@ -25,7 +25,7 @@ namespace CalamityMod.CalPlayer.DrawLayers bool visible = drawInfo.shadow == 0f && !drawPlayer.dead; visible = encasement switch { - EncasementType.BlazingCore => visible && modPlayer.blazingCoreParry > 0, + EncasementType.BlazingCore => visible && modPlayer.divineProvParry > 0, EncasementType.FlameLickedShell => visible && modPlayer.flameLickedShellParry > 0, _ => false }; @@ -45,7 +45,7 @@ namespace CalamityMod.CalPlayer.DrawLayers { case EncasementType.BlazingCore: tex += "BlazingCoreCrystal"; - currentParry = calPlayer.blazingCoreParry; + currentParry = calPlayer.divineProvParry; defaultOpacity = 0.725f; scale = 1.15f; break; diff --git a/CalamityConditions.cs b/CalamityConditions.cs index 84cd4b16b3..fa6d25e049 100644 --- a/CalamityConditions.cs +++ b/CalamityConditions.cs @@ -71,7 +71,7 @@ namespace CalamityMod // Vanilla public static readonly Condition DownedBetsy = Create("Drops.DownedBetsy", () => DownedBossSystem.downedBetsy); - + public static readonly Condition DownedDreadnautilus = Create("Drops.DownedDreadnautilus", () => DownedBossSystem.downedDreadnautilus); // // Calamity Biome conditions // diff --git a/CalamityConfig.cs b/CalamityConfig.cs index 11af760d28..6501b1a176 100644 --- a/CalamityConfig.cs +++ b/CalamityConfig.cs @@ -50,10 +50,6 @@ namespace CalamityMod [DefaultValue(false)] public bool BoCSpriteChange { get; set; } - [BackgroundColor(192, 54, 64, 192)] - [DefaultValue(true)] - public bool EnableVanillaTextureEdits { get; set; } - [BackgroundColor(192, 54, 64, 192)] [DefaultValue(true)] public bool SunkenSeaBackgroundDistortion { get; set; } diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index 9599aea147..cf54c1512f 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Weapons.Melee; +using System; +using CalamityMod.Items.Weapons.Melee; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; using Terraria; @@ -72,7 +73,12 @@ namespace CalamityMod.DataStructures /// >Used by evil attunements to check if a regular dash is avaialble /// Used by evil attunements to check if a strong dash is avaialble /// - public virtual bool Shoot(Player player, IEntitySource source, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack, ref int Combo, ref int CanLunge, ref int PowerLungeCounter) => true; + public virtual bool Shoot(Player player, IEntitySource source, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack, ref int Combo, ref int CanLunge, ref int PowerLungeCounter) + { + Projectile blade = Projectile.NewProjectileDirect(source, position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); + blade.originalDamage = (int)MathF.Round(blade.originalDamage * DamageMultiplier); + return false; + } public virtual void PassiveEffect(Player player, IEntitySource source, ref int UseTimer, ref bool Procced, Projectile projectile = null) { @@ -155,20 +161,14 @@ namespace CalamityMod.DataStructures public override bool Shoot(Player player, IEntitySource source, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack, ref int Combo, ref int CanLunge, ref int PowerLungeCounter) { - switch (Combo) + Projectile blade = Projectile.NewProjectileDirect(source, player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 0, 15); + blade.originalDamage = (int)MathF.Round(blade.originalDamage * DamageMultiplier); + if (Combo > 0) { - case 0: - Projectile.NewProjectile(source, player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 0, 15); - break; - - case 1: - Projectile.NewProjectile(source, player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 1, 20); - break; - - case 2: - Projectile.NewProjectile(source, player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 2, 50); - break; + blade.ai[0] = Combo; + blade.ai[1] = (Combo == 2 ? 50 : 20); } + Combo++; if (Combo > 2) Combo = 0; @@ -202,7 +202,8 @@ namespace CalamityMod.DataStructures public override bool Shoot(Player player, IEntitySource source, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack, ref int Combo, ref int CanLunge, ref int PowerLungeCounter) { - Projectile.NewProjectile(source, player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 26, (float)CanLunge); + Projectile blade = Projectile.NewProjectileDirect(source, player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 26, (float)CanLunge); + blade.originalDamage = (int)MathF.Round(blade.originalDamage * DamageMultiplier); CanLunge = 0; return false; } @@ -283,20 +284,14 @@ namespace CalamityMod.DataStructures public override bool Shoot(Player player, IEntitySource source, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack, ref int Combo, ref int CanLunge, ref int PowerLungeCounter) { - switch (Combo) + Projectile blade = Projectile.NewProjectileDirect(source, player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 0, 15); + blade.originalDamage = (int)MathF.Round(blade.originalDamage * DamageMultiplier); + if (Combo > 0) { - case 0: - Projectile.NewProjectile(source, player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 0, 15); - break; - - case 1: - Projectile.NewProjectile(source, player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 1, 20); - break; - - case 2: - Projectile.NewProjectile(source, player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 2, 50); - break; + blade.ai[0] = Combo; + blade.ai[1] = (Combo == 2 ? 50 : 20); } + Combo++; if (Combo > 2) Combo = 0; @@ -331,6 +326,7 @@ namespace CalamityMod.DataStructures public override bool Shoot(Player player, IEntitySource source, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack, ref int Combo, ref int CanLunge, ref int PowerLungeCounter) { Projectile whipProj = Projectile.NewProjectileDirect(source, player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 0, 0); + whipProj.originalDamage = (int)MathF.Round(whipProj.originalDamage * DamageMultiplier); if (whipProj.ModProjectile is TrueGrovetendersTouch whip) whip.flipped = Combo == 0 ? 1 : -1; Combo++; @@ -373,6 +369,7 @@ namespace CalamityMod.DataStructures PowerLungeCounter = 0; } Projectile proj = Projectile.NewProjectileDirect(source, player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 26f, CanLunge > 0 ? 1f : 0f); + proj.originalDamage = (int)MathF.Round(proj.originalDamage * DamageMultiplier); if (proj.ModProjectile is TrueDecaysRetort rapier) rapier.ChargedUp = powerLungeAvailable; CanLunge--; diff --git a/ExtraTextures/ExtraTextureRefs.cs b/ExtraTextures/ExtraTextureRefs.cs index de46254b15..7e19975be1 100644 --- a/ExtraTextures/ExtraTextureRefs.cs +++ b/ExtraTextures/ExtraTextureRefs.cs @@ -11,11 +11,6 @@ namespace CalamityMod.ExtraTextures [Autoload(Side = ModSide.Client)] public class ExtraTextureRefs : ModSystem { - // Destroyer glowmasks - public static Asset DestroyerHeadGlowmask; - public static Asset DestroyerBodyGlowmask; - public static Asset DestroyerTailGlowmask; - // WoF, These are not "exactly" the ExtraTextures public static Asset WallOfFleshDemonSickleTexture; @@ -42,10 +37,6 @@ namespace CalamityMod.ExtraTextures // TODO: - Every other ExtraTextures Reference could be move in here public override void OnModLoad() { - DestroyerHeadGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerHeadGlow", AssetRequestMode.AsyncLoad); - DestroyerBodyGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerBodyGlow", AssetRequestMode.AsyncLoad); - DestroyerTailGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerTailGlow", AssetRequestMode.AsyncLoad); - WallOfFleshDemonSickleTexture = ModContent.Request("CalamityMod/Projectiles/Melee/ForbiddenOathbladeProjectile", AssetRequestMode.AsyncLoad); FlyingCarpetVanilla = TextureAssets.FlyingCarpet; diff --git a/ExtraTextures/VanillaBossGlowmasks/DestroyerBodyGlow.png b/ExtraTextures/VanillaBossGlowmasks/DestroyerBodyGlow.png deleted file mode 100644 index 3e2235cd1d..0000000000 Binary files a/ExtraTextures/VanillaBossGlowmasks/DestroyerBodyGlow.png and /dev/null differ diff --git a/ExtraTextures/VanillaBossGlowmasks/DestroyerHeadGlow.png b/ExtraTextures/VanillaBossGlowmasks/DestroyerHeadGlow.png deleted file mode 100644 index 4530739af2..0000000000 Binary files a/ExtraTextures/VanillaBossGlowmasks/DestroyerHeadGlow.png and /dev/null differ diff --git a/ExtraTextures/VanillaBossGlowmasks/DestroyerTailGlow.png b/ExtraTextures/VanillaBossGlowmasks/DestroyerTailGlow.png deleted file mode 100644 index 2fcbcceb81..0000000000 Binary files a/ExtraTextures/VanillaBossGlowmasks/DestroyerTailGlow.png and /dev/null differ diff --git a/ExtraTextures/VanillaBossGlowmasks/SkeletronPrimeHeadGlow.png b/ExtraTextures/VanillaBossGlowmasks/SkeletronPrimeHeadGlow.png deleted file mode 100644 index a988d2bbdc..0000000000 Binary files a/ExtraTextures/VanillaBossGlowmasks/SkeletronPrimeHeadGlow.png and /dev/null differ diff --git a/Gores/AquaticScourgeGores/AquaticParasite1.png b/Gores/AquaticScourgeGores/AquaticParasite1.png deleted file mode 100644 index f652388f71..0000000000 Binary files a/Gores/AquaticScourgeGores/AquaticParasite1.png and /dev/null differ diff --git a/Gores/AquaticScourgeGores/AquaticParasite2.png b/Gores/AquaticScourgeGores/AquaticParasite2.png deleted file mode 100644 index 82a0aa1720..0000000000 Binary files a/Gores/AquaticScourgeGores/AquaticParasite2.png and /dev/null differ diff --git a/Gores/AquaticScourgeGores/AquaticSeekerBody.png b/Gores/AquaticScourgeGores/AquaticSeekerBody.png deleted file mode 100644 index fb1978fced..0000000000 Binary files a/Gores/AquaticScourgeGores/AquaticSeekerBody.png and /dev/null differ diff --git a/Gores/AquaticScourgeGores/AquaticSeekerHead.png b/Gores/AquaticScourgeGores/AquaticSeekerHead.png deleted file mode 100644 index ab7b02b78b..0000000000 Binary files a/Gores/AquaticScourgeGores/AquaticSeekerHead.png and /dev/null differ diff --git a/Gores/AquaticScourgeGores/AquaticSeekerTail.png b/Gores/AquaticScourgeGores/AquaticSeekerTail.png deleted file mode 100644 index f4da7fb3a7..0000000000 Binary files a/Gores/AquaticScourgeGores/AquaticSeekerTail.png and /dev/null differ diff --git a/Gores/CalamitasGores/LifeSeeker.png b/Gores/CalamitasGores/LifeSeeker.png deleted file mode 100644 index 398861be36..0000000000 Binary files a/Gores/CalamitasGores/LifeSeeker.png and /dev/null differ diff --git a/Gores/CalamitasGores/LifeSeeker2.png b/Gores/CalamitasGores/LifeSeeker2.png deleted file mode 100644 index d51c94f12d..0000000000 Binary files a/Gores/CalamitasGores/LifeSeeker2.png and /dev/null differ diff --git a/Gores/CalamitasGores/LifeSeeker3.png b/Gores/CalamitasGores/LifeSeeker3.png deleted file mode 100644 index dd3f95427d..0000000000 Binary files a/Gores/CalamitasGores/LifeSeeker3.png and /dev/null differ diff --git a/Gores/CalamitasGores/SoulSlurper.png b/Gores/CalamitasGores/SoulSlurper.png deleted file mode 100644 index 63911dc0f4..0000000000 Binary files a/Gores/CalamitasGores/SoulSlurper.png and /dev/null differ diff --git a/Gores/CalamitasGores/SoulSlurper2.png b/Gores/CalamitasGores/SoulSlurper2.png deleted file mode 100644 index 9f7519fd46..0000000000 Binary files a/Gores/CalamitasGores/SoulSlurper2.png and /dev/null differ diff --git a/Gores/CalamitasGores/SoulSlurper3.png b/Gores/CalamitasGores/SoulSlurper3.png deleted file mode 100644 index d752cbe4e8..0000000000 Binary files a/Gores/CalamitasGores/SoulSlurper3.png and /dev/null differ diff --git a/Gores/CalamitasGores/SoulSlurper4.png b/Gores/CalamitasGores/SoulSlurper4.png deleted file mode 100644 index 2d6924f39f..0000000000 Binary files a/Gores/CalamitasGores/SoulSlurper4.png and /dev/null differ diff --git a/Gores/Cryocore.png b/Gores/Cryocore.png deleted file mode 100644 index cbf2143aa0..0000000000 Binary files a/Gores/Cryocore.png and /dev/null differ diff --git a/Gores/Cryocore2.png b/Gores/Cryocore2.png deleted file mode 100644 index e63a1f27e0..0000000000 Binary files a/Gores/Cryocore2.png and /dev/null differ diff --git a/Gores/DoGBody.png b/Gores/DoGBody.png deleted file mode 100644 index 3bd4321383..0000000000 Binary files a/Gores/DoGBody.png and /dev/null differ diff --git a/Gores/DoGBody2.png b/Gores/DoGBody2.png deleted file mode 100644 index ce1193d555..0000000000 Binary files a/Gores/DoGBody2.png and /dev/null differ diff --git a/Gores/DoGBody3.png b/Gores/DoGBody3.png deleted file mode 100644 index 2e2616f6a3..0000000000 Binary files a/Gores/DoGBody3.png and /dev/null differ diff --git a/Gores/DoGHead.png b/Gores/DoGHead.png deleted file mode 100644 index f33c23b97e..0000000000 Binary files a/Gores/DoGHead.png and /dev/null differ diff --git a/Gores/DoGTail.png b/Gores/DoGTail.png deleted file mode 100644 index 65f911efda..0000000000 Binary files a/Gores/DoGTail.png and /dev/null differ diff --git a/Gores/DoT.png b/Gores/DoT.png deleted file mode 100644 index 2522740775..0000000000 Binary files a/Gores/DoT.png and /dev/null differ diff --git a/Gores/DoT2.png b/Gores/DoT2.png deleted file mode 100644 index 7d83341fd1..0000000000 Binary files a/Gores/DoT2.png and /dev/null differ diff --git a/Gores/DoT3.png b/Gores/DoT3.png deleted file mode 100644 index 872927462a..0000000000 Binary files a/Gores/DoT3.png and /dev/null differ diff --git a/Gores/DoT4.png b/Gores/DoT4.png deleted file mode 100644 index 8865c715ba..0000000000 Binary files a/Gores/DoT4.png and /dev/null differ diff --git a/Gores/DoT5.png b/Gores/DoT5.png deleted file mode 100644 index 19ccf524a2..0000000000 Binary files a/Gores/DoT5.png and /dev/null differ diff --git a/Gores/PrismShurikenBlade.png b/Gores/PrismShurikenBlade.png deleted file mode 100644 index 650f27e8c1..0000000000 Binary files a/Gores/PrismShurikenBlade.png and /dev/null differ diff --git a/Gores/ScourgePestBody.png b/Gores/ScourgePestBody.png deleted file mode 100644 index e120f5edc7..0000000000 Binary files a/Gores/ScourgePestBody.png and /dev/null differ diff --git a/Gores/ScourgePestBody2.png b/Gores/ScourgePestBody2.png deleted file mode 100644 index 8e07accb80..0000000000 Binary files a/Gores/ScourgePestBody2.png and /dev/null differ diff --git a/Gores/ScourgePestBody3.png b/Gores/ScourgePestBody3.png deleted file mode 100644 index adedc10e2f..0000000000 Binary files a/Gores/ScourgePestBody3.png and /dev/null differ diff --git a/Gores/ScourgePestBody4.png b/Gores/ScourgePestBody4.png deleted file mode 100644 index 7b3f75ea31..0000000000 Binary files a/Gores/ScourgePestBody4.png and /dev/null differ diff --git a/Gores/ScourgePestHead.png b/Gores/ScourgePestHead.png deleted file mode 100644 index b0be38f842..0000000000 Binary files a/Gores/ScourgePestHead.png and /dev/null differ diff --git a/Gores/ScourgePestTail.png b/Gores/ScourgePestTail.png deleted file mode 100644 index 39e6906844..0000000000 Binary files a/Gores/ScourgePestTail.png and /dev/null differ diff --git a/Gores/StasisProbe1.png b/Gores/StasisProbe1.png deleted file mode 100644 index 5ea916d95b..0000000000 Binary files a/Gores/StasisProbe1.png and /dev/null differ diff --git a/Gores/StasisProbeNaked1.png b/Gores/StasisProbeNaked1.png deleted file mode 100644 index c60d12338b..0000000000 Binary files a/Gores/StasisProbeNaked1.png and /dev/null differ diff --git a/Gores/TarraHeart.png b/Gores/TarraHeart.png deleted file mode 100644 index dc382d7695..0000000000 Binary files a/Gores/TarraHeart.png and /dev/null differ diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index c4e976b308..41e3ff9dc0 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -142,6 +142,8 @@ namespace CalamityMod.ILEditing IL_UIWorldCreation.AddWorldSizeOptions += SwapSmallDescriptionKey; On_WorldGen.MakeDungeon += LimitDungeonEntranceXPosition; IL_WorldGen.DungeonHalls += LimitDungeonHallsXPosition; + IL_WorldGen.IslandHouse += MakeFledgingWingsMoreCommon; + IL_WorldGen.AddBuriedChest_int_int_int_bool_int_bool_ushort += DisableFledglingWingsSecondary; // Removal of vanilla stupidity IL_Player.StatusFromNPC += RemoveExpertBrainRandomDebuffs; diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index b25b3a0648..34e8809ea7 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -653,8 +653,14 @@ namespace CalamityMod.ILEditing { if (self.Calamity().ChaosStone) { + if (amount <= -1) + amount = self.GetManaCost(item); + if (pay) + { self.statMana -= item.mana; + CombinedHooks.OnConsumeMana(self, item, amount); + } if (self.statMana < -self.statManaMax2) self.statMana = -self.statManaMax2; return true; @@ -709,7 +715,10 @@ namespace CalamityMod.ILEditing ref FluidField calamityFireDrawer = ref player.Calamity().CalamityFireDrawer; ref Vector2 firePosition = ref player.Calamity().FireDrawerPosition; if (calamityFireDrawer is null || calamityFireDrawer.Size != size) + { + calamityFireDrawer?.Dispose(); calamityFireDrawer = FluidFieldManager.CreateField(size, scale, 0.1f, 50f, 0.992f); + } // Update the fire draw position. firePosition = new Vector2(Main.screenWidth, Main.screenHeight) * 0.5f; diff --git a/ILEditing/WorldgenILChanges.cs b/ILEditing/WorldgenILChanges.cs index 6a11c74bec..63e1681843 100644 --- a/ILEditing/WorldgenILChanges.cs +++ b/ILEditing/WorldgenILChanges.cs @@ -208,5 +208,72 @@ namespace CalamityMod.ILEditing } #endregion Prevent Abyss/Dungeon Interactions + + #region Fledgling Wings Loot Changes + /// + /// Changes the primary loot of Floating Island chests to include Fledging Wings + /// + private static void MakeFledgingWingsMoreCommon(ILContext il) + { + var cursor = new ILCursor(il); + + // How the code we are moving to works: + // Set num13 equal to the number of islands generated. If greater than 3, set to a random number between 0-3 inclusive. Then use that value in a 4-branch switch statement. + // This makes num13 always be a value between 0-3, for the 4 primary items in island loot. + // To accomodate for Fledgling Wings, we must change this to check for being greater than 4, then to set to a random number between 0-4 inclusive, then make the switch have 5 branches. + if (!cursor.TryGotoNext(MoveType.After, i => i.MatchStloc(13))) + { + LogFailure("Fledgling Wings", "Could not move to the location of determining Floating Island primary loot 1."); + return; + } + + // Emit a delegate which reimplements the logic for choosing the primary loot of floating islands with Fledgling Wings, then return the ID of the item. + var label = il.DefineLabel(); + cursor.EmitDelegate>(() => + { + int island = GenVars.skyIslandHouseCount; + if (island > 4) + island = Main.rand.Next(5); + + return island switch + { + 1 => 65, // Starfury + 2 => 158, // Lucky Horseshoe + 3 => 2219, // Celestial Magnet + 4 => 4978, // Fledgling Wings + _ => 159, // Shiny Red Balloon + }; + }); + + // Store this value in the variable which holds the ID of the item, then branch past the original logic. + cursor.Emit(OpCodes.Stloc, 13); + cursor.Emit(OpCodes.Br, label); + + if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchLdsfld("getGoodWorldGen"))) + { + LogFailure("Fledgling Wings", "Could not move after the switch statement."); + return; + } + cursor.MarkLabel(label); + } + + /// + /// Disables Fledgling Wings being added as secondary loot in floating island chests + /// + private static void DisableFledglingWingsSecondary(ILContext il) + { + var cursor = new ILCursor(il); + + if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdloc(9))) + { + LogFailure("Fledgling Wings", "Could not move to the code adding Fledgling Wings as secondary loot."); + return; + } + + // AND with 0 (false) so that the code to add Fledgling Wings as secondary loot never runs. + cursor.Emit(OpCodes.Ldc_I4_0); + cursor.Emit(OpCodes.And); + } + #endregion } } diff --git a/Items/Accessories/AbyssalDivingGear.cs b/Items/Accessories/AbyssalDivingGear.cs index b2129bd402..79d47e65cf 100644 --- a/Items/Accessories/AbyssalDivingGear.cs +++ b/Items/Accessories/AbyssalDivingGear.cs @@ -49,8 +49,8 @@ namespace CalamityMod.Items.Accessories CreateRecipe(). AddIngredient(ItemID.ArcticDivingGear). AddIngredient(). - AddIngredient(10). - AddIngredient(10). + AddIngredient(20). + AddIngredient(15). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Accessories/AbyssalMirror.cs b/Items/Accessories/AbyssalMirror.cs index 0a71cbd439..5ef95b91af 100644 --- a/Items/Accessories/AbyssalMirror.cs +++ b/Items/Accessories/AbyssalMirror.cs @@ -73,8 +73,8 @@ namespace CalamityMod.Items.Accessories CreateRecipe(). AddIngredient(). AddIngredient(). - AddIngredient(5). - AddIngredient(5). + AddIngredient(20). + AddIngredient(15). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Accessories/AcrobaticBobber.cs b/Items/Accessories/AcrobaticBobber.cs index ffd5b98001..135efdb3a1 100644 --- a/Items/Accessories/AcrobaticBobber.cs +++ b/Items/Accessories/AcrobaticBobber.cs @@ -30,7 +30,6 @@ namespace CalamityMod.Items.Fishing CreateRecipe(). AddIngredient(ItemID.FishingBobber). AddIngredient(5). - AddIngredient(ItemID.Feather). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Accessories/AmbrosialAmpoule.cs b/Items/Accessories/AmbrosialAmpoule.cs index 7804ef5748..b5497cd0a3 100644 --- a/Items/Accessories/AmbrosialAmpoule.cs +++ b/Items/Accessories/AmbrosialAmpoule.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Accessories public static int MinRegenBoost => 2; public static int MaxRegenBoost => 6; public static float RegenTimeBoost => 1; - public static float NaturalRegenPower => 1.5f; + public static float NaturalRegenPower => 1.75f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinRegenBoost.ToRegenPerSecond(), MaxRegenBoost.ToRegenPerSecond(), (NaturalRegenPower - 1f).ToPercent(), RegenTimeBoost.ToPercent()); public override void SetDefaults() diff --git a/Items/Accessories/ArchaicPowder.cs b/Items/Accessories/ArchaicPowder.cs index 9e51e21962..f9fa031628 100644 --- a/Items/Accessories/ArchaicPowder.cs +++ b/Items/Accessories/ArchaicPowder.cs @@ -28,13 +28,7 @@ namespace CalamityMod.Items.Accessories { player.pickSpeed -= MiningSpeedBoost; player.Calamity().fallingBlockProtection = true; - player.Calamity().trapProtection = true; - - // Doesn't stack with downgrades - if (player.chiselSpeed) - player.pickSpeed += 0.15f; - if (player.Calamity().aFossil) - player.pickSpeed += AncientFossil.MiningSpeedBoost; + player.Calamity().archaicPowder = true; } public override void AddRecipes() diff --git a/Items/Accessories/AscendantInsignia.cs b/Items/Accessories/AscendantInsignia.cs index 9a38c4ae96..70e2f6a4ea 100644 --- a/Items/Accessories/AscendantInsignia.cs +++ b/Items/Accessories/AscendantInsignia.cs @@ -15,13 +15,13 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; // These values override Soaring Insignia's - public static double FlightTimeBoost = 0.5D; + public static int FlightTimeBoostFlat = CalamityUtils.SecondsToFrames(4); public static float MoveSpeedBoost = 0.15f; - public static float JumpSpeedBoost = 0.75f; // NOTE: Tooltip shares this number with move speed % as they're equal + public static float JumpSpeedBoost = 1f; public static float AccelerationBoost = 0.5f; public static int AbilityDuration = CalamityUtils.SecondsToFrames(4); public static int AbilityCooldown = CalamityUtils.SecondsToFrames(40); - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(FlightTimeBoost.ToPercent(), MoveSpeedBoost.ToPercent(), (1f + AccelerationBoost).Round(), AbilityDuration.FramesToSeconds(), AbilityCooldown.FramesToSeconds()); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(FlightTimeBoostFlat.FramesToSeconds(), MoveSpeedBoost.ToPercent(), JumpSpeedBoost.ToJumpSpeedPercent(), (1f + AccelerationBoost).Round(), AbilityDuration.FramesToSeconds(), AbilityCooldown.FramesToSeconds()); public override void ModifyTooltips(List list) => list.IntegrateDynamicHotkey(Item); public override void SetDefaults() @@ -41,6 +41,7 @@ namespace CalamityMod.Items.Accessories player.empressBrooch = true; player.moveSpeed += MoveSpeedBoost; player.jumpSpeedBoost += JumpSpeedBoost - 0.5f; + player.wingTimeMax += FlightTimeBoostFlat; } public override void AddRecipes() diff --git a/Items/Accessories/AsgardsValor.cs b/Items/Accessories/AsgardsValor.cs index 9e450205d1..f09a272bda 100644 --- a/Items/Accessories/AsgardsValor.cs +++ b/Items/Accessories/AsgardsValor.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Items.Accessories { Item.width = 50; Item.height = 48; - Item.value = CalamityGlobalItem.RarityLimeBuyPrice; - Item.rare = ItemRarityID.Lime; + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; + Item.rare = ItemRarityID.Yellow; Item.defense = 4; Item.accessory = true; } @@ -41,8 +41,8 @@ namespace CalamityMod.Items.Accessories { CreateRecipe(). AddIngredient(). - AddIngredient(). AddIngredient(ItemID.HallowedBar, 5). + AddIngredient(). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Accessories/BadgeofBravery.cs b/Items/Accessories/BadgeofBravery.cs index fcb886a6d6..e1c1798956 100644 --- a/Items/Accessories/BadgeofBravery.cs +++ b/Items/Accessories/BadgeofBravery.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories { CreateRecipe(). AddIngredient(ItemID.WarriorEmblem). - AddIngredient(2). + AddIngredient(12). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Accessories/Baroclaw.cs b/Items/Accessories/Baroclaw.cs index 579a0c61c4..a18cbbe9e4 100644 --- a/Items/Accessories/Baroclaw.cs +++ b/Items/Accessories/Baroclaw.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories { CreateRecipe(). AddIngredient(). - AddIngredient(12). + AddIngredient(20). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Accessories/ChaliceOfTheBloodGod.cs b/Items/Accessories/ChaliceOfTheBloodGod.cs index 53a8a5026d..99494921a8 100644 --- a/Items/Accessories/ChaliceOfTheBloodGod.cs +++ b/Items/Accessories/ChaliceOfTheBloodGod.cs @@ -71,7 +71,8 @@ namespace CalamityMod.Items.Accessories CreateRecipe(). AddIngredient(). AddIngredient(ItemID.CharmofMyths). - AddIngredient(5). + AddIngredient(12). + AddIngredient(5). AddIngredient(4). AddTile(). Register(); diff --git a/Items/Accessories/ChaosStone.cs b/Items/Accessories/ChaosStone.cs index ed7d14d158..dca6821906 100644 --- a/Items/Accessories/ChaosStone.cs +++ b/Items/Accessories/ChaosStone.cs @@ -10,12 +10,13 @@ namespace CalamityMod.Items.Accessories public class ChaosStone : ModItem, ILocalizedModType { public static float LostRegenPer100Mana => 8; - public static float DamageMultPer100Mana => 0.05f; + public static int BaseLostRegen => 12; + public static float DamageMultPer100Mana => 0.055f; public new string LocalizationCategory => "Items.Accessories"; public override void ModifyTooltips(List tooltips) { - var regenAmount = Main.LocalPlayer.statManaMax2 == 0 ? 0 : (int)((Main.LocalPlayer.statManaMax2 / 100f) * LostRegenPer100Mana) * 0.5f; + var regenAmount = Main.LocalPlayer.statManaMax2 == 0 ? 0 : (int)((Main.LocalPlayer.statManaMax2 / 100f) * LostRegenPer100Mana + BaseLostRegen) * 0.5f; var dmgAmount = Main.LocalPlayer.statManaMax2 == 0 ? 0 : ((Main.LocalPlayer.statManaMax2 / 100f) * DamageMultPer100Mana * 100); tooltips.FindAndReplaceAll("[REGEN]", regenAmount.ToString("0.#")); tooltips.FindAndReplaceAll("[DAMAGE]", dmgAmount.ToString("0.#")); diff --git a/Items/Accessories/CorrosiveSpine.cs b/Items/Accessories/CorrosiveSpine.cs index cf72391472..873027e96e 100644 --- a/Items/Accessories/CorrosiveSpine.cs +++ b/Items/Accessories/CorrosiveSpine.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Items.Accessories CalamityPlayer modPlayer = player.Calamity(); modPlayer.corrosiveSpine = true; player.moveSpeed += 0.05f; - modPlayer.WaterDebuffMultiplier += 0.25f; - modPlayer.SicknessDebuffMultiplier += 0.25f; + modPlayer.WaterDebuffMultiplier += 0.5f; + modPlayer.SicknessDebuffMultiplier += 0.5f; } } } diff --git a/Items/Accessories/CrushingEgo.cs b/Items/Accessories/CrushingEgo.cs index 13c92cc9fb..59bf0db7f5 100644 --- a/Items/Accessories/CrushingEgo.cs +++ b/Items/Accessories/CrushingEgo.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(10). AddIngredient(25). AddIngredient(25). AddTile(). diff --git a/Items/Accessories/DiamondOfTheDeep.cs b/Items/Accessories/DiamondOfTheDeep.cs index 316af2422c..f0ceeea175 100644 --- a/Items/Accessories/DiamondOfTheDeep.cs +++ b/Items/Accessories/DiamondOfTheDeep.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Items.Accessories { Item.width = 26; Item.height = 26; - Item.value = CalamityGlobalItem.RarityLimeBuyPrice; - Item.rare = ItemRarityID.Lime; + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; + Item.rare = ItemRarityID.Yellow; Item.accessory = true; } @@ -33,12 +33,12 @@ namespace CalamityMod.Items.Accessories { CreateRecipe(). AddIngredient(). - AddIngredient(10). - AddIngredient(5). - AddIngredient(10). AddIngredient(5). - AddIngredient(10). - AddIngredient(5). + AddIngredient(20). + AddIngredient(20). + AddIngredient(20). + AddIngredient(20). + AddIngredient(15). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Accessories/BlazingCore.cs b/Items/Accessories/DivineProvidence.cs similarity index 87% rename from Items/Accessories/BlazingCore.cs rename to Items/Accessories/DivineProvidence.cs index 6082a7d1ae..e6771ab241 100644 --- a/Items/Accessories/BlazingCore.cs +++ b/Items/Accessories/DivineProvidence.cs @@ -13,7 +13,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { - public class BlazingCore : ModItem, ILocalizedModType + [LegacyName("BlazingCore")] + public class DivineProvidence : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; @@ -42,22 +43,22 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - player.Calamity().blazingCore = true; + player.Calamity().divineProvidence = true; player.Calamity().AccessoryParryItem = Item; player.noKnockback = true; } public static void HandleStars(Player player) { - bool empowered = player.Calamity().blazingCoreEmpoweredParry; + bool empowered = player.Calamity().divineProvEmpoweredParry; float divisor = 3f; int totalFlameProjectiles = 45; int chains = 3; float interval = totalFlameProjectiles / chains * divisor; - double patternInterval = Math.Floor(player.Calamity().blazingCoreSuccessfulParry / interval); + double patternInterval = Math.Floor(player.Calamity().divineProvSuccessfulParry / interval); - if (player.Calamity().blazingCoreSuccessfulParry % 4 == 0) //play sound every 4 frames + if (player.Calamity().divineProvSuccessfulParry % 4 == 0) //play sound every 4 frames { SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact, player.Center); } @@ -90,19 +91,19 @@ namespace CalamityMod.Items.Accessories offset += 10f; } - player.Calamity().blazingCoreSuccessfulParry--; - if (player.Calamity().blazingCoreSuccessfulParry <= 0) + player.Calamity().divineProvSuccessfulParry--; + if (player.Calamity().divineProvSuccessfulParry <= 0) { offset = 0f; - player.Calamity().blazingCoreEmpoweredParry = false; + player.Calamity().divineProvEmpoweredParry = false; } } public static void HandleParryCountdown(Player player) { - player.Calamity().blazingCoreParry--; + player.Calamity().divineProvParry--; - if (player.Calamity().blazingCoreParry > 0) + if (player.Calamity().divineProvParry > 0) { player.controlJump = false; player.controlDown = false; diff --git a/Items/Accessories/BlazingCore.png b/Items/Accessories/DivineProvidence.png similarity index 100% rename from Items/Accessories/BlazingCore.png rename to Items/Accessories/DivineProvidence.png diff --git a/Items/Accessories/FeatherCrown.cs b/Items/Accessories/FeatherCrown.cs index c331bb080a..83c538e911 100644 --- a/Items/Accessories/FeatherCrown.cs +++ b/Items/Accessories/FeatherCrown.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Accessories { CreateRecipe(). AddRecipeGroup("AnyGoldCrown"). - AddIngredient(6). + AddIngredient(8). AddIngredient(ItemID.Feather, 8). AddTile(TileID.Anvils). Register(); diff --git a/Items/Accessories/FrozenCube.cs b/Items/Accessories/FrozenCube.cs index ebc32c8439..004f4426c6 100644 --- a/Items/Accessories/FrozenCube.cs +++ b/Items/Accessories/FrozenCube.cs @@ -14,13 +14,13 @@ namespace CalamityMod.Items.Accessories { public class FrozenCube : ModItem, ILocalizedModType { - public static int mistBaseDamage = 1; - public static int slamBaseDamage = 20; - public static int baseAttackSpeed = 90; - public static int baseAttackCooldown = 180; + public static int mistBaseDamage => 5; + public static int slamBaseDamage => 20; + public static int baseAttackSpeed => 90; + public static int baseAttackCooldown => 180; - public static int usedDefenseDivide = 3; - public static int debuff = ModContent.BuffType(); + public static int usedDefenseDivide => 3; + public static int debuff => ModContent.BuffType(); public static readonly SoundStyle noise = new("CalamityMod/Sounds/Item/ElumphantSound") { Volume = 0.6f }; public static readonly SoundStyle cry = new("CalamityMod/Sounds/Item/ElumphantCry") { Volume = 0.6f }; diff --git a/Items/Accessories/HarpyRing.cs b/Items/Accessories/HarpyRing.cs index c1648a12b3..9ed2cfcdd0 100644 --- a/Items/Accessories/HarpyRing.cs +++ b/Items/Accessories/HarpyRing.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.harpyRing = true; - player.moveSpeed += 0.1f; + player.moveSpeed += 0.2f; } public override void AddRecipes() diff --git a/Items/Accessories/InfectedJewel.cs b/Items/Accessories/InfectedJewel.cs index c88977e5ba..7ec49586d9 100644 --- a/Items/Accessories/InfectedJewel.cs +++ b/Items/Accessories/InfectedJewel.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; public static int RegenBoost = 2; - public static int ReducedDoTAmount = 8; - public static int PostDebuffRegenTimeBoost = CalamityUtils.SecondsToFrames(10); + public static int ReducedDoTAmount = 12; + public static int PostDebuffRegenTimeBoost = CalamityUtils.SecondsToFrames(15); public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RegenBoost.ToRegenPerSecond(), ReducedDoTAmount.ToRegenPerSecond(), PostDebuffRegenTimeBoost.FramesToSeconds()); public override void SetDefaults() { diff --git a/Items/Accessories/LivingDew.cs b/Items/Accessories/LivingDew.cs index 2ab98916c6..407e5680c2 100644 --- a/Items/Accessories/LivingDew.cs +++ b/Items/Accessories/LivingDew.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; public static int RegenTimeBoost => 1; - public static float NaturalRegenPower => 1.5f; + public static float NaturalRegenPower => 1.75f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((NaturalRegenPower - 1f).ToPercent(), RegenTimeBoost.ToPercent()); public override void SetDefaults() { diff --git a/Items/Accessories/NebulousCore.cs b/Items/Accessories/NebulousCore.cs index 91b3cc3860..c76d9086dd 100644 --- a/Items/Accessories/NebulousCore.cs +++ b/Items/Accessories/NebulousCore.cs @@ -5,6 +5,7 @@ using CalamityMod.Rarities; using CalamityMod.Systems.Collections; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -12,6 +13,13 @@ namespace CalamityMod.Items.Accessories public class NebulousCore : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + + public static float DamageBoost => 0.12f; + public static int HealLifeOnRevive => 300; + public static int ReviveCooldown => CalamityUtils.SecondsToFrames(90); + public static int MaxStars => 15; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), HealLifeOnRevive, ReviveCooldown.FramesToSeconds()); + public override void SetStaticDefaults() { CalamityItemSets.ExtraDebuffTooltip_Enemy[Type] = [ModContent.BuffType()]; @@ -37,12 +45,12 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.nebulousCore = true; - player.GetDamage() += 0.1f; + player.GetDamage() += DamageBoost; // Spawn nebula stars if (Main.rand.NextBool(15)) { - // Count the number of current active nebula stars; if this is at least 10, no more can spawn + // Count the number of current active nebula stars; if this is at least 15, no more can spawn int numProj = 0; foreach (Projectile p in Main.ActiveProjectiles) { @@ -51,7 +59,7 @@ namespace CalamityMod.Items.Accessories numProj++; } } - if (Main.rand.Next(15) >= numProj && numProj < 10) + if (Main.rand.Next(15) >= numProj && numProj < MaxStars) { int spawnRadius = 24; for (int j = 0; j < 50; j++) // Attempt to spawn the star randomly around the player diff --git a/Items/Accessories/NecklaceofVexation.cs b/Items/Accessories/NecklaceofVexation.cs index 39d4b09ccd..388b882207 100644 --- a/Items/Accessories/NecklaceofVexation.cs +++ b/Items/Accessories/NecklaceofVexation.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories { CreateRecipe(). AddIngredient(ItemID.AvengerEmblem). - AddIngredient(2). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Accessories/OrnateShield.cs b/Items/Accessories/OrnateShield.cs index b8207f6c8b..ec74a3a62c 100644 --- a/Items/Accessories/OrnateShield.cs +++ b/Items/Accessories/OrnateShield.cs @@ -37,8 +37,8 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). - AddIngredient(ItemID.CrystalShard, 10). + AddIngredient(12). + AddIngredient(ItemID.CrystalShard, 20). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Accessories/Radiance.cs b/Items/Accessories/Radiance.cs index 46823c36ed..7f818c6c3b 100644 --- a/Items/Accessories/Radiance.cs +++ b/Items/Accessories/Radiance.cs @@ -20,10 +20,10 @@ namespace CalamityMod.Items.Accessories public static int MinRegenBoost => 2; public static int MaxRegenBoost => 8; - public static int ReducedDoTAmount => 20; - public static int PostDebuffRegenTimeBoost => CalamityUtils.SecondsToFrames(10); + public static int ReducedDoTAmount => 24; + public static int PostDebuffRegenTimeBoost => CalamityUtils.SecondsToFrames(15); public static float RegenTimeBoost => 1; - public static float NaturalRegenPower => 1.5f; + public static float NaturalRegenPower => 1.75f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinRegenBoost.ToRegenPerSecond(),MaxRegenBoost.ToRegenPerSecond(),ReducedDoTAmount.ToRegenPerSecond(), (NaturalRegenPower - 1f).ToPercent(),RegenTimeBoost.ToPercent()); public override void SetStaticDefaults() { diff --git a/Items/Accessories/ReaperToothNecklace.cs b/Items/Accessories/ReaperToothNecklace.cs index dd2aaed632..f2fd577ead 100644 --- a/Items/Accessories/ReaperToothNecklace.cs +++ b/Items/Accessories/ReaperToothNecklace.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories CreateRecipe(). AddIngredient(). AddIngredient(6). - AddIngredient(15). + AddIngredient(20). AddTile(TileID.TinkerersWorkbench). Register(); } diff --git a/Items/Accessories/Regenerator.cs b/Items/Accessories/Regenerator.cs index dc1bc73dd3..e43dd4bc88 100644 --- a/Items/Accessories/Regenerator.cs +++ b/Items/Accessories/Regenerator.cs @@ -32,6 +32,7 @@ namespace CalamityMod.Items.Accessories CalamityPlayer modPlayer = player.Calamity(); modPlayer.regenerator = true; player.longInvince = true; // Gives better iframes because god help you if you end up getting hit twice + player.GetDamage() += player.Calamity().regeneratorDamage; } public override void ModifyTooltips(List list) diff --git a/Items/Accessories/SigilofCalamitas.cs b/Items/Accessories/SigilofCalamitas.cs index a3dee2aa70..eaf536d589 100644 --- a/Items/Accessories/SigilofCalamitas.cs +++ b/Items/Accessories/SigilofCalamitas.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Accessories { CreateRecipe(). AddIngredient(ItemID.CelestialEmblem). - AddIngredient(5). + AddIngredient(8). AddIngredient(15). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Accessories/StatMeter.cs b/Items/Accessories/StatMeter.cs index bb95d2b0ca..d210db091b 100644 --- a/Items/Accessories/StatMeter.cs +++ b/Items/Accessories/StatMeter.cs @@ -211,8 +211,8 @@ namespace CalamityMod.Items.Accessories OnePlace((float)player.lifeRegen / 2f), // Divided by 2 to show HP/s, because vanilla! Also normally we'd divide this by 2 in Expert without Well Fed, but we disable that shit Sign(moveSpeedBoost) + TwoPlaces(100f * moveSpeedBoost), TwoPlaces(20f * player.GetJumpBoost())); - // Show wing stats only if over 0 flight time - if (wingFlightTime > 0f) + // Show wing stats only if over 0 flight time and wings are equipped + if (wingFlightTime > 0f && player.equippedWings != null) stats3 += this.GetLocalization("FlightTime").Format(TwoPlaces(wingFlightTime / 60f)); stats3 += "\n" + this.GetLocalization("MiscStats").Format( player.aggro, diff --git a/Items/Accessories/TheAmalgam.cs b/Items/Accessories/TheAmalgam.cs index bc4d57d665..5934412adc 100644 --- a/Items/Accessories/TheAmalgam.cs +++ b/Items/Accessories/TheAmalgam.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Items.Accessories AddIngredient(12). AddIngredient(15). AddIngredient(15). - AddIngredient(15). + AddIngredient(20). AddIngredient(4). AddTile(). Register(); diff --git a/Items/Accessories/ThePact.cs b/Items/Accessories/ThePact.cs new file mode 100644 index 0000000000..3b8fef1ac1 --- /dev/null +++ b/Items/Accessories/ThePact.cs @@ -0,0 +1,63 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatBuffs; +using CalamityMod.Systems.Collections; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + public class ThePact : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Accessories"; + + public static float MaxLifeMult => 2; + public static float ChanceToBeCrit => 0.25f; + public static float CritDmgTaken => 2.25f; + public static int BoostDuration => 900; + public static int DebuffInflictionDuration => 60; + public static float NaturalRegenBoost => 1.75f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxLifeMult, ChanceToBeCrit.ToPercent(), CritDmgTaken); + + public override void SetStaticDefaults() + { + CalamityItemSets.ExtraDebuffTooltip_Enemy[Type] = [ModContent.BuffType()]; + } + + public override void SetDefaults() + { + Item.width = 46; + Item.height = 64; + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; + Item.rare = ItemRarityID.LightRed; + Item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.Calamity().CanBeCritByThePact = true; + + if (player.HasBuff() && player.miscCounter % 3 == 0 && player.potionDelay > 0) + { + player.potionDelay -= 1; + if (player.potionDelay < 0) + player.potionDelay = 0; + if (player.HasBuff(BuffID.PotionSickness)) + { + for (var i = 0; i < player.buffType.Length; i++) + { + if (player.buffType[i] == BuffID.PotionSickness) + { + player.buffTime[i] = player.potionDelay; + } + } + } + } + } + } +} diff --git a/Items/Accessories/ThePact.png b/Items/Accessories/ThePact.png new file mode 100644 index 0000000000..697214549b Binary files /dev/null and b/Items/Accessories/ThePact.png differ diff --git a/Items/Accessories/Wings/AureateBooster.cs b/Items/Accessories/Wings/AureateBooster.cs index b2f0dce8a1..0048c702c0 100644 --- a/Items/Accessories/Wings/AureateBooster.cs +++ b/Items/Accessories/Wings/AureateBooster.cs @@ -106,7 +106,7 @@ namespace CalamityMod.Items.Accessories.Wings { CreateRecipe(). AddIngredient(ItemID.SoulofFlight, 20). - AddIngredient(5). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Accessories/Wings/ElysianWings.cs b/Items/Accessories/Wings/ElysianWings.cs index 6c0a213294..52f9814b2a 100644 --- a/Items/Accessories/Wings/ElysianWings.cs +++ b/Items/Accessories/Wings/ElysianWings.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories.Wings public override float MaxAscentSpeed => 3f; public override float BaseAscent => 0.15f; - public override void SetStaticDefaults() => ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(240, 10f, 3f); + public override void SetStaticDefaults() => ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(210, 10f, 3f); public override void SetDefaults() { diff --git a/Items/Accessories/Wings/HadalMantle.cs b/Items/Accessories/Wings/HadalMantle.cs index a0de1808f7..47936b848c 100644 --- a/Items/Accessories/Wings/HadalMantle.cs +++ b/Items/Accessories/Wings/HadalMantle.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Accessories.Wings { CreateRecipe(). AddIngredient(ItemID.SoulofFlight, 20). - AddIngredient(5). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Accessories/Wings/MoonWalkers.cs b/Items/Accessories/Wings/MoonWalkers.cs index 659f71464f..83bbec06ab 100644 --- a/Items/Accessories/Wings/MoonWalkers.cs +++ b/Items/Accessories/Wings/MoonWalkers.cs @@ -128,7 +128,7 @@ namespace CalamityMod.Items.Accessories.Wings CreateRecipe(). AddIngredient(). AddIngredient(ItemID.SoulofFlight,20). - AddIngredient(ItemID.LunarBar, 5). + AddIngredient(ItemID.LunarBar, 10). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Accessories/Wings/SilvaWings.cs b/Items/Accessories/Wings/SilvaWings.cs index ef7f77b57e..3fe1670b44 100644 --- a/Items/Accessories/Wings/SilvaWings.cs +++ b/Items/Accessories/Wings/SilvaWings.cs @@ -55,9 +55,9 @@ namespace CalamityMod.Items.Accessories.Wings { CreateRecipe(). AddIngredient(ItemID.SoulofFlight, 20). - AddIngredient(3). - AddIngredient(15). - AddIngredient(2). + AddIngredient(45). + AddIngredient(10). + AddIngredient(3). AddTile(). Register(); } diff --git a/Items/Accessories/Wings/SkylineWings.cs b/Items/Accessories/Wings/SkylineWings.cs index 427b82779d..3e0536db58 100644 --- a/Items/Accessories/Wings/SkylineWings.cs +++ b/Items/Accessories/Wings/SkylineWings.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories.Wings public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(10). AddIngredient(ItemID.Feather, 5). AddTile(TileID.Anvils). Register(); diff --git a/Items/Accessories/Wings/StarlightWings.cs b/Items/Accessories/Wings/StarlightWings.cs index 4f3b1fb1ec..2b5ae40bee 100644 --- a/Items/Accessories/Wings/StarlightWings.cs +++ b/Items/Accessories/Wings/StarlightWings.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Accessories.Wings { CreateRecipe(). AddIngredient(ItemID.SoulofFlight, 20). - AddIngredient(5). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Accessories/Wings/TarragonWings.cs b/Items/Accessories/Wings/TarragonWings.cs index 7a1d17a559..d7485793ed 100644 --- a/Items/Accessories/Wings/TarragonWings.cs +++ b/Items/Accessories/Wings/TarragonWings.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Accessories.Wings { CreateRecipe(). AddIngredient(ItemID.SoulofFlight, 20). - AddIngredient(5). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Accessories/WulfrumAcrobaticsPack.cs b/Items/Accessories/WulfrumAcrobaticsPack.cs index b9f1911f34..263560efa6 100644 --- a/Items/Accessories/WulfrumAcrobaticsPack.cs +++ b/Items/Accessories/WulfrumAcrobaticsPack.cs @@ -51,9 +51,9 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(10). AddIngredient(). - AddIngredient(ItemID.Chain, 2). + AddIngredient(ItemID.Chain, 3). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Ammo/BloodfireArrow.cs b/Items/Ammo/BloodfireArrow.cs index 6fd88990ef..f837f16b33 100644 --- a/Items/Ammo/BloodfireArrow.cs +++ b/Items/Ammo/BloodfireArrow.cs @@ -34,7 +34,8 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { CreateRecipe(333). - AddIngredient(). + AddIngredient(). + AddIngredient(). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Ammo/BloodfireBullet.cs b/Items/Ammo/BloodfireBullet.cs index 91630337cb..8ce5c795ef 100644 --- a/Items/Ammo/BloodfireBullet.cs +++ b/Items/Ammo/BloodfireBullet.cs @@ -34,7 +34,8 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { CreateRecipe(333). - AddIngredient(). + AddIngredient(). + AddIngredient(). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Ammo/CinderArrow.cs b/Items/Ammo/CinderArrow.cs index 1d647a03d4..30b7a18227 100644 --- a/Items/Ammo/CinderArrow.cs +++ b/Items/Ammo/CinderArrow.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Ammo { Item.width = 22; Item.height = 36; - Item.damage = 12; + Item.damage = 17; Item.DamageType = DamageClass.Ranged; Item.maxStack = Item.CommonMaxStack; Item.consumable = true; diff --git a/Items/Ammo/DryadsTear.cs b/Items/Ammo/DryadsTear.cs index c71578ffd1..cbbf0de76c 100644 --- a/Items/Ammo/DryadsTear.cs +++ b/Items/Ammo/DryadsTear.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Ammo { Item.width = 8; Item.height = 8; - Item.damage = 10; + Item.damage = 18; Item.DamageType = DamageClass.Ranged; Item.maxStack = Item.CommonMaxStack; Item.consumable = true; diff --git a/Items/Ammo/ElysianArrow.cs b/Items/Ammo/ElysianArrow.cs index c5533bdfe1..a4bd1b0057 100644 --- a/Items/Ammo/ElysianArrow.cs +++ b/Items/Ammo/ElysianArrow.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Ammo { Item.width = 22; Item.height = 36; - Item.damage = 15; + Item.damage = 20; Item.DamageType = DamageClass.Ranged; Item.maxStack = Item.CommonMaxStack; Item.consumable = true; diff --git a/Items/Ammo/HailstormBullet.cs b/Items/Ammo/HailstormBullet.cs index db811b79bc..4abdfbf323 100644 --- a/Items/Ammo/HailstormBullet.cs +++ b/Items/Ammo/HailstormBullet.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Ammo { Item.width = 14; Item.height = 20; - Item.damage = 12; + Item.damage = 9; Item.DamageType = DamageClass.Ranged; Item.consumable = true; Item.knockBack = 2f; diff --git a/Items/Ammo/VeriumBolt.cs b/Items/Ammo/VeriumBolt.cs index ae59a0bc45..9749a1b5b8 100644 --- a/Items/Ammo/VeriumBolt.cs +++ b/Items/Ammo/VeriumBolt.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Ammo { Item.width = 8; Item.height = 8; - Item.damage = 11; + Item.damage = 15; Item.DamageType = DamageClass.Ranged; Item.maxStack = Item.CommonMaxStack; Item.consumable = true; diff --git a/Items/Armor/Aerospec/AerospecBreastplate.cs b/Items/Armor/Aerospec/AerospecBreastplate.cs index 46b8982385..d11b0a2c1d 100644 --- a/Items/Armor/Aerospec/AerospecBreastplate.cs +++ b/Items/Armor/Aerospec/AerospecBreastplate.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Armor.Aerospec public override void AddRecipes() { CreateRecipe(). - AddIngredient(15). + AddIngredient(20). AddIngredient(ItemID.Feather, 2). AddTile(TileID.Anvils). Register(); diff --git a/Items/Armor/Aerospec/AerospecHeadMagic.cs b/Items/Armor/Aerospec/AerospecHeadMagic.cs index 19435bdd7d..ca262b9bd4 100644 --- a/Items/Armor/Aerospec/AerospecHeadMagic.cs +++ b/Items/Armor/Aerospec/AerospecHeadMagic.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Armor.Aerospec public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(10). AddIngredient(ItemID.Feather). AddTile(TileID.Anvils). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Aerospec/AerospecHeadMelee.cs b/Items/Armor/Aerospec/AerospecHeadMelee.cs index b57eada540..aa945e437e 100644 --- a/Items/Armor/Aerospec/AerospecHeadMelee.cs +++ b/Items/Armor/Aerospec/AerospecHeadMelee.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Items.Armor.Aerospec public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(10). AddIngredient(ItemID.Feather). AddTile(TileID.Anvils). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Aerospec/AerospecHeadRanged.cs b/Items/Armor/Aerospec/AerospecHeadRanged.cs index 39ea869177..4b13b777a4 100644 --- a/Items/Armor/Aerospec/AerospecHeadRanged.cs +++ b/Items/Armor/Aerospec/AerospecHeadRanged.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Items.Armor.Aerospec public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(10). AddIngredient(ItemID.Feather). AddTile(TileID.Anvils). SortAfterFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Aerospec/AerospecHeadRogue.cs b/Items/Armor/Aerospec/AerospecHeadRogue.cs index de0f62a21d..70bf01d7ba 100644 --- a/Items/Armor/Aerospec/AerospecHeadRogue.cs +++ b/Items/Armor/Aerospec/AerospecHeadRogue.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Armor.Aerospec public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(10). AddIngredient(ItemID.Feather). AddTile(TileID.Anvils). SortAfterFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Aerospec/AerospecHeadSummon.cs b/Items/Armor/Aerospec/AerospecHeadSummon.cs index f7d31c08be..3e71483098 100644 --- a/Items/Armor/Aerospec/AerospecHeadSummon.cs +++ b/Items/Armor/Aerospec/AerospecHeadSummon.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Items.Armor.Aerospec public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(10). AddIngredient(ItemID.Feather). AddTile(TileID.Anvils). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Aerospec/AerospecLeggings.cs b/Items/Armor/Aerospec/AerospecLeggings.cs index 202f00ed8f..845d544d6c 100644 --- a/Items/Armor/Aerospec/AerospecLeggings.cs +++ b/Items/Armor/Aerospec/AerospecLeggings.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor.Aerospec public override void AddRecipes() { CreateRecipe(). - AddIngredient(10). + AddIngredient(15). AddIngredient(ItemID.Feather, 2). AddTile(TileID.Anvils). Register(); diff --git a/Items/Armor/Astral/AstralBreastplate.cs b/Items/Armor/Astral/AstralBreastplate.cs index 1e8a002664..56e441ef7c 100644 --- a/Items/Armor/Astral/AstralBreastplate.cs +++ b/Items/Armor/Astral/AstralBreastplate.cs @@ -36,8 +36,7 @@ namespace CalamityMod.Items.Armor.Astral public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). - AddIngredient(ItemID.MeteoriteBar, 9). + AddIngredient(24). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Armor/Astral/AstralHelm.cs b/Items/Armor/Astral/AstralHelm.cs index 6458df3a5a..6b93ddc9de 100644 --- a/Items/Armor/Astral/AstralHelm.cs +++ b/Items/Armor/Astral/AstralHelm.cs @@ -110,8 +110,7 @@ namespace CalamityMod.Items.Armor.Astral public override void AddRecipes() { CreateRecipe(). - AddIngredient(8). - AddIngredient(ItemID.MeteoriteBar, 6). + AddIngredient(12). AddTile(TileID.LunarCraftingStation). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Astral/AstralLeggings.cs b/Items/Armor/Astral/AstralLeggings.cs index ec9a0d4f04..80bc512397 100644 --- a/Items/Armor/Astral/AstralLeggings.cs +++ b/Items/Armor/Astral/AstralLeggings.cs @@ -33,8 +33,7 @@ namespace CalamityMod.Items.Armor.Astral public override void AddRecipes() { CreateRecipe(). - AddIngredient(10). - AddIngredient(ItemID.MeteoriteBar, 8). + AddIngredient(18). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Armor/Auric/AuricTeslaBodyArmor.cs b/Items/Armor/Auric/AuricTeslaBodyArmor.cs index 4b2eae5319..87adef91cc 100644 --- a/Items/Armor/Auric/AuricTeslaBodyArmor.cs +++ b/Items/Armor/Auric/AuricTeslaBodyArmor.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Items.Armor.Auric AddIngredient(). AddIngredient(). AddIngredient(). - AddIngredient(18). + AddIngredient(20). AddTile(). Register(); @@ -80,7 +80,7 @@ namespace CalamityMod.Items.Armor.Auric AddIngredient(). AddIngredient(). AddIngredient(). - AddIngredient(18). + AddIngredient(20). AddTile(). Register(); } diff --git a/Items/Armor/Auric/AuricTeslaHeadMagic.cs b/Items/Armor/Auric/AuricTeslaHeadMagic.cs index e4a908579e..1971055fb5 100644 --- a/Items/Armor/Auric/AuricTeslaHeadMagic.cs +++ b/Items/Armor/Auric/AuricTeslaHeadMagic.cs @@ -96,7 +96,7 @@ namespace CalamityMod.Items.Armor.Auric AddIngredient(). AddIngredient(). AddIngredient(). - AddIngredient(12). + AddIngredient(10). AddTile(). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Auric/AuricTeslaHeadMelee.cs b/Items/Armor/Auric/AuricTeslaHeadMelee.cs index c28da3d700..69c73aab3d 100644 --- a/Items/Armor/Auric/AuricTeslaHeadMelee.cs +++ b/Items/Armor/Auric/AuricTeslaHeadMelee.cs @@ -103,7 +103,7 @@ namespace CalamityMod.Items.Armor.Auric AddIngredient(). AddIngredient(). AddIngredient(). - AddIngredient(12). + AddIngredient(10). AddTile(). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Auric/AuricTeslaHeadRanged.cs b/Items/Armor/Auric/AuricTeslaHeadRanged.cs index acd69acec9..90ea45c870 100644 --- a/Items/Armor/Auric/AuricTeslaHeadRanged.cs +++ b/Items/Armor/Auric/AuricTeslaHeadRanged.cs @@ -100,7 +100,7 @@ namespace CalamityMod.Items.Armor.Auric AddIngredient(). AddIngredient(). AddIngredient(). - AddIngredient(12). + AddIngredient(10). AddTile(). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Auric/AuricTeslaHeadRogue.cs b/Items/Armor/Auric/AuricTeslaHeadRogue.cs index 7283be269e..7dfee1ddac 100644 --- a/Items/Armor/Auric/AuricTeslaHeadRogue.cs +++ b/Items/Armor/Auric/AuricTeslaHeadRogue.cs @@ -104,7 +104,7 @@ namespace CalamityMod.Items.Armor.Auric AddIngredient(). AddIngredient(). AddIngredient(). - AddIngredient(12). + AddIngredient(10). AddTile(). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Auric/AuricTeslaHeadSummon.cs b/Items/Armor/Auric/AuricTeslaHeadSummon.cs index 206c06785e..f6a84997c7 100644 --- a/Items/Armor/Auric/AuricTeslaHeadSummon.cs +++ b/Items/Armor/Auric/AuricTeslaHeadSummon.cs @@ -101,7 +101,7 @@ namespace CalamityMod.Items.Armor.Auric AddIngredient(). AddIngredient(). AddIngredient(). - AddIngredient(12). + AddIngredient(10). AddTile(). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Bloodflare/BloodflareBodyArmor.cs b/Items/Armor/Bloodflare/BloodflareBodyArmor.cs index 5dcf752f3e..8dbef44c5c 100644 --- a/Items/Armor/Bloodflare/BloodflareBodyArmor.cs +++ b/Items/Armor/Bloodflare/BloodflareBodyArmor.cs @@ -34,7 +34,8 @@ namespace CalamityMod.Items.Armor.Bloodflare public override void AddRecipes() { CreateRecipe(). - AddIngredient(16). + AddIngredient(50). + AddIngredient(20). AddIngredient(4). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Armor/Bloodflare/BloodflareCuisses.cs b/Items/Armor/Bloodflare/BloodflareCuisses.cs index b037201ed0..71b45a6b0c 100644 --- a/Items/Armor/Bloodflare/BloodflareCuisses.cs +++ b/Items/Armor/Bloodflare/BloodflareCuisses.cs @@ -36,7 +36,8 @@ namespace CalamityMod.Items.Armor.Bloodflare public override void AddRecipes() { CreateRecipe(). - AddIngredient(13). + AddIngredient(35). + AddIngredient(15). AddIngredient(3). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Armor/Bloodflare/BloodflareHeadMagic.cs b/Items/Armor/Bloodflare/BloodflareHeadMagic.cs index c4f3fea04a..8b66f597f7 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadMagic.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadMagic.cs @@ -59,7 +59,8 @@ namespace CalamityMod.Items.Armor.Bloodflare public override void AddRecipes() { CreateRecipe(). - AddIngredient(11). + AddIngredient(25). + AddIngredient(10). AddIngredient(2). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Bloodflare/BloodflareHeadMelee.cs b/Items/Armor/Bloodflare/BloodflareHeadMelee.cs index ff42b9d5dd..b18a7a335a 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadMelee.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadMelee.cs @@ -59,7 +59,8 @@ namespace CalamityMod.Items.Armor.Bloodflare public override void AddRecipes() { CreateRecipe(). - AddIngredient(11). + AddIngredient(25). + AddIngredient(10). AddIngredient(2). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Bloodflare/BloodflareHeadRanged.cs b/Items/Armor/Bloodflare/BloodflareHeadRanged.cs index f4c1376e75..45437ee384 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadRanged.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadRanged.cs @@ -60,7 +60,8 @@ namespace CalamityMod.Items.Armor.Bloodflare public override void AddRecipes() { CreateRecipe(). - AddIngredient(11). + AddIngredient(25). + AddIngredient(10). AddIngredient(2). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Bloodflare/BloodflareHeadRogue.cs b/Items/Armor/Bloodflare/BloodflareHeadRogue.cs index 53e92279dc..03c8191af6 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadRogue.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadRogue.cs @@ -55,7 +55,8 @@ namespace CalamityMod.Items.Armor.Bloodflare public override void AddRecipes() { CreateRecipe(). - AddIngredient(11). + AddIngredient(25). + AddIngredient(10). AddIngredient(2). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Bloodflare/BloodflareHeadSummon.cs b/Items/Armor/Bloodflare/BloodflareHeadSummon.cs index 2748a27213..ca4323039d 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadSummon.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadSummon.cs @@ -59,7 +59,8 @@ namespace CalamityMod.Items.Armor.Bloodflare public override void AddRecipes() { CreateRecipe(). - AddIngredient(11). + AddIngredient(25). + AddIngredient(10). AddIngredient(2). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Brimflame/BrimflameBoots.cs b/Items/Armor/Brimflame/BrimflameBoots.cs index 76732610d6..3f7c688699 100644 --- a/Items/Armor/Brimflame/BrimflameBoots.cs +++ b/Items/Armor/Brimflame/BrimflameBoots.cs @@ -34,8 +34,8 @@ namespace CalamityMod.Items.Armor.Brimflame public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). - AddIngredient(3). + AddIngredient(10). + AddIngredient(6). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Armor/Brimflame/BrimflameCowl.cs b/Items/Armor/Brimflame/BrimflameCowl.cs index 753d63d6ab..e433b7f052 100644 --- a/Items/Armor/Brimflame/BrimflameCowl.cs +++ b/Items/Armor/Brimflame/BrimflameCowl.cs @@ -67,8 +67,8 @@ namespace CalamityMod.Items.Armor.Brimflame public override void AddRecipes() { CreateRecipe(). + AddIngredient(8). AddIngredient(4). - AddIngredient(2). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Brimflame/BrimflameRobes.cs b/Items/Armor/Brimflame/BrimflameRobes.cs index e729bb80ae..1d622d7dc7 100644 --- a/Items/Armor/Brimflame/BrimflameRobes.cs +++ b/Items/Armor/Brimflame/BrimflameRobes.cs @@ -44,8 +44,8 @@ namespace CalamityMod.Items.Armor.Brimflame public override void AddRecipes() { CreateRecipe(). + AddIngredient(12). AddIngredient(8). - AddIngredient(4). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Daedalus/DaedalusBreastplate.cs b/Items/Armor/Daedalus/DaedalusBreastplate.cs index 1b29e447df..c9ddda3988 100644 --- a/Items/Armor/Daedalus/DaedalusBreastplate.cs +++ b/Items/Armor/Daedalus/DaedalusBreastplate.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor.Daedalus public override void AddRecipes() { CreateRecipe(). - AddIngredient(15). + AddIngredient(24). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Armor/Daedalus/DaedalusHeadMagic.cs b/Items/Armor/Daedalus/DaedalusHeadMagic.cs index 188e83ea26..53d96f4232 100644 --- a/Items/Armor/Daedalus/DaedalusHeadMagic.cs +++ b/Items/Armor/Daedalus/DaedalusHeadMagic.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Items.Armor.Daedalus public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(12). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Daedalus/DaedalusHeadMelee.cs b/Items/Armor/Daedalus/DaedalusHeadMelee.cs index e5e8e4b668..453fc420c9 100644 --- a/Items/Armor/Daedalus/DaedalusHeadMelee.cs +++ b/Items/Armor/Daedalus/DaedalusHeadMelee.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Items.Armor.Daedalus public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(12). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Daedalus/DaedalusHeadRanged.cs b/Items/Armor/Daedalus/DaedalusHeadRanged.cs index 0eadffe839..a52e3a6e8e 100644 --- a/Items/Armor/Daedalus/DaedalusHeadRanged.cs +++ b/Items/Armor/Daedalus/DaedalusHeadRanged.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Armor.Daedalus public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(12). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Daedalus/DaedalusHeadRogue.cs b/Items/Armor/Daedalus/DaedalusHeadRogue.cs index 2007d1a7df..cce4c68ae0 100644 --- a/Items/Armor/Daedalus/DaedalusHeadRogue.cs +++ b/Items/Armor/Daedalus/DaedalusHeadRogue.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Armor.Daedalus public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(12). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Daedalus/DaedalusHeadSummon.cs b/Items/Armor/Daedalus/DaedalusHeadSummon.cs index 2b2026327c..727f0b4279 100644 --- a/Items/Armor/Daedalus/DaedalusHeadSummon.cs +++ b/Items/Armor/Daedalus/DaedalusHeadSummon.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Items.Armor.Daedalus public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(12). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Daedalus/DaedalusLeggings.cs b/Items/Armor/Daedalus/DaedalusLeggings.cs index 34b19ad388..f4380f4639 100644 --- a/Items/Armor/Daedalus/DaedalusLeggings.cs +++ b/Items/Armor/Daedalus/DaedalusLeggings.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Armor.Daedalus public override void AddRecipes() { CreateRecipe(). - AddIngredient(10). + AddIngredient(18). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Armor/Demonshade/DemonshadeGreaves.cs b/Items/Armor/Demonshade/DemonshadeGreaves.cs index 153c39dc9d..4d63a9c4e0 100644 --- a/Items/Armor/Demonshade/DemonshadeGreaves.cs +++ b/Items/Armor/Demonshade/DemonshadeGreaves.cs @@ -4,6 +4,10 @@ using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.Localization; using Terraria.ModLoader; +using System.IO; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.ModLoader.IO; namespace CalamityMod.Items.Armor.Demonshade { @@ -28,10 +32,47 @@ namespace CalamityMod.Items.Armor.Demonshade Item.Calamity().devItem = true; } + #region Toggleable Acceleration effect + + bool toggleEnabled = true; + + public override bool CanRightClick() => Main.keyState.PressingShift(); + public override void RightClick(Player player) + { + toggleEnabled = !toggleEnabled; + Item.NetStateChanged(); + } + public override bool ConsumeItem(Player player) => false; + public override void SaveData(TagCompound tag) + { + tag.Add("toggleEffect", toggleEnabled); + } + + public override void LoadData(TagCompound tag) + { + toggleEnabled = tag.GetBool("toggleEffect"); + } + + public override void NetSend(BinaryWriter writer) + { + writer.Write(toggleEnabled); + } + + public override void NetReceive(BinaryReader reader) + { + toggleEnabled = reader.ReadBoolean(); + } + + public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, toggleEnabled); + } + #endregion + public override void UpdateEquip(Player player) { var modPlayer = player.Calamity(); - modPlayer.shadowSpeed = true; + modPlayer.shadowSpeed = toggleEnabled; player.moveSpeed += MoveSpeedBoost; } diff --git a/Items/Armor/FathomSwarmer/FathomSwarmerBoots.cs b/Items/Armor/FathomSwarmer/FathomSwarmerBoots.cs index 1727744f85..9051803e8c 100644 --- a/Items/Armor/FathomSwarmer/FathomSwarmerBoots.cs +++ b/Items/Armor/FathomSwarmer/FathomSwarmerBoots.cs @@ -41,8 +41,8 @@ namespace CalamityMod.Items.Armor.FathomSwarmer { CreateRecipe(). AddIngredient(9). - AddIngredient(8). - AddIngredient(4). + AddIngredient(50). + AddIngredient(15). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Armor/FathomSwarmer/FathomSwarmerBreastplate.cs b/Items/Armor/FathomSwarmer/FathomSwarmerBreastplate.cs index 66e7ff78d1..74dc96e551 100644 --- a/Items/Armor/FathomSwarmer/FathomSwarmerBreastplate.cs +++ b/Items/Armor/FathomSwarmer/FathomSwarmerBreastplate.cs @@ -47,8 +47,8 @@ namespace CalamityMod.Items.Armor.FathomSwarmer { CreateRecipe(). AddIngredient(12). - AddIngredient(10). - AddIngredient(5). + AddIngredient(75). + AddIngredient(20). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/FathomSwarmer/FathomSwarmerVisage.cs b/Items/Armor/FathomSwarmer/FathomSwarmerVisage.cs index 0eced74d3f..5c5a11ee04 100644 --- a/Items/Armor/FathomSwarmer/FathomSwarmerVisage.cs +++ b/Items/Armor/FathomSwarmer/FathomSwarmerVisage.cs @@ -71,9 +71,9 @@ namespace CalamityMod.Items.Armor.FathomSwarmer public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). - AddIngredient(6). - AddIngredient(3). + AddIngredient(6). + AddIngredient(25). + AddIngredient(10). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/GodSlayer/GodSlayerChestplate.cs b/Items/Armor/GodSlayer/GodSlayerChestplate.cs index cefd8ea258..ea6bdac934 100644 --- a/Items/Armor/GodSlayer/GodSlayerChestplate.cs +++ b/Items/Armor/GodSlayer/GodSlayerChestplate.cs @@ -41,8 +41,8 @@ namespace CalamityMod.Items.Armor.GodSlayer public override void AddRecipes() { CreateRecipe(). - AddIngredient(15). - AddIngredient(3). + AddIngredient(20). + AddIngredient(4). AddTile(). Register(); } diff --git a/Items/Armor/GodSlayer/GodSlayerHeadMelee.cs b/Items/Armor/GodSlayer/GodSlayerHeadMelee.cs index fd3e644a0b..4e0b206b54 100644 --- a/Items/Armor/GodSlayer/GodSlayerHeadMelee.cs +++ b/Items/Armor/GodSlayer/GodSlayerHeadMelee.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Items.Armor.GodSlayer public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddIngredient(2). AddTile(). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/GodSlayer/GodSlayerHeadRanged.cs b/Items/Armor/GodSlayer/GodSlayerHeadRanged.cs index 1eff59c595..95be023141 100644 --- a/Items/Armor/GodSlayer/GodSlayerHeadRanged.cs +++ b/Items/Armor/GodSlayer/GodSlayerHeadRanged.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Items.Armor.GodSlayer public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddIngredient(2). AddTile(). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/GodSlayer/GodSlayerHeadRogue.cs b/Items/Armor/GodSlayer/GodSlayerHeadRogue.cs index c89fbe2355..1f3558d511 100644 --- a/Items/Armor/GodSlayer/GodSlayerHeadRogue.cs +++ b/Items/Armor/GodSlayer/GodSlayerHeadRogue.cs @@ -67,7 +67,7 @@ namespace CalamityMod.Items.Armor.GodSlayer public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddIngredient(2). AddTile(). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/GodSlayer/GodSlayerLeggings.cs b/Items/Armor/GodSlayer/GodSlayerLeggings.cs index e5dade9642..6e3520da96 100644 --- a/Items/Armor/GodSlayer/GodSlayerLeggings.cs +++ b/Items/Armor/GodSlayer/GodSlayerLeggings.cs @@ -36,8 +36,8 @@ namespace CalamityMod.Items.Armor.GodSlayer public override void AddRecipes() { CreateRecipe(). - AddIngredient(10). - AddIngredient(2). + AddIngredient(15). + AddIngredient(3). AddTile(). Register(); } diff --git a/Items/Armor/Hydrothermic/HydrothermicArmor.cs b/Items/Armor/Hydrothermic/HydrothermicArmor.cs index b35d5bc00d..4a84055052 100644 --- a/Items/Armor/Hydrothermic/HydrothermicArmor.cs +++ b/Items/Armor/Hydrothermic/HydrothermicArmor.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic public override void AddRecipes() { CreateRecipe(). - AddIngredient(15). + AddIngredient(20). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs b/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs index c6961124b2..e41dc81b8b 100644 --- a/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs +++ b/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Hydrothermic/HydrothermicHeadMelee.cs b/Items/Armor/Hydrothermic/HydrothermicHeadMelee.cs index eafe23a27c..06835f8d07 100644 --- a/Items/Armor/Hydrothermic/HydrothermicHeadMelee.cs +++ b/Items/Armor/Hydrothermic/HydrothermicHeadMelee.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Hydrothermic/HydrothermicHeadRanged.cs b/Items/Armor/Hydrothermic/HydrothermicHeadRanged.cs index e772532f66..ed9ccc7826 100644 --- a/Items/Armor/Hydrothermic/HydrothermicHeadRanged.cs +++ b/Items/Armor/Hydrothermic/HydrothermicHeadRanged.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Hydrothermic/HydrothermicHeadRogue.cs b/Items/Armor/Hydrothermic/HydrothermicHeadRogue.cs index c906206ff5..fab79f3fc8 100644 --- a/Items/Armor/Hydrothermic/HydrothermicHeadRogue.cs +++ b/Items/Armor/Hydrothermic/HydrothermicHeadRogue.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Hydrothermic/HydrothermicHeadSummon.cs b/Items/Armor/Hydrothermic/HydrothermicHeadSummon.cs index 86ad6eba9f..886c10563a 100644 --- a/Items/Armor/Hydrothermic/HydrothermicHeadSummon.cs +++ b/Items/Armor/Hydrothermic/HydrothermicHeadSummon.cs @@ -75,7 +75,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Hydrothermic/HydrothermicSubligar.cs b/Items/Armor/Hydrothermic/HydrothermicSubligar.cs index f896863d03..6e7c575afe 100644 --- a/Items/Armor/Hydrothermic/HydrothermicSubligar.cs +++ b/Items/Armor/Hydrothermic/HydrothermicSubligar.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic public override void AddRecipes() { CreateRecipe(). - AddIngredient(10). + AddIngredient(15). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Armor/OmegaBlue/OmegaBlueChestplate.cs b/Items/Armor/OmegaBlue/OmegaBlueChestplate.cs index 83f1874634..c501318e2c 100644 --- a/Items/Armor/OmegaBlue/OmegaBlueChestplate.cs +++ b/Items/Armor/OmegaBlue/OmegaBlueChestplate.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Armor.OmegaBlue { CreateRecipe(). AddIngredient(5). - AddIngredient(18). + AddIngredient(25). AddIngredient(3). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Armor/OmegaBlue/OmegaBlueHelmet.cs b/Items/Armor/OmegaBlue/OmegaBlueHelmet.cs index beb164e68f..32bf50a7ab 100644 --- a/Items/Armor/OmegaBlue/OmegaBlueHelmet.cs +++ b/Items/Armor/OmegaBlue/OmegaBlueHelmet.cs @@ -98,7 +98,7 @@ namespace CalamityMod.Items.Armor.OmegaBlue { CreateRecipe(). AddIngredient(3). - AddIngredient(12). + AddIngredient(15). AddIngredient(). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/OmegaBlue/OmegaBlueTentacles.cs b/Items/Armor/OmegaBlue/OmegaBlueTentacles.cs index d0d6e96c73..09aaf332b1 100644 --- a/Items/Armor/OmegaBlue/OmegaBlueTentacles.cs +++ b/Items/Armor/OmegaBlue/OmegaBlueTentacles.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Armor.OmegaBlue { CreateRecipe(). AddIngredient(4). - AddIngredient(15). + AddIngredient(20). AddIngredient(2). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Armor/Reaver/ReaverCuisses.cs b/Items/Armor/Reaver/ReaverCuisses.cs index 991ad6b50e..4802b63328 100644 --- a/Items/Armor/Reaver/ReaverCuisses.cs +++ b/Items/Armor/Reaver/ReaverCuisses.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor.Reaver public override void AddRecipes() { CreateRecipe(). - AddIngredient(10). + AddIngredient(15). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Armor/Reaver/ReaverHeadExplore.cs b/Items/Armor/Reaver/ReaverHeadExplore.cs index 307e36a692..756ddeb157 100644 --- a/Items/Armor/Reaver/ReaverHeadExplore.cs +++ b/Items/Armor/Reaver/ReaverHeadExplore.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Items.Armor.Reaver public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Reaver/ReaverHeadMobility.cs b/Items/Armor/Reaver/ReaverHeadMobility.cs index 613eb37fb2..aa34f36acc 100644 --- a/Items/Armor/Reaver/ReaverHeadMobility.cs +++ b/Items/Armor/Reaver/ReaverHeadMobility.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Items.Armor.Reaver public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Reaver/ReaverHeadTank.cs b/Items/Armor/Reaver/ReaverHeadTank.cs index 6ab102d56c..7df946b0b4 100644 --- a/Items/Armor/Reaver/ReaverHeadTank.cs +++ b/Items/Armor/Reaver/ReaverHeadTank.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Armor.Reaver // Set Bonus public static int SetBonusAggroBoost = 600; - public static float SetBonusDebuffDamageReduction = 0.2f; + public static float SetBonusDebuffDamageReduction = 0.5f; public static float SetBonusMobilityReduction = 0.3f; public static int ReaverRageDuration = CalamityUtils.SecondsToFrames(5); public static int ReaverRageDefenseBoost = 5; @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Armor.Reaver public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Reaver/ReaverScaleMail.cs b/Items/Armor/Reaver/ReaverScaleMail.cs index 60d307b21b..1d14e87516 100644 --- a/Items/Armor/Reaver/ReaverScaleMail.cs +++ b/Items/Armor/Reaver/ReaverScaleMail.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Armor.Reaver public override void AddRecipes() { CreateRecipe(). - AddIngredient(15). + AddIngredient(20). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Silva/SilvaArmor.cs b/Items/Armor/Silva/SilvaArmor.cs index 6c7104676c..516b82f1b1 100644 --- a/Items/Armor/Silva/SilvaArmor.cs +++ b/Items/Armor/Silva/SilvaArmor.cs @@ -44,9 +44,9 @@ namespace CalamityMod.Items.Armor.Silva public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). - AddIngredient(10). - AddIngredient(3). + AddIngredient(90). + AddIngredient(12). + AddIngredient(4). AddTile(). Register(); } diff --git a/Items/Armor/Silva/SilvaHeadMagic.cs b/Items/Armor/Silva/SilvaHeadMagic.cs index 1b6ae86e25..9056c9788f 100644 --- a/Items/Armor/Silva/SilvaHeadMagic.cs +++ b/Items/Armor/Silva/SilvaHeadMagic.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Abyss; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; @@ -59,8 +59,8 @@ namespace CalamityMod.Items.Armor.Silva public override void AddRecipes() { CreateRecipe(). - AddIngredient(6). - AddIngredient(5). + AddIngredient(30). + AddIngredient(8). AddIngredient(2). AddTile(). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Silva/SilvaHeadSummon.cs b/Items/Armor/Silva/SilvaHeadSummon.cs index 356c625801..f0ba705b0c 100644 --- a/Items/Armor/Silva/SilvaHeadSummon.cs +++ b/Items/Armor/Silva/SilvaHeadSummon.cs @@ -58,8 +58,8 @@ namespace CalamityMod.Items.Armor.Silva public override void AddRecipes() { CreateRecipe(). - AddIngredient(6). - AddIngredient(5). + AddIngredient(30). + AddIngredient(8). AddIngredient(2). AddTile(). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Silva/SilvaLeggings.cs b/Items/Armor/Silva/SilvaLeggings.cs index 9faf9d6353..394c7b844d 100644 --- a/Items/Armor/Silva/SilvaLeggings.cs +++ b/Items/Armor/Silva/SilvaLeggings.cs @@ -37,9 +37,9 @@ namespace CalamityMod.Items.Armor.Silva public override void AddRecipes() { CreateRecipe(). - AddIngredient(9). - AddIngredient(7). - AddIngredient(2). + AddIngredient(60). + AddIngredient(10). + AddIngredient(3). AddTile(). Register(); } diff --git a/Items/Armor/Statigel/StatigelGreaves.cs b/Items/Armor/Statigel/StatigelGreaves.cs index ecb28cc6d6..9a1a3353b0 100644 --- a/Items/Armor/Statigel/StatigelGreaves.cs +++ b/Items/Armor/Statigel/StatigelGreaves.cs @@ -33,8 +33,8 @@ namespace CalamityMod.Items.Armor.Statigel public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). - AddIngredient(7). + AddIngredient(10). + AddIngredient(10). AddTile(TileID.Solidifier). Register(); } diff --git a/Items/Armor/Statigel/StatigelHeadMagic.cs b/Items/Armor/Statigel/StatigelHeadMagic.cs index 8da8e24312..04a26acd0f 100644 --- a/Items/Armor/Statigel/StatigelHeadMagic.cs +++ b/Items/Armor/Statigel/StatigelHeadMagic.cs @@ -49,8 +49,8 @@ namespace CalamityMod.Items.Armor.Statigel public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). - AddIngredient(5). + AddIngredient(8). + AddIngredient(8). AddTile(TileID.Solidifier). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Statigel/StatigelHeadMelee.cs b/Items/Armor/Statigel/StatigelHeadMelee.cs index 2655e42ecf..e35503a5fb 100644 --- a/Items/Armor/Statigel/StatigelHeadMelee.cs +++ b/Items/Armor/Statigel/StatigelHeadMelee.cs @@ -51,8 +51,8 @@ namespace CalamityMod.Items.Armor.Statigel public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). - AddIngredient(5). + AddIngredient(8). + AddIngredient(8). AddTile(TileID.Solidifier). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Statigel/StatigelHeadRanged.cs b/Items/Armor/Statigel/StatigelHeadRanged.cs index 2ead3f7278..a0187c6129 100644 --- a/Items/Armor/Statigel/StatigelHeadRanged.cs +++ b/Items/Armor/Statigel/StatigelHeadRanged.cs @@ -45,8 +45,8 @@ namespace CalamityMod.Items.Armor.Statigel public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). - AddIngredient(5). + AddIngredient(8). + AddIngredient(8). AddTile(TileID.Solidifier). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Statigel/StatigelHeadRogue.cs b/Items/Armor/Statigel/StatigelHeadRogue.cs index 65d8ee98d7..ed9fb8470d 100644 --- a/Items/Armor/Statigel/StatigelHeadRogue.cs +++ b/Items/Armor/Statigel/StatigelHeadRogue.cs @@ -53,8 +53,8 @@ namespace CalamityMod.Items.Armor.Statigel public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). - AddIngredient(5). + AddIngredient(8). + AddIngredient(8). AddTile(TileID.Solidifier). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Statigel/StatigelHeadSummon.cs b/Items/Armor/Statigel/StatigelHeadSummon.cs index b237a888d9..05058e6c99 100644 --- a/Items/Armor/Statigel/StatigelHeadSummon.cs +++ b/Items/Armor/Statigel/StatigelHeadSummon.cs @@ -69,8 +69,8 @@ namespace CalamityMod.Items.Armor.Statigel public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). - AddIngredient(5). + AddIngredient(8). + AddIngredient(8). AddTile(TileID.Solidifier). SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); diff --git a/Items/Armor/Tarragon/TarragonBreastplate.cs b/Items/Armor/Tarragon/TarragonBreastplate.cs index f51bbea2a2..c7f1a8153d 100644 --- a/Items/Armor/Tarragon/TarragonBreastplate.cs +++ b/Items/Armor/Tarragon/TarragonBreastplate.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor.Tarragon public override void AddRecipes() { CreateRecipe(). - AddIngredient(15). + AddIngredient(24). AddIngredient(18). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Armor/Tarragon/TarragonHeadMagic.cs b/Items/Armor/Tarragon/TarragonHeadMagic.cs index 5081997c12..491bc384cd 100644 --- a/Items/Armor/Tarragon/TarragonHeadMagic.cs +++ b/Items/Armor/Tarragon/TarragonHeadMagic.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Items.Armor.Tarragon public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(12). AddIngredient(6). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Tarragon/TarragonHeadMelee.cs b/Items/Armor/Tarragon/TarragonHeadMelee.cs index ee44143770..72aafa2f5e 100644 --- a/Items/Armor/Tarragon/TarragonHeadMelee.cs +++ b/Items/Armor/Tarragon/TarragonHeadMelee.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Armor.Tarragon public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(12). AddIngredient(6). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Tarragon/TarragonHeadRanged.cs b/Items/Armor/Tarragon/TarragonHeadRanged.cs index b066013fdc..54423f9d3d 100644 --- a/Items/Armor/Tarragon/TarragonHeadRanged.cs +++ b/Items/Armor/Tarragon/TarragonHeadRanged.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Armor.Tarragon public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(12). AddIngredient(6). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Tarragon/TarragonHeadRogue.cs b/Items/Armor/Tarragon/TarragonHeadRogue.cs index 4144fe0ee4..eb07595466 100644 --- a/Items/Armor/Tarragon/TarragonHeadRogue.cs +++ b/Items/Armor/Tarragon/TarragonHeadRogue.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Armor.Tarragon public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(12). AddIngredient(6). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Tarragon/TarragonHeadSummon.cs b/Items/Armor/Tarragon/TarragonHeadSummon.cs index 875953b77a..1f2f13fa7f 100644 --- a/Items/Armor/Tarragon/TarragonHeadSummon.cs +++ b/Items/Armor/Tarragon/TarragonHeadSummon.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Items.Armor.Tarragon public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(12). AddIngredient(6). AddTile(TileID.MythrilAnvil). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Tarragon/TarragonLeggings.cs b/Items/Armor/Tarragon/TarragonLeggings.cs index 0b9a6fad3c..1c089b649a 100644 --- a/Items/Armor/Tarragon/TarragonLeggings.cs +++ b/Items/Armor/Tarragon/TarragonLeggings.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor.Tarragon public override void AddRecipes() { CreateRecipe(). - AddIngredient(11). + AddIngredient(18). AddIngredient(12). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Armor/Wulfrum/WulfrumSet.cs b/Items/Armor/Wulfrum/WulfrumSet.cs index 4d3f16e4b3..d22c2761f2 100644 --- a/Items/Armor/Wulfrum/WulfrumSet.cs +++ b/Items/Armor/Wulfrum/WulfrumSet.cs @@ -205,7 +205,7 @@ namespace CalamityMod.Items.Armor.Wulfrum public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(10). AddIngredient(). AddTile(TileID.Anvils). Register(); @@ -245,7 +245,7 @@ namespace CalamityMod.Items.Armor.Wulfrum public override void AddRecipes() { CreateRecipe(). - AddIngredient(10). + AddIngredient(20). AddIngredient(). AddTile(TileID.Anvils). Register(); @@ -281,7 +281,7 @@ namespace CalamityMod.Items.Armor.Wulfrum public override void AddRecipes() { CreateRecipe(). - AddIngredient(8). + AddIngredient(15). AddIngredient(). AddTile(TileID.Anvils). Register(); diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index f2425587c1..831dbb3b0b 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -204,8 +204,8 @@ namespace CalamityMod.Items stats[(int)VanillaWingID.LeafWings].FlyTime = 170; stats[(int)VanillaWingID.LeafWings].AccRunSpeedOverride = 9f; stats[(int)VanillaWingID.LeafWings].AccRunAccelerationMult = 2f; - // (Spectre Wings) 1 -> 1.5 acceleration multiplier - stats[(int)VanillaWingID.GhostWings].AccRunAccelerationMult = 1.5f; + // (Spectre Wings) 1 -> 2 acceleration multiplier + stats[(int)VanillaWingID.GhostWings].AccRunAccelerationMult = 2f; // 170 -> 210 flight time stats[(int)VanillaWingID.BeetleWings].FlyTime = 210; @@ -1128,6 +1128,10 @@ namespace CalamityMod.Items { modPlayer.magmaStoneVisuals = !hideVisual; // hides the fire dust when hiding the accessory } + if (item.type == ItemID.VolatileGelatin) + { + modPlayer.volatileGelatinVisuals = !hideVisual; + } // Amphibian boots are directly nerfed so they aren't the best in slot boots at all times. if (item.type == ItemID.AmphibianBoots) @@ -1188,17 +1192,20 @@ namespace CalamityMod.Items { player.GetJumpState().Available = true; } - if (player.wingsLogic <= 0 && player.velocity.Y != 0 && player.maxRunSpeed < 8) + if (player.wingsLogic <= 0 && player.velocity.Y != 0 && player.maxRunSpeed < 7) { - player.maxRunSpeed = 5f; + player.maxRunSpeed = 7f; } - player.jumpSpeedBoost += 1.6f; + player.jumpSpeedBoost += 2f; if (player.controlDown) - player.maxFallSpeed *= 1.5f; + player.maxFallSpeed *= (player.Calamity().ironBoots || player.Calamity().gSabaton) ? 1.5f : 2f; else player.maxFallSpeed *= 1.2f; } + if (item.type == ItemID.EmpressFlightBooster) + player.wingTimeMax += 150; + if (item.type == ItemID.DemonWings && !player.mount.Active) player.maxFallSpeed *= 1.2f; @@ -1268,7 +1275,6 @@ namespace CalamityMod.Items float moveSpeedBoost = modPlayer.moveSpeedBonus * 0.06f; float flightSpeedMult = 1f + - (modPlayer.soaring ? SoaringPotion.FlightBoost : 0f) + (modPlayer.reaverSpeed ? ReaverHeadMobility.SetBonusFlightBoost : 0f) + moveSpeedBoost; @@ -1294,14 +1300,14 @@ namespace CalamityMod.Items break; case ItemID.FlameWings: maxAscentMultiplier *= 1.1067f; - constantAscend *= 1.25f; + constantAscend *= 1.2f; break; case ItemID.ButterflyWings: maxAscentMultiplier *= 0.6667f; constantAscend *= 5f; break; case ItemID.GhostWings: - maxAscentMultiplier *= 0.6025f; + maxAscentMultiplier *= 0.6625f; constantAscend *= 5f; break; default: diff --git a/Items/CalamityGlobalItemLoot.cs b/Items/CalamityGlobalItemLoot.cs index 3d3ed8176e..ad89f62418 100644 --- a/Items/CalamityGlobalItemLoot.cs +++ b/Items/CalamityGlobalItemLoot.cs @@ -301,9 +301,17 @@ namespace CalamityMod.Items loot.Add(ModContent.ItemType(), 2, 2, 5); break; + // Reimplement primary loot rule to include Fledgling Wings + case ItemID.FloatingIslandFishingCrate: + RemoveLootRuleFromSkyCrates(loot); + loot.Add(ItemDropRule.OneFromOptionsNotScalingWithLuck(1, ItemID.ShinyRedBalloon, ItemID.LuckyHorseshoe, ItemID.Starfury, ItemID.CelestialMagnet, ItemID.CreativeWings)); + break; + // 2-5 Essences of Sunlight @ 50% // This is our equivalent to Souls of Light/Night case ItemID.FloatingIslandFishingCrateHard: + RemoveLootRuleFromSkyCrates(loot); + loot.Add(ItemDropRule.OneFromOptionsNotScalingWithLuck(1, ItemID.ShinyRedBalloon, ItemID.LuckyHorseshoe, ItemID.Starfury, ItemID.CelestialMagnet, ItemID.CreativeWings)); RemoveHardmodeOresFromBiomeCrates(loot); loot.AddHardmodeOresToCrates(HardmodeCrateType.Biome); loot.Add(ModContent.ItemType(), 2, 2, 5); @@ -584,6 +592,34 @@ namespace CalamityMod.Items ItemID.BandofRegeneration, ItemID.ShoeSpikes, ModContent.ItemType()); // Climbing Claws is in Wooden/Pearlwood (vanilla) in case you're curious + + private static void RemoveLootRuleFromSkyCrates(ItemLoot loot) + { + List rules = loot.Get(false); + AlwaysAtleastOneSuccessDropRule main = null; + foreach (IItemDropRule rule in rules) + { + if (rule is AlwaysAtleastOneSuccessDropRule a) + main = a; + } + if (main is null) + return; + + // Remove the primary loot rule and the rule for Fledgling Wings + foreach (IItemDropRule rule in main.rules) + { + if (rule is OneFromOptionsNotScaledWithLuckDropRule one && one.chanceDenominator == 1) + { + one.chanceNumerator = 0; + continue; + } + if (rule is CommonDrop c && c.itemId == ItemID.CreativeWings) + { + c.chanceNumerator = 0; + continue; + } + } + } #endregion #region Goodie Bag Bat Hook diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 1ff8523654..e51b48f5aa 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -394,8 +394,9 @@ namespace CalamityMod.Items if (showTheTip) { - var str = PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["SmartCursor"].First().ToString(); - tooltips.Insert(++lastTooltipIndex, (new TooltipLine(Mod, "CalamityMod:AltExpandTooltip", CalamityUtils.GetTextValue("Misc.AltExpand").Replace("{0}", str)))); + var bind = PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["SmartCursor"]; + string str = bind.Count == 0 ? GetTextValue("Misc.HotkeyNotBound") : bind.First().ToString(); + tooltips.Insert(++lastTooltipIndex, (new TooltipLine(Mod, "CalamityMod:AltExpandTooltip", GetTextValue("Misc.AltExpand").Replace("{0}", str)))); tooltips[lastTooltipIndex].OverrideColor = new Color(170, 170, 170); } else if (foundDebuff) @@ -771,6 +772,10 @@ namespace CalamityMod.Items if (item.type == ItemID.GravityGlobe) EditTooltipByNum(1, (line) => line.Text = EditedTooltip("GravityGlobe")); + // Reworked Volatile Gelatin + if (item.type == ItemID.VolatileGelatin) + EditTooltipByNum(0, (line) => line.Text += "\n" + EditedTooltip("VolatileGelatin")); + // Flame Waker Boots now has a functional effect which inherits to Hellfire Treads. if (item.type == ItemID.FlameWakerBoots) EditTooltipByNum(0, (line) => line.Text = EditedTooltip("FlameWakerBoots")); @@ -1374,23 +1379,23 @@ namespace CalamityMod.Items /// /// Currently, the dictionary functions as follows:
/// 1-5 insanely fast
- /// 6-9 very fast
- /// 10-14 fast
- /// 15-22 average
- /// 23-29 slow
- /// 30-37 very slow
- /// 38-45 extremely slow
- /// 46+ snail + /// 6-10 very fast
+ /// 11-17 fast
+ /// 18-24 average
+ /// 25-30 slow
+ /// 31-43 very slow
+ /// 44-60 extremely slow
+ /// 61+ snail ///
private static readonly Dictionary SpeedTooltips = new Dictionary() { { 5, Language.GetText("LegacyTooltip.6") }, - { 9, Language.GetText("LegacyTooltip.7") }, - { 14, Language.GetText("LegacyTooltip.8") }, - { 22, Language.GetText("LegacyTooltip.9") }, - { 29, Language.GetText("LegacyTooltip.10") }, - { 37, Language.GetText("LegacyTooltip.11") }, - { 45, Language.GetText("LegacyTooltip.12") }, + { 10, Language.GetText("LegacyTooltip.7") }, + { 17, Language.GetText("LegacyTooltip.8") }, + { 24, Language.GetText("LegacyTooltip.9") }, + { 30, Language.GetText("LegacyTooltip.10") }, + { 43, Language.GetText("LegacyTooltip.11") }, + { 60, Language.GetText("LegacyTooltip.12") }, // TODO: Using int.MaxValue here may be considered kind of strange - only alternatives I can think of require hardcoding. { int.MaxValue, Language.GetText("LegacyTooltip.13") } }; diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 9ed8e64673..fd9b336192 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -86,7 +86,6 @@ namespace CalamityMod.Items { ItemID.CrystalDart, Do(DamageExact(20)) }, // VANILLA: 14 DMG { ItemID.CrystalStorm, Do(DamageExact(40)) }, // VANILLA: 32 DMG { ItemID.CrystalVileShard, Do(DamageExact(35)) }, // VANILLA: 25 DMG - { ItemID.CursedArrow, Do(DamageExact(14)) }, // VANILLA: 17 DMG { ItemID.CursedDart, Do(DamageExact(25)) }, // VANILLA: 9 DMG { ItemID.Cutlass, Do(DamageExact(90), UseExact(11)) }, // VANILLA: 53 DMG, 16 UT { ItemID.DaedalusStormbow, Do(DamageExact(30)) }, // VANILLA: 38 DMG @@ -114,7 +113,7 @@ namespace CalamityMod.Items { ItemID.Flamethrower, Do(DamageExact(21), ShootSpeedDelta(+3f)) }, // VANILLA: 35 DMG, 7 VEL { ItemID.FlowerofFire, Do(DamageRatio(0.78f)) }, // VANILLA: 48 DMG. Uses ratios due to remix seed { ItemID.FlowerPow, Do(DamageExact(80)) }, // Displays as 160 damage. VANILLA: 65 DMG (displays as 130) - { ItemID.FlyingKnife, Do(DamageExact(53)) }, // VANILLA: 40 DMG + { ItemID.FlyingKnife, Do(DamageExact(45)) }, // VANILLA: 40 DMG { ItemID.Frostbrand, Do(UseMeleeSpeed, DamageExact(110)) }, // VANILLA: 49 DMG { ItemID.Gatligator, Do(UseExact(6)) }, // VANILLA: 7 UT { ItemID.GoldShortsword, Do(TrueMelee, DamageExact(17)) }, // VANILLA: 12 DMG @@ -128,14 +127,11 @@ namespace CalamityMod.Items { ItemID.Handgun, Do(UseExact(20)) }, // VANILLA: 15 UT { ItemID.HighVelocityBullet, Do(DamageExact(13)) }, // VANILLA: 11 DMG { ItemID.HiveFive, Do(DamageExact(27)) }, // VANILLA: 24 DMG - { ItemID.HornetStaff, Do(DamageExact(18)) }, // VANILLA: 12 DMG { ItemID.IceBlade, Do(UseMeleeSpeed) }, { ItemID.IceBoomerang, Do(ShootSpeedExact(9), UseExact(25)) }, // VANILLA: 20 UT, 11.5 VEL { ItemID.IceRod, Do(ShootSpeedExact(20), UseExact(6)) }, // VANILLA: 9 UT, 12 VEL { ItemID.IceSickle, Do(UseMeleeSpeed, DamageExact(75), ShootSpeedExact(20f)) }, // VANILLA: 50 DMG, 12 VEL - { ItemID.IchorArrow, Do(DamageExact(13)) }, // VANILLA: 16 DMG { ItemID.IchorBullet, Do(DamageExact(11)) }, // VANILLA: 13 DMG - { ItemID.ImpStaff, Do(DamageExact(25)) }, // VANILLA: 17 DMG { ItemID.InfernoFork, Do(DamageExact(83), ShootSpeedExact(11)) }, // VANILLA: 70 DMG, 8 VEL { ItemID.InfluxWaver, Do(UseMeleeSpeed, DamageExact(80), UseExact(25)) }, // VANILLA: 100 DMG, 20 UT { ItemID.IronShortsword, Do(TrueMelee, DamageExact(10)) }, // VANILLA: 8 DMG @@ -212,7 +208,7 @@ namespace CalamityMod.Items { ItemID.ShadowbeamStaff, Do(DamageExact(100)) }, // VANILLA: 80 DMG { ItemID.ShadowFlameBow, Do(DamageExact(55)) }, // VANILLA: 47 DMG { ItemID.ShadowFlameHexDoll, Do(DamageExact(40), ShootSpeedExact(30)) }, // VANILLA: 32 DMG, 9 VEL - { ItemID.ShadowFlameKnife, Do(DamageExact(50)) }, // VANILLA: 38 DMG + { ItemID.ShadowFlameKnife, Do(DamageExact(43)) }, // VANILLA: 38 DMG { ItemID.SharpTears, Do(DamageExact(49)) }, // Blood Thorn. VANILLA: 34 DMG { ItemID.Shotgun, Do(DamageExact(36)) }, // VANILLA: 24 DMG { ItemID.SilverBullet, Do(DamageExact(8)) }, // VANILLA: 9 DMG @@ -220,7 +216,6 @@ namespace CalamityMod.Items { ItemID.SkyFracture, Do(DamageExact(46)) }, // VANILLA: 38 DMG { ItemID.SlapHand, Do(UseTurn, DamageExact(120)) }, // VANILLA: 55 DMG { ItemID.Smolstar, Do(DamageExact(9)) }, // Blade Staff. VANILLA: 6 DMG - { ItemID.SniperRifle, Do(DamageExact(200), UseExact(40)) }, // VANILLA: 185 DMG, 36 UT { ItemID.SoulDrain, Do(DamageExact(38)) }, // Life Drain. VANILLA: 35 DMG { ItemID.SpaceGun, Do(DamageExact(23)) }, // VANILLA: 17 DMG { ItemID.Spear, Do(TrueMelee, DamageExact(14)) }, // VANILLA: 8 DMG @@ -236,7 +231,7 @@ namespace CalamityMod.Items { ItemID.TacticalShotgun, Do(DamageExact(34)) }, // VANILLA: 29 DMG { ItemID.TaxCollectorsStickOfDoom, Do(UseTurn, DamageExact(80), UseExact(10)) }, // Classy Cane. VANILLA: 16 DMG, 15 UT { ItemID.TendonBow, Do(DamageExact(17)) }, // VANILLA: 19 DMG - { ItemID.TerraBlade, Do(DamageExact(95)) }, // VANILLA: 85 DMG + { ItemID.TerraBlade, Do(DamageExact(90)) }, // VANILLA: 85 DMG { ItemID.Terragrim, Do(TrueMeleeNoSpeed, DamageExact(13)) }, // VANILLA: 17 DMG { ItemID.Terrarian, Do(DamageExact(90)) }, // VANILLA: 190 DMG. Required due to fixing iframes so yoyo and shots can hit simultaneously { ItemID.TheEyeOfCthulhu, Do(DamageExact(80)) }, // VANILLA: 115 DMG @@ -252,12 +247,11 @@ namespace CalamityMod.Items { ItemID.ToxicFlask, Do(DamageExact(62), UseExact(33)) }, // VANILLA: 52 DMG, 45 UT { ItemID.Toxikarp, Do(UseExact(9)) }, // VANILLA: 10 UT { ItemID.Trident, Do(TrueMelee, DamageExact(20)) }, // VANILLA: 14 DMG - { ItemID.TrueExcalibur, Do(TrueMelee, DamageExact(112)) }, // VANILLA: 72 DMG - { ItemID.TrueNightsEdge, Do(DamageExact(105)) }, // VANILLA: 70 DMG + { ItemID.TrueExcalibur, Do(TrueMelee, DamageExact(105)) }, // VANILLA: 72 DMG + { ItemID.TrueNightsEdge, Do(DamageExact(99)) }, // VANILLA: 70 DMG { ItemID.Tsunami, Do(DamageExact(45)) }, // VANILLA: 53 DMG { ItemID.TungstenBullet, Do(DamageExact(8)) }, // VANILLA: 9 DMG { ItemID.TungstenShortsword, Do(TrueMelee, DamageExact(15)) }, // VANILLA: 10 DMG - { ItemID.UnholyArrow, Do(DamageExact(11)) }, // VANILLA: 12 DMG { ItemID.UnholyTrident, Do(DamageRatio(0.91f)) }, // VANILLA: 88 DMG. Uses ratios due to remix seed { ItemID.Uzi, Do(UseExact(8)) }, // VANILLA: 9 UT { ItemID.ValkyrieYoyo, Do(DamageExact(48)) }, // VANILLA: 70 DMG. Has the same stats as Red's Throw @@ -289,6 +283,7 @@ namespace CalamityMod.Items { ItemID.AdamantiteDrill, Do(TrueMeleeNoSpeed, DamageExact(33), TileBoostExact(+0)) }, // VANILLA: 20 DMG, -1 TILE { ItemID.AdamantitePickaxe, Do(TileBoostExact(+1)) }, // VANILLA: 0 TILE { ItemID.AdamantiteWaraxe, Do(UseTimeExact(10), AxePower(160), TileBoostExact(+1)) }, // VANILLA: 8 SPD, 100 AXE, 0 TILE + { ItemID.AshWoodHammer, Do(UseTimeExact(7), HammerPower(25)) }, // VANILLA: 20 SPD, 45 HAM { ItemID.BloodLustCluster, Do(UseTimeExact(13), AxePower(100)) }, // VANILLA: 15 SPD, 75 AXE { ItemID.BonePickaxe, Do(UseTimeExact(6)) }, // VANILLA: 11 SPD { ItemID.BorealWoodHammer, Do(UseTimeExact(11), HammerPower(25)) }, // VANILLA: 23 SPD, 35 HAM @@ -399,6 +394,7 @@ namespace CalamityMod.Items #endregion #region CATEGORY 5: UseTurn + { ItemID.AshWoodSword, Do(UseTurn) }, { ItemID.BeeKeeper, Do(UseTurn) }, { ItemID.BladeofGrass, Do(UseTurn) }, { ItemID.BloodButcherer, Do(UseTurn) }, diff --git a/Items/Critters/BabyFlakCrabItem.cs b/Items/Critters/BabyFlakCrabItem.cs index 61d480672a..bc3fd2082a 100644 --- a/Items/Critters/BabyFlakCrabItem.cs +++ b/Items/Critters/BabyFlakCrabItem.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Items.Critters public override void SetDefaults() { Item.DefaultToCapturedCritter(ModContent.NPCType()); - Item.value = Item.sellPrice(silver: 10); - Item.rare = ItemRarityID.LightPurple; + Item.value = Item.sellPrice(silver: 5); + Item.rare = ItemRarityID.White; } } } diff --git a/Items/DraedonMisc/VoltageRegulationSystem.cs b/Items/DraedonMisc/VoltageRegulationSystem.cs index 08079cd86a..73c483832c 100644 --- a/Items/DraedonMisc/VoltageRegulationSystem.cs +++ b/Items/DraedonMisc/VoltageRegulationSystem.cs @@ -59,8 +59,8 @@ namespace CalamityMod.Items.DraedonMisc CreateRecipe(). AddIngredient(10). AddIngredient(10). - AddIngredient(5). - AddIngredient(ItemID.LunarBar, 5). + AddIngredient(10). + AddIngredient(ItemID.LunarBar, 10). AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(4, out Func condition), condition). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Fishing/FishingRods/EarlyBloomRod.cs b/Items/Fishing/FishingRods/EarlyBloomRod.cs index 417a8f5c16..7b1a7cac84 100644 --- a/Items/Fishing/FishingRods/EarlyBloomRod.cs +++ b/Items/Fishing/FishingRods/EarlyBloomRod.cs @@ -46,8 +46,7 @@ namespace CalamityMod.Items.Fishing.FishingRods public override void AddRecipes() { CreateRecipe(). - AddIngredient(ItemID.WoodFishingPole). - AddIngredient(6). + AddIngredient(8). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Fishing/FishingRods/FeralDoubleRod.cs b/Items/Fishing/FishingRods/FeralDoubleRod.cs index 46f766c8fb..c5f19e68c3 100644 --- a/Items/Fishing/FishingRods/FeralDoubleRod.cs +++ b/Items/Fishing/FishingRods/FeralDoubleRod.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Fishing.FishingRods public override void AddRecipes() { CreateRecipe(). - AddIngredient(6). + AddIngredient(8). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Fishing/FishingRods/HeronRod.cs b/Items/Fishing/FishingRods/HeronRod.cs index d869d50d5b..1010d34331 100644 --- a/Items/Fishing/FishingRods/HeronRod.cs +++ b/Items/Fishing/FishingRods/HeronRod.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Fishing.FishingRods public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(8). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Fishing/FishingRods/RiftReeler.cs b/Items/Fishing/FishingRods/RiftReeler.cs index 7b74df80bf..2d7a844748 100644 --- a/Items/Fishing/FishingRods/RiftReeler.cs +++ b/Items/Fishing/FishingRods/RiftReeler.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Fishing.FishingRods { CreateRecipe(). AddIngredient(ItemID.HotlineFishingHook). - AddIngredient(6). + AddIngredient(8). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Fishing/FishingRods/TheDevourerofCods.cs b/Items/Fishing/FishingRods/TheDevourerofCods.cs index 4d2de64f1f..684d355ddf 100644 --- a/Items/Fishing/FishingRods/TheDevourerofCods.cs +++ b/Items/Fishing/FishingRods/TheDevourerofCods.cs @@ -89,7 +89,7 @@ namespace CalamityMod.Items.Fishing.FishingRods public override void AddRecipes() { CreateRecipe(). - AddIngredient(6). + AddIngredient(8). AddTile(). Register(); } diff --git a/Items/Fishing/FishingRods/VerstaltiteFishingRod.cs b/Items/Fishing/FishingRods/VerstaltiteFishingRod.cs index d789304590..a122f03b56 100644 --- a/Items/Fishing/FishingRods/VerstaltiteFishingRod.cs +++ b/Items/Fishing/FishingRods/VerstaltiteFishingRod.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Fishing.FishingRods public override void AddRecipes() { CreateRecipe(). - AddIngredient(6). + AddIngredient(8). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Fishing/FishingRods/WulfrumRod.cs b/Items/Fishing/FishingRods/WulfrumRod.cs index fe6708af6e..68e14d39f5 100644 --- a/Items/Fishing/FishingRods/WulfrumRod.cs +++ b/Items/Fishing/FishingRods/WulfrumRod.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Fishing.FishingRods public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(8). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Materials/AerialiteBar.cs b/Items/Materials/AerialiteBar.cs index cb0828ae7b..9b77cf0757 100644 --- a/Items/Materials/AerialiteBar.cs +++ b/Items/Materials/AerialiteBar.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { CreateRecipe(). - AddIngredient(4). + AddIngredient(3). AddTile(TileID.Furnaces). Register(); } diff --git a/Items/Materials/AstralBar.cs b/Items/Materials/AstralBar.cs index c216053063..9144f56b26 100644 --- a/Items/Materials/AstralBar.cs +++ b/Items/Materials/AstralBar.cs @@ -29,8 +29,8 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { CreateRecipe(). - AddIngredient(3). AddIngredient(2). + AddIngredient(3). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Materials/Bloodstone.cs b/Items/Materials/Bloodstone.cs index 2f1ab7ea6b..271968d400 100644 --- a/Items/Materials/Bloodstone.cs +++ b/Items/Materials/Bloodstone.cs @@ -5,6 +5,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Materials { + [LegacyName("BloodstoneCore")] public class Bloodstone : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Materials"; diff --git a/Items/Materials/BloodstoneCore.cs b/Items/Materials/BloodstoneCore.cs deleted file mode 100644 index 2e5607f957..0000000000 --- a/Items/Materials/BloodstoneCore.cs +++ /dev/null @@ -1,36 +0,0 @@ -using CalamityMod.Rarities; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.Materials -{ - public class BloodstoneCore : ModItem, ILocalizedModType - { - public new string LocalizationCategory => "Items.Materials"; - public override void SetStaticDefaults() - { - Item.ResearchUnlockCount = 25; - ItemID.Sets.SortingPriorityMaterials[Type] = 113; - } - - public override void SetDefaults() - { - Item.width = 15; - Item.height = 12; - Item.maxStack = Item.CommonMaxStack; - Item.value = Item.sellPrice(gold: 2); - Item.rare = ModContent.RarityType(); - } - - public override void AddRecipes() - { - CreateRecipe(2). - AddIngredient(5). - AddIngredient(). - AddIngredient(). - AddTile(TileID.MythrilAnvil). - Register(); - } - } -} diff --git a/Items/Materials/BloodstoneCore.png b/Items/Materials/BloodstoneCore.png deleted file mode 100644 index 4784da5dc1..0000000000 Binary files a/Items/Materials/BloodstoneCore.png and /dev/null differ diff --git a/Items/Materials/CoreofCalamity.cs b/Items/Materials/CoreofCalamity.cs index b2b4a1572f..d889896cb2 100644 --- a/Items/Materials/CoreofCalamity.cs +++ b/Items/Materials/CoreofCalamity.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Materials AddIngredient(). AddIngredient(). AddIngredient(). - AddIngredient(ItemID.Ectoplasm, 3). + AddIngredient(ItemID.Ectoplasm). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Materials/UnholyCore.cs b/Items/Materials/UnholyCore.cs index 101ac3199a..2bc0d699c1 100644 --- a/Items/Materials/UnholyCore.cs +++ b/Items/Materials/UnholyCore.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { CreateRecipe(). - AddIngredient(4). - AddIngredient(ItemID.Hellstone, 4). + AddIngredient(3). + AddIngredient(ItemID.Hellstone, 2). AddTile(TileID.Hellforge). Register(); } diff --git a/Items/Mounts/Brimrose.cs b/Items/Mounts/Brimrose.cs index 0368904f0e..441aa69276 100644 --- a/Items/Mounts/Brimrose.cs +++ b/Items/Mounts/Brimrose.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Mounts public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(10). AddIngredient(20). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Pets/GeyserShell.cs b/Items/Pets/GeyserShell.cs index 10d9d9b507..e5ecc5a9d3 100644 --- a/Items/Pets/GeyserShell.cs +++ b/Items/Pets/GeyserShell.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Pets { Item.DefaultToVanitypet(ModContent.ProjectileType(), ModContent.BuffType()); Item.value = Item.sellPrice(gold: 2); - Item.rare = ItemRarityID.Pink; + Item.rare = ItemRarityID.Orange; } public override void UseStyle(Player player, Rectangle heldItemFrame) diff --git a/Items/Placeables/Furniture/AstralBeaconItem.cs b/Items/Placeables/Furniture/AstralBeaconItem.cs index 0d65f56b47..860514818c 100644 --- a/Items/Placeables/Furniture/AstralBeaconItem.cs +++ b/Items/Placeables/Furniture/AstralBeaconItem.cs @@ -20,9 +20,9 @@ namespace CalamityMod.Items.Placeables.Furniture public override void AddRecipes() { CreateRecipe(). + AddIngredient(30). AddIngredient(5). AddIngredient(20). - AddIngredient(30). AddTile(TileID.HeavyWorkBench). Register(); } diff --git a/Items/Placeables/Furniture/CraftingStations/CosmicAnvilItem.cs b/Items/Placeables/Furniture/CraftingStations/CosmicAnvilItem.cs index 5da9b8e3af..75f187544e 100644 --- a/Items/Placeables/Furniture/CraftingStations/CosmicAnvilItem.cs +++ b/Items/Placeables/Furniture/CraftingStations/CosmicAnvilItem.cs @@ -29,11 +29,6 @@ namespace CalamityMod.Items.Placeables.Furniture.CraftingStations AddRecipeGroup("HardmodeAnvil"). AddIngredient(10). AddIngredient(ItemID.LunarBar, 10). - AddIngredient(ItemID.FragmentSolar, 12). - AddIngredient(ItemID.FragmentVortex, 12). - AddIngredient(ItemID.FragmentNebula, 12). - AddIngredient(ItemID.FragmentStardust, 12). - AddIngredient(12). AddIngredient(20). AddTile(TileID.LunarCraftingStation). Register(); diff --git a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs index c846aef56f..ee81185b28 100644 --- a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs @@ -62,11 +62,13 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings "Altixal", "apotofkoolaid", "ArchonSystem", + "Astrum Deus", "Atalya", "Ben-TK", "Big E", "carnymassacre", "CDMusic", + "Cei", "CongratsIsTrash", "Cooper", "CosmaticMango", @@ -90,7 +92,6 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings "sixtydegrees", "StipulateVenus", "Sunny", - "_tofu", "Tomat", "Triangle", "TYESKI", @@ -114,7 +115,6 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings "Blockaroz", "Boffin", "Bravioli", - "Cei", "Chetto", "Chill Dude", "ClockworkShade", diff --git a/Items/Placeables/Furniture/PiggyCageGold.png b/Items/Placeables/Furniture/PiggyCageGold.png index 481b99da72..1c76eec452 100644 Binary files a/Items/Placeables/Furniture/PiggyCageGold.png and b/Items/Placeables/Furniture/PiggyCageGold.png differ diff --git a/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumTrim.cs b/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumTrim.cs index e763e16d37..b1b10e69d4 100644 --- a/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumTrim.cs +++ b/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumTrim.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Walls; using Terraria.ID; using Terraria.ModLoader; @@ -21,6 +22,11 @@ namespace CalamityMod.Items.Placeables.FurnitureWulfrum AddIngredient(). AddTile(TileID.HeavyWorkBench). Register(); + CreateRecipe(). + AddIngredient(4). + AddTile(TileID.WorkBenches). + DisableDecraft(). + Register(); } } } diff --git a/Items/Placeables/FurnitureWulfrum/WulfrumPlating.cs b/Items/Placeables/FurnitureWulfrum/WulfrumPlating.cs index a77f27331c..6c032ef1db 100644 --- a/Items/Placeables/FurnitureWulfrum/WulfrumPlating.cs +++ b/Items/Placeables/FurnitureWulfrum/WulfrumPlating.cs @@ -27,6 +27,11 @@ namespace CalamityMod.Items.Placeables.FurnitureWulfrum AddTile(TileID.WorkBenches). DisableDecraft(). Register(); + CreateRecipe(). + AddIngredient(4). + AddTile(TileID.WorkBenches). + DisableDecraft(). + Register(); } } } diff --git a/Items/Placeables/Walls/AnodizedWulfrumTrimWall.cs b/Items/Placeables/Walls/AnodizedWulfrumTrimWall.cs index aef59907c9..d60c4b01fd 100644 --- a/Items/Placeables/Walls/AnodizedWulfrumTrimWall.cs +++ b/Items/Placeables/Walls/AnodizedWulfrumTrimWall.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.FurnitureWulfrum; using Terraria.ID; using Terraria.ModLoader; using WallTiles = CalamityMod.Walls; @@ -17,8 +17,8 @@ namespace CalamityMod.Items.Placeables.Walls public override void AddRecipes() { - CreateRecipe(8). - AddIngredient(). + CreateRecipe(4). + AddIngredient(). AddTile(TileID.WorkBenches). Register(); } diff --git a/Items/Placeables/Walls/RoundedAnodizedWulfrumPanelWall.cs b/Items/Placeables/Walls/RoundedAnodizedWulfrumPanelWall.cs index 566caf0e2f..18766b942d 100644 --- a/Items/Placeables/Walls/RoundedAnodizedWulfrumPanelWall.cs +++ b/Items/Placeables/Walls/RoundedAnodizedWulfrumPanelWall.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Placeables.Walls public override void AddRecipes() { - CreateRecipe(8). + CreateRecipe(4). AddIngredient(). AddTile(TileID.WorkBenches). Register(); diff --git a/Items/Placeables/Walls/WulfrumComplexPanelWall.cs b/Items/Placeables/Walls/WulfrumComplexPanelWall.cs index 17c7c70994..8e8c35a078 100644 --- a/Items/Placeables/Walls/WulfrumComplexPanelWall.cs +++ b/Items/Placeables/Walls/WulfrumComplexPanelWall.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.FurnitureWulfrum; using Terraria.ID; using Terraria.ModLoader; using WallTiles = CalamityMod.Walls; @@ -17,10 +17,8 @@ namespace CalamityMod.Items.Placeables.Walls public override void AddRecipes() { - CreateRecipe(8). - AddIngredient(). - AddIngredient(). - AddIngredient(). + CreateRecipe(4). + AddIngredient(). AddTile(TileID.WorkBenches). Register(); } diff --git a/Items/Placeables/Walls/WulfrumPillar.cs b/Items/Placeables/Walls/WulfrumPillar.cs index 224ebd54e7..4d4022dabb 100644 --- a/Items/Placeables/Walls/WulfrumPillar.cs +++ b/Items/Placeables/Walls/WulfrumPillar.cs @@ -17,8 +17,7 @@ namespace CalamityMod.Items.Placeables.Walls public override void AddRecipes() { - CreateRecipe(8). - AddIngredient(). + CreateRecipe(4). AddIngredient(). AddTile(TileID.WorkBenches). Register(); diff --git a/Items/Potions/AstralInjection.cs b/Items/Potions/AstralInjection.cs index 4cbbc4eaf7..c5f4553b86 100644 --- a/Items/Potions/AstralInjection.cs +++ b/Items/Potions/AstralInjection.cs @@ -38,8 +38,8 @@ namespace CalamityMod.Items.Potions { CreateRecipe(15). AddIngredient(ItemID.SuperManaPotion, 15). - AddIngredient(4). AddIngredient(). + AddIngredient(4). AddTile(TileID.Bottles). Register() .DisableDecraft(); diff --git a/Items/Potions/SoaringPotion.cs b/Items/Potions/SoaringPotion.cs index 0404bafdb8..1934f9a9fb 100644 --- a/Items/Potions/SoaringPotion.cs +++ b/Items/Potions/SoaringPotion.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Items.Potions { public new string LocalizationCategory => "Items.Potions"; - public static float FlightBoost = 0.1f; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(FlightBoost.ToPercent()); + public static float FlightTimeBoost = 0.1f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(FlightTimeBoost.ToPercent()); public override void SetStaticDefaults() { diff --git a/Items/SummonItems/AstralChunk.cs b/Items/SummonItems/AstralChunk.cs index 539b1854a8..b28431bf9e 100644 --- a/Items/SummonItems/AstralChunk.cs +++ b/Items/SummonItems/AstralChunk.cs @@ -55,9 +55,9 @@ namespace CalamityMod.Items.SummonItems public override void AddRecipes() { CreateRecipe(). - AddIngredient(30). - AddIngredient(ItemID.FallenStar, 20). AddIngredient(8). + AddIngredient(ItemID.FallenStar, 20). + AddIngredient(30). AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(2, out Func condition), condition). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/SummonItems/CharredIdol.cs b/Items/SummonItems/CharredIdol.cs index 48063cc2bc..f9b862ef9c 100644 --- a/Items/SummonItems/CharredIdol.cs +++ b/Items/SummonItems/CharredIdol.cs @@ -49,9 +49,9 @@ namespace CalamityMod.Items.SummonItems public override void AddRecipes() { CreateRecipe(). - AddIngredient(ItemID.SoulofNight, 5). + AddIngredient(5). AddIngredient(7). - AddIngredient(2). + AddIngredient(ItemID.SoulofNight, 5). AddTile(TileID.Hellforge). Register(); } diff --git a/Items/SummonItems/CosmicWorm.cs b/Items/SummonItems/CosmicWorm.cs index 341e60f662..a1c210079a 100644 --- a/Items/SummonItems/CosmicWorm.cs +++ b/Items/SummonItems/CosmicWorm.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.SummonItems Item.useTime = 10; Item.useStyle = ItemUseStyleID.HoldUp; Item.consumable = false; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/SummonItems/Starcore.cs b/Items/SummonItems/Starcore.cs index c1fb8b87ce..db47c407a1 100644 --- a/Items/SummonItems/Starcore.cs +++ b/Items/SummonItems/Starcore.cs @@ -28,9 +28,9 @@ namespace CalamityMod.Items.SummonItems public override void AddRecipes() { CreateRecipe(). - AddIngredient(25). + AddIngredient(8). AddIngredient(8). - AddIngredient(4). + AddIngredient(25). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/SummonItems/YharonEgg.cs b/Items/SummonItems/YharonEgg.cs index f5b1b48745..9e5f3d5bf6 100644 --- a/Items/SummonItems/YharonEgg.cs +++ b/Items/SummonItems/YharonEgg.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.SummonItems Item.useTime = 10; Item.useStyle = ItemUseStyleID.HoldUp; Item.consumable = false; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Tools/AbyssalWarhammer.cs b/Items/Tools/AbyssalWarhammer.cs index 678cc439c1..b09100613e 100644 --- a/Items/Tools/AbyssalWarhammer.cs +++ b/Items/Tools/AbyssalWarhammer.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { CreateRecipe(). - AddIngredient(8). + AddIngredient(12). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Tools/AcidwoodHammer.cs b/Items/Tools/AcidwoodHammer.cs index e658cafe7d..86857307bf 100644 --- a/Items/Tools/AcidwoodHammer.cs +++ b/Items/Tools/AcidwoodHammer.cs @@ -10,21 +10,11 @@ namespace CalamityMod.Items.Tools public new string LocalizationCategory => "Items.Tools"; public override void SetDefaults() { - Item.damage = 10; - Item.knockBack = 3.5f; - Item.useTime = 9; - Item.useAnimation = 20; - Item.hammer = 25; - - Item.DamageType = DamageClass.Melee; + Item.CloneDefaults(ItemID.ShadewoodHammer); // Ash Wood > Acidwood > Shadewood Item.width = 40; Item.height = 40; - Item.useTurn = true; - Item.useStyle = ItemUseStyleID.Swing; - Item.value = Item.sellPrice(copper: 10); - Item.rare = ItemRarityID.White; - Item.UseSound = SoundID.Item1; - Item.autoReuse = true; + Item.damage = 8; + Item.useTime = 8; // Due to vanilla tool tweaks; otherwise apply 40% hammer power } public override void AddRecipes() { diff --git a/Items/Tools/AerialHamaxe.cs b/Items/Tools/AerialHamaxe.cs index c3ae9180cc..4d935cd5c6 100644 --- a/Items/Tools/AerialHamaxe.cs +++ b/Items/Tools/AerialHamaxe.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Tools/AstralHamaxe.cs b/Items/Tools/AstralHamaxe.cs index 67e8841a37..b6b8a3f1b1 100644 --- a/Items/Tools/AstralHamaxe.cs +++ b/Items/Tools/AstralHamaxe.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { CreateRecipe(). - AddIngredient(8). + AddIngredient(18). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Tools/AstralPickaxe.cs b/Items/Tools/AstralPickaxe.cs index 057b95af8e..6f0c168811 100644 --- a/Items/Tools/AstralPickaxe.cs +++ b/Items/Tools/AstralPickaxe.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(18). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Tools/BeastialPickaxe.cs b/Items/Tools/BeastialPickaxe.cs index 79ca39fa45..b62feef26f 100644 --- a/Items/Tools/BeastialPickaxe.cs +++ b/Items/Tools/BeastialPickaxe.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(15). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Tools/BerserkerWaraxe.cs b/Items/Tools/BerserkerWaraxe.cs index fc796fc844..e7bb1a9bc5 100644 --- a/Items/Tools/BerserkerWaraxe.cs +++ b/Items/Tools/BerserkerWaraxe.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { CreateRecipe(). - AddIngredient(9). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Tools/BlossomPickaxe.cs b/Items/Tools/BlossomPickaxe.cs index 6735a14072..03cf2acb1f 100644 --- a/Items/Tools/BlossomPickaxe.cs +++ b/Items/Tools/BlossomPickaxe.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(18). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Tools/BrimstoneLocus.cs b/Items/Tools/BrimstoneLocus.cs index 19e3fab570..10370ad4a2 100644 --- a/Items/Tools/BrimstoneLocus.cs +++ b/Items/Tools/BrimstoneLocus.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Tools { CreateRecipe(). AddIngredient(). - AddIngredient(3). + AddIngredient(10). Register(); } } diff --git a/Items/Tools/ClimateChange/AridArtifact.cs b/Items/Tools/ClimateChange/AridArtifact.cs index 2e685defcd..c8ab0cfa54 100644 --- a/Items/Tools/ClimateChange/AridArtifact.cs +++ b/Items/Tools/ClimateChange/AridArtifact.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Tools.ClimateChange CreateRecipe(). AddRecipeGroup("Sand", 50). AddRecipeGroup("AnyAdamantiteBar", 10). - AddIngredient(ItemID.AncientCloth, 5). + AddIngredient(ItemID.AncientCloth, 3). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Tools/ClimateChange/Cosmolight.cs b/Items/Tools/ClimateChange/Cosmolight.cs index 1eced6ca1b..c894283834 100644 --- a/Items/Tools/ClimateChange/Cosmolight.cs +++ b/Items/Tools/ClimateChange/Cosmolight.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Tools.ClimateChange CreateRecipe(). AddIngredient(). AddIngredient(ItemID.Sundial). - AddIngredient(3). + AddIngredient(12). AddIngredient(ItemID.FragmentSolar, 15). AddTile(TileID.DemonAltar). Register(); @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Tools.ClimateChange CreateRecipe(). AddIngredient(). AddIngredient(ItemID.Moondial). - AddIngredient(3). + AddIngredient(12). AddIngredient(ItemID.FragmentSolar, 15). AddTile(TileID.DemonAltar). Register(); diff --git a/Items/Tools/DriftwoodHammer.cs b/Items/Tools/DriftwoodHammer.cs index 068c0cb4c4..d5a85df5c4 100644 --- a/Items/Tools/DriftwoodHammer.cs +++ b/Items/Tools/DriftwoodHammer.cs @@ -10,26 +10,15 @@ namespace CalamityMod.Items.Tools { public new string LocalizationCategory => "Items.Tools"; - public static int NormalUseTime = 11; - public static int FasterUseTime = 8; + public static int NormalUseTime = 9; // Equals Shadewood + public static int FasterUseTime = 7; public override void SetDefaults() { - Item.damage = 13; - Item.knockBack = 4f; - Item.useTime = NormalUseTime; - Item.useAnimation = 31; - Item.hammer = 25; - - Item.DamageType = DamageClass.Melee; + Item.CloneDefaults(ItemID.ShadewoodHammer); // Driftwood (base) = Shadewood Item.width = 40; Item.height = 42; - Item.useTurn = true; - Item.useStyle = ItemUseStyleID.Swing; - Item.value = Item.sellPrice(copper: 10); - Item.rare = ItemRarityID.White; - Item.UseSound = SoundID.Item1; - Item.autoReuse = true; + Item.useTime = NormalUseTime; } // The tool is mechanically faster when wet. diff --git a/Items/Tools/Gelpick.cs b/Items/Tools/Gelpick.cs index 8b55543de4..8b7dcf1334 100644 --- a/Items/Tools/Gelpick.cs +++ b/Items/Tools/Gelpick.cs @@ -32,8 +32,8 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). - AddIngredient(12). + AddIngredient(18). + AddIngredient(18). AddTile(TileID.Solidifier). Register(); } diff --git a/Items/Tools/Grax.cs b/Items/Tools/Grax.cs index c586a680e5..b692e7290b 100644 --- a/Items/Tools/Grax.cs +++ b/Items/Tools/Grax.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Items.Tools CreateRecipe(). AddIngredient(). AddRecipeGroup("LunarHamaxe"). - AddIngredient(5). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Tools/MonolithHammer.cs b/Items/Tools/MonolithHammer.cs index 1f8cca426d..b5e9e68bda 100644 --- a/Items/Tools/MonolithHammer.cs +++ b/Items/Tools/MonolithHammer.cs @@ -12,23 +12,14 @@ namespace CalamityMod.Items.Tools public new string LocalizationCategory => "Items.Tools"; public override void SetDefaults() { - Item.damage = 29; - Item.knockBack = 2.5f; - Item.useTime = 5; - Item.useAnimation = 9; - Item.hammer = 35; - Item.tileBoost = 1; - - Item.DamageType = DamageClass.Melee; + Item.CloneDefaults(ItemID.PearlwoodHammer); // Monolith >= Pearlwood Item.width = 46; Item.height = 44; - Item.useTurn = true; - Item.useStyle = ItemUseStyleID.Swing; - Item.value = Item.sellPrice(silver: 75); - Item.rare = ItemRarityID.Orange; - Item.UseSound = SoundID.Item1; - Item.autoReuse = true; + Item.damage = 30; + Item.useAnimation = 14; + Item.tileBoost = 1; } + public override void MeleeEffects(Player player, Rectangle hitbox) { if (Main.rand.NextBool(3)) diff --git a/Items/Tools/SeismicHampick.cs b/Items/Tools/SeismicHampick.cs index 2c2afae96a..9b3181d210 100644 --- a/Items/Tools/SeismicHampick.cs +++ b/Items/Tools/SeismicHampick.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(15). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Tools/ShardlightPickaxe.cs b/Items/Tools/ShardlightPickaxe.cs index 07cf62c106..e20c0c045a 100644 --- a/Items/Tools/ShardlightPickaxe.cs +++ b/Items/Tools/ShardlightPickaxe.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(18). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Tools/SkyfringePickaxe.cs b/Items/Tools/SkyfringePickaxe.cs index 6075a10ee8..e41e1309c4 100644 --- a/Items/Tools/SkyfringePickaxe.cs +++ b/Items/Tools/SkyfringePickaxe.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(15). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Tools/TectonicTruncator.cs b/Items/Tools/TectonicTruncator.cs index bd96781b42..ffeedf415b 100644 --- a/Items/Tools/TectonicTruncator.cs +++ b/Items/Tools/TectonicTruncator.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { CreateRecipe(). - AddIngredient(9). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Tools/WulfrumDiggingTurtle.cs b/Items/Tools/WulfrumDiggingTurtle.cs index 828c7d88a9..289d8c5b98 100644 --- a/Items/Tools/WulfrumDiggingTurtle.cs +++ b/Items/Tools/WulfrumDiggingTurtle.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { CreateRecipe(15). - AddIngredient(3). + AddIngredient(10). AddIngredient(). Register(); } diff --git a/Items/Tools/WulfrumDrill.cs b/Items/Tools/WulfrumDrill.cs index 62114d39e4..9e9fa45008 100644 --- a/Items/Tools/WulfrumDrill.cs +++ b/Items/Tools/WulfrumDrill.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(15). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Tools/WulfrumScaffoldKit.cs b/Items/Tools/WulfrumScaffoldKit.cs index c32bd9c1df..14d0e58bdd 100644 --- a/Items/Tools/WulfrumScaffoldKit.cs +++ b/Items/Tools/WulfrumScaffoldKit.cs @@ -109,7 +109,7 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { CreateRecipe(). - AddIngredient(6). + AddIngredient(10). AddIngredient(). AddTile(TileID.Anvils). Register(); diff --git a/Items/Tools/WulfrumTreasurePinger.cs b/Items/Tools/WulfrumTreasurePinger.cs index b5d2490121..37e8c3d8fa 100644 --- a/Items/Tools/WulfrumTreasurePinger.cs +++ b/Items/Tools/WulfrumTreasurePinger.cs @@ -282,7 +282,7 @@ namespace CalamityMod.Items.Tools { //Intentionally craftable anywhere. CreateRecipe(). - AddIngredient(5). + AddIngredient(10). Register() .DisableDecraft(); } diff --git a/Items/TreasureBags/ProvidenceBag.cs b/Items/TreasureBags/ProvidenceBag.cs index 965665155d..90580b17e1 100644 --- a/Items/TreasureBags/ProvidenceBag.cs +++ b/Items/TreasureBags/ProvidenceBag.cs @@ -75,7 +75,7 @@ namespace CalamityMod.Items.TreasureBags itemLoot.Add(ModContent.ItemType(), 10); // Equipment - itemLoot.Add(ModContent.ItemType()); + itemLoot.Add(ModContent.ItemType()); itemLoot.AddRevBagAccessories(); // Vanity diff --git a/Items/VanillaArmorChanges/GladiatorArmorSetChange.cs b/Items/VanillaArmorChanges/GladiatorArmorSetChange.cs index 93c2886fbf..4dc579c4ad 100644 --- a/Items/VanillaArmorChanges/GladiatorArmorSetChange.cs +++ b/Items/VanillaArmorChanges/GladiatorArmorSetChange.cs @@ -14,13 +14,14 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Gladiator"; - public const int HelmetRogueDamageBoostPercent = 3; + public const int HelmetRogueDamageBoostPercent = 8; public const int ChestplateRogueCritBoostPercent = 3; - public const int LeggingRogueVelocityBoostPercent = 3; + public const int LeggingRogueVelocityBoostPercent = 10; + public const float SetBonusRogueStealth = 0.6f; public override void UpdateSetBonusText(ref string setBonusText) { - setBonusText += $"\n{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}"; + setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(SetBonusRogueStealth.ToStealth())}"; } public override void ApplyHeadPieceEffect(Player player) @@ -40,10 +41,8 @@ namespace CalamityMod.Items.VanillaArmorChanges public override void ApplyArmorSetBonus(Player player) { - player.Calamity().rogueStealthMax += 0.6f; + player.Calamity().rogueStealthMax += SetBonusRogueStealth; player.Calamity().wearingRogueArmor = true; - player.GetDamage() += 0.05f; - player.Calamity().rogueVelocity += 0.1f; } } } diff --git a/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs b/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs index 3e47eb756f..bd5de5f274 100644 --- a/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs +++ b/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs @@ -26,6 +26,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public static int ArmorPenetration = 15; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ArmorPenetration); + public override void SetStaticDefaults() => ItemID.Sets.StaffMinionSlotsRequired[Type] = 4f; + public override void SetDefaults() { CalamityGlobalItem modItem = Item.Calamity(); @@ -33,7 +35,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.width = 34; Item.height = 32; Item.shootSpeed = 10f; - Item.damage = 24; + Item.damage = 18; Item.ArmorPenetration = ArmorPenetration; Item.mana = 10; Item.useAnimation = Item.useTime = 36; diff --git a/Items/Weapons/DraedonsArsenal/Auger.cs b/Items/Weapons/DraedonsArsenal/Auger.cs index f7ce73b68d..33bc3e191f 100644 --- a/Items/Weapons/DraedonsArsenal/Auger.cs +++ b/Items/Weapons/DraedonsArsenal/Auger.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { Item.width = 26; Item.height = 26; - Item.damage = 60; + Item.damage = 55; Item.DamageType = TrueMeleeDamageClass.Instance; Item.useTime = Item.useAnimation = 12; Item.knockBack = 12f; diff --git a/Items/Weapons/Magic/AlphaDraconis.cs b/Items/Weapons/Magic/AlphaDraconis.cs index 9789aa3161..e889f27f6c 100644 --- a/Items/Weapons/Magic/AlphaDraconis.cs +++ b/Items/Weapons/Magic/AlphaDraconis.cs @@ -72,9 +72,9 @@ namespace CalamityMod.Items.Weapons.Magic { CreateRecipe(). AddIngredient(). - AddIngredient(6). - AddIngredient(5). - AddIngredient(10). + AddIngredient(8). + AddIngredient(4). + AddIngredient(20). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Magic/AstralStaff.cs b/Items/Weapons/Magic/AstralStaff.cs index c7cc0e9a90..9f89c9cd4b 100644 --- a/Items/Weapons/Magic/AstralStaff.cs +++ b/Items/Weapons/Magic/AstralStaff.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void AddRecipes() { CreateRecipe(). - AddIngredient(6). + AddIngredient(12). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Weapons/Magic/Biofusillade.cs b/Items/Weapons/Magic/Biofusillade.cs index e5f34f725b..90ebcbd833 100644 --- a/Items/Weapons/Magic/Biofusillade.cs +++ b/Items/Weapons/Magic/Biofusillade.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic { CreateRecipe(). AddIngredient(ItemID.SpellTome). - AddIngredient(8). + AddIngredient(12). AddTile(TileID.Bookcases). Register(); } diff --git a/Items/Weapons/Magic/BrimroseStaff.cs b/Items/Weapons/Magic/BrimroseStaff.cs index 4521a1989a..5c01032e74 100644 --- a/Items/Weapons/Magic/BrimroseStaff.cs +++ b/Items/Weapons/Magic/BrimroseStaff.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void AddRecipes() { CreateRecipe(). - AddIngredient(6). + AddIngredient(8). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Magic/BurningSea.cs b/Items/Weapons/Magic/BurningSea.cs index 30a9db9b37..4670c54a5e 100644 --- a/Items/Weapons/Magic/BurningSea.cs +++ b/Items/Weapons/Magic/BurningSea.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Weapons.Magic { CreateRecipe(). AddIngredient(ItemID.SpellTome). - AddIngredient(5). + AddIngredient(8). AddTile(TileID.Bookcases). Register(); } diff --git a/Items/Weapons/Magic/CosmicRainbow.cs b/Items/Weapons/Magic/CosmicRainbow.cs index dab7555774..11f066f058 100644 --- a/Items/Weapons/Magic/CosmicRainbow.cs +++ b/Items/Weapons/Magic/CosmicRainbow.cs @@ -29,8 +29,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.autoReuse = true; Item.noMelee = true; - Item.value = CalamityGlobalItem.RarityRedBuyPrice; - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityPurpleBuyPrice; + Item.rare = ItemRarityID.Purple; } 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/Magic/EvergladeSpray.cs b/Items/Weapons/Magic/EvergladeSpray.cs index 22b05cc0fe..c2abdd2338 100644 --- a/Items/Weapons/Magic/EvergladeSpray.cs +++ b/Items/Weapons/Magic/EvergladeSpray.cs @@ -38,12 +38,12 @@ namespace CalamityMod.Items.Weapons.Magic { CreateRecipe(). AddIngredient(ItemID.GoldenShower). - AddIngredient(3). + AddIngredient(10). AddTile(TileID.Bookcases). Register(); CreateRecipe(). AddIngredient(ItemID.CursedFlames). - AddIngredient(3). + AddIngredient(10). AddTile(TileID.Bookcases). Register(); } diff --git a/Items/Weapons/Magic/ForbiddenSun.cs b/Items/Weapons/Magic/ForbiddenSun.cs index 4a8289e334..2cd429ec99 100644 --- a/Items/Weapons/Magic/ForbiddenSun.cs +++ b/Items/Weapons/Magic/ForbiddenSun.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Magic { CreateRecipe(). AddIngredient(ItemID.SpellTome). - AddIngredient(6). + AddIngredient(10). AddTile(TileID.Bookcases). Register(); } diff --git a/Items/Weapons/Magic/GleamingMagnolia.cs b/Items/Weapons/Magic/GleamingMagnolia.cs index 56a4cd3c5b..dbf35201bb 100644 --- a/Items/Weapons/Magic/GleamingMagnolia.cs +++ b/Items/Weapons/Magic/GleamingMagnolia.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5.5f; - Item.value = CalamityGlobalItem.RarityPinkBuyPrice; - Item.rare = ItemRarityID.Pink; + Item.value = CalamityGlobalItem.RarityLightPurpleBuyPrice; + Item.rare = ItemRarityID.LightPurple; Item.UseSound = SoundID.Item109; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/Mistlestorm.cs b/Items/Weapons/Magic/Mistlestorm.cs index f9fd80822b..d39417d4c1 100644 --- a/Items/Weapons/Magic/Mistlestorm.cs +++ b/Items/Weapons/Magic/Mistlestorm.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Items.Weapons.Magic CreateRecipe(). AddIngredient(ItemID.Razorpine). AddIngredient(ItemID.LeafBlower). - AddIngredient(5). + AddIngredient(10). AddIngredient(3). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Magic/NanoPurge.cs b/Items/Weapons/Magic/NanoPurge.cs index d78bf8a75f..4aa5bef678 100644 --- a/Items/Weapons/Magic/NanoPurge.cs +++ b/Items/Weapons/Magic/NanoPurge.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Weapons.Magic { CreateRecipe(). AddIngredient(ItemID.LaserMachinegun). - AddIngredient(7). + AddIngredient(10). AddIngredient(ItemID.Nanites, 100). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Magic/Omicron.cs b/Items/Weapons/Magic/Omicron.cs index fe5f1c9c71..d061f550bb 100644 --- a/Items/Weapons/Magic/Omicron.cs +++ b/Items/Weapons/Magic/Omicron.cs @@ -69,8 +69,8 @@ namespace CalamityMod.Items.Weapons.Magic CreateRecipe(). AddIngredient(). AddIngredient(). - AddIngredient(10). - AddIngredient(ItemID.FragmentNebula, 5). + AddIngredient(8). + AddIngredient(20). AddTile(). Register(); } diff --git a/Items/Weapons/Magic/Rancor.cs b/Items/Weapons/Magic/Rancor.cs index cc4ed7049d..fc1d07b505 100644 --- a/Items/Weapons/Magic/Rancor.cs +++ b/Items/Weapons/Magic/Rancor.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 66; Item.height = 82; - Item.damage = 290; + Item.damage = 333; Item.DamageType = DamageClass.Magic; Item.noUseGraphic = true; Item.channel = true; diff --git a/Items/Weapons/Magic/RecitationoftheBeast.cs b/Items/Weapons/Magic/RecitationoftheBeast.cs index 171a1c539b..ec118563e8 100644 --- a/Items/Weapons/Magic/RecitationoftheBeast.cs +++ b/Items/Weapons/Magic/RecitationoftheBeast.cs @@ -46,8 +46,8 @@ namespace CalamityMod.Items.Weapons.Magic { CreateRecipe(). AddIngredient(ItemID.DemonScythe). - AddIngredient(6). - AddIngredient(6). + AddIngredient(20). + AddIngredient(8). AddTile(TileID.Bookcases). Register(); } diff --git a/Items/Weapons/Magic/SHPC.cs b/Items/Weapons/Magic/SHPC.cs index 3c886885ef..a0bb9212c9 100644 --- a/Items/Weapons/Magic/SHPC.cs +++ b/Items/Weapons/Magic/SHPC.cs @@ -55,8 +55,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 20f; - Item.value = CalamityGlobalItem.RarityPinkBuyPrice; - Item.rare = ItemRarityID.Pink; + Item.value = CalamityGlobalItem.RarityLightPurpleBuyPrice; + Item.rare = ItemRarityID.LightPurple; } #region Weapon-Specific Functions diff --git a/Items/Weapons/Magic/SanguineFlare.cs b/Items/Weapons/Magic/SanguineFlare.cs index f712d13968..d863d9657d 100644 --- a/Items/Weapons/Magic/SanguineFlare.cs +++ b/Items/Weapons/Magic/SanguineFlare.cs @@ -49,7 +49,8 @@ namespace CalamityMod.Items.Weapons.Magic public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(25). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Magic/ShadecrystalBarrage.cs b/Items/Weapons/Magic/ShadecrystalBarrage.cs index ffcb99ec1f..f991cae233 100644 --- a/Items/Weapons/Magic/ShadecrystalBarrage.cs +++ b/Items/Weapons/Magic/ShadecrystalBarrage.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Weapons.Magic { CreateRecipe(). AddIngredient(ItemID.CrystalStorm). - AddIngredient(6). + AddIngredient(12). AddTile(TileID.Bookcases). Register(); } diff --git a/Items/Weapons/Magic/ShiftingSands.cs b/Items/Weapons/Magic/ShiftingSands.cs index df373ff41f..01d41978b1 100644 --- a/Items/Weapons/Magic/ShiftingSands.cs +++ b/Items/Weapons/Magic/ShiftingSands.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic { CreateRecipe(). AddIngredient(ItemID.MagicMissile). - AddIngredient(ItemID.AncientCloth, 5). + AddIngredient(ItemID.AncientCloth, 2). AddIngredient(). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Magic/SkyGlaze.cs b/Items/Weapons/Magic/SkyGlaze.cs index cfe95212aa..25947b658f 100644 --- a/Items/Weapons/Magic/SkyGlaze.cs +++ b/Items/Weapons/Magic/SkyGlaze.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 52; Item.height = 74; - Item.damage = 11; + Item.damage = 10; Item.DamageType = DamageClass.Magic; Item.mana = 9; Item.useAnimation = Item.useTime = 25; diff --git a/Items/Weapons/Magic/SoulPiercer.cs b/Items/Weapons/Magic/SoulPiercer.cs index df63864e59..9d4d4adf67 100644 --- a/Items/Weapons/Magic/SoulPiercer.cs +++ b/Items/Weapons/Magic/SoulPiercer.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). + AddIngredient(10). AddTile(). Register(); } diff --git a/Items/Weapons/Magic/TacticiansTrumpCard.cs b/Items/Weapons/Magic/TacticiansTrumpCard.cs index f6e98b2b9f..9fc9780f4c 100644 --- a/Items/Weapons/Magic/TacticiansTrumpCard.cs +++ b/Items/Weapons/Magic/TacticiansTrumpCard.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Magic AddIngredient(). AddIngredient(). AddIngredient(). - AddIngredient(5). + AddIngredient(10). AddIngredient(3). AddTile(TileID.MythrilAnvil). Register(); @@ -63,7 +63,7 @@ namespace CalamityMod.Items.Weapons.Magic AddIngredient(). AddIngredient(). AddIngredient(). - AddIngredient(5). + AddIngredient(10). AddIngredient(3). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Magic/Tradewinds.cs b/Items/Weapons/Magic/Tradewinds.cs index c99d7ec652..f1a6e1a77e 100644 --- a/Items/Weapons/Magic/Tradewinds.cs +++ b/Items/Weapons/Magic/Tradewinds.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.Bookcases). Register(); } diff --git a/Items/Weapons/Magic/UnstableCastersGauntlet.cs b/Items/Weapons/Magic/UnstableCastersGauntlet.cs index f83fcc004f..e07644ade7 100644 --- a/Items/Weapons/Magic/UnstableCastersGauntlet.cs +++ b/Items/Weapons/Magic/UnstableCastersGauntlet.cs @@ -26,8 +26,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.noUseGraphic = true; Item.channel = true; Item.knockBack = 3f; - Item.value = CalamityGlobalItem.RarityRedBuyPrice; - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityPurpleBuyPrice; + Item.rare = ItemRarityID.Purple; Item.Calamity().donorItem = true; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/ValkyrieRay.cs b/Items/Weapons/Magic/ValkyrieRay.cs index f9ec35fb43..2984ac8b0f 100644 --- a/Items/Weapons/Magic/ValkyrieRay.cs +++ b/Items/Weapons/Magic/ValkyrieRay.cs @@ -39,8 +39,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.useTurn = false; Item.noMelee = true; Item.noUseGraphic = true; - Item.value = CalamityGlobalItem.RarityPinkBuyPrice; - Item.rare = ItemRarityID.Pink; + Item.value = CalamityGlobalItem.RarityLightPurpleBuyPrice; + Item.rare = ItemRarityID.LightPurple; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 25f; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/Viscera.cs b/Items/Weapons/Magic/Viscera.cs index b7e8e976c7..f87d31d310 100644 --- a/Items/Weapons/Magic/Viscera.cs +++ b/Items/Weapons/Magic/Viscera.cs @@ -61,7 +61,8 @@ namespace CalamityMod.Items.Weapons.Magic public override void AddRecipes() { CreateRecipe(). - AddIngredient(4). + AddIngredient(25). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/AbyssBlade.cs b/Items/Weapons/Melee/AbyssBlade.cs index 3a8120a2be..4d32b8058c 100644 --- a/Items/Weapons/Melee/AbyssBlade.cs +++ b/Items/Weapons/Melee/AbyssBlade.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 74; Item.height = 74; - Item.damage = 123; + Item.damage = 114; Item.knockBack = 7.5f; Item.useTime = 65; Item.useAnimation = 65; diff --git a/Items/Weapons/Melee/AcidwoodSword.cs b/Items/Weapons/Melee/AcidwoodSword.cs index f204f19fe8..9ae1d55e07 100644 --- a/Items/Weapons/Melee/AcidwoodSword.cs +++ b/Items/Weapons/Melee/AcidwoodSword.cs @@ -9,18 +9,12 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetDefaults() { - Item.damage = 11; + Item.CloneDefaults(ItemID.ShadewoodSword); // Ash Wood > Acidwood > Shadewood Item.width = 36; Item.height = 40; - Item.DamageType = DamageClass.Melee; + Item.damage = 12; Item.useAnimation = Item.useTime = 18; - Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 3f; - Item.UseSound = SoundID.Item1; - Item.autoReuse = true; - Item.useTurn = true; - Item.value = CalamityGlobalItem.RarityWhiteBuyPrice; - Item.rare = ItemRarityID.White; } public override void AddRecipes() { diff --git a/Items/Weapons/Melee/AirSpinner.cs b/Items/Weapons/Melee/AirSpinner.cs index 4d88c54792..403f64caa5 100644 --- a/Items/Weapons/Melee/AirSpinner.cs +++ b/Items/Weapons/Melee/AirSpinner.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Weapons/Melee/AnarchyBlade.cs b/Items/Weapons/Melee/AnarchyBlade.cs index e3c51d2339..9d17eef1ee 100644 --- a/Items/Weapons/Melee/AnarchyBlade.cs +++ b/Items/Weapons/Melee/AnarchyBlade.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Items.Weapons.Melee { CreateRecipe(). AddIngredient(ItemID.BreakerBlade). - AddIngredient(5). + AddIngredient(8). AddIngredient(). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Melee/ArkoftheCosmos.cs b/Items/Weapons/Melee/ArkoftheCosmos.cs index c119913376..f2f4c46f55 100644 --- a/Items/Weapons/Melee/ArkoftheCosmos.cs +++ b/Items/Weapons/Melee/ArkoftheCosmos.cs @@ -10,6 +10,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; +using Terraria.GameInput; using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; @@ -22,11 +23,6 @@ namespace CalamityMod.Items.Weapons.Melee public float Combo = 0f; public float Charge = 0f; - // Frame window for double right click to snip. - // The right click item activation takes 3 frames, so the frame window is frame 3 to frame 11. - public static int DoubleRightClickFrames = 11; - private int rmbFrames = 0; - public static float NeedleDamageMultiplier = 0.7f; //Damage on the non-homing needle projectile public static float MaxThrowReach = 760; public static float SnapDamageMultiplier = 1.2f; //Extra damage from making the scissors snap @@ -68,21 +64,25 @@ namespace CalamityMod.Items.Weapons.Melee var blastTooltip = tooltips.FirstOrDefault(x => x.Text.Contains("[BLAST]") && x.Mod == "Terraria"); if (blastTooltip != null) { - blastTooltip.Text = Lang.SupportGlyphs(this.GetLocalizedValue("BlastInfo")); + var key = Item.GetDynamicModHotkey().GetAssignedKeysOrEmpty(PlayerInput.CurrentInputMode); + if (key.Count > 0) + blastTooltip.Text = Lang.SupportGlyphs(this.GetLocalizedValue("BlastInfoKeybind")); + else + blastTooltip.Text = Lang.SupportGlyphs(this.GetLocalizedValue("BlastInfo")); blastTooltip.OverrideColor = Color.Lerp(Color.HotPink, Color.Crimson, 0.5f + (float)Math.Sin(Main.GlobalTimeWrappedHourly) * 0.625f); } + tooltips.IntegrateDynamicHotkey(Item); } public override void SetDefaults() { Item.width = Item.height = 136; - Item.damage = 1800; + Item.damage = 1700; Item.DamageType = DamageClass.MeleeNoSpeed; Item.crit = 15; Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 15; - Item.useTime = 15; + Item.useAnimation = Item.useTime = 15; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Shoot; Item.knockBack = 9.5f; @@ -100,14 +100,30 @@ namespace CalamityMod.Items.Weapons.Melee { player.Calamity().mouseWorldListener = true; - if (rmbFrames > 0) - --rmbFrames; - if (CanUseItem(player) && Combo != 4) Item.channel = false; if (Combo == 4) Item.channel = true; + + if (Main.myPlayer == player.whoAmI && Item.CurrentlyPressingKeybind() && Charge > 0) + { + Projectile blast = Main.projectile.FirstOrDefault(p => p.active && p.owner == player.whoAmI && p.type == ProjectileType(), null); + + if (blast == null) + { + float speed = Item.shootSpeed; + int dmg = (int)player.GetTotalDamage(Item.DamageType).ApplyTo(Item.damage); + Vector2 pos = player.Center; + int shoot = Item.shoot; + float kb = Item.knockBack; + var velocity = player.DirectionTo(Main.MouseWorld) * Item.shootSpeed; + PlayerLoader.ModifyShootStats(player, Item, ref pos, ref velocity, ref shoot, ref dmg, ref kb); + float angle = velocity.ToRotation(); + Projectile.NewProjectile(player.GetSource_ItemUse(Item), player.Center + angle.ToRotationVector2() * 90f, velocity, ProjectileType(), (int)(dmg * BlastDamageMultiplier), 0, player.whoAmI, Charge); + Charge = 0; + } + } } public override bool CanUseItem(Player player) @@ -122,15 +138,16 @@ namespace CalamityMod.Items.Weapons.Melee { if (player.altFunctionUse == 2) { - // If it has been less than N frames since the last alt function use, this is a double right click. - bool rightMouseDoubleClick = rmbFrames > 0; // Check if a parry holdout or blast is already present. Projectile parrier = Main.projectile.FirstOrDefault(p => p.active && p.owner == player.whoAmI && p.type == ProjectileType(), null); Projectile blast = Main.projectile.FirstOrDefault(p => p.active && p.owner == player.whoAmI && p.type == ProjectileType(), null); - bool canExecuteBlast = rightMouseDoubleClick && Charge > 0 && blast is null; + bool canExecuteBlast = Charge > 0 && blast is null; bool canExecuteParry = parrier is null && !canExecuteBlast; + //Disable blast usage if hotkey is bound + if (Item.GetDynamicModHotkey().GetAssignedKeysOrEmpty(PlayerInput.CurrentInputMode).Count > 0) + canExecuteBlast = false; // The blast is checked first, so that it overrides the first right click triggering a parry. Blasts delete any active parry holdouts on use. if (canExecuteBlast) @@ -139,13 +156,6 @@ namespace CalamityMod.Items.Weapons.Melee float angle = velocity.ToRotation(); Projectile.NewProjectile(source, player.Center + angle.ToRotationVector2() * 90f, velocity, ProjectileType(), (int)(damage * BlastDamageMultiplier), 0, player.whoAmI, Charge); Charge = 0; - - // If the parry holdout has existed for very few frames, just delete it. - if (parrier is not null && parrier.timeLeft > ArkoftheCosmosParryHoldout.MaxTime - DoubleRightClickFrames) - { - parrier.active = false; - parrier.netUpdate = true; - } } // If the blast cannot be executed, then the parry is executed, assuming no existing holdout is present. @@ -162,9 +172,6 @@ namespace CalamityMod.Items.Weapons.Melee if (!anyArkParryExists) Projectile.NewProjectile(source, player.Center, velocity, ProjectileType(), damage, 0, player.whoAmI, 0, 0); } - - // Regardless of what transpires from the right click, set the double right click frames appropriately. - rmbFrames = DoubleRightClickFrames; return false; } diff --git a/Items/Weapons/Melee/ArkoftheElements.cs b/Items/Weapons/Melee/ArkoftheElements.cs index 13cd093f00..c3c661f5ec 100644 --- a/Items/Weapons/Melee/ArkoftheElements.cs +++ b/Items/Weapons/Melee/ArkoftheElements.cs @@ -60,13 +60,12 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 112; Item.height = 172; - Item.damage = 507; + Item.damage = 444; Item.DamageType = DamageClass.MeleeNoSpeed; Item.crit = 10; Item.noUseGraphic = true; Item.noMelee = true; - Item.useAnimation = 20; - Item.useTime = 20; + Item.useAnimation = Item.useTime = 20; Item.useTurn = true; Item.useStyle = ItemUseStyleID.Shoot; Item.knockBack = 8.5f; diff --git a/Items/Weapons/Melee/AstralPike.cs b/Items/Weapons/Melee/AstralPike.cs index 68a9bd3f48..4114495689 100644 --- a/Items/Weapons/Melee/AstralPike.cs +++ b/Items/Weapons/Melee/AstralPike.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(8). + AddIngredient(12). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Weapons/Melee/AstralScythe.cs b/Items/Weapons/Melee/AstralScythe.cs index 912b7417a7..90ed8130eb 100644 --- a/Items/Weapons/Melee/AstralScythe.cs +++ b/Items/Weapons/Melee/AstralScythe.cs @@ -15,12 +15,11 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 56; Item.height = 60; - Item.damage = 120; + Item.damage = 80; Item.DamageType = DamageClass.Melee; Item.useTurn = true; - Item.useAnimation = 20; + Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 20; Item.knockBack = 6f; Item.UseSound = SoundID.Item71; Item.autoReuse = true; @@ -30,12 +29,6 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 5f; } - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) - { - Projectile.NewProjectile(source, position, velocity, type, (int)(damage * 0.6), knockback, player.whoAmI); - return false; - } - public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 300); diff --git a/Items/Weapons/Melee/Ataraxia.cs b/Items/Weapons/Melee/Ataraxia.cs index 49cf9686b6..7af3af3ddc 100644 --- a/Items/Weapons/Melee/Ataraxia.cs +++ b/Items/Weapons/Melee/Ataraxia.cs @@ -21,10 +21,9 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 94; Item.height = 92; Item.DamageType = DamageClass.Melee; - Item.damage = 675; + Item.damage = 325; Item.knockBack = 2.5f; - Item.useAnimation = 10; - Item.useTime = 10; + Item.useAnimation = Item.useTime = 10; Item.autoReuse = true; Item.useTurn = true; @@ -47,12 +46,11 @@ namespace CalamityMod.Items.Weapons.Melee // Center projectile int centerID = ModContent.ProjectileType(); - int centerDamage = (damage / 2); - Projectile.NewProjectile(source, position, velocity, centerID, centerDamage, knockback, player.whoAmI); + Projectile.NewProjectile(source, position, velocity, centerID, damage, knockback, player.whoAmI); - // Side projectiles (these deal 75% damage) + // Side projectiles (these deal 50% damage) int sideID = ModContent.ProjectileType(); - int sideDamage = ((int)(0.75f * centerDamage) / 2); + int sideDamage = (int)(0.5f * damage); Vector2 originalVelocity = velocity; velocity.Normalize(); velocity *= 22f; diff --git a/Items/Weapons/Melee/Basher.cs b/Items/Weapons/Melee/Basher.cs index 50c00db006..0cb494645a 100644 --- a/Items/Weapons/Melee/Basher.cs +++ b/Items/Weapons/Melee/Basher.cs @@ -34,8 +34,8 @@ namespace CalamityMod.Items.Weapons.Melee Item.noUseGraphic = true; Item.noMelee = true; Item.useStyle = ItemUseStyleID.Shoot; - Item.value = CalamityGlobalItem.RarityBlueBuyPrice; - Item.rare = ItemRarityID.Blue; + Item.value = CalamityGlobalItem.RarityGreenBuyPrice; + Item.rare = ItemRarityID.Green; } public override bool MeleePrefix() => true; public override bool CanUseItem(Player player) => false; diff --git a/Items/Weapons/Melee/BladecrestOathsword.cs b/Items/Weapons/Melee/BladecrestOathsword.cs index ab15acffd1..1ef5c6040c 100644 --- a/Items/Weapons/Melee/BladecrestOathsword.cs +++ b/Items/Weapons/Melee/BladecrestOathsword.cs @@ -16,10 +16,9 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 56; Item.height = 56; - Item.damage = 42; + Item.damage = 35; Item.knockBack = 3f; - Item.useTime = 53; - Item.useAnimation = 53; + Item.useAnimation = Item.useTime = 53; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; diff --git a/Items/Weapons/Melee/BlightedCleaver.cs b/Items/Weapons/Melee/BlightedCleaver.cs index 1a5f7aa014..7a988b3e8e 100644 --- a/Items/Weapons/Melee/BlightedCleaver.cs +++ b/Items/Weapons/Melee/BlightedCleaver.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 88; Item.height = 88; - Item.damage = 65; + Item.damage = 52; Item.DamageType = DamageClass.Melee; Item.useAnimation = Item.useTime = 28; Item.useStyle = ItemUseStyleID.Swing; @@ -93,7 +93,7 @@ namespace CalamityMod.Items.Weapons.Melee CreateRecipe(). AddIngredient(). AddIngredient(ItemID.BrokenHeroSword). - AddIngredient(ItemID.ChlorophyteBar, 15). + AddIngredient(ItemID.ChlorophyteBar, 10). AddIngredient(ItemID.VialofVenom, 10). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Melee/Bonebreaker.cs b/Items/Weapons/Melee/Bonebreaker.cs index c193ac8313..ab138d4ded 100644 --- a/Items/Weapons/Melee/Bonebreaker.cs +++ b/Items/Weapons/Melee/Bonebreaker.cs @@ -21,8 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 32; Item.height = 32; Item.useStyle = ItemUseStyleID.Swing; - Item.useAnimation = 20; - Item.useTime = 20; + Item.useAnimation = Item.useTime = 23; Item.damage = BaseDamage; Item.DamageType = DamageClass.MeleeNoSpeed; Item.knockBack = 7f; diff --git a/Items/Weapons/Melee/BotanicPiercer.cs b/Items/Weapons/Melee/BotanicPiercer.cs index 1d67b9f7ff..c97ee2bb6f 100644 --- a/Items/Weapons/Melee/BotanicPiercer.cs +++ b/Items/Weapons/Melee/BotanicPiercer.cs @@ -21,14 +21,13 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 112; Item.height = 112; - Item.damage = 110; + Item.damage = 80; Item.DamageType = DamageClass.Melee; Item.noMelee = true; Item.useTurn = true; Item.noUseGraphic = true; - Item.useAnimation = 17; + Item.useAnimation = Item.useTime = 17; Item.useStyle = ItemUseStyleID.Shoot; - Item.useTime = 17; Item.knockBack = 8.5f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/Brimlash.cs b/Items/Weapons/Melee/Brimlash.cs index f8cb726434..b5d2069700 100644 --- a/Items/Weapons/Melee/Brimlash.cs +++ b/Items/Weapons/Melee/Brimlash.cs @@ -55,8 +55,8 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). - AddIngredient(4). + AddIngredient(8). + AddIngredient(8). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/BrimstoneSword.cs b/Items/Weapons/Melee/BrimstoneSword.cs index 35e119edbf..0afbb31bc6 100644 --- a/Items/Weapons/Melee/BrimstoneSword.cs +++ b/Items/Weapons/Melee/BrimstoneSword.cs @@ -91,7 +91,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(6). + AddIngredient(8). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/BrokenBiomeBlade.cs b/Items/Weapons/Melee/BrokenBiomeBlade.cs index c4503e4546..2e91a5381e 100644 --- a/Items/Weapons/Melee/BrokenBiomeBlade.cs +++ b/Items/Weapons/Melee/BrokenBiomeBlade.cs @@ -34,16 +34,16 @@ namespace CalamityMod.Items.Weapons.Melee #region stats public static int BaseDamage = 38; - public static int DefaultAttunement_BaseDamage = 38; + public static int DefaultAttunement_BaseDamage = 34; - public static int EvilAttunement_BaseDamage = 50; + public static int EvilAttunement_BaseDamage = 45; public static int EvilAttunement_Lifesteal = 2; public static int EvilAttunement_BounceIFrames = 10; - public static int ColdAttunement_BaseDamage = 40; + public static int ColdAttunement_BaseDamage = 38; public static float ColdAttunement_ThirdSwingBoost = 1.15f; - public static int HotAttunement_BaseDamage = 42; + public static int HotAttunement_BaseDamage = 38; public static int HotAttunement_ShredPlayerIFrames = 6; public static int HotAttunement_LocalIFrames = 30; //Be warned its got one extra update so all the iframes should be divided in 2 public static float HotAttunement_ShredDecayRate = 1f; //How much charge is lost per frame. @@ -183,7 +183,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void ModifyWeaponDamage(Player player, ref StatModifier damage) { - damage += (mainAttunement?.DamageMultiplier ?? 1f) - 1f; + damage *= (mainAttunement?.DamageMultiplier ?? 1f); } public void SafeCheckAttunements() diff --git a/Items/Weapons/Melee/CometQuasher.cs b/Items/Weapons/Melee/CometQuasher.cs index 303ec17ba6..a92b7a305c 100644 --- a/Items/Weapons/Melee/CometQuasher.cs +++ b/Items/Weapons/Melee/CometQuasher.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 92; Item.height = 94; - Item.damage = 48; + Item.damage = 45; Item.DamageType = TrueMeleeDamageClass.Instance; Item.useAnimation = Item.useTime = 38; @@ -42,8 +42,8 @@ namespace CalamityMod.Items.Weapons.Melee CreateRecipe(). AddIngredient(ItemID.MeteoriteBar, 20). AddIngredient(4). - AddIngredient(12). AddIngredient(ItemID.FallenStar, 5). + AddIngredient(12). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Weapons/Melee/CosmicShiv.cs b/Items/Weapons/Melee/CosmicShiv.cs index ba39ea2a6e..fbb0ee09d2 100644 --- a/Items/Weapons/Melee/CosmicShiv.cs +++ b/Items/Weapons/Melee/CosmicShiv.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Melee { CreateRecipe(). AddIngredient(). - AddIngredient(8). + AddIngredient(10). AddTile(). Register(); } diff --git a/Items/Weapons/Melee/CrescentMoon.cs b/Items/Weapons/Melee/CrescentMoon.cs index f09743e25f..d028eca339 100644 --- a/Items/Weapons/Melee/CrescentMoon.cs +++ b/Items/Weapons/Melee/CrescentMoon.cs @@ -50,8 +50,8 @@ namespace CalamityMod.Items.Weapons.Melee CreateRecipe(). AddIngredient(ItemID.BlueMoon). AddIngredient(8). - AddIngredient(3). - AddIngredient(16). + AddIngredient(4). + AddIngredient(20). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/DarklightGreatsword.cs b/Items/Weapons/Melee/DarklightGreatsword.cs index 25fd6b6150..a98384a00b 100644 --- a/Items/Weapons/Melee/DarklightGreatsword.cs +++ b/Items/Weapons/Melee/DarklightGreatsword.cs @@ -16,11 +16,7 @@ namespace CalamityMod.Items.Weapons.Melee internal const float ShootSpeed = 2f; - internal const float ProjectileDamageMultiplier = 0.8f; - - internal const float TrueMeleeSlashProjectileDamageMultiplier = 0.8f; - - internal const float SlashProjectileDamageMultiplier = 0.4125f; // Makes them do 33% damage since main projectile does 80% damage + internal const float SlashProjectileDamageMultiplier = 0.33f; internal const int SlashProjectileLimit = 4; @@ -34,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 92; Item.height = 100; - Item.damage = 75; + Item.damage = 60; Item.DamageType = DamageClass.Melee; Item.useAnimation = Item.useTime = 30; Item.useStyle = ItemUseStyleID.Swing; @@ -59,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Melee // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction velocity = (Main.MouseWorld - position).SafeNormalize(Vector2.UnitY) * ShootSpeed; type = Main.rand.NextBool() ? type : ModContent.ProjectileType(); - Projectile.NewProjectile(source, position, velocity, type, (int)(damage * ProjectileDamageMultiplier), knockback * ProjectileDamageMultiplier, player.whoAmI); + Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); return false; } diff --git a/Items/Weapons/Melee/DefiledGreatsword.cs b/Items/Weapons/Melee/DefiledGreatsword.cs index 66e1955b04..ae3aef26da 100644 --- a/Items/Weapons/Melee/DefiledGreatsword.cs +++ b/Items/Weapons/Melee/DefiledGreatsword.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 102; Item.height = 102; - Item.damage = 119; + Item.damage = 111; Item.DamageType = DamageClass.Melee; Item.useAnimation = Item.useTime = 28; Item.useStyle = ItemUseStyleID.Swing; @@ -137,8 +137,8 @@ namespace CalamityMod.Items.Weapons.Melee { CreateRecipe(). AddIngredient(). - AddIngredient(). - AddIngredient(15). + AddIngredient(10). + AddIngredient(5). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/DevilsDevastation.cs b/Items/Weapons/Melee/DevilsDevastation.cs index 76da84fb72..117748c85f 100644 --- a/Items/Weapons/Melee/DevilsDevastation.cs +++ b/Items/Weapons/Melee/DevilsDevastation.cs @@ -20,6 +20,10 @@ namespace CalamityMod.Items.Weapons.Melee { public new string LocalizationCategory => "Items.Weapons.Melee"; public int throwCount = 0; + + public static int BigSlashDamageMult = 10; + public static float MarkDamageMult = 1.5f; // Multiplied on top of the big slash mult + public override void SetStaticDefaults() { CalamityItemSets.ExtraDebuffTooltip_Enemy[Type] = [ModContent.BuffType()]; @@ -81,7 +85,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_ItemUse(Item), player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), Item.damage * 15, Item.knockBack, player.whoAmI, 0, throwCount); //This used to be 30x damage. + Projectile.NewProjectile(player.GetSource_ItemUse(Item), player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), Item.damage * BigSlashDamageMult, Item.knockBack, player.whoAmI, 0, throwCount); //This used to be 30x damage. } } 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/DevilsSunrise.cs b/Items/Weapons/Melee/DevilsSunrise.cs index 803e40bb4d..9862d325a9 100644 --- a/Items/Weapons/Melee/DevilsSunrise.cs +++ b/Items/Weapons/Melee/DevilsSunrise.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Weapons.Melee { CreateRecipe(). AddIngredient(ItemID.Terragrim). - AddIngredient(25). + AddIngredient(50). AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Melee/DragonPow.cs b/Items/Weapons/Melee/DragonPow.cs index d1e27ec1d4..64adc9d3bc 100644 --- a/Items/Weapons/Melee/DragonPow.cs +++ b/Items/Weapons/Melee/DragonPow.cs @@ -24,10 +24,9 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 76; Item.height = 82; Item.DamageType = DamageClass.MeleeNoSpeed; - Item.damage = 660; + Item.damage = 333; Item.knockBack = 9f; - Item.useAnimation = 20; - Item.useTime = 20; + Item.useAnimation = Item.useTime = 20; Item.autoReuse = true; Item.noMelee = true; Item.noUseGraphic = true; diff --git a/Items/Weapons/Melee/DriftwoodSword.cs b/Items/Weapons/Melee/DriftwoodSword.cs index ffda7cc8d6..62c8348e65 100644 --- a/Items/Weapons/Melee/DriftwoodSword.cs +++ b/Items/Weapons/Melee/DriftwoodSword.cs @@ -12,18 +12,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - Item.damage = 14; + Item.CloneDefaults(ItemID.ShadewoodSword); // Driftwood (base) = Shadewood Item.width = 42; Item.height = 46; - Item.DamageType = DamageClass.Melee; - Item.useAnimation = Item.useTime = 20; - Item.useStyle = ItemUseStyleID.Swing; - Item.knockBack = 4f; - Item.UseSound = SoundID.Item1; - Item.autoReuse = true; - Item.useTurn = true; - Item.value = CalamityGlobalItem.RarityWhiteBuyPrice; - Item.rare = ItemRarityID.White; } public override void MeleeEffects(Player player, Rectangle hitbox) @@ -32,9 +23,9 @@ namespace CalamityMod.Items.Weapons.Melee Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.MagnetSphere); } - public override float UseSpeedMultiplier(Player player) => player.Calamity().countsAsAnyWet ? 1.66f : 1f; + public override float UseSpeedMultiplier(Player player) => player.Calamity().countsAsAnyWet ? 1.25f : 1f; - public override void ModifyWeaponKnockback(Player player, ref StatModifier knockback) => knockback.Base += player.Calamity().countsAsAnyWet ? 1.5f : 0f; + public override void ModifyWeaponKnockback(Player player, ref StatModifier knockback) => knockback.Base += player.Calamity().countsAsAnyWet ? 1.25f : 0f; public override void AddRecipes() { diff --git a/Items/Weapons/Melee/EmpyreanKnives.cs b/Items/Weapons/Melee/EmpyreanKnives.cs index 07a926f727..75543894b5 100644 --- a/Items/Weapons/Melee/EmpyreanKnives.cs +++ b/Items/Weapons/Melee/EmpyreanKnives.cs @@ -17,13 +17,12 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 18; Item.height = 20; - Item.damage = 130; + Item.damage = 110; Item.DamageType = DamageClass.MeleeNoSpeed; Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 15; + Item.useAnimation = Item.useTime = 15; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 15; Item.knockBack = 3f; Item.UseSound = SoundID.Item39; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/EssenceFlayer.cs b/Items/Weapons/Melee/EssenceFlayer.cs index 2154aef30e..a5d200ed3e 100644 --- a/Items/Weapons/Melee/EssenceFlayer.cs +++ b/Items/Weapons/Melee/EssenceFlayer.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). + AddIngredient(10). AddTile(). Register(); } diff --git a/Items/Weapons/Melee/ExaltedOathblade.cs b/Items/Weapons/Melee/ExaltedOathblade.cs index 101b4ff14d..7752464b70 100644 --- a/Items/Weapons/Melee/ExaltedOathblade.cs +++ b/Items/Weapons/Melee/ExaltedOathblade.cs @@ -96,7 +96,6 @@ namespace CalamityMod.Items.Weapons.Melee CreateRecipe(). AddIngredient(). AddIngredient(ItemID.BrokenHeroSword). - AddIngredient(8). AddIngredient(8). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Melee/FallenPaladinsHammer.cs b/Items/Weapons/Melee/FallenPaladinsHammer.cs index 4415eec8c9..3bdae47fdb 100644 --- a/Items/Weapons/Melee/FallenPaladinsHammer.cs +++ b/Items/Weapons/Melee/FallenPaladinsHammer.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 14; Item.height = 28; - Item.damage = 368; + Item.damage = 315; Item.noMelee = true; Item.noUseGraphic = true; Item.autoReuse = true; @@ -40,8 +40,8 @@ namespace CalamityMod.Items.Weapons.Melee CreateRecipe(). AddIngredient(ItemID.PaladinsHammer). AddIngredient(). - AddIngredient(5). - AddIngredient(5). + AddIngredient(8). + AddIngredient(8). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/FaultLine.cs b/Items/Weapons/Melee/FaultLine.cs index 51436cd0e4..1e66ee50af 100644 --- a/Items/Weapons/Melee/FaultLine.cs +++ b/Items/Weapons/Melee/FaultLine.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(6). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/FeralthornClaymore.cs b/Items/Weapons/Melee/FeralthornClaymore.cs index 62e01c0075..956a44edeb 100644 --- a/Items/Weapons/Melee/FeralthornClaymore.cs +++ b/Items/Weapons/Melee/FeralthornClaymore.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/FlarefrostBlade.cs b/Items/Weapons/Melee/FlarefrostBlade.cs index 259086b8b5..e84720bddb 100644 --- a/Items/Weapons/Melee/FlarefrostBlade.cs +++ b/Items/Weapons/Melee/FlarefrostBlade.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Items.Weapons.Melee } public override void SetDefaults() { - Item.width = 64; - Item.height = 66; + Item.width = 82; + Item.height = 90; Item.damage = 125; Item.DamageType = DamageClass.Melee; Item.useAnimation = Item.useTime = 29; @@ -67,9 +67,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(8). - AddIngredient(ItemID.HellstoneBar, 8). - AddIngredient(ItemID.SoulofLight, 3). + AddIngredient(10). + AddIngredient(ItemID.HellstoneBar, 10). + AddIngredient(ItemID.SoulofLight, 10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/FlarefrostBlade.png b/Items/Weapons/Melee/FlarefrostBlade.png index dedd00ceb0..d9f2c33caf 100644 Binary files a/Items/Weapons/Melee/FlarefrostBlade.png and b/Items/Weapons/Melee/FlarefrostBlade.png differ diff --git a/Items/Weapons/Melee/ForbiddenOathblade.cs b/Items/Weapons/Melee/ForbiddenOathblade.cs index c98f63055c..b98dd6c086 100644 --- a/Items/Weapons/Melee/ForbiddenOathblade.cs +++ b/Items/Weapons/Melee/ForbiddenOathblade.cs @@ -95,7 +95,7 @@ namespace CalamityMod.Items.Weapons.Melee CreateRecipe(). AddIngredient(). AddIngredient(). - AddIngredient(5). + AddIngredient(8). AddIngredient(8). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index 681c4a05ce..f8b2d163c6 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -169,12 +169,14 @@ namespace CalamityMod.Items.Weapons.Melee if (mainAttunement == null || player.altFunctionUse != ItemAlternativeFunctionID.None) return false; - return true; + Projectile blade = Projectile.NewProjectileDirect(source, position, velocity, type, damage, knockback, player.whoAmI); + blade.originalDamage = (int)MathF.Round(blade.originalDamage * mainAttunement.DamageMultiplier); + return false; } public override void ModifyWeaponDamage(Player player, ref StatModifier damage) { - damage += (mainAttunement?.DamageMultiplier ?? 1f) - 1f; + damage *= (mainAttunement?.DamageMultiplier ?? 1f); } public void SafeCheckAttunements() diff --git a/Items/Weapons/Melee/FracturedArk.cs b/Items/Weapons/Melee/FracturedArk.cs index bf19a29e79..3527447583 100644 --- a/Items/Weapons/Melee/FracturedArk.cs +++ b/Items/Weapons/Melee/FracturedArk.cs @@ -140,13 +140,13 @@ namespace CalamityMod.Items.Weapons.Melee { CreateRecipe(). AddIngredient(ItemID.EnchantedSword). - AddIngredient(5). + AddIngredient(10). AddRecipeGroup("AnyCopperBar", 10). AddTile(TileID.Anvils). Register(); CreateRecipe(). AddIngredient(ItemID.Terragrim). - AddIngredient(5). + AddIngredient(10). AddRecipeGroup("AnyCopperBar", 10). AddTile(TileID.Anvils). Register(); diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index 71bccf18c8..4d37a1313d 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/GalactusBlade.cs b/Items/Weapons/Melee/GalactusBlade.cs index 623a1e3b37..34aa0cee4b 100644 --- a/Items/Weapons/Melee/GalactusBlade.cs +++ b/Items/Weapons/Melee/GalactusBlade.cs @@ -131,11 +131,8 @@ namespace CalamityMod.Items.Weapons.Melee { CreateRecipe(). AddIngredient(ItemID.StarWrath). + AddIngredient(5). AddIngredient(10). - AddIngredient(ItemID.FragmentSolar, 5). - AddIngredient(ItemID.FragmentVortex, 5). - AddIngredient(ItemID.FragmentNebula, 5). - AddIngredient(ItemID.FragmentStardust, 5). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/GalaxySmasher.png b/Items/Weapons/Melee/GalaxySmasher.png index 9b40695ec7..6f43040182 100644 Binary files a/Items/Weapons/Melee/GalaxySmasher.png and b/Items/Weapons/Melee/GalaxySmasher.png differ diff --git a/Items/Weapons/Melee/GalileoGladius.cs b/Items/Weapons/Melee/GalileoGladius.cs index 0f9a59b975..465854b9ee 100644 --- a/Items/Weapons/Melee/GalileoGladius.cs +++ b/Items/Weapons/Melee/GalileoGladius.cs @@ -69,8 +69,8 @@ namespace CalamityMod.Items.Weapons.Melee CreateRecipe(). AddIngredient(ItemID.Gladius). AddIngredient(8). - AddIngredient(5). - AddIngredient(15). + AddIngredient(4). + AddIngredient(20). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/GeliticBlade.cs b/Items/Weapons/Melee/GeliticBlade.cs index 5747f80feb..8f1e8dfd36 100644 --- a/Items/Weapons/Melee/GeliticBlade.cs +++ b/Items/Weapons/Melee/GeliticBlade.cs @@ -55,8 +55,8 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(18). - AddIngredient(18). + AddIngredient(14). + AddIngredient(14). AddTile(TileID.Solidifier). Register(); } diff --git a/Items/Weapons/Melee/GoldplumeSpear.cs b/Items/Weapons/Melee/GoldplumeSpear.cs index 4ae1af9abe..7aa106132f 100644 --- a/Items/Weapons/Melee/GoldplumeSpear.cs +++ b/Items/Weapons/Melee/GoldplumeSpear.cs @@ -18,14 +18,13 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 54; Item.height = 54; - Item.damage = 31; + Item.damage = 26; Item.DamageType = DamageClass.Melee; Item.noMelee = true; Item.useTurn = true; Item.noUseGraphic = true; - Item.useAnimation = 25; + Item.useAnimation = Item.useTime = 25; Item.useStyle = ItemUseStyleID.Shoot; - Item.useTime = 25; Item.knockBack = 5.75f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; @@ -40,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Weapons/Melee/GrandDad.cs b/Items/Weapons/Melee/GrandDad.cs index 2adf365c8e..641d59cc06 100644 --- a/Items/Weapons/Melee/GrandDad.cs +++ b/Items/Weapons/Melee/GrandDad.cs @@ -29,15 +29,14 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 124; Item.height = 124; - Item.damage = 5777; // Feel free to change these 7s as balance requires. The other 7s should stay - Update: no more 2777... :( + Item.damage = 5577; // Feel free to change these 7s as balance requires. The other 7s should stay - Update: no more 2777... :( Item.DamageType = TrueMeleeDamageClass.Instance; - Item.useAnimation = 77; - Item.useTime = 77; + Item.useAnimation = Item.useTime = 77; Item.useTurn = true; Item.knockBack = 77f; Item.autoReuse = true; - Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; - Item.rare = ModContent.RarityType(); + Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; + Item.rare = ModContent.RarityType(); Item.channel = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/GreatswordofJudgement.cs b/Items/Weapons/Melee/GreatswordofJudgement.cs index b6d84eb778..2cc6d412ee 100644 --- a/Items/Weapons/Melee/GreatswordofJudgement.cs +++ b/Items/Weapons/Melee/GreatswordofJudgement.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 78; Item.height = 78; - Item.damage = 280; + Item.damage = 225; Item.DamageType = DamageClass.Melee; Item.useStyle = ItemUseStyleID.Swing; Item.useAnimation = Item.useTime = 20; @@ -164,8 +164,8 @@ namespace CalamityMod.Items.Weapons.Melee { CreateRecipe(). AddIngredient(ItemID.LunarBar, 7). - AddIngredient(). AddIngredient(ItemID.ShimmerBlock, 10). + AddIngredient(). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Weapons/Melee/HellfireFlamberge.cs b/Items/Weapons/Melee/HellfireFlamberge.cs index e4e2d52b0e..d8026ed15f 100644 --- a/Items/Weapons/Melee/HellfireFlamberge.cs +++ b/Items/Weapons/Melee/HellfireFlamberge.cs @@ -88,7 +88,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(15). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/HellionFlowerSpear.cs b/Items/Weapons/Melee/HellionFlowerSpear.cs index 362f888b31..ea85b0c971 100644 --- a/Items/Weapons/Melee/HellionFlowerSpear.cs +++ b/Items/Weapons/Melee/HellionFlowerSpear.cs @@ -19,14 +19,13 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 64; Item.height = 64; - Item.damage = 85; + Item.damage = 100; Item.DamageType = DamageClass.Melee; Item.noMelee = true; Item.useTurn = true; Item.noUseGraphic = true; - Item.useAnimation = 20; + Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.Shoot; - Item.useTime = 20; Item.knockBack = 7.5f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; @@ -41,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/Hellkite.cs b/Items/Weapons/Melee/Hellkite.cs index 5cb216baa4..a27c40675f 100644 --- a/Items/Weapons/Melee/Hellkite.cs +++ b/Items/Weapons/Melee/Hellkite.cs @@ -25,14 +25,14 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 124; Item.height = 124; - Item.damage = 760; + Item.damage = 570; Item.DamageType = TrueMeleeDamageClass.Instance; Item.useAnimation = Item.useTime = 71; Item.useTurn = true; Item.knockBack = 13f; Item.autoReuse = true; - Item.value = CalamityGlobalItem.RarityLimeBuyPrice; - Item.rare = ItemRarityID.Lime; + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; + Item.rare = ItemRarityID.Yellow; Item.channel = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/HolyCollider.cs b/Items/Weapons/Melee/HolyCollider.cs index a0d8a82f4c..cc0d03f0e1 100644 --- a/Items/Weapons/Melee/HolyCollider.cs +++ b/Items/Weapons/Melee/HolyCollider.cs @@ -25,11 +25,10 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 114; Item.height = 146; - Item.damage = 2900; + Item.damage = 2200; Item.DamageType = TrueMeleeDamageClass.Instance; - Item.useAnimation = 45; + Item.useAnimation = Item.useTime = 45; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 45; Item.useTurn = true; Item.knockBack = 7.75f; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/Lacerator.cs b/Items/Weapons/Melee/Lacerator.cs index 95595ad0cc..d0808f5ded 100644 --- a/Items/Weapons/Melee/Lacerator.cs +++ b/Items/Weapons/Melee/Lacerator.cs @@ -56,7 +56,8 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(4). + AddIngredient(25). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/LifehuntScythe.cs b/Items/Weapons/Melee/LifehuntScythe.cs index ae3eeebd78..b1134b9e16 100644 --- a/Items/Weapons/Melee/LifehuntScythe.cs +++ b/Items/Weapons/Melee/LifehuntScythe.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(15). + AddIngredient(12). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/Lightspeed.cs b/Items/Weapons/Melee/Lightspeed.cs index 2b6cae8972..e43ef1598a 100644 --- a/Items/Weapons/Melee/Lightspeed.cs +++ b/Items/Weapons/Melee/Lightspeed.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - Item.width = 74; - Item.height = 94; + Item.width = 94; + Item.height = 92; Item.useStyle = ItemUseStyleID.Shoot; Item.damage = 200; Item.DamageType = TrueMeleeDamageClass.Instance; diff --git a/Items/Weapons/Melee/Lightspeed.png b/Items/Weapons/Melee/Lightspeed.png index 6fc05ab7e6..fef0720fcc 100644 Binary files a/Items/Weapons/Melee/Lightspeed.png and b/Items/Weapons/Melee/Lightspeed.png differ diff --git a/Items/Weapons/Melee/Lucrecia.cs b/Items/Weapons/Melee/Lucrecia.cs index e2160af239..44b75f67cb 100644 --- a/Items/Weapons/Melee/Lucrecia.cs +++ b/Items/Weapons/Melee/Lucrecia.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 54; Item.height = 54; Item.useStyle = ItemUseStyleID.Shoot; - Item.damage = 132; + Item.damage = 124; Item.DamageType = DamageClass.Melee; Item.useAnimation = Item.useTime = 34; Item.shootSpeed = 10f; diff --git a/Items/Weapons/Melee/MajesticGuard.cs b/Items/Weapons/Melee/MajesticGuard.cs index 98046d1acc..c0fbf4639a 100644 --- a/Items/Weapons/Melee/MajesticGuard.cs +++ b/Items/Weapons/Melee/MajesticGuard.cs @@ -16,10 +16,9 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 100; Item.height = 100; - Item.damage = 365; + Item.damage = 270; Item.DamageType = TrueMeleeDamageClass.Instance; - Item.useAnimation = 50; - Item.useTime = 50; + Item.useAnimation = Item.useTime = 50; Item.useTurn = true; Item.knockBack = 12f; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/MonolithSword.cs b/Items/Weapons/Melee/MonolithSword.cs index a04e7b32fe..a4350a5406 100644 --- a/Items/Weapons/Melee/MonolithSword.cs +++ b/Items/Weapons/Melee/MonolithSword.cs @@ -18,18 +18,11 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - Item.damage = 30; + Item.CloneDefaults(ItemID.PearlwoodSword); // Monolith >= Pearlwood Item.width = 40; Item.height = 46; - Item.DamageType = DamageClass.Melee; + Item.damage = 30; Item.useAnimation = Item.useTime = 7; - Item.useStyle = ItemUseStyleID.Swing; - Item.knockBack = 4f; - Item.UseSound = SoundID.Item1; - Item.autoReuse = true; - Item.useTurn = true; - Item.value = CalamityGlobalItem.RarityOrangeBuyPrice; - Item.rare = ItemRarityID.Orange; Item.ArmorPenetration = ArmorPenetration; } public override void UseItemHitbox(Player player, ref Rectangle hitbox, ref bool noHitbox) diff --git a/Items/Weapons/Melee/NeptunesBounty.cs b/Items/Weapons/Melee/NeptunesBounty.cs index 599732a4a1..b75794002b 100644 --- a/Items/Weapons/Melee/NeptunesBounty.cs +++ b/Items/Weapons/Melee/NeptunesBounty.cs @@ -21,10 +21,9 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 122; Item.height = 122; - Item.damage = 444; + Item.damage = 420; Item.knockBack = 9f; - Item.useTime = 65; - Item.useAnimation = 65; + Item.useAnimation = Item.useTime = 65; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 3f; diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index c41913c66d..df460ccd9b 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -32,9 +32,9 @@ namespace CalamityMod.Items.Weapons.Melee public bool OnHitProc = false; #region stats - public static int BaseDamage = 200; + public static int BaseDamage = 150; - public static int WhirlwindAttunement_BaseDamage = 120; + public static int WhirlwindAttunement_BaseDamage = 150; public static int WhirlwindAttunement_LocalIFrames = 20; //Remember its got one extra update public static float WhirlwindAttunement_EnergyDamageMult = 0.5f; public static float WhirlwindAttunement_BaseSwingDamageMult = 0.4f; @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Melee public static int WhirlwindAttunement_PassiveBaseDamage = 80; - public static int SuperPogoAttunement_BaseDamage = 190; + public static int SuperPogoAttunement_BaseDamage = 200; public static int SuperPogoAttunement_PlayerShredIFrames = 8; public static int SuperPogoAttunement_LocalIFrames = 24; //Be warned its got one extra update so all the iframes should be divided in 2 public static float SuperPogoAttunement_ShotDamageMult = 2.5f; @@ -57,7 +57,7 @@ namespace CalamityMod.Items.Weapons.Melee public static int SuperPogoAttunement_PassiveLifeSteal = 7; - public static int ShockwaveAttunement_BaseDamage = 550; + public static int ShockwaveAttunement_BaseDamage = 600; public static float ShockwaveAttunement_BeamDamageMult = 0.25f; public static int ShockwaveAttunement_DashHitIFrames = 20; public static float ShockwaveAttunement_FullChargeMult = 3.6f; @@ -245,7 +245,7 @@ namespace CalamityMod.Items.Weapons.Melee if (mainAttunement == null) return; - damage += (mainAttunement?.DamageMultiplier ?? 1f) - 1f; + damage *= (mainAttunement?.DamageMultiplier ?? 1f); } public void SafeCheckAttunements() @@ -315,8 +315,8 @@ namespace CalamityMod.Items.Weapons.Melee if (secondaryAttunement.id == AttunementID.FlailBlade && MeatHook == null) { - int damage = (int)player.GetTotalDamage().ApplyTo(FlailBladeAttunement_PassiveBaseDamage); - MeatHook = Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, ProjectileType(), damage, 0f, player.whoAmI); + MeatHook = Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, ProjectileType(), FlailBladeAttunement_PassiveBaseDamage, 0f, player.whoAmI); + MeatHook.originalDamage = FlailBladeAttunement_PassiveBaseDamage; } secondaryAttunement.PassiveEffect(player, source, ref UseTimer, ref OnHitProc, MeatHook); @@ -356,7 +356,9 @@ namespace CalamityMod.Items.Weapons.Melee if (mainAttunement == null || player.altFunctionUse != ItemAlternativeFunctionID.None) return false; - return true; + Projectile blade = Projectile.NewProjectileDirect(source, position, velocity, type, damage, knockback, player.whoAmI); + blade.originalDamage = (int)MathF.Round(blade.originalDamage * mainAttunement.DamageMultiplier); + return false; } internal static ChargingEnergyParticleSet BiomeEnergyParticles = new ChargingEnergyParticleSet(-1, 2, Color.White, Color.White, 0.04f, 20f); @@ -412,9 +414,9 @@ namespace CalamityMod.Items.Weapons.Melee { CreateRecipe(). AddIngredient(). - AddIngredient(3). - AddIngredient(3). - AddIngredient(). + AddIngredient(18). + AddIngredient(6). + AddIngredient(3). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Weapons/Melee/Orderbringer.cs b/Items/Weapons/Melee/Orderbringer.cs index b184ca0daf..1d5ac85c5f 100644 --- a/Items/Weapons/Melee/Orderbringer.cs +++ b/Items/Weapons/Melee/Orderbringer.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { Item.width = Item.height = 112; - Item.damage = 800; + Item.damage = 700; Item.DamageType = DamageClass.Melee; Item.useAnimation = Item.useTime = 16; Item.useStyle = ItemUseStyleID.Swing; diff --git a/Items/Weapons/Melee/PerfectDark.cs b/Items/Weapons/Melee/PerfectDark.cs index c97e8bf4bd..b0c7d81332 100644 --- a/Items/Weapons/Melee/PerfectDark.cs +++ b/Items/Weapons/Melee/PerfectDark.cs @@ -19,11 +19,10 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 50; Item.height = 50; - Item.damage = 29; + Item.damage = 24; Item.DamageType = DamageClass.Melee; - Item.useAnimation = 24; + Item.useAnimation = Item.useTime = 24; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 24; Item.useTurn = true; Item.knockBack = 4.25f; Item.UseSound = SoundID.Item1; diff --git a/Items/Weapons/Melee/Pwnagehammer.cs b/Items/Weapons/Melee/Pwnagehammer.cs index 0b0e47fa19..90ae943eee 100644 --- a/Items/Weapons/Melee/Pwnagehammer.cs +++ b/Items/Weapons/Melee/Pwnagehammer.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 66; Item.height = 66; - Item.damage = 150; + Item.damage = 140; Item.noMelee = true; Item.noUseGraphic = true; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/Quagmire.cs b/Items/Weapons/Melee/Quagmire.cs index 111b1073f8..5cd02012b4 100644 --- a/Items/Weapons/Melee/Quagmire.cs +++ b/Items/Weapons/Melee/Quagmire.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(6). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/SaharaSlicers.cs b/Items/Weapons/Melee/SaharaSlicers.cs index 415b9f6834..6cc1a949c4 100644 --- a/Items/Weapons/Melee/SaharaSlicers.cs +++ b/Items/Weapons/Melee/SaharaSlicers.cs @@ -28,10 +28,9 @@ namespace CalamityMod.Items.Weapons.Melee Item.noUseGraphic = true; Item.autoReuse = true; Item.useStyle = ItemUseStyleID.Shoot; - Item.damage = 23; + Item.damage = 20; Item.DamageType = TrueMeleeDamageClass.Instance; - Item.useTime = 12; - Item.useAnimation = 12; + Item.useAnimation = Item.useTime = 12; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 3.3f; Item.knockBack = 6f; @@ -49,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Melee if (player.Calamity().saharaSlicersBolts > 0) { SoundEngine.PlaySound(SoundID.DD2_GhastlyGlaivePierce with { Pitch = 1.5f }, player.Center); - Projectile.NewProjectile(source, position, velocity * 2, ModContent.ProjectileType(), (int)(damage * 1.2), knockback * 1.2f, player.whoAmI, 1); + Projectile.NewProjectile(source, position, velocity * 2, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 1); player.Calamity().saharaSlicersBolts--; } else diff --git a/Items/Weapons/Melee/SausageMaker.cs b/Items/Weapons/Melee/SausageMaker.cs index 2ac51b673b..2147e9fc62 100644 --- a/Items/Weapons/Melee/SausageMaker.cs +++ b/Items/Weapons/Melee/SausageMaker.cs @@ -20,14 +20,13 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 44; Item.height = 42; - Item.damage = 32; + Item.damage = 27; Item.DamageType = TrueMeleeDamageClass.Instance; Item.noMelee = true; Item.useTurn = true; Item.noUseGraphic = true; - Item.useAnimation = 20; + Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.Shoot; - Item.useTime = 20; Item.knockBack = 6.25f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/SeashineSword.cs b/Items/Weapons/Melee/SeashineSword.cs index 044d2272f4..ccce612bfc 100644 --- a/Items/Weapons/Melee/SeashineSword.cs +++ b/Items/Weapons/Melee/SeashineSword.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Items.Weapons.Melee Item.CloneDefaults(ItemID.EnchantedSword); Item.width = 40; Item.height = 40; - Item.useTime = 30; - Item.damage = 25; + Item.useTime = 40; + Item.damage = 22; Item.DamageType = DamageClass.Melee; Item.value = CalamityGlobalItem.RarityGreenBuyPrice; Item.knockBack = 4f; diff --git a/Items/Weapons/Melee/Shimmerspark.cs b/Items/Weapons/Melee/Shimmerspark.cs index d4e3ce1078..17f2385ac2 100644 --- a/Items/Weapons/Melee/Shimmerspark.cs +++ b/Items/Weapons/Melee/Shimmerspark.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(6). + AddIngredient(12). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/SolsticeClaymore.cs b/Items/Weapons/Melee/SolsticeClaymore.cs index 8435cf73c5..ccaf184cfd 100644 --- a/Items/Weapons/Melee/SolsticeClaymore.cs +++ b/Items/Weapons/Melee/SolsticeClaymore.cs @@ -15,11 +15,10 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 86; Item.height = 86; - Item.damage = 300; + Item.damage = 235; Item.DamageType = DamageClass.Melee; - Item.useAnimation = 16; + Item.useAnimation = Item.useTime = 16; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 16; Item.useTurn = true; Item.knockBack = 6.5f; Item.UseSound = SoundID.Item1; @@ -76,7 +75,7 @@ namespace CalamityMod.Items.Weapons.Melee { CreateRecipe(). AddIngredient(ItemID.BeamSword). - AddIngredient(20). + AddIngredient(18). AddIngredient(ItemID.LunarBar, 5). AddIngredient(ItemID.FragmentSolar, 5). AddIngredient(ItemID.FragmentStardust, 5). diff --git a/Items/Weapons/Melee/SoulHarvester.cs b/Items/Weapons/Melee/SoulHarvester.cs index b57c559428..6db0163d71 100644 --- a/Items/Weapons/Melee/SoulHarvester.cs +++ b/Items/Weapons/Melee/SoulHarvester.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 62; Item.height = 64; - Item.damage = 85; + Item.damage = 77; Item.DamageType = DamageClass.Melee; Item.useAnimation = Item.useTime = 22; Item.useStyle = ItemUseStyleID.Swing; diff --git a/Items/Weapons/Melee/StarnightLance.cs b/Items/Weapons/Melee/StarnightLance.cs index 78aa68e9ab..0ad67fd9a5 100644 --- a/Items/Weapons/Melee/StarnightLance.cs +++ b/Items/Weapons/Melee/StarnightLance.cs @@ -20,14 +20,13 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 72; Item.height = 72; - Item.damage = 110; + Item.damage = 80; Item.DamageType = DamageClass.Melee; Item.noMelee = true; Item.useTurn = true; Item.noUseGraphic = true; - Item.useAnimation = 23; + Item.useAnimation = Item.useTime = 23; Item.useStyle = ItemUseStyleID.Shoot; - Item.useTime = 23; Item.knockBack = 6; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/StellarStriker.cs b/Items/Weapons/Melee/StellarStriker.cs index 87193b5c73..8bcd9d1bc3 100644 --- a/Items/Weapons/Melee/StellarStriker.cs +++ b/Items/Weapons/Melee/StellarStriker.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 100; Item.height = 118; - Item.damage = 123; + Item.damage = 100; Item.DamageType = TrueMeleeDamageClass.Instance; Item.useAnimation = Item.useTime = 28; diff --git a/Items/Weapons/Melee/StormSaber.cs b/Items/Weapons/Melee/StormSaber.cs index be6ac805f3..22daf62b0a 100644 --- a/Items/Weapons/Melee/StormSaber.cs +++ b/Items/Weapons/Melee/StormSaber.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 58; Item.height = 64; - Item.damage = 43; + Item.damage = 38; Item.DamageType = DamageClass.Melee; Item.useTime = Item.useAnimation = 23; Item.useTurn = true; diff --git a/Items/Weapons/Melee/StreamGouge.cs b/Items/Weapons/Melee/StreamGouge.cs index 9d6763fb07..3fe98fa071 100644 --- a/Items/Weapons/Melee/StreamGouge.cs +++ b/Items/Weapons/Melee/StreamGouge.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). + AddIngredient(10). AddTile(). Register(); } diff --git a/Items/Weapons/Melee/TeardropCleaver.cs b/Items/Weapons/Melee/TeardropCleaver.cs index e91262ae77..8ef0354eb1 100644 --- a/Items/Weapons/Melee/TeardropCleaver.cs +++ b/Items/Weapons/Melee/TeardropCleaver.cs @@ -18,11 +18,10 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 54; Item.height = 76; - Item.damage = 38; + Item.damage = 33; Item.DamageType = DamageClass.Melee; - Item.useAnimation = 24; + Item.useAnimation = Item.useTime = 24; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 24; Item.useTurn = true; Item.knockBack = 5.5f; Item.UseSound = SoundID.Item1; diff --git a/Items/Weapons/Melee/Terratomere.cs b/Items/Weapons/Melee/Terratomere.cs index f2abc131a5..7cdd7b6db4 100644 --- a/Items/Weapons/Melee/Terratomere.cs +++ b/Items/Weapons/Melee/Terratomere.cs @@ -38,10 +38,9 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 60; Item.height = 66; - Item.damage = 145; + Item.damage = 120; Item.DamageType = DamageClass.Melee; - Item.useAnimation = 21; - Item.useTime = 21; + Item.useAnimation = Item.useTime = 21; Item.useStyle = ItemUseStyleID.Swing; Item.useTurn = true; Item.knockBack = 7f; @@ -60,8 +59,7 @@ namespace CalamityMod.Items.Weapons.Melee { CreateRecipe(). AddIngredient(ItemID.TerraBlade). - AddIngredient(7). - AddIngredient(9). + AddIngredient(18). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/Terratomere.png b/Items/Weapons/Melee/Terratomere.png index a7c34d324c..254ee9cc9d 100644 Binary files a/Items/Weapons/Melee/Terratomere.png and b/Items/Weapons/Melee/Terratomere.png differ diff --git a/Items/Weapons/Melee/TheGodsGambit.cs b/Items/Weapons/Melee/TheGodsGambit.cs index e013c7fb45..f9e148a210 100644 --- a/Items/Weapons/Melee/TheGodsGambit.cs +++ b/Items/Weapons/Melee/TheGodsGambit.cs @@ -50,8 +50,8 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(18). - AddIngredient(18). + AddIngredient(14). + AddIngredient(14). AddTile(TileID.Solidifier). Register(); } diff --git a/Items/Weapons/Melee/TheMutilator.cs b/Items/Weapons/Melee/TheMutilator.cs index 1ce3d7ff66..21a885b7e9 100644 --- a/Items/Weapons/Melee/TheMutilator.cs +++ b/Items/Weapons/Melee/TheMutilator.cs @@ -85,7 +85,8 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(25). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Melee/TheObliterator.cs b/Items/Weapons/Melee/TheObliterator.cs index 6e33876710..6f22bde96d 100644 --- a/Items/Weapons/Melee/TheObliterator.cs +++ b/Items/Weapons/Melee/TheObliterator.cs @@ -38,10 +38,9 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 42; Item.height = 40; Item.DamageType = DamageClass.MeleeNoSpeed; - Item.damage = 400; + Item.damage = 370; Item.knockBack = 7.5f; - Item.useTime = 20; - Item.useAnimation = 20; + Item.useAnimation = Item.useTime = 20; Item.autoReuse = true; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Melee/TrueArkoftheAncients.cs b/Items/Weapons/Melee/TrueArkoftheAncients.cs index 965503a687..0e6047b246 100644 --- a/Items/Weapons/Melee/TrueArkoftheAncients.cs +++ b/Items/Weapons/Melee/TrueArkoftheAncients.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { Item.width = Item.height = 72; - Item.damage = 130; + Item.damage = 100; Item.DamageType = DamageClass.MeleeNoSpeed; Item.noUseGraphic = true; Item.noMelee = true; diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 0082fe6841..3ed2204089 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -48,23 +48,23 @@ namespace CalamityMod.Items.Weapons.Melee public static float EvilAttunement_SlashDamageBoost = 3f; public static int EvilAttunement_SlashIFrames = 60; - public static int ColdAttunement_BaseDamage = 140; + public static int ColdAttunement_BaseDamage = 105; public static float ColdAttunement_ThirdSwingBoost = 1.25f; public static float ColdAttunement_MistDamageReduction = 0.11f; - public static int HotAttunement_BaseDamage = 115; + public static int HotAttunement_BaseDamage = 105; public static int HotAttunement_PlayerShredIFrames = 8; public static float HotAttunement_ShotDamageBoost = 4.5f; public static int HotAttunement_LocalIFrames = 24; //Be warned its got one extra update so all the iframes should be divided in 2 public static float HotAttunement_ShredDecayRate = 0.65f; //How much charge is lost per frame. - public static int TropicalAttunement_BaseDamage = 132; + public static int TropicalAttunement_BaseDamage = 115; public static float TropicalAttunement_ChainDamageReduction = 0.6f; public static float TropicalAttunement_VineDamageReduction = 0.3f; public static float TropicalAttunement_SweetSpotDamageMultiplier = 1.5f; //It also crits, so be mindful of that public static int TropicalAttunement_LocalIFrames = 60; //Be warned its got 2 extra updates so all the iframes should be divided in 3 - public static int HolyAttunement_BaseDamage = 88; + public static int HolyAttunement_BaseDamage = 100; public static float HolyAttunement_BaseSwingDamageMult = 0.5f; public static float HolyAttunement_FullSwingDamageMult = 1f; public static float HolyAttunement_ThrowDamageBoost = 3f; @@ -207,7 +207,7 @@ namespace CalamityMod.Items.Weapons.Melee if (mainAttunement == null) return; - damage += (mainAttunement?.DamageMultiplier ?? 1f) - 1f; + damage *= (mainAttunement?.DamageMultiplier ?? 1f); } public void SafeCheckAttunements() diff --git a/Items/Weapons/Melee/Tumbleweed.cs b/Items/Weapons/Melee/Tumbleweed.cs index ec82471f8a..703a85dd56 100644 --- a/Items/Weapons/Melee/Tumbleweed.cs +++ b/Items/Weapons/Melee/Tumbleweed.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee { CreateRecipe(). AddIngredient(ItemID.Sunfury). - AddIngredient(ItemID.AncientCloth, 5). + AddIngredient(ItemID.AncientCloth, 2). AddIngredient(). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Melee/VanishingPoint.png b/Items/Weapons/Melee/VanishingPoint.png index bbf16bd646..0415214359 100644 Binary files a/Items/Weapons/Melee/VanishingPoint.png and b/Items/Weapons/Melee/VanishingPoint.png differ diff --git a/Items/Weapons/Melee/VeinBurster.cs b/Items/Weapons/Melee/VeinBurster.cs index d9e51352cd..80b5b46c21 100644 --- a/Items/Weapons/Melee/VeinBurster.cs +++ b/Items/Weapons/Melee/VeinBurster.cs @@ -19,11 +19,10 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 52; Item.height = 50; - Item.damage = 45; + Item.damage = 38; Item.DamageType = DamageClass.Melee; - Item.useAnimation = 41; + Item.useAnimation = Item.useTime = 41; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 41; Item.useTurn = true; Item.knockBack = 4.25f; Item.UseSound = SoundID.Item1; diff --git a/Items/Weapons/Melee/WindBlade.cs b/Items/Weapons/Melee/WindBlade.cs index 16c5888422..1bfa238653 100644 --- a/Items/Weapons/Melee/WindBlade.cs +++ b/Items/Weapons/Melee/WindBlade.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Weapons/Melee/YinYo.cs b/Items/Weapons/Melee/YinYo.cs index b3a233e150..4291fef569 100644 --- a/Items/Weapons/Melee/YinYo.cs +++ b/Items/Weapons/Melee/YinYo.cs @@ -40,8 +40,8 @@ namespace CalamityMod.Items.Weapons.Melee Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; - Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; - Item.rare = ItemRarityID.LightRed; + Item.value = CalamityGlobalItem.RarityPinkBuyPrice; + Item.rare = ItemRarityID.Pink; } public override void AddRecipes() diff --git a/Items/Weapons/Ranged/AcidwoodBow.cs b/Items/Weapons/Ranged/AcidwoodBow.cs index f5e8ce8ea4..1298ddd35f 100644 --- a/Items/Weapons/Ranged/AcidwoodBow.cs +++ b/Items/Weapons/Ranged/AcidwoodBow.cs @@ -9,22 +9,11 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetDefaults() { - Item.damage = 8; - Item.DamageType = DamageClass.Ranged; + Item.CloneDefaults(ItemID.ShadewoodBow); // Ash Wood > Acidwood > Shadewood Item.width = 20; Item.height = 50; - Item.useTime = 27; - Item.useAnimation = 27; - Item.useStyle = ItemUseStyleID.Shoot; - Item.noMelee = true; - Item.knockBack = 0f; - Item.value = CalamityGlobalItem.RarityWhiteBuyPrice; - Item.rare = ItemRarityID.White; - Item.UseSound = SoundID.Item5; - Item.autoReuse = true; - Item.shoot = ProjectileID.WoodenArrowFriendly; - Item.shootSpeed = 6.6f; - Item.useAmmo = AmmoID.Arrow; + Item.damage = 9; + Item.useAnimation = Item.useTime = 27; } public override void AddRecipes() diff --git a/Items/Weapons/Ranged/ArterialAssault.cs b/Items/Weapons/Ranged/ArterialAssault.cs index 33961056b5..e86945b1fe 100644 --- a/Items/Weapons/Ranged/ArterialAssault.cs +++ b/Items/Weapons/Ranged/ArterialAssault.cs @@ -54,7 +54,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(25). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Ranged/AstralBlaster.cs b/Items/Weapons/Ranged/AstralBlaster.cs index 573607889b..84af8eb4a7 100644 --- a/Items/Weapons/Ranged/AstralBlaster.cs +++ b/Items/Weapons/Ranged/AstralBlaster.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(6). + AddIngredient(12). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Weapons/Ranged/Auralis.cs b/Items/Weapons/Ranged/Auralis.cs index f396e088ac..6af713f90c 100644 --- a/Items/Weapons/Ranged/Auralis.cs +++ b/Items/Weapons/Ranged/Auralis.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Items.Weapons.Ranged { CreateRecipe(). AddIngredient(ItemID.SniperRifle). - AddIngredient(5). + AddIngredient(10). AddIngredient(5). AddIngredient(50). AddTile(TileID.MythrilAnvil). diff --git a/Items/Weapons/Ranged/BladedgeRailbow.cs b/Items/Weapons/Ranged/BladedgeRailbow.cs index d0876e9c16..bc278a0a96 100644 --- a/Items/Weapons/Ranged/BladedgeRailbow.cs +++ b/Items/Weapons/Ranged/BladedgeRailbow.cs @@ -169,7 +169,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Ranged/BloodBoiler.cs b/Items/Weapons/Ranged/BloodBoiler.cs index 24a1259bde..160d988ff9 100644 --- a/Items/Weapons/Ranged/BloodBoiler.cs +++ b/Items/Weapons/Ranged/BloodBoiler.cs @@ -65,7 +65,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(6). + AddIngredient(25). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Ranged/BrimstoneFury.cs b/Items/Weapons/Ranged/BrimstoneFury.cs index d624424177..c3445ed0cb 100644 --- a/Items/Weapons/Ranged/BrimstoneFury.cs +++ b/Items/Weapons/Ranged/BrimstoneFury.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(5). + AddIngredient(8). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Ranged/CleansingBlaze.cs b/Items/Weapons/Ranged/CleansingBlaze.cs index 80a3ed689c..d29929e79c 100644 --- a/Items/Weapons/Ranged/CleansingBlaze.cs +++ b/Items/Weapons/Ranged/CleansingBlaze.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). + AddIngredient(10). AddTile(). Register(); } diff --git a/Items/Weapons/Ranged/DarkechoGreatbow.cs b/Items/Weapons/Ranged/DarkechoGreatbow.cs index d08fcdd342..5804c8d40b 100644 --- a/Items/Weapons/Ranged/DarkechoGreatbow.cs +++ b/Items/Weapons/Ranged/DarkechoGreatbow.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(8). + AddIngredient(12). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Ranged/DriftwoodBow.cs b/Items/Weapons/Ranged/DriftwoodBow.cs index f25de79fa3..a8bfded9cc 100644 --- a/Items/Weapons/Ranged/DriftwoodBow.cs +++ b/Items/Weapons/Ranged/DriftwoodBow.cs @@ -12,29 +12,16 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 10; - Item.DamageType = DamageClass.Ranged; + Item.CloneDefaults(ItemID.ShadewoodBow); // Driftwood (base) = Shadewood Item.width = 22; Item.height = 42; - Item.useTime = 28; - Item.useAnimation = 28; - Item.useStyle = ItemUseStyleID.Shoot; - Item.noMelee = true; - Item.knockBack = 0f; - Item.value = CalamityGlobalItem.RarityWhiteBuyPrice; - Item.rare = ItemRarityID.White; - Item.UseSound = SoundID.Item5; - Item.autoReuse = true; - Item.shoot = ProjectileID.WoodenArrowFriendly; - Item.shootSpeed = 6.6f; - Item.useAmmo = AmmoID.Arrow; } public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback) { if (player.Calamity().countsAsAnyWet) { - velocity *= 1.3f; + velocity *= 1.2f; knockback += 1f; for (int i = 0; i <= 18; i++) diff --git a/Items/Weapons/Ranged/Galeforce.cs b/Items/Weapons/Ranged/Galeforce.cs index 5f76492ce8..90c21a16bf 100644 --- a/Items/Weapons/Ranged/Galeforce.cs +++ b/Items/Weapons/Ranged/Galeforce.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Weapons/Ranged/Goobow.cs b/Items/Weapons/Ranged/Goobow.cs index 5f0fd31abf..6a2834a6b9 100644 --- a/Items/Weapons/Ranged/Goobow.cs +++ b/Items/Weapons/Ranged/Goobow.cs @@ -63,8 +63,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(18). - AddIngredient(18). + AddIngredient(14). + AddIngredient(14). AddTile(TileID.Solidifier). Register(); } diff --git a/Items/Weapons/Ranged/GunkShot.cs b/Items/Weapons/Ranged/GunkShot.cs index 2db7216cbd..35a0e2ed99 100644 --- a/Items/Weapons/Ranged/GunkShot.cs +++ b/Items/Weapons/Ranged/GunkShot.cs @@ -50,8 +50,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(18). - AddIngredient(18). + AddIngredient(14). + AddIngredient(14). AddTile(TileID.Solidifier). Register(); } diff --git a/Items/Weapons/Ranged/HalleysInferno.cs b/Items/Weapons/Ranged/HalleysInferno.cs index 791aaa307d..448ade2543 100644 --- a/Items/Weapons/Ranged/HalleysInferno.cs +++ b/Items/Weapons/Ranged/HalleysInferno.cs @@ -1,4 +1,5 @@ -using System.Linq; +using System.Collections.Generic; +using System.Linq; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; using CalamityMod.Projectiles.Ranged; @@ -20,13 +21,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.5f; + public static float MaxStarburstPerStar => 0.25f; public static float LostAccuracyPerMiss => 4; public static float MaxAccuracy => 50; - public static float StarburstDmgMult => 2.5f; + public static float StarburstDmgMult => 2f; - public static float StarburstVelMult => 0.75f; + public static float StarburstVelMult => 1f; public override void SetDefaults() { Item.width = 84; @@ -59,6 +60,8 @@ namespace CalamityMod.Items.Weapons.Ranged ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } + public override void ModifyTooltips(List tooltips) => tooltips.IntegrateDynamicHotkey(Item); + public override void HoldItem(Player player) { if (player.mount.Type == MountID.Drill) @@ -84,9 +87,9 @@ namespace CalamityMod.Items.Weapons.Ranged { CreateRecipe(). AddIngredient(ItemID.ElfMelter). - AddIngredient(6). + AddIngredient(8). AddIngredient(4). - AddIngredient(12). + AddIngredient(20). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Ranged/HandheldTank.cs b/Items/Weapons/Ranged/HandheldTank.cs index 18c4fd76dd..1fed8279be 100644 --- a/Items/Weapons/Ranged/HandheldTank.cs +++ b/Items/Weapons/Ranged/HandheldTank.cs @@ -52,7 +52,6 @@ namespace CalamityMod.Items.Weapons.Ranged AddIngredient(ItemID.RocketLauncher). AddRecipeGroup("IronBar", 50). AddIngredient(5). - AddIngredient(ItemID.TigerSkin). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Ranged/Helstorm.cs b/Items/Weapons/Ranged/Helstorm.cs index 9f58bbae14..06b341f13b 100644 --- a/Items/Weapons/Ranged/Helstorm.cs +++ b/Items/Weapons/Ranged/Helstorm.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Ranged/MarksmanBow.cs b/Items/Weapons/Ranged/MarksmanBow.cs index 70ef2d68d4..d186f86242 100644 --- a/Items/Weapons/Ranged/MarksmanBow.cs +++ b/Items/Weapons/Ranged/MarksmanBow.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(ItemID.Ectoplasm, 31). + AddIngredient(ItemID.Ectoplasm, 13). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Ranged/MonolithBow.cs b/Items/Weapons/Ranged/MonolithBow.cs index be48baab00..88a67cf331 100644 --- a/Items/Weapons/Ranged/MonolithBow.cs +++ b/Items/Weapons/Ranged/MonolithBow.cs @@ -13,24 +13,16 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetDefaults() { - Item.damage = 19; - Item.DamageType = DamageClass.Ranged; + Item.CloneDefaults(ItemID.PearlwoodBow); // Monolith >= Pearlwood Item.width = 24; Item.height = 54; + Item.damage = 19; Item.useTime = 5; Item.useAnimation = 20; + Item.useLimitPerAnimation = 4; Item.reuseDelay = 25; - Item.useStyle = ItemUseStyleID.Shoot; - Item.noMelee = true; - Item.knockBack = 0f; - Item.value = CalamityGlobalItem.RarityOrangeBuyPrice; - Item.rare = ItemRarityID.Orange; - Item.UseSound = SoundID.Item5; - Item.autoReuse = true; - Item.shoot = ProjectileID.WoodenArrowFriendly; - Item.shootSpeed = 9f; - Item.useAmmo = AmmoID.Arrow; Item.consumeAmmoOnFirstShotOnly = true; + Item.shootSpeed = 9f; } 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/OverloadedBlaster.cs b/Items/Weapons/Ranged/OverloadedBlaster.cs index 66e42a42cc..ef8f145ad3 100644 --- a/Items/Weapons/Ranged/OverloadedBlaster.cs +++ b/Items/Weapons/Ranged/OverloadedBlaster.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Systems.Collections; using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; using Terraria; @@ -15,6 +15,10 @@ namespace CalamityMod.Items.Weapons.Ranged public static int AmmoSavedPercent = 25; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent); + public override void SetStaticDefaults() + { + CalamityItemSets.ExtraDebuffTooltip_Enemy[Type] = [BuffID.Slimed]; + } public override void SetDefaults() { Item.width = 42; diff --git a/Items/Weapons/Ranged/PolarisParrotfish.cs b/Items/Weapons/Ranged/PolarisParrotfish.cs index fa94b9ccb1..ba634aedc2 100644 --- a/Items/Weapons/Ranged/PolarisParrotfish.cs +++ b/Items/Weapons/Ranged/PolarisParrotfish.cs @@ -40,8 +40,8 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 0.5f; - Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; - Item.rare = ItemRarityID.LightRed; + Item.value = CalamityGlobalItem.RarityPinkBuyPrice; + Item.rare = ItemRarityID.Pink; Item.UseSound = null; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/Sandblaster.cs b/Items/Weapons/Ranged/Sandblaster.cs index b48742dd8c..3a011bec2d 100644 --- a/Items/Weapons/Ranged/Sandblaster.cs +++ b/Items/Weapons/Ranged/Sandblaster.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Ranged { CreateRecipe(). AddIngredient(ItemID.Sandgun). - AddIngredient(ItemID.AncientCloth, 5). + AddIngredient(ItemID.AncientCloth, 2). AddIngredient(). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Ranged/Spyker.cs b/Items/Weapons/Ranged/Spyker.cs index 739a788ce0..efae713b12 100644 --- a/Items/Weapons/Ranged/Spyker.cs +++ b/Items/Weapons/Ranged/Spyker.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Weapons.Ranged CreateRecipe(). AddIngredient(). AddIngredient(ItemID.Stynger). - AddIngredient(5). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Ranged/TheBallista.cs b/Items/Weapons/Ranged/TheBallista.cs index 17cf943732..9d2fa67877 100644 --- a/Items/Weapons/Ranged/TheBallista.cs +++ b/Items/Weapons/Ranged/TheBallista.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Ranged CreateRecipe(). AddIngredient(ItemID.Marrow). AddIngredient(ItemID.AncientBattleArmorMaterial). - AddIngredient(ItemID.Ectoplasm, 10). + AddIngredient(ItemID.Ectoplasm, 5). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Rogue/AshenStalactite.cs b/Items/Weapons/Rogue/AshenStalactite.cs index 38d580285a..8a0a47e69b 100644 --- a/Items/Weapons/Rogue/AshenStalactite.cs +++ b/Items/Weapons/Rogue/AshenStalactite.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.maxStack = 1; - Item.value = CalamityGlobalItem.RarityOrangeBuyPrice / 4; // This buy price is intentionally reduced due to how common this item is. + Item.value = CalamityGlobalItem.RarityOrangeBuyPrice; Item.rare = ItemRarityID.Orange; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; diff --git a/Items/Weapons/Rogue/AshenStalactite.png b/Items/Weapons/Rogue/AshenStalactite.png index 7eda8b46b2..2ddb0b93b3 100644 Binary files a/Items/Weapons/Rogue/AshenStalactite.png and b/Items/Weapons/Rogue/AshenStalactite.png differ diff --git a/Items/Weapons/Rogue/BlazingStar.cs b/Items/Weapons/Rogue/BlazingStar.cs index 10e95bab7c..30d2d10d08 100644 --- a/Items/Weapons/Rogue/BlazingStar.cs +++ b/Items/Weapons/Rogue/BlazingStar.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useAnimation = 15; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 3; - Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; - Item.rare = ItemRarityID.LightRed; + Item.value = CalamityGlobalItem.RarityPinkBuyPrice; + Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item1; Item.shootSpeed = 13f; diff --git a/Items/Weapons/Rogue/BloodsoakedCrasher.cs b/Items/Weapons/Rogue/BloodsoakedCrasher.cs index 54c1b8412e..0949dd04a3 100644 --- a/Items/Weapons/Rogue/BloodsoakedCrasher.cs +++ b/Items/Weapons/Rogue/BloodsoakedCrasher.cs @@ -49,7 +49,8 @@ namespace CalamityMod.Items.Weapons.Rogue { CreateRecipe(). AddIngredient(). - AddIngredient(12). + AddIngredient(25). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Rogue/Brimblade.cs b/Items/Weapons/Rogue/Brimblade.cs index 371e0343d0..7d2fe567fc 100644 --- a/Items/Weapons/Rogue/Brimblade.cs +++ b/Items/Weapons/Rogue/Brimblade.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(4). + AddIngredient(8). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Rogue/CrystalPiercer.cs b/Items/Weapons/Rogue/CrystalPiercer.cs index 04a79f2125..979ee8335c 100644 --- a/Items/Weapons/Rogue/CrystalPiercer.cs +++ b/Items/Weapons/Rogue/CrystalPiercer.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(8). + AddIngredient(12). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Rogue/DuststormInABottle.cs b/Items/Weapons/Rogue/DuststormInABottle.cs index b93e62e28a..db7e555a0d 100644 --- a/Items/Weapons/Rogue/DuststormInABottle.cs +++ b/Items/Weapons/Rogue/DuststormInABottle.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Rogue { CreateRecipe(). AddIngredient(). - AddIngredient(ItemID.AncientCloth,5). + AddIngredient(ItemID.AncientCloth, 2). AddIngredient(). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Rogue/Equanimity.cs b/Items/Weapons/Rogue/Equanimity.cs index a53b430182..0768922c81 100644 --- a/Items/Weapons/Rogue/Equanimity.cs +++ b/Items/Weapons/Rogue/Equanimity.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.maxStack = 1; - Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; - Item.rare = ItemRarityID.LightRed; + Item.value = CalamityGlobalItem.RarityPinkBuyPrice; + Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 3f; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Rogue/ExecutionersBlade.cs b/Items/Weapons/Rogue/ExecutionersBlade.cs index 14849ad47c..d77d5dda00 100644 --- a/Items/Weapons/Rogue/ExecutionersBlade.cs +++ b/Items/Weapons/Rogue/ExecutionersBlade.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). + AddIngredient(10). AddTile(). Register(); } diff --git a/Items/Weapons/Rogue/FantasyTalisman.cs b/Items/Weapons/Rogue/FantasyTalisman.cs index 8b7f5a9494..8d27d06a14 100644 --- a/Items/Weapons/Rogue/FantasyTalisman.cs +++ b/Items/Weapons/Rogue/FantasyTalisman.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 6f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = CalamityGlobalItem.RarityLimeBuyPrice; - Item.rare = ItemRarityID.Lime; + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; + Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 18f; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Rogue/FeatherKnife.cs b/Items/Weapons/Rogue/FeatherKnife.cs index 9a28caea5e..950c0fe3bd 100644 --- a/Items/Weapons/Rogue/FeatherKnife.cs +++ b/Items/Weapons/Rogue/FeatherKnife.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Weapons/Rogue/FrostcrushValari.cs b/Items/Weapons/Rogue/FrostcrushValari.cs index 1f8298046b..b04572e037 100644 --- a/Items/Weapons/Rogue/FrostcrushValari.cs +++ b/Items/Weapons/Rogue/FrostcrushValari.cs @@ -27,8 +27,8 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useTime = Item.useAnimation = 19; Item.knockBack = 12; - Item.value = CalamityGlobalItem.RarityLimeBuyPrice; - Item.rare = ItemRarityID.Lime; + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; + Item.rare = ItemRarityID.Yellow; Item.useStyle = ItemUseStyleID.Swing; Item.UseSound = SoundID.Item1; Item.autoReuse = true; @@ -58,7 +58,6 @@ namespace CalamityMod.Items.Weapons.Rogue CreateRecipe(). AddIngredient(). AddIngredient(6). - AddIngredient(40). AddIngredient(ItemID.Ectoplasm, 5). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Rogue/GelDart.cs b/Items/Weapons/Rogue/GelDart.cs index f3d4a13f8e..d64cca2580 100644 --- a/Items/Weapons/Rogue/GelDart.cs +++ b/Items/Weapons/Rogue/GelDart.cs @@ -51,8 +51,8 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(18). - AddIngredient(18). + AddIngredient(14). + AddIngredient(14). AddTile(TileID.Solidifier). Register(); } diff --git a/Items/Weapons/Rogue/GodsParanoia.cs b/Items/Weapons/Rogue/GodsParanoia.cs index d673dd0cfe..dd6c45755b 100644 --- a/Items/Weapons/Rogue/GodsParanoia.cs +++ b/Items/Weapons/Rogue/GodsParanoia.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). + AddIngredient(10). AddTile(). Register(); } diff --git a/Items/Weapons/Rogue/MangroveChakram.cs b/Items/Weapons/Rogue/MangroveChakram.cs index 1e923764aa..ea3b6e9366 100644 --- a/Items/Weapons/Rogue/MangroveChakram.cs +++ b/Items/Weapons/Rogue/MangroveChakram.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Rogue/PhantasmalRuin.cs b/Items/Weapons/Rogue/PhantasmalRuin.cs index 1132a4b5fe..66921cfda3 100644 --- a/Items/Weapons/Rogue/PhantasmalRuin.cs +++ b/Items/Weapons/Rogue/PhantasmalRuin.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.DamageType = RogueDamageClass.Instance; - Item.value = CalamityGlobalItem.RarityLimeBuyPrice; - Item.rare = ItemRarityID.Lime; + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; + Item.rare = ItemRarityID.Yellow; } public override float StealthDamageMultiplier => 1.2f; diff --git a/Items/Weapons/Rogue/RadiantStar.cs b/Items/Weapons/Rogue/RadiantStar.cs index 3b22c78a60..0e75b055cc 100644 --- a/Items/Weapons/Rogue/RadiantStar.cs +++ b/Items/Weapons/Rogue/RadiantStar.cs @@ -46,9 +46,9 @@ namespace CalamityMod.Items.Weapons.Rogue { CreateRecipe(). AddIngredient(). - AddIngredient(10). - AddIngredient(15). + AddIngredient(12). AddIngredient(ItemID.FallenStar, 10). + AddIngredient(15). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Weapons/Rogue/ScarletDevil.cs b/Items/Weapons/Rogue/ScarletDevil.cs index ddaac460be..29021adc2b 100644 --- a/Items/Weapons/Rogue/ScarletDevil.cs +++ b/Items/Weapons/Rogue/ScarletDevil.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Rogue AddIngredient(). AddIngredient(). AddIngredient(5). - AddIngredient(15). + AddIngredient(50). AddIngredient(ItemID.SoulofNight, 15). AddTile(). Register(); diff --git a/Items/Weapons/Rogue/SubductionSlicer.cs b/Items/Weapons/Rogue/SubductionSlicer.cs index 1e806a465d..a39e0a8309 100644 --- a/Items/Weapons/Rogue/SubductionSlicer.cs +++ b/Items/Weapons/Rogue/SubductionSlicer.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(9). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Rogue/Turbulance.cs b/Items/Weapons/Rogue/Turbulance.cs index 732db8f0bb..ed42fa8382 100644 --- a/Items/Weapons/Rogue/Turbulance.cs +++ b/Items/Weapons/Rogue/Turbulance.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(7). + AddIngredient(10). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Weapons/Rogue/Vega.cs b/Items/Weapons/Rogue/Vega.cs index b38e1d4c78..8625b8c2a5 100644 --- a/Items/Weapons/Rogue/Vega.cs +++ b/Items/Weapons/Rogue/Vega.cs @@ -90,9 +90,9 @@ namespace CalamityMod.Items.Weapons.Rogue { CreateRecipe(). AddIngredient(). - AddIngredient(7). + AddIngredient(8). AddIngredient(4). - AddIngredient(12). + AddIngredient(20). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Summon/AbandonedSlimeStaff.cs b/Items/Weapons/Summon/AbandonedSlimeStaff.cs index d64c3cd5e1..75d762aae0 100644 --- a/Items/Weapons/Summon/AbandonedSlimeStaff.cs +++ b/Items/Weapons/Summon/AbandonedSlimeStaff.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Summon { player.AddBuff(Item.buffType, 2); CalamityUtils.KillShootProjectiles(true, type, player); - float damageMult = ((float)Math.Log(slimeSlots, 8f)) + 1f; + float damageMult = 0.8f + slimeSlots * 0.2f; var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, (int)(damage * damageMult), knockback, player.whoAmI); minion.originalDamage = (int)(Item.damage * damageMult); minion.minionSlots = slimeSlots; diff --git a/Items/Weapons/Summon/AmphibiansGuitar.cs b/Items/Weapons/Summon/AmphibiansGuitar.cs index 4f7e937905..2d8af9fcac 100644 --- a/Items/Weapons/Summon/AmphibiansGuitar.cs +++ b/Items/Weapons/Summon/AmphibiansGuitar.cs @@ -37,8 +37,8 @@ namespace CalamityMod.Items.Weapons.Summon CreateRecipe(). AddIngredient(ItemID.TheAxe). AddIngredient(ItemID.Frog). - AddIngredient(3). AddIngredient(8). + AddIngredient(3). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Summon/AresExoskeleton.cs b/Items/Weapons/Summon/AresExoskeleton.cs index dee0622c01..f96f0909cb 100644 --- a/Items/Weapons/Summon/AresExoskeleton.cs +++ b/Items/Weapons/Summon/AresExoskeleton.cs @@ -21,9 +21,9 @@ namespace CalamityMod.Items.Weapons.Summon public const int PlasmaCannonShootRate = 30; - public const int TeslaCannonShootRate = 36; + public const int TeslaCannonShootRate = 42; - public const int LaserCannonNormalShootRate = 15; + public const int LaserCannonNormalShootRate = 12; public const int GaussNukeShootRate = 240; @@ -31,13 +31,13 @@ namespace CalamityMod.Items.Weapons.Summon public const float MinionSlotsPerCannon = 3f; - public const float PlasmaCannonBlastFactor = 0.9f; + public const float PlasmaCannonBlastFactor = 1f; // Multiple orbs can arc together when there are 2+ tesla cannons, resulting in a LOT of hits. // The local i-frames are also quite high to combat this problem. public const float TeslaOrbDamageFactor = 1f; - public const float LaserDamageFactor = 1.1f; + public const float LaserDamageFactor = 1f; public const float NukeDamageFactor = 1f; @@ -75,7 +75,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = Item.height = 36; Item.mana = 80; - Item.damage = 625; + Item.damage = 550; Item.useStyle = ItemUseStyleID.HoldUp; Item.noUseGraphic = true; Item.useAnimation = Item.useTime = 24; diff --git a/Items/Weapons/Summon/DragonbloodDisgorger.cs b/Items/Weapons/Summon/DragonbloodDisgorger.cs index cc8c614086..e7e5a5cf31 100644 --- a/Items/Weapons/Summon/DragonbloodDisgorger.cs +++ b/Items/Weapons/Summon/DragonbloodDisgorger.cs @@ -53,7 +53,8 @@ namespace CalamityMod.Items.Weapons.Summon public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). + AddIngredient(25). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Summon/EntropysVigil.cs b/Items/Weapons/Summon/EntropysVigil.cs index 3708030c8d..66ddde39a1 100644 --- a/Items/Weapons/Summon/EntropysVigil.cs +++ b/Items/Weapons/Summon/EntropysVigil.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 52; Item.height = 52; - Item.damage = 42; + Item.damage = 38; Item.DamageType = DamageClass.Summon; Item.buffType = ModContent.BuffType(); Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/FleshOfInfidelity.cs b/Items/Weapons/Summon/FleshOfInfidelity.cs index 37ee050f6a..3204722a8c 100644 --- a/Items/Weapons/Summon/FleshOfInfidelity.cs +++ b/Items/Weapons/Summon/FleshOfInfidelity.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 42; Item.height = 42; - Item.damage = 16; + Item.damage = 14; Item.DamageType = DamageClass.Summon; Item.buffType = ModContent.BuffType(); Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/FrostBlossomStaff.cs b/Items/Weapons/Summon/FrostBlossomStaff.cs index 798bceb466..38a48495d1 100644 --- a/Items/Weapons/Summon/FrostBlossomStaff.cs +++ b/Items/Weapons/Summon/FrostBlossomStaff.cs @@ -12,10 +12,6 @@ namespace CalamityMod.Items.Weapons.Summon public class FrostBlossomStaff : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Summon"; - public override void SetStaticDefaults() - { - CalamityItemSets.ExtraDebuffTooltip_Enemy[Type] = [BuffID.Frostburn]; - } public override void SetDefaults() { Item.width = 34; diff --git a/Items/Weapons/Summon/IgneousExaltation.cs b/Items/Weapons/Summon/IgneousExaltation.cs index 3b829ede05..9096dadb73 100644 --- a/Items/Weapons/Summon/IgneousExaltation.cs +++ b/Items/Weapons/Summon/IgneousExaltation.cs @@ -1,4 +1,5 @@ -using CalamityMod.Buffs.Summon; +using System.Collections.Generic; +using CalamityMod.Buffs.Summon; using CalamityMod.Items.Materials; using CalamityMod.Packets; using CalamityMod.Projectiles.Summon; @@ -61,20 +62,16 @@ namespace CalamityMod.Items.Weapons.Summon Item.DamageType = DamageClass.Summon; } - public override bool CanRightClick() + public override void HoldItem(Player player) { - if (!Main.keyState.PressingShift()) - return false; - return true; + if (Main.myPlayer == player.whoAmI && Item.JustPressedKeybind()) + { + Main.LocalPlayer.Calamity().InvertExaltationLineRotationDirections = !Main.LocalPlayer.Calamity().InvertExaltationLineRotationDirections; + if (Main.netMode != NetmodeID.SinglePlayer) + ExaltationDirectionSyncPacket.Send(Main.LocalPlayer.Calamity()); + } } - public override void RightClick(Player player) - { - Main.LocalPlayer.Calamity().InvertExaltationLineRotationDirections = !Main.LocalPlayer.Calamity().InvertExaltationLineRotationDirections; - if (Main.netMode != NetmodeID.SinglePlayer) - ExaltationDirectionSyncPacket.Send(Main.LocalPlayer.Calamity()); - } - - public override bool ConsumeItem(Player player) => false; + public override void ModifyTooltips(List tooltips) => tooltips.IntegrateDynamicHotkey(Item); public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { @@ -140,8 +137,8 @@ namespace CalamityMod.Items.Weapons.Summon public override void AddRecipes() { CreateRecipe(). - AddIngredient(10). - AddIngredient(5). + AddIngredient(8). + AddIngredient(8). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Summon/MirrorofKalandra.cs b/Items/Weapons/Summon/MirrorofKalandra.cs index b79de9d2a3..12404e5013 100644 --- a/Items/Weapons/Summon/MirrorofKalandra.cs +++ b/Items/Weapons/Summon/MirrorofKalandra.cs @@ -96,14 +96,14 @@ namespace CalamityMod.Items.Weapons.Summon { CreateRecipe(). AddIngredient(ItemID.MagicMirror). - AddIngredient(10). + AddIngredient(8). AddIngredient(10). AddCondition(Condition.NearShimmer). Register(); CreateRecipe(). AddIngredient(ItemID.IceMirror). - AddIngredient(10). + AddIngredient(8). AddIngredient(10). AddCondition(Condition.NearShimmer). Register(); diff --git a/Items/Weapons/Summon/ResurrectionButterfly.cs b/Items/Weapons/Summon/ResurrectionButterfly.cs index 1e684ca31e..ed7dba5116 100644 --- a/Items/Weapons/Summon/ResurrectionButterfly.cs +++ b/Items/Weapons/Summon/ResurrectionButterfly.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Items.Weapons.Summon AddIngredient(5). AddIngredient(ItemID.ButterflyDust, 2). AddIngredient(ItemID.Silk, 40). - AddIngredient(ItemID.Ectoplasm, 20). + AddIngredient(ItemID.Ectoplasm, 5). AddTile(TileID.Loom). Register(); } diff --git a/Items/Weapons/Summon/SandSharknadoStaff.cs b/Items/Weapons/Summon/SandSharknadoStaff.cs index 884350d5e0..c93805c979 100644 --- a/Items/Weapons/Summon/SandSharknadoStaff.cs +++ b/Items/Weapons/Summon/SandSharknadoStaff.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 48; Item.height = 56; - Item.damage = 71; + Item.damage = 60; Item.knockBack = 2f; Item.mana = 10; @@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Summon { CreateRecipe(). AddIngredient(). - AddIngredient(ItemID.AncientCloth, 5). + AddIngredient(ItemID.AncientCloth, 2). AddIngredient(). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Summon/ScabRipper.cs b/Items/Weapons/Summon/ScabRipper.cs index 539d0a401b..1f0fed5cdd 100644 --- a/Items/Weapons/Summon/ScabRipper.cs +++ b/Items/Weapons/Summon/ScabRipper.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 66; Item.height = 70; - Item.damage = 15; + Item.damage = 10; Item.mana = 10; Item.useAnimation = Item.useTime = 36; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Summon/Sirius.cs b/Items/Weapons/Summon/Sirius.cs index 9eb6828716..26db2bac93 100644 --- a/Items/Weapons/Summon/Sirius.cs +++ b/Items/Weapons/Summon/Sirius.cs @@ -65,9 +65,9 @@ namespace CalamityMod.Items.Weapons.Summon { CreateRecipe(). AddIngredient(). - AddIngredient(5). - AddIngredient(2). - AddIngredient(12). + AddIngredient(8). + AddIngredient(4). + AddIngredient(20). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Summon/SlimePuppetStaff.cs b/Items/Weapons/Summon/SlimePuppetStaff.cs index 571993ea24..1823d77cd1 100644 --- a/Items/Weapons/Summon/SlimePuppetStaff.cs +++ b/Items/Weapons/Summon/SlimePuppetStaff.cs @@ -52,8 +52,8 @@ namespace CalamityMod.Items.Weapons.Summon public override void AddRecipes() { CreateRecipe(). - AddIngredient(18). - AddIngredient(18). + AddIngredient(14). + AddIngredient(14). AddTile(TileID.Solidifier). Register(); } diff --git a/Items/Weapons/Summon/VileFeeder.cs b/Items/Weapons/Summon/VileFeeder.cs index 1bd661c128..a84b85e78f 100644 --- a/Items/Weapons/Summon/VileFeeder.cs +++ b/Items/Weapons/Summon/VileFeeder.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 40; Item.height = 36; - Item.damage = 15; + Item.damage = 10; Item.DamageType = DamageClass.Summon; Item.buffType = ModContent.BuffType(); Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/ViralSprout.cs b/Items/Weapons/Summon/ViralSprout.cs index 0fe8274228..dfd28bbb38 100644 --- a/Items/Weapons/Summon/ViralSprout.cs +++ b/Items/Weapons/Summon/ViralSprout.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Summon/ViridVanguard.cs b/Items/Weapons/Summon/ViridVanguard.cs index 82968c717c..9e8e2d62f3 100644 --- a/Items/Weapons/Summon/ViridVanguard.cs +++ b/Items/Weapons/Summon/ViridVanguard.cs @@ -1,4 +1,5 @@ -using CalamityMod.Buffs.Summon; +using System.Collections.Generic; +using CalamityMod.Buffs.Summon; using CalamityMod.Items.Materials; using CalamityMod.Packets; using CalamityMod.Projectiles.Summon; @@ -92,21 +93,17 @@ namespace CalamityMod.Items.Weapons.Summon Item.shoot = ModContent.ProjectileType(); Item.rare = ModContent.RarityType(); } - - public override bool CanRightClick() + public override void HoldItem(Player player) { - if (!Main.keyState.PressingShift()) - return false; - return true; - } - public override void RightClick(Player player) - { - Main.LocalPlayer.Calamity().InvertExaltationLineRotationDirections = !Main.LocalPlayer.Calamity().InvertExaltationLineRotationDirections; - if (Main.netMode != NetmodeID.SinglePlayer) - ExaltationDirectionSyncPacket.Send(Main.LocalPlayer.Calamity()); + if (Main.myPlayer == player.whoAmI && Item.JustPressedKeybind()) + { + Main.LocalPlayer.Calamity().InvertExaltationLineRotationDirections = !Main.LocalPlayer.Calamity().InvertExaltationLineRotationDirections; + if (Main.netMode != NetmodeID.SinglePlayer) + ExaltationDirectionSyncPacket.Send(Main.LocalPlayer.Calamity()); + } } - public override bool ConsumeItem(Player player) => false; + public override void ModifyTooltips(List tooltips) => tooltips.IntegrateDynamicHotkey(Item); public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) { @@ -171,7 +168,7 @@ namespace CalamityMod.Items.Weapons.Summon CreateRecipe(). AddIngredient(). AddIngredient(). - AddIngredient(15). + AddIngredient(12). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Summon/VoidConcentrationStaff.cs b/Items/Weapons/Summon/VoidConcentrationStaff.cs index 0a1cc384ab..7ca32eca2f 100644 --- a/Items/Weapons/Summon/VoidConcentrationStaff.cs +++ b/Items/Weapons/Summon/VoidConcentrationStaff.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Linq; using CalamityMod.Buffs.Summon; using CalamityMod.CalPlayer; @@ -12,7 +11,6 @@ using CalamityMod.Particles; using CalamityMod.Projectiles.Magic; using CalamityMod.Projectiles.Summon; using CalamityMod.Rarities; -using CalamityMod.Systems.Collections; using CalamityMod.Utilities.Daybreak; using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; @@ -30,16 +28,17 @@ namespace CalamityMod.Items.Weapons.Summon public class VoidConcentrationStaff : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Summon"; + public static float SummonerTagEffectiveness => 1.67f; public static SummonTag summonTag = new SummonTag() { - MultiplicativeTagDamage = 0.25f, //Percentage of damage dealt added by the void. This is doubled by summons. This was tested - 1.5x was too weak to be worth 4 slots. <-- (nvm) + MultiplicativeTagDamage = 0.3f, AllowsWhipStacking = true, TagOnHit = tagOnHit, TagModifyHitEffects = SummonTag.BlankTagModifyHit, AutoDrawTooltip = false }; - public static void tagOnHit(NPC npc, Projectile projectile, NPC.HitInfo hit, int damageDone) => npc.GetGlobalNPC().StoredDamage += (int)(damageDone); + public static void tagOnHit(NPC npc, Projectile projectile, NPC.HitInfo hit, int damageDone) => npc.GetGlobalNPC().StoredDamage += (int)(damageDone * (SummonerTagEffectiveness - 1)); public override void SetStaticDefaults() { ItemID.Sets.StaffMinionSlotsRequired[Type] = 4f; @@ -65,30 +64,28 @@ namespace CalamityMod.Items.Weapons.Summon public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - if (player.altFunctionUse != 2) + foreach (var item in Main.ActiveProjectiles) { - foreach (var item in Main.ActiveProjectiles) - { - if (item.type == ModContent.ProjectileType()) - item.Kill(); - } - if (player.ownedProjectileCounts[ModContent.ProjectileType()] == 0) - Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI); + if (item.type == ModContent.ProjectileType()) + item.Kill(); } - else + if (player.ownedProjectileCounts[ModContent.ProjectileType()] == 0) + { + { + Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI); + player.ownedProjectileCounts[ModContent.ProjectileType()]++; //update it instantly so it's read properly later in the same update + } + } + if (player.altFunctionUse == 2) { player.MinionNPCTargetAim(true); if (player.MinionAttackTargetNPC >= 0) { var target = Main.npc[player.MinionAttackTargetNPC]; - foreach (var item in Main.ActiveProjectiles) - { - if (item.type == ModContent.ProjectileType()) - item.Kill(); - } Projectile.NewProjectileDirect(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI, target.whoAmI); } } + return false; } public override bool AltFunctionUse(Player player) => true; @@ -284,12 +281,12 @@ namespace CalamityMod.Projectiles.Summon public override bool? CanHitNPC(NPC target) => false; public override void AI() { - if (!Main.npc[(int)Projectile.ai[0]].active) + Player owner = Main.player[Projectile.owner]; + if (!Main.npc[(int)Projectile.ai[0]].active || owner.ownedProjectileCounts[ModContent.ProjectileType()] <= 0) { Projectile.Kill(); return; } - Player owner = Main.player[Projectile.owner]; Projectile.Center = Main.npc[(int)Projectile.ai[0]].Center; Main.npc[(int)Projectile.ai[0]].AddBuff(ModContent.BuffType(), 5); @@ -303,7 +300,7 @@ namespace CalamityMod.Projectiles.Summon if (Main.netMode != NetmodeID.MultiplayerClient) { Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + 200 * v, v.RotatedBy(MathHelper.PiOver2) * 10, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), Projectile.knockBack, Projectile.owner); - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + 200 * v, v.RotatedBy(-MathHelper.PiOver2) * 10, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), Projectile.knockBack, Projectile.owner,1); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + 200 * v, v.RotatedBy(-MathHelper.PiOver2) * 10, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), Projectile.knockBack, Projectile.owner, 1); } } } @@ -504,7 +501,7 @@ namespace CalamityMod.Projectiles.Summon { Projectile.NewProjectile(npc.GetSource_OnHurt(null), npc.Center, Vector2.UnitX.RotatedBy(rot), ModContent.ProjectileType(), (int)Math.Max((dmg * VoidConcentrationStaff.summonTag.MultiplicativeTagDamage), 1), 0, -1, npc.whoAmI); } - } + } } base.PostAI(npc); } diff --git a/Items/Weapons/Summon/VoidEaterMarionette.cs b/Items/Weapons/Summon/VoidEaterMarionette.cs index f74c703f3c..e3266817a6 100644 --- a/Items/Weapons/Summon/VoidEaterMarionette.cs +++ b/Items/Weapons/Summon/VoidEaterMarionette.cs @@ -1,6 +1,8 @@ -using System.Linq; +using System.Collections.Generic; +using System.Linq; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.Summon; +using CalamityMod.Packets; using CalamityMod.Projectiles.Summon; using CalamityMod.Rarities; using CalamityMod.Systems.Collections; @@ -41,22 +43,25 @@ namespace CalamityMod.Items.Weapons.Summon Item.DamageType = DamageClass.Summon; Item.shootSpeed = 8; } - public override bool CanRightClick() + + public override void HoldItem(Player player) { - if (!Main.keyState.PressingShift()) - return false; - return true; - } - public override void RightClick(Player player) - { - if (player.ownedProjectileCounts[Item.shoot] > 0) + if (Main.myPlayer == player.whoAmI && player.ownedProjectileCounts[Item.shoot] > 0 && Item.JustPressedKeybind()) { var p = Main.projectile.First(x => x.active && x.type == Item.shoot && x.owner == player.whoAmI); - p.ModProjectile().FocusOnFetching = !p.ModProjectile().FocusOnFetching; - p.netUpdate = true; + if (p.ModProjectile is VoidEaterMarionetteProjectile vem) + { + + vem.FocusOnFetching = !vem.FocusOnFetching; + p.netUpdate = true; + if (vem.FocusOnFetching) + CombatText.NewText(player.Hitbox, Color.White, this.GetLocalizedValue("FetchStart"),true); + else + CombatText.NewText(player.Hitbox, Color.White, this.GetLocalizedValue("FetchEnd"), true); + } } } - public override bool ConsumeItem(Player player) => false; + public override void ModifyTooltips(List tooltips) => tooltips.IntegrateDynamicHotkey(Item); public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.ownedProjectileCounts[type] > 0) diff --git a/Items/Weapons/Summon/WarloksMoonFist.cs b/Items/Weapons/Summon/WarloksMoonFist.cs index 174bb5720a..c185a70c12 100644 --- a/Items/Weapons/Summon/WarloksMoonFist.cs +++ b/Items/Weapons/Summon/WarloksMoonFist.cs @@ -56,9 +56,9 @@ namespace CalamityMod.Items.Weapons.Summon { CreateRecipe(). AddIngredient(ItemID.GolemFist). - AddIngredient(10). - AddIngredient(5). - AddIngredient(5). + AddIngredient(8). + AddIngredient(4). + AddIngredient(20). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Typeless/Aestheticus.cs b/Items/Weapons/Typeless/Aestheticus.cs index a7fa7ed44c..8a5e118585 100644 --- a/Items/Weapons/Typeless/Aestheticus.cs +++ b/Items/Weapons/Typeless/Aestheticus.cs @@ -16,9 +16,8 @@ namespace CalamityMod.Items.Weapons.Typeless Item.width = 58; Item.height = 58; Item.DamageType = AverageDamageClass.Instance; - Item.damage = 8; - Item.useAnimation = 25; - Item.useTime = 25; + Item.damage = 11; + Item.useAnimation = Item.useTime = 25; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 3f; Item.UseSound = SoundID.Item109; @@ -39,12 +38,12 @@ namespace CalamityMod.Items.Weapons.Typeless public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 600); } public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo) { - target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 600); } public override void AddRecipes() diff --git a/Items/Weapons/Typeless/ClaretCannon.cs b/Items/Weapons/Typeless/ClaretCannon.cs index 3d8b5fee1c..d5d7db3135 100644 --- a/Items/Weapons/Typeless/ClaretCannon.cs +++ b/Items/Weapons/Typeless/ClaretCannon.cs @@ -65,7 +65,8 @@ namespace CalamityMod.Items.Weapons.Typeless public override void AddRecipes() { CreateRecipe(). - AddIngredient(4). + AddIngredient(25). + AddIngredient(10). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Typeless/StratusSphere.cs b/Items/Weapons/Typeless/StratusSphere.cs index 5f57fda8ce..0fc5bffb2c 100644 --- a/Items/Weapons/Typeless/StratusSphere.cs +++ b/Items/Weapons/Typeless/StratusSphere.cs @@ -55,9 +55,9 @@ namespace CalamityMod.Items.Weapons.Typeless { CreateRecipe(). AddIngredient(ItemID.NebulaArcanum). - AddIngredient(6). + AddIngredient(8). AddIngredient(4). - AddIngredient(12). + AddIngredient(20). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index f9c0f4336c..e77cb7d5db 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -918,6 +918,17 @@ Encased: { Description: Increased defense by {0} and damage reduction by {1}%, but... } +FulfilledContract: { + DisplayName: Fulfilled Contract + Description: A reward earned through blood and tears + ItemTooltipPlayer: + ''' + 25% reduced Healing Potion cooldown + 75% increased natural regeneration power + All attacks inflict Laceration + ''' +} + GraxBoost: { DisplayName: Grax Boost Description: Your defenses and muscles are strong @@ -1027,7 +1038,7 @@ ReaverRage: { Rage of the earth Defense increased by {0} and damage increased by {1}% ''' - ItemTooltipPlayer: Increases your defense by 10 and damage by 10% + ItemTooltipPlayer: Increases your defense by 5 and damage by 10% } SandsWindBuff: { diff --git a/Localization/en-US/Mods.CalamityMod.Condition.hjson b/Localization/en-US/Mods.CalamityMod.Condition.hjson index 40b195b93b..a9982d1452 100644 --- a/Localization/en-US/Mods.CalamityMod.Condition.hjson +++ b/Localization/en-US/Mods.CalamityMod.Condition.hjson @@ -38,6 +38,7 @@ Drops: { DownedClamHM: After defeating the Giant Clam in Hardmode DownedGSS: After defeating the Great Sand Shark DownedBetsy: After defeating Betsy + DownedDreadnautilus: After defeating Dreadnautilus DownedT1AR: After defeating the first tier of Acid Rain DownedT2AR: After defeating the second tier of Acid Rain FirstKill: Drops only on the first kill diff --git a/Localization/en-US/Mods.CalamityMod.Configs.hjson b/Localization/en-US/Mods.CalamityMod.Configs.hjson index 8bd04ca328..fdee9b12c9 100644 --- a/Localization/en-US/Mods.CalamityMod.Configs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Configs.hjson @@ -110,15 +110,6 @@ CalamityClientConfig: { ''' } - EnableVanillaTextureEdits: { - Label: "[i:Paintbrush] Enable Vanilla Texture Edits" - Tooltip: - ''' - Enables slight edits to vanilla boss textures to improve attack telegraphs. - Disable this for compatibility with texture packs. - ''' - } - EnergyShieldOpacity: { Label: "[i:CalamityMod/TheSponge] Energy Shield Opacity" Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson index b20780869a..b914d0c5d7 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson @@ -128,6 +128,16 @@ TarragonWings: { ''' } +TiredTail: { + DisplayName: Tired Tail + Tooltip: + ''' + {$CommonItemTooltip.FlightAndSlowfall} + {$CommonItemTooltip.PressDownToHover} + {$CommonItemTooltip.PressUpToBooster} + ''' +} + VoidStriders: { DisplayName: Void Striders TreadsName: Void Kicks @@ -150,13 +160,3 @@ WingsofRebirth: { 'Resplendent to the very end' ''' } - -TiredTail: { - DisplayName: Tired Tail - Tooltip: - ''' - {$CommonItemTooltip.FlightAndSlowfall} - {$CommonItemTooltip.PressDownToHover} - {$CommonItemTooltip.PressUpToBooster} - ''' -} diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 44b5fad3b0..576833de12 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -52,7 +52,7 @@ AeroStone: { DisplayName: Aero Stone Tooltip: ''' - Provides an additional {0} seconds of flight time + Grants {0} additional seconds of flight time You slowly recover flight time while in the air while not flying or gliding 'One of the ancient relics' ''' @@ -226,9 +226,10 @@ AscendantInsignia: { DisplayName: Ascendant Insignia Tooltip: ''' - Increases wing flight time by {0}%, movement and jump speed by {1}%, and acceleration by {2}x - Pressing [KEY] grants you the power of ascension, providing infinite flight time for {3} seconds - Ascension has a {4} second cooldown + Grants {0} additional seconds of flight time + Increases movement speed by {1}%, jump speed by {2}%, and acceleration by {3}x + Pressing [KEY] fully restores flight time and prevents it from decreasing for {4} seconds + This ability has a {5} second cooldown ''' } @@ -252,15 +253,6 @@ AsgardsValor: { ''' } -FadedIdolatry: { - DisplayName: Faded Idolatry - Tooltip: - ''' - Summoned [i:CalamityMod/YharonsKindleStaff] Fiery Draconids cost one less minion slot - [c/ffe100:'Once everything has crumbled to dust, what will be left of the world you created?'] - ''' -} - BadgeofBravery: { DisplayName: Badge of Bravery Tooltip: @@ -301,20 +293,6 @@ BlackGlassBand: { ''' } -BlazingCore: { - DisplayName: Blazing Core - Tooltip: - ''' - {$Common.KnockbackImmunity} - The searing core of the Profaned Goddess - Pressing [KEY] will activate a parry, encasing you in luminous profaned crystal - Being hit shortly after encasement will shatter the crystal - Upon shattering, holy stars spiral outwards and damage taken is negated - After shattering, this damage reduction effect goes on cooldown - Damage parried whilst on cooldown summons additional healing stars, and will not be reduced - ''' -} - BloodflareCore: { DisplayName: Bloodflare Core Tooltip: @@ -441,7 +419,7 @@ CorrosiveSpine: { Tooltip: ''' 5% increased movement speed - 25% increased Sickness and Water debuff damage + 50% increased Sickness and Water debuff damage All attacks inflict [cbuff:CalamityMod/Irradiated] and reduces the severity of the sulphuric waters You burst into radioactive clouds when struck ''' @@ -474,6 +452,15 @@ CrownJewel: { ''' } +CrushingEgo: { + DisplayName: Crushing Ego + Tooltip: + ''' + Multiplies all damage by 1.3x, but at the cost of taking 20% increased damage + [c/ff00ff:'Don the mask of arrogance, and dance by your lonesome. Once the ball has gone quiet, you'll be the last man standing.'] + ''' +} + CryoStone: { DisplayName: Cryo Stone Tooltip: @@ -593,12 +580,17 @@ DiamondOfTheDeep: { ''' } -CrushingEgo: { - DisplayName: Crushing Ego +DivineProvidence: { + DisplayName: Divine Providence Tooltip: ''' - Multiplies all damage by 1.3x, but at the cost of taking 20% increased damage - [c/ff00ff:'Don the mask of arrogance, and dance by your lonesome. Once the ball has gone quiet, you'll be the last man standing.'] + {$Common.KnockbackImmunity} + Pressing [KEY] will activate a parry, encasing you in luminous profaned crystal + Being hit shortly after encasement will shatter the crystal + Upon shattering, holy stars spiral outwards and damage taken is negated + After shattering, this damage reduction effect goes on cooldown + Damage parried whilst on cooldown summons additional healing stars, and will not be reduced + [c/FF8C00:The searing core of the Profaned Goddess] ''' } @@ -663,20 +655,6 @@ EclipseMirror: { FlavorTooltip: "'Its reflection shows naught but darkness'" } -FragmentsOfAnotherWorld: { - DisplayName: Fragments of Another World - Tooltip: - ''' - Grants immunity to [cbuffplr:CalamityMod/WhisperingDeath] - {0}% increased melee speed - {1}x specialist ranged damage - {2}% reduced mana usage - +{3} maximum sentries - {4}% increased rogue attack speed - [c/ff0000:'Don't speak of your desires to the shadows, they listen.'] - ''' -} - ElectriciansGlove: { DisplayName: Electrician's Glove Tooltip: @@ -769,6 +747,15 @@ EyeoftheStorm: { ''' } +FadedIdolatry: { + DisplayName: Faded Idolatry + Tooltip: + ''' + Summoned [i:CalamityMod/YharonsKindleStaff] Fiery Draconids cost one less minion slot + [c/ffe100:'Once everything has crumbled to dust, what will be left of the world you created?'] + ''' +} + FeatherCrown: { DisplayName: Feather Crown Tooltip: @@ -843,11 +830,25 @@ FleshTotem: { Summons an effigy above your head that stores mana as you use it, up to 600 mana The effigy occasionally pulses, restoring 25 mana Pulses appear more frequently the more mana is stored - Upon being struck, the effigy unleashes all stored up mana as vengeful souls that chase your enemies + Upon being struck, the effigy unleashes half of all stored up mana as vengeful souls that chase your enemies The effigy is transparent and silent if visibility is disabled ''' } +FragmentsOfAnotherWorld: { + DisplayName: Fragments of Another World + Tooltip: + ''' + Grants immunity to [cbuffplr:CalamityMod/WhisperingDeath] + {0}% increased melee speed + {1}x specialist ranged damage + {2}% reduced mana usage + +{3} maximum sentries + {4}% increased rogue attack speed + [c/ff0000:'Don't speak of your desires to the shadows, they listen.'] + ''' +} + FrostBarrier: { DisplayName: Frost Barrier Tooltip: @@ -868,6 +869,24 @@ FrostFlare: { ''' } +FrozenCube: { + DisplayName: Frozen Cube + Tooltip: + ''' + A frozen block of ice with something inside + Summons an Elumphant to sit atop your head and protect you + The Elumphant will cycle between shooting cold air that inflicts [cbuff:CalamityMod/WindChilled], and headbutting enemies + Elumphant's headbutts only target enemies inflicted with [cbuff:CalamityMod/WindChilled] + Reduces your defense by 33%, but uses that defense to boost the Elumphant's power and your cold debuff damage + [DAMAGELINE] + [c/7497ED:'What I wanna know is, where's the mammoth?'] + ''' + SalesPitch: "{$Common.SalesmanShrinePitch}" + EquippedDebuff: Current Cold Debuff boost: +{0}% + EquippedElumphant: Current Elumphant Power: {0}% + Unequipped: Equip this accessory to view its statistics +} + FungalClump: { DisplayName: Fungal Clump Tooltip: @@ -882,7 +901,7 @@ FungalSymbiote: { Tooltip: ''' You grow mushrooms on the grass beneath you - Consuming mushrooms provides [cbuffplr:CalamityMod/Mushy], granting 5 defense and +1 HP/s life regen + Consuming mushrooms provides [cbuffplr:CalamityMod/Mushy], granting 3 defense and +1 HP/s life regen 10% increased damage while you have [cbuffplr:CalamityMod/Mushy] ''' SalesPitch: "{$Common.SalesmanShrinePitch}" @@ -973,7 +992,7 @@ HallowedRune: { HarpyRing: { DisplayName: Harpy Ring - Tooltip: 10% increased movement speed and 20% increased flight time + Tooltip: 20% increased movement speed and flight time } HeartofDarkness: { @@ -1216,10 +1235,10 @@ NebulousCore: { DisplayName: Nebulous Core Tooltip: ''' - 10% increased damage + {0}% increased damage Summons floating nebula stars to protect you - Taking a fatal hit revives you to 100 HP - This effect has a 90 second cooldown + Taking a fatal hit revives you to {1} HP + This effect has a {2} second cooldown ''' } @@ -1257,6 +1276,16 @@ Nucleogenesis: { ''' } +OasisElementalinaBottle: { + DisplayName: Oasis Elemental in a Bottle + Tooltip: + ''' + Summons an oasis elemental to assist you + The elemental fires healing orbs that restore 10 health while you are damaged + The elemental has reduced opacity if visibility is disabled + ''' +} + OccultSkullCrown: { DisplayName: Occult Skull Crown Tooltip: @@ -1491,16 +1520,6 @@ RampartofDeities: { ToggleEffect: ", increases movement speed," } -OasisElementalinaBottle: { - DisplayName: Oasis Elemental in a Bottle - Tooltip: - ''' - Summons an oasis elemental to assist you - The elemental fires healing orbs that restore 10 health while you are damaged - The elemental has reduced opacity if visibility is disabled - ''' -} - ReaperToothNecklace: { DisplayName: Reaper Tooth Necklace Tooltip: @@ -2011,6 +2030,21 @@ TheFirstShadowflame: { ''' } +ThePact: { + DisplayName: The Pact + Tooltip: + ''' + Increases your max health by {0}x + Causes {1}% of hits you take to critically strike you + These crits deal {2}x damage and infict [cbuffplr:CalamityMod/FulfilledContract] + ''' + SalesPitch: + ''' + 'Money's a fickle thing, buddy. One slip, and next you know, you're livin' it up... in a dumpster!' + 'Gambling with life itself, that's where it's truly at. Just write my name in your will, would ya?' + ''' +} + ThePointer: { DisplayName: The Pointer Tooltip: @@ -2173,7 +2207,7 @@ WarbanneroftheRighteous: { Tooltip: ''' Multiplies all damage based on how close you are to enemies - Maximum damage boost is 15%, minimum damage boost is -15% + Maximum damage boost is 1.15x, minimum damage boost is 0.85x Emit a blazing aura that burns and repels nearby enemies with [cbuff:CalamityMod/HolyFlames] Enemies take increasing damage the closer they are to you and the longer they are near you Effects are transparent and silent if visibility is disabled @@ -2236,6 +2270,11 @@ GhostBracelet: { Tooltip: Wow.... It looks at me with its hollow eyes full of curiosity } +GlimmeringRibbon: { + DisplayName: Glimmering Ribbon + Tooltip: "'We are born colorless. It's the people we meet who give us color.'" +} + HapuFruit: { DisplayName: Ha-pu Fruit Tooltip: "'A fruit that calms your nerves (may have unintended side effects)'" @@ -2267,12 +2306,7 @@ Popo: { SharkyPlush: { DisplayName: Sharky Plush - Tooltip: "[c/696969:'Look out, for the force without form...']" -} - -GlimmeringRibbon: { - DisplayName: Glimmering Ribbon - Tooltip: "'We are born colorless. It's the people we meet who give us color.'" + Tooltip: "[c/696969:'Like lovers and heroes, and the restless part of everyone...']" } TheComb: { @@ -2312,21 +2346,3 @@ XyksBlessingOrange: { ArmorDisabled: "[c/D44748:DISABLED]" ArmorEnabled: "[c/58D447:ENABLED]" } - -FrozenCube: { - DisplayName: Frozen Cube - Tooltip: - ''' - A frozen block of ice with something inside - Summons an Elumphant to sit atop your head and protect you - The Elumphant will cycle between shooting cold air that inflicts [cbuff:CalamityMod/WindChilled], and headbutting enemies - Elumphant's headbutts only target enemies inflicted with [cbuff:CalamityMod/WindChilled] - Reduces your defense by 33%, but uses that defense to boost the Elumphant's power and your cold debuff damage - [DAMAGELINE] - [c/7497ED:'What I wanna know is, where's the mammoth?'] - ''' - SalesPitch: "{$Common.SalesmanShrinePitch}" - EquippedDebuff: Current Cold Debuff boost: +{0}% - EquippedElumphant: Current Elumphant Power: +{0}% - Unequipped: Equip this accessory to view its statistics -} diff --git a/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson b/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson index a1531dea4b..6bfea394d9 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson @@ -12,7 +12,7 @@ BloodfireArrow: { Tooltip: ''' High-velocity arrows with a blood soaked tip - Firing these arrows will drain your health and boost the arrow damage by 30% + Firing these arrows will drain your health and boost the arrow damage by 20% Accelerates your natural life regen and heals you on hit ''' } @@ -59,7 +59,11 @@ DryadsTear: { ElysianArrow: { DisplayName: Elysian Arrow - Tooltip: On impact, summons purifying light from above and below at the nearest enemy + Tooltip: + ''' + On impact, summons purifying light from above and below at the nearest enemy + Purifying light ignores 15 points of enemy Defense + ''' } FlashRound: { @@ -85,7 +89,7 @@ HailstormBullet: { Tooltip: ''' Once shot, bullets rapidly decelerate - Critical hits cause a flash freeze, dealing additional damage and freezing non-boss enemies + Critical hits cause a flash freeze, dealing additional damage based on your crit chance and freezing enemies ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson index 7cd148e6f7..516919d0a1 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson @@ -306,7 +306,7 @@ LunicCorpsHelmet: { DisplayName: Lunic Corps Helmet Tooltip: ''' - Increases non-bow damage by {0}% + Increases non-bow ranged damage by {0}% Improves vision and shows the location of enemies ''' SetBonus: diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index 9be46a57ac..366d580191 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -287,7 +287,11 @@ DemonshadeBreastplate: { DemonshadeGreaves: { DisplayName: Demonshade Greaves - Tooltip: "{$CommonItemTooltip.PercentIncreasedMovementSpeed} and {1}% increased acceleration" + Tooltip: + ''' + {$CommonItemTooltip.PercentIncreasedMovementSpeed} and {1}% increased acceleration + [c/aaaaaa:Shift- in your inventory to toggle the increased acceleration] + ''' } DemonshadeHelm: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson b/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson index 442de828f9..5ae7888174 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson @@ -58,11 +58,6 @@ Bloodstone: { Tooltip: "" } -BloodstoneCore: { - DisplayName: Bloodstone Core - Tooltip: "" -} - CoreofCalamity: { DisplayName: Core of Calamity Tooltip: "" @@ -218,7 +213,7 @@ PlagueCellCanister: { } PlasmaDriveCore: { - DisplayName: Prototype Plasma Drive Core + DisplayName: Prototype Plasma Drive Tooltip: Despite all the time it spent in storage, its furnace still burns strong } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson index 666b282305..d82a2f9688 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson @@ -140,7 +140,7 @@ ShadowPotion: { SoaringPotion: { DisplayName: Soaring Potion - Tooltip: "{0}% increased flight time and horizontal flight speed" + Tooltip: "{0}% increased flight time" } SulphurskinPotion: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson index 589bc10f15..a6ef244292 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson @@ -17,8 +17,8 @@ AggressiveVoucher: { DisplayName: Aggressive Voucher Tooltip: ''' - Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge - This effect only applies when reforging accessories + Favorite this item in your inventory to change the result of your next accessory reforge + This will always either give the targeted reforge or a unique reforge Targeted Reforge: {0} Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] @@ -162,8 +162,8 @@ CombatVoucher: { DisplayName: Combat Voucher Tooltip: ''' - Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge - This effect only applies when reforging weapons + Favorite this item in your inventory to change the result of your next weapon reforge + This will always either give the best reforge based on class or a unique reforge ''' SalesPitch: ''' @@ -240,8 +240,8 @@ HurriedVoucher: { DisplayName: Hurried Voucher Tooltip: ''' - Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge - This effect only applies when reforging accessories + Favorite this item in your inventory to change the result of your next accessory reforge + This will always either give the targeted reforge or a unique reforge Targeted Reforge: {0} Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] @@ -320,8 +320,8 @@ OddVoucher: { DisplayName: Odd Voucher Tooltip: ''' - Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge - This effect only applies when reforging accessories + Favorite this item in your inventory to change the result of your next accessory reforge + This will always either give the targeted reforge or a unique reforge Targeted Reforge: {0} Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] @@ -454,8 +454,8 @@ UnbreakableVoucher: { DisplayName: Unbreakable Voucher Tooltip: ''' - Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge - This effect only applies when reforging accessories + Favorite this item in your inventory to change the result of your next accessory reforge + This will always either give the targeted reforge or a unique reforge Targeted Reforge: {0} Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index 388b1b5def..495b98d77a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -23,11 +23,6 @@ AethersWhisper: { Tooltip: Fires void beams that gain damage as they travel and split on tile hits } -AlulaAustralis: { - DisplayName: Alula Australis - Tooltip: Fires a beautiful aurora that spreads the [cbuff:CalamityMod/AstralInfectionDebuff] and is trailed by a star shower -} - AlphaDraconis: { DisplayName: Alpha Draconis Tooltip: @@ -41,6 +36,11 @@ AlphaDraconis: { ''' } +AlulaAustralis: { + DisplayName: Alula Australis + Tooltip: Fires a beautiful aurora that spreads the [cbuff:CalamityMod/AstralInfectionDebuff] and is trailed by a star shower +} + AnahitasArpeggio: { DisplayName: Anahita's Arpeggio Tooltip: "[GFB]" diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index 172e65e32b..33a6e5a1a9 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -86,7 +86,8 @@ ArkoftheCosmos: { You can also parry projectiles to make them deal 120 less damage for a short period Parrying will empower the next 16 swings of the sword ''' - BlastInfo: Double with charges available to cause a Big Rip in spacetime and consume all charges + BlastInfo: with charges available to cause a Big Rip in spacetime and consume all charges + BlastInfoKeybind: Press [KEY] with charges available to cause a Big Rip in spacetime and consume all charges } ArkoftheElements: { @@ -924,7 +925,6 @@ Oblivion: { At maximum charge, the yoyo bursts into brimstone darts and resets its flight duration Striking an enemy at maximum charge will overload the yoyo, causing it to release all stored up power and shatter Shattering the yoyo deals immense damage but leaves it unable to be used for several seconds - [c/C61B40:'I have memories from eyes that are not my own'] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 6239730850..0b3625e36e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -65,6 +65,11 @@ AntiMaterielRifle: { ''' } +AquashardShotgun: { + DisplayName: Aquashard Shotgun + Tooltip: Converts musket balls into aquashards that split upon hitting an enemy +} + Arbalest: { DisplayName: Arbalest Tooltip: @@ -75,11 +80,6 @@ Arbalest: { ''' } -AquashardShotgun: { - DisplayName: Aquashard Shotgun - Tooltip: Converts musket balls into aquashards that split upon hitting an enemy -} - Archerfish: { DisplayName: Archerfish Tooltip: @@ -547,6 +547,7 @@ HalleysInferno: { Fires a burst of intensely concentrated lunar fire jets to rapid-fire Starbursts that inflict [cbuff:CalamityMod/Voidfrost] Generates Starbursts when hitting enemies, depending on your accuracy + Press [KEY] to toggle long-range scope mode Uses gel for ammo 'Halley arrived sooner than expected' ''' @@ -819,6 +820,23 @@ NullificationPistol: { ''' } +OmniGun: { + DisplayName: The Omnigun + Tooltip: + ''' + A multipurpose weapon with several modes which are used in sequence + The first shot is a sniper round which gains damage over time and always critically strikes + The second shot is a burst of 10 standard bullets + The third shot is a devastating point blank spread + The fourth shot is a dangerous but powerful grenade which destroys everything, including you + ''' + SalesPitch: + ''' + 'Why carry four different guns when you can carry just one? That's what I used to ask myself!' + 'With this thing-a-beauty, even a bumbling moron can become invincible - and for the right price, it can be yours!' + ''' +} + OntologicalDespoiler: { DisplayName: Ontological Despoiler Tooltip: @@ -852,23 +870,6 @@ Onyxia: { ''' } -OmniGun: { - DisplayName: The Omnigun - Tooltip: - ''' - A multipurpose weapon with several modes which are used in sequence - The first shot is a sniper round which gains damage over time and always critically strikes - The second shot is a burst of 10 standard bullets - The third shot is a devastating point blank spread - The fourth shot is a dangerous but powerful grenade which destroys everything, including you - ''' - SalesPitch: - ''' - 'Why carry four different guns when you can carry just one? That's what I used to ask myself!' - 'With this thing-a-beauty, even a bumbling moron can become invincible - and for the right price, it can be yours!' - ''' -} - OpalStriker: { DisplayName: Opal Striker Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 419a2e7967..f1b19bcf75 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -683,6 +683,19 @@ LeadTomahawk: { ''' } +LemonNade: { + DisplayName: Lemon 'nade + Tooltip: + ''' + Disables normal stealth generation + Hold to pull the pin and generate stealth, and release to throw + The longer it is held, the shorter the fuse once the 'nade is thrown + Will explode in your hand if the fuse is held too long + Stealth strikes explode into exploding lemon seeds + 'Burn their house down!' + ''' +} + LeonidProgenitor: { DisplayName: Leonid Progenitor Tooltip: @@ -890,6 +903,15 @@ ProfanedPartisan: { ''' } +Pumpkaboom: { + DisplayName: Pumpkaboom + Tooltip: + ''' + Throws a pumpkin which sticks to enemies and explodes after a delay + Stealth strikes throw larger pumpkins which pull enemies in before releasing a larger explosion + ''' +} + RadiantStar: { DisplayName: Radiant Star Tooltip: @@ -1408,25 +1430,3 @@ WulfrumKnife: { Returning knives also temporarily allows using stealth strikes without rogue armor ''' } - -Pumpkaboom: { - DisplayName: Pumpkaboom - Tooltip: - ''' - Throws a pumpkin which sticks to enemies and explodes after a delay - Stealth strikes throw larger pumpkins which pull enemies in before releasing a larger explosion - ''' -} - -LemonNade: { - DisplayName: Lemon 'nade - Tooltip: - ''' - Disables normal stealth generation - Hold to pull the pin and generate stealth, and release to throw - The longer it is held, the shorter the fuse once the 'nade is thrown - Will explode in your hand if the fuse is held too long - Stealth strikes explode into exploding lemon seeds - 'Burn their house down!' - ''' -} diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index 8292bc329c..edf3cfd303 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -491,7 +491,7 @@ IgneousExaltation: { Summons an Igneous blade that orbits around you When your minion slots are full, again to launch all blades towards the cursor This ability has a two-second cooldown that requires holding this item - Shift- this item in your inventory to change the rotation direction + Press [KEY] while holding this item to change the rotation direction ''' } @@ -731,11 +731,7 @@ SquirrelSquireStaff: { StaffOfNecrosteocytes: { DisplayName: Staff of Necrosteocytes - Tooltip: - ''' - Summons small skeletons to fight for you - The skeletons leave behind bone cells as they move - ''' + Tooltip: Summons small skeletons to fight for you } StarspawnHelixStaff: { @@ -851,7 +847,7 @@ ViridVanguard: { All weapons inflict [cbuff:CalamityMod/SagePoison], 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 + Press [KEY] while holding this item to change the rotation direction ''' } @@ -859,7 +855,8 @@ VoidConcentrationStaff: { DisplayName: Void Concentration Staff Tooltip: ''' - Surrounds you with dark energy, which makes all attacks deal 15% less damage + Summons an endless darkness that surrounds you with orbiting dark energies + While the dark energies are orbiting you, you take 15% less damage from all attacks to condense the energy onto a target, focusing your minions on them and creating homing beams When the focused enemy takes damage from any source, they will be struck by additional dark energies These dark energy are twice as strong when the strike was from a minion or sentry @@ -875,8 +872,10 @@ VoidEaterMarionette: { Repeated summons increase the length and power of the Devourer The Devourer attacks with [ceffect/dog:Divinity Devourer], [ceffect/dog:Faith Incinerator] and [ceffect/dog:Ultracosmic Maelstrom] Can play fetch with dropped items - Shift- this item in your inventory when the Devourer has been spawned to prioritize fetching + Press [KEY] while holding this item when the Devourer has been spawned to prioritize fetching ''' + FetchStart: Go fetch! + FetchEnd: Get 'em! } WarloksMoonFist: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson index 9f4e6963ec..4f65eb625d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson @@ -49,14 +49,11 @@ RelicOfDeliverance: { DisplayName: Relic of Deliverance Tooltip: ''' - Using mounts you on the spear; holding revvs the spear, slowing you down - Release to launch yourself at high speeds, halved while a boss is alive - Losing too much speed while charging will bust the charge, resetting your speed - The dash allows you to ram through enemies and travel through tiles - Being inside tiles for too long will warp you back to where you entered + Hold to mount and charge the spear, dashing towards your mouse when the button is released + The speed of the dash depends on the charge amount, and is reduced while a boss is alive + The dash can ram through enemies and travel through tiles Press to dismount Holding out the spear heavily reduces the damage of all summons - {$Common.AverageDamageInfo} [c/FF8C00:Vengeance fueled me, I had no thought other than exactment.] [c/FF8C00:The dragon took everything from me, leaving my broken pieces strewn on the ground.] [c/FF8C00:But when I danced by Her side, I knew there was still something worth fighting for.] diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index e21ebc6a6a..1f175c4976 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -284,6 +284,7 @@ SupremeCalamitas.DisplayName: Supreme Witch, Calamitas SupremePermafrost: Supreme Ultramage, Permafrost SupremeCataclysm.DisplayName: Cataclysm SupremeCatastrophe.DisplayName: Catastrophe +VolatileSlime.DisplayName: Volatile Slime Yharon.DisplayName: Yharon, Dragon of Rebirth YharonPhase2: Yharon, Resplendent Phoenix AndroombaFriendly.DisplayName: Androomba Pal diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson index c7ede7f1b5..a46f5fac1d 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson @@ -43,6 +43,9 @@ BloodRay.DisplayName: Blood Ray BlueBubble.DisplayName: Bubble BlushieStaffProj.DisplayName: Staff of Blushie BrimroseBeam.DisplayName: Brimrose Beam +CalamitousDartFriendly.DisplayName: Calamitous Dart Friendly +CalamitousExplosionFriendly.DisplayName: Calamitous Explosion Friendly +CalamitousFireballFriendly.DisplayName: Calamitous Fireball Friendly CauldronProj.DisplayName: Smauldron CauldronProjSmall.DisplayName: Smaullerdron ChronoIcicleLarge.DisplayName: Chrono Icicle @@ -76,6 +79,8 @@ ExoVortex2.DisplayName: Subsuming Vortex FatesRevealFlame.DisplayName: Fate's Reveal FireImplosion.DisplayName: Swirling Backdraft FlareBoltProjectile.DisplayName: Flare Bolt +FleshTotemMinion.DisplayName: Flesh Totem Minion +FleshTotemSoul.DisplayName: Flesh Totem Soul ForbiddenAxeBlade.DisplayName: Ruin Blade ForbiddenSunburst.DisplayName: Sunburst ForbiddenSunProjectile.DisplayName: Forbidden Sun @@ -147,6 +152,7 @@ MelterNote2.DisplayName: Melter Song MeteorStar.DisplayName: Meteor Star MeteorStarExplosion.DisplayName: Explosion MiasmaGas.DisplayName: Miasma Gas +MoonSigil.DisplayName: Moon Sigil NanoPurgeLaser.DisplayName: Nano Beam NebulaCloud.DisplayName: Nebula Cloud NebulaCloudCore.DisplayName: Nebula Cloud Core @@ -184,7 +190,6 @@ PrinceFlameSmall.DisplayName: Holy Fire RainbowComet.DisplayName: Comet RainbowRocket.DisplayName: Rainbow Rocket RancorArm.DisplayName: Vengeful Arm -RancorFog.DisplayName: The Fog Is Coming RancorLargeCinder.DisplayName: Lava Cinder RancorLaserbeam.DisplayName: The Angy Beam RancorMagicCircle.DisplayName: Magic Circle @@ -226,6 +231,7 @@ SoulPiercerBeam.DisplayName: Soul Piercer SoulPiercerBolt.DisplayName: Soul Piercer SparkInfernal.DisplayName: Spark SparklingLaser.DisplayName: Sparkling Laser +SpectralFeather.DisplayName: Spectral Feather SpiritCongregation.DisplayName: Spirit Monster SpiritDust.DisplayName: Spirit Dust Starblast.DisplayName: Star @@ -286,10 +292,3 @@ WyvernFeatherPurple.DisplayName: Feather WyvernProjectile.DisplayName: Wyvern YharimsCrystalBeam.DisplayName: Yharim's Beam YharimsCrystalPrism.DisplayName: Yermes Christal -FleshTotemMinion.DisplayName: Flesh Totem Minion -FleshTotemSoul.DisplayName: Flesh Totem Soul -SpectralFeather.DisplayName: Spectral Feather -MoonSigil.DisplayName: Moon Sigil -CalamitousDartFriendly.DisplayName: Calamitous Dart Friendly -CalamitousExplosionFriendly.DisplayName: Calamitous Explosion Friendly -CalamitousFireballFriendly.DisplayName: Calamitous Fireball Friendly diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index ba72470e9f..b3e4d3ef8c 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -105,6 +105,7 @@ EmpyreanKnife.DisplayName: Empyrean Knife EntropicFlechette.DisplayName: Entropic Flechette EonBolt.DisplayName: Eon Bolt EssenceScythe.DisplayName: Essence Scythe +EvilSmasherProjectile.DisplayName: Evil Smasher ExaltedOathbladeThrownBlade.DisplayName: Exalted Oathblade Thrown Blade MawOfInfinityHoldout.DisplayName: Maw of Infinity MawOfInfinityJaws.DisplayName: Divinity Devourer @@ -186,6 +187,8 @@ NeptuneOrb.DisplayName: Neptune's Trident NeptunesBountyProjectile.DisplayName: Neptune's Bounty NeptunesBountySplitProjectile.DisplayName: Neptune's Bounty Jet OathswordFlame.DisplayName: Oathsword Flame +OblivionFire.DisplayName: Oblivion Fire +OblivionBolt.DisplayName: Oblivion Bolt Orbacle.DisplayName: Auric Orb OrderbringerBeam.DisplayName: Orderbringer Beam OrderbringerWaveProj.DisplayName: Order-bringing Wave @@ -311,6 +314,3 @@ WulfrumScrew.DisplayName: Wulfrum Screw WulfrumScrewdriverProj.DisplayName: Wulfrum Screwdriver YinYoDark.DisplayName: Dark Shard YinYoLight.DisplayName: Light Shard -EvilSmasherProjectile.DisplayName: Evil Smasher -OblivionFire.DisplayName: Oblivion Fire -OblivionBolt.DisplayName: Oblivion Bolt diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson index 0701c2066f..aef3579da9 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson @@ -1,3 +1,4 @@ +AbyssalFire.DisplayName: Abyssal Fire AcidRocket.DisplayName: Acid Rocket AdamAcceleratorBeam.DisplayName: Adamantite Particle Beam AMR2.DisplayName: AMR @@ -21,6 +22,7 @@ AuroraFire.DisplayName: Aurora Blaze BallistaGreatArrow.DisplayName: Ballista Great Arrow BallistaShard.DisplayName: Ballista Shard BarinadeArrow.DisplayName: Fin Arrow +BlahajBlast.DisplayName: Blahaj Blast BlightFlames.DisplayName: Blight Flames BlissfulBombardierSplitProjectile.DisplayName: Profaned Mini-Rocket BloodBoilerFire.DisplayName: Blood Fire @@ -131,6 +133,7 @@ MagnomalyExplosion.DisplayName: Explosion MagnomalyRocket.DisplayName: Nuke MarksmanShot.DisplayName: Marksman Shot MechanicalBarracuda.DisplayName: Barracuda +MegalodonRocket.DisplayName: Megalodon Rocket MegalodonShot.DisplayName: Megalodon Shot MeowCreature.DisplayName: the creature :3 MeowFire.DisplayName: Purr Fire @@ -149,6 +152,9 @@ NovaShot.DisplayName: Nova Bolt NukeOfBliss.DisplayName: Profaned Nuke NullFlash.DisplayName: Null Flash NullShot.DisplayName: Null +OmniSniperShot.DisplayName: Omni Sniper Shot +OmniGrenade.DisplayName: Omni Grenade +OmniShotgunShot.DisplayName: Omni Shotgun Shot OntologicalDespoilerBeam.DisplayName: Null-Annihilation Beam OntoligicalDespoilerBurst.DisplayName: Disruption Blast OntologicalDespoilerGrenade.DisplayName: Disruption Sphere @@ -260,14 +266,8 @@ VanquisherArrowMain.DisplayName: Vanquisher Arrow VanquisherArrowProj.DisplayName: Vanquisher Arrow Proj VeriumBoltProj.DisplayName: Verium Bolt VernalBolt.DisplayName: Vernal Bolt +VoidBlast.DisplayName: Void Blast WaterSpout.DisplayName: Spout WildfireBloomFire.DisplayName: Wildfire Fire WildfireBloomFlare.DisplayName: Wildfire Flare WulfrumScrapBullet.DisplayName: High Speed Scrap -AbyssalFire.DisplayName: Abyssal Fire -BlahajBlast.DisplayName: Blahaj Blast -MegalodonRocket.DisplayName: Megalodon Rocket -VoidBlast.DisplayName: Void Blast -OmniSniperShot.DisplayName: Omni Sniper Shot -OmniGrenade.DisplayName: Omni Grenade -OmniShotgunShot.DisplayName: Omni Shotgun Shot diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index 44c29118dc..9e6b2f9f51 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -159,6 +159,8 @@ Knife.DisplayName: Knife KylieBoomerang.DisplayName: Kylie LanceofDestiny.DisplayName: Holy Lance LeadTomahawkProj.DisplayName: Lead Tomahawk +LemonNadeHoldout.DisplayName: Lemon 'nade +LemonNadeProjectile.DisplayName: Lemon 'nade LeonidCometBig.DisplayName: Leonid Comet LeonidCometSmall.DisplayName: Leonid Comet LeonidProgenitorBombshell.DisplayName: Leonid Bombshell @@ -189,6 +191,7 @@ NanoblackLightspeedCarve: { Standard: Light-speed Carve } +NanoblackLightspeedCarveSlashVisual.DisplayName: Nanoblack Light-speed Carve Visuals NanoblackMain.DisplayName: Nanoblack Reaper NanoblackPiercingStrike.DisplayName: Zero-Point Energy Strike NanoblackStrike.DisplayName: Zero-Point Energy Strike @@ -196,6 +199,7 @@ NanoblackTesselation.DisplayName: Nanoblack Tesselation NastyChollaBol.DisplayName: Nasty Cholla NastyChollaNeedle.DisplayName: Cactus Needle OrichalcumSpikedGemstoneProjectile.DisplayName: Orichalcum Gemstone +PaleoShatterExplosion.DisplayName: Paleo Shatter Explosion PalladiumJavelinProjectile.DisplayName: Palladium Javelin PartisanExplosion.DisplayName: Profaned Explosion PenumbraBomb.DisplayName: Penumbra Bomb @@ -275,11 +279,12 @@ SludgeSplotchProj2.DisplayName: Sludge Splotch SmallCoral.DisplayName: Small Coral SnapClamProj.DisplayName: Snap Clam SnapClamStealth.DisplayName: Snap Clam +SpadefishHoldout.DisplayName: Spinfish +SpadefishThrown.DisplayName: Spadefish SpearofDestinyProjectile.DisplayName: Destiny Spear SpearofDestinyStealth.DisplayName: Empowered Holy Lance SpearofDestinyStealthExplosion.DisplayName: Strong Burst SpearofPaleolithProj.DisplayName: Paleolith Spear -PaleoShatterExplosion.DisplayName: Paleo Shatter Explosion SpentFuelContainerProjectile.DisplayName: Spent Fuel Container SphereBladed.DisplayName: Bladed Sphere SphereBlue.DisplayName: Blue Thruster Sphere @@ -343,8 +348,3 @@ WrathwingCinder.DisplayName: Wrathwing Eruption WrathwingFireball.DisplayName: Wrathwing Fireball WrathwingSpear.DisplayName: Wrathwing WulfrumKnifeProj.DisplayName: Wulfrum Knife -NanoblackLightspeedCarveSlashVisual.DisplayName: Nanoblack Light-speed Carve Visuals -LemonNadeHoldout.DisplayName: Lemon 'nade -LemonNadeProjectile.DisplayName: Lemon 'nade -SpadefishHoldout.DisplayName: Spinfish -SpadefishThrown.DisplayName: Spadefish diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index dfdadd18a3..dc6ed38dc6 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -47,6 +47,7 @@ DevourerofCodsBobber.DisplayName: Devourer of Cods Bobber DiamondOfTheDeepProjectile.DisplayName: Abyss Spirit DirectStrike.DisplayName: Nondescript Damaging Entity DragonDust.DisplayName: Dust +DryadsTearBurst.DisplayName: Teardrop Ripple DunesandBallFalling.DisplayName: Dunesand Ball DuneSandBallGun.DisplayName: Dunesand Ball EarlyBloomBobber.DisplayName: Early Bloom Bobber diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson index a6f76a79ce..7992346408 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson @@ -48,11 +48,7 @@ SetBonus: { {0}% increased damage which scales based on how far the target is from you Closer range grants melee damage, while farther range grants ranged damage ''' - Gladiator: - ''' - +60 maximum stealth - 5% increased rogue damage and 10% increased velocity - ''' + Gladiator: +{0} maximum stealth Gold: ''' All enemies have a {0}% chance to drop 1 extra gold diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 74d6beff22..5298cbc8cb 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -128,11 +128,7 @@ EditedTooltip: { */ Campfires: Life regen is increased by 0.5 HP/s when near a campfire HeartLantern: Grants +1 HP/s life regeneration when placed nearby - BottledHoney: - ''' - Grants +1 HP/s life regen for a short time - Grants an additional +1 HP/s life regen while inflicted with a damaging debuff - ''' + BottledHoney: Grants the [cbuffplr:Honey] buff for 15 seconds ShinyStone: Grants +2 HP/s life regen and accelerates natural life regen when not moving BandofRegeneration: Grants +1 HP/s life regeneration CharmofMyths: Grants +1 HP/s life regeneration and reduces the cooldown of healing potions by 25% @@ -183,13 +179,13 @@ EditedTooltip: { ''' FrogLeg: Increases jump speed by {0}% and allows auto-jump // Soaring Insignia - EmpressFlightBooster1: Increases wing flight time by 33% + EmpressFlightBooster1: Grants 2.5 additional seconds of flight time EmpressFlightBooster2: Increases movement speed by 7.5%, jump speed by 10%, and acceleration by 1.25x GravityGlobe: ''' - Provides 32% increased jump speed and increased fall speed + Provides 40% increased jump speed and increased fall speed Provides a gravitational boost jump, which recharges whenever gravity is flipped - Slightly improves wingless air movement speed + Improves wingless air movement speed Press {$Key.UP} to change gravity Press {$Key.DOWN} to fall faster ''' @@ -199,6 +195,12 @@ EditedTooltip: { All attacks light enemies on fire 'Never get cold feet again' ''' + VolatileGelatin: + ''' + Every 5 volatile gelatins that hit, a winged Volatile Slime will spawn, up to a max of 6 + Each Volatile Slime provides 5% increased jump speed and 0.3 seconds of flight time + Running out of flight time will remove the Volatile Slime's wings and detach them from you + ''' /* Armor */ @@ -523,7 +525,7 @@ TownNPCMood: { PartyGirl: { Monument: Yeeesh, we're gonna have an ugly statue of big money around? That like, totally kills the party mood around here. GiftPositive: PARTY GIFTS? FOR ME? Oh just you wait, I'm gonna throw the BIGGEST party this town has ever seen, forever and always! - GiftNegative: I knew you were trouble when you walked in that suspicious looking box! It's too late now to say sorry! + GiftNegative: I knew you were trouble when you walked in with that suspicious looking box! It's too late now to say sorry! } Pirate: { diff --git a/NPCs/AcidRain/BabyFlakCrab.cs b/NPCs/AcidRain/BabyFlakCrab.cs index 5fc75e32ee..58a3eca580 100644 --- a/NPCs/AcidRain/BabyFlakCrab.cs +++ b/NPCs/AcidRain/BabyFlakCrab.cs @@ -130,7 +130,7 @@ namespace CalamityMod.NPCs.AcidRain public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.PlayerSafe || !spawnInfo.Player.Calamity().ZoneSulphur || !DownedBossSystem.downedAquaticScourge) + if (spawnInfo.PlayerSafe || !spawnInfo.Player.Calamity().ZoneSulphur) { return 0f; } diff --git a/NPCs/AcidRain/Orthocera.cs b/NPCs/AcidRain/Orthocera.cs index 13eaba493e..c674e58cd9 100644 --- a/NPCs/AcidRain/Orthocera.cs +++ b/NPCs/AcidRain/Orthocera.cs @@ -7,6 +7,7 @@ using CalamityMod.Graphics.Metaballs; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Weapons.Summon; +using CalamityMod.Particles; using CalamityMod.Projectiles.Enemy; using CalamityMod.Projectiles.Magic; using Microsoft.Xna.Framework; @@ -208,7 +209,8 @@ namespace CalamityMod.NPCs.AcidRain NPC.Calamity().newAI[0]++; if (NPC.Calamity().newAI[0] % 5 == 0 && Main.netMode != NetmodeID.MultiplayerClient) { - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Bottom, Main.rand.NextVector2Circular(4f, 8f), ModContent.ProjectileType(), 0, 0f, Main.myPlayer); + RancorFog fog = new(NPC.Bottom, Main.rand.NextVector2Circular(4f, 8f), 180, Main.rand.NextFloat(1f, 1.7f), Main.rand.NextFloat(MathHelper.TwoPi)); + GeneralParticleHandler.SpawnParticle(fog, false, Enums.GeneralDrawLayer.BeforeNPCs); RancorLavaMetaball.SpawnParticle(NPC.Bottom + Main.rand.NextVector2Circular(10f, 10f), 135f); } if (NPC.Calamity().newAI[0] % 30 == 0 && Main.netMode != NetmodeID.MultiplayerClient) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 009ac238f8..732b8af651 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -4510,8 +4510,10 @@ namespace CalamityMod.NPCs if (ashesOnDeath > 0) { if (Main.rand.NextBool(4)) - Projectile.NewProjectile(npc.GetSource_FromThis(), npc.Center, Main.rand.NextVector2Circular(2.75f, 6.5f), ProjectileType(), 0, 0f, Main.myPlayer, 0f, 0.475f); - + { + RancorFog fog = new(npc.Center, Main.rand.NextVector2Circular(2.75f, 6.5f), 180, Main.rand.NextFloat(0.45f, 0.75f), Main.rand.NextFloat(MathHelper.TwoPi)); + GeneralParticleHandler.SpawnParticle(fog, false, Enums.GeneralDrawLayer.BeforeNPCs); + } if (Main.rand.NextBool(6)) { Vector2 randomPosition = new(npc.position.X + Main.rand.NextFloat(-10f, npc.width + 10f), npc.position.Y + Main.rand.NextFloat(-10f, npc.height + 10f)); diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index e2a793417f..a826f0b013 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -104,10 +104,10 @@ namespace CalamityMod.NPCs #region Sky / Space // Harpy - // Sky Glaze @ 3.33% IF Eye of Cthulhu dead + // Sky Glaze @ 3.33% // Essence of Sunlight @ 50% IF Hardmode and not statue spawned case NPCID.Harpy: - postEoC.Add(ModContent.ItemType(), 30); + npcLoot.Add(ModContent.ItemType(), 30); hardmode.AddIf(() => !npc.SpawnedFromStatue, ModContent.ItemType(), 2); break; @@ -538,8 +538,6 @@ namespace CalamityMod.NPCs npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 15, 10)); break; - // The ectoplasm extra drops got moved to the list section; just like moss hornets - // Hardmode Dungeon Melee Skeletons // Wisp in a Bottle @ 0.5% INSTEAD OF 0.25% case NPCID.RustyArmoredBonesAxe: @@ -604,10 +602,10 @@ namespace CalamityMod.NPCs break; // Fire Imp - // Ashen Stalactite @ 4%, 14.28% after defeating EoW/BoC + // Ashen Stalactite @ 4%, 8.33% after defeating EoW/BoC case NPCID.FireImp: npcLoot.AddIf((info) => !NPC.downedBoss2, ModContent.ItemType(), 25); - npcLoot.AddIf((info) => NPC.downedBoss2, ModContent.ItemType(), 7); + npcLoot.AddIf((info) => NPC.downedBoss2, ModContent.ItemType(), 12); break; // Demon, Voodoo Demon @@ -621,10 +619,10 @@ namespace CalamityMod.NPCs break; // Bone Serpent - // Old Lord Oathsword @ 4% Normal, 14.29% after defeating EoW/BoC + // Old Lord Oathsword @ 4% Normal, 12.5% after defeating EoW/BoC case NPCID.BoneSerpentHead: npcLoot.AddIf((info) => !NPC.downedBoss2, ModContent.ItemType(), 25); - npcLoot.AddIf((info) => NPC.downedBoss2, ModContent.ItemType(), 4); + npcLoot.AddIf((info) => NPC.downedBoss2, ModContent.ItemType(), 8); break; // Red Devil @@ -1833,11 +1831,6 @@ DukeEditFailed: // Ancient Bone Dust @ 20% Normal, 33.33% Expert+ if (CalamityNPCTypeSets.Skeleton[npc.type]) npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 5, 3)); - - // All Hardmode Dungeon Enemies - // Ectoplasm @ 20% - if (CalamityNPCSets.IsBuffedDungeonEnemy[npc.type]) - npcLoot.Add(ItemID.Ectoplasm, 5); #endregion } #endregion diff --git a/NPCs/CalamityVanillaAIOverrideNPC.Global.cs b/NPCs/CalamityVanillaAIOverrideNPC.Global.cs index 33061a02d0..fd02cb8124 100644 --- a/NPCs/CalamityVanillaAIOverrideNPC.Global.cs +++ b/NPCs/CalamityVanillaAIOverrideNPC.Global.cs @@ -230,8 +230,8 @@ public sealed partial class CalamityVanillaAIOverrideNPC : GlobalNPC // Light colors int alpha = 192; - Color groundColor = new Color(150, 0, 0, alpha); - Color flightColor = revenge ? new Color(0, 0, 150, alpha) : groundColor; + Color groundColor = new Color(255, 125, 125, alpha); + Color flightColor = revenge ? new Color(125, 0, 255, alpha) : groundColor; Color segmentColor = Color.Lerp(groundColor, flightColor, phaseTransitionColorAmount); Color telegraphColor_Red = new Color(255, 125, 125, alpha); Color telegraphColor_Green = new Color(125, 255, 125, alpha); @@ -261,23 +261,17 @@ public sealed partial class CalamityVanillaAIOverrideNPC : GlobalNPC telegraphProgress = MathHelper.Clamp((calNPC.newAI[0] - telegraphGateValue) / DestroyerAI.LaserTelegraphTime, 0f, 1f); } } + Color finalColor = Color.Lerp(segmentColor, telegraphColor, telegraphProgress); + Vector3 teleHsl = Main.rgbToHsl(finalColor); - Texture2D glowTexture = CalamityClientConfig.Instance.EnableVanillaTextureEdits ? ExtraTextureRefs.DestroyerHeadGlowmask.Value : TextureAssets.Dest[0].Value; - switch (npc.type) - { - default: - case NPCID.TheDestroyer: - break; - case NPCID.TheDestroyerBody: - glowTexture = CalamityClientConfig.Instance.EnableVanillaTextureEdits ? ExtraTextureRefs.DestroyerBodyGlowmask.Value : TextureAssets.Dest[1].Value; - break; - case NPCID.TheDestroyerTail: - glowTexture = CalamityClientConfig.Instance.EnableVanillaTextureEdits ? ExtraTextureRefs.DestroyerTailGlowmask.Value : TextureAssets.Dest[2].Value; - break; - } + Texture2D glowTexture = TextureAssets.Dest[npc.type - 134].Value; - float alphaMultiplier = 1f - npc.alpha / 255f; - spriteBatch.Draw(glowTexture, npc.Center - screenPos + new Vector2(0, npc.gfxOffY), npc.frame, Color.Lerp(segmentColor, telegraphColor, telegraphProgress) * alphaMultiplier, npc.rotation, halfSize, npc.scale, spriteEffects, 0f); + CalamityUtils.EnterShaderRegion(spriteBatch); + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(1f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(Main.hslToRgb(1f - teleHsl.X, teleHsl.Y, teleHsl.Z)); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + spriteBatch.Draw(glowTexture, npc.Center - screenPos + Vector2.UnitY * npc.gfxOffY, npc.frame, Color.White * npc.Opacity, npc.rotation, halfSize, npc.scale, spriteEffects, 0f); + CalamityUtils.ExitShaderRegion(spriteBatch); } return false; } diff --git a/NPCs/NormalNPCs/HorribleHog/HorribleHog.cs b/NPCs/NormalNPCs/HorribleHog/HorribleHog.cs index dae1ad49b1..3abb8efdd0 100644 --- a/NPCs/NormalNPCs/HorribleHog/HorribleHog.cs +++ b/NPCs/NormalNPCs/HorribleHog/HorribleHog.cs @@ -795,11 +795,17 @@ namespace CalamityMod.NPCs.NormalNPCs.HorribleHog private void SpawnFloorMist(int x, int y) { + //the particles are all just visual + //also, calling lighting check on a server breaks + if (Main.netMode == NetmodeID.Server) + return; + int textureIndex = Main.rand.Next(GoreID.AmbientFloorCloud1, GoreID.AmbientFloorCloud4 + 1); Vector2 position = new Point(x, y - 1).ToWorldCoordinates(); Vector2 velocity = Vector2.UnitX * Main.rand.NextFloat(0.2f, 0.4f) * Main.WindForVisuals; Color mistColor = Color.Lerp(new(30, 30, 30), Color.Crimson, Main.rand.NextBool(3) ? Main.rand.NextFloat(0.2f, 0.8f) : Main.rand.Next(2)); + var point = new Point(x, y); Color color = Color.Lerp(Lighting.GetColor(new Point(x, y)), mistColor, 0.5f); float yOffset = 16f * Main.rand.NextFloat(); diff --git a/NPCs/NormalNPCs/IceClasper.cs b/NPCs/NormalNPCs/IceClasper.cs index eb0e0d1005..a75873716b 100644 --- a/NPCs/NormalNPCs/IceClasper.cs +++ b/NPCs/NormalNPCs/IceClasper.cs @@ -321,7 +321,7 @@ namespace CalamityMod.NPCs.NormalNPCs { npcLoot.Add(ModContent.ItemType()); npcLoot.Add(ModContent.ItemType(), 5); - npcLoot.Add(ModContent.ItemType(), 3); + npcLoot.Add(ModContent.ItemType(), 5); } public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) diff --git a/NPCs/Other/VolatileChain.png b/NPCs/Other/VolatileChain.png new file mode 100644 index 0000000000..32644e4fce Binary files /dev/null and b/NPCs/Other/VolatileChain.png differ diff --git a/NPCs/Other/VolatileSlime.cs b/NPCs/Other/VolatileSlime.cs new file mode 100644 index 0000000000..62bc630d5c --- /dev/null +++ b/NPCs/Other/VolatileSlime.cs @@ -0,0 +1,309 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Security.Principal; +using CalamityMod.DataStructures; +using CalamityMod.Dusts; +using CalamityMod.Particles; +using CalamityMod.Projectiles.Typeless; +using CalamityMod.Systems.Graphic.PixelationSystem; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.NPCs.Other +{ + public class VolatileSlime : ModNPC + { + public override string Texture => $"Terraria/Images/NPC_{NPCID.QueenSlimeMinionPurple}"; + public ref float time => ref NPC.ai[0]; + public ref float playerID => ref NPC.ai[1]; + public Player owner => Main.player[(int)playerID]; + public bool released => NPC.ai[3] != 0; + public bool doOnSpawnEffects = true; + public Color effectColor = Color.BlueViolet; + public List oldVelocities = new List(); + public Vector2 randPos = Vector2.Zero; + public Vector2 goalPositionRand = Vector2.Zero; + public float travelSpeed = 25; + public float glowScale = 1; + public bool drawChains = true; + public float gravIntensity = 1; + public override void SetStaticDefaults() + { + this.HideFromBestiary(); + Main.npcFrameCount[Type] = 4; + } + public override void SetDefaults() + { + NPC.width = NPC.height = 40; + NPC.damage = 0; + NPC.defense = 0; + NPC.lifeMax = 75; + NPC.noGravity = true; + NPC.noTileCollide = true; + NPC.knockBackResist = 0.8f; + NPC.netAlways = true; + NPC.aiStyle = -1; + NPC.Opacity = 0; + NPC.dontTakeDamage = true; + NPC.chaseable = false; + NPC.lavaImmune = true; + NPC.noGravity = true; + NPC.HitSound = SoundID.NPCHit1; + NPC.DeathSound = SoundID.NPCDeath1; + + NPC.Calamity().ProvidesProximityRage = false; + NPC.Calamity().DoesNotDisappearInBossRush = true; + NPC.Calamity().VulnerableToHeat = true; + NPC.Calamity().VulnerableToSickness = false; + } + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(travelSpeed); + writer.Write(gravIntensity); + writer.WriteVector2(goalPositionRand); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + travelSpeed = reader.ReadSingle(); + gravIntensity = reader.ReadSingle(); + goalPositionRand = reader.ReadVector2(); + } + public override void FindFrame(int frameHeight) + { + NPC.frameCounter += 1.0; + if (NPC.frameCounter >= 6.0) + { + NPC.frame.Y += 1; + NPC.frameCounter = 0.0; + } + if (NPC.frame.Y >= (released ? Main.npcFrameCount[Type] / 2 : Main.npcFrameCount[Type])) + NPC.frame.Y = 0; + } + public override void AI() + { + if (doOnSpawnEffects) + { + // In multiplayer, the spawned npc won't spawn with the proper owner, so it just sets it to be the player it spawns on top of + int player = NPC.FindClosestPlayer(); + NPC.ai[1] = player; + + NPC.Opacity = 1; + NPC.scale = 0; + doOnSpawnEffects = false; + NPC.netUpdate = true; + } + float rate = (time * 0.05f); + List eColors = new List() + { + Color.SlateBlue, + Color.BlueViolet + }; + int colorIndex = (int)(rate / 2 % eColors.Count); + Color currentColor = eColors[colorIndex]; + Color nextColor = eColors[(colorIndex + 1) % eColors.Count]; + effectColor = Color.Lerp(currentColor, nextColor, rate % 2f >= 1f ? 1f : rate % 1f); + glowScale = MathHelper.Lerp(glowScale, 1, 0.13f); + + + if (owner.wingTime <= 0 && !released) + { + SoundEngine.PlaySound(SoundID.DD2_WitherBeastCrystalImpact with { pitch = Main.rand.NextFloat(-0.1f, 0.1f), MaxInstances = 10 }, NPC.Center); + time = 0; + NPC.dontTakeDamage = false; + NPC.noTileCollide = false; + NPC.lavaImmune = false; + NPC.frame.Y = 0; + glowScale = 5f; + gravIntensity = Main.rand.NextFloat(0.8f, 1.3f); + + NPC.ai[3] = 1; // release the slimes + NPC.netUpdate = true; + NPC.SyncMotionToServer(); + } + + if (released) + { + float sine = (float)Math.Sin(time * 0.6f / MathHelper.Pi); + if (NPC.velocity.Y < 12 * gravIntensity) + NPC.velocity.Y += 0.4f * gravIntensity; + if (Math.Abs(NPC.velocity.X) < 5 && time < 120) + NPC.velocity.X *= 1.03f; + else + NPC.velocity.X *= 0.987f; + } + else + { + if (time % 120 == 0) + { + goalPositionRand = Main.rand.NextVector2Circular(90, 90); + NPC.netUpdate = true; + } + randPos = Vector2.Lerp(randPos, goalPositionRand, 0.04f); + + float sineX = (float)Math.Sin(time * 0.4f / MathHelper.Pi); + float sineY = (float)Math.Sin(time * 0.6f / MathHelper.Pi); + + NPC.velocity += owner.velocity; + Vector2 destination = owner.Center - Vector2.UnitY * 120 + randPos + new Vector2(10 * sineX, 15 * sineY); + + // Anticlump + int npcType = ModContent.NPCType(); + for (int x = 0; x < Main.maxNPCs; x++) + { + NPC npc = Main.npc[x]; + float distFromNPC = Vector2.Distance(NPC.Center, npc.Center); + if (npc != NPC && npc.active && npc.type == npcType && npc.ai[1] == owner.whoAmI && npc.ai[3] == 0 && distFromNPC < 150) + destination += Utils.DirectionFrom(NPC.Center, npc.Center) * Utils.GetLerpValue(150, 0, distFromNPC) * 25; + } + travelSpeed = MathHelper.Lerp(travelSpeed, (owner.controlJump ? 2 : 25), 0.03f); + + NPC.velocity = (destination - NPC.Center) / travelSpeed; + + if (owner.controlJump && time % 3 == 0) + NPC.netUpdate = true; + } + if (NPC.velocity.X > 0 || NPC.velocity.X < 0) + NPC.spriteDirection = Math.Sign(NPC.velocity.X); + + if (NPC.scale < 1) + NPC.scale += 0.05f; + + if (NPC.collideX) + { + NPC.velocity.X *= -1.2f; + NPC.netUpdate = true; + } + if (NPC.collideY) + { + NPC.velocity.Y += -5.5f * gravIntensity - NPC.velocity.Y; + NPC.netUpdate = true; + } + + // Kill slime after enough time freed + if (Main.netMode != NetmodeID.MultiplayerClient && ((time >= 600f && released) || (!owner.volatileGelatin) || (owner.dead && !released))) + { + NPC.StrikeInstantKill(); + NPC.netUpdate = true; + } + + time++; + + oldVelocities.Add(NPC.velocity); + int maxSaves = 18; + if (oldVelocities.Count > maxSaves) + oldVelocities.RemoveAt(0); + } + public override void OnKill() + { + if (owner.Calamity().volatileGelatinVisuals) + { + for (int i = 0; i <= 22; i++) + { + Vector2 vel = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(3f, 8f); + + Dust dust2 = Dust.NewDustPerfect(NPC.Center, ModContent.DustType(), vel); + dust2.scale = Main.rand.NextFloat(0.8f, 1.7f); + bool gravity = !Main.rand.NextBool(5); + dust2.noGravity = gravity; + if (!gravity) + dust2.velocity /= 2; + dust2.alpha = Main.rand.Next(70, 150 + 1); + dust2.color = Main.rand.NextBool() ? Color.BlueViolet : Color.SlateBlue; + dust2.noLight = true; + dust2.noLightEmittence = true; + } + } + NPC.netUpdate = true; + } + public override bool CanHitPlayer(Player target, ref int cooldownSlot) + { + return false; + } + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) + { + Texture2D texture = released ? Terraria.GameContent.TextureAssets.Npc[NPCID.QueenSlimeMinionBlue].Value : Terraria.GameContent.TextureAssets.Npc[NPCID.QueenSlimeMinionPurple].Value; + Vector2 drawPosition = NPC.Center - screenPos + (Vector2.UnitY * (released ? 8 : 0)); + Rectangle frame = Utils.Frame(texture, verticalFrames: (released ? Main.npcFrameCount[Type] / 2 : Main.npcFrameCount[Type]), frameY: NPC.frame.Y); + Vector2 origin = frame.Size() * 0.5f; + + if (drawChains) + { + Texture2D chain = ModContent.Request("CalamityMod/NPCs/Other/VolatileChain").Value; + Vector2 end = NPC.Center; + + Vector2 drawStart = owner.Center; + List controlPoints = new List + { + drawStart + }; + for (int i = 0; i < oldVelocities.Count; i++) + { + float swayResponsiveness = Utils.GetLerpValue(0f, 18f, i, true) * Utils.GetLerpValue(oldVelocities.Count, oldVelocities.Count - 18f, i, true) * Utils.GetLerpValue(5, 20, Utils.Distance(drawStart, end), true); + Vector2 swayTotalOffset = oldVelocities.ElementAt(i) * swayResponsiveness * -15; + controlPoints.Add(Vector2.Lerp(drawStart, end, i / (float)oldVelocities.Count) + swayTotalOffset); + } + controlPoints.Add(end); + + int chainPointCount = (int)(Vector2.Distance(controlPoints.First(), controlPoints.Last()) / 11f); + if (chainPointCount < 14) + chainPointCount = 14; + + + BezierCurve bezierCurve = new BezierCurve(controlPoints.ToArray()); + List chainPoints = bezierCurve.GetPoints(chainPointCount); + + for (int i = 0; i < chainPoints.Count; i++) + { + float completion = Utils.GetLerpValue(chainPoints.Count * 0.2f, chainPoints.Count, i, true); + Vector2 positionAtPoint = chainPoints[i]; + Color color = Color.Lerp(Lighting.GetColor(positionAtPoint.ToTileCoordinates()), effectColor with { A = 0 }, completion); + + if (Vector2.Distance(owner.Center, positionAtPoint) > 1400) + continue; + if (Vector2.Distance(positionAtPoint, NPC.Center) < 10f) + continue; + float angleAtPoint = i == chainPoints.Count - 1 ? (end - chainPoints[i]).ToRotation() : (chainPoints[i + 1] - chainPoints[i]).ToRotation(); + angleAtPoint += MathHelper.PiOver2; + + SpriteEffects sprfx = (i % 2 == 0 ? SpriteEffects.FlipHorizontally : SpriteEffects.None); + if (i % 4 < 2) + sprfx |= SpriteEffects.FlipVertically; + + if (released) + { + Vector2 vel = Main.rand.NextVector2Circular(2, 2) + NPC.velocity; + if (owner.Calamity().volatileGelatinVisuals) + { + Particle chainfx = new CustomSpark(positionAtPoint, vel, "CalamityMod/NPCs/Other/VolatileChain", Main.rand.NextBool(3), Main.rand.Next(30, 65), 1f, color, Vector2.One, false, false, -vel.ToRotation() + angleAtPoint, false, false, noShrink: false, spin: Main.rand.NextFloat(0, 0.08f) * Math.Sign(vel.X)); + GeneralParticleHandler.SpawnParticle(chainfx); + } + + drawChains = false; + } + + Main.EntitySpriteDraw(chain, positionAtPoint - Main.screenPosition, null, color * (owner.Calamity().volatileGelatinVisuals ? 1 : 0.05f), angleAtPoint, chain.Size() / 2f, 1.1f - (0.3f * (1 - completion)), sprfx, 0); + } + } + + float sine = (float)Math.Sin(time * 0.2f / MathHelper.Pi); + int draws = 12; + for (int i = 0; i < draws; i++) + { + float rotPoint = MathHelper.TwoPi / draws * i; + float dist = (2.5f + sine) * glowScale; + if (owner.Calamity().volatileGelatinVisuals) + spriteBatch.Draw(texture, drawPosition + rotPoint.ToRotationVector2().RotatedBy(Main.GlobalTimeWrappedHourly * 0.2f) * dist, frame, effectColor with { A = 0 } * NPC.Opacity * 0.6f, NPC.rotation, origin, NPC.scale, NPC.spriteDirection == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f); + } + spriteBatch.Draw(texture, drawPosition, frame, Color.Lerp(drawColor, effectColor with { A = 0 }, Utils.GetLerpValue(1, 3, glowScale)) * NPC.Opacity * (owner.Calamity().volatileGelatinVisuals ? 1f : 0.6f), NPC.rotation, origin, NPC.scale, NPC.spriteDirection == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f); + return false; + } + } +} diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 67d27340f0..e751c0a2b2 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -2021,7 +2021,7 @@ namespace CalamityMod.NPCs.Providence // Equipment // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss - // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType())); + // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType())); // Materials normalOnly.Add(ModContent.ItemType(), 1, 50, 60); @@ -2694,7 +2694,7 @@ namespace CalamityMod.NPCs.Providence // Equipment ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType(), // Vanity diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 5117b1748a..7712d363c3 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -876,27 +876,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas rumbleSound.Stop(); canDespawn = true; - for (int x = 0; x < Main.maxProjectiles; x++) - { - Projectile projectile = Main.projectile[x]; - if (projectile.active) - { - if (projectile.type == bulletHellblast || - projectile.type == barrage || - projectile.type == wave) - { - if (projectile.timeLeft > 60) - projectile.timeLeft = 60; - } - else if (projectile.type == fireblast || projectile.type == gigablast) - { - projectile.ai[2] = 1f; - - if (projectile.timeLeft > 15) - projectile.timeLeft = 15; - } - } - } + DespawnProjectiles(); NPC.Opacity = MathHelper.Lerp(NPC.Opacity, 0f, 0.065f); NPC.velocity = Vector2.Lerp(Vector2.UnitY * -4f, Vector2.Zero, (float)Math.Sin(MathHelper.Pi * NPC.Opacity)); @@ -1883,32 +1863,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (!gettingTired5 && IsAtHp_Acceptance) { - for (int x = 0; x < Main.maxProjectiles; x++) - { - Projectile projectile = Main.projectile[x]; - if (projectile.active) - { - if (projectile.type == ModContent.ProjectileType()) - { - if (projectile.timeLeft > 90) - projectile.timeLeft = 90; - } - if (projectile.type == bulletHellblast || - projectile.type == barrage || - projectile.type == wave) - { - if (projectile.timeLeft > 60) - projectile.timeLeft = 60; - } - else if (projectile.type == fireblast || projectile.type == gigablast) - { - projectile.ai[2] = 1f; - - if (projectile.timeLeft > 15) - projectile.timeLeft = 15; - } - } - } + DespawnProjectiles(true); if (!BossRushEvent.BossRushActive) { @@ -1989,6 +1944,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas castFire.noGravity = true; } + DespawnProjectiles(); SoundEngine.PlaySound(SoundID.DD2_DarkMageCastHeal, player.Center); gettingTired = true; return; @@ -1998,27 +1954,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas #region DespawnProjectiles if (bulletHellCounter2 % BulletHellDuration == 0 && despawnProj) { - for (int x = 0; x < Main.maxProjectiles; x++) - { - Projectile projectile = Main.projectile[x]; - if (projectile.active) - { - if (projectile.type == bulletHellblast || - projectile.type == barrage || - projectile.type == wave) - { - if (projectile.timeLeft > 60) - projectile.timeLeft = 60; - } - else if (projectile.type == fireblast || projectile.type == gigablast) - { - projectile.ai[2] = 1f; - - if (projectile.timeLeft > 15) - projectile.timeLeft = 15; - } - } - } + DespawnProjectiles(); despawnProj = false; } #endregion @@ -3186,6 +3122,30 @@ namespace CalamityMod.NPCs.SupremeCalamitas #endregion } + private static void DespawnProjectiles(bool despawnMaelstrom = false) + { + foreach (Projectile p in Main.ActiveProjectiles) + { + if (despawnMaelstrom && p.type == ModContent.ProjectileType()) + { + if (p.timeLeft > 90) + p.timeLeft = 90; + } + if (p.type == ModContent.ProjectileType() || p.type == ModContent.ProjectileType() || p.type == ModContent.ProjectileType()) + { + if (p.timeLeft > 60) + p.timeLeft = 60; + } + else if (p.type == ModContent.ProjectileType() || p.type == ModContent.ProjectileType()) + { + p.ai[2] = 1f; + + if (p.timeLeft > 15) + p.timeLeft = 15; + } + } + } + public void DoHeartsSpawningCastAnimation(Player target, bool death) { int tempSpawnY = spawnY; diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 184b471dde..f98a2eb3ea 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -77,6 +77,7 @@ namespace CalamityMod.NPCs.TownNPCs NPC.Calamity().VulnerableToCold = true; NPC.Calamity().VulnerableToHeat = true; NPC.Calamity().VulnerableToSickness = true; + NPC.housingCategory = 1; // Prevent the Salesman from being instantly evicted when housed with existing Town NPCs as Town Piggy } public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) @@ -112,9 +113,24 @@ namespace CalamityMod.NPCs.TownNPCs { if (CalamityWorld.unlockedTownPig) { + int oldHomeTileX = -1; + int oldHomeTileY = -1; + if (NPC.homeTileX != -1 && NPC.homeTileY != -1 && !NPC.homeless) + { + oldHomeTileX = NPC.homeTileX; + oldHomeTileY = NPC.homeTileY; + } + string name = NPC.GivenName; NPC.Transform(ModContent.NPCType()); NPC.GivenName = name; + // Transform will force all these back to their unset values, so we need to set them back + if (oldHomeTileX != -1 && oldHomeTileY != -1) + { + NPC.homeTileX = oldHomeTileX; + NPC.homeTileY = oldHomeTileY; + NPC.homeless = false; + } } else { @@ -277,17 +293,18 @@ namespace CalamityMod.NPCs.TownNPCs .Add(Condition.MoonPhasesOdd) .Add(Condition.MoonPhasesHalf0) .Add(Condition.MoonPhasesHalf1) - .Add() + .Add(Condition.MoonPhasesEven) + .Add(Condition.MoonPhasesOdd) .Add(Condition.DownedGoblinArmy) - .Add(Condition.DownedGoblinArmy, Condition.MoonPhases04) - .Add(Condition.DownedGoblinArmy, Condition.MoonPhases15) - .Add(Condition.DownedGoblinArmy, Condition.MoonPhases26) - .Add(Condition.DownedGoblinArmy, Condition.MoonPhases37) - .Add() + .Add(Condition.DownedGoblinArmy, Condition.MoonPhasesOdd) + .Add(Condition.DownedGoblinArmy, Condition.MoonPhasesOdd) + .Add(Condition.DownedGoblinArmy, Condition.MoonPhasesEven) + .Add(Condition.DownedGoblinArmy, Condition.MoonPhasesEven) .Add() .Add() .Add() .Add() + .Add(CalamityConditions.DownedDreadnautilus, Condition.BloodMoon) .Add(Condition.Hardmode) .Add(Condition.Hardmode) .Add(Condition.DownedGolem) @@ -597,11 +614,25 @@ namespace CalamityMod.NPCs.TownNPCs } else { - string name = Main.npc[petPig].GivenName; - Main.npc[petPig].Transform(ModContent.NPCType()); - Main.npc[petPig].GivenName = name; + NPC pig = Main.npc[petPig]; + int oldHomeTileX = -1; + int oldHomeTileY = -1; + if (pig.homeTileX != -1 && pig.homeTileY != -1 && !pig.homeless) + { + oldHomeTileX = pig.homeTileX; + oldHomeTileY = pig.homeTileY; + } - string fullName = Main.npc[petPig].FullName; + string name = pig.GivenName; + pig.Transform(ModContent.NPCType()); + pig.GivenName = name; + // Transform will force all these back to their unset values, so we need to set them back + if (oldHomeTileX != -1 && oldHomeTileY != -1) + { + pig.homeTileX = oldHomeTileX; + pig.homeTileY = oldHomeTileY; + pig.homeless = false; + } } CanSpawnTonight = false; } @@ -670,7 +701,7 @@ namespace CalamityMod.NPCs.TownNPCs for (var i = 0; i < tooltips.Count; i++) { var line = tooltips[i]; - if (!ExemptFromSmall.Contains(line.Name)) + if (!ExemptFromSmall.Contains(line.Name) && line.Visible) { if (placetoMove < 0) placetoMove = i; @@ -681,6 +712,15 @@ namespace CalamityMod.NPCs.TownNPCs for (int i2 = 0; i2 < snippets.Length; i2++) { lineText += snippets[i2].Text; + + if (snippets[i2] is BuffTagPlayerEffectHandler.Snippet snip) + { + lineText += Lang.GetBuffName(snip.BuffId); + } + else if (snippets[i2] is BuffTagEnemyEffectHandler.Snippet snip2) + { + lineText += Lang.GetBuffName(snip2.BuffId); + } } if (string.IsNullOrWhiteSpace(lineText)) diff --git a/Particles/RancorFog.cs b/Particles/RancorFog.cs new file mode 100644 index 0000000000..924ea7d408 --- /dev/null +++ b/Particles/RancorFog.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; + +namespace CalamityMod.Particles +{ + public class RancorFog : Particle + { + private float Opacity = 0f; + public override bool UseAdditiveBlend => true; + public override bool SetLifetime => true; + public override bool UseCustomDraw => true; + public RancorFog(Vector2 position, Vector2 velocity, int lifetime, float scale, float rotation) + { + Position = position; + Velocity = velocity; + Lifetime = lifetime; + Scale = scale; + Rotation = rotation; + } + + public override void Update() + { + Rotation += Velocity.X * 0.004f; + Velocity *= 0.985f; + Opacity = Utils.GetLerpValue(0f, 15f, Time, true) * Utils.GetLerpValue(Lifetime, Lifetime - 90f, Time, true); + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D texture = GeneralParticleHandler.GetTexture(Type); + float opacity = Opacity * 0.5f; + Color drawColor = new Color(236, 0, 68) * opacity; + Main.EntitySpriteDraw(texture, Position - Main.screenPosition, null, drawColor, Rotation, texture.Size() * 0.5f, Scale, SpriteEffects.None); + } + } +} diff --git a/Projectiles/Magic/RancorFog.png b/Particles/RancorFog.png similarity index 100% rename from Projectiles/Magic/RancorFog.png rename to Particles/RancorFog.png diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 550d433402..6a5aa23037 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -24,8 +24,10 @@ using CalamityMod.Items.SummonItems; using CalamityMod.Items.VanillaArmorChanges; using CalamityMod.NPCs; using CalamityMod.NPCs.OldDuke; +using CalamityMod.NPCs.Other; using CalamityMod.NPCs.PlagueEnemies; using CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses; +using CalamityMod.Packets; using CalamityMod.Packets.Entities; using CalamityMod.Particles; using CalamityMod.Projectiles.Boss; @@ -211,6 +213,11 @@ namespace CalamityMod.Projectiles ///
public bool grapeBeer = false; + /// + /// If this proj was spawned from the Volatile Gelatin accessory + /// + public bool volatileGelatinSpawned = false; + /// /// How strong grape beer homing is on this. It speeds up the longer the target is targeted. /// @@ -352,6 +359,33 @@ namespace CalamityMod.Projectiles if (Main.player[projectile.owner].Calamity().spiritOrigin && projectile.CountsAsClass()) projectile.Calamity().supercritHits = -1; + IEntitySource sourceItemAcc = source as EntitySource_ItemUse; + + + if (projectile.type == ProjectileID.VolatileGelatinBall && source is EntitySource_ItemUse { Item: Item acc }) + { + if (acc == Main.player[projectile.owner].Calamity().FindAccessory(ItemID.VolatileGelatin)) + { + projectile.DamageType = AverageDamageClass.Instance; + projectile.usesIDStaticNPCImmunity = false; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = -1; + if (projectile.extraUpdates == 0) + projectile.extraUpdates = 1; + if (projectile.timeLeft > 700) + projectile.timeLeft = 700; + projectile.damage = (int)(projectile.damage * 0.60f); // 40% damage nerf + NPC closeTarget = projectile.Center.ClosestNPCAt(640); + Vector2 velocity = (projectile.Center.DirectionTo(closeTarget.Center) + closeTarget.velocity * 0.03f).SafeNormalize(Vector2.UnitX); + projectile.velocity = velocity * 12; + projectile.penetrate = 6; // this is for bounces, actually has pierce 4 + Player player = Main.player[projectile.owner]; + projectile.ApplyStatsFromSource(player.GetSource_FromThis()); + projectile.netUpdate = true; + volatileGelatinSpawned = true; // Mark them as Volatile Gelatin origin + } + } + void ApplyGrapeBeer() { grapeBeer = true; @@ -574,6 +608,47 @@ namespace CalamityMod.Projectiles } } + if (volatileGelatinSpawned) + { + Player player = Main.player[projectile.owner]; + if (projectile.timeLeft == 699 && projectile.FinalExtraUpdate() && player.Calamity().volatileGelatinVisuals) + { + for (int i = 0; i <= 14; i++) + { + float variance = Main.rand.NextFloat(-0.4f, 0.4f); + Vector2 vel = projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(variance) * Main.rand.NextFloat(12f, 17f) * (1 - Math.Abs(variance * 1.5f)); + + Dust dust2 = Dust.NewDustPerfect(player.Center, ModContent.DustType(), vel); + dust2.scale = Main.rand.NextFloat(1.7f, 2.5f) * (1 - Math.Abs(variance * 1.5f)); + bool gravity = !Main.rand.NextBool(5); + dust2.noGravity = gravity; + if (!gravity) + dust2.velocity /= 2; + dust2.alpha = Main.rand.Next(70, 150 + 1); + dust2.color = Main.rand.NextBool() ? Color.BlueViolet : Color.SlateBlue; + dust2.noLight = true; + dust2.noLightEmittence = true; + } + + } + if (projectile.timeLeft > 600 && projectile.numHits == 0) + projectile.velocity.Y -= 0.065f; + else if (projectile.velocity.Y < 14) + projectile.velocity.Y += 0.15f; + + float fade = Utils.GetLerpValue(600, 700, projectile.timeLeft, true); + if (fade > 0 && projectile.timeLeft < 695 && Main.player[projectile.owner].Calamity().volatileGelatinVisuals) + { + Particle spark = new CustomSpark(projectile.Center, -projectile.velocity * 0.05f, "CalamityMod/Particles/BloomCircle", false, 11, 0.52f, Color.BlueViolet * 0.5f * fade, new Vector2(0.7f, 1.2f), true, true, glowCenterScale: 0.7f, glowOpacity: 0.5f * fade, shrinkSpeed: 0.14f); + GeneralParticleHandler.SpawnParticle(spark, false, GeneralDrawLayer.BeforeProjectiles); + } + + if (projectile.numHits > 4) + projectile.Kill(); + if (projectile.timeLeft % 5 == 0) + projectile.netUpdate = true; + } + if (projectile.type == ProjectileID.Skull) { bool fromRevSkeletron = projectile.ai[0] < 0f; @@ -3959,6 +4034,12 @@ namespace CalamityMod.Projectiles if (projectile.aiStyle == ProjAIStyleID.Flare && projectile.ai[2] == 1f && projectile.localAI[0] == 0f) projectile.localAI[1]--; + if (projectile.type == ProjectileID.BoneArrowFromMerchant) // Bone arrow no gravity before hitting tile + { + if (projectile.ai[2] != 1) + projectile.ai[0] = 0; + } + // Hack to allow Desert Tiger minion to fall through platforms while attacking if (projectile.type >= ProjectileID.StormTigerTier1 && projectile.type <= ProjectileID.StormTigerTier3) { @@ -4745,6 +4826,22 @@ namespace CalamityMod.Projectiles modifiers.SourceDamage *= calamityVelocityDamageMultiplier / vanillaVelocityDamageMultiplier; } + if (projectile.type == ProjectileID.UnholyArrow) // damage falloff + { + if (projectile.numHits > 0) + projectile.damage = (int)(projectile.damage * 0.75f / 0.95f); // Vanilla gives it 5% falloff, this cancels that out + if (projectile.damage < 1) + projectile.damage = 1; + } + + if (projectile.type == ProjectileID.HellfireArrow) // damage falloff + { + if (projectile.numHits > 0) + projectile.damage = (int)(projectile.damage * 0.8f); + if (projectile.damage < 1) + projectile.damage = 1; + } + // Adamantite Throwing Axe's lightning has damage falloff if (projectile.type == ProjectileID.CultistBossLightningOrbArc && projectile.ai[2] == 1f) { @@ -4775,6 +4872,48 @@ namespace CalamityMod.Projectiles if (forcedCrit) modifiers.SetCrit(); + if (volatileGelatinSpawned) + { + target.AddBuff(BuffID.GelBalloonBuff, 180); + + float minMult = 0.2f; + int hitsToMinMult = 5; + float damageMult = Utils.Remap(projectile.numHits, 0, hitsToMinMult, 1, minMult, true); + modifiers.SourceDamage *= damageMult; + + if (projectile.numHits == 0) + player.Calamity().volatileGelHits++; + if (player.Calamity().volatileGelHits == 5) + { + player.Calamity().volatileGelHits = 0; + Vector2 spawnPosition = player.Center; + int npcType = ModContent.NPCType(); + + int slimeCap = 6; + int npcCount = 0; + for (int x = 0; x < Main.maxNPCs; x++) + { + NPC npc = Main.npc[x]; + if (npc.active && npc.type == npcType && npc.ai[1] == player.whoAmI && npc.ai[3] == 0) + npcCount++; + } + + if (npcCount < slimeCap && player.wingTime > 0) + { + if (Main.netMode == NetmodeID.MultiplayerClient) + { + SpawnNPCOnPlayerPacket.Send(player, (int)spawnPosition.X, (int)spawnPosition.Y, npcType); + } + else if (Main.netMode == NetmodeID.SinglePlayer) + { + NPC slime = NPC.NewNPCDirect(player.GetSource_FromThis(), (int)spawnPosition.X, (int)spawnPosition.Y, npcType, ai1: player.whoAmI, ai2: npcCount); + } + } + } + + projectile.netUpdate = true; + } + if (modPlayer.rottenDogTooth && projectile.Calamity().stealthStrike && !modPlayer.vampiricTalisman) target.AddBuff(BuffType(), RottenDogtooth.ArmorCrunchDebuffTime); else if (modPlayer.vampiricTalisman && projectile.Calamity().stealthStrike) @@ -5034,6 +5173,26 @@ namespace CalamityMod.Projectiles #region TileCollide public override bool OnTileCollide(Projectile projectile, Vector2 oldVelocity) { + if (projectile.type == ProjectileID.BoneArrowFromMerchant) // Bone arrow bounce + { + if (projectile.velocity.X != oldVelocity.X) + { + projectile.velocity.X = -oldVelocity.X; + } + if (projectile.velocity.Y != oldVelocity.Y) + { + projectile.velocity.Y = -oldVelocity.Y; + } + projectile.timeLeft -= 120; + if (projectile.timeLeft < 1) + projectile.timeLeft = 1; + + if (projectile.ai[2] != 1) + SoundEngine.PlaySound(SoundID.NPCHit2 with { Volume = 0.5f, Pitch = Main.rand.NextFloat(-0.3f, 0.3f), MaxInstances = 10 }, projectile.Center); + projectile.ai[2] = 1; + + return false; + } //Crystal Darts use -1 local that needs to reset whenever they bounce if (projectile.type == ProjectileID.CrystalDart) { @@ -5150,6 +5309,37 @@ namespace CalamityMod.Projectiles } #endregion + if (volatileGelatinSpawned) + { + Texture2D texture = TextureAssets.Projectile[projectile.type].Value; + float rate = (projectile.timeLeft * 0.05f); + List eColors = new List() + { + Color.SlateBlue, + Color.BlueViolet + }; + int colorIndex = (int)(rate / 2 % eColors.Count); + Color currentColor = eColors[colorIndex]; + Color nextColor = eColors[(colorIndex + 1) % eColors.Count]; + Color finalColor = Color.Lerp(currentColor, nextColor, rate % 2f >= 1f ? 1f : rate % 1f); + + float fade = Utils.GetLerpValue(600, 700, projectile.timeLeft, true); + int draws = 12; + if (Main.player[projectile.owner].Calamity().volatileGelatinVisuals) + { + for (int i = 0; i < draws; i++) + { + float rotPoint = MathHelper.TwoPi / draws * i; + float dist = 1.5f * fade; + Main.EntitySpriteDraw(texture, projectile.Center - Main.screenPosition + rotPoint.ToRotationVector2().RotatedBy(Main.GlobalTimeWrappedHourly) * dist, null, finalColor with { A = 0 } * 0.6f * fade, MathF.Pow(projectile.rotation, 2), texture.Size() / 2f, projectile.scale * 1.2f, SpriteEffects.None); + } + } + + Main.EntitySpriteDraw(texture, projectile.Center - Main.screenPosition, null, Color.Lerp(lightColor, Color.White, fade), projectile.rotation, texture.Size() / 2f, projectile.scale, SpriteEffects.None); + + shouldDrawBool = false; + } + if (projectile.type == ProjectileID.DeerclopsIceSpike && (CalamityWorld.revenge || BossRushEvent.BossRushActive)) { bool death = CalamityWorld.death || BossRushEvent.BossRushActive; diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 072e1ddb65..3a6f1fa8dd 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -159,7 +159,7 @@ namespace CalamityMod.Projectiles { ProjectileID.GoldenShowerFriendly, Do(PiercingExact(2), DefaultIDStaticIFrames) }, { ProjectileID.GreenCounterweight, counterweightTweaks }, { ProjectileID.Hamdrax, standardDrillTweaks }, // Drax (never internally renamed since 1.1) - { ProjectileID.HellfireArrow, Do(ExtraUpdatesDelta(+2)) }, + { ProjectileID.HellfireArrow, Do(ExtraUpdatesDelta(+2), LocalIFrames(-1)) }, { ProjectileID.IceBoomerang, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, { ProjectileID.IceSickle, Do(ExtraUpdatesExact(1)) }, { ProjectileID.IchorBullet, Do(ExtraUpdatesDelta(+2), DefaultIDStaticIFrames) }, @@ -300,7 +300,7 @@ namespace CalamityMod.Projectiles { ProjectileID.BombFish, defaultIFrames }, { ProjectileID.Bone, defaultIFrames }, { ProjectileID.BoneArrow, defaultIFrames }, - { ProjectileID.BoneArrowFromMerchant, defaultIFrames }, + { ProjectileID.BoneArrowFromMerchant, Do(ExtraUpdatesExact(2), LocalIFrames(-1)) }, { ProjectileID.BoneDagger, defaultIFrames }, { ProjectileID.BookOfSkullsSkull, defaultIFrames }, { ProjectileID.BookStaffShot, defaultIFrames }, @@ -413,7 +413,7 @@ namespace CalamityMod.Projectiles { ProjectileID.IchorDart, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, { ProjectileID.JackOLantern, defaultIFrames }, { ProjectileID.JavelinFriendly, defaultIFrames }, - { ProjectileID.JestersArrow, defaultIFrames }, + { ProjectileID.JestersArrow, Do(LocalIFrames(-1)) }, { ProjectileID.Landmine, defaultIFrames }, { ProjectileID.LaserMachinegun, defaultIFrames }, { ProjectileID.LaserMachinegunLaser, defaultIFrames }, @@ -580,7 +580,7 @@ namespace CalamityMod.Projectiles { ProjectileID.TruffleSpore, defaultIFrames }, { ProjectileID.UFOLaser, defaultIFrames }, { ProjectileID.UFOMinion, defaultIFrames }, - { ProjectileID.UnholyArrow, defaultIFrames }, + { ProjectileID.UnholyArrow, Do(LocalIFrames(-1)) }, { ProjectileID.UnholyTridentFriendly, defaultIFrames }, { ProjectileID.UnholyWater, defaultIFrames }, { ProjectileID.VampireKnife, defaultIFrames }, diff --git a/Projectiles/DraedonsArsenal/AugerSlash.cs b/Projectiles/DraedonsArsenal/AugerSlash.cs index 4010a6be88..10660af22a 100644 --- a/Projectiles/DraedonsArsenal/AugerSlash.cs +++ b/Projectiles/DraedonsArsenal/AugerSlash.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); float launchPower = (Projectile.ai[2] == 5 ? 35 : 14); - target.MoveNPC(launchVel, launchPower, true, Owner); + target.MoveNPC(launchVel, launchPower, Projectile.ai[2] == 5, Owner); if (Projectile.ai[2] == 5) modifiers.ApplyScalingForcedCrit(Projectile); diff --git a/Projectiles/Magic/RancorFog.cs b/Projectiles/Magic/RancorFog.cs deleted file mode 100644 index bc4ee599e4..0000000000 --- a/Projectiles/Magic/RancorFog.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Collections.Generic; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Magic -{ - public class RancorFog : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Magic"; - public ref float LightPower => ref Projectile.ai[0]; - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 184; - Projectile.penetrate = -1; - Projectile.tileCollide = false; - Projectile.DamageType = DamageClass.Magic; - Projectile.timeLeft = 210; - Projectile.hide = true; - Projectile.ignoreWater = true; - } - - public override void AI() - { - // Decide scale and initial rotation on the first frame this projectile exists. - if (Projectile.localAI[0] == 0f) - { - Projectile.scale = Main.rand.NextFloat(1f, 1.7f) * Projectile.ai[1]; - Projectile.rotation = Main.rand.NextFloat(MathHelper.TwoPi); - Projectile.localAI[0] = 1f; - } - - Projectile.rotation += Projectile.velocity.X * 0.004f; - Projectile.velocity *= 0.985f; - - // 08DEC2023: Ozzatron: All below code does not run on dedicated servers as it requires clientside lighting information. - if (Main.dedServ) - return; - - // Calculate light power. This checks below the position of the fog to check if this fog is underground. - // Without this, it may render over the fullblack that the game renders for obscured tiles. - float lightPowerBelow = Lighting.GetColor((int)Projectile.Center.X / 16, (int)Projectile.Center.Y / 16 + 6).ToVector3().Length() / (float)Math.Sqrt(3D); - LightPower = MathHelper.Lerp(LightPower, lightPowerBelow, 0.15f); - Projectile.Opacity = Utils.GetLerpValue(210f, 195f, Projectile.timeLeft, true) * Utils.GetLerpValue(0f, 90f, Projectile.timeLeft, true); - } - - public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) - { - behindNPCsAndTiles.Add(index); - } - - public override bool PreDraw(ref Color lightColor) - { - Main.spriteBatch.SetBlendState(BlendState.Additive); - - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Vector2 origin = texture.Size() * 0.5f; - Vector2 drawPosition = Projectile.Center - Main.screenPosition; - float opacity = Utils.GetLerpValue(0f, 0.08f, LightPower, true) * Projectile.Opacity * 0.5f; - Color drawColor = new Color(236, 0, 68) * opacity; - Vector2 scale = Projectile.Size / texture.Size() * Projectile.scale; - Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, Projectile.rotation, origin, scale, SpriteEffects.None, 0); - - Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); - return false; - } - } -} diff --git a/Projectiles/Magic/RancorHoldout.cs b/Projectiles/Magic/RancorHoldout.cs index 8091e26805..0b1e159ae2 100644 --- a/Projectiles/Magic/RancorHoldout.cs +++ b/Projectiles/Magic/RancorHoldout.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Magic // Cast the magic circle on the first frame. if (Main.myPlayer == Projectile.owner && Time == 1f) - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.originalDamage, Projectile.knockBack, Projectile.owner); // Handle frames. Projectile.frameCounter++; diff --git a/Projectiles/Magic/RancorLaserbeam.cs b/Projectiles/Magic/RancorLaserbeam.cs index c79eea665f..be82b4092d 100644 --- a/Projectiles/Magic/RancorLaserbeam.cs +++ b/Projectiles/Magic/RancorLaserbeam.cs @@ -4,6 +4,7 @@ using System.Linq; using CalamityMod.Graphics.Metaballs; using CalamityMod.Graphics.Primitives; using CalamityMod.NPCs; +using CalamityMod.Particles; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -128,7 +129,8 @@ namespace CalamityMod.Projectiles.Magic public void CreateTileHitEffects() { Vector2 endOfLaser = Projectile.Center + Projectile.velocity * (LaserLength - Main.rand.NextFloat(12f, 72f)); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), endOfLaser, Main.rand.NextVector2Circular(4f, 8f), ModContent.ProjectileType(), 0, 0f, Projectile.owner, 0f, 1f); + RancorFog fog = new(endOfLaser, Main.rand.NextVector2Circular(4f, 8f), 180, Main.rand.NextFloat(1f, 1.7f), Main.rand.NextFloat(MathHelper.TwoPi)); + GeneralParticleHandler.SpawnParticle(fog, false, Enums.GeneralDrawLayer.BeforeNPCs); if (Main.rand.NextBool()) { diff --git a/Projectiles/Magic/RancorMagicCircle.cs b/Projectiles/Magic/RancorMagicCircle.cs index 908e460f4d..33ecd8b802 100644 --- a/Projectiles/Magic/RancorMagicCircle.cs +++ b/Projectiles/Magic/RancorMagicCircle.cs @@ -184,7 +184,7 @@ namespace CalamityMod.Projectiles.Magic SoundEngine.PlaySound(SoundID.Zombie104, Projectile.Center); if (Main.myPlayer == Projectile.owner) - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, Projectile.identity); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity, ModContent.ProjectileType(), Projectile.originalDamage, Projectile.knockBack, Projectile.owner, Projectile.identity); } } diff --git a/Projectiles/Melee/AtaraxiaBoom.cs b/Projectiles/Melee/AtaraxiaBoom.cs index e8a9209d6c..b7ccf781d0 100644 --- a/Projectiles/Melee/AtaraxiaBoom.cs +++ b/Projectiles/Melee/AtaraxiaBoom.cs @@ -69,10 +69,8 @@ namespace CalamityMod.Projectiles.Melee } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - if (Projectile.numHits > 0) - Projectile.damage = (int)(Projectile.damage * 0.88f); - if (Projectile.damage < 1) - Projectile.damage = 1; + float damageMult = MathHelper.Clamp(Utils.GetLerpValue(4, 0, Projectile.numHits), 0.2f, 1); + modifiers.SourceDamage *= damageMult; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.ai[0] == 1 ? 130 : 200, targetHitbox); } diff --git a/Projectiles/Melee/CometQuasherMeteor.cs b/Projectiles/Melee/CometQuasherMeteor.cs index c5ed0d8f22..7c7101a961 100644 --- a/Projectiles/Melee/CometQuasherMeteor.cs +++ b/Projectiles/Melee/CometQuasherMeteor.cs @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.owner == Main.myPlayer) { - Projectile.damage = (int)(Projectile.damage * 0.7f); + Projectile.damage = (int)(Projectile.damage * 0.5f); Projectile.ExpandHitboxBy((int)(128f * Projectile.scale)); Projectile.penetrate = -1; Projectile.Damage(); diff --git a/Projectiles/Melee/DarkBeam.cs b/Projectiles/Melee/DarkBeam.cs index 8f22487732..3c3c5694d7 100644 --- a/Projectiles/Melee/DarkBeam.cs +++ b/Projectiles/Melee/DarkBeam.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Melee private const float MaxVelocity = DarklightGreatsword.ShootSpeed * 12f; - private const int FadeOutTime = 85; + private const int FadeOutTime = 30; - private const int TimeLeft = 215 + FadeOutTime; + private const int TimeLeft = 150 + FadeOutTime; private const int Alpha = 100; diff --git a/Projectiles/Melee/DevilsDevastationHoldout.cs b/Projectiles/Melee/DevilsDevastationHoldout.cs index acb46b317d..891f073e4b 100644 --- a/Projectiles/Melee/DevilsDevastationHoldout.cs +++ b/Projectiles/Melee/DevilsDevastationHoldout.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Melee // This is needed because EntitySource_ItemUse always sets Projectile.originalDamage to the item's damage, // regardless of the value passed into the damage argument of NewProjectile. // This results in continuous updating damage resetting the damage. - Projectile.originalDamage *= 15; + Projectile.originalDamage *= DevilsDevastation.BigSlashDamageMult; } public override void WhenSpawned() { @@ -117,7 +117,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.666f), 0f, Owner.whoAmI, lastHitTarget.whoAmI, 0); + Projectile strike = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), lastHitTarget.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * DevilsDevastation.MarkDamageMult), 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/DraconicSpark.cs b/Projectiles/Melee/DraconicSpark.cs index 94db48ae6e..18053a462e 100644 --- a/Projectiles/Melee/DraconicSpark.cs +++ b/Projectiles/Melee/DraconicSpark.cs @@ -30,9 +30,9 @@ namespace CalamityMod.Projectiles.Melee } // ai[0] controls what type of Draconic Spark this is. - // 0 = Orange spark (inflicts Daybroken) - // 1 = Red spark (inflicts Abyssal Flames) - // 2 = Yellow spark (inflicts Holy Flames) + // 0 = Orange spark + // 1 = Red spark + // 2 = Yellow spark public override void AI() { DrawProjectile(); diff --git a/Projectiles/Melee/DragonPowFlail.cs b/Projectiles/Melee/DragonPowFlail.cs index 708d4bba92..6ead67d9bf 100644 --- a/Projectiles/Melee/DragonPowFlail.cs +++ b/Projectiles/Melee/DragonPowFlail.cs @@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.ai[1] % 4 == 0) { int type = ModContent.ProjectileType(); - int damage = Projectile.damage / 8; + int damage = Projectile.damage / 2; float kb = 3f; float speed = DragonPow.SparkSpeed; Vector2 vel = new Vector2(speed, 0f).RotatedByRandom(MathHelper.TwoPi); @@ -196,7 +196,7 @@ namespace CalamityMod.Projectiles.Melee { int type = ModContent.ProjectileType(); int numWaterfalls = 12; - int waterfallDamage = Projectile.damage / 6; + int waterfallDamage = Projectile.damage / 4; float waterfallKB = 0f; for (int i = 0; i < numWaterfalls; ++i) { diff --git a/Projectiles/Melee/HellionSpike.cs b/Projectiles/Melee/HellionSpike.cs index bae234c799..988ab29af4 100644 --- a/Projectiles/Melee/HellionSpike.cs +++ b/Projectiles/Melee/HellionSpike.cs @@ -21,12 +21,9 @@ namespace CalamityMod.Projectiles.Melee Projectile.aiStyle = ProjAIStyleID.Beam; Projectile.friendly = true; Projectile.DamageType = DamageClass.Melee; - Projectile.penetrate = 2; Projectile.MaxUpdates = 2; - Projectile.timeLeft = 600; + Projectile.timeLeft = 180; AIType = ProjectileID.SporeCloud; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 8 * Projectile.MaxUpdates; } public override void AI() @@ -48,7 +45,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - if (Projectile.timeLeft > 595) + if (Projectile.timeLeft > 175) return false; CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); diff --git a/Projectiles/Melee/HellkiteHoldout.cs b/Projectiles/Melee/HellkiteHoldout.cs index 7b5e9eb869..11d051bd9f 100644 --- a/Projectiles/Melee/HellkiteHoldout.cs +++ b/Projectiles/Melee/HellkiteHoldout.cs @@ -399,7 +399,7 @@ namespace CalamityMod.Projectiles.Melee float minMult = 0.25f; int hitsToMinMult = 10; float damageMult = Utils.Remap(pierceReduction, 0, hitsToMinMult, 1, minMult, true); - modifiers.SourceDamage *= (chargedSwing ? 2.9f : 1) * damageMult; + modifiers.SourceDamage *= (chargedSwing ? 2.5f : 1) * damageMult; } public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Melee/LightBeam.cs b/Projectiles/Melee/LightBeam.cs index 68a27275bc..8a285a2d6e 100644 --- a/Projectiles/Melee/LightBeam.cs +++ b/Projectiles/Melee/LightBeam.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Melee private const float MaxVelocity = DarklightGreatsword.ShootSpeed * 12f; - private const int FadeOutTime = 85; + private const int FadeOutTime = 30; - private const int TimeLeft = 215 + FadeOutTime; + private const int TimeLeft = 150 + FadeOutTime; private const int Alpha = 100; diff --git a/Projectiles/Melee/LightspeedDashHitbox.cs b/Projectiles/Melee/LightspeedDashHitbox.cs index f7a5b243a0..7a8a30cd34 100644 --- a/Projectiles/Melee/LightspeedDashHitbox.cs +++ b/Projectiles/Melee/LightspeedDashHitbox.cs @@ -6,6 +6,7 @@ using CalamityMod.Sounds; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee @@ -16,6 +17,11 @@ namespace CalamityMod.Projectiles.Melee public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public Player Owner => Main.player[Projectile.owner]; + public override void SetStaticDefaults() + { + ProjectileID.Sets.AllowsContactDamageFromJellyfish[Type] = true; + } + public override void SetDefaults() { Projectile.width = 150; diff --git a/Projectiles/Melee/LightspeedHoldout.cs b/Projectiles/Melee/LightspeedHoldout.cs index 4560a28a28..4bc74155ad 100644 --- a/Projectiles/Melee/LightspeedHoldout.cs +++ b/Projectiles/Melee/LightspeedHoldout.cs @@ -84,90 +84,61 @@ namespace CalamityMod.Projectiles.Melee public void Positioning(Vector2 toMouse) // Hand and holdout positioning { - if (DashState == 2) + Owner.heldProj = Projectile.whoAmI; + Owner.itemTime = Owner.itemAnimation = 2; + + bool isDashing = DashState == 2; + Vector2 baseDir = isDashing ? Projectile.velocity.SafeNormalize(Vector2.UnitX * Owner.direction) : toMouse; + Owner.ChangeDir(Math.Sign(baseDir.X)); + + float playerArmRotation = new Vector2(baseDir.X, baseDir.Y * Owner.gravDir).ToRotation(); + float worldArmRotation = baseDir.ToRotation(); // The absolute world angle to point the projectile + + float compositeArmRotation; + + if (isDashing) { - Vector2 dashDirection = Projectile.velocity.SafeNormalize(Vector2.UnitX * Owner.direction); - Owner.ChangeDir(Math.Sign(dashDirection.X)); - - float dashArmRotation = dashDirection.ToRotation(); - float dashCompositeArmRotation = dashArmRotation + (MathHelper.TwoPi * 0.75f); - - Owner.SetCompositeArmFront(true, CompositeArmStretchAmount.Full, dashCompositeArmRotation); - Owner.SetCompositeArmBack(true, CompositeArmStretchAmount.Full, 0f); - bladeRot = 0; - - handPos = Owner.GetFrontHandPosition(CompositeArmStretchAmount.Full, dashCompositeArmRotation); + compositeArmRotation = playerArmRotation + (MathHelper.TwoPi * 0.75f); + handPos = Owner.GetFrontHandPosition(CompositeArmStretchAmount.Full, compositeArmRotation); Projectile.Center = handPos; - Owner.heldProj = Projectile.whoAmI; - Owner.itemTime = Owner.itemAnimation = 2; + // Keep projectile rotation in world space, but invert the offset direction when flipped + Projectile.rotation = worldArmRotation + (Owner.direction == 1 ? MathHelper.PiOver4 : MathHelper.Pi * 0.75f) * Owner.gravDir; - // Visual rotation - Projectile.rotation = dashArmRotation; - Projectile.rotation = Projectile.velocity.ToRotation() + (Owner.direction == 1 ? MathHelper.PiOver4 : MathHelper.Pi * 0.75f); - Projectile.rotation += 0.15f * Owner.direction; // Adjustment to make the tip look like its more directly pointing at cursor - - // Item rotation (for arm positioning) - Owner.itemRotation = dashArmRotation + MathHelper.PiOver4; - - if (Owner.direction != 1) - { - Owner.itemRotation -= MathHelper.TwoPi * 0.75f; - } - - Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + Owner.itemRotation = playerArmRotation + MathHelper.PiOver4 - (Owner.direction != 1 ? MathHelper.TwoPi * 0.75f : 0f); } - else // If not in dash { - Owner.ChangeDir(Math.Sign(toMouse.X)); + compositeArmRotation = playerArmRotation + bladeRot - MathHelper.PiOver2; - float baseArmRotation = toMouse.ToRotation(); - float compositeArmRotation = baseArmRotation + bladeRot - MathHelper.PiOver2; - - Owner.SetCompositeArmFront(true, CompositeArmStretchAmount.Full, compositeArmRotation); - Owner.SetCompositeArmBack(true, CompositeArmStretchAmount.Full, 0f); - - Vector2 actualInnateOffset = innateOffset; + Vector2 actualOffset = innateOffset; if (Owner.direction == -1) { - actualInnateOffset.X += 1f; - actualInnateOffset.Y += 2f; + actualOffset.X += 1f; + actualOffset.Y += 2f; } - handPos = Owner.GetFrontHandPosition(CompositeArmStretchAmount.Full, compositeArmRotation) + actualInnateOffset.RotatedBy(baseArmRotation); - + actualOffset.Y *= Owner.gravDir; + handPos = Owner.GetFrontHandPosition(CompositeArmStretchAmount.Full, compositeArmRotation) + actualOffset.RotatedBy(worldArmRotation); Projectile.velocity = toMouse; - Projectile.rotation = toMouse.ToRotation() + bladeRot; - Projectile.rotation += MathHelper.PiOver2 * 0.5f; // Adjustment made so texture actually faces cursor - Projectile.rotation += 0.15f * Owner.direction; // Another to make the tip look like its more directly pointing at cursor + // Adjust sprite rotation logic to compensate for the vertical flip applied in PreDraw + float rotOffset = MathHelper.PiOver4 * Owner.gravDir; if (Owner.direction == -1) - { - Projectile.rotation -= MathHelper.TwoPi * 0.75f; - } + rotOffset -= (Owner.gravDir == 1f ? MathHelper.TwoPi * 0.75f : MathHelper.PiOver2); + Projectile.rotation = worldArmRotation + bladeRot + rotOffset; Projectile.Center = handPos + toMouse * Projectile.scale; - Owner.heldProj = Projectile.whoAmI; - Owner.itemTime = Owner.itemAnimation = 2; - - // Item rotation (for arm positioning) - Owner.itemRotation = Projectile.rotation - MathHelper.PiOver4; // Adjustment undone for arm pos - if (Owner.direction == -1) - { - Owner.itemRotation -= MathHelper.Pi; - } - else - { - Owner.itemRotation -= MathHelper.PiOver2; - } - - Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); - + // Simplified: The messy itemRotation calculation mathematically reduces to just this! + Owner.itemRotation = compositeArmRotation; } + + Owner.SetCompositeArmFront(true, CompositeArmStretchAmount.Full, compositeArmRotation); + Owner.SetCompositeArmBack(true, CompositeArmStretchAmount.Full, 0f); + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); } public override void AI() @@ -206,7 +177,7 @@ namespace CalamityMod.Projectiles.Melee if (Owner.altFunctionUse == 0 && DashState == 0) { - Projectile.Center += (Utils.DirectionTo(Owner.MountedCenter, Owner.ClampedMouseWorld()) * Main.rand.NextFloat(-5f, 8f)); + Projectile.Center += (Utils.DirectionTo(Owner.MountedCenter, Owner.ClampedMouseWorld()) * Main.rand.NextFloat(-5f, 8f)); // When using M1, randomly offset position UsePrimary(toMouse); } @@ -228,6 +199,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 stabOrigin = Projectile.Center; Vector2 stabTip = stabOrigin + stabDir * 62f * Projectile.scale; + // Spawn spawks extending out of the blade which represent the hitbox for (int i = 0; i < 4; i++) { Vector2 spawnPos = stabTip + Main.rand.NextVector2Circular(18f, 12f) * Projectile.scale; @@ -237,10 +209,27 @@ namespace CalamityMod.Projectiles.Melee GeneralParticleHandler.SpawnParticle(spark); } - Particle afterImage = new CustomSpark(Projectile.Center + (stabDir * 10f) + Main.rand.NextVector2Circular(4f, 11f), (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2(), new("CalamityMod/Items/Weapons/Melee/Lightspeed"), false, Main.rand.Next(5,9), 0.6f * Main.rand.NextFloat(0.9f, 1.02f), Color.White * Main.rand.NextFloat(0.66f, 0.825f), new Vector2(1, 1), true, false, flipHorizontal: Owner.direction == -1 ? true : false); + bool flipParticle = Owner.gravDir == -1 ? Owner.direction == 1 : Owner.direction == -1; + + float rotOffset = Owner.gravDir == -1 ? -MathHelper.PiOver4 : MathHelper.PiOver4; + Vector2 afterImageDir = Owner.direction == -1 ? stabDir.RotatedBy(rotOffset) : stabDir.RotatedBy(-rotOffset); + + Particle afterImage = new CustomSpark( + Projectile.Center + (stabDir * 10f) + Main.rand.NextVector2Circular(4f, 11f), + afterImageDir, + new("CalamityMod/Items/Weapons/Melee/Lightspeed"), + false, + Main.rand.Next(5, 9), + 0.6f * Main.rand.NextFloat(0.9f, 1.02f), + Color.White * Main.rand.NextFloat(0.66f, 0.825f), + new Vector2(1, 1), + true, + false, + flipHorizontal: flipParticle + ); GeneralParticleHandler.SpawnParticle(afterImage); - // Make blade randomly vibrate + // Make blade randomly vibrate and draw with quirks bladeRot = Main.rand.NextFloat(-0.12f, 0.3f) * Owner.direction; Projectile.scale *= Main.rand.NextFloat(0.75f, 1f); Projectile.Center += stabDir + Main.rand.NextVector2Circular(7f, 1.5f); @@ -249,9 +238,7 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation += bladeRot * 0.1f; // Make arm randomly vibrate if (Main.rand.NextBool()) - { Owner.SetCompositeArmFront(true, Main.rand.NextBool() ? CompositeArmStretchAmount.ThreeQuarters : CompositeArmStretchAmount.Quarter, Owner.itemRotation); - } stabSoundTimer++; if (stabSoundTimer % 3 == 0) @@ -297,26 +284,27 @@ namespace CalamityMod.Projectiles.Melee float eased = MathF.Pow(t, 1.2f); AltSpinRotation = eased * (4f * MathHelper.Pi * 0.7175f); - float orbitalAngle = AltSpinRotation * initialDirectionForThisAnim + (initialDirectionForThisAnim == -1 ? MathHelper.Pi : 0); + + float orbitalAngle = (AltSpinRotation * initialDirectionForThisAnim + (initialDirectionForThisAnim == -1 ? MathHelper.Pi : 0)) * Owner.gravDir; float orbitRadius = 40f; Projectile.Center = Owner.MountedCenter + orbitalAngle.ToRotationVector2() * orbitRadius; - float tangentAngle = orbitalAngle + (initialDirectionForThisAnim == 1 ? MathHelper.PiOver4 : -MathHelper.PiOver4 + MathHelper.Pi); - Projectile.rotation = tangentAngle; // Proper arm positioning - Vector2 armDirection = Projectile.Center - Owner.MountedCenter; - float baseArmRotation = armDirection.ToRotation(); + float rotOffset = MathHelper.PiOver4 * Owner.gravDir; + if (initialDirectionForThisAnim == -1) + rotOffset -= (Owner.gravDir == 1f ? MathHelper.TwoPi * 0.75f : MathHelper.PiOver2); - float compositeArmRotation = baseArmRotation + (initialDirectionForThisAnim == 1 ? MathHelper.TwoPi * 0.75f : -MathHelper.PiOver2); + Projectile.rotation = orbitalAngle + rotOffset; + + Vector2 armDirection = Projectile.Center - Owner.MountedCenter; + float playerArmRotation = new Vector2(armDirection.X, armDirection.Y * Owner.gravDir).ToRotation(); + + float compositeArmRotation = playerArmRotation + (initialDirectionForThisAnim == 1 ? MathHelper.TwoPi * 0.75f : -MathHelper.PiOver2); Owner.SetCompositeArmFront(true, CompositeArmStretchAmount.Full, compositeArmRotation); Owner.SetCompositeArmBack(true, CompositeArmStretchAmount.Full, 0f); - Owner.itemRotation = baseArmRotation; - if (Owner.direction == -1) - Owner.itemRotation += MathHelper.Pi; - - Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + Owner.itemRotation = MathHelper.WrapAngle(compositeArmRotation); } // Mid-spin VFX @@ -390,7 +378,7 @@ namespace CalamityMod.Projectiles.Melee public float PierceWidthFunction(float completionRatio, Vector2 vertexPos) { float width = Utils.GetLerpValue(0f, 0.2f, completionRatio, true) * Projectile.scale * 24f; - //Fade it out starkly near the end of the lunge + // Fade it out starkly near the end of the lunge width *= (1 - (float)Math.Pow(LungeProgression, 4)); return width; } @@ -400,15 +388,21 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { Texture2D texture = ModContent.Request(Texture).Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; - Rectangle frame = new Rectangle(0, Projectile.frame * frameHeight, texture.Width, frameHeight); - Vector2 origin = new Vector2(texture.Width / 2f, frameHeight / 2f); + Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Vector2 origin = frame.Size() / 2f; - SpriteEffects spriteEffects = Owner.direction == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - lightColor = Color.White; // Fullbright - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, lightColor * Projectile.Opacity, Projectile.rotation, origin, 0.6f, spriteEffects, 0); + SpriteEffects spriteEffects = SpriteEffects.None; + if (Owner.direction == -1) + spriteEffects |= SpriteEffects.FlipHorizontally; - DrawPierceTrail(); + // Account for inverse gravity + if (Owner.gravDir == -1f) + spriteEffects |= SpriteEffects.FlipVertically; + + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Color.White * Projectile.Opacity, Projectile.rotation, origin, 0.6f, spriteEffects, 0); + + if (DashState == 2) + DrawPierceTrail(); return false; } diff --git a/Projectiles/Melee/LightspeedM1Hitbox.cs b/Projectiles/Melee/LightspeedM1Hitbox.cs index aad114d70e..42639269a0 100644 --- a/Projectiles/Melee/LightspeedM1Hitbox.cs +++ b/Projectiles/Melee/LightspeedM1Hitbox.cs @@ -5,6 +5,7 @@ using CalamityMod.NPCs; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee @@ -15,9 +16,13 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public Player Owner => Main.player[Projectile.owner]; - public bool gotEnergyThisSwing = false; + public override void SetStaticDefaults() + { + ProjectileID.Sets.AllowsContactDamageFromJellyfish[Type] = true; + } + public override void SetDefaults() { Projectile.width = 25; diff --git a/Projectiles/Melee/OrderbringerBeam.cs b/Projectiles/Melee/OrderbringerBeam.cs index 96fa3fea63..f546630e46 100644 --- a/Projectiles/Melee/OrderbringerBeam.cs +++ b/Projectiles/Melee/OrderbringerBeam.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Melee Player Owner = Main.player[Projectile.owner]; float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); - if (Projectile.timeLeft % 12 == 0 && targetDist < 1400f) + if (!CalamityClientConfig.Instance.Photosensitivity && Projectile.timeLeft % 12 == 0 && targetDist < 1400f) { Particle spark = new CustomSpark(Projectile.Center, Projectile.velocity * 0.2f, "CalamityMod/Particles/BloomCircle", false, 23, 0.25f * Projectile.scale, mainColor * 0.75f, new Vector2(1f, 7.35f), true, true, shrinkSpeed: 0.2f, glowOpacity: 0.7f); GeneralParticleHandler.SpawnParticle(spark); diff --git a/Projectiles/Melee/RemsRevengeExplosion.cs b/Projectiles/Melee/RemsRevengeExplosion.cs index 6289b62d1e..adc02309a1 100644 --- a/Projectiles/Melee/RemsRevengeExplosion.cs +++ b/Projectiles/Melee/RemsRevengeExplosion.cs @@ -66,7 +66,12 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 60); - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => modifiers.HitDirectionOverride = (Owner.Center.X < target.Center.X).ToDirectionInt(); + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + float damageMult = MathHelper.Clamp(Utils.GetLerpValue(3, 0, Projectile.numHits), 0.1f, 1); + modifiers.SourceDamage *= damageMult; + modifiers.HitDirectionOverride = (Owner.Center.X < target.Center.X).ToDirectionInt(); + } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CircularHitboxCollision(Projectile.Center, Projectile.width * Projectile.scale, targetHitbox); } diff --git a/Projectiles/Melee/SeashineSwordProj.cs b/Projectiles/Melee/SeashineSwordProj.cs index e779042974..c493bcb217 100644 --- a/Projectiles/Melee/SeashineSwordProj.cs +++ b/Projectiles/Melee/SeashineSwordProj.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Melee { public new string LocalizationCategory => "Projectiles.Melee"; - private const int TimeLeft = 600; + private const int TimeLeft = 120; private const int MaxAlpha = 255; diff --git a/Projectiles/Melee/SkytideDragoonHoldout.cs b/Projectiles/Melee/SkytideDragoonHoldout.cs index 43171a0be7..5fc0e0be7b 100644 --- a/Projectiles/Melee/SkytideDragoonHoldout.cs +++ b/Projectiles/Melee/SkytideDragoonHoldout.cs @@ -221,7 +221,7 @@ namespace CalamityMod.Projectiles.Melee Owner.SetScreenshake(3f); SoundStyle sound = new("CalamityMod/Sounds/Item/SkytideBolt"); SoundEngine.PlaySound(sound with { Volume = 0.8f }, Projectile.Center); - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center + new Vector2(0, -600), new Vector2(0, 10), ModContent.ProjectileType(), (int)(Projectile.damage * 10), Projectile.knockBack, Projectile.owner, 0, 0.5f); + Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center + new Vector2(0, -600), new Vector2(0, 10), ModContent.ProjectileType(), Projectile.damage * 8, Projectile.knockBack, Projectile.owner, 0, 0.5f); proj.timeLeft = (int)(45 / Projectile.scale); proj.scale = Projectile.scale; swingCount = 0; @@ -234,7 +234,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(fire with { Volume = 1f, Pitch = -0.2f }, Projectile.Center); SoundStyle fire2 = new("CalamityMod/Sounds/Item/AuricBulletHit"); SoundEngine.PlaySound(fire2 with { Volume = 0.5f, Pitch = 0.2f }, Projectile.Center); - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center - aimVel * 2 * Projectile.scale, aimVel.SafeNormalize(Vector2.UnitX) * -10, ModContent.ProjectileType(), (int)(Projectile.damage * 10), Projectile.knockBack, Projectile.owner, 0, 1f); + Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center - aimVel * 2 * Projectile.scale, aimVel.SafeNormalize(Vector2.UnitX) * -10, ModContent.ProjectileType(), Projectile.damage * 8, Projectile.knockBack, Projectile.owner, 0, 1f); proj.scale = Projectile.scale; swingCount = -1; attackPower = 0; diff --git a/Projectiles/Melee/Spears/BotanicPiercerProjectile.cs b/Projectiles/Melee/Spears/BotanicPiercerProjectile.cs index 3960a33083..1f3ca8a45c 100644 --- a/Projectiles/Melee/Spears/BotanicPiercerProjectile.cs +++ b/Projectiles/Melee/Spears/BotanicPiercerProjectile.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Melee.Spears Projectile.penetrate = -1; Projectile.ownerHitCheck = true; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 8; + Projectile.localNPCHitCooldown = 10; } public override float InitialSpeed => 3f; @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Melee.Spears public override Action EffectBeforeReelback => (proj) => { Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center - Projectile.velocity * 4f, Projectile.velocity * 1.4f, - ModContent.ProjectileType(), (int)(Projectile.damage * 0.7), Projectile.knockBack * 0.7f, Projectile.owner); + ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); }; public override void ExtraBehavior() diff --git a/Projectiles/Melee/Spears/GoldplumeSpearProjectile.cs b/Projectiles/Melee/Spears/GoldplumeSpearProjectile.cs index 3dbc16e3d9..94f0eca909 100644 --- a/Projectiles/Melee/Spears/GoldplumeSpearProjectile.cs +++ b/Projectiles/Melee/Spears/GoldplumeSpearProjectile.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Melee.Spears { for (int i = 0; i < 3; i++) { - Vector2 featherVel = Projectile.velocity.RotatedByRandom(MathHelper.Pi / 40f) * Main.rand.NextFloat(1.55f, 1.85f); + Vector2 featherVel = Projectile.velocity.RotatedByRandom(MathHelper.Pi / 40f) * Main.rand.NextFloat(1f, 1.2f); Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center - Projectile.velocity * 4f, featherVel, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), 0f, Projectile.owner); } } diff --git a/Projectiles/Melee/Spears/HellionFlowerSpearProjectile.cs b/Projectiles/Melee/Spears/HellionFlowerSpearProjectile.cs index 8d20e38bb7..f6fe1cbd57 100644 --- a/Projectiles/Melee/Spears/HellionFlowerSpearProjectile.cs +++ b/Projectiles/Melee/Spears/HellionFlowerSpearProjectile.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Melee.Spears Projectile.penetrate = -1; Projectile.ownerHitCheck = true; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 8; + Projectile.localNPCHitCooldown = 10; } public override float InitialSpeed => 3f; @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Melee.Spears public override float ForwardSpeed => 0.8f; public override Action EffectBeforeReelback => (proj) => { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity * 2f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack * 0.85f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity * 2f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); }; public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Melee/Spears/StarnightLanceProjectile.cs b/Projectiles/Melee/Spears/StarnightLanceProjectile.cs index 8c49023cac..9c6e0cd2a0 100644 --- a/Projectiles/Melee/Spears/StarnightLanceProjectile.cs +++ b/Projectiles/Melee/Spears/StarnightLanceProjectile.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Melee.Spears Projectile.penetrate = -1; Projectile.ownerHitCheck = true; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 8; + Projectile.localNPCHitCooldown = 10; } public override float InitialSpeed => 3f; @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Melee.Spears public override Action EffectBeforeReelback => (proj) => { Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center - Projectile.velocity * 4f, Projectile.velocity * 2.4f, - ModContent.ProjectileType(), (int)(Projectile.damage * 0.8), Projectile.knockBack * 0.85f, Projectile.owner); + ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); }; public override void ExtraBehavior() diff --git a/Projectiles/Melee/Spears/VanishingPointProjectile.png b/Projectiles/Melee/Spears/VanishingPointProjectile.png index 254188b871..6d383712d8 100644 Binary files a/Projectiles/Melee/Spears/VanishingPointProjectile.png and b/Projectiles/Melee/Spears/VanishingPointProjectile.png differ diff --git a/Projectiles/Melee/StarnightBeam.cs b/Projectiles/Melee/StarnightBeam.cs index 69151c2493..29bb27a473 100644 --- a/Projectiles/Melee/StarnightBeam.cs +++ b/Projectiles/Melee/StarnightBeam.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.DamageType = DamageClass.Melee; Projectile.penetrate = 3; - Projectile.timeLeft = 600; + Projectile.timeLeft = 120; AIType = ProjectileID.LightBeam; Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 10; @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - if (Projectile.timeLeft > 595) + if (Projectile.timeLeft > 115) return false; CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); diff --git a/Projectiles/Melee/StellarStrikerMeteor.cs b/Projectiles/Melee/StellarStrikerMeteor.cs index e187bb142b..893487755b 100644 --- a/Projectiles/Melee/StellarStrikerMeteor.cs +++ b/Projectiles/Melee/StellarStrikerMeteor.cs @@ -131,7 +131,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.owner == Main.myPlayer) { - Projectile.damage = (int)(Projectile.damage * 0.3f); + Projectile.damage = (int)(Projectile.damage * 0.25f); Projectile.ExpandHitboxBy((int)(285f * Projectile.scale)); Projectile.penetrate = -1; Projectile.Damage(); diff --git a/Projectiles/Melee/TerratomereHoldoutProj.cs b/Projectiles/Melee/TerratomereHoldoutProj.cs index 6152096f2e..d8edaab018 100644 --- a/Projectiles/Melee/TerratomereHoldoutProj.cs +++ b/Projectiles/Melee/TerratomereHoldoutProj.cs @@ -138,8 +138,8 @@ namespace CalamityMod.Projectiles.Melee public void StickToOwner() { // Glue the sword to its owner. This applies a handful of offsets to make the blade look like it's roughly inside of the owner's hand. - Projectile.Center = Owner.RotatedRelativePoint(Owner.MountedCenter, true) + SwordDirection * new Vector2(7f, 16f) * Projectile.scale; - Projectile.Center -= Projectile.velocity.SafeNormalize(Vector2.UnitY) * new Vector2(66f, 54f + Projectile.scale * 8f); + Projectile.Center = Owner.RotatedRelativePoint(Owner.MountedCenter, true) + SwordDirection * new Vector2(7f, 7f) * Projectile.scale; + Projectile.Center -= Projectile.velocity.SafeNormalize(Vector2.UnitY) * new Vector2(44f, 54f + Projectile.scale * 8f); // Set the owner's held projectile to this and register a false item time calculation. Owner.heldProj = Projectile.whoAmI; diff --git a/Projectiles/Melee/TrueBiomeBlade_ChainedMeatHook.cs b/Projectiles/Melee/TrueBiomeBlade_ChainedMeatHook.cs index 49f6e7f207..13cf62a01b 100644 --- a/Projectiles/Melee/TrueBiomeBlade_ChainedMeatHook.cs +++ b/Projectiles/Melee/TrueBiomeBlade_ChainedMeatHook.cs @@ -30,6 +30,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.width = Projectile.height = 66; Projectile.tileCollide = false; Projectile.friendly = true; diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs index 48137f78b4..f8f5373825 100644 --- a/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Melee Charge++; OverCharge--; Projectile.timeLeft = 2; - if ((Charge / MaxCharge >= 0.25f && CurrentIndicator == 0f) || (Charge / MaxCharge >= 0.5f && CurrentIndicator == 1f) || (Charge / MaxCharge >= 0.75f && CurrentIndicator == 2f) && Owner.whoAmI == Main.myPlayer) + if ((Charge / MaxCharge >= 0.2f && CurrentIndicator == 0f) || (Charge / MaxCharge >= 0.4f && CurrentIndicator == 1f) || (Charge / MaxCharge >= 0.6f && CurrentIndicator == 2f) || (Charge / MaxCharge >= 0.8f && CurrentIndicator == 3f) && Owner.whoAmI == Main.myPlayer) { for (int s = 0; s < 2; s++) { @@ -127,7 +127,7 @@ namespace CalamityMod.Projectiles.Melee if (Charge >= MaxCharge) { Charge = MaxCharge; - if (Owner.whoAmI == Main.myPlayer && CurrentIndicator < 4f) + if (Owner.whoAmI == Main.myPlayer && CurrentIndicator < 5f) { for (int s = 0; s < 5; s++) { diff --git a/Projectiles/Ranged/ArcNovaDiffuserHoldout.cs b/Projectiles/Ranged/ArcNovaDiffuserHoldout.cs index 7845aed473..99bae3b246 100644 --- a/Projectiles/Ranged/ArcNovaDiffuserHoldout.cs +++ b/Projectiles/Ranged/ArcNovaDiffuserHoldout.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Ranged public override float RecoilResolveSpeed => (KeepRefreshingLifetime || CurrentChargingFrames < ArcNovaDiffuser.Charge2Frames) ? 0.4f : 0.04f; public static int FramesPerLoad = 13; - public static int MaxLoadableShots = 15; + public static int MaxLoadableShots = 20; public static float BulletSpeed = 12f; public SlotId NovaChargeSlot; @@ -107,11 +107,13 @@ namespace CalamityMod.Projectiles.Ranged // Rapid Fire mode else if (ShotsLoaded > 0) { + float lvCompLerp = Math.Min(CurrentChargingFrames / ArcNovaDiffuser.Charge1Frames, 1); + // While bullets are remaining, refresh the lifespan; it will not refresh again after bullets run out Projectile.timeLeft = ArcNovaDiffuser.AftershotCooldownFrames; // Retract recoil & shoot faster if charged - ShootRecoilTimer -= ChargeLV1 ? 2.3f : 2f; + ShootRecoilTimer -= (ChargeLV1 ? 2.8f : 2f) * MathHelper.Lerp(0.4f, 1f, MathF.Pow(lvCompLerp, 2.5f)); if (ShootRecoilTimer <= 0f) { @@ -120,8 +122,9 @@ namespace CalamityMod.Projectiles.Ranged Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * BulletSpeed; Vector2 fireVec = shootVelocity.RotatedByRandom(MathHelper.ToRadians(2f)); + int damage = (int)(Projectile.damage * MathHelper.Lerp(0.5f, 1f, lvCompLerp)); if (Main.myPlayer == Projectile.owner) - Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, fireVec * (ChargeLV1 ? 1 : 0.7f), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, fireVec * (ChargeLV1 ? 1 : 0.7f), ModContent.ProjectileType(), damage, Projectile.knockBack, Projectile.owner); for (int i = 0; i <= 4; i++) { Dust dust = Dust.NewDustPerfect(GunTipPosition - Projectile.velocity * 15, ModContent.DustType(), shootVelocity.RotatedByRandom(MathHelper.ToRadians(15f)) * Main.rand.NextFloat(1.2f, 1.6f), 0, default, Main.rand.NextFloat(0.8f, 1.8f)); @@ -137,7 +140,7 @@ namespace CalamityMod.Projectiles.Ranged } ShotsLoaded--; - ShootRecoilTimer = (int)MathHelper.Lerp(33, 13, Math.Min(CurrentChargingFrames / ArcNovaDiffuser.Charge1Frames, 1)); + ShootRecoilTimer = (int)MathHelper.Lerp(23, 13, lvCompLerp); OffsetLengthFromArm -= 6f; } } diff --git a/Projectiles/Ranged/AuroraFire.cs b/Projectiles/Ranged/AuroraFire.cs index 649136df35..b00bfce76c 100644 --- a/Projectiles/Ranged/AuroraFire.cs +++ b/Projectiles/Ranged/AuroraFire.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Ranged public class AuroraFire : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/Magic/RancorFog"; + public override string Texture => "CalamityMod/Particles/RancorFog"; public static int Lifetime => 480; public static int Fadetime => 450; diff --git a/Projectiles/Ranged/BlissfulBombardierHoldout.cs b/Projectiles/Ranged/BlissfulBombardierHoldout.cs index 5fcbb6ddc3..d2cbdc12f4 100644 --- a/Projectiles/Ranged/BlissfulBombardierHoldout.cs +++ b/Projectiles/Ranged/BlissfulBombardierHoldout.cs @@ -96,8 +96,14 @@ namespace CalamityMod.Projectiles.Ranged } public override void HoldoutAI() { - // If there's no player, or the player is the server, or the owner's stunned, there'll be no holdout. - if (Owner.CantUseHoldout() && PostFireCooldown <= 0 && shootingTimer < (int)(Owner.itemAnimationMax * 0.8f)) + // If there's no player, or the player isn't holding fire, or the player's stunned, there'll be no holdout. + // The holdout will persist if on cooldown, but it is absolutely imperative that it can disappear if dead, CCed, etc. + if (Owner == null || !Owner.active || Owner.dead || Owner.CCed || Owner.noItems) + { + Projectile.Kill(); + return; + } + if (!Owner.channel && PostFireCooldown <= 0 && shootingTimer < (int)(Owner.itemAnimationMax * 0.8f)) { Projectile.Kill(); return; diff --git a/Projectiles/Ranged/BloodfireArrowProj.cs b/Projectiles/Ranged/BloodfireArrowProj.cs index 359c21e2e0..011b49ccc0 100644 --- a/Projectiles/Ranged/BloodfireArrowProj.cs +++ b/Projectiles/Ranged/BloodfireArrowProj.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Ranged } else { - Projectile.damage = (int)(Projectile.damage * 1.3f); // damage boost + Projectile.damage = (int)(Projectile.damage * 1.2f); // damage boost player.statLife -= 1; if (player.statLife <= 0) { diff --git a/Projectiles/Ranged/DryadsTearMain.cs b/Projectiles/Ranged/DryadsTearMain.cs index 25268fe87a..d9c91ae175 100644 --- a/Projectiles/Ranged/DryadsTearMain.cs +++ b/Projectiles/Ranged/DryadsTearMain.cs @@ -30,7 +30,8 @@ namespace CalamityMod.Projectiles.Ranged public int turnDirection = 0; // Direction it will rotate public int turnChange = 0; // Adds variance to multiple aspects of the bullet, including when it will change its turn direction public float turnIntensity = 0; // Adds a bit more variance, this time to velocity - public float damageMult = 1; // Multiplier that updates instantly, used for most of the gameplay effects + public float originalDamageMult = 1; // Multiplier that updates instantly, used ONLY for the gameplay effects + public float damageMult = 1; // Multiplier that updates instantly, used for most of the gameplay effects and some visual (why did I do this???) public float visualMult = 0.75f;// Multiplier that updates over time, used for most of the visual effects public Vector2 dropletPosition; // The position of the orbiting teardrop public Vector2 lastDropletPosition; // The previous position of the orbiting teardroplet @@ -41,7 +42,7 @@ namespace CalamityMod.Projectiles.Ranged public float dropletAttackLerp = 1; // A lerp variable used for timing the droplet's attack public int frameDelay = 0; // A few frames of delay after landing on the enemy before explosing, which improves the visuals public bool detachEffects = true; // Used for the moment when the droplet detatched from the main bullet - public bool isMaxPower => damageMult >= 1; // If the bullet is at maximum power + public bool isMaxPower = false; // If the bullet is at maximum power public float finalEffectMult => Projectile.scale * visualMult; // Used for many but not all visual scaling effects public NPC targeted; // The target being attacked by the droplet public ref float trueLifetime => ref Projectile.ai[2]; // The lifetime of the projectile, used over vanilla lifetime because it can increment by decimals @@ -50,9 +51,13 @@ namespace CalamityMod.Projectiles.Ranged public int fadeLifetime => (int)(35 + effectSpeedMod * Math.Max(1 - damageMult, 0)); // The time in which the projectile fades out and can no longer hit anything public int extendedLifetime => (int)(85 * Math.Min(damageMult, 1) + effectSpeedMod * Math.Max(1 - damageMult, 0)); // The time after lifetime reaches zero where the droplet does its attack public bool fading => trueLifetime <= fadeLifetime; // If the projectile is fading away + public bool crit = false; // If the main hit crit, used to make the teardrop crit + public Vector2 hitTileVel = Vector2.Zero; - public float explosionDamageMult = 1.4f; - public float maxDamageMult = 1.65f; + public float explosionDamageMult = 1f; + public float mainBulletDamageMult = 0.75f; + public float maxDamageMult = 2.15f; + public float bulletScalingDamagePow = 0.1f; // Applied to bullets so that fast fired bullets still do some damage, the original damage mult based on projectile number is put to the power of this number public static Asset ShineTexture { get; private set; } public static Asset BloomTexture { get; private set; } public override void Load() @@ -79,7 +84,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.friendly = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; - Projectile.tileCollide = false; + Projectile.tileCollide = true; Projectile.ignoreWater = true; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; @@ -101,13 +106,14 @@ namespace CalamityMod.Projectiles.Ranged trueLifetime = fadeLifetime * 1.5f; turnDirection = Main.rand.NextBool() ? -1 : 1; turnChange = Main.rand.Next(30, 190 + 1); - turnIntensity = Main.rand.NextFloat(0.2f, 1.6f); + turnIntensity = Main.rand.NextFloat(0.45f, 2.9f); effectSpeedMod = Main.rand.Next(5, 35); } - if (time % turnChange == 0 && !fading) + if (time % turnChange == 0) turnDirection *= -1; - visualMult = MathHelper.Lerp(visualMult, damageMult, 0.1f / Projectile.MaxUpdates); + float visualMinPow = (isMaxPower ? damageMult : MathF.Pow(damageMult, 0.25f)); + visualMult = MathHelper.Lerp(visualMult, visualMinPow, 0.1f / Projectile.MaxUpdates); float speed = 8 * MathF.Pow(visualMult, 0.3f) * Math.Max(MathF.Pow(Utils.GetLerpValue(0, fadeLifetime, trueLifetime, true), 2), 0.15f); bool chanceForDust = Main.rand.NextBool((int)Math.Clamp((fading ? 8 : 5) / finalEffectMult, 3, 60)); @@ -122,7 +128,7 @@ namespace CalamityMod.Projectiles.Ranged dust.fadeIn = 1; } - if (time > 0) // Reduce damage and visual intensity for every projectile of this type from the same player that are relativley close to each other + if (time > 0 && Projectile.numHits == 0) // Reduce damage and visual intensity for every projectile of this type from the same player that are relativley close to each other { float damageReduction = 1; int ownedProj = Owner.ownedProjectileCounts[Projectile.type]; @@ -132,16 +138,26 @@ namespace CalamityMod.Projectiles.Ranged if (projectile.owner == Projectile.owner && projectile.active && projectile.type == Projectile.type && projectile != Projectile) damageReduction++; } - float newDamageMult = MathF.Pow(1 / damageReduction, 0.25f); - if (newDamageMult < damageMult && !fading) + int maxProjectilesToCount = 12; + float newDamageMult = (1 / Math.Min(MathF.Pow(damageReduction, 0.4f), maxProjectilesToCount)); + float newOriginalDamageMult = (1 / Math.Min(damageReduction, maxProjectilesToCount)); + if (newDamageMult < damageMult) + { damageMult = newDamageMult; + } + if (newOriginalDamageMult < originalDamageMult) + { + originalDamageMult = newOriginalDamageMult; + } } + if (time > 0) + isMaxPower = originalDamageMult >= 1; - if (isMaxPower) - damageMult = maxDamageMult; + if (isMaxPower && Projectile.numHits == 0) + { damageMult = 1.75f; originalDamageMult = 1.75f; } // This is done for visual reasons, the actual max power damage is applied on hit - float movement = Main.rand.NextFloat(0.009f, 0.0115f) * speed; + float movement = Main.rand.NextFloat(0.0120f, 0.0165f) * speed; if (damageMult < 1) Projectile.velocity += Vector2.Lerp(Projectile.velocity.RotatedBy(MathHelper.PiOver2 * turnDirection).SafeNormalize(Vector2.UnitX) * movement * turnIntensity, Projectile.velocity, MathF.Pow(Math.Min(damageMult + 0.15f, 1), 3.3f)); Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitX) * speed; @@ -232,7 +248,7 @@ namespace CalamityMod.Projectiles.Ranged falling ? (int)(10 * (1 - dropLerp * 0.6f)) : (int)(6 + 2 * dropletScaling), 0.135f * dropletScaling * (1 + dropLerp * 0.3f), Color.Turquoise * colorMult, falling ? Color.Lime * colorMult : Color.Teal * colorMult, new Vector2(0.15f * (falling ? 0.5f + dropLerp * 3 : 1) * damageMult, (Math.Max(0.15f * lastDropletPosition.Distance(dropletPosition), 0.25f) * (1 - dropLerp * 0.2f))), noShrink: true, colorFadeSpeed: 5, glowOpacity: colorMult, shrinkSpeed: falling ? 1.5f - dropLerp : 0); GeneralParticleHandler.SpawnParticle(dropTrail, true); - if (Main.rand.NextBool(3)) + if (Main.rand.NextBool((int)(4 / damageMult) + 1)) { Dust dust = Dust.NewDustPerfect(dropletPosition + Main.rand.NextVector2Circular(5 + 20 * (1 - dropletAttackLerp), 5 + 20 * (1 - dropletAttackLerp)), ModContent.DustType()); dust.noGravity = true; @@ -261,8 +277,30 @@ namespace CalamityMod.Projectiles.Ranged trueLifetime -= 1 / MathF.Pow(damageMult, 0.3f); if (trueLifetime <= -extendedLifetime && Projectile.FinalExtraUpdate()) frameDelay++; + + if (hitTileVel != Vector2.Zero) + { + Projectile.velocity = Vector2.Lerp(Projectile.velocity, hitTileVel, 0.03f / damageMult); + } + time++; } + public override bool OnTileCollide(Vector2 oldVelocity) + { + if (Projectile.numHits == 0) // Store a tile reflect velocity and lerp to it afterwards + { + float velX = oldVelocity.X; + float velY = oldVelocity.Y; + if (Projectile.velocity.Y != oldVelocity.Y) + velY = -oldVelocity.Y; + if (Projectile.velocity.X != oldVelocity.X) + velX = -oldVelocity.X; + Projectile.velocity = oldVelocity; + hitTileVel = new Vector2(velX, velY); + Projectile.tileCollide = false; + } + return false; + } public void Splash() { if (dropletAttack) @@ -327,13 +365,15 @@ namespace CalamityMod.Projectiles.Ranged { float blastSize = 75 * scale; float minMultiplier = 0.15f; - int hitsToMinMult = (int)(3 + 5 * damageMult); - int knockback = (int)(7 * damageMult * (isMaxPower ? -1 : 1)); // Give heavy knockback at full power - int damage = (int)(Projectile.damage * explosionDamageMult * damageMult); - Projectile blast = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), targeted.Center, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, Owner.whoAmI, blastSize, minMultiplier, hitsToMinMult); + int hitsToMinMult = (int)(3 + 5 * originalDamageMult); + int knockback = (int)(7 * originalDamageMult * (isMaxPower ? -1 : 1)); // Give heavy knockback at full power + float finalDamageMult = MathF.Pow(originalDamageMult, bulletScalingDamagePow); + int damage = (int)(Projectile.damage * explosionDamageMult * (isMaxPower ? maxDamageMult : finalDamageMult)); + Projectile blast = Projectile.NewProjectileDirect(Owner.GetSource_FromThis(), targeted.Center, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, Owner.whoAmI, blastSize, minMultiplier, hitsToMinMult); blast.timeLeft = 8; - blast.DamageType = DamageClass.Ranged; + blast.DamageType = Projectile.DamageType; blast.ArmorPenetration = Projectile.ArmorPenetration; + blast.localAI[0] = (crit ? 1 : 0); // Sets the burst to crit if the bullet did } if (damageMult >= 0.75f) Owner.SetScreenshake(3f * damageMult); @@ -377,9 +417,15 @@ namespace CalamityMod.Projectiles.Ranged targeted = target; trueLifetime = fadeLifetime; - modifiers.SourceDamage *= damageMult; + float finalDamageMult = MathF.Pow(originalDamageMult, bulletScalingDamagePow); + modifiers.SourceDamage *= (isMaxPower ? maxDamageMult : finalDamageMult * mainBulletDamageMult); } - public override bool? CanHitNPC(NPC target) => ((time > 1) ? null : false && Projectile.numHits == 0); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (hit.Crit) + crit = true; + } + public override bool? CanHitNPC(NPC target) => ((time > 1 && Projectile.numHits == 0) ? null : false); public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { float hitboxSize = 20 * Projectile.scale * damageMult; diff --git a/Projectiles/Ranged/ElysianArrowProj.cs b/Projectiles/Ranged/ElysianArrowProj.cs index f76f5fdcbd..d5bfec6beb 100644 --- a/Projectiles/Ranged/ElysianArrowProj.cs +++ b/Projectiles/Ranged/ElysianArrowProj.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Ranged } } - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnSpot, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.15f), 0f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnSpot, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.20f), 0f, Projectile.owner, 0f, 0f); SoundStyle onKill = new("CalamityMod/Sounds/Custom/Providence/ProvidenceHolyBlastShoot"); SoundEngine.PlaySound(onKill with { Volume = 0.4f, Pitch = 0.4f }, Projectile.position); diff --git a/Projectiles/Ranged/ExoFire.cs b/Projectiles/Ranged/ExoFire.cs index 59fe2939aa..7310012ff8 100644 --- a/Projectiles/Ranged/ExoFire.cs +++ b/Projectiles/Ranged/ExoFire.cs @@ -2,6 +2,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Particles; +using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -71,10 +72,12 @@ namespace CalamityMod.Projectiles.Ranged // I hate metaballs >:( Particle beam3 = new CustomSpark(Projectile.Center, Projectile.velocity * Main.rand.NextFloat(0.5f, 4f), "CalamityMod/Particles/SmallBloom", false, 4, ((37 - Time * (PhotoTimer == 0 ? 0.165f : 0.088f)) - PhotoTimer * 0.2f + (PhotoTimer == 1 ? 20 : 0)) * 0.005f, sparkColor, new Vector2(1f, 1 + Time * 0.1f), true, false); GeneralParticleHandler.SpawnParticle(beam3); + beam3.DrawLayer = Enums.GeneralDrawLayer.BeforeProjectiles; if (!photosens) { Particle beam32 = new CustomSpark(Projectile.Center, Projectile.velocity * Main.rand.NextFloat(0.5f, 4f), "CalamityMod/Particles/SmallBloom", false, 4, ((37 - Time * (PhotoTimer == 0 ? 0.165f : 0.088f)) - PhotoTimer * 0.2f + (PhotoTimer == 1 ? 20 : 0)) * 0.003f, Color.Lerp(Color.Blue, sparkColor, 0.5f), new Vector2(1f, 1 + Time * 0.1f), true, false); GeneralParticleHandler.SpawnParticle(beam32); + beam32.DrawLayer = Enums.GeneralDrawLayer.BeforeProjectiles; } } if (Main.rand.NextBool(35) && targetDist < 1400f && Time > 5) diff --git a/Projectiles/Ranged/HailstormBulletProj.cs b/Projectiles/Ranged/HailstormBulletProj.cs index 4800aa818b..2c3bd5ef6b 100644 --- a/Projectiles/Ranged/HailstormBulletProj.cs +++ b/Projectiles/Ranged/HailstormBulletProj.cs @@ -1,5 +1,4 @@ -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.Particles; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -71,14 +70,12 @@ namespace CalamityMod.Projectiles.Ranged public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { Player Owner = Main.player[Projectile.owner]; - target.AddBuff(BuffID.Frostburn2, 120); if (hit.Crit) { SoundStyle crit = new("CalamityMod/Sounds/NPCHit/CryogenPhaseTransitionCrack"); SoundEngine.PlaySound(crit with { Volume = 0.35f, Pitch = 1f }, Projectile.Center); - if (!target.boss) - target.AddBuff(BuffID.Frozen, 120); + target.AddBuff(BuffID.Frozen, 120); int points = 6; float radians = MathHelper.TwoPi / points; @@ -98,7 +95,8 @@ namespace CalamityMod.Projectiles.Ranged { // This is about equivalent to the previous direct strike extra damage but can't also crit itself obviously // Also it's not as impacted by defense, which is why it's a bit weaker, rather than being a full 1f - modifiers.CritDamage += 0.85f; + Player Owner = Main.player[Projectile.owner]; + modifiers.CritDamage += 0.65f + (Owner.GetTotalCritChance(DamageClass.Ranged) * 0.004f); // .4% crit damage per 1% crit chance if (Projectile.numHits > 0) Projectile.damage = (int)(Projectile.damage * 0.5f); @@ -108,7 +106,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - if (Projectile.localAI[0] > 15f) + if (Projectile.localAI[0] > 16f) CalamityUtils.DrawAfterimagesFromEdge(Projectile, 0, lightColor); return false; } diff --git a/Projectiles/Ranged/HalleysInfernoHoldout.cs b/Projectiles/Ranged/HalleysInfernoHoldout.cs index 9d09b629f1..c76f38e264 100644 --- a/Projectiles/Ranged/HalleysInfernoHoldout.cs +++ b/Projectiles/Ranged/HalleysInfernoHoldout.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Ranged { if (ShotTimer <= 0 && Owner.Calamity().AvaliableStarburst > 1) { - ShotTimer = 4; + ShotTimer = 3; var spawnpos = Projectile.Center; var dir = spawnpos.DirectionTo(Main.MouseWorld); var color = Main.rand.Next(1, 7); @@ -97,10 +97,10 @@ 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 * HalleysInferno.StarburstVelMult, ModContent.ProjectileType(), (int)(Owner.GetDamage(DamageClass.Ranged).ApplyTo(Halley.damage) * HalleysInferno.StarburstDmgMult), Halley.knockBack, Projectile.owner, color); - Owner.Calamity().StratusStarburst -= 2; + Projectile.NewProjectile(Owner.GetSource_ItemUse_WithPotentialAmmo(Halley, AmmoID.Gel), spawnpos + dir * 8 + dir.RotatedByRandom(MathHelper.TwoPi)*4,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 -= 1; SoundEngine.PlaySound(HalleysInferno.ShootSound); - RecoilAmount = 4; + RecoilAmount = 16; } } RecoilAmount *= 0.75f; diff --git a/Projectiles/Ranged/HalleysStarburst.cs b/Projectiles/Ranged/HalleysStarburst.cs index 41e48151e3..afde077a30 100644 --- a/Projectiles/Ranged/HalleysStarburst.cs +++ b/Projectiles/Ranged/HalleysStarburst.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 1; - Projectile.MaxUpdates = 6; + Projectile.MaxUpdates = 9; Projectile.timeLeft = 60 * Projectile.MaxUpdates; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; diff --git a/Projectiles/Ranged/HyperiusBulletProj.cs b/Projectiles/Ranged/HyperiusBulletProj.cs index 89e23accd5..8a236fd3ff 100644 --- a/Projectiles/Ranged/HyperiusBulletProj.cs +++ b/Projectiles/Ranged/HyperiusBulletProj.cs @@ -146,7 +146,8 @@ namespace CalamityMod.Projectiles.Ranged for (int b = 0; b < 2; b++) { Vector2 velocity = (Projectile.velocity.SafeNormalize(Vector2.UnitX) * 7 * (tileTouched ? -1 : 1)).RotatedByRandom(0.5f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity * 0.7f, ModContent.ProjectileType(), (int)Math.Max(Projectile.originalDamage * 0.05f, 1), 0, Projectile.owner, 0f, 0f, Main.rand.Next(0, 4 + 1)); + Projectile split = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, velocity * 0.7f, ModContent.ProjectileType(), (int)Math.Max(Projectile.originalDamage * 0.05f, 1), 0, Projectile.owner, 0f, 0f, Main.rand.Next(0, 4 + 1)); + split.DamageType = Projectile.DamageType; } } } diff --git a/Projectiles/Ranged/PristineSecondary.cs b/Projectiles/Ranged/PristineSecondary.cs index 9a9a0820d6..4f823e1c52 100644 --- a/Projectiles/Ranged/PristineSecondary.cs +++ b/Projectiles/Ranged/PristineSecondary.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Ranged public class PristineSecondary : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/Magic/RancorFog"; + public override string Texture => "CalamityMod/Particles/RancorFog"; public ref float ScaleFactor => ref Projectile.ai[0]; public float LightPower = 0; diff --git a/Projectiles/Ranged/SevensStrikerHoldout.cs b/Projectiles/Ranged/SevensStrikerHoldout.cs index deefc94393..54a3e4a9da 100644 --- a/Projectiles/Ranged/SevensStrikerHoldout.cs +++ b/Projectiles/Ranged/SevensStrikerHoldout.cs @@ -52,24 +52,17 @@ namespace CalamityMod.Projectiles.Ranged // Consumes a coin, stores it, then calculates what effect will be executed if (Projectile.ai[1] == 0) { - // These checks are here so that the weapon doesn't consume two coins when first used - if (shotonce) + // Ensure the method doesn't consumes ammo on first shot to avoid consuming two coins + if (player.PickAmmo(player.HeldItem, out shot, out scaleFactor, out weaponDamage, out weaponKnockback, out _, !shotonce)) { - if (player.PickAmmo(player.HeldItem, out shot, out scaleFactor, out weaponDamage, out weaponKnockback, out _)) - { - Projectile.ai[0] = shot; - Projectile.ai[1] = CalculateOutcome(); - } - else - { - Projectile.Kill(); - } + Projectile.ai[0] = shot; + Projectile.ai[1] = CalculateOutcome(); } else { - Projectile.ai[1] = CalculateOutcome(); - shotonce = true; + Projectile.Kill(); } + shotonce = true; } rolltimer--; diff --git a/Projectiles/Rogue/AntlionSkewerSandCloud.cs b/Projectiles/Rogue/AntlionSkewerSandCloud.cs index dae0dba88c..2e08edf867 100644 --- a/Projectiles/Rogue/AntlionSkewerSandCloud.cs +++ b/Projectiles/Rogue/AntlionSkewerSandCloud.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Projectiles.Rogue public class AntlionSkewerSandCloud : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Projectiles/Magic/RancorFog"; + public override string Texture => "CalamityMod/Particles/RancorFog"; public ref float CloudHue => ref Projectile.ai[0]; public override void SetDefaults() diff --git a/Projectiles/Rogue/AshenStalactiteDebris.png b/Projectiles/Rogue/AshenStalactiteDebris.png index 8afd326680..8e092d8e18 100644 Binary files a/Projectiles/Rogue/AshenStalactiteDebris.png and b/Projectiles/Rogue/AshenStalactiteDebris.png differ diff --git a/Projectiles/Rogue/AshenStalagmiteProj.png b/Projectiles/Rogue/AshenStalagmiteProj.png index 4f22b80bf9..08e667c762 100644 Binary files a/Projectiles/Rogue/AshenStalagmiteProj.png and b/Projectiles/Rogue/AshenStalagmiteProj.png differ diff --git a/Projectiles/Summon/AstrageldonLaser.cs b/Projectiles/Summon/AstrageldonLaser.cs index 6b5f11be8b..c21edfed24 100644 --- a/Projectiles/Summon/AstrageldonLaser.cs +++ b/Projectiles/Summon/AstrageldonLaser.cs @@ -23,11 +23,8 @@ namespace CalamityMod.Projectiles.Summon Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.alpha = 255; - Projectile.penetrate = -1; - Projectile.timeLeft = 600; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -2; - Projectile.extraUpdates = 1; + Projectile.MaxUpdates = 4; + Projectile.timeLeft = 180 * Projectile.MaxUpdates; Projectile.DamageType = DamageClass.Summon; } diff --git a/Projectiles/Summon/AstrageldonSummon.cs b/Projectiles/Summon/AstrageldonSummon.cs index c5a3c69c48..17e6e8a048 100644 --- a/Projectiles/Summon/AstrageldonSummon.cs +++ b/Projectiles/Summon/AstrageldonSummon.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Summon CalamityGlobalProjectile modProj = Projectile.Calamity(); //hitbox size scaling - float scale = (float)Math.Log(Projectile.minionSlots, 10f) + 1f; + float scale = 0.8f + Projectile.minionSlots * 0.2f; if (Projectile.scale != scale) Projectile.scale = scale; Projectile.width = (int)(64f * Projectile.scale); @@ -190,7 +190,7 @@ namespace CalamityMod.Projectiles.Summon { attackCounter += Main.rand.Next(1, 4); } - if (attackCounter > 300) + if (attackCounter > 240) { attackCounter = 0; Projectile.netUpdate = true; @@ -202,9 +202,24 @@ namespace CalamityMod.Projectiles.Summon attackCounter += 2; if (Main.myPlayer == Projectile.owner) { - Vector2 laserVel = Projectile.SafeDirectionTo(objectivepos) * laserSpeed; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, laserVel, projType, Projectile.damage, 0f, Projectile.owner); - Projectile.netUpdate = true; + if (Main.rand.NextBool()) + { + for (int i = 0; i < 8; i++) + { + Vector2 circleVel = ((MathHelper.TwoPi * i / 8f) - MathHelper.ToRadians(67.5f)).ToRotationVector2() * laserSpeed; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, circleVel, projType, Projectile.damage, 0f, Projectile.owner); + } + } + else + { + for (int i = 0; i < 5; i++) + { + Vector2 direction = Projectile.SafeDirectionTo(objectivepos); + Vector2 spreadPos = Projectile.Center + direction * Main.rand.NextFloat(1f, 4f) + direction.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(-16f, 16f); + Vector2 laserVel = direction * laserSpeed; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), spreadPos, laserVel, projType, Projectile.damage, 0f, Projectile.owner); + } + } } } } diff --git a/Projectiles/Summon/SmallAresArms/CannonLaserbeam.cs b/Projectiles/Summon/SmallAresArms/CannonLaserbeam.cs index d59573fd37..3463b97ee7 100644 --- a/Projectiles/Summon/SmallAresArms/CannonLaserbeam.cs +++ b/Projectiles/Summon/SmallAresArms/CannonLaserbeam.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms public Projectile OwnerProjectile => CalamityUtils.FindProjectileByIdentity((int)Projectile.ai[1], Projectile.owner); - public const int LifetimeConst = 75; + public const int LifetimeConst = 90; public override float MaxScale => 0.5f + (float)Math.Cos(Main.GlobalTimeWrappedHourly * 10f) * 0.07f; public override float MaxLaserLength => 1560f; public override float Lifetime => LifetimeConst; diff --git a/Projectiles/Summon/SmallAresArms/ExoskeletonCannon.cs b/Projectiles/Summon/SmallAresArms/ExoskeletonCannon.cs index 5b9c20254a..a064b4282a 100644 --- a/Projectiles/Summon/SmallAresArms/ExoskeletonCannon.cs +++ b/Projectiles/Summon/SmallAresArms/ExoskeletonCannon.cs @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms // 15NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction float idealRotation = Main.myPlayer != Projectile.owner ? Projectile.rotation : Projectile.AngleTo(Main.MouseWorld); - NPC potentialTarget = Projectile.Center.ClosestNPCAt(AresExoskeleton.TargetingDistance); + NPC potentialTarget = Projectile.Center.MinionHoming(AresExoskeleton.TargetingDistance, Owner); if (potentialTarget != null) { Projectile.ai[1] = 1f; diff --git a/Projectiles/Summon/SmallAresArms/ExoskeletonPlasmaCannon.cs b/Projectiles/Summon/SmallAresArms/ExoskeletonPlasmaCannon.cs index 2620fa4b84..d8f5c00907 100644 --- a/Projectiles/Summon/SmallAresArms/ExoskeletonPlasmaCannon.cs +++ b/Projectiles/Summon/SmallAresArms/ExoskeletonPlasmaCannon.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Summon.SmallAresArms @@ -21,6 +22,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms public override void SetStaticDefaults() { Main.projFrames[Type] = 6; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; // Item.shoot assigns this as the minion } public override void PostAI() diff --git a/Projectiles/Typeless/CursorProj.cs b/Projectiles/Typeless/CursorProj.cs index 7caeee006b..0e138a1a4c 100644 --- a/Projectiles/Typeless/CursorProj.cs +++ b/Projectiles/Typeless/CursorProj.cs @@ -124,55 +124,55 @@ namespace CalamityMod.Projectiles.Typeless } if (Main.rand.NextBool(12)) { - Vector2 rotateFirstDust = -Vector2.UnitX.RotatedByRandom(0.19634954631328583).RotatedBy((double)Projectile.velocity.ToRotation(), default); - int crystalDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, crystalDustType, 0f, 0f, 160, default, 1f); - Main.dust[crystalDust].velocity *= 0.1f; - Main.dust[crystalDust].position = Projectile.Center + rotateFirstDust * (float)Projectile.width / 2f + Projectile.velocity * 2f; - Main.dust[crystalDust].fadeIn = 0.9f; + Vector2 rotateFirstDust = -Vector2.UnitX.RotatedByRandom(MathHelper.Pi / 16f).RotatedBy(Projectile.velocity.ToRotation()); + Dust crystalDust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, crystalDustType, 0f, 0f, 160, default, 1f); + crystalDust.velocity *= 0.1f; + crystalDust.position = Projectile.Center + rotateFirstDust * Projectile.width / 2f + Projectile.velocity * 2f; + crystalDust.fadeIn = 0.9f; } if (Main.rand.NextBool(18)) { - Vector2 rotateSecondDust = -Vector2.UnitX.RotatedByRandom(0.39269909262657166).RotatedBy((double)Projectile.velocity.ToRotation(), default); - int greenDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 155, default, 0.8f); - Main.dust[greenDust].velocity *= 0.3f; - Main.dust[greenDust].position = Projectile.Center + rotateSecondDust * (float)Projectile.width / 2f; + Vector2 rotateSecondDust = -Vector2.UnitX.RotatedByRandom(MathHelper.Pi / 8f).RotatedBy(Projectile.velocity.ToRotation()); + Dust greenDust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 155, default, 0.8f); + greenDust.velocity *= 0.3f; + greenDust.position = Projectile.Center + rotateSecondDust * Projectile.width / 2f; if (Main.rand.NextBool()) { - Main.dust[greenDust].fadeIn = 1.4f; + greenDust.fadeIn = 1.4f; } } if (Main.rand.NextBool(8)) { - Vector2 rotateThirdDust = -Vector2.UnitX.RotatedByRandom(0.78539818525314331).RotatedBy((double)Projectile.velocity.ToRotation(), default); - int randomDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 1f); - Main.dust[randomDust].velocity *= 0.3f; - Main.dust[randomDust].noGravity = true; - Main.dust[randomDust].position = Projectile.Center + rotateThirdDust * (float)Projectile.width / 2f; + Vector2 rotateThirdDust = -Vector2.UnitX.RotatedByRandom(MathHelper.PiOver4).RotatedBy(Projectile.velocity.ToRotation()); + Dust randomDust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 1f); + randomDust.velocity *= 0.3f; + randomDust.noGravity = true; + randomDust.position = Projectile.Center + rotateThirdDust * Projectile.width / 2f; if (Main.rand.NextBool()) { - Main.dust[randomDust].fadeIn = 1.4f; + randomDust.fadeIn = 1.4f; } } if (Main.rand.NextBool(6)) { - Vector2 value13 = -Vector2.UnitX.RotatedByRandom(0.19634954631328583).RotatedBy((double)Projectile.velocity.ToRotation(), default); - int crystalDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, crystalDustType, 0f, 0f, 100, default, 1f); - Main.dust[crystalDust2].velocity *= 0.3f; - Main.dust[crystalDust2].position = Projectile.Center + value13 * (float)Projectile.width / 2f; - Main.dust[crystalDust2].fadeIn = 1.2f; - Main.dust[crystalDust2].scale = 1.5f; - Main.dust[crystalDust2].noGravity = true; + Vector2 value13 = -Vector2.UnitX.RotatedByRandom(MathHelper.Pi / 16f).RotatedBy(Projectile.velocity.ToRotation()); + Dust crystalDust2 = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, crystalDustType, 0f, 0f, 100, default, 1f); + crystalDust2.velocity *= 0.3f; + crystalDust2.position = Projectile.Center + value13 * Projectile.width / 2f; + crystalDust2.fadeIn = 1.2f; + crystalDust2.scale = 1.5f; + crystalDust2.noGravity = true; } Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.2f / 255f, (255 - Projectile.alpha) * 0.2f / 255f, (255 - Projectile.alpha) * 0.2f / 255f); - int paleDust = Dust.NewDust(Projectile.position, Projectile.width - 28, Projectile.height - 28, DustID.BoneTorch, 0f, 0f, 100, default, 0.8f); - Main.dust[paleDust].velocity *= 0.1f; - Main.dust[paleDust].velocity += Projectile.velocity * 0.5f; - Main.dust[paleDust].noGravity = true; + Dust paleDust = Dust.NewDustDirect(Projectile.position, Projectile.width - 28, Projectile.height - 28, DustID.BoneTorch, 0f, 0f, 100, default, 0.8f); + paleDust.velocity *= 0.1f; + paleDust.velocity += Projectile.velocity * 0.5f; + paleDust.noGravity = true; if (Main.rand.NextBool(12)) { - int shinyDust = Dust.NewDust(Projectile.position, Projectile.width - 32, Projectile.height - 32, DustID.Teleporter, 0f, 0f, 100, default, 1f); - Main.dust[shinyDust].velocity *= 0.25f; - Main.dust[shinyDust].velocity += Projectile.velocity * 0.5f; + Dust shinyDust = Dust.NewDustDirect(Projectile.position, Projectile.width - 32, Projectile.height - 32, DustID.Teleporter, 0f, 0f, 100, default, 1f); + shinyDust.velocity *= 0.25f; + shinyDust.velocity += Projectile.velocity * 0.5f; } } @@ -182,9 +182,9 @@ namespace CalamityMod.Projectiles.Typeless return false; } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 120); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 600); - public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 120); + public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 600); public override void OnKill(int timeLeft) { diff --git a/Projectiles/Typeless/CursorProjSplit.cs b/Projectiles/Typeless/CursorProjSplit.cs index 4d32133339..1d8ec32ba9 100644 --- a/Projectiles/Typeless/CursorProjSplit.cs +++ b/Projectiles/Typeless/CursorProjSplit.cs @@ -126,55 +126,55 @@ namespace CalamityMod.Projectiles.Typeless } if (Main.rand.NextBool(12)) { - Vector2 rotateFirstDust = -Vector2.UnitX.RotatedByRandom(0.19634954631328583).RotatedBy((double)Projectile.velocity.ToRotation(), default); - int crystalDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, crystalDustType, 0f, 0f, 100, default, 1f); - Main.dust[crystalDust].velocity *= 0.1f; - Main.dust[crystalDust].position = Projectile.Center + rotateFirstDust * (float)Projectile.width / 2f + Projectile.velocity * 2f; - Main.dust[crystalDust].fadeIn = 0.9f; + Vector2 rotateFirstDust = -Vector2.UnitX.RotatedByRandom(MathHelper.Pi / 16f).RotatedBy((double)Projectile.velocity.ToRotation(), default); + Dust crystalDust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, crystalDustType, 0f, 0f, 100, default, 1f); + crystalDust.velocity *= 0.1f; + crystalDust.position = Projectile.Center + rotateFirstDust * Projectile.width / 2f + Projectile.velocity * 2f; + crystalDust.fadeIn = 0.9f; } if (Main.rand.NextBool(18)) { - Vector2 rotateSecondDust = -Vector2.UnitX.RotatedByRandom(0.39269909262657166).RotatedBy((double)Projectile.velocity.ToRotation(), default); - int greenDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 155, default, 0.8f); - Main.dust[greenDust].velocity *= 0.3f; - Main.dust[greenDust].position = Projectile.Center + rotateSecondDust * (float)Projectile.width / 2f; + Vector2 rotateSecondDust = -Vector2.UnitX.RotatedByRandom(MathHelper.Pi / 8f).RotatedBy(Projectile.velocity.ToRotation()); + Dust greenDust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 155, default, 0.8f); + greenDust.velocity *= 0.3f; + greenDust.position = Projectile.Center + rotateSecondDust * Projectile.width / 2f; if (Main.rand.NextBool()) { - Main.dust[greenDust].fadeIn = 1.4f; + greenDust.fadeIn = 1.4f; } } if (Main.rand.NextBool(8)) { - Vector2 rotateThirdDust = -Vector2.UnitX.RotatedByRandom(0.78539818525314331).RotatedBy((double)Projectile.velocity.ToRotation(), default); - int randomDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 1f); - Main.dust[randomDust].velocity *= 0.3f; - Main.dust[randomDust].noGravity = true; - Main.dust[randomDust].position = Projectile.Center + rotateThirdDust * (float)Projectile.width / 2f; + Vector2 rotateThirdDust = -Vector2.UnitX.RotatedByRandom(MathHelper.PiOver4).RotatedBy(Projectile.velocity.ToRotation()); + Dust randomDust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 1f); + randomDust.velocity *= 0.3f; + randomDust.noGravity = true; + randomDust.position = Projectile.Center + rotateThirdDust * Projectile.width / 2f; if (Main.rand.NextBool()) { - Main.dust[randomDust].fadeIn = 1.4f; + randomDust.fadeIn = 1.4f; } } if (Main.rand.NextBool(6)) { - Vector2 value13 = -Vector2.UnitX.RotatedByRandom(0.19634954631328583).RotatedBy((double)Projectile.velocity.ToRotation(), default); - int crystalDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, crystalDustType, 0f, 0f, 100, default, 1f); - Main.dust[crystalDust2].velocity *= 0.3f; - Main.dust[crystalDust2].position = Projectile.Center + value13 * (float)Projectile.width / 2f; - Main.dust[crystalDust2].fadeIn = 1.2f; - Main.dust[crystalDust2].scale = 1.5f; - Main.dust[crystalDust2].noGravity = true; + Vector2 value13 = -Vector2.UnitX.RotatedByRandom(MathHelper.Pi / 16f).RotatedBy(Projectile.velocity.ToRotation()); + Dust crystalDust2 = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, crystalDustType, 0f, 0f, 100, default, 1f); + crystalDust2.velocity *= 0.3f; + crystalDust2.position = Projectile.Center + value13 * Projectile.width / 2f; + crystalDust2.fadeIn = 1.2f; + crystalDust2.scale = 1.5f; + crystalDust2.noGravity = true; } Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.2f / 255f, (255 - Projectile.alpha) * 0.2f / 255f, (255 - Projectile.alpha) * 0.2f / 255f); - int paleDust = Dust.NewDust(Projectile.position, Projectile.width - 28, Projectile.height - 28, DustID.BoneTorch, 0f, 0f, 100, default, 0.8f); - Main.dust[paleDust].velocity *= 0.1f; - Main.dust[paleDust].velocity += Projectile.velocity * 0.5f; - Main.dust[paleDust].noGravity = true; + Dust paleDust = Dust.NewDustDirect(Projectile.position, Projectile.width - 28, Projectile.height - 28, DustID.BoneTorch, 0f, 0f, 100, default, 0.8f); + paleDust.velocity *= 0.1f; + paleDust.velocity += Projectile.velocity * 0.5f; + paleDust.noGravity = true; if (Main.rand.NextBool(12)) { - int shinyDust = Dust.NewDust(Projectile.position, Projectile.width - 32, Projectile.height - 32, DustID.Teleporter, 0f, 0f, 100, default, 1f); - Main.dust[shinyDust].velocity *= 0.25f; - Main.dust[shinyDust].velocity += Projectile.velocity * 0.5f; + Dust shinyDust = Dust.NewDustDirect(Projectile.position, Projectile.width - 32, Projectile.height - 32, DustID.Teleporter, 0f, 0f, 100, default, 1f); + shinyDust.velocity *= 0.25f; + shinyDust.velocity += Projectile.velocity * 0.5f; } } @@ -184,9 +184,9 @@ namespace CalamityMod.Projectiles.Typeless return false; } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 60); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 300); - public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 60); + public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 300); public override bool? CanHitNPC(NPC target) { @@ -213,23 +213,22 @@ namespace CalamityMod.Projectiles.Typeless int randomDust = 187; float crystalDust2 = 1.2f; - Vector2 dustRotate = (Projectile.rotation - 1.57079637f).ToRotationVector2(); - Vector2 dustVel = dustRotate * Projectile.velocity.Length() * (float)Projectile.MaxUpdates; + Vector2 dustRotate = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2(); + Vector2 dustVel = dustRotate * Projectile.velocity.Length() * Projectile.MaxUpdates; SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); int dustCount; for (int j = 0; j < 20; j = dustCount + 1) { - int superRandomDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, otherDustType, 0f, 0f, 200, default, crystalDust2); - Dust dust = Main.dust[superRandomDust]; - dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; + Dust dust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, otherDustType, 0f, 0f, 200, default, crystalDust2); + dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * Main.rand.NextFloat() * Projectile.width / 2f; dust.noGravity = true; dust.velocity.Y -= 6f; dust.velocity *= 3f; dust.velocity += dustVel * Main.rand.NextFloat(); - superRandomDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 0.6f); - dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; + dust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, randomDust, 0f, 0f, 100, default, 0.6f); + dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * Main.rand.NextFloat() * Projectile.width / 2f; dust.velocity.Y -= 6f; dust.velocity *= 2f; dust.noGravity = true; @@ -241,9 +240,8 @@ namespace CalamityMod.Projectiles.Typeless for (int k = 0; k < 10; k = dustCount + 1) { - int palestDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.BoneTorch, 0f, 0f, 0, default, 1.5f); - Main.dust[palestDust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 3f; - Dust dust = Main.dust[palestDust]; + Dust dust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, DustID.BoneTorch, 0f, 0f, 0, default, 1.5f); + dust.position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f; dust.noGravity = true; dust.velocity.Y -= 6f; dust.velocity *= 0.5f; diff --git a/Projectiles/Typeless/DryadsTearBurst.cs b/Projectiles/Typeless/DryadsTearBurst.cs new file mode 100644 index 0000000000..02b0294c1e --- /dev/null +++ b/Projectiles/Typeless/DryadsTearBurst.cs @@ -0,0 +1,35 @@ +using System; +using System.IO; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class DryadsTearBurst : BasicBurst, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Typeless"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.DamageType = DamageClass.Ranged; + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + pushVelocity = Utils.DirectionTo(Projectile.Center, target.Center); + float minMult = Projectile.ai[1]; + int hitsToMinMult = (int)Projectile.ai[2]; + float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); + modifiers.SourceDamage *= damageMult; + + if (Projectile.localAI[0] == 0) + modifiers.DisableCrit(); + else + modifiers.SetCrit(); + + if (customKnockback != 0) + target.MoveNPC(pushVelocity, customKnockback, hasStongDisplacement, Main.player[Projectile.owner]); + } + } +} diff --git a/Projectiles/Typeless/Elumphant.cs b/Projectiles/Typeless/Elumphant.cs index a9dfac404d..3e2d9c487a 100644 --- a/Projectiles/Typeless/Elumphant.cs +++ b/Projectiles/Typeless/Elumphant.cs @@ -123,31 +123,21 @@ namespace CalamityMod.Projectiles.Typeless } public void SetStats() { - maxTargetingDistance = (float)(500 * GetPower(0.3f)); - attackTimeAdjusted = (int)(FrozenCube.baseAttackSpeed / (GetPower(0.5f))); - damageScaling = (float)GetPower(1.35f, (1 + frozenCubePower * 0.2f)); - cooldownTime = (int)(FrozenCube.baseAttackCooldown / GetPower(0.5f)); + maxTargetingDistance = (float)(400 * (1+frozenCubePower)); + attackTimeAdjusted = (int)(FrozenCube.baseAttackSpeed/(1+frozenCubePower)); + damageScaling = 1+frozenCubePower; + cooldownTime = (int)(FrozenCube.baseAttackCooldown / (1 + frozenCubePower)); } public void SetElumphantPower() { int usedDefense = Owner.Calamity().frozenCubeUsedDefense; if (time == 0) // Show the player how much defense is being used CombatText.NewText(Projectile.Hitbox, color2, -usedDefense, false, true); - - // Defense investment softcaps at 110 (aka player has 330 defense) - float defenseCap = 110; - if (usedDefense > defenseCap) - { - float ratio = usedDefense / defenseCap; - usedDefense = (int)(defenseCap * MathF.Pow(ratio, 0.15f)); - } - - frozenCubePower = usedDefense * 0.05f; // 1 point of defense = 5% effectiveness - float power = (float)(GetPower(0.8f, (1 + frozenCubePower * 0.2f)) - 1); - Owner.Calamity().frozenCubeDebuffBoost = power; - Owner.Calamity().frozenCubeElumphantBoost = damageScaling - 1; - Owner.Calamity().ColdDebuffMultiplier += power; // Boost cold debuff damage + frozenCubePower = usedDefense * 0.04f; + Owner.Calamity().frozenCubeDebuffBoost = frozenCubePower; + Owner.Calamity().frozenCubeElumphantBoost = damageScaling; + Owner.Calamity().ColdDebuffMultiplier += frozenCubePower; } public double GetPower(float efficiency, float intenseScaling = 1) { @@ -288,7 +278,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.frame = 2; if (recoiling) { - attackTimeAdjusted = (int)(FrozenCube.baseAttackSpeed / GetPower(0.5f)); + attackTimeAdjusted = (int)(FrozenCube.baseAttackSpeed / (GetPower(0.5f))); if (Projectile.numHits > 1) attackTimer = attackTimeAdjusted; Projectile.numHits = 1; @@ -394,7 +384,7 @@ namespace CalamityMod.Projectiles.Typeless Vector2 shootPosition = Projectile.Center + shootVel * 5 * Projectile.scale; Projectile mist = Projectile.NewProjectileDirect(Owner.GetSource_FromThis(), shootPosition, (shootVel * shootPosition.Distance(targeted.Center) / 25) * Main.rand.NextFloat(0.9f, 1.1f), projectile, damage, 0, Owner.whoAmI, 0, Owner.ownedProjectileCounts[projectile] % 3, (float)GetPower(1)); } - mistShootTimer += (float)(0.35f * GetPower(0.25f)); + mistShootTimer += (float)(0.2f * GetPower(0.25f)); if (mistShootTimer >= 2f) mistShootTimer = 0; } @@ -783,5 +773,10 @@ namespace CalamityMod.Projectiles.Typeless // These extra frames before the hit allow for a bit of "hitstop" on the jump attack return (dashing && attackTimer >= attackTimeAdjusted + 3 && target == targeted) ? null : false; } + + public override bool? CanCutTiles() + { + return false; + } } } diff --git a/Scenes/MusicScenes/ProvidenceMusicScene.cs b/Scenes/MusicScenes/ProvidenceMusicScene.cs index 57c5e761e3..83bad91d2c 100644 --- a/Scenes/MusicScenes/ProvidenceMusicScene.cs +++ b/Scenes/MusicScenes/ProvidenceMusicScene.cs @@ -21,10 +21,11 @@ namespace CalamityMod.Systems if (ProvidenceSpawnState() == 180f) Main.musicFade[ProvidenceTrack] = 1f; } + public static float ProvidenceSpawnState() { int provIndex = CalamityGlobalNPC.holyBoss; - if (provIndex < 0 || provIndex >= Main.maxNPCs || !Main.npc[provIndex].active) + if (!Main.npc.IndexInRange(provIndex)) return -1f; var prov = Main.npc[provIndex]; diff --git a/Systems/Collections/CalamityItemSets.cs b/Systems/Collections/CalamityItemSets.cs index ed6c771f1f..3f7a5fca7f 100644 --- a/Systems/Collections/CalamityItemSets.cs +++ b/Systems/Collections/CalamityItemSets.cs @@ -167,7 +167,7 @@ namespace CalamityMod.Systems.Collections .Description("Labels this item as having Shady Salesman flavor text, making it draw at the top of the tooltip and the actual tooltip being drawn small below it.") .RegisterBoolSet(ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), - ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType()); + ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType()); /// /// If for an item type, this item is an accessory which uses a keybind for an active ability.
@@ -176,7 +176,7 @@ namespace CalamityMod.Systems.Collections ///
public static bool[] HasAccessoryKeybind = Factory.CreateNamedSet("HasAccessoryKeybind") .Description("Counts this item as having an accessory keybind. Used for assigning which keybind goes to which accessory.") - .RegisterBoolSet(ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), + .RegisterBoolSet(ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(),ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType()); } } diff --git a/Systems/Collections/CalamityNPCSets.cs b/Systems/Collections/CalamityNPCSets.cs index b3c715c348..4bcadfb295 100644 --- a/Systems/Collections/CalamityNPCSets.cs +++ b/Systems/Collections/CalamityNPCSets.cs @@ -158,13 +158,12 @@ namespace CalamityMod.Systems.Collections NPCID.ZombieElfGirl, NPCID.BloodEelHead, NPCID.GoblinShark, NPCID.EyeballFlyingFish, NPCID.ZombieMerman); /// - /// If for an NPC type, then that NPC is a post-Plantera Dungeon enemy. This causes two separate changes to the enemy.
- /// First, it grants them a 20% chance to drop Ectoplasm upon death.
- /// Second, it multiplies their max health by 2.5x and increases their damage by a flat 30 if Moon Lord has been defeated.
+ /// If for an NPC type, then that NPC is a post-Plantera Dungeon enemy.
+ /// This will multiply their max health by 2.5x and increase their damage by a flat 30 if Moon Lord has been defeated.
/// Defaults to . ///
public static bool[] IsBuffedDungeonEnemy = Factory.CreateNamedSet("IsBuffedDungeonEnemy") - .Description("Makes this NPC directly drop Ectoplasm on death, and buffs its health and damage after defeating Moon Lord.") + .Description("Makes this Dungeon enemy have buffed health and damage after defeating Moon Lord.") .RegisterBoolSet(NPCID.SkeletonSniper, NPCID.TacticalSkeleton, NPCID.SkeletonCommando, NPCID.Paladin, NPCID.GiantCursedSkull, NPCID.BoneLee, NPCID.DiabolistWhite, NPCID.DiabolistRed, NPCID.NecromancerArmored, NPCID.Necromancer, NPCID.RaggedCasterOpenCoat, NPCID.RaggedCaster, NPCID.HellArmoredBonesSword, NPCID.HellArmoredBonesMace, NPCID.HellArmoredBonesSpikeShield, NPCID.HellArmoredBones, NPCID.BlueArmoredBonesSword, NPCID.BlueArmoredBonesNoPants, NPCID.BlueArmoredBonesMace, NPCID.BlueArmoredBones, diff --git a/Systems/Mechanic/RecipeSystem.cs b/Systems/Mechanic/RecipeSystem.cs index cbbcf7e4d8..d2a19e76fa 100644 --- a/Systems/Mechanic/RecipeSystem.cs +++ b/Systems/Mechanic/RecipeSystem.cs @@ -755,13 +755,13 @@ namespace CalamityMod.Systems // Tier lock various items to a higher tier (sorted by progression) { Vanilla(ItemID.Trimarang), AddIngredient(ItemType(), 5) }, - { Vanilla(ItemID.NightsEdge), AddIngredient(ItemType(), 5) }, + { Vanilla(ItemID.NightsEdge), AddIngredient(ItemType(), 10) }, { Vanilla(ItemID.FairyBoots), AddIngredient(ItemID.SoulofLight, 5) }, { Vanilla(ItemID.FairyBell), RemoveIngredient(ItemID.SoulofSight) }, { Vanilla(ItemID.HellfireTreads), AddIngredient(ItemType(), 4) }, { Vanilla(ItemID.SpiritFlame), AddGroup(AnyAdamantiteBar, 2) }, { Vanilla(ItemID.TerraBlade), AddIngredient(ItemType(), 12) }, - { Vanilla(ItemID.FireGauntlet), AddIngredient(ItemType(), 5) }, + { Vanilla(ItemID.FireGauntlet), AddIngredient(ItemType(), 8) }, { Vanilla(ItemID.Zenith), ZenithRecipeEdit }, // Tier unlock various items to a lower tier (sorted by progression) @@ -1541,14 +1541,6 @@ namespace CalamityMod.Systems r.Register(); r.DisableDecraft(); - // Fledgling Wings - r = Recipe.Create(ItemID.CreativeWings); - r.AddIngredient(2); - r.AddIngredient(ItemID.Cloud, 5); - r.AddIngredient(ItemID.Feather, 10); - r.AddTile(TileID.Anvils); - r.Register(); - // Flying Carpet r = Recipe.Create(ItemID.FlyingCarpet); r.AddIngredient(ItemID.Silk, 10); diff --git a/Tiles/Astral/AstralBeacon.cs b/Tiles/Astral/AstralBeacon.cs index 8040ce829c..4a2cf2de6f 100644 --- a/Tiles/Astral/AstralBeacon.cs +++ b/Tiles/Astral/AstralBeacon.cs @@ -38,7 +38,6 @@ namespace CalamityMod.Tiles.Astral TileObjectData.addTile(Type); AddMapEntry(new Color(128, 128, 158), CalamityUtils.GetItemName()); TileID.Sets.DisableSmartCursor[Type] = true; - MinPick = 200; } public override bool CanExplode(int i, int j) => false; diff --git a/Tiles/Furniture/GluttonyBlender.cs b/Tiles/Furniture/GluttonyBlender.cs index 086cd0b507..6dbbdb6d56 100644 --- a/Tiles/Furniture/GluttonyBlender.cs +++ b/Tiles/Furniture/GluttonyBlender.cs @@ -236,8 +236,8 @@ namespace CalamityMod.Tiles.Furniture { Item dummy = new Item(); dummy.SetDefaults(ItemType); - // 0.1% per minute of duration, multiplied by 1.5x for T2 food and 2x for T3 food - float goodPercent = dummy.buffTime * (dummy.buffType == BuffID.WellFed3 ? 2f : dummy.buffType == BuffID.WellFed2 ? 1.5f : 1f) / 3600f / 10f; + // 0.1% per minute of duration, multiplied by 2x for T2 food and 10x for T3 food + float goodPercent = dummy.buffTime * (dummy.buffType == BuffID.WellFed3 ? 10f : dummy.buffType == BuffID.WellFed2 ? 2f : 1f) / 3600f / 10f; int itemDrop = Main.rand.NextFloat(100f) < goodPercent ? ModContent.ItemType() : ModContent.ItemType(); int i = Item.NewItem(Projectile.GetItemSource_DropAsItem(), Projectile.Center, itemDrop); diff --git a/Tiles/Furniture/Paintings/BaseCanvasPainting.cs b/Tiles/Furniture/Paintings/BaseCanvasPainting.cs index 6c036b064e..ebf85fd7f9 100644 --- a/Tiles/Furniture/Paintings/BaseCanvasPainting.cs +++ b/Tiles/Furniture/Paintings/BaseCanvasPainting.cs @@ -93,18 +93,18 @@ namespace CalamityMod.Tiles.Furniture.Paintings var t = Main.tile[i, j]; var texture = TextureAssets.Tile[Type].Value; var cube = CalamityUtils.FindTileEntity(i, j, 1, 1); - var pos = new Vector2(i * 16, j * 16) + CalamityUtils.TileDrawOffset; if (cube != null && t.TileFrameX == 0) { var fPX = (int)cube.framePosition.X; var fPY = (int)cube.framePosition.Y; var scale = (int)(texture.Width * 0.1f * cube.scale); + var rasterizer = Main.LocalPlayer.gravDir == -1f ? RasterizerState.CullNone : Main.Rasterizer; spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, rasterizer, null); spriteBatch.Draw(texture, pos - Main.screenPosition, new Rectangle(fPX, fPY, scale, scale), Lighting.GetColor(i, j), 0, new Vector2(0, 0), 1 / cube.scale * Scale, 0, 0); spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearWrap, DepthStencilState.None, Main.Rasterizer, null); + spriteBatch.Begin(); } // Calculate and draw the borders if (t.TileFrameX == 0 && t.TileFrameY == 0) diff --git a/Tiles/Furniture/PiggyCageGoldTile.cs b/Tiles/Furniture/PiggyCageGoldTile.cs index ae48755468..f2d2fa2a19 100644 --- a/Tiles/Furniture/PiggyCageGoldTile.cs +++ b/Tiles/Furniture/PiggyCageGoldTile.cs @@ -1,11 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CalamityMod.Items.Placeables.Furniture; +using CalamityMod.Items.Placeables.Furniture; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; using Terraria.GameContent; using Terraria.ID; @@ -16,8 +12,14 @@ namespace CalamityMod.Tiles.Furniture { public class PiggyCageGoldTile : ModTile { + public static Asset topTexture; + public override void SetStaticDefaults() { + if (!Main.dedServ) + { + topTexture = ModContent.Request("CalamityMod/Tiles/Furniture/TransparentGoldCageTile_Top"); + } Main.tileFrameImportant[Type] = true; Main.tileLavaDeath[Type] = true; Main.tileSolidTop[Type] = true; @@ -89,7 +91,7 @@ namespace CalamityMod.Tiles.Furniture drawRectangle = rect; drawRectangle.Y = 0; drawRectangle.Height = 10; - spriteBatch.Draw(BabyFlakCrabCageTile.topTexture.Value, position, drawRectangle, finalColor, 0f, zero, 1f, SpriteEffects.None, 0f); + spriteBatch.Draw(topTexture.Value, position, drawRectangle, finalColor, 0f, zero, 1f, SpriteEffects.None, 0f); } else { diff --git a/Tiles/Furniture/PiggyCageGoldTile.png b/Tiles/Furniture/PiggyCageGoldTile.png index a60cd8511d..035201e914 100644 Binary files a/Tiles/Furniture/PiggyCageGoldTile.png and b/Tiles/Furniture/PiggyCageGoldTile.png differ diff --git a/Tiles/Furniture/TransparentGoldCageTile_Top.png b/Tiles/Furniture/TransparentGoldCageTile_Top.png new file mode 100644 index 0000000000..be937ae4cc Binary files /dev/null and b/Tiles/Furniture/TransparentGoldCageTile_Top.png differ diff --git a/Tiles/Ores/AstralOre.cs b/Tiles/Ores/AstralOre.cs index d3a404368b..be3c6ca0ff 100644 --- a/Tiles/Ores/AstralOre.cs +++ b/Tiles/Ores/AstralOre.cs @@ -1,7 +1,5 @@ using System; -using System.Collections.Generic; using CalamityMod.Dusts; -using CalamityMod.Items.Materials; using CalamityMod.Tiles.Astral; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -29,7 +27,7 @@ namespace CalamityMod.Tiles.Ores TileID.Sets.Ore[Type] = true; TileID.Sets.OreMergesWithMud[Type] = true; - MinPick = 110; + MinPick = 210; DustType = DustID.ShadowbeamStaff; AddMapEntry(new Color(255, 153, 255), CreateMapEntryName()); MineResist = 3f; @@ -37,7 +35,7 @@ namespace CalamityMod.Tiles.Ores TileID.Sets.Ore[Type] = true; TileID.Sets.ChecksForMerge[Type] = true; - // TileID.Sets.DoesntGetReplacedWithTileReplacement[Type] = true; + TileID.Sets.DoesntGetReplacedWithTileReplacement[Type] = true; TileID.Sets.AvoidedByMeteorLanding[Type] = true; this.RegisterBlendMergeWith(ModContent.TileType()); @@ -72,19 +70,15 @@ namespace CalamityMod.Tiles.Ores } } - public override IEnumerable GetItemDrops(int i, int j) + public override bool CanKillTile(int i, int j, ref bool blockDamaged) { - if (!DownedBossSystem.downedAstrumDeus) - { - if (Main.rand.NextBool()) - yield return new Item(ModContent.ItemType()); - else - yield return new Item(0); - } - else - yield return new Item(ModContent.ItemType()); + return DownedBossSystem.downedAstrumDeus; } + public override bool CanExplode(int i, int j) + { + return false; + } public override void NumDust(int i, int j, bool fail, ref int num) { num = fail ? 1 : 3; diff --git a/Utilities/NPCDebuffs.cs b/Utilities/NPCDebuffs.cs index 487ee4a02a..c5dbd5a42a 100644 --- a/Utilities/NPCDebuffs.cs +++ b/Utilities/NPCDebuffs.cs @@ -106,7 +106,7 @@ namespace CalamityMod NPCID.Sets.SpecificDebuffImmunity[npc.type][BuffID.Confused] = true; // Sets certain vanilla NPCs and all town NPCs to be immune to most debuffs. - bool isConsideredSpecialTarget = npc.type == NPCID.SkeletronHead || npc.type == NPCID.DD2EterniaCrystal; + bool isConsideredSpecialTarget = npc.type == NPCID.DD2EterniaCrystal; bool isTownNPC = npc.townNPC || NPCID.Sets.ActsLikeTownNPC[npc.type]; bool applyRegularBuffImmunitySpecialCases = isConsideredSpecialTarget || isTownNPC; if (applyRegularBuffImmunitySpecialCases) diff --git a/Utilities/PlayerUtils.cs b/Utilities/PlayerUtils.cs index 8d3a4e0e50..10a5088a9f 100644 --- a/Utilities/PlayerUtils.cs +++ b/Utilities/PlayerUtils.cs @@ -545,8 +545,11 @@ namespace CalamityMod player.immune = true; player.immuneNoBlink = !blink; if (cooldownSlot < 0) - player.immuneTime = frames; - else + { + if (player.immuneTime < frames) + player.immuneTime = frames; + } + else if (player.hurtCooldowns[cooldownSlot] < frames) player.hurtCooldowns[cooldownSlot] = frames; return true; @@ -577,7 +580,8 @@ namespace CalamityMod // Apply iframes thoroughly. Player.AddImmuneTime is not used because iframes should not exceed the intended amount. player.immune = true; player.immuneNoBlink = !blink; - player.immuneTime = frames; + if (player.immuneTime < frames) + player.immuneTime = frames; for (int i = 0; i < player.hurtCooldowns.Length; ++i) if (player.hurtCooldowns[i] < frames) player.hurtCooldowns[i] = frames; diff --git a/Walls/LimestoneWall.cs b/Walls/LimestoneWall.cs index f6c40077db..a7a15cedd6 100644 --- a/Walls/LimestoneWall.cs +++ b/Walls/LimestoneWall.cs @@ -1,6 +1,7 @@ using Microsoft.Xna.Framework; using Terraria.ID; using Terraria.ModLoader; +using Terraria; namespace CalamityMod.Walls { @@ -10,6 +11,7 @@ namespace CalamityMod.Walls public override void SetStaticDefaults() { + Main.wallHouse[Type] = true; DustType = DustID.Pot; AddMapEntry(new Color(125, 85, 61)); this.AddMapEntryWithWaterVisibility(new Color(78, 76, 127)); diff --git a/World/CustomConditions.cs b/World/CustomConditions.cs index 67badca1ee..337a4e3d78 100644 --- a/World/CustomConditions.cs +++ b/World/CustomConditions.cs @@ -33,7 +33,7 @@ namespace CalamityMod.World public class SolidOrPlatform : GenCondition { - protected override bool CheckValidity(int x, int y) => TileID.Sets.Platforms[CalamityUtils.ParanoidTileRetrieval(x, y).TileType] || WorldGen.SolidTile(x, y); + protected override bool CheckValidity(int x, int y) => TileID.Sets.Platforms[CalamityUtils.ParanoidTileRetrieval(x, y).TileType] || WorldGen.SolidTile(Framing.GetTileSafely(x, y)); } public class IsNotTouchingAir : GenCondition diff --git a/World/CustomTemple.cs b/World/CustomTemple.cs index c2ff85acb2..1826053b78 100644 --- a/World/CustomTemple.cs +++ b/World/CustomTemple.cs @@ -921,6 +921,53 @@ namespace CalamityMod.World } } + // Places the "Lizard King" painting + int paintingAmt = Main.maxTilesX > 6400 ? Main.rand.Next(2, 4) : Main.maxTilesX > 4200 ? 2 : 1; + int paintingAttempts = 0; // Give up if all paintings cannot be placed after 10000 attempts + while (paintingAmt > 0 && paintingAttempts <= 10000) + { + paintingAttempts++; + int spotX = WorldGen.genRand.Next(templeLeft, templeRight); + int spotY = WorldGen.genRand.Next(templeTop, templeBottom); + if (Main.tile[spotX, spotY].WallType == WallID.LihzahrdBrickUnsafe && !Main.tile[spotX, spotY].HasTile) + { + bool abortPlacement = false; + for (int i = -70; i <= 70; i++) + { + for (int j = -70; j <= 70; j++) + { + int checkSpotX = spotX + i; + int checkSpotY = spotY + j; + if (!WorldGen.InWorld(checkSpotX, checkSpotY, 5)) + continue; + + Tile tile = Main.tile[checkSpotX, checkSpotY]; + if (tile.HasTile) + { + if (tile.TileType == TileID.Painting3X3) + { + abortPlacement = true; + break; + } + if (i >= -4 && i <= 4 && j >= -4 && j <= 4 && tile.TileType == TileID.LihzahrdBrick) + { + abortPlacement = true; + break; + } + } + } + + if (abortPlacement) + break; + } + if (abortPlacement) + continue; + + if (WorldGen.PlaceTile(spotX, spotY, TileID.Painting3X3, true, false, -1, 88)) + paintingAmt--; + } + } + // Return wood spikes back to normal after the above placements are done. Main.tileSolid[TileID.WoodenSpikes] = true; }