lore items now state they only drop on first kill
This commit is contained in:
1 parent
e27ef13e15
commit
82389b7528
28 files changed
+74
-63
No files matched your search
@@ -255,8 +255,8 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
|
||||
// Lore
|
||||
bool firstASKill() => !DownedBossSystem.downedAquaticScourge;
|
||||
npcLoot.AddConditionalPerPlayer(firstASKill, ModContent.ItemType<KnowledgeAquaticScourge>());
|
||||
npcLoot.AddConditionalPerPlayer(firstASKill, ModContent.ItemType<KnowledgeSulphurSea>());
|
||||
npcLoot.AddConditionalPerPlayer(firstASKill, ModContent.ItemType<KnowledgeAquaticScourge>(), desc: DropHelper.FirstKillText);
|
||||
npcLoot.AddConditionalPerPlayer(firstASKill, ModContent.ItemType<KnowledgeSulphurSea>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override void OnKill()
|
||||
|
||||
@@ -365,7 +365,7 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<AstrumAureusRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedAstrumAureus, ModContent.ItemType<KnowledgeAstrumAureus>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedAstrumAureus, ModContent.ItemType<KnowledgeAstrumAureus>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override void OnKill()
|
||||
|
||||
@@ -334,8 +334,8 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
|
||||
// Lore
|
||||
bool firstDeusKill(DropAttemptInfo info) => !DownedBossSystem.downedAstrumDeus && !ShouldNotDropThings(info.npc);
|
||||
npcLoot.AddConditionalPerPlayer(firstDeusKill, ModContent.ItemType<KnowledgeAstrumDeus>());
|
||||
npcLoot.AddConditionalPerPlayer(firstDeusKill, ModContent.ItemType<KnowledgeAstralInfection>());
|
||||
npcLoot.AddConditionalPerPlayer(firstDeusKill, ModContent.ItemType<KnowledgeAstrumDeus>(), desc: DropHelper.FirstKillText);
|
||||
npcLoot.AddConditionalPerPlayer(firstDeusKill, ModContent.ItemType<KnowledgeAstralInfection>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<BrimstoneElementalRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedBrimstoneElemental, ModContent.ItemType<KnowledgeBrimstoneElemental>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedBrimstoneElemental, ModContent.ItemType<KnowledgeBrimstoneElemental>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override void OnKill()
|
||||
|
||||
@@ -442,7 +442,7 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<DragonfollyRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedDragonfolly, ModContent.ItemType<KnowledgeDragonfolly>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedDragonfolly, ModContent.ItemType<KnowledgeDragonfolly>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override void OnKill()
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace CalamityMod.NPCs.Calamitas
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<CalamitasCloneRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedCalamitas, ModContent.ItemType<KnowledgeCalamitasClone>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedCalamitas, ModContent.ItemType<KnowledgeCalamitasClone>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override void OnKill()
|
||||
|
||||
@@ -829,7 +829,7 @@ namespace CalamityMod.NPCs
|
||||
npcLoot.Add(rev);
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedSlimeKing, ModContent.ItemType<KnowledgeKingSlime>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedSlimeKing, ModContent.ItemType<KnowledgeKingSlime>(), desc: DropHelper.FirstKillText);
|
||||
break;
|
||||
|
||||
case NPCID.EyeofCthulhu:
|
||||
@@ -846,7 +846,7 @@ namespace CalamityMod.NPCs
|
||||
npcLoot.Add(rev);
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedBoss1, ModContent.ItemType<KnowledgeEyeofCthulhu>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedBoss1, ModContent.ItemType<KnowledgeEyeofCthulhu>(), desc: DropHelper.FirstKillText);
|
||||
break;
|
||||
|
||||
case NPCID.EaterofWorldsHead:
|
||||
@@ -862,15 +862,15 @@ namespace CalamityMod.NPCs
|
||||
npcLoot.Add(RevEoW);
|
||||
|
||||
// Corruption World OR Drunk World: Corruption Lore
|
||||
LeadingConditionRule eowCorruptionLore = new(DropHelper.If((info) => info.npc.boss && (!WorldGen.crimson || WorldGen.drunkWorldGen) && !NPC.downedBoss2));
|
||||
eowCorruptionLore.Add(ModContent.ItemType<KnowledgeCorruption>());
|
||||
eowCorruptionLore.Add(ModContent.ItemType<KnowledgeEaterofWorlds>());
|
||||
LeadingConditionRule eowCorruptionLore = new(DropHelper.If((info) => info.npc.boss && (!WorldGen.crimson || WorldGen.drunkWorldGen) && !NPC.downedBoss2, desc: DropHelper.FirstKillText));
|
||||
eowCorruptionLore.Add(ModContent.ItemType<KnowledgeCorruption>(), hideLootReport: WorldGen.crimson && !WorldGen.drunkWorldGen);
|
||||
eowCorruptionLore.Add(ModContent.ItemType<KnowledgeEaterofWorlds>(), hideLootReport: WorldGen.crimson && !WorldGen.drunkWorldGen);
|
||||
npcLoot.Add(eowCorruptionLore);
|
||||
|
||||
// Crimson World OR Drunk World: Crimson Lore
|
||||
LeadingConditionRule eowCrimsonLore = new(DropHelper.If((info) => info.npc.boss && (WorldGen.crimson || WorldGen.drunkWorldGen) && !NPC.downedBoss2));
|
||||
eowCrimsonLore.Add(ModContent.ItemType<KnowledgeCrimson>());
|
||||
eowCrimsonLore.Add(ModContent.ItemType<KnowledgeBrainofCthulhu>());
|
||||
LeadingConditionRule eowCrimsonLore = new(DropHelper.If((info) => info.npc.boss && (WorldGen.crimson || WorldGen.drunkWorldGen) && !NPC.downedBoss2, desc: DropHelper.FirstKillText));
|
||||
eowCrimsonLore.Add(ModContent.ItemType<KnowledgeCrimson>(), hideLootReport: !WorldGen.crimson && !WorldGen.drunkWorldGen);
|
||||
eowCrimsonLore.Add(ModContent.ItemType<KnowledgeBrainofCthulhu>(), hideLootReport: !WorldGen.crimson && !WorldGen.drunkWorldGen);
|
||||
npcLoot.Add(eowCrimsonLore);
|
||||
break;
|
||||
|
||||
@@ -884,15 +884,15 @@ namespace CalamityMod.NPCs
|
||||
npcLoot.Add(rev);
|
||||
|
||||
// Corruption World OR Drunk World: Corruption Lore
|
||||
LeadingConditionRule bocCorruptionLore = new(DropHelper.If(() => (!WorldGen.crimson || WorldGen.drunkWorldGen) && !NPC.downedBoss2));
|
||||
bocCorruptionLore.Add(ModContent.ItemType<KnowledgeCorruption>());
|
||||
bocCorruptionLore.Add(ModContent.ItemType<KnowledgeEaterofWorlds>());
|
||||
LeadingConditionRule bocCorruptionLore = new(DropHelper.If(() => (!WorldGen.crimson || WorldGen.drunkWorldGen) && !NPC.downedBoss2, desc: DropHelper.FirstKillText));
|
||||
bocCorruptionLore.Add(ModContent.ItemType<KnowledgeCorruption>(), hideLootReport: WorldGen.crimson && !WorldGen.drunkWorldGen);
|
||||
bocCorruptionLore.Add(ModContent.ItemType<KnowledgeEaterofWorlds>(), hideLootReport: WorldGen.crimson && !WorldGen.drunkWorldGen);
|
||||
npcLoot.Add(bocCorruptionLore);
|
||||
|
||||
// Crimson World OR Drunk World: Crimson Lore
|
||||
LeadingConditionRule bocCrimsonLore = new(DropHelper.If(() => (WorldGen.crimson || WorldGen.drunkWorldGen) && !NPC.downedBoss2));
|
||||
bocCrimsonLore.Add(ModContent.ItemType<KnowledgeCrimson>());
|
||||
bocCrimsonLore.Add(ModContent.ItemType<KnowledgeBrainofCthulhu>());
|
||||
LeadingConditionRule bocCrimsonLore = new(DropHelper.If(() => (WorldGen.crimson || WorldGen.drunkWorldGen) && !NPC.downedBoss2, desc: DropHelper.FirstKillText));
|
||||
bocCrimsonLore.Add(ModContent.ItemType<KnowledgeCrimson>(), hideLootReport: !WorldGen.crimson && !WorldGen.drunkWorldGen);
|
||||
bocCrimsonLore.Add(ModContent.ItemType<KnowledgeBrainofCthulhu>(), hideLootReport: !WorldGen.crimson && !WorldGen.drunkWorldGen);
|
||||
npcLoot.Add(bocCrimsonLore);
|
||||
break;
|
||||
|
||||
@@ -954,7 +954,7 @@ namespace CalamityMod.NPCs
|
||||
npcLoot.Add(rev);
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedQueenBee, ModContent.ItemType<KnowledgeQueenBee>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedQueenBee, ModContent.ItemType<KnowledgeQueenBee>(), desc: DropHelper.FirstKillText);
|
||||
break;
|
||||
|
||||
case NPCID.SkeletronHead:
|
||||
@@ -979,7 +979,7 @@ namespace CalamityMod.NPCs
|
||||
npcLoot.Add(rev);
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedBoss3, ModContent.ItemType<KnowledgeSkeletron>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedBoss3, ModContent.ItemType<KnowledgeSkeletron>(), desc: DropHelper.FirstKillText);
|
||||
break;
|
||||
|
||||
case NPCID.WallofFlesh:
|
||||
@@ -1059,8 +1059,8 @@ namespace CalamityMod.NPCs
|
||||
npcLoot.Add(rev);
|
||||
|
||||
// Lore
|
||||
LeadingConditionRule wofLore = npcLoot.AddConditionalPerPlayer(() => !Main.hardMode, ModContent.ItemType<KnowledgeUnderworld>());
|
||||
wofLore.Add(DropHelper.PerPlayer(ModContent.ItemType<KnowledgeWallofFlesh>()));
|
||||
npcLoot.AddConditionalPerPlayer(() => !Main.hardMode, ModContent.ItemType<KnowledgeUnderworld>(), desc: DropHelper.FirstKillText);
|
||||
npcLoot.AddConditionalPerPlayer(() => !Main.hardMode, ModContent.ItemType<KnowledgeWallofFlesh>(), desc: DropHelper.FirstKillText);
|
||||
break;
|
||||
|
||||
case NPCID.QueenSlimeBoss:
|
||||
@@ -1094,8 +1094,8 @@ namespace CalamityMod.NPCs
|
||||
npcLoot.Add(rev);
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedMechBoss1, ModContent.ItemType<KnowledgeDestroyer>());
|
||||
npcLoot.AddConditionalPerPlayer(ShouldDropMechLore, ModContent.ItemType<KnowledgeMechs>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedMechBoss1, ModContent.ItemType<KnowledgeDestroyer>(), desc: DropHelper.FirstKillText);
|
||||
npcLoot.AddConditionalPerPlayer(ShouldDropMechLore, ModContent.ItemType<KnowledgeMechs>(), desc: DropHelper.MechBossText);
|
||||
break;
|
||||
|
||||
case NPCID.Retinazer:
|
||||
@@ -1130,8 +1130,8 @@ namespace CalamityMod.NPCs
|
||||
npcLoot.AddIf((info) => !Main.masterMode && CalamityWorld.revenge && IsLastTwinStanding(info), ItemID.TwinsPetItem, 4);
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer((info) => !NPC.downedMechBoss2 && IsLastTwinStanding(info), ModContent.ItemType<KnowledgeTwins>());
|
||||
npcLoot.AddConditionalPerPlayer(ShouldDropMechLore, ModContent.ItemType<KnowledgeMechs>());
|
||||
npcLoot.AddConditionalPerPlayer((info) => !NPC.downedMechBoss2 && IsLastTwinStanding(info), ModContent.ItemType<KnowledgeTwins>(), desc: DropHelper.FirstKillText);
|
||||
npcLoot.AddConditionalPerPlayer(ShouldDropMechLore, ModContent.ItemType<KnowledgeMechs>(), desc: DropHelper.MechBossText);
|
||||
break;
|
||||
|
||||
case NPCID.SkeletronPrime:
|
||||
@@ -1150,8 +1150,8 @@ namespace CalamityMod.NPCs
|
||||
npcLoot.Add(rev);
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedMechBoss3, ModContent.ItemType<KnowledgeSkeletronPrime>());
|
||||
npcLoot.AddConditionalPerPlayer(ShouldDropMechLore, ModContent.ItemType<KnowledgeMechs>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedMechBoss3, ModContent.ItemType<KnowledgeSkeletronPrime>(), desc: DropHelper.FirstKillText);
|
||||
npcLoot.AddConditionalPerPlayer(ShouldDropMechLore, ModContent.ItemType<KnowledgeMechs>(), desc: DropHelper.MechBossText);
|
||||
break;
|
||||
|
||||
case NPCID.Plantera:
|
||||
@@ -1211,7 +1211,7 @@ namespace CalamityMod.NPCs
|
||||
npcLoot.Add(rev);
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedPlantBoss, ModContent.ItemType<KnowledgePlantera>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedPlantBoss, ModContent.ItemType<KnowledgePlantera>(), desc: DropHelper.FirstKillText);
|
||||
break;
|
||||
|
||||
case NPCID.Golem:
|
||||
@@ -1266,7 +1266,7 @@ namespace CalamityMod.NPCs
|
||||
npcLoot.Add(rev);
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedGolemBoss, ModContent.ItemType<KnowledgeGolem>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedGolemBoss, ModContent.ItemType<KnowledgeGolem>(), desc: DropHelper.FirstKillText);
|
||||
break;
|
||||
|
||||
case NPCID.DD2Betsy:
|
||||
@@ -1344,7 +1344,7 @@ namespace CalamityMod.NPCs
|
||||
npcLoot.Add(rev);
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedFishron, ModContent.ItemType<KnowledgeDukeFishron>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedFishron, ModContent.ItemType<KnowledgeDukeFishron>(), desc: DropHelper.FirstKillText);
|
||||
break;
|
||||
|
||||
case NPCID.HallowBoss:
|
||||
@@ -1399,10 +1399,10 @@ namespace CalamityMod.NPCs
|
||||
npcLoot.Add(rev);
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedAncientCultist, ModContent.ItemType<KnowledgeLunaticCultist>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedAncientCultist, ModContent.ItemType<KnowledgeLunaticCultist>(), desc: DropHelper.FirstKillText);
|
||||
|
||||
// Special Blood Moon Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => Main.bloodMoon, ModContent.ItemType<KnowledgeBloodMoon>());
|
||||
npcLoot.AddConditionalPerPlayer(() => Main.bloodMoon, ModContent.ItemType<KnowledgeBloodMoon>(), desc: DropHelper.BloodMoonText);
|
||||
break;
|
||||
|
||||
case NPCID.MoonLordCore:
|
||||
@@ -1449,7 +1449,7 @@ namespace CalamityMod.NPCs
|
||||
npcLoot.Add(rev);
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedMoonlord, ModContent.ItemType<KnowledgeMoonLord>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !NPC.downedMoonlord, ModContent.ItemType<KnowledgeMoonLord>(), desc: DropHelper.FirstKillText);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -229,7 +229,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<CeaselessVoidRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(LastSentinelKilled, ModContent.ItemType<KnowledgeSentinels>());
|
||||
npcLoot.AddConditionalPerPlayer(LastSentinelKilled, ModContent.ItemType<KnowledgeSentinels>(), desc: DropHelper.SentinelText);
|
||||
}
|
||||
|
||||
public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
|
||||
|
||||
@@ -839,7 +839,7 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<CrabulonRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedCrabulon, ModContent.ItemType<KnowledgeCrabulon>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedCrabulon, ModContent.ItemType<KnowledgeCrabulon>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override void OnKill()
|
||||
|
||||
@@ -1188,7 +1188,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<CryogenRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedCryogen, ModContent.ItemType<KnowledgeCryogen>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedCryogen, ModContent.ItemType<KnowledgeCryogen>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override void OnKill()
|
||||
|
||||
@@ -731,7 +731,7 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<DesertScourgeRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedDesertScourge, ModContent.ItemType<KnowledgeDesertScourge>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedDesertScourge, ModContent.ItemType<KnowledgeDesertScourge>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -2405,7 +2405,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
npcLoot.Add(ModContent.ItemType<DevourerofGodsTrophy>(), 10);
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedDoG, ModContent.ItemType<KnowledgeDevourerofGods>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedDoG, ModContent.ItemType<KnowledgeDevourerofGods>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
// Can only hit the target if within certain distance
|
||||
|
||||
@@ -1350,7 +1350,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
mainDrops.Add(ItemDropRule.ByCondition(DropHelper.If(() => Main.masterMode || CalamityWorld.revenge), ModContent.ItemType<DraedonRelic>()));
|
||||
|
||||
// Lore item
|
||||
mainDrops.Add(ItemDropRule.ByCondition(DropHelper.If(() => !DownedBossSystem.downedExoMechs), ModContent.ItemType<KnowledgeExoMechs>()));
|
||||
mainDrops.Add(ItemDropRule.ByCondition(DropHelper.If(() => !DownedBossSystem.downedExoMechs, desc: DropHelper.FirstKillText), ModContent.ItemType<KnowledgeExoMechs>()));
|
||||
|
||||
// Treasure bag
|
||||
npcLoot.Add(ItemDropRule.BossBagByCondition(DropHelper.If(CanDropLoot), ModContent.ItemType<DraedonBag>()));
|
||||
|
||||
@@ -1167,7 +1167,7 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<HiveMindRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedHiveMind, ModContent.ItemType<KnowledgeHiveMind>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedHiveMind, ModContent.ItemType<KnowledgeHiveMind>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -805,8 +805,8 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
|
||||
// Lore
|
||||
bool shouldDropLore(DropAttemptInfo info) => !DownedBossSystem.downedLeviathan && LastAnLStanding();
|
||||
npcLoot.AddConditionalPerPlayer(shouldDropLore, ModContent.ItemType<KnowledgeOcean>());
|
||||
npcLoot.AddConditionalPerPlayer(shouldDropLore, ModContent.ItemType<KnowledgeLeviathanAnahita>());
|
||||
npcLoot.AddConditionalPerPlayer(shouldDropLore, ModContent.ItemType<KnowledgeOcean>(), desc: DropHelper.FirstKillText);
|
||||
npcLoot.AddConditionalPerPlayer(shouldDropLore, ModContent.ItemType<KnowledgeLeviathanAnahita>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -451,7 +451,7 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<OldDukeRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedBoomerDuke, ModContent.ItemType<KnowledgeOldDuke>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedBoomerDuke, ModContent.ItemType<KnowledgeOldDuke>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
|
||||
|
||||
@@ -545,7 +545,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<PerforatorsRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedPerforator, ModContent.ItemType<KnowledgePerforators>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedPerforator, ModContent.ItemType<KnowledgePerforators>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
|
||||
@@ -1283,7 +1283,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<PlaguebringerGoliathRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedPlaguebringer, ModContent.ItemType<KnowledgePlaguebringerGoliath>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedPlaguebringer, ModContent.ItemType<KnowledgePlaguebringerGoliath>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
|
||||
|
||||
@@ -1052,7 +1052,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<PolterghastRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedPolterghast, ModContent.ItemType<KnowledgePolterghast>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedPolterghast, ModContent.ItemType<KnowledgePolterghast>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
|
||||
|
||||
@@ -516,7 +516,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<ProfanedGuardiansRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedGuardians, ModContent.ItemType<KnowledgeProfanedGuardians>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedGuardians, ModContent.ItemType<KnowledgeProfanedGuardians>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override void OnKill()
|
||||
|
||||
@@ -1607,7 +1607,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<ProvidenceRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedProvidence, ModContent.ItemType<KnowledgeProvidence>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedProvidence, ModContent.ItemType<KnowledgeProvidence>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
private void SpawnLootBox()
|
||||
|
||||
@@ -885,7 +885,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<RavagerRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedRavager, ModContent.ItemType<KnowledgeRavager>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedRavager, ModContent.ItemType<KnowledgeRavager>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -809,7 +809,7 @@ namespace CalamityMod.NPCs.Signus
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<SignusRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(LastSentinelKilled, ModContent.ItemType<KnowledgeSentinels>());
|
||||
npcLoot.AddConditionalPerPlayer(LastSentinelKilled, ModContent.ItemType<KnowledgeSentinels>(), desc: DropHelper.SentinelText);
|
||||
}
|
||||
|
||||
public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
|
||||
|
||||
@@ -608,7 +608,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<SlimeGodRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedSlimeGod, ModContent.ItemType<KnowledgeSlimeGod>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedSlimeGod, ModContent.ItemType<KnowledgeSlimeGod>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -984,7 +984,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<StormWeaverRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(LastSentinelKilled, ModContent.ItemType<KnowledgeSentinels>());
|
||||
npcLoot.AddConditionalPerPlayer(LastSentinelKilled, ModContent.ItemType<KnowledgeSentinels>(), desc: DropHelper.SentinelText);
|
||||
}
|
||||
|
||||
public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
|
||||
|
||||
@@ -2590,7 +2590,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<CalamitasRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedSCal, ModContent.ItemType<KnowledgeCalamitas>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedSCal, ModContent.ItemType<KnowledgeCalamitas>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -2844,7 +2844,7 @@ namespace CalamityMod.NPCs.Yharon
|
||||
npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType<YharonRelic>());
|
||||
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedYharon, ModContent.ItemType<KnowledgeYharon>());
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedYharon, ModContent.ItemType<KnowledgeYharon>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override void BossLoot(ref string name, ref int potionType)
|
||||
|
||||
+15
-4
@@ -110,6 +110,13 @@ namespace CalamityMod
|
||||
public static readonly Fraction BagWeaponDropRateFraction = new(1, BagWeaponDropRateInt);
|
||||
#endregion
|
||||
|
||||
#region Bestiary Text
|
||||
public static string FirstKillText = "Drops only on the first kill";
|
||||
public static string BloodMoonText = "Drops during the Blood Moon";
|
||||
public static string MechBossText = "Drops on the first kill of the final Mechanical Boss";
|
||||
public static string SentinelText = "Drops on the first kill of the final Sentinel of the Devourer";
|
||||
#endregion
|
||||
|
||||
#region Block Drops
|
||||
private static int[] AllLoadedItemIDs = null;
|
||||
|
||||
@@ -222,10 +229,12 @@ namespace CalamityMod
|
||||
/// <param name="loot">The ILoot interface for the loot table.</param>
|
||||
/// <param name="lambda">A lambda which evaluates in real-time to the condition that needs to be checked.</param>
|
||||
/// <param name="itemID">The item ID to drop.</param>
|
||||
/// <param name="ui">Whether drops registered with this condition appear in the Bestiary. Defaults to true.</param>
|
||||
/// <param name="desc">The description of this condition in the Bestiary. Defaults to null.</param>
|
||||
/// <returns>A LeadingConditionRule which you can attach more PerPlayer or other rules to as you want.</returns>
|
||||
public static LeadingConditionRule AddConditionalPerPlayer(this ILoot loot, Func<bool> lambda, int itemID)
|
||||
public static LeadingConditionRule AddConditionalPerPlayer(this ILoot loot, Func<bool> lambda, int itemID, bool ui = true, string desc = null)
|
||||
{
|
||||
LeadingConditionRule lcr = new(If(lambda));
|
||||
LeadingConditionRule lcr = new(If(lambda, ui, desc));
|
||||
lcr.Add(PerPlayer(itemID));
|
||||
loot.Add(lcr);
|
||||
return lcr;
|
||||
@@ -238,10 +247,12 @@ namespace CalamityMod
|
||||
/// <param name="loot">The ILoot interface for the loot table.</param>
|
||||
/// <param name="lambda">A lambda which evaluates in real-time to the condition that needs to be checked.</param>
|
||||
/// <param name="itemID">The item ID to drop.</param>
|
||||
/// <param name="ui">Whether drops registered with this condition appear in the Bestiary. Defaults to true.</param>
|
||||
/// <param name="desc">The description of this condition in the Bestiary. Defaults to null.</param>
|
||||
/// <returns>A LeadingConditionRule which you can attach more PerPlayer or other rules to as you want.</returns>
|
||||
public static LeadingConditionRule AddConditionalPerPlayer(this ILoot loot, Func<DropAttemptInfo, bool> lambda, int itemID)
|
||||
public static LeadingConditionRule AddConditionalPerPlayer(this ILoot loot, Func<DropAttemptInfo, bool> lambda, int itemID, bool ui = true, string desc = null)
|
||||
{
|
||||
LeadingConditionRule lcr = new(If(lambda));
|
||||
LeadingConditionRule lcr = new(If(lambda, ui, desc));
|
||||
lcr.Add(PerPlayer(itemID));
|
||||
loot.Add(lcr);
|
||||
return lcr;
|
||||
|
||||
Reference in new issue
Block a user