Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
This commit is contained in:
commit
a8a49e2f1f
2 files changed
+61
-45
No files matched your search
@@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Shadowflame");
|
||||
DisplayName.SetDefault("Shadowflame Fireball");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -34,8 +34,28 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Main.PlaySound(SoundID.Item20, projectile.position);
|
||||
}
|
||||
|
||||
int dust = Dust.NewDust(new Vector2(projectile.position.X + projectile.velocity.X, projectile.position.Y + projectile.velocity.Y), projectile.width, projectile.height, 27, projectile.velocity.X, projectile.velocity.Y, 100, default, 3f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
// Main chunky dark purple dust at the front of the fireball
|
||||
for(int i = 0; i < 2; ++i)
|
||||
{
|
||||
int dustType = 27;
|
||||
float dustScale = Main.rand.NextFloat(1.4f, 2.4f);
|
||||
int dustID = Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, dustType);
|
||||
Main.dust[dustID].noGravity = true;
|
||||
Main.dust[dustID].velocity = projectile.velocity;
|
||||
Main.dust[dustID].scale = dustScale;
|
||||
}
|
||||
|
||||
// Trailing brighter purple fire trail dust
|
||||
{
|
||||
int dustType = 70;
|
||||
float velMult = Main.rand.NextFloat(0.05f, 0.6f);
|
||||
float dustScale = Main.rand.NextFloat(1.2f, 1.8f);
|
||||
int dustID = Dust.NewDust(projectile.position, projectile.width, projectile.height, dustType);
|
||||
Main.dust[dustID].noGravity = true;
|
||||
Main.dust[dustID].velocity *= 0.1f;
|
||||
Main.dust[dustID].velocity += projectile.velocity * velMult;
|
||||
Main.dust[dustID].scale = dustScale;
|
||||
}
|
||||
|
||||
projectile.rotation += 0.3f * (float)projectile.direction;
|
||||
|
||||
@@ -77,17 +97,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item10, projectile.position);
|
||||
int num3;
|
||||
for (int num584 = 0; num584 < 20; num584 = num3 + 1)
|
||||
int killDust = 20;
|
||||
for (int i = 0; i < killDust; ++i)
|
||||
{
|
||||
int num585 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 27, -projectile.velocity.X * 0.2f, -projectile.velocity.Y * 0.2f, 100, default, 2.5f);
|
||||
Main.dust[num585].noGravity = true;
|
||||
Dust dust = Main.dust[num585];
|
||||
dust.velocity *= 2f;
|
||||
num585 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 27, -projectile.velocity.X * 0.2f, -projectile.velocity.Y * 0.2f, 100, default, 1.2f);
|
||||
dust = Main.dust[num585];
|
||||
dust.velocity *= 2f;
|
||||
num3 = num584;
|
||||
int dustType = Main.rand.NextBool() ? 70 : 27;
|
||||
float dustScale = Main.rand.NextFloat(1f, 1.6f);
|
||||
int dustID = Dust.NewDust(projectile.Center, 1, 1, dustType);
|
||||
Main.dust[dustID].velocity *= 4f;
|
||||
Main.dust[dustID].scale = dustScale;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Shadowflamethrower");
|
||||
DisplayName.SetDefault("Shadowflame Breath");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -27,43 +27,42 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
if (projectile.ai[0] > 7f)
|
||||
{
|
||||
float num302 = 1f;
|
||||
if (projectile.ai[0] == 8f)
|
||||
num302 = 0.25f;
|
||||
else if (projectile.ai[0] == 9f)
|
||||
num302 = 0.5f;
|
||||
else if (projectile.ai[0] == 10f)
|
||||
num302 = 0.75f;
|
||||
|
||||
projectile.ai[0] += 1f;
|
||||
if (Main.rand.NextBool(2))
|
||||
int[] dustTypes = new int[] { 27, 27, 112, 173 };
|
||||
if(true)
|
||||
{
|
||||
int num305 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 27, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 100, default, 1f);
|
||||
Dust dust;
|
||||
|
||||
if (Main.rand.Next(3) != 0 || Main.rand.NextBool(3))
|
||||
int dustType = dustTypes[Main.rand.Next(4)];
|
||||
int dustID;
|
||||
Vector2 corner = projectile.position - new Vector2(6f, 6f);
|
||||
int width = 18;
|
||||
int height = 18;
|
||||
switch (dustType)
|
||||
{
|
||||
Main.dust[num305].noGravity = true;
|
||||
dust = Main.dust[num305];
|
||||
dust.scale *= 3f;
|
||||
dust.velocity.X *= 2f;
|
||||
dust.velocity.Y *= 2f;
|
||||
case 27:
|
||||
dustID = Dust.NewDust(corner, width, height, dustType);
|
||||
Main.dust[dustID].noGravity = false;
|
||||
Main.dust[dustID].scale = Main.rand.NextFloat(1f, 1.2f);
|
||||
Main.dust[dustID].velocity *= 0.9f;
|
||||
Main.dust[dustID].velocity += projectile.velocity * 0.7f;
|
||||
break;
|
||||
case 112:
|
||||
dustID = Dust.NewDust(projectile.position, projectile.width, projectile.height, dustType);
|
||||
Main.dust[dustID].noGravity = true;
|
||||
Main.dust[dustID].scale = Main.rand.NextFloat(1.4f, 2f);
|
||||
Main.dust[dustID].velocity *= 2.2f;
|
||||
Main.dust[dustID].velocity += projectile.velocity * Main.rand.NextFloat(0.15f, 0.4f);
|
||||
break;
|
||||
case 173:
|
||||
dustID = Dust.NewDust(projectile.position, projectile.width, projectile.height, dustType);
|
||||
Main.dust[dustID].noGravity = false;
|
||||
Main.dust[dustID].scale = Main.rand.NextFloat(1.9f, 3f);
|
||||
Main.dust[dustID].velocity *= 1.5f;
|
||||
Main.dust[dustID].velocity += projectile.velocity * Main.rand.NextFloat(0.6f, 1f);
|
||||
break;
|
||||
}
|
||||
|
||||
dust = Main.dust[num305];
|
||||
dust.scale *= 2f;
|
||||
dust.velocity.X *= 1.2f;
|
||||
dust.velocity.Y *= 1.2f;
|
||||
dust.scale *= num302;
|
||||
dust.velocity += projectile.velocity;
|
||||
|
||||
if (!dust.noGravity)
|
||||
dust.velocity *= 0.5f;
|
||||
}
|
||||
}
|
||||
else
|
||||
projectile.ai[0] += 1f;
|
||||
|
||||
projectile.ai[0]++;
|
||||
projectile.rotation += 0.3f * (float)projectile.direction;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user