Files
CalamityModPublic/Projectiles/Ranged/NullShot2.cs
T
Andrew Marheine ce36dc7d32 1 - Added Malice Mode (there's no way to activate it yet) and adjusted all AIs a bit for it.
2 - IL Edited asphalt run speed and removed the multiplier given to player velocity while on asphalt.
3 - Removed Boss Rush Xeroc Curse.
4 - IL Edited Chlorophyte Bullets to have reduced dust and homing range and removed the damage nerf.
5 - Made Counter Scarf a rare variant of the Shield of Cthulhu and slightly increased the dash length.
6 - IL Edited to remove Aerial Bane's damage bonus against in-air enemies and removed the nerf it had.
7 - IL Edited to adjust the random damage variance for attacks both for and against the player from +-15% to +-5%.
8 - IL Edited to reduce Vortex Booster, Nebula Mantle and Betsy Wings horizontal hover speeds.
9 - Crown Jewel is now a legendary drop from King Slime.
10 - Teardrop Cleaver is now a legendary drop from Eye of Cthulhu.
11 - Changed Celestial Jewel recipe to use a Large Ruby and 5 teleportation potions.
12 - Bosses now drop rare variants and legendaries while in Malice Mode, adjusted damages and rarities/values for some that were moved to different tiers.
13 - Magic Mirror, Ice Mirror, Cell Phone and Recall Potions are now disabled while a boss is alive.
14 - Burden Breaker is now a legendary drop from Skeletron Prime.
15 - Rev+ Plantera spore gas no longer deals damage for 2 seconds after spawning in.
16 - Reduced the severity of the stat-changing properties of Nullification Pistol and Molecular Manipulator.
2021-03-30 02:38:07 -05:00

100 lines
3.1 KiB
C#

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Ranged
{
public class NullShot2 : ModProjectile
{
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Null");
}
public override void SetDefaults()
{
projectile.width = 6;
projectile.height = 6;
projectile.friendly = true;
projectile.penetrate = 1;
projectile.timeLeft = 120;
projectile.ranged = true;
projectile.extraUpdates = 1;
}
public override void AI()
{
projectile.localAI[0] += 1f;
if (projectile.localAI[0] > 3f)
{
for (int num134 = 0; num134 < 10; num134++)
{
float x = projectile.position.X - projectile.velocity.X / 10f * (float)num134;
float y = projectile.position.Y - projectile.velocity.Y / 10f * (float)num134;
int num135 = Dust.NewDust(new Vector2(x, y), 1, 1, 66, 0f, 0f, 0, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f);
Main.dust[num135].alpha = projectile.alpha;
Main.dust[num135].position.X = x;
Main.dust[num135].position.Y = y;
Main.dust[num135].velocity *= 0f;
Main.dust[num135].noGravity = true;
}
}
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
if (target.type == NPCID.TargetDummy)
{
return;
}
int nullBuff = Main.rand.Next(10);
if (!target.boss)
{
if (nullBuff == 0)
{
target.scale *= 5f;
}
else if (nullBuff == 1)
{
target.scale *= 0.1f;
}
else if (nullBuff == 2)
{
target.damage += 20;
}
else if (nullBuff == 3)
{
target.damage -= 20;
}
else if (nullBuff == 4)
{
target.knockBackResist = 0f;
}
else if (nullBuff == 5)
{
target.knockBackResist = 1f;
}
else if (nullBuff == 6)
{
target.defense += 10;
}
else if (nullBuff == 7)
{
target.defense -= 10;
}
else if (nullBuff == 8)
{
target.velocity.Y = Main.rand.NextBool(2) ? 30f : -30f;
}
else
{
target.velocity.X = Main.rand.NextBool(2) ? 30f : -30f;
}
}
}
}
}