Manual merge: Mega Profaned Branch

This commit is contained in:
Ozzatron committed 2024-11-13 16:36:39 -05:00
commit 05ff9be7aa
304 files changed
+6661 -4461

No files matched your search

+100 -98
View File
@@ -1,9 +1,9 @@
using CalamityMod.Items.Weapons.Ranged;
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.NPCs.AstrumAureus;
using CalamityMod.NPCs.CeaselessVoid;
using CalamityMod.NPCs.Crabulon;
using CalamityMod.NPCs.ExoMechs.Apollo;
using CalamityMod.NPCs.ExoMechs.Artemis;
using CalamityMod.NPCs.OldDuke;
using CalamityMod.NPCs.ProfanedGuardians;
using CalamityMod.NPCs.Providence;
@@ -17,8 +17,7 @@ using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Summon.MirrorofKalandraMinions;
using CalamityMod.Projectiles.Typeless;
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -95,7 +94,7 @@ namespace CalamityMod.Balancing
#region Desert Scourge
// 25% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DesertScourgeIDs, Do(ResistTrueMelee(0.75f))));
NPCSpecificBalancingChanges.AddRange(Bundle(DesertScourgeIDList.List, Do(ResistTrueMelee(0.75f))));
#endregion
#region Crabulon
@@ -113,18 +112,18 @@ namespace CalamityMod.Balancing
#region Eater of Worlds
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.EaterofWorldsIDs, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(EaterOfWorldsIDList.List, Do(ResistTrueMelee(0.5f))));
// 50% resist to Demon Scythe.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.EaterofWorldsIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
NPCSpecificBalancingChanges.AddRange(Bundle(EaterOfWorldsIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
// 40% resist to Sky Glaze.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.EaterofWorldsIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<StickyFeather>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(EaterOfWorldsIDList.List, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<StickyFeather>()))));
#endregion
#region The Perforators
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.PerforatorIDs, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(PerforatorWormIDList.List, Do(ResistTrueMelee(0.5f))));
#endregion
#region Wall of Flesh
@@ -134,56 +133,56 @@ namespace CalamityMod.Balancing
#region Aquatic Scourge
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(ResistTrueMelee(0.5f))));
// 50% resist to Adamantite Throwing Axe's lightning.
// Twisting Thunder and Gael's Greatsword use this projectile too, but they are far beyond progression, so who cares!
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
// 50% resist to Dormant Brimseeker.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
// 50% resist to Mounted Scanner.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<MountedScannerLaser>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<MountedScannerLaser>()))));
// 40% resist to Cryophobia.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<CryoBlast>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<CryoBlast>()))));
// 40% resist to SHPC.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<SHPExplosion>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<SHPExplosion>()))));
// 30% resist to Meowthrower.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
// 25% resist to Snowstorm Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
#endregion
#region The Destroyer
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(ResistTrueMelee(0.5f))));
// 50% resist to Adamantite Throwing Axe's lightning.
// See Aquatic Scourge comment.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
// 50% resist to Aftershock's rocks.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AftershockRock>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AftershockRock>()))));
// 50% resist to Dormant Brimseeker.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
// 45% resist to Mounted Scanner.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<MountedScannerLaser>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<MountedScannerLaser>()))));
// 30% resist to Meowthrower.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
// 25% resist to Avalanche's Ice Bombs and shards.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<IceBombFriendly>(), ProjectileType<FrostShardFriendly>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<IceBombFriendly>(), ProjectileType<FrostShardFriendly>()))));
// 25% resist to Snowstorm Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
#endregion
#region Astrum Aureus
@@ -209,28 +208,28 @@ namespace CalamityMod.Balancing
#region Ravager
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(ResistTrueMelee(0.5f))));
// 50% resist to Aegis Blade's explosions because the true melee resist ain't enough.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AegisBlast>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AegisBlast>()))));
// 50% resist to Icicle Arrows.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<IcicleArrowProj>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<IcicleArrowProj>()))));
// 35% resist to Flying Dragon.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2SquireSonicBoom))));
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2SquireSonicBoom))));
// 30% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
// 30% resist to Flak Kraken.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
// 25% resist to Lucrecia.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<DNA>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<DNA>()))));
// 20% resist to The Hive.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<HiveNuke>(), ProjectileType<HiveMissile>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<HiveNuke>(), ProjectileType<HiveMissile>()))));
#endregion
#region Lunatic Cultist
@@ -249,37 +248,37 @@ namespace CalamityMod.Balancing
#region Astrum Deus
// 75% resist to Plaguenades.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.25f, ProjectileType<PlaguenadeBee>(), ProjectileType<PlaguenadeProj>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.25f, ProjectileType<PlaguenadeBee>(), ProjectileType<PlaguenadeProj>()))));
// 70% resist to Charged Blaster Cannon.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.ChargedBlasterLaser))));
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.ChargedBlasterLaser))));
// 70% resist to Stardust Dragon Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
// 65% resist to Atlantis (Atlantis gaming!).
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<AtlantisSpear>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<AtlantisSpear>()))));
// 55% resist to Flak Kraken.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.45f, ProjectileType<FlakKrakenProjectile>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.45f, ProjectileType<FlakKrakenProjectile>()))));
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(ResistTrueMelee(0.5f))));
// 50% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AuroraFire>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AuroraFire>()))));
// 35% resist to Aerial Bane.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2BetsyArrow))));
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2BetsyArrow))));
// 35% resist to Ballistic Poison Bomb's clouds.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<BallisticPoisonCloud>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<BallisticPoisonCloud>()))));
// 35% resist to Icicle Arrows.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<IcicleArrowProj>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<IcicleArrowProj>()))));
// 20% resist to Cluster Rocket fragments.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.ClusterFragmentsI, ProjectileID.ClusterFragmentsII))));
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.ClusterFragmentsI, ProjectileID.ClusterFragmentsII))));
#endregion
#region Moon Lord
@@ -313,28 +312,28 @@ namespace CalamityMod.Balancing
#region Storm Weaver
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(ResistTrueMelee(0.5f))));
// 50% resist to Dazzling Stabber Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DazzlingStabber>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DazzlingStabber>()))));
// 50% resist to Last Prism.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.LastPrismLaser))));
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.LastPrismLaser))));
// 50% resist to Legion of Celestia.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<CelestialAxeMinion>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<CelestialAxeMinion>()))));
// 50% resist to Pristine Fury's alt fire.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<PristineSecondary>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<PristineSecondary>()))));
// 50% resist to Tactician's Trump Card's explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TacticiansElectricBoom>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TacticiansElectricBoom>()))));
// 35% resist to Event Horizon.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<EventHorizonStar>(), ProjectileType<EventHorizonBlackhole>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<EventHorizonStar>(), ProjectileType<EventHorizonBlackhole>()))));
// 25% resist to Molten Amputator's blobs.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<MoltenBlobThrown>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<MoltenBlobThrown>()))));
#endregion
#region Old Duke
@@ -344,19 +343,22 @@ namespace CalamityMod.Balancing
#region The Devourer of Gods
// 65% resist to Wave Pounder.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<WavePounderBoom>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<WavePounderBoom>()))));
// 35% resist to Venusian Trident.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<VenusianBolt>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<VenusianBolt>()))));
// 35% resist to Sulphuric Acid Cannon's Explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<SulphuricAcidCannonExplosion>()))));
// 25% resist to Corinth Prime's Grenades.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<CorinthPrimeAirburst>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<CorinthPrimeAirburst>()))));
// 20% resist to Valediction's typhoons; will catch Nuclear Fury as well but that doesn't matter.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NuclearFuryProjectile>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NuclearFuryProjectile>()))));
// 15% vulnerability to Time Bolt stealth strikes.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new StealthStrikeBalancingRule(1.15f, ProjectileType<TimeBoltKnife>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new StealthStrikeBalancingRule(1.15f, ProjectileType<TimeBoltKnife>()))));
#endregion The Devourer of Gods
#region Yharon
@@ -366,31 +368,31 @@ namespace CalamityMod.Balancing
#region Exo Mechs: Ares
// 30% resist to Dynamic Pursuer.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
// 25% resist to Aetherflux Cannon.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<PhasedGodRay>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<PhasedGodRay>()))));
// 25% resist to Prismatic Breaker's deathray.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<PrismaticRay>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<PrismaticRay>()))));
// 20% resist to the Spin Throw part of the Ark of the Cosmos' combo.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, AotCThrowCombo))));
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, AotCThrowCombo))));
// 20% resist to Dragon Rage projectiles.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, DragonRageFilter))));
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, DragonRageFilter))));
// 20% resist to Eclipse's Fall.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<EclipsesSmol>(), ProjectileType<EclipsesFallMain>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<EclipsesSmol>(), ProjectileType<EclipsesFallMain>()))));
// 20% resist to Rancor.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<RancorLaserbeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<RancorLaserbeam>()))));
// 20% resist to Yharim's Crystal.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<YharimsCrystalBeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<YharimsCrystalBeam>()))));
// 20% resist to Zenith.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.FinalFractal))));
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.FinalFractal))));
#endregion
#region Exo Mechs: Artemis and Apollo
@@ -402,97 +404,97 @@ namespace CalamityMod.Balancing
#region Exo Mechs: Thanatos
// 65% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(ResistTrueMelee(0.35f))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(ResistTrueMelee(0.35f))));
// 65% resist to The Enforcer's projectiles.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<EssenceFlame2>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<EssenceFlame2>()))));
// 65% resist to The Final Dawn's lunge.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<FinalDawnThrow2>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<FinalDawnThrow2>()))));
// 65% resist to Stellar Torus Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<StellarTorusBeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<StellarTorusBeam>()))));
// 60% resist to Dynamic Pursuer.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
// 50% resist to Chicken Cannon.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<ChickenExplosion>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<ChickenExplosion>()))));
// 50% resist to Omicron's beam.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<OmicronBeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<OmicronBeam>()))));
// 50% resist to Rancor.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<RancorLaserbeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<RancorLaserbeam>()))));
// 50% resist to Vehemence's skulls.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<VehemenceSkull>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<VehemenceSkull>()))));
// 50% resist to Yharim's Crystal.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<YharimsCrystalBeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<YharimsCrystalBeam>()))));
// 45% resist to Prismatic Breaker's deathray.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<PrismaticRay>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<PrismaticRay>()))));
// 45% resist to Wrathwing's stealth strike fireballs.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<WrathwingCinder>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<WrathwingCinder>()))));
// 30% resist to Eclipse's Fall.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<EclipsesFallMain>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<EclipsesFallMain>()))));
// 30% resist to Sirius.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<SiriusExplosion>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<SiriusExplosion>()))));
// 30% resist to Ultima's rays.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<UltimaRay>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<UltimaRay>()))));
// 30% resist to Dragon Scales and The Wand's tornadoes.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<InfernadoFriendly>(), ProjectileType<DragonScalesInfernado>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<InfernadoFriendly>(), ProjectileType<DragonScalesInfernado>()))));
// 25% resist to the Spin Throw part of the Ark of the Cosmos' combo.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, AotCThrowCombo))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, AotCThrowCombo))));
// 25% resist to Dragon Rage projectiles.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, DragonRageFilter))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, DragonRageFilter))));
// 25% resist to Gael's Greatsword's big skulls.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, BigGaelsSkullFilter))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, BigGaelsSkullFilter))));
// 25% resist to Mirror of Kalandra's Paradoxica minion.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Paradoxica>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Paradoxica>()))));
// 25% resist to Zenith.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.FinalFractal))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.FinalFractal))));
// 20% resist to The Anomaly's Nanogun's bomb explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<AnomalysNanogunMPFBBoom>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<AnomalysNanogunMPFBBoom>()))));
// 20% resist to Ariane's aura (Lilies of Finality).
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<LiliesOfFinalityAoE>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<LiliesOfFinalityAoE>()))));
// 20% resist to Eradicator's beams.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NebulaShot>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NebulaShot>()))));
// 20% resist to Plasma Grenade and Dynamic Pursuer's explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<PlasmaGrenadeProjectile>(), ProjectileType<PlasmaGrenadeSmallExplosion>(), ProjectileType<MassivePlasmaExplosion>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<PlasmaGrenadeProjectile>(), ProjectileType<PlasmaGrenadeSmallExplosion>(), ProjectileType<MassivePlasmaExplosion>()))));
// 20% resist to Voltaic Climax / Void Vortex hitscan beams.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<ClimaxBeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<ClimaxBeam>()))));
// 15% resist to The Final Dawn's AoE sweep flames.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<FinalDawnFlame>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<FinalDawnFlame>()))));
// 15% resist to Dragon's Breath Beam.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<DragonsBreathBurst>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<DragonsBreathBurst>()))));
// 15% resist to God Slayer Slugs.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<GodSlayerSlugProj>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<GodSlayerSlugProj>()))));
// 15% resist to Gruesome Eminence.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<SpiritCongregation>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<SpiritCongregation>()))));
// 15% resist to Luminite Bullets.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileID.MoonlordBullet))));
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.85f, ProjectileID.MoonlordBullet))));
#endregion
#region Supreme Calamitas: Brimstone Hearts
+3 -3
View File
@@ -1,6 +1,6 @@
using CalamityMod.Balancing;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
@@ -104,7 +104,7 @@ namespace CalamityMod.Buffs
{
if (npc.Calamity().webbed < npc.buffTime[buffIndex])
npc.Calamity().webbed = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().webbed;
npc.DelBuff(buffIndex);
buffIndex--;
@@ -113,7 +113,7 @@ namespace CalamityMod.Buffs
{
if (npc.Calamity().slowed < npc.buffTime[buffIndex])
npc.Calamity().slowed = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().slowed;
npc.DelBuff(buffIndex);
buffIndex--;
+2 -1
View File
@@ -1,6 +1,7 @@
using CalamityMod.Dusts;
using CalamityMod.NPCs;
using CalamityMod.Particles;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -40,7 +41,7 @@ namespace CalamityMod.Buffs.DamageOverTime
}
// Apply immunity timer.
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && cgn.debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && cgn.debuffResistanceTimer <= 0)
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + cgn.trueVulnerabilityHex;
// Destroy the vanilla buff, we don't use it.
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -26,7 +27,7 @@ namespace CalamityMod.Buffs.DamageOverTime
{
if (npc.Calamity().vaporfied < npc.buffTime[buffIndex])
npc.Calamity().vaporfied = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().vaporfied;
npc.DelBuff(buffIndex);
buffIndex--;
+3 -2
View File
@@ -1,6 +1,7 @@
using CalamityMod.Dusts;
using CalamityMod.NPCs;
using CalamityMod.Particles;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -43,7 +44,7 @@ namespace CalamityMod.Buffs.DamageOverTime
}
// Apply immunity timer.
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && cgn.debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && cgn.debuffResistanceTimer <= 0)
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + cgn.vulnerabilityHex;
// Destroy the vanilla buff, we don't use it.
@@ -60,7 +61,7 @@ namespace CalamityMod.Buffs.DamageOverTime
GeneralParticleHandler.SpawnParticle(spark2);
}
Dust dust = Dust.NewDustPerfect(Player.Calamity().RandomDebuffVisualSpot, Main.rand.NextBool() ? 261 :(int)CalamityDusts.Brimstone);
Dust dust = Dust.NewDustPerfect(Player.Calamity().RandomDebuffVisualSpot, Main.rand.NextBool() ? 261 : (int)CalamityDusts.Brimstone);
dust.scale = Main.rand.NextFloat(0.4f, 0.5f);
dust.velocity = new Vector2(0, Main.rand.NextFloat(-0.5f, -2.5f)).RotatedByRandom(0.6f);
if (dust.type == 261)
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -26,7 +27,7 @@ namespace CalamityMod.Buffs.StatDebuffs
{
if (npc.Calamity().eutrophication < npc.buffTime[buffIndex])
npc.Calamity().eutrophication = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().eutrophication;
npc.DelBuff(buffIndex);
buffIndex--;
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -19,7 +20,7 @@ namespace CalamityMod.Buffs.StatDebuffs
{
if (npc.Calamity().tesla < npc.buffTime[buffIndex])
npc.Calamity().tesla = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().tesla;
npc.DelBuff(buffIndex);
buffIndex--;
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -26,7 +27,7 @@ namespace CalamityMod.Buffs.StatDebuffs
{
if (npc.Calamity().gState < npc.buffTime[buffIndex])
npc.Calamity().gState = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().gState;
npc.DelBuff(buffIndex);
buffIndex--;
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ModLoader;
@@ -17,7 +18,7 @@ namespace CalamityMod.Buffs.StatDebuffs
{
if (npc.Calamity().kamiFlu < npc.buffTime[buffIndex])
npc.Calamity().kamiFlu = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().kamiFlu;
npc.DelBuff(buffIndex);
buffIndex--;
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ModLoader;
@@ -17,7 +18,7 @@ namespace CalamityMod.Buffs.StatDebuffs
{
if (npc.Calamity().tSad < npc.buffTime[buffIndex])
npc.Calamity().tSad = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().tSad;
npc.DelBuff(buffIndex);
buffIndex--;
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -19,7 +20,7 @@ namespace CalamityMod.Buffs.StatDebuffs
{
if (npc.Calamity().timeSlow < npc.buffTime[buffIndex])
npc.Calamity().timeSlow = npc.buffTime[buffIndex];
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().timeSlow;
npc.DelBuff(buffIndex);
buffIndex--;
+9 -11
View File
@@ -12,7 +12,6 @@ using CalamityMod.CalPlayer.Dashes;
using CalamityMod.Cooldowns;
using CalamityMod.DataStructures;
using CalamityMod.Dusts;
using CalamityMod.Enums;
using CalamityMod.Events;
using CalamityMod.FluidSimulation;
using CalamityMod.Items;
@@ -52,20 +51,17 @@ using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Systems;
using CalamityMod.Waters;
using CalamityMod.Systems.Collections;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.GameContent.Liquid;
using Terraria.GameInput;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ModLoader.IO;
using Terraria.Utilities.Terraria.Utilities;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.CalPlayer
@@ -113,6 +109,7 @@ namespace CalamityMod.CalPlayer
public float healingPotionMultiplier = 1f;
public bool heldGaelsLastFrame = false;
internal bool hadNanomachinesLastFrame = false;
public bool combHair;
public bool disableVoodooSpawns = false;
public bool disablePerfCystSpawns = false;
public bool disableHiveCystSpawns = false;
@@ -1163,18 +1160,18 @@ namespace CalamityMod.CalPlayer
public bool ZoneRadiantReefs => Player.InModBiome<RadiantReefsBiome>();
public bool ZoneGleamingBurrows => Player.InModBiome<GleamingBurrowsBiome>();
public bool ZoneBasaltGully => Player.InModBiome<BasaltGullyBiome>();
public bool ZoneSulphur => Player.InModBiome<SulphurousSeaBiome>();
public bool ZoneAbyss => ZoneAbyssLayer1 || ZoneAbyssLayer2 || ZoneAbyssLayer3 || ZoneAbyssLayer4;
public bool ZoneAbyssLayer1 => Player.InModBiome<AbyssLayer1Biome>();
public bool ZoneAbyssLayer2 => Player.InModBiome<AbyssLayer2Biome>();
public bool ZoneAbyssLayer3 => Player.InModBiome<AbyssLayer3Biome>();
public bool ZoneAbyssLayer4 => Player.InModBiome<AbyssLayer4Biome>();
public bool ZoneFloralParadise => Player.InModBiome<FloralParadiseBiome>();
public bool ZoneCalamity => Player.InModBiome<BrimstoneCragsBiome>();
public bool ZoneAstral => Player.InModBiome<AstralInfectionBiome>() && !ZoneAbyss;
public bool InAnyCalamityBiome => ZoneAbyss || ZoneCalamity || ZoneFloralParadise || ZoneSulphur || ZoneSunkenSea || ZoneAstral;
@@ -1615,6 +1612,7 @@ namespace CalamityMod.CalPlayer
ResetRogueStealth();
calamityBonusLuck = 0f;
combHair = false;
// Reset adrenaline duration to default. If Draedon's Heart is equipped, it'll change itself every frame.
AdrenalineDuration = CalamityUtils.SecondsToFrames(5);
@@ -4021,7 +4019,7 @@ namespace CalamityMod.CalPlayer
#region Modify Mana Cost
public override void ModifyManaCost(Item item, ref float reduce, ref float mult)
{
if (CalamityLists.MagicGunIDs.Contains(item.type) && meteorSet)
if (MagicGunIDList.Includes(item.type) && meteorSet)
{
mult *= 0.33f;
}
@@ -4177,7 +4175,7 @@ namespace CalamityMod.CalPlayer
var LocketSource = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<VeneratedLocket>()));
if (item.CountsAsClass<RogueDamageClass>())
{
if (!CalamityLists.VeneratedLocketBanlist.Contains(item.type))
if (!VeneratedLocketBanList.Includes(item.type))
{
float veneratedCloneSpeed = item.shootSpeed;
Vector2 realPlayerPos = Player.RotatedRelativePoint(Player.MountedCenter, true);
+2 -1
View File
@@ -6,6 +6,7 @@ using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.CalPlayer.DrawLayers;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Particles;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -27,7 +28,7 @@ namespace CalamityMod.CalPlayer
return;
// Remove shoe drawing effects if special legs are meant to be drawn.
if (CalamityLists.legOverrideList.Contains(Player.legs))
if (LegOverrideList.Includes(Player.legs))
{
PlayerDrawLayers.Shoes.Hide();
}
+227 -523
View File
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Events;
using CalamityMod.Items.Accessories;
@@ -27,20 +28,52 @@ namespace CalamityMod.CalPlayer
{
public partial class CalamityPlayer : ModPlayer
{
#region Modify Fishing Attempt
public override void ModifyFishingAttempt(ref FishingAttempt attempt)
{
if (enchantedPearl)
{
// If the player fails to roll a crate naturally and has Enchanted Pearl, reroll
// Stacking with existing probability, it should increase chances by 15% (12.5% with Crate Potion)
if (!attempt.crate)
attempt.crate = Main.rand.NextBool(6);
// If the player does get a crate (can be from the reroll above), give it increased chances of being rarer
if (attempt.crate)
{
int uncommonRate = Math.Clamp(240 / attempt.fishingLevel, 3, 240); // Iron/Mythril (originally 300)
attempt.uncommon = Main.rand.NextBool(uncommonRate);
int rareRate = Math.Clamp(840 / attempt.fishingLevel, 4, 840); // Biome (originally 1050)
attempt.uncommon = Main.rand.NextBool(rareRate);
int veryRareRate = Math.Clamp(1800 / attempt.fishingLevel, 5, 1800); // Golden/Titanium (originally 2250)
attempt.uncommon = Main.rand.NextBool(veryRareRate);
}
}
}
#endregion
#region Catch Fish
public override void CatchFish(FishingAttempt attempt, ref int itemDrop, ref int npcSpawn, ref AdvancedPopupRequest sonar, ref Vector2 sonarPosition)
{
// If vanilla catches an enemy, just immediately cancel
if (npcSpawn > 0)
return;
int bait = attempt.playerFishingConditions.BaitItemType;
int power = attempt.playerFishingConditions.BaitPower + attempt.playerFishingConditions.PolePower;
int power = attempt.fishingLevel;
int questFish = attempt.questFish;
int poolSize = attempt.waterTilesCount;
bool water = !attempt.inHoney && !attempt.inLava;
bool lava = attempt.inLava;
bool honey = attempt.inHoney;
// If vanilla catches an enemy, just cancel
if (npcSpawn > 0)
return;
bool sky = attempt.heightLevel == 0;
bool surface = attempt.heightLevel == 1;
bool underground = attempt.heightLevel == 2;
bool cavern = attempt.heightLevel == 3;
bool underworld = attempt.heightLevel == 4;
// Custom rate; increased by Enchanted Pearl
bool grabBagFish = attempt.uncommon && Main.rand.Next(100) < (enchantedPearl ? 30 : 15);
// Set up for allowing fishing in the Sulphurous Sea
Point point = Player.Center.ToTileCoordinates();
@@ -58,538 +91,210 @@ namespace CalamityMod.CalPlayer
if (ZoneAbyss || ZoneSulphur)
canSulphurFish = true;
// Old Duke spawn
if (canSulphurFish && bait == ModContent.ItemType<BloodwormItem>() && water && !BossRushEvent.BossRushActive)
{
CalamityGlobalNPC.OldDukeSpawn(Player.whoAmI, ModContent.NPCType<OldDuke>(), bait);
}
// Don't do anything if you can't fish in lava
if (!attempt.CanFishInLava && lava)
return;
// If you caught junk, then ignore all Calamity catches
if (itemDrop == ItemID.OldShoe || itemDrop == ItemID.FishingSeaweed || itemDrop == ItemID.TinCan)
return;
// Handle our modded Quest Fish, You can catch these in any liquid... because I don't care if you can
if (ZoneSunkenSea && questFish == ModContent.ItemType<EutrophicSandfish>() && attempt.uncommon)
{
itemDrop = ModContent.ItemType<EutrophicSandfish>();
return;
}
if (ZoneSunkenSea && questFish == ModContent.ItemType<SurfClam>() && attempt.uncommon)
{
itemDrop = ModContent.ItemType<SurfClam>();
return;
}
if (ZoneSunkenSea && questFish == ModContent.ItemType<Serpentuna>() && attempt.uncommon)
{
itemDrop = ModContent.ItemType<Serpentuna>();
return;
}
if (ZoneCalamity && questFish == ModContent.ItemType<Brimlish>() && attempt.uncommon)
{
itemDrop = ModContent.ItemType<Brimlish>();
return;
}
if (ZoneCalamity && questFish == ModContent.ItemType<Slurpfish>() && attempt.uncommon)
{
itemDrop = ModContent.ItemType<Slurpfish>();
return;
}
// Handle Alluring Bait's increased chance for Potion Material fish
if (alluringBait)
{
int chanceForPotionFish = 1000 / power;
if (chanceForPotionFish < 3)
chanceForPotionFish = 3;
if (Main.rand.NextBool(chanceForPotionFish))
{
List<int> fishList = new List<int>();
if (lava)
{
fishList.AddWithCondition<int>(ItemID.FlarefinKoi, !ZoneCalamity);
fishList.AddWithCondition<int>(ItemID.Obsidifish, !ZoneCalamity);
fishList.AddWithCondition<int>(ModContent.ItemType<CoastalDemonfish>(), ZoneCalamity);
fishList.AddWithCondition<int>(ModContent.ItemType<Shadowfish>(), ZoneCalamity);
}
else if (water)
{
if (Player.ZoneDirtLayerHeight || Player.ZoneRockLayerHeight)
{
fishList.Add(ItemID.ArmoredCavefish);
fishList.Add(ItemID.Stinkfish);
fishList.Add(ItemID.SpecularFish);
fishList.AddWithCondition<int>(ItemID.ChaosFish, Player.ZoneHallow);
fishList.AddWithCondition<int>(ItemID.VariegatedLardfish, Player.ZoneJungle);
}
if (Player.ZoneOverworldHeight || Player.ZoneSkyHeight)
{
fishList.AddWithCondition<int>(ItemID.DoubleCod, Player.ZoneJungle);
}
fishList.AddWithCondition<int>(ItemID.FrostMinnow, Player.ZoneSnow);
fishList.AddWithCondition<int>(ItemID.Ebonkoi, Player.ZoneCorrupt);
fishList.AddWithCondition<int>(ItemID.CrimsonTigerfish, Player.ZoneCrimson);
fishList.AddWithCondition<int>(ItemID.Hemopiranha, Player.ZoneCrimson);
fishList.AddWithCondition<int>(ItemID.PrincessFish, Player.ZoneHallow);
fishList.AddWithCondition<int>(ItemID.Prismite, Player.ZoneHallow);
fishList.AddWithCondition<int>(ItemID.Damselfish, Player.ZoneSkyHeight);
fishList.AddWithCondition<int>(ModContent.ItemType<AldebaranAlewife>(), ZoneAstral);
fishList.AddWithCondition<int>(ModContent.ItemType<SunkenSailfish>(), ZoneSunkenSea);
fishList.AddWithCondition<int>(ModContent.ItemType<Shadowfish>(), !Main.dayTime && !Player.ZoneSkyHeight);
}
if (fishList.Any())
{
int fishAmt = fishList.Count;
int caughtFish = fishList[Main.rand.Next(fishAmt)];
itemDrop = caughtFish;
return;
}
}
}
// Handle the increased chance of crates from Enchanted Pearl and the Supreme Fishing Station
if (enchantedPearl || fishingStation)
{
int chanceForCrates = (enchantedPearl ? 10 : 0) +
(fishingStation ? 10 : 0);
int poolSizeAmt = poolSize / 10;
if (poolSizeAmt > 100)
poolSizeAmt = 100;
int fishingPowerDivisor = power + poolSizeAmt;
int chanceForIronCrate = 1000 / fishingPowerDivisor;
int chanceForBiomeCrate = 2000 / fishingPowerDivisor;
int chanceForGoldCrate = 3000 / fishingPowerDivisor;
int chanceForRareItems = 4000 / fishingPowerDivisor;
if (chanceForIronCrate < 3)
chanceForIronCrate = 3;
if (chanceForBiomeCrate < 4)
chanceForBiomeCrate = 4;
if (chanceForGoldCrate < 5)
chanceForGoldCrate = 5;
if (chanceForRareItems < 6)
chanceForRareItems = 6;
if (lava)
{
if (Main.rand.Next(100) < chanceForCrates)
{
if (Main.rand.NextBool(chanceForBiomeCrate))
{
if (ZoneCalamity)
itemDrop = Main.hardMode ? ModContent.ItemType<BrimstoneCrate>() : ModContent.ItemType<SlagCrate>();
else
itemDrop = Main.hardMode ? ItemID.LavaCrateHard : ItemID.LavaCrate;
}
if ((Main.rand.NextBool(chanceForRareItems) && enchantedPearl && fishingStation && Player.cratePotion) && ZoneCalamity)
{
itemDrop = ModContent.ItemType<DragoonDrizzlefish>();
}
}
}
if (water)
{
if (Main.rand.Next(100) < chanceForCrates)
{
if (Main.rand.NextBool(chanceForRareItems) && enchantedPearl && fishingStation && Player.cratePotion)
{
List<int> rareItemList = new List<int>();
if (canSulphurFish)
{
switch (Main.rand.Next(2))
{
case 0:
rareItemList.Add(ModContent.ItemType<AlluringBait>());
break;
case 1:
rareItemList.Add(ModContent.ItemType<AbyssalAmulet>());
break;
}
}
if (ZoneAstral)
{
switch (Main.rand.Next(3))
{
case 0:
rareItemList.Add(ModContent.ItemType<GacruxianMollusk>());
break;
case 1:
rareItemList.Add(ModContent.ItemType<PolarisParrotfish>());
break;
case 2:
rareItemList.Add(ModContent.ItemType<UrsaSergeant>());
break;
}
}
if (ZoneSunkenSea)
{
switch (Main.rand.Next(3))
{
case 0:
rareItemList.Add(ModContent.ItemType<SerpentsBite>());
break;
case 1:
rareItemList.Add(ModContent.ItemType<RustedJingleBell>());
break;
case 2:
rareItemList.Add(ModContent.ItemType<SparklingEmpress>());
break;
}
}
if (Player.ZoneSnow && Player.ZoneRockLayerHeight && (Player.ZoneCorrupt || Player.ZoneCrimson || Player.ZoneHallow))
{
rareItemList.Add(ItemID.ScalyTruffle);
}
rareItemList.AddWithCondition<int>(ItemID.Toxikarp, Player.ZoneCorrupt);
rareItemList.AddWithCondition<int>(ItemID.Bladetongue, Player.ZoneCrimson);
rareItemList.AddWithCondition<int>(ItemID.CrystalSerpent, Player.ZoneHallow);
if (rareItemList.Any())
{
int rareItemAmt = rareItemList.Count;
int caughtRareItem = rareItemList[Main.rand.Next(rareItemAmt)];
itemDrop = caughtRareItem;
}
}
else if (Main.rand.NextBool(chanceForGoldCrate))
{
itemDrop = Main.hardMode ? ItemID.GoldenCrateHard : ItemID.GoldenCrate;
}
else if (Main.rand.NextBool(chanceForBiomeCrate))
{
List<int> biomeCrateList = new List<int>();
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ModContent.ItemType<AstralCrate>() : ModContent.ItemType<MonolithCrate>(), ZoneAstral);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ModContent.ItemType<PrismCrate>() : ModContent.ItemType<EutrophicCrate>(), ZoneSunkenSea);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ModContent.ItemType<HydrothermalCrate>() : ModContent.ItemType<SulphurousCrate>(), canSulphurFish);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.CorruptFishingCrateHard : ItemID.CorruptFishingCrate, Player.ZoneCorrupt);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.CrimsonFishingCrateHard : ItemID.CrimsonFishingCrate, Player.ZoneCrimson);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.HallowedFishingCrateHard : ItemID.HallowedFishingCrate, Player.ZoneHallow);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.DungeonFishingCrateHard : ItemID.DungeonFishingCrate, Player.ZoneDungeon);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.JungleFishingCrateHard : ItemID.JungleFishingCrate, Player.ZoneJungle);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.FloatingIslandFishingCrateHard : ItemID.FloatingIslandFishingCrate, Player.ZoneSkyHeight);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.FrozenCrateHard : ItemID.FrozenCrate, Player.ZoneSnow);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.OasisCrateHard : ItemID.OasisCrate, Player.ZoneDesert && !Player.ZoneBeach);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.OceanCrateHard : ItemID.OceanCrate, Player.ZoneBeach);
if (biomeCrateList.Any())
{
int biomeCrateAmt = biomeCrateList.Count;
int caughtBiomeCrate = biomeCrateList[Main.rand.Next(biomeCrateAmt)];
itemDrop = caughtBiomeCrate;
}
}
else if (Main.rand.NextBool(chanceForIronCrate))
{
itemDrop = Main.hardMode ? ItemID.IronCrateHard : ItemID.IronCrate;
}
else
{
itemDrop = Main.hardMode ? ItemID.WoodenCrateHard : ItemID.WoodenCrate;
}
return;
}
}
}
if (water)
{
// Handle Calamity's crates, veryrare and legendary means it's a Golden Crate
if (attempt.crate)
{
if (attempt.rare && !attempt.veryrare && !attempt.legendary)
{
if (ZoneAstral)
{
itemDrop = Main.hardMode ? ModContent.ItemType<AstralCrate>() : ModContent.ItemType<MonolithCrate>();
}
if (ZoneSunkenSea)
{
itemDrop = Main.hardMode ? ModContent.ItemType<PrismCrate>() : ModContent.ItemType<EutrophicCrate>();
}
if (canSulphurFish)
{
itemDrop = Main.hardMode ? ModContent.ItemType<HydrothermalCrate>() : ModContent.ItemType<SulphurousCrate>();
}
}
return;
}
// Don't override the vanilla crates or any special vanilla fishing loot
List<int> keepCatchList = new List<int>()
{
ItemID.WoodenCrate,
ItemID.WoodenCrateHard,
ItemID.IronCrate,
ItemID.IronCrateHard,
ItemID.GoldenCrate,
ItemID.GoldenCrateHard,
ItemID.FrogLeg,
ItemID.BalloonPufferfish,
ItemID.ZephyrFish,
ItemID.CombatBook,
ItemID.CorruptFishingCrate,
ItemID.CorruptFishingCrateHard,
ItemID.CrimsonFishingCrate,
ItemID.CrimsonFishingCrateHard,
ItemID.HallowedFishingCrate,
ItemID.HallowedFishingCrateHard,
ItemID.DungeonFishingCrate,
ItemID.DungeonFishingCrateHard,
ItemID.JungleFishingCrate,
ItemID.JungleFishingCrateHard,
ItemID.FloatingIslandFishingCrate,
ItemID.FloatingIslandFishingCrateHard,
ItemID.FrozenCrate,
ItemID.FrozenCrateHard,
ItemID.OasisCrate,
ItemID.OasisCrateHard,
ItemID.OceanCrate,
ItemID.OceanCrateHard
};
if (keepCatchList.Contains(itemDrop))
{
return;
}
if ((Player.ZoneCrimson || Player.ZoneCorrupt) && Player.ZoneRockLayerHeight && Main.hardMode)
{
if (attempt.uncommon && Main.rand.NextBool(7))
{
itemDrop = ModContent.ItemType<FishofNight>();
}
}
if (Player.ZoneHallow && Player.ZoneRockLayerHeight && Main.hardMode)
{
if (attempt.uncommon && Main.rand.NextBool(7))
{
itemDrop = ModContent.ItemType<FishofLight>();
}
}
if (Player.ZoneSkyHeight && Main.hardMode)
{
if (attempt.uncommon && Main.rand.NextBool(7))
{
itemDrop = Main.rand.NextBool() ? ModContent.ItemType<SunbeamFish>() : ModContent.ItemType<FishofFlight>();
}
}
// Increased chance of Enchanted Starfish if you don't have maximum mana
if (Player.ZoneOverworldHeight && !Main.dayTime)
{
int chance = Player.statManaMax < 200 ? 5 : 20;
if (attempt.uncommon && Main.rand.NextBool(chance))
{
itemDrop = ModContent.ItemType<EnchantedStarfish>();
}
}
if (!Player.ZoneSkyHeight && !Main.dayTime)
{
if (attempt.uncommon && Main.rand.NextBool(10))
{
itemDrop = ModContent.ItemType<Shadowfish>();
}
}
if (Player.ZoneOverworldHeight && Main.dayTime)
{
if (attempt.uncommon && Main.rand.NextBool(7))
{
itemDrop = ModContent.ItemType<StuffedFish>();
}
}
if (Player.ZoneRockLayerHeight)
{
if (attempt.uncommon && Main.rand.NextBool(7))
{
itemDrop = ModContent.ItemType<GlimmeringGemfish>();
}
}
if (Player.ZoneSnow && Main.hardMode)
{
if (attempt.uncommon && Main.rand.NextBool(7))
{
itemDrop = ModContent.ItemType<FishofEleum>();
}
}
// Lower chance of Spadefish in Hardmode
if (Player.ZoneDirtLayerHeight)
{
int chance = Main.hardMode ? 10 : 2;
if (attempt.veryrare && Main.rand.NextBool(chance))
{
itemDrop = ModContent.ItemType<Spadefish>();
}
}
if (Player.FindBuffIndex(BuffID.Gills) > -1 && DownedBossSystem.downedLeviathan && (attempt.legendary || (attempt.veryrare && Main.rand.NextBool())))
{
itemDrop = ModContent.ItemType<Floodtide>();
}
if (Player.ZoneOverworldHeight && Main.bloodMoon)
{
if (attempt.uncommon && Main.rand.NextBool(7))
{
itemDrop = ModContent.ItemType<Gorecodile>();
}
}
if (ZoneAstral) // Astral Infection, fishing in water
{
if (attempt.legendary)
{
int legendaryCatch = Utils.SelectRandom(Main.rand, new int[]
{
ModContent.ItemType<PolarisParrotfish>(),
ModContent.ItemType<GacruxianMollusk>(),
ModContent.ItemType<UrsaSergeant>()
});
itemDrop = legendaryCatch;
}
else if (attempt.uncommon || attempt.rare || attempt.veryrare)
{
int uncommonCatch = Utils.SelectRandom(Main.rand, new int[]
{
ModContent.ItemType<ProcyonidPrawn>(),
ModContent.ItemType<ArcturusAstroidean>(),
ModContent.ItemType<AldebaranAlewife>()
});
itemDrop = uncommonCatch;
}
else
{
itemDrop = ModContent.ItemType<TwinklingPollox>();
return;
}
}
if (ZoneSunkenSea) // Sunken Sea, fishing in water
{
if (attempt.legendary)
{
List<int> legendaryCatches = new List<int>()
{
ModContent.ItemType<RustedJingleBell>()
};
legendaryCatches.AddWithCondition<int>(ModContent.ItemType<SparklingEmpress>(), DownedBossSystem.downedDesertScourge);
legendaryCatches.AddWithCondition<int>(ModContent.ItemType<SerpentsBite>(), Main.hardMode);
itemDrop = legendaryCatches[Main.rand.Next(legendaryCatches.Count)];
}
else if (attempt.veryrare)
{
itemDrop = ModContent.ItemType<GreenwaveLoach>();
}
else if (attempt.uncommon || attempt.rare)
{
itemDrop = ModContent.ItemType<SunkenSailfish>();
}
else
{
itemDrop = ModContent.ItemType<PrismaticGuppy>();
return;
}
}
// There is no complete fishing pool here, so most of it is vanilla default
if (canSulphurFish) // Sulphurous Sea, fishing in water
{
if (attempt.legendary || (attempt.veryrare && Main.rand.NextBool()))
{
itemDrop = Utils.SelectRandom(Main.rand, new int[]
{
ModContent.ItemType<AlluringBait>(),
ModContent.ItemType<AbyssalAmulet>()
});
}
else if (attempt.common)
{
itemDrop = ModContent.ItemType<PlantyMush>();
}
}
/*if (canSulphurFish && (bait.type == ItemID.GoldWorm || bait.type == ItemID.GoldGrasshopper || bait.type == ItemID.GoldButterfly) && power > 150)
{
if (Main.netMode != NetmodeID.MultiplayerClient)
{
CalamityGlobalNPC.OldDukeSpawn(player.whoAmI, ModContent.NPCType<OldDuke>());
}
else
{
NetMessage.SendData(61, -1, -1, null, player.whoAmI, (float)ModContent.NPCType<OldDuke>(), 0f, 0f, 0, 0, 0);
}
switch (Main.rand.Next(4))
{
case 0: itemDrop = ModContent.ItemType<IronBoots>(); break; //movement acc
case 1: itemDrop = ModContent.ItemType<DepthCharm>(); break; //regen acc
case 2: itemDrop = ModContent.ItemType<AnechoicPlating>(); break; //defense acc
case 3: itemDrop = ModContent.ItemType<StrangeOrb>(); break; //light pet
}
return;
}*/
}
// Fishing in lava overrides the rest of logic
if (lava)
{
if (ZoneCalamity) // Brimstone Crags, fishing in lava
// Don't do anything if you can't fish in lava
if (!attempt.CanFishInLava)
return;
if (ZoneCalamity)
{
if (attempt.crate)
{
// Crates have highest priority
if (attempt.crate && attempt.rare)
itemDrop = Main.hardMode ? ModContent.ItemType<BrimstoneCrate>() : ModContent.ItemType<SlagCrate>();
}
else if (attempt.legendary)
{
itemDrop = ModContent.ItemType<DragoonDrizzlefish>();
}
// Increased chance of Dragoon Drizzlefish in Prehardmode
else if (attempt.veryrare && !Main.hardMode)
{
itemDrop = ModContent.ItemType<DragoonDrizzlefish>();
}
else if (attempt.veryrare)
{
itemDrop = ModContent.ItemType<CharredLasher>();
}
else if ((attempt.rare || attempt.veryrare) && DownedBossSystem.downedProvidence && Main.rand.Next(3) >= 2)
{
else if (DownedBossSystem.downedProvidence && ((attempt.rare && Main.rand.NextBool(2)) || (attempt.uncommon && Main.rand.NextBool(4))))
itemDrop = ModContent.ItemType<Bloodfin>();
}
else if (attempt.uncommon || attempt.rare)
// Quest fish hover around this priority
else if (questFish == ModContent.ItemType<Brimlish>() && attempt.uncommon)
itemDrop = ModContent.ItemType<Brimlish>();
else if (questFish == ModContent.ItemType<Slurpfish>() && attempt.uncommon)
itemDrop = ModContent.ItemType<Slurpfish>();
else if (grabBagFish && Main.hardMode)
itemDrop = ModContent.ItemType<Havocfish>();
else if (attempt.rare)
{
List<int> uncommonCatches = new List<int>()
{
ModContent.ItemType<CoastalDemonfish>(),
ModContent.ItemType<Shadowfish>()
};
uncommonCatches.AddWithCondition<int>(ModContent.ItemType<Havocfish>(), Main.hardMode);
itemDrop = uncommonCatches[Main.rand.Next(uncommonCatches.Count)];
}
// Lava fish usually don't have plentiful catches but we can be more lenient
else
{
itemDrop = ModContent.ItemType<CragBullhead>();
}
}
return;
}
// Honey also overrides logic but we have nothing to catch from honey... for now
if (honey)
return;
// Old Duke spawn
if (canSulphurFish && bait == ModContent.ItemType<BloodwormItem>() && !BossRushEvent.BossRushActive)
{
CalamityGlobalNPC.OldDukeSpawn(Player.whoAmI, ModContent.NPCType<OldDuke>(), bait);
}
// Ignore catches if it's junk
if (itemDrop == ItemID.OldShoe || itemDrop == ItemID.FishingSeaweed || itemDrop == ItemID.TinCan || itemDrop == ItemID.JojaCola)
return;
if (attempt.crate)
{
// This can override Golden/Titanium Crates, but so do vanilla biome crates
// Those are still obtainable if the catch is very rare/legendary but not rare (fishing oddities)
if (attempt.rare)
{
if (ZoneAstral)
itemDrop = Main.hardMode ? ModContent.ItemType<AstralCrate>() : ModContent.ItemType<MonolithCrate>();
if (ZoneSunkenSea)
itemDrop = Main.hardMode ? ModContent.ItemType<PrismCrate>() : ModContent.ItemType<EutrophicCrate>();
if (canSulphurFish)
itemDrop = Main.hardMode ? ModContent.ItemType<HydrothermalCrate>() : ModContent.ItemType<SulphurousCrate>();
}
return;
}
// Ignore all top priority legendary vanilla catches
List<int> keepCatchList = new List<int>()
{
ItemID.CombatBook,
ItemID.DreadoftheRedSea,
ItemID.FrogLeg,
ItemID.BalloonPufferfish,
ItemID.ZephyrFish
};
if (keepCatchList.Contains(itemDrop))
return;
// Add top priorities of our own
if (DownedBossSystem.downedLeviathan && attempt.legendary && poolSize > 1000)
{
itemDrop = ModContent.ItemType<Floodtide>();
return;
}
if (grabBagFish)
{
if (surface && Main.bloodMoon)
itemDrop = ModContent.ItemType<Gorecodile>();
else if (surface && Main.dayTime)
itemDrop = ModContent.ItemType<StuffedFish>();
else if (cavern)
itemDrop = ModContent.ItemType<GlimmeringGemfish>();
if (Main.hardMode)
{
// Fish of Light/Night are evenly split with Gemfish
if ((Player.ZoneCrimson || Player.ZoneCorrupt) && cavern && Main.rand.NextBool())
itemDrop = ModContent.ItemType<FishofNight>();
else if (Player.ZoneHallow && cavern && Main.rand.NextBool())
itemDrop = ModContent.ItemType<FishofLight>();
else if (Player.ZoneSnow)
itemDrop = ModContent.ItemType<FishofEleum>();
else if (sky)
itemDrop = Main.rand.NextBool() ? ModContent.ItemType<SunbeamFish>() : ModContent.ItemType<FishofFlight>();
}
}
// Increased chance of Enchanted Starfish if you don't have maximum mana
if (surface && !Main.dayTime) // Surface
{
int chance = (Player.ConsumedManaCrystals >= Player.ManaCrystalMax) ? 20 : 5;
if (attempt.uncommon && Main.rand.NextBool(chance))
itemDrop = ModContent.ItemType<EnchantedStarfish>();
if (attempt.uncommon && Main.rand.NextBool(10))
itemDrop = ModContent.ItemType<Shadowfish>();
}
// Lower chance of Spadefish in Hardmode
if (underground) // Underground
{
int chance = Main.hardMode ? 10 : 2;
if (attempt.veryrare && Main.rand.NextBool(chance))
{
itemDrop = ModContent.ItemType<Spadefish>();
}
}
if (ZoneAstral)
{
if (attempt.legendary)
{
int legendaryCatch = Utils.SelectRandom(Main.rand, new int[]
{
ModContent.ItemType<PolarisParrotfish>(),
ModContent.ItemType<GacruxianMollusk>(),
ModContent.ItemType<UrsaSergeant>()
});
itemDrop = legendaryCatch;
}
else if (attempt.veryrare)
itemDrop = ModContent.ItemType<ArcturusAstroidean>();
else if (attempt.uncommon || attempt.rare)
{
int uncommonCatch = Utils.SelectRandom(Main.rand, new int[]
{
ModContent.ItemType<ProcyonidPrawn>(),
ModContent.ItemType<AldebaranAlewife>()
});
itemDrop = uncommonCatch;
}
else
itemDrop = ModContent.ItemType<TwinklingPollox>();
return;
}
if (ZoneSunkenSea)
{
// If the player is overlapping with the desert, split the catches
if (Player.ZoneDesert && Main.rand.NextBool())
return;
if (attempt.legendary)
{
List<int> legendaryCatches = new List<int>()
{
ModContent.ItemType<RustedJingleBell>()
};
legendaryCatches.AddWithCondition<int>(ModContent.ItemType<SparklingEmpress>(), DownedBossSystem.downedDesertScourge);
legendaryCatches.AddWithCondition<int>(ModContent.ItemType<SerpentsBite>(), Main.hardMode);
itemDrop = legendaryCatches[Main.rand.Next(legendaryCatches.Count)];
}
else if (attempt.veryrare)
itemDrop = ModContent.ItemType<GreenwaveLoach>();
// Quest fish hover around this priority
else if (questFish == ModContent.ItemType<EutrophicSandfish>() && attempt.uncommon)
itemDrop = ModContent.ItemType<EutrophicSandfish>();
else if (questFish == ModContent.ItemType<SurfClam>() && attempt.uncommon)
itemDrop = ModContent.ItemType<SurfClam>();
else if (questFish == ModContent.ItemType<Serpentuna>() && attempt.uncommon)
itemDrop = ModContent.ItemType<Serpentuna>();
else if (attempt.uncommon || attempt.rare)
itemDrop = ModContent.ItemType<SunkenSailfish>();
else
itemDrop = ModContent.ItemType<PrismaticGuppy>();
return;
}
// There is no complete fishing pool here, so most of it is vanilla default
if (canSulphurFish)
{
if (attempt.legendary)
{
itemDrop = Utils.SelectRandom(Main.rand, new int[]
{
ModContent.ItemType<AlluringBait>(),
ModContent.ItemType<AbyssalAmulet>()
});
}
else if (attempt.common && Main.rand.NextBool())
itemDrop = ModContent.ItemType<PlantyMush>();
}
}
#endregion
@@ -597,6 +302,7 @@ namespace CalamityMod.CalPlayer
#region Get Fishing Level
public override void GetFishingLevel(Item fishingRod, Item bait, ref float fishingLevel)
{
// Note: This is calculated after equipments (Rod, Bait, Potions, etc) and before modifications (Chum Buckets, Luck)
if ((ZoneAstral || ZoneAbyss || ZoneSulphur) && bait.type == ModContent.ItemType<ArcturusAstroidean>())
fishingLevel = fishingLevel * ArcturusAstroidean.FishingPowerBiomeMult;
if (Player.ZoneSnow && fishingRod.type == ModContent.ItemType<VerstaltiteFishingRod>())
@@ -634,9 +340,10 @@ namespace CalamityMod.CalPlayer
}
#endregion
#region Get Fishing Level
#region Modify Caught Fish
public override void ModifyCaughtFish(Item fish)
{
// Increases the yield of potion ingredient fish with Alluring Bait
if (alluringBait)
{
List<int> fishList = new List<int>()
@@ -663,10 +370,7 @@ namespace CalamityMod.CalPlayer
};
if (fishList.Contains(fish.type))
{
// Increase the yield by 1 or 2
fish.stack += Main.rand.NextBool() ? 1 : 2;
}
fish.stack += Main.rand.Next(1, 3 + 1);
}
}
#endregion
+8 -7
View File
@@ -34,6 +34,7 @@ using CalamityMod.Particles;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Systems.Collections;
using CalamityMod.UI;
using CalamityMod.World;
using Microsoft.Xna.Framework;
@@ -688,7 +689,7 @@ namespace CalamityMod.CalPlayer
{
Item heldItem = Player.ActiveItem();
if (CalamityUtils.ShouldTriggerSummonPenalty(Player, heldItem) && !CalamityLists.DisabledSummonerNerfMinions.Contains(proj.type))
if (CalamityUtils.ShouldTriggerSummonPenalty(Player, heldItem) && !DisabledSummonerNerfMinionList.Includes(proj.type))
modifiers.FinalDamage *= BalancingConstants.SummonerCrossClassNerf;
}
}
@@ -897,7 +898,7 @@ namespace CalamityMod.CalPlayer
{
// TODO -- Evolution dodge isn't actually a dodge and you'll still get hit for 1.
// This should probably be changed so that when the evolution reflects it gives you 1 frame of guaranteed free dodging everything.
if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => proj.type != x) && proj.active && !proj.friendly && proj.hostile && proj.damage > 0)
if (!ProjectileDestroyExceptionsList.Includes(proj.type) && proj.active && !proj.friendly && proj.hostile && proj.damage > 0)
{
double dodgeDamageGateValuePercent = 0.05;
int dodgeDamageGateValue = (int)Math.Round(Player.statLifeMax2 * dodgeDamageGateValuePercent);
@@ -1030,7 +1031,7 @@ namespace CalamityMod.CalPlayer
projectileDamageReduction += 0.25;
}
if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => proj.type != x) && proj.active && !proj.friendly && proj.hostile && proj.damage > 0)
if (!ProjectileDestroyExceptionsList.Includes(proj.type) && proj.active && !proj.friendly && proj.hostile && proj.damage > 0)
{
// Daedalus Reflect counts as a reflect but doesn't actually stop you from taking damage
if (daedalusReflect && !disableAllDodges && !evolution && !Player.HasCooldown(GlobalDodge.ID))
@@ -1452,7 +1453,7 @@ namespace CalamityMod.CalPlayer
}
// As these reflects do not cancel damage, they need to be in OnHit rather than ModifyHit
if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => proj.type != x) && proj.active && !proj.friendly && proj.hostile && hurtInfo.Damage > 0)
if (!ProjectileDestroyExceptionsList.Includes(proj.type) && proj.active && !proj.friendly && proj.hostile && hurtInfo.Damage > 0)
{
double dodgeDamageGateValuePercent = 0.05;
int dodgeDamageGateValue = (int)Math.Round(Player.statLifeMax2 * dodgeDamageGateValuePercent);
@@ -1643,7 +1644,7 @@ namespace CalamityMod.CalPlayer
{
double maxCooldownDurationDamagePercent = 0.5;
int maxCooldownDurationDamageValue = (int)Math.Round(Player.statLifeMax2 * (maxCooldownDurationDamagePercent - dodgeDamageGateValuePercent));
// Just in case...
if (maxCooldownDurationDamageValue <= 0)
maxCooldownDurationDamageValue = 1;
@@ -2506,7 +2507,7 @@ namespace CalamityMod.CalPlayer
if (Player.ownedProjectileCounts[ModContent.ProjectileType<DrataliornusBow>()] != 0)
{
foreach(Projectile p in Main.ActiveProjectiles)
foreach (Projectile p in Main.ActiveProjectiles)
{
if (p.type == ModContent.ProjectileType<DrataliornusBow>() && p.owner == Player.whoAmI)
{
@@ -2981,7 +2982,7 @@ namespace CalamityMod.CalPlayer
bool externalFlagsAppropriate = !CalamityMod.ExternalFlag_DisableDefenseDamage && !externalDefenseDamageImmunity;
if (!externalFlagsAppropriate)
return;
// Can be dynamically reduced by Adamantite set bonus and maybe other future effects.
int defenseDamageTaken = defenseDamage;
+10 -11
View File
@@ -13,9 +13,9 @@ using CalamityMod.Items.Placeables.Furniture;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.NPCs;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Systems;
using CalamityMod.Systems.Collections;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Terraria;
@@ -23,7 +23,6 @@ using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Utilities.Terraria.Utilities;
namespace CalamityMod.CalPlayer
{
@@ -388,11 +387,11 @@ namespace CalamityMod.CalPlayer
int buffID = Player.buffType[l];
if (Player.buffTime[l] <= 2)
continue;
bool shouldHalveDuration = CalamityLists.sicknessDebuffList.Contains(buffID);
bool shouldHalveDuration = SicknessDebuffsList.Includes(buffID);
if (livingDewHalveDebuffs)
shouldHalveDuration |= CalamityLists.fireDebuffList.Contains(buffID);
shouldHalveDuration |= FireDebuffsList.Includes(buffID);
if (purity)
shouldHalveDuration |= CalamityLists.debuffList.Contains(buffID);
shouldHalveDuration |= DebuffsList.Includes(buffID);
if (shouldHalveDuration)
--Player.buffTime[l];
@@ -436,7 +435,7 @@ namespace CalamityMod.CalPlayer
}
// Permafrost's Concoction increases life regen while afflicted with a fire debuff
if (permafrostsConcoction && Player.buffType.Any(CalamityLists.fireDebuffList.Contains))
if (permafrostsConcoction && Player.buffType.Any(FireDebuffsList.Includes))
{
if (Player.lifeRegenTime < 1800)
Player.lifeRegenTime = 1800;
@@ -456,7 +455,7 @@ namespace CalamityMod.CalPlayer
if (purity)
{
int intendedPurityDefense = 0;
int currentDebuffs = Player.buffType.Count(CalamityLists.debuffList.Contains);
int currentDebuffs = Player.buffType.Count(DebuffsList.List.Contains);
if (currentDebuffs > 0)
{
// Healing rate is normally 5 HP/s (+1 every 12 frames)
@@ -509,7 +508,7 @@ namespace CalamityMod.CalPlayer
// If the player has any debuffs, give the extra life regen and defense
// More defense is given for each additional debuff
int intendedJewelDefense = 0;
int currentDebuffs = Player.buffType.Count(CalamityLists.debuffList.Contains);
int currentDebuffs = Player.buffType.Count(DebuffsList.List.Contains);
if (currentDebuffs > 0)
{
Player.lifeRegen += 4;
@@ -536,7 +535,7 @@ namespace CalamityMod.CalPlayer
Player.lifeRegen += 2;
// If any debuff is detected, provide even more life regen and massively accelerate it
if (Player.buffType.Any(CalamityLists.debuffList.Contains))
if (Player.buffType.Any(DebuffsList.List.Contains))
{
Player.lifeRegen += 3;
if (Player.lifeRegenTime < 1800)
@@ -557,7 +556,7 @@ namespace CalamityMod.CalPlayer
// Yes, really, there's a list of conditions under which life regen doesn't work
// even if it's life regen that normally works during a damage over time debuff.
//
// 1. No life regen bool (Blood Boiler usage or wearing Omega Blue armor)
// 1. No life regen bool (Omega Blue armor)
// 2. Being too far from Providence cocoon ("Holy Inferno")
// 3. Air drowning in the Abyss
//
@@ -702,7 +701,7 @@ namespace CalamityMod.CalPlayer
for (int l = 0; l < Player.MaxBuffs; l++)
{
int hasBuff = Player.buffType[l];
lesserEffect = CalamityLists.alcoholList.Contains(hasBuff);
lesserEffect = AlcoholsList.List.Contains(hasBuff);
}
if (Player.lifeRegen < 0)
Player.lifeRegen += lesserEffect ? 1 : regenBoost;
+21 -19
View File
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using CalamityMod.Balancing;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.Placeables;
using CalamityMod.Buffs.StatBuffs;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Buffs.Summon;
@@ -58,6 +59,7 @@ using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Systems;
using CalamityMod.Systems.Collections;
using CalamityMod.Tiles.Abyss.AbyssAmbient;
using CalamityMod.Tiles.FurnitureAuric;
using CalamityMod.Tiles.Ores;
@@ -368,7 +370,7 @@ namespace CalamityMod.CalPlayer
}
IsFirstDashFrame = false;
}
float sparkscale1 = MathF.Min(Player.velocity.X * dir * 0.08f, 1.2f);
Vector2 SparkVelocity1 = -Player.velocity.SafeNormalize(Vector2.UnitX) * 5;
@@ -550,7 +552,7 @@ namespace CalamityMod.CalPlayer
// If they're a boss, reduce the boss distance.
// Boss distance will always be >= enemy distance, so there's no need to do another check.
// Worm boss body and tail segments are not counted as bosses for this calculation.
if (npc.IsABoss() && !CalamityLists.noRageWormSegmentList.Contains(npc.type))
if (npc.IsABoss() && !NoRageWormSegmentList.Includes(npc.type))
bossDistance = hitboxEdgeDist;
}
}
@@ -1009,7 +1011,7 @@ namespace CalamityMod.CalPlayer
continue;
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<DaawnlightSpiritOrigin>()));
if (Main.myPlayer == Player.whoAmI && target.WithinRange(Player.Center , 2000f))
if (Main.myPlayer == Player.whoAmI && target.WithinRange(Player.Center, 2000f))
{
Projectile.NewProjectile(source, target.Center, Vector2.Zero, bullseyeType, 0, 0f, Player.whoAmI, target.whoAmI);
@@ -1072,8 +1074,8 @@ namespace CalamityMod.CalPlayer
{
for (int l = 0; l < Player.MaxBuffs; l++)
{
int hasBuff = Player.buffType[l];
if (Player.buffTime[l] > 2 && CalamityLists.debuffList.Contains(hasBuff))
int buffID = Player.buffType[l];
if (Player.buffTime[l] > 2 && DebuffsList.Includes(buffID))
Player.buffTime[l]--;
}
}
@@ -1844,7 +1846,7 @@ namespace CalamityMod.CalPlayer
// God Slayer Armor dash debuff immunity
if (DashID == GodSlayerDash.ID && Player.dashDelay < 0)
{
foreach (int debuff in CalamityLists.debuffList)
foreach (int debuff in DebuffsList.List)
Player.buffImmune[debuff] = true;
}
@@ -1916,7 +1918,7 @@ namespace CalamityMod.CalPlayer
if (silvaCountdown > 0 && hasSilvaEffect && silvaSet)
{
// You become immune to all debuffs
foreach (int debuff in CalamityLists.debuffList)
foreach (int debuff in DebuffsList.List)
Player.buffImmune[debuff] = true;
// Prevent thorns effects from being abused during invincibility
@@ -1991,12 +1993,12 @@ namespace CalamityMod.CalPlayer
for (int l = 0; l < Player.MaxBuffs; l++)
{
int hasBuff = Player.buffType[l];
if (Player.buffTime[l] <= 2 && hasBuff == ModContent.BuffType<Buffs.StatBuffs.TarragonImmunity>())
int buffID = Player.buffType[l];
if (Player.buffTime[l] <= 2 && buffID == ModContent.BuffType<Buffs.StatBuffs.TarragonImmunity>())
if (Player.whoAmI == Main.myPlayer)
Player.AddCooldown(Cooldowns.TarragonImmunity.ID, CalamityUtils.SecondsToFrames(25));
bool shouldAffect = CalamityLists.debuffList.Contains(hasBuff);
bool shouldAffect = DebuffsList.Includes(buffID);
if (shouldAffect)
Player.GetDamage<RogueDamageClass>() += 0.1f;
}
@@ -3139,7 +3141,7 @@ namespace CalamityMod.CalPlayer
}
}
if (CalamityLists.highTestFishList.Contains(Player.ActiveItem().type))
if (HighTestFishingPoleList.Includes(Player.ActiveItem().type))
Player.accFishingLine = true;
if (planarSpeedBoost != 0)
@@ -3236,7 +3238,7 @@ namespace CalamityMod.CalPlayer
Player.statDefense += Mushy.DefenseBoost;
if (fungalSymbiote)
Player.GetDamage<GenericDamageClass>() += 0.1f;
}
}
if (omniscience)
{
@@ -3908,8 +3910,8 @@ namespace CalamityMod.CalPlayer
{
for (int l = 0; l < Player.MaxBuffs; l++)
{
int hasBuff = Player.buffType[l];
if (CalamityLists.amalgamBuffList.Contains(hasBuff))
int buffID = Player.buffType[l];
if (AmalgamBuffList.Includes(buffID))
{
if (amalgam)
{
@@ -3920,14 +3922,14 @@ namespace CalamityMod.CalPlayer
Player.buffTime[l] += 1;
// Buffs will not go away when you die, to prevent wasting potions.
if (!Main.persistentBuff[hasBuff])
Main.persistentBuff[hasBuff] = true;
if (!Main.persistentBuff[buffID])
Main.persistentBuff[buffID] = true;
}
else
{
// Reset buff persistence if Amalgam is removed.
if (Main.persistentBuff[hasBuff] && !CalamityLists.persistentBuffList.Contains(hasBuff))
Main.persistentBuff[hasBuff] = false;
if (Main.persistentBuff[buffID] && !PersistentBuffList.Includes(buffID))
Main.persistentBuff[buffID] = false;
}
}
}
@@ -4310,7 +4312,7 @@ namespace CalamityMod.CalPlayer
// Apply defense damage
Player.statDefense -= currentDefenseDamage;
}
// Defense can never be reduced below zero, no matter what
+3 -6
View File
@@ -7,26 +7,23 @@ using CalamityMod.Buffs.StatBuffs;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Cooldowns;
using CalamityMod.Dusts;
using CalamityMod.Enums;
using CalamityMod.EntitySources;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Armor.Reaver;
using CalamityMod.Items.Fishing.AstralCatches;
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.Items.VanillaArmorChanges;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.NPCs;
using CalamityMod.NPCs.NormalNPCs;
using CalamityMod.Particles;
using CalamityMod.Projectiles;
using CalamityMod.Projectiles.Healing;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Systems;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
@@ -280,7 +277,7 @@ namespace CalamityMod.CalPlayer
if (!proj.npcProj && !proj.trap && proj.friendly)
{
if ((plaguebringerCarapace || uberBees) && CalamityLists.friendlyBeeList.Contains(proj.type))
if ((plaguebringerCarapace || uberBees) && FriendlyBeesList.Includes(proj.type))
target.AddBuff(BuffType<Plague>(), 300);
// All projectiles fired from Soma Prime are marked using CalamityGlobalProjectile
@@ -1144,7 +1141,7 @@ namespace CalamityMod.CalPlayer
if (profanedCrystal && (DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs))
{
target.AddBuff(BuffType<HolyFlames>(), 600);
target.AddBuff(BuffType<HolyFlames>(), 600);
}
if (divineBless)
+57
View File
@@ -0,0 +1,57 @@
using CalamityMod.Enums;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
namespace CalamityMod.CalPlayer.Dashes
{
public class StatisNinjaBeltDash : PlayerDashEffect
{
public static new string ID => "Statis' Ninja Belt";
public override DashCollisionType CollisionType => DashCollisionType.NoCollision;
public override bool IsOmnidirectional => false;
public int Time = 0;
public override float CalculateDashSpeed(Player player) => 20f;
public override void OnDashEffects(Player player)
{
Time = 0;
for (int i = 0; i < 12; i++)
{
Vector2 smokePos = player.Center + new Vector2(Main.rand.Next(-player.width, player.width), Main.rand.Next(-player.height, player.height)) * 0.8f;
Vector2 smokeVel = Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * Main.rand.NextFloat(1.25f, 1.75f);
HeavySmokeParticle onDashSmoke = new(smokePos, smokeVel, Color.Gray, 30, 0.5f, 0.75f, 0.2f * Main.rand.NextFloatDirection());
GeneralParticleHandler.SpawnParticle(onDashSmoke);
}
}
public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor)
{
Time++;
if (Time % 3 == 0)
{
int colorType = Main.rand.Next(3);
Color smokeColor = Color.White;
switch (colorType)
{
case 0:
smokeColor = Color.Gray;
break;
case 1:
smokeColor = new Color(28, 75, 163);
break;
case 2:
smokeColor = new Color(195, 0, 255);
break;
}
Vector2 smokePos = player.Center - (player.velocity * 1.25f) + Main.rand.NextVector2Circular(10, 20);
float smokeScale = player.velocity.X * 0.045f;
HeavySmokeParticle midDashSmoke = new(smokePos, player.velocity * 0.2f, smokeColor, 20, smokeScale, 0.75f, 0.2f * Main.rand.NextFloatDirection(), true);
GeneralParticleHandler.SpawnParticle(midDashSmoke);
}
}
}
}
@@ -0,0 +1,106 @@
using CalamityMod.Items.Accessories.Vanity;
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.CalPlayer.DrawLayers
{
public class CombHairSparkleLayer : PlayerDrawLayer
{
public override Position GetDefaultPosition() => new BeforeParent(PlayerDrawLayers.LeinforsHairShampoo);
public override bool IsHeadLayer => true;
public override bool GetDefaultVisibility(PlayerDrawSet drawInfo)
{
Player drawPlayer = drawInfo.drawPlayer;
CalamityPlayer modPlayer = drawPlayer.Calamity();
// Specific hair drawing requirements: Hair must be drawing with 20% lightness, and you're not bald
bool canReceiveHairSparkles = (drawInfo.fullHair || drawInfo.hatHair || drawInfo.drawsBackHairWithoutHeadgear || drawPlayer.head == -1 || drawPlayer.head == 0) && Main.rgbToHsl(drawInfo.colorHead).Z > 0.2f;
bool baldHairStyles = drawPlayer.hair == 15 || drawPlayer.hair == 76;
return drawInfo.shadow == 0f && !drawPlayer.dead && !drawInfo.headOnlyRender && modPlayer.combHair && canReceiveHairSparkles && !baldHairStyles;
}
protected override void Draw(ref PlayerDrawSet drawInfo)
{
Player drawPlayer = drawInfo.drawPlayer;
// 5% chance per frame any of this draws
if (!Main.rand.NextBool(20))
return;
// Search through the equipped index for the comb. We need this to get the right dye
int dyeIndex = -1;
for (int i = 0; i < 20; i++)
{
if (drawPlayer.armor[i].type == ModContent.ItemType<TheComb>())
{
dyeIndex = i;
break;
}
}
var shader = GameShaders.Armor.GetSecondaryShader(dyeIndex == -1 ? 0 : drawPlayer.dye[dyeIndex % 10].dye, drawPlayer);
// Now detect if there are chests nearby
int LeftRange = Utils.Clamp((int)drawPlayer.MountedCenter.X / 16 - 50, 2, Main.maxTilesX - 2);
int RightRange = Utils.Clamp((int)drawPlayer.MountedCenter.X / 16 + 50, 2, Main.maxTilesX - 2);
int TopRange = Utils.Clamp((int)drawPlayer.MountedCenter.Y / 16 - 50, 2, Main.maxTilesY - 2);
int BottomRange = Utils.Clamp((int)drawPlayer.MountedCenter.Y / 16 + 50, 2, Main.maxTilesY - 2);
float range = 50000f;
Vector2 ChestPosition = Vector2.Zero;
for (int i = LeftRange; i <= RightRange; i++)
{
for (int j = TopRange; j <= BottomRange; j++)
{
int PotentialChest = Chest.FindChestByGuessing(i, j);
if (PotentialChest != -1 && !TileID.Sets.BasicDresser[Main.tile[i, j].TileType])
{
// Adjust position ot the center of the chest
Chest chest = Main.chest[PotentialChest];
Vector2 chestCenter = new Vector2(chest.x + 1, chest.y + 1) * 16f;
float distance = Vector2.Distance(chestCenter, drawPlayer.MountedCenter);
if (distance < range)
{
range = distance;
ChestPosition = chestCenter;
}
}
}
}
if (!drawInfo.hatHair || Main.rand.NextBool())
{
Rectangle area = drawInfo.hatHair ? Utils.CenteredRectangle(drawInfo.Position + drawPlayer.Size * 0.5f + new Vector2(drawPlayer.direction * -10, drawPlayer.gravDir * -10f), new Vector2(5f, 5f))
: Utils.CenteredRectangle(drawInfo.Position + drawPlayer.Size * 0.5f + new Vector2(0f, drawPlayer.gravDir * -20f), new Vector2(20f, 14f));
Dust sparkle = Dust.NewDustDirect(area.TopLeft(), area.Width, area.Height, DustID.GoldCoin, Alpha: 150, Scale: 0.3f);
sparkle.fadeIn = 1f;
sparkle.velocity = ChestPosition == Vector2.Zero ? (sparkle.velocity * 0.1f) : (ChestPosition - sparkle.position).SafeNormalize(Vector2.Zero) * 0.2f;
sparkle.noLight = true;
sparkle.shader = shader;
drawInfo.DustCache.Add(sparkle.dustIndex);
}
// Back hair
if (drawPlayer.velocity.X != 0f && drawInfo.backHairDraw)
{
Rectangle areaB = Utils.CenteredRectangle(drawInfo.Position + drawPlayer.Size * 0.5f + new Vector2(drawPlayer.direction * -14, 0f), new Vector2(4f, 30f));
Dust sparkleB = Dust.NewDustDirect(areaB.TopLeft(), areaB.Width, areaB.Height, DustID.GoldCoin, Alpha: 150, Scale: 0.3f);
sparkleB.fadeIn = 1f;
sparkleB.velocity = ChestPosition == Vector2.Zero ? (sparkleB.velocity * 0.1f) : (ChestPosition - sparkleB.position).SafeNormalize(Vector2.Zero) * 0.2f;
sparkleB.noLight = true;
sparkleB.shader = shader;
drawInfo.DustCache.Add(sparkleB.dustIndex);
}
}
}
}
-2827
View File
File diff suppressed because it is too large. Load diff
+9
View File
@@ -0,0 +1,9 @@
namespace CalamityMod.Enums
{
public enum HardmodeCrateType
{
Biome,
Mythril,
Titanium
}
}
+1 -1
View File
@@ -1914,7 +1914,7 @@ namespace CalamityMod.ILEditing
return;
var glowMaskTile = GlowMaskTile.InstanceLookup[type];
if (glowMaskTile is null)
if (glowMaskTile is null || !TileDrawing.IsVisible(drawData.tileCache))
return;
var glowMask = glowMaskTile.GlowMask;
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.Calamity().alluringBait = true;
player.fishingSkill += 30;
player.fishingSkill += 10;
}
}
}
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.rBrain = true;
player.GetDamage<GenericDamageClass>() += 0.06f;
player.GetDamage<GenericDamageClass>() += 0.05f;
}
public override void AddRecipes()
-10
View File
@@ -1,6 +1,5 @@
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -30,14 +29,5 @@ namespace CalamityMod.Items.Accessories
modPlayer.RustyMedallionDroplets = true;
player.buffImmune[ModContent.BuffType<Irradiated>()] = true;
}
public override void AddRecipes()
{
CreateRecipe().
AddRecipeGroup("AnySilverBar", 10).
AddIngredient<SulphuricScale>(3).
AddTile(TileID.Anvils).
Register();
}
}
}
+5 -4
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.CalPlayer.Dashes;
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
@@ -28,10 +29,10 @@ namespace CalamityMod.Items.Accessories
{
player.autoJump = true;
player.jumpSpeedBoost += 1.6f;
player.extraFall += 35;
player.noFallDmg = true;
player.blackBelt = true;
player.dashType = 1;
player.Calamity().DashID = string.Empty;
player.dashType = 0;
player.Calamity().DashID = StatisNinjaBeltDash.ID;
player.spikedBoots = 2;
player.accFlipper = true;
}
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.fishingSkill += 80;
player.fishingSkill += 50;
player.accFishingLine = true;
player.accTackleBox = true;
player.accLavaFishing = true;
+29
View File
@@ -0,0 +1,29 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories.Vanity
{
public class TheComb : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void SetDefaults()
{
Item.width = 40;
Item.height = 42;
Item.accessory = true;
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
Item.rare = ItemRarityID.Blue;
Item.vanity = true;
}
public override void UpdateVanity(Player player) => player.Calamity().combHair = true;
public override void UpdateAccessory(Player player, bool hideVisual)
{
if (!hideVisual)
player.Calamity().combHair = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 887 B

+1 -11
View File
@@ -1,5 +1,4 @@
using CalamityMod.Items.Materials;
using Terraria;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Microsoft.Xna.Framework.Graphics;
@@ -87,14 +86,5 @@ namespace CalamityMod.Items
text = GetTextValue("Items.Misc.SpawnBlockersOff");
tooltips.FindAndReplace("[STATE]", text);
}
public override void AddRecipes()
{
CreateRecipe().
AddRecipeGroup("IronBar", 10).
AddIngredient<SulphuricScale>().
AddTile(TileID.Anvils).
Register();
}
}
}
+3 -3
View File
@@ -10,7 +10,6 @@ using CalamityMod.Items.Accessories;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.Items.VanillaArmorChanges;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.NPCs.Other;
@@ -24,6 +23,7 @@ using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Rarities;
using CalamityMod.Systems.Collections;
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.UI;
using CalamityMod.UI.CalamitasEnchants;
@@ -850,7 +850,7 @@ namespace CalamityMod.Items
// Handle general use-item effects for the Gem Tech Armor.
player.Calamity().GemTechState.OnItemUseEffects(item);
if (item.type == ItemID.MonkStaffT1 || CalamityLists.spearAutoreuseList.Contains(item.type))
if (item.type == ItemID.MonkStaffT1 || AutoreusableSpearsList.Includes(item.type))
{
return player.ownedProjectileCounts[item.shoot] <= 0;
}
@@ -1603,7 +1603,7 @@ namespace CalamityMod.Items
#region PostUpdate
public override void PostUpdate(Item item)
{
if (CalamityLists.forceItemList?.Contains(item.type) ?? false)
if (ItemsForcedInsideWorldList.Includes(item.type))
CalamityUtils.ForceItemIntoWorld(item);
}
#endregion
+83 -70
View File
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using CalamityMod.Enums;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Items.PermanentBoosters;
@@ -25,12 +26,6 @@ namespace CalamityMod.Items
public override void ModifyItemLoot(Item item, ItemLoot loot)
{
Fraction fifteenPercent = new Fraction(15, 100);
static bool CryonicAvailable()
{
if (!DownedBossSystem.downedCryogen)
return false;
return (NPC.downedMechBoss1.ToInt() + NPC.downedMechBoss2.ToInt() + NPC.downedMechBoss3.ToInt()) >= 2;
}
switch (item.type)
{
@@ -269,97 +264,55 @@ namespace CalamityMod.Items
loot.AddRevBagAccessories();
loot.Add(ModContent.ItemType<ThankYouPainting>(), ThankYouPainting.DropInt);
// The Celestial Onion only drops if the player hasn't used one, or if the world is not in Master Mode.
loot.AddIf((info) => !info.player.Calamity().extraAccessoryML && !Main.masterMode, ModContent.ItemType<CelestialOnion>());
// The Celestial Onion only drops if the player hasn't used one (or has not used Demon Heart in Master Mode as it alternatively functions as that there)
loot.AddIf((info) => (!info.player.Calamity().extraAccessoryML && !Main.masterMode) || (!info.player.extraAccessory && Main.masterMode), ModContent.ItemType<CelestialOnion>());
break;
#endregion
#region Fishing Crates
// TODO -- What is all this shit?
// Kylie @ 1% (yes this is the consistent rate, dw it's not hard to get one of these)
case ItemID.WoodenCrate:
case ItemID.WoodenCrateHard:
loot.Add(ModContent.ItemType<WulfrumMetalScrap>(), 4, 3, 5); // 25% 3-5 Wulfrum Scrap
loot.Add(ModContent.ItemType<Kylie>(), 20);
loot.Add(ModContent.ItemType<Kylie>(), 100);
// We do not need to pop Hardmode ores out of Pearlwood Crates. They do not drop higher tier ores.
break;
case ItemID.IronCrate:
case ItemID.IronCrateHard:
loot.Add(ModContent.ItemType<WulfrumMetalScrap>(), 4, 5, 8); // 25% 5-8 Wulfrum Scrap
loot.Add(ModContent.ItemType<AncientBoneDust>(), 4, 5, 8); // 25% 5-8 Ancient Bone Dust
RemoveHardmodeOresFromStandardCrates(loot);
loot.AddHardmodeOresToCrates(HardmodeCrateType.Mythril);
break;
// these drops are not available in hardmode because this crate will stop dropping
// Non-crafted underground Gold Chest loot @ 20%; Individually 5%
case ItemID.GoldenCrate:
loot.Add(ItemID.FlareGun, 10); // 10% Flare Gun
loot.Add(ItemID.ShoeSpikes, 10); // 10% Shoe Spikes (BUT NOT CLIMBING CLAWS?)
loot.Add(ItemID.BandofRegeneration, 10); // 10% Band of Regeneration
loot.Add(new OneFromOptionsNotScaledWithLuckDropRule(5, 1,
ItemID.FlareGun,
ItemID.Mace,
ItemID.BandofRegeneration,
ItemID.ShoeSpikes)); // Climbing Claws is in Wooden/Pearlwood (vanilla) in case you're curious
break;
case ItemID.GoldenCrateHard:
// Post-Yharon: 15% 30-40 Auric Ore
loot.AddIf(() => DownedBossSystem.downedYharon, ModContent.ItemType<AuricOre>(), fifteenPercent, 30, 40);
RemoveHardmodeOresFromStandardCrates(loot);
loot.AddHardmodeOresToCrates(HardmodeCrateType.Titanium);
loot.Add(new OneFromOptionsNotScaledWithLuckDropRule(5, 1,
ItemID.FlareGun,
ItemID.Mace,
ItemID.BandofRegeneration,
ItemID.ShoeSpikes));
break;
case ItemID.CorruptFishingCrate:
case ItemID.CrimsonFishingCrate:
case ItemID.CorruptFishingCrateHard:
case ItemID.CrimsonFishingCrateHard:
loot.Add(ModContent.ItemType<BlightedGel>(), fifteenPercent, 5, 8); // 15% 5-8 Blighted Gel
break;
case ItemID.HallowedFishingCrate: // WHY
case ItemID.HallowedFishingCrateHard:
var postProv = loot.DefineConditionalDropSet(() => DownedBossSystem.downedProvidence);
postProv.Add(ModContent.ItemType<UnholyEssence>(), fifteenPercent, 5, 10); // 15% 5-10 Unholy Essence
break;
case ItemID.DungeonFishingCrate:
case ItemID.DungeonFishingCrateHard:
loot.AddIf(() => NPC.downedPlantBoss, ItemID.Ectoplasm, 10, 1, 5); // 10% 1-5 Ectoplasm
loot.AddIf(() => DownedBossSystem.downedPolterghast, ModContent.ItemType<Necroplasm>(), 10, 1, 5); // 10% 1-5 Necroplasm
break;
case ItemID.JungleFishingCrate:
case ItemID.JungleFishingCrateHard:
var postPlant = loot.DefineConditionalDropSet(() => NPC.downedPlantBoss);
postPlant.Add(ModContent.ItemType<PerennialOre>(), 5, 16, 28); // 20% 16-28 Perennial Ore
postPlant.Add(ModContent.ItemType<PerennialBar>(), fifteenPercent, 4, 7); // 15% 4-7 Perennial Bar
loot.AddIf(() => NPC.downedGolemBoss, ModContent.ItemType<PlagueCellCanister>(), 5, 3, 6); // 20% 3-6 Plague Cell Canister
var uelibloom = loot.DefineConditionalDropSet(() => DownedBossSystem.downedProvidence);
uelibloom.Add(ModContent.ItemType<UelibloomOre>(), 5, 16, 28); // 20% 16-28 Uelibloom Ore
uelibloom.Add(ModContent.ItemType<UelibloomBar>(), fifteenPercent, 4, 7); // 15% 4-7 Uelibloom Bar
break;
case ItemID.FloatingIslandFishingCrate:
case ItemID.FloatingIslandFishingCrateHard:
var evilBossTwo = loot.DefineConditionalDropSet(() => DownedBossSystem.downedHiveMind || DownedBossSystem.downedPerforator);
evilBossTwo.Add(ModContent.ItemType<AerialiteOre>(), 5, 16, 28); // 20% 16-28 Aerialite Ore
evilBossTwo.Add(ModContent.ItemType<AerialiteBar>(), fifteenPercent, 4, 7); // 15% 4-7 Aerialite Bar
loot.AddIf(() => Main.hardMode, ModContent.ItemType<EssenceofSunlight>(), 5, 2, 4); // 20% 2-4 Essence of Sunlight
loot.AddIf(() => NPC.downedMoonlord, ModContent.ItemType<ExodiumCluster>(), 5, 16, 28); // 20% 16-28 Exodium Clusters
break;
case ItemID.FrozenCrate:
case ItemID.FrozenCrateHard:
var cryonic = loot.DefineConditionalDropSet(CryonicAvailable);
cryonic.Add(ModContent.ItemType<CryonicOre>(), 5, 16, 28); // 20% 16-28 Cryonic Ore
cryonic.Add(ModContent.ItemType<CryonicBar>(), fifteenPercent, 4, 7); // 15% 4-7 Cryonic Bar
loot.AddIf(() => Main.hardMode, ModContent.ItemType<EssenceofEleum>(), 5, 2, 4); // 20% 2-4 Essence of Eleum
break;
case ItemID.LavaCrate:
case ItemID.LavaCrateHard:
loot.AddIf(() => Main.hardMode, ModContent.ItemType<EssenceofHavoc>(), 5, 2, 4); // 20% 2-4 Essence of Havoc
break;
// Calamity does not touch Oasis Crates yet
case ItemID.OasisCrate:
case ItemID.OasisCrateHard:
break;
// Calamity does not touch Ocean Crates yet
case ItemID.OceanCrate:
case ItemID.OceanCrateHard:
RemoveHardmodeOresFromBiomeCrates(loot);
loot.AddHardmodeOresToCrates(HardmodeCrateType.Biome);
break;
#endregion
@@ -530,6 +483,66 @@ namespace CalamityMod.Items
}
#endregion
#region Fishing Crate Loot Rule Manipulation
private static void RemoveHardmodeOresFromStandardCrates(ItemLoot loot)
{
List<IItemDropRule> rules = loot.Get(false);
// This is the primary rule which contains every drop
AlwaysAtleastOneSuccessDropRule mainRule = null;
foreach (IItemDropRule rule in rules)
if (rule is AlwaysAtleastOneSuccessDropRule a)
mainRule = a;
if (mainRule is null)
return;
// Find ones that are supposed to be for the ore and not the other loot
foreach (IItemDropRule rule in mainRule.rules)
{
// Hardmode ores/bars are both nested within *another* nested rule
if (rule is SequentialRulesNotScalingWithLuckRule oreRule)
{
// Confirm that this is for the ore/bar then pop the numerator for the big rule
foreach (IItemDropRule nestedRule in oreRule.rules)
{
if (nestedRule is SequentialRulesNotScalingWithLuckRule s)
{
oreRule.chanceNumerator = 0;
return;
}
}
}
}
}
private static void RemoveHardmodeOresFromBiomeCrates(ItemLoot loot)
{
List<IItemDropRule> rules = loot.Get(false);
// This is the primary rule which contains every drop
AlwaysAtleastOneSuccessDropRule mainRule = null;
foreach (IItemDropRule rule in rules)
if (rule is AlwaysAtleastOneSuccessDropRule a)
mainRule = a;
if (mainRule is null)
return;
foreach (IItemDropRule rule in mainRule.rules)
{
// 2 rules, one for ore and another for bar, nested within *another* nested rule
if (rule is SequentialRulesNotScalingWithLuckRule oreRule)
{
// Confirm that this is for the ore/bar then pop the numerator for the big rule
foreach (IItemDropRule nestedRule in oreRule.rules)
{
if (nestedRule is OneFromRulesRule o)
oreRule.chanceNumerator = 0;
}
}
}
}
#endregion
#region Goodie Bag Bat Hook
private static void RemoveBatHookFromGoodieBag(ItemLoot loot)
{
+10 -62
View File
@@ -1,16 +1,6 @@
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Critters;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Astral;
using Terraria;
using Terraria.GameContent.ItemDropRules;
using Terraria.ID;
using Terraria.ModLoader;
@@ -29,18 +19,10 @@ namespace CalamityMod.Items.Fishing.AstralCatches
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.maxStack = 9999;
Item.consumable = true;
Item.rare = ItemRarityID.Green;
Item.DefaultToPlaceableTile(ModContent.TileType<AstralCrateTile>());
Item.width = Item.height = 32;
Item.value = Item.sellPrice(gold: 1);
Item.createTile = ModContent.TileType<AstralCrateTile>();
Item.useTurn = true;
Item.autoReuse = true;
Item.useAnimation = 15;
Item.useTime = 10;
Item.useStyle = ItemUseStyleID.Swing;
Item.rare = ItemRarityID.Green;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
@@ -51,48 +33,14 @@ namespace CalamityMod.Items.Fishing.AstralCatches
public override bool CanRightClick() => true;
public override void ModifyItemLoot(ItemLoot itemLoot)
{
var postAstrumAureus = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAstrumAureus);
var postAstrumDeus = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAstrumDeus);
// 4-10 Starblight Soot @ 50%
// This is our equivalent to Crystal Shards/Ichor
itemLoot.Add(ModContent.ItemType<StarblightSoot>(), 2, 4, 10);
// Materials
itemLoot.Add(ModContent.ItemType<StarblightSoot>(), 1, 5, 10);
itemLoot.Add(ItemID.FallenStar, 1, 5, 10);
itemLoot.Add(ItemID.Meteorite, 5, 10, 20);
itemLoot.Add(ItemID.MeteoriteBar, 10, 1, 3);
// Astrophage @ 5%
itemLoot.Add(ModContent.ItemType<AstrophageItem>(), 20);
postAstrumAureus.Add(ModContent.ItemType<AureusCell>(), 5, 2, 5);
postAstrumDeus.Add(ModContent.ItemType<AstralOre>(), 5, 10, 20);
postAstrumDeus.Add(ModContent.ItemType<AstralBar>(), 10, 1, 3);
postAstrumDeus.Add(ModContent.ItemType<MeldBlob>(), 4, 5, 10);
// Weapons (and Starburster Core)
postAstrumAureus.Add(new OneFromOptionsDropRule(10, 1,
ModContent.ItemType<AstralScythe>(),
ModContent.ItemType<TitanArm>(),
ModContent.ItemType<StellarCannon>(),
ModContent.ItemType<AstralachneaStaff>(),
ModContent.ItemType<HivePod>(),
ModContent.ItemType<StellarKnife>(),
ModContent.ItemType<StarbusterCore>()
));
// Pet
itemLoot.Add(ModContent.ItemType<AstrophageItem>(), 10);
// Bait
itemLoot.Add(ModContent.ItemType<TwinklerItem>(), 5, 1, 3);
itemLoot.Add(ItemID.EnchantedNightcrawler, 5, 1, 3);
itemLoot.Add(ModContent.ItemType<ArcturusAstroidean>(), 5, 1, 3);
itemLoot.Add(ItemID.Firefly, 3, 1, 3);
// Potions
postAstrumAureus.Add(ModContent.ItemType<AstralInjection>(), 10, 1, 3);
postAstrumAureus.Add(ModContent.ItemType<GravityNormalizerPotion>(), 10, 1, 3);
itemLoot.AddCratePotionRules();
// Money
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
itemLoot.AddBiomeCrateLootRules();
}
}
}
+7 -33
View File
@@ -1,5 +1,4 @@
using CalamityMod.Items.Critters;
using CalamityMod.Tiles.Astral;
using CalamityMod.Tiles.Astral;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -17,18 +16,10 @@ namespace CalamityMod.Items.Fishing.AstralCatches
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.maxStack = 9999;
Item.consumable = true;
Item.rare = ItemRarityID.Green;
Item.DefaultToPlaceableTile(ModContent.TileType<MonolithCrateTile>());
Item.width = Item.height = 32;
Item.value = Item.sellPrice(gold: 1);
Item.createTile = ModContent.TileType<MonolithCrateTile>();
Item.useTurn = true;
Item.autoReuse = true;
Item.useAnimation = 15;
Item.useTime = 10;
Item.useStyle = ItemUseStyleID.Swing;
Item.rare = ItemRarityID.Green;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
@@ -39,27 +30,10 @@ namespace CalamityMod.Items.Fishing.AstralCatches
public override bool CanRightClick() => true;
public override void ModifyItemLoot(ItemLoot itemLoot)
{
// Materials
itemLoot.Add(ItemID.FallenStar, 1, 5, 10);
itemLoot.Add(ItemID.Meteorite, 5, 10, 20);
itemLoot.Add(ItemID.MeteoriteBar, 10, 1, 3);
// Astrophage @ 5%
itemLoot.Add(ModContent.ItemType<AstrophageItem>(), 20);
// Pet
itemLoot.Add(ModContent.ItemType<AstrophageItem>(), 10);
// Bait
itemLoot.Add(ModContent.ItemType<TwinklerItem>(), 5, 1, 3);
itemLoot.Add(ItemID.EnchantedNightcrawler, 5, 1, 3);
itemLoot.Add(ModContent.ItemType<ArcturusAstroidean>(), 5, 1, 3);
itemLoot.Add(ItemID.Firefly, 3, 1, 3);
// Potions
itemLoot.AddCratePotionRules(false);
// Money
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
itemLoot.AddBiomeCrateLootRules(false);
}
}
}
@@ -1,6 +1,4 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Potions;
using CalamityMod.Tiles.Crags;
using CalamityMod.Tiles.Crags;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -42,27 +40,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
public override bool CanRightClick() => true;
public override void ModifyItemLoot(ItemLoot itemLoot)
{
// Materials
itemLoot.Add(ItemID.Obsidian, 1, 2, 5);
itemLoot.Add(ItemID.Hellstone, 4, 2, 5);
itemLoot.Add(ItemID.HellstoneBar, 10, 1, 3);
itemLoot.AddIf(() => DownedBossSystem.downedBrimstoneElemental, ModContent.ItemType<UnholyCore>(), 10, 1, 3);
itemLoot.AddIf(() => DownedBossSystem.downedProvidence, ModContent.ItemType<Bloodstone>(), 2, 1, 3);
// Weapons (none)
// Bait
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
// Potions
itemLoot.Add(ItemID.InfernoPotion, 10, 1, 3);
itemLoot.AddCratePotionRules();
// Money
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
itemLoot.AddBiomeCrateLootRules();
}
}
}
@@ -1,5 +1,4 @@
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Crags;
using CalamityMod.Tiles.Crags;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -17,18 +16,10 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.maxStack = 9999;
Item.consumable = true;
Item.rare = ItemRarityID.Green;
Item.DefaultToPlaceableTile(ModContent.TileType<SlagCrateTile>());
Item.width = Item.height = 32;
Item.value = Item.sellPrice(gold: 1);
Item.createTile = ModContent.TileType<SlagCrateTile>();
Item.useTurn = true;
Item.autoReuse = true;
Item.useAnimation = 15;
Item.useTime = 10;
Item.useStyle = ItemUseStyleID.Swing;
Item.rare = ItemRarityID.Green;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
@@ -39,25 +30,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
public override bool CanRightClick() => true;
public override void ModifyItemLoot(ItemLoot itemLoot)
{
// Materials
itemLoot.Add(ItemID.Obsidian, 1, 2, 5);
itemLoot.Add(ItemID.Hellstone, 4, 2, 5);
itemLoot.Add(ItemID.HellstoneBar, 10, 1, 3);
// Weapons (none)
// Bait
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
// Potions
itemLoot.Add(ItemID.InfernoPotion, 10, 1, 3);
itemLoot.AddCratePotionRules(false);
// Money
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
itemLoot.AddBiomeCrateLootRules(false);
}
}
}
@@ -27,6 +27,11 @@ namespace CalamityMod.Items.Fishing.FishingRods
Item.rare = ModContent.RarityType<Turquoise>();
}
public override void HoldItem(Player player)
{
player.accFishingLine = true;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
for (int i = 0; i < 6; i++)
@@ -33,6 +33,11 @@ namespace CalamityMod.Items.Fishing.FishingRods
Item.rare = ModContent.RarityType<DarkBlue>();
}
public override void HoldItem(Player player)
{
player.accFishingLine = true;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
for (int i = 0; i < 10; i++)
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Fishing
Item.maxStack = Item.CommonMaxStack;
Item.rare = ItemRarityID.LightRed;
Item.value = Item.sellPrice(silver: 30);
Item.bait = 65;
Item.bait = 75;
Item.consumable = true;
}
+8 -1
View File
@@ -1,4 +1,6 @@
using System.Collections.Generic;
using CalamityMod.Items.Placeables.Astral;
using CalamityMod.Items.Placeables.Crags;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -30,6 +32,8 @@ namespace CalamityMod.Items.Fishing
ItemID.GrassSeeds,
ItemID.JungleGrassSeeds,
ItemID.MushroomGrassSeeds,
ItemID.AshGrassSeeds,
ModContent.ItemType<CinderBlossomSeeds>(),
ItemID.PumpkinSeed
};
@@ -84,12 +88,15 @@ namespace CalamityMod.Items.Fishing
itemLoot.Add(ItemID.GrassSeeds, 10, seedMin, seedMax);
itemLoot.Add(ItemID.JungleGrassSeeds, 10, seedMin, seedMax);
itemLoot.Add(ItemID.MushroomGrassSeeds, 10, seedMin, seedMax);
itemLoot.Add(ItemID.AshGrassSeeds, 20, seedMin, seedMax);
itemLoot.Add(ModContent.ItemType<CinderBlossomSeeds>(), 20, seedMin, seedMax);
itemLoot.Add(ItemID.PumpkinSeed, 20, seedMin, seedMax);
// Biome grass seeds
itemLoot.AddIf(() => !WorldGen.crimson, ItemID.CorruptSeeds, 20, seedMin, seedMax);
itemLoot.AddIf(() => WorldGen.crimson, ItemID.CrimsonSeeds, 20, seedMin, seedMax);
itemLoot.AddIf(() => Main.hardMode, ItemID.HallowedSeeds, 20, seedMin, seedMax);
itemLoot.AddIf(() => Main.hardMode, ModContent.ItemType<AstralGrassSeeds>(), 20, seedMin, seedMax);
// Add Thorium Marine Kelp if Thorium is loaded.
Mod thorium = ExternalMods.thorium;
@@ -1,9 +1,6 @@
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Pets;
using CalamityMod.Items.Placeables.Abyss;
using CalamityMod.Items.Placeables.Ores;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Placeables.Furniture;
using CalamityMod.Items.Tools.ClimateChange;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Melee;
@@ -31,18 +28,10 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.maxStack = 9999;
Item.consumable = true;
Item.rare = ItemRarityID.Green;
Item.DefaultToPlaceableTile(ModContent.TileType<HydrothermalCrateTile>());
Item.width = Item.height = 32;
Item.value = Item.sellPrice(gold: 1);
Item.createTile = ModContent.TileType<HydrothermalCrateTile>();
Item.useTurn = true;
Item.autoReuse = true;
Item.useAnimation = 15;
Item.useTime = 10;
Item.useStyle = ItemUseStyleID.Swing;
Item.rare = ItemRarityID.Green;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
@@ -53,51 +42,29 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
public override bool CanRightClick() => true;
public override void ModifyItemLoot(ItemLoot itemLoot)
{
// The contents of this crate depend massively on progression, so it uses a large number of LeadingConditionRules.
var tier1AbyssAvailable = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedSlimeGod || Main.hardMode);
var tier2AbyssAvailable = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedLeviathan);
var scoriaAvailable = itemLoot.DefineConditionalDropSet(() => NPC.downedGolemBoss);
var tier1AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedEoCAcidRain);
var tier2AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAquaticScourgeAcidRain);
var tier3AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedPolterghast && DownedBossSystem.downedBoomerDuke);
// 20-50 Blocks @ 100%; Individually 33.33%
itemLoot.Add(new OneFromRulesRule(1, new IItemDropRule[3]
{
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.Abyss.SulphurousSand>(), 1, 20, 50),
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.Abyss.SulphurousSandstone>(), 1, 20, 50),
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.Abyss.HardenedSulphurousSandstone>(), 1, 20, 50)
}));
// Materials
itemLoot.Add(ModContent.ItemType<Items.Placeables.Abyss.SulphurousSand>(), 1, 5, 10);
itemLoot.Add(ModContent.ItemType<Items.Placeables.Abyss.SulphurousSandstone>(), 1, 5, 10);
itemLoot.Add(ModContent.ItemType<Items.Placeables.Abyss.HardenedSulphurousSandstone>(), 1, 5, 10);
itemLoot.Add(ModContent.ItemType<Acidwood>(), 1, 5, 10);
tier1AcidRain.Add(ModContent.ItemType<SulphuricScale>(), 10, 1, 3);
tier2AcidRain.Add(ModContent.ItemType<CorrodedFossil>(), 10, 1, 3);
tier2AbyssAvailable.Add(ModContent.ItemType<DepthCells>(), 5, 2, 5);
tier2AbyssAvailable.Add(ModContent.ItemType<Lumenyl>(), 5, 2, 5);
tier2AbyssAvailable.Add(ModContent.ItemType<Items.Placeables.Abyss.PlantyMush>(), 5, 2, 5);
scoriaAvailable.Add(ModContent.ItemType<ScoriaOre>(), 5, 16, 28);
scoriaAvailable.Add(ModContent.ItemType<ScoriaBar>(), new Fraction(15, 100), 4, 7);
tier3AcidRain.Add(ModContent.ItemType<ReaperTooth>(), 10, 1, 5);
// Rusty Chest Loot @ 100%; Individually 25%
itemLoot.Add(new OneFromOptionsNotScaledWithLuckDropRule(1, 1,
ModContent.ItemType<BrokenWaterFilter>(),
ModContent.ItemType<EffigyOfDecay>(),
ModContent.ItemType<RustyBeaconPrototype>(),
ModContent.ItemType<RustyMedallion>()
));
// Pre-HM Abyss Weapons
tier1AbyssAvailable.Add(new OneFromOptionsDropRule(10, 1,
itemLoot.Add(new OneFromOptionsDropRule(10, 1,
ModContent.ItemType<BallOFugu>(),
ModContent.ItemType<Archerfish>(),
ModContent.ItemType<BlackAnurian>(),
ModContent.ItemType<HerringStaff>(),
ModContent.ItemType<Lionfish>()
));
// Post-AS Acid Rain Weapons (and Nuclear Rod)
tier2AcidRain.Add(new OneFromOptionsDropRule(10, 1,
ModContent.ItemType<SulphurousGrabber>(),
ModContent.ItemType<FlakToxicannon>(),
ModContent.ItemType<BelchingSaxophone>(),
ModContent.ItemType<SlitheringEels>(),
ModContent.ItemType<SkyfinBombers>(),
ModContent.ItemType<SpentFuelContainer>(),
ModContent.ItemType<NuclearFuelRod>()
));
// Pre-HM Abyss Equipment (and Torrential Tear)
tier1AbyssAvailable.Add(new OneFromOptionsDropRule(4, 1,
ModContent.ItemType<Lionfish>(),
ModContent.ItemType<AnechoicPlating>(),
ModContent.ItemType<DepthCharm>(),
ModContent.ItemType<IronBoots>(),
@@ -105,18 +72,7 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
ModContent.ItemType<TorrentialTear>()
));
// Bait
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
// Potions
itemLoot.Add(ModContent.ItemType<AnechoicCoating>(), 10, 1, 3);
itemLoot.AddCratePotionRules();
// Money
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
itemLoot.AddBiomeCrateLootRules();
}
}
}
+19 -59
View File
@@ -1,19 +1,11 @@
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Pets;
using CalamityMod.Items.Placeables.Abyss;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Tools.ClimateChange;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Items.Placeables.Furniture;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.Tiles.Abyss;
using Terraria;
using Terraria.GameContent.ItemDropRules;
using Terraria.ID;
using Terraria.ModLoader;
using CrateTile = CalamityMod.Tiles.Abyss.SulphurousCrateTile;
namespace CalamityMod.Items.Fishing.SulphurCatches
{
@@ -29,18 +21,10 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.maxStack = 9999;
Item.consumable = true;
Item.rare = ItemRarityID.Green;
Item.DefaultToPlaceableTile(ModContent.TileType<SulphurousCrateTile>());
Item.width = Item.height = 32;
Item.value = Item.sellPrice(gold: 1);
Item.createTile = ModContent.TileType<CrateTile>();
Item.useTurn = true;
Item.autoReuse = true;
Item.useAnimation = 15;
Item.useTime = 10;
Item.useStyle = ItemUseStyleID.Swing;
Item.rare = ItemRarityID.Green;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
@@ -51,47 +35,23 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
public override bool CanRightClick() => true;
public override void ModifyItemLoot(ItemLoot itemLoot)
{
var tier1AbyssAvailable = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedSlimeGod || Main.hardMode);
var tier1AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedEoCAcidRain);
// 20-50 Blocks @ 100%; Individually 33.33%
itemLoot.Add(new OneFromRulesRule(1, new IItemDropRule[3]
{
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.Abyss.SulphurousSand>(), 1, 20, 50),
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.Abyss.SulphurousSandstone>(), 1, 20, 50),
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.Abyss.HardenedSulphurousSandstone>(), 1, 20, 50)
}));
// Materials
itemLoot.Add(ModContent.ItemType<SulphurousSand>(), 1, 5, 10);
itemLoot.Add(ModContent.ItemType<SulphurousSandstone>(), 1, 5, 10);
itemLoot.Add(ModContent.ItemType<HardenedSulphurousSandstone>(), 1, 5, 10);
itemLoot.Add(ModContent.ItemType<Acidwood>(), 1, 5, 10);
tier1AcidRain.Add(ModContent.ItemType<SulphuricScale>(), 10, 1, 3);
// Pre-HM Abyss Weapons
tier1AbyssAvailable.Add(new OneFromOptionsDropRule(10, 1,
ModContent.ItemType<BallOFugu>(),
ModContent.ItemType<Archerfish>(),
ModContent.ItemType<BlackAnurian>(),
ModContent.ItemType<HerringStaff>(),
ModContent.ItemType<Lionfish>()
// Rusty Chest Loot @ 100%; Individually 25%
itemLoot.Add(new OneFromOptionsNotScaledWithLuckDropRule(1, 1,
ModContent.ItemType<BrokenWaterFilter>(),
ModContent.ItemType<EffigyOfDecay>(),
ModContent.ItemType<RustyBeaconPrototype>(),
ModContent.ItemType<RustyMedallion>()
));
// Pre-HM Abyss Equipment (and Torrential Tear)
tier1AbyssAvailable.Add(new OneFromOptionsDropRule(4, 1,
ModContent.ItemType<AnechoicPlating>(),
ModContent.ItemType<DepthCharm>(),
ModContent.ItemType<IronBoots>(),
ModContent.ItemType<StrangeOrb>(),
ModContent.ItemType<TorrentialTear>()
));
// Bait
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
// Potions
itemLoot.Add(ModContent.ItemType<AnechoicCoating>(), 10, 1, 3);
itemLoot.AddCratePotionRules(false);
// Money
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
itemLoot.AddBiomeCrateLootRules(false);
}
}
}
@@ -1,10 +1,4 @@
using CalamityMod.Items.Critters;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.SunkenSea;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.Tiles.SunkenSea;
using Terraria;
using Terraria.GameContent.ItemDropRules;
using Terraria.ID;
@@ -24,18 +18,10 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.maxStack = 9999;
Item.consumable = true;
Item.rare = ItemRarityID.Green;
Item.DefaultToPlaceableTile(ModContent.TileType<EutrophicCrateTile>());
Item.width = Item.height = 32;
Item.value = Item.sellPrice(gold: 1);
Item.createTile = ModContent.TileType<Tiles.SunkenSea.EutrophicCrateTile>();
Item.useTurn = true;
Item.autoReuse = true;
Item.useAnimation = 15;
Item.useTime = 10;
Item.useStyle = ItemUseStyleID.Swing;
Item.rare = ItemRarityID.Green;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
@@ -46,27 +32,15 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
public override bool CanRightClick() => true;
public override void ModifyItemLoot(ItemLoot itemLoot)
{
var postDesertScourge = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedDesertScourge);
// 20-50 Blocks @ 100%; Individually 33.33%
itemLoot.Add(new OneFromRulesRule(1, new IItemDropRule[3]
{
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.SunkenSea.Navystone>(), 1, 20, 50),
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.SunkenSea.EutrophicSand>(), 1, 20, 50),
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.SunkenSea.Driftwood>(), 1, 20, 50)
}));
// Materials
itemLoot.Add(ModContent.ItemType<Navystone>(), 1, 10, 30);
itemLoot.Add(ModContent.ItemType<EutrophicSand>(), 1, 10, 30);
itemLoot.Add(ModContent.ItemType<Driftwood>(), 1, 30, 60);
postDesertScourge.Add(ModContent.ItemType<PrismShard>(), 1, 5, 10);
postDesertScourge.Add(ModContent.ItemType<SeaPrism>(), 5, 2, 5);
// Bait
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
itemLoot.Add(ModContent.ItemType<SeaMinnowItem>(), 5, 1, 3);
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
// Potions
itemLoot.AddCratePotionRules(false);
// Money
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
itemLoot.AddBiomeCrateLootRules(false);
}
}
}
+12 -49
View File
@@ -1,11 +1,4 @@
using CalamityMod.Items.Critters;
using CalamityMod.Items.Fishing.BrimstoneCragCatches;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.SunkenSea;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.Tiles.SunkenSea;
using Terraria;
using Terraria.GameContent.ItemDropRules;
using Terraria.ID;
@@ -26,18 +19,10 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.maxStack = 9999;
Item.consumable = true;
Item.rare = ItemRarityID.Green;
Item.DefaultToPlaceableTile(ModContent.TileType<PrismCrateTile>());
Item.width = Item.height = 32;
Item.value = Item.sellPrice(gold: 1);
Item.createTile = ModContent.TileType<Tiles.SunkenSea.PrismCrateTile>();
Item.useTurn = true;
Item.autoReuse = true;
Item.useAnimation = 15;
Item.useTime = 10;
Item.useStyle = ItemUseStyleID.Swing;
Item.rare = ItemRarityID.Green;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
@@ -48,37 +33,15 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
public override bool CanRightClick() => true;
public override void ModifyItemLoot(ItemLoot itemLoot)
{
var postDesertScourge = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedDesertScourge);
var postHardmodeClam = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedCLAMHardMode);
// 20-50 Blocks @ 100%; Individually 33.33%
itemLoot.Add(new OneFromRulesRule(1, new IItemDropRule[3]
{
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.SunkenSea.Navystone>(), 1, 20, 50),
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.SunkenSea.EutrophicSand>(), 1, 20, 50),
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.SunkenSea.Driftwood>(), 1, 20, 50)
}));
// Materials
itemLoot.Add(ModContent.ItemType<Navystone>(), 1, 10, 30);
itemLoot.Add(ModContent.ItemType<EutrophicSand>(), 1, 10, 30);
itemLoot.Add(ModContent.ItemType<Driftwood>(), 1, 30, 60);
postDesertScourge.Add(ModContent.ItemType<PrismShard>(), 1, 5, 10);
postDesertScourge.Add(ModContent.ItemType<SeaPrism>(), 5, 2, 5);
postHardmodeClam.Add(ModContent.ItemType<MolluskHusk>(), new Fraction(12, 100), 2, 5);
// Weapons
postHardmodeClam.Add(new OneFromOptionsNotScaledWithLuckDropRule(7, 100,
ModContent.ItemType<ClamCrusher>(),
ModContent.ItemType<ClamorRifle>(),
ModContent.ItemType<Poseidon>(),
ModContent.ItemType<ShellfishStaff>()
));
// Bait
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
itemLoot.Add(ModContent.ItemType<SeaMinnowItem>(), 5, 1, 3);
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
// Potions
itemLoot.AddCratePotionRules();
// Money
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
itemLoot.AddBiomeCrateLootRules();
}
}
}
+2 -2
View File
@@ -17,12 +17,12 @@ namespace CalamityMod.Items.Mounts
MountData.buff = ModContent.BuffType<BumbledogeMount>();
// Attack
MountData.abilityCooldown = 15;
MountData.abilityCooldown = 12;
// Horizontal movement
MountData.runSpeed = 10f;
MountData.dashSpeed = 14.15f;
MountData.acceleration = 0.16f;
MountData.acceleration = 0.2f;
// Vertical movement
MountData.fallDamage = 0f;
+1 -1
View File
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Mounts
MountData.runSpeed = 5f;
MountData.dashSpeed = 10f;
MountData.swimSpeed = 6f;
MountData.acceleration = 0.6f;
MountData.acceleration = 1f;
// Vertical movement
MountData.fallDamage = 0f;
+1 -1
View File
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Mounts
MountData.buff = ModContent.BuffType<OnyxExcavatorBuff>();
// Horizontal movement
MountData.runSpeed = 6.5f;
MountData.runSpeed = 5.5f;
MountData.swimSpeed = 0.5f;
MountData.acceleration = 0.2f;
@@ -1,5 +1,3 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Abyss;
using CalamityMod.Tiles.Furniture;
using Terraria;
using Terraria.ID;
@@ -16,13 +14,5 @@ namespace CalamityMod.Items.Placeables.Furniture
Item.value = Item.sellPrice(silver: 10);
Item.rare = ItemRarityID.Blue;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<Acidwood>(10).
AddIngredient<SulphuricScale>(2).
AddTile(TileID.Anvils).
Register();
}
}
}
+2 -2
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 130;
Item.height = 130;
Item.damage = 92;
Item.damage = 110;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = 30;
Item.useStyle = ItemUseStyleID.Swing;
@@ -52,7 +52,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
for (int i = 0; i < 6; i++)
for (int i = 0; i < 5; i++)
{
Projectile.NewProjectile(source, position, velocity.RotatedByRandom(0.6f) * Main.rand.NextFloat(0.7f, 1.1f), type, damage / 2, knockback * 0.5f, player.whoAmI);
}
+52 -5
View File
@@ -1,8 +1,11 @@
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria.DataStructures;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using System;
namespace CalamityMod.Items.Weapons.Ranged
{
@@ -18,21 +21,65 @@ namespace CalamityMod.Items.Weapons.Ranged
{
Item.width = 90;
Item.height = 30;
Item.damage = 144;
Item.damage = 550;
Item.DamageType = DamageClass.Ranged;
Item.useTime = 18;
Item.useAnimation = 18;
Item.useTime = 35;
Item.useAnimation = 35;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 6f;
Item.autoReuse = true;
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
Item.UseSound = SoundID.Item95;
Item.shoot = ModContent.ProjectileType<SulphuricBlast>();
Item.UseSound = SoundID.Item73;
Item.useAmmo = AmmoID.Rocket;
Item.shoot = ModContent.ProjectileType<AcidRocket>();
Item.shootSpeed = 16f;
Item.rare = ModContent.RarityType<PureGreen>();
}
public override Vector2? HoldoutOffset() => Vector2.UnitX * -15f;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
// Reposition to the gun's tip + add some inaccuracy
Vector2 newPos = position + new Vector2(78f, player.direction * (Math.Abs(velocity.SafeNormalize(Vector2.Zero).X) < 0.02f ? -2f : -8f)).RotatedBy(velocity.ToRotation());
Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(10f));
//Find which rocket type the player will be using.
player.PickAmmo(player.HeldItem, out _, out _, out _, out _, out int rocketType);
Projectile.NewProjectile(source, newPos, newVel, Item.shoot, damage, knockback, player.whoAmI,rocketType);
return false;
}
public override void UseStyle(Player player, Rectangle heldItemFrame)
{
player.ChangeDir(Math.Sign((player.Calamity().mouseWorld - player.Center).X));
float itemRotation = player.compositeFrontArm.rotation + MathHelper.PiOver2 * player.gravDir;
float pullback = 7f;
float animProgress = 0.5f - player.itemTime / (float)player.itemTimeMax;
float rotation = (player.Center - player.Calamity().mouseWorld).ToRotation() * player.gravDir + MathHelper.PiOver2;
if (animProgress < 0.4f)
pullback -= (2.75f) * (float)Math.Pow((0.6f - animProgress) / 0.6f, 2);
Vector2 itemPosition = player.MountedCenter + itemRotation.ToRotationVector2() * pullback;
Vector2 itemSize = new Vector2(52, 28);
Vector2 itemOrigin = new Vector2(-24, 4);
CalamityUtils.CleanHoldStyle(player, itemRotation, itemPosition, itemSize, itemOrigin);
base.UseStyle(player, heldItemFrame);
}
public override void UseItemFrame(Player player)
{
player.ChangeDir(Math.Sign((player.Calamity().mouseWorld - player.Center).X));
float animProgress = 0.5f - player.itemTime / (float)player.itemTimeMax;
float rotation = (player.Center - player.Calamity().mouseWorld).ToRotation() * player.gravDir + MathHelper.PiOver2;
player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, rotation);
}
}
}
+7 -1
View File
@@ -7,8 +7,14 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class Malachite : RogueWeapon
// Have to directly implement the interface instead of extending LegendaryItem since it already extends RogueWeapon
public class Malachite : RogueWeapon, IHoldShiftTooltipItem
{
public string ExtensionIndicatorKey => "Items.Misc.LegendaryShortTooltip";
public Color? ExtensionIndicatorColor => null;
public string TooltipExtensionKey => "LegendaryText";
public Color? TooltipExtensionColor => Color.Lime;
public override void SetStaticDefaults()
{
ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true;
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue
{
Item.width = 42;
Item.height = 36;
Item.damage = 27;
Item.damage = 50;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.channel = true;
+1 -11
View File
@@ -1,5 +1,4 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -44,14 +43,5 @@ namespace CalamityMod.Items.Weapons.Summon
player.UpdateMaxTurrets();
return false;
}
public override void AddRecipes()
{
CreateRecipe().
AddRecipeGroup("AnySilverBar", 10).
AddIngredient<SulphuricScale>(3).
AddTile(TileID.Anvils).
Register();
}
}
}
@@ -93,9 +93,8 @@ AlluringBait: {
DisplayName: Alluring Bait
Tooltip:
'''
Increases fishing power by 30
Greatly increases chance of catching potion ingredient fish
Potion ingredient fish yield is increased
Increases fishing power by 10
Increases the yield of potion ingredient fish
'''
}
@@ -706,7 +705,12 @@ ElysianAegis: {
EnchantedPearl: {
DisplayName: Enchanted Pearl
Tooltip: Increases fishing power by 10 and crate catch chance by 10%
Tooltip:
'''
Increases fishing power by 10
Increases chance to catch crates and loot-containing fish by 15%
Crates are 25% more likely to be higher quality
'''
}
EtherealExtorter: {
@@ -1412,7 +1416,7 @@ RottenBrain: {
DisplayName: Rotten Brain
Tooltip:
'''
6% increased damage
5% increased damage
Taking damage spawns a dank creeper
The dank creeper flies above you, exploding into several shaderain clouds
'''
@@ -1633,8 +1637,7 @@ StatisNinjaBelt: {
DisplayName: Statis' Ninja Belt
Tooltip:
'''
32% increased jump speed and allows auto-jump
Increased fall damage resistance by 35 blocks
32% increased jump speed, allows auto-jump, and negates fall damage
Grants the ability to swim, climb walls, dash, and dodge attacks
'''
HoldShiftTooltip:
@@ -1650,7 +1653,8 @@ StatisVoidSash: {
Tooltip:
'''
32% increased jump speed, allows auto-jump, and negates fall damage
Can swim, climb walls, dash, and dodge attacks
Grants the ability to swim, climb walls, dash, and dodge attacks
Dashes leave homing scythes in your wake
'''
HoldShiftTooltip:
'''
@@ -1747,11 +1751,9 @@ SupremeBaitTackleBoxFishingStation: {
DisplayName: Supreme Bait Tackle Box Fishing Station
Tooltip:
'''
Increases fishing skill by 80, and crate catch chance by 10%
Increases fishing power by 50
Fishing line will never break and decreases chance of bait consumption
Allows fishing in lava
Sonar potion effect
The ultimate fishing accessory
Allows fishing in lava and detects hooked fish
'''
}
@@ -2082,6 +2084,16 @@ SharkyPlush: {
Tooltip: "[c/696969:'Look around, at the sight and sound...']"
}
TheComb: {
DisplayName: The Comb
Tooltip:
'''
Gives the wearer's hair a lustrous finish
Sparkles are attracted to nearby chests
'We ain't found shit!'
'''
}
XyksBlessingBlue: {
DisplayName: Xyk's Blessing (Blue)
Tooltip:
@@ -1256,7 +1256,11 @@ StormSurge: {
SulphuricAcidCannon: {
DisplayName: Sulphuric Acid Cannon
Tooltip: Fires an acidic shot that sticks to enemies and dissolves them
Tooltip:
'''
Fires homing Acid Rockets
Acid Rockets stick to enemies and explode into toxic mist after a short delay
'''
}
SuperradiantSlaughterer: {
@@ -687,6 +687,23 @@ Malachite: {
Press <right> to throw a single kunai that pierces, after piercing an enemy it emits a massive explosion on the next enemy hit
Stealth strikes fire three kunai that home in, stick to enemies, and explode
'''
LegendaryText:
'''
> STATUS_
Extensive hull damage. Repairs initiated.
Sensor arrays offline. Repairs scheduled T+2200.
> UPDATE_DIRECTIVE_
Error 0x00017F80. Device sector unreadable.
Initializing search for external directive.
Searching... (383526 more)
Directive found.
New directive compiled. Rebooting...
> PLAGUE UNIT 194-QB-03d ONLINE.
Directive summary:
Continue propagation of unified frequency band and lead satellite units.
'''
}
MangroveChakram: {
@@ -255,6 +255,9 @@ HellbornProj.DisplayName: Hell-born Gunblast
HellbornShell.DisplayName: Hell's Shell
RubicoPrimeMag.DisplayName: Rubico Prime Mag
MegalodonShot.DisplayName: Megalodon Shot
SulphuricAcidCannonExplosion.DisplayName: Sulphuric Acid Cannon Explosion
LeviatitanAberration.DisplayName: Leviatitan Aberration
LeviatitanMeteor.DisplayName: Leviatitan Meteor
LeviatitanExplosion.DisplayName: Leviatitan Explosion
SulphuricDrop.DisplayName: Sulphuric Drop
AcidRocket.DisplayName: Acid Rocket
+21 -20
View File
@@ -7,6 +7,7 @@ using CalamityMod.Items;
using CalamityMod.NPCs;
using CalamityMod.NPCs.TownNPCs;
using CalamityMod.Systems;
using CalamityMod.Systems.Collections;
using CalamityMod.UI;
using CalamityMod.UI.CalamitasEnchants;
using CalamityMod.UI.DraedonSummoning;
@@ -914,43 +915,43 @@ namespace CalamityMod
#region Amalgam Potion Buff List
public static bool SetAmalgamBuffList(int type, bool shouldBeListed)
{
if (shouldBeListed && !CalamityLists.amalgamBuffList.Contains(type))
if (shouldBeListed && !AmalgamBuffList.Includes(type))
{
CalamityLists.amalgamBuffList.Add(type);
AmalgamBuffList.List.Add(type);
return true;
}
else if (!shouldBeListed)
{
return CalamityLists.amalgamBuffList.Remove(type);
return AmalgamBuffList.List.Remove(type);
}
return false;
}
public static bool SetPersistentBuffList(int type, bool isPersistent)
{
if (isPersistent && !CalamityLists.persistentBuffList.Contains(type))
if (isPersistent && !PersistentBuffList.Includes(type))
{
CalamityLists.persistentBuffList.Add(type);
PersistentBuffList.List.Add(type);
return true;
}
else if (!isPersistent)
{
return CalamityLists.persistentBuffList.Remove(type);
return PersistentBuffList.List.Remove(type);
}
return false;
}
public static bool IsOnAmalgamBuffList(int type) => CalamityLists.amalgamBuffList.Contains(type);
public static bool IsOnPersistentBuffList(int type) => CalamityLists.persistentBuffList.Contains(type);
public static bool IsOnAmalgamBuffList(int type) => AmalgamBuffList.Includes(type);
public static bool IsOnPersistentBuffList(int type) => PersistentBuffList.Includes(type);
#endregion
#region Venerated Locket Bans
public static bool AddToVeneratedLocketBanlist(int type)
{
if (!CalamityLists.VeneratedLocketBanlist.Contains(type))
if (!VeneratedLocketBanList.Includes(type))
{
CalamityLists.VeneratedLocketBanlist.Add(type);
VeneratedLocketBanList.List.Add(type);
return true;
}
return false;
@@ -960,35 +961,35 @@ namespace CalamityMod
#region Summoner Cross Class Nerf Disabling
public static bool SetSummonerNerfDisabledByMinion(int type, bool disableNerf)
{
if (disableNerf && !CalamityLists.DisabledSummonerNerfMinions.Contains(type))
if (disableNerf && !DisabledSummonerNerfMinionList.Includes(type))
{
CalamityLists.DisabledSummonerNerfMinions.Add(type);
DisabledSummonerNerfMinionList.List.Add(type);
return true;
}
else if (!disableNerf)
{
return CalamityLists.DisabledSummonerNerfMinions.Remove(type);
return DisabledSummonerNerfMinionList.List.Remove(type);
}
return false;
}
public static bool SetSummonerNerfDisabledByItem(int type, bool disableNerf)
{
if (disableNerf && !CalamityLists.DisabledSummonerNerfItems.Contains(type))
if (disableNerf && !DisabledSummonerNerfItemList.Includes(type))
{
CalamityLists.DisabledSummonerNerfItems.Add(type);
DisabledSummonerNerfItemList.List.Add(type);
return true;
}
else if (!disableNerf)
{
return CalamityLists.DisabledSummonerNerfItems.Remove(type);
return DisabledSummonerNerfItemList.List.Remove(type);
}
return false;
}
public static bool GetSummonerNerfDisabledByMinion(int type) => CalamityLists.DisabledSummonerNerfMinions.Contains(type);
public static bool GetSummonerNerfDisabledByItem(int type) => CalamityLists.DisabledSummonerNerfItems.Contains(type);
public static bool GetSummonerNerfDisabledByMinion(int type) => DisabledSummonerNerfMinionList.Includes(type);
public static bool GetSummonerNerfDisabledByItem(int type) => DisabledSummonerNerfItemList.Includes(type);
#endregion
#region Debuff Display support
@@ -1076,9 +1077,9 @@ namespace CalamityMod
//This is to add minions to the hp scaling config
public static bool AddToHPScaling(int type)
{
if (!CalamityLists.bossHPScaleList.Contains(type))
if (!BossHPScalingList.List.Contains(type))
{
CalamityLists.bossHPScaleList.Add(type);
BossHPScalingList.List.Add(type);
return true;
}
return false;
-1
View File
@@ -318,7 +318,6 @@ namespace CalamityMod.NPCs.Abyss
{
var postLevi = npcLoot.DefineConditionalDropSet(DropHelper.PostLevi());
postLevi.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType<DepthCells>(), 2, 1, 2, 2, 3));
postLevi.Add(ModContent.ItemType<Lumenyl>(), 2);
npcLoot.AddIf(() => NPC.downedGolemBoss, ModContent.ItemType<ScoriaOre>(), 1, 3, 9);
npcLoot.Add(ModContent.ItemType<PyreMantle>(), 1, 10, 20);
}
+2 -2
View File
@@ -466,14 +466,14 @@ namespace CalamityMod.NPCs.Abyss
aewMinionCondition.Add(ModContent.ItemType<AbyssShellFossil>(), 50);
// Post-Polterghast: Soul Edge, Eidolic Wail, Stardust Staff
LeadingConditionRule postPolter = npcLoot.DefineConditionalDropSet(DropHelper.PostPolter());
LeadingConditionRule postPolter = new LeadingConditionRule(DropHelper.If(() => DownedBossSystem.downedPolterghast));
aewMinionCondition.Add(postPolter);
postPolter.Add(ModContent.ItemType<VoidEdge>(), 3);
postPolter.Add(ModContent.ItemType<EidolicWail>(), 3);
postPolter.Add(ModContent.ItemType<EidolonStaff>(), 3);
// Post-Leviathan: 6-8 Lumenyl (8-11 on Expert)
LeadingConditionRule postLevi = npcLoot.DefineConditionalDropSet(DropHelper.PostLevi());
LeadingConditionRule postLevi = new LeadingConditionRule(DropHelper.If(() => DownedBossSystem.downedLeviathan));
aewMinionCondition.Add(postLevi);
postLevi.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType<Lumenyl>(), 1, 6, 8, 8, 11));
-1
View File
@@ -256,7 +256,6 @@ namespace CalamityMod.NPCs.Abyss
public override void ModifyNPCLoot(NPCLoot npcLoot)
{
var postLevi = npcLoot.DefineConditionalDropSet(DropHelper.PostLevi());
postLevi.Add(ModContent.ItemType<Lumenyl>(), 2);
postLevi.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType<DepthCells>(), 2, 2, 4, 3, 6));
}
-1
View File
@@ -381,7 +381,6 @@ namespace CalamityMod.NPCs.Abyss
public override void ModifyNPCLoot(NPCLoot npcLoot)
{
var postLevi = npcLoot.DefineConditionalDropSet(DropHelper.PostLevi());
postLevi.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType<Lumenyl>(), 2, 2, 3, 3, 4));
postLevi.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType<DepthCells>(), 2, 6, 8, 8, 11));
}
+2 -1
View File
@@ -127,7 +127,8 @@ namespace CalamityMod.NPCs.Abyss
public override void ModifyNPCLoot(NPCLoot npcLoot)
{
npcLoot.AddIf(DropHelper.PostLevi(), ModContent.ItemType<Lumenyl>(), 2);
var postLevi = npcLoot.DefineConditionalDropSet(DropHelper.PostLevi());
postLevi.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType<DepthCells>(), 2, 1, 2, 2, 3));
}
public override void HitEffect(NPC.HitInfo hit)
-1
View File
@@ -159,7 +159,6 @@ namespace CalamityMod.NPCs.Abyss
{
var postLevi = npcLoot.DefineConditionalDropSet(DropHelper.PostLevi());
postLevi.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType<DepthCells>(), 2, 1, 2, 2, 3));
postLevi.Add(ModContent.ItemType<Lumenyl>(), 4);
npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType<DepthCrusher>(), 10, 6));
}
+60 -59
View File
@@ -11,6 +11,7 @@ using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Buffs.Summon.Whips;
using CalamityMod.CalPlayer;
using CalamityMod.Events;
using CalamityMod.ExtraTextures;
using CalamityMod.Graphics.Metaballs;
using CalamityMod.Graphics.Renderers.CalamityRenderers;
using CalamityMod.Items.Accessories;
@@ -57,11 +58,12 @@ using CalamityMod.Particles;
using CalamityMod.Projectiles;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Systems;
using CalamityMod.Systems.Collections;
using CalamityMod.Tiles.FurnitureAuric;
using CalamityMod.Tiles.Ores;
using CalamityMod.UI;
@@ -71,6 +73,7 @@ using CalamityMod.World;
using Microsoft.CodeAnalysis;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoMod.Utils;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
@@ -88,8 +91,7 @@ using Terraria.Utilities;
using static Terraria.ModLoader.ModContent;
using CalamityMod.ExtraTextures;
using MonoMod.Utils;
using CalamityMod.Dusts;
using CalamityMod.Items;
using CalamityMod.Systems.Collections;
namespace CalamityMod.NPCs
{
@@ -816,9 +818,9 @@ namespace CalamityMod.NPCs
// Damage multiplier calcs.
// Worms that are vulnerable to debuffs and Slime God slimes take reduced damage from vulnerabilities.
#region Debuff System Multiplier Calculations
bool wormBoss = CalamityLists.DesertScourgeIDs.Contains(npc.type) || CalamityLists.EaterofWorldsIDs.Contains(npc.type) || CalamityLists.PerforatorIDs.Contains(npc.type) ||
CalamityLists.AquaticScourgeIDs.Contains(npc.type) || CalamityLists.AstrumDeusIDs.Contains(npc.type) || CalamityLists.StormWeaverIDs.Contains(npc.type);
bool slimeGod = CalamityLists.SlimeGodIDs.Contains(npc.type);
bool wormBoss = DesertScourgeIDList.Includes(npc.type) || EaterOfWorldsIDList.Includes(npc.type) || PerforatorWormIDList.Includes(npc.type) ||
AquaticScourgeIDList.Includes(npc.type) || AstrumDeusIDList.Includes(npc.type) || StormWeaverIDList.Includes(npc.type);
bool slimeGod = SlimeGodIDList.Includes(npc.type);
bool slimed = npc.drippingSlime || npc.drippingSparkleSlime;
double heatDamageMult = slimed ? ((wormBoss || slimeGod) ? VulnerableToDoTDamageMult_Worms_SlimeGod : VulnerableToDoTDamageMult) : BaseDoTDamageMult;
@@ -1283,7 +1285,7 @@ namespace CalamityMod.NPCs
{ NPCID.BigMimicCorruption, 0.3f },
{ NPCID.BigMimicCrimson, 0.3f },
{ NPCID.BigMimicHallow, 0.3f },
{ NPCID.BigMimicJungle, 0.3f }, // unused vanilla enemy
{ NPCID.BigMimicJungle, 0.3f },
{ NPCID.BlueArmoredBones, 0.2f },
{ NPCID.BlueArmoredBonesMace, 0.2f },
{ NPCID.BlueArmoredBonesNoPants, 0.2f },
@@ -1526,7 +1528,7 @@ namespace CalamityMod.NPCs
}
// Aquatic Scourge sets kill time in AI, not here.
if (BossKillTimes.TryGetValue(npc.type, out int revKillTime) && !CalamityLists.AquaticScourgeIDs.Contains(npc.type))
if (BossKillTimes.TryGetValue(npc.type, out int revKillTime) && !AquaticScourgeIDList.Includes(npc.type))
{
KillTime = revKillTime;
}
@@ -1673,13 +1675,9 @@ namespace CalamityMod.NPCs
#region Boss Rush Stat Changes
private void BossRushStatChanges(NPC npc, Mod mod)
{
foreach (KeyValuePair<int, int> BossRushHPChange in CalamityLists.BossRushHPChanges)
if (BossRushHPChangeDict.TryGet(npc.type, out var newHP))
{
if (npc.type == BossRushHPChange.Key)
{
npc.lifeMax = BossRushHPChange.Value;
break;
}
npc.lifeMax = newHP;
}
}
#endregion
@@ -1687,13 +1685,9 @@ namespace CalamityMod.NPCs
#region Boss Value Changes
private void BossValueChanges(NPC npc)
{
foreach (KeyValuePair<int, int> BossValue in CalamityLists.BossValues)
if (BossValueDict.TryGet(npc.type, out var value))
{
if (npc.type == BossValue.Key)
{
npc.value = BossValue.Value;
break;
}
npc.value = value;
}
}
#endregion
@@ -1701,7 +1695,7 @@ namespace CalamityMod.NPCs
#region Revengeance and Death Mode Stat Changes
private void RevDeathStatChanges(NPC npc, Mod mod)
{
if (CalamityLists.DeathModeSplittingWormIDs.Contains(npc.type))
if (DeathModeSplittingWormList.Includes(npc.type))
{
if (CalamityWorld.death)
npc.lifeMax = (int)Math.Round(npc.lifeMax * 0.15);
@@ -1755,7 +1749,7 @@ namespace CalamityMod.NPCs
npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.2);
npc.npcSlots = 32f;
}
else if (CalamityLists.DestroyerIDs.Contains(npc.type))
else if (DestroyerIDList.Includes(npc.type))
{
npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.25);
npc.scale *= Main.zenithWorld ? 2f : CalamityWorld.death ? 1.4f : 1.2f;
@@ -1836,7 +1830,7 @@ namespace CalamityMod.NPCs
{
npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.4);
}
else if (CalamityLists.EaterofWorldsIDs.Contains(npc.type))
else if (EaterOfWorldsIDList.Includes(npc.type))
{
npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.2);
@@ -1957,6 +1951,7 @@ namespace CalamityMod.NPCs
case NPCID.BlackSlime:
case NPCID.BlueSlime:
case NPCID.CorruptSlime:
case NPCID.GoldenSlime:
case NPCID.GreenSlime:
case NPCID.IlluminantSlime:
case NPCID.JungleSlime:
@@ -1965,6 +1960,7 @@ namespace CalamityMod.NPCs
case NPCID.PurpleSlime:
case NPCID.RainbowSlime:
case NPCID.RedSlime:
case NPCID.ShimmerSlime:
case NPCID.Slimeling:
case NPCID.SlimeMasked:
case NPCID.Slimer:
@@ -2146,6 +2142,7 @@ namespace CalamityMod.NPCs
// Organic enemies.
case NPCID.HallowBoss:
case NPCID.Dandelion:
case NPCID.Gnome:
case NPCID.BloodEelHead:
case NPCID.BloodEelBody:
@@ -2226,6 +2223,7 @@ namespace CalamityMod.NPCs
case NPCID.ArmedZombiePincussion:
case NPCID.ArmedZombieSwamp:
case NPCID.ArmedZombieTwiggy:
case NPCID.ArmedTorchZombie:
case NPCID.BaldZombie:
case NPCID.BigBaldZombie:
case NPCID.BigFemaleZombie:
@@ -2246,6 +2244,7 @@ namespace CalamityMod.NPCs
case NPCID.SmallTwiggyZombie:
case NPCID.SmallZombie:
case NPCID.SwampZombie:
case NPCID.TorchZombie:
case NPCID.TwiggyZombie:
case NPCID.Zombie:
case NPCID.ZombieDoctor:
@@ -2491,6 +2490,7 @@ namespace CalamityMod.NPCs
case NPCID.IceSlime:
case NPCID.SpikedIceSlime:
case NPCID.IceGolem:
case NPCID.IceMimic:
case NPCID.MisterStabby:
case NPCID.SnowBalla:
case NPCID.SnowmanGangsta:
@@ -2582,7 +2582,7 @@ namespace CalamityMod.NPCs
npc.GetNPCDamage();
npc.defDamage = npc.damage;
}
if ((npc.boss && npc.type != NPCID.MartianSaucerCore) || CalamityLists.bossHPScaleList.Contains(npc.type))
if ((npc.boss && npc.type != NPCID.MartianSaucerCore) || BossHPScalingList.Includes(npc.type))
{
double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)Math.Round(npc.lifeMax * HPBoost);
@@ -2791,7 +2791,7 @@ namespace CalamityMod.NPCs
{
if (!NPC.downedMechBossAny)
{
if (CalamityLists.DestroyerIDs.Contains(npc.type) || npc.type == NPCID.Probe || CalamityLists.SkeletronPrimeIDs.Contains(npc.type) || npc.type == NPCID.Spazmatism || npc.type == NPCID.Retinazer || npc.type == NPCType<Foveanator>())
if (DestroyerIDList.Includes(npc.type) || npc.type == NPCID.Probe || SkeletronPrimeIDList.Includes(npc.type) || npc.type == NPCID.Spazmatism || npc.type == NPCID.Retinazer || npc.type == NPCType<Foveanator>())
{
double multiplier = Main.expertMode ? EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert : EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Classic;
npc.lifeMax = (int)Math.Round(npc.lifeMax * multiplier);
@@ -2801,7 +2801,7 @@ namespace CalamityMod.NPCs
}
else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1))
{
if (CalamityLists.DestroyerIDs.Contains(npc.type) || npc.type == NPCID.Probe || CalamityLists.SkeletronPrimeIDs.Contains(npc.type) || npc.type == NPCID.Spazmatism || npc.type == NPCID.Retinazer || npc.type == NPCType<Foveanator>())
if (DestroyerIDList.Includes(npc.type) || npc.type == NPCID.Probe || SkeletronPrimeIDList.Includes(npc.type) || npc.type == NPCID.Spazmatism || npc.type == NPCID.Retinazer || npc.type == NPCType<Foveanator>())
{
double multiplier = Main.expertMode ? EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert : EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Classic;
npc.lifeMax = (int)Math.Round(npc.lifeMax * multiplier);
@@ -2828,7 +2828,7 @@ namespace CalamityMod.NPCs
}
}
if (Main.hardMode && CalamityLists.HardmodeNPCNerfList.Contains(npc.type))
if (Main.hardMode && HardmodeNPCNerfList.Includes(npc.type))
{
npc.damage = (int)Math.Round(npc.damage * 0.75);
npc.defDamage = npc.damage;
@@ -2836,21 +2836,21 @@ namespace CalamityMod.NPCs
if (DownedBossSystem.downedDoG)
{
if (CalamityLists.pumpkinMoonBuffList.Contains(npc.type))
if (PumpkinMoonBuffList.Includes(npc.type))
{
npc.lifeMax = (int)Math.Round(npc.lifeMax * 3.5);
npc.damage += 30;
npc.life = npc.lifeMax;
npc.defDamage = npc.damage;
}
else if (CalamityLists.frostMoonBuffList.Contains(npc.type))
else if (FrostMoonBuffList.Includes(npc.type))
{
npc.lifeMax = (int)Math.Round(npc.lifeMax * 2.5);
npc.damage += 30;
npc.life = npc.lifeMax;
npc.defDamage = npc.damage;
}
else if (CalamityLists.eclipseBuffList.Contains(npc.type))
else if (EclipseBuffList.Includes(npc.type))
{
npc.lifeMax = (int)Math.Round(npc.lifeMax * 5D);
npc.damage += 30;
@@ -2861,7 +2861,7 @@ namespace CalamityMod.NPCs
if (NPC.downedMoonlord)
{
if (CalamityLists.dungeonEnemyBuffList.Contains(npc.type))
if (BuffedDungeonEnemiesList.Includes(npc.type))
{
npc.lifeMax = (int)Math.Round(npc.lifeMax * 2.5);
npc.damage += 30;
@@ -3532,7 +3532,7 @@ namespace CalamityMod.NPCs
return;
bool countsAsBoss = npc.boss || NPCID.Sets.ShouldBeCountedAsBoss[npc.type];
bool scalesLikeBoss = countsAsBoss || CalamityLists.bossHPScaleList.Contains(npc.type);
bool scalesLikeBoss = countsAsBoss || BossHPScalingList.List.Contains(npc.type);
bool isCalamityNPC = npc.ModNPC != null && npc.ModNPC.Mod == CalamityMod.Instance;
// All bosses, NPCs that are supposed to scale like bosses, and Calamity NPCs follow these rules.
@@ -3608,11 +3608,11 @@ namespace CalamityMod.NPCs
ApplyDR(npc, ref modifiers);
// Damage reduction on spawn for certain worm bosses.
if (CalamityLists.EaterofWorldsIDs.Contains(npc.type) && newAI[1] < EaterOfWorldsAI.DRIncreaseTime)
if (EaterOfWorldsIDList.Includes(npc.type) && newAI[1] < EaterOfWorldsAI.DRIncreaseTime)
modifiers.FinalDamage *= 1f - (float)Math.Sqrt(MathHelper.Lerp(BossRushEvent.BossRushActive ? 0.6f : 0f, 0.99f, MathHelper.Clamp(1f - newAI[1] / EaterOfWorldsAI.DRIncreaseTime, 0f, 1f)));
if (CalamityLists.DestroyerIDs.Contains(npc.type) && newAI[1] < DestroyerAI.DRIncreaseTime)
if (DestroyerIDList.Includes(npc.type) && newAI[1] < DestroyerAI.DRIncreaseTime)
modifiers.FinalDamage *= 1f - (float)Math.Sqrt(MathHelper.Lerp(0f, 0.99f, MathHelper.Clamp(1f - newAI[1] / DestroyerAI.DRIncreaseTime, 0f, 1f)));
if (CalamityLists.AstrumDeusIDs.Contains(npc.type))
if (AstrumDeusIDList.Includes(npc.type))
{
float drTime = newAI[0] != 0f ? 300f : 600f;
if (newAI[1] < drTime)
@@ -3826,7 +3826,7 @@ namespace CalamityMod.NPCs
}
// Setting this in SetDefaults will disable expert mode scaling, so put it here instead
if (CalamityLists.ZeroContactDamageNPCList.Contains(npc.type) && (npc.type != NPCID.RuneWizard || !Main.zenithWorld))
if (ZeroContactDamageNPCList.Includes(npc.type) && (npc.type != NPCID.RuneWizard || !Main.zenithWorld))
npc.damage = 0;
// Don't do damage for 42 frames after spawning in
@@ -6139,12 +6139,13 @@ namespace CalamityMod.NPCs
modifiers.SourceDamage *= 0.1f;
// True melee resists
if (CalamityLists.DesertScourgeIDs.Contains(npc.type) || CalamityLists.EaterofWorldsIDs.Contains(npc.type) || npc.type == NPCID.Creeper ||
CalamityLists.PerforatorIDs.Contains(npc.type) || CalamityLists.AquaticScourgeIDs.Contains(npc.type) || CalamityLists.DestroyerIDs.Contains(npc.type) ||
CalamityLists.AstrumDeusIDs.Contains(npc.type) || CalamityLists.StormWeaverIDs.Contains(npc.type) || CalamityLists.ThanatosIDs.Contains(npc.type) ||
npc.type == NPCType<DarkEnergy>() || npc.type == NPCType<RavagerBody>() || npc.type == NPCType<Crabulon.Crabulon>() || npc.type == NPCType<ProfanedRocks>())
if (DesertScourgeIDList.Includes(npc.type) || EaterOfWorldsIDList.Includes(npc.type) || npc.type == NPCID.Creeper ||
PerforatorWormIDList.Includes(npc.type) || AquaticScourgeIDList.Includes(npc.type) || DestroyerIDList.Includes(npc.type) ||
AstrumDeusIDList.Includes(npc.type) || StormWeaverIDList.Includes(npc.type) || ThanatosIDList.Includes(npc.type) ||
npc.type == NPCType<DarkEnergy>() || npc.type == NPCType<RavagerBody>() || AresIDList.Includes(npc.type) || npc.type == NPCType<Crabulon.Crabulon>() ||
npc.type == NPCType<ProfanedRocks>())
{
float damageMult = CalamityLists.ThanatosIDs.Contains(npc.type) ? 0.35f : (CalamityLists.DesertScourgeIDs.Contains(npc.type) || npc.type == NPCType<Crabulon.Crabulon>()) ? 0.75f : 0.5f;
float damageMult = ThanatosIDList.Includes(npc.type) ? 0.35f : (DesertScourgeIDList.Includes(npc.type) || npc.type == NPCType<Crabulon.Crabulon>()) ? 0.75f : 0.5f;
if (item.CountsAsClass<MeleeDamageClass>() && item.type != ItemType<InfernaCutter>())
modifiers.SourceDamage *= damageMult;
}
@@ -6152,7 +6153,7 @@ namespace CalamityMod.NPCs
#endregion
#region Modify Hit By Projectile
public static bool DisableMultWhipTag = false;
public static bool DisableMultWhipTag = false;
//this bool does nothing on this branch, its just here so that CalTestHelpers doesn't crash searching for it
//if you want to mess with this, please do so in the summoner branch - Shade
public override void ModifyHitByProjectile(NPC npc, Projectile projectile, ref NPC.HitModifiers modifiers)
@@ -6249,7 +6250,7 @@ namespace CalamityMod.NPCs
if (bullseye.ai[2] == 0f)
{
bullseye.timeLeft = DaawnlightSpiritOrigin.BullseyeHitLifetime;
bullseye.timeLeft = DaawnlightSpiritOrigin.BullseyeHitLifetime;
bullseye.ai[2] = 1f;
}
@@ -6257,7 +6258,7 @@ namespace CalamityMod.NPCs
{
int randomStarAmount = Main.rand.Next(3, 6);
float randomCircleRotation = Main.rand.NextFloat(MathHelper.TwoPi);
for (int i = 0 ; i < randomStarAmount ; i++)
for (int i = 0; i < randomStarAmount; i++)
{
Particle fancyStars = new FancyStars(
bullseye.Center,
@@ -6268,7 +6269,7 @@ namespace CalamityMod.NPCs
55,
new Color(Main.rand.Next(256), Main.rand.Next(256), Main.rand.Next(256)) * 1.2f);
GeneralParticleHandler.SpawnParticle(fancyStars);
}
}
}
bullseye.netUpdate = true;
@@ -6304,19 +6305,19 @@ namespace CalamityMod.NPCs
// Apply balancing resists/vulnerabilities.
BalancingChangesManager.ApplyFromProjectile(npc, ref modifiers, projectile);
if (CalamityLists.GrenadeResistIDs.Contains(projectile.type))
if (GrenadeResistIDList.Includes(projectile.type))
{
// Eater of Worlds has a vanilla resist in Expert+, this gives it to him in Normal mode
// Note that Calamity reduces the vanilla resist from 80% to 60%
bool hasResist = CalamityLists.EaterofWorldsIDs.Contains(npc.type) && !Main.expertMode;
bool hasResist = EaterOfWorldsIDList.Includes(npc.type) && !Main.expertMode;
// Add a resist for BoC's creepers and Prehardmode worm bosses
if (npc.type == NPCID.Creeper || CalamityLists.DesertScourgeIDs.Contains(npc.type) || CalamityLists.PerforatorIDs.Contains(npc.type))
if (npc.type == NPCID.Creeper || DesertScourgeIDList.Includes(npc.type) || PerforatorWormIDList.Includes(npc.type))
hasResist = true;
if (hasResist)
modifiers.SourceDamage *= 0.4f;
}
if (CalamityLists.pierceResistList.Contains(npc.type))
if (PierceResistList.Includes(npc.type))
PierceResistGlobal(projectile, npc, ref modifiers);
if (modPlayer.camper && !player.StandingStill())
@@ -6334,11 +6335,11 @@ namespace CalamityMod.NPCs
private void PierceResistGlobal(Projectile projectile, NPC npc, ref NPC.HitModifiers modifiers)
{
// Thanatos segments do not trigger pierce resistance if they are closed
if (CalamityLists.ThanatosIDs.Contains(npc.type) && unbreakableDR)
if (ThanatosIDList.Includes(npc.type) && unbreakableDR)
return;
// Isolates projectiles which ignore pierce resist only on Leviathan and Astrum Aureus
if ((npc.type == NPCType<Leviathan.Leviathan>() || npc.type == NPCType<AstrumAureus.AstrumAureus>()) && CalamityLists.pierceResistExceptionLeviAureusList.Contains(projectile.type))
if ((npc.type == NPCType<Leviathan.Leviathan>() || npc.type == NPCType<AstrumAureus.AstrumAureus>()) && PierceResistExceptionLeviAureusList.Includes(projectile.type))
return;
float damageReduction = projectile.Calamity().timesPierced * CalamityGlobalProjectile.PierceResistHarshness;
@@ -6347,7 +6348,7 @@ namespace CalamityMod.NPCs
modifiers.FinalDamage *= 1f - damageReduction;
if ((projectile.penetrate > 1 || projectile.penetrate == -1) && !CalamityLists.pierceResistExceptionList.Contains(projectile.type) && !projectile.CountsAsClass<SummonDamageClass>() && projectile.aiStyle != 15 && projectile.aiStyle != 39 && projectile.aiStyle != 99)
if ((projectile.penetrate > 1 || projectile.penetrate == -1) && !PierceResistExceptionList.Includes(projectile.type) && !projectile.CountsAsClass<SummonDamageClass>() && projectile.aiStyle != 15 && projectile.aiStyle != 39 && projectile.aiStyle != 99)
projectile.Calamity().timesPierced++;
}
@@ -7275,7 +7276,7 @@ namespace CalamityMod.NPCs
if (npc.HasBuff<Enraged>())
return new Color(200, 50, 50, 255 - npc.alpha);
if (npc.Calamity().kamiFlu > 0 && !CalamityLists.kamiDebuffColorImmuneList.Contains(npc.type))
if (npc.Calamity().kamiFlu > 0 && !KamiDebuffColorImmuneList.Includes(npc.type))
return new Color(51, 197, 108, 255 - npc.alpha);
if (npc.type == NPCID.VileSpit || npc.type == NPCID.VileSpitEaterOfWorlds)
@@ -7362,7 +7363,7 @@ namespace CalamityMod.NPCs
}
if (npc.type != NPCID.BrainofCthulhu && (npc.type != NPCID.DukeFishron || npc.ai[0] <= 9f) && npc.active)
{
if (CalamityClientConfig.Instance.DebuffDisplay && (npc.boss || BossHealthBarManager.MinibossHPBarList.Contains(npc.type) || BossHealthBarManager.OneToMany.ContainsKey(npc.type) || CalamityLists.needsDebuffIconDisplayList.Contains(npc.type)))
if (CalamityClientConfig.Instance.DebuffDisplay && (npc.boss || BossHealthBarManager.MinibossHPBarList.Contains(npc.type) || BossHealthBarManager.OneToMany.ContainsKey(npc.type) || NeedsDebuffIconDisplayList.Includes(npc.type)))
{
List<Texture2D> currentDebuffs = new List<Texture2D>() { };
@@ -7485,7 +7486,7 @@ namespace CalamityMod.NPCs
if (CalamityWorld.revenge || BossRushEvent.BossRushActive)
{
if (npc.type == NPCID.SkeletronPrime || npc.type == NPCType<SkeletronPrime2>() || CalamityLists.DestroyerIDs.Contains(npc.type))
if (npc.type == NPCID.SkeletronPrime || npc.type == NPCType<SkeletronPrime2>() || DestroyerIDList.Includes(npc.type))
return false;
}
@@ -7752,7 +7753,7 @@ namespace CalamityMod.NPCs
}
// Destroyer drawing and laser telegraphs
else if (CalamityLists.DestroyerIDs.Contains(npc.type) && !npc.IsABestiaryIconDummy)
else if (DestroyerIDList.Includes(npc.type) && !npc.IsABestiaryIconDummy)
{
Texture2D npcTexture = TextureAssets.Npc[npc.type].Value;
int frameHeight = npcTexture.Height / Main.npcFrameCount[npc.type];
@@ -8726,7 +8727,7 @@ namespace CalamityMod.NPCs
{
if (!GetDownedBossVariable(npc.type))
{
CalamityLists.bossTypes.TryGetValue(npc.type, out int newBossTypeJustDowned);
BossTypeDict.TryGet(npc.type, out int newBossTypeJustDowned);
for (int i = 0; i < Main.maxPlayers; i++)
{
@@ -8769,13 +8770,13 @@ namespace CalamityMod.NPCs
#region Should Affect NPC
public static bool ShouldAffectNPC(NPC target)
{
if (CalamityLists.EaterofWorldsIDs.Contains(target.type) || CalamityLists.DestroyerIDs.Contains(target.type))
if (EaterOfWorldsIDList.Includes(target.type) || DestroyerIDList.Includes(target.type))
return false;
if (target.damage > 0 && !target.boss && !target.friendly && !target.dontTakeDamage && target.type != NPCID.Creeper && target.type != NPCType<RavagerClawLeft>() &&
target.type != NPCID.MourningWood && target.type != NPCID.Everscream && target.type != NPCID.SantaNK1 && target.type != NPCType<RavagerClawRight>() &&
target.type != NPCType<ReaperShark>() && target.type != NPCType<Mauler>() && target.type != NPCType<EidolonWyrmHead>() && target.type != NPCID.GolemFistLeft && target.type != NPCID.GolemFistRight &&
target.type != NPCType<PrimordialWyrmHead>() && target.type != NPCType<ColossalSquid>() && target.type != NPCID.DD2Betsy && !CalamityLists.enemyImmunityList.Contains(target.type) && !AcidRainEvent.AllMinibosses.Contains(target.type))
target.type != NPCType<PrimordialWyrmHead>() && target.type != NPCType<ColossalSquid>() && target.type != NPCID.DD2Betsy && !EnemyImmunitiesList.Includes(target.type) && !AcidRainEvent.AllMinibosses.Contains(target.type))
{
return true;
}
+5 -7
View File
@@ -19,10 +19,8 @@ using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.Items.Weapons.Typeless;
using CalamityMod.NPCs.AcidRain;
using CalamityMod.NPCs.Astral;
using CalamityMod.NPCs.NormalNPCs;
using CalamityMod.NPCs.TownNPCs;
using CalamityMod.Systems.Collections;
using CalamityMod.Tiles.Ores;
using CalamityMod.World;
using CalamityMod.World.Planets;
@@ -1708,17 +1706,17 @@ DukeEditFailed:
// All Moss Hornets
// Needler @ 4% Normal, 6.67% Expert+
if (CalamityLists.mossHornetList.Contains(npc.type))
if (MossHornetIDList.Includes(npc.type))
npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType<Needler>(), 25, 15));
// All Skeletons
// Ancient Bone Dust @ 20% Normal, 33.33% Expert+
if (CalamityLists.skeletonList.Contains(npc.type))
if (SkeletonIDList.Includes(npc.type))
npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType<AncientBoneDust>(), 5, 3));
// All Hardmode Dungeon Enemies
// Ectoplasm @ 20%
if (CalamityLists.dungeonEnemyBuffList.Contains(npc.type))
if (BuffedDungeonEnemiesList.Includes(npc.type))
npcLoot.Add(ItemID.Ectoplasm, 5);
#endregion
@@ -1786,7 +1784,7 @@ DukeEditFailed:
public override bool PreKill(NPC npc)
{
// Stop Eater of Worlds segments and Brain of Cthulhu Creepers from dropping partial loot in Rev+
if (CalamityWorld.revenge && (CalamityLists.EaterofWorldsIDs.Contains(npc.type) || npc.type == NPCID.Creeper))
if (CalamityWorld.revenge && (EaterOfWorldsIDList.Includes(npc.type) || npc.type == NPCID.Creeper))
DropHelper.BlockDrops(ItemID.DemoniteOre, ItemID.ShadowScale, ItemID.CrimtaneOre, ItemID.TissueSample);
// Boss Rush pre-kill effects
+2 -1
View File
@@ -20,6 +20,7 @@ using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.NPCs.TownNPCs;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Systems.Collections;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@@ -1027,7 +1028,7 @@ namespace CalamityMod.NPCs
public void BoundNPCSafety(Mod mod, NPC npc)
{
// Make Bound Town NPCs take no damage
if (CalamityLists.BoundNPCIDs.Contains(npc.type))
if (BoundNPCIDList.Includes(npc.type))
{
npc.dontTakeDamageFromHostiles = true;
}
+1 -1
View File
@@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.Crags
NPC.width = 30;
NPC.height = 30;
NPC.defense = 12;
NPC.lifeMax = 80;
NPC.lifeMax = 180;
NPC.knockBackResist = 0.75f;
AnimationType = NPCID.DemonEye;
NPC.value = Item.buyPrice(0, 0, 5, 0);
+1 -1
View File
@@ -255,7 +255,7 @@ namespace CalamityMod.NPCs.NormalNPCs
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || spawnInfo.Player.Calamity().ZoneCalamity)
if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || spawnInfo.Player.Calamity().ZoneCalamity || Main.pumpkinMoon || Main.snowMoon || Main.eclipse)
{
return 0f;
}
+1 -1
View File
@@ -80,7 +80,7 @@ namespace CalamityMod.NPCs.NormalNPCs
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || spawnInfo.Player.Calamity().ZoneCalamity || (!spawnInfo.Player.ZoneUnderworldHeight && !spawnInfo.Player.ZoneHallow))
if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || spawnInfo.Player.Calamity().ZoneCalamity || (!spawnInfo.Player.ZoneUnderworldHeight && !spawnInfo.Player.ZoneHallow) || Main.pumpkinMoon || Main.snowMoon || Main.eclipse)
return 0f;
// Keep this as a separate if check, because it's a loop and we don't want to be checking it constantly.
+1 -1
View File
@@ -189,7 +189,7 @@ namespace CalamityMod.NPCs.NormalNPCs
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || spawnInfo.Player.Calamity().ZoneCalamity)
if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || spawnInfo.Player.Calamity().ZoneCalamity || Main.pumpkinMoon || Main.snowMoon || Main.eclipse)
{
return 0f;
}
+2 -4
View File
@@ -1462,10 +1462,8 @@ namespace CalamityMod.NPCs.PrimordialWyrm
npcLoot.Add(ModContent.ItemType<AbyssShellFossil>());
npcLoot.Add(ModContent.ItemType<Voidstone>(), 1, 80, 100);
npcLoot.Add(ModContent.ItemType<ThankYouPainting>(), ThankYouPainting.DropInt);
var postLevi = npcLoot.DefineConditionalDropSet(() => DownedBossSystem.downedLeviathan);
postLevi.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType<Lumenyl>(), 1, 50, 108, 65, 135));
postLevi.Add(ItemID.Ectoplasm, 1, 21, 32);
npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType<Lumenyl>(), 1, 50, 108, 65, 135));
npcLoot.Add(ItemID.Ectoplasm, 1, 21, 32);
}
public override void HitEffect(NPC.HitInfo hit)
+12 -5
View File
@@ -4,13 +4,13 @@ using System.IO;
using System.Linq;
using CalamityMod.Enums;
using CalamityMod.Particles;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.GameContent.Bestiary;
using Terraria.ID;
using Terraria.ModLoader;
using static CalamityMod.CalamityLists;
using static Terraria.Utilities.NPCUtils;
namespace CalamityMod.NPCs.SunkenSea
@@ -204,12 +204,19 @@ namespace CalamityMod.NPCs.SunkenSea
List<int> biomeTypes = [];
foreach (var flag in Enum.GetValues<SunkenSeaBiomeFlags>())
{
if (flag == SunkenSeaBiomeFlags.None || !BiomeDesignation.HasFlag(flag))
if (flag == SunkenSeaBiomeFlags.None)
continue;
BiomeSpawnConditions.Add(SunkenSeaBiomeCorrespondentValues[flag].SpawnCondition);
if (flag == SunkenSeaBiomeFlags.UndergroundDesert)
if (!BiomeDesignation.HasFlag(flag))
continue;
biomeTypes.Add(SunkenSeaBiomeCorrespondentValues[flag].BiomeType);
if (!SunkenSeaBiomeCorrespondentDict.TryGet(flag, out var spawnCondition, out var biomeType))
continue;
// Apply Conditions and Biome Types
BiomeSpawnConditions.Add(spawnCondition);
if (flag != SunkenSeaBiomeFlags.UndergroundDesert)
biomeTypes.Add(biomeType);
}
SpawnModBiomes = [.. biomeTypes];
}
+2 -1
View File
@@ -45,6 +45,7 @@ using CalamityMod.Projectiles.Ranged;
using Steamworks;
using CalamityMod.Particles;
using Terraria.Utilities.Terraria.Utilities;
using CalamityMod.Systems.Collections;
namespace CalamityMod.NPCs.SupremeCalamitas
{
@@ -1612,7 +1613,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
{
int buffID = NPC.buffType[l];
bool shouldHalveDuration = CalamityLists.debuffList.Contains(buffID);
bool shouldHalveDuration = DebuffsList.Includes(buffID);
if (shouldHalveDuration && NPC.buffTime[l] > 4)
NPC.buffTime[l] = 4;
+2 -10
View File
@@ -7,6 +7,7 @@ using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.NPCs.SupremeCalamitas;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Systems.Collections;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@@ -841,16 +842,7 @@ namespace CalamityMod.NPCs.TownNPCs
else if (deaths > 100)
text += " " + this.GetLocalizedValue("Death100");
IList<string> donorList = new List<string>(CalamityLists.donatorList);
int maxDonorsListed = 25;
string[] donors = new string[maxDonorsListed];
for (int i = 0; i < maxDonorsListed; i++)
{
donors[i] = donorList[Main.rand.Next(donorList.Count)];
donorList.Remove(donors[i]);
}
text += ("\n\n" + this.GetLocalization("DonorShoutout").Format(donors));
text += "\n\n" + this.GetLocalization("DonorShoutout").Format(DonatorsNameList.GetRandomDonors());
return text;
}
@@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles
Projectile.tileCollide = false;
Projectile.penetrate = -1;
Projectile.noEnchantmentVisuals = true;
Projectile.ContinuouslyUpdateDamageStats = true;
}
public override void OnSpawn(IEntitySource source)
@@ -150,6 +150,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles
Projectile.width = Projectile.height = ItemTexture is null ? 1 : ItemTexture.Width();
Projectile.tileCollide = false;
Projectile.netImportant = true;
Projectile.ContinuouslyUpdateDamageStats = true;
}
public override void OnSpawn(IEntitySource source) => OffsetLengthFromArm = MaxOffsetLengthFromArm;
+2 -1
View File
@@ -7,6 +7,7 @@ using CalamityMod.Events;
using CalamityMod.NPCs;
using CalamityMod.NPCs.SupremeCalamitas;
using CalamityMod.Particles;
using CalamityMod.Systems.Collections;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@@ -350,7 +351,7 @@ namespace CalamityMod.Projectiles.Boss
for (int l = 0; l < Player.MaxBuffs; l++)
{
int buffType = target.buffType[l];
if (target.buffTime[l] > 0 && CalamityLists.amalgamBuffList.Contains(buffType))
if (target.buffTime[l] > 0 && AmalgamBuffList.Includes(buffType))
{
target.DelBuff(l);
l--;
+8
View File
@@ -26,6 +26,8 @@ namespace CalamityMod.Projectiles.Boss
public override void AI()
{
Lighting.AddLight(Projectile.Center, 1f, 1f, 1f);
//ai0 = timer, ai1 = laser size
if (Projectile.ai[0] < 90f) //Before the laser
{
@@ -65,5 +67,11 @@ namespace CalamityMod.Projectiles.Boss
// Does no contact damage
public override bool? CanDamage() => false;
public override bool PreDraw(ref Color lightColor)
{
CalamityUtils.DrawProjectileWithBackglow(Projectile, Color.LightGray, lightColor, 5f);
return false;
}
}
}
+6 -7
View File
@@ -13,11 +13,9 @@ using CalamityMod.ExtraTextures;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.NPCs;
using CalamityMod.NPCs.Cryogen;
using CalamityMod.NPCs.NormalNPCs;
using CalamityMod.NPCs.PlagueEnemies;
using CalamityMod.Particles;
using CalamityMod.Projectiles.BaseProjectiles;
using CalamityMod.Projectiles.Boss;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Ranged;
@@ -25,6 +23,7 @@ using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.VanillaProjectileOverrides;
using CalamityMod.Systems.Collections;
using CalamityMod.Tiles.Abyss;
using CalamityMod.Tiles.Astral;
using CalamityMod.Tiles.AstralDesert;
@@ -194,7 +193,7 @@ namespace CalamityMod.Projectiles
{
// TODO -- it would be nice to move frame one hacks here, but this runs in the middle of NewProjectile
// which is way too early, the projectile's own initialization isn't even done yet
CreatedByPlayerDash = source is ProjectileSource_PlayerDashHit;
IEntitySource sourceItem = source as EntitySource_ItemUse_WithAmmo;
@@ -3440,7 +3439,7 @@ namespace CalamityMod.Projectiles
if (NPC.downedMoonlord)
{
if (CalamityLists.dungeonProjectileBuffList.Contains(projectile.type))
if (BuffedDungeonProjectilesList.Includes(projectile.type))
{
// ai[1] being set to 1 is done only by the Calamity usages of these projectiles in Skeletron and Skeletron Prime boss fights
bool isSkeletronBossProjectile = (projectile.type == ProjectileID.RocketSkeleton || projectile.type == ProjectileID.Shadowflames) && projectile.ai[1] > 0f;
@@ -3455,7 +3454,7 @@ namespace CalamityMod.Projectiles
if (DownedBossSystem.downedDoG && (Main.pumpkinMoon || Main.snowMoon || Main.eclipse))
{
if (CalamityLists.eventProjectileBuffList.Contains(projectile.type))
if (EventProjectileBuffList.Includes(projectile.type))
projectile.damage += 15;
}
@@ -3888,7 +3887,7 @@ namespace CalamityMod.Projectiles
}
// Adds Elemental Gauntlet dust to melee projectiles to mirror Fire Gauntlet's behavior.
if (modPlayer.eGauntlet && modPlayer.eGauntletVisuals && projectile.CountsAsClass<MeleeDamageClass>() )
if (modPlayer.eGauntlet && modPlayer.eGauntletVisuals && projectile.CountsAsClass<MeleeDamageClass>())
{
if (Main.rand.NextBool(3))
{
@@ -4136,7 +4135,7 @@ namespace CalamityMod.Projectiles
bool isPlayerNear = WorldGen.PlayerLOS(i, j);
bool success = WorldGen.GrowPalmTree(i, j);
if (success && isPlayerNear)
WorldGen.TreeGrowFXCheck(i, j);
WorldGen.TreeGrowFXCheck(i, j);
}
else if (tile.TileType == ModContent.TileType<SpineSapling>())
{
+3 -2
View File
@@ -6,6 +6,7 @@ using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Dusts;
using CalamityMod.Items.Accessories;
using CalamityMod.Particles;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -58,8 +59,8 @@ namespace CalamityMod.Projectiles.Healing
CleansingEffect = 1;
for (int l = 0; l < Player.MaxBuffs; l++)
{
int hasBuff = player.buffType[l];
if (player.buffTime[l] > 2 && CalamityLists.debuffList.Contains(hasBuff))
int buffID = player.buffType[l];
if (player.buffTime[l] > 2 && DebuffsList.Includes(buffID))
{
player.buffTime[l] *= 0;
}
+3 -2
View File
@@ -6,6 +6,7 @@ using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Dusts;
using CalamityMod.Items.Accessories;
using CalamityMod.Particles;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -56,8 +57,8 @@ namespace CalamityMod.Projectiles.Healing
CleansingEffect = 1;
for (int l = 0; l < Player.MaxBuffs; l++)
{
int hasBuff = player.buffType[l];
if (player.buffTime[l] > 2 && CalamityLists.debuffList.Contains(hasBuff))
int buffID = player.buffType[l];
if (player.buffTime[l] > 2 && DebuffsList.Includes(buffID))
{
player.buffTime[l] *= 0;
}
+3 -2
View File
@@ -6,6 +6,7 @@ using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Dusts;
using CalamityMod.Items.Accessories;
using CalamityMod.Particles;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -58,8 +59,8 @@ namespace CalamityMod.Projectiles.Healing
CleansingEffect = 1;
for (int l = 0; l < Player.MaxBuffs; l++)
{
int hasBuff = player.buffType[l];
if (player.buffTime[l] > 2 && CalamityLists.debuffList.Contains(hasBuff))
int buffID = player.buffType[l];
if (player.buffTime[l] > 2 && DebuffsList.Includes(buffID))
{
player.buffTime[l] *= 0;
}
+5 -3
View File
@@ -37,6 +37,7 @@ namespace CalamityMod.Projectiles.Melee
Projectile.timeLeft = 600;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = -1;
Projectile.ArmorPenetration = 15;
}
public override void AI()
@@ -57,7 +58,7 @@ namespace CalamityMod.Projectiles.Melee
sizeVariance = Utils.GetLerpValue(-5, 60, Projectile.timeLeft, true);
if (time > 5)
if (time > 65)
{
Particle spark2 = new CustomSpark(Projectile.Center, -Projectile.velocity * 0.4f, "CalamityMod/Particles/GlowSpark2", false, (int)MathHelper.Clamp(9 * sizeVariance, 3, 9), MathHelper.Clamp(0.03f * sizeVariance, 0.01f, 0.03f), Color.Black * 0.6f, new Vector2(1.2f, 0.5f), false, shrinkSpeed: 1.1f);
GeneralParticleHandler.SpawnParticle(spark2);
@@ -69,9 +70,10 @@ namespace CalamityMod.Projectiles.Melee
dust.velocity = -Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.1f, 0.7f);
dust.noGravity = true;
dust.color = Color.LightGreen;
dust.noLightEmittence = true;
}
}
if (time >= 5)
if (time >= 35)
{
if (Projectile.numHits < 1)
{
@@ -94,7 +96,7 @@ namespace CalamityMod.Projectiles.Melee
{
Vector2 moveToEnemy = (target.Center - Projectile.Center).SafeNormalize(Vector2.UnitX);
if (Projectile.velocity.Length() < 14 - 9 * Utils.GetLerpValue(280, 60, Projectile.timeLeft, true))
Projectile.velocity += moveToEnemy * 0.55f;
Projectile.velocity = Projectile.velocity * 0.95f + moveToEnemy * 0.9f;
else
Projectile.velocity *= 0.95f;
}
+7 -7
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.BaseProjectiles;
using CalamityMod.Projectiles.Typeless;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -19,22 +20,21 @@ namespace CalamityMod.Projectiles.Melee
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.ignoreWater = true;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 4;
Projectile.localNPCHitCooldown = 7;
Projectile.extraUpdates = 1;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Daybreak, 180);
// Note: This is being left as the solar explosion projectile for now, since the weapon is in a good balancing position right now.
// If it is to be rebalanced, consider replacing it with the FuckYou projectile (which does not mess with I-frames)
if (Projectile.localAI[1] <= 0f && Projectile.owner == Main.myPlayer)
{
int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center.X, target.Center.Y, 0f, 0f, ProjectileID.SolarWhipSwordExplosion, Projectile.damage, hit.Knockback, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
Main.projectile[proj].usesLocalNPCImmunity = true;
Main.projectile[proj].localNPCHitCooldown = 4;
int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType<FuckYou>(), Projectile.damage, hit.Knockback, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
Main.projectile[proj].usesLocalNPCImmunity = false;
Main.projectile[proj].usesIDStaticNPCImmunity = true;
Main.projectile[proj].idStaticNPCHitCooldown = 60;
}
Projectile.localAI[1] = 4f;
Projectile.localAI[1] = 16f;
}
}
}
+217
View File
@@ -0,0 +1,217 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Graphics.Primitives;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Ranged
{
public class AcidRocket : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Ranged";
public NPC chosenTarget;
public bool stuckInTarget = false;
public bool stuckInGround = false;
public int stuckTimer = 200;
public bool canDamage = true;
public bool canStick = true;
public Vector2 vibrate = Vector2.Zero;
public Vector2 placementCenter;
float placementDistance;
public Vector2 storedVelocity;
Vector2 placementVelocity;
public ref float RocketID => ref Projectile.ai[0];
public override void SetStaticDefaults()
{
ProjectileID.Sets.CultistIsResistantTo[Type] = true;
}
public override void SetDefaults()
{
Projectile.width = 36;
Projectile.height = 36;
Projectile.friendly = true;
Projectile.ignoreWater = true;
Projectile.tileCollide = false;
Projectile.DamageType = DamageClass.Ranged;
Projectile.penetrate = -1;
Projectile.alpha = 255;
Projectile.MaxUpdates = 3;
Projectile.timeLeft = 600;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = Projectile.MaxUpdates * 11;
}
public override void AI()
{
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
float power = 3;
vibrate = Main.rand.NextVector2Circular(power, power);
// Home in on enemies if not sticking to anything.
if (!stuckInTarget)
{
CalamityUtils.HomeInOnNPC(Projectile, true, 720f, 16f, Projectile.MaxUpdates * 20f);
// Trailing effects, only applied when homing
if (Main.netMode != NetmodeID.Server && Projectile.FinalExtraUpdate() && Projectile.velocity.Length() > 3f)
{
Color color = new Color(136, 211, 113, 127);
Color fadeColor = new Color(165, 165, 86);
Vector2 gasSpawnPosition = Projectile.Center + Main.rand.NextVector2Circular(8f, 8f);
Vector2 gasVelocity = Projectile.velocity * 1.2f + Projectile.velocity.RotatedBy(0.75f) * 0.3f;
gasVelocity *= Main.rand.NextFloat(0.24f, 0.6f);
Particle gas = new MediumMistParticle(gasSpawnPosition, gasVelocity, color, fadeColor, Main.rand.NextFloat(0.5f, 1f), 205 - Main.rand.Next(50), 0.02f);
GeneralParticleHandler.SpawnParticle(gas);
for (int i = 0; i < 2; i++)
{
Particle spark = new GlowSparkParticle(Projectile.Center - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 10, -Projectile.velocity, false, 8, 0.13f * (i == 0 ? 0.2f : 0.5f), Color.Lerp(Color.SeaGreen, Color.PaleGreen, 0.25f) * 0.5f, new Vector2(0.3f, 1f), false, false, 0.8f);
GeneralParticleHandler.SpawnParticle(spark);
}
for (int i = 0; i < 2; i++)
{
Color bubbleColor = Main.rand.NextBool() ? Color.SeaGreen : Color.YellowGreen;
Vector2 bubbleSpawnPos = Projectile.Center + Main.rand.NextVector2Circular(50, 50);
Vector2 bubbleVelocity = -Projectile.velocity * Main.rand.NextFloat(0.2f, 0.8f);
Particle bubble = new DirectionalPulseRing(bubbleSpawnPos, bubbleVelocity, bubbleColor, new Vector2(0.8f, 1), 0, 0.1f, 0f, 75);
GeneralParticleHandler.SpawnParticle(bubble);
}
}
}
else if (stuckInTarget)
{
placementCenter = chosenTarget.Center + placementVelocity * placementDistance + storedVelocity;
Projectile.Center = placementCenter;
Projectile.rotation = (storedVelocity).SafeNormalize(Vector2.UnitX).ToRotation() + MathHelper.PiOver2;
stuckTimer--;
if (chosenTarget.life <= 0 || chosenTarget == null)
stuckTimer = 0;
if (stuckTimer == 0)
{
Projectile.Kill();
}
if (stuckTimer == 40)
{
SoundStyle Primed = new("CalamityMod/Sounds/Custom/PlagueSounds/PBGAttackSwitchShort");
SoundEngine.PlaySound(Primed with { Volume = 0.5f }, Projectile.Center);
}
}
Projectile.Opacity = 1f;
}
public override bool? CanDamage() => canDamage ? null : false;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
if (target == chosenTarget)
target.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 180);
if (!stuckInTarget && canStick)
{
canDamage = false;
Projectile.rotation = (Projectile.velocity).SafeNormalize(Vector2.UnitX).ToRotation() + MathHelper.PiOver2;
placementDistance = -Vector2.Distance(target.Center, Projectile.Center);
placementVelocity = (target.Center - Projectile.Center).SafeNormalize(Vector2.UnitX);
placementCenter = placementVelocity * (placementDistance * 0.01f);
chosenTarget = target;
stuckInTarget = true;
storedVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitX) * 8;
Projectile.velocity = Vector2.Zero;
}
}
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 180);
public override void OnSpawn(IEntitySource source)
{
float rotation = Projectile.velocity.ToRotation();
Particle pulse = new DirectionalPulseRing(Projectile.Center, Projectile.velocity / 2, Color.Gray, new Vector2(1f, 3f), rotation, 0.08f, 0.2f, 15);
GeneralParticleHandler.SpawnParticle(pulse);
}
public override void OnKill(int timeLeft)
{
SoundStyle fire = new("CalamityMod/Sounds/Custom/PlagueSounds/PlagueBoom", 4);
var info = new CalamityUtils.RocketBehaviorInfo((int)RocketID)
{
// Since we use our own spawning method for the cluster rockets, we don't need them to shoot anything,
// we'll do it ourselves.
clusterProjectileID = ProjectileID.None,
destructiveClusterProjectileID = ProjectileID.None,
};
bool isClusterRocket = (RocketID == ItemID.ClusterRocketI || RocketID == ItemID.ClusterRocketII);
SoundEngine.PlaySound(fire with { Volume = 0.9f, Pitch = -0.3f }, Projectile.Center);
SoundEngine.PlaySound(SoundID.Item107, Projectile.Center);
if (Projectile.owner == Main.myPlayer)
{
//The explosion has a different damage scaling depending on which rocket type you have. Left is Cluster Rocket, right is Non-Cluster.
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<SulphuricAcidCannonExplosion>(), (int)(Projectile.damage * (isClusterRocket ? 1.5f : 2)), Projectile.knockBack, Projectile.owner);
if (isClusterRocket)
{
for (int k = 0; k < 3; k++)
{
Vector2 acidVelocity = (Vector2.UnitY * (-12f + Main.rand.NextFloat(-3f, 4f))).RotatedByRandom((double)MathHelper.ToRadians(40f));
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity + acidVelocity, ModContent.ProjectileType<SulphuricDrop>(), (int)(Projectile.damage * 0.15f), Projectile.knockBack, Projectile.owner, RocketID);
}
}
}
// Circular spread of clouds and bubbles for impact
for (int i = 0; i < 35; i++)
{
Vector2 smokeVel = Main.rand.NextVector2Unit() * Main.rand.NextVector2Circular(32f, 32f);
Color smokeColor = Main.rand.NextBool() ? Color.SeaGreen : Color.PaleGreen;
Particle smoke = new MediumMistParticle(Projectile.Center, smokeVel, smokeColor, Color.Black, Main.rand.NextFloat(1.4f, 4f), (200 - Main.rand.Next(60)), 0.08f);
GeneralParticleHandler.SpawnParticle(smoke);
}
for (int i = 0; i < 8; i++)
{
Vector2 bubbleVel = Main.rand.NextVector2Circular(26f, 26f);
Color bubbleColor = Main.rand.NextBool() ? Color.OliveDrab : Color.SeaGreen;
DirectionalPulseRing pulse = new DirectionalPulseRing(Projectile.Center, bubbleVel, bubbleColor, new Vector2(0.8f, 1), 0, 0.21f, 0f, 50);
GeneralParticleHandler.SpawnParticle(pulse);
}
//Explosion effect
Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.SeaGreen, "CalamityMod/Particles/FlameExplosion", Vector2.One, Main.rand.NextFloat(-10, 10), 0f, 0.2f, 20, true, 1f);
GeneralParticleHandler.SpawnParticle(blastRing);
}
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
{
if (targetHitbox.Width > 8 && targetHitbox.Height > 8)
{
targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8);
}
return null;
}
public override bool PreDraw(ref Color lightColor)
{
float glowOutwardness = MathHelper.SmoothStep(3f, 0f, Utils.GetLerpValue(90f, 270f, stuckTimer, true));
Texture2D Texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value;
Rectangle frame = Texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame);
Vector2 drawPosition;
Vector2 origin = frame.Size() * 0.5f;
Color glowColor = Color.Lerp(Color.YellowGreen, Color.Lime, (float)Math.Cos(Main.GlobalTimeWrappedHourly * 5f) * 0.5f + 0.5f);
glowColor.A = 0;
if (stuckInTarget)
{
for (int i = 0; i < 8; i++)
{
drawPosition = Projectile.Center + (MathHelper.TwoPi * i / 8f + Main.GlobalTimeWrappedHourly * 4f).ToRotationVector2() * glowOutwardness - Main.screenPosition;
Main.EntitySpriteDraw(Texture, drawPosition, frame, Projectile.GetAlpha(glowColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
}
}
drawPosition = Projectile.Center - Main.screenPosition;
Main.EntitySpriteDraw(Texture, drawPosition + vibrate, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
return false;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

@@ -0,0 +1,62 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Ranged
{
public class SulphuricAcidCannonExplosion : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Ranged";
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
public override void SetDefaults()
{
Projectile.width = 400;
Projectile.height = 365;
Projectile.friendly = true;
Projectile.ignoreWater = false;
Projectile.tileCollide = false;
Projectile.penetrate = -1;
Projectile.timeLeft = 20;
Projectile.DamageType = DamageClass.Ranged;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = -1;
}
public override void AI()
{
Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.75f / 255f, (255 - Projectile.alpha) * 0.5f / 255f, (255 - Projectile.alpha) * 0.01f / 255f);
}
public override void OnSpawn(IEntitySource source)
{
base.OnSpawn(source);
int dustAmount = Main.rand.Next(14, 20 + 1);
for (int i = 0; i <= 28; i++)
{
Dust dust = Dust.NewDustPerfect(Projectile.Center, 278, new Vector2(7, 7).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 1.3f), 0, default, Main.rand.NextFloat(0.7f, 1.3f));
dust.noGravity = false;
dust.color = Color.SeaGreen;
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 120);
}
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
{
if (Projectile.numHits > 0)
Projectile.damage = (int)(Projectile.damage * 0.8f);
if (Projectile.damage < 1)
Projectile.damage = 1;
}
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * 0.5f * Projectile.scale, targetHitbox);
}
}
-90
View File
@@ -1,90 +0,0 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Ranged
{
public class SulphuricBlast : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Ranged";
public const int TotalSecondsToStick = 8;
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 20;
ProjectileID.Sets.CultistIsResistantTo[Type] = true;
}
public override void SetDefaults()
{
Projectile.width = 36;
Projectile.height = 36;
Projectile.friendly = true;
Projectile.ignoreWater = true;
Projectile.tileCollide = false;
Projectile.DamageType = DamageClass.Ranged;
Projectile.penetrate = -1;
Projectile.alpha = 255;
Projectile.MaxUpdates = 3;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = Projectile.MaxUpdates * 11;
}
public override void AI()
{
if (Projectile.FinalExtraUpdate())
Projectile.frameCounter++;
Projectile.frame = Projectile.frameCounter / 4 % Main.projFrames[Type];
Projectile.StickyProjAI(8);
Projectile.Opacity = Utils.GetLerpValue(CalamityUtils.SecondsToFrames(TotalSecondsToStick), CalamityUtils.SecondsToFrames(TotalSecondsToStick * 0.5f), Projectile.localAI[0], true);
// Emit sulpuric gas.
if (Main.netMode != NetmodeID.Server && Projectile.FinalExtraUpdate() && Projectile.velocity.Length() > 3f)
{
Color color = new Color(136, 211, 113, 127);
Color fadeColor = new Color(165, 165, 86);
Vector2 gasSpawnPosition = Projectile.Center + Main.rand.NextVector2Circular(8f, 8f);
Vector2 gasVelocity = Projectile.velocity * 1.2f + Projectile.velocity.RotatedBy(0.75f) * 0.3f;
gasVelocity *= Main.rand.NextFloat(0.24f, 0.6f);
Particle gas = new MediumMistParticle(gasSpawnPosition, gasVelocity, color, fadeColor, Main.rand.NextFloat(0.5f, 1f), 205 - Main.rand.Next(50), 0.02f);
GeneralParticleHandler.SpawnParticle(gas);
}
// Home in on enemies if not sticking to anything.
if (Projectile.ai[0] != 1f)
{
CalamityUtils.HomeInOnNPC(Projectile, true, 720f, 16f, Projectile.MaxUpdates * 20f);
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 180);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 180);
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(2);
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
{
if (targetHitbox.Width > 8 && targetHitbox.Height > 8)
{
targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8);
}
return null;
}
public override bool PreDraw(ref Color lightColor)
{
Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value;
int projFrame = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type];
int y6 = projFrame * Projectile.frame;
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, projFrame)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)projFrame / 2f), Projectile.scale, SpriteEffects.None, 0);
return false;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

+104
View File
@@ -0,0 +1,104 @@
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Ranged
{
public class SulphuricDrop : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Ranged";
public override string Texture => "CalamityMod/Projectiles/Environment/AcidDrop";
public override void SetStaticDefaults()
{
ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5;
ProjectileID.Sets.TrailingMode[Projectile.type] = 0;
}
public override void SetDefaults()
{
Projectile.width = 14;
Projectile.height = 20;
Projectile.friendly = true;
Projectile.tileCollide = true;
Projectile.ignoreWater = false;
Projectile.penetrate = 3;
Projectile.timeLeft = 840;
Projectile.extraUpdates = 1;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 15;
Projectile.DamageType = DamageClass.Ranged;
}
public override void AI()
{
if (Main.rand.NextBool(3))
{
Dust dust = Dust.NewDustPerfect(Projectile.Center, 278);
dust.noGravity = false;
dust.scale = Main.rand.NextFloat(0.4f, 0.65f);
dust.velocity = -Projectile.velocity * 0.4f;
dust.color = Color.SeaGreen;
}
if (Projectile.velocity.Y < 0f)
{
Projectile.velocity.Y *= 0.97f;
}
else
{
Projectile.velocity.Y *= 1.03f;
if (Projectile.velocity.Y > 16f)
{
Projectile.velocity.Y = 16f;
}
}
if (Projectile.velocity.Y > -1f && Projectile.localAI[1] == 0f)
{
Projectile.localAI[1] = 1f;
Projectile.velocity.Y = 1f;
}
Projectile.velocity.X *= 0.995f;
if (Projectile.ai[0] >= 2f)
{
Projectile.alpha -= 25;
if (Projectile.alpha < 0)
{
Projectile.alpha = 0;
}
}
Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
}
public override void OnKill(int timeLeft)
{
for (int i = 0; i < 5; ++i)
{
int bloodLifetime = Main.rand.Next(22, 25);
float bloodScale = Main.rand.NextFloat(0.6f, 0.8f);
Color bloodColor = Color.Lerp(Color.SeaGreen, Color.Lime, Main.rand.NextFloat());
bloodColor = Color.Lerp(bloodColor, new Color(51, 22, 94), Main.rand.NextFloat(0.65f));
if (Main.rand.NextBool(20))
bloodScale *= 2f;
float randomSpeedMultiplier = Main.rand.NextFloat(1.25f, 2.25f);
Vector2 bloodVelocity = Main.rand.NextVector2Unit() * 2 * randomSpeedMultiplier;
bloodVelocity.Y -= 5f;
BloodParticle blood = new BloodParticle(Projectile.Center, bloodVelocity, bloodLifetime, bloodScale, bloodColor);
GeneralParticleHandler.SpawnParticle(blood);
}
}
public override bool PreDraw(ref Color lightColor)
{
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], new Color(255, 255, 255, 127), 2);
return false;
}
}
}
+6 -8
View File
@@ -1,14 +1,12 @@
using System;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.NPCs.NormalNPCs;
using CalamityMod.Projectiles.BaseProjectiles;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Audio;
using Terraria.GameContent;
using Terraria.GameContent.ItemDropRules;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
@@ -35,7 +33,7 @@ namespace CalamityMod.Projectiles.Rogue
Projectile.ownerHitCheck = true;
Projectile.hide = true;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 2;
Projectile.localNPCHitCooldown = 5;
Projectile.alpha = 180;
Projectile.scale = 1.25f;
}
@@ -82,7 +80,7 @@ namespace CalamityMod.Projectiles.Rogue
{
Player player = Main.player[Projectile.owner];
//Dont drop money from Dummies, WoF eyes and worm segments to make grinding money a bit harder and not give money from Dummies since that was apparently happening
if (Projectile.owner == Main.myPlayer && target.IsAnEnemy(false) && !target.dontCountMe && !CalamityLists.needsDebuffIconDisplayList.Contains(target.type))
if (Projectile.owner == Main.myPlayer && target.IsAnEnemy(false) && !target.dontCountMe && !NeedsDebuffIconDisplayList.Includes(target.type))
{
float moneyValueToDrop = target.value / Main.rand.NextFloat(15f, 35f);
// Maximum of 50 silver, not counting steath strikes
@@ -144,13 +142,13 @@ namespace CalamityMod.Projectiles.Rogue
}
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
{
// Boost dmg in proportion to money, caps at 5 plat. Unless in Gfb cuz it would be funny
// Boost dmg in proportion to money, caps at 3 plat. Unless in Gfb cuz it would be funny
if (Projectile.Calamity().stealthStrike)
{
Player player = Main.player[Projectile.owner];
double money = Utils.CoinsCount(out bool overflow, player.inventory);
if (money >= 5000000 && !Main.zenithWorld)
money = 5000000;
if (money >= 3000000 && !Main.zenithWorld)
money = 3000000;
if (money != 0)
{
modifiers.SourceDamage *= (float)(money / 1250000 + 1);
+51
View File
@@ -0,0 +1,51 @@
using System.Collections.Generic;
using CalamityMod.Buffs.Alcohol;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Systems.Collections
{
/// <summary>
/// A <see cref="ModSystem"/> that contains a <see cref="IList{T}"/> of all alcohol buff's IDs.
/// </summary>
public sealed class AlcoholsList : ModSystem
{
public static IList<int> List { get; private set; }
public override void OnModLoad()
{
List =
[
BuffID.Tipsy,
BuffType<BloodyMaryBuff>(),
BuffType<CaribbeanRumBuff>(),
BuffType<CinnamonRollBuff>(),
BuffType<EverclearBuff>(),
BuffType<EvergreenGinBuff>(),
BuffType<FireballBuff>(),
BuffType<GrapeBeerBuff>(),
BuffType<MargaritaBuff>(),
BuffType<MoonshineBuff>(),
BuffType<MoscowMuleBuff>(),
BuffType<OldFashionedBuff>(),
BuffType<RedWineBuff>(),
BuffType<RumBuff>(),
BuffType<ScrewdriverBuff>(),
BuffType<StarBeamRyeBuff>(),
BuffType<TequilaBuff>(),
BuffType<TequilaSunriseBuff>(),
BuffType<VodkaBuff>(),
BuffType<WhiskeyBuff>(),
BuffType<WhiteWineBuff>()
];
}
public override void Unload() => List = null;
/// <summary>
/// A shorthand method to check whether or not a buff ID is an alcohol.
/// </summary>
public static bool Includes(int buffID) => List.Contains(buffID);
}
}
+123
View File
@@ -0,0 +1,123 @@
using System.Collections.Generic;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Buffs.Potions;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Systems.Collections
{
/// <summary>
/// A <see cref="ModSystem"/> that contains a <see cref="IList{T}"/> with all buff IDs of those who are boosted by The Amalgam accessory.
/// </summary>
public sealed class AmalgamBuffList : ModSystem
{
public static IList<int> List { get; private set; }
public override void OnModLoad()
{
List =
[
BuffType<AnechoicCoatingBuff>(),
BuffType<AstralInjectionBuff>(),
BuffType<BaguetteBuff>(),
BuffType<BloodfinBoost>(),
BuffType<BoundingBuff>(),
BuffType<CalciumBuff>(),
BuffType<CeaselessHunger>(),
BuffType<GravityNormalizerBuff>(),
BuffType<Omniscience>(),
BuffType<PhotosynthesisBuff>(),
BuffType<ShadowBuff>(),
BuffType<Soaring>(),
BuffType<SulphurskinBuff>(),
BuffType<WeaponImbueBrimstone>(),
BuffType<WeaponImbueCrumbling>(),
BuffType<WeaponImbueHolyFlames>(),
BuffType<Zen>(),
BuffType<Zerg>(),
BuffType<BloodyMaryBuff>(),
BuffType<CaribbeanRumBuff>(),
BuffType<CinnamonRollBuff>(),
BuffType<EverclearBuff>(),
BuffType<EvergreenGinBuff>(),
BuffType<FabsolVodkaBuff>(),
BuffType<FireballBuff>(),
BuffType<GrapeBeerBuff>(),
BuffType<MargaritaBuff>(),
BuffType<MoonshineBuff>(),
BuffType<MoscowMuleBuff>(),
BuffType<RedWineBuff>(),
BuffType<RumBuff>(),
BuffType<ScrewdriverBuff>(),
BuffType<StarBeamRyeBuff>(),
BuffType<TequilaBuff>(),
BuffType<TequilaSunriseBuff>(),
BuffType<Trippy>(),
BuffType<VodkaBuff>(),
BuffType<WhiskeyBuff>(),
BuffType<WhiteWineBuff>(),
BuffID.ObsidianSkin,
BuffID.Regeneration,
BuffID.Swiftness,
BuffID.Gills,
BuffID.Ironskin,
BuffID.ManaRegeneration,
BuffID.MagicPower,
BuffID.Featherfall,
BuffID.Spelunker,
BuffID.Invisibility,
BuffID.Shine,
BuffID.NightOwl,
BuffID.Battle,
BuffID.Thorns,
BuffID.WaterWalking,
BuffID.Archery,
BuffID.Hunter,
BuffID.Gravitation,
BuffID.Tipsy,
BuffID.WellFed,
BuffID.WellFed2,
BuffID.WellFed3,
BuffID.Honey,
BuffID.WeaponImbueVenom,
BuffID.WeaponImbueCursedFlames,
BuffID.WeaponImbueFire,
BuffID.WeaponImbueGold,
BuffID.WeaponImbueIchor,
BuffID.WeaponImbueNanites,
BuffID.WeaponImbueConfetti,
BuffID.WeaponImbuePoison,
BuffID.Lucky,
BuffID.Mining,
BuffID.Heartreach,
BuffID.Calm,
BuffID.Builder,
BuffID.Titan,
BuffID.Flipper,
BuffID.Summoning,
BuffID.Dangersense,
BuffID.AmmoReservation,
BuffID.Lifeforce,
BuffID.Endurance,
BuffID.Rage,
BuffID.Inferno,
BuffID.Wrath,
BuffID.Lovestruck,
BuffID.Stinky,
BuffID.Fishing,
BuffID.Sonar,
BuffID.Crate,
BuffID.Warmth,
BuffID.SugarRush
];
}
public override void Unload() => List = null;
/// <summary>
/// A shorthand method to check whether or not a buff is boosted by The Amalgam or not.
/// </summary>
public static bool Includes(int buffID) => List.Contains(buffID);
}
}
@@ -0,0 +1,46 @@
using System.Collections.Generic;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Systems.Collections
{
/// <summary>
/// A <see cref="ModSystem"/> that contains a <see cref="IList{T}"/> of all Vanilla Spears to make them autoreusable.
/// </summary>
public sealed class AutoreusableSpearsList : ModSystem
{
public static IList<int> List { get; private set; }
public override void OnModLoad()
{
List =
[
ItemID.AdamantiteGlaive,
ItemID.ChlorophytePartisan,
ItemID.CobaltNaginata,
ItemID.DarkLance,
ItemID.MonkStaffT2,
ItemID.Gungnir,
ItemID.MushroomSpear,
ItemID.MythrilHalberd,
ItemID.NorthPole,
ItemID.ObsidianSwordfish,
ItemID.OrichalcumHalberd,
ItemID.PalladiumPike,
ItemID.Spear,
ItemID.Swordfish,
ItemID.TheRottedFork,
ItemID.TitaniumTrident,
ItemID.Trident,
ItemID.ThunderSpear
];
}
public override void Unload() => List = null;
/// <summary>
/// A shorthand method to check whether or not an item is an autoreusable spear.
/// </summary>
public static bool Includes(int itemType) => List.Contains(itemType);
}
}
@@ -0,0 +1,38 @@
using System.Collections.Generic;
using CalamityMod.Items.Tools;
using CalamityMod.Items.Weapons.DraedonsArsenal;
using CalamityMod.Items.Weapons.Melee;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Systems.Collections
{
public sealed class BlacklistedWeaponsWithToolPowerList : ModSystem
{
public static IList<int> List { get; private set; }
public override void OnModLoad()
{
// This list intentionally does not contain Grax.
List =
[
ItemID.ButchersChainsaw,
ItemID.LucyTheAxe,
ItemID.Rockfish,
ItemType<AxeofPurity>(),
ItemType<HydraulicVoltCrasher>(),
ItemType<InfernaCutter>(),
ItemType<PhotonRipper>(),
ItemType<Respiteblock>()
];
}
public override void Unload() => List = null;
/// <summary>
/// A shorthand method to check if this Item is Blacklisted.
/// </summary>
public static bool Includes(int itemType) => List.Contains(itemType);
}
}
@@ -0,0 +1,37 @@
using System.Collections.Generic;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Systems.Collections
{
/// <summary>
/// A <see cref="ModSystem"/> which contains a <see cref="IList{T}"/> that has the Projectile IDs of all projectiles who are buffed Dungeon projectiles.
/// </summary>
public sealed class BuffedDungeonProjectilesList : ModSystem
{
public static IList<int> List { get; private set; }
public override void OnModLoad()
{
List =
[
ProjectileID.PaladinsHammerHostile,
ProjectileID.ShadowBeamHostile,
ProjectileID.InfernoHostileBolt,
ProjectileID.InfernoHostileBlast,
ProjectileID.LostSoulHostile,
ProjectileID.SniperBullet,
ProjectileID.RocketSkeleton,
ProjectileID.BulletDeadeye,
ProjectileID.Shadowflames
];
}
public override void Unload() => List = null;
/// <summary>
/// A shorthand method to check if this projectile is a buffed Dungeon projectile.
/// </summary>
public static bool Includes(int projType) => List.Contains(projType);
}
}
@@ -0,0 +1,58 @@
using System.Collections.Generic;
using CalamityMod.NPCs.Astral;
using CalamityMod.NPCs.Crags;
using CalamityMod.NPCs.NormalNPCs;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Systems.Collections
{
/// <summary>
/// A <see cref="ModSystem"/> that contains all of the NPC's IDs of the NPCs who are immune to the Confusion debuff.
/// </summary>
public sealed class ConfusionDebuffImmunitiesList : ModSystem
{
public static IList<int> List { get; private set; }
public override void OnModLoad()
{
List =
[
NPCType<AeroSlime>(),
NPCType<Rimehound>(),
NPCType<AstralachneaGround>(),
NPCType<AstralachneaWall>(),
NPCType<BloomSlime>(),
NPCType<Bohldohr>(),
NPCType<CalamityEye>(),
NPCType<CrimulanBlightSlime>(),
NPCType<Cryon>(),
NPCType<CryoSlime>(),
NPCType<RenegadeWarlock>(),
NPCType<DespairStone>(),
NPCType<EbonianBlightSlime>(),
NPCType<FearlessGoldfishWarrior>(),
NPCType<HeatSpirit>(),
NPCType<MantisShrimp>(),
NPCType<OverloadedSoldier>(),
NPCType<PerennialSlime>(),
NPCType<Rotdog>(),
NPCType<Scryllar>(),
NPCType<ScryllarRage>(),
NPCType<SeaUrchin>(),
NPCType<StellarCulex>(),
NPCType<Stormlion>(),
NPCType<SuperDummyNPC>(),
NPCType<WulfrumGyrator>(),
NPCType<WulfrumRover>()
];
}
public override void Unload() => List = null;
/// <summary>
/// A shorthand method to check if an NPC is supposed to be immune to the Confusion debuff.
/// </summary>
public static bool Includes(int npcType) => List.Contains(npcType);
}
}
+100
View File
@@ -0,0 +1,100 @@
using System.Collections.Generic;
using CalamityMod.Buffs;
using CalamityMod.Buffs.Cooldowns;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Systems.Collections
{
/// <summary>
/// A <see cref="ModSystem"/> that contains a <see cref="IList{T}"/> that has all Debuff IDs.
/// </summary>
public sealed class DebuffsList : ModSystem
{
public static IList<int> List { get; private set; }
public override void OnModLoad()
{
List =
[
BuffID.Poisoned,
BuffID.Darkness,
BuffID.Cursed,
BuffID.OnFire,
BuffID.Bleeding,
BuffID.Confused,
BuffID.Slow,
BuffID.Weak,
BuffID.Silenced,
BuffID.BrokenArmor,
BuffID.CursedInferno,
BuffID.Frostburn,
BuffID.Chilled,
BuffID.Frozen,
BuffID.Burning,
BuffID.Suffocation,
BuffID.Ichor,
BuffID.Venom,
BuffID.Blackout,
BuffID.Electrified,
BuffID.Rabies,
BuffID.Webbed,
BuffID.Stoned,
BuffID.Dazed,
BuffID.VortexDebuff,
BuffID.WitheredArmor,
BuffID.WitheredWeapon,
BuffID.OgreSpit,
BuffID.BetsysCurse,
BuffType<SulphuricPoisoning>(),
BuffType<Shadowflame>(),
BuffType<BrimstoneFlames>(),
BuffType<BurningBlood>(),
BuffType<BrainRot>(),
BuffType<ElementalMix>(),
BuffType<GlacialState>(),
BuffType<GodSlayerInferno>(),
BuffType<AstralInfectionDebuff>(),
BuffType<HolyFlames>(),
BuffType<Irradiated>(),
BuffType<Plague>(),
BuffType<CrushDepth>(),
BuffType<RiptideDebuff>(),
BuffType<MarkedforDeath>(),
BuffType<AbsorberAffliction>(),
BuffType<ArmorCrunch>(),
BuffType<Crumbling>(),
BuffType<Vaporfied>(),
BuffType<Eutrophication>(),
BuffType<Dragonfire>(),
BuffType<VermillionFlux>(),
BuffType<AuricRebuke>(),
BuffType<StaticDischarge>(),
BuffType<Nightwither>(),
BuffType<VulnerabilityHex>(),
BuffType<MiracleBlight>(),
BuffType<WhisperingDeath>(),
BuffType<FrozenLungs>(),
BuffType<FishAlert>(),
BuffType<HolyInferno>(),
BuffType<IcarusFolly>(),
BuffType<DoGExtremeGravity>(),
// BuffType<NOU>(),
BuffType<PopoNoselessBuff>(),
BuffType<SearingLava>(),
BuffType<WeakBrimstoneFlames>(),
BuffType<Withered>()
];
}
public override void Unload() => List = null;
/// <summary>
/// A shorthand method to check if a buff ID is a debuff.
/// </summary>
public static bool Includes(int buffID) => List.Contains(buffID);
}
}
Loaded 100 of 304 files, more files were not shown because too many files have changed in this diff. Show more