2 - Deleted alt Siren Heart. 3 - Removed discount effect from Cadance Potion. 4 - Ultra Liquidator now takes 20 cursed flames or ichor instead of the Everglade Spray. 5 - Rev+ DoG now gets faster the further he is away from you. 6 - Aquatic Aberration and Parasea hitbox changes. 7 - Leviathan and Siren AI rework. 8 - Siren renamed to Anahita. 9 - Old Duke Tooth Balls get faster the further they are away from you. 10 - Storm Weaver phase 2 charge gets faster the further you are away from it. 11 - Storm Weaver stops charging once it has passed its target a ways. 12 - Yharon second phase issues fixed. 13 - Dragonfolly charge phase speed reduced. 14 - Dragonfolly final phase auras pushed further apart. 15 - Slime God abyss balls fade away instead of blinking out of existence.
54 lines
1.4 KiB
C#
54 lines
1.4 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Projectiles.Boss
|
|
{
|
|
public class AbyssBallVolley : ModProjectile
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Abyss Ball Volley");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
projectile.width = 26;
|
|
projectile.height = 26;
|
|
projectile.hostile = true;
|
|
projectile.penetrate = 1;
|
|
projectile.alpha = 60;
|
|
projectile.tileCollide = false;
|
|
projectile.timeLeft = 240;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
if (projectile.timeLeft < 60)
|
|
projectile.Opacity = MathHelper.Clamp(projectile.timeLeft / 60f, 0f, 1f);
|
|
|
|
if (projectile.ai[1] == 0f)
|
|
{
|
|
projectile.ai[1] = 1f;
|
|
Main.PlaySound(SoundID.Item, (int)projectile.position.X, (int)projectile.position.Y, 33);
|
|
}
|
|
|
|
if (Main.rand.NextBool(2))
|
|
{
|
|
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 173, 0f, 0f);
|
|
}
|
|
}
|
|
|
|
public override bool CanHitPlayer(Player target) => projectile.timeLeft >= 60;
|
|
|
|
public override void OnHitPlayer(Player target, int damage, bool crit)
|
|
{
|
|
if (projectile.timeLeft < 60)
|
|
return;
|
|
|
|
target.AddBuff(BuffID.Weak, 120);
|
|
}
|
|
}
|
|
}
|