Finish set bonuses, add more options to the Avali Trader

This commit is contained in:
2025-11-20 16:22:50 +00:00
parent 9162878883
commit b30fcc9563
44 changed files with 1744 additions and 81 deletions
@@ -0,0 +1,52 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace ForgottenWawiTech.Content.Projectiles.Avali
{
public class AvaliHuntingDroneShot : ModProjectile
{
public override void SetStaticDefaults()
{
ProjectileID.Sets.MinionShot[Type] = true;
}
public override void SetDefaults()
{
Projectile.width = 12;
Projectile.height = 12;
Projectile.friendly = true;
Projectile.timeLeft = 120;
Projectile.penetrate = 1;
Projectile.tileCollide = false;
Projectile.ignoreWater = true;
Projectile.DamageType = DamageClass.Summon;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 10;
Projectile.extraUpdates = 1;
Projectile.alpha = 40;
}
public override void AI()
{
Projectile.rotation = Projectile.velocity.ToRotation();
Lighting.AddLight(Projectile.Center, 0.4f, 0.7f, 1.2f);
if (Main.rand.NextBool(3))
{
Dust dust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, DustID.Electric, 0f, 0f, 120, default, 1.1f);
dust.noGravity = true;
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
if (Main.myPlayer == Projectile.owner)
{
SoundEngine.PlaySound(SoundID.Item93 with { Volume = 0.4f }, Projectile.Center);
}
}
}
}