also Ilmeris' Spark

ig the rename can stay
This commit is contained in:
GinYuH committed 2025-12-15 23:50:41 -08:00
1 parent e44a12a938
commit c0d47da201
5 files changed
+34 -30

No files matched your search

+33 -15
View File
@@ -40,6 +40,7 @@ using CalamityMod.NPCs.Providence;
using CalamityMod.NPCs.SupremeCalamitas;
using CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Pets;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Typeless;
@@ -51,8 +52,8 @@ using Terraria;
using Terraria.Audio;
using Terraria.Chat;
using Terraria.DataStructures;
using Terraria.Graphics.Shaders;
using Terraria.GameContent.Creative;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
@@ -1231,8 +1232,6 @@ namespace CalamityMod.CalPlayer
{
if (sulphurSet)
Main.npc[proj.Calamity().ParentNPCIndex].AddBuff(BuffID.Poisoned, SulphurousHelmet.SetBonusPoisonDuration);
if (ilSpark)
Main.npc[proj.Calamity().ParentNPCIndex].Calamity().shocked = 120;
}
}
@@ -2457,19 +2456,38 @@ namespace CalamityMod.CalPlayer
}
if (ilSpark)
{
SoundEngine.PlaySound(SoundID.Item93, Player.Center);
// Only visual effects are done here
// The actual spark spawning is now handled with the shocked variable in CalamityGlobalNPC
SeaFoamParticle boom = new(Player.Center, Vector2.Zero, new Color(89, 239, 247), new Color(56, 158, 209), 1f, 200f, Main.rand.NextBool() ? -1f : 1f);
GeneralParticleHandler.SpawnParticle(boom);
for (int e = 0; e < 6; e++)
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<HideofAstrumDeus>()));
if (hurtInfo.Damage > 0)
{
Vector2 dustVel = Main.rand.NextVector2CircularEdge(1f, 1f) * Main.rand.NextFloat(4.5f, 5.25f);
Dust electric = Dust.NewDustPerfect(Player.Center, DustID.Electric, dustVel, Scale: 0.75f);
electric.noGravity = true;
SoundEngine.PlaySound(SoundID.Item93, Player.Center);
float spread = 45f * 0.0174f;
double startAngle = Math.Atan2(Player.velocity.X, Player.velocity.Y) - spread / 2;
double deltaAngle = spread / 8f;
double offsetAngle;
// Start with base damage, then apply the best damage class you can
int sDamage = 6;
if (transformer)
sDamage += 42;
sDamage = (int)Player.GetBestClassDamage().ApplyTo(sDamage);
if (Player.whoAmI == Main.myPlayer)
{
for (int i = 0; i < 4; i++)
{
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
int spark1 = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<GenericElectricSpark>(), sDamage, 1.25f, Player.whoAmI, 0f, 1);
int spark2 = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<GenericElectricSpark>(), sDamage, 1.25f, Player.whoAmI, 0f, 1);
if (spark1.WithinBounds(Main.maxProjectiles))
{
Main.projectile[spark1].timeLeft = 120;
}
if (spark2.WithinBounds(Main.maxProjectiles))
{
Main.projectile[spark2].timeLeft = 120;
}
}
}
}
}
if (rBrain)
-5
View File
@@ -1258,11 +1258,6 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffType<HadopelagicPressure>(), 180);
if (sulphurSet)
target.AddBuff(BuffID.Poisoned, SulphurousHelmet.SetBonusPoisonDuration);
if (ilSpark && Player.Calamity().countsAsAnyWet)
{
int duration = 60;
target.AddBuff(BuffType<StaticDischarge>(), duration);
}
if (corrosiveSpine)
{
target.AddBuff(BuffType<Irradiated>(), 120);
@@ -978,12 +978,7 @@ HowlsHeart: {
IlmerisSpark: {
DisplayName: Ilmeris' Spark
Tooltip:
'''
Attacks inflict Static Discharge while underwater
Taking damage causes the enemy to be shocked
Shocked enemies constantly release sparks
'''
Tooltip: Taking damage releases a blast of sparks
}
InfectedJewel: {
@@ -4,7 +4,6 @@ AegisBeam.DisplayName: Aegis Beam
AegisBlast.DisplayName: Aegis Blast
AegisBlast2.DisplayName: Aegis Blast
AegisFlame.DisplayName: Aegis Flame
AmidiasTridentBoltProj.DisplayName: Trident Bolt
AmidiasWhirlpool.DisplayName: Whirlpool
AncientBeam.DisplayName: Ancient Beam
AncientStar.DisplayName: Ancient Star
-3
View File
@@ -3866,9 +3866,6 @@ namespace CalamityMod.NPCs
if (target.Calamity().sulphurSet)
npc.AddBuff(BuffID.Poisoned, 60);
if (target.Calamity().ilSpark)
shocked = 120;
if (target.Transformation().Type == ItemType<Popo>())
{
if (npc.type == NPCID.Demon || npc.type == NPCID.VoodooDemon || npc.type == NPCID.RedDevil)