Updated spawn condition

This commit is contained in:
Nathanael Overton committed 2026-06-04 22:52:29 -04:00
1 parent b4216a3cd1
commit f95143139b
10 files changed
+71 -37

No files matched your search

+31 -30
View File
@@ -33,36 +33,37 @@ namespace CalamityMod
// Calamity Boss Flag conditions
//
public static readonly Condition DownedDesertScourge = Create("Drops.DownedDS", () => DownedBossSystem.downedDesertScourge);
public static readonly Condition DownedCrabulon = Create("Drops.DownedCrabulon", () => DownedBossSystem.downedCrabulon);
public static readonly Condition DownedHiveMind = Create("Drops.DownedHM", () => DownedBossSystem.downedHiveMind);
public static readonly Condition DownedPerforator = Create("Drops.DownedPerfs", () => DownedBossSystem.downedPerforator);
public static readonly Condition DownedSlimeGod = Create("Drops.DownedSG", () => DownedBossSystem.downedSlimeGod);
public static readonly Condition DownedCryogen = Create("Drops.DownedCryo", () => DownedBossSystem.downedCryogen);
public static readonly Condition DownedAquaticScourge = Create("Drops.DownedAS", () => DownedBossSystem.downedAquaticScourge);
public static readonly Condition DownedBrimstoneElemental = Create("Drops.DownedBrim", () => DownedBossSystem.downedBrimstoneElemental);
public static readonly Condition DownedCalamitasClone = Create("Drops.DownedCal", () => DownedBossSystem.downedCalamitasClone);
public static readonly Condition DownedLeviathan = Create("Drops.DownedLevi", () => DownedBossSystem.downedLeviathan);
public static readonly Condition DownedAstrumAureus = Create("Drops.DownedAureus", () => DownedBossSystem.downedAstrumAureus);
public static readonly Condition DownedPlaguebringer = Create("Drops.DownedPBG", () => DownedBossSystem.downedPlaguebringer);
public static readonly Condition DownedRavager = Create("Drops.DownedRav", () => DownedBossSystem.downedRavager);
public static readonly Condition DownedAstrumDeus = Create("Drops.DownedAD", () => DownedBossSystem.downedAstrumDeus);
public static readonly Condition DownedGuardians = Create("Drops.DownedGuard", () => DownedBossSystem.downedGuardians);
public static readonly Condition DownedBumblebird = Create("Drops.DownedBirb", () => DownedBossSystem.downedDragonfolly);
public static readonly Condition DownedProvidence = Create("Drops.DownedProv", () => DownedBossSystem.downedProvidence);
public static readonly Condition DownedSignus = Create("Drops.DownedSig", () => DownedBossSystem.downedSignus);
public static readonly Condition DownedStormWeaver = Create("Drops.DownedSW", () => DownedBossSystem.downedStormWeaver);
public static readonly Condition DownedCeaselessVoid = Create("Drops.DownedCV", () => DownedBossSystem.downedCeaselessVoid);
public static readonly Condition DownedPolterghast = Create("Drops.DownedPolter", () => DownedBossSystem.downedPolterghast);
public static readonly Condition DownedOldDuke = Create("Drops.DownedOD", () => DownedBossSystem.downedBoomerDuke);
public static readonly Condition DownedDevourerOfGods = Create("Drops.DownedDoG", () => DownedBossSystem.downedDoG);
public static readonly Condition DownedYharon = Create("Drops.DownedYharon", () => DownedBossSystem.downedYharon);
public static readonly Condition DownedExoMechs = Create("Drops.DownedExos", () => DownedBossSystem.downedExoMechs);
public static readonly Condition DownedSupremeCalamitas = Create("Drops.DownedSCal", () => DownedBossSystem.downedCalamitas);
public static readonly Condition DownedPrimordialWyrm = Create("Drops.DownedAEW", () => DownedBossSystem.downedPrimordialWyrm);
public static readonly Condition DownedClam = Create("Drops.DownedClam", () => DownedBossSystem.downedCLAM);
public static readonly Condition DownedBuffedClam = Create("Drops.DownedClamHM", () => DownedBossSystem.downedCLAMHardMode);
public static readonly Condition DownedGreatSandShark = Create("Drops.DownedGSS", () => DownedBossSystem.downedGSS);
public static readonly Condition DownedDesertScourge = Create("Drops.DownedDS", () => DownedBossSystem.downedDesertScourge);
public static readonly Condition DownedCrabulon = Create("Drops.DownedCrabulon", () => DownedBossSystem.downedCrabulon);
public static readonly Condition DownedHiveMind = Create("Drops.DownedHM", () => DownedBossSystem.downedHiveMind);
public static readonly Condition DownedPerforator = Create("Drops.DownedPerfs", () => DownedBossSystem.downedPerforator);
public static readonly Condition DownedSlimeGod = Create("Drops.DownedSG", () => DownedBossSystem.downedSlimeGod);
public static readonly Condition DownedCryogen = Create("Drops.DownedCryo", () => DownedBossSystem.downedCryogen);
public static readonly Condition DownedAquaticScourge = Create("Drops.DownedAS", () => DownedBossSystem.downedAquaticScourge);
public static readonly Condition DownedBrimstoneElemental = Create("Drops.DownedBrim", () => DownedBossSystem.downedBrimstoneElemental);
public static readonly Condition DownedCalamitasClone = Create("Drops.DownedCal", () => DownedBossSystem.downedCalamitasClone);
public static readonly Condition DownedLeviathan = Create("Drops.DownedLevi", () => DownedBossSystem.downedLeviathan);
public static readonly Condition DownedAstrumAureus = Create("Drops.DownedAureus", () => DownedBossSystem.downedAstrumAureus);
public static readonly Condition DownedPlaguebringer = Create("Drops.DownedPBG", () => DownedBossSystem.downedPlaguebringer);
public static readonly Condition DownedRavager = Create("Drops.DownedRav", () => DownedBossSystem.downedRavager);
public static readonly Condition DownedAstrumDeus = Create("Drops.DownedAD", () => DownedBossSystem.downedAstrumDeus);
public static readonly Condition DownedGuardians = Create("Drops.DownedGuard", () => DownedBossSystem.downedGuardians);
public static readonly Condition DownedBumblebird = Create("Drops.DownedBirb", () => DownedBossSystem.downedDragonfolly);
public static readonly Condition DownedProvidence = Create("Drops.DownedProv", () => DownedBossSystem.downedProvidence);
public static readonly Condition DownedSignus = Create("Drops.DownedSig", () => DownedBossSystem.downedSignus);
public static readonly Condition DownedStormWeaver = Create("Drops.DownedSW", () => DownedBossSystem.downedStormWeaver);
public static readonly Condition DownedCeaselessVoid = Create("Drops.DownedCV", () => DownedBossSystem.downedCeaselessVoid);
public static readonly Condition DownedPolterghast = Create("Drops.DownedPolter", () => DownedBossSystem.downedPolterghast);
public static readonly Condition DownedOldDuke = Create("Drops.DownedOD", () => DownedBossSystem.downedBoomerDuke);
public static readonly Condition DownedDevourerOfGods = Create("Drops.DownedDoG", () => DownedBossSystem.downedDoG);
public static readonly Condition DownedYharon = Create("Drops.DownedYharon", () => DownedBossSystem.downedYharon);
public static readonly Condition DownedExoMechs = Create("Drops.DownedExos", () => DownedBossSystem.downedExoMechs);
public static readonly Condition DownedSupremeCalamitas = Create("Drops.DownedSCal", () => DownedBossSystem.downedCalamitas);
public static readonly Condition DownedPrimordialWyrm = Create("Drops.DownedAEW", () => DownedBossSystem.downedPrimordialWyrm);
public static readonly Condition DownedHorribleHog = Create("Drops.DownedHorribleHog", () => DownedBossSystem.downedHorribleHog);
public static readonly Condition DownedClam = Create("Drops.DownedClam", () => DownedBossSystem.downedCLAM);
public static readonly Condition DownedBuffedClam = Create("Drops.DownedClamHM", () => DownedBossSystem.downedCLAMHardMode);
public static readonly Condition DownedGreatSandShark = Create("Drops.DownedGSS", () => DownedBossSystem.downedGSS);
// Mixed
public static readonly Condition DownedHiveMindOrPerforator = Create("Drops.DownedHMOrPerfs",() => DownedBossSystem.downedHiveMind || DownedBossSystem.downedPerforator);
@@ -33,6 +33,7 @@ Drops: {
DownedExos: After defeating the Exo Mechs
DownedSCal: After defeating Calamitas
DownedAEW: After defeating the Primordial Wyrm
DownedHorribleHog: After defeating the Horrible Hog
DownedClam: After defeating the Giant Clam
DownedClamHM: After defeating the Giant Clam in Hardmode
DownedGSS: After defeating the Great Sand Shark
@@ -321,7 +321,6 @@ Shoreskipper.DisplayName: Shoreskipper
BrainIllusion.DisplayName: Brain Illusion
FalseBrain.DisplayName: False Brain
BloodBomb.DisplayName: Blood Bomb
// Town NPCs, Pets, etc
AndroombaFriendly.DisplayName: Androomba Pal
Archmage: {
@@ -642,10 +641,4 @@ TownPiggy: {
}
}
DraconicSwarmer.DisplayName: Draconic Swarmer
Dragonfolly.DisplayName: Dragonfolly
Shoreskipper.DisplayName: Shoreskipper
BrainIllusion.DisplayName: Brain Illusion
FalseBrain.DisplayName: False Brain
BloodBomb.DisplayName: Blood Bomb
HorribleHog.DisplayName: Horrible Hog
+6
View File
@@ -49,6 +49,12 @@ namespace CalamityMod
case "desert scourge":
return DownedBossSystem.downedDesertScourge;
case "horriblehog":
case "horrible hog":
case "thehorriblehog":
case "the horrible hog":
return DownedBossSystem.downedHorribleHog;
case "clam":
case "giantclam":
case "giant clam":
+1
View File
@@ -70,6 +70,7 @@ namespace CalamityMod
internal class Downed
{
public static readonly Func<bool> DownedDesertScourge = () => DownedBossSystem.downedDesertScourge;
public static readonly Func<bool> DownedHorribleHog = () => DownedBossSystem.downedHorribleHog;
public static readonly Func<bool> DownedGiantClam = () => DownedBossSystem.downedCLAM;
public static readonly Func<bool> DownedCrabulon = () => DownedBossSystem.downedCrabulon;
public static readonly Func<bool> DownedHiveMind = () => DownedBossSystem.downedHiveMind;
@@ -10,6 +10,7 @@ using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Banners;
using CalamityMod.Items.Tools;
using CalamityMod.NPCs.TownNPCs;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Enemy;
using CalamityMod.Utilities.Daybreak;
@@ -821,6 +822,15 @@ namespace CalamityMod.NPCs.NormalNPCs.HorribleHog
}
}
public override void OnKill()
{
CalamityGlobalNPC.SetNewBossJustDowned(NPC);
// Mark Horrible Hog as dead
DownedBossSystem.downedHorribleHog = true;
CalamityNetcode.SyncWorld();
}
public override void ModifyNPCLoot(NPCLoot npcLoot)
{
//Always drops Disgusting Meat, 50% chance to drop Money Trough, 25%/33% chance to drop Laudanum
+3
View File
@@ -555,6 +555,9 @@ namespace CalamityMod.NPCs.TownNPCs
public override void PreUpdateWorld()
{
if (!DownedBossSystem.downedHorribleHog) // Cannot spawn before Horrible Hog has been killed.
return;
if (Main.dayTime)
{
CanSpawnTonight = true;
@@ -45,6 +45,7 @@ namespace CalamityMod
// Minibosses
internal static bool _downedGSS = false;
internal static bool _downedHorribleHog = false;
internal static bool _downedCLAM = false;
internal static bool _downedCLAMHardMode = false;
internal static bool _downedCragmawMire = false;
@@ -381,6 +382,17 @@ namespace CalamityMod
NPC.SetEventFlagCleared(ref _downedPrimordialWyrm, -1);
}
}
public static bool downedHorribleHog
{
get => _downedHorribleHog;
set
{
if (!value)
_downedHorribleHog = false;
else
NPC.SetEventFlagCleared(ref _downedHorribleHog, -1);
}
}
public static bool downedCLAM
{
get => _downedCLAM;
@@ -548,6 +560,7 @@ namespace CalamityMod
downedSecondSentinels = false;
downedHorribleHog = false;
downedCLAM = false;
downedEoCAcidRain = false;
@@ -644,6 +657,8 @@ namespace CalamityMod
downed.Add("adultEidolonWyrm");
// Minibosses and events
if (downedHorribleHog)
downed.Add("horribleHog");
if (downedCLAM)
downed.Add("clam");
if (downedEoCAcidRain)
@@ -711,6 +726,7 @@ namespace CalamityMod
downedCalamitas = downed.Contains("supremeCalamitas");
downedPrimordialWyrm = downed.Contains("adultEidolonWyrm");
downedHorribleHog = downed.Contains("horribleHog");
downedCLAM = downed.Contains("clam");
downedEoCAcidRain = downed.Contains("eocRain");
+2
View File
@@ -301,6 +301,7 @@ namespace CalamityMod
flags12[3] = downedBossRush;
flags12[4] = DraedonMechdusa;
flags12[5] = unlockedTownPig;
flags12[5] = downedHorribleHog;
writer.Write(flags);
writer.Write(flags2);
@@ -456,6 +457,7 @@ namespace CalamityMod
downedBossRush = flags12[3];
DraedonMechdusa = flags12[4];
unlockedTownPig = flags12[5];
downedHorribleHog = flags12[5];
RecipeUnlockHandler.ReceiveData(reader);
+1
View File
@@ -888,6 +888,7 @@ namespace CalamityMod
public static IItemDropRuleCondition PostExos(bool ui = true) => CalamityConditions.DownedExoMechs.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never);
public static IItemDropRuleCondition PostSCal(bool ui = true) => CalamityConditions.DownedSupremeCalamitas.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never);
public static IItemDropRuleCondition PostAEW(bool ui = true) => CalamityConditions.DownedPrimordialWyrm.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never);
public static IItemDropRuleCondition PostHorribleHog(bool ui = true) => CalamityConditions.DownedHorribleHog.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never);
public static IItemDropRuleCondition PostClam(bool ui = true) => CalamityConditions.DownedClam.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never);
public static IItemDropRuleCondition PostClamHM(bool ui = true) => CalamityConditions.DownedBuffedClam.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never);
public static IItemDropRuleCondition PostGSS(bool ui = true) => CalamityConditions.DownedGreatSandShark.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never);