Files
CalamityModPublic/Projectiles/Melee/LaserFountain.cs
T
termigator1359 1b22071cf4 squash merge: Removed all unused textures
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.
2020-11-15 14:25:46 -05:00

44 lines
1.5 KiB
C#

using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class LaserFountain : ModProjectile
{
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Fountain");
}
public override void SetDefaults()
{
projectile.width = 4;
projectile.height = 4;
projectile.friendly = true;
projectile.alpha = 255;
projectile.penetrate = -1;
projectile.tileCollide = false;
projectile.timeLeft = 60;
projectile.melee = true;
}
public override void AI()
{
projectile.localAI[0] += 1f;
float SpeedX = (float)Main.rand.Next(-15, 15);
float SpeedY = (float)Main.rand.Next(-20, -10);
if (projectile.localAI[0] >= 12f)
{
if (projectile.owner == Main.myPlayer)
{
int projectile1 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, SpeedX, SpeedY, ModContent.ProjectileType<NebulaShot>(), (int)(350f * Main.player[projectile.owner].MeleeDamage()), projectile.knockBack, projectile.owner, 0f, 0f);
Main.projectile[projectile1].Calamity().forceMelee = true;
Main.projectile[projectile1].aiStyle = 1;
}
projectile.localAI[0] = 0f;
}
}
}
}