Removed nearly all unused textures in the entire mod, especially focusing on projectiles. Apotheosis & the Death Valley Duster weapon line were ignored to prevent merge conflicts.
61 lines
1.5 KiB
C#
61 lines
1.5 KiB
C#
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Projectiles.Rogue
|
|
{
|
|
public class WebBallBol : ModProjectile
|
|
{
|
|
public override string Texture => "CalamityMod/Items/Weapons/Rogue/WebBall";
|
|
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Web Ball");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
projectile.width = 18;
|
|
projectile.height = 18;
|
|
projectile.friendly = true;
|
|
projectile.penetrate = 3;
|
|
projectile.timeLeft = 300;
|
|
projectile.Calamity().rogue = true;
|
|
projectile.aiStyle = 14;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
if (Main.rand.NextBool(12))
|
|
{
|
|
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 30, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
|
|
}
|
|
}
|
|
|
|
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
|
{
|
|
if (projectile.Calamity().stealthStrike == true)
|
|
{
|
|
target.AddBuff(BuffID.Webbed, 180);
|
|
}
|
|
else
|
|
{
|
|
target.AddBuff(BuffID.Webbed, 60);
|
|
}
|
|
}
|
|
|
|
public override void OnHitPvp(Player target, int damage, bool crit)
|
|
{
|
|
if (projectile.Calamity().stealthStrike == true)
|
|
{
|
|
target.AddBuff(BuffID.Webbed, 180);
|
|
}
|
|
else
|
|
{
|
|
target.AddBuff(BuffID.Webbed, 60);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|