added brackish flask projectile sprite

This commit is contained in:
termigator1359 committed 2020-06-26 13:23:36 -04:00
1 parent dfbbecd653
commit fdfeb29209
3 files changed
+14 -15

No files matched your search

+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);
}
}
}
+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