fixed conflicts

This commit is contained in:
termigator1359 committed 2020-07-04 10:19:41 -04:00
commit 7ccc36eff2
387 files changed
+3928 -2230

No files matched your search

@@ -0,0 +1,169 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.Enums;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.BaseProjectiles
{
public abstract class BaseLaserbeamProjectile : ModProjectile
{
public float RotationalSpeed
{
get => projectile.ai[0];
set => projectile.ai[0] = value;
}
public float Time
{
get => projectile.localAI[0];
set => projectile.localAI[0] = value;
}
public float LaserLength
{
get => projectile.localAI[1];
set => projectile.localAI[1] = value;
}
public virtual void Behavior()
{
// Attach to some arbitrary thing/position optionally. (The ai[1] value is a reserved for this in vanilla's Phantasmal Deathray)
AttachToSomething();
// Ensure the the velocity is a unit vector and is not a <0,0> vector.
projectile.velocity = projectile.velocity.SafeNormalize(-Vector2.UnitY);
Time++;
if (Time >= Lifetime)
{
projectile.Kill();
return;
}
DetermineScale();
UpdateLaserMotion();
float idealLaserLength = DetermineLaserLength();
LaserLength = MathHelper.Lerp(LaserLength, idealLaserLength, 0.9f); // Very quickly approach the ideal laser length.
DelegateMethods.v3_1 = LightCastColor.ToVector3();
Utils.PlotTileLine(projectile.Center, projectile.Center + projectile.velocity * LaserLength, projectile.width * projectile.scale, new Utils.PerLinePoint(DelegateMethods.CastLight));
}
public virtual void UpdateLaserMotion()
{
// This part is rather complicated at a glance.
// What it's doing is converting the velocity to an angle, doing something with that angle, and changing it back into the velocity.
// In this case, "doing something with that angle" means incrementing it by a constant.
// You could attempt to make it intelligent by having it move towards the target like the Last Prism, but that's not done here.
// This allows one to cause an arcing motion.
float updatedVelocityDirection = projectile.velocity.ToRotation() + RotationalSpeed;
projectile.rotation = updatedVelocityDirection - MathHelper.PiOver2; // Pretty much all lasers have a vertical sheet.
projectile.velocity = updatedVelocityDirection.ToRotationVector2();
}
public virtual void DetermineScale()
{
projectile.scale = (float)Math.Sin(Time / Lifetime * MathHelper.Pi) * 6f * MaxScale;
if (projectile.scale > MaxScale)
{
projectile.scale = MaxScale;
}
}
public virtual void AttachToSomething() { } // Does nothing by default.
public virtual float DetermineLaserLength() => MaxLaserLength; // Go with the default length and ignore any obstacles by default.
public virtual void ExtraBehavior() { }
public override void AI()
{
Behavior();
ExtraBehavior();
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
// This should never happen, but just in case-
if (projectile.velocity == Vector2.Zero)
return false;
// Start texture drawing.
spriteBatch.Draw(LaserBeginTexture,
projectile.Center - Main.screenPosition,
null,
LaserOverlayColor,
projectile.rotation,
LaserBeginTexture.Size() / 2f,
projectile.scale,
SpriteEffects.None,
0f);
// Prepare things for body drawing.
float laserBodyLength = LaserLength;
laserBodyLength -= (LaserBeginTexture.Height / 2 + LaserEndTexture.Height) * projectile.scale;
Vector2 centerOnLaser = projectile.Center;
centerOnLaser += projectile.velocity * projectile.scale * LaserBeginTexture.Height / 2f;
// Body drawing.
if (laserBodyLength > 0f)
{
float laserOffset = LaserMiddleTexture.Height * projectile.scale;
float incrementalBodyLength = 0f;
while (incrementalBodyLength + 1f < laserBodyLength)
{
spriteBatch.Draw(LaserMiddleTexture,
centerOnLaser - Main.screenPosition,
null,
LaserOverlayColor,
projectile.rotation,
LaserMiddleTexture.Width * 0.5f * Vector2.UnitX,
projectile.scale,
SpriteEffects.None,
0f);
incrementalBodyLength += laserOffset;
centerOnLaser += projectile.velocity * laserOffset;
}
}
// End texture drawing.
if (Math.Abs(LaserLength - DetermineLaserLength()) < 30f)
{
Vector2 laserEndCenter = centerOnLaser - Main.screenPosition;
spriteBatch.Draw(LaserEndTexture,
laserEndCenter,
null,
LaserOverlayColor,
projectile.rotation,
LaserEndTexture.Frame(1, 1, 0, 0).Top(),
projectile.scale,
SpriteEffects.None,
0f);
}
return false;
}
public override void CutTiles()
{
DelegateMethods.tilecut_0 = TileCuttingContext.AttackMelee;
Utils.PlotTileLine(projectile.Center, projectile.Center + projectile.velocity * LaserLength, projectile.Size.Length() * projectile.scale, new Utils.PerLinePoint(DelegateMethods.CutTiles));
}
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
{
if (projHitbox.Intersects(targetHitbox))
return true;
float unused = 69420f;
if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + projectile.velocity * LaserLength, projectile.Size.Length() * projectile.scale, ref unused))
{
return true;
}
return false;
}
#region Virtual Values
public virtual float Lifetime => 120f;
public virtual float MaxScale => 1f;
public virtual float MaxLaserLength => 2400f; // Be careful with this. Going too high will cause lag.
public virtual Color LightCastColor => Color.White;
public virtual Color LaserOverlayColor => Color.White * 0.9f;
public virtual Texture2D LaserBeginTexture { get; }
public virtual Texture2D LaserMiddleTexture { get; }
public virtual Texture2D LaserEndTexture { get; }
#endregion
}
}
+13 -11
View File
@@ -56,15 +56,11 @@ namespace CalamityMod.Projectiles.Boss
}
int choice = (int)projectile.ai[1];
if (projectile.soundDelay <= 0 && (choice == 0 || choice == 2))
if (projectile.localAI[0] == 0f)
{
projectile.soundDelay = 420;
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/BrimstoneMonsterDrone"), (int)projectile.Center.X, (int)projectile.Center.Y);
}
if (projectile.localAI[0] == 0f)
{
projectile.localAI[0] += 1f;
projectile.soundDelay = 1125 - (choice * 225);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/BrimstoneMonsterSpawn"), (int)projectile.Center.X, (int)projectile.Center.Y);
projectile.localAI[0] += 1f;
switch (choice)
{
case 0:
@@ -82,10 +78,16 @@ namespace CalamityMod.Projectiles.Boss
default:
break;
}
}
}
if (speedAdd < speedLimit)
speedAdd += 0.04f;
if (speedAdd < speedLimit)
speedAdd += 0.04f;
if (projectile.soundDelay <= 0 && (choice == 0 || choice == 2))
{
projectile.soundDelay = 420;
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/BrimstoneMonsterDrone"), (int)projectile.Center.X, (int)projectile.Center.Y);
}
bool revenge = CalamityWorld.revenge || CalamityWorld.bossRushActive;
+31 -34
View File
@@ -56,43 +56,40 @@ namespace CalamityMod.Projectiles.Boss
if (beamTimer <= 0)
{
Main.PlaySound(SoundID.Item33, (int)projectile.position.X, (int)projectile.position.Y);
float spread = 30f * 0.0174f;
double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2;
double deltaAngle = spread / 8f;
double offsetAngle;
int i;
if (projectile.owner == Main.myPlayer)
{
for (i = 0; i < 4; i++)
{
float speed = 4f;
int seeProjFileforDmg = 0;
if (CalamityWorld.death)
{
speed = 7f;
}
else if (CalamityWorld.revenge)
{
speed = 6f;
}
else if (Main.expertMode)
{
speed = 5f;
}
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * speed), (float)(Math.Cos(offsetAngle) * speed), ModContent.ProjectileType<DoGBeam>(), seeProjFileforDmg, projectile.knockBack, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * speed), (float)(-Math.Cos(offsetAngle) * speed), ModContent.ProjectileType<DoGBeam>(), seeProjFileforDmg, projectile.knockBack, projectile.owner, 0f, 0f);
}
}
if (projectile.owner == Main.myPlayer)
{
float speed = 3f;
int seeProjFileforDmg = 0;
if (CalamityWorld.death)
{
speed = 5f;
}
else if (CalamityWorld.revenge)
{
speed = 4.5f;
}
else if (Main.expertMode)
{
speed = 4f;
}
speed *= projectile.ai[0];
int totalProjectiles = 8;
float radians = MathHelper.TwoPi / totalProjectiles;
for (int i = 0; i < totalProjectiles; i++)
{
Vector2 vector255 = new Vector2(0f, -speed).RotatedBy(radians * i);
Projectile.NewProjectile(projectile.Center, vector255, ModContent.ProjectileType<DoGBeam>(), seeProjFileforDmg, 0f, projectile.owner, 0f, 0f);
}
}
beamTimer = 180;
}
int num103 = (int)Player.FindClosest(projectile.Center, 1, 1);
int num103 = Player.FindClosest(projectile.Center, 1, 1);
float scaleFactor2 = projectile.velocity.Length();
Vector2 vector11 = Main.player[num103].Center - projectile.Center;
if (Vector2.Distance(Main.player[num103].Center, projectile.Center) > 2000f)
{
projectile.position.X = (float)(Main.player[num103].Center.X / 16) * 16f - (float)(projectile.width / 2);
projectile.position.Y = (float)(Main.player[num103].Center.Y / 16) * 16f - (float)(projectile.height / 2) - 250f;
projectile.position.X = Main.player[num103].Center.X / 16 * 16f - (projectile.width / 2);
projectile.position.Y = Main.player[num103].Center.Y / 16 * 16f - (projectile.height / 2) - 250f;
projectile.ai[1] = 0f;
beamTimer = 90;
}
@@ -112,7 +109,7 @@ namespace CalamityMod.Projectiles.Boss
if (Main.rand.NextBool(2))
{
Main.dust[num622].scale = 0.5f;
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
}
}
for (int num623 = 0; num623 < 60; num623++)
@@ -142,8 +139,8 @@ namespace CalamityMod.Projectiles.Boss
if (projectile.timeLeft < 85)
{
byte b2 = (byte)(projectile.timeLeft * 3);
byte a2 = (byte)(100f * ((float)b2 / 255f));
return new Color((int)b2, (int)b2, (int)b2, (int)a2);
byte a2 = (byte)(100f * (b2 / 255f));
return new Color(b2, b2, b2, a2);
}
return new Color(255, 255, 255, 100);
}
+2 -3
View File
@@ -1,7 +1,6 @@
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.IO;
using Terraria;
using Terraria.ModLoader;
@@ -73,7 +72,7 @@ namespace CalamityMod.Projectiles.Boss
OldVelocity = Vector2.Zero;
projectile.netUpdate = true;
}
projectile.rotation = projectile.velocity.ToRotation() + 1.57f;
projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2;
}
// Otherwise, be sure to save the velocity the projectile started with. It will be set again when the telegraph is over.
else if (OldVelocity == Vector2.Zero)
@@ -81,7 +80,7 @@ namespace CalamityMod.Projectiles.Boss
OldVelocity = projectile.velocity;
projectile.velocity = Vector2.Zero;
projectile.netUpdate = true;
projectile.rotation = OldVelocity.ToRotation() + 1.57f;
projectile.rotation = OldVelocity.ToRotation() + MathHelper.PiOver2;
}
TelegraphDelay++;
}
+11 -11
View File
@@ -45,16 +45,6 @@ namespace CalamityMod.Projectiles.Boss
Lighting.AddLight(projectile.Center, 0.5f, 0.25f, 0f);
float num953 = revenge ? 110f : 100f;
float scaleFactor12 = revenge ? 50f : 40f;
if (projectile.ai[1] == 1f)
{
num953 *= 0.7f;
scaleFactor12 *= 0.7f;
}
float num954 = 40f;
if (projectile.timeLeft > 30 && projectile.alpha > 0)
{
projectile.alpha -= 25;
@@ -68,9 +58,19 @@ namespace CalamityMod.Projectiles.Boss
projectile.alpha = 0;
}
if (projectile.timeLeft > 120 && projectile.ai[1] == 1f)
if (projectile.timeLeft > 135 && projectile.ai[1] == 1f)
return;
float num953 = revenge ? 110f : 100f;
float num954 = 40f;
float scaleFactor12 = revenge ? 50f : 40f;
if (projectile.ai[1] == 1f)
{
num953 *= 0.7f;
scaleFactor12 *= 0.7f;
}
int num959 = (int)projectile.ai[0];
if (num959 >= 0 && Main.player[num959].active && !Main.player[num959].dead)
{
+2 -2
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Boss
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Frost Mist");
Main.projFrames[projectile.type] = 6;
Main.projFrames[projectile.type] = 8;
ProjectileID.Sets.TrailCacheLength[projectile.type] = 4;
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
}
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Boss
projectile.frame++;
projectile.frameCounter = 0;
}
if (projectile.frame > 3)
if (projectile.frame >= Main.projFrames[projectile.type])
{
projectile.frame = 0;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

+11 -10
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Boss
{
projectile.width = 30;
projectile.height = 30;
projectile.friendly = true;
projectile.hostile = true;
projectile.ignoreWater = true;
projectile.tileCollide = false;
projectile.alpha = 255;
@@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Boss
public override void AI()
{
if (projectile.ai[0] < 80f)
if (projectile.ai[0] < 240f)
{
projectile.ai[0] += 1f;
@@ -41,14 +41,15 @@ namespace CalamityMod.Projectiles.Boss
}
bool expertMode = Main.expertMode;
projectile.velocity *= 1.01f;
int num487 = Player.FindClosest(projectile.position, projectile.width, projectile.height);
Vector2 vector36 = new Vector2(projectile.position.X + projectile.width * 0.5f, projectile.position.Y + projectile.height * 0.5f);
float num489 = Main.player[num487].Center.X - vector36.X;
float num490 = Main.player[num487].Center.Y - vector36.Y;
float num491 = (float)Math.Sqrt(num489 * num489 + num490 * num490);
if (num491 < 50f && projectile.position.X < Main.player[num487].position.X + Main.player[num487].width && projectile.position.X + projectile.width > Main.player[num487].position.X && projectile.position.Y < Main.player[num487].position.Y + Main.player[num487].height && projectile.position.Y + projectile.height > Main.player[num487].position.Y)
if (projectile.velocity.Length() < 16f)
projectile.velocity *= 1.01f;
projectile.ai[1] = Player.FindClosest(projectile.position, projectile.width, projectile.height);
int num487 = (int)projectile.ai[1];
float num491 = Vector2.Distance(Main.player[num487].Center, projectile.Center);
if (num491 < 50f && !Main.player[num487].dead && projectile.position.X < Main.player[num487].position.X + Main.player[num487].width && projectile.position.X + projectile.width > Main.player[num487].position.X && projectile.position.Y < Main.player[num487].position.Y + Main.player[num487].height && projectile.position.Y + projectile.height > Main.player[num487].position.Y)
{
int num492 = expertMode ? -150 : -100;
if (CalamityWorld.death || CalamityWorld.bossRushActive)
@@ -66,7 +67,7 @@ namespace CalamityMod.Projectiles.Boss
{
Main.player[num487].KillMe(PlayerDeathReason.ByCustomReason(Main.player[Main.myPlayer].name + " burst into sinless ash."), 1000.0, 0, false);
}
NetMessage.SendData(MessageID.SpiritHeal, -1, -1, null, num487, num492, 0f, 0f, 0, 0, 0);
NetMessage.SendData(MessageID.SpiritHeal, -1, -1, null, num487, num492);
projectile.Kill();
}
}
+12 -10
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Boss
{
projectile.width = 20;
projectile.height = 20;
projectile.friendly = true;
projectile.hostile = true;
projectile.ignoreWater = true;
projectile.tileCollide = false;
projectile.alpha = 255;
@@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Boss
public override void AI()
{
if (projectile.ai[0] < 80f)
if (projectile.ai[0] < 240f)
{
projectile.ai[0] += 1f;
@@ -37,13 +37,15 @@ namespace CalamityMod.Projectiles.Boss
}
bool expertMode = Main.expertMode;
projectile.velocity *= 1.01f;
int num487 = Player.FindClosest(projectile.position, projectile.width, projectile.height);
Vector2 vector36 = new Vector2(projectile.position.X + projectile.width * 0.5f, projectile.position.Y + projectile.height * 0.5f);
float num489 = Main.player[num487].Center.X - vector36.X;
float num490 = Main.player[num487].Center.Y - vector36.Y;
float num491 = (float)Math.Sqrt(num489 * num489 + num490 * num490);
if (num491 < 50f && projectile.position.X < Main.player[num487].position.X + Main.player[num487].width && projectile.position.X + projectile.width > Main.player[num487].position.X && projectile.position.Y < Main.player[num487].position.Y + Main.player[num487].height && projectile.position.Y + projectile.height > Main.player[num487].position.Y)
if (projectile.velocity.Length() < 16f)
projectile.velocity *= 1.01f;
projectile.ai[1] = Player.FindClosest(projectile.position, projectile.width, projectile.height);
int num487 = (int)projectile.ai[1];
float num491 = Vector2.Distance(Main.player[num487].Center, projectile.Center);
if (num491 < 50f && !Main.player[num487].dead && projectile.position.X < Main.player[num487].position.X + Main.player[num487].width && projectile.position.X + projectile.width > Main.player[num487].position.X && projectile.position.Y < Main.player[num487].position.Y + Main.player[num487].height && projectile.position.Y + projectile.height > Main.player[num487].position.Y)
{
int num492 = expertMode ? 50 : 35;
Main.player[num487].HealEffect(num492, false);
@@ -52,7 +54,7 @@ namespace CalamityMod.Projectiles.Boss
{
Main.player[num487].statLife = Main.player[num487].statLifeMax2;
}
NetMessage.SendData(MessageID.SpiritHeal, -1, -1, null, num487, num492, 0f, 0f, 0, 0, 0);
NetMessage.SendData(MessageID.SpiritHeal, -1, -1, null, num487, num492);
projectile.Kill();
}
}
+10 -9
View File
@@ -16,7 +16,8 @@ namespace CalamityMod.Projectiles.Boss
{
projectile.width = 20;
projectile.height = 20;
projectile.hostile = true;
projectile.scale = 1.5f;
projectile.hostile = true;
projectile.ignoreWater = true;
projectile.tileCollide = false;
projectile.penetrate = -1;
@@ -25,7 +26,7 @@ namespace CalamityMod.Projectiles.Boss
public override void AI()
{
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.01f / 255f, (255 - projectile.alpha) * 0.15f / 255f, (255 - projectile.alpha) * 0.05f / 255f);
Lighting.AddLight(projectile.Center, 0f, 0.15f, 0f);
bool flag15 = false;
bool flag16 = false;
if (projectile.velocity.X < 0f && projectile.position.X < projectile.ai[0])
@@ -61,12 +62,12 @@ namespace CalamityMod.Projectiles.Boss
num461 *= 0.7f;
projectile.ai[0] += 4f;
int num462 = 0;
while ((float)num462 < num461)
while (num462 < num461)
{
float num463 = (float)Main.rand.Next(-10, 11);
float num464 = (float)Main.rand.Next(-10, 11);
float num465 = (float)Main.rand.Next(3, 9);
float num466 = (float)Math.Sqrt((double)(num463 * num463 + num464 * num464));
float num463 = Main.rand.Next(-10, 11);
float num464 = Main.rand.Next(-10, 11);
float num465 = Main.rand.Next(3, 9);
float num466 = (float)Math.Sqrt(num463 * num463 + num464 * num464);
num466 = num465 / num466;
num463 *= num466;
num464 *= num466;
@@ -75,9 +76,9 @@ namespace CalamityMod.Projectiles.Boss
Main.dust[num467].position.X = projectile.Center.X;
Main.dust[num467].position.Y = projectile.Center.Y;
Dust expr_149DF_cp_0 = Main.dust[num467];
expr_149DF_cp_0.position.X += (float)Main.rand.Next(-10, 11);
expr_149DF_cp_0.position.X += Main.rand.Next(-10, 11);
Dust expr_14A09_cp_0 = Main.dust[num467];
expr_14A09_cp_0.position.Y += (float)Main.rand.Next(-10, 11);
expr_14A09_cp_0.position.Y += Main.rand.Next(-10, 11);
Main.dust[num467].velocity.X = num463;
Main.dust[num467].velocity.Y = num464;
num462++;
+8 -7
View File
@@ -17,7 +17,8 @@ namespace CalamityMod.Projectiles.Boss
{
projectile.width = 10;
projectile.height = 10;
projectile.hostile = true;
projectile.scale = 1.5f;
projectile.hostile = true;
projectile.penetrate = -1;
projectile.tileCollide = false;
projectile.timeLeft = 300;
@@ -28,9 +29,9 @@ namespace CalamityMod.Projectiles.Boss
if (projectile.position.Y > projectile.ai[1])
projectile.tileCollide = true;
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver2;
int num123 = (int)Player.FindClosest(projectile.Center, 1, 1);
int num123 = Player.FindClosest(projectile.Center, 1, 1);
projectile.ai[0] += 1f;
if (projectile.ai[0] < 110f && projectile.ai[0] > 30f)
{
@@ -61,13 +62,13 @@ namespace CalamityMod.Projectiles.Boss
spriteEffects = SpriteEffects.FlipHorizontally;
}
Vector2 center = new Vector2(projectile.Center.X, projectile.Center.Y);
Vector2 vector11 = new Vector2((float)(Main.projectileTexture[projectile.type].Width / 2), (float)(Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type] / 2));
Vector2 vector11 = new Vector2(Main.projectileTexture[projectile.type].Width / 2, Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type] / 2);
Vector2 vector = center - Main.screenPosition;
vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Width, (float)(ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Height / Main.projFrames[projectile.type])) * 1f / 2f;
vector -= new Vector2(ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Width, ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Height / Main.projFrames[projectile.type]) * 1f / 2f;
vector += vector11 * 1f + new Vector2(0f, 0f + 4f + projectile.gfxOffY);
Color color = new Color(127 - projectile.alpha, 127 - projectile.alpha, 127 - projectile.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Red);
Color color = new Color(127 - projectile.alpha, 127 - projectile.alpha, 127 - projectile.alpha, 0).MultiplyRGBA(Color.Red);
Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow"), vector,
null, color, projectile.rotation, vector11, 1f, spriteEffects, 0f);
null, color, projectile.rotation, vector11, projectile.scale, spriteEffects, 0f);
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 B

After

Width:  |  Height:  |  Size: 282 B

+6 -5
View File
@@ -18,6 +18,7 @@ namespace CalamityMod.Projectiles.Boss
{
projectile.width = 10;
projectile.height = 10;
projectile.scale = 1.5f;
projectile.hostile = true;
projectile.penetrate = -1;
projectile.extraUpdates = 2;
@@ -30,7 +31,7 @@ namespace CalamityMod.Projectiles.Boss
if (projectile.position.Y > projectile.ai[1])
projectile.tileCollide = true;
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver2;
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
@@ -46,13 +47,13 @@ namespace CalamityMod.Projectiles.Boss
spriteEffects = SpriteEffects.FlipHorizontally;
}
Vector2 center = new Vector2(projectile.Center.X, projectile.Center.Y);
Vector2 vector11 = new Vector2((float)(Main.projectileTexture[projectile.type].Width / 2), (float)(Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type] / 2));
Vector2 vector11 = new Vector2(Main.projectileTexture[projectile.type].Width / 2, Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type] / 2);
Vector2 vector = center - Main.screenPosition;
vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathV2Glow").Width, (float)(ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathV2Glow").Height / Main.projFrames[projectile.type])) * 1f / 2f;
vector -= new Vector2(ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathV2Glow").Width, ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathV2Glow").Height / Main.projFrames[projectile.type]) * 1f / 2f;
vector += vector11 * 1f + new Vector2(0f, 0f + 4f + projectile.gfxOffY);
Color color = new Color(127 - projectile.alpha, 127 - projectile.alpha, 127 - projectile.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Red);
Color color = new Color(127 - projectile.alpha, 127 - projectile.alpha, 127 - projectile.alpha, 0).MultiplyRGBA(Color.Red);
Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathV2Glow"), vector,
null, color, projectile.rotation, vector11, 1f, spriteEffects, 0f);
null, color, projectile.rotation, vector11, projectile.scale, spriteEffects, 0f);
}
public override void Kill(int timeLeft)
-3
View File
@@ -48,9 +48,6 @@ namespace CalamityMod.Projectiles.Boss
return;
}
if (!Main.dayTime)
projectile.timeLeft -= CalamityWorld.death ? 9 : 16;
projectile.position.X = Main.player[projectile.owner].Center.X - (projectile.width / 2);
projectile.position.Y = Main.player[projectile.owner].Center.Y - (projectile.height / 2) + Main.player[projectile.owner].gfxOffY - 360f;
if (Main.player[projectile.owner].gravDir == -1f)
+1 -1
View File
@@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Boss
projectile.frame = 0;
}
projectile.velocity *= 0.99f;
projectile.velocity *= 0.995f;
if (projectile.timeLeft < 180)
{
+1 -1
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Boss
public override void SetDefaults()
{
projectile.width = 26;
projectile.width = 24;
projectile.height = 58;
projectile.hostile = true;
projectile.penetrate = -1;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 591 B

+94 -33
View File
@@ -52,9 +52,10 @@ namespace CalamityMod.Projectiles
public float spawnedPlayerMinionDamageValue = 1f;
public int spawnedPlayerMinionProjectileDamageValue = 0;
public int defDamage = 0;
public int defCrit = 0;
// Rogue Stuff
public bool stealthStrike = false; //Update all existing rogue weapons with this
// Rogue Stuff
public bool stealthStrike = false; //Update all existing rogue weapons with this
public bool momentumCapacitatorBoost = false; //Constant acceleration
// Iron Heart
@@ -84,6 +85,18 @@ namespace CalamityMod.Projectiles
switch (projectile.type)
{
case ProjectileID.ShadowBeamHostile:
projectile.timeLeft = 60;
break;
case ProjectileID.LostSoulHostile:
projectile.tileCollide = true;
break;
case ProjectileID.NebulaLaser:
projectile.extraUpdates = 1;
break;
case ProjectileID.StarWrath:
projectile.penetrate = projectile.maxPenetrate = 1;
break;
@@ -996,7 +1009,25 @@ namespace CalamityMod.Projectiles
#region PostAI
public override void PostAI(Projectile projectile)
{
int x = (int)(projectile.Center.X / 16f);
Player player = Main.player[projectile.owner];
CalamityPlayer modPlayer = player.Calamity();
// Set crit here to avoid issues with projectiles that change class types in PreAI and AI
if (defCrit == 0 && !projectile.npcProj && !projectile.trap)
{
if (projectile.melee)
defCrit = modPlayer.critStats[0];
else if (projectile.ranged)
defCrit = modPlayer.critStats[1];
else if (projectile.magic)
defCrit = modPlayer.critStats[2];
else if (rogue)
defCrit = modPlayer.critStats[3];
else if (projectile.minion || projectile.sentry || CalamityMod.projectileMinionList.Contains(projectile.type) || ProjectileID.Sets.MinionShot[projectile.type] || ProjectileID.Sets.SentryShot[projectile.type])
defCrit = 4;
}
int x = (int)(projectile.Center.X / 16f);
int y = (int)(projectile.Center.Y / 16f);
for (int i = x - 1; i <= x + 1; i++)
{
@@ -1030,41 +1061,40 @@ namespace CalamityMod.Projectiles
Player player = Main.player[projectile.owner];
CalamityPlayer modPlayer = player.Calamity();
if (projectile.owner == Main.myPlayer && !projectile.npcProj && !projectile.trap && rogue && stealthStrike && modPlayer.stealthStrikeAlwaysCrits)
crit = true;
// Super dummies have nearly 10 million max HP (which is used in damage calculations).
// This can very easily cause damage numbers that are unrealistic for the weapon.
// As a result, they are omitted in this code.
if (!target.boss && target.type != NPCType<SuperDummyNPC>())
{
if (target.HitSound != SoundID.NPCHit1 && target.HitSound != SoundID.NPCHit6 && target.HitSound != SoundID.NPCHit7 &&
target.HitSound != SoundID.NPCHit8 && target.HitSound != SoundID.NPCHit9 && target.HitSound != SoundID.NPCHit12 &&
target.HitSound != SoundID.NPCHit13 && target.HitSound != SoundID.NPCHit14 && target.HitSound != SoundID.NPCHit18 &&
target.HitSound != SoundID.NPCHit19 && target.HitSound != SoundID.NPCHit20 && target.HitSound != SoundID.NPCHit21 &&
target.HitSound != SoundID.NPCHit22 && target.HitSound != SoundID.NPCHit23 && target.HitSound != SoundID.NPCHit24 &&
target.HitSound != SoundID.NPCHit25 && target.HitSound != SoundID.NPCHit26 && target.HitSound != SoundID.NPCHit27 &&
target.HitSound != SoundID.NPCHit28 && target.HitSound != SoundID.NPCHit29 && target.HitSound != SoundID.NPCHit31 &&
target.HitSound != SoundID.NPCHit32 && target.HitSound != SoundID.NPCHit33 && target.HitSound != SoundID.NPCHit35 &&
target.HitSound != SoundID.NPCHit37 && target.HitSound != SoundID.NPCHit38 && target.HitSound != SoundID.NPCHit40 &&
target.HitSound != SoundID.NPCHit43 && target.HitSound != SoundID.NPCHit44 && target.HitSound != SoundID.NPCHit45 &&
target.HitSound != SoundID.NPCHit46 && target.HitSound != SoundID.NPCHit47 && target.HitSound != SoundID.NPCHit48 &&
target.HitSound != SoundID.NPCHit50 && target.HitSound != SoundID.NPCHit51 && target.HitSound != SoundID.NPCHit55 &&
target.HitSound != SoundID.NPCHit56 && target.HitSound != SoundID.NPCHit57 && hasInorganicEnemyHitBoost)
if (target.Inorganic() && hasInorganicEnemyHitBoost)
{
damage += (int)(target.lifeMax * inorganicEnemyHitBoost);
inorganicEnemyHitEffect?.Invoke(target);
}
if (target.HitSound != SoundID.NPCHit4 && target.HitSound != SoundID.NPCHit41 && target.HitSound != SoundID.NPCHit2 &&
target.HitSound != SoundID.NPCHit5 && target.HitSound != SoundID.NPCHit11 && target.HitSound != SoundID.NPCHit30 &&
target.HitSound != SoundID.NPCHit34 && target.HitSound != SoundID.NPCHit36 && target.HitSound != SoundID.NPCHit42 &&
target.HitSound != SoundID.NPCHit49 && target.HitSound != SoundID.NPCHit52 && target.HitSound != SoundID.NPCHit53 &&
target.HitSound != SoundID.NPCHit54 && target.HitSound != null && hasOrganicEnemyHitBoost)
if (target.Organic() && hasOrganicEnemyHitBoost)
{
damage += (int)(target.lifeMax * organicEnemyHitBoost);
organicEnemyHitEffect?.Invoke(target);
}
}
if (projectile.owner == Main.myPlayer && !projectile.npcProj && !projectile.trap)
{
int critMax = 100;
int critChance = (int)MathHelper.Clamp(defCrit, 1, critMax);
crit = Main.rand.Next(1, critMax + 1) <= critChance;
if ((uint)(projectile.type - ProjectileID.DD2LightningAuraT1) <= 2u)
{
if (player.setMonkT3)
crit = Main.rand.NextBool(4);
else if (player.setMonkT2)
crit = Main.rand.NextBool(6);
}
if (rogue && stealthStrike && modPlayer.stealthStrikeAlwaysCrits)
crit = true;
}
}
#endregion
@@ -1150,8 +1180,6 @@ namespace CalamityMod.Projectiles
if (Main.player[Main.myPlayer].lifeSteal > 0f && target.canGhostHeal && target.type != NPCID.TargetDummy && target.type != NPCType<SuperDummyNPC>() && !player.moonLeech)
{
// Commented out for now to test the global life steal nerf
/*
// Increases the degree to which Spectre Healing set contributes to the lifesteal cap
if (player.ghostHeal)
{
@@ -1167,13 +1195,12 @@ namespace CalamityMod.Projectiles
// Increases the degree to which Vampire Knives contribute to the lifesteal cap
if (projectile.type == ProjectileID.VampireKnife)
{
float num = damage * 0.0375f;
float num = damage * 0.075f;
if (num < 0f)
num = 0f;
Main.player[Main.myPlayer].lifeSteal -= num;
}
*/
if (modPlayer.vampiricTalisman && rogue && crit)
{
@@ -1194,10 +1221,13 @@ namespace CalamityMod.Projectiles
healMult -= projectile.numHits * 0.025f;
float heal = projectile.damage * healMult;
if (heal > 50)
heal = 50;
if (!CanSpawnLifeStealProjectile(projectile, healMult, heal))
goto OTHEREFFECTS;
SpawnLifeStealProjectile(projectile, player, heal, ProjectileType<AuricOrb>(), 1200f, 1.5f);
SpawnLifeStealProjectile(projectile, player, heal, ProjectileType<AuricOrb>(), 1200f, 3f);
}
else if (modPlayer.silvaSet)
{
@@ -1205,10 +1235,13 @@ namespace CalamityMod.Projectiles
healMult -= projectile.numHits * 0.015f;
float heal = projectile.damage * healMult;
if (heal > 50)
heal = 50;
if (!CanSpawnLifeStealProjectile(projectile, healMult, heal))
goto OTHEREFFECTS;
SpawnLifeStealProjectile(projectile, player, heal, ProjectileType<SilvaOrb>(), 1200f, 1.5f);
SpawnLifeStealProjectile(projectile, player, heal, ProjectileType<SilvaOrb>(), 1200f, 3f);
}
else if (projectile.magic)
{
@@ -1218,10 +1251,13 @@ namespace CalamityMod.Projectiles
healMult -= projectile.numHits * 0.015f;
float heal = projectile.damage * healMult;
if (heal > 50)
heal = 50;
if (!CanSpawnLifeStealProjectile(projectile, healMult, heal))
goto OTHEREFFECTS;
SpawnLifeStealProjectile(projectile, player, heal, ProjectileType<GodSlayerHealOrb>(), 1200f, 1.5f);
SpawnLifeStealProjectile(projectile, player, heal, ProjectileType<GodSlayerHealOrb>(), 1200f, 2f);
}
else if (modPlayer.tarraMage)
{
@@ -1233,6 +1269,9 @@ namespace CalamityMod.Projectiles
healMult -= projectile.numHits * 0.05f;
float heal = projectile.damage * healMult;
if (heal > 50)
heal = 50;
if (!CanSpawnLifeStealProjectile(projectile, healMult, heal))
goto OTHEREFFECTS;
@@ -1251,10 +1290,13 @@ namespace CalamityMod.Projectiles
healMult -= projectile.numHits * 0.05f;
float heal = projectile.damage * healMult;
if (heal > 50)
heal = 50;
if (!CanSpawnLifeStealProjectile(projectile, healMult, heal))
goto OTHEREFFECTS;
SpawnLifeStealProjectile(projectile, player, heal, ProjectileType<AtaxiaHealOrb>(), 1200f, 1.5f);
SpawnLifeStealProjectile(projectile, player, heal, ProjectileType<AtaxiaHealOrb>(), 1200f, 2f);
}
else if (modPlayer.manaOverloader)
{
@@ -1262,10 +1304,13 @@ namespace CalamityMod.Projectiles
healMult -= projectile.numHits * 0.05f;
float heal = projectile.damage * healMult * (player.statMana / (float)player.statManaMax2);
if (heal > 50)
heal = 50;
if (!CanSpawnLifeStealProjectile(projectile, healMult, heal))
goto OTHEREFFECTS;
SpawnLifeStealProjectile(projectile, player, heal, ProjectileType<ManaOverloaderHealOrb>(), 1200f, 1.5f);
SpawnLifeStealProjectile(projectile, player, heal, ProjectileType<ManaOverloaderHealOrb>(), 1200f, 2f);
}
}
}
@@ -1466,6 +1511,22 @@ namespace CalamityMod.Projectiles
}
}
if (modPlayer.titanHeartSet && stealthStrike && modPlayer.titanCooldown <= 0)
{
int dmg = (int)(85 + (projectile.damage * 0.05f));
int boom = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ProjectileType<SabatonBoom>(), dmg, projectile.knockBack, projectile.owner, 0f, 0f);
Main.projectile[boom].Calamity().forceRogue = true;
Main.PlaySound(SoundID.Item14, projectile.position);
for (int dustexplode = 0; dustexplode < 360; dustexplode++)
{
Vector2 dustd = new Vector2(17f, 17f).RotatedBy(MathHelper.ToRadians(dustexplode));
int d = Dust.NewDust(projectile.Center, projectile.width, projectile.height, Main.rand.NextBool(2) ? ModContent.DustType<AstralBlue>() : ModContent.DustType<AstralOrange>(), dustd.X, dustd.Y, 100, default, 3f);
Main.dust[d].noGravity = true;
Main.dust[d].position = projectile.Center;
}
modPlayer.titanCooldown = 15;
}
if (modPlayer.corrosiveSpine && projectile.type != ProjectileType<Corrocloud1>() && projectile.type != ProjectileType<Corrocloud2>() && projectile.type != ProjectileType<Corrocloud3>())
{
for (int i = 0; i < 3; i++)
+8 -5
View File
@@ -26,11 +26,14 @@ namespace CalamityMod.Projectiles.Healing
projectile.HealingProjectile((int)projectile.ai[1], (int)projectile.ai[0], 5.5f, 15f);
float num498 = projectile.velocity.X * 0.2f;
float num499 = -(projectile.velocity.Y * 0.2f);
int num500 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 58, 0f, 0f, 100, default, 2f);
Dust dust = Main.dust[num500];
dust.noGravity = true;
dust.position.X -= num498;
dust.position.Y -= num499;
if (projectile.timeLeft % 2 == 0)
{
int num500 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 62, 0f, 0f, 100, default, 2f);
Dust dust = Main.dust[num500];
dust.noGravity = true;
dust.position.X -= num498;
dust.position.Y -= num499;
}
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 919 B

+3 -2
View File
@@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.Magic
public override void AI()
{
projectile.localAI[1]++;
if (projectile.velocity.X != projectile.velocity.X)
{
if (Math.Abs(projectile.velocity.X) < 1f)
@@ -53,7 +54,7 @@ namespace CalamityMod.Projectiles.Magic
projectile.height = projectile.width;
projectile.position.X = center10.X - (float)(projectile.width / 2);
projectile.position.Y = center10.Y - (float)(projectile.height / 2);
if ((double)projectile.localAI[0] < 0.1)
if (projectile.localAI[0] < 0.1f)
{
projectile.localAI[0] += 0.01f;
}
@@ -74,7 +75,7 @@ namespace CalamityMod.Projectiles.Magic
}
projectile.ai[0] *= 1.05f;
projectile.ai[1] *= 1.05f;
if (projectile.scale < 1f)
if (projectile.scale < 1f && projectile.localAI[1] > 5f)
{
int num897 = 0;
while ((float)num897 < projectile.scale * 10f)
+4 -3
View File
@@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.Magic
public override void AI()
{
projectile.localAI[1]++;
if (projectile.velocity.X != projectile.velocity.X)
{
if (Math.Abs(projectile.velocity.X) < 1f)
@@ -53,7 +54,7 @@ namespace CalamityMod.Projectiles.Magic
projectile.height = projectile.width;
projectile.position.X = center10.X - (float)(projectile.width / 2);
projectile.position.Y = center10.Y - (float)(projectile.height / 2);
if ((double)projectile.localAI[0] < 0.1)
if (projectile.localAI[0] < 0.1f)
{
projectile.localAI[0] += 0.01f;
}
@@ -74,12 +75,12 @@ namespace CalamityMod.Projectiles.Magic
}
projectile.ai[0] *= 1.05f;
projectile.ai[1] *= 1.05f;
if (projectile.scale < 1f)
if (projectile.scale < 1f && projectile.localAI[1] > 5f)
{
int num897 = 0;
while ((float)num897 < projectile.scale * 10f)
{
int num898 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 58, projectile.velocity.X, projectile.velocity.Y, 100, default, 1.1f);
int num898 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 62, projectile.velocity.X, projectile.velocity.Y, 100, default, 1.1f);
Main.dust[num898].position = (Main.dust[num898].position + projectile.Center) / 2f;
Main.dust[num898].noGravity = true;
Main.dust[num898].velocity *= 0.1f;
+2 -2
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Magic
projectile.height = 4;
projectile.extraUpdates = 100;
projectile.friendly = true;
projectile.timeLeft = 90;
projectile.timeLeft = 45;
projectile.magic = true;
}
@@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Magic
Main.dust[num448].position = vector33;
Main.dust[num448].noGravity = true;
Main.dust[num448].noLight = true;
Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.013f;
Main.dust[num448].scale = Main.rand.Next(70, 110) * 0.013f;
Main.dust[num448].velocity *= 0.1f;
}
}
+2 -2
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Magic
projectile.friendly = true;
projectile.alpha = 255;
projectile.penetrate = -1;
projectile.timeLeft = 300;
projectile.timeLeft = 30;
projectile.magic = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 10;
@@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Magic
public override void AI()
{
CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 300f, 6f, 24f, 5, ModContent.ProjectileType<FabBolt>());
CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 150f, 6f, 6f, 2, ModContent.ProjectileType<FabBolt>());
}
}
}
+4 -5
View File
@@ -25,9 +25,8 @@ namespace CalamityMod.Projectiles.Magic
public override void AI()
{
Lighting.AddLight(projectile.Center, 0.2f, 0.01f, 0.1f);
projectile.localAI[1] += 1f;
if (projectile.localAI[1] >= 9f && projectile.owner == Main.myPlayer)
if (projectile.localAI[1] >= 6f && projectile.owner == Main.myPlayer)
{
projectile.localAI[1] = 0f;
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<FabOrb>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
@@ -39,12 +38,12 @@ namespace CalamityMod.Projectiles.Magic
for (int num447 = 0; num447 < 2; num447++)
{
Vector2 vector33 = projectile.position;
vector33 -= projectile.velocity * ((float)num447 * 0.25f);
int num448 = Dust.NewDust(vector33, 1, 1, 234, 0f, 0f, 0, default, 1.25f);
vector33 -= projectile.velocity * (num447 * 0.25f);
int num448 = Dust.NewDust(vector33, 1, 1, 234, 0f, 0f, 0, default, 1f);
Main.dust[num448].noGravity = true;
Main.dust[num448].noLight = true;
Main.dust[num448].position = vector33;
Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.013f;
Main.dust[num448].scale = Main.rand.Next(70, 110) * 0.013f;
Main.dust[num448].velocity *= 0.1f;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

+1 -1
View File
@@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Melee
{
projectile.frame = 0;
}
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X);
projectile.rotation = projectile.velocity.ToRotation();
Lighting.AddLight(projectile.Center, 0.4f, 0f, 0f);
if (Main.rand.NextBool(4))
{
@@ -0,0 +1,64 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class MeldGreatswordBigProjectile : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Bolt");
ProjectileID.Sets.TrailCacheLength[projectile.type] = 10;
ProjectileID.Sets.TrailingMode[projectile.type] = 1;
}
public override void SetDefaults()
{
projectile.width = 18;
projectile.height = 18;
projectile.friendly = true;
projectile.penetrate = 1;
projectile.melee = true;
projectile.timeLeft = 600;
}
public override void AI()
{
projectile.rotation = projectile.velocity.ToRotation();
Vector2 value7 = new Vector2(6f, 12f);
projectile.localAI[0] += 1f;
if (projectile.localAI[0] == 48f)
{
projectile.localAI[0] = 0f;
}
else
{
for (int num41 = 0; num41 < 2; num41++)
{
Vector2 value8 = Vector2.UnitX * -15f;
value8 = -Vector2.UnitY.RotatedBy((double)(projectile.localAI[0] * 0.1308997f + (float)num41 * 3.14159274f), default) * value7;
int num42 = Dust.NewDust(projectile.Center, 0, 0, 27, 0f, 0f, 160, default, 1f);
Main.dust[num42].scale = 1f;
Main.dust[num42].noGravity = true;
Main.dust[num42].position = projectile.Center + value8;
Main.dust[num42].velocity = projectile.velocity;
}
}
int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 27, 0f, 0f, 100, default, 0.8f);
Main.dust[num458].noGravity = true;
Main.dust[num458].velocity *= 0f;
CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 400f, 12f, 20f);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2);
return false;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

@@ -1,15 +1,18 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class PlasmaBall : ModProjectile
public class MeldGreatswordMediumProjectile : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ball");
DisplayName.SetDefault("Bolt");
ProjectileID.Sets.TrailCacheLength[projectile.type] = 10;
ProjectileID.Sets.TrailingMode[projectile.type] = 1;
}
public override void SetDefaults()
@@ -24,6 +27,7 @@ namespace CalamityMod.Projectiles.Melee
public override void AI()
{
projectile.rotation = projectile.velocity.ToRotation();
Vector2 value7 = new Vector2(6f, 12f);
projectile.localAI[0] += 1f;
if (projectile.localAI[0] == 48f)
@@ -50,5 +54,11 @@ namespace CalamityMod.Projectiles.Melee
CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 400f, 12f, 20f);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2);
return false;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

@@ -0,0 +1,64 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class MeldGreatswordSmallProjectile : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Bolt");
ProjectileID.Sets.TrailCacheLength[projectile.type] = 10;
ProjectileID.Sets.TrailingMode[projectile.type] = 1;
}
public override void SetDefaults()
{
projectile.width = 8;
projectile.height = 8;
projectile.friendly = true;
projectile.penetrate = 1;
projectile.melee = true;
projectile.timeLeft = 600;
}
public override void AI()
{
projectile.rotation = projectile.velocity.ToRotation();
Vector2 value7 = new Vector2(6f, 12f);
projectile.localAI[0] += 1f;
if (projectile.localAI[0] == 48f)
{
projectile.localAI[0] = 0f;
}
else
{
for (int num41 = 0; num41 < 2; num41++)
{
Vector2 value8 = Vector2.UnitX * -15f;
value8 = -Vector2.UnitY.RotatedBy((double)(projectile.localAI[0] * 0.1308997f + (float)num41 * 3.14159274f), default) * value7;
int num42 = Dust.NewDust(projectile.Center, 0, 0, 27, 0f, 0f, 160, default, 1f);
Main.dust[num42].scale = 1f;
Main.dust[num42].noGravity = true;
Main.dust[num42].position = projectile.Center + value8;
Main.dust[num42].velocity = projectile.velocity;
}
}
int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 27, 0f, 0f, 100, default, 0.8f);
Main.dust[num458].noGravity = true;
Main.dust[num458].velocity *= 0f;
CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 400f, 12f, 20f);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2);
return false;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 B

+2 -2
View File
@@ -30,14 +30,14 @@ namespace CalamityMod.Projectiles.Melee
public override void AI()
{
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 2.355f;
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + MathHelper.ToRadians(45f);
if (Main.rand.NextBool(4))
{
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, (int)CalamityDusts.Brimstone, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
}
if (projectile.spriteDirection == -1)
{
projectile.rotation -= 1.57f;
projectile.rotation -= MathHelper.ToRadians(90f);
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 B

After

Width:  |  Height:  |  Size: 991 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

+81 -321
View File
@@ -11,11 +11,13 @@ namespace CalamityMod.Projectiles.Pets
public class SirenYoung : ModProjectile
{
private bool underwater = false;
private int sleepyTimer = 0;
private int lightLevel = 0;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Siren");
Main.projFrames[projectile.type] = 4;
Main.projFrames[projectile.type] = 17;
Main.projPet[projectile.type] = true;
ProjectileID.Sets.LightPet[projectile.type] = true;
}
@@ -23,12 +25,13 @@ namespace CalamityMod.Projectiles.Pets
public override void SetDefaults()
{
projectile.netImportant = true;
projectile.width = 30;
projectile.height = 30;
projectile.width = 38;
projectile.height = 58;
projectile.friendly = true;
projectile.penetrate = -1;
projectile.timeLeft *= 5;
projectile.ignoreWater = true;
projectile.tileCollide = false;
}
public override void AI()
@@ -48,325 +51,91 @@ namespace CalamityMod.Projectiles.Pets
{
projectile.timeLeft = 2;
}
projectile.frameCounter++;
if (projectile.frameCounter > 6)
{
projectile.frame++;
projectile.frameCounter = 0;
}
if (projectile.frame > 3)
{
projectile.frame = 0;
}
underwater = Collision.DrownCollision(player.position, player.width, player.height, player.gravDir) || modPlayer.leviathanAndSirenLore;
if (sleepyTimer < 180)
{
projectile.frameCounter++;
if (projectile.frameCounter > 6)
{
projectile.frame++;
projectile.frameCounter = 0;
}
}
if (underwater)
{
if (projectile.frame >= 8)
{
projectile.frame = 0;
}
}
else
{
if (projectile.frame >= 16)
{
projectile.frame = sleepyTimer >= 180 ? 16 : 8;
}
}
underwater = player.IsUnderwater() || modPlayer.leviathanAndSirenLore;
if (underwater)
{
projectile.width = 30;
projectile.height = 30;
if (projectile.frame == 16)
projectile.frame = 0;
if (sleepyTimer > 0)
sleepyTimer--;
if (projectile.localAI[0] == 0f)
{
Lighting.AddLight(projectile.Center, 2.5f, 2f, 0f); //4.5
lightLevel = 0;
}
else
{
Lighting.AddLight(projectile.Center, 1.65f, 1.32f, 0f); //3
lightLevel = 1;
}
}
else
{
projectile.width = 54;
projectile.height = 54;
Lighting.AddLight(projectile.Center, 0.825f, 0.66f, 0f); //1.5
Vector2 vector54 = player.Center;
vector54.X -= (float)((15 + player.width / 2) * player.direction);
vector54.X -= (float)(40 * player.direction);
if (projectile.ai[0] == 1f)
{
projectile.tileCollide = false;
float num663 = 0.2f;
float num664 = 10f;
int num665 = 200;
if (num664 < Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y))
{
num664 = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y);
}
Vector2 vector58 = vector54 - projectile.Center;
float num666 = vector58.Length();
if (num666 > 2000f)
{
projectile.position = player.Center - new Vector2((float)projectile.width, (float)projectile.height) / 2f;
}
if (num666 < (float)num665 && player.velocity.Y == 0f && projectile.position.Y + (float)projectile.height <= player.position.Y + (float)player.height && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height))
{
projectile.ai[0] = 0f;
projectile.netUpdate = true;
if (projectile.velocity.Y < -6f)
{
projectile.velocity.Y = -6f;
}
}
if (num666 >= 60f)
{
vector58.Normalize();
vector58 *= num664;
if (projectile.velocity.X < vector58.X)
{
projectile.velocity.X = projectile.velocity.X + num663;
if (projectile.velocity.X < 0f)
{
projectile.velocity.X = projectile.velocity.X + num663 * 1.5f;
}
}
if (projectile.velocity.X > vector58.X)
{
projectile.velocity.X = projectile.velocity.X - num663;
if (projectile.velocity.X > 0f)
{
projectile.velocity.X = projectile.velocity.X - num663 * 1.5f;
}
}
if (projectile.velocity.Y < vector58.Y)
{
projectile.velocity.Y = projectile.velocity.Y + num663;
if (projectile.velocity.Y < 0f)
{
projectile.velocity.Y = projectile.velocity.Y + num663 * 1.5f;
}
}
if (projectile.velocity.Y > vector58.Y)
{
projectile.velocity.Y = projectile.velocity.Y - num663;
if (projectile.velocity.Y > 0f)
{
projectile.velocity.Y = projectile.velocity.Y - num663 * 1.5f;
}
}
}
if (projectile.velocity.X != 0f)
{
projectile.spriteDirection = Math.Sign(projectile.velocity.X);
}
}
if (projectile.ai[0] == 2f)
{
projectile.friendly = true;
projectile.spriteDirection = projectile.direction;
projectile.velocity.Y = projectile.velocity.Y + 0.4f;
if (projectile.velocity.Y > 10f)
{
projectile.velocity.Y = 10f;
}
projectile.ai[1] -= 1f;
if (projectile.ai[1] <= 0f)
{
projectile.ai[1] = 0f;
projectile.ai[0] = 0f;
projectile.friendly = false;
projectile.netUpdate = true;
return;
}
}
if (projectile.ai[0] == 0f)
{
float num671 = 200f;
if (player.rocketDelay2 > 0)
{
projectile.ai[0] = 1f;
projectile.netUpdate = true;
}
Vector2 vector59 = vector54 - projectile.Center;
if (vector59.Length() > 2000f)
{
projectile.position = vector54 - new Vector2((float)projectile.width, (float)projectile.height) / 2f;
}
else if (vector59.Length() > num671 || Math.Abs(vector59.Y) > 300f)
{
projectile.ai[0] = 1f;
projectile.netUpdate = true;
if (projectile.velocity.Y > 0f && vector59.Y < 0f)
{
projectile.velocity.Y = 0f;
}
if (projectile.velocity.Y < 0f && vector59.Y > 0f)
{
projectile.velocity.Y = 0f;
}
}
projectile.tileCollide = true;
float num672 = 0.5f;
float num673 = 4f;
float num674 = 4f;
float num675 = 0.1f;
if (num674 < Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y))
{
num674 = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y);
num672 = 0.7f;
}
int num676 = 0;
bool flag29 = false;
float num677 = vector54.X - projectile.Center.X;
if (Math.Abs(num677) > 5f)
{
if (num677 < 0f)
{
num676 = -1;
if (projectile.velocity.X > -num673)
{
projectile.velocity.X = projectile.velocity.X - num672;
}
else
{
projectile.velocity.X = projectile.velocity.X - num675;
}
}
else
{
num676 = 1;
if (projectile.velocity.X < num673)
{
projectile.velocity.X = projectile.velocity.X + num672;
}
else
{
projectile.velocity.X = projectile.velocity.X + num675;
}
}
flag29 = true;
}
else
{
projectile.velocity.X = projectile.velocity.X * 0.9f;
if (Math.Abs(projectile.velocity.X) < num672 * 2f)
{
projectile.velocity.X = 0f;
}
}
if (num676 != 0)
{
int num678 = (int)(projectile.position.X + (float)(projectile.width / 2)) / 16;
int num679 = (int)projectile.position.Y / 16;
num678 += num676;
num678 += (int)projectile.velocity.X;
int num3;
for (int num680 = num679; num680 < num679 + projectile.height / 16 + 1; num680 = num3 + 1)
{
if (WorldGen.SolidTile(num678, num680))
{
flag29 = true;
}
num3 = num680;
}
}
if (projectile.velocity.X != 0f)
{
flag29 = true;
}
Collision.StepUp(ref projectile.position, ref projectile.velocity, projectile.width, projectile.height, ref projectile.stepSpeed, ref projectile.gfxOffY, 1, false, 0);
if (projectile.velocity.Y == 0f && flag29)
{
int num3;
for (int num681 = 0; num681 < 3; num681 = num3 + 1)
{
int num682 = (int)(projectile.position.X + (float)(projectile.width / 2)) / 16;
if (num681 == 0)
{
num682 = (int)projectile.position.X / 16;
}
if (num681 == 2)
{
num682 = (int)(projectile.position.X + (float)projectile.width) / 16;
}
int num683 = (int)(projectile.position.Y + (float)projectile.height) / 16;
if (WorldGen.SolidTile(num682, num683) || Main.tile[num682, num683].halfBrick() || Main.tile[num682, num683].slope() > 0 || (TileID.Sets.Platforms[(int)Main.tile[num682, num683].type] && Main.tile[num682, num683].active() && !Main.tile[num682, num683].inActive()))
{
try
{
num682 = (int)(projectile.position.X + (float)(projectile.width / 2)) / 16;
num683 = (int)(projectile.position.Y + (float)(projectile.height / 2)) / 16;
num682 += num676;
num682 += (int)projectile.velocity.X;
if (!WorldGen.SolidTile(num682, num683 - 1) && !WorldGen.SolidTile(num682, num683 - 2))
{
projectile.velocity.Y = -5.1f;
}
else if (!WorldGen.SolidTile(num682, num683 - 2))
{
projectile.velocity.Y = -7.1f;
}
else if (WorldGen.SolidTile(num682, num683 - 5))
{
projectile.velocity.Y = -11.1f;
}
else if (WorldGen.SolidTile(num682, num683 - 4))
{
projectile.velocity.Y = -10.1f;
}
else
{
projectile.velocity.Y = -9.1f;
}
} catch
{
projectile.velocity.Y = -9.1f;
}
}
num3 = num681;
}
}
if (projectile.velocity.X > num674)
{
projectile.velocity.X = num674;
}
if (projectile.velocity.X < -num674)
{
projectile.velocity.X = -num674;
}
if (projectile.velocity.X < 0f)
{
projectile.direction = -1;
}
if (projectile.velocity.X > 0f)
{
projectile.direction = 1;
}
if (projectile.velocity.X > num672 && num676 == 1)
{
projectile.direction = 1;
}
if (projectile.velocity.X < -num672 && num676 == -1)
{
projectile.direction = -1;
}
projectile.spriteDirection = projectile.direction;
projectile.velocity.Y = projectile.velocity.Y + 0.4f;
if (projectile.velocity.Y > 10f)
{
projectile.velocity.Y = 10f;
}
}
return;
}
else
{
if (sleepyTimer < 180)
{
sleepyTimer++;
lightLevel = 1;
}
else
{
lightLevel = 2;
projectile.frame = 16;
}
}
switch (lightLevel)
{
case 0:
Lighting.AddLight(projectile.Center, 0f, 2f, 2.5f); //4.5
break;
case 1:
Lighting.AddLight(projectile.Center, 0f, 1.32f, 1.65f); //3
break;
case 2:
Lighting.AddLight(projectile.Center, 0f, 0.5f, 0.7f);
break;
}
float num23 = 0.2f;
float num24 = 5f;
projectile.tileCollide = false;
Vector2 vector4 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f);
float num25 = Main.player[projectile.owner].position.X + (float)(Main.player[projectile.owner].width / 2) - vector4.X;
float num26 = Main.player[projectile.owner].position.Y + Main.player[projectile.owner].gfxOffY + (float)(Main.player[projectile.owner].height / 2) - vector4.Y;
if (Main.player[projectile.owner].controlLeft)
float num25 = player.position.X + (float)(player.width / 2) - vector4.X;
float num26 = player.position.Y + player.gfxOffY + (float)(player.height / 2) - vector4.Y;
if (player.controlLeft && sleepyTimer < 180)
{
num25 -= 120f;
}
else if (Main.player[projectile.owner].controlRight)
else if (player.controlRight && sleepyTimer < 180)
{
num25 += 120f;
}
if (Main.player[projectile.owner].controlDown)
if (player.controlDown && sleepyTimer < 180)
{
num26 += 120f;
}
else
{
if (Main.player[projectile.owner].controlUp)
if (player.controlUp && sleepyTimer < 180)
{
num26 -= 120f;
}
@@ -375,12 +144,12 @@ namespace CalamityMod.Projectiles.Pets
float num27 = (float)Math.Sqrt((double)(num25 * num25 + num26 * num26));
if (num27 > 1000f)
{
projectile.position.X = projectile.position.X + num25;
projectile.position.Y = projectile.position.Y + num26;
projectile.position.X += num25;
projectile.position.Y += num26;
}
if (projectile.localAI[0] == 1f)
{
if (num27 < 10f && Math.Abs(Main.player[projectile.owner].velocity.X) + Math.Abs(Main.player[projectile.owner].velocity.Y) < num24 && Main.player[projectile.owner].velocity.Y == 0f)
if (num27 < 10f && Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y) < num24 && player.velocity.Y == 0f)
{
projectile.localAI[0] = 0f;
}
@@ -396,11 +165,11 @@ namespace CalamityMod.Projectiles.Pets
projectile.velocity.X = num25 * num27;
projectile.velocity.Y = num26 * num27;
}
if ((double)projectile.velocity.X > 0.5)
if (projectile.velocity.X > 0.5f)
{
projectile.direction = -1;
}
else if ((double)projectile.velocity.X < -0.5)
else if (projectile.velocity.X < -0.5f)
{
projectile.direction = 1;
}
@@ -412,11 +181,11 @@ namespace CalamityMod.Projectiles.Pets
{
projectile.localAI[0] = 1f;
}
if ((double)projectile.velocity.X > 0.5)
if (projectile.velocity.X > 0.5f)
{
projectile.direction = -1;
}
else if ((double)projectile.velocity.X < -0.5)
else if (projectile.velocity.X < -0.5f)
{
projectile.direction = 1;
}
@@ -432,14 +201,14 @@ namespace CalamityMod.Projectiles.Pets
projectile.velocity *= 0f;
num23 = 0f;
}
projectile.direction = -Main.player[projectile.owner].direction;
projectile.direction = -player.direction;
}
num27 = num24 / num27;
num25 *= num27;
num26 *= num27;
if (projectile.velocity.X < num25)
{
projectile.velocity.X = projectile.velocity.X + num23;
projectile.velocity.X += num23;
if (projectile.velocity.X < 0f)
{
projectile.velocity.X = projectile.velocity.X * 0.99f;
@@ -447,7 +216,7 @@ namespace CalamityMod.Projectiles.Pets
}
if (projectile.velocity.X > num25)
{
projectile.velocity.X = projectile.velocity.X - num23;
projectile.velocity.X -= num23;
if (projectile.velocity.X > 0f)
{
projectile.velocity.X = projectile.velocity.X * 0.99f;
@@ -455,7 +224,7 @@ namespace CalamityMod.Projectiles.Pets
}
if (projectile.velocity.Y < num26)
{
projectile.velocity.Y = projectile.velocity.Y + num23;
projectile.velocity.Y += num23;
if (projectile.velocity.Y < 0f)
{
projectile.velocity.Y = projectile.velocity.Y * 0.99f;
@@ -463,7 +232,7 @@ namespace CalamityMod.Projectiles.Pets
}
if (projectile.velocity.Y > num26)
{
projectile.velocity.Y = projectile.velocity.Y - num23;
projectile.velocity.Y -= num23;
if (projectile.velocity.Y > 0f)
{
projectile.velocity.Y = projectile.velocity.Y * 0.99f;
@@ -473,15 +242,6 @@ namespace CalamityMod.Projectiles.Pets
{
projectile.rotation = projectile.velocity.X * 0.05f;
}
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
Texture2D texture = underwater ? Main.projectileTexture[projectile.type] : ModContent.GetTexture("CalamityMod/Projectiles/Pets/SirenFlopping");
int height = (underwater ? Main.projectileTexture[projectile.type].Height : 256) / Main.projFrames[projectile.type];
int frameHeight = height * projectile.frame;
Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), projectile.scale, SpriteEffects.None, 0f);
return false;
}
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

+2 -2
View File
@@ -2,8 +2,8 @@ using CalamityMod.Buffs.StatDebuffs;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Ranged
{
@@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Ranged
public override void AI()
{
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
projectile.rotation = projectile.velocity.ToRotation() - MathHelper.PiOver2;
if (Main.rand.NextBool(5))
{
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 67, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 507 B

After

Width:  |  Height:  |  Size: 492 B

+2 -2
View File
@@ -51,12 +51,12 @@ namespace CalamityMod.Projectiles.Ranged
num296 = 0.75f;
}
projectile.ai[0] += 1f;
int num297 = 58;
int dustType = 62;
if (Main.rand.NextBool(2))
{
for (int num298 = 0; num298 < 1; num298++)
{
int num299 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, num297, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 100, default, 1f);
int num299 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 100, default, 1f);
Dust dust = Main.dust[num299];
if (Main.rand.NextBool(3))
{
+1 -1
View File
@@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Ranged
public override void AI()
{
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
projectile.rotation = projectile.velocity.ToRotation() - MathHelper.PiOver2;
}
public override bool OnTileCollide(Vector2 oldVelocity)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 595 B

+3 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
@@ -50,12 +51,12 @@ namespace CalamityMod.Projectiles.Ranged
num296 = 0.75f;
}
projectile.ai[0] += 1f;
int num297 = 173;
int dustType = (int)CalamityDusts.PurpleCosmolite;
if (Main.rand.NextBool(2))
{
for (int num298 = 0; num298 < 1; num298++)
{
int num299 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, num297, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 100, default, 1f);
int num299 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 100, default, 1f);
Dust dust = Main.dust[num299];
if (Main.rand.NextBool(3))
{
+1 -1
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Ranged
public override void AI()
{
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
projectile.rotation = projectile.velocity.ToRotation() - MathHelper.PiOver2;
if (Main.rand.NextBool(5))
{
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 6, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 470 B

After

Width:  |  Height:  |  Size: 450 B

+112
View File
@@ -0,0 +1,112 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Ranged
{
public class UltimaBolt : ModProjectile
{
public float Bounces
{
get => projectile.ai[0];
set => projectile.ai[0] = value;
}
public float DefaultHue => ((float)Math.Sin(Main.GlobalTime * 2.5f) + 1) * 0.5f;
public const int MaxBounces = 1;
public override void SetStaticDefaults()
{
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
ProjectileID.Sets.TrailCacheLength[projectile.type] = 3;
DisplayName.SetDefault("Ultima Bolt");
}
public override void SetDefaults()
{
projectile.width = 18;
projectile.height = 42;
projectile.friendly = true;
projectile.ranged = true;
projectile.arrow = true;
projectile.penetrate = 1;
projectile.timeLeft = 300;
}
public override void AI()
{
projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2;
}
public Color GetColorFromHue(float hue) => Main.hslToRgb(hue, 1f, 0.725f) * projectile.Opacity;
public override Color? GetAlpha(Color lightColor) => GetColorFromHue(DefaultHue);
public void ProduceExplosionDust(int dustCount)
{
if (!Main.dedServ)
{
for (int i = 0; i < dustCount; i++)
{
Dust dust = Dust.NewDustPerfect(projectile.Center, 267);
dust.color = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.8f);
dust.scale = Main.rand.NextFloat(1f, 1.25f);
dust.velocity = Main.rand.NextVector2Circular(7f, 7f);
dust.noGravity = true;
}
}
}
public override bool OnTileCollide(Vector2 oldVelocity)
{
if (Bounces >= MaxBounces)
{
projectile.Kill();
return false;
}
if (projectile.velocity.X != oldVelocity.X)
{
projectile.velocity.X = -oldVelocity.X;
}
if (projectile.velocity.Y != oldVelocity.Y)
{
projectile.velocity.Y = -oldVelocity.Y;
}
Bounces++;
ProduceExplosionDust(24);
return false;
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
Texture2D texture = ModContent.GetTexture(Texture);
for (int i = 0; i < projectile.oldPos.Length; i++)
{
if (i > 0)
{
CalamityUtils.DistanceClamp(ref projectile.oldPos[i], ref projectile.oldPos[i - 1], 8f); // Ensure the max distance between the old positions isn't too great. It looks weird if it is.
}
float completionRatio = i / (float)projectile.oldPos.Length;
Color color = GetColorFromHue((DefaultHue + completionRatio * 0.5f) % 1f) * (float)Math.Pow(1f - completionRatio, 2);
spriteBatch.Draw(texture,
projectile.oldPos[i] + texture.Size() * 0.5f - Main.screenPosition,
null,
color,
projectile.rotation,
texture.Size() * 0.5f,
projectile.scale,
SpriteEffects.None,
0f);
}
return false;
}
public override void Kill(int timeLeft)
{
CalamityGlobalProjectile.ExpandHitboxBy(projectile, 90, 90);
projectile.Damage();
ProduceExplosionDust(32);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

+108
View File
@@ -0,0 +1,108 @@
using CalamityMod.Items.Weapons.Ranged;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Ranged
{
public class UltimaBowProjectile : ModProjectile
{
public float Time
{
get => projectile.ai[0];
set => projectile.ai[0] = value;
}
public const float PositioningOffset = 35f;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ultima");
}
public override void SetDefaults()
{
projectile.width = 82;
projectile.height = 144;
projectile.friendly = true;
projectile.penetrate = -1;
projectile.tileCollide = false;
projectile.ranged = true;
projectile.ignoreWater = true;
}
public override void AI()
{
Player player = Main.player[projectile.owner];
projectile.direction = (Math.Cos(projectile.velocity.ToRotation()) > 0).ToDirectionInt();
AttemptToFireProjectiles(player);
AttachToPlayer(player);
projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == -1).ToInt() * MathHelper.Pi;
Time++;
}
public void AttemptToFireProjectiles(Player player)
{
bool canFire = player.channel && player.HasAmmo(player.ActiveItem(), true) && !player.noItems && !player.CCed;
if (!canFire)
{
projectile.Kill();
return;
}
if (Main.netMode != NetmodeID.MultiplayerClient && Time % player.ActiveItem().useTime == 0)
{
int type = ProjectileID.WoodenArrowFriendly; // This doesn't really matter. It's overwritten anyway. But it is passed into the PickAmmo method.
float shotSpeed = player.ActiveItem().shootSpeed;
int damage = player.GetWeaponDamage(player.ActiveItem());
float knockBack = player.ActiveItem().knockBack;
player.PickAmmo(player.ActiveItem(), ref type, ref shotSpeed, ref canFire, ref damage, ref knockBack); // Pick ammo and consume it (this incorporates the bow's chance to not consume ammo).
Main.PlaySound(player.ActiveItem().UseSound, projectile.Center);
type = ModContent.ProjectileType<UltimaBolt>();
float shootLaserChance = Utils.InverseLerp(Ultima.FullChargeTime * 0.35f, Ultima.FullChargeTime, Time, true);
Vector2 shotPosition = player.RotatedRelativePoint(player.MountedCenter, true);
shotPosition += projectile.velocity.ToRotation().ToRotationVector2().RotatedByRandom(MathHelper.ToRadians(40f)).RotatedBy(-0.25f * projectile.spriteDirection) * 42f;
projectile.velocity = projectile.DirectionTo(Main.MouseWorld);
Vector2 shotVelocity = projectile.velocity * shotSpeed; // The velocity should always be a unit vector.
// Fire a laser.
if (Main.rand.NextFloat() <= shootLaserChance)
{
type = ModContent.ProjectileType<UltimaRay>();
shotVelocity = shotVelocity.RotatedByRandom(0.03f);
damage *= 2;
}
// Sometimes fire little sparks if the bow is fully charged.
if (Time >= Ultima.FullChargeTime * 0.7f && Main.rand.NextBool(6))
{
// To ensure that the sparks don't spawn on top of the laser itself.
float offsetAngle = Main.rand.NextFloat(0.2f, 0.5f) * Main.rand.NextBool(2).ToDirectionInt();
Vector2 sparkVelocity = projectile.DirectionTo(Main.MouseWorld).RotatedByRandom(0.5f) * 13f;
sparkVelocity = sparkVelocity.RotatedBy(offsetAngle);
Projectile.NewProjectile(shotPosition, sparkVelocity, ModContent.ProjectileType<UltimaSpark>(), damage / 3, knockBack, projectile.owner);
}
knockBack = player.GetWeaponKnockback(player.ActiveItem(), knockBack);
Projectile.NewProjectile(shotPosition, shotVelocity, type, damage, knockBack, projectile.owner);
projectile.netUpdate = true;
}
}
public void AttachToPlayer(Player player)
{
projectile.Center = player.RotatedRelativePoint(player.MountedCenter, true) + projectile.velocity.ToRotation().ToRotationVector2() * PositioningOffset;
projectile.spriteDirection = projectile.direction;
projectile.timeLeft = 2;
player.ChangeDir(projectile.direction);
player.heldProj = projectile.whoAmI;
player.itemTime = player.itemAnimation = 2;
player.itemRotation = (projectile.velocity * projectile.direction).ToRotation();
}
public override bool CanDamage() => false;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

+51
View File
@@ -0,0 +1,51 @@
using CalamityMod.Projectiles.BaseProjectiles;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Ranged
{
public class UltimaRay : BaseLaserbeamProjectile
{
public float HueOffset
{
get => projectile.ai[1];
set => projectile.ai[1] = value;
}
public override float MaxScale => 0.7f;
public override float MaxLaserLength => 1599.999999f;
public override float Lifetime => 50f;
public override Color LaserOverlayColor => Main.hslToRgb((float)Math.Sin(Main.GlobalTime * 2.3f + HueOffset) * 0.5f + 0.5f, 1f, 0.775f) * Utils.InverseLerp(Lifetime, 0f, Time, true);
public override Color LightCastColor => LaserOverlayColor;
public override Texture2D LaserBeginTexture => ModContent.GetTexture("CalamityMod/ExtraTextures/Lasers/UltimaRayStart");
public override Texture2D LaserMiddleTexture => ModContent.GetTexture("CalamityMod/ExtraTextures/Lasers/UltimaRayMid");
public override Texture2D LaserEndTexture => ModContent.GetTexture("CalamityMod/ExtraTextures/Lasers/UltimaRayEnd");
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ultima Ray");
}
public override void SetDefaults()
{
projectile.width = projectile.height = 22;
projectile.friendly = true;
projectile.ranged = true;
projectile.arrow = true;
projectile.penetrate = -1;
projectile.alpha = 255;
projectile.localNPCHitCooldown = 8;
projectile.usesLocalNPCImmunity = true;
}
public override bool PreAI()
{
// Initialization. Using the AI hook would override the base laser's code, and we don't want that.
if (projectile.localAI[0] == 0f)
{
HueOffset = Main.rand.NextFloat(MathHelper.Pi / 5f);
projectile.localAI[0] = 1f;
}
return true;
}
public override bool ShouldUpdatePosition() => false;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

+91
View File
@@ -0,0 +1,91 @@
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Ranged
{
public class UltimaSpark : ModProjectile
{
public float Time
{
get => projectile.ai[0];
set => projectile.ai[0] = value;
}
public const int DustType = 261;
public const float MaxHomingDistance = 1200f;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ultima Spark");
}
public override void SetDefaults()
{
projectile.width = projectile.height = 8;
projectile.friendly = true;
projectile.ranged = true;
projectile.arrow = true;
projectile.penetrate = 1;
projectile.timeLeft = 240;
projectile.extraUpdates = 1;
}
public override void AI()
{
if (!Main.dedServ && Time > 5f)
{
for (int i = 0; i < 3; i++)
{
Vector2 spawnPosition = Vector2.Lerp(projectile.oldPosition, projectile.position, i / 3f);
Dust dust = Dust.NewDustPerfect(spawnPosition, DustType);
dust.color = Main.hslToRgb((Main.rand.NextFloat(-0.04f, 0.04f) + Time / 80f) % 1f, 0.8f, 0.6f);
dust.scale = 2.3f;
dust.fadeIn = 1f;
dust.rotation = Main.rand.NextFloat(MathHelper.TwoPi);
dust.velocity = Vector2.Zero;
dust.noGravity = true;
}
}
NPC potentialTarget = projectile.Center.ClosestNPCAt(MaxHomingDistance);
if (potentialTarget != null)
{
projectile.velocity = (projectile.velocity * 8f + projectile.DirectionTo(potentialTarget.Center) * 18f) / 9f;
return;
}
if (Time > 30f)
{
float updatedTime = Time - 30f;
// Make a complete 90 degree turn in 30 frames.
if (updatedTime % 120f > 90f)
{
projectile.velocity = projectile.velocity.RotatedBy(MathHelper.PiOver2 / 20f);
}
// Arc around quickly for 60 frames.
else if (updatedTime % 120f > 30f)
{
projectile.velocity = projectile.velocity.RotatedBy((float)Math.Sin((updatedTime - 30f) % 60f / 60f * MathHelper.TwoPi) * MathHelper.ToRadians(15f));
}
}
Time++;
}
public override void Kill(int timeLeft)
{
CalamityGlobalProjectile.ExpandHitboxBy(projectile, 60, 60);
projectile.Damage();
if (!Main.dedServ)
{
for (int i = 0; i < 20; i++)
{
Dust dust = Dust.NewDustPerfect(projectile.Center, DustType);
dust.color = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.7f);
dust.scale = Main.rand.NextFloat(0.9f, 1.25f);
dust.velocity = Main.rand.NextVector2Circular(6f, 6f);
dust.noGravity = true;
}
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 131 B

+2 -3
View File
@@ -41,7 +41,6 @@ namespace CalamityMod.Projectiles.Rogue
double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2;
double deltaAngle = spread / 8f;
double offsetAngle;
int i;
if (projectile.owner == Main.myPlayer)
{
if (projectile.Calamity().stealthStrike)
@@ -51,11 +50,11 @@ namespace CalamityMod.Projectiles.Rogue
Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType<BrackishWaterBlast>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
for (i = 0; i < 4; i++)
for (int i = 0; i < 4; i++)
{
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<BrackishWater>(), projectile.damage / 2, projectile.knockBack * 0.5f, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<BrackishWater>(), projectile.damage / 2, projectile.knockBack * 0.5f, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<BrackishWater>(), projectile.damage / 2, projectile.knockBack * 0.5f, projectile.owner, 1f, 0f);
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 664 B

+12 -12
View File
@@ -26,23 +26,23 @@ namespace CalamityMod.Projectiles.Rogue
public override void AI()
{
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.25f / 255f, (255 - projectile.alpha) * 0.5f / 255f);
if (projectile.localAI[0] == 0f)
if (projectile.localAI[0] == 0f && projectile.ai[0] == 1f)
{
Main.PlaySound(SoundID.Item, (int)projectile.position.X, (int)projectile.position.Y, 21);
projectile.localAI[0] += 1f;
}
int randomDust = Utils.SelectRandom(Main.rand, new int[]
if (projectile.timeLeft % 2 == 0)
{
33,
89
});
for (int num457 = 0; num457 < 3; num457++)
{
int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, randomDust, 0f, 0f, 100, default, 1.2f);
Main.dust[num458].noGravity = true;
Main.dust[num458].velocity *= 0.5f;
Main.dust[num458].velocity += projectile.velocity * 0.1f;
}
int randomDust = Utils.SelectRandom(Main.rand, new int[]
{
33,
89
});
int water = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, randomDust, 0f, 0f, 100, default, 1.2f);
Main.dust[water].noGravity = true;
Main.dust[water].velocity *= 0.5f;
Main.dust[water].velocity += projectile.velocity * 0.1f;
}
}
public override void Kill(int timeLeft)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 B

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 B

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 B

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

+5 -6
View File
@@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Rogue
public class DestructionStar : ModProjectile
{
public int hitCount = 0;
private static float Radius = 43f;
private static float Radius = 47f;
public override void SetStaticDefaults()
{
@@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Rogue
public override void SetDefaults()
{
projectile.width = 86;
projectile.height = 86;
projectile.width = 94;
projectile.height = 94;
projectile.friendly = true;
projectile.penetrate = 16;
projectile.usesLocalNPCImmunity = true;
@@ -89,8 +89,7 @@ namespace CalamityMod.Projectiles.Rogue
}
if (projectile.owner == Main.myPlayer)
{
int i;
for (i = 0; i < hitCount; i++)
for (int i = 0; i < hitCount; i++)
{
Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
while (value15.X == 0f && value15.Y == 0f)
@@ -99,7 +98,7 @@ namespace CalamityMod.Projectiles.Rogue
}
value15.Normalize();
value15 *= (float)Main.rand.Next(70, 101) * 0.1f;
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ModContent.ProjectileType<DestructionBolt>(), (int)((double)projectile.damage * 0.5), 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ModContent.ProjectileType<DestructionBolt>(), (int)(projectile.damage * 0.5), 0f, Main.myPlayer, 0f, 0f);
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1001 B

After

Width:  |  Height:  |  Size: 882 B

+23 -26
View File
@@ -1,7 +1,8 @@
using CalamityMod.Buffs.DamageOverTime;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Buffs.DamageOverTime;
namespace CalamityMod.Projectiles.Rogue
{
@@ -10,7 +11,7 @@ namespace CalamityMod.Projectiles.Rogue
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Venom Cloud");
Main.projFrames[projectile.type] = 4;
Main.projFrames[projectile.type] = 10;
}
public override void SetDefaults()
@@ -30,41 +31,37 @@ namespace CalamityMod.Projectiles.Rogue
public override void AI()
{
projectile.ai[0] += 1f;
projectile.frameCounter++;
if (projectile.frameCounter > 9)
if (projectile.frameCounter > 6)
{
projectile.frame++;
projectile.frameCounter = 0;
}
if (projectile.frame > 3)
{
projectile.frame = 0;
}
if (projectile.ai[0] < 219f) //255 - frameCounter tick * number of disippation frames
{
if (projectile.frame >= 4)
{
projectile.frame = 0;
}
}
else if (projectile.owner == Main.myPlayer && projectile.frame >= Main.projFrames[projectile.type])
{
projectile.Kill();
}
projectile.velocity *= 0.98f;
projectile.ai[0] += 1f;
if (projectile.ai[0] >= 120f)
{
if (projectile.alpha < 255)
{
projectile.alpha += 5;
if (projectile.alpha > 255)
{
projectile.alpha = 255;
}
}
else if (projectile.owner == Main.myPlayer)
{
projectile.Kill();
}
}
else if (projectile.alpha > 80)
if (projectile.alpha > 110)
{
projectile.alpha -= 30;
if (projectile.alpha < 80)
if (projectile.alpha < 110)
{
projectile.alpha = 80;
projectile.alpha = 110;
}
}
if (Math.Abs(projectile.velocity.X) > 0.1f)
{
projectile.spriteDirection = -projectile.direction;
}
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 574 B

@@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Rogue
public override void SetDefaults()
{
projectile.width = 12;
projectile.height = 12;
projectile.width = 20;
projectile.height = 20;
projectile.friendly = true;
projectile.penetrate = -1;
projectile.extraUpdates = 1;
@@ -32,10 +32,10 @@ namespace CalamityMod.Projectiles.Rogue
public override void AI()
{
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 2.355f;
projectile.rotation = projectile.velocity.ToRotation() + MathHelper.ToRadians(135f);
if (Main.rand.NextBool(3))
{
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 58, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 62, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
}
if (projectile.spriteDirection == -1)
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

+2 -2
View File
@@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Mist");
Main.projFrames[projectile.type] = 6;
Main.projFrames[projectile.type] = 8;
ProjectileID.Sets.MinionShot[projectile.type] = true;
}
@@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Summon
projectile.frame++;
projectile.frameCounter = 0;
}
if (projectile.frame > 3)
if (projectile.frame >= Main.projFrames[projectile.type])
{
projectile.frame = 0;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

+2 -2
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Herring");
Main.projFrames[projectile.type] = 4;
Main.projFrames[projectile.type] = 8;
ProjectileID.Sets.MinionSacrificable[projectile.type] = true;
ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true;
}
@@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Summon
projectile.frame++;
projectile.frameCounter = 0;
}
if (projectile.frame > 3)
if (projectile.frame >= Main.projFrames[projectile.type])
{
projectile.frame = 0;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

+3
View File
@@ -1,5 +1,6 @@
using CalamityMod.Buffs.StatDebuffs;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -60,5 +61,7 @@ namespace CalamityMod.Projectiles.Summon
{
return new Color(189, 51, 164, projectile.alpha);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) => projectile.timeLeft < 600;
}
}
+1 -1
View File
@@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Summon
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.immune[projectile.owner] = 6;
target.immune[projectile.owner] = 8;
}
}
}
+4 -4
View File
@@ -75,12 +75,12 @@ namespace CalamityMod.Projectiles.Summon
projectile.damage = damage2;
}
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 1f / 255f, (255 - projectile.alpha) * 0f / 255f);
projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2);
projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2) + Main.player[projectile.owner].gfxOffY - 60f;
if (Main.player[projectile.owner].gravDir == -1f)
projectile.position.X = player.Center.X - (float)(projectile.width / 2);
projectile.position.Y = player.Center.Y - (float)(projectile.height / 2) + player.gfxOffY - 60f;
if (player.gravDir == -1f)
{
projectile.position.Y = projectile.position.Y + 120f;
projectile.rotation = 3.14f;
projectile.rotation = MathHelper.Pi;
}
else
{
+1 -1
View File
@@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Summon
for (int i = 0; i < Main.maxNPCs; i++)
{
NPC npc = Main.npc[i];
if ((npc.CanBeChasedBy(projectile, false) || npc.type == NPCID.DukeFishron) && npc.active)
if ((npc.CanBeChasedBy(projectile, false) || (npc.type == NPCID.DukeFishron && (!npc.dontTakeDamage || npc.ai[0] > 9f))) && npc.active)
{
float extraDistance = (npc.width / 2) + (npc.height / 2);
+1 -1
View File
@@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Summon
{
projectile.frame = 0;
}
if ((double)Math.Abs(projectile.velocity.X) > 0.2)
if (Math.Abs(projectile.velocity.X) > 0.2f)
{
projectile.spriteDirection = -projectile.direction;
}
+1 -1
View File
@@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Summon
player.MinionDamage());
projectile.damage = damage2;
}
if ((double)Math.Abs(projectile.velocity.X) > 0.2)
if (Math.Abs(projectile.velocity.X) > 0.2f)
{
projectile.spriteDirection = -projectile.direction;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 711 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 591 B

+77 -82
View File
@@ -15,19 +15,18 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Wulfrum Droid");
Main.projFrames[projectile.type] = 3;
Main.projFrames[projectile.type] = 12;
ProjectileID.Sets.MinionSacrificable[projectile.type] = true;
ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true;
}
public override void SetDefaults()
{
projectile.width = 30;
projectile.height = 30;
projectile.width = 26;
projectile.height = 32;
projectile.netImportant = true;
projectile.friendly = true;
projectile.ignoreWater = true;
//projectile.aiStyle = 62;
projectile.minionSlots = 1f;
projectile.timeLeft = 18000;
projectile.penetrate = -1;
@@ -44,24 +43,23 @@ namespace CalamityMod.Projectiles.Summon
{
projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage();
projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage;
int num226 = 36;
for (int num227 = 0; num227 < num226; num227++)
int dustAmt = 36;
for (int dustIndex = 0; dustIndex < dustAmt; dustIndex++)
{
Vector2 vector6 = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * 0.75f;
vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + projectile.Center;
Vector2 vector7 = vector6 - projectile.Center;
int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 61, vector7.X * 1.1f, vector7.Y * 1.1f, 100, default, 1.4f);
Main.dust[num228].noGravity = true;
Main.dust[num228].noLight = true;
Main.dust[num228].velocity = vector7;
Vector2 source = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * 0.75f;
source = source.RotatedBy((double)((float)(dustIndex - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + projectile.Center;
Vector2 dustVel = source - projectile.Center;
int green = Dust.NewDust(source + dustVel, 0, 0, 61, dustVel.X * 1.1f, dustVel.Y * 1.1f, 100, default, 1.4f);
Main.dust[green].noGravity = true;
Main.dust[green].noLight = true;
Main.dust[green].velocity = dustVel;
}
dust += 1f;
}
if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue)
{
int damage2 = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue /
projectile.Calamity().spawnedPlayerMinionDamageValue *
player.MinionDamage());
projectile.Calamity().spawnedPlayerMinionDamageValue * player.MinionDamage());
projectile.damage = damage2;
}
projectile.frameCounter++;
@@ -70,13 +68,13 @@ namespace CalamityMod.Projectiles.Summon
projectile.frame++;
projectile.frameCounter = 0;
}
if (projectile.frame >= 3)
if (projectile.frame >= Main.projFrames[projectile.type])
{
projectile.frame = 0;
}
bool flag64 = projectile.type == ModContent.ProjectileType<WulfrumDroid>();
bool correctMinion = projectile.type == ModContent.ProjectileType<WulfrumDroid>();
player.AddBuff(ModContent.BuffType<WulfrumDroidBuff>(), 3600);
if (flag64)
if (correctMinion)
{
if (player.dead)
{
@@ -88,135 +86,132 @@ namespace CalamityMod.Projectiles.Summon
}
}
projectile.MinionAntiClump();
Vector2 vector2_3 = projectile.position;
float num7 = 450f;
bool flag = false;
int num8 = -1;
Vector2 targetVector = projectile.position;
float range = 450f;
bool foundTarget = false;
int targetIndex = -1;
if (player.HasMinionAttackTargetNPC)
{
NPC npc = Main.npc[player.MinionAttackTargetNPC];
if (npc.CanBeChasedBy((object) this, false))
{
float num1 = Vector2.Distance(npc.Center, projectile.Center);
if ((!flag && num1 < num7) && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height))
float targetDist = Vector2.Distance(npc.Center, projectile.Center);
if ((!foundTarget && targetDist < range) && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height))
{
num7 = num1;
vector2_3 = npc.Center;
flag = true;
num8 = npc.whoAmI;
range = targetDist;
targetVector = npc.Center;
foundTarget = true;
targetIndex = npc.whoAmI;
}
}
}
if (!flag)
if (!foundTarget)
{
for (int index2 = 0; index2 < Main.npc.Length; ++index2)
for (int npcIndex = 0; npcIndex < Main.npc.Length; ++npcIndex)
{
NPC npc = Main.npc[index2];
NPC npc = Main.npc[npcIndex];
if (npc.CanBeChasedBy((object) this, false))
{
float num1 = Vector2.Distance(npc.Center, projectile.Center);
if ((!flag && num1 < num7) && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height))
float targetDist = Vector2.Distance(npc.Center, projectile.Center);
if ((!foundTarget && targetDist < range) && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height))
{
num7 = num1;
vector2_3 = npc.Center;
flag = true;
num8 = index2;
range = targetDist;
targetVector = npc.Center;
foundTarget = true;
targetIndex = npcIndex;
}
}
}
}
int num9 = 500;
if (flag)
num9 = 1000;
if ((double) Vector2.Distance(player.Center, projectile.Center) > (double) num9)
float separationAnxietyDist = 500f;
if (foundTarget)
separationAnxietyDist = 1000f;
if (Vector2.Distance(player.Center, projectile.Center) > separationAnxietyDist)
{
projectile.ai[0] = 1f;
projectile.netUpdate = true;
}
if ((double) projectile.ai[0] == 1.0)
if (projectile.ai[0] == 1f)
projectile.tileCollide = false;
if (flag && (double) projectile.ai[0] == 0.0)
if (foundTarget && projectile.ai[0] == 0f)
{
Vector2 vector2_1 = vector2_3 - projectile.Center;
float num1 = vector2_1.Length();
vector2_1.Normalize();
if ((double) num1 > 200.0)
Vector2 targetPos = targetVector - projectile.Center;
float targetDist = targetPos.Length();
targetPos.Normalize();
if (targetDist > 200f)
{
float num2 = 6f;
Vector2 vector2_2 = vector2_1 * num2;
projectile.velocity.X = (float) (((double) projectile.velocity.X * 40.0 + (double) vector2_2.X) / 41.0);
projectile.velocity.Y = (float) (((double) projectile.velocity.Y * 40.0 + (double) vector2_2.Y) / 41.0);
float speed = 6f;
Vector2 goToTarget = targetPos * speed;
projectile.velocity.X = (projectile.velocity.X * 40f + goToTarget.X) / 41f;
projectile.velocity.Y = (projectile.velocity.Y * 40f + goToTarget.Y) / 41f;
}
else if ((double) projectile.velocity.Y > -1.0)
else if (projectile.velocity.Y > -1f)
projectile.velocity.Y -= 0.1f;
}
else
{
if (!Collision.CanHitLine(projectile.Center, 1, 1, player.Center, 1, 1))
projectile.ai[0] = 1f;
float num1 = 6f;
if ((double) projectile.ai[0] == 1.0)
num1 = 15f;
Vector2 center = projectile.Center;
Vector2 vector2_1 = player.Center - center + new Vector2(0.0f, -60f);
float num3 = vector2_1.Length();
if ((double) num3 > 200.0 && (double) num1 < 9.0)
num1 = 9f;
if ((double) num3 < 100.0 && (double) projectile.ai[0] == 1.0 && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height))
float returnSpeed = 6f;
if (projectile.ai[0] == 1f)
returnSpeed = 15f;
Vector2 playerVec = player.Center - projectile.Center + new Vector2(0f, -60f);
float playerDist = playerVec.Length();
if (playerDist > 200f && returnSpeed < 9f)
returnSpeed = 9f;
if (playerDist < 100f && projectile.ai[0] == 1f && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height))
{
projectile.ai[0] = 0.0f;
projectile.ai[0] = 0f;
projectile.netUpdate = true;
}
if ((double) num3 > 2000.0)
if (playerDist > 2000f)
{
projectile.position.X = player.Center.X - (float) (projectile.width / 2);
projectile.position.Y = player.Center.Y - (float) (projectile.width / 2);
projectile.netUpdate = true;
}
else if ((double) num3 > 70.0)
else if (playerDist > 70f)
{
vector2_1.Normalize();
projectile.velocity = (projectile.velocity * 20f + vector2_1 * num1) / 21f;
playerVec.Normalize();
projectile.velocity = (projectile.velocity * 20f + playerVec * returnSpeed) / 21f;
}
else
{
if ((double) projectile.velocity.X == 0.0 && (double) projectile.velocity.Y == 0.0)
if (projectile.velocity.X == 0f && projectile.velocity.Y == 0f)
{
projectile.velocity.X = -0.15f;
projectile.velocity.Y = -0.05f;
}
projectile.velocity = projectile.velocity * 1.01f;
projectile.velocity *= 1.01f;
}
}
projectile.rotation = projectile.velocity.X * 0.05f;
if ((double) projectile.velocity.X > 0.0)
if (projectile.velocity.X > 0f)
projectile.spriteDirection = projectile.direction = 1;
else if ((double) projectile.velocity.X < 0.0)
else if (projectile.velocity.X < 0f)
projectile.spriteDirection = projectile.direction = -1;
if ((double) projectile.ai[1] > 0.0)
if (projectile.ai[1] > 0f)
projectile.ai[1] += (float) Main.rand.Next(1, 4);
if ((double) projectile.ai[1] > 90.0)
if (projectile.ai[1] > 90f)
{
projectile.ai[1] = 0.0f;
projectile.netUpdate = true;
}
if ((double) projectile.ai[1] != 0.0)
if (projectile.ai[1] != 0f)
return;
++projectile.ai[1];
if (Main.myPlayer != projectile.owner)
return;
if (!flag)
if (!foundTarget)
return;
Vector2 vec = vector2_3 - projectile.Center;
vec.Normalize();
Vector2 vec2 = vec * 10f;
int bolt = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vec2.X, vec2.Y, ModContent.ProjectileType<WulfrumBoltMinion>(), projectile.damage, 0.0f, Main.myPlayer, 0.0f, 0.0f);
Vector2 velocity = targetVector - projectile.Center;
velocity.Normalize();
velocity *= 10f;
int bolt = Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType<WulfrumBoltMinion>(), projectile.damage, projectile.knockBack, projectile.owner);
Main.projectile[bolt].netUpdate = true;
projectile.netUpdate = true;
}
public override bool CanDamage()
{
return false;
}
public override bool CanDamage() => false;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 876 B

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 299 B

After

Width:  |  Height:  |  Size: 367 B

+1 -2
View File
@@ -24,8 +24,7 @@ namespace CalamityMod.Projectiles.Typeless
public override bool PreDrawExtras(SpriteBatch spriteBatch)
{
Player player = Main.player[projectile.owner];
CalamityUtils.DrawFishingLine(projectile, ModContent.ItemType<WulfrumRod>(), new Color(200, 200, 200, 100));
CalamityUtils.DrawFishingLine(projectile, ModContent.ItemType<WulfrumRod>(), new Color(200, 200, 200, 100), 38, 28f);
return false;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 399 B

+1 -1
View File
@@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Typeless
num466 = num465 / num466;
num463 *= num466;
num464 *= num466;
int num467 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 58, 0f, 0f, 100, default, 1f);
int num467 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 62, 0f, 0f, 100, default, 1f);
Dust dust = Main.dust[num467];
dust.noGravity = true;
dust.position.X = projectile.Center.X;
+1 -1
View File
@@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Typeless
{
for (int num468 = 0; num468 < 1; num468++)
{
int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 58, 0f, 0f, 100, default, 1f);
int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 62, 0f, 0f, 100, default, 1f);
Main.dust[num469].noGravity = true;
Main.dust[num469].velocity *= 0f;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 B

After

Width:  |  Height:  |  Size: 462 B

+16 -13
View File
@@ -41,8 +41,8 @@ namespace CalamityMod.Projectiles.Typeless
projectile.ai[0] = 5f;
if (projectile.velocity.Y == 0f && projectile.velocity.X != 0f)
{
projectile.velocity.X = projectile.velocity.X * 0.97f;
if ((double)projectile.velocity.X > -0.01 && (double)projectile.velocity.X < 0.01)
projectile.velocity.X *= 0.97f;
if (projectile.velocity.X > -0.01f && projectile.velocity.X < 0.01f)
{
projectile.velocity.X = 0f;
projectile.netUpdate = true;
@@ -51,16 +51,9 @@ namespace CalamityMod.Projectiles.Typeless
projectile.velocity.Y = projectile.velocity.Y + 0.2f;
}
projectile.rotation += projectile.velocity.X * 0.1f;
int num199 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 58, 0f, 0f, 100, default, 0.75f);
Dust dust = Main.dust[num199];
dust.position.X -= 2f;
dust.position.Y += 2f;
dust.scale += (float)Main.rand.Next(50) * 0.01f;
dust.noGravity = true;
dust.velocity.Y -= 2f;
if (Main.rand.NextBool(2))
if (Main.rand.NextBool(3))
{
int num200 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 58, 0f, 0f, 100, default, 0.75f);
int num200 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 62, 0f, 0f, 100, default, 0.75f);
Dust dust2 = Main.dust[num200];
dust2.position.X -= 2f;
dust2.position.Y += 2f;
@@ -68,9 +61,19 @@ namespace CalamityMod.Projectiles.Typeless
dust2.noGravity = true;
dust2.velocity *= 0.1f;
}
if ((double)projectile.velocity.Y < 0.25 && (double)projectile.velocity.Y > 0.15)
else
{
int num199 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 62, 0f, 0f, 100, default, 0.75f);
Dust dust = Main.dust[num199];
dust.position.X -= 2f;
dust.position.Y += 2f;
dust.scale += (float)Main.rand.Next(50) * 0.01f;
dust.noGravity = true;
dust.velocity.Y -= 2f;
}
if (projectile.velocity.Y < 0.25f && projectile.velocity.Y > 0.15f)
{
projectile.velocity.X = projectile.velocity.X * 0.8f;
projectile.velocity.X *= 0.8f;
}
projectile.rotation = -projectile.velocity.X * 0.05f;
if (projectile.velocity.Y > 16f)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 168 B

+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Typeless
public override void AI()
{
int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 58, 0f, 0f, 100, default, 2f);
int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 62, 0f, 0f, 100, default, 2f);
Main.dust[num469].noGravity = true;
Main.dust[num469].velocity *= 0f;
CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 400f, 7f, 20f);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

After

Width:  |  Height:  |  Size: 258 B

+1 -1
View File
@@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Typeless
{
for (int num468 = 0; num468 < 1; num468++)
{
int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 58, 0f, 0f, 100, default, 2f);
int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 62, 0f, 0f, 100, default, 2f);
Main.dust[num469].noGravity = true;
Main.dust[num469].velocity *= 0f;
}
Loaded 100 of 387 files, more files were not shown because too many files have changed in this diff. Show more