diff --git a/Buffs/Alcohol/Trippy.cs b/Buffs/Alcohol/Trippy.cs
index 21b5357e8e..17cc14f182 100644
--- a/Buffs/Alcohol/Trippy.cs
+++ b/Buffs/Alcohol/Trippy.cs
@@ -7,8 +7,6 @@ namespace CalamityMod.Buffs.Alcohol
{
public class Trippy : ModBuff
{
- public override LocalizedText Description => base.Description.WithFormatArgs(OddMushroom.DamageBoost.ToPercent());
-
public override void SetStaticDefaults()
{
Main.debuff[Type] = false;
diff --git a/Buffs/StatBuffs/AbyssalDivingSuitPlates.cs b/Buffs/StatBuffs/AbyssalDivingSuitPlates.cs
deleted file mode 100644
index b5deec51c2..0000000000
--- a/Buffs/StatBuffs/AbyssalDivingSuitPlates.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using CalamityMod.Items.Accessories;
-using Terraria;
-using Terraria.ModLoader;
-
-namespace CalamityMod.Buffs.StatBuffs
-{
- public class AbyssalDivingSuitPlates : ModBuff
- {
- public override void SetStaticDefaults()
- {
- Main.buffNoTimeDisplay[Type] = true;
- Main.debuff[Type] = false;
- Main.pvpBuff[Type] = true;
- Main.buffNoSave[Type] = true;
- }
-
- public override void ModifyBuffText(ref string buffName, ref string tip, ref int rare)
- {
- tip = base.Description.Format((AbyssalDivingSuit.PlatesAllDamageReduction - Main.LocalPlayer.Calamity().abyssalDivingSuitPlateHits * AbyssalDivingSuit.PlatesHitDecay).ToPercent());
- }
-
- public override void Update(Player player, ref int buffIndex)
- {
- player.Calamity().abyssalDivingSuitPlates = true;
- }
- }
-}
diff --git a/Buffs/StatBuffs/AbyssalDivingSuitPlates.png b/Buffs/StatBuffs/AbyssalDivingSuitPlates.png
deleted file mode 100644
index a89877f9ad..0000000000
Binary files a/Buffs/StatBuffs/AbyssalDivingSuitPlates.png and /dev/null differ
diff --git a/Buffs/StatBuffs/ChiBuff.cs b/Buffs/StatBuffs/ChiBuff.cs
index 51b9ef2629..d1c94aef0d 100644
--- a/Buffs/StatBuffs/ChiBuff.cs
+++ b/Buffs/StatBuffs/ChiBuff.cs
@@ -15,7 +15,7 @@ namespace CalamityMod.Buffs.StatBuffs
public override void Update(Player player, ref int buffIndex)
{
- player.Calamity().trinketOfChiBuff = true;
+ player.endurance += 0.08f;
}
}
}
diff --git a/Buffs/StatBuffs/Encased.cs b/Buffs/StatBuffs/Encased.cs
index 34013fef8b..fc8282145b 100644
--- a/Buffs/StatBuffs/Encased.cs
+++ b/Buffs/StatBuffs/Encased.cs
@@ -10,7 +10,7 @@ namespace CalamityMod.Buffs.StatBuffs
{
public class Encased : ModBuff
{
- public override LocalizedText Description => base.Description.WithFormatArgs(PermafrostsConcoction.EncasedDefenseBoost, PermafrostsConcoction.EncasedAllDamageReduction.ToPercent());
+ public override LocalizedText Description => base.Description.WithFormatArgs(PermafrostsConcoction.EncasedDefenseBoost, PermafrostsConcoction.EncasedDamageReductionBoost.ToPercent());
public override void SetStaticDefaults()
{
diff --git a/Buffs/StatBuffs/IceShieldBuff.cs b/Buffs/StatBuffs/IceShieldBuff.cs
index b652f9f936..38b2f879da 100644
--- a/Buffs/StatBuffs/IceShieldBuff.cs
+++ b/Buffs/StatBuffs/IceShieldBuff.cs
@@ -7,7 +7,7 @@ namespace CalamityMod.Buffs.StatBuffs
{
public class IceShieldBuff : ModBuff
{
- public override LocalizedText Description => base.Description.WithFormatArgs(AquaticHeart.IceShieldAllDamageReduction.ToPercent());
+ public override LocalizedText Description => base.Description.WithFormatArgs(AquaticHeart.IceShieldDamageReductionBoost.ToPercent());
public override void SetStaticDefaults()
{
diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs
index 47ccca64ee..be8080b276 100644
--- a/CalPlayer/CalamityPlayer.cs
+++ b/CalPlayer/CalamityPlayer.cs
@@ -114,8 +114,6 @@ namespace CalamityMod.CalPlayer
public int garandShots = 0;
public int searedPanCounter = 0;
public int searedPanTimer = 0;
- /// Used to get around the hardcoded Potion Sickness duration to allow Hadal Stew's reduced duration.
- public int potionTimer = 0;
/// If set to true, prevents all player dashes. Used by Ball and Chain, and Stygian Shield.
public bool blockAllDashes = false;
/// Used by Flamsteed Ring to reset the player's hitbox size after dismounting.
@@ -827,8 +825,6 @@ namespace CalamityMod.CalPlayer
public bool nuclearFuelRod = false;
public bool nebulousCore = false;
public bool deepDiver = false;
- public bool abyssalDivingSuitPlates = false;
- public int abyssalDivingSuitPlateHits = 0;
public bool aquaticHeartWaterBuff = false;
public bool aquaticHeartIce = false;
public bool ilSpark = false;
@@ -885,9 +881,9 @@ namespace CalamityMod.CalPlayer
public bool sGlyph = false;
public bool sRegen = false;
public bool tracersDust = false;
- public bool tracersCelestial = false;
- public bool tracersElysian = false;
- public bool tracersSeraph = false;
+ public bool moonWalkers = false;
+ public bool voidStriders = false;
+ public bool seraphTracers = false;
public bool frostFlare = false;
public bool evolution = false;
public int evolutionLifeRegenCounter = 0;
@@ -1333,7 +1329,6 @@ namespace CalamityMod.CalPlayer
#endregion
#region Buff
- public bool trinketOfChiBuff = false;
public bool sandsWindBuff = false;
public bool aeolianEarthBuff = false;
public int chiBuffTimer = 0;
@@ -1405,11 +1400,6 @@ namespace CalamityMod.CalPlayer
public bool yellowCandle = false;
/// If true, the player has consumed Odd Mushroom. Controls drawing its rainbow fake clones of NPCs and projectiles.
public bool trippy = false;
- ///
- /// Used to control the number and position of Odd Mushroom's fake clones. There are three levels of severity.
- /// The first draws 4 clones in diagonals. The second draws 12 clones, 4 on diagonals and the other 8 surrounding them. The third draws 16 clones, arranged entirely around the player.
- ///
- public int trippyLevel = 1;
public bool amidiasBlessing = false;
public bool bloodfinBoost = false;
public int bloodfinTimer = 30;
@@ -2132,8 +2122,6 @@ namespace CalamityMod.CalPlayer
miniOldDuke = false;
miniOldDukeVanity = false;
- abyssalDivingSuitPlates = false;
-
aquaticHeartWaterBuff = false;
aquaticHeartIce = false;
@@ -2325,9 +2313,9 @@ namespace CalamityMod.CalPlayer
hallowedRegen = false;
hallowedPower = false;
tracersDust = false;
- tracersCelestial = false;
- tracersElysian = false;
- tracersSeraph = false;
+ moonWalkers = false;
+ voidStriders = false;
+ seraphTracers = false;
ursaSergeant = false;
ursaSergeantVisual = false;
scuttlersJewel = false;
@@ -2537,7 +2525,6 @@ namespace CalamityMod.CalPlayer
WaterDebuffMultiplier = new();
ElectricDebuffMultiplier = new();
- trinketOfChiBuff = false;
sandsWindBuff = false;
aeolianEarthBuff = false;
corrEffigy = false;
@@ -2986,7 +2973,6 @@ namespace CalamityMod.CalPlayer
clamity = false;
NOU = false;
snowmanNoseless = false;
- abyssalDivingSuitPlateHits = 0;
sulphurPoison = false;
nightwither = false;
voidfrost = false;
@@ -3035,10 +3021,8 @@ namespace CalamityMod.CalPlayer
rimehound = false;
crysthamyr = false;
ExoChair = false;
- abyssalDivingSuitPlates = false;
aquaticHeartWaterBuff = false;
aquaticHeartIce = false;
- trinketOfChiBuff = false;
sandsWindBuff = false;
aeolianEarthBuff = false;
chiBuffTimer = 0;
@@ -3107,7 +3091,6 @@ namespace CalamityMod.CalPlayer
pinkCandleHealFraction = 0D;
yellowCandle = false;
trippy = false;
- trippyLevel = 1;
amidiasBlessing = false;
bloodfinBoost = false;
bloodfinTimer = 0;
@@ -3268,7 +3251,6 @@ namespace CalamityMod.CalPlayer
garandShots = 0;
searedPanCounter = 0;
searedPanTimer = 0;
- potionTimer = 0;
persecutedEnchantSummonTimer = 0;
momentumCapacitorTime = 0;
momentumCapacitorBoost = 0f;
@@ -4184,25 +4166,7 @@ namespace CalamityMod.CalPlayer
}
if (abyssalDivingSuit)
- {
Player.AddBuff(BuffType(), 60, true);
- if (Player.whoAmI == Main.myPlayer && !Player.HasCooldown(DivingPlatesBroken.ID))
- Player.AddBuff(BuffType(), 2);
-
- if (Player.whoAmI == Main.myPlayer && Player.active && abyssalDivingSuitPlateHits < 3)
- {
- if (!Player.HasCooldown(DivingPlatesBreaking.ID))
- {
- CooldownInstance plates = Player.AddCooldown(DivingPlatesBreaking.ID, 3);
- plates.timeLeft = abyssalDivingSuitPlateHits;
- }
- else
- {
- CooldownInstance plates = cooldowns[DivingPlatesBreaking.ID];
- plates.timeLeft = abyssalDivingSuitPlateHits;
- }
- }
- }
if (aquaticHeart)
Player.AddBuff(BuffType(), 60, true);
diff --git a/CalPlayer/CalamityPlayerDashEffects.cs b/CalPlayer/CalamityPlayerDashEffects.cs
index efca4b8a50..a28bf6750e 100644
--- a/CalPlayer/CalamityPlayerDashEffects.cs
+++ b/CalPlayer/CalamityPlayerDashEffects.cs
@@ -1,6 +1,5 @@
using System;
using CalamityMod.Balancing;
-using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.CalPlayer.Dashes;
using CalamityMod.EntitySources;
using CalamityMod.Enums;
@@ -71,9 +70,10 @@ namespace CalamityMod.CalPlayer
UsedDash.DashStartupEffects(Player);
UsedDash.dashTime++;
return;
- } else if (HasCustomDash && UsedDash.dashStartup > 0 && Player.dashDelay < 0 && UsedDash.dashTime == UsedDash.dashStartup )
+ }
+ else if (HasCustomDash && UsedDash.dashStartup > 0 && Player.dashDelay < 0 && UsedDash.dashTime == UsedDash.dashStartup)
{
- if (DoADash(UsedDash.CalculateDashSpeed(Player),true))
+ if (DoADash(UsedDash.CalculateDashSpeed(Player), true))
UsedDash.OnDashEffects(Player);
}
@@ -102,7 +102,7 @@ namespace CalamityMod.CalPlayer
// Duplicated from the way TML edits vanilla ram dash damage (and Shield of Cthulhu)
int dashDamage = (int)Player.GetTotalDamage(hitContext.damageClass).ApplyTo(hitContext.BaseDamage);
-
+
Projectile ram = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), n.Center, Vector2.Zero, ModContent.ProjectileType(), dashDamage, 0f, Player.whoAmI, n.whoAmI);
ram.DamageType = hitContext.damageClass;
@@ -199,7 +199,7 @@ namespace CalamityMod.CalPlayer
}
// Dash delay depends on the type of dash used.
- if (!(HasCustomDash && UsedDash.dashStartup > 0 && Player.dashDelay < 0 && UsedDash.dashTime <= UsedDash.dashStartup+10))
+ if (!(HasCustomDash && UsedDash.dashStartup > 0 && Player.dashDelay < 0 && UsedDash.dashTime <= UsedDash.dashStartup + 10))
Player.dashDelay = dashDelayToApply;
if (UsedDash.IsOmnidirectional)
@@ -251,7 +251,7 @@ namespace CalamityMod.CalPlayer
bool dashWasExecuted = false;
// If the manual hotkey is bound, standard Terraria dashes cannot be triggered by double tapping.
- var manualDashHotkeys = CalamityKeybinds.DashHotkey.GetAssignedKeys();
+ var manualDashHotkeys = CalamityKeybinds.DashHotkey.GetAssignedKeysOrEmpty();
bool manualHotkeyBound = (manualDashHotkeys?.Count ?? 0) > 0;
bool pressedManualHotkey = manualHotkeyBound && (CalamityKeybinds.DashHotkey.JustPressed || forceDash);
@@ -595,7 +595,7 @@ namespace CalamityMod.CalPlayer
if (myRect.Intersects(npcHitbox) && (n.noTileCollide || Collision.CanHit(Player.position, Player.width, Player.height, n.position, n.width, n.height)))
{
int hitDirection = Math.Sign(Player.velocity.X);
-
+
// Use the player's facing direction as a fallback if they are not making any horizontal movement.
if (hitDirection == 0)
hitDirection = Player.direction;
diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs
index fefb018947..0f2027ad8c 100644
--- a/CalPlayer/CalamityPlayerDrawEffects.cs
+++ b/CalPlayer/CalamityPlayerDrawEffects.cs
@@ -134,11 +134,12 @@ namespace CalamityMod.CalPlayer
//GeneralParticleHandler.SpawnParticle(new DirectionalPulseRing(player.Center + Vector2.UnitX.RotatedBy(player.itemRotation) * (48 + scale*96), Vector2.Zero, Color.Cyan, Vector2.One, 0, scale, scale, 3));
}
- // Dust modifications while high.
+ // Drawing for Odd Mushroom's clone effects
if (calamityPlayer.trippy)
{
if (Main.myPlayer == Player.whoAmI)
{
+ // Dust
Rectangle screenArea = new Rectangle((int)Main.screenPosition.X - 500, (int)Main.screenPosition.Y - 50, Main.screenWidth + 1000, Main.screenHeight + 100);
int dustDrawn = 0;
float maxShroomDust = Main.maxDustToDraw / 2;
@@ -182,12 +183,112 @@ namespace CalamityMod.CalPlayer
}
}
}
+
+ // NPCs
+ foreach (NPC n in Main.ActiveNPCs)
+ {
+ Color rainbow = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, Main.DiscoR);
+ Color alphaColor = n.GetAlpha(rainbow);
+ float RGBMult = 0.99f;
+ alphaColor.R = (byte)(alphaColor.R * RGBMult);
+ alphaColor.G = (byte)(alphaColor.G * RGBMult);
+ alphaColor.B = (byte)(alphaColor.B * RGBMult);
+ alphaColor.A = (byte)(alphaColor.A * RGBMult);
+
+ for (int i = 0; i < 4; i++)
+ {
+ Vector2 position = n.position;
+ float distanceFromTargetX = Math.Abs(n.Center.X - Main.LocalPlayer.Center.X);
+ float distanceFromTargetY = Math.Abs(n.Center.Y - Main.LocalPlayer.Center.Y);
+
+ switch (i)
+ {
+ case 0:
+ position.X = Main.LocalPlayer.Center.X - distanceFromTargetX;
+ position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY;
+ break;
+
+ case 1:
+ position.X = Main.LocalPlayer.Center.X + distanceFromTargetX;
+ position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY;
+ break;
+
+ case 2:
+ position.X = Main.LocalPlayer.Center.X + distanceFromTargetX;
+ position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY;
+ break;
+
+ case 3:
+ position.X = Main.LocalPlayer.Center.X - distanceFromTargetX;
+ position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY;
+ break;
+
+ default:
+ break;
+ }
+
+ Vector2 posDiff = n.Center - position;
+ Main.instance.DrawNPCDirect(Main.spriteBatch, n, n.behindTiles, Main.screenPosition + posDiff);
+ }
+ }
+
+ // Projectiles
+ foreach (Projectile p in Main.ActiveProjectiles)
+ {
+ Texture2D texture = TextureAssets.Projectile[p.type].Value;
+ Color rainbow = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, Main.DiscoR);
+ Color alphaColor = p.GetAlpha(rainbow);
+ float RGBMult = 0.99f;
+ alphaColor.R = (byte)(alphaColor.R * RGBMult);
+ alphaColor.G = (byte)(alphaColor.G * RGBMult);
+ alphaColor.B = (byte)(alphaColor.B * RGBMult);
+ alphaColor.A = (byte)(alphaColor.A * RGBMult);
+
+ Vector2 storedProjPos = p.Center;
+ for (int i = 0; i < 4; i++)
+ {
+ Vector2 position = p.position;
+ float distanceFromTargetX = Math.Abs(p.Center.X - Main.LocalPlayer.Center.X);
+ float distanceFromTargetY = Math.Abs(p.Center.Y - Main.LocalPlayer.Center.Y);
+
+ switch (i)
+ {
+ case 0:
+ position.X = Main.LocalPlayer.Center.X - distanceFromTargetX;
+ position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY;
+ break;
+
+ case 1:
+ position.X = Main.LocalPlayer.Center.X + distanceFromTargetX;
+ position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY;
+ break;
+
+ case 2:
+ position.X = Main.LocalPlayer.Center.X + distanceFromTargetX;
+ position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY;
+ break;
+
+ case 3:
+ position.X = Main.LocalPlayer.Center.X - distanceFromTargetX;
+ position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY;
+ break;
+
+ default:
+ break;
+ }
+
+ // Unfortunately unlike NPCs, there is no public function for drawing a projectile with a position parameter to spoof.
+ // So we have to spoof it by directly changing the projectile's position, then resetting it at the end.
+ p.Center = position;
+ Main.instance.DrawProjDirect(p);
+ }
+
+ p.Center = storedProjPos;
+ }
}
}
- else // This is such a stupid way to reset this but you can't just put it in ResetEffects
+ else
{
- calamityPlayer.trippyLevel = 1;
-
// Mana Burn VFX disabled when hih
if (Player.statMana < 0)
{
@@ -222,7 +323,7 @@ namespace CalamityMod.CalPlayer
}
#region Flight Visuals
- // Celestial Tracers, Elysian Tracers, Seraph Tracers
+ // Moon Walkers, Void Striders, Seraph Tracers
if (calamityPlayer.tracersDust && drawInfo.shadow == 0f)
{
if (!Player.StandingStill() && !Player.mount.Active)
diff --git a/CalPlayer/CalamityPlayerFishing.cs b/CalPlayer/CalamityPlayerFishing.cs
index 4f0c2b0d76..9581ee7a97 100644
--- a/CalPlayer/CalamityPlayerFishing.cs
+++ b/CalPlayer/CalamityPlayerFishing.cs
@@ -159,6 +159,10 @@ namespace CalamityMod.CalPlayer
else
itemDrop = ModContent.ItemType();
}
+ if (ZoneBasaltGully)
+ {
+ itemDrop = ModContent.ItemType();
+ }
return;
}
@@ -303,12 +307,13 @@ namespace CalamityMod.CalPlayer
if (Player.ZoneDesert && Main.rand.NextBool())
return;
- int commonCatch = Utils.SelectRandom(Main.rand, new int[]
- {
- ModContent.ItemType(),
- ModContent.ItemType(),
- ModContent.ItemType()
- });
+ int commonCatch = ModContent.ItemType();
+ if (ZonePolypForest)
+ commonCatch = ModContent.ItemType();
+ else if (ZoneGleamingBurrows)
+ commonCatch = ModContent.ItemType();
+ else if (ZoneTimelessShores)
+ commonCatch = ModContent.ItemType();
if (attempt.legendary)
{
diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs
index c0ced8e1bc..54f12dcede 100644
--- a/CalPlayer/CalamityPlayerHitHurt.cs
+++ b/CalPlayer/CalamityPlayerHitHurt.cs
@@ -833,42 +833,21 @@ namespace CalamityMod.CalPlayer
// Can't have any cooldowns here because dodges grrrrr....
if (fleshTotem && !Player.HasCooldown(Cooldowns.FleshTotem.ID) && TotalEnergyShielding <= 0)
- contactDamageReduction += 0.5;
+ modifiers.FinalDamage *= 0.5f;
if (tarragonCloak && tarraMelee && !Player.HasCooldown(Cooldowns.TarragonCloak.ID))
- contactDamageReduction += TarragonHeadMelee.CloakContactDamageReduction;
+ modifiers.FinalDamage *= (1f - TarragonHeadMelee.CloakContactDamageReduction);
if (bloodflareMelee && bloodflareFrenzy && !Player.HasCooldown(BloodflareFrenzy.ID))
- contactDamageReduction += BloodflareHeadMelee.FrenzyContactDamageReduction;
-
- if (npc.Calamity().temporalSadness)
- contactDamageReduction += 0.5;
-
- if (eskimoSet)
- {
- if (npc.coldDamage)
- contactDamageReduction += 0.1;
- }
-
- if (trinketOfChiBuff)
- contactDamageReduction += 0.08;
-
- if (abyssalDivingSuitPlates)
- contactDamageReduction += AbyssalDivingSuit.PlatesAllDamageReduction - abyssalDivingSuitPlateHits * AbyssalDivingSuit.PlatesHitDecay;
-
- if (aquaticHeartIce)
- contactDamageReduction += AquaticHeart.IceShieldAllDamageReduction;
-
- if (encased)
- contactDamageReduction += PermafrostsConcoction.EncasedAllDamageReduction;
+ modifiers.FinalDamage *= (1f - BloodflareHeadMelee.FrenzyContactDamageReduction);
if (Player.ownedProjectileCounts[ModContent.ProjectileType()] > 0 && Player.ActiveItem().type == ModContent.ItemType())
- contactDamageReduction += 0.5;
+ modifiers.FinalDamage *= 0.5f;
bool lifeAndShieldCondition = Player.statLife >= Player.statLifeMax2 && (!HasAnyEnergyShield || TotalEnergyShielding >= TotalMaxShieldDurability);
if (theBee && theBeeCooldown <= 0 && lifeAndShieldCondition)
{
- contactDamageReduction += 0.5;
+ modifiers.FinalDamage *= 0.5f;
shouldTriggerBeeCooldown = true;
}
@@ -883,49 +862,7 @@ namespace CalamityMod.CalPlayer
// If the shield never breaks, you never lose full Adrenaline, meaning you keep the DR forever and are functionally immortal.
// This intentionally gives Adrenaline much-needed anti-synergy with energy shields, because they make gaining Adrenaline much safer.
if ((fullAdrenWithoutDH || usingNanomachinesWithDH) && TotalEnergyShielding <= 0)
- contactDamageReduction += this.GetAdrenalineDR();
- }
-
- if (Player.mount.Active && (Player.mount.Type == ModContent.MountType() || Player.mount.Type == ModContent.MountType()) && Math.Abs(Player.velocity.X) > Player.mount.RunSpeed / 2f)
- contactDamageReduction += 0.1;
-
- if (vHex)
- contactDamageReduction -= 0.1;
-
- if (irradiated)
- contactDamageReduction -= 0.1;
-
- if (corrEffigy)
- contactDamageReduction -= CorruptionEffigy.DamageReductionLoss;
-
- // 10% is converted to 9%, 25% is converted to 20%, 50% is converted to 33%, 75% is converted to 43%, 100% is converted to 50%
- if (contactDamageReduction > 0D)
- {
- if (armorCrunch)
- contactDamageReduction *= (double)ArmorCrunch.MultiplicativeDamageReductionPlayer;
- if (crumble)
- contactDamageReduction *= (double)Crumbling.MultiplicativeDamageReductionPlayer;
-
- // Contact damage reduction is reduced by DR Damage, which itself is proportional to defense damage
- // In FTW, as defense damage is uncapped, DR damage is also uncapped.
- int currentDefense = Player.GetCurrentDefense(false);
- if (totalDefenseDamage > 0 && currentDefense > 0)
- {
- double drDamageRatio = CurrentDefenseDamage / (double)currentDefense;
- if (!Main.getGoodWorld && drDamageRatio > 1D)
- drDamageRatio = 1D;
-
- contactDamageReduction *= 1D - drDamageRatio;
- if (!Main.getGoodWorld && contactDamageReduction < 0D)
- contactDamageReduction = 0D;
- }
-
- // Scale with base damage reduction
- if (Player.endurance > 0)
- contactDamageReduction *= 1f - Player.endurance;
-
- contactDamageReduction = 1D / (1D + contactDamageReduction);
- modifiers.SourceDamage *= (float)contactDamageReduction;
+ modifiers.IncomingDamageMultiplier *= (1f - this.GetAdrenalineDR());
}
if (Main.hardMode && Main.expertMode)
@@ -1025,7 +962,7 @@ namespace CalamityMod.CalPlayer
Projectile pro = Main.projectile.AsEnumerable().Where(projectile => projectile.friendly && projectile.owner == Player.whoAmI && projectile.type == ModContent.ProjectileType()).First();
phantomicBulwarkCooldown = 1800; // 30 second cooldown
pro.Kill();
- projectileDamageReduction += 0.2;
+ modifiers.FinalDamage *= 0.8f;
}
if (trueVHex)
@@ -1113,28 +1050,16 @@ namespace CalamityMod.CalPlayer
if (evolution)
{
if (proj.type == projTypeJustHitBy)
- projectileDamageReduction += 0.25;
+ modifiers.FinalDamage *= 0.75f;
}
- if (trinketOfChiBuff)
- projectileDamageReduction += 0.08;
-
- if (abyssalDivingSuitPlates)
- projectileDamageReduction += AbyssalDivingSuit.PlatesAllDamageReduction - abyssalDivingSuitPlateHits * AbyssalDivingSuit.PlatesHitDecay;
-
- if (aquaticHeartIce)
- projectileDamageReduction += AquaticHeart.IceShieldAllDamageReduction;
-
- if (encased)
- projectileDamageReduction += PermafrostsConcoction.EncasedAllDamageReduction;
-
if (Player.ownedProjectileCounts[ModContent.ProjectileType()] > 0 && Player.ActiveItem().type == ModContent.ItemType())
- projectileDamageReduction += 0.5;
+ modifiers.FinalDamage *= 0.5f;
bool lifeAndShieldCondition = Player.statLife >= Player.statLifeMax2 && (!HasAnyEnergyShield || TotalEnergyShielding >= TotalMaxShieldDurability);
if (theBee && theBeeCooldown <= 0 && lifeAndShieldCondition)
{
- projectileDamageReduction += 0.5;
+ modifiers.FinalDamage *= 0.5f;
shouldTriggerBeeCooldown = true;
}
@@ -1149,12 +1074,9 @@ namespace CalamityMod.CalPlayer
// If the shield never breaks, you never lose full Adrenaline, meaning you keep the DR forever and are functionally immortal.
// This intentionally gives Adrenaline much-needed anti-synergy with energy shields, because they make gaining Adrenaline much safer.
if ((fullAdrenWithoutDH || usingNanomachinesWithDH) && TotalEnergyShielding <= 0)
- projectileDamageReduction += this.GetAdrenalineDR();
+ modifiers.IncomingDamageMultiplier *= (1f - this.GetAdrenalineDR());
}
- if (Player.mount.Active && (Player.mount.Type == ModContent.MountType() || Player.mount.Type == ModContent.MountType()) && Math.Abs(Player.velocity.X) > Player.mount.RunSpeed / 2f)
- projectileDamageReduction += 0.1;
-
// Damage reduction from Shield of the High Ruler if facing the projectile that just hit.
// If the projectile is in the exact center of the player on the X axis YOU GET NOTHING, GOOD DAY, SIR!
if (copyrightInfringementShield)
@@ -1164,53 +1086,14 @@ namespace CalamityMod.CalPlayer
if (Player.direction == 1)
{
if (projectileRight)
- projectileDamageReduction += 0.15;
+ modifiers.FinalDamage *= 0.85f;
}
else
{
if (projectileLeft)
- projectileDamageReduction += 0.15;
+ modifiers.FinalDamage *= 0.85f;
}
}
-
- if (vHex)
- projectileDamageReduction -= 0.1;
-
- if (irradiated)
- projectileDamageReduction -= 0.1;
-
- if (corrEffigy)
- projectileDamageReduction -= CorruptionEffigy.DamageReductionLoss;
-
- // 10% is converted to 9%, 25% is converted to 20%, 50% is converted to 33%, 75% is converted to 43%, 100% is converted to 50%
- if (projectileDamageReduction > 0D)
- {
- if (armorCrunch)
- projectileDamageReduction *= (double)ArmorCrunch.MultiplicativeDamageReductionPlayer;
- if (crumble)
- projectileDamageReduction *= (double)Crumbling.MultiplicativeDamageReductionPlayer;
-
- // Projectile damage reduction is reduced by DR Damage, which itself is proportional to defense damage
- int currentDefense = Player.GetCurrentDefense(false);
- if (totalDefenseDamage > 0 && currentDefense > 0)
- {
- double drDamageRatio = CurrentDefenseDamage / (double)currentDefense;
- if (drDamageRatio > 1D)
- drDamageRatio = 1D;
-
- projectileDamageReduction *= 1D - drDamageRatio;
-
- if (projectileDamageReduction < 0D)
- projectileDamageReduction = 0D;
- }
-
- // Scale with base damage reduction
- if (Player.endurance > 0)
- projectileDamageReduction *= 1f - Player.endurance;
-
- projectileDamageReduction = 1D / (1D + projectileDamageReduction);
- modifiers.SourceDamage *= (float)projectileDamageReduction;
- }
}
#endregion
@@ -2375,46 +2258,6 @@ namespace CalamityMod.CalPlayer
tortShellPostHit = 180;
}
- if (abyssalDivingSuitPlates && hurtInfo.Damage > 50)
- {
- if (abyssalDivingSuitPlateHits < 3)
- abyssalDivingSuitPlateHits++;
-
- bool plateCDExists = cooldowns.TryGetValue(DivingPlatesBreaking.ID, out CooldownInstance plateDurability);
- if (plateCDExists)
- plateDurability.timeLeft = abyssalDivingSuitPlateHits;
-
- if (abyssalDivingSuitPlateHits >= 3)
- {
- SoundEngine.PlaySound(SoundID.NPCDeath14, Player.Center);
-
- if (plateCDExists)
- cooldowns.Remove(DivingPlatesBreaking.ID);
-
- Player.AddCooldown(DivingPlatesBroken.ID, 10830);
-
- for (int d = 0; d < 20; d++)
- {
- Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.Smoke, 0f, 0f, 100, default, 2f);
- dust.velocity *= 3f;
- if (Main.rand.NextBool())
- {
- dust.scale = 0.5f;
- dust.fadeIn = 1f + Main.rand.Next(10) * 0.1f;
- }
- }
-
- for (int d = 0; d < 35; d++)
- {
- Dust fire = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.Torch, 0f, 0f, 100, default, 3f);
- fire.noGravity = true;
- fire.velocity *= 5f;
- fire = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.Torch, 0f, 0f, 100, default, 2f);
- fire.velocity *= 2f;
- }
- }
- }
-
if (aquaticHeartIce)
{
SoundEngine.PlaySound(SoundID.NPCDeath7, Player.Center);
diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs
index 298a6ff666..4cab67d89a 100644
--- a/CalPlayer/CalamityPlayerMiscEffects.cs
+++ b/CalPlayer/CalamityPlayerMiscEffects.cs
@@ -938,7 +938,7 @@ namespace CalamityMod.CalPlayer
// Ores below here
// Seraph Tracers give immunity to block contact effects
- if (!tracersSeraph)
+ if (!seraphTracers)
{
// Astral Ore inflicts Astral Infection briefly on contact
if (tile.TileType == astralOreID)
@@ -953,7 +953,7 @@ namespace CalamityMod.CalPlayer
// Auric Rejection causes an electrical explosion that yeets the player a considerable distance
// CIT 17AUG2024: Despite providing full invulnerability, Silva armor revive intentionally does not prevent Auric rejection's yeeting.
// 25FEB2025 Ozzatron: Added external bool to control Auric Rejection immunity from the ore.
- bool rejectionImmunity = auricSet || tracersSeraph || Player.creativeGodMode || externalAuricRejectionImmunity;
+ bool rejectionImmunity = auricSet || seraphTracers || Player.creativeGodMode || externalAuricRejectionImmunity;
bool oreRejection = (tile.TileType == auricOreID) && !rejectionImmunity;
// Repulsers always perform this effect because they are player-placed tiles made for this exact purpose
@@ -2734,6 +2734,7 @@ namespace CalamityMod.CalPlayer
}
if (aquaticHeartIce)
{
+ Player.endurance += AquaticHeart.IceShieldDamageReductionBoost;
light[0] += 0.35f;
light[1] += 1f;
light[2] += 1.25f;
@@ -2768,6 +2769,7 @@ namespace CalamityMod.CalPlayer
if (encased)
{
Player.statDefense += PermafrostsConcoction.EncasedDefenseBoost;
+ Player.endurance += PermafrostsConcoction.EncasedDamageReductionBoost;
Player.frozen = true;
Player.velocity.X = 0f;
Player.velocity.Y = -0.4f; // Should negate gravity
@@ -3983,8 +3985,7 @@ namespace CalamityMod.CalPlayer
if (abyssalDivingSuit && !Player.IsUnderwater())
{
- float moveSpeedLoss = (3 - abyssalDivingSuitPlateHits) * 0.2f;
- Player.moveSpeed -= moveSpeedLoss;
+ Player.moveSpeed -= 0.6f;
}
if (godSlayerThrowing)
@@ -4073,9 +4074,6 @@ namespace CalamityMod.CalPlayer
Player.npcTypeNoAggro[ModContent.NPCType()] = true;
}
- if (trippy)
- Player.GetDamage() += OddMushroom.DamageBoost;
-
if (eArtifact)
{
Player.manaCost -= 0.25f;
@@ -5221,28 +5219,13 @@ namespace CalamityMod.CalPlayer
#region Potion Handling
private void HandlePotions()
{
- // Hadal Stew
- if (potionTimer > 0)
- potionTimer--;
- if (potionTimer > 0 && Player.potionDelay == 0)
- Player.potionDelay = potionTimer;
- if (potionTimer == 1)
- {
- // Reduced duration than normal
- int duration = HadalStew.SicknessDuration;
- if (Player.pStone)
- duration = (int)(duration * 0.75);
- Player.ClearBuff(BuffID.PotionSickness);
- Player.AddBuff(BuffID.PotionSickness, duration);
- }
-
if (PlayerInput.Triggers.JustPressed.QuickBuff)
{
for (int i = 0; i < Main.InventorySlotsTotal; ++i)
{
Item item = Player.inventory[i];
- if (Player.potionDelay > 0 || potionTimer > 0)
+ if (Player.potionDelay > 0)
break;
if (item is null || item.stack <= 0)
continue;
diff --git a/CalamityConfig.cs b/CalamityConfig.cs
index 39e51e8720..768fc5c546 100644
--- a/CalamityConfig.cs
+++ b/CalamityConfig.cs
@@ -108,12 +108,8 @@ namespace CalamityMod
public bool DebuffDisplay { get; set; }
[BackgroundColor(192, 54, 64, 192)]
- [SliderColor(224, 165, 56, 128)]
- [Range(0f, 2f)]
- [DefaultValue(2f)]
- [Increment(1f)]
- [DrawTicks]
- public float CooldownDisplay { get; set; }
+ [DefaultValue(CooldownDisplayOptions.Full)]
+ public CooldownDisplayOptions CooldownDisplay { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
@@ -264,8 +260,6 @@ namespace CalamityMod
public bool FasterFallHotkey { get; set; }
[BackgroundColor(192, 54, 64, 192)]
- [SliderColor(224, 165, 56, 128)]
- [DrawTicks]
[DefaultValue(SetBonusDoubleTapOptions.Auto)]
public SetBonusDoubleTapOptions SetBonusDoubleTap { get; set; }
diff --git a/Cooldowns/DivingSuitBreakingPlates.png b/Cooldowns/DivingSuitBreakingPlates.png
deleted file mode 100644
index ba4481c8c4..0000000000
Binary files a/Cooldowns/DivingSuitBreakingPlates.png and /dev/null differ
diff --git a/Cooldowns/DivingSuitBrokenPlates.png b/Cooldowns/DivingSuitBrokenPlates.png
deleted file mode 100644
index 8e1026c057..0000000000
Binary files a/Cooldowns/DivingSuitBrokenPlates.png and /dev/null differ
diff --git a/Cooldowns/DivingSuitBrokenPlatesOutline.png b/Cooldowns/DivingSuitBrokenPlatesOutline.png
deleted file mode 100644
index 64eecea7e1..0000000000
Binary files a/Cooldowns/DivingSuitBrokenPlatesOutline.png and /dev/null differ
diff --git a/Cooldowns/DivingSuitBrokenPlatesOverlay.png b/Cooldowns/DivingSuitBrokenPlatesOverlay.png
deleted file mode 100644
index 82a575537e..0000000000
Binary files a/Cooldowns/DivingSuitBrokenPlatesOverlay.png and /dev/null differ
diff --git a/Cooldowns/DivingSuitCooldowns.cs b/Cooldowns/DivingSuitCooldowns.cs
deleted file mode 100644
index 9895bc155e..0000000000
--- a/Cooldowns/DivingSuitCooldowns.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Graphics;
-using Terraria;
-using Terraria.GameContent;
-using Terraria.Localization;
-using static CalamityMod.CalamityUtils;
-using static Terraria.ModLoader.ModContent;
-
-namespace CalamityMod.Cooldowns
-{
- public class DivingPlatesBreaking : CooldownHandler
- {
- private static Color phase0Color = new Color(147, 218, 183);
- private static Color phase1Color = new Color(233, 190, 134);
- private static Color phase2Color = new Color(220, 111, 94);
- private static Color ringColorLerpStart = new Color(160, 174, 174);
- private static Color ringColorLerpEnd = new Color(192, 11, 107);
-
- public static new string ID => "DivingPlatesBreaking";
- public override bool CanTickDown => !instance.player.Calamity().abyssalDivingSuit;
- public override bool ShouldDisplay => instance.player.Calamity().abyssalDivingSuit;
- public override LocalizedText DisplayName => GetText($"UI.Cooldowns.{ID}");
- public override string Texture => "CalamityMod/Cooldowns/DivingSuitBreakingPlates";
- public override string OutlineTexture => "CalamityMod/Cooldowns/DivingSuitBrokenPlatesOutline";
- public override string OverlayTexture => "CalamityMod/Cooldowns/DivingSuitBrokenPlatesOverlay";
- public override Color OutlineColor
- {
- get
- {
- if (instance.timeLeft == 0)
- return phase0Color;
- else if (instance.timeLeft == 1)
- return phase1Color;
- return phase2Color;
- }
- }
- public override Color CooldownStartColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
- public override Color CooldownEndColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
-
- public override void DrawCompact(SpriteBatch spriteBatch, Vector2 position, float opacity, float scale)
- {
- Texture2D sprite = Request(Texture).Value;
- Texture2D outline = Request(OutlineTexture).Value;
-
- //Draw the outline
- spriteBatch.Draw(outline, position, null, OutlineColor * opacity, 0, outline.Size() * 0.5f, scale, SpriteEffects.None, 0f);
- //Draw the icon
- spriteBatch.Draw(sprite, position, null, Color.White * opacity, 0, sprite.Size() * 0.5f, scale, SpriteEffects.None, 0f);
-
- DrawBorderStringEightWay(spriteBatch, FontAssets.MouseText.Value, (3 - instance.timeLeft).ToString(), position + new Vector2(-3, -3) * scale, CooldownStartColor, Color.Black, scale);
- }
- }
-
- public class DivingPlatesBroken : CooldownHandler
- {
- private static Color ringColorLerpStart = new Color(91, 121, 150);
- private static Color ringColorLerpEnd = new Color(30, 50, 77);
-
- public static new string ID => "DivingPlatesBroken";
- public override bool ShouldDisplay => true;
- public override LocalizedText DisplayName => GetText($"UI.Cooldowns.{ID}");
- public override string Texture => "CalamityMod/Cooldowns/DivingSuitBrokenPlates";
- public override Color OutlineColor => new Color(194, 173, 146);
- public override Color CooldownStartColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
- public override Color CooldownEndColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
-
- public override void OnCompleted() => instance.player.Calamity().abyssalDivingSuitPlateHits = 0;
- }
-}
diff --git a/Effects/CalamityShaders.cs b/Effects/CalamityShaders.cs
index 83d6559fb6..4df01dba2b 100644
--- a/Effects/CalamityShaders.cs
+++ b/Effects/CalamityShaders.cs
@@ -16,7 +16,7 @@ namespace CalamityMod.Effects
internal const string CalamityShaderPrefix = "CalamityMod:";
// made by boffin. Source code not available. Creates fog in the astral infection
- internal static Effect AstralFogShader;
+ internal static Asset AstralFogShader;
//
// All below shaders created by Lucille Karma
@@ -24,115 +24,115 @@ namespace CalamityMod.Effects
#region Lucille's Shaders
// The Dance of Light's Blinding Light
- internal static Effect DanceOfLightBlindingShader;
+ internal static Asset DanceOfLightBlindingShader;
// Calamity accessory
- internal static Effect CalamityAccessoryMouseShader;
+ internal static Asset CalamityAccessoryMouseShader;
// Subsuming Vortex tentacles
- internal static Effect SubsumingVortexTentacleShader;
+ internal static Asset SubsumingVortexTentacleShader;
// Draedon teleporting shader
- internal static Effect DraedonTeleportShader;
+ internal static Asset DraedonTeleportShader;
// UNKNOWN -- PROBABLY UNUSED
- internal static Effect LightDistortionShader;
+ internal static Asset LightDistortionShader;
// Phaseslayer red energy trail
- internal static Effect PhaseslayerRipShader;
+ internal static Asset PhaseslayerRipShader;
// Generic UV-fade streak trail shader. Used by many things?
- internal static Effect FadedUVMapStreakShader;
+ internal static Asset FadedUVMapStreakShader;
// Generic flaming streak trail shader. Used by many things?
- internal static Effect FlameStreakShader;
+ internal static Asset FlameStreakShader;
// Generic solid trail shader. Used by many things?
- internal static Effect FadingSolidTrailShader;
+ internal static Asset FadingSolidTrailShader;
// Typical projectile javelin glowing trail. BEWARE: Is used by many items!
- internal static Effect ScarletDevilShader;
+ internal static Asset ScarletDevilShader;
// Yharon border flame pillar trail.
- internal static Effect BordernadoFireShader;
+ internal static Asset BordernadoFireShader;
// Photon Ripper hardlight teeth trail shader
- internal static Effect PrismCrystalShader;
+ internal static Asset PrismCrystalShader;
// Generic flame trail. BEWARE: Reused by Apollo, Artemis, Cosmilamp, Gem Tech broken gems, and Persecuted enchant portal demons
- internal static Effect ImpFlameTrailShader;
+ internal static Asset ImpFlameTrailShader;
// Supreme Witch, Calamitas' force field (which is her visual hitbox)
- internal static Effect SCalShieldShader;
+ internal static Asset SCalShieldShader;
// Rancor's alchemical / satanic circle which floats near the player. The laser is emitted from here
- internal static Effect RancorMagicCircleShader;
+ internal static Asset RancorMagicCircleShader;
// Generic colored glow shader. BEWARE: Used by about a billion things, including Ares telegraphs, the Biome Blade line, etc.
- internal static Effect BasicTintShader;
+ internal static Asset BasicTintShader;
// Generic "pie chart" shader that renders only certain arc sectors of things. Used for the Cooldown Rack and various other visuals.
- internal static Effect CircularBarShader;
+ internal static Asset CircularBarShader;
// Cooldown Rack shader used to draw the cooldown's icon appropriately.
- internal static Effect CircularBarSpriteShader;
+ internal static Asset CircularBarSpriteShader;
// Devourer of Gods' death animation where he disintegrates into purple energy stuff.
- internal static Effect DoGDisintegrationShader;
+ internal static Asset DoGDisintegrationShader;
// Art Attack's main projectile trail shader (Visually designed to match Paper Mario)
- internal static Effect ArtAttackTrailShader;
+ internal static Asset ArtAttackTrailShader;
// Generic AoE telegraph. Used for Ares' nukes to denote their area of effect.
- internal static Effect CircularAoETelegraph;
+ internal static Asset CircularAoETelegraph;
// Clips a sprite along a fixed plane. Used by Stream Gouge to have half-spears come out of portals.
- internal static Effect IntersectionClipShader;
+ internal static Asset IntersectionClipShader;
// Was previously used by Dom's Bladecrest Oathsword. Appears to govern the swing animation.
- internal static Effect LocalLinearTransformationShader;
+ internal static Asset LocalLinearTransformationShader;
// UNUSED -- Probably leftover from Lucille's experiments with applying shaders to primitives (arbitrary GPU-rendered triangles)
- internal static Effect BasicPrimitiveShader;
+ internal static Asset BasicPrimitiveShader;
// Artemis Ohio Beam. Also used by get fixed boi Nuclear Terror's "G-FUEL BEAM"
- internal static Effect ArtemisLaserShader;
+ internal static Asset ArtemisLaserShader;
// Exoblade's melee slash trails. Also used by Terratomere
- internal static Effect ExobladeSlashShader;
+ internal static Asset ExobladeSlashShader;
// Exoblade's projectile on-hit "anime slash marks". Also used by Terratomere
- internal static Effect ExobladePierceShader;
+ internal static Asset ExobladePierceShader;
// Used by Subsuming Vortex's various vortices. Draws the main vortices. BEWARE: Reused by Burning Sea's fireball.
- internal static Effect ExoVortexShader;
+ internal static Asset ExoVortexShader;
// Used by Subsuming Vortex's small vortices. Draws the trailing energy tendrils.
- internal static Effect SideStreakTrailShader;
+ internal static Asset SideStreakTrailShader;
// Used by Heavenly Gale's hardlight arrows.
- internal static Effect HeavenlyGaleTrailShader;
+ internal static Asset HeavenlyGaleTrailShader;
// Used by Heavenly Gale's exo lightning strikes. Also used by Stormfront Razor lightning.
- internal static Effect HeavenlyGaleLightningShader;
+ internal static Asset HeavenlyGaleLightningShader;
// Used in the Codebreaker on Draedon's sprite while communicating with him.
- internal static Effect BlueStaticShader;
+ internal static Asset BlueStaticShader;
// Used by Acid Eels, presumably to have their snaking movements look more smooth.
- internal static Effect PrimTextureOverlayShader;
+ internal static Asset PrimTextureOverlayShader;
// Used as a default for primitive drawing when no specific shader is supplied. This shader simply renders the vertex color data without modification.
- internal static Effect StandardPrimitiveShader;
+ internal static Asset StandardPrimitiveShader;
// Used by Devourer of Gods. Renders the portal that he escapes through at the end of phase 1.
- internal static Effect DoGPortalShader;
+ internal static Asset DoGPortalShader;
// Used to render all-encompassing fog in the Floral Paradise biome.
- internal static Effect FogShader;
+ internal static Asset FogShader;
// Used to render background water features in the Floral Paradise biome.
- internal static Effect WaterfallShader;
+ internal static Asset WaterfallShader;
// Metaballs. See the MetaballManager class for comments on how this system works.
// These shaders are leveraged to render the results of the metaball simulation to the screen.
@@ -140,17 +140,17 @@ namespace CalamityMod.Effects
// The "Additive" shader actually FUSES the particles into their blobby mess.
//
// Backing textures vary. The primary use of this system is Gruesome Eminence.
- internal static Effect MetaballEdgeShader;
- internal static Effect AdditiveMetaballEdgeShader;
+ internal static Asset MetaballEdgeShader;
+ internal static Asset AdditiveMetaballEdgeShader;
// Used to render the results of Navier-Stokes fluid simulations.
- internal static Effect FluidShaders;
+ internal static Asset FluidShaders;
// Used by projectiles fired by the Sylvestaff.
- internal static Effect SylvestaffProjectileShader;
+ internal static Asset SylvestaffProjectileShader;
// Used by the ribbons on the Sylvestaff.
- internal static Effect SylvestaffRibbonShader;
+ internal static Asset SylvestaffRibbonShader;
#endregion
//
@@ -160,25 +160,25 @@ namespace CalamityMod.Effects
#region Iban's Shaders
// Used by Coral Spout and Titanium Railgun while charging to indicate current projectile spread.
- internal static Effect SpreadTelegraph;
+ internal static Asset SpreadTelegraph;
// Used by Wulfrum Screwdriver and Titanium Railgun. Renders a pixelly "laser sight".
- internal static Effect PixelatedSightLine;
+ internal static Asset PixelatedSightLine;
// Used by the Wulfrum Treasure Pinger to highlight tiles in range
- internal static Effect WulfrumTilePing;
+ internal static Asset WulfrumTilePing;
// Used by the Wulfrum Scaffold Kit to highlight locations where Scaffold tiles will be placed
- internal static Effect WulfrumScaffoldSelection;
+ internal static Asset WulfrumScaffoldSelection;
// Used to render the Rover Drive's force field around the player
- internal static Effect RoverDriveShield;
+ internal static Asset RoverDriveShield;
// UNUSED -- Probably leftover from Iban's work on the Biome Blade and Ark lines.
- internal static Effect RotateSprite;
+ internal static Asset RotateSprite;
// Used on Exoblade to draw the sword swinging dramatically. This was the edit Iban made to Dom's Exoblade.
- internal static Effect SwingSprite;
+ internal static Asset SwingSprite;
#endregion
//
@@ -187,14 +187,14 @@ namespace CalamityMod.Effects
#region Ozz's Shaders
// Used on players and NPCs when they have the Miracle Blight debuff.
- internal static Effect MiracleBlight;
+ internal static Asset MiracleBlight;
#endregion
#region Aqua's Shaders
- internal static Effect CircularGradientWithEdge;
- internal static Effect GaleforceArrowTrailShader;
- internal static Effect WavyOpacity;
- internal static Effect HellBall;
+ internal static Asset CircularGradientWithEdge;
+ internal static Asset GaleforceArrowTrailShader;
+ internal static Asset WavyOpacity;
+ internal static Asset HellBall;
#endregion
//
@@ -203,17 +203,25 @@ namespace CalamityMod.Effects
//
#region Amber's Shaders
- internal static Effect PrimitiveClearShader;
- internal static Effect HolyInfernoShader;
- internal static Effect DeerclopsShadowShader;
+ internal static Asset PrimitiveClearShader;
+ internal static Asset HolyInfernoShader;
+ internal static Asset DeerclopsShadowShader;
#endregion
#region YuH's Shaders
- internal static Effect TeslaTrailShader;
+ internal static Asset TeslaTrailShader;
#endregion
#region Doze's Shaders
- internal static Effect FlipScreenShader;
+ ///
+ /// Flips the screen. Used for Gravity Globe.
+ ///
+ internal static Asset FlipScreenShader;
+ ///
+ /// Distorts a texture towards the center based on a provided noisemap. Meant to emulate the Terraria Otherworld barrier effects.
+ /// Opacity is the intensity of this distortion, and Saturation is the speed the noisemap moves at.
+ ///
+ internal static Asset OtherworldBarrierDistortionShader;
#endregion
//
@@ -221,26 +229,30 @@ namespace CalamityMod.Effects
//
#region fryzahh's Shaders
// A simple shader which distorts an image using a provided texture of choice.
- internal static Effect BasicTextureDistortionShader;
+ internal static Asset BasicTextureDistortionShader;
// The underwater rays seen at the top of the Sunken Sea Mod Menu.
- internal static Effect UnderwaterRaysShader;
+ internal static Asset UnderwaterRaysShader;
// The blowing wind-like effect seen in the background during DoG's fight.
- internal static Effect DoGDistortionWindsShader;
+ internal static Asset DoGDistortionWindsShader;
// The rolling fog clouds seen behind the Distortion Winds effect during DoG's fight.
- internal static Effect DoGBackgroundFogShader;
+ internal static Asset DoGBackgroundFogShader;
// Allows a texture to control its opacity from the edges to the center in the shape of a circle.
- internal static Effect CircularOpacityShader;
+ internal static Asset CircularOpacityShader;
// The shader effect imposed onto the static crack textures seen during DoG's fight. Fades out the texture from its edges to its center and
// allows it to lerp between two colors depending on the brightness of individual pixels along the sampled texture.
- internal static Effect DoGRealityCrackShader;
+ internal static Asset DoGRealityCrackShader;
// The distorted circular effect seen emanating from the distortion rift during DoG's fight.
- internal static Effect DoGRiftAuraShader;
+ internal static Asset DoGRiftAuraShader;
+ #endregion
+
+ #region Big E's Shaders
+ internal static Asset SeaPrismColorBlendingShader;
#endregion
internal static Asset SunkenSeaMenuLogoWater;
@@ -251,15 +263,14 @@ namespace CalamityMod.Effects
// Shorthand to load shaders immediately.
// Strings provided to LoadShader are the .xnb file paths.
- Effect LoadShader(string path) => LoadShaderAsset(path).Value;
- Asset LoadShaderAsset(string path) => calAss.Request($"{ShaderPath}{path}", AssetRequestMode.ImmediateLoad);
+ Asset LoadShader(string path) => calAss.Request($"{ShaderPath}{path}", AssetRequestMode.ImmediateLoad);
//
// Loading and registering each individual compiled shader for use.
//
AstralFogShader = LoadShader("AstralFogShader");
- var astralPassReg = new AstralScreenShaderData(new Ref(AstralFogShader), "AstralPass").UseColor(0.18f, 0.08f, 0.24f);
+ var astralPassReg = new AstralScreenShaderData(AstralFogShader, "AstralPass").UseColor(0.18f, 0.08f, 0.24f);
RegisterSceneFilter(astralPassReg, "Astral", EffectPriority.VeryHigh);
#region Loading Lucille's Shaders
@@ -458,6 +469,9 @@ namespace CalamityMod.Effects
#region Loading Doze's Shaders
FlipScreenShader = LoadShader("ScreenShaders/FlipScreen");
RegisterScreenShader(FlipScreenShader, "FlipTheScreen", "FlipScreen",EffectPriority.VeryHigh);
+
+ OtherworldBarrierDistortionShader = LoadShader("OtherworldBarrierDistortion");
+ RegisterMiscShader(OtherworldBarrierDistortionShader, "DistortionPass", "OtherworldBarrierDistortion");
#endregion
#region Loading fryzahh's Shaders
@@ -483,16 +497,20 @@ namespace CalamityMod.Effects
RegisterMiscShader(DoGRiftAuraShader, "DoGRiftAuraPass", "DoGRiftAura");
#endregion
- SunkenSeaMenuLogoWater = LoadShaderAsset("UI/SunkenSeaMenuLogoWater");
+ #region Loading Big E's Shaders
+ SeaPrismColorBlendingShader = LoadShader("SeaPrismColorBlending");
+ RegisterMiscShader(SeaPrismColorBlendingShader, "SeaPrismBlendingPass", "SeaPrismColorBlending");
+ #endregion
+
+ SunkenSeaMenuLogoWater = LoadShader("UI/SunkenSeaMenuLogoWater");
}
// Shorthand to register a loaded shader in Terraria's graphics engine
// All shaders registered this way are accessible under GameShaders.Misc
// They will use the prefix described above
- private static void RegisterMiscShader(Effect shader, string passName, string registrationName)
+ private static void RegisterMiscShader(Asset shader, string passName, string registrationName)
{
- Ref shaderPointer = new(shader);
- MiscShaderData passParamRegistration = new(shaderPointer, passName);
+ MiscShaderData passParamRegistration = new(shader, passName);
GameShaders.Misc[$"{CalamityShaderPrefix}{registrationName}"] = passParamRegistration;
}
@@ -506,10 +524,9 @@ namespace CalamityMod.Effects
// Shorthand to register a loaded shader in Terraria's graphics engine
// All shaders registered this way are accessible under Filters.Scene
// They will use the prefix described above
- private static void RegisterScreenShader(Effect shader, string passName, string registrationName, EffectPriority priority = EffectPriority.High)
+ private static void RegisterScreenShader(Asset shader, string passName, string registrationName, EffectPriority priority = EffectPriority.High)
{
- Ref shaderPointer = new(shader);
- ScreenShaderData passParamRegistration = new(shaderPointer, passName);
+ ScreenShaderData passParamRegistration = new(shader, passName);
RegisterSceneFilter(passParamRegistration, registrationName, priority);
}
}
diff --git a/Effects/OtherworldBarrierDistortion.fx b/Effects/OtherworldBarrierDistortion.fx
new file mode 100644
index 0000000000..9f854ad59a
--- /dev/null
+++ b/Effects/OtherworldBarrierDistortion.fx
@@ -0,0 +1,52 @@
+sampler uImage0 : register(s0);
+sampler uImage1 : register(s1);
+float3 uColor;
+float3 uSecondaryColor;
+float uOpacity; //Opacity works as the intensity of the filter
+float uSaturation; //Saturation works as the speed of the noise movement
+float uRotation;
+float uTime;
+float4 uSourceRect;
+float2 uWorldPosition;
+float uDirection;
+float3 uLightSource;
+float2 uImageSize0;
+float2 uImageSize1;
+float4 uShaderSpecificData;
+
+float4 AdjustPixelPosition(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
+{
+ // Drift to offset the noisemap. X multiplier is a prime number to ensure the "loop time" of this is very high, it takes 100 uTime to return to the original state
+ float2 drift = float2(0.23 * uTime * uSaturation, uTime * uSaturation);
+
+ //This is the uv distance from the center of the texture
+ float2 uvOffsetFromCenter = (coords - 0.5);
+
+ float angle = atan2(uvOffsetFromCenter.y, uvOffsetFromCenter.x) / (2 * 3.1415926);
+ float dist = length(uvOffsetFromCenter);
+ float2 polarUV = float2(angle, dist);
+
+ // Gets the offset from the red channel of whatever pixel this should get from the noisemap. This is fine because the noisemap is greyscale.
+ float offsetToHave = tex2D(uImage1, polarUV + drift).x;
+
+ //This mask is to prevent weird stretching effects at the edge of the texture
+ float2 modifiedCoords = coords + uvOffsetFromCenter * offsetToHave * uOpacity;
+ float mask = step(0, modifiedCoords.x) * step(modifiedCoords.y, 1) *
+ step(0, modifiedCoords.y) * step(modifiedCoords.x, 1);
+
+ // This makes a greyscale image designed for additve use transparent for non-additve use.
+ // I would like to be able to draw directly additive, but I have been unable to make that work and this has worked well.
+ float4 distortedColor = tex2D(uImage0, modifiedCoords);
+ distortedColor.a = distortedColor.x;
+
+ return distortedColor * sampleColor * mask;
+}
+
+
+technique Technique1
+{
+ pass DistortionPass
+ {
+ PixelShader = compile ps_2_0 AdjustPixelPosition();
+ }
+}
\ No newline at end of file
diff --git a/Effects/OtherworldBarrierDistortion.xnb b/Effects/OtherworldBarrierDistortion.xnb
new file mode 100644
index 0000000000..d933cce2e5
Binary files /dev/null and b/Effects/OtherworldBarrierDistortion.xnb differ
diff --git a/Effects/SeaPrismColorBlending.fx b/Effects/SeaPrismColorBlending.fx
new file mode 100644
index 0000000000..6b941440ad
--- /dev/null
+++ b/Effects/SeaPrismColorBlending.fx
@@ -0,0 +1,69 @@
+sampler baseTexture : register(s0);
+sampler greenTexture : register(s1);
+sampler purpleTexture : register(s2);
+sampler glintTexture : register(s3);
+
+float time;
+float2 screenOffset;
+float2 offscreenOffset;
+float diagonalScreenLength;
+bool doGlint;
+
+float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0, float4 screenPos : VPOS) : COLOR
+{
+ // Calculate world position
+ float2 worldPos = screenPos.xy + screenOffset - offscreenOffset;
+
+ // Sample all three textures
+ float4 blueColor = tex2D(baseTexture, coords);
+ float4 purpleColor = tex2D(purpleTexture, coords);
+ float4 greenColor = tex2D(greenTexture, coords);
+ float4 glintColor = tex2D(glintTexture, coords);
+
+ // Calculate fade values
+ float fade1 = (sin(time * 0.2) + 1.0) / 2.0;
+ float fade2 = (sin(time * 0.1 + worldPos.x * 0.005 - worldPos.y * 0.003) + 1.0) / 2.0;
+
+ // Blend the colors
+ float4 result = blueColor;
+ result.rgb = lerp(result.rgb, greenColor.rgb, greenColor.a * fade1);
+ result.rgb = lerp(result.rgb, purpleColor.rgb, purpleColor.a * fade2);
+
+ if(doGlint)
+ {
+ // Calculate glint effect
+ float2 projPos = screenPos.xy - offscreenOffset;
+ float projection = (screenPos.x / 2.0) - (screenPos.y / 2.0);
+
+ // Define glint beam centers
+ float beamCenter1 = diagonalScreenLength * 0.05;
+ float beamCenter2 = diagonalScreenLength * 0.5;
+ float beamCenter3 = diagonalScreenLength * 1.05;
+
+ // Calculate glint strength for each beam
+ float dist1 = abs(projection - beamCenter1);
+ float dist2 = abs(projection - beamCenter2);
+ float dist3 = abs(projection - beamCenter3);
+
+ float strength1 = saturate(1.0 - dist1 / 100.0);
+ float strength2 = saturate(1.0 - dist2 / 100.0);
+ float strength3 = saturate(1.0 - dist3 / 100.0);
+
+ float totalGlintStrength = max(strength1, max(strength2, strength3));
+
+ // Apply glint
+ result.rgb = lerp(result.rgb, glintColor.rgb, glintColor.a * totalGlintStrength);
+
+ //Additive Blend Version (VERY BRIGHT)
+ //result.rgb = lerp(result.rgb, result.rgb + glintColor.rgb, glintColor.a * totalGlintStrength);
+ }
+ return result * sampleColor;
+}
+
+technique Technique1
+{
+ pass SeaPrismBlendingPass
+ {
+ PixelShader = compile ps_3_0 PixelShaderFunction();
+ }
+}
\ No newline at end of file
diff --git a/Effects/SeaPrismColorBlending.xnb b/Effects/SeaPrismColorBlending.xnb
new file mode 100644
index 0000000000..2a5812d348
Binary files /dev/null and b/Effects/SeaPrismColorBlending.xnb differ
diff --git a/Enums/ConvertType.cs b/Enums/ConvertType.cs
deleted file mode 100644
index ebea6267a6..0000000000
--- a/Enums/ConvertType.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace CalamityMod
-{
- public enum ConvertType
- {
- Pure,
- Corrupt,
- Crimson,
- Hallow
- }
-}
diff --git a/Enums/CooldownDisplayOptions.cs b/Enums/CooldownDisplayOptions.cs
new file mode 100644
index 0000000000..e5b3d1debb
--- /dev/null
+++ b/Enums/CooldownDisplayOptions.cs
@@ -0,0 +1,11 @@
+using Terraria.ModLoader.Config;
+
+namespace CalamityMod.Enums
+{
+ public enum CooldownDisplayOptions
+ {
+ Full,
+ Compact,
+ Hidden
+ }
+}
diff --git a/Enums/SetBonusDoubleTapOptions.cs b/Enums/SetBonusDoubleTapOptions.cs
index f71b0e4349..93d7c17f51 100644
--- a/Enums/SetBonusDoubleTapOptions.cs
+++ b/Enums/SetBonusDoubleTapOptions.cs
@@ -4,11 +4,8 @@ namespace CalamityMod.Enums
{
public enum SetBonusDoubleTapOptions
{
- [LabelKey("$Mods.CalamityMod.Configs.CalamityClientConfig.SetBonusDoubleTap.Options.On")]
On,
- [LabelKey("$Mods.CalamityMod.Configs.CalamityClientConfig.SetBonusDoubleTap.Options.Auto")]
Auto,
- [LabelKey("$Mods.CalamityMod.Configs.CalamityClientConfig.SetBonusDoubleTap.Options.Off")]
Off
}
}
diff --git a/ExtraTextures/GreyscaleGradients/MeltyNoiseHighContrast.png b/ExtraTextures/GreyscaleGradients/MeltyNoiseHighContrast.png
new file mode 100644
index 0000000000..5755d5971d
Binary files /dev/null and b/ExtraTextures/GreyscaleGradients/MeltyNoiseHighContrast.png differ
diff --git a/FluidSimulation/FluidField.cs b/FluidSimulation/FluidField.cs
index eed9ca02fe..7757b6613d 100644
--- a/FluidSimulation/FluidField.cs
+++ b/FluidSimulation/FluidField.cs
@@ -172,11 +172,11 @@ namespace CalamityMod.FluidSimulation
ApplyThingToTarget(field.NextState, () =>
{
Main.instance.GraphicsDevice.Textures[1] = field.PreviousState;
- CalamityShaders.FluidShaders.Parameters["size"].SetValue(Size);
- CalamityShaders.FluidShaders.Parameters["diffusionFactor"].SetValue(diffusionFactor);
- CalamityShaders.FluidShaders.Parameters["handlingColors"].SetValue(colors);
- CalamityShaders.FluidShaders.Parameters["dissipationFactor"].SetValue(DissipationFactor);
- CalamityShaders.FluidShaders.CurrentTechnique.Passes["DiffusionPass"].Apply();
+ CalamityShaders.FluidShaders.Value.Parameters["size"].SetValue(Size);
+ CalamityShaders.FluidShaders.Value.Parameters["diffusionFactor"].SetValue(diffusionFactor);
+ CalamityShaders.FluidShaders.Value.Parameters["handlingColors"].SetValue(colors);
+ CalamityShaders.FluidShaders.Value.Parameters["dissipationFactor"].SetValue(DissipationFactor);
+ CalamityShaders.FluidShaders.Value.CurrentTechnique.Passes["DiffusionPass"].Apply();
});
}
@@ -186,10 +186,10 @@ namespace CalamityMod.FluidSimulation
{
Main.instance.GraphicsDevice.Textures[1] = currentField;
Main.instance.GraphicsDevice.Textures[2] = velocities;
- CalamityShaders.FluidShaders.Parameters["size"].SetValue(Size);
- CalamityShaders.FluidShaders.Parameters["deltaTime"].SetValue(DeltaTime);
- CalamityShaders.FluidShaders.Parameters["handlingColors"].SetValue(colors);
- CalamityShaders.FluidShaders.CurrentTechnique.Passes["AdvectionPass"].Apply();
+ CalamityShaders.FluidShaders.Value.Parameters["size"].SetValue(Size);
+ CalamityShaders.FluidShaders.Value.Parameters["deltaTime"].SetValue(DeltaTime);
+ CalamityShaders.FluidShaders.Value.Parameters["handlingColors"].SetValue(colors);
+ CalamityShaders.FluidShaders.Value.CurrentTechnique.Passes["AdvectionPass"].Apply();
});
}
@@ -199,8 +199,8 @@ namespace CalamityMod.FluidSimulation
ApplyThingToTarget(DivergenceField, () =>
{
Main.instance.GraphicsDevice.Textures[2] = velocities;
- CalamityShaders.FluidShaders.Parameters["size"].SetValue(Size);
- CalamityShaders.FluidShaders.CurrentTechnique.Passes["InitializeDivergencePass"].Apply();
+ CalamityShaders.FluidShaders.Value.Parameters["size"].SetValue(Size);
+ CalamityShaders.FluidShaders.Value.CurrentTechnique.Passes["InitializeDivergencePass"].Apply();
});
// Clear the Poisson values and then calculate them, for use in the divergence clearance pass.
@@ -214,8 +214,8 @@ namespace CalamityMod.FluidSimulation
Main.instance.GraphicsDevice.Textures[1] = DivergencePoissonField;
Main.instance.GraphicsDevice.Textures[2] = velocities;
Main.instance.GraphicsDevice.Textures[4] = DivergenceField;
- CalamityShaders.FluidShaders.Parameters["size"].SetValue(Size);
- CalamityShaders.FluidShaders.CurrentTechnique.Passes["PerformPoissonIterationPass"].Apply();
+ CalamityShaders.FluidShaders.Value.Parameters["size"].SetValue(Size);
+ CalamityShaders.FluidShaders.Value.CurrentTechnique.Passes["PerformPoissonIterationPass"].Apply();
});
}
@@ -223,7 +223,7 @@ namespace CalamityMod.FluidSimulation
{
Main.instance.GraphicsDevice.Textures[1] = velocities;
Main.instance.GraphicsDevice.Textures[3] = DivergencePoissonField;
- CalamityShaders.FluidShaders.CurrentTechnique.Passes["ClearDivergencePass"].Apply();
+ CalamityShaders.FluidShaders.Value.CurrentTechnique.Passes["ClearDivergencePass"].Apply();
});
}
@@ -282,7 +282,7 @@ namespace CalamityMod.FluidSimulation
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity);
Main.instance.GraphicsDevice.Textures[5] = ColorField.NextState;
- CalamityShaders.FluidShaders.CurrentTechnique.Passes["DrawFluidPass"].Apply();
+ CalamityShaders.FluidShaders.Value.CurrentTechnique.Passes["DrawFluidPass"].Apply();
Main.spriteBatch.Draw(DensityField.NextState, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 1f, 0, 0f);
Main.spriteBatch.End();
diff --git a/Fonts/CodebreakerDialog.xnb b/Fonts/CodebreakerDialog.xnb
index 45515ed30f..fad15220ba 100644
Binary files a/Fonts/CodebreakerDialog.xnb and b/Fonts/CodebreakerDialog.xnb differ
diff --git a/Gores/EutrophicRay/RayGore1.png b/Gores/EutrophicRay/RayGore1.png
deleted file mode 100644
index 3ace444fd4..0000000000
Binary files a/Gores/EutrophicRay/RayGore1.png and /dev/null differ
diff --git a/Gores/EutrophicRay/RayGore2.png b/Gores/EutrophicRay/RayGore2.png
deleted file mode 100644
index 3ff64c48fd..0000000000
Binary files a/Gores/EutrophicRay/RayGore2.png and /dev/null differ
diff --git a/Gores/EutrophicRay/RayGore3.png b/Gores/EutrophicRay/RayGore3.png
deleted file mode 100644
index 777469c5cd..0000000000
Binary files a/Gores/EutrophicRay/RayGore3.png and /dev/null differ
diff --git a/Gores/EutrophicRay/RayGore4.png b/Gores/EutrophicRay/RayGore4.png
deleted file mode 100644
index 8764f51981..0000000000
Binary files a/Gores/EutrophicRay/RayGore4.png and /dev/null differ
diff --git a/Gores/SunkenSea/EutrophicRay/EutrophicRay.png b/Gores/SunkenSea/EutrophicRay/EutrophicRay.png
new file mode 100644
index 0000000000..396aceb7a2
Binary files /dev/null and b/Gores/SunkenSea/EutrophicRay/EutrophicRay.png differ
diff --git a/Gores/SunkenSea/EutrophicRay/EutrophicRay2.png b/Gores/SunkenSea/EutrophicRay/EutrophicRay2.png
new file mode 100644
index 0000000000..e1510c0c33
Binary files /dev/null and b/Gores/SunkenSea/EutrophicRay/EutrophicRay2.png differ
diff --git a/Gores/SunkenSea/Probesnout/Probesnout1.png b/Gores/SunkenSea/Probesnout/Probesnout.png
similarity index 100%
rename from Gores/SunkenSea/Probesnout/Probesnout1.png
rename to Gores/SunkenSea/Probesnout/Probesnout.png
diff --git a/Gores/SunkenSea/Shoreskipper/Shoreskipper.png b/Gores/SunkenSea/Shoreskipper/Shoreskipper.png
new file mode 100644
index 0000000000..cf34b7503a
Binary files /dev/null and b/Gores/SunkenSea/Shoreskipper/Shoreskipper.png differ
diff --git a/Gores/SunkenSea/Shoreskipper/Shoreskipper2.png b/Gores/SunkenSea/Shoreskipper/Shoreskipper2.png
new file mode 100644
index 0000000000..bea9f285b7
Binary files /dev/null and b/Gores/SunkenSea/Shoreskipper/Shoreskipper2.png differ
diff --git a/Graphics/Metaballs/BloodBoilerMetaball.cs b/Graphics/Metaballs/BloodBoilerMetaball.cs
index 86bf43c440..7b253e77ab 100644
--- a/Graphics/Metaballs/BloodBoilerMetaball.cs
+++ b/Graphics/Metaballs/BloodBoilerMetaball.cs
@@ -72,12 +72,12 @@ namespace CalamityMod.Graphics.Metaballs
Vector2 screenSize = new(Main.screenWidth, Main.screenHeight);
// Supply shader parameter values.
- metaballShader.Parameters["screenArea"]?.SetValue(screenSize);
- metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
- metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["screenArea"]?.SetValue(screenSize);
+ metaballShader.Value.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
// Apply the metaball shader.
- metaballShader.CurrentTechnique.Passes[0].Apply();
+ metaballShader.Value.CurrentTechnique.Passes[0].Apply();
}
public static void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size));
diff --git a/Graphics/Metaballs/BloodBoilerMetaball2.cs b/Graphics/Metaballs/BloodBoilerMetaball2.cs
index a6034d5219..323bb8ba1f 100644
--- a/Graphics/Metaballs/BloodBoilerMetaball2.cs
+++ b/Graphics/Metaballs/BloodBoilerMetaball2.cs
@@ -72,12 +72,12 @@ namespace CalamityMod.Graphics.Metaballs
Vector2 screenSize = new(Main.screenWidth, Main.screenHeight);
// Supply shader parameter values.
- metaballShader.Parameters["screenArea"]?.SetValue(screenSize);
- metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
- metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["screenArea"]?.SetValue(screenSize);
+ metaballShader.Value.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
// Apply the metaball shader.
- metaballShader.CurrentTechnique.Passes[0].Apply();
+ metaballShader.Value.CurrentTechnique.Passes[0].Apply();
}
public static void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size));
diff --git a/Graphics/Metaballs/DoGDistortionMetaball.cs b/Graphics/Metaballs/DoGDistortionMetaball.cs
index 173b2430ea..84a32b18ab 100644
--- a/Graphics/Metaballs/DoGDistortionMetaball.cs
+++ b/Graphics/Metaballs/DoGDistortionMetaball.cs
@@ -67,16 +67,16 @@ namespace CalamityMod.Graphics.Metaballs
if (FixedToScreen)
layerScrollOffset = Vector2.Zero;
- metaballShader.Parameters["layerSize"]?.SetValue(DoGVisualsManager.DistortionForegroundContentsTarget.Target.Size());
- metaballShader.Parameters["screenSize"]?.SetValue(screenSize);
- metaballShader.Parameters["layerOffset"]?.SetValue(layerScrollOffset);
- metaballShader.Parameters["edgeColor"]?.SetValue(EdgeColor.ToVector4());
- metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue((Main.screenLastPosition - Main.screenPosition) / screenSize);
+ metaballShader.Value.Parameters["layerSize"]?.SetValue(DoGVisualsManager.DistortionForegroundContentsTarget.Target.Size());
+ metaballShader.Value.Parameters["screenSize"]?.SetValue(screenSize);
+ metaballShader.Value.Parameters["layerOffset"]?.SetValue(layerScrollOffset);
+ metaballShader.Value.Parameters["edgeColor"]?.SetValue(EdgeColor.ToVector4());
+ metaballShader.Value.Parameters["singleFrameScreenOffset"]?.SetValue((Main.screenLastPosition - Main.screenPosition) / screenSize);
gd.Textures[1] = DoGVisualsManager.DistortionForegroundContentsTarget;
gd.SamplerStates[1] = SamplerState.LinearWrap;
- metaballShader.CurrentTechnique.Passes[0].Apply();
+ metaballShader.Value.CurrentTechnique.Passes[0].Apply();
}
public override void DrawInstances()
diff --git a/Graphics/Metaballs/DragonsBreathMetaball.cs b/Graphics/Metaballs/DragonsBreathMetaball.cs
index e041506bb2..aba4cc4458 100644
--- a/Graphics/Metaballs/DragonsBreathMetaball.cs
+++ b/Graphics/Metaballs/DragonsBreathMetaball.cs
@@ -90,12 +90,12 @@ namespace CalamityMod.Graphics.Metaballs
Vector2 screenSize = new(Main.screenWidth, Main.screenHeight);
// Supply shader parameter values.
- metaballShader.Parameters["screenArea"]?.SetValue(screenSize);
- metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
- metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["screenArea"]?.SetValue(screenSize);
+ metaballShader.Value.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
// Apply the metaball shader.
- metaballShader.CurrentTechnique.Passes[0].Apply();
+ metaballShader.Value.CurrentTechnique.Passes[0].Apply();
}
public void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size));
diff --git a/Graphics/Metaballs/DragonsBreathMetaball2.cs b/Graphics/Metaballs/DragonsBreathMetaball2.cs
index c07f13e894..49753e9ebb 100644
--- a/Graphics/Metaballs/DragonsBreathMetaball2.cs
+++ b/Graphics/Metaballs/DragonsBreathMetaball2.cs
@@ -90,12 +90,12 @@ namespace CalamityMod.Graphics.Metaballs
Vector2 screenSize = new(Main.screenWidth, Main.screenHeight);
// Supply shader parameter values.
- metaballShader.Parameters["screenArea"]?.SetValue(screenSize);
- metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
- metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["screenArea"]?.SetValue(screenSize);
+ metaballShader.Value.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
// Apply the metaball shader.
- metaballShader.CurrentTechnique.Passes[0].Apply();
+ metaballShader.Value.CurrentTechnique.Passes[0].Apply();
}
public void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size));
diff --git a/Graphics/Metaballs/Metaball.cs b/Graphics/Metaballs/Metaball.cs
index adff926565..ae150455a4 100644
--- a/Graphics/Metaballs/Metaball.cs
+++ b/Graphics/Metaballs/Metaball.cs
@@ -106,19 +106,19 @@ namespace CalamityMod.Graphics.Metaballs
layerScrollOffset = Vector2.Zero;
// Supply shader parameter values.
- metaballShader.Parameters["layerSize"]?.SetValue(layerTexture.Size());
- metaballShader.Parameters["screenSize"]?.SetValue(screenSize);
- metaballShader.Parameters["layerOffset"]?.SetValue(layerScrollOffset);
- metaballShader.Parameters["edgeColor"]?.SetValue(EdgeColor.ToVector4());
- metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue((Main.screenLastPosition - Main.screenPosition) / screenSize);
- metaballShader.Parameters["layerColor"]?.SetValue(LayerColors.Count() > layerIndex ? LayerColors[layerIndex] : Color.White.ToVector4());
+ metaballShader.Value.Parameters["layerSize"]?.SetValue(layerTexture.Size());
+ metaballShader.Value.Parameters["screenSize"]?.SetValue(screenSize);
+ metaballShader.Value.Parameters["layerOffset"]?.SetValue(layerScrollOffset);
+ metaballShader.Value.Parameters["edgeColor"]?.SetValue(EdgeColor.ToVector4());
+ metaballShader.Value.Parameters["singleFrameScreenOffset"]?.SetValue((Main.screenLastPosition - Main.screenPosition) / screenSize);
+ metaballShader.Value.Parameters["layerColor"]?.SetValue(LayerColors.Count() > layerIndex ? LayerColors[layerIndex] : Color.White.ToVector4());
// Supply the metaball's layer texture to the graphics device so that the shader can read it.
gd.Textures[1] = layerTexture;
gd.SamplerStates[1] = SamplerState.LinearWrap;
// Apply the metaball shader.
- metaballShader.CurrentTechnique.Passes[0].Apply();
+ metaballShader.Value.CurrentTechnique.Passes[0].Apply();
}
///
diff --git a/Graphics/Metaballs/PaintMetaballs.cs b/Graphics/Metaballs/PaintMetaballs.cs
index 0501af90ff..4773d80083 100644
--- a/Graphics/Metaballs/PaintMetaballs.cs
+++ b/Graphics/Metaballs/PaintMetaballs.cs
@@ -86,12 +86,12 @@ namespace CalamityMod.Graphics.Metaballs
Vector2 screenSize = new(Main.screenWidth, Main.screenHeight);
// Supply shader parameter values.
- metaballShader.Parameters["screenArea"]?.SetValue(screenSize);
- metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
- metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["screenArea"]?.SetValue(screenSize);
+ metaballShader.Value.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
// Apply the metaball shader.
- metaballShader.CurrentTechnique.Passes[0].Apply();
+ metaballShader.Value.CurrentTechnique.Passes[0].Apply();
}
public void SpawnParticle(Vector2 position, float size) =>
diff --git a/Graphics/Metaballs/PhotoMetaball.cs b/Graphics/Metaballs/PhotoMetaball.cs
index 6d3447dd90..7b2d07c007 100644
--- a/Graphics/Metaballs/PhotoMetaball.cs
+++ b/Graphics/Metaballs/PhotoMetaball.cs
@@ -91,12 +91,12 @@ namespace CalamityMod.Graphics.Metaballs
Vector2 screenSize = new(Main.screenWidth, Main.screenHeight);
// Supply shader parameter values.
- metaballShader.Parameters["screenArea"]?.SetValue(screenSize);
- metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
- metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["screenArea"]?.SetValue(screenSize);
+ metaballShader.Value.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
// Apply the metaball shader.
- metaballShader.CurrentTechnique.Passes[0].Apply();
+ metaballShader.Value.CurrentTechnique.Passes[0].Apply();
}
public static void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size));
diff --git a/Graphics/Metaballs/PhotoMetaball2.cs b/Graphics/Metaballs/PhotoMetaball2.cs
index f1cdc7737f..cdba6d5b54 100644
--- a/Graphics/Metaballs/PhotoMetaball2.cs
+++ b/Graphics/Metaballs/PhotoMetaball2.cs
@@ -92,12 +92,12 @@ namespace CalamityMod.Graphics.Metaballs
Vector2 screenSize = new(Main.screenWidth, Main.screenHeight);
// Supply shader parameter values.
- metaballShader.Parameters["screenArea"]?.SetValue(screenSize);
- metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
- metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["screenArea"]?.SetValue(screenSize);
+ metaballShader.Value.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
// Apply the metaball shader.
- metaballShader.CurrentTechnique.Passes[0].Apply();
+ metaballShader.Value.CurrentTechnique.Passes[0].Apply();
}
public static void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size));
diff --git a/Graphics/Metaballs/PhotoMetaball3.cs b/Graphics/Metaballs/PhotoMetaball3.cs
index cfb21ea60d..017697f976 100644
--- a/Graphics/Metaballs/PhotoMetaball3.cs
+++ b/Graphics/Metaballs/PhotoMetaball3.cs
@@ -87,12 +87,12 @@ namespace CalamityMod.Graphics.Metaballs
Vector2 screenSize = new(Main.screenWidth, Main.screenHeight);
// Supply shader parameter values.
- metaballShader.Parameters["screenArea"]?.SetValue(screenSize);
- metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
- metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["screenArea"]?.SetValue(screenSize);
+ metaballShader.Value.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
// Apply the metaball shader.
- metaballShader.CurrentTechnique.Passes[0].Apply();
+ metaballShader.Value.CurrentTechnique.Passes[0].Apply();
}
public static void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size));
diff --git a/Graphics/Metaballs/PhotoMetaball4.cs b/Graphics/Metaballs/PhotoMetaball4.cs
index 2df1a25d8b..114a32bf76 100644
--- a/Graphics/Metaballs/PhotoMetaball4.cs
+++ b/Graphics/Metaballs/PhotoMetaball4.cs
@@ -86,12 +86,12 @@ namespace CalamityMod.Graphics.Metaballs
Vector2 screenSize = new(Main.screenWidth, Main.screenHeight);
// Supply shader parameter values.
- metaballShader.Parameters["screenArea"]?.SetValue(screenSize);
- metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
- metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["screenArea"]?.SetValue(screenSize);
+ metaballShader.Value.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
// Apply the metaball shader.
- metaballShader.CurrentTechnique.Passes[0].Apply();
+ metaballShader.Value.CurrentTechnique.Passes[0].Apply();
}
public static void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size));
diff --git a/Graphics/Metaballs/RancorLavaMetaball.cs b/Graphics/Metaballs/RancorLavaMetaball.cs
index ef0d3c6124..5c26a4ffdb 100644
--- a/Graphics/Metaballs/RancorLavaMetaball.cs
+++ b/Graphics/Metaballs/RancorLavaMetaball.cs
@@ -68,12 +68,12 @@ namespace CalamityMod.Graphics.Metaballs
Vector2 screenSize = new(Main.screenWidth, Main.screenHeight);
// Supply shader parameter values.
- metaballShader.Parameters["screenArea"]?.SetValue(screenSize);
- metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
- metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["screenArea"]?.SetValue(screenSize);
+ metaballShader.Value.Parameters["layerOffset"]?.SetValue(Vector2.Zero);
+ metaballShader.Value.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero);
// Apply the metaball shader.
- metaballShader.CurrentTechnique.Passes[0].Apply();
+ metaballShader.Value.CurrentTechnique.Passes[0].Apply();
}
public static void SpawnParticle(Vector2 position, float size) =>
diff --git a/Graphics/Metaballs/ScalArenaMetaball.cs b/Graphics/Metaballs/ScalArenaMetaball.cs
index a94cebbfa8..a57d474009 100644
--- a/Graphics/Metaballs/ScalArenaMetaball.cs
+++ b/Graphics/Metaballs/ScalArenaMetaball.cs
@@ -84,7 +84,7 @@ namespace CalamityMod.Graphics.Metaballs
}
public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeNPCs;
- public override Color EdgeColor => CalamityGlobalNPC.SCal >= 0 && Main.npc[CalamityGlobalNPC.SCal].ModNPC().ArenaBox is not null ? Main.npc[CalamityGlobalNPC.SCal].ModNPC().ArenaBox.borderColor : SupremeCalamitas.AcceptanceColor;
+ public override Color EdgeColor => SupremeCalamitas.CurrentColor;
public override void Update()
{
diff --git a/Graphics/RenderTargetManager.cs b/Graphics/RenderTargetManager.cs
index 5c4888044c..56b673c968 100644
--- a/Graphics/RenderTargetManager.cs
+++ b/Graphics/RenderTargetManager.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ModLoader;
@@ -11,7 +10,7 @@ namespace CalamityMod.Graphics
///
public class RenderTargetManager : ModSystem
{
- internal static List ManagedTargets = new();
+ internal static List ManagedTargets { get; } = [];
public delegate void RenderTargetUpdateDelegate();
@@ -42,9 +41,6 @@ namespace CalamityMod.Graphics
internal static void DisposeOfTargets()
{
- if (ManagedTargets is null)
- return;
-
Main.QueueMainThreadAction(() =>
{
foreach (ManagedRenderTarget target in ManagedTargets)
@@ -55,7 +51,6 @@ namespace CalamityMod.Graphics
public override void OnModLoad()
{
- ManagedTargets = new();
Main.OnPreDraw += HandleTargetUpdateLoop;
Main.OnResolutionChanged += ResetTargetSizes;
}
@@ -76,19 +71,17 @@ namespace CalamityMod.Graphics
private void HandleTargetUpdateLoop(GameTime obj)
{
// Auto-disposal of targets that havent been used in a while, to stop them hogging GPU memory.
- if (ManagedTargets != null)
+ foreach (ManagedRenderTarget target in ManagedTargets)
{
- foreach (ManagedRenderTarget target in ManagedTargets)
- {
- if (target == null || target.IsDisposed || !target.ShouldAutoDispose)
- continue;
+ if (target == null || target.IsDisposed || !target.ShouldAutoDispose)
+ continue;
- if (target.TimeSinceLastAccessed >= TimeBeforeAutoDispose)
- target.Dispose();
- else
- target.TimeSinceLastAccessed++;
- }
+ if (target.TimeSinceLastAccessed >= TimeBeforeAutoDispose)
+ target.Dispose();
+ else
+ target.TimeSinceLastAccessed++;
}
+
RenderTargetUpdateLoopEvent?.Invoke();
}
}
diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs
index 6994a1e1c6..3da313883e 100644
--- a/ILEditing/ILChangesLoading.cs
+++ b/ILEditing/ILChangesLoading.cs
@@ -13,6 +13,7 @@ using Terraria.GameContent.Liquid;
using Terraria.GameContent.UI.Elements;
using Terraria.GameContent.UI.States;
using Terraria.GameInput;
+using Terraria.Graphics.CameraModifiers;
using Terraria.Graphics.Light;
using Terraria.Map;
using Terraria.ModLoader;
@@ -82,7 +83,6 @@ namespace CalamityMod.ILEditing
On_Projectile.NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float += IncorporateExtraProjectileVariables;
On_Player.ApplyDamageToNPC += ApplyOldFashionedDamageToMiscHits;
IL_Wiring.HitWireSingle += AddTwinklersToStatue;
- On_Player.UpdateItemDye += FindCalamityItemDyeShader;
On_AWorldListItem.GetDifficulty += GetDifficultyOverride;
On_Item.GetShimmered += ShimmerEffectEdits;
On_Player.Teleport += TPOverride;
@@ -188,6 +188,7 @@ namespace CalamityMod.ILEditing
IL_Player.StatusFromNPC += RemoveExpertBrainRandomDebuffs;
IL_NPC.VanillaHitEffect += PreventLavaSlimeLavaDrop;
IL_NPC.StrikeNPC_HitInfo_bool_bool += LetDetonatingBubblesTakeDamage;
+ IL_PunchCameraModifier.Update += PunchCameraUsesScreenshakeConfig;
IL_Player.ItemCheck_EmitUseVisuals += MakeMagmaStoneFireGauntletDustToggleable;
IL_Projectile.EmitEnchantmentVisualsAt += MakeMagmaStoneFireGauntletProjectileDustToggleable;
IL_Sandstorm.HasSufficientWind += DecreaseSandstormWindSpeedRequirement;
diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs
index f8943f9e86..90aa61ab39 100644
--- a/ILEditing/MechanicILChanges.cs
+++ b/ILEditing/MechanicILChanges.cs
@@ -2,7 +2,6 @@
using System.Linq;
using System.Reflection;
using CalamityMod.Balancing;
-using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.CalPlayer;
using CalamityMod.Cooldowns;
using CalamityMod.DataStructures;
@@ -19,11 +18,7 @@ using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.NPCs;
using CalamityMod.NPCs.Abyss;
using CalamityMod.NPCs.Astral;
-using CalamityMod.NPCs.AstrumAureus;
-using CalamityMod.NPCs.Crabulon;
using CalamityMod.NPCs.DraedonLabThings;
-using CalamityMod.NPCs.NormalNPCs;
-using CalamityMod.NPCs.Ravager;
using CalamityMod.NPCs.SunkenSea;
using CalamityMod.Packets;
using CalamityMod.Particles;
@@ -36,7 +31,6 @@ using CalamityMod.Tiles;
using CalamityMod.Walls;
using CalamityMod.Walls.UnsafeWalls;
using CalamityMod.Waterfalls;
-using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Mono.Cecil.Cil;
@@ -44,10 +38,8 @@ using MonoMod.Cil;
using ReLogic.Content;
using Terraria;
using Terraria.Audio;
-using Terraria.Chat;
using Terraria.DataStructures;
using Terraria.GameContent;
-using Terraria.GameContent.Achievements;
using Terraria.GameContent.Biomes;
using Terraria.GameContent.Drawing;
using Terraria.GameContent.Events;
@@ -306,7 +298,7 @@ namespace CalamityMod.ILEditing
return;
}
- if (CalamityKeybinds.DashHotkey.GetAssignedKeys().Count == 0)
+ if (CalamityKeybinds.DashHotkey.GetAssignedKeysOrEmpty().Count == 0)
orig(self, out dir, out dashing, dashStartAction);
else
{
@@ -324,7 +316,7 @@ namespace CalamityMod.ILEditing
return;
}
- if ((CalamityKeybinds.ArmorSetBonusHotKey.GetAssignedKeys().Count != 0 && CalamityClientConfig.Instance.SetBonusDoubleTap == SetBonusDoubleTapOptions.Auto) || CalamityClientConfig.Instance.SetBonusDoubleTap == SetBonusDoubleTapOptions.Off)
+ if ((CalamityKeybinds.ArmorSetBonusHotKey.GetAssignedKeysOrEmpty().Count != 0 && CalamityClientConfig.Instance.SetBonusDoubleTap == SetBonusDoubleTapOptions.Auto) || CalamityClientConfig.Instance.SetBonusDoubleTap == SetBonusDoubleTapOptions.Off)
return;
orig(self, keyDir);
@@ -677,7 +669,8 @@ namespace CalamityMod.ILEditing
#endregion
#region Chaos Stone Mana Burn changes
- private static bool AllowNegativeCheckMana(On_Player.orig_CheckMana_int_bool_bool orig, Player self, int amount, bool pay, bool blockQuickMana) {
+ private static bool AllowNegativeCheckMana(On_Player.orig_CheckMana_int_bool_bool orig, Player self, int amount, bool pay, bool blockQuickMana)
+ {
if (self.Calamity().ChaosStone)
{
if (pay)
@@ -689,7 +682,8 @@ namespace CalamityMod.ILEditing
return orig(self, amount, pay, blockQuickMana);
}
- private static bool AllowNegativeCheckMana(On_Player.orig_CheckMana_Item_int_bool_bool orig, Player self, Item item, int amount, bool pay, bool blockQuickMana) {
+ private static bool AllowNegativeCheckMana(On_Player.orig_CheckMana_Item_int_bool_bool orig, Player self, Item item, int amount, bool pay, bool blockQuickMana)
+ {
if (self.Calamity().ChaosStone)
{
if (pay)
@@ -960,7 +954,8 @@ namespace CalamityMod.ILEditing
LogFailure("DoDraw Lava", "Could not locate the drawing of Background Waters");
return;
}
- cursor.EmitDelegate(() => {
+ cursor.EmitDelegate(() =>
+ {
LavaRenderingSystem.Instance.DrawLavas(isBackground: true);
});
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdsfld("drawToScreen"), i => i.MatchBrfalse(out _), i => i.MatchLdarg0(), i => i.MatchLdcI4(0), i => i.MatchCall("DrawWaters")))
@@ -968,7 +963,8 @@ namespace CalamityMod.ILEditing
LogFailure("DoDraw Lava", "Could not locate the drawing of Waters");
return;
}
- cursor.EmitDelegate(() => {
+ cursor.EmitDelegate(() =>
+ {
LavaRenderingSystem.Instance.DrawLavas();
});
}
@@ -981,7 +977,8 @@ namespace CalamityMod.ILEditing
LogFailure("Render Lava", "Could not locate the drawing of Waters");
return;
}
- cursor.EmitDelegate(() => {
+ cursor.EmitDelegate(() =>
+ {
LavaRenderingSystem.Instance.DrawLavas();
});
}
@@ -994,7 +991,8 @@ namespace CalamityMod.ILEditing
LogFailure("Render Lava Backgroumds", "Could not locate the drawing of Background Waters");
return;
}
- cursor.EmitDelegate(() => {
+ cursor.EmitDelegate(() =>
+ {
LavaRenderingSystem.Instance.DrawLavas(isBackground: true);
});
}
@@ -1007,7 +1005,8 @@ namespace CalamityMod.ILEditing
LogFailure("Draw lavas to captures", "Could not locate the saving of water alphas");
return;
}
- cursor.EmitDelegate(() => {
+ cursor.EmitDelegate(() =>
+ {
LavaRenderingSystem.LavaAlpha.CopyTo(LavaRenderingSystem.AlphaSave, 0);
});
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcI4(0), i => i.MatchStloc(34), i => i.MatchBr(out _), i => i.MatchLdloc(34), i => i.MatchLdcI4(1), i => i.MatchBeq(out _)))
@@ -1016,7 +1015,8 @@ namespace CalamityMod.ILEditing
return;
}
cursor.EmitLdloc(8);
- cursor.EmitDelegate((CaptureBiome biome) => {
+ cursor.EmitDelegate((CaptureBiome biome) =>
+ {
for (int i = 0; i < 1; i++)
{
LavaRenderingSystem.LavaAlpha[i] = ((i == LavaRenderingSystem.LavaStyle) ? 1f : 0f);
@@ -1027,7 +1027,8 @@ namespace CalamityMod.ILEditing
LogFailure("Draw lavas to captures", "Could not locate the background of liquid capture drawing");
return;
}
- cursor.EmitDelegate(() => {
+ cursor.EmitDelegate(() =>
+ {
LavaRenderingSystem.Instance.DrawLiquid(bg: true, LavaRenderingSystem.LavaStyle);
});
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdarg0(), i => i.MatchLdcI4(1), i => i.MatchLdsfld("bloodMoon"), i => i.MatchBrtrue(out _), i => i.MatchLdloc(8), i => i.MatchLdfld("WaterStyle"), i => i.MatchBr(out _), i => i.MatchLdcI4(9), i => i.MatchLdcR4(1), i => i.MatchLdcI4(1), i => i.MatchCall("DrawLiquid")))
@@ -1035,7 +1036,8 @@ namespace CalamityMod.ILEditing
LogFailure("Draw lavas to captures", "Could not locate the second background of liquid capture drawing");
return;
}
- cursor.EmitDelegate(() => {
+ cursor.EmitDelegate(() =>
+ {
LavaRenderingSystem.Instance.DrawLiquid(bg: true, LavaRenderingSystem.LavaStyle);
});
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdarg0(), i => i.MatchLdcI4(0), i => i.MatchLdsfld("waterStyle"), i => i.MatchLdcR4(1), i => i.MatchLdcI4(1), i => i.MatchCall("DrawLiquid")))
@@ -1043,7 +1045,8 @@ namespace CalamityMod.ILEditing
LogFailure("Draw lavas to captures", "Could not locate the liquid capture drawing");
return;
}
- cursor.EmitDelegate(() => {
+ cursor.EmitDelegate(() =>
+ {
LavaRenderingSystem.Instance.DrawLiquid(bg: false, LavaRenderingSystem.LavaStyle);
});
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdarg0(), i => i.MatchLdcI4(0), i => i.MatchLdloc(8), i => i.MatchLdfld("WaterStyle"), i => i.MatchLdcR4(1), i => i.MatchLdcI4(1), i => i.MatchCall("DrawLiquid")))
@@ -1051,7 +1054,8 @@ namespace CalamityMod.ILEditing
LogFailure("Draw lavas to captures", "Could not locate the second liquid capture drawing");
return;
}
- cursor.EmitDelegate(() => {
+ cursor.EmitDelegate(() =>
+ {
LavaRenderingSystem.Instance.DrawLiquid(bg: false, LavaRenderingSystem.LavaStyle);
});
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdloc2(), i => i.MatchStsfld("liquidAlpha")))
@@ -1059,7 +1063,8 @@ namespace CalamityMod.ILEditing
LogFailure("Draw lavas to captures", "Could not locate water style value returner");
return;
}
- cursor.EmitDelegate(() => {
+ cursor.EmitDelegate(() =>
+ {
LavaRenderingSystem.AlphaSave.CopyTo(LavaRenderingSystem.LavaAlpha, 0);
});
}
@@ -1067,17 +1072,18 @@ namespace CalamityMod.ILEditing
private void AddTileLiquidDrawing(ILContext il)
{
ILCursor cursor = new ILCursor(il);
- if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdarg0(), i => i.MatchLdarg1(), i => i.MatchLdcI4(0), i => i.MatchLdarg(out _), i => i.MatchLdloc1(), i => i.MatchLdloc2(), i => i.MatchLdloc(12), i => i.MatchLdloc(13), i => i.MatchLdloc(14), i => i.MatchCall("DrawTile_LiquidBehindTile")))
+ if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdarg0(), i => i.MatchLdarg1(), i => i.MatchLdcI4(0), i => i.MatchLdarg(out _), i => i.MatchLdloc1(), i => i.MatchLdloc2(), i => i.MatchLdloc(13), i => i.MatchLdloc(14), i => i.MatchLdloc(15), i => i.MatchCall("DrawTile_LiquidBehindTile")))
{
LogFailure("Tile Lava Drawing", "Could not locate the drawing of Liquid Behind Tile drawing");
return;
}
cursor.EmitLdloc1();
cursor.EmitLdloc2();
- cursor.EmitLdloc(12);
cursor.EmitLdloc(13);
cursor.EmitLdloc(14);
- cursor.EmitDelegate((Vector2 unscaledPosition, Vector2 vector, int j, int i, Tile tile) => {
+ cursor.EmitLdloc(15);
+ cursor.EmitDelegate((Vector2 unscaledPosition, Vector2 vector, int j, int i, Tile tile) =>
+ {
LavaRenderingSystem.Instance.DrawTile_LiquidBehindTile(solidLayer: false, inFrontOfPlayers: false, -1, unscaledPosition, vector, j, i, tile);
});
}
@@ -1085,18 +1091,6 @@ namespace CalamityMod.ILEditing
#region Lava Blocking
private void BlockLavaDrawing(ILContext il)
- {
- if (ModLoader.HasMod("LiquidSlopesPatch"))
- {
- BlockLavaDrawing_LiquidSlopesPatch(il);
- }
- else
- {
- BlockLavaDrawing_Vanilla(il);
- }
- }
-
- private void BlockLavaDrawing_Vanilla(ILContext il)
{
//This edit to DrawNormalLiquids makes lavas in normal and white lighting draw with an alpha and with new textures
//If the parameter for the waterstyle is more than the max waterstyles then its subtracted by the max water style count and thats the lava style ID
@@ -1105,18 +1099,18 @@ namespace CalamityMod.ILEditing
//Continue if statement, basically
//if the liquid being drawn is lava and the water style is greater than the max water styles or if the liquid is water and less than the max water styles then the draw code is ran
//otherwise the loop/s are continued for the next liquid
- if (!cursor.TryGotoNext(MoveType.After, i => i.MatchStloc(4), i => i.MatchBr(out _), i => i.MatchLdloc(2), i => i.MatchLdfld(typeof(LiquidRenderer).GetNestedType("LiquidDrawCache", BindingFlags.NonPublic), "IsVisible")))
+ if (!cursor.TryGotoNext(MoveType.After, i => i.MatchStloc(4), i => i.MatchBr(out _), i => i.MatchLdloc(2), i => i.MatchLdfld(typeof(LiquidRenderer).GetNestedType("LiquidDrawCache", BindingFlags.Public), "IsVisible")))
{
LogFailure("Liquid Renderer Drawing", "Could not locate the IsVisible boolean check");
return;
}
cursor.EmitLdarg3();
cursor.EmitLdloc2(); //Initiated Liquid Draw Cache (needed for the Type parameter)
- cursor.EmitLdfld(typeof(LiquidRenderer).GetNestedType("LiquidDrawCache", BindingFlags.NonPublic).GetRuntimeField("Type"));
+ cursor.EmitLdfld(typeof(LiquidRenderer).GetNestedType("LiquidDrawCache", BindingFlags.Public).GetRuntimeField("Type"));
cursor.EmitDelegate>((IsVisible, style, type) => IsVisible && ((type == 1 && style >= LavaRenderingSystem.Instance.WaterStyleMaxCount + 1) || (type != 1 && style <= LavaRenderingSystem.Instance.WaterStyleMaxCount)));
//Lava alpha color, if the liquid drawn is lava, multiply num by the water alpha
- if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdloc(2), i => i.MatchLdfld(typeof(LiquidRenderer).GetNestedType("LiquidDrawCache", BindingFlags.NonPublic).GetRuntimeField("Type")), i => i.MatchStloc(8)))
+ if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdloc(2), i => i.MatchLdfld(typeof(LiquidRenderer).GetNestedType("LiquidDrawCache", BindingFlags.Public).GetRuntimeField("Type")), i => i.MatchStloc(8)))
{
LogFailure("Liquid Renderer Drawing", "Could not locate creation of the local variable num2 (the liquid type holder variable)");
return;
@@ -1140,69 +1134,13 @@ namespace CalamityMod.ILEditing
}
cursor.EmitLdarg3();
cursor.EmitLdloc2(); //Initiated Liquid Draw Cache (needed for the Type parameter)
- cursor.EmitLdfld(typeof(LiquidRenderer).GetNestedType("LiquidDrawCache", BindingFlags.NonPublic).GetRuntimeField("Type"));
+ cursor.EmitLdfld(typeof(LiquidRenderer).GetNestedType("LiquidDrawCache", BindingFlags.Public).GetRuntimeField("Type"));
cursor.EmitDelegate>((initialTexture, style, type) =>
(style >= LavaRenderingSystem.Instance.WaterStyleMaxCount + 1 && type == LiquidID.Lava)
? LavaRenderingSystem.Textures.liquid[style - LavaRenderingSystem.Instance.WaterStyleMaxCount - 1].Value
: initialTexture
);
}
-
- private void BlockLavaDrawing_LiquidSlopesPatch(ILContext il)
- {
- Assembly lspAsm = ModLoader.GetMod("LiquidSlopesPatch").Code;
- Type liquidDrawCache = lspAsm.GetType("LiquidSlopesPatch.Common.RewrittenLiquidRenderer").GetNestedType("LiquidDrawCache");
-
- //This edit to DrawNormalLiquids makes lavas in normal and white lighting draw with an alpha and with new textures
- //If the parameter for the waterstyle is more than the max waterstyles then its subtracted by the max water style count and thats the lava style ID
- ILCursor cursor = new ILCursor(il);
-
- //Continue if statement, basically
- //if the liquid being drawn is lava and the water style is greater than the max water styles or if the liquid is water and less than the max water styles then the draw code is ran
- //otherwise the loop/s are continued for the next liquid
- if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld(liquidDrawCache, "IsVisible")))
- {
- LogFailure("Liquid Renderer Drawing", "Could not locate the IsVisible boolean check");
- return;
- }
- cursor.EmitLdarg3();
- cursor.EmitLdloc2(); //Initiated Liquid Draw Cache (needed for the Type parameter)
- cursor.EmitLdfld(liquidDrawCache.GetField("Type"));
- cursor.EmitDelegate>((IsVisible, style, type) => IsVisible && ((type == 1 && style >= LavaRenderingSystem.Instance.WaterStyleMaxCount + 1) || (type != 1 && style <= LavaRenderingSystem.Instance.WaterStyleMaxCount)));
-
- //Lava alpha color, if the liquid drawn is lava, multiply num by the water alpha
- if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdloc(2), i => i.MatchLdfld(liquidDrawCache.GetField("Type")), i => i.MatchStloc(8)))
- {
- LogFailure("Liquid Renderer Drawing", "Could not locate creation of the local variable num2 (the liquid type holder variable)");
- return;
- }
- cursor.EmitLdloc(8);
- cursor.EmitLdloca(7);
- cursor.EmitLdarg(4);
- cursor.EmitDelegate((int num2, ref float num, float globalAlpha) =>
- {
- if (num2 == LiquidID.Lava)
- {
- num *= globalAlpha;
- }
- });
-
- //Conditionally replace the liquid texture whether the liquid is lava or water
- if (!cursor.TryGotoNext(MoveType.After, i => i.MatchCallvirt(typeof(Asset).GetMethod("get_Value", BindingFlags.Public | BindingFlags.Instance))))
- {
- LogFailure("Liquid Renderer Drawing", "Could not locate the Texture2D array of liquids");
- return;
- }
- cursor.EmitLdarg3();
- cursor.EmitLdloc2(); //Initiated Liquid Draw Cache (needed for the Type parameter)
- cursor.EmitLdfld(liquidDrawCache.GetField("Type"));
- cursor.EmitDelegate>((initialTexture, style, type) =>
- (style >= LavaRenderingSystem.Instance.WaterStyleMaxCount + 1 && type == LiquidID.Lava)
- ? LavaRenderingSystem.Textures.liquid[style - LavaRenderingSystem.Instance.WaterStyleMaxCount - 1].Value
- : initialTexture
- );
- }
-
private void BlockLavaDrawingForSlopes(On_TileDrawing.orig_DrawTile_LiquidBehindTile orig, TileDrawing self, bool solidLayer, bool inFrontOfPlayers, int waterStyleOverride, Vector2 screenPosition, Vector2 screenOffset, int tileX, int tileY, Tile tileCache)
{
if (tileCache.LiquidType == LiquidID.Lava)
@@ -1266,7 +1204,8 @@ namespace CalamityMod.ILEditing
}
cursor.EmitLdloc(12);
cursor.EmitLdloc(11);
- cursor.EmitDelegate((int i, int j) => {
+ cursor.EmitDelegate((int i, int j) =>
+ {
return Main.tile[i, j].LiquidType == LiquidID.Lava;
});
cursor.EmitBrtrue(target);
@@ -1442,75 +1381,25 @@ namespace CalamityMod.ILEditing
float g = 0.33f;
float b = 0.11f;
LavaStylesLoader.ModifyLightSetup(x, y, LavaRenderingSystem.LavaStyle, ref r, ref g, ref b);
- if (!(r == 0 && g == 0 && b == 0))
- {
- float r8;
- float num3 = (r8 = (r + (float)(270 - Main.mouseTextColor) / 900f) * 0.4f);
- float g8 = num3 * g;
- float b8 = num3 * b;
- Lighting.AddLight(x, y, r8, g8, b8);
- }
+ Lighting.AddLight(x, y, r, g, b);
return;
}
orig.Invoke(waterfallType, x, y);
}
private static void LiquidDrawColors(ILContext il)
- {
- if (ModLoader.HasMod("LiquidSlopesPatch"))
- {
- LiquidDrawColors_LiquidSlopesPatch(il);
- }
- else
- {
- LiquidDrawColors_Vanilla(il);
- }
- }
-
- private static void LiquidDrawColors_Vanilla(ILContext il)
{
ILCursor cursor = new ILCursor(il);
- if (!cursor.TryGotoNext(MoveType.Before, c => c.MatchLdarg2(), c => c.MatchLdloc3(), c => c.MatchLdloc(4), c => c.MatchCall("DrawTileInWater")))
+ if (!cursor.TryGotoNext(MoveType.Before, c => c.MatchLdarg2(), c => c.MatchLdloc(9), c => c.MatchLdloc(10), c => c.MatchCall("DrawTileInWater")))
{
LogFailure("Liquid Draw Colors", "Could not locate the liquid vertex colors for drawing");
return;
}
- cursor.Emit(OpCodes.Ldloc_3);
- cursor.Emit(OpCodes.Ldloc, 4);
- cursor.Emit(OpCodes.Ldloc_2);
- cursor.Emit(OpCodes.Ldfld, typeof(LiquidRenderer).GetNestedType("LiquidDrawCache", BindingFlags.NonPublic).GetRuntimeField("Type"));
- cursor.Emit(OpCodes.Ldloca, 9);
-
- cursor.EmitDelegate((int x, int y, int liquidType, ref VertexColors initialColor) =>
- {
- if (liquidType == LiquidID.Water)
- {
- CalamityWaterLoader.DrawColorSetup(x, y, Main.waterStyle, ref initialColor);
- }
- else if (liquidType == LiquidID.Lava && ExternalMods.biomeLava == null)
- {
- LavaStylesLoader.DrawColorSetup(x, y, LavaRenderingSystem.LavaStyle, ref initialColor);
- }
- });
- }
-
- private static void LiquidDrawColors_LiquidSlopesPatch(ILContext il)
- {
- Assembly lspAsm = ModLoader.GetMod("LiquidSlopesPatch").Code;
- Type liquidDrawCache = lspAsm.GetType("LiquidSlopesPatch.Common.RewrittenLiquidRenderer").GetNestedType("LiquidDrawCache");
-
- ILCursor cursor = new ILCursor(il);
- if (!cursor.TryGotoNext(MoveType.Before, c => c.MatchLdarg2(), c => c.MatchLdloc(out _), c => c.MatchLdloc(out _), c => c.MatchCall("DrawTileInWater")))
- {
- LogFailure("Liquid Draw Colors (LSP)", "Could not locate the liquid vertex colors for drawing");
- return;
- }
-
cursor.Emit(OpCodes.Ldloc, 9);
cursor.Emit(OpCodes.Ldloc, 10);
cursor.Emit(OpCodes.Ldloc_2);
- cursor.Emit(OpCodes.Ldfld, liquidDrawCache.GetField("Type"));
+ cursor.Emit(OpCodes.Ldfld, typeof(LiquidRenderer).GetNestedType("LiquidDrawCache", BindingFlags.Public).GetRuntimeField("Type"));
cursor.Emit(OpCodes.Ldloca, 11);
cursor.EmitDelegate((int x, int y, int liquidType, ref VertexColors initialColor) =>
@@ -1746,16 +1635,6 @@ namespace CalamityMod.ILEditing
}
#endregion
- #region Find Calamity Item Dye Shader
-
- 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())
- self.Calamity().CalamityFireDyeShader = GameShaders.Armor.GetShaderFromItemId(dyeItem.type);
- }
- #endregion
-
#region Scopes Require Visibility to Zoom
private static void ScopesRequireVisibilityToZoom(ILContext il)
{
@@ -2674,7 +2553,7 @@ namespace CalamityMod.ILEditing
}
NetMessage.SendData(MessageID.PlayerControls, -1, -1, null, self.owner);
}
- SoundEngine.PlaySound(SoundID.DD2_EtherianPortalSpawnEnemy with {Volume = 0.75f }, self.Center);
+ SoundEngine.PlaySound(SoundID.DD2_EtherianPortalSpawnEnemy with { Volume = 0.75f }, self.Center);
self.ai[0] = 2;
self.velocity = Vector2.Zero;
self.Calamity().arenaBoxPosition = new Vector2(Utils.Remap(self.Center.X, box.TopLeft.X, box.BottomRight.X, 0, 1, false), Utils.Remap(self.Center.Y, box.TopLeft.Y, box.BottomRight.Y, 0, 1, false));
@@ -2736,8 +2615,8 @@ namespace CalamityMod.ILEditing
foreach (var item in ArenaWallSystem.ActiveBoxes)
{
var oldVel = Velocity;
- if (item.InnerEffect(Position,new Vector2(Width,Height)))
- Velocity = ArenaCollisionLogic(item, Position, Width, Height, Velocity);
+ if (item.InnerEffect(Position, new Vector2(Width, Height)))
+ Velocity = ArenaCollisionLogic(item, Position, Width, Height, Velocity);
var dif = (oldVel - Velocity).Length();
}
}
diff --git a/ILEditing/VanillaStupidityFixingILChanges.cs b/ILEditing/VanillaStupidityFixingILChanges.cs
index e00fff3ba6..a19b6c2d09 100644
--- a/ILEditing/VanillaStupidityFixingILChanges.cs
+++ b/ILEditing/VanillaStupidityFixingILChanges.cs
@@ -4,10 +4,8 @@ using System.Reflection;
using CalamityMod.Events;
using CalamityMod.Items.Fishing;
using CalamityMod.Items.Materials;
-using CalamityMod.Items.TreasureBags.MiscGrabBags;
using CalamityMod.NPCs.AcidRain;
using CalamityMod.NPCs.NormalNPCs;
-using CalamityMod.NPCs.TownNPCs;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Walls;
using CalamityMod.World;
@@ -17,13 +15,14 @@ using MonoMod.Cil;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
-using Terraria.GameContent;
using Terraria.GameContent.Drawing;
using Terraria.GameContent.ItemDropRules;
+using Terraria.GameInput;
+using Terraria.Graphics.Effects;
+using Terraria.Graphics.CameraModifiers;
using Terraria.ID;
using Terraria.ModLoader;
-using Terraria.Graphics.Effects;
-using Terraria.GameInput;
+using ReLogic.Utilities;
namespace CalamityMod.ILEditing
{
@@ -157,8 +156,10 @@ namespace CalamityMod.ILEditing
#region Prevention of Slime Rain Spawns When Near Bosses
private static void PreventBossSlimeRainSpawns(On_NPC.orig_SlimeRainSpawns orig, int plr)
{
- if (!Main.player[plr].Calamity().isNearbyBoss && CalamityServerConfig.Instance.BossZen)
- orig(plr);
+ if (CalamityServerConfig.Instance.BossZen && Main.player[plr].Calamity().isNearbyBoss)
+ return;
+
+ orig(plr);
}
#endregion Prevention of Slime Rain Spawns When Near Bosses
@@ -175,9 +176,10 @@ namespace CalamityMod.ILEditing
return;
}
- // Remove the Expert Mode check, and in its place put a check for the Zenith seed (Get fixed boi).
- cursor.Emit(OpCodes.Pop);
- cursor.Emit(OpCodes.Ldsfld, typeof(Main).GetField("zenithWorld"));
+ // AND with 0, so that Expert Mode is never considered active.
+ // Calamity implements something more sinister in GFB :)
+ cursor.Emit(OpCodes.Ldc_I4_0);
+ cursor.Emit(OpCodes.And);
}
#endregion
@@ -236,6 +238,28 @@ namespace CalamityMod.ILEditing
}
#endregion
+ #region Make PunchCameraModifier Affected by Screenshake Config
+ private static void PunchCameraUsesScreenshakeConfig(ILContext il)
+ {
+ // Allow the screenshake from PunchCameraModifier to scale based on our screenshake power config.
+ var cursor = new ILCursor(il);
+
+ // There are 3 local variables that control the strength of the screenshake in separate ways, but they all get multiplied together at the end.
+ // Thus it doesn't matter at all which one is multiplied to. Here I chose num2.
+ if (!cursor.TryGotoNext(MoveType.After, i => i.MatchStloc2()))
+ {
+ LogFailure("Make PunchCameraModifier Affected by Screenshake Config", "Could not move to the location to inject code.");
+ return;
+ }
+
+ // Emit a delegate which grabs the value of the screenshake config. Then multiply the local variable by it.
+ cursor.Emit(OpCodes.Ldloc_1);
+ cursor.EmitDelegate>(() => CalamityClientConfig.Instance.ScreenshakePower);
+ cursor.Emit(OpCodes.Mul);
+ cursor.Emit(OpCodes.Stloc_1);
+ }
+ #endregion
+
#region Make Meteorite Explodable
private static void MakeMeteoriteExplodable(ILContext il)
{
@@ -577,7 +601,7 @@ namespace CalamityMod.ILEditing
LogFailure("Use VisibleThroughWater Map Tile", "Could not locate call to Terraria.Map.TileMap::get_Item.");
return;
}
-
+
int tileIndex = -1;
if (!c.TryGotoNext(x => x.MatchStloc(out tileIndex)) || tileIndex == -1)
{
@@ -777,12 +801,13 @@ namespace CalamityMod.ILEditing
private static void DelayGravity(On_Player.orig_UpdateControlHolds orig, Player Player)
{
var cplay = Player.Calamity();
- if (CalamityKeybinds.SwitchGravityHotkey.GetAssignedKeys().Count != 0 && (Player.gravControl || Player.gravControl2) && !Player.mount.Active)
+ if (CalamityKeybinds.SwitchGravityHotkey.GetAssignedKeysOrEmpty().Count != 0 && (Player.gravControl || Player.gravControl2) && !Player.mount.Active)
{
- if (Player.controlUp && Player.releaseUp) {
+ if (Player.controlUp && Player.releaseUp)
+ {
Player.gravDir *= -1;
}
- if (CalamityKeybinds.SwitchGravityHotkey.JustPressed)
+ if (CalamityKeybinds.SwitchGravityHotkey.JustPressed)
{
Player.gravDir *= -1;
Player.fallStart = (int)(Player.position.Y / 16f);
@@ -790,33 +815,40 @@ namespace CalamityMod.ILEditing
SoundEngine.PlaySound(SoundID.Item8, Player.position);
}
- if (Player.forcedGravity > 0) {
- Player.gravDir = -1f;
- }
+ if (Player.forcedGravity > 0)
+ {
+ Player.gravDir = -1f;
+ }
}
-
- if (cplay.justChangedGravity) {
+
+ if (cplay.justChangedGravity)
+ {
Player.gravDir = cplay.oldGravDir;
}
cplay.justChangedGravity = cplay.oldGravDir != Player.gravDir;
-
+
cplay.oldGravDir = Player.gravDir;
if (Main.netMode != NetmodeID.Server && !Main.gameMenu && CalamityClientConfig.Instance.DisableGravityScreenSwap)
{
- if (Player.gravDir == -1) {
- if (!Filters.Scene["CalamityMod:FlipScreen"].IsActive()) {
- Filters.Scene.Activate("CalamityMod:FlipScreen");
- Filters.Scene["CalamityMod:FlipScreen"].Opacity = 1f;
+ if (Player.gravDir == -1)
+ {
+ if (!Filters.Scene["CalamityMod:FlipScreen"].IsActive())
+ {
+ Filters.Scene.Activate("CalamityMod:FlipScreen");
+ Filters.Scene["CalamityMod:FlipScreen"].Opacity = 1f;
+ }
}
- } else {
- if (Filters.Scene["CalamityMod:FlipScreen"].IsActive()) {
- Filters.Scene["CalamityMod:FlipScreen"].Opacity = 0f;
- Filters.Scene.Deactivate("CalamityMod:FlipScreen");
+ else
+ {
+ if (Filters.Scene["CalamityMod:FlipScreen"].IsActive())
+ {
+ Filters.Scene["CalamityMod:FlipScreen"].Opacity = 0f;
+ Filters.Scene.Deactivate("CalamityMod:FlipScreen");
+ }
}
}
- }
if (cplay.justChangedGravity)
{
Player.gravDir *= -1;
@@ -824,7 +856,8 @@ namespace CalamityMod.ILEditing
orig(Player);
}
- private static void GravityMouse(On_PlayerInput.orig_SetZoom_MouseInWorld orig) {
+ private static void GravityMouse(On_PlayerInput.orig_SetZoom_MouseInWorld orig)
+ {
orig();
if (!Main.gameMenu && Filters.Scene["CalamityMod:FlipScreen"].IsActive())//((Main.LocalPlayer.gravDir == -1 && !Main.LocalPlayer.Calamity().justChangedGravity) || (Main.LocalPlayer.Calamity().oldGravDir == -1 && Main.LocalPlayer.Calamity().justChangedGravity))
{
@@ -841,7 +874,7 @@ namespace CalamityMod.ILEditing
}
orig(self);
}
-
+
private static void UI_Unflip_End(On_Main.orig_DrawInterface orig, Main self, GameTime gameTime)
{
orig(self, gameTime);
diff --git a/Items/Accessories/AbyssalDivingSuit.cs b/Items/Accessories/AbyssalDivingSuit.cs
index 6f2c4936cf..74ed843a5f 100644
--- a/Items/Accessories/AbyssalDivingSuit.cs
+++ b/Items/Accessories/AbyssalDivingSuit.cs
@@ -11,9 +11,6 @@ namespace CalamityMod.Items.Accessories
{
public new string LocalizationCategory => "Items.Accessories";
- public static double PlatesAllDamageReduction = 0.15D;
- public static double PlatesHitDecay = 0.03D;
-
public override string AssetPath => "CalamityMod/Items/Accessories/";
public override (EquipType, string, string)[] EquipSlots =>
[
diff --git a/Items/Accessories/AquaticHeart.cs b/Items/Accessories/AquaticHeart.cs
index 25c761394a..d8605af83c 100644
--- a/Items/Accessories/AquaticHeart.cs
+++ b/Items/Accessories/AquaticHeart.cs
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories
public new string LocalizationCategory => "Items.Accessories";
public static float WaterSpeedBoost = 0.15f;
- public static double IceShieldAllDamageReduction = 0.2D;
+ public static float IceShieldDamageReductionBoost = 0.2f;
public override string AssetPath => "CalamityMod/Items/Accessories/";
public override (EquipType, string, string)[] EquipSlots =>
diff --git a/Items/Accessories/Calamity.cs b/Items/Accessories/Calamity.cs
index e192f93b37..0b60fcda8f 100644
--- a/Items/Accessories/Calamity.cs
+++ b/Items/Accessories/Calamity.cs
@@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.DataStructures;
using Terraria.GameContent;
+using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
@@ -46,6 +47,8 @@ namespace CalamityMod.Items.Accessories
player.Calamity().blazingCursorVisuals = true;
}
+ public override void UpdateItemDye(Player player, int dye, bool hideVisual) => player.Calamity().CalamityFireDyeShader = GameShaders.Armor.GetSecondaryShader(dye, player);
+
public override void UpdateEquip(Player player) => player.Calamity().blazingCursorVisuals = true;
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
diff --git a/Items/Accessories/PermafrostsConcoction.cs b/Items/Accessories/PermafrostsConcoction.cs
index 7b849b028e..2ca906ba88 100644
--- a/Items/Accessories/PermafrostsConcoction.cs
+++ b/Items/Accessories/PermafrostsConcoction.cs
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories
internal static readonly int EncasedIFrames = 90;
public static int EncasedDefenseBoost = 30;
- public static double EncasedAllDamageReduction = 0.3D;
+ public static float EncasedDamageReductionBoost = 0.3f;
public new string LocalizationCategory => "Items.Accessories";
public override void SetDefaults()
diff --git a/Items/Accessories/StatMeter.cs b/Items/Accessories/StatMeter.cs
index 10edb5b418..b931db8898 100644
--- a/Items/Accessories/StatMeter.cs
+++ b/Items/Accessories/StatMeter.cs
@@ -19,7 +19,6 @@ namespace CalamityMod.Items.Accessories
Item.height = 26;
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
Item.rare = ItemRarityID.Orange;
- Item.accessory = true;
}
public override void UpdateInventory(Player player)
@@ -199,7 +198,7 @@ namespace CalamityMod.Items.Accessories
}
list.FindAndReplace("[ITEMS]", stats2);
- float moveSpeedBoost = CalamityServerConfig.Instance.FasterBaseSpeed ? (player.moveSpeed / BalancingConstants.DefaultMoveSpeedBoost) - 1f : player.moveSpeed - 1f;
+ float moveSpeedBoost = CalamityServerConfig.Instance.FasterBaseSpeed ? (player.moveSpeed / BalancingConstants.DefaultMoveSpeedBoost) - 1f : player.moveSpeed - 1f;
float wingFlightTime = player.wingTimeMax;
// Does not use NormalizedLuck. Presents the player's luck exactly as it is used by the game engine.
// NormalizedLuck is only used in one place: the Wizard's luck report. Which is entirely obsoleted by this Meter.
diff --git a/Items/Accessories/Wings/AureateBooster.cs b/Items/Accessories/Wings/AureateBooster.cs
index 0190454c27..b2f0dce8a1 100644
--- a/Items/Accessories/Wings/AureateBooster.cs
+++ b/Items/Accessories/Wings/AureateBooster.cs
@@ -36,6 +36,8 @@ namespace CalamityMod.Items.Accessories.Wings
public override void UpdateAccessory(Player player, bool hideVisual)
{
+ player.DisableWingFlapSound();
+
if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
{
player.rocketDelay2--;
diff --git a/Items/Accessories/Wings/BaseWings.cs b/Items/Accessories/Wings/BaseWings.cs
index 7a58793775..780b9224f3 100644
--- a/Items/Accessories/Wings/BaseWings.cs
+++ b/Items/Accessories/Wings/BaseWings.cs
@@ -70,12 +70,12 @@ namespace CalamityMod.Items.Accessories.Wings
{
if (Item.wingSlot == -1) return;
WingStats stats = new();
- if (Item.type == ModContent.ItemType())
- stats = ArmorIDs.Wing.Sets.Stats[TracersCelestial.wingSlot];
- else if (Item.type == ModContent.ItemType())
- stats = ArmorIDs.Wing.Sets.Stats[TracersElysian.wingSlot];
- else if (Item.type == ModContent.ItemType())
- stats = ArmorIDs.Wing.Sets.Stats[TracersSeraph.wingSlot];
+ if (Item.type == ModContent.ItemType())
+ stats = ArmorIDs.Wing.Sets.Stats[MoonWalkers.wingSlot];
+ else if (Item.type == ModContent.ItemType())
+ stats = ArmorIDs.Wing.Sets.Stats[VoidStriders.wingSlot];
+ else if (Item.type == ModContent.ItemType())
+ stats = ArmorIDs.Wing.Sets.Stats[SeraphTracers.wingSlot];
else stats = ArmorIDs.Wing.Sets.Stats[Item.wingSlot];
int time = stats.FlyTime;
float run = stats.AccRunSpeedOverride;
diff --git a/Items/Accessories/Wings/MOAB.cs b/Items/Accessories/Wings/MOAB.cs
index 05af56d6c3..28a8987813 100644
--- a/Items/Accessories/Wings/MOAB.cs
+++ b/Items/Accessories/Wings/MOAB.cs
@@ -87,6 +87,8 @@ namespace CalamityMod.Items.Accessories.Wings
public override void UpdateAccessory(Player player, bool hideVisual)
{
+ player.DisableWingFlapSound();
+
if (toggleEnabled && player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
{
player.rocketDelay2--;
diff --git a/Items/Accessories/Wings/TracersCelestial.cs b/Items/Accessories/Wings/MoonWalkers.cs
similarity index 94%
rename from Items/Accessories/Wings/TracersCelestial.cs
rename to Items/Accessories/Wings/MoonWalkers.cs
index b9a80a7dd2..d42346d133 100644
--- a/Items/Accessories/Wings/TracersCelestial.cs
+++ b/Items/Accessories/Wings/MoonWalkers.cs
@@ -15,8 +15,8 @@ using Terraria.ModLoader.IO;
namespace CalamityMod.Items.Accessories.Wings
{
[AutoloadEquip(EquipType.Wings, EquipType.Shoes)]
- [LegacyName("InfinityBoots", "SeraphTracers")]
- public class TracersCelestial : BaseWings
+ [LegacyName("InfinityBoots", "TracersCelestial")]
+ public class MoonWalkers : BaseWings
{
public override float BonusAscentWhileFalling => 0.75f;
public override float BonusAscentWhileRising => 0.15f;
@@ -82,8 +82,12 @@ namespace CalamityMod.Items.Accessories.Wings
}
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
+ Item.SetNameOverride(CalamityUtils.GetTextValue($"Items.Accessories.Wings.MoonWalkers.{(toggleEnabled ? "DisplayName" : "TreadsName")}"));
CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, toggleEnabled);
}
+ public override void UpdateInventory(Player player)
+ {
+ }
#endregion
public override void UpdateAccessory(Player player, bool hideVisual)
{
@@ -118,7 +122,7 @@ namespace CalamityMod.Items.Accessories.Wings
modPlayer.angelTreads = true;
}
modPlayer.tracersDust = !hideVisual && toggleEnabled;
- modPlayer.tracersCelestial = true;
+ modPlayer.moonWalkers = true;
}
public override void AddRecipes()
diff --git a/Items/Accessories/Wings/TracersCelestial.png b/Items/Accessories/Wings/MoonWalkers.png
similarity index 100%
rename from Items/Accessories/Wings/TracersCelestial.png
rename to Items/Accessories/Wings/MoonWalkers.png
diff --git a/Items/Accessories/Wings/TracersCelestial_Shoes.png b/Items/Accessories/Wings/MoonWalkers_Shoes.png
similarity index 100%
rename from Items/Accessories/Wings/TracersCelestial_Shoes.png
rename to Items/Accessories/Wings/MoonWalkers_Shoes.png
diff --git a/Items/Accessories/Wings/TracersCelestial_Wings.png b/Items/Accessories/Wings/MoonWalkers_Wings.png
similarity index 100%
rename from Items/Accessories/Wings/TracersCelestial_Wings.png
rename to Items/Accessories/Wings/MoonWalkers_Wings.png
diff --git a/Items/Accessories/Wings/TracersSeraph.cs b/Items/Accessories/Wings/SeraphTracers.cs
similarity index 93%
rename from Items/Accessories/Wings/TracersSeraph.cs
rename to Items/Accessories/Wings/SeraphTracers.cs
index 43b4c6aa06..a03f29eac2 100644
--- a/Items/Accessories/Wings/TracersSeraph.cs
+++ b/Items/Accessories/Wings/SeraphTracers.cs
@@ -13,14 +13,15 @@ using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.Graphics.Shaders;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
using Terraria.ModLoader.IO;
namespace CalamityMod.Items.Accessories.Wings
{
[AutoloadEquip(EquipType.Wings)]
- [LegacyName("CelestialTracers")]
- public class TracersSeraph : BaseWings
+ [LegacyName("CelestialTracers", "TracersSeraph")]
+ public class SeraphTracers : BaseWings
{
public override float BonusAscentWhileFalling => 0.95f;
public override float BonusAscentWhileRising => 0.16f;
@@ -86,6 +87,7 @@ namespace CalamityMod.Items.Accessories.Wings
}
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
+ Item.SetNameOverride(CalamityUtils.GetTextValue($"Items.Accessories.Wings.SeraphTracers.{(toggleEnabled ? "DisplayName" : "TreadsName")}"));
CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, toggleEnabled);
}
#endregion
@@ -123,13 +125,13 @@ namespace CalamityMod.Items.Accessories.Wings
modPlayer.angelTreads = true;
}
modPlayer.tracersDust = !hideVisual && toggleEnabled;
- modPlayer.tracersSeraph = true; // Grants immunity to Auric Rejection and other walk-on-block effects
+ modPlayer.seraphTracers = true; // Grants immunity to Auric Rejection and other walk-on-block effects
}
public override void AddRecipes()
{
CreateRecipe().
- AddIngredient().
+ AddIngredient().
AddIngredient(5).
AddIngredient(3).
AddTile().
diff --git a/Items/Accessories/Wings/TracersSeraph.png b/Items/Accessories/Wings/SeraphTracers.png
similarity index 100%
rename from Items/Accessories/Wings/TracersSeraph.png
rename to Items/Accessories/Wings/SeraphTracers.png
diff --git a/Items/Accessories/Wings/TracersSeraph_Wings.png b/Items/Accessories/Wings/SeraphTracers_Wings.png
similarity index 100%
rename from Items/Accessories/Wings/TracersSeraph_Wings.png
rename to Items/Accessories/Wings/SeraphTracers_Wings.png
diff --git a/Items/Accessories/Wings/TracersElysian.cs b/Items/Accessories/Wings/VoidStriders.cs
similarity index 92%
rename from Items/Accessories/Wings/TracersElysian.cs
rename to Items/Accessories/Wings/VoidStriders.cs
index b25f44413c..2e6adceac4 100644
--- a/Items/Accessories/Wings/TracersElysian.cs
+++ b/Items/Accessories/Wings/VoidStriders.cs
@@ -18,8 +18,8 @@ using Terraria.ModLoader.IO;
namespace CalamityMod.Items.Accessories.Wings
{
[AutoloadEquip(EquipType.Wings)]
- [LegacyName("ElysianTracers")]
- public class TracersElysian : BaseWings
+ [LegacyName("ElysianTracers", "TracersElysian")]
+ public class VoidStriders : BaseWings
{
public override float BonusAscentWhileFalling => 0.85f;
public override float BonusAscentWhileRising => 0.15f;
@@ -85,8 +85,12 @@ namespace CalamityMod.Items.Accessories.Wings
}
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
+ Item.SetNameOverride(CalamityUtils.GetTextValue($"Items.Accessories.Wings.VoidStriders.{(toggleEnabled ? "DisplayName" : "TreadsName")}"));
CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, toggleEnabled);
}
+ public override void UpdateInventory(Player player)
+ {
+ }
#endregion
public override void UpdateAccessory(Player player, bool hideVisual)
{
@@ -122,13 +126,13 @@ namespace CalamityMod.Items.Accessories.Wings
modPlayer.angelTreads = true;
}
modPlayer.tracersDust = !hideVisual && toggleEnabled;
- modPlayer.tracersElysian = true;
+ modPlayer.voidStriders = true;
}
public override void AddRecipes()
{
CreateRecipe().
- AddIngredient().
+ AddIngredient().
AddIngredient(3).
AddIngredient(3).
AddIngredient(3).
diff --git a/Items/Accessories/Wings/TracersElysian.png b/Items/Accessories/Wings/VoidStriders.png
similarity index 100%
rename from Items/Accessories/Wings/TracersElysian.png
rename to Items/Accessories/Wings/VoidStriders.png
diff --git a/Items/Accessories/Wings/TracersElysian_Wings.png b/Items/Accessories/Wings/VoidStriders_Wings.png
similarity index 100%
rename from Items/Accessories/Wings/TracersElysian_Wings.png
rename to Items/Accessories/Wings/VoidStriders_Wings.png
diff --git a/Items/Ammo/AstralSolution.cs b/Items/Ammo/AstralSolution.cs
index 4026fbb514..68a557445e 100644
--- a/Items/Ammo/AstralSolution.cs
+++ b/Items/Ammo/AstralSolution.cs
@@ -20,10 +20,5 @@ namespace CalamityMod.Items.Ammo
{
itemGroup = ContentSamples.CreativeHelper.ItemGroup.Solutions;
}
-
- public override bool CanConsumeAmmo(Item ammo, Player player)
- {
- return !(player.itemAnimation < player.ActiveItem().useAnimation - 3);
- }
}
}
diff --git a/Items/Armor/Bloodflare/BloodflareHeadMelee.cs b/Items/Armor/Bloodflare/BloodflareHeadMelee.cs
index 820ab011c6..354dec4f86 100644
--- a/Items/Armor/Bloodflare/BloodflareHeadMelee.cs
+++ b/Items/Armor/Bloodflare/BloodflareHeadMelee.cs
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor.Bloodflare
public static int HitsToActivateFrenzy = 15;
public static float FrenzyMeleeDamageBoost = 0.25f;
public static int FrenzyMeleeCritBoost = 25; // NOTE: Tooltip shares this number with damage % as they're equal
- public static double FrenzyContactDamageReduction = 0.5D;
+ public static float FrenzyContactDamageReduction = 0.5f;
public static int FrenzyDuration = CalamityUtils.SecondsToFrames(5);
public static int FrenzyCooldown = CalamityUtils.SecondsToFrames(30);
diff --git a/Items/Armor/Tarragon/TarragonHeadMelee.cs b/Items/Armor/Tarragon/TarragonHeadMelee.cs
index 21a19642ee..b2db519f56 100644
--- a/Items/Armor/Tarragon/TarragonHeadMelee.cs
+++ b/Items/Armor/Tarragon/TarragonHeadMelee.cs
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor.Tarragon
public static int SetBonusAggroBoost = 800;
public static int TarraLifeDuration = CalamityUtils.SecondsToFrames(5);
public static int TarraLifeRegenBoost = 3;
- public static double CloakContactDamageReduction = 0.5D;
+ public static float CloakContactDamageReduction = 0.5f;
public static int CloakDuration = CalamityUtils.SecondsToFrames(10);
public static int CloakCooldown = CalamityUtils.SecondsToFrames(30);
diff --git a/Items/BaseItems/TransformationAccessory.cs b/Items/BaseItems/TransformationAccessory.cs
index f929462815..f43eb7c235 100644
--- a/Items/BaseItems/TransformationAccessory.cs
+++ b/Items/BaseItems/TransformationAccessory.cs
@@ -89,6 +89,7 @@ namespace CalamityMod.Items.BaseItems
}
internal TransformationAccessory currentTransformation = null;
+ internal TransformationAccessory previousTransformation = null;
int previousHighest = -1;
int currentHighest = -1;
@@ -113,7 +114,14 @@ namespace CalamityMod.Items.BaseItems
{
orig(self);
- Reset(self);
+ if (!self.dead)
+ Reset(self);
+ else
+ {
+ TransformationAccessory trans = self.Transformation().currentTransformation = self.Transformation().previousTransformation;
+ if (trans is not null)
+ EquipTransformation(trans, self, Mod);
+ }
}
private void Reset(Player p)
@@ -122,13 +130,16 @@ namespace CalamityMod.Items.BaseItems
currentHighest = -1;
if (p.Transformation().currentTransformation != null && !p.Transformation().currentTransformation.IsForced)
- p.Transformation().currentTransformation = null;
+ {
+ p.Transformation().previousTransformation = p.Transformation().currentTransformation;
+ p.Transformation().currentTransformation = null;
+ }
}
private void SetTransformationItem(On_Player.orig_UpdateVisibleAccessory orig, Player self, int itemSlot, Item item, bool modded)
{
orig(self, itemSlot, item, modded);
-
+
if (self.Transformation().currentTransformation == null || !self.Transformation().currentTransformation.IsForced)
{
if (item.ModItem is TransformationAccessory transformation && transformation.ShouldTransform.Invoke(self) && (currentTransformation == null || transformation.Priority >= currentTransformation.Priority))
@@ -141,18 +152,7 @@ namespace CalamityMod.Items.BaseItems
if (self.Transformation().currentTransformation != null && itemSlot == previousHighest) // last item slot, can set equip slots to our transformation if one is equipped
{
TransformationAccessory trans = self.Transformation().currentTransformation;
- bool[] list = new bool[15];
- foreach (var (Type, AssetName, EquipName) in trans.EquipSlots)
- {
- string name = AssetName == null ? null : EquipName ?? trans.Name;
- if (!trans.CustomSetEquipType(self, Type, Mod, name) && !list[(int)Type])
- {
- SetEquipSlot(self, Type, Mod, name);
- list[(int)Type] = true;
- }
- }
- if (trans.ShouldHideAccessories)
- self.HideAccessories();
+ EquipTransformation(trans, self, Mod);
}
}
@@ -284,6 +284,22 @@ namespace CalamityMod.Items.BaseItems
_ => -1,
};
+ public static void EquipTransformation(TransformationAccessory trans, Player self, Mod mod)
+ {
+ bool[] list = new bool[15];
+ foreach (var (Type, AssetName, EquipName) in trans.EquipSlots)
+ {
+ string name = AssetName == null ? null : EquipName ?? trans.Name;
+ if (!trans.CustomSetEquipType(self, Type, mod, name) && !list[(int)Type])
+ {
+ SetEquipSlot(self, Type, mod, name);
+ list[(int)Type] = true;
+ }
+ }
+ if (trans.ShouldHideAccessories)
+ self.HideAccessories();
+ }
+
public static EquipTexture GetEquipTexture(Player p, EquipType type) => EquipLoader.GetEquipTexture(type, GetEquipSlot(p, type));
}
}
diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs
index 7d56597b09..e234e81a0c 100644
--- a/Items/CalamityGlobalItem.cs
+++ b/Items/CalamityGlobalItem.cs
@@ -874,10 +874,6 @@ namespace CalamityMod.Items
// Handle general use-item effects for the Gem Tech Armor.
player.Calamity().GemTechState.OnItemUseEffects(item);
- if (item.type == ItemID.MonkStaffT1 || CalamityItemSets.AutoreusableSpear[item.type])
- {
- return player.ownedProjectileCounts[item.shoot] <= 0;
- }
if (item.type == ItemID.RodofDiscord)
{
if (player.chaosState)
@@ -1284,12 +1280,6 @@ namespace CalamityMod.Items
player.Calamity().critDamage += 0.2f;
}
- if (item.type == ItemID.MagicQuiver)
- player.arrowDamage -= 0.05f;
-
- if (item.type == ItemID.MoltenQuiver)
- player.arrowDamage -= 0.03f;
-
if (item.type == ItemID.FireGauntlet)
{
player.GetDamage() += 0.02f;
diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs
index fe2fc77e95..8d418894b0 100644
--- a/Items/CalamityGlobalItemTooltip.cs
+++ b/Items/CalamityGlobalItemTooltip.cs
@@ -679,7 +679,7 @@ namespace CalamityMod.Items
EditTooltipByNum(0, (line) => line.Text += AddedTooltip("PortableStool"));
// Replace the double tap line if double tap dash is overridden
- if ((item.type == ItemID.EoCShield || item.type == ItemID.Tabi) && CalamityKeybinds.DashHotkey.GetAssignedKeys().Count != 0)
+ if ((item.type == ItemID.EoCShield || item.type == ItemID.Tabi) && CalamityKeybinds.DashHotkey.GetAssignedKeysOrEmpty().Count != 0)
EditTooltipByNum(1, (line) => line.Text = CalamityUtils.GetText("Vanilla.DashKey").Format(CalamityKeybinds.DashHotkey.TooltipHotkeyString()));
#endregion
@@ -929,17 +929,9 @@ namespace CalamityMod.Items
if (item.type == ItemID.ReconScope)
EditTooltipByNum(0, (line) => line.Text += AddedTooltip("RifleScope"));
-
- // Magic Quiver
- if (item.type == ItemID.MagicQuiver)
- EditTooltipByNum(0, (line) => line.Text = EditedTooltip("MagicQuiver"));
-
// Molten Quiver
if (item.type == ItemID.MoltenQuiver)
- {
- EditTooltipByNum(0, (line) => line.Text = EditedTooltip("MoltenQuiver1"));
- EditTooltipByNum(2, (line) => line.Text = EditedTooltip("MoltenQuiver2"));
- }
+ EditTooltipByNum(2, (line) => line.Text = EditedTooltip("MoltenQuiver"));
// Magic Power Potion nerf
if (item.type == ItemID.MagicPowerPotion)
diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs
index 5dd553619d..8320f3c3fc 100644
--- a/Items/CalamityGlobalItemTweaks.cs
+++ b/Items/CalamityGlobalItemTweaks.cs
@@ -31,9 +31,8 @@ namespace CalamityMod.Items
// Various shorthands for items which receive very simple changes, or are repeated multiple times.
IItemTweak[] trueMelee = Do(TrueMelee);
IItemTweak[] trueMeleeNoSpeed = Do(TrueMeleeNoSpeed);
- IItemTweak[] autoReuse = Do(AutoReuse);
- IItemTweak[] nonConsumableBossSummon = Do(MaxStack(1), NotConsumable, UseTimeExact(10));
- IItemTweak[] phaseblade = Do(AutoReuse, UseTurn, DamageExact(36));
+ IItemTweak[] nonConsumableBossSummon = Do(MaxStack(1), NotConsumable);
+ IItemTweak[] phaseblade = Do(UseTurn, DamageExact(36));
IItemTweak[] phasesaber = Do(DamageExact(132));
// SORTING NOTES:
@@ -43,7 +42,7 @@ namespace CalamityMod.Items
currentTweaks = new SortedDictionary
{
#region CATEGORY 1: Weapon Balancing
- { ItemID.AdamantiteGlaive, Do(AutoReuse, TrueMelee, DamageExact(69), UseExact(7), ShootSpeedExact(18f)) },
+ { ItemID.AdamantiteGlaive, Do(TrueMelee, DamageExact(69), UseExact(7), ShootSpeedExact(18f)) },
{ ItemID.AdamantiteRepeater, Do(UseExact(14)) },
{ ItemID.AdamantiteSword, Do(UseTurn, DamageExact(75), UseExact(7)) },
{ ItemID.AmberStaff, Do(UseTimeExact(15), UseAnimationExact(45), ReuseDelayExact(15)) },
@@ -60,33 +59,33 @@ namespace CalamityMod.Items
{ ItemID.BeesKnees, Do(DamageExact(21), UseExact(38)) },
{ ItemID.Bladetongue, Do(UseTurn, UseRatio(0.8f), DamageExact(120)) },
{ ItemID.BlizzardStaff, Do(DamageExact(41), ManaExact(7)) },
- { ItemID.BloodyMachete, Do(AutoReuse, DamageExact(24)) },
+ { ItemID.BloodyMachete, Do(DamageExact(24)) },
{ ItemID.Blowgun, Do(DamageExact(40), ShootSpeedExact(15f)) },
{ ItemID.BluePhaseblade, phaseblade },
{ ItemID.BluePhasesaber, phasesaber },
- { ItemID.BoneSword, Do(AutoReuse, UseTurn, DamageExact(25)) },
+ { ItemID.BoneSword, Do(UseTurn, DamageExact(25)) },
{ ItemID.BookofSkulls, Do(DamageExact(27), ManaExact(13), ShootSpeedExact(5.5f)) },
{ ItemID.BookStaff, Do(ManaExact(14)) }, // Tome of Infinite Wisdom
{ ItemID.Boomstick, Do(DamageExact(11)) },
- { ItemID.BreakerBlade, Do(AutoReuse, UseTurn, DamageExact(140)) },
+ { ItemID.BreakerBlade, Do(UseTurn, DamageExact(140)) },
{ ItemID.CandyCornRifle, Do(DamageExact(66)) },
- { ItemID.Cascade, Do(AutoReuse, DamageExact(31)) },
+ { ItemID.Cascade, Do(DamageExact(31)) },
{ ItemID.ChainGuillotines, Do(DamageExact(100)) },
{ ItemID.ChainGun, Do(DamageExact(35)) },
- { ItemID.ChainKnife, Do(AutoReuse, DamageRatio(1.34f)) }, // Uses ratios due to remix seed
+ { ItemID.ChainKnife, Do(DamageRatio(1.34f)) }, // Uses ratios due to remix seed
{ ItemID.ChlorophyteClaymore, Do(UseMeleeSpeed, DamageExact(180), UseExact(45), ShootSpeedExact(22f)) },
- { ItemID.ChlorophytePartisan, Do(AutoReuse, UseMeleeSpeed, DamageExact(98)) },
+ { ItemID.ChlorophytePartisan, Do(UseMeleeSpeed, DamageExact(98)) },
{ ItemID.ChlorophyteSaber, Do(UseMeleeSpeed, DamageExact(92), UseExact(10)) },
{ ItemID.ChristmasTreeSword, Do(UseTurn, UseMeleeSpeed, DamageExact(80), UseExact(30)) },
{ ItemID.ClingerStaff, Do(DamageExact(63)) },
{ ItemID.ClockworkAssaultRifle, Do(DamageExact(21)) },
- { ItemID.CobaltNaginata, Do(AutoReuse, TrueMelee, DamageExact(55), UseExact(9), ShootSpeedExact(12f)) },
+ { ItemID.CobaltNaginata, Do(TrueMelee, DamageExact(55), UseExact(9), ShootSpeedExact(12f)) },
{ ItemID.CobaltRepeater, Do(UseExact(18)) },
{ ItemID.CobaltSword, Do(DamageExact(60), UseExact(9)) },
- { ItemID.Code2, Do(AutoReuse, DamageExact(43)) },
+ { ItemID.Code2, Do(DamageExact(43)) },
{ ItemID.CoinGun, Do(UseExact(12)) },
- { ItemID.CorruptYoyo, Do(AutoReuse, DamageExact(20)) }, // Malaise
- { ItemID.CrimsonYoyo, Do(AutoReuse, DamageExact(20)) }, // Artery
+ { ItemID.CorruptYoyo, Do(DamageExact(20)) }, // Malaise
+ { ItemID.CrimsonYoyo, Do(DamageExact(20)) }, // Artery
{ ItemID.CrystalBullet, Do(DamageExact(6)) },
{ ItemID.CrystalDart, Do(DamageExact(20)) },
{ ItemID.CrystalStorm, Do(DamageExact(40)) },
@@ -96,64 +95,63 @@ namespace CalamityMod.Items
{ ItemID.Cutlass, Do(UseRatio(0.9f), DamageExact(90)) },
{ ItemID.DaedalusStormbow, Do(DamageExact(30)) },
{ ItemID.DaoofPow, Do(DamageExact(85)) }, // Displays as 170 damage
- { ItemID.DarkLance, Do(AutoReuse, TrueMelee, DamageExact(40)) },
+ { ItemID.DarkLance, Do(TrueMelee, DamageExact(40)) },
{ ItemID.DartRifle, Do(DamageExact(58)) },
{ ItemID.DayBreak, Do(DamageExact(125), UseExact(22)) },
{ ItemID.DD2BetsyBow, Do(DamageExact(42)) }, // Aerial Bane's ridiculous multiplier is removed, so this compensates for that
{ ItemID.DD2SquireBetsySword, Do(UseMeleeSpeed, DamageExact(150)) }, // Flying Dragon
- { ItemID.DD2SquireDemonSword, Do(DamageExact(110), UseExact(25)) }, // Brand of the Inferno
- { ItemID.DeadlySphereStaff, Do(UseExact(20), DamageExact(50)) },
+ { ItemID.DeadlySphereStaff, Do(DamageExact(50)) },
{ ItemID.DeathSickle, Do(UseMeleeSpeed, DamageExact(70), ShootSpeedExact(15f)) },
- { ItemID.DemonBow, Do(DamageExact(12), AutoReuse) },
- { ItemID.DemonScythe, Do(AutoReuse, DamageExact(28)) },
- { ItemID.DyeTradersScimitar, Do(AutoReuse, UseTurn, DamageExact(24)) }, // Exotic Scimitar
+ { ItemID.DemonBow, Do(DamageExact(12)) },
+ { ItemID.DemonScythe, Do(DamageExact(28)) },
+ { ItemID.DyeTradersScimitar, Do(UseTurn, DamageExact(24)) }, // Exotic Scimitar
{ ItemID.ElfMelter, Do(ShootSpeedDelta(+5f)) },
{ ItemID.EmeraldStaff, Do(DamageExact(27)) },
- { ItemID.EmpressBlade, Do(DamageExact(50), UseExact(20)) }, // Terraprisma
+ { ItemID.EmpressBlade, Do(DamageExact(50)) }, // Terraprisma
{ ItemID.EnchantedBoomerang, Do(DamageExact(24)) },
{ ItemID.EnchantedSword, Do(UseMeleeSpeed, DamageExact(30), ShootSpeedExact(15f)) },
{ ItemID.EndlessMusketPouch, Do(DamageExact(8)) },
- { ItemID.Excalibur, Do(TrueMelee, DamageExact(205), UseExact(24)) },
+ { ItemID.Excalibur, Do(TrueMelee, DamageExact(170)) },
{ ItemID.FairyQueenMagicItem, Do(DamageExact(54)) }, // Nightglow
{ ItemID.FalconBlade, Do(UseTurn, UseExact(13)) },
{ ItemID.FireworksLauncher, Do(DamageExact(50), UseExact(25)) }, // Celebration
{ ItemID.Flamarang, Do(DamageExact(37)) },
{ ItemID.Flamelash, Do(DamageExact(36), ManaExact(18)) },
{ ItemID.Flamethrower, Do(DamageExact(21), ShootSpeedDelta(+3f)) },
- { ItemID.FlowerofFire, Do(AutoReuse, ManaExact(7), UseRatio(0.88f), DamageRatio(0.7f)) }, // Uses ratios due to remix seed
- { ItemID.FlowerofFrost, Do(AutoReuse, ManaExact(7), UseExact(22), DamageExact(70), ShootSpeedExact(14)) },
+ { ItemID.FlowerofFire, Do(ManaExact(7), DamageRatio(0.78f)) }, // Uses ratios due to remix seed
+ { ItemID.FlowerofFrost, Do(ManaExact(7), UseExact(22), DamageExact(70), ShootSpeedExact(14)) },
{ ItemID.FlyingKnife, Do(DamageExact(53)) },
{ ItemID.Frostbrand, Do(UseMeleeSpeed, DamageExact(88)) },
{ ItemID.Gatligator, Do(UseExact(6)) },
- { ItemID.GoldShortsword, Do(AutoReuse, TrueMelee, DamageExact(17)) },
+ { ItemID.GoldShortsword, Do(TrueMelee, DamageExact(17)) },
{ ItemID.GolemFist, Do(DamageExact(150)) },
- { ItemID.Gradient, Do(AutoReuse, DamageExact(39)) },
+ { ItemID.Gradient, Do(DamageExact(39)) },
{ ItemID.GreenPhaseblade, phaseblade },
{ ItemID.GreenPhasesaber, phasesaber },
{ ItemID.GrenadeLauncher, Do(DamageExact(105)) },
- { ItemID.Gungnir, Do(AutoReuse, TrueMelee, DamageExact(132), ShootSpeedExact(7f)) },
+ { ItemID.Gungnir, Do(TrueMelee, DamageExact(132), ShootSpeedExact(7f)) },
{ ItemID.HallowedRepeater, Do(UseExact(12)) },
{ ItemID.Handgun, Do(UseExact(20)) },
{ ItemID.HighVelocityBullet, Do(DamageExact(13)) },
- { ItemID.HiveFive, Do(AutoReuse, DamageExact(27)) },
- { ItemID.HornetStaff, Do(DamageExact(18), UseExact(30)) },
+ { ItemID.HiveFive, Do(DamageExact(27)) },
+ { ItemID.HornetStaff, Do(DamageExact(18)) },
{ ItemID.IceBlade, Do(UseMeleeSpeed) },
{ ItemID.IceBoomerang, Do(UseExact(25), ShootSpeedExact(9)) },
{ ItemID.IceRod, Do(UseExact(6), ShootSpeedExact(20)) },
- { ItemID.IceSickle, Do(AutoReuse, UseMeleeSpeed, DamageExact(75), ShootSpeedExact(20f)) },
+ { ItemID.IceSickle, Do(UseMeleeSpeed, DamageExact(75), ShootSpeedExact(20f)) },
{ ItemID.IchorArrow, Do(DamageExact(13)) },
{ ItemID.IchorBullet, Do(DamageExact(11)) },
- { ItemID.ImpStaff, Do(UseExact(30), DamageExact(25)) },
+ { ItemID.ImpStaff, Do(DamageExact(25)) },
{ ItemID.InfernoFork, Do(DamageExact(83), ShootSpeedExact(11)) },
{ ItemID.InfluxWaver, Do(UseMeleeSpeed, DamageExact(80), UseExact(25)) },
- { ItemID.IronShortsword, Do(AutoReuse, TrueMelee, DamageExact(10)) },
+ { ItemID.IronShortsword, Do(TrueMelee, DamageExact(10)) },
{ ItemID.Keybrand, Do(UseTurn) },
{ ItemID.KOCannon, Do(DamageRatio(2.65f)) }, // Uses ratios due to remix seed
- { ItemID.Kraken, Do(AutoReuse, DamageExact(65)) },
+ { ItemID.Kraken, Do(DamageExact(65)) },
{ ItemID.LaserMachinegun, Do(DamageExact(49)) },
{ ItemID.LaserRifle, Do(DamageExact(46), UseExact(10), ManaExact(4)) },
{ ItemID.LastPrism, Do(DamageExact(57), ManaExact(10)) },
- { ItemID.LeadShortsword, Do(AutoReuse, TrueMelee, DamageExact(11)) },
+ { ItemID.LeadShortsword, Do(TrueMelee, DamageExact(11)) },
{ ItemID.LeafBlower, Do(DamageExact(61)) },
{ ItemID.LightDisc, Do(DamageExact(80), ShootSpeedExact(18)) },
{ ItemID.LunarFlareBook, Do(DamageExact(110)) },
@@ -166,36 +164,36 @@ namespace CalamityMod.Items
{ ItemID.MiniNukeI, Do(DamageExact(90)) },
{ ItemID.MiniNukeII, Do(DamageExact(90)) },
{ ItemID.Minishark, Do(DamageExact(4)) },
- { ItemID.MoltenFury, Do(UseExact(28), AutoReuse) },
+ { ItemID.MoltenFury, Do(UseExact(28)) },
{ ItemID.MonkStaffT1, Do(TrueMeleeNoSpeed, DamageExact(83)) }, // Sleepy Octopod
- { ItemID.MonkStaffT2, Do(AutoReuse, TrueMelee, DamageExact(90)) }, // Ghastly Glaive
+ { ItemID.MonkStaffT2, Do(TrueMelee, DamageExact(90)) }, // Ghastly Glaive
{ ItemID.MonkStaffT3, Do(DamageExact(225)) }, // Sky Dragon's Fury
{ ItemID.MoonlordBullet, Do(DamageExact(17)) }, // Luminite Bullet
- { ItemID.MoonlordTurretStaff, Do(DamageExact(50), UseExact(15)) }, // Lunar Portal Staff
+ { ItemID.MoonlordTurretStaff, Do(DamageExact(50)) }, // Lunar Portal Staff
{ ItemID.Muramasa, Do(CritDelta(+10)) },
- { ItemID.MushroomSpear, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(100)) },
+ { ItemID.MushroomSpear, Do(TrueMelee, UseRatio(0.8f), DamageExact(100)) },
{ ItemID.Musket, Do(DamageExact(22)) },
- { ItemID.MythrilHalberd, Do(AutoReuse, TrueMelee, DamageExact(65), UseExact(8), ShootSpeedExact(15f)) },
+ { ItemID.MythrilHalberd, Do(TrueMelee, DamageExact(65), UseExact(8), ShootSpeedExact(15f)) },
{ ItemID.MythrilRepeater, Do(UseExact(16)) },
{ ItemID.MythrilSword, Do(UseTurn, DamageExact(70), UseExact(8)) },
{ ItemID.NailGun, Do(DamageExact(77)) },
{ ItemID.NettleBurst, Do(ManaExact(10), DamageExact(65)) },
{ ItemID.NightsEdge, Do(TrueMelee, DamageExact(45)) },
- { ItemID.NorthPole, Do(AutoReuse, UseMeleeSpeed) },
+ { ItemID.NorthPole, Do(UseMeleeSpeed) },
{ ItemID.OrangePhaseblade, phaseblade },
{ ItemID.OrangePhasesaber, phasesaber },
- { ItemID.OrichalcumHalberd, Do(AutoReuse, TrueMelee, DamageExact(128), ShootSpeedExact(6f)) },
+ { ItemID.OrichalcumHalberd, Do(TrueMelee, DamageExact(128), ShootSpeedExact(6f)) },
{ ItemID.OrichalcumRepeater, Do(DamageExact(48)) },
{ ItemID.OrichalcumSword, Do(UseTurn, DamageExact(175)) },
{ ItemID.PaladinsHammer, Do(DamageExact(95), ShootSpeedExact(28)) },
- { ItemID.PalladiumPike, Do(AutoReuse, TrueMelee, DamageExact(120), ShootSpeedExact(5.4f)) },
+ { ItemID.PalladiumPike, Do(TrueMelee, DamageExact(120), ShootSpeedExact(5.4f)) },
{ ItemID.PalladiumRepeater, Do(DamageExact(45)) },
{ ItemID.PalladiumSword, Do(DamageExact(150)) },
- { ItemID.PearlwoodBow, Do(AutoReuse, DamageExact(32)) },
+ { ItemID.PearlwoodBow, Do(DamageExact(32)) },
{ ItemID.PearlwoodSword, Do(UseTurn, DamageExact(45)) },
{ ItemID.PewMaticHorn, Do(DamageExact(25), ShootSpeedExact(15)) },
- { ItemID.PhoenixBlaster, Do(AutoReuse, UseExact(20)) },
- { ItemID.PlatinumShortsword, Do(AutoReuse, TrueMelee, DamageExact(18)) },
+ { ItemID.PhoenixBlaster, Do(UseExact(20)) },
+ { ItemID.PlatinumShortsword, Do(TrueMelee, DamageExact(18)) },
{ ItemID.PoisonStaff, Do(DamageExact(57)) },
{ ItemID.PossessedHatchet, Do(DamageExact(135)) },
{ ItemID.PrincessWeapon, Do(DamageExact(80)) }, // Resonance Scepter
@@ -203,17 +201,17 @@ namespace CalamityMod.Items
{ ItemID.PurpleClubberfish, Do(UseTurn, KnockbackExact(10f)) },
{ ItemID.PurplePhaseblade, phaseblade },
{ ItemID.PurplePhasesaber, phasesaber },
- { ItemID.PygmyStaff, Do(UseExact(20), DamageExact(63)) },
+ { ItemID.PygmyStaff, Do(DamageExact(63)) },
{ ItemID.RainbowGun, Do(DamageExact(60), ManaExact(40)) },
{ ItemID.RainbowRod, Do(DamageExact(40), ManaExact(13), KnockbackExact(8f)) },
- { ItemID.Rally, Do(AutoReuse, DamageExact(18)) },
- { ItemID.RavenStaff, Do(UseExact(20), DamageExact(36)) },
+ { ItemID.Rally, Do(DamageExact(18)) },
+ { ItemID.RavenStaff, Do(DamageExact(36)) },
{ ItemID.RazorbladeTyphoon, Do(DamageExact(103)) },
{ ItemID.Razorpine, Do(DamageExact(40)) },
{ ItemID.RedPhaseblade, phaseblade },
{ ItemID.RedPhasesaber, phasesaber },
{ ItemID.RedRyder, Do(DamageExact(24)) },
- { ItemID.RedsYoyo, Do(AutoReuse, DamageExact(48)) }, // Red's Throw and Valkyrie Yoyo have the same stats
+ { ItemID.RedsYoyo, Do(DamageExact(48)) }, // Red's Throw and Valkyrie Yoyo have the same stats
{ ItemID.RocketLauncher, Do(DamageExact(60), ShootSpeedExact(9)) },
{ ItemID.Sandgun, Do(DamageExact(22), UseExact(20)) },
{ ItemID.SapphireStaff, Do(DamageExact(25)) },
@@ -224,71 +222,71 @@ namespace CalamityMod.Items
{ ItemID.ShadowFlameHexDoll, Do(DamageExact(40), ShootSpeedExact(30)) },
{ ItemID.ShadowFlameKnife, Do(DamageExact(50)) },
{ ItemID.SharpTears, Do(DamageExact(49)) }, // Blood Thorn
- { ItemID.Shotgun, Do(DamageExact(36), AutoReuse) },
+ { ItemID.Shotgun, Do(DamageExact(36)) },
{ ItemID.Shroomerang, Do(ShootSpeedExact(11)) },
{ ItemID.SilverBullet, Do(DamageExact(8)) },
- { ItemID.SilverShortsword, Do(AutoReuse, TrueMelee, DamageExact(14)) },
+ { ItemID.SilverShortsword, Do(TrueMelee, DamageExact(14)) },
{ ItemID.SkyFracture, Do(DamageExact(46)) },
{ ItemID.SlapHand, Do(UseTurn, DamageExact(120)) },
- { ItemID.Smolstar, Do(DamageExact(9), UseExact(25)) }, // Blade Staff
+ { ItemID.Smolstar, Do(DamageExact(9)) }, // Blade Staff
{ ItemID.SniperRifle, Do(DamageExact(200), UseExact(40)) },
{ ItemID.SolarEruption, Do(DamageExact(122)) },
{ ItemID.SoulDrain, Do(DamageExact(38)) }, // Life Drain
{ ItemID.SpaceGun, Do(DamageExact(23)) },
- { ItemID.Spear, Do(AutoReuse, TrueMelee, DamageExact(14)) },
+ { ItemID.Spear, Do(TrueMelee, DamageExact(14)) },
{ ItemID.SpectreStaff, Do(DamageExact(72)) },
{ ItemID.SpiritFlame, Do(UseExact(20), ManaExact(11), ShootSpeedExact(2f)) },
{ ItemID.StaffofEarth, Do(DamageExact(150)) },
- { ItemID.StarCannon, Do(DamageExact(25), UseExact(15)) },
- { ItemID.StardustDragonStaff, Do(DamageExact(20), UseExact(19)) },
- { ItemID.StormTigerStaff, Do(DamageExact(49), UseExact(20)) }, // Desert Tiger Staff
- { ItemID.StylistKilLaKillScissorsIWish, Do(AutoReuse, UseTurn, DamageExact(21)) }, // Stylish Scissors
+ { ItemID.StarCannon, Do(UseExact(18)) },
+ { ItemID.StardustDragonStaff, Do(DamageExact(20)) },
+ { ItemID.StormTigerStaff, Do(DamageExact(49)) }, // Desert Tiger Staff
+ { ItemID.StylistKilLaKillScissorsIWish, Do(UseTurn, DamageExact(21)) }, // Stylish Scissors
{ ItemID.Stynger, Do(DamageExact(75)) },
{ ItemID.SuperStarCannon, Do(DamageExact(55)) },
- { ItemID.Swordfish, Do(AutoReuse, TrueMelee, DamageExact(24)) },
+ { ItemID.Swordfish, Do(TrueMelee, DamageExact(24)) },
{ ItemID.TacticalShotgun, Do(DamageExact(34)) },
- { ItemID.TaxCollectorsStickOfDoom, Do(AutoReuse, UseTurn, UseRatio(0.8f), DamageExact(70)) }, // Classy Cane
- { ItemID.TendonBow, Do(DamageExact(17), AutoReuse) },
+ { ItemID.TaxCollectorsStickOfDoom, Do(UseTurn, UseRatio(0.8f), DamageExact(70)) }, // Classy Cane
+ { ItemID.TendonBow, Do(DamageExact(17)) },
{ ItemID.TerraBlade, Do(DamageExact(95)) },
{ ItemID.Terragrim, Do(TrueMeleeNoSpeed, DamageExact(13)) },
// Vanilla damage 190. After fixing iframes so yoyo and shots can hit simultaneously,
// Terrarian is extremely overpowered and requires a heavy nerf.
- { ItemID.Terrarian, Do(AutoReuse, DamageExact(90)) },
- { ItemID.TheEyeOfCthulhu, Do(AutoReuse, DamageExact(80)) },
+ { ItemID.Terrarian, Do(DamageExact(90)) },
+ { ItemID.TheEyeOfCthulhu, Do(DamageExact(80)) },
{ ItemID.TheMeatball, Do(DamageExact(24)) },
- { ItemID.TheRottedFork, Do(AutoReuse, TrueMelee, DamageExact(20)) },
- { ItemID.TheUndertaker, Do(AutoReuse, DamageExact(15)) },
- { ItemID.ThunderSpear, Do(AutoReuse, UseMeleeSpeed) }, // Storm Spear
+ { ItemID.TheRottedFork, Do(TrueMelee, DamageExact(20)) },
+ { ItemID.TheUndertaker, Do(DamageExact(15)) },
+ { ItemID.ThunderSpear, Do(UseMeleeSpeed) }, // Storm Spear
{ ItemID.ThunderStaff, Do(DamageExact(18)) }, //Thunder Zapper
{ ItemID.TitaniumRepeater, Do(DamageExact(52)) },
{ ItemID.TitaniumSword, Do(UseTurn, DamageExact(192)) },
- { ItemID.TitaniumTrident, Do(AutoReuse, TrueMelee, DamageExact(144), ShootSpeedExact(6.5f)) },
+ { ItemID.TitaniumTrident, Do(TrueMelee, DamageExact(144), ShootSpeedExact(6.5f)) },
{ ItemID.TopazStaff, Do(ManaExact(2)) },
{ ItemID.ToxicFlask, Do(DamageExact(62), UseExact(33), ManaExact(20)) },
{ ItemID.Toxikarp, Do(UseExact(9)) },
- { ItemID.Trident, Do(AutoReuse, TrueMelee, DamageExact(20)) },
+ { ItemID.Trident, Do(TrueMelee, DamageExact(20)) },
{ ItemID.Trimarang, Do(DamageExact(24)) },
{ ItemID.TrueExcalibur, Do(TrueMelee, DamageExact(112)) },
{ ItemID.TrueNightsEdge, Do(DamageExact(105)) },
{ ItemID.Tsunami, Do(DamageExact(45)) },
{ ItemID.TungstenBullet, Do(DamageExact(8)) },
- { ItemID.TungstenShortsword, Do(AutoReuse, TrueMelee, DamageExact(15)) },
+ { ItemID.TungstenShortsword, Do(TrueMelee, DamageExact(15)) },
{ ItemID.UnholyArrow, Do(DamageExact(11)) },
{ ItemID.UnholyTrident, Do(ManaRatio(0.78f), DamageRatio(0.91f)) }, // Uses ratios due to remix seed
{ ItemID.Uzi, Do(UseExact(8)) },
{ ItemID.VampireKnives, Do(DamageExact(38)) },
- { ItemID.ValkyrieYoyo, Do(AutoReuse, DamageExact(48)) }, // Red's Throw and Valkyrie Yoyo have the same stats
+ { ItemID.ValkyrieYoyo, Do(DamageExact(48)) }, // Red's Throw and Valkyrie Yoyo have the same stats
{ ItemID.VenomStaff, Do(UseExact(27)) },
{ ItemID.WaspGun, Do(DamageExact(44)) },
{ ItemID.WaterBolt, Do(DamageExact(23)) },
{ ItemID.WhitePhaseblade, phaseblade },
{ ItemID.WhitePhasesaber, phasesaber },
{ ItemID.WoodenBoomerang, Do(DamageExact(16), Value(Item.sellPrice(copper: 20))) },
- { ItemID.Yelets, Do(AutoReuse, DamageExact(53)) },
+ { ItemID.Yelets, Do(DamageExact(53)) },
{ ItemID.YellowPhaseblade, phaseblade },
{ ItemID.YellowPhasesaber, phasesaber },
{ ItemID.Zenith, Do(DamageExact(210)) },
- { ItemID.ZombieArm, Do(AutoReuse, UseTurn, KnockbackExact(12f)) },
+ { ItemID.ZombieArm, Do(UseTurn, KnockbackExact(12f)) },
#endregion
#region CATEGORY 2: Defense Balancing
@@ -405,130 +403,61 @@ namespace CalamityMod.Items
#region CATEGORY 4: True Melee support
{ ItemID.Arkhalis, trueMeleeNoSpeed },
- { ItemID.CopperShortsword, Do(AutoReuse, TrueMelee) },
- { ItemID.Gladius, Do(AutoReuse, TrueMelee) },
+ { ItemID.CopperShortsword, trueMelee },
+ { ItemID.Gladius, trueMelee },
{ ItemID.HallowJoustingLance, trueMelee },
{ ItemID.JoustingLance, trueMelee },
{ ItemID.NebulaChainsaw, trueMeleeNoSpeed },
- { ItemID.ObsidianSwordfish, Do(AutoReuse, TrueMelee) },
+ { ItemID.ObsidianSwordfish, trueMelee },
{ ItemID.PiercingStarlight, trueMelee }, // Starlight
{ ItemID.Ruler, trueMelee },
{ ItemID.ShadowJoustingLance, trueMelee },
{ ItemID.SolarFlareChainsaw, trueMeleeNoSpeed },
{ ItemID.StardustChainsaw, trueMeleeNoSpeed },
{ ItemID.TheHorsemansBlade, trueMelee },
- { ItemID.TinShortsword, Do(AutoReuse, TrueMelee) },
+ { ItemID.TinShortsword, trueMelee },
{ ItemID.VortexChainsaw, trueMeleeNoSpeed },
#endregion
- #region CATEGORY 5: Summoner Quality of Life
- { ItemID.BabyBirdStaff, Do(UseExact(35)) }, // Finch Staff
- { ItemID.BlandWhip, autoReuse }, // Leather Whip
- { ItemID.BoneWhip, autoReuse }, // Spinal Tap
- { ItemID.CoolWhip, autoReuse },
- { ItemID.DD2BallistraTowerT1Popper, autoReuse }, // Ballista Tier 1
- { ItemID.DD2BallistraTowerT2Popper, Do(AutoReuse, UseExact(25)) }, // Ballista Tier 2
- { ItemID.DD2BallistraTowerT3Popper, Do(AutoReuse, UseExact(20)) }, // Ballista Tier 3
- { ItemID.DD2ExplosiveTrapT1Popper, autoReuse }, // Explosive Trap Tier 1
- { ItemID.DD2ExplosiveTrapT2Popper, Do(AutoReuse, UseExact(25)) }, // Explosive Trap Tier 2
- { ItemID.DD2ExplosiveTrapT3Popper, Do(AutoReuse, UseExact(20)) }, // Explosive Trap Tier 3
- { ItemID.DD2FlameburstTowerT1Popper, autoReuse }, // Flameburst Tier 1
- { ItemID.DD2FlameburstTowerT2Popper, Do(AutoReuse, UseExact(25)) }, // Flameburst Tier 2
- { ItemID.DD2FlameburstTowerT3Popper, Do(AutoReuse, UseExact(20)) }, // Flameburst Tier 3
- { ItemID.DD2LightningAuraT1Popper, autoReuse }, // Lightning Aura Tier 1
- { ItemID.DD2LightningAuraT2Popper, Do(AutoReuse, UseExact(25)) }, // Lightning Aura Tier 2
- { ItemID.DD2LightningAuraT3Popper, Do(AutoReuse, UseExact(20)) }, // Lightning Aura Tier 3
- { ItemID.FireWhip, autoReuse }, // Firecracker
- { ItemID.FlinxStaff, Do(UseExact(35)) },
- { ItemID.MaceWhip, autoReuse }, // Morning Star
- { ItemID.OpticStaff, Do(UseExact(25)) },
- { ItemID.PirateStaff, Do(UseExact(25)) },
- { ItemID.QueenSpiderStaff, Do(UseExact(25)) },
- { ItemID.RainbowCrystalStaff, Do(UseExact(15)) },
- { ItemID.RainbowWhip, autoReuse }, // Kaleidoscope
- { ItemID.SanguineStaff, Do(UseExact(25)) },
- { ItemID.ScytheWhip, autoReuse }, // Dark Harvest
- { ItemID.SlimeStaff, Do(UseExact(30)) },
- { ItemID.SpiderStaff, Do(UseExact(25)) },
- { ItemID.StaffoftheFrostHydra, Do(UseExact(20)) },
- { ItemID.StardustCellStaff, Do(UseExact(20)) },
- { ItemID.SwordWhip, autoReuse }, // Durendal
- { ItemID.TempestStaff, Do(UseExact(20)) },
- { ItemID.ThornWhip, autoReuse }, // Snapthorn
- { ItemID.VampireFrogStaff, Do(UseExact(30)) },
- { ItemID.XenoStaff, Do(UseExact(20)) },
+ #region CATEGORY 5: UseTurn
+ { ItemID.BladeofGrass, Do(UseTurn) },
+ { ItemID.BloodButcherer, Do(UseTurn) },
+ { ItemID.BorealWoodSword, Do(UseTurn) },
+ { ItemID.CactusSword, Do(UseTurn) },
+ { ItemID.CandyCaneSword, Do(UseTurn) },
+ { ItemID.CopperBroadsword, Do(UseTurn) },
+ { ItemID.EbonwoodSword, Do(UseTurn) },
+ { ItemID.FieryGreatsword, Do(UseTurn) }, // Volcano
+ { ItemID.GoldBroadsword, Do(UseTurn) },
+ { ItemID.IronBroadsword, Do(UseTurn) },
+ { ItemID.LeadBroadsword, Do(UseTurn) },
+ { ItemID.LightsBane, Do(UseTurn) },
+ { ItemID.PalmWoodSword, Do(UseTurn) },
+ { ItemID.PlatinumBroadsword, Do(UseTurn) },
+ { ItemID.RichMahoganySword, Do(UseTurn) },
+ { ItemID.ShadewoodSword, Do(UseTurn) },
+ { ItemID.SilverBroadsword, Do(UseTurn) },
+ { ItemID.TinBroadsword, Do(UseTurn) },
+ { ItemID.TungstenBroadsword, Do(UseTurn) },
+ { ItemID.WoodenSword, Do(UseTurn) },
#endregion
- #region CATEGORY 6: Other Quality of Life (AutoReuse / UseTurn)
- { ItemID.Amarok, autoReuse },
- { ItemID.BatBat, autoReuse },
- { ItemID.BladeofGrass, Do(AutoReuse, UseTurn) },
- { ItemID.BloodButcherer, Do(AutoReuse, UseTurn) },
- { ItemID.BorealWoodSword, Do(AutoReuse, UseTurn) },
- { ItemID.CactusSword, Do(AutoReuse, UseTurn) },
- { ItemID.CandyCaneSword, Do(AutoReuse, UseTurn) },
- { ItemID.Chik, autoReuse },
- { ItemID.Code1, autoReuse },
- { ItemID.CopperBroadsword, Do(AutoReuse, UseTurn) },
- { ItemID.EbonwoodSword, Do(AutoReuse, UseTurn) },
- { ItemID.FieryGreatsword, Do(AutoReuse, UseTurn) }, // Volcano
- { ItemID.FormatC, autoReuse },
- { ItemID.GoldBroadsword, Do(AutoReuse, UseTurn) },
- { ItemID.HelFire, autoReuse },
- { ItemID.IronBroadsword, Do(AutoReuse, UseTurn) },
- { ItemID.JungleYoyo, autoReuse }, // Amazon
- { ItemID.LifeCrystal, autoReuse },
- { ItemID.LeadBroadsword, Do(AutoReuse, UseTurn) },
- { ItemID.LifeFruit, autoReuse },
- { ItemID.LightsBane, Do(AutoReuse, UseTurn) },
- { ItemID.ManaCrystal, autoReuse },
- { ItemID.PalmWoodSword, Do(AutoReuse, UseTurn) },
- { ItemID.PaperAirplaneA, autoReuse },
- { ItemID.PaperAirplaneB, autoReuse }, // White Paper Airplane
- { ItemID.PlatinumBroadsword, Do(AutoReuse, UseTurn) },
- { ItemID.Revolver, autoReuse },
- { ItemID.RichMahoganySword, Do(AutoReuse, UseTurn) },
- { ItemID.ShadewoodSword, Do(AutoReuse, UseTurn) },
- { ItemID.SilverBroadsword, Do(AutoReuse, UseTurn) },
- { ItemID.Starfury, autoReuse },
- { ItemID.TentacleSpike, autoReuse },
- { ItemID.TinBroadsword, Do(AutoReuse, UseTurn) },
- { ItemID.TragicUmbrella, autoReuse },
- { ItemID.TungstenBroadsword, Do(AutoReuse, UseTurn) },
- { ItemID.Umbrella, autoReuse },
- { ItemID.Valor, autoReuse },
- { ItemID.WandofFrosting, autoReuse },
- { ItemID.WandofSparking, autoReuse },
- { ItemID.WeatherPain, autoReuse },
- { ItemID.WoodenSword, Do(AutoReuse, UseTurn) },
- { ItemID.WoodYoyo, autoReuse },
- { ItemID.ZapinatorGray, autoReuse },
- { ItemID.ZapinatorOrange, autoReuse },
- #endregion
-
- #region CATEGORY 7: Summoning Item Quality of Life
+ #region CATEGORY 6: Summoning Item Quality of Life
{ ItemID.Abeemination, nonConsumableBossSummon },
- { ItemID.BloodMoonStarter, Do(UseTimeExact(10))}, // Bloody Tear
{ ItemID.BloodySpine, nonConsumableBossSummon },
{ ItemID.CelestialSigil, nonConsumableBossSummon },
{ ItemID.DeerThing, nonConsumableBossSummon },
- { ItemID.GoblinBattleStandard, Do(UseTimeExact(10)) },
{ ItemID.MechanicalEye, nonConsumableBossSummon },
{ ItemID.MechanicalSkull, nonConsumableBossSummon },
{ ItemID.MechanicalWorm, nonConsumableBossSummon },
{ ItemID.MechdusaSummon, nonConsumableBossSummon }, // Ocram's Razor
- { ItemID.NaughtyPresent, Do(UseTimeExact(10)) },
- { ItemID.PirateMap, Do(UseTimeExact(10)) },
- { ItemID.PumpkinMoonMedallion, Do(UseTimeExact(10)) },
{ ItemID.QueenSlimeCrystal, nonConsumableBossSummon }, // Gelatin Crystal
{ ItemID.SlimeCrown, nonConsumableBossSummon },
- { ItemID.SnowGlobe, Do(UseTimeExact(10)) },
- { ItemID.SolarTablet, Do(UseTimeExact(10)) },
{ ItemID.SuspiciousLookingEye, nonConsumableBossSummon },
{ ItemID.WormFood, nonConsumableBossSummon },
#endregion
- #region CATEGORY 8: Sell Prices
+ #region CATEGORY 7: Sell Prices
{ ItemID.EncumberingStone, Do(Worthless) },
{ ItemID.FlareGun, Do(Value(Item.sellPrice(silver: 10))) },
{ ItemID.GlowingMushroom, Do(Worthless) },
@@ -622,19 +551,6 @@ namespace CalamityMod.Items
internal static IItemTweak AttackSpeedRatio(float f) => new AttackSpeedRatioRule(f);
#endregion
- #region Auto Reuse
- internal class AutoReuseRule : IItemTweak
- {
- internal readonly bool flag = true;
-
- public AutoReuseRule(bool ar) => flag = ar;
- public bool AppliesTo(Item it) => IsUsable(it);
- public void ApplyTweak(Item it) => it.autoReuse = flag;
- }
- internal static IItemTweak AutoReuse => new AutoReuseRule(true);
- internal static IItemTweak NoAutoReuse => new AutoReuseRule(false);
- #endregion
-
#region Axe Power
// Uses the values shown by Terraria, which are multiplied by 5, not the internal values
internal class AxePowerRule : IItemTweak
diff --git a/Items/Critters/ShoreskipperItem.cs b/Items/Critters/ShoreskipperItem.cs
new file mode 100644
index 0000000000..7eaf1fd339
--- /dev/null
+++ b/Items/Critters/ShoreskipperItem.cs
@@ -0,0 +1,23 @@
+using CalamityMod.NPCs.SunkenSea;
+using Terraria;
+using Terraria.ModLoader;
+using Terraria.ID;
+
+namespace CalamityMod.Items.Critters
+{
+ public class ShoreskipperItem : ModItem, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Items.Misc";
+ public override void SetStaticDefaults()
+ {
+ Item.ResearchUnlockCount = 5;
+ }
+
+ public override void SetDefaults()
+ {
+ Item.DefaultToCapturedCritter(ModContent.NPCType());
+ Item.value = Item.sellPrice(silver: 5);
+ Item.rare = ItemRarityID.Green;
+ }
+ }
+}
diff --git a/Items/Critters/ShoreskipperItem.png b/Items/Critters/ShoreskipperItem.png
new file mode 100644
index 0000000000..24722e85da
Binary files /dev/null and b/Items/Critters/ShoreskipperItem.png differ
diff --git a/Items/DifficultyItems/BallAndChain.cs b/Items/DifficultyItems/BallAndChain.cs
deleted file mode 100644
index 46062dabac..0000000000
--- a/Items/DifficultyItems/BallAndChain.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using Terraria;
-using Terraria.ID;
-using Terraria.ModLoader;
-
-namespace CalamityMod.Items.DifficultyItems
-{
- public class BallAndChain : ModItem, ILocalizedModType
- {
- public new string LocalizationCategory => "Items.Misc";
- public override void SetDefaults()
- {
- Item.width = 32;
- Item.height = 50;
- Item.rare = ItemRarityID.Blue;
- }
-
- public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
- {
- itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.ToolsOther;
- }
-
- public override bool CanUseItem(Player player) => false;
-
- public override void UpdateInventory(Player player)
- {
- if (Item.favorited)
- player.Calamity().blockAllDashes = true;
- }
-
- public override void AddRecipes()
- {
- CreateRecipe().
- AddRecipeGroup("IronBar", 10).
- AddIngredient(ItemID.Chain).
- AddTile(TileID.Anvils).
- Register();
- }
- }
-}
diff --git a/Items/DifficultyItems/BallAndChain.png b/Items/DifficultyItems/BallAndChain.png
deleted file mode 100644
index 7ca87bdef9..0000000000
Binary files a/Items/DifficultyItems/BallAndChain.png and /dev/null differ
diff --git a/Items/Fishing/SunkenSeaCatches/CoralskinFoolfish.cs b/Items/Fishing/SunkenSeaCatches/CoralskinFoolfish.cs
new file mode 100644
index 0000000000..28f3a54bcf
--- /dev/null
+++ b/Items/Fishing/SunkenSeaCatches/CoralskinFoolfish.cs
@@ -0,0 +1,30 @@
+using Terraria;
+using Terraria.ID;
+using Terraria.ModLoader;
+
+namespace CalamityMod.Items.Fishing.SunkenSeaCatches
+{
+ public class CoralskinFoolfish : ModItem, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Items.Fishing";
+ public override void SetStaticDefaults()
+ {
+ Item.ResearchUnlockCount = 3;
+ ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true;
+ }
+
+ public override void SetDefaults()
+ {
+ Item.width = 32;
+ Item.height = 36;
+ Item.maxStack = Item.CommonMaxStack;
+ Item.value = Item.sellPrice(silver: 5);
+ Item.rare = ItemRarityID.Blue;
+ }
+
+ public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
+ {
+ itemGroup = ContentSamples.CreativeHelper.ItemGroup.Fish;
+ }
+ }
+}
diff --git a/Items/Fishing/SunkenSeaCatches/CoralskinFoolfish.png b/Items/Fishing/SunkenSeaCatches/CoralskinFoolfish.png
new file mode 100644
index 0000000000..bae900260f
Binary files /dev/null and b/Items/Fishing/SunkenSeaCatches/CoralskinFoolfish.png differ
diff --git a/Items/Fishing/SunkenSeaCatches/GleamingCucumber.cs b/Items/Fishing/SunkenSeaCatches/GleamingCucumber.cs
new file mode 100644
index 0000000000..b1bfd29d2a
--- /dev/null
+++ b/Items/Fishing/SunkenSeaCatches/GleamingCucumber.cs
@@ -0,0 +1,30 @@
+using Terraria;
+using Terraria.ID;
+using Terraria.ModLoader;
+
+namespace CalamityMod.Items.Fishing.SunkenSeaCatches
+{
+ public class GleamingCucumber : ModItem, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Items.Fishing";
+ public override void SetStaticDefaults()
+ {
+ Item.ResearchUnlockCount = 3;
+ ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true;
+ }
+
+ public override void SetDefaults()
+ {
+ Item.width = 32;
+ Item.height = 36;
+ Item.maxStack = Item.CommonMaxStack;
+ Item.value = Item.sellPrice(silver: 5);
+ Item.rare = ItemRarityID.Blue;
+ }
+
+ public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
+ {
+ itemGroup = ContentSamples.CreativeHelper.ItemGroup.Fish;
+ }
+ }
+}
diff --git a/Items/Fishing/SunkenSeaCatches/GleamingCucumber.png b/Items/Fishing/SunkenSeaCatches/GleamingCucumber.png
new file mode 100644
index 0000000000..156adc559c
Binary files /dev/null and b/Items/Fishing/SunkenSeaCatches/GleamingCucumber.png differ
diff --git a/Items/Fishing/SunkenSeaCatches/MoltenFishron.cs b/Items/Fishing/SunkenSeaCatches/MoltenFishron.cs
new file mode 100644
index 0000000000..f41ff91868
--- /dev/null
+++ b/Items/Fishing/SunkenSeaCatches/MoltenFishron.cs
@@ -0,0 +1,30 @@
+using Terraria;
+using Terraria.ID;
+using Terraria.ModLoader;
+
+namespace CalamityMod.Items.Fishing.SunkenSeaCatches
+{
+ public class MoltenFishron : ModItem, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Items.Fishing";
+ public override void SetStaticDefaults()
+ {
+ Item.ResearchUnlockCount = 3;
+ ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true;
+ }
+
+ public override void SetDefaults()
+ {
+ Item.width = 32;
+ Item.height = 36;
+ Item.maxStack = Item.CommonMaxStack;
+ Item.value = Item.sellPrice(silver: 7, copper: 50);
+ Item.rare = ItemRarityID.Blue;
+ }
+
+ public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
+ {
+ itemGroup = ContentSamples.CreativeHelper.ItemGroup.Fish;
+ }
+ }
+}
diff --git a/Items/Fishing/SunkenSeaCatches/MoltenFishron.png b/Items/Fishing/SunkenSeaCatches/MoltenFishron.png
new file mode 100644
index 0000000000..f306c72875
Binary files /dev/null and b/Items/Fishing/SunkenSeaCatches/MoltenFishron.png differ
diff --git a/Items/Fishing/SunkenSeaCatches/SpecularSturgeon.cs b/Items/Fishing/SunkenSeaCatches/SpecularSturgeon.cs
new file mode 100644
index 0000000000..1a1ffa6fe4
--- /dev/null
+++ b/Items/Fishing/SunkenSeaCatches/SpecularSturgeon.cs
@@ -0,0 +1,30 @@
+using Terraria;
+using Terraria.ID;
+using Terraria.ModLoader;
+
+namespace CalamityMod.Items.Fishing.SunkenSeaCatches
+{
+ public class SpecularSturgeon : ModItem, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Items.Fishing";
+ public override void SetStaticDefaults()
+ {
+ Item.ResearchUnlockCount = 3;
+ ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true;
+ }
+
+ public override void SetDefaults()
+ {
+ Item.width = 32;
+ Item.height = 36;
+ Item.maxStack = Item.CommonMaxStack;
+ Item.value = Item.sellPrice(silver: 5);
+ Item.rare = ItemRarityID.Blue;
+ }
+
+ public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
+ {
+ itemGroup = ContentSamples.CreativeHelper.ItemGroup.Fish;
+ }
+ }
+}
diff --git a/Items/Fishing/SunkenSeaCatches/SpecularSturgeon.png b/Items/Fishing/SunkenSeaCatches/SpecularSturgeon.png
new file mode 100644
index 0000000000..e43f598d86
Binary files /dev/null and b/Items/Fishing/SunkenSeaCatches/SpecularSturgeon.png differ
diff --git a/Items/Fishing/SunkenSeaCatches/Squidoom.cs b/Items/Fishing/SunkenSeaCatches/Squidoom.cs
new file mode 100644
index 0000000000..4daece1bdc
--- /dev/null
+++ b/Items/Fishing/SunkenSeaCatches/Squidoom.cs
@@ -0,0 +1,30 @@
+using Terraria;
+using Terraria.ID;
+using Terraria.ModLoader;
+
+namespace CalamityMod.Items.Fishing.SunkenSeaCatches
+{
+ public class Squidoom : ModItem, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Items.Fishing";
+ public override void SetStaticDefaults()
+ {
+ Item.ResearchUnlockCount = 3;
+ ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true;
+ }
+
+ public override void SetDefaults()
+ {
+ Item.width = 32;
+ Item.height = 36;
+ Item.maxStack = Item.CommonMaxStack;
+ Item.value = Item.sellPrice(silver: 5);
+ Item.rare = ItemRarityID.Blue;
+ }
+
+ public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
+ {
+ itemGroup = ContentSamples.CreativeHelper.ItemGroup.Fish;
+ }
+ }
+}
diff --git a/Items/Fishing/SunkenSeaCatches/Squidoom.png b/Items/Fishing/SunkenSeaCatches/Squidoom.png
new file mode 100644
index 0000000000..c165b54de4
Binary files /dev/null and b/Items/Fishing/SunkenSeaCatches/Squidoom.png differ
diff --git a/Items/Mounts/Minecarts/DoGCartMount.cs b/Items/Mounts/Minecarts/DoGCartMount.cs
index 3132669334..149d308bdf 100644
--- a/Items/Mounts/Minecarts/DoGCartMount.cs
+++ b/Items/Mounts/Minecarts/DoGCartMount.cs
@@ -28,10 +28,11 @@ namespace CalamityMod.Items.Mounts.Minecarts
MountData.idleFrameDelay = 10;
MountData.idleFrameStart = 0;
- // These are more powerful than the Cart Upgrade Kit (20f and 0.1f respectively) and using it will reduce the cart speed to that
- // We can IL edit this now but we can also wait for TML to add support for the kit (copefully soon)
- MountData.runSpeed = 22f;
- MountData.acceleration = 0.16f;
+ // Stat balancing
+ MountData.runSpeed = 20.0f;
+ MountData.acceleration = 0.1f;
+ MountData.MinecartUpgradeRunSpeed = 22.0f;
+ MountData.MinecartUpgradeAcceleration = 0.16f;
if (!Main.dedServ)
{
diff --git a/Items/Placeables/Banners/ShoreskipperBanner.cs b/Items/Placeables/Banners/ShoreskipperBanner.cs
new file mode 100644
index 0000000000..441b371120
--- /dev/null
+++ b/Items/Placeables/Banners/ShoreskipperBanner.cs
@@ -0,0 +1,7 @@
+namespace CalamityMod.Items.Placeables.Banners
+{
+ public class ShoreskipperBanner : BaseBanner
+ {
+ public override int BannerTileStyle => 148;
+ }
+}
diff --git a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs
index 7c242dbe47..d579d2dfa2 100644
--- a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs
+++ b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs
@@ -72,7 +72,6 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
"Fluffy",
"fryzahh",
"HaguriHat",
- "Heart Plus Up!",
"LordMetarex",
"Memes",
"Mercutio 'Merkalto' Takle",
@@ -136,6 +135,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
"GramOfSalt",
"Graydee",
"Grox the Great",
+ "Heart Plus Up!",
"Hectique",
"Hugekraken",
"Huggles",
diff --git a/Items/Potions/Alcohol/OddMushroom.cs b/Items/Potions/Alcohol/OddMushroom.cs
index 0c8166cea2..562d4ae785 100644
--- a/Items/Potions/Alcohol/OddMushroom.cs
+++ b/Items/Potions/Alcohol/OddMushroom.cs
@@ -10,8 +10,6 @@ namespace CalamityMod.Items.Potions.Alcohol
{
public new string LocalizationCategory => "Items.Potions";
- public static float DamageBoost = 0.5f;
-
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
@@ -29,11 +27,5 @@ namespace CalamityMod.Items.Potions.Alcohol
Item.value = Item.buyPrice(gold: 5); // Sold by Truffle
Item.rare = ItemRarityID.LightRed;
}
-
- public override void OnConsumeItem(Player player)
- {
- if (player.Calamity().trippyLevel < 3)
- player.Calamity().trippyLevel++;
- }
}
}
diff --git a/Items/Potions/HadalStew.cs b/Items/Potions/HadalStew.cs
index a724a51365..dc722b23d0 100644
--- a/Items/Potions/HadalStew.cs
+++ b/Items/Potions/HadalStew.cs
@@ -45,17 +45,9 @@ namespace CalamityMod.Items.Potions
list.FindAndReplace("[S]", duration);
}
- public override bool CanUseItem(Player player)
- {
- return player.potionDelay <= 0 && player.Calamity().potionTimer <= 0;
- }
+ public override void ModifyPotionDelay(Player player, ref int baseDelay) => baseDelay -= CalamityUtils.SecondsToFrames(60) - SicknessDuration;
- public override void OnConsumeItem(Player player)
- {
- player.AddBuff(BuffType, BuffDuration);
- // fixes hardcoded potion sickness duration from quick heal (see CalamityPlayerMiscEffects.cs)
- player.Calamity().potionTimer = 2;
- }
+ public override void OnConsumeItem(Player player) => player.AddBuff(BuffType, BuffDuration);
public override void AddRecipes()
{
diff --git a/Items/Tools/BallAndChain.cs b/Items/Tools/BallAndChain.cs
new file mode 100644
index 0000000000..18a6e566d7
--- /dev/null
+++ b/Items/Tools/BallAndChain.cs
@@ -0,0 +1,90 @@
+using System.Collections.Generic;
+using System.IO;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using ReLogic.Content;
+using Terraria;
+using Terraria.GameContent;
+using Terraria.ID;
+using Terraria.ModLoader;
+using Terraria.ModLoader.IO;
+
+namespace CalamityMod.Items.Tools
+{
+ public class BallAndChain : ModItem, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Items.Tools";
+
+ public static Asset DisabledSprite;
+ public override void Load() => DisabledSprite = ModContent.Request("CalamityMod/Items/Tools/BallAndChainDisabled");
+
+ public override void SetDefaults()
+ {
+ Item.width = 48;
+ Item.height = 48;
+ Item.rare = ItemRarityID.Blue;
+ }
+
+ public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
+ {
+ itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.ToolsOther;
+ }
+
+ #region Toggling
+ public bool Enabled = true;
+
+ public override ModItem Clone(Item item)
+ {
+ var clone = (BallAndChain)base.Clone(item);
+ clone.Enabled = Enabled;
+ return clone;
+ }
+
+ public override void SaveData(TagCompound tag) => tag.Add("blockerEnabled", Enabled);
+ public override void LoadData(TagCompound tag) => Enabled = tag.GetBool("blockerEnabled");
+ public override void NetSend(BinaryWriter writer) => writer.Write(Enabled);
+ public override void NetReceive(BinaryReader reader) => Enabled = reader.ReadBoolean();
+
+ public override bool CanRightClick() => true;
+ public override bool ConsumeItem(Player player) => false;
+ public override void RightClick(Player player)
+ {
+ Enabled = !Enabled;
+ Item.NetStateChanged();
+ }
+ #endregion
+
+ public override bool CanUseItem(Player player) => false;
+ public override void UpdateInventory(Player player) => player.Calamity().blockAllDashes |= Enabled;
+
+ public override void ModifyTooltips(List tooltips)
+ {
+ string text = this.GetLocalizedValue(Enabled ? "TooltipEnabled" : "TooltipDisabled");
+ tooltips.FindAndReplace("[STATE]", text);
+ }
+
+ public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
+ {
+ Texture2D tex = Enabled ? TextureAssets.Item[Type].Value : DisabledSprite.Value;
+ CalamityUtils.DrawInventoryCustomScale(spriteBatch, tex, position, frame, drawColor, itemColor, origin, scale, 0.8f);
+ return false;
+ }
+
+ public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
+ {
+ Texture2D tex = Enabled ? TextureAssets.Item[Type].Value : DisabledSprite.Value;
+ Vector2 origin = tex.Size() / 2f;
+ spriteBatch.Draw(tex, Item.Bottom - Main.screenPosition - Vector2.UnitY * origin.Y, null, lightColor, rotation, origin, scale, SpriteEffects.None, 0f);
+ return false;
+ }
+
+ public override void AddRecipes()
+ {
+ CreateRecipe().
+ AddRecipeGroup("IronBar", 10).
+ AddIngredient(ItemID.Chain).
+ AddTile(TileID.Anvils).
+ Register();
+ }
+ }
+}
diff --git a/Items/Tools/BallAndChain.png b/Items/Tools/BallAndChain.png
new file mode 100644
index 0000000000..349d76abf6
Binary files /dev/null and b/Items/Tools/BallAndChain.png differ
diff --git a/Items/Tools/BallAndChainDisabled.png b/Items/Tools/BallAndChainDisabled.png
new file mode 100644
index 0000000000..ffcd47384e
Binary files /dev/null and b/Items/Tools/BallAndChainDisabled.png differ
diff --git a/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs b/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs
index 8ab0339f1c..ce93378dfa 100644
--- a/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs
+++ b/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
Item.shootSpeed = 10f;
Item.damage = 30;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 30;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.noMelee = true;
Item.knockBack = 2.25f;
diff --git a/Items/Weapons/DraedonsArsenal/MountedScanner.cs b/Items/Weapons/DraedonsArsenal/MountedScanner.cs
index f6a07d25f4..f3ccae861e 100644
--- a/Items/Weapons/DraedonsArsenal/MountedScanner.cs
+++ b/Items/Weapons/DraedonsArsenal/MountedScanner.cs
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
Item.damage = 24;
Item.knockBack = 2f;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 24;
+ Item.useAnimation = Item.useTime = 36;
Item.autoReuse = true;
Item.useStyle = ItemUseStyleID.HoldUp;
diff --git a/Items/Weapons/DraedonsArsenal/PoleWarper.cs b/Items/Weapons/DraedonsArsenal/PoleWarper.cs
index 20059b8056..58497b24b0 100644
--- a/Items/Weapons/DraedonsArsenal/PoleWarper.cs
+++ b/Items/Weapons/DraedonsArsenal/PoleWarper.cs
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
Item.shootSpeed = 10f;
Item.damage = 207;
Item.mana = 12;
- Item.useAnimation = Item.useTime = 9;
+ Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.noMelee = true;
Item.knockBack = 8f;
diff --git a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs
index 3ddaa8b693..5d73429d8c 100644
--- a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs
+++ b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
Item.DamageType = DamageClass.Summon;
Item.sentry = true;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 24;
+ Item.useAnimation = Item.useTime = 30;
Item.knockBack = 0.25f;
Item.shoot = ModContent.ProjectileType();
Item.shootSpeed = 1f;
diff --git a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs
index f5ca444db6..358b4ff00d 100644
--- a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs
+++ b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs
@@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
Item.height = 24;
Item.damage = 200;
Item.mana = 12;
- Item.useAnimation = Item.useTime = 14;
+ Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.noMelee = true;
Item.knockBack = 3f;
diff --git a/Items/Weapons/Ranged/Infinity.cs b/Items/Weapons/Ranged/Infinity.cs
index 69837267f5..4eb04468eb 100644
--- a/Items/Weapons/Ranged/Infinity.cs
+++ b/Items/Weapons/Ranged/Infinity.cs
@@ -72,6 +72,11 @@ namespace CalamityMod.Items.Weapons.Ranged
Particle spark2 = new LineParticle(position + Main.rand.NextVector2Circular(6, 6), (velocity * 4).RotatedByRandom(0.2f) * Main.rand.NextFloat(0.8f, 1.2f), false, Main.rand.Next(15, 25 + 1), Main.rand.NextFloat(1.5f, 2f), new Color(229, 49, 39));
GeneralParticleHandler.SpawnParticle(spark2);
}
+
+ // Reset altFunctionUse to zero to prevent blank frame appear between shots on Alt-fire
+ if (player.itemAnimation <= 1)
+ player.altFunctionUse = 0;
+
return false;
}
diff --git a/Items/Weapons/Ranged/Shredder.cs b/Items/Weapons/Ranged/Shredder.cs
index 54e97775bd..7657926ed4 100644
--- a/Items/Weapons/Ranged/Shredder.cs
+++ b/Items/Weapons/Ranged/Shredder.cs
@@ -1,11 +1,9 @@
-using CalamityMod.Items.Materials;
-using CalamityMod.Projectiles.Ranged;
+using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
-using System;
namespace CalamityMod.Items.Weapons.Ranged
{
@@ -54,6 +52,11 @@ namespace CalamityMod.Items.Weapons.Ranged
{
Projectile.NewProjectile(source, newPosition, (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedByRandom(0.2f), shotType, damage, knockback, player.whoAmI);
}
+
+ // Reset altFunctionUse to zero to prevent blank frame appear between shots on Alt-fire
+ if (player.itemAnimation <= 1)
+ player.altFunctionUse = 0;
+
return false;
}
diff --git a/Items/Weapons/Rogue/Pumpkaboom.cs b/Items/Weapons/Rogue/Pumpkaboom.cs
index 5e17b4e136..638e4f7438 100644
--- a/Items/Weapons/Rogue/Pumpkaboom.cs
+++ b/Items/Weapons/Rogue/Pumpkaboom.cs
@@ -32,8 +32,6 @@ namespace CalamityMod.Items.Weapons.Rogue
Item.DamageType = RogueDamageClass.Instance;
}
- public override float StealthDamageMultiplier => 1f;
-
public override bool CanUseItem(Player player)
{
for (int x = 0; x < Main.maxProjectiles; x++)
diff --git a/Items/Weapons/Summon/AbandonedSlimeStaff.cs b/Items/Weapons/Summon/AbandonedSlimeStaff.cs
index 45fe58a160..d64c3cd5e1 100644
--- a/Items/Weapons/Summon/AbandonedSlimeStaff.cs
+++ b/Items/Weapons/Summon/AbandonedSlimeStaff.cs
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.mana = 40;
Item.damage = 56;
Item.knockBack = 3f;
- Item.useAnimation = Item.useTime = 20;
+ Item.useAnimation = Item.useTime = 36;
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
diff --git a/Items/Weapons/Summon/AmphibiansGuitar.cs b/Items/Weapons/Summon/AmphibiansGuitar.cs
index a385e088b1..3958287ca6 100644
--- a/Items/Weapons/Summon/AmphibiansGuitar.cs
+++ b/Items/Weapons/Summon/AmphibiansGuitar.cs
@@ -12,12 +12,13 @@ namespace CalamityMod.Items.Weapons.Summon
public override void SetDefaults()
{
+ Item.width = 72;
+ Item.height = 64;
Item.damage = 54;
Item.DamageType = DamageClass.Summon;
Item.shoot = ModContent.ProjectileType();
- (Item.width, Item.height) = (72, 64);
- Item.useAnimation = Item.useTime = 15;
+ Item.useAnimation = Item.useTime = 36;
Item.mana = 10;
Item.noMelee = true;
Item.autoReuse = true;
diff --git a/Items/Weapons/Summon/AncientIceChunk.cs b/Items/Weapons/Summon/AncientIceChunk.cs
index 3e00d8eb98..5cf2d78f05 100644
--- a/Items/Weapons/Summon/AncientIceChunk.cs
+++ b/Items/Weapons/Summon/AncientIceChunk.cs
@@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.shoot = ModContent.ProjectileType();
Item.knockBack = 2f;
- Item.useAnimation = Item.useTime = 25;
+ Item.useAnimation = Item.useTime = 36;
Item.mana = 10;
Item.noMelee = true;
Item.autoReuse = true;
diff --git a/Items/Weapons/Summon/AquasScepter.cs b/Items/Weapons/Summon/AquasScepter.cs
index 8ac9423c62..c42b5e7845 100644
--- a/Items/Weapons/Summon/AquasScepter.cs
+++ b/Items/Weapons/Summon/AquasScepter.cs
@@ -27,8 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.mana = 50;
Item.DamageType = DamageClass.Summon;
Item.sentry = true;
- Item.useTime = 30;
- Item.useAnimation = 30;
+ Item.useTime = Item.useAnimation = 30;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 6;
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
diff --git a/Items/Weapons/Summon/AresExoskeleton.cs b/Items/Weapons/Summon/AresExoskeleton.cs
index 3af96062b3..f8c8a5a9d7 100644
--- a/Items/Weapons/Summon/AresExoskeleton.cs
+++ b/Items/Weapons/Summon/AresExoskeleton.cs
@@ -73,7 +73,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.damage = 625;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.noUseGraphic = true;
- Item.useAnimation = Item.useTime = 9;
+ Item.useAnimation = Item.useTime = 24;
Item.noMelee = true;
Item.knockBack = 1f;
diff --git a/Items/Weapons/Summon/AtlasMunitionsBeacon.cs b/Items/Weapons/Summon/AtlasMunitionsBeacon.cs
index f2a0c22d88..159b5cb614 100644
--- a/Items/Weapons/Summon/AtlasMunitionsBeacon.cs
+++ b/Items/Weapons/Summon/AtlasMunitionsBeacon.cs
@@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 38;
Item.damage = 200;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 30;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 4.75f;
diff --git a/Items/Weapons/Summon/BelladonnaSpiritStaff.cs b/Items/Weapons/Summon/BelladonnaSpiritStaff.cs
index 542ee216fd..36d0e892f3 100644
--- a/Items/Weapons/Summon/BelladonnaSpiritStaff.cs
+++ b/Items/Weapons/Summon/BelladonnaSpiritStaff.cs
@@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
- Item.useAnimation = Item.useTime = 35;
+ Item.useAnimation = Item.useTime = 36;
Item.DamageType = DamageClass.Summon;
Item.useStyle = ItemUseStyleID.Swing;
diff --git a/Items/Weapons/Summon/BlackHawkRemote.cs b/Items/Weapons/Summon/BlackHawkRemote.cs
index aff29efd63..7cfd0afdd7 100644
--- a/Items/Weapons/Summon/BlackHawkRemote.cs
+++ b/Items/Weapons/Summon/BlackHawkRemote.cs
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 40;
Item.damage = 25;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 24;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.noMelee = true;
Item.knockBack = 1f;
diff --git a/Items/Weapons/Summon/BrittleStarStaff.cs b/Items/Weapons/Summon/BrittleStarStaff.cs
index b6c15f5dd2..31e1380527 100644
--- a/Items/Weapons/Summon/BrittleStarStaff.cs
+++ b/Items/Weapons/Summon/BrittleStarStaff.cs
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 64;
Item.damage = 10;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 32;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = Knockback;
diff --git a/Items/Weapons/Summon/CadaverousCarrion.cs b/Items/Weapons/Summon/CadaverousCarrion.cs
index db5db6b8fb..0e65958653 100644
--- a/Items/Weapons/Summon/CadaverousCarrion.cs
+++ b/Items/Weapons/Summon/CadaverousCarrion.cs
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.mana = 10;
Item.DamageType = DamageClass.Summon;
Item.sentry = true;
- Item.useAnimation = Item.useTime = 14;
+ Item.useAnimation = Item.useTime = 30;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.autoReuse = true;
diff --git a/Items/Weapons/Summon/CalamarisLament.cs b/Items/Weapons/Summon/CalamarisLament.cs
index 8aefe8f92c..f4b263ecf6 100644
--- a/Items/Weapons/Summon/CalamarisLament.cs
+++ b/Items/Weapons/Summon/CalamarisLament.cs
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.damage = 110;
Item.DamageType = DamageClass.Summon;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 24;
Item.knockBack = 0.25f;
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
diff --git a/Items/Weapons/Summon/CausticCroakerStaff.cs b/Items/Weapons/Summon/CausticCroakerStaff.cs
index f9fc88fab2..a55ae33a05 100644
--- a/Items/Weapons/Summon/CausticCroakerStaff.cs
+++ b/Items/Weapons/Summon/CausticCroakerStaff.cs
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.DamageType = DamageClass.Summon;
Item.sentry = true;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 35;
+ Item.useAnimation = Item.useTime = 30;
Item.knockBack = 0.25f;
Item.shoot = ModContent.ProjectileType();
Item.shootSpeed = 10f;
diff --git a/Items/Weapons/Summon/CausticStaff.cs b/Items/Weapons/Summon/CausticStaff.cs
index 87a955b692..a37f4cebd2 100644
--- a/Items/Weapons/Summon/CausticStaff.cs
+++ b/Items/Weapons/Summon/CausticStaff.cs
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
Item.UseSound = SoundID.Item77;
- Item.useAnimation = Item.useTime = 25;
+ Item.useAnimation = Item.useTime = 36;
Item.value = CalamityGlobalItem.RarityLightRedBuyPrice;
Item.rare = ItemRarityID.LightRed;
diff --git a/Items/Weapons/Summon/CinderBlossomStaff.cs b/Items/Weapons/Summon/CinderBlossomStaff.cs
index 335309e1eb..4fdd3eb232 100644
--- a/Items/Weapons/Summon/CinderBlossomStaff.cs
+++ b/Items/Weapons/Summon/CinderBlossomStaff.cs
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.mana = 10;
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
- Item.useAnimation = Item.useTime = 30;
+ Item.useAnimation = Item.useTime = 36;
Item.DamageType = DamageClass.Summon;
Item.useStyle = ItemUseStyleID.Swing;
diff --git a/Items/Weapons/Summon/CorroslimeStaff.cs b/Items/Weapons/Summon/CorroslimeStaff.cs
index edd2f9d35f..b4bd639a5b 100644
--- a/Items/Weapons/Summon/CorroslimeStaff.cs
+++ b/Items/Weapons/Summon/CorroslimeStaff.cs
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 54;
Item.damage = 24;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 30;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 2f;
diff --git a/Items/Weapons/Summon/CorvidHarbringerStaff.cs b/Items/Weapons/Summon/CorvidHarbringerStaff.cs
index 0926ff4cc5..0bfb67a0bf 100644
--- a/Items/Weapons/Summon/CorvidHarbringerStaff.cs
+++ b/Items/Weapons/Summon/CorvidHarbringerStaff.cs
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 52;
Item.damage = 99;
Item.DamageType = DamageClass.Summon;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 24;
Item.mana = 10;
Item.knockBack = 2f;
diff --git a/Items/Weapons/Summon/CosmicImmaterializer.cs b/Items/Weapons/Summon/CosmicImmaterializer.cs
index 2a311d9066..1d6b8b7d4e 100644
--- a/Items/Weapons/Summon/CosmicImmaterializer.cs
+++ b/Items/Weapons/Summon/CosmicImmaterializer.cs
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.damage = 560;
Item.DamageType = DamageClass.Summon;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 24;
Item.knockBack = 0.25f;
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
diff --git a/Items/Weapons/Summon/CosmicViperEngine.cs b/Items/Weapons/Summon/CosmicViperEngine.cs
index 21fc2f864d..b3e3f3f5d4 100644
--- a/Items/Weapons/Summon/CosmicViperEngine.cs
+++ b/Items/Weapons/Summon/CosmicViperEngine.cs
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 28;
Item.damage = 255;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 9;
+ Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.noMelee = true;
Item.knockBack = 6f;
diff --git a/Items/Weapons/Summon/Cosmilamp.cs b/Items/Weapons/Summon/Cosmilamp.cs
index 3a6cd6413e..605a4a0dc5 100644
--- a/Items/Weapons/Summon/Cosmilamp.cs
+++ b/Items/Weapons/Summon/Cosmilamp.cs
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 60;
Item.damage = 127;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 15;
+ Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 4f;
diff --git a/Items/Weapons/Summon/CrimslimeStaff.cs b/Items/Weapons/Summon/CrimslimeStaff.cs
index 467eaf14e4..13bcfce75f 100644
--- a/Items/Weapons/Summon/CrimslimeStaff.cs
+++ b/Items/Weapons/Summon/CrimslimeStaff.cs
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 52;
Item.damage = 24;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 30;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 2f;
diff --git a/Items/Weapons/Summon/CryogenicStaff.cs b/Items/Weapons/Summon/CryogenicStaff.cs
index 56285668c0..9f7e63c30d 100644
--- a/Items/Weapons/Summon/CryogenicStaff.cs
+++ b/Items/Weapons/Summon/CryogenicStaff.cs
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.mana = 10;
Item.DamageType = DamageClass.Summon;
Item.sentry = true;
- Item.useAnimation = Item.useTime = 25;
+ Item.useAnimation = Item.useTime = 30;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.autoReuse = true;
diff --git a/Items/Weapons/Summon/DaedalusGolemStaff.cs b/Items/Weapons/Summon/DaedalusGolemStaff.cs
index 9f0761011b..7204fd2c03 100644
--- a/Items/Weapons/Summon/DaedalusGolemStaff.cs
+++ b/Items/Weapons/Summon/DaedalusGolemStaff.cs
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.width = Item.height = 32;
Item.damage = 70;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 25;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 3f;
diff --git a/Items/Weapons/Summon/DankStaff.cs b/Items/Weapons/Summon/DankStaff.cs
index f996dae50c..446bda0c19 100644
--- a/Items/Weapons/Summon/DankStaff.cs
+++ b/Items/Weapons/Summon/DankStaff.cs
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 58;
Item.damage = 14;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 30;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 2.25f;
diff --git a/Items/Weapons/Summon/DazzlingStabberStaff.cs b/Items/Weapons/Summon/DazzlingStabberStaff.cs
index b36a388f5b..c4ee823648 100644
--- a/Items/Weapons/Summon/DazzlingStabberStaff.cs
+++ b/Items/Weapons/Summon/DazzlingStabberStaff.cs
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.damage = 43;
Item.knockBack = 2f;
Item.autoReuse = true;
- Item.useAnimation = Item.useTime = 15;
+ Item.useAnimation = Item.useTime = 24;
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
diff --git a/Items/Weapons/Summon/DeathstareRod.cs b/Items/Weapons/Summon/DeathstareRod.cs
index 0eaba9f552..014bf2a35a 100644
--- a/Items/Weapons/Summon/DeathstareRod.cs
+++ b/Items/Weapons/Summon/DeathstareRod.cs
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.width = Item.height = 46;
Item.damage = 20;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 35;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 2f;
diff --git a/Items/Weapons/Summon/DeepseaStaff.cs b/Items/Weapons/Summon/DeepseaStaff.cs
index f65d3f9ae6..d3c85633dd 100644
--- a/Items/Weapons/Summon/DeepseaStaff.cs
+++ b/Items/Weapons/Summon/DeepseaStaff.cs
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.width = Item.height = 44;
Item.damage = 40;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 25;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 2f;
diff --git a/Items/Weapons/Summon/DormantBrimseeker.cs b/Items/Weapons/Summon/DormantBrimseeker.cs
index 52a09aff36..7264cdaedb 100644
--- a/Items/Weapons/Summon/DormantBrimseeker.cs
+++ b/Items/Weapons/Summon/DormantBrimseeker.cs
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.width = Item.height = 32;
Item.damage = 42;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 25;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.noUseGraphic = true;
diff --git a/Items/Weapons/Summon/DragonbloodDisgorger.cs b/Items/Weapons/Summon/DragonbloodDisgorger.cs
index b2429d03fa..c286cda0f7 100644
--- a/Items/Weapons/Summon/DragonbloodDisgorger.cs
+++ b/Items/Weapons/Summon/DragonbloodDisgorger.cs
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 62;
Item.damage = 215;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 15;
+ Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 4f;
diff --git a/Items/Weapons/Summon/DreadmineStaff.cs b/Items/Weapons/Summon/DreadmineStaff.cs
index 672105c7df..8209148404 100644
--- a/Items/Weapons/Summon/DreadmineStaff.cs
+++ b/Items/Weapons/Summon/DreadmineStaff.cs
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 44;
Item.damage = 40;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 25;
+ Item.useAnimation = Item.useTime = 30;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 4.5f;
@@ -34,7 +34,6 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
- //CalamityUtils.OnlyOneSentry(player, type);
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
diff --git a/Items/Weapons/Summon/EnchantedConch.cs b/Items/Weapons/Summon/EnchantedConch.cs
index c5d5a015f9..eae9c882f3 100644
--- a/Items/Weapons/Summon/EnchantedConch.cs
+++ b/Items/Weapons/Summon/EnchantedConch.cs
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.shoot = ModContent.ProjectileType();
Item.knockBack = 2f;
- Item.useAnimation = Item.useTime = 35;
+ Item.useAnimation = Item.useTime = 36;
Item.mana = 10;
Item.noMelee = true;
Item.autoReuse = true;
diff --git a/Items/Weapons/Summon/EndoHydraStaff.cs b/Items/Weapons/Summon/EndoHydraStaff.cs
index 2d28fe5010..6fe9c10142 100644
--- a/Items/Weapons/Summon/EndoHydraStaff.cs
+++ b/Items/Weapons/Summon/EndoHydraStaff.cs
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 60;
Item.damage = 190;
Item.DamageType = DamageClass.Summon;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 24;
Item.mana = 10;
Item.knockBack = 3f;
diff --git a/Items/Weapons/Summon/Endogenesis.cs b/Items/Weapons/Summon/Endogenesis.cs
index a9a41e73d4..1e6da182f1 100644
--- a/Items/Weapons/Summon/Endogenesis.cs
+++ b/Items/Weapons/Summon/Endogenesis.cs
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.damage = 1300;
Item.knockBack = 4f;
Item.autoReuse = true;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 24;
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
diff --git a/Items/Weapons/Summon/EntropysVigil.cs b/Items/Weapons/Summon/EntropysVigil.cs
index 6b74919eb6..f3bdb9c91a 100644
--- a/Items/Weapons/Summon/EntropysVigil.cs
+++ b/Items/Weapons/Summon/EntropysVigil.cs
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.shoot = ModContent.ProjectileType();
Item.knockBack = 2f;
- Item.useAnimation = Item.useTime = 25;
+ Item.useAnimation = Item.useTime = 36;
Item.mana = 10;
Item.noMelee = true;
Item.autoReuse = true;
diff --git a/Items/Weapons/Summon/EtherealSubjugator.cs b/Items/Weapons/Summon/EtherealSubjugator.cs
index 1d48903011..b46665fd7f 100644
--- a/Items/Weapons/Summon/EtherealSubjugator.cs
+++ b/Items/Weapons/Summon/EtherealSubjugator.cs
@@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.shoot = ModContent.ProjectileType();
Item.knockBack = 1f;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 24;
Item.mana = 10;
Item.noMelee = true;
Item.autoReuse = true;
diff --git a/Items/Weapons/Summon/EyeOfNight.cs b/Items/Weapons/Summon/EyeOfNight.cs
index 829421eadb..2a42ede2d8 100644
--- a/Items/Weapons/Summon/EyeOfNight.cs
+++ b/Items/Weapons/Summon/EyeOfNight.cs
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.width = Item.height = 36;
Item.damage = 24;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 30;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 1f;
diff --git a/Items/Weapons/Summon/FleshOfInfidelity.cs b/Items/Weapons/Summon/FleshOfInfidelity.cs
index 638e048448..acb93af0f3 100644
--- a/Items/Weapons/Summon/FleshOfInfidelity.cs
+++ b/Items/Weapons/Summon/FleshOfInfidelity.cs
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.shoot = ModContent.ProjectileType();
Item.knockBack = 1f;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 36;
Item.mana = 10;
Item.noMelee = true;
Item.autoReuse = true;
diff --git a/Items/Weapons/Summon/FlowersOfMortality.cs b/Items/Weapons/Summon/FlowersOfMortality.cs
index 247ab82b77..a1fcef6f85 100644
--- a/Items/Weapons/Summon/FlowersOfMortality.cs
+++ b/Items/Weapons/Summon/FlowersOfMortality.cs
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.damage = 72;
Item.DamageType = DamageClass.Summon;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 15;
+ Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 5f;
diff --git a/Items/Weapons/Summon/ForgottenApexWand.cs b/Items/Weapons/Summon/ForgottenApexWand.cs
index ba73a0b486..32000195ad 100644
--- a/Items/Weapons/Summon/ForgottenApexWand.cs
+++ b/Items/Weapons/Summon/ForgottenApexWand.cs
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.knockBack = 4f;
Item.mana = 10;
Item.damage = 28;
- Item.useAnimation = Item.useTime = 25;
+ Item.useAnimation = Item.useTime = 36;
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
}
diff --git a/Items/Weapons/Summon/FrostBlossomStaff.cs b/Items/Weapons/Summon/FrostBlossomStaff.cs
index 026da729b3..6c3af92baa 100644
--- a/Items/Weapons/Summon/FrostBlossomStaff.cs
+++ b/Items/Weapons/Summon/FrostBlossomStaff.cs
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 24;
Item.damage = 10;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 35;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 2f;
diff --git a/Items/Weapons/Summon/FuelCellBundle.cs b/Items/Weapons/Summon/FuelCellBundle.cs
index 7fdcddc557..b696f51983 100644
--- a/Items/Weapons/Summon/FuelCellBundle.cs
+++ b/Items/Weapons/Summon/FuelCellBundle.cs
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.mana = 10;
Item.damage = 25;
Item.useStyle = ItemUseStyleID.Swing;
- Item.useAnimation = Item.useTime = 20;
+ Item.useAnimation = Item.useTime = 36;
Item.noMelee = true;
Item.knockBack = 7f;
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
diff --git a/Items/Weapons/Summon/GammaHeart.cs b/Items/Weapons/Summon/GammaHeart.cs
index b563bb8704..ae0778527f 100644
--- a/Items/Weapons/Summon/GammaHeart.cs
+++ b/Items/Weapons/Summon/GammaHeart.cs
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.damage = 85;
Item.knockBack = 3f;
Item.autoReuse = true;
- Item.useAnimation = Item.useTime = 14;
+ Item.useAnimation = Item.useTime = 24;
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
diff --git a/Items/Weapons/Summon/GastricBelcherStaff.cs b/Items/Weapons/Summon/GastricBelcherStaff.cs
index 7e7233f8cf..3c73a55d8d 100644
--- a/Items/Weapons/Summon/GastricBelcherStaff.cs
+++ b/Items/Weapons/Summon/GastricBelcherStaff.cs
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 70;
Item.damage = 50;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 20;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 1f;
diff --git a/Items/Weapons/Summon/GlacialEmbrace.cs b/Items/Weapons/Summon/GlacialEmbrace.cs
index 7f2827b342..0c886411d4 100644
--- a/Items/Weapons/Summon/GlacialEmbrace.cs
+++ b/Items/Weapons/Summon/GlacialEmbrace.cs
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 50;
Item.damage = 48;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 24;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.noMelee = true;
Item.knockBack = 4.5f;
diff --git a/Items/Weapons/Summon/GuidelightofOblivion.cs b/Items/Weapons/Summon/GuidelightofOblivion.cs
index 4f3797d962..493f59fa9d 100644
--- a/Items/Weapons/Summon/GuidelightofOblivion.cs
+++ b/Items/Weapons/Summon/GuidelightofOblivion.cs
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.DamageType = DamageClass.Summon;
Item.sentry = true;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 15;
+ Item.useAnimation = Item.useTime = 30;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 5f;
@@ -35,7 +35,6 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
- //CalamityUtils.OnlyOneSentry(player, type);
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
diff --git a/Items/Weapons/Summon/HarvestStaff.cs b/Items/Weapons/Summon/HarvestStaff.cs
index 4d26fbbfbc..a482ceb882 100644
--- a/Items/Weapons/Summon/HarvestStaff.cs
+++ b/Items/Weapons/Summon/HarvestStaff.cs
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.shoot = ModContent.ProjectileType();
Item.knockBack = 5f;
- Item.useAnimation = Item.useTime = 15;
+ Item.useAnimation = Item.useTime = 30;
Item.mana = 10;
Item.width = 44;
Item.height = 46;
diff --git a/Items/Weapons/Summon/HauntedScroll.cs b/Items/Weapons/Summon/HauntedScroll.cs
index 001eafa166..33e2418c28 100644
--- a/Items/Weapons/Summon/HauntedScroll.cs
+++ b/Items/Weapons/Summon/HauntedScroll.cs
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 48;
Item.damage = 25;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 24;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.noMelee = true;
Item.knockBack = 3f;
diff --git a/Items/Weapons/Summon/HerringStaff.cs b/Items/Weapons/Summon/HerringStaff.cs
index 045c7353c3..3a4ce3aeed 100644
--- a/Items/Weapons/Summon/HerringStaff.cs
+++ b/Items/Weapons/Summon/HerringStaff.cs
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
- Item.useAnimation = Item.useTime = 30;
+ Item.useAnimation = Item.useTime = 36;
Item.DamageType = DamageClass.Summon;
Item.useStyle = ItemUseStyleID.Swing;
Item.UseSound = SoundID.Item21;
diff --git a/Items/Weapons/Summon/HivePod.cs b/Items/Weapons/Summon/HivePod.cs
index 5013bfe4c7..f652f2aa3d 100644
--- a/Items/Weapons/Summon/HivePod.cs
+++ b/Items/Weapons/Summon/HivePod.cs
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.DamageType = DamageClass.Summon;
Item.sentry = true;
Item.autoReuse = true;
- Item.useAnimation = Item.useTime = 20;
+ Item.useAnimation = Item.useTime = 30;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 4f;
diff --git a/Items/Weapons/Summon/IgneousExaltation.cs b/Items/Weapons/Summon/IgneousExaltation.cs
index 447a6bf36e..22d23a44fc 100644
--- a/Items/Weapons/Summon/IgneousExaltation.cs
+++ b/Items/Weapons/Summon/IgneousExaltation.cs
@@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 50;
Item.damage = 34;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 24;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 4.5f;
diff --git a/Items/Weapons/Summon/InfectedRemote.cs b/Items/Weapons/Summon/InfectedRemote.cs
index 7410951304..3622c2dbb2 100644
--- a/Items/Weapons/Summon/InfectedRemote.cs
+++ b/Items/Weapons/Summon/InfectedRemote.cs
@@ -13,25 +13,17 @@ namespace CalamityMod.Items.Weapons.Summon
{
public new string LocalizationCategory => "Items.Weapons.Summon";
public const int DefaultIframes = 10;
-
public const int ChargeIframes = 2;
-
public const int RocketShootRate = 6;
-
public const int BeeShootRate = 22;
public const int MaxUpdatesWhenCharging = 2;
-
public const float RegularChargeSpeed = 40f;
-
public const float HorizontalRocketChargeSpeed = 22f;
public const float RocketDamageFactor = 0.7f;
-
public const float BeeDamageFactor = 0.65f;
-
public const float MinionSlotRequirement = 3f;
-
public const float EnemyTargetingRange = 1300f;
public override void SetStaticDefaults()
@@ -46,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 28;
Item.damage = 50;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 19;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.noMelee = true;
Item.knockBack = 5f;
diff --git a/Items/Weapons/Summon/KingofConstellationsTenryu.cs b/Items/Weapons/Summon/KingofConstellationsTenryu.cs
index e25f41c11f..1747ceda75 100644
--- a/Items/Weapons/Summon/KingofConstellationsTenryu.cs
+++ b/Items/Weapons/Summon/KingofConstellationsTenryu.cs
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
Item.UseSound = Flare.FlareSound;
- Item.useAnimation = Item.useTime = 25;
+ Item.useAnimation = Item.useTime = 24;
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
Item.rare = ModContent.RarityType();
diff --git a/Items/Weapons/Summon/LegionofCelestia.cs b/Items/Weapons/Summon/LegionofCelestia.cs
index 4978eebfd0..dec848d4c5 100644
--- a/Items/Weapons/Summon/LegionofCelestia.cs
+++ b/Items/Weapons/Summon/LegionofCelestia.cs
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.damage = 57;
Item.DamageType = DamageClass.Summon;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 15;
+ Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 5f;
diff --git a/Items/Weapons/Summon/LiliesOfFinality.cs b/Items/Weapons/Summon/LiliesOfFinality.cs
index 8c78d3b917..d4a1db3047 100644
--- a/Items/Weapons/Summon/LiliesOfFinality.cs
+++ b/Items/Weapons/Summon/LiliesOfFinality.cs
@@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.knockBack = 5f;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 15;
+ Item.useAnimation = Item.useTime = 24;
Item.width = 36;
Item.height = 50;
Item.noMelee = true;
diff --git a/Items/Weapons/Summon/Metastasis.cs b/Items/Weapons/Summon/Metastasis.cs
index a849ad846a..c489968bf5 100644
--- a/Items/Weapons/Summon/Metastasis.cs
+++ b/Items/Weapons/Summon/Metastasis.cs
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 78;
Item.damage = 400;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 10; // 9 because of useStyle 1
+ Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 2f;
diff --git a/Items/Weapons/Summon/MidnightSunBeacon.cs b/Items/Weapons/Summon/MidnightSunBeacon.cs
index f1ee79c0fc..90479063db 100644
--- a/Items/Weapons/Summon/MidnightSunBeacon.cs
+++ b/Items/Weapons/Summon/MidnightSunBeacon.cs
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.width = Item.height = 32;
Item.damage = 176;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.noUseGraphic = true;
diff --git a/Items/Weapons/Summon/MirrorofKalandra.cs b/Items/Weapons/Summon/MirrorofKalandra.cs
index bdf70f8296..b79de9d2a3 100644
--- a/Items/Weapons/Summon/MirrorofKalandra.cs
+++ b/Items/Weapons/Summon/MirrorofKalandra.cs
@@ -51,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.width = 58;
Item.height = 50;
Item.damage = 256;
- Item.useAnimation = Item.useTime = 30;
+ Item.useAnimation = Item.useTime = 24;
Item.knockBack = 4f;
Item.mana = 10;
Item.buffType = ModContent.BuffType();
diff --git a/Items/Weapons/Summon/MutatedTruffle.cs b/Items/Weapons/Summon/MutatedTruffle.cs
index 95de50a2f9..40081c13db 100644
--- a/Items/Weapons/Summon/MutatedTruffle.cs
+++ b/Items/Weapons/Summon/MutatedTruffle.cs
@@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.shoot = ModContent.ProjectileType();
Item.knockBack = 5f;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 24;
Item.mana = 10;
Item.noMelee = true;
Item.useStyle = ItemUseStyleID.HoldUp;
diff --git a/Items/Weapons/Summon/OrthoceraShell.cs b/Items/Weapons/Summon/OrthoceraShell.cs
index 54321a17b5..be0981aa6b 100644
--- a/Items/Weapons/Summon/OrthoceraShell.cs
+++ b/Items/Weapons/Summon/OrthoceraShell.cs
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 34;
Item.damage = 53;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 24;
+ Item.useAnimation = Item.useTime = 30;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.noMelee = true;
Item.knockBack = 2f;
diff --git a/Items/Weapons/Summon/Perdition.cs b/Items/Weapons/Summon/Perdition.cs
index 338f86fb93..7a3e15d229 100644
--- a/Items/Weapons/Summon/Perdition.cs
+++ b/Items/Weapons/Summon/Perdition.cs
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.sentry = true;
Item.knockBack = 4f;
- Item.useAnimation = Item.useTime = 10; // 9 because of useStyle 1.
+ Item.useAnimation = Item.useTime = 30;
Item.mana = 10;
Item.noMelee = true;
Item.autoReuse = true;
diff --git a/Items/Weapons/Summon/PlantationStaff.cs b/Items/Weapons/Summon/PlantationStaff.cs
index b967ef9731..cf7f74452d 100644
--- a/Items/Weapons/Summon/PlantationStaff.cs
+++ b/Items/Weapons/Summon/PlantationStaff.cs
@@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.knockBack = 1f;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 20;
+ Item.useAnimation = Item.useTime = 36;
Item.noMelee = true;
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
Item.rare = ItemRarityID.Yellow;
diff --git a/Items/Weapons/Summon/PolypLauncher.cs b/Items/Weapons/Summon/PolypLauncher.cs
index dd22edc4cd..7b518c3e03 100644
--- a/Items/Weapons/Summon/PolypLauncher.cs
+++ b/Items/Weapons/Summon/PolypLauncher.cs
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.DamageType = DamageClass.Summon;
Item.sentry = true;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 35;
+ Item.useAnimation = Item.useTime = 30;
Item.knockBack = 0.25f;
Item.shoot = ModContent.ProjectileType();
Item.shootSpeed = 10f;
diff --git a/Items/Weapons/Summon/PuffShroom.cs b/Items/Weapons/Summon/PuffShroom.cs
index d12ee0ac1e..49c4ebef60 100644
--- a/Items/Weapons/Summon/PuffShroom.cs
+++ b/Items/Weapons/Summon/PuffShroom.cs
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 32;
Item.damage = 14;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 35;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 2f;
diff --git a/Items/Weapons/Summon/ResurrectionButterfly.cs b/Items/Weapons/Summon/ResurrectionButterfly.cs
index d99b51f0a3..82c2a20af9 100644
--- a/Items/Weapons/Summon/ResurrectionButterfly.cs
+++ b/Items/Weapons/Summon/ResurrectionButterfly.cs
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 46;
Item.damage = 66; // clueless
Item.mana = 10;
- Item.useAnimation = Item.useTime = 20;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 1f;
diff --git a/Items/Weapons/Summon/RustyBeaconPrototype.cs b/Items/Weapons/Summon/RustyBeaconPrototype.cs
index 2cc3731c36..392bacbe06 100644
--- a/Items/Weapons/Summon/RustyBeaconPrototype.cs
+++ b/Items/Weapons/Summon/RustyBeaconPrototype.cs
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 20;
Item.mana = 10;
Item.damage = 8;
- Item.useAnimation = Item.useTime = 34;
+ Item.useAnimation = Item.useTime = 30;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.noMelee = true;
Item.knockBack = 0.5f;
diff --git a/Items/Weapons/Summon/SanctifiedSpark.cs b/Items/Weapons/Summon/SanctifiedSpark.cs
index 443383274b..62798dbb63 100644
--- a/Items/Weapons/Summon/SanctifiedSpark.cs
+++ b/Items/Weapons/Summon/SanctifiedSpark.cs
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.DamageType = DamageClass.Summon;
Item.sentry = true;
Item.mana = 100;
- Item.useAnimation = Item.useTime = 14;
+ Item.useAnimation = Item.useTime = 30;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 5f;
@@ -36,7 +36,6 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
- //CalamityUtils.OnlyOneSentry(player, type);
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI, 16f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
diff --git a/Items/Weapons/Summon/SandSharknadoStaff.cs b/Items/Weapons/Summon/SandSharknadoStaff.cs
index beba2cc6f2..0567e1a62b 100644
--- a/Items/Weapons/Summon/SandSharknadoStaff.cs
+++ b/Items/Weapons/Summon/SandSharknadoStaff.cs
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
- Item.useAnimation = Item.useTime = 20;
+ Item.useAnimation = Item.useTime = 36;
Item.DamageType = DamageClass.Summon;
Item.useStyle = ItemUseStyleID.Swing;
Item.UseSound = SoundID.Item44;
diff --git a/Items/Weapons/Summon/SarosPossession.cs b/Items/Weapons/Summon/SarosPossession.cs
index d0f24770bd..b77a616e7b 100644
--- a/Items/Weapons/Summon/SarosPossession.cs
+++ b/Items/Weapons/Summon/SarosPossession.cs
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 48;
Item.damage = 80;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 1.15f;
diff --git a/Items/Weapons/Summon/ScabRipper.cs b/Items/Weapons/Summon/ScabRipper.cs
index 2bee629707..539d0a401b 100644
--- a/Items/Weapons/Summon/ScabRipper.cs
+++ b/Items/Weapons/Summon/ScabRipper.cs
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 70;
Item.damage = 15;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 30;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 0.5f;
diff --git a/Items/Weapons/Summon/SeashineHilt.cs b/Items/Weapons/Summon/SeashineHilt.cs
index 6ec21393a9..347289457d 100644
--- a/Items/Weapons/Summon/SeashineHilt.cs
+++ b/Items/Weapons/Summon/SeashineHilt.cs
@@ -26,8 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 32;
Item.height = 34;
- Item.useTime = 10;
- Item.useAnimation = 10;
+ Item.useTime = Item.useAnimation = 36;
Item.damage = 55;
Item.noMelee = true;
Item.noUseGraphic = true;
diff --git a/Items/Weapons/Summon/ShellfishStaff.cs b/Items/Weapons/Summon/ShellfishStaff.cs
index 01c8c17b73..33f74c79fb 100644
--- a/Items/Weapons/Summon/ShellfishStaff.cs
+++ b/Items/Weapons/Summon/ShellfishStaff.cs
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 50;
Item.damage = 70;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 25;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 2f;
diff --git a/Items/Weapons/Summon/Sirius.cs b/Items/Weapons/Summon/Sirius.cs
index 305abfe88a..1e1969854d 100644
--- a/Items/Weapons/Summon/Sirius.cs
+++ b/Items/Weapons/Summon/Sirius.cs
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = Item.height = 62;
Item.damage = 600;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 24;
Item.mana = 10;
Item.knockBack = 10f;
Item.buffType = ModContent.BuffType();
diff --git a/Items/Weapons/Summon/SpikecragStaff.cs b/Items/Weapons/Summon/SpikecragStaff.cs
index 78b856a010..0c9088a471 100644
--- a/Items/Weapons/Summon/SpikecragStaff.cs
+++ b/Items/Weapons/Summon/SpikecragStaff.cs
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.mana = 10;
Item.DamageType = DamageClass.Summon;
Item.sentry = true;
- Item.useAnimation = Item.useTime = 20;
+ Item.useAnimation = Item.useTime = 30;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 2f;
diff --git a/Items/Weapons/Summon/SquirrelSquireStaff.cs b/Items/Weapons/Summon/SquirrelSquireStaff.cs
index 096434f23d..ea28984478 100644
--- a/Items/Weapons/Summon/SquirrelSquireStaff.cs
+++ b/Items/Weapons/Summon/SquirrelSquireStaff.cs
@@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.shoot = ModContent.ProjectileType();
Item.knockBack = 0.5f;
- Item.useAnimation = Item.useTime = 15;
+ Item.useAnimation = Item.useTime = 30;
Item.mana = 10;
Item.width = 46;
Item.height = 52;
diff --git a/Items/Weapons/Summon/StaffOfNecrosteocytes.cs b/Items/Weapons/Summon/StaffOfNecrosteocytes.cs
index 607bbbe62d..46d99f5fd5 100644
--- a/Items/Weapons/Summon/StaffOfNecrosteocytes.cs
+++ b/Items/Weapons/Summon/StaffOfNecrosteocytes.cs
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 54;
Item.damage = 31;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 30;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 3.5f;
diff --git a/Items/Weapons/Summon/StarspawnHelixStaff.cs b/Items/Weapons/Summon/StarspawnHelixStaff.cs
index 48701eb7dc..a84ef109f5 100644
--- a/Items/Weapons/Summon/StarspawnHelixStaff.cs
+++ b/Items/Weapons/Summon/StarspawnHelixStaff.cs
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
- Item.useAnimation = Item.useTime = 20;
+ Item.useAnimation = Item.useTime = 36;
Item.DamageType = DamageClass.Summon;
Item.useStyle = ItemUseStyleID.Swing;
Item.UseSound = SoundID.Item44;
diff --git a/Items/Weapons/Summon/StellarTorusStaff.cs b/Items/Weapons/Summon/StellarTorusStaff.cs
index 05344b0db5..6dc2fda202 100644
--- a/Items/Weapons/Summon/StellarTorusStaff.cs
+++ b/Items/Weapons/Summon/StellarTorusStaff.cs
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.width = 42;
Item.height = 42;
Item.damage = 142;
- Item.useAnimation = Item.useTime = 20;
+ Item.useAnimation = Item.useTime = 24;
Item.knockBack = 4f;
Item.mana = 10;
Item.buffType = ModContent.BuffType();
diff --git a/Items/Weapons/Summon/StormjawStaff.cs b/Items/Weapons/Summon/StormjawStaff.cs
index 2780625a88..118ad7d47d 100644
--- a/Items/Weapons/Summon/StormjawStaff.cs
+++ b/Items/Weapons/Summon/StormjawStaff.cs
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 32;
Item.damage = 11;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 35;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 2f;
diff --git a/Items/Weapons/Summon/SunSpiritStaff.cs b/Items/Weapons/Summon/SunSpiritStaff.cs
index 9172986970..a7b9407f31 100644
--- a/Items/Weapons/Summon/SunSpiritStaff.cs
+++ b/Items/Weapons/Summon/SunSpiritStaff.cs
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 48;
Item.damage = 10;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 1.15f;
diff --git a/Items/Weapons/Summon/TacticalPlagueEngine.cs b/Items/Weapons/Summon/TacticalPlagueEngine.cs
index bbdbb624a9..06b5521bd9 100644
--- a/Items/Weapons/Summon/TacticalPlagueEngine.cs
+++ b/Items/Weapons/Summon/TacticalPlagueEngine.cs
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 20;
Item.damage = 140;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 14;
+ Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.noMelee = true;
Item.knockBack = 0.5f;
diff --git a/Items/Weapons/Summon/TemporalUmbrella.cs b/Items/Weapons/Summon/TemporalUmbrella.cs
index 04b56eee01..30044336d3 100644
--- a/Items/Weapons/Summon/TemporalUmbrella.cs
+++ b/Items/Weapons/Summon/TemporalUmbrella.cs
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.damage = 193;
Item.knockBack = 1f;
Item.mana = 99;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 24;
Item.DamageType = DamageClass.Summon;
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
diff --git a/Items/Weapons/Summon/TundraFlameBlossomsStaff.cs b/Items/Weapons/Summon/TundraFlameBlossomsStaff.cs
index c3879ce76f..5725ba1b3d 100644
--- a/Items/Weapons/Summon/TundraFlameBlossomsStaff.cs
+++ b/Items/Weapons/Summon/TundraFlameBlossomsStaff.cs
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 60;
Item.damage = 40;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 25;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 3f;
diff --git a/Items/Weapons/Summon/VengefulSunStaff.cs b/Items/Weapons/Summon/VengefulSunStaff.cs
index e96e3d7911..6864ee175d 100644
--- a/Items/Weapons/Summon/VengefulSunStaff.cs
+++ b/Items/Weapons/Summon/VengefulSunStaff.cs
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 72;
Item.damage = 30;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 1.25f;
diff --git a/Items/Weapons/Summon/Vigilance.cs b/Items/Weapons/Summon/Vigilance.cs
index bd8f7d453a..363f4fe24f 100644
--- a/Items/Weapons/Summon/Vigilance.cs
+++ b/Items/Weapons/Summon/Vigilance.cs
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.width = Item.height = 32;
Item.damage = 115;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 4f;
diff --git a/Items/Weapons/Summon/VileFeeder.cs b/Items/Weapons/Summon/VileFeeder.cs
index 9f7e9472ac..1bd661c128 100644
--- a/Items/Weapons/Summon/VileFeeder.cs
+++ b/Items/Weapons/Summon/VileFeeder.cs
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.shoot = ModContent.ProjectileType();
Item.knockBack = 0.5f;
- Item.useAnimation = Item.useTime = 30;
+ Item.useAnimation = Item.useTime = 36;
Item.mana = 10;
Item.noMelee = true;
Item.autoReuse = true;
diff --git a/Items/Weapons/Summon/ViralSprout.cs b/Items/Weapons/Summon/ViralSprout.cs
index a3cb6ee511..0fe8274228 100644
--- a/Items/Weapons/Summon/ViralSprout.cs
+++ b/Items/Weapons/Summon/ViralSprout.cs
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 56;
Item.damage = 24;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 19;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.noMelee = true;
Item.knockBack = 2f;
diff --git a/Items/Weapons/Summon/ViridVanguard.cs b/Items/Weapons/Summon/ViridVanguard.cs
index d66862a277..8b9b637e0f 100644
--- a/Items/Weapons/Summon/ViridVanguard.cs
+++ b/Items/Weapons/Summon/ViridVanguard.cs
@@ -81,7 +81,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.damage = 60;
Item.DamageType = DamageClass.Summon;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 14;
+ Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.noMelee = true;
Item.knockBack = 5f;
diff --git a/Items/Weapons/Summon/VoidConcentrationStaff.cs b/Items/Weapons/Summon/VoidConcentrationStaff.cs
index e9263db742..8043566d0c 100644
--- a/Items/Weapons/Summon/VoidConcentrationStaff.cs
+++ b/Items/Weapons/Summon/VoidConcentrationStaff.cs
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.mana = 10;
Item.damage = 105;
Item.knockBack = 4f;
- Item.useAnimation = Item.useTime = 15; // 14 because of useStyle 1
+ Item.useAnimation = Item.useTime = 24;
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
diff --git a/Items/Weapons/Summon/VoidEaterMarionette.cs b/Items/Weapons/Summon/VoidEaterMarionette.cs
index 00905a625d..c4a8601d50 100644
--- a/Items/Weapons/Summon/VoidEaterMarionette.cs
+++ b/Items/Weapons/Summon/VoidEaterMarionette.cs
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 68;
Item.damage = 110;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 10; // 9 because of useStyle 1
+ Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 2f;
diff --git a/Items/Weapons/Summon/WarloksMoonFist.cs b/Items/Weapons/Summon/WarloksMoonFist.cs
index b06e055294..1adfc5491b 100644
--- a/Items/Weapons/Summon/WarloksMoonFist.cs
+++ b/Items/Weapons/Summon/WarloksMoonFist.cs
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 50;
Item.damage = 450;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 25;
+ Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 2f;
diff --git a/Items/Weapons/Summon/WitherBlossomsStaff.cs b/Items/Weapons/Summon/WitherBlossomsStaff.cs
index 4bd1b77d8d..f636b50101 100644
--- a/Items/Weapons/Summon/WitherBlossomsStaff.cs
+++ b/Items/Weapons/Summon/WitherBlossomsStaff.cs
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 60;
Item.damage = 50;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 20;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 3f;
diff --git a/Items/Weapons/Summon/WulfrumController.cs b/Items/Weapons/Summon/WulfrumController.cs
index 4c3c3541a9..f7d126da9a 100644
--- a/Items/Weapons/Summon/WulfrumController.cs
+++ b/Items/Weapons/Summon/WulfrumController.cs
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 20;
Item.damage = 16;
Item.mana = 10;
- Item.useAnimation = Item.useTime = 34;
+ Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.noMelee = true;
Item.knockBack = 0.5f;
diff --git a/Items/Weapons/Summon/YharonsKindleStaff.cs b/Items/Weapons/Summon/YharonsKindleStaff.cs
index 724f7a5e09..ef2ac3a6e3 100644
--- a/Items/Weapons/Summon/YharonsKindleStaff.cs
+++ b/Items/Weapons/Summon/YharonsKindleStaff.cs
@@ -28,9 +28,10 @@ namespace CalamityMod.Items.Weapons.Summon
Item.width = 80;
Item.height = 74;
Item.damage = 325;
+ Item.DamageType = DamageClass.Summon;
Item.mana = 10;
Item.useStyle = ItemUseStyleID.Swing;
- Item.useAnimation = Item.useTime = 10;
+ Item.useAnimation = Item.useTime = 24;
Item.noMelee = true;
Item.knockBack = 7f;
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
@@ -39,7 +40,6 @@ namespace CalamityMod.Items.Weapons.Summon
Item.autoReuse = true;
Item.buffType = ModContent.BuffType();
Item.shoot = ModContent.ProjectileType();
- Item.DamageType = DamageClass.Summon;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
diff --git a/Localization/en-US/Mods.CalamityMod.Bestiary.hjson b/Localization/en-US/Mods.CalamityMod.Bestiary.hjson
index 21b32dc38b..bed501d96b 100644
--- a/Localization/en-US/Mods.CalamityMod.Bestiary.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Bestiary.hjson
@@ -142,6 +142,7 @@ SeaFloaty: Flatworms can be found in many seas and oceans across the world, and
SeaMinnow: Large schools of Sea Minnows were one of the most beautiful things one could witness during the days when Ilmeris was unsundered. Though the kingdom's grandeur has been lost like ashes in the wind, the tranquil fish continue to swim at peace, a breathtaking reminder that not all was lost.
Searslug: A distant cousin of the Slugbuns which can withstand the extreme heat of molten basalt. Their skin is scalding to the touch, a side effect of their adaptations to the many lava dips needed to squirm around the regions it lives in.
Sharkoon: The bulbous Sharkoon wanders the reefs on the outskirts of the Sunken Sea. It retaliates against threats through the unusual method of exploding a sac on its body that stores highly reactive chemicals, fleeing in the confusion caused by its shockwave.
+Shoreskipper: This fish stands out among the coastal fauna, showing its peers a hostility unseen in its interactions with other creatures. Their outlandish behavior has fueled centuries of analogies for the folly of bipolar moral judgement.
Slugbun: The name of these cute sea dwellers is actually a misnomer given to them by outside visitors of the sea kingdom, who often sold them as exotic pets. In fact, their "bunny ear" appendages are actually their antennae taking on the appearance of the various sea prisms scattered throughout their home.
Steampod: These distant relatives of the Pearlpods possess a powerful environmental adaptation. Their ability to eject steam propels themselves through the air as a deadly pneumatic boulder that packs quite a punch.
Stormlion: Some Ilmerian survivors claim that enough magical lightning surged through the sea during its final days that there existed not a single drop of water without levin coursing through it. Even now, electricity remains buried in the sands, with several antlion species having learned to channel the former kingdom's power.
diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson
index b0c3866bdc..54728ae2db 100644
--- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson
@@ -96,7 +96,7 @@ TequilaSunriseBuff: {
Trippy: {
DisplayName: Trippy
- Description: You see the world for what it truly is... and you also have a {0}% increase to all damage
+ Description: You see the world for what it truly is...
}
VodkaBuff: {
@@ -692,11 +692,6 @@ AbyssalDivingSuitBuff: {
Description: You are made of metal
}
-AbyssalDivingSuitPlates: {
- DisplayName: Abyssal Diving Suit Plates
- Description: "{0}% increased damage reduction"
-}
-
AbyssalMadness: {
DisplayName: Abyssal Madness
Description: Increased damage, critical strike chance, and tentacle aggression and range
diff --git a/Localization/en-US/Mods.CalamityMod.Configs.hjson b/Localization/en-US/Mods.CalamityMod.Configs.hjson
index 5f9216dff2..8631cbcc86 100644
--- a/Localization/en-US/Mods.CalamityMod.Configs.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Configs.hjson
@@ -79,11 +79,7 @@ CalamityClientConfig: {
CooldownDisplay: {
Label: "[i:CalamityMod/NebulousCore] Cooldown Rack Display Mode"
- Tooltip:
- '''
- Adds the Cooldown Rack which displays all important cooldowns right underneath buffs and debuffs.
- Set this to 1 to display the Cooldown Rack in compact mode, and to 0 to hide it entirely.
- '''
+ Tooltip: Adds the Cooldown Rack which displays all important cooldowns right underneath buffs and debuffs.
}
DebuffDisplay: {
@@ -252,17 +248,7 @@ CalamityClientConfig: {
SetBonusDoubleTap: {
Label: "[i:VortexHelmet] Allow Double Tap for Armor Set Bonuses"
- Tooltip:
- '''
- Allows all armor set bonuses to be triggered by the vanilla double-tap {$Key.DOWN} hotkey (or {$Key.UP} depending on your settings).
- Set to Auto to automatically turn off double-tap as long as Calamity's {$Keybinds.ArmorSetBonus.DisplayName} hotkey is bound.
- '''
-
- Options: {
- On: Always On
- Auto: Auto
- Off: Always Off
- }
+ Tooltip: Allows all armor set bonuses to be triggered by the vanilla double-tap {$Key.DOWN} hotkey (or {$Key.UP} depending on your settings).
}
ShopNewAlert: {
@@ -573,4 +559,40 @@ CalamityServerConfig: {
}
}
-SetBonusDoubleTapOptions.Tooltip: ""
+CooldownDisplayOptions: {
+ Tooltip: ""
+
+ Full: {
+ Label: Full
+ Tooltip: Displays a circular bar around an icon which indicates cooldown duration
+ }
+
+ Compact: {
+ Label: Compact
+ Tooltip: Displays a gradient over an icon which indicates cooldown duration
+ }
+
+ Hidden: {
+ Label: Hidden
+ Tooltip: ""
+ }
+}
+
+SetBonusDoubleTapOptions: {
+ Tooltip: ""
+
+ On: {
+ Label: Always On
+ Tooltip: Always enables double-tap. Can be used in conjunction with Calamity's {$Keybinds.ArmorSetBonus.DisplayName} hotkey.
+ }
+
+ Auto: {
+ Label: Auto
+ Tooltip: Automatically turns off double-tap as long as Calamity's {$Keybinds.ArmorSetBonus.DisplayName} hotkey is bound.
+ }
+
+ Off: {
+ Label: Always Off
+ Tooltip: Always disables double-tap. Can be used to completely disable set bonus activation.
+ }
+}
diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson
index b4429b069f..1df3645b44 100644
--- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson
@@ -99,8 +99,9 @@ TarragonWings: {
'''
}
-TracersCelestial: {
- DisplayName: Celestial Tracers
+MoonWalkers: {
+ DisplayName: Moon Walkers
+ TreadsName: Moon Boots
Tooltip:
'''
{$CommonItemTooltip.FlightAndSlowfall}
@@ -112,8 +113,9 @@ TracersCelestial: {
'''
}
-TracersElysian: {
- DisplayName: Elysian Tracers
+VoidStriders: {
+ DisplayName: Void Striders
+ TreadsName: Void Kicks
Tooltip:
'''
{$CommonItemTooltip.FlightAndSlowfall}
@@ -125,8 +127,9 @@ TracersElysian: {
'''
}
-TracersSeraph: {
+SeraphTracers: {
DisplayName: Seraph Tracers
+ TreadsName: Seraph Treads
Tooltip:
'''
{$CommonItemTooltip.FlightAndSlowfall}
diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson
index 60b3c0f0b4..73152d034c 100644
--- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson
@@ -26,9 +26,6 @@ AbyssalDivingSuit: {
'''
Transforms the holder into an armored diver:
Increases max movement speed and acceleration while underwater, but reduces it outside of water
- The suit's armored plates increase damage reduction by 15%
- Wearing this suit grants 15% damage reduction for hits under 50 damage
- The suit can absorb up to 3 hits over 50 damage, and will take 3 minutes to regenerate
Grants the ability to swim, extends underwater breathing, emits light underwater, and improves mobility on ice
Provides a moderate amount of light, reduces breath loss, and reduces damage caused by drowning in the abyss
Abyss creatures are less likely to see you, mitigates the abyss' defense reduction, and lets you sink faster in liquids
diff --git a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson
index 075b4cea5c..5340c86c1f 100644
--- a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson
@@ -128,6 +128,11 @@ Slurpfish: {
}
// Sunken Sea Catches
+CoralskinFoolfish: {
+ DisplayName: Coralskin Foolfish
+ Tooltip: Camouflage is one of nature's best defenses
+}
+
EutrophicCrate: {
DisplayName: Eutrophic Crate
Tooltip: "{$CommonItemTooltip.RightClickToOpen}"
@@ -138,11 +143,25 @@ EutrophicSandfish: {
QuestDescription: You ever wondered what would happen if a lizard that lived in the desert wandered too deep into those old Ilmeran areas? Well I know, and it looks super cool! But it's way too slippery for me to get my hands on, so you go and get it so I can keep it as a pet!
}
+GleamingCucumber: {
+ DisplayName: Gleaming Cucumber
+ Tooltip: A slippery, slimy creature found on the Polyp Forest's floor
+}
+
GreenwaveLoach: {
DisplayName: Greenwave Loach
Tooltip: An endangered fish that is highly prized in the market
}
+MoltenFishron: {
+ DisplayName: Molten Fishron
+ Tooltip:
+ '''
+ Instead of honking it makes crisp wheezing noises
+ Or maybe it actually is wheezing due to being taken out of lava
+ '''
+}
+
PrismCrate: {
DisplayName: Prism Crate
Tooltip: "{$CommonItemTooltip.RightClickToOpen}"
@@ -197,6 +216,20 @@ SparklingEmpress: {
'''
}
+SpecularSturgeon: {
+ DisplayName: Specular Sturgeon
+ Tooltip:
+ '''
+ A deep-dwelling fish that can live for many generations
+ Needless to say, it's old!
+ '''
+}
+
+Squidoom: {
+ DisplayName: Squidoom
+ Tooltip: Those who gaze at it for too long are said to enter a hypnotic state
+}
+
SunkenSailfish: {
DisplayName: Sunken Sailfish
Tooltip: Zooming at 60 miles per hour
diff --git a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson
index 92307a3860..7b06b22a3e 100644
--- a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson
@@ -183,6 +183,11 @@ SearslugItem: {
Tooltip: ""
}
+ShoreskipperItem: {
+ DisplayName: "{$NPCs.Shoreskipper.DisplayName}"
+ Tooltip: ""
+}
+
ShroombleItem: {
DisplayName: "{$NPCs.Shroomble.DisplayName}"
Tooltip: ""
@@ -391,15 +396,6 @@ LegendaryShortTooltip:
[c/BABABA:Hold Shift to listen closer]
'''
-BallAndChain: {
- DisplayName: Ball and Chain
- Tooltip:
- '''
- Favorite this item to disable any dashes granted by equipment
- 'So heavy...'
- '''
-}
-
BrimstoneLocus: {
DisplayName: Brimstone Locus
Tooltip:
diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson
index d4d6a338b9..f82d072a33 100644
--- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson
@@ -112,6 +112,7 @@ SeaMinnowBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
SearslugBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
SharkoonBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
ShockstormShuttleBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
+ShoreskipperBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
ShroombleBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
SightseerColliderBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
SightseerSpitterBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
diff --git a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson
index c558c21085..02ba812d15 100644
--- a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson
@@ -63,6 +63,20 @@ Bakidon: {
'''
}
+BallAndChain: {
+ DisplayName: Ball and Chain
+ Tooltip:
+ '''
+ Toggle this item to disable any dashes granted by equipment
+ to toggle
+ [STATE]
+ 'So heavy...'
+ '''
+ // This is "backwards" because enabling this disables dashes
+ TooltipEnabled: Dashes are currently disabled
+ TooltipDisabled: Dashes are currently enabled
+}
+
BeastialPickaxe: {
DisplayName: Beastial Pickaxe
Tooltip: ""
diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson
index c62ec92683..1b83611165 100644
--- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson
@@ -240,7 +240,7 @@ BrokenBiomeBlade: {
Hold down while standing still on flat ground to attune the weapon to the powers of the surrounding biome
Pressing otherwise switches between the current attunement and an extra stored one
Main Attunement : [ATT1]
- Secondary Attunement: [ATT2]
+ Secondary Attunement : [ATT2]
'''
DefaultFunction: Does nothing... yet
}
@@ -950,7 +950,7 @@ OmegaBiomeBlade: {
Holding down for 2 seconds attunes the weapon to the powers of the surrounding biome
Pressing for a shorter period of time switches your active and passive attunements around
Active Attunement : [ATT1]
- Passive Attunement: [ATT2]
+ Passive Attunement : [ATT2]
'''
DefaultFunction:
'''
@@ -1437,7 +1437,7 @@ TrueBiomeBlade: {
Hold down while standing still on flat ground to attune the weapon to the powers of the surrounding biome
Pressing otherwise switches between the current attunement and an extra stored one
Main Attunement : [ATT1]
- Secondary Attunement: [ATT2]
+ Secondary Attunement : [ATT2]
'''
DefaultFunction:
'''
diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson
index 6dd802b6b0..6a73295a30 100644
--- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson
+++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson
@@ -564,3 +564,4 @@ SeaKing: {
WildBumblebirb.DisplayName: Wild Bumblebirb
DraconicSwarmer.DisplayName: Draconic Swarmer
Dragonfolly.DisplayName: Dragonfolly
+Shoreskipper.DisplayName: Shoreskipper
diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Enemy.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Enemy.hjson
index 3fc915185b..4f2e7b90d0 100644
--- a/Localization/en-US/Mods.CalamityMod.Projectiles.Enemy.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Enemy.hjson
@@ -42,6 +42,7 @@ PodobooSpitUltima.DisplayName: Ultima Podoboo Spit
PrismBackCrystal.DisplayName: Prism-Back Shard
PufferExplosion.DisplayName: Explosion
SharkoonExplosion.DisplayName: Sharkoon Explosion
+ShoreskipperTackle.DisplayName: Shoreskipper Tackle
StormlionSentryBullet.DisplayName: Stormlion Sentry Bullet
StormMarkHostile.DisplayName: Mark
SulphuricAcidBubble.DisplayName: Acid Bubble
diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson
index b9c79438a1..b615caa617 100644
--- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson
@@ -151,7 +151,6 @@ VictideSpirit.DisplayName: Bubbly Spirit
VoidFieldGenerator.DisplayName: Void Field Generator
WarbannerDamage.DisplayName: The Unmatched Power of the Sun
WarbannerLight.DisplayName: Warbanner Light
-WaterConvertor.DisplayName: Water Convertor
WhiteLabSeeker.DisplayName: Seeking Mechanism
WulfrumBobber.DisplayName: Wulfrum Bobber
WulfrumDiggingTurtleProjectile.DisplayName: Digging Turtle
diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson
index e28f82f335..d01cc8ac60 100644
--- a/Localization/en-US/Mods.CalamityMod.UI.hjson
+++ b/Localization/en-US/Mods.CalamityMod.UI.hjson
@@ -103,8 +103,6 @@ Cooldowns: {
BubblyBurrowCooldown: Bubbly Burrow Cooldown
ChaosState: Teleportation Cooldown
DivineBless: Divine Bless Cooldown
- DivingPlatesBreaking: Abyssal Diving Suit Plates Durability
- DivingPlatesBroken: Abyssal Diving Suit Broken Plates
DSOCritCooldown: Extra Critical Strike Chance
ParryCooldown: Parry Ability Cooldown
ElementalMastery: Elemental Mastery
diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson
index 3ea54b5b73..833305aaac 100644
--- a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson
@@ -29,7 +29,6 @@ SetBonus: {
Eskimo:
'''
Multiplies all cold-based debuff damage by 1.25x
- Cold enemies will deal reduced contact damage to the player
Provides immunity to the Chilled, Frozen, and Frostburn debuffs
'''
Rain:
diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson
index 0a9ec85a57..101aac404b 100644
--- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson
@@ -177,9 +177,7 @@ EditedTooltip: {
RifleScope1: Increase view range for guns ( to zoom out)
RifleScope2: The scope effect can be toggled with visibility
SniperScope: 12% increased ranged critical strike chance
- MagicQuiver: Increases arrow damage by 5% and greatly increases arrow speed
- MoltenQuiver1: Increases arrow damage by 7% and greatly increases arrow speed
- MoltenQuiver2: Lights wooden arrows ablaze and all arrows inflict Hellfire
+ MoltenQuiver: Lights wooden arrows ablaze and all arrows inflict Hellfire
MagicHat: 6% increased magic critical strike chance
PowerGlove: 10% increased melee speed, does not stack with downgrades
BerserkerGlove: 10% increased true melee damage
diff --git a/NPCs/Abyss/ColossalSquid.cs b/NPCs/Abyss/ColossalSquid.cs
index 7ae65a5c09..7743772a5a 100644
--- a/NPCs/Abyss/ColossalSquid.cs
+++ b/NPCs/Abyss/ColossalSquid.cs
@@ -624,7 +624,7 @@ namespace CalamityMod.NPCs.Abyss
public override void ModifyNPCLoot(NPCLoot npcLoot)
{
- npcLoot.Add(ItemID.BlackInk, 1, 3, 5);
+ npcLoot.Add(ItemID.BlackInk, 1, 12, 16);
npcLoot.Add(ModContent.ItemType(), 3);
var postLevi = npcLoot.DefineConditionalDropSet(DropHelper.PostLevi());
diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs
index 59f44792e7..202cdc1820 100644
--- a/NPCs/CalamityGlobalNPC.cs
+++ b/NPCs/CalamityGlobalNPC.cs
@@ -5088,6 +5088,14 @@ namespace CalamityMod.NPCs
break;
}
}
+
+ // GFB Brain and its Creepers can inflict literally any buff in the game
+ // Yes this includes pets, light pets, mounts, whip tags, endgame debuffs, anything!
+ if ((npc.type == NPCID.BrainofCthulhu || npc.type == NPCID.Creeper) && Main.zenithWorld)
+ {
+ int buffType = Main.rand.Next(BuffLoader.BuffCount);
+ target.AddBuff(buffType, Main.rand.Next(300, 601));
+ }
}
#endregion
@@ -5182,8 +5190,6 @@ namespace CalamityMod.NPCs
Player player = Main.player[projectile.owner];
CalamityPlayer modPlayer = player.Calamity();
- MakeTownNPCsTakeMoreDamage(npc, projectile, Mod, ref modifiers);
-
if (IsArmored()) //Hide combat text so we can draw our own for armored NPCs
{
modifiers.HideCombatText();
@@ -5841,7 +5847,7 @@ namespace CalamityMod.NPCs
maxSpawns = (int)(maxSpawns * 1.5f);
}
- if (CalamityWorld.death && Main.bloodMoon)
+ if (CalamityWorld.death && Main.bloodMoon && player.position.Y < Main.worldSurface * 16.0)
{
spawnRate = (int)(spawnRate * 0.25);
maxSpawns = (int)(maxSpawns * 5f);
@@ -6902,130 +6908,9 @@ namespace CalamityMod.NPCs
shouldDrawBool = false;
}
- if (Main.LocalPlayer.Calamity().trippy && !npc.IsABestiaryIconDummy)
+ // VHex, Mana Burn and Miracle Blight visuals do not appear if Odd Mushroom is in use for sanity reasons
+ if (!Main.LocalPlayer.Calamity().trippy)
{
- SpriteEffects spriteEffects = SpriteEffects.None;
- if (npc.spriteDirection == 1)
- spriteEffects = SpriteEffects.FlipHorizontally;
-
- Color rainbow = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, Main.DiscoR);
- Color alphaColor = npc.GetAlpha(rainbow);
- float RGBMult = 0.99f;
- alphaColor.R = (byte)(alphaColor.R * RGBMult);
- alphaColor.G = (byte)(alphaColor.G * RGBMult);
- alphaColor.B = (byte)(alphaColor.B * RGBMult);
- alphaColor.A = (byte)(alphaColor.A * RGBMult);
- int totalAfterimages = Main.LocalPlayer.Calamity().trippyLevel == 3 ? 16 : (Main.LocalPlayer.Calamity().trippyLevel == 2 ? 12 : 4);
- for (int i = 0; i < totalAfterimages; i++)
- {
- Vector2 position = npc.position;
- float distanceFromTargetX = Math.Abs(npc.Center.X - Main.LocalPlayer.Center.X);
- float distanceFromTargetY = Math.Abs(npc.Center.Y - Main.LocalPlayer.Center.Y);
-
- float smallDistanceMult = 0.48f;
- float largeDistanceMult = 1.33f;
- bool whatTheFuck = Main.LocalPlayer.Calamity().trippyLevel == 3;
-
- switch (i)
- {
- case 0:
- position.X = Main.LocalPlayer.Center.X - distanceFromTargetX;
- position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY;
- break;
-
- case 1:
- position.X = Main.LocalPlayer.Center.X + distanceFromTargetX;
- position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY;
- break;
-
- case 2:
- position.X = Main.LocalPlayer.Center.X + distanceFromTargetX;
- position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY;
- break;
-
- case 3:
- position.X = Main.LocalPlayer.Center.X - distanceFromTargetX;
- position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY;
- break;
-
- case 4: // 1 o'clock position
- position.X = Main.LocalPlayer.Center.X + (distanceFromTargetX * (whatTheFuck ? 1f : smallDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y - (distanceFromTargetY * (whatTheFuck ? 0f : largeDistanceMult));
- break;
-
- case 5: // 4 o'clock position
- position.X = Main.LocalPlayer.Center.X + (distanceFromTargetX * (whatTheFuck ? 0f : largeDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y + (distanceFromTargetY * (whatTheFuck ? 1f : smallDistanceMult));
- break;
-
- case 6: // 7 o'clock position
- position.X = Main.LocalPlayer.Center.X - (distanceFromTargetX * (whatTheFuck ? 1f : smallDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y + (distanceFromTargetY * (whatTheFuck ? 0f : largeDistanceMult));
- break;
-
- case 7: // 10 o'clock position
- position.X = Main.LocalPlayer.Center.X - (distanceFromTargetX * (whatTheFuck ? 0f : largeDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y - (distanceFromTargetY * (whatTheFuck ? 1f : smallDistanceMult));
- break;
-
- case 8: // 11 o'clock position
- position.X = Main.LocalPlayer.Center.X - (distanceFromTargetX * (whatTheFuck ? 0f : smallDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y - (distanceFromTargetY * (whatTheFuck ? 0.5f : largeDistanceMult));
- break;
-
- case 9: // 2 o'clock position
- position.X = Main.LocalPlayer.Center.X + (distanceFromTargetX * (whatTheFuck ? 0.5f : largeDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y - (distanceFromTargetY * (whatTheFuck ? 0f : smallDistanceMult));
- break;
-
- case 10: // 5 o'clock position
- position.X = Main.LocalPlayer.Center.X + (distanceFromTargetX * (whatTheFuck ? 0f : smallDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y + (distanceFromTargetY * (whatTheFuck ? 0.5f : largeDistanceMult));
- break;
-
- case 11: // 8 o'clock position
- position.X = Main.LocalPlayer.Center.X - (distanceFromTargetX * (whatTheFuck ? 0.5f : largeDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y + (distanceFromTargetY * (whatTheFuck ? 0f : smallDistanceMult));
- break;
-
- case 12:
- position.X = Main.LocalPlayer.Center.X - distanceFromTargetX * 0.5f;
- position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY * 0.5f;
- break;
-
- case 13:
- position.X = Main.LocalPlayer.Center.X + distanceFromTargetX * 0.5f;
- position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY * 0.5f;
- break;
-
- case 14:
- position.X = Main.LocalPlayer.Center.X + distanceFromTargetX * 0.5f;
- position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY * 0.5f;
- break;
-
- case 15:
- position.X = Main.LocalPlayer.Center.X - distanceFromTargetX * 0.5f;
- position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY * 0.5f;
- break;
-
-
- default:
- break;
- }
-
- position.X -= npc.width / 2;
- position.Y -= npc.height / 2;
-
- Vector2 halfSize = npc.frame.Size() / 2;
-
- int width = TextureAssets.Npc[npc.type] is null ? 0 : TextureAssets.Npc[npc.type].Width();
- int height = TextureAssets.Npc[npc.type] is null ? 0 : TextureAssets.Npc[npc.type].Height();
- spriteBatch.Draw(TextureAssets.Npc[npc.type].Value, new Vector2(position.X - screenPos.X + (float)(npc.width / 2) - (float)width * npc.scale / 2f + halfSize.X * npc.scale, position.Y - screenPos.Y + (float)npc.height - (float)height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + halfSize.Y * npc.scale + npc.gfxOffY), npc.frame, alphaColor, npc.rotation, halfSize, npc.scale, spriteEffects, 0f);
- }
- }
- else
- {
- // VHex, Mana Burn and Miracle Blight visuals do not appear if Odd Mushroom is in use for sanity reasons
if (npc.Calamity().vulnerabilityHex || npc.Calamity().trueVulnerabilityHex)
{
float compactness = npc.width * 0.6f;
diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs
index e94b4ec814..ee25f5ae8d 100644
--- a/NPCs/CalamityGlobalTownNPC.cs
+++ b/NPCs/CalamityGlobalTownNPC.cs
@@ -42,19 +42,15 @@ namespace CalamityMod.NPCs
{
get
{
- // Max of 20 platinum.
- if (DownedBossSystem.downedYharon)
- return 40f;
-
- // Max of 10 platinum.
+ // 15 silver per NPC, max of 7 platinum 50 gold.
if (DownedBossSystem.downedDoG)
- return 20f;
+ return 15f;
- // Max of 5 platinum.
+ // 10 silver per NPC, max of 5 platinum.
if (NPC.downedMoonlord)
return 10f;
- // Max of 2 platinum.
+ // 4 silver per NPC, max of 2 platinum.
if (NPC.downedPlantBoss)
return 4f;
@@ -62,7 +58,7 @@ namespace CalamityMod.NPCs
}
}
- public static int TotalTaxesPerNPC => (int)(Item.buyPrice(0, 0, 1, 50) * TaxYieldFactor);
+ public static int TotalTaxesPerNPC => (int)(Item.buyPrice(0, 0, 1, 0) * TaxYieldFactor);
public static int TaxesToCollectLimit => (int)(Item.buyPrice(0, 50, 0, 0) * TaxYieldFactor);
@@ -279,6 +275,7 @@ namespace CalamityMod.NPCs
"Syethas", // <@!325413275066171393> (cosmicstariight)
"Nextdoor Psycho", // <@!173261518572486656> (nextdoorpsycho)
"Mike Cyclops", // <@!702327497475227741> (seichoseicho)
+ "Derin", // <@!466703979695308820> (god_15)
};
private static readonly string[] ZoologistNames =
{
@@ -352,6 +349,7 @@ namespace CalamityMod.NPCs
"Lucerne", // <@!271954788676141066> (lord_lucerne)
"Milo", // <@!401849201597874179> (maskedmilo)
"Octo", // <@!796112889353994281> (octolinggrimm)
+ "Hognar the Wicked", // <@!766511001356468237> (xzier_tengal)
};
private static readonly string[] TownCatSiameseNames = null;
private static readonly string[] TownCatBlackNames =
@@ -1089,12 +1087,6 @@ namespace CalamityMod.NPCs
npc.dontTakeDamageFromHostiles = true;
}
- public void MakeTownNPCsTakeMoreDamage(NPC npc, Projectile projectile, Mod mod, ref NPC.HitModifiers modifiers)
- {
- if (npc.townNPC && projectile.hostile)
- modifiers.SourceDamage *= 2f;
- }
-
// Does not affect Dryad's Bane
// See CalamityGlobalNPC: UpdateLifeRegen
public override void BuffTownNPC(ref float damageMult, ref int defense)
diff --git a/NPCs/SunkenSea/EutrophicRay.cs b/NPCs/SunkenSea/EutrophicRay.cs
index e0ee8289b4..2992606a4a 100644
--- a/NPCs/SunkenSea/EutrophicRay.cs
+++ b/NPCs/SunkenSea/EutrophicRay.cs
@@ -397,14 +397,8 @@ namespace CalamityMod.NPCs.SunkenSea
{
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.BlueCrystalShard, hit.HitDirection, -1f, 0, default, 1f);
}
- if (!Main.dedServ)
- {
- Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("RayGore1").Type, 1f);
- Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("RayGore2").Type, 1f);
- Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("RayGore3").Type, 1f);
- Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("RayGore4").Type, 1f);
- }
}
+ CalamityUtils.SpawnGores(NPC, "EutrophicRay", 2);
}
}
}
diff --git a/NPCs/SunkenSea/Scavenger.cs b/NPCs/SunkenSea/Scavenger.cs
index 76bd42ff22..e8cd2bc3fc 100644
--- a/NPCs/SunkenSea/Scavenger.cs
+++ b/NPCs/SunkenSea/Scavenger.cs
@@ -26,6 +26,7 @@ using Terraria.ModLoader;
using Terraria.ModLoader.Utilities;
using Terraria.Utilities;
using CalamityMod.Items.Placeables.Banners;
+using CalamityMod.Items.Potions.Alcohol;
namespace CalamityMod.NPCs.SunkenSea
{
@@ -482,12 +483,16 @@ namespace CalamityMod.NPCs.SunkenSea
return;
}
- // If the item is suddenly no longer valid for some reason, go back to idle behaviur
+ // If the item is suddenly no longer valid for some reason, go back to idle behaviour
Item targetItem = Main.item[HeldItemIndex];
if (!targetItem.active || !ScavengerLoot.ContainsKey(targetItem.type))
{
NPC.netUpdate = true;
targetItem.noGrabDelay = 0;
+ if (Main.netMode == NetmodeID.MultiplayerClient)
+ {
+ NetMessage.SendData(MessageID.SyncItem, -1, -1, null, targetItem.whoAmI, 0f, 0f, 0f, 0, 0, 0);
+ }
HeldItemIndex = -1;
NPC.velocity = Vector2.Zero;
Phase = (int)PhaseType.Idle;
@@ -518,6 +523,10 @@ namespace CalamityMod.NPCs.SunkenSea
TurnTimer = 30;
NPC.netUpdate = true;
targetItem.noGrabDelay = 0;
+ if (Main.netMode == NetmodeID.MultiplayerClient)
+ {
+ NetMessage.SendData(MessageID.SyncItem, -1, -1, null, targetItem.whoAmI, 0f, 0f, 0f, 0, 0, 0);
+ }
HeldItemIndex = -1;
Phase = (int)PhaseType.Idle;
TurnTimer = 0;
@@ -553,23 +562,31 @@ namespace CalamityMod.NPCs.SunkenSea
// Pull the item if close enough
if (targetItem.Distance(NPC.Center) < 120)
{
- targetItem.noGrabDelay = 10000;
+ targetItem.noGrabDelay = 100;
targetItem.velocity = targetItem.DirectionTo(NPC.Center) * 5;
+ if (Main.netMode == NetmodeID.MultiplayerClient)
+ {
+ NetMessage.SendData(MessageID.SyncItem, -1, -1, null, targetItem.whoAmI, 0f, 0f, 0f, 0, 0, 0);
+ }
}
// Grab the item if close enough
if (targetItem.Distance(NPC.Center) < 10)
{
- NPC.netUpdate = true;
Phase = (int)PhaseType.Bartering;
// If the item's stack is 1, despawn the item. Otherwise decrement its stack by 1.
if (targetItem.stack == 1)
targetItem.active = false;
else
targetItem.stack--;
+ if (Main.netMode == NetmodeID.MultiplayerClient)
+ {
+ NetMessage.SendData(MessageID.SyncItem, -1, -1, null, targetItem.whoAmI, 1, 0f, 0f, 0, 0, 0);
+ }
// Set the crab's held item type
HeldItemType = targetItem.type;
TurnTimer = 0;
WalkTimer = 0;
+ NPC.netUpdate = true;
}
}
break;
@@ -578,7 +595,10 @@ namespace CalamityMod.NPCs.SunkenSea
{
if (CurrentPredator != null)
{
- Item.NewItem(NPC.GetSource_FromThis(), NPC.getRect(), HeldItemType);
+ if (Main.netMode != NetmodeID.MultiplayerClient)
+ {
+ Item.NewItem(NPC.GetSource_FromThis(), NPC.getRect(), HeldItemType);
+ }
NPC.netUpdate = true;
HeldItemIndex = -1;
@@ -700,8 +720,12 @@ namespace CalamityMod.NPCs.SunkenSea
stack = Main.rand.Next((int)NPC.localAI[0], (int)NPC.localAI[1] + 1);
}
stack = (int)(stack * stackMult);
- int i = Item.NewItem(NPC.GetSource_FromThis(), new Rectangle((int)NPC.Center.X + NPC.direction * 20, (int)NPC.Center.Y - 20, NPC.width, NPC.height), ID, Stack: stack);
+ int i = Item.NewItem(NPC.GetSource_FromThis(), new Rectangle((int)NPC.Center.X + NPC.direction * 20, (int)NPC.Center.Y - 20, NPC.width, NPC.height), ID, Stack: stack, noBroadcast: false);
Main.item[i].velocity = new Vector2(NPC.direction * Main.rand.NextFloat(3.7f, 4.3f), -Main.rand.NextFloat(-1.2f, 0.8f));
+ if (Main.netMode != NetmodeID.SinglePlayer)
+ {
+ NetMessage.SendData(MessageID.SyncItem, -1, -1, null, i);
+ }
}
// Checks if the horizontal position in front of it has water or is a pit so that the crab can avoid it
diff --git a/NPCs/SunkenSea/Shoreskipper.cs b/NPCs/SunkenSea/Shoreskipper.cs
new file mode 100644
index 0000000000..aa8b8041e4
--- /dev/null
+++ b/NPCs/SunkenSea/Shoreskipper.cs
@@ -0,0 +1,467 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using CalamityMod.Enums;
+using CalamityMod.Items.Placeables.Banners;
+using CalamityMod.Particles;
+using CalamityMod.Projectiles.Enemy;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Terraria;
+using Terraria.Audio;
+using Terraria.DataStructures;
+using Terraria.GameContent;
+using Terraria.ID;
+using Terraria.ModLoader;
+using Terraria.GameContent.Bestiary;
+using Terraria.ModLoader.Utilities;
+using static CalamityMod.CalamityUtils;
+using static Terraria.ModLoader.ModContent;
+using CalamityMod.BiomeManagers;
+using CalamityMod.Items.Critters;
+
+namespace CalamityMod.NPCs.SunkenSea
+{
+ public class Shoreskipper : SunkenSeaNPC
+ {
+ public enum PhaseType
+ {
+ Idle = 0,
+ Roar = 1,
+ Jumps = 2,
+ }
+
+ public ref float CurrentPhase => ref NPC.ai[0];
+
+ public ref float Timer => ref NPC.ai[1];
+ public bool spawnedTackleHitbox = false;
+ public bool notLandedFromWater = false; // When in water or just got out of water but not yet landed on solid ground
+ public NPC Target; // Chosen target (can only be other shoreskippers)
+
+ #region SunkenSea Fields
+ protected override List PreyIDs =>
+ [
+ NPCType(),
+ ];
+ protected override List PredatorIDs =>
+ [
+ NPCType(),
+ ];
+ protected override SunkenSeaBiomeFlags BiomeDesignation => SunkenSeaBiomeFlags.TimelessShores;
+
+ protected override bool NPCSearchFilter(NPC n)
+ {
+ // Only consider same-type NPCs within 450 pixels
+ return n.active && n.type == Type && Vector2.DistanceSquared(NPC.Center, n.Center) < 450f * 450f;
+ }
+ protected override void OnPreyDetection(NPC prey)
+ {
+ if (prey.active && NPC.HasSight(prey.Center) && (Target == null || !Target.active))
+ {
+ ChangePhase((int)PhaseType.Roar);
+ Target = prey;
+ }
+ }
+ #endregion
+
+
+ public override bool CanBeHitByNPC(NPC attacker) => true;
+ public override bool CanHitNPC(NPC target) => target.type == NPC.type;
+ public override bool CanHitPlayer(Player target, ref int cooldownSlot) => false;
+ public override bool? CanBeHitByItem(Player player, Item item) => true;
+ public override bool? CanBeHitByProjectile(Projectile projectile) => true;
+
+ // If not a Shoreskipper tackle, nullify knockback
+ public override void ModifyHitByProjectile(Projectile projectile, ref NPC.HitModifiers modifiers)
+ {
+ if (projectile.type != ProjectileType())
+ projectile.knockBack = 0f;
+ }
+ public override void ModifyHitByItem(Player player, Item item, ref NPC.HitModifiers modifiers) => modifiers.DisableKnockback();
+ public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => modifiers.DisableKnockback();
+
+ #region Syncing
+ public override void SendExtraAI(BinaryWriter writer)
+ {
+ writer.Write(NPC.ai[0]);
+ writer.Write(NPC.ai[1]);
+ writer.Write(NPC.ai[2]);
+ writer.Write(NPC.ai[3]);
+ writer.Write(NPC.Calamity().newAI[0]);
+ writer.Write(NPC.Calamity().newAI[1]);
+ writer.Write(spawnedTackleHitbox);
+ writer.Write(notLandedFromWater);
+
+ int targetWhoAmI = Target == null || !Target.active ? -1 : Target.whoAmI;
+ writer.Write(targetWhoAmI);
+ }
+ public override void ReceiveExtraAI(BinaryReader reader)
+ {
+ NPC.ai[0] = reader.ReadSingle();
+ NPC.ai[1] = reader.ReadSingle();
+ NPC.ai[2] = reader.ReadSingle();
+ NPC.ai[3] = reader.ReadSingle();
+ NPC.Calamity().newAI[0] = reader.ReadSingle();
+ NPC.Calamity().newAI[1] = reader.ReadSingle();
+ spawnedTackleHitbox = reader.ReadBoolean();
+ notLandedFromWater = reader.ReadBoolean();
+
+ int targetWhoAmI = reader.ReadInt32();
+ if (targetWhoAmI >= 0 && targetWhoAmI < Main.maxNPCs)
+ Target = Main.npc[targetWhoAmI];
+ else
+ Target = null;
+ }
+ #endregion
+
+ public override void SetStaticDefaults()
+ {
+ Main.npcFrameCount[Type] = 7;
+ Main.npcCatchable[Type] = true;
+ }
+
+ public override void SetDefaults()
+ {
+ NPC.aiStyle = -1;
+ NPC.damage = 15;
+ NPC.width = 64;
+ NPC.height = 32;
+ NPC.defense = 4;
+ NPC.lifeMax = 80;
+ NPC.noGravity = false;
+ NPC.noTileCollide = false;
+ NPC.HitSound = SoundID.NPCHit1;
+ NPC.DeathSound = SoundID.NPCDeath9;
+ NPC.GravityIgnoresLiquid = true;
+
+ Banner = NPC.type;
+ BannerItem = ModContent.ItemType();
+
+ NPC.catchItem = (short)ModContent.ItemType();
+
+ NPC.Calamity().VulnerableToSickness = true;
+ NPC.Calamity().VulnerableToElectricity = false;
+ NPC.Calamity().VulnerableToHeat = true;
+ NPC.Calamity().VulnerableToWater = false;
+
+ SpawnModBiomes = new int[1] { ModContent.GetInstance().Type };
+ }
+
+ public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
+ {
+ bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[]
+ {
+ new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Shoreskipper")
+ });
+ }
+ public override bool? CanFallThroughPlatforms()
+ {
+ // Fall to try to reach target
+ if (CurrentPhase == (int)PhaseType.Jumps && Target.Top.Y > NPC.Bottom.Y)
+ return true;
+
+ return false;
+ }
+
+ private bool HasActiveTackle() // Check for if their melee hitbox exists as to not spawn multiple at once
+ {
+ int tackleType = ProjectileType();
+ for (int i = 0; i < Main.maxProjectiles; i++)
+ {
+ Projectile proj = Main.projectile[i];
+ if (proj.active && proj.type == tackleType && proj.ai[0] == NPC.whoAmI)
+ return true;
+ }
+ return false;
+ }
+
+ public override void AI()
+ {
+ NPC.Calamity().newAI[1]++; // Mark as out of water
+ NPC.TargetClosest(false);
+
+ if (NPC.direction == 0)
+ {
+ NPC.direction = Main.rand.NextBool().ToDirectionInt();
+ }
+ int frameHeight = TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type];
+
+
+ if (NPC.velocity.Y == 0 && NPC.oldVelocity.Y != 0f && notLandedFromWater && !NPC.wet) // Do not maintain velocity from skipping on water
+ {
+ NPC.velocity.X = 0f;
+ notLandedFromWater = false;
+ }
+
+ if (notLandedFromWater && !NPC.wet && NPC.velocity.Length() > 6.5f && Timer % 4 == 0) // When skipping on water at high enough velocity, spawns trailing rings
+ GeneralParticleHandler.SpawnParticle(new DirectionalPulseRing(NPC.Center, -NPC.velocity * 0.33f, Color.DeepSkyBlue * 0.65f, new Vector2(0.5f, 1f), NPC.rotation, 0.12f, 0.24f, 18));
+
+
+ switch (CurrentPhase)
+ {
+ case (int)PhaseType.Idle:
+ {
+ int frameDuration = 10;
+ int currentFrameIndex = (int)(NPC.frameCounter / frameDuration) % Main.npcFrameCount[Type];
+ // If it's the third frame
+ bool isAllowedToMove = NPC.frame.Y / frameHeight == 2;
+
+ // Move horizontally in short bursts
+ if (Timer >= 10 && NPC.velocity.Y == 0 && Math.Abs(NPC.velocity.X) < 1 && NPC.ai[2] == 0 && isAllowedToMove)
+ {
+ NPC.ai[2] = 1;
+ NPC.velocity.X = Main.rand.NextFloat(1.75f, 2.5f) * Main.rand.NextBool().ToDirectionInt();
+ if (Main.rand.NextBool(4))
+ SoundEngine.PlaySound(new("CalamityMod/Sounds/Custom/ShoreskipperGrunt", 2) { Volume = 0.9f, PitchVariance = 0.15f }, NPC.Center);
+ }
+
+ // Increment the timer before the slide ends
+ if (NPC.ai[2] == 1)
+ {
+ NPC.ai[3]++;
+ }
+
+ // Slow down quickly after sliding
+ else if (NPC.ai[2] == 2 && NPC.velocity.Y == 0)
+ {
+ NPC.velocity.X *= 0.835f;
+ NPC.ai[3]++;
+ }
+
+ // Handle movement states
+ if (NPC.ai[3] > Main.rand.Next(20, 40))
+ {
+ // If moving, enter slowdown
+ if (NPC.ai[2] == 1)
+ NPC.ai[2] = 2;
+ // If in slowdown, reset
+ else if (NPC.ai[2] == 2)
+ ChangePhase((int)PhaseType.Idle);
+ NPC.ai[3] = 0;
+ }
+
+ NPC.direction = NPC.velocity.X.DirectionalSign();
+ }
+ break;
+
+ // Based off of Leerslug's initial detection phase.
+ case (int)PhaseType.Roar:
+ {
+ int roar = 20;
+ int startAI = 35;
+ NPC.velocity.X *= 0.9f;
+
+ // Roar in place with a lil jump
+ if (Timer == roar)
+ {
+ SoundEngine.PlaySound(new("CalamityMod/Sounds/Custom/ShoreskipperSighting") { Volume = 0.85f, Pitch = -0.1f, PitchVariance = 0.1f }, NPC.Center);
+ if (NPC.velocity.Y == 0)
+ {
+ NPC.velocity.Y = -2.5f;
+ }
+ }
+
+ NPC.direction = NPC.DirectionTo(Target.Center).X.DirectionalSign();
+
+ if (Timer <= startAI && Timer >= roar && Timer % 5 == 0)
+ GeneralParticleHandler.SpawnParticle(new DirectionalPulseRing(NPC.Center + new Vector2((NPC.direction == 1 ? 28f : -28f), 0), Vector2.Zero, Color.Gray * 0.55f, new Vector2(1f, 1f), NPC.rotation, 0.05f, 0.6f, 16));
+
+ if (Timer > startAI)
+ ChangePhase((int)PhaseType.Jumps);
+
+ if ((!Target.active || Target == null || (Target.Distance(NPC.Center) > 580 && !NPC.HasSight(Target.Center)) || Target.Distance(NPC.Center) > 700) && (NPC.velocity.Y == 0 || NPC.wet)) // If target it dead/out of range and if this shoreskipper isnt midair
+ {
+ NPC.velocity.X *= 0.33f;
+ Target = null;
+ ChangePhase((int)PhaseType.Idle);
+ }
+ }
+ break;
+
+ case (int)PhaseType.Jumps:
+ {
+ // Hops toward the target
+ int jumpHeight = Target.Bottom.Y < NPC.Top.Y ? 6 : 4;
+
+ // Reset hitbox status when grounded or right after exiting water
+ if (NPC.oldVelocity.Y != 0 && NPC.velocity.Y == 0 || (NPC.Calamity().newAI[1] == 1f))
+ {
+ spawnedTackleHitbox = false;
+ NPC.velocity.X = 0;
+ }
+
+ // Keep facing target while on the ground/water
+ if (NPC.velocity.Y == 0 || NPC.wet)
+ NPC.direction = NPC.DirectionTo(Target.Center).X.DirectionalSign();
+
+ // Check if the shoreskipper landed
+ bool isGrounded = NPC.velocity.Y == 0;
+
+ // Jump at the target on the 4th frame
+ bool isAtJumpFrame = NPC.frame.Y / frameHeight == 3;
+
+ if ((!spawnedTackleHitbox && (isGrounded && isAtJumpFrame)) || (NPC.Calamity().newAI[1] == 1f && HasActiveTackle() == false)) // Latter set of conditions allows spawning a hitbox while skipping on water
+ {
+ if (isGrounded)
+ NPC.velocity.Y = -jumpHeight;
+
+ // Face and chase after target
+ NPC.velocity.X = NPC.DirectionTo(Target.Center).X.DirectionalSign() * 4;
+
+ // Spawn hitbox while jumping
+ if (Main.netMode != NetmodeID.MultiplayerClient)
+ {
+ Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, Vector2.Zero, ProjectileType(), (int) (NPC.damage * Main.rand.NextFloat(0.7f, 1.4f)), Main.rand.Next(3, 7), Main.myPlayer, NPC.whoAmI);
+ if (Main.rand.NextBool())
+ SoundEngine.PlaySound(new("CalamityMod/Sounds/Custom/ShoreskipperGrunt", 2) { Volume = 1f, PitchVariance = 0.15f }, NPC.Center);
+
+ spawnedTackleHitbox = true;
+ }
+ }
+
+ if ((!Target.active || Target == null || (Target.Distance(NPC.Center) > 580 && !NPC.HasSight(Target.Center)) || Target.Distance(NPC.Center) > 700) && (NPC.velocity.Y == 0 || NPC.wet)) // If target it dead/out of range and if this shoreskipper isnt midair
+ {
+ NPC.velocity.X = 0f;
+ Target = null;
+ ChangePhase((int)PhaseType.Idle);
+ }
+ }
+ break;
+ }
+
+ NPC.StepUpBlocks();
+ NPC.spriteDirection = NPC.direction;
+
+ // In / on top of water
+ if (NPC.wet)
+ {
+ if (NPC.Calamity().newAI[0] == 0f || Timer % 120 == 0)
+ {
+ int newWaterDirection = NPC.direction;
+ if (Target != null && Target.active)
+ newWaterDirection = NPC.DirectionTo(Target.Center).X.DirectionalSign();
+ else if (Main.rand.NextBool(3))
+ newWaterDirection *= -1;
+
+ NPC.Calamity().newAI[0] = newWaterDirection;
+ NPC.Calamity().newAI[1] = 0f;
+ }
+
+ NPC.direction = (int)NPC.Calamity().newAI[0];
+ NPC.velocity.Y = MathHelper.Min(NPC.velocity.Y - 0.2f, -4);
+ notLandedFromWater = true;
+
+ float waterAcceleration = 2.75f;
+ // Accelerate up to the cap of 12
+ if (Math.Abs(NPC.velocity.X) < 12f)
+ NPC.velocity.X += NPC.direction * waterAcceleration;
+ NPC.velocity.X = MathHelper.Clamp(NPC.velocity.X, -12f, 12f);
+ }
+
+ else
+ {
+ // Reset the water direction AI slot when the NPC leaves the water
+ NPC.Calamity().newAI[0] = 0f;
+
+ if (NPC.Calamity().newAI[1] == 0f) // Just got out of water
+ {
+ NPC.Calamity().newAI[1] = 1f; // Will spawn a hitbox if aggroed
+ }
+ }
+
+ Timer++;
+ }
+
+ public void ChangePhase(int phaseNum, bool resetai2 = true, bool resetai3 = true)
+ {
+ CurrentPhase = phaseNum;
+ Timer = 0;
+ if (resetai2)
+ NPC.ai[2] = 0;
+ if (resetai3)
+ NPC.ai[3] = 0;
+ NPC.netUpdate = true;
+
+ // Reset anim progress
+ NPC.frame.Y = 0;
+ NPC.frameCounter = 0;
+ }
+
+ public override float SpawnChance(NPCSpawnInfo spawnInfo)
+ {
+ if (!spawnInfo.Player.Calamity().clamity)
+ {
+ if (spawnInfo.Player.Calamity().ZoneTimelessShores && !spawnInfo.Water)
+ return SpawnCondition.Cavern.Chance * 0.6f;
+ else if (spawnInfo.Player.Calamity().ZoneTimelessShores && spawnInfo.Water)
+ return SpawnCondition.Cavern.Chance * 0.25f;
+ }
+ return 0f;
+ }
+
+ #region FX + Drawing
+ public override void FindFrame(int frameHeight)
+ {
+ bool isMidAir = NPC.velocity.Y != 0 && !NPC.wet;
+ int currentFrameIndex = NPC.frame.Y / frameHeight;
+
+ if (CurrentPhase == (int)PhaseType.Roar)
+ {
+ NPC.frame.Y = 0;
+ return;
+ }
+
+ if (isMidAir && NPC.frame.Y >= frameHeight * 4)
+ {
+ NPC.frame.Y = frameHeight * 4; // Cannot progress from last airborne frame until grounded again
+ return;
+ }
+
+ NPC.frameCounter++;
+ if (NPC.frameCounter > (CurrentPhase == (int)PhaseType.Jumps ? 5 : 8)) // Progress faster when in jump phase
+ {
+ NPC.frameCounter = 0;
+ NPC.frame.Y += frameHeight;
+ if (NPC.frame.Y > frameHeight * (Main.npcFrameCount[Type] - 1))
+ {
+ NPC.frame.Y = 0;
+ }
+ }
+ }
+
+ public override void HitEffect(NPC.HitInfo hit)
+ {
+ for (int k = 0; k < 6; k++)
+ {
+ GeneralParticleHandler.SpawnParticle(new GenericBubbleParticle(NPC.Center, new Vector2(Main.rand.NextFloat(3f, 7f) * hit.HitDirection, Main.rand.NextFloat(-5f, 5f)).RotatedByRandom(1), Main.rand.NextFloat(0.22f, 0.52f), NPC.rotation, Main.rand.Next(7, 11)));
+ }
+
+ for (int k = 0; k < 6; k++)
+ {
+ Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.BloodWater, hit.HitDirection, -3f, 0, default, 0.8f);
+ }
+ SpawnGores(NPC, "Shoreskipper", 2);
+ }
+
+ public override void OnKill()
+ {
+ for (int k = 0; k < 10; k++)
+ {
+ GeneralParticleHandler.SpawnParticle(new GenericBubbleParticle(NPC.Center, new Vector2(Main.rand.NextFloat(3.25f, 8.5f), Main.rand.NextFloat(-5f, 5f)).RotatedByRandom(MathHelper.TwoPi), Main.rand.NextFloat(0.26f, 0.62f), NPC.rotation, Main.rand.Next(8, 13)));
+ }
+ }
+
+ public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
+ {
+ if (NPC.IsABestiaryIconDummy)
+ return true;
+ Texture2D tex = TextureAssets.Npc[NPC.type].Value;
+ Vector2 pos = NPC.Center - screenPos + Vector2.UnitY * NPC.gfxOffY;
+
+ spriteBatch.Draw(tex, pos, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, new Vector2(tex.Width / 2, tex.Height / 2 / Main.npcFrameCount[NPC.type]), NPC.scale, NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : 0, 0);
+
+ return false;
+ }
+ #endregion
+ }
+}
diff --git a/NPCs/SunkenSea/Shoreskipper.png b/NPCs/SunkenSea/Shoreskipper.png
new file mode 100644
index 0000000000..2c0a735cd7
Binary files /dev/null and b/NPCs/SunkenSea/Shoreskipper.png differ
diff --git a/NPCs/SunkenSea/StormlionSentry.cs b/NPCs/SunkenSea/StormlionSentry.cs
index ff64da0ff4..d143b98113 100644
--- a/NPCs/SunkenSea/StormlionSentry.cs
+++ b/NPCs/SunkenSea/StormlionSentry.cs
@@ -286,9 +286,12 @@ namespace CalamityMod.NPCs.SunkenSea
}
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
- if (spawnInfo.Player.Calamity().ZoneTimelessShores && !spawnInfo.Water && !spawnInfo.Player.Calamity().clamity)
+ Vector2 spawnPosition = new Vector2(spawnInfo.SpawnTileX * 16 + 8, spawnInfo.SpawnTileY * 16);
+ bool npcOnTiles = Collision.SolidCollision(spawnPosition + Vector2.UnitY * 50, 20, 20);
+
+ if (spawnInfo.Player.Calamity().ZoneTimelessShores && !spawnInfo.Water && !spawnInfo.Player.Calamity().clamity && npcOnTiles)
{
- return SpawnCondition.Cavern.Chance * 0.7f;
+ return SpawnCondition.Cavern.Chance * 8f;
}
return 0f;
}
diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs
index ec6a9a5ce4..8d56f1e6a6 100644
--- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs
+++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs
@@ -61,6 +61,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
Count = 7
}
+ public static Color CurrentColor => CalamityGlobalNPC.SCal >= 0 && Main.npc[CalamityGlobalNPC.SCal].active && Main.npc[CalamityGlobalNPC.SCal].ModNPC().ArenaBox is not null ? Main.npc[CalamityGlobalNPC.SCal].ModNPC().ArenaBox.borderColor : SupremeCalamitas.AcceptanceColor;
public static Color GriefColor => Color.Crimson;
public static Color LamentColor => Color.RoyalBlue;
public static Color EpiphanyColor => new Color(219, 75, 2);
diff --git a/NPCs/TownNPCs/AndroombaFriendly.cs b/NPCs/TownNPCs/AndroombaFriendly.cs
index 0ce196767d..bba8fe588d 100644
--- a/NPCs/TownNPCs/AndroombaFriendly.cs
+++ b/NPCs/TownNPCs/AndroombaFriendly.cs
@@ -18,6 +18,7 @@ namespace CalamityMod.NPCs.TownNPCs
public class AndroombaFriendly : ModNPC
{
public static Asset[] FaceTextures = new Asset[9];
+ public static int AstralConversionType;
// Allow for solutions from other mods. The first integer is the solution's item ID, the texture is what face shoul dappear, the Action is what modders should use for spread code
public static List<(int, string, Action)> customConversionTypes = new List<(int, string, Action)>{};
@@ -44,6 +45,7 @@ namespace CalamityMod.NPCs.TownNPCs
FaceTextures[7] = ModContent.Request(Texture + "_Forest", AssetRequestMode.AsyncLoad);
FaceTextures[8] = ModContent.Request(Texture + "_Astral", AssetRequestMode.AsyncLoad);
}
+ AstralConversionType = ModContent.GetInstance().Type;
}
public override void SetDefaults()
@@ -133,26 +135,12 @@ namespace CalamityMod.NPCs.TownNPCs
// Stuff for vanilla solutions
if (conversionType <= 7)
{
- ConvertType type = ConvertType.Pure;
- switch (conversionType)
- {
- case 1:
- type = ConvertType.Corrupt;
- break;
- case 2:
- type = ConvertType.Hallow;
- break;
- case 4:
- type = ConvertType.Crimson;
- break;
- }
- World.AstralBiome.ConvertFromAstral(x - 2, x + 2, y - 2, y + 2, type);
WorldGen.Convert(x, y, conversionType, 2);
}
// Calamity solution(s)
else if (conversionType == 8)
{
- World.AstralBiome.ConvertToAstral(x - 2, x + 2, y - 2, y + 2);
+ WorldGen.Convert(x, y, AstralConversionType, 2);
}
// Solutions registered by other mods
else
diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs
index 853263916d..8c426944d4 100644
--- a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs
+++ b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs
@@ -71,9 +71,9 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && dayTimeEnrage;
- Vector2 rainbowStreakDistance = new Vector2(-250f, -350f);
- Vector2 everlastingRainbowDistance = new Vector2(0f, -450f);
- Vector2 etherealLanceDistance = new Vector2(0f, -450f);
+ Vector2 rainbowStreakDistance = new Vector2(-150f, -250f);
+ Vector2 everlastingRainbowDistance = new Vector2(0f, -350f);
+ Vector2 etherealLanceDistance = new Vector2(0f, -350f);
Vector2 sunDanceDistance = new Vector2(-80f, -500f);
float acceleration = death ? 0.66f : 0.6f;
diff --git a/Prefixes/AccessoryPrefix.cs b/Prefixes/AccessoryPrefix.cs
index dbe0a4da60..389f304da9 100644
--- a/Prefixes/AccessoryPrefix.cs
+++ b/Prefixes/AccessoryPrefix.cs
@@ -63,9 +63,7 @@ namespace CalamityMod.Prefixes
public static int GetHealthBoostAmount()
{
- if (NPC.downedMoonlord) return 20;
- if (Main.hardMode) return 15;
- return 10;
+ return 15;
}
}
}
diff --git a/Projectiles/Boss/DoGTeleportRift.cs b/Projectiles/Boss/DoGTeleportRift.cs
index 0ea52e2962..a98b1f66e5 100644
--- a/Projectiles/Boss/DoGTeleportRift.cs
+++ b/Projectiles/Boss/DoGTeleportRift.cs
@@ -5,6 +5,7 @@ using CalamityMod.Particles;
using CalamityMod.Skies;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
+using ReLogic.Content;
using Terraria;
using Terraria.Audio;
using Terraria.ModLoader;
@@ -251,7 +252,7 @@ namespace CalamityMod.Projectiles.Boss
}
// Draw the crack.
- Effect crackShader = CalamityShaders.DoGRealityCrackShader;
+ Effect crackShader = CalamityShaders.DoGRealityCrackShader.Value;
float crackOpcity = (AIState == 1f) ? Projectile.Opacity * 0.1f : 0.1f;
Color darkerPixelColor = FakeRift ? Color.White : DoGSky.DoGTwlight;
diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs
index 622057199c..8cb004f06d 100644
--- a/Projectiles/CalamityGlobalProjectile.cs
+++ b/Projectiles/CalamityGlobalProjectile.cs
@@ -338,9 +338,6 @@ namespace CalamityMod.Projectiles
if (source is EntitySource_OnHit e)
{
- // Nerf Orichalcum armor's set bonus petal damage by 11%
- if (e.Context == "SetBonus_Orichalcum")
- projectile.damage = (int)(projectile.damage * 0.889f);
// Nerf Spectre armor's set bonus soul damage by 50%
if (e.Context == "SetBonus_GhostHurt")
projectile.damage /= 2;
@@ -4365,25 +4362,12 @@ namespace CalamityMod.Projectiles
Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType(), 0, 0f, projectile.owner, projectile.whoAmI);
}
- // optimization to remove conversion X/Y loop for irrelevant projectiles
- bool isConversionProjectile = projectile.type == ProjectileID.PurificationPowder
- || projectile.type == ProjectileID.VilePowder
- || projectile.type == ProjectileID.ViciousPowder
- || projectile.type == ProjectileID.PureSpray
- || projectile.type == ProjectileID.CorruptSpray
- || projectile.type == ProjectileID.CrimsonSpray
- || projectile.type == ProjectileID.HallowSpray
- || projectile.type == ProjectileID.Fertilizer;
- if (!isConversionProjectile)
- return;
-
- if (projectile.owner == Main.myPlayer/* && Main.netMode != NetmodeID.MultiplayerClient*/)
+ // Fertilizer
+ if (projectile.type == ProjectileID.Fertilizer && projectile.owner == Main.myPlayer/* && Main.netMode != NetmodeID.MultiplayerClient*/)
{
int x = (int)(projectile.Center.X / 16f);
int y = (int)(projectile.Center.Y / 16f);
- bool isPowder = projectile.type == ProjectileID.PurificationPowder || projectile.type == ProjectileID.VilePowder || projectile.type == ProjectileID.ViciousPowder;
-
if (!WorldGen.InWorld(x, y, 3))
return;
@@ -4391,47 +4375,27 @@ namespace CalamityMod.Projectiles
{
for (int j = y - 1; j <= y + 1; j++)
{
- if (projectile.type == ProjectileID.Fertilizer)
- {
- Tile tile = Main.tile[i, j];
+ Tile tile = Main.tile[i, j];
- if (tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType())
- {
- bool isPlayerNear = WorldGen.PlayerLOS(i, j);
- bool success = WorldGen.GrowTree(i, j);
- if (success && isPlayerNear)
- WorldGen.TreeGrowFXCheck(i, j);
- }
- else if (tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType())
- {
- bool isPlayerNear = WorldGen.PlayerLOS(i, j);
- bool success = WorldGen.GrowPalmTree(i, j);
- if (success && isPlayerNear)
- WorldGen.TreeGrowFXCheck(i, j);
- }
- else if (tile.TileType == ModContent.TileType())
- {
- bool isPlayerNear = WorldGen.PlayerLOS(i, j);
- if (isPlayerNear && Main.tile[i, j + 1].TileType != ModContent.TileType())
- SpineTree.Spawn(i, j, 22, 28, true);
- }
- }
-
- if (projectile.type == ProjectileID.PureSpray || projectile.type == ProjectileID.PurificationPowder)
+ if (tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType())
{
- AstralBiome.ConvertFromAstral(i, j, ConvertType.Pure, !isPowder);
+ bool isPlayerNear = WorldGen.PlayerLOS(i, j);
+ bool success = WorldGen.GrowTree(i, j);
+ if (success && isPlayerNear)
+ WorldGen.TreeGrowFXCheck(i, j);
}
- if (projectile.type == ProjectileID.CorruptSpray || projectile.type == ProjectileID.VilePowder)
+ else if (tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType())
{
- AstralBiome.ConvertFromAstral(i, j, ConvertType.Corrupt, !isPowder);
+ bool isPlayerNear = WorldGen.PlayerLOS(i, j);
+ bool success = WorldGen.GrowPalmTree(i, j);
+ if (success && isPlayerNear)
+ WorldGen.TreeGrowFXCheck(i, j);
}
- if (projectile.type == ProjectileID.CrimsonSpray || projectile.type == ProjectileID.ViciousPowder)
+ else if (tile.TileType == ModContent.TileType())
{
- AstralBiome.ConvertFromAstral(i, j, ConvertType.Crimson, !isPowder);
- }
- if (projectile.type == ProjectileID.HallowSpray)
- {
- AstralBiome.ConvertFromAstral(i, j, ConvertType.Hallow);
+ bool isPlayerNear = WorldGen.PlayerLOS(i, j);
+ if (isPlayerNear && Main.tile[i, j + 1].TileType != ModContent.TileType())
+ SpineTree.Spawn(i, j, 22, 28, true);
}
NetMessage.SendTileSquare(-1, i, j, 1, 1);
}
@@ -4862,8 +4826,6 @@ namespace CalamityMod.Projectiles
public override bool PreDraw(Projectile projectile, ref Color lightColor)
{
- // This is used so that projectiles with specific PreDraws can still have Odd Mushroom clone drawing.
- // If Odd Mushroom clone drawing is done manually due to using a different texture, just return false instead of setting this.
bool shouldDrawBool = true;
#region Vanilla Summons Drawing Changes
@@ -4918,8 +4880,6 @@ namespace CalamityMod.Projectiles
Texture2D crossbone = TextureAssets.Projectile[ProjectileID.BoneGloveProj].Value;
Main.spriteBatch.Draw(crossbone, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, crossbone.Size() / 2f, projectile.scale, projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0f);
- if (Main.LocalPlayer.Calamity().trippy)
- OddMushroomProjectileDrawing(projectile, crossbone);
return false;
}
@@ -4938,8 +4898,6 @@ namespace CalamityMod.Projectiles
spriteEffects = SpriteEffects.FlipHorizontally;
Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), rectangle, projectile.GetAlpha(lightColor), projectile.rotation, origin, projectile.scale, spriteEffects, 0f);
- if (Main.LocalPlayer.Calamity().trippy)
- OddMushroomProjectileDrawing(projectile, texture);
return false;
}
}
@@ -4956,9 +4914,6 @@ namespace CalamityMod.Projectiles
shouldDrawBool = false;
}
- if (Main.LocalPlayer.Calamity().trippy)
- OddMushroomProjectileDrawing(projectile);
-
if (Main.zenithWorld)
{
if (NPC.AnyNPCs(NPCType()))
@@ -4972,134 +4927,6 @@ namespace CalamityMod.Projectiles
return shouldDrawBool;
}
-
- private static void OddMushroomProjectileDrawing(Projectile projectile, Texture2D? tex = null)
- {
- Texture2D texture = tex ?? TextureAssets.Projectile[projectile.type].Value;
-
- SpriteEffects spriteEffects = SpriteEffects.None;
- if (projectile.spriteDirection == -1)
- spriteEffects = SpriteEffects.FlipHorizontally;
-
- Color rainbow = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, Main.DiscoR);
- Color alphaColor = projectile.GetAlpha(rainbow);
- float RGBMult = 0.99f;
- alphaColor.R = (byte)(alphaColor.R * RGBMult);
- alphaColor.G = (byte)(alphaColor.G * RGBMult);
- alphaColor.B = (byte)(alphaColor.B * RGBMult);
- alphaColor.A = (byte)(alphaColor.A * RGBMult);
- int totalAfterimages = Main.LocalPlayer.Calamity().trippyLevel == 3 ? 16 : (Main.LocalPlayer.Calamity().trippyLevel == 2 ? 12 : 4);
- for (int i = 0; i < totalAfterimages; i++)
- {
- Vector2 position = projectile.position;
- float distanceFromTargetX = Math.Abs(projectile.Center.X - Main.LocalPlayer.Center.X);
- float distanceFromTargetY = Math.Abs(projectile.Center.Y - Main.LocalPlayer.Center.Y);
-
- float smallDistanceMult = 0.48f;
- float largeDistanceMult = 1.33f;
- bool whatTheFuck = Main.LocalPlayer.Calamity().trippyLevel == 3;
-
- switch (i)
- {
- case 0:
- position.X = Main.LocalPlayer.Center.X - distanceFromTargetX;
- position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY;
- break;
-
- case 1:
- position.X = Main.LocalPlayer.Center.X + distanceFromTargetX;
- position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY;
- break;
-
- case 2:
- position.X = Main.LocalPlayer.Center.X + distanceFromTargetX;
- position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY;
- break;
-
- case 3:
- position.X = Main.LocalPlayer.Center.X - distanceFromTargetX;
- position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY;
- break;
-
- case 4: // 1 o'clock position
- position.X = Main.LocalPlayer.Center.X + (distanceFromTargetX * (whatTheFuck ? 1f : smallDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y - (distanceFromTargetY * (whatTheFuck ? 0f : largeDistanceMult));
- break;
-
- case 5: // 4 o'clock position
- position.X = Main.LocalPlayer.Center.X + (distanceFromTargetX * (whatTheFuck ? 0f : largeDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y + (distanceFromTargetY * (whatTheFuck ? 1f : smallDistanceMult));
- break;
-
- case 6: // 7 o'clock position
- position.X = Main.LocalPlayer.Center.X - (distanceFromTargetX * (whatTheFuck ? 1f : smallDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y + (distanceFromTargetY * (whatTheFuck ? 0f : largeDistanceMult));
- break;
-
- case 7: // 10 o'clock position
- position.X = Main.LocalPlayer.Center.X - (distanceFromTargetX * (whatTheFuck ? 0f : largeDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y - (distanceFromTargetY * (whatTheFuck ? 1f : smallDistanceMult));
- break;
-
- case 8: // 11 o'clock position
- position.X = Main.LocalPlayer.Center.X - (distanceFromTargetX * (whatTheFuck ? 0f : smallDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y - (distanceFromTargetY * (whatTheFuck ? 0.5f : largeDistanceMult));
- break;
-
- case 9: // 2 o'clock position
- position.X = Main.LocalPlayer.Center.X + (distanceFromTargetX * (whatTheFuck ? 0.5f : largeDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y - (distanceFromTargetY * (whatTheFuck ? 0f : smallDistanceMult));
- break;
-
- case 10: // 5 o'clock position
- position.X = Main.LocalPlayer.Center.X + (distanceFromTargetX * (whatTheFuck ? 0f : smallDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y + (distanceFromTargetY * (whatTheFuck ? 0.5f : largeDistanceMult));
- break;
-
- case 11: // 8 o'clock position
- position.X = Main.LocalPlayer.Center.X - (distanceFromTargetX * (whatTheFuck ? 0.5f : largeDistanceMult));
- position.Y = Main.LocalPlayer.Center.Y + (distanceFromTargetY * (whatTheFuck ? 0f : smallDistanceMult));
- break;
-
- case 12:
- position.X = Main.LocalPlayer.Center.X - distanceFromTargetX * 0.5f;
- position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY * 0.5f;
- break;
-
- case 13:
- position.X = Main.LocalPlayer.Center.X + distanceFromTargetX * 0.5f;
- position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY * 0.5f;
- break;
-
- case 14:
- position.X = Main.LocalPlayer.Center.X + distanceFromTargetX * 0.5f;
- position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY * 0.5f;
- break;
-
- case 15:
- position.X = Main.LocalPlayer.Center.X - distanceFromTargetX * 0.5f;
- position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY * 0.5f;
- break;
-
- default:
- break;
- }
-
- position.X -= projectile.width / 2;
- position.Y -= projectile.height / 2;
-
- int frameHeight = texture.Height / Main.projFrames[projectile.type];
- int currentframeHeight = frameHeight * projectile.frame;
- Rectangle frame = new Rectangle(0, currentframeHeight, texture.Width, frameHeight);
-
- Vector2 halfSize = frame.Size() / 2;
-
- Main.spriteBatch.Draw(texture,
- new Vector2(position.X - Main.screenPosition.X + (float)(projectile.width / 2) - (float)TextureAssets.Projectile[projectile.type].Width() * projectile.scale / 2f + halfSize.X * projectile.scale,
- position.Y - Main.screenPosition.Y + (float)projectile.height - (float)TextureAssets.Projectile[projectile.type].Height() * projectile.scale / (float)Main.projFrames[projectile.type] + 4f + halfSize.Y * projectile.scale + projectile.gfxOffY),
- frame, alphaColor, projectile.rotation, halfSize, projectile.scale, spriteEffects, 0f);
- }
- }
#endregion
#region Pre Kill
@@ -5231,15 +5058,6 @@ namespace CalamityMod.Projectiles
modPlayer.scuttlerCooldown = 30;
}
}
-
- if (projectile.type == ProjectileID.UnholyWater)
- Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType(), 0, 0f, projectile.owner, 1f);
-
- if (projectile.type == ProjectileID.BloodWater)
- Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType(), 0, 0f, projectile.owner, 2f);
-
- if (projectile.type == ProjectileID.HolyWater)
- Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType(), 0, 0f, projectile.owner, 3f);
}
}
}
diff --git a/Projectiles/DraedonsArsenal/PhaseslayerBeam.cs b/Projectiles/DraedonsArsenal/PhaseslayerBeam.cs
index 1299ef33d0..45f31fc87c 100644
--- a/Projectiles/DraedonsArsenal/PhaseslayerBeam.cs
+++ b/Projectiles/DraedonsArsenal/PhaseslayerBeam.cs
@@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
Rectangle frame = bladeTexture.Frame(1, 5, 0, Projectile.frameCounter / 4 % 5);
var drawData2 = new DrawData(bladeTexture, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, bladeTexture.Size() / new Vector2(1f, 5f) * 0.5f, Projectile.scale * 1.2f, SpriteEffects.None, 0);
- CalamityShaders.LightDistortionShader.CurrentTechnique.Passes[0].Apply();
+ CalamityShaders.LightDistortionShader.Value.CurrentTechnique.Passes[0].Apply();
drawData2.Draw(Main.spriteBatch);
return false;
diff --git a/Projectiles/Enemy/ShoreskipperTackle.cs b/Projectiles/Enemy/ShoreskipperTackle.cs
new file mode 100644
index 0000000000..8723e42deb
--- /dev/null
+++ b/Projectiles/Enemy/ShoreskipperTackle.cs
@@ -0,0 +1,65 @@
+using Microsoft.Xna.Framework;
+using Terraria;
+using Terraria.ID;
+using Terraria.ModLoader;
+using static Terraria.ModLoader.ModContent;
+
+namespace CalamityMod.Projectiles.Enemy
+{
+ public class ShoreskipperTackle : ModProjectile, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Projectiles.Enemy";
+ public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
+
+ private NPC OwnerNPC => Main.npc[(int)Projectile.ai[0]];
+
+ public override void SetDefaults()
+ {
+ Projectile.width = 64;
+ Projectile.height = 32;
+ Projectile.hostile = true;
+ Projectile.friendly = false;
+ Projectile.ignoreWater = false;
+ Projectile.tileCollide = false;
+ Projectile.timeLeft = 120;
+ Projectile.penetrate = 1;
+ Projectile.usesLocalNPCImmunity = true;
+ Projectile.localNPCHitCooldown = -1;
+ }
+
+ public override void AI()
+ {
+ if (!OwnerNPC.active || OwnerNPC.type != NPCType())
+ {
+ Projectile.Kill();
+ return;
+ }
+
+ Projectile.Center = OwnerNPC.Center;
+
+ if (OwnerNPC.velocity.Y == 0f)
+ {
+ Projectile.Kill();
+ }
+ }
+
+ public override bool? CanHitNPC(NPC target)
+ {
+ // Can only damage other Shoreskippers
+ if (target.type == NPCType())
+ {
+ // Never kill yourself
+ if (target.whoAmI == OwnerNPC.whoAmI)
+ return false;
+
+ return true;
+ }
+ return false;
+ }
+
+ public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
+ {
+ Dust.NewDust(target.position, target.width, target.height, DustID.Water, 0f, -2f, 0, default, 1f);
+ }
+ }
+}
diff --git a/Projectiles/Magic/ChronoIcicleLarge.cs b/Projectiles/Magic/ChronoIcicleLarge.cs
index 72f369e809..4ae6e976d7 100644
--- a/Projectiles/Magic/ChronoIcicleLarge.cs
+++ b/Projectiles/Magic/ChronoIcicleLarge.cs
@@ -31,6 +31,10 @@ namespace CalamityMod.Projectiles.Magic
public override void AI()
{
+ Player player = Main.player[Projectile.owner];
+ if (player is null || player.dead)
+ Projectile.Kill();
+
Projectile.ai[1]++;
switch (Projectile.ai[0])
{
diff --git a/Projectiles/Magic/ChronomancersScytheHoldout.cs b/Projectiles/Magic/ChronomancersScytheHoldout.cs
index ed6c379bfd..6750135757 100644
--- a/Projectiles/Magic/ChronomancersScytheHoldout.cs
+++ b/Projectiles/Magic/ChronomancersScytheHoldout.cs
@@ -44,6 +44,10 @@ namespace CalamityMod.Projectiles.Magic
{
Owner.ChangeDir((int)Projectile.ai[2]);
+ Player player = Main.player[Projectile.owner];
+ if (player is null || player.dead)
+ Projectile.Kill();
+
Projectile.velocity = Vector2.Zero;
Projectile.rotation += (2 * MathHelper.Pi / 60) * Projectile.ai[2];
diff --git a/Projectiles/Magic/HyperdeathRiftScepterBeam.cs b/Projectiles/Magic/HyperdeathRiftScepterBeam.cs
index 86e53366e7..f5944b2800 100644
--- a/Projectiles/Magic/HyperdeathRiftScepterBeam.cs
+++ b/Projectiles/Magic/HyperdeathRiftScepterBeam.cs
@@ -99,7 +99,7 @@ namespace CalamityMod.Projectiles.Magic
public override bool? CanHitNPC(NPC target)
{
if (canDamage)
- return true;
+ return null;
return false;
}
public override bool CanHitPlayer(Player target)
diff --git a/Projectiles/Ranged/BloodfireBulletProj.cs b/Projectiles/Ranged/BloodfireBulletProj.cs
index 3f13d793b9..6bcdc83941 100644
--- a/Projectiles/Ranged/BloodfireBulletProj.cs
+++ b/Projectiles/Ranged/BloodfireBulletProj.cs
@@ -82,10 +82,9 @@ namespace CalamityMod.Projectiles.Ranged
// Returns the amount of bonus damage that should be dealt. Boosts life regeneration appropriately as a side effect.
private float OnHitEffect(Player owner, NPC target)
{
- // The bonus scales based on a rough estimate of how strong the hit is
- // Caps at min 12 and max 720
- float lifeRegenTimeBonus = 3600 * MathHelper.Clamp((Projectile.damage / target.lifeMax), 0.0035f, 0.2f);
- owner.lifeRegenTime += (int)lifeRegenTimeBonus;
+ // Adds 3 frames to natural life regen on each hit
+ owner.lifeRegenTime += 3;
+
// Provides up to 10% damage boost based on life regen time, caps at 3600
float lifeRegenTimeContribution = Utils.GetLerpValue(0, 3600, owner.lifeRegenTime, true) * 0.1f;
float finalDamageBoost = 1 + lifeRegenTimeContribution;
diff --git a/Projectiles/Typeless/AstralSpray.cs b/Projectiles/Typeless/AstralSpray.cs
index d2354f3dd6..f1b18aff04 100644
--- a/Projectiles/Typeless/AstralSpray.cs
+++ b/Projectiles/Typeless/AstralSpray.cs
@@ -1,4 +1,5 @@
using CalamityMod.World;
+using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -10,69 +11,50 @@ namespace CalamityMod.Projectiles.Typeless
public new string LocalizationCategory => "Projectiles.Typeless";
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
+ public ref float Time => ref Projectile.ai[0];
+ public bool ShotFromTerraformer => Projectile.ai[1] == 1f;
+
+ public static int ConversionType;
+ public override void SetStaticDefaults() => ConversionType = ModContent.GetInstance().Type;
+
public override void SetDefaults()
{
- Projectile.width = 16;
- Projectile.height = 16;
- Projectile.aiStyle = -1;
- Projectile.friendly = true;
- Projectile.alpha = 255;
- Projectile.penetrate = -1;
- Projectile.extraUpdates = 2;
- Projectile.tileCollide = false;
- Projectile.ignoreWater = true;
+ Projectile.DefaultToSpray();
+ Projectile.aiStyle = 0;
}
public override bool? CanDamage() => false;
- public override bool PreAI()
+ public override void AI()
{
+ if (Projectile.timeLeft > 133)
+ Projectile.timeLeft = 133;
+
if (Main.myPlayer == Projectile.owner)
{
- int x = (int)(Projectile.Center.X / 16f);
- int y = (int)(Projectile.Center.Y / 16f);
+ int size = ShotFromTerraformer ? 3 : 2;
+ Point tileCenter = Projectile.Center.ToTileCoordinates();
+ WorldGen.Convert(tileCenter.X, tileCenter.Y, ConversionType, size);
+ }
- AstralBiome.ConvertToAstral(x - 1, x + 1, y - 1, y + 1);
- }
- if (Projectile.timeLeft > 133)
+ float dustStart = ShotFromTerraformer ? 3f : 7f;
+ if (Time > dustStart)
{
- Projectile.timeLeft = 133;
- }
- if (Projectile.ai[0] > 7f)
- {
- float scalar = 1f;
- if (Projectile.ai[0] == 8f)
+ float dustScale = Utils.Remap(Time, dustStart + 1f, dustStart + 5f, 0.2f, 1f);
+ int dustArea = 0;
+ if (ShotFromTerraformer)
{
- scalar = 0.2f;
+ dustScale *= 1.2f;
+ dustArea = (int)(12f * dustScale);
}
- else if (Projectile.ai[0] == 9f)
- {
- scalar = 0.4f;
- }
- else if (Projectile.ai[0] == 10f)
- {
- scalar = 0.6f;
- }
- else if (Projectile.ai[0] == 11f)
- {
- scalar = 0.8f;
- }
- Projectile.ai[0]++;
- for (int i = 0; i < 1; i++)
- {
- int d = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Ice_Purple, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100);
- Main.dust[d].noGravity = true;
- Main.dust[d].scale *= 1.75f * scalar;
- Main.dust[d].velocity.X *= 2f;
- Main.dust[d].velocity.Y *= 2f;
- }
- }
- else
- {
- Projectile.ai[0]++;
+
+ Dust spray = Dust.NewDustDirect(Projectile.position - Vector2.One * dustArea, Projectile.width + dustArea * 2, Projectile.height + dustArea * 2, DustID.Ice_Purple, Projectile.velocity.X * 0.4f, Projectile.velocity.Y * 0.4f, 100);
+ spray.noGravity = true;
+ spray.scale *= 1.75f * dustScale;
}
+
+ Time++;
Projectile.rotation += 0.3f * Projectile.direction;
- return false;
}
}
}
diff --git a/Projectiles/Typeless/FriendlyLaserWallBeam.cs b/Projectiles/Typeless/FriendlyLaserWallBeam.cs
index 732092d3dc..23c489894d 100644
--- a/Projectiles/Typeless/FriendlyLaserWallBeam.cs
+++ b/Projectiles/Typeless/FriendlyLaserWallBeam.cs
@@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Typeless
public override bool? CanHitNPC(NPC target)
{
if (canDamage)
- return true;
+ return null;
return false;
}
public override bool CanHitPlayer(Player target)
diff --git a/Projectiles/Typeless/StarStruckWaterBottle.cs b/Projectiles/Typeless/StarStruckWaterBottle.cs
index b201dfc760..808c0307ea 100644
--- a/Projectiles/Typeless/StarStruckWaterBottle.cs
+++ b/Projectiles/Typeless/StarStruckWaterBottle.cs
@@ -1,4 +1,5 @@
using CalamityMod.Dusts;
+using CalamityMod.World;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
@@ -12,6 +13,9 @@ namespace CalamityMod.Projectiles.Typeless
public new string LocalizationCategory => "Projectiles.Typeless";
public override string Texture => "CalamityMod/Items/Weapons/Typeless/StarStruckWater";
+ public static int ConversionType;
+ public override void SetStaticDefaults() => ConversionType = ModContent.GetInstance