From e2e8a435176048ed39a85563c4a770e1b5c36576 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Thu, 4 Mar 2021 06:39:01 -0600 Subject: [PATCH 1/4] 1 - Made an attempt to reduce Shield of Cthulhu i-frames from 10 to 6 to balance it out. 2 - Removed some unnecessary comments I had made. --- CalPlayer/CalamityPlayer.cs | 1 - CalPlayer/CalamityPlayerMiscEffects.cs | 4 ++++ NPCs/CalamityGlobalNPC.cs | 3 --- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 18a539a06a..bacecd2c19 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4392,7 +4392,6 @@ namespace CalamityMod.CalPlayer } #endregion - // Currently not used due to god slayer and silva armor changes #region Use Time Mult public override float UseTimeMultiplier(Item item) { diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index a7b52880a5..931eef0274 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -537,6 +537,10 @@ namespace CalamityMod.CalPlayer (modPlayer.cShard ? 50 : 0) + (modPlayer.starBeamRye ? 50 : 0); + // Shield of Cthulhu immunity frame nerf, nerfed from 10 to 6 + if (player.eocDash > 6 && player.dashDelay > 0) + player.eocDash = 6; + // Life Steal nerf // Reduces normal mode life steal recovery rate from 0.6/s to 0.5/s // Reduces expert mode life steal recovery rate from 0.5/s to 0.35/s diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index af9aac6eca..89f2caf4fa 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1670,9 +1670,6 @@ namespace CalamityMod.NPCs { float DRScalar = !GetDownedBossVariable(npc.type) || CalamityConfig.Instance.FullPowerReactiveBossDR ? 1.5f : 1f; - /*if (Main.masterMode) - DRScalar = 5f;*/ - // Boost Providence timed DR during the night, Destroyer, Aquatic Scourge, Astrum Deus, Storm Weaver and DoG body timed DR if (npc.type == NPCType() && !Main.dayTime) DRScalar = 10f; From 2d97ed2f4a7870c53e8df045f0aecd9503c8371d Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Fri, 5 Mar 2021 11:39:19 -0600 Subject: [PATCH 2/4] 1 - Removed instakill from DoG phase 1 head. 2 - Gave a projectile cap to Moonstone Crown. --- NPCs/DevourerofGods/DevourerofGodsHead.cs | 4 ++-- Projectiles/CalamityGlobalProjectile.cs | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index fb20de02d1..c1a6915a8b 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -980,10 +980,10 @@ namespace CalamityMod.NPCs.DevourerofGods player.AddBuff(ModContent.BuffType(), 300, true); player.AddBuff(ModContent.BuffType(), 420, true); player.AddBuff(BuffID.Frostburn, 300, true); - if (CalamityWorld.death && !player.Calamity().lol) + /*if (CalamityWorld.death && !player.Calamity().lol) { player.KillMe(PlayerDeathReason.ByCustomReason(player.name + "'s essence was consumed by the devourer."), 1000.0, 0, false); - } + }*/ if (player.Calamity().dogTextCooldown <= 0) { diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 6311b65d9c..b30f0ae487 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1195,7 +1195,7 @@ namespace CalamityMod.Projectiles if (rogue) { - if (modPlayer.nanotech && rogue && projectile.type != ProjectileType() && projectile.type != ProjectileType()) + if (modPlayer.nanotech && projectile.type != ProjectileType() && projectile.type != ProjectileType()) { if (Main.player[projectile.owner].miscCounter % 30 == 0 && projectile.FinalExtraUpdate()) { @@ -1206,13 +1206,15 @@ namespace CalamityMod.Projectiles } } // Moon Crown gets overridden by Nanotech - else if (modPlayer.moonCrown) + else if (modPlayer.moonCrown && projectile.type != ProjectileType() && projectile.type != ProjectileType()) { - // Summon moon sigils infrequently - if (Main.rand.NextBool(300) && projectile.type != ProjectileType() && projectile.type != ProjectileType()) - { - Projectile.NewProjectile(projectile.Center, Vector2.Zero, ProjectileType(), (int)(projectile.damage * 0.2), 0, projectile.owner); - } + if (Main.player[projectile.owner].miscCounter % 300 == 0 && projectile.FinalExtraUpdate()) + { + if (projectile.owner == Main.myPlayer && player.ownedProjectileCounts[ProjectileType()] < 15) + { + Projectile.NewProjectile(projectile.Center, Vector2.Zero, ProjectileType(), (int)(projectile.damage * 0.2), 0, projectile.owner); + } + } } if (modPlayer.dragonScales && projectile.type != ProjectileType() && projectile.type != ProjectileType()) { From 1b92afb9748538baf4017870981f5d36358f77fd Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Fri, 5 Mar 2021 12:59:30 -0600 Subject: [PATCH 3/4] 1 - IL Edit tip I got that sould disable the worldgen that occurs when a demon altar is smashed. --- ILEditing/ILChanges.cs | 24 +++++++++++++++++------- Tiles/CalamityGlobalTile.cs | 3 --- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ILEditing/ILChanges.cs b/ILEditing/ILChanges.cs index ed6959381d..7f72437e48 100644 --- a/ILEditing/ILChanges.cs +++ b/ILEditing/ILChanges.cs @@ -36,10 +36,10 @@ namespace CalamityMod.ILEditing private static int aLabDoorOpen = -1; private static int aLabDoorClosed = -1; - /// - /// Loads all IL Editing changes in the mod. - /// - internal static void Load() + /// + /// Loads all IL Editing changes in the mod. + /// + internal static void Load() { // Wrap the vanilla town NPC spawning function in a delegate so that it can be tossed around and called at will. var updateTime = typeof(Main).GetMethod("UpdateTime_SpawnTownNPCs", BindingFlags.Static | BindingFlags.NonPublic); @@ -58,6 +58,7 @@ namespace CalamityMod.ILEditing BlockLivingTreesNearOcean(); LabDoorFixes(); AlterTownNPCSpawnRate(); + DisableDemonAltarGeneration(); } /// @@ -202,10 +203,19 @@ namespace CalamityMod.ILEditing Main.worldRate = oldWorldRate; }; } - #endregion - #region IL Editing Injected/Hooked Functions - private static void BossRushLifeBytes(On.Terraria.Main.orig_InitLifeBytes orig) + private static void DisableDemonAltarGeneration() + { + IL.Terraria.WorldGen.SmashAltar += (il) => + { + var cursor = new ILCursor(il); + cursor.Emit(OpCodes.Ret); + }; + } + #endregion + + #region IL Editing Injected/Hooked Functions + private static void BossRushLifeBytes(On.Terraria.Main.orig_InitLifeBytes orig) { orig(); foreach (int npcType in NeedsFourLifeBytes) diff --git a/Tiles/CalamityGlobalTile.cs b/Tiles/CalamityGlobalTile.cs index 2689422ef0..f7a0466c2e 100644 --- a/Tiles/CalamityGlobalTile.cs +++ b/Tiles/CalamityGlobalTile.cs @@ -573,9 +573,6 @@ namespace CalamityMod.Tiles public override bool CanKillTile(int i, int j, int type, ref bool blockDamaged) { - if (type == TileID.DemonAltar) - return false; - int[] invincibleTiles = new int[] { ModContent.TileType(), From 33d3f60bf0b39c3e7e6270b28c68b326933456db Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Sat, 6 Mar 2021 12:30:45 -0600 Subject: [PATCH 4/4] 1 - Removed Frigid Bars. 2 - Removed Daylight and Moonlight. 3 - Adjust recipes. 4 - Removed Yharon's increased DR while doing certain actions. 5 - Fixed cal clone entering phase 2 insanely fast. 6 - Mech boss summons can now be crafted at Iron/Lead Anvil. 7 - Angle and Demon Wings can now be crafted at Iron/Lead Anvil. 8 - Steampunker can awaken no longer. 9 - Added Early Hardmode Progression Rework config bool, it does absolutely nothing at the moment. --- CalamityConfig.cs | 10 +++++ Items/Accessories/AmbrosialAmpoule.cs | 4 +- Items/Ammo/ArcticArrow.cs | 2 +- Items/Ammo/FrostsparkBullet.cs | 2 +- Items/Materials/CryoBar.cs | 34 -------------- Items/Materials/CryoBar.png | Bin 553 -> 0 bytes Items/Tools/ClimateChange/Cosmolight.cs | 9 ++-- Items/Tools/ClimateChange/Daylight.cs | 53 ---------------------- Items/Tools/ClimateChange/Daylight.png | Bin 507 -> 0 bytes Items/Tools/ClimateChange/Moonlight.cs | 54 ----------------------- Items/Tools/ClimateChange/Moonlight.png | Bin 499 -> 0 bytes Items/TreasureBags/CryogenBag.cs | 1 - Items/Weapons/Magic/IceBarrage.cs | 2 +- Items/Weapons/Melee/FlarefrostBlade.cs | 2 +- Items/Weapons/Melee/TemporalFloeSword.cs | 2 +- Items/Weapons/Rogue/FrostcrushValari.cs | 2 +- Items/Weapons/Rogue/KelvinCatalyst.cs | 2 +- ModSupport/WeakReferenceSupport.cs | 2 +- NPCs/CalamityAI.cs | 2 +- NPCs/Cryogen/Cryogen.cs | 1 - NPCs/Yharon/Yharon.cs | 5 +-- Tiles/FrigidBar.cs | 54 ----------------------- Tiles/FrigidBar.png | Bin 269 -> 0 bytes Utilities/CalamityRecipes.cs | 50 ++++++++++----------- World/CalamityWorld.cs | 13 ------ 25 files changed, 52 insertions(+), 254 deletions(-) delete mode 100644 Items/Materials/CryoBar.cs delete mode 100644 Items/Materials/CryoBar.png delete mode 100644 Items/Tools/ClimateChange/Daylight.cs delete mode 100644 Items/Tools/ClimateChange/Daylight.png delete mode 100644 Items/Tools/ClimateChange/Moonlight.cs delete mode 100644 Items/Tools/ClimateChange/Moonlight.png delete mode 100644 Tiles/FrigidBar.cs delete mode 100644 Tiles/FrigidBar.png diff --git a/CalamityConfig.cs b/CalamityConfig.cs index 03a21f1c0c..2ce1e78807 100644 --- a/CalamityConfig.cs +++ b/CalamityConfig.cs @@ -114,6 +114,16 @@ namespace CalamityMod [Header("General Gameplay Changes")] + [Label("Early Hardmode Progression Rework")] + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(true)] + [Tooltip("Demon Altars no longer spawn ores and crimson/corruption blocks when broken.\n" + + "Wall of Flesh spawns Cobalt and Palladium ore on first kill.\n" + + "The first mech boss you fight has 20% less HP and damage and spawns Mythril and Orichalcum ore on first kill.\n" + + "The second mech boss you fight has 10% less HP and damage and spawns Adamantite and Titanium ore on first kill.\n" + + "The third mech boss spawns Hallowed Ore on first kill")] + public bool EarlyHardmodeProgressionRework { get; set; } + [Label("Lethal Lava")] [BackgroundColor(192, 54, 64, 192)] [DefaultValue(true)] diff --git a/Items/Accessories/AmbrosialAmpoule.cs b/Items/Accessories/AmbrosialAmpoule.cs index 46e77f0ff2..4286e66c63 100644 --- a/Items/Accessories/AmbrosialAmpoule.cs +++ b/Items/Accessories/AmbrosialAmpoule.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Accessories recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); @@ -71,7 +71,7 @@ namespace CalamityMod.Items.Accessories recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Ammo/ArcticArrow.cs b/Items/Ammo/ArcticArrow.cs index 1fcc381fd4..6c58499897 100644 --- a/Items/Ammo/ArcticArrow.cs +++ b/Items/Ammo/ArcticArrow.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(TileID.IceMachine); recipe.SetResult(this, 250); recipe.AddRecipe(); diff --git a/Items/Ammo/FrostsparkBullet.cs b/Items/Ammo/FrostsparkBullet.cs index 63b410b212..5c18d18d28 100644 --- a/Items/Ammo/FrostsparkBullet.cs +++ b/Items/Ammo/FrostsparkBullet.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Ammo { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.MusketBall, 150); - recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(TileID.IceMachine); recipe.SetResult(this, 150); recipe.AddRecipe(); diff --git a/Items/Materials/CryoBar.cs b/Items/Materials/CryoBar.cs deleted file mode 100644 index 196b16a402..0000000000 --- a/Items/Materials/CryoBar.cs +++ /dev/null @@ -1,34 +0,0 @@ -using CalamityMod.Tiles; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.Materials -{ - public class CryoBar : ModItem - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Frigid Bar"); - Tooltip.SetDefault("Cold to the touch"); - } - - public override void SetDefaults() - { - item.createTile = ModContent.TileType(); - item.width = 30; - item.height = 24; - item.maxStack = 999; - item.value = Item.buyPrice(0, 3, 0, 0); - item.rare = ItemRarityID.Pink; - item.useStyle = ItemUseStyleID.SwingThrow; - item.useTurn = true; - item.useAnimation = 15; - item.useTime = 10; - item.autoReuse = true; - item.consumable = true; - } - } -} diff --git a/Items/Materials/CryoBar.png b/Items/Materials/CryoBar.png deleted file mode 100644 index a26ccbab7434db69850ea7fbadaff0bfea3be786..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 553 zcmV+^0@nSBP)Px$<4Ht8R7i=k z{R7d`AtD$gTC|MFsO7YpB5-KJh42=RB{bo9=u!@0}m-ocrOO zd$~?_EJLlHObjb~eDb-nXFhCTQlvErKy}&mYW>X@dL4ku_Za|s2g3lIFjn~w3LO*} z9QwTbmQw!ac7Mf{rGg@>F1r8>+9+V3YXP$QuBDesYau*K!XJE%0Y{Q`x^uuCmYcB$X}X_NH1$ z)9=h=>)*^D{)@EZ?&U)p*WW%4k_zGJt_JmNjQjD}kS2UTnlsj&|K;yW%nA8zWjdsc^J1#W3dk%yuuk5r(T&lvsZ&UQNh zE303Xe`Dd5N_&}6)E!I^v;zZDf?7I%mLWiTrf6}J62Hkh~<{~_SF|)KY38m rwmt`7XM0uoXWeN4g16R#WR3VQnu40(Kz2cS00000NkvXXu0mjfLeu()); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddTile(TileID.MythrilAnvil); + recipe.AddIngredient(ItemID.SoulofLight, 7); + recipe.AddIngredient(ItemID.SoulofNight, 7); + recipe.AddIngredient(ItemID.HellstoneBar, 5); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Items/Tools/ClimateChange/Daylight.cs b/Items/Tools/ClimateChange/Daylight.cs deleted file mode 100644 index 26897075b1..0000000000 --- a/Items/Tools/ClimateChange/Daylight.cs +++ /dev/null @@ -1,53 +0,0 @@ -using CalamityMod.CalPlayer; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.Tools.ClimateChange -{ - public class Daylight : ModItem - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Daylight"); - Tooltip.SetDefault("Summons the sun"); - } - - public override void SetDefaults() - { - item.width = 20; - item.height = 20; - item.rare = ItemRarityID.Pink; - item.useAnimation = 20; - item.useTime = 20; - item.useStyle = ItemUseStyleID.HoldingUp; - item.UseSound = SoundID.Item60; - item.consumable = false; - } - - public override bool CanUseItem(Player player) - { - return !Main.dayTime && !CalamityPlayer.areThereAnyDamnBosses; - } - - public override bool UseItem(Player player) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - Main.dayTime = true; - CalamityNetcode.SyncWorld(); - } - return true; - } - - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.SoulofLight, 7); - recipe.AddIngredient(ItemID.HellstoneBar, 5); - recipe.AddTile(TileID.MythrilAnvil); - recipe.SetResult(this); - recipe.AddRecipe(); - } - } -} diff --git a/Items/Tools/ClimateChange/Daylight.png b/Items/Tools/ClimateChange/Daylight.png deleted file mode 100644 index 7889c347a1a0394b411da5915874e531ff3e801b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 507 zcmVN2bZe?^J zG%heMF*(%MvSa`N0eDG7K~z{r-IKjd1W^oxSL9?gfrKc43LqvtAyEJc5p_@mDRe>u zv_KDw_HMp+%RJ2fTZoY+u%A62YjMq3y<9bI=iS-K-fFL}%|QTE7DfHpN&~q#or6|C z>1H4T-yaWlfGhe#2F1eaAO;8?3ve+X?(wi0h)-S$@EmGACxQ^c?d!oqK>ExL%@;AS z8OR?1ML_E4T`{$Mpbz;eh&p;#%u&&U2YF!huJt-M4djbzA5ZuB-OTmFJNGj>E2iY< zf%rsUa6n}s)-U^(mj^;V-~pARIrYioLxf2Lq0vBprf73#)_p>CXnBG!QC3SOGA7jV)Iih?5l{CzLs%#^;N`%|HZu5Pg+Z xJy`^#fm9Z8GL_4f28#6mK+#E8*ECSmd;xnc(), 5); - recipe.AddTile(TileID.MythrilAnvil); - recipe.SetResult(this); - recipe.AddRecipe(); - } - } -} diff --git a/Items/Tools/ClimateChange/Moonlight.png b/Items/Tools/ClimateChange/Moonlight.png deleted file mode 100644 index 5490d86e60450ad52a3c742209a5adc18faf602b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 499 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E-^PVZl7ZS00Co3L_t(oNA1^#0reft^iB01HlGNMT;=C3c+w?2Y#~mFzfEhp%WPVgZJxspSzj6S#@2vh^vEj z*Rwf1E{NyW=Tc36$JFAf`dn6f`={NIY=8y#=O(), 20, 40); DropHelper.DropItem(player, ModContent.ItemType(), 5, 9); DropHelper.DropItem(player, ItemID.FrostCore); diff --git a/Items/Weapons/Magic/IceBarrage.cs b/Items/Weapons/Magic/IceBarrage.cs index 7b5b3ee361..15f58b9403 100644 --- a/Items/Weapons/Magic/IceBarrage.cs +++ b/Items/Weapons/Magic/IceBarrage.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Items.Weapons.Magic recipe.AddIngredient(ItemID.IceRod); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType(), 23); - recipe.AddIngredient(ModContent.ItemType(), 18); + recipe.AddIngredient(ModContent.ItemType(), 18); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/Melee/FlarefrostBlade.cs b/Items/Weapons/Melee/FlarefrostBlade.cs index 05c47b1558..ce6fe1e356 100644 --- a/Items/Weapons/Melee/FlarefrostBlade.cs +++ b/Items/Weapons/Melee/FlarefrostBlade.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddIngredient(ModContent.ItemType(), 8); recipe.AddIngredient(ItemID.HellstoneBar, 8); recipe.AddIngredient(ItemID.HallowedBar, 4); recipe.AddTile(TileID.MythrilAnvil); diff --git a/Items/Weapons/Melee/TemporalFloeSword.cs b/Items/Weapons/Melee/TemporalFloeSword.cs index de4ccff951..6700d5f9b6 100644 --- a/Items/Weapons/Melee/TemporalFloeSword.cs +++ b/Items/Weapons/Melee/TemporalFloeSword.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 15); recipe.AddIngredient(ItemID.Ectoplasm, 5); recipe.AddTile(TileID.IceMachine); recipe.SetResult(this); diff --git a/Items/Weapons/Rogue/FrostcrushValari.cs b/Items/Weapons/Rogue/FrostcrushValari.cs index 3bdf9cab02..02f6fa661a 100644 --- a/Items/Weapons/Rogue/FrostcrushValari.cs +++ b/Items/Weapons/Rogue/FrostcrushValari.cs @@ -76,7 +76,7 @@ Stealth strikes throw three short ranged boomerangs along with a spread of icicl { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ModContent.ItemType(), 6); + recipe.AddIngredient(ModContent.ItemType(), 6); recipe.AddIngredient(ModContent.ItemType(), 40); recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddTile(TileID.MythrilAnvil); diff --git a/Items/Weapons/Rogue/KelvinCatalyst.cs b/Items/Weapons/Rogue/KelvinCatalyst.cs index e32215ea38..411e73a055 100644 --- a/Items/Weapons/Rogue/KelvinCatalyst.cs +++ b/Items/Weapons/Rogue/KelvinCatalyst.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Rogue ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 200); recipe.AddIngredient(ItemID.FrozenKey); - recipe.AddIngredient(ModContent.ItemType(), 20); + recipe.AddIngredient(ModContent.ItemType(), 20); recipe.AddIngredient(ModContent.ItemType(), 10); recipe.AddIngredient(ModContent.ItemType(), 2); recipe.AddIngredient(ModContent.ItemType(), 2); diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 6db44b37dc..748971b1d2 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -320,7 +320,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("Cryogen", out float order); int type = NPCType(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemType(), ItemID.FrostCore, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.FrozenKey, ItemID.GreaterHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemID.FrostCore, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.FrozenKey, ItemID.GreaterHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType() }; string instructions = $"Use a [i:{summon}] in the Snow Biome"; string despawn = CalamityUtils.ColorMessage("Cryogen drifts away, carried on a freezing wind.", new Color(0x00, 0xFF, 0xFF)); diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index cc19d3e89e..3ed6f97029 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -1168,7 +1168,7 @@ namespace CalamityMod.NPCs lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; // Spawn phase 2 Cal - if (lifeRatio <= 0.75f && Main.netMode != NetmodeID.MultiplayerClient && !phase2) + if (npc.life / (float)npc.lifeMax <= 0.75f && Main.netMode != NetmodeID.MultiplayerClient && !phase2) { NPC.NewNPC((int)npc.Center.X, (int)npc.position.Y + npc.height, ModContent.NPCType(), npc.whoAmI); string key = "Mods.CalamityMod.CalamitasBossText"; diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index 87724430de..9b7d2e31da 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -1041,7 +1041,6 @@ namespace CalamityMod.NPCs.Cryogen if (!Main.expertMode) { // Materials - DropHelper.DropItem(npc, ModContent.ItemType(), 15, 25); DropHelper.DropItemSpray(npc, ModContent.ItemType(), 4, 8); DropHelper.DropItem(npc, ItemID.FrostCore); diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 0b233cf2ea..93a80b4246 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -48,7 +48,6 @@ namespace CalamityMod.NPCs.Yharon private const float ai2GateValue = 0.55f; public static float normalDR = 0.22f; - public static float ChargeTelegraph_DR = 0.4f; public static float EnragedDR = 0.9f; public override void SetStaticDefaults() @@ -381,7 +380,7 @@ namespace CalamityMod.NPCs.Yharon // Set DR based on protection boost (aka enrage) bool chargeTelegraph = (npc.ai[0] == 0f || npc.ai[0] == 6f || npc.ai[0] == 13f) && npc.localAI[1] > 0f; bool bulletHell = npc.ai[0] == 8f || npc.ai[0] == 15f; - calamityGlobalNPC.DR = protectionBoost ? EnragedDR : ((chargeTelegraph || bulletHell) ? ChargeTelegraph_DR : normalDR); + calamityGlobalNPC.DR = protectionBoost ? EnragedDR : normalDR; if (bulletHell) npc.damage = 0; @@ -1620,7 +1619,7 @@ namespace CalamityMod.NPCs.Yharon // Set DR based on protection boost (aka enrage) bool chargeTelegraph = npc.ai[0] < 2f && npc.localAI[1] > 0f; bool bulletHell = npc.ai[0] == 5f; - calamityGlobalNPC.DR = protectionBoost ? EnragedDR : ((chargeTelegraph || bulletHell) ? ChargeTelegraph_DR : normalDR); + calamityGlobalNPC.DR = protectionBoost ? EnragedDR : normalDR; if (bulletHell) npc.damage = 0; diff --git a/Tiles/FrigidBar.cs b/Tiles/FrigidBar.cs deleted file mode 100644 index 58ae26f2d5..0000000000 --- a/Tiles/FrigidBar.cs +++ /dev/null @@ -1,54 +0,0 @@ -using CalamityMod.Items.Materials; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; -using Terraria.ObjectData; - -namespace CalamityMod.Tiles -{ - public class FrigidBar : ModTile - { - public override void SetDefaults() - { - Main.tileShine[Type] = 1000; - Main.tileSolid[Type] = true; - Main.tileSolidTop[Type] = true; - Main.tileFrameImportant[Type] = true; - - TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); - TileObjectData.newTile.StyleHorizontal = true; - TileObjectData.newTile.LavaDeath = false; - TileObjectData.addTile(Type); - - dustType = 67; - drop = ModContent.ItemType(); - - AddMapEntry(new Color(229, 141, 246)); - } - - public override bool CreateDust(int i, int j, ref int type) - { - if (Main.rand.NextBool(2)) - { - type = 67; - } - else - { - type = 68; - } - return true; - } - - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - WorldGen.Check1x1(i, j, Type); - return true; - } - - public override void PlaceInWorld(int i, int j, Item item) - { - Main.tile[i, j].frameX = 0; - Main.tile[i, j].frameY = 0; - } - } -} diff --git a/Tiles/FrigidBar.png b/Tiles/FrigidBar.png deleted file mode 100644 index 26c6de9bae52e445411c80c360543b2b6f4b9069..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 269 zcmV+o0rLKdP)w7r&rL zQ0xL0m~jd^E@0+^IcH!(V7hsU34|{Tq2@C1fEh4#)N=vEd;|##{r-ulenzN(uqbu` zI4(hE*?IS)#0JbJ8GaiW6NO&3%#=FmfCXl=&$I#*8y>Ag^}AdUB=lj5giJq!T}*Kp zu)zEXv#~HAV$)ivjTb6m=>n1`VDb!5b(FgR7T++x%{>5Pq0)T%5SO9LQ|tl&iC!*q TS^qnP00000NkvXXu0mjfz0YUz diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index 81b158ddb3..c6df7ba8a8 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -30,6 +30,8 @@ namespace CalamityMod EditLeatherRecipe(); EditTerraBladeRecipe(); EditFireGauntletRecipe(); + EditMechBossSummonRecipes(); + EditWingRecipes(); AstralAlternatives(); AddPotionRecipes(); @@ -165,8 +167,26 @@ namespace CalamityMod }); } - #region Astral Alternatives - private static void AstralAlternatives() + private static void EditMechBossSummonRecipes() + { + List rec = Main.recipe.ToList(); + rec.Where(x => x.createItem.type == ItemID.MechanicalWorm || x.createItem.type == ItemID.MechanicalEye || x.createItem.type == ItemID.MechanicalSkull).ToList().ForEach(s => + { + s.requiredTile[0] = TileID.Anvils; + }); + } + + private static void EditWingRecipes() + { + List rec = Main.recipe.ToList(); + rec.Where(x => x.createItem.type == ItemID.AngelWings || x.createItem.type == ItemID.DemonWings).ToList().ForEach(s => + { + s.requiredTile[0] = TileID.Anvils; + }); + } + + #region Astral Alternatives + private static void AstralAlternatives() { //Bowl ModRecipe r = GetNewRecipe(); @@ -866,7 +886,7 @@ namespace CalamityMod r.AddIngredient(ItemID.SoulofMight, 10); r.AddIngredient(ItemID.SoulofLight, 5); r.AddIngredient(ItemID.SoulofNight, 5); - r.AddIngredient(ModContent.ItemType(), 3); + r.AddIngredient(ModContent.ItemType(), 3); r.AddTile(TileID.MythrilAnvil); r.SetResult(ItemID.CelestialMagnet); r.AddRecipe(); @@ -889,30 +909,6 @@ namespace CalamityMod r.SetResult(ItemID.MagicQuiver); r.AddRecipe(); - // Frost Helmet w/ Frigid Bars - r = GetNewRecipe(); - r.AddIngredient(ModContent.ItemType(), 6); - r.AddIngredient(ItemID.FrostCore); - r.AddTile(TileID.IceMachine); - r.SetResult(ItemID.FrostHelmet); - r.AddRecipe(); - - // Frost Breastplate w/ Frigid Bars - r = GetNewRecipe(); - r.AddIngredient(ModContent.ItemType(), 10); - r.AddIngredient(ItemID.FrostCore); - r.AddTile(TileID.IceMachine); - r.SetResult(ItemID.FrostBreastplate); - r.AddRecipe(); - - // Frost Leggings w/ Frigid Bars - r = GetNewRecipe(); - r.AddIngredient(ModContent.ItemType(), 8); - r.AddIngredient(ItemID.FrostCore); - r.AddTile(TileID.IceMachine); - r.SetResult(ItemID.FrostLeggings); - r.AddRecipe(); - // Terra Blade w/ True Bloody Edge r = GetNewRecipe(); r.AddIngredient(ModContent.ItemType()); diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index ab4381055c..7310eb4aa2 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -1606,19 +1606,6 @@ namespace CalamityMod.World } } - if (Main.dayTime && Main.hardMode) - { - if (player.townNPCs >= 2f) - { - if (Main.rand.NextBool(2000)) - { - int steamGril = NPC.FindFirstNPC(NPCID.Steampunker); - if (steamGril == -1 && Main.netMode != NetmodeID.MultiplayerClient) - NPC.SpawnOnPlayer(closestPlayer, NPCID.Steampunker); //Steampunker has awoken! - } - } - } - if (modPlayer.ZoneAbyss) { if (player.chaosState)