Potion changes + localization

This commit is contained in:
Altixal committed 2024-10-26 20:36:59 +07:00
1 parent f669abb0dd
commit 7cd8a2300a
61 files changed
+407 -263

No files matched your search

+5 -1
View File
@@ -1,10 +1,14 @@
using Terraria;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class Trippy : ModBuff
{
public override LocalizedText Description => base.Description.WithFormatArgs(OddMushroom.DamageBoost.ToPercent());
public override void SetStaticDefaults()
{
Main.debuff[Type] = false;
+5 -1
View File
@@ -1,10 +1,14 @@
using Terraria;
using CalamityMod.Items.Potions;
using Terraria;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class CalciumBuff : ModBuff
{
public override LocalizedText Description => base.Description.WithFormatArgs(CalciumPotion.KnockbackResistance.ToPercent());
public override void SetStaticDefaults()
{
Main.debuff[Type] = false;
+5 -1
View File
@@ -1,10 +1,14 @@
using Terraria;
using CalamityMod.Items.Potions;
using Terraria;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class PhotosynthesisBuff : ModBuff
{
public override LocalizedText Description => base.Description.WithFormatArgs(PhotosynthesisPotion.IncreasedHeartHeal);
public override void SetStaticDefaults()
{
Main.debuff[Type] = false;
+5 -1
View File
@@ -1,10 +1,14 @@
using Terraria;
using CalamityMod.Items.Potions;
using Terraria;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class ShadowBuff : ModBuff
{
public override LocalizedText Description => base.Description.WithFormatArgs(ShadowPotion.StealthRegenBoost.ToPercent());
public override void SetStaticDefaults()
{
Main.debuff[Type] = false;
+5 -1
View File
@@ -1,10 +1,14 @@
using Terraria;
using CalamityMod.Items.Potions;
using Terraria;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class Soaring : ModBuff
{
public override LocalizedText Description => base.Description.WithFormatArgs(SoaringPotion.FlightBoost.ToPercent());
public override void SetStaticDefaults()
{
Main.debuff[Type] = false;
+8 -8
View File
@@ -29,6 +29,8 @@ using CalamityMod.Items.Dyes;
using CalamityMod.Items.Mounts;
using CalamityMod.Items.Mounts.Minecarts;
using CalamityMod.Items.PermanentBoosters;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.Items.TreasureBags.MiscGrabBags;
using CalamityMod.Items.VanillaArmorChanges;
using CalamityMod.Items.Weapons.DraedonsArsenal;
@@ -234,7 +236,6 @@ namespace CalamityMod.CalPlayer
public int profanedSoulWeaponType = 0;
public int hurtSoundTimer = 0;
public int danceOfLightCharge = 0;
public int shadowPotCooldown = 0;
public int dogTextCooldown = 0;
public float auralisStealthCounter = 0f;
public int auralisAuroraCounter = 0;
@@ -2398,7 +2399,6 @@ namespace CalamityMod.CalPlayer
planarSpeedBoost = 0;
galileoCooldown = 0;
soundCooldown = 0;
shadowPotCooldown = 0;
dogTextCooldown = 0;
auralisStealthCounter = 0f;
auralisAuroraCounter = 0;
@@ -3966,16 +3966,16 @@ namespace CalamityMod.CalPlayer
knockback.Flat += item.knockBack * ((1f - modStealth) * 0.5f);
if (whiskey)
knockback.Flat += item.knockBack * 0.2f;
knockback.Flat += item.knockBack * Whiskey.KnockbackBoost;
if (tequila && Main.dayTime)
knockback += item.knockBack * 0.1f;
knockback += item.knockBack * Tequila.KnockbackBoost;
if (tequilaSunrise && Main.dayTime)
knockback += item.knockBack * 0.2f;
knockback += item.knockBack * TequilaSunrise.KnockbackBoost;
if (moscowMule)
knockback += item.knockBack * 0.5f;
knockback += item.knockBack * MoscowMule.KnockbackBoost;
if (titanHeartMask && rogue)
knockback += item.knockBack * 0.05f;
@@ -4851,8 +4851,8 @@ namespace CalamityMod.CalPlayer
if (shadow)
{
stealthGenStandstill += 0.08f;
stealthGenMoving += 0.08f;
stealthGenStandstill += ShadowPotion.StealthRegenBoost;
stealthGenMoving += ShadowPotion.StealthRegenBoost;
}
if (eArtifact)
+7 -1
View File
@@ -20,6 +20,8 @@ using CalamityMod.Items.Armor.LunicCorps;
using CalamityMod.Items.Armor.Silva;
using CalamityMod.Items.Armor.Wulfrum;
using CalamityMod.Items.Mounts;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.Items.Tools;
using CalamityMod.Items.VanillaArmorChanges;
using CalamityMod.Items.Weapons.DraedonsArsenal;
@@ -627,7 +629,7 @@ namespace CalamityMod.CalPlayer
if (screwdriver)
{
if (proj.penetrate > 1 || proj.penetrate == -1)
modifiers.ScalingBonusDamage += 0.05f;
modifiers.ScalingBonusDamage += Screwdriver.PiercingDamageBuff;
}
// Calamity buffs Inferno Fork by 20%. This is multiplicative because it's supposed to be a buff to the weapon's base damage.
@@ -1663,6 +1665,10 @@ namespace CalamityMod.CalPlayer
#region Modify Hurt
public override void ModifyHurt(ref Player.HurtModifiers modifiers)
{
// Calcium Potion knockback reduction
if (calcium)
modifiers.Knockback *= (1f - CalciumPotion.KnockbackResistance);
// Handles energy shields and Boss Rush, in that order
modifiers.ModifyHurtInfo += ModifyHurtInfo_Calamity;
+25 -27
View File
@@ -6,6 +6,8 @@ using CalamityMod.Buffs.Placeables;
using CalamityMod.Cooldowns;
using CalamityMod.Enums;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.NPCs;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Typeless;
@@ -177,14 +179,12 @@ namespace CalamityMod.CalPlayer
if (vodka)
{
alcoholPoisonLevel++;
totalNegativeLifeRegen += 1;
totalNegativeLifeRegen += Vodka.RegenLoss;
}
if (redWine)
{
alcoholPoisonLevel++;
totalNegativeLifeRegen += 1;
if (baguette)
totalNegativeLifeRegen += 3;
totalNegativeLifeRegen += baguette ? Baguette.RedWineBuffedRegenLoss : RedWine.RegenLoss;
}
if (grapeBeer)
{
@@ -193,7 +193,7 @@ namespace CalamityMod.CalPlayer
if (moonshine)
{
alcoholPoisonLevel++;
totalNegativeLifeRegen += 1;
totalNegativeLifeRegen += Moonshine.RegenLoss;
}
if (rum)
{
@@ -206,7 +206,7 @@ namespace CalamityMod.CalPlayer
if (fireball)
{
alcoholPoisonLevel++;
totalNegativeLifeRegen += 1;
totalNegativeLifeRegen += Fireball.RegenLoss;
}
if (whiskey)
{
@@ -215,27 +215,27 @@ namespace CalamityMod.CalPlayer
if (everclear)
{
alcoholPoisonLevel += 2;
totalNegativeLifeRegen += 10;
totalNegativeLifeRegen += Everclear.RegenLoss;
}
if (bloodyMary)
{
alcoholPoisonLevel++;
totalNegativeLifeRegen += 4;
totalNegativeLifeRegen += BloodyMary.RegenLoss;
}
if (tequila)
{
alcoholPoisonLevel++;
totalNegativeLifeRegen += 1;
totalNegativeLifeRegen += Tequila.RegenLoss;
}
if (tequilaSunrise)
{
alcoholPoisonLevel++;
totalNegativeLifeRegen += 2;
totalNegativeLifeRegen += TequilaSunrise.RegenLoss;
}
if (screwdriver)
{
alcoholPoisonLevel++;
totalNegativeLifeRegen += 1;
totalNegativeLifeRegen += Screwdriver.RegenLoss;
}
if (caribbeanRum)
{
@@ -252,27 +252,27 @@ namespace CalamityMod.CalPlayer
if (margarita)
{
alcoholPoisonLevel++;
totalNegativeLifeRegen += 1;
totalNegativeLifeRegen += Margarita.RegenLoss;
}
if (starBeamRye)
{
alcoholPoisonLevel++;
totalNegativeLifeRegen += 2;
totalNegativeLifeRegen += StarBeamRye.RegenLoss;
}
if (moscowMule)
{
alcoholPoisonLevel++;
totalNegativeLifeRegen += 4;
totalNegativeLifeRegen += MoscowMule.RegenLoss;
}
if (whiteWine)
{
alcoholPoisonLevel++;
totalNegativeLifeRegen += 1;
totalNegativeLifeRegen += WhiteWine.RegenLoss;
}
if (evergreenGin)
{
alcoholPoisonLevel++;
totalNegativeLifeRegen += 1;
totalNegativeLifeRegen += EvergreenGin.RegenLoss;
}
if (Player.tipsy)
{
@@ -615,10 +615,10 @@ namespace CalamityMod.CalPlayer
public override void UpdateLifeRegen()
{
if (rum)
Player.lifeRegen += 2;
Player.lifeRegen += Rum.RegenBoost;
if (caribbeanRum)
Player.lifeRegen += 2;
Player.lifeRegen += CaribbeanRum.RegenBoost;
if (aChicken)
Player.lifeRegen += 1;
@@ -769,8 +769,7 @@ namespace CalamityMod.CalPlayer
if (!Player.shinyStone && Player.StandingStill() && Player.velocity.Y == 0 && Player.itemAnimation == 0)
{
bool honeyDewWorking = honeyTurboRegen && Player.honeyWet;
bool anyStandingStillLifeRegen = shadeRegen || cFreeze || honeyDewWorking || photosynthesis || aAmpoule || purity;
bool onlyPhotosynthesisAtNight = !shadeRegen && !cFreeze && !honeyDewWorking && photosynthesis && !Main.dayTime;
bool anyStandingStillLifeRegen = shadeRegen || cFreeze || honeyDewWorking || aAmpoule || purity;
// Divides all negative life regen by two before applying any other effects.
if (anyStandingStillLifeRegen && Player.lifeRegen < 0)
@@ -779,7 +778,7 @@ namespace CalamityMod.CalPlayer
// Spawn dust of some flavor while actually regenerating, aAmpule and purity have a slightly different looking style
if (Player.lifeRegen > 0 && Player.statLife < actualMaxLife)
{
int dustType = shadeRegen ? 173 : cFreeze ? 67 : honeyDewWorking ? DustID.Honey2 : photosynthesis ? 244 : aAmpoule ? 228 : purity ? 187 : -1;
int dustType = shadeRegen ? 173 : cFreeze ? 67 : honeyDewWorking ? DustID.Honey2 : aAmpoule ? 228 : purity ? 187 : -1;
bool dustSpawnRolled = Main.rand.Next(30000) < Player.lifeRegenTime || purity ? Main.rand.NextBool() : aAmpoule ? Main.rand.NextBool(4) : Main.rand.NextBool(30);
if (dustType != -1 && dustSpawnRolled)
{
@@ -795,16 +794,15 @@ namespace CalamityMod.CalPlayer
}
// Actually apply "standing still" regeneration (the stats are granted even at full health)
float regenTimeNeededForTurboRegen = shadeRegen ? 40f : cFreeze ? 60f : honeyDewWorking ? 90f : photosynthesis ? 90f : aAmpoule ? 90f : purity ? 60f : -1f;
float regenTimeNeededForTurboRegen = shadeRegen ? 40f : cFreeze ? 60f : honeyDewWorking ? 90f : aAmpoule ? 90f : purity ? 60f : -1f;
// 4 = vanilla Shiny Stone
int turboRegenPower = shadeRegen || cFreeze || purity ? 4 : honeyDewWorking || aAmpoule ? 3 : photosynthesis ? 1 : -1;
int turboRegenPower = shadeRegen || cFreeze || purity ? 4 : honeyDewWorking || aAmpoule ? 3 : -1;
if (turboRegenPower > 0)
{
// After a brief delay determined by your form of standing still regen, min-cap life regen time at 1800 / 3600.
// Photosynthesis Potion does not do this at night.
if (Player.lifeRegenTime > regenTimeNeededForTurboRegen && Player.lifeRegenTime < 1800f && !onlyPhotosynthesisAtNight)
if (Player.lifeRegenTime > regenTimeNeededForTurboRegen && Player.lifeRegenTime < 1800f)
Player.lifeRegenTime = 1800f;
Player.lifeRegen += turboRegenPower;
@@ -841,9 +839,9 @@ namespace CalamityMod.CalPlayer
if (Player.statLife < actualMaxLife)
{
// The soft cap doesn't apply if the player is not moving and not using a weapon while having any of the following:
// Shiny Stone, Cosmic Freeze buff from the Cosmic Discharge, Demonshade Armor, Photosynthesis Potion buff or The Camper.
// Shiny Stone, Cosmic Freeze buff from the Cosmic Discharge, Demonshade Armor, or The Camper.
int baseLifeRegenBoost = 4;
bool noLifeRegenCap = (Player.shinyStone || cFreeze || shadeRegen || photosynthesis || camper) &&
bool noLifeRegenCap = (Player.shinyStone || cFreeze || shadeRegen || camper) &&
Player.StandingStill() && Player.itemAnimation == 0;
if (!noLifeRegenCap)
+35 -42
View File
@@ -1582,8 +1582,6 @@ namespace CalamityMod.CalPlayer
dragonRageCooldown--;
if (soundCooldown > 0)
soundCooldown--;
if (shadowPotCooldown > 0)
shadowPotCooldown--;
if (raiderCritLifespan > 0f)
raiderCritLifespan--;
if (raiderSoundCooldown > 0)
@@ -2138,10 +2136,6 @@ namespace CalamityMod.CalPlayer
}
}
// Calcium Potion buff
if (calcium)
Player.noFallDmg = true;
// Ceaseless Hunger Potion buff
if (ceaselessHunger)
{
@@ -2824,7 +2818,7 @@ namespace CalamityMod.CalPlayer
if (astralInjection)
{
if (Player.statMana < Player.statManaMax2)
Player.statMana += 2;
Player.statMana += AstralInjection.ManaPerFrame;
if (Player.statMana > Player.statManaMax2)
Player.statMana = Player.statManaMax2;
}
@@ -2980,38 +2974,38 @@ namespace CalamityMod.CalPlayer
Player.moveSpeed -= 0.2f;
if (fabsolVodka)
Player.GetDamage<GenericDamageClass>() += 0.08f;
Player.GetDamage<GenericDamageClass>() += FabsolsVodka.DamageBoost;
if (vodka)
{
Player.GetDamage<GenericDamageClass>() += 0.06f;
Player.GetDamage<GenericDamageClass>() += Vodka.DamageBoost;
Player.GetCritChance<GenericDamageClass>() += Vodka.CritBoost;
}
if (moonshine)
{
Player.statDefense += 10;
Player.endurance += 0.03f;
Player.statDefense += Moonshine.DefenseBoost;
Player.endurance += Moonshine.DamageReductionBoost;
}
if (rum)
Player.moveSpeed += 0.1f;
Player.moveSpeed += Rum.MoveSpeedBoost;
if (whiskey)
{
Player.GetDamage<GenericDamageClass>() += 0.04f;
Player.GetDamage<GenericDamageClass>() += Whiskey.DamageBoost;
Player.GetCritChance<GenericDamageClass>() += Whiskey.CritBoost;
}
if (everclear)
Player.GetDamage<GenericDamageClass>() += 0.25f;
Player.GetDamage<GenericDamageClass>() += Everclear.DamageBoost;
if (bloodyMary)
{
if (Main.bloodMoon)
{
Player.GetDamage<GenericDamageClass>() += 0.1f;
Player.moveSpeed += 0.1f;
Player.GetDamage<GenericDamageClass>() += BloodyMary.DamageMovementBoost;
Player.moveSpeed += BloodyMary.DamageMovementBoost;
}
}
@@ -3019,7 +3013,7 @@ namespace CalamityMod.CalPlayer
{
if (Main.dayTime)
{
Player.statDefense += 5;
Player.statDefense += Tequila.DefenseBoost;
Player.GetCritChance<GenericDamageClass>() += Tequila.CritBoost;
}
}
@@ -3028,13 +3022,13 @@ namespace CalamityMod.CalPlayer
{
if (Main.dayTime)
{
Player.statDefense += 10;
Player.statDefense += TequilaSunrise.DefenseBoost;
Player.GetCritChance<GenericDamageClass>() += TequilaSunrise.CritBoost;
}
}
if (caribbeanRum)
Player.moveSpeed += 0.1f;
Player.moveSpeed += CaribbeanRum.MoveSpeedBoost;
if (cinnamonRoll)
{
@@ -3044,19 +3038,19 @@ namespace CalamityMod.CalPlayer
if (starBeamRye)
{
Player.GetDamage<MagicDamageClass>() += 0.08f;
Player.manaCost *= 0.9f;
Player.statManaMax2 += 50;
Player.GetDamage<MagicDamageClass>() += StarBeamRye.MagicDamageBoost;
Player.manaCost *= (1f - StarBeamRye.ManaCostReduction);
Player.statManaMax2 += StarBeamRye.MaxManaBoost;
}
if (moscowMule)
{
Player.GetDamage<GenericDamageClass>() += 0.09f;
Player.GetDamage<GenericDamageClass>() += MoscowMule.DamageBoost;
Player.GetCritChance<GenericDamageClass>() += MoscowMule.CritBoost;
}
if (whiteWine)
Player.GetDamage<MagicDamageClass>() += 0.08f;
Player.GetDamage<MagicDamageClass>() += WhiteWine.MagicDamageBoost;
// Adjustment to the Tipsy debuff
if (Player.tipsy)
@@ -3113,7 +3107,7 @@ namespace CalamityMod.CalPlayer
(reaverSpeed ? 0.1 : 0D) +
(angelTreads ? 0.1 : 0D) +
(blueCandle ? CirrusBlueCandleBuff.WingTimeBoost : 0D) +
(soaring ? 0.1 : 0D) +
(soaring ? SoaringPotion.FlightBoost : 0D) +
(prismaticGreaves ? 0.1 : 0D) +
(plagueReaper ? 0.05 : 0D) +
(ascendantInsignia ? 0.05 : 0D) + // Added to soaring insignia's flight to get 30%
@@ -3169,9 +3163,8 @@ namespace CalamityMod.CalPlayer
if (bounding)
{
Player.jumpSpeedBoost += 0.25f;
Player.jumpHeight += 10;
Player.extraFall += 25;
Player.jumpSpeedBoost += BoundingPotion.JumpSpeedBoost;
Player.jumpHeight += (int)(BoundingPotion.JumpHeightPercentBoost * 15);
}
if (mushy)
@@ -3513,7 +3506,7 @@ namespace CalamityMod.CalPlayer
Player.GetDamage<GenericDamageClass>() *= 1.2f;
if (trippy)
Player.GetDamage<GenericDamageClass>() += 0.5f;
Player.GetDamage<GenericDamageClass>() += OddMushroom.DamageBoost;
if (eArtifact)
{
@@ -4263,37 +4256,37 @@ namespace CalamityMod.CalPlayer
if (fabsolVodka)
{
if (Player.statDefense > 0)
Player.statDefense -= (int)(Player.statDefense * 0.05);
Player.statDefense -= (int)(Player.statDefense * FabsolsVodka.DefenseLossPercent);
}
if (vodka)
{
if (Player.statDefense > 0)
Player.statDefense -= (int)(Player.statDefense * 0.05);
Player.statDefense -= (int)(Player.statDefense * Vodka.DefenseLossPercent);
}
if (grapeBeer)
{
if (Player.statDefense > 0)
Player.statDefense -= (int)(Player.statDefense * 0.03);
Player.statDefense -= (int)(Player.statDefense * GrapeBeer.DefenseLossPercent);
}
if (rum)
{
if (Player.statDefense > 0)
Player.statDefense -= (int)(Player.statDefense * 0.05);
Player.statDefense -= (int)(Player.statDefense * Rum.DefenseLossPercent);
}
if (whiskey)
{
if (Player.statDefense > 0)
Player.statDefense -= (int)(Player.statDefense * 0.05);
Player.statDefense -= (int)(Player.statDefense * Whiskey.DefenseLossPercent);
}
if (everclear)
{
if (Player.statDefense > 0)
Player.statDefense -= (int)(Player.statDefense * 0.3);
Player.statDefense -= (int)(Player.statDefense * Everclear.DefenseLossPercent);
}
if (bloodyMary)
@@ -4301,38 +4294,38 @@ namespace CalamityMod.CalPlayer
if (Main.bloodMoon)
{
if (Player.statDefense > 0)
Player.statDefense -= (int)(Player.statDefense * 0.04);
Player.statDefense -= (int)(Player.statDefense * BloodyMary.DefenseLossPercent);
}
}
if (caribbeanRum)
{
if (Player.statDefense > 0)
Player.statDefense -= (int)(Player.statDefense * 0.1);
Player.statDefense -= (int)(Player.statDefense * CaribbeanRum.DefenseLossPercent);
}
if (cinnamonRoll)
{
if (Player.statDefense > 0)
Player.statDefense -= (int)(Player.statDefense * 0.1);
Player.statDefense -= (int)(Player.statDefense * CinnamonRoll.DefenseLossPercent);
}
if (margarita)
{
if (Player.statDefense > 0)
Player.statDefense -= (int)(Player.statDefense * 0.06);
Player.statDefense -= (int)(Player.statDefense * Margarita.DefenseLossPercent);
}
if (starBeamRye)
{
if (Player.statDefense > 0)
Player.statDefense -= (int)(Player.statDefense * 0.06);
Player.statDefense -= (int)(Player.statDefense * StarBeamRye.DefenseLossPercent);
}
if (whiteWine)
{
if (Player.statDefense > 0)
Player.statDefense -= (int)(Player.statDefense * 0.06);
Player.statDefense -= (int)(Player.statDefense * WhiteWine.DefenseLossPercent);
}
if (Player.tipsy)
@@ -4607,7 +4600,7 @@ namespace CalamityMod.CalPlayer
if (item.type == ModContent.ItemType<HadalStew>())
CalamityUtils.ConsumeItemViaQuickBuff(Player, item, HadalStew.BuffType, HadalStew.BuffDuration, true);
if (item.type == ModContent.ItemType<Margarita>())
CalamityUtils.ConsumeItemViaQuickBuff(Player, item, Margarita.BuffType, Margarita.BuffDuration, false);
CalamityUtils.ConsumeItemViaQuickBuff(Player, item, Margarita.BuffType, CalamityUtils.MinutesToFrames(Margarita.MinuteDuration), false);
}
}
}
-39
View File
@@ -524,21 +524,6 @@ namespace CalamityMod.CalPlayer
Projectile.NewProjectile(source, position, Vector2.Zero, ProjectileType<ChaoticGeyser>(), geyserDamage, 2f, Player.whoAmI, 0f, 0f);
}
if (soaring && !targetIsDummy)
{
double useTimeMultiplier = 0.85 + (item.useTime * item.useAnimation / 3600D); //28 * 28 = 784 is average so that equals 784 / 3600 = 0.217777 + 1 = 21.7% boost
double wingTimeFraction = Player.wingTimeMax / 20D;
// TODO -- this scaling function is probably totally screwed. What is it supposed to do?
double meleeStatMultiplier = (double)(Player.GetTotalDamage<MeleeDamageClass>().Additive * (float)(Player.GetTotalCritChance<MeleeDamageClass>() / 10f));
if (Player.wingTime < Player.wingTimeMax)
Player.wingTime += (int)(useTimeMultiplier * (wingTimeFraction + meleeStatMultiplier));
if (Player.wingTime > Player.wingTimeMax)
Player.wingTime = Player.wingTimeMax;
}
if (bloodflareMelee && item.CountsAsClass<MeleeDamageClass>() && bloodflareMeleeHits < 15 && !bloodflareFrenzy && !Player.HasCooldown(BloodflareFrenzy.ID))
bloodflareMeleeHits++;
}
@@ -643,20 +628,6 @@ namespace CalamityMod.CalPlayer
if (proj.IsTrueMelee())
{
if (soaring && !targetIsDummy)
{
double useTimeMultiplier = 0.85 + (heldItem.useTime * heldItem.useAnimation / 3600D); //28 * 28 = 784 is average so that equals 784 / 3600 = 0.217777 + 1 = 21.7% boost
double wingTimeFraction = Player.wingTimeMax / 20D;
// TODO -- this scaling function is probably totally screwed. What is it supposed to do?
double meleeStatMultiplier = (double)(Player.GetTotalDamage<MeleeDamageClass>().Additive * (float)(Player.GetTotalCritChance<MeleeDamageClass>() / 10f));
if (Player.wingTime < Player.wingTimeMax)
Player.wingTime += (int)(useTimeMultiplier * (wingTimeFraction + meleeStatMultiplier));
if (Player.wingTime > Player.wingTimeMax)
Player.wingTime = Player.wingTimeMax;
}
if (hideOfDeus && hideOfDeusTimer == 0)
{
hideOfDeusTimer = 10;
@@ -1061,16 +1032,6 @@ namespace CalamityMod.CalPlayer
}
}
if (shadow && shadowPotCooldown <= 0 && modProj.stealthStrikeHitCount < 3)
{
int randrot = Main.rand.Next(-30, 391);
Vector2 SoulSpeed = new Vector2(13f, 13f).RotatedBy(MathHelper.ToRadians(randrot));
int soul = Projectile.NewProjectile(spawnSource, proj.Center, SoulSpeed, ProjectileType<PenumbraSoul>(), (int)(proj.damage * 0.1), 3f, proj.owner, 0f, 0f);
if (soul.WithinBounds(Main.maxProjectiles))
Main.projectile[soul].DamageType = DamageClass.Generic;
shadowPotCooldown = 30;
}
if (raiderTalisman && modProj.stealthStrike)
{
raiderCritLifespan = CalamityUtils.SecondsToFrames(RaidersTalisman.RaiderCooldown);
+3 -2
View File
@@ -7,6 +7,7 @@ using CalamityMod.CalPlayer;
using CalamityMod.Enums;
using CalamityMod.Events;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.Items.VanillaArmorChanges;
using CalamityMod.Items.Weapons.Magic;
@@ -598,7 +599,7 @@ namespace CalamityMod.Items
bool boostedHeart = player.Calamity().photosynthesis;
if (boostedHeart)
{
player.HealPlayer(5);
player.HealPlayer(PhotosynthesisPotion.IncreasedHeartHeal);
}
}
return true;
@@ -1474,7 +1475,7 @@ namespace CalamityMod.Items
float moveSpeedBoost = modPlayer.moveSpeedBonus * 0.1f;
float flightSpeedMult = 1f +
(modPlayer.soaring ? 0.1f : 0f) +
(modPlayer.soaring ? SoaringPotion.FlightBoost : 0f) +
(modPlayer.reaverSpeed ? 0.1f : 0f) +
moveSpeedBoost;
+4 -4
View File
@@ -764,16 +764,16 @@ namespace CalamityMod.Items
// Frog Leg and all upgrades get clear explanations of what they actually do.
if (item.type == ItemID.FrogLeg)
EditTooltipByNum(0, (line) => line.Text = GetEditedTooltip("FrogLeg").Format((int)(BalancingConstants.VanillaFrogLegJumpSpeedBoost * 20f)));
EditTooltipByNum(0, (line) => line.Text = GetEditedTooltip("FrogLeg").Format(BalancingConstants.VanillaFrogLegJumpSpeedBoost.ToJumpSpeedPercent()));
if (item.type == ItemID.FrogFlipper || item.type == ItemID.FrogWebbing)
EditTooltipByNum(1, (line) => line.Text = GetEditedTooltip("FrogLeg").Format((int)(BalancingConstants.VanillaFrogLegJumpSpeedBoost * 20f)));
EditTooltipByNum(1, (line) => line.Text = GetEditedTooltip("FrogLeg").Format(BalancingConstants.VanillaFrogLegJumpSpeedBoost.ToJumpSpeedPercent()));
if (item.type == ItemID.FrogGear)
EditTooltipByNum(2, (line) => line.Text = GetEditedTooltip("FrogLeg").Format((int)(BalancingConstants.VanillaFrogLegJumpSpeedBoost * 20f)));
EditTooltipByNum(2, (line) => line.Text = GetEditedTooltip("FrogLeg").Format(BalancingConstants.VanillaFrogLegJumpSpeedBoost.ToJumpSpeedPercent()));
if (item.type == ItemID.AmphibianBoots)
EditTooltipByNum(1, (line) => line.Text = GetEditedTooltip("FrogLeg").Format((int)(BalancingConstants.AmphibianBootsJumpSpeedBoost * 20f)));
EditTooltipByNum(1, (line) => line.Text = GetEditedTooltip("FrogLeg").Format(BalancingConstants.AmphibianBootsJumpSpeedBoost.ToJumpSpeedPercent()));
// Soaring Insignia nerf and clear explanation of what it actually does.
if (item.type == ItemID.EmpressFlightBooster)
+8 -1
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,6 +10,12 @@ namespace CalamityMod.Items.Potions.Alcohol
public class BloodyMary : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static float DamageMovementBoost = 0.1f;
public static int RegenLoss = 4;
public static float DefenseLossPercent = 0.04f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageMovementBoost.ToPercent(), RegenLoss.ToRegenPerSecond(), DefenseLossPercent.ToPercent());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -21,7 +28,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(20, 32, ModContent.BuffType<BloodyMaryBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(20, 32, ModContent.BuffType<BloodyMaryBuff>(), CalamityUtils.MinutesToFrames(8), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(silver: 80);
Item.rare = ItemRarityID.Lime;
+8 -1
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,6 +10,12 @@ namespace CalamityMod.Items.Potions.Alcohol
public class CaribbeanRum : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static int RegenBoost = 2;
public static float MoveSpeedBoost = 0.1f;
public static float DefenseLossPercent = 0.1f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RegenBoost.ToRegenPerSecond(), MoveSpeedBoost.ToPercent(), DefenseLossPercent.ToPercent());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -22,7 +29,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(14, 32, ModContent.BuffType<CaribbeanRumBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(14, 32, ModContent.BuffType<CaribbeanRumBuff>(), CalamityUtils.MinutesToFrames(8), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(silver: 60);
Item.rare = ItemRarityID.Lime;
+7 -1
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,6 +10,11 @@ namespace CalamityMod.Items.Potions.Alcohol
public class CinnamonRoll : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static float HeatDebuffBoost = 0.5f;
public static float DefenseLossPercent = 0.1f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((1f + HeatDebuffBoost).ToString(), DefenseLossPercent.ToPercent());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -21,7 +27,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(18, 32, ModContent.BuffType<CinnamonRollBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(18, 32, ModContent.BuffType<CinnamonRollBuff>(), CalamityUtils.MinutesToFrames(8), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(gold: 1);
Item.rare = ItemRarityID.Yellow;
+8 -1
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,6 +10,12 @@ namespace CalamityMod.Items.Potions.Alcohol
public class Everclear : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static float DamageBoost = 0.25f;
public static int RegenLoss = 10;
public static float DefenseLossPercent = 0.30f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), RegenLoss.ToRegenPerSecond(), DefenseLossPercent.ToPercent());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -21,7 +28,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(14, 42, ModContent.BuffType<EverclearBuff>(), CalamityUtils.SecondsToFrames(60f), true);
Item.DefaultToFood(14, 42, ModContent.BuffType<EverclearBuff>(), CalamityUtils.MinutesToFrames(1), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(silver: 80);
Item.rare = ItemRarityID.Lime;
+7 -1
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,6 +10,11 @@ namespace CalamityMod.Items.Potions.Alcohol
public class EvergreenGin : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static float SicknessWaterDebuffBoost = 0.25f;
public static int RegenLoss = 1;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((1f + SicknessWaterDebuffBoost).ToString(), RegenLoss.ToRegenPerSecond());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -22,7 +28,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(18, 32, ModContent.BuffType<EvergreenGinBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(18, 32, ModContent.BuffType<EvergreenGinBuff>(), CalamityUtils.MinutesToFrames(8), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(silver: 60);
Item.rare = ItemRarityID.Lime;
+6 -1
View File
@@ -4,6 +4,7 @@ using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -12,6 +13,10 @@ namespace CalamityMod.Items.Potions.Alcohol
{
public new string LocalizationCategory => "Items.Potions";
public static float DamageBoost = 0.08f;
public static float DefenseLossPercent = 0.05f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), DefenseLossPercent.ToPercent());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -25,7 +30,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(30, 42, ModContent.BuffType<FabsolVodkaBuff>(), CalamityUtils.SecondsToFrames(900f), true);
Item.DefaultToFood(30, 42, ModContent.BuffType<FabsolVodkaBuff>(), CalamityUtils.MinutesToFrames(15), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(silver: 30);
Item.rare = ItemRarityID.LightRed;
+7 -1
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,6 +10,11 @@ namespace CalamityMod.Items.Potions.Alcohol
public class Fireball : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static float HeatDebuffBoost = 0.25f;
public static int RegenLoss = 1;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((1f + HeatDebuffBoost).ToString(), RegenLoss.ToRegenPerSecond());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -21,7 +27,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(16, 38, ModContent.BuffType<FireballBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(16, 38, ModContent.BuffType<FireballBuff>(), CalamityUtils.MinutesToFrames(8), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(silver: 30);
Item.rare = ItemRarityID.LightRed;
+7 -1
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,6 +10,11 @@ namespace CalamityMod.Items.Potions.Alcohol
public class GrapeBeer : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static float DefenseLossPercent = 0.03f;
public static int SecondDuration = 15;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DefenseLossPercent.ToPercent(), SecondDuration);
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -29,7 +35,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void OnConsumeItem(Player player)
{
player.AddBuff(ModContent.BuffType<GrapeBeerBuff>(), 900);
player.AddBuff(ModContent.BuffType<GrapeBeerBuff>(), CalamityUtils.SecondsToFrames(SecondDuration));
}
}
}
+7 -2
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,8 +10,12 @@ namespace CalamityMod.Items.Potions.Alcohol
public class Margarita : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static int BuffType = ModContent.BuffType<MargaritaBuff>();
public static int BuffDuration = 10800;
public static float DefenseLossPercent = 0.06f;
public static int RegenLoss = 1;
public static int MinuteDuration = 3;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DefenseLossPercent.ToPercent(), RegenLoss.ToRegenPerSecond(), MinuteDuration);
public override void SetStaticDefaults()
{
@@ -32,7 +37,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void OnConsumeItem(Player player)
{
player.AddBuff(BuffType, BuffDuration);
player.AddBuff(BuffType, CalamityUtils.MinutesToFrames(MinuteDuration));
}
}
}
+8 -1
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,6 +10,12 @@ namespace CalamityMod.Items.Potions.Alcohol
public class Moonshine : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static int DefenseBoost = 10;
public static float DamageReductionBoost = 0.03f;
public static int RegenLoss = 1;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DefenseBoost, DamageReductionBoost.ToPercent(), RegenLoss.ToRegenPerSecond());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -22,7 +29,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(24, 28, ModContent.BuffType<MoonshineBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(24, 28, ModContent.BuffType<MoonshineBuff>(), CalamityUtils.MinutesToFrames(8), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(gold: 1);
Item.rare = ItemRarityID.Yellow;
+8 -2
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,7 +10,12 @@ namespace CalamityMod.Items.Potions.Alcohol
public class MoscowMule : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
internal static readonly int CritBoost = 3;
public static float DamageBoost = 0.09f;
public static float KnockbackBoost = 0.5f;
public static int CritBoost = 3;
public static int RegenLoss = 4;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), KnockbackBoost.ToPercent(), CritBoost, RegenLoss.ToRegenPerSecond());
public override void SetStaticDefaults()
{
@@ -24,7 +30,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(32, 32, ModContent.BuffType<MoscowMuleBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(32, 32, ModContent.BuffType<MoscowMuleBuff>(), CalamityUtils.MinutesToFrames(8), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(gold: 1);
Item.rare = ItemRarityID.Yellow;
+4 -1
View File
@@ -9,6 +9,9 @@ namespace CalamityMod.Items.Potions.Alcohol
public class OddMushroom : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static float DamageBoost = 0.5f;
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -21,7 +24,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(38, 50, ModContent.BuffType<Trippy>(), CalamityUtils.SecondsToFrames(3600f));
Item.DefaultToFood(38, 50, ModContent.BuffType<Trippy>(), CalamityUtils.MinutesToFrames(60));
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(gold: 10);
Item.rare = ItemRarityID.LightRed;
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(30, 38, ModContent.BuffType<OldFashionedBuff>(), CalamityUtils.SecondsToFrames(360f), true);
Item.DefaultToFood(30, 38, ModContent.BuffType<OldFashionedBuff>(), CalamityUtils.MinutesToFrames(6), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(silver: 60);
Item.rare = ItemRarityID.Lime;
+10 -3
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,6 +10,12 @@ namespace CalamityMod.Items.Potions.Alcohol
public class RedWine : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static int HealValue = 200;
public static int RegenLoss = 1;
public static int SecondDuration = 15;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RegenLoss.ToRegenPerSecond(), SecondDuration);
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -21,7 +28,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToHealingPotion(14, 48, 200);
Item.DefaultToHealingPotion(14, 48, HealValue);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(silver: 30);
Item.rare = ItemRarityID.LightRed;
@@ -29,12 +36,12 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void GetHealLife(Player player, bool quickHeal, ref int healValue)
{
healValue = player.Calamity().baguette ? 250 : 200;
healValue = player.Calamity().baguette ? Baguette.RedWineBuffedHealValue : HealValue;
}
public override void OnConsumeItem(Player player)
{
player.AddBuff(ModContent.BuffType<RedWineBuff>(), 900);
player.AddBuff(ModContent.BuffType<RedWineBuff>(), CalamityUtils.SecondsToFrames(SecondDuration));
}
}
}
+8 -1
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,6 +10,12 @@ namespace CalamityMod.Items.Potions.Alcohol
public class Rum : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static int RegenBoost = 2;
public static float MoveSpeedBoost = 0.1f;
public static float DefenseLossPercent = 0.05f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RegenBoost.ToRegenPerSecond(), MoveSpeedBoost.ToPercent(), DefenseLossPercent.ToPercent());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -21,7 +28,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(24, 26, ModContent.BuffType<RumBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(24, 26, ModContent.BuffType<RumBuff>(), CalamityUtils.MinutesToFrames(8), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(silver: 30);
Item.rare = ItemRarityID.LightRed;
+7 -1
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,6 +10,11 @@ namespace CalamityMod.Items.Potions.Alcohol
public class Screwdriver : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static float PiercingDamageBuff = 0.05f;
public static int RegenLoss = 1;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((1f + PiercingDamageBuff).ToString(), RegenLoss.ToRegenPerSecond());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -21,7 +27,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(14, 28, ModContent.BuffType<ScrewdriverBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(14, 28, ModContent.BuffType<ScrewdriverBuff>(), CalamityUtils.MinutesToFrames(8), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(silver: 40);
Item.rare = ItemRarityID.LightPurple;
+10 -1
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,6 +10,14 @@ namespace CalamityMod.Items.Potions.Alcohol
public class StarBeamRye : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static int MaxManaBoost = 50;
public static float MagicDamageBoost = 0.08f;
public static float ManaCostReduction = 0.1f;
public static float DefenseLossPercent = 0.06f;
public static int RegenLoss = 2;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxManaBoost, MagicDamageBoost.ToPercent(), ManaCostReduction.ToPercent(), DefenseLossPercent.ToPercent(), RegenLoss.ToRegenPerSecond());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -22,7 +31,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(20, 34, ModContent.BuffType<StarBeamRyeBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(20, 34, ModContent.BuffType<StarBeamRyeBuff>(), CalamityUtils.MinutesToFrames(8), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(silver: 80);
Item.rare = ItemRarityID.Lime;
+8 -2
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,7 +10,12 @@ namespace CalamityMod.Items.Potions.Alcohol
public class Tequila : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
internal static readonly int CritBoost = 4;
public static float KnockbackBoost = 0.1f;
public static int CritBoost = 4;
public static int DefenseBoost = 5;
public static int RegenLoss = 1;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(KnockbackBoost.ToPercent(), CritBoost, DefenseBoost, RegenLoss.ToRegenPerSecond());
public override void SetStaticDefaults()
{
@@ -23,7 +29,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(16, 34, ModContent.BuffType<TequilaBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(16, 34, ModContent.BuffType<TequilaBuff>(), CalamityUtils.MinutesToFrames(8), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(silver: 30);
Item.rare = ItemRarityID.LightRed;
+9 -2
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,7 +10,13 @@ namespace CalamityMod.Items.Potions.Alcohol
public class TequilaSunrise : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
internal static readonly int CritBoost = 8;
public static float KnockbackBoost = 0.2f;
public static int CritBoost = 8;
public static int DefenseBoost = 10;
public static int RegenLoss = 2;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(KnockbackBoost.ToPercent(), CritBoost, DefenseBoost, RegenLoss.ToRegenPerSecond());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -22,7 +29,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(22, 28, ModContent.BuffType<TequilaSunriseBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(22, 28, ModContent.BuffType<TequilaSunriseBuff>(), CalamityUtils.MinutesToFrames(8), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(gold: 1);
Item.rare = ItemRarityID.Yellow;
+8 -2
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,7 +10,12 @@ namespace CalamityMod.Items.Potions.Alcohol
public class Vodka : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
internal static readonly int CritBoost = 2;
public static float DamageBoost = 0.06f;
public static int CritBoost = 2;
public static int RegenLoss = 1;
public static float DefenseLossPercent = 0.05f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), CritBoost, RegenLoss.ToRegenPerSecond(), DefenseLossPercent.ToPercent());
public override void SetStaticDefaults()
{
@@ -23,7 +29,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(14, 36, ModContent.BuffType<VodkaBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(14, 36, ModContent.BuffType<VodkaBuff>(), CalamityUtils.MinutesToFrames(8), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(silver: 40);
Item.rare = ItemRarityID.LightPurple;
+8 -2
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -9,7 +10,12 @@ namespace CalamityMod.Items.Potions.Alcohol
public class Whiskey : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
internal static readonly int CritBoost = 2;
public static float DamageBoost = 0.04f;
public static float KnockbackBoost = 0.2f;
public static int CritBoost = 2;
public static float DefenseLossPercent = 5;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), KnockbackBoost.ToPercent(), CritBoost, DefenseLossPercent.ToPercent());
public override void SetStaticDefaults()
{
@@ -23,7 +29,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(18, 32, ModContent.BuffType<WhiskeyBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(18, 32, ModContent.BuffType<WhiskeyBuff>(), CalamityUtils.MinutesToFrames(8), true);
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(silver: 30);
Item.rare = ItemRarityID.LightRed;
+8 -1
View File
@@ -3,6 +3,7 @@ using Microsoft.Xna.Framework;
using Terraria;
using Terraria.GameInput;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
@@ -10,6 +11,12 @@ namespace CalamityMod.Items.Potions.Alcohol
public class WhiteWine : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static float MagicDamageBoost = 0.08f;
public static float DefenseLossPercent = 0.06f;
public static int RegenLoss = 2;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MagicDamageBoost.ToPercent(), DefenseLossPercent.ToPercent(), RegenLoss.ToRegenPerSecond());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -23,7 +30,7 @@ namespace CalamityMod.Items.Potions.Alcohol
public override void SetDefaults()
{
Item.DefaultToFood(14, 44, ModContent.BuffType<WhiteWineBuff>(), CalamityUtils.SecondsToFrames(300f), true);
Item.DefaultToFood(14, 44, ModContent.BuffType<WhiteWineBuff>(), CalamityUtils.MinutesToFrames(5), true);
Item.healMana = 300;
// Cirrus overcharges: 10% sell value instead of 20%
Item.value = Item.sellPrice(silver: 40);
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
// How do you even use this?
Item.DefaultToFood(22, 26, ModContent.BuffType<AnechoicCoatingBuff>(), CalamityUtils.SecondsToFrames(240f));
Item.DefaultToFood(22, 26, ModContent.BuffType<AnechoicCoatingBuff>(), CalamityUtils.MinutesToFrames(4));
Item.UseSound = SoundID.Item3;
Item.value = Item.sellPrice(silver: 2);
Item.rare = ItemRarityID.Blue;
+9 -3
View File
@@ -4,6 +4,7 @@ using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions
@@ -11,6 +12,11 @@ namespace CalamityMod.Items.Potions
public class AstralInjection : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static int ManaPerFrame = 2;
public static int SelfDamage = 5;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ManaPerFrame * 60, SelfDamage);
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 30;
@@ -22,7 +28,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(14, 34, ModContent.BuffType<AstralInjectionBuff>(), CalamityUtils.SecondsToFrames(5f), true);
Item.DefaultToFood(14, 34, ModContent.BuffType<AstralInjectionBuff>(), CalamityUtils.SecondsToFrames(5), true);
Item.value = Item.sellPrice(silver: 2);
Item.rare = ItemRarityID.Lime;
}
@@ -30,10 +36,10 @@ namespace CalamityMod.Items.Potions
public override void OnConsumeItem(Player player)
{
player.AddBuff(BuffID.ManaSickness, Player.manaSickTime / 2, true);
player.statLife -= 5;
player.statLife -= SelfDamage;
if (Main.myPlayer == player.whoAmI)
{
player.HealEffect(-5, true);
player.HealEffect(-SelfDamage, true);
}
if (player.statLife <= 0)
{
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
// Eating animation but gulp sound? Sure
Item.DefaultToFood(22, 38, BuffID.MagicPower, CalamityUtils.SecondsToFrames(360f));
Item.DefaultToFood(22, 38, BuffID.MagicPower, CalamityUtils.MinutesToFrames(8));
Item.healMana = 200;
Item.UseSound = SoundID.Item3;
Item.value = Item.sellPrice(silver: 50); // Based on material cost rather than potion cost
+7 -1
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions
@@ -9,6 +10,11 @@ namespace CalamityMod.Items.Potions
public class Baguette : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static int RedWineBuffedHealValue = 250;
public static int RedWineBuffedRegenLoss = 4;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RedWineBuffedHealValue, RedWineBuffedRegenLoss.ToRegenPerSecond());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
@@ -21,7 +27,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(52, 38, BuffID.WellFed, CalamityUtils.SecondsToFrames(300f));
Item.DefaultToFood(52, 38, BuffID.WellFed, CalamityUtils.MinutesToFrames(5));
Item.value = Item.sellPrice(silver: 1);
Item.rare = ItemRarityID.Blue;
Item.Calamity().donorItem = true;
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Potions
}
public override void SetDefaults()
{
Item.DefaultToFood(40, 26, BuffID.WellFed2, CalamityUtils.SecondsToFrames(3600f));
Item.DefaultToFood(40, 26, BuffID.WellFed2, CalamityUtils.MinutesToFrames(60));
Item.value = Item.sellPrice(silver: 60);
Item.rare = ItemRarityID.Purple;
}
+7 -1
View File
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions
@@ -10,6 +11,11 @@ namespace CalamityMod.Items.Potions
public class BoundingPotion : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static float JumpSpeedBoost = 0.25f;
public static float JumpHeightPercentBoost = 0.2f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(JumpSpeedBoost.ToJumpSpeedPercent(), JumpHeightPercentBoost.ToPercent());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
@@ -21,7 +27,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(26, 38, ModContent.BuffType<BoundingBuff>(), CalamityUtils.SecondsToFrames(300f), true);
Item.DefaultToFood(26, 38, ModContent.BuffType<BoundingBuff>(), CalamityUtils.MinutesToFrames(8), true);
Item.value = Item.sellPrice(silver: 2);
Item.rare = ItemRarityID.Blue;
}
+8 -3
View File
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions
@@ -10,6 +11,10 @@ namespace CalamityMod.Items.Potions
public class CalciumPotion : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static float KnockbackResistance = 0.5f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(KnockbackResistance.ToPercent());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
@@ -21,15 +26,15 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(18, 30, ModContent.BuffType<CalciumBuff>(), CalamityUtils.SecondsToFrames(1200f), true);
Item.DefaultToFood(18, 30, ModContent.BuffType<CalciumBuff>(), CalamityUtils.MinutesToFrames(20), true);
Item.value = Item.sellPrice(silver: 2);
Item.rare = ItemRarityID.Blue;
}
public override void AddRecipes()
{
CreateRecipe(4).
AddIngredient(ItemID.BottledWater, 4).
CreateRecipe().
AddIngredient(ItemID.BottledWater).
AddIngredient<AncientBoneDust>().
AddTile(TileID.Bottles).
Register()
+3 -3
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(22, 32, ModContent.BuffType<CeaselessHunger>(), CalamityUtils.SecondsToFrames(10f), true);
Item.DefaultToFood(22, 32, ModContent.BuffType<CeaselessHunger>(), CalamityUtils.SecondsToFrames(20), true);
Item.value = Item.sellPrice(silver: 10);
Item.rare = ModContent.RarityType<PureGreen>();
}
@@ -37,8 +37,8 @@ namespace CalamityMod.Items.Potions
AddConsumeItemCallback(Recipe.ConsumptionRules.Alchemy).
Register();
CreateRecipe(4).
AddIngredient(ItemID.BottledWater, 4).
CreateRecipe(8).
AddIngredient(ItemID.BottledWater, 8).
AddIngredient<BloodOrb>(10).
AddIngredient<DarkPlasma>().
AddTile(TileID.AlchemyTable).
+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Potions
}
public override void SetDefaults()
{
Item.DefaultToFood(32, 30, BuffID.WellFed2, CalamityUtils.SecondsToFrames(1800f));
Item.DefaultToFood(32, 30, BuffID.WellFed2, CalamityUtils.MinutesToFrames(30));
Item.value = Item.buyPrice(silver: 50); // Sold by Archmage
Item.rare = ItemRarityID.Pink;
}
+1 -1
View File
@@ -36,7 +36,7 @@ namespace CalamityMod.Items.Potions
public override void UseItemFrame(Player player)
{
int time = CalamityUtils.SecondsToFrames(1980f); // 33 minutes
int time = CalamityUtils.MinutesToFrames(33);
if (player.itemAnimation == 180)
{
player.AddBuff(BuffID.WellFed3, time);
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(30, 34, ModContent.BuffType<WeaponImbueBrimstone>(), CalamityUtils.SecondsToFrames(1200f), true);
Item.DefaultToFood(30, 34, ModContent.BuffType<WeaponImbueBrimstone>(), CalamityUtils.MinutesToFrames(20), true);
Item.value = Item.sellPrice(silver: 5);
Item.rare = ItemRarityID.LightRed;
}
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(32, 28, ModContent.BuffType<WeaponImbueCrumbling>(), CalamityUtils.SecondsToFrames(1200f), true);
Item.DefaultToFood(32, 28, ModContent.BuffType<WeaponImbueCrumbling>(), CalamityUtils.MinutesToFrames(20), true);
Item.value = Item.sellPrice(silver: 5);
Item.rare = ItemRarityID.LightRed;
}
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(44, 36, ModContent.BuffType<WeaponImbueHolyFlames>(), CalamityUtils.SecondsToFrames(1200f), true);
Item.DefaultToFood(44, 36, ModContent.BuffType<WeaponImbueHolyFlames>(), CalamityUtils.MinutesToFrames(20), true);
Item.value = Item.sellPrice(silver: 5);
Item.rare = ItemRarityID.Purple;
}
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(24, 36, ModContent.BuffType<GravityNormalizerBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(24, 36, ModContent.BuffType<GravityNormalizerBuff>(), CalamityUtils.MinutesToFrames(8), true);
Item.value = Item.sellPrice(silver: 2);
Item.rare = ItemRarityID.Lime;
}
+2 -2
View File
@@ -15,8 +15,8 @@ namespace CalamityMod.Items.Potions
{
public new string LocalizationCategory => "Items.Potions";
public static int BuffType = BuffID.WellFed2;
public static int BuffDuration = 60 * 3600;
public static int SicknessDuration = 50 * 60;
public static int BuffDuration = CalamityUtils.MinutesToFrames(60);
public static int SicknessDuration = CalamityUtils.SecondsToFrames(50);
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(BuffDuration / 3600);
public override void SetStaticDefaults()
+6 -1
View File
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions
@@ -10,6 +11,10 @@ namespace CalamityMod.Items.Potions
public class PhotosynthesisPotion : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static int IncreasedHeartHeal = 5;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(IncreasedHeartHeal);
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
@@ -22,7 +27,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(30, 34, ModContent.BuffType<PhotosynthesisBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(30, 34, ModContent.BuffType<PhotosynthesisBuff>(), CalamityUtils.MinutesToFrames(8), true);
Item.value = Item.sellPrice(silver: 2);
Item.rare = ItemRarityID.LightRed;
}
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(28, 30, ModContent.BuffType<Omniscience>(), CalamityUtils.SecondsToFrames(900f), true);
Item.DefaultToFood(28, 30, ModContent.BuffType<Omniscience>(), CalamityUtils.MinutesToFrames(15), true);
Item.value = Item.sellPrice(silver: 2);
Item.rare = ItemRarityID.Orange;
}
+6 -1
View File
@@ -4,6 +4,7 @@ using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions
@@ -11,6 +12,10 @@ namespace CalamityMod.Items.Potions
public class ShadowPotion : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static float StealthRegenBoost = 0.08f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(StealthRegenBoost.ToPercent());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
@@ -23,7 +28,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(20, 28, ModContent.BuffType<ShadowBuff>(), CalamityUtils.SecondsToFrames(480f), true);
Item.DefaultToFood(20, 28, ModContent.BuffType<ShadowBuff>(), CalamityUtils.MinutesToFrames(8), true);
Item.value = Item.sellPrice(silver: 2);
Item.rare = ItemRarityID.Orange;
}
+6 -1
View File
@@ -4,6 +4,7 @@ using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Potions
@@ -11,6 +12,10 @@ namespace CalamityMod.Items.Potions
public class SoaringPotion : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public static float FlightBoost = 0.1f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(FlightBoost.ToPercent());
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
@@ -23,7 +28,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(30, 30, ModContent.BuffType<Soaring>(), CalamityUtils.SecondsToFrames(360f), true);
Item.DefaultToFood(30, 30, ModContent.BuffType<Soaring>(), CalamityUtils.MinutesToFrames(6), true);
Item.value = Item.sellPrice(silver: 2);
Item.rare = ItemRarityID.LightRed;
}
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(22, 26, ModContent.BuffType<SulphurskinBuff>(), CalamityUtils.SecondsToFrames(150f), true);
Item.DefaultToFood(22, 26, ModContent.BuffType<SulphurskinBuff>(), CalamityUtils.MinutesToFrames(4), true);
Item.value = Item.sellPrice(silver: 2);
Item.rare = ItemRarityID.Green;
}
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(24, 28, ModContent.BuffType<Zen>(), CalamityUtils.SecondsToFrames(900f), true);
Item.DefaultToFood(24, 28, ModContent.BuffType<Zen>(), CalamityUtils.MinutesToFrames(15), true);
Item.value = Item.sellPrice(silver: 2);
Item.rare = ItemRarityID.LightRed;
}
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Potions
public override void SetDefaults()
{
Item.DefaultToFood(24, 34, ModContent.BuffType<Zerg>(), CalamityUtils.SecondsToFrames(900f), true);
Item.DefaultToFood(24, 34, ModContent.BuffType<Zerg>(), CalamityUtils.MinutesToFrames(15), true);
Item.value = Item.sellPrice(silver: 2);
Item.rare = ItemRarityID.LightRed;
}
@@ -10,7 +10,7 @@ BloodyMaryBuff: {
CaribbeanRumBuff: {
DisplayName: Caribbean Rum
Description: Life regen, movement speed, and wing flight time increased, you are floaty and defense is reduced
Description: Life regen and movement speed increased, you are floaty and defense is reduced
}
CinnamonRollBuff: {
@@ -60,7 +60,7 @@ MoscowMuleBuff: {
OldFashionedBuff: {
DisplayName: Old Fashioned
Description: Accessory and set bonus damage multiplied, damage reduced
Description: Non-weapon damage increased, weapon damage reduced
}
RedWineBuff: {
@@ -95,7 +95,7 @@ TequilaSunriseBuff: {
Trippy: {
DisplayName: Trippy
Description: You see the world for what it truly is... and you also have a 50% increase to all damage
Description: You see the world for what it truly is... and you also have a {0}% increase to all damage
}
VodkaBuff: {
@@ -550,12 +550,12 @@ BloodfinBoost: {
BoundingBuff: {
DisplayName: Bounding
Description: Increased jump height, jump speed, and fall damage resistance
Description: Increased jump speed and height
}
CalciumBuff: {
DisplayName: Calcium
Description: You are immune to fall damage
Description: You take {0}% less knockback
}
CeaselessHunger: {
@@ -565,7 +565,7 @@ CeaselessHunger: {
GravityNormalizerBuff: {
DisplayName: Gravity Normalizer
Description: Gravity is now normal in space, immunity to distorted
Description: Gravity is now normal in space, immunity to {$BuffName.VortexDebuff}
}
Omniscience: {
@@ -575,7 +575,7 @@ Omniscience: {
PhotosynthesisBuff: {
DisplayName: Photosynthesis
Description: Life regen boosted, more during daytime, and hearts heal more HP
Description: Hearts heal {0} more HP
}
ShadowBuff: {
@@ -583,18 +583,13 @@ ShadowBuff: {
Description:
'''
You are a shadow
Rogue weapons spawn projectiles on hit
8% boosted stealth generation
{0}% increased stealth generation
'''
}
Soaring: {
DisplayName: Soaring
Description:
'''
10% increased wing flight time and speed
True melee hits restore some wing flight time
'''
Description: "{0}% increased wing flight time and speed"
}
SulphurskinBuff: {
@@ -5,12 +5,16 @@ AnechoicCoating: {
AstralInjection: {
DisplayName: Astral Injection
Tooltip: Gives mana sickness and hurts you when used, but you regenerate mana extremely quickly even while moving or casting spells
Tooltip:
'''
Restores {0} mana per second
Lower your health by {1} and inflicts {$BuffName.ManaSickness} when used
'''
}
AureusCell: {
DisplayName: Aureus Cell
Tooltip: Grants increased mana regeneration and magic power
Tooltip: Grants the {$BuffName.MagicPower} and {$BuffName.ManaRegeneration} buffs
}
Baguette: {
@@ -18,7 +22,7 @@ Baguette: {
Tooltip:
'''
{$CommonItemTooltip.MinorStats}
Red Wine heals 250 HP, but reduces life regen by 2 HP/s
Red Wine heals {0} HP, but reduces life regen by {1} HP/s
[c/FCE391:'je suis Monte']
'''
}
@@ -34,12 +38,12 @@ BlasphemousDonut: {
BoundingPotion: {
DisplayName: Bounding Potion
Tooltip: 5% increased jump speed, 25 extra blocks of fall damage resistance, and increased jump height
Tooltip: "{0}% increased jump speed and {1}% increased jump height"
}
CalciumPotion: {
DisplayName: Calcium Potion
Tooltip: Grants immunity to fall damage
Tooltip: Grants {0}% knockback resistance
}
CeaselessHungerPotion: {
@@ -82,7 +86,7 @@ FlaskOfHolyFlames: {
GravityNormalizerPotion: {
DisplayName: Gravity Normalizer Potion
Tooltip: Disables the low gravity of space and grants immunity to the distorted debuff
Tooltip: Disables the low gravity of space and grants immunity to the {$BuffName.VortexDebuff} debuff
}
HadalStew: {
@@ -102,12 +106,7 @@ OmegaHealingPotion: {
PhotosynthesisPotion: {
DisplayName: Photosynthesis Potion
Tooltip:
'''
Grants +0.5 HP/s life regen and accelerates natural life regen while not moving
This natural life regen effect is five times as strong during daytime
Dropped hearts heal more HP
'''
Tooltip: Dropped hearts heal {0} more HP
}
PotionofOmniscience: {
@@ -123,21 +122,15 @@ ShadowPotion: {
DisplayName: Shadow Potion
Tooltip:
'''
{0}% increased stealth generation
Turns the player into a shadow with glowing eyes
Rogue weapons spawn projectiles on hit
8% increased stealth generation
Visual effects can be disabled with the Stealth Invisibility config
'''
}
SoaringPotion: {
DisplayName: Soaring Potion
Tooltip:
'''
10% increased flight time and horizontal flight speed
Restores a fraction of your wing flight time after a true melee strike
The amount of flight time restored scales with your melee stats and weapon swing speed
'''
Tooltip: "{0}% increased flight time and horizontal flight speed"
}
SulphurskinPotion: {
@@ -170,8 +163,8 @@ BloodyMary: {
DisplayName: Bloody Mary
Tooltip:
'''
10% increased damage and movement speed during a Blood Moon
Reduces life regen by 2 HP/s and defense by 4%
{0}% increased damage and movement speed during a Blood Moon
Reduces life regen by {1} HP/s and defense by {2}
{$Common.AlcoholWarning}
[c/B00BA5:'Extra spicy... and bloody!']
'''
@@ -181,8 +174,8 @@ CaribbeanRum: {
DisplayName: Caribbean Rum
Tooltip:
'''
Increases life regen by 1 HP/s, movement speed by 10% and wing flight time by 20%
Makes you floaty and reduces defense by 10%
Increases life regen by {0} HP/s, movement speed by {1}%
Makes you floaty and reduces defense by {2}%
{$Common.AlcoholWarning}
[c/B00BA5:'Why is the rum gone?']
'''
@@ -192,8 +185,8 @@ CinnamonRoll: {
DisplayName: Cinnamon Roll
Tooltip:
'''
Increases mana regeneration rate and multiplies all fire-based debuff damage by 1.5x
Reduces defense by 10%
Increases mana regeneration rate and multiplies all fire-based debuff damage by {0}x
Reduces defense by {1}%
{$Common.AlcoholWarning}
[c/B00BA5:'A great-tasting cinnamon whiskey with a touch of cream soda.']
'''
@@ -203,8 +196,8 @@ Everclear: {
DisplayName: Everclear
Tooltip:
'''
25% increased damage
Reduces life regen by 5 HP/s and defense by 30%
{0}% increased damage
Reduces life regen by {1} HP/s and defense by {2}%
Counts as 2 alcohols for Alcohol Poisoning
{$Common.AlcoholWarning}
[c/B00BA5:'This is the most potent booze I have, be careful with it.']
@@ -215,8 +208,8 @@ EvergreenGin: {
DisplayName: Evergreen Gin
Tooltip:
'''
Multiplies all sickness and water-related debuff damage by 1.25x
Reduces life regen by 0.5 HP/s
Multiplies all sickness and water-related debuff damage by {0}x
Reduces life regen by {1} HP/s
{$Common.AlcoholWarning}
[c/B00BA5:'It tastes like a Christmas tree, if you can imagine that.']
'''
@@ -226,7 +219,7 @@ FabsolsVodka: {
DisplayName: Fabsol's Vodka
Tooltip:
'''
8% increased damage, but lowers defense by 5%
{0}% increased damage, but lowers defense by {1}%
Increases immune time after being struck
{$Common.AlcoholWarning}
This magical liquor is highly sought by those with a refined palate
@@ -237,8 +230,8 @@ Fireball: {
DisplayName: Fireball
Tooltip:
'''
Multiplies all fire-based debuff damage by 1.25x
Reduces life regen by 0.5 HP/s
Multiplies all fire-based debuff damage by {0}x
Reduces life regen by {1} HP/s
{$Common.AlcoholWarning}
[c/B00BA5:'A great-tasting cinnamon whiskey.']
'''
@@ -248,7 +241,7 @@ GrapeBeer: {
DisplayName: Grape Beer
Tooltip:
'''
Reduces defense by 3% for 15 seconds
Reduces defense by {0}% for {1} seconds
{$Common.AlcoholWarning}
[c/B00BA5:'This crap is abhorrent, but you might like it.']
'''
@@ -259,9 +252,9 @@ Margarita: {
Tooltip:
'''
Halves the duration of most harmful debuffs
Reduces defense by 6% and life regen by 0.5 HP/s
Reduces defense by {0}% and life regen by {1} HP/s
{$Common.AlcoholWarning}
3 minute duration
{2} minute duration
[c/B00BA5:'One of the best drinks ever created, enjoy it while it lasts.']
'''
}
@@ -270,8 +263,8 @@ Moonshine: {
DisplayName: Moonshine
Tooltip:
'''
Increases defense by 10 and damage reduction by 3%
Reduces life regen by 0.5 HP/s
Increases defense by {0} and damage reduction by {1}%
Reduces life regen by {2} HP/s
{$Common.AlcoholWarning}
[c/B00BA5:'This stuff is pretty strong, but I'm sure you can handle it.']
'''
@@ -281,8 +274,8 @@ MoscowMule: {
DisplayName: Moscow Mule
Tooltip:
'''
Increases damage by 9%, knockback by 50% and critical strike chance by 3%
Reduces life regen by 2 HP/s
Increases damage by {0}%, knockback by {1}% and critical strike chance by {2}%
Reduces life regen by {3} HP/s
{$Common.AlcoholWarning}
[c/B00BA5:'I once heard the copper mug can be toxic and I told 'em, 'listen, dummy, I'm already poisoning myself!'']
'''
@@ -314,7 +307,7 @@ RedWine: {
DisplayName: Red Wine
Tooltip:
'''
Reduces life regen by 0.5 HP/s for 15 seconds
Reduces life regen by {0} HP/s for {1} seconds
{$Common.AlcoholWarning}
[c/B00BA5:'Too dry for my taste.']
'''
@@ -324,8 +317,8 @@ Rum: {
DisplayName: Rum
Tooltip:
'''
Increases life regen by 1 HP/s and movement speed by 10%
Reduces defense by 5%
Increases life regen by {0} HP/s and movement speed by {1}%
Reduces defense by {2}%
{$Common.AlcoholWarning}
[c/B00BA5:'Sweet and potent, just how I like it.']
'''
@@ -335,8 +328,8 @@ Screwdriver: {
DisplayName: Screwdriver
Tooltip:
'''
Multiplies piercing projectile damage by 1.05x
Reduces life regen by 0.5 HP/s
Multiplies piercing projectile damage by {0}x
Reduces life regen by {1} HP/s
{$Common.AlcoholWarning}
[c/B00BA5:'Do you have a screw loose?']
'''
@@ -346,9 +339,9 @@ StarBeamRye: {
DisplayName: Star Beam Rye
Tooltip:
'''
Increases max mana by 50, magic damage by 8%,
and reduces mana usage by 10%
Reduces defense by 6% and life regen by 1 HP/s
Increases max mana by {0}, magic damage by {1}%,
and reduces mana usage by {2}%
Reduces defense by {3}% and life regen by {4} HP/s
{$Common.AlcoholWarning}
[c/B00BA5:'Made from some stuff I found near the Astral Meteor crash site. Don't worry, it's safe, trust me...']
'''
@@ -358,8 +351,8 @@ Tequila: {
DisplayName: Tequila
Tooltip:
'''
Increases knockback by 10%, crit chance by 4% and defense by 5 during daytime
Reduces life regen by 0.5 HP/s
Increases knockback by {0}%, crit chance by {1}% and defense by {2} during daytime
Reduces life regen by {3} HP/s
{$Common.AlcoholWarning}
[c/B00BA5:'Great for mixing up daytime drinks.']
'''
@@ -369,8 +362,8 @@ TequilaSunrise: {
DisplayName: Tequila Sunrise
Tooltip:
'''
Increases knockback by 20%, crit chance by 8% and defense by 10 during daytime
Reduces life regen by 1 HP/s
Increases knockback by {0}%, crit chance by {1}% and defense by {2} during daytime
Reduces life regen by {3} HP/s
{$Common.AlcoholWarning}
[c/B00BA5:'The greatest daytime drink I've ever had.']
'''
@@ -380,8 +373,8 @@ Vodka: {
DisplayName: Vodka
Tooltip:
'''
Increases damage by 6% and critical strike chance by 2%
Reduces life regen by 0.5 HP/s and defense by 5%
Increases damage by {0}% and critical strike chance by {1}%
Reduces life regen by {2} HP/s and defense by {3}%
{$Common.AlcoholWarning}
[c/B00BA5:'The number one alcohol for creating great mixed drinks.']
'''
@@ -391,8 +384,8 @@ Whiskey: {
DisplayName: Whiskey
Tooltip:
'''
Increases damage by 4%, knockback by 20% and critical strike chance by 2%
Reduces defense by 5%
Increases damage by {0}%, knockback by {1}% and critical strike chance by {2}%
Reduces defense by {3}%
{$Common.AlcoholWarning}
[c/B00BA5:'The burning sensation makes it tastier.']
'''
@@ -402,8 +395,8 @@ WhiteWine: {
DisplayName: White Wine
Tooltip:
'''
Increases magic damage by 8%
Reduces defense by 6% and life regen by 0.5 HP/s
Increases magic damage by {0}%
Reduces defense by {1}% and life regen by {2} HP/s
{$Common.AlcoholWarning}
[c/B00BA5:'I drank a full barrel of this stuff once in one night, I couldn't remember who I was the next day.']
'''
+5 -4
View File
@@ -14,6 +14,7 @@ using CalamityMod.Events;
using CalamityMod.Graphics.Metaballs;
using CalamityMod.Graphics.Renderers.CalamityRenderers;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.Items.Tools;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.NPCs.Abyss;
@@ -862,11 +863,11 @@ namespace CalamityMod.NPCs
electricityDamageMult += 0.5;
if (IncreasedHeatEffects_Fireball)
heatDamageMult += 0.25;
heatDamageMult += Fireball.HeatDebuffBoost;
if (IncreasedHeatEffects_FlameWakerBoots)
heatDamageMult += 0.25;
if (IncreasedHeatEffects_CinnamonRoll)
heatDamageMult += 0.5;
heatDamageMult += CinnamonRoll.HeatDebuffBoost;
if (IncreasedHeatEffects_HellfireTreads)
heatDamageMult += 0.5;
if (IncreasedHeatEffects_FlameWings)
@@ -877,8 +878,8 @@ namespace CalamityMod.NPCs
if (IncreasedSicknessAndWaterEffects_EvergreenGin)
{
sicknessDamageMult += 0.25;
waterDamageMult += 0.25;
sicknessDamageMult += EvergreenGin.SicknessWaterDebuffBoost;
waterDamageMult += EvergreenGin.SicknessWaterDebuffBoost;
}
// Subtract 1 for the vanilla damage multiplier because it's already dealing DoT in the vanilla regen code.
+5
View File
@@ -79,5 +79,10 @@ namespace CalamityMod
/// <para>NOTE: Modded translations are not loaded until after PostSetupContent.</para>Caching the result is suggested.
/// </returns>
public static string GetTextValueFromModItem<T>(string suffix) where T : ModItem => GetTextFromModItem(ModContent.ItemType<T>(), suffix).ToString();
// Double-rounded for proper digit cutoffs
public static string ToRegenPerSecond(this int regen) => float.Parse((regen * 0.5f).ToString("N2")).ToString();
public static string ToJumpSpeedPercent(this float boost) => float.Parse((boost * 20f).ToString("N2")).ToString();
public static string ToPercent(this float percent) => float.Parse((percent * 100f).ToString("N4")).ToString();
}
}
+1
View File
@@ -205,6 +205,7 @@ namespace CalamityMod
public static int SecondsToFrames(int seconds) => seconds * 60;
public static int SecondsToFrames(float seconds) => (int)(seconds * 60);
public static int MinutesToFrames(int minutes) => minutes * 3600;
public static bool WithinBounds(this int index, int cap) => index >= 0 && index < cap;