small Grand Dad and Septic Skewer fixes
localized Jared boop and made very small function and visual changes
This commit is contained in:
1 parent
a0762442a6
commit
26cd5b811d
7 files changed
+88
-22
No files matched your search
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts
|
||||
{
|
||||
public class VoidDust : ModDust
|
||||
{
|
||||
public override void OnSpawn(Dust dust)
|
||||
{
|
||||
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
|
||||
}
|
||||
|
||||
public override bool Update(Dust dust)
|
||||
{
|
||||
dust.rotation += MathF.Sign(dust.velocity.X);
|
||||
dust.velocity *= 0.98f;
|
||||
dust.scale += 0.02f;
|
||||
|
||||
float light = MathHelper.Clamp(dust.scale * 0.8f, 0f, 1f);
|
||||
if (!dust.noLightEmittence)
|
||||
Lighting.AddLight(dust.position, dust.color.ToVector3() * light);
|
||||
|
||||
return true;
|
||||
}
|
||||
public override bool PreDraw(Dust dust)
|
||||
{
|
||||
Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
|
||||
Texture2D rechargeTexture2 = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/BasicCircle").Value;
|
||||
if (!dust.noLight)
|
||||
{
|
||||
Texture2D rechargeTexture = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
|
||||
// Glow Orb
|
||||
Main.EntitySpriteDraw(rechargeTexture, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, rechargeTexture.Size() * 0.5f, dust.scale * 0.1f, SpriteEffects.None, 0);
|
||||
if (dust.alpha < 1)
|
||||
Main.EntitySpriteDraw(rechargeTexture, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, rechargeTexture.Size() * 0.5f, dust.scale * 0.04f, SpriteEffects.None, 0);
|
||||
}
|
||||
Main.EntitySpriteDraw(rechargeTexture2, dustCenter - Main.screenPosition, null, Color.Black * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, rechargeTexture2.Size() * 0.5f, dust.scale * 0.075f, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@@ -42,6 +42,7 @@ NoComputer: No decryption computer installed
|
||||
ArkParry: Parry!
|
||||
BurningSeaBurn: It burns...
|
||||
LightsWarning: I've gotta give you a flashing lights warning on this one
|
||||
HecBoop: boop!
|
||||
ClockworkTick: Tick
|
||||
ClockworkTock: Tock
|
||||
SevensJackpot: Jackpot!!!
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 229 KiB |
@@ -12,20 +12,22 @@ namespace CalamityMod.Particles
|
||||
public bool AffectedByGravity;
|
||||
public float Ylength = 1f;
|
||||
public float Xlength = 0.6f;
|
||||
public float ShrinkSpeed = 1;
|
||||
public override bool SetLifetime => true;
|
||||
public override bool UseCustomDraw => true;
|
||||
public override bool UseAdditiveBlend => false;
|
||||
|
||||
public override string Texture => "CalamityMod/Particles/LargeSpark";
|
||||
public override string Texture => "CalamityMod/Particles/GlowSpark2";
|
||||
|
||||
public VoidSparkParticle(Vector2 relativePosition, Vector2 velocity, bool affectedByGravity, int lifetime, float scale, Color color)
|
||||
public VoidSparkParticle(Vector2 relativePosition, Vector2 velocity, bool affectedByGravity, int lifetime, float scale, Color color, float shrinkSpeed = 1)
|
||||
{
|
||||
Position = relativePosition;
|
||||
Velocity = velocity;
|
||||
AffectedByGravity = affectedByGravity;
|
||||
Scale = scale;
|
||||
Scale = scale * 0.357f;
|
||||
Lifetime = lifetime;
|
||||
Color = InitialColor = color;
|
||||
ShrinkSpeed = shrinkSpeed;
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
@@ -33,8 +35,9 @@ namespace CalamityMod.Particles
|
||||
Scale *= 0.9f;
|
||||
Color = Color.Lerp(InitialColor, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D));
|
||||
Velocity *= 0.95f;
|
||||
Ylength *= 1.25f;
|
||||
Xlength *= 0.7f;
|
||||
|
||||
Ylength *= (1 + (0.25f * ShrinkSpeed));
|
||||
Xlength *= (1 - (0.3f * ShrinkSpeed));
|
||||
|
||||
if (Velocity.Length() < 12f && AffectedByGravity)
|
||||
{
|
||||
@@ -48,9 +51,10 @@ namespace CalamityMod.Particles
|
||||
{
|
||||
Vector2 scale = new Vector2(Xlength, Ylength) * Scale;
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Texture2D texture2 = ModContent.Request<Texture2D>("CalamityMod/Particles/GlowSpark").Value;
|
||||
|
||||
spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, Rotation, texture.Size() * 0.5f, scale, 0, 0f);
|
||||
spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color.Black, Rotation, texture.Size() * 0.5f, scale * new Vector2(0.85f, 1f), 0, 0f);
|
||||
spriteBatch.Draw(texture2, Position - Main.screenPosition, null, Color with { A = 0 }, Rotation, texture.Size() * 0.5f, scale, 0, 0f);
|
||||
spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color.Black, Rotation, texture.Size() * 0.5f, scale * new Vector2(0.75f, 0.9f), 0, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.NPCs.PrimordialWyrm;
|
||||
using CalamityMod.Particles;
|
||||
@@ -164,17 +165,27 @@ namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
if (Main.rand.NextBool(4))
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(Owner.Center + (new Vector2(180, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), ModContent.DustType<VoidDust>(), Vector2.Zero, 0, default, Main.rand.NextFloat(1.15f, 1.5f));
|
||||
dust.noGravity = true;
|
||||
dust.color = Color.DodgerBlue;
|
||||
GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Owner.Center + (new Vector2(180, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), Vector2.Zero, false, 23, Main.rand.NextFloat(0.5f, 1f), Color.Black, false, false, false));
|
||||
}
|
||||
else
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(Owner.Center + (new Vector2(180, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), ModContent.DustType<LightDust>(), Vector2.Zero, 0, default, Main.rand.NextFloat(1.15f, 1.5f));
|
||||
dust.noGravity = true;
|
||||
dust.color = Color.Blue;
|
||||
GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Owner.Center + (new Vector2(180, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), Vector2.Zero, false, 23, Main.rand.NextFloat(0.5f, 1f), Main.rand.NextBool(4) ? Color.DodgerBlue : Color.Blue));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
float randRot = Main.rand.NextFloat(-30, -60);
|
||||
Vector2 dustVel = (new Vector2(0, 15 * -Projectile.ai[1] * Owner.direction)).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot));
|
||||
Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(185, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), 278, dustVel * Main.rand.NextFloat(0.1f, 0.5f));
|
||||
dust2.scale = Main.rand.NextFloat(0.45f, 0.95f);
|
||||
dust2.scale = Main.rand.NextFloat(0.55f, 1.05f);
|
||||
dust2.noGravity = true;
|
||||
dust2.color = Main.rand.NextBool(3) ? Color.Goldenrod : Color.Gold;
|
||||
}
|
||||
@@ -217,7 +228,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
if (target.type == ModContent.NPCType<PrimordialWyrmHead>())
|
||||
{
|
||||
CombatText.NewText(target.Hitbox, Color.Aqua, "boop!");
|
||||
CombatText.NewText(target.Hitbox, Color.Aqua, CalamityUtils.GetTextValue("Misc.HecBoop"));
|
||||
SoundStyle boop = new("CalamityMod/Sounds/Item/SnootBooped");
|
||||
SoundEngine.PlaySound(boop with {Pitch = Main.rand.NextFloat(-0.15f, 0.15f) }, Projectile.Center);
|
||||
}
|
||||
@@ -237,17 +248,20 @@ namespace CalamityMod.Projectiles.Melee
|
||||
// Apply tile collison damage (is bonus on GFB and even further is both final bosses are gone)
|
||||
target.FlungNPC().ApplyCollisionDamage(target, Projectile.damage * (Main.zenithWorld ? (DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs ? 1000 : 77) : 3) * (rightClicked ? 3 : 1), launchVel, 5f, true);
|
||||
}
|
||||
Particle spark = new VoidSparkParticle(target.Center, (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -35, false, 13, 0.5f, Color.DodgerBlue);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
|
||||
if (Projectile.numHits < 3)
|
||||
{
|
||||
Particle spark = new VoidSparkParticle(target.Center, (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * (-45 + Projectile.numHits * 5), false, (int)(16 - Projectile.numHits * 3), 0.6f - Projectile.numHits * 0.15f, Color.DodgerBlue, 0.45f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
|
||||
for (int i = 0; i < MathHelper.Clamp(10 - Projectile.numHits * 2, 2, 10); i++)
|
||||
{
|
||||
Particle spark2 = new SparkParticle(target.Center, ((Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -35).RotatedByRandom(0.7) * Main.rand.NextFloat(0.2f, 1f), true, 55, Main.rand.NextFloat(0.4f, 1.5f), Main.rand.NextBool(4) ? Color.DodgerBlue : Color.Blue);
|
||||
Particle spark2 = new SparkParticle(target.Center, ((Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -35).RotatedByRandom(0.7) * Main.rand.NextFloat(0.2f, 1f), false, 55, Main.rand.NextFloat(0.4f, 1.5f), Main.rand.NextBool(4) ? Color.DodgerBlue : Color.Blue);
|
||||
GeneralParticleHandler.SpawnParticle(spark2);
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Particle spark3 = new AltSparkParticle(target.Center, ((Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -35).RotatedByRandom(0.7) * Main.rand.NextFloat(0.2f, 1f), true, 55, Main.rand.NextFloat(0.4f, 1.5f), Color.Black);
|
||||
GeneralParticleHandler.SpawnParticle(spark3);
|
||||
}
|
||||
Dust dust = Dust.NewDustPerfect(target.Center, ModContent.DustType<VoidDust>(), ((Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -35).RotatedByRandom(0.7) * Main.rand.NextFloat(0.2f, 1f), 0, default, Main.rand.NextFloat(1.55f, 2.2f));
|
||||
dust.noGravity = true;
|
||||
dust.color = Main.rand.NextBool() ? Color.DodgerBlue : Color.Blue;
|
||||
}
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Linq;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -68,7 +69,6 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.DamageType = DamageClass.Ranged;
|
||||
Projectile.extraUpdates = 2;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
Projectile.extraUpdates = 1;
|
||||
@@ -86,11 +86,14 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
pullingTarget = false;
|
||||
}
|
||||
if (Projectile.ai[1] > 0)
|
||||
Projectile.extraUpdates = (int)(MathHelper.Clamp(Projectile.ai[1], 1, 18));
|
||||
Projectile.extraUpdates = (int)(MathHelper.Clamp(Projectile.ai[1], 1, 50));
|
||||
|
||||
if (!stuckInTarget && (!hasHitTile && !returning))
|
||||
storedVelocity = Projectile.velocity;
|
||||
|
||||
if (Projectile.velocity.Length() < 7)
|
||||
collideWithTiles = false;
|
||||
|
||||
if (Main.zenithWorld)
|
||||
{
|
||||
returnTime = 90;
|
||||
@@ -253,7 +256,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
closestTarget = Main.npc[index];
|
||||
}
|
||||
}
|
||||
if (Main.zenithWorld && Main.npc[index] != null && Main.rand.NextBool(15) && index < 80 && Main.npc[index].realLife == -1 && Owner.ownedProjectileCounts[Projectile.type] < 80)
|
||||
if (Main.zenithWorld && Main.npc[index] != null && index < 80 && Main.npc[index].realLife == -1 && Owner.ownedProjectileCounts[Projectile.type] < 80)
|
||||
{
|
||||
closestTarget = Main.npc[index];
|
||||
Projectile harpoon = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, ((closestTarget.Center - Owner.Center + closestTarget.velocity * 1.5f).SafeNormalize(Vector2.UnitX) * 18), Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner, 0, Projectile.ai[1] + 1);
|
||||
@@ -403,7 +406,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
target.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 180);
|
||||
}
|
||||
public override bool? CanDamage() => canDamage ? null : false;
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 25, targetHitbox);
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 25 * (!spawnPullBlood ? 4 : 1), targetHitbox);
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user