diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs
index 1a894e329a..5ed7fcddac 100644
--- a/Buffs/CalamityGlobalBuff.cs
+++ b/Buffs/CalamityGlobalBuff.cs
@@ -148,12 +148,6 @@ namespace CalamityMod.Buffs
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
}
- else if (type == BuffID.Slow)
- {
- npc.Calamity().slowed = true;
- if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
- npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
- }
if (type == BuffID.Electrified)
{
npc.Calamity().electrified = true;
diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs
index bab234be60..db5f929102 100644
--- a/CalPlayer/CalamityPlayer.cs
+++ b/CalPlayer/CalamityPlayer.cs
@@ -973,6 +973,8 @@ namespace CalamityMod.CalPlayer
public bool XykVisualsBlue = false;
public bool XykVisualsOrange = false;
public Color XykFXColor = Color.Black;
+ public int XykWingTimer = 0;
+ public Color lightRGB = Color.Black;
public bool manaOverloader = false;
/// Used for allowing Calamity slimes to be affected by Royal Gel.
public bool royalGel = false;
diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs
index 3e66416f5b..baa0d5969f 100644
--- a/CalPlayer/CalamityPlayerHitHurt.cs
+++ b/CalPlayer/CalamityPlayerHitHurt.cs
@@ -878,7 +878,7 @@ namespace CalamityMod.CalPlayer
contactDamageReduction *= (double)Crumbling.MultiplicativeDamageReductionPlayer;
// Contact damage reduction is reduced by DR Damage, which itself is proportional to defense damage
- // In GFB, as defense damage is uncapped, DR damage is also uncapped.
+ // In FTW, as defense damage is uncapped, DR damage is also uncapped.
int currentDefense = Player.GetCurrentDefense(false);
if (totalDefenseDamage > 0 && currentDefense > 0)
{
diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs
index 4afe8e08cd..626da881aa 100644
--- a/CalPlayer/CalamityPlayerMiscEffects.cs
+++ b/CalPlayer/CalamityPlayerMiscEffects.cs
@@ -254,12 +254,21 @@ namespace CalamityMod.CalPlayer
foreach (Projectile p in Main.ActiveProjectiles)
if (p.type == ModContent.ProjectileType() && p.owner == Player.whoAmI && p.ai[1] == 0)
numOfActiveWings++;
- bool spawnWings = numOfActiveWings < maxWingPieces && !Player.dead && Player.wingsLogic > 0 && !(Player.wingTime == Player.wingTimeMax && Player.velocity.Y == 0) && Player.wingTime > 0;
+ bool spawnWings = numOfActiveWings < maxWingPieces && !Player.dead && Player.wingsLogic > 0 && ((!(Player.wingTime == Player.wingTimeMax && Player.velocity.Y == 0) && Player.wingTime > 0) || XykWingTimer >= 3);
if (spawnWings)
{
- int wingCount = numOfActiveWings;
- Projectile wings = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Player.whoAmI, wingCount);
+ if (XykWingTimer >= 3)
+ {
+ int wingCount = numOfActiveWings;
+ Projectile wings = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Player.whoAmI, wingCount);
+ if (numOfActiveWings + 1 == maxWingPieces)
+ XykWingTimer = 0;
+ }
+ else
+ XykWingTimer++;
}
+ else
+ XykWingTimer = 0;
}
// First Frame dash effects
@@ -568,6 +577,22 @@ namespace CalamityMod.CalPlayer
if (heldGaelsLastFrame)
rageDiff += rageMax * GaelsGreatsword.RagePerSecond / 60f;
+ float rate = Main.GlobalTimeWrappedHourly * 29;
+ List eColors = new List()
+ {
+ Color.PaleVioletRed,
+ Color.Coral,
+ Color.Khaki,
+ Color.PaleGreen,
+ Color.Turquoise,
+ Color.Violet
+ };
+
+ int colorIndex = (int)(rate / 2 % eColors.Count);
+ Color currentColor = eColors[colorIndex];
+ Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
+ lightRGB = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
+
// Calculate and grant proximity rage.
// Regular enemies can give up to 1x proximity rage. Bosses can give up to 3x. Multiple regular enemies don't stack.
// Proximity rage is maxed out when within 10 blocks (160 pixels) of the enemy's hitbox.
@@ -3097,7 +3122,7 @@ namespace CalamityMod.CalPlayer
abyssDeath = false;
// Signus headcrab darkness
- if (CalamityWorld.LegendaryMode && CalamityWorld.revenge)
+ if (CalamityWorld.LegendaryMode)
{
if (CalamityGlobalNPC.signus != -1)
{
@@ -3801,11 +3826,15 @@ namespace CalamityMod.CalPlayer
{
Player.GetDamage() += PrimordialEarth.BuffDamageBoost;
Player.statDefense += PrimordialEarth.BuffDefenseBoost;
+ Player.manaRegenDelayBonus += 1;
+ Player.manaRegenBonus += 50 + (int)(400 * (float)Math.Pow((1 - ((float)Player.statMana / (float)Player.statManaMax2)), 2));
}
if (aeolianEarthBuff)
{
Player.GetDamage() += PrimordialAncient.BuffDamageBoost;
Player.endurance += PrimordialAncient.BuffDamageReductionBoost;
+ Player.manaRegenDelayBonus += 1;
+ Player.manaRegenBonus += 75 + (int)(600 * (float)Math.Pow((1 - ((float)Player.statMana / (float)Player.statManaMax2)), 2));
}
if (frostFlare)
diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs
index d542dee2d1..59545d68db 100644
--- a/CalPlayer/CalamityPlayerOnHit.cs
+++ b/CalPlayer/CalamityPlayerOnHit.cs
@@ -843,8 +843,9 @@ namespace CalamityMod.CalPlayer
if (dynamoStemCells && MiniSwarmerCooldown <= 0 && proj.CountsAsClass())
{
MiniSwarmerCooldown = DynamoStemCells.MiniSwarmerCooldown;
-
- Vector2 velocity = proj.velocity.SafeNormalize(Vector2.UnitY) * 19;
+ Vector2 directionToMouse = Main.MouseWorld - Player.Center;
+ directionToMouse.Normalize();
+ Vector2 velocity = directionToMouse * 19;
int MiniSwamerDamage = (int)Player.GetTotalDamage().ApplyTo(DynamoStemCells.MiniSwamerDamage);
Projectile.NewProjectile(source, Player.Center, velocity, ProjectileType(), MiniSwamerDamage, 2f, proj.owner);
}
diff --git a/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs b/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs
index d5a92f8bfc..74577bfced 100644
--- a/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs
+++ b/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs
@@ -35,6 +35,8 @@ namespace CalamityMod.CalPlayer.DrawLayers
if (itemType < ItemID.Count)
return;
+ Color color = new Color(250, 250, 250, heldItem.alpha);
+
// This is ugly and I don't give a fuck.
// If you want it to look better, do it yourself.
Texture2D glowMask = default;
@@ -62,8 +64,6 @@ namespace CalamityMod.CalPlayer.DrawLayers
glowMask = ModContent.Request("CalamityMod/Items/Weapons/Summon/EtherealSubjugatorGlow").Value;
else if (itemType == ModContent.ItemType())
glowMask = ModContent.Request("CalamityMod/Items/Weapons/Melee/ExcelsusGlow").Value;
- else if (itemType == ModContent.ItemType())
- glowMask = ModContent.Request("CalamityMod/Items/Weapons/Melee/IridescentExcaliburGlow").Value;
else if (itemType == ModContent.ItemType())
glowMask = ModContent.Request("CalamityMod/Items/Weapons/Magic/FatesRevealGlow").Value;
else if (itemType == ModContent.ItemType())
@@ -75,7 +75,10 @@ namespace CalamityMod.CalPlayer.DrawLayers
else if (itemType == ModContent.ItemType())
glowMask = ModContent.Request("CalamityMod/Items/SummonItems/NecroplasmicBeaconGlow").Value;
else if (itemType == ModContent.ItemType())
+ {
+ color = Color.Lerp(Color.White, drawPlayer.Calamity().lightRGB, 0.75f) with { A = 0 };
glowMask = ModContent.Request("CalamityMod/Items/Weapons/Melee/OrderbringerGlow").Value;
+ }
else if (itemType == ModContent.ItemType())
glowMask = ModContent.Request("CalamityMod/Items/Weapons/Magic/PhotosynthesisGlow").Value;
else if (itemType == ModContent.ItemType())
@@ -140,7 +143,6 @@ namespace CalamityMod.CalPlayer.DrawLayers
if (drawInfo.shadow != 0f || drawPlayer.frozen || !(inUse || visuallyHeld) || itemType <= 0 || drawPlayer.dead || heldItem.noUseGraphic || (drawPlayer.wet && heldItem.noWet) || (drawPlayer.happyFunTorchTime && drawPlayer.inventory[drawPlayer.selectedItem].createTile == TileID.Torches && drawPlayer.itemAnimation == 0))
return;
- Color color = new Color(250, 250, 250, heldItem.alpha);
Vector2 originOffset = Vector2.Zero;
// Use to adjust glow mask draw offset and color.
diff --git a/DataStructures/NPCStats.cs b/DataStructures/NPCStats.cs
index 18cef5a312..3a407276d4 100644
--- a/DataStructures/NPCStats.cs
+++ b/DataStructures/NPCStats.cs
@@ -200,7 +200,6 @@ namespace CalamityMod
{ NPCID.Spazmatism, 0.85 },
{ NPCID.Retinazer, 0.85 },
- { ModContent.NPCType(), 0.85 },
{ ModContent.NPCType(), 1.1 },
{ ModContent.NPCType(), 0.8 },
@@ -214,7 +213,6 @@ namespace CalamityMod
{ ModContent.NPCType(), 0.8 },
{ NPCID.SkeletronPrime, 0.85 },
- { ModContent.NPCType(), 0.85 },
{ NPCID.PrimeCannon, 0.85 },
{ NPCID.PrimeLaser, 0.85 },
{ NPCID.PrimeSaw, 0.85 },
@@ -261,7 +259,7 @@ namespace CalamityMod
{ ModContent.NPCType(), 0.8 },
- { ModContent.NPCType(), 0.8 },
+ { ModContent.NPCType(), 0.8 },
{ ModContent.NPCType(), 0.8 },
{ ModContent.NPCType(), 0.8 },
@@ -399,12 +397,6 @@ namespace CalamityMod
102, // 153 in phase 2
119, // 178 in phase 2
153 } }, // 229 in phase 2
- { ModContent.NPCType(), new int[] {
- 62, // 93 in phase 2
- 94, // 141 in phase 2
- 110, // 165 in phase 2
- 128, // 192 in phase 2
- 178 } }, // 267 in phase 2
{ ModContent.NPCType(), new int[] { 110, 176, 187, 198, 330 } },
{ ModContent.NPCType(), new int[] { 75, 112, 136, 160, 240 } },
@@ -423,12 +415,6 @@ namespace CalamityMod
102, // 204 while spinning
119, // 238 while spinning
153 } }, // 306 while spinning
- { ModContent.NPCType(), new int[] {
- 50, // 100 while spinning
- 85, // 170 while spinning
- 102, // 204 while spinning
- 119, // 238 while spinning
- 153 } }, // 306 while spinning
{ NPCID.PrimeVice, new int[] { 70, 102, 136, 170, 255 } },
{ NPCID.PrimeSaw, new int[] { 70, 102, 136, 170, 255 } },
{ NPCID.PrimeCannon, new int[] { 30, 51, 68, 85, 102 } },
@@ -510,8 +496,8 @@ namespace CalamityMod
{ ModContent.NPCType(), new int[] { 100, 200, 220, 240, 300 } },
{ ModContent.NPCType(), new int[] { 100, 200, 220, 232, 300 } },
- { ModContent.NPCType(), new int[] { 170, 256, 288, 320, 504 } },
- { ModContent.NPCType(), new int[] { 145, 220, 242, 264, 435 } },
+ { ModContent.NPCType(), new int[] { 170, 256, 288, 320, 504 } },
+ { ModContent.NPCType(), new int[] { 145, 220, 242, 264, 435 } },
{ ModContent.NPCType(), new int[] { 240, 360, 396, 432, 720 } },
{ ModContent.NPCType(), new int[] { 175, 260, 288, 316, 525 } },
@@ -649,9 +635,6 @@ namespace CalamityMod
{ new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 60, 120, 148, 176, 264 } },
{ new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 70, 120, 148, 176, 264 } },
{ new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 60, 100, 128, 156, 234 } },
- { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 50, 108, 132, 156, 234 } },
- { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 120, 148, 176, 264 } },
- { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 120, 148, 176, 264 } },
{ new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 60, 100, 120, 140, 210 } },
{ new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 120, 136, 152, 228 } },
@@ -676,9 +659,6 @@ namespace CalamityMod
{ new Tuple(NPCID.SkeletronPrime, ProjectileID.Skull), new int[] { 50, 108, 124, 140, 210 } },
{ new Tuple(NPCID.SkeletronPrime, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } },
{ new Tuple(NPCID.SkeletronPrime, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } },
- { new Tuple(ModContent.NPCType(), ProjectileID.Skull), new int[] { 50, 108, 124, 140, 210 } },
- { new Tuple(ModContent.NPCType(), ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 180, 200, 300 } },
- { new Tuple(ModContent.NPCType(), ProjectileID.FrostBeam), new int[] { 50, 108, 124, 140, 210 } },
{ new Tuple(NPCID.PrimeCannon, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } },
{ new Tuple(NPCID.PrimeCannon, ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 0, 0, 300 } },
{ new Tuple(NPCID.PrimeLaser, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } },
@@ -769,8 +749,8 @@ namespace CalamityMod
{ new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 248, 360 } },
{ new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 35, 50, 50, 0, 0 } },
- { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 268, 420 } },
- { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 200, 300, 332, 364, 600 } },
+ { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 268, 420 } },
+ { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 200, 300, 332, 364, 600 } },
{ new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 150, 264, 288, 312, 450 } }, // Split holy fire does: 113, 198, 216, 234, 338
{ new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 248, 360 } },
diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs
index d3bf603ee5..d39adecaea 100644
--- a/Events/BossRushEvent.cs
+++ b/Events/BossRushEvent.cs
@@ -213,8 +213,7 @@ namespace CalamityMod.Events
{
NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, NPCID.Spazmatism);
NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, NPCID.Retinazer);
- NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, ModContent.NPCType());
- }, permittedNPCs: new int[] { NPCID.Retinazer, ModContent.NPCType() }),
+ }, permittedNPCs: new int[] { NPCID.Retinazer }),
new Boss(ModContent.NPCType(), TimeChangeContext.Day, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }),
@@ -222,7 +221,7 @@ namespace CalamityMod.Events
new Boss(ModContent.NPCType(), TimeChangeContext.Day, permittedNPCs: ModContent.NPCType()),
- new Boss(NPCID.SkeletronPrime, TimeChangeContext.Night, permittedNPCs: new int[] { ModContent.NPCType(), NPCID.PrimeCannon, NPCID.PrimeSaw, NPCID.PrimeVice, NPCID.PrimeLaser, NPCID.Probe }),
+ new Boss(NPCID.SkeletronPrime, TimeChangeContext.Night, permittedNPCs: new int[] { NPCID.PrimeCannon, NPCID.PrimeSaw, NPCID.PrimeVice, NPCID.PrimeLaser }),
new Boss(ModContent.NPCType(), TimeChangeContext.Night, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(),
ModContent.NPCType() }),
@@ -309,7 +308,7 @@ namespace CalamityMod.Events
NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, type);
}, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }),
- new Boss(ModContent.NPCType(), permittedNPCs: new int[] { ModContent.NPCType() }),
+ new Boss(ModContent.NPCType(), permittedNPCs: new int[] { ModContent.NPCType() }),
new Boss(ModContent.NPCType(), TimeChangeContext.Day, type =>
{
diff --git a/ExtraTextures/Bestiary/SlimeGod_Bestiary.png b/ExtraTextures/Bestiary/SlimeGod_Bestiary.png
deleted file mode 100644
index dbe7056e82..0000000000
Binary files a/ExtraTextures/Bestiary/SlimeGod_Bestiary.png and /dev/null differ
diff --git a/ExtraTextures/ChadPrime.png b/ExtraTextures/ChadPrime.png
deleted file mode 100644
index 3bbc5902b0..0000000000
Binary files a/ExtraTextures/ChadPrime.png and /dev/null differ
diff --git a/ExtraTextures/ChadPrimeHeadGlow.png b/ExtraTextures/ChadPrimeHeadGlow.png
deleted file mode 100644
index e8b25ba236..0000000000
Binary files a/ExtraTextures/ChadPrimeHeadGlow.png and /dev/null differ
diff --git a/ExtraTextures/ChadPrime_Head_Boss.png b/ExtraTextures/ChadPrime_Head_Boss.png
deleted file mode 100644
index 313edebc2c..0000000000
Binary files a/ExtraTextures/ChadPrime_Head_Boss.png and /dev/null differ
diff --git a/ExtraTextures/ExtraTextureRefs.cs b/ExtraTextures/ExtraTextureRefs.cs
index bc86cb89a7..a39bd99b7c 100644
--- a/ExtraTextures/ExtraTextureRefs.cs
+++ b/ExtraTextures/ExtraTextureRefs.cs
@@ -19,11 +19,6 @@ namespace CalamityMod.ExtraTextures
public static Asset DestroyerHeadGlowmask;
public static Asset DestroyerBodyGlowmask;
public static Asset DestroyerTailGlowmask;
- public static Asset ProbeGlowmask;
-
- // Master Rev+ Skeletron Prime
- public static Asset ChadPrime;
- public static Asset ChadPrimeEyeGlowmask;
// WoF, These are not "exactly" the ExtraTextures. But
public static Asset WallOfFleshEyeGlowmask;
@@ -44,16 +39,6 @@ namespace CalamityMod.ExtraTextures
public static Asset CircularSmearFire2;
public static Asset CircularSmearFire3;
- // Boss Heads
- // I know it's not exactly a Texture2D but it belongs to ExtraTextures.
- public static int BossHeadIndex_ChadPrime;
-
- public override void Load()
- {
- string chadPrimeIconPath = "CalamityMod/ExtraTextures/ChadPrime_Head_Boss";
- BossHeadIndex_ChadPrime = CalamityMod.Instance.AddBossHeadTexture(chadPrimeIconPath, -1);
- }
-
// TODO: - Every other ExtraTextures Reference could be move in here
public override void OnModLoad()
@@ -62,11 +47,6 @@ namespace CalamityMod.ExtraTextures
DestroyerBodyGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerBodyGlow", AssetRequestMode.AsyncLoad);
DestroyerTailGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerTailGlow", AssetRequestMode.AsyncLoad);
- ProbeGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/ProbeGlow", AssetRequestMode.AsyncLoad);
-
- ChadPrime = ModContent.Request("CalamityMod/ExtraTextures/ChadPrime", AssetRequestMode.AsyncLoad);
- ChadPrimeEyeGlowmask = ModContent.Request("CalamityMod/ExtraTextures/ChadPrimeHeadGlow", AssetRequestMode.AsyncLoad);
-
WallOfFleshEyeGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/WallOfFleshEyeTelegraphGlow", AssetRequestMode.AsyncLoad);
WallOfFleshDemonSickleTexture = ModContent.Request("CalamityMod/Projectiles/Melee/ForbiddenOathbladeProjectile", AssetRequestMode.AsyncLoad);
diff --git a/ExtraTextures/SkeletronPrime2HeadGlow.png b/ExtraTextures/SkeletronPrime2HeadGlow.png
deleted file mode 100644
index 7054e2945d..0000000000
Binary files a/ExtraTextures/SkeletronPrime2HeadGlow.png and /dev/null differ
diff --git a/ExtraTextures/VanillaBossGlowmasks/ProbeGlow.png b/ExtraTextures/VanillaBossGlowmasks/ProbeGlow.png
deleted file mode 100644
index c0105e82e4..0000000000
Binary files a/ExtraTextures/VanillaBossGlowmasks/ProbeGlow.png and /dev/null differ
diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs
index 5018cee4bb..57e23bd6f3 100644
--- a/ILEditing/BalancingILChanges.cs
+++ b/ILEditing/BalancingILChanges.cs
@@ -241,18 +241,7 @@ namespace CalamityMod.ILEditing
}
cursor.Next.Operand = BalancingConstants.SoaringInsigniaRunAccelerationMultiplier;
- // Second: Magiluminescence. Find the check for whether it's equipped for run speeds.
- if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld("hasMagiluminescence")))
- {
- LogFailure("Run Acceleration Nerfs", "Could not locate the Magiluminescence bool.");
- return;
- }
-
- //
- // Don't actually do anything. Magiluminescence is not intended to be nerfed by Calamity.
- //
-
- // Third: Shadow Armor. Find the check for whether it's equipped for run speeds.
+ // Second: Shadow Armor. Find the check for whether it's equipped for run speeds.
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld("shadowArmor")))
{
LogFailure("Run Acceleration Nerfs", "Could not locate the Shadow Armor bool.");
@@ -396,75 +385,27 @@ namespace CalamityMod.ILEditing
private static void PrefixChanges(On_Player.orig_GrantPrefixBenefits orig, Player self, Item item)
{
orig(self, item);
+ // Defense accessory prefixes have slightly scaling defense boosts through progression
+ if (item.prefix >= PrefixID.Hard && item.prefix <= PrefixID.Warding)
+ {
+ if (DownedBossSystem.downedDoG)
+ self.statDefense += 3;
+ else if (NPC.downedMoonlord)
+ self.statDefense += 2;
+ else if (Main.hardMode)
+ self.statDefense += 1;
+ }
// Hard / Guarding / Armored / Warding give 0.25% / 0.5% / 0.75% / 1% DR
if (item.prefix == PrefixID.Hard)
- {
- /* Prehardmode = 1
- * Hardmode = 2
- * Post-Moon Lord = 3
- * Post-DoG = 4
- */
-
- if (DownedBossSystem.downedDoG)
- self.statDefense += 3;
- else if (NPC.downedMoonlord)
- self.statDefense += 2;
- else if (Main.hardMode)
- self.statDefense += 1;
-
self.endurance += 0.0025f;
- }
if (item.prefix == PrefixID.Guarding)
- {
- /* Prehardmode = 2
- * Hardmode = 3
- * Post-Moon Lord = 4
- * Post-DoG = 5
- */
-
- if (DownedBossSystem.downedDoG)
- self.statDefense += 3;
- else if (NPC.downedMoonlord)
- self.statDefense += 2;
- else if (Main.hardMode)
- self.statDefense += 1;
-
self.endurance += 0.005f;
- }
if (item.prefix == PrefixID.Armored)
- {
- /* Prehardmode = 3
- * Hardmode = 4
- * Post-Moon Lord = 5
- * Post-DoG = 6
- */
-
- if (DownedBossSystem.downedDoG)
- self.statDefense += 3;
- else if (NPC.downedMoonlord)
- self.statDefense += 2;
- else if (Main.hardMode)
- self.statDefense += 1;
-
self.endurance += 0.0075f;
- }
if (item.prefix == PrefixID.Warding)
- {
- /* Prehardmode = 4
- * Hardmode = 5
- * Post-Moon Lord = 6
- * Post-DoG = 7
- */
-
- if (DownedBossSystem.downedDoG)
- self.statDefense += 3;
- else if (NPC.downedMoonlord)
- self.statDefense += 2;
- else if (Main.hardMode)
- self.statDefense += 1;
self.endurance += 0.01f;
- }
+ // Lucky prefix increases luck
if (item.prefix == PrefixID.Lucky)
self.Calamity().calamityBonusLuck += 0.05f;
}
@@ -501,7 +442,7 @@ namespace CalamityMod.ILEditing
private static void VanillaBossResistChanges(ILContext il)
{
// This IL edit accomplishes two things:
- // 1. Reduces Expert+ Eater of Worlds' resist to explosives from 80% to 60%.
+ // 1. Reduces Expert+ Eater of Worlds' resist to explosives from 80% to 66%.
// 2. Effectively removes Lunatic Cultist's resistance to homing projectiles.
var cursor = new ILCursor(il);
@@ -514,17 +455,15 @@ namespace CalamityMod.ILEditing
return;
}
}
- if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchDiv()))
+ if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchLdcR4(5f)))
{
LogFailure("Reduce EoW Grenade Resist", "Could not move to the resist factor.");
return;
}
- // Remove the division instruction, then pop the 5 off the stack to destroy it. Replace it with loading a 0.4 and then multiplying by it.
- cursor.Remove();
+ // Pop the 5 off the stack, and replace it with a 3.
cursor.EmitPop();
- cursor.EmitLdcR4(0.4f);
- cursor.EmitMul();
+ cursor.EmitLdcR4(3f);
// Now, move to the Cultist resist which is right below it.
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdsfld(typeof(ProjectileID.Sets), "CultistIsResistantTo")))
diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs
index e8dd980253..72c78c0ed9 100644
--- a/ILEditing/ILChangesLoading.cs
+++ b/ILEditing/ILChangesLoading.cs
@@ -91,9 +91,6 @@ namespace CalamityMod.ILEditing
On_AWorldListItem.GetDifficulty += GetDifficultyOverride;
On_Item.GetShimmered += ShimmerEffectEdits;
On_Player.Teleport += TPOverride;
- On_NPC.SpawnBoss += TripletsSpawnTextOverride;
- On_NPC.DoDeathEvents_BeforeLoot += PreventFoveanatorDefeatMessageIfNotKilledLast;
- On_NPC.DoDeathEvents_CelebrateBossDeath += TripletsDefeatTextOverride;
On_TileDrawing.DrawSingleTile += GlowMaskTileRender;
On_Main.DoUpdate_HandleChat += SpawnPunchCard;
On_Player.PlaceThing_CannonBall += AllowCannonJellyfishUse;
@@ -192,6 +189,7 @@ namespace CalamityMod.ILEditing
// Removal of vanilla stupidity
IL_Player.StatusFromNPC += RemoveExpertBrainRandomDebuffs;
+ IL_NPC.StrikeNPC_HitInfo_bool_bool += LetDetonatingBubblesTakeDamage;
IL_Player.ItemCheck_EmitUseVisuals += MakeMagmaStoneFireGauntletDustToggleable;
IL_Projectile.EmitEnchantmentVisualsAt += MakeMagmaStoneFireGauntletProjectileDustToggleable;
IL_Sandstorm.HasSufficientWind += DecreaseSandstormWindSpeedRequirement;
diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs
index ac861e5df4..611592cad6 100644
--- a/ILEditing/MechanicILChanges.cs
+++ b/ILEditing/MechanicILChanges.cs
@@ -79,7 +79,7 @@ namespace CalamityMod.ILEditing
//private static readonly MethodInfo textureGetValueMethod = typeof(Asset).GetMethod("get_Value", BindingFlags.Public | BindingFlags.Instance);
#region Punch Card Spawning Command
- private static void SpawnPunchCard(Terraria.On_Main.orig_DoUpdate_HandleChat orig)
+ private static void SpawnPunchCard(On_Main.orig_DoUpdate_HandleChat orig)
{
// Any of these conditions should result in normal behaviour
if (!Main.drawingPlayerChat || Main.CurrentInputTextTakerOverride != null || Main.editSign || PlayerInput.UsingGamepad)
@@ -282,7 +282,7 @@ namespace CalamityMod.ILEditing
cursor.Emit(OpCodes.Ldc_I4, 10 - BalancingConstants.ShieldOfCthulhuBonkNoCollideFrames);
}
- private static void ApplyDashKeybind(Terraria.On_Player.orig_DoCommonDashHandle orig, Player self, out int dir, out bool dashing, Player.DashStartAction dashStartAction)
+ private static void ApplyDashKeybind(On_Player.orig_DoCommonDashHandle orig, Player self, out int dir, out bool dashing, Player.DashStartAction dashStartAction)
{
// we feasting multiplayer bugs
if (self.whoAmI != Main.myPlayer)
@@ -334,7 +334,7 @@ namespace CalamityMod.ILEditing
#endregion
#region Allow Empress to Enrage in Boss Rush
- private static bool AllowEmpressToEnrageInBossRush(Terraria.On_NPC.orig_ShouldEmpressBeEnraged orig)
+ private static bool AllowEmpressToEnrageInBossRush(On_NPC.orig_ShouldEmpressBeEnraged orig)
{
if (BossRushEvent.BossRushActive)
return true;
@@ -356,11 +356,11 @@ namespace CalamityMod.ILEditing
orig(self, closestPlayer);
}
- #endregion Prevent Vanilla Bosses From Being Marked as Defeated in Boss Rush
+ #endregion
#region Enabling of Triggered NPC Platform Fallthrough
// Why this isn't a mechanism provided by TML itself or vanilla itself is beyond me.
- private static void AllowTriggeredFallthrough(Terraria.On_NPC.orig_ApplyTileCollision orig, NPC self, bool fall, Vector2 cPosition, int cWidth, int cHeight)
+ private static void AllowTriggeredFallthrough(On_NPC.orig_ApplyTileCollision orig, NPC self, bool fall, Vector2 cPosition, int cWidth, int cHeight)
{
if (self.active && self.type == ModContent.NPCType())
{
@@ -398,7 +398,7 @@ namespace CalamityMod.ILEditing
cursor.Emit(OpCodes.Ret);
}
- private static void AlterTownNPCSpawnRate(Terraria.On_Main.orig_UpdateTime_SpawnTownNPCs orig)
+ private static void AlterTownNPCSpawnRate(On_Main.orig_UpdateTime_SpawnTownNPCs orig)
{
double oldWorldRate = Main.desiredWorldTilesUpdateRate;
Main.desiredWorldTilesUpdateRate *= CalamityServerConfig.Instance.TownNPCSpawnRateMultiplier;
@@ -483,7 +483,7 @@ namespace CalamityMod.ILEditing
#endregion
#region Custom Gate Door Logic
- private static bool OpenDoor_LabDoorOverride(Terraria.On_WorldGen.orig_OpenDoor orig, int i, int j, int direction)
+ private static bool OpenDoor_LabDoorOverride(On_WorldGen.orig_OpenDoor orig, int i, int j, int direction)
{
Tile tile = Main.tile[i, j];
@@ -499,7 +499,7 @@ namespace CalamityMod.ILEditing
return orig(i, j, direction);
}
- private static bool CloseDoor_LabDoorOverride(Terraria.On_WorldGen.orig_CloseDoor orig, int i, int j, bool forced)
+ private static bool CloseDoor_LabDoorOverride(On_WorldGen.orig_CloseDoor orig, int i, int j, bool forced)
{
Tile tile = Main.tile[i, j];
@@ -517,7 +517,7 @@ namespace CalamityMod.ILEditing
#endregion
#region Platform Collision Checks for Grounded Bosses
- private static bool EnableCalamityBossPlatformCollision(Terraria.On_NPC.orig_Collision_DecideFallThroughPlatforms orig, NPC self)
+ private static bool EnableCalamityBossPlatformCollision(On_NPC.orig_Collision_DecideFallThroughPlatforms orig, NPC self)
{
if ((self.type == ModContent.NPCType() || self.type == ModContent.NPCType() || self.type == ModContent.NPCType() ||
self.type == ModContent.NPCType() || self.type == ModContent.NPCType()) &&
@@ -529,7 +529,7 @@ namespace CalamityMod.ILEditing
#endregion
#region Incorporate Enchantments in Item Names
- private static string IncorporateEnchantmentInAffix(Terraria.On_Item.orig_AffixName orig, Item self)
+ private static string IncorporateEnchantmentInAffix(On_Item.orig_AffixName orig, Item self)
{
string result = orig(self);
@@ -545,7 +545,7 @@ namespace CalamityMod.ILEditing
#endregion
#region Apply Projectile Variables Upon Creation
- private static int IncorporateExtraProjectileVariables(Terraria.On_Projectile.orig_NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float orig, IEntitySource spawnSource, float x, float y, float xSpeed, float ySpeed, int type, int damage, float knockback, int owner, float ai0, float ai1, float ai2)
+ private static int IncorporateExtraProjectileVariables(On_Projectile.orig_NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float orig, IEntitySource spawnSource, float x, float y, float xSpeed, float ySpeed, int type, int damage, float knockback, int owner, float ai0, float ai1, float ai2)
{
// This is unfortunately not something that can be done via SetDefaults since owner is set
// after that method is called. Doing it directly when the projectile is spawned appears to be the only reasonable way.
@@ -613,7 +613,7 @@ namespace CalamityMod.ILEditing
#endregion
#region Apply Old Fashioned Damage to Miscellanous Hits
- private static void ApplyOldFashionedDamageToMiscHits(Terraria.On_Player.orig_ApplyDamageToNPC orig, Player self, NPC npc, int damage, float knockback, int direction, bool crit = false, DamageClass? damageType = null, bool damageVariation = false)
+ private static void ApplyOldFashionedDamageToMiscHits(On_Player.orig_ApplyDamageToNPC orig, Player self, NPC npc, int damage, float knockback, int direction, bool crit = false, DamageClass? damageType = null, bool damageVariation = false)
{
if (self.Calamity().oldFashioned)
damage = (int)(damage * OldFashioned.DamageBoostMultiplier);
@@ -699,7 +699,7 @@ namespace CalamityMod.ILEditing
#endregion
#region Fire Cursor Effect for the Calamity Accessory
- private static void UseCoolFireCursorEffect(Terraria.On_Main.orig_DrawCursor orig, Vector2 bonus, bool smart)
+ private static void UseCoolFireCursorEffect(On_Main.orig_DrawCursor orig, Vector2 bonus, bool smart)
{
Player player = Main.LocalPlayer;
@@ -911,7 +911,7 @@ namespace CalamityMod.ILEditing
#endregion
#region General Particle Rendering
- private static void DrawFusableParticles(Terraria.On_Main.orig_SortDrawCacheWorms orig, Main self)
+ private static void DrawFusableParticles(On_Main.orig_SortDrawCacheWorms orig, Main self)
{
DeathAshParticle.DrawAll();
@@ -921,7 +921,7 @@ namespace CalamityMod.ILEditing
orig(self);
}
- private static void DrawForegroundParticles(Terraria.On_Main.orig_DrawInfernoRings orig, Main self)
+ private static void DrawForegroundParticles(On_Main.orig_DrawInfernoRings orig, Main self)
{
GeneralParticleHandler.DrawAllParticles(Main.spriteBatch);
orig(self);
@@ -1624,7 +1624,7 @@ namespace CalamityMod.ILEditing
///
/// Determines if the custom grapple movement should take place or not. Useful for hooks that only do movement tricks in some cases
///
- private static void CustomGrappleMovementCheck(Terraria.On_Player.orig_GrappleMovement orig, Player self)
+ private static void CustomGrappleMovementCheck(On_Player.orig_GrappleMovement orig, Player self)
{
WulfrumPackPlayer mp = self.GetModPlayer();
@@ -1637,7 +1637,7 @@ namespace CalamityMod.ILEditing
///
/// This is called right before the game decides wether or not to update the players velocity based on "real" physics (aka not tongued or hooked or with a pulley)
///
- private static void CustomGrapplePreDefaultMovement(Terraria.On_Player.orig_UpdatePettingAnimal orig, Player self)
+ private static void CustomGrapplePreDefaultMovement(On_Player.orig_UpdatePettingAnimal orig, Player self)
{
orig(self);
@@ -1661,7 +1661,7 @@ namespace CalamityMod.ILEditing
/// Used before the player steps up a half tile. If we don't do that, players that are grappled but don't use hook movement won't be able to go over tiles.
/// The hook cache is reset in PreUpdateMovement
///
- private static void CustomGrapplePreStepUp(Terraria.On_Player.orig_SlopeDownMovement orig, Player self)
+ private static void CustomGrapplePreStepUp(On_Player.orig_SlopeDownMovement orig, Player self)
{
orig(self);
@@ -1675,9 +1675,9 @@ namespace CalamityMod.ILEditing
}
///
- /// This is done to put the hook if it was cacehd during the frame instruction.
+ /// This is done to put the hook if it was cached during the frame instruction.
///
- private static void CustomGrapplePostFrame(Terraria.On_Player.orig_PlayerFrame orig, Player self)
+ private static void CustomGrapplePostFrame(On_Player.orig_PlayerFrame orig, Player self)
{
orig(self);
WulfrumPackPlayer mp = self.GetModPlayer();
@@ -1694,7 +1694,7 @@ namespace CalamityMod.ILEditing
#region Find Calamity Item Dye Shader
- internal static void FindCalamityItemDyeShader(Terraria.On_Player.orig_UpdateItemDye orig, Player self, bool isNotInVanitySlot, bool isSetToHidden, Item armorItem, Item dyeItem)
+ internal static void FindCalamityItemDyeShader(On_Player.orig_UpdateItemDye orig, Player self, bool isNotInVanitySlot, bool isSetToHidden, Item armorItem, Item dyeItem)
{
orig(self, isNotInVanitySlot, isSetToHidden, armorItem, dyeItem);
if (armorItem.type == ModContent.ItemType())
@@ -1727,7 +1727,7 @@ namespace CalamityMod.ILEditing
#endregion
#region Custom world selection difficulties
- internal static void GetDifficultyOverride(Terraria.GameContent.UI.Elements.On_AWorldListItem.orig_GetDifficulty orig, AWorldListItem self, out string expertText, out Color gameModeColor)
+ internal static void GetDifficultyOverride(On_AWorldListItem.orig_GetDifficulty orig, AWorldListItem self, out string expertText, out Color gameModeColor)
{
// Run the original code and pull out the original text and text color
orig(self, out expertText, out gameModeColor);
@@ -1762,7 +1762,7 @@ namespace CalamityMod.ILEditing
#endregion
#region Shimmer effect edits
- public static void ShimmerEffectEdits(Terraria.On_Item.orig_GetShimmered orig, Item self)
+ public static void ShimmerEffectEdits(On_Item.orig_GetShimmered orig, Item self)
{
// Make Plagued Containment Bricks turn into Plagued Nanodroids if shimmered before defeating Golem
if (self.type == ModContent.ItemType())
@@ -1805,7 +1805,7 @@ namespace CalamityMod.ILEditing
#region Block Abyss from Teleportation Potions
- public static void TPOverride(Terraria.On_Player.orig_Teleport orig, Player self, Vector2 newPos, int Style = 0, int extraInfo = 0)
+ public static void TPOverride(On_Player.orig_Teleport orig, Player self, Vector2 newPos, int Style = 0, int extraInfo = 0)
{
// Grab the tile from where the potion wants to teleport
Tile t = CalamityUtils.ParanoidTileRetrieval(newPos.ToTileCoordinates().X, newPos.ToTileCoordinates().Y);
@@ -1849,67 +1849,6 @@ namespace CalamityMod.ILEditing
}
#endregion
- #region Revengeance Master Mode Twins Shenanigans
- public static void TripletsSpawnTextOverride(Terraria.On_NPC.orig_SpawnBoss orig, int x, int y, int type, int targetPlayerIndex)
- {
- if (CalamityWorld.death && type == NPCID.Retinazer)
- {
- int retinazerIndex = NPC.NewNPC(NPC.GetBossSpawnSource(targetPlayerIndex), x, y, type, 1);
- if (retinazerIndex == 200)
- {
- return;
- }
- Main.npc[retinazerIndex].target = targetPlayerIndex;
- Main.npc[retinazerIndex].timeLeft *= 20;
-
- if (Main.dedServ && retinazerIndex < 200)
- {
- NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, retinazerIndex);
- }
-
- AchievementsHelper.CheckMechaMayhem();
-
- CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Status.Boss.TripletsBossText", new Color(175, 75, 255));
- return;
- }
- else
- {
- orig(x, y, type, targetPlayerIndex);
- }
- }
-
- public static void PreventFoveanatorDefeatMessageIfNotKilledLast(On_NPC.orig_DoDeathEvents_BeforeLoot orig, NPC self, Player closestPlayer)
- {
- if (CalamityWorld.death && self.type == ModContent.NPCType() && (NPC.AnyNPCs(NPCID.Spazmatism) || NPC.AnyNPCs(NPCID.Retinazer)))
- {
- self.value = 0f;
- self.boss = false;
- return;
- }
- else
- {
- orig(self, closestPlayer);
- }
- }
-
- public static void TripletsDefeatTextOverride(On_NPC.orig_DoDeathEvents_CelebrateBossDeath orig, NPC self, string typeName)
- {
- bool correctNPCType = self.type == NPCID.Retinazer || self.type == NPCID.Spazmatism || self.type == ModContent.NPCType();
- if (CalamityWorld.death && correctNPCType)
- {
- if (Main.netMode == NetmodeID.SinglePlayer)
- Main.NewText(Language.GetTextValue("Announcement.HasBeenDefeated_Plural", CalamityUtils.GetTextValue("Status.Boss.TripletsDefeatName")), 175, 75, 255);
- else if (Main.dedServ)
- ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasBeenDefeated_Plural", NetworkText.FromKey("Mods.CalamityMod.Status.Boss.TripletsDefeatName")), new Color(175, 75, 255));
- return;
- }
- else
- {
- orig(self, typeName);
- }
- }
- #endregion
-
#region Optimized GlowMask Rendering on Tile
private static void GlowMaskTileRender(On_TileDrawing.orig_DrawSingleTile orig, TileDrawing self, TileDrawInfo drawData, bool solidLayer, int waterStyleOverride, Vector2 screenPosition, Vector2 screenOffset, int tileX, int tileY)
{
@@ -1974,7 +1913,7 @@ namespace CalamityMod.ILEditing
#endregion
#region Allow Cannons to use jellyfish
- public static void AllowCannonJellyfishUse(Terraria.On_Player.orig_PlaceThing_CannonBall orig, Player self)
+ public static void AllowCannonJellyfishUse(On_Player.orig_PlaceThing_CannonBall orig, Player self)
{
// Check if the player is holding a jelly
if (self.HeldItem.type == ModContent.ItemType())
@@ -2085,7 +2024,7 @@ namespace CalamityMod.ILEditing
#endregion
#region Add Stohne to the Jungle
- public static void AddStohne(Terraria.GameContent.Biomes.On_JunglePass.orig_GenerateFinishingTouches orig, JunglePass self, GenerationProgress progress, int oldX, int oldY)
+ public static void AddStohne(On_JunglePass.orig_GenerateFinishingTouches orig, JunglePass self, GenerationProgress progress, int oldX, int oldY)
{
int anchorX = oldX;
int anchorY = oldY;
@@ -2629,7 +2568,7 @@ namespace CalamityMod.ILEditing
#endregion
#region Make Celestial Onion give the Master Mode slot
- public static bool MasterModeCelestialOnionCheck(Terraria.On_Player.orig_IsItemSlotUnlockedAndUsable orig, Player self, int slot)
+ public static bool MasterModeCelestialOnionCheck(On_Player.orig_IsItemSlotUnlockedAndUsable orig, Player self, int slot)
{
if ((slot == 9 || slot == 19) && self.Calamity().extraAccessoryML && !Main.gameMenu)
{
diff --git a/ILEditing/VanillaStupidityFixingILChanges.cs b/ILEditing/VanillaStupidityFixingILChanges.cs
index 80c15173f8..d9298d7598 100644
--- a/ILEditing/VanillaStupidityFixingILChanges.cs
+++ b/ILEditing/VanillaStupidityFixingILChanges.cs
@@ -9,6 +9,7 @@ using CalamityMod.NPCs.AcidRain;
using CalamityMod.NPCs.NormalNPCs;
using CalamityMod.NPCs.TownNPCs;
using CalamityMod.Walls;
+using CalamityMod.World;
using Microsoft.Xna.Framework;
using Mono.Cecil.Cil;
using MonoMod.Cil;
@@ -17,7 +18,7 @@ using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.GameContent.Drawing;
-using Terraria.GameContent.Personalities;
+using Terraria.GameContent.ItemDropRules;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Graphics.Effects;
@@ -153,7 +154,7 @@ namespace CalamityMod.ILEditing
#endregion
#region Prevention of Slime Rain Spawns When Near Bosses
- private static void PreventBossSlimeRainSpawns(Terraria.On_NPC.orig_SlimeRainSpawns orig, int plr)
+ private static void PreventBossSlimeRainSpawns(On_NPC.orig_SlimeRainSpawns orig, int plr)
{
if (!Main.player[plr].Calamity().isNearbyBoss && CalamityServerConfig.Instance.BossZen)
orig(plr);
@@ -174,12 +175,47 @@ namespace CalamityMod.ILEditing
}
// Remove the Expert Mode check, and in its place put a check for the Zenith seed (Get fixed boi).
- // Note from CIT: I originally removed these entirely;
cursor.Emit(OpCodes.Pop);
cursor.Emit(OpCodes.Ldsfld, typeof(Main).GetField("zenithWorld"));
}
#endregion
+ #region Disable Detonating Bubble StrikeNPC Hardcoded Override
+ private static void LetDetonatingBubblesTakeDamage(ILContext il)
+ {
+ // In vanilla's StrikeNPC function, Detonating Bubbles have a hardcoded type check which sets the damage of the strike to 0.
+ // This IL edit disables that type check in Death Mode.
+ var cursor = new ILCursor(il);
+
+ // Go to the point after the check for the Detonating Bubble NPC ID.
+ if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchLdcR8(0.0)))
+ {
+ LogFailure("Let Detonating Bubbles Take Damage in Death", "Could not move after the NPC type check.");
+ return;
+ }
+
+ // Define the label.
+ var label = il.DefineLabel();
+
+ // Add a branch if it is Death Mode.
+ cursor.Emit(OpCodes.Ldsfld, typeof(CalamityWorld).GetField("death"));
+ cursor.Emit(OpCodes.Brtrue, label);
+
+ // Move to the point after Detonating Bubble changes are implemented to place the branch label.
+ if (!cursor.TryGotoNext(MoveType.After, i => i.MatchStfld("dontTakeDamage")))
+ {
+ LogFailure("Let Detonating Bubbles Take Damage in Death", "Could not move to after the Detonating Bubble logic.");
+ return;
+ }
+ if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchLdarg0()))
+ {
+ LogFailure("Let Detonating Bubbles Take Damage in Death", "Could not move to after the Detonating Bubble logic.");
+ return;
+ }
+ cursor.MarkLabel(label);
+ }
+ #endregion
+
#region Make Meteorite Explodable
private static void MakeMeteoriteExplodable(ILContext il)
{
@@ -271,13 +307,15 @@ namespace CalamityMod.ILEditing
LogFailure("Prevent Fossil Shattering", "Could not locate the Desert Fossil Tile ID variable.");
return;
}
+
+ // Remove this value and replace it with a large number that will never be a valid tile ID.
cursor.Remove();
- cursor.Emit(OpCodes.Ldc_I4, TileID.PixelBox); // Change to Pixel Box because it cannot be obtained in-game without cheating.
+ cursor.Emit(OpCodes.Ldc_I4, 40000);
}
#endregion
#region Remove Hellforge Pickaxe Requirement
- private static int RemoveHellforgePickaxeRequirement(Terraria.On_Player.orig_GetPickaxeDamage orig, Player self, int x, int y, int pickPower, int hitBufferIndex, Tile tileTarget)
+ private static int RemoveHellforgePickaxeRequirement(On_Player.orig_GetPickaxeDamage orig, Player self, int x, int y, int pickPower, int hitBufferIndex, Tile tileTarget)
{
if (tileTarget.TileType == TileID.Hellforge)
pickPower = 65;
@@ -295,10 +333,6 @@ namespace CalamityMod.ILEditing
}
#endregion
- #region Fix Chlorophyte Crystal Attacking Where it Shouldn't
- // TODO -- Finish this
- #endregion Fix Chlorophyte Crystal Attacking Where it Shouldn't
-
#region Prevent UFO Mount from Dismounting in Water
private static void PreventUFODismountInWater(ILContext il)
{
@@ -331,7 +365,7 @@ namespace CalamityMod.ILEditing
#endregion Prevent UFO Mount from Dismounting in Water
#region Color Blighted Gel
- private static void ColorBlightedGel(Terraria.GameContent.ItemDropRules.On_CommonCode.orig_ModifyItemDropFromNPC orig, NPC npc, int itemIndex)
+ private static void ColorBlightedGel(On_CommonCode.orig_ModifyItemDropFromNPC orig, NPC npc, int itemIndex)
{
orig(npc, itemIndex);
@@ -357,7 +391,7 @@ namespace CalamityMod.ILEditing
#endregion Color Blighted Gel
#region Improve Angler Quest Rewards
- private static void ImproveAnglerRewards(Terraria.On_Player.orig_GetAnglerReward orig, Player self, NPC angler, int questItemType)
+ private static void ImproveAnglerRewards(On_Player.orig_GetAnglerReward orig, Player self, NPC angler, int questItemType)
{
orig(self, angler, questItemType);
@@ -1046,7 +1080,7 @@ namespace CalamityMod.ILEditing
var cursor = new ILCursor(il);
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld("magmaStone"))) // Flag for if Magma Stone is equipped. Fire Gauntlet also uses this.
{
- LogFailure("Make Magma Stone & Fire Gauntlet Dust Toggleable", "Could not locate the magma stone variable.");
+ LogFailure("Make Magma Stone & Fire Gauntlet Dust Toggleable", "Could not locate the Magma Stone variable.");
return;
}
// Load the player itself onto the stack so that it becomes an argument for the following delegate.
@@ -1091,7 +1125,7 @@ namespace CalamityMod.ILEditing
}
// Remove the instruction and replace with 1 (true). This effectively removes the requirement for defeating Plantera.
- // The only requirements for summoning Golems with Power Cells are now: 1) Golem is not alive, and 2) The world is in Hardmode.
+ // The only requirements for summoning Golem with Power Cells are now: 1) Golem is not alive, and 2) The world is in Hardmode.
cursor.EmitPop();
cursor.Emit(OpCodes.Ldc_I4_1);
}
@@ -1144,7 +1178,7 @@ namespace CalamityMod.ILEditing
return;
}
- // branch is used for exit condition. So setting ble.s opcode to nop will remove the condition
+ // Branch is used for exit condition. So setting ble.s opcode to nop will remove the condition
cursor.Prev.OpCode = OpCodes.Nop;
// After that we pop NPC.damage and 0 from stack
@@ -1188,7 +1222,7 @@ namespace CalamityMod.ILEditing
}*/
#endregion
- #region Allow disabling gravity swap visual && allow gravity keybind
+ #region Allow Disabling Gravity Swap Visual and Allow Gravity Keybind
private static void DelayGravity(On_Player.orig_UpdateControlHolds orig, Player Player)
{
var cplay = Player.Calamity();
diff --git a/ILEditing/WorldgenILChanges.cs b/ILEditing/WorldgenILChanges.cs
index 419d4c19f9..ea5a4dd8d7 100644
--- a/ILEditing/WorldgenILChanges.cs
+++ b/ILEditing/WorldgenILChanges.cs
@@ -8,6 +8,7 @@ using MonoMod.Cil;
using Terraria;
using Terraria.GameContent.UI.States;
using Terraria.ID;
+using Terraria.IO;
using Terraria.WorldBuilding;
namespace CalamityMod.ILEditing
@@ -66,7 +67,7 @@ namespace CalamityMod.ILEditing
#endregion Fixing of Living Tree/Sulphurous Sea Interactions
#region Removal of Hardmode Ore Generation from Evil Altars
- private static void PreventSmashAltarCode(Terraria.On_WorldGen.orig_SmashAltar orig, int i, int j)
+ private static void PreventSmashAltarCode(On_WorldGen.orig_SmashAltar orig, int i, int j)
{
if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework)
return;
@@ -135,10 +136,8 @@ namespace CalamityMod.ILEditing
return;
}
- // Pop original value off.
+ // Pop original value off. Push '2' to the stack.
c.Emit(OpCodes.Pop);
-
- // Push '2' to the stack.
c.Emit(OpCodes.Ldc_I4_2);
// OBJECTIVE 2
@@ -181,13 +180,11 @@ namespace CalamityMod.ILEditing
// Emit our new string "Mods.CalamityMod.UI.SmallWorldWarning".
c.Emit(OpCodes.Ldstr, "Mods.CalamityMod.UI.SmallWorldWarning");
-
-
}
#endregion
#region Clear temporary modded tiles
- private static void ClearModdedTempTiles(Terraria.IO.On_WorldFile.orig_ClearTempTiles orig)
+ private static void ClearModdedTempTiles(On_WorldFile.orig_ClearTempTiles orig)
{
orig();
diff --git a/Items/Accessories/ShieldoftheOcean.cs b/Items/Accessories/ShieldoftheOcean.cs
index cacb484ead..798f0c4020 100644
--- a/Items/Accessories/ShieldoftheOcean.cs
+++ b/Items/Accessories/ShieldoftheOcean.cs
@@ -73,8 +73,10 @@ namespace CalamityMod.Items.Accessories
continue;
// Inflict Riptide on empowered parries.
+ //Doze - I gave all parry accessories long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time, and the scarcity of using the parry
+ //Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds
if (empowered)
- npc.AddBuff(ModContent.BuffType(), 300);
+ npc.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(15));
// If the NPC can be moved, violently shove them away. Make them susceptible to fall damage on empowered parries.
// Otherwise, simply deal a large amount of damage to them if empowered.
diff --git a/Items/Accessories/Vanity/LucisSight.cs b/Items/Accessories/Vanity/LucisSight.cs
new file mode 100644
index 0000000000..0afdc9724c
--- /dev/null
+++ b/Items/Accessories/Vanity/LucisSight.cs
@@ -0,0 +1,32 @@
+using Terraria;
+using Terraria.ID;
+using Terraria.ModLoader;
+
+namespace CalamityMod.Items.Accessories.Vanity
+{
+ [AutoloadEquip(EquipType.Face)]
+ public class LucisSight : ModItem, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Items.Accessories";
+
+ public override void SetStaticDefaults()
+ {
+ if (!Main.dedServ)
+ {
+ int equipSlot = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Face);
+ ArmorIDs.Face.Sets.DrawInFaceUnderHairLayer[equipSlot] = true;
+ }
+ }
+
+ public override void SetDefaults()
+ {
+ Item.width = 28;
+ Item.height = 18;
+ Item.value = Item.buyPrice(gold: 10); // Sold by Steampunker
+ Item.rare = ItemRarityID.Pink;
+ Item.accessory = true;
+ Item.vanity = true;
+ Item.Calamity().donorItem = true;
+ }
+ }
+}
diff --git a/Items/Accessories/Vanity/LucisSight.png b/Items/Accessories/Vanity/LucisSight.png
new file mode 100644
index 0000000000..47aa49c9a1
Binary files /dev/null and b/Items/Accessories/Vanity/LucisSight.png differ
diff --git a/Items/Accessories/Vanity/LucisSight_Face.png b/Items/Accessories/Vanity/LucisSight_Face.png
new file mode 100644
index 0000000000..b56c28cf6e
Binary files /dev/null and b/Items/Accessories/Vanity/LucisSight_Face.png differ
diff --git a/Items/Accessories/Vanity/XyksBlessingBlue.cs b/Items/Accessories/Vanity/XyksBlessingBlue.cs
index 7df7a6b928..0ebe73db84 100644
--- a/Items/Accessories/Vanity/XyksBlessingBlue.cs
+++ b/Items/Accessories/Vanity/XyksBlessingBlue.cs
@@ -22,7 +22,6 @@ namespace CalamityMod.Items.Accessories.Vanity
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Projectiles/InvisibleProj", EquipType.Wings, this);
}
}
-
public override void SetStaticDefaults()
{
if (Main.dedServ)
@@ -44,17 +43,15 @@ namespace CalamityMod.Items.Accessories.Vanity
Item.width = 36;
Item.height = 34;
Item.accessory = true;
- Item.consumable = true;
Item.vanity = true;
Item.rare = ModContent.RarityType();
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
Item.Calamity().devItem = true;
}
public override bool CanRightClick() => true;
-
- public override void ModifyItemLoot(ItemLoot itemLoot)
+ public override void RightClick(Player player)
{
- itemLoot.Add(ModContent.ItemType());
+ player.PutItemInInventoryFromItemUsage(ModContent.ItemType(), 1);
}
public override void UpdateVanity(Player player)
{
diff --git a/Items/Accessories/Vanity/XyksBlessingOrange.cs b/Items/Accessories/Vanity/XyksBlessingOrange.cs
index 29f2d69f89..9e20a49940 100644
--- a/Items/Accessories/Vanity/XyksBlessingOrange.cs
+++ b/Items/Accessories/Vanity/XyksBlessingOrange.cs
@@ -44,17 +44,15 @@ namespace CalamityMod.Items.Accessories.Vanity
Item.width = 36;
Item.height = 34;
Item.accessory = true;
- Item.consumable = true;
Item.vanity = true;
Item.rare = ModContent.RarityType();
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
Item.Calamity().devItem = true;
}
public override bool CanRightClick() => true;
-
- public override void ModifyItemLoot(ItemLoot itemLoot)
+ public override void RightClick(Player player)
{
- itemLoot.Add(ModContent.ItemType());
+ player.PutItemInInventoryFromItemUsage(ModContent.ItemType(), 1);
}
public override void UpdateVanity(Player player)
{
diff --git a/Items/Accessories/WarbanneroftheRighteous.cs b/Items/Accessories/WarbanneroftheRighteous.cs
index cd6a16258e..04e2b9b36d 100644
--- a/Items/Accessories/WarbanneroftheRighteous.cs
+++ b/Items/Accessories/WarbanneroftheRighteous.cs
@@ -82,7 +82,7 @@ namespace CalamityMod.Items.Accessories
float generousHitboxWidth = Math.Max(nPC.Hitbox.Width / 2f, nPC.Hitbox.Height / 2f) + 100; // Adds some room so max bonus isnt when you're ON the hitbox
float intensity = Utils.Remap(Utils.Distance(player.Center, nPC.Center), MaxDistance + generousHitboxWidth, generousHitboxWidth, 1, 3, true); // We have to have this seperate from bonus, otherwise all effected enemies take damage based on the closest enemy
- if (Utils.Distance(nPC.Center, player.Center) < MaxDistance + generousHitboxWidth && (nPC.IsAnEnemy(true, true, false) || nPC.type == ModContent.NPCType()) && nPC.CanBeChasedBy())
+ if (Utils.Distance(nPC.Center, player.Center) < MaxDistance + generousHitboxWidth && (nPC.IsAnEnemy(true, true, false) || nPC.type == ModContent.NPCType()) && !nPC.dontTakeDamage)
{
float minDamageMult = 0.35f;
int maxTargets = 25;
diff --git a/Items/Armor/Aerospec/AerospecHat.cs b/Items/Armor/Aerospec/AerospecHeadMagic.cs
similarity index 95%
rename from Items/Armor/Aerospec/AerospecHat.cs
rename to Items/Armor/Aerospec/AerospecHeadMagic.cs
index 5b81c6206c..084d548d20 100644
--- a/Items/Armor/Aerospec/AerospecHat.cs
+++ b/Items/Armor/Aerospec/AerospecHeadMagic.cs
@@ -7,7 +7,8 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Armor.Aerospec
{
[AutoloadEquip(EquipType.Head)]
- public class AerospecHat : ModItem, ILocalizedModType
+ [LegacyName("AerospecHat")]
+ public class AerospecHeadMagic : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Armor.PreHardmode";
public override void SetDefaults()
diff --git a/Items/Armor/Aerospec/AerospecHat.png b/Items/Armor/Aerospec/AerospecHeadMagic.png
similarity index 100%
rename from Items/Armor/Aerospec/AerospecHat.png
rename to Items/Armor/Aerospec/AerospecHeadMagic.png
diff --git a/Items/Armor/Aerospec/AerospecHat_Head.png b/Items/Armor/Aerospec/AerospecHeadMagic_Head.png
similarity index 100%
rename from Items/Armor/Aerospec/AerospecHat_Head.png
rename to Items/Armor/Aerospec/AerospecHeadMagic_Head.png
diff --git a/Items/Armor/Aerospec/AerospecHelm.cs b/Items/Armor/Aerospec/AerospecHeadMelee.cs
similarity index 94%
rename from Items/Armor/Aerospec/AerospecHelm.cs
rename to Items/Armor/Aerospec/AerospecHeadMelee.cs
index 0a8e39c35d..1d7b21e058 100644
--- a/Items/Armor/Aerospec/AerospecHelm.cs
+++ b/Items/Armor/Aerospec/AerospecHeadMelee.cs
@@ -7,7 +7,8 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Armor.Aerospec
{
[AutoloadEquip(EquipType.Head)]
- public class AerospecHelm : ModItem, ILocalizedModType
+ [LegacyName("AerospecHelm")]
+ public class AerospecHeadMelee : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Armor.PreHardmode";
public override void SetDefaults()
@@ -52,7 +53,7 @@ namespace CalamityMod.Items.Armor.Aerospec
AddIngredient(ItemID.SunplateBlock, 3).
AddIngredient(ItemID.Feather).
AddTile(TileID.Anvils).
- SortBeforeFirstRecipesOf(ModContent.ItemType()).
+ SortBeforeFirstRecipesOf(ModContent.ItemType()).
Register();
}
}
diff --git a/Items/Armor/Aerospec/AerospecHelm.png b/Items/Armor/Aerospec/AerospecHeadMelee.png
similarity index 100%
rename from Items/Armor/Aerospec/AerospecHelm.png
rename to Items/Armor/Aerospec/AerospecHeadMelee.png
diff --git a/Items/Armor/Aerospec/AerospecHelm_Head.png b/Items/Armor/Aerospec/AerospecHeadMelee_Head.png
similarity index 100%
rename from Items/Armor/Aerospec/AerospecHelm_Head.png
rename to Items/Armor/Aerospec/AerospecHeadMelee_Head.png
diff --git a/Items/Armor/Aerospec/AerospecHood.cs b/Items/Armor/Aerospec/AerospecHeadRanged.cs
similarity index 94%
rename from Items/Armor/Aerospec/AerospecHood.cs
rename to Items/Armor/Aerospec/AerospecHeadRanged.cs
index 6b41319026..01fc45869d 100644
--- a/Items/Armor/Aerospec/AerospecHood.cs
+++ b/Items/Armor/Aerospec/AerospecHeadRanged.cs
@@ -7,7 +7,8 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Armor.Aerospec
{
[AutoloadEquip(EquipType.Head)]
- public class AerospecHood : ModItem, ILocalizedModType
+ [LegacyName("AerospecHood")]
+ public class AerospecHeadRanged : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Armor.PreHardmode";
public override void SetDefaults()
@@ -51,7 +52,7 @@ namespace CalamityMod.Items.Armor.Aerospec
AddIngredient(ItemID.SunplateBlock, 3).
AddIngredient(ItemID.Feather).
AddTile(TileID.Anvils).
- SortAfterFirstRecipesOf(ModContent.ItemType()).
+ SortAfterFirstRecipesOf(ModContent.ItemType()).
Register();
}
}
diff --git a/Items/Armor/Aerospec/AerospecHood.png b/Items/Armor/Aerospec/AerospecHeadRanged.png
similarity index 100%
rename from Items/Armor/Aerospec/AerospecHood.png
rename to Items/Armor/Aerospec/AerospecHeadRanged.png
diff --git a/Items/Armor/Aerospec/AerospecHood_Head.png b/Items/Armor/Aerospec/AerospecHeadRanged_Head.png
similarity index 100%
rename from Items/Armor/Aerospec/AerospecHood_Head.png
rename to Items/Armor/Aerospec/AerospecHeadRanged_Head.png
diff --git a/Items/Armor/Aerospec/AerospecHeadgear.cs b/Items/Armor/Aerospec/AerospecHeadRogue.cs
similarity index 94%
rename from Items/Armor/Aerospec/AerospecHeadgear.cs
rename to Items/Armor/Aerospec/AerospecHeadRogue.cs
index e4e6d096d3..be4a49a3d4 100644
--- a/Items/Armor/Aerospec/AerospecHeadgear.cs
+++ b/Items/Armor/Aerospec/AerospecHeadRogue.cs
@@ -7,7 +7,8 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Armor.Aerospec
{
[AutoloadEquip(EquipType.Head)]
- public class AerospecHeadgear : ModItem, ILocalizedModType
+ [LegacyName("AerospecHeadgear")]
+ public class AerospecHeadRogue : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Armor.PreHardmode";
public override void SetStaticDefaults()
@@ -60,7 +61,7 @@ namespace CalamityMod.Items.Armor.Aerospec
AddIngredient(ItemID.SunplateBlock, 3).
AddIngredient(ItemID.Feather).
AddTile(TileID.Anvils).
- SortAfterFirstRecipesOf(ModContent.ItemType()).
+ SortAfterFirstRecipesOf(ModContent.ItemType()).
Register();
}
}
diff --git a/Items/Armor/Aerospec/AerospecHeadgear.png b/Items/Armor/Aerospec/AerospecHeadRogue.png
similarity index 100%
rename from Items/Armor/Aerospec/AerospecHeadgear.png
rename to Items/Armor/Aerospec/AerospecHeadRogue.png
diff --git a/Items/Armor/Aerospec/AerospecHeadgear_Head.png b/Items/Armor/Aerospec/AerospecHeadRogue_Head.png
similarity index 100%
rename from Items/Armor/Aerospec/AerospecHeadgear_Head.png
rename to Items/Armor/Aerospec/AerospecHeadRogue_Head.png
diff --git a/Items/Armor/Aerospec/AerospecHelmet.cs b/Items/Armor/Aerospec/AerospecHeadSummon.cs
similarity index 96%
rename from Items/Armor/Aerospec/AerospecHelmet.cs
rename to Items/Armor/Aerospec/AerospecHeadSummon.cs
index 2ab7b3fd09..b54a722b93 100644
--- a/Items/Armor/Aerospec/AerospecHelmet.cs
+++ b/Items/Armor/Aerospec/AerospecHeadSummon.cs
@@ -10,7 +10,8 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Armor.Aerospec
{
[AutoloadEquip(EquipType.Head)]
- public class AerospecHelmet : ModItem, ILocalizedModType
+ [LegacyName("AerospecHelmet")]
+ public class AerospecHeadSummon : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Armor.PreHardmode";
public static int ValkyrieDamage = 20;
@@ -74,7 +75,7 @@ namespace CalamityMod.Items.Armor.Aerospec
AddIngredient(ItemID.SunplateBlock, 3).
AddIngredient(ItemID.Feather).
AddTile(TileID.Anvils).
- SortBeforeFirstRecipesOf(ModContent.ItemType()).
+ SortBeforeFirstRecipesOf(ModContent.ItemType()).
Register();
}
}
diff --git a/Items/Armor/Aerospec/AerospecHelmet.png b/Items/Armor/Aerospec/AerospecHeadSummon.png
similarity index 100%
rename from Items/Armor/Aerospec/AerospecHelmet.png
rename to Items/Armor/Aerospec/AerospecHeadSummon.png
diff --git a/Items/Armor/Aerospec/AerospecHelmet_Head.png b/Items/Armor/Aerospec/AerospecHeadSummon_Head.png
similarity index 100%
rename from Items/Armor/Aerospec/AerospecHelmet_Head.png
rename to Items/Armor/Aerospec/AerospecHeadSummon_Head.png
diff --git a/Items/Armor/Auric/AuricTeslaWireHemmedVisage.cs b/Items/Armor/Auric/AuricTeslaHeadMagic.cs
similarity index 96%
rename from Items/Armor/Auric/AuricTeslaWireHemmedVisage.cs
rename to Items/Armor/Auric/AuricTeslaHeadMagic.cs
index aa367ba49a..6c932422b7 100644
--- a/Items/Armor/Auric/AuricTeslaWireHemmedVisage.cs
+++ b/Items/Armor/Auric/AuricTeslaHeadMagic.cs
@@ -12,7 +12,8 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Armor.Auric
{
[AutoloadEquip(EquipType.Head)]
- public class AuricTeslaWireHemmedVisage : ModItem, ILocalizedModType
+ [LegacyName("AuricTeslaWireHemmedVisage")]
+ public class AuricTeslaHeadMagic : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
public override void SetDefaults()
@@ -95,7 +96,7 @@ namespace CalamityMod.Items.Armor.Auric
AddIngredient().
AddIngredient(12).
AddTile().
- SortBeforeFirstRecipesOf(ModContent.ItemType()).
+ SortBeforeFirstRecipesOf(ModContent.ItemType()).
Register();
}
}
diff --git a/Items/Armor/Auric/AuricTeslaWireHemmedVisage.png b/Items/Armor/Auric/AuricTeslaHeadMagic.png
similarity index 100%
rename from Items/Armor/Auric/AuricTeslaWireHemmedVisage.png
rename to Items/Armor/Auric/AuricTeslaHeadMagic.png
diff --git a/Items/Armor/Auric/AuricTeslaWireHemmedVisage_Head.png b/Items/Armor/Auric/AuricTeslaHeadMagic_Head.png
similarity index 100%
rename from Items/Armor/Auric/AuricTeslaWireHemmedVisage_Head.png
rename to Items/Armor/Auric/AuricTeslaHeadMagic_Head.png
diff --git a/Items/Armor/Auric/AuricTeslaRoyalHelm.cs b/Items/Armor/Auric/AuricTeslaHeadMelee.cs
similarity index 97%
rename from Items/Armor/Auric/AuricTeslaRoyalHelm.cs
rename to Items/Armor/Auric/AuricTeslaHeadMelee.cs
index ce0b3e9aae..bb5430ef7a 100644
--- a/Items/Armor/Auric/AuricTeslaRoyalHelm.cs
+++ b/Items/Armor/Auric/AuricTeslaHeadMelee.cs
@@ -15,7 +15,8 @@ namespace CalamityMod.Items.Armor.Auric
{
[AutoloadEquip(EquipType.Head)]
[LegacyName("AuricTeslaHelm")]
- public class AuricTeslaRoyalHelm : ModItem, ILocalizedModType
+ [LegacyName("AuricTeslaRoyalHelm")]
+ public class AuricTeslaHeadMelee : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
public override void SetDefaults()
@@ -103,7 +104,7 @@ namespace CalamityMod.Items.Armor.Auric
AddIngredient().
AddIngredient(12).
AddTile().
- SortBeforeFirstRecipesOf(ModContent.ItemType()).
+ SortBeforeFirstRecipesOf(ModContent.ItemType()).
Register();
}
}
diff --git a/Items/Armor/Auric/AuricTeslaRoyalHelm.png b/Items/Armor/Auric/AuricTeslaHeadMelee.png
similarity index 100%
rename from Items/Armor/Auric/AuricTeslaRoyalHelm.png
rename to Items/Armor/Auric/AuricTeslaHeadMelee.png
diff --git a/Items/Armor/Auric/AuricTeslaRoyalHelm_Head.png b/Items/Armor/Auric/AuricTeslaHeadMelee_Head.png
similarity index 100%
rename from Items/Armor/Auric/AuricTeslaRoyalHelm_Head.png
rename to Items/Armor/Auric/AuricTeslaHeadMelee_Head.png
diff --git a/Items/Armor/Auric/AuricTeslaHoodedFacemask.cs b/Items/Armor/Auric/AuricTeslaHeadRanged.cs
similarity index 96%
rename from Items/Armor/Auric/AuricTeslaHoodedFacemask.cs
rename to Items/Armor/Auric/AuricTeslaHeadRanged.cs
index 061585b631..27e6e250ed 100644
--- a/Items/Armor/Auric/AuricTeslaHoodedFacemask.cs
+++ b/Items/Armor/Auric/AuricTeslaHeadRanged.cs
@@ -13,7 +13,8 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Armor.Auric
{
[AutoloadEquip(EquipType.Head)]
- public class AuricTeslaHoodedFacemask : ModItem, ILocalizedModType
+ [LegacyName("AuricTeslaHoodedFacemask")]
+ public class AuricTeslaHeadRanged : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
public override void SetDefaults()
@@ -98,7 +99,7 @@ namespace CalamityMod.Items.Armor.Auric
AddIngredient().
AddIngredient(12).
AddTile().
- SortBeforeFirstRecipesOf(ModContent.ItemType()).
+ SortBeforeFirstRecipesOf(ModContent.ItemType()).
Register();
}
}
diff --git a/Items/Armor/Auric/AuricTeslaHoodedFacemask.png b/Items/Armor/Auric/AuricTeslaHeadRanged.png
similarity index 100%
rename from Items/Armor/Auric/AuricTeslaHoodedFacemask.png
rename to Items/Armor/Auric/AuricTeslaHeadRanged.png
diff --git a/Items/Armor/Auric/AuricTeslaHoodedFacemask_Head.png b/Items/Armor/Auric/AuricTeslaHeadRanged_Head.png
similarity index 100%
rename from Items/Armor/Auric/AuricTeslaHoodedFacemask_Head.png
rename to Items/Armor/Auric/AuricTeslaHeadRanged_Head.png
diff --git a/Items/Armor/Auric/AuricTeslaPlumedHelm.cs b/Items/Armor/Auric/AuricTeslaHeadRogue.cs
similarity index 97%
rename from Items/Armor/Auric/AuricTeslaPlumedHelm.cs
rename to Items/Armor/Auric/AuricTeslaHeadRogue.cs
index e7bc207d37..bab13f54b6 100644
--- a/Items/Armor/Auric/AuricTeslaPlumedHelm.cs
+++ b/Items/Armor/Auric/AuricTeslaHeadRogue.cs
@@ -13,7 +13,8 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Armor.Auric
{
[AutoloadEquip(EquipType.Head)]
- public class AuricTeslaPlumedHelm : ModItem, ILocalizedModType
+ [LegacyName("AuricTeslaPlumedHelm")]
+ public class AuricTeslaHeadRogue : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
public override void SetDefaults()
diff --git a/Items/Armor/Auric/AuricTeslaPlumedHelm.png b/Items/Armor/Auric/AuricTeslaHeadRogue.png
similarity index 100%
rename from Items/Armor/Auric/AuricTeslaPlumedHelm.png
rename to Items/Armor/Auric/AuricTeslaHeadRogue.png
diff --git a/Items/Armor/Auric/AuricTeslaPlumedHelm_Head.png b/Items/Armor/Auric/AuricTeslaHeadRogue_Head.png
similarity index 100%
rename from Items/Armor/Auric/AuricTeslaPlumedHelm_Head.png
rename to Items/Armor/Auric/AuricTeslaHeadRogue_Head.png
diff --git a/Items/Armor/Auric/AuricTeslaSpaceHelmet.cs b/Items/Armor/Auric/AuricTeslaHeadSummon.cs
similarity index 96%
rename from Items/Armor/Auric/AuricTeslaSpaceHelmet.cs
rename to Items/Armor/Auric/AuricTeslaHeadSummon.cs
index b15fc1f6fd..44c56a3720 100644
--- a/Items/Armor/Auric/AuricTeslaSpaceHelmet.cs
+++ b/Items/Armor/Auric/AuricTeslaHeadSummon.cs
@@ -12,7 +12,8 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Armor.Auric
{
[AutoloadEquip(EquipType.Head)]
- public class AuricTeslaSpaceHelmet : ModItem, ILocalizedModType
+ [LegacyName("AuricTeslaSpaceHelmet")]
+ public class AuricTeslaHeadSummon : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
public override void SetDefaults()
@@ -95,7 +96,7 @@ namespace CalamityMod.Items.Armor.Auric
AddIngredient().
AddIngredient(12).
AddTile().
- SortBeforeFirstRecipesOf(ModContent.ItemType()).
+ SortBeforeFirstRecipesOf(ModContent.ItemType()).
Register();
}
}
diff --git a/Items/Armor/Auric/AuricTeslaSpaceHelmet.png b/Items/Armor/Auric/AuricTeslaHeadSummon.png
similarity index 100%
rename from Items/Armor/Auric/AuricTeslaSpaceHelmet.png
rename to Items/Armor/Auric/AuricTeslaHeadSummon.png
diff --git a/Items/Armor/Auric/AuricTeslaSpaceHelmet_Head.png b/Items/Armor/Auric/AuricTeslaHeadSummon_Head.png
similarity index 100%
rename from Items/Armor/Auric/AuricTeslaSpaceHelmet_Head.png
rename to Items/Armor/Auric/AuricTeslaHeadSummon_Head.png
diff --git a/Items/Armor/Vanity/LucisBoots.cs b/Items/Armor/Vanity/LucisBoots.cs
new file mode 100644
index 0000000000..da9ce01a0c
--- /dev/null
+++ b/Items/Armor/Vanity/LucisBoots.cs
@@ -0,0 +1,22 @@
+using Terraria;
+using Terraria.ID;
+using Terraria.ModLoader;
+
+namespace CalamityMod.Items.Armor.Vanity
+{
+ [AutoloadEquip(EquipType.Legs)]
+ public class LucisBoots : ModItem, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Items.Armor.Vanity";
+
+ public override void SetDefaults()
+ {
+ Item.width = 28;
+ Item.height = 20;
+ Item.value = Item.buyPrice(gold: 10); // Sold by Steampunker
+ Item.rare = ItemRarityID.Pink;
+ Item.vanity = true;
+ Item.Calamity().donorItem = true;
+ }
+ }
+}
diff --git a/Items/Armor/Vanity/LucisBoots.png b/Items/Armor/Vanity/LucisBoots.png
new file mode 100644
index 0000000000..2b91e15ca4
Binary files /dev/null and b/Items/Armor/Vanity/LucisBoots.png differ
diff --git a/Items/Armor/Vanity/LucisBoots_Legs.png b/Items/Armor/Vanity/LucisBoots_Legs.png
new file mode 100644
index 0000000000..cb73585b17
Binary files /dev/null and b/Items/Armor/Vanity/LucisBoots_Legs.png differ
diff --git a/Items/Armor/Vanity/LucisHairstyle.cs b/Items/Armor/Vanity/LucisHairstyle.cs
new file mode 100644
index 0000000000..6af1251c18
--- /dev/null
+++ b/Items/Armor/Vanity/LucisHairstyle.cs
@@ -0,0 +1,22 @@
+using Terraria;
+using Terraria.ID;
+using Terraria.ModLoader;
+
+namespace CalamityMod.Items.Armor.Vanity
+{
+ [AutoloadEquip(EquipType.Head)]
+ public class LucisHairstyle : ModItem, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Items.Armor.Vanity";
+
+ public override void SetDefaults()
+ {
+ Item.width = 28;
+ Item.height = 20;
+ Item.value = Item.buyPrice(gold: 10); // Sold by Steampunker
+ Item.rare = ItemRarityID.Pink;
+ Item.vanity = true;
+ Item.Calamity().donorItem = true; // Donor: xAqult (Sprites made by Gote)
+ }
+ }
+}
diff --git a/Items/Armor/Vanity/LucisHairstyle.png b/Items/Armor/Vanity/LucisHairstyle.png
new file mode 100644
index 0000000000..5808d53012
Binary files /dev/null and b/Items/Armor/Vanity/LucisHairstyle.png differ
diff --git a/Items/Armor/Vanity/LucisHairstyle_Head.png b/Items/Armor/Vanity/LucisHairstyle_Head.png
new file mode 100644
index 0000000000..682ad154ba
Binary files /dev/null and b/Items/Armor/Vanity/LucisHairstyle_Head.png differ
diff --git a/Items/Armor/Vanity/LucisMilitaryUniform.cs b/Items/Armor/Vanity/LucisMilitaryUniform.cs
new file mode 100644
index 0000000000..c2fde13007
--- /dev/null
+++ b/Items/Armor/Vanity/LucisMilitaryUniform.cs
@@ -0,0 +1,22 @@
+using Terraria;
+using Terraria.ID;
+using Terraria.ModLoader;
+
+namespace CalamityMod.Items.Armor.Vanity
+{
+ [AutoloadEquip(EquipType.Body)]
+ public class LucisMilitaryUniform : ModItem, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Items.Armor.Vanity";
+
+ public override void SetDefaults()
+ {
+ Item.width = 26;
+ Item.height = 20;
+ Item.value = Item.buyPrice(gold: 10); // Sold by Steampunker
+ Item.rare = ItemRarityID.Pink;
+ Item.vanity = true;
+ Item.Calamity().donorItem = true;
+ }
+ }
+}
diff --git a/Items/Armor/Vanity/LucisMilitaryUniform.png b/Items/Armor/Vanity/LucisMilitaryUniform.png
new file mode 100644
index 0000000000..d8017d98d0
Binary files /dev/null and b/Items/Armor/Vanity/LucisMilitaryUniform.png differ
diff --git a/Items/Armor/Vanity/LucisMilitaryUniform_Body.png b/Items/Armor/Vanity/LucisMilitaryUniform_Body.png
new file mode 100644
index 0000000000..dcdee4ba2a
Binary files /dev/null and b/Items/Armor/Vanity/LucisMilitaryUniform_Body.png differ
diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs
index 2a35ce43b4..860b98a4e5 100644
--- a/Items/CalamityGlobalItemTooltip.cs
+++ b/Items/CalamityGlobalItemTooltip.cs
@@ -6,6 +6,7 @@ using CalamityMod.Balancing;
using CalamityMod.CustomRecipes;
using CalamityMod.DataStructures;
using CalamityMod.Items.Accessories;
+using CalamityMod.Items.Accessories.Vanity;
using CalamityMod.Items.Armor.Demonshade;
using CalamityMod.Items.PermanentBoosters;
using CalamityMod.Items.Tools;
@@ -289,7 +290,7 @@ namespace CalamityMod.Items
#region Rarity Coloration
private static void ApplyRarityColor(Item item, TooltipLine nameLine)
{
- if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType())
+ if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType())
nameLine.OverrideColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB);
// Developer items
@@ -1633,6 +1634,128 @@ namespace CalamityMod.Items
#region Enchanted Rarity Text Drawing
public override bool PreDrawTooltipLine(Item item, DrawableTooltipLine line, ref int yOffset)
{
+ if (line.Name == "ItemName" && line.Mod == "Terraria" && item.type == ModContent.ItemType())
+ {
+ Color rarityColor = Color.White;
+ Vector2 basePosition = new Vector2(line.X, line.Y);
+
+ float rate = Main.GlobalTimeWrappedHourly * 6;
+ List eColors = new List()
+ {
+ Color.DodgerBlue,
+ Color.Cyan,
+ Color.RoyalBlue
+ };
+ int colorIndex = (int)(rate / 2 % eColors.Count);
+ Color currentColor = eColors[colorIndex];
+ Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
+ Color usedColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
+
+ Vector2 backScale = line.BaseScale;
+ Color backColor = usedColor;
+
+ Main.spriteBatch.End();
+ Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, Main.UIScaleMatrix);
+
+ int draws = 20;
+ for (int i = 0; i < draws; i++)
+ {
+ Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / 20f).ToRotationVector2() * (3.5f);
+ ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, backPosition, backColor, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread);
+ }
+ Texture2D texture = ModContent.Request("CalamityMod/Particles/BloomCircle").Value;
+ Texture2D square = ModContent.Request("CalamityMod/Particles/BloomRing").Value;
+
+ Vector2 drawPosition = basePosition;
+ Color drawColor = backColor;
+ Vector2 rotationPoint = texture.Size() * 0.5f;
+ int length = line.Text.Length;
+ for (int i = 0; i < 8; i++)
+ {
+ Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 23 + Vector2.UnitX * (i % 2 == 0 ? -10 * i : 10 * i), null, drawColor, (MathHelper.PiOver2), rotationPoint, new Vector2(0.3f - 0.02f * i, 1 + 0.35f * i) * 0.3f * Main.rand.NextFloat(0.9f, 1f), SpriteEffects.None);
+ }
+ for (int i = 0; i < 10; i++)
+ {
+ float sine = (float)Math.Sin(Main.GlobalTimeWrappedHourly * (0 + i * 0.8f) / MathHelper.Pi);
+ float sine2 = (float)Math.Sin(Main.GlobalTimeWrappedHourly * (5) / MathHelper.Pi);
+ float squareSine = (float)Math.Sin(i * 2.5f / MathHelper.Pi);
+ float clockSine = (float)Math.Sin((float)Math.Pow(Utils.GetLerpValue(0, 110, ((int)(Main.GlobalTimeWrappedHourly * (60 + i * 2)) % 120)), 5));
+ Vector2 weirdPos = Vector2.UnitX * 53 * i * (Utils.GetLerpValue(20, 0, i, true)) + Vector2.UnitY * -23 * squareSine * sine2 + new Vector2(5, 10);
+ for (int t = 0; t < 3; t++)
+ Main.EntitySpriteDraw(square, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), 0, square.Size() * 0.5f, (1.2f - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
+ for (int t = 0; t < 3; t++)
+ Main.EntitySpriteDraw(texture, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), 0, texture.Size() * 0.5f, (0.65f - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
+ }
+
+ Main.spriteBatch.End();
+ Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Main.UIScaleMatrix);
+
+ // Draw the front text as usual.
+ ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, basePosition, rarityColor, line.Rotation, line.Origin, line.BaseScale, line.MaxWidth, line.Spread);
+
+ return false;
+ }
+ if (line.Name == "ItemName" && line.Mod == "Terraria" && item.type == ModContent.ItemType())
+ {
+ Color rarityColor = Color.White;
+ Vector2 basePosition = new Vector2(line.X, line.Y);
+
+ float rate = Main.GlobalTimeWrappedHourly * 6;
+ List eColors = new List()
+ {
+ new Color(248, 117, 52),
+ Color.Gold,
+ Color.Orange
+ };
+ int colorIndex = (int)(rate / 2 % eColors.Count);
+ Color currentColor = eColors[colorIndex];
+ Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
+ Color usedColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
+
+ Vector2 backScale = line.BaseScale;
+ Color backColor = usedColor;
+
+ Main.spriteBatch.End();
+ Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, Main.UIScaleMatrix);
+
+ int draws = 20;
+ for (int i = 0; i < draws; i++)
+ {
+ Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / 20f).ToRotationVector2() * (3.5f);
+ ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, backPosition, backColor, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread);
+ }
+ Texture2D texture = ModContent.Request("CalamityMod/Particles/BloomCircle").Value;
+ Texture2D texture2 = ModContent.Request("CalamityMod/Particles/SquareRotated").Value;
+ Texture2D square = ModContent.Request("CalamityMod/Particles/GlowSquareParticleThick").Value;
+
+ Vector2 drawPosition = basePosition;
+ Color drawColor = backColor;
+ Vector2 rotationPoint = texture.Size() * 0.5f;
+ int length = line.Text.Length;
+ for (int i = 0; i < 8; i++)
+ {
+ Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 23 + Vector2.UnitX * (i % 2 == 0 ? -10 * i : 10 * i), null, drawColor, (MathHelper.PiOver2), rotationPoint, new Vector2(0.3f - 0.02f * i, 1 + 0.35f * i) * 0.3f * Main.rand.NextFloat(0.9f, 1f), SpriteEffects.None);
+ }
+ for (int i = 0; i < 10; i++)
+ {
+ float sine = (float)Math.Sin(Main.GlobalTimeWrappedHourly * (0 + i * 0.8f) / MathHelper.Pi);
+ float squareSine = (float)Math.Sin(i * 2.5f / MathHelper.Pi);
+ float clockSine = (float)Math.Sin((float)Math.Pow(Utils.GetLerpValue(0, 110, ((int)(Main.GlobalTimeWrappedHourly * (60 + i * 2)) % 120)), 5));
+ Vector2 weirdPos = Vector2.UnitX * 53 * i * (Utils.GetLerpValue(20, 0, i, true)) + Vector2.UnitY * 23 * squareSine + Vector2.UnitY * 5.5f * sine + new Vector2(5, 10);
+ for (int t = 0; t < 3; t++)
+ Main.EntitySpriteDraw(square, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), clockSine * MathHelper.PiOver2 + MathHelper.PiOver4, square.Size() * 0.5f, (1 - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
+ for (int t = 0; t < 3; t++)
+ Main.EntitySpriteDraw(texture2, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), clockSine * MathHelper.PiOver2, texture2.Size() * 0.5f, (0.6f - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
+ }
+
+ Main.spriteBatch.End();
+ Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Main.UIScaleMatrix);
+
+ // Draw the front text as usual.
+ ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, basePosition, rarityColor, line.Rotation, line.Origin, line.BaseScale, line.MaxWidth, line.Spread);
+
+ return false;
+ }
// Special enchantment line color.
if (line.Name == "ItemName" && line.Mod == "Terraria" && item.IsEnchanted())
{
@@ -1659,6 +1782,64 @@ namespace CalamityMod.Items
return false;
}
+
+ if (line.Name == "ItemName" && line.Mod == "Terraria" && item.type == ModContent.ItemType())
+ {
+ Color rarityColor = Color.White;
+ Vector2 basePosition = new Vector2(line.X, line.Y);
+
+ float rate = Main.GlobalTimeWrappedHourly * 29;
+ List eColors = new List()
+ {
+ Color.PaleVioletRed,
+ Color.Coral,
+ Color.Khaki,
+ Color.PaleGreen,
+ Color.Turquoise,
+ Color.Violet
+ };
+
+ int colorIndex = (int)(rate / 2 % eColors.Count);
+ Color currentColor = eColors[colorIndex];
+ Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
+ Color usedColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
+
+
+ float sine = (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3 / MathHelper.Pi);
+ sine = (float)Math.Pow(MathHelper.Lerp(sine, 0, 0.35f), 5);
+ Vector2 backScale = line.BaseScale;
+ Color backColor = usedColor;
+ Vector2 shake = Main.rand.NextVector2Circular(15, 15) * sine;
+
+ Main.spriteBatch.End();
+ Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, Main.UIScaleMatrix);
+
+ int draws = 20;
+ for (int i = 0; i < draws; i++)
+ {
+ shake = Main.rand.NextVector2Circular(15, 15) * sine;
+ Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / 20f).ToRotationVector2() * (5 + 0.5f * sine);
+ ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, shake * 4 + backPosition, backColor, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread);
+ }
+ Texture2D texture = ModContent.Request("CalamityMod/Particles/BloomCircle").Value;
+
+ Vector2 drawPosition = basePosition;
+ Color drawColor = backColor;
+ Vector2 rotationPoint = texture.Size() * 0.5f;
+ for (int i = 0; i < 6; i++)
+ {
+ int length = line.Text.Length;
+ Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 10 + Vector2.UnitX * (i % 2 == 0 ? -7 * i : 7 * i), null, drawColor, (MathHelper.PiOver2), rotationPoint, new Vector2(1 - 0.05f * i * (1 + 0.2f * -sine), 1 + 0.75f * i * (1 + 0.2f * sine) * 1f) * 0.3f * Main.rand.NextFloat(0.9f, 1f), SpriteEffects.None);
+ }
+
+ Main.spriteBatch.End();
+ Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Main.UIScaleMatrix);
+
+ // Draw the front text as usual.
+ ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, shake + basePosition, rarityColor, line.Rotation, line.Origin, line.BaseScale, line.MaxWidth, line.Spread);
+
+ return false;
+ }
return true;
}
#endregion
diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs
index 6352984b55..c70800232f 100644
--- a/Items/CalamityGlobalItemTweaks.cs
+++ b/Items/CalamityGlobalItemTweaks.cs
@@ -333,106 +333,99 @@ namespace CalamityMod.Items
#region CATEGORY 3: Tool Balancing
{ ItemID.AcornAxe, Do(AxePower(100)) }, // Axe of Regrowth
- { ItemID.AdamantiteChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), UseTimeExact(4), TileBoostExact(+0), DamageExact(75)) },
- { ItemID.AdamantiteDrill, Do(TrueMeleeNoSpeed, PickPower(180), UseTimeExact(4), TileBoostExact(+1), DamageExact(32)) },
- { ItemID.AdamantitePickaxe, Do(PickPower(180), UseTimeExact(8), TileBoostExact(+1)) },
+ { ItemID.AdamantiteChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), TileBoostExact(+0), DamageExact(75)) },
+ { ItemID.AdamantiteDrill, Do(TrueMeleeNoSpeed, TileBoostExact(+1), DamageExact(32)) },
+ { ItemID.AdamantitePickaxe, Do(TileBoostExact(+1)) },
{ ItemID.AdamantiteWaraxe, Do(AxePower(160), UseTimeExact(10), TileBoostExact(+1)) },
- { ItemID.BloodLustCluster, Do(AxePower(100), UseTimeExact(13), TileBoostExact(+0)) },
- { ItemID.BonePickaxe, Do(PickPower(55), UseTimeExact(6)) },
- { ItemID.BorealWoodHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) },
- { ItemID.ButchersChainsaw, Do(TrueMeleeNoSpeed, AxePower(150), UseTimeExact(3), TileBoostExact(+0)) },
+ { ItemID.BloodLustCluster, Do(AxePower(100), UseTimeExact(13)) },
+ { ItemID.BonePickaxe, Do(UseTimeExact(6)) },
+ { ItemID.BorealWoodHammer, Do(HammerPower(25), UseTimeExact(11)) },
+ { ItemID.ButchersChainsaw, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+0)) },
{ ItemID.CactusPickaxe, Do(PickPower(34), UseTimeExact(9)) },
- { ItemID.CnadyCanePickaxe, Do(PickPower(55), UseTimeExact(9), TileBoostExact(+1)) }, // Candy Cane Pickaxe
- { ItemID.ChlorophyteChainsaw, Do(TrueMeleeNoSpeed, AxePower(120), UseTimeExact(3), TileBoostExact(+0), DamageExact(112)) },
- { ItemID.ChlorophyteDrill, Do(TrueMeleeNoSpeed, PickPower(200), UseTimeExact(4), TileBoostExact(+2), DamageExact(43)) },
- { ItemID.ChlorophyteGreataxe, Do(AxePower(165), UseTimeExact(7), TileBoostExact(+2)) },
- { ItemID.ChlorophyteJackhammer, Do(TrueMeleeNoSpeed, HammerPower(90), UseTimeExact(5), TileBoostExact(+0)) },
- { ItemID.ChlorophytePickaxe, Do(PickPower(200), UseTimeExact(7), TileBoostExact(+2)) },
- { ItemID.ChlorophyteWarhammer, Do(HammerPower(90), UseTimeExact(8), TileBoostExact(+2)) },
- { ItemID.CobaltChainsaw, Do(TrueMeleeNoSpeed, AxePower(70), UseTimeExact(4), TileBoostExact(-1), DamageExact(51)) },
+ { ItemID.CnadyCanePickaxe, Do(UseTimeExact(9), TileBoostExact(+1)) }, // Candy Cane Pickaxe
+ { ItemID.ChlorophyteChainsaw, Do(TrueMeleeNoSpeed, AxePower(120), UseTimeExact(3), DamageExact(112)) },
+ { ItemID.ChlorophyteDrill, Do(TrueMeleeNoSpeed, TileBoostExact(+2), DamageExact(43)) },
+ { ItemID.ChlorophyteGreataxe, Do(AxePower(165), TileBoostExact(+2)) },
+ { ItemID.ChlorophyteJackhammer, Do(TrueMeleeNoSpeed, UseTimeExact(5)) },
+ { ItemID.ChlorophytePickaxe, Do(TileBoostExact(+2)) },
+ { ItemID.ChlorophyteWarhammer, Do(UseTimeExact(8), TileBoostExact(+2)) },
+ { ItemID.CobaltChainsaw, Do(TrueMeleeNoSpeed, UseTimeExact(4), DamageExact(51)) },
{ ItemID.CobaltDrill, Do(TrueMeleeNoSpeed, PickPower(130), UseTimeExact(5), DamageExact(21)) },
{ ItemID.CobaltPickaxe, Do(PickPower(130), UseTimeExact(9)) },
- { ItemID.CobaltWaraxe, Do(AxePower(125), UseTimeExact(12), TileBoostExact(+0)) },
+ { ItemID.CobaltWaraxe, Do(AxePower(125), UseTimeExact(12)) },
{ ItemID.CopperAxe, Do(AxePower(50), UseTimeExact(16), TileBoostExact(+0)) },
- { ItemID.CopperHammer, Do(HammerPower(35), UseTimeExact(12), TileBoostExact(+0)) },
- { ItemID.CopperPickaxe, Do(PickPower(35), UseTimeExact(10), TileBoostExact(+0)) },
- { ItemID.DeathbringerPickaxe, Do(PickPower(70), UseTimeExact(10)) },
- { ItemID.Drax, Do(TrueMeleeNoSpeed, PickPower(200), AxePower(110), UseTimeExact(4), TileBoostExact(+1), DamageExact(80)) },
- { ItemID.EbonwoodHammer, Do(HammerPower(25), UseTimeExact(9), TileBoostExact(+0)) },
- { ItemID.FleshGrinder, Do(HammerPower(70), UseTimeExact(13), TileBoostExact(+0)) },
- { ItemID.GoldAxe, Do(AxePower(80), UseTimeExact(14), TileBoostExact(+0)) },
- { ItemID.GoldHammer, Do(HammerPower(60), UseTimeExact(9), TileBoostExact(+0)) },
- { ItemID.GoldPickaxe, Do(PickPower(55), UseTimeExact(9)) },
- { ItemID.Hammush, Do(HammerPower(85), UseTimeExact(10), TileBoostExact(+1)) },
- { ItemID.IronAxe, Do(AxePower(60), UseTimeExact(15), TileBoostExact(+0)) },
- { ItemID.IronHammer, Do(HammerPower(45), UseTimeExact(11), TileBoostExact(+0)) },
- { ItemID.IronPickaxe, Do(PickPower(40), UseTimeExact(8)) },
+ { ItemID.CopperHammer, Do(UseTimeExact(12), TileBoostExact(+0)) },
+ { ItemID.CopperPickaxe, Do(UseTimeExact(10), TileBoostExact(+0)) },
+ { ItemID.DeathbringerPickaxe, Do(UseTimeExact(10)) },
+ { ItemID.Drax, Do(TrueMeleeNoSpeed, TileBoostExact(+1), DamageExact(80)) },
+ { ItemID.EbonwoodHammer, Do(HammerPower(25), UseTimeExact(9)) },
+ { ItemID.FleshGrinder, Do(HammerPower(70), UseTimeExact(13)) },
+ { ItemID.GoldAxe, Do(AxePower(80), UseTimeExact(14)) },
+ { ItemID.GoldHammer, Do(HammerPower(60), UseTimeExact(9)) },
+ { ItemID.GoldPickaxe, Do(UseTimeExact(9)) },
+ { ItemID.Hammush, Do(UseTimeExact(10), TileBoostExact(+1)) },
+ { ItemID.IronAxe, Do(AxePower(60), UseTimeExact(15)) },
+ { ItemID.IronHammer, Do(HammerPower(45), UseTimeExact(11)) },
+ { ItemID.IronPickaxe, Do(UseTimeExact(8)) },
{ ItemID.LaserDrill, Do(PickPower(220), AxePower(120), UseTimeExact(4), DamageExact(54)) },
- { ItemID.LeadAxe, Do(AxePower(60), UseTimeExact(15), TileBoostExact(+0)) },
- { ItemID.LeadHammer, Do(HammerPower(45), UseTimeExact(11), TileBoostExact(+0)) },
+ { ItemID.LeadAxe, Do(AxePower(60), UseTimeExact(15)) },
+ { ItemID.LeadHammer, Do(HammerPower(45), UseTimeExact(11)) },
{ ItemID.LeadPickaxe, Do(PickPower(40), UseTimeExact(8)) },
- { ItemID.LucyTheAxe, Do(AxePower(150), UseExact(13), TileBoostExact(+1)) },
- { ItemID.LunarHamaxeNebula, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) },
- { ItemID.LunarHamaxeSolar, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) },
- { ItemID.LunarHamaxeStardust, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) },
- { ItemID.LunarHamaxeVortex, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) },
- { ItemID.MeteorHamaxe, Do(HammerPower(70), AxePower(100), UseTimeExact(16), TileBoostExact(+0)) },
- { ItemID.MoltenHamaxe, Do(HammerPower(75), AxePower(125), UseTimeExact(14), TileBoostExact(+0)) },
- { ItemID.MoltenPickaxe, Do(PickPower(100), UseTimeExact(10)) },
- { ItemID.MythrilChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), TileBoostExact(-1), DamageExact(63)) },
+ { ItemID.LucyTheAxe, Do(UseExact(13), TileBoostExact(+1)) },
+ { ItemID.LunarHamaxeNebula, Do(AxePower(175), UseTimeExact(5)) },
+ { ItemID.LunarHamaxeSolar, Do(AxePower(175), UseTimeExact(5)) },
+ { ItemID.LunarHamaxeStardust, Do(AxePower(175), UseTimeExact(5)) },
+ { ItemID.LunarHamaxeVortex, Do(AxePower(175), UseTimeExact(5)) },
+ { ItemID.MeteorHamaxe, Do(HammerPower(70)) },
+ { ItemID.MoltenHamaxe, Do(HammerPower(75), AxePower(125)) },
+ { ItemID.MoltenPickaxe, Do(UseTimeExact(10)) },
+ { ItemID.MythrilChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), DamageExact(63)) },
{ ItemID.MythrilDrill, Do(TrueMeleeNoSpeed, PickPower(160), UseTimeExact(4), DamageExact(26)) },
{ ItemID.MythrilPickaxe, Do(PickPower(160), UseTimeExact(8)) },
- { ItemID.MythrilWaraxe, Do(AxePower(140), UseTimeExact(11), TileBoostExact(+0)) },
- { ItemID.NebulaDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
- { ItemID.NebulaPickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) },
+ { ItemID.MythrilWaraxe, Do(AxePower(140), UseTimeExact(11)) },
+ { ItemID.NebulaDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
{ ItemID.NightmarePickaxe, Do(PickPower(66), UseTimeExact(9)) },
- { ItemID.OrichalcumChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), TileBoostExact(-1), DamageExact(63)) },
+ { ItemID.OrichalcumChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), DamageExact(63)) },
{ ItemID.OrichalcumDrill, Do(TrueMeleeNoSpeed, PickPower(160), UseTimeExact(4), DamageExact(26)) },
{ ItemID.OrichalcumPickaxe, Do(PickPower(160), UseTimeExact(8)) },
- { ItemID.OrichalcumWaraxe, Do(AxePower(140), UseTimeExact(11), TileBoostExact(+0)) },
- { ItemID.PalladiumChainsaw, Do(TrueMeleeNoSpeed, AxePower(70), UseTimeExact(4), TileBoostExact(-1), DamageExact(51)) },
- { ItemID.PalladiumDrill, Do(TrueMeleeNoSpeed, PickPower(130), UseTimeExact(5), DamageExact(21)) },
- { ItemID.PalladiumPickaxe, Do(PickPower(130), UseTimeExact(9)) },
- { ItemID.PalladiumWaraxe, Do(AxePower(125), UseTimeExact(12), TileBoostExact(+0)) },
- { ItemID.PalmWoodHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) },
- { ItemID.PearlwoodHammer, Do(HammerPower(25), UseTimeExact(4), UseAnimationExact(20), DamageExact(36), TileBoostExact(+0)) },
- { ItemID.PickaxeAxe, Do(PickPower(200), AxePower(110), UseTimeExact(7), TileBoostExact(+1)) },
- { ItemID.Picksaw, Do(PickPower(210), AxePower(125), UseTimeExact(6), TileBoostExact(+1)) },
- { ItemID.PlatinumAxe, Do(AxePower(80), UseTimeExact(14), TileBoostExact(+0)) },
- { ItemID.PlatinumHammer, Do(HammerPower(60), UseTimeExact(9), TileBoostExact(+0)) },
+ { ItemID.OrichalcumWaraxe, Do(AxePower(140), UseTimeExact(11)) },
+ { ItemID.PalladiumChainsaw, Do(TrueMeleeNoSpeed, AxePower(70), UseTimeExact(4), DamageExact(51)) },
+ { ItemID.PalladiumDrill, Do(TrueMeleeNoSpeed, UseTimeExact(5), DamageExact(21)) },
+ { ItemID.PalladiumPickaxe, Do(UseTimeExact(9)) },
+ { ItemID.PalladiumWaraxe, Do(AxePower(125)) },
+ { ItemID.PalmWoodHammer, Do(HammerPower(25), UseTimeExact(11)) },
+ { ItemID.PearlwoodHammer, Do(HammerPower(25), UseTimeExact(4), UseAnimationExact(20), DamageExact(36)) },
+ { ItemID.PickaxeAxe, Do(TileBoostExact(+1)) },
+ { ItemID.PlatinumAxe, Do(AxePower(80), UseTimeExact(14)) },
+ { ItemID.PlatinumHammer, Do(HammerPower(60), UseTimeExact(9)) },
{ ItemID.PlatinumPickaxe, Do(PickPower(55), UseTimeExact(9)) },
- { ItemID.Pwnhammer, Do(HammerPower(80), UseTimeExact(11), TileBoostExact(+1)) },
+ { ItemID.Pwnhammer, Do(UseTimeExact(11), TileBoostExact(+1)) },
{ ItemID.ReaverShark, Do(PickPower(65), UseTimeExact(16)) },
- { ItemID.RichMahoganyHammer, Do(HammerPower(25), UseTimeExact(10), TileBoostExact(+0)) },
- { ItemID.Rockfish, Do(HammerPower(50), UseTimeExact(10), TileBoostExact(+0)) },
- { ItemID.SawtoothShark, Do(TrueMeleeNoSpeed, AxePower(45), UseTimeExact(4), TileBoostExact(-1)) },
- { ItemID.ShadewoodHammer, Do(HammerPower(25), UseTimeExact(9), TileBoostExact(+0)) },
- { ItemID.ShroomiteDiggingClaw, Do(PickPower(200), AxePower(125), UseTimeExact(4), TileBoostExact(-1)) },
- { ItemID.SilverAxe, Do(AxePower(70), UseTimeExact(14), TileBoostExact(+0)) },
- { ItemID.SilverHammer, Do(HammerPower(55), UseTimeExact(10), TileBoostExact(+0)) },
- { ItemID.SilverPickaxe, Do(PickPower(50), UseTimeExact(11)) },
- { ItemID.SolarFlareDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
- { ItemID.SolarFlarePickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) },
- { ItemID.SpectreHamaxe, Do(HammerPower(90), AxePower(170), TileBoostExact(+4)) },
- { ItemID.SpectrePickaxe, Do(PickPower(200), TileBoostExact(+4)) },
- { ItemID.StardustDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
- { ItemID.StardustPickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) },
- { ItemID.TheAxe, Do(HammerPower(100), AxePower(175), UseTimeExact(7), TileBoostExact(+1)) },
- { ItemID.TheBreaker, Do(HammerPower(70), UseTimeExact(13), TileBoostExact(+0)) },
- { ItemID.TinAxe, Do(AxePower(50), UseTimeExact(16), TileBoostExact(+0)) },
- { ItemID.TinHammer, Do(HammerPower(35), UseTimeExact(12), TileBoostExact(+0)) },
- { ItemID.TinPickaxe, Do(PickPower(35), UseTimeExact(10), TileBoostExact(+0)) },
- { ItemID.TitaniumChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), UseTimeExact(4), TileBoostExact(+0), DamageExact(75)) },
- { ItemID.TitaniumDrill, Do(TrueMeleeNoSpeed, PickPower(180), UseTimeExact(4), TileBoostExact(+1), DamageExact(32)) },
+ { ItemID.RichMahoganyHammer, Do(HammerPower(25), UseTimeExact(10)) },
+ { ItemID.Rockfish, Do(HammerPower(50), UseTimeExact(10)) },
+ { ItemID.SawtoothShark, Do(TrueMeleeNoSpeed, AxePower(45)) },
+ { ItemID.ShadewoodHammer, Do(HammerPower(25), UseTimeExact(9)) },
+ { ItemID.SilverAxe, Do(AxePower(70), UseTimeExact(14)) },
+ { ItemID.SilverHammer, Do(HammerPower(55), UseTimeExact(10)) },
+ { ItemID.SilverPickaxe, Do(PickPower(50)) },
+ { ItemID.SolarFlareDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
+ { ItemID.SpectreHamaxe, Do(AxePower(170), TileBoostExact(+4)) },
+ { ItemID.SpectrePickaxe, Do(TileBoostExact(+4)) },
+ { ItemID.StardustDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
+ { ItemID.TheBreaker, Do(HammerPower(70), UseTimeExact(13)) },
+ { ItemID.TinAxe, Do(AxePower(50), UseTimeExact(16)) },
+ { ItemID.TinHammer, Do(HammerPower(35), UseTimeExact(12)) },
+ { ItemID.TinPickaxe, Do(UseTimeExact(10)) },
+ { ItemID.TitaniumChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), TileBoostExact(+0), DamageExact(75)) },
+ { ItemID.TitaniumDrill, Do(TrueMeleeNoSpeed, PickPower(180), TileBoostExact(+1), DamageExact(32)) },
{ ItemID.TitaniumPickaxe, Do(PickPower(180), UseTimeExact(8), TileBoostExact(+1)) },
{ ItemID.TitaniumWaraxe, Do(AxePower(160), UseTimeExact(10), TileBoostExact(+1)) },
- { ItemID.TungstenAxe, Do(AxePower(70), UseTimeExact(14), TileBoostExact(+0)) },
- { ItemID.TungstenHammer, Do(HammerPower(55), UseTimeExact(10), TileBoostExact(+0)) },
- { ItemID.TungstenPickaxe, Do(PickPower(50), UseTimeExact(11)) },
- { ItemID.VortexDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
- { ItemID.VortexPickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) },
- { ItemID.WarAxeoftheNight, Do(AxePower(100), UseTimeExact(13), TileBoostExact(+0)) },
- { ItemID.WoodenHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) },
+ { ItemID.TungstenAxe, Do(AxePower(70), UseTimeExact(14)) },
+ { ItemID.TungstenHammer, Do(HammerPower(55), UseTimeExact(10)) },
+ { ItemID.TungstenPickaxe, Do(UseTimeExact(11)) },
+ { ItemID.VortexDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
+ { ItemID.WarAxeoftheNight, Do(AxePower(100), UseTimeExact(13)) },
+ { ItemID.WoodenHammer, Do(UseTimeExact(11), TileBoostExact(+0)) },
#endregion
#region CATEGORY 4: True Melee support
diff --git a/Items/DisgustingMeat.cs b/Items/DisgustingMeat.cs
new file mode 100644
index 0000000000..9a635b1bec
--- /dev/null
+++ b/Items/DisgustingMeat.cs
@@ -0,0 +1,95 @@
+using CalamityMod.CalPlayer;
+using CalamityMod.Items.PermanentBoosters;
+using Terraria;
+using Terraria.ID;
+using Terraria.ModLoader;
+
+namespace CalamityMod.Items
+{
+ public class DisgustingMeat : ModItem, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Items.Misc";
+
+ public override void SetDefaults()
+ {
+ Item.DefaultToFood(32, 30, 0, 0);
+ Item.value = 0;
+ Item.UseSound = SoundID.NPCDeath13;
+ Item.maxStack = 1;
+ Item.consumable = false;
+ }
+
+ public override bool AltFunctionUse(Player player) => true;
+ public override bool? UseItem(Player player)
+ {
+ if (player.ItemTimeIsZero)
+ {
+ var calPlayer = player.Calamity();
+ if (player.altFunctionUse == 2)
+ {
+ TryDropBoosterItem(player, ref calPlayer.rageBoostOne, ModContent.ItemType());
+ TryDropBoosterItem(player, ref calPlayer.rageBoostTwo, ModContent.ItemType());
+ TryDropBoosterItem(player, ref calPlayer.rageBoostThree, ModContent.ItemType());
+ TryDropBoosterItem(player, ref calPlayer.adrenalineBoostOne, ModContent.ItemType());
+ TryDropBoosterItem(player, ref calPlayer.adrenalineBoostTwo, ModContent.ItemType());
+ TryDropBoosterItem(player, ref calPlayer.adrenalineBoostThree, ModContent.ItemType());
+ TryDropBoosterItem(player, ref calPlayer.nimbleBounderBoost, ModContent.ItemType());
+ }
+ else
+ {
+ if (calPlayer.sTangerine || calPlayer.mFruit || calPlayer.tCloudberry || calPlayer.sStrawberry)
+ {
+ TryDropBoosterItem(player, ref calPlayer.sTangerine, ModContent.ItemType());
+ TryDropBoosterItem(player, ref calPlayer.mFruit, ModContent.ItemType());
+ TryDropBoosterItem(player, ref calPlayer.tCloudberry, ModContent.ItemType());
+ TryDropBoosterItem(player, ref calPlayer.sStrawberry, ModContent.ItemType());
+ }
+ else
+ {
+ for (int i = 0; i < player.ConsumedLifeFruit; i++)
+ {
+ int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.LifeFruit);
+ Main.item[drop].noGrabDelay = 100;
+ }
+ player.ConsumedLifeFruit = 0;
+ for (int j = 0; j < player.ConsumedLifeCrystals; j++)
+ {
+ int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.LifeCrystal);
+ Main.item[drop].noGrabDelay = 100;
+ }
+ player.ConsumedLifeCrystals = 0;
+ }
+
+ if (calPlayer.cShard || calPlayer.eCore || calPlayer.pHeart)
+ {
+ TryDropBoosterItem(player, ref calPlayer.cShard, ModContent.ItemType());
+ TryDropBoosterItem(player, ref calPlayer.eCore, ModContent.ItemType());
+ TryDropBoosterItem(player, ref calPlayer.pHeart, ModContent.ItemType());
+ }
+ else
+ {
+ for (int k = 0; k < player.ConsumedManaCrystals; k++)
+ {
+ int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.ManaCrystal);
+ Main.item[drop].noGrabDelay = 100;
+ }
+ player.ConsumedManaCrystals = 0;
+ }
+ }
+ return true;
+ }
+
+ return null;
+ }
+
+ private static void TryDropBoosterItem(Player player, ref bool condition, int itemType)
+ {
+ if (condition)
+ {
+ condition = false;
+ int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, itemType);
+ Main.item[drop].noGrabDelay = 100;
+ }
+ }
+ }
+}
diff --git a/Items/DisgustingMeat.png b/Items/DisgustingMeat.png
new file mode 100644
index 0000000000..6d743191e2
Binary files /dev/null and b/Items/DisgustingMeat.png differ
diff --git a/Items/DraedonMisc/EncryptedSchematicJungle.cs b/Items/DraedonMisc/EncryptedSchematicJungle.cs
index 21ea505af7..0f3fb5688e 100644
--- a/Items/DraedonMisc/EncryptedSchematicJungle.cs
+++ b/Items/DraedonMisc/EncryptedSchematicJungle.cs
@@ -64,7 +64,7 @@ namespace CalamityMod.Items.DraedonMisc
rangedDisplay.OverrideColor = new Color(236, 255, 31);
list.Insert(insertIndex + 2, rangedDisplay);
- int mageItem = ModContent.ItemType();
+ int mageItem = ModContent.ItemType();
TooltipLine mageDisplay = new TooltipLine(this.Mod, "CalamityMod:MageDisplay", $"[i:{mageItem}] {CalamityUtils.GetItemName(mageItem)}");
mageDisplay.OverrideColor = new Color(255, 64, 31);
list.Insert(insertIndex + 3, mageDisplay);
diff --git a/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs b/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs
index fb7e5cccf1..6703ab71bd 100644
--- a/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs
+++ b/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs
@@ -64,7 +64,7 @@ namespace CalamityMod.Items.DraedonMisc
rangedDisplay.OverrideColor = new Color(149, 243, 43);
list.Insert(insertIndex + 2, rangedDisplay);
- int mageItem = ModContent.ItemType();
+ int mageItem = ModContent.ItemType();
TooltipLine mageDisplay = new TooltipLine(this.Mod, "CalamityMod:MageDisplay", $"[i:{mageItem}] {CalamityUtils.GetItemName(mageItem)}");
mageDisplay.OverrideColor = new Color(236, 255, 31);
list.Insert(insertIndex + 3, mageDisplay);
diff --git a/Items/Materials/WulfrumMetalScrap.cs b/Items/Materials/WulfrumMetalScrap.cs
index 29df19b121..1f1031014f 100644
--- a/Items/Materials/WulfrumMetalScrap.cs
+++ b/Items/Materials/WulfrumMetalScrap.cs
@@ -60,7 +60,7 @@ namespace CalamityMod.Items.Materials
return true;
else
{
- spriteBatch.Draw(altTexture.Value, position, null, drawColor, 0, origin, altTexture.Size() / 2, SpriteEffects.None, 0);
+ spriteBatch.Draw(altTexture.Value, position, null, drawColor, 0, altTexture.Size() / 2, scale, SpriteEffects.None, 0);
return false;
}
}
diff --git a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs
index 073307f246..3d465cc42d 100644
--- a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs
+++ b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs
@@ -91,6 +91,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
"Spider Prov",
"StipulateVenus",
"Tobias",
+ "Tomat",
"Triangle",
"TYESKI (Universe)",
"Uncle Danny",
@@ -189,7 +190,6 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
"ThousandFields",
"TikiWiki",
"Tinymanx",
- "Tomat",
"Trivaxy",
"Uberransy",
"Vaikyia",
diff --git a/Items/SummonItems/ExoticPheromones.cs b/Items/SummonItems/ExoticPheromones.cs
index 995118804c..6c6504bc90 100644
--- a/Items/SummonItems/ExoticPheromones.cs
+++ b/Items/SummonItems/ExoticPheromones.cs
@@ -34,12 +34,12 @@ namespace CalamityMod.Items.SummonItems
public override bool CanUseItem(Player player)
{
- return player.ZoneJungle && !NPC.AnyNPCs(ModContent.NPCType()) && !BossRushEvent.BossRushActive;
+ return player.ZoneJungle && !NPC.AnyNPCs(ModContent.NPCType()) && !BossRushEvent.BossRushActive;
}
public override bool? UseItem(Player player)
{
- CalamityUtils.SpawnBossUsingItem(player, SoundID.Roar);
+ CalamityUtils.SpawnBossUsingItem(player, SoundID.Roar);
return true;
}
diff --git a/Items/TreasureBags/DragonfollyBag.cs b/Items/TreasureBags/DragonfollyBag.cs
index bdbc785757..ac6f05ebad 100644
--- a/Items/TreasureBags/DragonfollyBag.cs
+++ b/Items/TreasureBags/DragonfollyBag.cs
@@ -57,7 +57,7 @@ namespace CalamityMod.Items.TreasureBags
public override void ModifyItemLoot(ItemLoot itemLoot)
{
// Money
- itemLoot.Add(ItemDropRule.CoinsBasedOnNPCValue(ModContent.NPCType()));
+ itemLoot.Add(ItemDropRule.CoinsBasedOnNPCValue(ModContent.NPCType()));
// Materials
itemLoot.Add(ModContent.ItemType(), 1, 30, 35);
diff --git a/Items/Weapons/DraedonsArsenal/CountermeasureMitt.cs b/Items/Weapons/DraedonsArsenal/CountermeasureMitt.cs
new file mode 100644
index 0000000000..f364289272
--- /dev/null
+++ b/Items/Weapons/DraedonsArsenal/CountermeasureMitt.cs
@@ -0,0 +1,79 @@
+using System;
+using System.Collections.Generic;
+using CalamityMod.CustomRecipes;
+using CalamityMod.Items.Materials;
+using CalamityMod.Projectiles.DraedonsArsenal;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Terraria;
+using Terraria.Audio;
+using Terraria.DataStructures;
+using Terraria.ID;
+using Terraria.ModLoader;
+
+namespace CalamityMod.Items.Weapons.DraedonsArsenal
+{
+ [LegacyName("GatlingLaser")]
+ public class CountermeasureMitt : ModItem, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal";
+ public override void SetDefaults()
+ {
+ CalamityGlobalItem modItem = Item.Calamity();
+
+ Item.width = 54;
+ Item.height = 56;
+ Item.DamageType = DamageClass.Magic;
+ Item.mana = 3;
+ Item.damage = 45;
+ Item.knockBack = 4f;
+ Item.useAnimation = Item.useTime = 11;
+ Item.autoReuse = true;
+
+ Item.useStyle = ItemUseStyleID.Shoot;
+ Item.noMelee = true;
+ Item.channel = true;
+ Item.noUseGraphic = true;
+
+ Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
+ Item.rare = ItemRarityID.Yellow;
+
+ Item.shoot = ModContent.ProjectileType();
+ Item.shootSpeed = 24f;
+ }
+ public override void ModifyTooltips(List tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 3);
+ public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
+ public override bool AltFunctionUse(Player player) => true;
+ public override void HoldItem(Player player)
+ {
+ if (Main.myPlayer == player.whoAmI)
+ player.Calamity().rightClickListener = true;
+ player.Calamity().mouseWorldListener = true;
+ }
+ public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
+ {
+ Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/DraedonsArsenal/CountermeasureMittGlow").Value);
+ }
+ public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
+ {
+ float gunType = 0;
+ if (player.Calamity().mouseRight && player.whoAmI == Main.myPlayer && !Main.mapFullscreen && !Main.blockMouse && player.Calamity().arsenalCooldown <= 0)
+ gunType = 5;
+ Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, type, damage, knockback, player.whoAmI, 0, 0, gunType);
+
+ holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero);
+ return false;
+ }
+ public override void AddRecipes()
+ {
+ CreateRecipe().
+ AddIngredient(15).
+ AddIngredient(15).
+ AddIngredient(5).
+ AddIngredient(10).
+ AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(3, out Func condition), condition).
+ AddTile(TileID.MythrilAnvil).
+ Register();
+ }
+ }
+}
diff --git a/Items/Weapons/DraedonsArsenal/CountermeasureMitt.png b/Items/Weapons/DraedonsArsenal/CountermeasureMitt.png
new file mode 100644
index 0000000000..ea23481c15
Binary files /dev/null and b/Items/Weapons/DraedonsArsenal/CountermeasureMitt.png differ
diff --git a/Items/Weapons/DraedonsArsenal/CountermeasureMittGlow.png b/Items/Weapons/DraedonsArsenal/CountermeasureMittGlow.png
new file mode 100644
index 0000000000..3c119c3088
Binary files /dev/null and b/Items/Weapons/DraedonsArsenal/CountermeasureMittGlow.png differ
diff --git a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs b/Items/Weapons/DraedonsArsenal/GatlingLaser.cs
deleted file mode 100644
index 17fb58acf7..0000000000
--- a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-using System;
-using System.Collections.Generic;
-using CalamityMod.CustomRecipes;
-using CalamityMod.Items.Materials;
-using CalamityMod.Projectiles.DraedonsArsenal;
-using Microsoft.Xna.Framework;
-using Terraria;
-using Terraria.Audio;
-using Terraria.ID;
-using Terraria.ModLoader;
-
-namespace CalamityMod.Items.Weapons.DraedonsArsenal
-{
- public class GatlingLaser : ModItem, ILocalizedModType
- {
- public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal";
- public static readonly SoundStyle FireSound = new("CalamityMod/Sounds/Item/GatlingLaserFireStart");
- public static readonly SoundStyle FireLoopSound = new("CalamityMod/Sounds/Item/GatlingLaserFireLoop");
- public static readonly SoundStyle FireEndSound = new("CalamityMod/Sounds/Item/GatlingLaserFireEnd");
-
-
- // This is the amount of charge consumed every time the holdout projectile fires a laser.
- public const float HoldoutChargeUse = 0.0075f;
-
- public override void SetDefaults()
- {
- CalamityGlobalItem modItem = Item.Calamity();
-
- Item.width = 43;
- Item.height = 24;
- Item.DamageType = DamageClass.Magic;
- Item.damage = 43;
- Item.knockBack = 1f;
- Item.useTime = 2;
- Item.useAnimation = 2;
- Item.noUseGraphic = true;
- Item.autoReuse = false;
- Item.channel = true;
- Item.mana = 4;
-
- Item.useStyle = ItemUseStyleID.Shoot;
- Item.UseSound = FireSound;
- Item.noMelee = true;
-
- Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
- Item.rare = ItemRarityID.Yellow;
-
- Item.shoot = ModContent.ProjectileType();
- Item.shootSpeed = 24f;
-
- modItem.UsesCharge = true;
- modItem.MaxCharge = 135f;
- modItem.ChargePerUse = 0f; // This weapon is a holdout. Charge is consumed by the holdout projectile.
- }
-
- public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
-
- public override void ModifyTooltips(List tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 3);
-
- public override Vector2? HoldoutOffset() => new Vector2(-20, 0);
-
- public override void AddRecipes()
- {
- CreateRecipe().
- AddIngredient(15).
- AddIngredient(15).
- AddIngredient