Luxors Fixes
This commit is contained in:
1 parent
71ea9ed9c6
commit
9044146e02
7 files changed
+19
-30
No files matched your search
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public const int rogueAttackSpeed = 36; // Rogue has a 12 frame delay between it's two shots, so it's actaully a bit slower than you'd think
|
||||
public const int classlessAttackSpeed = 50;
|
||||
|
||||
public const int meleeDamage = 16;
|
||||
public const int meleeDamage = 10;
|
||||
public const int rangedDamage = 5;
|
||||
public const int magicDamage = 13;
|
||||
public const int summonerDamage = 22;
|
||||
|
||||
@@ -1056,7 +1056,8 @@ LuxorsGift: {
|
||||
Tooltip:
|
||||
'''
|
||||
Summons a scarab launcher that follows you closely
|
||||
The scarab fires different projectiles at enemies depending on what class the held weapon belongs to
|
||||
The scarab fires different projectiles at enemies depending on what class the held weapon belongs to
|
||||
Held item class is not updated when holding a tool
|
||||
When not in use, the scarab will condense itself into a small orb of light
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
Projectile.extraUpdates = 2;
|
||||
Projectile.tileCollide = false;
|
||||
}
|
||||
public override void AI()
|
||||
{
|
||||
@@ -65,6 +66,9 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Particle spark = new GlowSparkParticle(Projectile.Center - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 2, -Projectile.velocity.SafeNormalize(Vector2.UnitX) * 2, false, 14, 0.02f, Color.Red * 0.45f, new Vector2(1.4f, 1f), true, false, 0.6f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
|
||||
if (Collision.SolidCollision(Projectile.Center, 9, 9))
|
||||
Projectile.velocity *= 0.91f;
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
@@ -75,11 +79,6 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (Projectile.numHits >= 1 && Projectile.timeLeft > 70)
|
||||
Projectile.timeLeft = 70;
|
||||
}
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
Projectile.velocity = oldVelocity * 0.85f;
|
||||
return false;
|
||||
}
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => (Projectile.ai[0] == 5 || Projectile.numHits >= 2) ? false : CalamityUtils.CircularHitboxCollision(Projectile.Center, 20, targetHitbox);
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
|
||||
@@ -57,18 +57,8 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
int hitsToMinMult = 3;
|
||||
float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true);
|
||||
modifiers.SourceDamage *= damageMult;
|
||||
|
||||
for (int i = 0; i < 12; i++)
|
||||
{
|
||||
Vector2 dustVel = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2().RotatedByRandom(0.2f) * Main.rand.NextFloat(2.5f, 8.5f);
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(11, 11), Main.rand.NextBool() ? 278 : ModContent.DustType<LightDust>(), dustVel * Main.rand.NextFloat(0.3f, 1.7f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(0.8f, 1.1f);
|
||||
dust.color = Color.Cyan;
|
||||
dust.noLightEmittence = true;
|
||||
}
|
||||
}
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
for (int i = 0; i < 12; i++)
|
||||
{
|
||||
@@ -79,7 +69,6 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
dust.color = Color.Cyan;
|
||||
dust.noLightEmittence = true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 20, targetHitbox);
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
|
||||
@@ -34,17 +34,13 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Lighting.AddLight(Projectile.Center, Color.Magenta.ToVector3() * 0.35f);
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
if (Projectile.numHits == 0)
|
||||
{
|
||||
Projectile.velocity.Y += 0.04f;
|
||||
if (Projectile.velocity.Y > 0)
|
||||
Projectile.velocity.X *= 0.99f;
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.velocity.Y += 0.06f;
|
||||
if (Projectile.velocity.Y > 0)
|
||||
Projectile.velocity.X *= 0.985f;
|
||||
}
|
||||
|
||||
if (Projectile.velocity.Y > 0)
|
||||
Projectile.velocity.X *= 0.99f;
|
||||
|
||||
if (Projectile.timeLeft > 60)
|
||||
{
|
||||
Vector2 dustVel = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2().RotatedByRandom(0.05f) * Main.rand.NextFloat(0.1f, 0.3f);
|
||||
@@ -63,7 +59,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
modifiers.SourceDamage *= damageMult;
|
||||
|
||||
Projectile.velocity = Utils.DirectionTo(target.Center, Projectile.Center).RotatedByRandom(0.2f) * 7;
|
||||
Projectile.velocity.X *= 0.2f;
|
||||
Projectile.velocity.X *= 0.25f;
|
||||
Projectile.velocity.Y *= 1.2f;
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
@@ -102,7 +98,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
Vector2 drawOffset = (MathHelper.TwoPi * i / 8f).ToRotationVector2() * 2f;
|
||||
Vector2 drawOffset = (MathHelper.TwoPi * i / 8f).ToRotationVector2() * 1f;
|
||||
Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + drawOffset, null, drawColor with { A = 0 } * 0.4f * (float)Math.Pow(fade, 3), Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None);
|
||||
}
|
||||
Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, Color.White * fade, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None);
|
||||
|
||||
@@ -88,6 +88,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
dust.color = Color.Lime;
|
||||
dust.noLightEmittence = true;
|
||||
}
|
||||
Projectile.Kill();
|
||||
}
|
||||
}
|
||||
public override bool? CanHitNPC(NPC target) => (targeted != null && target == targeted && attackTime == 0) ? null : false;
|
||||
@@ -101,7 +102,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
Vector2 drawOffset = (MathHelper.TwoPi * i / 8f).ToRotationVector2() * 2f;
|
||||
Vector2 drawOffset = (MathHelper.TwoPi * i / 8f).ToRotationVector2() * 1f;
|
||||
Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + drawOffset, null, drawColor with { A = 0 } * 0.4f * (float)Math.Pow(fade, 3), Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None);
|
||||
}
|
||||
Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, Color.White * fade, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None);
|
||||
|
||||
@@ -53,6 +53,9 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
Color classColor = Color.White;
|
||||
DamageClass itemClass = Owner.HeldItem.DamageType;
|
||||
// Held item class is not updated when you hold any tools
|
||||
if ((Owner.HeldItem.axe > 0 || Owner.HeldItem.hammer > 0 || Owner.HeldItem.pick > 0) && lastDamageClass != null)
|
||||
itemClass = lastDamageClass;
|
||||
if (itemClass == null)
|
||||
{
|
||||
Projectile.Kill();
|
||||
|
||||
Reference in new issue
Block a user