Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into 1.4.4
No files matched your search
@@ -300,6 +300,9 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Galactus Blade.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.5f, ProjectileType<GalacticaComet>())));
|
||||
|
||||
// 40% resist to Pristine Fury's alt fire.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<PristineSecondary>())));
|
||||
|
||||
// 40% resist to Stellar Torus Staff.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<StellarTorusBeam>())));
|
||||
#endregion
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#region Dashes and Dodges
|
||||
// Dash cooldowns (in frames)
|
||||
internal const int UniversalDashCooldown = 30;
|
||||
internal const int UniversalSashDashCooldown = 23;
|
||||
internal const int UniversalShieldSlamCooldown = 30;
|
||||
internal const int UniversalShieldBonkCooldown = 30;
|
||||
internal const int OnShieldBonkCooldown = 30;
|
||||
|
||||
@@ -785,6 +785,9 @@ namespace CalamityMod.CalPlayer
|
||||
public bool eTalisman = false;
|
||||
/// <summary> Counter variable used for spawning Statis' Void Sash's scythes when dashing. </summary>
|
||||
public int statisTimer = 0;
|
||||
public bool statisNinjaBelt = false;
|
||||
public bool voidSashVisuals = true;
|
||||
public bool statisVoidSash = false;
|
||||
public bool nucleogenesis = false;
|
||||
public bool nuclearFuelRod = false;
|
||||
public bool nebulousCore = false;
|
||||
@@ -804,9 +807,11 @@ namespace CalamityMod.CalPlayer
|
||||
public bool rampartOfDeities = false;
|
||||
public bool gShell = false;
|
||||
public bool lAmbergris = false;
|
||||
public bool lAmbergrisVisual = false;
|
||||
public bool tortShell = false;
|
||||
public bool absorber = false;
|
||||
public bool alwaysHoneyRegen = false;
|
||||
public float alwaysHoneyRegenAmount = 0;
|
||||
public bool honeyTurboRegen = false;
|
||||
public bool honeyDewHalveDebuffs = false;
|
||||
public bool livingDewHalveDebuffs = false;
|
||||
@@ -823,6 +828,9 @@ namespace CalamityMod.CalPlayer
|
||||
public float pulseRate = 1;
|
||||
public bool aAmpoule = false;
|
||||
public bool rOoze = false;
|
||||
public float radiantOozeRegen = 0;
|
||||
public float ambrosialAmpouleRegen = 0;
|
||||
public float purityRegen = 0;
|
||||
public bool fBarrier = false;
|
||||
public bool aBrain = false;
|
||||
public bool amalgam = false;
|
||||
@@ -931,7 +939,8 @@ namespace CalamityMod.CalPlayer
|
||||
public bool flameLickedShell = false;
|
||||
public int flameLickedShellParry = 0;
|
||||
public bool flameLickedShellEmpoweredParry = false;
|
||||
public bool Pauldron = false;
|
||||
public bool sPauldron = false;
|
||||
public bool sPauldronVisual = false;
|
||||
public bool XykVisualsBlue = false;
|
||||
public bool XykVisualsOrange = false;
|
||||
public bool manaOverloader = false;
|
||||
@@ -2172,11 +2181,15 @@ namespace CalamityMod.CalPlayer
|
||||
tortShell = false;
|
||||
absorber = false;
|
||||
alwaysHoneyRegen = false;
|
||||
alwaysHoneyRegenAmount = 0;
|
||||
honeyTurboRegen = false;
|
||||
honeyDewHalveDebuffs = false;
|
||||
livingDewHalveDebuffs = false;
|
||||
aAmpoule = false;
|
||||
rOoze = false;
|
||||
radiantOozeRegen = 0;
|
||||
ambrosialAmpouleRegen = 0;
|
||||
purityRegen = 0;
|
||||
fBarrier = false;
|
||||
aBrain = false;
|
||||
amalgam = false;
|
||||
@@ -2195,6 +2208,8 @@ namespace CalamityMod.CalPlayer
|
||||
eGauntlet = false;
|
||||
eGauntletVisuals = true;
|
||||
gloveLevel = 0;
|
||||
statisNinjaBelt = false;
|
||||
statisVoidSash = false;
|
||||
alreadyHasFrogLeg = false;
|
||||
eTalisman = false;
|
||||
nucleogenesis = false;
|
||||
@@ -2240,7 +2255,7 @@ namespace CalamityMod.CalPlayer
|
||||
shieldOfTheOcean = false;
|
||||
normalityRelocator = false;
|
||||
flameLickedShell = false;
|
||||
Pauldron = false;
|
||||
sPauldron = false;
|
||||
XykVisualsBlue = false;
|
||||
XykVisualsOrange = false;
|
||||
manaOverloader = false;
|
||||
@@ -4405,6 +4420,8 @@ namespace CalamityMod.CalPlayer
|
||||
(getSandCloakAccelBoost ? 0.75f : 0f) +
|
||||
(nimbleBounderBoost ? NimbleBounder.AccelerationBoost : 0f) +
|
||||
(ascendantInsignia ? 0.25f : 0f ) + // Added to Soaring Insignia's 1.25x multiplier to get 1.5x
|
||||
(statisNinjaBelt ? 0.6f : 0f) +
|
||||
(statisVoidSash ? 0.85f : 0f) +
|
||||
(blueCandle ? WeightlessCandle.AccelerationBoost : 0f) +
|
||||
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
|
||||
//(exaltedKillMode ? 7f : devilsDevastationKillMode ? 11f : 0) +
|
||||
|
||||
@@ -120,6 +120,8 @@ namespace CalamityMod.CalPlayer
|
||||
dashDelayToApply = BalancingConstants.UniversalShieldBonkCooldown;
|
||||
if (DashID == DeepDiverDash.ID)
|
||||
dashDelayToApply = 23;
|
||||
if (DashID == StatisNinjaBeltDash.ID || DashID == StatisVoidSashDash.ID || Player.dashType == 1)
|
||||
dashDelayToApply = BalancingConstants.UniversalSashDashCooldown;
|
||||
|
||||
float dashSpeed = 12f;
|
||||
float dashSpeedDecelerationFactor = 0.985f;
|
||||
|
||||
@@ -940,7 +940,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.GiveUniversalIFrames(evolutionIFrames, true);
|
||||
|
||||
modifiers.Cancel();
|
||||
evolutionLifeRegenCounter = 300;
|
||||
evolutionLifeRegenCounter = 600;
|
||||
projTypeJustHitBy = proj.type;
|
||||
|
||||
int cooldownDuration = (int)MathHelper.Lerp(BalancingConstants.EvolutionReflectCooldownMin, BalancingConstants.EvolutionReflectCooldownMax, cooldownDurationScalar);
|
||||
@@ -1052,7 +1052,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (evolution)
|
||||
{
|
||||
if (proj.type == projTypeJustHitBy)
|
||||
projectileDamageReduction += 0.2;
|
||||
projectileDamageReduction += 0.25;
|
||||
}
|
||||
|
||||
if (!ProjectileDestroyExceptionsList.Includes(proj.type) && proj.active && !proj.friendly && proj.hostile && proj.damage > 0)
|
||||
|
||||
@@ -310,6 +310,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Exact copy of vanilla Honey behavior, but does not stack with actually standing in Honey
|
||||
if (!Player.honey)
|
||||
{
|
||||
alwaysHoneyRegenAmount += 1;
|
||||
Player.lifeRegen += 2;
|
||||
Player.lifeRegenTime += 1;
|
||||
|
||||
@@ -317,6 +318,7 @@ namespace CalamityMod.CalPlayer
|
||||
// However, this can't bring regen into the positives.
|
||||
if (Player.lifeRegen < 0)
|
||||
{
|
||||
alwaysHoneyRegenAmount += Math.Min(1f, 0 - Player.lifeRegen/2f);
|
||||
Player.lifeRegen += 2;
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
@@ -392,10 +394,13 @@ namespace CalamityMod.CalPlayer
|
||||
// Grant life regen based on missing health for Radiant Ooze, Ambrosial Ampule, and purity
|
||||
if (rOoze || aAmpoule || purity)
|
||||
{
|
||||
float missingLifeRatio = (Player.statLifeMax2 - Player.statLife) / Player.statLifeMax2;
|
||||
float missingLifeRatio = (Player.statLifeMax2 - Player.statLife) / (float)Player.statLifeMax2;
|
||||
//Ambrosial Ampule and ooze give between 2 and 6 hp/s
|
||||
float lifeRegenToGive = MathHelper.Lerp(4f, 12f, missingLifeRatio);
|
||||
Player.lifeRegen += (int)lifeRegenToGive;
|
||||
int lifeRegenToGive = (int)Math.Round(MathHelper.Lerp((purity || aAmpoule? 2f : 4f), (purity || aAmpoule ? 8f : 12f), missingLifeRatio));//Rounding is needed for it to ever actually give +6 hp/s, as the integer conversion would otherwise floor it.
|
||||
Player.lifeRegen += lifeRegenToGive;
|
||||
radiantOozeRegen += lifeRegenToGive / 2f;
|
||||
ambrosialAmpouleRegen += lifeRegenToGive / 2f;
|
||||
purityRegen += lifeRegenToGive / 2f;
|
||||
}
|
||||
|
||||
if (purity)
|
||||
@@ -428,6 +433,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Count up total frames spent healing for slowdown.
|
||||
if (PurityHealSlowdownFrames < 900)
|
||||
++PurityHealSlowdownFrames;
|
||||
purityRegen += (60 / (float)healFrameCadence);
|
||||
}
|
||||
|
||||
// If the defense should be ticking down to some lower value, do that.
|
||||
@@ -611,10 +617,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (trinketOfChi || chiRegen)
|
||||
Player.lifeRegen += 2;
|
||||
|
||||
// Remember this is for 5 seconds after triggering a reflect with a long cooldown
|
||||
if (evolutionLifeRegenCounter > 0)
|
||||
{
|
||||
Player.lifeRegen += 12;
|
||||
if (Player.lifeRegenTime < 3600f)
|
||||
Player.lifeRegenTime = 3600f;
|
||||
}
|
||||
@@ -771,6 +775,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
Player.lifeRegen += turboRegenPower;
|
||||
Player.lifeRegenTime += turboRegenPower;
|
||||
purityRegen += turboRegenPower/2f;
|
||||
if (!shadeRegen || cFreeze || purity) ambrosialAmpouleRegen += turboRegenPower/2f;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -227,6 +227,17 @@ namespace CalamityMod.CalPlayer
|
||||
Player.velocity.X *= 0.9f;
|
||||
}
|
||||
|
||||
// Tabi/Master Ninja Gear dash change
|
||||
if (Player.dashType == 1)
|
||||
{
|
||||
if (dashStart)
|
||||
Player.velocity.X *= 3.5f;
|
||||
if (Player.dashDelay == -1)
|
||||
{
|
||||
Player.velocity.X *= 0.9f;
|
||||
}
|
||||
}
|
||||
|
||||
if ((devilsDevastationKillMode || exaltedKillMode) && !Player.mount.Active)
|
||||
{
|
||||
float fxScale = 1;
|
||||
@@ -296,49 +307,19 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (dashStart)
|
||||
{
|
||||
Player.velocity.X *= 1.2f;
|
||||
Player.velocity.X *= 3f; // +200% dash speed
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(LeviathanAmbergris.ambergrisDashDamage);
|
||||
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<LeviAmberDash>(), damage, 0f, Player.whoAmI);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType<LeviAmberDash>(), damage, 0f, Player.whoAmI);
|
||||
}
|
||||
|
||||
if (Player.miscCounter % 3 == 2 && Player.dashDelay > 0) // Reduced dash cooldown by 33%
|
||||
Player.dashDelay--;
|
||||
|
||||
if (Player.dashDelay == -1)// TODO: prevent working with special dashes, this was inconsitent with my old solution so I didn't keep it. not huge deal)
|
||||
{
|
||||
float numberOfDusts = 10f;
|
||||
float rotFactor = 180f / numberOfDusts;
|
||||
for (int i = 0; i < numberOfDusts; i++)
|
||||
{
|
||||
float rot = MathHelper.ToRadians(i * rotFactor);
|
||||
Vector2 offset = new Vector2(Player.velocity.X * dir * 0.7f + 6f, 0).RotatedBy(rot * Main.rand.NextFloat(4f, 5f));
|
||||
Vector2 velOffset = Vector2.Zero;
|
||||
Dust dust = Dust.NewDustPerfect(Player.Center + offset + Player.velocity, Main.rand.NextBool() ? 160 : 307, new Vector2(velOffset.X, velOffset.Y));
|
||||
dust.noGravity = true;
|
||||
dust.velocity = velOffset;
|
||||
dust.alpha = 100;
|
||||
dust.scale = (Player.velocity.X * dir * 0.08f);
|
||||
}
|
||||
if (Player.miscCounter % 4 == 0)
|
||||
{
|
||||
float sparkscale = (Player.velocity.X * dir * 0.07f);
|
||||
Vector2 SparkVelocity1 = Player.velocity.RotatedBy(dir * 2, default) * 0.1f - Player.velocity / 2f;
|
||||
LineParticle spark = new LineParticle(Player.Center + Player.velocity.RotatedBy(2f * dir) * 1.5f, SparkVelocity1, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkTurquoise : Color.DodgerBlue);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
Vector2 SparkVelocity2 = Player.velocity.RotatedBy(dir * -2, default) * 0.1f - Player.velocity / 2f;
|
||||
LineParticle spark2 = new LineParticle(Player.Center + Player.velocity.RotatedBy(-2f * dir) * 1.5f, SparkVelocity2, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkTurquoise : Color.DodgerBlue);
|
||||
GeneralParticleHandler.SpawnParticle(spark2);
|
||||
}
|
||||
if (Player.miscCounter % 4 == 0 && Player.velocity != Vector2.Zero) //every other frame spawn the hitbox
|
||||
{
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(LeviathanAmbergris.ambergrisDashDamage);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<LeviAmberDash>(), damage, 0f, Player.whoAmI);
|
||||
}
|
||||
}
|
||||
if (Player.dashDelay == -1)
|
||||
Player.velocity.X *= 0.9f;
|
||||
}
|
||||
|
||||
if (Pauldron)
|
||||
if (sPauldron)
|
||||
{
|
||||
if (dashStart)
|
||||
{
|
||||
@@ -346,37 +327,9 @@ namespace CalamityMod.CalPlayer
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(SlagsplitterPauldron.PauldronSlamDamage);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<PauldronDash>(), damage, 0, Player.whoAmI);
|
||||
}
|
||||
if (Player.dashDelay == -1)// TODO: prevent working with special dashes, this was inconsitent with my old solution so I didn't keep it. not huge deal)
|
||||
{
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(SlagsplitterPauldron.PauldronSlamDamage);
|
||||
if (Player.dashDelay == -1)
|
||||
Player.endurance += 0.1f;
|
||||
|
||||
float numberOfDusts = 10f;
|
||||
float rotFactor = 180f / numberOfDusts;
|
||||
for (int i = 0; i < numberOfDusts; i++)
|
||||
{
|
||||
float rot = MathHelper.ToRadians(i * rotFactor);
|
||||
Vector2 offset = new Vector2(MathF.Min(Player.velocity.X * dir * 0.7f + 8f, 20f), 0).RotatedBy(rot * Main.rand.NextFloat(4f, 5f));
|
||||
Vector2 velOffset = Vector2.Zero;
|
||||
Dust dust = Dust.NewDustPerfect(Player.Center + offset + Player.velocity, Main.rand.NextBool() ? 35 : 127, new Vector2(velOffset.X, velOffset.Y));
|
||||
dust.noGravity = true;
|
||||
dust.velocity = velOffset;
|
||||
dust.alpha = 100;
|
||||
dust.scale = MathF.Min(Player.velocity.X * dir * 0.08f, 1.2f);
|
||||
}
|
||||
float sparkscale = MathF.Min(Player.velocity.X * dir * 0.08f, 1.2f);
|
||||
Vector2 SparkVelocity1 = Player.velocity.RotatedBy(dir * -3, default) * 0.1f - Player.velocity / 2f;
|
||||
SparkParticle spark = new SparkParticle(Player.Center + Player.velocity.RotatedBy(2f * dir) * 1.5f, SparkVelocity1, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
Vector2 SparkVelocity2 = Player.velocity.RotatedBy(dir * 3, default) * 0.1f - Player.velocity / 2f;
|
||||
SparkParticle spark2 = new SparkParticle(Player.Center + Player.velocity.RotatedBy(-2f * dir) * 1.5f, SparkVelocity2, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed);
|
||||
GeneralParticleHandler.SpawnParticle(spark2);
|
||||
|
||||
if (Player.miscCounter % 6 == 0 && Player.velocity != Vector2.Zero)
|
||||
{
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<PauldronDash>(), SlagsplitterPauldron.PauldronSlamDamage, 0, Player.whoAmI);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (XykVisualsBlue || XykVisualsOrange)
|
||||
@@ -3635,11 +3588,11 @@ namespace CalamityMod.CalPlayer
|
||||
Player.velocity *= 0.98f;
|
||||
|
||||
if (molluskHelmet)
|
||||
Player.velocity.X *= 0.994f;
|
||||
Player.velocity.X *= 0.995f;
|
||||
if (molluskChest)
|
||||
Player.velocity.X *= 0.994f;
|
||||
Player.velocity.X *= 0.995f;
|
||||
if (molluskLegs)
|
||||
Player.velocity.X *= 0.994f;
|
||||
Player.velocity.X *= 0.995f;
|
||||
|
||||
if ((warped || caribbeanRum) && !Player.slowFall && !Player.mount.Active)
|
||||
{
|
||||
@@ -3707,8 +3660,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (vexation)
|
||||
{
|
||||
if (Player.statLife <= (int)(Player.statLifeMax2 * 0.5))
|
||||
Player.GetDamage<GenericDamageClass>() += 0.2f;
|
||||
Player.GetDamage<GenericDamageClass>() += 0.3f* (1 - Player.statLife / (float)Player.statLifeMax2);
|
||||
}
|
||||
|
||||
if (ataxiaBlaze)
|
||||
|
||||
@@ -1256,12 +1256,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (vexation)
|
||||
{
|
||||
if ((Player.armor[0].type == ItemType<ReaverHeadTank>() || Player.armor[0].type == ItemType<ReaverHeadExplore>() ||
|
||||
Player.armor[0].type == ItemType<ReaverHeadMobility>()) && Player.armor[1].type == ItemType<ReaverScaleMail>() &&
|
||||
Player.armor[2].type == ItemType<ReaverCuisses>())
|
||||
{
|
||||
target.AddBuff(BuffID.Venom, 120, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.CalPlayer.Dashes
|
||||
{
|
||||
@@ -13,45 +15,45 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
public override bool IsOmnidirectional => false;
|
||||
public int Time = 0;
|
||||
|
||||
public override float CalculateDashSpeed(Player player) => 20f;
|
||||
public override float CalculateDashSpeed(Player player) => (50f * player.moveSpeed);
|
||||
|
||||
public override void OnDashEffects(Player player)
|
||||
{
|
||||
Time = 0;
|
||||
for (int i = 0; i < 12; i++)
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
Vector2 smokePos = player.Center + new Vector2(Main.rand.Next(-player.width, player.width), Main.rand.Next(-player.height, player.height)) * 0.8f;
|
||||
Vector2 smokeVel = Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * Main.rand.NextFloat(1.25f, 1.75f);
|
||||
HeavySmokeParticle onDashSmoke = new(smokePos, smokeVel, Color.Gray, 30, 0.5f, 0.75f, 0.2f * Main.rand.NextFloatDirection());
|
||||
GeneralParticleHandler.SpawnParticle(onDashSmoke);
|
||||
Vector2 intenededVel = (MathHelper.TwoPi * i / 15f).ToRotationVector2() * 1.5f;
|
||||
Vector2 fxVel = new Vector2(intenededVel.X, intenededVel.Y * 2.3f).RotatedBy(player.velocity.ToRotation());
|
||||
Vector2 fxPlace = player.Center + fxVel.RotatedBy(player.velocity.ToRotation()) + player.velocity.SafeNormalize(Vector2.UnitX) * 60;
|
||||
|
||||
Color dustColor = Main.rand.NextBool() ? Color.Purple : Color.DarkSlateBlue;
|
||||
|
||||
int dustStyle = ModContent.DustType<SquashDust>();
|
||||
Dust dust2 = Dust.NewDustPerfect(fxPlace, dustStyle, (fxVel - player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(4, 5)) * Main.rand.NextFloat(1.2f, 1.5f));
|
||||
dust2.scale = Main.rand.NextFloat(1.6f, 2.3f) * 1.8f;
|
||||
dust2.color = dustColor;
|
||||
dust2.noGravity = true;
|
||||
dust2.fadeIn = 1.5f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor)
|
||||
{
|
||||
Time++;
|
||||
if (Time % 3 == 0)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int colorType = Main.rand.Next(3);
|
||||
Color smokeColor = Color.White;
|
||||
switch (colorType)
|
||||
{
|
||||
case 0:
|
||||
smokeColor = Color.Gray;
|
||||
break;
|
||||
case 1:
|
||||
smokeColor = new Color(28, 75, 163);
|
||||
break;
|
||||
case 2:
|
||||
smokeColor = new Color(195, 0, 255);
|
||||
break;
|
||||
}
|
||||
|
||||
Vector2 smokePos = player.Center - (player.velocity * 1.25f) + Main.rand.NextVector2Circular(10, 20);
|
||||
float smokeScale = player.velocity.X * 0.045f;
|
||||
HeavySmokeParticle midDashSmoke = new(smokePos, player.velocity * 0.2f, smokeColor, 20, smokeScale, 0.75f, 0.2f * Main.rand.NextFloatDirection(), true);
|
||||
HeavySmokeParticle midDashSmoke = new(player.Center + Main.rand.NextVector2Circular(15, 15), -player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(5, 9), Main.rand.NextBool() ? Color.Purple : Color.DarkSlateBlue, 16, Main.rand.NextFloat(0.7f, 0.9f), 0.55f, 0.2f * Main.rand.NextFloatDirection(), true);
|
||||
GeneralParticleHandler.SpawnParticle(midDashSmoke);
|
||||
}
|
||||
|
||||
int dustStyle = ModContent.DustType<SquashDust>();
|
||||
Dust dust2 = Dust.NewDustPerfect(player.Center + Main.rand.NextVector2Circular(15, 15), dustStyle, player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(5, 9));
|
||||
dust2.scale = Main.rand.NextFloat(0.9f, 1.7f);
|
||||
dust2.color = Main.rand.NextBool() ? Color.Purple : Color.DarkSlateBlue;
|
||||
dust2.noGravity = true;
|
||||
dust2.fadeIn = 0.5f;
|
||||
|
||||
player.velocity.X *= 0.93f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,14 @@
|
||||
using CalamityMod.Enums;
|
||||
using System;
|
||||
using System.Security.Policy;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Graphics.Metaballs;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using rail;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.CalPlayer.Dashes
|
||||
@@ -16,29 +22,84 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
public override bool IsOmnidirectional => false;
|
||||
public int Time = 0;
|
||||
public bool AngleSwap = true;
|
||||
public Vector2 aimVel;
|
||||
public bool strongVisuals = true;
|
||||
|
||||
public override float CalculateDashSpeed(Player player) => 25.4f;
|
||||
public override float CalculateDashSpeed(Player player) => (75f * player.moveSpeed);
|
||||
|
||||
public override void OnDashEffects(Player player)
|
||||
{
|
||||
strongVisuals = player.Calamity().voidSashVisuals;
|
||||
Time = 0;
|
||||
aimVel = player.velocity;
|
||||
|
||||
if (strongVisuals)
|
||||
{
|
||||
SoundStyle sound = new("CalamityMod/Sounds/Item/VoidDash");
|
||||
SoundEngine.PlaySound(sound with { Volume = 0.7f, Pitch = Main.rand.NextFloat(-0.15f, 0.15f) }, player.Center);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
Vector2 intenededVel = (MathHelper.TwoPi * i / 40f).ToRotationVector2() * 5.5f;
|
||||
Vector2 fxVel = new Vector2(intenededVel.X, intenededVel.Y * 2.3f).RotatedBy(player.velocity.ToRotation());
|
||||
Vector2 fxPlace = player.Center + fxVel.RotatedBy(player.velocity.ToRotation()) + player.velocity.SafeNormalize(Vector2.UnitX) * 60;
|
||||
|
||||
SignusMetaball.SpawnParticle(fxPlace, fxVel - player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(6, 9), 60f * Main.rand.NextFloat(0.7f, 1), 60, new Vector2(1.8f, 0.9f), 0.06f, 0);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
Vector2 intenededVel = (MathHelper.TwoPi * i / 30f).ToRotationVector2() * 5.5f;
|
||||
Vector2 fxVel = new Vector2(intenededVel.X, intenededVel.Y * 2.3f).RotatedBy(player.velocity.ToRotation());
|
||||
Vector2 fxPlace = player.Center + fxVel.RotatedBy(player.velocity.ToRotation()) + player.velocity.SafeNormalize(Vector2.UnitX) * 60;
|
||||
|
||||
Color dustColor = Main.rand.NextBool(3) ? Color.Indigo : Color.DarkOrchid;
|
||||
|
||||
int dustStyle = ModContent.DustType<SquashDust>();
|
||||
Dust dust2 = Dust.NewDustPerfect(fxPlace, dustStyle, (fxVel - player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(6, 9)) * Main.rand.NextFloat(1.2f, 1.5f));
|
||||
dust2.scale = Main.rand.NextFloat(1.6f, 2.3f) * 2.3f;
|
||||
dust2.color = dustColor;
|
||||
dust2.noGravity = true;
|
||||
dust2.fadeIn = 1.5f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor)
|
||||
{
|
||||
Time++;
|
||||
if (Time % 3 == 0)
|
||||
aimVel = Vector2.Lerp(aimVel, player.velocity, 0.2f);
|
||||
|
||||
float fxFade = Utils.GetLerpValue(5, 15, Math.Abs(aimVel.X), true);
|
||||
|
||||
Vector2 trailPos = player.Center - (aimVel * 2) + Main.rand.NextVector2Circular(10, 20);
|
||||
float trailScale = 1 * fxFade;
|
||||
Color trailColor = Main.rand.NextBool(3) ? Color.Indigo : Color.DarkOrchid;
|
||||
|
||||
int dustStyle = ModContent.DustType<SquashDust>();
|
||||
Dust dust2 = Dust.NewDustPerfect(trailPos, dustStyle, aimVel.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(9, 15));
|
||||
dust2.scale = Main.rand.NextFloat(0.9f, 1.7f);
|
||||
dust2.color = trailColor;
|
||||
dust2.noGravity = true;
|
||||
dust2.fadeIn = 0.5f;
|
||||
|
||||
if (strongVisuals)
|
||||
{
|
||||
Vector2 trailPos = player.Center - (player.velocity * 2) + Main.rand.NextVector2Circular(10, 20);
|
||||
float trailScale = player.velocity.X * player.direction * 0.08f;
|
||||
Color trailColor = Main.rand.NextBool(3) ? Color.Indigo : Color.DarkOrchid;
|
||||
Particle Trail = new SparkParticle(trailPos, player.velocity * 0.2f, false, 35, trailScale, trailColor);
|
||||
GeneralParticleHandler.SpawnParticle(Trail);
|
||||
SignusMetaball.SpawnParticle(player.Center + Main.rand.NextVector2Circular(20, 20), -aimVel.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(5, 15), 120f * Main.rand.NextFloat(0.7f, 1f), 60, new Vector2(0.8f, 1.2f), 0.08f, 0);
|
||||
|
||||
int dir = MathF.Sign(aimVel.X);
|
||||
Vector2 safeVel = aimVel.SafeNormalize(Vector2.UnitX);
|
||||
float sparkscale2 = 0.35f * Math.Max(fxFade, 0.5f);
|
||||
for (int i = -1; i <= 1; i += 2)
|
||||
{
|
||||
Vector2 fxVelocity = safeVel.RotatedBy(dir * MathHelper.ToRadians(75) * -i) - safeVel * 3;
|
||||
Vector2 fxPlace = player.Center + (safeVel * 35).RotatedBy(-0.2f * dir * i) * 1.5f;
|
||||
|
||||
SignusMetaball.SpawnParticle(fxPlace, fxVelocity * Main.rand.NextFloat(5, 8), 50f * Main.rand.NextFloat(0.7f, 1f), 8, new Vector2(0.8f, 1.2f), 0.18f, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Periodically release scythes.
|
||||
player.Calamity().statisTimer++;
|
||||
if (Main.myPlayer == player.whoAmI && player.Calamity().statisTimer % 5 == 0)
|
||||
if (Main.myPlayer == player.whoAmI && player.Calamity().statisTimer % 2 == 0 && false)
|
||||
{
|
||||
int scytheDamage = (int)player.GetBestClassDamage().ApplyTo(250);
|
||||
|
||||
@@ -54,8 +115,7 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
|
||||
}
|
||||
|
||||
// Dash at a faster speed than the default value.
|
||||
dashSpeed = 14f;
|
||||
player.velocity.X *= 0.912f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Graphics.Metaballs
|
||||
{
|
||||
public class SignusMetaball : Metaball
|
||||
{
|
||||
public Color borderColor = Color.Purple;
|
||||
public Vector2 goalDir = Vector2.Zero;
|
||||
public Vector2 scrollDir = Vector2.Zero;
|
||||
public class CosmicParticle
|
||||
{
|
||||
public float Size;
|
||||
|
||||
public Vector2 Velocity;
|
||||
|
||||
public Vector2 Center;
|
||||
public Vector2 BaseSquash = Vector2.One;
|
||||
public float Rotation;
|
||||
public float ShrinkSpeed = 0;
|
||||
public int Lifetime;
|
||||
public float SquashPower = 0;
|
||||
public int time = 0;
|
||||
|
||||
public CosmicParticle(Vector2 center, Vector2 velocity, float size, int lifetime, Vector2 squash, float shrinkSpeed = 0, float velocitySquash = 0)
|
||||
{
|
||||
Center = center;
|
||||
Velocity = velocity;
|
||||
Size = size;
|
||||
Rotation = Velocity.ToRotation() + MathHelper.PiOver2;
|
||||
BaseSquash = squash;
|
||||
Lifetime = lifetime;
|
||||
ShrinkSpeed = shrinkSpeed;
|
||||
SquashPower = velocitySquash;
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
Center += Velocity;
|
||||
Velocity *= 0.95f;
|
||||
if ((float)time / (float)Lifetime > 0.5f)
|
||||
{
|
||||
Size *= 0.94f;
|
||||
}
|
||||
BaseSquash.X *= (1 - 0.2f * ShrinkSpeed);
|
||||
BaseSquash.Y *= (1 + 0.2f * ShrinkSpeed);
|
||||
Rotation = Velocity.ToRotation() + MathHelper.PiOver2;
|
||||
time++;
|
||||
}
|
||||
}
|
||||
public static Asset<Texture2D> LayerAsset
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public static List<CosmicParticle> Particles
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
} = new();
|
||||
|
||||
public override bool AnythingToDraw => Particles.Any();
|
||||
|
||||
public override IEnumerable<Texture2D> Layers
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return LayerAsset.Value;
|
||||
}
|
||||
}
|
||||
|
||||
public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeNPCs;
|
||||
public override void Load()
|
||||
{
|
||||
if (Main.dedServ)
|
||||
return;
|
||||
|
||||
// Load the layer asset wrapper.
|
||||
LayerAsset = ModContent.Request<Texture2D>($"CalamityMod/Graphics/Metaballs/SignusLayer", AssetRequestMode.ImmediateLoad);
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
if (goalDir == Vector2.Zero)
|
||||
goalDir = Vector2.One.RotatedByRandom(Math.PI);
|
||||
if ((int)(Main.GlobalTimeWrappedHourly * 50) % 5 == 0)
|
||||
{
|
||||
goalDir = goalDir.RotatedByRandom(0.13f);
|
||||
}
|
||||
scrollDir = Vector2.Lerp(scrollDir, goalDir, 0.01f);
|
||||
|
||||
float rate = Main.GlobalTimeWrappedHourly * 19;
|
||||
List<Color> colors = new List<Color>()
|
||||
{
|
||||
Color.Purple,
|
||||
Color.BlueViolet,
|
||||
Color.DarkViolet
|
||||
};
|
||||
|
||||
int colorIndex = (int)(rate / 2 % colors.Count);
|
||||
Color currentColor = colors[colorIndex];
|
||||
Color nextColor = colors[(colorIndex + 1) % colors.Count];
|
||||
borderColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
|
||||
|
||||
// Update all particle instances.
|
||||
// Once sufficiently small, they vanish.
|
||||
for (int i = 0; i < Particles.Count; i++)
|
||||
Particles[i].Update();
|
||||
Particles.RemoveAll(p => p.Size <= 2f);
|
||||
}
|
||||
public override Color EdgeColor => borderColor with { A = 0 };
|
||||
|
||||
public static void SpawnParticle(Vector2 position, Vector2 velocity, float size, int lifetime, Vector2 squash, float shrinkSpeed = 0, float velocitySquash = 0) =>
|
||||
Particles.Add(new(position, velocity, size, lifetime, squash, shrinkSpeed, velocitySquash));
|
||||
|
||||
// Make the texture scroll.
|
||||
public override Vector2 CalculateManualOffsetForLayer(int layerIndex)
|
||||
{
|
||||
return scrollDir * 0.5f;
|
||||
}
|
||||
|
||||
public override void DrawInstances()
|
||||
{
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/BasicMess").Value;
|
||||
|
||||
foreach (CosmicParticle particle in Particles)
|
||||
{
|
||||
Vector2 squash = Vector2.Lerp(particle.BaseSquash, new Vector2(Utils.Remap(particle.Velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(particle.Velocity.Length(), 2, 7, 1, 2.5f)), particle.SquashPower);
|
||||
Vector2 drawPosition = particle.Center - Main.screenPosition;
|
||||
Vector2 origin = tex.Size() * 0.5f;
|
||||
Vector2 scale = Vector2.One * particle.Size / tex.Size();
|
||||
Main.spriteBatch.Draw(tex, drawPosition, null, Color.White, particle.Rotation, origin, squash * scale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -37,6 +38,15 @@ namespace CalamityMod.Items.Accessories
|
||||
Lighting.AddLight(player.Center, new Vector3(1.2f, 1.2f, 0.72f));
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
var player = Main.LocalPlayer;
|
||||
if (player != null)
|
||||
{
|
||||
list.FindAndReplace("[REGEN]", (player.Calamity().ambrosialAmpouleRegen + player.Calamity().alwaysHoneyRegenAmount).ToString("0.##"));
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public class LeviathanAmbergris : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public static int ambergrisDashDamage = 90;
|
||||
public static int ambergrisDashDamage = 650;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 20;
|
||||
@@ -24,6 +24,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.lAmbergris = true;
|
||||
modPlayer.lAmbergrisVisual = !hideVisual;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -32,5 +33,12 @@ namespace CalamityMod.Items.Accessories
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
var player = Main.LocalPlayer;
|
||||
if (player != null)
|
||||
list.FindAndReplace("[DAMAGE]", (0.3f * (1 - player.statLife / (float)player.statLifeMax2)).ToPercent());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
@@ -11,7 +12,7 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("AstralArcanum", "Purity")]
|
||||
public class Radiance : ModItem, ILocalizedModType
|
||||
public class Radiance : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetStaticDefaults()
|
||||
@@ -48,6 +49,17 @@ namespace CalamityMod.Items.Accessories
|
||||
Lighting.AddLight(player.Center, new Vector3(1.32f, 1.32f, 1.82f));
|
||||
}
|
||||
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
var player = Main.LocalPlayer;
|
||||
if (player != null)
|
||||
{
|
||||
list.FindAndReplace("[REGEN]", (player.Calamity().purityRegen + player.Calamity().alwaysHoneyRegenAmount).ToString("0.##"));
|
||||
list.FindAndReplace("[DEFENSE]", player.Calamity().jewelBonusDefense.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -31,6 +32,15 @@ namespace CalamityMod.Items.Accessories
|
||||
Lighting.AddLight(player.Center, new Vector3(1f, 1f, 0.6f));
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
var player = Main.LocalPlayer;
|
||||
if (player != null)
|
||||
{
|
||||
list.FindAndReplace("[REGEN]", (player.Calamity().radiantOozeRegen).ToString("0.##"));
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.GetDamage<GenericDamageClass>() += 0.06f;
|
||||
player.GetDamage<GenericDamageClass>() += 0.1f;
|
||||
player.GetArmorPenetration<GenericDamageClass>() += 10;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Crags;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -16,7 +11,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public class SlagsplitterPauldron : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public static int PauldronSlamDamage = 170;
|
||||
public static int PauldronSlamDamage = 330;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 54;
|
||||
@@ -29,7 +24,8 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.Pauldron = true;
|
||||
modPlayer.sPauldron = true;
|
||||
modPlayer.sPauldronVisual = !hideVisual;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -30,18 +30,16 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
player.autoJump = true;
|
||||
player.jumpSpeedBoost += 1.6f;
|
||||
player.moveSpeed += 0.1f;
|
||||
player.noFallDmg = true;
|
||||
player.blackBelt = true;
|
||||
player.dashType = 0;
|
||||
player.Calamity().DashID = StatisNinjaBeltDash.ID;
|
||||
player.spikedBoots = 2;
|
||||
player.accFlipper = true;
|
||||
player.hasMagiluminescence = true;
|
||||
player.Calamity().statisNinjaBelt = true;
|
||||
|
||||
player.MountedCenter.ToTileCoordinates();
|
||||
DelegateMethods.v3_1 = new Vector3(0.8f, 0.5f, 1f);
|
||||
Utils.PlotTileLine(player.Center, player.Center + player.velocity * 6f, 20f, DelegateMethods.CastLightOpen);
|
||||
Utils.PlotTileLine(player.Left, player.Right, 20f, DelegateMethods.CastLightOpen);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
@@ -51,8 +49,7 @@ namespace CalamityMod.Items.Accessories
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.MasterNinjaGear).
|
||||
AddIngredient(ItemID.FrogFlipper).
|
||||
AddIngredient(ItemID.Magiluminescence).
|
||||
AddIngredient<PurifiedGel>(50).
|
||||
AddIngredient<PurifiedGel>(25).
|
||||
AddIngredient<Necroplasm>(5).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
@@ -61,8 +58,7 @@ namespace CalamityMod.Items.Accessories
|
||||
AddIngredient(ItemID.Tabi).
|
||||
AddIngredient(ItemID.BlackBelt).
|
||||
AddIngredient(ItemID.FrogGear).
|
||||
AddIngredient(ItemID.Magiluminescence).
|
||||
AddIngredient<PurifiedGel>(50).
|
||||
AddIngredient<PurifiedGel>(25).
|
||||
AddIngredient<Necroplasm>(5).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
|
||||
@@ -35,20 +35,21 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
modPlayer.voidSashVisuals = !hideVisual;
|
||||
|
||||
player.autoJump = true;
|
||||
player.jumpSpeedBoost += 1.6f;
|
||||
player.moveSpeed += 0.2f;
|
||||
player.noFallDmg = true;
|
||||
player.blackBelt = true;
|
||||
modPlayer.DashID = StatisVoidSashDash.ID;
|
||||
player.dashType = 0;
|
||||
player.spikedBoots = 2;
|
||||
player.accFlipper = true;
|
||||
player.hasMagiluminescence = true;
|
||||
player.Calamity().statisVoidSash = true;
|
||||
|
||||
player.MountedCenter.ToTileCoordinates();
|
||||
DelegateMethods.v3_1 = new Vector3(0.8f, 0.5f, 1f);
|
||||
Utils.PlotTileLine(player.Center, player.Center + player.velocity * 6f, 20f, DelegateMethods.CastLightOpen);
|
||||
Utils.PlotTileLine(player.Left, player.Right, 20f, DelegateMethods.CastLightOpen);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Armor.Bloodflare;
|
||||
using CalamityMod.Items.Armor.GodSlayer;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
@@ -6,6 +7,7 @@ using CalamityMod.Items.Armor.Tarragon;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -15,6 +17,13 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
[AutoloadEquip(EquipType.Body)]
|
||||
public class AuricTeslaBodyArmor : ModItem, ILocalizedModType
|
||||
{
|
||||
|
||||
public static int setBonusTooltipNumber = 0; //Set this to zero so the first Shift pressed will increment it to 1.
|
||||
public static bool holdingShift = false;
|
||||
public static Color tooltipTarragonColor = new(194, 255, 194);
|
||||
public static Color tooltipBloodflareColor = new(255, 195, 194);
|
||||
public static Color tooltipSilvaColor = new(246, 255, 194);
|
||||
public static Color tooltipGodslayerColor = new(204, 194, 255);
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
public override void Load()
|
||||
{
|
||||
@@ -42,6 +51,18 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
player.GetDamage<GenericDamageClass>() += 0.08f;
|
||||
player.GetCritChance<GenericDamageClass>() += 5;
|
||||
}
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
//This just runs the ModifyTooltips for whatever helmet is equipped if a full auric set is equipped; but runs it on this item's tooltips.
|
||||
//This is a simple way to copy the tooltip edits for the set bonuses and have it adapt to helmet type.
|
||||
//If we ever add a way for auricSet to be TRUE without a helmet on, this will need to be changed.
|
||||
//If the helmet's ModifyTooltips is changed to do more than just the Set Bonus, their Set Bonus modification should be moved into it's own method, and have that called both here and in the helmet's ModifyTooltips.
|
||||
//Alternatively, their ModifyTooltips could simply return early if the item ID doesn't match the helmet type.
|
||||
if (Main.LocalPlayer.Calamity().auricSet)
|
||||
{
|
||||
Main.LocalPlayer.armor[0].ModItem.ModifyTooltips(tooltips);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Items.Armor.Bloodflare;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Items.Armor.Bloodflare;
|
||||
using CalamityMod.Items.Armor.GodSlayer;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
using CalamityMod.Items.Armor.Tarragon;
|
||||
@@ -31,6 +32,18 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
player.GetDamage<GenericDamageClass>() += 0.12f;
|
||||
player.GetCritChance<GenericDamageClass>() += 5;
|
||||
}
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
//This just runs the ModifyTooltips for whatever helmet is equipped if a full auric set is equipped; but runs it on this item's tooltips.
|
||||
//This is a simple way to copy the tooltip edits for the set bonuses and have it adapt to helmet type.
|
||||
//If we ever add a way for auricSet to be TRUE without a helmet on, this will need to be changed.
|
||||
//If the helmet's ModifyTooltips is changed to do more than just the Set Bonus, their Set Bonus modification should be moved into it's own method, and have that called both here and in the helmet's ModifyTooltips.
|
||||
//Alternatively, their ModifyTooltips could simply return early if the item ID doesn't match the helmet type.
|
||||
if (Main.LocalPlayer.Calamity().auricSet)
|
||||
{
|
||||
Main.LocalPlayer.armor[0].ModItem.ModifyTooltips(tooltips);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Armor.Bloodflare;
|
||||
using CalamityMod.Items.Armor.GodSlayer;
|
||||
using CalamityMod.Items.Armor.Tarragon;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -61,6 +61,34 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
player.GetDamage<RangedDamageClass>() += 0.3f;
|
||||
player.GetCritChance<RangedDamageClass>() += 30;
|
||||
}
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
ref var holdingShift = ref AuricTeslaBodyArmor.holdingShift;
|
||||
ref var setBonusTooltipNumber = ref AuricTeslaBodyArmor.setBonusTooltipNumber;
|
||||
if (Main.keyState.PressingShift())
|
||||
{
|
||||
if (!holdingShift)
|
||||
{
|
||||
holdingShift = true;
|
||||
setBonusTooltipNumber++;
|
||||
if (setBonusTooltipNumber > 3) setBonusTooltipNumber = 1;
|
||||
}
|
||||
foreach (TooltipLine line in tooltips)
|
||||
{
|
||||
if (line.Name == "SetBonus")
|
||||
{
|
||||
Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipGodslayerColor };
|
||||
var LocalizedText = CalamityUtils.GetTextFromModItem(Type, $"SetBonus{setBonusTooltipNumber}");
|
||||
line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(), GodslayerArmorDash.GodslayerCooldown) : setBonusTooltipNumber == 2 ? LocalizedText.Format(CalamityKeybinds.ArmorSetBonusHotKey.TooltipHotkeyString()) : LocalizedText.Format());
|
||||
line.OverrideColor = armorColors[setBonusTooltipNumber - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
holdingShift = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
using CalamityMod.Items.Armor.Bloodflare;
|
||||
using CalamityMod.Items.Armor.GodSlayer;
|
||||
using CalamityMod.Items.Armor.Tarragon;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -63,6 +64,34 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
player.GetCritChance<ThrowingDamageClass>() += 20;
|
||||
player.moveSpeed += 0.05f;
|
||||
}
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
ref var holdingShift = ref AuricTeslaBodyArmor.holdingShift;
|
||||
ref var setBonusTooltipNumber = ref AuricTeslaBodyArmor.setBonusTooltipNumber;
|
||||
if (Main.keyState.PressingShift())
|
||||
{
|
||||
if (!holdingShift)
|
||||
{
|
||||
holdingShift = true;
|
||||
setBonusTooltipNumber++;
|
||||
if (setBonusTooltipNumber > 3) setBonusTooltipNumber = 1;
|
||||
}
|
||||
foreach (TooltipLine line in tooltips)
|
||||
{
|
||||
if (line.Name == "SetBonus")
|
||||
{
|
||||
Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipGodslayerColor };
|
||||
var LocalizedText = CalamityUtils.GetTextFromModItem(Type, $"SetBonus{setBonusTooltipNumber}");
|
||||
line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(), GodslayerArmorDash.GodslayerCooldown) : setBonusTooltipNumber == 2 ? LocalizedText.Format() : LocalizedText.Format(CalamityKeybinds.ArmorSetBonusHotKey.TooltipHotkeyString()));
|
||||
line.OverrideColor = armorColors[setBonusTooltipNumber - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
holdingShift = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Armor.Bloodflare;
|
||||
using CalamityMod.Items.Armor.GodSlayer;
|
||||
using CalamityMod.Items.Armor.Tarragon;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Auric
|
||||
@@ -65,6 +66,34 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
player.GetDamage<MeleeDamageClass>() += 0.2f;
|
||||
player.GetCritChance<MeleeDamageClass>() += 10;
|
||||
}
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
ref var holdingShift = ref AuricTeslaBodyArmor.holdingShift;
|
||||
ref var setBonusTooltipNumber = ref AuricTeslaBodyArmor.setBonusTooltipNumber;
|
||||
if (Main.keyState.PressingShift())
|
||||
{
|
||||
if (!holdingShift)
|
||||
{
|
||||
holdingShift = true;
|
||||
setBonusTooltipNumber++;
|
||||
if (setBonusTooltipNumber > 3) setBonusTooltipNumber = 1;
|
||||
}
|
||||
foreach (TooltipLine line in tooltips)
|
||||
{
|
||||
if (line.Name == "SetBonus")
|
||||
{
|
||||
Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipGodslayerColor };
|
||||
var LocalizedText = CalamityUtils.GetTextFromModItem(Type, $"SetBonus{setBonusTooltipNumber}");
|
||||
line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(), GodslayerArmorDash.GodslayerCooldown) : setBonusTooltipNumber == 2 ? LocalizedText.Format() : LocalizedText.Format(CalamityKeybinds.ArmorSetBonusHotKey.TooltipHotkeyString()));
|
||||
line.OverrideColor = armorColors[setBonusTooltipNumber - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
holdingShift = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Items.Armor.Bloodflare;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
using CalamityMod.Items.Armor.Tarragon;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -61,6 +59,33 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
modPlayer.auricBoost = true;
|
||||
player.GetDamage<SummonDamageClass>() += 0.15f;
|
||||
}
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
ref var holdingShift = ref AuricTeslaBodyArmor.holdingShift;
|
||||
ref var setBonusTooltipNumber = ref AuricTeslaBodyArmor.setBonusTooltipNumber;
|
||||
if (Main.keyState.PressingShift())
|
||||
{
|
||||
if (!holdingShift)
|
||||
{
|
||||
holdingShift = true;
|
||||
setBonusTooltipNumber++;
|
||||
if (setBonusTooltipNumber > 3) setBonusTooltipNumber = 1;
|
||||
}
|
||||
foreach (TooltipLine line in tooltips)
|
||||
{
|
||||
if (line.Name == "SetBonus")
|
||||
{
|
||||
Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipSilvaColor };
|
||||
line.Text = this.GetLocalizedValue($"SetBonus{setBonusTooltipNumber}");
|
||||
line.OverrideColor = armorColors[setBonusTooltipNumber - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
holdingShift = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Items.Armor.Bloodflare;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
using CalamityMod.Items.Armor.Tarragon;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -50,6 +50,33 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
player.crimsonRegen = true;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
ref var holdingShift = ref AuricTeslaBodyArmor.holdingShift;
|
||||
ref var setBonusTooltipNumber = ref AuricTeslaBodyArmor.setBonusTooltipNumber;
|
||||
if (Main.keyState.PressingShift())
|
||||
{
|
||||
if (!holdingShift)
|
||||
{
|
||||
holdingShift = true;
|
||||
setBonusTooltipNumber++;
|
||||
if (setBonusTooltipNumber > 3) setBonusTooltipNumber = 1;
|
||||
}
|
||||
foreach (TooltipLine line in tooltips)
|
||||
{
|
||||
if (line.Name == "SetBonus")
|
||||
{
|
||||
Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipSilvaColor };
|
||||
line.Text = this.GetLocalizedValue($"SetBonus{setBonusTooltipNumber}");
|
||||
line.OverrideColor = armorColors[setBonusTooltipNumber - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
holdingShift = false;
|
||||
}
|
||||
}
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
var modPlayer = player.Calamity();
|
||||
|
||||
@@ -85,6 +85,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
|
||||
"PokerFace",
|
||||
"Poroboros",
|
||||
"Raesh",
|
||||
"Sagittariod",
|
||||
"Shade",
|
||||
"SharZz",
|
||||
"Shayy",
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureWulfrum;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.Walls
|
||||
{
|
||||
public class ChargedWulfrumEnergyBarrierWall : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.ChargedWulfrumEnergyBarrierWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(4).
|
||||
AddIngredient<ChargedWulfrumEnergyBarrier>().
|
||||
AddTile(TileID.WorkBenches).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 362 B |
@@ -0,0 +1,26 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureWulfrum;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.Walls
|
||||
{
|
||||
public class WulfrumEnergyBarrierWall : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.WulfrumEnergyBarrierWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(4).
|
||||
AddIngredient<WulfrumEnergyBarrier>().
|
||||
AddTile(TileID.WorkBenches).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 351 B |
@@ -45,7 +45,6 @@ namespace CalamityMod.Items.SummonItems
|
||||
{
|
||||
switch (npc.type)
|
||||
{
|
||||
case NPCID.CultistTablet:
|
||||
case NPCID.CultistBoss:
|
||||
case NPCID.LunarTowerSolar:
|
||||
case NPCID.LunarTowerVortex:
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
Item.width = 54;
|
||||
Item.height = 38;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.damage = 70;
|
||||
Item.damage = 49;
|
||||
Item.knockBack = 3f;
|
||||
Item.useTime = 64;
|
||||
Item.useAnimation = 64;
|
||||
|
||||
@@ -9,6 +9,7 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
@@ -16,6 +17,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
public class Taser : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal";
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(10);
|
||||
public static readonly SoundStyle Fire = new("CalamityMod/Sounds/Item/TaserLaunch") { Volume = 0.6f };
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -29,9 +31,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
Item.width = 42;
|
||||
Item.height = 24;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.damage = 20;
|
||||
Item.damage = 9;
|
||||
Item.knockBack = 7f;
|
||||
Item.useTime = Item.useAnimation = 7;
|
||||
Item.useTime = Item.useAnimation = 8;
|
||||
Item.autoReuse = true;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
Item.width = 56;
|
||||
Item.height = 50;
|
||||
Item.damage = 77;
|
||||
Item.damage = 127;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 7;
|
||||
Item.useTime = 22;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
Item.width = 62;
|
||||
Item.height = 62;
|
||||
Item.damage = 87; // IS THAT THE BITE OF '87
|
||||
Item.damage = 97;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useTime = 27;
|
||||
Item.useAnimation = 27;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
Item.width = 66;
|
||||
Item.height = 70;
|
||||
Item.damage = 295;
|
||||
Item.damage = 351;
|
||||
Item.DamageType = DamageClass.MeleeNoSpeed;
|
||||
Item.noMelee = true;
|
||||
Item.useTurn = true;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Item.width = 68;
|
||||
Item.height = 36;
|
||||
Item.damage = 74;
|
||||
Item.damage = 89;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useTime = 5;
|
||||
Item.useAnimation = 30;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Item.width = 76;
|
||||
Item.height = 46;
|
||||
Item.damage = 250;
|
||||
Item.damage = 310;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useAnimation = Item.useTime = 6;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public bool Trail = true;
|
||||
public int shotCount = 0;
|
||||
|
||||
public static int boomTime = 6;
|
||||
public static int boomTime = 60;
|
||||
|
||||
public override Color? TooltipExtensionColor => new Color(255, 140, 0);
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Item.width = 100;
|
||||
Item.height = 46;
|
||||
Item.damage = 80;
|
||||
Item.damage = 77;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useTime = 3;
|
||||
Item.useAnimation = 15;
|
||||
@@ -62,7 +62,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(5f));
|
||||
Projectile.NewProjectile(source, position, newVel, ModContent.ProjectileType<PristineSecondary>(), damage, knockback, player.whoAmI);
|
||||
Projectile.NewProjectile(source, position, newVel, ModContent.ProjectileType<PristineSecondary>(), (int) (damage * 0.7f), knockback, player.whoAmI); //.7x base damage
|
||||
|
||||
Dust dust = Dust.NewDustPerfect(position + velocity * 3f + new Vector2(0, -3), ModContent.DustType<LightDust>(), velocity.RotatedBy(0.25f * player.direction).RotatedByRandom(0.35f) * Main.rand.NextFloat(0.5f, 2.5f), 0, default, Main.rand.NextFloat(0.4f, 0.8f));
|
||||
dust.noGravity = true;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Item.width = 74;
|
||||
Item.height = 126;
|
||||
Item.damage = 79;
|
||||
Item.damage = 116;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useTime = 3;
|
||||
Item.useAnimation = 25;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 106;
|
||||
Item.height = 104;
|
||||
Item.damage = 1450;
|
||||
Item.damage = 1750;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = 50;
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 42;
|
||||
Item.height = 46;
|
||||
Item.damage = 230;
|
||||
Item.damage = 272;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = Item.useTime = 40;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 36;
|
||||
Item.height = 40;
|
||||
Item.damage = 110;
|
||||
Item.damage = 120;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useTime = Item.useAnimation = 42;
|
||||
|
||||
@@ -106,9 +106,9 @@ AmbrosialAmpoule: {
|
||||
Tooltip:
|
||||
'''
|
||||
+50 max life
|
||||
Grants +1 HP/s life regen
|
||||
Grants +2 to +6 HP/s life regen based on missing health
|
||||
Grants +2 to +5 HP/s life regen based on missing health
|
||||
Standing still grants +1.5 HP/s life regen and +1 HP/s life regen when inflicted with a damage debuff
|
||||
Current boost: +[REGEN] HP/s
|
||||
Fire and sickness debuff durations are halved
|
||||
You emit yellow light if visibility is enabled
|
||||
'''
|
||||
@@ -1042,8 +1042,9 @@ LeviathanAmbergris: {
|
||||
DisplayName: Leviathan Ambergris
|
||||
Tooltip:
|
||||
'''
|
||||
20% increased dash velocity, and dash cooldown is 33% faster
|
||||
200% increased initial dash velocity, 33% faster dash cooldown, and greatly increased dash deceleration
|
||||
Your dashes are empowered by water, knocking back and damaging nearby enemies with viscous currents
|
||||
Visual effects are reduced if visibility is disabled
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1155,8 +1156,9 @@ NecklaceofVexation: {
|
||||
DisplayName: Necklace of Vexation
|
||||
Tooltip:
|
||||
'''
|
||||
20% increased damage when under 50% life
|
||||
All attacks inflict acid venom while wearing Reaver armor
|
||||
Up to 30% increased damage the lower your life is
|
||||
Current boost: [DAMAGE]%
|
||||
All attacks inflict acid venom
|
||||
Revenge
|
||||
'''
|
||||
}
|
||||
@@ -1370,16 +1372,22 @@ Radiance: {
|
||||
Tooltip:
|
||||
'''
|
||||
+70 max life
|
||||
Increases life regen based on missing health
|
||||
Grants +1 HP/s life regen, and +1 HP/s life regen when inflicted with a damaging debuff
|
||||
Each additional debuff grants 8 defense, which slowly decays while not debuffed
|
||||
Standing still grants +2 HP/s life regen
|
||||
Grants 20 defense and stronger regeneration while afflicted with any debuff
|
||||
The healing eventually slows down if debuffed for an extended period of time
|
||||
Weaker DoT debuffs are harmless and halves the duration of most other debuffs
|
||||
Provides greatly improved life regen, increasing with lost health
|
||||
Gain increased defense from debuffs inflicted on you, and greatly reduces their effectiveness
|
||||
Current boosts: +[REGEN] HP/s and [DEFENSE] defense.
|
||||
You emit shining blue light if visibility is enabled
|
||||
'A once putrid crystal, now glimmering with immaculate purity'
|
||||
'''
|
||||
HoldShiftTooltip:
|
||||
'''
|
||||
[c/CDF69C:Grants +2 to +5 HP/s life regen based on missing health]
|
||||
[c/CDF69C:Recover an additional 6 HP/s while inflicted with a debuff]
|
||||
[c/CDF69C:This eventually slows to 1.33 HP/s when debuffed for an extended time period]
|
||||
[c/CDF69C:Standing still provides +2 HP/s life regen and faster natural regen recovery]
|
||||
[c/CDF69C:+20 defense and faster natural regen recovery while afflicted with any debuff]
|
||||
[c/CDF69C:Each additional debuff grants 8 defense, which slowly decays while not debuffed]
|
||||
[c/CDF69C:Weak damaging debuffs are harmless and halves the duration of most other debuffs]
|
||||
'''
|
||||
}
|
||||
|
||||
RadiantOoze: {
|
||||
@@ -1387,6 +1395,7 @@ RadiantOoze: {
|
||||
Tooltip:
|
||||
'''
|
||||
Grants +2 to +6 HP/s life regen based on missing health
|
||||
Current boost: +[REGEN] HP/s
|
||||
You emit yellow light if visibility is enabled
|
||||
'''
|
||||
}
|
||||
@@ -1504,7 +1513,7 @@ SandSharkToothNecklace: {
|
||||
Tooltip:
|
||||
'''
|
||||
Increases armor penetration by 10
|
||||
6% increased damage
|
||||
10% increased damage
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1608,6 +1617,7 @@ SlagsplitterPauldron: {
|
||||
'''
|
||||
You gain 10% damage reduction while dashing, and enemies are inflicted with Armor Crunch
|
||||
Your dashes are empowered by fire, shredding enemies near you with violent explosions
|
||||
Visual effects are reduced if visibility is disabled
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1683,12 +1693,10 @@ StatisNinjaBelt: {
|
||||
DisplayName: Statis' Ninja Belt
|
||||
Tooltip:
|
||||
'''
|
||||
32% increased jump speed, allows auto-jump, and negates fall damage
|
||||
Increases movement acceleration and deceleration by 1.75x
|
||||
Increases movement speed by 1.15x. This bonus applies to running boot accessories
|
||||
Grants the ability to swim, climb walls, dash, and dodge attacks
|
||||
Provides light when worn
|
||||
{$Common.AbyssLightLevel1}
|
||||
Provides a high-speed dash that scales with your movement speed
|
||||
10% increased movement speed, 32% increased jump speed, allows auto-jump, and negates fall damage
|
||||
Increases movement acceleration and deceleration by 1.6x
|
||||
Grants the ability to swim, climb walls, and dodge attacks
|
||||
'''
|
||||
HoldShiftTooltip: "{$Common.DodgeInformation}"
|
||||
}
|
||||
@@ -1697,13 +1705,11 @@ StatisVoidSash: {
|
||||
DisplayName: Statis' Void Sash
|
||||
Tooltip:
|
||||
'''
|
||||
32% increased jump speed, allows auto-jump, and negates fall damage
|
||||
Increases movement acceleration and deceleration by 1.75x
|
||||
Increases movement speed by 1.15x. This bonus applies to running boot accessories
|
||||
Grants the ability to swim, climb walls, dash, and dodge attacks
|
||||
Dashes leave homing scythes in your wake
|
||||
Provides light when worn
|
||||
{$Common.AbyssLightLevel1}
|
||||
Provides a high-speed dash that scales with your movement speed
|
||||
20% increased movement speed, 32% increased jump speed, allows auto-jump, and negates fall damage
|
||||
Increases movement acceleration and deceleration by 1.85x
|
||||
Grants the ability to swim, climb walls, and dodge attacks
|
||||
Visual effects are reduced if visibility is disabled
|
||||
'''
|
||||
HoldShiftTooltip: "{$Common.DodgeInformation}"
|
||||
}
|
||||
@@ -1884,8 +1890,8 @@ TheEvolution: {
|
||||
'''
|
||||
Reflects projectiles that hit you, negating their damage and dealing 10x damage to enemies
|
||||
{$Common.ReflectInformation}
|
||||
Reflecting a projectile grants +6 HP/s life regen for 5 seconds and grants maximum natural life regen
|
||||
Getting hit by the same enemy projectile type during cooldown will resist its damage by 20%
|
||||
Reflecting a projectile grants maximum natural life regen for 10 seconds
|
||||
Getting hit by the same enemy projectile type during cooldown will resist its damage by 25%
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,38 @@ AuricTeslaCuisses: {
|
||||
AuricTeslaHoodedFacemask: {
|
||||
DisplayName: Auric Tesla Hooded Facemask
|
||||
Tooltip: 30% increased ranged damage and critical strike chance
|
||||
SetBonus: Ranged Tarragon, Bloodflare and God Slayer armor effects
|
||||
SetBonus:
|
||||
'''
|
||||
Ranged Tarragon, Bloodflare and God Slayer armor effects
|
||||
Hold SHIFT to view these set bonus details and Press SHIFT repeatedly to cycle through them
|
||||
'''
|
||||
SetBonus1:
|
||||
'''
|
||||
Inherited Tarragon Set Bonus:
|
||||
Ranged projectiles split into homing life energy and leaves on death
|
||||
Reduces enemy spawn rates
|
||||
Increased heart pickup range
|
||||
Enemies have a chance to drop extra hearts on death
|
||||
'''
|
||||
SetBonus2:
|
||||
'''
|
||||
Inherited Bloodflare Set Bonus:
|
||||
Press {0} to unleash the lost souls of polterghast to destroy your enemies
|
||||
This effect has a 30 second cooldown
|
||||
Ranged weapons fire bloodsplosion orbs every 2.5 seconds
|
||||
Greatly increased life regen, equivalent to Crimson armor
|
||||
Enemies below 50% life drop a heart when struck
|
||||
This effect has a 5 second cooldown
|
||||
'''
|
||||
SetBonus3:
|
||||
'''
|
||||
Inherited God Slayer Set Bonus:
|
||||
You fire a god killer shrapnel round while firing ranged weapons every 2.5 seconds
|
||||
Pressing {0} allows you to dash towards your cursor for 2.5 seconds
|
||||
Enemies you dash through take massive damage
|
||||
During the dash you are immune to most debuffs
|
||||
The dash has a {1} second cooldown
|
||||
'''
|
||||
}
|
||||
|
||||
AuricTeslaPlumedHelm: {
|
||||
@@ -32,8 +63,39 @@ AuricTeslaPlumedHelm: {
|
||||
'''
|
||||
SetBonus:
|
||||
'''
|
||||
Rogue Tarragon, Bloodflare and God Slayer armor effects
|
||||
+130 maximum stealth
|
||||
Rogue Tarragon, Bloodflare and God Slayer armor effects
|
||||
Hold SHIFT to view these set bonus details and Press SHIFT repeatedly to cycle through them
|
||||
'''
|
||||
SetBonus1:
|
||||
'''
|
||||
Inherited Tarragon Set Bonus:
|
||||
After every 50 rogue critical hits you will gain 2.5 seconds of damage immunity
|
||||
This effect has a cooldown of 25 seconds
|
||||
While under the effects of a debuff you gain 10% increased rogue damage
|
||||
Reduces enemy spawn rates
|
||||
Increased heart pickup range
|
||||
Enemies have a chance to drop extra hearts on death
|
||||
'''
|
||||
SetBonus2:
|
||||
'''
|
||||
Inherited Bloodflare Set Bonus:
|
||||
Being over 80% life boosts your defense by 30 and rogue crit by 5%
|
||||
Being below 80% life boosts your rogue damage by 10%
|
||||
Rogue critical strikes heal you
|
||||
Greatly increased life regen, equivalent to Crimson armor
|
||||
Enemies below 50% life drop a heart when struck
|
||||
This effect has a 5 second cooldown
|
||||
'''
|
||||
SetBonus3:
|
||||
'''
|
||||
Inherited God Slayer Set Bonus:
|
||||
While at full HP all of your rogue stats are boosted by 10%
|
||||
If you take over 80 damage in one hit you will be given extra immunity frames
|
||||
Pressing {0} allows you to dash towards your cursor for 2.5 seconds
|
||||
Enemies you dash through take massive damage
|
||||
During the dash you are immune to most debuffs
|
||||
The dash has a {1} second cooldown
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -46,9 +108,41 @@ AuricTeslaRoyalHelm: {
|
||||
'''
|
||||
SetBonus:
|
||||
'''
|
||||
Melee Tarragon, Bloodflare and God Slayer effects
|
||||
Enemies are more likely to target you
|
||||
28% increased melee speed
|
||||
Melee Tarragon, Bloodflare and God Slayer effects
|
||||
Hold SHIFT to view these set bonus details and Press SHIFT repeatedly to cycle through them
|
||||
'''
|
||||
SetBonus1:
|
||||
'''
|
||||
Inherited Tarragon Set Bonus:
|
||||
Taking damage gives the Tarra Life buff, which grants +1.5 HP/s life regen
|
||||
Press {0} to cloak yourself in life energy that heavily reduces enemy contact damage for 10 seconds
|
||||
This has a 30 second cooldown
|
||||
Reduces enemy spawn rates
|
||||
Increased heart pickup range
|
||||
Enemies have a chance to drop extra hearts on death
|
||||
'''
|
||||
SetBonus2:
|
||||
'''
|
||||
Inherited Bloodflare Set Bonus:
|
||||
True melee strikes will heal you
|
||||
After striking an enemy 15 times with true melee you will enter a blood frenzy for 5 seconds
|
||||
During this you will gain 25% increased melee damage, critical strike chance, and contact damage is halved
|
||||
This effect has a 30 second cooldown
|
||||
Greatly increased life regen, equivalent to Crimson armor
|
||||
Enemies below 50% life drop a heart when struck
|
||||
This effect has a 5 second cooldown
|
||||
'''
|
||||
SetBonus3:
|
||||
'''
|
||||
Inherited God Slayer Set Bonus:
|
||||
Taking over 80 damage in one hit will cause you to release a swarm of high-damage god killer darts
|
||||
Enemies take a lot of damage when they hit you
|
||||
Pressing {0} allows you to dash towards your cursor for 2.5 seconds
|
||||
Enemies you dash through take massive damage
|
||||
During the dash you are immune to most debuffs
|
||||
The dash has a {1} second cooldown
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -57,9 +151,37 @@ AuricTeslaSpaceHelmet: {
|
||||
Tooltip: 15% increased summon damage
|
||||
SetBonus:
|
||||
'''
|
||||
Summoner Tarragon, Bloodflare and Silva armor effects
|
||||
Max run speed and acceleration boosted by 5%
|
||||
+6 max minions and 75% increased summon damage
|
||||
Summoner Tarragon, Bloodflare and Silva armor effects
|
||||
Hold SHIFT to view these set bonus details and Press SHIFT repeatedly to cycle through them
|
||||
'''
|
||||
SetBonus1:
|
||||
'''
|
||||
Inherited Tarragon Set Bonus:
|
||||
Summons a life aura around you that damages nearby enemies
|
||||
Reduces enemy spawn rates
|
||||
Increased heart pickup range
|
||||
Enemies have a chance to drop extra hearts on death
|
||||
'''
|
||||
SetBonus2:
|
||||
'''
|
||||
Inherited Bloodflare Set Bonus:
|
||||
Summons polterghast mines to circle you
|
||||
At 90% life and above you gain 10% increased summon damage
|
||||
At 50% life and below you gain 20 defense and +1 HP/s life regen
|
||||
Greatly increased life regen, equivalent to Crimson armor
|
||||
Enemies below 50% life drop a heart when struck
|
||||
This effect has a 5 second cooldown
|
||||
'''
|
||||
SetBonus3:
|
||||
'''
|
||||
Inherited Silva Set Bonus:
|
||||
Summons an ancient leaf prism to blast your enemies with life energy
|
||||
All projectiles spawn healing leaf orbs on enemy hits
|
||||
Max run speed and acceleration boosted by 5%
|
||||
Taking fatal damage will revive you and make you invulnerable to all damage for 5 seconds
|
||||
This effect has a 5 minute cooldown, which does not decrement if any bosses or events are active
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -68,8 +190,37 @@ AuricTeslaWireHemmedVisage: {
|
||||
Tooltip: 30% increased magic damage, 20% increased magic critical strike chance, +100 max mana and 20% reduced mana usage
|
||||
SetBonus:
|
||||
'''
|
||||
Magic Tarragon, Bloodflare and Silva armor effects
|
||||
Max run speed and acceleration boosted by 5%
|
||||
Magic Tarragon, Bloodflare and Silva armor effects
|
||||
Hold SHIFT to view these set bonus details and Press SHIFT repeatedly to cycle through them
|
||||
'''
|
||||
SetBonus1:
|
||||
'''
|
||||
On every 5th critical strike you will fire a leaf storm
|
||||
Magic projectiles heal you on enemy hits
|
||||
Amount healed is based on projectile damage
|
||||
Inherited Tarragon Set Bonus:
|
||||
Reduces enemy spawn rates
|
||||
Increased heart pickup range
|
||||
Enemies have a chance to drop extra hearts on death
|
||||
'''
|
||||
SetBonus2:
|
||||
'''
|
||||
Magic weapons fire ghostly bolts every 1.67 seconds
|
||||
Magic critical strikes cause blood explosions every 2 seconds
|
||||
Inherited Bloodflare Set Bonus:
|
||||
Greatly increased life regen, equivalent to Crimson armor
|
||||
Enemies below 50% life drop a heart when struck
|
||||
This effect has a 5 second cooldown
|
||||
'''
|
||||
SetBonus3:
|
||||
'''
|
||||
Inherited Silva Set Bonus:
|
||||
Magic projectiles which cannot pierce will occasionally set off potent blasts of nature energy
|
||||
All projectiles spawn healing leaf orbs on enemy hits
|
||||
Max run speed and acceleration boosted by 5%
|
||||
Taking fatal damage will revive you and make you invulnerable to all damage for 5 seconds
|
||||
This effect has a 5 minute cooldown, which does not decrement if any bosses or events are active
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -4213,3 +4213,13 @@ ChargedWulfrumEnergyBarrier: {
|
||||
DisplayName: Charged Wulfrum Energy Barrier
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
WulfrumEnergyBarrierWall: {
|
||||
DisplayName: Wulfrum Energy Barrier Wall
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
ChargedWulfrumEnergyBarrierWall: {
|
||||
DisplayName: Charged Wulfrum Energy Barrier Wall
|
||||
Tooltip: ""
|
||||
}
|
||||
@@ -142,7 +142,7 @@ PulsePistol: {
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a pulse orb that tracks nearby targets
|
||||
After hitting an enemy twice, the pulse orb will split in two
|
||||
After hitting an enemy, the pulse orb will split in two
|
||||
Pulse orb pierce will increase when killing enemies
|
||||
'''
|
||||
}
|
||||
@@ -221,6 +221,7 @@ Taser: {
|
||||
Press <right> to shoot a hook that attaches to enemies and rapidly electrocutes them
|
||||
After electrocuting an enemy enough, the hook will create a shock explosion before returning to you
|
||||
Successful hook attacks have a short cooldown that is applied unless the hook kills an enemy
|
||||
{$Common.ArmorPenetration}
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
|
||||
// Register ground collision from the slam.
|
||||
// Once it has been hit a nuke explosion projectile is created on the ground, along with homing nuclear drops.
|
||||
if ((NPC.Bottom.Y > Target.Bottom.Y && Collision.SolidCollision(NPC.BottomLeft, NPC.width, 1)) || AttackTimer > 180f)
|
||||
if ((NPC.Bottom.Y > Target.Bottom.Y && Collision.SolidCollision(NPC.BottomLeft, NPC.width, 1) || Collision.WetCollision(NPC.BottomLeft, NPC.width, 1)) || AttackTimer > 180f)
|
||||
{
|
||||
NPC.velocity = Vector2.Zero;
|
||||
|
||||
|
||||
@@ -7701,10 +7701,10 @@ namespace CalamityMod.NPCs
|
||||
float drawPosX = totalLength >= 80f ? 40f : (float)(totalLength / 2);
|
||||
|
||||
// The height of a single frame of the npc
|
||||
float npcHeight = (float)(TextureAssets.Npc[npc.type].Value.Height / Main.npcFrameCount[npc.type] / 2) * npc.scale;
|
||||
float npcHeight = (npc.height * npc.scale)/2;//(float)(TextureAssets.Npc[npc.type].Value.Height / Main.npcFrameCount[npc.type] / 2) * npc.scale;
|
||||
|
||||
// Offset the debuff display based on the npc's graphical offset, and 16 units, to create some space between the sprite and the display
|
||||
float drawPosY = npcHeight + npc.gfxOffY + 16f;
|
||||
float drawPosY = npcHeight + npc.gfxOffY + 32f;
|
||||
|
||||
// Iterate through the buff texture list
|
||||
for (int i = 0; i < currentDebuffs.Count; i++)
|
||||
|
||||
@@ -69,6 +69,7 @@ namespace CalamityMod.NPCs
|
||||
"Dazren",
|
||||
"Johnny Test", // <@!589966747977777197> (konorango)
|
||||
"Bling Bling Boy", // <@!522970788203069442> (phallguy)
|
||||
"RICE", // <@!400107830889152524> (rice_xd.)
|
||||
};
|
||||
private static readonly string[] ArmsDealerNames =
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace CalamityMod.NPCs.Signus
|
||||
NPC.width = 130;
|
||||
NPC.height = 130;
|
||||
NPC.defense = 60;
|
||||
NPC.LifeMaxNERB(300000, 360000, 320000);
|
||||
NPC.LifeMaxNERB(320000, 375000, 380000);
|
||||
NPC.value = Item.buyPrice(1, 0, 0, 0);
|
||||
NPC.knockBackResist = 0f;
|
||||
NPC.aiStyle = -1;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
public bool onSpawn = true;
|
||||
private NPC targeted = null;
|
||||
private NPC lastHitTarget = null;
|
||||
private int timesItCanHit = 2;
|
||||
private int timesItCanHit = 1;
|
||||
public bool startAttackEffects = true;
|
||||
public int attackTime = 160; // The amount of time an orb spends slowing before it attacks
|
||||
public override void SetDefaults()
|
||||
@@ -180,7 +180,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
}
|
||||
|
||||
if (onKill)
|
||||
timesItCanHit += 2;
|
||||
timesItCanHit += 1;
|
||||
|
||||
// If it's hit targeted enemies enough, kill it
|
||||
if (timesItCanHit <= 0)
|
||||
|
||||
@@ -58,6 +58,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
Projectile.DamageType = DamageClass.Ranged;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 15;
|
||||
Projectile.ArmorPenetration = 10;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -142,8 +143,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
{
|
||||
if (giveCooldown)
|
||||
{
|
||||
player.Calamity().arsenalCooldown = 180;
|
||||
player.AddCooldown(ArsenalPower.ID, 180);
|
||||
player.Calamity().arsenalCooldown = 300;
|
||||
player.AddCooldown(ArsenalPower.ID, 300);
|
||||
}
|
||||
SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Item/DudFire") with { Volume = 0.5f, Pitch = 0.3f }, Projectile.Center);
|
||||
Projectile.Kill();
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
Projectile.width = 10;
|
||||
Projectile.height = 10;
|
||||
Projectile.scale = 1.5f;
|
||||
Projectile.scale = 7f;
|
||||
Projectile.friendly = true;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.tileCollide = false;
|
||||
@@ -67,33 +67,32 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Vector2 maxLength = owner.ClampedMouseWorld() - owner.Center;
|
||||
|
||||
DrawLaser(Terraria.GameContent.TextureAssets.Projectile[Type].Value, owner.Center,
|
||||
Projectile.velocity, 15f, Projectile.damage, -MathHelper.PiOver2, Projectile.scale, maxLength.Length(), new Color(Main.DiscoR, 0, 255), (int)MOVE_DISTANCE);
|
||||
Projectile.velocity, 15f, -MathHelper.PiOver2, Projectile.scale, maxLength.Length(), new Color(Main.DiscoR, 0, 255), (int)MOVE_DISTANCE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// The core function of drawing a laser
|
||||
public void DrawLaser(Texture2D texture, Vector2 start, Vector2 unit, float step, int damage, float rotation = 0f, float scale = 1f, float maxDist = 2000f, Color color = default(Color), int transDist = 50)
|
||||
public void DrawLaser(Texture2D texture, Vector2 start, Vector2 unit, float step, float rotation = 0f, float scale = 1f, float maxDist = 2000f, Color color = default, int transDist = 50)
|
||||
{
|
||||
float r = unit.ToRotation() + rotation;
|
||||
|
||||
// Draws the laser 'body'
|
||||
for (float i = transDist; i <= Distance; i += step)
|
||||
{
|
||||
Color c = new Color(Main.DiscoR, 0, 255);
|
||||
var origin = start + i * unit;
|
||||
Main.EntitySpriteDraw(texture, origin - Main.screenPosition,
|
||||
new Rectangle(0, 26, 28, 26), i < transDist ? Color.Transparent : c, r,
|
||||
new Vector2(28 * .5f, 26 * .5f), scale, 0, 0);
|
||||
new Rectangle(0, 26, 28, 26), i < transDist ? Color.Transparent : color, r,
|
||||
new Vector2(28 * .5f, 26 * .5f), MathHelper.Lerp(1f, scale, i / Distance), 0, 0);
|
||||
}
|
||||
|
||||
// Draws the laser 'tail'
|
||||
Main.EntitySpriteDraw(texture, start + unit * (transDist - step) - Main.screenPosition,
|
||||
new Rectangle(0, 0, 28, 26), new Color(Main.DiscoR, 0, 255), r, new Vector2(28 * .5f, 26 * .5f), scale, 0, 0);
|
||||
new Rectangle(0, 0, 28, 26), color, r, new Vector2(28 * .5f, 26 * .5f), 1f, 0, 0);
|
||||
|
||||
// Draws the laser 'head'
|
||||
Main.EntitySpriteDraw(texture, start + (Distance + step) * unit - Main.screenPosition,
|
||||
new Rectangle(0, 52, 28, 26), new Color(Main.DiscoR, 0, 255), r, new Vector2(28 * .5f, 26 * .5f), scale, 0, 0);
|
||||
new Rectangle(0, 52, 28, 26), color, r, new Vector2(28 * .5f, 26 * .5f), scale, 0, 0);
|
||||
}
|
||||
|
||||
// Change the way of collision check of the projectile
|
||||
@@ -119,7 +118,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (Projectile.timeLeft == 300)
|
||||
SoundEngine.PlaySound(CrystylCrusher.ChargeSound, player.Center);
|
||||
|
||||
Projectile.position = player.Center + Projectile.velocity * MOVE_DISTANCE;
|
||||
Projectile.Center = player.Center + Projectile.velocity * MOVE_DISTANCE;
|
||||
Projectile.timeLeft = 2;
|
||||
|
||||
// By separating large AI into methods it becomes very easy to see the flow of the AI in a broader sense
|
||||
@@ -232,6 +231,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
/*
|
||||
* Update CutTiles so the laser will cut tiles (like grass)
|
||||
*/
|
||||
public override bool? CanCutTiles() => IsAtMaxCharge ? null : false;
|
||||
public override void CutTiles()
|
||||
{
|
||||
DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile;
|
||||
@@ -244,11 +244,11 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Vector2 destroyVector = Projectile.Center + Projectile.velocity * (Distance - MOVE_DISTANCE);
|
||||
int threeMod = 3;
|
||||
int mineXLeft = (int)(destroyVector.X / 16f - threeMod);
|
||||
int mineXRight = (int)(destroyVector.X / 16f + threeMod);
|
||||
int mineXUp = (int)(destroyVector.Y / 16f - threeMod);
|
||||
int mineXDown = (int)(destroyVector.Y / 16f + threeMod);
|
||||
int radius = 7;
|
||||
int mineXLeft = (int)(destroyVector.X / 16f - radius);
|
||||
int mineXRight = (int)(destroyVector.X / 16f + radius);
|
||||
int mineXUp = (int)(destroyVector.Y / 16f - radius);
|
||||
int mineXDown = (int)(destroyVector.Y / 16f + radius);
|
||||
if (mineXLeft < 0)
|
||||
{
|
||||
mineXLeft = 0;
|
||||
@@ -273,7 +273,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
float destroyTileX = Math.Abs(i - destroyVector.X / 16f);
|
||||
float destroyTileY = Math.Abs(j - destroyVector.Y / 16f);
|
||||
double destroyTileArea = Math.Sqrt(destroyTileX * destroyTileX + destroyTileY * destroyTileY);
|
||||
if (destroyTileArea < threeMod)
|
||||
if (destroyTileArea < radius)
|
||||
{
|
||||
if (Main.tile[i, j] != null && Main.tile[i, j].HasTile)
|
||||
{
|
||||
|
||||
@@ -94,15 +94,15 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
|
||||
|
||||
if (timer % (cloneYoyo ? 20 : 10) == 0) // Fire Holy Stars
|
||||
{
|
||||
int stardamage = (int)(Projectile.damage * 0.12f);
|
||||
int stardamage = (int)(Projectile.damage * 0.24f);
|
||||
|
||||
Vector2 vel = new Vector2(0, 10).RotatedBy(timer * 0.025f * (cloneYoyo ? -1 : 1));
|
||||
Projectile damageStar = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, vel, ModContent.ProjectileType<HolyStarDamage>(), stardamage, Projectile.knockBack, Projectile.owner, 0, 5, targeted == null ? -1 : targeted.whoAmI);
|
||||
damageStar.extraUpdates = 1;
|
||||
damageStar.scale = 0.6f;
|
||||
damageStar.scale = 0.5f;
|
||||
Projectile damageStar2 = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, -vel, ModContent.ProjectileType<HolyStarDamage>(), stardamage, Projectile.knockBack, Projectile.owner, 0, 5, targeted == null ? -1 : targeted.whoAmI);
|
||||
damageStar2.extraUpdates = 1;
|
||||
damageStar2.scale = 0.6f;
|
||||
damageStar2.scale = 0.5f;
|
||||
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Custom/Providence/ProvidenceHolyBlastShoot");
|
||||
SoundEngine.PlaySound(fire with { Volume = 0.6f, PitchVariance = 0.2f }, Projectile.Center);
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
for (int x = 0; x < Main.maxProjectiles; x++)
|
||||
{
|
||||
Projectile projectile = Main.projectile[x];
|
||||
if (Vector2.Distance(Projectile.Center, projectile.Center) <= 100 && projectile.active && projectile.type == ModContent.ProjectileType<PristineSecondary>() && projectile.Opacity > 0.5f)
|
||||
if (Vector2.Distance(Projectile.Center, projectile.Center) <= 100 && projectile.active && projectile.type == ModContent.ProjectileType<PristineSecondary>() && projectile.Opacity > 0.7f)
|
||||
{
|
||||
if (projectile.ai[2] == 0)
|
||||
{
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
// Xyk: "This is probably too much lol"
|
||||
// Yeah I'd say 7x base damage is a bit much
|
||||
Projectile.damage *= 4;
|
||||
Projectile.damage *= (int) 5.5;
|
||||
FogColor = Color.Lerp(Color.OrangeRed, Color.Goldenrod, Main.rand.NextFloat());
|
||||
|
||||
SoundStyle ignite = new("CalamityMod/Sounds/Custom/Providence/ProvidenceHolyBlastImpact");
|
||||
|
||||
@@ -243,7 +243,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
Particle Smear = new CustomPulse(rainSpot, Vector2.Zero, Color.Chartreuse * 0.7f, "CalamityMod/Particles/DustyCircleHardEdge", Vector2.One, Main.rand.NextFloat(-5, 5), 0, 0.35f, 12);
|
||||
GeneralParticleHandler.SpawnParticle(Smear);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), rainSpot, Vector2.Zero, ModContent.ProjectileType<RadiationRain>(), (int)(Projectile.damage * 0.1), 0f, Projectile.owner, 0, 0, 100);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), rainSpot, Vector2.Zero, ModContent.ProjectileType<RadiationRain>(), (int)(Projectile.damage * 0.13), 0f, Projectile.owner, 0, 0, 100);
|
||||
}
|
||||
else // Radiation Burst
|
||||
{
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
if (Projectile.timeLeft % 50 == 0)
|
||||
{
|
||||
Projectile dustProjectile = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.RotatedByRandom(0.1f) * -0.6f, ModContent.ProjectileType<ToxicantTwisterDust>(), (int)(Projectile.damage * 0.33f), 0f, Projectile.owner, 0, 0, Projectile.ai[2]);
|
||||
Projectile dustProjectile = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.RotatedByRandom(0.1f) * -0.6f, ModContent.ProjectileType<ToxicantTwisterDust>(), (int)(Projectile.damage * 0.4f), 0f, Projectile.owner, 0, 0, Projectile.ai[2]);
|
||||
dustProjectile.timeLeft = 240;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,9 +72,9 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
Projectile.timeLeft++;
|
||||
CalamityUtils.HomeInOnSelectedNPC(Projectile, targeted ?? Projectile.Center.ClosestNPCAt(800f), true, 0.5f, 12, 0.975f);
|
||||
}
|
||||
if (Projectile.scale < 1)
|
||||
Projectile.scale += 0.0035f;
|
||||
if (Projectile.scale >= 1 && !reachedMaxDamage)
|
||||
if (Projectile.scale < 1.15)
|
||||
Projectile.scale += 0.004f;
|
||||
if (Projectile.scale >= 1.15 && !reachedMaxDamage)
|
||||
{
|
||||
Particle orb2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Orchid, "CalamityMod/Particles/BloomRing", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 0.3f, 8);
|
||||
GeneralParticleHandler.SpawnParticle(orb2);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -15,56 +17,147 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
public new string LocalizationCategory => "Projectiles.Typeless";
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
public Player Owner => Main.player[Projectile.owner];
|
||||
public Color effectsColor = Color.White;
|
||||
public float fxFade = 0;
|
||||
public bool isAlive = true;
|
||||
public bool onSpawn = true;
|
||||
public Vector2 aimVel;
|
||||
public bool visuals => Owner.Calamity().lAmbergrisVisual;
|
||||
private static float ExplosionRadius = 85f;
|
||||
public static readonly SoundStyle Slap = new("CalamityMod/Sounds/Custom/WetSlap", 4) { Volume = 0.8f, PitchVariance = 0.3f };
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
//These shouldn't matter because its circular
|
||||
Projectile.width = 85;
|
||||
Projectile.height = 85;
|
||||
Projectile.width = (int)ExplosionRadius;
|
||||
Projectile.height = (int)ExplosionRadius;
|
||||
Projectile.friendly = true;
|
||||
Projectile.DamageType = AverageDamageClass.Instance;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 4;
|
||||
Projectile.timeLeft = 15;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
Projectile.localNPCHitCooldown = 18;
|
||||
}
|
||||
public override void AI()
|
||||
{
|
||||
if (onSpawn && visuals)
|
||||
{
|
||||
Particle pulse = new CustomSpark(Owner.Center, Owner.velocity.SafeNormalize(Vector2.UnitX) * 9, "CalamityMod/Particles/HighResHollowCircleHardEdgeAlt", false, 23, 0.095f, Color.MediumTurquoise, new Vector2(1f, 1.7f), shrinkSpeed: -0.2f);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
Particle pulse2 = new CustomSpark(Owner.Center, Owner.velocity.SafeNormalize(Vector2.UnitX) * 12, "CalamityMod/Particles/HighResHollowCircleHardEdgeAlt", false, 20, 0.065f, Color.DeepSkyBlue, new Vector2(1f, 1.7f), shrinkSpeed: -0.23f);
|
||||
GeneralParticleHandler.SpawnParticle(pulse2);
|
||||
onSpawn = false;
|
||||
}
|
||||
|
||||
if (Owner.dashDelay != -1)
|
||||
isAlive = false;
|
||||
if (isAlive)
|
||||
Projectile.timeLeft++;
|
||||
Projectile.Center = Owner.Center;
|
||||
|
||||
if (effectsColor == Color.White)
|
||||
aimVel = Owner.velocity;
|
||||
else
|
||||
{
|
||||
aimVel = Vector2.Lerp(aimVel, Owner.velocity, 0.2f);
|
||||
}
|
||||
|
||||
if (isAlive)
|
||||
{
|
||||
float goalSize = Utils.GetLerpValue(5, 15, Math.Abs(aimVel.X), true);
|
||||
if (goalSize < fxFade)
|
||||
fxFade = MathHelper.Lerp(fxFade, goalSize, 0.03f);
|
||||
else
|
||||
fxFade = goalSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
fxFade = MathHelper.Lerp(fxFade, 0, 0.13f);
|
||||
}
|
||||
|
||||
|
||||
float rate = Main.GlobalTimeWrappedHourly * 22;
|
||||
List<Color> eColors = new List<Color>()
|
||||
{
|
||||
Color.DarkTurquoise,
|
||||
Color.DeepSkyBlue,
|
||||
Color.MediumTurquoise
|
||||
};
|
||||
|
||||
int colorIndex = (int)(rate / 2 % eColors.Count);
|
||||
Color currentColor = eColors[colorIndex];
|
||||
Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
|
||||
effectsColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
|
||||
|
||||
if (visuals)
|
||||
{
|
||||
int dir = MathF.Sign(aimVel.X);
|
||||
Vector2 safeVel = aimVel.SafeNormalize(Vector2.UnitX);
|
||||
float sparkscale2 = 0.35f * Math.Max(fxFade, 0.5f);
|
||||
for (int i = -1; i <= 1; i += 2)
|
||||
{
|
||||
Vector2 sparkVelocity = safeVel.RotatedBy(dir * 1.5f * i) - safeVel * 3;
|
||||
Vector2 sparkPlace = Owner.Center + (((safeVel * 15).RotatedBy(2f * dir * i) * 1.5f) + safeVel.RotatedBy(0.5f * i * dir) * 30) * fxFade;
|
||||
Particle spark = new CustomSpark(sparkPlace, sparkVelocity.RotatedByRandom(0.1f), "CalamityMod/Particles/BloomCircle", false, 6, sparkscale2, effectsColor * fxFade, new Vector2(0.8f, 2f), shrinkSpeed: 1.1f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
|
||||
if (isAlive)
|
||||
{
|
||||
int dustStyle = ModContent.DustType<SquashDustHollow>();
|
||||
Dust dust2 = Dust.NewDustPerfect(sparkPlace, dustStyle, sparkVelocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(3, 5));
|
||||
dust2.scale = Main.rand.NextFloat(0.9f, 1.3f);
|
||||
dust2.color = effectsColor;
|
||||
dust2.noGravity = true;
|
||||
dust2.fadeIn = Main.rand.NextFloat(0f, 0.7f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Owner.dead || (!isAlive && fxFade < 0.1f) || Owner.velocity == Vector2.Zero)
|
||||
Projectile.Kill();
|
||||
}
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
|
||||
target.MoveNPC(launchVel, 16, true);
|
||||
SoundStyle sound = new("CalamityMod/Sounds/Item/WaterSplash", 2);
|
||||
SoundEngine.PlaySound(sound with { Volume = 0.2f, Pitch = Main.rand.NextFloat(0.35f, 0.5f), MaxInstances = -1 }, Projectile.Center);
|
||||
|
||||
target.AddBuff(BuffID.Wet, 300);
|
||||
target.AddBuff(ModContent.BuffType<Buffs.DamageOverTime.RiptideDebuff>(), 180);
|
||||
SoundEngine.PlaySound(SoundID.Item85 with { Volume = 0.4f, PitchVariance = 0.4f }, Projectile.Center);
|
||||
for (int i = 0; i < 3; ++i)
|
||||
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
|
||||
target.MoveNPC(launchVel, 20, true);
|
||||
|
||||
for (int i = 0; i <= 17; i++)
|
||||
{
|
||||
int bloodLifetime = Main.rand.Next(20, 26);
|
||||
float bloodScale = Main.rand.NextFloat(0.6f, 0.8f);
|
||||
Color bloodColor = Color.Lerp(Color.DodgerBlue, Color.DarkTurquoise, Main.rand.NextFloat());
|
||||
|
||||
if (Main.rand.NextBool(20))
|
||||
bloodScale *= 2f;
|
||||
|
||||
float randomSpeedMultiplier = Main.rand.NextFloat(1.25f, 2.25f);
|
||||
Vector2 bloodVelocity = Main.rand.NextVector2Unit() * 5 * randomSpeedMultiplier;
|
||||
bloodVelocity.Y -= 5f;
|
||||
BloodParticle blood = new BloodParticle(Projectile.Center, bloodVelocity, bloodLifetime, bloodScale, bloodColor);
|
||||
GeneralParticleHandler.SpawnParticle(blood);
|
||||
float variance = Main.rand.NextFloat(-0.4f, 0.4f);
|
||||
int dustStyle = ModContent.DustType<SquashDust>();
|
||||
Dust dust2 = Dust.NewDustPerfect(target.Center, dustStyle);
|
||||
dust2.scale = (Main.rand.NextFloat(1.2f, 1.4f) - Math.Abs(variance)) * 1.5f;
|
||||
dust2.velocity = (aimVel.SafeNormalize(Vector2.UnitX).RotatedBy(variance) - Vector2.UnitY * 0.3f) * Main.rand.NextFloat(15, 35f) * (1 - Math.Abs(variance) * 1.3f);
|
||||
dust2.color = Main.rand.NextBool() ? Color.MediumTurquoise : Color.DeepSkyBlue;
|
||||
dust2.noGravity = false;
|
||||
dust2.fadeIn = Main.rand.NextFloat(0f, 1.2f);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplosionRadius, targetHitbox);
|
||||
public override bool? CanDamage() => base.CanDamage();
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
public override bool? CanDamage() => (isAlive ? null : false);
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
modifiers.HitDirectionOverride = Math.Sign(Owner.direction);
|
||||
}
|
||||
if (effectsColor == Color.White || !visuals)
|
||||
return false;
|
||||
|
||||
float sine = MathHelper.Lerp(Math.Abs((float)Math.Sin(Main.GlobalTimeWrappedHourly * 50f / MathHelper.Pi)), 0.8f, 0.7f);
|
||||
Texture2D bTexture = ModContent.Request<Texture2D>("CalamityMod/Particles/VerticalSmearRagged").Value;
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
float bScale2 = 0.75f;
|
||||
Vector2 scale = new Vector2((1 - i * 0.13f) * sine, (1 + i * 0.012f) + fxFade * 0.2f) * (bScale2 + i * 0.08f) * fxFade * 0.27f;
|
||||
Main.EntitySpriteDraw(bTexture, Owner.Center - Main.screenPosition + aimVel.SafeNormalize(Vector2.UnitX) * -15, null, Color.Lerp(Color.Aquamarine, effectsColor, i * 0.15f) with { A = 0 } * fxFade * 1f, aimVel.ToRotation() + MathHelper.PiOver2, bTexture.Size() * 0.5f, scale, i % 2 == 0 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public override bool? CanCutTiles() => false;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -16,22 +17,92 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
public Player Owner => Main.player[Projectile.owner];
|
||||
private static float ExplosionRadius = 75f;
|
||||
|
||||
public Color effectsColor = Color.White;
|
||||
public float fxFade = 0;
|
||||
public bool isAlive = true;
|
||||
public bool visuals => Owner.Calamity().sPauldronVisual;
|
||||
public Vector2 aimVel;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
//These shouldn't matter because its circular
|
||||
Projectile.width = 75;
|
||||
Projectile.height = 75;
|
||||
Projectile.width = (int)ExplosionRadius;
|
||||
Projectile.height = (int)ExplosionRadius;
|
||||
Projectile.friendly = true;
|
||||
Projectile.DamageType = AverageDamageClass.Instance;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 4;
|
||||
Projectile.usesIDStaticNPCImmunity = true;
|
||||
Projectile.idStaticNPCHitCooldown = 22;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 15;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 18;
|
||||
}
|
||||
public override void AI()
|
||||
{
|
||||
if (Owner.dashDelay != -1)
|
||||
isAlive = false;
|
||||
if (isAlive)
|
||||
Projectile.timeLeft++;
|
||||
Projectile.Center = Owner.Center;
|
||||
|
||||
if (effectsColor == Color.White)
|
||||
aimVel = Owner.velocity;
|
||||
else
|
||||
{
|
||||
aimVel = Vector2.Lerp(aimVel, Owner.velocity, 0.2f);
|
||||
}
|
||||
|
||||
if (isAlive)
|
||||
{
|
||||
float goalSize = Utils.GetLerpValue(5, 15, Math.Abs(aimVel.X), true);
|
||||
if (goalSize < fxFade)
|
||||
fxFade = MathHelper.Lerp(fxFade, goalSize, 0.03f);
|
||||
else
|
||||
fxFade = goalSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
fxFade = MathHelper.Lerp(fxFade, 0, 0.08f);
|
||||
}
|
||||
|
||||
|
||||
float rate = Main.GlobalTimeWrappedHourly * 22;
|
||||
List<Color> eColors = new List<Color>()
|
||||
{
|
||||
Color.OrangeRed,
|
||||
Color.Orange,
|
||||
Color.DarkOrange
|
||||
};
|
||||
|
||||
int colorIndex = (int)(rate / 2 % eColors.Count);
|
||||
Color currentColor = eColors[colorIndex];
|
||||
Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
|
||||
effectsColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
|
||||
|
||||
if (visuals)
|
||||
{
|
||||
int dir = MathF.Sign(aimVel.X);
|
||||
Vector2 safeVel = aimVel.SafeNormalize(Vector2.UnitX);
|
||||
float sparkscale2 = 0.35f * Math.Max(fxFade, 0.5f);
|
||||
for (int i = -1; i <= 1; i += 2)
|
||||
{
|
||||
Vector2 sparkVelocity = safeVel.RotatedBy(dir * 4.3f * i) - safeVel * 3;
|
||||
Vector2 sparkPlace = Owner.Center + (safeVel * 15).RotatedBy(2f * dir * i) * 1.5f;
|
||||
Particle spark = new VelChangingSpark(sparkPlace, sparkVelocity, -safeVel * 5, "CalamityMod/Particles/BloomCircle", 10, sparkscale2, effectsColor * fxFade, new Vector2(0.8f, 2f), shrinkSpeed: 0.4f, lerpRate: 0.1f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
|
||||
if (isAlive)
|
||||
{
|
||||
int dustStyle = ModContent.DustType<SquashDust>();
|
||||
Dust dust2 = Dust.NewDustPerfect(sparkPlace + safeVel * 30, dustStyle, sparkVelocity.RotatedBy(-0.6f * i * dir).RotatedByRandom(0.3f) * Main.rand.NextFloat(3, 5));
|
||||
dust2.scale = Main.rand.NextFloat(0.9f, 1.3f);
|
||||
dust2.color = Main.rand.NextBool() ? Color.Orange : Color.OrangeRed;
|
||||
dust2.noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Owner.dead || (!isAlive && fxFade < 0.1f) || Owner.velocity == Vector2.Zero)
|
||||
Projectile.Kill();
|
||||
}
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.OnFire3, 240);
|
||||
@@ -45,43 +116,61 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
for (int i = 0; i <= 12; i++)
|
||||
{
|
||||
float variance = Main.rand.NextFloat(-0.7f, 0.7f);
|
||||
int dustStyle = ModContent.DustType<LightDust>();
|
||||
int dustStyle = ModContent.DustType<SquashDustTileTouch>();
|
||||
Dust dust2 = Dust.NewDustPerfect(target.Center, dustStyle, Projectile.velocity);
|
||||
dust2.scale = (Main.rand.NextFloat(1.1f, 1.3f) - Math.Abs(variance)) * 2.5f;
|
||||
dust2.velocity = (Vector2.UnitY * -18).RotatedBy(variance) * Main.rand.NextFloat(0.7f, 1f) * (1 - Math.Abs(variance) * 1.3f);
|
||||
dust2.scale = (Main.rand.NextFloat(1.2f, 1.4f) - Math.Abs(variance)) * 2.5f;
|
||||
dust2.velocity = (Vector2.UnitY * -25).RotatedBy(variance) * Main.rand.NextFloat(0.7f, 1f) * (1 - Math.Abs(variance) * 1.3f);
|
||||
dust2.color = Main.rand.NextBool() ? Color.Orange : Color.OrangeRed;
|
||||
dust2.noGravity = false;
|
||||
dust2.fadeIn = 0.35f;
|
||||
|
||||
Particle spark = new SparkParticle(Projectile.Center, new Vector2(17, 17).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 1f), true, 55, 0.85f, Main.rand.NextBool() ? Color.Orange : Color.OrangeRed);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
float baseRot = Main.rand.NextFloat(-9f, 9f);
|
||||
if (visuals)
|
||||
{
|
||||
float baseRot = Main.rand.NextFloat(-9f, 9f);
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
float rot = Main.rand.NextFloat(-0.3f, 0.3f);
|
||||
for (int b = 0; b < 2; b++)
|
||||
{
|
||||
Vector2 pulseVel = new Vector2(0, Main.rand.NextFloat(-7, -9)).RotatedBy(i * (MathHelper.ToRadians(360f) / 5)).RotatedBy(rot + baseRot + 0.9f);
|
||||
Particle orb = new CustomPulse(target.Center, pulseVel, (Main.rand.NextBool() ? Color.Orange : Color.OrangeRed) * 0.9f, "CalamityMod/Projectiles/Summon/RustyBeaconPulse", Vector2.One, pulseVel.ToRotation(), 0.2f, Main.rand.NextFloat(0.55f, 0.85f) * 3f, Main.rand.Next(14, 19 + 1));
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
}
|
||||
Particle orb2 = new CustomSpark(target.Center, new Vector2(0, -7).RotatedBy(i * (MathHelper.ToRadians(360f) / 5)).RotatedBy(rot + baseRot), "CalamityMod/Particles/BloomLineFade", false, 13, 0.095f, Main.rand.NextBool() ? Color.Orange : Color.OrangeRed, new Vector2(2.9f, 0.5f), shrinkSpeed: 0.9f);
|
||||
GeneralParticleHandler.SpawnParticle(orb2);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Particle bloom = new CustomSpark(target.Center, Vector2.Zero, "CalamityMod/Particles/BloomCircle", false, 20, 1.2f, Color.OrangeRed, new Vector2(1, 1), true, true, glowCenterScale: 0.7f, glowOpacity: 0.8f);
|
||||
GeneralParticleHandler.SpawnParticle(bloom);
|
||||
}
|
||||
}
|
||||
|
||||
Owner.Calamity().GeneralScreenShakePower = 4f;
|
||||
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType<PauldronExplosion>(), Projectile.damage / 5, 0, Projectile.owner);
|
||||
}
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplosionRadius, targetHitbox);
|
||||
public override bool? CanDamage() => (isAlive ? null : false);
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
if (effectsColor == Color.White || !visuals)
|
||||
return false;
|
||||
|
||||
float sine = MathHelper.Lerp(Math.Abs((float)Math.Sin(Main.GlobalTimeWrappedHourly * 50f / MathHelper.Pi)), 0.8f, 0.7f);
|
||||
Texture2D bTexture = ModContent.Request<Texture2D>("CalamityMod/Particles/VerticalSmearLarge").Value;
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
float rot = Main.rand.NextFloat(-0.3f, 0.3f);
|
||||
for (int b = 0; b < 2; b++)
|
||||
{
|
||||
Vector2 pulseVel = new Vector2(0, Main.rand.NextFloat(-7, -9)).RotatedBy(i * (MathHelper.ToRadians(360f) / 5)).RotatedBy(rot + baseRot + 0.9f);
|
||||
Particle orb = new CustomPulse(target.Center, pulseVel, (Main.rand.NextBool() ? Color.Orange : Color.OrangeRed) * 0.9f, "CalamityMod/Projectiles/Summon/RustyBeaconPulse", Vector2.One, pulseVel.ToRotation(), 0.2f, Main.rand.NextFloat(0.55f, 0.85f) * 3f, Main.rand.Next(14, 19 + 1));
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
}
|
||||
Particle orb2 = new CustomSpark(target.Center, new Vector2(0, -7).RotatedBy(i * (MathHelper.ToRadians(360f) / 5)).RotatedBy(rot + baseRot), "CalamityMod/Particles/BloomLineFade", false, 13, 0.095f, Main.rand.NextBool() ? Color.Orange : Color.OrangeRed, new Vector2(2.9f, 0.5f), shrinkSpeed: 0.9f);
|
||||
GeneralParticleHandler.SpawnParticle(orb2);
|
||||
}
|
||||
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType<PauldronExplosion>(), Projectile.damage / 2, 0, Projectile.owner);
|
||||
}
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplosionRadius, targetHitbox);
|
||||
public override bool? CanDamage() => base.CanDamage();
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
Owner.Calamity().GeneralScreenShakePower = 4f;
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Particle bloom = new CustomSpark(target.Center, Vector2.Zero, "CalamityMod/Particles/BloomCircle", false, 20, 1.2f, Color.OrangeRed, new Vector2(1, 1), true, true, glowCenterScale: 0.7f, glowOpacity: 0.8f);
|
||||
GeneralParticleHandler.SpawnParticle(bloom);
|
||||
float bScale2 = 0.75f;
|
||||
Vector2 scale = new Vector2((1 - i * 0.15f) * sine, (1 + i * 0.22f) + fxFade * 0.2f) * (bScale2 - i * 0.08f) * fxFade * 0.23f;
|
||||
Main.EntitySpriteDraw(bTexture, Owner.Center - Main.screenPosition + aimVel.SafeNormalize(Vector2.UnitX) * -15, null, Color.Lerp(effectsColor, Color.White, i * 0.15f) with { A = 0 } * fxFade, aimVel.ToRotation() + MathHelper.PiOver2, bTexture.Size() * 0.5f, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public override bool? CanCutTiles() => false;
|
||||
}
|
||||
|
||||
@@ -31,21 +31,19 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.OnFire3, 240);
|
||||
|
||||
//Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.OrangeRed, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0f, Main.rand.NextFloat(0.8f, 1.1f), 20);
|
||||
//GeneralParticleHandler.SpawnParticle(pulse);
|
||||
//Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.DarkOrange, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0f, Main.rand.NextFloat(0.6f, 0.9f), 20);
|
||||
//GeneralParticleHandler.SpawnParticle(pulse2);
|
||||
}
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplosionRadius, targetHitbox);
|
||||
public override bool? CanDamage() => base.CanDamage();
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
float minMult = 0.3f;
|
||||
int hitsToMinMult = 8;
|
||||
float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true);
|
||||
modifiers.SourceDamage *= damageMult;
|
||||
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
|
||||
target.MoveNPC(launchVel, 15, true);
|
||||
}
|
||||
|
||||
@@ -43,9 +43,9 @@ namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
Color value = Color.Lerp(cyan, blue, (MathF.Sin(-j / 80f + Main.GameUpdateCount * 0.017f + i / 40f) + 1f) / 2f);
|
||||
Color value1 = Color.Lerp(cyan, blue, (MathF.Sin((j - 100) / 50f + Main.GameUpdateCount * 0.004f + -i / 30f) + 1f) / 2f);
|
||||
|
||||
r = (value.R + value1.R) / 900f;
|
||||
g = (value.G + value1.G) / 900f;
|
||||
b = (value.B + value1.B) / 900f;
|
||||
r = (value.R + value1.R) / 800f;
|
||||
g = (value.G + value1.G) / 800f;
|
||||
b = (value.B + value1.B) / 800f;
|
||||
r *= brightness;
|
||||
g *= brightness;
|
||||
b *= brightness;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
CalamityUtils.MergeDecorativeTiles(Type);
|
||||
|
||||
DustType = 108;
|
||||
AddMapEntry(new Color(110, 192, 93));
|
||||
AddMapEntry(new Color(194, 255, 67));
|
||||
HitSound = SoundID.Shatter;
|
||||
MinPick = 55;
|
||||
}
|
||||
@@ -43,9 +43,9 @@ namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
Color value = Color.Lerp(lime, green, (MathF.Sin(-j / 80f + Main.GameUpdateCount * 0.017f + i / 40f) + 1f) / 2f);
|
||||
Color value1 = Color.Lerp(lime, green, (MathF.Sin((j - 100) / 50f + Main.GameUpdateCount * 0.004f + -i / 30f) + 1f) / 2f);
|
||||
|
||||
r = (value.R + value1.R) / 900f;
|
||||
g = (value.G + value1.G) / 900f;
|
||||
b = (value.B + value1.B) / 900f;
|
||||
r = (value.R + value1.R) / 800f;
|
||||
g = (value.G + value1.G) / 800f;
|
||||
b = (value.B + value1.B) / 800f;
|
||||
r *= brightness;
|
||||
g *= brightness;
|
||||
b *= brightness;
|
||||
|
||||
@@ -17,10 +17,8 @@ namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
Main.tileBrick[Type] = true;
|
||||
|
||||
CalamityUtils.MergeWithGeneral(Type);
|
||||
CalamityUtils.MergeDecorativeTiles(Type);
|
||||
|
||||
HitSound = MinePlatingSound;
|
||||
AddMapEntry(new Color(89, 113, 91));
|
||||
|
||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class ChargedWulfrumEnergyBarrierWall : ModWall
|
||||
{
|
||||
internal static FramedMaskTexture GlowMask;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
GlowMask = new("CalamityMod/Walls/ChargedWulfrumEnergyBarrierWallReflect", 36, 36);
|
||||
|
||||
Main.wallHouse[Type] = true;
|
||||
Main.wallLight[Type] = true;
|
||||
AddMapEntry(new Color(67, 146, 146));
|
||||
}
|
||||
|
||||
public override void Unload()
|
||||
{
|
||||
GlowMask?.Unload();
|
||||
GlowMask = null;
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.DungeonSpirit, 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
return false;
|
||||
}
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
float brightness = 0.9f;
|
||||
Color cyan = new Color(67, 146, 146);
|
||||
Color blue = new Color(32, 93, 129);
|
||||
Color value = Color.Lerp(cyan, blue, (MathF.Sin(-j / 80f + Main.GameUpdateCount * 0.017f + i / 40f) + 1f) / 2f);
|
||||
Color value1 = Color.Lerp(cyan, blue, (MathF.Sin((j - 100) / 50f + Main.GameUpdateCount * 0.004f + -i / 30f) + 1f) / 2f);
|
||||
|
||||
r = (value.R + value1.R) / 900f;
|
||||
g = (value.G + value1.G) / 900f;
|
||||
b = (value.B + value1.B) / 900f;
|
||||
r *= brightness;
|
||||
g *= brightness;
|
||||
b *= brightness;
|
||||
}
|
||||
public static void DrawWallGlow(int wallType, int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
if (GlowMask.Texture is null)
|
||||
return;
|
||||
|
||||
Tile tile = Main.tile[i, j];
|
||||
int xLength = 32;
|
||||
int xOff = 0;
|
||||
|
||||
int xPos = tile.WallFrameX + xOff;
|
||||
int yPos = tile.WallFrameY;
|
||||
|
||||
Rectangle frame = new Rectangle(xPos, yPos, xLength, 32);
|
||||
Color drawcolor;
|
||||
drawcolor = WorldGen.paintColor(tile.WallColor);
|
||||
drawcolor.A = 255;
|
||||
Vector2 zero = new Vector2(Main.offScreenRange, Main.offScreenRange);
|
||||
|
||||
if (Main.drawToScreen)
|
||||
zero = Vector2.Zero;
|
||||
|
||||
Vector2 pos = new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero;
|
||||
Color lightColor = Lighting.GetColor(i, j, Color.White);
|
||||
|
||||
spriteBatch.Draw(TextureAssets.Wall[wallType].Value, pos + new Vector2(-8 + xOff, -8), frame, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
|
||||
|
||||
if (GlowMask.HasContentInFramePos(xPos, yPos))
|
||||
{
|
||||
float brightness = MathHelper.Clamp(0.2f - (j / 680), 0f, 0.2f);
|
||||
|
||||
float time = Main.GameUpdateCount;
|
||||
float waveScale1 = time * 0.094f;
|
||||
int scalar = i - (j / 2);
|
||||
float wave1 = waveScale1 * -50 + scalar * 12;
|
||||
float wave1angle = 0.30f + 0.25f * MathF.Sin(MathHelper.ToRadians(wave1));
|
||||
|
||||
drawcolor *= brightness;
|
||||
|
||||
float transparency = 0.02f + (wave1angle / 4);
|
||||
Color glowColor = Color.White * transparency;
|
||||
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
//Vector2 offset = new Vector2(Main.rand.NextFloat(-1, 1f), Main.rand.NextFloat(-1, 1f)) * 0.2f * k;
|
||||
spriteBatch.Draw(GlowMask.Texture, pos + new Vector2(-8 + xOff, -8), frame, glowColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
DrawWallGlow(Type, i, j, spriteBatch);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class WulfrumEnergyBarrierWall : ModWall
|
||||
{
|
||||
internal static FramedMaskTexture GlowMask;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
GlowMask = new("CalamityMod/Walls/WulfrumEnergyBarrierWallReflect", 36, 36);
|
||||
|
||||
Main.wallHouse[Type] = true;
|
||||
Main.wallLight[Type] = true;
|
||||
AddMapEntry(new Color(116, 153, 40));
|
||||
}
|
||||
|
||||
public override void Unload()
|
||||
{
|
||||
GlowMask?.Unload();
|
||||
GlowMask = null;
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.DungeonSpirit, 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
return false;
|
||||
}
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
float brightness = 0.9f;
|
||||
Color lime = new Color(116, 153, 40);
|
||||
Color green = new Color(46, 97, 56);
|
||||
Color value = Color.Lerp(lime, green, (MathF.Sin(-j / 80f + Main.GameUpdateCount * 0.017f + i / 40f) + 1f) / 2f);
|
||||
Color value1 = Color.Lerp(lime, green, (MathF.Sin((j - 100) / 50f + Main.GameUpdateCount * 0.004f + -i / 30f) + 1f) / 2f);
|
||||
|
||||
r = (value.R + value1.R) / 900f;
|
||||
g = (value.G + value1.G) / 900f;
|
||||
b = (value.B + value1.B) / 900f;
|
||||
r *= brightness;
|
||||
g *= brightness;
|
||||
b *= brightness;
|
||||
}
|
||||
public static void DrawWallGlow(int wallType, int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
if (GlowMask.Texture is null)
|
||||
return;
|
||||
|
||||
Tile tile = Main.tile[i, j];
|
||||
int xLength = 32;
|
||||
int xOff = 0;
|
||||
|
||||
int xPos = tile.WallFrameX + xOff;
|
||||
int yPos = tile.WallFrameY;
|
||||
|
||||
Rectangle frame = new Rectangle(xPos, yPos, xLength, 32);
|
||||
Color drawcolor;
|
||||
drawcolor = WorldGen.paintColor(tile.WallColor);
|
||||
drawcolor.A = 255;
|
||||
Vector2 zero = new Vector2(Main.offScreenRange, Main.offScreenRange);
|
||||
|
||||
if (Main.drawToScreen)
|
||||
zero = Vector2.Zero;
|
||||
|
||||
Vector2 pos = new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero;
|
||||
Color lightColor = Lighting.GetColor(i, j, Color.White);
|
||||
|
||||
spriteBatch.Draw(TextureAssets.Wall[wallType].Value, pos + new Vector2(-8 + xOff, -8), frame, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
|
||||
|
||||
if (GlowMask.HasContentInFramePos(xPos, yPos))
|
||||
{
|
||||
float brightness = MathHelper.Clamp(0.2f - (j / 680), 0f, 0.2f);
|
||||
|
||||
float time = Main.GameUpdateCount;
|
||||
float waveScale1 = time * 0.064f;
|
||||
int scalar = i - (j / 2);
|
||||
float wave1 = waveScale1 * -50 + scalar * 12;
|
||||
float wave1angle = 0.30f + 0.25f * MathF.Sin(MathHelper.ToRadians(wave1));
|
||||
|
||||
drawcolor *= brightness;
|
||||
|
||||
float transparency = 0.02f + (wave1angle / 4);
|
||||
Color glowColor = Color.White * transparency;
|
||||
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
//Vector2 offset = new Vector2(Main.rand.NextFloat(-1, 1f), Main.rand.NextFloat(-1, 1f)) * 0.2f * k;
|
||||
spriteBatch.Draw(GlowMask.Texture, pos + new Vector2(-8 + xOff, -8), frame, glowColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
DrawWallGlow(Type, i, j, spriteBatch);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 8.1 KiB |