Changed lightning color based on Xyk's request (will need experimentation)

Velocity cap increased to have ricochets feel better
New variable to tweak how the ricocheting boomerang shoots lightning
Tweaked iframes to make it feel better and likely be better vs Scal
NOW WITH SOUND
This commit is contained in:
Storm2103 committed 2023-07-15 23:42:07 -06:00
1 parent f4a1a20247
commit 5fa26257b2
3 files changed
+11 -7

No files matched your search

+2 -1
View File
@@ -54,9 +54,10 @@ namespace CalamityMod.Items.Weapons.Rogue
//Stuff to be used on the projectile, but here for ease of access ingame via DragonLens
public static float ReturnAcceleration = 0.75f;
public static float ReturnMaxSpeed = 24f;
public static float VelocityCap = 18f;
public static float VelocityCap = 24f;
public static float ElectricityDmgMult = 0.3f;
public static float ElectricityCooldown = 500f;
public static float ElectricityCooldownStealth = 900f;
public static float LaserDmgMult = 0.3f;
public static float LaserCooldown = 300f;
@@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Rogue
}
internal Color ColorFunction(float completionRatio)
{
Color baseColor = Color.Lerp(Color.Blue, Color.DarkBlue, (float)Math.Sin(MathHelper.TwoPi * completionRatio + Main.GlobalTimeWrappedHourly * 4f) * 0.5f + 0.5f);
Color baseColor = Color.Lerp(Color.Blue, Color.LightSteelBlue, (float)Math.Sin(MathHelper.TwoPi * completionRatio + Main.GlobalTimeWrappedHourly * 4f) * 0.5f + 0.5f);
return Color.Lerp(baseColor, Color.Violet, ((float)Math.Sin(MathHelper.Pi * completionRatio + Main.GlobalTimeWrappedHourly * 4f) * 0.5f + 0.5f) * 0.8f);
}
public override bool PreDraw(ref Color lightColor)
@@ -9,6 +9,7 @@ using Terraria.ModLoader;
using Terraria.Audio;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.DraedonsArsenal;
using CalamityMod.Sounds;
using System.CodeDom;
namespace CalamityMod.Projectiles.Rogue
@@ -28,7 +29,7 @@ namespace CalamityMod.Projectiles.Rogue
set => Projectile.ai[1] = value;
}
public const float MaxTargetSearchDistance = 750;
public const float MaxTargetSearchDistance = 800;
public float ElectricVelocityCharge = 0f;
public float LaserVelocityCharge = 0f;
public bool Ricochet = false;
@@ -41,6 +42,7 @@ namespace CalamityMod.Projectiles.Rogue
public float VelocityCap = DynamicPursuer.VelocityCap;
public float ElectricityDmgMult = DynamicPursuer.ElectricityDmgMult;
public float ElectricityCooldown = DynamicPursuer.ElectricityCooldown;
public float ElectricityCooldownStealth = DynamicPursuer.ElectricityCooldownStealth;
public float LaserDmgMult = DynamicPursuer.LaserDmgMult;
public float LaserCooldown = DynamicPursuer.LaserCooldown;
@@ -59,7 +61,7 @@ namespace CalamityMod.Projectiles.Rogue
Projectile.extraUpdates = 1;
Projectile.DamageType = RogueDamageClass.Instance;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 400;
Projectile.localNPCHitCooldown = 320; // 160
Projectile.timeLeft = 600; //300 cuz extra updates
}
@@ -113,7 +115,7 @@ namespace CalamityMod.Projectiles.Rogue
ElectricVelocityCharge += Projectile.velocity.Length();
if (ElectricVelocityCharge >= ElectricityCooldown)
if (ElectricVelocityCharge >= ElectricityCooldownStealth)
{
ElectricVelocityCharge = 0f;
AttemptToFireElectricity((int)(Projectile.damage * ElectricityDmgMult));
@@ -123,7 +125,7 @@ namespace CalamityMod.Projectiles.Rogue
else
{
float distanceFromPlayer = Projectile.Distance(player.Center);
if (distanceFromPlayer > 2500f)
if (distanceFromPlayer > 2800f)
Projectile.Kill();
if (Projectile.Calamity().stealthStrike)
@@ -201,6 +203,7 @@ namespace CalamityMod.Projectiles.Rogue
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
SoundEngine.PlaySound(CommonCalamitySounds.SwiftSliceSound, Projectile.position);
if (((Projectile.Calamity().stealthStrike && Projectile.numHits == 4) || !Projectile.Calamity().stealthStrike) && !ReturningToPlayer)
{
if ((Projectile.Calamity().stealthStrike && Projectile.numHits == 4))
@@ -232,7 +235,7 @@ namespace CalamityMod.Projectiles.Rogue
//Retarget
Ricochet = true;
NPC newTarget = null;
float closestNPCDistance = 2500f;
float closestNPCDistance = 2800f;
float targettingDistance = MaxTargetSearchDistance * 2f;