Minor fixes and catches for Iban's loot porting (thanks!)
This commit is contained in:
1 parent
2329daad4f
commit
548c836ce4
9 files changed
+116
-104
No files matched your search
@@ -1,6 +1,6 @@
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Critters;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using CalamityMod.Items.Potions;
|
||||
@@ -11,10 +11,9 @@ using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.Tiles.Astral;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.GameContent.ItemDropRules;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using System;
|
||||
|
||||
namespace CalamityMod.Items.Fishing.AstralCatches
|
||||
{
|
||||
@@ -49,7 +48,7 @@ namespace CalamityMod.Items.Fishing.AstralCatches
|
||||
var postAstrumAureus = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAstrumAureus);
|
||||
var postAstrumDeus = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAstrumDeus);
|
||||
|
||||
//Materials
|
||||
// Materials
|
||||
itemLoot.Add(ModContent.ItemType<Stardust>(), 1, 5, 10);
|
||||
itemLoot.Add(ItemID.FallenStar, 1, 5, 10);
|
||||
itemLoot.Add(ItemID.Meteorite, 5, 10, 20);
|
||||
@@ -60,31 +59,32 @@ namespace CalamityMod.Items.Fishing.AstralCatches
|
||||
postAstrumDeus.Add(ModContent.ItemType<AstralBar>(), 10, 1, 3);
|
||||
postAstrumDeus.Add(ModContent.ItemType<MeldBlob>(), 4, 5, 10);
|
||||
|
||||
//Weapons
|
||||
postAstrumAureus.Add(new OneFromOptionsNotScaledWithLuckDropRule(10, 1,
|
||||
ModContent.ItemType<StellarKnife>(),
|
||||
ModContent.ItemType<AstralachneaStaff>(),
|
||||
ModContent.ItemType<TitanArm>(),
|
||||
ModContent.ItemType<HivePod>(),
|
||||
// Weapons (and Starburster Core)
|
||||
postAstrumAureus.Add(new OneFromOptionsDropRule(10, 1,
|
||||
ModContent.ItemType<AstralScythe>(),
|
||||
ModContent.ItemType<TitanArm>(),
|
||||
ModContent.ItemType<StellarCannon>(),
|
||||
ModContent.ItemType<StarbusterCore>()));
|
||||
ModContent.ItemType<AstralachneaStaff>(),
|
||||
ModContent.ItemType<HivePod>(),
|
||||
ModContent.ItemType<StellarKnife>(),
|
||||
ModContent.ItemType<StarbusterCore>()
|
||||
));
|
||||
|
||||
//Pet
|
||||
// Pet
|
||||
itemLoot.Add(ModContent.ItemType<AstrophageItem>(), 10);
|
||||
|
||||
//Bait
|
||||
// Bait
|
||||
itemLoot.Add(ModContent.ItemType<TwinklerItem>(), 5, 1, 3);
|
||||
itemLoot.Add(ItemID.EnchantedNightcrawler, 5, 1, 3);
|
||||
itemLoot.Add(ModContent.ItemType<ArcturusAstroidean>(), 5, 1, 3);
|
||||
itemLoot.Add(ItemID.Firefly, 3, 1, 3);
|
||||
|
||||
//Potions
|
||||
// Potions
|
||||
postAstrumAureus.Add(ModContent.ItemType<AstralInjection>(), 10, 1, 3);
|
||||
postAstrumAureus.Add(ModContent.ItemType<GravityNormalizerPotion>(), 10, 1, 3);
|
||||
itemLoot.AddCratePotionRules();
|
||||
|
||||
//Money
|
||||
// Money
|
||||
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
|
||||
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
|
||||
}
|
||||
|
||||
@@ -35,28 +35,26 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
|
||||
public override bool CanRightClick() => true;
|
||||
public override void ModifyItemLoot(ItemLoot itemLoot)
|
||||
{
|
||||
//Vanilla materials
|
||||
// Materials
|
||||
itemLoot.Add(ItemID.Obsidian, 1, 2, 5);
|
||||
itemLoot.Add(ItemID.Hellstone, 4, 2, 5);
|
||||
itemLoot.Add(ItemID.HellstoneBar, 10, 1, 3);
|
||||
|
||||
//Modded materials
|
||||
itemLoot.Add(ModContent.ItemType<DemonicBoneAsh>(), 1, 1, 4);
|
||||
itemLoot.AddIf(() => DownedBossSystem.downedBrimstoneElemental, ModContent.ItemType<UnholyCore>(), 10, 1, 3);
|
||||
itemLoot.AddIf(() => DownedBossSystem.downedProvidence && DownedBossSystem.downedPolterghast, ModContent.ItemType<Bloodstone>(), 10, 1, 3);
|
||||
itemLoot.AddIf(() => DownedBossSystem.downedProvidence, ModContent.ItemType<Bloodstone>(), 10, 1, 3);
|
||||
|
||||
// Weapons (none)
|
||||
|
||||
//Bait
|
||||
// Bait
|
||||
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
|
||||
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
|
||||
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
|
||||
|
||||
//Potions
|
||||
// Potions
|
||||
itemLoot.Add(ItemID.InfernoPotion, 10, 1, 3);
|
||||
itemLoot.AddCratePotionRules();
|
||||
|
||||
//Money
|
||||
// Money
|
||||
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
|
||||
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
|
||||
}
|
||||
|
||||
@@ -28,17 +28,16 @@ namespace CalamityMod.Items.Fishing
|
||||
{
|
||||
int gemMin = 1;
|
||||
int gemMax = 3;
|
||||
|
||||
itemLoot.Add(ItemID.Amethyst, 2, gemMin, gemMax);
|
||||
itemLoot.Add(ItemID.Topaz, new Fraction(4, 10), gemMin, gemMax);
|
||||
itemLoot.Add(ItemID.Sapphire, new Fraction(3, 10), gemMin, gemMax);
|
||||
itemLoot.Add(ItemID.Emerald, 5, gemMin, gemMax);
|
||||
itemLoot.Add(ItemID.Ruby, new Fraction(15, 100), gemMin, gemMax);
|
||||
itemLoot.Add(ItemID.Topaz, 2, gemMin, gemMax);
|
||||
itemLoot.Add(ItemID.Sapphire, 4, gemMin, gemMax);
|
||||
itemLoot.Add(ItemID.Emerald, 4, gemMin, gemMax);
|
||||
itemLoot.Add(ItemID.Ruby, 8, gemMin, gemMax);
|
||||
itemLoot.Add(ItemID.Diamond, 10, gemMin, gemMax);
|
||||
itemLoot.Add(ItemID.Amber, 4, gemMin, gemMax);
|
||||
itemLoot.Add(ItemID.Amber, 8, gemMin, gemMax);
|
||||
|
||||
Mod thorium = CalamityMod.Instance.thorium;
|
||||
if (thorium != null)
|
||||
if (thorium is not null)
|
||||
{
|
||||
itemLoot.Add(thorium.Find<ModItem>("Pearl").Type, 4, gemMin, gemMax);
|
||||
itemLoot.Add(thorium.Find<ModItem>("Opal").Type, 4, gemMin, gemMax);
|
||||
|
||||
@@ -31,40 +31,44 @@ namespace CalamityMod.Items.Fishing
|
||||
int seedMin = 2;
|
||||
int seedMax = 5;
|
||||
|
||||
//Herbs
|
||||
// Herbs
|
||||
itemLoot.Add(ItemID.Daybloom, 4, herbMin, herbMax);
|
||||
itemLoot.Add(ItemID.Moonglow, 4, herbMin, herbMax);
|
||||
itemLoot.Add(ItemID.Waterleaf, 4, herbMin, herbMax);
|
||||
itemLoot.Add(ItemID.Deathweed, 4, herbMin, herbMax);
|
||||
itemLoot.Add(ItemID.Shiverthorn, 4, herbMin, herbMax);
|
||||
itemLoot.Add(ItemID.Fireblossom, 4, herbMin, herbMax);
|
||||
itemLoot.Add(ItemID.Blinkroot, 4, herbMin, herbMax);
|
||||
//Herb seeds
|
||||
itemLoot.Add(ItemID.Waterleaf, 4, herbMin, herbMax);
|
||||
itemLoot.Add(ItemID.Shiverthorn, 4, herbMin, herbMax);
|
||||
itemLoot.Add(ItemID.Moonglow, 4, herbMin, herbMax);
|
||||
itemLoot.Add(ItemID.Deathweed, 4, herbMin, herbMax);
|
||||
itemLoot.Add(ItemID.Fireblossom, 4, herbMin, herbMax);
|
||||
|
||||
// Herb seeds
|
||||
itemLoot.Add(ItemID.DaybloomSeeds, 5, seedMin, seedMax);
|
||||
itemLoot.Add(ItemID.MoonglowSeeds, 5, seedMin, seedMax);
|
||||
itemLoot.Add(ItemID.BlinkrootSeeds, 5, seedMin, seedMax);
|
||||
itemLoot.Add(ItemID.WaterleafSeeds, 5, seedMin, seedMax);
|
||||
itemLoot.Add(ItemID.ShiverthornSeeds, 5, seedMin, seedMax);
|
||||
itemLoot.Add(ItemID.MoonglowSeeds, 5, seedMin, seedMax);
|
||||
itemLoot.Add(ItemID.DeathweedSeeds, 5, herbMin, herbMax);
|
||||
itemLoot.Add(ItemID.FireblossomSeeds, 5, seedMin, seedMax);
|
||||
itemLoot.Add(ItemID.BlinkrootSeeds, 5, seedMin, seedMax);
|
||||
//Misc seeds
|
||||
|
||||
// Miscellaneous seeds
|
||||
itemLoot.Add(ItemID.GrassSeeds, 10, seedMin, seedMax);
|
||||
itemLoot.Add(ItemID.JungleGrassSeeds, 10, seedMin, seedMax);
|
||||
itemLoot.Add(ItemID.MushroomGrassSeeds, 10, seedMin, seedMax);
|
||||
itemLoot.Add(ItemID.PumpkinSeed, 20, seedMin, seedMax);
|
||||
//Spreadin biome seeds
|
||||
|
||||
// Biome grass seeds
|
||||
itemLoot.AddIf(() => !WorldGen.crimson , ItemID.CorruptSeeds, 20, seedMin, seedMax);
|
||||
itemLoot.AddIf(() => WorldGen.crimson , ItemID.CrimsonSeeds, 20, seedMin, seedMax);
|
||||
itemLoot.AddIf(() => Main.hardMode , ItemID.HallowedSeeds, 20, seedMin, seedMax);
|
||||
|
||||
Mod thorium = CalamityMod.Instance.thorium;
|
||||
if (thorium != null)
|
||||
if (thorium is not null)
|
||||
{
|
||||
itemLoot.Add(thorium.Find<ModItem>("MarineKelp").Type, 4, herbMin, herbMax);
|
||||
itemLoot.Add(thorium.Find<ModItem>("MarineKelpSeeds").Type, 10, seedMin, seedMax);
|
||||
}
|
||||
|
||||
Mod soa = CalamityMod.Instance.soa;
|
||||
if (soa != null)
|
||||
if (soa is not null)
|
||||
{
|
||||
itemLoot.Add(soa.Find<ModItem>("Welkinbell").Type, 4, herbMin, herbMax);
|
||||
itemLoot.Add(soa.Find<ModItem>("WelkinbellSeeds").Type, 10, seedMin, seedMax);
|
||||
@@ -74,8 +78,8 @@ namespace CalamityMod.Items.Fishing
|
||||
|
||||
// TODO -- There is no way to determine if SoA's Abaddon is dead without reflection.
|
||||
// Dan Yami has confirmed that downed calls will be added to SoA eventually.
|
||||
//DropHelper.DropItemCondition(s, player, shadowsOfAbaddon.ItemType("Enduflora"), SacredTools.ModdedWorld.downedAbaddon, 0.25f, herbMin, herbMax);
|
||||
//DropHelper.DropItemCondition(s, player, shadowsOfAbaddon.ItemType("EndufloraSeeds"), SacredTools.ModdedWorld.downedAbaddon, 0.1f, seedMin, seedMax);
|
||||
//itemLoot.AddIf(() => SacredTools.ModdedWorld.downedAbaddon, soa.Find<ModItem>("Enduflora").Type, 4, herbMin, herbMax);
|
||||
//itemLoot.AddIf(() => SacredTools.ModdedWorld.downedAbaddon, soa.Find<ModItem>("EndufloraSeeds").Type, 10, seedMin, seedMax);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
|
||||
public override bool CanRightClick() => true;
|
||||
public override void ModifyItemLoot(ItemLoot itemLoot)
|
||||
{
|
||||
//LCRs.
|
||||
// The contents of this crate depend massively on progression, so it uses a large number of LeadingConditionRules.
|
||||
var tier1AbyssAvailable = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedSlimeGod || Main.hardMode);
|
||||
var tier2AbyssAvailable = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedCalamitas);
|
||||
var scoriaAvailable = itemLoot.DefineConditionalDropSet(() => NPC.downedGolemBoss);
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
|
||||
var tier2AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAquaticScourgeAcidRain);
|
||||
var tier3AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedPolterghast && DownedBossSystem.downedBoomerDuke);
|
||||
|
||||
//Materials
|
||||
// Materials
|
||||
itemLoot.Add(ModContent.ItemType<SulphurousSand>(), 1, 5, 10);
|
||||
itemLoot.Add(ModContent.ItemType<SulphurousSandstone>(), 1, 5, 10);
|
||||
itemLoot.Add(ModContent.ItemType<HardenedSulphurousSandstone>(), 1, 5, 10);
|
||||
@@ -71,41 +71,45 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
|
||||
scoriaAvailable.Add(ModContent.ItemType<ScoriaBar>(), new Fraction(15, 100), 4, 7);
|
||||
tier3AcidRain.Add(ModContent.ItemType<ReaperTooth>(), 10, 1, 5);
|
||||
|
||||
// Weapons
|
||||
tier1AbyssAvailable.Add(new OneFromOptionsNotScaledWithLuckDropRule(10, 1,
|
||||
ModContent.ItemType<Archerfish>(),
|
||||
// Pre-HM Abyss Weapons
|
||||
tier1AbyssAvailable.Add(new OneFromOptionsDropRule(10, 1,
|
||||
ModContent.ItemType<BallOFugu>(),
|
||||
ModContent.ItemType<Archerfish>(),
|
||||
ModContent.ItemType<BlackAnurian>(),
|
||||
ModContent.ItemType<HerringStaff>(),
|
||||
ModContent.ItemType<Lionfish>(),
|
||||
ModContent.ItemType<BlackAnurian>()));
|
||||
ModContent.ItemType<Lionfish>()
|
||||
));
|
||||
|
||||
lcrT2AcidRain.Add(new OneFromOptionsNotScaledWithLuckDropRule(10, 1,
|
||||
ModContent.ItemType<SkyfinBombers>(),
|
||||
ModContent.ItemType<NuclearRod>(),
|
||||
// Post-AS Acid Rain Weapons (and Nuclear Rod)
|
||||
tier2AcidRain.Add(new OneFromOptionsDropRule(10, 1,
|
||||
ModContent.ItemType<SulphurousGrabber>(),
|
||||
ModContent.ItemType<FlakToxicannon>(),
|
||||
ModContent.ItemType<SpentFuelContainer>(),
|
||||
ModContent.ItemType<BelchingSaxophone>(),
|
||||
ModContent.ItemType<SlitheringEels>(),
|
||||
ModContent.ItemType<BelchingSaxophone>()));
|
||||
ModContent.ItemType<SkyfinBombers>(),
|
||||
ModContent.ItemType<SpentFuelContainer>(),
|
||||
ModContent.ItemType<NuclearRod>()
|
||||
));
|
||||
|
||||
// Equipment
|
||||
tier1AbyssAvailable.Add(new OneFromOptionsNotScaledWithLuckDropRule(4, 1,
|
||||
ModContent.ItemType<StrangeOrb>(),
|
||||
// Pre-HM Abyss Equipment (and Torrential Tear)
|
||||
tier1AbyssAvailable.Add(new OneFromOptionsDropRule(4, 1,
|
||||
ModContent.ItemType<AnechoicPlating>(),
|
||||
ModContent.ItemType<DepthCharm>(),
|
||||
ModContent.ItemType<IronBoots>(),
|
||||
ModContent.ItemType<AnechoicPlating>(),
|
||||
ModContent.ItemType<TorrentialTear>()));
|
||||
ModContent.ItemType<StrangeOrb>(),
|
||||
ModContent.ItemType<TorrentialTear>()
|
||||
));
|
||||
|
||||
//Bait
|
||||
// Bait
|
||||
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
|
||||
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
|
||||
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
|
||||
|
||||
//Potions
|
||||
// Potions
|
||||
itemLoot.Add(ModContent.ItemType<AnechoicCoating>(), 10, 1, 3);
|
||||
itemLoot.AddCratePotionRules();
|
||||
|
||||
//Money
|
||||
// Money
|
||||
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
|
||||
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
|
||||
}
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Critters;
|
||||
using CalamityMod.Items.Critters;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.Tiles.SunkenSea;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.ItemDropRules;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.GameContent.ItemDropRules;
|
||||
|
||||
namespace CalamityMod.Items.Fishing.SunkenSeaCatches
|
||||
{
|
||||
@@ -31,7 +29,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
|
||||
Item.height = 32;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
Item.value = Item.sellPrice(gold: 1);
|
||||
Item.createTile = ModContent.TileType<SunkenCrateTile>();
|
||||
Item.createTile = ModContent.TileType<Tiles.SunkenSea.SunkenCrateTile>();
|
||||
Item.useTurn = true;
|
||||
Item.autoReuse = true;
|
||||
Item.useAnimation = 15;
|
||||
@@ -45,30 +43,31 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
|
||||
var postDesertScourge = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedCLAMHardMode);
|
||||
var postHardmodeClam = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedCLAMHardMode);
|
||||
|
||||
|
||||
itemLoot.Add(ModContent.ItemType<Items.Placeables.Navystone>(), 1, 10, 30);
|
||||
itemLoot.Add(ModContent.ItemType<Items.Placeables.EutrophicSand>(), 1, 10, 30);
|
||||
// Materials
|
||||
itemLoot.Add(ModContent.ItemType<Navystone>(), 1, 10, 30);
|
||||
itemLoot.Add(ModContent.ItemType<EutrophicSand>(), 1, 10, 30);
|
||||
postDesertScourge.Add(ModContent.ItemType<PrismShard>(), 1, 5, 10);
|
||||
postDesertScourge.Add(ModContent.ItemType<Items.Placeables.SeaPrism>(), 5, 2, 5);
|
||||
postDesertScourge.Add(ModContent.ItemType<SeaPrism>(), 5, 2, 5);
|
||||
postHardmodeClam.Add(ModContent.ItemType<MolluskHusk>(), new Fraction(12, 100), 2, 5);
|
||||
|
||||
// Weapons
|
||||
postHardmodeClam.Add(new OneFromOptionsNotScaledWithLuckDropRule(7, 100,
|
||||
ModContent.ItemType<ShellfishStaff>(),
|
||||
ModContent.ItemType<ClamCrusher>(),
|
||||
ModContent.ItemType<ClamorRifle>(),
|
||||
ModContent.ItemType<Poseidon>(),
|
||||
ModContent.ItemType<ClamorRifle>()));
|
||||
ModContent.ItemType<ShellfishStaff>()
|
||||
));
|
||||
|
||||
//Bait
|
||||
// Bait
|
||||
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
|
||||
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
|
||||
itemLoot.Add(ModContent.ItemType<SeaMinnowItem>(), 5, 1, 3);
|
||||
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
|
||||
|
||||
//Potions
|
||||
// Potions
|
||||
itemLoot.AddCratePotionRules();
|
||||
|
||||
//Money
|
||||
// Money
|
||||
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
|
||||
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,6 @@ namespace CalamityMod.Items.TreasureBags
|
||||
ModContent.ItemType<CadaverousCarrion>(),
|
||||
ModContent.ItemType<ToxicantTwister>()
|
||||
}));
|
||||
|
||||
itemLoot.Add(ModContent.ItemType<TheReaper>(), 10);
|
||||
|
||||
// Equipment
|
||||
|
||||
+4
-3
@@ -271,11 +271,12 @@ namespace CalamityMod.NPCs.Astral
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
{
|
||||
var exploded = npcLoot.DefineConditionalDropSet((info) => info.npc.ai[3] <= -10000f);
|
||||
var notExploded = npcLoot.DefineConditionalDropSet((info) => info.npc.ai[3] > -10000f);
|
||||
|
||||
notExploded.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType<Stardust>(), 1, 2, 3, 3, 4));
|
||||
notExploded.Add(ItemDropRule.ByCondition(DropHelper.If(() => DownedBossSystem.downedAstrumAureus), ModContent.ItemType<StellarCannon>(), 7));
|
||||
// 2-3 Stardust (3-4 Expert+)
|
||||
exploded.OnFailedConditions(DropHelper.NormalVsExpertQuantity(ModContent.ItemType<Stardust>(), 1, 2, 3, 3, 4));
|
||||
exploded.OnFailedConditions(ItemDropRule.ByCondition(DropHelper.If(() => DownedBossSystem.downedAstrumAureus), ModContent.ItemType<StellarCannon>(), 7));
|
||||
|
||||
// If exploded, then have a chance to drop Glorious End and nothing else
|
||||
exploded.Add(ModContent.ItemType<GloriousEnd>(), 7);
|
||||
}
|
||||
|
||||
|
||||
+29
-21
@@ -253,15 +253,19 @@ namespace CalamityMod
|
||||
return new DropBasedOnExpertMode(normalRule, expertRule);
|
||||
}
|
||||
|
||||
public static LeadingConditionRule GetRevBagAccessoryRule()
|
||||
/// <summary>
|
||||
/// Adds the Revengeance Mode bag accessories to the given loot table.
|
||||
/// </summary>
|
||||
/// <param name="loot">The ILoot interface for the loot table.</param>
|
||||
public static void AddRevBagAccessories(this ILoot loot)
|
||||
{
|
||||
var lcr = new LeadingConditionRule(If(() => CalamityWorld.revenge));
|
||||
lcr.Add(new OneFromOptionsNotScaledWithLuckDropRule(20, 1, ModContent.ItemType<Laudanum>(), ModContent.ItemType<HeartofDarkness>(), ModContent.ItemType<StressPills>()));
|
||||
return lcr;
|
||||
lcr.Add(new OneFromOptionsDropRule(20, 1, ModContent.ItemType<Laudanum>(), ModContent.ItemType<HeartofDarkness>(), ModContent.ItemType<StressPills>()));
|
||||
loot.Add(lcr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds all the common potions from fishing crates, alongside scaling mana & regen potions
|
||||
/// Adds all the common potions for fishing crates, alongside scaling mana and regen potions
|
||||
/// </summary>
|
||||
/// <param name="loot">The ILoot interface for the loot table.</param>
|
||||
public static void AddCratePotionRules(this ILoot loot)
|
||||
@@ -273,26 +277,30 @@ namespace CalamityMod
|
||||
loot.Add(ItemID.ShinePotion, 10, 1, 3);
|
||||
loot.Add(ItemID.MiningPotion, 10, 1, 3);
|
||||
loot.Add(ItemID.HeartreachPotion, 10, 1, 3);
|
||||
loot.Add(ItemID.TrapsightPotion, 10, 1, 3); //Dangersense Potion
|
||||
loot.Add(ItemID.TrapsightPotion, 10, 1, 3); // Dangersense Potion
|
||||
|
||||
//This is quite ugly
|
||||
var lcrSupremePotion = new LeadingConditionRule(If(() => DownedBossSystem.downedDoG));
|
||||
var lcrSuperPotion = new LeadingConditionRule(If(() => !DownedBossSystem.downedDoG && DownedBossSystem.downedProvidence));
|
||||
var lcrGreaterPotion = new LeadingConditionRule(If(() => !DownedBossSystem.downedDoG && !DownedBossSystem.downedProvidence && NPC.downedMechBossAny));
|
||||
var lcrRegularPotion = new LeadingConditionRule(If(() => !DownedBossSystem.downedDoG && !DownedBossSystem.downedProvidence && !NPC.downedMechBossAny && NPC.downedBoss3));
|
||||
var lcrLesserPotion = new LeadingConditionRule(If(() => !DownedBossSystem.downedDoG && !DownedBossSystem.downedProvidence && !NPC.downedMechBossAny && !NPC.downedBoss3));
|
||||
// Define all the loot rules for the potion types
|
||||
var supremePots = new OneFromOptionsNotScaledWithLuckDropRule(1, 1, ModContent.ItemType<SupremeHealingPotion>(), ModContent.ItemType<SupremeManaPotion>());
|
||||
var superPots = new OneFromOptionsNotScaledWithLuckDropRule(1, 1, ItemID.SuperHealingPotion, ItemID.SuperManaPotion);
|
||||
var greaterPots = new OneFromOptionsNotScaledWithLuckDropRule(1, 1, ItemID.GreaterHealingPotion, ItemID.GreaterManaPotion);
|
||||
var regularPots = new OneFromOptionsNotScaledWithLuckDropRule(1, 1, ItemID.HealingPotion, ItemID.ManaPotion);
|
||||
var lesserPots = new OneFromOptionsNotScaledWithLuckDropRule(1, 1, ItemID.LesserHealingPotion, ItemID.LesserManaPotion);
|
||||
|
||||
lcrSupremePotion.Add(new OneFromOptionsNotScaledWithLuckDropRule(1, 1, ModContent.ItemType<SupremeHealingPotion>(), ModContent.ItemType<SupremeManaPotion>()));
|
||||
lcrSuperPotion.Add(new OneFromOptionsNotScaledWithLuckDropRule(1, 1, ItemID.SuperHealingPotion, ItemID.SuperManaPotion));
|
||||
lcrGreaterPotion.Add(new OneFromOptionsNotScaledWithLuckDropRule(1, 1, ItemID.GreaterHealingPotion, ItemID.GreaterManaPotion));
|
||||
lcrRegularPotion.Add(new OneFromOptionsNotScaledWithLuckDropRule(1, 1, ItemID.HealingPotion, ItemID.ManaPotion));
|
||||
lcrLesserPotion.Add(new OneFromOptionsNotScaledWithLuckDropRule(1, 1, ItemID.LesserHealingPotion, ItemID.LesserManaPotion));
|
||||
// Chained LeadingConditionRules achieve the equivalent of "if killed X, else if killed Y, else if killed Z, else..."
|
||||
var lcrSupremePotion = loot.DefineConditionalDropSet(() => DownedBossSystem.downedDoG);
|
||||
var lcrSuperPotion = new LeadingConditionRule(If(() => DownedBossSystem.downedProvidence));
|
||||
var lcrGreaterPotion = new LeadingConditionRule(If(() => NPC.downedMechBossAny));
|
||||
var lcrRegularPotion = new LeadingConditionRule(If(() => NPC.downedBoss3));
|
||||
|
||||
loot.Add(lcrSupremePotion);
|
||||
loot.Add(lcrSuperPotion);
|
||||
loot.Add(lcrGreaterPotion);
|
||||
loot.Add(lcrRegularPotion);
|
||||
loot.Add(lcrLesserPotion);
|
||||
// Actually chain all the LCRs together
|
||||
lcrSupremePotion.Add(supremePots);
|
||||
lcrSupremePotion.OnFailedConditions(lcrSuperPotion);
|
||||
lcrSuperPotion.Add(superPots);
|
||||
lcrSuperPotion.OnFailedConditions(lcrGreaterPotion);
|
||||
lcrGreaterPotion.Add(greaterPots);
|
||||
lcrGreaterPotion.OnFailedConditions(lcrRegularPotion);
|
||||
lcrRegularPotion.Add(regularPots);
|
||||
lcrRegularPotion.OnFailedConditions(lesserPots);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in new issue
Block a user