From e58e0772a10768bf3f8529c336cf66bfcb5ec444 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sat, 23 Jul 2022 19:17:30 +0200 Subject: [PATCH] Recall & Teleporters no longer blocked by bosses --- ILEditing/ILChangesLoading.cs | 2 -- ILEditing/MechanicILChanges.cs | 10 ---------- Items/CalamityGlobalItem.cs | 4 ---- Items/CalamityGlobalItemTooltip.cs | 10 ---------- 4 files changed, 26 deletions(-) diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index 34d6cfbf95..e346d98659 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -42,7 +42,6 @@ namespace CalamityMod.ILEditing IL.Terraria.Player.Update_NPCCollision += NerfShieldOfCthulhuBonkSafety; On.Terraria.WorldGen.OpenDoor += OpenDoor_LabDoorOverride; On.Terraria.WorldGen.CloseDoor += CloseDoor_LabDoorOverride; - On.Terraria.Wiring.Teleport += DisableTeleporters; // only applies in boss rush IL.Terraria.Main.DrawInterface_40_InteractItemIcon += MakeMouseHoverItemsSupportAnimations; On.Terraria.Item.AffixName += IncorporateEnchantmentInAffix; On.Terraria.Projectile.NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float += IncorporateMinionExplodingCountdown; @@ -155,7 +154,6 @@ namespace CalamityMod.ILEditing IL.Terraria.Player.Update_NPCCollision -= NerfShieldOfCthulhuBonkSafety; On.Terraria.WorldGen.OpenDoor -= OpenDoor_LabDoorOverride; On.Terraria.WorldGen.CloseDoor -= CloseDoor_LabDoorOverride; - On.Terraria.Wiring.Teleport -= DisableTeleporters; IL.Terraria.Main.DrawInterface_40_InteractItemIcon -= MakeMouseHoverItemsSupportAnimations; On.Terraria.Item.AffixName -= IncorporateEnchantmentInAffix; On.Terraria.Projectile.NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float -= IncorporateMinionExplodingCountdown; diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index afd5c63d00..470fab7d4d 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -449,16 +449,6 @@ namespace CalamityMod.ILEditing } #endregion Platform Collision Checks for Grounded Bosses - #region Teleporter Disabling During Boss Fights - private static void DisableTeleporters(On.Terraria.Wiring.orig_Teleport orig) - { - if (CalamityPlayer.areThereAnyDamnBosses) - return; - - orig(); - } - #endregion Teleporter Disabling During Boss Fights - #region Incorporate Enchantments in Item Names private static string IncorporateEnchantmentInAffix(On.Terraria.Item.orig_AffixName orig, Item self) { diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 2eb2f3a110..daea946679 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -889,10 +889,6 @@ namespace CalamityMod.Items { return false; } - if (item.type == ItemID.MagicMirror || item.type == ItemID.IceMirror || item.type == ItemID.CellPhone || item.type == ItemID.RecallPotion) - { - return !player.HasBuff(ModContent.BuffType()); - } if (item.type == ItemID.RodofDiscord) { if (player.chaosState) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 94ce4658d6..d04fd550e2 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -255,20 +255,10 @@ namespace CalamityMod.Items if (item.type == ItemID.GelBalloon) EditTooltipByNum(0, (line) => line.Text = ""); - // Teleporters not working while a boss is alive. - if (item.type == ItemID.Teleporter) - EditTooltipByName("Placeable", (line) => line.Text += "\nCannot be used while a boss is alive"); - // Flesh Knuckles giving extra max life. if (item.type == ItemID.FleshKnuckles || item.type == ItemID.HeroShield || item.type == ItemID.BerserkerGlove) EditTooltipByNum(0, (line) => line.Text += "\nMax life increased by 45"); - // Mirrors and Recall Potions cannot be used while a boss is alive. - if (item.type == ItemID.MagicMirror || item.type == ItemID.IceMirror || item.type == ItemID.CellPhone || item.type == ItemID.RecallPotion) - ApplyTooltipEdits(tooltips, - (i, l) => l.Mod == "Terraria" && l.Name == (i.type == ItemID.CellPhone ? "Tooltip1" : "Tooltip0"), - (line) => line.Text += "\nCannot be used while you have the Boss Effects buff"); - // Rod of Discord cannot be used multiple times to hurt yourself if (item.type == ItemID.RodofDiscord) EditTooltipByNum(0, (line) => line.Text += "\nTeleportation is disabled while Chaos State is active");