Yanmei's Knife issues fixed.

This commit is contained in:
Ozzatron committed 2020-09-21 19:40:06 -04:00
1 parent f17a97d5d0
commit dd41049c6c
4 files changed
+50 -23

No files matched your search

+2 -1
View File
@@ -6,7 +6,8 @@ namespace CalamityMod.Buffs.StatDebuffs
public class KamiDebuff : ModBuff
{
public const float MultiplicativeDamageReduction = 0.8f;
public const float MaxNPCSpeed = 16f; // Hard-cap for npc speed when afflicted with this debuff. Does not affect certain NPCs and does not affect any bosses (Basically only works on boss minions).
// Hard-cap for npc speed when afflicted with this debuff. Does not affect certain NPCs and does not affect any bosses (Basically only works on boss minions).
public const float MaxNPCSpeed = 16f;
public override void SetDefaults()
{
DisplayName.SetDefault("Kami Flu");
+30 -19
View File
@@ -144,6 +144,8 @@ namespace CalamityMod
public static List<int> legOverrideList;
public static List<int> kamiDebuffColorImmuneList;
public static void LoadLists()
{
donatorList = new List<string>()
@@ -278,8 +280,8 @@ namespace CalamityMod
trueMeleeProjectileList = new List<int>()
{
// Vanilla shit
ProjectileID.Spear,
// Vanilla shit
ProjectileID.Spear,
ProjectileID.Trident,
ProjectileID.TheRottedFork,
ProjectileID.Swordfish,
@@ -300,7 +302,7 @@ namespace CalamityMod
ProjectileID.MonkStaffT3,
ProjectileID.NorthPoleWeapon,
// Tools
// Tools
ProjectileID.CobaltDrill,
ProjectileID.MythrilDrill,
ProjectileID.AdamantiteDrill,
@@ -328,8 +330,8 @@ namespace CalamityMod
ProjectileID.SawtoothShark,
ProjectileID.ButchersChainsaw,
// Calamity shit
ModContent.ProjectileType<DevilsSunriseProj>(),
// Calamity shit
ModContent.ProjectileType<DevilsSunriseProj>(),
ModContent.ProjectileType<MarniteObliteratorProj>(),
ModContent.ProjectileType<MurasamaSlash>(),
ModContent.ProjectileType<AmidiasTridentProj>(),
@@ -394,7 +396,7 @@ namespace CalamityMod
projectileDestroyExceptionList = new List<int>()
{
//holdout projectiles
//holdout projectiles
ProjectileID.Phantasm,
ProjectileID.VortexBeater,
ProjectileID.DD2PhoenixBow,
@@ -423,7 +425,7 @@ namespace CalamityMod
ModContent.ProjectileType<MurasamaSlash>(),
ModContent.ProjectileType<PhaseslayerProjectile>(),
//Some hostile boss projectiles
//Some hostile boss projectiles
ModContent.ProjectileType<BrimstoneMonster>(),
ModContent.ProjectileType<InfernadoRevenge>(),
ModContent.ProjectileType<OverlyDramaticDukeSummoner>(),
@@ -875,7 +877,7 @@ namespace CalamityMod
ModContent.ItemType<IceBarrage>(),
ModContent.ItemType<FrostBlossomStaff>(),
ModContent.ItemType<EndoHydraStaff>(),
//Cryonic Bar set stuff, could potentially be removed
//Cryonic Bar set stuff, could potentially be removed
ModContent.ItemType<Trinity>(),
ModContent.ItemType<Shimmerspark>(),
ModContent.ItemType<StarnightLance>(),
@@ -1921,7 +1923,7 @@ namespace CalamityMod
NPCID.BaldZombie,
NPCID.PincushionZombie,
NPCID.ArmedZombiePincussion, // what is this spelling
NPCID.SlimedZombie,
NPCID.SlimedZombie,
NPCID.ArmedZombieSlimed,
NPCID.SwampZombie,
NPCID.ArmedZombieSwamp,
@@ -1948,8 +1950,8 @@ namespace CalamityMod
NPCID.SmallBaldZombie,
NPCID.BigZombie,
NPCID.SmallZombie
// halloween zombies not included because they don't drop shackles or zombie arms
};
// halloween zombies not included because they don't drop shackles or zombie arms
};
demonEyeList = new List<int>()
{
@@ -1957,7 +1959,7 @@ namespace CalamityMod
NPCID.CataractEye,
NPCID.SleepyEye,
NPCID.DialatedEye, // it is spelled "dilated"
NPCID.GreenEye,
NPCID.GreenEye,
NPCID.PurpleEye,
NPCID.DemonEyeOwl,
NPCID.DemonEyeSpaceship,
@@ -1988,13 +1990,13 @@ namespace CalamityMod
NPCID.BigSkeleton,
NPCID.SmallSkeleton,
//Note: These skeletons don't count for Skeleton Banner for some god forsaken reason
NPCID.SkeletonTopHat,
//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,
//Other skeleton types
NPCID.ArmoredSkeleton,
NPCID.HeavySkeleton,
NPCID.SkeletonArcher,
NPCID.GreekSkeleton
@@ -2061,8 +2063,8 @@ namespace CalamityMod
NPCID.SantaNK1,
NPCID.Everscream,
NPCID.DD2Betsy,
NPCID.Mothron
};
NPCID.Mothron
};
bossMinionList = new List<int>()
{
@@ -2293,6 +2295,14 @@ namespace CalamityMod
CalamityMod.Instance.GetEquipSlot("SirenLeg", EquipType.Legs),
CalamityMod.Instance.GetEquipSlot("PopoLeg", EquipType.Legs)
};
// Duke Fishron phase 3 becomes way too easy if you can make him stop being invisible with Yanmei's Knife.
// This is a list so that other NPCs can be added as necessary.
// IT DOES NOT make them immune to the debuff, just stops them from being recolored.
kamiDebuffColorImmuneList = new List<int>()
{
NPCID.DukeFishron,
};
}
public static void UnloadLists()
@@ -2365,10 +2375,11 @@ namespace CalamityMod
hornetList = null;
mossHornetList = null;
bossMinionList = null;
minibossList = null;
minibossList = null;
legOverrideList = null;
kamiDebuffColorImmuneList = null;
}
}
}
+1 -1
View File
@@ -4368,7 +4368,7 @@ namespace CalamityMod.NPCs
return new Color(200, 50, 50, npc.alpha);
}
if (npc.Calamity().kamiFlu > 0)
if (npc.Calamity().kamiFlu > 0 && !CalamityLists.kamiDebuffColorImmuneList.Contains(npc.type))
{
return new Color(51, 197, 108, npc.alpha);
}
+17 -2
View File
@@ -14,7 +14,20 @@ 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<NPC, bool> CanRecieveCoolEffectsFrom = (npc) => (npc.boss && npc.type != ModContent.NPCType<CeaselessVoid>() && npc.type != ModContent.NPCType<DevourerofGodsBody>() && npc.type != ModContent.NPCType<DevourerofGodsBodyS>()) || CalamityLists.bossMinionList.Contains(npc.type) || CalamityLists.minibossList.Contains(npc.type) || AcidRainEvent.AllMinibosses.Contains(npc.type);
public static readonly Func<NPC, bool> CanRecieveCoolEffectsFrom = (npc) =>
{
bool validBoss = npc.boss && npc.type != ModContent.NPCType<CeaselessVoid>()
&& npc.type != ModContent.NPCType<DevourerofGodsBody>()
&& npc.type != ModContent.NPCType<DevourerofGodsBodyS>();
if (validBoss)
return true;
bool bossMinion = CalamityLists.bossMinionList.Contains(npc.type);
if (bossMinion)
return true;
bool miniboss = CalamityLists.minibossList.Contains(npc.type) || AcidRainEvent.AllMinibosses.Contains(npc.type);
return miniboss;
};
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Yanmei's Knife");
@@ -31,7 +44,9 @@ namespace CalamityMod.Projectiles.Typeless
projectile.ownerHitCheck = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 20;
projectile.Calamity().trueMelee = true;
// Not considered true melee to prevent Titan Scale from triggering.
// projectile.Calamity().trueMelee = true;
}
public override void AI()