Added Eternity, my dev weapon Changed the Sulf Sea worldgen a bit (a wip, more sprites needed) Added a ton of Acid Rain weapons and enemies Added a ton of summon weapons Added some early-game Sulf Sea weapons
51 lines
1.6 KiB
C#
51 lines
1.6 KiB
C#
using CalamityMod.Dusts;
|
|
using Microsoft.Xna.Framework;
|
|
using System.IO;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
namespace CalamityMod.Projectiles.Summon
|
|
{
|
|
public class SummonAstralExplosion : ModProjectile
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Explosion");
|
|
ProjectileID.Sets.MinionShot[projectile.type] = true;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
projectile.width = 150;
|
|
projectile.height = 150;
|
|
projectile.friendly = true;
|
|
projectile.minion = true;
|
|
projectile.penetrate = 3;
|
|
projectile.timeLeft = 60;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
// Bluish cyan light
|
|
Lighting.AddLight(projectile.Center, 66f / 255f, 189f / 255f, 181f / 255f);
|
|
float dustCount = 25f;
|
|
dustCount *= 0.7f;
|
|
projectile.ai[0] += 4f;
|
|
int counter = 0;
|
|
while (counter < dustCount)
|
|
{
|
|
int dustType = Utils.SelectRandom(Main.rand, new int[]
|
|
{
|
|
ModContent.DustType<AstralBlue>(),
|
|
ModContent.DustType<AstralOrange>()
|
|
});
|
|
Dust dust = Dust.NewDustPerfect(projectile.Center, dustType, Vector2.Zero, 100, default, 1.325f);
|
|
dust.noGravity = true;
|
|
dust.position += Utils.RandomVector2(Main.rand, -10f, 10f);
|
|
dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(1.5f, 5f);
|
|
counter++;
|
|
}
|
|
}
|
|
}
|
|
}
|