This commit is contained in:
mountaindrew10 committed 2023-08-02 03:41:05 -05:00
commit 52b95ac23e
39 files changed
+332 -125

No files matched your search

-2
View File
@@ -543,7 +543,6 @@ namespace CalamityMod.CalPlayer
public bool voltaicJelly = false;
public bool jellyChargedBattery = false;
public float summonProjCooldown;
public bool oldDukeScales = false;
public bool sandWaifu = false;
public bool sandWaifuVanity = false;
public bool sandBoobWaifu = false;
@@ -1612,7 +1611,6 @@ namespace CalamityMod.CalPlayer
thiefsDime = false;
dynamoStemCells = false;
etherealExtorter = false;
oldDukeScales = false;
blazingCore = false;
voltaicJelly = false;
jellyChargedBattery = false;
-27
View File
@@ -3058,33 +3058,6 @@ namespace CalamityMod.CalPlayer
Player.npcTypeNoAggro[ModContent.NPCType<GammaSlime>()] = true;
}
if (oldDukeScales)
{
Player.buffImmune[ModContent.BuffType<SulphuricPoisoning>()] = true;
Player.buffImmune[BuffID.Poisoned] = true;
Player.buffImmune[BuffID.Venom] = true;
if (Player.statLife <= (int)(Player.statLifeMax2 * 0.75))
{
Player.GetDamage<GenericDamageClass>() += 0.06f;
Player.GetCritChance<GenericDamageClass>() += 3;
}
if (Player.statLife <= (int)(Player.statLifeMax2 * 0.5))
{
Player.GetDamage<GenericDamageClass>() += 0.06f;
Player.GetCritChance<GenericDamageClass>() += 3;
}
if (Player.statLife <= (int)(Player.statLifeMax2 * 0.25))
{
Player.GetDamage<GenericDamageClass>() += 0.06f;
Player.GetCritChance<GenericDamageClass>() += 3;
}
if (Player.lifeRegen < 0)
{
Player.GetDamage<GenericDamageClass>() += 0.1f;
Player.GetCritChance<GenericDamageClass>() += 5;
}
}
if (dArtifact)
Player.GetDamage<GenericDamageClass>() += 0.25f;
+1 -1
View File
@@ -203,7 +203,7 @@ namespace CalamityMod
"Luis",
"Alexander",
"BakaQing",
"Laura",
"Taylor",
"Xaphlactus",
"MajinBagel",
"Bendy",
+43
View File
@@ -0,0 +1,43 @@
using System;
using CalamityMod.Items.Accessories;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria.GameContent;
using Terraria.Localization;
namespace CalamityMod.Cooldowns
{
public class OldDukeScalesFatigue : CooldownHandler
{
public float CompletionPercentage => MathF.Round(100 - instance.Completion * 100);
private bool IsPlayerTired => instance.player.GetModPlayer<OldDukeScalesPlayer>().IsTired;
private float TextXOffset => CompletionPercentage > 99 ? -18 : CompletionPercentage > 9 ? -15 : -12;
private Vector2 TextPosition => new(TextXOffset, 25);
private Color TextColor => IsPlayerTired ? Color.Red : Color.White;
private Color TextBorderColor = Color.Black;
public static new string ID => "OldDukeScalesFatigue";
public override bool CanTickDown => false;
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
public override bool ShouldDisplay => instance.player.GetModPlayer<OldDukeScalesPlayer>().OldDukeScalesOn || IsPlayerTired;
public override string Texture => "CalamityMod/Cooldowns/" + ID;
public override Color CooldownStartColor => IsPlayerTired ? Color.Red : Color.Lerp(Color.Green, Color.Red, instance.Completion);
public override Color CooldownEndColor => IsPlayerTired ? Color.Red : Color.Lerp(Color.Green, Color.Red, instance.Completion);
public override void DrawExpanded(SpriteBatch spriteBatch, Vector2 position, float opacity, float scale)
{
base.DrawExpanded(spriteBatch, position, opacity, scale);
CalamityUtils.DrawBorderStringEightWay(spriteBatch, FontAssets.MouseText.Value, CompletionPercentage.ToString() + "%", position + TextPosition, TextColor, TextBorderColor);
}
public override void DrawCompact(SpriteBatch spriteBatch, Vector2 position, float opacity, float scale)
{
base.DrawCompact(spriteBatch, position, opacity, scale);
CalamityUtils.DrawBorderStringEightWay(spriteBatch, FontAssets.MouseText.Value, CompletionPercentage.ToString() + "%", position + TextPosition, TextColor, TextBorderColor);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

+126 -3
View File
@@ -1,6 +1,8 @@
using CalamityMod.CalPlayer;
using CalamityMod.Cooldowns;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -9,6 +11,11 @@ namespace CalamityMod.Items.Accessories
public class OldDukeScales : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public static int RecoverTime = 120;
public static int DashFatigueIncrease = 240;
public static int MaxFatigue = 1200; // This is also the time that it takes the player to recover from the loss of all stamina.
public override void SetDefaults()
{
Item.width = 28;
@@ -20,8 +27,124 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.oldDukeScales = true;
OldDukeScalesPlayer modPlayer = player.GetModPlayer<OldDukeScalesPlayer>();
modPlayer.OldDukeScalesOn = true;
}
}
public class OldDukeScalesPlayer : ModPlayer
{
public bool OldDukeScalesOn = false;
public bool IsTired = false;
public bool HasBoostedDashFirstFrame = false;
private SoundStyle TiredSound => new SoundStyle("CalamityMod/Sounds/Custom/OldDukeHuff") { PitchVariance = .1f, Volume = .8f };
public int Fatigue = 0;
public int RecoverTimer = 0;
public override void PostUpdateMiscEffects()
{
if (OldDukeScalesOn)
{
// Show the bar if the player doesn't have it.
if (!Player.HasCooldown(OldDukeScalesFatigue.ID))
Player.AddCooldown(OldDukeScalesFatigue.ID, OldDukeScales.MaxFatigue);
if (!IsTired)
{
// +10% DR.
Player.endurance += 0.1f;
// +10% Max Movement Speed.
Player.maxRunSpeed *= 1.1f;
// +10% Max Acceleration.
Player.accRunSpeed *= 1.1f;
// If the player has dashed, increase that dash's velocity,
// the fatigue and sets the time before the fatigue can decrease.
if (Player.dashDelay == -1)
{
if (!HasBoostedDashFirstFrame)
{
RecoverTimer = OldDukeScales.RecoverTime;
Fatigue += OldDukeScales.DashFatigueIncrease;
Player.velocity.X *= 1.25f;
HasBoostedDashFirstFrame = true;
}
}
else
HasBoostedDashFirstFrame = false;
// If the player has reached max fatigue, the player becomes tired.
if (Fatigue >= OldDukeScales.MaxFatigue)
{
SoundEngine.PlaySound(TiredSound, Player.Center);
IsTired = true;
}
}
}
if (IsTired)
{
// -30% Movement Speed.
Player.moveSpeed -= 0.3f;
// If the player dashes, that dash is 50% slower.
if (Player.dashDelay == -1)
{
if (!HasBoostedDashFirstFrame)
{
Player.velocity.X *= 0.5f;
HasBoostedDashFirstFrame = true;
}
}
else
HasBoostedDashFirstFrame = false;
// If the fatigue has worn off, the player is back to normal.
if (Fatigue <= 0)
IsTired = false;
}
//
// This code below the condition for when the accesory is equipped
// is a prevention to not exploit the item and only get the good bonuses.
//
// The cooldown doens't act as a normal cooldown, we use the fatigue as the time left of the cooldown.
if (Player.Calamity().cooldowns.TryGetValue(OldDukeScalesFatigue.ID, out var cooldown))
{
cooldown.timeLeft = Fatigue;
// The cooldown handler doesn't like values higher than 600 frames.
// So we update the duration to a higher value every frame.
cooldown.duration = OldDukeScales.MaxFatigue;
}
// If there's any amount of recovery before decreasing the fatigue, decrease this.
if (RecoverTimer > 0)
RecoverTimer--;
// If the player has recovered, start decreasing the fatigue.
if (Fatigue > 0 && RecoverTimer <= 0)
Fatigue -= Player.StandingStill() ? 2 : 1;
// The fatigue cannot go higher than the max.
if (Fatigue >= OldDukeScales.MaxFatigue)
Fatigue = OldDukeScales.MaxFatigue;
}
public override void ResetEffects()
{
OldDukeScalesOn = false;
}
public override void UpdateDead()
{
Fatigue = 0;
RecoverTimer = 0;
}
}
}
+7 -6
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.SummonItems
public int spawnYAdd = 0;
public override void SetStaticDefaults()
{
ItemID.Sets.SortingPriorityBossSpawns[Type] = 10; // Pirate Map
ItemID.Sets.SortingPriorityBossSpawns[Type] = 10; // Pirate Map
}
public override void SetDefaults()
@@ -40,10 +40,10 @@ namespace CalamityMod.Items.SummonItems
Item.consumable = false;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
itemGroup = ContentSamples.CreativeHelper.ItemGroup.BossItem;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
itemGroup = ContentSamples.CreativeHelper.ItemGroup.BossItem;
}
public override bool CanUseItem(Player player)
{
@@ -105,7 +105,8 @@ namespace CalamityMod.Items.SummonItems
{
CreateRecipe().
AddIngredient(ItemID.HellstoneBar, 10).
AddIngredient<EssenceofHavoc>(7).
// waffles% stipulation: you can only get 5 essences of havoc from the music box, not 7, and cal clone must be accessible
AddIngredient<EssenceofHavoc>(5).
AddTile(TileID.MythrilAnvil).
Register();
}
+7 -7
View File
@@ -13,8 +13,8 @@ namespace CalamityMod.Items.SummonItems
public new string LocalizationCategory => "Items.SummonItems";
public override void SetStaticDefaults()
{
NPCID.Sets.MPAllowedEnemies[NPCID.Plantera] = true;
ItemID.Sets.SortingPriorityBossSpawns[Type] = 11; // Truffle Worm
NPCID.Sets.MPAllowedEnemies[NPCID.Plantera] = true;
ItemID.Sets.SortingPriorityBossSpawns[Type] = 11; // Truffle Worm
}
public override void SetDefaults()
@@ -28,10 +28,10 @@ namespace CalamityMod.Items.SummonItems
Item.consumable = false;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
itemGroup = ContentSamples.CreativeHelper.ItemGroup.BossItem;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
itemGroup = ContentSamples.CreativeHelper.ItemGroup.BossItem;
}
public override bool CanUseItem(Player player)
{
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.SummonItems
AddIngredient(ItemID.JungleSpores, 15).
AddIngredient<MurkyPaste>(3).
AddIngredient<TrapperBulb>().
AddTile(TileID.MythrilAnvil).
AddTile(TileID.Anvils).
Register();
}
}
+1 -1
View File
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue
Item.knockBack = 3f;
Item.value = CalamityGlobalItem.Rarity15BuyPrice;
Item.rare = ModContent.RarityType<DarkOrange>();
Item.rare = ModContent.RarityType<Violet>();
Item.noUseGraphic = true;
+4 -2
View File
@@ -35,10 +35,12 @@ namespace CalamityMod.Items.Weapons.Summon
public static int Scimitar_IFrames = 15;
public static int Wind_BowChargeTime = 5; // Therefore, the higher the time, the slower the fire rate will be, and viceversa.
public static float Wind_ArrowSpeed = 50f;
public static float Wind_ArrowSpeed = 5f;
public static int Wind_ArrowSpeedMult = 10;
public static int Vile_BowChargeTime = 8;
public static float Vile_ArrowSpeed = 50f;
public static float Vile_ArrowSpeed = 5f;
public static int Vile_ArrowSpeedMult = 10;
public static float Vile_SplitDMGMultiplier = .33f;
public static int Vile_SplitIFrames = 30;
public static int Vile_SplitSpreadAngle = 8; // In degrees.
@@ -56,7 +56,7 @@ DespairStone: Constructs created from slabs of Brimstone, given life by warlocks
HeatSpirit: Citizens of Azafure who committed heinous crimes were cast out of the city and forced to don unremovable obsidian skulls as a mark of their sins, to let all know of their vile acts. Now the lost souls of those who were exiled are finally able to return home after the city’s fall, the skulls they wore being all that remains of them.
InfernalCongealment: A lava slime that has absorbed pieces of the charred stone left behind by the Brimstone Elemental. Despite its simple nature, these creatures are just as much of a threat as the rest of the Crag’s current inhabitants.
RenegadeWarlock: Victims caught in the crossfire during the battle between Calamitas and the Brimstone Elemental, cursed to wander the ruins of their former home for all eternity. Their final moments were spent clinging to life, and in death they seek survival by using the very magicks that slaughtered them.
Scryllar: Vengeful spirits of those who lost their lives during the clash between Calamitas and the Elemental, now forever bound to their home. Those who were close enough to bear witness to the battle perished in it, leaving few to know the truth of the battle’s outcome.
Scryllar: Vengeful spirits of those who lost their lives during the clash between Calamitas and the elemental, now forever bound to their home. Those who were close enough to bear witness to the battle perished in it, leaving few to know the truth of the battle’s outcome.
SoulSlurper: An early form of Calamitas’ Soul Seekers, summoned by the Witch during her conflict with the Brimstone Elemental. Unlike the refined form that would follow it, she possessed very little control of them, leading to her creations going rogue shortly after the arduous battle was finally over.
//Draedon Lab Critters
Androomba: One of the most mundane of Draedon’s creations, the directive of Androombas is simply to tidy up his labs and domiciles. He and his scientists could not afford to waste time on menial labor when there was endless research to be done.
@@ -73,10 +73,10 @@ GemCrawler: Relatives to the Ilmeran Sea’s prismbacks. The aquatic lizards end
BlightSlime: Slimes that have absorbed some of the blighted godly essence. Riddled with impurity, they are now more putrid flesh than gelatin and, having taken in such an amount that they seem ready to burst. Yet unlike most slimes which have relatively basic minds, these seem to be collecting mass with a purpose.
Cryon: Archmage Permafrost went through great pains to not take part in combat himself, instead molding cryons to act as his personal guardians. Noticing the spread of godly essence just as many other creatures have, they have come out of stasis to combat any signs of it so that they may defend their master.
CryoSlime: Slimes enchanted by the Archmage, as a host to crystallize the frozen power of the tundra into a magical metal. He cast a spell to hide away most of his creations and research soon after leaving the Godseeeker’s side, well aware that Yharim may attempt to exploit his previous work.
Eidolist: Once members of the Dragon Cult, they now beg the favor of a new master. They are able to live in the abyss indefinitely thanks to their wyrm-like form, allowing them to serve a new purpose.
Eidolist: Once members of the dragon cult, they now beg the favor of a new master. They are able to live in the abyss indefinitely thanks to their wyrm-like form, allowing them to serve a new purpose.
FearlessGoldfishWarrior: Though Goldfish thrive in their ponds and lakes, many take to land during storms to feed on the worms that have also surfaced. There are even accounts of aquatic warriors who carry daggers of shimmering gold, though most consider these tales far too fishy to be credible.
Frogfish: Well-camouflaged and prepared to strike at any moment, Frogfish show that the ocean is rarely as serene as it seems. There are few places where one can find true peace here in the heart of what once was an empire unrivaled.
Horse: After the Brimstone Elemental became dormant, the forgemasters of Azafure used clockwork and crystal to bind the powers of an elemental to a mechanical body. While formidable, it seems the dream of creating a true replacement for an Elemental died unfulfilled with Azafure itself.
Horse: After the Brimstone Elemental became dormant, the forgemasters of Azafure used clockwork and crystal to bind the powers of an elemental to a mechanical body. While formidable, it seems the dream of creating a true replacement for an elemental died unfulfilled with Azafure itself.
IceClasper: Though their exact origins are an enigma, what is known is that these ethereal beings seek to stamp out any and all sources of warmth that exist in their home. Due to this fact, and taking into account the fossil record, many speculate that ice claspers may have played a vital role in the tundra’s creation.
ImpiousImmolator: An idol carved in the image of Her, it is lit ablaze with the crafter’s lifeforce. After all, what weight does one’s life hold when one wishes to see the world wreathed in Her holy flames?
MantisShrimp: Though a variety of answers are given when one asks adventurers about dangerous creatures, few aside from sailors will mention the small yet mighty Mantis Shrimp. Their strikes are so swift that the energy generated from them heats the water to temperatures rivaling the magma of Azafure.
@@ -146,14 +146,14 @@ CosmicLantern: These lanterns possess a magical, distorted flame that radiates n
CorruptSlimeSpawn: Slimes are extraordinarily hardy creatures: if a large slime has chunks of living gelatin severed from it, the chunks tend to continue on, albeit as their own beings. Even as gel, a slime is still technically alive– it simply exists in a state where it cannot function in any meaningful way.
CrimsonSlimeSpawn: Slimes are extraordinarily hardy creatures: if a large slime has chunks of living gelatin severed from it, the chunks tend to continue on, albeit as their own beings.They even retain the memories of the original slime, and so continue to work in the interest of their “parent”.
CrimsonSlimeSpawn2: Though many slimes may get objects stuck partway inside of it and learn to use them as weapons, these slimes are a unique case. The spikes of these slimes are a natural part of them, heavily sharpened so that they may impale those who dare defy their god.
Sepulcher: An amalgamation of souls and flesh given new form and purpose via necromancy. This twisted perversion of life is inspired by the Auric Dragons’ method of revival, though it is plain to see that any grace the dragons may have had is not present here. The school of magic used to create Sepulcher was forbidden in the Deific Era, yet many still practiced it in secrecy.
Sepulcher: An amalgamation of souls and flesh given new form and purpose via necromancy. This twisted perversion of life is inspired by the auric dragons’ method of revival, though it is plain to see that any grace the dragons may have had is not present here. The school of magic used to create Sepulcher was forbidden in the Deific Era, yet many still practiced it in secrecy.
SoulSeekerSupreme: Created through a marriage of brimstone magic and necromancy, these foul beings serve their master’s whims unflinchingly. What they lack in sheer power they make up for in both sheer numbers and suprising amount of coordination.
//Bosses
AquaticScourge: A peaceful yet intimidating being that roamed the Sulphurous Sea, its mere existence was enough to scare away most creatures from the shore. Without its presence to act as a deterrent, fearsome predators now feel safe to prowl during the acidic storms.
AstrumAureus: Once meant for returning equipment from and surveying sites of prior battles, this creation of Draedon’s was overtaken by the Astral Infection. Unfortunately, its defeat has released what power it possessed, granting it instead to the star’s other warriors.
AstrumDeus: When a star begins to die, under normal circumstances, its power simply fades as it falls to the nearest celestial body. However, some dying stars bloat and fester before falling. Astrum Deus exists to consume these stars before the Astral Infection manifests in them, and it has been revered for its sacred duty since time immemorial.
BrimstoneElemental: Roused from her deep slumber in relatively recent years, her awakening set into motion the downfall of Azafure. Most blame her unexpected revival on the city’s overzealous mining of Brimstone, while a few blame the city’s pollution, and some fewer cite dubious prophecies. But behind closed doors, there are whisperings that she was revived deliberately as part of a plot by opposing forces.
Bumblefuck: Long ago, these siblings of the Auric Dragons hid themselves away in the depths of the jungle. They hunt prey using the immense static electricity generated by the flapping of their wings against their feathery bodies, manifesting as deadly bolts of red lightning.
Bumblefuck: Long ago, these siblings of the auric dragons hid themselves away in the depths of the jungle. They hunt prey using the immense static electricity generated by the flapping of their wings against their feathery bodies, manifesting as deadly bolts of red lightning.
Calamitas: This machine which stalks the night carries the failed clone of the Supreme Witch. Though lacking her hexes and black magic, even a fragment of Calamitas’ brimstone power was enough to drive the clone to insanity. Nothing human remains.
Cataclysm: A pitiable creation of the clone, made in an attempt to imitate one of the Supreme Witch’s brothers. Yet this and the clone’s other creations have no will of their own, amounting to little more than puppets she controls.
Catastrophe: A pitiable creation of the clone, made in an attempt to imitate one of the Supreme Witch’s brothers. Not many would recognize them as such despite her efforts, though a few key characteristics have managed to survive in these abhorrent amalgamations.
@@ -168,12 +168,12 @@ Ares: The first of the superweapons Draedon created, Ares is capable of both wid
Artemis: The final superweapon to be created, Artemis only needed a single revision to its original blueprints. Draedon’s perfectionist nature allowed him to raise his skill in engineering to new heights, culminating with a machine possessed of unbelievable nimbleness and precision. To gaze upon the archer is to gaze a second too late.
Thanatos: A mechanical serpent built using a revised variant of the Devourer’s armor plating, it was intended to be utterly invincible. Even its weakness of needing to vent due to overheating was turned to a strength, for no creature of flesh or metal can survive such temperatures. To gaze upon this serpentine terror is to know true power.
HiveMind: Although Yharim's campaign would one day span the entire world, it all started in these lands with the massacre of ruthless dictator deities. As soon as their leaders fell at the hands of the Godseeker, their armies toppled like dominos. A hive mind cannot function without its brain, after all.
Anahita: Once a resident of the Abyss, she left it long ago due to Silva’s influence spreading through her former home. She wishes to see all overtaken by the ocean, so that her domain may encompass the world. Such is the nature of all Elementals.
Anahita: Once a resident of the Abyss, she left it long ago due to Silva’s influence spreading through her former home. She wishes to see all overtaken by the ocean, so that her domain may encompass the world. Such is the nature of all elementals.
Leviathan: A gargantuan marine reptile that lurks the ocean depths along with the Water Elemental, Anahita. It is unknown if she is the last of her kind, or was simply manifested into existence like her master.
GreatSandShark: These intelligent predators once swam the shores of the upper Ilmeran Sea, with many being trained to hold back Yharim’s forces. Yet when the day came, the sand sharks were barely even a distraction for the Supreme Witch, with this particular specimen surviving only by making a hasty retreat.
OldDuke: One of the original draconic offshoots who were born in the Draconic Era. Dragons who were born after all the Auric Souls had been gifted to their kind were forced to make do without, forever outside of the cycle of rebirth. Yet in a twist of fate, the Auric Dragons’ age would end, and those rejected would be the survivors in this new world.
OldDuke: One of the original draconic offshoots who were born in the Draconic Era. Dragons who were born after all the auric souls had been gifted to their kind were forced to make do without, forever outside of the cycle of rebirth. Yet in a twist of fate, the auric dragons’ age would end, and those rejected would be the survivors in this new world.
Perforator: A living embodiment of some of the worst this world has to offer, these parasites made full use of their hive. Using it to seek ever more to gorge themselves upon, they sought to grow even larger, that they may one day perhaps regain what they lost.
PerforatorHive: To tear and consume, taking for only themselves until there is nothing left– this was the primal instinct left behind by the Gods which now form the Crimson. Their selfish desires coalesced into this hive, infested by ravenous worms whose sole desire is to devour.
PerforatorHive: To tear and consume, taking for only themselves until there is nothing left– this was the primal instinct left behind by the gods which now form the Crimson. Their selfish desires coalesced into this hive, infested by ravenous worms whose sole desire is to devour.
PlaguebringerGoliath: The Plague’s creation initially began after the unsatisfactory results the soul-power machines provided, with Draedon seeking absolute control. After testing many different variants for decades, both the Plague and its goliath were born, with its spread allowing for an amount of control over life once thought impossible.
Polterghast: The feral amalgamation that drove out the cult that once dwelled here, and inadvertently broke an alliance thought to be eternal. Many have delved into the dungeon in search of riches and knowledge long since lost, yet most simply join the spirits that have claimed this place as their own.
PrimordialWyrm: The first Wyrm, blessed by the Goddess of Life, held staggering power that surpassed nearly all of its auric brethren. It held a deep hatred for any sign of usurped light, and would have attempted to strike down even the wielder of Primordial Light had they returned to reclaim their artifact. And yet, despite its immense power, it never would have stood a chance.
@@ -181,7 +181,7 @@ ProfanedGuardianCommander: In a time lost to memory, there were four soldiers wh
ProfanedGuardianDefender: In a time lost to memory, there were four champions who used their loyalty to one another to slay a dragon, that one might gorge themself upon its auric soul. “I am the strongest,” declared their shieldmaiden, “I should be the one.” There was silence, until Providence spoke: “You lack strength of conviction, that you might try to pluck the stars from the sky.”
ProfanedGuardianHealer: In a time lost to memory, there were four champions who used their fathomless determination to slay a dragon, that one might gorge themself upon its auric soul. “I am the most courageous,” declared their cleric, “I should be the one.” There was silence, until Providence spoke: “Your courage blinds you to the truth, that your overconfidence would doom you.”
Providence: In a time lost to memory, there were four visionaries. With righteous fury, they slew a dragon, and their leader gorged Herself upon its auric soul of Flame. “The world is without guidance, and its people are filled with darkness.” She said. There was silence, until Providence spoke once more. “Let us go forth, and light the world anew.” And it was so.
Ravager: The mangled reincarnation of the God of Sacrifices, given life once more. Necromancers sworn to his faith returned his broken body to his temple, offering the only sacrifices they could– their own lives. Yet, necromancy is an imperfect art, and the god has very little of his mind left, simply destroying all it comes across.
Ravager: The mangled reincarnation of the God of Sacrifices, given life once more. Necromancers sworn to his faith returned his broken body to his temple, offering the only sacrifices they could to reverse his Death– their own lives. Yet, necromancy is an imperfect art, and the god has very little of his mind left, simply destroying all it comes across.
Signus: ‘For any desire, there is a price’. A deal bound in Onyx and sealed in blood, and one can have any wish granted– a gateway, a promise, a betrayal. Curiously, there is no recorded history of Signus before the age of gods, and very little recorded to this day. Perhaps, for the right price, one might find out the truth of Signus for oneself.
SlimeGodPaladin: The Slime God avoids direct combat due to its weakness, instead choosing to mold guardians to protect it. These guardians were created from countless blight slimes, their filth acting as a counterweight to the purity of their god.
SlimeGodCore: Despite being a Gluttonous slime, the Slime God forbids itself from growing out of control to maintain the balance of the world. It was still pursued during the Crusade, but it managed to survive through countless strategic retreats. The duty it upholds and the methods it employs are the reason the Onyx Kinsmen worship such a puny deity.
@@ -1418,7 +1418,7 @@ StarSwallowerBuff: {
}
StellarTorusBuff: {
DisplayName: Astral Vengeance Buff
DisplayName: Stellar Torus
Description: Summons a Torus Orbital that fries your foes
}
@@ -1170,10 +1170,17 @@ OldDukeScales: {
DisplayName: Old Duke's Scales
Tooltip:
'''
While under the effects of a damaging debuff, you gain 10% increased damage and 5% crit
For every 25% of lost life, you gain 6% increased damage and 3% crit
This will max out at 18% increased damage and 9% crit when under 25% life
Provides immunity to poisoned, venom, and sulphuric poisoning
15% increased damage reduction
10% increased max movement speed and acceleration
25% increased dash velocity and length
Gives you a stamina indicator on the cooldown rack
Using any dash will consume 20% of your stamina
Stamina will gradually recover to 100% after not dashing for 1 second
Stamina recovers faster when you are stationary
If your stamina reaches 0%, you become exhausted
[c/CE0E18:While exhausted, this item's damage reduction and movement bonuses are negated]
[c/CE0E18:Being exhausted reduces movement speed by 30% and dash velocity by 50%]
This debuff lasts until your stamina reaches 100% again
'''
}
@@ -31,9 +31,6 @@ EdgyBossText7: You are no god... but I shall feast upon your essence regardless!
EdgyBossText8: You think...you can butcher...ME!?
// Yharon
FlameText: The air is getting warmer around you.
// Yharon (now unused)
DargonBossText: The dark sun awaits.
DargonBossText2: My dragon deems you an unworthy opponent. You must acquire the power of the dark sun to witness his true power.
// Draedon (introduction)
DraedonIntroductionText1: I have waited long for this moment.
DraedonIntroductionText2: Your nature fascinates me, for I do not understand it.
@@ -46,5 +46,6 @@ AprilFools2: A boomer awaits...
// Devourer of Gods
DoGBossText: The frigid moon shimmers brightly.
DoGBossText2: The harvest moon glows eerily.
DargonBossText: The dark sun awaits.
// Yharon
AuricOreText: Ancient draconic power manifests in the caverns, lacing itself through the rock.
@@ -91,6 +91,7 @@ Cooldowns: {
MasterChefShieldDurability: Energy Shield Durability
MasterChefShieldRecharge: Energy Shield Recharge
NebulousCore: Nebulous Core Cooldown
OldDukeScalesFatigue: Stamina
OmegaBlueActive: Abyssal Madness
OmegaBlueCooldown: Abyssal Madness Cooldown
PermafrostConcoction: Permafrost's Concoction Cooldown
+1 -1
View File
@@ -1424,7 +1424,7 @@ namespace CalamityMod.NPCs
if (type == NPCID.SkeletonMerchant)
{
shop.AddWithCustomValue(ItemType<CalciumPotion>(), Item.buyPrice(silver: 25), potionSells, Condition.HappyEnough)
shop.AddWithCustomValue(ItemType<CalciumPotion>(), Item.buyPrice(silver: 25), potionSells)
.Add(ItemID.MilkCarton)
.AddWithCustomValue(ItemID.Marrow, Item.buyPrice(gold: 25), Condition.Hardmode);
}
+3 -1
View File
@@ -314,7 +314,9 @@ namespace CalamityMod.NPCs.NormalNPCs
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (!Main.hardMode || NPC.AnyNPCs(ModContent.NPCType<Eidolist>()))
// waffles% stipulation: eidolists are accessible by beating cal clone, even without beating WoF
bool hardmodeOrCalClone = Main.hardMode || DownedBossSystem.downedCalamitasClone;
if (!hardmodeOrCalClone || NPC.AnyNPCs(ModContent.NPCType<Eidolist>()))
{
return 0f;
}
@@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Ranged
float distanceFromOwner = target.Distance(Main.player[Projectile.owner].Center);
if (distanceFromOwner < maxDamageScalingDistance)
{
float amount = MathHelper.Clamp(maxDamageScalingDistance - (distanceFromOwner / maxDamageScalingDistance), 0f, 1f);
float amount = MathHelper.Clamp((maxDamageScalingDistance - distanceFromOwner) / maxDamageScalingDistance, 0f, 1f);
modifiers.SourceDamage *= MathHelper.Lerp(1f, maxDamageMultiplier, amount);
modifiers.Knockback *= MathHelper.Lerp(1f, maxDamageMultiplier, amount);
}
@@ -34,6 +34,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions
public override void SetDefaults()
{
Projectile.minionSlots = 1;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = MirrorofKalandra.Axe_IFrames;
Projectile.penetrate = -1;
@@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions
public override void SetDefaults()
{
Projectile.penetrate = -1;
Projectile.minionSlots = 1;
Projectile.DamageType = DamageClass.Summon;
Projectile.width = Projectile.height = 84;
@@ -23,6 +23,8 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions
public override void SetDefaults()
{
Projectile.MaxUpdates = MirrorofKalandra.Vile_ArrowSpeedMult;
Projectile.DamageType = DamageClass.Summon;
Projectile.width = Projectile.height = 22;
Projectile.friendly = true;
@@ -13,6 +13,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions
public override void SetDefaults()
{
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = MirrorofKalandra.Vile_SplitIFrames;
Projectile.penetrate = 3;
@@ -37,6 +37,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions
public override void SetDefaults()
{
Projectile.minionSlots = 1;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = MirrorofKalandra.Scimitar_IFrames;
Projectile.penetrate = -1;
@@ -35,6 +35,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions
public override void SetDefaults()
{
Projectile.minionSlots = 1;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = MirrorofKalandra.Purple_IFrames;
Projectile.penetrate = -1;
@@ -23,6 +23,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions
public override void SetDefaults()
{
Projectile.timeLeft = MirrorofKalandra.Purple_BlastChargeTime;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = MirrorofKalandra.Purple_BlastChargeTime;
Projectile.penetrate = -1;
@@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions
public override void SetDefaults()
{
Projectile.penetrate = -1;
Projectile.minionSlots = 1;
Projectile.DamageType = DamageClass.Summon;
Projectile.width = Projectile.height = 84;
@@ -1,9 +1,10 @@
using Microsoft.Xna.Framework.Graphics;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Microsoft.Xna.Framework;
using CalamityMod.Particles;
namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions
{
@@ -21,6 +22,8 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions
public override void SetDefaults()
{
Projectile.MaxUpdates = MirrorofKalandra.Wind_ArrowSpeedMult;
Projectile.DamageType = DamageClass.Summon;
Projectile.width = Projectile.height = 18;
Projectile.friendly = true;
+2
View File
@@ -0,0 +1,2 @@
# CalamityMod
The private repository for the Calamity Mod.
+9 -5
View File
@@ -9,6 +9,7 @@ using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using Terraria.ObjectData;
using System.Collections.Generic;
namespace CalamityMod.Tiles.DraedonStructures
{
@@ -64,11 +65,6 @@ namespace CalamityMod.Tiles.DraedonStructures
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
// TODO -- Turrets have no items and can't be picked up and placed by players.
// Instead, drop some raw Draedon materials.
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ModContent.ItemType<DubiousPlating>(), 8);
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ModContent.ItemType<MysteriousCircuitry>(), 8);
Tile t = Main.tile[i, j];
int left = i - t.TileFrameX % (Width * SheetSquare) / SheetSquare;
int top = j - t.TileFrameY % (Height * SheetSquare) / SheetSquare;
@@ -99,5 +95,13 @@ namespace CalamityMod.Tiles.DraedonStructures
SpriteEffects sfx = drawDirection == -1 ? SpriteEffects.FlipVertically : SpriteEffects.None;
spriteBatch.Draw(tex, drawOffset, null, drawColor, te.Angle, tex.Size() * 0.5f, 1f, sfx, 0.0f);
}
public override IEnumerable<Item> GetItemDrops(int i, int j)
{
for (int itemCount = 0; itemCount < 8; itemCount++)
{
yield return new Item(ModContent.ItemType<DubiousPlating>());
yield return new Item(ModContent.ItemType<MysteriousCircuitry>());
}
}
}
}
@@ -9,6 +9,7 @@ using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using Terraria.ObjectData;
using System.Collections.Generic;
namespace CalamityMod.Tiles.DraedonStructures
{
@@ -59,9 +60,6 @@ namespace CalamityMod.Tiles.DraedonStructures
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ModContent.ItemType<DubiousPlating>(), 8);
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ModContent.ItemType<MysteriousCircuitry>(), 8);
Tile t = Main.tile[i, j];
int left = i - t.TileFrameX % (Width * SheetSquare) / SheetSquare;
int top = j - t.TileFrameY % (Height * SheetSquare) / SheetSquare;
@@ -92,5 +90,13 @@ namespace CalamityMod.Tiles.DraedonStructures
SpriteEffects sfx = drawDirection == -1 ? SpriteEffects.FlipVertically : SpriteEffects.None;
spriteBatch.Draw(tex, drawOffset, null, drawColor, te.Angle, tex.Size() * 0.5f, 1f, sfx, 0.0f);
}
public override IEnumerable<Item> GetItemDrops(int i, int j)
{
for (int itemCount = 0; itemCount < 8; itemCount++)
{
yield return new Item(ModContent.ItemType<DubiousPlating>());
yield return new Item(ModContent.ItemType<MysteriousCircuitry>());
}
}
}
}
+9 -3
View File
@@ -9,6 +9,7 @@ using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using Terraria.ObjectData;
using System.Collections.Generic;
namespace CalamityMod.Tiles.DraedonStructures
{
@@ -59,9 +60,6 @@ namespace CalamityMod.Tiles.DraedonStructures
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ModContent.ItemType<DubiousPlating>(), 8);
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ModContent.ItemType<MysteriousCircuitry>(), 8);
Tile t = Main.tile[i, j];
int left = i - t.TileFrameX % (Width * SheetSquare) / SheetSquare;
int top = j - t.TileFrameY % (Height * SheetSquare) / SheetSquare;
@@ -92,5 +90,13 @@ namespace CalamityMod.Tiles.DraedonStructures
SpriteEffects sfx = drawDirection == -1 ? SpriteEffects.FlipVertically : SpriteEffects.None;
spriteBatch.Draw(tex, drawOffset, null, drawColor, te.Angle, tex.Size() * 0.5f, 1f, sfx, 0.0f);
}
public override IEnumerable<Item> GetItemDrops(int i, int j)
{
for (int itemCount = 0; itemCount < 8; itemCount++)
{
yield return new Item(ModContent.ItemType<DubiousPlating>());
yield return new Item(ModContent.ItemType<MysteriousCircuitry>());
}
}
}
}
@@ -9,6 +9,7 @@ using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using Terraria.ObjectData;
using System.Collections.Generic;
namespace CalamityMod.Tiles.DraedonStructures
{
@@ -59,9 +60,6 @@ namespace CalamityMod.Tiles.DraedonStructures
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ModContent.ItemType<DubiousPlating>(), 8);
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ModContent.ItemType<MysteriousCircuitry>(), 8);
Tile t = Main.tile[i, j];
int left = i - t.TileFrameX % (Width * SheetSquare) / SheetSquare;
int top = j - t.TileFrameY % (Height * SheetSquare) / SheetSquare;
@@ -92,5 +90,13 @@ namespace CalamityMod.Tiles.DraedonStructures
SpriteEffects sfx = drawDirection == -1 ? SpriteEffects.FlipVertically : SpriteEffects.None;
spriteBatch.Draw(tex, drawOffset, null, drawColor, te.Angle, tex.Size() * 0.5f, 1f, sfx, 0.0f);
}
public override IEnumerable<Item> GetItemDrops(int i, int j)
{
for (int itemCount = 0; itemCount < 8; itemCount++)
{
yield return new Item(ModContent.ItemType<DubiousPlating>());
yield return new Item(ModContent.ItemType<MysteriousCircuitry>());
}
}
}
}
+9 -3
View File
@@ -9,6 +9,7 @@ using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using Terraria.ObjectData;
using System.Collections.Generic;
namespace CalamityMod.Tiles.DraedonStructures
{
@@ -59,9 +60,6 @@ namespace CalamityMod.Tiles.DraedonStructures
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ModContent.ItemType<DubiousPlating>(), 8);
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ModContent.ItemType<MysteriousCircuitry>(), 8);
Tile t = Main.tile[i, j];
int left = i - t.TileFrameX % (Width * SheetSquare) / SheetSquare;
int top = j - t.TileFrameY % (Height * SheetSquare) / SheetSquare;
@@ -92,5 +90,13 @@ namespace CalamityMod.Tiles.DraedonStructures
SpriteEffects sfx = drawDirection == -1 ? SpriteEffects.FlipVertically : SpriteEffects.None;
spriteBatch.Draw(tex, drawOffset, null, drawColor, te.Angle, tex.Size() * 0.5f, 1f, sfx, 0.0f);
}
public override IEnumerable<Item> GetItemDrops(int i, int j)
{
for (int itemCount = 0; itemCount < 8; itemCount++)
{
yield return new Item(ModContent.ItemType<DubiousPlating>());
yield return new Item(ModContent.ItemType<MysteriousCircuitry>());
}
}
}
}
@@ -9,6 +9,7 @@ using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using Terraria.ObjectData;
using System.Collections.Generic;
namespace CalamityMod.Tiles.DraedonStructures
{
@@ -59,9 +60,6 @@ namespace CalamityMod.Tiles.DraedonStructures
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ModContent.ItemType<DubiousPlating>(), 8);
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ModContent.ItemType<MysteriousCircuitry>(), 8);
Tile t = Main.tile[i, j];
int left = i - t.TileFrameX % (Width * SheetSquare) / SheetSquare;
int top = j - t.TileFrameY % (Height * SheetSquare) / SheetSquare;
@@ -92,5 +90,13 @@ namespace CalamityMod.Tiles.DraedonStructures
SpriteEffects sfx = drawDirection == -1 ? SpriteEffects.FlipVertically : SpriteEffects.None;
spriteBatch.Draw(tex, drawOffset, null, drawColor, te.Angle, tex.Size() * 0.5f, 1f, sfx, 0.0f);
}
public override IEnumerable<Item> GetItemDrops(int i, int j)
{
for (int itemCount = 0; itemCount < 8; itemCount++)
{
yield return new Item(ModContent.ItemType<DubiousPlating>());
yield return new Item(ModContent.ItemType<MysteriousCircuitry>());
}
}
}
}
@@ -9,6 +9,7 @@ using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using Terraria.ObjectData;
using System.Collections.Generic;
namespace CalamityMod.Tiles.DraedonStructures
{
@@ -59,9 +60,6 @@ namespace CalamityMod.Tiles.DraedonStructures
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ModContent.ItemType<DubiousPlating>(), 8);
Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ModContent.ItemType<MysteriousCircuitry>(), 8);
Tile t = Main.tile[i, j];
int left = i - t.TileFrameX % (Width * SheetSquare) / SheetSquare;
int top = j - t.TileFrameY % (Height * SheetSquare) / SheetSquare;
@@ -92,5 +90,13 @@ namespace CalamityMod.Tiles.DraedonStructures
SpriteEffects sfx = drawDirection == -1 ? SpriteEffects.FlipVertically : SpriteEffects.None;
spriteBatch.Draw(tex, drawOffset, null, drawColor, te.Angle, tex.Size() * 0.5f, 1f, sfx, 0.0f);
}
public override IEnumerable<Item> GetItemDrops(int i, int j)
{
for (int itemCount = 0; itemCount < 8; itemCount++)
{
yield return new Item(ModContent.ItemType<DubiousPlating>());
yield return new Item(ModContent.ItemType<MysteriousCircuitry>());
}
}
}
}
+35 -28
View File
@@ -76,7 +76,7 @@ namespace CalamityMod.World
do
{
int placementPositionX = WorldGen.genRand.Next((int)(Main.maxTilesX * 0.05f), (int)(Main.maxTilesX * 0.95f));
int placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.15f), (int)(Main.maxTilesY * 0.6f));
int placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.15f), (int)(Main.maxTilesY * 0.5f));
Point placementPoint = new Point(placementPositionX, placementPositionY);
Vector2 schematicSize = new Vector2(TileMaps[mapKey].GetLength(0)/2, TileMaps[mapKey].GetLength(1)); //Fooling the system into thinking the shrine is smaller than it actually is so it fits into chasms
@@ -105,7 +105,7 @@ namespace CalamityMod.World
canGenerateInLocation = false;
}
}
if (!canGenerateInLocation || corruptStuffInArea < totalTiles * 0.5|| !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y)) || !inYourWalls)
if (!canGenerateInLocation || corruptStuffInArea < totalTiles * 0.4 || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y)) || !inYourWalls)
{
tries++;
}
@@ -149,8 +149,8 @@ namespace CalamityMod.World
do
{
int placementPositionX = WorldGen.genRand.Next((int)(Main.maxTilesX * 0.1f), (int)(Main.maxTilesX * 0.9f));
int placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.1f), (int)(Main.maxTilesY * 0.6f));
int placementPositionX = WorldGen.genRand.Next((int)(Main.maxTilesX * 0.05f), (int)(Main.maxTilesX * 0.95f));
int placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.15f), (int)(Main.maxTilesY * 0.5f));
Point placementPoint = new Point(placementPositionX, placementPositionY);
Vector2 schematicSize = new Vector2(TileMaps[mapKey].GetLength(0), TileMaps[mapKey].GetLength(1));
@@ -181,7 +181,7 @@ namespace CalamityMod.World
canGenerateInLocation = false;
}
}
if (!canGenerateInLocation || crimsonStuffInArea < totalTiles * 0.5f || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y)) || !inYourWalls)
if (!canGenerateInLocation || crimsonStuffInArea < totalTiles * 0.4f || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y)) || !inYourWalls)
{
tries++;
}
@@ -498,7 +498,20 @@ namespace CalamityMod.World
do
{
int placementPositionX = WorldGen.genRand.Next((int)(Main.maxTilesX * 0.2f), (int)(Main.maxTilesX * 0.8f));
int placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.2f), (int)(Main.maxTilesY * 0.95f));
int placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.2f), (int)(Main.maxTilesY * 0.85f));
// Gfb
if (Main.getGoodWorld)
{
// Ensure that the shrine doesn't generate too close to the center of the world
do
{
placementPositionX = WorldGen.genRand.Next((int)(Main.maxTilesX * 0.2f), (int)(Main.maxTilesX * 0.8f));
}
while (placementPositionX > (int)(Main.maxTilesX * 0.4f) && placementPositionX < (int)(Main.maxTilesX * 0.6f));
placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.8f), (int)(Main.maxTilesY * 0.85f)); //Mushroom layer
}
Point placementPoint = new Point(placementPositionX, placementPositionY);
Vector2 schematicSize = new Vector2(TileMaps[mapKey].GetLength(0), TileMaps[mapKey].GetLength(1));
@@ -524,30 +537,24 @@ namespace CalamityMod.World
if (tile.TileType == TileID.MushroomPlants || tile.TileType == TileID.MushroomVines || tile.TileType == TileID.MushroomTrees || tile.TileType == TileID.MushroomGrass)
realMushroomsInArea++;
if (Main.getGoodWorld)
realMushroomsInArea = requiredShrooms;
if (!canGenerateInLocation || realMushroomsInArea < requiredShrooms || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y)))
{
tries++;
}
else if (canGenerateInLocation && Main.getGoodWorld) //GFB will not give a shit
{
bool _ = true;
PlaceSchematic(mapKey, new Point(placementPoint.X, placementPoint.Y), SchematicAnchor.TopLeft, ref _, new Action<Chest>(FillMushroomShrineChest));
structures.AddProtectedStructure(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y), 4);
break;
} else
{
bool _ = true;
PlaceSchematic(mapKey, new Point(placementPoint.X, placementPoint.Y), SchematicAnchor.TopLeft, ref _, new Action<Chest>(FillMushroomShrineChest));
structures.AddProtectedStructure(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y), 4);
break;
}
}
}
} while (tries <= 60000) ;
if ((!canGenerateInLocation || realMushroomsInArea < requiredShrooms || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y))) && !Main.getGoodWorld)
{
tries++;
}
else if (!canGenerateInLocation && Main.getGoodWorld) //GFB will not give a shit about mushrooms or the rectangle
{
tries++;
}
else
{
bool _ = true;
PlaceSchematic(mapKey, new Point(placementPoint.X, placementPoint.Y), SchematicAnchor.TopLeft, ref _, new Action<Chest>(FillMushroomShrineChest));
structures.AddProtectedStructure(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y), 4);
break;
}
} while (tries <= 20000);
}
#endregion