Merge branch '1.4.4' into auric-decor-tiles

This commit is contained in:
GinYuH committed 2024-02-06 18:57:22 -08:00
commit dc0d95e196
253 files changed
+6739 -2259

No files matched your search

+59 -46
View File
@@ -4,25 +4,25 @@ using CalamityMod.NPCs.Crabulon;
using CalamityMod.NPCs.ExoMechs.Apollo;
using CalamityMod.NPCs.ExoMechs.Artemis;
using CalamityMod.NPCs.OldDuke;
using CalamityMod.NPCs.ProfanedGuardians;
using CalamityMod.NPCs.Providence;
using CalamityMod.NPCs.Ravager;
using CalamityMod.NPCs.SupremeCalamitas;
using CalamityMod.NPCs.Yharon;
using CalamityMod.Projectiles.DraedonsArsenal;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.DraedonsArsenal;
using CalamityMod.Projectiles.Summon.MirrorofKalandraMinions;
using CalamityMod.Projectiles.Typeless;
using System.Collections.Generic;
using System.Linq;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
using CalamityMod.NPCs.ProfanedGuardians;
using CalamityMod.NPCs.Yharon;
namespace CalamityMod.Balancing
{
@@ -94,7 +94,7 @@ namespace CalamityMod.Balancing
// 50% resist to true melee.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.Creeper, Do(ResistTrueMelee(0.5f))));
// 50% resist to Demon Scythes.
// 50% resist to Demon Scythe.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.Creeper, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
#endregion
@@ -102,7 +102,7 @@ namespace CalamityMod.Balancing
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.EaterofWorldsIDs, Do(ResistTrueMelee(0.5f))));
// 50% resist to Demon Scythes.
// 50% resist to Demon Scythe.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.EaterofWorldsIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
// 40% resist to Sky Glaze.
@@ -118,37 +118,48 @@ namespace CalamityMod.Balancing
#endregion
#region Wall of Flesh
//45% resist to Corro/Crimslime Staff.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.WallofFleshEye, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<CrimslimeMinion>(), ProjectileType<CorroslimeMinion>()))));
// 40% resist to Corro/Crimslime Staff.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.WallofFleshEye, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<CrimslimeMinion>(), ProjectileType<CorroslimeMinion>()))));
#endregion
#region Aquatic Scourge
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(ResistTrueMelee(0.5f))));
// 50% resist to Dormant Brimseekers.
// 50% resist to Adamantite Throwing Axe's lightning.
// Twisting Thunder and Gael's greatsword use this projectile too, but they are far beyond progression, so who cares!
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
// 50% resist to Dormant Brimseeker.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
// 50% resist to Mounted Scanner.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<MountedScannerLaser>()))));
// 40% resist to SHPC.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<SHPExplosion>()))));
// 40% resist to Cryophobia.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<CryoBlast>()))));
// 40% resist to SHPC.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<SHPExplosion>()))));
// 30% resist to Meowthrower.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
// 25% resist to Snowstorm Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
#endregion
#region The Destroyer
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(ResistTrueMelee(0.5f))));
// 50% resist to Dormant Brimseekers.
// 50% resist to Dormant Brimseeker.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
// 50% resist to Adamantite Throwing Axe's lightning.
// See Aquatic Scourge comment.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
// 45% resist to Mounted Scanner.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<MountedScannerLaser>()))));
@@ -158,11 +169,11 @@ namespace CalamityMod.Balancing
// 25% resist to SHPC.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<SHPExplosion>()))));
// 15% resist to Mineral Mortar's Projectile.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<MineralMortarProjectile>()))));
// 25% resist to Snowstorm Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
// 15% resist to Snowstorm Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<Snowflake>()))));
// 15% resist to Mineral Mortar's projectile.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<MineralMortarProjectile>()))));
#endregion
#region Astrum Aureus
@@ -174,12 +185,14 @@ namespace CalamityMod.Balancing
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(ResistTrueMelee(0.5f))));
// 50% resist to Aegis Blade's explosions because the true melee resist ain't enough.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AegisBlast>()))));
// 40% resist to Flying Dragon.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileID.DD2SquireSonicBoom))));
// 30% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
#endregion
#region Duke Fishron
@@ -193,6 +206,12 @@ namespace CalamityMod.Balancing
#endregion
#region Lunatic Cultist
// 50% resist to Aegis Blade's explosions.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.CultistBoss, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AegisBlast>()))));
// 35% resist to Subduction Slicer's flame pillars.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.CultistBoss, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<SubductionFlameburst>()))));
// 20% resist to Art Attack.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.CultistBoss, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<ArtAttackStrike>()))));
@@ -216,16 +235,13 @@ namespace CalamityMod.Balancing
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(ResistTrueMelee(0.5f))));
// 25% resist to Resurrection Butterfly.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<SakuraBullet>(), ProjectileType<PurpleButterfly>()))));
// 20% resist to Resurrection Butterfly.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<SakuraBullet>(), ProjectileType<PurpleButterfly>()))));
#endregion
#region Moon Lord
// 20% resist to Mercurial Tides (True Biome Blade).
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<MercurialTides>(), ProjectileType<MercurialTidesMonolith>(), ProjectileType<MercurialTidesBlast>()))));
// 15% resist to Pestilent Defiler.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<SicknessRound>(), ProjectileType<Sickness>()))));
#endregion
#region Profaned Guardians
@@ -247,10 +263,10 @@ namespace CalamityMod.Balancing
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(ResistTrueMelee(0.5f))));
// 50% resist to Dazzling Stabbers.
// 50% resist to Dazzling Stabber Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DazzlingStabber>()))));
// 50% resist to Elemental Axes.
// 50% resist to Elemental Axe.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<ElementalAxeMinion>()))));
// 50% resist to Pristine Fury's alt fire.
@@ -264,8 +280,8 @@ namespace CalamityMod.Balancing
#endregion
#region Old Duke
// 60% resist to Last Mourning.
// This will technically catch pumpkins from the Horseman's Blade but that shouldn't really matter.
// 60% resist to The Last Mourning's projectiles.
// This will technically catch pumpkins from The Horseman's Blade but that shouldn't really matter.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<OldDuke>(), new ProjectileResistBalancingRule(0.4f, ProjectileType<MourningSkull>(), ProjectileID.FlamingJack)));
// 20% resist to Time Bolt.
@@ -319,11 +335,8 @@ namespace CalamityMod.Balancing
// 20% resist to Zenith.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.FinalFractal))));
// 15% resist to Enforcer projectiles.
// 15% resist to The Enforcer's projectiles.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<EssenceFlame2>()))));
// 15% resist to Murasama.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<MurasamaSlash>()))));
#endregion
#region Exo Mechs: Artemis and Apollo
@@ -331,7 +344,7 @@ namespace CalamityMod.Balancing
// TODO -- NPC sets (mostly worm bosses) should probably be their own holding class.
int[] exoTwins = new int[] { NPCType<Artemis>(), NPCType<Apollo>() };
// 10% resist to Eclipse's Fall stealth strike.
// 10% resist to Eclipse's Fall's mini spears.
NPCSpecificBalancingChanges.AddRange(Bundle(exoTwins, Do(new ProjectileResistBalancingRule(0.9f, ProjectileType<EclipsesSmol>()))));
#endregion
@@ -339,10 +352,10 @@ namespace CalamityMod.Balancing
// 65% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(ResistTrueMelee(0.35f))));
// 65% resist to Enforcer projectiles.
// 65% resist to The Enforcer's projectiles.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<EssenceFlame2>()))));
// 65% resist to Final Dawn lunge.
// 65% resist to The Final Dawn's lunge.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<FinalDawnThrow2>()))));
// 60% resist to Dynamic Pursuer.
@@ -351,10 +364,10 @@ namespace CalamityMod.Balancing
// 50% resist to Chicken Cannon.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<ChickenExplosion>()))));
// 50% resist to Tarragon Throwing Darts Thorns. (LOL)
// 50% resist to Tarragon Throwing Dart's thorns. (LOL)
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TarraThornRight>()))));
// 50% resist to Vehemence skulls.
// 50% resist to Vehemence's skulls.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<VehemenceSkull>(), ProjectileType<PrismaticBeam>()))));
// 50% resist to Yharim's Crystal.
@@ -365,14 +378,14 @@ namespace CalamityMod.Balancing
// 40% resist to Rancor.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<RancorLaserbeam>()))));
// 35% resist to The Anomaly's Nanogun bomb explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<AnomalysNanogunMPFBBoom>()))));
// 35% resist to Ultima.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<UltimaRay>()))));
// 35% resist to Anomaly's Nanogun bomb explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<AnomalysNanogunMPFBBoom>()))));
// 30% resist to Eclipse Fall.
// 30% resist to Eclipse's Fall.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<EclipsesFallMain>()))));
// 30% resist to Prismatic Breaker's laser beam.
@@ -384,7 +397,7 @@ namespace CalamityMod.Balancing
// 30% resist to Sirius.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<SiriusExplosion>()))));
// 30% resist to Dragon Scales and The Wand's tornadoes
// 30% resist to Dragon Scales and The Wand's tornadoes.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<InfernadoFriendly>(), ProjectileType<DragonScalesInfernado>()))));
// 25% resist to the Spin Throw part of the Ark of the Cosmos' combo.
@@ -402,22 +415,22 @@ namespace CalamityMod.Balancing
// 25% resist to Zenith.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.FinalFractal))));
// 20% resist to Blood Boiler fire.
// 20% resist to Blood Boiler.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<BloodBoilerFire>()))));
// 20% resist to Eradicator beams.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NebulaShot>()))));
// 20% resist to Plasma Grenade and Dynamic Pursuer's explosions
// 20% resist to Plasma Grenade and Dynamic Pursuer's explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<PlasmaGrenadeProjectile>(),ProjectileType<PlasmaGrenadeSmallExplosion>(), ProjectileType<MassivePlasmaExplosion>()))));
// 20% resist to Voltaic Climax / Void Vortex hitscan beams.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<ClimaxBeam>()))));
// 15% resist to Final Dawn AoE sweep flames.
// 15% resist to The Final Dawn's AoE sweep flames.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<FinalDawnFlame>()))));
// 15% resist to Godslayer Slugs.
// 15% resist to God Slayer Slugs.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<GodSlayerSlugProj>()))));
// 15% resist to Gruesome Eminence.
+3 -2
View File
@@ -1,4 +1,4 @@
using CalamityMod.CalPlayer;
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -20,7 +20,8 @@ namespace CalamityMod.Buffs.StatBuffs
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.abyssalDivingSuitPrevious)
{
player.gills = true;
if (player.IsUnderwater())
player.gills = true;
modPlayer.abyssalDivingSuitPower = true;
modPlayer.depthCharm = true;
modPlayer.jellyfishNecklace = true;
+25
View File
@@ -0,0 +1,25 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
{
public class Haste : ModBuff
{
public override void SetStaticDefaults()
{
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
// keep the buff active as long as the player's haste level is up
if (player.Calamity().hasteLevel > 0)
{
player.buffTime[buffIndex] = 60;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 B

After

Width:  |  Height:  |  Size: 813 B

+8 -2
View File
@@ -978,6 +978,8 @@ namespace CalamityMod.CalPlayer
public bool avertorBonus = false;
public bool divineBless = false;
public bool infiniteFlight = false;
public int hasteCounter = 0;
public int hasteLevel = 0;
#endregion
#region Minion
@@ -2469,6 +2471,8 @@ namespace CalamityMod.CalPlayer
healingPotionMultiplier = 1f;
avertorBonus = false;
divineBless = false;
hasteLevel = 0;
hasteCounter = 0;
#endregion
#region Armor Set Bonuses
@@ -3656,7 +3660,8 @@ namespace CalamityMod.CalPlayer
(silvaSet ? 0.05f : 0f) +
(blueCandle ? 0.05f : 0f) +
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
((deepDiver && Player.IsUnderwater()) ? 0.15f : 0f);
((deepDiver && Player.IsUnderwater()) ? 0.15f : 0f) +
(hasteLevel * 0.05f);
float runSpeedMult = 1f +
(lunicCorpsLegs ? 0.1f : 0f) +
@@ -3670,7 +3675,8 @@ namespace CalamityMod.CalPlayer
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
(silvaSet ? 0.05f : 0f) +
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
((deepDiver && Player.IsUnderwater()) ? 0.15f : 0f);
((deepDiver && Player.IsUnderwater()) ? 0.15f : 0f) +
(hasteLevel * 0.05f);
if ((Player.slippy || Player.slippy2) && Player.iceSkate)
runAccMult *= 0.6f;
+8 -8
View File
@@ -190,7 +190,7 @@ namespace CalamityMod.CalPlayer
if (Main.rand.NextBool(chanceForBiomeCrate))
{
if (ZoneCalamity)
itemDrop = ModContent.ItemType<BrimstoneCrate>();
itemDrop = Main.hardMode ? ModContent.ItemType<BrimstoneCrate>() : ModContent.ItemType<SlagCrate>();
else
itemDrop = Main.hardMode ? ItemID.LavaCrateHard : ItemID.LavaCrate;
}
@@ -267,9 +267,9 @@ namespace CalamityMod.CalPlayer
{
List<int> biomeCrateList = new List<int>();
biomeCrateList.AddWithCondition<int>(ModContent.ItemType<AstralCrate>(), ZoneAstral);
biomeCrateList.AddWithCondition<int>(ModContent.ItemType<SunkenCrate>(), ZoneSunkenSea);
biomeCrateList.AddWithCondition<int>(ModContent.ItemType<SulphurousCrate>(), canSulphurFish);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ModContent.ItemType<AstralCrate>() : ModContent.ItemType<MonolithCrate>(), ZoneAstral);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ModContent.ItemType<PrismCrate>() : ModContent.ItemType<EutrophicCrate>(), ZoneSunkenSea);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ModContent.ItemType<HydrothermalCrate>() : ModContent.ItemType<SulphurousCrate>(), canSulphurFish);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.CorruptFishingCrateHard : ItemID.CorruptFishingCrate, Player.ZoneCorrupt);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.CrimsonFishingCrateHard : ItemID.CrimsonFishingCrate, Player.ZoneCrimson);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.HallowedFishingCrateHard : ItemID.HallowedFishingCrate, Player.ZoneHallow);
@@ -309,15 +309,15 @@ namespace CalamityMod.CalPlayer
{
if (ZoneAstral)
{
itemDrop = ModContent.ItemType<AstralCrate>();
itemDrop = Main.hardMode ? ModContent.ItemType<AstralCrate>() : ModContent.ItemType<MonolithCrate>();
}
if (ZoneSunkenSea)
{
itemDrop = ModContent.ItemType<SunkenCrate>();
itemDrop = Main.hardMode ? ModContent.ItemType<PrismCrate>() : ModContent.ItemType<EutrophicCrate>();
}
if (canSulphurFish)
{
itemDrop = ModContent.ItemType<SulphurousCrate>();
itemDrop = Main.hardMode ? ModContent.ItemType<HydrothermalCrate>() : ModContent.ItemType<SulphurousCrate>();
}
}
return;
@@ -546,7 +546,7 @@ namespace CalamityMod.CalPlayer
{
if (attempt.crate)
{
itemDrop = ModContent.ItemType<BrimstoneCrate>();
itemDrop = Main.hardMode? ModContent.ItemType<BrimstoneCrate>() : ModContent.ItemType<SlagCrate>();
}
else if (attempt.legendary)
{
+7 -27
View File
@@ -741,30 +741,6 @@ namespace CalamityMod.CalPlayer
// The amount of damage that will be dealt is yet to be determined.
//
if (areThereAnyDamnBosses && CalamityMod.bossVelocityDamageScaleValues.ContainsKey(npc.type))
{
CalamityMod.bossVelocityDamageScaleValues.TryGetValue(npc.type, out float velocityScalar);
if (((npc.type == NPCID.EyeofCthulhu || npc.type == NPCID.Spazmatism) && npc.ai[0] >= 2f) || (npc.type == NPCID.Plantera && npc.life / (float)npc.lifeMax <= 0.5f) ||
(npc.type == ModContent.NPCType<Apollo>() && npc.life / (float)npc.lifeMax < 0.6f))
velocityScalar = CalamityMod.bitingEnemeyVelocityScale;
if (npc.velocity == Vector2.Zero)
{
contactDamageReduction += 1f - velocityScalar;
}
else
{
float amount = npc.velocity.Length() / (npc.Calamity().maxVelocity * 0.5f);
if (amount > 1f)
amount = 1f;
float damageReduction = MathHelper.Lerp(velocityScalar, 1f, amount);
if (damageReduction < 1f)
contactDamageReduction += 1f - damageReduction;
}
}
if (transformer)
{
if (npc.type == NPCID.BlueJellyfish || npc.type == NPCID.PinkJellyfish || npc.type == NPCID.GreenJellyfish ||
@@ -1318,6 +1294,10 @@ namespace CalamityMod.CalPlayer
{
Player.AddBuff(BuffID.Weak, 300);
}
else if (proj.type == ProjectileID.CursedFlameHostile)
{
Player.AddBuff(BuffID.CursedInferno, 120);
}
else if (proj.type == ProjectileID.ThornBall)
{
Player.AddBuff(BuffID.Poisoned, 480);
@@ -2011,8 +1991,8 @@ namespace CalamityMod.CalPlayer
if (hideOfDeus)
{
hideOfDeusMeleeBoostTimer += 3 * hurtInfo.Damage;
if (hideOfDeusMeleeBoostTimer > 900)
hideOfDeusMeleeBoostTimer = 900;
if (hideOfDeusMeleeBoostTimer > 600)
hideOfDeusMeleeBoostTimer = 600;
}
if (Player.whoAmI == Main.myPlayer)
@@ -2408,7 +2388,7 @@ namespace CalamityMod.CalPlayer
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(320);
astralStarDamage = Player.ApplyArmorAccDamageBonusesTo(astralStarDamage);
Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, 0f, ModContent.ProjectileType<GodSlayerBlaze>(), blazeDamage, 5f, Player.whoAmI, 0f, 1f);
Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, 0f, ModContent.ProjectileType<HideOfAstrumDeusExplosion>(), blazeDamage, 5f, Player.whoAmI, 0f, 1f);
for (int n = 0; n < 12; n++)
{
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ModContent.ProjectileType<AstralStar>(), astralStarDamage, 5f, Player.whoAmI);
+26 -10
View File
@@ -953,7 +953,7 @@ namespace CalamityMod.CalPlayer
{
if (!Main.rand.NextBool(3))
continue;
Dust holyCinder = Dust.NewDustDirect(Player.position, Player.width, Player.height, (int)CalamityDusts.ProfanedFire);
holyCinder.velocity = Main.rand.NextVector2Circular(3.5f, 3.5f);
holyCinder.velocity.Y -= Main.rand.NextFloat(1f, 3f);
@@ -1025,7 +1025,7 @@ namespace CalamityMod.CalPlayer
Vector2 spawnPoint = new Vector2(Player.Center.X + Main.rand.Next(-1000, 1001), Player.Center.Y - Main.rand.Next(700, 801));
if (Player.miscCounter % slimeRainRate == 0f)
{
{
if (DownedBossSystem.downedAquaticScourge && !DownedBossSystem.downedPolterghast && Main.rand.NextBool(12))
{
NPC.NewNPC(new EntitySource_SpawnNPC(), (int)spawnPoint.X, (int)spawnPoint.Y, ModContent.NPCType<IrradiatedSlime>());
@@ -1119,7 +1119,7 @@ namespace CalamityMod.CalPlayer
{
Player.velocity.Y += Player.gravity * Player.gravDir * (BalancingConstants.HoldingDownGravityMultiplier - 1f);
if (Player.Calamity().gSabaton)
{
{
Player.maxFallSpeed *= 1.5f;
}
if (Player.velocity.Y * Player.gravDir > Player.maxFallSpeed)
@@ -1259,7 +1259,7 @@ namespace CalamityMod.CalPlayer
}
}
if (target > 0)
if (target > 0)
{
unstableSelectedTarget = Main.npc[target];
unstableSelectedTarget.Calamity().arcZapCooldown = 18;
@@ -1479,7 +1479,7 @@ namespace CalamityMod.CalPlayer
auralisAurora--;
if (auralisAuroraCooldown > 0)
auralisAuroraCooldown--;
if (blazingCore)
{
if (blazingCoreSuccessfulParry > 0)
@@ -1491,7 +1491,7 @@ namespace CalamityMod.CalPlayer
{
FlameLickedShell.HandleParryCountdown(Player);
}
// Silver Armor "Medkit" effect
if (silverMedkitTimer > 0)
{
@@ -1871,6 +1871,25 @@ namespace CalamityMod.CalPlayer
else if (polarisBoostCounter >= 10)
polarisBoostTwo = true;
// Haste buff
if (hasteLevel > 0)
{
// capped out at 3
if (hasteLevel > 3)
hasteLevel = 3;
// if the haste counter hits 5 seconds, subtract a haste level, and if there are none left afterwards, delete the buff
if (++hasteCounter == 300)
{
hasteLevel--;
if (hasteLevel <= 0)
{
if (Player.FindBuffIndex(ModContent.BuffType<Haste>()) > -1)
Player.ClearBuff(ModContent.BuffType<Haste>());
}
hasteCounter = 0;
}
}
// Calcium Potion buff
if (calcium)
Player.noFallDmg = true;
@@ -2488,7 +2507,7 @@ namespace CalamityMod.CalPlayer
if (decayEffigy)
{
Player.buffImmune[ModContent.BuffType<SulphuricPoisoning>()] = true;
if (!ZoneAbyss)
if (!ZoneAbyss && Player.IsUnderwater())
{
Player.gills = true;
}
@@ -2767,9 +2786,6 @@ namespace CalamityMod.CalPlayer
}
}
if (CalamityLists.scopedWeaponList.Contains(Player.ActiveItem().type))
Player.scope = true;
if (CalamityLists.highTestFishList.Contains(Player.ActiveItem().type))
Player.accFishingLine = true;
+13 -2
View File
@@ -120,9 +120,18 @@ namespace CalamityMod.CalPlayer
break;
case ItemID.BeeKeeper:
case ItemID.BladeofGrass:
target.AddBuff(BuffID.Poisoned, 240);
break;
case ItemID.FieryGreatsword:
target.AddBuff(BuffID.OnFire3, 180);
break;
case ItemID.Muramasa:
target.AddBuff(BuffType<Nightwither>(), 30);
break;
case ItemID.IceSickle:
case ItemID.Frostbrand:
target.AddBuff(BuffID.Frostburn2, 300);
@@ -155,6 +164,7 @@ namespace CalamityMod.CalPlayer
// Shattered Community tracks all damage dealt with Rage Mode (ignoring dummies).
if (target.type == NPCID.TargetDummy || target.type == NPCType<SuperDummyNPC>())
return;
if (rageModeActive && shatteredCommunity)
Player.GetModPlayer<ShatteredCommunityPlayer>().AccumulateRageDamage(damageDone);
}
@@ -245,6 +255,7 @@ namespace CalamityMod.CalPlayer
case ProjectileID.Bee:
case ProjectileID.GiantBee:
case ProjectileID.BladeOfGrass:
target.AddBuff(BuffID.Poisoned, 120);
break;
@@ -881,7 +892,7 @@ namespace CalamityMod.CalPlayer
titanCooldown = 15;
}
if (corrosiveSpine && modProj.stealthStrikeHitCount < 3)
if (corrosiveSpine && modProj.stealthStrikeHitCount < 3 && (Player.ownedProjectileCounts[ProjectileType<Corrocloud1>()] + Player.ownedProjectileCounts[ProjectileType<Corrocloud2>()] + Player.ownedProjectileCounts[ProjectileType<Corrocloud3>()]) < 3)
{
for (int i = 0; i < 3; i++)
{
@@ -903,7 +914,7 @@ namespace CalamityMod.CalPlayer
if (type != -1)
{
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(24);
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(22);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
float speed = Main.rand.NextFloat(5f, 11f);
+5 -121
View File
@@ -122,7 +122,6 @@ namespace CalamityMod
public static List<int> angryBonesList;
public static List<int> hornetList;
public static List<int> mossHornetList;
public static List<int> bossMinionList;
public static List<int> minibossList;
public static List<int> pierceResistList;
@@ -1024,6 +1023,8 @@ namespace CalamityMod
NPCType<RavagerLegRight>(),
NPCType<RockPillar>(),
NPCType<RavagerHead>(),
NPCType<ProfanedGuardianDefender>(),
NPCType<ProfanedGuardianHealer>(),
NPCType<Bumblefuck2>(),
NPCType<ProvSpawnDefense>(),
NPCType<ProvSpawnHealer>(),
@@ -1587,17 +1588,7 @@ namespace CalamityMod
NPCType<SuperDummyNPC>()
};
// TODO -- override HoldItem => Player.scope = true; on these items
scopedWeaponList = new List<int>()
{
ItemType<AntiMaterielRifle>(),
ItemType<Auralis>(),
ItemType<HalleysInferno>(),
ItemType<Shroomer>(),
ItemType<Svantechnical>(),
ItemType<TyrannysEnd>()
};
// TODO -- override HoldItem => Player.accFishingLine = true; on these items, just like the scope fix...
highTestFishList = new List<int>()
{
ItemID.GoldenFishingRod,
@@ -2097,7 +2088,7 @@ namespace CalamityMod
{
ProjectileID.Arkhalis,
ProjectileID.ChargedBlasterLaser,
ProjectileID.ClingerStaff,
ProjectileID.ClingerStaff,
ProjectileID.FinalFractal,
ProjectileID.FlyingKnife,
ProjectileID.LastPrismLaser,
@@ -2148,6 +2139,7 @@ namespace CalamityMod
ProjectileType<StickyBol>(),
ProjectileType<SulphuricBlast>(),
ProjectileType<TaserHook>(),
ProjectileType<Teslabeam>(),
ProjectileType<TyphonsGreedStaff>(),
ProjectileType<UrchinBall>(),
ProjectileType<UrchinBallSpike>(),
@@ -2703,113 +2695,6 @@ namespace CalamityMod
{ NPCID.Deerclops, 44 }
};
bossMinionList = new List<int>()
{
NPCType<KingSlimeJewel>(),
NPCType<DesertNuisanceHead>(),
NPCType<DesertNuisanceBody>(),
NPCType<DesertNuisanceTail>(),
NPCID.SlimeSpiked,
NPCID.ServantofCthulhu,
NPCType<CrabShroom>(),
NPCID.EaterofWorldsHead,
NPCID.EaterofWorldsBody,
NPCID.EaterofWorldsTail,
NPCID.Creeper,
NPCType<PerforatorHeadSmall>(),
NPCType<PerforatorBodySmall>(),
NPCType<PerforatorTailSmall>(),
NPCType<PerforatorHeadMedium>(),
NPCType<PerforatorBodyMedium>(),
NPCType<PerforatorTailMedium>(),
NPCType<PerforatorHeadLarge>(),
NPCType<PerforatorBodyLarge>(),
NPCType<PerforatorTailLarge>(),
NPCType<HiveBlob>(),
NPCType<HiveBlob2>(),
NPCType<DankCreeper>(),
NPCID.SkeletronHand,
NPCType<EbonianPaladin>(),
NPCType<SplitEbonianPaladin>(),
NPCType<CrimulanPaladin>(),
NPCType<SplitCrimulanPaladin>(),
NPCType<CorruptSlimeSpawn>(),
NPCType<CorruptSlimeSpawn2>(),
NPCType<CrimsonSlimeSpawn>(),
NPCType<CrimsonSlimeSpawn2>(),
NPCID.LeechHead,
NPCID.LeechBody,
NPCID.LeechTail,
NPCID.WallofFleshEye,
NPCID.TheHungry,
NPCID.TheHungryII,
NPCID.QueenSlimeMinionBlue,
NPCID.QueenSlimeMinionPink,
NPCID.QueenSlimeMinionPurple,
NPCType<CryogenShield>(),
NPCID.PrimeCannon,
NPCID.PrimeLaser,
NPCID.PrimeSaw,
NPCID.PrimeVice,
NPCType<Brimling>(),
NPCID.Probe,
NPCID.TheDestroyer,
NPCID.TheDestroyerBody,
NPCID.TheDestroyerTail,
NPCType<AquaticScourgeHead>(),
NPCType<AquaticScourgeBody>(),
NPCType<AquaticScourgeBodyAlt>(),
NPCType<AquaticScourgeTail>(),
NPCType<Cataclysm>(),
NPCType<Catastrophe>(),
NPCType<SoulSeeker>(),
NPCID.PlanterasTentacle,
NPCType<PlanterasFreeTentacle>(),
NPCType<AnahitasIceShield>(),
NPCType<AquaticAberration>(),
NPCType<AureusSpawn>(),
NPCID.Spore,
NPCID.GolemHead,
NPCID.GolemHeadFree,
NPCID.GolemFistLeft,
NPCID.GolemFistRight,
NPCType<PlagueMine>(),
NPCType<PlagueHomingMissile>(),
NPCType<RavagerClawLeft>(),
NPCType<RavagerClawRight>(),
NPCType<RavagerLegLeft>(),
NPCType<RavagerLegRight>(),
NPCType<RavagerHead>(),
NPCID.CultistDragonHead,
NPCID.CultistDragonBody1,
NPCID.CultistDragonBody2,
NPCID.CultistDragonBody3,
NPCID.CultistDragonBody4,
NPCID.CultistDragonTail,
NPCID.AncientCultistSquidhead,
NPCID.AncientDoom,
NPCID.MoonLordLeechBlob,
NPCID.MoonLordFreeEye,
NPCID.MoonLordHand,
NPCID.MoonLordHead,
NPCType<ProfanedGuardianDefender>(),
NPCType<ProfanedGuardianHealer>(),
NPCType<Bumblefuck2>(),
NPCType<ProvSpawnOffense>(),
NPCType<ProvSpawnDefense>(),
NPCType<ProvSpawnHealer>(),
NPCType<ProfanedRocks>(),
NPCType<DarkEnergy>(),
NPCType<CosmicLantern>(),
NPCType<PolterPhantom>(),
NPCType<CosmicGuardianHead>(),
NPCType<CosmicGuardianBody>(),
NPCType<CosmicGuardianTail>(),
NPCType<BrimstoneHeart>(),
NPCType<SupremeCataclysm>(),
NPCType<SupremeCatastrophe>()
};
legOverrideList = new List<int>()
{
EquipLoader.GetEquipSlot(CalamityMod.Instance, "ProfanedSoulCrystal", EquipType.Legs),
@@ -2897,7 +2782,6 @@ namespace CalamityMod
angryBonesList = null;
hornetList = null;
mossHornetList = null;
bossMinionList = null;
minibossList = null;
pierceResistList = null;
pierceResistExceptionLeviAureusList = null;
+5 -129
View File
@@ -116,11 +116,6 @@ namespace CalamityMod
// Boss Kill Time data structure
public static SortedDictionary<int, int> bossKillTimes;
// Boss velocity scaling data structure
public static SortedDictionary<int, float> bossVelocityDamageScaleValues;
public const float velocityScaleMin = 0.5f;
public const float bitingEnemeyVelocityScale = 0.8f;
// Life steal cap
public const int lifeStealCap = 10;
@@ -136,6 +131,7 @@ namespace CalamityMod
// Please keep this in alphabetical order so it's easy to read
internal Mod ancientsAwakened = null;
internal Mod bossChecklist = null;
internal Mod coloredDamageTypes = null;
internal Mod crouchMod = null;
internal Mod dialogueTweak = null;
internal Mod fargos = null;
@@ -166,6 +162,8 @@ namespace CalamityMod
ModLoader.TryGetMod("AAMod", out ancientsAwakened);
bossChecklist = null;
ModLoader.TryGetMod("BossChecklist", out bossChecklist);
coloredDamageTypes = null;
ModLoader.TryGetMod("ColoredDamageTypes", out coloredDamageTypes);
crouchMod = null;
ModLoader.TryGetMod("CrouchMod", out crouchMod);
dialogueTweak = null;
@@ -231,7 +229,6 @@ namespace CalamityMod
VanillaArmorChangeManager.Load();
SetupVanillaDR();
SetupBossKillTimes();
SetupBossVelocityScalingValues();
SchematicManager.Load();
CustomLavaManagement.Load();
Attunement.Load();
@@ -401,6 +398,7 @@ namespace CalamityMod
ancientsAwakened = null;
bossChecklist = null;
coloredDamageTypes = null;
crouchMod = null;
dialogueTweak = null;
fargos = null;
@@ -420,8 +418,6 @@ namespace CalamityMod
DRValues = null;
bossKillTimes?.Clear();
bossKillTimes = null;
bossVelocityDamageScaleValues?.Clear();
bossVelocityDamageScaleValues = null;
BalancingChangesManager.Unload();
Attunement.Unload();
@@ -651,7 +647,7 @@ namespace CalamityMod
{ NPCID.EaterofWorldsHead, 7200 }, // 2:00 (120 seconds)
{ NPCID.EaterofWorldsBody, 7200 },
{ NPCID.EaterofWorldsTail, 7200 },
{ NPCID.BrainofCthulhu, 5400 }, // 1:30 (90 seconds, total length of fight including Creepers phase)
{ NPCID.BrainofCthulhu, 7200 }, // 2:00 (120 seconds, total length of fight including Creepers phase)
{ NPCID.Creeper, 1800 }, // 0:30 (30 seconds, length of Creepers phase)
{ NPCID.Deerclops, 5400 }, // 1:30 (90 seconds)
{ NPCID.QueenBee, 7200 }, // 2:00 (120 seconds)
@@ -736,126 +732,6 @@ namespace CalamityMod
}
#endregion
#region Boss Velocity Contact Damage Scale Values
private void SetupBossVelocityScalingValues()
{
bossVelocityDamageScaleValues = new SortedDictionary<int, float> {
{ NPCID.KingSlime, velocityScaleMin },
{ NPCID.EyeofCthulhu, velocityScaleMin }, // Increases in phase 2
{ NPCID.EaterofWorldsHead, bitingEnemeyVelocityScale },
{ NPCID.EaterofWorldsBody, velocityScaleMin },
{ NPCID.EaterofWorldsTail, velocityScaleMin },
{ NPCID.Creeper, velocityScaleMin },
{ NPCID.BrainofCthulhu, velocityScaleMin },
{ NPCID.QueenBee, velocityScaleMin },
{ NPCID.SkeletronHead, velocityScaleMin },
{ NPCID.SkeletronHand, velocityScaleMin },
{ NPCID.TheHungry, bitingEnemeyVelocityScale },
{ NPCID.TheHungryII, bitingEnemeyVelocityScale },
{ NPCID.LeechHead, bitingEnemeyVelocityScale },
{ NPCID.LeechBody, velocityScaleMin },
{ NPCID.LeechTail, velocityScaleMin },
{ NPCID.QueenSlimeBoss, velocityScaleMin },
{ NPCID.Spazmatism, velocityScaleMin }, // Increases in phase 2
{ NPCID.Retinazer, velocityScaleMin },
{ NPCID.TheDestroyer, bitingEnemeyVelocityScale },
{ NPCID.TheDestroyerBody, velocityScaleMin },
{ NPCID.TheDestroyerTail, velocityScaleMin },
{ NPCID.SkeletronPrime, velocityScaleMin },
{ NPCID.PrimeCannon, velocityScaleMin },
{ NPCID.PrimeLaser, velocityScaleMin },
{ NPCID.PrimeSaw, velocityScaleMin },
{ NPCID.PrimeVice, velocityScaleMin },
{ NPCID.Plantera, velocityScaleMin }, // Increases in phase 2
{ NPCID.PlanterasTentacle, bitingEnemeyVelocityScale },
{ ModContent.NPCType<PlanterasFreeTentacle>(), bitingEnemeyVelocityScale },
{ NPCID.HallowBoss, velocityScaleMin },
{ NPCID.Golem, velocityScaleMin },
{ NPCID.GolemFistLeft, velocityScaleMin },
{ NPCID.GolemFistRight, velocityScaleMin },
{ NPCID.GolemHead, velocityScaleMin },
{ NPCID.DukeFishron, velocityScaleMin },
{ ModContent.NPCType<DesertScourgeHead>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<DesertScourgeBody>(), velocityScaleMin },
{ ModContent.NPCType<DesertScourgeTail>(), velocityScaleMin },
{ ModContent.NPCType<DesertNuisanceHead>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<DesertNuisanceBody>(), velocityScaleMin },
{ ModContent.NPCType<DesertNuisanceTail>(), velocityScaleMin },
{ ModContent.NPCType<Crabulon>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<HiveMind>(), velocityScaleMin },
{ ModContent.NPCType<PerforatorHive>(), velocityScaleMin },
{ ModContent.NPCType<PerforatorHeadLarge>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<PerforatorBodyLarge>(), velocityScaleMin },
{ ModContent.NPCType<PerforatorTailLarge>(), velocityScaleMin },
{ ModContent.NPCType<PerforatorHeadMedium>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<PerforatorBodyMedium>(), velocityScaleMin },
{ ModContent.NPCType<PerforatorTailMedium>(), velocityScaleMin },
{ ModContent.NPCType<PerforatorHeadSmall>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<PerforatorBodySmall>(), velocityScaleMin },
{ ModContent.NPCType<PerforatorTailSmall>(), velocityScaleMin },
{ ModContent.NPCType<SlimeGodCore>(), velocityScaleMin },
{ ModContent.NPCType<EbonianPaladin>(), velocityScaleMin },
{ ModContent.NPCType<CrimulanPaladin>(), velocityScaleMin },
{ ModContent.NPCType<SplitEbonianPaladin>(), velocityScaleMin },
{ ModContent.NPCType<SplitCrimulanPaladin>(), velocityScaleMin },
{ ModContent.NPCType<CorruptSlimeSpawn>(), velocityScaleMin },
{ ModContent.NPCType<Cryogen>(), velocityScaleMin },
{ ModContent.NPCType<AquaticScourgeHead>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<AquaticScourgeBody>(), velocityScaleMin },
{ ModContent.NPCType<AquaticScourgeBodyAlt>(), velocityScaleMin },
{ ModContent.NPCType<AquaticScourgeTail>(), velocityScaleMin },
{ ModContent.NPCType<BrimstoneElemental>(), velocityScaleMin },
{ ModContent.NPCType<Cataclysm>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<Catastrophe>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<CalamitasClone>(), velocityScaleMin },
{ ModContent.NPCType<Leviathan>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<Anahita>(), velocityScaleMin },
{ ModContent.NPCType<AstrumAureus>(), velocityScaleMin },
{ ModContent.NPCType<AstrumDeusHead>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<AstrumDeusBody>(), velocityScaleMin },
{ ModContent.NPCType<AstrumDeusTail>(), velocityScaleMin },
{ ModContent.NPCType<PlaguebringerGoliath>(), velocityScaleMin },
{ ModContent.NPCType<RavagerBody>(), velocityScaleMin },
{ ModContent.NPCType<RavagerClawLeft>(), velocityScaleMin },
{ ModContent.NPCType<RavagerClawRight>(), velocityScaleMin },
{ ModContent.NPCType<RavagerLegLeft>(), velocityScaleMin },
{ ModContent.NPCType<RavagerLegRight>(), velocityScaleMin },
{ ModContent.NPCType<RockPillar>(), velocityScaleMin },
{ ModContent.NPCType<ProfanedGuardianCommander>(), velocityScaleMin },
{ ModContent.NPCType<ProfanedGuardianDefender>(), velocityScaleMin },
{ ModContent.NPCType<ProfanedGuardianHealer>(), velocityScaleMin },
{ ModContent.NPCType<ProfanedRocks>(), velocityScaleMin },
{ ModContent.NPCType<Bumblefuck>(), velocityScaleMin },
{ ModContent.NPCType<Bumblefuck2>(), velocityScaleMin },
{ ModContent.NPCType<CeaselessVoid>(), velocityScaleMin },
{ ModContent.NPCType<DarkEnergy>(), velocityScaleMin },
{ ModContent.NPCType<StormWeaverHead>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<StormWeaverBody>(), velocityScaleMin },
{ ModContent.NPCType<StormWeaverTail>(), velocityScaleMin },
{ ModContent.NPCType<Signus>(), velocityScaleMin },
{ ModContent.NPCType<CosmicLantern>(), velocityScaleMin },
{ ModContent.NPCType<Polterghast>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<PolterPhantom>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<OldDuke>(), velocityScaleMin },
{ ModContent.NPCType<DevourerofGodsHead>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<DevourerofGodsBody>(), velocityScaleMin },
{ ModContent.NPCType<DevourerofGodsTail>(), velocityScaleMin },
{ ModContent.NPCType<CosmicGuardianHead>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<CosmicGuardianBody>(), velocityScaleMin },
{ ModContent.NPCType<CosmicGuardianTail>(), velocityScaleMin },
{ ModContent.NPCType<Yharon>(), velocityScaleMin },
{ ModContent.NPCType<SupremeCalamitas>(), velocityScaleMin },
{ ModContent.NPCType<Apollo>(), velocityScaleMin }, // Increases in phase 2
{ ModContent.NPCType<Artemis>(), velocityScaleMin },
{ ModContent.NPCType<ThanatosHead>(), bitingEnemeyVelocityScale },
{ ModContent.NPCType<ThanatosBody1>(), velocityScaleMin },
{ ModContent.NPCType<ThanatosBody2>(), velocityScaleMin },
{ ModContent.NPCType<ThanatosTail>(), velocityScaleMin },
{ ModContent.NPCType<PrimordialWyrmHead>(), bitingEnemeyVelocityScale }
};
}
#endregion
#region Music
// This function returns an available Calamity Music Mod track, or null if the Calamity Music Mod is not available.
+15 -4
View File
@@ -108,10 +108,20 @@ namespace CalamityMod
AndroombaFriendly.SwapSolution(index, solType);
break;
case CalamityModMessageType.SyncAndroombaAI:
int idx = reader.ReadInt32();
int phase = reader.ReadInt32();
if (Main.netMode != NetmodeID.MultiplayerClient)
AndroombaFriendly.ChangeAI(idx, phase);
{
int idx = reader.ReadInt32();
int phase = reader.ReadInt32();
if (Main.netMode != NetmodeID.MultiplayerClient)
AndroombaFriendly.ChangeAI(idx, phase);
}
break;
case CalamityModMessageType.SyncSlabCrabAI:
{
int idx = reader.ReadInt32();
int phase = reader.ReadInt32();
if (Main.netMode != NetmodeID.MultiplayerClient)
AndroombaFriendly.ChangeAI(idx, phase);
}
break;
case CalamityModMessageType.ServersideSpawnOldDuke:
byte playerIndex2 = reader.ReadByte();
@@ -344,6 +354,7 @@ namespace CalamityMod
DeleteAllSuperDummies,
SyncAndroombaSolution,
SyncAndroombaAI,
SyncSlabCrabAI,
ServersideSpawnOldDuke,
ArmoredDiggerCountdownSync, // TODO -- remove this mechanic entirely
ProvidenceDyeConditionSync, // TODO -- this packetstorms if you hit Provi with spam weapons. It should ONLY send a packet if the status changes.
+13 -9
View File
@@ -323,7 +323,7 @@ namespace CalamityMod
{ NPCID.VileSpitEaterOfWorlds, new int[] { -1, 64, 64, 64, 96 } },
{ NPCID.BrainofCthulhu, new int[] { 30, 54, 81, 99, 135 } },
{ NPCID.Creeper, new int[] { 20, 36, 54, 72, 90 } },
{ NPCID.Creeper, new int[] { 20, 36, 66, 80, 108 } },
{ ModContent.NPCType<HiveMind>(), new int[] { 35, 63, 81, 90, 135 } },
{ ModContent.NPCType<DankCreeper>(), new int[] { 25, 50, 62, 68, 90 } },
@@ -340,8 +340,8 @@ namespace CalamityMod
{ ModContent.NPCType<PerforatorTailSmall>(), new int[] { 10, 20, 26, 30, 45 } },
{ NPCID.QueenBee, new int[] { 30, 54, 81, 99, 135 } },
{ NPCID.Bee, new int[] { 20, 24, 30, 36, 54 } },
{ NPCID.BeeSmall, new int[] { 15, 18, 24, 30, 45 } },
{ NPCID.Bee, new int[] { 20, 24, 48, 60, 72 } },
{ NPCID.BeeSmall, new int[] { 15, 18, 30, 44, 54 } },
{ NPCID.SkeletronHead, new int[] {
35, // Same for all phases
@@ -349,7 +349,7 @@ namespace CalamityMod
88, // 114 while spinning
99, // 128 while spinning
132 } }, // 171 while spinning
{ NPCID.SkeletronHand, new int[] { 20, 44, 55, 66, 99 } },
{ NPCID.SkeletronHand, new int[] { 20, 44, 77, 88, 110 } },
{ NPCID.ChaosBall, new int[] { -1, -1, -1, 40, 60 } },
{ NPCID.Deerclops, new int[] { 20, 40, 50, 60, 80 } },
@@ -552,7 +552,7 @@ namespace CalamityMod
EnemyStats.ProjectileDamageValues = new SortedDictionary<Tuple<int, int>, int[]>
{
{ new Tuple<int, int>(ModContent.NPCType<KingSlimeJewel>(), ModContent.ProjectileType<JewelProjectile>()), new int[] { 22, 36, 44, 48, 66 } },
{ new Tuple<int, int>(ModContent.NPCType<KingSlimeJewel>(), ModContent.ProjectileType<JewelProjectile>()), new int[] { 0, 0, 44, 48, 66 } },
{ new Tuple<int, int>(ModContent.NPCType<DesertScourgeHead>(), ModContent.ProjectileType<SandBlast>()), new int[] { 26, 44, 60, 68, 90 } },
{ new Tuple<int, int>(ModContent.NPCType<DesertScourgeHead>(), ModContent.ProjectileType<GreatSandBlast>()), new int[] { 26, 44, 60, 68, 90 } },
@@ -562,8 +562,12 @@ namespace CalamityMod
{ new Tuple<int, int>(ModContent.NPCType<Crabulon>(), ModContent.ProjectileType<MushBomb>()), new int[] { 32, 48, 60, 68, 90 } },
{ new Tuple<int, int>(ModContent.NPCType<Crabulon>(), ModContent.ProjectileType<MushBombFall>()), new int[] { 32, 48, 60, 68, 90 } },
{ new Tuple<int, int>(NPCID.EaterofWorldsHead, ProjectileID.CursedFlameHostile), new int[] { 32, 48, 60, 68, 90 } },
{ new Tuple<int, int>(NPCID.EaterofWorldsHead, ModContent.ProjectileType<ShadowflameFireball>()), new int[] { 22, 36, 44, 48, 66 } },
{ new Tuple<int, int>(NPCID.EaterofWorldsHead, ProjectileID.CursedFlameHostile), new int[] { 0, 0, 60, 68, 90 } },
{ new Tuple<int, int>(NPCID.EaterofWorldsHead, ModContent.ProjectileType<ShadowflameFireball>()), new int[] { 0, 0, 0, 48, 66 } },
{ new Tuple<int, int>(NPCID.BrainofCthulhu, ProjectileID.BloodNautilusShot), new int[] { 0, 0, 68, 76, 102 } },
{ new Tuple<int, int>(NPCID.BrainofCthulhu, ProjectileID.BloodShot), new int[] { 0, 0, 60, 68, 90 } },
{ new Tuple<int, int>(NPCID.Creeper, ProjectileID.BloodShot), new int[] { 0, 0, 60, 68, 90 } },
{ new Tuple<int, int>(ModContent.NPCType<HiveMind>(), ModContent.ProjectileType<ShadeNimbusHostile>()), new int[] { 36, 56, 68, 76, 102 } },
{ new Tuple<int, int>(ModContent.NPCType<DankCreeper>(), ModContent.ProjectileType<ShadeNimbusHostile>()), new int[] { 36, 56, 68, 76, 102 } },
@@ -602,8 +606,8 @@ namespace CalamityMod
68,
76,
102 } }, // 66 to 90, depending on life
{ new Tuple<int, int>(NPCID.WallofFleshEye, ProjectileID.DeathLaser), new int[] { 40, 72, 88, 96, 132 } },
{ new Tuple<int, int>(NPCID.WallofFlesh, ProjectileID.DemonSickle), new int[] { 52, 92, 112, 124, 168 } },
{ new Tuple<int, int>(NPCID.WallofFleshEye, ProjectileID.DeathLaser), new int[] { 0, 0, 88, 96, 132 } },
{ new Tuple<int, int>(NPCID.WallofFlesh, ProjectileID.DemonSickle), new int[] { 0, 0, 112, 124, 168 } },
{ new Tuple<int, int>(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeGelAttack), new int[] { 60, 120, 136, 152, 210 } },
{ new Tuple<int, int>(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeSmash), new int[] { 80, 160, 188, 200, 270 } },
+9
View File
@@ -192,6 +192,10 @@ namespace CalamityMod.Effects
internal static Effect DeerclopsShadowShader;
#endregion
#region YuH's Shaders
internal static Effect TeslaTrailShader;
#endregion
// Shorthand to register a loaded shader in Terraria's graphics engine
// All shaders registered this way are accessible under GameShaders.Misc
// They will use the prefix described above
@@ -406,6 +410,11 @@ namespace CalamityMod.Effects
RegisterMiscShader(DeerclopsShadowShader, "ShadowPass", "DeerclopsShadowShader");
#endregion
#region Loading YuH's Shaders
TeslaTrailShader = LoadShader("TeslaTrail");
RegisterMiscShader(TeslaTrailShader, "TrailPass", "TeslaTrail");
#endregion
}
}
}
+56
View File
@@ -0,0 +1,56 @@
sampler uImage0 : register(s0);
sampler uImage1 : register(s1);
float3 uColor;
float3 uSecondaryColor;
float uOpacity;
float uSaturation;
float uRotation;
float uTime;
float4 uSourceRect;
float2 uWorldPosition;
float uDirection;
float3 uLightSource;
float2 uImageSize0;
float2 uImageSize1;
matrix uWorldViewProjection;
float4 uShaderSpecificData;
struct VertexShaderInput
{
float4 Position : POSITION0;
float4 Color : COLOR0;
float2 TextureCoordinates : TEXCOORD0;
};
struct VertexShaderOutput
{
float4 Position : SV_POSITION;
float4 Color : COLOR0;
float2 TextureCoordinates : TEXCOORD0;
};
VertexShaderOutput VertexShaderFunction(in VertexShaderInput input)
{
VertexShaderOutput output = (VertexShaderOutput)0;
float4 pos = mul(input.Position, uWorldViewProjection);
output.Position = pos;
output.Color = input.Color;
output.TextureCoordinates = input.TextureCoordinates;
return output;
}
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
{
return input.Color;
}
technique Technique1
{
pass TrailPass
{
VertexShader = compile vs_2_0 VertexShaderFunction();
PixelShader = compile ps_2_0 PixelShaderFunction();
}
}
Binary file not shown.
+4
View File
@@ -8,6 +8,10 @@ namespace CalamityMod.Items.Accessories
public class AnechoicPlating : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void SetStaticDefaults()
{
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<DepthCharm>();
}
public override void SetDefaults()
{
Item.width = 26;
+2 -1
View File
@@ -26,7 +26,8 @@ namespace CalamityMod.Items.Accessories
player.npcTypeNoAggro[NPCID.PinkJellyfish] = true;
player.npcTypeNoAggro[NPCID.Crab] = true;
player.npcTypeNoAggro[NPCID.Squid] = true;
player.gills = true;
if (player.IsUnderwater())
player.gills = true;
}
}
}
+4
View File
@@ -9,6 +9,10 @@ namespace CalamityMod.Items.Accessories
public class DepthCharm : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void SetStaticDefaults()
{
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<IronBoots>();
}
public override void SetDefaults()
{
Item.width = 26;
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories
player.buffImmune[ModContent.BuffType<AstralInfectionDebuff>()] = true;
modPlayer.hideOfDeus = true;
if (modPlayer.hideOfDeusMeleeBoostTimer > 0)
player.GetDamage<TrueMeleeDamageClass>() += 0.5f;
player.GetDamage<TrueMeleeDamageClass>() += 0.3f;
player.buffImmune[BuffID.CursedInferno] = true;
player.buffImmune[BuffID.OnFire] = true;
player.buffImmune[BuffID.Frostburn] = true;
+4
View File
@@ -9,6 +9,10 @@ namespace CalamityMod.Items.Accessories
public class IronBoots : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void SetStaticDefaults()
{
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<AnechoicPlating>();
}
public override void SetDefaults()
{
Item.width = 26;
+2
View File
@@ -7,6 +7,8 @@ namespace CalamityMod.Items.Accessories
{
public class SandCloak : ModItem, ILocalizedModType
{
public static float KnockbackStrength = 0.3f;
public new string LocalizationCategory => "Items.Accessories";
public override void SetDefaults()
{
+2 -1
View File
@@ -42,7 +42,8 @@ namespace CalamityMod.Items.Armor.Sulphurous
{
player.GetDamage<ThrowingDamageClass>() += 0.04f;
player.GetCritChance<ThrowingDamageClass>() += 2;
player.gills = true;
if (player.IsUnderwater())
player.gills = true;
}
public override void AddRecipes()
+8 -7
View File
@@ -437,20 +437,20 @@ namespace CalamityMod.Items
modPlayer.canFireAtaxiaRogueProjectile = false;
int flareID = ModContent.ProjectileType<HydrothermicFlareRogue>();
// Ataxia Rogue Flares: 8 x 50%, soft cap starts at 120 base damage
int flareDamage = CalamityUtils.DamageSoftCap(damage * 0.5, 120);
// Ataxia Rogue Flares: 6 x 50%, soft cap starts at 90 base damage
int flareDamage = CalamityUtils.DamageSoftCap(damage * 0.5, 90);
flareDamage = player.ApplyArmorAccDamageBonusesTo(flareDamage);
if (player.whoAmI == Main.myPlayer)
{
SoundEngine.PlaySound(SoundID.Item20, player.Center);
float spread = 45f * 0.0174f;
float spread = 60f * 0.0174f;
double startAngle = Math.Atan2(player.velocity.X, player.velocity.Y) - spread / 2;
double deltaAngle = spread / 8f;
double deltaAngle = spread / 6f;
double offsetAngle;
for (int i = 0; i < 4; i++)
for (int i = 0; i < 3; i++)
{
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 30f * i;
Projectile.NewProjectile(source, player.Center.X, player.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), flareID, flareDamage, 1f, player.whoAmI);
Projectile.NewProjectile(source, player.Center.X, player.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), flareID, flareDamage, 1f, player.whoAmI);
}
@@ -1256,7 +1256,8 @@ namespace CalamityMod.Items
}
else if (item.type == ItemID.FinWings) // Boosted water abilities, faster fall in water
{
player.gills = true;
if (player.IsUnderwater())
player.gills = true;
player.ignoreWater = true;
player.noFallDmg = true;
if (!player.mount.Active)
+35 -29
View File
@@ -284,22 +284,11 @@ namespace CalamityMod.Items
if (item.type == ItemID.AnkhShield)
EditTooltipByNum(1, (line) => line.Text += ", including Mighty Wind");
// Water removing items cannot be used in the Abyss
string noAbyssLine = "\nCannot be used in the Abyss";
if (item.type == ItemID.SuperAbsorbantSponge)
EditTooltipByNum(0, (line) => line.Text += noAbyssLine);
if (item.type == ItemID.EmptyBucket)
EditTooltipByName("Defense", (line) => line.Text += noAbyssLine);
// If Early Hardmode Rework is enabled: Remind users that ores will NOT spawn when an altar is smashed.
if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && (item.type == ItemID.Pwnhammer || item.type == ItemID.Hammush))
EditTooltipByNum(0, (line) => line.Text += "\nDemon Altars now drop Souls of Night instead of generating ores when destroyed" +
"\nHardmode ores now generate after defeating Mechanical Bosses for the first time");
// Bottled Honey gives the Honey buff
if (item.type == ItemID.BottledHoney)
EditTooltipByName("HealLife", (line) => line.Text += "\nGrants the Honey buff for 2 minutes");
// Warmth Potion provides debuff immunities
if (item.type == ItemID.WarmthPotion)
{
@@ -448,16 +437,22 @@ namespace CalamityMod.Items
EditTooltipByName("Knockback", (line) => line.Text += "\nIncreases how frequently the Orichalcum set bonus triggers on hit");
// Adamantite
if (item.type == ItemID.AdamantiteSword || item.type == ItemID.AdamantiteGlaive)
if (item.type == ItemID.AdamantiteSword)
EditTooltipByName("Material", (line) => line.Text += "\nSlows enemies on hit");
if (item.type == ItemID.AdamantiteGlaive)
EditTooltipByName("Knockback", (line) => line.Text += "\nSlows enemies on hit");
// Titanium
if (item.type == ItemID.TitaniumSword || item.type == ItemID.TitaniumTrident)
if (item.type == ItemID.TitaniumSword)
EditTooltipByName("Material", (line) => line.Text += "\nDeals increased damage to enemies with high knockback resistance");
if (item.type == ItemID.TitaniumTrident)
EditTooltipByName("Knockback", (line) => line.Text += "\nDeals increased damage to enemies with high knockback resistance");
// Hallowed (and True Excalibur)
if (item.type == ItemID.Excalibur || item.type == ItemID.Gungnir || item.type == ItemID.TrueExcalibur)
EditTooltipByName("Knockback", (line) => line.Text += "\nDeals double damage to enemies above 75% life");
EditTooltipByName("Material", (line) => line.Text += "\nDeals double damage to enemies above 75% life");
#endregion
// Other melee weapon tooltips
@@ -466,13 +461,27 @@ namespace CalamityMod.Items
if (item.type == ItemID.CandyCaneSword || item.type == ItemID.FruitcakeChakram)
EditTooltipByName("Knockback", (line) => line.Text += "\nHeals you on hit");
// Stylish Scissors, all Phaseblades, and all Phasesabers
if (item.type == ItemID.StylistKilLaKillScissorsIWish || (item.type >= ItemID.BluePhaseblade && item.type <= ItemID.YellowPhaseblade) || (item.type >= ItemID.BluePhasesaber && item.type <= ItemID.YellowPhasesaber) || item.type == ItemID.OrangePhaseblade || item.type == ItemID.OrangePhasesaber)
// Stylish Scissors, all Phaseblades, and all Phasesabers ignore 100% of defense
if (item.type == ItemID.StylistKilLaKillScissorsIWish || (item.type >= ItemID.BluePhasesaber && item.type <= ItemID.YellowPhasesaber) || item.type == ItemID.OrangePhasesaber)
EditTooltipByName("Knockback", (line) => line.Text += "\nIgnores 100% of enemy defense");
if (item.type == ItemID.AntlionClaw || item.type == ItemID.BoneSword || item.type == ItemID.BreakerBlade)
// Phaseblades are done separately to ensure it appears under the Material line
if (item.type >= ItemID.BluePhaseblade && item.type <= ItemID.YellowPhaseblade || item.type == ItemID.OrangePhaseblade)
EditTooltipByName("Material", (line) => line.Text += "\nIgnores 100% of enemy defense");
// Bone Sword, Breaker Blade, and Mandible Blade ignore 50% of defense
if (item.type == ItemID.BoneSword || item.type == ItemID.BreakerBlade)
EditTooltipByName("Knockback", (line) => line.Text += "\nIgnores 50% of enemy defense");
// Mandible Blade is done separately to ensure it appears under the Material line
if (item.type == ItemID.AntlionClaw)
EditTooltipByName("Material", (line) => line.Text += "\nIgnores 50% of enemy defense");
// Muramasa inflicts Nightwither
if (item.type == ItemID.Muramasa)
EditTooltipByName("Material", (line) => line.Text += "\nInflicts Nightwither on hit");
// Death Sickle inflict Whispering Death
if (item.type == ItemID.DeathSickle)
EditTooltipByNum(0, (line) => line.Text += "\nInflicts Whispering Death on hit");
#endregion
@@ -573,7 +582,7 @@ namespace CalamityMod.Items
if (item.type == ItemID.HellfireTreads)
{
EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("fire blocks", "the Burning and On Fire! debuffs"));
EditTooltipByNum(3, (line) => line.Text += "\nMultiplies all fire-based debuff damage by 1.5\n" +
EditTooltipByNum(2, (line) => line.Text += "\nMultiplies all fire-based debuff damage by 1.5\n" +
"All attacks inflict Hellfire");
}
@@ -583,10 +592,6 @@ namespace CalamityMod.Items
"Nearby fairies grant +2 HP/s life regen, 10 defense and 10% movement speed\n" +
"Fairies are immune to damage and will no longer flee");
// Armor Crunch immunity pre-Golem.
if (item.type == ItemID.ArmorPolish || item.type == ItemID.ArmorBracing)
EditTooltipByNum(0, (line) => line.Text += " and Armor Crunch");
// Reduced Nightwither and Holy Flames damage, and melee speed removal.
if (item.type == ItemID.MoonStone)
{
@@ -691,10 +696,9 @@ namespace CalamityMod.Items
if (item.type == ItemID.MechanicalGlove)
{
string extraLine = "\n12% increased melee speed, does not stack with downgrades";
EditTooltipByNum(1, (line) => line.Text = "12% increased melee damage" + extraLine);
EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("12% increased melee speed", "12% increased melee speed, does not stack with downgrades"));
EditTooltipByNum(0, (line) => line.Text += "\n10% increased true melee damage");
string extraLine = "\n10% increased true melee damage";
string extraLine2 = "\n12% increased melee speed, does not stack with downgrades" + extraLine;
EditTooltipByNum(1, (line) => line.Text = "12% increased melee damage" + extraLine2);
}
if (item.type == ItemID.FireGauntlet)
@@ -920,9 +924,11 @@ namespace CalamityMod.Items
if (item.type == ItemID.Picksaw)
EditTooltipByNum(0, (line) => line.Text += "\nCan mine Scoria Ore located in the Abyss");
if (item.type == ItemID.SolarFlarePickaxe || item.type == ItemID.VortexPickaxe || item.type == ItemID.NebulaPickaxe || item.type == ItemID.StardustPickaxe
|| item.type == ItemID.SolarFlareDrill || item.type == ItemID.VortexDrill || item.type == ItemID.NebulaDrill || item.type == ItemID.StardustDrill)
EditTooltipByName("Knockback", (line) => line.Text += "\nCan mine Uelibloom Ore");
if (item.type == ItemID.SolarFlarePickaxe || item.type == ItemID.VortexPickaxe || item.type == ItemID.NebulaPickaxe || item.type == ItemID.StardustPickaxe)
EditTooltipByName("Material", (line) => line.Text += "\nCan mine Uelibloom Ore");
if (item.type == ItemID.SolarFlareDrill || item.type == ItemID.VortexDrill || item.type == ItemID.NebulaDrill || item.type == ItemID.StardustDrill)
EditTooltipByName("TileBoost", (line) => line.Text += "\nCan mine Uelibloom Ore");
#endregion
// Rebalances and information about vanilla set bonuses
+10 -6
View File
@@ -60,6 +60,7 @@ namespace CalamityMod.Items
{ ItemID.CandyCornRifle, Do(PointBlank, DamageExact(66)) },
{ ItemID.Cascade, Do(AutoReuse, DamageExact(30)) },
{ ItemID.ChainGuillotines, Do(DamageExact(100)) },
{ ItemID.ChainGun, Do(PointBlank, DamageExact(35)) },
{ ItemID.ChainKnife, Do(AutoReuse, DamageRatio(1.34f)) }, // Uses ratios due to remix seed
// Charged Blaster Cannon is now an earlier Last Prism-like, so it will probably need careful balance attention.
// { ItemID.ChargedBlasterCannon, Do(DamageRatio(1.33f)) },
@@ -77,7 +78,8 @@ namespace CalamityMod.Items
{ ItemID.CrimsonYoyo, Do(AutoReuse, DamageExact(20)) }, // Artery
{ ItemID.CrystalDart, Do(DamageExact(20)) },
{ ItemID.CrystalSerpent, Do(DamageExact(45)) },
{ ItemID.CrystalStorm, Do(DamageExact(40))},
{ ItemID.CrystalStorm, Do(DamageExact(40)) },
{ ItemID.CursedArrow, Do(DamageExact(15)) },
{ ItemID.CursedDart, Do(DamageExact(25)) },
{ ItemID.Cutlass, Do(UseRatio(0.9f), DamageRatio(1.85f)) },
{ ItemID.DaedalusStormbow, Do(DamageExact(30)) },
@@ -125,13 +127,14 @@ namespace CalamityMod.Items
{ ItemID.HallowedRepeater, Do(PointBlank, UseExact(12)) },
{ ItemID.Handgun, Do(PointBlank, UseExact(22), DamageExact(36)) },
{ ItemID.HellwingBow, Do(PointBlank, DamageExact(16)) },
{ ItemID.HighVelocityBullet, Do(DamageExact(15)) },
{ ItemID.HighVelocityBullet, Do(DamageExact(13)) },
{ ItemID.HiveFive, Do(AutoReuse, DamageExact(26)) },
{ ItemID.HornetStaff, Do(AutoReuse, DamageExact(13), UseExact(30)) },
{ ItemID.IceBlade, Do(UseMeleeSpeed) },
{ ItemID.IceBoomerang, Do(UseExact(25), ShootSpeedExact(9)) },
{ ItemID.IceRod, Do(UseExact(6), DamageExact(30), ShootSpeedExact(20)) },
{ ItemID.IceSickle, Do(AutoReuse, UseMeleeSpeed, DamageExact(75), ShootSpeedExact(20f)) },
{ ItemID.IchorArrow, Do(DamageExact(11)) },
{ ItemID.ImpStaff, Do(AutoReuse, UseExact(30), DamageExact(25)) },
{ ItemID.InfernoFork, Do(DamageRatio(1.2f)) },
{ ItemID.InfluxWaver, Do(UseMeleeSpeed, DamageExact(80), UseExact(25)) },
@@ -153,12 +156,14 @@ namespace CalamityMod.Items
{ ItemID.MedusaHead, Do(ManaExact(6), DamageRatio(1.2f)) },
{ ItemID.Meowmere, Do(UseMeleeSpeed, DamageExact(240)/*, DamageRatio(1.33f) */) },
{ ItemID.MeteorStaff, Do(DamageExact(58), ManaExact(7), ShootSpeedExact(13f)) },
{ ItemID.MiniNukeI, Do(DamageExact(90)) },
{ ItemID.MiniNukeII, Do(DamageExact(90)) },
{ ItemID.Minishark, Do(PointBlank, DamageExact(4)) },
{ ItemID.MoltenFury, Do(PointBlank, UseExact(29), AutoReuse) },
{ ItemID.MonkStaffT1, Do(TrueMeleeNoSpeed, DamageExact(83)) }, // Sleepy Octopod
{ ItemID.MonkStaffT2, Do(AutoReuse, TrueMelee, DamageRatio(2f)) }, // Ghastly Glaive
{ ItemID.MonkStaffT3, Do(DamageExact(225)) }, // Sky Dragon's Fury
{ ItemID.Muramasa, Do(CritDelta(+20)) },
{ ItemID.Muramasa, Do(CritDelta(+10)) },
{ ItemID.MushroomSpear, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(100)) },
{ ItemID.Musket, Do(PointBlank, DamageExact(22)) },
{ ItemID.MythrilHalberd, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(95), ShootSpeedRatio(1.25f)) },
@@ -202,8 +207,6 @@ namespace CalamityMod.Items
{ ItemID.RedPhasesaber, Do(ScaleRatio(1.5f), DamageExact(60)) },
{ ItemID.RedRyder, Do(PointBlank, DamageExact(24)) },
{ ItemID.RedsYoyo, Do(AutoReuse, DamageExact(48)) }, // Red's throw and valkyrie's yoyo are the same weapon
{ ItemID.RocketIII, Do(DamageRatio(0.75f)) },
{ ItemID.RocketIV, Do(DamageRatio(0.75f)) },
{ ItemID.Sandgun, Do(PointBlank, DamageExact(22), UseExact(20)) },
{ ItemID.SapphireStaff, Do(DamageExact(25)) },
{ ItemID.SDMG, Do(PointBlank, DamageExact(80)) },
@@ -245,6 +248,7 @@ namespace CalamityMod.Items
{ ItemID.TheRottedFork, Do(AutoReuse, TrueMelee, DamageExact(20)) },
{ ItemID.TheUndertaker, Do(PointBlank, AutoReuse, DamageExact(15)) },
{ ItemID.ThunderSpear, Do(AutoReuse, UseMeleeSpeed) }, // Storm Spear
{ ItemID.ThunderStaff, Do(DamageExact(18)) }, //Thunder Zapper
{ ItemID.TitaniumRepeater, Do(PointBlank, DamageExact(52)) },
{ ItemID.TitaniumSword, Do(UseTurn, ScaleRatio(1.45f), DamageExact(77)) },
{ ItemID.TitaniumTrident, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(72), ShootSpeedRatio(1.25f)) },
@@ -255,6 +259,7 @@ namespace CalamityMod.Items
{ ItemID.TrueExcalibur, Do(TrueMelee, DamageExact(107)) },
{ ItemID.TrueNightsEdge, Do(DamageExact(105), ScaleRatio(1.2f)) },
{ ItemID.Tsunami, Do(PointBlank, DamageExact(49)) },
{ ItemID.TungstenBullet, Do(DamageExact(8)) },
{ ItemID.TungstenShortsword, Do(AutoReuse, TrueMelee, DamageExact(15)) },
{ ItemID.UnholyArrow, Do(DamageExact(11)) },
{ ItemID.UnholyTrident, Do(ManaRatio(0.78f), DamageRatio(0.91f)) }, // Uses ratios due to remix seed
@@ -430,7 +435,6 @@ namespace CalamityMod.Items
#region CATEGORY 5: Point Blank support
{ ItemID.Blowpipe, pointBlank },
{ ItemID.BorealWoodBow, pointBlank },
{ ItemID.ChainGun, pointBlank },
{ ItemID.ChlorophyteShotbow, pointBlank },
{ ItemID.CopperBow, pointBlank },
{ ItemID.DartPistol, pointBlank },
@@ -24,6 +24,7 @@ namespace CalamityMod.Items.Fishing.AstralCatches
Item.ResearchUnlockCount = 5;
ItemID.Sets.IsFishingCrate[Type] = true;
ItemID.Sets.IsFishingCrateHardmode[Type] = true;
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<MonolithCrate>();
}
public override void SetDefaults()
@@ -0,0 +1,65 @@
using CalamityMod.Items.Critters;
using CalamityMod.Tiles.Astral;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Fishing.AstralCatches
{
public class MonolithCrate : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Fishing";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
ItemID.Sets.IsFishingCrate[Type] = true;
}
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.maxStack = 9999;
Item.consumable = true;
Item.rare = ItemRarityID.Green;
Item.value = Item.sellPrice(gold: 1);
Item.createTile = ModContent.TileType<MonolithCrateTile>();
Item.useTurn = true;
Item.autoReuse = true;
Item.useAnimation = 15;
Item.useTime = 10;
Item.useStyle = ItemUseStyleID.Swing;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
itemGroup = ContentSamples.CreativeHelper.ItemGroup.Crates;
}
public override bool CanRightClick() => true;
public override void ModifyItemLoot(ItemLoot itemLoot)
{
// Materials
itemLoot.Add(ItemID.FallenStar, 1, 5, 10);
itemLoot.Add(ItemID.Meteorite, 5, 10, 20);
itemLoot.Add(ItemID.MeteoriteBar, 10, 1, 3);
// Pet
itemLoot.Add(ModContent.ItemType<AstrophageItem>(), 10);
// Bait
itemLoot.Add(ModContent.ItemType<TwinklerItem>(), 5, 1, 3);
itemLoot.Add(ItemID.EnchantedNightcrawler, 5, 1, 3);
itemLoot.Add(ModContent.ItemType<ArcturusAstroidean>(), 5, 1, 3);
itemLoot.Add(ItemID.Firefly, 3, 1, 3);
// Potions
itemLoot.AddCratePotionRules(false);
// Money
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

@@ -14,6 +14,8 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
{
Item.ResearchUnlockCount = 5;
ItemID.Sets.IsFishingCrate[Type] = true;
ItemID.Sets.IsFishingCrateHardmode[Type] = true;
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<SlagCrate>();
}
public override void SetDefaults()
@@ -0,0 +1,64 @@
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Crags;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
{
public class SlagCrate : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Fishing";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
ItemID.Sets.IsFishingCrate[Type] = true;
}
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.maxStack = 9999;
Item.consumable = true;
Item.rare = ItemRarityID.Green;
Item.value = Item.sellPrice(gold: 1);
Item.createTile = ModContent.TileType<SlagCrateTile>();
Item.useTurn = true;
Item.autoReuse = true;
Item.useAnimation = 15;
Item.useTime = 10;
Item.useStyle = ItemUseStyleID.Swing;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
itemGroup = ContentSamples.CreativeHelper.ItemGroup.Crates;
}
public override bool CanRightClick() => true;
public override void ModifyItemLoot(ItemLoot itemLoot)
{
// Materials
itemLoot.Add(ItemID.Obsidian, 1, 2, 5);
itemLoot.Add(ItemID.Hellstone, 4, 2, 5);
itemLoot.Add(ItemID.HellstoneBar, 10, 1, 3);
itemLoot.Add(ModContent.ItemType<DemonicBoneAsh>(), 1, 1, 4);
// Weapons (none)
// Bait
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
// Potions
itemLoot.Add(ItemID.InfernoPotion, 10, 1, 3);
itemLoot.AddCratePotionRules(false);
// Money
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

@@ -0,0 +1,122 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Pets;
using CalamityMod.Items.Placeables;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Tools.ClimateChange;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.Items.Placeables.Ores;
using CalamityMod.Tiles.Abyss;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.GameContent.ItemDropRules;
namespace CalamityMod.Items.Fishing.SulphurCatches
{
public class HydrothermalCrate : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Fishing";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
ItemID.Sets.IsFishingCrate[Type] = true;
ItemID.Sets.IsFishingCrateHardmode[Type] = true;
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<SulphurousCrate>();
}
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.maxStack = 9999;
Item.consumable = true;
Item.rare = ItemRarityID.Green;
Item.value = Item.sellPrice(gold: 1);
Item.createTile = ModContent.TileType<HydrothermalCrateTile>();
Item.useTurn = true;
Item.autoReuse = true;
Item.useAnimation = 15;
Item.useTime = 10;
Item.useStyle = ItemUseStyleID.Swing;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
itemGroup = ContentSamples.CreativeHelper.ItemGroup.Crates;
}
public override bool CanRightClick() => true;
public override void ModifyItemLoot(ItemLoot itemLoot)
{
// The contents of this crate depend massively on progression, so it uses a large number of LeadingConditionRules.
var tier1AbyssAvailable = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedSlimeGod || Main.hardMode);
var tier2AbyssAvailable = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedCalamitasClone);
var scoriaAvailable = itemLoot.DefineConditionalDropSet(() => NPC.downedGolemBoss);
var tier1AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedEoCAcidRain);
var tier2AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAquaticScourgeAcidRain);
var tier3AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedPolterghast && DownedBossSystem.downedBoomerDuke);
// Materials
itemLoot.Add(ModContent.ItemType<Items.Placeables.SulphurousSand>(), 1, 5, 10);
itemLoot.Add(ModContent.ItemType<Items.Placeables.SulphurousSandstone>(), 1, 5, 10);
itemLoot.Add(ModContent.ItemType<Items.Placeables.HardenedSulphurousSandstone>(), 1, 5, 10);
itemLoot.Add(ModContent.ItemType<Acidwood>(), 1, 5, 10);
tier1AcidRain.Add(ModContent.ItemType<SulphuricScale>(), 10, 1, 3);
tier2AcidRain.Add(ModContent.ItemType<CorrodedFossil>(), 10, 1, 3);
tier2AbyssAvailable.Add(ModContent.ItemType<DepthCells>(), 5, 2, 5);
tier2AbyssAvailable.Add(ModContent.ItemType<Lumenyl>(), 5, 2, 5);
tier2AbyssAvailable.Add(ModContent.ItemType<Items.Placeables.PlantyMush>(), 5, 2, 5);
scoriaAvailable.Add(ModContent.ItemType<ScoriaOre>(), 5, 16, 28);
scoriaAvailable.Add(ModContent.ItemType<ScoriaBar>(), new Fraction(15, 100), 4, 7);
tier3AcidRain.Add(ModContent.ItemType<ReaperTooth>(), 10, 1, 5);
// Pre-HM Abyss Weapons
tier1AbyssAvailable.Add(new OneFromOptionsDropRule(10, 1,
ModContent.ItemType<BallOFugu>(),
ModContent.ItemType<Archerfish>(),
ModContent.ItemType<BlackAnurian>(),
ModContent.ItemType<HerringStaff>(),
ModContent.ItemType<Lionfish>()
));
// Post-AS Acid Rain Weapons (and Nuclear Rod)
tier2AcidRain.Add(new OneFromOptionsDropRule(10, 1,
ModContent.ItemType<SulphurousGrabber>(),
ModContent.ItemType<FlakToxicannon>(),
ModContent.ItemType<BelchingSaxophone>(),
ModContent.ItemType<SlitheringEels>(),
ModContent.ItemType<SkyfinBombers>(),
ModContent.ItemType<SpentFuelContainer>(),
ModContent.ItemType<NuclearFuelRod>()
));
// Pre-HM Abyss Equipment (and Torrential Tear)
tier1AbyssAvailable.Add(new OneFromOptionsDropRule(4, 1,
ModContent.ItemType<AnechoicPlating>(),
ModContent.ItemType<DepthCharm>(),
ModContent.ItemType<IronBoots>(),
ModContent.ItemType<StrangeOrb>(),
ModContent.ItemType<TorrentialTear>()
));
// Bait
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
// Potions
itemLoot.Add(ModContent.ItemType<AnechoicCoating>(), 10, 1, 3);
itemLoot.AddCratePotionRules();
// Money
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 811 B

@@ -9,7 +9,6 @@ using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.Items.Placeables.Ores;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -53,13 +52,8 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
public override bool CanRightClick() => true;
public override void ModifyItemLoot(ItemLoot itemLoot)
{
// The contents of this crate depend massively on progression, so it uses a large number of LeadingConditionRules.
var tier1AbyssAvailable = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedSlimeGod || Main.hardMode);
var tier2AbyssAvailable = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedCalamitasClone);
var scoriaAvailable = itemLoot.DefineConditionalDropSet(() => NPC.downedGolemBoss);
var tier1AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedEoCAcidRain);
var tier2AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAquaticScourgeAcidRain);
var tier3AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedPolterghast && DownedBossSystem.downedBoomerDuke);
// Materials
itemLoot.Add(ModContent.ItemType<SulphurousSand>(), 1, 5, 10);
@@ -68,13 +62,6 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
itemLoot.Add(ModContent.ItemType<Acidwood>(), 1, 5, 10);
tier1AcidRain.Add(ModContent.ItemType<SulphuricScale>(), 10, 1, 3);
tier2AcidRain.Add(ModContent.ItemType<CorrodedFossil>(), 10, 1, 3);
tier2AbyssAvailable.Add(ModContent.ItemType<DepthCells>(), 5, 2, 5);
tier2AbyssAvailable.Add(ModContent.ItemType<Lumenyl>(), 5, 2, 5);
tier2AbyssAvailable.Add(ModContent.ItemType<PlantyMush>(), 5, 2, 5);
scoriaAvailable.Add(ModContent.ItemType<ScoriaOre>(), 5, 16, 28);
scoriaAvailable.Add(ModContent.ItemType<ScoriaBar>(), new Fraction(15, 100), 4, 7);
tier3AcidRain.Add(ModContent.ItemType<ReaperTooth>(), 10, 1, 5);
// Pre-HM Abyss Weapons
tier1AbyssAvailable.Add(new OneFromOptionsDropRule(10, 1,
@@ -85,17 +72,6 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
ModContent.ItemType<Lionfish>()
));
// Post-AS Acid Rain Weapons (and Nuclear Rod)
tier2AcidRain.Add(new OneFromOptionsDropRule(10, 1,
ModContent.ItemType<SulphurousGrabber>(),
ModContent.ItemType<FlakToxicannon>(),
ModContent.ItemType<BelchingSaxophone>(),
ModContent.ItemType<SlitheringEels>(),
ModContent.ItemType<SkyfinBombers>(),
ModContent.ItemType<SpentFuelContainer>(),
ModContent.ItemType<NuclearFuelRod>()
));
// Pre-HM Abyss Equipment (and Torrential Tear)
tier1AbyssAvailable.Add(new OneFromOptionsDropRule(4, 1,
ModContent.ItemType<AnechoicPlating>(),
@@ -112,7 +88,7 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
// Potions
itemLoot.Add(ModContent.ItemType<AnechoicCoating>(), 10, 1, 3);
itemLoot.AddCratePotionRules();
itemLoot.AddCratePotionRules(false);
// Money
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
@@ -0,0 +1,71 @@
using CalamityMod.Items.Critters;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Summon;
using Terraria;
using Terraria.GameContent.ItemDropRules;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Fishing.SunkenSeaCatches
{
[LegacyName("SunkenCrate")]
public class EutrophicCrate : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Fishing";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
ItemID.Sets.IsFishingCrate[Type] = true;
}
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.maxStack = 9999;
Item.consumable = true;
Item.rare = ItemRarityID.Green;
Item.value = Item.sellPrice(gold: 1);
Item.createTile = ModContent.TileType<Tiles.SunkenSea.EutrophicCrateTile>();
Item.useTurn = true;
Item.autoReuse = true;
Item.useAnimation = 15;
Item.useTime = 10;
Item.useStyle = ItemUseStyleID.Swing;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
itemGroup = ContentSamples.CreativeHelper.ItemGroup.Crates;
}
public override bool CanRightClick() => true;
public override void ModifyItemLoot(ItemLoot itemLoot)
{
var postDesertScourge = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedDesertScourge);
// Materials
itemLoot.Add(ModContent.ItemType<Navystone>(), 1, 10, 30);
itemLoot.Add(ModContent.ItemType<EutrophicSand>(), 1, 10, 30);
postDesertScourge.Add(ModContent.ItemType<PrismShard>(), 1, 5, 10);
postDesertScourge.Add(ModContent.ItemType<SeaPrism>(), 5, 2, 5);
// Bait
itemLoot.Add(ItemID.MasterBait, 10, 1, 2);
itemLoot.Add(ItemID.JourneymanBait, 5, 1, 3);
itemLoot.Add(ModContent.ItemType<SeaMinnowItem>(), 5, 1, 3);
itemLoot.Add(ItemID.ApprenticeBait, 3, 2, 3);
// Potions
itemLoot.AddCratePotionRules(false);
// Money
itemLoot.Add(ItemID.SilverCoin, 1, 10, 90);
itemLoot.Add(ItemID.GoldCoin, 2, 1, 5);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

@@ -1,4 +1,5 @@
using CalamityMod.Items.Critters;
using CalamityMod.Items.Fishing.BrimstoneCragCatches;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables;
using CalamityMod.Items.Weapons.Magic;
@@ -12,13 +13,15 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Fishing.SunkenSeaCatches
{
public class SunkenCrate : ModItem, ILocalizedModType
public class PrismCrate : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Fishing";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
ItemID.Sets.IsFishingCrate[Type] = true;
ItemID.Sets.IsFishingCrateHardmode[Type] = true;
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<EutrophicCrate>();
}
public override void SetDefaults()
@@ -29,7 +32,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
Item.consumable = true;
Item.rare = ItemRarityID.Green;
Item.value = Item.sellPrice(gold: 1);
Item.createTile = ModContent.TileType<Tiles.SunkenSea.SunkenCrateTile>();
Item.createTile = ModContent.TileType<Tiles.SunkenSea.PrismCrateTile>();
Item.useTurn = true;
Item.autoReuse = true;
Item.useAnimation = 15;
@@ -37,10 +40,10 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
Item.useStyle = ItemUseStyleID.Swing;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
itemGroup = ContentSamples.CreativeHelper.ItemGroup.Crates;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
itemGroup = ContentSamples.CreativeHelper.ItemGroup.Crates;
}
public override bool CanRightClick() => true;
public override void ModifyItemLoot(ItemLoot itemLoot)
Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

@@ -0,0 +1,7 @@
namespace CalamityMod.Items.Placeables.Banners
{
public class SlabCrabBanner : BaseBanner
{
public override int BannerTileStyle => 5;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

@@ -1,5 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.FurnitureAshen;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.Furniture.CraftingStations
@@ -34,6 +35,7 @@ namespace CalamityMod.Items.Placeables.Furniture.CraftingStations
AddIngredient<SmoothBrimstoneSlag>(10).
AddIngredient<UnholyCore>(10).
AddTile(TileID.Anvils).
AddDecraftCondition(Condition.DownedMechBossAny).
Register();
}
}
@@ -1,7 +1,8 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria.ModLoader;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.FurnitureAshen
{
@@ -29,6 +30,7 @@ namespace CalamityMod.Items.Placeables.FurnitureAshen
AddIngredient<SmoothBrimstoneSlag>(10).
AddIngredient<UnholyCore>(5).
AddTile<AshenAltar>().
AddDecraftCondition(Condition.DownedMechBossAny).
Register();
}
}
@@ -34,10 +34,10 @@ namespace CalamityMod.Items.Placeables.FurnitureWulfrum
AddIngredient<WulfrumMetalScrap>().
AddTile(TileID.HeavyWorkBench).
Register();
//CreateRecipe().
//AddIngredient<WulfrumPlatingWall>(4).
//AddTile(TileID.WorkBenches).
//Register();
CreateRecipe().
AddIngredient<WulfrumPlatingWall>(4).
AddTile(TileID.WorkBenches).
Register();
}
}
}
@@ -0,0 +1,38 @@
using Terraria.ModLoader;
using Terraria.ID;
using CalamityMod.Items.Placeables.FurnitureWulfrum;
using WallTiles = CalamityMod.Walls;
namespace CalamityMod.Items.Placeables.Walls
{
public class WulfrumPlatingWall : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Placeables";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 400;
}
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.maxStack = 9999;
Item.useTurn = true;
Item.autoReuse = true;
Item.useAnimation = 15;
Item.useTime = 7;
Item.useStyle = ItemUseStyleID.Swing;
Item.consumable = true;
Item.createWall = ModContent.WallType<WallTiles.WulfrumPlatingWall>();
}
public override void AddRecipes()
{
CreateRecipe(4).
AddIngredient<WulfrumPlating>().
AddTile(TileID.WorkBenches).
Register();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

+2 -2
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.SummonItems
public new string LocalizationCategory => "Items.SummonItems";
public override void SetStaticDefaults()
{
ItemID.Sets.SortingPriorityBossSpawns[Type] = 3; // Worm Food / Bloody Spine
ItemID.Sets.SortingPriorityBossSpawns[Type] = 3; // Worm Food / Bloody Spine
}
public override void SetDefaults()
@@ -42,7 +42,7 @@ namespace CalamityMod.Items.SummonItems
SoundEngine.PlaySound(SoundID.Roar, player.Center);
if (Main.netMode != NetmodeID.MultiplayerClient)
{
int npc = NPC.NewNPC(new EntitySource_BossSpawn(player), (int)(player.position.X + Main.rand.Next(-250, 251)), (int)(player.position.Y - 500f), ModContent.NPCType<Crabulon>(), 1);
int npc = NPC.NewNPC(new EntitySource_BossSpawn(player), (int)(player.position.X + Main.rand.Next(-160, 161)), (int)(player.position.Y - 320f), ModContent.NPCType<Crabulon>(), 1);
Main.npc[npc].timeLeft *= 20;
CalamityUtils.BossAwakenMessage(npc);
}
-4
View File
@@ -127,10 +127,6 @@ namespace CalamityMod.Items.Tools
}
}
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.CritDamage *= 0.5f;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
if (hit.Crit)
+2 -9
View File
@@ -12,7 +12,6 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
public class GaussDagger : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal";
public const int HitsRequiredForFlux = 2;
public override void SetDefaults()
{
CalamityGlobalItem modItem = Item.Calamity();
@@ -41,17 +40,11 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 1);
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.CritDamage *= 0.5f;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.Calamity().GaussFluxTimer += 50;
if (target.Calamity().GaussFluxTimer >= 30 * HitsRequiredForFlux)
if (target.Calamity().GaussFluxTimer == 0)
{
target.Calamity().GaussFluxTimer = 0;
target.Calamity().GaussFluxTimer = 50;
if (player.whoAmI == Main.myPlayer)
{
Projectile.NewProjectile(player.GetSource_ItemUse(Item), target.Center, Vector2.Zero, ModContent.ProjectileType<GaussFlux>(), Item.damage, 0f, player.whoAmI, 0f, target.whoAmI);
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
modItem.UsesCharge = true;
modItem.MaxCharge = 50f;
modItem.ChargePerUse = 0.075f;
modItem.ChargePerUse = 0.07f;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 36;
Item.height = 40;
Item.damage = 123;
Item.damage = 87;
Item.DamageType = DamageClass.Magic;
Item.mana = 9;
Item.useTime = 25;
+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 58;
Item.height = 38;
Item.damage = 30;
Item.damage = 37;
Item.DamageType = DamageClass.Magic;
Item.mana = 10;
Item.useTime = 16;
+2 -2
View File
@@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Magic
CreateRecipe().
AddIngredient(ItemID.Vilethorn).
AddIngredient(ItemID.MagicMissile).
AddIngredient(ItemID.WandofSparking).
AddIngredient(ItemID.WandofFrosting).
AddIngredient(ItemID.AmberStaff).
AddIngredient<PurifiedGel>(10).
AddTile(TileID.DemonAltar).
@@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Magic
CreateRecipe().
AddIngredient(ItemID.CrimsonRod).
AddIngredient(ItemID.MagicMissile).
AddIngredient(ItemID.WandofSparking).
AddIngredient(ItemID.WandofFrosting).
AddIngredient(ItemID.AmberStaff).
AddIngredient<PurifiedGel>(10).
AddTile(TileID.DemonAltar).
+4 -4
View File
@@ -12,12 +12,12 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 66;
Item.height = 66;
Item.damage = 49;
Item.damage = 39;
Item.DamageType = DamageClass.Magic;
Item.channel = true;
Item.mana = 13;
Item.useTime = 80;
Item.useAnimation = 80;
Item.mana = 18;
Item.useTime = 70;
Item.useAnimation = 70;
Item.useStyle = ItemUseStyleID.Swing;
Item.noMelee = true;
Item.knockBack = 5;
+54
View File
@@ -0,0 +1,54 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Rarities;
using CalamityMod.Sounds;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Magic
{
public class Teslastaff : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Magic";
public override void SetStaticDefaults()
{
Item.staff[Type] = true;
}
public override void SetDefaults()
{
Item.width = 38;
Item.height = 38;
Item.damage = 166;
Item.DamageType = DamageClass.Magic;
Item.mana = 10;
Item.useTime = 10;
Item.useAnimation = 10;
Item.useStyle = ItemUseStyleID.Shoot;
Item.UseSound = CommonCalamitySounds.LightningSound with { Pitch = 1.1f };
Item.noMelee = true;
Item.channel = true;
Item.knockBack = 0f;
Item.value = CalamityGlobalItem.Rarity12BuyPrice;
Item.rare = ModContent.RarityType<Turquoise>();
Item.Calamity().donorItem = true;
Item.shoot = ModContent.ProjectileType<Teslabeam>();
Item.shootSpeed = 30f;
Item.reuseDelay = 60;
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.ThunderStaff).
AddRecipeGroup("AnyCopperBar", 20).
AddIngredient<ArmoredShell>(2).
AddIngredient<CoreofSunlight>(6).
AddTile(TileID.LunarCraftingStation).
Register();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 64;
Item.height = 64;
Item.damage = 38;
Item.damage = 46;
Item.DamageType = DamageClass.Magic;
Item.mana = 15;
Item.useTime = 18;
+9 -3
View File
@@ -21,9 +21,9 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 28;
Item.height = 32;
Item.damage = 15;
Item.damage = 19;
Item.DamageType = DamageClass.Magic;
Item.mana = 20;
Item.mana = 14;
Item.useTime = Item.useAnimation = 36;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
@@ -47,6 +47,12 @@ namespace CalamityMod.Items.Weapons.Magic
public override float UseSpeedMultiplier(Player player) => player.altFunctionUse == 2 ? 0.5f : 1f;
public override void ModifyManaCost(Player player, ref float reduce, ref float mult)
{
if (player.altFunctionUse == 2)
mult *= 2f;
}
public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback)
{
if (player.altFunctionUse == 2)
@@ -59,7 +65,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)
{
int totalProjectiles = 24;
int totalProjectiles = 12;
for (int i = 0; i < totalProjectiles; i++)
{
Vector2 waveVelocity = ((MathHelper.TwoPi * i / (float)totalProjectiles) + velocity.ToRotation()).ToRotationVector2() * velocity.Length();
+1 -5
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 58;
Item.height = 58;
Item.damage = 105;
Item.damage = 75;
Item.DamageType = DamageClass.Melee;
Item.useTime = 20;
Item.useAnimation = 20;
@@ -30,10 +30,6 @@ namespace CalamityMod.Items.Weapons.Melee
Item.shootSpeed = 3f;
}
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.CritDamage *= 0.5f;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Frostburn2, 300);
+14 -33
View File
@@ -4,6 +4,7 @@ using CalamityMod.Items.Placeables;
using CalamityMod.Projectiles.Melee;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
@@ -13,47 +14,27 @@ namespace CalamityMod.Items.Weapons.Melee
public class AbyssBlade : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Melee";
public static readonly SoundStyle SpinSound = new("CalamityMod/Sounds/Item/SpinningWoosh") { Volume = 0.65f };
public override void SetDefaults()
{
Item.width = 74;
Item.height = 74;
Item.damage = 130;
Item.damage = 70;
Item.knockBack = 7.5f;
Item.useTime = 65;
Item.useAnimation = 65;
Item.shoot = ModContent.ProjectileType<AbyssBladeProjectile>();
Item.shootSpeed = 3f;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = 18;
Item.useTime = 18;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 8f;
Item.UseSound = SoundID.Item1;
Item.useStyle = ItemUseStyleID.Shoot;
Item.UseSound = null;
Item.autoReuse = true;
Item.value = CalamityGlobalItem.Rarity7BuyPrice;
Item.rare = ItemRarityID.Lime;
Item.shoot = ModContent.ProjectileType<DepthOrb>();
Item.shootSpeed = 9f;
}
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.75), knockback, player.whoAmI);
return false;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 33);
}
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<CrushDepth>(), 300);
}
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
target.AddBuff(ModContent.BuffType<CrushDepth>(), 300);
}
public override void AddRecipes()
+4 -9
View File
@@ -20,9 +20,9 @@ namespace CalamityMod.Items.Weapons.Melee
Item.width = 72;
Item.height = 72;
Item.scale = 1.2f;
Item.damage = 108;
Item.damage = 152;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = Item.useTime = 15;
Item.useAnimation = Item.useTime = 16;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 4.25f;
@@ -59,8 +59,8 @@ namespace CalamityMod.Items.Weapons.Melee
public override float UseSpeedMultiplier(Player player)
{
if (player.altFunctionUse != 2)
return 1f;
return 1.33f;
return 1.8f;
return 1f;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
@@ -75,11 +75,6 @@ namespace CalamityMod.Items.Weapons.Melee
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 246, 0f, 0f, 0, new Color(255, Main.DiscoG, 53));
}
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.CritDamage *= 0.5f;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
var source = player.GetSource_ItemUse(Item);
-5
View File
@@ -45,11 +45,6 @@ namespace CalamityMod.Items.Weapons.Melee
int lifeAmount = player.statLifeMax2 - player.statLife;
damage.Base += lifeAmount * 0.1f;
}
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.CritDamage *= 0.5f;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
var source = player.GetSource_ItemUse(Item);
+3 -2
View File
@@ -26,7 +26,8 @@ namespace CalamityMod.Items.Weapons.Melee
public static float MaxThrowReach = 760;
public static float snapDamageMultiplier = 1.2f; //Extra damage from making the scissors snap
public static float chargeDamageMultiplier = 1.4f; //Extra damage from charge
public static float MaxCharge = 15f; // Maximum charge value AKA how much charge you get from a parry
public static float chargeDamageMultiplier = 1.35f; //Extra damage from charge
public static float chainDamageMultiplier = 0.1f;
public static int DashIframes = 10;
@@ -202,7 +203,7 @@ namespace CalamityMod.Items.Weapons.Melee
Vector2 barOrigin = barBG.Size() * 0.5f;
float yOffset = 50f;
Vector2 drawPos = position + Vector2.UnitY * scale * (frame.Height - yOffset);
Rectangle frameCrop = new Rectangle(0, 0, (int)(Charge / 10f * barFG.Width), barFG.Height);
Rectangle frameCrop = new Rectangle(0, 0, (int)(Charge / MaxCharge * barFG.Width), barFG.Height);
Color color = Main.hslToRgb((Main.GlobalTimeWrappedHourly * 0.6f) % 1, 1, 0.75f + (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3f) * 0.1f);
spriteBatch.Draw(barBG, drawPos, null, color, 0f, barOrigin, scale * barScale, 0f, 0f);
-5
View File
@@ -26,11 +26,6 @@ namespace CalamityMod.Items.Weapons.Melee
Item.value = CalamityGlobalItem.Rarity10BuyPrice;
Item.rare = ItemRarityID.Red;
}
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.CritDamage *= 0.5f;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
int type = Main.rand.NextBool() ? ModContent.ProjectileType<BalefulHarvesterProjectile>() : ProjectileID.FlamingJack;
+4 -3
View File
@@ -14,10 +14,10 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 56;
Item.height = 60;
Item.damage = 30;
Item.scale = 1.05f;
Item.damage = 41;
Item.scale = 1.15f;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = Item.useTime = 26;
Item.useAnimation = Item.useTime = 40;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 7f;
Item.UseSound = SoundID.Item1;
@@ -30,6 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Irradiated>(), 300);
target.AddBuff(BuffID.Poisoned, 60);
}
public override void AddRecipes()
+1 -1
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 56;
Item.height = 56;
Item.damage = 23;
Item.damage = 20;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = 21;
Item.useTime = 21;
-5
View File
@@ -69,11 +69,6 @@ namespace CalamityMod.Items.Weapons.Melee
Item.noUseGraphic = true;
}
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.CritDamage *= 0.5f;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
var source = player.GetSource_ItemUse(Item);
+3 -5
View File
@@ -4,6 +4,7 @@ using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Buffs.DamageOverTime;
namespace CalamityMod.Items.Weapons.Melee
{
@@ -68,13 +69,9 @@ namespace CalamityMod.Items.Weapons.Melee
if (Main.rand.NextBool(3))
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 187, 0f, 0f, 100, new Color(53, Main.DiscoG, 255));
}
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.CritDamage *= 0.5f;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<CrushDepth>(), 180);
var source = player.GetSource_ItemUse(Item);
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrinySpout>()] == 0)
Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType<BrinyTyphoonBubble>(), Item.damage, Item.knockBack, player.whoAmI);
@@ -82,6 +79,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
target.AddBuff(ModContent.BuffType<CrushDepth>(), 180);
var source = player.GetSource_ItemUse(Item);
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrinySpout>()] == 0)
Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType<BrinyTyphoonBubble>(), Item.damage, Item.knockBack, player.whoAmI);
+6 -3
View File
@@ -259,18 +259,21 @@ namespace CalamityMod.Items.Weapons.Melee
public override bool CanUseItem(Player player)
{
return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI &&
bool isRightClicking = player.altFunctionUse != ItemAlternativeFunctionID.None;
return !isRightClicking && !Main.projectile.Any(n => n.active && n.owner == player.whoAmI &&
(n.type == ProjectileType<BitingEmbrace>() ||
n.type == ProjectileType<GrovetendersTouch>() ||
n.type == ProjectileType<AridGrandeur>()));
}
// 03FEB2024: Ozzatron: added so the Iban Blades don't break Overhaul compatibility. Weapons are functionally unchanged.
public override bool AltFunctionUse(Player player) => true;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (mainAttunement == null)
if (mainAttunement == null || player.altFunctionUse != ItemAlternativeFunctionID.None)
return false;
int powerLungeCounter = 0; //Unused here
ComboResetTimer = 1f;
return mainAttunement.Shoot(player, source, ref position, ref velocity.X, ref velocity.Y, ref type, ref damage, ref knockback, ref Combo, ref CanLunge, ref powerLungeCounter);
@@ -0,0 +1,88 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
public class ChronomancersScythe : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Melee";
public override void SetStaticDefaults()
{
ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true;
}
public override void SetDefaults()
{
Item.width = 45;
Item.height = 45;
Item.DamageType = DamageClass.MeleeNoSpeed;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.channel = true;
Item.damage = 153;
Item.knockBack = 4f;
Item.useAnimation = 25;
Item.useTime = 5;
Item.autoReuse = false;
Item.useStyle = ItemUseStyleID.Shoot;
Item.UseSound = SoundID.Item71;
Item.value = CalamityGlobalItem.Rarity11BuyPrice;
Item.rare = ItemRarityID.Purple;
Item.Calamity().donorItem = true;
Item.shoot = ModContent.ProjectileType<ChronomancersScytheSwing>();
Item.shootSpeed = 24f;
}
public override bool AltFunctionUse(Player player) => true;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse == 2)
{
int p = Projectile.NewProjectile(source, position, Vector2.Zero, ModContent.ProjectileType<ChronomancersScytheHoldout>(), damage, knockback, Main.myPlayer, ai2: player.direction);
float rot = -MathHelper.PiOver2 + MathHelper.PiOver4;
Main.projectile[p].rotation = player.direction * rot;
return false;
}
else
{
return true;
}
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2f)
{
Item.reuseDelay = 10;
Item.channel = false;
Item.useTurn = false;
}
else
{
Item.reuseDelay = 0;
Item.channel = true;
Item.useTurn = true;
}
return base.CanUseItem(player);
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.IceSickle).
AddIngredient(ItemID.FastClock).
AddIngredient(ItemID.LunarBar, 10).
AddIngredient<CoreofEleum>(6).
AddTile(TileID.LunarCraftingStation).
Register();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

-4
View File
@@ -29,10 +29,6 @@ namespace CalamityMod.Items.Weapons.Melee
Item.shootSpeed = 9f;
}
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.CritDamage *= 0.5f;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
var source = player.GetSource_ItemUse(Item);
+3 -3
View File
@@ -20,16 +20,16 @@ namespace CalamityMod.Items.Weapons.Melee
Item.noUseGraphic = true;
Item.autoReuse = true;
Item.useStyle = ItemUseStyleID.Rapier;
Item.damage = 98;
Item.damage = 270;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = Item.useTime = 18;
Item.useAnimation = Item.useTime = 40;
Item.shoot = ModContent.ProjectileType<CosmicShivProj>();
Item.shootSpeed = 2.4f;
Item.knockBack = 9f;
Item.UseSound = SoundID.Item1;
Item.value = CalamityGlobalItem.Rarity14BuyPrice;
Item.rare = ModContent.RarityType<DarkBlue>();
Item.Calamity().donorItem = true; //Yatagarasu#0001
Item.Calamity().donorItem = true; // revertusernamechange on Discord (Yatagarasu)
}
public override bool MeleePrefix() => true;
+12 -48
View File
@@ -1,4 +1,5 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Projectiles.Melee;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -10,64 +11,27 @@ namespace CalamityMod.Items.Weapons.Melee
public class DepthCrusher : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Melee";
private const int HammerPower = 70;
public override void SetStaticDefaults()
{
ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true;
}
public override void SetDefaults()
{
Item.width = 56;
Item.height = 50;
Item.damage = 36;
Item.knockBack = 5.25f;
Item.useTime = 17;
Item.useAnimation = 22;
Item.hammer = HammerPower;
Item.damage = 35;
Item.knockBack = 7.25f;
Item.useTime = 65;
Item.useAnimation = 65;
Item.shoot = ModContent.ProjectileType<DepthCrusherProjectile>();
Item.shootSpeed = 3f;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.UseSound = SoundID.Item1;
Item.useStyle = ItemUseStyleID.Shoot;
Item.UseSound = null;
Item.autoReuse = true;
Item.value = CalamityGlobalItem.Rarity2BuyPrice;
Item.rare = ItemRarityID.Green;
}
public override bool AltFunctionUse(Player player) => true;
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
Item.hammer = 0;
}
else
{
Item.hammer = HammerPower;
}
return base.CanUseItem(player);
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 33);
}
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 180);
}
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 180);
}
}
}
-5
View File
@@ -105,11 +105,6 @@ namespace CalamityMod.Items.Weapons.Melee
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 173);
}
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.CritDamage *= 0.5f;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.ShadowFlame, 150);
+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 66;
Item.height = 66;
Item.DamageType = TrueMeleeNoSpeedDamageClass.Instance;
Item.DamageType = DamageClass.MeleeNoSpeed;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.channel = true;
@@ -33,10 +33,6 @@ namespace CalamityMod.Items.Weapons.Melee
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 44);
}
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.CritDamage *= 0.5f;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Venom, 300);
+7 -2
View File
@@ -182,10 +182,14 @@ namespace CalamityMod.Items.Weapons.Melee
#endregion
// 03FEB2024: Ozzatron: added so the Iban Blades don't break Overhaul compatibility. Weapons are functionally unchanged.
public override bool AltFunctionUse(Player player) => true;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (mainAttunement == null)
if (mainAttunement == null || player.altFunctionUse != ItemAlternativeFunctionID.None)
return false;
return true;
}
@@ -245,7 +249,8 @@ namespace CalamityMod.Items.Weapons.Melee
public override bool CanUseItem(Player player)
{
return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI &&
bool isRightClicking = player.altFunctionUse != ItemAlternativeFunctionID.None;
return !isRightClicking && !Main.projectile.Any(n => n.active && n.owner == player.whoAmI &&
(n.type == ProjectileType<PhoenixsPride>() ||
n.type == ProjectileType<AndromedasStride>() ||
n.type == ProjectileType<PolarisGaze>() ||
+15 -12
View File
@@ -1,5 +1,4 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Healing;
using CalamityMod.Projectiles.Healing;
using CalamityMod.Projectiles.Melee;
using Microsoft.Xna.Framework;
using Terraria;
@@ -45,28 +44,32 @@ namespace CalamityMod.Items.Weapons.Melee
player.HealEffect(4);
}
OnHitEffects(player, target.Center, target.life, target.lifeMax, Item.knockBack, Item.damage, hit.Crit);
OnHitEffects(player, target.Center, target.life, target.lifeMax, Item.knockBack, Item.damage);
}
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
OnHitEffects(player, target.Center, target.statLife, target.statLifeMax2, Item.knockBack, Item.damage, false);
OnHitEffects(player, target.Center, target.statLife, target.statLifeMax2, Item.knockBack, Item.damage);
}
// this should use onHitNPC and ModifyHitNPC instead of onHitEffects
private void OnHitEffects(Player player, Vector2 targetPos, int targetLife, int targetMaxLife, float knockback, int damage, bool crit)
private void OnHitEffects(Player player, Vector2 targetPos, int targetLife, int targetMaxLife, float knockback, int damage)
{
var source = player.GetSource_ItemUse(Item);
if (crit)
damage /= 2;
Projectile.NewProjectile(source, targetPos, Vector2.Zero, ModContent.ProjectileType<RainbowBoom>(), (int)(damage * 0.5f), 0f, player.whoAmI);
// Grand Guardian is classed as a regular melee weapon, so despite being a true melee on-hit, these scale with regular melee.
StatModifier playerMeleeDmg = player.GetTotalDamage<MeleeDamageClass>();
int rainbowBoomDamage = (int)playerMeleeDmg.ApplyTo(damage * 0.5f);
int rainBoltDamage = (int)playerMeleeDmg.ApplyTo(damage * 0.75f);
Projectile.NewProjectile(source, targetPos, Vector2.Zero, ModContent.ProjectileType<RainbowBoom>(), rainbowBoomDamage, 0f, player.whoAmI);
if (targetLife <= (targetMaxLife * 0.5f) && player.ownedProjectileCounts[ModContent.ProjectileType<RainBolt>()] < 3)
{
float randomSpeedX = Main.rand.Next(6, 13);
float randomSpeedY = Main.rand.Next(6, 13);
Projectile.NewProjectile(source, targetPos.X, targetPos.Y, -randomSpeedX, -randomSpeedY, ModContent.ProjectileType<RainBolt>(), (int)(damage * 0.75f), knockback, player.whoAmI);
Projectile.NewProjectile(source, targetPos.X, targetPos.Y, randomSpeedX, -randomSpeedY, ModContent.ProjectileType<RainBolt>(), (int)(damage * 0.75f), knockback, player.whoAmI);
Projectile.NewProjectile(source, targetPos.X, targetPos.Y, 0f, -randomSpeedY, ModContent.ProjectileType<RainBolt>(), (int)(damage * 0.75f), knockback, player.whoAmI);
Projectile.NewProjectile(source, targetPos.X, targetPos.Y, -randomSpeedX, -randomSpeedY, ModContent.ProjectileType<RainBolt>(), rainBoltDamage, knockback, player.whoAmI);
Projectile.NewProjectile(source, targetPos.X, targetPos.Y, randomSpeedX, -randomSpeedY, ModContent.ProjectileType<RainBolt>(), rainBoltDamage, knockback, player.whoAmI);
Projectile.NewProjectile(source, targetPos.X, targetPos.Y, 0f, -randomSpeedY, ModContent.ProjectileType<RainBolt>(), rainBoltDamage, knockback, player.whoAmI);
}
if (targetLife <= 0 && !player.moonLeech && player.ownedProjectileCounts[ModContent.ProjectileType<RainHeal>()] < 3)
{
-5
View File
@@ -62,11 +62,6 @@ namespace CalamityMod.Items.Weapons.Melee
public override bool CanHitPvp(Player player, Player target) => player.altFunctionUse != 2;
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.CritDamage *= 0.5f;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
var source = player.GetSource_ItemUse(Item);
-1
View File
@@ -45,7 +45,6 @@ namespace CalamityMod.Items.Weapons.Melee
Item.shoot = ModContent.ProjectileType<MurasamaSlash>();
Item.shootSpeed = 24f;
Item.rare = ModContent.RarityType<Violet>();
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 14));
}
// Terraria seems to really dislike high crit values in SetDefaults
+13 -28
View File
@@ -5,6 +5,7 @@ using CalamityMod.Projectiles.Melee;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
@@ -13,44 +14,28 @@ namespace CalamityMod.Items.Weapons.Melee
public class NeptunesBounty : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Melee";
public static readonly SoundStyle SpinSound = new("CalamityMod/Sounds/Item/SpinningWoosh") { Volume = 0.65f };
public override void SetDefaults()
{
Item.width = 122;
Item.height = 122;
Item.damage = 270;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = 22;
Item.useTime = 22;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.damage = 455;
Item.knockBack = 9f;
Item.UseSound = SoundID.Item1;
Item.useTime = 65;
Item.useAnimation = 65;
Item.shoot = ModContent.ProjectileType<NeptunesBountyProjectile>();
Item.shootSpeed = 3f;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.DamageType = DamageClass.Melee;
Item.useStyle = ItemUseStyleID.Shoot;
Item.UseSound = null;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<NeptuneOrb>();
Item.shootSpeed = 12f;
Item.value = CalamityGlobalItem.Rarity13BuyPrice;
Item.rare = ModContent.RarityType<PureGreen>();
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 33);
}
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<CrushDepth>(), 300);
}
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
target.AddBuff(ModContent.BuffType<CrushDepth>(), 300);
}
public override void AddRecipes()
{
CreateRecipe().
+12 -3
View File
@@ -326,15 +326,24 @@ namespace CalamityMod.Items.Weapons.Melee
public override bool CanUseItem(Player player)
{
return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI &&
bool isRightClicking = player.altFunctionUse != ItemAlternativeFunctionID.None;
return !isRightClicking && !Main.projectile.Any(n => n.active && n.owner == player.whoAmI &&
(n.type == ProjectileType<SwordsmithsPride>() ||
n.type == ProjectileType<MercurialTides>() ||
n.type == ProjectileType<SanguineFury>() ||
n.type == ProjectileType<LamentationsOfTheChained>()));
}
//No need for any wacky zany hijinx in the shoot method for once??? damn
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) => mainAttunement == null ? false : true;
// 03FEB2024: Ozzatron: added so the Iban Blades don't break Overhaul compatibility. Weapons are functionally unchanged.
public override bool AltFunctionUse(Player player) => true;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (mainAttunement == null || player.altFunctionUse != ItemAlternativeFunctionID.None)
return false;
return true;
}
internal static ChargingEnergyParticleSet BiomeEnergyParticles = new ChargingEnergyParticleSet(-1, 2, Color.White, Color.White, 0.04f, 20f);
internal static void UpdateAllParticleSets()
+1 -5
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 74;
Item.height = 90;
Item.damage = 80;
Item.damage = 68;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = 20;
Item.useStyle = ItemUseStyleID.Swing;
@@ -29,10 +29,6 @@ namespace CalamityMod.Items.Weapons.Melee
Item.shootSpeed = 9f;
}
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.CritDamage *= 0.5f;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
var source = player.GetSource_ItemUse(Item);
+11 -10
View File
@@ -1,15 +1,16 @@
using Microsoft.Xna.Framework;
using System;
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
namespace CalamityMod.Items.Weapons.Melee
{
public class StellarStriker : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Melee";
public override void SetDefaults()
{
Item.width = 90;
@@ -29,19 +30,22 @@ namespace CalamityMod.Items.Weapons.Melee
Item.shootSpeed = 12f;
}
// Stellar Striker is classed as a regular melee weapon, so despite being a true melee on-hit, these scale with regular melee.
private int GetOnHitDamage(Player player) => (int)player.GetTotalDamage<MeleeDamageClass>().ApplyTo(0.5f * Item.damage);
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
if (player.whoAmI == Main.myPlayer)
SpawnFlares(player, Item.knockBack, Item.damage, hit.Crit);
SpawnFlares(player, Item.knockBack, GetOnHitDamage(player));
}
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
if (player.whoAmI == Main.myPlayer)
SpawnFlares(player, Item.knockBack, Item.damage, true);
SpawnFlares(player, Item.knockBack, GetOnHitDamage(player));
}
private void SpawnFlares(Player player, float knockback, int damage, bool crit)
private void SpawnFlares(Player player, float knockback, int damage)
{
var source = player.GetSource_ItemUse(Item);
SoundEngine.PlaySound(SoundID.Item88, player.Center);
@@ -66,9 +70,6 @@ namespace CalamityMod.Items.Weapons.Melee
mouseDistance = cometSpeed / mouseDistance;
}
if (crit)
damage /= 2;
for (int j = 0; j < 2; j++)
{
realPlayerPos = new Vector2(player.Center.X + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
@@ -90,7 +91,7 @@ namespace CalamityMod.Items.Weapons.Melee
mouseYDist *= mouseDistance;
float speedX = mouseXDist;
float speedY = mouseYDist + (float)Main.rand.Next(-80, 81) * 0.02f;
int proj = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX, speedY, ProjectileID.LunarFlare, (int)(damage * 0.5), knockback, i, 0f, (float)Main.rand.Next(3));
int proj = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX, speedY, ProjectileID.LunarFlare, damage, knockback, i, 0f, (float)Main.rand.Next(3));
if (proj.WithinBounds(Main.maxProjectiles))
Main.projectile[proj].DamageType = DamageClass.Melee;
}
+2 -2
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 56;
Item.height = 66;
Item.damage = 45;
Item.damage = 38;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = 24;
Item.useStyle = ItemUseStyleID.Swing;
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee
Item.knockBack = 5.5f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.scale = 1.5f;
Item.scale = 1.1f;
Item.value = CalamityGlobalItem.Rarity2BuyPrice;
Item.rare = ItemRarityID.Green;
}
-4
View File
@@ -34,10 +34,6 @@ namespace CalamityMod.Items.Weapons.Melee
Item.Calamity().donorItem = true;
}
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.CritDamage *= 0.5f;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
bool isDoGSegment = target.type == ModContent.NPCType<DevourerofGodsBody>() || target.type == ModContent.NPCType<CosmicGuardianBody>();
+8 -2
View File
@@ -18,6 +18,8 @@ using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Items.Weapons.Melee
{
// TODO -- CANNOT RENAME this and True Biome Blade to "TrueBiomeBlade" and "BiomeBlade" internally without corrupting existing items
// (Comment copied from an equivalent one on OmegaBiomeBlade from June 2022)
public class TrueBiomeBlade : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Melee";
@@ -289,7 +291,8 @@ namespace CalamityMod.Items.Weapons.Melee
public override bool CanUseItem(Player player)
{
return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI &&
bool isRightClicking = player.altFunctionUse != ItemAlternativeFunctionID.None;
return !isRightClicking && !Main.projectile.Any(n => n.active && n.owner == player.whoAmI &&
(n.type == ProjectileType<TrueBitingEmbrace>() ||
n.type == ProjectileType<TrueGrovetendersTouch>() ||
n.type == ProjectileType<TrueAridGrandeur>() ||
@@ -298,9 +301,12 @@ namespace CalamityMod.Items.Weapons.Melee
n.type == ProjectileType<GestureForTheDrowned>()));
}
// 03FEB2024: Ozzatron: added so the Iban Blades don't break Overhaul compatibility. Weapons are functionally unchanged.
public override bool AltFunctionUse(Player player) => true;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (mainAttunement == null)
if (mainAttunement == null || player.altFunctionUse != ItemAlternativeFunctionID.None)
return false;
ComboResetTimer = 1f;
+1 -1
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
Item.width = 16;
Item.height = 16;
Item.damage = 60;
Item.damage = 62;
Item.DamageType = DamageClass.Melee;
Item.useTime = 30;
Item.useAnimation = 30;
@@ -37,6 +37,8 @@ namespace CalamityMod.Items.Weapons.Ranged
public override Vector2? HoldoutOffset() => new Vector2(-30, 0);
public override void HoldItem(Player player) => player.scope = true;
// Terraria seems to really dislike high crit values in SetDefaults
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20;
+2
View File
@@ -59,6 +59,8 @@ namespace CalamityMod.Items.Weapons.Ranged
public override Vector2? HoldoutOffset() => new Vector2(-10, 0);
public override void HoldItem(Player player) => player.scope = true;
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= 50;
public override void AddRecipes()
+10 -4
View File
@@ -1,8 +1,9 @@
using Terraria.DataStructures;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
@@ -13,8 +14,8 @@ namespace CalamityMod.Items.Weapons.Ranged
public new string LocalizationCategory => "Items.Weapons.Ranged";
public override void SetDefaults()
{
Item.width = 40;
Item.height = 76;
Item.width = 50;
Item.height = 112;
Item.damage = 48;
Item.DamageType = DamageClass.Ranged;
Item.useTime = 20;
@@ -32,6 +33,11 @@ namespace CalamityMod.Items.Weapons.Ranged
Item.Calamity().canFirePointBlankShots = true;
}
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Ranged/CosmicBolterGlow").Value);
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo spawnSource, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Vector2 source = player.RotatedRelativePoint(player.MountedCenter, true);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

+2 -2
View File
@@ -14,8 +14,8 @@ namespace CalamityMod.Items.Weapons.Ranged
{
Item.width = 142;
Item.height = 64;
Item.damage = 45;
Item.ArmorPenetration = 15;
Item.damage = 41;
Item.ArmorPenetration = 10;
Item.DamageType = DamageClass.Ranged;
Item.noMelee = true;
Item.useTime = Item.useAnimation = 14;
+2
View File
@@ -47,6 +47,8 @@ namespace CalamityMod.Items.Weapons.Ranged
public override Vector2? HoldoutOffset() => new Vector2(-15, 0);
public override void HoldItem(Player player) => player.scope = true;
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= 50;
public override void AddRecipes()
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged
{
Item.width = 72;
Item.height = 32;
Item.damage = 30;
Item.damage = 36;
Item.DamageType = DamageClass.Ranged;
Item.useTime = 6;
Item.useAnimation = 6;
Loaded 100 of 253 files, more files were not shown because too many files have changed in this diff. Show more