From fb0c9c6aeb3f25cbff35134af2cc9ce3cbef1a5c Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 5 Oct 2019 21:47:07 -0400 Subject: [PATCH] royal gel fix, fall dmg, and more all wings set noFallDmg to true Deific amulet/rampart now count as jellyfish necklace and boost light in the abyss --- CalPlayer/CalamityPlayer.cs | 16 ++++++++++++++++ Items/Accessories/DeificAmulet.cs | 4 +++- Items/Accessories/RampartofDeities.cs | 4 +++- Items/Accessories/Wings/AureateWings.cs | 1 + Items/Accessories/Wings/CelestialTracers.cs | 1 + Items/Accessories/Wings/DiscordianWings.cs | 1 + Items/Accessories/Wings/DrewsWings.cs | 1 + Items/Accessories/Wings/ElysianTracers.cs | 1 + Items/Accessories/Wings/HadarianWings.cs | 1 + Items/Accessories/Wings/InfinityBoots.cs | 1 + Items/Accessories/Wings/SkylineWings.cs | 1 + Items/Accessories/Wings/StarlightWings.cs | 1 + Items/Accessories/Wings/TarragonWings.cs | 1 + Items/Accessories/Wings/XerocWings.cs | 1 + Items/CalamityGlobalItem.cs | 3 +++ NPCs/NormalNPCs/PlaguedJungleSlime.cs | 2 +- 16 files changed, 37 insertions(+), 3 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 7aec473fce..882182bbd0 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -288,6 +288,7 @@ namespace CalamityMod.CalPlayer public bool normalityRelocator = false; public bool fabledTortoise = false; public bool manaOverloader = false; + public bool royalGel = false; public bool sandWaifu = false; public bool sandBoobWaifu = false; public bool cloudWaifu = false; @@ -934,6 +935,7 @@ namespace CalamityMod.CalPlayer normalityRelocator = false; fabledTortoise = false; manaOverloader = false; + royalGel = false; lol = false; raiderTalisman = false; sGenerator = false; @@ -4449,6 +4451,20 @@ namespace CalamityMod.CalPlayer { player.lifeRegen /= 2; } + if (royalGel) + { + player.npcTypeNoAggro[mod.NPCType("AeroSlime")] = true; + player.npcTypeNoAggro[mod.NPCType("BloomSlime")] = true; + player.npcTypeNoAggro[mod.NPCType("CharredSlime")] = true; + player.npcTypeNoAggro[mod.NPCType("CrimulanBlightSlime")] = true; + player.npcTypeNoAggro[mod.NPCType("CryoSlime")] = true; + player.npcTypeNoAggro[mod.NPCType("EbonianBlightSlime")] = true; + player.npcTypeNoAggro[mod.NPCType("IrradiatedSlime")] = true; + player.npcTypeNoAggro[mod.NPCType("PerennialSlime")] = true; + player.npcTypeNoAggro[mod.NPCType("PlaguedJungleSlime")] = true; + player.npcTypeNoAggro[mod.NPCType("AstralSlime")] = true; + //player.npcTypeNoAggro[mod.NPCType("WulfrumSlime")] = true; + } #endregion #region LimitsAndOtherShit diff --git a/Items/Accessories/DeificAmulet.cs b/Items/Accessories/DeificAmulet.cs index a7a1756702..02fe367f2b 100644 --- a/Items/Accessories/DeificAmulet.cs +++ b/Items/Accessories/DeificAmulet.cs @@ -12,7 +12,8 @@ namespace CalamityMod.Items.Accessories DisplayName.SetDefault("Deific Amulet"); Tooltip.SetDefault("Taking damage makes you move very fast for a short time\n" + "Increases armor penetration by 10 and immune time after being struck\n" + - "Provides light underwater and causes stars to fall when damaged\n" + + "Provides light underwater and provides a small amount of light in the abyss\n" + + "Causes stars to fall when damaged\n" + "Reduces the cooldown of healing potions"); } @@ -29,6 +30,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.dAmulet = true; + modPlayer.jellyfishNecklace = true; } public override void AddRecipes() diff --git a/Items/Accessories/RampartofDeities.cs b/Items/Accessories/RampartofDeities.cs index b81ce1710a..803a56216e 100644 --- a/Items/Accessories/RampartofDeities.cs +++ b/Items/Accessories/RampartofDeities.cs @@ -11,7 +11,8 @@ namespace CalamityMod.Items.Accessories DisplayName.SetDefault("Rampart of Deities"); Tooltip.SetDefault("Taking damage makes you move very fast for a short time\n" + "Increases armor penetration by 20 and immune time after being struck\n" + - "Provides light underwater and causes stars to fall when damaged\n" + + "Provides light underwater and provides a small amount of light in the abyss\n" + + "Causes stars to fall when damaged\n" + "Absorbs 25% of damage done to players on your team\n" + "Only active above 25% life\n" + "Grants immunity to knockback and reduces the cooldown of healing potions\n" + @@ -34,6 +35,7 @@ namespace CalamityMod.Items.Accessories CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.dAmulet = true; modPlayer.rampartOfDeities = true; + modPlayer.jellyfishNecklace = true; } public override void AddRecipes() diff --git a/Items/Accessories/Wings/AureateWings.cs b/Items/Accessories/Wings/AureateWings.cs index c77641660d..f33f730d73 100644 --- a/Items/Accessories/Wings/AureateWings.cs +++ b/Items/Accessories/Wings/AureateWings.cs @@ -85,6 +85,7 @@ namespace CalamityMod.Items.Accessories.Wings } } player.wingTimeMax = 80; + player.noFallDmg = true; } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) diff --git a/Items/Accessories/Wings/CelestialTracers.cs b/Items/Accessories/Wings/CelestialTracers.cs index d29fee2b37..2b3298cd95 100644 --- a/Items/Accessories/Wings/CelestialTracers.cs +++ b/Items/Accessories/Wings/CelestialTracers.cs @@ -60,6 +60,7 @@ namespace CalamityMod.Items.Accessories.Wings player.fireWalk = true; player.lavaMax += 240; player.wingTimeMax = 280; + player.noFallDmg = true; modPlayer.IBoots = !hideVisual; modPlayer.elysianFire = !hideVisual; modPlayer.cTracers = true; diff --git a/Items/Accessories/Wings/DiscordianWings.cs b/Items/Accessories/Wings/DiscordianWings.cs index 0081b59f19..f2cf090454 100644 --- a/Items/Accessories/Wings/DiscordianWings.cs +++ b/Items/Accessories/Wings/DiscordianWings.cs @@ -47,6 +47,7 @@ namespace CalamityMod.Items.Accessories.Wings Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } player.wingTimeMax = 180; + player.noFallDmg = true; } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) diff --git a/Items/Accessories/Wings/DrewsWings.cs b/Items/Accessories/Wings/DrewsWings.cs index e089746bb0..be952ecc4e 100644 --- a/Items/Accessories/Wings/DrewsWings.cs +++ b/Items/Accessories/Wings/DrewsWings.cs @@ -46,6 +46,7 @@ namespace CalamityMod.Items.Accessories.Wings Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } player.wingTimeMax = 361; + player.noFallDmg = true; } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) diff --git a/Items/Accessories/Wings/ElysianTracers.cs b/Items/Accessories/Wings/ElysianTracers.cs index 805c76ae18..a95ff90a2e 100644 --- a/Items/Accessories/Wings/ElysianTracers.cs +++ b/Items/Accessories/Wings/ElysianTracers.cs @@ -60,6 +60,7 @@ namespace CalamityMod.Items.Accessories.Wings player.fireWalk = true; player.lavaMax += 240; player.wingTimeMax = 160; + player.noFallDmg = true; modPlayer.IBoots = !hideVisual; modPlayer.elysianFire = !hideVisual; modPlayer.eTracers = true; diff --git a/Items/Accessories/Wings/HadarianWings.cs b/Items/Accessories/Wings/HadarianWings.cs index db89e9b919..9418d33e38 100644 --- a/Items/Accessories/Wings/HadarianWings.cs +++ b/Items/Accessories/Wings/HadarianWings.cs @@ -60,6 +60,7 @@ namespace CalamityMod.Items.Accessories.Wings } } player.wingTimeMax = 120; + player.noFallDmg = true; } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) diff --git a/Items/Accessories/Wings/InfinityBoots.cs b/Items/Accessories/Wings/InfinityBoots.cs index 4cf4d4b6b7..032bfa5088 100644 --- a/Items/Accessories/Wings/InfinityBoots.cs +++ b/Items/Accessories/Wings/InfinityBoots.cs @@ -60,6 +60,7 @@ namespace CalamityMod.Items.Accessories.Wings player.fireWalk = true; player.lavaMax += 240; player.wingTimeMax = 120; + player.noFallDmg = true; modPlayer.IBoots = !hideVisual; modPlayer.sTracers = true; } diff --git a/Items/Accessories/Wings/SkylineWings.cs b/Items/Accessories/Wings/SkylineWings.cs index 6fcd18cc27..90f84c0094 100644 --- a/Items/Accessories/Wings/SkylineWings.cs +++ b/Items/Accessories/Wings/SkylineWings.cs @@ -28,6 +28,7 @@ namespace CalamityMod.Items.Accessories.Wings public override void UpdateAccessory(Player player, bool hideVisual) { player.wingTimeMax = 60; + player.noFallDmg = true; } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) diff --git a/Items/Accessories/Wings/StarlightWings.cs b/Items/Accessories/Wings/StarlightWings.cs index a69168f23c..2fe2601dbf 100644 --- a/Items/Accessories/Wings/StarlightWings.cs +++ b/Items/Accessories/Wings/StarlightWings.cs @@ -47,6 +47,7 @@ namespace CalamityMod.Items.Accessories.Wings Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } player.wingTimeMax = 150; + player.noFallDmg = true; } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) diff --git a/Items/Accessories/Wings/TarragonWings.cs b/Items/Accessories/Wings/TarragonWings.cs index ad79051b41..fb299ae16e 100644 --- a/Items/Accessories/Wings/TarragonWings.cs +++ b/Items/Accessories/Wings/TarragonWings.cs @@ -58,6 +58,7 @@ namespace CalamityMod.Items.Accessories.Wings Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } player.wingTimeMax = 210; + player.noFallDmg = true; } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) diff --git a/Items/Accessories/Wings/XerocWings.cs b/Items/Accessories/Wings/XerocWings.cs index ea60d86f16..d7afc9d418 100644 --- a/Items/Accessories/Wings/XerocWings.cs +++ b/Items/Accessories/Wings/XerocWings.cs @@ -47,6 +47,7 @@ namespace CalamityMod.Items.Accessories.Wings Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } player.wingTimeMax = 180; + player.noFallDmg = true; } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index cc38582561..0357739fbb 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1803,6 +1803,9 @@ namespace CalamityMod.Items if (item.type == ItemID.WormScarf) player.endurance -= 0.07f; + + if (item.type == ItemID.RoyalGel) + modPlayer.royalGel = true; if (item.type == ItemID.CelestialStone || item.type == ItemID.CelestialShell || (item.type == ItemID.MoonStone && !Main.dayTime) || (item.type == ItemID.SunStone && Main.dayTime)) diff --git a/NPCs/NormalNPCs/PlaguedJungleSlime.cs b/NPCs/NormalNPCs/PlaguedJungleSlime.cs index a47389000f..dc7bf82e6b 100644 --- a/NPCs/NormalNPCs/PlaguedJungleSlime.cs +++ b/NPCs/NormalNPCs/PlaguedJungleSlime.cs @@ -55,7 +55,7 @@ namespace CalamityMod.NPCs.NormalNPCs { spikeTimer -= 1f; } - if (!npc.wet) + if (!npc.wet && !Main.player[npc.target].GetCalamityPlayer().royalGel) { Vector2 vector3 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num14 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector3.X;