2 - Malice Crabulon mushroom walls are longer and more compact. 3 - Malice Desert Scourge and Large Perforator Worm burrow less deep so that they charge sooner. 4 - Malice Eater of Worlds Head has higher DR and defense. 5 - Malice Skeletron Prime moves faster while firing homing rockets. 6 - Reduced the DoT that Crush Depth inflicts to NPCs in hardmode. 7 - Malice Crabulon mushroom walls fall faster. 8 - Gacruxian Mollusk nerf.
99 lines
3.6 KiB
C#
99 lines
3.6 KiB
C#
using Terraria;
|
|
using Terraria.ModLoader;
|
|
namespace CalamityMod.Projectiles.Melee
|
|
{
|
|
public class UltimusCleaverDust : ModProjectile
|
|
{
|
|
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
|
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Ultimus Flame");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
projectile.width = 6;
|
|
projectile.height = 12;
|
|
projectile.friendly = true;
|
|
projectile.ignoreWater = true;
|
|
projectile.penetrate = 2;
|
|
projectile.timeLeft = 90;
|
|
projectile.usesLocalNPCImmunity = true;
|
|
projectile.localNPCHitCooldown = 10;
|
|
projectile.tileCollide = false;
|
|
projectile.melee = true;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
if (projectile.velocity.X != projectile.velocity.X)
|
|
{
|
|
projectile.velocity.X = projectile.velocity.X * -0.1f;
|
|
}
|
|
if (projectile.velocity.X != projectile.velocity.X)
|
|
{
|
|
projectile.velocity.X = projectile.velocity.X * -0.5f;
|
|
}
|
|
if (projectile.velocity.Y != projectile.velocity.Y && projectile.velocity.Y > 1f)
|
|
{
|
|
projectile.velocity.Y = projectile.velocity.Y * -0.5f;
|
|
}
|
|
|
|
projectile.ai[0] += 1f;
|
|
if (projectile.ai[0] > 5f)
|
|
{
|
|
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 = 0f;
|
|
projectile.netUpdate = true;
|
|
}
|
|
}
|
|
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, 135, 0f, 0f, 100, default, 1f);
|
|
Dust expr_8976_cp_0 = Main.dust[num199];
|
|
expr_8976_cp_0.position.X -= 2f;
|
|
Dust expr_8994_cp_0 = Main.dust[num199];
|
|
expr_8994_cp_0.position.Y += 2f;
|
|
Main.dust[num199].scale += (float)Main.rand.Next(50) * 0.01f;
|
|
Main.dust[num199].noGravity = true;
|
|
Dust expr_89E7_cp_0 = Main.dust[num199];
|
|
expr_89E7_cp_0.velocity.Y -= 2f;
|
|
|
|
if (Main.rand.NextBool(2))
|
|
{
|
|
int num200 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 135, 0f, 0f, 100, default, 1f);
|
|
Dust expr_8A4E_cp_0 = Main.dust[num200];
|
|
expr_8A4E_cp_0.position.X -= 2f;
|
|
Dust expr_8A6C_cp_0 = Main.dust[num200];
|
|
expr_8A6C_cp_0.position.Y += 2f;
|
|
Main.dust[num200].scale += 0.3f + (float)Main.rand.Next(50) * 0.01f;
|
|
Main.dust[num200].noGravity = true;
|
|
Main.dust[num200].velocity *= 0.1f;
|
|
}
|
|
|
|
if ((double)projectile.velocity.Y < 0.25 && (double)projectile.velocity.Y > 0.15)
|
|
{
|
|
projectile.velocity.X = projectile.velocity.X * 0.8f;
|
|
}
|
|
|
|
projectile.rotation = -projectile.velocity.X * 0.05f;
|
|
|
|
if (projectile.velocity.Y > 16f)
|
|
{
|
|
projectile.velocity.Y = 16f;
|
|
}
|
|
|
|
CalamityGlobalProjectile.HomeInOnNPC(projectile, true, 150f, 12f, 20f);
|
|
}
|
|
}
|
|
}
|