diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs
index 0fe1c1512f..aa31164e4e 100644
--- a/Buffs/CalamityGlobalBuff.cs
+++ b/Buffs/CalamityGlobalBuff.cs
@@ -204,10 +204,6 @@ namespace CalamityMod.Buffs
tip = CalamityUtils.GetTextValue("Vanilla.BuffDescription.ChaosState");
break;
- case BuffID.IceBarrier:
- tip = tip.Replace("25", "15");
- break;
-
case BuffID.MagicPower:
tip = tip.Replace("20", "10");
break;
diff --git a/Buffs/DamageOverTime/TrueVulnerabilityHex.cs b/Buffs/DamageOverTime/TrueVulnerabilityHex.cs
index b4d0be15c0..97cc48f2b3 100644
--- a/Buffs/DamageOverTime/TrueVulnerabilityHex.cs
+++ b/Buffs/DamageOverTime/TrueVulnerabilityHex.cs
@@ -17,7 +17,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 3996, //6x the tick size
- SicknessDebuffScaling = 1,
+ HeatDebuffScaling = 1,
MinimumDamageTickSize = 666, //Vhex should always have ticks of 666
MultiplierDamageTickSize = 0
};
diff --git a/Buffs/StatDebuffs/WhisperingDeath.cs b/Buffs/StatDebuffs/WhisperingDeath.cs
index dc05297df1..d24a61bc89 100644
--- a/Buffs/StatDebuffs/WhisperingDeath.cs
+++ b/Buffs/StatDebuffs/WhisperingDeath.cs
@@ -1,4 +1,5 @@
-using Terraria;
+using CalamityMod.DataStructures;
+using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
@@ -7,12 +8,18 @@ namespace CalamityMod.Buffs.StatDebuffs
{
public class WhisperingDeath : ModBuff
{
+ // Whispering Death does not deal DoT, but is classified as a sickness debuff.
+ public static DebuffData debuffData = new DebuffData()
+ {
+ SicknessDebuffScaling = 1
+ };
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
+ BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs
index 392cd70ebb..44219086bf 100644
--- a/CalPlayer/CalamityPlayer.cs
+++ b/CalPlayer/CalamityPlayer.cs
@@ -112,8 +112,6 @@ namespace CalamityMod.CalPlayer
public double projectileDamageReduction = 0D;
public int hellbornShots = 0;
public int garandShots = 0;
- public int searedPanCounter = 0;
- public int searedPanTimer = 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.
@@ -368,12 +366,8 @@ namespace CalamityMod.CalPlayer
public int dragonRageHits = 0;
/// Cooldown variable for Dragon Rage's fireball spawning to prevent spamming projectiles when hitting multiple enemies simultaneously.
public int dragonRageCooldown = 0;
- public const float AquaticBoostMax = 10000f;
- ///
- /// Counter variable which controls Aquatic Emblem's stat boosts while underwater.
- /// This counter starts at , and is decremented by 2 for every frame the player remains underwater, reaching maximum boosts when it hits 0.
- ///
- public float aquaticBoost = 0f;
+ /// Counter variable which controls Aquatic Emblem's stat boosts while underwater.
+ public float aquaticBoost = 0;
public int galileoCooldown = 0;
/// Used to track Prideful Hunter's Planar Ripper's movement speed boost, along with its visual effects.
public int planarSpeedBoost = 0;
@@ -728,8 +722,6 @@ namespace CalamityMod.CalPlayer
public bool tCloudberry = false;
/// If true, the player has consumed Sacred Strawberry.
public bool sStrawberry = false;
- /// If true, the player has consumed Nimble Bounder.
- public bool nimbleBounderBoost = false;
public bool revJamDrop = false;
/// If true, the player has consumed Mushroom Plasma Root.
public bool rageBoostOne = false;
@@ -804,7 +796,6 @@ namespace CalamityMod.CalPlayer
public bool ascendantInsignia = false;
public int ascendantInsigniaBuffTime = 0;
public int ascendantInsigniaCooldown = 0;
- public bool ascendantTrail = false;
/// Used to toggle dust spawned while swinging, through accessory visibility.
public bool magmaStoneVisuals = true;
public bool eGauntlet = false;
@@ -1751,7 +1742,6 @@ namespace CalamityMod.CalPlayer
sStrawberry = false;
pHeart = false;
cShard = false;
- nimbleBounderBoost = false;
revJamDrop = false;
rageBoostOne = false;
rageBoostTwo = false;
@@ -1804,7 +1794,6 @@ namespace CalamityMod.CalPlayer
boost.AddWithCondition("dragonFruit", sStrawberry);
boost.AddWithCondition("phantomHeart", pHeart);
boost.AddWithCondition("cometShard", cShard);
- boost.AddWithCondition("nimbleBounder", nimbleBounderBoost);
boost.AddWithCondition("revJam", revJamDrop);
boost.AddWithCondition("rageOne", rageBoostOne);
boost.AddWithCondition("rageTwo", rageBoostTwo);
@@ -1895,7 +1884,6 @@ namespace CalamityMod.CalPlayer
sStrawberry = boost.Contains("dragonFruit");
pHeart = boost.Contains("phantomHeart");
cShard = boost.Contains("cometShard");
- nimbleBounderBoost = boost.Contains("nimbleBounder");
revJamDrop = boost.Contains("revJam");
rageBoostOne = boost.Contains("rageOne");
rageBoostTwo = boost.Contains("rageTwo");
@@ -2028,7 +2016,7 @@ namespace CalamityMod.CalPlayer
percentMaxLifeIncrease += 25;
if (affliction || afflicted)
- percentMaxLifeIncrease += 10;
+ percentMaxLifeIncrease += Affliction.MaxLifeBoostPercent;
if (community)
percentMaxLifeIncrease += (int)(TheCommunity.CalculatePower() * TheCommunity.HealthMultiplier);
@@ -2244,7 +2232,6 @@ namespace CalamityMod.CalPlayer
teslaVisuals = true;
cryogenSoul = false;
ascendantInsignia = false;
- ascendantTrail = false;
magmaStoneVisuals = true;
eGauntlet = false;
eGauntletVisuals = true;
@@ -3246,7 +3233,6 @@ namespace CalamityMod.CalPlayer
CurrentlyViewedHologramText = string.Empty;
#endregion
- ascendantTrail = false;
evilSmasherBoost = 0;
burningSeaBurnOut = 0;
flareGunOverheat = 0;
@@ -3254,8 +3240,6 @@ namespace CalamityMod.CalPlayer
lucreciaEnergy = 0;
elementalMastery = 0;
garandShots = 0;
- searedPanCounter = 0;
- searedPanTimer = 0;
persecutedEnchantSummonTimer = 0;
momentumCapacitorTime = 0;
momentumCapacitorBoost = 0f;
@@ -3320,8 +3304,8 @@ namespace CalamityMod.CalPlayer
var source = Player.GetSource_Accessory(FindAccessory(ItemType()));
Projectile.NewProjectile(source, Player.Center - Vector2.UnitY * 45f, Vector2.Zero, ProjectileType(), 0, 0f);
SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Item/AscendantActivate"));
- ascendantInsigniaCooldown = 2400;
- ascendantInsigniaBuffTime = 240; //4 seconds
+ ascendantInsigniaCooldown = AscendantInsignia.AbilityCooldown;
+ ascendantInsigniaBuffTime = AscendantInsignia.AbilityDuration;
}
int numOfBlobs = Player.ownedProjectileCounts[ProjectileType()];
@@ -3400,8 +3384,7 @@ namespace CalamityMod.CalPlayer
}
if (CalamityKeybinds.AngelicAllianceHotKey.JustPressed && angelicAlliance && Main.myPlayer == Player.whoAmI && !divineBless && !Player.HasCooldown(Cooldowns.DivineBless.ID))
{
- int seconds = CalamityUtils.SecondsToFrames(15f);
- Player.AddBuff(BuffType(), seconds, false);
+ Player.AddBuff(BuffType(), AngelicAlliance.DivineBlessDuration, false);
SoundEngine.PlaySound(AngelicAlliance.ActivationSound, Player.Center);
// Spawn an archangel for every minion you have
@@ -3423,7 +3406,7 @@ namespace CalamityMod.CalPlayer
float start = 360f / angelAmt;
Projectile.NewProjectile(source, new Vector2((int)(Player.Center.X + (Math.Sin(projIndex * start) * 300)), (int)(Player.Center.Y + (Math.Cos(projIndex * start) * 300))), Vector2.Zero, ProjectileType(), proj.damage / 10, proj.knockBack / 10f, Player.whoAmI, Main.rand.Next(180), projIndex * start);
- Player.HealPlayer(2);
+ Player.HealPlayer(AngelicAlliance.HealPerAngelSpawned);
}
}
if (CalamityKeybinds.SpectralVeilHotKey.JustPressed && spectralVeil && Main.myPlayer == Player.whoAmI && rogueStealth >= rogueStealthMax * 0.25f &&
@@ -4463,6 +4446,30 @@ namespace CalamityMod.CalPlayer
Lighting.AddLight(Player.Center, Light * (0.55f + (oceanCrestTimer * 0.0035f)));
}
+ if (rampartOfDeities)
+ {
+ // Ice Barrier buff inherited from Frozen Turtle Shell
+ if (Player.statLife <= Player.statLifeMax2 * 0.5)
+ Player.AddBuff(BuffID.IceBarrier, 5);
+
+ // Paladin's Shield application
+ if (Player.statLife > Player.statLifeMax2 * 0.25f)
+ {
+ Player.hasPaladinShield = true;
+ if (Player.whoAmI != Main.myPlayer && Player.miscCounter % 10 == 0)
+ {
+ var localPlayer = Main.LocalPlayer;
+ if (localPlayer.team == Player.team && Player.team != 0)
+ {
+ float teamPlayerXDist = Player.position.X - localPlayer.position.X;
+ float teamPlayerYDist = Player.position.Y - localPlayer.position.Y;
+ if ((float)Math.Sqrt(teamPlayerXDist * teamPlayerXDist + teamPlayerYDist * teamPlayerYDist) < 800f)
+ localPlayer.AddBuff(BuffID.PaladinsShield, 20);
+ }
+ }
+ }
+ }
+
// True melee damage from various vanilla equipment placed here.
// Titan Glove and ALL upgrades.
@@ -4566,8 +4573,7 @@ namespace CalamityMod.CalPlayer
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
(silvaSet ? SilvaArmor.AccelerationBoost : 0f) +
(getSandCloakAccelBoost ? 0.75f : 0f) +
- (nimbleBounderBoost ? NimbleBounder.AccelerationBoost : 0f) +
- (ascendantInsignia ? 0.25f : 0f) + // Added to Soaring Insignia's 1.25x multiplier to get 1.5x
+ (ascendantInsignia ? (AscendantInsignia.AccelerationBoost - 0.25f) : 0f) + // Subtracted 0.25 provided by Soaring Insignia
(statisNinjaBelt ? 0.6f : 0f) +
(statisVoidSash ? 0.85f : 0f) +
(blueCandle ? WeightlessCandle.AccelerationBoost : 0f) +
@@ -4586,7 +4592,6 @@ namespace CalamityMod.CalPlayer
(dragonScales ? 0.1f : 0f) +
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
(silvaSet ? SilvaArmor.AccelerationBoost : 0f) +
- (nimbleBounderBoost ? NimbleBounder.AccelerationBoost : 0f) +
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
//(exaltedKillMode ? 0.4f : devilsDevastationKillMode ? 0.7f : 0) +
(hasteLevel * 0.05f);
diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs
index afe9da6ed0..6ecc8fd1d2 100644
--- a/CalPlayer/CalamityPlayerHitHurt.cs
+++ b/CalPlayer/CalamityPlayerHitHurt.cs
@@ -1014,7 +1014,7 @@ namespace CalamityMod.CalPlayer
bool isReducedTrap = (proj.trap || proj.type == ProjectileID.RollingCactusSpike || proj.type == ProjectileID.Landmine) && !isIgnoredTrap;
if (Player.Calamity().trapProtection && isReducedTrap)
- modifiers.SourceDamage *= 0.35f;
+ modifiers.SourceDamage *= (1f - ArchaicPowder.TrapDamageReduction);
// Reduce damage dealt by rainbow trails
if (proj.type == ProjectileID.HallowBossLastingRainbow)
@@ -2261,7 +2261,7 @@ namespace CalamityMod.CalPlayer
if (aquaticHeartIce)
{
SoundEngine.PlaySound(SoundID.NPCDeath7, Player.Center);
- Player.AddCooldown(AquaticHeartIceShield.ID, CalamityUtils.SecondsToFrames(30));
+ Player.AddCooldown(AquaticHeartIceShield.ID, AquaticHeart.IceShieldCooldown);
for (int d = 0; d < 10; d++)
{
diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs
index 20bce9b8de..b6d1b0e46a 100644
--- a/CalPlayer/CalamityPlayerLifeRegen.cs
+++ b/CalPlayer/CalamityPlayerLifeRegen.cs
@@ -6,6 +6,7 @@ using CalamityMod.Buffs.Placeables;
using CalamityMod.Buffs.StatBuffs;
using CalamityMod.CalPlayer.Dashes;
using CalamityMod.Cooldowns;
+using CalamityMod.DataStructures;
using CalamityMod.Enums;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Accessories.Wings;
@@ -117,8 +118,8 @@ namespace CalamityMod.CalPlayer
ApplyDoTDebuff(crushDepth, 18, purity);
ApplyDoTDebuff(astralInfection, 24, infectedJewel || hideOfDeus || purity);
ApplyDoTDebuff(shadowflame, 30, purity);
- ApplyDoTDebuff(brimstoneFlames, abaddon ? 15 : 30, purity);
- ApplyDoTDebuff(plague, alchFlask ? 15 : 30, purity);
+ ApplyDoTDebuff(brimstoneFlames, (int)MathF.Round(30 * (abaddon ? (1f - Abaddon.BrimstoneFlamesReduction) : 1f)), purity);
+ ApplyDoTDebuff(plague, (int)MathF.Round(30 * (abaddon ? (1f - AlchemicalFlask.PlagueReduction) : 1f)), purity);
ApplyDoTDebuff(vHex, 30); // Has other effects
ApplyDoTDebuff(searingLava, 30);
ApplyDoTDebuff(demonicFlames, 33, purity); // Never inflicted on the player
@@ -307,9 +308,9 @@ namespace CalamityMod.CalPlayer
int buffID = Player.buffType[l];
if (Player.buffTime[l] <= 2)
continue;
- bool shouldHalveDuration = CalamityBuffSets.IsSicknessDebuff[buffID];
+ bool shouldHalveDuration = BuffDatasets.DebuffDataset[buffID].SicknessDebuffScaling > 0;
if (livingDewHalveDebuffs)
- shouldHalveDuration |= CalamityBuffSets.IsFireDebuff[buffID];
+ shouldHalveDuration |= BuffDatasets.DebuffDataset[buffID].HeatDebuffScaling > 0;
if (purity)
shouldHalveDuration |= CalamityBuffSets.IsDebuff[buffID];
@@ -320,7 +321,7 @@ namespace CalamityMod.CalPlayer
if (divineBless)
{
- if (Player.whoAmI == Main.myPlayer && Player.miscCounter % 15 == 0) // Flat 4 health per second
+ if (Player.whoAmI == Main.myPlayer && Player.miscCounter % AngelicAlliance.DivineBlessFramesPerHeal == 0) // Flat 4 health per second
{
if (!noLifeRegen)
Player.HealPlayer(1, HealTextType.None);
@@ -355,7 +356,7 @@ namespace CalamityMod.CalPlayer
}
// Permafrost's Concoction increases life regen while afflicted with a fire debuff
- if (permafrostsConcoction && Player.buffType.Any(l => CalamityBuffSets.IsFireDebuff[l]))
+ if (permafrostsConcoction && Player.buffType.Any(l => BuffDatasets.DebuffDataset[l].HeatDebuffScaling > 0))
{
if (Player.lifeRegenTime < 900)
Player.lifeRegenTime = 900;
@@ -368,7 +369,7 @@ namespace CalamityMod.CalPlayer
{
float missingLifeRatio = (Player.statLifeMax2 - Player.statLife) / (float)Player.statLifeMax2;
//Ambrosial Ampule and ooze give between 2 and 5 hp/s
- int lifeRegenToGive = (int)Math.Round(MathHelper.Lerp(4f, 10f, missingLifeRatio));//Rounding is needed for it to ever actually give +5 hp/s, as the integer conversion would otherwise floor it.
+ int lifeRegenToGive = (int)Math.Round(MathHelper.Lerp(RadiantOoze.MinRegenBoost, RadiantOoze.MaxRegenBoost, missingLifeRatio));//Rounding is needed for it to ever actually give +5 hp/s, as the integer conversion would otherwise floor it.
Player.lifeRegen += lifeRegenToGive;
radiantOozeRegen += lifeRegenToGive / 2f;
purityRegen += lifeRegenToGive / 2f;
@@ -574,7 +575,7 @@ namespace CalamityMod.CalPlayer
Player.lifeRegen += HallowedRune.RegenBoost;
if (affliction || afflicted)
- Player.lifeRegen += 1;
+ Player.lifeRegen += Affliction.RegenBoost;
if (trinketOfChi || chiRegen)
Player.lifeRegen += 2;
diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs
index 05ec0a8a49..7fe500b940 100644
--- a/CalPlayer/CalamityPlayerMiscEffects.cs
+++ b/CalPlayer/CalamityPlayerMiscEffects.cs
@@ -2710,19 +2710,12 @@ namespace CalamityMod.CalPlayer
Player.jumpSpeedBoost += TheAbsorber.JumpSpeedBoost;
}
- // Nimble Bounder bonus
- if (nimbleBounderBoost)
- {
- Player.moveSpeed += NimbleBounder.MoveSpeedBoost;
- Player.jumpSpeedBoost += NimbleBounder.JumpSpeedBoost;
- }
-
// Affliction bonus
if (affliction || afflicted)
{
- Player.endurance += 0.07f;
- Player.statDefense += 9;
- Player.GetDamage() += 0.1f;
+ Player.endurance += Affliction.DamageReductionBoost;
+ Player.statDefense += Affliction.DefenseBoost;
+ Player.GetDamage() += Affliction.DamageBoost;
}
float[] light = new float[3];
@@ -2945,8 +2938,8 @@ namespace CalamityMod.CalPlayer
if (!ascendantInsignia && ascendantInsigniaBuffTime > 0)
{
ascendantInsigniaBuffTime = 0;
- ascendantInsigniaCooldown = 2400;
- Player.AddCooldown(AscendEffect.ID, 2400);
+ ascendantInsigniaCooldown = AscendantInsignia.AbilityCooldown;
+ Player.AddCooldown(AscendEffect.ID, AscendantInsignia.AbilityCooldown);
}
if (!brimflameSet && brimflameFrenzy)
@@ -3002,7 +2995,7 @@ namespace CalamityMod.CalPlayer
{
divineBless = false;
Player.ClearBuff(ModContent.BuffType());
- Player.AddCooldown(Cooldowns.DivineBless.ID, CalamityUtils.SecondsToFrames(60));
+ Player.AddCooldown(Cooldowns.DivineBless.ID, AngelicAlliance.DivineBlessCooldown);
}
// Armageddon's Dodge Disable feature puts Shadow Dodge/Holy Protection on permanent cooldown
@@ -3313,15 +3306,14 @@ namespace CalamityMod.CalPlayer
// Aquatic Emblem bonus
if (aquaticEmblem)
{
- if (countsAsAnyWet && !Player.lavaWet && !Player.honeyWet &&
- !Player.mount.Active)
+ if (countsAsAnyWet && !Player.lavaWet && !Player.honeyWet && !Player.mount.Active)
{
- if (aquaticBoost > 0f)
+ if (aquaticBoost < AquaticEmblem.TimeToReachMaxBoost)
{
- aquaticBoost -= 2f;
- if (aquaticBoost <= 0f)
+ aquaticBoost++;
+ if (aquaticBoost > AquaticEmblem.TimeToReachMaxBoost)
{
- aquaticBoost = 0f;
+ aquaticBoost = AquaticEmblem.TimeToReachMaxBoost;
if (Main.netMode == NetmodeID.MultiplayerClient)
NetMessage.SendData(MessageID.PlayerStealth, -1, -1, null, Player.whoAmI, 0f, 0f, 0f, 0, 0, 0);
}
@@ -3329,18 +3321,18 @@ namespace CalamityMod.CalPlayer
}
else
{
- aquaticBoost += 2f;
- if (aquaticBoost > AquaticBoostMax)
- aquaticBoost = AquaticBoostMax;
+ aquaticBoost--;
+ if (aquaticBoost <= 0f)
+ aquaticBoost = 0f;
if (Player.mount.Active)
- aquaticBoost = AquaticBoostMax;
+ aquaticBoost = 0f;
}
- Player.statDefense += (int)((1f - aquaticBoost * 0.0001f) * 20f);
- Player.moveSpeed -= (1f - aquaticBoost * 0.0001f) * 0.1f;
+ Player.statDefense += (int)Utils.Remap(aquaticBoost, 0, AquaticEmblem.TimeToReachMaxBoost, 0, AquaticEmblem.MaxDefenseBoost);
+ Player.moveSpeed -= Utils.Remap(aquaticBoost, 0, AquaticEmblem.TimeToReachMaxBoost, 0, AquaticEmblem.MaxMoveSpeedReduction);
}
else
- aquaticBoost = AquaticBoostMax;
+ aquaticBoost = 0f;
if (Player.HeldItem.type == ModContent.ItemType() && Player.StandingStill(0.1f))
{
@@ -3709,18 +3701,6 @@ namespace CalamityMod.CalPlayer
if (Player.HeldItem.type != ModContent.ItemType())
evilSmasherBoost = 0;
}
- if (searedPanCounter > 0)
- {
- if (Player.HeldItem.type != ModContent.ItemType())
- {
- searedPanCounter = 0;
- searedPanTimer = 0;
- }
- else if (searedPanTimer < SearedPan.ConsecutiveHitOpening)
- searedPanTimer++;
- else
- searedPanCounter = 0;
- }
// Flight time boosts
double flightTimeMult = 1D +
@@ -3731,8 +3711,7 @@ namespace CalamityMod.CalPlayer
(soaring ? SoaringPotion.FlightBoost : 0D) +
(prismaticGreaves ? PrismaticGreaves.FlightTimeBoost : 0D) +
(plagueReaper ? PlagueReaperMask.SetBonusFlightTimeBoost : 0D) +
- (ascendantInsignia ? 0.17 : 0D) + // Added to soaring insignia's flight to get 50%
- (Player.empressBrooch ? 0.33 : 0D) +
+ (ascendantInsignia ? AscendantInsignia.FlightTimeBoost : Player.empressBrooch ? 0.33D : 0D) +
externalFlightTimeMultBoost;
if (community)
@@ -3976,10 +3955,9 @@ namespace CalamityMod.CalPlayer
if (ascendantInsignia && ascendantInsigniaBuffTime > 0)
{
- ascendantTrail = true;
infiniteFlight = true;
if (ascendantInsigniaBuffTime == 1)
- Player.AddCooldown(AscendEffect.ID, 2400);
+ Player.AddCooldown(AscendEffect.ID, AscendantInsignia.AbilityCooldown);
ascendantInsigniaBuffTime--;
}
@@ -4355,7 +4333,7 @@ namespace CalamityMod.CalPlayer
angelicActivate = -1;
if (angelicActivate == 1)
- Player.AddCooldown(Cooldowns.DivineBless.ID, CalamityUtils.SecondsToFrames(60));
+ Player.AddCooldown(Cooldowns.DivineBless.ID, AngelicAlliance.DivineBlessCooldown);
}
if (theBee && Player.statLife >= Player.statLifeMax2 && (!HasAnyEnergyShield || TotalEnergyShielding >= TotalMaxShieldDurability))
diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs
index 90d305f192..f409370f5c 100644
--- a/CalPlayer/CalamityPlayerOnHit.cs
+++ b/CalPlayer/CalamityPlayerOnHit.cs
@@ -202,11 +202,11 @@ namespace CalamityMod.CalPlayer
// Arc Flash Ring lightning strike (Remember to change the one for projectile hits if applicable when you change this one!)
// This one has a lot less limits than the projectile one, but that's because vanilla broadsword code is limiting (wow so surprising)
- bool spawnChance = (Main.rand.Next(0, 100) < 6);
+ bool spawnChance = (Main.rand.Next(100) < ArcFlashRing.LightningSpawnPercent);
if (arcFlashRing && spawnChance)
{
var source = item.GetSource_FromThis();
- int damage = (int)(((hit.Damage * 4f) * (hit.Crit ? 0.5f : 1)) / (Player.Calamity().adrenalineModeActive ? Player.Calamity().GetAdrenalineDamage() + 1 : 1)); // 400% damage (uneffected by crits and adrenaline)
+ int damage = (int)(((hit.Damage * ArcFlashRing.LightningDamageMult) * (hit.Crit ? 0.5f : 1)) / (Player.Calamity().adrenalineModeActive ? Player.Calamity().GetAdrenalineDamage() + 1 : 1)); // 400% damage (uneffected by crits and adrenaline)
Projectile bolt = Projectile.NewProjectileDirect(source, target.Center, Vector2.Zero, ProjectileType(), damage, 0f, Player.whoAmI, target.whoAmI);
bolt.DamageType = hit.DamageType;
@@ -1216,18 +1216,15 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffType(), TitanHeartMask.OnHitDebuffDuration);
}
}
- if (summon)
+ if (summon && !whip)
{
- if (pSoulArtifact && !profanedCrystal)
+ if (profanedCrystal && (DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs))
+ target.AddBuff(BuffType(), 600);
+ else if (pSoulArtifact)
target.AddBuff(BuffType(), 300);
- if (profanedCrystal && (DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs))
- {
- target.AddBuff(BuffType(), 600);
- }
-
if (divineBless)
- target.AddBuff(BuffType(), 60);
+ target.AddBuff(BuffType(), AngelicAlliance.BanishingFireDuration);
if (shadowMinions)
target.AddBuff(BuffID.ShadowFlame, 180);
@@ -1256,8 +1253,6 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffType(), 120);
target.AddBuff(BuffType(), 120);
}
- if (voidOfExtinction)
- CalamityUtils.Inflict246DebuffsNPC(target, BuffType());
if (frostFlare)
CalamityUtils.Inflict246DebuffsNPC(target, BuffID.Frostburn2);
if (omegaBlueChestplate)
diff --git a/Cooldowns/PanaceaCooldown.cs b/Cooldowns/PanaceaCooldown.cs
new file mode 100644
index 0000000000..cc2e416f71
--- /dev/null
+++ b/Cooldowns/PanaceaCooldown.cs
@@ -0,0 +1,18 @@
+using Microsoft.Xna.Framework;
+using Terraria.Audio;
+using Terraria.Localization;
+
+namespace CalamityMod.Cooldowns
+{
+ public class PanaceaCooldown : CooldownHandler
+ {
+ public static new string ID => "Panacea";
+ public override bool ShouldDisplay => true;
+ public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
+ public override string Texture => "CalamityMod/Cooldowns/PanaceaCooldown";
+ public override Color OutlineColor => new Color(122, 198, 255);
+ public override Color CooldownStartColor => new Color(0, 128, 255);
+ public override Color CooldownEndColor => new Color(0, 255, 255);
+ public override SoundStyle? EndSound => new("CalamityMod/Sounds/Custom/AbilitySounds/PotionSicknessOver");
+ }
+}
diff --git a/Cooldowns/PanaceaCooldown.png b/Cooldowns/PanaceaCooldown.png
new file mode 100644
index 0000000000..290132735c
Binary files /dev/null and b/Cooldowns/PanaceaCooldown.png differ
diff --git a/Cooldowns/PanaceaCooldownOutline.png b/Cooldowns/PanaceaCooldownOutline.png
new file mode 100644
index 0000000000..f31edcf0b4
Binary files /dev/null and b/Cooldowns/PanaceaCooldownOutline.png differ
diff --git a/Cooldowns/PanaceaCooldownOverlay.png b/Cooldowns/PanaceaCooldownOverlay.png
new file mode 100644
index 0000000000..7d72fd3769
Binary files /dev/null and b/Cooldowns/PanaceaCooldownOverlay.png differ
diff --git a/DataStructures/DebuffData.cs b/DataStructures/DebuffData.cs
index f663064384..e468aef941 100644
--- a/DataStructures/DebuffData.cs
+++ b/DataStructures/DebuffData.cs
@@ -23,6 +23,7 @@ namespace CalamityMod.DataStructures
BuffID.CursedInferno, DebuffData.CursedInferno,
BuffID.ShadowFlame, DebuffData.Shadowflame,
BuffID.Daybreak, DebuffData.Daybroken,
+ BuffID.Burning, DebuffData.Burning,
BuffID.Frostburn, DebuffData.Frostburn,
BuffID.Frostburn2, DebuffData.Frostbite,
BuffID.Poisoned, DebuffData.Poisoned,
@@ -378,6 +379,11 @@ namespace CalamityMod.DataStructures
HeatDebuffScaling = 1,
NPCLifeRegenMethod = DaybrokenRegen
};
+ // Provided purely to classify it as a heat debuff
+ public static DebuffData Burning = new DebuffData()
+ {
+ HeatDebuffScaling = 1
+ };
public static DebuffData Frostburn = new DebuffData()
{
EnemyLostRegen = 16,
diff --git a/Dusts/DiamondDust.cs b/Dusts/DiamondDust.cs
index 501f5b7643..3b34857b02 100644
--- a/Dusts/DiamondDust.cs
+++ b/Dusts/DiamondDust.cs
@@ -1,5 +1,7 @@
-using Microsoft.Xna.Framework;
+using CalamityMod.Systems.Graphic.PixelationSystem;
+using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
+using ReLogic.Content;
using Terraria;
using Terraria.ModLoader;
@@ -7,7 +9,16 @@ namespace CalamityMod.Dusts
{
public class DiamondDust : ModDust
{
+ public static Asset GlowDiamond { get; private set; }
+
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
+
+ public override void Load()
+ {
+ if (!Main.dedServ)
+ GlowDiamond = ModContent.Request("CalamityMod/Particles/SquareRotated");
+ }
+
public override void OnSpawn(Dust dust)
{
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
@@ -38,26 +49,51 @@ namespace CalamityMod.Dusts
return false;
}
+
public override bool PreDraw(Dust dust)
{
- Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
-
- Texture2D bloom = ModContent.Request("CalamityMod/Particles/SquareRotated").Value;
-
// dust.fadeIn is used to determine how intense the squash is, 1 is no squash, 0 is normal squash
float squashLerp = Utils.GetLerpValue(10, 25, dust.fadeIn, true);
Vector2 squash = new Vector2(MathHelper.Lerp(1, 0.3f, squashLerp), MathHelper.Lerp(1, 7f, squashLerp));
// Glow Orb
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(GlowDiamond.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowDiamond.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
if (dust.alpha < 1)
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.2f) with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.09f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(GlowDiamond.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.2f) with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowDiamond.Size() * 0.5f, squash * dust.scale * 0.09f, SpriteEffects.None, 0);
if (!dust.noLight)
{
for (int i = 0; i < 2; i++)
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.4f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha) * (i == 0 ? 1f : 0.7f), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.08f * (i == 0 ? 0.7f : 1), SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(GlowDiamond.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.4f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha) * (i == 0 ? 1f : 0.7f), dust.rotation, GlowDiamond.Size() * 0.5f, squash * dust.scale * 0.08f * (i == 0 ? 0.7f : 1), SpriteEffects.None, 0);
}
return false;
}
}
+
+ public class DiamondDustPixelated : DiamondDust
+ {
+ public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
+
+ public override bool PreDraw(Dust dust)
+ {
+ PixelationManager.AddPixelatedDrawer((_) => DrawPixelated(dust), Enums.GeneralDrawLayer.AfterDusts);
+ return false;
+ }
+
+ public static void DrawPixelated(Dust dust)
+ {
+ // dust.fadeIn is used to determine how intense the squash is, 1 is no squash, 0 is normal squash
+ float squashLerp = Utils.GetLerpValue(10, 25, dust.fadeIn, true);
+ Vector2 squash = new Vector2(MathHelper.Lerp(1, 0.3f, squashLerp), MathHelper.Lerp(1, 7f, squashLerp));
+
+ // Glow Orb
+ Main.spriteBatch.Draw(GlowDiamond.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowDiamond.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
+ if (dust.alpha < 1)
+ Main.spriteBatch.Draw(GlowDiamond.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.2f) with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowDiamond.Size() * 0.5f, squash * dust.scale * 0.09f, SpriteEffects.None, 0);
+ if (!dust.noLight)
+ {
+ for (int i = 0; i < 2; i++)
+ Main.spriteBatch.Draw(GlowDiamond.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.4f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha) * (i == 0 ? 1f : 0.7f), dust.rotation, GlowDiamond.Size() * 0.5f, squash * dust.scale * 0.08f * (i == 0 ? 0.7f : 1), SpriteEffects.None, 0);
+ }
+ }
+ }
}
diff --git a/Dusts/LightDust.cs b/Dusts/LightDust.cs
index d0f83ba587..6e5338861a 100644
--- a/Dusts/LightDust.cs
+++ b/Dusts/LightDust.cs
@@ -1,6 +1,9 @@
using System;
+using CalamityMod.Enums;
+using CalamityMod.Systems.Graphic.PixelationSystem;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
+using ReLogic.Content;
using Terraria;
using Terraria.ModLoader;
@@ -8,6 +11,19 @@ namespace CalamityMod.Dusts
{
public class LightDust : ModDust
{
+ public static Asset SolidCircle { get; private set; }
+
+ public static Asset BloomCircle { get; private set; }
+
+ public override void Load()
+ {
+ if (Main.dedServ)
+ return;
+
+ SolidCircle = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle");
+ BloomCircle = ModContent.Request("CalamityMod/Particles/BloomCircle");
+ }
+
public override void OnSpawn(Dust dust)
{
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
@@ -28,21 +44,37 @@ namespace CalamityMod.Dusts
return true;
}
+
public override bool PreDraw(Dust dust)
{
- Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
- Texture2D solidCenter = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle").Value;
-
- Texture2D bloom = ModContent.Request("CalamityMod/Particles/BloomCircle").Value;
// Glow Orb
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, dust.scale * 0.1f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.1f, SpriteEffects.None, 0);
if (dust.alpha < 1)
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, dust.scale * 0.04f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.04f, SpriteEffects.None, 0);
if (!dust.noLight)
- {
- Main.EntitySpriteDraw(solidCenter, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, solidCenter.Size() * 0.5f, dust.scale * 0.075f, SpriteEffects.None, 0);
- }
+ Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, dust.scale * 0.075f, SpriteEffects.None, 0);
return false;
}
}
+
+ public class LightDustPixelated : LightDust
+ {
+ public override string Texture => "CalamityMod/Dusts/LightDust";
+
+ public override bool PreDraw(Dust dust)
+ {
+ PixelationManager.AddPixelatedDrawer((_) => DrawPixelated(dust), GeneralDrawLayer.AfterDusts);
+ return false;
+ }
+
+ private static void DrawPixelated(Dust dust)
+ {
+ // Glow Orb
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.1f, SpriteEffects.None, 0);
+ if (dust.alpha < 1)
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.04f, SpriteEffects.None, 0);
+ if (!dust.noLight)
+ Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, dust.scale * 0.075f, SpriteEffects.None, 0);
+ }
+ }
}
diff --git a/Dusts/SquareDust.cs b/Dusts/SquareDust.cs
index 054b05ad37..7c25502b6a 100644
--- a/Dusts/SquareDust.cs
+++ b/Dusts/SquareDust.cs
@@ -1,6 +1,8 @@
using System;
+using CalamityMod.Systems.Graphic.PixelationSystem;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
+using ReLogic.Content;
using Terraria;
using Terraria.ModLoader;
@@ -8,7 +10,16 @@ namespace CalamityMod.Dusts
{
public class SquareDust : ModDust
{
+ public static Asset GlowSquare { get; private set; }
+
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
+
+ public override void Load()
+ {
+ if (!Main.dedServ)
+ GlowSquare = ModContent.Request("CalamityMod/Particles/GlowSquareParticleThick");
+ }
+
public override void OnSpawn(Dust dust)
{
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
@@ -42,22 +53,44 @@ namespace CalamityMod.Dusts
}
public override bool PreDraw(Dust dust)
{
- Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
-
- Texture2D bloom = ModContent.Request("CalamityMod/Particles/GlowSquareParticleThick").Value;
-
Vector2 squash = Vector2.One;
// Glow Orb
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(GlowSquare.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowSquare.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0f);
if (dust.alpha < 1)
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.095f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(GlowSquare.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowSquare.Size() * 0.5f, squash * dust.scale * 0.095f, SpriteEffects.None, 0f);
if (!dust.noLight)
{
for (int i = 0; i < 2; i++)
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.09f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(GlowSquare.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowSquare.Size() * 0.5f, squash * dust.scale * 0.09f, SpriteEffects.None, 0f);
}
return false;
}
}
+
+ public class SquareDustPixelated : SquareDust
+ {
+ public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
+
+ public override bool PreDraw(Dust dust)
+ {
+ PixelationManager.AddPixelatedDrawer((_) => DrawPixelated(dust), Enums.GeneralDrawLayer.AfterDusts);
+ return false;
+ }
+
+ private static void DrawPixelated(Dust dust)
+ {
+ Vector2 squash = Vector2.One;
+
+ // Glow Orb
+ Main.spriteBatch.Draw(GlowSquare.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowSquare.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0f);
+ if (dust.alpha < 1)
+ Main.spriteBatch.Draw(GlowSquare.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowSquare.Size() * 0.5f, squash * dust.scale * 0.095f, SpriteEffects.None, 0f);
+ if (!dust.noLight)
+ {
+ for (int i = 0; i < 2; i++)
+ Main.spriteBatch.Draw(GlowSquare.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowSquare.Size() * 0.5f, squash * dust.scale * 0.09f, SpriteEffects.None, 0f);
+ }
+ }
+ }
}
diff --git a/Dusts/SquashDust.cs b/Dusts/SquashDust.cs
index 5894cedb1b..8adfb2beaa 100644
--- a/Dusts/SquashDust.cs
+++ b/Dusts/SquashDust.cs
@@ -1,5 +1,7 @@
-using Microsoft.Xna.Framework;
+using CalamityMod.Systems.Graphic.PixelationSystem;
+using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
+using ReLogic.Content;
using Terraria;
using Terraria.ModLoader;
@@ -7,7 +9,21 @@ namespace CalamityMod.Dusts
{
public class SquashDust : ModDust
{
+ public static Asset SolidCircle { get; private set; }
+
+ public static Asset BloomCircle { get; private set; }
+
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
+
+ public override void Load()
+ {
+ if (Main.dedServ)
+ return;
+
+ SolidCircle = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle");
+ BloomCircle = ModContent.Request("CalamityMod/Particles/BloomCircle");
+ }
+
public override void OnSpawn(Dust dust)
{
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
@@ -37,24 +53,45 @@ namespace CalamityMod.Dusts
return false;
}
+
public override bool PreDraw(Dust dust)
{
- Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
- Texture2D solidCenter = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle").Value;
-
- Texture2D bloom = ModContent.Request("CalamityMod/Particles/BloomCircle").Value;
-
Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(dust.velocity.Length(), 2, 7, 1, 2.5f));
// Glow Orb
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
if (dust.alpha < 1)
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.04f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.04f, SpriteEffects.None, 0);
if (!dust.noLight)
{
- Main.EntitySpriteDraw(solidCenter, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, solidCenter.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0);
}
return false;
}
}
+
+ public class SquashDustPixelated : SquashDust
+ {
+ public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
+
+ public override bool PreDraw(Dust dust)
+ {
+ PixelationManager.AddPixelatedDrawer((_) => DrawPixelated(dust), Enums.GeneralDrawLayer.AfterDusts);
+ return false;
+ }
+
+ private static void DrawPixelated(Dust dust)
+ {
+ Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(dust.velocity.Length(), 2, 7, 1, 2.5f));
+
+ // Glow Orb
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
+ if (dust.alpha < 1)
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.04f, SpriteEffects.None, 0);
+ if (!dust.noLight)
+ {
+ Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0);
+ }
+ }
+ }
}
diff --git a/Dusts/SquashDustHollow.cs b/Dusts/SquashDustHollow.cs
index 9378128784..ec82d5aa67 100644
--- a/Dusts/SquashDustHollow.cs
+++ b/Dusts/SquashDustHollow.cs
@@ -1,5 +1,7 @@
-using Microsoft.Xna.Framework;
+using CalamityMod.Systems.Graphic.PixelationSystem;
+using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
+using ReLogic.Content;
using Terraria;
using Terraria.ModLoader;
@@ -7,7 +9,16 @@ namespace CalamityMod.Dusts
{
public class SquashDustHollow : ModDust
{
+ public static Asset BloomRing { get; private set; }
+
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
+
+ public override void Load()
+ {
+ if (!Main.dedServ)
+ BloomRing = ModContent.Request("CalamityMod/Particles/BloomRing");
+ }
+
public override void OnSpawn(Dust dust)
{
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
@@ -36,25 +47,49 @@ namespace CalamityMod.Dusts
return false;
}
+
public override bool PreDraw(Dust dust)
{
- Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
-
- Texture2D bloom = ModContent.Request("CalamityMod/Particles/BloomRing").Value;
-
// dust.fadeIn is used to determine how intense the squash is, 1 is no squash, 0 is normal squash
Vector2 squash = Vector2.Lerp(new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(dust.velocity.Length(), 2, 7, 1, 2.5f)), Vector2.One, dust.fadeIn);
// Glow Orb
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
+ Main.EntitySpriteDraw(BloomRing.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomRing.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
if (dust.alpha < 1)
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.2f) with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.09f, SpriteEffects.None, 0);
+ Main.EntitySpriteDraw(BloomRing.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.2f) with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomRing.Size() * 0.5f, squash * dust.scale * 0.09f, SpriteEffects.None, 0);
if (!dust.noLight)
{
for (int i = 0; i < 2; i++)
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.4f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0);
+ Main.EntitySpriteDraw(BloomRing.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.4f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomRing.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0);
}
return false;
}
}
+
+ public class SquashDustHollowPixelated : SquashDustHollow
+ {
+ public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
+
+ public override bool PreDraw(Dust dust)
+ {
+ PixelationManager.AddPixelatedDrawer((_) => DrawPixelated(dust), Enums.GeneralDrawLayer.AfterDusts);
+ return false;
+ }
+
+ private static void DrawPixelated(Dust dust)
+ {
+ // dust.fadeIn is used to determine how intense the squash is, 1 is no squash, 0 is normal squash
+ Vector2 squash = Vector2.Lerp(new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(dust.velocity.Length(), 2, 7, 1, 2.5f)), Vector2.One, dust.fadeIn);
+
+ // Glow Orb
+ Main.EntitySpriteDraw(BloomRing.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomRing.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
+ if (dust.alpha < 1)
+ Main.EntitySpriteDraw(BloomRing.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.2f) with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomRing.Size() * 0.5f, squash * dust.scale * 0.09f, SpriteEffects.None, 0);
+ if (!dust.noLight)
+ {
+ for (int i = 0; i < 2; i++)
+ Main.EntitySpriteDraw(BloomRing.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.4f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomRing.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0);
+ }
+ }
+ }
}
diff --git a/Dusts/SquashDustTileTouch.cs b/Dusts/SquashDustTileTouch.cs
index 0884d87cb4..8b994b462d 100644
--- a/Dusts/SquashDustTileTouch.cs
+++ b/Dusts/SquashDustTileTouch.cs
@@ -1,13 +1,15 @@
-using Microsoft.Xna.Framework;
+using CalamityMod.Systems.Graphic.PixelationSystem;
+using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Dusts
{
- public class SquashDustTileTouch : ModDust
+ public class SquashDustTileTouch : SquashDust
{
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
+
public override void OnSpawn(Dust dust)
{
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
@@ -16,12 +18,14 @@ namespace CalamityMod.Dusts
public override bool Update(Dust dust)
{
bool touchedTiles = false;
- int size = (int)(2);
+ int size = 2;
+
if (Collision.SolidCollision(dust.position, size, size))
{
touchedTiles = true;
dust.velocity = Vector2.Zero;
}
+
float fadeSpeed = (dust.fadeIn + 1); // For this dust, fadeIn is used to increase the power of gravity if it's active, otherwise it makes it's lifetime change
dust.rotation = dust.velocity.ToRotation() + MathHelper.PiOver2;
dust.velocity *= 0.96f;
@@ -45,24 +49,30 @@ namespace CalamityMod.Dusts
return false;
}
+ }
+
+ public class SquashDustTileTouchPixelated : SquashDustTileTouch
+ {
+ public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
+
public override bool PreDraw(Dust dust)
{
- Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
- Texture2D solidCenter = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle").Value;
-
- Texture2D bloom = ModContent.Request("CalamityMod/Particles/BloomCircle").Value;
+ PixelationManager.AddPixelatedDrawer((_) => DrawPixelated(dust), Enums.GeneralDrawLayer.AfterDusts);
+ return false;
+ }
+ private static void DrawPixelated(Dust dust)
+ {
Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(dust.velocity.Length(), 2, 7, 1, 2.5f));
// Glow Orb
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
if (dust.alpha < 1)
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.04f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.04f, SpriteEffects.None, 0);
if (!dust.noLight)
{
- Main.EntitySpriteDraw(solidCenter, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, solidCenter.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0);
}
- return false;
}
}
}
diff --git a/Dusts/UnstableDust.cs b/Dusts/UnstableDust.cs
index ee9cbf0fce..82f42fbfb5 100644
--- a/Dusts/UnstableDust.cs
+++ b/Dusts/UnstableDust.cs
@@ -1,6 +1,8 @@
using System;
+using CalamityMod.Systems.Graphic.PixelationSystem;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
+using ReLogic.Content;
using Terraria;
using Terraria.ModLoader;
@@ -8,7 +10,16 @@ namespace CalamityMod.Dusts
{
public class UnstableDust : ModDust
{
+ public static Asset GlowStar { get; private set; }
+
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
+
+ public override void Load()
+ {
+ if (!Main.dedServ)
+ GlowStar = ModContent.Request("CalamityMod/Particles/FullStar");
+ }
+
public override void OnSpawn(Dust dust)
{
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
@@ -41,23 +52,45 @@ namespace CalamityMod.Dusts
return false;
}
+
public override bool PreDraw(Dust dust)
{
- Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
-
- Texture2D bloom = ModContent.Request("CalamityMod/Particles/FullStar").Value;
-
Vector2 squash = new Vector2(0.4f, 1);
float texScaling = 6;
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f * texScaling, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(GlowStar.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowStar.Size() * 0.5f, squash * dust.scale * 0.1f * texScaling, SpriteEffects.None, 0);
if (dust.alpha < 1)
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.04f * texScaling, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(GlowStar.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowStar.Size() * 0.5f, squash * dust.scale * 0.04f * texScaling, SpriteEffects.None, 0);
if (!dust.noLight)
{
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.025f * texScaling, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(GlowStar.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowStar.Size() * 0.5f, squash * dust.scale * 0.025f * texScaling, SpriteEffects.None, 0);
}
return false;
}
}
+
+ public class UnstableDustPixelated : UnstableDust
+ {
+ public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
+
+ public override bool PreDraw(Dust dust)
+ {
+ PixelationManager.AddPixelatedDrawer((_) => DrawPixelated(dust), Enums.GeneralDrawLayer.AfterDusts);
+ return false;
+ }
+
+ private static void DrawPixelated(Dust dust)
+ {
+ Vector2 squash = new Vector2(0.4f, 1);
+ float texScaling = 6;
+
+ Main.spriteBatch.Draw(GlowStar.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowStar.Size() * 0.5f, squash * dust.scale * 0.1f * texScaling, SpriteEffects.None, 0);
+ if (dust.alpha < 1)
+ Main.spriteBatch.Draw(GlowStar.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowStar.Size() * 0.5f, squash * dust.scale * 0.04f * texScaling, SpriteEffects.None, 0);
+ if (!dust.noLight)
+ {
+ Main.spriteBatch.Draw(GlowStar.Value, dust.position - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, GlowStar.Size() * 0.5f, squash * dust.scale * 0.025f * texScaling, SpriteEffects.None, 0);
+ }
+ }
+ }
}
diff --git a/Dusts/VoidDust.cs b/Dusts/VoidDust.cs
index 793f7b826d..e66a8f3bf4 100644
--- a/Dusts/VoidDust.cs
+++ b/Dusts/VoidDust.cs
@@ -1,6 +1,9 @@
using System;
+using CalamityMod.Enums;
+using CalamityMod.Systems.Graphic.PixelationSystem;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
+using ReLogic.Content;
using Terraria;
using Terraria.ModLoader;
@@ -8,6 +11,19 @@ namespace CalamityMod.Dusts
{
public class VoidDust : ModDust
{
+ public static Asset SolidCircle { get; private set; }
+
+ public static Asset BloomCircle { get; private set; }
+
+ public override void Load()
+ {
+ if (Main.dedServ)
+ return;
+
+ SolidCircle = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle");
+ BloomCircle = ModContent.Request("CalamityMod/Particles/BloomCircle");
+ }
+
public override void OnSpawn(Dust dust)
{
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
@@ -28,20 +44,41 @@ namespace CalamityMod.Dusts
return true;
}
+
public override bool PreDraw(Dust dust)
{
- Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
- Texture2D solidCenter = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle").Value;
if (!dust.noLight)
{
- Texture2D bloom = ModContent.Request("CalamityMod/Particles/BloomCircle").Value;
// Glow Orb
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, dust.scale * 0.1f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.1f, SpriteEffects.None, 0);
if (dust.alpha < 1)
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, dust.scale * 0.04f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.04f, SpriteEffects.None, 0);
}
- Main.EntitySpriteDraw(solidCenter, dustCenter - Main.screenPosition, null, Color.Black * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, solidCenter.Size() * 0.5f, dust.scale * 0.075f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, Color.Black * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, dust.scale * 0.075f, SpriteEffects.None, 0);
return false;
}
}
+
+ public class VoidDustPixelated : VoidDust
+ {
+ public override string Texture => "CalamityMod/Dusts/VoidDust";
+
+ public override bool PreDraw(Dust dust)
+ {
+ PixelationManager.AddPixelatedDrawer((_) => DrawPixelated(dust), GeneralDrawLayer.AfterDusts);
+ return false;
+ }
+
+ private static void DrawPixelated(Dust dust)
+ {
+ if (!dust.noLight)
+ {
+ // Glow Orb
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.1f, SpriteEffects.None, 0);
+ if (dust.alpha < 1)
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.04f, SpriteEffects.None, 0);
+ }
+ Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, Color.Black * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, dust.scale * 0.075f, SpriteEffects.None, 0);
+ }
+ }
}
diff --git a/Dusts/VoidDustInverted.cs b/Dusts/VoidDustInverted.cs
index d5df7d199f..4c30aec8d8 100644
--- a/Dusts/VoidDustInverted.cs
+++ b/Dusts/VoidDustInverted.cs
@@ -1,6 +1,9 @@
using System;
+using CalamityMod.Enums;
+using CalamityMod.Systems.Graphic.PixelationSystem;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
+using ReLogic.Content;
using Terraria;
using Terraria.ModLoader;
@@ -8,6 +11,22 @@ namespace CalamityMod.Dusts
{
public class VoidDustInverted : ModDust
{
+ public static Asset SolidCircle { get; private set; }
+
+ public static Asset BloomCircle { get; private set; }
+
+ public static Asset SmallBloomCircle { get; private set; }
+
+ public override void Load()
+ {
+ if (Main.dedServ)
+ return;
+
+ SolidCircle = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle");
+ BloomCircle = ModContent.Request("CalamityMod/Particles/BloomCircle");
+ SmallBloomCircle = ModContent.Request("CalamityMod/Particles/SmallBloom");
+ }
+
public override void OnSpawn(Dust dust)
{
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
@@ -28,23 +47,39 @@ namespace CalamityMod.Dusts
return true;
}
+
public override bool PreDraw(Dust dust)
{
- Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
-
- Texture2D solidCenter = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle").Value;
- Texture2D bloom2 = ModContent.Request("CalamityMod/Particles/BloomCircle").Value;
-
- Texture2D bloom = ModContent.Request("CalamityMod/Particles/SmallBloom").Value;
-
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Black * 0.4f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, dust.scale * 0.068f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(SmallBloomCircle.Value, dust.position - Main.screenPosition, null, Color.Black * 0.4f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SmallBloomCircle.Size() * 0.5f, dust.scale * 0.068f, SpriteEffects.None, 0);
if (dust.alpha < 1)
- Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Black * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, dust.scale * 0.057f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(SmallBloomCircle.Value, dust.position - Main.screenPosition, null, Color.Black * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SmallBloomCircle.Size() * 0.5f, dust.scale * 0.057f, SpriteEffects.None, 0);
- Main.EntitySpriteDraw(bloom2, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom2.Size() * 0.5f, dust.scale * 0.07f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.07f, SpriteEffects.None, 0);
if (!dust.noLight)
- Main.EntitySpriteDraw(solidCenter, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * 0.75f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, solidCenter.Size() * 0.5f, dust.scale * 0.075f, SpriteEffects.None, 0);
+ Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.75f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, dust.scale * 0.075f, SpriteEffects.None, 0);
return false;
}
}
+
+ public class VoidDustInvertedPixelated : VoidDustInverted
+ {
+ public override string Texture => "CalamityMod/Dusts/VoidDustInverted";
+
+ public override bool PreDraw(Dust dust)
+ {
+ PixelationManager.AddPixelatedDrawer((_) => DrawPixelated(dust), GeneralDrawLayer.AfterDusts);
+ return false;
+ }
+
+ private static void DrawPixelated(Dust dust)
+ {
+ Main.spriteBatch.Draw(SmallBloomCircle.Value, dust.position - Main.screenPosition, null, Color.Black * 0.4f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SmallBloomCircle.Size() * 0.5f, dust.scale * 0.068f, SpriteEffects.None, 0);
+ if (dust.alpha < 1)
+ Main.spriteBatch.Draw(SmallBloomCircle.Value, dust.position - Main.screenPosition, null, Color.Black * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SmallBloomCircle.Size() * 0.5f, dust.scale * 0.057f, SpriteEffects.None, 0);
+
+ Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.07f, SpriteEffects.None, 0);
+ if (!dust.noLight)
+ Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.75f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, dust.scale * 0.075f, SpriteEffects.None, 0);
+ }
+ }
}
diff --git a/Enums/GeneralDrawLayer.cs b/Enums/GeneralDrawLayer.cs
new file mode 100644
index 0000000000..319e734f49
--- /dev/null
+++ b/Enums/GeneralDrawLayer.cs
@@ -0,0 +1,21 @@
+using System;
+
+namespace CalamityMod.Enums
+{
+ ///
+ /// A general collection of points in Terraria's overall draw order that graphical systems in the mod draw to.
+ ///
+ [Flags]
+ public enum GeneralDrawLayer
+ {
+ BeforeAllTiles = 0,
+ BeforeSolidTiles = 1,
+ BeforeNPCs = 2,
+ AfterNPCs = 4,
+ BeforeProjectiles = 8,
+ AfterProjectiles = 16,
+ AfterPlayers = 32,
+ AfterDusts = 64,
+ AfterEverything = 128,
+ }
+}
diff --git a/Gores/ArmoredDigger/ArmoredDiggerBody.png b/Gores/ArmoredDigger/ArmoredDiggerBody.png
deleted file mode 100644
index 082eb57526..0000000000
Binary files a/Gores/ArmoredDigger/ArmoredDiggerBody.png and /dev/null differ
diff --git a/Gores/ArmoredDigger/ArmoredDiggerBody2.png b/Gores/ArmoredDigger/ArmoredDiggerBody2.png
deleted file mode 100644
index a7a22f0697..0000000000
Binary files a/Gores/ArmoredDigger/ArmoredDiggerBody2.png and /dev/null differ
diff --git a/Gores/ArmoredDigger/ArmoredDiggerHead.png b/Gores/ArmoredDigger/ArmoredDiggerHead.png
deleted file mode 100644
index 7debb48e29..0000000000
Binary files a/Gores/ArmoredDigger/ArmoredDiggerHead.png and /dev/null differ
diff --git a/Gores/ArmoredDigger/ArmoredDiggerHead2.png b/Gores/ArmoredDigger/ArmoredDiggerHead2.png
deleted file mode 100644
index c1fe479da5..0000000000
Binary files a/Gores/ArmoredDigger/ArmoredDiggerHead2.png and /dev/null differ
diff --git a/Gores/ArmoredDigger/ArmoredDiggerTail.png b/Gores/ArmoredDigger/ArmoredDiggerTail.png
deleted file mode 100644
index 6a30219a5b..0000000000
Binary files a/Gores/ArmoredDigger/ArmoredDiggerTail.png and /dev/null differ
diff --git a/Gores/ArmoredDigger/ArmoredDiggerTail2.png b/Gores/ArmoredDigger/ArmoredDiggerTail2.png
deleted file mode 100644
index 616e848530..0000000000
Binary files a/Gores/ArmoredDigger/ArmoredDiggerTail2.png and /dev/null differ
diff --git a/Graphics/Metaballs/BigRipMetaball.cs b/Graphics/Metaballs/BigRipMetaball.cs
index c78acfa9c5..faee855da9 100644
--- a/Graphics/Metaballs/BigRipMetaball.cs
+++ b/Graphics/Metaballs/BigRipMetaball.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
@@ -77,7 +78,7 @@ namespace CalamityMod.Graphics.Metaballs
// Load the layer asset wrapper.
LayerAsset = ModContent.Request($"CalamityMod/Graphics/Metaballs/BigRipLayer", AssetRequestMode.ImmediateLoad);
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.BeforeProjectiles;
public override Color EdgeColor => new Color(239, 111, 85) * 0.5f;
diff --git a/Graphics/Metaballs/BloodBoilerMetaball.cs b/Graphics/Metaballs/BloodBoilerMetaball.cs
index 7b253e77ab..42fce30903 100644
--- a/Graphics/Metaballs/BloodBoilerMetaball.cs
+++ b/Graphics/Metaballs/BloodBoilerMetaball.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Effects;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -48,7 +49,7 @@ namespace CalamityMod.Graphics.Metaballs
}
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.AfterProjectiles;
public override Color EdgeColor => Color.Red with { A = 0 };
diff --git a/Graphics/Metaballs/BloodBoilerMetaball2.cs b/Graphics/Metaballs/BloodBoilerMetaball2.cs
index 323bb8ba1f..2786575f77 100644
--- a/Graphics/Metaballs/BloodBoilerMetaball2.cs
+++ b/Graphics/Metaballs/BloodBoilerMetaball2.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Effects;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -48,7 +49,7 @@ namespace CalamityMod.Graphics.Metaballs
}
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.AfterProjectiles;
public override Color EdgeColor => Color.Red with { A = 0 };
diff --git a/Graphics/Metaballs/BloodMetaball.cs b/Graphics/Metaballs/BloodMetaball.cs
index 28457126f8..952950e6ce 100644
--- a/Graphics/Metaballs/BloodMetaball.cs
+++ b/Graphics/Metaballs/BloodMetaball.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
@@ -79,7 +80,7 @@ namespace CalamityMod.Graphics.Metaballs
// Load the layer asset wrapper.
LayerAsset = ModContent.Request($"CalamityMod/Graphics/Metaballs/BloodLayer", AssetRequestMode.ImmediateLoad);
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.BeforeProjectiles;
public override Color EdgeColor => new Color(67, 17, 17);
diff --git a/Graphics/Metaballs/CalamitasMetaball.cs b/Graphics/Metaballs/CalamitasMetaball.cs
index 86bcd3fa23..52e9eeb066 100644
--- a/Graphics/Metaballs/CalamitasMetaball.cs
+++ b/Graphics/Metaballs/CalamitasMetaball.cs
@@ -1,11 +1,11 @@
using System.Collections.Generic;
using System.Linq;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using Terraria;
using Terraria.ModLoader;
-using static CalamityMod.Graphics.Metaballs.StreamGougeMetaball;
namespace CalamityMod.Graphics.Metaballs
{
@@ -71,7 +71,7 @@ namespace CalamityMod.Graphics.Metaballs
// Load the layer asset wrapper.
LayerAsset = ModContent.Request($"CalamityMod/Graphics/Metaballs/CalamitasLayer", AssetRequestMode.ImmediateLoad);
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.BeforeProjectiles;
public override Color EdgeColor => Color.Lerp(Color.Crimson, Color.Black, 0f);
diff --git a/Graphics/Metaballs/CataclysmMetaball.cs b/Graphics/Metaballs/CataclysmMetaball.cs
index 62131a6df4..59221f3d51 100644
--- a/Graphics/Metaballs/CataclysmMetaball.cs
+++ b/Graphics/Metaballs/CataclysmMetaball.cs
@@ -1,11 +1,11 @@
using System.Collections.Generic;
using System.Linq;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using Terraria;
using Terraria.ModLoader;
-using static CalamityMod.Graphics.Metaballs.StreamGougeMetaball;
namespace CalamityMod.Graphics.Metaballs
{
@@ -71,7 +71,7 @@ namespace CalamityMod.Graphics.Metaballs
// Load the layer asset wrapper.
LayerAsset = ModContent.Request($"CalamityMod/Graphics/Metaballs/CataclysmLayer", AssetRequestMode.ImmediateLoad);
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.BeforeProjectiles;
public override Color EdgeColor => new Color(255,0,229);
diff --git a/Graphics/Metaballs/CatastropheMetaball.cs b/Graphics/Metaballs/CatastropheMetaball.cs
index 24f54493a0..399af76ad4 100644
--- a/Graphics/Metaballs/CatastropheMetaball.cs
+++ b/Graphics/Metaballs/CatastropheMetaball.cs
@@ -1,11 +1,11 @@
using System.Collections.Generic;
using System.Linq;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using Terraria;
using Terraria.ModLoader;
-using static CalamityMod.Graphics.Metaballs.StreamGougeMetaball;
namespace CalamityMod.Graphics.Metaballs
{
@@ -73,7 +73,7 @@ namespace CalamityMod.Graphics.Metaballs
// Load the layer asset wrapper.
LayerAsset = ModContent.Request($"CalamityMod/Graphics/Metaballs/CatastropheLayer", AssetRequestMode.ImmediateLoad);
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.BeforeProjectiles;
public override Color EdgeColor => new Color(0,255,255);
diff --git a/Graphics/Metaballs/DoGDistortionMetaball.cs b/Graphics/Metaballs/DoGDistortionMetaball.cs
index 84a32b18ab..260f13a4a1 100644
--- a/Graphics/Metaballs/DoGDistortionMetaball.cs
+++ b/Graphics/Metaballs/DoGDistortionMetaball.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using CalamityMod.Effects;
+using CalamityMod.Enums;
using CalamityMod.Projectiles.Boss;
using CalamityMod.Systems.Graphic;
using Microsoft.Xna.Framework;
@@ -33,7 +34,7 @@ namespace CalamityMod.Graphics.Metaballs
public static List Particles { get; private set; } = [];
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.AfterProjectiles;
public override bool AnythingToDraw => Particles.Count > 0 || CalamityUtils.AnyProjectiles(ModContent.ProjectileType());
diff --git a/Graphics/Metaballs/DragonsBreathMetaball.cs b/Graphics/Metaballs/DragonsBreathMetaball.cs
index aba4cc4458..f134656a39 100644
--- a/Graphics/Metaballs/DragonsBreathMetaball.cs
+++ b/Graphics/Metaballs/DragonsBreathMetaball.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Effects;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -68,7 +69,7 @@ namespace CalamityMod.Graphics.Metaballs
}
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.AfterProjectiles;
public override void Update()
{
diff --git a/Graphics/Metaballs/DragonsBreathMetaball2.cs b/Graphics/Metaballs/DragonsBreathMetaball2.cs
index 49753e9ebb..bd18795fa2 100644
--- a/Graphics/Metaballs/DragonsBreathMetaball2.cs
+++ b/Graphics/Metaballs/DragonsBreathMetaball2.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Effects;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -68,7 +69,7 @@ namespace CalamityMod.Graphics.Metaballs
}
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.AfterProjectiles;
public override void Update()
{
diff --git a/Graphics/Metaballs/GalaxyMetaball.cs b/Graphics/Metaballs/GalaxyMetaball.cs
index 4d93ed1020..feec8791a1 100644
--- a/Graphics/Metaballs/GalaxyMetaball.cs
+++ b/Graphics/Metaballs/GalaxyMetaball.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
@@ -56,7 +57,7 @@ namespace CalamityMod.Graphics.Metaballs
}
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeNPCs;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.BeforeNPCs;
public override Color EdgeColor => Color.Lerp(Color.DarkBlue, Color.Black, 0.75f);
diff --git a/Graphics/Metaballs/GruesomeMetaball.cs b/Graphics/Metaballs/GruesomeMetaball.cs
index 0c281d7e5f..348099bcd6 100644
--- a/Graphics/Metaballs/GruesomeMetaball.cs
+++ b/Graphics/Metaballs/GruesomeMetaball.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using CalamityMod.Enums;
using CalamityMod.Projectiles.Magic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@@ -56,7 +57,7 @@ namespace CalamityMod.Graphics.Metaballs
}
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.AfterProjectiles;
public override Color EdgeColor => new(61, 6, 2);
diff --git a/Graphics/Metaballs/Metaball.cs b/Graphics/Metaballs/Metaball.cs
index ae150455a4..61e90d84a4 100644
--- a/Graphics/Metaballs/Metaball.cs
+++ b/Graphics/Metaballs/Metaball.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Effects;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -33,7 +34,7 @@ namespace CalamityMod.Graphics.Metaballs
///
/// The draw layer in which metaballs should be drawn.
///
- public abstract MetaballDrawLayer DrawContext
+ public abstract GeneralDrawLayer DrawLayer
{
get;
}
diff --git a/Graphics/Metaballs/MetaballDrawLayer.cs b/Graphics/Metaballs/MetaballDrawLayer.cs
deleted file mode 100644
index d061aabe61..0000000000
--- a/Graphics/Metaballs/MetaballDrawLayer.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace CalamityMod.Graphics.Metaballs
-{
- public enum MetaballDrawLayer
- {
- BeforeNPCs,
- BeforeProjectiles,
- AfterProjectiles,
- }
-}
diff --git a/Graphics/Metaballs/MetaballManager.cs b/Graphics/Metaballs/MetaballManager.cs
index 2e7721341b..123e007766 100644
--- a/Graphics/Metaballs/MetaballManager.cs
+++ b/Graphics/Metaballs/MetaballManager.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -15,8 +16,6 @@ namespace CalamityMod.Graphics.Metaballs
{
// Prepare event subscribers.
RenderTargetManager.RenderTargetUpdateLoopEvent += PrepareMetaballTargets;
- On_Main.DrawProjectiles += DrawMetaballsAfterProjectiles;
- On_Main.DrawNPCs += DrawMetaballsBeforeNPCs;
}
public override void OnModUnload()
@@ -86,51 +85,20 @@ namespace CalamityMod.Graphics.Metaballs
Main.spriteBatch.End();
}
- private void DrawMetaballsAfterProjectiles(On_Main.orig_DrawProjectiles orig, Main self)
- {
- if (AnyActiveMetaballsAtLayer(MetaballDrawLayer.BeforeProjectiles))
- {
- Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
- DrawMetaballs(MetaballDrawLayer.BeforeProjectiles);
- Main.spriteBatch.End();
- }
-
- orig(self);
-
- if (AnyActiveMetaballsAtLayer(MetaballDrawLayer.AfterProjectiles))
- {
- Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
- DrawMetaballs(MetaballDrawLayer.AfterProjectiles);
- Main.spriteBatch.End();
- }
- }
-
- private void DrawMetaballsBeforeNPCs(On_Main.orig_DrawNPCs orig, Main self, bool behindTiles)
- {
- if (!behindTiles && AnyActiveMetaballsAtLayer(MetaballDrawLayer.BeforeNPCs))
- {
- Main.spriteBatch.End();
- Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
- DrawMetaballs(MetaballDrawLayer.BeforeNPCs);
- Main.spriteBatch.ExitShaderRegion();
- }
- orig(self, behindTiles);
- }
-
///
/// Checks if a metaball of a given layering type is currently in use. This is used to minimize needless restarts when there is nothing to draw.
///
/// The metaball layer type to check against.
- internal static bool AnyActiveMetaballsAtLayer(MetaballDrawLayer layerType) =>
- metaballs.Any(m => m.AnythingToDraw && m.DrawContext == layerType);
+ internal static bool AnyActiveMetaballsAtLayer(GeneralDrawLayer layerType) =>
+ metaballs.Any(m => m.AnythingToDraw && m.DrawLayer == layerType);
///
- /// Draws all metaballs of a given . Used for layer ordering reasons.
+ /// Draws all metaballs of a given . Used for layer ordering reasons.
///
/// The layer type to draw with.
- public static void DrawMetaballs(MetaballDrawLayer layerType)
+ internal static void DrawMetaballs(GeneralDrawLayer layerType)
{
- foreach (Metaball metaball in metaballs.Where(m => m.DrawContext == layerType && m.AnythingToDraw))
+ foreach (Metaball metaball in metaballs.Where(m => m.DrawLayer == layerType && m.AnythingToDraw))
{
for (int i = 0; i < metaball.LayerTargets.Count; i++)
{
diff --git a/Graphics/Metaballs/PaintMetaballs.cs b/Graphics/Metaballs/PaintMetaballs.cs
index 4773d80083..dfa9472c02 100644
--- a/Graphics/Metaballs/PaintMetaballs.cs
+++ b/Graphics/Metaballs/PaintMetaballs.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Effects;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -64,7 +65,7 @@ namespace CalamityMod.Graphics.Metaballs
public override bool AnythingToDraw => Particles.Any();
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.AfterProjectiles;
public override IEnumerable Layers
{
diff --git a/Graphics/Metaballs/PhotoMetaball.cs b/Graphics/Metaballs/PhotoMetaball.cs
index 7b2d07c007..d831e44c4b 100644
--- a/Graphics/Metaballs/PhotoMetaball.cs
+++ b/Graphics/Metaballs/PhotoMetaball.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Effects;
-using CalamityMod.Rarities;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -54,7 +54,7 @@ namespace CalamityMod.Graphics.Metaballs
}
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.AfterProjectiles;
public Color sparkColor;
public int Time = 0;
diff --git a/Graphics/Metaballs/PhotoMetaball2.cs b/Graphics/Metaballs/PhotoMetaball2.cs
index cdba6d5b54..59b2c81aa8 100644
--- a/Graphics/Metaballs/PhotoMetaball2.cs
+++ b/Graphics/Metaballs/PhotoMetaball2.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Effects;
-using CalamityMod.Rarities;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -54,7 +54,7 @@ namespace CalamityMod.Graphics.Metaballs
}
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.AfterProjectiles;
public Color sparkColor;
public int Time;
diff --git a/Graphics/Metaballs/PhotoMetaball3.cs b/Graphics/Metaballs/PhotoMetaball3.cs
index 017697f976..e5ff5c9194 100644
--- a/Graphics/Metaballs/PhotoMetaball3.cs
+++ b/Graphics/Metaballs/PhotoMetaball3.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Effects;
-using CalamityMod.Rarities;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -47,7 +47,7 @@ namespace CalamityMod.Graphics.Metaballs
}
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.AfterProjectiles;
public Color sparkColor;
public int Time = 0;
diff --git a/Graphics/Metaballs/PhotoMetaball4.cs b/Graphics/Metaballs/PhotoMetaball4.cs
index 114a32bf76..e9c5adc160 100644
--- a/Graphics/Metaballs/PhotoMetaball4.cs
+++ b/Graphics/Metaballs/PhotoMetaball4.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Effects;
-using CalamityMod.Rarities;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -47,7 +47,7 @@ namespace CalamityMod.Graphics.Metaballs
}
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.AfterProjectiles;
public Color sparkColor;
public int Time;
diff --git a/Graphics/Metaballs/RancorLavaMetaball.cs b/Graphics/Metaballs/RancorLavaMetaball.cs
index 5c26a4ffdb..4999ac66d2 100644
--- a/Graphics/Metaballs/RancorLavaMetaball.cs
+++ b/Graphics/Metaballs/RancorLavaMetaball.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Effects;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -44,7 +45,7 @@ namespace CalamityMod.Graphics.Metaballs
public override bool AnythingToDraw => Particles.Any();
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.AfterProjectiles;
public override IEnumerable Layers
{
diff --git a/Graphics/Metaballs/ScalArenaMetaball.cs b/Graphics/Metaballs/ScalArenaMetaball.cs
index a57d474009..c7a1039e74 100644
--- a/Graphics/Metaballs/ScalArenaMetaball.cs
+++ b/Graphics/Metaballs/ScalArenaMetaball.cs
@@ -1,18 +1,13 @@
using System;
using System.Collections.Generic;
-using System.IO;
using System.Linq;
-using CalamityMod.NPCs;
+using CalamityMod.Enums;
using CalamityMod.NPCs.SupremeCalamitas;
-using CalamityMod.Systems.Mechanic;
-using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using Terraria;
using Terraria.ModLoader;
-using static CalamityMod.Graphics.Metaballs.StreamGougeMetaball;
-using static CalamityMod.Systems.LavaRenderingSystem;
namespace CalamityMod.Graphics.Metaballs
{
@@ -82,7 +77,7 @@ namespace CalamityMod.Graphics.Metaballs
WavyLineLayer = ModContent.Request($"CalamityMod/Graphics/Metaballs/ScalArenaLayerWave", AssetRequestMode.ImmediateLoad).Value;
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeNPCs;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.BeforeNPCs;
public override Color EdgeColor => SupremeCalamitas.CurrentColor;
diff --git a/Graphics/Metaballs/SeekersMetaball.cs b/Graphics/Metaballs/SeekersMetaball.cs
index d389e569e5..a0658bb66d 100644
--- a/Graphics/Metaballs/SeekersMetaball.cs
+++ b/Graphics/Metaballs/SeekersMetaball.cs
@@ -1,11 +1,11 @@
using System.Collections.Generic;
using System.Linq;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using Terraria;
using Terraria.ModLoader;
-using static CalamityMod.Graphics.Metaballs.StreamGougeMetaball;
namespace CalamityMod.Graphics.Metaballs
{
@@ -73,7 +73,7 @@ namespace CalamityMod.Graphics.Metaballs
// Load the layer asset wrapper.
LayerAsset = ModContent.Request($"CalamityMod/Graphics/Metaballs/SeekersLayer", AssetRequestMode.ImmediateLoad);
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.BeforeProjectiles;
public override Color EdgeColor => new Color(255,106,0);
diff --git a/Graphics/Metaballs/SignusMetaball.cs b/Graphics/Metaballs/SignusMetaball.cs
index 7c90c5fda0..c0179a8ebc 100644
--- a/Graphics/Metaballs/SignusMetaball.cs
+++ b/Graphics/Metaballs/SignusMetaball.cs
@@ -1,11 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using Terraria;
-using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Graphics.Metaballs
@@ -77,7 +77,7 @@ namespace CalamityMod.Graphics.Metaballs
}
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeNPCs;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.BeforeNPCs;
public override void Load()
{
if (Main.dedServ)
diff --git a/Graphics/Metaballs/StarsmokeMetaball.cs b/Graphics/Metaballs/StarsmokeMetaball.cs
index e5f2565257..3bdfa5e22d 100644
--- a/Graphics/Metaballs/StarsmokeMetaball.cs
+++ b/Graphics/Metaballs/StarsmokeMetaball.cs
@@ -1,12 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using CalamityMod.Particles;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using Terraria;
-using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Graphics.Metaballs
@@ -80,7 +79,7 @@ namespace CalamityMod.Graphics.Metaballs
}
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeNPCs;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.BeforeNPCs;
public override void Load()
{
if (Main.dedServ)
diff --git a/Graphics/Metaballs/StreamGougeMetaball.cs b/Graphics/Metaballs/StreamGougeMetaball.cs
index 0f31626192..d13ebc9af9 100644
--- a/Graphics/Metaballs/StreamGougeMetaball.cs
+++ b/Graphics/Metaballs/StreamGougeMetaball.cs
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using System.Linq;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using Terraria;
-using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Graphics.Metaballs
@@ -56,7 +56,7 @@ namespace CalamityMod.Graphics.Metaballs
}
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.AfterProjectiles;
public override Color EdgeColor => Color.Lerp(Color.DarkBlue, Color.Black, 0.75f);
diff --git a/Graphics/Metaballs/VoidGeneratorMetaball.cs b/Graphics/Metaballs/VoidGeneratorMetaball.cs
index 69029411f3..a21754f651 100644
--- a/Graphics/Metaballs/VoidGeneratorMetaball.cs
+++ b/Graphics/Metaballs/VoidGeneratorMetaball.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -26,7 +27,7 @@ namespace CalamityMod.Graphics.Metaballs
}
}
- public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeProjectiles;
+ public override GeneralDrawLayer DrawLayer => GeneralDrawLayer.BeforeProjectiles;
public override Color EdgeColor => Color.Lerp(Color.Purple, Color.Black, 0.75f);
diff --git a/Graphics/Primitives/IPixelatedPrimitiveRenderer.cs b/Graphics/Primitives/IPixelatedPrimitiveRenderer.cs
index 14edbcb506..f40c983f56 100644
--- a/Graphics/Primitives/IPixelatedPrimitiveRenderer.cs
+++ b/Graphics/Primitives/IPixelatedPrimitiveRenderer.cs
@@ -1,4 +1,5 @@
-using Microsoft.Xna.Framework.Graphics;
+using CalamityMod.Enums;
+using Microsoft.Xna.Framework.Graphics;
namespace CalamityMod.Graphics.Primitives
{
@@ -10,11 +11,11 @@ namespace CalamityMod.Graphics.Primitives
///
/// The layer to render the primitive(s) to.
///
- PixelationPrimitiveLayer LayerToRenderTo => PixelationPrimitiveLayer.BeforeProjectiles;
+ GeneralDrawLayer LayerToRenderTo => GeneralDrawLayer.BeforeProjectiles;
///
/// Render primitives that use pixelation here.
///
- void RenderPixelatedPrimitives(SpriteBatch spriteBatch, PixelationPrimitiveLayer layer);
+ void RenderPixelatedPrimitives(SpriteBatch spriteBatch, GeneralDrawLayer layer);
}
}
diff --git a/Graphics/Primitives/PixelationPrimitiveLayer.cs b/Graphics/Primitives/PixelationPrimitiveLayer.cs
deleted file mode 100644
index 4f05c51ef2..0000000000
--- a/Graphics/Primitives/PixelationPrimitiveLayer.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-
-namespace CalamityMod.Graphics.Primitives
-{
- ///
- /// Controls what layer the renders to.
- ///
- [Flags]
- public enum PixelationPrimitiveLayer
- {
- BeforeNPCs = 1,
- AfterNPCs = 2,
- BeforeProjectiles = 4,
- AfterProjectiles = 8,
- AfterPlayers = 16
- }
-}
diff --git a/Graphics/Primitives/PrimitivePixelationSystem.cs b/Graphics/Primitives/PrimitivePixelationSystem.cs
index 4d2bc635de..36a0e186b8 100644
--- a/Graphics/Primitives/PrimitivePixelationSystem.cs
+++ b/Graphics/Primitives/PrimitivePixelationSystem.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -10,6 +11,10 @@ namespace CalamityMod.Graphics.Primitives
public class PrimitivePixelationSystem : ModSystem
{
#region Fields/Properties
+ private static ManagedRenderTarget PixelationTarget_BeforeAllTiles;
+
+ private static ManagedRenderTarget PixelationTarget_BeforeSolidTiles;
+
private static ManagedRenderTarget PixelationTarget_BeforeNPCs;
private static ManagedRenderTarget PixelationTarget_AfterNPCs;
@@ -20,6 +25,10 @@ namespace CalamityMod.Graphics.Primitives
private static ManagedRenderTarget PixelationTarget_AfterPlayers;
+ private static ManagedRenderTarget PixelationTarget_AfterDusts;
+
+ private static ManagedRenderTarget PixelationTarget_AfterEverything;
+
private static RenderTarget2D CreatePixelTarget(int width, int height) => new(Main.instance.GraphicsDevice, width / 2, height / 2);
///
@@ -35,22 +44,38 @@ namespace CalamityMod.Graphics.Primitives
#region Loading
public override void Load()
{
- On_Main.CheckMonoliths += DrawToTargets;
- On_Main.DoDraw_DrawNPCsOverTiles += DrawTarget_NPCs;
- On_Main.DrawProjectiles += DrawTarget_Projectiles;
- On_Main.DrawPlayers_AfterProjectiles += DrawTarget_Players;
+ if (Main.dedServ)
+ return;
- PixelationTarget_BeforeNPCs = new(true, CreatePixelTarget);
- PixelationTarget_AfterNPCs = new(true, CreatePixelTarget);
- PixelationTarget_BeforeProjectiles = new(true, CreatePixelTarget);
- PixelationTarget_AfterProjectiles = new(true, CreatePixelTarget);
- PixelationTarget_AfterPlayers = new(true, CreatePixelTarget);
+ Main.QueueMainThreadAction(() =>
+ {
+ PixelationTarget_BeforeAllTiles = new(true, CreatePixelTarget);
+ PixelationTarget_BeforeSolidTiles = new(true, CreatePixelTarget);
+ PixelationTarget_BeforeNPCs = new(true, CreatePixelTarget);
+ PixelationTarget_AfterNPCs = new(true, CreatePixelTarget);
+ PixelationTarget_BeforeProjectiles = new(true, CreatePixelTarget);
+ PixelationTarget_AfterProjectiles = new(true, CreatePixelTarget);
+ PixelationTarget_AfterPlayers = new(true, CreatePixelTarget);
+ PixelationTarget_AfterDusts = new(true, CreatePixelTarget);
+ PixelationTarget_AfterEverything = new(true, CreatePixelTarget);
+ });
+
+ On_Main.CheckMonoliths += DrawToTargets;
+ //On_Main.DrawBackgroundBlackFill += DrawTarget_BeforeAllTiles;
+ //On_Main.DoDraw_Tiles_Solid += DrawTarget_BeforeSolidTiles;
+ //On_Main.DoDraw_DrawNPCsOverTiles += DrawTarget_NPCs;
+ //On_Main.DrawProjectiles += DrawTarget_Projectiles;
+ //On_Main.DrawPlayers_AfterProjectiles += DrawTarget_Players;
+ //On_Main.DrawDust += DrawTarget_AfterDusts;
+ //On_Main.DrawInfernoRings += DrawTarget_AfterEverything;
}
public override void Unload()
{
+ if (Main.dedServ)
+ return;
+
On_Main.CheckMonoliths -= DrawToTargets;
- On_Main.DoDraw_DrawNPCsOverTiles -= DrawTarget_NPCs;
}
#endregion
@@ -63,11 +88,15 @@ namespace CalamityMod.Graphics.Primitives
return;
}
+ var beforeAllTiles = new List();
+ var beforeSolidTiles = new List();
var beforeNPCs = new List();
var afterNPCs = new List();
var beforeProjectiles = new List();
var afterProjectiles = new List();
var afterPlayers = new List();
+ var afterDusts = new List();
+ var afterEverything = new List();
// Check every active projectile.
foreach (Projectile projectile in Main.ActiveProjectiles)
@@ -75,14 +104,24 @@ namespace CalamityMod.Graphics.Primitives
// If the projectile is active, a mod projectile, and uses the interface, add it to the list of primitives to draw this frame.
if (projectile.ModProjectile != null && projectile.ModProjectile is IPixelatedPrimitiveRenderer pixelPrimitiveProjectile)
{
- if (pixelPrimitiveProjectile.LayerToRenderTo.HasFlag(PixelationPrimitiveLayer.BeforeNPCs))
+ if (pixelPrimitiveProjectile.LayerToRenderTo.HasFlag(GeneralDrawLayer.BeforeAllTiles))
+ beforeAllTiles.Add(pixelPrimitiveProjectile);
+ if (pixelPrimitiveProjectile.LayerToRenderTo.HasFlag(GeneralDrawLayer.BeforeSolidTiles))
+ beforeSolidTiles.Add(pixelPrimitiveProjectile);
+ if (pixelPrimitiveProjectile.LayerToRenderTo.HasFlag(GeneralDrawLayer.BeforeNPCs))
beforeNPCs.Add(pixelPrimitiveProjectile);
- if (pixelPrimitiveProjectile.LayerToRenderTo.HasFlag(PixelationPrimitiveLayer.AfterNPCs))
+ if (pixelPrimitiveProjectile.LayerToRenderTo.HasFlag(GeneralDrawLayer.AfterNPCs))
afterNPCs.Add(pixelPrimitiveProjectile);
- if (pixelPrimitiveProjectile.LayerToRenderTo.HasFlag(PixelationPrimitiveLayer.BeforeProjectiles))
+ if (pixelPrimitiveProjectile.LayerToRenderTo.HasFlag(GeneralDrawLayer.BeforeProjectiles))
beforeProjectiles.Add(pixelPrimitiveProjectile);
- if (pixelPrimitiveProjectile.LayerToRenderTo.HasFlag(PixelationPrimitiveLayer.AfterPlayers))
+ if (pixelPrimitiveProjectile.LayerToRenderTo.HasFlag(GeneralDrawLayer.AfterProjectiles))
+ afterProjectiles.Add(pixelPrimitiveProjectile);
+ if (pixelPrimitiveProjectile.LayerToRenderTo.HasFlag(GeneralDrawLayer.AfterPlayers))
afterPlayers.Add(pixelPrimitiveProjectile);
+ if (pixelPrimitiveProjectile.LayerToRenderTo.HasFlag(GeneralDrawLayer.AfterDusts))
+ afterDusts.Add(pixelPrimitiveProjectile);
+ if (pixelPrimitiveProjectile.LayerToRenderTo.HasFlag(GeneralDrawLayer.AfterEverything))
+ afterEverything.Add(pixelPrimitiveProjectile);
}
}
@@ -92,24 +131,38 @@ namespace CalamityMod.Graphics.Primitives
// If the NPC is active, a mod NPC, and uses the interface, add it to the list of primitives to draw this frame.
if (npc.ModNPC != null && npc.ModNPC is IPixelatedPrimitiveRenderer pixelPrimitiveNPC)
{
- if (pixelPrimitiveNPC.LayerToRenderTo.HasFlag(PixelationPrimitiveLayer.BeforeNPCs))
+ if (pixelPrimitiveNPC.LayerToRenderTo.HasFlag(GeneralDrawLayer.BeforeAllTiles))
+ beforeAllTiles.Add(pixelPrimitiveNPC);
+ if (pixelPrimitiveNPC.LayerToRenderTo.HasFlag(GeneralDrawLayer.BeforeSolidTiles))
+ beforeSolidTiles.Add(pixelPrimitiveNPC);
+ if (pixelPrimitiveNPC.LayerToRenderTo.HasFlag(GeneralDrawLayer.BeforeNPCs))
beforeNPCs.Add(pixelPrimitiveNPC);
- if (pixelPrimitiveNPC.LayerToRenderTo.HasFlag(PixelationPrimitiveLayer.AfterNPCs))
+ if (pixelPrimitiveNPC.LayerToRenderTo.HasFlag(GeneralDrawLayer.AfterNPCs))
afterNPCs.Add(pixelPrimitiveNPC);
- if (pixelPrimitiveNPC.LayerToRenderTo.HasFlag(PixelationPrimitiveLayer.BeforeProjectiles))
+ if (pixelPrimitiveNPC.LayerToRenderTo.HasFlag(GeneralDrawLayer.BeforeProjectiles))
beforeProjectiles.Add(pixelPrimitiveNPC);
- if (pixelPrimitiveNPC.LayerToRenderTo.HasFlag(PixelationPrimitiveLayer.AfterPlayers))
+ if (pixelPrimitiveNPC.LayerToRenderTo.HasFlag(GeneralDrawLayer.AfterProjectiles))
+ afterProjectiles.Add(pixelPrimitiveNPC);
+ if (pixelPrimitiveNPC.LayerToRenderTo.HasFlag(GeneralDrawLayer.AfterPlayers))
afterPlayers.Add(pixelPrimitiveNPC);
+ if (pixelPrimitiveNPC.LayerToRenderTo.HasFlag(GeneralDrawLayer.AfterDusts))
+ afterDusts.Add(pixelPrimitiveNPC);
+ if (pixelPrimitiveNPC.LayerToRenderTo.HasFlag(GeneralDrawLayer.AfterEverything))
+ afterEverything.Add(pixelPrimitiveNPC);
}
}
CurrentlyRendering = true;
- DrawPrimsToRenderTarget(PixelationTarget_BeforeNPCs, PixelationPrimitiveLayer.BeforeNPCs, beforeNPCs);
- DrawPrimsToRenderTarget(PixelationTarget_AfterNPCs, PixelationPrimitiveLayer.AfterNPCs, afterNPCs);
- DrawPrimsToRenderTarget(PixelationTarget_BeforeProjectiles, PixelationPrimitiveLayer.BeforeProjectiles, beforeProjectiles);
- DrawPrimsToRenderTarget(PixelationTarget_AfterProjectiles, PixelationPrimitiveLayer.AfterProjectiles, afterProjectiles);
- DrawPrimsToRenderTarget(PixelationTarget_AfterPlayers, PixelationPrimitiveLayer.AfterPlayers, afterPlayers);
+ DrawPrimsToRenderTarget(PixelationTarget_BeforeAllTiles, GeneralDrawLayer.BeforeAllTiles, beforeAllTiles);
+ DrawPrimsToRenderTarget(PixelationTarget_BeforeSolidTiles, GeneralDrawLayer.BeforeSolidTiles, beforeSolidTiles);
+ DrawPrimsToRenderTarget(PixelationTarget_BeforeNPCs, GeneralDrawLayer.BeforeNPCs, beforeNPCs);
+ DrawPrimsToRenderTarget(PixelationTarget_AfterNPCs, GeneralDrawLayer.AfterNPCs, afterNPCs);
+ DrawPrimsToRenderTarget(PixelationTarget_BeforeProjectiles, GeneralDrawLayer.BeforeProjectiles, beforeProjectiles);
+ DrawPrimsToRenderTarget(PixelationTarget_AfterProjectiles, GeneralDrawLayer.AfterProjectiles, afterProjectiles);
+ DrawPrimsToRenderTarget(PixelationTarget_AfterPlayers, GeneralDrawLayer.AfterPlayers, afterPlayers);
+ DrawPrimsToRenderTarget(PixelationTarget_AfterDusts, GeneralDrawLayer.AfterDusts, afterDusts);
+ DrawPrimsToRenderTarget(PixelationTarget_AfterEverything, GeneralDrawLayer.AfterEverything, afterEverything);
Main.instance.GraphicsDevice.SetRenderTarget(null);
@@ -117,7 +170,7 @@ namespace CalamityMod.Graphics.Primitives
orig();
}
- private static void DrawPrimsToRenderTarget(RenderTarget2D renderTarget, PixelationPrimitiveLayer layer, List pixelPrimitives)
+ private static void DrawPrimsToRenderTarget(RenderTarget2D renderTarget, GeneralDrawLayer layer, List pixelPrimitives)
{
// Swap to the target regardless, in order to clear any leftover content from last frame. Not doing this results in the final frame lingering once it stops rendering.
renderTarget.SwapTo();
@@ -135,31 +188,31 @@ namespace CalamityMod.Graphics.Primitives
#endregion
#region Target Drawing
- private void DrawTarget_NPCs(On_Main.orig_DoDraw_DrawNPCsOverTiles orig, Main self)
+ internal static void DrawTargetScaled(GeneralDrawLayer drawLayer, bool startSpritebatch = true)
{
- DrawTargetScaled(PixelationTarget_BeforeNPCs);
- orig(self);
- DrawTargetScaled(PixelationTarget_AfterNPCs);
+ if (startSpritebatch)
+ Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
+
+ Main.spriteBatch.Draw(ReturnAssociatedRenderTarget(drawLayer), Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f);
+
+ if (startSpritebatch)
+ Main.spriteBatch.End();
}
- private void DrawTarget_Projectiles(On_Main.orig_DrawProjectiles orig, Main self)
+ private static RenderTarget2D ReturnAssociatedRenderTarget(GeneralDrawLayer drawLayer)
{
- DrawTargetScaled(PixelationTarget_BeforeProjectiles);
- orig(self);
- DrawTargetScaled(PixelationTarget_AfterProjectiles);
- }
-
- private void DrawTarget_Players(On_Main.orig_DrawPlayers_AfterProjectiles orig, Main self)
- {
- orig(self);
- DrawTargetScaled(PixelationTarget_AfterPlayers);
- }
-
- private static void DrawTargetScaled(ManagedRenderTarget target)
- {
- Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
- Main.spriteBatch.Draw(target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f);
- Main.spriteBatch.End();
+ return drawLayer switch
+ {
+ GeneralDrawLayer.BeforeAllTiles => PixelationTarget_BeforeAllTiles,
+ GeneralDrawLayer.BeforeSolidTiles => PixelationTarget_BeforeSolidTiles,
+ GeneralDrawLayer.BeforeNPCs => PixelationTarget_BeforeNPCs,
+ GeneralDrawLayer.AfterNPCs => PixelationTarget_AfterNPCs,
+ GeneralDrawLayer.BeforeProjectiles => PixelationTarget_BeforeProjectiles,
+ GeneralDrawLayer.AfterProjectiles => PixelationTarget_AfterProjectiles,
+ GeneralDrawLayer.AfterPlayers => PixelationTarget_AfterPlayers,
+ GeneralDrawLayer.AfterDusts => PixelationTarget_AfterDusts,
+ _ => PixelationTarget_AfterEverything
+ };
}
#endregion
}
diff --git a/Graphics/Primitives/PrimitiveRenderer.cs b/Graphics/Primitives/PrimitiveRenderer.cs
index 2fcc1b9acf..84e3d9ca65 100644
--- a/Graphics/Primitives/PrimitiveRenderer.cs
+++ b/Graphics/Primitives/PrimitiveRenderer.cs
@@ -18,7 +18,7 @@ namespace CalamityMod.Graphics.Primitives
/// - The third controls how many points are created for the trail, and the fourth determines whether the primitive is subsequently rendered.
///
/// If you wish to use pixelation, you MUST make the NPC/Projectile inherit and use instead of predraw..
- /// You can also optionally specify a render layer with . It is by default.
+ /// You can also optionally specify a render layer with . It is by default.
///
[Autoload(Side = ModSide.Client)]
public sealed class PrimitiveRenderer : ModSystem
diff --git a/Graphics/Renderers/BaseRenderer.cs b/Graphics/Renderers/BaseRenderer.cs
index 8cdfa0ae6d..cb1e3dc5a8 100644
--- a/Graphics/Renderers/BaseRenderer.cs
+++ b/Graphics/Renderers/BaseRenderer.cs
@@ -1,4 +1,5 @@
using System;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria.ModLoader;
@@ -14,7 +15,7 @@ namespace CalamityMod.Graphics.Renderers
///
/// The layer that the target should be drawn at.
///
- public abstract DrawLayer Layer { get; }
+ public abstract GeneralDrawLayer Layer { get; }
///
/// Whether the target should draw and be drawn to this frame.
diff --git a/Graphics/Renderers/CalamityRenderers/DeerclopsShadowRenderer.cs b/Graphics/Renderers/CalamityRenderers/DeerclopsShadowRenderer.cs
index ac4203ca1b..8c2f927e08 100644
--- a/Graphics/Renderers/CalamityRenderers/DeerclopsShadowRenderer.cs
+++ b/Graphics/Renderers/CalamityRenderers/DeerclopsShadowRenderer.cs
@@ -1,4 +1,5 @@
-using CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses;
+using CalamityMod.Enums;
+using CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -11,7 +12,7 @@ namespace CalamityMod.Graphics.Renderers.CalamityRenderers
{
#region Fields/Properties
- public override DrawLayer Layer => DrawLayer.AfterEverything;
+ public override GeneralDrawLayer Layer => GeneralDrawLayer.AfterEverything;
public static NPC Deerclops => Main.npc[NPC.deerclopsBoss];
diff --git a/Graphics/Renderers/CalamityRenderers/DoGDeathAnimationRenderer.cs b/Graphics/Renderers/CalamityRenderers/DoGDeathAnimationRenderer.cs
index a00c083af6..fab7fc3d6f 100644
--- a/Graphics/Renderers/CalamityRenderers/DoGDeathAnimationRenderer.cs
+++ b/Graphics/Renderers/CalamityRenderers/DoGDeathAnimationRenderer.cs
@@ -1,4 +1,5 @@
-using CalamityMod.NPCs;
+using CalamityMod.Enums;
+using CalamityMod.NPCs;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -18,7 +19,7 @@ namespace CalamityMod.Graphics.Renderers.CalamityRenderers
private set;
}
- public override DrawLayer Layer => DrawLayer.NPC;
+ public override GeneralDrawLayer Layer => GeneralDrawLayer.AfterNPCs;
public override bool ShouldDraw => !Main.gameMenu && CalamityDrawParameterNPC.DoGDeathAnimationTimer > 0;
diff --git a/Graphics/Renderers/CalamityRenderers/DyeableShadersRenderer.cs b/Graphics/Renderers/CalamityRenderers/DyeableShadersRenderer.cs
index 3b4b977c61..1e4c5f474e 100644
--- a/Graphics/Renderers/CalamityRenderers/DyeableShadersRenderer.cs
+++ b/Graphics/Renderers/CalamityRenderers/DyeableShadersRenderer.cs
@@ -3,6 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using CalamityMod.DataStructures;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -28,7 +29,7 @@ namespace CalamityMod.Graphics.Renderers.CalamityRenderers
private static List RenderersToDrawThisFrame;
- public override DrawLayer Layer => DrawLayer.Player;
+ public override GeneralDrawLayer Layer => GeneralDrawLayer.AfterPlayers;
// This ignores MainTarget, and handles its own targets, so always call the draw methods.
public override bool ShouldDraw => true;
diff --git a/Graphics/Renderers/CalamityRenderers/HolyInfernoRenderer.cs b/Graphics/Renderers/CalamityRenderers/HolyInfernoRenderer.cs
index 409ff05a3e..6599c20f89 100644
--- a/Graphics/Renderers/CalamityRenderers/HolyInfernoRenderer.cs
+++ b/Graphics/Renderers/CalamityRenderers/HolyInfernoRenderer.cs
@@ -1,4 +1,5 @@
-using CalamityMod.NPCs;
+using CalamityMod.Enums;
+using CalamityMod.NPCs;
using CalamityMod.NPCs.Providence;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@@ -13,7 +14,7 @@ namespace CalamityMod.Graphics.Renderers.CalamityRenderers
{
#region Fields/Properties
- public override DrawLayer Layer => DrawLayer.BeforeTiles;
+ public override GeneralDrawLayer Layer => GeneralDrawLayer.BeforeAllTiles;
public static Providence Provi
{
diff --git a/Graphics/Renderers/CalamityRenderers/MiracleBlightRenderer.cs b/Graphics/Renderers/CalamityRenderers/MiracleBlightRenderer.cs
index 98871deb15..95ef112087 100644
--- a/Graphics/Renderers/CalamityRenderers/MiracleBlightRenderer.cs
+++ b/Graphics/Renderers/CalamityRenderers/MiracleBlightRenderer.cs
@@ -1,4 +1,5 @@
using System.Collections.Generic;
+using CalamityMod.Enums;
using CalamityMod.NPCs;
using CalamityMod.NPCs.ExoMechs.Ares;
using Microsoft.Xna.Framework;
@@ -42,7 +43,7 @@ namespace CalamityMod.Graphics.Renderers.CalamityRenderers
private set;
}
- public override DrawLayer Layer => DrawLayer.NPC;
+ public override GeneralDrawLayer Layer => GeneralDrawLayer.AfterNPCs;
// Unsure whether its more performant to always draw, or to check if any NPC actually has the debuff.
public override bool ShouldDraw => true;
diff --git a/Graphics/Renderers/RendererManager.cs b/Graphics/Renderers/RendererManager.cs
index a4b0132ce1..338feab7b0 100644
--- a/Graphics/Renderers/RendererManager.cs
+++ b/Graphics/Renderers/RendererManager.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
+using CalamityMod.Enums;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -24,16 +25,8 @@ namespace CalamityMod.Graphics.Renderers
if (Main.dedServ)
return;
- Main.QueueMainThreadAction(() =>
- {
- // This hooks here, because doing it any sooner causes the screen position to be a frame behind.
- On_Main.CheckMonoliths += DrawToTargets;
- On_Main.DrawNPCs += DrawNPCRenderers;
- On_Main.DrawProjectiles += DrawProjectileRenderers;
- On_Main.DrawPlayers_AfterProjectiles += DrawPlayerRenderers;
- On_Main.DrawBackgroundBlackFill += DrawBeforeTileRenderers;
- On_Main.DrawInfernoRings += DrawAfterEverythingRenderers;
- });
+ // This hooks here, because doing it any sooner causes the screen position to be a frame behind.
+ Main.QueueMainThreadAction(() => On_Main.CheckMonoliths += DrawToTargets);
}
public override void Unload()
@@ -43,24 +36,13 @@ namespace CalamityMod.Graphics.Renderers
// Clear the cached renderers, so they can be readded on mod loading when initialized.
Renderers.Clear();
-
- Main.QueueMainThreadAction(() =>
- {
- // Supposed to be auto-unloaded, but considering TMods poor track record with actually doing this, manually unload them.
- On_Main.CheckMonoliths -= DrawToTargets;
- On_Main.DrawNPCs -= DrawNPCRenderers;
- On_Main.DrawProjectiles -= DrawProjectileRenderers;
- On_Main.DrawPlayers_AfterProjectiles -= DrawPlayerRenderers;
- On_Main.DrawBackgroundBlackFill -= DrawBeforeTileRenderers;
- On_Main.DrawInfernoRings -= DrawAfterEverythingRenderers;
- });
}
#endregion
#region Updating
public override void PreUpdateEntities()
{
- if (Main.netMode is NetmodeID.Server)
+ if (Main.dedServ)
return;
foreach (var renderer in Renderers)
@@ -69,7 +51,7 @@ namespace CalamityMod.Graphics.Renderers
public override void PostUpdateEverything()
{
- if (Main.netMode is NetmodeID.Server)
+ if (Main.dedServ)
return;
foreach (var renderer in Renderers)
@@ -78,6 +60,17 @@ namespace CalamityMod.Graphics.Renderers
#endregion
#region Drawing
+ internal static void DrawRendererAtLayer(GeneralDrawLayer drawLayer)
+ {
+ Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, RasterizerState.CullCounterClockwise);
+
+ var renderers = Renderers.Where(renderer => renderer.ShouldDraw && renderer.Layer == drawLayer);
+ foreach (var renderer in renderers)
+ renderer.DrawTarget(Main.spriteBatch);
+
+ Main.spriteBatch.End();
+ }
+
private void DrawToTargets(On_Main.orig_CheckMonoliths orig)
{
orig();
@@ -106,82 +99,6 @@ namespace CalamityMod.Graphics.Renderers
Main.instance.GraphicsDevice.SetRenderTarget(null);
}
-
- private void DrawNPCRenderers(On_Main.orig_DrawNPCs orig, Main self, bool behindTiles)
- {
- orig(self, behindTiles);
-
- if (behindTiles)
- return;
-
- var renderers = Renderers.Where(renderer => renderer.ShouldDraw && renderer.Layer is DrawLayer.NPC);
-
- Main.spriteBatch.End();
- Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, RasterizerState.CullCounterClockwise);
-
- foreach (var renderer in renderers)
- renderer.DrawTarget(Main.spriteBatch);
-
- Main.spriteBatch.ExitShaderRegion();
- }
-
- private void DrawProjectileRenderers(On_Main.orig_DrawProjectiles orig, Main self)
- {
- orig(self);
-
- var renderers = Renderers.Where(renderer => renderer.ShouldDraw && renderer.Layer is DrawLayer.Projectile);
-
- Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, RasterizerState.CullCounterClockwise);
-
- foreach (var renderer in renderers)
- renderer.DrawTarget(Main.spriteBatch);
-
- Main.spriteBatch.End();
- }
-
- private void DrawPlayerRenderers(On_Main.orig_DrawPlayers_AfterProjectiles orig, Main self)
- {
- orig(self);
-
- var renderers = Renderers.Where(renderer => renderer.ShouldDraw && renderer.Layer is DrawLayer.Player);
-
- Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, RasterizerState.CullCounterClockwise);
-
- foreach (var renderer in renderers)
- renderer.DrawTarget(Main.spriteBatch);
-
- Main.spriteBatch.End();
- }
-
- private void DrawBeforeTileRenderers(On_Main.orig_DrawBackgroundBlackFill orig, Main self)
- {
- var renderers = Renderers.Where(renderer => renderer.ShouldDraw && renderer.Layer is DrawLayer.BeforeTiles);
-
- Main.spriteBatch.End();
- Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, RasterizerState.CullCounterClockwise);
-
- foreach (var renderer in renderers)
- renderer.DrawTarget(Main.spriteBatch);
-
- Main.spriteBatch.End();
- Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, RasterizerState.CullCounterClockwise, null, Main.Transform);
-
- orig(self);
- }
-
- private void DrawAfterEverythingRenderers(On_Main.orig_DrawInfernoRings orig, Main self)
- {
- var renderers = Renderers.Where(renderer => renderer.ShouldDraw && renderer.Layer is DrawLayer.AfterEverything);
-
- Main.spriteBatch.End();
- Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, RasterizerState.CullCounterClockwise);
- foreach (var renderer in renderers)
- renderer.DrawTarget(Main.spriteBatch);
-
- Main.spriteBatch.End();
- Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, RasterizerState.CullCounterClockwise, null, Main.Transform);
- orig(self);
- }
#endregion
}
}
diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs
index 3da313883e..80315b5772 100644
--- a/ILEditing/ILChangesLoading.cs
+++ b/ILEditing/ILChangesLoading.cs
@@ -43,7 +43,6 @@ namespace CalamityMod.ILEditing
IL_Main.DoDraw += CustomDoDrawChanges;
On_Main.DrawCursor += UseCoolFireCursorEffect;
On_Main.SortDrawCacheWorms += DrawFusableParticles;
- On_Main.DrawInfernoRings += DrawForegroundParticles;
On_TileDrawing.Draw += ClearTilePings;
On_CommonCode.ModifyItemDropFromNPC += ColorBlightedGel;
On_MoonlordDeathDrama.RequestLight += DisableFlashesWithPhotosensitivityConfig;
@@ -59,6 +58,15 @@ namespace CalamityMod.ILEditing
IL_TileDrawing.DrawTrees += DrawTreeGlowMask;
On_TileDrawing.DrawBasicTile += DrawTreeTrunkAndCactusGlowMask;
+ // Graphics (GeneralDrawLayer detours)
+ On_Main.DrawBackgroundBlackFill += GeneralDrawLayer_DrawToLayer_BeforeAllTiles;
+ On_Main.DoDraw_Tiles_Solid += GeneralDrawLayer_DrawToLayer_BeforeSolidTiles;
+ On_Main.DoDraw_DrawNPCsOverTiles += GeneralDrawLayer_DrawToLayer_NPCs;
+ On_Main.DrawProjectiles += GeneralDrawLayer_DrawToLayer_Projectiles;
+ On_Main.DrawPlayers_AfterProjectiles += GeneralDrawLayer_DrawToLayer_AfterPlayers;
+ On_Main.DrawDust += GeneralDrawLayer_DrawToLayer_AfterDusts;
+ On_Main.DrawInfernoRings += GeneralDrawLayer_DrawToLayer_AfterEverything;
+
// NPC behavior
IL_Main.UpdateTime += PermitNighttimeTownNPCSpawning;
On_Main.UpdateTime_SpawnTownNPCs += AlterTownNPCSpawnRate;
@@ -87,7 +95,6 @@ namespace CalamityMod.ILEditing
On_Item.GetShimmered += ShimmerEffectEdits;
On_Player.Teleport += TPOverride;
On_TileDrawing.DrawSingleTile += GlowMaskTileRender;
- On_Main.DoUpdate_HandleChat += SpawnPunchCard;
On_Player.PlaceThing_CannonBall += AllowCannonJellyfishUse;
On_Player.ItemCheck_ReleaseCritter += ReleaseCritterVariant;
On_Player.IsItemSlotUnlockedAndUsable += MasterModeCelestialOnionCheck;
diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs
index 480634bd66..aa38dfed86 100644
--- a/ILEditing/MechanicILChanges.cs
+++ b/ILEditing/MechanicILChanges.cs
@@ -8,6 +8,9 @@ using CalamityMod.DataStructures;
using CalamityMod.Enums;
using CalamityMod.Events;
using CalamityMod.FluidSimulation;
+using CalamityMod.Graphics.Metaballs;
+using CalamityMod.Graphics.Primitives;
+using CalamityMod.Graphics.Renderers;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Accessories.Vanity;
using CalamityMod.Items.Armor.Wulfrum;
@@ -26,6 +29,7 @@ using CalamityMod.Projectiles;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Systems;
+using CalamityMod.Systems.Graphic.PixelationSystem;
using CalamityMod.Systems.Mechanic;
using CalamityMod.Tiles;
using CalamityMod.Walls;
@@ -73,42 +77,6 @@ namespace CalamityMod.ILEditing
//private static readonly MethodInfo textureGetValueMethod = typeof(Asset).GetMethod("get_Value", BindingFlags.Public | BindingFlags.Instance);
- #region Punch Card Spawning Command
- private static void SpawnPunchCard(On_Main.orig_DoUpdate_HandleChat orig)
- {
- // Any of these conditions should result in normal behaviour
- if (!Main.drawingPlayerChat || Main.CurrentInputTextTakerOverride != null || Main.editSign || PlayerInput.UsingGamepad)
- {
- orig();
- return;
- }
-
- // Allow only one pick up of the card this way per player (also don't give it to dead people)
- Player player = Main.LocalPlayer;
- if (player.Calamity().spawnedPunchCard || player.dead || !player.active)
- {
- orig();
- return;
- }
-
- // Find 2 specific sets of text from the live chat box (as the player is typing)
- // Gives the item to you and abruptly shuts the chat box down if both parts are found
- string text = Main.chatText.ToLower();
- string prefix = "Items.Accessories.PunchCard.SpawnText";
- if ((text.Contains(CalamityUtils.GetTextValue($"{prefix}1")) || text.Contains(CalamityUtils.GetTextValue($"{prefix}1Alt"))) && text.Contains(CalamityUtils.GetTextValue($"{prefix}2")))
- {
- player.QuickSpawnItem(Player.GetSource_None(), ModContent.ItemType(), 1);
- player.Calamity().spawnedPunchCard = true;
- Main.chatText = "";
- Main.ClosePlayerChat();
- Main.chatRelease = false;
- SoundEngine.PlaySound(SoundID.MenuClose);
- return;
- }
- orig();
- }
- #endregion
-
#region Dash Fixes and Improvements
private static void MakeShieldSlamIFramesConsistent(ILContext il)
{
@@ -908,6 +876,82 @@ namespace CalamityMod.ILEditing
}
#endregion
+ #region GeneralDrawLayer Systems Drawing
+ private static void GeneralDrawLayer_DrawForSupportedSystems(GeneralDrawLayer drawLayer)
+ {
+ Main.spriteBatch.SafeAction(() =>
+ {
+ Main.spriteBatch.TryEnd();
+ GeneralParticleHandler.DrawParticleCollectionsAtSpecificLayer(drawLayer);
+ });
+
+ Main.spriteBatch.SafeAction(() =>
+ {
+ Main.spriteBatch.TryEnd();
+ Main.spriteBatch.TryBegin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
+ MetaballManager.DrawMetaballs(drawLayer);
+ });
+
+ Main.spriteBatch.SafeAction(() =>
+ {
+ Main.spriteBatch.TryEnd();
+ PrimitivePixelationSystem.DrawTargetScaled(drawLayer);
+ });
+
+ PixelationManager.DrawPixelatedTargets(drawLayer);
+
+ Main.spriteBatch.SafeAction(() =>
+ {
+ Main.spriteBatch.TryEnd();
+ RendererManager.DrawRendererAtLayer(drawLayer);
+ });
+ }
+
+ private static void GeneralDrawLayer_DrawToLayer_BeforeAllTiles(On_Main.orig_DrawBackgroundBlackFill orig, Main self)
+ {
+ GeneralDrawLayer_DrawForSupportedSystems(GeneralDrawLayer.BeforeAllTiles);
+ orig(self);
+ }
+
+ private static void GeneralDrawLayer_DrawToLayer_BeforeSolidTiles(On_Main.orig_DoDraw_Tiles_Solid orig, Main self)
+ {
+ GeneralDrawLayer_DrawForSupportedSystems(GeneralDrawLayer.BeforeSolidTiles);
+ orig(self);
+ }
+
+ private static void GeneralDrawLayer_DrawToLayer_NPCs(On_Main.orig_DoDraw_DrawNPCsOverTiles orig, Main self)
+ {
+ GeneralDrawLayer_DrawForSupportedSystems(GeneralDrawLayer.BeforeNPCs);
+ orig(self);
+ GeneralDrawLayer_DrawForSupportedSystems(GeneralDrawLayer.AfterNPCs);
+ }
+
+ private static void GeneralDrawLayer_DrawToLayer_Projectiles(On_Main.orig_DrawProjectiles orig, Main self)
+ {
+ GeneralDrawLayer_DrawForSupportedSystems(GeneralDrawLayer.BeforeProjectiles);
+ orig(self);
+ GeneralDrawLayer_DrawForSupportedSystems(GeneralDrawLayer.AfterProjectiles);
+ }
+
+ private static void GeneralDrawLayer_DrawToLayer_AfterPlayers(On_Main.orig_DrawPlayers_AfterProjectiles orig, Main self)
+ {
+ orig(self);
+ GeneralDrawLayer_DrawForSupportedSystems(GeneralDrawLayer.AfterPlayers);
+ }
+
+ private static void GeneralDrawLayer_DrawToLayer_AfterDusts(On_Main.orig_DrawDust orig, Main self)
+ {
+ orig(self);
+ GeneralDrawLayer_DrawForSupportedSystems(GeneralDrawLayer.AfterDusts);
+ }
+
+ private static void GeneralDrawLayer_DrawToLayer_AfterEverything(On_Main.orig_DrawInfernoRings orig, Main self)
+ {
+ orig(self);
+ GeneralDrawLayer_DrawForSupportedSystems(GeneralDrawLayer.AfterEverything);
+ }
+ #endregion
+
#region General Particle Rendering
private static void DrawFusableParticles(On_Main.orig_SortDrawCacheWorms orig, Main self)
{
@@ -919,11 +963,6 @@ namespace CalamityMod.ILEditing
orig(self);
}
- private static void DrawForegroundParticles(On_Main.orig_DrawInfernoRings orig, Main self)
- {
- GeneralParticleHandler.DrawAllParticles(Main.spriteBatch);
- orig(self);
- }
#endregion
#region Disable Moon Lord Style Flashes With Photosensitivity Config
diff --git a/Items/Accessories/Abaddon.cs b/Items/Accessories/Abaddon.cs
index cf3c780050..6f3dfd0ba5 100644
--- a/Items/Accessories/Abaddon.cs
+++ b/Items/Accessories/Abaddon.cs
@@ -1,5 +1,6 @@
using Terraria;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -9,7 +10,11 @@ namespace CalamityMod.Items.Accessories
{
public new string LocalizationCategory => "Items.Accessories";
+ public static int CritBoost = 8;
+ public static float BrimstoneFlamesReduction = 0.5f;
public static int AbaddonExploDamage = 25;
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(CritBoost, BrimstoneFlamesReduction.ToPercent());
+
public override void SetDefaults()
{
Item.width = 26;
@@ -22,7 +27,7 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.Calamity().abaddon = true;
- player.GetCritChance() += 8;
+ player.GetCritChance() += CritBoost;
}
}
}
diff --git a/Items/Accessories/AbyssalMirror.cs b/Items/Accessories/AbyssalMirror.cs
index 40e9b7a0eb..d3135909f2 100644
--- a/Items/Accessories/AbyssalMirror.cs
+++ b/Items/Accessories/AbyssalMirror.cs
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables;
using Terraria;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -11,6 +12,12 @@ namespace CalamityMod.Items.Accessories
{
public new string LocalizationCategory => "Items.Accessories";
public bool HasFlavorTooltip => true;
+
+ public static int AggroReduction = 450;
+ public static float StandingStealthRegenBoost = 0.25f;
+ public static float MovingStealthRegenBoost = 0.12f;
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(StandingStealthRegenBoost.ToPercent(), MovingStealthRegenBoost.ToPercent());
+
public override void SetDefaults()
{
Item.width = 30;
@@ -23,10 +30,10 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
- modPlayer.stealthGenStandstill += 0.25f;
- modPlayer.stealthGenMoving += 0.12f;
+ modPlayer.stealthGenStandstill += StandingStealthRegenBoost;
+ modPlayer.stealthGenMoving += MovingStealthRegenBoost;
modPlayer.abyssalMirror = true;
- player.aggro -= 450;
+ player.aggro -= AggroReduction;
}
public override void AddRecipes()
diff --git a/Items/Accessories/AeroStone.cs b/Items/Accessories/AeroStone.cs
index 93676815e0..c1a23a6579 100644
--- a/Items/Accessories/AeroStone.cs
+++ b/Items/Accessories/AeroStone.cs
@@ -4,6 +4,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -12,6 +13,9 @@ namespace CalamityMod.Items.Accessories
{
public new string LocalizationCategory => "Items.Accessories";
+ public static int FlightTimeBoostFlat = 50;
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(FlightTimeBoostFlat.FramesToSeconds());
+
public override void SetStaticDefaults()
{
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(4, 8));
@@ -30,7 +34,7 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.Calamity().aeroStone = true;
- player.wingTimeMax += 50;
+ player.wingTimeMax += FlightTimeBoostFlat;
}
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
diff --git a/Items/Accessories/Affliction.cs b/Items/Accessories/Affliction.cs
index be8a8b917a..1a4317f211 100644
--- a/Items/Accessories/Affliction.cs
+++ b/Items/Accessories/Affliction.cs
@@ -5,6 +5,7 @@ using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -12,6 +13,14 @@ namespace CalamityMod.Items.Accessories
public class Affliction : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
+
+ public static int RegenBoost = 1;
+ public static int MaxLifeBoostPercent = 10;
+ public static float DamageReductionBoost = 0.07f;
+ public static int DefenseBoost = 9;
+ public static float DamageBoost = 0.1f;
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RegenBoost.ToRegenPerSecond(), MaxLifeBoostPercent, DamageReductionBoost.ToPercent(), DefenseBoost, DamageBoost.ToPercent());
+
public override void SetDefaults()
{
Item.width = 38;
@@ -19,6 +28,7 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
Item.rare = ModContent.RarityType();
+ Item.expert = true;
}
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
diff --git a/Items/Accessories/AlchemicalFlask.cs b/Items/Accessories/AlchemicalFlask.cs
index aea37c1bf8..15197f8af1 100644
--- a/Items/Accessories/AlchemicalFlask.cs
+++ b/Items/Accessories/AlchemicalFlask.cs
@@ -3,6 +3,7 @@ using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -10,6 +11,10 @@ namespace CalamityMod.Items.Accessories
public class AlchemicalFlask : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
+
+ public static float PlagueReduction = 0.5f;
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(PlagueReduction.ToPercent());
+
public override void SetDefaults()
{
Item.width = 26;
diff --git a/Items/Accessories/AlluringBait.cs b/Items/Accessories/AlluringBait.cs
index 786435906e..d31ed4b4d0 100644
--- a/Items/Accessories/AlluringBait.cs
+++ b/Items/Accessories/AlluringBait.cs
@@ -1,5 +1,6 @@
using Terraria;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -7,6 +8,10 @@ namespace CalamityMod.Items.Accessories
public class AlluringBait : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
+
+ public static int FishingPowerBoost = 10;
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(FishingPowerBoost);
+
public override void SetDefaults()
{
Item.width = 26;
@@ -19,7 +24,7 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.Calamity().alluringBait = true;
- player.fishingSkill += 10;
+ player.fishingSkill += FishingPowerBoost;
}
}
}
diff --git a/Items/Accessories/AmalgamatedBrain.cs b/Items/Accessories/AmalgamatedBrain.cs
index ac6c8b1a82..06edff9d56 100644
--- a/Items/Accessories/AmalgamatedBrain.cs
+++ b/Items/Accessories/AmalgamatedBrain.cs
@@ -4,6 +4,7 @@ using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.Projectiles.Magic;
using Terraria;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -12,7 +13,9 @@ namespace CalamityMod.Items.Accessories
{
public new string LocalizationCategory => "Items.Accessories";
+ public static float DamageBoost = 0.05f;
public static int NimbusDamage => CalamityUtils.ScaleWithDifficulty(18);
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent());
public override void SetDefaults()
{
@@ -21,6 +24,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityLightRedBuyPrice;
Item.rare = ItemRarityID.LightRed;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
@@ -29,7 +33,7 @@ namespace CalamityMod.Items.Accessories
modPlayer.rBrain = true; // Handles shaderain cloud spawning on hit
modPlayer.aBrain = true;
player.brainOfConfusionItem = Item;
- player.GetDamage() += 0.05f;
+ player.GetDamage() += DamageBoost;
}
public override void AddRecipes()
diff --git a/Items/Accessories/AmbrosialAmpoule.cs b/Items/Accessories/AmbrosialAmpoule.cs
index 9036f66442..8cd7145e58 100644
--- a/Items/Accessories/AmbrosialAmpoule.cs
+++ b/Items/Accessories/AmbrosialAmpoule.cs
@@ -4,6 +4,7 @@ using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -11,6 +12,10 @@ namespace CalamityMod.Items.Accessories
public class AmbrosialAmpoule : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
+
+ public static int MaxLifeBoost = 50;
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxLifeBoost, RadiantOoze.MinRegenBoost.ToRegenPerSecond(), RadiantOoze.MaxRegenBoost.ToRegenPerSecond());
+
public override void SetDefaults()
{
Item.width = 20;
@@ -23,7 +28,7 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
- player.statLifeMax2 += 50;
+ player.statLifeMax2 += MaxLifeBoost;
if (!player.HasBuff(BuffID.Honey))
player.AddBuff(BuffID.Honey, 2);
diff --git a/Items/Accessories/AncientFossil.cs b/Items/Accessories/AncientFossil.cs
index 6293e34145..ef73c7adbe 100644
--- a/Items/Accessories/AncientFossil.cs
+++ b/Items/Accessories/AncientFossil.cs
@@ -1,5 +1,6 @@
using Terraria;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -7,6 +8,10 @@ namespace CalamityMod.Items.Accessories
public class AncientFossil : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
+
+ public static float MiningSpeedBoost = 0.1f;
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MiningSpeedBoost.ToPercent());
+
public override void SetDefaults()
{
Item.width = 26;
@@ -18,7 +23,7 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
- player.pickSpeed -= 0.1f;
+ player.pickSpeed -= MiningSpeedBoost;
player.Calamity().aFossil = true;
player.Calamity().fallingBlockProtection = true;
}
diff --git a/Items/Accessories/AngelicAlliance.cs b/Items/Accessories/AngelicAlliance.cs
index e1b1cdfc06..e0cc74a488 100644
--- a/Items/Accessories/AngelicAlliance.cs
+++ b/Items/Accessories/AngelicAlliance.cs
@@ -6,6 +6,7 @@ using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -16,6 +17,18 @@ namespace CalamityMod.Items.Accessories
public new string LocalizationCategory => "Items.Accessories";
public static readonly SoundStyle ActivationSound = new("CalamityMod/Sounds/Custom/AbilitySounds/AngelicAllianceActivation");
+ // This accessory is insane. wtf. - Iris
+ public static int MinionSlotBoost = 2;
+ public static float TotalSummonDamageBoost = 0.15f; // this is partially all-class -- this number represents the whole thing
+ public static float DamageBoost = 0.08f;
+ public static int RegenBoostDuringFlight = 4;
+ public static int DivineBlessDuration = CalamityUtils.SecondsToFrames(15);
+ public static int DivineBlessCooldown = CalamityUtils.SecondsToFrames(60);
+ public static int HealPerAngelSpawned = 2;
+ public static int BanishingFireDuration = CalamityUtils.SecondsToFrames(1);
+ public static int DivineBlessFramesPerHeal = 15;
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinionSlotBoost, TotalSummonDamageBoost.ToPercent(), DamageBoost.ToPercent(), RegenBoostDuringFlight.ToRegenPerSecond(), DivineBlessDuration.FramesToSeconds(), HealPerAngelSpawned, (60 / (float)DivineBlessFramesPerHeal).Round(), (DivineBlessCooldown / 3600f).Round());
+
public override void SetDefaults()
{
Item.width = 56;
@@ -32,11 +45,11 @@ namespace CalamityMod.Items.Accessories
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.angelicAlliance = true;
- player.GetDamage() += 0.08f;
- player.GetDamage() += 0.07f; //7% + 8% = 15%
- player.maxMinions += 2;
+ player.GetDamage() += DamageBoost;
+ player.GetDamage() += TotalSummonDamageBoost - DamageBoost;
+ player.maxMinions += MinionSlotBoost;
if (player.wingTime < player.wingTimeMax)
- player.lifeRegen += 4;
+ player.lifeRegen += RegenBoostDuringFlight;
}
public override void AddRecipes()
diff --git a/Items/Accessories/AquaticEmblem.cs b/Items/Accessories/AquaticEmblem.cs
index 7171d7c9d2..760c5ba1ef 100644
--- a/Items/Accessories/AquaticEmblem.cs
+++ b/Items/Accessories/AquaticEmblem.cs
@@ -1,6 +1,7 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -8,6 +9,12 @@ namespace CalamityMod.Items.Accessories
public class AquaticEmblem : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
+
+ public static int MaxDefenseBoost = 20;
+ public static float MaxMoveSpeedReduction = 0.1f;
+ public static int TimeToReachMaxBoost = CalamityUtils.SecondsToFrames(10);
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(TimeToReachMaxBoost.FramesToSeconds(), MaxDefenseBoost, MaxMoveSpeedReduction.ToPercent());
+
public override void SetDefaults()
{
Item.width = 18;
@@ -15,6 +22,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
Item.rare = ItemRarityID.Pink;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/AquaticHeart.cs b/Items/Accessories/AquaticHeart.cs
index d8605af83c..be830a8235 100644
--- a/Items/Accessories/AquaticHeart.cs
+++ b/Items/Accessories/AquaticHeart.cs
@@ -3,6 +3,7 @@ using CalamityMod.Items.BaseItems;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -14,6 +15,8 @@ namespace CalamityMod.Items.Accessories
public static float WaterSpeedBoost = 0.15f;
public static float IceShieldDamageReductionBoost = 0.2f;
+ public static int IceShieldCooldown = CalamityUtils.SecondsToFrames(30);
+ public static LocalizedText FullTooltip => CalamityUtils.GetText("Items.Accessories.AquaticHeart.FullTooltip").WithFormatArgs(WaterSpeedBoost.ToPercent(), IceShieldDamageReductionBoost.ToPercent(), IceShieldCooldown.FramesToSeconds());
public override string AssetPath => "CalamityMod/Items/Accessories/";
public override (EquipType, string, string)[] EquipSlots =>
@@ -39,7 +42,7 @@ namespace CalamityMod.Items.Accessories
public override void ModifyTooltips(List tooltips)
{
- string statusTooltip = this.GetLocalizedValue(NPC.downedBoss3 ? "FullTooltip" : "LockedTooltip");
+ string statusTooltip = NPC.downedBoss3 ? FullTooltip.ToString() : this.GetLocalizedValue("LockedTooltip");
tooltips.FindAndReplace("[STATUS]", statusTooltip);
}
}
diff --git a/Items/Accessories/ArcFlashRing.cs b/Items/Accessories/ArcFlashRing.cs
index ab5618118d..c2e110cae8 100644
--- a/Items/Accessories/ArcFlashRing.cs
+++ b/Items/Accessories/ArcFlashRing.cs
@@ -4,6 +4,7 @@ using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.GameContent;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -11,6 +12,11 @@ namespace CalamityMod.Items.Accessories
public class ArcFlashRing : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
+
+ public static int LightningSpawnPercent = 6;
+ public static float LightningDamageMult = 4f;
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(LightningSpawnPercent, LightningDamageMult);
+
public override void SetDefaults()
{
Item.width = 56;
@@ -18,6 +24,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
Item.rare = ModContent.RarityType();
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/ArchaicPowder.cs b/Items/Accessories/ArchaicPowder.cs
index 452d0a0bcc..bb6f6d5597 100644
--- a/Items/Accessories/ArchaicPowder.cs
+++ b/Items/Accessories/ArchaicPowder.cs
@@ -2,6 +2,7 @@
using CalamityMod.Items.Placeables.Crags;
using Terraria;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -9,6 +10,11 @@ namespace CalamityMod.Items.Accessories
public class ArchaicPowder : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
+
+ public static float MiningSpeedBoost = 0.25f;
+ public static float TrapDamageReduction = 0.65f;
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MiningSpeedBoost.ToPercent(), TrapDamageReduction.ToPercent());
+
public override void SetDefaults()
{
Item.width = 56;
@@ -20,7 +26,7 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
- player.pickSpeed -= 0.25f;
+ player.pickSpeed -= MiningSpeedBoost;
player.Calamity().aPowder = true;
player.Calamity().fallingBlockProtection = true;
player.Calamity().trapProtection = true;
@@ -29,7 +35,7 @@ namespace CalamityMod.Items.Accessories
if (player.chiselSpeed)
player.pickSpeed += 0.15f;
if (player.Calamity().aFossil)
- player.pickSpeed += 0.1f;
+ player.pickSpeed += AncientFossil.MiningSpeedBoost;
}
public override void AddRecipes()
diff --git a/Items/Accessories/AscendantInsignia.cs b/Items/Accessories/AscendantInsignia.cs
index d1d22d9a12..63c682c630 100644
--- a/Items/Accessories/AscendantInsignia.cs
+++ b/Items/Accessories/AscendantInsignia.cs
@@ -7,6 +7,7 @@ using CalamityMod.Items.Placeables.Ores;
using CalamityMod.Rarities;
using Terraria;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -15,6 +16,16 @@ namespace CalamityMod.Items.Accessories
public class AscendantInsignia : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
+
+ // These values override Soaring Insignia's
+ public static double FlightTimeBoost = 0.5D;
+ public static float MoveSpeedBoost = 0.15f;
+ public static float JumpSpeedBoost = 0.75f; // NOTE: Tooltip shares this number with move speed % as they're equal
+ public static float AccelerationBoost = 0.5f;
+ public static int AbilityDuration = CalamityUtils.SecondsToFrames(4);
+ public static int AbilityCooldown = CalamityUtils.SecondsToFrames(40);
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(FlightTimeBoost.ToPercent(), MoveSpeedBoost.ToPercent(), (1f + AccelerationBoost).Round(), AbilityDuration.FramesToSeconds(), AbilityCooldown.FramesToSeconds());
+
public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.AscendantInsigniaHotKey);
public override void SetDefaults()
{
@@ -23,6 +34,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
Item.accessory = true;
Item.rare = ModContent.RarityType();
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
@@ -30,8 +42,8 @@ namespace CalamityMod.Items.Accessories
CalamityPlayer modPlayer = player.Calamity();
modPlayer.ascendantInsignia = true;
player.empressBrooch = true;
- player.moveSpeed += 0.05f;
- player.jumpSpeedBoost += 0.25f;
+ player.moveSpeed += MoveSpeedBoost;
+ player.jumpSpeedBoost += JumpSpeedBoost - 0.5f;
}
public override void AddRecipes()
diff --git a/Items/Accessories/BlazingCore.cs b/Items/Accessories/BlazingCore.cs
index d77f390a86..4bdcef3fcf 100644
--- a/Items/Accessories/BlazingCore.cs
+++ b/Items/Accessories/BlazingCore.cs
@@ -35,6 +35,7 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
Item.rare = ModContent.RarityType();
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/BloodPact.cs b/Items/Accessories/BloodPact.cs
index deb11f3734..739dbe82c0 100644
--- a/Items/Accessories/BloodPact.cs
+++ b/Items/Accessories/BloodPact.cs
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Accessories
Item.rare = ItemRarityID.Yellow;
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/BloodyWormScarf.cs b/Items/Accessories/BloodyWormScarf.cs
index 23c4716747..94f56a3c97 100644
--- a/Items/Accessories/BloodyWormScarf.cs
+++ b/Items/Accessories/BloodyWormScarf.cs
@@ -17,6 +17,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityLightRedBuyPrice;
Item.rare = ItemRarityID.LightRed;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/BloodyWormTooth.cs b/Items/Accessories/BloodyWormTooth.cs
index aeb23ca680..f81bb96832 100644
--- a/Items/Accessories/BloodyWormTooth.cs
+++ b/Items/Accessories/BloodyWormTooth.cs
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
Item.rare = ItemRarityID.Orange;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/Calamity.cs b/Items/Accessories/Calamity.cs
index 0b60fcda8f..14c7c7566f 100644
--- a/Items/Accessories/Calamity.cs
+++ b/Items/Accessories/Calamity.cs
@@ -33,6 +33,7 @@ namespace CalamityMod.Items.Accessories
Item.rare = ModContent.RarityType();
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateVanity(Player player)
diff --git a/Items/Accessories/ChaliceOfTheBloodGod.cs b/Items/Accessories/ChaliceOfTheBloodGod.cs
index 60bd140a45..c9e140fe6e 100644
--- a/Items/Accessories/ChaliceOfTheBloodGod.cs
+++ b/Items/Accessories/ChaliceOfTheBloodGod.cs
@@ -43,6 +43,7 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
Item.rare = ModContent.RarityType();
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/DraedonsHeart.cs b/Items/Accessories/DraedonsHeart.cs
index 0177e7f04c..66d5d7aa9a 100644
--- a/Items/Accessories/DraedonsHeart.cs
+++ b/Items/Accessories/DraedonsHeart.cs
@@ -45,6 +45,7 @@ namespace CalamityMod.Items.Accessories
Item.defense = 20;
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
Item.rare = ModContent.RarityType();
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/DynamoStemCells.cs b/Items/Accessories/DynamoStemCells.cs
index 4885c220ef..730a23181a 100644
--- a/Items/Accessories/DynamoStemCells.cs
+++ b/Items/Accessories/DynamoStemCells.cs
@@ -28,6 +28,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityPurpleBuyPrice;
Item.rare = ItemRarityID.Purple;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/FlameLickedShell.cs b/Items/Accessories/FlameLickedShell.cs
index 4cf105a720..39b31a175b 100644
--- a/Items/Accessories/FlameLickedShell.cs
+++ b/Items/Accessories/FlameLickedShell.cs
@@ -26,6 +26,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
Item.rare = ItemRarityID.Pink;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/FungalClump.cs b/Items/Accessories/FungalClump.cs
index b7a5cb048e..b244204a94 100644
--- a/Items/Accessories/FungalClump.cs
+++ b/Items/Accessories/FungalClump.cs
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityGreenBuyPrice;
Item.rare = ItemRarityID.Green;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/HideofAstrumDeus.cs b/Items/Accessories/HideofAstrumDeus.cs
index cb4e4dba87..7185fcd33b 100644
--- a/Items/Accessories/HideofAstrumDeus.cs
+++ b/Items/Accessories/HideofAstrumDeus.cs
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityCyanBuyPrice;
Item.rare = ItemRarityID.Cyan;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/InterstellarStompers.cs b/Items/Accessories/InterstellarStompers.cs
index 992c2d701c..2f82b292fb 100644
--- a/Items/Accessories/InterstellarStompers.cs
+++ b/Items/Accessories/InterstellarStompers.cs
@@ -21,6 +21,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
Item.accessory = true;
Item.rare = ItemRarityID.Lime;
+ Item.expert = true;
}
public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.GravistarSabatonHotkey);
diff --git a/Items/Accessories/LeviathanAmbergris.cs b/Items/Accessories/LeviathanAmbergris.cs
index 29b3f78836..9b2c6f2057 100644
--- a/Items/Accessories/LeviathanAmbergris.cs
+++ b/Items/Accessories/LeviathanAmbergris.cs
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
Item.accessory = true;
Item.rare = ItemRarityID.Lime;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/ManaPolarizer.cs b/Items/Accessories/ManaPolarizer.cs
index 95e449d742..73fc472501 100644
--- a/Items/Accessories/ManaPolarizer.cs
+++ b/Items/Accessories/ManaPolarizer.cs
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityLightRedBuyPrice;
Item.rare = ItemRarityID.LightRed;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/NebulousCore.cs b/Items/Accessories/NebulousCore.cs
index 103e179a93..f4cea457eb 100644
--- a/Items/Accessories/NebulousCore.cs
+++ b/Items/Accessories/NebulousCore.cs
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
Item.rare = ModContent.RarityType();
+ Item.expert = true;
}
public override void Update(ref float gravity, ref float maxFallSpeed)
diff --git a/Items/Accessories/OceanCrest.cs b/Items/Accessories/OceanCrest.cs
index 9266827683..26d97b69d3 100644
--- a/Items/Accessories/OceanCrest.cs
+++ b/Items/Accessories/OceanCrest.cs
@@ -15,6 +15,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityGreenBuyPrice;
Item.rare = ItemRarityID.Green;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/OldDukeScales.cs b/Items/Accessories/OldDukeScales.cs
index 0a7355d763..cbe4f9314f 100644
--- a/Items/Accessories/OldDukeScales.cs
+++ b/Items/Accessories/OldDukeScales.cs
@@ -23,6 +23,7 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
Item.rare = ModContent.RarityType();
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/RadiantOoze.cs b/Items/Accessories/RadiantOoze.cs
index 42a64e5120..6c5173059b 100644
--- a/Items/Accessories/RadiantOoze.cs
+++ b/Items/Accessories/RadiantOoze.cs
@@ -4,6 +4,7 @@ using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -11,6 +12,11 @@ namespace CalamityMod.Items.Accessories
public class RadiantOoze : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
+
+ public static int MinRegenBoost = 4;
+ public static int MaxRegenBoost = 10;
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinRegenBoost.ToRegenPerSecond(), MaxRegenBoost.ToRegenPerSecond());
+
public override void SetDefaults()
{
Item.width = 20;
diff --git a/Items/Accessories/RampartofDeities.cs b/Items/Accessories/RampartofDeities.cs
index 68bc76f46d..a36913d189 100644
--- a/Items/Accessories/RampartofDeities.cs
+++ b/Items/Accessories/RampartofDeities.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.IO;
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
@@ -7,7 +6,6 @@ using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
-using ReLogic.Content;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -81,31 +79,11 @@ namespace CalamityMod.Items.Accessories
player.panic = panicNecklaceEnabled;
// Large hit iframe effect taken from Seraph Tracers
+ // IceBarrier and PaladinsShield effects are defined in CalPlayer.PostUpdateEquips
modPlayer.rampartOfDeities = true;
- // Ice Barrier buff inherited from Frozen Turtle Shell
- if (player.statLife <= player.statLifeMax2 * 0.5)
- player.AddBuff(BuffID.IceBarrier, 5);
-
// Knockback immunity inherited from Paladin's Shield
player.noKnockback = true;
-
- // Paladin's Shield application
- if (player.statLife > player.statLifeMax2 * 0.25f)
- {
- player.hasPaladinShield = true;
- if (player.whoAmI != Main.myPlayer && player.miscCounter % 10 == 0)
- {
- int myPlayer = Main.myPlayer;
- if (Main.player[myPlayer].team == player.team && player.team != 0)
- {
- float teamPlayerXDist = player.position.X - Main.player[myPlayer].position.X;
- float teamPlayerYDist = player.position.Y - Main.player[myPlayer].position.Y;
- if ((float)Math.Sqrt(teamPlayerXDist * teamPlayerXDist + teamPlayerYDist * teamPlayerYDist) < 800f)
- Main.player[myPlayer].AddBuff(BuffID.PaladinsShield, 20);
- }
- }
- }
}
public override void AddRecipes()
diff --git a/Items/Accessories/RottenBrain.cs b/Items/Accessories/RottenBrain.cs
index d48784a538..01a644c84f 100644
--- a/Items/Accessories/RottenBrain.cs
+++ b/Items/Accessories/RottenBrain.cs
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
Item.rare = ItemRarityID.Orange;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/ShieldoftheHighRuler.cs b/Items/Accessories/ShieldoftheHighRuler.cs
index 1d7bc17922..c824ecf196 100644
--- a/Items/Accessories/ShieldoftheHighRuler.cs
+++ b/Items/Accessories/ShieldoftheHighRuler.cs
@@ -24,13 +24,14 @@ namespace CalamityMod.Items.Accessories
Item.width = 36;
Item.height = 38;
Item.DamageType = DamageClass.MeleeNoSpeed;
- Item.damage = 30;
+ Item.damage = 300;
Item.knockBack = 9f;
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
Item.rare = ItemRarityID.Yellow;
Item.Calamity().donorItem = true;
Item.defense = 4;
Item.accessory = true;
+ Item.expert = true;
}
public override bool MeleePrefix() => false;
diff --git a/Items/Accessories/SpectralVeil.cs b/Items/Accessories/SpectralVeil.cs
index c2c749190f..3cc01929cb 100644
--- a/Items/Accessories/SpectralVeil.cs
+++ b/Items/Accessories/SpectralVeil.cs
@@ -21,6 +21,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
Item.rare = ModContent.RarityType();
Item.accessory = true;
+ Item.expert = true;
}
public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.SpectralVeilHotKey);
diff --git a/Items/Accessories/TheAmalgam.cs b/Items/Accessories/TheAmalgam.cs
index d8c8cc6475..f6b903d3fa 100644
--- a/Items/Accessories/TheAmalgam.cs
+++ b/Items/Accessories/TheAmalgam.cs
@@ -32,6 +32,7 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
Item.rare = RarityType();
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/TheCamper.cs b/Items/Accessories/TheCamper.cs
index 740b72b151..6f41d35859 100644
--- a/Items/Accessories/TheCamper.cs
+++ b/Items/Accessories/TheCamper.cs
@@ -22,6 +22,7 @@ namespace CalamityMod.Items.Accessories
Item.rare = ItemRarityID.Yellow;
Item.accessory = true;
Item.defense = 10;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/TheEvolution.cs b/Items/Accessories/TheEvolution.cs
index 7f0dff4b8a..5b90135f40 100644
--- a/Items/Accessories/TheEvolution.cs
+++ b/Items/Accessories/TheEvolution.cs
@@ -23,6 +23,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
Item.rare = ModContent.RarityType();
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/ToxicHeart.cs b/Items/Accessories/ToxicHeart.cs
index da800d501b..5981c7e279 100644
--- a/Items/Accessories/ToxicHeart.cs
+++ b/Items/Accessories/ToxicHeart.cs
@@ -21,6 +21,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
Item.rare = ItemRarityID.Yellow;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/Vanity/PunchCard.cs b/Items/Accessories/Vanity/PunchCard.cs
deleted file mode 100644
index 17f7cb92c1..0000000000
--- a/Items/Accessories/Vanity/PunchCard.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using CalamityMod.Items.BaseItems;
-using CalamityMod.UI;
-using Terraria;
-using Terraria.ID;
-using Terraria.ModLoader;
-
-namespace CalamityMod.Items.Accessories.Vanity
-{
- public class PunchCard : TransformationAccessory, ILocalizedModType
- {
- public new string LocalizationCategory => "Items.Accessories";
- public override (EquipType, string, string)[] EquipSlots =>
- [
- (EquipType.Head, "Shayy", null),
- (EquipType.Body, "Shayy", null),
- (EquipType.Legs, "Shayy", null),
- ];
-
- public override void SetDefaults()
- {
- Item.width = 42;
- Item.height = 38;
- Item.accessory = true;
- Item.value = Item.buyPrice(gold: 10); // Sold by Skeleton Merchant named "Sans Undertale"
- Item.rare = ItemRarityID.Purple;
- Item.vanity = true;
- Item.Calamity().devItem = true;
- Item.useAnimation = Item.useTime = 20;
- Item.useStyle = ItemUseStyleID.HoldUp;
- }
-
- public override bool? UseItem(Player player)
- {
- if (Main.myPlayer == player.whoAmI)
- PopupGUIManager.FlipActivityOfGUIWithType(typeof(PunchCardGUI));
- return true;
- }
- }
-}
diff --git a/Items/Accessories/Vanity/PunchCard.png b/Items/Accessories/Vanity/PunchCard.png
deleted file mode 100644
index 51e56a5319..0000000000
Binary files a/Items/Accessories/Vanity/PunchCard.png and /dev/null differ
diff --git a/Items/Accessories/Vanity/Shayy_Body.png b/Items/Accessories/Vanity/Shayy_Body.png
deleted file mode 100644
index 56fbab6258..0000000000
Binary files a/Items/Accessories/Vanity/Shayy_Body.png and /dev/null differ
diff --git a/Items/Accessories/Vanity/Shayy_Head.png b/Items/Accessories/Vanity/Shayy_Head.png
deleted file mode 100644
index 25b28f865a..0000000000
Binary files a/Items/Accessories/Vanity/Shayy_Head.png and /dev/null differ
diff --git a/Items/Accessories/Vanity/Shayy_Legs.png b/Items/Accessories/Vanity/Shayy_Legs.png
deleted file mode 100644
index 270b56183d..0000000000
Binary files a/Items/Accessories/Vanity/Shayy_Legs.png and /dev/null differ
diff --git a/Items/Accessories/VoidofCalamity.cs b/Items/Accessories/VoidofCalamity.cs
index adbefc4037..0bbdbe026a 100644
--- a/Items/Accessories/VoidofCalamity.cs
+++ b/Items/Accessories/VoidofCalamity.cs
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
Item.rare = ItemRarityID.Lime;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/VoidofExtinction.cs b/Items/Accessories/VoidofExtinction.cs
index 33898f8cf4..01b6b8c0ea 100644
--- a/Items/Accessories/VoidofExtinction.cs
+++ b/Items/Accessories/VoidofExtinction.cs
@@ -5,6 +5,7 @@ using CalamityMod.Projectiles.Typeless;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -12,10 +13,10 @@ namespace CalamityMod.Items.Accessories
public class VoidofExtinction : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
- public const int FireProjectiles = 2;
- public const float FireAngleSpread = 120;
- public int FireCountdown = 0;
+
+ public static int CritBoost = 13;
public static int VoidExploDamage = 40;
+ public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(CritBoost, Abaddon.BrimstoneFlamesReduction.ToPercent());
public override void SetDefaults()
{
@@ -41,7 +42,7 @@ namespace CalamityMod.Items.Accessories
CalamityPlayer modPlayer = player.Calamity();
modPlayer.voidOfExtinction = true;
modPlayer.abaddon = true;
- player.GetCritChance() += 13;
+ player.GetCritChance() += CritBoost;
}
}
diff --git a/Items/Accessories/WarbanneroftheRighteous.cs b/Items/Accessories/WarbanneroftheRighteous.cs
index a2ba0a5298..fb469a4bb3 100644
--- a/Items/Accessories/WarbanneroftheRighteous.cs
+++ b/Items/Accessories/WarbanneroftheRighteous.cs
@@ -42,6 +42,7 @@ namespace CalamityMod.Items.Accessories
Item.value = CalamityGlobalItem.RarityPurpleBuyPrice;
Item.rare = ItemRarityID.Purple;
Item.accessory = true;
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/Accessories/Wings/SoulofCryogen.cs b/Items/Accessories/Wings/SoulofCryogen.cs
index 14aedb1d51..f9f009b438 100644
--- a/Items/Accessories/Wings/SoulofCryogen.cs
+++ b/Items/Accessories/Wings/SoulofCryogen.cs
@@ -29,6 +29,7 @@ namespace CalamityMod.Items.Accessories.Wings
Item.height = 26;
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
Item.rare = ItemRarityID.Pink;
+ Item.expert = true;
}
public override void Update(ref float gravity, ref float maxFallSpeed)
diff --git a/Items/Accessories/YharimsGift.cs b/Items/Accessories/YharimsGift.cs
index 2d0096cb73..919e4a0b4c 100644
--- a/Items/Accessories/YharimsGift.cs
+++ b/Items/Accessories/YharimsGift.cs
@@ -18,10 +18,11 @@ namespace CalamityMod.Items.Accessories
{
Item.width = 20;
Item.height = 22;
- Item.defense = 12; // Why did this give 30 defense? This thing really needs a rework lol
+ Item.defense = 12;
Item.accessory = true;
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
Item.rare = ModContent.RarityType();
+ Item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs
index 84e7a6ee9f..fe36457f50 100644
--- a/Items/CalamityGlobalItem.cs
+++ b/Items/CalamityGlobalItem.cs
@@ -262,8 +262,8 @@ namespace CalamityMod.Items
if (item.type == ItemID.Zenith)
item.rare = RarityType();
- // Make most expert items no longer expert because they drop in all modes now.
- switch (item.type)
+ // CIT 16OCT2025: Following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ /*switch (item.type)
{
case ItemID.RoyalGel:
case ItemID.EoCShield:
@@ -288,7 +288,7 @@ namespace CalamityMod.Items
case ItemID.LongRainbowTrailWings:
item.expert = false;
break;
- }
+ }*/
// Allow Souls to be used as ammo for SHPC.
if (item.type == ItemID.SoulofLight || item.type == ItemID.SoulofNight || item.type == ItemID.SoulofFlight || item.type == ItemID.SoulofMight || item.type == ItemID.SoulofSight || item.type == ItemID.SoulofFright)
diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs
index 5a95f46cb8..ac63b0d935 100644
--- a/Items/CalamityGlobalItemTooltip.cs
+++ b/Items/CalamityGlobalItemTooltip.cs
@@ -369,8 +369,6 @@ namespace CalamityMod.Items
nameLine.OverrideColor = ShatteredCommunity.GetRarityColor();
if (item.type == ModContent.ItemType())
nameLine.OverrideColor = ShatteredCommunity.GetRarityColor();
- if (item.type == ModContent.ItemType())
- nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(132, 37, 147), new Color(0, 255, 0), 5f); //alternates purple and neon green
if (item.type == ModContent.ItemType())
nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(255, 166, 0), new Color(25, 250, 25), 6f); //alternates between emerald green and amber (BanditHueh)
if (item.type == ModContent.ItemType())
diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs
index 2526913ed4..27102ec65d 100644
--- a/Items/CalamityGlobalItemTweaks.cs
+++ b/Items/CalamityGlobalItemTweaks.cs
@@ -1260,9 +1260,6 @@ namespace CalamityMod.Items
shimmerTransmute[ModContent.ItemType()] = ModContent.ItemType();
shimmerTransmute[ModContent.ItemType()] = ModContent.ItemType();
- //Calamity Permanent Upgrades
- shimmerTransmute[ItemID.FrogLeg] = ModContent.ItemType();
-
// -- Vanilla Boss Shimmer Drop Cycles --
// These cycles follow the order of: Melee Weapons A to Z -> Ranged Weapons A to Z -> Magic Weapons A to Z -> Summon Weapons A to Z -> Rogue Weapons A to Z (Based off of their in-game names)
diff --git a/Items/DisgustingMeat.cs b/Items/DisgustingMeat.cs
index 9a635b1bec..1f334a6ab9 100644
--- a/Items/DisgustingMeat.cs
+++ b/Items/DisgustingMeat.cs
@@ -33,7 +33,6 @@ namespace CalamityMod.Items
TryDropBoosterItem(player, ref calPlayer.adrenalineBoostOne, ModContent.ItemType());
TryDropBoosterItem(player, ref calPlayer.adrenalineBoostTwo, ModContent.ItemType());
TryDropBoosterItem(player, ref calPlayer.adrenalineBoostThree, ModContent.ItemType());
- TryDropBoosterItem(player, ref calPlayer.nimbleBounderBoost, ModContent.ItemType());
}
else
{
diff --git a/Items/Materials/BloodOrb.cs b/Items/Materials/BloodOrb.cs
index d5daec913e..f5cc0493f7 100644
--- a/Items/Materials/BloodOrb.cs
+++ b/Items/Materials/BloodOrb.cs
@@ -30,13 +30,5 @@ namespace CalamityMod.Items.Materials
brightness *= Main.essScale;
Lighting.AddLight((int)((Item.position.X + (Item.width / 2)) / 16f), (int)((Item.position.Y + (Item.height / 2)) / 16f), 0.75f * brightness, 0f, 0f);
}
-
- public override void AddRecipes()
- {
- CreateRecipe(10).
- AddIngredient(ItemID.BloodMoonStarter).
- Register()
- .DisableDecraft();
- }
}
}
diff --git a/Items/PermanentBoosters/NimbleBounder.cs b/Items/PermanentBoosters/NimbleBounder.cs
deleted file mode 100644
index 04ebe5daa6..0000000000
--- a/Items/PermanentBoosters/NimbleBounder.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-using System.Collections.Generic;
-using CalamityMod.CalPlayer;
-using CalamityMod.Rarities;
-using Terraria;
-using Terraria.ID;
-using Terraria.Localization;
-using Terraria.ModLoader;
-
-namespace CalamityMod.Items.PermanentBoosters
-{
- public class NimbleBounder : ModItem, ILocalizedModType
- {
- public new string LocalizationCategory => "Items.Misc";
-
- public static float MoveSpeedBoost = 0.05f;
- public static float JumpSpeedBoost = 0.25f; // This also amounts to 5% so the tooltip is shared with movement speed
- public static float AccelerationBoost = 0.1f;
- public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MoveSpeedBoost.ToPercent(), AccelerationBoost.ToPercent());
-
- public override void SetDefaults()
- {
- Item.width = 20;
- Item.height = 20;
- Item.consumable = true;
- Item.useAnimation = Item.useTime = 30;
- Item.UseSound = SoundID.Zombie13; // frog sfx
- Item.useStyle = ItemUseStyleID.HoldUp;
- // Same price as Frog Leg, which is used to shimmer into it
- Item.value = Item.sellPrice(gold: 1);
- Item.rare = ModContent.RarityType();
- Item.maxStack = Item.CommonMaxStack;
- Item.Calamity().devItem = true;
- }
-
- public static bool HasConsumedBefore(Player player) => player.Calamity().nimbleBounderBoost;
-
- public override bool CanUseItem(Player player)
- {
- if (HasConsumedBefore(player))
- {
- // Refuse Text can be added on here
- return false;
- }
-
- return true;
- }
-
- public override bool? UseItem(Player player)
- {
- if (player.itemAnimation > 0 && player.itemTime == 0)
- {
- player.itemTime = Item.useTime;
- CalamityPlayer modPlayer = player.Calamity();
- modPlayer.nimbleBounderBoost = true;
- }
- return true;
- }
-
- // Gives a purple light when dropped as an item
- public override void PostUpdate()
- {
- Lighting.AddLight((int)((Item.position.X + Item.width / 2) / 16f), (int)((Item.position.Y + Item.height / 2) / 16f), 0.51f, 0.14f, 0.57f);
- }
-
- public override void ModifyTooltips(List list)
- {
- if (HasConsumedBefore(Main.LocalPlayer))
- list.AddConsumedTooltip();
- }
- }
-}
diff --git a/Items/PermanentBoosters/NimbleBounder.png b/Items/PermanentBoosters/NimbleBounder.png
deleted file mode 100644
index a329a79c57..0000000000
Binary files a/Items/PermanentBoosters/NimbleBounder.png and /dev/null differ
diff --git a/Items/Placeables/Banners/ArmoredDiggerBanner.cs b/Items/Placeables/Banners/BurrowerBanner.cs
similarity index 77%
rename from Items/Placeables/Banners/ArmoredDiggerBanner.cs
rename to Items/Placeables/Banners/BurrowerBanner.cs
index f035d46d06..0b5abd9db3 100644
--- a/Items/Placeables/Banners/ArmoredDiggerBanner.cs
+++ b/Items/Placeables/Banners/BurrowerBanner.cs
@@ -1,6 +1,6 @@
namespace CalamityMod.Items.Placeables.Banners
{
- public class ArmoredDiggerBanner : BaseBanner
+ public class BurrowerBanner : BaseBanner
{
public override int BannerTileStyle => 77;
public override int BannerKillRequirement => 25;
diff --git a/Items/Placeables/Banners/ArmoredDiggerBanner.png b/Items/Placeables/Banners/BurrowerBanner.png
similarity index 100%
rename from Items/Placeables/Banners/ArmoredDiggerBanner.png
rename to Items/Placeables/Banners/BurrowerBanner.png
diff --git a/Items/Placeables/Furniture/Paintings/AmidiasPainting.cs b/Items/Placeables/Furniture/Paintings/AmidiasPainting.cs
new file mode 100644
index 0000000000..e0225466c7
--- /dev/null
+++ b/Items/Placeables/Furniture/Paintings/AmidiasPainting.cs
@@ -0,0 +1,19 @@
+using CalamityMod.Tiles.Furniture.Paintings;
+using Terraria;
+using Terraria.ModLoader;
+
+namespace CalamityMod.Items.Placeables.Furniture.Paintings
+{
+ public class AmidiasPainting : ModItem, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Items.Placeables";
+
+ public override void SetDefaults()
+ {
+ Item.DefaultToPlaceableTile(ModContent.TileType());
+ Item.width = 52;
+ Item.height = 34;
+ Item.value = Item.buyPrice(gold: 1);
+ }
+ }
+}
diff --git a/Items/Placeables/Furniture/Paintings/AmidiasPainting.png b/Items/Placeables/Furniture/Paintings/AmidiasPainting.png
new file mode 100644
index 0000000000..2d555e093f
Binary files /dev/null and b/Items/Placeables/Furniture/Paintings/AmidiasPainting.png differ
diff --git a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs
index 659e6039de..efd95563bb 100644
--- a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs
+++ b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs
@@ -50,7 +50,7 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings
public static IList devList = new List()
{
- "Altix",
+ "Altixal",
"apotofkoolaid",
"AquaSG",
"Atalya",
@@ -85,7 +85,6 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings
"Raesh",
"Sagittariod",
"Shade",
- "Shayy",
"Spider Prov",
"StipulateVenus",
"Sunny",
diff --git a/Items/Placeables/Underworld/Dreadstone.cs b/Items/Placeables/Underworld/Dreadstone.cs
deleted file mode 100644
index 1927f25e75..0000000000
--- a/Items/Placeables/Underworld/Dreadstone.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Terraria.ModLoader;
-
-namespace CalamityMod.Items.Placeables.Underworld
-{
- public class Dreadstone : ModItem, ILocalizedModType
- {
- public new string LocalizationCategory => "Items.Placeables";
- public override void SetStaticDefaults() => Item.ResearchUnlockCount = 100;
- public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType());
-
- }
-}
diff --git a/Items/Placeables/Underworld/Dreadstone.png b/Items/Placeables/Underworld/Dreadstone.png
deleted file mode 100644
index 3ad756b5e3..0000000000
Binary files a/Items/Placeables/Underworld/Dreadstone.png and /dev/null differ
diff --git a/Items/Potions/BottledPanacea.cs b/Items/Potions/BottledPanacea.cs
new file mode 100644
index 0000000000..347e59c2f1
--- /dev/null
+++ b/Items/Potions/BottledPanacea.cs
@@ -0,0 +1,67 @@
+using CalamityMod.Cooldowns;
+using CalamityMod.DataStructures;
+using CalamityMod.Particles;
+using Microsoft.Xna.Framework;
+using Terraria;
+using Terraria.Audio;
+using Terraria.ID;
+using Terraria.ModLoader;
+
+namespace CalamityMod.Items.Potions
+{
+ public class BottledPanacea : ModItem, ILocalizedModType
+ {
+ public new string LocalizationCategory => "Items.Potions";
+
+ public override void SetStaticDefaults()
+ {
+ Item.ResearchUnlockCount = 20;
+ ItemID.Sets.DrinkParticleColors[Type] = new Color[2] {
+ new Color(84, 215, 254),
+ new Color(35, 101, 192)
+ };
+ }
+
+ public override void SetDefaults()
+ {
+ Item.UseSound = SoundID.Item3;
+ Item.useStyle = ItemUseStyleID.DrinkLiquid;
+ Item.useTurn = true;
+ Item.useTime = Item.useAnimation = 17;
+ Item.maxStack = Item.CommonMaxStack;
+ Item.consumable = true;
+ Item.value = Item.sellPrice(silver: 2);
+ Item.rare = ItemRarityID.Blue;
+ }
+
+ public override bool CanUseItem(Player player) => !player.HasCooldown(PanaceaCooldown.ID);
+
+ public override bool? UseItem(Player player)
+ {
+ if (player.itemAnimation > 0 && player.itemTime == 0)
+ {
+ player.itemTime = Item.useTime;
+ SoundEngine.PlaySound(SoundID.Item4, player.Center);
+
+ for (int i = Player.MaxBuffs - 1; i >= 0; i--)
+ {
+ int buffType = player.buffType[i];
+ if (BuffDatasets.DebuffDataset[buffType] is not null && (BuffDatasets.DebuffDataset[buffType].SicknessDebuffScaling > 0 || BuffDatasets.DebuffDataset[buffType].ElectricDebuffScaling > 0))
+ player.DelBuff(i);
+ }
+
+ for (int i = 0; i < 4; i++)
+ {
+ Vector2 plusVel = new Vector2(Main.rand.NextFloat(-0.55f, 0.55f), Main.rand.NextFloat(-6f, 0f));
+ HealingPlus plus = new(Main.rand.NextVector2FromRectangle(player.Hitbox), Main.rand.NextFloat(1.25f, 1.5f), plusVel, Color.SkyBlue, Color.SkyBlue, 20);
+ GeneralParticleHandler.SpawnParticle(plus);
+ }
+ for (int d = 0; d < 10; d++)
+ Dust.NewDust(player.position, player.width, player.height, DustID.BlueTorch);
+
+ player.AddCooldown(PanaceaCooldown.ID, CalamityUtils.SecondsToFrames(30));
+ }
+ return true;
+ }
+ }
+}
diff --git a/Items/Potions/BottledPanacea.png b/Items/Potions/BottledPanacea.png
new file mode 100644
index 0000000000..8a98e6f6bf
Binary files /dev/null and b/Items/Potions/BottledPanacea.png differ
diff --git a/Items/TreasureBags/MiscGrabBags/StarterBag.cs b/Items/TreasureBags/MiscGrabBags/StarterBag.cs
index e121905f8a..4e1d2b5ad8 100644
--- a/Items/TreasureBags/MiscGrabBags/StarterBag.cs
+++ b/Items/TreasureBags/MiscGrabBags/StarterBag.cs
@@ -113,16 +113,6 @@ namespace CalamityMod.Items.TreasureBags.MiscGrabBags
itemLoot.AddIf(getsGhostBracelet, ModContent.ItemType());
- // Shayy dev item
- // Name specific: "Shayy"
- static bool getsPunchCard(DropAttemptInfo info)
- {
- string playerName = info.player.name;
- return playerName == "Shayy";
- }
-
- itemLoot.AddIf(getsPunchCard, ModContent.ItemType());
-
// Xyk dev item
// Name specific: "Xyk"
static bool getsXyksBlessing(DropAttemptInfo info)
diff --git a/Items/TreasureBags/RavagerBag.cs b/Items/TreasureBags/RavagerBag.cs
index ea20f25040..3acad9e6e1 100644
--- a/Items/TreasureBags/RavagerBag.cs
+++ b/Items/TreasureBags/RavagerBag.cs
@@ -76,10 +76,8 @@ namespace CalamityMod.Items.TreasureBags
itemLoot.Add(ModContent.ItemType(), 20);
// Equipment
- itemLoot.Add(ItemDropRule.OneFromOptionsNotScalingWithLuck(1,
- ModContent.ItemType(),
- ModContent.ItemType()
- ));
+ itemLoot.Add(ModContent.ItemType());
+ itemLoot.Add(ModContent.ItemType(), 2);
itemLoot.AddIf(() => DownedBossSystem.downedProvidence, ModContent.ItemType());
itemLoot.AddRevBagAccessories();
itemLoot.AddIf((info) => CalamityWorld.revenge && !info.player.Calamity().rageBoostTwo, ModContent.ItemType());
diff --git a/Items/Weapons/Magic/Effervescence.cs b/Items/Weapons/Magic/Effervescence.cs
index e594491c7e..515cf9267c 100644
--- a/Items/Weapons/Magic/Effervescence.cs
+++ b/Items/Weapons/Magic/Effervescence.cs
@@ -2,6 +2,7 @@
using CalamityMod.Projectiles.Magic;
using Microsoft.Xna.Framework;
using Terraria;
+using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
@@ -11,6 +12,10 @@ namespace CalamityMod.Items.Weapons.Magic
public class Effervescence : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Magic";
+ public static readonly SoundStyle FireSound = new("CalamityMod/Sounds/Item/EffervescenceFire") { PitchVariance = 0.1f };
+ public static readonly SoundStyle BurstSound = new("CalamityMod/Sounds/Item/EffervescenceBurst") { PitchVariance = 0.1f };
+ public static readonly SoundStyle PopSound = new("CalamityMod/Sounds/Item/EffervescencePop") { PitchVariance = 0.1f };
+
public override void SetDefaults()
{
Item.width = 56;
@@ -25,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic
Item.knockBack = 3.75f;
Item.value = CalamityGlobalItem.RarityPurpleBuyPrice;
Item.rare = ItemRarityID.Purple;
- Item.UseSound = SoundID.Item95;
+ Item.UseSound = FireSound;
Item.autoReuse = true;
Item.shootSpeed = 13f;
Item.shoot = ModContent.ProjectileType();
@@ -37,9 +42,8 @@ namespace CalamityMod.Items.Weapons.Magic
{
for (int randomBullets = 0; randomBullets < 4; randomBullets++)
{
- float SpeedX = velocity.X + Main.rand.Next(-25, 26) * 0.05f;
- float SpeedY = velocity.Y + Main.rand.Next(-25, 26) * 0.05f;
- Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI);
+ Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(10f)) * Main.rand.NextFloat(0.85f, 1.2f);
+ Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI);
}
return false;
}
diff --git a/Items/Weapons/Melee/StormSaber.cs b/Items/Weapons/Melee/StormSaber.cs
index 4df89ae204..723257bc87 100644
--- a/Items/Weapons/Melee/StormSaber.cs
+++ b/Items/Weapons/Melee/StormSaber.cs
@@ -14,10 +14,9 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 58;
Item.height = 64;
- Item.damage = 66;
+ Item.damage = 50;
Item.DamageType = DamageClass.Melee;
- Item.useAnimation = 23;
- Item.useTime = 23;
+ Item.useTime = Item.useAnimation = 23;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 6f;
@@ -31,17 +30,15 @@ namespace CalamityMod.Items.Weapons.Melee
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
- Projectile.NewProjectile(source, position, velocity, type, (int)(damage * 0.8), knockback, player.whoAmI);
+ Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
Vector2 spawnPos = new Vector2(player.MountedCenter.X + Main.rand.Next(-200, 201), player.MountedCenter.Y - 600f);
// 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction
Vector2 targetPos = Main.MouseWorld + new Vector2(Main.rand.Next(-30, 31), Main.rand.Next(-30, 31));
- velocity = targetPos - spawnPos;
- velocity.Normalize();
- velocity *= 13f;
+ velocity = Utils.DirectionTo(spawnPos, targetPos) * Item.shootSpeed;
- Projectile.NewProjectile(source, spawnPos, velocity, type, (int)(damage * 0.6), knockback, player.whoAmI);
+ Projectile.NewProjectile(source, spawnPos, velocity, type, (int)(damage * 0.75), knockback, player.whoAmI);
return false;
}
diff --git a/Items/Weapons/Rogue/SearedPan.cs b/Items/Weapons/Rogue/SearedPan.cs
deleted file mode 100644
index 5ccd6b6204..0000000000
--- a/Items/Weapons/Rogue/SearedPan.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using CalamityMod.Items.Materials;
-using CalamityMod.Projectiles.Rogue;
-using CalamityMod.Rarities;
-using CalamityMod.Tiles.Furniture.CraftingStations;
-using Microsoft.Xna.Framework;
-using Terraria;
-using Terraria.Audio;
-using Terraria.DataStructures;
-using Terraria.ID;
-using Terraria.ModLoader;
-
-namespace CalamityMod.Items.Weapons.Rogue
-{
- public class SearedPan : RogueWeapon
- {
- public static readonly SoundStyle SmashSound = new("CalamityMod/Sounds/Item/SearedPanSmash");
-
- // Attacks must be within 40 frames of each other to count as "consecutive" hits
- // This is a little less than double the use time
- public static int ConsecutiveHitOpening = 40;
- public override void SetDefaults()
- {
- Item.width = 60;
- Item.height = 36;
- Item.damage = 2222;
- Item.DamageType = RogueDamageClass.Instance;
- Item.knockBack = 10f;
- Item.noMelee = true;
- Item.noUseGraphic = true;
- Item.useStyle = ItemUseStyleID.Swing;
- Item.useAnimation = Item.useTime = 25;
- Item.reuseDelay = 1;
- Item.useLimitPerAnimation = 1;
- Item.UseSound = SoundID.Item1;
- Item.autoReuse = true;
- Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
- Item.rare = ModContent.RarityType();
- Item.shoot = ModContent.ProjectileType();
- Item.shootSpeed = 15f;
- Item.Calamity().donorItem = true;
- }
-
- public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
- {
- float mode = 1f;
- if (player.Calamity().searedPanCounter >= 3)
- {
- player.Calamity().searedPanCounter = 0;
- mode = 2f;
- }
- if (player.Calamity().StealthStrikeAvailable())
- {
- player.Calamity().searedPanCounter = 0;
- mode = 3f;
- }
- int pan = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, mode);
- if (mode > 1f && pan.WithinBounds(Main.maxProjectiles))
- {
- Main.projectile[pan].extraUpdates++;
- if (mode == 3f)
- Main.projectile[pan].Calamity().stealthStrike = true;
- }
- return false;
- }
-
- public override void AddRecipes()
- {
- CreateRecipe().
- AddIngredient().
- AddIngredient(5).
- AddIngredient(ItemID.LifeCrystal).
- AddIngredient(ItemID.Bone, 92).
- // AddIngredient(ItemID.Steak).
- AddTile().
- Register();
- }
- }
-}
diff --git a/Items/Weapons/Rogue/SearedPan.png b/Items/Weapons/Rogue/SearedPan.png
deleted file mode 100644
index b5bef1d2cc..0000000000
Binary files a/Items/Weapons/Rogue/SearedPan.png and /dev/null differ
diff --git a/Items/Weapons/Summon/RustyBeaconPrototype.cs b/Items/Weapons/Summon/RustyBeaconPrototype.cs
index 392bacbe06..b70e451dc8 100644
--- a/Items/Weapons/Summon/RustyBeaconPrototype.cs
+++ b/Items/Weapons/Summon/RustyBeaconPrototype.cs
@@ -33,6 +33,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.shoot = ModContent.ProjectileType();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
+ Item.sentry = true;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
diff --git a/Items/Weapons/Summon/SarosPossession.cs b/Items/Weapons/Summon/SarosPossession.cs
index a030e24c03..f765b703cd 100644
--- a/Items/Weapons/Summon/SarosPossession.cs
+++ b/Items/Weapons/Summon/SarosPossession.cs
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 44;
Item.height = 48;
- Item.damage = 60;
+ Item.damage = 66;
Item.mana = 10;
Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.Swing;
diff --git a/Localization/en-US/Mods.CalamityMod.Bestiary.hjson b/Localization/en-US/Mods.CalamityMod.Bestiary.hjson
index bed501d96b..eaab8a1256 100644
--- a/Localization/en-US/Mods.CalamityMod.Bestiary.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Bestiary.hjson
@@ -66,7 +66,7 @@ Nanodroid: Ambient lighting, total surveillance, instantaneous repair… With en
RepairUnitCritter: These handy little helpers are the reason that Draedon's decades-old labs stand to this day. Though bulkier and less energy efficient than nanodroids, having to take what power they need from the labs' generators, they can easily clean up the dust, though struggle with the rust.
//Normal Uncategorized Enemies
AeroSlime: Previously mundane slimes that have absorbed trace amounts of draconic essence from the outpour of energy caused by the re-enchantment of Aerialite. They now soar the skies with their newly sprouted wings, reaching heights few of their gelatinous kind ever have.
-ArmoredDigger: Despite being relatively primitive compared to Draedon's current technology, armored diggers continue to see use to this day. Though their primary directive is mining and delivering minerals, they also once cleared room for the numerous underground laboratories.
+Burrower: Despite being relatively primitive compared to Draedon's current technology, Burrowers continue to see use to this day. Though their primary directive is mining and delivering minerals, they also once cleared room for the numerous underground laboratories.
AuroraSpirit: Thought to be no more than an old wives' tale, sightings of aurora spirits have become commonplace since the defeat of the wall of flesh. Upon closer inspection, it appears these "spirits" are rather wisp-like entities clad in a cryonic shell, a sure sign that these were created by Archmage Permafrost.
BloomSlime: Imbued with profaned energy, this slime wishes to see the world reduced to ashes to ensure the suffering it brings is no more. However, the simplicity of their form makes it difficult for the slain goddess to fully impose her will onto them.
Bohldohr: Bohldohrs were made to serve the lihzahrds, being crafted from ancient stone and brought to life with magical power in the twilight of the great Lihzahrd Dynasty. But the sun sets on every civilization, and once their deity abandoned them, they were left to fend for themselves.
diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson
index 73152d034c..b61a8f2699 100644
--- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson
@@ -2,9 +2,9 @@ Abaddon: {
DisplayName: Abaddon
Tooltip:
'''
- 8% increased critical strike chance
- Critical strikes explode, causing nearby enemies to ignite with Brimstone Flames
- Reduces the damage of the Brimstone Flames debuff by 50%
+ {$CommonItemTooltip.PercentIncreasedCritChance}
+ Critical strikes explode, igniting nearby foes with [cbuff:CalamityMod/BrimstoneFlames]
+ Reduces damage taken from [cbuff:CalamityMod/BrimstoneFlames] by {1}%
'''
}
@@ -29,8 +29,8 @@ AbyssalDivingSuit: {
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
- Grants immunity to the sulphurous waters and Crush Depth's increased breath loss
- Grants resistance to the increased breath loss caused by Hadopelagic Pressure
+ Grants immunity to the sulphurous waters and [cbuff:CalamityMod/CrushDepth]'s increased breath loss
+ Grants resistance to the increased breath loss caused by [cbuff:CalamityMod/HadopelagicPressure]
'''
}
@@ -39,7 +39,7 @@ AbyssalMirror: {
Tooltip:
'''
Enemies are less likely to target you, even in the abyss
- Generate stealth 25% faster when standing still and 12% faster while moving
+ Generate stealth {0}% faster when standing still and {1}% faster while moving
Grants the ability to dodge attacks, releasing a cloud of lumenyl fluid which damages and stuns nearby enemies
'''
HoldShiftTooltip:
@@ -54,7 +54,7 @@ AeroStone: {
DisplayName: Aero Stone
Tooltip:
'''
- Provides an additional 50 flight time
+ Provides an additional {0} seconds of flight time
You slowly recover flight time while in the air while not flying or gliding
'One of the ancient relics'
'''
@@ -62,16 +62,16 @@ AeroStone: {
Affliction: {
DisplayName: Affliction
- Tooltip: Gives all teammates +0.5 HP/s life regen, +10% max life, 7% damage reduction, 9 defense and 10% increased damage
+ Tooltip: Gives all teammates +{0} HP/s life regen, +{1}% max life, {2}% damage reduction, {3} defense and {4}% increased damage
}
AlchemicalFlask: {
DisplayName: Alchemical Flask
Tooltip:
'''
- All attacks inflict the Plague and reduces damage taken from the Plague by 50%
+ All attacks inflict the [cbuff:CalamityMod/Plague] and reduces damage taken from the [cbuff:CalamityMod/Plague] by {0}%
Projectiles spawn plague seekers on enemy hits
- Releases plague bees when damaged and douses you in honey
+ Releases plague bees and douses you in [cbuff:Honey] when damaged
'''
}
@@ -79,7 +79,7 @@ AlluringBait: {
DisplayName: Alluring Bait
Tooltip:
'''
- Increases fishing power by 10
+ Increases fishing power by {0}
Increases the yield of potion ingredient fish
'''
}
@@ -88,7 +88,7 @@ AmalgamatedBrain: {
DisplayName: Amalgamated Brain
Tooltip:
'''
- 5% increased damage
+ {0}% increased damage
Taking damage confuses nearby enemies and spawns a dank creeper
The dank creeper flies above you, exploding into several shaderain clouds
Grants the ability to dodge attacks
@@ -101,9 +101,9 @@ AmbrosialAmpoule: {
DisplayName: Ambrosial Ampoule
Tooltip:
'''
- +50 max life
- Grants +2 to +5 HP/s life regen based on missing health
- Grants the Honey buff
+ +{0} max life
+ Grants +{1} to +{2} HP/s life regen based on missing health
+ Grants the [cbuff:Honey] buff
Current boost: +[REGEN] HP/s
Fire and sickness debuff durations are halved
You emit yellow light if visibility is enabled
@@ -114,7 +114,7 @@ AncientFossil: {
DisplayName: Ancient Fossil
Tooltip:
'''
- Increases mining speed by 10%
+ Increases mining speed by {0}%
Provides immunity to damage from falling blocks
'''
}
@@ -134,13 +134,13 @@ AngelicAlliance: {
'''
Call upon the force of heaven to empower your attacks and minions
Courage, Enlightenment, Bliss. United in Judgement
- +2 max minions, 15% increased summon damage, and 8% increased damage to all other classes
- +2 HP/s life regen while airborne using wings
- Press [KEY] to grace yourself in divinity for 15 seconds
- While Divine Bless is active, for every minion you have, an archangel shall be summoned to aid you in combat
- Each spawned angel will instantly restore 2 HP
- All minion attacks inflict Banishing Fire, and you are granted a flat 4 HP/s regen
- This effect has a cooldown of 1 minute
+ +{0} max minions, {1}% increased summon damage, and {2}% increased damage to all other classes
+ +{3} HP/s life regen while flight time is partially or fully expended
+ Press [KEY] to grace yourself with the [cbuff:CalamityMod/DivineBless] buff for {4} seconds
+ While active, an archangel is summoned for every minion you have
+ Archangels vaporize foes with heavenly light and each restore {5} HP upon spawning
+ Minion attacks inflict [cbuff:CalamityMod/BanishingFire], and you gain a flat {6} HP/s regen
+ This effect has a cooldown of {7} minute
'''
}
@@ -162,9 +162,9 @@ AquaticEmblem: {
Tooltip:
'''
Most ocean enemies become friendly and allows breathing underwater
- Being underwater boosts your defense over time, and slows movement speed
- The defense boost and movement speed reduction slowly vanish outside of water
- Maximum defense boost is 50 and movement speed reduction is 10%
+ Being underwater gradually increases defense but slows movement speed over {0} seconds
+ This effect slowly vanishes outside of water and resets while mounted
+ Maximum defense boost is {1} and movement speed reduction is {2}%
Provides a small amount of light and moderately reduces breath loss in the abyss
'''
}
@@ -180,11 +180,11 @@ AquaticHeart: {
FullTooltip:
'''
Wow, you can swim now!
- Being underwater increases max speed and acceleration by 15%
+ Being underwater increases max speed and acceleration by {0}%
Greatly reduces breath loss and provides a small amount of light in the abyss
- Attackers are inflicted with Glacial State
- Gain a fragile ice barrier that grants 20% damage reduction for one hit
- The ice shield regenerates after 30 seconds
+ Attackers are inflicted with [cbuff:CalamityMod/GlacialState]
+ Gain a fragile ice barrier that grants {1}% damage reduction for one hit
+ The ice shield regenerates after {2} seconds
'''
}
@@ -192,7 +192,7 @@ ArcFlashRing: {
DisplayName: Arc Flash Ring
Tooltip:
'''
- Attacks have a 6% chance to call down a lightning bolt for 4x damage
+ Attacks have a {0}% chance to call down a lightning bolt for {1}x damage
The chance is reduced for each enemy an attack hits
The bolt's damage is based on non-crit damage, but can itself crit
Bolts are transparent and silent if visibility is disabled
@@ -203,9 +203,9 @@ ArchaicPowder: {
DisplayName: Archaic Powder
Tooltip:
'''
- Increases mining speed by 25%
+ Increases mining speed by {0}%
Provides immunity to damage from falling blocks and dart traps
- 65% resistance to all damage from traps
+ {1}% resistance to all damage from traps
Does not stack with downgrades
'''
}
@@ -214,9 +214,9 @@ AscendantInsignia: {
DisplayName: Ascendant Insignia
Tooltip:
'''
- Increases wing flight time by 50%, movement and jump speed by 15%, and acceleration by 1.5x
- Pressing [KEY] grants you the power of ascension, providing infinite flight time for 4 seconds
- Ascension has a 40 second cooldown
+ Increases wing flight time by {0}%, movement and jump speed by {1}%, and acceleration by {2}x
+ Pressing [KEY] grants you the power of ascension, providing infinite flight time for {3} seconds
+ Ascension has a {4} second cooldown
'''
}
@@ -224,9 +224,9 @@ AsgardianAegis: {
DisplayName: Asgardian Aegis
Tooltip:
'''
+ {$Common.KnockbackImmunity}
Allows the ability to dash, empowered by a cosmic inferno
This dash can ram through enemies without taking damage
- Grants immunity to knockback
'''
}
@@ -234,9 +234,9 @@ AsgardsValor: {
DisplayName: Asgard's Valor
Tooltip:
'''
+ {$Common.KnockbackImmunity}
Allows the ability to ram dash
This dash can ram through enemies without taking damage
- Grants immunity to knockback
'''
}
@@ -293,7 +293,7 @@ BlazingCore: {
DisplayName: Blazing Core
Tooltip:
'''
- Grants immunity to knockback
+ {$Common.KnockbackImmunity}
The searing core of the Profaned Goddess
Pressing [KEY] will activate a parry, encasing you in luminous profaned crystal
Being hit shortly after encasement will shatter the crystal
@@ -308,7 +308,7 @@ BloodflareCore: {
DisplayName: Bloodflare Core
Tooltip:
'''
- Grants immunity to knockback
+ {$Common.KnockbackImmunity}
Recovering defense damage heals you, each defense recovered gives 1 HP
Taking damage converts at least half of your total defense in defense damage
'''
@@ -531,7 +531,7 @@ DarkSunRing: {
DisplayName: Dark Sun Ring
Tooltip:
'''
- Grants immunity to knockback
+ {$Common.KnockbackImmunity}
12% increased damage
+0.5 HP/s life regen and +2 max minions
Increased minion knockback
@@ -615,8 +615,8 @@ DraedonsHeart: {
DisplayName: Draedon's Heart
Tooltip:
'''
+ {$Common.KnockbackImmunity}
{0}% reduced contact damage from enemies
- Grants immunity to knockback
[NANODESC]
With full Nanomachines, press [KEY] to heal {1} health over {2} {^2:second;seconds}
While healing, you take [DR]% less damage
@@ -716,9 +716,9 @@ ElysianAegis: {
DisplayName: Elysian Aegis
Tooltip:
'''
+ {$Common.KnockbackImmunity}
Allows the ability to dash, empowered by holy fire
This dash can ram through enemies without taking damage
- Grants immunity to knockback
'Blessed by the Profaned Flame'
'''
}
@@ -787,7 +787,7 @@ FlameLickedShell: {
DisplayName: Flame-Licked Shell
Tooltip:
'''
- Grants immunity to knockback
+ {$Common.KnockbackImmunity}
Pressing [KEY] will activate a parry, encasing you in rocks
Being hit shortly after encasement will implode the rocks
Upon implosion, a ring of brimstone hellfire is launched outwards and you receive 90% DR for that hit
@@ -869,7 +869,7 @@ GiantTortoiseShell: {
DisplayName: Giant Tortoise Shell
Tooltip:
'''
- Grants immunity to knockback
+ {$Common.KnockbackImmunity}
5% increased damage reduction and 10% reduced dash velocity
Taking a hit restores dash velocity and reduces defense and damage reduction for 3 seconds
'''
@@ -1238,7 +1238,7 @@ OldDukeScales: {
DisplayName: Old Duke's Scales
Tooltip:
'''
- Grants immunity to knockback
+ {$Common.KnockbackImmunity}
10% increased damage reduction, max movement speed, and acceleration
25% increased dash velocity and length
Adds a stamina tracker to the cooldown rack
@@ -1417,7 +1417,7 @@ RadiantOoze: {
DisplayName: Radiant Ooze
Tooltip:
'''
- Grants +2 to +5 HP/s life regen based on missing health
+ Grants +{0} to +{1} HP/s life regen based on missing health
Current boost: +[REGEN] HP/s
You emit yellow light if visibility is enabled
'''
@@ -1432,7 +1432,7 @@ RampartofDeities: {
DisplayName: Rampart of Deities
Tooltip:
'''
- Grants immunity to knockback
+ {$Common.KnockbackImmunity}
Releases a blast of homing star-bees[TOGGLE] and drenches you in [cbuff:Honey] after taking damage
Increases the length of invincibility, with it increasing even more when at low health or taking high damage attacks
Reduces damage taken by 25% when below 50% life
@@ -1859,8 +1859,8 @@ TheAbsorber: {
DisplayName: The Absorber
Tooltip:
'''
+ {$Common.KnockbackImmunity}
{0}% increased movement and jump speed
- Grants immunity to knockback
Attackers take immense damage and are afflicted with a crippling sickness debuff
Using a healing potion will spawn a green aura that lasts for {1} seconds
Walking into the aura removes all debuffs once and grants {2} HP/s regen, {3}% damage, and {4}% damage reduction
@@ -1949,7 +1949,7 @@ TheSponge: {
DisplayName: The Sponge
Tooltip:
'''
- Grants immunity to knockback
+ {$Common.KnockbackImmunity}
Gain a barrier with {0} health
The barrier grants {1}% damage reduction while active
[ADREN]
@@ -2051,9 +2051,9 @@ VoidofExtinction: {
DisplayName: Void of Extinction
Tooltip:
'''
- 13% increased critical strike chance
- Critical strikes explode, igniting enemies with Brimstone Flames
- Reduces the damage of the Brimstone Flames debuff by 50%
+ {$CommonItemTooltip.PercentIncreasedCritChance}
+ Critical strikes explode, igniting nearby foes with [cbuff:CalamityMod/BrimstoneFlames]
+ Reduces damage taken from [cbuff:CalamityMod/BrimstoneFlames] by {1}%
'''
}
@@ -2108,7 +2108,7 @@ YharimsGift: {
DisplayName: Yharim's Gift
Tooltip:
'''
- Grants immunity to knockback
+ {$Common.KnockbackImmunity}
Flaming meteors rain down after getting hit
Volatile dragon dust trails behind you
Increases damage and movement speed by 15%
@@ -2163,15 +2163,6 @@ Popo: {
'''
}
-PunchCard: {
- DisplayName: Punch Card
- Tooltip: "[c/842593:'Please... please get world record...']"
- // These are used to spawn the item via chat -- both must be all lower case for the detection to work
- SpawnText1: it's late
- SpawnText1Alt: its late
- SpawnText2: go to bed
-}
-
SharkyPlush: {
DisplayName: Sharky Plush
Tooltip: "[c/696969:'Look out, for the force without form...']"
diff --git a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson
index 7b06b22a3e..5c7544f449 100644
--- a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson
@@ -267,16 +267,6 @@ MiracleFruit: {
MushroomPlasmaRoot.DisplayName: Mushroom Plasma Root
-NimbleBounder: {
- DisplayName: Nimble Bounder
- Tooltip:
- '''
- Permanently increases movement and jump speed by {0}%
- Permanently increases acceleration by {1}%
- [c/842593:'Might be useful for speedrunning']
- '''
-}
-
PhantomHeart: {
DisplayName: Phantom Heart
Tooltip:
diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson
index f82d072a33..6f75a1b1bd 100644
--- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson
@@ -8,7 +8,7 @@ AndroombaBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
AnthozoanCrabBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
AquaticUrchinBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
AriesBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
-ArmoredDiggerBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
+BurrowerBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
AstraglomerateBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
AstralachneaBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
AstralProbeBanner.DisplayName: "{$Items.Placeables.FormattedBannerName}"
@@ -510,32 +510,6 @@ BabyGhostBellJar: {
Tooltip: ""
}
-CalamityCanvas2023: {
- DisplayName: Calamity Canvas 2023
- Tooltip:
- '''
- when placed to open a UI which allows customizing the focus of the painting
- to make the focus follow the cursor, again to set it
- Arrow keys can also be used to manually adjust the focus point
- The scroll wheel zooms the focus in and out
- Hold Shift to hide the UI without closing it
- 'Embrace chaos'
- '''
-}
-
-CalamityCanvas2024: {
- DisplayName: Calamity Canvas 2024
- Tooltip:
- '''
- when placed to open a UI which allows customizing the focus of the painting
- to make the focus follow the cursor, again to set it
- Arrow keys can also be used to manually adjust the focus point
- The scroll wheel zooms the focus in and out
- Hold Shift to hide the UI without closing it
- 'Embrace havoc'
- '''
-}
-
AquaticScourgeRelic: {
DisplayName: Aquatic Scourge Relic
Tooltip: A glimpse into what could have been...
@@ -771,16 +745,6 @@ CrimsonEffigy: {
'''
}
-ThankYouPainting: {
- DisplayName: Thank You
- Tooltip:
- '''
- Thanks to the entire team, everyone who supported, and those who all play the mod and keep it alive!
- The confines of this painting is not enough to fit the entire team
- Hold Shift to see a list of past and current developers
- '''
-}
-
EffigyOfDecay: {
DisplayName: Effigy of Decay
Tooltip:
@@ -901,6 +865,51 @@ NavyPrismTorch: {
Tooltip: Can be placed in water
}
+AmidiasPainting: {
+ DisplayName: Sea King's Release
+ Tooltip:
+ '''
+ 'O. Rios'
+ 'September-October!'
+ '''
+}
+
+CalamityCanvas2023: {
+ DisplayName: Calamity Canvas 2023
+ Tooltip:
+ '''
+ when placed to open a UI which allows customizing the focus of the painting
+ to make the focus follow the cursor, again to set it
+ Arrow keys can also be used to manually adjust the focus point
+ The scroll wheel zooms the focus in and out
+ Hold Shift to hide the UI without closing it
+ 'Embrace chaos'
+ '''
+}
+
+CalamityCanvas2024: {
+ DisplayName: Calamity Canvas 2024
+ Tooltip:
+ '''
+ when placed to open a UI which allows customizing the focus of the painting
+ to make the focus follow the cursor, again to set it
+ Arrow keys can also be used to manually adjust the focus point
+ The scroll wheel zooms the focus in and out
+ Hold Shift to hide the UI without closing it
+ 'Embrace havoc'
+ '''
+}
+
+ThankYouPainting: {
+ DisplayName: Thank You
+ Tooltip:
+ '''
+ Thanks to the entire team, everyone who supported, and those who all play the mod and keep it alive!
+ The confines of this painting is not enough to fit the entire team
+ Hold Shift to see a list of past and current developers
+ '''
+}
+
PiggyCage: {
DisplayName: Piggy Cage
Tooltip: ""
@@ -3977,11 +3986,6 @@ VolcanicSand: {
// End of Sunken Sea
-Dreadstone: {
- DisplayName: Dreadstone
- Tooltip: ""
-}
-
UelibloomBrick: {
DisplayName: Uelibloom Brick
Tooltip: ""
diff --git a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson
index fe583cd6b0..8f627dff88 100644
--- a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson
@@ -36,6 +36,15 @@ BlasphemousDonut: {
'''
}
+BottledPanacea: {
+ DisplayName: Bottled Panacea
+ Tooltip:
+ '''
+ Cures you of all sickness and electricity debuffs when consumed
+ This has a 30 second cooldown
+ '''
+}
+
BoundingPotion: {
DisplayName: Bounding Potion
Tooltip: "{0}% increased jump speed and {1}% increased jump height"
diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson
index cfd3dff3a6..a3d4771575 100644
--- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson
@@ -1011,20 +1011,6 @@ SealedSingularity: {
'''
}
-SearedPan: {
- DisplayName: Seared Pan
- Tooltip:
- '''
- Fires a frying pan at high velocity
- Enemy hits summon fireballs that linger around the target
- Landing three consecutive hits will launch a golden pan on the next throw
- Golden pans cause all fireballs to aggressively home in on their target on hit
- Stealth strikes act similar to golden pans but also explode into golden sparks
- Stealth strikes also summon additional fireballs on hit
- [c/842593:'dAMaGe iS rAthEr cOnSisTeNT']
- '''
-}
-
Seraphim: {
DisplayName: Seraphim
Tooltip:
diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson
index 51c57ca16b..c03a360b6d 100644
--- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson
@@ -181,13 +181,11 @@ NanoblackSplit.DisplayName: Nanoblack Blade
NanoblackStealthSplit.DisplayName: Nanoblack Afterimage
NastyChollaBol.DisplayName: Nasty Cholla
NastyChollaNeedle.DisplayName: Cactus Needle
-NiceCock.DisplayName: Kitchen Fire
NightsGazeProjectile.DisplayName: Night's Gaze
NightsGazeSpark.DisplayName: Night's Gaze Spark
NightsGazeStar.DisplayName: Night's Gaze Star
OrichalcumSpikedGemstoneProjectile.DisplayName: Orichalcum Gemstone
PalladiumJavelinProjectile.DisplayName: Palladium Javelin
-PanSpark.DisplayName: Pan Spark
PartisanExplosion.DisplayName: Profaned Explosion
PenumbraBomb.DisplayName: Penumbra Bomb
PenumbraSoul.DisplayName: Penumbra Soul
@@ -242,7 +240,6 @@ SeafoamBubble.DisplayName: Seafoam Bubble
SealedSingularityBlackhole.DisplayName: Sealed Blackhole
SealedSingularityGore.DisplayName: Sealed Singularity Fragment
SealedSingularityProj.DisplayName: Sealed Singularity
-SearedPanProjectile.DisplayName: Pan
SeraphimAngelicLight.DisplayName: Light Orb
SeraphimAngelicLight2.DisplayName: Light Orb
SeraphimBeamLarge.DisplayName: Holy Beam
diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson
index df88751a5d..b78a858638 100644
--- a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson
@@ -241,7 +241,6 @@ SandMark.DisplayName: Mark
SandnadoMinion.DisplayName: Sandnado
SandTornado.DisplayName: Tornado
SarosAura.DisplayName: Saros Aura
-SarosMicrosun.DisplayName: Saros Microsun
SarosSunfire.DisplayName: Saros Sunfire
SeashineSwordProj.DisplayName: Seashine Sword
SeekerSummonProj.DisplayName: Soul Seeker
@@ -274,9 +273,6 @@ MinionPlasmaBlast.DisplayName: Volatile Plasma Blast
MinionPlasmaGas.DisplayName: Superheated Plasma Cloud
MinionTeslaOrb.DisplayName: Tesla Sphere
SmallSkeletonMinion.DisplayName: Small Skeleton
-SolarBeam.DisplayName: Solar Beam
-SolarGod.DisplayName: Vengeful Solar Spirit
-SolarPixie.DisplayName: Solar Pixie
Spikecrag.DisplayName: Spikecrag
SpikecragSpike.DisplayName: Spikecrag Spike
SquirrelSquireAcorn.DisplayName: Squirrel Acorn
diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson
index d01cc8ac60..87001e5c43 100644
--- a/Localization/en-US/Mods.CalamityMod.UI.hjson
+++ b/Localization/en-US/Mods.CalamityMod.UI.hjson
@@ -127,6 +127,7 @@ Cooldowns: {
OldDukeScalesFatigue: Stamina
OmegaBlueActive: Abyssal Madness
OmegaBlueCooldown: Abyssal Madness Cooldown
+ Panacea: Panacea Cooldown
PermafrostConcoction: Permafrost's Concoction Cooldown
PlagueBlackout: Plague Blackout Cooldown
PotionSickness: Healing Cooldown
@@ -611,13 +612,13 @@ Disenchant: Disenchant
BetterUnderworld: Creating a smoother Underworld
BetterShimmer: Placing shimmer in a sane location
UnderworldStructures: Remnants of an Azafurian and Demonic war
-UnderworldPillars: Constructing Underworld pillars
UnderworldTreesAndGrass: Growing Underworld flora
UnderworldGeyserTraps: Adding an Underworld minefield
ShimmerShrine: Excavating an ancient shimmer well
EvilIslandCorrupt: Adding a putrid floating island
EvilIslandCrimson: Adding a grotesque floating island
AstralChest: Placing an astral chest
+LivingMahoganyTree: Growing a giant jungle tree
BetterJungleTemple: Building a bigger jungle temple
JungleTempleAltar: Placing the Lihzahrd altar
GiantBeehive: Building a giant beehive
diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson
index 2a3d8e8414..4814d6cee0 100644
--- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson
@@ -188,7 +188,7 @@ EditedTooltip: {
FrogLeg: Increases jump speed by {0}% and allows auto-jump
// Soaring Insignia
EmpressFlightBooster1: Increases wing flight time by 33%
- EmpressFlightBooster2: Increases movement and jump speed by 10% and acceleration by 1.25x
+ EmpressFlightBooster2: Increases movement speed by 7.5%, jump speed by 10%, and acceleration by 1.25x
GravityGlobe:
'''
Provides 32% increased jump speed and increased fall speed
diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs
index 9d2985bac3..98fd3607af 100644
--- a/ModSupport/ModCalls.cs
+++ b/ModSupport/ModCalls.cs
@@ -981,8 +981,6 @@ namespace CalamityMod
"TaintedCloudberry" => player.Calamity().tCloudberry,
"SacredStrawberry" => player.Calamity().sStrawberry,
- "NimbleBounder" => player.Calamity().nimbleBounderBoost,
-
"CometShard" => player.Calamity().cShard,
"EtherealCore" => player.Calamity().eCore,
"PhantomHeart" => player.Calamity().pHeart,
@@ -1016,8 +1014,6 @@ namespace CalamityMod
case "EtherealCore": player.Calamity().eCore = value; break;
case "PhantomHeart": player.Calamity().pHeart = value; break;
- case "NimbleBounder": player.Calamity().nimbleBounderBoost = value; break;
-
case "MushroomPlasmaRoot": player.Calamity().rageBoostOne = value; break;
case "InfernalBlood": player.Calamity().rageBoostTwo = value; break;
case "RedLightningContainer": player.Calamity().rageBoostThree = value; break;
diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs
index 90ef06dcaa..883e0fb931 100644
--- a/NPCs/AquaticScourge/AquaticScourgeHead.cs
+++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs
@@ -689,7 +689,8 @@ namespace CalamityMod.NPCs.AquaticScourge
normalOnly.Add(ModContent.ItemType(), ThankYouPainting.DropInt);
// Equipment
- normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
+ // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss
+ // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction);
normalOnly.Add(ModContent.ItemType(), 10);
}
diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs
index b7ed5d4d8b..a4693e2652 100644
--- a/NPCs/AstrumAureus/AstrumAureus.cs
+++ b/NPCs/AstrumAureus/AstrumAureus.cs
@@ -1309,7 +1309,8 @@ namespace CalamityMod.NPCs.AstrumAureus
normalOnly.Add(ModContent.ItemType(), ThankYouPainting.DropInt);
// Equipment
- normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
+ // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss
+ // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
// Other
normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType(), 1, 9, 12));
diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs
index e6a3b2f9fb..b9ab4e8182 100644
--- a/NPCs/AstrumDeus/AstrumDeusHead.cs
+++ b/NPCs/AstrumDeus/AstrumDeusHead.cs
@@ -974,7 +974,8 @@ namespace CalamityMod.NPCs.AstrumDeus
normalOnly.Add(ModContent.ItemType(), ThankYouPainting.DropInt);
// Equipment
- normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
+ // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss
+ // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
normalOnly.Add(ModContent.ItemType(), 5);
// Materials
diff --git a/NPCs/BaseWormNPC.cs b/NPCs/BaseWormNPC.cs
index 26e5538370..3535bd42d5 100644
--- a/NPCs/BaseWormNPC.cs
+++ b/NPCs/BaseWormNPC.cs
@@ -593,33 +593,51 @@ namespace CalamityMod.NPCs
#endregion
#region Draw
+
+ public override void FindFrame(int frameHeight)
+ {
+ if (NPC.IsABestiaryIconDummy)
+ {
+ NPC.rotation = MathF.Sin(Main.GlobalTimeWrappedHourly) * 0.2f + MathHelper.PiOver2;
+ }
+ }
public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
{
+ if (NPC.IsABestiaryIconDummy)
+ {
+ drawColor = Color.White;
+ SegmentRigidity = 0.1f;
+ UpdateSegments();
+ }
for (int i = Segments.Count - 1; i >= 0; i--)
{
DrawSegment(spriteBatch, screenPos, drawColor, Segments[i]);
}
- spriteBatch.Draw(TextureAssets.Npc[Type].Value, NPC.Center - Main.screenPosition, null, drawColor* NPC.Opacity, NPC.rotation, TextureAssets.Npc[Type].Value.Size() / 2, NPC.scale, SpriteEffects.None, 1);
+ spriteBatch.Draw(TextureAssets.Npc[Type].Value, NPC.Center - screenPos, null, drawColor* NPC.Opacity, NPC.rotation, TextureAssets.Npc[Type].Value.Size() / 2, NPC.scale, SpriteEffects.None, 1);
if (GlowTextures.Count > 0 && GlowTextures[0] is not null)
- spriteBatch.Draw(GlowTextureAssets[0].Value, NPC.Center - Main.screenPosition, null, Color.White * NPC.Opacity, NPC.rotation, GlowTextureAssets[0].Size() / 2, NPC.scale, SpriteEffects.None, 1);
+ spriteBatch.Draw(GlowTextureAssets[0].Value, NPC.Center - screenPos, null, Color.White * NPC.Opacity, NPC.rotation, GlowTextureAssets[0].Size() / 2, NPC.scale, SpriteEffects.None, 1);
return false;
}
public virtual void DrawSegment(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor, BaseWormSegment segment)
{
var color = Lighting.GetColor(segment.Center.ToTileCoordinates());
+ if (NPC.IsABestiaryIconDummy)
+ {
+ color = Color.White;
+ }
if (!SegmentTextureAssets.IndexInRange(segment.segmentType))
{
return;
}
var tex = SegmentTextureAssets[segment.segmentType].Value;
- spriteBatch.Draw(tex, segment.Center - Main.screenPosition, null, color * segment.Opacity, segment.rotation, tex.Size() / 2 + (SegmentTypeDrawOffsets[segment.segmentType]), NPC.scale, SpriteEffects.None, 1);
+ spriteBatch.Draw(tex, segment.Center - screenPos, null, color * segment.Opacity, segment.rotation, tex.Size() / 2 + (SegmentTypeDrawOffsets[segment.segmentType]), NPC.scale, SpriteEffects.None, 1);
if (!GlowTextures.IndexInRange(segment.segmentType+1) || GlowTextures[segment.segmentType+1] is null)
{
return;
}
tex = GlowTextureAssets[segment.segmentType+1].Value;
- spriteBatch.Draw(tex, segment.Center - Main.screenPosition, null, Color.White * segment.Opacity, segment.rotation, tex.Size() / 2 + (SegmentTypeDrawOffsets[segment.segmentType]), NPC.scale, SpriteEffects.None, 1);
+ spriteBatch.Draw(tex, segment.Center - screenPos, null, Color.White * segment.Opacity, segment.rotation, tex.Size() / 2 + (SegmentTypeDrawOffsets[segment.segmentType]), NPC.scale, SpriteEffects.None, 1);
}
#endregion
}
diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs
index d98501fe87..35a898ecc0 100644
--- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs
+++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs
@@ -897,7 +897,8 @@ namespace CalamityMod.NPCs.BrimstoneElemental
ModContent.ItemType(),
};
normalOnly.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, accs));
- normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
+ // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss
+ // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
// Vanity
normalOnly.Add(ModContent.ItemType(), 7);
diff --git a/NPCs/Bumblebirb/Dragonfolly.cs b/NPCs/Bumblebirb/Dragonfolly.cs
index b706d67a21..b9a6da5101 100644
--- a/NPCs/Bumblebirb/Dragonfolly.cs
+++ b/NPCs/Bumblebirb/Dragonfolly.cs
@@ -1248,7 +1248,8 @@ namespace CalamityMod.NPCs.Bumblebirb
normalOnly.Add(ModContent.ItemType(), 1, 25, 30);
// Equipment
- normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
+ // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss
+ // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction);
// Vanity
diff --git a/NPCs/CalClone/CalamitasClone.cs b/NPCs/CalClone/CalamitasClone.cs
index 6f8ba0ac36..6e90520411 100644
--- a/NPCs/CalClone/CalamitasClone.cs
+++ b/NPCs/CalClone/CalamitasClone.cs
@@ -1036,7 +1036,8 @@ namespace CalamityMod.NPCs.CalClone
normalOnly.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, items));
// Equipment
- normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
+ // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss
+ // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction);
normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction);
diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs
index 4f0390cbe5..571ad01b7c 100644
--- a/NPCs/CalamityGlobalNPCLoot.cs
+++ b/NPCs/CalamityGlobalNPCLoot.cs
@@ -899,8 +899,6 @@ namespace CalamityMod.NPCs
// 5-10 Nightmare Fuel @ 100% IF Devourer of Gods dead
postDoG.Add(ModContent.ItemType(), 1, 5, 10);
- pMoon.OnSuccess(ItemDropRule.ByCondition(new Conditions.NotExpert(), ItemID.WitchBroom, 5));
-
// Master items drop in Revengeance
pMoon.OnSuccess(ItemDropRule.ByCondition(DropHelper.RevNoMaster, ItemID.MourningWoodMasterTrophy));
pMoon.OnSuccess(ItemDropRule.ByCondition(DropHelper.RevNoMaster, ItemID.SpookyWoodMountItem, 4));
@@ -1127,8 +1125,8 @@ namespace CalamityMod.NPCs
};
npcLoot.Add(new DropOneByOne(ItemID.Gel, kingSlimeGelSpray));
- // Expert+ drops are also available on Normal
- npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.RoyalGel));
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ // npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.RoyalGel));
// Would be in the bag otherwise
npcLoot.AddNormalOnly(ItemDropRule.ByCondition(DropHelper.Remix, ItemID.Keybrand, DropHelper.NormalWeaponDropRateInt));
@@ -1149,8 +1147,8 @@ namespace CalamityMod.NPCs
break;
case NPCID.EyeofCthulhu:
- // Expert+ drops are also available on Normal
- npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.EoCShield));
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ // npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.EoCShield));
// Would be in the bag otherwise
npcLoot.AddNormalOnly(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction);
@@ -1171,15 +1169,12 @@ namespace CalamityMod.NPCs
case NPCID.EaterofWorldsHead:
case NPCID.EaterofWorldsBody:
case NPCID.EaterofWorldsTail:
- // Expert+ drops are also available on Normal. Drop what would be in the bag otherwise
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
LeadingConditionRule EoWKill = new(DropHelper.If((info) => info.npc.boss));
- EoWKill.Add(DropHelper.PerPlayer(ItemID.WormScarf));
+ // EoWKill.Add(DropHelper.PerPlayer(ItemID.WormScarf));
EoWKill.Add(ModContent.ItemType(), ThankYouPainting.DropInt);
npcLoot.AddNormalOnly(EoWKill);
- // Would be in the bag otherwise
- npcLoot.AddIf((info) => info.npc.boss, ModContent.ItemType(), ThankYouPainting.DropInt);
-
// Master items drop in Revengeance
rev.AddIf((info) => info.npc.boss, ItemID.EaterofWorldsMasterTrophy);
rev.AddIf((info) => info.npc.boss, ItemID.EaterOfWorldsPetItem, 4);
@@ -1203,8 +1198,8 @@ namespace CalamityMod.NPCs
break;
case NPCID.BrainofCthulhu:
- // Expert+ drops are also available on Normal
- npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.BrainOfConfusion));
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ // npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.BrainOfConfusion));
// Would be in the bag otherwise
npcLoot.AddNormalOnly(ModContent.ItemType(), ThankYouPainting.DropInt);
@@ -1253,8 +1248,8 @@ namespace CalamityMod.NPCs
}
catch (ArgumentNullException) { }
- // Expert+ drops are also available on Normal
- npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.BoneHelm));
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ // npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.BoneHelm));
// Would be in the bag otherwise
npcLoot.AddNormalOnly(ModContent.ItemType(), ThankYouPainting.DropInt);
@@ -1276,8 +1271,9 @@ namespace CalamityMod.NPCs
// Define a replacement rule which drops the weapons Calamity style.
npcLoot.AddNormalOnly(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, ItemID.BeeKeeper, ItemID.BeesKnees, ItemID.BeeGun, ModContent.ItemType()));
- // Expert+ drops are also available on Normal
- npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.HiveBackpack));
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ // npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.HiveBackpack));
+
npcLoot.AddNormalOnly(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction);
// Would be in the bag otherwise
@@ -1311,8 +1307,8 @@ namespace CalamityMod.NPCs
};
npcLoot.Add(new DropOneByOne(ItemID.Bone, skeletronBoneSpray));
- // Expert+ drops are also available on Normal
- npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.BoneGlove));
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ // npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.BoneGlove));
// Would be in the bag otherwise
npcLoot.AddNormalOnly(ModContent.ItemType(), ThankYouPainting.DropInt);
@@ -1411,12 +1407,12 @@ namespace CalamityMod.NPCs
break;
case NPCID.QueenSlimeBoss:
- // Expert+ drops are also available on Normal
- npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.VolatileGelatin));
- npcLoot.AddNormalOnly(ItemID.SoulofLight, 1, 15, 20);
- npcLoot.AddNormalOnly(ItemID.PinkGel, 1, 15, 20);
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ // npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.VolatileGelatin));
// Would be in the bag otherwise
+ npcLoot.AddNormalOnly(ItemID.SoulofLight, 1, 15, 20);
+ npcLoot.AddNormalOnly(ItemID.PinkGel, 1, 15, 20);
npcLoot.AddNormalOnly(ModContent.ItemType(), ThankYouPainting.DropInt);
// Master items drop in Revengeance
@@ -1438,8 +1434,8 @@ namespace CalamityMod.NPCs
// Define a replacement rule which respects the Early Hardmode Progression Rework.
npcLoot.AddNormalOnly(ItemDropRule.ByCondition(DropHelper.HallowedBarsCondition, ItemID.HallowedBar, 1, 15, 30));
- // Expert+ drops are also available on Normal
- npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.MechanicalWagonPiece));
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ // npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.MechanicalWagonPiece));
// Would be in the bag otherwise
npcLoot.AddNormalOnly(ModContent.ItemType(), ThankYouPainting.DropInt);
@@ -1479,8 +1475,9 @@ namespace CalamityMod.NPCs
}
catch (ArgumentNullException) { }
- // Expert+ drops are also available on Normal. These are done manually due to Last Twin Standing.
- npcLoot.AddIf((info) => !Main.expertMode && IsLastTwinStanding(info), ItemID.MechanicalWheelPiece);
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ // These are done manually due to Last Twin Standing.
+ // npcLoot.AddIf((info) => !Main.expertMode && IsLastTwinStanding(info), ItemID.MechanicalWheelPiece);
// Would be in the bag otherwise
npcLoot.AddIf((info) => !Main.expertMode && IsLastTwinStanding(info), ModContent.ItemType(), ThankYouPainting.DropInt);
@@ -1506,8 +1503,8 @@ namespace CalamityMod.NPCs
// Define a replacement rule which respects the Early Hardmode Progression Rework.
npcLoot.AddNormalOnly(ItemDropRule.ByCondition(DropHelper.HallowedBarsCondition, ItemID.HallowedBar, 1, 15, 30));
- // Expert+ drops are also available on Normal
- npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.MechanicalBatteryPiece));
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ // npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.MechanicalBatteryPiece));
// Would be in the bag otherwise
npcLoot.AddNormalOnly(ModContent.ItemType(), ThankYouPainting.DropInt);
@@ -1564,8 +1561,8 @@ namespace CalamityMod.NPCs
}
catch (ArgumentNullException) { }
- // Expert+ drops are also available on Normal
- npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.SporeSac));
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ // npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.SporeSac));
// Would be in the bag otherwise
npcLoot.AddNormalOnly(ModContent.ItemType(), 10);
@@ -1617,9 +1614,10 @@ namespace CalamityMod.NPCs
}
catch (ArgumentNullException) { }
- // Expert+ drops are also available on Normal
var normalOnly = npcLoot.DefineNormalOnlyDropSet();
- normalOnly.Add(DropHelper.PerPlayer(ItemID.ShinyStone));
+
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ // normalOnly.Add(DropHelper.PerPlayer(ItemID.ShinyStone));
// Would be in the bag otherwise
normalOnly.Add(ModContent.ItemType(), 1, 8, 10);
@@ -1714,8 +1712,8 @@ namespace CalamityMod.NPCs
catch (ArgumentNullException) { }
DukeEditFailed:
- // Expert+ drops are also available on Normal
- npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.ShrimpyTruffle));
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ // npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.ShrimpyTruffle));
// Would be in the bag otherwise
npcLoot.AddNormalOnly(ModContent.ItemType(), 10);
@@ -1788,8 +1786,8 @@ namespace CalamityMod.NPCs
}
catch (ArgumentNullException) { }
- // Expert+ drops are also available on Normal
- npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.EmpressFlightBooster));
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ // npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.EmpressFlightBooster));
// Would be in the bag otherwise
npcLoot.AddNormalOnly(ModContent.ItemType(), ThankYouPainting.DropInt);
@@ -1851,12 +1849,13 @@ namespace CalamityMod.NPCs
}
catch (ArgumentNullException) { }
- // Expert+ drops are also available on Normal
- npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.GravityGlobe));
- npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.SuspiciousLookingTentacle));
- npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.LongRainbowTrailWings));
+ // 16NOV2025: Ozzatron: following overwhelming dev vote, Expert+ drops are NOT available in Classic
+ // npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.GravityGlobe));
+ // npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.SuspiciousLookingTentacle));
+ // npcLoot.AddNormalOnly(DropHelper.PerPlayer(ItemID.LongRainbowTrailWings));
// Would be in the bag otherwise
+ // 16NOV2025: Ozzatron (executive decision): Celestial Onion remains available as a 6th slot in Classic.
npcLoot.AddNormalOnly(DropHelper.PerPlayer(ModContent.ItemType()));
npcLoot.AddNormalOnly(ModContent.ItemType(), ThankYouPainting.DropInt);
diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs
index e76d91bf1a..fbfdf1a4e2 100644
--- a/NPCs/CalamityGlobalTownNPC.cs
+++ b/NPCs/CalamityGlobalTownNPC.cs
@@ -14,6 +14,7 @@ using CalamityMod.Items.Placeables.Astral;
using CalamityMod.Items.Placeables.Crags;
using CalamityMod.Items.Placeables.Furniture;
using CalamityMod.Items.Placeables.Furniture.Fountains;
+using CalamityMod.Items.Placeables.Furniture.Paintings;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.Items.SummonItems.Invasion;
@@ -209,7 +210,7 @@ namespace CalamityMod.NPCs
};
private static readonly string[] SkeletonMerchantNames =
{
- "Sans Undertale", // <@!145379091648872450> (shayy)
+ "Sans Undertale", // <@!534770496038895616> (done_22_)
"Papyrus Undertale", // <@!262663471189983242> (nycro)
"Gaster Undertale", // <@!924706306093379614> (enamoured)
"Mr. Bones", // <@!359215912856977408> (jaybones.)
@@ -351,13 +352,13 @@ 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 =
{
"Bear", // <@!183424826407518208> (lilac_vrt_olligoci)
"Storm", // <@!620383533516718085> (airwaveslr)
+ "Hognar the Wicked", // <@!766511001356468237> (xzier_tengal)
};
private static readonly string[] TownCatOrangeTabbyNames =
{
@@ -370,6 +371,7 @@ namespace CalamityMod.NPCs
private static readonly string[] TownCatSilverNames =
{
"Archie", // <@!303022375191183360> (jackshiz)
+ "Hognar the Wicked", // <@!766511001356468237> (xzier_tengal)
};
private static readonly string[] TownCatWhiteNames = null;
@@ -1235,7 +1237,8 @@ namespace CalamityMod.NPCs
if (type == NPCID.Painter)
{
- shop.AddWithCustomValue(ItemID.PainterPaintballGun, Item.buyPrice(gold: 15));
+ shop.AddWithCustomValue(ItemID.PainterPaintballGun, Item.buyPrice(gold: 15))
+ .Add(ItemType(), CalamityConditions.InSunken, Condition.NpcIsPresent(NPCType()));
}
if (type == NPCID.Steampunker)
@@ -1314,25 +1317,6 @@ namespace CalamityMod.NPCs
shop.Add();
}
}
-
- public override void ModifyActiveShop(NPC npc, string shopName, Item[] items)
- {
- // TODO: Uses a hardcoded string since dedicated names are currently hardcoded strings
- // Will need to be changed if dedicated names are localized in the future
- if (npc.type == NPCID.SkeletonMerchant && npc.GivenName == "Sans Undertale")
- {
- int index = 0;
- for (int i = 0; i < Chest.maxItems; i++)
- {
- if (items[i] == null)
- {
- index = i;
- break;
- }
- }
- items[index] = new Item(ItemType());
- }
- }
#endregion
}
}
diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs
index 7f21657f82..3f22fc8e57 100644
--- a/NPCs/CeaselessVoid/CeaselessVoid.cs
+++ b/NPCs/CeaselessVoid/CeaselessVoid.cs
@@ -764,7 +764,8 @@ namespace CalamityMod.NPCs.CeaselessVoid
normalOnly.Add(DropHelper.PerPlayer(ItemType(), 1, 10, 12));
// Equipment
- normalOnly.Add(DropHelper.PerPlayer(ItemType()));
+ // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss
+ // normalOnly.Add(DropHelper.PerPlayer(ItemType()));
// Vanity
normalOnly.Add(ItemType(), 7);
diff --git a/NPCs/Crabulon/Crabulon.cs b/NPCs/Crabulon/Crabulon.cs
index 0e5f0a6128..41158c61b7 100644
--- a/NPCs/Crabulon/Crabulon.cs
+++ b/NPCs/Crabulon/Crabulon.cs
@@ -1185,7 +1185,8 @@ namespace CalamityMod.NPCs.Crabulon
normalOnly.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, weapons));
// Equipment
- normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
+ // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss
+ // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
// Vanity
normalOnly.Add(ModContent.ItemType(), 7);
diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs
index d061adf8e5..63ce720037 100644
--- a/NPCs/Cryogen/Cryogen.cs
+++ b/NPCs/Cryogen/Cryogen.cs
@@ -1381,7 +1381,8 @@ namespace CalamityMod.NPCs.Cryogen
normalOnly.Add(ModContent.ItemType(), 1, 8, 10);
// Equipment
- normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
+ // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss
+ // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction);
normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction);
}
diff --git a/NPCs/Deconstructors/Burrower.cs b/NPCs/Deconstructors/Burrower.cs
index 46c35ffc76..ea4d2d5f7d 100644
--- a/NPCs/Deconstructors/Burrower.cs
+++ b/NPCs/Deconstructors/Burrower.cs
@@ -5,6 +5,7 @@ using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Effects;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
+using CalamityMod.Items.Placeables.Banners;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.NPCs.ExoMechs.Thanatos;
using CalamityMod.Particles;
@@ -15,13 +16,16 @@ using CalamityMod.Tiles.Ores;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
+using Terraria.GameContent.Bestiary;
using Terraria.ID;
+using Terraria.Localization;
using Terraria.ModLoader;
using Terraria.ModLoader.Utilities;
namespace CalamityMod.NPCs.Deconstructors
{
public class BurrowerHitbox : BaseWormHitboxNPC
{
+ public override LocalizedText DisplayName => CalamityUtils.GetText("NPCs.Burrower.DisplayName");
public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position)
{
return false;
@@ -46,6 +50,9 @@ namespace CalamityMod.NPCs.Deconstructors
NPC.Calamity().VulnerableToHeat = false;
NPC.Calamity().VulnerableToSickness = false;
NPC.Calamity().VulnerableToWater = false;
+
+ Banner = ModContent.NPCType();
+ BannerItem = ModContent.ItemType();
base.SetDefaults();
}
public override void AI()
@@ -110,7 +117,7 @@ namespace CalamityMod.NPCs.Deconstructors
NPC.height = 38;
NPC.lifeMax = 1000;
NPC.value = Item.buyPrice(1, 0, 0, 0);
-
+ NPC.rarity = 3;
NPC.HitSound = ThanatosHead.ThanatosHitSoundClosed;
NPC.DeathSound = SoundID.NPCDeath44;
NPC.knockBackResist = 0f;
@@ -125,6 +132,8 @@ namespace CalamityMod.NPCs.Deconstructors
NPC.Calamity().VulnerableToHeat = false;
NPC.Calamity().VulnerableToSickness = false;
NPC.Calamity().VulnerableToWater = false;
+ Banner = NPC.type;
+ BannerItem = ModContent.ItemType();
for (var i = 0; i < SegmentCount - 1; i++)
{
@@ -132,6 +141,14 @@ namespace CalamityMod.NPCs.Deconstructors
}
Segments.Add(new BaseWormSegment(this, 3));
}
+ public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
+ {
+ bestiaryEntry.Info.AddRange(
+ [
+ BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns,
+ new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Burrower")
+ ]);
+ }
#region AI Variables
@@ -531,7 +548,7 @@ namespace CalamityMod.NPCs.Deconstructors
npcLoot.Add(ItemID.CrimtaneOre, 5, 6, 32);
var condition = npcLoot.DefineConditionalDropSet(DropHelper.PostPlant());
- condition.Add(ItemID.CobaltOre, 2, 6, 32,true);
+ condition.Add(ItemID.CobaltOre, 2, 6, 32);
condition.Add(ItemID.PalladiumOre, 2, 6, 32);
condition.Add(ItemID.MythrilOre, 3, 6, 32);
condition.Add(ItemID.OrichalcumOre, 3, 6, 32);
@@ -547,7 +564,7 @@ namespace CalamityMod.NPCs.Deconstructors
{
return 0f;
}
- return SpawnCondition.Cavern.Chance * (Main.projectile.Any(x=> x.active && x.type == ModContent.ProjectileType()) ? 5f : 0.1f);
+ return SpawnCondition.Cavern.Chance * (Main.projectile.Any(x=> x.active && x.type == ModContent.ProjectileType()) ? 5f : 0.05f);
}
}
}
diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs
index 4bbc6757cd..8d50de290d 100644
--- a/NPCs/DesertScourge/DesertScourgeHead.cs
+++ b/NPCs/DesertScourge/DesertScourgeHead.cs
@@ -995,7 +995,8 @@ namespace CalamityMod.NPCs.DesertScourge
normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType(), 1, 25, 30));
// Equipment
- normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
+ // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss
+ // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction);
}
diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs
index dea7b7c164..911ee1a799 100644
--- a/NPCs/DevourerofGods/DevourerofGodsHead.cs
+++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs
@@ -2570,7 +2570,8 @@ namespace CalamityMod.NPCs.DevourerofGods
normalOnly.Add(ModContent.ItemType(), 1, 150, 250);
// Equipment
- normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
+ // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss
+ // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
}
// Relic
@@ -2798,32 +2799,11 @@ namespace CalamityMod.NPCs.DevourerofGods
text = headHitKeys[Main.rand.Next(0, 4)]; //DogHead1-4
}
}
- // Speak in Wingdings if the Punch Card is equipped
- if (target.Transformation().Type == ModContent.ItemType() && FontAssetSystem.Fonts["Wingdings"] != null && System.Environment.OSVersion.Platform == PlatformID.Win32NT && !GameCulture.FromCultureName(GameCulture.CultureName.Chinese).IsActive && !GameCulture.FromCultureName(GameCulture.CultureName.Russian).IsActive)
- {
- Vector2 vector = FontAssetSystem.Fonts["Wingdings"].MeasureString(Language.GetTextValue(text));
- // This is how normal combat text spawn positioning is handled
- float positionX = (float)location.X + (float)location.Width * 0.5f - vector.X * 0.5f + Main.rand.Next(-(int)((double)location.Width * 0.5), (int)((double)location.Width * 0.5) + 1);
- float positionY = (float)location.Y + (float)location.Height * 0.25f - vector.Y * 0.5f + Main.rand.Next(-(int)((double)location.Height * 0.5), (int)((double)location.Height * 0.5) + 1);
- if (target.gravDir == -1f)
- {
- positionY = (float)location.Y + (float)location.Height * 0.75f + vector.Y * 0.5f;
- }
- // Spawn a projectile that mimmicks combat text behaviour
- Projectile proj = Projectile.NewProjectileDirect(NPC.GetSource_FromThis(), new Vector2(positionX, positionY), new Vector2((float)Main.rand.Next(-25, 26) * 0.05f, -14f * target.gravDir), ModContent.ProjectileType(), 0, 0, -1, -1);
- proj.rotation = proj.velocity.X < 0 ? -0.06f : 0.06f;
- // Pass the spoken dialogue into it
- DoGWingdings wingdings = proj.ModProjectile();
- wingdings.dialogue = Language.GetTextValue(text);
- }
- else
- {
- var ctid = CombatText.NewText(location, messageColor, Language.GetTextValue(text), true);
- if (ctid < Main.maxCombatText)
- target.Calamity().subtitletext = Main.combatText[ctid];
- target.Calamity().subtitleColors = new Color[] { Color.Cyan, Color.Fuchsia };
- }
+ var ctid = CombatText.NewText(location, messageColor, Language.GetTextValue(text), true);
+ if (ctid < Main.maxCombatText)
+ target.Calamity().subtitletext = Main.combatText[ctid];
+ target.Calamity().subtitleColors = new Color[] { Color.Cyan, Color.Fuchsia };
target.Calamity().dogTextCooldown = 60;
}
target.Calamity().DoGHeadHitCounter++;
diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs
index b0b3000a31..34d62e6a3e 100644
--- a/NPCs/ExoMechs/Ares/AresBody.cs
+++ b/NPCs/ExoMechs/Ares/AresBody.cs
@@ -1650,7 +1650,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
// Equipment
normalOnly.Add(ModContent.ItemType());
- normalOnly.Add(ModContent.ItemType());
+ // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss
+ // normalOnly.Add(ModContent.ItemType());
// Vanity
// Higher chance due to how the drops work
diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs
index 9d61e78cf9..16e9d8986b 100644
--- a/NPCs/HiveMind/HiveMind.cs
+++ b/NPCs/HiveMind/HiveMind.cs
@@ -1350,7 +1350,8 @@ namespace CalamityMod.NPCs.HiveMind
// Equipment
normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction);
- normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
+ // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss
+ // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
// Vanity
normalOnly.Add(ModContent.ItemType(), 7);
diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs
index b35a1dbe4b..8e51696358 100644
--- a/NPCs/Leviathan/Leviathan.cs
+++ b/NPCs/Leviathan/Leviathan.cs
@@ -867,7 +867,8 @@ namespace CalamityMod.NPCs.Leviathan
normalOnly.Add(ModContent.ItemType(), ThankYouPainting.DropInt);
// Equipment
- normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
+ // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss
+ // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()));
normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction);
normalOnly.Add(ModContent.ItemType(), 10);
}
diff --git a/NPCs/NormalNPCs/ArmoredDiggerBody.cs b/NPCs/NormalNPCs/ArmoredDiggerBody.cs
deleted file mode 100644
index a4a5b58ce7..0000000000
--- a/NPCs/NormalNPCs/ArmoredDiggerBody.cs
+++ /dev/null
@@ -1,200 +0,0 @@
-using System;
-using CalamityMod.Items.Placeables.Banners;
-using CalamityMod.Projectiles.Boss;
-using CalamityMod.World;
-using Microsoft.Xna.Framework;
-using Terraria;
-using Terraria.ID;
-using Terraria.Localization;
-using Terraria.ModLoader;
-
-namespace CalamityMod.NPCs.NormalNPCs
-{
- [LongDistanceNetSync(SyncWith = typeof(ArmoredDiggerHead))]
- public class ArmoredDiggerBody : ModNPC
- {
- public override LocalizedText DisplayName => CalamityUtils.GetText("NPCs.ArmoredDiggerHead.DisplayName");
- public override void SetStaticDefaults()
- {
- this.HideFromBestiary();
- }
-
- public override void SetDefaults()
- {
- NPC.damage = 70;
- NPC.width = 38;
- NPC.height = 38;
- NPC.defense = 20;
- NPC.lifeMax = 20000;
- NPC.knockBackResist = 0f;
- NPC.aiStyle = -1;
- AIType = -1;
- NPC.behindTiles = true;
- NPC.noGravity = true;
- NPC.noTileCollide = true;
- NPC.HitSound = SoundID.NPCHit4;
- NPC.DeathSound = SoundID.NPCDeath14;
- NPC.netAlways = true;
- NPC.dontCountMe = true;
- Banner = ModContent.NPCType();
- BannerItem = ModContent.ItemType();
- NPC.Calamity().VulnerableToSickness = false;
- NPC.Calamity().VulnerableToElectricity = true;
- }
-
- public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position)
- {
- return false;
- }
-
- public override void AI()
- {
- if (NPC.ai[3] > 0f && Main.npc[(int)NPC.ai[3]].type == ModContent.NPCType())
- {
- NPC.realLife = (int)NPC.ai[3];
- }
- if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active)
- {
- NPC.TargetClosest(true);
- }
- bool shouldDie = false;
- if (NPC.ai[1] <= 0f)
- {
- shouldDie = true;
- }
- else if (Main.npc[(int)NPC.ai[1]].life <= 0)
- {
- shouldDie = true;
- }
- if (shouldDie)
- {
- if (!Main.zenithWorld)
- {
- NPC.life = 0;
- NPC.HitEffect(0, 10.0);
- NPC.checkDead();
- }
- else
- {
- // find a new npc to attatch to in gfb, it's not a bug, it's a feature:tm:
- foreach (NPC host in Main.ActiveNPCs)
- {
- if (!host.friendly && !host.dontTakeDamage && host.type != ModContent.NPCType() && host.type != ModContent.NPCType() && host.type != ModContent.NPCType())
- {
- NPC.ai[1] = host.whoAmI;
- NPC.ai[3] = host.whoAmI;
- break;
- }
- }
- // if it goes through the loop without finding an npc to attatch to (aka, ai[1] never changes and the head is still dead) kill as normal
- if (Main.npc[(int)NPC.ai[1]].life <= 0)
- {
- NPC.life = 0;
- NPC.HitEffect(0, 10.0);
- NPC.checkDead();
- }
- }
- }
- if (Main.netMode != NetmodeID.MultiplayerClient)
- {
- NPC.localAI[0] += (float)Main.rand.Next(4);
- if (NPC.localAI[0] >= (float)Main.rand.Next(1800, 26000))
- {
- NPC.localAI[0] = 0f;
- NPC.TargetClosest(true);
- if (Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position,
- Main.player[NPC.target].width, Main.player[NPC.target].height))
- {
- float speed = 7f;
- Vector2 projFirePosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)(NPC.height / 2));
- float projTargetX = Main.player[NPC.target].position.X + (float)Main.player[NPC.target].width * 0.5f - projFirePosition.X + (float)Main.rand.Next(-20, 21);
- float projTargetY = Main.player[NPC.target].position.Y + (float)Main.player[NPC.target].height * 0.5f - projFirePosition.Y + (float)Main.rand.Next(-20, 21);
- float projTargetDist = (float)Math.Sqrt((double)(projTargetX * projTargetX + projTargetY * projTargetY));
- projTargetDist = speed / projTargetDist;
- projTargetX *= projTargetDist;
- projTargetY *= projTargetDist;
- int projType = Main.zenithWorld ? ModContent.ProjectileType() : ProjectileID.SaucerScrap;
- projFirePosition.X += projTargetX * 5f;
- projFirePosition.Y += projTargetY * 5f;
- Projectile.NewProjectile(NPC.GetSource_FromAI(), projFirePosition.X, projFirePosition.Y, projTargetX, projTargetY, projType, 30, 0f, Main.myPlayer, 0f, 0f);
- NPC.netUpdate = true;
- }
- }
- }
- Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f);
- float targetXDist = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2);
- float targetYDist = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2);
- targetXDist = (float)((int)(targetXDist / 16f) * 16);
- targetYDist = (float)((int)(targetYDist / 16f) * 16);
- segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16);
- segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16);
- targetXDist -= segmentPosition.X;
- targetYDist -= segmentPosition.Y;
- float targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist));
- if (NPC.ai[1] > 0f && NPC.ai[1] < (float)Main.npc.Length)
- {
- try
- {
- segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f);
- targetXDist = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X;
- targetYDist = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y;
- }
- catch
- {
- }
- NPC.rotation = (float)Math.Atan2((double)targetYDist, (double)targetXDist) + 1.57f;
- targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist));
- int segmentWidth = (int)(44f * NPC.scale);
- targetDistance = (targetDistance - (float)segmentWidth) / targetDistance;
- targetXDist *= targetDistance;
- targetYDist *= targetDistance;
- NPC.velocity = Vector2.Zero;
- NPC.position.X = NPC.position.X + targetXDist;
- NPC.position.Y = NPC.position.Y + targetYDist;
- }
- }
-
- public override void HitEffect(NPC.HitInfo hit)
- {
- for (int k = 0; k < 3; k++)
- {
- Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, hit.HitDirection, -1f, 0, default, 1f);
- }
- if (NPC.life <= 0)
- {
- for (int k = 0; k < 10; k++)
- {
- Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, hit.HitDirection, -1f, 0, default, 1f);
- }
- if (!Main.dedServ)
- {
- Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("ArmoredDiggerBody").Type, 1f);
- Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("ArmoredDiggerBody2").Type, 1f);
- }
- }
- }
-
- public override bool CheckActive()
- {
- return false;
- }
-
- public override void ModifyTypeName(ref string typeName)
- {
- if (Main.zenithWorld)
- {
- typeName = CalamityUtils.GetTextValue("NPCs.MechanizedSerpent");
- }
- }
-
- public override Color? GetAlpha(Color drawColor)
- {
- if (Main.zenithWorld)
- {
- Color lightColor = Color.Orange * drawColor.A;
- return lightColor * NPC.Opacity;
- }
- else return null;
- }
- }
-}
diff --git a/NPCs/NormalNPCs/ArmoredDiggerBody.png b/NPCs/NormalNPCs/ArmoredDiggerBody.png
deleted file mode 100644
index 6f582bdb3e..0000000000
Binary files a/NPCs/NormalNPCs/ArmoredDiggerBody.png and /dev/null differ
diff --git a/NPCs/NormalNPCs/ArmoredDiggerHead.cs b/NPCs/NormalNPCs/ArmoredDiggerHead.cs
deleted file mode 100644
index 5b812c76be..0000000000
--- a/NPCs/NormalNPCs/ArmoredDiggerHead.cs
+++ /dev/null
@@ -1,505 +0,0 @@
-using System;
-using CalamityMod.CalPlayer;
-using CalamityMod.Items.Materials;
-using CalamityMod.Items.Placeables.Banners;
-using CalamityMod.Items.Weapons.Summon;
-using CalamityMod.World;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Graphics;
-using Terraria;
-using Terraria.Audio;
-using Terraria.GameContent;
-using Terraria.GameContent.Bestiary;
-using Terraria.ID;
-using Terraria.ModLoader;
-
-namespace CalamityMod.NPCs.NormalNPCs
-{
- [LongDistanceNetSync]
- public class ArmoredDiggerHead : ModNPC
- {
- bool TailSpawned = false;
-
- public override void SetStaticDefaults()
- {
- NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers()
- {
- PortraitPositionXOverride = 40,
- PortraitPositionYOverride = 40
- };
- value.Position.Y += 40;
- value.Position.X += 48;
- NPCID.Sets.NPCBestiaryDrawOffset[Type] = value;
- }
-
- public override void SetDefaults()
- {
- NPC.Calamity().canBreakPlayerDefense = true;
- NPC.damage = 90;
- NPC.npcSlots = 10f;
- NPC.width = 54;
- NPC.height = 54;
- NPC.defense = 10;
- NPC.lifeMax = 20000;
- NPC.knockBackResist = 0f;
- NPC.aiStyle = -1;
- AIType = -1;
- NPC.value = Item.buyPrice(gold: 5);
- NPC.behindTiles = true;
- NPC.noGravity = true;
- NPC.noTileCollide = true;
- NPC.HitSound = SoundID.NPCHit4;
- NPC.DeathSound = SoundID.NPCDeath14;
- NPC.netAlways = true;
- Banner = NPC.type;
- BannerItem = ModContent.ItemType();
- NPC.Calamity().VulnerableToSickness = false;
- NPC.Calamity().VulnerableToElectricity = true;
- }
-
- public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
- {
- bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[]
- {
- BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns,
- new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.ArmoredDigger")
- });
- }
-
- public override void AI()
- {
- Point point = NPC.Center.ToTileCoordinates();
- Tile tileSafely = Framing.GetTileSafely(point);
- bool createDust = tileSafely.HasUnactuatedTile && NPC.Distance(Main.player[NPC.target].Center) < 800f;
- if (createDust)
- {
- if (Main.rand.NextBool())
- {
- Dust dust = Dust.NewDustDirect(NPC.position, NPC.width, NPC.height, DustID.TreasureSparkle, 0f, 0f, 150, default(Color), 0.3f);
- dust.fadeIn = 0.75f;
- dust.velocity *= 0.1f;
- dust.noLight = true;
- }
- }
-
- bool death = CalamityWorld.death;
- if (NPC.ai[3] > 0f)
- {
- NPC.realLife = (int)NPC.ai[3];
- }
- if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active)
- {
- NPC.TargetClosest(true);
- }
- if (Main.netMode != NetmodeID.MultiplayerClient)
- {
- if (!TailSpawned)
- {
- NPC.ai[3] = (float)NPC.whoAmI;
- NPC.realLife = NPC.whoAmI;
- int thisSegment = NPC.whoAmI;
- int segmentAmt = 30;
- for (int j = 0; j <= segmentAmt; j++)
- {
- int segmentType = ModContent.NPCType();
- if (j == segmentAmt)
- {
- segmentType = ModContent.NPCType();
- }
- int newSegment = NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.position.X + (float)(NPC.width / 2)), (int)(NPC.position.Y + (float)NPC.height), segmentType, NPC.whoAmI, 0f, 0f, 0f, 0f, 255);
- Main.npc[newSegment].ai[3] = (float)NPC.whoAmI;
- Main.npc[newSegment].realLife = NPC.whoAmI;
- Main.npc[newSegment].ai[1] = (float)thisSegment;
- Main.npc[thisSegment].ai[0] = (float)newSegment;
- NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, newSegment, 0f, 0f, 0f, 0, 0, 0);
- thisSegment = newSegment;
- }
- TailSpawned = true;
- }
- }
- int tileXPosition = (int)(NPC.position.X / 16f) - 1;
- int tileWidthXPos = (int)((NPC.position.X + (float)NPC.width) / 16f) + 2;
- int tileYPosition = (int)(NPC.position.Y / 16f) - 1;
- int tileWidthYPos = (int)((NPC.position.Y + (float)NPC.height) / 16f) + 2;
- if (tileXPosition < 0)
- {
- tileXPosition = 0;
- }
- if (tileWidthXPos > Main.maxTilesX)
- {
- tileWidthXPos = Main.maxTilesX;
- }
- if (tileYPosition < 0)
- {
- tileYPosition = 0;
- }
- if (tileWidthYPos > Main.maxTilesY)
- {
- tileWidthYPos = Main.maxTilesY;
- }
- bool flying = false;
- if (!flying)
- {
- for (int k = tileXPosition; k < tileWidthXPos; k++)
- {
- for (int l = tileYPosition; l < tileWidthYPos; l++)
- {
- if (Main.tile[k, l] != null && ((Main.tile[k, l].HasUnactuatedTile && (Main.tileSolid[(int)Main.tile[k, l].TileType] || (Main.tileSolidTop[(int)Main.tile[k, l].TileType] && Main.tile[k, l].TileFrameY == 0))) || Main.tile[k, l].LiquidAmount > 64))
- {
- Vector2 segmentPos;
- segmentPos.X = (float)(k * 16);
- segmentPos.Y = (float)(l * 16);
- if (NPC.position.X + (float)NPC.width > segmentPos.X && NPC.position.X < segmentPos.X + 16f && NPC.position.Y + (float)NPC.height > segmentPos.Y && NPC.position.Y < segmentPos.Y + 16f)
- {
- flying = true;
- break;
- }
- }
- }
- }
- }
- if (!flying)
- {
- NPC.localAI[1] = 1f;
- Rectangle rectangle = new Rectangle((int)NPC.position.X, (int)NPC.position.Y, NPC.width, NPC.height);
- int noFlyZone = 1000;
- bool outsideNoFlyZone = true;
- if (NPC.position.Y > Main.player[NPC.target].position.Y)
- {
- foreach (Player player in Main.ActivePlayers)
- {
- Rectangle noFlyArea = new Rectangle((int)player.position.X - noFlyZone, (int)player.position.Y - noFlyZone, noFlyZone * 2, noFlyZone * 2);
- if (rectangle.Intersects(noFlyArea))
- {
- outsideNoFlyZone = false;
- break;
- }
- }
- if (outsideNoFlyZone)
- {
- flying = true;
- }
- }
- }
- else
- {
- NPC.localAI[1] = 0f;
- }
- float maxChaseSpeed = death ? 13.5f : 10f;
- if (Main.player[NPC.target].dead || (!Main.zenithWorld && (double)Main.player[NPC.target].position.Y < Main.rockLayer * 16.0))
- {
- flying = false;
- NPC.velocity.Y = NPC.velocity.Y + 1f;
- if ((double)NPC.position.Y > Main.rockLayer * 16.0)
- {
- NPC.velocity.Y = NPC.velocity.Y + 1f;
- maxChaseSpeed *= 2f;
- }
- if ((double)NPC.position.Y > (double)(Main.UnderworldLayer * 16))
- {
- for (int a = 0; a < Main.maxNPCs; a++)
- {
- if (Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType() ||
- Main.npc[a].type == ModContent.NPCType