VeneratedLocketBanList.
This commit is contained in:
1 parent
738ce1a2b1
commit
80c4e66b2b
4 files changed
+41
-33
No files matched your search
@@ -12,7 +12,6 @@ using CalamityMod.CalPlayer.Dashes;
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.FluidSimulation;
|
||||
using CalamityMod.Items;
|
||||
@@ -53,20 +52,16 @@ using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Systems.Collections;
|
||||
using CalamityMod.Waters;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.Liquid;
|
||||
using Terraria.GameInput;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
using Terraria.Utilities.Terraria.Utilities;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.CalPlayer
|
||||
@@ -1158,18 +1153,18 @@ namespace CalamityMod.CalPlayer
|
||||
public bool ZoneRadiantReefs => Player.InModBiome<RadiantReefsBiome>();
|
||||
public bool ZoneGleamingBurrows => Player.InModBiome<GleamingBurrowsBiome>();
|
||||
public bool ZoneBasaltGully => Player.InModBiome<BasaltGullyBiome>();
|
||||
|
||||
|
||||
public bool ZoneSulphur => Player.InModBiome<SulphurousSeaBiome>();
|
||||
public bool ZoneAbyss => ZoneAbyssLayer1 || ZoneAbyssLayer2 || ZoneAbyssLayer3 || ZoneAbyssLayer4;
|
||||
public bool ZoneAbyssLayer1 => Player.InModBiome<AbyssLayer1Biome>();
|
||||
public bool ZoneAbyssLayer2 => Player.InModBiome<AbyssLayer2Biome>();
|
||||
public bool ZoneAbyssLayer3 => Player.InModBiome<AbyssLayer3Biome>();
|
||||
public bool ZoneAbyssLayer4 => Player.InModBiome<AbyssLayer4Biome>();
|
||||
|
||||
|
||||
public bool ZoneFloralParadise => Player.InModBiome<FloralParadiseBiome>();
|
||||
|
||||
|
||||
public bool ZoneCalamity => Player.InModBiome<BrimstoneCragsBiome>();
|
||||
|
||||
|
||||
public bool ZoneAstral => Player.InModBiome<AstralInfectionBiome>() && !ZoneAbyss;
|
||||
|
||||
public bool InAnyCalamityBiome => ZoneAbyss || ZoneCalamity || ZoneFloralParadise || ZoneSulphur || ZoneSunkenSea || ZoneAstral;
|
||||
@@ -4168,7 +4163,7 @@ namespace CalamityMod.CalPlayer
|
||||
var LocketSource = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<VeneratedLocket>()));
|
||||
if (item.CountsAsClass<RogueDamageClass>())
|
||||
{
|
||||
if (!CalamityLists.VeneratedLocketBanlist.Contains(item.type))
|
||||
if (!VeneratedLocketBanList.Includes(item.type))
|
||||
{
|
||||
float veneratedCloneSpeed = item.shootSpeed;
|
||||
Vector2 realPlayerPos = Player.RotatedRelativePoint(Player.MountedCenter, true);
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using CalamityMod.BiomeManagers;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Items.DraedonMisc;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.NPCs.AquaticScourge;
|
||||
using CalamityMod.NPCs.AstrumAureus;
|
||||
using CalamityMod.NPCs.AstrumDeus;
|
||||
@@ -52,8 +51,6 @@ namespace CalamityMod
|
||||
public static List<int> DisabledSummonerNerfItems;
|
||||
public static List<int> DisabledSummonerNerfMinions;
|
||||
|
||||
public static List<int> VeneratedLocketBanlist; //To ban projectiles from locket, mainly spikeballs altho Toasty asked me to add mod calls for adding stuff like Dreamtastic
|
||||
|
||||
/// <summary>
|
||||
/// Each Sunken Sea subbiome has a correspoding spawn condition boolean value and a biome type.
|
||||
/// </summary>
|
||||
@@ -61,10 +58,6 @@ namespace CalamityMod
|
||||
|
||||
public override void OnModLoad()
|
||||
{
|
||||
// Lists of enemies that resist piercing to some extent (mostly worms).
|
||||
// Could prove useful for other things as well.
|
||||
|
||||
|
||||
// Collections
|
||||
BossRushHPChanges = new SortedDictionary<int, int>
|
||||
{
|
||||
@@ -260,18 +253,6 @@ namespace CalamityMod
|
||||
DisabledSummonerNerfItems = new();
|
||||
DisabledSummonerNerfMinions = new();
|
||||
|
||||
VeneratedLocketBanlist = new List<int>()
|
||||
{
|
||||
ItemType<PoisonPack>(),
|
||||
ItemType<SkyStabber>(),
|
||||
ItemType<Nychthemeron>(),
|
||||
ItemType<HellsSun>(),
|
||||
ItemType<GodsParanoia>(),
|
||||
ItemType<SlickCane>(),
|
||||
ItemType<Mycoroot>(),
|
||||
ItemType<CosmicKunai>()
|
||||
};
|
||||
|
||||
SunkenSeaBiomeCorrespondentValues = new()
|
||||
{
|
||||
{ SunkenSeaBiomeFlags.UndergroundDesert, (spawnInfo => spawnInfo.Player.ZoneDesert, -1 /* None needed. */) },
|
||||
@@ -298,8 +279,6 @@ namespace CalamityMod
|
||||
DisabledSummonerNerfItems = null;
|
||||
DisabledSummonerNerfMinions = null;
|
||||
|
||||
VeneratedLocketBanlist = null;
|
||||
|
||||
SunkenSeaBiomeCorrespondentValues = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -949,9 +949,9 @@ namespace CalamityMod
|
||||
#region Venerated Locket Bans
|
||||
public static bool AddToVeneratedLocketBanlist(int type)
|
||||
{
|
||||
if (!CalamityLists.VeneratedLocketBanlist.Contains(type))
|
||||
if (!VeneratedLocketBanList.Includes(type))
|
||||
{
|
||||
CalamityLists.VeneratedLocketBanlist.Add(type);
|
||||
VeneratedLocketBanList.List.Add(type);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using Terraria.ModLoader;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.Systems.Collections
|
||||
{
|
||||
/// <summary>
|
||||
/// To ban projectiles from locket, mainly spikeballs altho Toasty asked me to add mod calls for adding stuff like Dreamtastic
|
||||
/// </summary>
|
||||
public sealed class VeneratedLocketBanList : ModSystem
|
||||
{
|
||||
public static IList<int> List { get; private set; }
|
||||
|
||||
public override void OnModLoad()
|
||||
{
|
||||
List =
|
||||
[
|
||||
ItemType<PoisonPack>(),
|
||||
ItemType<SkyStabber>(),
|
||||
ItemType<Nychthemeron>(),
|
||||
ItemType<HellsSun>(),
|
||||
ItemType<GodsParanoia>(),
|
||||
ItemType<SlickCane>(),
|
||||
ItemType<Mycoroot>(),
|
||||
ItemType<CosmicKunai>()
|
||||
];
|
||||
}
|
||||
|
||||
public override void Unload() => List = null;
|
||||
|
||||
public static bool Includes(int itemType) => List.Contains(itemType);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user