Files
CalamityModPublic/Projectiles/Melee/UltimusCleaverDust.cs
T
mountaindrew10 b2624d86a9 1 - Blazing Star now inflicts Hellfire.
2 - Frostcrush Valari no longer inflicts Frostburn and Crush Depth.
3 - Icebreaker now inflicts Nightwither on stealth strikes for 7 seconds.
4 - Kelvin Catalyst stealth strike now inflicts Glacial State.
5 - Mangrove Chakram now inflicts Acid Venom instead of Cursed Inferno.
6 - Subduction Slicer now inflicts Hellfire instead of On Fire! and the length of the Daybroken debuff on stealth strikes is now 7 seconds.
7 - Elemental Disk no longer inflicts debuffs.
8 - Eradicator now inflicts God Slayer Inferno instead of On Fire! and Frostburn.
9 - Molten Amputator now inflits Holy Flames.
10 - Valediction no longer inflicts Wet.
11 - Gel Darts no longer inflict Slow.
12 - Stormfront Razor now inflicts Electrified.
13 - Cosmic Kunai no longer inflicts God Slayer Inferno.
14 - Jaws of Oblivion no longer inflicts Marked for Death.
15 - Utensil Poker no longer inflicts Bleeding, Burning Blood and Well Fed.
16 - Sludge Splotch now inflicts Slimed instead of Slow.
17 - Web Ball stealth strike Webbed duration increased to 2 seconds.
18 - Tooth Balls now inflict Burning Blood.
19 - Deep Wounder now inflicts Marked for Death on stealth strikes instead of Crush Depth and inflicts Crush Depth with regular hits.
20 - Gacruxian Mollusk sparks now inflict Electrified.
21 - Bloodsoaked Crasher no longer inflicts Brimstone Flames.
22 - Hypothermia stealth strikes now inflict Glacial State.
23 - Seared Pan no longer inflicts Burning Blood and inflicts Daybroken instead of On Fire!
24 - The Reaper now inflicts Irradiated and Sulphuric Poisoning.
2022-12-04 04:45:46 -06:00

113 lines
4.2 KiB
C#

using CalamityMod.Buffs.DamageOverTime;
using Terraria.ID;
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.DamageType = DamageClass.Melee;
}
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;
}
CalamityUtils.HomeInOnNPC(Projectile, true, 150f, 12f, 20f);
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
if (Projectile.DamageType == RogueDamageClass.Instance)
target.AddBuff(BuffID.Electrified, 120);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
if (Projectile.DamageType == RogueDamageClass.Instance)
target.AddBuff(BuffID.Electrified, 120);
}
}
}