diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 393102688e..5a3c6339ec 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5627,25 +5627,28 @@ namespace CalamityMod.CalPlayer #region Modify Hit By Proj public override void ModifyHitByProjectile(Projectile proj, ref int damage, ref bool crit) { - if (player.HeldItem.type == ModContent.ItemType() - && proj.active && proj.hostile && player.altFunctionUse == 2 && Main.rand.NextBool(2)) - { - for (int j = 0; j < 3; j++) - { - int dustIndex = Dust.NewDust(proj.position, proj.width, proj.height, 31, 0f, 0f, 0, default, 1f); - Main.dust[dustIndex].velocity *= 0.3f; - } - int damage2 = (int)(GaelsGreatsword.BaseDamage * Main.LocalPlayer.MeleeDamage()); - proj.hostile = false; - proj.friendly = true; - proj.velocity *= -1f; - proj.damage = damage2; - proj.penetrate = 1; - player.immune = true; - player.immuneNoBlink = true; - player.immuneTime = 4; - damage = 0; - } + if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x)) + { + if (player.HeldItem.type == ModContent.ItemType() + && proj.active && proj.hostile && player.altFunctionUse == 2 && Main.rand.NextBool(2)) + { + for (int j = 0; j < 3; j++) + { + int dustIndex = Dust.NewDust(proj.position, proj.width, proj.height, 31, 0f, 0f, 0, default, 1f); + Main.dust[dustIndex].velocity *= 0.3f; + } + int damage2 = (int)(GaelsGreatsword.BaseDamage * Main.LocalPlayer.MeleeDamage()); + proj.hostile = false; + proj.friendly = true; + proj.velocity *= -1f; + proj.damage = damage2; + proj.penetrate = 1; + player.immune = true; + player.immuneNoBlink = true; + player.immuneTime = 4; + damage = 0; + } + } int bossRushDamage = (Main.expertMode ? 125 : 150) + (CalamityWorld.bossRushStage / 2); if (CalamityWorld.bossRushActive) { @@ -5829,46 +5832,49 @@ namespace CalamityMod.CalPlayer //1 second for DM lightning, 2 seconds for Storm Weaver/Cultist lightning } } - if (projRef && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(20)) - { - player.statLife += damage; - player.HealEffect(damage); - proj.hostile = false; - proj.friendly = true; - proj.velocity.X = -proj.velocity.X; - proj.velocity.Y = -proj.velocity.Y; - } - if (projRefRare && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(2)) - { - proj.hostile = false; - proj.friendly = true; - proj.velocity.X = -proj.velocity.X * 2f; - proj.velocity.Y = -proj.velocity.Y * 2f; - proj.damage *= 10; - projRefRareLifeRegenCounter = 120; - projTypeJustHitBy = proj.type; - } - if (aSparkRare && proj.active && !proj.friendly && proj.hostile && damage > 0) - { - if (proj.type == ProjectileID.BulletSnowman || proj.type == ProjectileID.BulletDeadeye || proj.type == ProjectileID.SniperBullet) - { - proj.hostile = false; - proj.friendly = true; - proj.velocity.X = -proj.velocity.X; - proj.velocity.Y = -proj.velocity.Y; - proj.damage *= 8; - } - } - if (daedalusReflect && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(3)) - { - int healAmt = damage / 5; - player.statLife += healAmt; - player.HealEffect(healAmt); - proj.hostile = false; - proj.friendly = true; - proj.velocity.X = -proj.velocity.X; - proj.velocity.Y = -proj.velocity.Y; - } + if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x)) + { + if (projRef && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(20)) + { + player.statLife += damage; + player.HealEffect(damage); + proj.hostile = false; + proj.friendly = true; + proj.velocity.X = -proj.velocity.X; + proj.velocity.Y = -proj.velocity.Y; + } + if (projRefRare && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(2)) + { + proj.hostile = false; + proj.friendly = true; + proj.velocity.X = -proj.velocity.X * 2f; + proj.velocity.Y = -proj.velocity.Y * 2f; + proj.damage *= 10; + projRefRareLifeRegenCounter = 120; + projTypeJustHitBy = proj.type; + } + if (aSparkRare && proj.active && !proj.friendly && proj.hostile && damage > 0) + { + if (proj.type == ProjectileID.BulletSnowman || proj.type == ProjectileID.BulletDeadeye || proj.type == ProjectileID.SniperBullet) + { + proj.hostile = false; + proj.friendly = true; + proj.velocity.X = -proj.velocity.X; + proj.velocity.Y = -proj.velocity.Y; + proj.damage *= 8; + } + } + if (daedalusReflect && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(3)) + { + int healAmt = damage / 5; + player.statLife += healAmt; + player.HealEffect(healAmt); + proj.hostile = false; + proj.friendly = true; + proj.velocity.X = -proj.velocity.X; + proj.velocity.Y = -proj.velocity.Y; + } + } } #endregion diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 0e224c85a1..558a5f6620 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -272,6 +272,10 @@ namespace CalamityMod.CalPlayer { modPlayer.alcoholPoisonLevel++; } + if (modPlayer.fabsolVodka) + { + modPlayer.alcoholPoisonLevel++; + } if (modPlayer.fireball) { modPlayer.alcoholPoisonLevel++; diff --git a/CalamityMod.cs b/CalamityMod.cs index c87a761cdd..cdb59203ce 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -654,7 +654,16 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), - ModContent.ProjectileType() + ModContent.ProjectileType(), + + //Some hostile boss projectiles + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() }; projectileMinionList = new List() diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index 70ad9a4f41..09d39e5921 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { DisplayName.SetDefault("Gael's Greatsword"); - Tooltip.SetDefault("Give me that thing, your dark soul\n" + + Tooltip.SetDefault("Hand it over, that thing. Your dark soul.\n" + "First swing fires homing skulls\n" + "Second swing fires a giant, powerful skull\n" + "Third swing deals massive damage\n" + diff --git a/World/Abyss.cs b/World/Abyss.cs index d7f899eec2..e63c4a6171 100644 --- a/World/Abyss.cs +++ b/World/Abyss.cs @@ -714,7 +714,7 @@ namespace CalamityMod.World #endregion #region Generating Chests - public const int CheckCutoffDistance = 35; + public const int CheckCutoffDistance = 15; public static void PlaceRustyChests() { // Ambiguity bullshit. @@ -759,40 +759,45 @@ namespace CalamityMod.World #endregion #region Misc Functions - public static List YStartBlacklist = new List() + public static List YStartWhitelist = new List() { - TileID.Cloud, - TileID.RainCloud, - TileID.SnowCloud, - TileID.Sunplate, - TileID.Tables, - TileID.Chairs, - TileID.ClosedDoor, - TileID.OpenDoor, - TileID.Banners, - TileID.Crimtane, - TileID.Demonite, - TileID.Containers + TileID.Sand, + TileID.Ebonsand, + TileID.Crimsand, + TileID.Grass, + TileID.CorruptGrass, + TileID.FleshGrass, + TileID.ClayBlock, + TileID.Mud, + TileID.Copper, + TileID.Tin, + TileID.Iron, + TileID.Lead, + TileID.Silver, + TileID.Tungsten, + TileID.Crimstone, + TileID.Ebonstone, + TileID.JungleGrass // Yes, this can happen on rare occasion }; public static void DetermineYStart() { - int maxHeight = int.MaxValue; - for (int i = 0; i < 15; i++) + int maxHeight = 0; + for (int i = 0; i < BiomeWidth; i++) { int xCheck = CalamityWorld.abyssSide ? BiomeWidth - i : Main.maxTilesX - BiomeWidth + i; - int YStart = 1; - while (!Main.tile[xCheck, YStart].active() || YStartBlacklist.Contains(Main.tile[xCheck, YStart].type)) + int YStart = (int)WorldGen.worldSurfaceLow - 20; // 30 tiles below the absolute lowest a floating island can spawn + while (!Main.tile[xCheck, YStart].active() || !YStartWhitelist.Contains(Main.tile[xCheck, YStart].type) || + Main.tile[xCheck, YStart].type == TileID.LivingWood || Main.tile[xCheck, YStart].type == TileID.LeafBlock) { YStart++; if (YStart > Main.rockLayer - 40) break; } - if (maxHeight > YStart) - maxHeight = YStart; + maxHeight += YStart; } - YStart = maxHeight; + YStart = maxHeight / BiomeWidth; } public static void GrowSaplingImmediately(int i, int j) {