Various fixes (deus sounds, supernova pull, more)
This commit is contained in:
1 parent
58e7b34c06
commit
bcc4f8affc
6 files changed
+23
-37
No files matched your search
@@ -37,11 +37,11 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
public class AstrumDeusHead : ModNPC
|
||||
{
|
||||
public static readonly SoundStyle SpawnSound = new("CalamityMod/Sounds/Custom/AstrumDeus/AstrumDeusSpawn");
|
||||
public static readonly SoundStyle LaserSound = new("CalamityMod/Sounds/Custom/AstrumDeus/AstrumDeusLaser");
|
||||
public static readonly SoundStyle GodRaySound = new("CalamityMod/Sounds/Custom/AstrumDeus/AstrumDeusGodRay");
|
||||
public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/AstrumDeus/AstrumDeusMine");
|
||||
public static readonly SoundStyle LaserSound = new("CalamityMod/Sounds/Custom/AstrumDeus/AstrumDeusLaser") { Volume = 0.35f };
|
||||
public static readonly SoundStyle GodRaySound = new("CalamityMod/Sounds/Custom/AstrumDeus/AstrumDeusGodRay") { Volume = 0.4f };
|
||||
public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/AstrumDeus/AstrumDeusMine") { Volume = 0.4f };
|
||||
public static readonly SoundStyle SplitSound = new("CalamityMod/Sounds/Custom/AstrumDeus/AstrumDeusSplit");
|
||||
public static readonly SoundStyle HitSound = new("CalamityMod/Sounds/NPCHit/AstrumDeusHit", 2) { Volume = 1.25f };
|
||||
public static readonly SoundStyle HitSound = new("CalamityMod/Sounds/NPCHit/AstrumDeusHit", 2) { Volume = 0.7f };
|
||||
public static readonly SoundStyle DeathSound = new("CalamityMod/Sounds/NPCKilled/AstrumDeusDeath");
|
||||
|
||||
public static Asset<Texture2D> TextureGlow1;
|
||||
|
||||
@@ -134,10 +134,6 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
HitDirect = true;
|
||||
}
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.9f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, time <= 7 ? 90 : 20, targetHitbox);
|
||||
}
|
||||
|
||||
@@ -81,33 +81,13 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.9f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
for (int i = 0; i <= 4; i++)
|
||||
if (Projectile.ai[1] != 2)
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(4) ? 264 : 66, new Vector2(4, 4).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 0.8f), 0, default, Main.rand.NextFloat(1.2f, 1.6f));
|
||||
dust.noGravity = true;
|
||||
dust.color = Main.rand.NextBool() ? Color.Lerp(mainColor, Color.White, 0.5f) : mainColor;
|
||||
dust.noLightEmittence = true;
|
||||
dust.noLight = true;
|
||||
if (Projectile.numHits > 0)
|
||||
Projectile.damage = (int)(Projectile.damage * 0.9f);
|
||||
if (Projectile.damage < 1)
|
||||
Projectile.damage = 1;
|
||||
}
|
||||
BounceHits++;
|
||||
if (Projectile.velocity.X != oldVelocity.X)
|
||||
{
|
||||
Projectile.velocity.X = -oldVelocity.X;
|
||||
}
|
||||
if (Projectile.velocity.Y != oldVelocity.Y)
|
||||
{
|
||||
Projectile.velocity.Y = -oldVelocity.Y;
|
||||
}
|
||||
if (BounceHits >= 4f)
|
||||
Projectile.Kill();
|
||||
return false;
|
||||
}
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
|
||||
@@ -62,15 +62,20 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
else
|
||||
{
|
||||
Lighting.AddLight(Projectile.Center, Color.Red.ToVector3() * 0.3f);
|
||||
if (Projectile.ai[1] > 4 && Main.rand.NextBool(3))
|
||||
{
|
||||
float velMulti = Main.rand.NextFloat(0.1f, 0.75f);
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center + Projectile.velocity * 2, 90, -Projectile.velocity.RotatedBy(0.45) * velMulti);
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(0.45f, 0.75f);
|
||||
dust.noLight = true;
|
||||
dust.noLightEmittence = true;
|
||||
Dust dust2 = Dust.NewDustPerfect(Projectile.Center + Projectile.velocity * 2, 90, -Projectile.velocity.RotatedBy(-0.45) * velMulti);
|
||||
dust2.noGravity = true;
|
||||
dust2.scale = Main.rand.NextFloat(0.45f, 0.75f);
|
||||
dust2.noLight = true;
|
||||
dust2.noLightEmittence = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.NPCs.Crags;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using static Humanizer.In;
|
||||
|
||||
@@ -178,7 +180,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
NPC target = Main.npc[i];
|
||||
if (!target.boss && target.IsAnEnemy(true, true) && !CalamityPlayer.areThereAnyDamnBosses)
|
||||
bool isAPillar = target.type == NPCID.LunarTowerSolar || target.type == NPCID.LunarTowerVortex || target.type == NPCID.LunarTowerNebula || target.type == NPCID.LunarTowerStardust;
|
||||
if (!isAPillar && !target.boss && target.IsAnEnemy(true, true) && !CalamityPlayer.areThereAnyDamnBosses && target.CanBeChasedBy(Projectile, false))
|
||||
{
|
||||
if (Vector2.Distance(target.Center, Projectile.Center) > 40 && Vector2.Distance(target.Center, Projectile.Center) < 600)
|
||||
target.Center += target.Center.DirectionTo(Projectile.Center).SafeNormalize(Vector2.UnitX) * 22;
|
||||
@@ -224,7 +227,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
if (!target.boss && target.IsAnEnemy(true, true) && !CalamityPlayer.areThereAnyDamnBosses && target != null)
|
||||
if (!target.boss && target.IsAnEnemy(true, true) && !CalamityPlayer.areThereAnyDamnBosses && target.CanBeChasedBy(Projectile, false) && target != null)
|
||||
{
|
||||
Vector2 velToApply = target.Center.DirectionFrom(Projectile.Center).SafeNormalize(Vector2.UnitX) * 30;
|
||||
target.velocity = velToApply + (velToApply.Y <= 0 ? new Vector2(0, -5) : Vector2.Zero);
|
||||
|
||||
@@ -9,6 +9,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using static Humanizer.In;
|
||||
|
||||
@@ -304,7 +305,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
NPC target = Main.npc[i];
|
||||
if (!target.boss && target.IsAnEnemy(true, true))
|
||||
bool isAPillar = target.type == NPCID.LunarTowerSolar || target.type == NPCID.LunarTowerVortex || target.type == NPCID.LunarTowerNebula || target.type == NPCID.LunarTowerStardust;
|
||||
if (!isAPillar && !target.boss && target.IsAnEnemy(true, true) && target.CanBeChasedBy(Projectile, false))
|
||||
{
|
||||
if (target != null && !CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
@@ -363,7 +365,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
dust2.color = Color.Lerp(Color.White, randomColor, 0.9f);
|
||||
}
|
||||
|
||||
if (!target.boss && target.IsAnEnemy(true, true) && !CalamityPlayer.areThereAnyDamnBosses && target != null)
|
||||
if (!target.boss && target.IsAnEnemy(true, true) && !CalamityPlayer.areThereAnyDamnBosses && target.CanBeChasedBy(Projectile, false) && target != null)
|
||||
{
|
||||
Vector2 velToApply = target.Center.DirectionFrom(Projectile.Center).SafeNormalize(Vector2.UnitX) * 40;
|
||||
target.velocity = velToApply + (velToApply.Y <= 0 ? new Vector2(0, -5) : Vector2.Zero);
|
||||
|
||||
Reference in new issue
Block a user