This commit is contained in:
mountaindrew10 committed 2025-05-14 05:13:45 -05:00
commit 5a4b261760
4 files changed
+14 -9

No files matched your search

+1 -1
View File
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
Item.width = 40;
Item.height = 38;
Item.height = 48;
Item.DamageType = DamageClass.MeleeNoSpeed;
Item.damage = 300;
Item.knockBack = 7.5f;
+5 -3
View File
@@ -23,8 +23,9 @@ namespace CalamityMod.Particles
private bool FadeOut;
private Vector2 Squish;
private Color BaseColor;
private float MakeLight;
public CustomPulse(Vector2 position, Vector2 velocity, Color color, string texture, Vector2 squish, float rotation, float originalScale, float finalScale, int lifeTime, bool UseAdditiveBlend = true, float baseOpacity = 1f, bool fade = true)
public CustomPulse(Vector2 position, Vector2 velocity, Color color, string texture, Vector2 squish, float rotation, float originalScale, float finalScale, int lifeTime, bool UseAdditiveBlend = true, float baseOpacity = 1f, bool fade = true, float makeLight = 1)
{
Position = position;
Velocity = velocity;
@@ -39,6 +40,7 @@ namespace CalamityMod.Particles
Squish = squish;
Rotation = rotation;
UseAltVisual = UseAdditiveBlend;
MakeLight = makeLight;
}
public override void Update()
@@ -49,7 +51,8 @@ namespace CalamityMod.Particles
opacity = (FadeOut ? (float)Math.Sin(MathHelper.PiOver2 + LifetimeCompletion * MathHelper.PiOver2) : 1f) * BaseOpacity;
Color = BaseColor * opacity;
Lighting.AddLight(Position, Color.R / 255f, Color.G / 255f, Color.B / 255f);
if (MakeLight > 0)
Lighting.AddLight(Position, (Color.R / 255f) * MakeLight, (Color.G / 255f) * MakeLight, (Color.B / 255f) * MakeLight);
Velocity *= 0.95f;
}
@@ -64,7 +67,6 @@ namespace CalamityMod.Particles
{
Texture2D joke = ModContent.Request<Texture2D>("CalamityMod/Particles/MammothParticle").Value;
scaleMult = (MathHelper.Lerp(tex.Size().X / joke.Size().X, tex.Size().Y / joke.Size().Y, 0.5f));
Main.NewText(scaleMult);
tex = joke;
UseAltVisual = true;
}
+7 -2
View File
@@ -109,12 +109,11 @@ namespace CalamityMod.Projectiles.Ranged
dust.scale = Main.rand.NextFloat(0.75f, 1.1f);
dust.noGravity = true;
}
//SoundEngine.PlaySound(SoundID.Shatter with { Volume = 0.4f, Pitch = 0.1f + 0.1f * bounces }, Projectile.Center);
SoundEngine.PlaySound(SoundID.Item50 with { Volume = 0.3f, Pitch = -0.2f + 0.4f * bounces, MaxInstances = 15 }, Projectile.Center);
}
for (int i = 0; i < 2; i++)
{
Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.2f * (i), 0.45f * (i), 9, true);
Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.2f * (i), 0.45f * (i), 9, true, makeLight: 0);
GeneralParticleHandler.SpawnParticle(blastRing);
}
float rot = Main.rand.NextFloat(-5, 5);
@@ -126,6 +125,7 @@ namespace CalamityMod.Projectiles.Ranged
dust.fadeIn = 1.5f;
dust.noGravity = true;
dust.color = Color.White;
dust.noLightEmittence = true;
}
// Doesn't actually do damage, just an aoe for confustion infliction and knockback
Projectile flash = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<FlashRoundFlash>(), 5, 0f, Projectile.owner);
@@ -166,6 +166,11 @@ namespace CalamityMod.Projectiles.Ranged
bounces--;
return false;
}
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
{
float damageMult = (Projectile.numHits == 0 ? 1 : 0.3f);
modifiers.SourceDamage *= damageMult;
}
public override void OnKill(int timeLeft)
{
}
+1 -3
View File
@@ -412,9 +412,7 @@ namespace CalamityMod
{
Vector2 origin = new Vector2(glowmaskTexture.Width / 2f, glowmaskTexture.Height / 2f);
Color color = new Color(250, 250, 250, item.alpha);
if (item.type == ModContent.ItemType<GrandGuardian>())
color = Color.White;
Color color = Color.White;
spriteBatch.Draw(glowmaskTexture, item.Center - Main.screenPosition, null, color, rotation, origin, 1f, SpriteEffects.None, 0f);
}