From 1c5e9594e5b88fc6061f1b737356c322e945eaba Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Tue, 11 Mar 2025 17:09:55 -0500 Subject: [PATCH 01/22] Replaced Global Iframes replaced all (i think?) instances of global iframes on projectiles that damage enemies with an equivalent amount of static iframes. Some projectile types, such as Bees and Giant bees, I gave shared static iframes to. About 650 projectiles were changed here. --- Items/Accessories/MarniteRepulsionShield.cs | 2 + .../en-US/Mods.CalamityMod.NPCs.hjson | 8 +- Projectiles/CalamityGlobalProjectile.cs | 14 + Projectiles/CalamityGlobalProjectileTweaks.cs | 595 +++++++++++++++--- .../DraedonsArsenal/TrackingDiskProjectile.cs | 2 + Projectiles/DraedonsArsenal/UnstableMatter.cs | 2 + Projectiles/Enemy/ToxicMinnowCloud.cs | 2 + Projectiles/Magic/AbyssBall.cs | 2 + Projectiles/Magic/AcidicSaxBubble.cs | 2 + Projectiles/Magic/AstralCrystal.cs | 2 + .../Magic/AstralCrystalInvisibleExplosion.cs | 2 + Projectiles/Magic/BloodRay.cs | 2 + Projectiles/Magic/DarkSparkPrism.cs | 2 + Projectiles/Magic/IceCluster.cs | 2 + Projectiles/Magic/LightningArc.cs | 2 + Projectiles/Magic/NightOrb.cs | 2 + Projectiles/Magic/NightsRayBeam.cs | 2 + Projectiles/Magic/RancorLargeCinder.cs | 2 + Projectiles/Magic/StickyFeather.cs | 2 + Projectiles/Magic/UberBubble.cs | 2 + Projectiles/Magic/WaterLeechProj.cs | 2 + Projectiles/Magic/WyvernFeatherGreen.cs | 2 + Projectiles/Magic/WyvernFeatherPink.cs | 2 + Projectiles/Magic/WyvernFeatherPurple.cs | 2 + .../Melee/ArkOfTheAncients_ParryHoldout.cs | 2 + .../Melee/ArkOfTheCosmos_ParryHoldout.cs | 2 + .../Melee/ArkOfTheElements_ParryHoldout.cs | 2 + Projectiles/Melee/BloodBall.cs | 2 + Projectiles/Melee/BrinyTyphoonBubble.cs | 2 + .../Melee/BrokenBiomeBlade_BitingEmbrace.cs | 2 + .../Melee/BrokenBiomeBlade_DecaysRetort.cs | 2 + Projectiles/Melee/ClamCrusherFlail.cs | 2 + Projectiles/Melee/DarkBall.cs | 2 + Projectiles/Melee/LaserFountain.cs | 2 + Projectiles/Melee/MarniteDeconstructorProj.cs | 2 + Projectiles/Melee/MarniteObliteratorProj.cs | 2 + .../MendedBiomeBlade_DecaysRetortDash.cs | 2 + .../MendedBiomeBlade_TrueBitingEmbrace.cs | 2 + .../MendedBiomeBlade_TrueDecaysRetort.cs | 2 + Projectiles/Melee/RendingNeedle.cs | 2 + .../Melee/Spears/AmidiasTridentProj.cs | 2 + Projectiles/Melee/Spears/SausageMakerSpear.cs | 2 + Projectiles/Melee/Spears/YateveoBloomSpear.cs | 2 + .../TrueArkOfTheAncients_ParryHoldout.cs | 2 + Projectiles/Ranged/AstralSandgun.cs | 2 + Projectiles/Ranged/DrataliornusExoArrow.cs | 2 + Projectiles/Ranged/Flash.cs | 2 + .../Ranged/OntologicalDespoilerBeam.cs | 2 + Projectiles/Ranged/PlagueExplosionFriendly.cs | 2 + Projectiles/Ranged/PrismaticEnergyBlast.cs | 2 + Projectiles/Ranged/TyphoonBubble.cs | 2 + Projectiles/Rogue/AshenStalactiteDebris.cs | 2 + Projectiles/Rogue/BallisticPoisonBombProj.cs | 2 + Projectiles/Rogue/BlazingStarProj.cs | 2 + Projectiles/Rogue/BrimbladeProj.cs | 2 + Projectiles/Rogue/CorpusAvertorStealth.cs | 2 + Projectiles/Rogue/CrystalPiercerProjectile.cs | 3 +- .../Rogue/DynamicPursuerElectricity.cs | 2 + Projectiles/Rogue/FrostyFlareProj.cs | 2 + Projectiles/Rogue/FrostyFlareStealth.cs | 2 + Projectiles/Rogue/GildedDaggerProj.cs | 2 + Projectiles/Rogue/GleamingDaggerProj.cs | 2 + Projectiles/Rogue/InfernalKrisProjectile.cs | 2 + Projectiles/Rogue/InfestedClawmerangProj.cs | 2 + Projectiles/Rogue/LionfishProj.cs | 2 + Projectiles/Rogue/NightsGazeSpark.cs | 2 + Projectiles/Rogue/NightsGazeStar.cs | 2 + Projectiles/Rogue/SandDollarProj.cs | 2 + Projectiles/Rogue/SphereSpiked.cs | 2 + Projectiles/Rogue/SphereYellow.cs | 2 + Projectiles/Rogue/ToothBallProjectile.cs | 3 +- Projectiles/Rogue/WebBallBol.cs | 2 + Projectiles/Summon/BloodRain.cs | 2 + Projectiles/Summon/DaedalusLightning.cs | 2 + Projectiles/Summon/DeathstareBeam.cs | 2 + Projectiles/Summon/HerringMinion.cs | 2 + .../Summon/SmallAresArms/ExoskeletonCannon.cs | 2 + Projectiles/Summon/VoidConcentrationAura.cs | 2 + .../Summon/VoidConcentrationBlackhole.cs | 2 + Projectiles/Typeless/DarkIce.cs | 2 + Projectiles/Typeless/SandBall.cs | 2 + Projectiles/Typeless/StickyFeatherAero.cs | 2 + Projectiles/Typeless/WulfrumDrillProj.cs | 2 + .../Collections/SharedStaticIFramesList.cs | 77 +++ 84 files changed, 779 insertions(+), 77 deletions(-) create mode 100644 Systems/Collections/SharedStaticIFramesList.cs diff --git a/Items/Accessories/MarniteRepulsionShield.cs b/Items/Accessories/MarniteRepulsionShield.cs index 8f20c5926b..ca173561dc 100644 --- a/Items/Accessories/MarniteRepulsionShield.cs +++ b/Items/Accessories/MarniteRepulsionShield.cs @@ -92,6 +92,8 @@ namespace CalamityMod.Items.Accessories Projectile.tileCollide = false; Projectile.ArmorPenetration = 20; Projectile.netImportant = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 9169d91206..e12ca32fb9 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -377,20 +377,20 @@ FAP: { Day1: I'm literally balls drunk off my sass right now, what do you want? Day1Alt: A nice day for a walk in the woods, don't you think? Anyway, what do you need? Day2: I'm either laughing because I'm drunk or because I've lost my mind, probably both. - Day2Alt: Some people ask me whether it's 'unicorn', 'pegacorn', 'alicorn', 'pegasus'... whatever, all of them suit me. + Day2Alt: Some people ask me whether it's 'unicorn', 'pegacorn', 'alicorn', 'pegasus'... whatever, all of them suit me. Day3: When I'm drunk I'm way happier... at least until the talking worms start to appear. Day3Alt: Did you know that certain worms can speak? Neither did I, until I flew to outer space. Day4: I should go fishing... while drunk, and jump into the ocean to spare myself {0}'s annoying naivety... - Day4Alt: I may be a 'hater' and a 'gatekeeper', but I'm also Dionysus' favorite princess, and the most fabulous girl in the world. + Day4Alt: I may be a 'hater' and a 'gatekeeper', but I'm also Dionysus' favorite princess, and the most fabulous girl in the world. DayStylist1: "{0} helped me accept my past. It's been tough, but I think I'm on the right path now." DayStylist2: Might go out for a jog later with {0}. Nice day for it. DayDrunk1: I drink to forget... What am I trying to forget, you might ask? Well, the point is to FORGET, not RECALL, isn't it? DayDrunk2: What a great day! Might just drink so much that I get poisoned again. Night1: A perfect night to light some candles, drink some wine, and relax. Night2: Here's a challenge, take a shot for every time you've had to use the wiki. Oh wait, you'd die. - Night2Alt: There's more to life than challenge, y'know. Be sure to sit back and treat yourself once in a while. + Night2Alt: There's more to life than challenge, y'know. Be sure to sit back and treat yourself once in a while. Night3: You lost or something? I don't mind company, but I'd rather be left alone at night. - Night3Alt: I do love gazing at the stars. You could join me, if you like. + Night3Alt: I do love gazing at the stars. You could join me, if you like. Night4: Are you sure you're 21? ...Alright, fine, but don't tell anyone I sold you these. NightStylist: I should watch some movies with {0} tonight. You could come too, but only if you bring snacks for us. Party: You'll always find me at parties where booze is involved... well, you'll always find BOOZE where I'M involved! diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index ad32facac2..c31c97506f 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4218,6 +4218,20 @@ namespace CalamityMod.Projectiles } #endregion + #region On Hit NPC + public override void OnHitNPC(Projectile projectile, NPC target, NPC.HitInfo hit, int damageDone) + { + int sharedIframeIndex = SharedStaticIFrames.IncludesAt(projectile.type); + if (sharedIframeIndex > -1 && projectile.usesIDStaticNPCImmunity) + { + foreach (int projType in SharedStaticIFrames.List[sharedIframeIndex]) + { + Projectile.perIDStaticNPCImmunity[projType][target.whoAmI] = Main.GameUpdateCount + (uint)projectile.idStaticNPCHitCooldown; + } + } + } + #endregion + #region Can Damage + Can Hit public override bool? CanDamage(Projectile projectile) { diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index ca4d8b8321..45e79415f3 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -1,4 +1,7 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -16,13 +19,13 @@ namespace CalamityMod.Projectiles { // Various shorthands for projectiles which receive very simple changes, such as setting one flag. IProjectileTweak[] defenseDamage = Do(DefenseDamage); - IProjectileTweak[] trueMelee = Do(TrueMelee); - IProjectileTweak[] trueMeleeNoSpeed = Do(TrueMeleeNoSpeed); + IProjectileTweak[] trueMelee = Do(TrueMelee, DefaultIDStaticIFrames); // All the tweaked true melee projectiles need to be changed from global to static as well + IProjectileTweak[] trueMeleeNoSpeed = Do(TrueMeleeNoSpeed, DefaultIDStaticIFrames); IProjectileTweak[] pointBlank = Do(PointBlank); IProjectileTweak[] standardBulletTweaks = Do(PointBlank, ExtraUpdatesDelta(+2)); IProjectileTweak[] standardChainsawTweaks = Do(TrueMeleeNoSpeed, ArmorPenetrationDelta(+15), LocalIFrames(5)); IProjectileTweak[] standardDrillTweaks = Do(TrueMeleeNoSpeed, ArmorPenetrationDelta(+25), LocalIFrames(5)); - IProjectileTweak[] counterweightTweaks = Do(MaxUpdatesExact(2), IDStaticIFrames(10)); + IProjectileTweak[] counterweightTweaks = Do(MaxUpdatesExact(2), DefaultIDStaticIFrames); // Shorthand for changing all the stats of a yoyo at once. This handles extra update related math for you. // For topSpeed, put in how fast you want the yoyo to be EXACTLY: it will be divided out in extra updates for you. @@ -116,14 +119,14 @@ namespace CalamityMod.Projectiles { ProjectileID.AdamantiteChainsaw, standardChainsawTweaks }, { ProjectileID.AdamantiteDrill, standardDrillTweaks }, { ProjectileID.AdamantiteGlaive, Do(TrueMelee, LocalIFrames(7)) }, - { ProjectileID.Anchor, Do(ExtraUpdatesExact(1)) }, - { ProjectileID.Arkhalis, Do(TrueMeleeNoSpeed, ScaleExact(1.25f)) }, - { ProjectileID.Bee, Do(PiercingExact(2)) }, - { ProjectileID.BeeArrow, Do(PointBlank, ExtraUpdatesExact(1)) }, + { ProjectileID.Anchor, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, + { ProjectileID.Arkhalis, Do(TrueMeleeNoSpeed, ScaleExact(1.25f), IDStaticIFrames(5)) }, + { ProjectileID.Bee, Do(PiercingExact(2), DefaultIDStaticIFrames) }, + { ProjectileID.BeeArrow, Do(PointBlank, ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, { ProjectileID.BlackCounterweight, counterweightTweaks }, { ProjectileID.BlueCounterweight, counterweightTweaks }, { ProjectileID.BlueMoon, Do(ExtraUpdatesExact(1)) }, - { ProjectileID.Bullet, standardBulletTweaks }, + { ProjectileID.Bullet, Do(PointBlank, ExtraUpdatesDelta(+2), DefaultIDStaticIFrames) }, { ProjectileID.BulletHighVelocity, Do(PointBlank, LocalIFrames(-1)) }, { ProjectileID.ButchersChainsaw, Do(TrueMeleeNoSpeed, ArmorPenetrationDelta(+15), LocalIFrames(5), ScaleExact(1.5f)) }, { ProjectileID.ChlorophyteChainsaw, standardChainsawTweaks }, @@ -132,45 +135,45 @@ namespace CalamityMod.Projectiles { ProjectileID.CobaltChainsaw, standardChainsawTweaks }, { ProjectileID.CobaltDrill, standardDrillTweaks }, { ProjectileID.CobaltNaginata, Do(TrueMelee, LocalIFrames(9)) }, - { ProjectileID.CrystalBullet, standardBulletTweaks }, + { ProjectileID.CrystalBullet, Do(PointBlank, ExtraUpdatesDelta(+2), DefaultIDStaticIFrames) }, { ProjectileID.CrystalVileShardHead, Do(LocalIFrames(23)) }, { ProjectileID.CrystalVileShardShaft, Do(LocalIFrames(23)) }, - { ProjectileID.CursedBullet, standardBulletTweaks }, + { ProjectileID.CursedBullet, Do(PointBlank, ExtraUpdatesDelta(+2), DefaultIDStaticIFrames) }, { ProjectileID.ClusterRocketI, Do(LocalIFrames(15)) }, { ProjectileID.ClusterFragmentsI, Do(IDStaticIFrames(15)) }, { ProjectileID.ClusterRocketII, Do(LocalIFrames(15)) }, { ProjectileID.ClusterFragmentsII, Do(IDStaticIFrames(15)) }, { ProjectileID.ClusterSnowmanRocketI, Do(LocalIFrames(15)) }, { ProjectileID.ClusterSnowmanRocketII, Do(LocalIFrames(15)) }, - { ProjectileID.DD2SquireSonicBoom, Do(PiercingExact(3)) }, // Flying Dragon + { ProjectileID.DD2SquireSonicBoom, Do(PiercingExact(3), DefaultIDStaticIFrames) }, // Flying Dragon { ProjectileID.EmeraldBolt, Do(NoPiercing) }, { ProjectileID.EmpressBlade, Do(LocalIFrames(30)) }, // Terraprisma - { ProjectileID.EnchantedBoomerang, Do(ExtraUpdatesExact(1)) }, - { ProjectileID.ExplosiveBullet, standardBulletTweaks }, + { ProjectileID.EnchantedBoomerang, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, + { ProjectileID.ExplosiveBullet, Do(PointBlank, ExtraUpdatesDelta(+2), IDStaticIFrames(5)) }, { ProjectileID.FairyQueenRangedItemShot, Do(PiercingExact(7), ExtraUpdatesExact(1)) }, // Eventide Convert - { ProjectileID.FlaironBubble, Do(ExtraUpdatesExact(1), TimeLeftExact(150)) }, - { ProjectileID.Flamarang, Do(ExtraUpdatesExact(2)) }, + { ProjectileID.FlaironBubble, Do(ExtraUpdatesExact(1), TimeLeftExact(150), DefaultIDStaticIFrames) }, + { ProjectileID.Flamarang, Do(ExtraUpdatesExact(2), DefaultIDStaticIFrames) }, { ProjectileID.Flames, Do(IDStaticIFrames(5)) }, // Flamethrower AND Elf Melter flames - { ProjectileID.FlamingJack, Do(ExtraUpdatesExact(1)) }, + { ProjectileID.FlamingJack, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, { ProjectileID.FlowerPetal, Do(MaxUpdatesExact(4), LocalIFrames(10)) }, // Orichalcum armor { ProjectileID.FlowerPow, Do(ExtraUpdatesExact(1)) }, - { ProjectileID.FlyingKnife, Do(ExtraUpdatesExact(1)) }, - { ProjectileID.FrostBoltStaff, Do(ExtraUpdatesExact(1)) }, - { ProjectileID.FruitcakeChakram, Do(ExtraUpdatesExact(1)) }, - { ProjectileID.GiantBee, Do(PiercingExact(2)) }, + { ProjectileID.FlyingKnife, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, + { ProjectileID.FrostBoltStaff, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, + { ProjectileID.FruitcakeChakram, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, + { ProjectileID.GiantBee, Do(PiercingExact(2), DefaultIDStaticIFrames) }, { ProjectileID.GladiusStab, Do(TrueMelee, LocalIFrames(-1)) }, - { ProjectileID.GoldenBullet, standardBulletTweaks }, - { ProjectileID.GoldenShowerFriendly, Do(PiercingExact(2)) }, + { ProjectileID.GoldenBullet, Do(PointBlank, ExtraUpdatesDelta(+2), DefaultIDStaticIFrames) }, + { ProjectileID.GoldenShowerFriendly, Do(PiercingExact(2), DefaultIDStaticIFrames) }, { ProjectileID.GreenCounterweight, counterweightTweaks }, { ProjectileID.Hamdrax, standardDrillTweaks }, // Drax (never internally renamed since 1.1) - { ProjectileID.IceBoomerang, Do(ExtraUpdatesExact(1)) }, + { ProjectileID.IceBoomerang, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, { ProjectileID.IceSickle, Do(ExtraUpdatesExact(1)) }, - { ProjectileID.IchorBullet, standardBulletTweaks }, - { ProjectileID.InfluxWaver, Do(ExtraUpdatesExact(1)) }, - { ProjectileID.InfernoFriendlyBolt, Do(ExtraUpdatesExact(1)) }, - { ProjectileID.InfernoFriendlyBlast, Do(ExtraUpdatesExact(2)) }, + { ProjectileID.IchorBullet, Do(PointBlank, ExtraUpdatesDelta(+2), DefaultIDStaticIFrames) }, + { ProjectileID.InfluxWaver, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, + { ProjectileID.InfernoFriendlyBolt, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, + { ProjectileID.InfernoFriendlyBlast, Do(ExtraUpdatesExact(2), DefaultIDStaticIFrames) }, { ProjectileID.LaserDrill, Do(ArmorPenetrationDelta(+25), LocalIFrames(5)) }, - { ProjectileID.LightDisc, Do(MaxUpdatesExact(3)) }, + { ProjectileID.LightDisc, Do(MaxUpdatesExact(3), DefaultIDStaticIFrames) }, { ProjectileID.LostSoulHostile, Do(TileCollide) }, // Ragged Caster { ProjectileID.MeteorShot, standardBulletTweaks }, { ProjectileID.Meowmere, Do(PiercingExact(3), LocalIFrames(-1)) }, @@ -181,14 +184,14 @@ namespace CalamityMod.Projectiles { ProjectileID.MythrilChainsaw, standardChainsawTweaks }, { ProjectileID.MythrilDrill, standardDrillTweaks }, { ProjectileID.MythrilHalberd, Do(TrueMelee, LocalIFrames(8)) }, - { ProjectileID.NanoBullet, standardBulletTweaks }, + { ProjectileID.NanoBullet, Do(PointBlank, ExtraUpdatesDelta(+2), DefaultIDStaticIFrames) }, { ProjectileID.NebulaDrill, standardDrillTweaks }, { ProjectileID.NebulaLaser, Do(ExtraUpdatesDelta(-1)) }, { ProjectileID.OrichalcumChainsaw, standardChainsawTweaks }, { ProjectileID.OrichalcumDrill, standardDrillTweaks }, { ProjectileID.PalladiumChainsaw, standardChainsawTweaks }, { ProjectileID.PalladiumDrill, standardDrillTweaks }, - { ProjectileID.PartyBullet, standardBulletTweaks }, + { ProjectileID.PartyBullet, Do(PointBlank, ExtraUpdatesDelta(+2), DefaultIDStaticIFrames) }, { ProjectileID.PoisonFang, Do(LocalIFrames(10)) }, { ProjectileID.PurpleCounterweight, counterweightTweaks }, { ProjectileID.QueenSlimeGelAttack, Do(NoPiercing) }, @@ -200,20 +203,20 @@ namespace CalamityMod.Projectiles { ProjectileID.RocketFireworkYellow, Do(TimeLeftDelta(+45)) }, { ProjectileID.SawtoothShark, Do(TrueMeleeNoSpeed, ArmorPenetrationDelta(+15), LocalIFrames(6)) }, { ProjectileID.ShadowBeamHostile, Do(ExtraUpdatesExact(1)) }, - { ProjectileID.Shroomerang, Do(ExtraUpdatesExact(1)) }, + { ProjectileID.Shroomerang, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, { ProjectileID.SolarFlareDrill, standardDrillTweaks }, { ProjectileID.StardustDrill, standardDrillTweaks }, - { ProjectileID.Starfury, Do(TimeLeftExact(75)) }, + { ProjectileID.Starfury, Do(TimeLeftExact(75), DefaultIDStaticIFrames) }, { ProjectileID.StarWrath, Do(NoPiercing) }, { ProjectileID.Sunfury, Do(ExtraUpdatesExact(1)) }, - { ProjectileID.SwordBeam, Do(ExtraUpdatesExact(2)) }, // Beam Sword projectile - { ProjectileID.Terragrim, Do(TrueMeleeNoSpeed, ScaleExact(1.25f)) }, - { ProjectileID.ThunderStaffShot, Do(PiercingExact(3)) }, //Thunder Zapper projectile + { ProjectileID.SwordBeam, Do(ExtraUpdatesExact(2), DefaultIDStaticIFrames) }, // Beam Sword projectile + { ProjectileID.Terragrim, Do(TrueMeleeNoSpeed, ScaleExact(1.25f), IDStaticIFrames(5)) }, + { ProjectileID.ThunderStaffShot, Do(PiercingExact(3), DefaultIDStaticIFrames) }, //Thunder Zapper projectile { ProjectileID.TitaniumChainsaw, standardChainsawTweaks }, { ProjectileID.TitaniumDrill, standardDrillTweaks }, - { ProjectileID.Trimarang, Do(ExtraUpdatesExact(1)) }, + { ProjectileID.Trimarang, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, { ProjectileID.TrueNightsEdge, Do(PiercingExact(4)) }, - { ProjectileID.VenomBullet, standardBulletTweaks }, + { ProjectileID.VenomBullet, Do(PointBlank, ExtraUpdatesDelta(+2), DefaultIDStaticIFrames) }, { ProjectileID.VenomFang, Do(LocalIFrames(10)) }, { ProjectileID.VortexDrill, standardDrillTweaks }, { ProjectileID.Wasp, Do(PiercingExact(2)) }, @@ -236,7 +239,7 @@ namespace CalamityMod.Projectiles { ProjectileID.ObsidianSwordfish, trueMelee }, { ProjectileID.OrichalcumHalberd, trueMelee }, { ProjectileID.PalladiumPike, trueMelee }, - { ProjectileID.PiercingStarlight, trueMelee }, + { ProjectileID.PiercingStarlight, Do(TrueMelee, IDStaticIFrames(4)) }, { ProjectileID.PlatinumShortswordStab, trueMelee }, { ProjectileID.RulerStab, trueMelee }, { ProjectileID.ShadowJoustingLance, trueMelee }, @@ -254,41 +257,41 @@ namespace CalamityMod.Projectiles #endregion #region CATEGORY 4: Point Blank support - { ProjectileID.Blizzard, pointBlank }, // Blizzard Staff projectiles, re-used in Frostbite Blaster. - { ProjectileID.BlueFlare, pointBlank }, - { ProjectileID.BoneArrow, pointBlank }, - { ProjectileID.CandyCorn, pointBlank }, - { ProjectileID.ChlorophyteArrow, pointBlank }, - { ProjectileID.ChlorophyteBullet, pointBlank }, - { ProjectileID.CrimsandBallGun, pointBlank }, - { ProjectileID.CrystalDart, pointBlank }, - { ProjectileID.CursedArrow, pointBlank }, - { ProjectileID.CursedDart, pointBlank }, + { ProjectileID.Blizzard, Do(PointBlank, DefaultIDStaticIFrames) }, // Blizzard Staff projectiles, re-used in Frostbite Blaster. + { ProjectileID.BlueFlare, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.BoneArrow, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.CandyCorn, Do(PointBlank, IDStaticIFrames(7)) }, + { ProjectileID.ChlorophyteArrow, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.ChlorophyteBullet, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.CrimsandBallGun, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.CrystalDart, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.CursedArrow, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.CursedDart, Do(PointBlank, DefaultIDStaticIFrames) }, { ProjectileID.DD2PhoenixBowShot, pointBlank }, // Phantom Phoenix - { ProjectileID.EbonsandBallGun, pointBlank }, - { ProjectileID.FireArrow, pointBlank }, - { ProjectileID.Flare, pointBlank }, - { ProjectileID.FrostburnArrow, pointBlank }, + { ProjectileID.EbonsandBallGun, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.FireArrow, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.Flare, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.FrostburnArrow, Do(PointBlank, DefaultIDStaticIFrames) }, { ProjectileID.Harpoon, pointBlank }, - { ProjectileID.Hellwing, pointBlank }, - { ProjectileID.HellfireArrow, pointBlank }, - { ProjectileID.HolyArrow, pointBlank }, - { ProjectileID.IchorArrow, pointBlank }, - { ProjectileID.JestersArrow, pointBlank }, + { ProjectileID.Hellwing, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.HellfireArrow, Do(PointBlank, ExtraUpdatesDelta(+2)) }, + { ProjectileID.HolyArrow, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.IchorArrow, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.JestersArrow, Do(PointBlank, DefaultIDStaticIFrames) }, { ProjectileID.MoonlordArrow, pointBlank }, // Luminite Arrow - { ProjectileID.PainterPaintball, pointBlank }, - { ProjectileID.PearlSandBallGun, pointBlank }, - { ProjectileID.PhantasmArrow, pointBlank }, - { ProjectileID.PoisonDartBlowgun, pointBlank }, - { ProjectileID.PulseBolt, pointBlank }, - { ProjectileID.SandBallGun, pointBlank }, - { ProjectileID.Seed, pointBlank }, - { ProjectileID.ShadowFlameArrow, pointBlank }, - { ProjectileID.SnowBallFriendly, pointBlank }, - { ProjectileID.Stake, pointBlank }, - { ProjectileID.UnholyArrow, pointBlank }, - { ProjectileID.VenomArrow, pointBlank }, - { ProjectileID.WoodenArrowFriendly, pointBlank }, + { ProjectileID.PainterPaintball, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.PearlSandBallGun, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.PhantasmArrow, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.PoisonDartBlowgun, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.PulseBolt, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.SandBallGun, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.Seed, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.ShadowFlameArrow, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.SnowBallFriendly, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.Stake, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.UnholyArrow, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.VenomArrow, Do(PointBlank, DefaultIDStaticIFrames) }, + { ProjectileID.WoodenArrowFriendly, Do(PointBlank, DefaultIDStaticIFrames) }, #endregion #region CATEGORY 5: Defense Damage support @@ -327,6 +330,455 @@ namespace CalamityMod.Projectiles { ProjectileID.ThornBall, Do(Main.zenithWorld ? IgnoreWater : DontIgnoreWater, DefenseDamage) }, // Plantera bouncing thorn balls { ProjectileID.UnholyTridentHostile, defenseDamage }, #endregion + #region CATEGORY 6: Static Iframe changes + {ProjectileID.Shuriken, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VilethornBase, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VilethornTip, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PurificationPowder, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VilePowder, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FallingStar, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Hook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BallofFire, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MagicMissile, Do(IDStaticIFrames(8))}, + {ProjectileID.DirtBall, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ShadowOrb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GreenLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Bone, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WaterStream, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SpikyBall, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WaterBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Bomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Dynamite, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Grenade, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SandBallFalling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.IvyWhip, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ThornChakram, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StickyBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MudBall, Do(DefaultIDStaticIFrames)}, + {ProjectileID.AshBallFalling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DemonScythe, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ThrowingKnife, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WoodenBoomerang, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PoisonedKnife, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EbonsandBallFalling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PearlSandBallFalling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HolyWater, Do(DefaultIDStaticIFrames)}, + {ProjectileID.UnholyWater, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SiltBall, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BlueFairy, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DualHookBlue, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DualHookRed, Do(DefaultIDStaticIFrames)}, + {ProjectileID.QuarterNote, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EighthNote, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TiedEighthNote, Do(DefaultIDStaticIFrames)}, + {ProjectileID.IceBlock, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PinkFairy, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GreenFairy, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PurpleLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CrystalShard, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HallowStar, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CrystalStorm, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CursedFlameFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PoisonDart, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Boulder, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Explosives, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Bunny, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Penguin, Do(DefaultIDStaticIFrames)}, + {ProjectileID.UnholyTridentFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.IceBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FrostArrow, Do(DefaultIDStaticIFrames)}, + {ProjectileID.AmethystBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TopazBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SapphireBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RubyBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DiamondBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Turtle, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Mushroom, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketI, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ProximityMineI, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ProximityMineII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketIII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ProximityMineIII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketIV, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ProximityMineIV, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PureSpray, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HallowSpray, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CorruptSpray, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MushroomSpray, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CrimsonSpray, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NettleBurstRight, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NettleBurstLeft, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NettleBurstEnd, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BeachBall, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NightBeam, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CopperCoin, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SilverCoin, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GoldCoin, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PlatinumCoin, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CannonballFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Landmine, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Web, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EnchantedBeam, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyEater, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SlushBall, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PossessedHatchet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Beenade, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PoisonDartTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SpikyBallTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SpearTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FlamesTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PygmySpear, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabySkeletronHead, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyHornet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TikiSpirit, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PetLizard, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Leaf, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Parrot, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Truffle, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Sapling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Wisp, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChlorophytePartisan, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CrystalLeaf, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CrystalLeafShot, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GemHookAmethyst, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GemHookTopaz, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GemHookSapphire, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GemHookEmerald, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GemHookRuby, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GemHookDiamond, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyDino, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CrimsandBallFalling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Stynger, Do(IDStaticIFrames(7))}, + {ProjectileID.FlowerPowPetal, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StyngerShrapnel, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BallofFrost, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MagnetSphereBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SkeletronHand, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HeatRay, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BoulderStaffOfEarth, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolemFist, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EyeSpring, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabySnowman, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BoxingGlove, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Bananarang, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChainKnife, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ShadowBeamFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PaladinsHammerFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VampireKnife, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EatersBite, Do(DefaultIDStaticIFrames)}, + {ProjectileID.JackOLantern, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Spider, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Squashling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BatHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Bat, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RottenEgg, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BlackCat, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BloodyMachete, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WoodHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CursedSapling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StarAnise, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CandyCaneHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChristmasHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Puppy, Do(DefaultIDStaticIFrames)}, + {ProjectileID.OrnamentFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PineNeedleFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketSnowmanI, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketSnowmanII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketSnowmanIII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketSnowmanIV, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NorthPoleWeapon, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NorthPoleSpear, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NorthPoleSnowflake, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyGrinch, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LovePotion, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FoulPotion, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FishHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HornetStinger, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SpiderEgg, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabySpider, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ZephyrFish, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniRetinaLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SlimeHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StickyGrenade, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniMinotaur, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MolotovCocktail, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MolotovFire, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MolotovFire2, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MolotovFire3, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TrackHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Flairon, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniSharkron, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Typhoon, Do(IDStaticIFrames(6))}, + {ProjectileID.Bubble, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketFireworksBoxRed, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketFireworksBoxGreen, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketFireworksBoxBlue, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketFireworksBoxYellow, Do(DefaultIDStaticIFrames)}, + {ProjectileID.UFOMinion, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Meteor1, Do(IDStaticIFrames(5))}, + {ProjectileID.Meteor2, Do(IDStaticIFrames(5))}, + {ProjectileID.Meteor3, Do(IDStaticIFrames(5))}, + {ProjectileID.UFOLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ScutlixLaserFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LaserMachinegun, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LaserMachinegunLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ElectrosphereMissile, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Electrosphere, Do(IDStaticIFrames(8))}, + {ProjectileID.Xenopopper, Do(DefaultIDStaticIFrames)}, + {ProjectileID.AntiGravityHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChargedBlasterOrb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChargedBlasterCannon, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChargedBlasterLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ViciousPowder, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StickyDynamite, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BoneArrowFromMerchant, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SoulDrain, Do(DefaultIDStaticIFrames)}, + {ProjectileID.IchorDart, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CursedDartFlame, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChainGuillotine, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SeedlerNut, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SeedlerThorn, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TendonHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ThornHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.IlluminantHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WormHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MagicLantern, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ShadowFlameKnife, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyFaceMonster, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CrimsonHeart, Do(DefaultIDStaticIFrames)}, + {ProjectileID.JavelinFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ToxicFlask, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ToxicCloud, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ToxicCloud2, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ToxicCloud3, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NailFriendly, Do(IDStaticIFrames(1))}, + {ProjectileID.BouncyBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BouncyGrenade, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CoinPortal, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BombFish, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FrostDaggerfish, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CrystalPulse, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CrystalPulse2, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ToxicBubble, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MedusaHead, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MedusaHeadRay, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SporeTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SporeTrap2, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SporeGas, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SporeGas2, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SporeGas3, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VortexVortexLightning, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VortexVortexPortal, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MechanicWrench, Do(IDStaticIFrames(7))}, + {ProjectileID.NurseSyringeHurt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NurseSyringeHeal, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ClothiersCurse, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DryadsWardCircle, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PartyGirlGrenade, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SantaBombs, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TruffleSpore, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MinecartMechLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.AmberBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BoneJavelin, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BoneDagger, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PortalGun, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PortalGunBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PortalGunGate, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ScutlixLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SolarFlareRay, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SolarCounter, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StardustCellMinion, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StardustCellMinionShot, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VortexBeater, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VortexBeaterRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NebulaArcanumExplosionShot, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NebulaArcanumExplosionShotShard, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BloodWater, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StardustGuardianExplosion, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Phantasm, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LastPrismLaser, Do(IDStaticIFrames(5))}, + {ProjectileID.LastPrism, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NebulaBlaze1, Do(IDStaticIFrames(5))}, + {ProjectileID.NebulaBlaze2, Do(IDStaticIFrames(5))}, + {ProjectileID.Daybreak, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BouncyDynamite, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LunarHookSolar, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LunarHookVortex, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LunarHookNebula, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LunarHookStardust, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SuspiciousTentacle, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WireKite, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StaticHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CompanionCube, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GeyserTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BeeHive, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SpiritFlame, Do(IDStaticIFrames(5))}, + {ProjectileID.SkyFracture, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Ale, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DD2ExplosiveTrapT1, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DD2ExplosiveTrapT2, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DD2ExplosiveTrapT3, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DD2PetDragon, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DD2PetGhost, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DD2PetGato, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DD2PhoenixBow, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MonkStaffT3_AltShot, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BookStaffShot, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Celeb2Weapon, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Celeb2Rocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Celeb2RocketExplosive, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Celeb2RocketLarge, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Celeb2RocketExplosiveLarge, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DirtGolfBall, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RollingCactus, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ThunderSpear, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ThunderSpearShot, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolfBallDyedBlack, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolfBallDyedBlue, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolfBallDyedBrown, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolfBallDyedCyan, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolfBallDyedGreen, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolfBallDyedLimeGreen, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolfBallDyedOrange, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolfBallDyedPink, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolfBallDyedPurple, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolfBallDyedRed, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolfBallDyedSkyBlue, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolfBallDyedTeal, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolfBallDyedViolet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolfBallDyedYellow, Do(DefaultIDStaticIFrames)}, + {ProjectileID.AmberHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PaperAirplaneA, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PaperAirplaneB, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RollingCactusSpike, Do(DefaultIDStaticIFrames)}, + {ProjectileID.UpbeatStar, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SugarGlider, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Geode, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ScarabBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SharkPup, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ClusterMineI, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ClusterMineII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WetRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WetMine, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LavaRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LavaMine, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HoneyRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HoneyGrenade, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HoneyMine, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniNukeRocketI, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniNukeMineI, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniNukeRocketII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniNukeMineII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DryRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DryMine, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WetSnowmanRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LavaSnowmanRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HoneySnowmanRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniNukeSnowmanRocketI, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniNukeSnowmanRocketII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DrySnowmanRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ShellPileFalling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BloodNautilusTears, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LilHarpy, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FennecFox, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GlitteryButterfly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BloodArrow, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChumBucket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyImp, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyRedPanda, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StormTigerGem, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BookOfSkullsSkull, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Plantero, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DynamiteKitten, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyWerewolf, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ShadowMimic, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Football, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ClusterSnowmanFragmentsI, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ClusterSnowmanFragmentsII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SquirrelHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TreeGlobe, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WorldGlobe, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VoltBunny, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ZapinatorLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ZoologistStrikeGreen, Do(DefaultIDStaticIFrames)}, + {ProjectileID.KingSlimePet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EyeOfCthulhuPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EaterOfWorldsPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BrainOfCthulhuPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SkeletronPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.QueenBeePet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DestroyerPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TwinsPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SkeletronPrimePet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PlanteraPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolemPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DukeFishronPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LunaticCultistPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MoonLordPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FairyQueenPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PumpkingPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EverscreamPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.IceQueenPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MartianPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DD2OgrePet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DD2BetsyPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CombatWrench, Do(IDStaticIFrames(7))}, + {ProjectileID.WetBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LavaBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HoneyBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DryBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.OrnamentStar, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TitaniumStormShard, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DirtBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DirtStickyBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DripplerFlailExtraBall, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ZoologistStrikeRed, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SantankMountRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.QueenSlimePet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.QueenSlimeHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GelBalloon, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PrincessWeapon, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WandOfSparkingSpark, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StarCannonStar, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BerniePet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GlommerPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DeerclopsPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PigPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChesterPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HoundiusShootiusFireball, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PewMaticHornShot, Do(DefaultIDStaticIFrames)}, + {ProjectileID.AbigailCounter, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TentacleSpike, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BloodButcherer, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WandOfFrostingFrost, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VenomDartTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SilverBullet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.JunimoPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.JuminoStardropAnimation, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MoonGlobe, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BlueChickenPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Spiffo, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CavelingGardener, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniBoulder, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ShimmerArrow, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GasTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SpelunkerFlare, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CursedFlare, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RainbowFlare, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ShimmerFlare, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Waffle, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BouncyBoulder, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LifeCrystalBoulder, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SandSpray, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SnowSpray, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DirtSpray, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DirtiestBlock, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Fertilizer, Do(DefaultIDStaticIFrames)}, + {ProjectileID.JimsDrone, Do(DefaultIDStaticIFrames)}, + + #endregion + }; } @@ -472,6 +924,7 @@ namespace CalamityMod.Projectiles } } internal static IProjectileTweak IDStaticIFrames(int f) => new IDStaticIFrameRule(f); + internal static IProjectileTweak DefaultIDStaticIFrames => new IDStaticIFrameRule(10); #endregion #region Ignore Water diff --git a/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs b/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs index 5bb2ae7fd9..663f094891 100644 --- a/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs +++ b/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs @@ -47,6 +47,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Projectile.penetrate = -1; Projectile.extraUpdates = 1; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/DraedonsArsenal/UnstableMatter.cs b/Projectiles/DraedonsArsenal/UnstableMatter.cs index 34f8e8b7b6..2e2145377f 100644 --- a/Projectiles/DraedonsArsenal/UnstableMatter.cs +++ b/Projectiles/DraedonsArsenal/UnstableMatter.cs @@ -31,6 +31,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Projectile.tileCollide = true; Projectile.penetrate = -1; Projectile.timeLeft = 480; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Enemy/ToxicMinnowCloud.cs b/Projectiles/Enemy/ToxicMinnowCloud.cs index fa67dcad89..f5ba29a1d1 100644 --- a/Projectiles/Enemy/ToxicMinnowCloud.cs +++ b/Projectiles/Enemy/ToxicMinnowCloud.cs @@ -25,6 +25,8 @@ namespace CalamityMod.Projectiles.Enemy Projectile.ignoreWater = true; Projectile.timeLeft = 600; Projectile.alpha = 120; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/AbyssBall.cs b/Projectiles/Magic/AbyssBall.cs index 7b1c806410..96d90b3332 100644 --- a/Projectiles/Magic/AbyssBall.cs +++ b/Projectiles/Magic/AbyssBall.cs @@ -21,6 +21,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.tileCollide = false; Projectile.timeLeft = 300; Projectile.DamageType = DamageClass.Magic; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/AcidicSaxBubble.cs b/Projectiles/Magic/AcidicSaxBubble.cs index 740ff708e4..75a229df18 100644 --- a/Projectiles/Magic/AcidicSaxBubble.cs +++ b/Projectiles/Magic/AcidicSaxBubble.cs @@ -31,6 +31,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.DamageType = DamageClass.Magic; Projectile.penetrate = -1; Projectile.alpha = 255; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/AstralCrystal.cs b/Projectiles/Magic/AstralCrystal.cs index 296fb9b03d..188e0b38ce 100644 --- a/Projectiles/Magic/AstralCrystal.cs +++ b/Projectiles/Magic/AstralCrystal.cs @@ -30,6 +30,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.extraUpdates = 2; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void OnKill(int timeLeft) diff --git a/Projectiles/Magic/AstralCrystalInvisibleExplosion.cs b/Projectiles/Magic/AstralCrystalInvisibleExplosion.cs index a958dd9dc9..3fbe159a25 100644 --- a/Projectiles/Magic/AstralCrystalInvisibleExplosion.cs +++ b/Projectiles/Magic/AstralCrystalInvisibleExplosion.cs @@ -17,6 +17,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Magic/BloodRay.cs b/Projectiles/Magic/BloodRay.cs index 04b524b607..76cc9a31f0 100644 --- a/Projectiles/Magic/BloodRay.cs +++ b/Projectiles/Magic/BloodRay.cs @@ -24,6 +24,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = 10; Projectile.extraUpdates = 100; Projectile.timeLeft = Lifetime; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/DarkSparkPrism.cs b/Projectiles/Magic/DarkSparkPrism.cs index a512651328..bf2299ddcd 100644 --- a/Projectiles/Magic/DarkSparkPrism.cs +++ b/Projectiles/Magic/DarkSparkPrism.cs @@ -29,6 +29,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; Projectile.ignoreWater = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void SendExtraAI(BinaryWriter writer) diff --git a/Projectiles/Magic/IceCluster.cs b/Projectiles/Magic/IceCluster.cs index 40d362af69..4ce8847842 100644 --- a/Projectiles/Magic/IceCluster.cs +++ b/Projectiles/Magic/IceCluster.cs @@ -26,6 +26,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; Projectile.coldDamage = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/LightningArc.cs b/Projectiles/Magic/LightningArc.cs index 441739fc9c..8f43f46666 100644 --- a/Projectiles/Magic/LightningArc.cs +++ b/Projectiles/Magic/LightningArc.cs @@ -26,6 +26,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.timeLeft = 20; Projectile.penetrate = 5; Projectile.tileCollide = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } diff --git a/Projectiles/Magic/NightOrb.cs b/Projectiles/Magic/NightOrb.cs index c5373229e3..0bfd8ae7cc 100644 --- a/Projectiles/Magic/NightOrb.cs +++ b/Projectiles/Magic/NightOrb.cs @@ -16,6 +16,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.timeLeft = 30; Projectile.DamageType = DamageClass.Magic; Projectile.ignoreWater = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/NightsRayBeam.cs b/Projectiles/Magic/NightsRayBeam.cs index 0e38e73656..f004db67aa 100644 --- a/Projectiles/Magic/NightsRayBeam.cs +++ b/Projectiles/Magic/NightsRayBeam.cs @@ -23,6 +23,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = 10; Projectile.extraUpdates = 100; Projectile.timeLeft = 150; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/RancorLargeCinder.cs b/Projectiles/Magic/RancorLargeCinder.cs index a27ef75db1..ac874b32c1 100644 --- a/Projectiles/Magic/RancorLargeCinder.cs +++ b/Projectiles/Magic/RancorLargeCinder.cs @@ -21,6 +21,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.friendly = true; Projectile.timeLeft = 300; Projectile.ignoreWater = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/StickyFeather.cs b/Projectiles/Magic/StickyFeather.cs index 96822f36ce..1381de00cf 100644 --- a/Projectiles/Magic/StickyFeather.cs +++ b/Projectiles/Magic/StickyFeather.cs @@ -25,6 +25,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.DamageType = DamageClass.Magic; Projectile.aiStyle = ProjAIStyleID.Nail; AIType = ProjectileID.NailFriendly; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/UberBubble.cs b/Projectiles/Magic/UberBubble.cs index 3bd8f7fb9c..36f9ad6e48 100644 --- a/Projectiles/Magic/UberBubble.cs +++ b/Projectiles/Magic/UberBubble.cs @@ -22,6 +22,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Magic; Projectile.timeLeft = 30; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/WaterLeechProj.cs b/Projectiles/Magic/WaterLeechProj.cs index cc1d8ddeb6..a07c9598a1 100644 --- a/Projectiles/Magic/WaterLeechProj.cs +++ b/Projectiles/Magic/WaterLeechProj.cs @@ -25,6 +25,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = -1; Projectile.timeLeft = 540; Projectile.DamageType = DamageClass.Magic; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/WyvernFeatherGreen.cs b/Projectiles/Magic/WyvernFeatherGreen.cs index 74c6d6ee5f..809db702cf 100644 --- a/Projectiles/Magic/WyvernFeatherGreen.cs +++ b/Projectiles/Magic/WyvernFeatherGreen.cs @@ -25,6 +25,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.DamageType = DamageClass.Magic; Projectile.aiStyle = ProjAIStyleID.Nail; AIType = ProjectileID.NailFriendly; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/WyvernFeatherPink.cs b/Projectiles/Magic/WyvernFeatherPink.cs index c336051740..c4ae4715b3 100644 --- a/Projectiles/Magic/WyvernFeatherPink.cs +++ b/Projectiles/Magic/WyvernFeatherPink.cs @@ -25,6 +25,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.DamageType = DamageClass.Magic; Projectile.aiStyle = ProjAIStyleID.Nail; AIType = ProjectileID.NailFriendly; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/WyvernFeatherPurple.cs b/Projectiles/Magic/WyvernFeatherPurple.cs index fbc4db8a6d..c80d9b0306 100644 --- a/Projectiles/Magic/WyvernFeatherPurple.cs +++ b/Projectiles/Magic/WyvernFeatherPurple.cs @@ -25,6 +25,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.DamageType = DamageClass.Magic; Projectile.aiStyle = ProjAIStyleID.Nail; AIType = ProjectileID.NailFriendly; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs b/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs index cb5eb85d89..7f071091f0 100644 --- a/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs +++ b/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs @@ -35,6 +35,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.penetrate = -1; Projectile.noEnchantmentVisuals = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool? CanDamage() => Timer <= ParryTime && AlreadyParried == 0f; diff --git a/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs b/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs index c9e6cc4e7a..cf2aace6b5 100644 --- a/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs +++ b/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs @@ -39,6 +39,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.penetrate = -1; Projectile.noEnchantmentVisuals = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool? CanDamage() => Timer <= ParryTime && AlreadyParried == 0f; diff --git a/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs b/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs index 6c3de2de20..65c40923ae 100644 --- a/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs +++ b/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs @@ -39,6 +39,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.penetrate = -1; Projectile.noEnchantmentVisuals = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool? CanDamage() => Timer <= ParryTime && AlreadyParried == 0f; diff --git a/Projectiles/Melee/BloodBall.cs b/Projectiles/Melee/BloodBall.cs index f9ad15cf39..6cce44387c 100644 --- a/Projectiles/Melee/BloodBall.cs +++ b/Projectiles/Melee/BloodBall.cs @@ -19,6 +19,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.timeLeft = 200; Projectile.DamageType = DamageClass.Melee; Projectile.tileCollide = false; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Melee/BrinyTyphoonBubble.cs b/Projectiles/Melee/BrinyTyphoonBubble.cs index 3fbd52fcf1..0957b0a141 100644 --- a/Projectiles/Melee/BrinyTyphoonBubble.cs +++ b/Projectiles/Melee/BrinyTyphoonBubble.cs @@ -26,6 +26,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.alpha = 255; Projectile.penetrate = -1; Projectile.timeLeft = 5; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs b/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs index e36d1e29dd..f8d4d6935c 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs @@ -70,6 +70,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.penetrate = -1; Projectile.extraUpdates = 1; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) diff --git a/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs b/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs index 0022918305..8c7e3ac1c3 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs @@ -37,6 +37,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.penetrate = -1; Projectile.extraUpdates = 1; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) diff --git a/Projectiles/Melee/ClamCrusherFlail.cs b/Projectiles/Melee/ClamCrusherFlail.cs index 3ce47bbf54..6d1015e6c7 100644 --- a/Projectiles/Melee/ClamCrusherFlail.cs +++ b/Projectiles/Melee/ClamCrusherFlail.cs @@ -25,6 +25,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.alpha = 255; Projectile.tileCollide = false; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Melee/DarkBall.cs b/Projectiles/Melee/DarkBall.cs index 93c4930826..e0c9b5272e 100644 --- a/Projectiles/Melee/DarkBall.cs +++ b/Projectiles/Melee/DarkBall.cs @@ -20,6 +20,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.timeLeft = 200; Projectile.DamageType = DamageClass.Melee; Projectile.tileCollide = false; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Melee/LaserFountain.cs b/Projectiles/Melee/LaserFountain.cs index 2bcf99ec00..1df4e4245f 100644 --- a/Projectiles/Melee/LaserFountain.cs +++ b/Projectiles/Melee/LaserFountain.cs @@ -18,6 +18,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.tileCollide = false; Projectile.timeLeft = 60; Projectile.DamageType = DamageClass.Melee; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Melee/MarniteDeconstructorProj.cs b/Projectiles/Melee/MarniteDeconstructorProj.cs index 1d006e1ea9..86d7dff494 100644 --- a/Projectiles/Melee/MarniteDeconstructorProj.cs +++ b/Projectiles/Melee/MarniteDeconstructorProj.cs @@ -34,6 +34,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.hide = true; Projectile.ownerHitCheck = true; Projectile.DamageType = TrueMeleeNoSpeedDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool ShouldUpdatePosition() => false; diff --git a/Projectiles/Melee/MarniteObliteratorProj.cs b/Projectiles/Melee/MarniteObliteratorProj.cs index d110a46fa3..f79b3244d9 100644 --- a/Projectiles/Melee/MarniteObliteratorProj.cs +++ b/Projectiles/Melee/MarniteObliteratorProj.cs @@ -36,6 +36,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.hide = true; Projectile.ownerHitCheck = true; Projectile.DamageType = TrueMeleeNoSpeedDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool ShouldUpdatePosition() => false; diff --git a/Projectiles/Melee/MendedBiomeBlade_DecaysRetortDash.cs b/Projectiles/Melee/MendedBiomeBlade_DecaysRetortDash.cs index 56c512c9e4..fb19dc0660 100644 --- a/Projectiles/Melee/MendedBiomeBlade_DecaysRetortDash.cs +++ b/Projectiles/Melee/MendedBiomeBlade_DecaysRetortDash.cs @@ -31,6 +31,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 60; Projectile.timeLeft = 20; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs b/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs index 5b12d990e1..b05763bebb 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs @@ -70,6 +70,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.penetrate = -1; Projectile.extraUpdates = 1; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs b/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs index 1ae29e68d9..56033def56 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs @@ -42,6 +42,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.penetrate = -1; Projectile.extraUpdates = 1; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) diff --git a/Projectiles/Melee/RendingNeedle.cs b/Projectiles/Melee/RendingNeedle.cs index 6c4ad50df0..89d7090ef5 100644 --- a/Projectiles/Melee/RendingNeedle.cs +++ b/Projectiles/Melee/RendingNeedle.cs @@ -34,6 +34,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.timeLeft = (int)MaxTime; Projectile.DamageType = DamageClass.Melee; Projectile.tileCollide = false; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) diff --git a/Projectiles/Melee/Spears/AmidiasTridentProj.cs b/Projectiles/Melee/Spears/AmidiasTridentProj.cs index 1581375c55..de63e02e4b 100644 --- a/Projectiles/Melee/Spears/AmidiasTridentProj.cs +++ b/Projectiles/Melee/Spears/AmidiasTridentProj.cs @@ -23,6 +23,8 @@ namespace CalamityMod.Projectiles.Melee.Spears Projectile.penetrate = -1; Projectile.ownerHitCheck = true; Projectile.hide = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override float InitialSpeed => 3f; diff --git a/Projectiles/Melee/Spears/SausageMakerSpear.cs b/Projectiles/Melee/Spears/SausageMakerSpear.cs index c46d1c22cd..0bb3d152c0 100644 --- a/Projectiles/Melee/Spears/SausageMakerSpear.cs +++ b/Projectiles/Melee/Spears/SausageMakerSpear.cs @@ -22,6 +22,8 @@ namespace CalamityMod.Projectiles.Melee.Spears Projectile.ignoreWater = true; Projectile.penetrate = -1; Projectile.ownerHitCheck = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override float InitialSpeed => 3f; diff --git a/Projectiles/Melee/Spears/YateveoBloomSpear.cs b/Projectiles/Melee/Spears/YateveoBloomSpear.cs index 5acc6d3ecc..3fcda3e30c 100644 --- a/Projectiles/Melee/Spears/YateveoBloomSpear.cs +++ b/Projectiles/Melee/Spears/YateveoBloomSpear.cs @@ -22,6 +22,8 @@ namespace CalamityMod.Projectiles.Melee.Spears Projectile.ignoreWater = true; Projectile.penetrate = -1; Projectile.ownerHitCheck = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override float InitialSpeed => 3f; diff --git a/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs b/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs index 172fff2d28..0f208bdc5b 100644 --- a/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs +++ b/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs @@ -35,6 +35,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.penetrate = -1; Projectile.noEnchantmentVisuals = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool? CanDamage() => Timer <= ParryTime && AlreadyParried == 0f; diff --git a/Projectiles/Ranged/AstralSandgun.cs b/Projectiles/Ranged/AstralSandgun.cs index dd09fb1abf..fca008bd42 100644 --- a/Projectiles/Ranged/AstralSandgun.cs +++ b/Projectiles/Ranged/AstralSandgun.cs @@ -18,6 +18,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void OnKill(int timeLeft) diff --git a/Projectiles/Ranged/DrataliornusExoArrow.cs b/Projectiles/Ranged/DrataliornusExoArrow.cs index 97ec9ede47..52d4807002 100644 --- a/Projectiles/Ranged/DrataliornusExoArrow.cs +++ b/Projectiles/Ranged/DrataliornusExoArrow.cs @@ -23,6 +23,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; Projectile.arrow = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Ranged/Flash.cs b/Projectiles/Ranged/Flash.cs index 1c2fca754b..7f92392d18 100644 --- a/Projectiles/Ranged/Flash.cs +++ b/Projectiles/Ranged/Flash.cs @@ -22,6 +22,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; Projectile.timeLeft = 5; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Ranged/OntologicalDespoilerBeam.cs b/Projectiles/Ranged/OntologicalDespoilerBeam.cs index 5aecd11315..181d634eea 100644 --- a/Projectiles/Ranged/OntologicalDespoilerBeam.cs +++ b/Projectiles/Ranged/OntologicalDespoilerBeam.cs @@ -33,6 +33,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.extraUpdates = 80; Projectile.tileCollide = false; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Ranged/PlagueExplosionFriendly.cs b/Projectiles/Ranged/PlagueExplosionFriendly.cs index 51358b057d..2e5e780578 100644 --- a/Projectiles/Ranged/PlagueExplosionFriendly.cs +++ b/Projectiles/Ranged/PlagueExplosionFriendly.cs @@ -22,6 +22,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; Projectile.timeLeft = 60; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Ranged/PrismaticEnergyBlast.cs b/Projectiles/Ranged/PrismaticEnergyBlast.cs index e7f29f76f0..2d51675e1c 100644 --- a/Projectiles/Ranged/PrismaticEnergyBlast.cs +++ b/Projectiles/Ranged/PrismaticEnergyBlast.cs @@ -40,6 +40,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.penetrate = 100; Projectile.extraUpdates = 1; Projectile.timeLeft = 450; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool PreAI() diff --git a/Projectiles/Ranged/TyphoonBubble.cs b/Projectiles/Ranged/TyphoonBubble.cs index 08be6cba30..719bedb2bc 100644 --- a/Projectiles/Ranged/TyphoonBubble.cs +++ b/Projectiles/Ranged/TyphoonBubble.cs @@ -25,6 +25,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.alpha = 255; Projectile.penetrate = -1; Projectile.timeLeft = 1; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/AshenStalactiteDebris.cs b/Projectiles/Rogue/AshenStalactiteDebris.cs index 45e2583878..00bd07fc53 100644 --- a/Projectiles/Rogue/AshenStalactiteDebris.cs +++ b/Projectiles/Rogue/AshenStalactiteDebris.cs @@ -19,6 +19,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = -1; Projectile.timeLeft = 50; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/BallisticPoisonBombProj.cs b/Projectiles/Rogue/BallisticPoisonBombProj.cs index 828e638019..f4d204e888 100644 --- a/Projectiles/Rogue/BallisticPoisonBombProj.cs +++ b/Projectiles/Rogue/BallisticPoisonBombProj.cs @@ -20,6 +20,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.tileCollide = false; Projectile.DamageType = RogueDamageClass.Instance; Projectile.ignoreWater = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/BlazingStarProj.cs b/Projectiles/Rogue/BlazingStarProj.cs index 79ce3bb0d0..a7270c0862 100644 --- a/Projectiles/Rogue/BlazingStarProj.cs +++ b/Projectiles/Rogue/BlazingStarProj.cs @@ -34,6 +34,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = 5; Projectile.timeLeft = Lifetime; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/BrimbladeProj.cs b/Projectiles/Rogue/BrimbladeProj.cs index e12364e225..17c0a27023 100644 --- a/Projectiles/Rogue/BrimbladeProj.cs +++ b/Projectiles/Rogue/BrimbladeProj.cs @@ -22,6 +22,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 180; AIType = ProjectileID.WoodenBoomerang; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Rogue/CorpusAvertorStealth.cs b/Projectiles/Rogue/CorpusAvertorStealth.cs index 99f36ef71e..57b5178d67 100644 --- a/Projectiles/Rogue/CorpusAvertorStealth.cs +++ b/Projectiles/Rogue/CorpusAvertorStealth.cs @@ -37,6 +37,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = -1; Projectile.MaxUpdates = 4; Projectile.timeLeft = 300; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/CrystalPiercerProjectile.cs b/Projectiles/Rogue/CrystalPiercerProjectile.cs index 61cb9505f0..a47d434f18 100644 --- a/Projectiles/Rogue/CrystalPiercerProjectile.cs +++ b/Projectiles/Rogue/CrystalPiercerProjectile.cs @@ -26,7 +26,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 600; AIType = ProjectileID.BoneJavelin; Projectile.DamageType = RogueDamageClass.Instance; - Projectile.localNPCHitCooldown = 10; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/DynamicPursuerElectricity.cs b/Projectiles/Rogue/DynamicPursuerElectricity.cs index 9e44160aad..c8b26e7e8f 100644 --- a/Projectiles/Rogue/DynamicPursuerElectricity.cs +++ b/Projectiles/Rogue/DynamicPursuerElectricity.cs @@ -43,6 +43,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.extraUpdates = 10; Projectile.timeLeft = 60 * Projectile.extraUpdates; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; // Readjust the velocity magnitude the moment this projectile is created // to make velocity setting outside the scope of this projectile less irritating diff --git a/Projectiles/Rogue/FrostyFlareProj.cs b/Projectiles/Rogue/FrostyFlareProj.cs index f101b2cb23..a405ddaa85 100644 --- a/Projectiles/Rogue/FrostyFlareProj.cs +++ b/Projectiles/Rogue/FrostyFlareProj.cs @@ -20,6 +20,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = -1; Projectile.timeLeft = 300; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/FrostyFlareStealth.cs b/Projectiles/Rogue/FrostyFlareStealth.cs index e485108463..33bc7eb8a3 100644 --- a/Projectiles/Rogue/FrostyFlareStealth.cs +++ b/Projectiles/Rogue/FrostyFlareStealth.cs @@ -20,6 +20,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = -1; Projectile.timeLeft = 300; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/GildedDaggerProj.cs b/Projectiles/Rogue/GildedDaggerProj.cs index bafb14937a..9a13c9403b 100644 --- a/Projectiles/Rogue/GildedDaggerProj.cs +++ b/Projectiles/Rogue/GildedDaggerProj.cs @@ -23,6 +23,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = 2; Projectile.timeLeft = 600; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/GleamingDaggerProj.cs b/Projectiles/Rogue/GleamingDaggerProj.cs index 2adb2139bb..1546b0b997 100644 --- a/Projectiles/Rogue/GleamingDaggerProj.cs +++ b/Projectiles/Rogue/GleamingDaggerProj.cs @@ -23,6 +23,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = 2; Projectile.timeLeft = 600; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/InfernalKrisProjectile.cs b/Projectiles/Rogue/InfernalKrisProjectile.cs index 60d4e259a8..ecc722a3bd 100644 --- a/Projectiles/Rogue/InfernalKrisProjectile.cs +++ b/Projectiles/Rogue/InfernalKrisProjectile.cs @@ -29,6 +29,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = 2; Projectile.timeLeft = 300; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/InfestedClawmerangProj.cs b/Projectiles/Rogue/InfestedClawmerangProj.cs index ab0c7314d9..d7f2386bdb 100644 --- a/Projectiles/Rogue/InfestedClawmerangProj.cs +++ b/Projectiles/Rogue/InfestedClawmerangProj.cs @@ -22,6 +22,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 300; AIType = ProjectileID.WoodenBoomerang; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/LionfishProj.cs b/Projectiles/Rogue/LionfishProj.cs index 6d6bd45d06..c048eb3b75 100644 --- a/Projectiles/Rogue/LionfishProj.cs +++ b/Projectiles/Rogue/LionfishProj.cs @@ -24,6 +24,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.alpha = 255; Projectile.DamageType = RogueDamageClass.Instance; Projectile.timeLeft = CalamityUtils.SecondsToFrames(20f); + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/NightsGazeSpark.cs b/Projectiles/Rogue/NightsGazeSpark.cs index a33e54ff06..0ec456a0ee 100644 --- a/Projectiles/Rogue/NightsGazeSpark.cs +++ b/Projectiles/Rogue/NightsGazeSpark.cs @@ -21,6 +21,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = lifetime; Projectile.DamageType = RogueDamageClass.Instance; Projectile.localAI[0] = 10f; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/NightsGazeStar.cs b/Projectiles/Rogue/NightsGazeStar.cs index 69829d8f21..5efba5e5e6 100644 --- a/Projectiles/Rogue/NightsGazeStar.cs +++ b/Projectiles/Rogue/NightsGazeStar.cs @@ -29,6 +29,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = lifetime; Projectile.DamageType = RogueDamageClass.Instance; Projectile.localAI[0] = 10f; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/SandDollarProj.cs b/Projectiles/Rogue/SandDollarProj.cs index d6a3686639..85e86a89df 100644 --- a/Projectiles/Rogue/SandDollarProj.cs +++ b/Projectiles/Rogue/SandDollarProj.cs @@ -18,6 +18,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.aiStyle = ProjAIStyleID.Boomerang; Projectile.timeLeft = 300; AIType = ProjectileID.Bananarang; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool OnTileCollide(Vector2 oldVelocity) diff --git a/Projectiles/Rogue/SphereSpiked.cs b/Projectiles/Rogue/SphereSpiked.cs index 7d2c53512d..cde5d6edc4 100644 --- a/Projectiles/Rogue/SphereSpiked.cs +++ b/Projectiles/Rogue/SphereSpiked.cs @@ -27,6 +27,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 300; AIType = ProjectileID.WoodenBoomerang; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/SphereYellow.cs b/Projectiles/Rogue/SphereYellow.cs index cfa9694d3b..fd4022c0cc 100644 --- a/Projectiles/Rogue/SphereYellow.cs +++ b/Projectiles/Rogue/SphereYellow.cs @@ -25,6 +25,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 300; AIType = ProjectileID.WoodenBoomerang; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Rogue/ToothBallProjectile.cs b/Projectiles/Rogue/ToothBallProjectile.cs index dda87de504..48fd1d7cc2 100644 --- a/Projectiles/Rogue/ToothBallProjectile.cs +++ b/Projectiles/Rogue/ToothBallProjectile.cs @@ -22,7 +22,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 600; AIType = ProjectileID.ThrowingKnife; Projectile.DamageType = RogueDamageClass.Instance; - Projectile.localNPCHitCooldown = 30; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Rogue/WebBallBol.cs b/Projectiles/Rogue/WebBallBol.cs index 14840d8a11..278ffb7121 100644 --- a/Projectiles/Rogue/WebBallBol.cs +++ b/Projectiles/Rogue/WebBallBol.cs @@ -18,6 +18,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 300; Projectile.DamageType = RogueDamageClass.Instance; Projectile.aiStyle = ProjAIStyleID.GroundProjectile; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Summon/BloodRain.cs b/Projectiles/Summon/BloodRain.cs index 9d79d29582..c03465dcfd 100644 --- a/Projectiles/Summon/BloodRain.cs +++ b/Projectiles/Summon/BloodRain.cs @@ -27,6 +27,8 @@ namespace CalamityMod.Projectiles.Summon AIType = ProjectileID.RainFriendly; Projectile.extraUpdates = 1; Projectile.DamageType = DamageClass.Summon; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Summon/DaedalusLightning.cs b/Projectiles/Summon/DaedalusLightning.cs index 23d7b00dda..ee5d8a1c2d 100644 --- a/Projectiles/Summon/DaedalusLightning.cs +++ b/Projectiles/Summon/DaedalusLightning.cs @@ -40,6 +40,8 @@ namespace CalamityMod.Projectiles.Summon Projectile.extraUpdates = 20; Projectile.timeLeft = 45 * Projectile.extraUpdates; Projectile.DamageType = DamageClass.Summon; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; // Readjust the velocity magnitude the moment this projectile is created // to make velocity setting outside the scope of this projectile less irritating diff --git a/Projectiles/Summon/DeathstareBeam.cs b/Projectiles/Summon/DeathstareBeam.cs index 4c8b737425..19279ec247 100644 --- a/Projectiles/Summon/DeathstareBeam.cs +++ b/Projectiles/Summon/DeathstareBeam.cs @@ -26,6 +26,8 @@ namespace CalamityMod.Projectiles.Summon Projectile.ignoreWater = true; Projectile.timeLeft = 10; Projectile.DamageType = DamageClass.Summon; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() { diff --git a/Projectiles/Summon/HerringMinion.cs b/Projectiles/Summon/HerringMinion.cs index 050a280eea..5821c667dc 100644 --- a/Projectiles/Summon/HerringMinion.cs +++ b/Projectiles/Summon/HerringMinion.cs @@ -33,6 +33,8 @@ namespace CalamityMod.Projectiles.Summon Projectile.ignoreWater = true; Projectile.tileCollide = false; Projectile.minion = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Summon/SmallAresArms/ExoskeletonCannon.cs b/Projectiles/Summon/SmallAresArms/ExoskeletonCannon.cs index ad59ba6a1f..5b9c20254a 100644 --- a/Projectiles/Summon/SmallAresArms/ExoskeletonCannon.cs +++ b/Projectiles/Summon/SmallAresArms/ExoskeletonCannon.cs @@ -69,6 +69,8 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms Projectile.timeLeft = 900000; Projectile.scale = 1f; Projectile.DamageType = DamageClass.Summon; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void SendExtraAI(BinaryWriter writer) diff --git a/Projectiles/Summon/VoidConcentrationAura.cs b/Projectiles/Summon/VoidConcentrationAura.cs index 37970e73a4..91487ce95c 100644 --- a/Projectiles/Summon/VoidConcentrationAura.cs +++ b/Projectiles/Summon/VoidConcentrationAura.cs @@ -29,6 +29,8 @@ namespace CalamityMod.Projectiles.Summon Projectile.timeLeft *= 5; Projectile.minion = true; Projectile.DamageType = DamageClass.Summon; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void SendExtraAI(BinaryWriter writer) diff --git a/Projectiles/Summon/VoidConcentrationBlackhole.cs b/Projectiles/Summon/VoidConcentrationBlackhole.cs index b79ca5a550..efed72d73c 100644 --- a/Projectiles/Summon/VoidConcentrationBlackhole.cs +++ b/Projectiles/Summon/VoidConcentrationBlackhole.cs @@ -45,6 +45,8 @@ namespace CalamityMod.Projectiles.Summon Projectile.tileCollide = false; Projectile.scale = 0.01f; Projectile.DamageType = DamageClass.Summon; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } private void ApplySucc(NPC npc) diff --git a/Projectiles/Typeless/DarkIce.cs b/Projectiles/Typeless/DarkIce.cs index bc65e2df07..b601c92938 100644 --- a/Projectiles/Typeless/DarkIce.cs +++ b/Projectiles/Typeless/DarkIce.cs @@ -25,6 +25,8 @@ namespace CalamityMod.Projectiles.Typeless Projectile.extraUpdates = 1; Projectile.coldDamage = true; Projectile.npcProj = true; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Typeless/SandBall.cs b/Projectiles/Typeless/SandBall.cs index c5f95893e9..6a43186f50 100644 --- a/Projectiles/Typeless/SandBall.cs +++ b/Projectiles/Typeless/SandBall.cs @@ -65,6 +65,8 @@ namespace CalamityMod.Projectiles.Typeless Projectile.width = Projectile.height = 10; Projectile.friendly = true; Projectile.penetrate = -1; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; if (Fired) { diff --git a/Projectiles/Typeless/StickyFeatherAero.cs b/Projectiles/Typeless/StickyFeatherAero.cs index 6da5082c5c..89e9e698c0 100644 --- a/Projectiles/Typeless/StickyFeatherAero.cs +++ b/Projectiles/Typeless/StickyFeatherAero.cs @@ -22,6 +22,8 @@ namespace CalamityMod.Projectiles.Typeless Projectile.alpha = 255; Projectile.aiStyle = ProjAIStyleID.Nail; AIType = ProjectileID.NailFriendly; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Typeless/WulfrumDrillProj.cs b/Projectiles/Typeless/WulfrumDrillProj.cs index 0bc98e5c28..e40f380574 100644 --- a/Projectiles/Typeless/WulfrumDrillProj.cs +++ b/Projectiles/Typeless/WulfrumDrillProj.cs @@ -29,6 +29,8 @@ namespace CalamityMod.Projectiles.Typeless Projectile.ownerHitCheck = true; Projectile.DamageType = TrueMeleeNoSpeedDamageClass.Instance; Projectile.scale = 0.93f; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override bool ShouldUpdatePosition() => false; diff --git a/Systems/Collections/SharedStaticIFramesList.cs b/Systems/Collections/SharedStaticIFramesList.cs new file mode 100644 index 0000000000..faa31b8f70 --- /dev/null +++ b/Systems/Collections/SharedStaticIFramesList.cs @@ -0,0 +1,77 @@ +using System.Collections.Generic; +using CalamityMod.Projectiles.Magic; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Systems.Collections +{ + /// + /// A which contains a which contains multiple , containing projectiles which share static immunity frames. + /// + public sealed class SharedStaticIFrames : ModSystem + { + public static IList> List { get; private set; } + + public override void OnModLoad() + { + List = + [ + [ + ProjectileID.Bee, + ProjectileID.GiantBee + ], + [ + ProjectileID.VilethornBase, + ProjectileID.VilethornTip + ], + [ + ProjectileID.QuarterNote, + ProjectileID.EighthNote, + ProjectileID.TiedEighthNote + ], + [ + ProjectileID.NorthPoleWeapon, + ProjectileID.NorthPoleSpear, + ProjectileID.NorthPoleSnowflake, + ], + [ + ProjectileID.SporeTrap, + ProjectileID.SporeTrap2, + ProjectileID.SporeGas, + ProjectileID.SporeGas2, + ProjectileID.SporeGas3 + ], + [ + ModContent.ProjectileType(), + ModContent.ProjectileType() + ], + ]; + } + + public override void Unload() => List = null; + + /// + /// A shorthand method to check if this projectile shares static iframes. + /// + public static bool Includes(int projType) + { + for (int i = 0; i < List.Count; i++) + { + if (List[i].Contains(projType)) return true; + } + return false; + } + + /// + /// A shorthand method to get which list contains the given type. Returns -1 if none contain it. + /// + public static int IncludesAt(int projType) + { + for (int i = 0; i < List.Count; i++) + { + if (List[i].Contains(projType)) return i; + } + return -1; + } + } +} From a7c365cf6977747d1e4fdc2cfb6eec0539dd050b Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Tue, 11 Mar 2025 17:13:43 -0500 Subject: [PATCH 02/22] Cleared extra Using statements --- Projectiles/CalamityGlobalProjectileTweaks.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 45e79415f3..eb3807efc3 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; +using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -143,7 +140,7 @@ namespace CalamityMod.Projectiles { ProjectileID.ClusterFragmentsI, Do(IDStaticIFrames(15)) }, { ProjectileID.ClusterRocketII, Do(LocalIFrames(15)) }, { ProjectileID.ClusterFragmentsII, Do(IDStaticIFrames(15)) }, - { ProjectileID.ClusterSnowmanRocketI, Do(LocalIFrames(15)) }, + { ProjectileID.ClusterSnowmanRocketI, Do(LocalIFrames(15)) }, { ProjectileID.ClusterSnowmanRocketII, Do(LocalIFrames(15)) }, { ProjectileID.DD2SquireSonicBoom, Do(PiercingExact(3), DefaultIDStaticIFrames) }, // Flying Dragon { ProjectileID.EmeraldBolt, Do(NoPiercing) }, From 44dccbbc58f723cd36d0bae73cd3e2f7b37c2e7c Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Tue, 11 Mar 2025 17:33:36 -0500 Subject: [PATCH 03/22] Ordering & Comments --- Projectiles/CalamityGlobalProjectileTweaks.cs | 827 +++++++++--------- 1 file changed, 414 insertions(+), 413 deletions(-) diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index eb3807efc3..29a37a505b 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -117,7 +117,7 @@ namespace CalamityMod.Projectiles { ProjectileID.AdamantiteDrill, standardDrillTweaks }, { ProjectileID.AdamantiteGlaive, Do(TrueMelee, LocalIFrames(7)) }, { ProjectileID.Anchor, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, - { ProjectileID.Arkhalis, Do(TrueMeleeNoSpeed, ScaleExact(1.25f), IDStaticIFrames(5)) }, + { ProjectileID.Arkhalis, Do(TrueMeleeNoSpeed, ScaleExact(1.25f), IDStaticIFrames(5)) }, // Has an exception in Vanilla iframe code, uses 5 iframes { ProjectileID.Bee, Do(PiercingExact(2), DefaultIDStaticIFrames) }, { ProjectileID.BeeArrow, Do(PointBlank, ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, { ProjectileID.BlackCounterweight, counterweightTweaks }, @@ -146,7 +146,7 @@ namespace CalamityMod.Projectiles { ProjectileID.EmeraldBolt, Do(NoPiercing) }, { ProjectileID.EmpressBlade, Do(LocalIFrames(30)) }, // Terraprisma { ProjectileID.EnchantedBoomerang, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, - { ProjectileID.ExplosiveBullet, Do(PointBlank, ExtraUpdatesDelta(+2), IDStaticIFrames(5)) }, + { ProjectileID.ExplosiveBullet, Do(PointBlank, ExtraUpdatesDelta(+2), IDStaticIFrames(5)) }, // Has an exception in Vanilla iframe code, uses 5 iframes { ProjectileID.FairyQueenRangedItemShot, Do(PiercingExact(7), ExtraUpdatesExact(1)) }, // Eventide Convert { ProjectileID.FlaironBubble, Do(ExtraUpdatesExact(1), TimeLeftExact(150), DefaultIDStaticIFrames) }, { ProjectileID.Flamarang, Do(ExtraUpdatesExact(2), DefaultIDStaticIFrames) }, @@ -207,7 +207,7 @@ namespace CalamityMod.Projectiles { ProjectileID.StarWrath, Do(NoPiercing) }, { ProjectileID.Sunfury, Do(ExtraUpdatesExact(1)) }, { ProjectileID.SwordBeam, Do(ExtraUpdatesExact(2), DefaultIDStaticIFrames) }, // Beam Sword projectile - { ProjectileID.Terragrim, Do(TrueMeleeNoSpeed, ScaleExact(1.25f), IDStaticIFrames(5)) }, + { ProjectileID.Terragrim, Do(TrueMeleeNoSpeed, ScaleExact(1.25f), IDStaticIFrames(5)) }, // Has an exception in Vanilla iframe code, uses 5 iframes { ProjectileID.ThunderStaffShot, Do(PiercingExact(3), DefaultIDStaticIFrames) }, //Thunder Zapper projectile { ProjectileID.TitaniumChainsaw, standardChainsawTweaks }, { ProjectileID.TitaniumDrill, standardDrillTweaks }, @@ -236,7 +236,7 @@ namespace CalamityMod.Projectiles { ProjectileID.ObsidianSwordfish, trueMelee }, { ProjectileID.OrichalcumHalberd, trueMelee }, { ProjectileID.PalladiumPike, trueMelee }, - { ProjectileID.PiercingStarlight, Do(TrueMelee, IDStaticIFrames(4)) }, + { ProjectileID.PiercingStarlight, Do(TrueMelee, IDStaticIFrames(4)) }, // Has an exception in Vanilla iframe code, uses 4 iframes { ProjectileID.PlatinumShortswordStab, trueMelee }, { ProjectileID.RulerStab, trueMelee }, { ProjectileID.ShadowJoustingLance, trueMelee }, @@ -257,7 +257,7 @@ namespace CalamityMod.Projectiles { ProjectileID.Blizzard, Do(PointBlank, DefaultIDStaticIFrames) }, // Blizzard Staff projectiles, re-used in Frostbite Blaster. { ProjectileID.BlueFlare, Do(PointBlank, DefaultIDStaticIFrames) }, { ProjectileID.BoneArrow, Do(PointBlank, DefaultIDStaticIFrames) }, - { ProjectileID.CandyCorn, Do(PointBlank, IDStaticIFrames(7)) }, + { ProjectileID.CandyCorn, Do(PointBlank, IDStaticIFrames(7)) }, // Has an exception in Vanilla iframe code, uses 7 iframes { ProjectileID.ChlorophyteArrow, Do(PointBlank, DefaultIDStaticIFrames) }, { ProjectileID.ChlorophyteBullet, Do(PointBlank, DefaultIDStaticIFrames) }, { ProjectileID.CrimsandBallGun, Do(PointBlank, DefaultIDStaticIFrames) }, @@ -327,310 +327,170 @@ namespace CalamityMod.Projectiles { ProjectileID.ThornBall, Do(Main.zenithWorld ? IgnoreWater : DontIgnoreWater, DefenseDamage) }, // Plantera bouncing thorn balls { ProjectileID.UnholyTridentHostile, defenseDamage }, #endregion - #region CATEGORY 6: Static Iframe changes - {ProjectileID.Shuriken, Do(DefaultIDStaticIFrames)}, - {ProjectileID.VilethornBase, Do(DefaultIDStaticIFrames)}, - {ProjectileID.VilethornTip, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PurificationPowder, Do(DefaultIDStaticIFrames)}, - {ProjectileID.VilePowder, Do(DefaultIDStaticIFrames)}, - {ProjectileID.FallingStar, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Hook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BallofFire, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MagicMissile, Do(IDStaticIFrames(8))}, - {ProjectileID.DirtBall, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ShadowOrb, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GreenLaser, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Bone, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WaterStream, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SpikyBall, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WaterBolt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Bomb, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Dynamite, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Grenade, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SandBallFalling, Do(DefaultIDStaticIFrames)}, - {ProjectileID.IvyWhip, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ThornChakram, Do(DefaultIDStaticIFrames)}, - {ProjectileID.StickyBomb, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MudBall, Do(DefaultIDStaticIFrames)}, - {ProjectileID.AshBallFalling, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DemonScythe, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ThrowingKnife, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WoodenBoomerang, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PoisonedKnife, Do(DefaultIDStaticIFrames)}, - {ProjectileID.EbonsandBallFalling, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PearlSandBallFalling, Do(DefaultIDStaticIFrames)}, - {ProjectileID.HolyWater, Do(DefaultIDStaticIFrames)}, - {ProjectileID.UnholyWater, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SiltBall, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BlueFairy, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DualHookBlue, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DualHookRed, Do(DefaultIDStaticIFrames)}, - {ProjectileID.QuarterNote, Do(DefaultIDStaticIFrames)}, - {ProjectileID.EighthNote, Do(DefaultIDStaticIFrames)}, - {ProjectileID.TiedEighthNote, Do(DefaultIDStaticIFrames)}, - {ProjectileID.IceBlock, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PinkFairy, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GreenFairy, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PurpleLaser, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CrystalShard, Do(DefaultIDStaticIFrames)}, - {ProjectileID.HallowStar, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CrystalStorm, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CursedFlameFriendly, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PoisonDart, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Boulder, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Explosives, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Bunny, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Penguin, Do(DefaultIDStaticIFrames)}, - {ProjectileID.UnholyTridentFriendly, Do(DefaultIDStaticIFrames)}, - {ProjectileID.IceBolt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.FrostArrow, Do(DefaultIDStaticIFrames)}, + + #region CATEGORY 6: Static Iframe changes + {ProjectileID.AbigailCounter, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Ale, Do(DefaultIDStaticIFrames)}, + {ProjectileID.AmberBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.AmberHook, Do(DefaultIDStaticIFrames)}, {ProjectileID.AmethystBolt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.TopazBolt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SapphireBolt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RubyBolt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DiamondBolt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Turtle, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Mushroom, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RocketI, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ProximityMineI, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RocketII, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ProximityMineII, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RocketIII, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ProximityMineIII, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RocketIV, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ProximityMineIV, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PureSpray, Do(DefaultIDStaticIFrames)}, - {ProjectileID.HallowSpray, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CorruptSpray, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MushroomSpray, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CrimsonSpray, Do(DefaultIDStaticIFrames)}, - {ProjectileID.NettleBurstRight, Do(DefaultIDStaticIFrames)}, - {ProjectileID.NettleBurstLeft, Do(DefaultIDStaticIFrames)}, - {ProjectileID.NettleBurstEnd, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BeachBall, Do(DefaultIDStaticIFrames)}, - {ProjectileID.NightBeam, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CopperCoin, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SilverCoin, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GoldCoin, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PlatinumCoin, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CannonballFriendly, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Landmine, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Web, Do(DefaultIDStaticIFrames)}, - {ProjectileID.EnchantedBeam, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyEater, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SlushBall, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PossessedHatchet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Beenade, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PoisonDartTrap, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SpikyBallTrap, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SpearTrap, Do(DefaultIDStaticIFrames)}, - {ProjectileID.FlamesTrap, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PygmySpear, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabySkeletronHead, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyHornet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.TikiSpirit, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PetLizard, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Leaf, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Parrot, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Truffle, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Sapling, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Wisp, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ChlorophytePartisan, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CrystalLeaf, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CrystalLeafShot, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GemHookAmethyst, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GemHookTopaz, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GemHookSapphire, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GemHookEmerald, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GemHookRuby, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GemHookDiamond, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyDino, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CrimsandBallFalling, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Stynger, Do(IDStaticIFrames(7))}, - {ProjectileID.FlowerPowPetal, Do(DefaultIDStaticIFrames)}, - {ProjectileID.StyngerShrapnel, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BallofFrost, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MagnetSphereBolt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SkeletronHand, Do(DefaultIDStaticIFrames)}, - {ProjectileID.HeatRay, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BoulderStaffOfEarth, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolemFist, Do(DefaultIDStaticIFrames)}, - {ProjectileID.EyeSpring, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabySnowman, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BoxingGlove, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Bananarang, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ChainKnife, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ShadowBeamFriendly, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PaladinsHammerFriendly, Do(DefaultIDStaticIFrames)}, - {ProjectileID.VampireKnife, Do(DefaultIDStaticIFrames)}, - {ProjectileID.EatersBite, Do(DefaultIDStaticIFrames)}, - {ProjectileID.JackOLantern, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Spider, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Squashling, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BatHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Bat, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RottenEgg, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BlackCat, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BloodyMachete, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WoodHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CursedSapling, Do(DefaultIDStaticIFrames)}, - {ProjectileID.StarAnise, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CandyCaneHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ChristmasHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Puppy, Do(DefaultIDStaticIFrames)}, - {ProjectileID.OrnamentFriendly, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PineNeedleFriendly, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RocketSnowmanI, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RocketSnowmanII, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RocketSnowmanIII, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RocketSnowmanIV, Do(DefaultIDStaticIFrames)}, - {ProjectileID.NorthPoleWeapon, Do(DefaultIDStaticIFrames)}, - {ProjectileID.NorthPoleSpear, Do(DefaultIDStaticIFrames)}, - {ProjectileID.NorthPoleSnowflake, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyGrinch, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LovePotion, Do(DefaultIDStaticIFrames)}, - {ProjectileID.FoulPotion, Do(DefaultIDStaticIFrames)}, - {ProjectileID.FishHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.HornetStinger, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SpiderEgg, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabySpider, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ZephyrFish, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MiniRetinaLaser, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SlimeHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.StickyGrenade, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MiniMinotaur, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MolotovCocktail, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MolotovFire, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MolotovFire2, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MolotovFire3, Do(DefaultIDStaticIFrames)}, - {ProjectileID.TrackHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Flairon, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MiniSharkron, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Typhoon, Do(IDStaticIFrames(6))}, - {ProjectileID.Bubble, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RocketFireworksBoxRed, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RocketFireworksBoxGreen, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RocketFireworksBoxBlue, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RocketFireworksBoxYellow, Do(DefaultIDStaticIFrames)}, - {ProjectileID.UFOMinion, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Meteor1, Do(IDStaticIFrames(5))}, - {ProjectileID.Meteor2, Do(IDStaticIFrames(5))}, - {ProjectileID.Meteor3, Do(IDStaticIFrames(5))}, - {ProjectileID.UFOLaser, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ScutlixLaserFriendly, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LaserMachinegun, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LaserMachinegunLaser, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ElectrosphereMissile, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Electrosphere, Do(IDStaticIFrames(8))}, - {ProjectileID.Xenopopper, Do(DefaultIDStaticIFrames)}, {ProjectileID.AntiGravityHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ChargedBlasterOrb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.AshBallFalling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyDino, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyEater, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyFaceMonster, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyGrinch, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyHornet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyImp, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyRedPanda, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabySkeletronHead, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabySnowman, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabySpider, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BabyWerewolf, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BallofFire, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BallofFrost, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Bananarang, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Bat, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BatHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BeachBall, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BeeHive, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Beenade, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BerniePet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BlackCat, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BloodArrow, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BloodButcherer, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BloodNautilusTears, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BloodWater, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BloodyMachete, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BlueChickenPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BlueFairy, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Bomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BombFish, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Bone, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BoneArrowFromMerchant, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BoneDagger, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BoneJavelin, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BookOfSkullsSkull, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BookStaffShot, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Boulder, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BoulderStaffOfEarth, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BouncyBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BouncyBoulder, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BouncyDynamite, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BouncyGrenade, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BoxingGlove, Do(DefaultIDStaticIFrames)}, + {ProjectileID.BrainOfCthulhuPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Bubble, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Bunny, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CandyCaneHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CannonballFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CavelingGardener, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Celeb2Rocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Celeb2RocketExplosive, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Celeb2RocketExplosiveLarge, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Celeb2RocketLarge, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Celeb2Weapon, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChainGuillotine, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChainKnife, Do(DefaultIDStaticIFrames)}, {ProjectileID.ChargedBlasterCannon, Do(DefaultIDStaticIFrames)}, {ProjectileID.ChargedBlasterLaser, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ViciousPowder, Do(DefaultIDStaticIFrames)}, - {ProjectileID.StickyDynamite, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BoneArrowFromMerchant, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SoulDrain, Do(DefaultIDStaticIFrames)}, - {ProjectileID.IchorDart, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CursedDartFlame, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ChainGuillotine, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SeedlerNut, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SeedlerThorn, Do(DefaultIDStaticIFrames)}, - {ProjectileID.TendonHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ThornHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.IlluminantHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WormHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MagicLantern, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ShadowFlameKnife, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyFaceMonster, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CrimsonHeart, Do(DefaultIDStaticIFrames)}, - {ProjectileID.JavelinFriendly, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ToxicFlask, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ToxicCloud, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ToxicCloud2, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ToxicCloud3, Do(DefaultIDStaticIFrames)}, - {ProjectileID.NailFriendly, Do(IDStaticIFrames(1))}, - {ProjectileID.BouncyBomb, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BouncyGrenade, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChargedBlasterOrb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChesterPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChlorophytePartisan, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChristmasHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ChumBucket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ClothiersCurse, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ClusterMineI, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ClusterMineII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ClusterSnowmanFragmentsI, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ClusterSnowmanFragmentsII, Do(DefaultIDStaticIFrames)}, {ProjectileID.CoinPortal, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BombFish, Do(DefaultIDStaticIFrames)}, - {ProjectileID.FrostDaggerfish, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CombatWrench, Do(IDStaticIFrames(7))}, // Has an exception in Vanilla iframe code, uses 7 iframes + {ProjectileID.CompanionCube, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CopperCoin, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CorruptSpray, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CrimsandBallFalling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CrimsonHeart, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CrimsonSpray, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CrystalLeaf, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CrystalLeafShot, Do(DefaultIDStaticIFrames)}, {ProjectileID.CrystalPulse, Do(DefaultIDStaticIFrames)}, {ProjectileID.CrystalPulse2, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ToxicBubble, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MedusaHead, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MedusaHeadRay, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SporeTrap, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SporeTrap2, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SporeGas, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SporeGas2, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SporeGas3, Do(DefaultIDStaticIFrames)}, - {ProjectileID.VortexVortexLightning, Do(DefaultIDStaticIFrames)}, - {ProjectileID.VortexVortexPortal, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MechanicWrench, Do(IDStaticIFrames(7))}, - {ProjectileID.NurseSyringeHurt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.NurseSyringeHeal, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ClothiersCurse, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DryadsWardCircle, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PartyGirlGrenade, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SantaBombs, Do(DefaultIDStaticIFrames)}, - {ProjectileID.TruffleSpore, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MinecartMechLaser, Do(DefaultIDStaticIFrames)}, - {ProjectileID.AmberBolt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BoneJavelin, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BoneDagger, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PortalGun, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PortalGunBolt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PortalGunGate, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ScutlixLaser, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SolarFlareRay, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SolarCounter, Do(DefaultIDStaticIFrames)}, - {ProjectileID.StardustCellMinion, Do(DefaultIDStaticIFrames)}, - {ProjectileID.StardustCellMinionShot, Do(DefaultIDStaticIFrames)}, - {ProjectileID.VortexBeater, Do(DefaultIDStaticIFrames)}, - {ProjectileID.VortexBeaterRocket, Do(DefaultIDStaticIFrames)}, - {ProjectileID.NebulaArcanumExplosionShot, Do(DefaultIDStaticIFrames)}, - {ProjectileID.NebulaArcanumExplosionShotShard, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BloodWater, Do(DefaultIDStaticIFrames)}, - {ProjectileID.StardustGuardianExplosion, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Phantasm, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LastPrismLaser, Do(IDStaticIFrames(5))}, - {ProjectileID.LastPrism, Do(DefaultIDStaticIFrames)}, - {ProjectileID.NebulaBlaze1, Do(IDStaticIFrames(5))}, - {ProjectileID.NebulaBlaze2, Do(IDStaticIFrames(5))}, + {ProjectileID.CrystalShard, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CrystalStorm, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CursedDartFlame, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CursedFlameFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CursedFlare, Do(DefaultIDStaticIFrames)}, + {ProjectileID.CursedSapling, Do(DefaultIDStaticIFrames)}, {ProjectileID.Daybreak, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BouncyDynamite, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LunarHookSolar, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LunarHookVortex, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LunarHookNebula, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LunarHookStardust, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SuspiciousTentacle, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WireKite, Do(DefaultIDStaticIFrames)}, - {ProjectileID.StaticHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CompanionCube, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GeyserTrap, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BeeHive, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SpiritFlame, Do(IDStaticIFrames(5))}, - {ProjectileID.SkyFracture, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Ale, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DD2BetsyPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.DD2ExplosiveTrapT1, Do(DefaultIDStaticIFrames)}, {ProjectileID.DD2ExplosiveTrapT2, Do(DefaultIDStaticIFrames)}, {ProjectileID.DD2ExplosiveTrapT3, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DD2OgrePet, Do(DefaultIDStaticIFrames)}, {ProjectileID.DD2PetDragon, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DD2PetGhost, Do(DefaultIDStaticIFrames)}, {ProjectileID.DD2PetGato, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DD2PetGhost, Do(DefaultIDStaticIFrames)}, {ProjectileID.DD2PhoenixBow, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MonkStaffT3_AltShot, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BookStaffShot, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Celeb2Weapon, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Celeb2Rocket, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Celeb2RocketExplosive, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Celeb2RocketLarge, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Celeb2RocketExplosiveLarge, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DeerclopsPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DemonScythe, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DestroyerPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DiamondBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DirtBall, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DirtBomb, Do(DefaultIDStaticIFrames)}, {ProjectileID.DirtGolfBall, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RollingCactus, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ThunderSpear, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ThunderSpearShot, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DirtiestBlock, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DirtSpray, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DirtStickyBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DripplerFlailExtraBall, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DryadsWardCircle, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DryBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DryMine, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DryRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DrySnowmanRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DualHookBlue, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DualHookRed, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DukeFishronPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Dynamite, Do(DefaultIDStaticIFrames)}, + {ProjectileID.DynamiteKitten, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EaterOfWorldsPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EatersBite, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EbonsandBallFalling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EighthNote, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Electrosphere, Do(IDStaticIFrames(8))}, // Has an exception in Vanilla iframe code, uses 8 iframes + {ProjectileID.ElectrosphereMissile, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EnchantedBeam, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EverscreamPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Explosives, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EyeOfCthulhuPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.EyeSpring, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FairyQueenPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FallingStar, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FennecFox, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Fertilizer, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FishHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Flairon, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FlamesTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FlowerPowPetal, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Football, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FoulPotion, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FrostArrow, Do(DefaultIDStaticIFrames)}, + {ProjectileID.FrostDaggerfish, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GasTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GelBalloon, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GemHookAmethyst, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GemHookDiamond, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GemHookEmerald, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GemHookRuby, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GemHookSapphire, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GemHookTopaz, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Geode, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GeyserTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GlitteryButterfly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GlommerPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GoldCoin, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolemFist, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GolemPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.GolfBallDyedBlack, Do(DefaultIDStaticIFrames)}, {ProjectileID.GolfBallDyedBlue, Do(DefaultIDStaticIFrames)}, {ProjectileID.GolfBallDyedBrown, Do(DefaultIDStaticIFrames)}, @@ -645,134 +505,275 @@ namespace CalamityMod.Projectiles {ProjectileID.GolfBallDyedTeal, Do(DefaultIDStaticIFrames)}, {ProjectileID.GolfBallDyedViolet, Do(DefaultIDStaticIFrames)}, {ProjectileID.GolfBallDyedYellow, Do(DefaultIDStaticIFrames)}, - {ProjectileID.AmberHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PaperAirplaneA, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PaperAirplaneB, Do(DefaultIDStaticIFrames)}, - {ProjectileID.RollingCactusSpike, Do(DefaultIDStaticIFrames)}, - {ProjectileID.UpbeatStar, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SugarGlider, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Geode, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ScarabBomb, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SharkPup, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ClusterMineI, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ClusterMineII, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WetRocket, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WetMine, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LavaRocket, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LavaMine, Do(DefaultIDStaticIFrames)}, - {ProjectileID.HoneyRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GreenFairy, Do(DefaultIDStaticIFrames)}, + {ProjectileID.GreenLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Grenade, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HallowSpray, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HallowStar, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HeatRay, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HolyWater, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HoneyBomb, Do(DefaultIDStaticIFrames)}, {ProjectileID.HoneyGrenade, Do(DefaultIDStaticIFrames)}, {ProjectileID.HoneyMine, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MiniNukeRocketI, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MiniNukeMineI, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MiniNukeRocketII, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MiniNukeMineII, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DryRocket, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DryMine, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WetSnowmanRocket, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LavaSnowmanRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HoneyRocket, Do(DefaultIDStaticIFrames)}, {ProjectileID.HoneySnowmanRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Hook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HornetStinger, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HoundiusShootiusFireball, Do(DefaultIDStaticIFrames)}, + {ProjectileID.IceBlock, Do(DefaultIDStaticIFrames)}, + {ProjectileID.IceBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.IceQueenPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.IchorDart, Do(DefaultIDStaticIFrames)}, + {ProjectileID.IlluminantHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.IvyWhip, Do(DefaultIDStaticIFrames)}, + {ProjectileID.JackOLantern, Do(DefaultIDStaticIFrames)}, + {ProjectileID.JavelinFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.JimsDrone, Do(DefaultIDStaticIFrames)}, + {ProjectileID.JuminoStardropAnimation, Do(DefaultIDStaticIFrames)}, + {ProjectileID.JunimoPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.KingSlimePet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Landmine, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LaserMachinegun, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LaserMachinegunLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LastPrism, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LastPrismLaser, Do(IDStaticIFrames(5))}, // Has an exception in Vanilla iframe code, uses 5 iframes + {ProjectileID.LavaBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LavaMine, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LavaRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LavaSnowmanRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Leaf, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LifeCrystalBoulder, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LilHarpy, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LovePotion, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LunarHookNebula, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LunarHookSolar, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LunarHookStardust, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LunarHookVortex, Do(DefaultIDStaticIFrames)}, + {ProjectileID.LunaticCultistPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MagicLantern, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MagicMissile, Do(IDStaticIFrames(8))}, // Has an exception in Vanilla iframe code, uses 8 iframes + {ProjectileID.MagnetSphereBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MartianPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MechanicWrench, Do(IDStaticIFrames(7))}, // Has an exception in Vanilla iframe code, uses 7 iframes + {ProjectileID.MedusaHead, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MedusaHeadRay, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Meteor1, Do(IDStaticIFrames(5))}, // Has an exception in Vanilla iframe code, uses 5 iframes + {ProjectileID.Meteor2, Do(IDStaticIFrames(5))}, // Has an exception in Vanilla iframe code, uses 5 iframes + {ProjectileID.Meteor3, Do(IDStaticIFrames(5))}, // Has an exception in Vanilla iframe code, uses 5 iframes + {ProjectileID.MinecartMechLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniBoulder, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniMinotaur, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniNukeMineI, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniNukeMineII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniNukeRocketI, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniNukeRocketII, Do(DefaultIDStaticIFrames)}, {ProjectileID.MiniNukeSnowmanRocketI, Do(DefaultIDStaticIFrames)}, {ProjectileID.MiniNukeSnowmanRocketII, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DrySnowmanRocket, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ShellPileFalling, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BloodNautilusTears, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LilHarpy, Do(DefaultIDStaticIFrames)}, - {ProjectileID.FennecFox, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GlitteryButterfly, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BloodArrow, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ChumBucket, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyImp, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyRedPanda, Do(DefaultIDStaticIFrames)}, - {ProjectileID.StormTigerGem, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BookOfSkullsSkull, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Plantero, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DynamiteKitten, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyWerewolf, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ShadowMimic, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Football, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ClusterSnowmanFragmentsI, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ClusterSnowmanFragmentsII, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SquirrelHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.TreeGlobe, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WorldGlobe, Do(DefaultIDStaticIFrames)}, - {ProjectileID.VoltBunny, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ZapinatorLaser, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ZoologistStrikeGreen, Do(DefaultIDStaticIFrames)}, - {ProjectileID.KingSlimePet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.EyeOfCthulhuPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.EaterOfWorldsPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BrainOfCthulhuPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SkeletronPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.QueenBeePet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DestroyerPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.TwinsPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SkeletronPrimePet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PlanteraPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolemPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DukeFishronPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LunaticCultistPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MoonLordPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.FairyQueenPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PumpkingPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.EverscreamPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.IceQueenPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MartianPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DD2OgrePet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DD2BetsyPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CombatWrench, Do(IDStaticIFrames(7))}, - {ProjectileID.WetBomb, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LavaBomb, Do(DefaultIDStaticIFrames)}, - {ProjectileID.HoneyBomb, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DryBomb, Do(DefaultIDStaticIFrames)}, - {ProjectileID.OrnamentStar, Do(DefaultIDStaticIFrames)}, - {ProjectileID.TitaniumStormShard, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DirtBomb, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DirtStickyBomb, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DripplerFlailExtraBall, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ZoologistStrikeRed, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SantankMountRocket, Do(DefaultIDStaticIFrames)}, - {ProjectileID.QueenSlimePet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.QueenSlimeHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GelBalloon, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PrincessWeapon, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WandOfSparkingSpark, Do(DefaultIDStaticIFrames)}, - {ProjectileID.StarCannonStar, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BerniePet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GlommerPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DeerclopsPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PigPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ChesterPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.HoundiusShootiusFireball, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PewMaticHornShot, Do(DefaultIDStaticIFrames)}, - {ProjectileID.AbigailCounter, Do(DefaultIDStaticIFrames)}, - {ProjectileID.TentacleSpike, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BloodButcherer, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WandOfFrostingFrost, Do(DefaultIDStaticIFrames)}, - {ProjectileID.VenomDartTrap, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SilverBullet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.JunimoPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.JuminoStardropAnimation, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniRetinaLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MiniSharkron, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MolotovCocktail, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MolotovFire, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MolotovFire2, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MolotovFire3, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MonkStaffT3_AltShot, Do(DefaultIDStaticIFrames)}, {ProjectileID.MoonGlobe, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BlueChickenPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Spiffo, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CavelingGardener, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MiniBoulder, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ShimmerArrow, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GasTrap, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SpelunkerFlare, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CursedFlare, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MoonLordPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MudBall, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Mushroom, Do(DefaultIDStaticIFrames)}, + {ProjectileID.MushroomSpray, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NailFriendly, Do(IDStaticIFrames(1))}, // Has an exception in Vanilla iframe code, uses 1 iframe + {ProjectileID.NebulaArcanumExplosionShot, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NebulaArcanumExplosionShotShard, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NebulaBlaze1, Do(IDStaticIFrames(5))}, // Has an exception in Vanilla iframe code, uses 5 iframes + {ProjectileID.NebulaBlaze2, Do(IDStaticIFrames(5))}, // Has an exception in Vanilla iframe code, uses 5 iframes + {ProjectileID.NettleBurstEnd, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NettleBurstLeft, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NettleBurstRight, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NightBeam, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NorthPoleSnowflake, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NorthPoleSpear, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NorthPoleWeapon, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NurseSyringeHeal, Do(DefaultIDStaticIFrames)}, + {ProjectileID.NurseSyringeHurt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.OrnamentFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.OrnamentStar, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PaladinsHammerFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PaperAirplaneA, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PaperAirplaneB, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Parrot, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PartyGirlGrenade, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PearlSandBallFalling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Penguin, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PetLizard, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PewMaticHornShot, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Phantasm, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PigPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PineNeedleFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PinkFairy, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PlanteraPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Plantero, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PlatinumCoin, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PoisonDart, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PoisonDartTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PoisonedKnife, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PortalGun, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PortalGunBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PortalGunGate, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PossessedHatchet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PrincessWeapon, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ProximityMineI, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ProximityMineII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ProximityMineIII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ProximityMineIV, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PumpkingPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Puppy, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PureSpray, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PurificationPowder, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PurpleLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.PygmySpear, Do(DefaultIDStaticIFrames)}, + {ProjectileID.QuarterNote, Do(DefaultIDStaticIFrames)}, + {ProjectileID.QueenBeePet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.QueenSlimeHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.QueenSlimePet, Do(DefaultIDStaticIFrames)}, {ProjectileID.RainbowFlare, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ShimmerFlare, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Waffle, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BouncyBoulder, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LifeCrystalBoulder, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketFireworksBoxBlue, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketFireworksBoxGreen, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketFireworksBoxRed, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketFireworksBoxYellow, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketI, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketIII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketIV, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketSnowmanI, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketSnowmanII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketSnowmanIII, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RocketSnowmanIV, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RollingCactus, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RollingCactusSpike, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RottenEgg, Do(DefaultIDStaticIFrames)}, + {ProjectileID.RubyBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SandBallFalling, Do(DefaultIDStaticIFrames)}, {ProjectileID.SandSpray, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SantaBombs, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SantankMountRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Sapling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SapphireBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ScarabBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ScutlixLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ScutlixLaserFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SeedlerNut, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SeedlerThorn, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ShadowBeamFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ShadowFlameKnife, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ShadowMimic, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ShadowOrb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SharkPup, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ShellPileFalling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ShimmerArrow, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ShimmerFlare, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Shuriken, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SiltBall, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SilverBullet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SilverCoin, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SkeletronHand, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SkeletronPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SkeletronPrimePet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SkyFracture, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SlimeHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SlushBall, Do(DefaultIDStaticIFrames)}, {ProjectileID.SnowSpray, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DirtSpray, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DirtiestBlock, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Fertilizer, Do(DefaultIDStaticIFrames)}, - {ProjectileID.JimsDrone, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SolarCounter, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SolarFlareRay, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SoulDrain, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SpearTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SpelunkerFlare, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Spider, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SpiderEgg, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Spiffo, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SpikyBall, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SpikyBallTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SpiritFlame, Do(IDStaticIFrames(5))}, // Has an exception in Vanilla iframe code, uses 5 iframes + {ProjectileID.SporeGas, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SporeGas2, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SporeGas3, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SporeTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SporeTrap2, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Squashling, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SquirrelHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StarAnise, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StarCannonStar, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StardustCellMinion, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StardustCellMinionShot, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StardustGuardianExplosion, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StaticHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StickyBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StickyDynamite, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StickyGrenade, Do(DefaultIDStaticIFrames)}, + {ProjectileID.StormTigerGem, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Stynger, Do(IDStaticIFrames(7))}, // Has an exception in Vanilla iframe code, uses 7 iframes + {ProjectileID.StyngerShrapnel, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SugarGlider, Do(DefaultIDStaticIFrames)}, + {ProjectileID.SuspiciousTentacle, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TendonHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TentacleSpike, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ThornChakram, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ThornHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ThrowingKnife, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ThunderSpear, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ThunderSpearShot, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TiedEighthNote, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TikiSpirit, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TitaniumStormShard, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TopazBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ToxicBubble, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ToxicCloud, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ToxicCloud2, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ToxicCloud3, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ToxicFlask, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TrackHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TreeGlobe, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Truffle, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TruffleSpore, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Turtle, Do(DefaultIDStaticIFrames)}, + {ProjectileID.TwinsPet, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Typhoon, Do(IDStaticIFrames(6))}, // Has an exception in Vanilla iframe code, uses 6 iframes + {ProjectileID.UFOLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.UFOMinion, Do(DefaultIDStaticIFrames)}, + {ProjectileID.UnholyTridentFriendly, Do(DefaultIDStaticIFrames)}, + {ProjectileID.UnholyWater, Do(DefaultIDStaticIFrames)}, + {ProjectileID.UpbeatStar, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VampireKnife, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VenomDartTrap, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ViciousPowder, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VilePowder, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VilethornBase, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VilethornTip, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VoltBunny, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VortexBeater, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VortexBeaterRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VortexVortexLightning, Do(DefaultIDStaticIFrames)}, + {ProjectileID.VortexVortexPortal, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Waffle, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WandOfFrostingFrost, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WandOfSparkingSpark, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WaterBolt, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WaterStream, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Web, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WetBomb, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WetMine, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WetRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WetSnowmanRocket, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WireKite, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Wisp, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WoodenBoomerang, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WoodHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WorldGlobe, Do(DefaultIDStaticIFrames)}, + {ProjectileID.WormHook, Do(DefaultIDStaticIFrames)}, + {ProjectileID.Xenopopper, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ZapinatorLaser, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ZephyrFish, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ZoologistStrikeGreen, Do(DefaultIDStaticIFrames)}, + {ProjectileID.ZoologistStrikeRed, Do(DefaultIDStaticIFrames)}, #endregion From 137a28f0d6df3c5b5faf0700c5ae6aeef37d6a35 Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Tue, 11 Mar 2025 18:12:54 -0500 Subject: [PATCH 04/22] cleaning up & fixes --- Projectiles/CalamityGlobalProjectileTweaks.cs | 137 ------------------ .../Collections/SharedStaticIFramesList.cs | 5 + 2 files changed, 5 insertions(+), 137 deletions(-) diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 29a37a505b..d152fe3fa0 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -332,38 +332,20 @@ namespace CalamityMod.Projectiles {ProjectileID.AbigailCounter, Do(DefaultIDStaticIFrames)}, {ProjectileID.Ale, Do(DefaultIDStaticIFrames)}, {ProjectileID.AmberBolt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.AmberHook, Do(DefaultIDStaticIFrames)}, {ProjectileID.AmethystBolt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.AntiGravityHook, Do(DefaultIDStaticIFrames)}, {ProjectileID.AshBallFalling, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyDino, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyEater, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyFaceMonster, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyGrinch, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyHornet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyImp, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyRedPanda, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabySkeletronHead, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabySnowman, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabySpider, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BabyWerewolf, Do(DefaultIDStaticIFrames)}, {ProjectileID.BallofFire, Do(DefaultIDStaticIFrames)}, {ProjectileID.BallofFrost, Do(DefaultIDStaticIFrames)}, {ProjectileID.Bananarang, Do(DefaultIDStaticIFrames)}, {ProjectileID.Bat, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BatHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BeachBall, Do(DefaultIDStaticIFrames)}, {ProjectileID.BeeHive, Do(DefaultIDStaticIFrames)}, {ProjectileID.Beenade, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BerniePet, Do(DefaultIDStaticIFrames)}, {ProjectileID.BlackCat, Do(DefaultIDStaticIFrames)}, {ProjectileID.BloodArrow, Do(DefaultIDStaticIFrames)}, {ProjectileID.BloodButcherer, Do(DefaultIDStaticIFrames)}, {ProjectileID.BloodNautilusTears, Do(DefaultIDStaticIFrames)}, {ProjectileID.BloodWater, Do(DefaultIDStaticIFrames)}, {ProjectileID.BloodyMachete, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BlueChickenPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BlueFairy, Do(DefaultIDStaticIFrames)}, {ProjectileID.Bomb, Do(DefaultIDStaticIFrames)}, {ProjectileID.BombFish, Do(DefaultIDStaticIFrames)}, {ProjectileID.Bone, Do(DefaultIDStaticIFrames)}, @@ -379,10 +361,8 @@ namespace CalamityMod.Projectiles {ProjectileID.BouncyDynamite, Do(DefaultIDStaticIFrames)}, {ProjectileID.BouncyGrenade, Do(DefaultIDStaticIFrames)}, {ProjectileID.BoxingGlove, Do(DefaultIDStaticIFrames)}, - {ProjectileID.BrainOfCthulhuPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.Bubble, Do(DefaultIDStaticIFrames)}, {ProjectileID.Bunny, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CandyCaneHook, Do(DefaultIDStaticIFrames)}, {ProjectileID.CannonballFriendly, Do(DefaultIDStaticIFrames)}, {ProjectileID.CavelingGardener, Do(DefaultIDStaticIFrames)}, {ProjectileID.Celeb2Rocket, Do(DefaultIDStaticIFrames)}, @@ -395,10 +375,7 @@ namespace CalamityMod.Projectiles {ProjectileID.ChargedBlasterCannon, Do(DefaultIDStaticIFrames)}, {ProjectileID.ChargedBlasterLaser, Do(DefaultIDStaticIFrames)}, {ProjectileID.ChargedBlasterOrb, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ChesterPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.ChlorophytePartisan, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ChristmasHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ChumBucket, Do(DefaultIDStaticIFrames)}, {ProjectileID.ClothiersCurse, Do(DefaultIDStaticIFrames)}, {ProjectileID.ClusterMineI, Do(DefaultIDStaticIFrames)}, {ProjectileID.ClusterMineII, Do(DefaultIDStaticIFrames)}, @@ -406,7 +383,6 @@ namespace CalamityMod.Projectiles {ProjectileID.ClusterSnowmanFragmentsII, Do(DefaultIDStaticIFrames)}, {ProjectileID.CoinPortal, Do(DefaultIDStaticIFrames)}, {ProjectileID.CombatWrench, Do(IDStaticIFrames(7))}, // Has an exception in Vanilla iframe code, uses 7 iframes - {ProjectileID.CompanionCube, Do(DefaultIDStaticIFrames)}, {ProjectileID.CopperCoin, Do(DefaultIDStaticIFrames)}, {ProjectileID.CorruptSpray, Do(DefaultIDStaticIFrames)}, {ProjectileID.CrimsandBallFalling, Do(DefaultIDStaticIFrames)}, @@ -421,25 +397,12 @@ namespace CalamityMod.Projectiles {ProjectileID.CursedDartFlame, Do(DefaultIDStaticIFrames)}, {ProjectileID.CursedFlameFriendly, Do(DefaultIDStaticIFrames)}, {ProjectileID.CursedFlare, Do(DefaultIDStaticIFrames)}, - {ProjectileID.CursedSapling, Do(DefaultIDStaticIFrames)}, {ProjectileID.Daybreak, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DD2BetsyPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DD2ExplosiveTrapT1, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DD2ExplosiveTrapT2, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DD2ExplosiveTrapT3, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DD2OgrePet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DD2PetDragon, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DD2PetGato, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DD2PetGhost, Do(DefaultIDStaticIFrames)}, {ProjectileID.DD2PhoenixBow, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DeerclopsPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.DemonScythe, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DestroyerPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.DiamondBolt, Do(DefaultIDStaticIFrames)}, {ProjectileID.DirtBall, Do(DefaultIDStaticIFrames)}, {ProjectileID.DirtBomb, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DirtGolfBall, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DirtiestBlock, Do(DefaultIDStaticIFrames)}, {ProjectileID.DirtSpray, Do(DefaultIDStaticIFrames)}, {ProjectileID.DirtStickyBomb, Do(DefaultIDStaticIFrames)}, {ProjectileID.DripplerFlailExtraBall, Do(DefaultIDStaticIFrames)}, @@ -448,64 +411,26 @@ namespace CalamityMod.Projectiles {ProjectileID.DryMine, Do(DefaultIDStaticIFrames)}, {ProjectileID.DryRocket, Do(DefaultIDStaticIFrames)}, {ProjectileID.DrySnowmanRocket, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DualHookBlue, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DualHookRed, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DukeFishronPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.Dynamite, Do(DefaultIDStaticIFrames)}, - {ProjectileID.DynamiteKitten, Do(DefaultIDStaticIFrames)}, - {ProjectileID.EaterOfWorldsPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.EatersBite, Do(DefaultIDStaticIFrames)}, {ProjectileID.EbonsandBallFalling, Do(DefaultIDStaticIFrames)}, {ProjectileID.EighthNote, Do(DefaultIDStaticIFrames)}, {ProjectileID.Electrosphere, Do(IDStaticIFrames(8))}, // Has an exception in Vanilla iframe code, uses 8 iframes {ProjectileID.ElectrosphereMissile, Do(DefaultIDStaticIFrames)}, {ProjectileID.EnchantedBeam, Do(DefaultIDStaticIFrames)}, - {ProjectileID.EverscreamPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.Explosives, Do(DefaultIDStaticIFrames)}, - {ProjectileID.EyeOfCthulhuPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.EyeSpring, Do(DefaultIDStaticIFrames)}, - {ProjectileID.FairyQueenPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.FallingStar, Do(DefaultIDStaticIFrames)}, - {ProjectileID.FennecFox, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Fertilizer, Do(DefaultIDStaticIFrames)}, - {ProjectileID.FishHook, Do(DefaultIDStaticIFrames)}, {ProjectileID.Flairon, Do(DefaultIDStaticIFrames)}, {ProjectileID.FlamesTrap, Do(DefaultIDStaticIFrames)}, {ProjectileID.FlowerPowPetal, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Football, Do(DefaultIDStaticIFrames)}, - {ProjectileID.FoulPotion, Do(DefaultIDStaticIFrames)}, {ProjectileID.FrostArrow, Do(DefaultIDStaticIFrames)}, {ProjectileID.FrostDaggerfish, Do(DefaultIDStaticIFrames)}, {ProjectileID.GasTrap, Do(DefaultIDStaticIFrames)}, {ProjectileID.GelBalloon, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GemHookAmethyst, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GemHookDiamond, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GemHookEmerald, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GemHookRuby, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GemHookSapphire, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GemHookTopaz, Do(DefaultIDStaticIFrames)}, {ProjectileID.Geode, Do(DefaultIDStaticIFrames)}, {ProjectileID.GeyserTrap, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GlitteryButterfly, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GlommerPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.GoldCoin, Do(DefaultIDStaticIFrames)}, {ProjectileID.GolemFist, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolemPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolfBallDyedBlack, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolfBallDyedBlue, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolfBallDyedBrown, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolfBallDyedCyan, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolfBallDyedGreen, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolfBallDyedLimeGreen, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolfBallDyedOrange, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolfBallDyedPink, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolfBallDyedPurple, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolfBallDyedRed, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolfBallDyedSkyBlue, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolfBallDyedTeal, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolfBallDyedViolet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GolfBallDyedYellow, Do(DefaultIDStaticIFrames)}, - {ProjectileID.GreenFairy, Do(DefaultIDStaticIFrames)}, {ProjectileID.GreenLaser, Do(DefaultIDStaticIFrames)}, {ProjectileID.Grenade, Do(DefaultIDStaticIFrames)}, {ProjectileID.HallowSpray, Do(DefaultIDStaticIFrames)}, @@ -517,21 +442,13 @@ namespace CalamityMod.Projectiles {ProjectileID.HoneyMine, Do(DefaultIDStaticIFrames)}, {ProjectileID.HoneyRocket, Do(DefaultIDStaticIFrames)}, {ProjectileID.HoneySnowmanRocket, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Hook, Do(DefaultIDStaticIFrames)}, {ProjectileID.HornetStinger, Do(DefaultIDStaticIFrames)}, {ProjectileID.HoundiusShootiusFireball, Do(DefaultIDStaticIFrames)}, {ProjectileID.IceBlock, Do(DefaultIDStaticIFrames)}, {ProjectileID.IceBolt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.IceQueenPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.IchorDart, Do(DefaultIDStaticIFrames)}, - {ProjectileID.IlluminantHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.IvyWhip, Do(DefaultIDStaticIFrames)}, {ProjectileID.JackOLantern, Do(DefaultIDStaticIFrames)}, {ProjectileID.JavelinFriendly, Do(DefaultIDStaticIFrames)}, - {ProjectileID.JimsDrone, Do(DefaultIDStaticIFrames)}, - {ProjectileID.JuminoStardropAnimation, Do(DefaultIDStaticIFrames)}, - {ProjectileID.JunimoPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.KingSlimePet, Do(DefaultIDStaticIFrames)}, {ProjectileID.Landmine, Do(DefaultIDStaticIFrames)}, {ProjectileID.LaserMachinegun, Do(DefaultIDStaticIFrames)}, {ProjectileID.LaserMachinegunLaser, Do(DefaultIDStaticIFrames)}, @@ -543,17 +460,8 @@ namespace CalamityMod.Projectiles {ProjectileID.LavaSnowmanRocket, Do(DefaultIDStaticIFrames)}, {ProjectileID.Leaf, Do(DefaultIDStaticIFrames)}, {ProjectileID.LifeCrystalBoulder, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LilHarpy, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LovePotion, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LunarHookNebula, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LunarHookSolar, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LunarHookStardust, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LunarHookVortex, Do(DefaultIDStaticIFrames)}, - {ProjectileID.LunaticCultistPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MagicLantern, Do(DefaultIDStaticIFrames)}, {ProjectileID.MagicMissile, Do(IDStaticIFrames(8))}, // Has an exception in Vanilla iframe code, uses 8 iframes {ProjectileID.MagnetSphereBolt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MartianPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.MechanicWrench, Do(IDStaticIFrames(7))}, // Has an exception in Vanilla iframe code, uses 7 iframes {ProjectileID.MedusaHead, Do(DefaultIDStaticIFrames)}, {ProjectileID.MedusaHeadRay, Do(DefaultIDStaticIFrames)}, @@ -576,8 +484,6 @@ namespace CalamityMod.Projectiles {ProjectileID.MolotovFire2, Do(DefaultIDStaticIFrames)}, {ProjectileID.MolotovFire3, Do(DefaultIDStaticIFrames)}, {ProjectileID.MonkStaffT3_AltShot, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MoonGlobe, Do(DefaultIDStaticIFrames)}, - {ProjectileID.MoonLordPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.MudBall, Do(DefaultIDStaticIFrames)}, {ProjectileID.Mushroom, Do(DefaultIDStaticIFrames)}, {ProjectileID.MushroomSpray, Do(DefaultIDStaticIFrames)}, @@ -600,41 +506,26 @@ namespace CalamityMod.Projectiles {ProjectileID.PaladinsHammerFriendly, Do(DefaultIDStaticIFrames)}, {ProjectileID.PaperAirplaneA, Do(DefaultIDStaticIFrames)}, {ProjectileID.PaperAirplaneB, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Parrot, Do(DefaultIDStaticIFrames)}, {ProjectileID.PartyGirlGrenade, Do(DefaultIDStaticIFrames)}, {ProjectileID.PearlSandBallFalling, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Penguin, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PetLizard, Do(DefaultIDStaticIFrames)}, {ProjectileID.PewMaticHornShot, Do(DefaultIDStaticIFrames)}, {ProjectileID.Phantasm, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PigPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.PineNeedleFriendly, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PinkFairy, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PlanteraPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Plantero, Do(DefaultIDStaticIFrames)}, {ProjectileID.PlatinumCoin, Do(DefaultIDStaticIFrames)}, {ProjectileID.PoisonDart, Do(DefaultIDStaticIFrames)}, {ProjectileID.PoisonDartTrap, Do(DefaultIDStaticIFrames)}, {ProjectileID.PoisonedKnife, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PortalGun, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PortalGunBolt, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PortalGunGate, Do(DefaultIDStaticIFrames)}, {ProjectileID.PossessedHatchet, Do(DefaultIDStaticIFrames)}, {ProjectileID.PrincessWeapon, Do(DefaultIDStaticIFrames)}, {ProjectileID.ProximityMineI, Do(DefaultIDStaticIFrames)}, {ProjectileID.ProximityMineII, Do(DefaultIDStaticIFrames)}, {ProjectileID.ProximityMineIII, Do(DefaultIDStaticIFrames)}, {ProjectileID.ProximityMineIV, Do(DefaultIDStaticIFrames)}, - {ProjectileID.PumpkingPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Puppy, Do(DefaultIDStaticIFrames)}, {ProjectileID.PureSpray, Do(DefaultIDStaticIFrames)}, {ProjectileID.PurificationPowder, Do(DefaultIDStaticIFrames)}, {ProjectileID.PurpleLaser, Do(DefaultIDStaticIFrames)}, {ProjectileID.PygmySpear, Do(DefaultIDStaticIFrames)}, {ProjectileID.QuarterNote, Do(DefaultIDStaticIFrames)}, - {ProjectileID.QueenBeePet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.QueenSlimeHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.QueenSlimePet, Do(DefaultIDStaticIFrames)}, {ProjectileID.RainbowFlare, Do(DefaultIDStaticIFrames)}, {ProjectileID.RocketFireworksBoxBlue, Do(DefaultIDStaticIFrames)}, {ProjectileID.RocketFireworksBoxGreen, Do(DefaultIDStaticIFrames)}, @@ -656,7 +547,6 @@ namespace CalamityMod.Projectiles {ProjectileID.SandSpray, Do(DefaultIDStaticIFrames)}, {ProjectileID.SantaBombs, Do(DefaultIDStaticIFrames)}, {ProjectileID.SantankMountRocket, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Sapling, Do(DefaultIDStaticIFrames)}, {ProjectileID.SapphireBolt, Do(DefaultIDStaticIFrames)}, {ProjectileID.ScarabBomb, Do(DefaultIDStaticIFrames)}, {ProjectileID.ScutlixLaser, Do(DefaultIDStaticIFrames)}, @@ -665,9 +555,6 @@ namespace CalamityMod.Projectiles {ProjectileID.SeedlerThorn, Do(DefaultIDStaticIFrames)}, {ProjectileID.ShadowBeamFriendly, Do(DefaultIDStaticIFrames)}, {ProjectileID.ShadowFlameKnife, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ShadowMimic, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ShadowOrb, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SharkPup, Do(DefaultIDStaticIFrames)}, {ProjectileID.ShellPileFalling, Do(DefaultIDStaticIFrames)}, {ProjectileID.ShimmerArrow, Do(DefaultIDStaticIFrames)}, {ProjectileID.ShimmerFlare, Do(DefaultIDStaticIFrames)}, @@ -675,11 +562,7 @@ namespace CalamityMod.Projectiles {ProjectileID.SiltBall, Do(DefaultIDStaticIFrames)}, {ProjectileID.SilverBullet, Do(DefaultIDStaticIFrames)}, {ProjectileID.SilverCoin, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SkeletronHand, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SkeletronPet, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SkeletronPrimePet, Do(DefaultIDStaticIFrames)}, {ProjectileID.SkyFracture, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SlimeHook, Do(DefaultIDStaticIFrames)}, {ProjectileID.SlushBall, Do(DefaultIDStaticIFrames)}, {ProjectileID.SnowSpray, Do(DefaultIDStaticIFrames)}, {ProjectileID.SolarCounter, Do(DefaultIDStaticIFrames)}, @@ -689,7 +572,6 @@ namespace CalamityMod.Projectiles {ProjectileID.SpelunkerFlare, Do(DefaultIDStaticIFrames)}, {ProjectileID.Spider, Do(DefaultIDStaticIFrames)}, {ProjectileID.SpiderEgg, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Spiffo, Do(DefaultIDStaticIFrames)}, {ProjectileID.SpikyBall, Do(DefaultIDStaticIFrames)}, {ProjectileID.SpikyBallTrap, Do(DefaultIDStaticIFrames)}, {ProjectileID.SpiritFlame, Do(IDStaticIFrames(5))}, // Has an exception in Vanilla iframe code, uses 5 iframes @@ -698,31 +580,23 @@ namespace CalamityMod.Projectiles {ProjectileID.SporeGas3, Do(DefaultIDStaticIFrames)}, {ProjectileID.SporeTrap, Do(DefaultIDStaticIFrames)}, {ProjectileID.SporeTrap2, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Squashling, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SquirrelHook, Do(DefaultIDStaticIFrames)}, {ProjectileID.StarAnise, Do(DefaultIDStaticIFrames)}, {ProjectileID.StarCannonStar, Do(DefaultIDStaticIFrames)}, {ProjectileID.StardustCellMinion, Do(DefaultIDStaticIFrames)}, {ProjectileID.StardustCellMinionShot, Do(DefaultIDStaticIFrames)}, {ProjectileID.StardustGuardianExplosion, Do(DefaultIDStaticIFrames)}, - {ProjectileID.StaticHook, Do(DefaultIDStaticIFrames)}, {ProjectileID.StickyBomb, Do(DefaultIDStaticIFrames)}, {ProjectileID.StickyDynamite, Do(DefaultIDStaticIFrames)}, {ProjectileID.StickyGrenade, Do(DefaultIDStaticIFrames)}, {ProjectileID.StormTigerGem, Do(DefaultIDStaticIFrames)}, {ProjectileID.Stynger, Do(IDStaticIFrames(7))}, // Has an exception in Vanilla iframe code, uses 7 iframes {ProjectileID.StyngerShrapnel, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SugarGlider, Do(DefaultIDStaticIFrames)}, - {ProjectileID.SuspiciousTentacle, Do(DefaultIDStaticIFrames)}, - {ProjectileID.TendonHook, Do(DefaultIDStaticIFrames)}, {ProjectileID.TentacleSpike, Do(DefaultIDStaticIFrames)}, {ProjectileID.ThornChakram, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ThornHook, Do(DefaultIDStaticIFrames)}, {ProjectileID.ThrowingKnife, Do(DefaultIDStaticIFrames)}, {ProjectileID.ThunderSpear, Do(DefaultIDStaticIFrames)}, {ProjectileID.ThunderSpearShot, Do(DefaultIDStaticIFrames)}, {ProjectileID.TiedEighthNote, Do(DefaultIDStaticIFrames)}, - {ProjectileID.TikiSpirit, Do(DefaultIDStaticIFrames)}, {ProjectileID.TitaniumStormShard, Do(DefaultIDStaticIFrames)}, {ProjectileID.TopazBolt, Do(DefaultIDStaticIFrames)}, {ProjectileID.ToxicBubble, Do(DefaultIDStaticIFrames)}, @@ -730,25 +604,19 @@ namespace CalamityMod.Projectiles {ProjectileID.ToxicCloud2, Do(DefaultIDStaticIFrames)}, {ProjectileID.ToxicCloud3, Do(DefaultIDStaticIFrames)}, {ProjectileID.ToxicFlask, Do(DefaultIDStaticIFrames)}, - {ProjectileID.TrackHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.TreeGlobe, Do(DefaultIDStaticIFrames)}, {ProjectileID.Truffle, Do(DefaultIDStaticIFrames)}, {ProjectileID.TruffleSpore, Do(DefaultIDStaticIFrames)}, - {ProjectileID.Turtle, Do(DefaultIDStaticIFrames)}, - {ProjectileID.TwinsPet, Do(DefaultIDStaticIFrames)}, {ProjectileID.Typhoon, Do(IDStaticIFrames(6))}, // Has an exception in Vanilla iframe code, uses 6 iframes {ProjectileID.UFOLaser, Do(DefaultIDStaticIFrames)}, {ProjectileID.UFOMinion, Do(DefaultIDStaticIFrames)}, {ProjectileID.UnholyTridentFriendly, Do(DefaultIDStaticIFrames)}, {ProjectileID.UnholyWater, Do(DefaultIDStaticIFrames)}, - {ProjectileID.UpbeatStar, Do(DefaultIDStaticIFrames)}, {ProjectileID.VampireKnife, Do(DefaultIDStaticIFrames)}, {ProjectileID.VenomDartTrap, Do(DefaultIDStaticIFrames)}, {ProjectileID.ViciousPowder, Do(DefaultIDStaticIFrames)}, {ProjectileID.VilePowder, Do(DefaultIDStaticIFrames)}, {ProjectileID.VilethornBase, Do(DefaultIDStaticIFrames)}, {ProjectileID.VilethornTip, Do(DefaultIDStaticIFrames)}, - {ProjectileID.VoltBunny, Do(DefaultIDStaticIFrames)}, {ProjectileID.VortexBeater, Do(DefaultIDStaticIFrames)}, {ProjectileID.VortexBeaterRocket, Do(DefaultIDStaticIFrames)}, {ProjectileID.VortexVortexLightning, Do(DefaultIDStaticIFrames)}, @@ -763,15 +631,10 @@ namespace CalamityMod.Projectiles {ProjectileID.WetMine, Do(DefaultIDStaticIFrames)}, {ProjectileID.WetRocket, Do(DefaultIDStaticIFrames)}, {ProjectileID.WetSnowmanRocket, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WireKite, Do(DefaultIDStaticIFrames)}, {ProjectileID.Wisp, Do(DefaultIDStaticIFrames)}, {ProjectileID.WoodenBoomerang, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WoodHook, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WorldGlobe, Do(DefaultIDStaticIFrames)}, - {ProjectileID.WormHook, Do(DefaultIDStaticIFrames)}, {ProjectileID.Xenopopper, Do(DefaultIDStaticIFrames)}, {ProjectileID.ZapinatorLaser, Do(DefaultIDStaticIFrames)}, - {ProjectileID.ZephyrFish, Do(DefaultIDStaticIFrames)}, {ProjectileID.ZoologistStrikeGreen, Do(DefaultIDStaticIFrames)}, {ProjectileID.ZoologistStrikeRed, Do(DefaultIDStaticIFrames)}, diff --git a/Systems/Collections/SharedStaticIFramesList.cs b/Systems/Collections/SharedStaticIFramesList.cs index faa31b8f70..259b274bfb 100644 --- a/Systems/Collections/SharedStaticIFramesList.cs +++ b/Systems/Collections/SharedStaticIFramesList.cs @@ -45,6 +45,11 @@ namespace CalamityMod.Systems.Collections ModContent.ProjectileType(), ModContent.ProjectileType() ], + [ + ProjectileID.ToxicCloud, + ProjectileID.ToxicCloud2, + ProjectileID.ToxicCloud3 + ] ]; } From ca6e143953e1e59da8248025d2f89210f92c704e Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 18 Mar 2025 13:50:17 -0700 Subject: [PATCH 05/22] Reworked Ancient Fossil and Archaic Powder Also fixed Cal not reducing the damage of flamethrower traps even though it was supposed to --- CalPlayer/CalamityPlayer.cs | 8 ++++++++ CalPlayer/CalamityPlayerHitHurt.cs | 20 ++++++++++++++++++- Items/Accessories/AncientFossil.cs | 2 ++ Items/Accessories/ArchaicPowder.cs | 19 +++++++++++------- .../Mods.CalamityMod.Items.Accessories.hjson | 12 ++++++++--- ...Mods.CalamityMod.Items.Weapons.Magic.hjson | 4 ++-- 6 files changed, 52 insertions(+), 13 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 1dbe674969..1882016d67 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -736,6 +736,10 @@ namespace CalamityMod.CalPlayer /// Used to prevent dodges from triggering The Bee's full health damage reduction cooldown. public bool shouldTriggerBeeCooldown = false; public int theBeeCooldown = 0; + public bool aFossil = false; + public bool aPowder = false; + public bool fallingBlockProtection = false; + public bool trapProtection = false; public bool alluringBait = false; public bool enchantedPearl = false; public bool fishingStation = false; @@ -2143,6 +2147,10 @@ namespace CalamityMod.CalPlayer arcFlashRingVisual = false; bGlassBand = false; bGlassBandVisual = false; + aFossil = false; + aPowder = false; + fallingBlockProtection = false; + trapProtection = false; alluringBait = false; enchantedPearl = false; fishingStation = false; diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index dcc2c5d56e..f6cd293222 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -995,7 +995,7 @@ namespace CalamityMod.CalPlayer modifiers.SourceDamage *= 0.65f; // 80 in normal, 100 in expert, 150 in master - else if (proj.type == ProjectileID.SpikyBallTrap || proj.type == ProjectileID.FlamethrowerTrap || proj.type == ProjectileID.PoisonDartTrap) + else if (proj.type == ProjectileID.SpikyBallTrap || (proj.type == ProjectileID.FlamethrowerTrap || proj.type == 188) || proj.type == ProjectileID.PoisonDartTrap) modifiers.SourceDamage *= 0.625f; // 120 in normal, 144 in expert, 216 in master @@ -1003,6 +1003,24 @@ namespace CalamityMod.CalPlayer modifiers.SourceDamage *= 0.6f; } + bool isFallingBlock = (proj.type == ProjectileID.SandBallFalling) || (proj.type == ProjectileID.SiltBall) || (proj.type == ProjectileID.AshBallFalling) || + (proj.type == ProjectileID.CrimsandBallFalling) || (proj.type == ProjectileID.EbonsandBallFalling) || (proj.type == ProjectileID.PearlSandBallFalling) || + (proj.type == ProjectileID.ShellPileFalling) || (proj.type == ProjectileID.SlushBall) || (proj.type == ModContent.ProjectileType()); + if (Player.Calamity().fallingBlockProtection && isFallingBlock) + modifiers.Cancel(); + + bool isIgnoredTrap = (proj.type == ProjectileID.PoisonDartTrap) || (proj.type == ProjectileID.VenomDartTrap) || (proj.type == ProjectileID.PoisonDart); + if (Player.Calamity().trapProtection && isIgnoredTrap) + modifiers.Cancel(); + + bool isReducedTrap = (proj.type == ProjectileID.Boulder) || (proj.type == ProjectileID.BouncyBoulder) || (proj.type == ProjectileID.LifeCrystalBoulder) || + (proj.type == ProjectileID.MiniBoulder) || (proj.type == ProjectileID.MoonBoulder) || (proj.type == ProjectileID.SpearTrap) || + (proj.type == ProjectileID.SpikyBallTrap) || (proj.type == ProjectileID.GeyserTrap) || (proj.type == ProjectileID.FlamethrowerTrap) || + (proj.type == ProjectileID.RollingCactus) || (proj.type == ProjectileID.RollingCactusSpike) || (proj.type == ProjectileID.Explosives) || + (proj.type == ProjectileID.TNTBarrel) || (proj.type == 188); // Fun fact: flamethrower traps fire proj 188, NOT ProjectileID.FlamethrowerTrap :) + if (Player.Calamity().trapProtection && isReducedTrap) + modifiers.SourceDamage *= 0.35f; + // Reduce damage dealt by rainbow trails depending on how faded they are. if (proj.type == ProjectileID.HallowBossLastingRainbow) { diff --git a/Items/Accessories/AncientFossil.cs b/Items/Accessories/AncientFossil.cs index 09447e3273..6293e34145 100644 --- a/Items/Accessories/AncientFossil.cs +++ b/Items/Accessories/AncientFossil.cs @@ -19,6 +19,8 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { player.pickSpeed -= 0.1f; + player.Calamity().aFossil = true; + player.Calamity().fallingBlockProtection = true; } public override void AddRecipes() diff --git a/Items/Accessories/ArchaicPowder.cs b/Items/Accessories/ArchaicPowder.cs index 05610d1dc1..0a6598e7c6 100644 --- a/Items/Accessories/ArchaicPowder.cs +++ b/Items/Accessories/ArchaicPowder.cs @@ -20,20 +20,25 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - player.pickSpeed -= 0.15f; - if (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight) - { - player.statDefense += 10; - player.endurance += 0.05f; - } + player.pickSpeed -= 0.3f; + player.Calamity().aPowder = true; + 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 += 0.1f; } public override void AddRecipes() { CreateRecipe(). AddIngredient(). + AddIngredient(ItemID.AncientChisel). AddIngredient(3). - AddIngredient(15). + AddIngredient(10). AddIngredient(ItemID.Bone, 15). AddTile(TileID.Anvils). Register(); diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index df6bdae49d..7644d07267 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -116,7 +116,11 @@ AmbrosialAmpoule: { AncientFossil: { DisplayName: Ancient Fossil - Tooltip: Increases mining speed by 10% + Tooltip: + ''' + Increases mining speed by 10% + Provides immunity to damage from falling blocks + ''' } AnechoicPlating: { @@ -202,8 +206,10 @@ ArchaicPowder: { DisplayName: Archaic Powder Tooltip: ''' - Increases mining speed by 15% - 5% increased damage reduction and +10 defense while underground or in the underworld + Increases mining speed by 30% + Provides immunity to damage from falling blocks and dart traps + 65% resistance to all damage from traps + Does not stack with downgrades ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index 9ec613963a..b6a8a7aef9 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -64,7 +64,7 @@ ApoctosisArray: { Press to charge the blaster, restoring your mana until it reaches max The more mana you restore, the stronger the arrow is when you release it Charging for 90% of your max mana or more will reach max power -Holding this weapon disables the pickup of stars + Holding this weapon disables the pickup of stars ''' } @@ -501,7 +501,7 @@ IonBlaster: { Press to charge the blaster, restoring your mana until it reaches max The more mana you restore, the stronger the burst is when you release it Charging for 90% of your max mana or more will reach max power -Holding this weapon disables the pickup of stars + Holding this weapon disables the pickup of stars ''' } From 5ffc15de766c83d4fed5d9512fabb4ee7a763f5a Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 18 Mar 2025 14:03:31 -0700 Subject: [PATCH 06/22] Forgot landmines --- CalPlayer/CalamityPlayerHitHurt.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index f6cd293222..5816e69aaf 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -1017,7 +1017,7 @@ namespace CalamityMod.CalPlayer (proj.type == ProjectileID.MiniBoulder) || (proj.type == ProjectileID.MoonBoulder) || (proj.type == ProjectileID.SpearTrap) || (proj.type == ProjectileID.SpikyBallTrap) || (proj.type == ProjectileID.GeyserTrap) || (proj.type == ProjectileID.FlamethrowerTrap) || (proj.type == ProjectileID.RollingCactus) || (proj.type == ProjectileID.RollingCactusSpike) || (proj.type == ProjectileID.Explosives) || - (proj.type == ProjectileID.TNTBarrel) || (proj.type == 188); // Fun fact: flamethrower traps fire proj 188, NOT ProjectileID.FlamethrowerTrap :) + (proj.type == ProjectileID.TNTBarrel) || (proj.type == ProjectileID.Landmine) || (proj.type == ModContent.ProjectileType()) || (proj.type == 188); // Fun fact: flamethrower traps fire proj 188, NOT ProjectileID.FlamethrowerTrap :) if (Player.Calamity().trapProtection && isReducedTrap) modifiers.SourceDamage *= 0.35f; From b9b0319d6b78182c10816fa3352a8d2f0a43a555 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 18 Mar 2025 17:59:19 -0400 Subject: [PATCH 07/22] Magic number is kil --- CalPlayer/CalamityPlayerHitHurt.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 5816e69aaf..e123279e17 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -995,7 +995,7 @@ namespace CalamityMod.CalPlayer modifiers.SourceDamage *= 0.65f; // 80 in normal, 100 in expert, 150 in master - else if (proj.type == ProjectileID.SpikyBallTrap || (proj.type == ProjectileID.FlamethrowerTrap || proj.type == 188) || proj.type == ProjectileID.PoisonDartTrap) + else if (proj.type == ProjectileID.SpikyBallTrap || proj.type == ProjectileID.FlamethrowerTrap || proj.type == ProjectileID.FlamesTrap || proj.type == ProjectileID.PoisonDartTrap) modifiers.SourceDamage *= 0.625f; // 120 in normal, 144 in expert, 216 in master From 25e90c6927194784640325d5f0691e70c3953980 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 18 Mar 2025 18:00:42 -0400 Subject: [PATCH 08/22] "No" --- CalPlayer/CalamityPlayerHitHurt.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index e123279e17..a8f69fe751 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -1017,7 +1017,7 @@ namespace CalamityMod.CalPlayer (proj.type == ProjectileID.MiniBoulder) || (proj.type == ProjectileID.MoonBoulder) || (proj.type == ProjectileID.SpearTrap) || (proj.type == ProjectileID.SpikyBallTrap) || (proj.type == ProjectileID.GeyserTrap) || (proj.type == ProjectileID.FlamethrowerTrap) || (proj.type == ProjectileID.RollingCactus) || (proj.type == ProjectileID.RollingCactusSpike) || (proj.type == ProjectileID.Explosives) || - (proj.type == ProjectileID.TNTBarrel) || (proj.type == ProjectileID.Landmine) || (proj.type == ModContent.ProjectileType()) || (proj.type == 188); // Fun fact: flamethrower traps fire proj 188, NOT ProjectileID.FlamethrowerTrap :) + (proj.type == ProjectileID.TNTBarrel) || (proj.type == ProjectileID.Landmine) || (proj.type == ModContent.ProjectileType()) || (proj.type == ProjectileID.FlamesTrap); // Fun fact: flamethrower traps fire proj 188, NOT ProjectileID.FlamethrowerTrap :) if (Player.Calamity().trapProtection && isReducedTrap) modifiers.SourceDamage *= 0.35f; From d803359d7632e2154ee7ded59f634933d0836d58 Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Tue, 18 Mar 2025 20:52:32 -0500 Subject: [PATCH 09/22] Fixed the inner tube stompers fix breaking stompers with reversed gravity inverted the Y velocity check when gravity is inverted --- CalPlayer/CalamityPlayer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 1882016d67..6314224166 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4092,7 +4092,7 @@ namespace CalamityMod.CalPlayer } // Cancel fall and don't give 'on ground' effects if on rope, on mount, grappled, or tongued // Also cancel fall if the player has upwards Y velocity (Goodbye Inner Tube cheese) - if (Player.velocity.Y < 0f || Player.pulley || Player.mount.Active || Player.grappling[0] != -1 || Player.tongued) + if ((Player.gravDir == 1 && Player.velocity.Y < 0f) || (Player.gravDir == -1 && Player.velocity.Y > 1f) || Player.pulley || Player.mount.Active || Player.grappling[0] != -1 || Player.tongued) { gSabatonFall = 0; gSabatonFalling = false; From b6c9f1b60ee84833c6741e5071b4a893a5ca3610 Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 18 Mar 2025 21:47:10 -0700 Subject: [PATCH 10/22] Changed Fetid Emesis right Click --- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 5 +- Projectiles/Ranged/FetidEmesisHoldout.cs | 114 ++++++------------ 2 files changed, 36 insertions(+), 83 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index e4025b826b..d312f52466 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -467,9 +467,8 @@ FetidEmesis: { ''' Fires an accelerating stream of bullets until the barrel overheats When the barrel overheats, a spread of fetid chunks is vomited out - Holding while firing will hold in the chunks - If held in for long enough, more chunks will be fired - After firing, the gun must cool back down before it can be used again +After firing, the gun must cool back down before it can be used again + Pressing while firing will instantly launch the chunks 75% chance to save ammo ''' } diff --git a/Projectiles/Ranged/FetidEmesisHoldout.cs b/Projectiles/Ranged/FetidEmesisHoldout.cs index 36081c683c..6a4d3e1a42 100644 --- a/Projectiles/Ranged/FetidEmesisHoldout.cs +++ b/Projectiles/Ranged/FetidEmesisHoldout.cs @@ -1,17 +1,13 @@ -using CalamityMod.Buffs.DamageOverTime; +using System; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using ReLogic.Utilities; using Terraria; using Terraria.Audio; using Terraria.GameContent; using Terraria.ModLoader; -using Terraria.ID; -using System; -using CalamityMod.Dusts; namespace CalamityMod.Projectiles.Ranged { @@ -28,8 +24,6 @@ namespace CalamityMod.Projectiles.Ranged public ref float shootingTimer => ref Projectile.ai[2]; // Dual functions for rapid fire shooting cooldown and recoil public bool isTired => cooldownTimer > 0; public float revSpeed = 1; - public bool isHoldingIn = false; - public bool holdingInBonus = false; public bool secondShot = true; public int maxFrames = 420; public int initialFireTime = 45; @@ -37,14 +31,12 @@ namespace CalamityMod.Projectiles.Ranged public override void KillHoldoutLogic() { - if ( !isTired && (Owner.CantUseHoldout(false) || HeldItem.type != Owner.ActiveItem().type)) + if (!isTired && (Owner.CantUseHoldout(false) || HeldItem.type != Owner.ActiveItem().type)) Projectile.Kill(); } public override void HoldoutAI() { - isHoldingIn = Owner.Calamity().mouseRight; - if (!isTired && (Owner.CantUseHoldout() || HeldItem.type != Owner.ActiveItem().type)) cooldownTimer = (int)(Utils.Remap(revFrames, 0, 350, 40, 180, true)); if (isTired) @@ -92,81 +84,43 @@ namespace CalamityMod.Projectiles.Ranged revFrames++; shineScale *= 0.77f; - if (revFrames >= maxFrames && !isTired) + if (revFrames >= maxFrames && !isTired || (Owner.Calamity().mouseRight && revFrames > 2 )) { - if (isHoldingIn) - { - if (revFrames == maxFrames + 120) - { - holdingInBonus = true; - SoundEngine.PlaySound(SoundID.NPCHit14 with { Volume = 1f, Pitch = 0.3f }, Projectile.Center); - for (int i = 0; i < 25; i++) - { - Vector2 dustVel = Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(4, 8); - Dust dust2 = Dust.NewDustPerfect(GunTipPosition + dustVel, 278, dustVel * 0.7f); - dust2.scale = Main.rand.NextFloat(0.45f, 0.9f); - dust2.noGravity = true; - dust2.color = Color.Lerp(Color.White, Main.rand.NextBool(4) ? Color.Chartreuse : Color.Green, 0.7f); - } - Particle pulse = new CustomPulse(GunTipPosition, Vector2.Zero, Color.Chartreuse, "CalamityMod/Particles/HighResFoggyCircleHardEdge", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.05f, 14); - GeneralParticleHandler.SpawnParticle(pulse); - } + Owner.Calamity().GeneralScreenShakePower = 6.5f; + OffsetLengthFromArm -= 35f; + cooldownTimer = (int)MathHelper.Lerp((int)(Utils.Remap(revFrames, 0, 350, 40, 180, true)), 180, 0.7f); + SoundStyle bigShot = new("CalamityMod/Sounds/Custom/Perforator/PerfHiveIchorShoot"); + SoundStyle bigShotGun = new("CalamityMod/Sounds/Item/FlakKrakenShoot"); + SoundEngine.PlaySound(bigShot with { Pitch = -0.2f, Volume = 0.6f }, Projectile.Center); + SoundEngine.PlaySound(bigShotGun with { Volume = 0.6f }, Projectile.Center); - Dust dust = Dust.NewDustPerfect(GunTipPosition, Main.rand.NextBool(5) ? 28 : 215, (Projectile.velocity * 2).RotatedByRandom(0.3f) * Main.rand.NextFloat(0.1f, 1.5f), 0, default, Main.rand.NextFloat(0.6f, 1.4f)); - dust.noGravity = true; - if (revFrames % 20 == 0) - { - SoundStyle tired = new("CalamityMod/Sounds/Custom/OldDukeHuff"); - SoundEngine.PlaySound(tired with { Volume = 0.3f, Pitch = 0.3f }, Projectile.Center); - for (int i = 0; i <= 3; i++) - { - Dust dust5 = Dust.NewDustPerfect(GunTipPosition, 267, (Projectile.velocity * 5f).RotatedByRandom(0.4f) * Main.rand.NextFloat(0.1f, 1.5f), 0, default, Main.rand.NextFloat(0.9f, 1.2f)); - dust5.noGravity = true; - dust5.color = Color.Chartreuse; - } - } + int chunkDamage = (int)(Projectile.damage * 2.5f); + Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 13; + + Particle pulse3 = new GlowSparkParticle(GunTipPosition - shootVelocity, shootVelocity, false, 12, 0.035f, Color.Chartreuse, new Vector2(2.5f, 0.9f), true); + GeneralParticleHandler.SpawnParticle(pulse3); + + Particle pulse2 = new CustomPulse(GunTipPosition, Projectile.velocity * 14.5f, Color.Chartreuse * 0.7f, "CalamityMod/Particles/DustyCircleHardEdge", new Vector2(0.4f, 1f), Projectile.velocity.ToRotation(), 0.13f, 0, 34); + GeneralParticleHandler.SpawnParticle(pulse2); + Particle pulse = new CustomPulse(GunTipPosition, Projectile.velocity * 9f, Color.Chartreuse * 0.7f, "CalamityMod/Particles/FlameExplosion", new Vector2(0.4f, 1f), Projectile.velocity.ToRotation(), 0.25f, 0, 34); + GeneralParticleHandler.SpawnParticle(pulse); + + float velBonus = 1.1f; + for (int i = 0; i <= 5; i++) + { + Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity.RotatedBy(-0.03f * i * velBonus) * (1 - i * 0.08f) * velBonus, ModContent.ProjectileType(), chunkDamage, Projectile.knockBack * 3, Projectile.owner, -i, 0, velBonus); } - else + for (int j = 0; j <= 5; j++) { - Owner.Calamity().GeneralScreenShakePower = 6.5f; - OffsetLengthFromArm -= 35f; - cooldownTimer = holdingInBonus ? 230 : 180; - SoundStyle bigShot = new("CalamityMod/Sounds/Custom/Perforator/PerfHiveIchorShoot"); - SoundStyle bigShotGun = new("CalamityMod/Sounds/Item/FlakKrakenShoot"); - SoundEngine.PlaySound(bigShot with { Pitch = -0.2f, Volume = 0.6f }, Projectile.Center); - SoundEngine.PlaySound(bigShotGun with { Volume = 0.6f }, Projectile.Center); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity.RotatedBy(0.03f * j * velBonus) * (1 - j * 0.08f) * velBonus, ModContent.ProjectileType(), chunkDamage, Projectile.knockBack * 3, Projectile.owner, j, 0, velBonus); + } + Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity * velBonus, ModContent.ProjectileType(), chunkDamage, Projectile.knockBack * 3, Projectile.owner, 20, 0, velBonus); - int chunkDamage = (int)(Projectile.damage * (2f + (holdingInBonus ? 1 : 0))); - Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 13; - if (holdingInBonus) - { - Particle pulse2 = new CustomPulse(GunTipPosition, Projectile.velocity * 14.5f, Color.Chartreuse * 0.7f, "CalamityMod/Particles/DustyCircleHardEdge", new Vector2(0.4f, 1f), Projectile.velocity.ToRotation(), 0.13f, 0, 34); - GeneralParticleHandler.SpawnParticle(pulse2); - Particle pulse = new CustomPulse(GunTipPosition, Projectile.velocity * 9f, Color.Chartreuse * 0.7f, "CalamityMod/Particles/FlameExplosion", new Vector2(0.4f, 1f), Projectile.velocity.ToRotation(), 0.25f, 0, 34); - GeneralParticleHandler.SpawnParticle(pulse); - } - for (int y = 0; y < (holdingInBonus ? 3 : 1); y++) - { - float velBonus = 1 - y * 0.2f; - for (int i = 0; i <= 5; i++) - { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity.RotatedBy(-0.03f * i * velBonus) * (1 - i * 0.08f) * velBonus, ModContent.ProjectileType(), chunkDamage, Projectile.knockBack * 3, Projectile.owner, -i, 0, velBonus); - } - for (int j = 0; j <= 5; j++) - { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity.RotatedBy(0.03f * j * velBonus) * (1 - j * 0.08f) * velBonus, ModContent.ProjectileType(), chunkDamage, Projectile.knockBack * 3, Projectile.owner, j, 0, velBonus); - } - Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity * velBonus, ModContent.ProjectileType(), chunkDamage, Projectile.knockBack * 3, Projectile.owner, 20, 0, velBonus); - - for (int i = 0; i <= 18; i++) - { - Dust dust = Dust.NewDustPerfect(GunTipPosition, 66, shootVelocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.1f, 1.5f), 0, default, Main.rand.NextFloat(0.6f, 1.4f)); - dust.noGravity = true; - dust.color = Color.Chartreuse; - } - Particle pulse = new GlowSparkParticle(GunTipPosition - shootVelocity, shootVelocity * velBonus, false, 12, 0.035f, Color.Chartreuse, new Vector2(2.5f, 0.9f), true); - GeneralParticleHandler.SpawnParticle(pulse); - } + for (int i = 0; i <= 18; i++) + { + Dust dust = Dust.NewDustPerfect(GunTipPosition, 66, shootVelocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.1f, 1.5f), 0, default, Main.rand.NextFloat(0.6f, 1.4f)); + dust.noGravity = true; + dust.color = Color.Chartreuse; } } } From 38d61c5058c84ed57a51d1bd57055674b4ad6d33 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 19 Mar 2025 15:49:43 -0400 Subject: [PATCH 11/22] Rewrite data structures and surrounding API for maximum performance. --- Projectiles/CalamityGlobalProjectile.cs | 22 +-- .../Collections/SharedStaticIFramesIDSet.cs | 126 ++++++++++++++++++ .../Collections/SharedStaticIFramesList.cs | 82 ------------ 3 files changed, 140 insertions(+), 90 deletions(-) create mode 100644 Systems/Collections/SharedStaticIFramesIDSet.cs delete mode 100644 Systems/Collections/SharedStaticIFramesList.cs diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index c31c97506f..529f28b482 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4221,14 +4221,20 @@ namespace CalamityMod.Projectiles #region On Hit NPC public override void OnHitNPC(Projectile projectile, NPC target, NPC.HitInfo hit, int damageDone) { - int sharedIframeIndex = SharedStaticIFrames.IncludesAt(projectile.type); - if (sharedIframeIndex > -1 && projectile.usesIDStaticNPCImmunity) - { - foreach (int projType in SharedStaticIFrames.List[sharedIframeIndex]) - { - Projectile.perIDStaticNPCImmunity[projType][target.whoAmI] = Main.GameUpdateCount + (uint)projectile.idStaticNPCHitCooldown; - } - } + // Implementation of shared static iframes. + // If this projectile does not use static iframes, or is not registered to share them, then do nothing. + if (!projectile.usesIDStaticNPCImmunity || !SharedStaticIFrames.Includes(projectile.type)) + return; + + // Get the set of shared static iframe projectile types. + // If it's empty, then do nothing. + IList sharedWithProjectiles = SharedStaticIFrames.GetSharedStaticIFrames(projectile.type); + if (sharedWithProjectiles.Count <= 0) + return; + + // Apply the appropriate shared static iframes to all projectile types with which it is shared. + foreach (int projType in sharedWithProjectiles) + Projectile.perIDStaticNPCImmunity[projType][target.whoAmI] = Main.GameUpdateCount + (uint)projectile.idStaticNPCHitCooldown; } #endregion diff --git a/Systems/Collections/SharedStaticIFramesIDSet.cs b/Systems/Collections/SharedStaticIFramesIDSet.cs new file mode 100644 index 0000000000..d01cc7bd6a --- /dev/null +++ b/Systems/Collections/SharedStaticIFramesIDSet.cs @@ -0,0 +1,126 @@ +using System.Collections.Generic; +using CalamityMod.Projectiles.Magic; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Systems.Collections +{ + /// + /// A which contains an ProjectileID Set, created with the appropriate factory.
+ ///
+ /// This is populated from a much more human readable set of "shared iframe lists", contained in OnModLoad. + ///
+ public sealed class SharedStaticIFrames : ModSystem + { + public static IDictionary> SharedIFrameSets { get; private set; } + public static int[] SharedIFrameFactorySet { get; private set; } + + public override void PostSetupContent() + { + // This transient structure is used to make the setup of intended shared-iframe sets as easy as possible. + // + // If you want to add a new projectile to share iframes with any existing sets, just add it to that [ area ]. + // + // If you want to create a brand new shared iframe set, just add a new [ area ] at the bottom. + IList> setupLists = + [ + [ // Set 1: Vanilla bees (Hive Pack) + ProjectileID.Bee, + ProjectileID.GiantBee + ], + + [ // Set 2: Vilethorn + ProjectileID.VilethornBase, + ProjectileID.VilethornTip + ], + + [ // Set 3: Harp notes + ProjectileID.QuarterNote, + ProjectileID.EighthNote, + ProjectileID.TiedEighthNote + ], + + [ // Set 4: The North Pole + ProjectileID.NorthPoleWeapon, + ProjectileID.NorthPoleSpear, + ProjectileID.NorthPoleSnowflake, + ], + + [ // Set 5: All spore gas clouds + ProjectileID.SporeTrap, + ProjectileID.SporeTrap2, + ProjectileID.SporeGas, + ProjectileID.SporeGas2, + ProjectileID.SporeGas3 + ], + + [ // Set 6: Astral Staff and Asteroid Staff + ModContent.ProjectileType(), + ModContent.ProjectileType() + ], + + [ // Set 7: All toxic clouds + ProjectileID.ToxicCloud, + ProjectileID.ToxicCloud2, + ProjectileID.ToxicCloud3 + ] + ]; + + // Convert the above list-of-lists into a dictionary, where the key is the shared iframe projectile ID. + SharedIFrameSets = new SortedDictionary>(); + foreach (var innerList in setupLists) + { + int sharedIDForThisSet = innerList[0]; + SharedIFrameSets.Add(sharedIDForThisSet, innerList); + } + + // Now construct a vanilla Terraria Projectile ID Set using the appropriate factory. + + // Calculate the total length of the input buffer to the factory + int totalLength = 0; + foreach(var l in SharedIFrameSets.Values) + totalLength += l.Count; + + // Create the buffer and fill it + int[] buffer = new int[totalLength * 2]; + int idx = 0; + foreach (var sharedFrameList in setupLists) + { + int sharedIDForThisSet = sharedFrameList[0]; + + foreach (var projID in sharedFrameList) + { + buffer[idx++] = projID; + buffer[idx++] = sharedIDForThisSet; + } + } + + SharedIFrameFactorySet = ProjectileID.Sets.Factory.CreateIntSet(-1, buffer); + } + + public override void Unload() + { + SharedIFrameSets = null; + SharedIFrameFactorySet = null; + } + + /// + /// A shorthand method to check if this projectile shares static iframes in any way. + /// + public static bool Includes(int projType) => SharedIFrameFactorySet[projType] != -1; + + /// + /// The intended + /// + /// The projectile type to get the set of shared iframe projectile IDs for. + /// A list of projectile IDs that share static iframes with this projectile ID. This list may be empty. + public static IList GetSharedStaticIFrames(int projType) + { + int sharedSetID = SharedIFrameFactorySet[projType]; + bool setExists = SharedIFrameSets.TryGetValue(sharedSetID, out var ret); + + return setExists ? ret : []; + } + } +} diff --git a/Systems/Collections/SharedStaticIFramesList.cs b/Systems/Collections/SharedStaticIFramesList.cs deleted file mode 100644 index 259b274bfb..0000000000 --- a/Systems/Collections/SharedStaticIFramesList.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System.Collections.Generic; -using CalamityMod.Projectiles.Magic; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Systems.Collections -{ - /// - /// A which contains a which contains multiple , containing projectiles which share static immunity frames. - /// - public sealed class SharedStaticIFrames : ModSystem - { - public static IList> List { get; private set; } - - public override void OnModLoad() - { - List = - [ - [ - ProjectileID.Bee, - ProjectileID.GiantBee - ], - [ - ProjectileID.VilethornBase, - ProjectileID.VilethornTip - ], - [ - ProjectileID.QuarterNote, - ProjectileID.EighthNote, - ProjectileID.TiedEighthNote - ], - [ - ProjectileID.NorthPoleWeapon, - ProjectileID.NorthPoleSpear, - ProjectileID.NorthPoleSnowflake, - ], - [ - ProjectileID.SporeTrap, - ProjectileID.SporeTrap2, - ProjectileID.SporeGas, - ProjectileID.SporeGas2, - ProjectileID.SporeGas3 - ], - [ - ModContent.ProjectileType(), - ModContent.ProjectileType() - ], - [ - ProjectileID.ToxicCloud, - ProjectileID.ToxicCloud2, - ProjectileID.ToxicCloud3 - ] - ]; - } - - public override void Unload() => List = null; - - /// - /// A shorthand method to check if this projectile shares static iframes. - /// - public static bool Includes(int projType) - { - for (int i = 0; i < List.Count; i++) - { - if (List[i].Contains(projType)) return true; - } - return false; - } - - /// - /// A shorthand method to get which list contains the given type. Returns -1 if none contain it. - /// - public static int IncludesAt(int projType) - { - for (int i = 0; i < List.Count; i++) - { - if (List[i].Contains(projType)) return i; - } - return -1; - } - } -} From a8ef9cebe948eef09e6e150771ab4c0bdd8cd953 Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Wed, 19 Mar 2025 15:04:26 -0500 Subject: [PATCH 12/22] minor optimizations of chalice indicator I had to optimize chalice indicator for my mod (where performance was an issue due to the extra features it has) so I figured I'd carry over the relevant optimizations here. This likely won't have any noticable effect, but it doesn't hurt to have --- UI/ResourceSets/CalamityResourceOverlay.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/UI/ResourceSets/CalamityResourceOverlay.cs b/UI/ResourceSets/CalamityResourceOverlay.cs index e4fb0c820a..b954995b71 100644 --- a/UI/ResourceSets/CalamityResourceOverlay.cs +++ b/UI/ResourceSets/CalamityResourceOverlay.cs @@ -153,16 +153,17 @@ namespace CalamityMod.UI.ResourceSets int deadPixels = (int)Math.Floor((snapshot.LifeMax - snapshot.Life) * pixelsPerLife); var bleedPixels = Math.Round(bleed * pixelsPerLife); - Color[] textureData = new Color[width * 12]; - + Color[] textureData = new Color[width * 12]; + // doze 19MAR2025 - I don't know if I could optimize this any further without switching to shaders. + // I don't expect performance issues, but at some point might be worth adding a config to disable the indicator in case of lag or accessibility concerns for (int i = 0; i < textureData.Length; i++) { - var bleedCol = new Color(0, 0, 0, 0); - if ((i % width < bleedPixels + deadPixels) && !(i % width < deadPixels)) + var i_MOD_width = i % width; //minor optimization, calculated here once instead of twice in the loop. + var bleedCol = Color.Transparent; + if ((i_MOD_width < bleedPixels + deadPixels) && !(i_MOD_width < deadPixels)) { bleedCol = barTextureData[((i % 12)+(i/width)*12)]; - //bleedCol = new Color(0f, 0.3f, 0.75f, 0.5f); } textureData[i] = bleedCol; From 73d8a137b9f30098b75c5ca3e1cd1c5d3a760be3 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 19 Mar 2025 16:57:41 -0400 Subject: [PATCH 13/22] Flash projectile directly sets local iframes because both of its use cases do --- Projectiles/Ranged/Flash.cs | 4 ++-- Projectiles/Ranged/SputterCometBig.cs | 4 +--- Projectiles/Rogue/LeonidProgenitorBombshell.cs | 2 -- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Projectiles/Ranged/Flash.cs b/Projectiles/Ranged/Flash.cs index 7f92392d18..a5eb54f88e 100644 --- a/Projectiles/Ranged/Flash.cs +++ b/Projectiles/Ranged/Flash.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; Projectile.timeLeft = 5; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Ranged/SputterCometBig.cs b/Projectiles/Ranged/SputterCometBig.cs index 7f227bbb77..85150cc826 100644 --- a/Projectiles/Ranged/SputterCometBig.cs +++ b/Projectiles/Ranged/SputterCometBig.cs @@ -68,9 +68,7 @@ namespace CalamityMod.Projectiles.Ranged SoundEngine.PlaySound(SoundID.Item93, Projectile.position); if (Projectile.owner == Main.myPlayer) { - int flash = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.5), 0f, Projectile.owner, 0f, 0f); - Main.projectile[flash].usesLocalNPCImmunity = true; - Main.projectile[flash].localNPCHitCooldown = 10; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)((double)Projectile.damage * 0.5), 0f, Projectile.owner, 0f, 0f); } for (int k = 0; k < 5; k++) { diff --git a/Projectiles/Rogue/LeonidProgenitorBombshell.cs b/Projectiles/Rogue/LeonidProgenitorBombshell.cs index 8ecefdb0c6..507789ee06 100644 --- a/Projectiles/Rogue/LeonidProgenitorBombshell.cs +++ b/Projectiles/Rogue/LeonidProgenitorBombshell.cs @@ -78,8 +78,6 @@ namespace CalamityMod.Projectiles.Rogue if (flash.WithinBounds(Main.maxProjectiles)) { Main.projectile[flash].DamageType = RogueDamageClass.Instance; - Main.projectile[flash].usesLocalNPCImmunity = true; - Main.projectile[flash].localNPCHitCooldown = 10; } Vector2 pos = new Vector2(Projectile.Center.X + Projectile.width * 0.5f + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); From 21d944e15d2f9879df16235ecf3d83fa133ffd3c Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Wed, 19 Mar 2025 16:00:58 -0500 Subject: [PATCH 14/22] Fixed Drataliornus and Sky Glaze iframes these were set to make global iframes 0 and 1 respectively on hit npc, so removed that and made drata use 0 local iframes and sky glaze 1 static iframe --- Projectiles/Magic/StickyFeather.cs | 6 +----- Projectiles/Ranged/DrataliornusExoArrow.cs | 6 ++---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Projectiles/Magic/StickyFeather.cs b/Projectiles/Magic/StickyFeather.cs index 1381de00cf..d33a69bb29 100644 --- a/Projectiles/Magic/StickyFeather.cs +++ b/Projectiles/Magic/StickyFeather.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.aiStyle = ProjAIStyleID.Nail; AIType = ProjectileID.NailFriendly; Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; + Projectile.idStaticNPCHitCooldown = 1; } public override void AI() @@ -37,10 +37,6 @@ namespace CalamityMod.Projectiles.Magic } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.immune[Projectile.owner] = 1; - } public override void OnKill(int timeLeft) { diff --git a/Projectiles/Ranged/DrataliornusExoArrow.cs b/Projectiles/Ranged/DrataliornusExoArrow.cs index 52d4807002..26f7ad0d44 100644 --- a/Projectiles/Ranged/DrataliornusExoArrow.cs +++ b/Projectiles/Ranged/DrataliornusExoArrow.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; Projectile.arrow = true; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 0; } public override void AI() @@ -64,8 +64,6 @@ namespace CalamityMod.Projectiles.Ranged public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.immune[Projectile.owner] = 0; - target.AddBuff(ModContent.BuffType(), 180); } From 9a3bebf0b6980ab07b5fe163205a8d33f389b803 Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Wed, 19 Mar 2025 16:04:43 -0500 Subject: [PATCH 15/22] removed samsara slicer's pointless iframe code --- Projectiles/Rogue/SamsaraSlicerSmallDisk.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs b/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs index dac74b5b0d..14b31a2c20 100644 --- a/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs +++ b/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs @@ -105,11 +105,6 @@ namespace CalamityMod.Projectiles.Rogue Parent = Main.projectile[(int)Projectile.ai[0]]; } - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - target.immune[Projectile.owner] = 0; - } - public override bool PreDraw(ref Color lightColor) { for (int i = 1; i < Projectile.oldPos.Length; i++) From 0a70818d6391847b33733c9c57451d856f127131 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 19 Mar 2025 17:06:42 -0400 Subject: [PATCH 16/22] Fixed Crystal Piercer stealth strike iframes --- Items/Weapons/Rogue/CrystalPiercer.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Items/Weapons/Rogue/CrystalPiercer.cs b/Items/Weapons/Rogue/CrystalPiercer.cs index f7b115b4da..3a54076ed3 100644 --- a/Items/Weapons/Rogue/CrystalPiercer.cs +++ b/Items/Weapons/Rogue/CrystalPiercer.cs @@ -39,7 +39,9 @@ namespace CalamityMod.Items.Weapons.Rogue Main.projectile[stealth].Calamity().stealthStrike = true; Main.projectile[stealth].aiStyle = -1; Main.projectile[stealth].tileCollide = false; + Main.projectile[stealth].usesIDStaticNPCImmunity = false; Main.projectile[stealth].usesLocalNPCImmunity = true; + Main.projectile[stealth].localNPCHitCooldown = 10; } return false; } From b99f231d9bb8bed42eeae6812baf041c2b93dcf5 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 19 Mar 2025 17:16:38 -0400 Subject: [PATCH 17/22] Tooth Ball grants local iframes because Rot Ball does Why were they different??????? --- Items/Weapons/Rogue/RotBall.cs | 1 - Items/Weapons/Rogue/ToothBall.cs | 1 - Projectiles/Rogue/ToothBallProjectile.cs | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Rogue/RotBall.cs b/Items/Weapons/Rogue/RotBall.cs index 89cf7dcd29..374b63d451 100644 --- a/Items/Weapons/Rogue/RotBall.cs +++ b/Items/Weapons/Rogue/RotBall.cs @@ -41,7 +41,6 @@ namespace CalamityMod.Items.Weapons.Rogue if (stealth.WithinBounds(Main.maxProjectiles)) { Main.projectile[stealth].Calamity().stealthStrike = true; - Main.projectile[stealth].usesLocalNPCImmunity = true; } return false; } diff --git a/Items/Weapons/Rogue/ToothBall.cs b/Items/Weapons/Rogue/ToothBall.cs index 2799f984b0..686a7719a8 100644 --- a/Items/Weapons/Rogue/ToothBall.cs +++ b/Items/Weapons/Rogue/ToothBall.cs @@ -41,7 +41,6 @@ namespace CalamityMod.Items.Weapons.Rogue if (stealth.WithinBounds(Main.maxProjectiles)) { Main.projectile[stealth].Calamity().stealthStrike = true; - Main.projectile[stealth].usesLocalNPCImmunity = true; } return false; } diff --git a/Projectiles/Rogue/ToothBallProjectile.cs b/Projectiles/Rogue/ToothBallProjectile.cs index 48fd1d7cc2..3aa6c9ac5d 100644 --- a/Projectiles/Rogue/ToothBallProjectile.cs +++ b/Projectiles/Rogue/ToothBallProjectile.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 600; AIType = ProjectileID.ThrowingKnife; Projectile.DamageType = RogueDamageClass.Instance; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 30; } public override bool PreDraw(ref Color lightColor) From db1b43fb0cebedf5948a316f93dfbc4b20b25a5f Mon Sep 17 00:00:00 2001 From: Xyk Date: Fri, 21 Mar 2025 01:50:09 -0700 Subject: [PATCH 18/22] Iron Boots Rework SLAM --- CalPlayer/CalamityPlayer.cs | 7 ++- CalPlayer/CalamityPlayerMiscEffects.cs | 55 ++++++++++++++++++- Items/Accessories/IronBoots.cs | 1 + .../Mods.CalamityMod.Items.Accessories.hjson | 8 ++- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 2 +- 5 files changed, 66 insertions(+), 7 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 6314224166..d3b0f14233 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -915,6 +915,7 @@ namespace CalamityMod.CalPlayer public bool baroclaw = false; public bool HasIncreasedDashFirstFrame = false; public bool IsFirstDashFrame = true; + public int fallingBootVelCheckTimer = 0; public bool voidOfCalamity = false; public bool voidOfExtinction = false; public bool eArtifact = false; @@ -3287,7 +3288,7 @@ namespace CalamityMod.CalPlayer } //Only increment hotkey holdtime if not on ground, not mounted, not on rope, not hooked, not tongued, otherwise reset hold time to zero - if (CalamityKeybinds.GravistarSabatonHotkey.Current && gSabaton && Main.myPlayer == Player.whoAmI && (Player.velocity.Y != Player.oldVelocity.Y) && !Player.pulley && !Player.mount.Active && Player.grappling[0] == -1 && !Player.tongued) + if (CalamityKeybinds.GravistarSabatonHotkey.Current && gSabaton && Main.myPlayer == Player.whoAmI && (Player.velocity.Y != 0) && !Player.pulley && !Player.mount.Active && Player.grappling[0] == -1 && !Player.tongued) { gSabatonHotkeyHoldTime++; if (gSabatonHotkeyHoldTime < 30 && gSabatonHotkeyHoldTime % 3f == 0) @@ -4111,7 +4112,7 @@ namespace CalamityMod.CalPlayer Player.controlJump = false; // Check if player hit some form of solid resistance (the ground) - if (Player.oldVelocity.Y == Player.velocity.Y) + if (0 == Player.velocity.Y) { var source = Player.GetSource_Accessory(FindAccessory(ItemType())); //Spawn explosion. ai[0] is used for transferring the recorded falling time @@ -4466,6 +4467,8 @@ namespace CalamityMod.CalPlayer ModDashMovement(); } #endregion + + Player.oldVelocity = Player.velocity; // Apparently this value is not updated on its own, so we do it } #endregion diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 64f5c79438..a5428f552b 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1270,9 +1270,6 @@ namespace CalamityMod.CalPlayer // Increase fall speed if (!Player.mount.Active) { - if (Player.IsUnderwater() && ironBoots) - Player.maxFallSpeed = 9f; - if (!Player.wet) { if (cirrusDress) @@ -1283,6 +1280,15 @@ namespace CalamityMod.CalPlayer Player.maxFallSpeed = 20f; } + if (Player.controlDown && ironBoots) + { + Player.maxFallSpeed = 23f; // This is slightly faster than slimy saddle (so it can be viable) + if (Player.gravDir == 1 ? Player.velocity.Y <= 0 : Player.velocity.Y >= 0) + Player.velocity.Y *= 0.7f; + else if (Player.gravDir == 1 ? Player.velocity.Y < Player.maxFallSpeed : Player.velocity.Y > Player.maxFallSpeed) + Player.velocity.Y = MathHelper.Lerp(Player.velocity.Y, Player.maxFallSpeed, 0.1f); + } + if (LungingDown) { Player.maxFallSpeed = 80f; @@ -1726,6 +1732,49 @@ namespace CalamityMod.CalPlayer } } + if (ironBoots) + { + if (Player.controlDown) + { + if (Player.gravDir == 1 ? Player.velocity.Y > 0 : Player.velocity.Y < 0) + fallingBootVelCheckTimer++; + + 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 + Vector2 playerFeet = Player.Center + Vector2.UnitY * 26 * Player.gravDir; + + float blastSize = 120 * power; + float minMultiplier = 0.1f; + int hitsToMinMult = 6; + int debuff = ModContent.BuffType(); + int debuffTime = (int)(300 * power); + Projectile blast = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), playerFeet, Vector2.Zero, ModContent.ProjectileType(), (int)(damage), -25 * power, Player.whoAmI, blastSize, minMultiplier, hitsToMinMult); + blast.localAI[0] = debuff; + blast.localAI[1] = debuffTime; + blast.timeLeft = 5; + + int particleNumber = (int)Math.Max(15 * power, 2); + for (int i = -particleNumber; i <= particleNumber; i++) + { + Particle sparks = new AltSparkParticle(playerFeet, (Vector2.UnitX * (5 + Math.Abs(i)) * Math.Sign(i)).RotatedByRandom(0.25f) * Main.rand.NextFloat(0.5f, 1) * power, false, Main.rand.Next(17, 30 + 1), Main.rand.NextFloat(0.2f, 0.8f), Main.rand.NextBool() ? Color.Lerp(Color.Gold, Color.Silver, 0.3f) : Color.Silver); + GeneralParticleHandler.SpawnParticle(sparks); + } + + SoundStyle sound = new("CalamityMod/Sounds/NPCHit/ExoHit3"); + SoundEngine.PlaySound(sound with { Volume = 0.6f * power, Pitch = Main.rand.NextFloat(0.6f, 0.8f) }, playerFeet); + + Player.Calamity().GeneralScreenShakePower = 4 * scaledPower; + fallingBootVelCheckTimer = 0; + } + } + + if (Player.gravDir == 1 ? Player.velocity.Y <= 0 : Player.velocity.Y >= 0) + fallingBootVelCheckTimer = 0; + } + if (unstableGraniteCore) { zapActivity += 1; diff --git a/Items/Accessories/IronBoots.cs b/Items/Accessories/IronBoots.cs index a87ec69437..5e50b0a3b2 100644 --- a/Items/Accessories/IronBoots.cs +++ b/Items/Accessories/IronBoots.cs @@ -26,6 +26,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.ironBoots = true; + player.noFallDmg = true; } } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 7644d07267..638cdbbf7a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1006,7 +1006,13 @@ InterstellarStompers: { IronBoots: { DisplayName: Iron Boots - Tooltip: Allows you to sink faster through liquids + Tooltip: +''' +Hold DOWN to increase your maximum fall speed, even in water +Upon hitting the ground, a shockwave is created at your feet +The shockwave scales in both damage and size the longer you fall for +Negates fall damage +''' } JellyChargedBattery: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index d312f52466..08b4725ff0 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -467,7 +467,7 @@ FetidEmesis: { ''' Fires an accelerating stream of bullets until the barrel overheats When the barrel overheats, a spread of fetid chunks is vomited out -After firing, the gun must cool back down before it can be used again + After firing, the gun must cool back down before it can be used again Pressing while firing will instantly launch the chunks 75% chance to save ammo ''' From 3d5f425f88687701fe7f84ebbb95d13dd14c2700 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 21 Mar 2025 10:38:21 -0400 Subject: [PATCH 19/22] Abyssal Diving Suit no longer uses Iron Boots --- Buffs/StatBuffs/AbyssalDivingSuitBuff.cs | 5 ++++- Items/Accessories/AbyssalDivingSuit.cs | 1 - .../en-US/Mods.CalamityMod.Items.Accessories.hjson | 12 ++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Buffs/StatBuffs/AbyssalDivingSuitBuff.cs b/Buffs/StatBuffs/AbyssalDivingSuitBuff.cs index 92cab6a912..e1757ba91c 100644 --- a/Buffs/StatBuffs/AbyssalDivingSuitBuff.cs +++ b/Buffs/StatBuffs/AbyssalDivingSuitBuff.cs @@ -21,12 +21,15 @@ namespace CalamityMod.Buffs.StatBuffs if (modPlayer.abyssalDivingSuitPrevious) { if (player.IsUnderwater()) + { + if (player.maxFallSpeed < 9f) + player.maxFallSpeed = 9f; player.gills = true; + } modPlayer.abyssalDivingSuitPower = true; modPlayer.depthCharm = true; modPlayer.jellyfishNecklace = true; modPlayer.anechoicPlating = true; - modPlayer.ironBoots = true; player.arcticDivingGear = true; player.accFlipper = true; player.accDivingHelm = true; diff --git a/Items/Accessories/AbyssalDivingSuit.cs b/Items/Accessories/AbyssalDivingSuit.cs index 51803181a3..8fa999b765 100644 --- a/Items/Accessories/AbyssalDivingSuit.cs +++ b/Items/Accessories/AbyssalDivingSuit.cs @@ -65,7 +65,6 @@ namespace CalamityMod.Items.Accessories CreateRecipe(). AddIngredient(). AddIngredient(). - AddIngredient(). AddIngredient(ItemID.LunarBar, 5). AddIngredient(15). AddTile(TileID.LunarCraftingStation). diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 638cdbbf7a..040455ec51 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1007,12 +1007,12 @@ InterstellarStompers: { IronBoots: { DisplayName: Iron Boots Tooltip: -''' -Hold DOWN to increase your maximum fall speed, even in water -Upon hitting the ground, a shockwave is created at your feet -The shockwave scales in both damage and size the longer you fall for -Negates fall damage -''' + ''' + Hold DOWN to increase your maximum fall speed, even in water + Upon hitting the ground, a shockwave is created at your feet + The shockwave scales in both damage and size the longer you fall for + Negates fall damage + ''' } JellyChargedBattery: { From a19349cfbe0557840dd5291609ec038eca82b4a4 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 21 Mar 2025 20:57:13 -0400 Subject: [PATCH 20/22] Removed edit to Master Mode description on world creation Since Calamity no longer changes bosses in vanilla Master --- ILEditing/ILChangesLoading.cs | 1 - ILEditing/WorldgenILChanges.cs | 22 +------------------- Localization/en-US/Mods.CalamityMod.UI.hjson | 2 -- 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index 8a366bd53a..e7af14fa61 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -177,7 +177,6 @@ namespace CalamityMod.ILEditing IL_WorldGen.Chlorophyte += AdjustChlorophyteSpawnLimits; IL_UIWorldCreation.SetDefaultOptions += ChangeDefaultWorldSize; IL_UIWorldCreation.AddWorldSizeOptions += SwapSmallDescriptionKey; - IL_UIWorldCreation.AddWorldDifficultyOptions += SwapMasterModeDescriptionKey; Terraria.IO.On_WorldFile.ClearTempTiles += ClearModdedTempTiles; On_WorldGen.MakeDungeon += LimitDungeonEntranceXPosition; IL_WorldGen.DungeonHalls += LimitDungeonHallsXPosition; diff --git a/ILEditing/WorldgenILChanges.cs b/ILEditing/WorldgenILChanges.cs index b6ca1da325..419d4c19f9 100644 --- a/ILEditing/WorldgenILChanges.cs +++ b/ILEditing/WorldgenILChanges.cs @@ -161,7 +161,7 @@ namespace CalamityMod.ILEditing } #endregion - #region Change World Generation Descriptions + #region Change Small World Description /// /// Changes the description of Small worlds to serve as a warning. /// @@ -184,26 +184,6 @@ namespace CalamityMod.ILEditing } - - /// - /// Changes the description of Master Mode to mention boss changes. - /// - private static void SwapMasterModeDescriptionKey(ILContext il) - { - // Swap vanilla's Master Mode description string (UI.WorldDescriptionMaster) with Calamity's edited version (Mods.CalamityMod.UI.WorldMaster). - var cursor = new ILCursor(il); - - // Move to after the string. - if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdstr("UI.WorldDescriptionMaster"))) - { - LogFailure("Change Master Mode Description", "Could not match string \"UI.WorldDescriptionMaster\"."); - return; - } - - // Pop this value off, then replace it with Calamity's new string. - cursor.EmitPop(); - cursor.Emit(OpCodes.Ldstr, "Mods.CalamityMod.UI.WorldMaster"); - } #endregion #region Clear temporary modded tiles diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson index dc46a26af4..9934224d3d 100644 --- a/Localization/en-US/Mods.CalamityMod.UI.hjson +++ b/Localization/en-US/Mods.CalamityMod.UI.hjson @@ -1,6 +1,4 @@ -// Vanilla UI edits SmallWorldWarning: "[c/FF0000:SMALL WORLDS NOT SUPPORTED BY CALAMITY]" -WorldMaster: Game over man, game over! (Brutally hard boss changes, for the truly brave) // Main UI Elements Adrenaline: Adrenaline Nanomachines: Nanomachines From 1199cd3ac4d463ca783b907e96cb98fba5f09ceb Mon Sep 17 00:00:00 2001 From: Xyk Date: Fri, 21 Mar 2025 18:40:50 -0700 Subject: [PATCH 21/22] Arsenal dusts and colors Also changed Holofiber Immolator a bit --- Dusts/SquareDust.cs | 63 ++++++++++++++ Dusts/SquashDust.cs | 61 +++++++++++++ Dusts/SquashDustHollow.cs | 61 +++++++++++++ Dusts/SquashDustTileTouch.cs | 69 +++++++++++++++ Effects/ArsenalEffects.cs | 36 ++++++++ .../DraedonsArsenal/HolofiberImmolator.cs | 5 -- Items/Weapons/Ranged/BladedgeRailbow.cs | 3 + Particles/GlowSquareParticleThick.png | Bin 0 -> 6746 bytes .../HolofiberImmolatorHoldout.cs | 37 +++----- .../DraedonsArsenal/ImmolationArrow.cs | 80 ++++++++++-------- .../DraedonsArsenal/ImmolationBurst.cs | 10 +-- .../DraedonsArsenal/ImmolationSpray.cs | 24 ++++-- 12 files changed, 372 insertions(+), 77 deletions(-) create mode 100644 Dusts/SquareDust.cs create mode 100644 Dusts/SquashDust.cs create mode 100644 Dusts/SquashDustHollow.cs create mode 100644 Dusts/SquashDustTileTouch.cs create mode 100644 Effects/ArsenalEffects.cs create mode 100644 Particles/GlowSquareParticleThick.png diff --git a/Dusts/SquareDust.cs b/Dusts/SquareDust.cs new file mode 100644 index 0000000000..054b05ad37 --- /dev/null +++ b/Dusts/SquareDust.cs @@ -0,0 +1,63 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Dusts +{ + public class SquareDust : ModDust + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override void OnSpawn(Dust dust) + { + dust.scale *= Main.rand.NextFloat(0.8f, 1f); + dust.rotation = Main.rand.NextFloat(-5, 5); + } + + public override bool Update(Dust dust) + { + float fadeSpeed = (dust.fadeIn + 1); + float rotDir = Math.Sign(dust.rotation); + dust.rotation += 0.04f * dust.scale * rotDir; + dust.velocity *= 0.96f * fadeSpeed; + if (dust.noGravity) + dust.scale -= 0.045f * fadeSpeed; + else + { + dust.scale -= 0.03f * fadeSpeed; + dust.velocity.Y += Main.rand.NextFloat(0.1f, 0.35f) * fadeSpeed; + } + + float light = MathHelper.Clamp(dust.scale * 0.8f, 0f, 1f); + if (!dust.noLightEmittence) + Lighting.AddLight(dust.position, dust.color.ToVector3() * light); + + if (dust.scale <= 0) + dust.active = false; + + dust.position += dust.velocity; + + return false; + } + public override bool PreDraw(Dust dust) + { + Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f); + + Texture2D bloom = ModContent.Request("CalamityMod/Particles/GlowSquareParticleThick").Value; + + Vector2 squash = Vector2.One; + + // Glow Orb + Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0); + if (dust.alpha < 1) + Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.095f, SpriteEffects.None, 0); + if (!dust.noLight) + { + for (int i = 0; i < 2; i++) + Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.09f, SpriteEffects.None, 0); + } + return false; + } + } +} diff --git a/Dusts/SquashDust.cs b/Dusts/SquashDust.cs new file mode 100644 index 0000000000..92f997c578 --- /dev/null +++ b/Dusts/SquashDust.cs @@ -0,0 +1,61 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Dusts +{ + public class SquashDust : ModDust + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override void OnSpawn(Dust dust) + { + dust.scale *= Main.rand.NextFloat(0.8f, 1f); + } + + public override bool Update(Dust dust) + { + float fadeSpeed = (dust.fadeIn + 1); + dust.rotation = dust.velocity.ToRotation() + MathHelper.PiOver2; + dust.velocity *= 0.96f * fadeSpeed; + if (dust.noGravity) + dust.scale -= 0.045f * fadeSpeed; + else + { + dust.scale -= 0.03f * fadeSpeed; + dust.velocity.Y += Main.rand.NextFloat(0.1f, 0.35f) * fadeSpeed; + } + + float light = MathHelper.Clamp(dust.scale * 0.8f, 0f, 1f); + if (!dust.noLightEmittence) + Lighting.AddLight(dust.position, dust.color.ToVector3() * light); + + if (dust.scale <= 0) + dust.active = false; + + dust.position += dust.velocity; + + return false; + } + public override bool PreDraw(Dust dust) + { + Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f); + Texture2D solidCenter = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle").Value; + + Texture2D bloom = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + + Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(dust.velocity.Length(), 2, 7, 1, 2.5f)); + + // Glow Orb + Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0); + if (dust.alpha < 1) + Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.04f, SpriteEffects.None, 0); + if (!dust.noLight) + { + Main.EntitySpriteDraw(solidCenter, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, solidCenter.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0); + } + return false; + } + } +} diff --git a/Dusts/SquashDustHollow.cs b/Dusts/SquashDustHollow.cs new file mode 100644 index 0000000000..9060175773 --- /dev/null +++ b/Dusts/SquashDustHollow.cs @@ -0,0 +1,61 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Dusts +{ + public class SquashDustHollow : ModDust + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override void OnSpawn(Dust dust) + { + dust.scale *= Main.rand.NextFloat(0.8f, 1f); + } + + public override bool Update(Dust dust) + { + float fadeSpeed = (dust.fadeIn + 1); + dust.rotation = dust.velocity.ToRotation() + MathHelper.PiOver2; + dust.velocity *= 0.96f * fadeSpeed; + if (dust.noGravity) + dust.scale -= 0.045f * fadeSpeed; + else + { + dust.scale -= 0.03f * fadeSpeed; + dust.velocity.Y += Main.rand.NextFloat(0.1f, 0.35f) * fadeSpeed; + } + + float light = MathHelper.Clamp(dust.scale * 0.8f, 0f, 1f); + if (!dust.noLightEmittence) + Lighting.AddLight(dust.position, dust.color.ToVector3() * light); + + if (dust.scale <= 0) + dust.active = false; + + dust.position += dust.velocity; + + return false; + } + public override bool PreDraw(Dust dust) + { + Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f); + + Texture2D bloom = ModContent.Request("CalamityMod/Particles/BloomRing").Value; + + Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(dust.velocity.Length(), 2, 7, 1, 2.5f)); + + // Glow Orb + Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0); + if (dust.alpha < 1) + Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.2f) with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.09f, SpriteEffects.None, 0); + if (!dust.noLight) + { + for (int i = 0; i < 2; i++) + Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.4f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0); + } + return false; + } + } +} diff --git a/Dusts/SquashDustTileTouch.cs b/Dusts/SquashDustTileTouch.cs new file mode 100644 index 0000000000..4158167ca4 --- /dev/null +++ b/Dusts/SquashDustTileTouch.cs @@ -0,0 +1,69 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Dusts +{ + public class SquashDustTileTouch : ModDust + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override void OnSpawn(Dust dust) + { + dust.scale *= Main.rand.NextFloat(0.8f, 1f); + } + + public override bool Update(Dust dust) + { + bool touchedTiles = false; + int size = (int)(2); + if (Collision.SolidCollision(dust.position, size, size)) + { + touchedTiles = true; + dust.velocity = Vector2.Zero; + } + float fadeSpeed = (dust.fadeIn + 1); // For this dust, fadeIn is used to increase the power of gravity if it's active, otherwise it makes it's lifetime change + dust.rotation = dust.velocity.ToRotation() + MathHelper.PiOver2; + dust.velocity *= 0.96f; + if (dust.noGravity) + dust.scale -= 0.045f * (touchedTiles ? 0.4f : 1) * fadeSpeed; + else + { + dust.scale -= 0.03f * (touchedTiles ? 0.4f : 1); + dust.velocity.Y += Main.rand.NextFloat(0.1f, 0.35f) * fadeSpeed; + } + + float light = MathHelper.Clamp(dust.scale * 0.8f, 0f, 1f); + if (!dust.noLightEmittence) + Lighting.AddLight(dust.position, dust.color.ToVector3() * light); + + if (dust.scale <= 0) + dust.active = false; + + if (!touchedTiles) + dust.position += dust.velocity; + + return false; + } + public override bool PreDraw(Dust dust) + { + Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f); + Texture2D solidCenter = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle").Value; + + Texture2D bloom = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + + Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(dust.velocity.Length(), 2, 7, 1, 2.5f)); + + // Glow Orb + Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0); + if (dust.alpha < 1) + Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.04f, SpriteEffects.None, 0); + if (!dust.noLight) + { + Main.EntitySpriteDraw(solidCenter, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, solidCenter.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0); + } + return false; + } + } +} diff --git a/Effects/ArsenalEffects.cs b/Effects/ArsenalEffects.cs new file mode 100644 index 0000000000..fbd09d8a21 --- /dev/null +++ b/Effects/ArsenalEffects.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using CalamityMod.CustomRecipes; +using CalamityMod.Dusts; +using CalamityMod.Items.Materials; +using CalamityMod.TileEntities; +using CalamityMod.Tiles.DraedonSummoner; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Effects +{ + public class ArsenalEffects + { + public static int ArsenalDust = 278; // Colorable firework dust, simple and effective. Most visuals use a mix of the energy respective dust and this + + // Plasma + public static int ArsenalPlamaDust = ModContent.DustType(); + public static Color ArsenalPlamaColor = Color.Lerp(Color.Green, Color.Chartreuse, 0.35f); + // Laser + public static int ArsenalLaserDust = ModContent.DustType(); + public static Color ArsenalLaserColor = Color.Lerp(Color.Crimson, Color.Firebrick, 0.35f); + // Pulse + public static int ArsenalPulseDust = ModContent.DustType(); + public static Color ArsenalPulseColor = Color.Lerp(Color.DarkOrchid, Color.Magenta, 0.35f); + // Electric + public static int ArsenalElectricDust = ModContent.DustType(); + public static Color ArsenalElectricColor = Color.Lerp(Color.Aqua, Color.Aquamarine, 0.35f); + // Gauss + public static int ArsenalGaussDust = ModContent.DustType(); + public static Color ArsenalGaussColor = Color.Lerp(Color.Yellow, Color.Goldenrod, 0.35f); + } +} diff --git a/Items/Weapons/DraedonsArsenal/HolofiberImmolator.cs b/Items/Weapons/DraedonsArsenal/HolofiberImmolator.cs index ab7226c2e3..a2ae0bcf56 100644 --- a/Items/Weapons/DraedonsArsenal/HolofiberImmolator.cs +++ b/Items/Weapons/DraedonsArsenal/HolofiberImmolator.cs @@ -41,11 +41,6 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; - //Item.useAmmo = AmmoID.Arrow; - - modItem.UsesCharge = true; - modItem.MaxCharge = 85f; - modItem.ChargePerUse = 0.001f; // Charge depletion is done in the holdout, but it needs a small fee to prevent usage at 0% } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; diff --git a/Items/Weapons/Ranged/BladedgeRailbow.cs b/Items/Weapons/Ranged/BladedgeRailbow.cs index 323cf7ae91..5b3983dd1b 100644 --- a/Items/Weapons/Ranged/BladedgeRailbow.cs +++ b/Items/Weapons/Ranged/BladedgeRailbow.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.DraedonsArsenal; using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; @@ -70,6 +71,8 @@ namespace CalamityMod.Items.Weapons.Ranged ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), // Not ranged ModContent.ProjectileType(), diff --git a/Particles/GlowSquareParticleThick.png b/Particles/GlowSquareParticleThick.png new file mode 100644 index 0000000000000000000000000000000000000000..09dd34cbde6702793a7af80c2a2498d00116f2e1 GIT binary patch literal 6746 zcmZ9QcQ{+&+sC7d8YP0F)JTm~Z5q2qVx?AWic+(!5heDjnNXD0-mzEJUPaX^YQ!w6 zYBg%tXccYW4pa!Gfy#PVsNMj5Vom6r~681H$5Rp_1jg2Bh z*KS>AM^1TSm^o6l9je)v-umy2WG!+33VD*(F}CQu7d+DjdT|~>@m|NAI*hKsoOzkl zhl`JMwxuGY+Xs=mg1%zv>(#EEXk5y;6!hu2YX;K^YeySB&+jv#N#*C=pnrLFYT1MI;2>D?XVGt7Mh>nb_Q^2G zaFJDi&{wU&2m2FZ<{!tHh8g-sKU#`H_)2l?0#-)R@h_R;mdD0)NpXE2#pz|@Z>~su z%3!zPTz(328auaO_IG2igDQNIm6H{B6LIT=O@&&YXC?pgNwtX#-DO8|pY;4R3(2?& zdQ;-qICmQ3_J{>!y+vlw{wHR{Rtywd*NLSM_T*{{vN7yk5q7>^`T4WeJ+izfx5PH~ zPV?wP5f6gK3_BP1*6sWbU&WVM$;&)p==obT*P4o-KVckCHNRBMdtD`j3j`BlI0a?Fvgn)@qx20%KQb#8aV}m(SY;S6@G-8 z)+H8|t$f2W&Wh;G0;i4p8!+$dZJ?`&=6tjZZUk#Nw?)2Mpue@TYcFp36ZSb zgZq-Q+@j&l?@}=2LEzm;{hqY1jOH}T&q^7?z>M;QIB~{n?={qt{P?IDc`IK)iY`4; znSa4m#N8UJl~nrSJ~O4dx`ctwE7~D$mZ%j%YJq71ys!dIWsp;Lcgkc6_L%0FQCH&$ zVT3rk0rD1>XU~Zf)iBG?8o#kozrlDUd&)u?QDFaEB7rSbhf{#1{!%@AJ;!8%Toil% zbGwpS^D6ln&aK$1eNW#!bd_kL2?Pg10x1*{f+KFOcw?GmA6O~s;coYue6_>~V$3j1 zE$nY0U%-3M8Ttt48uJ1_q^H)8a)`~K7QVU{ZCPww=xzKx zdZIznWKKiQSPtP||1|D^VqKG2xDU62SVqUf&S1_kd*jFoeMh6#DeRQSrp2c0RfJRt z#kk?4;sy_wh=yA%v9UR*22?I8e#n#M){O!VBKgMmBgs>{Q|zgNiHM25N#~}(G<^DY zMa}fLGXJt4)2ONWX^p8bz#s}iVnnC>n(D+i_b&n^Zu506HKlU?{Z8i-HMpmYh0}!X(-CI- zAxT}SMYn)CI(WUzJ&8&Q4#}928y_jYwU5Mzj9=5crWQvT$Dsq6e3{YX>X=|TArc`% zE7C5UXTfgXci*jkv-#A;%_GNs(It2w`XQ5xk;|n0VP$oO$ZS*p&v~l@tEJXTlFwMM zyR-X1^MbwaWbR|`hh5#BvwtHZ3L`!gjMz;O-$@W_XMRw|_0!n9Ipz4ODfr7(`^bMg znwjgi*be&io0YZXUgo{H;X?oZ!;{17r1;j&)~8lm*2V60&B*2scSB!m--N)3GjfJt zhFr~;1CgcW&J`rpF=v|@8)yxE&8(~QPt?y_9=!`=?Y)8HF)K{#Mmt_hW@9pQ&C|X^ zV_!U?mTrYMgueI(|HnaQN%lGHTUfcuz`K-Z!Ky|16spsz4B;c;>fK7b7%kfmKVP&T zUM10ze51n0!^U?Ce!YL*lNuGwoj}b%TSFbnX2*mE6T8CNYzM#pc7Q!bSUl}Ga4kQhmy zuT>yLPzmLu`z2Q~VA?8iHDlV`($mtJ;!ZtU-G#iLx0D1rl*rSP(mjo}7)z+n zBpam;C1dJ8*2mTt4QHqASi$*eAa@)Qb8&U;ebRGdQ(?WxIvdH%)l{RGhXOM4zqE3n z=8AjRw$2^s4htRxA9mS1v+TAe-p{}Prpea3m^5^1GG0+!8DO?mBWkJC+3zv(tTD3j z(UVYEgQ&1rP^+kuwSJN*F_Tbx9I|ykjwM#TPX^xNTDE|jhkcT5d9+(nq04>GkDv8k z^}XAuC690JohK{fHujs}g5o55Jru~xj9ZeX?3PRaaiyMKGl_K#1Krllrk zmcQIEHhcT=#N-@mU- z+IQRw*vrN%c~y(O_1JeEpF1Q4jpcm*wXN*`<@mgoc9b>2#=&~KZ4FcI^)4iTmFkRJ zp7I8zLJVh2o0x+2E_<#_&`RuC%A{FGO>X-&%+ADz^Q7f1^sL7htrp&n!S>%9rl-}U zW-s@#&lX;+!Od&A6CJTV{usO~T?fnY%~Wt$VfbM2Xz8Kr&7xBpq4eO#OK?eaU96lYPm^VjO=e6l9%L0Q+Q ze-pcod)}Xp{+O}XIN7AVMTdHQ71?t8*PianB-OfCyLVeTJ!IoI+tH8R(&zelA>_Xz z56=dO3VuLK$z!i&s0#uG2!KFgks#11a4Bp91j34gK%2H8kbF7_#EQvoLn{J5P-C<# zyg(pY$i+!Eu^4g=T;%XpH}^L3aPs!Gd+G>6IJ$cId+``~V;vrO@ECh|xOSH=2Z2Bg zPTELSW54X3MQe|RH4e)CVKIOGOxfz*L3&x0OT28}m#C$ihzGYcWawXjxx;IE1nqRl zyQv{DJL%Cg*kbIL>|W38$Oz@cf1~#n_!3tI^LLTCH9MtL(g}QAkYT zXoA%${_y1;!hUSmdrdmUf+~X_ILt_0j}KqK$Y#^@uXXb83c5#he;pd29Dc{b3wcJw z-iWs2NkMf>>#{|Y^@xZ6qm2=Y6%3wks(R?GHUCs_maNK&6u*ka2h7#aFondw?@nil z#)MHukOeKp?451=x;WVAD1oDXHin%SLMExpRBlZ3-TQim4khqe^60(v2#?h=iVyBI z6Zi6HQ=)aW1!=wPVVQUmXtiQ#)}o%pLcpy52Ka)Z-$_P7yC?t+^;MrE&esE~Of&?Sr65C9Hr>&f^ zebAwGNy!Ylkl*X94w4xka_NX|kO7U(z17hi1>oL|mREOtIC4q4i=j@qiSN=hQI~vt zd<@Esf%ze4JIyV*OEFt*EiEl!tFrrw9;bBNPLVKR%f>FR)I z$!>ie>Zpf7`Rn<4kgM9{TApORz2Ji@Kct*L|6Qu;&R!wu2ImM+rN_2nqV3*ctryuJslKSllj)m zW104%YE|&(nvU-D%+4JM8Dx^f+nPb(RVs>q?a=@2@yz{uQLxXWeb)&dU4O2L*}PS0 zUQjQc1dvos@1;{E&d0lr_i|>aFXdww=E9B_mcx#NaxTy9Fp5|SrKpLf(T++kwP9~} zg4KzmN+IWLf`Wp8XbG#Ay(D^rjxER_?>+W0vYc7c>M~h$ALOHCXb3B~O{w2j>KD`= z{8p@(76M5B0x;_kwXv~r1uy_amkT_r+v<5pSLjZPQP^BJ5u3wHXvN`+f#`3w5(T2v zpOoX!=*7T&xA%}VMs$%jsF@``ZVbO&3a-v9d1TL9CrrE7dFEaxM4WvP8o#<~KedIO zdfdo^tP)^m^~?cFq@MzEr_rFRO%e5T*==Jeg!j{@;g;2u3r$2DqD1?T4Dm|Gcm{G_#}Woei~)ej)fvu9xKx^y75Qj zv>*s1A0Eikz5kP?`R^jLUujkV!!pX--yd&U*#|~f!G(}j$Rf2BM6XZ6%(Ir=Y**a% zcuG+*F$=s)J6p5_y#Dy-&VnItof}8IhW+N<+Q>4~N+4#$k<1EcJcJ$EE2;br4PdNbBLeLZHEQI|dOs;u;b@B-q zzog#_P7)egkmF)PPvF7$S}%MhQc(ap4dI5GLJi}AEfgstS7g>%;?$eGUTF;>dQnJi zR!3ZK5HxqCq#B}*0|H(dUVmrCCm{uA94CoH2{9((wHnJ14h!(jCAClg%h{g>lk?2LM2k+nZn! zV*uj$%cu*n;ba#K?r~q_F7Q`? zqe^3>fE&Mxfdv&n0DrBaxd0eZ@)zc>po1 zC9~wwI5_iy+<&+zf~k39Fye5ZgdI)*9~z(~@;g`?RJ-krbGhMAZ_&sL>_vM32vV9* z{f4ftF?%RMJu0*@b^>*=u!?xu#E0XrPb=Lr*3Wp|tNHe)%&5$C$lul(;^3d`N( z)j*snfdDWS0kh{WDiP4zAdt25={^aiE!rvny##m`8-2_LVfOza%n=ysy^2uGM!Yl7 ziyVS7PSJXvV~=y$iWJLe)Zv#`ROHN>8}dnLN^r%^ROCEqv{Y2ktc|OH-0~m+X#p_H z*yYM^0^ugSe8~g=Z>L!g3QxH4>hs-fE@ighMKjWa&8vRNEJ$N&c#L4ubRS z2q~!2$qx>auoP68vC!ZXQbIz)K9JE1Ccoz|y7yqM{c``))rDY^RRy#%OGb`Qh%T3b z#`dhn%dckvzIS+^s&3Db8E7!*dct0Bjbm?=8w*_laDKnD&|7d27rK_{|ni6LCdBP`M+M5rdf zIh%RlI_6QPszTa`Q__f&=hlo!Iap+B6v&>&l_ut?jo!G< z-`_aSfszIIv%B1lk;^kPFjxPlw&&jYFj!$^ZIr3+pl3L{F}LM@h3u@aHIK6il(EQI zC<-__Iy!*bN-Wf*UCe{g4@Z~T)Qlar9ey{70d zipE`}OA-c4)Ew9-fgWsV{a_*m=VHXk#q}O*{nr1`X**oO&WIOy|HCF!+uR(ZRsaf1 z!8J{qJqV_l#d`Yqz~RM$+w~ts0?R@+8AwyNeMde_16Z_4+wv`(p0(I=B=P=&pVTaRHsL zf`S6TP1nD_?Xe`4qA5~dXhKL=;^d?e&_H^(FJ>j;d%t#AiL!p|8JE5qdj3Q6^MZcS zl#BFx!Mvbwo0^!zLoeBc2%8$;KeyaL-CsL&1R{d&CZdYN0pDCiGthh+Iz$pTLdk$< z44`4xY+i_RTL2z2fM!l6M$5Qx--^!jxkILt__FqAvyZ+RmiwWHcD-)w%W~3a`kS$j zEh?|iHzbVRNmzgVwCt0~@U=4!Kjojn%IPZe-@Pw*memt4IGSgqRr7PoPmfC)BP9(w zyg(J_Z=FuXsz2?qqhZj0ur?SSb1HTq`-32S=oDGXB77=a`(=M@xGK~_Xy(@0iQ^JU zy@~fcRHpjoTkbKMq^-7YtCsR(TMZoY_{!L@RpDKbCWbox)cR2+-Y5$#7UA^LwZm!3? zV{V*hRcW;=)QtXCi&pN!mf6;)O3Y=7JeG`ncy_Ikfhubqv>rF zLA(CvtpCSMe9+|IAbXsE%ytP2lUr7l8WK7AKc%E7lq{ZD((unJc?Wnf2WhM8Az!Q6 GhW{6*lFW$! literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/HolofiberImmolatorHoldout.cs b/Projectiles/DraedonsArsenal/HolofiberImmolatorHoldout.cs index 93e6c4f824..0321d38bd4 100644 --- a/Projectiles/DraedonsArsenal/HolofiberImmolatorHoldout.cs +++ b/Projectiles/DraedonsArsenal/HolofiberImmolatorHoldout.cs @@ -19,12 +19,10 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override float OffsetXUpwards => -0f; public override float BaseOffsetY => -0f; public override float OffsetYDownwards => 0f; + public override float WeaponTurnSpeed => 0.45f; - public static int FramesPerLoad = 13; - public static int MaxLoadableShots = 15; public static float BulletSpeed = 12f; public SlotId ChargeSlot; - public Color mainColor = Color.Lerp(Color.Chartreuse, Color.White, 0.35f); public int time = 0; public ref float CurrentChargingFrames => ref Projectile.ai[0]; @@ -80,15 +78,11 @@ namespace CalamityMod.Projectiles.DraedonsArsenal for (int i = 0; i <= 25; i++) { - Dust dust = Dust.NewDustPerfect(GunTipPosition - Projectile.velocity * 15, 267, shootVelocity.RotatedByRandom(MathHelper.ToRadians(15f)) * Main.rand.NextFloat(0.2f, 1.2f), 0, default, Main.rand.NextFloat(0.5f, 1.3f)); + Dust dust = Dust.NewDustPerfect(GunTipPosition - Projectile.velocity * 15, Effects.ArsenalEffects.ArsenalPlamaDust, shootVelocity.RotatedByRandom(MathHelper.ToRadians(15f)) * Main.rand.NextFloat(0.2f, 1.2f), 0, default, Main.rand.NextFloat(0.5f, 1.3f)); dust.noGravity = true; - dust.color = mainColor; + dust.color = Effects.ArsenalEffects.ArsenalPlamaColor; } CurrentChargingFrames = 0; - if (modItem.Charge > 0) - modItem.Charge -= 0.06f; - else - Projectile.Kill(); } // Spread Fire mode else @@ -105,15 +99,12 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } for (int i = 0; i <= 4; i++) { - Dust dust = Dust.NewDustPerfect(GunTipPosition - Projectile.velocity * 15, 267, shootVelocity.RotatedByRandom(MathHelper.ToRadians(15f)) * Main.rand.NextFloat(0.9f, 1.2f), 0, default, Main.rand.NextFloat(0.4f, 1.1f)); - dust.noGravity = true; - dust.color = mainColor; + Dust dust = Dust.NewDustPerfect(GunTipPosition - Projectile.velocity * 15, Effects.ArsenalEffects.ArsenalPlamaDust, shootVelocity.RotatedByRandom(MathHelper.ToRadians(15f)) * Main.rand.NextFloat(0.9f, 1.2f), 0, default, Main.rand.NextFloat(0.8f, 1.3f)); + dust.noGravity = false; + dust.color = Effects.ArsenalEffects.ArsenalPlamaColor; + dust.fadeIn = 2; } CurrentChargingFrames = 0; - if (modItem.Charge > 0) - modItem.Charge -= 0.025f; - else - Projectile.Kill(); } } else if (downtime == 0) @@ -124,7 +115,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal { float particleScale = Utils.GetLerpValue(0, chargeMax, CurrentChargingFrames, true); float strength = particleScale; - Vector3 DustLight = mainColor.ToVector3(); + Vector3 DustLight = Effects.ArsenalEffects.ArsenalPlamaColor.ToVector3(); Lighting.AddLight(GunTipPosition, DustLight * strength); } @@ -134,11 +125,11 @@ namespace CalamityMod.Projectiles.DraedonsArsenal ChargeSound?.Stop(); for (int i = 0; i < 20; i++) { - Dust chargefull = Dust.NewDustPerfect(GunTipPosition, 278); + Dust chargefull = Dust.NewDustPerfect(GunTipPosition, Effects.ArsenalEffects.ArsenalDust); chargefull.velocity = (MathHelper.TwoPi * i / 20f).ToRotationVector2() * 4f + Owner.velocity * 0.5f; chargefull.scale = Main.rand.NextFloat(0.6f, 0.8f); chargefull.noGravity = false; - chargefull.color = mainColor; + chargefull.color = Effects.ArsenalEffects.ArsenalPlamaColor; } SoundStyle sound = new("CalamityMod/Sounds/Item/ImmolatorChargeLoop"); ChargeSlot = SoundEngine.PlaySound(sound with { Volume = 0.7f, IsLooped = true }, Projectile.Center); @@ -146,11 +137,11 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (CurrentChargingFrames > chargeMax && Main.rand.NextBool()) { - Dust chargefull = Dust.NewDustPerfect(GunTipPosition, 278); + Dust chargefull = Dust.NewDustPerfect(GunTipPosition, Effects.ArsenalEffects.ArsenalDust); chargefull.velocity = Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(5, 9); chargefull.scale = Main.rand.NextFloat(0.2f, 0.4f); chargefull.noGravity = true; - chargefull.color = mainColor; + chargefull.color = Effects.ArsenalEffects.ArsenalPlamaColor; } } @@ -193,10 +184,10 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (CurrentChargingFrames > 0 && downtime == 0) { float randSize = Main.rand.NextFloat(0.8f, 1.2f); - Main.EntitySpriteDraw(rechargeTexture, tipPosition - Main.screenPosition, null, mainColor with { A = 0 }, Projectile.rotation, rechargeTexture.Size() * 0.5f, 0.25f * Utils.GetLerpValue(0, chargeMax, CurrentChargingFrames, true) * randSize, SpriteEffects.None, 0); + Main.EntitySpriteDraw(rechargeTexture, tipPosition - Main.screenPosition, null, Effects.ArsenalEffects.ArsenalPlamaColor with { A = 0 }, Projectile.rotation, rechargeTexture.Size() * 0.5f, 0.25f * Utils.GetLerpValue(0, chargeMax, CurrentChargingFrames, true) * randSize, SpriteEffects.None, 0); Main.EntitySpriteDraw(rechargeTexture, tipPosition - Main.screenPosition, null, Color.White with { A = 0 }, Projectile.rotation, rechargeTexture.Size() * 0.5f, 0.15f * Utils.GetLerpValue(0, chargeMax, CurrentChargingFrames, true) * randSize, SpriteEffects.None, 0); - Main.EntitySpriteDraw(pointTexture, tipPosition - Main.screenPosition + (Projectile.velocity * 15 * fade), null, mainColor with { A = 0 } * fade, Projectile.velocity.RotatedBy(MathHelper.ToRadians(90f)).ToRotation(), pointTexture.Size() * 0.5f, new Vector2(0.5f, 0.9f) * 0.035f * fade * randSize * (CurrentChargingFrames == chargeMax ? 1.5f : 1), flipSprite); + Main.EntitySpriteDraw(pointTexture, tipPosition - Main.screenPosition + (Projectile.velocity * 15 * fade), null, Effects.ArsenalEffects.ArsenalPlamaColor with { A = 0 } * fade, Projectile.velocity.RotatedBy(MathHelper.ToRadians(90f)).ToRotation(), pointTexture.Size() * 0.5f, new Vector2(0.5f, 0.9f) * 0.035f * fade * randSize * (CurrentChargingFrames == chargeMax ? 1.5f : 1), flipSprite); } return false; } diff --git a/Projectiles/DraedonsArsenal/ImmolationArrow.cs b/Projectiles/DraedonsArsenal/ImmolationArrow.cs index 1ce4b8c049..63426edb7b 100644 --- a/Projectiles/DraedonsArsenal/ImmolationArrow.cs +++ b/Projectiles/DraedonsArsenal/ImmolationArrow.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Weapons.DraedonsArsenal; +using CalamityMod.Dusts; +using CalamityMod.Items.Weapons.DraedonsArsenal; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -15,7 +16,6 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public new string LocalizationCategory => "Projectiles.Misc"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public ref float time => ref Projectile.ai[0]; - public Color mainColor = Color.Lerp(Color.Chartreuse, Color.White, 0.35f); public NPC chosenTarget; public bool stuckInTarget = false; @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Ranged; Projectile.timeLeft = 180; - Projectile.extraUpdates = 2; + Projectile.extraUpdates = 4; Projectile.penetrate = -1; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; @@ -70,6 +70,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (stuckInGround) { + Projectile.extraUpdates = 2; Projectile.rotation = storedVelocity.ToRotation() + MathHelper.PiOver2; stuckTimer--; @@ -86,38 +87,31 @@ namespace CalamityMod.Projectiles.DraedonsArsenal { if (Main.rand.NextBool(3) && canStick) { - Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(6) ? 278 : 263, -Projectile.velocity); - dust.scale = dust.type == 278 ? Main.rand.NextFloat(0.3f, 0.6f) : Main.rand.NextFloat(0.6f, 1.4f); + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(6) ? Effects.ArsenalEffects.ArsenalDust : Effects.ArsenalEffects.ArsenalPlamaDust, -Projectile.velocity); + dust.scale = dust.type == Effects.ArsenalEffects.ArsenalDust ? Main.rand.NextFloat(0.3f, 0.6f) : Main.rand.NextFloat(0.6f, 1.4f); dust.velocity = -Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.1f, 0.7f); dust.noGravity = true; - dust.color = mainColor; + dust.color = Effects.ArsenalEffects.ArsenalPlamaColor; } if (targetDist < 1400f) { - Particle spark = new SparkParticle(Projectile.Center, -Projectile.velocity, false, 6, 1.3f, mainColor * 0.7f); + Particle spark = new SparkParticle(Projectile.Center, -Projectile.velocity, false, 13, 1.3f, Effects.ArsenalEffects.ArsenalPlamaColor * 0.7f); GeneralParticleHandler.SpawnParticle(spark); if (Main.rand.NextBool(6)) { Vector2 placement = Projectile.Center + Main.rand.NextVector2Circular(12, 12); float speed = Main.rand.NextFloat(0.2f, 0.7f); - Particle spark2 = new GlowOrbParticle(placement, -Projectile.velocity * speed, false, 7, Main.rand.NextFloat(0.4f, 0.7f), mainColor); + Particle spark2 = new GlowOrbParticle(placement, -Projectile.velocity * speed, false, 7, Main.rand.NextFloat(0.4f, 0.7f), Effects.ArsenalEffects.ArsenalPlamaColor); GeneralParticleHandler.SpawnParticle(spark2); } } - if (closestTarget != null && Projectile.numHits < 1 && closestTarget.CanBeChasedBy(Projectile)) - { - Vector2 moveTotarget = (closestTarget.Center - Projectile.Center).SafeNormalize(Vector2.UnitX); - if (Projectile.velocity.Length() < 20) - Projectile.velocity = Projectile.velocity * 0.95f + moveTotarget * 0.28f; - else - Projectile.velocity *= 0.8f; - } } } else if (stuckInTarget) { + Projectile.extraUpdates = 2; Projectile.rotation = (storedVelocity).SafeNormalize(Vector2.UnitX).ToRotation() + MathHelper.PiOver2; placementCenter = chosenTarget.Center + placementVelocity * placementDistance; @@ -139,16 +133,16 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (Main.rand.NextBool(8)) { float speed = Main.rand.NextFloat(0.2f, 1.5f); - Particle spark = new SparkParticle(Projectile.Center, -storedVelocity * speed, false, 23, 0.7f * speed, mainColor * 0.7f); + Particle spark = new SparkParticle(Projectile.Center, -storedVelocity * speed, false, 23, 0.7f * speed, Effects.ArsenalEffects.ArsenalPlamaColor * 0.7f); GeneralParticleHandler.SpawnParticle(spark); } if (Main.rand.NextBool()) { - Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(6) ? 278 : 263, -Projectile.velocity); - dust.scale = dust.type == 278 ? Main.rand.NextFloat(0.3f, 0.6f) : Main.rand.NextFloat(0.6f, 1.4f); + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(6) ? Effects.ArsenalEffects.ArsenalDust : ModContent.DustType(), -Projectile.velocity); + dust.scale = dust.type == Effects.ArsenalEffects.ArsenalDust ? Main.rand.NextFloat(0.3f, 0.6f) : Main.rand.NextFloat(0.6f, 1.4f); dust.velocity = (new Vector2(35, 35).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 0.7f)) * Utils.GetLerpValue(90, 0, stuckTimer); dust.noGravity = true; - dust.color = mainColor; + dust.color = Effects.ArsenalEffects.ArsenalPlamaColor; } } time++; @@ -189,14 +183,15 @@ namespace CalamityMod.Projectiles.DraedonsArsenal stuckInTarget = true; storedVelocity = Projectile.velocity; Projectile.velocity = Vector2.Zero; - for (int i = 0; i <= 11; i++) + for (int i = 0; i < 12; i++) { - int dustStyle = Main.rand.NextBool() ? 66 : 263; + int dustStyle = Effects.ArsenalEffects.ArsenalPlamaDust; Dust dust = Dust.NewDustPerfect(Projectile.Center + storedVelocity.SafeNormalize(Vector2.UnitX) * 38 + Main.rand.NextVector2Circular(12, 12), dustStyle, Projectile.velocity); - dust.scale = Main.rand.NextFloat(0.7f, 1.1f); - dust.velocity = storedVelocity.RotatedByRandom(0.2f) * Main.rand.NextFloat(0.8f, 2.1f); - dust.noGravity = true; - dust.color = mainColor; + dust.scale = Main.rand.NextFloat(0.7f, 1.3f); + dust.velocity = storedVelocity.RotatedByRandom(0.2f) * Main.rand.NextFloat(0.4f, 1.5f); + dust.noGravity = false; + dust.color = Effects.ArsenalEffects.ArsenalPlamaColor; + dust.fadeIn = 1.5f; } SoundStyle sound = new("CalamityMod/Sounds/Item/ImmolatorPreExplode"); SoundEngine.PlaySound(sound with { Volume = 0.3f, Pitch = 0.5f }, Projectile.Center); @@ -205,15 +200,27 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } public override void OnKill(int timeLeft) { - float bonus = (stuckInGround ? 2f : 1); + float bonus = (stuckInGround ? 3f : 1.5f); float explosionDamage = (stuckInGround ? 2.3f : 0.5f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * explosionDamage), Projectile.knockBack * 2, Projectile.owner, 0, bonus != 1 ? 1 : 0); - Particle bolt2 = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor * 0.75f, "CalamityMod/Particles/BloomRing", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 1.2f * bonus, 26); + Projectile blast = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * explosionDamage), Projectile.knockBack * 2, Projectile.owner, 0, stuckInGround ? 1 : 0); + blast.scale = (stuckInGround ? 2 : 1); + Particle bolt2 = new CustomPulse(Projectile.Center, Vector2.Zero, Effects.ArsenalEffects.ArsenalPlamaColor * 0.75f, "CalamityMod/Particles/BloomRing", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 1.2f * bonus, 26); GeneralParticleHandler.SpawnParticle(bolt2); - Particle bolt3 = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor * 0.75f, "CalamityMod/Particles/PlasmaExplosion", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.07f * bonus, 14); + Particle bolt3 = new CustomPulse(Projectile.Center, Vector2.Zero, Effects.ArsenalEffects.ArsenalPlamaColor * 0.75f, "CalamityMod/Particles/WaterFoam", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.77f * bonus, 16); GeneralParticleHandler.SpawnParticle(bolt3); + for (int i = 0; i < (int)(15 * bonus); i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(6) ? Effects.ArsenalEffects.ArsenalDust : stuckInGround ? ModContent.DustType() : Effects.ArsenalEffects.ArsenalPlamaDust, -Projectile.velocity); + dust.scale = dust.type == Effects.ArsenalEffects.ArsenalDust ? Main.rand.NextFloat(0.3f, 0.6f) : Main.rand.NextFloat(0.9f, 1.8f); + dust.velocity = (new Vector2(35, 35).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 0.7f)) * Utils.GetLerpValue(90, 0, stuckTimer); + dust.noGravity = false; + dust.color = Effects.ArsenalEffects.ArsenalPlamaColor; + if (dust.type == Effects.ArsenalEffects.ArsenalPlamaDust) + dust.fadeIn = 2f; + } + SoundStyle sound = new("CalamityMod/Sounds/Item/PlasmaBig"); SoundEngine.PlaySound(sound with { Volume = 1f, Pitch = Main.rand.NextFloat(-0.1f, 0.1f) }, Projectile.Center); } @@ -226,14 +233,17 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Asset tex = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/ImmolationArrow"); if (!stuckInGround && !stuckInTarget && false) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], mainColor with { A = 0 }, 1, tex.Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Effects.ArsenalEffects.ArsenalPlamaColor with { A = 0 }, 1, tex.Value); - float randSize = Main.rand.NextFloat(0.7f, 1.2f); - for (int i = 0; i < 3; i++) + float randSize = Main.rand.NextFloat(0.8f, 1.1f); + for (int i = 0; i < 20; i++) { - Vector2 scale = Projectile.scale * new Vector2(0.5f * (1 - i * 0.25f), 1) * 1.5f * (1 - i * 0.3f) * randSize; - Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, mainColor with { A = 0 } * 0.5f, Projectile.rotation, tex.Size() * 0.5f, scale, SpriteEffects.None); + Vector2 scale = Projectile.scale * new Vector2(0.5f, 1) * 1.5f * randSize; + Vector2 drawOffset = (MathHelper.TwoPi * i / 20f).ToRotationVector2() * 3; + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + drawOffset, null, Effects.ArsenalEffects.ArsenalPlamaColor with { A = 0 } * 0.2f, Projectile.rotation, tex.Size() * 0.5f, scale, SpriteEffects.None); } + Vector2 scale2 = 1.1f * new Vector2(0.5f, 1) * 1.5f * randSize; + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, Effects.ArsenalEffects.ArsenalPlamaColor with { A = 0 } * 0.5f, Projectile.rotation, tex.Size() * 0.5f, scale2, SpriteEffects.None); if (stuckInTarget || stuckInGround) { Vector2 scale = 1.1f * new Vector2(0.5f, 1) * 1.5f * randSize; diff --git a/Projectiles/DraedonsArsenal/ImmolationBurst.cs b/Projectiles/DraedonsArsenal/ImmolationBurst.cs index f73a3757d3..21557b8120 100644 --- a/Projectiles/DraedonsArsenal/ImmolationBurst.cs +++ b/Projectiles/DraedonsArsenal/ImmolationBurst.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public override void SetDefaults() { - Projectile.width = Projectile.height = 150; + Projectile.width = Projectile.height = 235; Projectile.friendly = true; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Ranged; @@ -26,10 +26,10 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } 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 minMult = 0.25f; + int hitsToMinMult = (int)(5 * Projectile.scale); + float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); + modifiers.SourceDamage *= damageMult; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * 0.5f * Projectile.scale, targetHitbox); } diff --git a/Projectiles/DraedonsArsenal/ImmolationSpray.cs b/Projectiles/DraedonsArsenal/ImmolationSpray.cs index 8cde23aa2c..0a74eccc65 100644 --- a/Projectiles/DraedonsArsenal/ImmolationSpray.cs +++ b/Projectiles/DraedonsArsenal/ImmolationSpray.cs @@ -15,7 +15,6 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public new string LocalizationCategory => "Projectiles.Misc"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public ref float time => ref Projectile.ai[0]; - public Color mainColor = Color.Lerp(Color.Chartreuse, Color.White, 0.35f); public override void SetStaticDefaults() { ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; @@ -47,14 +46,14 @@ namespace CalamityMod.Projectiles.DraedonsArsenal { Vector2 placement = Projectile.Center + Main.rand.NextVector2Circular(8, 8); float speed = Main.rand.NextFloat(0.2f, 0.7f); - Particle spark = new GlowOrbParticle(placement, -Projectile.velocity * speed, false, 7, Main.rand.NextFloat(0.4f, 0.7f), mainColor); + Particle spark = new GlowOrbParticle(placement, -Projectile.velocity * speed, false, 7, Main.rand.NextFloat(0.4f, 0.7f), Effects.ArsenalEffects.ArsenalPlamaColor); GeneralParticleHandler.SpawnParticle(spark); - Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(6) ? 278 : 263, -Projectile.velocity); - dust.scale = dust.type == 278 ? Main.rand.NextFloat(0.2f, 0.5f) : Main.rand.NextFloat(0.4f, 1.1f); + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(6) ? Effects.ArsenalEffects.ArsenalDust : Effects.ArsenalEffects.ArsenalPlamaDust, -Projectile.velocity); + dust.scale = dust.type == Effects.ArsenalEffects.ArsenalDust ? Main.rand.NextFloat(0.2f, 0.5f) : Main.rand.NextFloat(0.4f, 1.1f); dust.velocity = (new Vector2(3, 3).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 0.7f)); dust.noGravity = true; - dust.color = mainColor; + dust.color = Effects.ArsenalEffects.ArsenalPlamaColor; } } time++; @@ -74,8 +73,16 @@ namespace CalamityMod.Projectiles.DraedonsArsenal float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); if (targetDist < 1400) { - Particle spark = new GlowOrbParticle(Projectile.Center + oldVelocity.SafeNormalize(Vector2.UnitX) * 11, Projectile.velocity * 0.001f, false, 60, 1.6f, mainColor); - GeneralParticleHandler.SpawnParticle(spark); + Vector2 vel = oldVelocity.SafeNormalize(Vector2.UnitX); + int dustStyle = Effects.ArsenalEffects.ArsenalPlamaDust; + for (int i = 0; i < 6; i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center + vel * 5, dustStyle, (-vel * Main.rand.NextFloat(5, 8)).RotatedByRandom(0.7f)); + dust.scale = Main.rand.NextFloat(0.7f, 1.3f); + dust.noGravity = false; + dust.color = Effects.ArsenalEffects.ArsenalPlamaColor; + dust.fadeIn = 1.2f; + } } return true; } @@ -86,10 +93,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Asset tex = ModContent.Request("CalamityMod/Particles/GlowSpark"); - //CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], mainColor with { A = 0 } * 0.3f, 1, tex.Value); float squash = Utils.GetLerpValue(-3, 10, Projectile.velocity.Length(), true); for (int i = 0; i < 2; i++) - Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, mainColor with { A = 0 } * 0.6f, Projectile.rotation, tex.Size() * 0.5f, new Vector2(0.4f, squash) * 0.045f * (i == 0 ? 0.6f : 1), SpriteEffects.None); + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, Effects.ArsenalEffects.ArsenalPlamaColor with { A = 0 } * 0.6f, Projectile.rotation, tex.Size() * 0.5f, new Vector2(0.4f, squash) * 0.045f * (i == 0 ? 0.6f : 1), SpriteEffects.None); return false; } } From 502eabd1baf5f84883c10fb28639553139d3b081 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Sat, 22 Mar 2025 00:54:30 -0400 Subject: [PATCH 22/22] Farewell Lilac --- Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs index 0969ede8cc..fbe8783d5f 100644 --- a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs @@ -73,7 +73,6 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings "HaguriHat", "Heart Plus Up!", "Hugekraken", - "Lilac Olligoci", "LordMetarex", "Memes", "Mercutio 'Merkalto' Takle", @@ -146,6 +145,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings "L0st", "Leon", "Leviathan", + "Lilac Olligoci", "Lompl Allimath", "Lucille Karma", "MarieArk",