Files
CalamityModPublic/Projectiles/Ranged/SpykerProj.cs
T
Andrew Marheine 778c089075 1 - Removed Bloodflare mana star drops.
2 - Increased Bloodflare heart drop timer from 3 to 5 seconds.
3 - Moved Revivify, Daedalus Absorb and Absorber healing to Hurt instead of PreHurt.
4 - Reduced various life steal/healing bonuses, made their caps more strict and increased their cooldowns.
5 - Changed Baleful Harvester to be true melee and increased skull velocity and changed the skull AI.
6 - Nerfed RE weapons but made their ammo sold by the Arms Dealer and not drop from bosses.
7 - Adjusted more OOA armors by moving stats from the armor pieces to the set bonuses.
8 - Buffed Relic of Convergence healing, because it wasn't good.
9 - Adjusted DoG phase 2 AI to transition phases at different HP intervals, teleport rift creates a fireball explosion when DoG teleports to it when he's below 60% HP.
10 - Hive Cyst, Perforator Cyst and ??? no longer spawn while the pillars are active.
11 - Nerfed some Malice Mode AIs again and buffed others.
12 - Added new Perforator Hive spore attack, it's scuffed as fuck atm because it's using a placeholder sprite and projectile lol.
13 - Polter movement changed when lining up a charge.
14 - Nerfed Event Horizon homing range and black hole duration.
15 - Nerfed several other projectile homing ranges.
16 - Reduced Venom Staff buff from 66% to 33%.
2021-05-09 19:19:47 -05:00

98 lines
3.8 KiB
C#

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Ranged
{
public class SpykerProj : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Spyker");
ProjectileID.Sets.TrailCacheLength[projectile.type] = 10;
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
}
public override void SetDefaults()
{
projectile.width = 10;
projectile.height = 10;
projectile.alpha = 255;
projectile.friendly = true;
projectile.ignoreWater = true;
projectile.penetrate = 3;
projectile.alpha = 255;
projectile.ranged = true;
projectile.extraUpdates = 2;
projectile.aiStyle = 93;
aiType = ProjectileID.NailFriendly;
}
public override void AI()
{
projectile.alpha -= 10;
if (projectile.alpha < 0)
{
projectile.alpha = 0;
}
projectile.localAI[1] += 1f;
if (projectile.localAI[1] > 4f)
{
for (int num468 = 0; num468 < 2; num468++)
{
int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 46, 0f, 0f, 100, default, 0.75f);
Main.dust[num469].noGravity = true;
Main.dust[num469].velocity *= 0f;
}
}
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1);
return false;
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.immune[projectile.owner] = 1;
}
public override void Kill(int timeLeft)
{
projectile.position = projectile.Center;
projectile.width = projectile.height = 32;
projectile.position.X = projectile.position.X - (float)(projectile.width / 2);
projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2);
if (projectile.owner == Main.myPlayer)
{
for (int p = 0; p < 3; p++)
{
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType<NeedlerProj>(), (int)(projectile.damage * 0.5), 0f, projectile.owner);
}
}
for (int num621 = 0; num621 < 3; num621++)
{
int num622 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 46, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.2f);
Main.dust[num622].velocity *= 3f;
if (Main.rand.NextBool(2))
{
Main.dust[num622].scale = 0.5f;
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
}
}
for (int num623 = 0; num623 < 5; num623++)
{
int num624 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 39, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1.7f);
Main.dust[num624].noGravity = true;
Main.dust[num624].velocity *= 5f;
num624 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 44, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1f);
Main.dust[num624].velocity *= 2f;
}
}
}
}