+ Merge 1.4.4
No files matched your search
@@ -167,9 +167,6 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Aegis Blade's explosions because the true melee resist ain't enough.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AegisBlast>()))));
|
||||
|
||||
// 40% resist to Icicle Arrows.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<IcicleArrowProj>()))));
|
||||
|
||||
// 35% resist to Flying Dragon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2SquireSonicBoom))));
|
||||
|
||||
@@ -213,9 +210,6 @@ namespace CalamityMod.Balancing
|
||||
// 35% resist to Aerial Bane.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2BetsyArrow))));
|
||||
|
||||
// 35% resist to Icicle Arrows.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<IcicleArrowProj>()))));
|
||||
|
||||
// 30% resist to Aurora Blazer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
|
||||
|
||||
@@ -254,9 +248,6 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Galactus Blade.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.5f, ProjectileType<GalacticaComet>())));
|
||||
|
||||
// 40% resist to Pristine Fury's alt fire.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<PristineSecondary>())));
|
||||
|
||||
// 40% resist to Stellar Torus Staff.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<StellarTorusBeam>())));
|
||||
#endregion
|
||||
@@ -274,9 +265,6 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Legion of Celestia.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<CelestialAxeMinion>()))));
|
||||
|
||||
// 50% resist to Pristine Fury's alt fire.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<PristineSecondary>()))));
|
||||
|
||||
// 50% resist to Tactician's Trump Card's explosions.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TacticiansElectricBoom>()))));
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 646 B After Width: | Height: | Size: 871 B |
|
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 866 B |
|
Before Width: | Height: | Size: 651 B After Width: | Height: | Size: 832 B |
|
Before Width: | Height: | Size: 736 B After Width: | Height: | Size: 819 B |
|
Before Width: | Height: | Size: 668 B After Width: | Height: | Size: 907 B |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 818 B |
|
Before Width: | Height: | Size: 640 B After Width: | Height: | Size: 885 B |
|
Before Width: | Height: | Size: 626 B After Width: | Height: | Size: 815 B |
|
Before Width: | Height: | Size: 729 B After Width: | Height: | Size: 842 B |
|
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 813 B |
|
Before Width: | Height: | Size: 743 B After Width: | Height: | Size: 898 B |
|
Before Width: | Height: | Size: 649 B After Width: | Height: | Size: 788 B |
|
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 807 B |
|
Before Width: | Height: | Size: 688 B After Width: | Height: | Size: 816 B |
|
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 789 B |
|
Before Width: | Height: | Size: 656 B After Width: | Height: | Size: 828 B |
|
Before Width: | Height: | Size: 716 B After Width: | Height: | Size: 836 B |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 822 B |
|
Before Width: | Height: | Size: 700 B After Width: | Height: | Size: 964 B |
|
Before Width: | Height: | Size: 706 B After Width: | Height: | Size: 820 B |
|
Before Width: | Height: | Size: 752 B After Width: | Height: | Size: 790 B |
|
Before Width: | Height: | Size: 698 B After Width: | Height: | Size: 848 B |
@@ -61,7 +61,6 @@ using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Projectiles.Melee.Shortswords;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
@@ -70,6 +69,7 @@ using CalamityMod.Systems;
|
||||
using CalamityMod.Systems.Collections;
|
||||
using CalamityMod.Systems.Mechanic;
|
||||
using CalamityMod.Utilities;
|
||||
using CalamityMod.Waters;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -85,7 +85,6 @@ using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
using Terraria.Net;
|
||||
using Terraria.WorldBuilding;
|
||||
using static Terraria.Main;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
@@ -141,6 +140,13 @@ namespace CalamityMod.CalPlayer
|
||||
/// </summary>
|
||||
public bool heldGaelsLastFrame = false;
|
||||
/// <summary>
|
||||
/// Tracks whether or not the player is currently holding Elephant Killer.<br/>
|
||||
/// Used to reset stealth when swapping to this item.
|
||||
/// </summary>
|
||||
public bool heldElephantKillerLastFrame = false;
|
||||
public float elephantKillerJoke = 0;
|
||||
public bool drawingElephantKillerJoke = false;
|
||||
/// <summary>
|
||||
/// Tracks whether or not the player currently has Draedon's Heart equipped.<br/>
|
||||
/// Used to reset Adrenaline when (un)equipped to prevent exploits.
|
||||
/// </summary>
|
||||
@@ -3083,6 +3089,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.HeldItem.IsAir || Player.HeldItem.fishingPole == 0)
|
||||
consecutiveCaughtFish = 0;
|
||||
heldGaelsLastFrame = false;
|
||||
heldElephantKillerLastFrame = false;
|
||||
partialLifeRegenCounter = 0f;
|
||||
gaelSwipes = 0;
|
||||
whitewaterHeal = 0;
|
||||
@@ -4288,12 +4295,217 @@ namespace CalamityMod.CalPlayer
|
||||
vector = player.CheckForGoodTeleportationSpot(ref canSpawn, halfWorldXTiles + smallerCheckRadius, smallerCheckRadius, teleportStartY, teleportRangeY, settings);
|
||||
|
||||
if (canSpawn)
|
||||
{
|
||||
return (Vector2?)vector;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a random position in the Lihzhard Temple to teleport the player to. <br></br>
|
||||
/// Used primarily for <see cref="Items.Potions.TheElixir"/>.
|
||||
/// </summary>
|
||||
public static Vector2? GetTempleTeleportPosition(Player player)
|
||||
{
|
||||
int foundX = -1;
|
||||
int foundY = -1;
|
||||
bool dungeonOnRightSide = Main.dungeonX > Main.spawnTileX;
|
||||
int xSearchEnd = dungeonOnRightSide ? 20 : Main.maxTilesX - 20;
|
||||
|
||||
if (dungeonOnRightSide)
|
||||
{
|
||||
for (int i = Main.spawnTileX; i >= xSearchEnd; i -= 2)
|
||||
{
|
||||
for (int j = (int)Main.worldSurface; j < Main.maxTilesY - 210; j++)
|
||||
{
|
||||
Tile tile = Framing.GetTileSafely(i, j);
|
||||
if (tile.WallType == WallID.LihzahrdBrickUnsafe)
|
||||
{
|
||||
foundX = i;
|
||||
foundY = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (foundX != -1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = Main.spawnTileX; i <= xSearchEnd; i += 2)
|
||||
{
|
||||
for (int j = (int)Main.worldSurface; j < Main.maxTilesY - 210; j++)
|
||||
{
|
||||
Tile tile = Framing.GetTileSafely(i, j);
|
||||
if (tile.WallType == WallID.LihzahrdBrickUnsafe)
|
||||
{
|
||||
foundX = i;
|
||||
foundY = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundX != -1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundX == -1)
|
||||
return null;
|
||||
|
||||
int attempts = 25;
|
||||
int rangeX = 300;
|
||||
int rangeY = 300;
|
||||
int randomFluff = 500;
|
||||
Point finalTeleportPoint = Point.Zero;
|
||||
for (int i = 0; i < attempts; i++)
|
||||
{
|
||||
for (int x = 0; x <= rangeX; x++)
|
||||
{
|
||||
for (int y = 0; y <= rangeY; y++)
|
||||
{
|
||||
int teleportPosX = foundX + x + Main.rand.Next(-randomFluff, randomFluff);
|
||||
int teleportPosY = foundY + y + Main.rand.Next(-randomFluff, randomFluff);
|
||||
Tile tile = Framing.GetTileSafely(teleportPosX, teleportPosY);
|
||||
Tile tileAbove = Framing.GetTileSafely(teleportPosX, teleportPosY - 1);
|
||||
Tile tileBelow = Framing.GetTileSafely(teleportPosX, teleportPosY + 1);
|
||||
|
||||
if (!tileAbove.HasTile && tileBelow.HasTile && tile.WallType == WallID.LihzahrdBrickUnsafe)
|
||||
{
|
||||
finalTeleportPoint = new(tile.X(), tile.Y());
|
||||
if (!Collision.SolidCollision(finalTeleportPoint.ToWorldCoordinates(), player.width, player.height))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return finalTeleportPoint.ToWorldCoordinates() - new Vector2(player.width, player.height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a random position in the Void (Abyss Layer 4) to teleport the player to. <br></br>
|
||||
/// Used primarily for <see cref="Items.Potions.TheElixir"/>.
|
||||
/// </summary>
|
||||
public static Vector2? GetAbyssVoidTeleportPosition(Player player)
|
||||
{
|
||||
bool canSpawn = false;
|
||||
int halfWorldWidth = Main.maxTilesX / 2;
|
||||
|
||||
int abyssStartX = Abyss.AtLeftSideOfWorld ? halfWorldWidth - (halfWorldWidth - 135) + 35 : halfWorldWidth + (halfWorldWidth - 135) - 35;
|
||||
int abyssXRange = 50;
|
||||
|
||||
int teleportStartY = Main.remixWorld ? SulphurousSea.YStart - (int)(Main.UnderworldLayer * 0.6f) : Main.maxTilesY - 300;
|
||||
int teleportRangeY = 80;
|
||||
|
||||
Player.RandomTeleportationAttemptSettings settings = new Player.RandomTeleportationAttemptSettings
|
||||
{
|
||||
mostlySolidFloor = false,
|
||||
avoidAnyLiquid = false,
|
||||
avoidLava = true,
|
||||
avoidHurtTiles = true,
|
||||
avoidWalls = false,
|
||||
attemptsBeforeGivingUp = 1000,
|
||||
maximumFallDistanceFromOrignalPoint = 10
|
||||
};
|
||||
|
||||
Vector2 teleportPosition = player.CheckForGoodTeleportationSpot(ref canSpawn, abyssStartX, abyssXRange, teleportStartY, teleportRangeY, settings);
|
||||
return canSpawn ? teleportPosition : null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a random position in the Forsaken Archives to teleport the player to. <br></br>
|
||||
/// Used primarily for <see cref="Items.Potions.TheElixir"/>.
|
||||
/// </summary>
|
||||
public static Vector2? GetDungeonArchivesTeleportPosition(Player player)
|
||||
{
|
||||
// Define an area around the center to search for a valid spot to tp
|
||||
int teleportStartX = WorldgenManagementSystem.DungeonArchivePos.X;
|
||||
int teleportStartY = WorldgenManagementSystem.DungeonArchivePos.Y;
|
||||
|
||||
// Manually search for the Archives from the bottom of the world if the Archive position isn't saved.
|
||||
if (WorldgenManagementSystem.DungeonArchivePos == Point.Zero)
|
||||
{
|
||||
int foundX = -1;
|
||||
int foundY = -1;
|
||||
bool dungeonOnRightSide = Main.dungeonX > Main.spawnTileX;
|
||||
int xSearchStart = dungeonOnRightSide ? Main.maxTilesX - 20 : 20;
|
||||
|
||||
if (dungeonOnRightSide)
|
||||
{
|
||||
for (int y = Main.UnderworldLayer; y > (int)Main.rockLayer; y--)
|
||||
{
|
||||
for (int x = xSearchStart; x >= Main.maxTilesX / 2; x -= 2)
|
||||
{
|
||||
Tile tile = Framing.GetTileSafely(x, y);
|
||||
if (Main.wallDungeon[tile.WallType] && Main.tileDungeon[tile.TileType])
|
||||
{
|
||||
foundX = x;
|
||||
foundY = y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundY != -1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int y = Main.UnderworldLayer; y > (int)Main.rockLayer; y--)
|
||||
{
|
||||
for (int x = xSearchStart; x <= Main.maxTilesX / 2; x += 2)
|
||||
{
|
||||
Tile tile = Framing.GetTileSafely(x, y);
|
||||
if (Main.wallDungeon[tile.WallType] && Main.tileDungeon[tile.TileType])
|
||||
{
|
||||
foundX = x;
|
||||
foundY = y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundY != -1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundY == -1)
|
||||
return null;
|
||||
|
||||
teleportStartX = foundX;
|
||||
teleportStartY = foundY;
|
||||
}
|
||||
|
||||
int attempts = 25;
|
||||
int rangeX = 100;
|
||||
int rangeY = 200;
|
||||
int randomFluff = 60;
|
||||
Point finalTeleportPoint = Point.Zero;
|
||||
for (int i = 0; i < attempts; i++)
|
||||
{
|
||||
for (int x = -rangeX; x <= rangeX; x++)
|
||||
{
|
||||
for (int y = 0; y <= rangeY; y++)
|
||||
{
|
||||
int teleportPosX = teleportStartX + x + Main.rand.Next(-randomFluff, randomFluff);
|
||||
int teleportPosY = teleportStartY + y + Main.rand.Next(-randomFluff, randomFluff);
|
||||
Tile tile = Framing.GetTileSafely(teleportPosX, teleportPosY);
|
||||
Tile tileAbove = Framing.GetTileSafely(teleportPosX, teleportPosY - 1);
|
||||
Tile tileBelow = Framing.GetTileSafely(teleportPosX, teleportPosY + 1);
|
||||
|
||||
if (!tileAbove.HasTile && tileBelow.HasUnactuatedTile && Main.wallDungeon[tile.WallType])
|
||||
{
|
||||
finalTeleportPoint = new(tile.X(), tile.Y());
|
||||
if (!Collision.SolidCollision(finalTeleportPoint.ToWorldCoordinates(), player.width, player.height))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return finalTeleportPoint.ToWorldCoordinates() - new Vector2(player.width, player.height);
|
||||
}
|
||||
|
||||
public static void ModTeleport(Player player, Vector2 pos, bool playSound = true, int style = TeleportationStyleID.RecallPotion)
|
||||
{
|
||||
bool postImmune = player.immune;
|
||||
@@ -4610,12 +4822,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 +5134,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 +5143,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 +5159,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 +5177,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 +5194,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 +5211,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 +5237,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 +5377,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;
|
||||
}
|
||||
@@ -5307,16 +5530,18 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (Player.Calamity().baconOil && !Player.mount.Active)
|
||||
if ((Player.Calamity().baconOil || Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.BaconOil)) && !Player.mount.Active)
|
||||
{
|
||||
Player.noFallDmg = true;
|
||||
|
||||
|
||||
float stackScale = (Player.Calamity().baconOil && Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.BaconOil)) ? 1.33f : 1;
|
||||
|
||||
float velX = Math.Abs(Player.velocity.X);
|
||||
float velY = Math.Abs(Player.velocity.Y);
|
||||
|
||||
float speedMult = Player.GetBestClassDamage().ApplyTo(1);
|
||||
float maxMoveSpeed = 10.5f * speedMult;
|
||||
float minMoveSpeed = 3; // Minimum move speed to be at if the player can bounce
|
||||
float maxMoveSpeed = 10.5f * speedMult * stackScale;
|
||||
float minMoveSpeed = 3 * stackScale; // Minimum move speed to be at if the player can bounce
|
||||
float hitboxSizeMult = 0.45f;
|
||||
|
||||
bool onPlatform = false;
|
||||
@@ -5335,9 +5560,9 @@ namespace CalamityMod.CalPlayer
|
||||
bool hitDown = velY > minMoveSpeed && (Collision.SolidCollision(Player.Bottom + Vector2.UnitY * Player.velocity.Y, (int)(Player.width * hitboxSizeMult), 1) || onPlatform);
|
||||
bool hitUp = velY > minMoveSpeed && Collision.SolidCollision(Player.Top + Vector2.UnitY * Player.velocity.Y, (int)(Player.width * hitboxSizeMult), 1);
|
||||
bool hitSide = velX > minMoveSpeed && Collision.SolidCollision(Vector2.Lerp(Player.TopLeft, Player.Left, 0.15f) + Vector2.UnitX * Player.velocity.X, 1, (int)(Player.height * hitboxSizeMult)) || Collision.SolidCollision(Vector2.Lerp(Player.TopRight, Player.Right, 0.15f) + Vector2.UnitX * Player.velocity.X, 1, (int)(Player.height * hitboxSizeMult));
|
||||
float acceleration = 0.05f;
|
||||
float acceleration = 0.05f * stackScale;
|
||||
float decceleration = -0.025f / speedMult;
|
||||
float riseSpeed = 0.8f; // The speed the player rises when in water or rain
|
||||
float riseSpeed = 0.8f * stackScale; // The speed the player rises when in water or rain
|
||||
float slipPower = 0.85f; //How strong the slippery effect is
|
||||
|
||||
float bounceReduction = 0.9f;
|
||||
@@ -5365,7 +5590,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (baconOilSoundCooldown < soundCDMax)
|
||||
baconOilSoundCooldown += 30;
|
||||
float pitch = 0.55f * Utils.GetLerpValue(0, soundCDMax, baconOilSoundCooldown, true);
|
||||
float pitch = (0.55f * stackScale) * Utils.GetLerpValue(0, soundCDMax, baconOilSoundCooldown, true);
|
||||
SoundStyle boyoyoing = new("CalamityMod/Sounds/Item/BaconOilBounce");
|
||||
SoundEngine.PlaySound(boyoyoing with { Volume = 0.45f, Pitch = hitSide ? pitch - 0.3f : pitch, MaxInstances = 5 }, Player.Center);
|
||||
}
|
||||
@@ -5422,7 +5647,8 @@ namespace CalamityMod.CalPlayer
|
||||
// Apply weapon modifier stealth strike damage bonus
|
||||
// 01OCT2023: Ozzatron: This is a multiplicative bonus because it is a prefix.
|
||||
// It should be equivalent to x1.15 (or whatever multiplier) on the base damage of the weapon for stealth only.
|
||||
if (rogueItem.StealthStrikePrefixBonus != 0f && StealthStrikeAvailable())
|
||||
bool dontProvideStealthDamage = Player.HeldItem.type == ModContent.ItemType<ElephantKiller>();
|
||||
if (rogueItem.StealthStrikePrefixBonus != 0f && StealthStrikeAvailable() && !dontProvideStealthDamage)
|
||||
damage *= rogueItem.StealthStrikePrefixBonus; // This number centers on 1f, so 1.15f = 1.15x damage.
|
||||
}
|
||||
}
|
||||
@@ -5434,6 +5660,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 +5840,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (bladeArmEnchant)
|
||||
return false;
|
||||
if (purpleHaze)
|
||||
if (purpleHaze || Player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.PurpleHaze))
|
||||
{
|
||||
if (item.CountsAsClass<RogueDamageClass>() && StealthStrikeAvailable())
|
||||
{
|
||||
@@ -6145,6 +6373,10 @@ namespace CalamityMod.CalPlayer
|
||||
if (it.type == ItemType<DoomsdayDevice>())
|
||||
playerUsingWeapon = false;
|
||||
|
||||
// Elephant Killer consumes stealth in a special wa- hey maybe this is a sign this class needs some work huh
|
||||
if (it.type == ItemType<ElephantKiller>())
|
||||
playerUsingWeapon = false;
|
||||
|
||||
// Animation check depends on whether the item is "clockwork", like Clockwork Assault Rifle.
|
||||
// "Clockwork" weapons can chain-fire multiple stealth strikes (really only 2 max) until you run out of stealth.
|
||||
bool animationCheck = it.useAnimation == it.useTime
|
||||
@@ -6211,7 +6443,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.ownedProjectileCounts[ProjectileType<FinalDawnThrow2>()];
|
||||
|
||||
// If you are actively using an item, you cannot gain stealth.
|
||||
if (Player.itemAnimation > 0 || finalDawnProjCount > 0)
|
||||
if (Player.itemAnimation > 0 || finalDawnProjCount > 0 || (Player.ownedProjectileCounts[ProjectileType<ElephantKillerThrown>()] > 0 || Player.HeldItem.type == ModContent.ItemType<ElephantKiller>()))
|
||||
return 0f;
|
||||
|
||||
if (shadow)
|
||||
|
||||
@@ -438,6 +438,10 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.ZoneSkyHeight && fishingRod.type == ModContent.ItemType<HeronRod>())
|
||||
fishingLevel = fishingLevel * HeronRod.FishingPowerBiomeMult;
|
||||
|
||||
// Rage bait gives free sonar effect
|
||||
if (bait.type == ModContent.ItemType<RageBait>())
|
||||
Player.sonarPotion = true;
|
||||
|
||||
// Prevent the player from fishing if they have the Bloodworm
|
||||
if (bait.type == ModContent.ItemType<BloodwormItem>())
|
||||
{
|
||||
|
||||
@@ -1354,11 +1354,11 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (rOfResilienceCooldown == 0 && rOfResilienceEffect > 0)
|
||||
{
|
||||
int cooldownTime = (Player.Calamity().profanedSoulRelicBuff ? 300 : 600);
|
||||
int cooldownTime = RelicOfResilience.baseCooldown;
|
||||
rOfResilienceCooldown = cooldownTime;
|
||||
Player.AddCooldown(Cooldowns.RelicOfResilienceCooldown.ID, cooldownTime);
|
||||
SoundStyle youGotHit = new("CalamityMod/Sounds/Custom/ProfanedGuardians/GuardianRockShieldActivate");
|
||||
SoundEngine.PlaySound(youGotHit with { Volume = 0.7f, Pitch = -0.1f }, Player.Center);
|
||||
SoundEngine.PlaySound(youGotHit with { Volume = 0.7f, Pitch = -0.5f }, Player.Center);
|
||||
}
|
||||
|
||||
if (alchFlask)
|
||||
@@ -1529,6 +1529,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.AddCooldown(GlobalDodge.ID, cooldownDuration);
|
||||
else
|
||||
Player.AddCooldown(GlobalDodge.ID, cooldownDuration, true, IconToUse);
|
||||
Player.SetImmuneTimeForAllTypes(Player.longInvince ? 120 : 80);
|
||||
}
|
||||
|
||||
//Dodge activation order is as follows:
|
||||
@@ -2888,8 +2889,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;
|
||||
|
||||
|
||||
@@ -190,17 +190,34 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
#region Alcohol
|
||||
var dripPlayer = Player.GetModPlayer<IVDripPlayer>();
|
||||
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
int buff = Player.buffType[l];
|
||||
if (BuffDatasets.DebuffDataset[buff] is not null && BuffDatasets.DebuffDataset[buff].AlcoholLevel > 0)
|
||||
alcoholPoisonLevel += BuffDatasets.DebuffDataset[buff].AlcoholLevel;
|
||||
if (buff <= 0) continue;
|
||||
|
||||
var data = BuffDatasets.DebuffDataset[buff];
|
||||
if (data?.AlcoholLevel > 0)
|
||||
alcoholPoisonLevel += data.AlcoholLevel;
|
||||
}
|
||||
if (Player.Calamity().ivDrip) // +1 stack of poisoning while IV Drip is equipped
|
||||
alcoholPoisonLevel++;
|
||||
|
||||
if (dripPlayer.ivDripEquipped && dripPlayer.currentAlcohol != AlcoholType.None)
|
||||
{
|
||||
int ivBuffID = BuffDatasets.GetBuffIDFromAlcoholType(dripPlayer.currentAlcohol);
|
||||
|
||||
if (ivBuffID != -1)
|
||||
{
|
||||
var ivData = BuffDatasets.DebuffDataset[ivBuffID];
|
||||
if (ivData?.AlcoholLevel > 0)
|
||||
alcoholPoisonLevel += ivData.AlcoholLevel;
|
||||
}
|
||||
}
|
||||
|
||||
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 +284,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 +360,18 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (tequilaSunrise)
|
||||
Player.lifeRegenTime += 1800;
|
||||
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.Potions;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.Summon;
|
||||
@@ -45,6 +44,7 @@ using CalamityMod.Items.VanillaArmorChanges;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.AcidRain;
|
||||
@@ -239,6 +239,21 @@ namespace CalamityMod.CalPlayer
|
||||
rage = 0f;
|
||||
}
|
||||
|
||||
bool holdingElephantKiller = Player.HeldItem.type == ModContent.ItemType<ElephantKiller>();
|
||||
if (holdingElephantKiller && !heldElephantKillerLastFrame)
|
||||
{
|
||||
Player.Calamity().rogueStealth = 0;
|
||||
heldElephantKillerLastFrame = true;
|
||||
}
|
||||
else if (!holdingElephantKiller)
|
||||
heldElephantKillerLastFrame = false;
|
||||
|
||||
if (!drawingElephantKillerJoke)
|
||||
elephantKillerJoke = 0;
|
||||
else
|
||||
elephantKillerJoke++;
|
||||
drawingElephantKillerJoke = false;
|
||||
|
||||
if (furyFuel < FuryFuelMax && furyRefuelTimer >= 0)
|
||||
{
|
||||
furyFuel += (int)furyRefuelTimer;
|
||||
@@ -257,7 +272,9 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
// Apply stealth damage to rogue.
|
||||
Player.GetDamage<RogueDamageClass>() += stealthDamage;
|
||||
bool dontProvideStealthDamage = Player.HeldItem.type == ModContent.ItemType<ElephantKiller>();
|
||||
if (!dontProvideStealthDamage)
|
||||
Player.GetDamage<RogueDamageClass>() += stealthDamage;
|
||||
|
||||
if ((XykVisualsBlue || XykVisualsOrange))
|
||||
{
|
||||
@@ -562,9 +579,16 @@ namespace CalamityMod.CalPlayer
|
||||
if (cinnamonRoll && !(Main.getGoodWorld && Main.npc.Any(x=> x.active && x.type == ModContent.NPCType<DevourerofGodsHead>())))
|
||||
{
|
||||
if (dashStart)
|
||||
Player.velocity.X *= 3;
|
||||
Player.velocity.X *= 2f;
|
||||
else if (Player.dashDelay == -1)
|
||||
Player.velocity.X *= 0.8f;
|
||||
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)
|
||||
@@ -1277,6 +1301,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;
|
||||
@@ -1657,46 +1693,59 @@ namespace CalamityMod.CalPlayer
|
||||
if (bootLevel > 0)
|
||||
HeatDebuffMultiplier += 0.25f * bootLevel;
|
||||
|
||||
if (rOfResilienceEffect > 0)
|
||||
rOfResilienceEffect--;
|
||||
if (Player.HeldItem.type == ModContent.ItemType<RelicOfResilience>()) // All players close to a player holding RoR get the benefits
|
||||
bool holdingRoR = Player.HeldItem.type == ModContent.ItemType<RelicOfResilience>();
|
||||
bool shieldIsSetup = (rOfResilienceEffect >= RelicOfResilience.baseTimeMax);
|
||||
bool chargedButNotHolding = (rOfResilienceEffect > RelicOfResilience.baseTimeMax && !holdingRoR);
|
||||
bool reduceEffect = (!shieldIsSetup || chargedButNotHolding);
|
||||
if (rOfResilienceEffect > 0 && reduceEffect)
|
||||
{ rOfResilienceEffect -= (chargedButNotHolding ? 4 : 1); if (shieldIsSetup && rOfResilienceEffect < RelicOfResilience.baseTimeMax) rOfResilienceEffect = RelicOfResilience.baseTimeMax; if (rOfResilienceEffect < 0) rOfResilienceEffect = 0; }
|
||||
if (holdingRoR) // All players close to a player holding RoR get the benefits
|
||||
{
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<RelicGuard>()] < 1 && !Player.dead)
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<RelicGuard>()] < 1 && !Player.dead && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Projectile relic = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType<RelicGuard>(), 0, 0f, Player.whoAmI);
|
||||
}
|
||||
for (int index = 0; index < Main.player.Length; index++)
|
||||
{
|
||||
Player fella = Main.player[index];
|
||||
if (Utils.Distance(fella.Center, Player.Center) < 650 && fella.team == Player.team)
|
||||
float maxDistancePlayersCanBe = 1000;
|
||||
bool validEffectBoost = Utils.Distance(fella.Center, Player.Center) < maxDistancePlayersCanBe && fella.team == Player.team && fella.Calamity().rOfResilienceEffect < RelicOfResilience.maxPowerTime
|
||||
&& fella.Calamity().rOfResilienceCooldown == 0 && (fella.Calamity().rOfResilienceEffect > RelicOfResilience.baseTimeMax ? holdingRoR : true);
|
||||
if (validEffectBoost)
|
||||
{
|
||||
fella.Calamity().rOfResilienceEffect = (fella != Player ? 480 : 2);
|
||||
fella.Calamity().rOfResilienceEffect += (reduceEffect ? 2 : 1) + (Player.Calamity().profanedSoulRelicBuff ? 1 : 0); // gets subtracted by 1 every frame, so this goes up by more to keep up
|
||||
}
|
||||
}
|
||||
}
|
||||
// Adds a floor for defense and dr, will not ignore defense damage
|
||||
if (Player.Calamity().rOfResilienceCooldown >= RelicOfResilience.baseCooldown / 2|| Player.Calamity().rOfResilienceCooldown == 0)
|
||||
{
|
||||
float fadeInStats = Utils.GetLerpValue(0, RelicOfResilience.baseTimeMax, rOfResilienceEffect, true);
|
||||
float fadeStats = (Player.Calamity().rOfResilienceCooldown == 0 ? fadeInStats : MathF.Pow(Utils.GetLerpValue(RelicOfResilience.baseCooldown / 2, RelicOfResilience.baseCooldown, Player.Calamity().rOfResilienceCooldown, true), 3));
|
||||
float overchargeBoost = 1 + (Utils.GetLerpValue(RelicOfResilience.baseTimeMax, RelicOfResilience.maxPowerTime, rOfResilienceEffect, true) * (Player.Calamity().profanedSoulRelicBuff ? RelicOfResilience.additionalMaxPowerDefensesMult * 5 : RelicOfResilience.additionalMaxPowerDefensesMult)); // The amount of bulk this gives with artifact is way overkill but it is REALLY funny
|
||||
int def = (int)(RelicOfResilience.baseDefenseFloor * overchargeBoost);
|
||||
float dr = RelicOfResilience.baseDrFloor * overchargeBoost;
|
||||
int maxDefFloor = (int)(def * fadeStats);
|
||||
float MaxDRFloor = dr * fadeStats;
|
||||
if (Player.statDefense < maxDefFloor)
|
||||
Player.statDefense += maxDefFloor - Player.statDefense;
|
||||
if (Player.endurance < MaxDRFloor)
|
||||
Player.endurance += MaxDRFloor - Player.endurance;
|
||||
}
|
||||
if (rOfResilienceEffect > 0)
|
||||
{
|
||||
if (Player.Calamity().mouseRight && !Player.mouseInterface && rOfResilienceCooldown == 0)
|
||||
if (Player.Calamity().mouseRight && !Player.mouseInterface && rOfResilienceCooldown == 0 && holdingRoR)
|
||||
{
|
||||
int cooldownTime = (Player.Calamity().profanedSoulRelicBuff ? 300 : 600);
|
||||
int cooldownTime = RelicOfResilience.baseCooldown;
|
||||
rOfResilienceCooldown = cooldownTime;
|
||||
Player.AddCooldown(Cooldowns.RelicOfResilienceCooldown.ID, cooldownTime);
|
||||
SoundStyle y = new("CalamityMod/Sounds/Custom/ProfanedGuardians/GuardianRockShieldActivate");
|
||||
SoundEngine.PlaySound(y with { Volume = 0.7f, Pitch = -0.1f }, Player.Center);
|
||||
}
|
||||
|
||||
// Adds a floor for defense and dr at 150 and 10% respectivley, will not ignore defense damage
|
||||
if (Player.Calamity().rOfResilienceCooldown > 300 || Player.Calamity().rOfResilienceCooldown == 0)
|
||||
{
|
||||
float fadeStats = (Player.Calamity().rOfResilienceCooldown == 0 ? 1 : Utils.GetLerpValue(300, 600, Player.Calamity().rOfResilienceCooldown, true));
|
||||
int maxDefFloor = (int)(150 * fadeStats);
|
||||
float MaxDRFloor = 0.10f * fadeStats;
|
||||
if (Player.statDefense < maxDefFloor)
|
||||
Player.statDefense += maxDefFloor - Player.statDefense;
|
||||
if (Player.endurance < MaxDRFloor)
|
||||
Player.endurance += MaxDRFloor - Player.endurance;
|
||||
}
|
||||
|
||||
int shardBaseCap = (Player.Calamity().profanedSoulRelicBuff ? (int)(RelicOfResilience.baseMaxShardCount * 1.5f) : RelicOfResilience.baseMaxShardCount);
|
||||
float postMaxedShards = MathHelper.Lerp(shardBaseCap, shardBaseCap * RelicOfResilience.maxPowerShardMult, MathF.Pow(Utils.GetLerpValue(RelicOfResilience.baseTimeMax, RelicOfResilience.maxPowerTime, rOfResilienceEffect, true), 2));
|
||||
int maxShards = (int)(postMaxedShards * Utils.GetLerpValue(0, RelicOfResilience.baseTimeMax, rOfResilienceEffect, true));
|
||||
int numOfShards = 0;
|
||||
for (int x = 0; x < Main.maxProjectiles; x++)
|
||||
{
|
||||
@@ -1706,7 +1755,26 @@ namespace CalamityMod.CalPlayer
|
||||
numOfShards++;
|
||||
}
|
||||
}
|
||||
if (Player.miscCounter % (Player.Calamity().profanedSoulRelicBuff ? 4 : 8) == 0 && numOfShards < (Player.Calamity().profanedSoulRelicBuff ? 75 : 30) && Player.Calamity().rOfResilienceCooldown == 0)
|
||||
float lowestNum = 0;
|
||||
int whoAmI = 0;
|
||||
if (numOfShards > maxShards) // Kill the most recent shard if there's too many
|
||||
{
|
||||
for (int x = 0; x < Main.maxProjectiles; x++)
|
||||
{
|
||||
Projectile projectile = Main.projectile[x];
|
||||
if (projectile.active && projectile.type == ModContent.ProjectileType<ArtifactOfResilienceShards>() && projectile.ai[1] == 0 && projectile.owner == Player.whoAmI && projectile.ai[2] > lowestNum)
|
||||
{
|
||||
whoAmI = projectile.whoAmI;
|
||||
lowestNum = projectile.ai[2];
|
||||
}
|
||||
}
|
||||
if (whoAmI != 0)
|
||||
{
|
||||
Projectile shard = Main.projectile[whoAmI];
|
||||
shard.ai[1] = -1;
|
||||
}
|
||||
}
|
||||
if (numOfShards < maxShards && Player.Calamity().rOfResilienceCooldown == 0 && (rOfResilienceEffect >= RelicOfResilience.baseTimeMax || holdingRoR))
|
||||
{
|
||||
if (numOfShards == 0)
|
||||
{
|
||||
@@ -1714,12 +1782,13 @@ namespace CalamityMod.CalPlayer
|
||||
SoundStyle sound = new("CalamityMod/Sounds/Custom/ProfanedGuardians/GuardianDash");
|
||||
SoundEngine.PlaySound(sound with { Volume = 0.5f, Pitch = -0.3f }, Player.Center);
|
||||
}
|
||||
int shardDamage = (int)Player.GetBestClassDamage().ApplyTo(420);
|
||||
Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, new Vector2(1, 0), ModContent.ProjectileType<ArtifactOfResilienceShards>(), shardDamage, 0f, Player.whoAmI, 0, 0, numOfShards + 1);
|
||||
int shardDamage = (int)Player.GetBestClassDamage().ApplyTo(Player.Calamity().profanedSoulRelicBuff ? RelicOfResilience.shardBaseDamage * 5 : RelicOfResilience.shardBaseDamage);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, new Vector2(1, 0), ModContent.ProjectileType<ArtifactOfResilienceShards>(), shardDamage, 0f, Player.whoAmI, 0, 0, numOfShards + 1);
|
||||
}
|
||||
}
|
||||
if (rOfResilienceCooldown > 0)
|
||||
rOfResilienceCooldown--;
|
||||
{ rOfResilienceCooldown -= (holdingRoR ? 2 : 1); if (rOfResilienceCooldown < 0) rOfResilienceCooldown = 0; }
|
||||
|
||||
if (Player.Calamity().friendlyMinions > 0)
|
||||
{
|
||||
@@ -3357,6 +3426,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 +3614,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 +3669,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 +3684,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 +4828,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);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,6 @@ namespace CalamityMod.CalPlayer
|
||||
target.Calamity().IncreasedElectricityEffects_Unused = false;
|
||||
|
||||
target.Calamity().IncreasedHeatEffects_Fireball = fireball;
|
||||
target.Calamity().IncreasedHeatEffects_CinnamonRoll = cinnamonRoll;
|
||||
target.Calamity().IncreasedHeatEffects_FireBoots = bootLevel;
|
||||
|
||||
target.Calamity().IncreasedSicknessEffects_ToxicHeart = toxicHeart;
|
||||
@@ -240,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)
|
||||
@@ -255,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;
|
||||
@@ -1002,7 +1010,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (xerocSet && xerocDmg <= 0 && Player.ownedProjectileCounts[ProjectileType<EmpyreanEmber>()] < 3 && Player.ownedProjectileCounts[ProjectileType<EmpyreanBlast>()] < 3)
|
||||
{
|
||||
switch (Main.rand.Next(5))
|
||||
switch (Main.rand.Next(4))
|
||||
{
|
||||
case 0:
|
||||
// Exodus Rogue Stars: 80%
|
||||
@@ -1030,13 +1038,6 @@ namespace CalamityMod.CalPlayer
|
||||
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<EmpyreanBlast>(), blastDamage, 0f, proj.owner, 0f, 0f);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
// Exodus Rogue Bubble: 60%
|
||||
int bubbleDamage = (int)(proj.damage * 0.6f);
|
||||
CalamityUtils.SpawnOrb(proj, bubbleDamage, ProjectileType<EmpyreanGlob>(), 800f, 15f);
|
||||
xerocDmg += (int)(bubbleDamage * 0.5);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.Items.Tools;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
@@ -12,5 +14,11 @@ namespace CalamityMod.Cooldowns
|
||||
public override Color OutlineColor => new Color(255, 191, 73);
|
||||
public override Color CooldownStartColor => new Color(122, 66, 59);
|
||||
public override Color CooldownEndColor => new Color(165, 103, 87);
|
||||
|
||||
public override void Tick()
|
||||
{
|
||||
if (instance.player.HeldItem.type == ModContent.ItemType<RelicOfResilience>())
|
||||
instance.timeLeft--;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -10,6 +12,7 @@ namespace CalamityMod.DataStructures
|
||||
[ReinitializeDuringResizeArrays]
|
||||
public static class BuffDatasets
|
||||
{
|
||||
private static DebuffData Alch(int level) => new DebuffData() { AlcoholLevel = level };
|
||||
public static DebuffData[] DebuffDataset = BuffID.Sets.Factory.CreateNamedSet("DebuffData")
|
||||
.Description("Stores DebuffData for a particular debuff")
|
||||
.RegisterCustomSet<DebuffData>(null,
|
||||
@@ -24,8 +27,69 @@ namespace CalamityMod.DataStructures
|
||||
BuffID.Poisoned, DebuffData.Poisoned,
|
||||
BuffID.Venom, DebuffData.AcidVenom,
|
||||
BuffID.Electrified, DebuffData.Electrified,
|
||||
BuffID.Oiled, DebuffData.Oiled
|
||||
BuffID.Oiled, DebuffData.Oiled,
|
||||
|
||||
BuffID.Tipsy, Alch(1),
|
||||
ModContent.BuffType<BloodyMaryBuff>(), Alch(1),
|
||||
ModContent.BuffType<CaribbeanRumBuff>(), Alch(1),
|
||||
ModContent.BuffType<CinnamonRollBuff>(), Alch(1),
|
||||
ModContent.BuffType<EvergreenGinBuff>(), Alch(1),
|
||||
ModContent.BuffType<FireballBuff>(), Alch(1),
|
||||
ModContent.BuffType<GrapeBeerBuff>(), Alch(1),
|
||||
ModContent.BuffType<ManhattanBuff>(), Alch(1),
|
||||
ModContent.BuffType<MargaritaBuff>(), Alch(1),
|
||||
ModContent.BuffType<MoonshineBuff>(), Alch(1),
|
||||
ModContent.BuffType<MoscowMuleBuff>(), Alch(1),
|
||||
ModContent.BuffType<OldFashionedBuff>(), Alch(1),
|
||||
ModContent.BuffType<PurpleHazeBuff>(), Alch(1),
|
||||
ModContent.BuffType<RedWineBuff>(), Alch(1),
|
||||
ModContent.BuffType<RumBuff>(), Alch(1),
|
||||
ModContent.BuffType<ScrewdriverBuff>(), Alch(1),
|
||||
ModContent.BuffType<StarBeamRyeBuff>(), Alch(1),
|
||||
ModContent.BuffType<TequilaBuff>(), Alch(1),
|
||||
ModContent.BuffType<TequilaSunriseBuff>(), Alch(1),
|
||||
ModContent.BuffType<VodkaBuff>(), Alch(1),
|
||||
ModContent.BuffType<WhiskeyBuff>(), Alch(1),
|
||||
ModContent.BuffType<WhiteWineBuff>(), Alch(1),
|
||||
|
||||
ModContent.BuffType<EverclearBuff>(), Alch(2),
|
||||
ModContent.BuffType<BaconOilBuff>(), Alch(3)
|
||||
);
|
||||
public static int GetBuffIDFromAlcoholType(AlcoholType type)
|
||||
{
|
||||
return type switch
|
||||
{
|
||||
AlcoholType.BaconOil => ModContent.BuffType<BaconOilBuff>(),
|
||||
AlcoholType.BloodyMary => ModContent.BuffType<BloodyMaryBuff>(),
|
||||
AlcoholType.CaribbeanRum => ModContent.BuffType<CaribbeanRumBuff>(),
|
||||
AlcoholType.CinnamonRoll => ModContent.BuffType<CinnamonRollBuff>(),
|
||||
AlcoholType.Everclear => ModContent.BuffType<EverclearBuff>(),
|
||||
AlcoholType.EvergreenGin => ModContent.BuffType<EvergreenGinBuff>(),
|
||||
AlcoholType.Fireball => ModContent.BuffType<FireballBuff>(),
|
||||
AlcoholType.GrapeBeer => ModContent.BuffType<GrapeBeerBuff>(),
|
||||
AlcoholType.Manhattan => ModContent.BuffType<ManhattanBuff>(),
|
||||
AlcoholType.Margarita => ModContent.BuffType<MargaritaBuff>(),
|
||||
AlcoholType.Moonshine => ModContent.BuffType<MoonshineBuff>(),
|
||||
AlcoholType.MoscowMule => ModContent.BuffType<MoscowMuleBuff>(),
|
||||
AlcoholType.OldFashioned => ModContent.BuffType<OldFashionedBuff>(),
|
||||
AlcoholType.PurpleHaze => ModContent.BuffType<PurpleHazeBuff>(),
|
||||
AlcoholType.RedWine => ModContent.BuffType<RedWineBuff>(),
|
||||
AlcoholType.Rum => ModContent.BuffType<RumBuff>(),
|
||||
AlcoholType.Screwdriver => ModContent.BuffType<ScrewdriverBuff>(),
|
||||
AlcoholType.StarBeamRye => ModContent.BuffType<StarBeamRyeBuff>(),
|
||||
AlcoholType.Tequila => ModContent.BuffType<TequilaBuff>(),
|
||||
AlcoholType.TequilaSunrise => ModContent.BuffType<TequilaSunriseBuff>(),
|
||||
AlcoholType.Vodka => ModContent.BuffType<VodkaBuff>(),
|
||||
AlcoholType.Whiskey => ModContent.BuffType<WhiskeyBuff>(),
|
||||
AlcoholType.WhiteWine => ModContent.BuffType<WhiteWineBuff>(),
|
||||
|
||||
// Vanilla treats both Ale and Sake as the "Tipsy" buff
|
||||
AlcoholType.Ale => BuffID.Tipsy,
|
||||
AlcoholType.Sake => BuffID.Tipsy,
|
||||
|
||||
_ => -1
|
||||
};
|
||||
}
|
||||
}
|
||||
public class DebuffData
|
||||
{
|
||||
|
||||
@@ -775,27 +775,31 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Tweak Pygmy Staff aggro distance logic
|
||||
|
||||
#region Tweak Pygmy Staff Aggro Distance Logic
|
||||
// Code written by Habble
|
||||
private static void PygmyAggroOnClosestPointInHitbox(ILContext context)
|
||||
{
|
||||
// Adjust Pygmy Staff's attack distance logic to be measured from the closest point to the enemy instead of the enemy's center.
|
||||
ILCursor cursor = new(context);
|
||||
|
||||
// Go to the latest newly set variable near the point we wanna be, as that is an easy unique instruction to jump to. 131 is the number assigned to that local variable.
|
||||
if (!cursor.TryGotoNext(i => i.MatchStloc(131)))
|
||||
{// Go to the latest newly set variable near the point we wanna be, as that is an easy unique instruction to jump to
|
||||
// 131 is the number assigned to that variable in ILview
|
||||
{
|
||||
LogFailure("Tweaking Pygmy Staff aggro distance logic", "Could not locate unique Stloc(131) instruction nearest to aggro distance check.");
|
||||
return;
|
||||
}
|
||||
// Move before the minion range variable emission so as to receive the value being targetted at it.
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdloc(126)))
|
||||
{// Before the minion range variable emission so as to receive the value being targetted at it
|
||||
{
|
||||
LogFailure("Tweaking Pygmy Staff aggro distance logic", "Could not locate the minion range variable.");
|
||||
return;
|
||||
}
|
||||
cursor.Emit(OpCodes.Ldarg_0); // Emit the Projectile entity as we are in Projectile.cs::AI_026
|
||||
cursor.Emit(OpCodes.Ldloc, 129); // Emit the NPC index via the incremented loop variable
|
||||
cursor.Emit(OpCodes.Ldloc, 6); // Emit the bool containing type check for pygmies
|
||||
cursor.Emit(OpCodes.Ldarg_0); // Emits the Projectile entity itself
|
||||
cursor.Emit(OpCodes.Ldloc, 129); // Emits the NPC index via the incremented loop variable
|
||||
cursor.Emit(OpCodes.Ldloc, 6); // Emits the bool containing type check for Pygmies
|
||||
// Replace the distance with a different value calculated off of closest point in hitboxes
|
||||
cursor.EmitDelegate((float distance, Projectile projectile, int npcIndex, bool pygmy) =>
|
||||
{// Replace the distance with a different value calculated off of closest point in hitboxes
|
||||
{
|
||||
if (!pygmy)
|
||||
return distance;
|
||||
|
||||
@@ -804,34 +808,39 @@ namespace CalamityMod.ILEditing
|
||||
float finalDistance = npc.Hitbox.ClosestPointInRect(player.Center).Distance(player.Hitbox.ClosestPointInRect(npc.Center));
|
||||
return finalDistance;
|
||||
});
|
||||
|
||||
// That was part 1, time for part 2.
|
||||
// Go directly before the instruction that's meant to receive the distance value of this tagged NPC.
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchStloc(185)))
|
||||
{// Go directly before the instruction that's meant to receive the distance value of this tagged NPC
|
||||
{
|
||||
LogFailure("Tweaking Pygmy Staff aggro distance logic", "Could not locate first unique Stloc(185) instruction.");
|
||||
return;
|
||||
}
|
||||
cursor.Emit(OpCodes.Ldarg_0);
|
||||
cursor.Emit(OpCodes.Ldloc, 181); // Emit the tagged NPC
|
||||
cursor.Emit(OpCodes.Ldloc, 181); // Emits the tagged NPC
|
||||
cursor.Emit(OpCodes.Ldloc, 6);
|
||||
// Replace the distance with a different value calculated off of closest point in hitboxes
|
||||
cursor.EmitDelegate((float distance, Projectile projectile, NPC npc, bool pygmy) =>
|
||||
{// Replace the distance with a different value calculated off of closest point in hitboxes
|
||||
{
|
||||
if (!pygmy)
|
||||
return distance;
|
||||
|
||||
float finalDistance = npc.Hitbox.ClosestPointInRect(projectile.Center).Distance(projectile.Hitbox.ClosestPointInRect(npc.Center));
|
||||
return finalDistance;
|
||||
});
|
||||
|
||||
|
||||
// Go directly before the instruction that's meant to receive the distance value of this NPC currently being iterated over.
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchStloc(189)))
|
||||
{// Go directly before the instruction that's meant to receive the distance value of this NPC currently being iterated over
|
||||
{
|
||||
LogFailure("Tweaking Pygmy Staff aggro distance logic", "Could not locate first unique Stloc(189) instruction.");
|
||||
return;
|
||||
}
|
||||
cursor.Emit(OpCodes.Ldarg_0);
|
||||
cursor.Emit(OpCodes.Ldloc, 186); // Emit the NPC index via the incremented loop variable
|
||||
cursor.Emit(OpCodes.Ldloc, 186); // Emits the NPC index via the incremented loop variable
|
||||
cursor.Emit(OpCodes.Ldloc, 6);
|
||||
// Replace the distance with a different value calculated off of closest point in hitboxes
|
||||
cursor.EmitDelegate((float distance, Projectile projectile, int npcIndex, bool pygmy) =>
|
||||
{// Replace the distance with a different value calculated off of closest point in hitboxes
|
||||
{
|
||||
if (!pygmy)
|
||||
return distance;
|
||||
|
||||
@@ -840,7 +849,6 @@ namespace CalamityMod.ILEditing
|
||||
return finalDistance;
|
||||
});
|
||||
}
|
||||
|
||||
#endregion Tweak Pygmy Staff aggro distance logic
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -105,6 +105,7 @@ namespace CalamityMod.ILEditing
|
||||
On_Main.DamageVar_float_int_float += AdjustDamageVariance;
|
||||
IL_NPC.ScaleStats_ApplyExpertTweaks += RemoveExpertHardmodeScaling;
|
||||
IL_Projectile.Damage += VanillaBossResistChanges;
|
||||
IL_Projectile.AI_026 += PygmyAggroOnClosestPointInHitbox;
|
||||
IL_Projectile.AI_099_2 += LimitTerrarianProjectiles;
|
||||
On_Projectile.AI_015_Flails += FlailsNoLongerAffectedByPlayerVelocity;
|
||||
IL_Projectile.AI_015_Flails += IncreaseFlowerPowRetSpeed;
|
||||
@@ -188,9 +189,6 @@ namespace CalamityMod.ILEditing
|
||||
// Fix vanilla behaviour of not calling CheckDead for NPCs that realLife is set
|
||||
IL_NPC.StrikeNPC_HitInfo_bool_bool += EnsureCheckDeadOnSegments;
|
||||
|
||||
// Change Pygmy Staff minion AI to check distance based on closest points in hitboxes
|
||||
IL_Projectile.AI_026 += PygmyAggroOnClosestPointInHitbox;
|
||||
|
||||
//Additional detours that are in their own item files given they are only relevant to these specific items:
|
||||
//Rover drive detours on Player.DrawInfernoRings to draw its shield
|
||||
//Wulfrum armor hooks on Player.KeyDoubleTap and DrawPendingMouseText to activate its set bonus and spoof the mouse text to display the stats of the activated weapon if shift is held
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Accessories
|
||||
CreateRecipe().
|
||||
AddIngredient<SilencingSheath>().
|
||||
AddIngredient<RuinMedallion>().
|
||||
AddIngredient<MeldConstruct>(5).
|
||||
AddIngredient<MeldBlob>(14). //Consistent with Vanilla lunar wing costs
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.dOfTheDeep = true;
|
||||
modPlayer.dOfTheDeepVisual = !hideVisual;
|
||||
modPlayer.WaterDebuffMultiplier += 0.75f;
|
||||
modPlayer.WaterDebuffMultiplier += 0.6f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -1,21 +1,68 @@
|
||||
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,
|
||||
BaconOil,
|
||||
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, 26));
|
||||
ItemID.Sets.AnimatesAsSoul[Item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 58;
|
||||
Item.height = 60;
|
||||
@@ -24,19 +71,216 @@ namespace CalamityMod.Items.Accessories
|
||||
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");
|
||||
}
|
||||
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 / 26;
|
||||
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 override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture = TextureAssets.Item[Item.type].Value;
|
||||
|
||||
int frameHeight = texture.Height / 26;
|
||||
int frameIndex = (int)currentAlcoholType;
|
||||
|
||||
Rectangle targetFrame = new Rectangle(0, frameIndex * frameHeight, texture.Width, frameHeight);
|
||||
|
||||
Vector2 drawPosition = Item.position - Main.screenPosition + new Vector2(Item.width / 2, Item.height - frameHeight / 2);
|
||||
Vector2 origin = targetFrame.Size() / 2f;
|
||||
|
||||
spriteBatch.Draw(texture, drawPosition, targetFrame, lightColor, rotation, 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 540 B |
@@ -46,7 +46,7 @@ namespace CalamityMod.Items.Accessories
|
||||
AddIngredient<Baroclaw>().
|
||||
AddIngredient<GiantTortoiseShell>().
|
||||
AddIngredient<MolluskHusk>(5).
|
||||
AddIngredient<MeldConstruct>(6).
|
||||
AddIngredient<MeldBlob>(14). //Consistent with Vanilla lunar wing costs
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.SoulofFlight, 20).
|
||||
AddIngredient<MeldConstruct>(14).
|
||||
AddIngredient<MeldBlob>(14).
|
||||
AddIngredient(ItemID.LunarBar, 10).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
|
||||
|
Before Width: | Height: | Size: 485 B After Width: | Height: | Size: 643 B |
@@ -53,7 +53,7 @@ namespace CalamityMod.Items.Armor.Empyrean
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<MeldConstruct>(20).
|
||||
AddIngredient<MeldBlob>(20).
|
||||
AddIngredient(ItemID.LunarBar, 16).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor.Empyrean
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<MeldConstruct>(15).
|
||||
AddIngredient<MeldBlob>(15).
|
||||
AddIngredient(ItemID.LunarBar, 12).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace CalamityMod.Items.Armor.Empyrean
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<MeldConstruct>(10).
|
||||
AddIngredient<MeldBlob>(10).
|
||||
AddIngredient(ItemID.LunarBar, 8).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<EmpyreanCloak>()).
|
||||
|
||||
|
Before Width: | Height: | Size: 488 B |
|
Before Width: | Height: | Size: 393 B |
@@ -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)
|
||||
@@ -936,7 +938,9 @@ 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;
|
||||
scale += 0.25f;
|
||||
if (item.CountsAsClass<MeleeDamageClass>() && (player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.Ale) || player.GetModPlayer<IVDripPlayer>().HasAlcohol(AlcoholType.Sake)))
|
||||
scale += 0.25f;
|
||||
}
|
||||
public override void UpdateArmorSet(Player player, string set)
|
||||
{
|
||||
|
||||
@@ -1497,6 +1497,18 @@ namespace CalamityMod.Items
|
||||
#region Enchanted Rarity Text Drawing
|
||||
public override bool PreDrawTooltipLine(Item item, DrawableTooltipLine line, ref int yOffset)
|
||||
{
|
||||
if (line.Mod == "Terraria" && item.type == ModContent.ItemType<ElephantKiller>() && CalamityClientConfig.Instance.TextEffects && line.Name == "Damage")
|
||||
{
|
||||
string fakeLine = line.Text.Replace(" " + RogueDamageClass.Instance.DisplayName.ToString(), DamageClass.Ranged.DisplayName.ToString());
|
||||
float fade = Utils.GetLerpValue(18, 120, Main.LocalPlayer.Calamity().elephantKillerJoke, true);
|
||||
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, fakeLine, new Vector2(line.X, line.Y), line.Color * (1 - fade), line.Rotation, line.Origin, line.BaseScale, line.MaxWidth, line.Spread);
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, new Vector2(line.X, line.Y), line.Color * fade, line.Rotation, line.Origin, line.BaseScale, line.MaxWidth, line.Spread);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (line.Name == "ItemName" && line.Mod == "Terraria" && item.type == ModContent.ItemType<XyksBlessingBlue>() && CalamityClientConfig.Instance.TextEffects)
|
||||
{
|
||||
Color rarityColor = Color.White;
|
||||
|
||||
@@ -197,7 +197,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.PurpleClubberfish, Do(UseTurn, KnockbackExact(10f)) }, // VANILLA: 8 KB
|
||||
{ ItemID.PurplePhaseblade, phaseblade },
|
||||
{ ItemID.PurplePhasesaber, phasesaber },
|
||||
{ ItemID.PygmyStaff, Do(DamageExact(63)) }, // VANILLA: 40 DMG
|
||||
{ ItemID.PygmyStaff, Do(DamageExact(60)) }, // VANILLA: 40 DMG
|
||||
{ ItemID.RainbowGun, Do(DamageExact(60)) }, // VANILLA: 45 DMG
|
||||
{ ItemID.RainbowRod, Do(DamageExact(40), KnockbackExact(8f)) }, // VANILLA: 50 DMG, 6 KB
|
||||
{ ItemID.Rally, Do(DamageExact(18)) }, // VANILLA: 14 DMG
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Fishing.FishingRods
|
||||
{
|
||||
public class TrustyOldRod : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Fishing";
|
||||
public static (int, int) enemyChance = (1, 3); // x/x Chance to pull up enemies
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 70;
|
||||
Item.height = 70;
|
||||
Item.useAnimation = 8;
|
||||
Item.useTime = 8;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.UseSound = SoundID.Item1;
|
||||
Item.fishingPole = 45;
|
||||
Item.shootSpeed = 14f;
|
||||
Item.shoot = ModContent.ProjectileType<TrustyOldBobber>();
|
||||
Item.rare = ItemRarityID.Green;
|
||||
Item.value = CalamityGlobalItem.RarityGreenBuyPrice;
|
||||
}
|
||||
public override void ModifyFishingLine(Projectile bobber, ref Vector2 lineOriginOffset, ref Color lineColor)
|
||||
{
|
||||
lineOriginOffset = new Vector2(68f, -52f);
|
||||
lineColor = new Color(171, 171, 171, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,32 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Fishing
|
||||
{
|
||||
public class RageBait : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Fishing";
|
||||
public static (int, int) junkChance = (2, 3); // x/x Chance to turn items to junk
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 5;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 12;
|
||||
Item.height = 12;
|
||||
Item.maxStack = Item.CommonMaxStack;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(copper: 1);
|
||||
Item.bait = 100;
|
||||
Item.consumable = true;
|
||||
}
|
||||
|
||||
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
|
||||
{
|
||||
itemGroup = ContentSamples.CreativeHelper.ItemGroup.FishingBait;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 529 B |
|
After Width: | Height: | Size: 797 B |
@@ -7,18 +7,26 @@ namespace CalamityMod.Items.Materials
|
||||
public class MeldBlob : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Materials";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 100;
|
||||
Item.ResearchUnlockCount = 25;
|
||||
ItemID.Sets.ItemIconPulse[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 16;
|
||||
Item.height = 14;
|
||||
Item.width = 24;
|
||||
Item.height = 22;
|
||||
Item.maxStack = Item.CommonMaxStack;
|
||||
Item.value = Item.sellPrice(silver: 20);
|
||||
Item.rare = ItemRarityID.Red;
|
||||
Item.rare = ItemRarityID.Cyan;
|
||||
ItemID.Sets.ItemNoGravity[Type] = true;
|
||||
}
|
||||
public override void Update(ref float gravity, ref float maxFallSpeed)
|
||||
{
|
||||
float brightness = Main.essScale * Main.rand.NextFloat(0.9f, 1.1f);
|
||||
Lighting.AddLight(Item.Center, 0.5f * brightness, 0.5f * brightness, 0.5f * brightness);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 462 B |
@@ -1,33 +0,0 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Materials
|
||||
{
|
||||
[LegacyName("MeldiateBar")]
|
||||
public class MeldConstruct : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Materials";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 25;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 15;
|
||||
Item.height = 12;
|
||||
Item.maxStack = Item.CommonMaxStack;
|
||||
Item.value = Item.sellPrice(silver: 42);
|
||||
Item.rare = ItemRarityID.Red;
|
||||
}
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(3).
|
||||
AddIngredient<MeldBlob>(6).
|
||||
AddIngredient<StarblightSoot>(3).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,67 @@
|
||||
using CalamityMod.Tiles.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.Furniture
|
||||
{
|
||||
public class GluttonyBlender : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public const int OneInXChanceForGoodSlop = 5;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToPlaceableTile(ModContent.TileType<GluttonyBlenderTile>());
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
Item.value = Item.buyPrice(gold: 5);
|
||||
}
|
||||
}
|
||||
|
||||
public class QualitySlop : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Potions";
|
||||
public override string Texture => "CalamityMod/Items/Potions/Food/QualitySlop";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 5;
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.FoodParticleColors[Type] = [
|
||||
new Color(183, 65, 68),
|
||||
new Color(167, 116, 36),
|
||||
new Color(175, 87, 190)
|
||||
];
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Ambrosia;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(32, 30, BuffID.WellFed3, CalamityUtils.MinutesToFrames(60));
|
||||
Item.value = Item.sellPrice(gold: 1);
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
}
|
||||
}
|
||||
|
||||
public class DisgustingSlop : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Misc";
|
||||
public override string Texture => "CalamityMod/Items/Materials/DisgustingSlop";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ExtractinatorMode[Type] = ItemID.OldShoe;
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 26;
|
||||
Item.height = 36;
|
||||
Item.maxStack = Item.CommonMaxStack;
|
||||
Item.rare = ItemRarityID.Gray;
|
||||
Item.MakeUsableWithChlorophyteExtractinator();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 521 B |
@@ -63,7 +63,6 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings
|
||||
"CrabBar",
|
||||
"Critaquil",
|
||||
"Dandy",
|
||||
"Dia",
|
||||
"Done",
|
||||
"dozezoze",
|
||||
"Flowaria",
|
||||
@@ -74,7 +73,6 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings
|
||||
"LordMetarex",
|
||||
"Moonburn",
|
||||
"Ozzatron",
|
||||
"Piky",
|
||||
"PokerFace",
|
||||
"Raesh",
|
||||
"Sagittariod",
|
||||
@@ -109,6 +107,7 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings
|
||||
"Daim",
|
||||
"DarkTiny",
|
||||
"Demik",
|
||||
"Dia",
|
||||
"DM Dokuro",
|
||||
"Doog",
|
||||
"drh",
|
||||
@@ -165,6 +164,7 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings
|
||||
"Pbtopacio",
|
||||
"Phantasmal Deathray",
|
||||
"Phupperbat",
|
||||
"Piky",
|
||||
"Pinkie Poss",
|
||||
"Poly",
|
||||
"Popo",
|
||||
|
||||
@@ -1,25 +1,37 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Materials;
|
||||
using System;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Potions.Alcohol
|
||||
{
|
||||
public class BaconOil : ModItem, ILocalizedModType
|
||||
public class BaconOil : ModItem, ILocalizedModType, IAlcoholItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Potions";
|
||||
public LocalizedText DripEffectText => Language.GetText("Mods.CalamityMod.Items.Potions.BaconOil.DripEffect");
|
||||
public AlcoholType AlcoholVariant => AlcoholType.BaconOil;
|
||||
public Action<Player, float> IVDripAlcoholEffect => ApplyBaconOilEffect;
|
||||
|
||||
private static void ApplyBaconOilEffect(Player player, float intensity)
|
||||
{
|
||||
// See CalamityPlayer
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 20;
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(204, 90, 73),
|
||||
new Color(168, 37, 37),
|
||||
new Color(120, 28, 28)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -28,5 +40,11 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
}
|
||||
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 1 * player.direction;
|
||||
player.itemLocation.Y -= 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.4 KiB |
@@ -1,35 +1,55 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Materials;
|
||||
using System;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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;
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(204, 90, 73),
|
||||
new Color(168, 37, 37),
|
||||
new Color(120, 28, 28)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(20, 32, ModContent.BuffType<BloodyMaryBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.DefaultToFood(34, 56, ModContent.BuffType<BloodyMaryBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(10).
|
||||
AddIngredient(ItemID.Bottle, 10).
|
||||
@@ -37,5 +57,11 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 9 * player.direction;
|
||||
player.itemLocation.Y -= 11;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 1.4 KiB |
@@ -1,35 +1,48 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using System;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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;
|
||||
// Based on the drink itself
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(105, 29, 14),
|
||||
new Color(128, 39, 22),
|
||||
new Color(138, 28, 7)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(14, 32, ModContent.BuffType<CaribbeanRumBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.DefaultToFood(28, 52, ModContent.BuffType<CaribbeanRumBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
@@ -43,5 +56,11 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 5 * player.direction;
|
||||
player.itemLocation.Y -= 9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 476 B After Width: | Height: | Size: 1.3 KiB |
@@ -1,31 +1,44 @@
|
||||
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;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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;
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(245, 223, 181),
|
||||
new Color(222, 186, 147),
|
||||
new Color(176, 129, 106)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(18, 32, ModContent.BuffType<CinnamonRollBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.DefaultToFood(28, 48, ModContent.BuffType<CinnamonRollBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.Lime;
|
||||
@@ -38,5 +51,10 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 5 * player.direction;
|
||||
player.itemLocation.Y -= 9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 454 B After Width: | Height: | Size: 1.2 KiB |
@@ -1,14 +1,17 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using System;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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,20 +19,29 @@ 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;
|
||||
// Everclear is clear so uhm... yeah?
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[2] {
|
||||
new Color(153, 168, 162, 180),
|
||||
new Color(198, 205, 207, 180)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(14, 42, ModContent.BuffType<EverclearBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.DefaultToFood(16, 52, ModContent.BuffType<EverclearBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
@@ -44,5 +56,10 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 3 * player.direction;
|
||||
player.itemLocation.Y -= 7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 997 B |
@@ -1,35 +1,51 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using System;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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()
|
||||
{
|
||||
Item.ResearchUnlockCount = 20;
|
||||
// Pale green-blue
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(201, 248, 248),
|
||||
new Color(201, 248, 221),
|
||||
new Color(177, 240, 184)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(18, 32, ModContent.BuffType<EvergreenGinBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.DefaultToFood(34, 56, ModContent.BuffType<EvergreenGinBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
@@ -44,5 +60,10 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 5 * player.direction;
|
||||
player.itemLocation.Y -= 9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 1.4 KiB |
@@ -1,34 +1,50 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using System;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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;
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(245, 171, 22),
|
||||
new Color(227, 128, 41),
|
||||
new Color(237, 82, 31)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(16, 38, ModContent.BuffType<FireballBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.DefaultToFood(20, 52, ModContent.BuffType<FireballBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
@@ -36,7 +52,6 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
CreateRecipe(10).
|
||||
AddIngredient(ItemID.Bottle, 10).
|
||||
AddIngredient(ItemID.LivingFireBlock, 50).
|
||||
@@ -44,5 +59,9 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.Y -= 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 533 B After Width: | Height: | Size: 990 B |
@@ -1,37 +1,48 @@
|
||||
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.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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;
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(36, 2, 41),
|
||||
new Color(56, 0, 64),
|
||||
new Color(82, 10, 92)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(12, 28, ModContent.BuffType<GrapeBeerBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.DefaultToFood(20, 48, ModContent.BuffType<GrapeBeerBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
}
|
||||
@@ -44,5 +55,10 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 4 * player.direction;
|
||||
player.itemLocation.Y -= 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 988 B |
@@ -1,35 +1,49 @@
|
||||
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;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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;
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(225, 84, 33),
|
||||
new Color(244, 176, 77),
|
||||
new Color(255, 218, 102)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(14, 28, ModContent.BuffType<ManhattanBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.DefaultToFood(19, 58, ModContent.BuffType<ManhattanBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
@@ -43,5 +57,10 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 8 * player.direction;
|
||||
player.itemLocation.Y -= 14;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 647 B After Width: | Height: | Size: 1.2 KiB |
@@ -1,14 +1,17 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using System;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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,21 +19,37 @@ 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;
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(219, 227, 191),
|
||||
new Color(186, 189, 147),
|
||||
new Color(142, 161, 125)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(28, 40, ModContent.BuffType<MargaritaBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.DefaultToFood(42, 52, ModContent.BuffType<MargaritaBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
}
|
||||
@@ -43,5 +62,10 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 9 * player.direction;
|
||||
player.itemLocation.Y -= 14;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 772 B After Width: | Height: | Size: 1.4 KiB |
@@ -1,34 +1,46 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using System;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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;
|
||||
// Another clear drink
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(237, 237, 218, 128),
|
||||
new Color(227, 219, 191, 128),
|
||||
new Color(209, 204, 194, 128)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(24, 28, ModContent.BuffType<MoonshineBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.DefaultToFood(30, 48, ModContent.BuffType<MoonshineBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.Lime;
|
||||
@@ -43,5 +55,10 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 4 * player.direction;
|
||||
player.itemLocation.Y -= 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 1.4 KiB |
@@ -1,35 +1,46 @@
|
||||
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;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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;
|
||||
// Pale green with a hint of red
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(194, 252, 192),
|
||||
new Color(226, 252, 192),
|
||||
new Color(250, 225, 222)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(32, 32, ModContent.BuffType<MoscowMuleBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.DefaultToFood(46, 46, ModContent.BuffType<MoscowMuleBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
@@ -42,5 +53,10 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 8 * player.direction;
|
||||
player.itemLocation.Y -= 12;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 818 B After Width: | Height: | Size: 1.8 KiB |
@@ -1,34 +1,47 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using System;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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;
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(255, 118, 3),
|
||||
new Color(255, 200, 82),
|
||||
new Color(255, 228, 122)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(30, 38, ModContent.BuffType<OldFashionedBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.DefaultToFood(38, 44, ModContent.BuffType<OldFashionedBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
@@ -41,5 +54,10 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 3 * player.direction;
|
||||
player.itemLocation.Y -= 12;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 590 B After Width: | Height: | Size: 1.4 KiB |
@@ -1,7 +1,10 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using System;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,28 +12,38 @@ 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;
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(239, 123, 202),
|
||||
new Color(187, 56, 158),
|
||||
new Color(165, 47, 255)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(30, 42, ModContent.BuffType<PurpleHazeBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.DefaultToFood(24, 48, ModContent.BuffType<PurpleHazeBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
@@ -44,5 +57,10 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 4 * player.direction;
|
||||
player.itemLocation.Y -= 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 790 B After Width: | Height: | Size: 1.2 KiB |
@@ -1,36 +1,49 @@
|
||||
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;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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;
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(54, 5, 21),
|
||||
new Color(82, 9, 36),
|
||||
new Color(105, 4, 29)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(14, 48, ModContent.BuffType<RedWineBuff>(), CalamityUtils.MinutesToFrames(6));
|
||||
|
||||
Item.DefaultToFood(20, 61, ModContent.BuffType<RedWineBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
}
|
||||
@@ -42,5 +55,10 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 1 * player.direction;
|
||||
player.itemLocation.Y -= 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 413 B After Width: | Height: | Size: 1.1 KiB |
@@ -1,34 +1,47 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using System;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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;
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(237, 165, 9),
|
||||
new Color(247, 219, 54),
|
||||
new Color(255, 195, 31)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(24, 26, ModContent.BuffType<RumBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.DefaultToFood(30, 44, ModContent.BuffType<RumBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
@@ -41,5 +54,10 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 3 * player.direction;
|
||||
player.itemLocation.Y -= 9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 556 B After Width: | Height: | Size: 1.1 KiB |
@@ -1,36 +1,51 @@
|
||||
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;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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;
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(225, 84, 33),
|
||||
new Color(244, 176, 77),
|
||||
new Color(255, 218, 102)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(14, 28, ModContent.BuffType<ScrewdriverBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.DefaultToFood(32, 46, ModContent.BuffType<ScrewdriverBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
}
|
||||
@@ -42,5 +57,10 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 5 * player.direction;
|
||||
player.itemLocation.Y -= 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 1.3 KiB |
@@ -1,35 +1,47 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using System;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
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;
|
||||
// Dark red-orange
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(89, 18, 10),
|
||||
new Color(102, 39, 14),
|
||||
new Color(128, 31, 9)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(20, 34, ModContent.BuffType<StarBeamRyeBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.DefaultToFood(20, 54, ModContent.BuffType<StarBeamRyeBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
@@ -42,5 +54,10 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 4 * player.direction;
|
||||
player.itemLocation.Y -= 7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 532 B After Width: | Height: | Size: 1.1 KiB |
@@ -1,14 +1,17 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using System;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.DataStructures;
|
||||
|
||||
namespace CalamityMod.Items.Potions.Alcohol
|
||||
{
|
||||
public class Tequila : ModItem, ILocalizedModType
|
||||
public class Tequila : ModItem, ILocalizedModType, IAlcoholItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Potions";
|
||||
|
||||
@@ -16,21 +19,32 @@ 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;
|
||||
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3));
|
||||
ItemID.Sets.DrinkParticleColors[Type] = new Color[3] {
|
||||
new Color(163, 110, 10),
|
||||
new Color(176, 135, 0),
|
||||
new Color(194, 132, 25)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(16, 34, ModContent.BuffType<TequilaBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
|
||||
Item.DefaultToFood(32, 44, ModContent.BuffType<TequilaBuff>(), CalamityUtils.MinutesToFrames(6), true);
|
||||
Item.value = Item.sellPrice(silver: 2);
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
}
|
||||
@@ -44,5 +58,10 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
AddTile(TileID.Kegs).
|
||||
Register();
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation.X += 4 * player.direction;
|
||||
player.itemLocation.Y -= 9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 485 B After Width: | Height: | Size: 1.2 KiB |