From 803bde708d2806f6d080ab62b95437b2baff8f32 Mon Sep 17 00:00:00 2001
From: IbanPlay <56191483+IbanPlay@users.noreply.github.com>
Date: Sun, 26 Jun 2022 00:11:11 +0200
Subject: [PATCH 1/9] Accounting for gravity flip GRAHHHH
---
Items/Weapons/Melee/Cnidarian.cs | 7 ++--
Items/Weapons/Ranged/ReedBlowgun.cs | 8 ++---
Projectiles/Ranged/PressurizedBubbleStream.cs | 4 +--
.../Rogue/FishboneBoomerangProjectile.cs | 4 +--
Utilities/PlayerUtils.cs | 36 +++++++++++++++++++
5 files changed, 48 insertions(+), 11 deletions(-)
diff --git a/Items/Weapons/Melee/Cnidarian.cs b/Items/Weapons/Melee/Cnidarian.cs
index 5516cb1739..60eeb20d2f 100644
--- a/Items/Weapons/Melee/Cnidarian.cs
+++ b/Items/Weapons/Melee/Cnidarian.cs
@@ -82,7 +82,8 @@ namespace CalamityMod.Items.Weapons.Melee
player.ChangeDir(-1);
}
- CalamityUtils.CleanHoldStyle(player, player.compositeFrontArm.rotation + MathHelper.PiOver2, player.GetFrontHandPosition(player.compositeFrontArm.stretch, player.compositeFrontArm.rotation).Floor(), new Vector2(42, 34), new Vector2(-15, 11));
+
+ CalamityUtils.CleanHoldStyle(player, player.compositeFrontArm.rotation + MathHelper.PiOver2 * player.gravDir, player.GetFrontHandPositionImproved(player.compositeFrontArm), new Vector2(42, 34), new Vector2(-15, 11));
}
@@ -108,8 +109,8 @@ namespace CalamityMod.Items.Weapons.Melee
armPointingDirection = -MathHelper.Pi + MathHelper.PiOver4 * Utils.GetLerpValue(-MathHelper.Pi, -MathHelper.PiOver4, armPointingDirection, true);
}
- player.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, armPointingDirection - MathHelper.PiOver2);
- player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, armPointingDirection - MathHelper.PiOver2);
+ player.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, armPointingDirection * player.gravDir - MathHelper.PiOver2);
+ player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, armPointingDirection * player.gravDir - MathHelper.PiOver2);
}
public override void HoldStyle(Player player, Rectangle heldItemFrame)
diff --git a/Items/Weapons/Ranged/ReedBlowgun.cs b/Items/Weapons/Ranged/ReedBlowgun.cs
index 165b4cd7f1..6c6048ef6f 100644
--- a/Items/Weapons/Ranged/ReedBlowgun.cs
+++ b/Items/Weapons/Ranged/ReedBlowgun.cs
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Ranged
velocity = velocity.RotatedByRandom(0.01f);
}
- public static Vector2 getPlayerMouth(Player player) => player.MountedCenter - 5f * Vector2.UnitY + Vector2.UnitX * 6f * player.direction;
+ public static Vector2 getPlayerMouth(Player player) => player.MountedCenter - 5f * Vector2.UnitY * player.gravDir + Vector2.UnitX * 6f * player.direction;
public static Vector2 getPlayerShoulder(Player player) => player.MountedCenter - Vector2.UnitX * 4f * player.direction;
public void SetItemInHand(Player player, Rectangle heldItemFrame)
@@ -73,7 +73,7 @@ namespace CalamityMod.Items.Weapons.Ranged
Vector2 playerMouth = getPlayerMouth(player);
Vector2 playerToCursor = (player.Calamity().mouseWorld - playerMouth).SafeNormalize(Vector2.UnitX);
- float pointingDirection = (playerToCursor.ToRotation() + MathHelper.PiOver4 / 3f * player.direction);
+ float pointingDirection = (playerToCursor.ToRotation() + MathHelper.PiOver4 / 3f * player.direction * player.gravDir);
CalamityUtils.CleanHoldStyle(player, pointingDirection, playerMouth, new Vector2(50, 18), new Vector2(-23, 6));
}
@@ -91,9 +91,9 @@ namespace CalamityMod.Items.Weapons.Ranged
float frontArmDirection = (playerMouth + mouthToCursor * 25f - getPlayerShoulder(player)).ToRotation();
if (frontArm)
- player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, frontArmDirection - MathHelper.PiOver2);
+ player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, frontArmDirection * player.gravDir - MathHelper.PiOver2);
- player.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, backArmDirection - MathHelper.PiOver2);
+ player.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, backArmDirection * player.gravDir - MathHelper.PiOver2);
}
public override void HoldStyle(Player player, Rectangle heldItemFrame)
diff --git a/Projectiles/Ranged/PressurizedBubbleStream.cs b/Projectiles/Ranged/PressurizedBubbleStream.cs
index fdec0d1e3f..4cca79aa66 100644
--- a/Projectiles/Ranged/PressurizedBubbleStream.cs
+++ b/Projectiles/Ranged/PressurizedBubbleStream.cs
@@ -52,12 +52,12 @@ namespace CalamityMod.Projectiles.Ranged
if (ChargingUp)
{
- float bubbleRotation = Owner.itemRotation - MathHelper.PiOver4 / 3f * Owner.direction;
+ float bubbleRotation = Owner.itemRotation - MathHelper.PiOver4 / 3f * Owner.direction * Owner.gravDir;
if (Owner.direction < 0)
bubbleRotation += MathHelper.Pi;
- Vector2 bubblePosition = ReedBlowgun.getPlayerMouth(Owner) + (bubbleRotation + MathHelper.PiOver4 / 15f * Owner.direction).ToRotationVector2() * 48f;
+ Vector2 bubblePosition = ReedBlowgun.getPlayerMouth(Owner) + (bubbleRotation + MathHelper.PiOver4 / 15f * Owner.direction * Owner.gravDir).ToRotationVector2() * 48f;
Projectile.Center = bubblePosition;
Projectile.velocity = Vector2.UnitX.RotatedBy(bubbleRotation) * Projectile.velocity.Length();
diff --git a/Projectiles/Rogue/FishboneBoomerangProjectile.cs b/Projectiles/Rogue/FishboneBoomerangProjectile.cs
index c1339a3a1d..4cd6efc108 100644
--- a/Projectiles/Rogue/FishboneBoomerangProjectile.cs
+++ b/Projectiles/Rogue/FishboneBoomerangProjectile.cs
@@ -70,8 +70,8 @@ namespace CalamityMod.Projectiles.Rogue
Owner.heldProj = Projectile.whoAmI;
- Projectile.Center = Owner.MountedCenter + Vector2.UnitY.RotatedBy(armRotation) * -40f;
- Projectile.rotation = -MathHelper.PiOver2 + armRotation;
+ Projectile.Center = Owner.MountedCenter + Vector2.UnitY.RotatedBy(armRotation * Owner.gravDir) * -40f * Owner.gravDir;
+ Projectile.rotation = (-MathHelper.PiOver2 + armRotation) * Owner.gravDir;
Owner.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, MathHelper.Pi + armRotation);
diff --git a/Utilities/PlayerUtils.cs b/Utilities/PlayerUtils.cs
index 56bebcf620..2c555078f1 100644
--- a/Utilities/PlayerUtils.cs
+++ b/Utilities/PlayerUtils.cs
@@ -11,6 +11,7 @@ using Terraria.ModLoader;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using static Terraria.ModLoader.ModContent;
+using static Terraria.Player;
namespace CalamityMod
{
@@ -488,6 +489,39 @@ namespace CalamityMod
#endregion
#region Arms Control
+
+ ///
+ /// The exact same thing as Player.GetFrontHandPosition() except it properly accounts for gravity swaps instead of requiring the coders to do it manually afterwards.
+ /// Additionally, it simply takes in the arm data instead of asking for the rotation and stretch separately.
+ ///
+ public static Vector2 GetFrontHandPositionImproved(this Player player, CompositeArmData arm)
+ {
+ Vector2 position = player.GetFrontHandPosition(arm.stretch, arm.rotation * player.gravDir).Floor();
+
+ if (player.gravDir == -1f)
+ {
+ position.Y = player.position.Y + (float)player.height + (player.position.Y - position.Y);
+ }
+
+ return position;
+ }
+
+ ///
+ /// The exact same thing as Player.GetBackHandPosition() except it properly accounts for gravity swaps instead of requiring the coders to do it manually afterwards.
+ /// Additionally, it simply takes in the arm data instead of asking for the rotation and stretch separately.
+ ///
+ public static Vector2 GetBackHandPositionImproved(this Player player, CompositeArmData arm)
+ {
+ Vector2 position = player.GetBackHandPosition(arm.stretch, arm.rotation * player.gravDir).Floor();
+
+ if (player.gravDir == -1f)
+ {
+ position.Y = player.position.Y + (float)player.height + (player.position.Y - position.Y);
+ }
+
+ return position;
+ }
+
///
/// Properly sets the player's held item rotation and position by doing the annoying math for you, since vanilla decided to be wholly inconsistent about it!
/// This all assumes the player is facing right. All the flip stuff is automatically handled in here
@@ -508,6 +542,8 @@ namespace CalamityMod
Vector2 origin = rotationOriginFromCenter.Value;
//Flip the origin's X position, since the sprite will be flipped if the player faces left.
origin.X *= player.direction;
+ //Additionally, flip the origin's Y position in case the player is in reverse gravity.
+ origin.Y *= player.gravDir;
player.itemRotation = desiredRotation;
From d2f7314dfc451c68758fc3b5607cabd5e2fdde51 Mon Sep 17 00:00:00 2001
From: Dominic
Date: Sat, 25 Jun 2022 19:00:37 -0500
Subject: [PATCH 2/9] Brimseekers don't get fucked by cramped spaces
---
Projectiles/Summon/DormantBrimseekerSummoner.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Projectiles/Summon/DormantBrimseekerSummoner.cs b/Projectiles/Summon/DormantBrimseekerSummoner.cs
index 63e5d41d16..56ae896378 100644
--- a/Projectiles/Summon/DormantBrimseekerSummoner.cs
+++ b/Projectiles/Summon/DormantBrimseekerSummoner.cs
@@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Summon
Projectile.minion = true;
Projectile.minionSlots = 0f;
Projectile.ignoreWater = true;
- Projectile.tileCollide = true;
+ Projectile.tileCollide = false;
Projectile.DamageType = DamageClass.Summon;
}
From a27bc979272fccc592fdaef4280490aebf385430 Mon Sep 17 00:00:00 2001
From: GinYuH <>
Date: Sun, 26 Jun 2022 01:38:22 -0700
Subject: [PATCH 3/9] fixed sheeting error on the tallest sulphur rib
---
Tiles/Abyss/SulphurousRib1.png | Bin 451 -> 446 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
diff --git a/Tiles/Abyss/SulphurousRib1.png b/Tiles/Abyss/SulphurousRib1.png
index 04d827a0a1eddf27502ef5d2c33bede29aef6fa9..c504049e1e00600a984da22b3a58bdf56377ebeb 100644
GIT binary patch
delta 396
zcmV;70dxMt1HJ>07YarQ1^@s6#UvDqks&C5zyJUazyWI3i3tDz0aHmtK~z{r?UXTV
z0znXkcP&y#AjlOKBAg-BRYDrmn_uAXOqnX_V_^|OxJpzIA*m!_lcYGA;hx2M%kHtW
zF{mF5b1OLeX6CV4d2-hu73C-M^7_F4ZSW}orvltO$ToZ)=a-zt6j%#fchiC*X?`ew
z3LEieK(|xAze)N0woW*scOX9l^qzG)io%8b49wo2rVGxq<)U(4@-wK5T!FgN2f+#s
z&u+Ko{#W0>ob%<1^WXb`Zl<7{ZMPHh3aEGV??b#9_!3+|WB;cAUHb<|FoSb}|A5tr
zkCS)K#n0EtIz%MbAs_!3;;@a)`$2@kR%pU3$#XE@a6$RpT-vw+Ky@f6@j7x5JMz7N3)_TD+0
qBZ2A6cryT`1Zt{?ufRoM0j0LsX@!u{vmaFe0000(PIo0-Q+rIhgDpw8b$*4fJW+0_@Rv-@lQZ+r#lJk4JDJi1v0eQ?gp73ZJ#0d=OJ&Zh1}cm*^&=65094qWjrAaQ@)|F-*sJ=np2
zf!~19i8qTSXZ8N_XPr1qPdH@nSW(n`KkwkL;CWLC3V^S%E8Yqu=A(I=fI5>O!d)Rv
zCLC=Er$7hSvH2mM0$02XbkEjZ*zh#F;P*Vg;|zzI9JvQquokd6GM)l-v=L8%>-WK1
v!OnNiSwM(St*D5QOIx#100000NkvXXu0mjfW>dd>
From 92875150aae59b5cb4eaa3f49f5b95f9e55f57b7 Mon Sep 17 00:00:00 2001
From: Merkalto
Date: Sun, 26 Jun 2022 12:36:24 -0500
Subject: [PATCH 4/9] Added missing research reqs to various items.
---
Items/Fishing/BrimstoneCragCatches/Brimlish.cs | 3 ++-
Items/Fishing/BrimstoneCragCatches/Slurpfish.cs | 3 ++-
Items/Fishing/SunkenSeaCatches/EutrophicSandfish.cs | 1 +
Items/Fishing/SunkenSeaCatches/Serpentuna.cs | 3 ++-
Items/Fishing/SunkenSeaCatches/SurfClam.cs | 1 +
Items/PermanentBoosters/CelestialOnion.cs | 1 +
Items/Placeables/AstralClay.cs | 3 ++-
Items/Placeables/AstralSnow.cs | 1 +
Items/Placeables/CelestialRemains.cs | 1 +
Items/Placeables/NovaeSlag.cs | 1 +
Items/Placeables/Walls/ChaoticBrickWall.cs | 7 ++++++-
Items/Tools/ClimateChange/AridArtifact.cs | 3 ++-
Items/Tools/ClimateChange/TorrentialTear.cs | 7 ++++---
Items/Weapons/Typeless/FiniteUse/Bazooka.cs | 1 +
Items/Weapons/Typeless/FiniteUse/ElephantKiller.cs | 1 +
Items/Weapons/Typeless/FiniteUse/Hydra.cs | 1 +
Items/Weapons/Typeless/FiniteUse/LightningHawk.cs | 1 +
Items/Weapons/Typeless/FiniteUse/Magnum.cs | 1 +
18 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/Items/Fishing/BrimstoneCragCatches/Brimlish.cs b/Items/Fishing/BrimstoneCragCatches/Brimlish.cs
index 0220ab9a43..6d496fa657 100644
--- a/Items/Fishing/BrimstoneCragCatches/Brimlish.cs
+++ b/Items/Fishing/BrimstoneCragCatches/Brimlish.cs
@@ -1,4 +1,4 @@
-using Terraria.ID;
+using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
@@ -8,6 +8,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Brimlish");
+ SacrificeTotal = 2;
}
public override void SetDefaults()
diff --git a/Items/Fishing/BrimstoneCragCatches/Slurpfish.cs b/Items/Fishing/BrimstoneCragCatches/Slurpfish.cs
index 7326c30b62..ee2f1feaa1 100644
--- a/Items/Fishing/BrimstoneCragCatches/Slurpfish.cs
+++ b/Items/Fishing/BrimstoneCragCatches/Slurpfish.cs
@@ -9,6 +9,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Slurpfish");
+ SacrificeTotal = 2;
}
public override void SetDefaults()
@@ -18,7 +19,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
Item.width = 30;
Item.height = 30;
Item.uniqueStack = true;
- Item.rare = ItemRarityID.Quest; // Questfish cannot be researched.
+ Item.rare = ItemRarityID.Quest;
}
public override bool IsQuestFish()
diff --git a/Items/Fishing/SunkenSeaCatches/EutrophicSandfish.cs b/Items/Fishing/SunkenSeaCatches/EutrophicSandfish.cs
index 3fc217454d..e5895751b7 100644
--- a/Items/Fishing/SunkenSeaCatches/EutrophicSandfish.cs
+++ b/Items/Fishing/SunkenSeaCatches/EutrophicSandfish.cs
@@ -8,6 +8,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Eutrophic Sandfish");
+ SacrificeTotal = 2;
}
public override void SetDefaults()
diff --git a/Items/Fishing/SunkenSeaCatches/Serpentuna.cs b/Items/Fishing/SunkenSeaCatches/Serpentuna.cs
index 61324b76d2..3f16e0b2fe 100644
--- a/Items/Fishing/SunkenSeaCatches/Serpentuna.cs
+++ b/Items/Fishing/SunkenSeaCatches/Serpentuna.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -9,6 +9,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Serpentuna");
+ SacrificeTotal = 2;
}
public override void SetDefaults()
diff --git a/Items/Fishing/SunkenSeaCatches/SurfClam.cs b/Items/Fishing/SunkenSeaCatches/SurfClam.cs
index adfc2fc2b2..d14fcaa3d0 100644
--- a/Items/Fishing/SunkenSeaCatches/SurfClam.cs
+++ b/Items/Fishing/SunkenSeaCatches/SurfClam.cs
@@ -8,6 +8,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Surf Clam");
+ SacrificeTotal = 2;
}
public override void SetDefaults()
diff --git a/Items/PermanentBoosters/CelestialOnion.cs b/Items/PermanentBoosters/CelestialOnion.cs
index 222500271b..25de1d04ca 100644
--- a/Items/PermanentBoosters/CelestialOnion.cs
+++ b/Items/PermanentBoosters/CelestialOnion.cs
@@ -15,6 +15,7 @@ namespace CalamityMod.Items.PermanentBoosters
Tooltip.SetDefault(@"Alien power pulses inside its layers
Consuming it does something that cannot be reversed
This item does nothing in Master Mode");
+ SacrificeTotal = 1;
}
public override void SetDefaults()
diff --git a/Items/Placeables/AstralClay.cs b/Items/Placeables/AstralClay.cs
index 5e09d3ff55..2ecb674b8b 100644
--- a/Items/Placeables/AstralClay.cs
+++ b/Items/Placeables/AstralClay.cs
@@ -1,4 +1,4 @@
-using Terraria.ID;
+using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables
@@ -8,6 +8,7 @@ namespace CalamityMod.Items.Placeables
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Astral Clay");
+ SacrificeTotal = 100;
}
public override void SetDefaults()
diff --git a/Items/Placeables/AstralSnow.cs b/Items/Placeables/AstralSnow.cs
index 3d901a5953..cee515a267 100644
--- a/Items/Placeables/AstralSnow.cs
+++ b/Items/Placeables/AstralSnow.cs
@@ -9,6 +9,7 @@ namespace CalamityMod.Items.Placeables
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Astral Snow");
+ SacrificeTotal = 100;
}
public override void SetDefaults()
diff --git a/Items/Placeables/CelestialRemains.cs b/Items/Placeables/CelestialRemains.cs
index 26165387c8..1db5e4df79 100644
--- a/Items/Placeables/CelestialRemains.cs
+++ b/Items/Placeables/CelestialRemains.cs
@@ -12,6 +12,7 @@ namespace CalamityMod.Items.Placeables
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Celestial Remains");
+ SacrificeTotal = 100;
}
public override void SetDefaults()
diff --git a/Items/Placeables/NovaeSlag.cs b/Items/Placeables/NovaeSlag.cs
index e664eee567..612d85f5a7 100644
--- a/Items/Placeables/NovaeSlag.cs
+++ b/Items/Placeables/NovaeSlag.cs
@@ -11,6 +11,7 @@ namespace CalamityMod.Items.Placeables
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Novae Slag");
+ SacrificeTotal = 100;
}
public override void SetDefaults()
diff --git a/Items/Placeables/Walls/ChaoticBrickWall.cs b/Items/Placeables/Walls/ChaoticBrickWall.cs
index d1e29c3e2b..3410d503b2 100644
--- a/Items/Placeables/Walls/ChaoticBrickWall.cs
+++ b/Items/Placeables/Walls/ChaoticBrickWall.cs
@@ -1,4 +1,4 @@
-using Terraria.ModLoader;
+using Terraria.ModLoader;
using WallTiles = CalamityMod.Walls;
using Terraria.ID;
@@ -6,6 +6,11 @@ namespace CalamityMod.Items.Placeables.Walls
{
public class ChaoticBrickWall : ModItem
{
+ public override void SetStaticDefaults()
+ {
+ SacrificeTotal = 400;
+ DisplayName.SetDefault("Chaotic Brick Wall");
+ }
public override void SetDefaults()
{
Item.width = 12;
diff --git a/Items/Tools/ClimateChange/AridArtifact.cs b/Items/Tools/ClimateChange/AridArtifact.cs
index 3fc9e710da..1d37c79094 100644
--- a/Items/Tools/ClimateChange/AridArtifact.cs
+++ b/Items/Tools/ClimateChange/AridArtifact.cs
@@ -10,7 +10,8 @@ namespace CalamityMod.Items.Tools.ClimateChange
DisplayName.SetDefault("Arid Artifact");
Tooltip.SetDefault("Summons a sandstorm\n" +
"The sandstorm will happen shortly after the item is used\n" +
- "Not consumable");
+ "If used during a sandstorm, the sandstorm will stop some time afterward.");
+ SacrificeTotal = 1;
}
public override void SetDefaults()
diff --git a/Items/Tools/ClimateChange/TorrentialTear.cs b/Items/Tools/ClimateChange/TorrentialTear.cs
index 2aee93ef02..1a3d18854b 100644
--- a/Items/Tools/ClimateChange/TorrentialTear.cs
+++ b/Items/Tools/ClimateChange/TorrentialTear.cs
@@ -9,9 +9,10 @@ namespace CalamityMod.Items.Tools.ClimateChange
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Torrential Tear");
- Tooltip.SetDefault("Summons the rain.\n" +
- "Rain will start some time after this item is used.\n" +
- "If used while it's raining, the rain will stop some time afterward.");
+ Tooltip.SetDefault("Summons the rain\n" +
+ "Rain will start some time after this item is used\n" +
+ "If used while it's raining, the rain will stop some time afterward");
+ SacrificeTotal = 1;
}
public override void SetDefaults()
diff --git a/Items/Weapons/Typeless/FiniteUse/Bazooka.cs b/Items/Weapons/Typeless/FiniteUse/Bazooka.cs
index 212c434829..083d50e0a6 100644
--- a/Items/Weapons/Typeless/FiniteUse/Bazooka.cs
+++ b/Items/Weapons/Typeless/FiniteUse/Bazooka.cs
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse
DisplayName.SetDefault("Bazooka");
Tooltip.SetDefault("Uses Grenade Shells\n" +
"Can be used twice per boss battle");
+ SacrificeTotal = 1;
}
public override void SetDefaults()
diff --git a/Items/Weapons/Typeless/FiniteUse/ElephantKiller.cs b/Items/Weapons/Typeless/FiniteUse/ElephantKiller.cs
index d5c1ab9491..8a7a93efd3 100644
--- a/Items/Weapons/Typeless/FiniteUse/ElephantKiller.cs
+++ b/Items/Weapons/Typeless/FiniteUse/ElephantKiller.cs
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse
DisplayName.SetDefault("Elephant Killer");
Tooltip.SetDefault("Uses Magnum Rounds\n" +
"Can be used thrice per boss battle");
+ SacrificeTotal = 1;
}
public override void SetDefaults()
diff --git a/Items/Weapons/Typeless/FiniteUse/Hydra.cs b/Items/Weapons/Typeless/FiniteUse/Hydra.cs
index 636f70aad0..47965ce3b4 100644
--- a/Items/Weapons/Typeless/FiniteUse/Hydra.cs
+++ b/Items/Weapons/Typeless/FiniteUse/Hydra.cs
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse
DisplayName.SetDefault("Hydra");
Tooltip.SetDefault("Uses Explosive Shotgun Shells\n" +
"Can be used once per boss battle");
+ SacrificeTotal = 1;
}
public override void SetDefaults()
diff --git a/Items/Weapons/Typeless/FiniteUse/LightningHawk.cs b/Items/Weapons/Typeless/FiniteUse/LightningHawk.cs
index 19d4d15791..8592a2923e 100644
--- a/Items/Weapons/Typeless/FiniteUse/LightningHawk.cs
+++ b/Items/Weapons/Typeless/FiniteUse/LightningHawk.cs
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse
DisplayName.SetDefault("Lightning Hawk");
Tooltip.SetDefault("Uses Magnum Rounds\n" +
"Can be used thrice per boss battle");
+ SacrificeTotal = 1;
}
public override void SetDefaults()
diff --git a/Items/Weapons/Typeless/FiniteUse/Magnum.cs b/Items/Weapons/Typeless/FiniteUse/Magnum.cs
index 5eb6147a5e..efbb3f5985 100644
--- a/Items/Weapons/Typeless/FiniteUse/Magnum.cs
+++ b/Items/Weapons/Typeless/FiniteUse/Magnum.cs
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse
DisplayName.SetDefault("Magnum");
Tooltip.SetDefault("Uses Magnum Rounds\n" +
"Can be used thrice per boss battle");
+ SacrificeTotal = 1;
}
public override void SetDefaults()
From 29f8aaf5dd923cb94836a51ee7dee9bd657b8fc6 Mon Sep 17 00:00:00 2001
From: Merkalto
Date: Sun, 26 Jun 2022 14:27:43 -0500
Subject: [PATCH 5/9] Moved Alt Evil items to graveyard anvil recipes.
---
Items/Accessories/BloodyWormTooth.cs | 9 ++++
Items/Accessories/RottenBrain.cs | 10 ++++
NPCs/CalamityGlobalTownNPC.cs | 7 ---
Utilities/CalamityRecipes.cs | 73 ++++++++++++++++++++++++++++
4 files changed, 92 insertions(+), 7 deletions(-)
diff --git a/Items/Accessories/BloodyWormTooth.cs b/Items/Accessories/BloodyWormTooth.cs
index dd8333536d..13817630f3 100644
--- a/Items/Accessories/BloodyWormTooth.cs
+++ b/Items/Accessories/BloodyWormTooth.cs
@@ -30,5 +30,14 @@ namespace CalamityMod.Items.Accessories
modPlayer.bloodyWormTooth = true;
player.GetAttackSpeed() += 0.07f;
}
+
+ public override void AddRecipes()
+ {
+ CreateRecipe().
+ AddIngredient().
+ AddTile(TileID.Anvils).
+ AddCondition(Recipe.Condition.InGraveyardBiome).
+ Register();
+ }
}
}
diff --git a/Items/Accessories/RottenBrain.cs b/Items/Accessories/RottenBrain.cs
index 9b92fda1cb..21b449aaa7 100644
--- a/Items/Accessories/RottenBrain.cs
+++ b/Items/Accessories/RottenBrain.cs
@@ -3,6 +3,7 @@ using CalamityMod.Projectiles.Magic;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
+using Terraria.Localization;
namespace CalamityMod.Items.Accessories
{
@@ -47,5 +48,14 @@ namespace CalamityMod.Items.Accessories
CalamityPlayer modPlayer = player.Calamity();
modPlayer.rBrain = true;
}
+
+ public override void AddRecipes()
+ {
+ CreateRecipe().
+ AddIngredient().
+ AddTile(TileID.Anvils).
+ AddCondition(Recipe.Condition.InGraveyardBiome).
+ Register();
+ }
}
}
diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs
index 7f5f6b2073..0d372d4087 100644
--- a/NPCs/CalamityGlobalTownNPC.cs
+++ b/NPCs/CalamityGlobalTownNPC.cs
@@ -1312,8 +1312,6 @@ namespace CalamityMod.NPCs
SetShopItem(ref shop, ref nextSlot, ItemID.BlueFlare, (Main.LocalPlayer.HasItem(ItemType()) || Main.LocalPlayer.HasItem(ItemType())) && !Main.LocalPlayer.HasItem(ItemID.FlareGun));
SetShopItem(ref shop, ref nextSlot, ItemID.ApprenticeBait, NPC.downedBoss1);
SetShopItem(ref shop, ref nextSlot, ItemID.JourneymanBait, NPC.downedBoss3);
- SetShopItem(ref shop, ref nextSlot, WorldGen.crimson ? ItemID.Vilethorn : ItemID.CrimsonRod, WorldGen.shadowOrbSmashed || NPC.downedBoss2);
- SetShopItem(ref shop, ref nextSlot, WorldGen.crimson ? ItemID.BallOHurt : ItemID.TheRottedFork, WorldGen.shadowOrbSmashed || NPC.downedBoss2);
SetShopItem(ref shop, ref nextSlot, ItemID.MasterBait, NPC.downedPlantBoss);
SetShopItem(ref shop, ref nextSlot, ItemID.AngelStatue, NPC.FindFirstNPC(NPCType()) != -1, Item.buyPrice(0, 5));
}
@@ -1341,7 +1339,6 @@ namespace CalamityMod.NPCs
SetShopItem(ref shop, ref nextSlot, ItemType(), hasMagnum, Item.buyPrice(0, 3 * goldCost, 0, 0));
SetShopItem(ref shop, ref nextSlot, ItemType(), Main.LocalPlayer.HasItem(ItemType()), Item.buyPrice(0, 5 * goldCost, 0, 0));
SetShopItem(ref shop, ref nextSlot, ItemType(), Main.LocalPlayer.HasItem(ItemType()), Item.buyPrice(0, 7 * goldCost, 0, 0));
- SetShopItem(ref shop, ref nextSlot, WorldGen.crimson ? ItemID.Musket : ItemID.TheUndertaker, WorldGen.shadowOrbSmashed || NPC.downedBoss2);
SetShopItem(ref shop, ref nextSlot, ItemID.Boomstick, NPC.downedQueenBee, price: Item.buyPrice(gold: 20));
SetShopItem(ref shop, ref nextSlot, ItemID.AmmoBox, Main.hardMode, Item.buyPrice(gold: 25));
SetShopItem(ref shop, ref nextSlot, ItemID.Uzi, NPC.downedPlantBoss, Item.buyPrice(gold: 45));
@@ -1378,10 +1375,6 @@ namespace CalamityMod.NPCs
SetShopItem(ref shop, ref nextSlot, ItemID.SwiftnessPotion, NPC.downedBoss2, Item.buyPrice(0, goldCost, 0, 0));
SetShopItem(ref shop, ref nextSlot, ItemID.JungleRose, price: Item.buyPrice(0, 2));
SetShopItem(ref shop, ref nextSlot, ItemID.NaturesGift, price: Item.buyPrice(0, 10));
- SetShopItem(ref shop, ref nextSlot, WorldGen.crimson ? ItemID.BandofStarpower : ItemID.PanicNecklace, WorldGen.shadowOrbSmashed || NPC.downedBoss2);
- SetShopItem(ref shop, ref nextSlot, WorldGen.crimson ? ItemID.WormScarf : ItemID.BrainOfConfusion, NPC.downedBoss2);
- SetShopItem(ref shop, ref nextSlot, ItemType(), DownedBossSystem.downedPerforator);
- SetShopItem(ref shop, ref nextSlot, ItemType(), DownedBossSystem.downedHiveMind);
SetShopItem(ref shop, ref nextSlot, ItemType());
}
diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs
index 06993c669c..abed050ce4 100644
--- a/Utilities/CalamityRecipes.cs
+++ b/Utilities/CalamityRecipes.cs
@@ -520,6 +520,79 @@ namespace CalamityMod
AddTile(TileID.Hellforge).
Register();
+ // Alternative Evil Biome items
+ CreateRecipe(ItemID.BandofStarpower).
+ AddIngredient(ItemID.PanicNecklace).
+ AddTile(TileID.Anvils).
+ AddCondition(Recipe.Condition.InGraveyardBiome).
+ Register();
+
+ CreateRecipe(ItemID.PanicNecklace).
+ AddIngredient(ItemID.BandofStarpower).
+ AddTile(TileID.Anvils).
+ AddCondition(Recipe.Condition.InGraveyardBiome).
+ Register();
+
+ CreateRecipe(ItemID.CrimsonRod).
+ AddIngredient(ItemID.Vilethorn).
+ AddTile(TileID.Anvils).
+ AddCondition(Recipe.Condition.InGraveyardBiome).
+ Register();
+
+ CreateRecipe(ItemID.Vilethorn).
+ AddIngredient(ItemID.CrimsonRod).
+ AddTile(TileID.Anvils).
+ AddCondition(Recipe.Condition.InGraveyardBiome).
+ Register();
+
+ CreateRecipe(ItemID.TheRottedFork).
+ AddIngredient(ItemID.BallOHurt).
+ AddTile(TileID.Anvils).
+ AddCondition(Recipe.Condition.InGraveyardBiome).
+ Register();
+
+ CreateRecipe(ItemID.BallOHurt).
+ AddIngredient(ItemID.TheRottedFork).
+ AddTile(TileID.Anvils).
+ AddCondition(Recipe.Condition.InGraveyardBiome).
+ Register();
+
+ CreateRecipe(ItemID.TheUndertaker).
+ AddIngredient(ItemID.Musket).
+ AddTile(TileID.Anvils).
+ AddCondition(Recipe.Condition.InGraveyardBiome).
+ Register();
+
+ CreateRecipe(ItemID.Musket).
+ AddIngredient(ItemID.TheUndertaker).
+ AddTile(TileID.Anvils).
+ AddCondition(Recipe.Condition.InGraveyardBiome).
+ Register();
+
+ CreateRecipe(ItemID.CrimsonHeart).
+ AddIngredient(ItemID.ShadowOrb).
+ AddTile(TileID.Anvils).
+ AddCondition(Recipe.Condition.InGraveyardBiome).
+ Register();
+
+ CreateRecipe(ItemID.ShadowOrb).
+ AddIngredient(ItemID.CrimsonHeart).
+ AddTile(TileID.Anvils).
+ AddCondition(Recipe.Condition.InGraveyardBiome).
+ Register();
+
+ CreateRecipe(ItemID.BrainOfConfusion).
+ AddIngredient(ItemID.WormScarf).
+ AddTile(TileID.Anvils).
+ AddCondition(Recipe.Condition.InGraveyardBiome).
+ Register();
+
+ CreateRecipe(ItemID.WormScarf).
+ AddIngredient(ItemID.BrainOfConfusion).
+ AddTile(TileID.Anvils).
+ AddCondition(Recipe.Condition.InGraveyardBiome).
+ Register();
+
AddAstralClayRecipes();
AddBloodOrbPotionRecipes();
AddCookedFood();
From 9b85d03bc46710f2d8db70259954256075cc03b9 Mon Sep 17 00:00:00 2001
From: Merkalto
Date: Sun, 26 Jun 2022 14:27:56 -0500
Subject: [PATCH 6/9] Fixed caustic tear recipe.
---
Items/SummonItems/Invasion/CausticTear.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/Items/SummonItems/Invasion/CausticTear.cs b/Items/SummonItems/Invasion/CausticTear.cs
index 0c808badcd..cd686f9c41 100644
--- a/Items/SummonItems/Invasion/CausticTear.cs
+++ b/Items/SummonItems/Invasion/CausticTear.cs
@@ -45,6 +45,7 @@ namespace CalamityMod.Items.SummonItems.Invasion
{
CreateRecipe().
AddIngredient(5).
+ AddCondition(Recipe.Condition.NearWater).
Register();
}
}
From 0d67b47c6e3cdfa8f68ca56a4c23b8d7bcbf8bf2 Mon Sep 17 00:00:00 2001
From: Merkalto
Date: Sun, 26 Jun 2022 17:59:54 -0500
Subject: [PATCH 7/9] Fixed Bloody Edge recipe inconsistency with Nights Edge.
(Why does Nights Edge use purified gel in its recipes?!?)
---
Items/Weapons/Melee/BloodyEdge.cs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Items/Weapons/Melee/BloodyEdge.cs b/Items/Weapons/Melee/BloodyEdge.cs
index 3e7fc61333..fd5e1ccdc4 100644
--- a/Items/Weapons/Melee/BloodyEdge.cs
+++ b/Items/Weapons/Melee/BloodyEdge.cs
@@ -3,6 +3,7 @@ using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
+using CalamityMod.Items.Materials;
namespace CalamityMod.Items.Weapons.Melee
{
@@ -71,6 +72,7 @@ namespace CalamityMod.Items.Weapons.Melee
AddIngredient(ItemID.Muramasa).
AddIngredient(ItemID.BladeofGrass).
AddIngredient(ItemID.FieryGreatsword).
+ AddIngredient(5).
AddTile(TileID.DemonAltar).
Register();
CreateRecipe().
@@ -78,6 +80,7 @@ namespace CalamityMod.Items.Weapons.Melee
AddIngredient(ItemID.Muramasa).
AddIngredient(ItemID.BladeofGrass).
AddIngredient(ItemID.FieryGreatsword).
+ AddIngredient(5).
AddTile(TileID.DemonAltar).
Register();
}
From 4c75fcb5eb2c7820df1e8527fb2368bdee952758 Mon Sep 17 00:00:00 2001
From: Merkalto
Date: Sun, 26 Jun 2022 18:05:21 -0500
Subject: [PATCH 8/9] True Bloody Edge recipe fix.
---
Items/Weapons/Melee/TrueBloodyEdge.cs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Items/Weapons/Melee/TrueBloodyEdge.cs b/Items/Weapons/Melee/TrueBloodyEdge.cs
index 18c81068ef..3c9118d0e6 100644
--- a/Items/Weapons/Melee/TrueBloodyEdge.cs
+++ b/Items/Weapons/Melee/TrueBloodyEdge.cs
@@ -74,7 +74,9 @@ namespace CalamityMod.Items.Weapons.Melee
{
CreateRecipe().
AddIngredient().
- AddIngredient(ItemID.BrokenHeroSword).
+ AddIngredient(ItemID.SoulofFright, 3).
+ AddIngredient(ItemID.SoulofMight, 3).
+ AddIngredient(ItemID.SoulofSight, 3).
AddTile(TileID.MythrilAnvil).
Register();
}
From a2cbf8d08516062b033be1ea73ed5656155c1a2a Mon Sep 17 00:00:00 2001
From: Merkalto
Date: Sun, 26 Jun 2022 18:21:02 -0500
Subject: [PATCH 9/9] Terra Edge recipe consistency with Terra Blade
---
Items/Weapons/Melee/TerraEdge.cs | 2 ++
Utilities/CalamityRecipes.cs | 1 +
2 files changed, 3 insertions(+)
diff --git a/Items/Weapons/Melee/TerraEdge.cs b/Items/Weapons/Melee/TerraEdge.cs
index ba34dc0af3..d5d89ab679 100644
--- a/Items/Weapons/Melee/TerraEdge.cs
+++ b/Items/Weapons/Melee/TerraEdge.cs
@@ -79,12 +79,14 @@ namespace CalamityMod.Items.Weapons.Melee
CreateRecipe().
AddIngredient().
AddIngredient(ItemID.TrueExcalibur).
+ AddIngredient(ItemID.BrokenHeroSword).
AddIngredient(7).
AddTile(TileID.MythrilAnvil).
Register();
CreateRecipe().
AddIngredient(ItemID.TrueNightsEdge).
AddIngredient(ItemID.TrueExcalibur).
+ AddIngredient(ItemID.BrokenHeroSword).
AddIngredient(7).
AddTile(TileID.MythrilAnvil).
Register();
diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs
index abed050ce4..873ad4a982 100644
--- a/Utilities/CalamityRecipes.cs
+++ b/Utilities/CalamityRecipes.cs
@@ -1606,6 +1606,7 @@ namespace CalamityMod
r = CreateRecipe(ItemID.TerraBlade);
r.AddIngredient(ModContent.ItemType());
r.AddIngredient(ItemID.TrueExcalibur);
+ r.AddIngredient(ItemID.BrokenHeroSword);
r.AddIngredient(ModContent.ItemType(), 7);
r.AddTile(TileID.MythrilAnvil);
r.Register();