More balance and tweaks
This commit is contained in:
1 parent
4d9d0caded
commit
a4cecaeb7b
5 files changed
+35
-23
No files matched your search
@@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Item.width = 88;
|
||||
Item.height = 34;
|
||||
Item.damage = 426;
|
||||
Item.damage = 397;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useAnimation = Item.useTime = 8;
|
||||
Item.noMelee = true;
|
||||
|
||||
@@ -29,10 +29,10 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.8f);
|
||||
Projectile.damage = (int)(Projectile.damage * 0.97f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 300, targetHitbox);
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 450, targetHitbox);
|
||||
}
|
||||
}
|
||||
@@ -106,8 +106,8 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
Vector2 position = targetedNPC.Center;
|
||||
Vector2 moveToMouse = (position - Projectile.Center).SafeNormalize(Vector2.UnitX);
|
||||
if (Projectile.velocity.Length() < 7 - (Utils.GetLerpValue(350, 0, Projectile.timeLeft, true) * 2))
|
||||
Projectile.velocity += moveToMouse * (0.02f + Utils.GetLerpValue(550, 250, Projectile.timeLeft, true));
|
||||
if (Projectile.velocity.Length() < 7 - (Utils.GetLerpValue(350, 0, Projectile.timeLeft, true)))
|
||||
Projectile.velocity += moveToMouse * (0.1f * Utils.GetLerpValue(550, 60, Projectile.timeLeft, true) * 10);
|
||||
else
|
||||
Projectile.velocity *= 0.94f;
|
||||
explode = true;
|
||||
@@ -121,6 +121,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
if (explode)
|
||||
{
|
||||
Owner.Calamity().GeneralScreenShakePower = 8.5f;
|
||||
float power = 1.5f;
|
||||
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
@@ -131,14 +132,14 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
2 => color3,
|
||||
_ => color4,
|
||||
};
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType<VoidDust>(), (Projectile.velocity * 6).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1f));
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType<VoidDust>(), (Projectile.velocity * 6 * power).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(1.85f, 2.45f);
|
||||
dust.scale = Main.rand.NextFloat(1.85f, 2.45f) * power;
|
||||
dust.color = useColor;
|
||||
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
Particle orb2 = new CustomSpark(Projectile.Center, new Vector2(0, -40).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 1f), "CalamityMod/Particles/Sparkle", false, 40, Main.rand.NextFloat(1.4f, 2.4f), useColor, new Vector2(0.4f, 1.1f));
|
||||
Particle orb2 = new CustomSpark(Projectile.Center, new Vector2(0, -40 * power).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 1f), "CalamityMod/Particles/Sparkle", false, 40, Main.rand.NextFloat(1.4f, 2.4f) * power, useColor, new Vector2(0.4f, 1.1f));
|
||||
GeneralParticleHandler.SpawnParticle(orb2);
|
||||
}
|
||||
}
|
||||
@@ -151,10 +152,10 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
2 => color3,
|
||||
_ => color4,
|
||||
};
|
||||
Particle orb4 = new CustomPulse(Projectile.Center, Vector2.Zero, useColor, "CalamityMod/Particles/SoftRoundExplosion", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 0.4f - i * 0.03f, 13);
|
||||
Particle orb4 = new CustomPulse(Projectile.Center, Vector2.Zero, useColor, "CalamityMod/Particles/SoftRoundExplosion", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 0.4f - i * 0.03f * power, 13);
|
||||
GeneralParticleHandler.SpawnParticle(orb4);
|
||||
}
|
||||
Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, baseColor, "CalamityMod/Particles/BloomRing", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.15f, 2.5f, 38);
|
||||
Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, baseColor, "CalamityMod/Particles/BloomRing", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.15f * power, 2.5f * power, 38);
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
int parts = 8;
|
||||
float rot = Main.rand.NextFloat(-9, 9);
|
||||
@@ -167,16 +168,16 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
2 => color3,
|
||||
_ => color4,
|
||||
};
|
||||
Particle orb2 = new CustomSpark(Projectile.Center, new Vector2(0, -15 * (i % 2 == 0 ? 1.8f : 1f)).RotatedBy(i * (MathHelper.ToRadians(360f) / parts)).RotatedBy(rot), "CalamityMod/Particles/VerticalSmear", false, 19, 3, useColor, new Vector2(0.2f, 1));
|
||||
Particle orb2 = new CustomSpark(Projectile.Center, new Vector2(0, -15 * (i % 2 == 0 ? 1.8f : 1f) * power).RotatedBy(i * (MathHelper.ToRadians(360f) / parts)).RotatedBy(rot), "CalamityMod/Particles/VerticalSmear", false, 19, 3 * power, useColor, new Vector2(0.2f, 1));
|
||||
GeneralParticleHandler.SpawnParticle(orb2);
|
||||
}
|
||||
Particle orb3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Black, "CalamityMod/Particles/SmallBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 1.2f, 39, false);
|
||||
Particle orb3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Black, "CalamityMod/Particles/SmallBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 1.2f * power, 39, false);
|
||||
GeneralParticleHandler.SpawnParticle(orb3);
|
||||
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Item/EarthMeteor");
|
||||
SoundEngine.PlaySound(fire with { Volume = 1f, Pitch = Main.rand.NextFloat(0, 0.1f) * -3 }, Projectile.Center);
|
||||
|
||||
Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<OntoligicalDespoilerBurst>(), (int)(Projectile.damage * 2f), Projectile.knockBack * 3, Projectile.owner, 0, 0, 0);
|
||||
Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<OntoligicalDespoilerBurst>(), (int)(Projectile.damage * 5.5f), Projectile.knockBack * 3, Projectile.owner, 0, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
dust.scale = Main.rand.NextFloat(0.9f, 1.25f);
|
||||
dust.color = Projectile.ai[2] == 15 ? baseColor : useColor;
|
||||
}
|
||||
Projectile.timeLeft = (int)(AftershotCooldownFrames * 2.5f * (!Owner.Calamity().despoilerNerf ? 2 : 1)); // If you're swapping with no penalty, the swap takes longer
|
||||
Projectile.timeLeft = (int)(AftershotCooldownFrames * 2.5f * (!Owner.Calamity().despoilerNerf ? 3 : 1)); // If you're swapping with no penalty, the swap takes longer
|
||||
Owner.Calamity().despoilerNerf = false; // Remove charge speed penalty if you swap
|
||||
OffsetLengthFromArm = 45f;
|
||||
}
|
||||
@@ -194,7 +194,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
ChargeSound?.Stop();
|
||||
|
||||
Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * BulletSpeed;
|
||||
int charge2DamagePos = Projectile.damage * 3; // Most of the damage comes from the explosion
|
||||
int charge2DamagePos = Projectile.damage; // Most of the damage comes from the explosion
|
||||
int charge2DamageNeg = Projectile.damage * 30;
|
||||
|
||||
if (Positive)
|
||||
@@ -257,7 +257,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
float angle = i == 0 ? -0.25f : i == 2 ? 0.25f : 0;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, fireVec.RotatedBy(angle) * (1 - Math.Abs(angle * 0.4f)), ModContent.ProjectileType<OntologicalDespoilerShot>(), Projectile.damage / 3, Projectile.knockBack, Projectile.owner, 0, 0, i);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, fireVec.RotatedBy(angle) * (1 - Math.Abs(angle * 0.25f)), ModContent.ProjectileType<OntologicalDespoilerShot>(), Projectile.damage / 3, Projectile.knockBack, Projectile.owner, 0, 0, i);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -33,11 +33,11 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 28;
|
||||
Projectile.height = 28;
|
||||
Projectile.width = 30;
|
||||
Projectile.height = 30;
|
||||
Projectile.friendly = true;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 600;
|
||||
Projectile.timeLeft = 750;
|
||||
Projectile.DamageType = DamageClass.Ranged;
|
||||
Projectile.extraUpdates = 4;
|
||||
Projectile.tileCollide = false;
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.rotation = Projectile.velocity.ToRotation();
|
||||
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter > 1)
|
||||
if (Projectile.frameCounter > 10)
|
||||
{
|
||||
Projectile.frame++;
|
||||
Projectile.frameCounter = 0;
|
||||
@@ -82,7 +82,12 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
baseColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
|
||||
|
||||
if (!Positive)
|
||||
{
|
||||
baseColor = Color.White;
|
||||
Projectile.extraUpdates = 3;
|
||||
}
|
||||
else
|
||||
Projectile.extraUpdates = 5;
|
||||
|
||||
if (time > 20)
|
||||
{
|
||||
@@ -131,7 +136,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Vector2 position = targetedNPC.Center;
|
||||
Vector2 moveToMouse = (position - Projectile.Center).SafeNormalize(Vector2.UnitX);
|
||||
if (Projectile.velocity.Length() < 8 - (Utils.GetLerpValue(350, 0, Projectile.timeLeft, true) * 2))
|
||||
Projectile.velocity += moveToMouse * (0.42f + Utils.GetLerpValue(500, 350, Projectile.timeLeft, true));
|
||||
Projectile.velocity += moveToMouse * (0.42f + Utils.GetLerpValue(650, 450, Projectile.timeLeft, true));
|
||||
else
|
||||
Projectile.velocity *= 0.9f;
|
||||
}
|
||||
@@ -189,7 +194,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.92f);
|
||||
Projectile.damage = (int)(Projectile.damage * 0.95f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
@@ -208,10 +213,16 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
Asset<Texture2D> tex3 = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/OntologicalDespoilerShot");
|
||||
Asset<Texture2D> tex4 = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/OntologicalDespoilerShot2");
|
||||
|
||||
Texture2D rTex = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/BasicCircle").Value;
|
||||
|
||||
Rectangle frame = tex3.Frame(1, 6, 0, Projectile.frame);
|
||||
Vector2 rotationPoint = frame.Size() * 0.5f;
|
||||
Main.EntitySpriteDraw(Positive ? tex4.Value : tex3.Value, drawPosition, frame, baseColor with { A = 0 }, drawRotation, rotationPoint, Projectile.scale, SpriteEffects.None);
|
||||
|
||||
for (int i = 0; i < (Positive ? 3 : 1); i++)
|
||||
Main.EntitySpriteDraw(Positive ? tex4.Value : tex3.Value, drawPosition, frame, Positive ? baseColor with { A = 0 } : baseColor, drawRotation, rotationPoint, Projectile.scale, SpriteEffects.None);
|
||||
if (Positive)
|
||||
Main.EntitySpriteDraw(tex4.Value, drawPosition, frame, Color.Lerp(baseColor, Color.White, 0.7f) with { A = 0 }, drawRotation, rotationPoint, Projectile.scale * 0.9f, SpriteEffects.None);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user