Recall & Teleporters no longer blocked by bosses

This commit is contained in:
IbanPlay committed 2022-07-23 19:17:30 +02:00
1 parent c123ecd6de
commit e58e0772a1
4 files changed
-26

No files matched your search

-2
View File
@@ -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;
-10
View File
@@ -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)
{
-4
View File
@@ -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<BossEffects>());
}
if (item.type == ItemID.RodofDiscord)
{
if (player.chaosState)
-10
View File
@@ -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");