Death Mode weather adjustments.
Sea Serpent speed reduced. Lightning Strike sound.
This commit is contained in:
1 parent
fcbd17a865
commit
ef50b596ea
7 files changed
+32
-12
No files matched your search
@@ -422,12 +422,12 @@ namespace CalamityMod.CalPlayer
|
||||
if (Main.raining)
|
||||
{
|
||||
float frequencyMult = 1f - Main.cloudAlpha; // 1 to 0.11
|
||||
Vector2 spawnPoint = new Vector2(player.Center.X + (float)Main.rand.Next(-800, 801), player.Center.Y - (float)Main.rand.Next(700, 801));
|
||||
Vector2 spawnPoint = new Vector2(player.Center.X + (float)Main.rand.Next(-1000, 1001), player.Center.Y - (float)Main.rand.Next(700, 801));
|
||||
if (player.ZoneSnow)
|
||||
{
|
||||
int divisor = (int)((Main.hardMode ? 50f : 60f) * frequencyMult);
|
||||
float windVelocity = (float)Math.Sqrt((double)Math.Abs(Main.windSpeed)) * (float)Math.Sign(Main.windSpeed) * (Main.cloudAlpha + 0.5f) * 25f + Main.rand.NextFloat() * 0.2f - 0.1f;
|
||||
Vector2 velocity = new Vector2(windVelocity, 3f * Main.rand.NextFloat());
|
||||
Vector2 velocity = new Vector2(windVelocity * 0.2f, 3f * Main.rand.NextFloat());
|
||||
if (player.miscCounter % divisor == 0 && Main.rand.NextBool(3))
|
||||
Projectile.NewProjectile(spawnPoint.X, spawnPoint.Y, velocity.X, velocity.Y, ModContent.ProjectileType<IceRain>(), 20, 0f, player.whoAmI, 1f, 0f);
|
||||
}
|
||||
@@ -466,8 +466,10 @@ namespace CalamityMod.CalPlayer
|
||||
Main.projectile[num336].netUpdate = true;
|
||||
}
|
||||
}
|
||||
if (player.miscCounter == (int)(240f * frequencyMult) && Main.rand.NextBool(3))
|
||||
int randomFrequency2 = (int)(20f * frequencyMult);
|
||||
if (player.miscCounter % (Main.hardMode ? 90 : 120) == 0 && Main.rand.NextBool(randomFrequency2))
|
||||
{
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/LightningStrike"), (int)spawnPoint.X, (int)spawnPoint.Y);
|
||||
float randomVelocity = Main.rand.NextFloat() - 0.5f;
|
||||
Vector2 fireTo = new Vector2(spawnPoint.X + 100f * randomVelocity, spawnPoint.Y + 900);
|
||||
Vector2 ai0 = fireTo - spawnPoint;
|
||||
@@ -475,6 +477,7 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(0.78539818525314331)) * 7f;
|
||||
int proj = Projectile.NewProjectile(spawnPoint.X, spawnPoint.Y, velocity.X, velocity.Y, ProjectileID.CultistBossLightningOrbArc, 50, 0f, player.whoAmI, ai0.ToRotation(), ai);
|
||||
Main.projectile[proj].extraUpdates += 6;
|
||||
Main.projectile[proj].friendly = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Tools.ClimateChange
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
return !Main.slimeRain && (Main.rainTime > 3600 || !CalamityWorld.death);
|
||||
return !Main.slimeRain && (Main.rainTime > 3600 || !CalamityWorld.death || !Main.raining);
|
||||
}
|
||||
|
||||
public override bool UseItem(Player player)
|
||||
@@ -108,7 +108,7 @@ namespace CalamityMod.Items.Tools.ClimateChange
|
||||
Main.cloudBGActive = 1f;
|
||||
Main.numCloudsTemp = Main.cloudLimit;
|
||||
Main.numClouds = Main.numCloudsTemp;
|
||||
Main.windSpeedTemp = 0.5f;
|
||||
Main.windSpeedTemp = (float)Main.rand.Next(50, 75) * 0.01f;
|
||||
Main.windSpeedSet = Main.windSpeedTemp;
|
||||
Main.weatherCounter = Main.rand.Next(3600, 18000);
|
||||
Main.maxRaining = 0.89f;
|
||||
|
||||
@@ -10,8 +10,8 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
public class SeaSerpent1 : ModNPC
|
||||
{
|
||||
public const int maxLength = 9;
|
||||
public float speed = 6f;
|
||||
public float turnSpeed = 0.125f;
|
||||
public float speed = 3f;
|
||||
public float turnSpeed = 0.0625f;
|
||||
bool TailSpawned = false;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -66,15 +66,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item27, projectile.position);
|
||||
int num3;
|
||||
for (int num373 = 0; num373 < 3; num373 = num3 + 1)
|
||||
Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 27, 0.25f);
|
||||
//Main.PlaySound(SoundID.Item27, projectile.position);
|
||||
for (int num373 = 0; num373 < 3; num373++)
|
||||
{
|
||||
int num374 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 76, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num374].noGravity = true;
|
||||
Main.dust[num374].noLight = true;
|
||||
Main.dust[num374].scale = 0.7f;
|
||||
num3 = num373;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace CalamityMod.Skies
|
||||
public override void Apply()
|
||||
{
|
||||
Vector3 vec = Main.bgColor.ToVector3();
|
||||
vec *= (CalamityWorld.death ? 0.8f : 0.4f);
|
||||
vec *= (CalamityWorld.death ? 0.7f : 0.4f);
|
||||
base.UseOpacity(Math.Max(vec.X, Math.Max(vec.Y, vec.Z)));
|
||||
base.Apply();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using Microsoft.Xna.Framework.Audio;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Sounds.Custom
|
||||
{
|
||||
public class LightningStrike : ModSound
|
||||
{
|
||||
public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type)
|
||||
{
|
||||
soundInstance = sound.CreateInstance();
|
||||
soundInstance.Volume = volume * 1.5f;
|
||||
soundInstance.Pan = pan;
|
||||
Main.PlaySoundInstance(soundInstance);
|
||||
return soundInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Reference in new issue
Block a user