2 - Fixed Icicle Trident, Icy Bullet and Frostcrush Valari to inflict Frostbite. 3 - Web Ball stealth strikes inflicted Webbed for 1 second instead of 2 seconds.
61 lines
1.7 KiB
C#
61 lines
1.7 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.DamageType = RogueDamageClass.Instance;
|
|
Projectile.aiStyle = ProjAIStyleID.GroundProjectile;
|
|
}
|
|
|
|
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)
|
|
{
|
|
target.AddBuff(BuffID.Webbed, 60);
|
|
}
|
|
else
|
|
{
|
|
target.AddBuff(BuffID.Webbed, 30);
|
|
}
|
|
}
|
|
|
|
public override void OnHitPvp(Player target, int damage, bool crit)
|
|
{
|
|
if (Projectile.Calamity().stealthStrike)
|
|
{
|
|
target.AddBuff(BuffID.Webbed, 60);
|
|
}
|
|
else
|
|
{
|
|
target.AddBuff(BuffID.Webbed, 30);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|