Merge: IV Drip now supports all alcohols and stacks with them

*drunken mumbling*
This commit is contained in:
Cameron Ewell authored and GitHub committed 2026-04-28 16:42:51 -04:00
commit 2e27a40d13
36 files changed
+856 -141

No files matched your search

+40 -27
View File
@@ -4610,12 +4610,12 @@ namespace CalamityMod.CalPlayer
}
//Multiply vertical speed
if (redWine)
if (redWine || Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.RedWine))
{
if (Player.velocity.Y > 0.2f || Player.velocity.Y < -0.2f)
{
redWineStoredY = Player.velocity.Y;
Player.velocity.Y *= 1 + RedWine.VerticalSpeedBoost;
Player.velocity.Y *= 1 + (redWine ? RedWine.VerticalSpeedBoost : 0) + (Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.RedWine) ? RedWine.VerticalSpeedBoost : 0);
}
else
{
@@ -4922,7 +4922,7 @@ namespace CalamityMod.CalPlayer
#region PostUpdateEquips
public override void PostUpdateEquips()
{
var dripPlayer = Player.GetModPlayer<IVDripPlayer>();
var item = Player.HeldItem;
if (!(item.IsAir || item.damage <= 0))
{
@@ -4931,11 +4931,13 @@ namespace CalamityMod.CalPlayer
TimeHoldingMelee++;
if (TimeHoldingMelee > Whiskey.TimeToDischarge)
TimeHoldingMelee = (int)Whiskey.TimeToDischarge;
if (whiskey)
{
Player.GetDamage(DamageClass.Melee) += MathHelper.Lerp(Whiskey.MaxDamageBoost, Whiskey.MinDamageBoost, TimeHoldingMelee / Whiskey.TimeToDischarge);
}
} else
if (dripPlayer.HasAlcohol(AlcoholType.Whiskey) && whiskey)
Player.GetDamage(DamageClass.Melee) += MathHelper.Lerp(Whiskey.CombinedDamageCeiling, Whiskey.CombinedDamageFloor, TimeHoldingMelee / Whiskey.TimeToDischarge);
else if (whiskey || dripPlayer.HasAlcohol(AlcoholType.Whiskey))
Player.GetDamage(DamageClass.Melee) += MathHelper.Lerp(Whiskey.StandardDamageCeiling, Whiskey.StandardDamageFloor, TimeHoldingMelee / Whiskey.TimeToDischarge);
}
else
{
TimeHoldingMelee -= 2;
if (TimeHoldingMelee < 0)
@@ -4945,11 +4947,12 @@ namespace CalamityMod.CalPlayer
{
TimeHoldingRanged++;
if (TimeHoldingRanged > Whiskey.TimeToDischarge)
TimeHoldingRanged = (int)Whiskey.TimeToDischarge;
if (whiskey)
{
Player.GetDamage(DamageClass.Ranged) += MathHelper.Lerp(Whiskey.MaxDamageBoost, Whiskey.MinDamageBoost, TimeHoldingRanged / Whiskey.TimeToDischarge);
}
TimeHoldingRanged = (int)Whiskey.TimeToDischarge;
if (dripPlayer.HasAlcohol(AlcoholType.Whiskey) && whiskey)
Player.GetDamage(DamageClass.Ranged) += MathHelper.Lerp(Whiskey.CombinedDamageCeiling, Whiskey.CombinedDamageFloor, TimeHoldingRanged / Whiskey.TimeToDischarge);
else if (whiskey || dripPlayer.HasAlcohol(AlcoholType.Whiskey))
Player.GetDamage(DamageClass.Ranged) += MathHelper.Lerp(Whiskey.StandardDamageCeiling, Whiskey.StandardDamageFloor, TimeHoldingRanged / Whiskey.TimeToDischarge);
}
else
{
@@ -4962,10 +4965,11 @@ namespace CalamityMod.CalPlayer
TimeHoldingMagic++;
if (TimeHoldingMagic > Whiskey.TimeToDischarge)
TimeHoldingMagic = (int)Whiskey.TimeToDischarge;
if (whiskey)
{
Player.GetDamage(DamageClass.Magic) += MathHelper.Lerp(Whiskey.MaxDamageBoost, Whiskey.MinDamageBoost, TimeHoldingMagic / Whiskey.TimeToDischarge);
}
if (dripPlayer.HasAlcohol(AlcoholType.Whiskey) && whiskey)
Player.GetDamage(DamageClass.Magic) += MathHelper.Lerp(Whiskey.CombinedDamageCeiling, Whiskey.CombinedDamageFloor, TimeHoldingMagic / Whiskey.TimeToDischarge);
else if (whiskey || dripPlayer.HasAlcohol(AlcoholType.Whiskey))
Player.GetDamage(DamageClass.Magic) += MathHelper.Lerp(Whiskey.StandardDamageCeiling, Whiskey.StandardDamageFloor, TimeHoldingMagic / Whiskey.TimeToDischarge);
}
else
{
@@ -4978,10 +4982,11 @@ namespace CalamityMod.CalPlayer
TimeHoldingSummon++;
if (TimeHoldingSummon > Whiskey.TimeToDischarge)
TimeHoldingSummon = (int)Whiskey.TimeToDischarge;
if (whiskey)
{
Player.GetDamage(DamageClass.Summon) += MathHelper.Lerp(Whiskey.MaxDamageBoost, Whiskey.MinDamageBoost, TimeHoldingSummon / Whiskey.TimeToDischarge);
}
if (dripPlayer.HasAlcohol(AlcoholType.Whiskey) && whiskey)
Player.GetDamage(DamageClass.Summon) += MathHelper.Lerp(Whiskey.CombinedDamageCeiling, Whiskey.CombinedDamageFloor, TimeHoldingSummon / Whiskey.TimeToDischarge);
else if (whiskey || dripPlayer.HasAlcohol(AlcoholType.Whiskey))
Player.GetDamage(DamageClass.Summon) += MathHelper.Lerp(Whiskey.StandardDamageCeiling, Whiskey.StandardDamageFloor, TimeHoldingSummon / Whiskey.TimeToDischarge);
}
else
{
@@ -4994,10 +4999,12 @@ namespace CalamityMod.CalPlayer
TimeHoldingRogue++;
if (TimeHoldingRogue > Whiskey.TimeToDischarge)
TimeHoldingRogue = (int)Whiskey.TimeToDischarge;
if (whiskey)
{
Player.GetDamage(RogueDamageClass.Instance) += MathHelper.Lerp(Whiskey.MaxDamageBoost, Whiskey.MinDamageBoost, TimeHoldingRogue / Whiskey.TimeToDischarge);
}
if (dripPlayer.HasAlcohol(AlcoholType.Whiskey) && whiskey)
Player.GetDamage(RogueDamageClass.Instance) += MathHelper.Lerp(Whiskey.CombinedDamageCeiling, Whiskey.CombinedDamageFloor, TimeHoldingRogue / Whiskey.TimeToDischarge);
else if (whiskey || dripPlayer.HasAlcohol(AlcoholType.Whiskey))
Player.GetDamage(RogueDamageClass.Instance) += MathHelper.Lerp(Whiskey.StandardDamageCeiling, Whiskey.StandardDamageFloor, TimeHoldingRogue / Whiskey.TimeToDischarge);
}
else
{
@@ -5018,6 +5025,10 @@ namespace CalamityMod.CalPlayer
if (TimeHoldingRogue-- < 0)
TimeHoldingRogue = 0;
}
if (dripPlayer.HasAlcohol(AlcoholType.Moonshine))
{
Player.statLifeMax2 = (int)(Player.statLifeMax2 * (1 + Moonshine.MaxLifePercentBoost));
}
// PostUpdateMiscEffects runs after the cap has been applied. Do NOT put mining speed stuff there.
@@ -5154,7 +5165,7 @@ namespace CalamityMod.CalPlayer
}
//reset the stored Y value for red wine's increased vertical speed
if (redWine && (redWineStoredY > 0.2f || redWineStoredY < -0.2f) && (Player.velocity.Y > 0.2f || Player.velocity.Y < -0.2f))
if ((redWine || Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.RedWine)) && (redWineStoredY > 0.2f || redWineStoredY < -0.2f) && (Player.velocity.Y > 0.2f || Player.velocity.Y < -0.2f))
{
Player.velocity.Y = redWineStoredY;
}
@@ -5434,6 +5445,8 @@ namespace CalamityMod.CalPlayer
if (moscowMule)
knockback += MoscowMule.KnockbackBoost;
if (Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.MoscowMule))
knockback += MoscowMule.KnockbackBoost;
if (titanHeartMantle && rogue)
knockback += TitanHeartMantle.RogueKnockbackBoost;
@@ -5612,7 +5625,7 @@ namespace CalamityMod.CalPlayer
{
if (bladeArmEnchant)
return false;
if (purpleHaze)
if (purpleHaze || Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.PurpleHaze))
{
if (item.CountsAsClass<RogueDamageClass>() && StealthStrikeAvailable())
{
+2 -1
View File
@@ -2888,8 +2888,9 @@ namespace CalamityMod.CalPlayer
defenseDamageRecoveryFrames = 0;
// Directly add the base defense damage recovery time to whatever recovery time the player already has.
int baseTime = DefenseDamageBaseRecoveryTime * (moonshine ? 3 : 1);
int baseTime = DefenseDamageBaseRecoveryTime * (moonshine ? 3 : 1) * (Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.Moonshine) ? 3 : 1);
totalDefenseDamageRecoveryFrames = defenseDamageRecoveryFrames + baseTime;
if (totalDefenseDamageRecoveryFrames > DefenseDamageMaxRecoveryTime)
totalDefenseDamageRecoveryFrames = DefenseDamageMaxRecoveryTime;
+17 -2
View File
@@ -194,13 +194,14 @@ namespace CalamityMod.CalPlayer
{
int buff = Player.buffType[l];
if (BuffDatasets.DebuffDataset[buff] is not null && BuffDatasets.DebuffDataset[buff].AlcoholLevel > 0)
alcoholPoisonLevel += BuffDatasets.DebuffDataset[buff].AlcoholLevel;
alcoholPoisonLevel += BuffDatasets.DebuffDataset[buff].AlcoholLevel + (Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.Everclear) ? 1 : 0);
}
if (Player.Calamity().ivDrip) // +1 stack of poisoning while IV Drip is equipped
alcoholPoisonLevel++;
if (everclear)
totalNegativeLifeRegen += Everclear.RegenLoss;
if (Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.Everclear))
totalNegativeLifeRegen += Everclear.RegenLoss;
// Blanket effect for all alcohols
if (alcoholPoisonLevel > 0)
{
@@ -267,8 +268,11 @@ namespace CalamityMod.CalPlayer
// At the last second, Reaver defense helm reduces DoT debuffs by 20%
if (reaverDefense)
totalNegativeLifeRegen -= (int)(totalNegativeLifeRegen * ReaverHeadTank.SetBonusDebuffDamageReduction);
if (tequilaSunrise)
totalNegativeLifeRegen = (int)(totalNegativeLifeRegen * TequilaSunrise.DoTMultiplier);
if (Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.TequilaSunrise))
totalNegativeLifeRegen = (int)(totalNegativeLifeRegen * TequilaSunrise.DoTMultiplier);
Player.lifeRegen -= (int)totalNegativeLifeRegen;
@@ -340,8 +344,19 @@ namespace CalamityMod.CalPlayer
if (tequilaSunrise)
Player.lifeRegenTime += 1800;
}
var dripPlayer = Player.GetModPlayer<IVDripPlayer>();
if (dripPlayer.HasAlcohol(AlcoholType.TequilaSunrise))
{
if (hadLifeRegenHinderingDebuff && !hasLifeRegenHinderingDebuff)
{
Player.lifeRegenTime += 1800;
}
}
#endregion
// During Silva revive or God Slayer dash, all negative life regen is canceled
+60 -9
View File
@@ -566,6 +566,13 @@ namespace CalamityMod.CalPlayer
else if (Player.dashDelay == -1)
Player.velocity.X *= 0.825f;
}
if (Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.CinnamonRoll) && !(Main.getGoodWorld && Main.npc.Any(x => x.active && x.type == ModContent.NPCType<DevourerofGodsHead>())))
{
if (dashStart)
Player.velocity.X *= 2f;
else if (Player.dashDelay == -1)
Player.velocity.X *= 0.825f;
}
if (Player.dashDelay == -1)
IsFirstDashFrame = false;
@@ -1277,6 +1284,18 @@ namespace CalamityMod.CalPlayer
}
}
}
if (Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.Margarita))
{
if (Main.myPlayer == Player.whoAmI)
{
for (int l = 0; l < Player.MaxBuffs; l++)
{
int buffID = Player.buffType[l];
if (Player.buffTime[l] > 2 && CalamityBuffSets.IsDebuff[buffID])
Player.buffTime[l]--;
}
}
}
// Update the Providence Burn effect drawer if applicable.
float providenceBurnIntensity = 0f;
@@ -3357,6 +3376,7 @@ namespace CalamityMod.CalPlayer
#region Other Buff Effects
private void OtherBuffEffects()
{
var dripPlayer = Player.GetModPlayer<IVDripPlayer>();
if (gravityNormalizer)
{
Player.buffImmune[BuffID.VortexDebuff] = true;
@@ -3544,30 +3564,50 @@ namespace CalamityMod.CalPlayer
{
//this is so janky looking but it's the only way I could get it to work properly
if (!(StealthStrikeAvailable() && Player.HeldItem.DamageType == RogueDamageClass.Instance))
Player.GetDamage(DamageClass.Generic) += PurpleHaze.DamageBoost;
Player.GetDamage(DamageClass.Generic) += PurpleHaze.DamageBoost + ((dripPlayer.HasAlcohol(AlcoholType.PurpleHaze) && purpleHaze) ? PurpleHaze.DamageBoost : 0);
else
stealthDamage -= PurpleHaze.StealthDamageLoss;
stealthDamage -= PurpleHaze.StealthDamageLoss + ((dripPlayer.HasAlcohol(AlcoholType.PurpleHaze) && purpleHaze) ? PurpleHaze.StealthDamageLoss : 0);
}
if (everclear)
Player.GetDamage<GenericDamageClass>() += Everclear.DamageBoost;
if (dripPlayer.HasAlcohol(AlcoholType.Everclear))
Player.GetDamage<GenericDamageClass>() += Everclear.DamageBoost;
if (caribbeanRum)
{
Player.gravity *= CaribbeanRum.GravityMultiplier;
Player.moveSpeed += CaribbeanRum.MoveSpeedBoost;
}
if (dripPlayer.HasAlcohol(AlcoholType.CaribbeanRum))
{
Player.gravity *= CaribbeanRum.GravityMultiplier;
Player.moveSpeed += CaribbeanRum.MoveSpeedBoost;
}
if (starBeamRye)
{
Player.manaRegenCount += StarBeamRye.ManaRegenBoost;
Player.GetDamage<MagicDamageClass>() *= StarBeamRye.MagicDmgMult;
}
if (whiteWine)
if (dripPlayer.HasAlcohol(AlcoholType.StarBeamRye))
{
Player.wingTimeMax = (int)(Player.wingTimeMax * (1f - WhiteWine.FlightTimeLoss));
Player.manaRegenCount += StarBeamRye.ManaRegenBoost;
Player.GetDamage<MagicDamageClass>() *= StarBeamRye.MagicDmgMult;
}
if (dripPlayer.HasAlcohol(AlcoholType.Ale) || dripPlayer.HasAlcohol(AlcoholType.Sake))
{
Player.GetAttackSpeed<MeleeDamageClass>() -= 0.1f;
// See CalamityGlobalItem and PlayerUtils for Ale's melee size increase
}
if (whiteWine || dripPlayer.HasAlcohol(AlcoholType.WhiteWine))
{
if (whiteWine)
Player.wingTimeMax = (int)(Player.wingTimeMax * (1f - WhiteWine.FlightTimeLoss));
if (Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.WhiteWine))
Player.wingTimeMax = (int)(Player.wingTimeMax * (1f - WhiteWine.FlightTimeLoss));
float bonus = 0f;
float MaxDistance = 640f;
@@ -3579,7 +3619,12 @@ namespace CalamityMod.CalPlayer
}
else
bonus = 0;
whiteWineTimer += bonus * WhiteWine.FlightTimeRecoveryAmount;
if (whiteWine)
whiteWineTimer += bonus * WhiteWine.FlightTimeRecoveryAmount;
if (Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.WhiteWine))
whiteWineTimer += bonus * WhiteWine.FlightTimeRecoveryAmount;
while (whiteWineTimer > 1)
{
if (Player.wingTime < Player.wingTimeMax)
@@ -3589,9 +3634,9 @@ namespace CalamityMod.CalPlayer
}
if (redWine)
{
Player.wingTimeMax = (int)(Player.wingTimeMax * (1f - RedWine.FlightTimeLoss));
}
if (Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.RedWine))
Player.wingTimeMax = (int)(Player.wingTimeMax * (1f - RedWine.FlightTimeLoss));
if (giantPearl)
{
@@ -4733,6 +4778,12 @@ namespace CalamityMod.CalPlayer
if (Player.statDefense > 0)
Player.statDefense -= (int)(Player.statDefense * Everclear.DefenseLossPercent);
}
if (Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.Everclear))
{
if (Player.statDefense > 0)
Player.statDefense -= (int)(Player.statDefense * Everclear.DefenseLossPercent);
}
if (DesertProwlerHat.ShroudedInSmoke(Player, out _))
Player.statDefense -= (int)(Player.statDefense * DesertProwlerHat.SmokeDefenseMult);
}
+12 -3
View File
@@ -239,7 +239,10 @@ namespace CalamityMod.CalPlayer
if (proj.type != ProjectileType<MythrilFlare>())
MythrilArmorSetChange.OnHitEffects(target, damageDone, Player);
if (moscowMule)
var ivDripPlayer = Player.GetModPlayer<IVDripPlayer>();
// "Heavy" Knockback effect
if (moscowMule || ivDripPlayer.HasAlcohol(AlcoholType.MoscowMule))
{
var center = Player.Center;
if (proj.IsMinionOrSentryRelated)
@@ -254,10 +257,16 @@ namespace CalamityMod.CalPlayer
{
proj.damage = (int)(proj.damage * (moscowMule ? 0.8f : 1f) * (bloodyMary ? 0.75f : 1f));
}
}
if (ivDripPlayer.HasAlcohol(AlcoholType.MoscowMule) || ivDripPlayer.HasAlcohol(AlcoholType.BloodyMary))
{
if (!(PierceResistNPC.exemptProjectiles.Contains(proj.type) || (PierceResistNPC.singleHitboxExemptProjectiles.ContainsKey(proj.type) && PierceResistNPC.singleHitboxExemptProjectiles[proj.type])))
{
proj.damage = (int)(proj.damage * (ivDripPlayer.HasAlcohol(AlcoholType.MoscowMule) ? 0.8f : 1f) * (ivDripPlayer.HasAlcohol(AlcoholType.BloodyMary) ? 0.75f : 1f));
}
}
if (witheringWeaponEnchant)
if (witheringWeaponEnchant)
witheringDamageDone += (int)(damageDone * (hit.Crit ? 2D : 1D));
cgn.TypelessDebuffMultiplier = TypelessDebuffMultiplier;
cgn.HeatDebuffMultiplier = HeatDebuffMultiplier;
+2
View File
@@ -563,6 +563,8 @@ namespace CalamityMod.ILEditing
{
if (self.Calamity().oldFashioned)
damage = (int)(damage * OldFashioned.DamageBoostMultiplier);
if (self.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.OldFashioned))
damage = (int)(damage * OldFashioned.DamageBoostMultiplier);
orig(self, npc, damage, knockback, direction, crit, damageType, damageVariation);
}
#endregion
+247 -18
View File
@@ -1,42 +1,271 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Rarities;
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Audio;
using Terraria.GameContent;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using Terraria.UI;
namespace CalamityMod.Items.Accessories
{
public enum AlcoholType
{
None,
BloodyMary,
CaribbeanRum,
CinnamonRoll,
Everclear,
EvergreenGin,
Fireball,
GrapeBeer,
Manhattan,
Margarita,
Moonshine,
MoscowMule,
OldFashioned,
PurpleHaze,
RedWine,
Rum,
Screwdriver,
StarBeamRye,
Tequila,
TequilaSunrise,
Vodka,
Whiskey,
WhiteWine,
Ale,
Sake
}
public interface IAlcoholItem
{
Action<Player, float> IVDripAlcoholEffect { get; }
AlcoholType AlcoholVariant { get; }
LocalizedText DripEffectText { get; }
}
public class IVDripOnTheRocks : ModItem, ILocalizedModType
{
public int containedAlcoholID = -1;
public AlcoholType currentAlcoholType = AlcoholType.None;
public new string LocalizationCategory => "Items.Accessories";
public static readonly float DamageBoostMultiplier = 1.25f; // Same as Old Fashioned but can be changed at any time
public static readonly float DamageReductionMultiplier = 0.75f; // Same as Old Fashioned but can be changed at any time
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((DamageBoostMultiplier).ToString("N2"), (DamageReductionMultiplier).ToString("N2")); public override void SetDefaults()
public override void SetStaticDefaults()
{
Main.RegisterItemAnimation(Item.type, new Terraria.DataStructures.DrawAnimationVertical(1, 25));
ItemID.Sets.AnimatesAsSoul[Item.type] = true;
}
public override void SetDefaults()
{
Item.width = 58;
Item.height = 60;
Item.height = 62;
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
Item.rare = ItemRarityID.Lime;
Item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
public override void Load()
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.ivDrip = true;
On_ItemSlot.OverrideLeftClick += IvDripAlcoholEquip;
}
public override void AddRecipes()
public override void Unload()
{
CreateRecipe().
AddIngredient<OldFashioned>().
AddIngredient<LivingShard>(6).
AddTile(TileID.MythrilAnvil).
Register();
On_ItemSlot.OverrideLeftClick -= IvDripAlcoholEquip;
}
private bool IvDripAlcoholEquip(On_ItemSlot.orig_OverrideLeftClick orig, Item[] inv, int context, int slot)
{
if (context == ItemSlot.Context.InventoryItem || context == ItemSlot.Context.ChestItem)
{
Item mouseItem = Main.mouseItem;
Item targetItem = inv[slot];
// Vanilla alcohols have to be applied manually
bool isMouseAle = mouseItem.type == ItemID.Ale;
bool isTargetAle = targetItem.type == ItemID.Ale;
bool isMouseSake = mouseItem.type == ItemID.Sake;
bool isTargetSake = targetItem.type == ItemID.Sake;
// Alcohol into this acc
if (targetItem.ModItem is IVDripOnTheRocks drip && (mouseItem.ModItem is IAlcoholItem || isMouseAle || isMouseSake))
{
if (drip.containedAlcoholID == -1)
{
drip.containedAlcoholID = mouseItem.type;
drip.currentAlcoholType = isMouseAle ? AlcoholType.Ale : (isMouseSake ? AlcoholType.Sake : (mouseItem.ModItem as IAlcoholItem).AlcoholVariant);
mouseItem.stack--;
if (mouseItem.stack <= 0)
mouseItem.TurnToAir();
SoundEngine.PlaySound(SoundID.Grab);
return true;
}
}
if (mouseItem.ModItem is IVDripOnTheRocks dripHeld && (targetItem.ModItem is IAlcoholItem || isTargetAle || isTargetSake))
{
if (dripHeld.containedAlcoholID == -1)
{
dripHeld.containedAlcoholID = targetItem.type;
dripHeld.currentAlcoholType = isTargetAle ? AlcoholType.Ale : (isTargetSake ? AlcoholType.Sake : (targetItem.ModItem as IAlcoholItem).AlcoholVariant);
targetItem.stack--;
if (targetItem.stack <= 0)
targetItem.TurnToAir();
SoundEngine.PlaySound(SoundID.Grab);
return true;
}
}
}
return orig(inv, context, slot);
}
#region Shift-Right Click to Empty IV Drip
// Allow shift-right clicking only if the IV drip actually contains alcohol
public override bool CanRightClick() => containedAlcoholID != -1 && Main.keyState.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.LeftShift);
public override void RightClick(Player player)
{
if (containedAlcoholID != -1)
{
// Give the alcohol back to the player
player.QuickSpawnItem(player.GetSource_ItemUse(Item), containedAlcoholID);
containedAlcoholID = -1;
currentAlcoholType = AlcoholType.None;
Item.stack++;
SoundEngine.PlaySound(SoundID.Grab);
}
}
#endregion
public override void PreReforge()
{
if (containedAlcoholID != -1)
{
// Refund the alcohol to the player.
Main.LocalPlayer.QuickSpawnItem(Main.LocalPlayer.GetSource_ItemUse(Item), containedAlcoholID);
containedAlcoholID = -1;
currentAlcoholType = AlcoholType.None;
}
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
IVDripPlayer dripPlayer = player.GetModPlayer<IVDripPlayer>();
dripPlayer.ivDripEquipped = true;
if (containedAlcoholID != -1)
{
dripPlayer.currentAlcohol = currentAlcoholType;
Item alcoholItem = new Item(containedAlcoholID);
if (alcoholItem.ModItem is IAlcoholItem alcohol)
dripPlayer.ApplyIVDripAlcoholEffect(alcohol.IVDripAlcoholEffect);
}
}
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
if (tooltips == null) return;
var effectLine = tooltips.FirstOrDefault(x => x.Text.Contains("[EFFECT]"));
var nameLine = tooltips.FirstOrDefault(x => x.Text.Contains("[NAME]"));
if (containedAlcoholID == -1)
{
if (effectLine != null)
{
effectLine.Text = this.GetLocalizedValue("Empty");
effectLine.OverrideColor = Color.Gray;
}
nameLine?.Hide();
return;
}
if (effectLine != null)
{
if (containedAlcoholID == ItemID.Ale || containedAlcoholID == ItemID.Sake)
effectLine.Text = this.GetLocalizedValue("SakeAndAleText");
else
{
Item alcoholItem = new Item(containedAlcoholID);
if (alcoholItem.ModItem is IAlcoholItem alcohol)
effectLine.Text = alcohol.DripEffectText.Value;
}
}
if (nameLine != null)
{
string alcoholName = Lang.GetItemNameValue(containedAlcoholID);
nameLine.Text = this.GetLocalizedValue("CurrentAlcoholText") + $" [c/FF81E4:{alcoholName}]";
}
}
// Draw the correct alcohol variant frame
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
Texture2D texture = TextureAssets.Item[Item.type].Value;
int frameHeight = texture.Height / 25;
int frameIndex = (int)currentAlcoholType;
Rectangle targetFrame = new Rectangle(0, frameIndex * frameHeight, texture.Width, frameHeight);
spriteBatch.Draw(texture, position, targetFrame, drawColor, 0f, origin, scale, SpriteEffects.None, 0f);
return false;
}
}
public class IVDripPlayer : ModPlayer
{
public Dictionary<Action<Player, float>, float> IVDripAlcoholEffects = new();
public bool ivDripEquipped;
public AlcoholType currentAlcohol = AlcoholType.None;
// would otherwise be spamming these checks manually any time another class wants to check for if IV drip has a certain alcohol filled
public bool HasAlcohol(AlcoholType type)
{
return ivDripEquipped && currentAlcohol == type;
}
public override void ResetEffects()
{
IVDripAlcoholEffects.Clear();
ivDripEquipped = false;
currentAlcohol = AlcoholType.None;
}
public void ApplyIVDripAlcoholEffect(Action<Player, float> effect)
{
if (effect == null)
return;
if (IVDripAlcoholEffects.ContainsKey(effect))
IVDripAlcoholEffects[effect] += 1f;
else
IVDripAlcoholEffects[effect] = 1f;
}
public override void PostUpdateEquips()
{
foreach (var effect in IVDripAlcoholEffects)
{
effect.Key.Invoke(Player, effect.Value);
}
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 17 KiB

+6 -2
View File
@@ -884,8 +884,10 @@ namespace CalamityMod.Items
// This assume all items with a damage hit is a weapon. There appears to be no edge cases for this thus far
if (player.Calamity().oldFashioned)
modifiers.SourceDamage *= OldFashioned.DamageReductionMultiplier;
if (player.Calamity().ivDrip)
modifiers.SourceDamage *= IVDripOnTheRocks.DamageReductionMultiplier;
var dripPlayer = player.GetModPlayer<IVDripPlayer>();
if (dripPlayer.HasAlcohol(AlcoholType.OldFashioned))
modifiers.SourceDamage *= OldFashioned.DamageReductionMultiplier;
}
public override void OnHitNPC(Item item, Player player, NPC target, NPC.HitInfo hit, int damageDone)
@@ -937,6 +939,8 @@ namespace CalamityMod.Items
// Xyk 3MARCH2026: Doesn't work on any non use style 1 items currently, Doze will fix it
if (item.CountsAsClass<MeleeDamageClass>() && player.HasBuff(BuffID.Tipsy))
scale += 0.15f;
if (item.CountsAsClass<MeleeDamageClass>() && (player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.Ale) || player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.Sake)))
scale += 0.15f;
}
public override void UpdateArmorSet(Player player, string set)
{
+20 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
@@ -8,10 +10,26 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class BloodyMary : ModItem, ILocalizedModType
public class BloodyMary : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float PierceDamageMultiplier = 0.66f;
public static float SpawnRateGateMultiplier = 0.142f;
public static float IVDripAdditionalSpawnRateGateMultiplier = 0.7f;
public static float SpawnLimitMultiplier = 5f;
public static float IVDripAdditionalSpawnLimitMultiplier = 1.5f;
public override LocalizedText Tooltip => base.Tooltip;
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.BloodyMary.DripEffect");
public AlcoholType AlcoholVariant => AlcoholType.BloodyMary;
public Action<Player, float> IVDripAlcoholEffect => ApplyBloodyMaryEffect;
private static void ApplyBloodyMaryEffect(Player player, float intensity)
{
// See CalamityPlayerOnHit
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+13 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
@@ -8,14 +10,23 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class CaribbeanRum : ModItem, ILocalizedModType
public class CaribbeanRum : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float MoveSpeedBoost = 0.25f;
public static float GravityMultiplier = 0.5f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MoveSpeedBoost.ToPercent(), (1-GravityMultiplier).ToPercent());
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.CaribbeanRum.DripEffect").WithFormatArgs(MoveSpeedBoost.ToPercent(), (1 - GravityMultiplier).ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.CaribbeanRum;
public Action<Player, float> IVDripAlcoholEffect => ApplyCaribbeanRumEffect;
private static void ApplyCaribbeanRumEffect(Player player, float intensity)
{
// See CalamityPlayerMiscEffects
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+13 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using Microsoft.Xna.Framework;
@@ -9,10 +11,19 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class CinnamonRoll : ModItem, ILocalizedModType
public class CinnamonRoll : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public AlcoholType AlcoholVariant => AlcoholType.CinnamonRoll;
public override LocalizedText Tooltip => base.Tooltip;
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.CinnamonRoll.DripEffect");
public Action<Player, float> IVDripAlcoholEffect => ApplyCinnamonRollEffect;
private static void ApplyCinnamonRollEffect(Player player, float intensity)
{
// See CalamityPlayerMiscEffects and CalamityPlayerOnHit
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+12 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
@@ -8,7 +10,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class Everclear : ModItem, ILocalizedModType
public class Everclear : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
@@ -16,7 +18,15 @@ namespace CalamityMod.Items.Potions.Alcohol
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 LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.Everclear.DripEffect").WithFormatArgs(DamageBoost.ToPercent(), RegenLoss.ToRegenPerSecond(), DefenseLossPercent.ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.Everclear;
public Action<Player, float> IVDripAlcoholEffect => ApplyEverclearEffect;
private static void ApplyEverclearEffect(Player player, float intensity)
{
// See CalamityPlayerLifeRegen and CalamityPlayerMiscEffects
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+16 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
@@ -8,13 +10,25 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class EvergreenGin : ModItem, ILocalizedModType
public class EvergreenGin : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float DebuffBoost = 0.5f;
public static float DebuffLoss = 0.5f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((DebuffBoost).ToPercent(), DebuffLoss.ToPercent());
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.EvergreenGin.DripEffect").WithFormatArgs((DebuffBoost).ToPercent(), DebuffLoss.ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.EvergreenGin;
public Action<Player, float> IVDripAlcoholEffect => ApplyEvergreenGinEffect;
private static void ApplyEvergreenGinEffect(Player player, float intensity)
{
var cplayer = player.Calamity();
cplayer.SicknessDebuffMultiplier += EvergreenGin.DebuffBoost;
cplayer.WaterDebuffMultiplier += EvergreenGin.DebuffBoost;
cplayer.ElectricDebuffMultiplier -= EvergreenGin.DebuffLoss;
cplayer.HeatDebuffMultiplier -= EvergreenGin.DebuffLoss;
}
public override void SetStaticDefaults()
{
+15 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
@@ -8,14 +10,25 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class Fireball : ModItem, ILocalizedModType
public class Fireball : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float DebuffBoost = 0.5f;
public static float DebuffLoss = 0.5f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((DebuffBoost).ToPercent(), DebuffLoss.ToPercent());
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.Fireball.DripEffect").WithFormatArgs((DebuffBoost).ToPercent(), DebuffLoss.ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.Fireball;
public Action<Player, float> IVDripAlcoholEffect => ApplyFireballEffect;
private static void ApplyFireballEffect(Player player, float intensity)
{
var cplayer = player.Calamity();
cplayer.HeatDebuffMultiplier += Fireball.DebuffBoost;
cplayer.SicknessDebuffMultiplier -= Fireball.DebuffLoss;
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+13 -4
View File
@@ -1,6 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -9,15 +9,24 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class GrapeBeer : ModItem, ILocalizedModType
public class GrapeBeer : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float CloseRangeDistance = 80;
public static float LongRangeDistance = 1200;
public static float CloseRangeDamage = 0.75f;
public static float LongRangeDamage = 0.25f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(LongRangeDamage,LongRangeDistance/16f);
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(LongRangeDamage, LongRangeDistance / 16f);
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.GrapeBeer.DripEffect").WithFormatArgs(LongRangeDamage, LongRangeDistance / 16f);
public AlcoholType AlcoholVariant => AlcoholType.GrapeBeer;
public Action<Player, float> IVDripAlcoholEffect => ApplyGrapeBeerEffect;
private static void ApplyGrapeBeerEffect(Player player, float intensity)
{
// See CalamityGlobalProjectile
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+14 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using Microsoft.Xna.Framework;
@@ -9,14 +11,24 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class Manhattan : ModItem, ILocalizedModType
public class Manhattan : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float DebuffBoost = 0.5f;
public static float DebuffLoss = 0.5f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((DebuffBoost).ToPercent(), DebuffLoss.ToPercent());
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.Manhattan.DripEffect").WithFormatArgs((DebuffBoost).ToPercent(), DebuffLoss.ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.Manhattan;
public Action<Player, float> IVDripAlcoholEffect => ApplyManhattanEffect;
private static void ApplyManhattanEffect(Player player, float intensity)
{
var cplayer = player.Calamity();
cplayer.ColdDebuffMultiplier += Manhattan.DebuffBoost;
cplayer.WaterDebuffMultiplier -= Manhattan.DebuffLoss;
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+19 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
@@ -8,7 +10,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class Margarita : ModItem, ILocalizedModType
public class Margarita : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
@@ -16,7 +18,22 @@ namespace CalamityMod.Items.Potions.Alcohol
public static float DebuffLoss = 0.5f;
public static int MinuteDuration = 3;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DebuffLoss.ToPercent());
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.Margarita.DripEffect").WithFormatArgs(DebuffLoss.ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.Margarita;
public Action<Player, float> IVDripAlcoholEffect => ApplyMargaritaEffect;
private static void ApplyMargaritaEffect(Player player, float intensity)
{
var cplayer = player.Calamity();
cplayer.HeatDebuffMultiplier -= Margarita.DebuffLoss;
cplayer.SicknessDebuffMultiplier -= Margarita.DebuffLoss;
cplayer.ColdDebuffMultiplier -= Margarita.DebuffLoss;
cplayer.WaterDebuffMultiplier -= Margarita.DebuffLoss;
cplayer.ElectricDebuffMultiplier -= Margarita.DebuffLoss;
cplayer.TypelessDebuffMultiplier -= Margarita.DebuffLoss;
// Also see CalamityPlayerMiscEffects
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+13 -3
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
@@ -8,13 +10,21 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class Moonshine : ModItem, ILocalizedModType
public class Moonshine : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float MaxLifePercentBoost = 0.33f;
public static float MaxLifePercentBoost = 0.25f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxLifePercentBoost.ToPercent());
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.Moonshine.DripEffect").WithFormatArgs(MaxLifePercentBoost.ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.Moonshine;
public Action<Player, float> IVDripAlcoholEffect => ApplyMoonshineEffect;
private static void ApplyMoonshineEffect(Player player, float intensity)
{
// See CalamityPlayer and CalamityPlayerHitHurt
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+13 -3
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using Microsoft.Xna.Framework;
@@ -9,13 +11,21 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class MoscowMule : ModItem, ILocalizedModType
public class MoscowMule : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float KnockbackBoost = 0.5f;
public static float PierceDamageMultiplier = 0.7f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(KnockbackBoost.ToPercent());
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.MoscowMule.DripEffect").WithFormatArgs(KnockbackBoost.ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.MoscowMule;
public Action<Player, float> IVDripAlcoholEffect => ApplyMoscowMuleEffect;
private static void ApplyMoscowMuleEffect(Player player, float intensity)
{
// See CalamityPlayer and CalamityPlayerOnHit
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+12 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
@@ -8,14 +10,22 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class OldFashioned : ModItem, ILocalizedModType
public class OldFashioned : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static readonly float DamageBoostMultiplier = 1.25f;
public static readonly float DamageReductionMultiplier = 0.75f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((DamageBoostMultiplier).ToString("N2"), (DamageReductionMultiplier).ToString("N2"));
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.OldFashioned.DripEffect").WithFormatArgs(DamageBoostMultiplier.ToString("N2"), DamageReductionMultiplier.ToString("N2"));
public AlcoholType AlcoholVariant => AlcoholType.OldFashioned;
public Action<Player, float> IVDripAlcoholEffect => ApplyOldFashionedEffect;
private static void ApplyOldFashionedEffect(Player player, float intensity)
{
// See CalamityGlobalProjectile
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+13 -3
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
@@ -9,15 +11,23 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
[LegacyName("FabsolsVodka")]
public class PurpleHaze : ModItem, ILocalizedModType
public class PurpleHaze : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float DamageBoost = 0.25f;
public static float StealthDamageLoss = 0.25f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(),StealthDamageLoss.ToPercent());
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.PurpleHaze.DripEffect").WithFormatArgs(DamageBoost.ToPercent(), StealthDamageLoss.ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.PurpleHaze;
public Action<Player, float> IVDripAlcoholEffect => ApplyPurpleHazeEffect;
private static void ApplyPurpleHazeEffect(Player player, float intensity)
{
// See CalamityPlayer and CalamityPlayerMiscEffects
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+13 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Potions.Food;
using Microsoft.Xna.Framework;
@@ -9,14 +11,23 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class RedWine : ModItem, ILocalizedModType
public class RedWine : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float VerticalSpeedBoost = 0.1f;
public static float FlightTimeLoss = 0.25f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(VerticalSpeedBoost.ToPercent(), FlightTimeLoss.ToPercent());
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.RedWine.DripEffect").WithFormatArgs(VerticalSpeedBoost.ToPercent(), FlightTimeLoss.ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.RedWine;
public Action<Player, float> IVDripAlcoholEffect => ApplyRedWineEffect;
private static void ApplyRedWineEffect(Player player, float intensity)
{
// See CalamityPlayer and CalamityPlayerMiscEffects
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+12 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
@@ -8,14 +10,22 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class Rum : ModItem, ILocalizedModType
public class Rum : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float NonMinionBoost = 1.15f;
public static float MinionBoost = 0.85f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((NonMinionBoost-1).ToPercent(), (1- MinionBoost).ToPercent());
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.Rum.DripEffect").WithFormatArgs((NonMinionBoost - 1).ToPercent(), (1 - MinionBoost).ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.Rum;
public Action<Player, float> IVDripAlcoholEffect => ApplyRumEffect;
private static void ApplyRumEffect(Player player, float intensity)
{
// See CalamityGlobalProjectile
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+15 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using Microsoft.Xna.Framework;
@@ -9,14 +11,25 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class Screwdriver : ModItem, ILocalizedModType
public class Screwdriver : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float DebuffBoost = 0.5f;
public static float DebuffLoss = 0.5f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((DebuffBoost).ToPercent(), DebuffLoss.ToPercent());
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.Screwdriver.DripEffect").WithFormatArgs(DebuffBoost.ToString("N2"), DebuffLoss.ToString("N2"));
public AlcoholType AlcoholVariant => AlcoholType.Screwdriver;
public Action<Player, float> IVDripAlcoholEffect => ApplyScrewdriverEffect;
private static void ApplyScrewdriverEffect(Player player, float intensity)
{
player.blockRange += 5;
player.tileSpeed += 1;
player.wallSpeed += 1;
player.GetDamage(DamageClass.Generic) *= 0.75f;
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+12 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
@@ -8,14 +10,22 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class StarBeamRye : ModItem, ILocalizedModType
public class StarBeamRye : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float MagicDmgMult = 0.9f;
public static int ManaRegenBoost = 30;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MagicDmgMult);
public AlcoholType AlcoholVariant => AlcoholType.StarBeamRye;
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.StarBeamRye.DripEffect").WithFormatArgs(MagicDmgMult);
public Action<Player, float> IVDripAlcoholEffect => ApplyStarBeamRyeEffect;
private static void ApplyStarBeamRyeEffect(Player player, float intensity)
{
// See CalamityPlayerMiscEffects
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+14 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
@@ -8,7 +10,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class Tequila : ModItem, ILocalizedModType
public class Tequila : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
@@ -16,7 +18,17 @@ namespace CalamityMod.Items.Potions.Alcohol
public static float DebuffBoost = 0.5f;
public static float DebuffLoss = 0.5f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((DebuffBoost).ToPercent(), DebuffLoss.ToPercent());
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.Tequila.DripEffect").WithFormatArgs((DebuffBoost).ToPercent(), DebuffLoss.ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.Tequila;
public Action<Player, float> IVDripAlcoholEffect => ApplyTequilaEffect;
private static void ApplyTequilaEffect(Player player, float intensity)
{
var cplayer = player.Calamity();
cplayer.ElectricDebuffMultiplier += Tequila.DebuffBoost;
cplayer.ColdDebuffMultiplier -= Tequila.DebuffLoss;
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+12 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using Microsoft.Xna.Framework;
@@ -9,13 +11,21 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class TequilaSunrise : ModItem, ILocalizedModType
public class TequilaSunrise : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float DoTMultiplier = 1.5f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((DoTMultiplier-1).ToPercent());
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.TequilaSunrise.DripEffect").WithFormatArgs((DoTMultiplier-1).ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.TequilaSunrise;
public Action<Player, float> IVDripAlcoholEffect => ApplyTequilaSunriseEffect;
private static void ApplyTequilaSunriseEffect(Player player, float intensity)
{
// See CalamityPlayerLifeRegen
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+18 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using Microsoft.Xna.Framework;
@@ -9,14 +11,28 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class Vodka : ModItem, ILocalizedModType
public class Vodka : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float DebuffBoost = 0.25f;
public static float DebuffLoss = 0.5f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((DebuffBoost).ToPercent(), DebuffLoss.ToPercent());
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.Vodka.DripEffect").WithFormatArgs((DebuffBoost).ToPercent(), DebuffLoss.ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.Vodka;
public Action<Player, float> IVDripAlcoholEffect => ApplyVodkaEffect;
private static void ApplyVodkaEffect(Player player, float intensity)
{
var cplayer = player.Calamity();
cplayer.TypelessDebuffMultiplier += Vodka.DebuffBoost;
cplayer.HeatDebuffMultiplier -= Vodka.DebuffLoss;
cplayer.ColdDebuffMultiplier -= Vodka.DebuffLoss;
cplayer.SicknessDebuffMultiplier -= Vodka.DebuffLoss;
cplayer.WaterDebuffMultiplier -= Vodka.DebuffLoss;
cplayer.ElectricDebuffMultiplier -= Vodka.DebuffLoss;
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+18 -5
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
@@ -8,16 +10,27 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class Whiskey : ModItem, ILocalizedModType
public class Whiskey : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float MaxDamageBoost = 0.15f;
public static float MinDamageBoost = -0.15f;
public static float StandardDamageCeiling = 0.15f;
public static float StandardDamageFloor = -0.15f;
public static float TimeToDischarge = 600;
public static float TimeToRecharge = 300;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinDamageBoost.ToPercent(), MaxDamageBoost.ToPercent(), (TimeToDischarge/60).ToString("0.##"), (TimeToRecharge/60).ToString("0.##"));
public static float CombinedDamageCeiling = 0.3f;
public static float CombinedDamageFloor = -0.3f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(StandardDamageFloor.ToPercent(), StandardDamageCeiling.ToPercent(), (TimeToDischarge/60).ToString("0.##"), (TimeToRecharge/60).ToString("0.##"));
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.Whiskey.DripEffect").WithFormatArgs(StandardDamageFloor.ToPercent(), StandardDamageCeiling.ToPercent(), (TimeToDischarge / 60).ToString("0.##"), (TimeToRecharge / 60).ToString("0.##"), CombinedDamageFloor.ToPercent(), CombinedDamageCeiling.ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.Whiskey;
public Action<Player, float> IVDripAlcoholEffect => ApplyWhiskeyEffect;
private static void ApplyWhiskeyEffect(Player player, float intensity)
{
// See CalamityPlayer
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
+12 -2
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Alcohol;
using System;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using Microsoft.Xna.Framework;
@@ -10,14 +12,22 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Potions.Alcohol
{
public class WhiteWine : ModItem, ILocalizedModType
public class WhiteWine : ModItem, ILocalizedModType, IAlcoholItem
{
public new string LocalizationCategory => "Items.Potions";
public static float FlightTimeRecoveryAmount = 0.66f;
public static float FlightTimeLoss = 0.5f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(FlightTimeLoss.ToPercent());
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.WhiteWine.DripEffect").WithFormatArgs(FlightTimeLoss.ToPercent());
public AlcoholType AlcoholVariant => AlcoholType.WhiteWine;
public Action<Player, float> IVDripAlcoholEffect => ApplyWhiteWineEffect;
private static void ApplyWhiteWineEffect(Player player, float intensity)
{
// See CalamityPlayerMiscEffects
}
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
@@ -1032,12 +1032,18 @@ IVDripOnTheRocks: {
DisplayName: IV Drip on the Rocks
Tooltip:
'''
Multiplies most non-weapon, non-debuff damage by {0}x
Multiplies all weapon damage by {1}x
[EFFECT]
[NAME]
Counts as an alcohol stack toward Alcohol Poisoning
Drinking the same type of alcohol as in the IV drip does not contribute to Alcohol Poisoning
{$Common.AlcoholWarning}
[c/aaaaaa:Shift-<right> this item in your inventory to empty its contents]
[ceffect/drunk:'(drunken mumbling)']
'''
Empty: The IV drip is currently empty.
CurrentAlcoholText: Filled with
SakeAndAleText: Increases melee weapon scale by 15%, but decreases melee speed by 10%
}
JellyChargedBattery: {
@@ -191,6 +191,12 @@ BloodyMary: {
Greatly reduces piercing weapon effectiveness
{$Common.AlcoholWarning}
'''
DripEffect:
'''
Increases enemy spawn rates by 7x
Greatly reduces piercing weapon effectiveness
When combined with drinking Bloody Mary straight, enemy spawn rates are increased by 10x total
'''
}
CaribbeanRum: {
@@ -201,6 +207,11 @@ CaribbeanRum: {
Reduces your gravity by {1}%
{$Common.AlcoholWarning}
'''
DripEffect:
'''
Increases move speed by {0}%
Reduces your gravity by {1}%
'''
}
CinnamonRoll: {
@@ -211,14 +222,10 @@ CinnamonRoll: {
Greatly reduces dash distance
{$Common.AlcoholWarning}
'''
}
PurpleHaze: {
DisplayName: Purple Haze
Tooltip:
DripEffect:
'''
For 5 seconds after a stealth strike, all damage increased by {0}%, but stealth strike damage reduced by {1}%
{$Common.AlcoholWarning}
Greatly increases dash speed
Greatly reduces dash distance
'''
}
@@ -231,6 +238,12 @@ Everclear: {
Counts as 2 alcohols for {$Buffs.AlcoholPoisoning.DisplayName}
{$Common.AlcoholWarning}
'''
DripEffect:
'''
{0}% increased damage
Reduces life regen by {1} HP/s and defense by {2}%
Counts as giving an additional stack of alcohol for {$Buffs.AlcoholPoisoning.DisplayName}
'''
}
EvergreenGin: {
@@ -241,6 +254,11 @@ EvergreenGin: {
{1}% decreased Electric and Heat debuff damage
{$Common.AlcoholWarning}
'''
DripEffect:
'''
{0}% increased Water and Sickness debuff damage
{1}% decreased Electric and Heat debuff damage
'''
}
Fireball: {
@@ -251,6 +269,11 @@ Fireball: {
{1}% decreased Sickness debuff damage
{$Common.AlcoholWarning}
'''
DripEffect:
'''
{0}% increased Heat debuff damage
{1}% decreased Sickness debuff damage
'''
}
GrapeBeer: {
@@ -262,6 +285,13 @@ GrapeBeer: {
This reaches a minimum of {0}x damage at {1} tiles away
{$Common.AlcoholWarning}
'''
DripEffect:
'''
Bullets, Arrows, Darts, and Rockets gain homing
Projectiles deal less damage the further the enemy is
This reaches a minimum of {0}x damage at {1} tiles away
When combined with drinking Grape Beer straight, homing range is increased
'''
}
Manhattan: {
@@ -272,6 +302,11 @@ Manhattan: {
{1}% decreased Water debuff damage
{$Common.AlcoholWarning}
'''
DripEffect:
'''
{0}% increased Cold debuff damage
{1}% decreased Water debuff damage
'''
}
Margarita: {
@@ -282,6 +317,11 @@ Margarita: {
Reduces damage of debuffs you inflict by {0}%
{$Common.AlcoholWarning}
'''
DripEffect:
'''
Halves duration of harmful debuffs you receive
Reduces damage of debuffs you inflict by {0}%
'''
}
Moonshine: {
@@ -293,6 +333,12 @@ Moonshine: {
Defense damage takes three times as long to recover
{$Common.AlcoholWarning}
'''
DripEffect:
'''
Increases maximum health by {0}%
Attacks always take at least half your defense worth of defense damage
Defense damage takes three times as long to recover
'''
}
MoscowMule: {
@@ -303,6 +349,11 @@ MoscowMule: {
Reduces the effectiveness of piercing weapons
{$Common.AlcoholWarning}
'''
DripEffect:
'''
{0}% increased knockback, all attacks inflict heavy knockback
Reduces the effectiveness of piercing weapons
'''
}
OddMushroom: {
@@ -323,6 +374,21 @@ OldFashioned: {
Multiplies all weapon damage by {1}x
{$Common.AlcoholWarning}
'''
DripEffect:
'''
Multiplies most non-weapon, non-debuff damage by {0}x
Multiplies all weapon damage by {1}x
'''
}
PurpleHaze: {
DisplayName: Purple Haze
Tooltip:
'''
For 5 seconds after a stealth strike, all damage increased by {0}%, but stealth strike damage reduced by {1}%
{$Common.AlcoholWarning}
'''
DripEffect: For 5 seconds after a stealth strike, all damage increased by {0}%, but stealth strike damage reduced by {1}%
}
RedWine: {
@@ -333,6 +399,11 @@ RedWine: {
{1}% reduced flight time
{$Common.AlcoholWarning}
'''
DripEffect:
'''
{0}% increased vertical speed
{1}% reduced flight time
'''
}
Rum: {
@@ -343,6 +414,11 @@ Rum: {
{1}% decreased minion damage
{$Common.AlcoholWarning}
'''
DripEffect:
'''
{0}% increased non-minion summon damage
{1}% decreased minion damage
'''
}
Screwdriver: {
@@ -353,6 +429,11 @@ Screwdriver: {
Greatly reduces damage dealt
{$Common.AlcoholWarning}
'''
DripEffect:
'''
Greatly increases tile and wall placement range and speed
Greatly reduces damage dealt
'''
}
StarBeamRye: {
@@ -363,6 +444,11 @@ StarBeamRye: {
Magic weapons deal {0}x damage
{$Common.AlcoholWarning}
'''
DripEffect:
'''
Increases Mana regeneration, even while using an item
Magic weapons deal {0}x damage
'''
}
Tequila: {
@@ -373,6 +459,11 @@ Tequila: {
{1}% decreased Cold debuff damage
{$Common.AlcoholWarning}
'''
DripEffect:
'''
{0}% increased Electric debuff damage
{1}% decreased Cold debuff damage
'''
}
TequilaSunrise: {
@@ -383,6 +474,11 @@ TequilaSunrise: {
{0}% increased damage taken from debuffs
{$Common.AlcoholWarning}
'''
DripEffect:
'''
Greatly increases natural life regeneration after suffering a damaging debuff
{0}% increased damage taken from debuffs
'''
}
Vodka: {
@@ -393,6 +489,11 @@ Vodka: {
{1}% decreased elemental debuff damage
{$Common.AlcoholWarning}
'''
DripEffect:
'''
{0}% increased Typeless debuff damage
{1}% decreased elemental debuff damage
'''
}
Whiskey: {
@@ -405,6 +506,14 @@ Whiskey: {
This boost recharges when holding weapons of a different class, taking {3} seconds to fully recharge
{$Common.AlcoholWarning}
'''
DripEffect:
'''
Provides between {0}% and {1}% damage to the held weapon's class
Each class tracks this boost individually
This boost lowers the longer you hold weapons of the same class, taking {2} seconds to fully decay
This boost recharges when holding weapons of a different class, taking {3} seconds to fully recharge
When combined with drinking Whiskey straight, damage varies between {4}% and {5}%
'''
}
WhiteWine: {
@@ -415,6 +524,11 @@ WhiteWine: {
{0}% reduced flight time
{$Common.AlcoholWarning}
'''
DripEffect:
'''
You regain flight time the closer you are to an enemy
{0}% reduced flight time
'''
}
// Food
+10 -3
View File
@@ -15,6 +15,7 @@ using CalamityMod.Graphics.Metaballs;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Accessories.Vanity;
using CalamityMod.Items.Armor.PlagueReaper;
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.Items.Tools;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.NPCs.Abyss;
@@ -4242,10 +4243,16 @@ namespace CalamityMod.NPCs
spawnRate = (int)(spawnRate * 0.25); // 4x spawn rate
maxSpawns = (int)(maxSpawns * 4f);
}
if (player.Calamity().bloodyMary)
if (player.Calamity().bloodyMary || player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.BloodyMary))
{
spawnRate = (int)(spawnRate * 0.142); // ~7x spawn rate
maxSpawns = (int)(maxSpawns * 5f); // Only 5x the cap, however
spawnRate = (int)(spawnRate * BloodyMary.SpawnRateGateMultiplier); // ~7x spawn rate
maxSpawns = (int)(maxSpawns * BloodyMary.SpawnLimitMultiplier); // 5x spawn rate cap
}
// Only when BOTH effects are active, also applies the previous spawn rate and limit boosts multiplicatively
if (player.Calamity().bloodyMary && player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.BloodyMary))
{
spawnRate = (int)(spawnRate * BloodyMary.IVDripAdditionalSpawnRateGateMultiplier); // 1.429x spawn rate, total of 10x
maxSpawns = (int)(maxSpawns * BloodyMary.IVDripAdditionalSpawnLimitMultiplier); // 1.5x spawn rate cap
}
// Reductions
+17 -14
View File
@@ -340,7 +340,8 @@ namespace CalamityMod.Projectiles
void ApplyGrapeBeer()
{
grapeBeer = true;
conditionalHomingRange = 300;
var ivDripPlayer = Main.player[projectile.owner].GetModPlayer<IVDripPlayer>();
conditionalHomingRange = ivDripPlayer.HasAlcohol(AlcoholType.GrapeBeer) ? 800 : 300;
if (projectile.timeLeft > 300 * projectile.MaxUpdates)
projectile.timeLeft = 300 * projectile.MaxUpdates;
//Calamity adds a hybrid iframe system when both local and static are set to true, so this works fine for both global and static projectiles.
@@ -4326,10 +4327,10 @@ namespace CalamityMod.Projectiles
grapeBeerHomingPower = 0.015f;
}
HomingTarget = grapeBeerHomingTarget = target.whoAmI;
HomingTarget = grapeBeerHomingTarget = target.whoAmI;
Vector2 targetDirection = projectile.SafeDirectionTo(target.Center);
float trackingSpeed = grapeBeerHomingPower;// Vector2.Dot(targetDirection, projectile.velocity.SafeNormalize(Vector2.UnitX)) > 0.835f ? 0.01325f : 0f; // Delicate values, please test changes you make to them
float trackingSpeed = grapeBeerHomingPower;
var currVelocity = projectile.velocity.Length();
if (currVelocity < 8)
@@ -4623,28 +4624,29 @@ namespace CalamityMod.Projectiles
}
// Old Fashioned buffs (or debuffs) apply if the player has Old Fashioned
// IV Drip on the Rocks inherits the same logic as Old Fashioned
if (modPlayer.oldFashioned && buffedByOldFashioned.HasValue)
modifiers.SourceDamage *= buffedByOldFashioned.Value ? OldFashioned.DamageBoostMultiplier : OldFashioned.DamageReductionMultiplier;
if (modPlayer.ivDrip && buffedByOldFashioned.HasValue)
modifiers.SourceDamage *= buffedByOldFashioned.Value ? IVDripOnTheRocks.DamageBoostMultiplier : IVDripOnTheRocks.DamageReductionMultiplier;
if (modPlayer.rum && projectile.DamageType.CountsAsClass(DamageClass.Summon))
var dripPlayer = player.GetModPlayer<IVDripPlayer>();
if (dripPlayer.HasAlcohol(AlcoholType.OldFashioned) && buffedByOldFashioned.HasValue)
modifiers.SourceDamage *= buffedByOldFashioned.Value ? OldFashioned.DamageBoostMultiplier : OldFashioned.DamageReductionMultiplier;
if ((modPlayer.rum || dripPlayer.HasAlcohol(AlcoholType.Rum)) && projectile.DamageType.CountsAsClass(DamageClass.Summon))
{
if (projectile.minion || ProjectileID.Sets.MinionShot[projectile.type])
{
modifiers.SourceDamage *= Rum.MinionBoost;
}
modifiers.SourceDamage *= (modPlayer.rum ? Rum.MinionBoost : 1f) * (dripPlayer.HasAlcohol(AlcoholType.Rum) ? Rum.MinionBoost : 1f);
else
modifiers.SourceDamage *= Rum.NonMinionBoost;
modifiers.SourceDamage *= (modPlayer.rum ? Rum.NonMinionBoost : 1f) * (dripPlayer.HasAlcohol(AlcoholType.Rum) ? Rum.NonMinionBoost : 1f);
}
if (modPlayer.moscowMule || modPlayer.bloodyMary)
if (modPlayer.moscowMule || modPlayer.bloodyMary || dripPlayer.HasAlcohol(AlcoholType.MoscowMule) || dripPlayer.HasAlcohol(AlcoholType.BloodyMary))
{
if (projectile.DamageType == DamageClass.Summon || (PierceResistNPC.exemptProjectiles.Contains(projectile.type) || (PierceResistNPC.singleHitboxExemptProjectiles.ContainsKey(projectile.type) && PierceResistNPC.singleHitboxExemptProjectiles[projectile.type])))
{
modifiers.SourceDamage *= ((modPlayer.moscowMule ? 0.7f : 1f) * (modPlayer.bloodyMary ? 0.33f : 1f));
modifiers.SourceDamage *= ((modPlayer.moscowMule ? MoscowMule.PierceDamageMultiplier : 1f) * (modPlayer.bloodyMary ? BloodyMary.PierceDamageMultiplier : 1f) * (dripPlayer.HasAlcohol(AlcoholType.MoscowMule) ? MoscowMule.PierceDamageMultiplier : 1f) * (dripPlayer.HasAlcohol(AlcoholType.BloodyMary) ? BloodyMary.PierceDamageMultiplier : 1f));
}
}
if (projectile.type == ProjectileID.JoustingLance || projectile.type == ProjectileID.HallowJoustingLance || projectile.type == ProjectileID.ShadowJoustingLance)
{
// The vanilla damage Jousting Lance multiplier is as follows. Calamity overrides this with a new formula
@@ -4798,7 +4800,8 @@ namespace CalamityMod.Projectiles
{
var player = Main.player[projectile.owner];
float burnRatio = (-player.statMana / 100) * ChaosStone.DamageMultPer100Mana;
target.Calamity().manaBurn += damageDone * burnRatio * (player.Calamity().oldFashioned ? OldFashioned.DamageBoostMultiplier : 1) * (player.Calamity().ivDrip ? IVDripOnTheRocks.DamageBoostMultiplier : 1) * (player.Calamity().vodka ? 1+Vodka.DebuffBoost : 1);
var dripPlayer = player.GetModPlayer<IVDripPlayer>();
target.Calamity().manaBurn += damageDone * burnRatio * (dripPlayer.HasAlcohol(AlcoholType.OldFashioned) ? OldFashioned.DamageBoostMultiplier : 1) * (dripPlayer.HasAlcohol(AlcoholType.OldFashioned) ? OldFashioned.DamageBoostMultiplier : 1) * (player.Calamity().vodka ? 1+Vodka.DebuffBoost : 1);
target.Calamity().playerManaBurnIntensity = -player.statMana / (float)player.statManaMax2;
if (Main.netMode != NetmodeID.SinglePlayer)
ManaBurnSyncPacket.Send(target);
+2 -1
View File
@@ -149,7 +149,8 @@ namespace CalamityMod
baseScale += (player.HeldItem.scale - 1);
if (player.HasBuff(BuffID.Tipsy))
baseScale += 0.15f;
if (player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.Ale) || player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.Sake))
baseScale += 0.15f;
return baseScale;
}