using CalamityMod.Projectiles.Boss; using CalamityMod.Projectiles.Magic; using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Rogue; using CalamityMod.Projectiles.Summon; using CalamityMod.Projectiles.Typeless; using ReLogic.Reflection; using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; namespace CalamityMod.Systems.Collections { [ReinitializeDuringResizeArrays] public static class CalamityProjectileSets { private static SetFactory Factory = new SetFactory(ProjectileLoader.ProjectileCount, "CalamityMod/ProjectileID", Search); private static IdDictionary Search = IdDictionary.Create(); /// /// If for a projectile type, then that minion will completely ignore Calamity's summon damage penalty mechanic with no exceptions.
/// Unused by Calamity itself, and is only used for external mods to add to through mod calls.
/// Defaults to . ///
public static bool[] MinionWhichIgnoresSummonerNerf = Factory.CreateNamedSet("MinionWhichIgnoresSummonerNerf") .Description("Makes this minion ignore the summon damage penalty.") .RegisterBoolSet(); /// /// If for a projectile type, then that projectile is spawned by a post-Plantera Dungeon enemy.
/// This increases the projectile's damage by a flat 30 if Moon Lord has been defeated.
/// Defaults to . ///
public static bool[] IsBuffedDungeonProjectile = Factory.CreateNamedSet("IsBuffedDungeonProjectile") .Description("Makes this Dungeon projectile get a damage buff after defeating Moon Lord.") .RegisterBoolSet(ProjectileID.PaladinsHammerHostile, ProjectileID.ShadowBeamHostile, ProjectileID.InfernoHostileBolt, ProjectileID.InfernoHostileBlast, ProjectileID.LostSoulHostile, ProjectileID.SniperBullet, ProjectileID.RocketSkeleton, ProjectileID.BulletDeadeye, ProjectileID.Shadowflames); /// /// If for a projectile type, then that projectile is spawned by a Solar Eclipse, Pumpkin Moon, or Frost Moon enemy.
/// This increases the projectile's damage by a flat 15 during those events if Devourer of Gods has been defeated.
/// Defaults to . ///
public static bool[] IsBuffedEventProjectile = Factory.CreateNamedSet("IsBuffedEventProjectile") .Description("Makes this Pumpkin Moon, Frost Moon, or Solar Eclipse projectile get a damage buff after defeating Devourer of Gods.") .RegisterBoolSet(ProjectileID.FlamingWood, ProjectileID.GreekFire1, ProjectileID.GreekFire2, ProjectileID.GreekFire3, ProjectileID.FlamingScythe, ProjectileID.FlamingArrow, ProjectileID.PineNeedleHostile, ProjectileID.OrnamentHostile, ProjectileID.OrnamentHostileShrapnel, ProjectileID.FrostWave, ProjectileID.FrostShard, ProjectileID.Missile, ProjectileID.Present, ProjectileID.Spike, ProjectileID.BulletDeadeye, ProjectileID.EyeLaser, ProjectileID.Nail, ProjectileID.DrManFlyFlask); /// /// If for a projectile type, then that projectile is considered a friendly bee.
/// Used to allow the projectile to inflict Plague while wearing the Plaguebringer armor.
/// Defaults to . ///
public static bool[] IsFriendlyBeeProjectile = Factory.CreateNamedSet("IsFriendlyBeeProjectile") .Description("Labels this projectile as a friendly bee, used to make it inflict Plague with Plaguebringer armor.") .RegisterBoolSet(ProjectileID.GiantBee, ProjectileID.Bee, ProjectileID.Wasp, ProjectileID.Hornet,ProjectileID.HornetStinger, ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType()); /// /// If for a projectile type, then that projectile is a bomb or other explosive which is not a weapon.
/// Used to provide early-game worm bosses a resistance to their explosive damage.
/// Defaults to . ///
public static bool[] ResistedExplosiveProjectile = Factory.CreateNamedSet("ResistedExplosiveProjectile") .Description("Makes this grenade/bomb/dynamite projectile be resisted by earlygame worm bosses.") .RegisterBoolSet(ProjectileID.Grenade, ProjectileID.StickyGrenade, ProjectileID.BouncyGrenade, ProjectileID.Bomb, ProjectileID.StickyBomb, ProjectileID.BouncyBomb, ProjectileID.Dynamite, ProjectileID.StickyDynamite, ProjectileID.BouncyDynamite, ProjectileID.Explosives, ProjectileID.ExplosiveBunny, ProjectileID.PartyGirlGrenade, ProjectileID.BombFish, ProjectileID.ScarabBomb, ProjectileID.TNTBarrel, ProjectileType()); /// /// If for a projectile type, then that projectile will never be reflected by armor or accessory effects.
/// Set this for persistent projectiles such as deathrays to avoid major screwing of their behavior.
/// Only needs to be set for hostile projectiles, as these effects already have a check to ensure they never trigger in PvP.
/// Defaults to . ///
public static bool[] ShouldNotBeReflected = Factory.CreateNamedSet("ShouldNotBeReflected") .Description("Prevents this projectile from being reflected by armor or accessory effects.") .RegisterBoolSet(ProjectileID.SaucerDeathray, ProjectileID.PhantasmalDeathray, ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType()); /// /// If for a projectile type, then that projectile will be blacklisted from receiving the homing effect of Grape Beer.
/// Defaults to . ///
public static bool[] DoesNotGetHomingWithGrapeBeer = Factory.CreateNamedSet("DoesNotGetHomingWithGrapeBeer") .Description("Prevents this projectile from receiving homing from Grape Beer.") .RegisterBoolSet(ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType()); /// /// If for a projectile type, then that projectile will be unable to trigger Daawnlight Spirit Origin's bullseyes.
/// Defaults to . ///
public static bool[] DaawnlightBlacklist = Factory.CreateNamedSet("DaawnlightBlacklist") .Description("Prevents this projectile from triggering Daawnlight Spirit Origin's bullseyes.") .RegisterBoolSet(ProjectileType(), ProjectileType(), ProjectileType()); /// /// Determines what other projectiles this projectile will share ID-static immunity frames with. Defaults to -1, which means that it does not share immunity frames.
/// Each "set" of projectile which shares immunity frames is registered to point to the same ID reference, usually the first projectile in the set. If a projectile with this reference hits an NPC, all other projectiles with that reference also have their ID-static immunity cooldown set for that NPC. ///
public static int[] SharedIDStaticIFrames = Factory.CreateNamedSet("SharedIDStaticIFrames") .Description("Determines what other projectiles this projectile will share ID-static immunity frames with. Defaults to -1, which means that it does not share immunity frames.") .RegisterIntSet(-1, // Vanilla bees ProjectileID.Bee, ProjectileID.Bee, ProjectileID.GiantBee, ProjectileID.Bee, // Vilethorn ProjectileID.VilethornBase, ProjectileID.VilethornBase, ProjectileID.VilethornTip, ProjectileID.VilethornBase, // Crystal Vile Shard ProjectileID.CrystalVileShardHead, ProjectileID.CrystalVileShardHead, ProjectileID.CrystalVileShardShaft, ProjectileID.CrystalVileShardHead, // Nettle Burst ProjectileID.NettleBurstRight, ProjectileID.NettleBurstRight, ProjectileID.NettleBurstLeft, ProjectileID.NettleBurstRight, ProjectileID.NettleBurstEnd, ProjectileID.NettleBurstRight, // Magical Harp notes ProjectileID.QuarterNote, ProjectileID.QuarterNote, ProjectileID.EighthNote, ProjectileID.QuarterNote, ProjectileID.TiedEighthNote, ProjectileID.QuarterNote, // North Pole ProjectileID.NorthPoleWeapon, ProjectileID.NorthPoleWeapon, ProjectileID.NorthPoleSpear, ProjectileID.NorthPoleWeapon, // Spore gas clouds ProjectileID.SporeTrap, ProjectileID.SporeTrap, ProjectileID.SporeTrap2, ProjectileID.SporeTrap, ProjectileID.SporeGas, ProjectileID.SporeTrap, ProjectileID.SporeGas2, ProjectileID.SporeTrap, ProjectileID.SporeGas3, ProjectileID.SporeTrap, // Astral Staff ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), // Keelhaul ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), // Toxic clouds ProjectileID.ToxicCloud, ProjectileID.ToxicCloud, ProjectileID.ToxicCloud2, ProjectileID.ToxicCloud, ProjectileID.ToxicCloud3, ProjectileID.ToxicCloud ); } }