Files
CalamityModPublic/Systems/Collections/CalamityBuffSets.cs
T
CongratsIsTrash f8edb56586 Moved the new lists into the ID sets
Purple Haze counts towards Alcohol Poisoning, and removed Gatling Laser (now Countermeasure Mitt) from magic gun ID set
Plus more fixes
2025-08-01 14:46:19 -04:00

141 lines
11 KiB
C#

using System.Collections.Generic;
using CalamityMod.Buffs;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Buffs.Cooldowns;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.Potions;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Buffs.Summon.Whips;
using CalamityMod.DataStructures;
using CalamityMod.Items.Accessories;
using ReLogic.Reflection;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Systems.Collections
{
[ReinitializeDuringResizeArrays]
public static class CalamityBuffSets
{
public static SetFactory Factory = new SetFactory(BuffLoader.BuffCount, "CalamityMod/BuffID", Search);
public static IdDictionary Search = IdDictionary.Create<BuffID, int>();
/// <summary>
/// If <see langword="true"/> for a buff type, then that buff will have its duration extended with The Amalgam equipped.<br/>
/// Also used to remove buffs when contacting the Whispering Maelstrom in the Get fixed boi seed.<br/>
/// Defaults to <see langword="false"/>.
/// </summary>
public static bool[] BuffedByAmalgam = Factory.CreateBoolSet(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, 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<PurpleHazeBuff>(), 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>());
/// <summary>
/// If <see langword="true"/> for a buff type, then that buff is a persistent buff.<br/>
/// Used by The Amalgam to prevent removing their persistence when the accessory is unequipped.<br/>
/// Defaults to <see langword="false"/>.
/// </summary>
public static bool[] IsPersistentBuff = Factory.CreateBoolSet(BuffID.WeaponImbueVenom, BuffID.WeaponImbueCursedFlames, BuffID.WeaponImbueFire, BuffID.WeaponImbueGold,
BuffID.WeaponImbueIchor, BuffID.WeaponImbueNanites, BuffID.WeaponImbueConfetti, BuffID.WeaponImbuePoison, BuffType<WeaponImbueBrimstone>(),
BuffType<WeaponImbueCrumbling>(), BuffType<WeaponImbueHolyFlames>());
/// <summary>
/// If <see langword="true"/> for a buff type, then that buff is considered to be a sickness debuff.<br/>
/// Used for reducing buff duration with Honey Dew and its upgrades.<br/>
/// Defaults to <see langword="false"/>.
/// </summary>
public static bool[] IsSicknessDebuff = Factory.CreateBoolSet(BuffID.Poisoned, BuffID.Venom, BuffType<BrainRot>(), BuffType<BurningBlood>(), BuffType<SulphuricPoisoning>(),
BuffType<AstralInfectionDebuff>(), BuffType<Plague>(), BuffType<AbsorberAffliction>(), BuffType<WhisperingDeath>(), BuffType<Irradiated>());
/// <summary>
/// If <see langword="true"/> for a buff type, then that buff is considered to be a fire debuff.<br/>
/// Used for reducing buff duration with Living Dew and its upgrades, and providing Permafrost's Concoction's life regeneration boost.<br/>
/// Defaults to <see langword="false"/>.
/// </summary>
public static bool[] IsFireDebuff = Factory.CreateBoolSet(BuffID.OnFire, BuffID.OnFire3, BuffID.Burning, BuffID.CursedInferno, BuffID.ShadowFlame, BuffType<Shadowflame>(),
BuffType<SearingLava>(), BuffType<BrimstoneFlames>(), BuffType<Daybroken>(), BuffType<HolyFlames>(), BuffType<GodSlayerInferno>(), BuffType<Dragonfire>(),
BuffType<WeakBrimstoneFlames>(), BuffType<BanishingFire>());
/// <summary>
/// If <see langword="true"/> for a buff type, then that buff is considered to be a debuff.<br/>
/// This general-purpose set has several different uses, including reducing buff duration with Radiance, Crown Jewel and its upgrades' debuff effects, and removing debuffs with Cleansing Jelly and its upgrades' auras.<br/>
/// Defaults to <see langword="false"/>.
/// </summary>
public static bool[] IsDebuff = Factory.CreateBoolSet(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<Daybroken>(), BuffType<BrimstoneFlames>(), BuffType<BurningBlood>(),
BuffType<BrainRot>(), BuffType<ElementalMix>(), BuffType<GlacialState>(), BuffType<GodSlayerInferno>(), BuffType<AstralInfectionDebuff>(), BuffType<HolyFlames>(),
BuffType<Irradiated>(), BuffType<Plague>(), BuffType<CrushDepth>(), BuffType<HadopelagicPressure>(), BuffType<RiptideDebuff>(), BuffType<MarkedforDeath>(),
BuffType<HeavyBleeding>(), BuffType<Laceration>(), BuffType<AbsorberAffliction>(), BuffType<ArmorCrunch>(), BuffType<Crumbling>(), BuffType<Vaporfied>(), BuffType<Eutrophication>(),
BuffType<Dragonfire>(), BuffType<VermillionFlux>(), BuffType<AuricRebuke>(), BuffType<StaticDischarge>(), BuffType<Nightwither>(), BuffType<Voidfrost>(),
BuffType<VulnerabilityHex>(), BuffType<MiracleBlight>(), BuffType<WhisperingDeath>(), BuffType<FrozenLungs>(), BuffType<FishAlert>(), BuffType<HolyInferno>(),
BuffType<IcarusFolly>(), BuffType<DoGExtremeGravity>(), BuffType<PopoNoselessBuff>(), BuffType<SearingLava>(), BuffType<WeakBrimstoneFlames>(), BuffType<Withered>());
/// <summary>
/// If <see langword="true"/> for a buff type, then that buff is a whip tag buff on the player.<br/>
/// Used to prevent "whip stacking", the ability to grant the player multiple whip buff effects at once.<br/>
/// Defaults to <see langword="false"/>.
/// </summary>
public static bool[] IsSummonTagBuff = Factory.CreateBoolSet(BuffID.CoolWhipPlayerBuff, BuffID.ScytheWhipPlayerBuff, BuffID.SwordWhipPlayerBuff, BuffID.ThornWhipPlayerBuff, BuffType<ProfanedCrystalWhipBuff>());
/// <summary>
/// Associates a buff type with its <see cref="SummonTag"/> structure. If a buff type is not a key in this dictionary, then it has no associated <see cref="SummonTag"/>.<br/>
/// Used for several different effects, such as applying tag effects to NPCs, preventing "whip stacking" on NPCs, and drawing the tag effect icon below the NPC.
/// </summary>
public static Dictionary<int, SummonTag> SummonTagDebuff = new Dictionary<int, SummonTag>
{
{ BuffID.BlandWhipEnemyDebuff, SummonTag.LeatherWhip },
{ BuffID.BoneWhipNPCDebuff, SummonTag.SpinalTap },
{ BuffID.CoolWhipNPCDebuff, SummonTag.CoolWhip },
{ BuffID.FlameWhipEnemyDebuff, SummonTag.Firecracker },
{ BuffID.MaceWhipNPCDebuff, SummonTag.MorningStar },
{ BuffID.RainbowWhipNPCDebuff, SummonTag.Kaleidoscope },
{ BuffID.ScytheWhipEnemyDebuff, SummonTag.DarkHarvest },
{ BuffID.SwordWhipNPCDebuff, SummonTag.Durendal },
{ BuffID.ThornWhipNPCDebuff, SummonTag.Snapthorn },
{ BuffType<ProfanedCrystalWhipDebuff>(), ProfanedSoulCrystal.SummonTag }
};
/// <summary>
/// Associates a buff type with its alcohol poison level. Used for the Alcohol Poisoning mechanic.<br/>
/// If a buff type is not a key in this dictionary, then it does not increase alcohol poison level.
/// </summary>
public static Dictionary<int, int> AlcoholStrength = new Dictionary<int, int>
{
{ BuffID.Tipsy, 1 },
{ BuffType<BloodyMaryBuff>(), 1 },
{ BuffType<CaribbeanRumBuff>(), 1 },
{ BuffType<CinnamonRollBuff>(), 1 },
{ BuffType<EverclearBuff>(), 2 },
{ BuffType<EvergreenGinBuff>(), 1 },
{ BuffType<FireballBuff>(), 1 },
{ BuffType<GrapeBeerBuff>(), 1 },
{ BuffType<MargaritaBuff>(), 1 },
{ BuffType<MoonshineBuff>(), 1 },
{ BuffType<MoscowMuleBuff>(), 1 },
{ BuffType<OldFashionedBuff>(), 1 },
{ BuffType<PurpleHazeBuff>(), 1 },
{ BuffType<RedWineBuff>(), 1 },
{ BuffType<RumBuff>(), 1 },
{ BuffType<ScrewdriverBuff>(), 1 },
{ BuffType<StarBeamRyeBuff>(), 1 },
{ BuffType<TequilaBuff>(), 1 },
{ BuffType<TequilaSunriseBuff>(), 1 },
{ BuffType<VodkaBuff>(), 1 },
{ BuffType<WhiskeyBuff>(), 1 },
{ BuffType<WhiteWineBuff>(), 1 }
};
}
}