Fixed errors in CalamityPlayer someone else made.

Added Death Mode weather projectile frequency config.
This commit is contained in:
Andrew Marheine committed 2020-05-10 14:58:41 -05:00
1 parent e6b3909e38
commit 7ce69bbe43
4 files changed
+12 -4

No files matched your search

+2 -2
View File
@@ -5627,7 +5627,7 @@ namespace CalamityMod.CalPlayer
#region Modify Hit By Proj
public override void ModifyHitByProjectile(Projectile proj, ref int damage, ref bool crit)
{
if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x))
if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => proj.type != x))
{
if (player.HeldItem.type == ModContent.ItemType<GaelsGreatsword>()
&& proj.active && proj.hostile && player.altFunctionUse == 2 && Main.rand.NextBool(2))
@@ -5832,7 +5832,7 @@ namespace CalamityMod.CalPlayer
//1 second for DM lightning, 2 seconds for Storm Weaver/Cultist lightning
}
}
if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x))
if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => proj.type != x))
{
if (projRef && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(20))
{
+1 -1
View File
@@ -564,7 +564,7 @@ namespace CalamityMod.CalPlayer
if (Main.raining)
{
float frequencyMult = 1f - Main.cloudAlpha; // 1 to 0.11
float frequencyMult = (1f - Main.cloudAlpha) * CalamityMod.CalamityConfig.WeatherEffectRateMultiplier; // 3 to 0.055
Vector2 spawnPoint = new Vector2(player.Center.X + (float)Main.rand.Next(-1000, 1001), player.Center.Y - (float)Main.rand.Next(700, 801));
Tile tileSafely = Framing.GetTileSafely((int)(spawnPoint.X / 16f), (int)(spawnPoint.Y / 16f));
+8
View File
@@ -163,6 +163,14 @@ namespace CalamityMod
[Tooltip("Buffs the health of Thorium bosses if Revengeance or Death is enabled")]
public bool RevengeanceAndDeathThoriumBossBuff { get; set; }
[Header("Death Mode Changes")]
[DefaultValue(1f)]
[Range(0.5f, 3f)]
[Label("Weather Effect Rate Multiplier")]
[Tooltip("Affects all Death Mode weather projectiles, increase to decrease the amount of projectiles, decrease to increase the amount of projectiles")]
public float WeatherEffectRateMultiplier { get; set; }
[Header("Boss Rush Curses")]
[DefaultValue(false)]
+1 -1
View File
@@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Boss
public override void AI()
{
Lighting.AddLight((int)((projectile.position.X + (float)(projectile.width / 2)) / 16f), (int)((projectile.position.Y + (float)(projectile.height / 2)) / 16f), 0.01f, 0.25f, 0.25f);
Lighting.AddLight((int)((projectile.position.X + (float)(projectile.width / 2)) / 16f), (int)((projectile.position.Y + (float)(projectile.height / 2)) / 16f), 0f, 0.25f, 0.25f);
if (projectile.ai[0] != 2f)
projectile.aiStyle = 1;