This commit is contained in:
Doze-Zoze committed 2026-07-20 19:38:54 -05:00
commit f897ae00a5
151 files changed
+2289 -978

No files matched your search

+3
View File
@@ -4,6 +4,7 @@ using CalamityMod.Items.Materials;
using CalamityMod.Rarities;
using CalamityMod.Systems.Collections;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
@@ -64,5 +65,7 @@ namespace CalamityMod.Items.Accessories
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor() => CalamityUtils.MulticolorLerp(Main.GlobalTimeWrappedHourly / 2f % 1f, [ new Color(255, 196, 55), new Color(255, 231, 107), new Color(255, 254, 243) ]);
}
}
+2 -2
View File
@@ -68,8 +68,8 @@ namespace CalamityMod.Items.Accessories
{
Item.width = 58;
Item.height = 60;
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
Item.rare = ItemRarityID.Lime;
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
Item.rare = ItemRarityID.Orange;
Item.accessory = true;
}
+2
View File
@@ -637,5 +637,7 @@ namespace CalamityMod.Items.Accessories
AddDecraftCondition(CalamityConditions.DownedSupremeCalamitas, CalamityConditions.DownedExoMechs).
Register();
}
public static Color RarityColor() => CalamityUtils.ColorSwap(new Color(255, 166, 0), new Color(25, 250, 25), 6f); //alternates between emerald green and amber (BanditHueh)
}
}
+484
View File
@@ -0,0 +1,484 @@
using System;
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Items.Armor.Auric;
using CalamityMod.Items.Armor.Bloodflare;
using CalamityMod.Items.Armor.Demonshade;
using CalamityMod.Items.Armor.Empyrean;
using CalamityMod.Items.Armor.Fearmonger;
using CalamityMod.Items.Armor.GemTech;
using CalamityMod.Items.Armor.GodSlayer;
using CalamityMod.Items.Armor.Hydrothermic;
using CalamityMod.Items.Armor.OmegaBlue;
using CalamityMod.Items.Armor.Prismatic;
using CalamityMod.Items.Armor.Silva;
using CalamityMod.Items.Armor.Tarragon;
using CalamityMod.Items.Materials;
using CalamityMod.Rarities;
using CalamityMod.Utilities.Daybreak;
using CalamityMod.Utilities.Daybreak.Buffers;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Graphics;
using Terraria;
using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.UI.Chat;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Items.Accessories.Wings
{
// The equip sprite is actually blank as a custom draw layer is used to draw the real sprites without any base sprites conflicting
[AutoloadEquip(EquipType.Wings)]
public class TiredTail : BaseWings
{
public override float BonusAscentWhileFalling => 0.95f;
public override float BonusAscentWhileRising => 0.15f;
public override float RisingSpeedThreshold => 1f;
public override float MaxAscentSpeed => 4.5f;
public override float BaseAscent => 0.1f;
float BoostPower => 3f;
public override void SetStaticDefaults()
{
ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(210, 8.5f, 2.88f, true, 16, 10f);
}
public override void SetDefaults()
{
base.SetDefaults();
Item.width = 22;
Item.height = 20;
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
Item.rare = ModContent.RarityType<HotPink>();
Item.Calamity().devItem = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
if (!hideVisual)
player.GetModPlayer<TiredTailPlayer>().tiredTailDraw = true;
if (player.velocity.Y != 0)
{
if (player.dashDelay != -1) //This differs from Starboard - Starboard checks for 1 full second passing after a dash begun, while this happens as soon as the dash ends
player.runSlowdown *= 6;
}
}
public override void UpdateVanity(Player player)
{
player.GetModPlayer<TiredTailPlayer>().tiredTailDraw = true;
}
public override bool WingUpdate(Player player, bool inUse) => true;
public override void AdditionalFlightMovement(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
{
if (player.TryingToHoverDown && player.controlJump && player.wingTime > 0f && !player.merman)
{
player.wingTime += 0.5f;
player.velocity.Y *= 0.8f;
if (player.velocity.Y > -2f && player.velocity.Y < 1f)
player.velocity.Y = 1E-05f;
ascentWhenFalling *= 0f;
ascentWhenRising *= 0f;
constantAscend *= 0f;
}
if (player.TryingToHoverUp)
{
ascentWhenFalling *= BoostPower;
ascentWhenRising *= BoostPower;
maxCanAscendMultiplier /= 1.5f;
maxAscentMultiplier /= 1.5f;
constantAscend *= BoostPower;
player.wingTime -= 1;
}
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<ArmoredShell>(3).
AddIngredient(ItemID.Sapphire).
AddTile(TileID.DemonAltar).
Register();
}
}
public class TiredTailPlayer : ModPlayer
{
public bool tiredTailDraw = false;
public List<(Vector2 pos, float rot)> tailPos;
public override void ResetEffects()
{
//Handled here to prevent issues with instancing of chat tags
if (TiredTailTextEffects.displayTimer > 0)
{
TiredTailTextEffects.expansionFactor += 0.033f;
TiredTailTextEffects.displayTimer -= 1;
}
else
{
TiredTailTextEffects.expansionFactor = 0f;
}
tiredTailDraw = false;
}
public override void PostUpdate()
{
if (tiredTailDraw)
{
if (tailPos == null)
{
tailPos = new();
for (var i = 0; i < 3; i++)
{
tailPos.Add(new(Player.Center, 0));
}
}
for (var i = 0; i < tailPos.Count; i++)
{
Vector2 nextCent = Vector2.Zero;
float nextRot = 0;
if (i == 0)
{
nextCent = Player.Center + new Vector2(0, 6);
nextRot = new Vector2(Player.direction, -0.325f).ToRotation();
}
else
{
nextCent = tailPos[i - 1].Item1;
nextRot = tailPos[i - 1].Item2;
}
Vector2 destinationOffset = nextCent - tailPos[i].Item1;
if (nextRot != tailPos[i].Item2)
{
float angle = MathHelper.WrapAngle(nextRot - tailPos[i].Item2);
destinationOffset = destinationOffset.RotatedBy(angle * 0.1f);
}
var rotation = destinationOffset.ToRotation();
var center = nextCent - destinationOffset.SafeNormalize(Vector2.Zero) * (14 * 1);
if (i == tailPos.Count - 1)
{
center = nextCent - destinationOffset.SafeNormalize(Vector2.Zero) * (21 * 1);
}
tailPos[i] = new(center, rotation);
}
}
else
{
tailPos = null;
}
}
}
public class TailDraw : PlayerDrawLayer
{
List<Vector4[]> ColorPallettes = new();
public override void SetStaticDefaults()
{
if (Main.netMode != NetmodeID.Server)
Main.QueueMainThreadAction(() =>
{
//Load palettes automatically
var texture = ModContent.Request<Texture2D>("CalamityMod/Items/Accessories/Wings/TiredTailPallette", ReLogic.Content.AssetRequestMode.ImmediateLoad).Value;
var BaseArray = new Color[texture.Width * texture.Height];
texture.GetData(BaseArray);
List<Vector4> pal = new();
for (var i = 0; i < BaseArray.Length; i++)
{
if (i % texture.Width == 0)
{
if (pal.Count > 0)
ColorPallettes.Add(pal.ToArray());
pal = new();
}
pal.Add(BaseArray[i].ToVector4());
}
ColorPallettes.Add(pal.ToArray());
ArmorPallettes =
[
//silva
([ItemType<SilvaHeadMagic>(),ItemType<SilvaHeadSummon>()],
[ItemType<SilvaArmor>()],
[ItemType<SilvaLeggings>()],
ColorPallettes[2]),
//god slayer
([ItemType<GodSlayerHeadMelee>(),ItemType<GodSlayerHeadRanged>(),ItemType<GodSlayerHeadRogue>()],
[ItemType<GodSlayerChestplate>()],
[ItemType<GodSlayerLeggings>()],
ColorPallettes[3]),
//hydro
([ItemType<HydrothermicHeadMelee>(),ItemType<HydrothermicHeadRanged>(),ItemType<HydrothermicHeadMagic>(),ItemType<HydrothermicHeadSummon>(),ItemType<HydrothermicHeadRogue>()],
[ItemType<HydrothermicArmor>()],
[ItemType<HydrothermicSubligar>()],
ColorPallettes[4]),
//auric
([ItemType<AuricTeslaHeadMelee>(),ItemType<AuricTeslaHeadRanged>(),ItemType<AuricTeslaHeadMagic>(),ItemType<AuricTeslaHeadSummon>(),ItemType<AuricTeslaHeadRogue>()],
[ItemType<AuricTeslaBodyArmor>()],
[ItemType<AuricTeslaCuisses>()],
ColorPallettes[5]),
//fearmonger
([ItemType<FearmongerGreathelm>()],
[ItemType<FearmongerPlateMail>()],
[ItemType<FearmongerGreaves>()],
ColorPallettes[6]),
//Bloodlfare
([ItemType<BloodflareHeadMelee>(),ItemType<BloodflareHeadRanged>(),ItemType<BloodflareHeadMagic>(),ItemType<BloodflareHeadSummon>(),ItemType<BloodflareHeadRogue>()],
[ItemType<BloodflareBodyArmor>()],
[ItemType<BloodflareCuisses>()],
ColorPallettes[7]),
//Tarragon
([ItemType<TarragonHeadMelee>(),ItemType<TarragonHeadRanged>(),ItemType<TarragonHeadMagic>(),ItemType<TarragonHeadSummon>(),ItemType<TarragonHeadRogue>()],
[ItemType<TarragonBreastplate>()],
[ItemType<TarragonLeggings>()],
ColorPallettes[8]),
//Omega Blue
([ItemType<OmegaBlueHelmet>()],
[ItemType<OmegaBlueChestplate>()],
[ItemType<OmegaBlueTentacles>()],
ColorPallettes[9]),
//Gem Tech
([ItemType<GemTechHeadgear>()],
[ItemType<GemTechBodyArmor>()],
[ItemType<GemTechSchynbaulds>()],
ColorPallettes[10]),
//Demonshade
([ItemType<DemonshadeHelm>()],
[ItemType<DemonshadeBreastplate>()],
[ItemType<DemonshadeGreaves>()],
ColorPallettes[11]),
//Prismatic
([ItemType<PrismaticHelmet>()],
[ItemType<PrismaticRegalia>()],
[ItemType<PrismaticGreaves>()],
ColorPallettes[12]),
//Empyrean
([ItemType<EmpyreanMask>()],
[ItemType<EmpyreanCloak>()],
[ItemType<EmpyreanCuisses>()],
ColorPallettes[13]),
//Solar
([ItemID.SolarFlareHelmet],
[ItemID.SolarFlareBreastplate],
[ItemID.SolarFlareLeggings],
ColorPallettes[14]),
//Vortex
([ItemID.VortexHelmet],
[ItemID.VortexBreastplate],
[ItemID.VortexLeggings],
ColorPallettes[15]),
//Nebula
([ItemID.NebulaHelmet],
[ItemID.NebulaBreastplate],
[ItemID.NebulaLeggings],
ColorPallettes[16]),
//Stardust
([ItemID.StardustHelmet],
[ItemID.StardustBreastplate],
[ItemID.StardustLeggings],
ColorPallettes[17]),
];
});
}
List<(List<int> heads, List<int> bodies, List<int> legs, Vector4[] pallette)> ArmorPallettes = [];
public override bool GetDefaultVisibility(PlayerDrawSet drawInfo) => true;
public override Position GetDefaultPosition() => new BeforeParent(PlayerDrawLayers.Wings);
protected override void Draw(ref PlayerDrawSet drawInfo)
{
var player = drawInfo.drawPlayer;
var modplayer = drawInfo.drawPlayer.GetModPlayer<TiredTailPlayer>();
var tex1 = Request<Texture2D>("CalamityMod/Items/Accessories/Wings/TiredTailSegment").Value;
var tex2 = Request<Texture2D>("CalamityMod/Items/Accessories/Wings/TiredTailTail").Value;
if (modplayer.tailPos != null)
{
var TargetPallette = ColorPallettes[1];
foreach (var item in ArmorPallettes)
{
if ((item.heads.Count == 0 || item.heads.Any(x => ContentSamples.ItemsByType[x].headSlot == player.head))
&& (item.bodies.Count == 0 || item.bodies.Any(x => ContentSamples.ItemsByType[x].bodySlot == player.body))
&& (item.legs.Count == 0 || item.legs.Any(x => ContentSamples.ItemsByType[x].legSlot == player.legs)))
{
TargetPallette = item.pallette;
break;
}
}
//manual override for Empyrean's transform to work
if (player.Calamity().meldTransformationPower || player.Calamity().meldTransformationForce)
{
TargetPallette = ArmorPallettes.First(x => x.heads.Contains(ItemType<EmpyreanMask>())).pallette;
}
using var SegmentLease = RenderTargetPool.Shared.Rent(Main.instance.GraphicsDevice, tex1.Width, tex1.Height);
using var TailLease = RenderTargetPool.Shared.Rent(Main.instance.GraphicsDevice, tex2.Width, tex2.Height);
using (Main.spriteBatch.Scope())
{
using (SegmentLease.Scope(clearColor: Color.Transparent))
{
var shaderSnap = new SpriteBatchSnapshot();
shaderSnap.SortMode = SpriteSortMode.Immediate;
shaderSnap.SamplerState = SamplerState.PointClamp;
shaderSnap.TransformMatrix = Matrix.identity;
Main.spriteBatch.Begin(shaderSnap);
MiscShaderData paletteSwap = GameShaders.Misc["CalamityMod:PaletteSwap"];
paletteSwap.Shader.Parameters["sourcePalette"].SetValue(ColorPallettes[0]);
paletteSwap.Shader.Parameters["paletteSize"].SetValue(ColorPallettes[0].Length);
paletteSwap.Shader.Parameters["targetPalette"].SetValue(TargetPallette);
paletteSwap.Shader.Parameters["matchThreshold"].SetValue(0.0001f);
paletteSwap.Apply();
Main.spriteBatch.Draw(tex1, Vector2.Zero, Color.White);
Main.spriteBatch.End();
}
using (TailLease.Scope(clearColor: Color.Transparent))
{
var shaderSnap = new SpriteBatchSnapshot();
shaderSnap.SortMode = SpriteSortMode.Immediate;
shaderSnap.SamplerState = SamplerState.PointClamp;
shaderSnap.TransformMatrix = Matrix.identity;
Main.spriteBatch.Begin(shaderSnap);
MiscShaderData paletteSwap = GameShaders.Misc["CalamityMod:PaletteSwap"];
paletteSwap.Shader.Parameters["sourcePalette"].SetValue(ColorPallettes[0]);
paletteSwap.Shader.Parameters["paletteSize"].SetValue(ColorPallettes[0].Length);
paletteSwap.Shader.Parameters["targetPalette"].SetValue(TargetPallette);
paletteSwap.Shader.Parameters["matchThreshold"].SetValue(0.01f);
paletteSwap.Apply();
Main.spriteBatch.Draw(tex2, Vector2.Zero, Color.White);
Main.spriteBatch.End();
}
}
var calamityPlayer = drawInfo.drawPlayer.Calamity();
//Copied from the rogue steallth visuals
// TODO -- rogue stealth visuals are an utter catastrophe and should be fully destroyed on next stealth rework
float r = 1;
float g = 1;
float b = 1;
float a = 1;
if (calamityPlayer.rogueStealth > 0f && calamityPlayer.rogueStealthMax > 0f && drawInfo.drawPlayer.townNPCs < 3f && CalamityClientConfig.Instance.StealthInvisibility)
{
// A translucent orchid color, the rogue class color
float colorValue = calamityPlayer.rogueStealth / calamityPlayer.rogueStealthMax * 0.9f; //0 to 0.9
r = 1f - (colorValue * 0.89f); //255 to 50
g = 1f - colorValue; //255 to 25
b = 1f - (colorValue * 0.89f); //255 to 50
a = 1f - colorValue; //255 to 25
}
for (var i = modplayer.tailPos.Count - 1; i >= 0; i--)
{
var color2 = Lighting.GetColor(modplayer.tailPos[i].pos.ToTileCoordinates());
var color = new Color((int)(color2.R * r), (int)(color2.G * g), (int)(color2.B * b), (int)(color2.A * a));
if (i == modplayer.tailPos.Count - 1)
{
drawInfo.DrawDataCache.Add(new(TailLease.Target, modplayer.tailPos[i].pos - Main.screenPosition, null, color, modplayer.tailPos[i].rot + (float)Math.PI, tex2.Size() / 2f, 1f, SpriteEffects.None, 0));
}
else
{
drawInfo.DrawDataCache.Add(new(SegmentLease.Target, modplayer.tailPos[i].pos - Main.screenPosition, null, color, modplayer.tailPos[i].rot + (float)Math.PI, tex1.Size() / 2f, 1f, SpriteEffects.None, 0));
}
}
}
}
}
public sealed class TiredTailTextEffects(string text) : TextSnippet
{
//Handled by TiredTailPlayer as this effect is for TiredTail
public static float expansionFactor = 0;
public static int displayTimer = 0;
public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = new Vector2(), Color color = new Color(), float scale = 1)
{
//size = new Vector2(GetStringLength(FontAssets.MouseText.Value), FontAssets.MouseText.Value.MeasureString(" ").Y * scale);
if (color == default || color == Main.MouseTextColorReal)
{
color = Colors.AlphaDarken(HotPink.TextColor);
}
var textarray = text.ToArray();
for (var i = 0; i < textarray.Length; i++)
{
if (expansionFactor - 10 > i)
{
textarray[i] = (i == 0 ? 'ɔ' : '»');
}
}
var textToDraw = new string(textarray);
size = FontAssets.MouseText.Value.MeasureString(textToDraw) * scale;
if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0))
{
var pos = position;
using var lease = ScreenspaceTargetPool.Shared.Rent(Main.instance.GraphicsDevice);
string txt = "";
var matrix = spriteBatch.transformMatrix;
using (spriteBatch.Scope())
{
using (lease.Scope(clearColor: Color.Transparent))
{
var max = FontAssets.MouseText.Value.MeasureString(text) * Math.Min(1f, expansionFactor);
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, matrix);
foreach (var item in textarray)
{//new(92,83,117)
pos = position;
pos.X += Math.Min(FontAssets.MouseText.Value.MeasureString(txt).X, max.X + 9999);
float sin = (MathF.Sin(pos.X * 0.02f + Main.GlobalTimeWrappedHourly * -1.5f) + 1) * 0.5f;
float sin2 = (MathF.Sin(pos.X * 0.02f + Main.GlobalTimeWrappedHourly * -0.9f) + 1) * 0.5f;
float sin3 = MathF.Sin(pos.X * 0.02f + Main.GlobalTimeWrappedHourly * -1.5f + MathHelper.PiOver2);
var c = new Color(171, 153, 204);
if (txt.Length == 0 || txt.Length == text.Length - 1)
c = Color.Cyan;
else if (txt.Length % 4 == 3)
{
c = Color.HotPink;
}
c = Color.Lerp(Colors.AlphaDarken(new Color(0, 255, 200)), c, MathHelper.Clamp(expansionFactor - 2, 0, 1));
float posMult = Math.Max(MathHelper.Clamp((expansionFactor - 10) * 0.5f, 0, 3), MathHelper.Clamp((expansionFactor - 2) * 0.5f, 0, 1));
var origin = FontAssets.MouseText.Value.MeasureString(item.ToString()) * 0.5f;
ChatManager.DrawColorCodedString(spriteBatch, FontAssets.MouseText.Value, item.ToString(), origin + pos + new Vector2(0, item == 'ɔ' ? -1 : 0) + new Vector2((-2f + 4 * sin2) * posMult, (-2 + sin * 4) * posMult), c, sin3 * posMult * 0.1f, origin, new Vector2(scale));
txt += item;
}
spriteBatch.End();
}
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity);
foreach (var item in ChatManager.ShadowDirections)
{
spriteBatch.Draw(lease.Target, Vector2.Zero + Vector2.TransformNormal(item * 2, matrix), null, Color.Black, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
}
spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
spriteBatch.End();
}
}
return true;
}
public override void Update()
{
displayTimer = 10;
}
public override float GetStringLength(DynamicSpriteFont font)
{
float size = font.MeasureString(text).X;
return size * Scale;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

+2
View File
@@ -80,5 +80,7 @@ namespace CalamityMod.Items.Armor.Demonshade
public string ExtensionTexture => "CalamityMod/Items/Armor/Demonshade/DemonshadeHelm_Extension";
public Vector2 ExtensionSpriteOffset(PlayerDrawSet drawInfo) => new Vector2(0, -4f);
public static Color DemonshadeRarityColor() => CalamityUtils.ColorSwap(new Color(255, 132, 22), new Color(221, 85, 7), 4f);
}
}
-104
View File
@@ -415,110 +415,6 @@ namespace CalamityMod.Items
{
if (item.type == ModContent.ItemType<TheCommunity>())
nameLine.OverrideColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB);
// Developer items
if (item.type == ModContent.ItemType<Sylvestaff>())
nameLine.OverrideColor = new Color(249, 197, 255);
if (item.type == ModContent.ItemType<StaffofBlushie>())
nameLine.OverrideColor = new Color(0, 0, 255);
if (item.type == ModContent.ItemType<TheDanceofLight>())
nameLine.OverrideColor = TheDanceofLight.GetSyncedLightColor();
if (item.type == ModContent.ItemType<NanoblackReaper>())
nameLine.OverrideColor = new Color(0.34f, 0.34f + 0.66f * Main.DiscoG / 255f, 0.34f + 0.5f * Main.DiscoG / 255f);
if (item.type == ModContent.ItemType<ShatteredCommunity>())
nameLine.OverrideColor = ShatteredCommunity.GetRarityColor();
if (item.type == ModContent.ItemType<Ozzathoth>())
nameLine.OverrideColor = ShatteredCommunity.GetRarityColor();
if (item.type == ModContent.ItemType<ProfanedSoulCrystal>())
nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(255, 166, 0), new Color(25, 250, 25), 6f); //alternates between emerald green and amber (BanditHueh)
if (item.type == ModContent.ItemType<TemporalUmbrella>())
nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(210, 0, 255), new Color(255, 248, 24), 4f);
if (item.type == ModContent.ItemType<Endogenesis>())
nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(131, 239, 255), new Color(36, 55, 230), 4f);
if (item.type == ModContent.ItemType<DraconicDestruction>())
nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(255, 69, 0), new Color(139, 0, 0), 4f);
if (item.type == ModContent.ItemType<ScarletDevil>())
nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(191, 45, 71), new Color(185, 187, 253), 4f);
if (item.type == ModContent.ItemType<RedSun>())
nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(204, 86, 80), new Color(237, 69, 141), 4f);
if (item.type == ModContent.ItemType<CrystylCrusher>())
nameLine.OverrideColor = new Color(129, 29, 149);
if (item.type == ModContent.ItemType<SomaPrime>())
nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(255, 255, 255), new Color(0xD1, 0xCC, 0x6F), 4f);
if (item.type == ModContent.ItemType<Svantechnical>())
nameLine.OverrideColor = new Color(220, 20, 60);
if (item.type == ModContent.ItemType<Contagion>())
nameLine.OverrideColor = new Color(207, 17, 117);
if (item.type == ModContent.ItemType<TriactisTruePaladinianMageHammerofMight>())
nameLine.OverrideColor = new Color(227, 226, 180);
if (item.type == ModContent.ItemType<IllustriousKnives>())
nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(154, 255, 151), new Color(228, 151, 255), 4f);
if (item.type == ModContent.ItemType<DemonshadeHelm>() || item.type == ModContent.ItemType<DemonshadeBreastplate>() || item.type == ModContent.ItemType<DemonshadeGreaves>())
nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(255, 132, 22), new Color(221, 85, 7), 4f);
if (item.type == ModContent.ItemType<AngelicAlliance>())
{
nameLine.OverrideColor = CalamityUtils.MulticolorLerp(Main.GlobalTimeWrappedHourly / 2f % 1f, new Color[]
{
new Color(255, 196, 55),
new Color(255, 231, 107),
new Color(255, 254, 243)
});
}
// TODO -- for cleanliness, ALL color math should either be a one-line color swap or inside the item's own file
// The items that currently violate this are all below:
// Eternity, Flamsteed Ring, Earth
if (item.type == ModContent.ItemType<Eternity>())
{
List<Color> colorSet = new List<Color>()
{
new Color(188, 192, 193), // white
new Color(157, 100, 183), // purple
new Color(249, 166, 77), // honey-ish orange
new Color(255, 105, 234), // pink
new Color(67, 204, 219), // sky blue
new Color(249, 245, 99), // bright yellow
new Color(236, 168, 247), // purplish pink
};
if (nameLine != null)
{
int colorIndex = (int)(Main.GlobalTimeWrappedHourly / 2 % colorSet.Count);
Color currentColor = colorSet[colorIndex];
Color nextColor = colorSet[(colorIndex + 1) % colorSet.Count];
nameLine.OverrideColor = Color.Lerp(currentColor, nextColor, Main.GlobalTimeWrappedHourly % 2f > 1f ? 1f : Main.GlobalTimeWrappedHourly % 1f);
}
}
if (item.type == ModContent.ItemType<FlamsteedRing>())
{
if (Main.GlobalTimeWrappedHourly % 1f < 0.6f)
{
nameLine.OverrideColor = new Color(89, 229, 255);
}
else if (Main.GlobalTimeWrappedHourly % 1f < 0.8f)
{
nameLine.OverrideColor = Color.Lerp(new Color(89, 229, 255), Color.White, (Main.GlobalTimeWrappedHourly % 1f - 0.6f) / 0.2f);
}
else
{
nameLine.OverrideColor = Color.Lerp(Color.White, new Color(89, 229, 255), (Main.GlobalTimeWrappedHourly % 1f - 0.8f) / 0.2f);
}
}
if (item.type == ModContent.ItemType<Earth>())
{
List<Color> earthColors = new List<Color>()
{
Color.OrangeRed,
Color.MediumTurquoise,
Color.LimeGreen
};
if (nameLine != null)
{
int colorIndex = (int)(Main.GlobalTimeWrappedHourly / 2 % earthColors.Count);
Color currentColor = earthColors[colorIndex];
Color nextColor = earthColors[(colorIndex + 1) % earthColors.Count];
nameLine.OverrideColor = Color.Lerp(currentColor, nextColor, Main.GlobalTimeWrappedHourly % 2f > 1f ? 1f : Main.GlobalTimeWrappedHourly % 1f);
}
}
}
#endregion
+2
View File
@@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Dyes
{
@@ -14,6 +15,7 @@ namespace CalamityMod.Items.Dyes
public override void SafeSetStaticDefaults()
{
Item.ResearchUnlockCount = 3;
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<ProfanedMoonlightDye>();
}
public override void SafeSetDefaults()
+2
View File
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Dyes
@@ -12,6 +13,7 @@ namespace CalamityMod.Items.Dyes
public override void SafeSetStaticDefaults()
{
Item.ResearchUnlockCount = 3;
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<ProfanedFlameDye>();
}
public override void SafeSetDefaults()
-2
View File
@@ -290,8 +290,6 @@ namespace CalamityMod.Items.Fishing
bool reset = false;
float oldSpin = 0;
int digDir = 0;
float spinSin => MathF.Sin(spin);
public override void SetDefaults()
@@ -117,6 +117,7 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings
"Cei",
"Chetto",
"Chill Dude",
"ClockworkShade",
"Cobalion",
"Daim",
"DarkTiny",
@@ -189,7 +190,6 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings
"Runefield",
"Sargassum",
"sentri",
"Shade",
"SharZz",
"Shucks",
"Silver-Lord of Ash",
+16 -15
View File
@@ -1,4 +1,6 @@
using CalamityMod.Events;
using System.Collections.Generic;
using System.Linq;
using CalamityMod.Events;
using CalamityMod.NPCs;
using CalamityMod.NPCs.Providence;
using CalamityMod.Projectiles.Boss;
@@ -36,28 +38,27 @@ namespace CalamityMod.Items.SummonItems
public override bool CanUseItem(Player player)
{
var Prov = CalamityGlobalNPC.holyBoss;
bool canPissOffProvi = Prov != -1 && Main.npc[Prov].life >= (Main.npc[Prov].lifeMax * 0.95f) && Main.npc[Prov].Calamity().newAI[3] >= 180f && !Main.npc[Prov].Calamity().CurrentlyEnraged;
return ((!NPC.AnyNPCs(ModContent.NPCType<Providence>()) && (player.ZoneHallow || player.ZoneUnderworldHeight)) || canPissOffProvi) && !BossRushEvent.BossRushActive;
return !NPC.AnyNPCs(ModContent.NPCType<Providence>()) && (player.ZoneHallow || player.ZoneUnderworldHeight) && !BossRushEvent.BossRushActive;
}
public override bool? UseItem(Player player)
{
var Prov = CalamityGlobalNPC.holyBoss;
bool usingToMakeProviPissedOff = Prov != -1 && Main.npc[Prov].life >= (Main.npc[Prov].lifeMax * 0.95f) && Main.npc[Prov].Calamity().newAI[3] >= 180f && !Main.npc[Prov].Calamity().CurrentlyEnraged;
if (usingToMakeProviPissedOff)
int posX = (int)player.position.X;
int posY = (int)(player.position.Y - 100f);
int bossToSpawn = ModContent.NPCType<Providence>();
NPC prov = CalamityUtils.SpawnBossOnPosUsingItem(player, bossToSpawn, posX, posY, Providence.SpawnSound);
if (Main.getGoodWorld)
{
(Main.npc[Prov].ModNPC as Providence).hasBeenGivenFullPower = true;
(prov.ModNPC as Providence).hasBeenGivenFullPower = true;
Projectile.NewProjectile(Item.GetSource_FromThis(), player.Center, Vector2.Zero, ModContent.ProjectileType<HolyProfanedCore>(), 0, 0);
}
else
{
int posX = (int)player.position.X;
int posY = (int)(player.position.Y - 100f);
int bossToSpawn = ModContent.NPCType<Providence>();
CalamityUtils.SpawnBossOnPosUsingItem(player, bossToSpawn, posX, posY, Providence.SpawnSound);
}
return true;
}
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
string enrageTooltip = Main.getGoodWorld ? "\n" + this.GetLocalizedValue("EnrageText") : "";
tooltips.FindAndReplace("[ENRAGE]", enrageTooltip);
}
}
}
+2
View File
@@ -144,5 +144,7 @@ namespace CalamityMod.Items.Tools
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor() => new Color(129, 29, 149);
}
}
+1 -1
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
{
Item.width = 38;
Item.height = 24;
Item.damage = 200;
Item.damage = 160;
Item.mana = 12;
Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.HoldUp;
+17
View File
@@ -60,5 +60,22 @@ namespace CalamityMod.Items.Weapons.Magic
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor()
{
List<Color> colorSet = [
new Color(188, 192, 193), // white
new Color(157, 100, 183), // purple
new Color(249, 166, 77), // honey-ish orange
new Color(255, 105, 234), // pink
new Color(67, 204, 219), // sky blue
new Color(249, 245, 99), // bright yellow
new Color(236, 168, 247), // purplish pink
];
int colorIndex = (int)(Main.GlobalTimeWrappedHourly / 2 % colorSet.Count);
Color currentColor = colorSet[colorIndex];
Color nextColor = colorSet[(colorIndex + 1) % colorSet.Count];
return Color.Lerp(currentColor, nextColor, Main.GlobalTimeWrappedHourly % 2f > 1f ? 1f : Main.GlobalTimeWrappedHourly % 1f);
}
}
}
+8 -4
View File
@@ -1,11 +1,11 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Dusts;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic
public int FiringMode = 0; // 0 = hellfireballs, 1 = hellblasts
public int ProjectilesFired = 0;
public static readonly SoundStyle FireSound = new SoundStyle("CalamityMod/Sounds/Custom/CalamitasClone/CalClone_BigFireballBit", 4) with { Volume = 0.6f, MaxInstances = 4 };
public override void SetStaticDefaults()
{
CalamityItemSets.ExtraDebuffTooltip_Enemy[Type] = [ModContent.BuffType<BrimstoneFlames>()];
@@ -32,13 +33,14 @@ namespace CalamityMod.Items.Weapons.Magic
Item.mana = 28;
Item.useAnimation = Item.useTime = 46;
Item.useStyle = ItemUseStyleID.Shoot;
Item.UseSound = FireSound;
Item.noMelee = true;
Item.knockBack = 7.5f;
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
Item.rare = ItemRarityID.Lime;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<BrimstoneHellfireballFriendly>();
Item.shootSpeed = 14f;
Item.shoot = ModContent.ProjectileType<CalamitousFireballFriendly>();
Item.shootSpeed = 22f;
}
// Shoots twice as fast (and uses half as much mana to compensate) during hellblasts
@@ -52,7 +54,7 @@ namespace CalamityMod.Items.Weapons.Magic
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
ProjectilesFired++;
type = FiringMode == 1 ? ModContent.ProjectileType<SeethingDischargeBrimstoneHellblast>() : Item.shoot;
type = FiringMode == 1 ? ModContent.ProjectileType<CalamitousDartFriendly>() : Item.shoot;
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, Main.myPlayer);
// DUST
@@ -86,11 +88,13 @@ namespace CalamityMod.Items.Weapons.Magic
{
FiringMode = 1;
ProjectilesFired = 0;
SoundEngine.PlaySound(SoundID.Item100 with { Volume = 0.8f }, player.Center);
}
if (FiringMode == 1 && ProjectilesFired >= 10)
{
FiringMode = 0;
ProjectilesFired = 0;
SoundEngine.PlaySound(SoundID.Item100 with { Volume = 0.8f }, player.Center);
}
return false;
}
+3
View File
@@ -2,6 +2,7 @@
using CalamityMod.Projectiles.Magic;
using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Terraria.ID;
using Terraria.ModLoader;
@@ -44,5 +45,7 @@ namespace CalamityMod.Items.Weapons.Magic
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor() => Color.Blue;
}
}
+2
View File
@@ -111,5 +111,7 @@ namespace CalamityMod.Items.Weapons.Magic
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, scale, SpriteEffects.None, 0);
return false;
}
public static Color RarityColor() => new Color(249, 197, 255);
}
}
-1
View File
@@ -3,7 +3,6 @@ using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Systems.Collections;
using CalamityMod.Rarities;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -62,5 +62,7 @@ namespace CalamityMod.Items.Weapons.Melee
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor() => CalamityUtils.ColorSwap(new Color(255, 69, 0), new Color(139, 0, 0), 4f);
}
}
+9
View File
@@ -76,5 +76,14 @@ namespace CalamityMod.Items.Weapons.Melee
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor()
{
List<Color> earthColors = [ Color.OrangeRed, Color.MediumTurquoise, Color.LimeGreen ];
int colorIndex = (int)(Main.GlobalTimeWrappedHourly / 2 % earthColors.Count);
Color currentColor = earthColors[colorIndex];
Color nextColor = earthColors[(colorIndex + 1) % earthColors.Count];
return Color.Lerp(currentColor, nextColor, Main.GlobalTimeWrappedHourly % 2f > 1f ? 1f : Main.GlobalTimeWrappedHourly % 1f);
}
}
}
+2
View File
@@ -62,5 +62,7 @@ namespace CalamityMod.Items.Weapons.Melee
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor() => CalamityUtils.ColorSwap(new Color(154, 255, 151), new Color(228, 151, 255), 4f);
}
}
+14 -3
View File
@@ -1,7 +1,8 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Melee.Yoyos;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
@@ -13,9 +14,10 @@ namespace CalamityMod.Items.Weapons.Melee
{
public new string LocalizationCategory => "Items.Weapons.Melee";
public static float Lifetime => 15; //Technically has infinite lifetime, but manually sets 15 seconds. See projectile file for details
public static float Reach = 512f;
public static float Speed = 36f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(Reach.ToTiles(), Speed);
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(Reach.ToTiles(), Speed, Lifetime);
public override void SetStaticDefaults()
{
@@ -30,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee
Item.width = 28;
Item.height = 38;
Item.DamageType = DamageClass.MeleeNoSpeed;
Item.damage = 50;
Item.damage = 35;
Item.knockBack = 4f;
Item.useTime = 22;
Item.useAnimation = 22;
@@ -48,5 +50,14 @@ namespace CalamityMod.Items.Weapons.Melee
Item.rare = ItemRarityID.Lime;
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
}
public override bool CanUseItem(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.oblivionCooldown == 0)
return true;
else
return false;
}
}
}
+2
View File
@@ -117,5 +117,7 @@ namespace CalamityMod.Items.Weapons.Melee
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor() => CalamityUtils.ColorSwap(new Color(204, 86, 80), new Color(237, 69, 141), 4f);
}
}
@@ -2,6 +2,7 @@
using CalamityMod.Projectiles.Melee;
using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
@@ -44,5 +45,7 @@ namespace CalamityMod.Items.Weapons.Melee
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor() => new Color(227, 226, 180);
}
}
+2
View File
@@ -53,5 +53,7 @@ namespace CalamityMod.Items.Weapons.Ranged
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<ContagionBow>(), damage, knockback, player.whoAmI);
return false;
}
public static Color RarityColor() => new Color(207, 17, 117);
}
}
+3 -3
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Ranged
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 1.5f;
Item.UseSound = SoundID.Item34;
Item.UseSound = SoundID.DD2_BetsyFireballShot;
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
Item.rare = ItemRarityID.Lime;
Item.autoReuse = true;
@@ -38,9 +38,9 @@ namespace CalamityMod.Items.Weapons.Ranged
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
for (int i = 0; i <= 2; i++)
for (int i = 0; i <= 3; i++)
{
Projectile.NewProjectile(source, position + velocity * 4f, velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.9f, 1.25f), type, damage, knockback, player.whoAmI);
Projectile.NewProjectile(source, position, velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.9f, 1.25f), type, damage, knockback, player.whoAmI);
}
return false;
}
+2
View File
@@ -76,5 +76,7 @@ namespace CalamityMod.Items.Weapons.Ranged
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor() => CalamityUtils.ColorSwap(new Color(255, 255, 255), new Color(0xD1, 0xCC, 0x6F), 4f);
}
}
+2
View File
@@ -82,5 +82,7 @@ namespace CalamityMod.Items.Weapons.Ranged
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor() => new Color(220, 20, 60);
}
}
+5 -5
View File
@@ -24,13 +24,13 @@ namespace CalamityMod.Items.Weapons.Rogue
{
Item.width = 26;
Item.height = 48;
Item.damage = 92;
Item.damage = 110;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.useTime = 2;
Item.useAnimation = 10;
Item.useTime = 3;
Item.useAnimation = 12;
Item.reuseDelay = 1;
Item.useLimitPerAnimation = 5;
Item.useLimitPerAnimation = 4;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 5f;
Item.UseSound = SoundID.Item109;
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Rogue
for (float i = 0; i < 9; i++)
{
float angle = MathHelper.TwoPi / 9f * i;
Projectile.NewProjectile(source, player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<CosmicScythe>(), damage * 3, knockback, player.whoAmI, angle);
Projectile.NewProjectile(source, player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<CosmicScythe>(), (int)(damage * 1.5f), knockback, player.whoAmI, angle);
}
}
else if (stealthSalvo)
-1
View File
@@ -495,7 +495,6 @@ namespace CalamityMod.Projectiles.Rogue
{
public new string LocalizationCategory => "Projectiles.Rogue";
public static int lifetime => 1200;
Color? color = null;
public override void SetStaticDefaults()
{
ProjectileID.Sets.CultistIsResistantTo[Type] = true;
+2
View File
@@ -174,5 +174,7 @@ namespace CalamityMod.Items.Weapons.Rogue
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor() => new Color(0.34f, 0.34f + 0.66f * Main.DiscoG / 255f, 0.34f + 0.5f * Main.DiscoG / 255f);
}
}
+2
View File
@@ -53,5 +53,7 @@ namespace CalamityMod.Items.Weapons.Rogue
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor() => CalamityUtils.ColorSwap(new Color(191, 45, 71), new Color(185, 187, 253), 4f);
}
}
+1 -1
View File
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 88;
Item.height = 108;
Item.damage = 110;
Item.damage = 120;
Item.DamageType = DamageClass.Summon;
Item.mana = 10;
Item.useAnimation = Item.useTime = 24;
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.width = 26;
Item.height = 28;
Item.mana = 10;
Item.damage = 15;
Item.damage = 18;
Item.useStyle = ItemUseStyleID.Swing;
Item.buffType = ModContent.BuffType<CausticStaffBuff>();
Item.shoot = ModContent.ProjectileType<CausticStaffSummon>();
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 42;
Item.height = 60;
Item.damage = 97;
Item.damage = 95;
Item.mana = 10;
Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.Swing;
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 56;
Item.height = 60;
Item.damage = 75;
Item.damage = 69;
Item.useAnimation = Item.useTime = 24;
Item.mana = 10;
Item.knockBack = 2f;
+1 -1
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 64;
Item.height = 62;
Item.damage = 215;
Item.damage = 222;
Item.mana = 10;
Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.Swing;
+4 -4
View File
@@ -9,11 +9,11 @@ namespace CalamityMod.Items.Weapons.Summon
{
public class EnchantedKnifeStaff : ModItem, ILocalizedModType
{
public static float SwingTime = 20f;
public static float SwingWait = 10f;
public static float SwingTime = 18f;
public static float SwingWait = 6f;
public static float ProjectileSpeed = 15f;
public static float DashCooldown = 30f;
public static float DashSpeed = 16f;
public static float ChaseSpeed = 10f;
public static float RecoilSpeed = -4f;
public new string LocalizationCategory => "Items.Weapons.Summon";
+2
View File
@@ -101,5 +101,7 @@ namespace CalamityMod.Items.Weapons.Summon
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor() => CalamityUtils.ColorSwap(new Color(131, 239, 255), new Color(36, 55, 230), 4f);
}
}
+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 66;
Item.height = 70;
Item.damage = 175;
Item.damage = 160;
Item.DamageType = DamageClass.Summon;
Item.buffType = ModContent.BuffType<Phantom>();
Item.shoot = ModContent.ProjectileType<PhantomGuy>();
+10
View File
@@ -204,5 +204,15 @@ namespace CalamityMod.Items.Weapons.Summon
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor()
{
if (Main.GlobalTimeWrappedHourly % 1f < 0.6f)
return new Color(89, 229, 255);
else if (Main.GlobalTimeWrappedHourly % 1f < 0.8f)
return Color.Lerp(new Color(89, 229, 255), Color.White, (Main.GlobalTimeWrappedHourly % 1f - 0.6f) / 0.2f);
else
return Color.Lerp(Color.White, new Color(89, 229, 255), (Main.GlobalTimeWrappedHourly % 1f - 0.8f) / 0.2f);
}
}
}
+1 -1
View File
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 36;
Item.height = 36;
Item.damage = 72;
Item.damage = 70;
Item.DamageType = DamageClass.Summon;
Item.mana = 10;
Item.useAnimation = Item.useTime = 24;
+1 -1
View File
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 34;
Item.height = 24;
Item.damage = 10;
Item.damage = 15;
Item.mana = 10;
Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 100;
Item.height = 128;
Item.damage = 57;
Item.damage = 50;
Item.DamageType = DamageClass.Summon;
Item.mana = 10;
Item.useAnimation = Item.useTime = 24;
+1 -1
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 34;
Item.height = 34;
Item.damage = 53;
Item.damage = 42;
Item.mana = 10;
Item.useAnimation = Item.useTime = 30;
Item.useStyle = ItemUseStyleID.HoldUp;
-1
View File
@@ -90,7 +90,6 @@ namespace CalamityMod.Items.Weapons.Summon
float barScale = 1/(32f/TextureAssets.Item[Type].Width()) * 0.9f;
Vector2 barOrigin = barBG.Size() * 0.5f;
float yOffset = 0f;
Vector2 drawPos = position + new Vector2(0, (float)TextureAssets.Item[Type].Height() * 0.5f) * scale;
Rectangle frameCrop = new Rectangle(0, 0, (int)((fill) * barFG.Width), barFG.Height);
Color colorBG = Color.Black;
+2 -2
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Summon
public new string LocalizationCategory => "Items.Weapons.Summon";
public static float EnemyDetectionDistance = 1200f;
public static int IFrames = 10;
public static int IFrames = 8;
// In frames.
public static float TimeBeforeCharging = 45f;
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 42;
Item.height = 42;
Item.damage = 142;
Item.damage = 132;
Item.useAnimation = Item.useTime = 24;
Item.knockBack = 4f;
Item.mana = 10;
+1 -1
View File
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 44;
Item.height = 48;
Item.damage = 25;
Item.damage = 22;
Item.mana = 10;
Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
+2 -2
View File
@@ -13,13 +13,13 @@ namespace CalamityMod.Items.Weapons.Summon
public class TacticalPlagueEngine : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Summon";
public const int BulletShootRate = 125;
public const int BulletShootRate = 120;
public override void SetDefaults()
{
Item.width = 28;
Item.height = 20;
Item.damage = 140;
Item.damage = 110;
Item.mana = 10;
Item.useAnimation = Item.useTime = 24;
Item.useStyle = ItemUseStyleID.HoldUp;
+2
View File
@@ -65,5 +65,7 @@ namespace CalamityMod.Items.Weapons.Summon
AddTile<DraedonsForge>().
Register();
}
public static Color RarityColor() => CalamityUtils.ColorSwap(new Color(210, 0, 255), new Color(255, 248, 24), 4f);
}
}
+3 -3
View File
@@ -41,8 +41,8 @@ namespace CalamityMod.Items.Weapons.Summon
#region Damage Balancing Properties
//Sage Poison's damage is kept in the Sage Poison file
public static float ActiveAttackSlashDmgMult => 5f;
//Sage Poison's damage is kept in the Sage Poison file
public static float ActiveAttackSlashDmgMult => 4f;
//Note: the following two only apply when not using the active attack
public static float AxeDmgMult => 1.25f;
@@ -78,7 +78,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.width = 26;
Item.height = 36;
Item.damage = 60;
Item.damage = 55;
Item.DamageType = DamageClass.Summon;
Item.mana = 10;
Item.useAnimation = Item.useTime = 24;
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Summon
public new string LocalizationCategory => "Items.Weapons.Summon";
public static SummonTag summonTag = new SummonTag()
{
MultiplicativeTagDamage = 0.3f, //Percentage of damage dealt added by the void. This is doubled by summons. This was tested - 1.5x was too weak to be worth 4 slots.
MultiplicativeTagDamage = 0.25f, //Percentage of damage dealt added by the void. This is doubled by summons. This was tested - 1.5x was too weak to be worth 4 slots. <-- (nvm)
AllowsWhipStacking = true,
TagOnHit = tagOnHit,
TagModifyHitEffects = SummonTag.BlankTagModifyHit,
+1 -1
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon
public new string LocalizationCategory => "Items.Weapons.Summon";
public const int SlotCount = 4;
public const int PunchCooldownTime = 36;
public const int PunchCooldownTime = 30;
public override void SetStaticDefaults() => ItemID.Sets.StaffMinionSlotsRequired[Type] = 4f;