diff --git a/Buffs/Potions/SulphurskinBuff.cs b/Buffs/Potions/SulphurskinBuff.cs new file mode 100644 index 0000000000..ed59bef8eb --- /dev/null +++ b/Buffs/Potions/SulphurskinBuff.cs @@ -0,0 +1,23 @@ +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Potions +{ + public class SulphurskinBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Sulphurskin"); + Description.SetDefault("The sulphuric waters have a lesser effect on you"); + Main.debuff[Type] = false; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = false; + longerExpertDebuff = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.Calamity().sulphurskin = true; + } + } +} diff --git a/Buffs/Potions/SulphurskinBuff.png b/Buffs/Potions/SulphurskinBuff.png new file mode 100644 index 0000000000..616f7a9056 Binary files /dev/null and b/Buffs/Potions/SulphurskinBuff.png differ diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 742d5f02ab..8dd6a599c9 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -706,6 +706,7 @@ namespace CalamityMod.CalPlayer public bool draconicSurgeCooldown = false; public bool tesla = false; public bool teslaFreeze = false; + public bool sulphurskin = false; public bool baguette = false; public bool vodka = false; public bool redWine = false; @@ -1639,6 +1640,7 @@ namespace CalamityMod.CalPlayer draconicSurgeCooldown = false; tesla = false; teslaFreeze = false; + sulphurskin = false; baguette = false; trippy = false; amidiasBlessing = false; @@ -1955,6 +1957,7 @@ namespace CalamityMod.CalPlayer profanedRage = false; tesla = false; teslaFreeze = false; + sulphurskin = false; baguette = false; draconicSurge = false; draconicSurgeCooldown = false; diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index d7bdf851d5..9df5474feb 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -150,9 +150,24 @@ namespace CalamityMod.CalPlayer player.lifeRegen = 0; player.lifeRegenTime = 0; - int waterDivisor = modPlayer.sulfurSet ? 400 : 250; + int waterDivisor = 250; + int minimumRegenLost = 8; + if (modPlayer.sulfurSet && modPlayer.sulphurskin) + { + waterDivisor = 500; + minimumRegenLost = 1; + } + else if (modPlayer.sulfurSet) + { + waterDivisor = 400; + minimumRegenLost = 3; + } + else if (modPlayer.sulphurskin) + { + waterDivisor = 350; + minimumRegenLost = 2; + } int sulphurWater = modPlayer.pissWaterBoost / waterDivisor; - int minimumRegenLost = modPlayer.sulfurSet ? 4 : 8; if (sulphurWater < minimumRegenLost) sulphurWater = minimumRegenLost; lifeRegenLost += sulphurWater; @@ -166,7 +181,15 @@ namespace CalamityMod.CalPlayer player.lifeRegen = 0; player.lifeRegenTime = 0; - lifeRegenLost += modPlayer.sulfurSet ? 4 : 6; + lifeRegenLost += 6; + if (modPlayer.sulfurSet) + { + lifeRegenLost -= 2; + } + if (modPlayer.sulphurskin) + { + lifeRegenLost -= 2; + } } if (modPlayer.hFlames) diff --git a/Items/Potions/SulphurskinPotion.cs b/Items/Potions/SulphurskinPotion.cs new file mode 100644 index 0000000000..0db7d4313a --- /dev/null +++ b/Items/Potions/SulphurskinPotion.cs @@ -0,0 +1,50 @@ +using CalamityMod.Buffs.Potions; +using CalamityMod.Items.Materials; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Potions +{ + public class SulphurskinPotion : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sulphurskin Potion"); + Tooltip.SetDefault("Reduces the effects of the sulphuric waters"); + } + + public override void SetDefaults() + { + item.width = 28; + item.height = 18; + item.useTurn = true; + item.maxStack = 30; + item.rare = 3; + item.useAnimation = 17; + item.useTime = 17; + item.useStyle = 2; + item.UseSound = SoundID.Item3; + item.consumable = true; + item.buffType = ModContent.BuffType(); + item.buffTime = 7200; //2 minutes + item.value = Item.buyPrice(0, 2, 0, 0); + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType()); //possibly add herbs if added to sulph sea + recipe.AddIngredient(ItemID.BottledWater); + recipe.AddTile(TileID.Bottles); + recipe.SetResult(this); + recipe.AddRecipe(); + recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ItemID.BottledWater); + recipe.AddTile(TileID.AlchemyTable); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Potions/SulphurskinPotion.png b/Items/Potions/SulphurskinPotion.png new file mode 100644 index 0000000000..4e3572581f Binary files /dev/null and b/Items/Potions/SulphurskinPotion.png differ