merge resolve

This commit is contained in:
Doze-Zoze committed 2026-07-23 14:58:20 -05:00
commit 9442120ea4
266 files changed
+1404 -3082

No files matched your search

+2 -2
View File
@@ -95,8 +95,8 @@ namespace CalamityMod.Balancing
#endregion
#region Wall of Flesh
// 40% resist to Corro/Crimslime Staff.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.WallofFleshEye, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<CrimslimeMinion>(), ProjectileType<CorroslimeMinion>()))));
// 50% resist to Staff of Necrosteocytes.
NPCSpecificBalancingChanges.AddRange(Bundle(new List<int> { NPCID.WallofFlesh, NPCID.WallofFleshEye }, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<SmallSkeletonMinion>()))));
#endregion
#region Aquatic Scourge
-5
View File
@@ -40,11 +40,6 @@ namespace CalamityMod.Buffs
{
player.GetDamage<MagicDamageClass>() -= 0.1f;
}
else if (type == BuffID.Clairvoyance)
{
player.GetDamage<MagicDamageClass>() -= 0.02f;
player.GetCritChance<MagicDamageClass>() -= 2;
}
else if (type == BuffID.SugarRush)
{
player.moveSpeed -= 0.1f;
@@ -1,11 +1,11 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Summon;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class BabySlimeGodBuff : BaseSummonBuff
public class BabyPaladinBuff : BaseSummonBuff
{
protected override int MinionProjectileType => ModContent.ProjectileType<CrimsonSlimeGodMinion>();
protected override int MinionProjectileType => ModContent.ProjectileType<StatigelBlightedSlime>();
protected override ref bool MinionBool => ref BuffModdedOwner.sGod;
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 486 B

After

Width:  |  Height:  |  Size: 486 B

@@ -1,12 +1,12 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Summon;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class Corroslime : BaseSummonBuff
public class BlightedSlime : BaseSummonBuff
{
protected override int MinionProjectileType => ModContent.ProjectileType<CorroslimeMinion>();
protected override int MinionProjectileType => ModContent.ProjectileType<BlightedSlimeMinion>();
protected override ref bool MinionBool => ref BuffModdedOwner.cSlime;
protected override ref bool MinionBool => ref BuffModdedOwner.blightedSlime;
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 547 B

After

Width:  |  Height:  |  Size: 547 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 543 B

After

Width:  |  Height:  |  Size: 543 B

-12
View File
@@ -1,12 +0,0 @@
using CalamityMod.Projectiles.Summon;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class Crimslime : BaseSummonBuff
{
protected override int MinionProjectileType => ModContent.ProjectileType<CrimslimeMinion>();
protected override ref bool MinionBool => ref BuffModdedOwner.cSlime2;
}
}
+1 -1
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.Summon
{
CalamityPlayer modPlayer = player.Calamity();
if (!modPlayer.allElementals)
if (!modPlayer.allElementals.HasValue)
{
player.DelBuff(buffIndex);
buffIndex--;
+36 -23
View File
@@ -1078,15 +1078,15 @@ namespace CalamityMod.CalPlayer
public bool jellyChargedBattery = false;
/// <summary> General cooldown for accessories which spawn projectiles on minion hits. </summary>
public float summonProjCooldown;
public bool sandElemental = false;
public bool? sandElemental = null;
public bool sandElementalVanity = false;
public bool oasisElemental = false;
public bool? oasisElemental = null;
public bool oasisElementalVanity = false;
public bool cloudElemental = false;
public bool? cloudElemental = null;
public bool cloudElementalVanity = false;
public bool brimElemental = false;
public bool? brimElemental = null;
public bool brimElementalVanity = false;
public bool waterElemental = false;
public bool? waterElemental = null;
public bool waterElementalVanity = false;
public bool fungalClump = false;
public bool fungalClumpVanity = false;
@@ -1228,7 +1228,6 @@ namespace CalamityMod.CalPlayer
public bool bloodflareFrenzy = false;
public int bloodflareMeleeHits = 0;
public bool bloodflareRanged = false;
public bool bloodflareThrowing = false;
public bool bloodflareMage = false;
public int bloodflareMageCooldown = 0;
public bool bloodflareSummon = false;
@@ -1517,10 +1516,8 @@ namespace CalamityMod.CalPlayer
public bool CalamarisLament = false;
/// <summary> Entropy's Vigil. </summary>
public bool cEyes = false;
/// <summary> Corroslime Staff. </summary>
public bool cSlime = false;
/// <summary> Crimslime Staff. </summary>
public bool cSlime2 = false;
/// <summary> Blighted Slime Staff. </summary>
public bool blightedSlime = false;
/// <summary> Abandoned Slime Staff. </summary>
public bool aSlime = false;
public bool brittleStar = false;
@@ -1551,7 +1548,7 @@ namespace CalamityMod.CalPlayer
/// <summary> Enchanted Conch. </summary>
public bool hCrab = false;
/// <summary> Heart of the Elements. </summary>
public bool allElementals = false;
public bool? allElementals = null;
/// <summary> Heart of the Elements; however, the minions will not attack. </summary>
public bool allElementalsVanity = false;
/// <summary> Silva armor's Silva Crystal. </summary>
@@ -2597,7 +2594,6 @@ namespace CalamityMod.CalPlayer
bloodflareMelee = false;
bloodflareFrenzy = false;
bloodflareRanged = false;
bloodflareThrowing = false;
bloodflareMage = false;
bloodflareSummon = false;
@@ -2780,8 +2776,7 @@ namespace CalamityMod.CalPlayer
cosmicViper = false;
CalamarisLament = false;
cEyes = false;
cSlime = false;
cSlime2 = false;
blightedSlime = false;
aSlime = false;
brittleStar = false;
aquaticStar = false;
@@ -2816,17 +2811,17 @@ namespace CalamityMod.CalPlayer
cSpirit = false;
dCrystal = false;
MutatedTruffleBool = false;
sandElemental = false;
sandElemental = null;
sandElementalVanity = false;
oasisElemental = false;
oasisElemental = null;
oasisElementalVanity = false;
cloudElemental = false;
cloudElemental = null;
cloudElementalVanity = false;
brimElemental = false;
brimElemental = null;
brimElementalVanity = false;
waterElemental = false;
waterElemental = null;
waterElementalVanity = false;
allElementals = false;
allElementals = null;
allElementalsVanity = false;
fungalClump = false;
fungalClumpVanity = false;
@@ -2984,6 +2979,9 @@ namespace CalamityMod.CalPlayer
#endregion
#region Screen Position Movements
float HalleyScopeLerp = 0;
bool HalleyToggle = false;
public override void ModifyScreenPosition()
{
// CIT 08FEB2025: Photosensitivity config also disables screenshake
@@ -2993,6 +2991,19 @@ namespace CalamityMod.CalPlayer
Main.screenPosition += Main.rand.NextVector2Circular(GeneralScreenShakePower * CalamityClientConfig.Instance.ScreenshakePower, GeneralScreenShakePower * CalamityClientConfig.Instance.ScreenshakePower);
GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f * CalamityClientConfig.Instance.ScreenshakePower);
if (Player.HeldItem.type != ModContent.ItemType<HalleysInferno>())
HalleyToggle = false;
else if (Player.HeldItem.JustPressedKeybind())
HalleyToggle = !HalleyToggle;
HalleyScopeLerp = MathHelper.Clamp(HalleyScopeLerp + (HalleyToggle ? 0.05f : -0.05f), 0, 1);
if (HalleyScopeLerp > 0)
{
var screenSize = new Vector2(Main.screenWidth, Main.screenHeight);
Vector2 center = Main.screenPosition + screenSize * 0.5f;
Main.screenPosition -= (Vector2.Clamp((center - Main.MouseWorld) / screenSize, new(-0.5f), new(0.5f)) / Main.GameZoomTarget * MathHelper.SmoothStep(0, 1, HalleyScopeLerp)) * new Vector2(1920, 1200) * 0.9f;
}
}
#endregion
@@ -3380,7 +3391,6 @@ namespace CalamityMod.CalPlayer
bloodflareFrenzy = false;
bloodflareMeleeHits = 0;
bloodflareRanged = false;
bloodflareThrowing = false;
bloodflareMage = false;
bloodflareSummon = false;
bloodflareSummonTimer = 0;
@@ -4823,7 +4833,7 @@ namespace CalamityMod.CalPlayer
Player.velocity.Y = 0.5f;
}
else
Player.velocity.Y = 0f;
Player.velocity.Y = 1E-05f;
if (CalamityKeybinds.ExoChairSlowdownHotkey.Current)
Player.velocity *= 0.5f;
@@ -5332,7 +5342,7 @@ namespace CalamityMod.CalPlayer
EnhancedDarknessSystem.lights.Add(new(lastDeerclopsPosition.Value, scale: DeerclopsAI.borderScale, texture: DeerclopsAI.ArenaTex.Value));
//we draw light around the player when far away so they have some visibility, although very small. This is especially nice in multiplayer. we scale opacity with distance bc it looks better
EnhancedDarknessSystem.lights.Add(new EnhancedDarknessSystem.LightSource(scale: 0.75f, opacity: MathHelper.Clamp(Main.LocalPlayer.DistanceSQ(lastDeerclopsPosition.Value) / (409600 /*640^2*/), 0, 1)));
EnhancedDarknessSystem.lights.Add(new EnhancedDarknessSystem.LightSource(scale: 0.75f, opacity: MathHelper.Clamp(Main.LocalPlayer.DistanceSQ(lastDeerclopsPosition.Value) / 409600, 0, 1)));
if (darknessIntensity == 0)
{
@@ -6064,7 +6074,10 @@ namespace CalamityMod.CalPlayer
float scale = MathHelper.Max(Main.screenWidth, Main.screenHeight) / size * 0.4f;
if (ProfanedMoonlightAuroraDrawer is null || ProfanedMoonlightAuroraDrawer.Size != size)
{
ProfanedMoonlightAuroraDrawer?.Dispose();
ProfanedMoonlightAuroraDrawer = FluidFieldManager.CreateField(size, scale, 0.1f, 50f, 0.992f);
}
int sourceArea = (int)Math.Ceiling(6f / ProfanedMoonlightAuroraDrawer.Scale) + 1;
ProfanedMoonlightAuroraDrawer.ShouldUpdate = Player.miscCounter % 2 == 0;
+7 -6
View File
@@ -206,7 +206,7 @@ namespace CalamityMod.CalPlayer
chaliceBleedoutBuffer = 0D;
chaliceDamagePointPartialProgress = 0D;
}
Player.HealPlayer(100);
Player.HealPlayer(300);
Player.AddCooldown(Cooldowns.NebulousCore.ID, CalamityUtils.SecondsToFrames(90));
return false;
@@ -557,7 +557,7 @@ namespace CalamityMod.CalPlayer
}
}
public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref NPC.HitModifiers modifiers)/* tModPorter If you don't need the Projectile, consider using ModifyHitNPC instead */
public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref NPC.HitModifiers modifiers)
{
if (proj.npcProj || proj.trap)
return;
@@ -2230,12 +2230,13 @@ namespace CalamityMod.CalPlayer
}
}
if (fleshTotem && hurtInfo.Damage > 0)
if (fleshTotem && hurtInfo.Damage > 0 && fleshTotemManaStorage > 0)
{
SoundStyle Counter = new SoundStyle("CalamityMod/Sounds/Custom/BrainOfCthulhu/BoC_Rev_Shield_Down");
if (fleshTotemManaStorage >= 100 && fleshTotemVisual)
SoundEngine.PlaySound(Counter with { Volume = 0.75f }, Player.Center);
int lostSoulAmount = fleshTotemManaStorage / 25;
int lostSoulAmount = (fleshTotemManaStorage / 2) / 25;
int lostSoulDamage = (int)Player.GetTotalDamage<MagicDamageClass>().ApplyTo(FleshTotem.lostSoulDamage);
if (Player.ownedProjectileCounts[ModContent.ProjectileType<FleshTotemMinion>()] != 0)
{
for (int i = 0; i < Main.maxProjectiles; i++)
@@ -2245,13 +2246,13 @@ namespace CalamityMod.CalPlayer
{
for (int k = 0; k < lostSoulAmount; k++)
{
Projectile.NewProjectile(Player.GetSource_Accessory_OnHurt(FindAccessory<FleshTotem>(), hurtInfo.DamageSource), proj.Center, new Vector2(10, 10).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.55f), ModContent.ProjectileType<FleshTotemSoul>(), FleshTotem.lostSoulDamage, 0f, Main.myPlayer, 0f, 0f, 3f);
Projectile.NewProjectile(Player.GetSource_Accessory_OnHurt(FindAccessory<FleshTotem>(), hurtInfo.DamageSource), proj.Center, new Vector2(10, 10).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.55f), ModContent.ProjectileType<FleshTotemSoul>(), lostSoulDamage, 0f, Main.myPlayer, 0f, 0f, 3f);
}
break;
}
}
}
fleshTotemManaStorage = 0;
fleshTotemManaStorage = fleshTotemManaStorage / 2;
}
// By setting brainOfConfusionItem, these accessories have this code already,
+2 -2
View File
@@ -275,7 +275,7 @@ namespace CalamityMod.CalPlayer
if (Player.statMana < 0 && Player.Calamity().ChaosStone)
{
totalNegativeLifeRegen -= Player.statMana/100f * Items.Accessories.ChaosStone.LostRegenPer100Mana;
totalNegativeLifeRegen -= (Player.statMana/100f * Items.Accessories.ChaosStone.LostRegenPer100Mana) + Items.Accessories.ChaosStone.BaseLostRegen;
}
//
@@ -677,7 +677,7 @@ namespace CalamityMod.CalPlayer
{
Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<PlaguePulse>(), auraDamage, 0f, Player.whoAmI, 0, 0, 0);
pulseCounter = 0;
if (toxicHeartVisuals)
if (toxicHeartVisuals && !CalamityClientConfig.Instance.MisophoniaSupport)
{
float soundVolume = Utils.Remap(Player.lifeRegen, minLifeRegen, maxLifeRegen, 1f, 0.3f, true);
SoundStyle heartbeat = new("CalamityMod/Sounds/Item/Heartbeat");
+7 -12
View File
@@ -1138,6 +1138,7 @@ namespace CalamityMod.CalPlayer
Asset<Texture2D> carpetAuric = ExtraTextureRefs.FlyingCarpetAuric;
Asset<Texture2D> carpetOriginal = ExtraTextureRefs.FlyingCarpetVanilla;
TextureAssets.FlyingCarpet = (auricSet ? carpetAuric : carpetOriginal);
TextureAssets.Buff[ModContent.BuffType<BlightedSlime>()] = WorldGen.crimson ? ExtraTextureRefs.BlightedSlimeCrimIcon : ExtraTextureRefs.BlightedSlimeCorroIcon;
for (int l = 0; l < Player.MaxBuffs; l++)
{
@@ -2764,9 +2765,6 @@ namespace CalamityMod.CalPlayer
if (Player.buffTime[l] <= 2 && buffID == ModContent.BuffType<Buffs.StatBuffs.TarragonImmunity>())
if (Player.whoAmI == Main.myPlayer)
Player.AddCooldown(Cooldowns.TarragonImmunity.ID, TarragonHeadRogue.ImmunityCooldown);
if (CalamityBuffSets.IsDebuff[buffID])
Player.GetDamage<RogueDamageClass>() += TarragonHeadRogue.RogueDamageBoostWhileDebuffed;
}
}
@@ -2832,6 +2830,10 @@ namespace CalamityMod.CalPlayer
if (Player.ichor)
Player.statDefense += 5;
// Holding Walking Cane increases movement speed
if (Player.HeldItem.type == ModContent.ItemType<WalkingCane>())
Player.moveSpeed += WalkingCane.MoveSpeedBoost;
// Fairy Boots bonus
if (fairyBoots)
{
@@ -3637,8 +3639,7 @@ namespace CalamityMod.CalPlayer
--bloodflareCoreRemainingHealOverTime;
}
// Reduce how slow Chilled makes the player, because it's cancerous right now
// Reduce how slow Chilled makes the player
// The moveSpeed multiplier for Chilled in vanilla is 0.75, so we just multiply by 1.166667 here to make it 0.875, effectively cutting the reduction in half
if (Player.chilled)
Player.moveSpeed *= 1f + (1f / 6f);
@@ -3937,12 +3938,6 @@ namespace CalamityMod.CalPlayer
Player.AddBuff(BuffID.Inferno, 2);
}
if (bloodflareThrowing)
{
if (Player.statLife > (int)(Player.statLifeMax2 * BloodflareHeadRogue.DefenseBoostHealthThreshold))
Player.statDefense += BloodflareHeadRogue.DefenseBoostAboveHealthThreshold;
}
if (bloodflareSummon)
{
if (Player.statLife <= (int)(Player.statLifeMax2 * BloodflareHeadSummon.DefenseBoostHealthThreshold))
@@ -4144,9 +4139,9 @@ namespace CalamityMod.CalPlayer
Player.lavaImmune = true;
Player.fireWalk = true;
Player.buffImmune[ModContent.BuffType<HolyFlames>()] = true;
Player.buffImmune[ModContent.BuffType<Daybroken>()] = true;
Player.buffImmune[BuffID.OnFire] = true;
Player.buffImmune[BuffID.Burning] = true;
Player.buffImmune[BuffID.Daybreak] = true;
if (Player.wingTimeMax > 0)
Player.wingTimeMax = (int)(Player.wingTimeMax * 1.1D);
+2 -2
View File
@@ -62,7 +62,7 @@ namespace CalamityMod.CalPlayer
#endregion
#region On Hit NPC
public override void OnHitNPCWithItem(Item item, NPC target, NPC.HitInfo hit, int damageDone)/* tModPorter If you don't need the Item, consider using OnHitNPC instead */
public override void OnHitNPCWithItem(Item item, NPC target, NPC.HitInfo hit, int damageDone)
{
if (Player.whoAmI != Main.myPlayer)
return;
@@ -207,7 +207,7 @@ namespace CalamityMod.CalPlayer
#endregion
#region On Hit NPC With Proj
public override void OnHitNPCWithProj(Projectile proj, NPC target, NPC.HitInfo hit, int damageDone)/* tModPorter If you don't need the Projectile, consider using OnHitNPC instead */
public override void OnHitNPCWithProj(Projectile proj, NPC target, NPC.HitInfo hit, int damageDone)
{
if (Player.whoAmI != Main.myPlayer)
return;
+5 -6
View File
@@ -50,10 +50,6 @@ namespace CalamityMod
[DefaultValue(false)]
public bool BoCSpriteChange { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
public bool EnableVanillaTextureEdits { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
public bool SunkenSeaBackgroundDistortion { get; set; }
@@ -244,8 +240,8 @@ namespace CalamityMod
public float FlightBarPosY { get; set; }
#endregion
#region Music Toggles
[Header("MusicToggles")]
#region Audio Toggles
[Header("AudioToggles")]
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
@@ -259,6 +255,9 @@ namespace CalamityMod
[DefaultValue(false)]
public bool AbyssLayer3Alt { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(false)]
public bool MisophoniaSupport { get; set; }
#endregion
#region General Gameplay Changes
+2 -2
View File
@@ -3,7 +3,7 @@ sampler uImage1 : register(s1);
float3 uColor;
float3 uSecondaryColor;
float uOpacity;
float uSaturation;
float uSaturation; // Saturation gets used as a "true" opacity
float uRotation;
float uTime;
float4 uSourceRect;
@@ -20,7 +20,7 @@ float4 Recolor(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
float4 color = tex2D(uImage0, coords);
float originalAlpha = color.a;
color.rbg = lerp(color.rbg, uColor, uOpacity);
return color * originalAlpha;
return color * originalAlpha * uSaturation;
}
Binary file not shown.
+10 -13
View File
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework.Graphics;
using CalamityMod.Buffs.Summon;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using Terraria;
using Terraria.GameContent;
@@ -10,13 +11,7 @@ namespace CalamityMod.ExtraTextures
[Autoload(Side = ModSide.Client)]
public class ExtraTextureRefs : ModSystem
{
// Destroyer glowmasks
public static Asset<Texture2D> DestroyerHeadGlowmask;
public static Asset<Texture2D> DestroyerBodyGlowmask;
public static Asset<Texture2D> DestroyerTailGlowmask;
// WoF, These are not "exactly" the ExtraTextures. But
public static Asset<Texture2D> WallOfFleshEyeGlowmask;
// WoF, These are not "exactly" the ExtraTextures
public static Asset<Texture2D> WallOfFleshDemonSickleTexture;
// Flying Carpet Replacements
@@ -28,6 +23,10 @@ namespace CalamityMod.ExtraTextures
public static Asset<Texture2D> LuckIconVanilla;
public static Asset<Texture2D> LuckIconLesser;
// Blighted Slime Buff icons
public static Asset<Texture2D> BlightedSlimeCorroIcon;
public static Asset<Texture2D> BlightedSlimeCrimIcon;
// Particles
public static Asset<Texture2D> CircularSmear;
public static Asset<Texture2D> CircularSmearFire1;
@@ -38,11 +37,6 @@ namespace CalamityMod.ExtraTextures
// TODO: - Every other ExtraTextures Reference could be move in here
public override void OnModLoad()
{
DestroyerHeadGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerHeadGlow", AssetRequestMode.AsyncLoad);
DestroyerBodyGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerBodyGlow", AssetRequestMode.AsyncLoad);
DestroyerTailGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerTailGlow", AssetRequestMode.AsyncLoad);
WallOfFleshEyeGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/WallOfFleshEyeTelegraphGlow", AssetRequestMode.AsyncLoad);
WallOfFleshDemonSickleTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/ForbiddenOathbladeProjectile", AssetRequestMode.AsyncLoad);
FlyingCarpetVanilla = TextureAssets.FlyingCarpet;
@@ -52,6 +46,9 @@ namespace CalamityMod.ExtraTextures
LuckIconVanilla = TextureAssets.Buff[BuffID.Lucky];
LuckIconLesser = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBuffs/LuckyLesser", AssetRequestMode.AsyncLoad);
BlightedSlimeCorroIcon = ModContent.Request<Texture2D>("CalamityMod/Buffs/Summon/BlightedSlime");
BlightedSlimeCrimIcon = ModContent.Request<Texture2D>("CalamityMod/Buffs/Summon/BlightedSlimeCrimson");
CircularSmear = ModContent.Request<Texture2D>("CalamityMod/Particles/CircularSmear", AssetRequestMode.AsyncLoad);
CircularSmearFire1 = ModContent.Request<Texture2D>("CalamityMod/Particles/CircularSmearFire1", AssetRequestMode.AsyncLoad);
CircularSmearFire2 = ModContent.Request<Texture2D>("CalamityMod/Particles/CircularSmearFire2", AssetRequestMode.AsyncLoad);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

+3 -8
View File
@@ -237,14 +237,6 @@ namespace CalamityMod.ILEditing
dir = self.direction;
dashing = true;
// CIT 16OCT2024: Commented this code out, as there's no reason for custom dash hotkey to use Player.dashTime
// and was causing the return of Celestial Starboard's dash bug from early 1.4 versions
/*if ((self.dashTime <= 0 && self.direction == -1) || (self.dashTime >= 0 && self.direction == 1))
{
self.dashTime = 15;
return;
}*/
dashing = true;
self.dashTime = 0;
self.timeSinceLastDashStarted = 0;
@@ -717,7 +709,10 @@ namespace CalamityMod.ILEditing
ref FluidField calamityFireDrawer = ref player.Calamity().CalamityFireDrawer;
ref Vector2 firePosition = ref player.Calamity().FireDrawerPosition;
if (calamityFireDrawer is null || calamityFireDrawer.Size != size)
{
calamityFireDrawer?.Dispose();
calamityFireDrawer = FluidFieldManager.CreateField(size, scale, 0.1f, 50f, 0.992f);
}
// Update the fire draw position.
firePosition = new Vector2(Main.screenWidth, Main.screenHeight) * 0.5f;
+9 -1
View File
@@ -744,7 +744,7 @@ namespace CalamityMod.ILEditing
cplay.justChangedGravity = cplay.oldGravDir != Player.gravDir;
cplay.oldGravDir = Player.gravDir;
if (Main.netMode != NetmodeID.Server && !Main.gameMenu && CalamityClientConfig.Instance.DisableGravityScreenSwap)
if (!Main.dedServ && !Main.gameMenu && CalamityClientConfig.Instance.DisableGravityScreenSwap)
{
if (Player.gravDir == -1)
{
@@ -765,6 +765,14 @@ namespace CalamityMod.ILEditing
}
}
}
if (!Main.dedServ && !CalamityClientConfig.Instance.DisableGravityScreenSwap)
{
if (Filters.Scene["CalamityMod:FlipScreen"].IsActive())
{
Filters.Scene["CalamityMod:FlipScreen"].Opacity = 0f;
Filters.Scene.Deactivate("CalamityMod:FlipScreen");
}
}
if (cplay.justChangedGravity)
{
Player.gravDir *= -1;
+1 -1
View File
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Accessories
public static int MinRegenBoost => 2;
public static int MaxRegenBoost => 6;
public static float RegenTimeBoost => 1;
public static float NaturalRegenPower => 1.5f;
public static float NaturalRegenPower => 1.75f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinRegenBoost.ToRegenPerSecond(), MaxRegenBoost.ToRegenPerSecond(), (NaturalRegenPower - 1f).ToPercent(), RegenTimeBoost.ToPercent());
public override void SetDefaults()
+3 -2
View File
@@ -10,12 +10,13 @@ namespace CalamityMod.Items.Accessories
public class ChaosStone : ModItem, ILocalizedModType
{
public static float LostRegenPer100Mana => 8;
public static float DamageMultPer100Mana => 0.05f;
public static int BaseLostRegen => 12;
public static float DamageMultPer100Mana => 0.055f;
public new string LocalizationCategory => "Items.Accessories";
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
var regenAmount = Main.LocalPlayer.statManaMax2 == 0 ? 0 : (int)((Main.LocalPlayer.statManaMax2 / 100f) * LostRegenPer100Mana) * 0.5f;
var regenAmount = Main.LocalPlayer.statManaMax2 == 0 ? 0 : (int)((Main.LocalPlayer.statManaMax2 / 100f) * LostRegenPer100Mana + BaseLostRegen) * 0.5f;
var dmgAmount = Main.LocalPlayer.statManaMax2 == 0 ? 0 : ((Main.LocalPlayer.statManaMax2 / 100f) * DamageMultPer100Mana * 100);
tooltips.FindAndReplaceAll("[REGEN]", regenAmount.ToString("0.#"));
tooltips.FindAndReplaceAll("[DAMAGE]", dmgAmount.ToString("0.#"));
+2 -2
View File
@@ -22,8 +22,8 @@ namespace CalamityMod.Items.Accessories
CalamityPlayer modPlayer = player.Calamity();
modPlayer.corrosiveSpine = true;
player.moveSpeed += 0.05f;
modPlayer.WaterDebuffMultiplier += 0.25f;
modPlayer.SicknessDebuffMultiplier += 0.25f;
modPlayer.WaterDebuffMultiplier += 0.5f;
modPlayer.SicknessDebuffMultiplier += 0.5f;
}
}
}
+2 -2
View File
@@ -23,12 +23,12 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals;
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals.HasValue;
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.sandElemental = true;
modPlayer.sandElemental = !hideVisual;
SpawnElemental(player);
}
+2 -2
View File
@@ -26,12 +26,12 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals;
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals.HasValue;
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.cloudElemental = true;
modPlayer.cloudElemental = !hideVisual;
if (player.whoAmI == Main.myPlayer)
{
if (player.FindBuffIndex(ModContent.BuffType<CloudElemental>()) == -1)
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.harpyRing = true;
player.moveSpeed += 0.1f;
player.moveSpeed += 0.2f;
}
public override void AddRecipes()
+2 -2
View File
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.Accessories
public override bool CanEquipAccessory(Player player, int slot, bool modded)
{
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.brimElemental || modPlayer.sandElemental || modPlayer.oasisElemental || modPlayer.cloudElemental || modPlayer.waterElemental)
if (modPlayer.brimElemental.HasValue || modPlayer.sandElemental.HasValue || modPlayer.oasisElemental.HasValue || modPlayer.cloudElemental.HasValue || modPlayer.waterElemental.HasValue)
{
return false;
}
@@ -50,7 +50,7 @@ namespace CalamityMod.Items.Accessories
Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, Main.DiscoR / 255f, Main.DiscoG / 255f, Main.DiscoB / 255f);
CalamityPlayer modPlayer = player.Calamity();
modPlayer.allElementals = true;
modPlayer.allElementals = !hideVisual;
int brimmy = ProjectileType<BrimstoneElementalMinion>();
int siren = ProjectileType<WaterElementalMinion>();
+2 -2
View File
@@ -14,8 +14,8 @@ namespace CalamityMod.Items.Accessories
public new string LocalizationCategory => "Items.Accessories";
public static int RegenBoost = 2;
public static int ReducedDoTAmount = 8;
public static int PostDebuffRegenTimeBoost = CalamityUtils.SecondsToFrames(10);
public static int ReducedDoTAmount = 12;
public static int PostDebuffRegenTimeBoost = CalamityUtils.SecondsToFrames(15);
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RegenBoost.ToRegenPerSecond(), ReducedDoTAmount.ToRegenPerSecond(), PostDebuffRegenTimeBoost.FramesToSeconds());
public override void SetDefaults()
{
+1 -1
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories
public new string LocalizationCategory => "Items.Accessories";
public static int RegenTimeBoost => 1;
public static float NaturalRegenPower => 1.5f;
public static float NaturalRegenPower => 1.75f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((NaturalRegenPower - 1f).ToPercent(), RegenTimeBoost.ToPercent());
public override void SetDefaults()
{
+3 -3
View File
@@ -37,12 +37,12 @@ namespace CalamityMod.Items.Accessories
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.nebulousCore = true;
player.GetDamage<GenericDamageClass>() += 0.1f;
player.GetDamage<GenericDamageClass>() += 0.12f;
// Spawn nebula stars
if (Main.rand.NextBool(15))
{
// Count the number of current active nebula stars; if this is at least 10, no more can spawn
// Count the number of current active nebula stars; if this is at least 15, no more can spawn
int numProj = 0;
foreach (Projectile p in Main.ActiveProjectiles)
{
@@ -51,7 +51,7 @@ namespace CalamityMod.Items.Accessories
numProj++;
}
}
if (Main.rand.Next(15) >= numProj && numProj < 10)
if (Main.rand.Next(15) >= numProj && numProj < 15)
{
int spawnRadius = 24;
for (int j = 0; j < 50; j++) // Attempt to spawn the star randomly around the player
+2 -2
View File
@@ -26,12 +26,12 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals;
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals.HasValue;
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.oasisElemental = true;
modPlayer.oasisElemental = !hideVisual;
if (player.whoAmI == Main.myPlayer)
{
if (player.FindBuffIndex(ModContent.BuffType<OasisElementalBuff>()) == -1)
+2 -2
View File
@@ -29,12 +29,12 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals;
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals.HasValue;
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.waterElemental = true;
modPlayer.waterElemental = !hideVisual;
if (player.whoAmI == Main.myPlayer)
{
var source = player.GetSource_Accessory(Item);
+3 -3
View File
@@ -20,10 +20,10 @@ namespace CalamityMod.Items.Accessories
public static int MinRegenBoost => 2;
public static int MaxRegenBoost => 8;
public static int ReducedDoTAmount => 20;
public static int PostDebuffRegenTimeBoost => CalamityUtils.SecondsToFrames(10);
public static int ReducedDoTAmount => 24;
public static int PostDebuffRegenTimeBoost => CalamityUtils.SecondsToFrames(15);
public static float RegenTimeBoost => 1;
public static float NaturalRegenPower => 1.5f;
public static float NaturalRegenPower => 1.75f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinRegenBoost.ToRegenPerSecond(),MaxRegenBoost.ToRegenPerSecond(),ReducedDoTAmount.ToRegenPerSecond(), (NaturalRegenPower - 1f).ToPercent(),RegenTimeBoost.ToPercent());
public override void SetStaticDefaults()
{
+2 -2
View File
@@ -26,12 +26,12 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals;
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals.HasValue;
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.brimElemental = true;
modPlayer.brimElemental = !hideVisual;
if (player.whoAmI == Main.myPlayer)
{
var source = player.GetSource_Accessory(Item);
+2 -3
View File
@@ -50,7 +50,6 @@ namespace CalamityMod.Items.Armor.Auric
modPlayer.tarraSet = true;
modPlayer.tarraThrowing = true;
modPlayer.bloodflareSet = true;
modPlayer.bloodflareThrowing = true;
modPlayer.godSlayer = true;
modPlayer.godSlayerThrowing = true;
modPlayer.auricSet = true;
@@ -87,8 +86,8 @@ namespace CalamityMod.Items.Armor.Auric
Color[] armorColors = { AuricTeslaBodyArmor.tooltipTarragonColor, AuricTeslaBodyArmor.tooltipBloodflareColor, AuricTeslaBodyArmor.tooltipGodslayerColor };
var LocalizedText = CalamityUtils.GetTextFromModItem(Type, $"SetBonus{setBonusTooltipNumber}");
line.Text = (setBonusTooltipNumber == 3 ? LocalizedText.Format(RogueDamageBoostAtFullHealth.ToPercent(), SetBonusHurtDamageThreshold, CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(), GodSlayerChestplate.DashCooldown.FramesToSeconds())
: setBonusTooltipNumber == 2 ? LocalizedText.Format(DefenseBoostAboveHealthThreshold, DefenseBoostHealthThreshold.ToPercent())
: LocalizedText.Format(CritsToActivateImmunity, ImmunityDuration.FramesToSeconds(), ImmunityCooldown.FramesToSeconds(), RogueDamageBoostWhileDebuffed.ToPercent()));
: setBonusTooltipNumber == 2 ? LocalizedText.ToString()
: LocalizedText.Format(CritsToActivateImmunity, ImmunityDuration.FramesToSeconds(), ImmunityCooldown.FramesToSeconds()));
line.OverrideColor = armorColors[setBonusTooltipNumber - 1];
}
}
@@ -21,8 +21,6 @@ namespace CalamityMod.Items.Armor.Bloodflare
// Set Bonus
public static float SetBonusRogueStealth = 1.2f;
public static int DefenseBoostAboveHealthThreshold = 30;
public static float DefenseBoostHealthThreshold = 0.8f;
public override void SetDefaults()
{
@@ -41,10 +39,9 @@ namespace CalamityMod.Items.Armor.Bloodflare
{
var modPlayer = player.Calamity();
modPlayer.bloodflareSet = true;
modPlayer.bloodflareThrowing = true;
modPlayer.rogueStealthMax += SetBonusRogueStealth;
modPlayer.wearingRogueArmor = true;
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), DefenseBoostAboveHealthThreshold, DefenseBoostHealthThreshold.ToPercent());
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth());
}
public override void UpdateEquip(Player player)
+44 -1
View File
@@ -2,7 +2,12 @@
using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria;
using Terraria.Localization;
using Terraria.ModLoader;
using System.IO;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria.ModLoader.IO;
namespace CalamityMod.Items.Armor.Demonshade
{
@@ -14,6 +19,7 @@ namespace CalamityMod.Items.Armor.Demonshade
// Shadow Speed... (elusive)
public static float MoveSpeedBoost = 0.3f;
public static float AccelerationBoost = 0.5f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MoveSpeedBoost.ToPercent(), AccelerationBoost.ToPercent());
public override void SetDefaults()
{
@@ -26,10 +32,47 @@ namespace CalamityMod.Items.Armor.Demonshade
Item.Calamity().devItem = true;
}
#region Toggleable Acceleration effect
bool toggleEnabled = true;
public override bool CanRightClick() => Main.keyState.PressingShift();
public override void RightClick(Player player)
{
toggleEnabled = !toggleEnabled;
Item.NetStateChanged();
}
public override bool ConsumeItem(Player player) => false;
public override void SaveData(TagCompound tag)
{
tag.Add("toggleEffect", toggleEnabled);
}
public override void LoadData(TagCompound tag)
{
toggleEnabled = tag.GetBool("toggleEffect");
}
public override void NetSend(BinaryWriter writer)
{
writer.Write(toggleEnabled);
}
public override void NetReceive(BinaryReader reader)
{
toggleEnabled = reader.ReadBoolean();
}
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, toggleEnabled);
}
#endregion
public override void UpdateEquip(Player player)
{
var modPlayer = player.Calamity();
modPlayer.shadowSpeed = true;
modPlayer.shadowSpeed = toggleEnabled;
player.moveSpeed += MoveSpeedBoost;
}
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Armor.Reaver
// Set Bonus
public static int SetBonusAggroBoost = 600;
public static float SetBonusDebuffDamageReduction = 0.2f;
public static float SetBonusDebuffDamageReduction = 0.5f;
public static float SetBonusMobilityReduction = 0.3f;
public static int ReaverRageDuration = CalamityUtils.SecondsToFrames(5);
public static int ReaverRageDefenseBoost = 5;
+4 -9
View File
@@ -47,18 +47,13 @@ namespace CalamityMod.Items.Armor.Statigel
if (player.whoAmI == Main.myPlayer)
{
var source = player.GetSource_Accessory(Item);
if (player.FindBuffIndex(ModContent.BuffType<BabySlimeGodBuff>()) == -1)
{
player.AddBuff(ModContent.BuffType<BabySlimeGodBuff>(), 3600, true);
}
if (player.FindBuffIndex(ModContent.BuffType<BabyPaladinBuff>()) == -1)
player.AddBuff(ModContent.BuffType<BabyPaladinBuff>(), 3600, true);
int minionID = -1;
int minionDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(SlimeDamage);
if (WorldGen.crimson && player.ownedProjectileCounts[ModContent.ProjectileType<CrimsonSlimeGodMinion>()] < 1)
minionID = Projectile.NewProjectile(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<CrimsonSlimeGodMinion>(), minionDamage, 0f, Main.myPlayer);
else if (!WorldGen.crimson && player.ownedProjectileCounts[ModContent.ProjectileType<CorruptionSlimeGodMinion>()] < 1)
minionID = Projectile.NewProjectile(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<CorruptionSlimeGodMinion>(), minionDamage, 0f, Main.myPlayer);
if (player.ownedProjectileCounts[ModContent.ProjectileType<StatigelBlightedSlime>()] < 1)
minionID = Projectile.NewProjectile(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<StatigelBlightedSlime>(), minionDamage, 0f, Main.myPlayer);
if (Main.projectile.IndexInRange(minionID))
Main.projectile[minionID].originalDamage = SlimeDamage;
+1 -1
View File
@@ -49,7 +49,7 @@ namespace CalamityMod.Items.Armor.Tarragon
modPlayer.tarraThrowing = true;
modPlayer.rogueStealthMax += SetBonusRogueStealth;
modPlayer.wearingRogueArmor = true;
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), CritsToActivateImmunity, ImmunityDuration.FramesToSeconds(), ImmunityCooldown.FramesToSeconds(), RogueDamageBoostWhileDebuffed.ToPercent());
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), CritsToActivateImmunity, ImmunityDuration.FramesToSeconds(), ImmunityCooldown.FramesToSeconds());
}
public override void UpdateEquip(Player player)
+2 -1
View File
@@ -76,7 +76,8 @@ namespace CalamityMod.Items
ItemID.LucyTheAxe,
ItemID.PewMaticHorn,
ItemID.WeatherPain,
ItemID.HoundiusShootius
ItemID.HoundiusShootius,
ModContent.ItemType<WalkingCane>()
};
loot.Add(DropHelper.CalamityStyle(DropHelper.BagWeaponDropRateFraction, deerclopsWeapons));
loot.AddRevBagAccessories();
+16 -23
View File
@@ -394,8 +394,9 @@ namespace CalamityMod.Items
if (showTheTip)
{
var str = PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["SmartCursor"].First().ToString();
tooltips.Insert(++lastTooltipIndex, (new TooltipLine(Mod, "CalamityMod:AltExpandTooltip", CalamityUtils.GetTextValue("Misc.AltExpand").Replace("{0}", str))));
var bind = PlayerInput.CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus["SmartCursor"];
string str = bind.Count == 0 ? GetTextValue("Misc.HotkeyNotBound") : bind.First().ToString();
tooltips.Insert(++lastTooltipIndex, (new TooltipLine(Mod, "CalamityMod:AltExpandTooltip", GetTextValue("Misc.AltExpand").Replace("{0}", str))));
tooltips[lastTooltipIndex].OverrideColor = new Color(170, 170, 170);
}
else if (foundDebuff)
@@ -1374,23 +1375,23 @@ namespace CalamityMod.Items
/// <remarks>
/// Currently, the dictionary functions as follows: <br />
/// 1-5 insanely fast <br />
/// 6-9 very fast <br />
/// 10-14 fast <br />
/// 15-22 average <br />
/// 23-29 slow <br />
/// 30-37 very slow <br />
/// 38-45 extremely slow <br />
/// 46+ snail
/// 6-10 very fast <br />
/// 11-17 fast <br />
/// 18-24 average <br />
/// 25-30 slow <br />
/// 31-43 very slow <br />
/// 44-60 extremely slow <br />
/// 61+ snail
/// </remarks>
private static readonly Dictionary<int, LocalizedText> SpeedTooltips = new Dictionary<int, LocalizedText>()
{
{ 5, Language.GetText("LegacyTooltip.6") },
{ 9, Language.GetText("LegacyTooltip.7") },
{ 14, Language.GetText("LegacyTooltip.8") },
{ 22, Language.GetText("LegacyTooltip.9") },
{ 29, Language.GetText("LegacyTooltip.10") },
{ 37, Language.GetText("LegacyTooltip.11") },
{ 45, Language.GetText("LegacyTooltip.12") },
{ 10, Language.GetText("LegacyTooltip.7") },
{ 17, Language.GetText("LegacyTooltip.8") },
{ 24, Language.GetText("LegacyTooltip.9") },
{ 30, Language.GetText("LegacyTooltip.10") },
{ 43, Language.GetText("LegacyTooltip.11") },
{ 60, Language.GetText("LegacyTooltip.12") },
// TODO: Using int.MaxValue here may be considered kind of strange - only alternatives I can think of require hardcoding.
{ int.MaxValue, Language.GetText("LegacyTooltip.13") }
};
@@ -1669,14 +1670,6 @@ namespace CalamityMod.Items
return false;
}
// Rainbow effect originally made for Orderbringer because it used to have a special rarity
// But why did it have one in the first place??
// Might be used for Miracle stuff later or something idk
/*if (line.Name == "ItemName" && line.Mod == "Terraria" && item.type == ModContent.ItemType<Orderbringer>())
{
}*/
return true;
}
#endregion
-2
View File
@@ -128,14 +128,12 @@ namespace CalamityMod.Items
{ ItemID.Handgun, Do(UseExact(20)) }, // VANILLA: 15 UT
{ ItemID.HighVelocityBullet, Do(DamageExact(13)) }, // VANILLA: 11 DMG
{ ItemID.HiveFive, Do(DamageExact(27)) }, // VANILLA: 24 DMG
{ ItemID.HornetStaff, Do(DamageExact(18)) }, // VANILLA: 12 DMG
{ ItemID.IceBlade, Do(UseMeleeSpeed) },
{ ItemID.IceBoomerang, Do(ShootSpeedExact(9), UseExact(25)) }, // VANILLA: 20 UT, 11.5 VEL
{ ItemID.IceRod, Do(ShootSpeedExact(20), UseExact(6)) }, // VANILLA: 9 UT, 12 VEL
{ ItemID.IceSickle, Do(UseMeleeSpeed, DamageExact(75), ShootSpeedExact(20f)) }, // VANILLA: 50 DMG, 12 VEL
{ ItemID.IchorArrow, Do(DamageExact(13)) }, // VANILLA: 16 DMG
{ ItemID.IchorBullet, Do(DamageExact(11)) }, // VANILLA: 13 DMG
{ ItemID.ImpStaff, Do(DamageExact(25)) }, // VANILLA: 17 DMG
{ ItemID.InfernoFork, Do(DamageExact(83), ShootSpeedExact(11)) }, // VANILLA: 70 DMG, 8 VEL
{ ItemID.InfluxWaver, Do(UseMeleeSpeed, DamageExact(80), UseExact(25)) }, // VANILLA: 100 DMG, 20 UT
{ ItemID.IronShortsword, Do(TrueMelee, DamageExact(10)) }, // VANILLA: 8 DMG
-25
View File
@@ -112,31 +112,6 @@ namespace CalamityMod.Items.Fishing
}
else
CalamityMod.Log.Warn("Could not find either Marine Kelp or Marine Kelp Seeds from Thorium. These items will not be added to Stuffed Fish.");
// Ozzatron 30DEC2022: It is unlikely SoA will ever be ported to 1.4 and beyond. Commenting this out indefinitely.
/*
Mod soa = CalamityMod.Instance.soa;
if (soa is not null)
{
try
{
itemLoot.Add(soa.Find<ModItem>("Welkinbell").Type, 4, herbMin, herbMax);
itemLoot.Add(soa.Find<ModItem>("WelkinbellSeeds").Type, 10, seedMin, seedMax);
itemLoot.AddIf(() => Main.hardMode, soa.Find<ModItem>("Illumifern").Type, 4, herbMin, herbMax);
itemLoot.AddIf(() => Main.hardMode, soa.Find<ModItem>("IllumifernSeeds").Type, 10, seedMin, seedMax);
// TODO -- There is no way to determine if SoA's Abaddon is dead without reflection.
// Dan Yami has confirmed that downed calls will be added to SoA eventually.
//itemLoot.AddIf(() => SacredTools.ModdedWorld.downedAbaddon, soa.Find<ModItem>("Enduflora").Type, 4, herbMin, herbMax);
//itemLoot.AddIf(() => SacredTools.ModdedWorld.downedAbaddon, soa.Find<ModItem>("EndufloraSeeds").Type, 10, seedMin, seedMax);
}
catch
{
CalamityMod.Log.Debug("One of the items in this file got renamed internally. Please report this in the #bugs-read-pins channel of the official Calamity discord server.");
}
}
*/
}
public override void ModifyTooltips(List<TooltipLine> list)
-10
View File
@@ -16,15 +16,5 @@ namespace CalamityMod.Items.Placeables.Pylons
Item.value = Item.sellPrice(gold: 2);
Item.rare = ItemRarityID.Blue;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<ScorchedRemains>(15).
AddIngredient<ScorchedBone>(10).
AddIngredient(ItemID.Hellstone, 15).
AddTile(TileID.Anvils).
Register();
}
}
}
+6 -1
View File
@@ -14,6 +14,8 @@ namespace CalamityMod.Items.Potions.Food
{
public new string LocalizationCategory => "Items.Potions";
public static readonly SoundStyle UseSound = new("CalamityMod/Sounds/Item/SoupConsumption");
public static readonly SoundStyle MisophonicUseSound = new("CalamityMod/Sounds/Item/SoupConsumptionMisophonic");
public SlotId DrinkSoundSlot;
public override void SetStaticDefaults()
@@ -38,7 +40,10 @@ namespace CalamityMod.Items.Potions.Food
}
public override bool? UseItem(Player player)
{
DrinkSoundSlot = SoundEngine.PlaySound(UseSound, player.Center);
if (!CalamityClientConfig.Instance.MisophoniaSupport)
DrinkSoundSlot = SoundEngine.PlaySound(UseSound, player.Center);
else
DrinkSoundSlot = SoundEngine.PlaySound(MisophonicUseSound, player.Center);
return true;
}
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.SummonItems
Item.useTime = 10;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.consumable = false;
Item.rare = ModContent.RarityType<Turquoise>();
Item.rare = ModContent.RarityType<CosmicPurple>();
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
+1 -1
View File
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.SummonItems
int posX = (int)(player.position.X + Main.rand.Next(-250, 251));
int posY = (int)(player.position.Y - 500f);
int bossToSpawn = ModContent.NPCType<RavagerBody>();
CalamityUtils.SpawnBossOnPosUsingItem(player, bossToSpawn, posX, posY, SoundID.ScaryScream);
CalamityUtils.SpawnBossOnPosUsingItem(player, bossToSpawn, posX, posY, CalamityClientConfig.Instance.MisophoniaSupport ? SoundID.Roar : SoundID.ScaryScream);
return true;
}
+1 -1
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.SummonItems
Item.useTime = 10;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.consumable = false;
Item.rare = ModContent.RarityType<CosmicPurple>();
Item.rare = ModContent.RarityType<BurnishedAuric>();
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Tools
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
Item.value = Item.sellPrice(gold: 3);
Item.rare = ItemRarityID.Pink;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Placeables.FurnitureAcidwood;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -20,7 +21,7 @@ namespace CalamityMod.Items.Tools
Item.height = 40;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityWhiteBuyPrice;
Item.value = Item.sellPrice(copper: 10);
Item.rare = ItemRarityID.White;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Tools
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
Item.value = Item.sellPrice(silver: 60);
Item.rare = ItemRarityID.Orange;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Tools
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityCyanBuyPrice;
Item.value = Item.sellPrice(gold: 4, silver: 50);
Item.rare = ItemRarityID.Cyan;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+1 -1
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Tools
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityCyanBuyPrice;
Item.value = Item.sellPrice(gold: 6);
Item.rare = ItemRarityID.Cyan;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Tools
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
Item.value = Item.sellPrice(gold: 4, silver: 35);
Item.rare = ItemRarityID.Lime;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Tools
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
Item.value = Item.sellPrice(gold: 4, silver: 35);
Item.rare = ItemRarityID.Lime;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Tools
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
Item.value = Item.sellPrice(gold: 10);
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.rare = ModContent.RarityType<Turquoise>();
+1 -1
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Tools
Item.height = 42;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityWhiteBuyPrice;
Item.value = Item.sellPrice(copper: 10);
Item.rare = ItemRarityID.White;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Tools
Item.DamageType = DamageClass.Melee;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityLightRedBuyPrice;
Item.value = Item.sellPrice(silver: 75);
Item.rare = ItemRarityID.LightRed;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+1 -1
View File
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Tools
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityRedBuyPrice;
Item.value = Item.sellPrice(gold: 7);
Item.rare = ItemRarityID.Red;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -20,7 +21,7 @@ namespace CalamityMod.Items.Tools
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityGreenBuyPrice;
Item.value = Item.sellPrice(silver: 30);
Item.rare = ItemRarityID.Green;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+1 -1
View File
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.Tools
Item.noMelee = true;
Item.noUseGraphic = true;
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
Item.value = Item.sellPrice(silver: 30);
Item.rare = ItemRarityID.Blue;
}
+1 -1
View File
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.Tools
Item.noMelee = true;
Item.noUseGraphic = true;
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
Item.value = Item.sellPrice(silver: 30);
Item.rare = ItemRarityID.Blue;
}
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Tools
Item.height = 44;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
Item.value = Item.sellPrice(silver: 75);
Item.rare = ItemRarityID.Orange;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -21,7 +22,7 @@ namespace CalamityMod.Items.Tools
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityGreenBuyPrice;
Item.value = Item.sellPrice(silver: 30);
Item.rare = ItemRarityID.Green;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+1 -1
View File
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Tools
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
Item.value = Item.sellPrice(gold: 4, silver: 35);
Item.rare = ItemRarityID.Yellow;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Tools
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
Item.value = Item.sellPrice(gold: 3);
Item.rare = ItemRarityID.Pink;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Tools
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
Item.value = Item.sellPrice(silver: 60);
Item.rare = ItemRarityID.Orange;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
@@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker
player.Calamity().disablePerfCystSpawns |= Enabled;
}
/*
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
Texture2D texture;
if (state)
{
//Replace with enabled texture
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiCystOintment").Value;
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
}
else
{
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiCystOintment").Value;
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
}
return false;
}
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
{
Texture2D texture;
if (state)
{
//Replace with enabled texture
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiCystOintment").Value;
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
else
{
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiCystOintment").Value;
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
return false;
}
*/
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
string text;
@@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker
player.Calamity().disableHiveCystSpawns |= Enabled;
}
/*
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
Texture2D texture;
if (state)
{
//Replace with enabled texture
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiTumorOintment").Value;
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
}
else
{
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiTumorOintment").Value;
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
}
return false;
}
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
{
Texture2D texture;
if (state)
{
//Replace with enabled texture
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiTumorOintment").Value;
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
else
{
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiTumorOintment").Value;
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
return false;
}
*/
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
string text;
-39
View File
@@ -61,45 +61,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker
player.Calamity().disableNaturalScourgeSpawns |= Enabled;
}
/*
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
Texture2D texture;
if (state)
{
//Replace with enabled texture
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BleachBall").Value;
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
}
else
{
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BleachBall").Value;
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
}
return false;
}
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
{
Texture2D texture;
if (state)
{
//Replace with enabled texture
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BleachBall").Value;
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
else
{
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BleachBall").Value;
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
return false;
}
*/
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
string text;
@@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker
player.Calamity().noStupidNaturalARSpawns |= Enabled;
}
/*
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
Texture2D texture;
if (state)
{
//Replace with enabled texture
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BrokenWaterFilter").Value;
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
}
else
{
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BrokenWaterFilter").Value;
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
}
return false;
}
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
{
Texture2D texture;
if (state)
{
//Replace with enabled texture
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BrokenWaterFilter").Value;
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
else
{
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BrokenWaterFilter").Value;
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
return false;
}
*/
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
string text;
@@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker
player.Calamity().disableAnahitaSpawns |= Enabled;
}
/*
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
Texture2D texture;
if (state)
{
//Replace with enabled texture
texture = ModContent.Request<Texture2D>("CalamityMod/Items/SirenproofEarMuffs").Value;
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
}
else
{
texture = ModContent.Request<Texture2D>("CalamityMod/Items/SirenproofEarMuffs").Value;
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
}
return false;
}
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
{
Texture2D texture;
if (state)
{
//Replace with enabled texture
texture = ModContent.Request<Texture2D>("CalamityMod/Items/SirenproofEarMuffs").Value;
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
else
{
texture = ModContent.Request<Texture2D>("CalamityMod/Items/SirenproofEarMuffs").Value;
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
return false;
}
*/
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
string text;
@@ -62,45 +62,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker
player.Calamity().disableVoodooSpawns |= Enabled;
}
/*
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
Texture2D texture;
if (state)
{
//Replace with enabled texture
texture = ModContent.Request<Texture2D>("CalamityMod/Items/VoodooDemonVoodooDoll").Value;
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
}
else
{
texture = ModContent.Request<Texture2D>("CalamityMod/Items/VoodooDemonVoodooDoll").Value;
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
}
return false;
}
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
{
Texture2D texture;
if (state)
{
//Replace with enabled texture
texture = ModContent.Request<Texture2D>("CalamityMod/Items/VoodooDemonVoodooDoll").Value;
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
else
{
texture = ModContent.Request<Texture2D>("CalamityMod/Items/VoodooDemonVoodooDoll").Value;
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
return false;
}
*/
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
string text;
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Tools
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
Item.value = Item.sellPrice(gold: 4, silver: 35);
Item.rare = ItemRarityID.Yellow;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+1 -1
View File
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Tools
Item.noMelee = true;
Item.noUseGraphic = true;
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
Item.value = Item.sellPrice(silver: 5);
Item.rare = ItemRarityID.Blue;
}
+1 -2
View File
@@ -68,8 +68,7 @@ namespace CalamityMod.Items.TreasureBags
ModContent.ItemType<OverloadedBlaster>(),
ModContent.ItemType<AbyssalTome>(),
ModContent.ItemType<EldritchTome>(),
ModContent.ItemType<CorroslimeStaff>(),
ModContent.ItemType<CrimslimeStaff>()
ModContent.ItemType<BlightedSlimeStaff>()
}));
// Equipment
@@ -26,6 +26,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
public static int ArmorPenetration = 15;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ArmorPenetration);
public override void SetStaticDefaults() => ItemID.Sets.StaffMinionSlotsRequired[Type] = 4f;
public override void SetDefaults()
{
CalamityGlobalItem modItem = Item.Calamity();
@@ -33,7 +35,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
Item.width = 34;
Item.height = 32;
Item.shootSpeed = 10f;
Item.damage = 24;
Item.damage = 18;
Item.ArmorPenetration = ArmorPenetration;
Item.mana = 10;
Item.useAnimation = Item.useTime = 36;
+1 -1
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 66;
Item.height = 82;
Item.damage = 290;
Item.damage = 333;
Item.DamageType = DamageClass.Magic;
Item.noUseGraphic = true;
Item.channel = true;
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 52;
Item.height = 74;
Item.damage = 11;
Item.damage = 10;
Item.DamageType = DamageClass.Magic;
Item.mana = 9;
Item.useAnimation = Item.useTime = 25;
+1 -1
View File
@@ -62,7 +62,7 @@ namespace CalamityMod.Items.Weapons.Magic
}
for (int i = 0; i < 3; i++)
{
realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(51) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - /* - */ player.position.X), player.MountedCenter.Y + 600f); //-
realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(51) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y + 600f); //-
realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-50, 51); //200
realPlayerPos.Y += (float)(100 * i); //-=
mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; //+ -
+30 -22
View File
@@ -10,6 +10,7 @@ using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.DataStructures;
using Terraria.GameInput;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
@@ -22,11 +23,6 @@ namespace CalamityMod.Items.Weapons.Melee
public float Combo = 0f;
public float Charge = 0f;
// Frame window for double right click to snip.
// The right click item activation takes 3 frames, so the frame window is frame 3 to frame 11.
public static int DoubleRightClickFrames = 11;
private int rmbFrames = 0;
public static float NeedleDamageMultiplier = 0.7f; //Damage on the non-homing needle projectile
public static float MaxThrowReach = 760;
public static float SnapDamageMultiplier = 1.2f; //Extra damage from making the scissors snap
@@ -68,9 +64,14 @@ namespace CalamityMod.Items.Weapons.Melee
var blastTooltip = tooltips.FirstOrDefault(x => x.Text.Contains("[BLAST]") && x.Mod == "Terraria");
if (blastTooltip != null)
{
blastTooltip.Text = Lang.SupportGlyphs(this.GetLocalizedValue("BlastInfo"));
var key = Item.GetDynamicModHotkey().GetAssignedKeysOrEmpty(PlayerInput.CurrentInputMode);
if (key.Count > 0)
blastTooltip.Text = Lang.SupportGlyphs(this.GetLocalizedValue("BlastInfoKeybind"));
else
blastTooltip.Text = Lang.SupportGlyphs(this.GetLocalizedValue("BlastInfo"));
blastTooltip.OverrideColor = Color.Lerp(Color.HotPink, Color.Crimson, 0.5f + (float)Math.Sin(Main.GlobalTimeWrappedHourly) * 0.625f);
}
tooltips.IntegrateDynamicHotkey(Item);
}
public override void SetDefaults()
@@ -100,14 +101,30 @@ namespace CalamityMod.Items.Weapons.Melee
{
player.Calamity().mouseWorldListener = true;
if (rmbFrames > 0)
--rmbFrames;
if (CanUseItem(player) && Combo != 4)
Item.channel = false;
if (Combo == 4)
Item.channel = true;
if (Main.myPlayer == player.whoAmI && Item.CurrentlyPressingKeybind() && Charge > 0)
{
Projectile blast = Main.projectile.FirstOrDefault(p => p.active && p.owner == player.whoAmI && p.type == ProjectileType<ArkoftheCosmosBlast>(), null);
if (blast == null)
{
float speed = Item.shootSpeed;
int dmg = (int)player.GetTotalDamage(Item.DamageType).ApplyTo(Item.damage);
Vector2 pos = player.Center;
int shoot = Item.shoot;
float kb = Item.knockBack;
var velocity = player.DirectionTo(Main.MouseWorld) * Item.shootSpeed;
PlayerLoader.ModifyShootStats(player, Item, ref pos, ref velocity, ref shoot, ref dmg, ref kb);
float angle = velocity.ToRotation();
Projectile.NewProjectile(player.GetSource_ItemUse(Item), player.Center + angle.ToRotationVector2() * 90f, velocity, ProjectileType<ArkoftheCosmosBlast>(), (int)(dmg * BlastDamageMultiplier), 0, player.whoAmI, Charge);
Charge = 0;
}
}
}
public override bool CanUseItem(Player player)
@@ -122,15 +139,16 @@ namespace CalamityMod.Items.Weapons.Melee
{
if (player.altFunctionUse == 2)
{
// If it has been less than N frames since the last alt function use, this is a double right click.
bool rightMouseDoubleClick = rmbFrames > 0;
// Check if a parry holdout or blast is already present.
Projectile parrier = Main.projectile.FirstOrDefault(p => p.active && p.owner == player.whoAmI && p.type == ProjectileType<ArkoftheCosmosParryHoldout>(), null);
Projectile blast = Main.projectile.FirstOrDefault(p => p.active && p.owner == player.whoAmI && p.type == ProjectileType<ArkoftheCosmosBlast>(), null);
bool canExecuteBlast = rightMouseDoubleClick && Charge > 0 && blast is null;
bool canExecuteBlast = Charge > 0 && blast is null;
bool canExecuteParry = parrier is null && !canExecuteBlast;
//Disable blast usage if hotkey is bound
if (Item.GetDynamicModHotkey().GetAssignedKeysOrEmpty(PlayerInput.CurrentInputMode).Count > 0)
canExecuteBlast = false;
// The blast is checked first, so that it overrides the first right click triggering a parry. Blasts delete any active parry holdouts on use.
if (canExecuteBlast)
@@ -139,13 +157,6 @@ namespace CalamityMod.Items.Weapons.Melee
float angle = velocity.ToRotation();
Projectile.NewProjectile(source, player.Center + angle.ToRotationVector2() * 90f, velocity, ProjectileType<ArkoftheCosmosBlast>(), (int)(damage * BlastDamageMultiplier), 0, player.whoAmI, Charge);
Charge = 0;
// If the parry holdout has existed for very few frames, just delete it.
if (parrier is not null && parrier.timeLeft > ArkoftheCosmosParryHoldout.MaxTime - DoubleRightClickFrames)
{
parrier.active = false;
parrier.netUpdate = true;
}
}
// If the blast cannot be executed, then the parry is executed, assuming no existing holdout is present.
@@ -162,9 +173,6 @@ namespace CalamityMod.Items.Weapons.Melee
if (!anyArkParryExists)
Projectile.NewProjectile(source, player.Center, velocity, ProjectileType<ArkoftheCosmosParryHoldout>(), damage, 0, player.whoAmI, 0, 0);
}
// Regardless of what transpires from the right click, set the double right click frames appropriately.
rmbFrames = DoubleRightClickFrames;
return false;
}
+2 -9
View File
@@ -15,12 +15,11 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 56;
Item.height = 60;
Item.damage = 120;
Item.damage = 80;
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useAnimation = 20;
Item.useAnimation = Item.useTime = 20;
Item.useStyle = ItemUseStyleID.Swing;
Item.useTime = 20;
Item.knockBack = 6f;
Item.UseSound = SoundID.Item71;
Item.autoReuse = true;
@@ -30,12 +29,6 @@ namespace CalamityMod.Items.Weapons.Melee
Item.shootSpeed = 5f;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Projectile.NewProjectile(source, position, velocity, type, (int)(damage * 0.6), knockback, player.whoAmI);
return false;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 300);
+2 -3
View File
@@ -21,14 +21,13 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 112;
Item.height = 112;
Item.damage = 110;
Item.damage = 80;
Item.DamageType = DamageClass.Melee;
Item.noMelee = true;
Item.useTurn = true;
Item.noUseGraphic = true;
Item.useAnimation = 17;
Item.useAnimation = Item.useTime = 17;
Item.useStyle = ItemUseStyleID.Shoot;
Item.useTime = 17;
Item.knockBack = 8.5f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+3 -7
View File
@@ -16,11 +16,7 @@ namespace CalamityMod.Items.Weapons.Melee
internal const float ShootSpeed = 2f;
internal const float ProjectileDamageMultiplier = 0.8f;
internal const float TrueMeleeSlashProjectileDamageMultiplier = 0.8f;
internal const float SlashProjectileDamageMultiplier = 0.4125f; // Makes them do 33% damage since main projectile does 80% damage
internal const float SlashProjectileDamageMultiplier = 0.33f;
internal const int SlashProjectileLimit = 4;
@@ -34,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 92;
Item.height = 100;
Item.damage = 75;
Item.damage = 60;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = Item.useTime = 30;
Item.useStyle = ItemUseStyleID.Swing;
@@ -59,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Melee
// 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction
velocity = (Main.MouseWorld - position).SafeNormalize(Vector2.UnitY) * ShootSpeed;
type = Main.rand.NextBool() ? type : ModContent.ProjectileType<LightBeam>();
Projectile.NewProjectile(source, position, velocity, type, (int)(damage * ProjectileDamageMultiplier), knockback * ProjectileDamageMultiplier, player.whoAmI);
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
return false;
}
+2 -3
View File
@@ -17,13 +17,12 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 18;
Item.height = 20;
Item.damage = 130;
Item.damage = 110;
Item.DamageType = DamageClass.MeleeNoSpeed;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.useAnimation = 15;
Item.useAnimation = Item.useTime = 15;
Item.useStyle = ItemUseStyleID.Swing;
Item.useTime = 15;
Item.knockBack = 3f;
Item.UseSound = SoundID.Item39;
Item.autoReuse = true;
+2 -2
View File
@@ -12,8 +12,8 @@ namespace CalamityMod.Items.Weapons.Melee
public new string LocalizationCategory => "Items.Weapons.Melee";
public override void SetDefaults()
{
Item.width = 46;
Item.height = 56;
Item.width = 66;
Item.height = 74;
Item.damage = 80;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = Item.useTime = 15;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

+1 -1
View File
@@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Melee
Item.autoReuse = true;
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
Item.rare = ModContent.RarityType<BurnishedAuric>();
Item.rare = ModContent.RarityType<CalamityRed>();
Item.Calamity().devItem = true;
Item.shoot = ModContent.ProjectileType<GaelSkull>();
+2 -3
View File
@@ -18,14 +18,13 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 54;
Item.height = 54;
Item.damage = 31;
Item.damage = 26;
Item.DamageType = DamageClass.Melee;
Item.noMelee = true;
Item.useTurn = true;
Item.noUseGraphic = true;
Item.useAnimation = 25;
Item.useAnimation = Item.useTime = 25;
Item.useStyle = ItemUseStyleID.Shoot;
Item.useTime = 25;
Item.knockBack = 5.75f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+2 -3
View File
@@ -19,14 +19,13 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 64;
Item.height = 64;
Item.damage = 85;
Item.damage = 100;
Item.DamageType = DamageClass.Melee;
Item.noMelee = true;
Item.useTurn = true;
Item.noUseGraphic = true;
Item.useAnimation = 20;
Item.useAnimation = Item.useTime = 20;
Item.useStyle = ItemUseStyleID.Shoot;
Item.useTime = 20;
Item.knockBack = 7.5f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
+2 -2
View File
@@ -25,8 +25,8 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
Item.width = 74;
Item.height = 94;
Item.width = 94;
Item.height = 92;
Item.useStyle = ItemUseStyleID.Shoot;
Item.damage = 200;
Item.DamageType = TrueMeleeDamageClass.Instance;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

+2 -2
View File
@@ -25,8 +25,8 @@ namespace CalamityMod.Items.Weapons.Melee
}
public override void SetDefaults()
{
Item.width = 78;
Item.height = 94;
Item.width = 74;
Item.height = 84;
Item.damage = 2080;
Item.DamageType = DamageClass.Melee;
Item.useTime = Item.useAnimation = 33;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Loaded 100 of 266 files, more files were not shown because too many files have changed in this diff. Show more