Final stuff from me: Secret seed things

1 - Celebrationmk10 is now forced to spawn on the Jungle-side Ocean to prevent spawning in the Sulphurous Sea
2 - Moved Calamity final worldgen adjustments to happen before final secret seed adjustments and Dirtiest Block gen (also fixes Forsaken Archive not being painted in secret seeds)
3 - Gravity Normalizer now negates the low gravity of Remix surface
4 - Fixed Aerialite not spawning in Remix
5 - Fixed Cloud Elemental not spawning in Remix
6 - Fixed Armored Digger GFB drops appearing in the bestiary
7 - Fixed Jungle Temple not generating on the surface in Remix
8 - Fixed Mimic and Ice Mimic loot pools in Remix
9 - Fixed Sandstorm's Core broken localization in GFB
This commit is contained in:
CongratsIsTrash authored and GitHub committed 2025-01-31 13:01:05 -05:00
1 parent dec402677e
commit f92ebe7eac
9 files changed
+112 -28

No files matched your search

+1 -1
View File
@@ -2512,7 +2512,7 @@ namespace CalamityMod.CalPlayer
if (gravityNormalizer)
{
Player.buffImmune[BuffID.VortexDebuff] = true;
if (Player.InSpace())
if (Player.ReducedSpaceGravity())
{
Player.gravity = Player.defaultGravity;
if (Player.wet)
+1 -1
View File
@@ -50,7 +50,7 @@ namespace CalamityMod.Items.SummonItems
return true;
}
public override void ModifyTooltips(List<TooltipLine> list) => list.FindAndReplace("[BIOME]", Main.zenithWorld ? CalamityUtils.GetTextValue("Biomes.AstralDesert") : Language.GetTextValue("Bestiary_Biomes.Desert"));
public override void ModifyTooltips(List<TooltipLine> list) => list.FindAndReplace("[BIOME]", Main.zenithWorld ? CalamityUtils.GetTextValue("Biomes.AstralDesert.TownNPCDialogueName") : Language.GetTextValue("Bestiary_Biomes.Desert"));
public override void AddRecipes()
{
+55 -11
View File
@@ -162,19 +162,42 @@ namespace CalamityMod.NPCs
return false;
});
int[] mimicItems = new int[]
{
// Yes, Mimics have three separate loot tables which we must reintegrate
int[] normalMimicItems =
[
ItemID.MagicDagger,
ItemID.CrossNecklace,
ItemID.PhilosophersStone,
ItemID.StarCloak,
ItemID.TitanGlove,
ItemID.DualHook
};
];
int[] remixPreHardMimicItems =
[
ItemID.BandofRegeneration,
ItemID.MagicMirror,
ItemID.CloudinaBottle,
ItemID.HermesBoots,
ItemID.ShoeSpikes,
ItemID.Mace
];
int[] remixHardmodeMimicItems =
[
ItemID.WandofSparking,
ItemID.CrossNecklace,
ItemID.PhilosophersStone,
ItemID.StarCloak,
ItemID.TitanGlove,
ItemID.DualHook
];
// Mimics will not drop any items if spawned from statues.
var notStatue = npcLoot.DefineConditionalDropSet(new Conditions.NotFromStatue());
notStatue.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, mimicItems));
var notRemix = npcLoot.DefineConditionalDropSet(DropHelper.If(() => !(npc.SpawnedFromStatue || Main.remixWorld)));
var remixPreHM = npcLoot.DefineConditionalDropSet(DropHelper.If(() => !npc.SpawnedFromStatue && Main.remixWorld && !Main.hardMode));
var remixHardmode = npcLoot.DefineConditionalDropSet(DropHelper.If(() => !npc.SpawnedFromStatue && Main.remixWorld && Main.hardMode));
notRemix.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, normalMimicItems));
remixPreHM.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, remixPreHardMimicItems));
remixHardmode.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, remixHardmodeMimicItems));
}
catch (ArgumentNullException) { }
break;
@@ -225,17 +248,38 @@ namespace CalamityMod.NPCs
return false;
});
int[] iceMimicItems = new int[]
{
// Yes, Ice Mimics have three separate loot tables which me must reintegrate
int[] normalIceMimicItems =
[
ItemID.Frostbrand,
ItemID.IceBow,
ItemID.FlowerofFrost
};
];
int[] remixPreHardIceMimicItems =
[
ItemID.IceBoomerang,
ItemID.IceBlade,
ItemID.IceBow,
ItemID.IceSkates,
ItemID.BlizzardinaBottle,
ItemID.FlurryBoots
];
int[] remixHardmodeIceMimicItems =
[
ItemID.Frostbrand,
ItemID.SnowballCannon,
ItemID.FlowerofFrost
];
// Ice Mimics will not drop any items if spawned from statues.
var notStatue = npcLoot.DefineConditionalDropSet(new Conditions.NotFromStatue());
notStatue.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, iceMimicItems));
notStatue.Add(ItemID.ToySled, 20, 1, 1);
var notRemix = npcLoot.DefineConditionalDropSet(DropHelper.If(() => !(npc.SpawnedFromStatue || Main.remixWorld)));
var remixPreHM = npcLoot.DefineConditionalDropSet(DropHelper.If(() => !npc.SpawnedFromStatue && Main.remixWorld && !Main.hardMode));
var remixHardmode = npcLoot.DefineConditionalDropSet(DropHelper.If(() => !npc.SpawnedFromStatue && Main.remixWorld && Main.hardMode));
notRemix.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, normalIceMimicItems));
remixPreHM.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, remixPreHardIceMimicItems));
remixHardmode.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, remixHardmodeIceMimicItems));
// Independent from all of the Remix madness, Ice Mimics have a 5% chance to drop Toy Sled.
npcLoot.DefineConditionalDropSet(new Conditions.NotFromStatue()).Add(ItemID.ToySled, 20);
}
catch (ArgumentNullException) { }
break;
+2 -2
View File
@@ -475,8 +475,8 @@ namespace CalamityMod.NPCs.NormalNPCs
npcLoot.Add(ModContent.ItemType<DemonicBoneAsh>(), 1, 2, 4);
npcLoot.Add(ModContent.ItemType<MysteriousCircuitry>(), 1, 4, 8);
npcLoot.Add(ModContent.ItemType<DubiousPlating>(), 1, 4, 8);
npcLoot.AddIf(() => Main.zenithWorld, ModContent.ItemType<UnholyEssence>(), 1, 3, 6);
npcLoot.AddIf(() => Main.zenithWorld, ModContent.ItemType<SanctifiedSpark>(), 10);
npcLoot.AddIf(() => Main.zenithWorld, ModContent.ItemType<UnholyEssence>(), 1, 3, 6, ui: false);
npcLoot.AddIf(() => Main.zenithWorld, ModContent.ItemType<SanctifiedSpark>(), 10, ui: false);
}
public override void ModifyTypeName(ref string typeName)
+1 -1
View File
@@ -451,7 +451,7 @@ namespace CalamityMod.NPCs.NormalNPCs
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (spawnInfo.PlayerSafe || !Main.hardMode || !Main.raining || !spawnInfo.Player.ZoneSkyHeight)
if (spawnInfo.PlayerSafe || !Main.hardMode || (!Main.raining && !Main.remixWorld) || !spawnInfo.Player.ZoneSkyHeight)
return 0f;
// Keep this as a separate if check, because it's a loop and we don't want to be checking it constantly.
+26 -2
View File
@@ -94,6 +94,30 @@ namespace CalamityMod.Systems
}));
}
// Move spawn point in Celebrationmk10 to not be in the Sulphurous Sea
int spawnPointIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Spawn Point"));
if (spawnPointIndex != -1 && WorldGen.tenthAnniversaryWorldGen && !WorldGen.getGoodWorldGen)
{
tasks.Insert(spawnPointIndex + 1, new PassLegacy("Fix Tenth Anniversary Spawn", (progress, config) =>
{
if ((Main.spawnTileX < Main.maxTilesX / 2 && GenVars.dungeonSide == -1) || (Main.spawnTileX > Main.maxTilesX / 2 && GenVars.dungeonSide == 1))
{
// Flip the side of the world you spawn on if it's the Dungeon side
Main.spawnTileX = Main.maxTilesX - Main.spawnTileX;
// Then fix the Y position of the spawn point
for (int i = 0; i < Main.maxTilesY; i++)
{
if (Main.tile[Main.spawnTileX, i].HasTile)
{
Main.spawnTileY = i;
break;
}
}
}
}));
}
// Mechanic Shed
int mechanicIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Sunflowers"));
if (mechanicIndex != -1)
@@ -131,12 +155,12 @@ namespace CalamityMod.Systems
}));
}
// All further tasks occur after vanilla worldgen is completed
// All further tasks occur right before vanilla worldgen is completed (which includes The Dirtiest Block and final secret seed adjustments)
int FinalIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Final Cleanup"));
if (FinalIndex != -1)
{
// Reallocate gems so rarity corresponds to depth
int currentFinalIndex = FinalIndex;
int currentFinalIndex = FinalIndex - 1;
tasks.Insert(++currentFinalIndex, new PassLegacy("Gem Depth Adjustment", (progress, config) =>
{
progress.Message = Language.GetOrRegister("Mods.CalamityMod.UI.GemAdjustment").Value;
+2 -2
View File
@@ -327,11 +327,11 @@ namespace CalamityMod
#region Location and Biomes
public static bool IsUnderwater(this Player player) => Collision.DrownCollision(player.position, player.width, player.height, player.gravDir);
public static bool InSpace(this Player player)
public static bool ReducedSpaceGravity(this Player player)
{
float x = Main.maxTilesX / 4200f;
x *= x;
float spaceGravityMult = (float)((player.position.Y / 16f - (60f + 10f * x)) / (Main.worldSurface / 6.0));
float spaceGravityMult = (float)((player.position.Y / 16f - (60f + 10f * x)) / (Main.worldSurface / (Main.remixWorld ? 1.0 : 6.0)));
return spaceGravityMult < 1f;
}
+3 -3
View File
@@ -30,11 +30,11 @@ namespace CalamityMod.World
Tile tile = Main.tile[x, y];
// The following conditions must happen in order for aerialite to generate:
// 1. The original tile ID must be that of a cloud.
// 1. The original tile ID must be that of a Cloud, Lesion Block, or Flesh Block.
// 2. The original tile must not be empty air.
// 3. A random dice-roll must land correctly, to ensure that patches of ore are occasional.
// If any of these conditions are not met, this loop iteration is skipped.
if (tile.TileType != TileID.Cloud || !tile.HasTile || !WorldGen.genRand.NextBool(CloudOreConversionChance))
if (!(tile.TileType == TileID.Cloud || tile.TileType == TileID.LesionBlock || tile.TileType == TileID.FleshBlock) || !tile.HasTile || !WorldGen.genRand.NextBool(CloudOreConversionChance))
continue;
int radius = (int)(WorldGen.genRand.Next(3, 5) * WorldGen.genRand.NextFloat(0.74f, 0.82f));
@@ -51,7 +51,7 @@ namespace CalamityMod.World
WorldUtils.Gen(new Point(x, y), new ModShapes.All(biggerCircle), Actions.Chain(new GenAction[]
{
new Actions.ClearTile(),
new Actions.PlaceTile((ushort)TileID.Cloud)
new Actions.PlaceTile(tile.TileType)
}));
// Circle of ore.
+21 -5
View File
@@ -26,18 +26,34 @@ namespace CalamityMod.World
int y = WorldGen.genRand.Next((int)Main.rockLayer, Main.maxTilesY - 500);
if (Main.tile[x, y].HasTile && Main.tile[x, y].TileType == 60)
if (Main.remixWorld)
{
Rectangle ugDesert = GenVars.UndergroundDesertLocation;
Rectangle InflatedSunkenSeaLocation = new Rectangle(ugDesert.Left - 160, ugDesert.Center.Y - 160, ugDesert.Width + 320, ugDesert.Height / 2 + 320);
Rectangle TempleLocation = new Rectangle(x - 80, y - 80, 160, 160);
while (Main.tile[x, y].HasTile || Main.tile[x, y].WallType > 0 || y > (int)(Main.worldSurface - 5.0))
{
y--;
}
if (!TempleLocation.Intersects(InflatedSunkenSeaLocation))
y++;
if (Main.tile[x, y].HasTile && (Main.tile[x, y].TileType == TileID.JungleGrass || Main.tile[x, y].TileType == TileID.Mud))
{
success = true;
GenNewTemple(x, y);
}
}
else
{
if (Main.tile[x, y].HasTile && Main.tile[x, y].TileType == TileID.JungleGrass)
{
Rectangle ugDesert = GenVars.UndergroundDesertLocation;
Rectangle InflatedSunkenSeaLocation = new Rectangle(ugDesert.Left - 160, ugDesert.Center.Y - 160, ugDesert.Width + 320, ugDesert.Height / 2 + 320);
Rectangle TempleLocation = new Rectangle(x - 80, y - 80, 160, 160);
if (!TempleLocation.Intersects(InflatedSunkenSeaLocation))
{
success = true;
GenNewTemple(x, y);
}
}
}
}
}