added sulphurskin potion

This commit is contained in:
termigator1359 committed 2020-04-08 19:14:42 -04:00
1 parent 4246e1a41e
commit 9d4acefbfa
6 files changed
+102 -3

No files matched your search

+23
View File
@@ -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;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

+3
View File
@@ -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;
+26 -3
View File
@@ -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)
+50
View File
@@ -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<SulphurskinBuff>();
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<SulfuricScale>()); //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<BloodOrb>(), 10);
recipe.AddIngredient(ItemID.BottledWater);
recipe.AddTile(TileID.AlchemyTable);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B