Files
CalamityModPublic/Projectiles/Typeless/Nanotech.cs
T
Andrew Marheine 486604f9b3 1 - Removed Rare Variant rarity, replaced with Challenge Drop tooltip.
2 - Replaced Pharaoh Set in Pyramids with a Ruby Hook via IL Editing.
3 - Gave several split projectiles homing a set time after the primary projectile splits, these projectiles deal no damage for a short time and then begin homing once that time has passed.
4 - Reduced Rocket III and Rocket IV damage by 25%, buffed low damage launchers a bit to compensate.
5 - Reverted the nerf made to Snowman Cannon.
6 - Adjusted Scorpio to be a burst-fire weapon.
7 - Increased homing speed for many weapons but reduced homing range.
8 - Reworked Conference Call to target up to 12 enemies on your screen and fire bullets from the sky towards them.
9 - Crown Jewel and Teardrop Cleaver are now Challenge Drops.
10 - Magic Mirror, Ice Mirror, Recall Potions and Cell Phone have a tooltip to state that they can't be used during boss fights.
11 - Reduced Bohldohr damage and made them spawn more often.
12 - Adjusted Gem Crawler spawn rates.
13 - Earth Elemental drop pool changes and made them non-hostile and non-damageable unless approached.
14 - Providence no longer fires additional stars directly at the player given her guardians are alive and she's not at low HP.
15 - Pillar event spawns are now tiered, weaker enemies spawn while the shield is at high HP and more difficult enemies spawn as the HP lowers.
16 - Demon Altars drop 6 Souls of Night upon being broken.
17 - Added recipes for Pharaoh Set pieces.
2021-04-05 18:47:55 -05:00

78 lines
2.6 KiB
C#

using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Typeless
{
public class Nanotech : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Nanoblade");
}
public override void SetDefaults()
{
projectile.width = 26;
projectile.height = 26;
projectile.friendly = true;
projectile.ignoreWater = true;
projectile.tileCollide = false;
projectile.penetrate = 1;
}
public override void AI()
{
Lighting.AddLight(projectile.Center, new Vector3(0.075f, 0.4f, 0.15f));
projectile.rotation += projectile.velocity.X * 0.2f;
if (projectile.velocity.X > 0f)
{
projectile.rotation += 0.08f;
}
else
{
projectile.rotation -= 0.08f;
}
projectile.ai[1] += 1f;
if (projectile.ai[1] > 30f)
{
projectile.alpha += 5;
if (projectile.alpha >= 255)
{
projectile.alpha = 255;
projectile.Kill();
return;
}
}
CalamityGlobalProjectile.HomeInOnNPC(projectile, true, 200f, 12f, 20f);
}
public override void Kill(int timeLeft)
{
int num3;
for (int num191 = 0; num191 < 2; num191 = num3 + 1)
{
int num192 = (int)(10f * projectile.scale);
int num193 = Dust.NewDust(projectile.Center - Vector2.One * (float)num192, num192 * 2, num192 * 2, 107, 0f, 0f, 0, default, 1f);
Dust dust20 = Main.dust[num193];
Vector2 value8 = Vector2.Normalize(dust20.position - projectile.Center);
dust20.position = projectile.Center + value8 * (float)num192 * projectile.scale;
if (num191 < 30)
{
dust20.velocity = value8 * dust20.velocity.Length();
}
else
{
dust20.velocity = value8 * (float)Main.rand.Next(45, 91) / 10f;
}
dust20.color = Main.hslToRgb((float)(0.40000000596046448 + Main.rand.NextDouble() * 0.20000000298023224), 0.9f, 0.5f);
dust20.color = Color.Lerp(dust20.color, Color.White, 0.3f);
dust20.noGravity = true;
dust20.scale = 0.7f;
num3 = num191;
}
}
}
}