Merge branch '1.4.4' into XykFPH

This commit is contained in:
Cameron Ewell authored and GitHub committed 2023-07-20 10:12:44 -04:00
commit b2cd260a52
497 files changed
+6910 -3560

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon.MirrorofKalandraMinions;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class KalandraMirrorBuff : ModBuff
{
public override void SetStaticDefaults()
{
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
//Main.persistentBuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
CalamityPlayer modPlayer = player.Calamity();
if (player.ownedProjectileCounts[ModContent.ProjectileType<AtzirisDisfavor>()] > 0)
{
modPlayer.KalandraMirror = true;
}
if (!modPlayer.KalandraMirror)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
{
player.buffTime[buffIndex] = 18000;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 801 B

+35
View File
@@ -0,0 +1,35 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class StellarTorusBuff : ModBuff
{
public override void SetStaticDefaults()
{
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
//Main.persistentBuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
CalamityPlayer modPlayer = player.Calamity();
if (player.ownedProjectileCounts[ModContent.ProjectileType<StellarTorusSummon>()] > 0)
{
modPlayer.StellarTorus = true;
}
if (!modPlayer.StellarTorus)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
{
player.buffTime[buffIndex] = 18000;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

+23 -21
View File
@@ -265,6 +265,7 @@ namespace CalamityMod.CalPlayer
public static readonly SoundStyle IjiDeathSound = new("CalamityMod/Sounds/Custom/IjiDies");
public static readonly SoundStyle DrownSound = new("CalamityMod/Sounds/Custom/AbyssDrown");
public static readonly SoundStyle LeonDeathNoiseRE4_ForGFB = new("CalamityMod/Sounds/Custom/GFB/LeonDeathNoiseRE4");
#endregion
#region Rogue
@@ -979,6 +980,8 @@ namespace CalamityMod.CalPlayer
public bool MoonFist = false;
public bool AresCannons = false;
public bool celestialDragons = false;
public bool KalandraMirror = false;
public bool StellarTorus = false;
public List<DeadMinionProperties> PendingProjectilesToRespawn = new List<DeadMinionProperties>();
@@ -1412,13 +1415,7 @@ namespace CalamityMod.CalPlayer
percentMaxLifeIncrease += 10;
if (community)
{
float BoostAtZeroBosses = 0.05f;
float BoostPostYharon = 0.2f;
float floatTypeBoost = MathHelper.Lerp(BoostAtZeroBosses, BoostPostYharon, TheCommunity.CalculatePower());
int integerTypeBoost = (int)(floatTypeBoost * 50f);
percentMaxLifeIncrease += integerTypeBoost;
}
percentMaxLifeIncrease += (int)(TheCommunity.CalculatePower() * TheCommunity.HealthMultiplier);
// Shattered Community gives the same max health boost as normal full-power Community (10%)
if (shatteredCommunity)
@@ -2016,6 +2013,8 @@ namespace CalamityMod.CalPlayer
MoonFist = false;
AresCannons = false;
celestialDragons = false;
KalandraMirror = false;
StellarTorus = false;
disableVoodooSpawns = false;
disablePerfCystSpawns = false;
@@ -2707,7 +2706,7 @@ namespace CalamityMod.CalPlayer
SoundEngine.PlaySound(BloodflareHeadRanged.ActivationSound, Player.Center);
for (int d = 0; d < 64; d++)
{
int dust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Phantoplasm, 0f, 0f, 0, default, 1f);
int dust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Polterplasm, 0f, 0f, 0, default, 1f);
Main.dust[dust].velocity *= 3f;
Main.dust[dust].scale *= 1.15f;
}
@@ -2717,7 +2716,7 @@ namespace CalamityMod.CalPlayer
Vector2 source = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f;
source = source.RotatedBy((double)((float)(d - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Player.Center;
Vector2 dustVel = source - Player.Center;
int phanto = Dust.NewDust(source + dustVel, 0, 0, (int)CalamityDusts.Phantoplasm, dustVel.X * 1.5f, dustVel.Y * 1.5f, 100, default, 1.4f);
int phanto = Dust.NewDust(source + dustVel, 0, 0, (int)CalamityDusts.Polterplasm, dustVel.X * 1.5f, dustVel.Y * 1.5f, 100, default, 1.4f);
Main.dust[phanto].noGravity = true;
Main.dust[phanto].noLight = true;
Main.dust[phanto].velocity = dustVel;
@@ -4004,6 +4003,10 @@ namespace CalamityMod.CalPlayer
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.ProfanedSoulCrystal").Format(Player.name));
}
// Leon Death Noise RE4
if (Main.zenithWorld)
SoundEngine.PlaySound(LeonDeathNoiseRE4_ForGFB, Player.Center);
if (NPC.AnyNPCs(ModContent.NPCType<SupremeCalamitas>()))
{
if (sCalDeathCount < 51)
@@ -5545,6 +5548,14 @@ namespace CalamityMod.CalPlayer
}
#endregion
public override bool ConsumableDodge(Player.HurtInfo info)
{
if (HandleDodges())
return true;
return base.ConsumableDodge(info);
}
#region Pre Hurt
public override void ModifyHurt(ref Player.HurtModifiers modifiers)/* tModPorter Override ImmuneTo, FreeDodge or ConsumableDodge instead to prevent taking damage */
{
@@ -5552,14 +5563,6 @@ namespace CalamityMod.CalPlayer
Player.HurtInfo hurtInfo = new Player.HurtInfo();
#region Ignore Incoming Hits
// If any dodges are active which could dodge this hit, the hurting event is canceled (and the dodge is used).
if (HandleDodges())
{
justHitByDefenseDamage = false;
defenseDamageToTake = 0;
return;
}
// If Armageddon is active, instantly kill the player.
if (CalamityWorld.armageddon && areThereAnyDamnBosses)
KillPlayer();
@@ -5615,7 +5618,7 @@ namespace CalamityMod.CalPlayer
int numParticles = Main.rand.Next(2, 6);
for (int i = 0; i < numParticles; i++)
{
Vector2 velocity = Main.rand.NextVector2CircularEdge(1f, 1f) * Main.rand.NextFloat(3, 14);
Vector2 velocity = Main.rand.NextVector2CircularEdge(1f, 1f) * Main.rand.NextFloat(3, 7);
velocity.X += 5f * hurtInfo.HitDirection;
GeneralParticleHandler.SpawnParticle(new TechyHoloysquareParticle(Player.Center, velocity, Main.rand.NextFloat(2.5f, 3f), Main.rand.NextBool() ? new Color(99, 255, 229) : new Color(25, 132, 247), 25));
}
@@ -5743,7 +5746,6 @@ namespace CalamityMod.CalPlayer
#endregion
#region Hurt
public override void OnHurt(Player.HurtInfo hurtInfo)
{
#region Defense Damage
@@ -6052,7 +6054,6 @@ namespace CalamityMod.CalPlayer
#endregion
#region Post Hurt
public override void PostHurt(Player.HurtInfo hurtInfo)
{
if (pArtifact && !profanedCrystal)
@@ -6470,6 +6471,7 @@ namespace CalamityMod.CalPlayer
{
damageSource = PlayerDeathReason.ByCustomReason(Player.name + " failed the challenge at hand.");
}
NetworkText deathText = damageSource.GetDeathText(Player.name);
if (Main.netMode == NetmodeID.MultiplayerClient && Player.whoAmI == Main.myPlayer)
{
@@ -7010,7 +7012,7 @@ namespace CalamityMod.CalPlayer
double ratioToUse = DefenseDamageRatio;
if (draedonsHeart)
ratioToUse *= 0.5;
ratioToUse *= DraedonsHeart.DefenseDamageMultiplier;
// Calculate the defense damage taken from this hit.
int defenseDamageTaken = (int)(damage * ratioToUse);
+2 -8
View File
@@ -740,18 +740,12 @@ namespace CalamityMod.CalPlayer
if (community)
{
float BoostAtZeroBosses = 0.05f;
float BoostPostYharon = 0.2f;
float floatTypeBoost = MathHelper.Lerp(BoostAtZeroBosses, BoostPostYharon, TheCommunity.CalculatePower());
int integerTypeBoost = (int)(floatTypeBoost * 50f);
int regenBoost = 1 + (integerTypeBoost / 5);
int regenBoost = 1 + (int)(TheCommunity.CalculatePower() * TheCommunity.RegenMultiplier);
bool lesserEffect = false;
for (int l = 0; l < Player.MaxBuffs; l++)
{
int hasBuff = Player.buffType[l];
bool shouldAffect = CalamityLists.alcoholList.Contains(hasBuff);
if (shouldAffect)
lesserEffect = true;
lesserEffect = CalamityLists.alcoholList.Contains(hasBuff);
}
if (Player.lifeRegen < 0)
Player.lifeRegen += lesserEffect ? 1 : regenBoost;
+20 -18
View File
@@ -2658,22 +2658,15 @@ namespace CalamityMod.CalPlayer
if (blueCandle)
Player.moveSpeed += 0.1f;
// TODO -- crit is a float now, and knockback can be boosted for all classes
if (community)
{
float BoostAtZeroBosses = 0.05f;
float BoostPostYharon = 0.2f;
float floatTypeBoost = MathHelper.Lerp(BoostAtZeroBosses, BoostPostYharon, TheCommunity.CalculatePower());
int integerTypeBoost = (int)(floatTypeBoost * 50f);
int critBoost = integerTypeBoost / 2;
float damageBoost = floatTypeBoost * 0.5f;
Player.endurance += floatTypeBoost * 0.25f;
Player.statDefense += integerTypeBoost;
Player.GetDamage<GenericDamageClass>() += damageBoost;
Player.GetCritChance<GenericDamageClass>() += critBoost;
Player.GetKnockback<SummonDamageClass>() += floatTypeBoost;
Player.moveSpeed += floatTypeBoost * 0.5f;
flightTimeMult += floatTypeBoost;
float baseBoost = TheCommunity.CalculatePower();
Player.endurance += baseBoost * TheCommunity.DRMultiplier;
Player.statDefense += (int)(baseBoost * TheCommunity.DefenseMultiplier);
Player.GetDamage<GenericDamageClass>() += baseBoost * TheCommunity.DamageMultiplier;
Player.GetCritChance<GenericDamageClass>() += baseBoost * TheCommunity.CritMultiplier;
Player.moveSpeed += baseBoost * TheCommunity.SpeedMultiplier;
flightTimeMult += baseBoost * TheCommunity.FlightMultiplier;
}
// Shattered Community gives the same wing time boost as normal Community
if (shatteredCommunity)
@@ -2910,7 +2903,7 @@ namespace CalamityMod.CalPlayer
if (yInsignia)
{
Player.GetDamage<MeleeDamageClass>() += 0.1f;
Player.GetDamage<MeleeDamageClass>() += 0.15f;
if (Player.statLife <= (int)(Player.statLifeMax2 * 0.5))
Player.GetDamage<GenericDamageClass>() += 0.1f;
}
@@ -3766,7 +3759,7 @@ namespace CalamityMod.CalPlayer
if (Player.tipsy)
{
if (Player.statDefense > 0)
Player.statDefense -= (int)(Player.statDefense * 0.1);
Player.statDefense -= (int)(Player.statDefense * 0.05);
}
if (DesertProwlerHat.ShroudedInSmoke(Player, out _))
@@ -3908,7 +3901,7 @@ namespace CalamityMod.CalPlayer
if (npc is null || !npc.active)
return;
bool holdingsol = ((Player.HeldItem.type >= ItemID.GreenSolution && Player.HeldItem.type <= ItemID.RedSolution) || Player.HeldItem.type == ModContent.ItemType<AstralSolution>());
bool holdingsol = ((Player.HeldItem.type >= ItemID.GreenSolution && Player.HeldItem.type <= ItemID.RedSolution) || (Player.HeldItem.type >= ItemID.SandSolution && Player.HeldItem.type <= ItemID.DirtSolution) || Player.HeldItem.type == ModContent.ItemType<AstralSolution>());
if (npc.Hitbox.Contains(Main.MouseWorld.ToPoint()) && holdingsol && Player.Distance(npc.Center) < 450)
{
Player.cursorItemIconEnabled = true;
@@ -3923,7 +3916,7 @@ namespace CalamityMod.CalPlayer
int soltype = 0;
if (Player.HeldItem.type == ModContent.ItemType<AstralSolution>())
{
soltype = 5;
soltype = 8;
}
else
{
@@ -3944,6 +3937,15 @@ namespace CalamityMod.CalPlayer
case ItemID.RedSolution:
soltype = 4;
break;
case ItemID.SandSolution:
soltype = 5;
break;
case ItemID.SnowSolution:
soltype = 6;
break;
case ItemID.DirtSolution:
soltype = 7;
break;
}
}
if (npc.ai[3] != soltype || npc.ai[0] == 0)
+4
View File
@@ -779,6 +779,7 @@ namespace CalamityMod
ProjectileType<UltimaBowProjectile>(),
ProjectileType<CondemnationHoldout>(),
ProjectileType<SurgeDriverHoldout>(),
ProjectileType<StarmageddonHeld>(),
ProjectileType<NanoPurgeHoldout>(),
ProjectileType<AetherfluxCannonHoldout>(),
@@ -875,6 +876,7 @@ namespace CalamityMod
NPCID.PrimeVice,
NPCID.Plantera,
NPCID.PlanterasTentacle,
NPCType<PlanterasFreeTentacle>(),
NPCID.HallowBoss,
NPCID.Everscream,
NPCID.SantaNK1,
@@ -1462,6 +1464,7 @@ namespace CalamityMod
NPCID.Sharkron,
NPCID.Sharkron2,
NPCID.PlanterasTentacle,
NPCType<PlanterasFreeTentacle>(),
NPCID.Spore,
NPCID.TheHungryII,
NPCID.LeechHead,
@@ -2634,6 +2637,7 @@ namespace CalamityMod
NPCType<Catastrophe>(),
NPCType<SoulSeeker>(),
NPCID.PlanterasTentacle,
NPCType<PlanterasFreeTentacle>(),
NPCType<AnahitasIceShield>(),
NPCType<AquaticAberration>(),
NPCType<AureusSpawn>(),
+2 -8
View File
@@ -74,6 +74,7 @@ using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ModLoader.Config;
using Terraria.DataStructures;
using CalamityMod.NPCs.NormalNPCs;
[assembly: InternalsVisibleTo("CalTestHelpers")]
[assembly: InternalsVisibleTo("InfernumMode")]
@@ -151,7 +152,6 @@ namespace CalamityMod
internal Mod ancientsAwakened = null;
internal Mod bossChecklist = null;
internal Mod census = null;
internal Mod crouchMod = null;
internal Mod dialogueTweak = null;
internal Mod fargos = null;
@@ -175,9 +175,6 @@ namespace CalamityMod
carpetOriginal = TextureAssets.FlyingCarpet;
// Apply IL edits as soon as possible.
ILChanges.Load();
// If any of these mods aren't loaded, it will simply keep them as null.
musicMod = null;
ModLoader.TryGetMod("CalamityModMusic", out musicMod);
@@ -185,8 +182,6 @@ namespace CalamityMod
ModLoader.TryGetMod("AAMod", out ancientsAwakened);
bossChecklist = null;
ModLoader.TryGetMod("BossChecklist", out bossChecklist);
census = null;
ModLoader.TryGetMod("Census", out census);
crouchMod = null;
ModLoader.TryGetMod("CrouchMod", out crouchMod);
dialogueTweak = null;
@@ -425,7 +420,6 @@ namespace CalamityMod
ancientsAwakened = null;
bossChecklist = null;
census = null;
crouchMod = null;
dialogueTweak = null;
fargos = null;
@@ -510,7 +504,6 @@ namespace CalamityMod
loadCache = null;
*/
ILChanges.Unload();
Instance = null;
base.Unload();
}
@@ -789,6 +782,7 @@ namespace CalamityMod
{ 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 },
+3
View File
@@ -226,6 +226,7 @@ namespace CalamityMod
{ NPCID.Plantera, 1.15 },
{ NPCID.PlanterasTentacle, 1.15 },
{ ModContent.NPCType<PlanterasFreeTentacle>(), 1.15 },
{ NPCID.HallowBoss, 0.6875 },
@@ -425,6 +426,7 @@ namespace CalamityMod
161, // 225 in phase 2
207 } }, // Vanilla: Is retarded, so plantera does 150 in phase 1 and 210 in phase 2; Rev and Death: 289 in phase 2
{ NPCID.PlanterasTentacle, new int[] { 60, 138, 161, 207, 276 } },
{ ModContent.NPCType<PlanterasFreeTentacle>(), new int[] { 60, 138, 161, 207, 276 } },
{ NPCID.Spore, new int[] { 70, 140, 160, 170, 210 } },
{ NPCID.HallowBoss, new int[] { 80, // 120 during charge
@@ -654,6 +656,7 @@ namespace CalamityMod
{ new Tuple<int, int>(NPCID.Plantera, ProjectileID.PoisonSeedPlantera), new int[] { 54, 96, 136, 152, 210 } }, // 144 in non-rev master mode
{ new Tuple<int, int>(NPCID.Plantera, ProjectileID.ThornBall), new int[] { 62, 108, 160, 176, 234 } }, // 162 in non-rev master mode
{ new Tuple<int, int>(NPCID.Plantera, ModContent.ProjectileType<SporeGasPlantera>()), new int[] { 80, 140, 160, 176, 234 } },
{ new Tuple<int, int>(NPCID.Plantera, ModContent.ProjectileType<HomingGasBulb>()), new int[] { 80, 140, 160, 176, 234 } },
{ new Tuple<int, int>(NPCID.HallowBoss, ProjectileID.HallowBossRainbowStreak), new int[] { 90, 120, 160, 176, 234 } },
{ new Tuple<int, int>(NPCID.HallowBoss, ProjectileID.FairyQueenSunDance), new int[] { 100, 140, 184, 200, 270 } },
+1 -1
View File
@@ -9,7 +9,7 @@
SulfurousSeaAcid = 75,
Brimstone = 235,
Ectoplasm = 180,
Phantoplasm = 60,
Polterplasm = 60,
Plague = 46,
ProfanedFire = 244,
Nightwither = 185,
File renamed without changes.
File renamed without changes.
+1 -1
View File
@@ -216,7 +216,7 @@ namespace CalamityMod.Events
new Boss(ModContent.NPCType<CalamitasClone>(), TimeChangeContext.Night, dimnessFactor: 0.6f, permittedNPCs: new int[] { ModContent.NPCType<Cataclysm>(), ModContent.NPCType<Catastrophe>(),
ModContent.NPCType<SoulSeeker>() }),
new Boss(NPCID.Plantera, TimeChangeContext.Day, permittedNPCs: new int[] { NPCID.PlanterasTentacle, NPCID.PlanterasHook, NPCID.Spore }),
new Boss(NPCID.Plantera, TimeChangeContext.Day, permittedNPCs: new int[] { NPCID.PlanterasTentacle, ModContent.NPCType<PlanterasFreeTentacle>(), NPCID.PlanterasHook, NPCID.Spore }),
new Boss(ModContent.NPCType<Anahita>(), specialSpawnCountdown: 120, permittedNPCs: new int[] { ModContent.NPCType<Leviathan>(), ModContent.NPCType<AquaticAberration>(),
ModContent.NPCType<AnahitasIceShield>(), NPCID.DetonatingBubble}),
Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

+14
View File
@@ -9,6 +9,20 @@ namespace CalamityMod.ILEditing
{
public partial class ILChanges
{
#region Rod of Harmony Changes
private static bool ChangeRodOfHarmonyShimmerRequirement(On_Item.orig_CanShimmer orig, Item item)
{
//Rod of Harmony requires Draedong and SCal dead instead of Moon Lord.
if (item.type == ItemID.RodofDiscord)
{
return DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs;
}
return orig(item);
}
#endregion
#region Soaring Insignia Changes
private static void RemoveSoaringInsigniaInfiniteWingTime(ILContext il)
{
+85 -81
View File
@@ -1,19 +1,24 @@
using CalamityMod.Tiles.DraedonStructures;
using CalamityMod.Tiles.FurnitureExo;
using System;
using System;
using System.Reflection;
using CalamityMod.Tiles.DraedonStructures;
using CalamityMod.Tiles.FurnitureExo;
using Terraria;
using Terraria.GameContent.Drawing;
using Terraria.GameContent.Events;
using Terraria.GameContent.ItemDropRules;
using Terraria.GameContent.Liquid;
using Terraria.GameContent.UI.States;
using Terraria.Graphics.Light;
using Terraria.ModLoader;
namespace CalamityMod.ILEditing
{
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
public partial class ILChanges
public partial class ILChanges : ModSystem
{
/// <summary>
/// Loads all IL Editing changes in the mod.
/// </summary>
internal static void Load()
public override void OnModLoad()
{
// Wrap the vanilla town NPC spawning function in a delegate so that it can be tossed around and called at will.
var updateTime = typeof(Main).GetMethod("UpdateTime_SpawnTownNPCs", BindingFlags.Static | BindingFlags.NonPublic);
@@ -28,106 +33,104 @@ namespace CalamityMod.ILEditing
exoDoorClosed = ModContent.TileType<ExoDoorClosed>();
// Graphics
Terraria.IL_Main.DoDraw += AdditiveDrawing;
Terraria.On_Main.DrawGore += DrawForegroundStuff;
Terraria.On_Main.DrawCursor += UseCoolFireCursorEffect;
Terraria.On_Main.SetDisplayMode += ResetRenderTargetSizes;
Terraria.On_Main.SortDrawCacheWorms += DrawFusableParticles;
Terraria.On_Main.DrawInfernoRings += DrawForegroundParticles;
Terraria.GameContent.Drawing.On_TileDrawing.DrawPartialLiquid += DrawCustomLava;
Terraria.On_WaterfallManager.DrawWaterfall_int_int_int_float_Vector2_Rectangle_Color_SpriteEffects += DrawCustomLavafalls;
Terraria.GameContent.Liquid.IL_LiquidRenderer.DrawNormalLiquids += ChangeWaterQuadColors;
Terraria.IL_Main.oldDrawWater += DrawCustomLava3;
Terraria.Graphics.Light.On_TileLightScanner.GetTileLight += MakeSulphSeaWaterBetter;
Terraria.GameContent.Drawing.On_TileDrawing.PreDrawTiles += ClearForegroundStuff;
Terraria.GameContent.Drawing.On_TileDrawing.Draw += ClearTilePings;
Terraria.GameContent.ItemDropRules.On_CommonCode.ModifyItemDropFromNPC += ColorBlightedGel;
IL_Main.DoDraw += AdditiveDrawing;
On_Main.DrawGore += DrawForegroundStuff;
On_Main.DrawCursor += UseCoolFireCursorEffect;
On_Main.SetDisplayMode += ResetRenderTargetSizes;
On_Main.SortDrawCacheWorms += DrawFusableParticles;
On_Main.DrawInfernoRings += DrawForegroundParticles;
On_TileDrawing.DrawPartialLiquid += DrawCustomLava;
On_WaterfallManager.DrawWaterfall_int_int_int_float_Vector2_Rectangle_Color_SpriteEffects += DrawCustomLavafalls;
IL_LiquidRenderer.DrawNormalLiquids += ChangeWaterQuadColors;
IL_Main.oldDrawWater += DrawCustomLava3;
On_TileLightScanner.GetTileLight += MakeSulphSeaWaterBetter;
On_TileDrawing.PreDrawTiles += ClearForegroundStuff;
On_TileDrawing.Draw += ClearTilePings;
On_CommonCode.ModifyItemDropFromNPC += ColorBlightedGel;
// NPC behavior
Terraria.IL_Main.UpdateTime += PermitNighttimeTownNPCSpawning;
Terraria.On_Main.UpdateTime_SpawnTownNPCs += AlterTownNPCSpawnRate;
Terraria.On_NPC.ShouldEmpressBeEnraged += AllowEmpressToEnrageInBossRush;
Terraria.IL_Player.CollectTaxes += MakeTaxCollectorUseful;
Terraria.IL_Projectile.Damage += RemoveLunaticCultistHomingResist;
IL_Main.UpdateTime += PermitNighttimeTownNPCSpawning;
On_Main.UpdateTime_SpawnTownNPCs += AlterTownNPCSpawnRate;
On_NPC.ShouldEmpressBeEnraged += AllowEmpressToEnrageInBossRush;
IL_Player.CollectTaxes += MakeTaxCollectorUseful;
IL_Projectile.Damage += RemoveLunaticCultistHomingResist;
// Mechanics / features
Terraria.On_NPC.ApplyTileCollision += AllowTriggeredFallthrough;
Terraria.IL_Player.ApplyEquipFunctional += ScopesRequireVisibilityToZoom;
Terraria.On_Player.Hurt_PlayerDeathReason_int_int_bool_bool_int_bool_float_float_float += RemoveRNGFromDodges;
Terraria.IL_Player.DashMovement += FixAllDashMechanics;
Terraria.On_Player.DoCommonDashHandle += ApplyDashKeybind;
Terraria.IL_Player.GiveImmuneTimeForCollisionAttack += MakeShieldSlamIFramesConsistent;
Terraria.IL_Player.Update_NPCCollision += NerfShieldOfCthulhuBonkSafety;
Terraria.On_WorldGen.OpenDoor += OpenDoor_LabDoorOverride;
Terraria.On_WorldGen.CloseDoor += CloseDoor_LabDoorOverride;
Terraria.On_Item.AffixName += IncorporateEnchantmentInAffix;
Terraria.On_Projectile.NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float += IncorporateMinionExplodingCountdown;
On_NPC.ApplyTileCollision += AllowTriggeredFallthrough;
IL_Player.ApplyEquipFunctional += ScopesRequireVisibilityToZoom;
On_Player.Hurt_PlayerDeathReason_int_int_bool_bool_int_bool_float_float_float += RemoveRNGFromDodges;
IL_Player.DashMovement += FixAllDashMechanics;
On_Player.DoCommonDashHandle += ApplyDashKeybind;
IL_Player.GiveImmuneTimeForCollisionAttack += MakeShieldSlamIFramesConsistent;
IL_Player.Update_NPCCollision += NerfShieldOfCthulhuBonkSafety;
On_WorldGen.OpenDoor += OpenDoor_LabDoorOverride;
On_WorldGen.CloseDoor += CloseDoor_LabDoorOverride;
On_Item.AffixName += IncorporateEnchantmentInAffix;
On_Projectile.NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float += IncorporateMinionExplodingCountdown;
// TODO -- This should be unnecessary. There is now a TML hook for platform collision for ModNPCs.
Terraria.On_NPC.Collision_DecideFallThroughPlatforms += EnableCalamityBossPlatformCollision;
Terraria.IL_Wiring.HitWireSingle += AddTwinklersToStatue;
Terraria.On_Player.UpdateItemDye += FindCalamityItemDyeShader;
On_NPC.Collision_DecideFallThroughPlatforms += EnableCalamityBossPlatformCollision;
IL_Wiring.HitWireSingle += AddTwinklersToStatue;
On_Player.UpdateItemDye += FindCalamityItemDyeShader;
// Mana Burn
Terraria.IL_Player.ApplyLifeAndOrMana += ConditionallyReplaceManaSickness;
IL_Player.ApplyLifeAndOrMana += ConditionallyReplaceManaSickness;
// Custom grappling
Terraria.On_Player.GrappleMovement += CustomGrappleMovementCheck;
Terraria.On_Player.UpdatePettingAnimal += CustomGrapplePreDefaultMovement;
Terraria.On_Player.PlayerFrame += CustomGrapplePostFrame;
Terraria.On_Player.SlopeDownMovement += CustomGrapplePreStepUp;
On_Player.GrappleMovement += CustomGrappleMovementCheck;
On_Player.UpdatePettingAnimal += CustomGrapplePreDefaultMovement;
On_Player.PlayerFrame += CustomGrapplePostFrame;
On_Player.SlopeDownMovement += CustomGrapplePreStepUp;
// Damage and health balance
Terraria.On_Main.DamageVar_float_int_float += AdjustDamageVariance;
Terraria.IL_Projectile.Damage += MakeTagDamageMultiplicative;
Terraria.IL_NPC.ScaleStats_ApplyExpertTweaks += RemoveExpertHardmodeScaling;
Terraria.IL_Projectile.AI_001 += AdjustChlorophyteBullets;
Terraria.IL_Player.UpdateBuffs += NerfSharpeningStation;
On_Main.DamageVar_float_int_float += AdjustDamageVariance;
IL_Projectile.Damage += MakeTagDamageMultiplicative;
IL_NPC.ScaleStats_ApplyExpertTweaks += RemoveExpertHardmodeScaling;
IL_Projectile.AI_001 += AdjustChlorophyteBullets;
IL_Player.UpdateBuffs += NerfSharpeningStation;
// Movement speed balance
Terraria.IL_Player.UpdateJumpHeight += FixJumpHeightBoosts;
Terraria.IL_Player.Update += BaseJumpHeightAdjustment;
Terraria.IL_Player.Update += RunSpeedAdjustments;
Terraria.IL_Player.Update += NerfMagiluminescence;
Terraria.IL_Player.Update += NerfSoaringInsigniaRunAcceleration;
Terraria.IL_Player.WingMovement += RemoveSoaringInsigniaInfiniteWingTime;
IL_Player.UpdateJumpHeight += FixJumpHeightBoosts;
IL_Player.Update += BaseJumpHeightAdjustment;
IL_Player.Update += RunSpeedAdjustments;
IL_Player.Update += NerfMagiluminescence;
IL_Player.Update += NerfSoaringInsigniaRunAcceleration;
IL_Player.WingMovement += RemoveSoaringInsigniaInfiniteWingTime;
// Life regen balance
Terraria.IL_Player.UpdateLifeRegen += PreventWellFedFromBeingRequiredInExpertModeForFullLifeRegen;
IL_Player.UpdateLifeRegen += PreventWellFedFromBeingRequiredInExpertModeForFullLifeRegen;
// Mana regen balance
Terraria.IL_Player.Update += ManaRegenDelayAdjustment;
Terraria.IL_Player.UpdateManaRegen += ManaRegenAdjustment;
IL_Player.Update += ManaRegenDelayAdjustment;
IL_Player.UpdateManaRegen += ManaRegenAdjustment;
// World generation
Terraria.IL_WorldGen.Pyramid += ReplacePharaohSetInPyramids;
Terraria.IL_WorldGen.GrowLivingTree += BlockLivingTreesNearOcean;
Terraria.On_WorldGen.SmashAltar += PreventSmashAltarCode;
Terraria.IL_WorldGen.hardUpdateWorld += AdjustChlorophyteSpawnRate;
Terraria.IL_WorldGen.Chlorophyte += AdjustChlorophyteSpawnLimits;
Terraria.GameContent.UI.States.IL_UIWorldCreation.SetDefaultOptions += ChangeDefaultWorldSize;
Terraria.GameContent.UI.States.IL_UIWorldCreation.AddWorldSizeOptions += SwapSmallDescriptionKey;
IL_WorldGen.Pyramid += ReplacePharaohSetInPyramids;
IL_WorldGen.GrowLivingTree += BlockLivingTreesNearOcean;
On_WorldGen.SmashAltar += PreventSmashAltarCode;
IL_WorldGen.hardUpdateWorld += AdjustChlorophyteSpawnRate;
IL_WorldGen.Chlorophyte += AdjustChlorophyteSpawnLimits;
IL_UIWorldCreation.SetDefaultOptions += ChangeDefaultWorldSize;
IL_UIWorldCreation.AddWorldSizeOptions += SwapSmallDescriptionKey;
Terraria.IO.On_WorldFile.ClearTempTiles += ClearModdedTempTiles;
// Removal of vanilla stupidity
Terraria.IL_Player.UpdateBuffs += RemoveFeralBiteRandomDebuffs;
Terraria.GameContent.Events.IL_Sandstorm.HasSufficientWind += DecreaseSandstormWindSpeedRequirement;
Terraria.IL_Item.TryGetPrefixStatMultipliersForItem += RelaxPrefixRequirements;
Terraria.On_NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns;
// ERROR
//Terraria.IL_NPC.SpawnNPC += MakeVoodooDemonDollWork;
IL_Player.UpdateBuffs += RemoveFeralBiteRandomDebuffs;
IL_Sandstorm.HasSufficientWind += DecreaseSandstormWindSpeedRequirement;
IL_Item.TryGetPrefixStatMultipliersForItem += RelaxPrefixRequirements;
On_NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns;
On_Item.CanShimmer += ChangeRodOfHarmonyShimmerRequirement;
// TODO -- Beat Lava Slimes once and for all
// IL.Terraria.NPC.VanillaHitEffect += RemoveLavaDropsFromExpertLavaSlimes;
Terraria.IL_Projectile.CanExplodeTile += MakeMeteoriteExplodable;
Terraria.IL_Main.UpdateWindyDayState += MakeWindyDayMusicPlayLessOften;
Terraria.IL_Main.UpdateTime_StartNight += BloodMoonsRequire200MaxLife;
Terraria.IL_WorldGen.AttemptFossilShattering += PreventFossilShattering;
Terraria.On_Player.GetPickaxeDamage += RemoveHellforgePickaxeRequirement;
Terraria.On_Player.GetAnglerReward += ImproveAnglerRewards;
IL_Projectile.CanExplodeTile += MakeMeteoriteExplodable;
IL_Main.UpdateWindyDayState += MakeWindyDayMusicPlayLessOften;
IL_Main.UpdateTime_StartNight += BloodMoonsRequire200MaxLife;
IL_WorldGen.AttemptFossilShattering += PreventFossilShattering;
On_Player.GetPickaxeDamage += RemoveHellforgePickaxeRequirement;
On_Player.GetAnglerReward += ImproveAnglerRewards;
// Fix vanilla bugs exposed by Calamity mechanics
Terraria.IL_NPC.NPCLoot += FixSplittingWormBannerDrops;
IL_NPC.NPCLoot += FixSplittingWormBannerDrops;
//Additional detours that are in their own item files given they are only relevant to these specific items:
//Rover drive detours on Player.DrawInfernoRings to draw its shield
@@ -138,10 +141,11 @@ namespace CalamityMod.ILEditing
/// <summary>
/// Unloads all IL Editing changes in the mod.
/// </summary>
internal static void Unload()
public override void OnModUnload()
{
VanillaSpawnTownNPCs = null;
labDoorOpen = labDoorClosed = aLabDoorOpen = aLabDoorClosed = exoDoorClosed = exoDoorOpen = -1;
On_Item.CanShimmer -= ChangeRodOfHarmonyShimmerRequirement;
}
}
}
+1 -1
View File
@@ -91,7 +91,7 @@ namespace CalamityMod.ILEditing
return initialTexture;
}
private static VertexColors SelectLavaQuadColor(Texture2D initialTexture, VertexColors initialColor, bool forceTrue = false)
private static VertexColors SelectLavaQuadColor(Texture2D initialTexture, ref VertexColors initialColor, bool forceTrue = false)
{
initialColor.TopLeftColor = SelectLavaColor(initialTexture, initialColor.TopLeftColor, forceTrue);
initialColor.TopRightColor = SelectLavaColor(initialTexture, initialColor.TopRightColor, forceTrue);
+2 -43
View File
@@ -689,47 +689,6 @@ namespace CalamityMod.ILEditing
#region Custom Lava Visuals
private static void DrawCustomLava(Terraria.GameContent.Drawing.On_TileDrawing.orig_DrawPartialLiquid orig, TileDrawing self, bool behindBlocks, Tile tileCache, ref Vector2 position, ref Rectangle liquidSize, int liquidType, ref VertexColors colors)
{
//liquidType = CustomLavaManagement.SelectLavafallStyle(liquidType);
//orig(self, behindBlocks, tileCache, ref position, ref liquidSize, liquidType, ref colors);
/*if (liquidType != 1)
{
orig(self, tileCache, position, liquidSize, liquidType, aColor);
return;
}
Texture2D initialTexture = TextureAssets.LiquidSlope[liquidType].Value;
Texture2D slopeTexture = SelectLavaTexture(liquidType == 1 ? CustomLavaManagement.LavaSlopeTexture : initialTexture, LiquidTileType.Slope);
aColor = SelectLavaColor(initialTexture, aColor, liquidType == 1);
int slope = (int)tileCache.Slope;
if (!TileID.Sets.BlocksWaterDrawingBehindSelf[tileCache.TileType] || slope == 0)
{
Texture2D liquidTexture = SelectLavaTexture(liquidType == 1 ? CustomLavaManagement.LavaBlockTexture : TextureAssets.Liquid[liquidType].Value, LiquidTileType.Block);
Main.spriteBatch.Draw(liquidTexture, position, liquidSize, aColor, 0f, default, 1f, 0, 0f);
return;
}
liquidSize.X += 18 * (slope - 1);
if (tileCache.Slope == SlopeType.SlopeDownLeft)
{
Main.spriteBatch.Draw(slopeTexture, position, liquidSize, aColor, 0f, Vector2.Zero, 1f, 0, 0f);
return;
}
if (tileCache.Slope == SlopeType.SlopeDownRight)
{
Main.spriteBatch.Draw(slopeTexture, position, liquidSize, aColor, 0f, Vector2.Zero, 1f, 0, 0f);
return;
}
if (tileCache.Slope == SlopeType.SlopeUpLeft)
{
Main.spriteBatch.Draw(slopeTexture, position, liquidSize, aColor, 0f, Vector2.Zero, 1f, 0, 0f);
return;
}
if (tileCache.Slope == SlopeType.SlopeUpRight)
{
Main.spriteBatch.Draw(slopeTexture, position, liquidSize, aColor, 0f, Vector2.Zero, 1f, 0, 0f);
}*/
if (liquidType != 1)
{
orig(self, behindBlocks, tileCache, ref position, ref liquidSize, liquidType, ref colors);
@@ -737,7 +696,7 @@ namespace CalamityMod.ILEditing
}
int slope = (int)tileCache.Slope;
colors = SelectLavaQuadColor(TextureAssets.LiquidSlope[liquidType].Value, colors, liquidType == 1);
colors = SelectLavaQuadColor(TextureAssets.LiquidSlope[liquidType].Value, ref colors, liquidType == 1);
if (!TileID.Sets.BlocksWaterDrawingBehindSelf[tileCache.TileType] || behindBlocks || slope == 0)
{
Texture2D liquidTexture = SelectLavaTexture(liquidType == 1 ? CustomLavaManagement.LavaBlockTexture : TextureAssets.Liquid[liquidType].Value, LiquidTileType.Block);
@@ -800,7 +759,7 @@ namespace CalamityMod.ILEditing
cursor.Emit(OpCodes.Ldloc, 4);
cursor.EmitDelegate<Func<VertexColors, Texture2D, int, int, int, VertexColors>>((initialColor, initialTexture, liquidType, x, y) =>
{
initialColor = SelectLavaQuadColor(initialTexture, initialColor, liquidType == 1);
initialColor = SelectLavaQuadColor(initialTexture, ref initialColor, liquidType == 1);
if (liquidType == ModContent.Find<ModWaterStyle>("CalamityMod/SunkenSeaWater").Slot ||
liquidType == ModContent.Find<ModWaterStyle>("CalamityMod/SulphuricWater").Slot ||
@@ -117,33 +117,6 @@ namespace CalamityMod.ILEditing
}
#endregion Prevention of Slime Rain Spawns When Near Bosses
#region Voodoo Demon Doll Spawn Manipulations
// This may seem absolutely obscene, but vanilla spawn behavior does not occur within the spawn pool that TML provides, only modded
// spawns do. Pretty much everything else is simply a fuckton of manual conditional NPC.NewNPC calls. As such, the only way to bypass
// vanilla spawn behaviors is the IL edit them out of existence. Here, simply replacing the voodoo demon ID with an empty one is performed.
// Something cleaner could probably be done, such as getting rid of the entire NPC.NewNPC call, but this is the easiest solution I can come up with.
private static void MakeVoodooDemonDollWork(ILContext il)
{
var cursor = new ILCursor(il);
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcI4(NPCID.VoodooDemon)))
{
LogFailure("Voodoo Demon Doll Mechanic", "Could not locate the Voodoo Demon ID.");
return;
}
cursor.Remove();
cursor.Emit(OpCodes.Ldloc, 10);
cursor.EmitDelegate<Func<int, int>>(spawnPlayerIndex =>
{
if (Main.player[spawnPlayerIndex].active && Main.player[spawnPlayerIndex].Calamity().disableVoodooSpawns)
return NPCID.None;
return NPCID.VoodooDemon;
});
}
#endregion Voodoo Demon Doll Spawn Manipulations
#region Remove Feral Bite Random Debuffs
private static void RemoveFeralBiteRandomDebuffs(ILContext il)
{
+1 -10
View File
@@ -3,7 +3,6 @@ using CalamityMod.Items.Materials;
using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
using System.Collections.Generic;
using System.Linq;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
@@ -27,15 +26,7 @@ namespace CalamityMod.Items.Accessories
Item.Calamity().devItem = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
string hotkey = CalamityKeybinds.AngelicAllianceHotKey.TooltipHotkeyString();
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip4");
if (line != null)
line.Text = "Press " + hotkey + " to grace yourself in divinity for 15 seconds";
}
public override void ModifyTooltips(List<TooltipLine> list) => list.IntegrateHotkey(CalamityKeybinds.AngelicAllianceHotKey);
public override void UpdateAccessory(Player player, bool hideVisual)
{
+1 -9
View File
@@ -5,7 +5,6 @@ using CalamityMod.Items.Materials;
using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
using System.Collections.Generic;
using System.Linq;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -28,14 +27,7 @@ namespace CalamityMod.Items.Accessories
Item.rare = ModContent.RarityType<DarkBlue>();
}
public override void ModifyTooltips(List<TooltipLine> list)
{
string hotkey = CalamityKeybinds.AegisHotKey.TooltipHotkeyString();
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip5");
if (line != null)
line.Text = "Press " + hotkey + " to activate buffs to all damage, crit chance, and defense";
}
public override void ModifyTooltips(List<TooltipLine> list) => list.IntegrateHotkey(CalamityKeybinds.AegisHotKey);
public override void UpdateAccessory(Player player, bool hideVisual)
{
+1 -9
View File
@@ -3,7 +3,6 @@ using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.Rarities;
using System.Collections.Generic;
using System.Linq;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -23,14 +22,7 @@ namespace CalamityMod.Items.Accessories
Item.rare = ModContent.RarityType<Turquoise>();
}
public override void ModifyTooltips(List<TooltipLine> list)
{
string hotkey = CalamityKeybinds.AstralArcanumUIHotkey.TooltipHotkeyString();
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip3");
if (line != null)
line.Text = "Press " + hotkey + " to toggle teleportation UI while no bosses are alive";
}
public override void ModifyTooltips(List<TooltipLine> list) => list.IntegrateHotkey(CalamityKeybinds.AstralArcanumUIHotkey);
public override void UpdateAccessory(Player player, bool hideVisual)
{
+1 -9
View File
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using System.Linq;
namespace CalamityMod.Items.Accessories
{
@@ -32,14 +31,7 @@ namespace CalamityMod.Items.Accessories
player.Calamity().stealthGenMoving += 0.1f;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
string hotkey = CalamityKeybinds.PlaguePackHotKey.TooltipHotkeyString();
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip3");
if (line != null)
line.Text = "Press " + hotkey + " to consume 25% of your maximum stealth to perform a swift upwards/diagonal dash which leaves a trail of lightning bolts";
}
public override void ModifyTooltips(List<TooltipLine> list) => list.IntegrateHotkey(CalamityKeybinds.PlaguePackHotKey);
public override void AddRecipes()
{
+1 -9
View File
@@ -5,7 +5,6 @@ using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using System.Linq;
namespace CalamityMod.Items.Accessories
{
@@ -22,14 +21,7 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
string hotkey = CalamityKeybinds.AstralTeleportHotKey.TooltipHotkeyString();
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip2");
if (line != null)
line.Text = "Press " + hotkey + " to teleport to a random location while no bosses are alive";
}
public override void ModifyTooltips(List<TooltipLine> list) => list.IntegrateHotkey(CalamityKeybinds.AstralTeleportHotKey);
public override void UpdateAccessory(Player player, bool hideVisual)
{
+16 -34
View File
@@ -3,10 +3,10 @@ using CalamityMod.CalPlayer;
using CalamityMod.Rarities;
using CalamityMod.World;
using System.Collections.Generic;
using System.Linq;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
@@ -15,6 +15,7 @@ namespace CalamityMod.Items.Accessories
{
public new string LocalizationCategory => "Items.Accessories";
private const double ContactDamageReduction = 0.15D;
public const double DefenseDamageMultiplier = 0.5D;
// Duration of Nanomachines in frames.
internal static readonly int NanomachinesDuration = 120;
@@ -23,17 +24,17 @@ namespace CalamityMod.Items.Accessories
// Duration of time where Nanomachines won't accumulate after taking damage, in frames.
internal static readonly int NanomachinePauseAfterDamage = 60;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(
(ContactDamageReduction * 100).ToString("N0"),
(100 - (DefenseDamageMultiplier * 100)).ToString("N0"),
NanomachinesHealPerFrame * NanomachinesDuration,
NanomachinesDuration / 60);
public override void SetStaticDefaults()
{
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 11));
ItemID.Sets.AnimatesAsSoul[Type] = true;
string seconds = NanomachinePauseAfterDamage == 60 ? "second" : "seconds";
string pauseDurationTooltip = $"{NanomachinePauseAfterDamage / 60} {seconds}";
string totalHealTooltip = $"{NanomachinesHealPerFrame * NanomachinesDuration}";
string healDurationTooltip = $"{NanomachinesDuration / 60}";
}
}
public override void SetDefaults()
{
@@ -62,35 +63,16 @@ namespace CalamityMod.Items.Accessories
public override void ModifyTooltips(List<TooltipLine> list)
{
// The 3rd tooltip line "Replaces Adrenaline..." is replaced on Normal or Expert
TooltipLine nanomachineMeterLine = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip2");
if (nanomachineMeterLine != null && !CalamityWorld.revenge)
nanomachineMeterLine.Text = "Adds the Nanomachines meter";
// Add the hotkey
list.IntegrateHotkey(CalamityKeybinds.AdrenalineHotKey);
// The 4th tooltip line "Unlike Adrenaline..." is replaced on Normal or Expert
TooltipLine doesntStopOnDamageLine = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip3");
if (doesntStopOnDamageLine != null && !CalamityWorld.revenge)
doesntStopOnDamageLine.Text = "Nanomachines accumulate over time while fighting bosses\n" +
$"Taking damage stops the accumulation for {NanomachinePauseAfterDamage / 60} seconds";
// Add the proper description which changes depending on world difficulty
string desc = this.GetLocalization(CalamityWorld.revenge ? "NanomachinesReplace" : "NanomachinesAdd").Format(NanomachinePauseAfterDamage / 60);
list.FindAndReplace("[NANODESC]", desc);
// The 5th tooltip line "With full Nanomachines" has the & replaced with the hotkey.
string adrenKey = CalamityKeybinds.AdrenalineHotKey.TooltipHotkeyString();
TooltipLine hotkeyLine = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip4");
if (hotkeyLine != null)
{
string tooltipWithHotkey = hotkeyLine.Text.Replace("&", adrenKey);
hotkeyLine.Text = tooltipWithHotkey;
}
// The 6th tooltip line "While healing..." has the @ replaced with full adrenaline DR.
// For whatever reason this method overrides the entire line instead of replacing the character as intended, so we duplicate the line.
// Add the proper DR value
string fullAdrenDRString = (100f * BalancingConstants.FullAdrenalineDR).ToString("N0");
TooltipLine healingDRLine = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip5");
if (healingDRLine != null)
{
string tooltipWithDR = fullAdrenDRString.Replace("@", fullAdrenDRString);
healingDRLine.Text = "While healing, you take " + tooltipWithDR + "% less damage";
}
list.FindAndReplace("[DR]", fullAdrenDRString);
}
}
}
+1 -1
View File
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Accessories
CreateRecipe().
AddIngredient<ExodiumCluster>(25).
AddIngredient<Navyplate>(25).
AddIngredient<Phantoplasm>(5).
AddIngredient<Polterplasm>(5).
AddTile(TileID.DemonAltar).
Register();
}
+1 -9
View File
@@ -3,7 +3,6 @@ using CalamityMod.CalPlayer;
using CalamityMod.CalPlayer.Dashes;
using CalamityMod.Rarities;
using System.Collections.Generic;
using System.Linq;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -26,14 +25,7 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
string hotkey = CalamityKeybinds.AegisHotKey.TooltipHotkeyString();
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip5");
if (line != null)
line.Text = "Press " + hotkey + " to activate buffs to all damage, crit chance and defense";
}
public override void ModifyTooltips(List<TooltipLine> list) => list.IntegrateHotkey(CalamityKeybinds.AegisHotKey);
public override void UpdateAccessory(Player player, bool hideVisual)
{
+1 -9
View File
@@ -2,7 +2,6 @@
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using System.Linq;
namespace CalamityMod.Items.Accessories
{
@@ -31,13 +30,6 @@ namespace CalamityMod.Items.Accessories
player.Calamity().stealthGenMoving += 0.1f;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
string hotkey = CalamityKeybinds.PlaguePackHotKey.TooltipHotkeyString();
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip2");
if (line != null)
line.Text = "Press " + hotkey + " to consume 25% of your maximum stealth to perform a swift upwards/diagonal dash which leaves a trail of plagued clouds";
}
public override void ModifyTooltips(List<TooltipLine> list) => list.IntegrateHotkey(CalamityKeybinds.PlaguePackHotKey);
}
}
+6 -54
View File
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Accessories
public override void SetStaticDefaults()
{
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(8, 4));
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(8, 4));
ItemID.Sets.AnimatesAsSoul[Type] = true;
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<ProfanedSoulArtifact>();
@@ -79,66 +79,18 @@ namespace CalamityMod.Items.Accessories
bool draedon = DownedBossSystem.downedExoMechs;
if (!scal || !draedon)
{
string rejectionReason = (!draedon) ? "The soul within this crystal has been defiled by overwhelming energy waves from dangerous mechanations" : "The soul within this crystal has been defiled by the powerful magic of a supreme witch"; //there might be a better way to word the draedon line, not sure
TooltipLine lineLock = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1");
if (lineLock != null)
{
lineLock.Text = rejectionReason;
lineLock.OverrideColor = new Color(240, 90, 90);
}
int insertIndex = tooltips.FindIndex(x => x.Name == "Tooltip1" && x.Mod == "Terraria");
if (insertIndex != -1)
{
TooltipLine rejectLine = new TooltipLine(this.Mod, "CalamityMod:RejectLine", "Merchants will reject a defiled soul such as this.");
tooltips.Insert(insertIndex + 1, rejectLine);
}
string reject = this.GetLocalizedValue(!draedon ? "ExoMechsLock" : "CalamitasLock") + "\n" + this.GetLocalizedValue("Reject");
tooltips.FindAndReplace("[STATUS]", reject);
TooltipLine linePrice = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Sell price");
if (linePrice != null)
linePrice.Text = "";
}
else
{
TooltipLine line = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1");
int manaCost = (int)(100 * Main.player[Main.myPlayer].manaCost);
if (line != null)
line.Text = "Requires 10 minion slots to use in order to grant the following effects\n" +
"All non-summon weapons are converted into powerful summon variations\n" +
"Falling below 50% life will empower these attacks";
int insertIndex = tooltips.FindIndex(x => x.Name == "Tooltip1" && x.Mod == "Terraria");
if (insertIndex != -1)
{
TooltipLine meleeAttack = new TooltipLine(this.Mod, "CalamityMod:MeleeAttack", "Transforms Melee attacks into a barrage of spears");
meleeAttack.OverrideColor = new Color(240, 90, 90);
tooltips.Insert(insertIndex + 1, meleeAttack);
TooltipLine mageAttack = new TooltipLine(this.Mod, "CalamityMod:MageAttack", $"Transforms Magic attacks into a powerful splitting fireball for {manaCost} mana per cast");
mageAttack.OverrideColor = new Color(58, 131, 228);
tooltips.Insert(insertIndex + 2, mageAttack);
TooltipLine rangedAttack = new TooltipLine(this.Mod, "CalamityMod:RangedAttack", "Transforms Ranged attacks into a flurry of fireballs and meteors");
rangedAttack.OverrideColor = new Color(133, 224, 146);
tooltips.Insert(insertIndex + 3, rangedAttack);
TooltipLine rogueAttack = new TooltipLine(this.Mod, "CalamityMod:RogueAttack", "Transforms Rogue attacks into a deadly crystalline spiral");
rogueAttack.OverrideColor = new Color(233, 116, 81);
tooltips.Insert(insertIndex + 4, rogueAttack);
TooltipLine remainingTip = new TooltipLine(this.Mod, "CalamityMod:RemainingTip", "Summons and empowers the profaned babs to fight alongside you\n" +
"You are no longer affected by burn out when hit\n" +
"Provides buffs depending on the time of day\n" +
"Thinking back, it was a boring life");
tooltips.Insert(insertIndex + 5, remainingTip);
TooltipLine purityTip = new TooltipLine(this.Mod, "CalamityMod:PurityTip", "And so we burn it all in the name of purity");
purityTip.OverrideColor = new Color(255, 191, 73);
tooltips.Insert(insertIndex + 6, purityTip);
}
string manaCost = (100 * Main.player[Main.myPlayer].manaCost).ToString("N0");
string full = this.GetLocalization("FullTooltip").Format(manaCost);
tooltips.FindAndReplace("[STATUS]", full);
}
}
+1 -9
View File
@@ -2,7 +2,6 @@
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using System.Linq;
namespace CalamityMod.Items.Accessories
{
@@ -19,14 +18,7 @@ namespace CalamityMod.Items.Accessories
Item.defense = 2;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
string hotkey = CalamityKeybinds.SandCloakHotkey.TooltipHotkeyString();
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1");
if (line != null)
line.Text = "Press " + hotkey + " to consume 10% of your maximum stealth to create a protective dust veil which provides +6 defense and +2 life regen";
}
public override void ModifyTooltips(List<TooltipLine> list) => list.IntegrateHotkey(CalamityKeybinds.SandCloakHotkey);
public override void UpdateAccessory(Player player, bool hideVisual)
{
+23 -33
View File
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Accessories
public override void SetStaticDefaults()
{
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(7, 5));
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(7, 5));
ItemID.Sets.AnimatesAsSoul[Type] = true;
}
@@ -102,42 +102,32 @@ namespace CalamityMod.Items.Accessories
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
// Stat tooltips are added dynamically.
StringBuilder sb = new StringBuilder(256);
// Add the proper description which changes depending on world difficulty
string desc = CalamityWorld.revenge ? this.GetLocalizedValue("RageModified") : this.GetLocalization("RageAdd").Format(CalamityKeybinds.RageHotKey.TooltipHotkeyString());
tooltips.FindAndReplace("[RAGEDESC]", desc);
// Line 5: If not on Rev+, note that the accessory enables Rage.
TooltipLine rageOverTimeLine = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip4");
if (rageOverTimeLine != null && !CalamityWorld.revenge)
rageOverTimeLine.Text = "Adds the Rage meter\n" + rageOverTimeLine.Text;
// Add the current level
tooltips.FindAndReplace("[LEVEL]", level.ToString());
// Line 9: Current level
sb.Append("Current level: ");
sb.Append(level);
sb.Append(" (+");
sb.Append(level);
sb.Append("% Rage Mode damage)");
tooltips.Add(new TooltipLine(Mod, "Tooltip8", sb.ToString()));
sb.Clear();
if (level < MaxLevel)
// Add the progress
string progressKey = "[PROGRESS]";
TooltipLine progressLine = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Text.Contains(progressKey));
if (progressLine != null)
{
long progressToNextLevel = totalRageDamage - CumulativeLevelCost(level);
long totalToNextLevel = LevelCost(level + 1);
double ratio = (double)progressToNextLevel / totalToNextLevel;
string percent = (100D * ratio).ToString("0.00");
// Line 10: Progress to next level
sb.Append("Progress to next level: ");
sb.Append(percent);
sb.Append('%');
tooltips.Add(new TooltipLine(Mod, "Tooltip9", sb.ToString()));
sb.Clear();
if (level < MaxLevel)
{
long progressToNextLevel = totalRageDamage - CumulativeLevelCost(level);
long totalToNextLevel = LevelCost(level + 1);
double ratio = (double)progressToNextLevel / totalToNextLevel;
string percent = (100D * ratio).ToString("0.00");
progressLine.Text = progressLine.Text.Replace(progressKey, percent);
}
else
progressLine.Text = string.Empty;
}
// Line 11: Total damage dealt
sb.Append("Total Rage Mode damage: ");
sb.Append(totalRageDamage);
tooltips.Add(new TooltipLine(Mod, "Tooltip10", sb.ToString()));
// Add the current cumulative damage
tooltips.FindAndReplace("[DAMAGE]", totalRageDamage.ToString());
}
public override void SaveData(TagCompound tag)
@@ -228,7 +218,7 @@ namespace CalamityMod.Items.Accessories
// Display a level up text notification.
Rectangle textArea = new Rectangle((int)Player.Center.X, (int)Player.Center.Y, 1, 1);
Color textColor = new Color(236, 209, 236);
CombatText.NewText(textArea, textColor, "The Community cracks...", false, false);
CombatText.NewText(textArea, textColor, CalamityUtils.GetTextValueFromModItem<ShatteredCommunity>("LevelUpText"), false, false);
}
}
}
+1 -9
View File
@@ -1,6 +1,5 @@
using CalamityMod.Rarities;
using System.Collections.Generic;
using System.Linq;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -20,14 +19,7 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
string hotkey = CalamityKeybinds.SpectralVeilHotKey.TooltipHotkeyString();
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1");
if (line != null)
line.Text = "Press " + hotkey + " to consume 25% of your maximum stealth to perform a mid-range teleport and render you momentarily invulnerable";
}
public override void ModifyTooltips(List<TooltipLine> list) => list.IntegrateHotkey(CalamityKeybinds.SpectralVeilHotKey);
public override void UpdateAccessory(Player player, bool hideVisual)
{
+175 -251
View File
@@ -13,13 +13,13 @@ namespace CalamityMod.Items.Accessories
public class StatMeter : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void SetStaticDefaults()
{
// TODO -- On April 1st, rename this item to "Pasta Strainer"
}
public override void SetDefaults()
{
// Pasta Strainer
if (Main.zenithWorld)
Item.SetNameOverride(this.GetLocalizedValue("FoolsName"));
Item.width = 26;
Item.height = 26;
Item.value = CalamityGlobalItem.Rarity3BuyPrice;
@@ -37,266 +37,190 @@ namespace CalamityMod.Items.Accessories
Item heldItem = null;
if (player.selectedItem >= 0 && player.selectedItem < Main.InventorySlotsTotal)
heldItem = player.ActiveItem();
// Replace the vanilla tooltip with a full stat readout
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0");
if (line != null)
line.Text = CreateStatMeterTooltip(player, modPlayer, heldItem);
// To save screen space, favorited tooltips do not exist for the Stat Meter
list.RemoveAll(l => l.Mod == "Terraria" && (l.Name == "Favorite" || l.Name == "FavoriteDesc"));
}
private static string CreateStatMeterTooltip(Player player, CalamityPlayer modPlayer, Item heldItem)
{
static string OnePlace(float f) => f.ToString("n1");
static string TwoPlaces(float f) => f.ToString("n2");
//
// RAW STATS (as obtained from the game engine, not yet modified for display)
//
// Defense
int defense = player.GetCurrentDefense(false);
float DR = player.endurance;
int lifeRegen = player.lifeRegen; // Normally we'd divide this by 2 in Expert without Well Fed, but we disable that shit
// Mobility
// Positive boosts need a + prefix, negative will have its own - sign automatically.
// There's a "clever" way to do this with formatting but it's harder.
static string Sign(float f) => (f >= 0 ? "+" : string.Empty);
int numRageBoosters = (modPlayer.rageBoostOne ? 1 : 0) + (modPlayer.rageBoostTwo ? 1 : 0) + (modPlayer.rageBoostThree ? 1 : 0);
int rageDuration = BalancingConstants.DefaultRageDuration + numRageBoosters * BalancingConstants.RageDurationPerBooster;
int numAdrenBoosters = (modPlayer.adrenalineBoostOne ? 1 : 0) + (modPlayer.adrenalineBoostTwo ? 1 : 0) + (modPlayer.adrenalineBoostThree ? 1 : 0);
float adrenalineDR = BalancingConstants.FullAdrenalineDR + numAdrenBoosters * BalancingConstants.AdrenalineDRPerBooster;
// Only append rippers stats in Rev+
string stats1 = !CalamityWorld.revenge ? string.Empty : "\n" + this.GetLocalization("RevStats").Format(
OnePlace(100f * modPlayer.RageDamageBoost),
rageDuration / 60,
OnePlace(100f * modPlayer.GetAdrenalineDamage()),
OnePlace(100f * adrenalineDR));
list.FindAndReplace("[REV]", stats1);
// Append item stats only if the held item isn't null, and base it off of the item's damage type.
string stats2 = string.Empty;
if (heldItem != null && !heldItem.IsAir)
{
// If block/wall, add respective placement stats, and ignore all combat stats
if (heldItem.createWall >= 0 || heldItem.createTile >= 0)
{
int extraBlockRangeX = player.blockRange + Player.tileRangeX - 5;
int extraBlockRangeY = player.blockRange + Player.tileRangeY - 4;
stats2 += "\n" + this.GetLocalization("PlacementRange").Format(Sign(extraBlockRangeX) + extraBlockRangeX, Sign(extraBlockRangeY) + extraBlockRangeY);
if (heldItem.createTile >= 0 && player.tileSpeed != 0f)
{
float tileSpeed = (1f / player.tileSpeed) - 1f;
stats2 += this.GetLocalization("TileSpeed").Format(Sign(tileSpeed) + OnePlace(100f * tileSpeed));
}
else if (heldItem.createWall >= 0 && player.wallSpeed != 0f)
{
float wallSpeed = (1f / player.wallSpeed) - 1f;
stats2 += this.GetLocalization("WallSpeed").Format(Sign(wallSpeed) + OnePlace(100f * wallSpeed));
}
}
else if (heldItem.damage >= 0)
{
DamageClass dc = heldItem.DamageType;
bool displayCrit = true;
bool displayAttackSpeed = true;
if (dc == DamageClass.Summon)
{
displayCrit = false;
displayAttackSpeed = false; // Minions specifically don't display attack speed. Whips do.
}
else if (dc == DamageClass.SummonMeleeSpeed)
{
displayCrit = false;
}
// Uses GetTotalDamage instead of GetDamage. GetTotalDamage adds all inherited stats as well.
// This also applies to GetTotalCritChance, GetTotalAttackSpeed, and GetTotalArmorPenetration.
var currentStats = player.GetTotalDamage(dc);
string damageStatLine = string.Empty;
float baseFlatDamage = currentStats.Base; // flat increases to the base damage of the weapon. boosted by % damage and multiplicative damage
if (baseFlatDamage != 0f)
damageStatLine += this.GetLocalization("DamageBase").Format(Sign(baseFlatDamage) + OnePlace(baseFlatDamage));
float normalDamage = currentStats.Additive - 1f; // 1f = +0%, 2f = +100%
damageStatLine += this.GetLocalization("DamageNormal").Format(TwoPlaces(100f * normalDamage));
float multDamage = currentStats.Multiplicative; // direct multiplier. 1f = 1x, 2f = 2x, applies after standard boosts
if (multDamage != 1f)
damageStatLine += this.GetLocalization("DamageMult").Format(TwoPlaces(multDamage));
float flatDamage = currentStats.Flat; // direct flat addition, applies after multiplication
if (flatDamage != 0f)
damageStatLine += this.GetLocalization("DamageFlat").Format(Sign(flatDamage) + OnePlace(flatDamage));
stats2 += "\n" + this.GetLocalization("DamageStats").Format(
dc.DisplayName.ToString(),
damageStatLine,
OnePlace(player.GetTotalArmorPenetration(dc)));
// Newline between damage and crit
if (displayCrit)
stats2 += "\n" + this.GetLocalization("Crit").Format(TwoPlaces(player.GetTotalCritChance(dc)));
if (displayAttackSpeed)
{
// Newline between crit and attack speed
float attackSpeed = player.GetTotalAttackSpeed(dc) - 1f; // starts at 1f, 2f = +100% = DOUBLE attack speed, HALF animation time
stats2 += "\n" + this.GetLocalization("AttackSpeed").Format(Sign(attackSpeed) + TwoPlaces(100f * attackSpeed));
// For whips specifically, also display melee attack speed on the same line.
// Only display MELEE-SPECIFIC attack speed, not the total inheritance of attack speed for melee,
// because classless attack speed will already affect the whip.
if (dc == DamageClass.SummonMeleeSpeed)
{
float meleeSpeed = player.GetAttackSpeed<MeleeDamageClass>() - 1f;
stats2 += this.GetLocalization("WhipMeleeInheritance").Format(Sign(meleeSpeed) + TwoPlaces(100f * meleeSpeed));
}
}
// If ranged, or any direct subclass thereof, display ranged ammo consumption
if (dc == DamageClass.Ranged || dc.GetModifierInheritance(DamageClass.Ranged).Equals(StatInheritanceData.Full))
stats2 += "\n" + this.GetLocalization("RangedStats").Format(TwoPlaces(100f * player.GetRangedAmmoCostReduction()));
// If magic, or any direct subclass thereof, display mana stats
if (dc == DamageClass.Magic || dc == DamageClass.MagicSummonHybrid || dc.GetModifierInheritance(DamageClass.Magic).Equals(StatInheritanceData.Full))
stats2 += "\n" + this.GetLocalization("MagicStats").Format(TwoPlaces(100f * player.manaCost), player.manaRegen);
// If summon, or any direct subclass thereof, AND NOT A WHIP, display minion/sentry slots
if (dc != DamageClass.SummonMeleeSpeed && (dc == DamageClass.Summon || dc.GetModifierInheritance(DamageClass.Summon).Equals(StatInheritanceData.Full)))
stats2 += "\n" + this.GetLocalization("SummonStats").Format(player.maxMinions, player.maxTurrets);
// If whip, show whip range
float whipRange = player.whipRangeMultiplier - 1f;
if (dc == DamageClass.SummonMeleeSpeed || dc.GetModifierInheritance(DamageClass.SummonMeleeSpeed).Equals(StatInheritanceData.Full))
stats2 += "\n" + this.GetLocalization("WhipStats").Format(Sign(whipRange) + TwoPlaces(100f * whipRange));
// If throwing or rogue, display rogue stats.
float rogueVelocity = modPlayer.rogueVelocity - 1f;
if (dc == DamageClass.Throwing || dc.GetModifierInheritance(DamageClass.Throwing).Equals(StatInheritanceData.Full))
{
stats2 += "\n" + this.GetLocalization("RogueStats").Format(
(int)(100f * modPlayer.rogueStealthMax),
TwoPlaces(60f * player.GetStandingStealthRegen()),
TwoPlaces(60f * player.GetMovingStealthRegen()),
Sign(rogueVelocity) + TwoPlaces(100f * rogueVelocity));
// Rogue consumable chance
if (heldItem.consumable)
stats2 += this.GetLocalization("RogueConsumption").Format(100f * modPlayer.rogueAmmoCost);
}
// If tool, add tool range
if (heldItem.pick > 0 || heldItem.axe > 0 || heldItem.hammer > 0)
{
int extraToolRangeX = Player.tileRangeX - 5;
int extraToolRangeY = Player.tileRangeY - 4;
stats2 += "\n" + this.GetLocalization("ToolRange").Format(Sign(extraToolRangeX) + extraToolRangeX, Sign(extraToolRangeY) + extraToolRangeY);
// Pickaxe speed specifically
if (heldItem.pick > 0)
{
float pickSpeed = 1f - player.pickSpeed;
stats2 += this.GetLocalization("MiningSpeed").Format(Sign(pickSpeed) + OnePlace(100f * pickSpeed));
}
}
}
}
list.FindAndReplace("[ITEMS]", stats2);
float moveSpeedBoost = player.moveSpeed - 1f;
float jumpBoost = player.GetJumpBoost();
float wingFlightTime = player.wingTimeMax;
// Luck
// Does not use NormalizedLuck. Presents the player's luck exactly as it is used by the game engine.
// NormalizedLuck is only used in one place: the Wizard's luck report. Which is entirely obsoleted by this Meter.
float luck = player.luck;
// No melee-specific stats anymore, because True Melee is its own class
// Ranged
float rangedAmmoConsumption = player.GetRangedAmmoCostReduction();
// Magic
float manaCost = player.manaCost;
int manaRegen = player.manaRegen;
// Summon
int minionSlots = player.maxMinions;
// Rogue
float rogueStealth = modPlayer.rogueStealthMax;
float standingRegen = player.GetStandingStealthRegen();
float movingRegen = player.GetMovingStealthRegen();
float rogueVelocity = modPlayer.rogueVelocity - 1f;
float rogueAmmoConsumption = modPlayer.rogueAmmoCost;
// Rippers
float rageDamage = modPlayer.RageDamageBoost;
float adrenalineDamage = modPlayer.GetAdrenalineDamage();
int numAdrenBoosters = (modPlayer.adrenalineBoostOne ? 1 : 0) + (modPlayer.adrenalineBoostTwo ? 1 : 0) + (modPlayer.adrenalineBoostThree ? 1 : 0);
float adrenalineDR = BalancingConstants.FullAdrenalineDR + numAdrenBoosters * BalancingConstants.AdrenalineDRPerBooster;
// Abyss
int lightLevel = player.GetCurrentAbyssLightLevel();
float breathLoss = modPlayer.abyssBreathLossStat;
float breathLossRate = modPlayer.abyssBreathLossRateStat;
int lifeLostAtZeroBreath = modPlayer.abyssLifeLostAtZeroBreathStat;
int abyssDefenseLoss = modPlayer.abyssDefenseLossStat;
// The notice about held item mattering is always displayed first.
StringBuilder sb = new StringBuilder("Displays almost all player stats\nOffensive stats displayed vary with held item", 1024);
// Only append rippers stats in Rev+
if (CalamityWorld.revenge)
{
string rageDamageDisplay = TwoPlaces(100f * rageDamage);
string adrenalineDamageDisplay = TwoPlaces(100f * adrenalineDamage);
string adrenalineDRDisplay = TwoPlaces(100f * adrenalineDR);
sb.Append("\n\nRage Damage Boost: ").Append(rageDamageDisplay).Append("%\n");
sb.Append("Adrenaline Damage Boost: ").Append(adrenalineDamageDisplay)
.Append("% | Adrenaline DR Boost: ").Append(adrenalineDRDisplay).Append("%");
}
// Append item stats only if the held item isn't null, and base it off of the item's damage type.
if (heldItem != null && !heldItem.IsAir)
{
DamageClass dc = heldItem.DamageType;
bool displayCrit = true;
bool displayAttackSpeed = true;
string damageClassName = "Unsupported";
if (dc == DamageClass.Default)
damageClassName = "True (No Scaling)";
else if (dc == DamageClass.Generic)
damageClassName = "Classless";
else if (dc == AverageDamageClass.Instance)
damageClassName = "Averaged";
else if (dc == TrueMeleeDamageClass.Instance || dc == TrueMeleeNoSpeedDamageClass.Instance)
damageClassName = "True Melee";
else if (dc == DamageClass.Melee || dc == DamageClass.MeleeNoSpeed)
damageClassName = "Melee";
else if (dc == DamageClass.Ranged)
damageClassName = "Ranged";
else if (dc == DamageClass.Magic)
damageClassName = "Magic";
else if (dc == DamageClass.MagicSummonHybrid)
damageClassName = "Magic+Summon";
else if (dc == DamageClass.Summon)
{
damageClassName = "Minion";
displayCrit = false;
displayAttackSpeed = false; // Minions specifically don't display attack speed. Whips do.
}
else if (dc == DamageClass.SummonMeleeSpeed)
{
damageClassName = "Whip";
displayCrit = false;
}
else if (dc == RogueDamageClass.Instance)
damageClassName = "Rogue";
else if (dc == DamageClass.Throwing)
damageClassName = "Throwing";
// Uses GetTotalDamage instead of GetDamage. GetTotalDamage adds all inherited stats as well.
// This also applies to GetTotalCritChance, GetTotalAttackSpeed, and GetTotalArmorPenetration.
var currentStats = player.GetTotalDamage(dc);
float baseFlatDamage = currentStats.Base; // flat increases to the base damage of the weapon. boosted by % damage and multiplicative damage
float normalDamage = currentStats.Additive - 1f; // 1f = +0%, 2f = +100%
float multDamage = currentStats.Multiplicative; // direct multiplier. 1f = 1x, 2f = 2x, applies after standard boosts
float flatDamage = currentStats.Flat; // direct flat addition, applies after multiplication
float totalCrit = player.GetTotalCritChance(dc); // exact crit, stored as a float. meaning with no gear it's 4f = 4% UNLESS summoner
float attackSpeed = player.GetTotalAttackSpeed(dc); // starts at 1f, 2f = +100% = DOUBLE attack speed, HALF animation time
float armorPen = player.GetTotalArmorPenetration(dc); // starts at 0f = +0 armor pen
// Attack damage tooltip. The boosts are displayed in exactly the order they are applied
sb.Append("\n\n").Append(damageClassName).Append(" Damage: ");
// Flat base damage additions are extremely rare and only appear when relevant
if (baseFlatDamage != 0f)
{
char sign = baseFlatDamage < 0f ? '-' : '+';
sb.Append('[').Append(sign).Append(OnePlace(baseFlatDamage)).Append(" base] ");
sb.Append('+'); // Place this because otherwise the regular additive damage will look weird
}
// Additive damage is the vast majority of damage boosts
sb.Append(TwoPlaces(100f * normalDamage)).Append('%');
// Multiplicative damage is rare and only appears when relevant
if (multDamage != 1f)
sb.Append(" x").Append(TwoPlaces(multDamage));
// Flat damage is rare and only appears when relevant
if (flatDamage != 0f)
{
char sign = flatDamage < 0f ? '-' : '+';
sb.Append(' ').Append(sign).Append(OnePlace(flatDamage)).Append(" flat");
}
// Newline between damage and crit
if (displayCrit)
{
sb.Append('\n').Append(damageClassName).Append(" Crit Chance: ");
sb.Append(TwoPlaces(totalCrit)).Append('%');
}
if (displayAttackSpeed)
{
// Newline between crit and attack speed
sb.Append('\n').Append(damageClassName).Append(" Attack Speed: ");
// Positive boosts need a + prefix, negative will have its own - sign automatically.
// There's a "clever" way to do this with formatting but it's harder.
if (attackSpeed >= 1f)
sb.Append('+');
sb.Append(TwoPlaces(100f * (attackSpeed - 1f))).Append('%');
// For whips specifically, also display melee attack speed on the same line.
// Only display MELEE-SPECIFIC attack speed, not the total inheritance of attack speed for melee,
// because classless attack speed will already affect the whip.
if (dc == DamageClass.SummonMeleeSpeed)
{
float meleeSpeed = player.GetAttackSpeed<MeleeDamageClass>();
sb.Append('[');
// Positive boosts need a + prefix, negative will have its own - sign automatically.
// There's a "clever" way to do this with formatting but it's harder.
if (attackSpeed >= 1f)
sb.Append('+');
sb.Append(TwoPlaces(100f * (meleeSpeed - 1f))).Append("% from melee]");
}
}
// Newline between attack speed and armor penetration
sb.Append('\n').Append(damageClassName).Append(" Armor Penetration: ");
sb.Append(OnePlace(armorPen));
// If ranged, or any direct subclass thereof, display ranged ammo consumption
if (dc == DamageClass.Ranged || dc.GetModifierInheritance(DamageClass.Ranged).Equals(StatInheritanceData.Full))
sb.Append("\nAmmo Consumption Chance: ").Append(TwoPlaces(100f * rangedAmmoConsumption));
// If magic, or any direct subclass thereof, display mana stats
if (dc == DamageClass.Magic || dc == DamageClass.MagicSummonHybrid || dc.GetModifierInheritance(DamageClass.Magic).Equals(StatInheritanceData.Full))
{
sb.Append("\nMana Usage: ").Append(TwoPlaces(100f * manaCost));
sb.Append("\nMana Regen: ").Append(manaRegen);
}
// If summon, or any direct subclass thereof, AND NOT A WHIP, display minion slots
if (dc != DamageClass.SummonMeleeSpeed && (dc == DamageClass.Summon || dc.GetModifierInheritance(DamageClass.Summon).Equals(StatInheritanceData.Full)))
sb.Append("\nMinion Slots: ").Append(minionSlots);
// If throwing or rogue, display rogue stats.
if (dc == DamageClass.Throwing || dc.GetModifierInheritance(DamageClass.Throwing).Equals(StatInheritanceData.Full))
{
sb.Append("\nRogue Velocity Boost: +").Append(TwoPlaces(100f * rogueVelocity));
sb.Append("% | Rogue Weapon Consumption Chance: ").Append(TwoPlaces(100f * rogueAmmoConsumption));
sb.Append("%\nMax Stealth: ").Append((int)(100f * rogueStealth));
sb.Append(" | Standing Regen: ").Append(TwoPlaces(60f * standingRegen)).Append(" / sec");
sb.Append(" | Moving Regen: ").Append(TwoPlaces(60f * movingRegen)).Append(" / sec");
}
}
// Newline break between offensive and defensive stats
sb.Append("\n\n");
// Generic stats always render.
sb.Append("Defense: ").Append(defense);
sb.Append(" | DR: ").Append(TwoPlaces(100f * DR)).Append('%');
sb.Append(" | Life Regen: ").Append(lifeRegen);
sb.Append("\nMove Speed: ");
// Positive boosts need a + prefix, negative will have its own - sign automatically.
// There's a "clever" way to do this with formatting but it's harder.
if (moveSpeedBoost >= 0f)
sb.Append('+');
sb.Append(TwoPlaces(100f * moveSpeedBoost)).Append('%');
sb.Append(" | Jump Boost: ").Append(TwoPlaces(20f * jumpBoost)).Append('%');
sb.Append(" | Wing Flight Time: ").Append(TwoPlaces(wingFlightTime / 60f)).Append(" seconds\n");
sb.Append("Luck: ");
// Positive boosts need a + prefix, negative will have its own - sign automatically.
// There's a "clever" way to do this with formatting but it's harder.
if (luck >= 0f)
sb.Append('+');
sb.Append(TwoPlaces(100f * luck)).Append("%\n\n");
string stats3 = "\n" + this.GetLocalization("GenericStats").Format(
player.GetCurrentDefense(false),
TwoPlaces(100f * player.endurance),
player.lifeRegen, // Normally we'd divide this by 2 in Expert without Well Fed, but we disable that shit
Sign(moveSpeedBoost) + TwoPlaces(100f * moveSpeedBoost),
TwoPlaces(20f * player.GetJumpBoost()));
// Show wing stats only if over 0 flight time
if (wingFlightTime > 0f)
stats3 += this.GetLocalization("FlightTime").Format(TwoPlaces(wingFlightTime / 60f));
stats3 += "\n" + this.GetLocalization("MiscStats").Format(
player.aggro,
Sign(luck) + TwoPlaces(100f * luck));
list.FindAndReplace("[GENERIC]", stats3);
// Detailed Abyss stats only render if the player is in the Abyss.
sb.Append("Abyss Light Strength: ").Append(lightLevel).Append('\n');
if (modPlayer.ZoneAbyss)
{
sb.Append("Other Abyss Stats:");
sb.Append("\nBreath Lost Per Tick: ").Append(TwoPlaces(breathLoss));
sb.Append(" | Breath Loss Rate: ").Append(TwoPlaces(breathLossRate));
sb.Append("\nLife Lost Per Tick at Zero Breath: ").Append(lifeLostAtZeroBreath);
sb.Append("\nDefense Lost From Pressure: ").Append(abyssDefenseLoss);
}
else
sb.Append("Other Abyss stats are only displayed while in the Abyss");
string stats4 = "\n" + (!modPlayer.ZoneAbyss ? this.GetLocalizedValue("AbyssStatsHidden") : this.GetLocalization("AbyssStats").Format(
player.GetCurrentAbyssLightLevel(),
TwoPlaces(modPlayer.abyssBreathLossStat),
TwoPlaces(modPlayer.abyssBreathLossRateStat),
modPlayer.abyssLifeLostAtZeroBreathStat,
modPlayer.abyssDefenseLossStat));
list.FindAndReplace("[ABYSS]", stats4);
return sb.ToString();
// To save screen space, favorited tooltips do not exist for the Stat Meter
list.RemoveAll(l => l.Mod == "Terraria" && (l.Name == "Favorite" || l.Name == "FavoriteDesc"));
}
}
}
+1 -1
View File
@@ -35,7 +35,7 @@ namespace CalamityMod.Items.Accessories
AddIngredient(ItemID.MasterNinjaGear).
AddIngredient(ItemID.FrogGear).
AddIngredient<PurifiedGel>(50).
AddIngredient<Phantoplasm>(5).
AddIngredient<Polterplasm>(5).
AddTile(TileID.LunarCraftingStation).
Register();
}
+34 -28
View File
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Accessories
public new string LocalizationCategory => "Items.Accessories";
public override void SetStaticDefaults()
{
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 10));
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 10));
ItemID.Sets.AnimatesAsSoul[Type] = true;
}
@@ -39,9 +39,10 @@ namespace CalamityMod.Items.Accessories
// Community and Shattered Community are mutually exclusive
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().shatteredCommunity;
// Returns the total power of the Community, from 0.0 to 1.0 (0% to 100%), based on bosses defeated in the world.
// Returns the total power of the Community, from 0.05 to 0.2, scaling based on bosses defeated in the world.
// Returns the percentage of bosses killed (from 0.0 to 1.0) instead if killsOnly is true
private static readonly int TotalCountedBosses = 42;
internal static float CalculatePower()
internal static float CalculatePower(bool killsOnly = false)
{
int numBosses = 0;
numBosses += NPC.downedSlimeKing.ToInt();
@@ -86,35 +87,40 @@ namespace CalamityMod.Items.Accessories
numBosses += DownedBossSystem.downedYharon.ToInt(); // 40
numBosses += DownedBossSystem.downedExoMechs.ToInt();
numBosses += DownedBossSystem.downedCalamitas.ToInt();
return numBosses / (float)TotalCountedBosses;
float bossDownedRatio = numBosses / (float)TotalCountedBosses;
return killsOnly ? bossDownedRatio : MathHelper.Lerp(0.05f, 0.2f, bossDownedRatio);
}
// Damage stat boosts
public const float DamageMultiplier = 0.5f; // 2.5% to 10% (x100)
public const float CritMultiplier = 25f; // 1.25% to 5%
// Defensive stat boosts
public const float HealthMultiplier = 50f; // 2% to 10% (rounded down)
public const float DRMultiplier = 0.25f; // 1.25% to 5% (x100)
public const float DefenseMultiplier = 50f; // 2 to 10 (rounded down)
// Only while affected by DoT
public const float RegenMultiplier = 10f; // 0 to 2 (rounded down), +1 added independently of the multiplier
// Mobility stat boosts
public const float SpeedMultiplier = 0.5f; // 2.5% to 10% (x100)
public const float FlightMultiplier = 1f; // 5% to 20% (x100)
public override void ModifyTooltips(List<TooltipLine> list)
{
float communityPower = CalculatePower();
float maxHealthIncrease = MathHelper.Lerp(0.025f, 0.1f, communityPower);
int lifeRegenIncrease = (int)(MathHelper.Lerp(0.005f, 0.02f, communityPower)*100);
float critChanceIncrease = MathHelper.Lerp(0.0125f, 0.05f, communityPower);
float damageIncrease = MathHelper.Lerp(0.025f, 0.1f, communityPower);
float damageReductionIncrease = MathHelper.Lerp(0.0125f, 0.05f, communityPower);
int defenseIncrease = (int)(MathHelper.Lerp(0.025f, 0.1f, communityPower)*100);
float summonKnockbackIncrease = MathHelper.Lerp(0.05f, 0.2f, communityPower);
float moveSpeedIncrease = MathHelper.Lerp(0.025f, 0.1f, communityPower);
float flightTimeIncrease = MathHelper.Lerp(0.05f, 0.2f, communityPower);
TooltipLine line = list.LastOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip4");
if (line != null)
line.Text +=
"\nMax health increased by " + (maxHealthIncrease*100).ToString("n1") + "%\n" +
"Life regeneration increased by " + (1+lifeRegenIncrease) + "\n" +
"Critical strike chance increased by " + (critChanceIncrease*100).ToString("n1") + "%\n" +
"Damage increased by " + (damageIncrease*100).ToString("n1") + "%\n" +
"Damage reduction increased by " + (damageReductionIncrease*100).ToString("n1") + "%\n" +
"Defense increased by " + defenseIncrease + "\n" +
"Minion knockback increased by " + (summonKnockbackIncrease*100).ToString("n1") + "%\n" +
"Movement speed increased by " + (moveSpeedIncrease*100).ToString("n1") + "%\n" +
"Flight time increased by " + (flightTimeIncrease*100).ToString("n1") + "%";
float power = CalculatePower();
string statList = this.GetLocalization("StatsList").Format(
(DamageMultiplier * power * 100).ToString("N1"),
(CritMultiplier * power).ToString("N0"),
(int)(HealthMultiplier * power),
(DRMultiplier * power * 100).ToString("N2"),
(int)(DefenseMultiplier * power),
1 + (int)(RegenMultiplier * power),
(SpeedMultiplier * power * 100).ToString("N1"),
(FlightMultiplier * power * 100).ToString("N1"),
(CalculatePower(true) * 100).ToString("N0"));
list.FindAndReplace("[STATS]", statList);
}
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
-11
View File
@@ -28,17 +28,6 @@ namespace CalamityMod.Items.Accessories.Wings
Item.rare = ItemRarityID.Lime;
Item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
string down = PlayerInput.GenerateInputTag_ForCurrentGamemode(true, "Down");
string jump = PlayerInput.GenerateInputTag_ForCurrentGamemode(true, "Jump");
string up = PlayerInput.GenerateInputTag_ForCurrentGamemode(true, "Up");
string hoverText = Player.Settings.HoverControl == Player.Settings.HoverControlMode.Hold ? "Hold " + down + " and " + jump + " to hover" : "Press " + down + " to toggle hover\nPress " + up + " to deactivate hover";
TooltipLine hover = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1");
if (hover != null)
hover.Text = hoverText;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
+1 -2
View File
@@ -23,8 +23,7 @@ namespace CalamityMod.Items.Accessories
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.yInsignia = true;
player.GetAttackSpeed<MeleeDamageClass>() += 0.1f;
player.GetDamage<TrueMeleeDamageClass>() += 0.1f;
player.GetDamage<TrueMeleeDamageClass>() += 0.15f;
}
public override void AddRecipes()
-4
View File
@@ -1,5 +1,4 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Materials;
using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
@@ -39,7 +38,6 @@ namespace CalamityMod.Items.Armor.Auric
public override void UpdateEquip(Player player)
{
var modPlayer = player.Calamity();
modPlayer.fBarrier = true;
player.statLifeMax2 += 100;
player.GetDamage<GenericDamageClass>() += 0.08f;
player.GetCritChance<GenericDamageClass>() += 5;
@@ -51,7 +49,6 @@ namespace CalamityMod.Items.Armor.Auric
AddIngredient<GodSlayerChestplate>().
AddIngredient<BloodflareBodyArmor>().
AddIngredient<TarragonBreastplate>().
AddIngredient<FrostBarrier>().
AddIngredient<AuricBar>(18).
AddTile<CosmicAnvil>().
Register();
@@ -60,7 +57,6 @@ namespace CalamityMod.Items.Armor.Auric
AddIngredient<SilvaArmor>().
AddIngredient<BloodflareBodyArmor>().
AddIngredient<TarragonBreastplate>().
AddIngredient<FrostBarrier>().
AddIngredient<AuricBar>(18).
AddTile<CosmicAnvil>().
Register();
@@ -83,6 +83,7 @@ namespace CalamityMod.Items.Armor.DesertProwler
public override void UpdateArmorSet(Player player)
{
player.setBonus = this.GetLocalization("SetBonus").Format(FlatDamageBonus); //More gets edited in elsewhere
player.GetDamage<RangedDamageClass>().Flat += FlatDamageBonus;
DesertProwlerPlayer armorPlayer = player.GetModPlayer<DesertProwlerPlayer>();
armorPlayer.desertProwlerSet = true;
@@ -192,7 +193,7 @@ namespace CalamityMod.Items.Armor.DesertProwler
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<DesertFeather>(2).
AddIngredient<StormlionMandible>(2).
AddIngredient(ItemID.Silk, 8).
AddTile(TileID.Loom).
Register();
@@ -235,7 +236,7 @@ namespace CalamityMod.Items.Armor.DesertProwler
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<DesertFeather>(3).
AddIngredient<StormlionMandible>(3).
AddIngredient(ItemID.Silk, 10).
AddTile(TileID.Loom).
Register();
@@ -264,7 +265,7 @@ namespace CalamityMod.Items.Armor.DesertProwler
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<DesertFeather>().
AddIngredient<StormlionMandible>().
AddIngredient(ItemID.Silk, 5).
AddTile(TileID.Loom).
Register();
@@ -291,12 +292,6 @@ namespace CalamityMod.Items.Armor.DesertProwler
desertProwlerSet = false;
}
public override void ModifyWeaponDamage(Item item, ref StatModifier damage)
{
if (desertProwlerSet && item.CountsAsClass<RangedDamageClass>() && item.ammo == AmmoID.None)
damage.Flat += DesertProwlerHat.FlatDamageBonus;
}
public override void PostUpdate()
{
if (Player.Calamity().cooldowns.TryGetValue(SandsmokeBomb.ID, out var cd))
+1 -1
View File
@@ -31,8 +31,8 @@ namespace CalamityMod.Items.Armor.LunicCorps
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.ChlorophyteBar, 8).
AddIngredient<AstralBar>(8).
AddIngredient(ItemID.ChlorophyteBar, 8).
AddTile(TileID.LunarCraftingStation).
Register();
}
+3 -3
View File
@@ -140,10 +140,10 @@ namespace CalamityMod.Items.Armor.LunicCorps
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.ChlorophyteBar, 6).
AddIngredient<AstralBar>(6).
AddIngredient(ItemID.Glass, 20).
AddIngredient(ItemID.NightVisionHelmet).
AddIngredient<AstralBar>(6).
AddIngredient(ItemID.ChlorophyteBar, 6).
AddIngredient(ItemID.Glass, 20).
AddTile(TileID.LunarCraftingStation).
Register();
}
+2 -2
View File
@@ -31,9 +31,9 @@ namespace CalamityMod.Items.Armor.LunicCorps
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.ChlorophyteBar, 11).
AddIngredient<AstralBar>(11).
AddIngredient<RoverDrive>().
AddIngredient<AstralBar>(11).
AddIngredient(ItemID.ChlorophyteBar, 11).
AddTile(TileID.LunarCraftingStation).
Register();
}
+2 -1
View File
@@ -40,9 +40,10 @@ namespace CalamityMod.Items.Armor.Wulfrum
Item.shootSpeed = 18f;
Item.holdStyle = 16; //Custom hold style
Item.useAnimation = 10;
Item.useTime = 4;
Item.useAnimation = 10;
Item.reuseDelay = 17;
Item.useLimitPerAnimation = 3;
Item.noUseGraphic = false;
}
+1 -1
View File
@@ -309,7 +309,7 @@ namespace CalamityMod.Items
case ItemID.DungeonFishingCrate:
case ItemID.DungeonFishingCrateHard:
loot.AddIf(() => NPC.downedPlantBoss, ItemID.Ectoplasm, 10, 1, 5); // 10% 1-5 Ectoplasm
loot.AddIf(() => DownedBossSystem.downedPolterghast, ModContent.ItemType<Phantoplasm>(), 10, 1, 5); // 10% 1-5 Phantoplasm
loot.AddIf(() => DownedBossSystem.downedPolterghast, ModContent.ItemType<Polterplasm>(), 10, 1, 5); // 10% 1-5 Polterplasm
break;
case ItemID.JungleFishingCrate:
+7 -1
View File
@@ -55,6 +55,12 @@ namespace CalamityMod.Items
// tooltip list.
EnchantmentTooltips(item, tooltips);
// Replace rogue with rouge in gfb
if (Main.zenithWorld)
{
tooltips.FindAndReplace("Rogue", "Rouge");
tooltips.FindAndReplace("rogue", "rouge");
}
// Everything below this line can only apply to modded items. If the item is vanilla, stop here for efficiency.
if (item.type < ItemID.Count)
return;
@@ -578,7 +584,7 @@ namespace CalamityMod.Items
// Ale and Sake rebalance.
if (item.type == ItemID.Ale || item.type == ItemID.Sake)
EditTooltipByNum(0, (line) => line.Text = "Increases melee damage by 10% and reduces defense by 10%");
EditTooltipByNum(0, (line) => line.Text = "Increases melee damage by 10% and reduces defense by 5%");
// Hellfire Treads buff.
if (item.type == ItemID.HellfireTreads)
+2 -2
View File
@@ -473,8 +473,8 @@ namespace CalamityMod.Items
{ ItemID.SoulDrain, Do(DamageRatio(1.1f)) }, // Life Drain
{ ItemID.SpaceGun, Do(DamageExact(25)) },
{ ItemID.Spear, Do(AutoReuse, TrueMelee, DamageRatio(2f)) },
{ ItemID.SpectreHamaxe, Do(HammerPower(90), AxePower(170), UseTimeExact(8), TileBoostExact(+4)) },
{ ItemID.SpectrePickaxe, Do(PickPower(200), UseTimeExact(8), TileBoostExact(+4)) },
{ ItemID.SpectreHamaxe, Do(HammerPower(90), AxePower(170), TileBoostExact(+4)) },
{ ItemID.SpectrePickaxe, Do(PickPower(200), TileBoostExact(+4)) },
{ ItemID.SpectreStaff, Do(DamageRatio(1.2f)) },
{ ItemID.SpicyPepper, Do(Value(Item.buyPrice(silver: 2))) },
{ ItemID.SpiderStaff, Do(AutoReuse, UseExact(25)) },
@@ -9,10 +9,12 @@ using ReLogic.Content;
namespace CalamityMod.Items.Dyes
{
public class PhantoplasmDye : BaseDye
[LegacyName("PhantoplasmDye")]
public class PolterplasmDye : BaseDye
{
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref<Effect>(Mod.Assets.Request<Effect>("Effects/Dyes/PhantoplasmDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass").
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref<Effect>(Mod.Assets.Request<Effect>("Effects/Dyes/PolterplasmDyeShader", AssetRequestMode.ImmediateLoad).Value), "DyePass").
UseColor(new Color(245, 143, 182)).UseSecondaryColor(new Color(119, 238, 255)).UseImage("Images/Misc/Perlin");
public override void SafeSetStaticDefaults()
{
Item.ResearchUnlockCount = 3;
@@ -28,7 +30,7 @@ namespace CalamityMod.Items.Dyes
{
CreateRecipe(2).
AddIngredient(ItemID.BottledWater, 2).
AddIngredient<Phantoplasm>(3).
AddIngredient<Polterplasm>(3).
AddTile(TileID.DyeVat).
Register();
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 301 B

After

Width:  |  Height:  |  Size: 301 B

+1 -1
View File
@@ -53,7 +53,7 @@ namespace CalamityMod.Items.Materials
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<Phantoplasm>(2).
AddIngredient<Polterplasm>(2).
AddIngredient<NightmareFuel>(5).
AddIngredient<EndothermicEnergy>(5).
AddIngredient<DarksunFragment>(2).
+1 -1
View File
@@ -28,7 +28,7 @@ namespace CalamityMod.Items.Materials
CreateRecipe(2).
AddIngredient<Bloodstone>(5).
AddIngredient<BloodOrb>().
AddIngredient<Phantoplasm>().
AddIngredient<Polterplasm>().
AddTile(TileID.AdamantiteForge).
Register();
}
-24
View File
@@ -1,24 +0,0 @@
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
namespace CalamityMod.Items.Materials
{
public class DesertFeather : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Materials";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
}
public override void SetDefaults()
{
Item.width = 24;
Item.height = 24;
Item.maxStack = 9999;
Item.value = Item.sellPrice(copper: 20);
Item.rare = ItemRarityID.Blue;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 469 B

@@ -6,9 +6,11 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Materials
{
public class Phantoplasm : ModItem, ILocalizedModType
[LegacyName("Phantoplasm")]
public class Polterplasm : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Materials";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 25;
File renamed without changes.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

+1 -10
View File
@@ -1,6 +1,5 @@
using CalamityMod.Rarities;
using System.Collections.Generic;
using System.Linq;
using Terraria.ID;
using Terraria.ModLoader;
@@ -23,14 +22,6 @@ namespace CalamityMod.Items.Mounts
Item.rare = ModContent.RarityType<Violet>();
}
public override void ModifyTooltips(List<TooltipLine> list)
{
string hotkey = CalamityKeybinds.ExoChairSlowdownHotkey.TooltipHotkeyString();
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1");
if (line != null)
line.Text = $"Hold {hotkey} while sitting in the throne to move slower for more precision";
}
public override void ModifyTooltips(List<TooltipLine> list) => list.IntegrateHotkey(CalamityKeybinds.ExoChairSlowdownHotkey);
}
}
+1 -9
View File
@@ -6,7 +6,6 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using System.Linq;
namespace CalamityMod.Items
{
@@ -28,14 +27,7 @@ namespace CalamityMod.Items
Item.Calamity().donorItem = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
string hotkey = CalamityKeybinds.NormalityRelocatorHotKey.TooltipHotkeyString();
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1");
if (line != null)
line.Text = "Press " + hotkey + " to teleport to the position of the mouse";
}
public override void ModifyTooltips(List<TooltipLine> list) => list.IntegrateHotkey(CalamityKeybinds.NormalityRelocatorHotKey);
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
+1 -1
View File
@@ -70,7 +70,7 @@ namespace CalamityMod.Items.PermanentBoosters
{
CreateRecipe().
AddIngredient<RuinousSoul>(5).
AddIngredient<Phantoplasm>(25).
AddIngredient<Polterplasm>(25).
AddTile(TileID.LunarCraftingStation).
Register();
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 294 B

@@ -65,7 +65,6 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
"AquaSG",
"Atalya",
"Ben-TK",
"Blastitle",
"Cei",
"Cooper",
"CrabBar",
@@ -108,6 +107,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
"Amadis",
"AstroKnight",
"Blast",
"Blastitle",
"Blockaroz",
"Boffin",
"Bravioli",
+1 -1
View File
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Potions
{
CreateRecipe(15).
AddIngredient(ItemID.SuperManaPotion, 15).
AddIngredient<Phantoplasm>().
AddIngredient<Polterplasm>().
AddTile(TileID.Bottles).
Register()
.DisableDecraft();
-1
View File
@@ -18,7 +18,6 @@ namespace CalamityMod.Items
Item.width = 32;
Item.height = 46;
Item.useTime = Item.useAnimation = 25;
Item.reuseDelay = 15;
Item.useStyle = ItemUseStyleID.Shoot;
Item.UseSound = SoundID.DD2_DarkMageCastHeal;
Item.noMelee = true;
+1 -1
View File
@@ -68,7 +68,7 @@ namespace CalamityMod.Items.SummonItems
CreateRecipe().
AddIngredient(ItemID.LunarBar, 40).
AddIngredient<GalacticaSingularity>(10).
AddIngredient<Phantoplasm>(40).
AddIngredient<Polterplasm>(40).
AddTile(TileID.LunarCraftingStation).
Register()
.DisableDecraft();
+1 -1
View File
@@ -60,7 +60,7 @@ namespace CalamityMod.Items.SummonItems
{
CreateRecipe().
AddRecipeGroup("Wood", 25).
AddIngredient<Phantoplasm>(50).
AddIngredient<Polterplasm>(50).
AddTile(TileID.LunarCraftingStation).
Register();
}
+5 -5
View File
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.SummonItems
public override bool CanUseItem(Player player)
{
return !NPC.AnyNPCs(ModContent.NPCType<ProfanedGuardianCommander>()) && (Main.dayTime || Main.zenithWorld) && (player.ZoneHallow || player.ZoneUnderworldHeight) && !BossRushEvent.BossRushActive;
return !NPC.AnyNPCs(ModContent.NPCType<ProfanedGuardianCommander>()) && (Main.dayTime || Main.remixWorld) && (player.ZoneHallow || player.ZoneUnderworldHeight) && !BossRushEvent.BossRushActive;
}
public override bool? UseItem(Player player)
@@ -53,15 +53,15 @@ namespace CalamityMod.Items.SummonItems
public override void ModifyTooltips(List<TooltipLine> list)
{
Player player = Main.LocalPlayer;
TooltipLine line1 = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1");
TooltipLine line0 = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0");
if (Main.zenithWorld)
if (Main.remixWorld)
{
line1.Text = "Summons the Profaned Guardians when used in the Hallow or Underworld";
line0.Text = "Summons the Profaned Guardians when used in the Hallow or Underworld";
}
else
{
line1.Text = "Summons the Profaned Guardians when used in the Hallow or Underworld during daytime";
line0.Text = "Summons the Profaned Guardians when used in the Hallow or Underworld during daytime";
}
}
+1 -1
View File
@@ -71,7 +71,7 @@ namespace CalamityMod.Items.TreasureBags
{
ModContent.ItemType<TheMicrowave>(),
ModContent.ItemType<StarSputter>(),
ModContent.ItemType<Starfall>(),
ModContent.ItemType<StarShower>(),
ModContent.ItemType<GodspawnHelixStaff>(),
ModContent.ItemType<RegulusRiot>()
}));
+1 -1
View File
@@ -66,7 +66,7 @@ namespace CalamityMod.Items.TreasureBags
// Materials
itemLoot.Add(ModContent.ItemType<RuinousSoul>(), 1, 10, 20);
itemLoot.Add(ModContent.ItemType<Phantoplasm>(), 1, 40, 50);
itemLoot.Add(ModContent.ItemType<Polterplasm>(), 1, 40, 50);
// Weapons
itemLoot.Add(DropHelper.CalamityStyle(DropHelper.BagWeaponDropRateFraction, new int[]
+4 -4
View File
@@ -15,10 +15,10 @@ namespace CalamityMod.Items
Item.rare = ItemRarityID.Blue;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention;
}
public override void UpdateInventory(Player player)
{
+2 -1
View File
@@ -19,8 +19,9 @@ namespace CalamityMod.Items.Weapons.Magic
Item.width = 28;
Item.height = 30;
Item.useTime = 2;
Item.reuseDelay = 5;
Item.useAnimation = 10;
Item.reuseDelay = 5;
Item.useLimitPerAnimation = 5;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 5.5f;
-1
View File
@@ -27,7 +27,6 @@ namespace CalamityMod.Items.Weapons.Magic
Item.height = 16;
Item.useTime = 10;
Item.useAnimation = 10;
Item.reuseDelay = 5;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.UseSound = SoundID.Item13;
Item.noMelee = true;
+2 -1
View File
@@ -19,8 +19,9 @@ namespace CalamityMod.Items.Weapons.Magic
Item.width = 60;
Item.height = 60;
Item.useTime = 12;
Item.reuseDelay = 30;
Item.useAnimation = 36;
Item.reuseDelay = 30;
Item.useLimitPerAnimation = 3;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 1f;
+2 -1
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic
public new string LocalizationCategory => "Items.Weapons.Magic";
public override void SetStaticDefaults()
{
Item.staff[Item.type] = true;
Item.staff[Item.type] = true;
}
public override void SetDefaults()
@@ -26,6 +26,7 @@ namespace CalamityMod.Items.Weapons.Magic
Item.useTime = 4;
Item.useAnimation = 16;
Item.reuseDelay = 14;
Item.useLimitPerAnimation = 4;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 7.5f;
+1 -1
View File
@@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Magic
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<Starfall>().
AddIngredient<StarShower>().
AddIngredient<NuclearFury>().
AddIngredient<RelicofRuin>().
AddIngredient<CosmiliteBar>(8).
+1 -1
View File
@@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
CreateRecipe().
AddIngredient(ItemID.RainbowRod).
AddIngredient<Phantoplasm>(10).
AddIngredient<Polterplasm>(10).
AddIngredient<ShadowspecBar>(5).
AddTile<DraedonsForge>().
Register();
+2 -2
View File
@@ -12,13 +12,13 @@ namespace CalamityMod.Items.Weapons.Magic
public new string LocalizationCategory => "Items.Weapons.Magic";
public override void SetStaticDefaults()
{
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6));
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6));
ItemID.Sets.AnimatesAsSoul[Type] = true;
}
public override void SetDefaults()
{
Item.damage = 888;
Item.damage = 990;
Item.DamageType = DamageClass.Magic;
Item.mana = 10;
Item.width = 38;
+2 -2
View File
@@ -32,9 +32,9 @@ namespace CalamityMod.Items.Weapons.Magic
Item.damage = 2250;
Item.knockBack = 6f;
Item.useTime = 300;
Item.useAnimation = 300;
Item.useTime = Item.useAnimation = 300;
Item.reuseDelay = 60;
Item.useLimitPerAnimation = 1;
Item.shoot = ModContent.ProjectileType<IceBarrageMain>();
Item.shootSpeed = 2f;
Item.useAmmo = ModContent.ItemType<BloodRune>();
+2 -1
View File
@@ -23,9 +23,10 @@ namespace CalamityMod.Items.Weapons.Magic
Item.mana = 15;
Item.width = 16;
Item.height = 16;
Item.useAnimation = 30;
Item.useTime = 2;
Item.useAnimation = 30;
Item.reuseDelay = Item.useAnimation + 6;
Item.useLimitPerAnimation = 15;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 7f;
+1 -1
View File
@@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
CreateRecipe().
AddIngredient(ItemID.SapphireStaff).
AddIngredient<Phantoplasm>(10).
AddIngredient<Polterplasm>(10).
AddIngredient<ShadowspecBar>(5).
AddTile<DraedonsForge>().
Register();
@@ -7,7 +7,8 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Magic
{
public class Starfall : ModItem, ILocalizedModType
[LegacyName("Starfall")]
public class StarShower : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Magic";
public override void SetDefaults()
File renamed without changes.

Before

Width:  |  Height:  |  Size: 920 B

After

Width:  |  Height:  |  Size: 920 B

+1
View File
@@ -41,6 +41,7 @@ namespace CalamityMod.Items.Weapons.Magic
Item.useTime = 2;
Item.useAnimation = 8;
Item.reuseDelay = 5;
Item.useLimitPerAnimation = 4;
Item.UseSound = SoundID.Item105;
Item.autoReuse = true;
Item.noMelee = true;
+2 -1
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic
public new string LocalizationCategory => "Items.Weapons.Magic";
public override void SetStaticDefaults()
{
Item.staff[Item.type] = true;
Item.staff[Item.type] = true;
}
public override void SetDefaults()
@@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic
Item.knockBack = 5f;
Item.useTime = 3;
Item.reuseDelay = Item.useAnimation = 15;
Item.useLimitPerAnimation = 5;
Item.mana = 25;
Item.DamageType = DamageClass.Magic;
Item.autoReuse = true;
+17 -30
View File
@@ -21,10 +21,10 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.damage = 15;
Item.DamageType = DamageClass.Magic;
Item.mana = 10;
Item.mana = 20;
Item.width = 28;
Item.height = 32;
Item.useTime = Item.useAnimation = 25;
Item.useTime = Item.useAnimation = 36;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 10f;
@@ -34,50 +34,37 @@ namespace CalamityMod.Items.Weapons.Magic
Item.UseSound = SoundID.Item66;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<VeeringWindAirWave>();
Item.shootSpeed = 12f;
Item.shootSpeed = 6f;
}
public override bool AltFunctionUse(Player player) => true;
public override bool CanUseItem(Player player)
{
Item.UseSound = player.altFunctionUse == 2 ? SoundID.Item43 : SoundID.Item66;
return base.CanUseItem(player);
}
public override float UseSpeedMultiplier(Player player) => player.altFunctionUse == 2 ? 0.5f : 1f;
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)
{
Item.useTime = Item.useAnimation = 50;
Item.knockBack = 2f;
Item.UseSound = SoundID.Item43;
Item.shootSpeed = 6f;
type = ModContent.ProjectileType<VeeringWindFrostWave>();
knockback *= 0.2f;
velocity *= 0.5f;
}
else
{
Item.useTime = Item.useAnimation = 25;
Item.knockBack = 10f;
Item.UseSound = SoundID.Item66;
Item.shootSpeed = 12f;
}
return base.CanUseItem(player);
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
int totalProjectiles = 24;
if (player.altFunctionUse == 2)
for (int i = 0; i < totalProjectiles; i++)
{
for (int i = 0; i < totalProjectiles; i++)
{
Vector2 waveVelocity = ((MathHelper.TwoPi * i / (float)totalProjectiles) + velocity.ToRotation()).ToRotationVector2() * velocity.Length() * 0.5f;
Projectile.NewProjectile(source, position, waveVelocity, ModContent.ProjectileType<VeeringWindFrostWave>(), damage, knockback, Main.myPlayer);
}
Vector2 waveVelocity = ((MathHelper.TwoPi * i / (float)totalProjectiles) + velocity.ToRotation()).ToRotationVector2() * velocity.Length();
Projectile.NewProjectile(source, position, waveVelocity, type, damage, knockback, Main.myPlayer);
}
else
{
for (int i = 0; i < totalProjectiles; i++)
{
Vector2 waveVelocity = ((MathHelper.TwoPi * i / (float)totalProjectiles) + velocity.ToRotation()).ToRotationVector2() * velocity.Length() * 0.5f;
Projectile.NewProjectile(source, position, waveVelocity, type, damage, knockback, Main.myPlayer);
}
}
return false;
}
+8 -3
View File
@@ -4,6 +4,7 @@ using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
@@ -13,9 +14,12 @@ namespace CalamityMod.Items.Weapons.Magic
public class VividClarity : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Magic";
public static readonly SoundStyle UseSound = new("CalamityMod/Sounds/Item/VividClarityShoot");
public static readonly SoundStyle BeamSound = new("CalamityMod/Sounds/Item/VividClarityBeamAppear");
public override void SetStaticDefaults()
{
Item.staff[Item.type] = true;
Item.staff[Item.type] = true;
}
public override void SetDefaults()
@@ -25,14 +29,15 @@ namespace CalamityMod.Items.Weapons.Magic
Item.mana = 42;
Item.width = 90;
Item.height = 112;
Item.useAnimation = 20;
Item.useTime = 4;
Item.useAnimation = 20;
Item.reuseDelay = Item.useAnimation;
Item.useLimitPerAnimation = 5;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 7.5f;
Item.value = CalamityGlobalItem.Rarity15BuyPrice;
Item.UseSound = SoundID.Item60;
Item.UseSound = UseSound;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<VividBeam>();
Item.shootSpeed = 6f;
-1
View File
@@ -23,7 +23,6 @@ namespace CalamityMod.Items.Weapons.Magic
Item.height = 16;
Item.useTime = 10;
Item.useAnimation = 10;
Item.reuseDelay = 5;
Item.useStyle = ItemUseStyleID.Shoot;
Item.UseSound = SoundID.Item13;
Item.noMelee = true;
@@ -11,7 +11,8 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
public class ElementalExcalibur : ModItem, ILocalizedModType
[LegacyName("ElementalExcalibur")]
public class IridescentExcalibur : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Melee";
private static int BaseDamage = 2000;
@@ -20,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetStaticDefaults()
{
ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true;
ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true;
}
public override void SetDefaults()
@@ -37,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee
Item.width = 112;
Item.height = 112;
Item.value = CalamityGlobalItem.Rarity16BuyPrice;
Item.shoot = ModContent.ProjectileType<ElementalExcaliburBeam>();
Item.shoot = ModContent.ProjectileType<GayBeam>();
Item.shootSpeed = 6f;
Item.rare = ModContent.RarityType<Rainbow>();
}
@@ -67,7 +68,7 @@ namespace CalamityMod.Items.Weapons.Melee
}
else
{
Item.shoot = ModContent.ProjectileType<ElementalExcaliburBeam>();
Item.shoot = ModContent.ProjectileType<GayBeam>();
Item.shootSpeed = 12f;
}
@@ -164,7 +165,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<GreatswordofBlah>().
AddIngredient<Orderbringer>().
AddIngredient(ItemID.TrueExcalibur).
AddIngredient<ShadowspecBar>(5).
AddIngredient<AscendantSpiritEssence>(5).
File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

@@ -7,9 +7,11 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
public class GreatswordofBlah : ModItem, ILocalizedModType
[LegacyName("GreatswordofBlah")]
public class Orderbringer : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Melee";
public override void SetDefaults()
{
Item.width = Item.height = 108;
@@ -24,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Melee
Item.autoReuse = true;
Item.value = CalamityGlobalItem.Rarity14BuyPrice;
Item.rare = ModContent.RarityType<DarkBlue>();
Item.shoot = ModContent.ProjectileType<JudgementBlah>();
Item.shoot = ModContent.ProjectileType<OrderbringerBeam>();
Item.shootSpeed = 6f;
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

+2 -1
View File
@@ -22,8 +22,9 @@ namespace CalamityMod.Items.Weapons.Melee
Item.damage = 500;
Item.DamageType = DamageClass.Melee;
Item.useTime = 5;
Item.reuseDelay = 20;
Item.useAnimation = 30;
Item.reuseDelay = 20;
Item.useLimitPerAnimation = 6;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 4;
+2 -1
View File
@@ -21,8 +21,9 @@ namespace CalamityMod.Items.Weapons.Ranged
Item.width = 48;
Item.height = 30;
Item.useTime = 3;
Item.reuseDelay = 8;
Item.useAnimation = 12;
Item.reuseDelay = 8;
Item.useLimitPerAnimation = 4;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 6f;
+2 -1
View File
@@ -21,8 +21,9 @@ namespace CalamityMod.Items.Weapons.Ranged
Item.width = 70;
Item.height = 18;
Item.useTime = 4;
Item.reuseDelay = 15;
Item.useAnimation = 12;
Item.reuseDelay = 15;
Item.useLimitPerAnimation = 3;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 2f;
+2 -1
View File
@@ -20,8 +20,9 @@ namespace CalamityMod.Items.Weapons.Ranged
Item.width = 82;
Item.height = 34;
Item.useTime = 7;
Item.reuseDelay = 30;
Item.useAnimation = 28;
Item.reuseDelay = 30;
Item.useLimitPerAnimation = 4;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 4f;
+2 -1
View File
@@ -20,8 +20,9 @@ namespace CalamityMod.Items.Weapons.Ranged
Item.width = 44;
Item.height = 100;
Item.useTime = 3;
Item.reuseDelay = 10;
Item.useAnimation = 15;
Item.reuseDelay = 10;
Item.useLimitPerAnimation = 5;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 4.25f;
+2 -1
View File
@@ -15,8 +15,9 @@ namespace CalamityMod.Items.Weapons.Ranged
Item.width = 38;
Item.height = 78;
Item.useTime = 5;
Item.reuseDelay = 15;
Item.useAnimation = 15;
Item.reuseDelay = 15;
Item.useLimitPerAnimation = 3;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 2.5f;
+2 -1
View File
@@ -17,8 +17,9 @@ namespace CalamityMod.Items.Weapons.Ranged
Item.width = 30;
Item.height = 42;
Item.useTime = 4;
Item.reuseDelay = 20;
Item.useAnimation = 12;
Item.reuseDelay = 20;
Item.useLimitPerAnimation = 3;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 2f;
+1 -1
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public new string LocalizationCategory => "Items.Weapons.Ranged";
public override void SetDefaults()
{
Item.damage = 416;
Item.damage = 290;
Item.DamageType = DamageClass.Ranged;
Item.width = 126;
Item.height = 42;
+2 -1
View File
@@ -19,8 +19,9 @@ namespace CalamityMod.Items.Weapons.Ranged
Item.width = 48;
Item.height = 30;
Item.useTime = 3;
Item.reuseDelay = 10;
Item.useAnimation = 9;
Item.reuseDelay = 10;
Item.useLimitPerAnimation = 3;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 5.5f;
Loaded 100 of 497 files, more files were not shown because too many files have changed in this diff. Show more