2 - Adjusted Hallowed Rune, Spirit Glyph and Phantomic Artifact buffs to be less insane. 3 - Reduced Camper regen. 4 - Boss Effects is now applied by the boss to each player within 6400 units of it. 5 - Angel Treads improve wing flight time by 10% instead of 20%. 6 - Adjusted several tooltips to state that they don't work during boss fights or have reduced effect during boss fights. 7 - Reworked Arbalest, Skullmasher and Pearl God. Skullmasher is not done yet though. 8 - Fixed Golden Eagle spread. 9 - Normality Relocator states that it gives portal gun fall speed for 30 frames after a teleport. 10 - Gael's Greatsword drops from Malice Mode SCal. 11 - Perforator Hive doesn't deal contact damage for 3 seconds after spawning.
71 lines
2.4 KiB
C#
71 lines
2.4 KiB
C#
using Microsoft.Xna.Framework;
|
|
using System;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
namespace CalamityMod.Projectiles.Ranged
|
|
{
|
|
public class Shockblast : ModProjectile
|
|
{
|
|
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
|
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Blast");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
projectile.width = 20;
|
|
projectile.height = 20;
|
|
projectile.friendly = true;
|
|
projectile.ignoreWater = true;
|
|
projectile.tileCollide = false;
|
|
projectile.ranged = true;
|
|
projectile.penetrate = -1;
|
|
projectile.timeLeft = 10;
|
|
projectile.usesLocalNPCImmunity = true;
|
|
projectile.localNPCHitCooldown = 15;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
Lighting.AddLight(projectile.Center, 0f, 0f, 0.25f);
|
|
float num461 = 25f;
|
|
if (projectile.ai[0] > 180f)
|
|
{
|
|
num461 -= (projectile.ai[0] - 180f) / 2f;
|
|
}
|
|
if (num461 <= 0f)
|
|
{
|
|
num461 = 0f;
|
|
projectile.Kill();
|
|
}
|
|
num461 *= 0.7f;
|
|
projectile.ai[0] += 4f;
|
|
int num462 = 0;
|
|
while (num462 < num461)
|
|
{
|
|
float sizeMultiplier = (projectile.ai[1] * 0.5f) + 1f;
|
|
float num463 = Main.rand.Next(-10, 11) * sizeMultiplier;
|
|
float num464 = Main.rand.Next(-10, 11) * sizeMultiplier;
|
|
float num465 = Main.rand.Next(3, 9) * sizeMultiplier;
|
|
float num466 = (float)Math.Sqrt(num463 * num463 + num464 * num464);
|
|
num466 = num465 / num466;
|
|
num463 *= num466;
|
|
num464 *= num466;
|
|
int num467 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 185);
|
|
Dust dust = Main.dust[num467];
|
|
dust.scale = sizeMultiplier;
|
|
dust.noGravity = true;
|
|
dust.position.X = projectile.Center.X;
|
|
dust.position.Y = projectile.Center.Y;
|
|
dust.position.X += Main.rand.Next(-10, 11);
|
|
dust.position.Y += Main.rand.Next(-10, 11);
|
|
dust.velocity.X = num463;
|
|
dust.velocity.Y = num464;
|
|
num462++;
|
|
}
|
|
}
|
|
}
|
|
}
|