GrenadeResistIDList
This commit is contained in:
1 parent
e797342a68
commit
787e81ed2a
3 files changed
+44
-29
No files matched your search
@@ -34,7 +34,6 @@ using CalamityMod.NPCs.SlimeGod;
|
||||
using CalamityMod.NPCs.StormWeaver;
|
||||
using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using CalamityMod.NPCs.Yharon;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -44,8 +43,6 @@ namespace CalamityMod
|
||||
{
|
||||
public sealed class CalamityLists : ModSystem
|
||||
{
|
||||
public static List<int> GrenadeResistIDs;
|
||||
|
||||
public static SortedDictionary<int, int> BossRushHPChanges;
|
||||
public static SortedDictionary<int, int> BossValues;
|
||||
public static SortedDictionary<int, int> bossTypes;
|
||||
@@ -72,30 +69,6 @@ namespace CalamityMod
|
||||
// Could prove useful for other things as well.
|
||||
|
||||
|
||||
GrenadeResistIDs = new List<int>
|
||||
{
|
||||
ProjectileID.Grenade,
|
||||
ProjectileID.StickyGrenade,
|
||||
ProjectileID.BouncyGrenade,
|
||||
ProjectileID.Bomb,
|
||||
ProjectileID.StickyBomb,
|
||||
ProjectileID.BouncyBomb,
|
||||
ProjectileID.Dynamite,
|
||||
ProjectileID.StickyDynamite,
|
||||
ProjectileID.BouncyDynamite,
|
||||
ProjectileID.Explosives,
|
||||
ProjectileID.ExplosiveBunny,
|
||||
ProjectileID.PartyGirlGrenade,
|
||||
ProjectileID.BombFish,
|
||||
ProjectileID.Beenade,
|
||||
ProjectileID.Bee,
|
||||
ProjectileID.GiantBee,
|
||||
ProjectileType<AeroExplosive>(),
|
||||
ProjectileID.ScarabBomb,
|
||||
ProjectileID.TNTBarrel
|
||||
};
|
||||
|
||||
|
||||
// Collections
|
||||
BossRushHPChanges = new SortedDictionary<int, int>
|
||||
{
|
||||
@@ -333,7 +306,6 @@ namespace CalamityMod
|
||||
|
||||
public override void Unload()
|
||||
{
|
||||
GrenadeResistIDs = null;
|
||||
|
||||
BossRushHPChanges?.Clear();
|
||||
BossRushHPChanges = null;
|
||||
|
||||
@@ -6229,7 +6229,7 @@ namespace CalamityMod.NPCs
|
||||
// Apply balancing resists/vulnerabilities.
|
||||
BalancingChangesManager.ApplyFromProjectile(npc, ref modifiers, projectile);
|
||||
|
||||
if (CalamityLists.GrenadeResistIDs.Contains(projectile.type))
|
||||
if (GrenadeResistIDList.Includes(projectile.type))
|
||||
{
|
||||
// Eater of Worlds has a vanilla resist in Expert+, this gives it to him in Normal mode
|
||||
// Note that Calamity reduces the vanilla resist from 80% to 60%
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.Systems.Collections
|
||||
{
|
||||
public sealed class GrenadeResistIDList : ModSystem
|
||||
{
|
||||
public static IList<int> List { get; private set; }
|
||||
|
||||
public override void OnModLoad()
|
||||
{
|
||||
List =
|
||||
[
|
||||
ProjectileID.Grenade,
|
||||
ProjectileID.StickyGrenade,
|
||||
ProjectileID.BouncyGrenade,
|
||||
ProjectileID.Bomb,
|
||||
ProjectileID.StickyBomb,
|
||||
ProjectileID.BouncyBomb,
|
||||
ProjectileID.Dynamite,
|
||||
ProjectileID.StickyDynamite,
|
||||
ProjectileID.BouncyDynamite,
|
||||
ProjectileID.Explosives,
|
||||
ProjectileID.ExplosiveBunny,
|
||||
ProjectileID.PartyGirlGrenade,
|
||||
ProjectileID.BombFish,
|
||||
ProjectileID.Beenade,
|
||||
ProjectileID.Bee,
|
||||
ProjectileID.GiantBee,
|
||||
ProjectileType<AeroExplosive>(),
|
||||
ProjectileID.ScarabBomb,
|
||||
ProjectileID.TNTBarrel
|
||||
];
|
||||
}
|
||||
|
||||
public override void Unload() => List = null;
|
||||
|
||||
public static bool Includes(int projectileType) => List.Contains(projectileType);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user