Fishing changes (#955)
See PR for details. Squashed due to illegal rebase.
This commit is contained in:
1 parent
30a704bf02
commit
bd850464d1
22 files changed
+757
-1060
No files matched your search
+227
-523
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items.Accessories;
|
||||
@@ -27,20 +28,52 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
public partial class CalamityPlayer : ModPlayer
|
||||
{
|
||||
#region Modify Fishing Attempt
|
||||
public override void ModifyFishingAttempt(ref FishingAttempt attempt)
|
||||
{
|
||||
if (enchantedPearl)
|
||||
{
|
||||
// If the player fails to roll a crate naturally and has Enchanted Pearl, reroll
|
||||
// Stacking with existing probability, it should increase chances by 15% (12.5% with Crate Potion)
|
||||
if (!attempt.crate)
|
||||
attempt.crate = Main.rand.NextBool(6);
|
||||
|
||||
// If the player does get a crate (can be from the reroll above), give it increased chances of being rarer
|
||||
if (attempt.crate)
|
||||
{
|
||||
int uncommonRate = Math.Clamp(240 / attempt.fishingLevel, 3, 240); // Iron/Mythril (originally 300)
|
||||
attempt.uncommon = Main.rand.NextBool(uncommonRate);
|
||||
int rareRate = Math.Clamp(840 / attempt.fishingLevel, 4, 840); // Biome (originally 1050)
|
||||
attempt.uncommon = Main.rand.NextBool(rareRate);
|
||||
int veryRareRate = Math.Clamp(1800 / attempt.fishingLevel, 5, 1800); // Golden/Titanium (originally 2250)
|
||||
attempt.uncommon = Main.rand.NextBool(veryRareRate);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Catch Fish
|
||||
public override void CatchFish(FishingAttempt attempt, ref int itemDrop, ref int npcSpawn, ref AdvancedPopupRequest sonar, ref Vector2 sonarPosition)
|
||||
{
|
||||
// If vanilla catches an enemy, just immediately cancel
|
||||
if (npcSpawn > 0)
|
||||
return;
|
||||
|
||||
int bait = attempt.playerFishingConditions.BaitItemType;
|
||||
int power = attempt.playerFishingConditions.BaitPower + attempt.playerFishingConditions.PolePower;
|
||||
int power = attempt.fishingLevel;
|
||||
int questFish = attempt.questFish;
|
||||
int poolSize = attempt.waterTilesCount;
|
||||
bool water = !attempt.inHoney && !attempt.inLava;
|
||||
bool lava = attempt.inLava;
|
||||
bool honey = attempt.inHoney;
|
||||
|
||||
// If vanilla catches an enemy, just cancel
|
||||
if (npcSpawn > 0)
|
||||
return;
|
||||
bool sky = attempt.heightLevel == 0;
|
||||
bool surface = attempt.heightLevel == 1;
|
||||
bool underground = attempt.heightLevel == 2;
|
||||
bool cavern = attempt.heightLevel == 3;
|
||||
bool underworld = attempt.heightLevel == 4;
|
||||
|
||||
// Custom rate; increased by Enchanted Pearl
|
||||
bool grabBagFish = attempt.uncommon && Main.rand.Next(100) < (enchantedPearl ? 30 : 15);
|
||||
|
||||
// Set up for allowing fishing in the Sulphurous Sea
|
||||
Point point = Player.Center.ToTileCoordinates();
|
||||
@@ -58,538 +91,210 @@ namespace CalamityMod.CalPlayer
|
||||
if (ZoneAbyss || ZoneSulphur)
|
||||
canSulphurFish = true;
|
||||
|
||||
// Old Duke spawn
|
||||
if (canSulphurFish && bait == ModContent.ItemType<BloodwormItem>() && water && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
CalamityGlobalNPC.OldDukeSpawn(Player.whoAmI, ModContent.NPCType<OldDuke>(), bait);
|
||||
}
|
||||
|
||||
// Don't do anything if you can't fish in lava
|
||||
if (!attempt.CanFishInLava && lava)
|
||||
return;
|
||||
|
||||
// If you caught junk, then ignore all Calamity catches
|
||||
if (itemDrop == ItemID.OldShoe || itemDrop == ItemID.FishingSeaweed || itemDrop == ItemID.TinCan)
|
||||
return;
|
||||
|
||||
// Handle our modded Quest Fish, You can catch these in any liquid... because I don't care if you can
|
||||
if (ZoneSunkenSea && questFish == ModContent.ItemType<EutrophicSandfish>() && attempt.uncommon)
|
||||
{
|
||||
itemDrop = ModContent.ItemType<EutrophicSandfish>();
|
||||
return;
|
||||
}
|
||||
if (ZoneSunkenSea && questFish == ModContent.ItemType<SurfClam>() && attempt.uncommon)
|
||||
{
|
||||
itemDrop = ModContent.ItemType<SurfClam>();
|
||||
return;
|
||||
}
|
||||
if (ZoneSunkenSea && questFish == ModContent.ItemType<Serpentuna>() && attempt.uncommon)
|
||||
{
|
||||
itemDrop = ModContent.ItemType<Serpentuna>();
|
||||
return;
|
||||
}
|
||||
if (ZoneCalamity && questFish == ModContent.ItemType<Brimlish>() && attempt.uncommon)
|
||||
{
|
||||
itemDrop = ModContent.ItemType<Brimlish>();
|
||||
return;
|
||||
}
|
||||
if (ZoneCalamity && questFish == ModContent.ItemType<Slurpfish>() && attempt.uncommon)
|
||||
{
|
||||
itemDrop = ModContent.ItemType<Slurpfish>();
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle Alluring Bait's increased chance for Potion Material fish
|
||||
if (alluringBait)
|
||||
{
|
||||
int chanceForPotionFish = 1000 / power;
|
||||
|
||||
if (chanceForPotionFish < 3)
|
||||
chanceForPotionFish = 3;
|
||||
|
||||
if (Main.rand.NextBool(chanceForPotionFish))
|
||||
{
|
||||
List<int> fishList = new List<int>();
|
||||
|
||||
if (lava)
|
||||
{
|
||||
fishList.AddWithCondition<int>(ItemID.FlarefinKoi, !ZoneCalamity);
|
||||
fishList.AddWithCondition<int>(ItemID.Obsidifish, !ZoneCalamity);
|
||||
fishList.AddWithCondition<int>(ModContent.ItemType<CoastalDemonfish>(), ZoneCalamity);
|
||||
fishList.AddWithCondition<int>(ModContent.ItemType<Shadowfish>(), ZoneCalamity);
|
||||
}
|
||||
else if (water)
|
||||
{
|
||||
if (Player.ZoneDirtLayerHeight || Player.ZoneRockLayerHeight)
|
||||
{
|
||||
fishList.Add(ItemID.ArmoredCavefish);
|
||||
fishList.Add(ItemID.Stinkfish);
|
||||
fishList.Add(ItemID.SpecularFish);
|
||||
fishList.AddWithCondition<int>(ItemID.ChaosFish, Player.ZoneHallow);
|
||||
fishList.AddWithCondition<int>(ItemID.VariegatedLardfish, Player.ZoneJungle);
|
||||
}
|
||||
if (Player.ZoneOverworldHeight || Player.ZoneSkyHeight)
|
||||
{
|
||||
fishList.AddWithCondition<int>(ItemID.DoubleCod, Player.ZoneJungle);
|
||||
}
|
||||
fishList.AddWithCondition<int>(ItemID.FrostMinnow, Player.ZoneSnow);
|
||||
fishList.AddWithCondition<int>(ItemID.Ebonkoi, Player.ZoneCorrupt);
|
||||
fishList.AddWithCondition<int>(ItemID.CrimsonTigerfish, Player.ZoneCrimson);
|
||||
fishList.AddWithCondition<int>(ItemID.Hemopiranha, Player.ZoneCrimson);
|
||||
fishList.AddWithCondition<int>(ItemID.PrincessFish, Player.ZoneHallow);
|
||||
fishList.AddWithCondition<int>(ItemID.Prismite, Player.ZoneHallow);
|
||||
fishList.AddWithCondition<int>(ItemID.Damselfish, Player.ZoneSkyHeight);
|
||||
fishList.AddWithCondition<int>(ModContent.ItemType<AldebaranAlewife>(), ZoneAstral);
|
||||
fishList.AddWithCondition<int>(ModContent.ItemType<SunkenSailfish>(), ZoneSunkenSea);
|
||||
fishList.AddWithCondition<int>(ModContent.ItemType<Shadowfish>(), !Main.dayTime && !Player.ZoneSkyHeight);
|
||||
}
|
||||
|
||||
if (fishList.Any())
|
||||
{
|
||||
int fishAmt = fishList.Count;
|
||||
int caughtFish = fishList[Main.rand.Next(fishAmt)];
|
||||
itemDrop = caughtFish;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Handle the increased chance of crates from Enchanted Pearl and the Supreme Fishing Station
|
||||
if (enchantedPearl || fishingStation)
|
||||
{
|
||||
int chanceForCrates = (enchantedPearl ? 10 : 0) +
|
||||
(fishingStation ? 10 : 0);
|
||||
|
||||
int poolSizeAmt = poolSize / 10;
|
||||
if (poolSizeAmt > 100)
|
||||
poolSizeAmt = 100;
|
||||
|
||||
int fishingPowerDivisor = power + poolSizeAmt;
|
||||
|
||||
int chanceForIronCrate = 1000 / fishingPowerDivisor;
|
||||
int chanceForBiomeCrate = 2000 / fishingPowerDivisor;
|
||||
int chanceForGoldCrate = 3000 / fishingPowerDivisor;
|
||||
int chanceForRareItems = 4000 / fishingPowerDivisor;
|
||||
|
||||
if (chanceForIronCrate < 3)
|
||||
chanceForIronCrate = 3;
|
||||
|
||||
if (chanceForBiomeCrate < 4)
|
||||
chanceForBiomeCrate = 4;
|
||||
|
||||
if (chanceForGoldCrate < 5)
|
||||
chanceForGoldCrate = 5;
|
||||
|
||||
if (chanceForRareItems < 6)
|
||||
chanceForRareItems = 6;
|
||||
|
||||
if (lava)
|
||||
{
|
||||
if (Main.rand.Next(100) < chanceForCrates)
|
||||
{
|
||||
if (Main.rand.NextBool(chanceForBiomeCrate))
|
||||
{
|
||||
if (ZoneCalamity)
|
||||
itemDrop = Main.hardMode ? ModContent.ItemType<BrimstoneCrate>() : ModContent.ItemType<SlagCrate>();
|
||||
else
|
||||
itemDrop = Main.hardMode ? ItemID.LavaCrateHard : ItemID.LavaCrate;
|
||||
}
|
||||
if ((Main.rand.NextBool(chanceForRareItems) && enchantedPearl && fishingStation && Player.cratePotion) && ZoneCalamity)
|
||||
{
|
||||
itemDrop = ModContent.ItemType<DragoonDrizzlefish>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (water)
|
||||
{
|
||||
if (Main.rand.Next(100) < chanceForCrates)
|
||||
{
|
||||
if (Main.rand.NextBool(chanceForRareItems) && enchantedPearl && fishingStation && Player.cratePotion)
|
||||
{
|
||||
List<int> rareItemList = new List<int>();
|
||||
|
||||
if (canSulphurFish)
|
||||
{
|
||||
switch (Main.rand.Next(2))
|
||||
{
|
||||
case 0:
|
||||
rareItemList.Add(ModContent.ItemType<AlluringBait>());
|
||||
break;
|
||||
case 1:
|
||||
rareItemList.Add(ModContent.ItemType<AbyssalAmulet>());
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ZoneAstral)
|
||||
{
|
||||
switch (Main.rand.Next(3))
|
||||
{
|
||||
case 0:
|
||||
rareItemList.Add(ModContent.ItemType<GacruxianMollusk>());
|
||||
break;
|
||||
case 1:
|
||||
rareItemList.Add(ModContent.ItemType<PolarisParrotfish>());
|
||||
break;
|
||||
case 2:
|
||||
rareItemList.Add(ModContent.ItemType<UrsaSergeant>());
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ZoneSunkenSea)
|
||||
{
|
||||
switch (Main.rand.Next(3))
|
||||
{
|
||||
case 0:
|
||||
rareItemList.Add(ModContent.ItemType<SerpentsBite>());
|
||||
break;
|
||||
case 1:
|
||||
rareItemList.Add(ModContent.ItemType<RustedJingleBell>());
|
||||
break;
|
||||
case 2:
|
||||
rareItemList.Add(ModContent.ItemType<SparklingEmpress>());
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (Player.ZoneSnow && Player.ZoneRockLayerHeight && (Player.ZoneCorrupt || Player.ZoneCrimson || Player.ZoneHallow))
|
||||
{
|
||||
rareItemList.Add(ItemID.ScalyTruffle);
|
||||
}
|
||||
rareItemList.AddWithCondition<int>(ItemID.Toxikarp, Player.ZoneCorrupt);
|
||||
rareItemList.AddWithCondition<int>(ItemID.Bladetongue, Player.ZoneCrimson);
|
||||
rareItemList.AddWithCondition<int>(ItemID.CrystalSerpent, Player.ZoneHallow);
|
||||
|
||||
if (rareItemList.Any())
|
||||
{
|
||||
int rareItemAmt = rareItemList.Count;
|
||||
int caughtRareItem = rareItemList[Main.rand.Next(rareItemAmt)];
|
||||
itemDrop = caughtRareItem;
|
||||
}
|
||||
}
|
||||
else if (Main.rand.NextBool(chanceForGoldCrate))
|
||||
{
|
||||
itemDrop = Main.hardMode ? ItemID.GoldenCrateHard : ItemID.GoldenCrate;
|
||||
}
|
||||
else if (Main.rand.NextBool(chanceForBiomeCrate))
|
||||
{
|
||||
List<int> biomeCrateList = new List<int>();
|
||||
|
||||
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ModContent.ItemType<AstralCrate>() : ModContent.ItemType<MonolithCrate>(), ZoneAstral);
|
||||
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ModContent.ItemType<PrismCrate>() : ModContent.ItemType<EutrophicCrate>(), ZoneSunkenSea);
|
||||
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ModContent.ItemType<HydrothermalCrate>() : ModContent.ItemType<SulphurousCrate>(), canSulphurFish);
|
||||
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.CorruptFishingCrateHard : ItemID.CorruptFishingCrate, Player.ZoneCorrupt);
|
||||
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.CrimsonFishingCrateHard : ItemID.CrimsonFishingCrate, Player.ZoneCrimson);
|
||||
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.HallowedFishingCrateHard : ItemID.HallowedFishingCrate, Player.ZoneHallow);
|
||||
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.DungeonFishingCrateHard : ItemID.DungeonFishingCrate, Player.ZoneDungeon);
|
||||
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.JungleFishingCrateHard : ItemID.JungleFishingCrate, Player.ZoneJungle);
|
||||
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.FloatingIslandFishingCrateHard : ItemID.FloatingIslandFishingCrate, Player.ZoneSkyHeight);
|
||||
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.FrozenCrateHard : ItemID.FrozenCrate, Player.ZoneSnow);
|
||||
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.OasisCrateHard : ItemID.OasisCrate, Player.ZoneDesert && !Player.ZoneBeach);
|
||||
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.OceanCrateHard : ItemID.OceanCrate, Player.ZoneBeach);
|
||||
|
||||
if (biomeCrateList.Any())
|
||||
{
|
||||
int biomeCrateAmt = biomeCrateList.Count;
|
||||
int caughtBiomeCrate = biomeCrateList[Main.rand.Next(biomeCrateAmt)];
|
||||
itemDrop = caughtBiomeCrate;
|
||||
}
|
||||
}
|
||||
else if (Main.rand.NextBool(chanceForIronCrate))
|
||||
{
|
||||
itemDrop = Main.hardMode ? ItemID.IronCrateHard : ItemID.IronCrate;
|
||||
}
|
||||
else
|
||||
{
|
||||
itemDrop = Main.hardMode ? ItemID.WoodenCrateHard : ItemID.WoodenCrate;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (water)
|
||||
{
|
||||
// Handle Calamity's crates, veryrare and legendary means it's a Golden Crate
|
||||
if (attempt.crate)
|
||||
{
|
||||
if (attempt.rare && !attempt.veryrare && !attempt.legendary)
|
||||
{
|
||||
if (ZoneAstral)
|
||||
{
|
||||
itemDrop = Main.hardMode ? ModContent.ItemType<AstralCrate>() : ModContent.ItemType<MonolithCrate>();
|
||||
}
|
||||
if (ZoneSunkenSea)
|
||||
{
|
||||
itemDrop = Main.hardMode ? ModContent.ItemType<PrismCrate>() : ModContent.ItemType<EutrophicCrate>();
|
||||
}
|
||||
if (canSulphurFish)
|
||||
{
|
||||
itemDrop = Main.hardMode ? ModContent.ItemType<HydrothermalCrate>() : ModContent.ItemType<SulphurousCrate>();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't override the vanilla crates or any special vanilla fishing loot
|
||||
List<int> keepCatchList = new List<int>()
|
||||
{
|
||||
ItemID.WoodenCrate,
|
||||
ItemID.WoodenCrateHard,
|
||||
ItemID.IronCrate,
|
||||
ItemID.IronCrateHard,
|
||||
ItemID.GoldenCrate,
|
||||
ItemID.GoldenCrateHard,
|
||||
ItemID.FrogLeg,
|
||||
ItemID.BalloonPufferfish,
|
||||
ItemID.ZephyrFish,
|
||||
ItemID.CombatBook,
|
||||
ItemID.CorruptFishingCrate,
|
||||
ItemID.CorruptFishingCrateHard,
|
||||
ItemID.CrimsonFishingCrate,
|
||||
ItemID.CrimsonFishingCrateHard,
|
||||
ItemID.HallowedFishingCrate,
|
||||
ItemID.HallowedFishingCrateHard,
|
||||
ItemID.DungeonFishingCrate,
|
||||
ItemID.DungeonFishingCrateHard,
|
||||
ItemID.JungleFishingCrate,
|
||||
ItemID.JungleFishingCrateHard,
|
||||
ItemID.FloatingIslandFishingCrate,
|
||||
ItemID.FloatingIslandFishingCrateHard,
|
||||
ItemID.FrozenCrate,
|
||||
ItemID.FrozenCrateHard,
|
||||
ItemID.OasisCrate,
|
||||
ItemID.OasisCrateHard,
|
||||
ItemID.OceanCrate,
|
||||
ItemID.OceanCrateHard
|
||||
};
|
||||
if (keepCatchList.Contains(itemDrop))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ((Player.ZoneCrimson || Player.ZoneCorrupt) && Player.ZoneRockLayerHeight && Main.hardMode)
|
||||
{
|
||||
if (attempt.uncommon && Main.rand.NextBool(7))
|
||||
{
|
||||
itemDrop = ModContent.ItemType<FishofNight>();
|
||||
}
|
||||
}
|
||||
|
||||
if (Player.ZoneHallow && Player.ZoneRockLayerHeight && Main.hardMode)
|
||||
{
|
||||
if (attempt.uncommon && Main.rand.NextBool(7))
|
||||
{
|
||||
itemDrop = ModContent.ItemType<FishofLight>();
|
||||
}
|
||||
}
|
||||
|
||||
if (Player.ZoneSkyHeight && Main.hardMode)
|
||||
{
|
||||
if (attempt.uncommon && Main.rand.NextBool(7))
|
||||
{
|
||||
itemDrop = Main.rand.NextBool() ? ModContent.ItemType<SunbeamFish>() : ModContent.ItemType<FishofFlight>();
|
||||
}
|
||||
}
|
||||
|
||||
// Increased chance of Enchanted Starfish if you don't have maximum mana
|
||||
if (Player.ZoneOverworldHeight && !Main.dayTime)
|
||||
{
|
||||
int chance = Player.statManaMax < 200 ? 5 : 20;
|
||||
if (attempt.uncommon && Main.rand.NextBool(chance))
|
||||
{
|
||||
itemDrop = ModContent.ItemType<EnchantedStarfish>();
|
||||
}
|
||||
}
|
||||
|
||||
if (!Player.ZoneSkyHeight && !Main.dayTime)
|
||||
{
|
||||
if (attempt.uncommon && Main.rand.NextBool(10))
|
||||
{
|
||||
itemDrop = ModContent.ItemType<Shadowfish>();
|
||||
}
|
||||
}
|
||||
|
||||
if (Player.ZoneOverworldHeight && Main.dayTime)
|
||||
{
|
||||
if (attempt.uncommon && Main.rand.NextBool(7))
|
||||
{
|
||||
itemDrop = ModContent.ItemType<StuffedFish>();
|
||||
}
|
||||
}
|
||||
|
||||
if (Player.ZoneRockLayerHeight)
|
||||
{
|
||||
if (attempt.uncommon && Main.rand.NextBool(7))
|
||||
{
|
||||
itemDrop = ModContent.ItemType<GlimmeringGemfish>();
|
||||
}
|
||||
}
|
||||
|
||||
if (Player.ZoneSnow && Main.hardMode)
|
||||
{
|
||||
if (attempt.uncommon && Main.rand.NextBool(7))
|
||||
{
|
||||
itemDrop = ModContent.ItemType<FishofEleum>();
|
||||
}
|
||||
}
|
||||
|
||||
// Lower chance of Spadefish in Hardmode
|
||||
if (Player.ZoneDirtLayerHeight)
|
||||
{
|
||||
int chance = Main.hardMode ? 10 : 2;
|
||||
if (attempt.veryrare && Main.rand.NextBool(chance))
|
||||
{
|
||||
itemDrop = ModContent.ItemType<Spadefish>();
|
||||
}
|
||||
}
|
||||
|
||||
if (Player.FindBuffIndex(BuffID.Gills) > -1 && DownedBossSystem.downedLeviathan && (attempt.legendary || (attempt.veryrare && Main.rand.NextBool())))
|
||||
{
|
||||
itemDrop = ModContent.ItemType<Floodtide>();
|
||||
}
|
||||
|
||||
if (Player.ZoneOverworldHeight && Main.bloodMoon)
|
||||
{
|
||||
if (attempt.uncommon && Main.rand.NextBool(7))
|
||||
{
|
||||
itemDrop = ModContent.ItemType<Gorecodile>();
|
||||
}
|
||||
}
|
||||
|
||||
if (ZoneAstral) // Astral Infection, fishing in water
|
||||
{
|
||||
if (attempt.legendary)
|
||||
{
|
||||
int legendaryCatch = Utils.SelectRandom(Main.rand, new int[]
|
||||
{
|
||||
ModContent.ItemType<PolarisParrotfish>(),
|
||||
ModContent.ItemType<GacruxianMollusk>(),
|
||||
ModContent.ItemType<UrsaSergeant>()
|
||||
});
|
||||
itemDrop = legendaryCatch;
|
||||
}
|
||||
else if (attempt.uncommon || attempt.rare || attempt.veryrare)
|
||||
{
|
||||
int uncommonCatch = Utils.SelectRandom(Main.rand, new int[]
|
||||
{
|
||||
ModContent.ItemType<ProcyonidPrawn>(),
|
||||
ModContent.ItemType<ArcturusAstroidean>(),
|
||||
ModContent.ItemType<AldebaranAlewife>()
|
||||
});
|
||||
itemDrop = uncommonCatch;
|
||||
}
|
||||
else
|
||||
{
|
||||
itemDrop = ModContent.ItemType<TwinklingPollox>();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (ZoneSunkenSea) // Sunken Sea, fishing in water
|
||||
{
|
||||
if (attempt.legendary)
|
||||
{
|
||||
List<int> legendaryCatches = new List<int>()
|
||||
{
|
||||
ModContent.ItemType<RustedJingleBell>()
|
||||
};
|
||||
legendaryCatches.AddWithCondition<int>(ModContent.ItemType<SparklingEmpress>(), DownedBossSystem.downedDesertScourge);
|
||||
legendaryCatches.AddWithCondition<int>(ModContent.ItemType<SerpentsBite>(), Main.hardMode);
|
||||
itemDrop = legendaryCatches[Main.rand.Next(legendaryCatches.Count)];
|
||||
}
|
||||
else if (attempt.veryrare)
|
||||
{
|
||||
itemDrop = ModContent.ItemType<GreenwaveLoach>();
|
||||
}
|
||||
else if (attempt.uncommon || attempt.rare)
|
||||
{
|
||||
itemDrop = ModContent.ItemType<SunkenSailfish>();
|
||||
}
|
||||
else
|
||||
{
|
||||
itemDrop = ModContent.ItemType<PrismaticGuppy>();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// There is no complete fishing pool here, so most of it is vanilla default
|
||||
if (canSulphurFish) // Sulphurous Sea, fishing in water
|
||||
{
|
||||
if (attempt.legendary || (attempt.veryrare && Main.rand.NextBool()))
|
||||
{
|
||||
itemDrop = Utils.SelectRandom(Main.rand, new int[]
|
||||
{
|
||||
ModContent.ItemType<AlluringBait>(),
|
||||
ModContent.ItemType<AbyssalAmulet>()
|
||||
});
|
||||
}
|
||||
else if (attempt.common)
|
||||
{
|
||||
itemDrop = ModContent.ItemType<PlantyMush>();
|
||||
}
|
||||
}
|
||||
|
||||
/*if (canSulphurFish && (bait.type == ItemID.GoldWorm || bait.type == ItemID.GoldGrasshopper || bait.type == ItemID.GoldButterfly) && power > 150)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
CalamityGlobalNPC.OldDukeSpawn(player.whoAmI, ModContent.NPCType<OldDuke>());
|
||||
}
|
||||
else
|
||||
{
|
||||
NetMessage.SendData(61, -1, -1, null, player.whoAmI, (float)ModContent.NPCType<OldDuke>(), 0f, 0f, 0, 0, 0);
|
||||
}
|
||||
switch (Main.rand.Next(4))
|
||||
{
|
||||
case 0: itemDrop = ModContent.ItemType<IronBoots>(); break; //movement acc
|
||||
case 1: itemDrop = ModContent.ItemType<DepthCharm>(); break; //regen acc
|
||||
case 2: itemDrop = ModContent.ItemType<AnechoicPlating>(); break; //defense acc
|
||||
case 3: itemDrop = ModContent.ItemType<StrangeOrb>(); break; //light pet
|
||||
}
|
||||
return;
|
||||
}*/
|
||||
}
|
||||
|
||||
// Fishing in lava overrides the rest of logic
|
||||
if (lava)
|
||||
{
|
||||
if (ZoneCalamity) // Brimstone Crags, fishing in lava
|
||||
// Don't do anything if you can't fish in lava
|
||||
if (!attempt.CanFishInLava)
|
||||
return;
|
||||
|
||||
if (ZoneCalamity)
|
||||
{
|
||||
if (attempt.crate)
|
||||
{
|
||||
// Crates have highest priority
|
||||
if (attempt.crate && attempt.rare)
|
||||
itemDrop = Main.hardMode ? ModContent.ItemType<BrimstoneCrate>() : ModContent.ItemType<SlagCrate>();
|
||||
}
|
||||
else if (attempt.legendary)
|
||||
{
|
||||
itemDrop = ModContent.ItemType<DragoonDrizzlefish>();
|
||||
}
|
||||
// Increased chance of Dragoon Drizzlefish in Prehardmode
|
||||
else if (attempt.veryrare && !Main.hardMode)
|
||||
{
|
||||
itemDrop = ModContent.ItemType<DragoonDrizzlefish>();
|
||||
}
|
||||
else if (attempt.veryrare)
|
||||
{
|
||||
itemDrop = ModContent.ItemType<CharredLasher>();
|
||||
}
|
||||
else if ((attempt.rare || attempt.veryrare) && DownedBossSystem.downedProvidence && Main.rand.Next(3) >= 2)
|
||||
{
|
||||
else if (DownedBossSystem.downedProvidence && ((attempt.rare && Main.rand.NextBool(2)) || (attempt.uncommon && Main.rand.NextBool(4))))
|
||||
itemDrop = ModContent.ItemType<Bloodfin>();
|
||||
}
|
||||
else if (attempt.uncommon || attempt.rare)
|
||||
// Quest fish hover around this priority
|
||||
else if (questFish == ModContent.ItemType<Brimlish>() && attempt.uncommon)
|
||||
itemDrop = ModContent.ItemType<Brimlish>();
|
||||
else if (questFish == ModContent.ItemType<Slurpfish>() && attempt.uncommon)
|
||||
itemDrop = ModContent.ItemType<Slurpfish>();
|
||||
else if (grabBagFish && Main.hardMode)
|
||||
itemDrop = ModContent.ItemType<Havocfish>();
|
||||
else if (attempt.rare)
|
||||
{
|
||||
List<int> uncommonCatches = new List<int>()
|
||||
{
|
||||
ModContent.ItemType<CoastalDemonfish>(),
|
||||
ModContent.ItemType<Shadowfish>()
|
||||
};
|
||||
uncommonCatches.AddWithCondition<int>(ModContent.ItemType<Havocfish>(), Main.hardMode);
|
||||
itemDrop = uncommonCatches[Main.rand.Next(uncommonCatches.Count)];
|
||||
}
|
||||
// Lava fish usually don't have plentiful catches but we can be more lenient
|
||||
else
|
||||
{
|
||||
itemDrop = ModContent.ItemType<CragBullhead>();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Honey also overrides logic but we have nothing to catch from honey... for now
|
||||
if (honey)
|
||||
return;
|
||||
|
||||
// Old Duke spawn
|
||||
if (canSulphurFish && bait == ModContent.ItemType<BloodwormItem>() && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
CalamityGlobalNPC.OldDukeSpawn(Player.whoAmI, ModContent.NPCType<OldDuke>(), bait);
|
||||
}
|
||||
|
||||
// Ignore catches if it's junk
|
||||
if (itemDrop == ItemID.OldShoe || itemDrop == ItemID.FishingSeaweed || itemDrop == ItemID.TinCan || itemDrop == ItemID.JojaCola)
|
||||
return;
|
||||
|
||||
if (attempt.crate)
|
||||
{
|
||||
// This can override Golden/Titanium Crates, but so do vanilla biome crates
|
||||
// Those are still obtainable if the catch is very rare/legendary but not rare (fishing oddities)
|
||||
if (attempt.rare)
|
||||
{
|
||||
if (ZoneAstral)
|
||||
itemDrop = Main.hardMode ? ModContent.ItemType<AstralCrate>() : ModContent.ItemType<MonolithCrate>();
|
||||
if (ZoneSunkenSea)
|
||||
itemDrop = Main.hardMode ? ModContent.ItemType<PrismCrate>() : ModContent.ItemType<EutrophicCrate>();
|
||||
if (canSulphurFish)
|
||||
itemDrop = Main.hardMode ? ModContent.ItemType<HydrothermalCrate>() : ModContent.ItemType<SulphurousCrate>();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore all top priority legendary vanilla catches
|
||||
List<int> keepCatchList = new List<int>()
|
||||
{
|
||||
ItemID.CombatBook,
|
||||
ItemID.DreadoftheRedSea,
|
||||
ItemID.FrogLeg,
|
||||
ItemID.BalloonPufferfish,
|
||||
ItemID.ZephyrFish
|
||||
};
|
||||
if (keepCatchList.Contains(itemDrop))
|
||||
return;
|
||||
|
||||
// Add top priorities of our own
|
||||
if (DownedBossSystem.downedLeviathan && attempt.legendary && poolSize > 1000)
|
||||
{
|
||||
itemDrop = ModContent.ItemType<Floodtide>();
|
||||
return;
|
||||
}
|
||||
|
||||
if (grabBagFish)
|
||||
{
|
||||
if (surface && Main.bloodMoon)
|
||||
itemDrop = ModContent.ItemType<Gorecodile>();
|
||||
else if (surface && Main.dayTime)
|
||||
itemDrop = ModContent.ItemType<StuffedFish>();
|
||||
else if (cavern)
|
||||
itemDrop = ModContent.ItemType<GlimmeringGemfish>();
|
||||
if (Main.hardMode)
|
||||
{
|
||||
// Fish of Light/Night are evenly split with Gemfish
|
||||
if ((Player.ZoneCrimson || Player.ZoneCorrupt) && cavern && Main.rand.NextBool())
|
||||
itemDrop = ModContent.ItemType<FishofNight>();
|
||||
else if (Player.ZoneHallow && cavern && Main.rand.NextBool())
|
||||
itemDrop = ModContent.ItemType<FishofLight>();
|
||||
else if (Player.ZoneSnow)
|
||||
itemDrop = ModContent.ItemType<FishofEleum>();
|
||||
else if (sky)
|
||||
itemDrop = Main.rand.NextBool() ? ModContent.ItemType<SunbeamFish>() : ModContent.ItemType<FishofFlight>();
|
||||
}
|
||||
}
|
||||
|
||||
// Increased chance of Enchanted Starfish if you don't have maximum mana
|
||||
if (surface && !Main.dayTime) // Surface
|
||||
{
|
||||
int chance = (Player.ConsumedManaCrystals >= Player.ManaCrystalMax) ? 20 : 5;
|
||||
if (attempt.uncommon && Main.rand.NextBool(chance))
|
||||
itemDrop = ModContent.ItemType<EnchantedStarfish>();
|
||||
|
||||
if (attempt.uncommon && Main.rand.NextBool(10))
|
||||
itemDrop = ModContent.ItemType<Shadowfish>();
|
||||
}
|
||||
|
||||
// Lower chance of Spadefish in Hardmode
|
||||
if (underground) // Underground
|
||||
{
|
||||
int chance = Main.hardMode ? 10 : 2;
|
||||
if (attempt.veryrare && Main.rand.NextBool(chance))
|
||||
{
|
||||
itemDrop = ModContent.ItemType<Spadefish>();
|
||||
}
|
||||
}
|
||||
|
||||
if (ZoneAstral)
|
||||
{
|
||||
if (attempt.legendary)
|
||||
{
|
||||
int legendaryCatch = Utils.SelectRandom(Main.rand, new int[]
|
||||
{
|
||||
ModContent.ItemType<PolarisParrotfish>(),
|
||||
ModContent.ItemType<GacruxianMollusk>(),
|
||||
ModContent.ItemType<UrsaSergeant>()
|
||||
});
|
||||
itemDrop = legendaryCatch;
|
||||
}
|
||||
else if (attempt.veryrare)
|
||||
itemDrop = ModContent.ItemType<ArcturusAstroidean>();
|
||||
else if (attempt.uncommon || attempt.rare)
|
||||
{
|
||||
int uncommonCatch = Utils.SelectRandom(Main.rand, new int[]
|
||||
{
|
||||
ModContent.ItemType<ProcyonidPrawn>(),
|
||||
ModContent.ItemType<AldebaranAlewife>()
|
||||
});
|
||||
itemDrop = uncommonCatch;
|
||||
}
|
||||
else
|
||||
itemDrop = ModContent.ItemType<TwinklingPollox>();
|
||||
return;
|
||||
}
|
||||
if (ZoneSunkenSea)
|
||||
{
|
||||
// If the player is overlapping with the desert, split the catches
|
||||
if (Player.ZoneDesert && Main.rand.NextBool())
|
||||
return;
|
||||
|
||||
if (attempt.legendary)
|
||||
{
|
||||
List<int> legendaryCatches = new List<int>()
|
||||
{
|
||||
ModContent.ItemType<RustedJingleBell>()
|
||||
};
|
||||
legendaryCatches.AddWithCondition<int>(ModContent.ItemType<SparklingEmpress>(), DownedBossSystem.downedDesertScourge);
|
||||
legendaryCatches.AddWithCondition<int>(ModContent.ItemType<SerpentsBite>(), Main.hardMode);
|
||||
itemDrop = legendaryCatches[Main.rand.Next(legendaryCatches.Count)];
|
||||
}
|
||||
else if (attempt.veryrare)
|
||||
itemDrop = ModContent.ItemType<GreenwaveLoach>();
|
||||
// Quest fish hover around this priority
|
||||
else if (questFish == ModContent.ItemType<EutrophicSandfish>() && attempt.uncommon)
|
||||
itemDrop = ModContent.ItemType<EutrophicSandfish>();
|
||||
else if (questFish == ModContent.ItemType<SurfClam>() && attempt.uncommon)
|
||||
itemDrop = ModContent.ItemType<SurfClam>();
|
||||
else if (questFish == ModContent.ItemType<Serpentuna>() && attempt.uncommon)
|
||||
itemDrop = ModContent.ItemType<Serpentuna>();
|
||||
else if (attempt.uncommon || attempt.rare)
|
||||
itemDrop = ModContent.ItemType<SunkenSailfish>();
|
||||
else
|
||||
itemDrop = ModContent.ItemType<PrismaticGuppy>();
|
||||
return;
|
||||
}
|
||||
// There is no complete fishing pool here, so most of it is vanilla default
|
||||
if (canSulphurFish)
|
||||
{
|
||||
if (attempt.legendary)
|
||||
{
|
||||
itemDrop = Utils.SelectRandom(Main.rand, new int[]
|
||||
{
|
||||
ModContent.ItemType<AlluringBait>(),
|
||||
ModContent.ItemType<AbyssalAmulet>()
|
||||
});
|
||||
}
|
||||
else if (attempt.common && Main.rand.NextBool())
|
||||
itemDrop = ModContent.ItemType<PlantyMush>();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -597,6 +302,7 @@ namespace CalamityMod.CalPlayer
|
||||
#region Get Fishing Level
|
||||
public override void GetFishingLevel(Item fishingRod, Item bait, ref float fishingLevel)
|
||||
{
|
||||
// Note: This is calculated after equipments (Rod, Bait, Potions, etc) and before modifications (Chum Buckets, Luck)
|
||||
if ((ZoneAstral || ZoneAbyss || ZoneSulphur) && bait.type == ModContent.ItemType<ArcturusAstroidean>())
|
||||
fishingLevel = fishingLevel * ArcturusAstroidean.FishingPowerBiomeMult;
|
||||
if (Player.ZoneSnow && fishingRod.type == ModContent.ItemType<VerstaltiteFishingRod>())
|
||||
@@ -634,9 +340,10 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Get Fishing Level
|
||||
#region Modify Caught Fish
|
||||
public override void ModifyCaughtFish(Item fish)
|
||||
{
|
||||
// Increases the yield of potion ingredient fish with Alluring Bait
|
||||
if (alluringBait)
|
||||
{
|
||||
List<int> fishList = new List<int>()
|
||||
@@ -663,10 +370,7 @@ namespace CalamityMod.CalPlayer
|
||||
};
|
||||
|
||||
if (fishList.Contains(fish.type))
|
||||
{
|
||||
// Increase the yield by 1 or 2
|
||||
fish.stack += Main.rand.NextBool() ? 1 : 2;
|
||||
}
|
||||
fish.stack += Main.rand.Next(1, 3 + 1);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace CalamityMod.Enums
|
||||
{
|
||||
public enum HardmodeCrateType
|
||||
{
|
||||
Biome,
|
||||
Mythril,
|
||||
Titanium
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.Calamity().alluringBait = true;
|
||||
player.fishingSkill += 30;
|
||||
player.fishingSkill += 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -30,14 +29,5 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.RustyMedallionDroplets = true;
|
||||
player.buffImmune[ModContent.BuffType<Irradiated>()] = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddRecipeGroup("AnySilverBar", 10).
|
||||
AddIngredient<SulphuricScale>(3).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.fishingSkill += 80;
|
||||
player.fishingSkill += 50;
|
||||
player.accFishingLine = true;
|
||||
player.accTackleBox = true;
|
||||
player.accLavaFishing = true;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -87,14 +86,5 @@ namespace CalamityMod.Items
|
||||
text = GetTextValue("Items.Misc.SpawnBlockersOff");
|
||||
tooltips.FindAndReplace("[STATE]", text);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddRecipeGroup("IronBar", 10).
|
||||
AddIngredient<SulphuricScale>().
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.PermanentBoosters;
|
||||
@@ -25,12 +26,6 @@ namespace CalamityMod.Items
|
||||
public override void ModifyItemLoot(Item item, ItemLoot loot)
|
||||
{
|
||||
Fraction fifteenPercent = new Fraction(15, 100);
|
||||
static bool CryonicAvailable()
|
||||
{
|
||||
if (!DownedBossSystem.downedCryogen)
|
||||
return false;
|
||||
return (NPC.downedMechBoss1.ToInt() + NPC.downedMechBoss2.ToInt() + NPC.downedMechBoss3.ToInt()) >= 2;
|
||||
}
|
||||
|
||||
switch (item.type)
|
||||
{
|
||||
@@ -275,91 +270,49 @@ namespace CalamityMod.Items
|
||||
#endregion
|
||||
|
||||
#region Fishing Crates
|
||||
// TODO -- What is all this shit?
|
||||
// Kylie @ 1% (yes this is the consistent rate, dw it's not hard to get one of these)
|
||||
case ItemID.WoodenCrate:
|
||||
case ItemID.WoodenCrateHard:
|
||||
loot.Add(ModContent.ItemType<WulfrumMetalScrap>(), 4, 3, 5); // 25% 3-5 Wulfrum Scrap
|
||||
loot.Add(ModContent.ItemType<Kylie>(), 20);
|
||||
loot.Add(ModContent.ItemType<Kylie>(), 100);
|
||||
// We do not need to pop Hardmode ores out of Pearlwood Crates. They do not drop higher tier ores.
|
||||
break;
|
||||
|
||||
case ItemID.IronCrate:
|
||||
case ItemID.IronCrateHard:
|
||||
loot.Add(ModContent.ItemType<WulfrumMetalScrap>(), 4, 5, 8); // 25% 5-8 Wulfrum Scrap
|
||||
loot.Add(ModContent.ItemType<AncientBoneDust>(), 4, 5, 8); // 25% 5-8 Ancient Bone Dust
|
||||
RemoveHardmodeOresFromStandardCrates(loot);
|
||||
loot.AddHardmodeOresToCrates(HardmodeCrateType.Mythril);
|
||||
break;
|
||||
|
||||
// these drops are not available in hardmode because this crate will stop dropping
|
||||
// Non-crafted underground Gold Chest loot @ 20%; Individually 5%
|
||||
case ItemID.GoldenCrate:
|
||||
loot.Add(ItemID.FlareGun, 10); // 10% Flare Gun
|
||||
loot.Add(ItemID.ShoeSpikes, 10); // 10% Shoe Spikes (BUT NOT CLIMBING CLAWS?)
|
||||
loot.Add(ItemID.BandofRegeneration, 10); // 10% Band of Regeneration
|
||||
loot.Add(new OneFromOptionsNotScaledWithLuckDropRule(5, 1,
|
||||
ItemID.FlareGun,
|
||||
ItemID.Mace,
|
||||
ItemID.BandofRegeneration,
|
||||
ItemID.ShoeSpikes)); // Climbing Claws is in Wooden/Pearlwood (vanilla) in case you're curious
|
||||
break;
|
||||
|
||||
case ItemID.GoldenCrateHard:
|
||||
// Post-Yharon: 15% 30-40 Auric Ore
|
||||
loot.AddIf(() => DownedBossSystem.downedYharon, ModContent.ItemType<AuricOre>(), fifteenPercent, 30, 40);
|
||||
RemoveHardmodeOresFromStandardCrates(loot);
|
||||
loot.AddHardmodeOresToCrates(HardmodeCrateType.Titanium);
|
||||
loot.Add(new OneFromOptionsNotScaledWithLuckDropRule(5, 1,
|
||||
ItemID.FlareGun,
|
||||
ItemID.Mace,
|
||||
ItemID.BandofRegeneration,
|
||||
ItemID.ShoeSpikes));
|
||||
break;
|
||||
|
||||
case ItemID.CorruptFishingCrate:
|
||||
case ItemID.CrimsonFishingCrate:
|
||||
case ItemID.CorruptFishingCrateHard:
|
||||
case ItemID.CrimsonFishingCrateHard:
|
||||
loot.Add(ModContent.ItemType<BlightedGel>(), fifteenPercent, 5, 8); // 15% 5-8 Blighted Gel
|
||||
break;
|
||||
|
||||
case ItemID.HallowedFishingCrate: // WHY
|
||||
case ItemID.HallowedFishingCrateHard:
|
||||
var postProv = loot.DefineConditionalDropSet(() => DownedBossSystem.downedProvidence);
|
||||
postProv.Add(ModContent.ItemType<UnholyEssence>(), fifteenPercent, 5, 10); // 15% 5-10 Unholy Essence
|
||||
break;
|
||||
|
||||
case ItemID.DungeonFishingCrate:
|
||||
case ItemID.DungeonFishingCrateHard:
|
||||
loot.AddIf(() => NPC.downedPlantBoss, ItemID.Ectoplasm, 10, 1, 5); // 10% 1-5 Ectoplasm
|
||||
loot.AddIf(() => DownedBossSystem.downedPolterghast, ModContent.ItemType<Necroplasm>(), 10, 1, 5); // 10% 1-5 Necroplasm
|
||||
break;
|
||||
|
||||
case ItemID.JungleFishingCrate:
|
||||
case ItemID.JungleFishingCrateHard:
|
||||
var postPlant = loot.DefineConditionalDropSet(() => NPC.downedPlantBoss);
|
||||
postPlant.Add(ModContent.ItemType<PerennialOre>(), 5, 16, 28); // 20% 16-28 Perennial Ore
|
||||
postPlant.Add(ModContent.ItemType<PerennialBar>(), fifteenPercent, 4, 7); // 15% 4-7 Perennial Bar
|
||||
loot.AddIf(() => NPC.downedGolemBoss, ModContent.ItemType<PlagueCellCanister>(), 5, 3, 6); // 20% 3-6 Plague Cell Canister
|
||||
var uelibloom = loot.DefineConditionalDropSet(() => DownedBossSystem.downedProvidence);
|
||||
uelibloom.Add(ModContent.ItemType<UelibloomOre>(), 5, 16, 28); // 20% 16-28 Uelibloom Ore
|
||||
uelibloom.Add(ModContent.ItemType<UelibloomBar>(), fifteenPercent, 4, 7); // 15% 4-7 Uelibloom Bar
|
||||
break;
|
||||
|
||||
case ItemID.FloatingIslandFishingCrate:
|
||||
case ItemID.FloatingIslandFishingCrateHard:
|
||||
var evilBossTwo = loot.DefineConditionalDropSet(() => DownedBossSystem.downedHiveMind || DownedBossSystem.downedPerforator);
|
||||
evilBossTwo.Add(ModContent.ItemType<AerialiteOre>(), 5, 16, 28); // 20% 16-28 Aerialite Ore
|
||||
evilBossTwo.Add(ModContent.ItemType<AerialiteBar>(), fifteenPercent, 4, 7); // 15% 4-7 Aerialite Bar
|
||||
loot.AddIf(() => Main.hardMode, ModContent.ItemType<EssenceofSunlight>(), 5, 2, 4); // 20% 2-4 Essence of Sunlight
|
||||
loot.AddIf(() => NPC.downedMoonlord, ModContent.ItemType<ExodiumCluster>(), 5, 16, 28); // 20% 16-28 Exodium Clusters
|
||||
break;
|
||||
|
||||
case ItemID.FrozenCrate:
|
||||
case ItemID.FrozenCrateHard:
|
||||
var cryonic = loot.DefineConditionalDropSet(CryonicAvailable);
|
||||
cryonic.Add(ModContent.ItemType<CryonicOre>(), 5, 16, 28); // 20% 16-28 Cryonic Ore
|
||||
cryonic.Add(ModContent.ItemType<CryonicBar>(), fifteenPercent, 4, 7); // 15% 4-7 Cryonic Bar
|
||||
loot.AddIf(() => Main.hardMode, ModContent.ItemType<EssenceofEleum>(), 5, 2, 4); // 20% 2-4 Essence of Eleum
|
||||
break;
|
||||
|
||||
case ItemID.LavaCrate:
|
||||
case ItemID.LavaCrateHard:
|
||||
loot.AddIf(() => Main.hardMode, ModContent.ItemType<EssenceofHavoc>(), 5, 2, 4); // 20% 2-4 Essence of Havoc
|
||||
break;
|
||||
|
||||
// Calamity does not touch Oasis Crates yet
|
||||
case ItemID.OasisCrate:
|
||||
case ItemID.OasisCrateHard:
|
||||
break;
|
||||
|
||||
// Calamity does not touch Ocean Crates yet
|
||||
case ItemID.OceanCrate:
|
||||
case ItemID.OceanCrateHard:
|
||||
RemoveHardmodeOresFromBiomeCrates(loot);
|
||||
loot.AddHardmodeOresToCrates(HardmodeCrateType.Biome);
|
||||
break;
|
||||
#endregion
|
||||
|
||||
@@ -530,6 +483,66 @@ namespace CalamityMod.Items
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Fishing Crate Loot Rule Manipulation
|
||||
private static void RemoveHardmodeOresFromStandardCrates(ItemLoot loot)
|
||||
{
|
||||
List<IItemDropRule> rules = loot.Get(false);
|
||||
|
||||
// This is the primary rule which contains every drop
|
||||
AlwaysAtleastOneSuccessDropRule mainRule = null;
|
||||
foreach (IItemDropRule rule in rules)
|
||||
if (rule is AlwaysAtleastOneSuccessDropRule a)
|
||||
mainRule = a;
|
||||
if (mainRule is null)
|
||||
return;
|
||||
|
||||
// Find ones that are supposed to be for the ore and not the other loot
|
||||
foreach (IItemDropRule rule in mainRule.rules)
|
||||
{
|
||||
// Hardmode ores/bars are both nested within *another* nested rule
|
||||
if (rule is SequentialRulesNotScalingWithLuckRule oreRule)
|
||||
{
|
||||
// Confirm that this is for the ore/bar then pop the numerator for the big rule
|
||||
foreach (IItemDropRule nestedRule in oreRule.rules)
|
||||
{
|
||||
if (nestedRule is SequentialRulesNotScalingWithLuckRule s)
|
||||
{
|
||||
oreRule.chanceNumerator = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void RemoveHardmodeOresFromBiomeCrates(ItemLoot loot)
|
||||
{
|
||||
List<IItemDropRule> rules = loot.Get(false);
|
||||
|
||||
// This is the primary rule which contains every drop
|
||||
AlwaysAtleastOneSuccessDropRule mainRule = null;
|
||||
foreach (IItemDropRule rule in rules)
|
||||
if (rule is AlwaysAtleastOneSuccessDropRule a)
|
||||
mainRule = a;
|
||||
if (mainRule is null)
|
||||
return;
|
||||
|
||||
foreach (IItemDropRule rule in mainRule.rules)
|
||||
{
|
||||
// 2 rules, one for ore and another for bar, nested within *another* nested rule
|
||||
if (rule is SequentialRulesNotScalingWithLuckRule oreRule)
|
||||
{
|
||||
// Confirm that this is for the ore/bar then pop the numerator for the big rule
|
||||
foreach (IItemDropRule nestedRule in oreRule.rules)
|
||||
{
|
||||
if (nestedRule is OneFromRulesRule o)
|
||||
oreRule.chanceNumerator = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Goodie Bag Bat Hook
|
||||
private static void RemoveBatHookFromGoodieBag(ItemLoot loot)
|
||||
{
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Critters;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Tiles.Astral;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.ItemDropRules;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -29,18 +19,10 @@ namespace CalamityMod.Items.Fishing.AstralCatches
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 32;
|
||||
Item.height = 32;
|
||||
Item.maxStack = 9999;
|
||||
Item.consumable = true;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
Item.DefaultToPlaceableTile(ModContent.TileType<AstralCrateTile>());
|
||||
Item.width = Item.height = 32;
|
||||
Item.value = Item.sellPrice(gold: 1);
|
||||
Item.createTile = ModContent.TileType<AstralCrateTile>();
|
||||
Item.useTurn = true;
|
||||
Item.autoReuse = true;
|
||||
Item.useAnimation = 15;
|
||||
Item.useTime = 10;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
}
|
||||
|
||||
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
|
||||
@@ -51,48 +33,14 @@ namespace CalamityMod.Items.Fishing.AstralCatches
|
||||
public override bool CanRightClick() => true;
|
||||
public override void ModifyItemLoot(ItemLoot itemLoot)
|
||||
{
|
||||
var postAstrumAureus = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAstrumAureus);
|
||||
var postAstrumDeus = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAstrumDeus);
|
||||
// 4-10 Starblight Soot @ 50%
|
||||
// This is our equivalent to Crystal Shards/Ichor
|
||||
itemLoot.Add(ModContent.ItemType<StarblightSoot>(), 2, 4, 10);
|
||||
|
||||
// Materials
|
||||
itemLoot.Add(ModContent.ItemType<StarblightSoot>(), 1, 5, 10);
|
||||
itemLoot.Add(ItemID.FallenStar, 1, 5, 10);
|
||||
itemLoot.Add(ItemID.Meteorite, 5, 10, 20);
|
||||
itemLoot.Add(ItemID.MeteoriteBar, 10, 1, 3);
|
||||
// Astrophage @ 5%
|
||||
itemLoot.Add(ModContent.ItemType<AstrophageItem>(), 20);
|
||||
|
||||
postAstrumAureus.Add(ModContent.ItemType<AureusCell>(), 5, 2, 5);
|
||||
postAstrumDeus.Add(ModContent.ItemType<AstralOre>(), 5, 10, 20);
|
||||
postAstrumDeus.Add(ModContent.ItemType<AstralBar>(), 10, 1, 3);
|
||||
postAstrumDeus.Add(ModContent.ItemType<MeldBlob>(), 4, 5, 10);
|
||||
|
||||
// Weapons (and Starburster Core)
|
||||
postAstrumAureus.Add(new OneFromOptionsDropRule(10, 1,
|
||||
ModContent.ItemType<AstralScythe>(),
|
||||
ModContent.ItemType<TitanArm>(),
|
||||
ModContent.ItemType<StellarCannon>(),
|
||||
ModContent.ItemType<AstralachneaStaff>(),
|
||||
ModContent.ItemType<HivePod>(),
|
||||
ModContent.ItemType<StellarKnife>(),
|
||||
ModContent.ItemType<StarbusterCore>()
|
||||
));
|
||||
|
||||
// Pet
|
||||
itemLoot.Add(ModContent.ItemType<AstrophageItem>(), 10);
|
||||
|
||||
// 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
|
||||
postAstrumAureus.Add(ModContent.ItemType<AstralInjection>(), 10, 1, 3);
|
||||
postAstrumAureus.Add(ModContent.ItemType<GravityNormalizerPotion>(), 10, 1, 3);
|
||||
itemLoot.AddCratePotionRules();
|
||||
|
||||
// Money
|
||||
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
|
||||
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
|
||||
itemLoot.AddBiomeCrateLootRules();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.Items.Critters;
|
||||
using CalamityMod.Tiles.Astral;
|
||||
using CalamityMod.Tiles.Astral;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -17,18 +16,10 @@ namespace CalamityMod.Items.Fishing.AstralCatches
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 32;
|
||||
Item.height = 32;
|
||||
Item.maxStack = 9999;
|
||||
Item.consumable = true;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
Item.DefaultToPlaceableTile(ModContent.TileType<MonolithCrateTile>());
|
||||
Item.width = Item.height = 32;
|
||||
Item.value = Item.sellPrice(gold: 1);
|
||||
Item.createTile = ModContent.TileType<MonolithCrateTile>();
|
||||
Item.useTurn = true;
|
||||
Item.autoReuse = true;
|
||||
Item.useAnimation = 15;
|
||||
Item.useTime = 10;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
}
|
||||
|
||||
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
|
||||
@@ -39,27 +30,10 @@ namespace CalamityMod.Items.Fishing.AstralCatches
|
||||
public override bool CanRightClick() => true;
|
||||
public override void ModifyItemLoot(ItemLoot itemLoot)
|
||||
{
|
||||
// Materials
|
||||
itemLoot.Add(ItemID.FallenStar, 1, 5, 10);
|
||||
itemLoot.Add(ItemID.Meteorite, 5, 10, 20);
|
||||
itemLoot.Add(ItemID.MeteoriteBar, 10, 1, 3);
|
||||
// Astrophage @ 5%
|
||||
itemLoot.Add(ModContent.ItemType<AstrophageItem>(), 20);
|
||||
|
||||
// Pet
|
||||
itemLoot.Add(ModContent.ItemType<AstrophageItem>(), 10);
|
||||
|
||||
// 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
|
||||
itemLoot.AddCratePotionRules(false);
|
||||
|
||||
// Money
|
||||
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
|
||||
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
|
||||
itemLoot.AddBiomeCrateLootRules(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Tiles.Crags;
|
||||
using CalamityMod.Tiles.Crags;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -42,27 +40,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
|
||||
public override bool CanRightClick() => true;
|
||||
public override void ModifyItemLoot(ItemLoot itemLoot)
|
||||
{
|
||||
// Materials
|
||||
itemLoot.Add(ItemID.Obsidian, 1, 2, 5);
|
||||
itemLoot.Add(ItemID.Hellstone, 4, 2, 5);
|
||||
itemLoot.Add(ItemID.HellstoneBar, 10, 1, 3);
|
||||
itemLoot.AddIf(() => DownedBossSystem.downedBrimstoneElemental, ModContent.ItemType<UnholyCore>(), 10, 1, 3);
|
||||
itemLoot.AddIf(() => DownedBossSystem.downedProvidence, ModContent.ItemType<Bloodstone>(), 2, 1, 3);
|
||||
|
||||
// Weapons (none)
|
||||
|
||||
// Bait
|
||||
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
|
||||
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
|
||||
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
|
||||
|
||||
// Potions
|
||||
itemLoot.Add(ItemID.InfernoPotion, 10, 1, 3);
|
||||
itemLoot.AddCratePotionRules();
|
||||
|
||||
// Money
|
||||
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
|
||||
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
|
||||
itemLoot.AddBiomeCrateLootRules();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Tiles.Crags;
|
||||
using CalamityMod.Tiles.Crags;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -17,18 +16,10 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 32;
|
||||
Item.height = 32;
|
||||
Item.maxStack = 9999;
|
||||
Item.consumable = true;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
Item.DefaultToPlaceableTile(ModContent.TileType<SlagCrateTile>());
|
||||
Item.width = Item.height = 32;
|
||||
Item.value = Item.sellPrice(gold: 1);
|
||||
Item.createTile = ModContent.TileType<SlagCrateTile>();
|
||||
Item.useTurn = true;
|
||||
Item.autoReuse = true;
|
||||
Item.useAnimation = 15;
|
||||
Item.useTime = 10;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
}
|
||||
|
||||
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
|
||||
@@ -39,25 +30,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
|
||||
public override bool CanRightClick() => true;
|
||||
public override void ModifyItemLoot(ItemLoot itemLoot)
|
||||
{
|
||||
// Materials
|
||||
itemLoot.Add(ItemID.Obsidian, 1, 2, 5);
|
||||
itemLoot.Add(ItemID.Hellstone, 4, 2, 5);
|
||||
itemLoot.Add(ItemID.HellstoneBar, 10, 1, 3);
|
||||
|
||||
// Weapons (none)
|
||||
|
||||
// Bait
|
||||
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
|
||||
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
|
||||
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
|
||||
|
||||
// Potions
|
||||
itemLoot.Add(ItemID.InfernoPotion, 10, 1, 3);
|
||||
itemLoot.AddCratePotionRules(false);
|
||||
|
||||
// Money
|
||||
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
|
||||
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
|
||||
itemLoot.AddBiomeCrateLootRules(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Fishing
|
||||
Item.maxStack = Item.CommonMaxStack;
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
Item.value = Item.sellPrice(silver: 30);
|
||||
Item.bait = 65;
|
||||
Item.bait = 75;
|
||||
Item.consumable = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Items.Placeables.Astral;
|
||||
using CalamityMod.Items.Placeables.Crags;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -30,6 +32,8 @@ namespace CalamityMod.Items.Fishing
|
||||
ItemID.GrassSeeds,
|
||||
ItemID.JungleGrassSeeds,
|
||||
ItemID.MushroomGrassSeeds,
|
||||
ItemID.AshGrassSeeds,
|
||||
ModContent.ItemType<CinderBlossomSeeds>(),
|
||||
ItemID.PumpkinSeed
|
||||
};
|
||||
|
||||
@@ -84,12 +88,15 @@ namespace CalamityMod.Items.Fishing
|
||||
itemLoot.Add(ItemID.GrassSeeds, 10, seedMin, seedMax);
|
||||
itemLoot.Add(ItemID.JungleGrassSeeds, 10, seedMin, seedMax);
|
||||
itemLoot.Add(ItemID.MushroomGrassSeeds, 10, seedMin, seedMax);
|
||||
itemLoot.Add(ItemID.AshGrassSeeds, 20, seedMin, seedMax);
|
||||
itemLoot.Add(ModContent.ItemType<CinderBlossomSeeds>(), 20, seedMin, seedMax);
|
||||
itemLoot.Add(ItemID.PumpkinSeed, 20, seedMin, seedMax);
|
||||
|
||||
// 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);
|
||||
itemLoot.AddIf(() => Main.hardMode, ModContent.ItemType<AstralGrassSeeds>(), 20, seedMin, seedMax);
|
||||
|
||||
// Add Thorium Marine Kelp if Thorium is loaded.
|
||||
Mod thorium = ExternalMods.thorium;
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Pets;
|
||||
using CalamityMod.Items.Placeables.Abyss;
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Items.Tools.ClimateChange;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
@@ -31,18 +28,10 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 32;
|
||||
Item.height = 32;
|
||||
Item.maxStack = 9999;
|
||||
Item.consumable = true;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
Item.DefaultToPlaceableTile(ModContent.TileType<HydrothermalCrateTile>());
|
||||
Item.width = Item.height = 32;
|
||||
Item.value = Item.sellPrice(gold: 1);
|
||||
Item.createTile = ModContent.TileType<HydrothermalCrateTile>();
|
||||
Item.useTurn = true;
|
||||
Item.autoReuse = true;
|
||||
Item.useAnimation = 15;
|
||||
Item.useTime = 10;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
}
|
||||
|
||||
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
|
||||
@@ -53,51 +42,29 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
|
||||
public override bool CanRightClick() => true;
|
||||
public override void ModifyItemLoot(ItemLoot itemLoot)
|
||||
{
|
||||
// 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.downedLeviathan);
|
||||
var scoriaAvailable = itemLoot.DefineConditionalDropSet(() => NPC.downedGolemBoss);
|
||||
var tier1AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedEoCAcidRain);
|
||||
var tier2AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAquaticScourgeAcidRain);
|
||||
var tier3AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedPolterghast && DownedBossSystem.downedBoomerDuke);
|
||||
// 20-50 Blocks @ 100%; Individually 33.33%
|
||||
itemLoot.Add(new OneFromRulesRule(1, new IItemDropRule[3]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.Abyss.SulphurousSand>(), 1, 20, 50),
|
||||
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.Abyss.SulphurousSandstone>(), 1, 20, 50),
|
||||
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.Abyss.HardenedSulphurousSandstone>(), 1, 20, 50)
|
||||
}));
|
||||
|
||||
// Materials
|
||||
itemLoot.Add(ModContent.ItemType<Items.Placeables.Abyss.SulphurousSand>(), 1, 5, 10);
|
||||
itemLoot.Add(ModContent.ItemType<Items.Placeables.Abyss.SulphurousSandstone>(), 1, 5, 10);
|
||||
itemLoot.Add(ModContent.ItemType<Items.Placeables.Abyss.HardenedSulphurousSandstone>(), 1, 5, 10);
|
||||
itemLoot.Add(ModContent.ItemType<Acidwood>(), 1, 5, 10);
|
||||
|
||||
tier1AcidRain.Add(ModContent.ItemType<SulphuricScale>(), 10, 1, 3);
|
||||
tier2AcidRain.Add(ModContent.ItemType<CorrodedFossil>(), 10, 1, 3);
|
||||
tier2AbyssAvailable.Add(ModContent.ItemType<DepthCells>(), 5, 2, 5);
|
||||
tier2AbyssAvailable.Add(ModContent.ItemType<Lumenyl>(), 5, 2, 5);
|
||||
tier2AbyssAvailable.Add(ModContent.ItemType<Items.Placeables.Abyss.PlantyMush>(), 5, 2, 5);
|
||||
scoriaAvailable.Add(ModContent.ItemType<ScoriaOre>(), 5, 16, 28);
|
||||
scoriaAvailable.Add(ModContent.ItemType<ScoriaBar>(), new Fraction(15, 100), 4, 7);
|
||||
tier3AcidRain.Add(ModContent.ItemType<ReaperTooth>(), 10, 1, 5);
|
||||
// Rusty Chest Loot @ 100%; Individually 25%
|
||||
itemLoot.Add(new OneFromOptionsNotScaledWithLuckDropRule(1, 1,
|
||||
ModContent.ItemType<BrokenWaterFilter>(),
|
||||
ModContent.ItemType<EffigyOfDecay>(),
|
||||
ModContent.ItemType<RustyBeaconPrototype>(),
|
||||
ModContent.ItemType<RustyMedallion>()
|
||||
));
|
||||
|
||||
// Pre-HM Abyss Weapons
|
||||
tier1AbyssAvailable.Add(new OneFromOptionsDropRule(10, 1,
|
||||
itemLoot.Add(new OneFromOptionsDropRule(10, 1,
|
||||
ModContent.ItemType<BallOFugu>(),
|
||||
ModContent.ItemType<Archerfish>(),
|
||||
ModContent.ItemType<BlackAnurian>(),
|
||||
ModContent.ItemType<HerringStaff>(),
|
||||
ModContent.ItemType<Lionfish>()
|
||||
));
|
||||
|
||||
// Post-AS Acid Rain Weapons (and Nuclear Rod)
|
||||
tier2AcidRain.Add(new OneFromOptionsDropRule(10, 1,
|
||||
ModContent.ItemType<SulphurousGrabber>(),
|
||||
ModContent.ItemType<FlakToxicannon>(),
|
||||
ModContent.ItemType<BelchingSaxophone>(),
|
||||
ModContent.ItemType<SlitheringEels>(),
|
||||
ModContent.ItemType<SkyfinBombers>(),
|
||||
ModContent.ItemType<SpentFuelContainer>(),
|
||||
ModContent.ItemType<NuclearFuelRod>()
|
||||
));
|
||||
|
||||
// Pre-HM Abyss Equipment (and Torrential Tear)
|
||||
tier1AbyssAvailable.Add(new OneFromOptionsDropRule(4, 1,
|
||||
ModContent.ItemType<Lionfish>(),
|
||||
ModContent.ItemType<AnechoicPlating>(),
|
||||
ModContent.ItemType<DepthCharm>(),
|
||||
ModContent.ItemType<IronBoots>(),
|
||||
@@ -105,18 +72,7 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
|
||||
ModContent.ItemType<TorrentialTear>()
|
||||
));
|
||||
|
||||
// Bait
|
||||
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
|
||||
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
|
||||
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
|
||||
|
||||
// Potions
|
||||
itemLoot.Add(ModContent.ItemType<AnechoicCoating>(), 10, 1, 3);
|
||||
itemLoot.AddCratePotionRules();
|
||||
|
||||
// Money
|
||||
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
|
||||
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
|
||||
itemLoot.AddBiomeCrateLootRules();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,11 @@
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Pets;
|
||||
using CalamityMod.Items.Placeables.Abyss;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Items.Tools.ClimateChange;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.Tiles.Abyss;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.ItemDropRules;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CrateTile = CalamityMod.Tiles.Abyss.SulphurousCrateTile;
|
||||
|
||||
namespace CalamityMod.Items.Fishing.SulphurCatches
|
||||
{
|
||||
@@ -29,18 +21,10 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 32;
|
||||
Item.height = 32;
|
||||
Item.maxStack = 9999;
|
||||
Item.consumable = true;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
Item.DefaultToPlaceableTile(ModContent.TileType<SulphurousCrateTile>());
|
||||
Item.width = Item.height = 32;
|
||||
Item.value = Item.sellPrice(gold: 1);
|
||||
Item.createTile = ModContent.TileType<CrateTile>();
|
||||
Item.useTurn = true;
|
||||
Item.autoReuse = true;
|
||||
Item.useAnimation = 15;
|
||||
Item.useTime = 10;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
}
|
||||
|
||||
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
|
||||
@@ -51,47 +35,23 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
|
||||
public override bool CanRightClick() => true;
|
||||
public override void ModifyItemLoot(ItemLoot itemLoot)
|
||||
{
|
||||
var tier1AbyssAvailable = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedSlimeGod || Main.hardMode);
|
||||
var tier1AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedEoCAcidRain);
|
||||
// 20-50 Blocks @ 100%; Individually 33.33%
|
||||
itemLoot.Add(new OneFromRulesRule(1, new IItemDropRule[3]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.Abyss.SulphurousSand>(), 1, 20, 50),
|
||||
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.Abyss.SulphurousSandstone>(), 1, 20, 50),
|
||||
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.Abyss.HardenedSulphurousSandstone>(), 1, 20, 50)
|
||||
}));
|
||||
|
||||
// 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);
|
||||
itemLoot.Add(ModContent.ItemType<Acidwood>(), 1, 5, 10);
|
||||
|
||||
tier1AcidRain.Add(ModContent.ItemType<SulphuricScale>(), 10, 1, 3);
|
||||
|
||||
// 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>()
|
||||
// Rusty Chest Loot @ 100%; Individually 25%
|
||||
itemLoot.Add(new OneFromOptionsNotScaledWithLuckDropRule(1, 1,
|
||||
ModContent.ItemType<BrokenWaterFilter>(),
|
||||
ModContent.ItemType<EffigyOfDecay>(),
|
||||
ModContent.ItemType<RustyBeaconPrototype>(),
|
||||
ModContent.ItemType<RustyMedallion>()
|
||||
));
|
||||
|
||||
// Pre-HM Abyss Equipment (and Torrential Tear)
|
||||
tier1AbyssAvailable.Add(new OneFromOptionsDropRule(4, 1,
|
||||
ModContent.ItemType<AnechoicPlating>(),
|
||||
ModContent.ItemType<DepthCharm>(),
|
||||
ModContent.ItemType<IronBoots>(),
|
||||
ModContent.ItemType<StrangeOrb>(),
|
||||
ModContent.ItemType<TorrentialTear>()
|
||||
));
|
||||
|
||||
// Bait
|
||||
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
|
||||
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
|
||||
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
|
||||
|
||||
// Potions
|
||||
itemLoot.Add(ModContent.ItemType<AnechoicCoating>(), 10, 1, 3);
|
||||
itemLoot.AddCratePotionRules(false);
|
||||
|
||||
// Money
|
||||
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
|
||||
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
|
||||
itemLoot.AddBiomeCrateLootRules(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,4 @@
|
||||
using CalamityMod.Items.Critters;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.SunkenSea;
|
||||
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;
|
||||
@@ -24,18 +18,10 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 32;
|
||||
Item.height = 32;
|
||||
Item.maxStack = 9999;
|
||||
Item.consumable = true;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
Item.DefaultToPlaceableTile(ModContent.TileType<EutrophicCrateTile>());
|
||||
Item.width = Item.height = 32;
|
||||
Item.value = Item.sellPrice(gold: 1);
|
||||
Item.createTile = ModContent.TileType<Tiles.SunkenSea.EutrophicCrateTile>();
|
||||
Item.useTurn = true;
|
||||
Item.autoReuse = true;
|
||||
Item.useAnimation = 15;
|
||||
Item.useTime = 10;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
}
|
||||
|
||||
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
|
||||
@@ -46,27 +32,15 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
|
||||
public override bool CanRightClick() => true;
|
||||
public override void ModifyItemLoot(ItemLoot itemLoot)
|
||||
{
|
||||
var postDesertScourge = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedDesertScourge);
|
||||
// 20-50 Blocks @ 100%; Individually 33.33%
|
||||
itemLoot.Add(new OneFromRulesRule(1, new IItemDropRule[3]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.SunkenSea.Navystone>(), 1, 20, 50),
|
||||
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.SunkenSea.EutrophicSand>(), 1, 20, 50),
|
||||
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.SunkenSea.Driftwood>(), 1, 20, 50)
|
||||
}));
|
||||
|
||||
// Materials
|
||||
itemLoot.Add(ModContent.ItemType<Navystone>(), 1, 10, 30);
|
||||
itemLoot.Add(ModContent.ItemType<EutrophicSand>(), 1, 10, 30);
|
||||
itemLoot.Add(ModContent.ItemType<Driftwood>(), 1, 30, 60);
|
||||
postDesertScourge.Add(ModContent.ItemType<PrismShard>(), 1, 5, 10);
|
||||
postDesertScourge.Add(ModContent.ItemType<SeaPrism>(), 5, 2, 5);
|
||||
|
||||
// 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
|
||||
itemLoot.AddCratePotionRules(false);
|
||||
|
||||
// Money
|
||||
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
|
||||
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
|
||||
itemLoot.AddBiomeCrateLootRules(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,4 @@
|
||||
using CalamityMod.Items.Critters;
|
||||
using CalamityMod.Items.Fishing.BrimstoneCragCatches;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.SunkenSea;
|
||||
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;
|
||||
@@ -26,18 +19,10 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 32;
|
||||
Item.height = 32;
|
||||
Item.maxStack = 9999;
|
||||
Item.consumable = true;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
Item.DefaultToPlaceableTile(ModContent.TileType<PrismCrateTile>());
|
||||
Item.width = Item.height = 32;
|
||||
Item.value = Item.sellPrice(gold: 1);
|
||||
Item.createTile = ModContent.TileType<Tiles.SunkenSea.PrismCrateTile>();
|
||||
Item.useTurn = true;
|
||||
Item.autoReuse = true;
|
||||
Item.useAnimation = 15;
|
||||
Item.useTime = 10;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
}
|
||||
|
||||
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
|
||||
@@ -48,37 +33,15 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
|
||||
public override bool CanRightClick() => true;
|
||||
public override void ModifyItemLoot(ItemLoot itemLoot)
|
||||
{
|
||||
var postDesertScourge = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedDesertScourge);
|
||||
var postHardmodeClam = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedCLAMHardMode);
|
||||
// 20-50 Blocks @ 100%; Individually 33.33%
|
||||
itemLoot.Add(new OneFromRulesRule(1, new IItemDropRule[3]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.SunkenSea.Navystone>(), 1, 20, 50),
|
||||
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.SunkenSea.EutrophicSand>(), 1, 20, 50),
|
||||
ItemDropRule.NotScalingWithLuck(ModContent.ItemType<Items.Placeables.SunkenSea.Driftwood>(), 1, 20, 50)
|
||||
}));
|
||||
|
||||
// Materials
|
||||
itemLoot.Add(ModContent.ItemType<Navystone>(), 1, 10, 30);
|
||||
itemLoot.Add(ModContent.ItemType<EutrophicSand>(), 1, 10, 30);
|
||||
itemLoot.Add(ModContent.ItemType<Driftwood>(), 1, 30, 60);
|
||||
postDesertScourge.Add(ModContent.ItemType<PrismShard>(), 1, 5, 10);
|
||||
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<ClamCrusher>(),
|
||||
ModContent.ItemType<ClamorRifle>(),
|
||||
ModContent.ItemType<Poseidon>(),
|
||||
ModContent.ItemType<ShellfishStaff>()
|
||||
));
|
||||
|
||||
// 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
|
||||
itemLoot.AddCratePotionRules();
|
||||
|
||||
// Money
|
||||
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
|
||||
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
|
||||
itemLoot.AddBiomeCrateLootRules();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Abyss;
|
||||
using CalamityMod.Tiles.Furniture;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -16,13 +14,5 @@ namespace CalamityMod.Items.Placeables.Furniture
|
||||
Item.value = Item.sellPrice(silver: 10);
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
}
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<Acidwood>(10).
|
||||
AddIngredient<SulphuricScale>(2).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -44,14 +43,5 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
player.UpdateMaxTurrets();
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddRecipeGroup("AnySilverBar", 10).
|
||||
AddIngredient<SulphuricScale>(3).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -93,9 +93,8 @@ AlluringBait: {
|
||||
DisplayName: Alluring Bait
|
||||
Tooltip:
|
||||
'''
|
||||
Increases fishing power by 30
|
||||
Greatly increases chance of catching potion ingredient fish
|
||||
Potion ingredient fish yield is increased
|
||||
Increases fishing power by 10
|
||||
Increases the yield of potion ingredient fish
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -706,7 +705,12 @@ ElysianAegis: {
|
||||
|
||||
EnchantedPearl: {
|
||||
DisplayName: Enchanted Pearl
|
||||
Tooltip: Increases fishing power by 10 and crate catch chance by 10%
|
||||
Tooltip:
|
||||
'''
|
||||
Increases fishing power by 10
|
||||
Increases chance to catch crates and loot-containing fish by 15%
|
||||
Crates are 25% more likely to be higher quality
|
||||
'''
|
||||
}
|
||||
|
||||
EtherealExtorter: {
|
||||
@@ -1746,11 +1750,9 @@ SupremeBaitTackleBoxFishingStation: {
|
||||
DisplayName: Supreme Bait Tackle Box Fishing Station
|
||||
Tooltip:
|
||||
'''
|
||||
Increases fishing skill by 80, and crate catch chance by 10%
|
||||
Increases fishing power by 50
|
||||
Fishing line will never break and decreases chance of bait consumption
|
||||
Allows fishing in lava
|
||||
Sonar potion effect
|
||||
The ultimate fishing accessory
|
||||
Allows fishing in lava and detects hooked fish
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -1716,22 +1716,6 @@ namespace CalamityMod.Systems
|
||||
r.AddTile(TileID.Loom);
|
||||
r.Register();
|
||||
r.DisableDecraft();
|
||||
|
||||
// Band of Regeneration
|
||||
r = Recipe.Create(ItemID.BandofRegeneration);
|
||||
r.AddIngredient(ItemID.Shackle);
|
||||
r.AddIngredient(ItemID.LifeCrystal, 1);
|
||||
r.AddTile(TileID.Anvils);
|
||||
r.Register();
|
||||
r.DisableDecraft();
|
||||
|
||||
// Flare Gun
|
||||
r = Recipe.Create(ItemID.FlareGun);
|
||||
r.AddRecipeGroup(AnyCopperBar, 5);
|
||||
r.AddIngredient(ItemID.Torch, 10);
|
||||
r.AddTile(TileID.Anvils);
|
||||
r.Register();
|
||||
r.DisableDecraft();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
+329
-37
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.NPCs.SulphurousSea;
|
||||
@@ -282,51 +283,323 @@ namespace CalamityMod
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds all the common potions for fishing crates, alongside scaling mana and regen potions
|
||||
/// Adds all the common drops for Biome Crates.
|
||||
/// </summary>
|
||||
/// <param name="loot">The ILoot interface for the loot table.</param>
|
||||
/// <param name="hardMode">Whether or not the crate is considered a hardmode crate.</param>
|
||||
public static void AddCratePotionRules(this ILoot loot, bool hardMode = true)
|
||||
public static void AddBiomeCrateLootRules(this ILoot loot, bool hardMode = true)
|
||||
{
|
||||
loot.Add(ItemID.ObsidianSkinPotion, 10, 1, 3);
|
||||
loot.Add(ItemID.SwiftnessPotion, 10, 1, 3);
|
||||
loot.Add(ItemID.IronskinPotion, 10, 1, 3);
|
||||
loot.Add(ItemID.NightOwlPotion, 10, 1, 3);
|
||||
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
|
||||
|
||||
// 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);
|
||||
|
||||
// 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));
|
||||
|
||||
// Actually chain all the LCRs together
|
||||
// Greater potions upwards are only chained if the crate is marked as Hardmode
|
||||
if (hardMode)
|
||||
loot.AddHardmodeOresToCrates(HardmodeCrateType.Biome);
|
||||
else
|
||||
{
|
||||
lcrSupremePotion.Add(supremePots);
|
||||
lcrSupremePotion.OnFailedConditions(lcrSuperPotion);
|
||||
lcrSuperPotion.Add(superPots);
|
||||
lcrSuperPotion.OnFailedConditions(lcrGreaterPotion);
|
||||
lcrGreaterPotion.Add(greaterPots);
|
||||
lcrGreaterPotion.OnFailedConditions(lcrRegularPotion);
|
||||
// Pre-Hardmode Ore/Bar loot pools
|
||||
// 20-35 Ores @ 14.29%; Individually 1.79%
|
||||
IItemDropRule[] phmOres = new IItemDropRule[8]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CopperOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TinOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.IronOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.LeadOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.SilverOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TungstenOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.GoldOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PlatinumOre, 1, 20, 35)
|
||||
};
|
||||
loot.Add(new OneFromRulesRule(7, phmOres));
|
||||
|
||||
// 6-16 Bars @ 25%; Individually 4.17%
|
||||
IItemDropRule[] phmBars = new IItemDropRule[6]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.IronBar, 1, 6, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.LeadBar, 1, 6, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.SilverBar, 1, 6, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TungstenBar, 1, 6, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.GoldBar, 1, 6, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PlatinumBar, 1, 6, 16)
|
||||
};
|
||||
loot.Add(new OneFromRulesRule(4, phmBars));
|
||||
}
|
||||
lcrRegularPotion.Add(regularPots);
|
||||
lcrRegularPotion.OnFailedConditions(lesserPots);
|
||||
// Add the chain starting from regular potions if marked as a Pre-Hardmode crate
|
||||
if (!hardMode)
|
||||
|
||||
// 2-4 Buff Potions @ 25%; Individually 4.17%
|
||||
loot.Add(new OneFromRulesRule(4, new IItemDropRule[6]
|
||||
{
|
||||
loot.Add(lcrRegularPotion);
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.ObsidianSkinPotion, 1, 2, 4),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.SpelunkerPotion, 1, 2, 4),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.HunterPotion, 1, 2, 4),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.GravitationPotion, 1, 2, 4),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.MiningPotion, 1, 2, 4),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.HeartreachPotion, 1, 2, 4)
|
||||
}));
|
||||
|
||||
// 5-17 (Regular) Recovery Potions @ 50%; 25% Healing 25% Mana
|
||||
loot.Add(new OneFromRulesRule(2, new IItemDropRule[2]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.HealingPotion, 1, 5, 17),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.ManaPotion, 1, 5, 17)
|
||||
}));
|
||||
|
||||
// 2-6 Bait @ 50%; 25% Master 25% Apprentice
|
||||
loot.Add(new OneFromRulesRule(2, new IItemDropRule[2]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.MasterBait, 1, 2, 6),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.ApprenticeBait, 1, 2, 6)
|
||||
}));
|
||||
|
||||
// 5-12 Gold Coin @ 25%
|
||||
loot.Add(ItemID.GoldCoin, 4, 5, 12);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds (or re-adds) Hardmode Ores to crates with respect to Hardmode Progression rework<br/>
|
||||
/// Drop rules replicate vanilla's rules.
|
||||
/// </summary>
|
||||
/// <param name="loot">The ILoot interface for the loot table.</param>
|
||||
/// <param name="type">Type of crate: Mythril, Titanium, Biome</param>
|
||||
public static void AddHardmodeOresToCrates(this ILoot loot, HardmodeCrateType type)
|
||||
{
|
||||
var adamantiteLCR = loot.DefineConditionalDropSet(AdamantiteCondition);
|
||||
var mythrilLCR = new LeadingConditionRule(MythrilCondition);
|
||||
if (type == HardmodeCrateType.Biome)
|
||||
{
|
||||
// Pre-Hardmode loot pools
|
||||
// 20-35 Ores @ 7.14%; Individually 0.89%
|
||||
IItemDropRule[] phmOres = new IItemDropRule[8]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CopperOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TinOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.IronOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.LeadOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.SilverOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TungstenOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.GoldOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PlatinumOre, 1, 20, 35)
|
||||
};
|
||||
// 6-16 Bars @ 8.33%; Individually 1.39%
|
||||
IItemDropRule[] phmBars = new IItemDropRule[6]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.IronBar, 1, 6, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.LeadBar, 1, 6, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.SilverBar, 1, 6, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TungstenBar, 1, 6, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.GoldBar, 1, 6, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PlatinumBar, 1, 6, 16)
|
||||
};
|
||||
|
||||
// Tier 3 loot pools
|
||||
// 20-35 Ores @ 7.14%; Individually 1.19%
|
||||
IItemDropRule[] hmOresThree = new IItemDropRule[6]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CobaltOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PalladiumOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.MythrilOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.OrichalcumOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.AdamantiteOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TitaniumOre, 1, 20, 35)
|
||||
};
|
||||
// 5-16 Bars @ 16.67%; Individually 2.78%
|
||||
IItemDropRule[] hmBarsThree = new IItemDropRule[6]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CobaltBar, 1, 5, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PalladiumBar, 1, 5, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.MythrilBar, 1, 5, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.OrichalcumBar, 1, 5, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.AdamantiteBar, 1, 5, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TitaniumBar, 1, 5, 16)
|
||||
};
|
||||
var adamantiteDropsOres = new SequentialRulesNotScalingWithLuckRule(7, new OneFromRulesRule(2, hmOresThree), new OneFromRulesRule(1, phmOres));
|
||||
var adamantiteDropsBars = new SequentialRulesNotScalingWithLuckRule(4, new OneFromRulesRule(3, 2, hmBarsThree), new OneFromRulesRule(1, phmBars));
|
||||
|
||||
// Tier 2 loot pools
|
||||
// 20-35 Ores @ 7.14%; Individually 1.79%
|
||||
IItemDropRule[] hmOresTwo = new IItemDropRule[4]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CobaltOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PalladiumOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.MythrilOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.OrichalcumOre, 1, 20, 35)
|
||||
};
|
||||
// 5-16 Bars @ 16.67%; Individually 4.17%
|
||||
IItemDropRule[] hmBarsTwo = new IItemDropRule[4]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CobaltBar, 1, 5, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PalladiumBar, 1, 5, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.MythrilBar, 1, 5, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.OrichalcumBar, 1, 5, 16)
|
||||
};
|
||||
var mythrilDropsOres = new SequentialRulesNotScalingWithLuckRule(7, new OneFromRulesRule(2, hmOresTwo), new OneFromRulesRule(1, phmOres));
|
||||
var mythrilDropsBars = new SequentialRulesNotScalingWithLuckRule(4, new OneFromRulesRule(3, 2, hmBarsTwo), new OneFromRulesRule(1, phmBars));
|
||||
|
||||
// Tier 1 loot pools
|
||||
// 20-35 Ores @ 7.14%; Individually 3.57%
|
||||
IItemDropRule[] hmOresOne = new IItemDropRule[2]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CobaltOre, 1, 20, 35),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PalladiumOre, 1, 20, 35)
|
||||
};
|
||||
// 5-16 Bars @ 16.67%; Individually 8.33%
|
||||
IItemDropRule[] hmBarsOne = new IItemDropRule[2]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CobaltBar, 1, 5, 16),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PalladiumBar, 1, 5, 16)
|
||||
};
|
||||
var cobaltDropsOres = new SequentialRulesNotScalingWithLuckRule(7, new OneFromRulesRule(2, hmOresOne), new OneFromRulesRule(1, phmOres));
|
||||
var cobaltDropsBars = new SequentialRulesNotScalingWithLuckRule(4, new OneFromRulesRule(3, 2, hmBarsOne), new OneFromRulesRule(1, phmBars));
|
||||
|
||||
adamantiteLCR.Add(adamantiteDropsOres);
|
||||
adamantiteLCR.Add(adamantiteDropsBars);
|
||||
adamantiteLCR.OnFailedConditions(mythrilLCR);
|
||||
mythrilLCR.Add(mythrilDropsOres);
|
||||
mythrilLCR.Add(mythrilDropsBars);
|
||||
mythrilLCR.OnFailedConditions(cobaltDropsOres);
|
||||
mythrilLCR.OnFailedConditions(cobaltDropsBars);
|
||||
}
|
||||
else if (type == HardmodeCrateType.Mythril)
|
||||
{
|
||||
// Pre-Hardmode loot pools
|
||||
// 12-21 Ores @ 8.33%; Individually 1.39%
|
||||
IItemDropRule[] phmOres = new IItemDropRule[6]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CopperOre, 1, 12, 21),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TinOre, 1, 12, 21),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.IronOre, 1, 12, 21),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.LeadOre, 1, 12, 21),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.SilverOre, 1, 12, 21),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TungstenOre, 1, 12, 21),
|
||||
};
|
||||
// 4-7 Bars @ 6.94%; Individually 1.16%
|
||||
IItemDropRule[] phmBars = new IItemDropRule[6]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CopperBar, 1, 4, 7),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TinBar, 1, 4, 7),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.IronBar, 1, 4, 7),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.LeadBar, 1, 4, 7),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.SilverBar, 1, 4, 7),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TungstenBar, 1, 4, 7),
|
||||
};
|
||||
|
||||
// Tier 2 loot pools
|
||||
// 12-21 Ores @ 8.33%; Individually 2.08%
|
||||
IItemDropRule[] hmOresTwo = new IItemDropRule[4]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CobaltOre, 1, 12, 21),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PalladiumOre, 1, 12, 21),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.MythrilOre, 1, 12, 21),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.OrichalcumOre, 1, 12, 21)
|
||||
};
|
||||
// 3-7 Bars @ 13.89%; Individually 3.47%
|
||||
IItemDropRule[] hmBarsTwo = new IItemDropRule[4]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CobaltBar, 1, 3, 7),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PalladiumBar, 1, 3, 7),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.MythrilBar, 1, 3, 7),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.OrichalcumBar, 1, 3, 7)
|
||||
};
|
||||
var mythrilDropsOres = new SequentialRulesNotScalingWithLuckRule(6, new OneFromRulesRule(2, hmOresTwo), new OneFromRulesRule(1, phmOres));
|
||||
var mythrilDropsBars = new SequentialRulesNotScalingWithLuckRule(4, new OneFromRulesRule(3, 2, hmBarsTwo), new OneFromRulesRule(1, phmBars));
|
||||
var mythrilDrops = new SequentialRulesNotScalingWithLuckRule(1, mythrilDropsOres, mythrilDropsBars);
|
||||
|
||||
// Tier 1 loot pools
|
||||
// 12-21 Ores @ 8.33%; Individually 4.17%
|
||||
IItemDropRule[] hmOresOne = new IItemDropRule[2]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CobaltOre, 1, 12, 21),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PalladiumOre, 1, 12, 21)
|
||||
};
|
||||
// 3-7 Bars @ 13.89%; Individually 6.94%
|
||||
IItemDropRule[] hmBarsOne = new IItemDropRule[2]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CobaltBar, 1, 3, 7),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PalladiumBar, 1, 3, 7)
|
||||
};
|
||||
var cobaltDropsOres = new SequentialRulesNotScalingWithLuckRule(6, new OneFromRulesRule(2, hmOresOne), new OneFromRulesRule(1, phmOres));
|
||||
var cobaltDropsBars = new SequentialRulesNotScalingWithLuckRule(4, new OneFromRulesRule(3, 2, hmBarsOne), new OneFromRulesRule(1, phmBars));
|
||||
var cobaltDrops = new SequentialRulesNotScalingWithLuckRule(1, cobaltDropsOres, cobaltDropsBars);
|
||||
|
||||
mythrilLCR.Add(mythrilDrops);
|
||||
mythrilLCR.OnFailedConditions(cobaltDrops);
|
||||
loot.Add(mythrilLCR); // No Adamantite LCR here so we need to add this in
|
||||
}
|
||||
else if (type == HardmodeCrateType.Titanium)
|
||||
{
|
||||
// Pre-Hardmode loot pools
|
||||
// 25-34 Ores @ 10%; Individually 2.5%
|
||||
IItemDropRule[] phmOres = new IItemDropRule[4]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.SilverOre, 1, 25, 34),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TungstenOre, 1, 25, 34),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.GoldOre, 1, 25, 34),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PlatinumOre, 1, 25, 34)
|
||||
};
|
||||
// 8-11 Bars @ 8.89%; Individually 2.22%
|
||||
IItemDropRule[] phmBars = new IItemDropRule[4]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.SilverBar, 1, 8, 11),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TungstenBar, 1, 8, 11),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.GoldBar, 1, 8, 11),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PlatinumBar, 1, 8, 11)
|
||||
};
|
||||
|
||||
// Tier 3 loot pools
|
||||
// 25-34 Ores @ 10%; Individually 2.5%
|
||||
IItemDropRule[] hmOresThree = new IItemDropRule[4]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.MythrilOre, 1, 25, 34),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.OrichalcumOre, 1, 25, 34),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.AdamantiteOre, 1, 25, 34),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TitaniumOre, 1, 25, 34)
|
||||
};
|
||||
// 8-11 Bars @ 17.78%; Individually 4.44%
|
||||
IItemDropRule[] hmBarsThree = new IItemDropRule[4]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.MythrilBar, 1, 8, 11),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.OrichalcumBar, 1, 8, 11),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.AdamantiteBar, 1, 8, 11),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.TitaniumBar, 1, 8, 11)
|
||||
};
|
||||
var adamantiteDropsOres = new SequentialRulesNotScalingWithLuckRule(5, new OneFromRulesRule(2, hmOresThree), new OneFromRulesRule(1, phmOres));
|
||||
var adamantiteDropsBars = new SequentialRulesNotScalingWithLuckRule(3, new OneFromRulesRule(3, 2, hmBarsThree), new OneFromRulesRule(1, phmBars));
|
||||
var adamantiteDrops = new SequentialRulesNotScalingWithLuckRule(1, adamantiteDropsOres, adamantiteDropsBars);
|
||||
|
||||
// Tier 2 loot pools
|
||||
// 25-34 Ores @ 10%; Individually 5%
|
||||
IItemDropRule[] hmOresTwo = new IItemDropRule[2]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.MythrilOre, 1, 25, 34),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.OrichalcumOre, 1, 25, 34)
|
||||
};
|
||||
// 8-11 Bars @ 17.78%; Individually 8.89%
|
||||
IItemDropRule[] hmBarsTwo = new IItemDropRule[2]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.MythrilBar, 1, 8, 11),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.OrichalcumBar, 1, 8, 11)
|
||||
};
|
||||
var mythrilDropsOres = new SequentialRulesNotScalingWithLuckRule(5, new OneFromRulesRule(2, hmOresTwo), new OneFromRulesRule(1, phmOres));
|
||||
var mythrilDropsBars = new SequentialRulesNotScalingWithLuckRule(3, new OneFromRulesRule(3, 2, hmBarsTwo), new OneFromRulesRule(1, phmBars));
|
||||
var mythrilDrops = new SequentialRulesNotScalingWithLuckRule(1, mythrilDropsOres, mythrilDropsBars);
|
||||
|
||||
// Tier 1 loot pools
|
||||
// EXCEPTION: Titanium Crates do not drop Cobalt. This is added to make it not entirely useless to get early.
|
||||
// 25-34 Ores @ 10%; Individually 5%
|
||||
IItemDropRule[] hmOresOne = new IItemDropRule[2]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CobaltOre, 1, 25, 34),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PalladiumOre, 1, 25, 34)
|
||||
};
|
||||
// 8-11 Bars @ 17.78%; Individually 8.89%
|
||||
IItemDropRule[] hmBarsOne = new IItemDropRule[2]
|
||||
{
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.CobaltBar, 1, 8, 11),
|
||||
ItemDropRule.NotScalingWithLuck(ItemID.PalladiumBar, 1, 8, 11)
|
||||
};
|
||||
var cobaltDropsOres = new SequentialRulesNotScalingWithLuckRule(5, new OneFromRulesRule(2, hmOresOne), new OneFromRulesRule(1, phmOres));
|
||||
var cobaltDropsBars = new SequentialRulesNotScalingWithLuckRule(3, new OneFromRulesRule(3, 2, hmBarsOne), new OneFromRulesRule(1, phmBars));
|
||||
var cobaltDrops = new SequentialRulesNotScalingWithLuckRule(1, cobaltDropsOres, cobaltDropsBars);
|
||||
|
||||
adamantiteLCR.Add(adamantiteDrops);
|
||||
adamantiteLCR.OnFailedConditions(mythrilLCR);
|
||||
mythrilLCR.Add(mythrilDrops);
|
||||
mythrilLCR.OnFailedConditions(cobaltDrops);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -484,6 +757,25 @@ namespace CalamityMod
|
||||
#endregion
|
||||
|
||||
#region Drop Rule Conditions
|
||||
public static IItemDropRuleCondition MythrilCondition = If((info) =>
|
||||
{
|
||||
// If the Early Hardmode Progression Rework is not enabled, then Mythril/Orichalcum can always drop.
|
||||
if (!CalamityServerConfig.Instance.EarlyHardmodeProgressionRework)
|
||||
return true;
|
||||
|
||||
// If the Early Hardmode Progression Rework is enabled, then any Mechanical Boss must be defeated for Mythril/Orichalcum to drop.
|
||||
return NPC.downedMechBossAny;
|
||||
});
|
||||
public static IItemDropRuleCondition AdamantiteCondition = If((info) =>
|
||||
{
|
||||
// If the Early Hardmode Progression Rework is not enabled, then Adamantite/Titanium can always drop.
|
||||
if (!CalamityServerConfig.Instance.EarlyHardmodeProgressionRework)
|
||||
return true;
|
||||
|
||||
// If the Early Hardmode Progression Rework is enabled, then 2 of the Mechanical Bosses must be defeated for Adamantite/Titanium to drop.
|
||||
return (NPC.downedMechBoss1 && NPC.downedMechBoss2) || (NPC.downedMechBoss2 && NPC.downedMechBoss3) || (NPC.downedMechBoss1 && NPC.downedMechBoss3);
|
||||
});
|
||||
|
||||
public static IItemDropRuleCondition HallowedBarsCondition = If((info) =>
|
||||
{
|
||||
// If the Early Hardmode Progression Rework is not enabled, then Hallowed Bars can always drop from Mechanical Bosses.
|
||||
|
||||
Reference in new issue
Block a user