Removed Crabulon's enrage

including Legendary Mode's enrage increment
also only summonable underground
This commit is contained in:
Altixal committed 2025-08-06 19:10:36 +07:00
1 parent 0a0c0500f0
commit 4e427f35a6
3 files changed
+5 -32

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.SummonItems
public override bool CanUseItem(Player player)
{
return player.ZoneGlowshroom && !NPC.AnyNPCs(ModContent.NPCType<Crabulon>()) && !BossRushEvent.BossRushActive;
return player.ZoneGlowshroom && (player.position.Y / 16f) > Main.worldSurface && !NPC.AnyNPCs(ModContent.NPCType<Crabulon>()) && !BossRushEvent.BossRushActive;
}
public override bool? UseItem(Player player)
@@ -107,8 +107,7 @@ DecapoditaSprout: {
DisplayName: Decapodita Sprout
Tooltip:
'''
Summons Crabulon when used in the Mushroom biome
Enrages outside the Underground Mushroom biome
Summons Crabulon when used in the Underground Mushroom biome
{$Common.NotConsumable}
'Bristling with the spores of a unique, parasitic strain.'
'''
+3 -29
View File
@@ -183,32 +183,6 @@ namespace CalamityMod.NPCs.Crabulon
else if (NPC.timeLeft < 1800)
NPC.timeLeft = 1800;
// Enrage
if ((!player.ZoneGlowshroom || (NPC.position.Y / 16f) < Main.worldSurface) && !BossRushEvent.BossRushActive)
{
if (biomeEnrageTimer > 0)
biomeEnrageTimer--;
}
else
biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
bool biomeEnraged = biomeEnrageTimer <= 0;
float enrageScale = 0f;
if (biomeEnraged && (NPC.position.Y / 16f) < Main.worldSurface)
{
NPC.Calamity().CurrentlyEnraged = true;
enrageScale += 1f;
}
if (biomeEnraged && !player.ZoneGlowshroom)
{
NPC.Calamity().CurrentlyEnraged = true;
enrageScale += 1f;
}
if (CalamityWorld.LegendaryMode)
enrageScale += 0.5f;
if (NPC.ai[0] < 2f)
{
int mushBombAmt = phase4 ? 6 : phase3 ? 3 : phase2 ? 2 : 1;
@@ -276,7 +250,7 @@ namespace CalamityMod.NPCs.Crabulon
// Avoid cheap bullshit
NPC.damage = 0;
float walkingVelocity = (death ? (5f + 2f * (1f - lifeRatio)) : expertMode ? 5f : 3.5f) + 2.5f * enrageScale;
float walkingVelocity = death ? (5f + 2f * (1f - lifeRatio)) : expertMode ? 5f : 3.5f;
if (phase2)
walkingVelocity += 0.5f;
if (phase3)
@@ -407,7 +381,7 @@ namespace CalamityMod.NPCs.Crabulon
NPC.ai[1] += 1f;
}
float jumpGateValue = (expertMode ? 60f : 120f) / (enrageScale + 1f);
float jumpGateValue = expertMode ? 60f : 120f;
if (NPC.ai[1] >= jumpGateValue)
{
NPC.ai[1] = -20f;
@@ -640,7 +614,7 @@ namespace CalamityMod.NPCs.Crabulon
}
else
{
float velocityX = (death ? 0.15f : expertMode ? 0.125f : 0.1f) + 0.05f * enrageScale;
float velocityX = death ? 0.15f : expertMode ? 0.125f : 0.1f;
if (NPC.direction < 0)
NPC.velocity.X -= velocityX;
else if (NPC.direction > 0)