(IMPORTANT: Seadragon's explosion is currently broken and doesn't function correctly and is too complex for me to make, I will need someone else to create it for me. Curse Terraria's rectangular hitboxes!) Gave Influx Waver 1 extra update, people said 2 extra updates looked too fast Changed Tears of Heaven to use holy fire dust instead of fire and ice dust, as it inflicts holy flames and this thing isn't called "Frigidflash Bolt" Archerfish Line (Archerfish, Megalodon, and Seadragon) Have all been given a close range projectile that can be used to knock back enemies and deal extra damage, eventually leading into Voidragon's tentacles. More details posted in Dev-Lounge by me on 7/1/2023. Fixed Seadragon's rocket sound playing on the rocket while its in the air by changing the firing sound to play on the player instead (Grr new sound engine) Made Seadragon's rockets fire on the 18th shot instead of the 17th shot so that the fire blast can happen in-between rockets on the 9th shot.
68 lines
2.4 KiB
C#
68 lines
2.4 KiB
C#
using CalamityMod.Buffs.DamageOverTime;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using CalamityMod.Dusts;
|
|
namespace CalamityMod.Projectiles.Magic
|
|
{
|
|
public class TearsofHeavenProjectile : ModProjectile, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Projectiles.Magic";
|
|
public override void SetStaticDefaults()
|
|
{
|
|
ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6;
|
|
ProjectileID.Sets.TrailingMode[Projectile.type] = 0;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Projectile.width = 24;
|
|
Projectile.height = 24;
|
|
Projectile.friendly = true;
|
|
Projectile.DamageType = DamageClass.Magic;
|
|
Projectile.penetrate = 2;
|
|
Projectile.alpha = 255;
|
|
Projectile.timeLeft = 240;
|
|
Projectile.light = 0.5f;
|
|
Projectile.tileCollide = false;
|
|
Projectile.usesLocalNPCImmunity = true;
|
|
Projectile.localNPCHitCooldown = 20;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
if (Projectile.alpha > 0)
|
|
{
|
|
Projectile.alpha -= 25;
|
|
if (Projectile.alpha < 0)
|
|
Projectile.alpha = 0;
|
|
}
|
|
|
|
Projectile.localAI[0] += 1f;
|
|
if (Projectile.localAI[0] > 4f)
|
|
{
|
|
int Smalldust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 1f);
|
|
Main.dust[Smalldust].noGravity = true;
|
|
int Bigdust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 2f);
|
|
Main.dust[Bigdust].noGravity = true;
|
|
}
|
|
|
|
CalamityUtils.HomeInOnNPC(Projectile, true, 250f, 8f, 20f);
|
|
|
|
Projectile.rotation += 0.3f * (float)Projectile.direction;
|
|
}
|
|
|
|
public override bool PreDraw(ref Color lightColor)
|
|
{
|
|
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1);
|
|
return false;
|
|
}
|
|
|
|
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
|
{
|
|
target.AddBuff(ModContent.BuffType<HolyFlames>(), 180);
|
|
}
|
|
}
|
|
}
|