diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 2962934531..fc495f3f00 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -2372,7 +2372,7 @@ namespace CalamityMod.CalPlayer { BossRushEvent.BossRushActive = false; BossRushEvent.BossRushStage = 0; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); if (Main.netMode == NetmodeID.Server) { var netMessage = mod.GetPacket(); @@ -4288,23 +4288,23 @@ namespace CalamityMod.CalPlayer { add += GaelsGreatsword.BaseDamage / (float)GaelsGreatsword.BaseDamage - 1f; } - if (flamethrowerBoost && item.ranged && (item.useAmmo == 23 || CalamityMod.flamethrowerList.Contains(item.type))) + if (flamethrowerBoost && item.ranged && (item.useAmmo == 23 || CalamityLists.flamethrowerList.Contains(item.type))) { add += hoverboardBoost ? 0.35f : 0.25f; } - if (cinnamonRoll && CalamityMod.fireWeaponList.Contains(item.type)) + if (cinnamonRoll && CalamityLists.fireWeaponList.Contains(item.type)) { add += 0.15f; } - if (evergreenGin && CalamityMod.natureWeaponList.Contains(item.type)) + if (evergreenGin && CalamityLists.natureWeaponList.Contains(item.type)) { add += 0.15f; } - if (fireball && CalamityMod.fireWeaponList.Contains(item.type)) + if (fireball && CalamityLists.fireWeaponList.Contains(item.type)) { add += 0.1f; } - if (eskimoSet && CalamityMod.iceWeaponList.Contains(item.type)) + if (eskimoSet && CalamityLists.iceWeaponList.Contains(item.type)) { add += 0.1f; } @@ -4758,7 +4758,7 @@ namespace CalamityMod.CalPlayer { CalamityUtils.Inflict246DebuffsNPC(target, ModContent.BuffType()); } - if ((plaguebringerCarapace || uberBees) && CalamityMod.friendlyBeeList.Contains(proj.type)) + if ((plaguebringerCarapace || uberBees) && CalamityLists.friendlyBeeList.Contains(proj.type)) { target.AddBuff(ModContent.BuffType(), 360); } @@ -4866,7 +4866,7 @@ namespace CalamityMod.CalPlayer { target.AddBuff(BuffID.Midas, 120, false); } - if (ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.ActiveItem().type)) + if (ZoneCalamity && CalamityLists.fireWeaponList.Contains(player.ActiveItem().type)) { target.AddBuff(ModContent.BuffType(), 240, false); } @@ -5099,7 +5099,7 @@ namespace CalamityMod.CalPlayer { CalamityUtils.Inflict246DebuffsPvp(target, ModContent.BuffType()); } - if ((plaguebringerCarapace || uberBees) && CalamityMod.friendlyBeeList.Contains(proj.type)) + if ((plaguebringerCarapace || uberBees) && CalamityLists.friendlyBeeList.Contains(proj.type)) { target.AddBuff(ModContent.BuffType(), 360); } @@ -5207,7 +5207,7 @@ namespace CalamityMod.CalPlayer { target.AddBuff(BuffID.Midas, 120, false); }*/ - if (ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.ActiveItem().type)) + if (ZoneCalamity && CalamityLists.fireWeaponList.Contains(player.ActiveItem().type)) { target.AddBuff(ModContent.BuffType(), 240, false); } @@ -5628,7 +5628,7 @@ namespace CalamityMod.CalPlayer int defenseAdd = (int)(target.defense * 0.05 * (proj.damage / 50D) * acidRoundMultiplier); //100 defense * 0.05 = 5 damage += defenseAdd; } - if (uberBees && CalamityMod.friendlyBeeList.Contains(proj.type)) + if (uberBees && CalamityLists.friendlyBeeList.Contains(proj.type)) { damage += Main.rand.Next(20, 31); } @@ -5662,7 +5662,7 @@ namespace CalamityMod.CalPlayer } if (proj.Calamity().rogue && etherealExtorter) { - if (CalamityMod.boomerangProjList.Contains(proj.type) && player.ZoneCorrupt) + if (CalamityLists.boomerangProjList.Contains(proj.type) && player.ZoneCorrupt) { penetrateAmt += 6; } @@ -6059,7 +6059,7 @@ namespace CalamityMod.CalPlayer if (beeResist) { - if (CalamityMod.beeEnemyList.Contains(npc.type)) + if (CalamityLists.beeEnemyList.Contains(npc.type)) contactDamageReduction += 0.25; } @@ -6202,7 +6202,7 @@ namespace CalamityMod.CalPlayer #region Modify Hit By Proj public override void ModifyHitByProjectile(Projectile proj, ref int damage, ref bool crit) { - if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => proj.type != x)) + if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => proj.type != x)) { if (player.ActiveItem().type == ModContent.ItemType() && proj.active && proj.hostile && player.altFunctionUse == 2 && Main.rand.NextBool(2)) @@ -6250,23 +6250,23 @@ namespace CalamityMod.CalPlayer if (CalamityWorld.revenge) { double damageMultiplier = 1D; - if (CalamityMod.revengeanceProjectileBuffList25Percent.Contains(proj.type)) + if (CalamityLists.revengeanceProjectileBuffList25Percent.Contains(proj.type)) { damageMultiplier += 0.25; } - else if (CalamityMod.revengeanceProjectileBuffList20Percent.Contains(proj.type)) + else if (CalamityLists.revengeanceProjectileBuffList20Percent.Contains(proj.type)) { damageMultiplier += 0.2; } - else if (CalamityMod.revengeanceProjectileBuffList15Percent.Contains(proj.type)) + else if (CalamityLists.revengeanceProjectileBuffList15Percent.Contains(proj.type)) { damageMultiplier += 0.15; } - else if (CalamityMod.revengeanceProjectileBuffList10Percent.Contains(proj.type)) + else if (CalamityLists.revengeanceProjectileBuffList10Percent.Contains(proj.type)) { damageMultiplier += 0.1; } - else if (CalamityMod.revengeanceProjectileBuffList5Percent.Contains(proj.type)) + else if (CalamityLists.revengeanceProjectileBuffList5Percent.Contains(proj.type)) { damageMultiplier += 0.05; } @@ -6344,13 +6344,13 @@ namespace CalamityMod.CalPlayer if (beeResist) { - if (CalamityMod.beeProjectileList.Contains(proj.type)) + if (CalamityLists.beeProjectileList.Contains(proj.type)) projectileDamageReduction += 0.25; } if (Main.hardMode && Main.expertMode && !CalamityWorld.spawnedHardBoss && proj.active && !proj.friendly && proj.hostile && damage > 0) { - if (CalamityMod.hardModeNerfList.Contains(proj.type)) + if (CalamityLists.hardModeNerfList.Contains(proj.type)) projectileDamageReduction += 0.25; } @@ -6446,7 +6446,7 @@ namespace CalamityMod.CalPlayer if (player.whoAmI == Main.myPlayer && gainRageCooldown <= 0) { - if (CalamityWorld.revenge && CalamityConfig.Instance.Rippers && !CalamityMod.trapProjectileList.Contains(proj.type)) + if (CalamityWorld.revenge && CalamityConfig.Instance.Rippers && !CalamityLists.trapProjectileList.Contains(proj.type)) { gainRageCooldown = 60; int stressGain = damage * (profanedRage ? 3 : 2); @@ -6615,7 +6615,7 @@ namespace CalamityMod.CalPlayer switch (proj.type) { case ProjectileID.Stinger: - if (CalamityMod.hornetList.Contains(bannerNPCType) || CalamityMod.mossHornetList.Contains(bannerNPCType)) + if (CalamityLists.hornetList.Contains(bannerNPCType) || CalamityLists.mossHornetList.Contains(bannerNPCType)) { reduceDamage = !NPC.AnyNPCs(NPCID.QueenBee); } @@ -7086,7 +7086,7 @@ namespace CalamityMod.CalPlayer player.AddBuff(ModContent.BuffType(), 180); } } - if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => proj.type != x)) + if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => proj.type != x)) { if (projRef && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(20)) { @@ -9648,7 +9648,7 @@ namespace CalamityMod.CalPlayer stealthGenMoving += 0.15f; } - if (CalamityMod.daggerList.Contains(player.ActiveItem().type) && player.invis) + if (CalamityLists.daggerList.Contains(player.ActiveItem().type) && player.invis) { stealthGenStandstill += 0.08f; stealthGenMoving += 0.08f; diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index e60be8be1c..87a5a65203 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -625,7 +625,7 @@ namespace CalamityMod.CalPlayer list.Add(MiscEffects); // Remove shoe drawing effects if special legs are meant to be drawn. - if (CalamityMod.legOverrideList.Contains(player.legs)) + if (CalamityLists.legOverrideList.Contains(player.legs)) list[list.IndexOf(PlayerLayer.ShoeAcc)].visible = false; if (player.Calamity().fab || player.Calamity().crysthamyr || player.Calamity().onyxExcavator) diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 0c3a9350bb..c17d62917e 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -403,7 +403,7 @@ namespace CalamityMod.CalPlayer for (int l = 0; l < Player.MaxBuffs; l++) { int hasBuff = player.buffType[l]; - lesserEffect = CalamityMod.alcoholList.Contains(hasBuff); + lesserEffect = CalamityLists.alcoholList.Contains(hasBuff); } if (lesserEffect) @@ -431,7 +431,7 @@ namespace CalamityMod.CalPlayer for (int l = 0; l < Player.MaxBuffs; l++) { int hasBuff = player.buffType[l]; - lesserEffect = CalamityMod.alcoholList.Contains(hasBuff); + lesserEffect = CalamityLists.alcoholList.Contains(hasBuff); } if (lesserEffect) @@ -665,7 +665,7 @@ namespace CalamityMod.CalPlayer for (int l = 0; l < Player.MaxBuffs; l++) { int hasBuff = player.buffType[l]; - bool shouldAffect = CalamityMod.alcoholList.Contains(hasBuff); + bool shouldAffect = CalamityLists.alcoholList.Contains(hasBuff); if (shouldAffect) lesserEffect = true; } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index fdde0a5dab..43e39811c3 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -411,7 +411,7 @@ namespace CalamityMod.CalPlayer for (int l = 0; l < Player.MaxBuffs; l++) { int hasBuff = player.buffType[l]; - if (player.buffTime[l] > 2 && CalamityMod.debuffList.Contains(hasBuff)) + if (player.buffTime[l] > 2 && CalamityLists.debuffList.Contains(hasBuff)) { player.buffTime[l]--; } @@ -422,7 +422,7 @@ namespace CalamityMod.CalPlayer // Immunity to most debuffs if (modPlayer.invincible) { - foreach (int debuff in CalamityMod.debuffList) + foreach (int debuff in CalamityLists.debuffList) player.buffImmune[debuff] = true; } @@ -1003,7 +1003,7 @@ namespace CalamityMod.CalPlayer // Silva invincibility effects if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet) { - foreach (int debuff in CalamityMod.debuffList) + foreach (int debuff in CalamityLists.debuffList) player.buffImmune[debuff] = true; player.buffImmune[ModContent.BuffType()] = true; @@ -1076,7 +1076,7 @@ namespace CalamityMod.CalPlayer player.AddBuff(ModContent.BuffType(), 1500, false); } - bool shouldAffect = CalamityMod.debuffList.Contains(hasBuff); + bool shouldAffect = CalamityLists.debuffList.Contains(hasBuff); if (shouldAffect) modPlayer.throwingDamage += 0.1f; } @@ -2672,22 +2672,22 @@ namespace CalamityMod.CalPlayer } } - if (CalamityMod.scopedWeaponList.Contains(player.ActiveItem().type)) + if (CalamityLists.scopedWeaponList.Contains(player.ActiveItem().type)) player.scope = true; - if (CalamityMod.highTestFishList.Contains(player.ActiveItem().type)) + if (CalamityLists.highTestFishList.Contains(player.ActiveItem().type)) player.accFishingLine = true; - if (CalamityMod.boomerangList.Contains(player.ActiveItem().type) && player.invis) + if (CalamityLists.boomerangList.Contains(player.ActiveItem().type) && player.invis) modPlayer.throwingDamage += 0.1f; - if (CalamityMod.javelinList.Contains(player.ActiveItem().type) && player.invis) + if (CalamityLists.javelinList.Contains(player.ActiveItem().type) && player.invis) player.armorPenetration += 5; - if (CalamityMod.flaskBombList.Contains(player.ActiveItem().type) && player.invis) + if (CalamityLists.flaskBombList.Contains(player.ActiveItem().type) && player.invis) modPlayer.throwingVelocity += 0.1f; - if (CalamityMod.spikyBallList.Contains(player.ActiveItem().type) && player.invis) + if (CalamityLists.spikyBallList.Contains(player.ActiveItem().type) && player.invis) modPlayer.throwingCrit += 10; if (modPlayer.planarSpeedBoost != 0) @@ -2713,10 +2713,10 @@ namespace CalamityMod.CalPlayer !modPlayer.ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor; - if (player.ZoneUnderworldHeight && !modPlayer.ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.ActiveItem().type)) + if (player.ZoneUnderworldHeight && !modPlayer.ZoneCalamity && CalamityLists.fireWeaponList.Contains(player.ActiveItem().type)) player.endurance += 0.03f; - if ((player.ZoneDesert || player.ZoneUndergroundDesert) && CalamityMod.daggerList.Contains(player.ActiveItem().type)) + if ((player.ZoneDesert || player.ZoneUndergroundDesert) && CalamityLists.daggerList.Contains(player.ActiveItem().type)) player.scope = true; if (modPlayer.ZoneSunkenSea) @@ -2725,7 +2725,7 @@ namespace CalamityMod.CalPlayer player.ignoreWater = true; } - if (player.ZoneSnow && CalamityMod.iceWeaponList.Contains(player.ActiveItem().type)) + if (player.ZoneSnow && CalamityLists.iceWeaponList.Contains(player.ActiveItem().type)) player.statDefense += 5; if (modPlayer.ZoneAstral) @@ -2734,7 +2734,7 @@ namespace CalamityMod.CalPlayer player.wingTimeMax = (int)(player.wingTimeMax * 1.05); } - if (player.ZoneJungle && CalamityMod.natureWeaponList.Contains(player.ActiveItem().type)) + if (player.ZoneJungle && CalamityLists.natureWeaponList.Contains(player.ActiveItem().type)) player.AddBuff(BuffID.DryadsWard, 5, true); // Dryad's Blessing if (modPlayer.ZoneAbyss) @@ -2754,7 +2754,7 @@ namespace CalamityMod.CalPlayer player.endurance += 0.05f; } - if (player.ZoneRockLayerHeight && ZoneForest && CalamityMod.flaskBombList.Contains(player.ActiveItem().type)) + if (player.ZoneRockLayerHeight && ZoneForest && CalamityLists.flaskBombList.Contains(player.ActiveItem().type)) player.blackBelt = true; if (player.ZoneHoly) diff --git a/CalamityLists.cs b/CalamityLists.cs new file mode 100644 index 0000000000..4a279729b8 --- /dev/null +++ b/CalamityLists.cs @@ -0,0 +1,2575 @@ +using CalamityMod.Buffs.Alcohol; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Items.Accessories; +using CalamityMod.Items.Accessories.Wings; +using CalamityMod.Items.Ammo.FiniteUse; +using CalamityMod.Items.Armor.Vanity; +using CalamityMod.Items.Fishing.AstralCatches; +using CalamityMod.Items.Fishing.BrimstoneCragCatches; +using CalamityMod.Items.Fishing.FishingRods; +using CalamityMod.Items.Fishing.SunkenSeaCatches; +using CalamityMod.Items.LoreItems; +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables; +using CalamityMod.Items.Placeables.Furniture.Trophies; +using CalamityMod.Items.Tools; +using CalamityMod.Items.TreasureBags; +using CalamityMod.Items.Weapons.DraedonsArsenal; +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.NPCs.Abyss; +using CalamityMod.NPCs.AquaticScourge; +using CalamityMod.NPCs.Astral; +using CalamityMod.NPCs.AstrumAureus; +using CalamityMod.NPCs.AstrumDeus; +using CalamityMod.NPCs.BrimstoneElemental; +using CalamityMod.NPCs.Bumblebirb; +using CalamityMod.NPCs.Calamitas; +using CalamityMod.NPCs.CeaselessVoid; +using CalamityMod.NPCs.Crabulon; +using CalamityMod.NPCs.Cryogen; +using CalamityMod.NPCs.DesertScourge; +using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.GreatSandShark; +using CalamityMod.NPCs.HiveMind; +using CalamityMod.NPCs.Leviathan; +using CalamityMod.NPCs.NormalNPCs; +using CalamityMod.NPCs.OldDuke; +using CalamityMod.NPCs.Perforator; +using CalamityMod.NPCs.PlaguebringerGoliath; +using CalamityMod.NPCs.Polterghast; +using CalamityMod.NPCs.ProfanedGuardians; +using CalamityMod.NPCs.Providence; +using CalamityMod.NPCs.Ravager; +using CalamityMod.NPCs.Signus; +using CalamityMod.NPCs.SlimeGod; +using CalamityMod.NPCs.StormWeaver; +using CalamityMod.NPCs.SulphurousSea; +using CalamityMod.NPCs.SunkenSea; +using CalamityMod.NPCs.SupremeCalamitas; +using CalamityMod.NPCs.Yharon; +using CalamityMod.Projectiles.Boss; +using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Projectiles.Enemy; +using CalamityMod.Projectiles.Hybrid; +using CalamityMod.Projectiles.Magic; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Melee.Spears; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Tiles.LivingFire; +using System.Collections.Generic; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod +{ + public class CalamityLists : Mod + { + public static IList donatorList; + public static List trueMeleeProjectileList; // DO NOT, EVER, DELETE THIS LIST, OR I WILL COME FOR YOU :D + public static List rangedProjectileExceptionList; + public static List projectileDestroyExceptionList; + public static List projectileMinionList; + public static List enemyImmunityList; + public static List dungeonEnemyBuffList; + public static List dungeonProjectileBuffList; + public static List bossScaleList; + public static List bossHPScaleList; + public static List beeEnemyList; + public static List beeProjectileList; + public static List friendlyBeeList; + public static List hardModeNerfList; + public static List debuffList; + public static List fireWeaponList; + public static List iceWeaponList; + public static List natureWeaponList; + public static List alcoholList; + public static List doubleDamageBuffList; //100% buff + public static List sixtySixDamageBuffList; //66% buff + public static List fiftyDamageBuffList; //50% buff + public static List thirtyThreeDamageBuffList; //33% buff + public static List twentyFiveDamageBuffList; //25% buff + public static List twentyDamageBuffList; //20% buff + public static List tenDamageBuffList; //10% buff + public static List weaponAutoreuseList; + public static List tenDamageNerfList; //10% nerf + public static List quarterDamageNerfList; //25% nerf + public static List pumpkinMoonBuffList; + public static List frostMoonBuffList; + public static List eclipseBuffList; + public static List eventProjectileBuffList; + public static List revengeanceEnemyBuffList25Percent; + public static List revengeanceEnemyBuffList20Percent; + public static List revengeanceEnemyBuffList15Percent; + public static List revengeanceEnemyBuffList10Percent; + public static List revengeanceEnemyBuffList5Percent; + public static List revengeanceProjectileBuffList25Percent; + public static List revengeanceProjectileBuffList20Percent; + public static List revengeanceProjectileBuffList15Percent; + public static List revengeanceProjectileBuffList10Percent; + public static List revengeanceProjectileBuffList5Percent; + public static List revengeanceLifeStealExceptionList; + public static List movementImpairImmuneList; + public static List needsDebuffIconDisplayList; + public static List trapProjectileList; + public static List scopedWeaponList; + public static List boomerangList; + public static List javelinList; + public static List daggerList; + public static List flaskBombList; + public static List spikyBallList; + public static List boomerangProjList; + public static List javelinProjList; + public static List daggerProjList; + public static List flaskBombProjList; + public static List spikyBallProjList; + public static List noGravityList; + public static List lavaFishList; + public static List highTestFishList; + public static List flamethrowerList; + public static List forceItemList; + public static List livingFireBlockList; + + public static List zombieList; + public static List demonEyeList; + public static List skeletonList; + public static List angryBonesList; + public static List hornetList; + public static List mossHornetList; + public static List bossMinionList; + + public static List legOverrideList; + + public static void LoadLists() + { + donatorList = new List() + { + "Vorbis", + "SoloMael", + "Chaotic Reks", + "The Buildmonger", + "Yuh", + "Littlepiggy", + "LompL", + "Lilith Saintclaire", + "Ben Shapiro", + "Frederik Henschel", + "Faye", + "Gibb50", + "Braden Hajer", + "Hannes Holmlund", + "profoundmango69", + "Jack M Sargent", + "Hans Volter", + "Krankwagon", + "MishiroUsui", + "pixlgray", + "Arkhine", + "Lodude", + "DevAesthetic", + "Mister Winchester", + "Zacky", + "Veine", + "Javyz", + "Shifter", + "Crysthamyr", + "Elfinlocks", + "Ein", + "2Larry2", + "Jenonen", + "Dodu", + "Arti", + "Tervastator", + "Luis Arguello", + "Alexander Davis", + "BakaQing", + "Laura Coonrod", + "Xaphlactus", + "MajinBagel", + "Bendy", + "Rando Calrissian", + "Tails the Fox 92", + "Bread", + "Minty Candy", + "Preston Card", + "MovingTarget_086", + "Shiro", + "Chip", + "Taylor Riverpaw", + "ShotgunAngel", + "Sandblast", + "ThomasThePencil", + "Aero (Aero#4599)", + "GlitchOut", + "Daawnz", + "CrabBar", + "Yatagarasu", + "Jarod Isaac Gordon", + "Zombieh", + "MingWhy", + "Random Weeb", + "Ahmed Fahad Zamel Al Sharif", + "Eragon3942", + "TheBlackHand", + "william", + "Samuel Foreman", + "Christopher Pham", + "DemoN K!ng", + "Malik Ciaramella", + "Ryan Baker-Ortiz", + "Aleksanders Denisovs", + "TheSilverGhost", + "Lucazii", + "Shay", + "Prism", + "BobIsNotMyRealName", + "Guwahavel", + "Azura", + "Joshua Miranda", + "Doveda", + "William Chang", + "Arche", + "DevilSunrise", + "Yanmei", + "Chaos", + "Ryan Tucker", + "Fish Repairs", + "Melvin Brouwers", + "Vroomy Has -3,000 IQ", + "The Goliath", + "DaPyRo", + "Termi", + "Circuit-Jay", + "Commmander Frostbite", + "cytokat", + "Cameron Fowlks", + "Orudeon", + "BumbleDoge", + "John Ballard", + "Naglfar", + "Helixas", + "Vetus Dea", + "High Charity", + "Devonte Plati", + "Cerberus", + "Brendan Kendall", + "Victor Pittman", + "KAT-G307", + "Tombarry Expresserino", + "Drip Veezy", + "Glaid", + "Apotheosis", + "Bladesaber", + "Devon Leigh", + "Ruthoranium", + "cocodezi_", + "Mendzey", + "GameRDheAsianSandwich", + "Tobias", + "Streakist .", + "Eisaya A Cook", + "Xenocrona", + "RKMoon" + }; + + trueMeleeProjectileList = new List() + { + // Vanilla shit + ProjectileID.Spear, + ProjectileID.Trident, + ProjectileID.TheRottedFork, + ProjectileID.Swordfish, + ProjectileID.Arkhalis, + ProjectileID.DarkLance, + ProjectileID.CobaltNaginata, + ProjectileID.PalladiumPike, + ProjectileID.MythrilHalberd, + ProjectileID.OrichalcumHalberd, + ProjectileID.AdamantiteGlaive, + ProjectileID.TitaniumTrident, + ProjectileID.MushroomSpear, + ProjectileID.Gungnir, + ProjectileID.ObsidianSwordfish, + ProjectileID.ChlorophytePartisan, + ProjectileID.MonkStaffT1, + ProjectileID.MonkStaffT2, + ProjectileID.MonkStaffT3, + ProjectileID.NorthPoleWeapon, + + // Tools + ProjectileID.CobaltDrill, + ProjectileID.MythrilDrill, + ProjectileID.AdamantiteDrill, + ProjectileID.PalladiumDrill, + ProjectileID.OrichalcumDrill, + ProjectileID.TitaniumDrill, + ProjectileID.ChlorophyteDrill, + ProjectileID.CobaltChainsaw, + ProjectileID.MythrilChainsaw, + ProjectileID.AdamantiteChainsaw, + ProjectileID.PalladiumChainsaw, + ProjectileID.OrichalcumChainsaw, + ProjectileID.TitaniumChainsaw, + ProjectileID.ChlorophyteChainsaw, + ProjectileID.VortexDrill, + ProjectileID.VortexChainsaw, + ProjectileID.NebulaDrill, + ProjectileID.NebulaChainsaw, + ProjectileID.SolarFlareDrill, + ProjectileID.SolarFlareChainsaw, + ProjectileID.StardustDrill, + ProjectileID.StardustChainsaw, + ProjectileID.Hamdrax, + ProjectileID.ChlorophyteJackhammer, + ProjectileID.SawtoothShark, + ProjectileID.ButchersChainsaw, + + // Calamity shit + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + + rangedProjectileExceptionList = new List() + { + ProjectileID.Phantasm, + ProjectileID.VortexBeater, + ProjectileID.DD2PhoenixBow, + ProjectileID.IchorDart, + ProjectileID.PhantasmArrow, + ProjectileID.RainbowBack, + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), // Because of potential dust lag. + ModContent.ProjectileType() + }; + + projectileDestroyExceptionList = new List() + { + //holdout projectiles + ProjectileID.Phantasm, + ProjectileID.VortexBeater, + ProjectileID.DD2PhoenixBow, + ProjectileID.LastPrism, + ProjectileID.LaserMachinegun, + ProjectileID.ChargedBlasterCannon, + ProjectileID.MedusaHead, + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + + //Some hostile boss projectiles + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + + projectileMinionList = new List() + { + ProjectileID.PygmySpear, + ProjectileID.UFOMinion, + ProjectileID.UFOLaser, + ProjectileID.StardustCellMinionShot, + ProjectileID.MiniSharkron, + ProjectileID.MiniRetinaLaser, + ProjectileID.ImpFireball, + ProjectileID.HornetStinger, + ProjectileID.DD2FlameBurstTowerT1Shot, + ProjectileID.DD2FlameBurstTowerT2Shot, + ProjectileID.DD2FlameBurstTowerT3Shot, + ProjectileID.DD2BallistraProj, + ProjectileID.DD2ExplosiveTrapT1Explosion, + ProjectileID.DD2ExplosiveTrapT2Explosion, + ProjectileID.DD2ExplosiveTrapT3Explosion, + ProjectileID.SpiderEgg, + ProjectileID.BabySpider, + ProjectileID.FrostBlastFriendly, + ProjectileID.MoonlordTurretLaser, + ProjectileID.RainbowCrystalExplosion + }; + + enemyImmunityList = new List() + { + NPCID.KingSlime, + NPCID.EaterofWorldsHead, + NPCID.EaterofWorldsBody, + NPCID.EaterofWorldsTail, + NPCID.BrainofCthulhu, + NPCID.Creeper, + NPCID.EyeofCthulhu, + NPCID.QueenBee, + NPCID.SkeletronHead, + NPCID.SkeletronHand, + NPCID.WallofFlesh, + NPCID.WallofFleshEye, + NPCID.Retinazer, + NPCID.Spazmatism, + NPCID.SkeletronPrime, + NPCID.PrimeCannon, + NPCID.PrimeSaw, + NPCID.PrimeLaser, + NPCID.PrimeVice, + NPCID.Plantera, + NPCID.IceQueen, + NPCID.Pumpking, + NPCID.Mothron, + NPCID.Golem, + NPCID.GolemHead, + NPCID.GolemHeadFree, + NPCID.GolemFistRight, + NPCID.GolemFistLeft, + NPCID.GolemHeadFree, + NPCID.DukeFishron, + NPCID.Sharkron, + NPCID.Sharkron2, + NPCID.CultistBoss, + NPCID.MoonLordHead, + NPCID.MoonLordHand, + NPCID.MoonLordCore, + NPCID.MoonLordFreeEye, + NPCID.DD2WyvernT1, + NPCID.DD2WyvernT2, + NPCID.DD2WyvernT3, + NPCID.DD2DarkMageT1, + NPCID.DD2DarkMageT3, + NPCID.DD2SkeletonT1, + NPCID.DD2SkeletonT3, + NPCID.DD2WitherBeastT2, + NPCID.DD2WitherBeastT3, + NPCID.DD2DrakinT2, + NPCID.DD2DrakinT3, + NPCID.DD2KoboldWalkerT2, + NPCID.DD2KoboldWalkerT3, + NPCID.DD2KoboldFlyerT2, + NPCID.DD2KoboldFlyerT3, + NPCID.DD2OgreT2, + NPCID.DD2OgreT3, + NPCID.DD2Betsy, + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType() //brothers + }; + + dungeonEnemyBuffList = new List() + { + NPCID.SkeletonSniper, + NPCID.TacticalSkeleton, + NPCID.SkeletonCommando, + NPCID.Paladin, + NPCID.GiantCursedSkull, + NPCID.BoneLee, + NPCID.DiabolistWhite, + NPCID.DiabolistRed, + NPCID.NecromancerArmored, + NPCID.Necromancer, + NPCID.RaggedCasterOpenCoat, + NPCID.RaggedCaster, + NPCID.HellArmoredBonesSword, + NPCID.HellArmoredBonesMace, + NPCID.HellArmoredBonesSpikeShield, + NPCID.HellArmoredBones, + NPCID.BlueArmoredBonesSword, + NPCID.BlueArmoredBonesNoPants, + NPCID.BlueArmoredBonesMace, + NPCID.BlueArmoredBones, + NPCID.RustyArmoredBonesSwordNoArmor, + NPCID.RustyArmoredBonesSword, + NPCID.RustyArmoredBonesFlail, + NPCID.RustyArmoredBonesAxe + }; + + dungeonProjectileBuffList = new List() + { + ProjectileID.PaladinsHammerHostile, + ProjectileID.ShadowBeamHostile, + ProjectileID.InfernoHostileBolt, + ProjectileID.InfernoHostileBlast, + ProjectileID.LostSoulHostile, + ProjectileID.SniperBullet, + ProjectileID.RocketSkeleton, + ProjectileID.BulletDeadeye, + ProjectileID.Shadowflames + }; + + bossScaleList = new List() + { + NPCID.EaterofWorldsHead, + NPCID.EaterofWorldsBody, + NPCID.EaterofWorldsTail, + NPCID.Creeper, + NPCID.SkeletronHand, + NPCID.WallofFleshEye, + NPCID.TheHungry, + NPCID.TheHungryII, + NPCID.TheDestroyerBody, + NPCID.TheDestroyerTail, + NPCID.PrimeCannon, + NPCID.PrimeVice, + NPCID.PrimeSaw, + NPCID.PrimeLaser, + NPCID.PlanterasTentacle, + NPCID.Pumpking, + NPCID.IceQueen, + NPCID.Mothron, + NPCID.GolemHead + }; + + bossHPScaleList = new List() + { + NPCID.EaterofWorldsHead, + NPCID.EaterofWorldsBody, + NPCID.EaterofWorldsTail, + NPCID.SkeletronHand, + NPCID.WallofFleshEye, + NPCID.TheDestroyerBody, + NPCID.TheDestroyerTail, + NPCID.PrimeCannon, + NPCID.PrimeLaser, + NPCID.PrimeVice, + NPCID.PrimeSaw, + NPCID.GolemHead, + NPCID.GolemHeadFree, + NPCID.GolemFistRight, + NPCID.GolemFistLeft, + NPCID.MoonLordHead, + NPCID.MoonLordHand + }; + + beeEnemyList = new List() + { + NPCID.GiantMossHornet, + NPCID.BigMossHornet, + NPCID.LittleMossHornet, + NPCID.TinyMossHornet, + NPCID.MossHornet, + NPCID.VortexHornetQueen, + NPCID.VortexHornet, + NPCID.Bee, + NPCID.BeeSmall, + NPCID.QueenBee, + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType() + }; + + beeProjectileList = new List() + { + ProjectileID.Stinger, + ProjectileID.HornetStinger, + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + + friendlyBeeList = new List() + { + ProjectileID.GiantBee, + ProjectileID.Bee, + ProjectileID.Wasp, + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + + hardModeNerfList = new List() + { + ProjectileID.WebSpit, + ProjectileID.PinkLaser, + ProjectileID.FrostBlastHostile, + ProjectileID.RuneBlast, + ProjectileID.GoldenShowerHostile, + ProjectileID.RainNimbus, + ProjectileID.Stinger, + ProjectileID.FlamingArrow, + ProjectileID.BulletDeadeye, + ProjectileID.CannonballHostile + }; + + debuffList = new 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, + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }; + + fireWeaponList = new List() + { + ItemID.FieryGreatsword, + ItemID.DD2SquireDemonSword, + ItemID.TheHorsemansBlade, + ItemID.Cascade, + ItemID.HelFire, + ItemID.Flamarang, + ItemID.MoltenFury, + ItemID.Sunfury, + ItemID.PhoenixBlaster, + ItemID.Flamelash, + ItemID.SolarEruption, + ItemID.DayBreak, + ItemID.HellwingBow, + ItemID.DD2PhoenixBow, + ItemID.DD2BetsyBow, + ItemID.FlareGun, + ItemID.Flamethrower, + ItemID.EldMelter, + ItemID.FlowerofFire, + ItemID.MeteorStaff, + ItemID.ApprenticeStaffT3, + ItemID.InfernoFork, + ItemID.HeatRay, + ItemID.BookofSkulls, + ItemID.ImpStaff, + ItemID.DD2FlameburstTowerT1Popper, + ItemID.DD2FlameburstTowerT2Popper, + ItemID.DD2FlameburstTowerT3Popper, + ItemID.MolotovCocktail, + ItemID.WandofSparking, + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() + }; + + iceWeaponList = new List() + { + ItemID.IceBlade, + ItemID.IceSickle, + ItemID.Frostbrand, + ItemID.Amarok, + ItemID.NorthPole, + ItemID.IceBoomerang, + ItemID.IceBow, + ItemID.SnowmanCannon, + ItemID.SnowballCannon, + ItemID.IceRod, + ItemID.FlowerofFrost, + ItemID.FrostStaff, + ItemID.BlizzardStaff, + ItemID.StaffoftheFrostHydra, + ItemID.Snowball, + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + //Cryonic Bar set stuff, could potentially be removed + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() + }; + + natureWeaponList = new List() + { + ItemID.BladeofGrass, + ItemID.ChlorophyteClaymore, + ItemID.ChlorophyteSaber, + ItemID.ChlorophytePartisan, + ItemID.ChlorophyteShotbow, + ItemID.Seedler, + ItemID.ChristmasTreeSword, + ItemID.TerraBlade, + ItemID.JungleYoyo, + ItemID.Yelets, + ItemID.MushroomSpear, + ItemID.ThornChakram, + ItemID.Bananarang, + ItemID.FlowerPow, + ItemID.BeesKnees, + ItemID.Toxikarp, + ItemID.Bladetongue, + ItemID.PoisonStaff, + ItemID.VenomStaff, + ItemID.StaffofEarth, + ItemID.BeeGun, + ItemID.LeafBlower, + ItemID.WaspGun, + ItemID.CrystalSerpent, + ItemID.Razorpine, + ItemID.HornetStaff, + ItemID.QueenSpiderStaff, + ItemID.SlimeStaff, + ItemID.PygmyStaff, + ItemID.RavenStaff, + ItemID.BatScepter, + ItemID.SpiderStaff, + ItemID.Beenade, + ItemID.FrostDaggerfish, + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() + }; + + alcoholList = new List() + { + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType(), + ModContent.BuffType() + }; + + doubleDamageBuffList = new List() + { + ItemID.BallOHurt, + ItemID.TheMeatball, + ItemID.BlueMoon, + ItemID.Sunfury, + ItemID.DaoofPow, + ItemID.FlowerPow, + ItemID.Anchor, + ItemID.KOCannon, + ItemID.GolemFist, + ItemID.BreakerBlade, + ItemID.MonkStaffT2, + ItemID.ProximityMineLauncher, + ItemID.FireworksLauncher, + ItemID.ShadowbeamStaff + }; + + sixtySixDamageBuffList = new List() + { + ItemID.TrueNightsEdge, + ItemID.MedusaHead, + ItemID.StaffofEarth, + ItemID.ChristmasTreeSword, + ItemID.MonkStaffT1, + ItemID.InfernoFork, + ItemID.VenomStaff, + ItemID.Frostbrand + }; + + fiftyDamageBuffList = new List() + { + ItemID.NightsEdge, + ItemID.EldMelter, + ItemID.Flamethrower, + ItemID.MoonlordTurretStaff, + ItemID.WaspGun, + ItemID.Keybrand, + ItemID.PulseBow, + ItemID.PaladinsHammer, + ItemID.SolarEruption, + ItemID.DayBreak + }; + + thirtyThreeDamageBuffList = new List() + { + ItemID.WandofSparking, + ItemID.IceBow, + ItemID.Marrow, + ItemID.CrystalVileShard, + ItemID.SoulDrain, + ItemID.ClingerStaff, + ItemID.ChargedBlasterCannon, + ItemID.NettleBurst, + ItemID.Excalibur, + ItemID.AmberStaff, + ItemID.BluePhasesaber, + ItemID.RedPhasesaber, + ItemID.GreenPhasesaber, + ItemID.WhitePhasesaber, + ItemID.YellowPhasesaber, + ItemID.PurplePhasesaber, + ItemID.TheRottedFork, + ItemID.VampireKnives, + ItemID.Cascade, + ItemID.TrueExcalibur + }; + + twentyFiveDamageBuffList = new List() + { + ItemID.Muramasa, + ItemID.StakeLauncher, + ItemID.BookStaff + }; + + twentyDamageBuffList = new List() + { + ItemID.ChainGuillotines, + ItemID.FlowerofFrost, + ItemID.PoisonStaff, + ItemID.Gungnir, + ItemID.TacticalShotgun + }; + + tenDamageBuffList = new List() + { + ItemID.MagnetSphere, + ItemID.BatScepter + }; + + weaponAutoreuseList = new List() + { + ItemID.NightsEdge, + ItemID.TrueNightsEdge, + ItemID.TrueExcalibur, + ItemID.PhoenixBlaster, + ItemID.VenusMagnum, + ItemID.MagicDagger, + ItemID.BeamSword, + ItemID.MonkStaffT2, + ItemID.PaladinsHammer, + ItemID.PearlwoodSword, + ItemID.PearlwoodBow, + ItemID.TaxCollectorsStickOfDoom, + ItemID.StylistKilLaKillScissorsIWish + }; + + tenDamageNerfList = new List() + { + ItemID.Phantasm + }; + + quarterDamageNerfList = new List() + { + ItemID.Razorpine, + ItemID.DaedalusStormbow, + ItemID.PhoenixBlaster, + ItemID.DD2BetsyBow, + ItemID.InfluxWaver, + ItemID.Xenopopper, + ItemID.ElectrosphereLauncher, + ItemID.OpticStaff //Note: got local i frames so it should be better + }; + + pumpkinMoonBuffList = new List() + { + NPCID.Scarecrow1, + NPCID.Scarecrow2, + NPCID.Scarecrow3, + NPCID.Scarecrow4, + NPCID.Scarecrow5, + NPCID.Scarecrow6, + NPCID.Scarecrow7, + NPCID.Scarecrow8, + NPCID.Scarecrow9, + NPCID.Scarecrow10, + NPCID.HeadlessHorseman, + NPCID.MourningWood, + NPCID.Splinterling, + NPCID.Pumpking, + NPCID.PumpkingBlade, + NPCID.Hellhound, + NPCID.Poltergeist + }; + + frostMoonBuffList = new List() + { + NPCID.ZombieElf, + NPCID.ZombieElfBeard, + NPCID.ZombieElfGirl, + NPCID.PresentMimic, + NPCID.GingerbreadMan, + NPCID.Yeti, + NPCID.Everscream, + NPCID.IceQueen, + NPCID.SantaNK1, + NPCID.ElfCopter, + NPCID.Nutcracker, + NPCID.NutcrackerSpinning, + NPCID.ElfArcher, + NPCID.Krampus, + NPCID.Flocko + }; + + eclipseBuffList = new List() + { + NPCID.Eyezor, + NPCID.Reaper, + NPCID.Frankenstein, + NPCID.SwampThing, + NPCID.Vampire, + NPCID.VampireBat, + NPCID.Butcher, + NPCID.CreatureFromTheDeep, + NPCID.Fritz, + NPCID.Nailhead, + NPCID.Psycho, + NPCID.DeadlySphere, + NPCID.DrManFly, + NPCID.ThePossessed, + NPCID.Mothron, + NPCID.MothronEgg, + NPCID.MothronSpawn + }; + + eventProjectileBuffList = new List() + { + 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 + }; + + // Enemies that inflict an average of 1 to 50 damage in Expert Mode + revengeanceEnemyBuffList25Percent = new List() + { + NPCID.ServantofCthulhu, + NPCID.EyeofCthulhu, + NPCID.EaterofWorldsHead, + NPCID.EaterofWorldsBody, + NPCID.EaterofWorldsTail, + NPCID.Creeper, + NPCID.Bee, + NPCID.BeeSmall, + NPCID.SkeletronHand, + NPCID.GiantWormHead, + NPCID.BlazingWheel, + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType() + }; + + // Enemies that inflict an average of 51 to 100 damage in Expert Mode + revengeanceEnemyBuffList20Percent = new List() + { + NPCID.KingSlime, + NPCID.BrainofCthulhu, + NPCID.QueenBee, + NPCID.SkeletronHead, + NPCID.TheHungryII, + NPCID.LeechHead, + NPCID.TheDestroyerBody, + NPCID.TheDestroyerTail, + NPCID.Probe, + NPCID.PrimeSaw, + NPCID.PrimeVice, + NPCID.PrimeLaser, + NPCID.PrimeCannon, + NPCID.DevourerHead, + NPCID.MeteorHead, + NPCID.BoneSerpentHead, + NPCID.ManEater, + NPCID.Snatcher, + NPCID.Piranha, + NPCID.Shark, + NPCID.SpikeBall, + NPCID.DiggerHead, + NPCID.WallCreeper, + NPCID.WallCreeperWall, + NPCID.Lihzahrd, + NPCID.Pumpking, + NPCID.SlimeSpiked, + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType() + }; + + // Enemies that inflict an average of 101 to 200 damage in Expert Mode + revengeanceEnemyBuffList15Percent = new List() + { + NPCID.WallofFlesh, + NPCID.Spazmatism, + NPCID.Retinazer, + NPCID.SkeletronPrime, + NPCID.Plantera, + NPCID.PlanterasTentacle, + NPCID.Spore, + NPCID.DetonatingBubble, + NPCID.Golem, + NPCID.GolemHead, + NPCID.GolemHeadFree, + NPCID.GolemFistLeft, + NPCID.GolemFistRight, + NPCID.DukeFishron, + NPCID.Sharkron, + NPCID.Sharkron2, + NPCID.CultistDragonHead, + NPCID.AncientCultistSquidhead, + NPCID.AncientLight, + NPCID.DD2Betsy, + NPCID.Mimic, + NPCID.WyvernHead, + NPCID.SeekerHead, + NPCID.AnglerFish, + NPCID.Werewolf, + NPCID.Wraith, + NPCID.Arapaima, + NPCID.BlackRecluse, + NPCID.BlackRecluseWall, + NPCID.AngryTrapper, + NPCID.LihzahrdCrawler, + NPCID.PirateCaptain, + NPCID.FlyingSnake, + NPCID.Reaper, + NPCID.Paladin, + NPCID.BoneLee, + NPCID.MourningWood, + NPCID.PumpkingBlade, + NPCID.PresentMimic, + NPCID.Everscream, + NPCID.IceQueen, + NPCID.SantaNK1, + NPCID.StardustWormHead, + NPCID.Butcher, + NPCID.Psycho, + NPCID.DeadlySphere, + NPCID.BigMimicCorruption, + NPCID.BigMimicCrimson, + NPCID.BigMimicHallow, + NPCID.Mothron, + NPCID.DuneSplicerHead, + NPCID.SandShark, + NPCID.SandsharkCorrupt, + NPCID.SandsharkCrimson, + NPCID.SandsharkHallow, + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType() + }; + + // Enemies that inflict an average of 201 to 400 damage in Expert Mode + revengeanceEnemyBuffList10Percent = new List() + { + NPCID.TheDestroyer, + NPCID.SolarCrawltipedeHead, + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType() + }; + + // Enemies that inflict an average of 401+ damage in Expert Mode + revengeanceEnemyBuffList5Percent = new List() + { + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType() + }; + + revengeanceProjectileBuffList25Percent = new List() + { + ProjectileID.SandBallFalling, + ProjectileID.AshBallFalling, + ProjectileID.EbonsandBallFalling, + ProjectileID.PearlSandBallFalling, + ProjectileID.CrimsandBallFalling, + ProjectileID.GeyserTrap, + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + + revengeanceProjectileBuffList20Percent = new List() + { + ProjectileID.PoisonDartTrap, + ProjectileID.DemonSickle, + ProjectileID.SandnadoHostile, + ProjectileID.DD2BetsyFireball, + ProjectileID.DD2BetsyFlameBreath, + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + + revengeanceProjectileBuffList15Percent = new List() + { + ProjectileID.SpikyBallTrap, + ProjectileID.SpearTrap, + ProjectileID.FlamethrowerTrap, + ProjectileID.FlamesTrap, + ProjectileID.Fireball, + ProjectileID.PaladinsHammerHostile, + ProjectileID.FlamingWood, + ProjectileID.FlamingScythe, + ProjectileID.FrostWave, + ProjectileID.Present, + ProjectileID.Spike, + ProjectileID.SaucerDeathray, + ProjectileID.NebulaBolt, + ProjectileID.NebulaSphere, + ProjectileID.NebulaLaser, + ProjectileID.StardustSoldierLaser, + ProjectileID.VortexLaser, + ProjectileID.VortexVortexLightning, + ProjectileID.VortexLightning, + ProjectileID.VortexAcid, + ProjectileID.Sharknado, + ProjectileID.Cthulunado, + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + + revengeanceProjectileBuffList10Percent = new List() + { + ProjectileID.Boulder, + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + + revengeanceProjectileBuffList5Percent = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + + revengeanceLifeStealExceptionList = new List() + { + NPCID.Probe, + NPCID.CultistDragonHead, + NPCID.CultistDragonBody1, + NPCID.CultistDragonBody2, + NPCID.CultistDragonBody3, + NPCID.CultistDragonBody4, + NPCID.CultistDragonTail, + NPCID.AncientCultistSquidhead, + NPCID.AncientLight, + NPCID.Sharkron, + NPCID.Sharkron2, + NPCID.PlanterasTentacle, + NPCID.Spore, + NPCID.TheHungryII, + NPCID.LeechHead, + NPCID.LeechBody, + NPCID.LeechTail, + NPCID.TheDestroyerBody, + NPCID.TheDestroyerTail, + NPCID.EaterofWorldsBody, + NPCID.EaterofWorldsTail, + NPCID.GolemHead, + NPCID.GolemHeadFree, + NPCID.GolemFistRight, + NPCID.GolemFistLeft, + NPCID.MoonLordCore + }; + + movementImpairImmuneList = new List() + { + NPCID.QueenBee, + }; + + needsDebuffIconDisplayList = new List() + { + NPCID.WallofFleshEye + }; + + trapProjectileList = new List() + { + ProjectileID.PoisonDartTrap, + ProjectileID.SpikyBallTrap, + ProjectileID.SpearTrap, + ProjectileID.FlamethrowerTrap, + ProjectileID.FlamesTrap, + ProjectileID.PoisonDart, + ProjectileID.GeyserTrap + }; + + scopedWeaponList = new List() + { + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() + }; + + boomerangList = new List() + { + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() + }; + + boomerangProjList = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + + javelinList = new List() + { + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() + }; + + javelinProjList = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + + daggerList = new List() + { + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() + }; + + daggerProjList = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + + flaskBombList = new List() + { + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() + }; + + flaskBombProjList = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + + spikyBallList = new List() + { + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() + }; + + spikyBallProjList = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + + noGravityList = new List() + { + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + }; + + lavaFishList = new List() + { + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() + }; + + highTestFishList = new List() + { + ItemID.GoldenFishingRod, + ModContent.ItemType(), + ModContent.ItemType() + }; + + flamethrowerList = new List() + { + ModContent.ItemType(), + ModContent.ItemType() + }; + + forceItemList = new List() + { + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ItemID.HotlineFishingHook, + ItemID.BottomlessBucket, + ItemID.SuperAbsorbantSponge, + ItemID.FishingPotion, + ItemID.SonarPotion, + ItemID.CratePotion, + ItemID.AnglerTackleBag, + ItemID.HighTestFishingLine, + ItemID.TackleBox, + ItemID.AnglerEarring, + ItemID.FishermansGuide, + ItemID.WeatherRadio, + ItemID.Sextant, + ItemID.AnglerHat, + ItemID.AnglerVest, + ItemID.AnglerPants, + ItemID.GoldenBugNet, + ItemID.FishronWings, + ItemID.Flairon, + ItemID.Tsunami, + ItemID.BubbleGun, + ItemID.RazorbladeTyphoon, + ItemID.TempestStaff, + ItemID.FishronBossBag, + ItemID.Coral, + ItemID.Seashell, + ItemID.Starfish, + ItemID.SoulofSight, + ItemID.GreaterHealingPotion, + ItemID.SuperHealingPotion + }; + + livingFireBlockList = new List() + { + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + TileID.LivingFire, + TileID.LivingCursedFire, + TileID.LivingDemonFire, + TileID.LivingFrostFire, + TileID.LivingIchor, + TileID.LivingUltrabrightFire + }; + + zombieList = new List() + { + NPCID.Zombie, + NPCID.ArmedZombie, + NPCID.BaldZombie, + NPCID.PincushionZombie, + NPCID.ArmedZombiePincussion, // what is this spelling + NPCID.SlimedZombie, + NPCID.ArmedZombieSlimed, + NPCID.SwampZombie, + NPCID.ArmedZombieSwamp, + NPCID.TwiggyZombie, + NPCID.ArmedZombieTwiggy, + NPCID.FemaleZombie, + NPCID.ArmedZombieCenx, + NPCID.ZombieRaincoat, + NPCID.ZombieEskimo, + NPCID.ArmedZombieEskimo, + NPCID.BigRainZombie, + NPCID.SmallRainZombie, + NPCID.BigFemaleZombie, + NPCID.SmallFemaleZombie, + NPCID.BigTwiggyZombie, + NPCID.SmallTwiggyZombie, + NPCID.BigSwampZombie, + NPCID.SmallSwampZombie, + NPCID.BigSlimedZombie, + NPCID.SmallSlimedZombie, + NPCID.BigPincushionZombie, + NPCID.SmallPincushionZombie, + NPCID.BigBaldZombie, + NPCID.SmallBaldZombie, + NPCID.BigZombie, + NPCID.SmallZombie + // halloween zombies not included because they don't drop shackles or zombie arms + }; + + demonEyeList = new List() + { + NPCID.DemonEye, + NPCID.CataractEye, + NPCID.SleepyEye, + NPCID.DialatedEye, // it is spelled "dilated" + NPCID.GreenEye, + NPCID.PurpleEye, + NPCID.DemonEyeOwl, + NPCID.DemonEyeSpaceship, + NPCID.DemonEye2, + NPCID.PurpleEye2, + NPCID.GreenEye2, + NPCID.DialatedEye2, + NPCID.SleepyEye2, + NPCID.CataractEye2 + }; + + skeletonList = new List() + { + NPCID.Skeleton, + NPCID.HeadacheSkeleton, + NPCID.MisassembledSkeleton, + NPCID.PantlessSkeleton, + NPCID.BoneThrowingSkeleton, + NPCID.BoneThrowingSkeleton2, + NPCID.BoneThrowingSkeleton3, + NPCID.BoneThrowingSkeleton4, + NPCID.BigPantlessSkeleton, + NPCID.SmallPantlessSkeleton, + NPCID.BigMisassembledSkeleton, + NPCID.SmallMisassembledSkeleton, + NPCID.BigHeadacheSkeleton, + NPCID.SmallHeadacheSkeleton, + NPCID.BigSkeleton, + NPCID.SmallSkeleton, + + //Note: These skeletons don't count for Skeleton Banner for some god forsaken reason + NPCID.SkeletonTopHat, + NPCID.SkeletonAstonaut, + NPCID.SkeletonAlien, + + //Other skeleton types + NPCID.ArmoredSkeleton, + NPCID.HeavySkeleton, + NPCID.SkeletonArcher, + NPCID.GreekSkeleton + }; + + angryBonesList = new List() + { + NPCID.AngryBones, + NPCID.AngryBonesBig, + NPCID.AngryBonesBigMuscle, + NPCID.AngryBonesBigHelmet, + NPCID.BigBoned, + NPCID.ShortBones + }; + + hornetList = new List() + { + NPCID.BigHornetStingy, + NPCID.LittleHornetStingy, + NPCID.BigHornetSpikey, + NPCID.LittleHornetSpikey, + NPCID.BigHornetLeafy, + NPCID.LittleHornetLeafy, + NPCID.BigHornetHoney, + NPCID.LittleHornetHoney, + NPCID.BigHornetFatty, + NPCID.LittleHornetFatty, + NPCID.BigStinger, + NPCID.LittleStinger, + NPCID.Hornet, + NPCID.HornetFatty, + NPCID.HornetHoney, + NPCID.HornetLeafy, + NPCID.HornetSpikey, + NPCID.HornetStingy + }; + + mossHornetList = new List() + { + NPCID.MossHornet, + NPCID.TinyMossHornet, + NPCID.LittleMossHornet, + NPCID.BigMossHornet, + NPCID.GiantMossHornet + }; + + bossMinionList = new List() + { + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + NPCID.SlimeSpiked, + NPCID.ServantofCthulhu, + ModContent.NPCType(), + NPCID.EaterofWorldsHead, + NPCID.EaterofWorldsBody, + NPCID.EaterofWorldsTail, + NPCID.Creeper, + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + NPCID.SkeletronHand, + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + NPCID.LeechHead, + NPCID.LeechBody, + NPCID.LeechTail, + NPCID.WallofFleshEye, + NPCID.TheHungry, + NPCID.TheHungryII, + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + NPCID.PrimeCannon, + NPCID.PrimeLaser, + NPCID.PrimeSaw, + NPCID.PrimeVice, + ModContent.NPCType(), + NPCID.TheDestroyer, + NPCID.TheDestroyerBody, + NPCID.TheDestroyerTail, + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + NPCID.PlanterasTentacle, + ModContent.NPCType(), + NPCID.Spore, + NPCID.GolemHead, + NPCID.GolemHeadFree, + NPCID.GolemFistLeft, + NPCID.GolemFistRight, + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + NPCID.CultistDragonHead, + NPCID.CultistDragonBody1, + NPCID.CultistDragonBody2, + NPCID.CultistDragonBody3, + NPCID.CultistDragonBody4, + NPCID.CultistDragonTail, + NPCID.AncientCultistSquidhead, + NPCID.MoonLordFreeEye, + NPCID.MoonLordHand, + NPCID.MoonLordHead, + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType() + }; + + Mod thorium = ModLoader.GetMod("ThoriumMod"); + if (CalamityConfig.Instance.BuffThoriumBosses && thorium != null) + { + enemyImmunityList.Add(thorium.NPCType("TheGrandThunderBirdv2")); + enemyImmunityList.Add(thorium.NPCType("QueenJelly")); + enemyImmunityList.Add(thorium.NPCType("Viscount")); + enemyImmunityList.Add(thorium.NPCType("GraniteEnergyStorm")); + enemyImmunityList.Add(thorium.NPCType("TheBuriedWarrior")); + enemyImmunityList.Add(thorium.NPCType("ThePrimeScouter")); + enemyImmunityList.Add(thorium.NPCType("BoreanStrider")); + enemyImmunityList.Add(thorium.NPCType("BoreanStriderPopped")); + enemyImmunityList.Add(thorium.NPCType("FallenDeathBeholder")); + enemyImmunityList.Add(thorium.NPCType("FallenDeathBeholder2")); + enemyImmunityList.Add(thorium.NPCType("Lich")); + enemyImmunityList.Add(thorium.NPCType("LichHeadless")); + enemyImmunityList.Add(thorium.NPCType("Abyssion")); + enemyImmunityList.Add(thorium.NPCType("AbyssionCracked")); + enemyImmunityList.Add(thorium.NPCType("AbyssionReleased")); + enemyImmunityList.Add(thorium.NPCType("SlagFury")); + enemyImmunityList.Add(thorium.NPCType("Omnicide")); + enemyImmunityList.Add(thorium.NPCType("RealityBreaker")); + enemyImmunityList.Add(thorium.NPCType("Aquaius")); + enemyImmunityList.Add(thorium.NPCType("Aquaius2")); + + revengeanceEnemyBuffList25Percent.Add(thorium.NPCType("TheGrandThunderBirdv2")); + revengeanceEnemyBuffList25Percent.Add(thorium.NPCType("QueenJelly")); + revengeanceEnemyBuffList20Percent.Add(thorium.NPCType("Viscount")); + revengeanceEnemyBuffList20Percent.Add(thorium.NPCType("GraniteEnergyStorm")); + revengeanceEnemyBuffList20Percent.Add(thorium.NPCType("TheBuriedWarrior")); + revengeanceEnemyBuffList20Percent.Add(thorium.NPCType("ThePrimeScouter")); + revengeanceEnemyBuffList20Percent.Add(thorium.NPCType("BoreanStrider")); + revengeanceEnemyBuffList20Percent.Add(thorium.NPCType("BoreanStriderPopped")); + revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("FallenDeathBeholder")); + revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("FallenDeathBeholder2")); + revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("Lich")); + revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("LichHeadless")); + revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("Abyssion")); + revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("AbyssionCracked")); + revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("AbyssionReleased")); + revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("SlagFury")); + revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("Omnicide")); + revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("RealityBreaker")); + revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("Aquaius")); + revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("Aquaius2")); + + revengeanceProjectileBuffList25Percent.Add(thorium.ProjectileType("GrandThunderBirdZap")); + revengeanceProjectileBuffList25Percent.Add(thorium.ProjectileType("ThunderGust")); + revengeanceProjectileBuffList25Percent.Add(thorium.ProjectileType("BubbleBomb")); + revengeanceProjectileBuffList25Percent.Add(thorium.ProjectileType("QueenJellyArm")); + revengeanceProjectileBuffList25Percent.Add(thorium.ProjectileType("QueenTorrent")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("ViscountRipple")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("ViscountRipple2")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("ViscountBlood")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("ViscountStomp")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("ViscountStomp2")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("ViscountRockFall")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("GraniteCharge")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedShock")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedDagger")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedArrow")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedArrow2")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedArrowF")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedArrowP")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedArrowC")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedMagic")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedMagicPop")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("MainBeamOuter")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("MainBeam")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("MainBeamCheese")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("VaporizeBlast")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("GravitonSurge")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("Vaporize")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("GravitonCharge")); + revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("GravitySpark")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("DoomBeholderBeam")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("VoidLaserPro")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("BeholderBeam")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("BlizzardBarrage")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("FrostSurge")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("FrostSurgeR")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("BlizzardCascade")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("BlizzardBoom")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("BlizzardFang")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("FrostMytePro")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("IceAnomaly")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichGaze")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichGazeB")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichFlareSpawn")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichFlare")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichPulse")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichMatter")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("SoulRenderLich")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichFlareDeathD")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichFlareDeathU")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("Whirlpool")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("AbyssionSpit")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("AbyssionSpit2")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("AquaRipple")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("AbyssalStrike2")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("OldGodSpit")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("OldGodSpit2")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("WaterPulse")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("TyphoonBlastHostile")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("TyphoonBlastHostileSmaller")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("AquaBarrage")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("DeathRaySpawnR")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("DeathRaySpawnL")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("DeathRaySpawn")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("OmniDeath")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("OmniSphereOrb")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("FlameLash")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("FlamePulse")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("FlamePulseTorn")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("FlameNova")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("MoltenFury")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("RealityFury")); + revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("UFOBlast")); + } + + legOverrideList = new List() + { + CalamityMod.Instance.GetEquipSlot("ProviLegs", EquipType.Legs), + CalamityMod.Instance.GetEquipSlot("SirenLegAlt", EquipType.Legs), + CalamityMod.Instance.GetEquipSlot("SirenLeg", EquipType.Legs), + CalamityMod.Instance.GetEquipSlot("PopoLeg", EquipType.Legs) + }; + } + + public static void UnloadLists() + { + donatorList = null; + trueMeleeProjectileList = null; + rangedProjectileExceptionList = null; + projectileDestroyExceptionList = null; + projectileMinionList = null; + enemyImmunityList = null; + dungeonEnemyBuffList = null; + dungeonProjectileBuffList = null; + bossScaleList = null; + bossHPScaleList = null; + beeEnemyList = null; + friendlyBeeList = null; + beeProjectileList = null; + hardModeNerfList = null; + debuffList = null; + fireWeaponList = null; + iceWeaponList = null; + natureWeaponList = null; + alcoholList = null; + doubleDamageBuffList = null; + sixtySixDamageBuffList = null; + fiftyDamageBuffList = null; + thirtyThreeDamageBuffList = null; + twentyFiveDamageBuffList = null; + tenDamageBuffList = null; + weaponAutoreuseList = null; + tenDamageNerfList = null; + quarterDamageNerfList = null; + pumpkinMoonBuffList = null; + frostMoonBuffList = null; + eclipseBuffList = null; + eventProjectileBuffList = null; + revengeanceEnemyBuffList25Percent = null; + revengeanceEnemyBuffList20Percent = null; + revengeanceEnemyBuffList15Percent = null; + revengeanceEnemyBuffList10Percent = null; + revengeanceEnemyBuffList5Percent = null; + revengeanceProjectileBuffList25Percent = null; + revengeanceProjectileBuffList20Percent = null; + revengeanceProjectileBuffList15Percent = null; + revengeanceProjectileBuffList10Percent = null; + revengeanceProjectileBuffList5Percent = null; + revengeanceLifeStealExceptionList = null; + movementImpairImmuneList = null; + needsDebuffIconDisplayList = null; + trapProjectileList = null; + scopedWeaponList = null; + boomerangList = null; + javelinList = null; + daggerList = null; + flaskBombList = null; + spikyBallList = null; + boomerangProjList = null; + javelinProjList = null; + daggerProjList = null; + flaskBombProjList = null; + spikyBallProjList = null; + noGravityList = null; + lavaFishList = null; + highTestFishList = null; + flamethrowerList = null; + forceItemList = null; + livingFireBlockList = null; + + zombieList = null; + demonEyeList = null; + skeletonList = null; + angryBonesList = null; + hornetList = null; + mossHornetList = null; + bossMinionList = null; + + legOverrideList = null; + + } + } +} diff --git a/CalamityMod.cs b/CalamityMod.cs index eccfb82d7d..6299885ab4 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -141,82 +141,6 @@ namespace CalamityMod public const float velocityScaleMin = 0.5f; public const float bitingEnemeyVelocityScale = 0.8f; - // Lists - public static IList donatorList; - public static List trueMeleeProjectileList; // DO NOT, EVER, DELETE THIS LIST, OR I WILL COME FOR YOU :D - public static List rangedProjectileExceptionList; - public static List projectileDestroyExceptionList; - public static List projectileMinionList; - public static List enemyImmunityList; - public static List dungeonEnemyBuffList; - public static List dungeonProjectileBuffList; - public static List bossScaleList; - public static List bossHPScaleList; - public static List beeEnemyList; - public static List beeProjectileList; - public static List friendlyBeeList; - public static List hardModeNerfList; - public static List debuffList; - public static List fireWeaponList; - public static List iceWeaponList; - public static List natureWeaponList; - public static List alcoholList; - public static List doubleDamageBuffList; //100% buff - public static List sixtySixDamageBuffList; //66% buff - public static List fiftyDamageBuffList; //50% buff - public static List thirtyThreeDamageBuffList; //33% buff - public static List twentyFiveDamageBuffList; //25% buff - public static List twentyDamageBuffList; //20% buff - public static List tenDamageBuffList; //10% buff - public static List weaponAutoreuseList; - public static List tenDamageNerfList; //10% nerf - public static List quarterDamageNerfList; //25% nerf - public static List pumpkinMoonBuffList; - public static List frostMoonBuffList; - public static List eclipseBuffList; - public static List eventProjectileBuffList; - public static List revengeanceEnemyBuffList25Percent; - public static List revengeanceEnemyBuffList20Percent; - public static List revengeanceEnemyBuffList15Percent; - public static List revengeanceEnemyBuffList10Percent; - public static List revengeanceEnemyBuffList5Percent; - public static List revengeanceProjectileBuffList25Percent; - public static List revengeanceProjectileBuffList20Percent; - public static List revengeanceProjectileBuffList15Percent; - public static List revengeanceProjectileBuffList10Percent; - public static List revengeanceProjectileBuffList5Percent; - public static List revengeanceLifeStealExceptionList; - public static List movementImpairImmuneList; - public static List needsDebuffIconDisplayList; - public static List trapProjectileList; - public static List scopedWeaponList; - public static List boomerangList; - public static List javelinList; - public static List daggerList; - public static List flaskBombList; - public static List spikyBallList; - public static List boomerangProjList; - public static List javelinProjList; - public static List daggerProjList; - public static List flaskBombProjList; - public static List spikyBallProjList; - public static List noGravityList; - public static List lavaFishList; - public static List highTestFishList; - public static List flamethrowerList; - public static List forceItemList; - public static List livingFireBlockList; - - public static List zombieList; - public static List demonEyeList; - public static List skeletonList; - public static List angryBonesList; - public static List hornetList; - public static List mossHornetList; - public static List bossMinionList; - - public static List legOverrideList; - // TODO -- Calamity should check for other mods existing in exactly one place internal Mod thorium = null; public bool fargosMutant = false; @@ -256,7 +180,7 @@ namespace CalamityMod BossHealthBarManager.Load(this); - SetupLists(); + CalamityLists.LoadLists(); SetupVanillaDR(); SetupBossKillTimes(); SetupBossVelocityScalingValues(); @@ -382,79 +306,7 @@ namespace CalamityMod bossVelocityDamageScaleValues?.Clear(); bossVelocityDamageScaleValues = null; - donatorList = null; - trueMeleeProjectileList = null; - rangedProjectileExceptionList = null; - projectileDestroyExceptionList = null; - projectileMinionList = null; - enemyImmunityList = null; - dungeonEnemyBuffList = null; - dungeonProjectileBuffList = null; - bossScaleList = null; - bossHPScaleList = null; - beeEnemyList = null; - friendlyBeeList = null; - beeProjectileList = null; - hardModeNerfList = null; - debuffList = null; - fireWeaponList = null; - iceWeaponList = null; - natureWeaponList = null; - alcoholList = null; - doubleDamageBuffList = null; - sixtySixDamageBuffList = null; - fiftyDamageBuffList = null; - thirtyThreeDamageBuffList = null; - twentyFiveDamageBuffList = null; - tenDamageBuffList = null; - weaponAutoreuseList = null; - tenDamageNerfList = null; - quarterDamageNerfList = null; - pumpkinMoonBuffList = null; - frostMoonBuffList = null; - eclipseBuffList = null; - eventProjectileBuffList = null; - revengeanceEnemyBuffList25Percent = null; - revengeanceEnemyBuffList20Percent = null; - revengeanceEnemyBuffList15Percent = null; - revengeanceEnemyBuffList10Percent = null; - revengeanceEnemyBuffList5Percent = null; - revengeanceProjectileBuffList25Percent = null; - revengeanceProjectileBuffList20Percent = null; - revengeanceProjectileBuffList15Percent = null; - revengeanceProjectileBuffList10Percent = null; - revengeanceProjectileBuffList5Percent = null; - revengeanceLifeStealExceptionList = null; - movementImpairImmuneList = null; - needsDebuffIconDisplayList = null; - trapProjectileList = null; - scopedWeaponList = null; - boomerangList = null; - javelinList = null; - daggerList = null; - flaskBombList = null; - spikyBallList = null; - boomerangProjList = null; - javelinProjList = null; - daggerProjList = null; - flaskBombProjList = null; - spikyBallProjList = null; - noGravityList = null; - lavaFishList = null; - highTestFishList = null; - flamethrowerList = null; - forceItemList = null; - livingFireBlockList = null; - - zombieList = null; - demonEyeList = null; - skeletonList = null; - angryBonesList = null; - hornetList = null; - mossHornetList = null; - bossMinionList = null; - - legOverrideList = null; + CalamityLists.UnloadLists(); thorium = null; fargosMutant = false; @@ -512,2356 +364,6 @@ namespace CalamityMod } #endregion - #region SetupLists - public static void SetupLists() - { - donatorList = new List() - { - "Vorbis", - "SoloMael", - "Chaotic Reks", - "The Buildmonger", - "Yuh", - "Littlepiggy", - "LompL", - "Lilith Saintclaire", - "Ben Shapiro", - "Frederik Henschel", - "Faye", - "Gibb50", - "Braden Hajer", - "Hannes Holmlund", - "profoundmango69", - "Jack M Sargent", - "Hans Volter", - "Krankwagon", - "MishiroUsui", - "pixlgray", - "Arkhine", - "Lodude", - "DevAesthetic", - "Mister Winchester", - "Zacky", - "Veine", - "Javyz", - "Shifter", - "Crysthamyr", - "Elfinlocks", - "Ein", - "2Larry2", - "Jenonen", - "Dodu", - "Arti", - "Tervastator", - "Luis Arguello", - "Alexander Davis", - "BakaQing", - "Laura Coonrod", - "Xaphlactus", - "MajinBagel", - "Bendy", - "Rando Calrissian", - "Tails the Fox 92", - "Bread", - "Minty Candy", - "Preston Card", - "MovingTarget_086", - "Shiro", - "Chip", - "Taylor Riverpaw", - "ShotgunAngel", - "Sandblast", - "ThomasThePencil", - "Aero (Aero#4599)", - "GlitchOut", - "Daawnz", - "CrabBar", - "Yatagarasu", - "Jarod Isaac Gordon", - "Zombieh", - "MingWhy", - "Random Weeb", - "Ahmed Fahad Zamel Al Sharif", - "Eragon3942", - "TheBlackHand", - "william", - "Samuel Foreman", - "Christopher Pham", - "DemoN K!ng", - "Malik Ciaramella", - "Ryan Baker-Ortiz", - "Aleksanders Denisovs", - "TheSilverGhost", - "Lucazii", - "Shay", - "Prism", - "BobIsNotMyRealName", - "Guwahavel", - "Azura", - "Joshua Miranda", - "Doveda", - "William Chang", - "Arche", - "DevilSunrise", - "Yanmei", - "Chaos", - "Ryan Tucker", - "Fish Repairs", - "Melvin Brouwers", - "Vroomy Has -3,000 IQ", - "The Goliath", - "DaPyRo", - "Termi", - "Circuit-Jay", - "Commmander Frostbite", - "cytokat", - "Cameron Fowlks", - "Orudeon", - "BumbleDoge", - "John Ballard", - "Naglfar", - "Helixas", - "Vetus Dea", - "High Charity", - "Devonte Plati", - "Cerberus", - "Brendan Kendall", - "Victor Pittman", - "KAT-G307", - "Tombarry Expresserino", - "Drip Veezy", - "Glaid", - "Apotheosis", - "Bladesaber", - "Devon Leigh", - "Ruthoranium", - "cocodezi_", - "Mendzey", - "GameRDheAsianSandwich", - "Tobias", - "Streakist .", - "Eisaya A Cook", - "Xenocrona", - "RKMoon" - }; - - trueMeleeProjectileList = new List() - { - // Vanilla shit - ProjectileID.Spear, - ProjectileID.Trident, - ProjectileID.TheRottedFork, - ProjectileID.Swordfish, - ProjectileID.Arkhalis, - ProjectileID.DarkLance, - ProjectileID.CobaltNaginata, - ProjectileID.PalladiumPike, - ProjectileID.MythrilHalberd, - ProjectileID.OrichalcumHalberd, - ProjectileID.AdamantiteGlaive, - ProjectileID.TitaniumTrident, - ProjectileID.MushroomSpear, - ProjectileID.Gungnir, - ProjectileID.ObsidianSwordfish, - ProjectileID.ChlorophytePartisan, - ProjectileID.MonkStaffT1, - ProjectileID.MonkStaffT2, - ProjectileID.MonkStaffT3, - ProjectileID.NorthPoleWeapon, - - // Tools - ProjectileID.CobaltDrill, - ProjectileID.MythrilDrill, - ProjectileID.AdamantiteDrill, - ProjectileID.PalladiumDrill, - ProjectileID.OrichalcumDrill, - ProjectileID.TitaniumDrill, - ProjectileID.ChlorophyteDrill, - ProjectileID.CobaltChainsaw, - ProjectileID.MythrilChainsaw, - ProjectileID.AdamantiteChainsaw, - ProjectileID.PalladiumChainsaw, - ProjectileID.OrichalcumChainsaw, - ProjectileID.TitaniumChainsaw, - ProjectileID.ChlorophyteChainsaw, - ProjectileID.VortexDrill, - ProjectileID.VortexChainsaw, - ProjectileID.NebulaDrill, - ProjectileID.NebulaChainsaw, - ProjectileID.SolarFlareDrill, - ProjectileID.SolarFlareChainsaw, - ProjectileID.StardustDrill, - ProjectileID.StardustChainsaw, - ProjectileID.Hamdrax, - ProjectileID.ChlorophyteJackhammer, - ProjectileID.SawtoothShark, - ProjectileID.ButchersChainsaw, - - // Calamity shit - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType() - }; - - rangedProjectileExceptionList = new List() - { - ProjectileID.Phantasm, - ProjectileID.VortexBeater, - ProjectileID.DD2PhoenixBow, - ProjectileID.IchorDart, - ProjectileID.PhantasmArrow, - ProjectileID.RainbowBack, - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), // Because of potential dust lag. - ModContent.ProjectileType() - }; - - projectileDestroyExceptionList = new List() - { - //holdout projectiles - ProjectileID.Phantasm, - ProjectileID.VortexBeater, - ProjectileID.DD2PhoenixBow, - ProjectileID.LastPrism, - ProjectileID.LaserMachinegun, - ProjectileID.ChargedBlasterCannon, - ProjectileID.MedusaHead, - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - - //Some hostile boss projectiles - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType() - }; - - projectileMinionList = new List() - { - ProjectileID.PygmySpear, - ProjectileID.UFOMinion, - ProjectileID.UFOLaser, - ProjectileID.StardustCellMinionShot, - ProjectileID.MiniSharkron, - ProjectileID.MiniRetinaLaser, - ProjectileID.ImpFireball, - ProjectileID.HornetStinger, - ProjectileID.DD2FlameBurstTowerT1Shot, - ProjectileID.DD2FlameBurstTowerT2Shot, - ProjectileID.DD2FlameBurstTowerT3Shot, - ProjectileID.DD2BallistraProj, - ProjectileID.DD2ExplosiveTrapT1Explosion, - ProjectileID.DD2ExplosiveTrapT2Explosion, - ProjectileID.DD2ExplosiveTrapT3Explosion, - ProjectileID.SpiderEgg, - ProjectileID.BabySpider, - ProjectileID.FrostBlastFriendly, - ProjectileID.MoonlordTurretLaser, - ProjectileID.RainbowCrystalExplosion - }; - - enemyImmunityList = new List() - { - NPCID.KingSlime, - NPCID.EaterofWorldsHead, - NPCID.EaterofWorldsBody, - NPCID.EaterofWorldsTail, - NPCID.BrainofCthulhu, - NPCID.Creeper, - NPCID.EyeofCthulhu, - NPCID.QueenBee, - NPCID.SkeletronHead, - NPCID.SkeletronHand, - NPCID.WallofFlesh, - NPCID.WallofFleshEye, - NPCID.Retinazer, - NPCID.Spazmatism, - NPCID.SkeletronPrime, - NPCID.PrimeCannon, - NPCID.PrimeSaw, - NPCID.PrimeLaser, - NPCID.PrimeVice, - NPCID.Plantera, - NPCID.IceQueen, - NPCID.Pumpking, - NPCID.Mothron, - NPCID.Golem, - NPCID.GolemHead, - NPCID.GolemHeadFree, - NPCID.GolemFistRight, - NPCID.GolemFistLeft, - NPCID.GolemHeadFree, - NPCID.DukeFishron, - NPCID.Sharkron, - NPCID.Sharkron2, - NPCID.CultistBoss, - NPCID.MoonLordHead, - NPCID.MoonLordHand, - NPCID.MoonLordCore, - NPCID.MoonLordFreeEye, - NPCID.DD2WyvernT1, - NPCID.DD2WyvernT2, - NPCID.DD2WyvernT3, - NPCID.DD2DarkMageT1, - NPCID.DD2DarkMageT3, - NPCID.DD2SkeletonT1, - NPCID.DD2SkeletonT3, - NPCID.DD2WitherBeastT2, - NPCID.DD2WitherBeastT3, - NPCID.DD2DrakinT2, - NPCID.DD2DrakinT3, - NPCID.DD2KoboldWalkerT2, - NPCID.DD2KoboldWalkerT3, - NPCID.DD2KoboldFlyerT2, - NPCID.DD2KoboldFlyerT3, - NPCID.DD2OgreT2, - NPCID.DD2OgreT3, - NPCID.DD2Betsy, - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType() //brothers - }; - - dungeonEnemyBuffList = new List() - { - NPCID.SkeletonSniper, - NPCID.TacticalSkeleton, - NPCID.SkeletonCommando, - NPCID.Paladin, - NPCID.GiantCursedSkull, - NPCID.BoneLee, - NPCID.DiabolistWhite, - NPCID.DiabolistRed, - NPCID.NecromancerArmored, - NPCID.Necromancer, - NPCID.RaggedCasterOpenCoat, - NPCID.RaggedCaster, - NPCID.HellArmoredBonesSword, - NPCID.HellArmoredBonesMace, - NPCID.HellArmoredBonesSpikeShield, - NPCID.HellArmoredBones, - NPCID.BlueArmoredBonesSword, - NPCID.BlueArmoredBonesNoPants, - NPCID.BlueArmoredBonesMace, - NPCID.BlueArmoredBones, - NPCID.RustyArmoredBonesSwordNoArmor, - NPCID.RustyArmoredBonesSword, - NPCID.RustyArmoredBonesFlail, - NPCID.RustyArmoredBonesAxe - }; - - dungeonProjectileBuffList = new List() - { - ProjectileID.PaladinsHammerHostile, - ProjectileID.ShadowBeamHostile, - ProjectileID.InfernoHostileBolt, - ProjectileID.InfernoHostileBlast, - ProjectileID.LostSoulHostile, - ProjectileID.SniperBullet, - ProjectileID.RocketSkeleton, - ProjectileID.BulletDeadeye, - ProjectileID.Shadowflames - }; - - bossScaleList = new List() - { - NPCID.EaterofWorldsHead, - NPCID.EaterofWorldsBody, - NPCID.EaterofWorldsTail, - NPCID.Creeper, - NPCID.SkeletronHand, - NPCID.WallofFleshEye, - NPCID.TheHungry, - NPCID.TheHungryII, - NPCID.TheDestroyerBody, - NPCID.TheDestroyerTail, - NPCID.PrimeCannon, - NPCID.PrimeVice, - NPCID.PrimeSaw, - NPCID.PrimeLaser, - NPCID.PlanterasTentacle, - NPCID.Pumpking, - NPCID.IceQueen, - NPCID.Mothron, - NPCID.GolemHead - }; - - bossHPScaleList = new List() - { - NPCID.EaterofWorldsHead, - NPCID.EaterofWorldsBody, - NPCID.EaterofWorldsTail, - NPCID.SkeletronHand, - NPCID.WallofFleshEye, - NPCID.TheDestroyerBody, - NPCID.TheDestroyerTail, - NPCID.PrimeCannon, - NPCID.PrimeLaser, - NPCID.PrimeVice, - NPCID.PrimeSaw, - NPCID.GolemHead, - NPCID.GolemHeadFree, - NPCID.GolemFistRight, - NPCID.GolemFistLeft, - NPCID.MoonLordHead, - NPCID.MoonLordHand - }; - - beeEnemyList = new List() - { - NPCID.GiantMossHornet, - NPCID.BigMossHornet, - NPCID.LittleMossHornet, - NPCID.TinyMossHornet, - NPCID.MossHornet, - NPCID.VortexHornetQueen, - NPCID.VortexHornet, - NPCID.Bee, - NPCID.BeeSmall, - NPCID.QueenBee, - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType() - }; - - beeProjectileList = new List() - { - ProjectileID.Stinger, - ProjectileID.HornetStinger, - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType() - }; - - friendlyBeeList = new List() - { - ProjectileID.GiantBee, - ProjectileID.Bee, - ProjectileID.Wasp, - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType() - }; - - hardModeNerfList = new List() - { - ProjectileID.WebSpit, - ProjectileID.PinkLaser, - ProjectileID.FrostBlastHostile, - ProjectileID.RuneBlast, - ProjectileID.GoldenShowerHostile, - ProjectileID.RainNimbus, - ProjectileID.Stinger, - ProjectileID.FlamingArrow, - ProjectileID.BulletDeadeye, - ProjectileID.CannonballHostile - }; - - debuffList = new 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, - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }; - - fireWeaponList = new List() - { - ItemID.FieryGreatsword, - ItemID.DD2SquireDemonSword, - ItemID.TheHorsemansBlade, - ItemID.Cascade, - ItemID.HelFire, - ItemID.Flamarang, - ItemID.MoltenFury, - ItemID.Sunfury, - ItemID.PhoenixBlaster, - ItemID.Flamelash, - ItemID.SolarEruption, - ItemID.DayBreak, - ItemID.HellwingBow, - ItemID.DD2PhoenixBow, - ItemID.DD2BetsyBow, - ItemID.FlareGun, - ItemID.Flamethrower, - ItemID.EldMelter, - ItemID.FlowerofFire, - ItemID.MeteorStaff, - ItemID.ApprenticeStaffT3, - ItemID.InfernoFork, - ItemID.HeatRay, - ItemID.BookofSkulls, - ItemID.ImpStaff, - ItemID.DD2FlameburstTowerT1Popper, - ItemID.DD2FlameburstTowerT2Popper, - ItemID.DD2FlameburstTowerT3Popper, - ItemID.MolotovCocktail, - ItemID.WandofSparking, - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() - }; - - iceWeaponList = new List() - { - ItemID.IceBlade, - ItemID.IceSickle, - ItemID.Frostbrand, - ItemID.Amarok, - ItemID.NorthPole, - ItemID.IceBoomerang, - ItemID.IceBow, - ItemID.SnowmanCannon, - ItemID.SnowballCannon, - ItemID.IceRod, - ItemID.FlowerofFrost, - ItemID.FrostStaff, - ItemID.BlizzardStaff, - ItemID.StaffoftheFrostHydra, - ItemID.Snowball, - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - //Cryonic Bar set stuff, could potentially be removed - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() - }; - - natureWeaponList = new List() - { - ItemID.BladeofGrass, - ItemID.ChlorophyteClaymore, - ItemID.ChlorophyteSaber, - ItemID.ChlorophytePartisan, - ItemID.ChlorophyteShotbow, - ItemID.Seedler, - ItemID.ChristmasTreeSword, - ItemID.TerraBlade, - ItemID.JungleYoyo, - ItemID.Yelets, - ItemID.MushroomSpear, - ItemID.ThornChakram, - ItemID.Bananarang, - ItemID.FlowerPow, - ItemID.BeesKnees, - ItemID.Toxikarp, - ItemID.Bladetongue, - ItemID.PoisonStaff, - ItemID.VenomStaff, - ItemID.StaffofEarth, - ItemID.BeeGun, - ItemID.LeafBlower, - ItemID.WaspGun, - ItemID.CrystalSerpent, - ItemID.Razorpine, - ItemID.HornetStaff, - ItemID.QueenSpiderStaff, - ItemID.SlimeStaff, - ItemID.PygmyStaff, - ItemID.RavenStaff, - ItemID.BatScepter, - ItemID.SpiderStaff, - ItemID.Beenade, - ItemID.FrostDaggerfish, - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() - }; - - alcoholList = new List() - { - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType(), - ModContent.BuffType() - }; - - doubleDamageBuffList = new List() - { - ItemID.BallOHurt, - ItemID.TheMeatball, - ItemID.BlueMoon, - ItemID.Sunfury, - ItemID.DaoofPow, - ItemID.FlowerPow, - ItemID.Anchor, - ItemID.KOCannon, - ItemID.GolemFist, - ItemID.BreakerBlade, - ItemID.MonkStaffT2, - ItemID.ProximityMineLauncher, - ItemID.FireworksLauncher, - ItemID.ShadowbeamStaff - }; - - sixtySixDamageBuffList = new List() - { - ItemID.TrueNightsEdge, - ItemID.MedusaHead, - ItemID.StaffofEarth, - ItemID.ChristmasTreeSword, - ItemID.MonkStaffT1, - ItemID.InfernoFork, - ItemID.VenomStaff, - ItemID.Frostbrand - }; - - fiftyDamageBuffList = new List() - { - ItemID.NightsEdge, - ItemID.EldMelter, - ItemID.Flamethrower, - ItemID.MoonlordTurretStaff, - ItemID.WaspGun, - ItemID.Keybrand, - ItemID.PulseBow, - ItemID.PaladinsHammer, - ItemID.SolarEruption, - ItemID.DayBreak - }; - - thirtyThreeDamageBuffList = new List() - { - ItemID.WandofSparking, - ItemID.IceBow, - ItemID.Marrow, - ItemID.CrystalVileShard, - ItemID.SoulDrain, - ItemID.ClingerStaff, - ItemID.ChargedBlasterCannon, - ItemID.NettleBurst, - ItemID.Excalibur, - ItemID.AmberStaff, - ItemID.BluePhasesaber, - ItemID.RedPhasesaber, - ItemID.GreenPhasesaber, - ItemID.WhitePhasesaber, - ItemID.YellowPhasesaber, - ItemID.PurplePhasesaber, - ItemID.TheRottedFork, - ItemID.VampireKnives, - ItemID.Cascade, - ItemID.TrueExcalibur - }; - - twentyFiveDamageBuffList = new List() - { - ItemID.Muramasa, - ItemID.StakeLauncher, - ItemID.BookStaff - }; - - twentyDamageBuffList = new List() - { - ItemID.ChainGuillotines, - ItemID.FlowerofFrost, - ItemID.PoisonStaff, - ItemID.Gungnir, - ItemID.TacticalShotgun - }; - - tenDamageBuffList = new List() - { - ItemID.MagnetSphere, - ItemID.BatScepter - }; - - weaponAutoreuseList = new List() - { - ItemID.NightsEdge, - ItemID.TrueNightsEdge, - ItemID.TrueExcalibur, - ItemID.PhoenixBlaster, - ItemID.VenusMagnum, - ItemID.MagicDagger, - ItemID.BeamSword, - ItemID.MonkStaffT2, - ItemID.PaladinsHammer, - ItemID.PearlwoodSword, - ItemID.PearlwoodBow, - ItemID.TaxCollectorsStickOfDoom, - ItemID.StylistKilLaKillScissorsIWish - }; - - tenDamageNerfList = new List() - { - ItemID.Phantasm - }; - - quarterDamageNerfList = new List() - { - ItemID.Razorpine, - ItemID.DaedalusStormbow, - ItemID.PhoenixBlaster, - ItemID.DD2BetsyBow, - ItemID.InfluxWaver, - ItemID.Xenopopper, - ItemID.ElectrosphereLauncher, - ItemID.OpticStaff //Note: got local i frames so it should be better - }; - - pumpkinMoonBuffList = new List() - { - NPCID.Scarecrow1, - NPCID.Scarecrow2, - NPCID.Scarecrow3, - NPCID.Scarecrow4, - NPCID.Scarecrow5, - NPCID.Scarecrow6, - NPCID.Scarecrow7, - NPCID.Scarecrow8, - NPCID.Scarecrow9, - NPCID.Scarecrow10, - NPCID.HeadlessHorseman, - NPCID.MourningWood, - NPCID.Splinterling, - NPCID.Pumpking, - NPCID.PumpkingBlade, - NPCID.Hellhound, - NPCID.Poltergeist - }; - - frostMoonBuffList = new List() - { - NPCID.ZombieElf, - NPCID.ZombieElfBeard, - NPCID.ZombieElfGirl, - NPCID.PresentMimic, - NPCID.GingerbreadMan, - NPCID.Yeti, - NPCID.Everscream, - NPCID.IceQueen, - NPCID.SantaNK1, - NPCID.ElfCopter, - NPCID.Nutcracker, - NPCID.NutcrackerSpinning, - NPCID.ElfArcher, - NPCID.Krampus, - NPCID.Flocko - }; - - eclipseBuffList = new List() - { - NPCID.Eyezor, - NPCID.Reaper, - NPCID.Frankenstein, - NPCID.SwampThing, - NPCID.Vampire, - NPCID.VampireBat, - NPCID.Butcher, - NPCID.CreatureFromTheDeep, - NPCID.Fritz, - NPCID.Nailhead, - NPCID.Psycho, - NPCID.DeadlySphere, - NPCID.DrManFly, - NPCID.ThePossessed, - NPCID.Mothron, - NPCID.MothronEgg, - NPCID.MothronSpawn - }; - - eventProjectileBuffList = new List() - { - 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 - }; - - // Enemies that inflict an average of 1 to 50 damage in Expert Mode - revengeanceEnemyBuffList25Percent = new List() - { - NPCID.ServantofCthulhu, - NPCID.EyeofCthulhu, - NPCID.EaterofWorldsHead, - NPCID.EaterofWorldsBody, - NPCID.EaterofWorldsTail, - NPCID.Creeper, - NPCID.Bee, - NPCID.BeeSmall, - NPCID.SkeletronHand, - NPCID.GiantWormHead, - NPCID.BlazingWheel, - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType() - }; - - // Enemies that inflict an average of 51 to 100 damage in Expert Mode - revengeanceEnemyBuffList20Percent = new List() - { - NPCID.KingSlime, - NPCID.BrainofCthulhu, - NPCID.QueenBee, - NPCID.SkeletronHead, - NPCID.TheHungryII, - NPCID.LeechHead, - NPCID.TheDestroyerBody, - NPCID.TheDestroyerTail, - NPCID.Probe, - NPCID.PrimeSaw, - NPCID.PrimeVice, - NPCID.PrimeLaser, - NPCID.PrimeCannon, - NPCID.DevourerHead, - NPCID.MeteorHead, - NPCID.BoneSerpentHead, - NPCID.ManEater, - NPCID.Snatcher, - NPCID.Piranha, - NPCID.Shark, - NPCID.SpikeBall, - NPCID.DiggerHead, - NPCID.WallCreeper, - NPCID.WallCreeperWall, - NPCID.Lihzahrd, - NPCID.Pumpking, - NPCID.SlimeSpiked, - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType() - }; - - // Enemies that inflict an average of 101 to 200 damage in Expert Mode - revengeanceEnemyBuffList15Percent = new List() - { - NPCID.WallofFlesh, - NPCID.Spazmatism, - NPCID.Retinazer, - NPCID.SkeletronPrime, - NPCID.Plantera, - NPCID.PlanterasTentacle, - NPCID.Spore, - NPCID.DetonatingBubble, - NPCID.Golem, - NPCID.GolemHead, - NPCID.GolemHeadFree, - NPCID.GolemFistLeft, - NPCID.GolemFistRight, - NPCID.DukeFishron, - NPCID.Sharkron, - NPCID.Sharkron2, - NPCID.CultistDragonHead, - NPCID.AncientCultistSquidhead, - NPCID.AncientLight, - NPCID.DD2Betsy, - NPCID.Mimic, - NPCID.WyvernHead, - NPCID.SeekerHead, - NPCID.AnglerFish, - NPCID.Werewolf, - NPCID.Wraith, - NPCID.Arapaima, - NPCID.BlackRecluse, - NPCID.BlackRecluseWall, - NPCID.AngryTrapper, - NPCID.LihzahrdCrawler, - NPCID.PirateCaptain, - NPCID.FlyingSnake, - NPCID.Reaper, - NPCID.Paladin, - NPCID.BoneLee, - NPCID.MourningWood, - NPCID.PumpkingBlade, - NPCID.PresentMimic, - NPCID.Everscream, - NPCID.IceQueen, - NPCID.SantaNK1, - NPCID.StardustWormHead, - NPCID.Butcher, - NPCID.Psycho, - NPCID.DeadlySphere, - NPCID.BigMimicCorruption, - NPCID.BigMimicCrimson, - NPCID.BigMimicHallow, - NPCID.Mothron, - NPCID.DuneSplicerHead, - NPCID.SandShark, - NPCID.SandsharkCorrupt, - NPCID.SandsharkCrimson, - NPCID.SandsharkHallow, - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType() - }; - - // Enemies that inflict an average of 201 to 400 damage in Expert Mode - revengeanceEnemyBuffList10Percent = new List() - { - NPCID.TheDestroyer, - NPCID.SolarCrawltipedeHead, - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType() - }; - - // Enemies that inflict an average of 401+ damage in Expert Mode - revengeanceEnemyBuffList5Percent = new List() - { - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType() - }; - - revengeanceProjectileBuffList25Percent = new List() - { - ProjectileID.SandBallFalling, - ProjectileID.AshBallFalling, - ProjectileID.EbonsandBallFalling, - ProjectileID.PearlSandBallFalling, - ProjectileID.CrimsandBallFalling, - ProjectileID.GeyserTrap, - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType() - }; - - revengeanceProjectileBuffList20Percent = new List() - { - ProjectileID.PoisonDartTrap, - ProjectileID.DemonSickle, - ProjectileID.SandnadoHostile, - ProjectileID.DD2BetsyFireball, - ProjectileID.DD2BetsyFlameBreath, - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType() - }; - - revengeanceProjectileBuffList15Percent = new List() - { - ProjectileID.SpikyBallTrap, - ProjectileID.SpearTrap, - ProjectileID.FlamethrowerTrap, - ProjectileID.FlamesTrap, - ProjectileID.Fireball, - ProjectileID.PaladinsHammerHostile, - ProjectileID.FlamingWood, - ProjectileID.FlamingScythe, - ProjectileID.FrostWave, - ProjectileID.Present, - ProjectileID.Spike, - ProjectileID.SaucerDeathray, - ProjectileID.NebulaBolt, - ProjectileID.NebulaSphere, - ProjectileID.NebulaLaser, - ProjectileID.StardustSoldierLaser, - ProjectileID.VortexLaser, - ProjectileID.VortexVortexLightning, - ProjectileID.VortexLightning, - ProjectileID.VortexAcid, - ProjectileID.Sharknado, - ProjectileID.Cthulunado, - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType() - }; - - revengeanceProjectileBuffList10Percent = new List() - { - ProjectileID.Boulder, - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType() - }; - - revengeanceProjectileBuffList5Percent = new List() - { - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType() - }; - - revengeanceLifeStealExceptionList = new List() - { - NPCID.Probe, - NPCID.CultistDragonHead, - NPCID.CultistDragonBody1, - NPCID.CultistDragonBody2, - NPCID.CultistDragonBody3, - NPCID.CultistDragonBody4, - NPCID.CultistDragonTail, - NPCID.AncientCultistSquidhead, - NPCID.AncientLight, - NPCID.Sharkron, - NPCID.Sharkron2, - NPCID.PlanterasTentacle, - NPCID.Spore, - NPCID.TheHungryII, - NPCID.LeechHead, - NPCID.LeechBody, - NPCID.LeechTail, - NPCID.TheDestroyerBody, - NPCID.TheDestroyerTail, - NPCID.EaterofWorldsBody, - NPCID.EaterofWorldsTail, - NPCID.GolemHead, - NPCID.GolemHeadFree, - NPCID.GolemFistRight, - NPCID.GolemFistLeft, - NPCID.MoonLordCore - }; - - movementImpairImmuneList = new List() - { - NPCID.QueenBee, - }; - - needsDebuffIconDisplayList = new List() - { - NPCID.WallofFleshEye - }; - - trapProjectileList = new List() - { - ProjectileID.PoisonDartTrap, - ProjectileID.SpikyBallTrap, - ProjectileID.SpearTrap, - ProjectileID.FlamethrowerTrap, - ProjectileID.FlamesTrap, - ProjectileID.PoisonDart, - ProjectileID.GeyserTrap - }; - - scopedWeaponList = new List() - { - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() - }; - - boomerangList = new List() - { - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() - }; - - boomerangProjList = new List() - { - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType() - }; - - javelinList = new List() - { - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() - }; - - javelinProjList = new List() - { - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType() - }; - - daggerList = new List() - { - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() - }; - - daggerProjList = new List() - { - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType() - }; - - flaskBombList = new List() - { - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() - }; - - flaskBombProjList = new List() - { - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType() - }; - - spikyBallList = new List() - { - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() - }; - - spikyBallProjList = new List() - { - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType() - }; - - noGravityList = new List() - { - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - }; - - lavaFishList = new List() - { - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() - }; - - highTestFishList = new List() - { - ItemID.GoldenFishingRod, - ModContent.ItemType(), - ModContent.ItemType() - }; - - flamethrowerList = new List() - { - ModContent.ItemType(), - ModContent.ItemType() - }; - - forceItemList = new List() - { - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ItemID.HotlineFishingHook, - ItemID.BottomlessBucket, - ItemID.SuperAbsorbantSponge, - ItemID.FishingPotion, - ItemID.SonarPotion, - ItemID.CratePotion, - ItemID.AnglerTackleBag, - ItemID.HighTestFishingLine, - ItemID.TackleBox, - ItemID.AnglerEarring, - ItemID.FishermansGuide, - ItemID.WeatherRadio, - ItemID.Sextant, - ItemID.AnglerHat, - ItemID.AnglerVest, - ItemID.AnglerPants, - ItemID.GoldenBugNet, - ItemID.FishronWings, - ItemID.Flairon, - ItemID.Tsunami, - ItemID.BubbleGun, - ItemID.RazorbladeTyphoon, - ItemID.TempestStaff, - ItemID.FishronBossBag, - ItemID.Coral, - ItemID.Seashell, - ItemID.Starfish, - ItemID.SoulofSight, - ItemID.GreaterHealingPotion, - ItemID.SuperHealingPotion - }; - - livingFireBlockList = new List() - { - ModContent.TileType(), - ModContent.TileType(), - ModContent.TileType(), - TileID.LivingFire, - TileID.LivingCursedFire, - TileID.LivingDemonFire, - TileID.LivingFrostFire, - TileID.LivingIchor, - TileID.LivingUltrabrightFire - }; - - zombieList = new List() - { - NPCID.Zombie, - NPCID.ArmedZombie, - NPCID.BaldZombie, - NPCID.PincushionZombie, - NPCID.ArmedZombiePincussion, // what is this spelling - NPCID.SlimedZombie, - NPCID.ArmedZombieSlimed, - NPCID.SwampZombie, - NPCID.ArmedZombieSwamp, - NPCID.TwiggyZombie, - NPCID.ArmedZombieTwiggy, - NPCID.FemaleZombie, - NPCID.ArmedZombieCenx, - NPCID.ZombieRaincoat, - NPCID.ZombieEskimo, - NPCID.ArmedZombieEskimo, - NPCID.BigRainZombie, - NPCID.SmallRainZombie, - NPCID.BigFemaleZombie, - NPCID.SmallFemaleZombie, - NPCID.BigTwiggyZombie, - NPCID.SmallTwiggyZombie, - NPCID.BigSwampZombie, - NPCID.SmallSwampZombie, - NPCID.BigSlimedZombie, - NPCID.SmallSlimedZombie, - NPCID.BigPincushionZombie, - NPCID.SmallPincushionZombie, - NPCID.BigBaldZombie, - NPCID.SmallBaldZombie, - NPCID.BigZombie, - NPCID.SmallZombie - // halloween zombies not included because they don't drop shackles or zombie arms - }; - - demonEyeList = new List() - { - NPCID.DemonEye, - NPCID.CataractEye, - NPCID.SleepyEye, - NPCID.DialatedEye, // it is spelled "dilated" - NPCID.GreenEye, - NPCID.PurpleEye, - NPCID.DemonEyeOwl, - NPCID.DemonEyeSpaceship, - NPCID.DemonEye2, - NPCID.PurpleEye2, - NPCID.GreenEye2, - NPCID.DialatedEye2, - NPCID.SleepyEye2, - NPCID.CataractEye2 - }; - - skeletonList = new List() - { - NPCID.Skeleton, - NPCID.HeadacheSkeleton, - NPCID.MisassembledSkeleton, - NPCID.PantlessSkeleton, - NPCID.BoneThrowingSkeleton, - NPCID.BoneThrowingSkeleton2, - NPCID.BoneThrowingSkeleton3, - NPCID.BoneThrowingSkeleton4, - NPCID.BigPantlessSkeleton, - NPCID.SmallPantlessSkeleton, - NPCID.BigMisassembledSkeleton, - NPCID.SmallMisassembledSkeleton, - NPCID.BigHeadacheSkeleton, - NPCID.SmallHeadacheSkeleton, - NPCID.BigSkeleton, - NPCID.SmallSkeleton, - - //Note: These skeletons don't count for Skeleton Banner for some god forsaken reason - NPCID.SkeletonTopHat, - NPCID.SkeletonAstonaut, - NPCID.SkeletonAlien, - - //Other skeleton types - NPCID.ArmoredSkeleton, - NPCID.HeavySkeleton, - NPCID.SkeletonArcher, - NPCID.GreekSkeleton - }; - - angryBonesList = new List() - { - NPCID.AngryBones, - NPCID.AngryBonesBig, - NPCID.AngryBonesBigMuscle, - NPCID.AngryBonesBigHelmet, - NPCID.BigBoned, - NPCID.ShortBones - }; - - hornetList = new List() - { - NPCID.BigHornetStingy, - NPCID.LittleHornetStingy, - NPCID.BigHornetSpikey, - NPCID.LittleHornetSpikey, - NPCID.BigHornetLeafy, - NPCID.LittleHornetLeafy, - NPCID.BigHornetHoney, - NPCID.LittleHornetHoney, - NPCID.BigHornetFatty, - NPCID.LittleHornetFatty, - NPCID.BigStinger, - NPCID.LittleStinger, - NPCID.Hornet, - NPCID.HornetFatty, - NPCID.HornetHoney, - NPCID.HornetLeafy, - NPCID.HornetSpikey, - NPCID.HornetStingy - }; - - mossHornetList = new List() - { - NPCID.MossHornet, - NPCID.TinyMossHornet, - NPCID.LittleMossHornet, - NPCID.BigMossHornet, - NPCID.GiantMossHornet - }; - - bossMinionList = new List() - { - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - NPCID.SlimeSpiked, - NPCID.ServantofCthulhu, - ModContent.NPCType(), - NPCID.EaterofWorldsHead, - NPCID.EaterofWorldsBody, - NPCID.EaterofWorldsTail, - NPCID.Creeper, - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - NPCID.SkeletronHand, - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - NPCID.LeechHead, - NPCID.LeechBody, - NPCID.LeechTail, - NPCID.WallofFleshEye, - NPCID.TheHungry, - NPCID.TheHungryII, - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - NPCID.PrimeCannon, - NPCID.PrimeLaser, - NPCID.PrimeSaw, - NPCID.PrimeVice, - ModContent.NPCType(), - NPCID.TheDestroyer, - NPCID.TheDestroyerBody, - NPCID.TheDestroyerTail, - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - NPCID.PlanterasTentacle, - ModContent.NPCType(), - NPCID.Spore, - NPCID.GolemHead, - NPCID.GolemHeadFree, - NPCID.GolemFistLeft, - NPCID.GolemFistRight, - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - NPCID.CultistDragonHead, - NPCID.CultistDragonBody1, - NPCID.CultistDragonBody2, - NPCID.CultistDragonBody3, - NPCID.CultistDragonBody4, - NPCID.CultistDragonTail, - NPCID.AncientCultistSquidhead, - NPCID.MoonLordFreeEye, - NPCID.MoonLordHand, - NPCID.MoonLordHead, - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType(), - ModContent.NPCType() - }; - - Mod thorium = ModLoader.GetMod("ThoriumMod"); - if (CalamityConfig.Instance.BuffThoriumBosses && thorium != null) - { - enemyImmunityList.Add(thorium.NPCType("TheGrandThunderBirdv2")); - enemyImmunityList.Add(thorium.NPCType("QueenJelly")); - enemyImmunityList.Add(thorium.NPCType("Viscount")); - enemyImmunityList.Add(thorium.NPCType("GraniteEnergyStorm")); - enemyImmunityList.Add(thorium.NPCType("TheBuriedWarrior")); - enemyImmunityList.Add(thorium.NPCType("ThePrimeScouter")); - enemyImmunityList.Add(thorium.NPCType("BoreanStrider")); - enemyImmunityList.Add(thorium.NPCType("BoreanStriderPopped")); - enemyImmunityList.Add(thorium.NPCType("FallenDeathBeholder")); - enemyImmunityList.Add(thorium.NPCType("FallenDeathBeholder2")); - enemyImmunityList.Add(thorium.NPCType("Lich")); - enemyImmunityList.Add(thorium.NPCType("LichHeadless")); - enemyImmunityList.Add(thorium.NPCType("Abyssion")); - enemyImmunityList.Add(thorium.NPCType("AbyssionCracked")); - enemyImmunityList.Add(thorium.NPCType("AbyssionReleased")); - enemyImmunityList.Add(thorium.NPCType("SlagFury")); - enemyImmunityList.Add(thorium.NPCType("Omnicide")); - enemyImmunityList.Add(thorium.NPCType("RealityBreaker")); - enemyImmunityList.Add(thorium.NPCType("Aquaius")); - enemyImmunityList.Add(thorium.NPCType("Aquaius2")); - - revengeanceEnemyBuffList25Percent.Add(thorium.NPCType("TheGrandThunderBirdv2")); - revengeanceEnemyBuffList25Percent.Add(thorium.NPCType("QueenJelly")); - revengeanceEnemyBuffList20Percent.Add(thorium.NPCType("Viscount")); - revengeanceEnemyBuffList20Percent.Add(thorium.NPCType("GraniteEnergyStorm")); - revengeanceEnemyBuffList20Percent.Add(thorium.NPCType("TheBuriedWarrior")); - revengeanceEnemyBuffList20Percent.Add(thorium.NPCType("ThePrimeScouter")); - revengeanceEnemyBuffList20Percent.Add(thorium.NPCType("BoreanStrider")); - revengeanceEnemyBuffList20Percent.Add(thorium.NPCType("BoreanStriderPopped")); - revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("FallenDeathBeholder")); - revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("FallenDeathBeholder2")); - revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("Lich")); - revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("LichHeadless")); - revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("Abyssion")); - revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("AbyssionCracked")); - revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("AbyssionReleased")); - revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("SlagFury")); - revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("Omnicide")); - revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("RealityBreaker")); - revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("Aquaius")); - revengeanceEnemyBuffList15Percent.Add(thorium.NPCType("Aquaius2")); - - revengeanceProjectileBuffList25Percent.Add(thorium.ProjectileType("GrandThunderBirdZap")); - revengeanceProjectileBuffList25Percent.Add(thorium.ProjectileType("ThunderGust")); - revengeanceProjectileBuffList25Percent.Add(thorium.ProjectileType("BubbleBomb")); - revengeanceProjectileBuffList25Percent.Add(thorium.ProjectileType("QueenJellyArm")); - revengeanceProjectileBuffList25Percent.Add(thorium.ProjectileType("QueenTorrent")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("ViscountRipple")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("ViscountRipple2")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("ViscountBlood")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("ViscountStomp")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("ViscountStomp2")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("ViscountRockFall")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("GraniteCharge")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedShock")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedDagger")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedArrow")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedArrow2")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedArrowF")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedArrowP")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedArrowC")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedMagic")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("BuriedMagicPop")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("MainBeamOuter")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("MainBeam")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("MainBeamCheese")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("VaporizeBlast")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("GravitonSurge")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("Vaporize")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("GravitonCharge")); - revengeanceProjectileBuffList20Percent.Add(thorium.ProjectileType("GravitySpark")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("DoomBeholderBeam")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("VoidLaserPro")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("BeholderBeam")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("BlizzardBarrage")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("FrostSurge")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("FrostSurgeR")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("BlizzardCascade")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("BlizzardBoom")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("BlizzardFang")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("FrostMytePro")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("IceAnomaly")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichGaze")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichGazeB")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichFlareSpawn")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichFlare")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichPulse")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichMatter")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("SoulRenderLich")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichFlareDeathD")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("LichFlareDeathU")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("Whirlpool")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("AbyssionSpit")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("AbyssionSpit2")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("AquaRipple")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("AbyssalStrike2")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("OldGodSpit")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("OldGodSpit2")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("WaterPulse")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("TyphoonBlastHostile")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("TyphoonBlastHostileSmaller")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("AquaBarrage")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("DeathRaySpawnR")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("DeathRaySpawnL")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("DeathRaySpawn")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("OmniDeath")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("OmniSphereOrb")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("FlameLash")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("FlamePulse")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("FlamePulseTorn")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("FlameNova")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("MoltenFury")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("RealityFury")); - revengeanceProjectileBuffList15Percent.Add(thorium.ProjectileType("UFOBlast")); - } - - legOverrideList = new List() - { - Instance.GetEquipSlot("ProviLegs", EquipType.Legs), - Instance.GetEquipSlot("SirenLegAlt", EquipType.Legs), - Instance.GetEquipSlot("SirenLeg", EquipType.Legs), - Instance.GetEquipSlot("PopoLeg", EquipType.Legs) - }; - } - #endregion - #region Vanilla Enemy DR private void SetupVanillaDR() { @@ -3964,194 +1466,7 @@ namespace CalamityMod #region Packets public override void HandlePacket(BinaryReader reader, int whoAmI) { - try - { - CalamityModMessageType msgType = (CalamityModMessageType)reader.ReadByte(); - switch (msgType) - { - case CalamityModMessageType.MeleeLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 0); - break; - case CalamityModMessageType.RangedLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 1); - break; - case CalamityModMessageType.MagicLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 2); - break; - case CalamityModMessageType.SummonLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 3); - break; - case CalamityModMessageType.RogueLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 4); - break; - case CalamityModMessageType.ExactMeleeLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 0); - break; - case CalamityModMessageType.ExactRangedLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 1); - break; - case CalamityModMessageType.ExactMagicLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 2); - break; - case CalamityModMessageType.ExactSummonLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 3); - break; - case CalamityModMessageType.ExactRogueLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 4); - break; - case CalamityModMessageType.StressSync: - Main.player[reader.ReadInt32()].Calamity().HandleStress(reader); - break; - case CalamityModMessageType.BossRushStage: - int stage = reader.ReadInt32(); - BossRushEvent.BossRushStage = stage; - break; - case CalamityModMessageType.AdrenalineSync: - Main.player[reader.ReadInt32()].Calamity().HandleAdrenaline(reader); - break; - case CalamityModMessageType.TeleportPlayer: - Main.player[reader.ReadInt32()].Calamity().HandleTeleport(reader.ReadInt32(), true, whoAmI); - break; - case CalamityModMessageType.DoGCountdownSync: - int countdown = reader.ReadInt32(); - CalamityWorld.DoGSecondStageCountdown = countdown; - break; - case CalamityModMessageType.BossSpawnCountdownSync: - int countdown2 = reader.ReadInt32(); - CalamityWorld.bossSpawnCountdown = countdown2; - break; - case CalamityModMessageType.BRHostileProjKillSync: - int countdown3 = reader.ReadInt32(); - CalamityWorld.bossRushHostileProjKillCounter = countdown3; - break; - case CalamityModMessageType.DeathBossSpawnCountdownSync: - int countdown4 = reader.ReadInt32(); - CalamityWorld.deathBossSpawnCooldown = countdown4; - break; - case CalamityModMessageType.ArmoredDiggerCountdownSync: - int countdown5 = reader.ReadInt32(); - CalamityWorld.ArmoredDiggerSpawnCooldown = countdown5; - break; - case CalamityModMessageType.BossTypeSync: - int type = reader.ReadInt32(); - CalamityWorld.bossType = type; - break; - case CalamityModMessageType.DeathCountSync: - Main.player[reader.ReadInt32()].Calamity().HandleDeathCount(reader); - break; - case CalamityModMessageType.DeathModeUnderworldTimeSync: - Main.player[reader.ReadInt32()].Calamity().HandleDeathModeUnderworldTime(reader); - break; - case CalamityModMessageType.DeathModeBlizzardTimeSync: - Main.player[reader.ReadInt32()].Calamity().HandleDeathModeBlizzardTime(reader); - break; - case CalamityModMessageType.RevengeanceBoolSync: - bool revActive = reader.ReadBoolean(); - CalamityWorld.revenge = revActive; - break; - case CalamityModMessageType.DeathBoolSync: - bool deathActive = reader.ReadBoolean(); - CalamityWorld.death = deathActive; - break; - case CalamityModMessageType.DefiledBoolSync: - bool defiledActive = reader.ReadBoolean(); - CalamityWorld.defiled = defiledActive; - break; - case CalamityModMessageType.IronHeartBoolSync: - bool ironHeartActive = reader.ReadBoolean(); - CalamityWorld.ironHeart = ironHeartActive; - break; - case CalamityModMessageType.ArmageddonBoolSync: - bool armaActive = reader.ReadBoolean(); - CalamityWorld.armageddon = armaActive; - break; - case CalamityModMessageType.DemonTrophyBoolSync: - bool demonModeBoost = reader.ReadBoolean(); - CalamityWorld.demonMode = demonModeBoost; - break; - case CalamityModMessageType.NPCRegenerationSync: - byte npcIndex = reader.ReadByte(); - Main.npc[npcIndex].lifeRegen = reader.ReadInt32(); - break; - case CalamityModMessageType.AcidRainSync: - CalamityWorld.rainingAcid = reader.ReadBoolean(); - CalamityWorld.acidRainPoints = reader.ReadInt32(); - CalamityWorld.timeSinceAcidRainKill = reader.ReadInt32(); - break; - case CalamityModMessageType.AcidRainUIDrawFadeSync: - CalamityWorld.acidRainExtraDrawTime = reader.ReadInt32(); - break; - case CalamityModMessageType.AcidRainOldDukeSummonSync: - CalamityWorld.triedToSummonOldDuke = reader.ReadBoolean(); - break; - case CalamityModMessageType.GaelsGreatswordSwingSync: - byte playerIndex = reader.ReadByte(); - Main.player[playerIndex].Calamity().gaelSwipes = reader.ReadInt32(); - break; - case CalamityModMessageType.SpawnSuperDummy: - int x = reader.ReadInt32(); - int y = reader.ReadInt32(); - // Not strictly necessary, but helps prevent unnecessary packetstorm in MP - if (Main.netMode != NetmodeID.MultiplayerClient) - NPC.NewNPC(x, y, ModContent.NPCType()); - break; - case CalamityModMessageType.DraedonGeneratorStackSync: - (TileEntity.ByID[reader.ReadInt32()] as TEDraedonFuelFactory).HeldItem.stack = reader.ReadInt32(); - break; - case CalamityModMessageType.DraedonChargerSync: - int entityID = reader.ReadInt32(); - (TileEntity.ByID[entityID] as TEDraedonItemCharger).FuelItem.type = reader.ReadInt32(); - (TileEntity.ByID[entityID] as TEDraedonItemCharger).FuelItem.stack = reader.ReadInt32(); - (TileEntity.ByID[entityID] as TEDraedonItemCharger).FuelItem.position = reader.ReadVector2(); - (TileEntity.ByID[entityID] as TEDraedonItemCharger).ItemBeingCharged.type = reader.ReadInt32(); - (TileEntity.ByID[entityID] as TEDraedonItemCharger).ItemBeingCharged.stack = reader.ReadInt32(); - (TileEntity.ByID[entityID] as TEDraedonItemCharger).ItemBeingCharged.prefix = reader.ReadByte(); - (TileEntity.ByID[entityID] as TEDraedonItemCharger).ItemBeingCharged.position = reader.ReadVector2(); - int currentCharge = reader.ReadInt32(); - if (currentCharge != -1) - { - (TileEntity.ByID[entityID] as TEDraedonItemCharger).ItemBeingCharged.Calamity().CurrentCharge = currentCharge; - } - (TileEntity.ByID[entityID] as TEDraedonItemCharger).ActiveTimer = reader.ReadInt32(); - (TileEntity.ByID[entityID] as TEDraedonItemCharger).DepositWithdrawCooldown = reader.ReadInt32(); - break; - case CalamityModMessageType.DraedonFieldGeneratorSync: - int entityID2 = reader.ReadInt32(); - (TileEntity.ByID[entityID2] as TEDraedonFieldGenerator).Time = reader.ReadInt32(); - (TileEntity.ByID[entityID2] as TEDraedonFieldGenerator).ActiveTimer = reader.ReadInt32(); - break; - case CalamityModMessageType.SyncCalamityNPCAIArray: - byte npcIndex2 = reader.ReadByte(); - Main.npc[npcIndex2].Calamity().newAI[0] = reader.ReadSingle(); - Main.npc[npcIndex2].Calamity().newAI[1] = reader.ReadSingle(); - Main.npc[npcIndex2].Calamity().newAI[2] = reader.ReadSingle(); - Main.npc[npcIndex2].Calamity().newAI[3] = reader.ReadSingle(); - break; - case CalamityModMessageType.ProvidenceDyeConditionSync: - byte npcIndex3 = reader.ReadByte(); - (Main.npc[npcIndex3].modNPC as Providence).hasTakenDaytimeDamage = reader.ReadBoolean(); - break; - case CalamityModMessageType.PSCChallengeSync: - byte npcIndex4 = reader.ReadByte(); - (Main.npc[npcIndex4].modNPC as Providence).challenge = reader.ReadBoolean(); - break; - - default: - Logger.Error($"Failed to parse Calamity packet: No Calamity packet exists with ID {msgType}."); - break; - } - } - catch(Exception e) - { - if (e is EndOfStreamException eose) - Logger.Error("Failed to parse Calamity packet: Packet was too short, missing data, or otherwise corrupt.", eose); - else if (e is ObjectDisposedException ode) - Logger.Error("Failed to parse Calamity packet: Packet reader disposed or destroyed.", ode); - else if (e is IOException ioe) - Logger.Error("Failed to parse Calamity packet: An unknown I/O error occurred.", ioe); - else - throw e; // this either will crash the game or be caught by TML's packet policing - } + CalamityNetcode.HandlePacket(reader, whoAmI); } #endregion @@ -4161,19 +1476,9 @@ namespace CalamityMod if (!Main.raining) return; Main.raining = false; - UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } #endregion - - #region Update Server Boolean - public static void UpdateServerBoolean() - { - if (Main.netMode == NetmodeID.Server) - { - NetMessage.SendData(MessageID.WorldData, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); - } - } - #endregion } public enum Season : byte @@ -4183,49 +1488,4 @@ namespace CalamityMod Summer, Fall } - - enum CalamityModMessageType : byte - { - MeleeLevelSync, - RangedLevelSync, - MagicLevelSync, - SummonLevelSync, - RogueLevelSync, - ExactMeleeLevelSync, - ExactRangedLevelSync, - ExactMagicLevelSync, - ExactSummonLevelSync, - ExactRogueLevelSync, - StressSync, - AdrenalineSync, - TeleportPlayer, - BossRushStage, - DoGCountdownSync, - BossSpawnCountdownSync, - BRHostileProjKillSync, - ArmoredDiggerCountdownSync, - BossTypeSync, - DeathCountSync, - RevengeanceBoolSync, - DeathBoolSync, - DefiledBoolSync, - IronHeartBoolSync, - ArmageddonBoolSync, - DemonTrophyBoolSync, - NPCRegenerationSync, - DeathModeUnderworldTimeSync, - DeathModeBlizzardTimeSync, - DeathBossSpawnCountdownSync, - AcidRainSync, - AcidRainUIDrawFadeSync, - AcidRainOldDukeSummonSync, - GaelsGreatswordSwingSync, - SpawnSuperDummy, - SyncCalamityNPCAIArray, - ProvidenceDyeConditionSync, // We shouldn't fucking need this. Die in a hole, Multiplayer. - PSCChallengeSync, // See above - DraedonGeneratorStackSync, - DraedonChargerSync, - DraedonFieldGeneratorSync - } } diff --git a/CalamityNetcode.cs b/CalamityNetcode.cs new file mode 100644 index 0000000000..10b3880ab6 --- /dev/null +++ b/CalamityNetcode.cs @@ -0,0 +1,259 @@ +using CalamityMod.Events; +using CalamityMod.NPCs.NormalNPCs; +using CalamityMod.NPCs.Providence; +using CalamityMod.TileEntities; +using CalamityMod.World; +using System; +using System.IO; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod +{ + public class CalamityNetcode + { + public static void HandlePacket(BinaryReader reader, int whoAmI) + { + try + { + CalamityModMessageType msgType = (CalamityModMessageType)reader.ReadByte(); + switch (msgType) + { + case CalamityModMessageType.MeleeLevelSync: + Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 0); + break; + case CalamityModMessageType.RangedLevelSync: + Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 1); + break; + case CalamityModMessageType.MagicLevelSync: + Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 2); + break; + case CalamityModMessageType.SummonLevelSync: + Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 3); + break; + case CalamityModMessageType.RogueLevelSync: + Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 4); + break; + case CalamityModMessageType.ExactMeleeLevelSync: + Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 0); + break; + case CalamityModMessageType.ExactRangedLevelSync: + Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 1); + break; + case CalamityModMessageType.ExactMagicLevelSync: + Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 2); + break; + case CalamityModMessageType.ExactSummonLevelSync: + Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 3); + break; + case CalamityModMessageType.ExactRogueLevelSync: + Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 4); + break; + case CalamityModMessageType.StressSync: + Main.player[reader.ReadInt32()].Calamity().HandleStress(reader); + break; + case CalamityModMessageType.BossRushStage: + int stage = reader.ReadInt32(); + BossRushEvent.BossRushStage = stage; + break; + case CalamityModMessageType.AdrenalineSync: + Main.player[reader.ReadInt32()].Calamity().HandleAdrenaline(reader); + break; + case CalamityModMessageType.TeleportPlayer: + Main.player[reader.ReadInt32()].Calamity().HandleTeleport(reader.ReadInt32(), true, whoAmI); + break; + case CalamityModMessageType.DoGCountdownSync: + int countdown = reader.ReadInt32(); + CalamityWorld.DoGSecondStageCountdown = countdown; + break; + case CalamityModMessageType.BossSpawnCountdownSync: + int countdown2 = reader.ReadInt32(); + CalamityWorld.bossSpawnCountdown = countdown2; + break; + case CalamityModMessageType.BRHostileProjKillSync: + int countdown3 = reader.ReadInt32(); + CalamityWorld.bossRushHostileProjKillCounter = countdown3; + break; + case CalamityModMessageType.DeathBossSpawnCountdownSync: + int countdown4 = reader.ReadInt32(); + CalamityWorld.deathBossSpawnCooldown = countdown4; + break; + case CalamityModMessageType.ArmoredDiggerCountdownSync: + int countdown5 = reader.ReadInt32(); + CalamityWorld.ArmoredDiggerSpawnCooldown = countdown5; + break; + case CalamityModMessageType.BossTypeSync: + int type = reader.ReadInt32(); + CalamityWorld.bossType = type; + break; + case CalamityModMessageType.DeathCountSync: + Main.player[reader.ReadInt32()].Calamity().HandleDeathCount(reader); + break; + case CalamityModMessageType.DeathModeUnderworldTimeSync: + Main.player[reader.ReadInt32()].Calamity().HandleDeathModeUnderworldTime(reader); + break; + case CalamityModMessageType.DeathModeBlizzardTimeSync: + Main.player[reader.ReadInt32()].Calamity().HandleDeathModeBlizzardTime(reader); + break; + case CalamityModMessageType.RevengeanceBoolSync: + bool revActive = reader.ReadBoolean(); + CalamityWorld.revenge = revActive; + break; + case CalamityModMessageType.DeathBoolSync: + bool deathActive = reader.ReadBoolean(); + CalamityWorld.death = deathActive; + break; + case CalamityModMessageType.DefiledBoolSync: + bool defiledActive = reader.ReadBoolean(); + CalamityWorld.defiled = defiledActive; + break; + case CalamityModMessageType.IronHeartBoolSync: + bool ironHeartActive = reader.ReadBoolean(); + CalamityWorld.ironHeart = ironHeartActive; + break; + case CalamityModMessageType.ArmageddonBoolSync: + bool armaActive = reader.ReadBoolean(); + CalamityWorld.armageddon = armaActive; + break; + case CalamityModMessageType.DemonTrophyBoolSync: + bool demonModeBoost = reader.ReadBoolean(); + CalamityWorld.demonMode = demonModeBoost; + break; + case CalamityModMessageType.NPCRegenerationSync: + byte npcIndex = reader.ReadByte(); + Main.npc[npcIndex].lifeRegen = reader.ReadInt32(); + break; + case CalamityModMessageType.AcidRainSync: + CalamityWorld.rainingAcid = reader.ReadBoolean(); + CalamityWorld.acidRainPoints = reader.ReadInt32(); + CalamityWorld.timeSinceAcidRainKill = reader.ReadInt32(); + break; + case CalamityModMessageType.AcidRainUIDrawFadeSync: + CalamityWorld.acidRainExtraDrawTime = reader.ReadInt32(); + break; + case CalamityModMessageType.AcidRainOldDukeSummonSync: + CalamityWorld.triedToSummonOldDuke = reader.ReadBoolean(); + break; + case CalamityModMessageType.GaelsGreatswordSwingSync: + byte playerIndex = reader.ReadByte(); + Main.player[playerIndex].Calamity().gaelSwipes = reader.ReadInt32(); + break; + case CalamityModMessageType.SpawnSuperDummy: + int x = reader.ReadInt32(); + int y = reader.ReadInt32(); + // Not strictly necessary, but helps prevent unnecessary packetstorm in MP + if (Main.netMode != NetmodeID.MultiplayerClient) + NPC.NewNPC(x, y, ModContent.NPCType()); + break; + case CalamityModMessageType.DraedonGeneratorStackSync: + (TileEntity.ByID[reader.ReadInt32()] as TEDraedonFuelFactory).HeldItem.stack = reader.ReadInt32(); + break; + case CalamityModMessageType.DraedonChargerSync: + int entityID = reader.ReadInt32(); + (TileEntity.ByID[entityID] as TEDraedonItemCharger).FuelItem.type = reader.ReadInt32(); + (TileEntity.ByID[entityID] as TEDraedonItemCharger).FuelItem.stack = reader.ReadInt32(); + (TileEntity.ByID[entityID] as TEDraedonItemCharger).FuelItem.position = reader.ReadVector2(); + (TileEntity.ByID[entityID] as TEDraedonItemCharger).ItemBeingCharged.type = reader.ReadInt32(); + (TileEntity.ByID[entityID] as TEDraedonItemCharger).ItemBeingCharged.stack = reader.ReadInt32(); + (TileEntity.ByID[entityID] as TEDraedonItemCharger).ItemBeingCharged.prefix = reader.ReadByte(); + (TileEntity.ByID[entityID] as TEDraedonItemCharger).ItemBeingCharged.position = reader.ReadVector2(); + int currentCharge = reader.ReadInt32(); + if (currentCharge != -1) + { + (TileEntity.ByID[entityID] as TEDraedonItemCharger).ItemBeingCharged.Calamity().CurrentCharge = currentCharge; + } + (TileEntity.ByID[entityID] as TEDraedonItemCharger).ActiveTimer = reader.ReadInt32(); + (TileEntity.ByID[entityID] as TEDraedonItemCharger).DepositWithdrawCooldown = reader.ReadInt32(); + break; + case CalamityModMessageType.DraedonFieldGeneratorSync: + int entityID2 = reader.ReadInt32(); + (TileEntity.ByID[entityID2] as TEDraedonFieldGenerator).Time = reader.ReadInt32(); + (TileEntity.ByID[entityID2] as TEDraedonFieldGenerator).ActiveTimer = reader.ReadInt32(); + break; + case CalamityModMessageType.SyncCalamityNPCAIArray: + byte npcIndex2 = reader.ReadByte(); + Main.npc[npcIndex2].Calamity().newAI[0] = reader.ReadSingle(); + Main.npc[npcIndex2].Calamity().newAI[1] = reader.ReadSingle(); + Main.npc[npcIndex2].Calamity().newAI[2] = reader.ReadSingle(); + Main.npc[npcIndex2].Calamity().newAI[3] = reader.ReadSingle(); + break; + case CalamityModMessageType.ProvidenceDyeConditionSync: + byte npcIndex3 = reader.ReadByte(); + (Main.npc[npcIndex3].modNPC as Providence).hasTakenDaytimeDamage = reader.ReadBoolean(); + break; + case CalamityModMessageType.PSCChallengeSync: + byte npcIndex4 = reader.ReadByte(); + (Main.npc[npcIndex4].modNPC as Providence).challenge = reader.ReadBoolean(); + break; + default: + CalamityMod.Instance.Logger.Error($"Failed to parse Calamity packet: No Calamity packet exists with ID {msgType}."); + break; + } + } + catch (Exception e) + { + if (e is EndOfStreamException eose) + CalamityMod.Instance.Logger.Error("Failed to parse Calamity packet: Packet was too short, missing data, or otherwise corrupt.", eose); + else if (e is ObjectDisposedException ode) + CalamityMod.Instance.Logger.Error("Failed to parse Calamity packet: Packet reader disposed or destroyed.", ode); + else if (e is IOException ioe) + CalamityMod.Instance.Logger.Error("Failed to parse Calamity packet: An unknown I/O error occurred.", ioe); + else + throw e; // this either will crash the game or be caught by TML's packet policing + } + } + + public static void SyncWorld() + { + if (Main.netMode == NetmodeID.Server) + NetMessage.SendData(MessageID.WorldData); + } + } + + public enum CalamityModMessageType : byte + { + MeleeLevelSync, + RangedLevelSync, + MagicLevelSync, + SummonLevelSync, + RogueLevelSync, + ExactMeleeLevelSync, + ExactRangedLevelSync, + ExactMagicLevelSync, + ExactSummonLevelSync, + ExactRogueLevelSync, + StressSync, + AdrenalineSync, + TeleportPlayer, + BossRushStage, + DoGCountdownSync, + BossSpawnCountdownSync, + BRHostileProjKillSync, + ArmoredDiggerCountdownSync, + BossTypeSync, + DeathCountSync, + RevengeanceBoolSync, + DeathBoolSync, + DefiledBoolSync, + IronHeartBoolSync, + ArmageddonBoolSync, + DemonTrophyBoolSync, + NPCRegenerationSync, + DeathModeUnderworldTimeSync, + DeathModeBlizzardTimeSync, + DeathBossSpawnCountdownSync, + AcidRainSync, + AcidRainUIDrawFadeSync, + AcidRainOldDukeSummonSync, + GaelsGreatswordSwingSync, + SpawnSuperDummy, + SyncCalamityNPCAIArray, + ProvidenceDyeConditionSync, // We shouldn't fucking need this. Die in a hole, Multiplayer. + PSCChallengeSync, // See above + DraedonGeneratorStackSync, + DraedonChargerSync, + DraedonFieldGeneratorSync + } +} diff --git a/Events/AcidRainEvent.cs b/Events/AcidRainEvent.cs index 97a98cac14..ac97d5b1ee 100644 --- a/Events/AcidRainEvent.cs +++ b/Events/AcidRainEvent.cs @@ -176,7 +176,7 @@ namespace CalamityMod.Events Main.rainTime = Main.weatherCounter; Main.maxRaining = 0.89f; CalamityWorld.forcedDownpourWithTear = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } CalamityWorld.triedToSummonOldDuke = false; CalamityWorld.timeSinceAcidRainKill = 0; // Reset the kill cooldown, just in case. @@ -214,7 +214,7 @@ namespace CalamityMod.Events CalamityWorld.triedToSummonOldDuke = false; CalamityMod.StopRain(); } - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); // You will be tempted to turn this into a single if conditional. // Don't do this. Doing so has caused so much misery, with various things being read instead diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs index b64f5cdb9a..ff56429aed 100644 --- a/Events/BossRushEvent.cs +++ b/Events/BossRushEvent.cs @@ -269,7 +269,7 @@ namespace CalamityMod.Events CalamityWorld.bossRushHostileProjKillCounter = 3; BossRushActive = false; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); if (Main.netMode == NetmodeID.Server) { var netMessage = CalamityMod.Instance.GetPacket(); diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 7b593e6f11..cb050a001e 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -113,32 +113,32 @@ namespace CalamityMod.Items if (item.type >= ItemID.GreenSolution && item.type <= ItemID.RedSolution) item.value = Item.buyPrice(0, 0, 5, 0); - if (CalamityMod.weaponAutoreuseList?.Contains(item.type) ?? false) + if (CalamityLists.weaponAutoreuseList?.Contains(item.type) ?? false) item.autoReuse = true; if (item.type == ItemID.PsychoKnife || item.type == ItemID.TaxCollectorsStickOfDoom) item.damage *= 4; else if (item.type == ItemID.SpectreStaff) item.damage *= 3; - else if (CalamityMod.doubleDamageBuffList?.Contains(item.type) ?? false) + else if (CalamityLists.doubleDamageBuffList?.Contains(item.type) ?? false) item.damage *= 2; else if (item.type == ItemID.RainbowRod) item.damage = (int)(item.damage * 1.75); - else if (CalamityMod.sixtySixDamageBuffList?.Contains(item.type) ?? false) + else if (CalamityLists.sixtySixDamageBuffList?.Contains(item.type) ?? false) item.damage = (int)(item.damage * 1.66); - else if (CalamityMod.fiftyDamageBuffList?.Contains(item.type) ?? false) + else if (CalamityLists.fiftyDamageBuffList?.Contains(item.type) ?? false) item.damage = (int)(item.damage * 1.5); - else if (CalamityMod.thirtyThreeDamageBuffList?.Contains(item.type) ?? false) + else if (CalamityLists.thirtyThreeDamageBuffList?.Contains(item.type) ?? false) item.damage = (int)(item.damage * 1.33); - else if (CalamityMod.twentyFiveDamageBuffList?.Contains(item.type) ?? false) + else if (CalamityLists.twentyFiveDamageBuffList?.Contains(item.type) ?? false) item.damage = (int)(item.damage * 1.25); - else if (CalamityMod.twentyDamageBuffList?.Contains(item.type) ?? false) + else if (CalamityLists.twentyDamageBuffList?.Contains(item.type) ?? false) item.damage = (int)(item.damage * 1.2); - else if (CalamityMod.tenDamageBuffList?.Contains(item.type) ?? false) + else if (CalamityLists.tenDamageBuffList?.Contains(item.type) ?? false) item.damage = (int)(item.damage * 1.1); - else if (CalamityMod.tenDamageNerfList?.Contains(item.type) ?? false) + else if (CalamityLists.tenDamageNerfList?.Contains(item.type) ?? false) item.damage = (int)(item.damage * 0.9); - else if (CalamityMod.quarterDamageNerfList?.Contains(item.type) ?? false) + else if (CalamityLists.quarterDamageNerfList?.Contains(item.type) ?? false) item.damage = (int)(item.damage * 0.75); else if (item.type == ItemID.BlizzardStaff) item.damage = (int)(item.damage * 0.7); @@ -174,9 +174,9 @@ namespace CalamityMod.Items else if (item.type == ItemID.HallowedGreaves) item.defense = 13; //2 more defense - if (CalamityMod.noGravityList.Contains(item.type)) + if (CalamityLists.noGravityList.Contains(item.type)) ItemID.Sets.ItemNoGravity[item.type] = true; - if (CalamityMod.lavaFishList.Contains(item.type)) + if (CalamityLists.lavaFishList.Contains(item.type)) ItemID.Sets.CanFishInLava[item.type] = true; // not expert because ML drops it in normal so that it can be used with the lore item @@ -3607,7 +3607,7 @@ Grants immunity to fire blocks, and temporary immunity to lava"; #region PostUpdate public override void PostUpdate(Item item) { - if (CalamityMod.forceItemList?.Contains(item.type) ?? false) + if (CalamityLists.forceItemList?.Contains(item.type) ?? false) { CalamityUtils.ForceItemIntoWorld(item); } diff --git a/Items/DifficultyItems/Armageddon.cs b/Items/DifficultyItems/Armageddon.cs index 455c10bad7..de5c60231d 100644 --- a/Items/DifficultyItems/Armageddon.cs +++ b/Items/DifficultyItems/Armageddon.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Items.DifficultyItems NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); if (Main.netMode == NetmodeID.Server) { diff --git a/Items/DifficultyItems/Death.cs b/Items/DifficultyItems/Death.cs index 9bc5faffd4..b813d8e74f 100644 --- a/Items/DifficultyItems/Death.cs +++ b/Items/DifficultyItems/Death.cs @@ -92,7 +92,7 @@ namespace CalamityMod.Items.DifficultyItems } CalamityWorld.DoGSecondStageCountdown = 0; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); if (Main.netMode == NetmodeID.Server) { diff --git a/Items/DifficultyItems/DefiledRune.cs b/Items/DifficultyItems/DefiledRune.cs index 1a4c27b178..f60de5cf99 100644 --- a/Items/DifficultyItems/DefiledRune.cs +++ b/Items/DifficultyItems/DefiledRune.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Items.DifficultyItems } CalamityWorld.DoGSecondStageCountdown = 0; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); if (Main.netMode == NetmodeID.Server) { diff --git a/Items/DifficultyItems/IronHeart.cs b/Items/DifficultyItems/IronHeart.cs index 10704165c4..406b7bb3a0 100644 --- a/Items/DifficultyItems/IronHeart.cs +++ b/Items/DifficultyItems/IronHeart.cs @@ -75,7 +75,7 @@ namespace CalamityMod.Items.DifficultyItems } CalamityWorld.DoGSecondStageCountdown = 0; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); if (Main.netMode == NetmodeID.Server) { diff --git a/Items/DifficultyItems/MLGRune.cs b/Items/DifficultyItems/MLGRune.cs index 2903b8fa98..33fa3eb0e1 100644 --- a/Items/DifficultyItems/MLGRune.cs +++ b/Items/DifficultyItems/MLGRune.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.DifficultyItems public override bool UseItem(Player player) { CalamityWorld.demonMode = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); if (Main.netMode == NetmodeID.Server) { var netMessage = mod.GetPacket(); diff --git a/Items/DifficultyItems/Revenge.cs b/Items/DifficultyItems/Revenge.cs index 74b86d79ac..5f1623d972 100644 --- a/Items/DifficultyItems/Revenge.cs +++ b/Items/DifficultyItems/Revenge.cs @@ -89,7 +89,7 @@ namespace CalamityMod.Items.DifficultyItems NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } else { @@ -135,7 +135,7 @@ namespace CalamityMod.Items.DifficultyItems } CalamityWorld.DoGSecondStageCountdown = 0; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); if (Main.netMode == NetmodeID.Server) { var netMessage = mod.GetPacket(); diff --git a/Items/SummonItems/BossRush.cs b/Items/SummonItems/BossRush.cs index bf0a419b58..b2a0bcc354 100644 --- a/Items/SummonItems/BossRush.cs +++ b/Items/SummonItems/BossRush.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Items.SummonItems BossRushEvent.BossRushActive = false; } - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); if (Main.netMode == NetmodeID.Server) { var netMessage = mod.GetPacket(); diff --git a/Items/SummonItems/DraedonsRemote.cs b/Items/SummonItems/DraedonsRemote.cs index f7a89a685d..fe73a1f405 100644 --- a/Items/SummonItems/DraedonsRemote.cs +++ b/Items/SummonItems/DraedonsRemote.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.SummonItems public override bool UseItem(Player player) { CalamityGlobalNPC.DraedonMayhem = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); Main.PlaySound(SoundID.Roar, player.position, 0); if (Main.netMode != NetmodeID.MultiplayerClient) { diff --git a/Items/SummonItems/Invasion/CausticTear.cs b/Items/SummonItems/Invasion/CausticTear.cs index 202d462474..d5cefa2069 100644 --- a/Items/SummonItems/Invasion/CausticTear.cs +++ b/Items/SummonItems/Invasion/CausticTear.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.SummonItems.Invasion public override bool UseItem(Player player) { - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); AcidRainEvent.TryStartEvent(true); return true; } diff --git a/Items/Tools/ClimateChange/BloodIdol.cs b/Items/Tools/ClimateChange/BloodIdol.cs index b5b4c84743..58755b505b 100644 --- a/Items/Tools/ClimateChange/BloodIdol.cs +++ b/Items/Tools/ClimateChange/BloodIdol.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Tools.ClimateChange public override bool UseItem(Player player) { Main.bloodMoon = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); return true; } diff --git a/Items/Tools/ClimateChange/Cosmolight.cs b/Items/Tools/ClimateChange/Cosmolight.cs index 681306c541..151e082cd8 100644 --- a/Items/Tools/ClimateChange/Cosmolight.cs +++ b/Items/Tools/ClimateChange/Cosmolight.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Tools.ClimateChange Main.moonPhase = 0; } } - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } return true; } diff --git a/Items/Tools/ClimateChange/Daylight.cs b/Items/Tools/ClimateChange/Daylight.cs index d9e280c78e..e6ef855e7a 100644 --- a/Items/Tools/ClimateChange/Daylight.cs +++ b/Items/Tools/ClimateChange/Daylight.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Tools.ClimateChange if (Main.netMode != NetmodeID.MultiplayerClient) { Main.dayTime = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } return true; } diff --git a/Items/Tools/ClimateChange/Moonlight.cs b/Items/Tools/ClimateChange/Moonlight.cs index d5afd2cab2..a265025112 100644 --- a/Items/Tools/ClimateChange/Moonlight.cs +++ b/Items/Tools/ClimateChange/Moonlight.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Tools.ClimateChange if (Main.netMode != NetmodeID.MultiplayerClient) { Main.dayTime = false; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } return true; } diff --git a/Items/Tools/ClimateChange/TorrentialTear.cs b/Items/Tools/ClimateChange/TorrentialTear.cs index a23a70fef2..111b96d499 100644 --- a/Items/Tools/ClimateChange/TorrentialTear.cs +++ b/Items/Tools/ClimateChange/TorrentialTear.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Tools.ClimateChange Main.raining = false; } - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); return true; } diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 4ff1258a50..1081595c08 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -211,7 +211,7 @@ namespace CalamityMod.NPCs.AquaticScourge // Mark Aquatic Scourge as dead CalamityWorld.downedAquaticScourge = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index 5e04094fc7..cc65966fa8 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -397,7 +397,7 @@ namespace CalamityMod.NPCs.AstrumAureus // Mark Astrum Aureus as dead CalamityWorld.downedAstrageldon = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs index 0e01c811ab..8e90aabfba 100644 --- a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs @@ -262,7 +262,7 @@ namespace CalamityMod.NPCs.AstrumDeus // Mark Astrum Deus as dead CalamityWorld.downedStarGod = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override void OnHitPlayer(Player player, int damage, bool crit) diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index 0b3efc7af4..dc32b734b9 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -217,7 +217,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental // mark brimmy as dead CalamityWorld.downedBrimstoneElemental = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) diff --git a/NPCs/Bumblebirb/Bumblefuck.cs b/NPCs/Bumblebirb/Bumblefuck.cs index 30bcf8a8f9..656766f5f8 100644 --- a/NPCs/Bumblebirb/Bumblefuck.cs +++ b/NPCs/Bumblebirb/Bumblefuck.cs @@ -441,7 +441,7 @@ namespace CalamityMod.NPCs.Bumblebirb // Mark The Dragonfolly as dead CalamityWorld.downedBumble = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) diff --git a/NPCs/Calamitas/CalamitasRun3.cs b/NPCs/Calamitas/CalamitasRun3.cs index 57058fe5c1..dd0981fe8d 100644 --- a/NPCs/Calamitas/CalamitasRun3.cs +++ b/NPCs/Calamitas/CalamitasRun3.cs @@ -222,7 +222,7 @@ namespace CalamityMod.NPCs.Calamitas // Mark Calamitas as dead CalamityWorld.downedCalamitas = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override void BossLoot(ref string name, ref int potionType) diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 02814d0e5c..670776b76d 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -1294,7 +1294,7 @@ namespace CalamityMod.NPCs // Reduce acceleration if target is holding a true melee weapon Item targetSelectedItem = player.inventory[player.selectedItem]; - if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityMod.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) + if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) { num824 *= 0.5f; } @@ -1437,7 +1437,7 @@ namespace CalamityMod.NPCs // Reduce acceleration if target is holding a true melee weapon Item targetSelectedItem = player.inventory[player.selectedItem]; - if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityMod.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) + if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) { num833 *= 0.5f; } diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 5e9aea6623..ef4983c02f 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -3039,14 +3039,14 @@ namespace CalamityMod.NPCs Main.PlaySound(SoundID.NPCHit1, (int)npc.position.X, (int)npc.position.Y); if (Main.netMode != NetmodeID.MultiplayerClient) { - int hornetAmt = CalamityMod.hornetList.Count; + int hornetAmt = CalamityLists.hornetList.Count; int spawnType = Main.rand.Next(210, 212); if (npc.life < npc.lifeMax * 0.66 || death) spawnType = 210; int random = death ? 5 : 6; if (Main.rand.Next(random) == 0) - spawnType = CalamityMod.hornetList[Main.rand.Next(hornetAmt)]; + spawnType = CalamityLists.hornetList[Main.rand.Next(hornetAmt)]; int spawn = NPC.NewNPC((int)vector76.X, (int)vector76.Y, spawnType, 0, 0f, 0f, 0f, 0f, 255); @@ -3054,7 +3054,7 @@ namespace CalamityMod.NPCs Main.npc[spawn].velocity.Normalize(); Main.npc[spawn].velocity *= 5f; - if (!CalamityMod.hornetList.Contains(spawnType)) + if (!CalamityLists.hornetList.Contains(spawnType)) Main.npc[spawn].localAI[0] = 60f; Main.npc[spawn].netUpdate = true; @@ -5096,7 +5096,7 @@ namespace CalamityMod.NPCs num422 = 0.175f; } // Reduce acceleration if target is holding a true melee weapon - if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityMod.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) + if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) { num422 *= 0.5f; } @@ -5206,7 +5206,7 @@ namespace CalamityMod.NPCs num431 = 0.25f; } // Reduce acceleration if target is holding a true melee weapon - if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityMod.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) + if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) { num431 *= 0.5f; } @@ -5628,7 +5628,7 @@ namespace CalamityMod.NPCs // Reduce acceleration if target is holding a true melee weapon Item targetSelectedItem = Main.player[npc.target].inventory[Main.player[npc.target].selectedItem]; - if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityMod.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) + if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) { num400 *= 0.5f; } @@ -5742,7 +5742,7 @@ namespace CalamityMod.NPCs // Reduce acceleration if target is holding a true melee weapon Item targetSelectedItem = Main.player[npc.target].inventory[Main.player[npc.target].selectedItem]; - if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityMod.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) + if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) { num410 *= 0.5f; } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index c5620569aa..ec7c173771 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -713,7 +713,7 @@ namespace CalamityMod.NPCs } // Exo Freeze, Glacial State and Temporal Sadness don't work on bosses or other specific enemies. - if (!npc.boss && !CalamityMod.movementImpairImmuneList.Contains(npc.type)) + if (!npc.boss && !CalamityLists.movementImpairImmuneList.Contains(npc.type)) { if (eFreeze > 0 && !BossRushEvent.BossRushActive) { @@ -857,7 +857,7 @@ namespace CalamityMod.NPCs #region Debuff Immunities private void DebuffImmunities(NPC npc) { - if (CalamityMod.enemyImmunityList.Contains(npc.type) || npc.boss) + if (CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) { npc.buffImmune[BuffType()] = true; npc.buffImmune[BuffType()] = true; @@ -1114,7 +1114,7 @@ namespace CalamityMod.NPCs } } - if (CalamityMod.revengeanceLifeStealExceptionList.Contains(npc.type)) + if (CalamityLists.revengeanceLifeStealExceptionList.Contains(npc.type)) { npc.canGhostHeal = false; } @@ -1163,14 +1163,14 @@ namespace CalamityMod.NPCs if (CalamityWorld.downedDoG) { - if (CalamityMod.pumpkinMoonBuffList.Contains(npc.type)) + if (CalamityLists.pumpkinMoonBuffList.Contains(npc.type)) { npc.lifeMax = (int)(npc.lifeMax * 7.5); npc.damage += 160; npc.life = npc.lifeMax; npc.defDamage = npc.damage; } - else if (CalamityMod.frostMoonBuffList.Contains(npc.type)) + else if (CalamityLists.frostMoonBuffList.Contains(npc.type)) { npc.lifeMax = (int)(npc.lifeMax * 6.0); npc.damage += 160; @@ -1179,7 +1179,7 @@ namespace CalamityMod.NPCs } } - if (CalamityMod.eclipseBuffList.Contains(npc.type) && CalamityWorld.buffedEclipse) + if (CalamityLists.eclipseBuffList.Contains(npc.type) && CalamityWorld.buffedEclipse) { npc.lifeMax = (int)(npc.lifeMax * 32.5); npc.damage += 210; @@ -1189,7 +1189,7 @@ namespace CalamityMod.NPCs if (NPC.downedMoonlord) { - if (CalamityMod.dungeonEnemyBuffList.Contains(npc.type)) + if (CalamityLists.dungeonEnemyBuffList.Contains(npc.type)) { npc.lifeMax = (int)(npc.lifeMax * 2.5); npc.damage += 150; @@ -1201,23 +1201,23 @@ namespace CalamityMod.NPCs if (CalamityWorld.revenge) { double damageMultiplier = 1D; - if (CalamityMod.revengeanceEnemyBuffList25Percent.Contains(npc.type)) + if (CalamityLists.revengeanceEnemyBuffList25Percent.Contains(npc.type)) { damageMultiplier += 0.25; } - else if (CalamityMod.revengeanceEnemyBuffList20Percent.Contains(npc.type)) + else if (CalamityLists.revengeanceEnemyBuffList20Percent.Contains(npc.type)) { damageMultiplier += 0.2; } - else if (CalamityMod.revengeanceEnemyBuffList15Percent.Contains(npc.type)) + else if (CalamityLists.revengeanceEnemyBuffList15Percent.Contains(npc.type)) { damageMultiplier += 0.15; } - else if (CalamityMod.revengeanceEnemyBuffList10Percent.Contains(npc.type)) + else if (CalamityLists.revengeanceEnemyBuffList10Percent.Contains(npc.type)) { damageMultiplier += 0.1; } - else if (CalamityMod.revengeanceEnemyBuffList5Percent.Contains(npc.type)) + else if (CalamityLists.revengeanceEnemyBuffList5Percent.Contains(npc.type)) { damageMultiplier += 0.05; } @@ -1229,7 +1229,7 @@ namespace CalamityMod.NPCs npc.defDamage = npc.damage; } - if ((npc.boss && npc.type != NPCID.MartianSaucerCore && npc.type < NPCID.Count) || CalamityMod.bossHPScaleList.Contains(npc.type)) + if ((npc.boss && npc.type != NPCID.MartianSaucerCore && npc.type < NPCID.Count) || CalamityLists.bossHPScaleList.Contains(npc.type)) { double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); @@ -1316,7 +1316,7 @@ namespace CalamityMod.NPCs return; } - if (((npc.boss || CalamityMod.bossScaleList.Contains(npc.type)) && npc.type < NPCID.Count) || + if (((npc.boss || CalamityLists.bossScaleList.Contains(npc.type)) && npc.type < NPCID.Count) || (npc.modNPC != null && npc.modNPC.mod.Name.Equals("CalamityMod"))) { double scalar; @@ -3170,7 +3170,7 @@ namespace CalamityMod.NPCs npc.type == NPCType() || npc.type == NPCID.DukeFishron || npc.type == NPCID.CultistBoss || npc.type == NPCID.Golem) { CalamityWorld.spawnedHardBoss = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } } @@ -3273,7 +3273,7 @@ namespace CalamityMod.NPCs ladHearts--; // Bosses and any specific other NPCs are completely immune to having their movement impaired. - if (npc.boss || CalamityMod.movementImpairImmuneList.Contains(npc.type)) + if (npc.boss || CalamityLists.movementImpairImmuneList.Contains(npc.type)) return; if (kamiFlu > 0) @@ -4665,7 +4665,7 @@ namespace CalamityMod.NPCs { if (npc.type != NPCID.BrainofCthulhu && (npc.type != NPCID.DukeFishron || npc.ai[0] <= 9f)) { - if (CalamityConfig.Instance.DebuffDisplay && (npc.boss || BossHealthBarManager.MinibossHPBarList.Contains(npc.type) || BossHealthBarManager.OneToMany.ContainsKey(npc.type) || CalamityMod.needsDebuffIconDisplayList.Contains(npc.type))) + if (CalamityConfig.Instance.DebuffDisplay && (npc.boss || BossHealthBarManager.MinibossHPBarList.Contains(npc.type) || BossHealthBarManager.OneToMany.ContainsKey(npc.type) || CalamityLists.needsDebuffIconDisplayList.Contains(npc.type))) { List buffTextureList = new List(); @@ -6261,7 +6261,7 @@ namespace CalamityMod.NPCs if (target.damage > 0 && !target.boss && !target.friendly && !target.dontTakeDamage && target.type != NPCID.MourningWood && target.type != NPCID.Everscream && target.type != NPCID.SantaNK1 && target.type != NPCType() && target.type != NPCType() && target.type != NPCType() && - target.type != NPCType() && target.type != NPCType() && target.type != NPCID.DD2Betsy && !CalamityMod.enemyImmunityList.Contains(target.type) && !AcidRainEvent.AllMinibosses.Contains(target.type)) + target.type != NPCType() && target.type != NPCType() && target.type != NPCID.DD2Betsy && !CalamityLists.enemyImmunityList.Contains(target.type) && !AcidRainEvent.AllMinibosses.Contains(target.type)) { return true; } diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 837e8665d0..5269973cd4 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -300,7 +300,7 @@ namespace CalamityMod.NPCs // Mark Betsy as dead (Vanilla does not keep track of her) CalamityWorld.downedBetsy = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } else if (npc.type == NPCID.DukeFishron) { @@ -539,7 +539,7 @@ namespace CalamityMod.NPCs if (!CalamityPlayer.areThereAnyDamnBosses) { CalamityGlobalNPC.DraedonMayhem = false; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } } @@ -824,31 +824,31 @@ namespace CalamityMod.NPCs } // Every type of demon eye counts for Black Lenses - if (CalamityMod.demonEyeList.Contains(npc.type)) + if (CalamityLists.demonEyeList.Contains(npc.type)) { DropHelper.DropItemChance(npc, ItemID.BlackLens, DropHelper.DefiledDropRateInt); } // Every type of Skeleton counts for the Bone Sword - if (CalamityMod.skeletonList.Contains(npc.type) && npc.type != NPCID.ArmoredSkeleton && npc.type != NPCID.HeavySkeleton && npc.type != NPCID.SkeletonArcher && npc.type != NPCID.GreekSkeleton) + if (CalamityLists.skeletonList.Contains(npc.type) && npc.type != NPCID.ArmoredSkeleton && npc.type != NPCID.HeavySkeleton && npc.type != NPCID.SkeletonArcher && npc.type != NPCID.GreekSkeleton) { DropHelper.DropItemChance(npc, ItemID.BoneSword, DropHelper.DefiledDropRateInt); } // Every type of Angry Bones counts for the Clothier Voodoo Doll - if (CalamityMod.angryBonesList.Contains(npc.type)) + if (CalamityLists.angryBonesList.Contains(npc.type)) { DropHelper.DropItemChance(npc, ItemID.ClothierVoodooDoll, DropHelper.DefiledDropRateInt); } // Every type of hornet AND moss hornet can drop Bezoar - if (CalamityMod.hornetList.Contains(npc.type) || CalamityMod.mossHornetList.Contains(npc.type)) + if (CalamityLists.hornetList.Contains(npc.type) || CalamityLists.mossHornetList.Contains(npc.type)) { DropHelper.DropItemChance(npc, ItemID.Bezoar, DropHelper.DefiledDropRateInt); } // Every type of moss hornet can drop Tattered Bee Wings - if (CalamityMod.mossHornetList.Contains(npc.type)) + if (CalamityLists.mossHornetList.Contains(npc.type)) { DropHelper.DropItemChance(npc, ItemID.TatteredBeeWing, DropHelper.DefiledDropRateInt); } @@ -1265,14 +1265,14 @@ namespace CalamityMod.NPCs } // Every type of Moss Hornet counts for the Needler - if (CalamityMod.mossHornetList.Contains(npc.type)) + if (CalamityLists.mossHornetList.Contains(npc.type)) { int needlerDropRate = Main.expertMode ? 20 : 25; DropHelper.DropItemChance(npc, ModContent.ItemType(), needlerDropRate); } // Every type of Skeleton counts for the Waraxe and Ancient Bone Dust - if (CalamityMod.skeletonList.Contains(npc.type)) + if (CalamityLists.skeletonList.Contains(npc.type)) { DropHelper.DropItemCondition(npc, ModContent.ItemType(), !Main.hardMode, Main.expertMode ? 15 : 20, 1, 1); DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 4 : 5); @@ -1530,13 +1530,13 @@ namespace CalamityMod.NPCs } // All hardmode dungeon enemies drop Ectoblood - if (CalamityMod.dungeonEnemyBuffList.Contains(npc.type)) + if (CalamityLists.dungeonEnemyBuffList.Contains(npc.type)) { DropHelper.DropItemChance(npc, ModContent.ItemType(), 2, 1, Main.expertMode ? 3 : 1); } // Every type of moss hornet can drop stingers - if (CalamityMod.mossHornetList.Contains(npc.type)) + if (CalamityLists.mossHornetList.Contains(npc.type)) { DropHelper.DropItemChance(npc, ItemID.Stinger, Main.expertMode ? 1f : 0.6666f); } @@ -1578,7 +1578,7 @@ namespace CalamityMod.NPCs if (npc.boss && !CalamityWorld.downedBossAny) { CalamityWorld.downedBossAny = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } // Nightmare Fuel, Endothermic Energy and Darksun Fragments @@ -1647,7 +1647,7 @@ namespace CalamityMod.NPCs // Mark a buffed Mothron as killed (allowing access to Yharon P2) CalamityWorld.downedBuffedMothron = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } } #endregion diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index f36190247b..0759329f52 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -175,7 +175,7 @@ namespace CalamityMod.NPCs.CeaselessVoid if (CalamityWorld.DoGSecondStageCountdown <= 0) { CalamityWorld.downedSentinel1 = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } } diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index 860a06ab6d..1dede24943 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -665,7 +665,7 @@ namespace CalamityMod.NPCs.Crabulon // Mark Crabulon as dead CalamityWorld.downedCrabulon = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index af88dd9872..dd53d9f9df 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -1099,7 +1099,7 @@ namespace CalamityMod.NPCs.Cryogen // Mark Cryogen as dead CalamityWorld.downedCryogen = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override void OnHitPlayer(Player player, int damage, bool crit) diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index 08e5960af3..8ea3e1b797 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -531,7 +531,7 @@ namespace CalamityMod.NPCs.DesertScourge // Mark Desert Scourge as dead CalamityWorld.downedDesertScourge = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } #endregion diff --git a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs index b24e756475..ddd51609d9 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs @@ -1062,7 +1062,7 @@ namespace CalamityMod.NPCs.DevourerofGods // Mark DoG as dead CalamityWorld.downedDoG = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } // Can only hit the target if within certain distance diff --git a/NPCs/GreatSandShark/GreatSandShark.cs b/NPCs/GreatSandShark/GreatSandShark.cs index ebc05a0905..48d7565779 100644 --- a/NPCs/GreatSandShark/GreatSandShark.cs +++ b/NPCs/GreatSandShark/GreatSandShark.cs @@ -104,7 +104,7 @@ namespace CalamityMod.NPCs.GreatSandShark if (!Terraria.GameContent.Events.Sandstorm.Happening) { CalamityUtils.StartSandstorm(); - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } if (npc.soundDelay <= 0) { @@ -662,7 +662,7 @@ namespace CalamityMod.NPCs.GreatSandShark // Mark Great Sand Shark as dead CalamityWorld.downedGSS = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) diff --git a/NPCs/HiveMind/HiveMindP2.cs b/NPCs/HiveMind/HiveMindP2.cs index 2b4b086916..dec07d2d16 100644 --- a/NPCs/HiveMind/HiveMindP2.cs +++ b/NPCs/HiveMind/HiveMindP2.cs @@ -778,7 +778,7 @@ namespace CalamityMod.NPCs.HiveMind // Mark The Hive Mind as dead CalamityWorld.downedHiveMind = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override void OnHitPlayer(Player player, int damage, bool crit) diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index c79ffaed57..775703e4bd 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -687,7 +687,7 @@ namespace CalamityMod.NPCs.Leviathan // Mark Siren & Levi as dead CalamityWorld.downedLeviathan = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override void OnHitPlayer(Player target, int damage, bool crit) diff --git a/NPCs/Leviathan/SirenIce.cs b/NPCs/Leviathan/SirenIce.cs index 08761ff5c5..1f55bcf0ec 100644 --- a/NPCs/Leviathan/SirenIce.cs +++ b/NPCs/Leviathan/SirenIce.cs @@ -82,7 +82,7 @@ namespace CalamityMod.NPCs.Leviathan public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x)) + if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x)) { if (projectile.penetrate == -1 && !projectile.minion) { diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index f8fdc35197..9520871f61 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -397,7 +397,7 @@ namespace CalamityMod.NPCs.OldDuke // Mark Old Duke as dead CalamityWorld.downedBoomerDuke = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override bool CanHitPlayer(Player target, ref int cooldownSlot) diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 69bb2c50cb..4740f0467f 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -420,7 +420,7 @@ namespace CalamityMod.NPCs.Perforator // Mark The Perforator Hive as dead CalamityWorld.downedPerforator = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 308eba5e73..6810253762 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -1178,7 +1178,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath // Mark PBG as dead CalamityWorld.downedPlaguebringer = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index bc1f9d4113..32b16523ea 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -883,7 +883,7 @@ namespace CalamityMod.NPCs.Polterghast // Mark Polterghast as dead CalamityWorld.downedPolterghast = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs index da00b55ebe..fa8b1fa79b 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs @@ -441,7 +441,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians // Mark the Profaned Guardians as dead CalamityWorld.downedGuardians = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override void OnHitPlayer(Player player, int damage, bool crit) diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 5766a8ba0a..db5f96f644 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -1335,7 +1335,7 @@ namespace CalamityMod.NPCs.Providence // Mark Providence as dead CalamityWorld.downedProvidence = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } private void SpawnLootBox() diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index d2128db9e8..5755111f17 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -828,7 +828,7 @@ namespace CalamityMod.NPCs.Ravager // Mark Ravager as dead CalamityWorld.downedScavenger = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } } } diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index f3bde3b495..4687285cad 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -787,14 +787,14 @@ namespace CalamityMod.NPCs.Signus // Mark DoG fight sentinels as dead CalamityWorld.downedSecondSentinels = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } // Mark Signus as dead if (CalamityWorld.DoGSecondStageCountdown <= 0) { CalamityWorld.downedSentinel3 = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } } diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 66f4bd1621..37b9512377 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -700,7 +700,7 @@ namespace CalamityMod.NPCs.SlimeGod // Mark the Slime God as dead CalamityWorld.downedSlimeGod = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/StormWeaver/StormWeaverBody.cs b/NPCs/StormWeaver/StormWeaverBody.cs index 948cfc5591..83945302b1 100644 --- a/NPCs/StormWeaver/StormWeaverBody.cs +++ b/NPCs/StormWeaver/StormWeaverBody.cs @@ -185,7 +185,7 @@ namespace CalamityMod.NPCs.StormWeaver public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x)) + if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x)) { if (projectile.penetrate == -1 && !projectile.minion) { diff --git a/NPCs/StormWeaver/StormWeaverHeadNaked.cs b/NPCs/StormWeaver/StormWeaverHeadNaked.cs index 7d73349cdd..70d375b025 100644 --- a/NPCs/StormWeaver/StormWeaverHeadNaked.cs +++ b/NPCs/StormWeaver/StormWeaverHeadNaked.cs @@ -668,7 +668,7 @@ namespace CalamityMod.NPCs.StormWeaver if (CalamityWorld.DoGSecondStageCountdown <= 0) { CalamityWorld.downedSentinel2 = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } } diff --git a/NPCs/SunkenSea/GiantClam.cs b/NPCs/SunkenSea/GiantClam.cs index eeada006ed..65221b1ae4 100644 --- a/NPCs/SunkenSea/GiantClam.cs +++ b/NPCs/SunkenSea/GiantClam.cs @@ -428,7 +428,7 @@ namespace CalamityMod.NPCs.SunkenSea // Mark Giant Clam as dead CalamityWorld.downedCLAM = true; CalamityWorld.downedCLAMHardMode = Main.hardMode || CalamityWorld.downedCLAMHardMode; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } } } diff --git a/NPCs/SupremeCalamitas/SCalWormBody.cs b/NPCs/SupremeCalamitas/SCalWormBody.cs index ea088e97a7..06bdd37cb8 100644 --- a/NPCs/SupremeCalamitas/SCalWormBody.cs +++ b/NPCs/SupremeCalamitas/SCalWormBody.cs @@ -163,7 +163,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x)) + if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x)) { if (projectile.penetrate == -1 && !projectile.minion) { diff --git a/NPCs/SupremeCalamitas/SCalWormBodyWeak.cs b/NPCs/SupremeCalamitas/SCalWormBodyWeak.cs index 5cf7c8e3b7..8d93a0c6c9 100644 --- a/NPCs/SupremeCalamitas/SCalWormBodyWeak.cs +++ b/NPCs/SupremeCalamitas/SCalWormBodyWeak.cs @@ -174,7 +174,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x)) + if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x)) { if (projectile.penetrate == -1 && !projectile.minion) { diff --git a/NPCs/SupremeCalamitas/SCalWormHead.cs b/NPCs/SupremeCalamitas/SCalWormHead.cs index 1c570f4c68..9f376a84ce 100644 --- a/NPCs/SupremeCalamitas/SCalWormHead.cs +++ b/NPCs/SupremeCalamitas/SCalWormHead.cs @@ -318,7 +318,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x)) + if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x)) { if (projectile.penetrate == -1 && !projectile.minion) { diff --git a/NPCs/SupremeCalamitas/SCalWormTail.cs b/NPCs/SupremeCalamitas/SCalWormTail.cs index 69f76be65e..bc04772d16 100644 --- a/NPCs/SupremeCalamitas/SCalWormTail.cs +++ b/NPCs/SupremeCalamitas/SCalWormTail.cs @@ -182,7 +182,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x)) + if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x)) { if (projectile.penetrate == -1 && !projectile.minion) { diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index f909be340e..fe62093f31 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -223,7 +223,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (Main.slimeRain) { Main.StopSlimeRain(true); - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } CalamityMod.StopRain(); @@ -1259,7 +1259,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas // Reduce acceleration if target is holding a true melee weapon Item targetSelectedItem = player.inventory[player.selectedItem]; - if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityMod.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) + if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) { num824 *= 0.5f; } @@ -1446,7 +1446,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas // Reduce acceleration if target is holding a true melee weapon Item targetSelectedItem = player.inventory[player.selectedItem]; - if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityMod.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) + if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) { num413 *= 0.5f; } @@ -1539,7 +1539,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas // Reduce acceleration if target is holding a true melee weapon Item targetSelectedItem = player.inventory[player.selectedItem]; - if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityMod.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) + if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) { num833 *= 0.5f; } @@ -1803,7 +1803,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas // Reduce acceleration if target is holding a true melee weapon Item targetSelectedItem = player.inventory[player.selectedItem]; - if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityMod.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) + if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) { num824 *= 0.5f; } @@ -1987,7 +1987,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas // Reduce acceleration if target is holding a true melee weapon Item targetSelectedItem = player.inventory[player.selectedItem]; - if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityMod.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) + if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) { num413 *= 0.5f; } @@ -2080,7 +2080,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas // Reduce acceleration if target is holding a true melee weapon Item targetSelectedItem = player.inventory[player.selectedItem]; - if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityMod.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) + if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) { num833 *= 0.5f; } @@ -2237,7 +2237,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas // Mark Supreme Calamitas as dead CalamityWorld.downedSCal = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } #endregion diff --git a/NPCs/SupremeCalamitas/SupremeCataclysm.cs b/NPCs/SupremeCalamitas/SupremeCataclysm.cs index 96afbf5f59..430eeb1785 100644 --- a/NPCs/SupremeCalamitas/SupremeCataclysm.cs +++ b/NPCs/SupremeCalamitas/SupremeCataclysm.cs @@ -85,7 +85,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas // Reduce acceleration if target is holding a true melee weapon Item targetSelectedItem = Main.player[npc.target].inventory[Main.player[npc.target].selectedItem]; - if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityMod.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) + if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) { num677 *= 0.5f; } diff --git a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs index d895ac72bd..1640fea478 100644 --- a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs +++ b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs @@ -85,7 +85,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas // Reduce acceleration if target is holding a true melee weapon Item targetSelectedItem = Main.player[npc.target].inventory[Main.player[npc.target].selectedItem]; - if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityMod.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) + if (targetSelectedItem.melee && (targetSelectedItem.shoot == 0 || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot))) { num677 *= 0.5f; } diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index fe0bbf43e4..1e7e133c07 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -197,7 +197,7 @@ namespace CalamityMod.NPCs.TownNPCs dialogue.Add("If I was a magical horse, I'd be out in space swirling cocktails, as I watch space worms battle for my enjoyment."); } - IList donorList = new List(CalamityMod.donatorList); + IList donorList = new List(CalamityLists.donatorList); string[] donors = new string[12]; for (int i = 0; i < 12; i++) { diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index d7b43f5d9b..cfbc0e0f45 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -207,7 +207,7 @@ namespace CalamityMod.NPCs.TownNPCs case 1: return "Hey, if government officials can get tax, why can't I? The heck do you mean that these two things are nothing alike?"; } - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } return "Sorry, I got nothing. Perhaps you could reforge something and come back later..."; } diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index cb92d65610..194c072c06 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -2791,7 +2791,7 @@ namespace CalamityMod.NPCs.Yharon if (!startSecondAI && !CalamityWorld.buffedEclipse) { CalamityWorld.buffedEclipse = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); string key = "Mods.CalamityMod.DargonBossText"; Color messageColor = Color.Orange; @@ -2861,7 +2861,7 @@ namespace CalamityMod.NPCs.Yharon // Mark Yharon as dead CalamityWorld.downedYharon = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 95303d8a2e..448dc6c6ff 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles #region SetDefaults public override void SetDefaults(Projectile projectile) { - if (CalamityMod.trueMeleeProjectileList.Contains(projectile.type)) + if (CalamityLists.trueMeleeProjectileList.Contains(projectile.type)) trueMelee = true; switch (projectile.type) @@ -686,7 +686,7 @@ namespace CalamityMod.Projectiles if (NPC.downedMoonlord) { - if (CalamityMod.dungeonProjectileBuffList.Contains(projectile.type)) + if (CalamityLists.dungeonProjectileBuffList.Contains(projectile.type)) { //Prevents them being buffed in Skeletron, Skeletron Prime, or Golem fights if (((projectile.type == ProjectileID.RocketSkeleton || projectile.type == ProjectileID.Shadowflames) && projectile.ai[1] == 1f) || @@ -701,12 +701,12 @@ namespace CalamityMod.Projectiles if (CalamityWorld.downedDoG && (Main.pumpkinMoon || Main.snowMoon)) { - if (CalamityMod.eventProjectileBuffList.Contains(projectile.type)) + if (CalamityLists.eventProjectileBuffList.Contains(projectile.type)) projectile.damage = defDamage + 70; } else if (CalamityWorld.buffedEclipse && Main.eclipse) { - if (CalamityMod.eventProjectileBuffList.Contains(projectile.type)) + if (CalamityLists.eventProjectileBuffList.Contains(projectile.type)) projectile.damage = defDamage + 100; } @@ -833,12 +833,12 @@ namespace CalamityMod.Projectiles if (modPlayer.etherealExtorter) { - if (CalamityMod.spikyBallProjList.Contains(projectile.type) && !extorterBoost && Main.moonPhase == 2) //third quarter + if (CalamityLists.spikyBallProjList.Contains(projectile.type) && !extorterBoost && Main.moonPhase == 2) //third quarter { projectile.timeLeft += 300; extorterBoost = true; } - if (CalamityMod.javelinProjList.Contains(projectile.type) && !extorterBoost && player.ZoneCrimson) + if (CalamityLists.javelinProjList.Contains(projectile.type) && !extorterBoost && player.ZoneCrimson) { projectile.knockBack *= 2; extorterBoost = true; @@ -880,7 +880,7 @@ namespace CalamityMod.Projectiles if (!projectile.npcProj && !projectile.trap && projectile.friendly && projectile.damage > 0) { - if (modPlayer.eQuiver && projectile.ranged && CalamityMod.rangedProjectileExceptionList.TrueForAll(x => projectile.type != x)) + if (modPlayer.eQuiver && projectile.ranged && CalamityLists.rangedProjectileExceptionList.TrueForAll(x => projectile.type != x)) { if (Main.rand.Next(200) > 198) { @@ -1745,14 +1745,14 @@ namespace CalamityMod.Projectiles if (modPlayer.shadow && modPlayer.shadowPotCooldown <= 0) { - if (CalamityMod.javelinProjList.Contains(projectile.type)) + if (CalamityLists.javelinProjList.Contains(projectile.type)) { int randrot = Main.rand.Next(-30, 391); Vector2 SoulSpeed = new Vector2(13f, 13f).RotatedBy(MathHelper.ToRadians(randrot)); Projectile.NewProjectile(projectile.Center, SoulSpeed, ModContent.ProjectileType(), CalamityUtils.DamageSoftCap(projectile.damage * 0.1, 60), 3f, projectile.owner, 0f, 0f); modPlayer.shadowPotCooldown = 30; } - if (CalamityMod.spikyBallProjList.Contains(projectile.type)) + if (CalamityLists.spikyBallProjList.Contains(projectile.type)) { int scythe = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), CalamityUtils.DamageSoftCap(projectile.damage * 0.05, 60), 3f, projectile.owner, 0f, 0f); Main.projectile[scythe].usesLocalNPCImmunity = true; @@ -1760,7 +1760,7 @@ namespace CalamityMod.Projectiles Main.projectile[scythe].penetrate = 2; modPlayer.shadowPotCooldown = 30; } - if (CalamityMod.daggerProjList.Contains(projectile.type)) + if (CalamityLists.daggerProjList.Contains(projectile.type)) { Vector2 shardVelocity = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f)); shardVelocity.Normalize(); @@ -1769,7 +1769,7 @@ namespace CalamityMod.Projectiles Main.projectile[shard].timeLeft = 150; modPlayer.shadowPotCooldown = 30; } - if (CalamityMod.boomerangProjList.Contains(projectile.type)) + if (CalamityLists.boomerangProjList.Contains(projectile.type)) { int spiritDamage = CalamityUtils.DamageSoftCap(projectile.damage * 0.2, 60); Projectile ghost = SpawnOrb(projectile, spiritDamage, ProjectileID.SpectreWrath, 800f, 4f); @@ -1777,7 +1777,7 @@ namespace CalamityMod.Projectiles ghost.penetrate = 1; modPlayer.shadowPotCooldown = 30; } - if (CalamityMod.flaskBombProjList.Contains(projectile.type)) + if (CalamityLists.flaskBombProjList.Contains(projectile.type)) { int blackhole = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), CalamityUtils.DamageSoftCap(projectile.damage * 0.05, 60), 3f, projectile.owner, 0f, 0f); Main.projectile[blackhole].Center = projectile.Center; @@ -2084,7 +2084,7 @@ namespace CalamityMod.Projectiles Main.projectile[soul].tileCollide = false; } } - if (modPlayer.scuttlersJewel && CalamityMod.javelinProjList.Contains(projectile.type) && Main.rand.NextBool(3)) + if (modPlayer.scuttlersJewel && CalamityLists.javelinProjList.Contains(projectile.type) && Main.rand.NextBool(3)) { float dmgMult = 1f; if (projectile.type == ProjectileType()) diff --git a/Projectiles/Typeless/YanmeisKnifeSlash.cs b/Projectiles/Typeless/YanmeisKnifeSlash.cs index 599ff27179..b3f49e89d2 100644 --- a/Projectiles/Typeless/YanmeisKnifeSlash.cs +++ b/Projectiles/Typeless/YanmeisKnifeSlash.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Typeless public class YanmeisKnifeSlash : ModProjectile { // This is a rather weird thing, but it's what the patron asked for. - public static readonly Func CanRecieveCoolEffectsFrom = (npc) => npc.boss || CalamityMod.bossMinionList.Contains(npc.type); + public static readonly Func CanRecieveCoolEffectsFrom = (npc) => npc.boss || CalamityLists.bossMinionList.Contains(npc.type); public override void SetStaticDefaults() { DisplayName.SetDefault("Yanmei's Knife"); diff --git a/Tiles/LivingFire/LivingBrimstoneFireBlockTile.cs b/Tiles/LivingFire/LivingBrimstoneFireBlockTile.cs index e7a37e66cc..eb3597f6a3 100644 --- a/Tiles/LivingFire/LivingBrimstoneFireBlockTile.cs +++ b/Tiles/LivingFire/LivingBrimstoneFireBlockTile.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Tiles.LivingFire for (int k = 0; k < around.Count; ++k) { Tile tile = Main.tile[around[k][0], around[k][1]]; - if (tile.active() && (Main.tileSolid[tile.type] || CalamityMod.livingFireBlockList.Contains(tile.type))) + if (tile.active() && (Main.tileSolid[tile.type] || CalamityLists.livingFireBlockList.Contains(tile.type))) { return true; } diff --git a/Tiles/LivingFire/LivingGodSlayerFireBlockTile.cs b/Tiles/LivingFire/LivingGodSlayerFireBlockTile.cs index 039532b093..84d244b13e 100644 --- a/Tiles/LivingFire/LivingGodSlayerFireBlockTile.cs +++ b/Tiles/LivingFire/LivingGodSlayerFireBlockTile.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Tiles.LivingFire for (int k = 0; k < around.Count; ++k) { Tile tile = Main.tile[around[k][0], around[k][1]]; - if (tile.active() && (Main.tileSolid[tile.type] || CalamityMod.livingFireBlockList.Contains(tile.type))) + if (tile.active() && (Main.tileSolid[tile.type] || CalamityLists.livingFireBlockList.Contains(tile.type))) { return true; } diff --git a/Tiles/LivingFire/LivingHolyFireBlockTile.cs b/Tiles/LivingFire/LivingHolyFireBlockTile.cs index 6d334a5e41..0a44490dcc 100644 --- a/Tiles/LivingFire/LivingHolyFireBlockTile.cs +++ b/Tiles/LivingFire/LivingHolyFireBlockTile.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Tiles.LivingFire for (int k = 0; k < around.Count; ++k) { Tile tile = Main.tile[around[k][0], around[k][1]]; - if (tile.active() && (Main.tileSolid[tile.type] || CalamityMod.livingFireBlockList.Contains(tile.type))) + if (tile.active() && (Main.tileSolid[tile.type] || CalamityLists.livingFireBlockList.Contains(tile.type))) { return true; } diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index 59c69081b7..7e9844c6c5 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -57,6 +57,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; +using System.Runtime.Serialization.Formatters.Binary; using System.Text; using Terraria; using Terraria.DataStructures; @@ -806,7 +807,7 @@ namespace CalamityMod public static int CountHookProj() => Main.projectile.Count(proj => Main.projHook[proj.type] && proj.ai[0] == 2f && proj.active && proj.owner == Main.myPlayer); - public static bool IsSummon(this Projectile proj) => proj.minion || proj.sentry || CalamityMod.projectileMinionList.Contains(proj.type) || ProjectileID.Sets.MinionShot[proj.type] || ProjectileID.Sets.SentryShot[proj.type]; + public static bool IsSummon(this Projectile proj) => proj.minion || proj.sentry || CalamityLists.projectileMinionList.Contains(proj.type) || ProjectileID.Sets.MinionShot[proj.type] || ProjectileID.Sets.SentryShot[proj.type]; public static void KillAllHostileProjectiles() { @@ -3647,7 +3648,7 @@ namespace CalamityMod Main.raining = true; if (torrentialTear) TorrentialTear.AdjustRainSeverity(false); - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } public static void StartSandstorm() @@ -3793,13 +3794,59 @@ namespace CalamityMod int num4 = Math.Max(0, Math.Min(tileRectangle.Bottom, Main.maxTilesY)); return new Rectangle(num, num2, num3 - num, num4 - num2); } + #endregion + #region Saving, Loading, and Sending Utilities + + /// + /// Binary serializes an object and returns the resultant byte array buffer. + /// + /// The object that is to be serialized. + /// The buffer. + public static byte[] SerializeObject(object toSerialize) + { + byte[] buffer; + using (var stream = new MemoryStream()) + { + new BinaryFormatter().Serialize(stream, toSerialize); + buffer = stream.ToArray(); + } + return buffer; + } + + /// + /// Deserializes a binary serialized buffer and returns the original object. + /// + /// The buffer. + /// The object that was serialized. + public static object DeserializeObject(byte[] buffer) + { + object deserializedData; + using (var stream = new MemoryStream(buffer)) + { + deserializedData = new BinaryFormatter().Deserialize(stream); + } + return deserializedData; + } + + /// + /// Saves a mod item and appends the data to a . + /// + /// The tag to append to. + /// The item to save. + /// A number used for discerning the item out of multiple items. public static void SaveModItem(TagCompound tag, Item itemToSave, int itemIndex = 0) { tag.Add($"mod{itemIndex}", itemToSave.modItem?.mod?.Name ?? string.Empty); tag.Add($"name{itemIndex}", itemToSave.modItem?.Name ?? string.Empty); } + /// + /// Loads a mod item from a . + /// + /// The tag that contains the original item. + /// The number used to discern the item out of potentially multiple. + /// The original item. public static Item LoadModItem(TagCompound tag, int itemIndex = 0) { string modName = tag.GetString($"mod{itemIndex}"); diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index c9617ec917..eaf9509165 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -1106,7 +1106,7 @@ namespace CalamityMod.World { BossRushEvent.DeactivateStupidFuckingBullshit = true; BossRushEvent.BossRushActive = false; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } // Attempt to start the acid rain at the 4:29AM @@ -1114,7 +1114,7 @@ namespace CalamityMod.World if (Main.time == 32399 && !Main.dayTime && Main.rand.NextBool(moreRain ? 3 : 300) && !Main.LocalPlayer.Calamity().noStupidNaturalARSpawns) { AcidRainEvent.TryStartEvent(); - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } if (NPC.downedBoss1 && !downedEoCAcidRain && !forcedRainAlready) { @@ -1126,7 +1126,7 @@ namespace CalamityMod.World { forcedRainAlready = true; AcidRainEvent.TryStartEvent(); - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } } } @@ -1134,7 +1134,7 @@ namespace CalamityMod.World if (forceRainTimer == 1) { AcidRainEvent.TryStartEvent(); - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } if (forceRainTimer > 0) forceRainTimer--; @@ -1172,7 +1172,7 @@ namespace CalamityMod.World // Makes rain pour at its maximum intensity (but only after an idiot meanders into the Sulphurous Sea) // You'll never catch me, Fabs, Not when I shift into MAXIMUM OVERDRIVE!! startAcidicDownpour = true; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); break; } } @@ -1183,7 +1183,7 @@ namespace CalamityMod.World if (Main.raining && NPC.AnyNPCs(ModContent.NPCType())) { Main.raining = false; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } // If the rain stops for whatever reason, end the invasion. @@ -1986,7 +1986,7 @@ namespace CalamityMod.World { Main.time = 0.0; Main.dayTime = day; - CalamityMod.UpdateServerBoolean(); + CalamityNetcode.SyncWorld(); } #endregion