tooltip and tweaks
This commit is contained in:
1 parent
7a14803c9e
commit
2ddb638071
6 files changed
+51
-22
No files matched your search
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.useAnimation = 20;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 7f;
|
||||
Item.knockBack = 0.1f;
|
||||
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
|
||||
Item.rare = ItemRarityID.Yellow;
|
||||
Item.autoReuse = true;
|
||||
@@ -69,18 +69,18 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
else if (ShotType)
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<NullShot>(), damage / 3, knockback / 3, player.whoAmI, 0, 0, i);
|
||||
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<NullFlash>(), damage, knockback, player.whoAmI, 0, 0);
|
||||
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<NullShot>(), damage / 3, 0, player.whoAmI, 0, 0, i);
|
||||
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<NullFlash>(), damage / 2, 0, player.whoAmI, 0, 0);
|
||||
if (mult < 0.35f)
|
||||
mult += 0.015f;
|
||||
mult += 0.013f;
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile aBeam = Projectile.NewProjectileDirect(source, position, velocity, ModContent.ProjectileType<NullShot>(), damage / 2, knockback, player.whoAmI, 0, 5);
|
||||
Projectile aBeam = Projectile.NewProjectileDirect(source, position, velocity, ModContent.ProjectileType<NullShot>(), damage / 2, 0, player.whoAmI, 0, 5);
|
||||
aBeam.penetrate = 1;
|
||||
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<NullFlash>(), (int)(damage * 1.2f), knockback, player.whoAmI, 0, 5);
|
||||
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<NullFlash>(), damage / 2, 0, player.whoAmI, 0, 5);
|
||||
if (mult < 0.5f)
|
||||
mult += 0.01f;
|
||||
mult += 0.013f;
|
||||
}
|
||||
if (player.altFunctionUse != 2)
|
||||
{
|
||||
|
||||
@@ -840,8 +840,12 @@ NullificationPistol: {
|
||||
DisplayName: Nullification Pistol
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a fast null bullet that distorts NPC stats
|
||||
'Is it nullable or not? Let's find out!'
|
||||
An experimental alien tool used for energy manipulation, now makes for a fine weapon
|
||||
Fires either positive or negative energy, and can switch which is used by pressing <right>
|
||||
Positive energy splits into three beams that can pierce enemies
|
||||
Negative energy homes in on enemies and can be fired rapidly
|
||||
Firing either energy type creates a blast that greatly knocks back enemies
|
||||
Consistently firing one type of energy will reduce efficiency, but switching types will reset it
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -25,11 +25,13 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.height = 70;
|
||||
Projectile.friendly = true;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 30;
|
||||
Projectile.timeLeft = 50;
|
||||
Projectile.DamageType = DamageClass.Ranged;
|
||||
Projectile.extraUpdates = 2;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.ignoreWater = true;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -40,14 +42,14 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
|
||||
float rate = (Main.GlobalTimeWrappedHourly * 5);
|
||||
List<Color> earthColors = new List<Color>()
|
||||
List<Color> eColors = new List<Color>()
|
||||
{
|
||||
Color.Turquoise,
|
||||
Color.Orchid
|
||||
};
|
||||
int colorIndex = (int)(rate / 2 % earthColors.Count);
|
||||
Color currentColor = earthColors[colorIndex];
|
||||
Color nextColor = earthColors[(colorIndex + 1) % earthColors.Count];
|
||||
int colorIndex = (int)(rate / 2 % eColors.Count);
|
||||
Color currentColor = eColors[colorIndex];
|
||||
Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
|
||||
if (!Main.zenithWorld)
|
||||
baseColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
|
||||
|
||||
@@ -60,11 +62,19 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
Player Owner = Main.player[Projectile.owner];
|
||||
if (Projectile.numHits == 0)
|
||||
{
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Item/NullImpact");
|
||||
SoundEngine.PlaySound(fire with { Volume = 0.5f, Pitch = 0.5f }, Projectile.Center);
|
||||
}
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// Custom knockback
|
||||
Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -20;
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
|
||||
if (Main.zenithWorld)
|
||||
{
|
||||
#region NPC Nullification
|
||||
@@ -106,7 +116,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
if (time < 1)
|
||||
return false;
|
||||
Vector2 placement = Projectile.Center - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 40;
|
||||
Vector2 placement = Projectile.Center - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 50;
|
||||
Asset<Texture2D> tex = ModContent.Request<Texture2D>("CalamityMod/Particles/VerticalSmear");
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -45,22 +46,20 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
|
||||
float rate = (Main.GlobalTimeWrappedHourly * 5);
|
||||
List<Color> earthColors = new List<Color>()
|
||||
List<Color> eColors = new List<Color>()
|
||||
{
|
||||
Color.Turquoise,
|
||||
Color.Orchid
|
||||
};
|
||||
int colorIndex = (int)(rate / 2 % earthColors.Count);
|
||||
Color currentColor = earthColors[colorIndex];
|
||||
Color nextColor = earthColors[(colorIndex + 1) % earthColors.Count];
|
||||
int colorIndex = (int)(rate / 2 % eColors.Count);
|
||||
Color currentColor = eColors[colorIndex];
|
||||
Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
|
||||
if (!Main.zenithWorld)
|
||||
baseColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
|
||||
|
||||
if (Projectile.ai[1] == 5 && !Main.zenithWorld)
|
||||
baseColor = Color.White;
|
||||
|
||||
Player Owner = Main.player[Projectile.owner];
|
||||
float targetDist = Vector2.Distance(Owner.Center, Projectile.Center);
|
||||
if (time == 5)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
@@ -103,7 +102,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
dust.color = baseColor;
|
||||
}
|
||||
}
|
||||
if (time > 7 && time < 28 && Projectile.ai[2] > 0)
|
||||
if (time > 13 && time < 34 && Projectile.ai[2] > 0)
|
||||
{
|
||||
Projectile.Center += Projectile.velocity.RotatedBy((Projectile.ai[2] == 1 ? MathHelper.PiOver2 : -MathHelper.PiOver2)) * 0.2f;
|
||||
}
|
||||
@@ -136,7 +135,23 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
dust.scale = Main.rand.NextFloat(1.15f, 1.45f);
|
||||
dust.color = baseColor;
|
||||
}
|
||||
Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomRing", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.3f, 0.65f, 13);
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
Particle orb2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Black, "CalamityMod/Particles/SmallBloomRingLayered", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.4f, 0.75f, 13, false);
|
||||
GeneralParticleHandler.SpawnParticle(orb2);
|
||||
Particle orb3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Black, "CalamityMod/Particles/SmallBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.4f, 0.25f, 16, false);
|
||||
GeneralParticleHandler.SpawnParticle(orb3);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Particle orb2 = new LineParticle(Projectile.Center, (Projectile.velocity * 2).RotatedByRandom(0.1f) * Main.rand.NextFloat(0.1f, 1f), false, Main.rand.Next(20, 28 + 1), Main.rand.NextFloat(0.6f, 1.3f), baseColor);
|
||||
GeneralParticleHandler.SpawnParticle(orb2);
|
||||
}
|
||||
}
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Item/NullHit");
|
||||
SoundEngine.PlaySound(fire with { Volume = (Projectile.ai[1] == 5 ? 1 : 0.7f), Pitch = Main.rand.NextFloat(0, 0.1f) * (Projectile.ai[1] == 5 ? 3 : 1) }, Projectile.Center);
|
||||
if (Main.zenithWorld)
|
||||
{
|
||||
#region NPC Nullification
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user