Gruesome Eminence and Rancor no longer self-damage

Removed Rancor Burn, turning the variable into an "ashesOnDeath" variable that also causes other visual effects
This commit is contained in:
CongratsIsTrash committed 2024-08-02 18:25:57 -04:00
1 parent b3da6b1272
commit b36c8a5f14
10 files changed
+31 -90

No files matched your search

-25
View File
@@ -1,25 +0,0 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
{
public class RancorBurn : ModBuff
{
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().RancorBurnTime < npc.buffTime[buffIndex])
npc.Calamity().RancorBurnTime = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 B

@@ -391,9 +391,8 @@ GruesomeEminence: {
DisplayName: Gruesome Eminence
Tooltip:
'''
Summons a gaseous conglomeration of spirits near the cursor
At first, the spirits will fly wildly. This can hurt enemies and players
However, over time they will begin to accumulate to create a single, controllable monstrosity
Summons a gaseous conglomeration of spirits near the cursor that fly around wildly
Over time, the spirits accumulate to create a single, controllable monstrosity
[c/C61B40:'The spirits of the amalgam could never pass on to their desired afterlife,]
[c/C61B40:Tainted and melded by rage as they were.']
'''
@@ -682,7 +681,7 @@ Rancor: {
Tooltip:
'''
Casts a magic circle that charges energy and eventually releases a powerful laser burst of controlled maleficent magic
The laser causes arms and searing lava to appear on surfaces it touches which harm both you and enemies
The laser causes arms and searing lava to appear on surfaces it touches
[c/C61B40:'Forgiveness can only heal so much,]
[c/C61B40:If the recipient has not yet forgiven themselves.']
'''
+20 -7
View File
@@ -5,12 +5,12 @@ using System.Reflection;
using CalamityMod.Balancing;
using CalamityMod.Buffs;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.Placeables;
using CalamityMod.Buffs.StatBuffs;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Buffs.Summon.Whips;
using CalamityMod.CalPlayer;
using CalamityMod.Events;
using CalamityMod.Graphics.Metaballs;
using CalamityMod.Graphics.Renderers.CalamityRenderers;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Tools;
@@ -299,7 +299,7 @@ namespace CalamityMod.NPCs
public int vulnerabilityHex = 0;
public int banishingFire = 0;
public int wither = 0;
public int RancorBurnTime = 0;
public int ashesOnDeath = 0;
// whoAmI Variables
public static int[] bobbitWormBottom = new int[5];
@@ -523,7 +523,7 @@ namespace CalamityMod.NPCs
myClone.vulnerabilityHex = vulnerabilityHex;
myClone.banishingFire = banishingFire;
myClone.wither = wither;
myClone.RancorBurnTime = RancorBurnTime;
myClone.ashesOnDeath = ashesOnDeath;
// This gets set up as needed.
myClone.VulnerabilityHexFireDrawer = null;
@@ -5291,8 +5291,8 @@ namespace CalamityMod.NPCs
banishingFire--;
if (wither > 0)
wither--;
if (RancorBurnTime > 0)
RancorBurnTime--;
if (ashesOnDeath > 0)
ashesOnDeath--;
if (cobaltNerfTimer > 0)
cobaltNerfTimer--;
@@ -6020,7 +6020,7 @@ namespace CalamityMod.NPCs
#region Hit Effect
public override void HitEffect(NPC npc, NPC.HitInfo hit)
{
if (npc.life <= 0 && npc.Organic() && RancorBurnTime > 0)
if (npc.life <= 0 && npc.Organic() && ashesOnDeath > 0)
DeathAshParticle.CreateAshesFromNPC(npc);
// Cultist shield flicker
@@ -6594,6 +6594,20 @@ namespace CalamityMod.NPCs
if (absorberAffliction > 0)
AbsorberAffliction.DrawEffects(npc, ref drawColor);
// Rancor's burn effect
if (ashesOnDeath > 0)
{
if (Main.rand.NextBool(4))
{
Projectile.NewProjectile(npc.GetSource_FromThis(), npc.Center, Main.rand.NextVector2Circular(2.75f, 6.5f), ProjectileType<RancorFog>(), 0, 0f, Main.myPlayer, 0f, 0.475f);
}
if (Main.rand.NextBool(6))
{
Vector2 randomPosition = new(npc.position.X + Main.rand.NextFloat(-10f, npc.width + 10f), npc.position.Y + Main.rand.NextFloat(-10f, npc.height + 10f));
RancorLavaMetaball.SpawnParticle(randomPosition, Main.rand.NextFloat(30f, 37f));
}
}
if (astralInfection > 0)
AstralInfectionDebuff.DrawEffects(npc, ref drawColor);
@@ -6858,7 +6872,6 @@ namespace CalamityMod.NPCs
("CalamityMod/Buffs/DamageOverTime/MiracleBlight", NPC => NPC.Calamity().miracleBlight > 0),
("CalamityMod/Buffs/DamageOverTime/Nightwither", NPC => NPC.Calamity().nightwither > 0),
("CalamityMod/Buffs/DamageOverTime/Plague", NPC => NPC.Calamity().pFlames > 0),
("CalamityMod/Buffs/DamageOverTime/RancorBurn", NPC => NPC.Calamity().RancorBurnTime > 0),
("CalamityMod/Buffs/DamageOverTime/RiptideDebuff", NPC => NPC.Calamity().rTide > 0),
("CalamityMod/Buffs/DamageOverTime/SagePoison", NPC => NPC.Calamity().sagePoisonTime > 0),
("CalamityMod/Buffs/DamageOverTime/ShellfishClaps", NPC => NPC.Calamity().shellfishVore > 0),
+5 -16
View File
@@ -1,9 +1,10 @@
using System;
using System.Collections.Generic;
using System.IO;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.IO;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
@@ -28,7 +29,6 @@ namespace CalamityMod.Projectiles.Magic
{
Projectile.width = Projectile.height = 4;
Projectile.friendly = true;
Projectile.hostile = true;
Projectile.penetrate = -1;
Projectile.tileCollide = false;
Projectile.DamageType = DamageClass.Magic;
@@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Magic
// Decide a frame to use and adjust the hitbox based on it.
if (Projectile.localAI[0] == 0f)
{
// Play a wraith death sound by default, play a generic flame sound when spawned by gfb Orthoceras
// Play a wraith death sound by default, play a generic flame sound when spawned by GFB Orthoceras
SoundStyle sound = Time == 0 ? SoundID.NPCDeath52 : SoundID.Item20;
SoundEngine.PlaySound(sound, Projectile.Center);
@@ -135,17 +135,6 @@ namespace CalamityMod.Projectiles.Magic
behindNPCsAndTiles.Add(index);
}
public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers)
{
if (Projectile.friendly)
{
modifiers.SourceDamage *= 0f;
if (Main.masterMode) modifiers.SourceDamage.Flat += 450f;
else if (Main.expertMode) modifiers.SourceDamage.Flat += 375f;
else modifiers.SourceDamage.Flat += 300f;
}
}
public override bool PreDraw(ref Color lightColor)
{
Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value;
+1 -1
View File
@@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Magic
// Decide scale and initial rotation on the first frame this projectile exists.
if (Projectile.localAI[0] == 0f)
{
Projectile.scale = Main.rand.NextFloat(1f, 1.7f);
Projectile.scale = Main.rand.NextFloat(1f, 1.7f) * Projectile.ai[1];
Projectile.rotation = Main.rand.NextFloat(MathHelper.TwoPi);
Projectile.localAI[0] = 1f;
}
-7
View File
@@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles.Magic
Projectile.tileCollide = false;
Projectile.DamageType = DamageClass.Magic;
Projectile.friendly = true;
Projectile.hostile = true;
Projectile.timeLeft = 300;
Projectile.ignoreWater = true;
}
@@ -49,12 +48,6 @@ namespace CalamityMod.Projectiles.Magic
Time++;
}
public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers)
{
modifiers.SourceDamage *= 0f;
modifiers.SourceDamage.Flat += Main.rand.Next(80, 90);
}
public override Color? GetAlpha(Color lightColor) => Color.White * Projectile.Opacity;
}
}
+2 -5
View File
@@ -129,7 +129,7 @@ namespace CalamityMod.Projectiles.Magic
public void CreateTileHitEffects()
{
Vector2 endOfLaser = Projectile.Center + Projectile.velocity * (LaserLength - Main.rand.NextFloat(12f, 72f));
Projectile.NewProjectile(Projectile.GetSource_FromThis(), endOfLaser, Main.rand.NextVector2Circular(4f, 8f), ModContent.ProjectileType<RancorFog>(), 0, 0f, Projectile.owner);
Projectile.NewProjectile(Projectile.GetSource_FromThis(), endOfLaser, Main.rand.NextVector2Circular(4f, 8f), ModContent.ProjectileType<RancorFog>(), 0, 0f, Projectile.owner, 0f, 1f);
if (Main.rand.NextBool())
{
@@ -182,10 +182,7 @@ namespace CalamityMod.Projectiles.Magic
overWiresUI.Add(index);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<RancorBurn>(), 150);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.Calamity().ashesOnDeath = 10;
public override bool ShouldUpdatePosition() => false;
}
-4
View File
@@ -61,12 +61,8 @@ namespace CalamityMod.Projectiles.Magic
float flySpeed = 8f;
float flyInertia = 54f;
Projectile.hostile = true;
Projectile.friendly = false;
if (ProjectileOwner != null && (ProjectileOwner.ModProjectile<SpiritCongregation>().CurrentPower > 0.97f || Projectile.timeLeft < 95))
{
Projectile.hostile = false;
radius += 36f;
target = ProjectileOwner;
-21
View File
@@ -140,11 +140,6 @@ namespace CalamityMod.Projectiles.Magic
HoverOffset = Vector2.Zero;
}
// Previously, Gruesome Eminence stopped being able to hurt you when fully charged.
// This has been changed so that its threat is everpresent.
Projectile.hostile = Time > 75f;
// Projectile.hostile = !tame && Time > 75f;
// Explode into a burst of spirit dust and gas clouds when a bigger face appears.
if (!WasStrongBefore && CurrentPower > LargeMouthPowerLowerBound)
{
@@ -304,22 +299,6 @@ namespace CalamityMod.Projectiles.Magic
DrawHead(backTexture, 1.04f);
}
// Damage scales up over time as it grows.
public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers)
{
float damageFactor = 0.25f + 0.75f * CurrentPower;
int fullPowerDamage;
if (Main.masterMode)
fullPowerDamage = 540;
else if (Main.expertMode)
fullPowerDamage = 450;
else
fullPowerDamage = 360;
modifiers.SourceDamage *= 0f;
modifiers.SourceDamage.Flat += (int)(damageFactor * fullPowerDamage);
}
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
{
for (int i = 0; i < Projectile.oldPos.Length; i++)