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.
101 lines
3.9 KiB
C#
101 lines
3.9 KiB
C#
using CalamityMod.Buffs.StatDebuffs;
|
|
using CalamityMod.Buffs.DamageOverTime;
|
|
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
using Terraria.ID;
|
|
using Terraria.Audio;
|
|
|
|
namespace CalamityMod.Projectiles.Rogue
|
|
{
|
|
public class DeepWounderProjectile : ModProjectile
|
|
{
|
|
public override string Texture => "CalamityMod/Items/Weapons/Rogue/DeepWounder";
|
|
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Deep Wounder Projectile");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Projectile.width = 20;
|
|
Projectile.height = 20;
|
|
Projectile.friendly = true;
|
|
Projectile.ignoreWater = true;
|
|
Projectile.penetrate = -1;
|
|
Projectile.timeLeft = 600;
|
|
Projectile.DamageType = RogueDamageClass.Instance;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
Projectile.rotation += 0.2f * Projectile.direction;
|
|
|
|
if (Projectile.Calamity().stealthStrike)
|
|
{
|
|
int spriteWidth = 52;
|
|
int spriteHeight = 48;
|
|
Vector2 spriteCenter = Projectile.Center - new Vector2(spriteWidth / 2, spriteHeight / 2);
|
|
|
|
for (int i = 0; i < 30; i++)
|
|
{
|
|
int dust = Dust.NewDust(spriteCenter, spriteWidth, spriteHeight, 33, Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 0, default, 1f);
|
|
Main.dust[dust].noGravity = true;
|
|
}
|
|
|
|
if (Main.rand.NextBool(5))
|
|
{
|
|
Vector2 waterVelocity = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1));
|
|
waterVelocity.Normalize();
|
|
waterVelocity *= 3;
|
|
Projectile.NewProjectile(Projectile.GetSource_FromThis(), spriteCenter, waterVelocity, ModContent.ProjectileType<DeepWounderWater>(), (int)(Projectile.damage * 0.1f), 1, Projectile.owner, 0, 0);
|
|
}
|
|
}
|
|
}
|
|
|
|
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
|
{
|
|
target.AddBuff(ModContent.BuffType<ArmorCrunch>(), 120);
|
|
target.AddBuff(ModContent.BuffType<CrushDepth>(), 120);
|
|
if (Projectile.Calamity().stealthStrike)
|
|
{
|
|
target.AddBuff(ModContent.BuffType<MarkedforDeath>(), 120);
|
|
}
|
|
}
|
|
|
|
public override void OnHitPvp(Player target, int damage, bool crit)
|
|
{
|
|
target.AddBuff(ModContent.BuffType<ArmorCrunch>(), 120);
|
|
target.AddBuff(ModContent.BuffType<CrushDepth>(), 120);
|
|
if (Projectile.Calamity().stealthStrike)
|
|
{
|
|
target.AddBuff(ModContent.BuffType<MarkedforDeath>(), 120);
|
|
}
|
|
}
|
|
|
|
public override bool PreDraw(ref Color lightColor)
|
|
{
|
|
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
|
|
if (Projectile.direction > 0)
|
|
{
|
|
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
|
}
|
|
else
|
|
{
|
|
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.FlipHorizontally, 0);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public override bool OnTileCollide(Vector2 oldVelocity)
|
|
{
|
|
Collision.HitTiles(Projectile.position + Projectile.velocity, Projectile.velocity, Projectile.width, Projectile.height);
|
|
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
|
|
Projectile.Kill();
|
|
return false;
|
|
}
|
|
}
|
|
}
|