Merge branch '1.4.4' into dev-weaver-tail

This commit is contained in:
Doze-Zoze committed 2026-06-30 01:31:06 -05:00
commit ecfc4788f6
2263 files changed
+37569 -35699

No files matched your search

-14
View File
@@ -1,14 +0,0 @@
using Terraria.ModLoader;
namespace CalamityMod.Backgrounds
{
public class FloralParadiseBGStyle : ModUndergroundBackgroundStyle
{
public override void FillTextureArray(int[] textureSlots)
{
// Corresponds to underground jungle backgrounds. Something custom could probably be made, but for what it is it works sufficiently for the minibiome.
for (int i = 0; i <= 3; i++)
textureSlots[i] = i + 153;
}
}
}
+9 -34
View File
@@ -10,49 +10,24 @@ namespace CalamityMod.Backgrounds
private int SSBG2;
private int SSBG3;
private int BGBG0;
private int BGBG1;
private int BGBG2;
private int BGBG3;
public override void SetStaticDefaults()
{
if (Main.dedServ)
return;
SSBG0 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
SSBG1 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
SSBG2 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
SSBG3 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
BGBG0 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
BGBG1 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BasaltGullyBG");
BGBG2 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
BGBG3 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BasaltGullyBG");
SSBG0 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG0");
SSBG1 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG1");
SSBG2 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG2");
SSBG3 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG3");
}
public override void FillTextureArray(int[] textureSlots)
{
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.RadiantReefsBiome>()) ||
Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.PolypForestBiome>()) ||
Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.TimelessShoresBiome>()) ||
Main.LocalPlayer.InModBiome<BiomeManagers.GleamingBurrowsBiome>())
{
textureSlots[0] = SSBG0;
textureSlots[1] = SSBG1;
textureSlots[2] = SSBG2;
textureSlots[3] = SSBG3;
}
if (!Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.RadiantReefsBiome>()) &&
!Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.PolypForestBiome>()) &&
!Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.TimelessShoresBiome>()) &&
!Main.LocalPlayer.InModBiome<BiomeManagers.GleamingBurrowsBiome>())
{
textureSlots[0] = BGBG0;
textureSlots[1] = BGBG1;
textureSlots[2] = BGBG2;
textureSlots[3] = BGBG3;
}
textureSlots[0] = SSBG0;
textureSlots[1] = SSBG1;
textureSlots[2] = SSBG2;
textureSlots[3] = SSBG3;
}
}
}
+11 -9
View File
@@ -182,15 +182,17 @@ namespace CalamityMod.Backgrounds
Main.spriteBatch.End();
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, distortionShader.Shader, CalamityUtils.BackgroundMatrix);
const float distortionXSpeed = -0.012f;
const float distortionYSpeed = 0.02f;
const float noiseScale = 0.075f;
const float noiseStrength = 0.035f;
Vector2 timeOffset = new Vector2(distortionXSpeed, distortionYSpeed) * Main.GlobalTimeWrappedHourly * noiseScale;
Vector2 noiseScaleStrength = new Vector2(noiseScale, noiseStrength);
distortionShader.Shader.Parameters["timeOffset"].SetValue(timeOffset);
distortionShader.Shader.Parameters["noiseScaleStrength"].SetValue(noiseScaleStrength);
distortionShader.SetShaderTexture(distortionTexture);
float distortionXSpeed = -0.012f;
float distortionYSpeed = 0.02f;
float noiseScale = 0.075f;
float noiseStrength = 0.035f;
distortionShader.Shader.Parameters["time"].SetValue(Main.GlobalTimeWrappedHourly);
distortionShader.Shader.Parameters["noiseScale"].SetValue(noiseScale);
distortionShader.Shader.Parameters["distortionStrength"].SetValue(noiseStrength);
distortionShader.Shader.Parameters["timeOffset"].SetValue(new Vector2(distortionXSpeed, distortionYSpeed));
Main.graphics.GraphicsDevice.Textures[1] = distortionTexture.Value;
Main.graphics.GraphicsDevice.SamplerStates[1] = SamplerState.LinearWrap;
Main.spriteBatch.Draw(WaterDistortionTarget.Target, new Rectangle(16, 16, Main.screenWidth, Main.screenHeight), Color.White);
}
+26 -31
View File
@@ -4,6 +4,7 @@ using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.NPCs.AstrumAureus;
using CalamityMod.NPCs.CeaselessVoid;
using CalamityMod.NPCs.Crabulon;
using CalamityMod.NPCs.NormalNPCs.HorribleHog;
using CalamityMod.NPCs.OldDuke;
using CalamityMod.NPCs.ProfanedGuardians;
using CalamityMod.NPCs.Providence;
@@ -54,12 +55,22 @@ namespace CalamityMod.Balancing
NPCSpecificBalancingChanges = new List<NPCBalancingChange>();
// ENEMIES
#region Horrible Hog
// Take 300% damage from Finch Staff.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<HorribleHog>(), Do(new ProjectileResistBalancingRule(3f, ProjectileID.BabyBird))));
#endregion
// BOSSES
#region Crabulon
// 20% resist to true melee.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Crabulon>(), ResistTrueMelee(0.8f)));
#endregion
#region Eater of Worlds
// 55% resist to Lemon 'nade
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.EaterOfWorlds, Do(new ProjectileResistBalancingRule(0.45f, ProjectileType<LemonNadeProjectile>()))));
// 50% resist to Demon Scythe.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.EaterOfWorlds, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
@@ -167,9 +178,6 @@ namespace CalamityMod.Balancing
// 50% resist to Aegis Blade's explosions because the true melee resist ain't enough.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AegisBlast>()))));
// 40% resist to Icicle Arrows.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<IcicleArrowProj>()))));
// 35% resist to Flying Dragon.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2SquireSonicBoom))));
@@ -209,19 +217,22 @@ namespace CalamityMod.Balancing
// 50% resist to Charged Blaster Cannon.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.ChargedBlasterLaser))));
// 45% resist to Duststorm in a Bottle.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<DuststormCloud>(), ProjectileType<DuststormCloudExplosion>(), ProjectileType<DuststormInABottleProj>()))));
// 35% resist to Aerial Bane.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2BetsyArrow))));
// 35% resist to Icicle Arrows.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<IcicleArrowProj>()))));
// 30% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
// 30% resist to Flak Kraken.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
// 25% resist to Solar Eruption.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.SolarWhipSword, ProjectileID.SolarWhipSwordExplosion))));
// 20% resist to Ballistic Poison Bomb's clouds.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<BallisticPoisonCloud>()))));
@@ -251,9 +262,6 @@ namespace CalamityMod.Balancing
// 50% resist to Galactus Blade.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.5f, ProjectileType<GalacticaComet>())));
// 40% resist to Pristine Fury's alt fire.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<PristineSecondary>())));
// 40% resist to Stellar Torus Staff.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<StellarTorusBeam>())));
#endregion
@@ -262,18 +270,12 @@ namespace CalamityMod.Balancing
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(ResistTrueMelee(0.5f))));
// 50% resist to Dazzling Stabber Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DazzlingStabber>()))));
// 50% resist to Last Prism.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.LastPrismLaser))));
// 50% resist to Legion of Celestia.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<CelestialAxeMinion>()))));
// 50% resist to Pristine Fury's alt fire.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<PristineSecondary>()))));
// 50% resist to Tactician's Trump Card's explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TacticiansElectricBoom>()))));
@@ -282,11 +284,12 @@ namespace CalamityMod.Balancing
// 35% resist to Event Horizon.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<EventHorizonStar>(), ProjectileType<EventHorizonBlackhole>()))));
#endregion
#region Old Duke
// 20% resist to Time Bolt.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<OldDuke>(), new ProjectileResistBalancingRule(0.8f, ProjectileType<TimeBoltKnife>())));
// 35% resist to King of Constellations, Tenryu.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<BlackDragonHead>(), ProjectileType<BlackDragonBody>(), ProjectileType<BlackDragonTail>(), ProjectileType<WhiteDragonHead>(), ProjectileType<WhiteDragonBody>(), ProjectileType<WhiteDragonTail>()))));
// 20% resist to Dazzling Stabber Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<DazzlingStabber>()))));
#endregion
#region The Devourer of Gods
@@ -301,19 +304,8 @@ namespace CalamityMod.Balancing
// 20% resist to Valediction's typhoons; will catch Nuclear Fury as well but that doesn't matter.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NuclearFuryProjectile>()))));
// 15% vulnerability to Time Bolt stealth strikes.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new StealthStrikeBalancingRule(1.15f, ProjectileType<TimeBoltKnife>()))));
#endregion The Devourer of Gods
#region Yharon
// 15% resist to The Old Reaper's stealth strike rain.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Yharon>(), Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<RadiationRain>()))));
// 15% resist to Time Bolt.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Yharon>(), Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<TimeBoltKnife>()))));
#endregion
#region Exo Mechs: Ares
// 35% resist to Devil's Devastation's slash.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<DevilsDevastationHoldout>()))));
@@ -375,6 +367,9 @@ namespace CalamityMod.Balancing
// 45% resist to Wrathwing's stealth strike fireballs.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<WrathwingCinder>()))));
// 40% resist to Eclipse's Fall
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<EclipsesFall_Javelin>()))));
// 40% resist to Omicron's beam.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<OmicronBeam>()))));
+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.BiomeManagers
{
public class PolypForestBiome : ModBiome
{
public override ModWaterStyle WaterStyle => SunkenSeaPolypWater.Instance;
public override ModWaterStyle WaterStyle => SunkenSeaBurrowsWater.Instance;
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.BiomeManagers
{
public class RadiantReefsBiome : ModBiome
{
public override ModWaterStyle WaterStyle => SunkenSeaReefsWater.Instance;
public override ModWaterStyle WaterStyle => SunkenSeaBurrowsWater.Instance;
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
+4 -3
View File
@@ -4,6 +4,7 @@ using System;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using CalamityMod.Systems;
using Terraria.ID;
namespace CalamityMod.BiomeManagers
{
@@ -11,7 +12,7 @@ namespace CalamityMod.BiomeManagers
public class SunkenSeaBiome : ModBiome
{
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
public override void Load()
{
//apply the drawblack edits here since all sunken sea biomes will have custom backgrounds
@@ -63,8 +64,8 @@ namespace CalamityMod.BiomeManagers
public override bool IsBiomeActive(Player player)
{
return BiomeTileCounterSystem.SunkenSeaBurrowsTiles > 1000 || BiomeTileCounterSystem.SunkenSeaPolypTiles > 1000 ||
BiomeTileCounterSystem.SunkenSeaReefsTiles > 1000 || BiomeTileCounterSystem.SunkenSeaShoresTiles > 1000;
return BiomeTileCounterSystem.SunkenSeaBurrowsTiles > 200 || BiomeTileCounterSystem.SunkenSeaPolypTiles > 200 ||
BiomeTileCounterSystem.SunkenSeaReefsTiles > 200 || BiomeTileCounterSystem.SunkenSeaShoresTiles > 200;
}
}
}
+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.BiomeManagers
{
public class TimelessShoresBiome : ModBiome
{
public override ModWaterStyle WaterStyle => SunkenSeaShoresWater.Instance;
public override ModWaterStyle WaterStyle => SunkenSeaBurrowsWater.Instance;
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
+3 -4
View File
@@ -1,4 +1,5 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
@@ -10,10 +11,8 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
// The nurse technically cannot get rid of this debuff by herself, as it reapplies immediately after if you have alcohol left
// But she also cleanses excess alcohol if you have Alcohol Poisoning (see CalamityPlayer.PostNurseHeal)
// Removing this set means she costs 1 debuff worth of cost to remove excess alcohol
// BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
// The nurse can remove all alcohol debuffs individually, thus removing this by proxy.
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
+29
View File
@@ -0,0 +1,29 @@
using CalamityMod.DataStructures;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class BaconOilBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 3
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().baconOil = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

+6 -3
View File
@@ -1,18 +1,21 @@
using Terraria;
using Terraria.ID;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class BloodyMaryBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 646 B

After

Width:  |  Height:  |  Size: 871 B

+6 -3
View File
@@ -1,18 +1,21 @@
using Terraria;
using Terraria.ID;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class CaribbeanRumBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 B

After

Width:  |  Height:  |  Size: 866 B

+6 -3
View File
@@ -1,18 +1,21 @@
using Terraria;
using Terraria.ID;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class CinnamonRollBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 651 B

After

Width:  |  Height:  |  Size: 832 B

+6 -3
View File
@@ -1,18 +1,21 @@
using Terraria;
using Terraria.ID;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class EverclearBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 2
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 736 B

After

Width:  |  Height:  |  Size: 819 B

+6 -3
View File
@@ -1,19 +1,22 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class EvergreenGinBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 B

After

Width:  |  Height:  |  Size: 907 B

+6 -3
View File
@@ -1,19 +1,22 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class FireballBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 818 B

+6 -4
View File
@@ -1,26 +1,28 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class GrapeBeerBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
var cplayer = player.Calamity();
cplayer.grapeBeer = true;
cplayer.critDamage -= GrapeBeer.CritLoss * 0.01f;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

After

Width:  |  Height:  |  Size: 885 B

+6 -3
View File
@@ -1,19 +1,22 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class ManhattanBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 626 B

After

Width:  |  Height:  |  Size: 815 B

+6 -3
View File
@@ -1,19 +1,22 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class MargaritaBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 729 B

After

Width:  |  Height:  |  Size: 842 B

+6 -3
View File
@@ -1,18 +1,21 @@
using Terraria;
using Terraria.ID;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class MoonshineBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 B

After

Width:  |  Height:  |  Size: 813 B

+6 -3
View File
@@ -1,18 +1,21 @@
using Terraria;
using Terraria.ID;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class MoscowMuleBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 743 B

After

Width:  |  Height:  |  Size: 898 B

+6 -3
View File
@@ -1,18 +1,21 @@
using Terraria;
using Terraria.ID;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class OldFashionedBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 649 B

After

Width:  |  Height:  |  Size: 788 B

+6 -3
View File
@@ -1,18 +1,21 @@
using Terraria;
using Terraria.ID;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class PurpleHazeBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 807 B

+6 -3
View File
@@ -1,18 +1,21 @@
using Terraria;
using Terraria.ID;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class RedWineBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 688 B

After

Width:  |  Height:  |  Size: 816 B

+6 -3
View File
@@ -1,18 +1,21 @@
using Terraria;
using Terraria.ID;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class RumBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 789 B

+6 -3
View File
@@ -1,19 +1,22 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class ScrewdriverBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 656 B

After

Width:  |  Height:  |  Size: 828 B

+6 -3
View File
@@ -1,18 +1,21 @@
using Terraria;
using Terraria.ID;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class StarBeamRyeBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 716 B

After

Width:  |  Height:  |  Size: 836 B

+6 -3
View File
@@ -1,19 +1,22 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class TequilaBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 822 B

+6 -3
View File
@@ -1,18 +1,21 @@
using Terraria;
using Terraria.ID;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class TequilaSunriseBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 700 B

After

Width:  |  Height:  |  Size: 964 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 723 B

After

Width:  |  Height:  |  Size: 731 B

+6 -3
View File
@@ -1,19 +1,22 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class VodkaBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 706 B

After

Width:  |  Height:  |  Size: 820 B

+6 -3
View File
@@ -1,18 +1,21 @@
using Terraria;
using Terraria.ID;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class WhiskeyBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 752 B

After

Width:  |  Height:  |  Size: 790 B

+6 -3
View File
@@ -1,18 +1,21 @@
using Terraria;
using Terraria.ID;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class WhiteWineBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 698 B

After

Width:  |  Height:  |  Size: 848 B

+4 -2
View File
@@ -140,14 +140,16 @@ namespace CalamityMod.Buffs
{
// Globally remove summon tag debuff stacking, unless allowed in the SummonTag
// Other mods need to add to this list because otherwise we can't tell which IsATag buff is actually for whips
if (CalamityBuffSets.SummonTagDebuff.TryGetValue(type, out var tag1) && !tag1.AllowsWhipStacking && buffIndex > 0)
var tag1 = CalamityBuffSets.SummonTagDebuff[type];
if (tag1 is not null && !tag1.AllowsWhipStacking && buffIndex > 0)
{
for (int i = buffIndex; i >= 0; i--)
{
if (npc.buffTime[i] > 0)
{
int buffID = npc.buffType[i];
if (CalamityBuffSets.SummonTagDebuff.TryGetValue(buffID, out var tag2) && !tag2.AllowsWhipStacking && buffID != type)
var tag2 = CalamityBuffSets.SummonTagDebuff[buffID];
if (tag2 is not null && !tag2.AllowsWhipStacking && buffID != type)
{
npc.DelBuff(i);
break;
@@ -5,6 +5,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -5,6 +5,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -7,6 +7,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -25,7 +26,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public static void BaneNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
+2 -1
View File
@@ -2,6 +2,7 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -24,7 +25,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -4,6 +4,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -20,7 +21,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -5,6 +5,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -5,6 +5,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -5,6 +5,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -4,6 +4,7 @@ using Terraria.DataStructures;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -17,7 +18,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = DebuffData.Daybroken;
CalamityBuffSets.DebuffDataset[Type] = DebuffData.Daybroken;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -7,6 +7,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -29,7 +30,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -5,6 +5,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -5,6 +5,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -20,7 +21,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -5,6 +5,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+3 -2
View File
@@ -5,6 +5,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -70,7 +71,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Particle smoke = new HeavySmokeParticle(npcSize, new Vector2(2f, 2f).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 0.7f), smokeColor, 40, Main.rand.NextFloat(0.3f, 0.4f) + (0.00000013f * npc.width * npc.height), 0.5f, Main.rand.NextFloat(-0.2f, 0.2f), false, required: true);
GeneralParticleHandler.SpawnParticle(smoke);
}
Dust water = Dust.NewDustDirect(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, 360, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.4f);
Dust water = Dust.NewDustDirect(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, 390, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.4f);
water.noGravity = true;
water.velocity *= 0.75f;
water.velocity.X = water.velocity.X * 0.75f;
+2 -1
View File
@@ -6,6 +6,7 @@ using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -5,6 +5,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -2,6 +2,7 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -19,7 +20,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -6,6 +6,7 @@ using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -13,6 +13,7 @@ using Terraria.DataStructures;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -55,7 +56,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -5,6 +5,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -5,6 +5,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -4,6 +4,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -20,7 +21,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -3,6 +3,7 @@ using CalamityMod.Projectiles.Summon;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -58,7 +59,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(NPC npc, ref int buffIndex)
{
-171
View File
@@ -1,171 +0,0 @@
using System;
using CalamityMod.NPCs;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
{
public class SeaKingsAssurance : ModBuff
{
public static Color BaseColor => new Color(31, 78, 155);
public static Color LightColor => new Color(31, 108, 225);
public static void Apply(NPC npc, Vector2 orig)
{
int stacks = 1;
if (npc.HasBuff<SeaKingsAssurance>())
{
int buffTimer = npc.buffTime[npc.FindBuffIndex(ModContent.BuffType<SeaKingsAssurance>())];
npc.buffTime[npc.FindBuffIndex(ModContent.BuffType<SeaKingsAssurance>())] += FramesPerStack;
npc.buffTime[npc.FindBuffIndex(ModContent.BuffType<SeaKingsAssurance>())] = ((int)Math.Ceiling((double)buffTimer / FramesPerStack) + 1) * FramesPerStack;
buffTimer = npc.buffTime[npc.FindBuffIndex(ModContent.BuffType<SeaKingsAssurance>())];
stacks += ((int)Math.Ceiling((double)buffTimer / FramesPerStack));
}
else
{
npc.AddBuff(ModContent.BuffType<SeaKingsAssurance>(), FramesPerStack);
}
npc.GetGlobalNPC<SeaKingsAssuranceNPC>().StackGlow = 1f;
npc.GetGlobalNPC<SeaKingsAssuranceNPC>().StackScale = 1.2f;
SoundStyle style = new SoundStyle("CalamityMod/Sounds/Item/WaterSplash1");
SoundEngine.PlaySound(style.WithPitchOffset(1f + ((float)stacks / 6f)).WithVolumeScale(0.2f));
float sc = 0.05f + ((float)stacks * 0.06f);
for (int i = 0; i < 5; i++)
{
float rot = Main.rand.NextFloat(MathHelper.TwoPi) + MathHelper.PiOver2;
if (orig != Vector2.Zero)
{
rot = orig.AngleTo(npc.Center) + MathHelper.PiOver2;
}
GeneralParticleHandler.SpawnParticle(new CustomPulse(
npc.Center, (rot - MathHelper.PiOver2).ToRotationVector2() * 6f, Color.Lerp(BaseColor, LightColor, sc * 3f), "CalamityMod/Particles/ForwardSmear", new Vector2(Main.rand.NextFloat(0.015f, 0.1f), 0.1f),
rot, sc, sc * 2f, 8
));
}
float range = 20 + ((float)stacks * 15f);
if (orig == Vector2.Zero)
{
foreach (NPC npc2 in Main.npc)
{
if (npc2 != npc)
{
if (npc2.active && !npc2.friendly && !npc2.isLikeATownNPC)
{
if (npc2.Distance(npc.Center) < range)
{
Apply(npc2, npc.Center);
}
}
}
}
}
}
/// <summary>
/// The number of frames per stack of this buff.
/// For instance, if the buff has less than one of this number's worth of time left,
/// it will count as one stack.
/// </summary>
public static int FramesPerStack => 60;
public static SoundStyle ImpactSound => new SoundStyle("CalamityMod/Sounds/Item/WaterSplash1");
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.buffTime[buffIndex] = Math.Min(npc.buffTime[buffIndex], 10 * FramesPerStack);
npc.GetGlobalNPC<SeaKingsAssuranceNPC>().assuredStacks = (int)Math.Ceiling((double)(npc.buffTime[buffIndex] / FramesPerStack));
}
}
public class SeaKingsAssuranceNPC : GlobalNPC
{
public static readonly Asset<Texture2D> Stacks = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/AmidiasTrident_Stacks");
public override bool InstancePerEntity => true;
public int assuredStacks = 0;
public int StackFrame = 0;
public float StackRotation = 0f;
public float StackScale = 0f;
public float StackGlow = 0f;
public override void ResetEffects(NPC npc)
{
if (assuredStacks == 0)
{
StackScale *= 0.5f;
}
else
{
StackScale = MathHelper.Lerp(StackScale, 1f, 0.2f);
}
StackGlow *= 0.7f;
assuredStacks = 0;
base.ResetEffects(npc);
}
public override void DrawEffects(NPC npc, ref Color drawColor)
{
base.DrawEffects(npc, ref drawColor);
}
public override void UpdateLifeRegen(NPC npc, ref int damage)
{
}
public override void PostDraw(NPC npc, SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
{
StackFrame = 0;
if (assuredStacks > 5) StackFrame = 1;
if (assuredStacks > 8) StackFrame = 2;
Rectangle frame = Stacks.Frame(3, 1, StackFrame);
if (StackFrame == 2)
{
StackRotation = MathHelper.Lerp(StackRotation, MathHelper.Pi, 0.2f);
}
else
{
StackRotation = MathHelper.Lerp(StackRotation, 0f, 0.1f);
}
float offset = -28;
for (int b = 0; b < CalamityGlobalNPC.moddedDebuffTextureList.Count; b++)
{
if (CalamityGlobalNPC.moddedDebuffTextureList[b].Item2.Invoke(npc))
{
offset = -48;
}
}
if (StackScale > 0.2f && assuredStacks > 2)
{
spriteBatch.Draw(Stacks.Value, npc.Top - Main.screenPosition + new Vector2(0, offset), frame, Color.White, StackRotation, frame.Size() / 2f, StackScale, SpriteEffects.None, 0f);
for (int i = 0; i < 4; i++)
{
spriteBatch.Draw(Stacks.Value, npc.Top - Main.screenPosition + new Vector2(0, offset), frame, Color.White.MultiplyRGBA(new(StackGlow, StackGlow, StackGlow, 0f)), StackRotation, frame.Size() / 2f, StackScale, SpriteEffects.None, 0f);
}
}
else
{
StackRotation = 0f;
}
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 596 B

+2 -1
View File
@@ -2,6 +2,7 @@
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -33,7 +34,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -5,6 +5,7 @@ using Terraria.DataStructures;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -18,7 +19,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = DebuffData.Shadowflame;
CalamityBuffSets.DebuffDataset[Type] = DebuffData.Shadowflame;
}
public override void Update(Player player, ref int buffIndex)
+12 -5
View File
@@ -1,8 +1,11 @@
using CalamityMod.Balancing;
using System;
using CalamityMod.Balancing;
using CalamityMod.DataStructures;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -10,11 +13,14 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 150, //Damage per shellfish
EnemyLostRegen = 170, //Damage per shellfish
NPCLifeRegenMethod = ShellfishStacking
};
public static void ShellfishStacking(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
if (npc.SuperArmor)
return;
int projectileCount = 0;
int owner = 255;
foreach (Projectile p in Main.ActiveProjectiles)
@@ -33,12 +39,12 @@ namespace CalamityMod.Buffs.DamageOverTime
}
Item heldItem = Main.player[owner].HeldItem;
int totalDamage = (int)Main.player[owner].GetTotalDamage<SummonDamageClass>().ApplyTo(debuffData.EnemyLostRegen);
int totalDamage = (int)npc.Calamity().ActiveTypelessDebuffMultiplier.ApplyTo(Main.player[owner].GetTotalDamage<SummonDamageClass>().ApplyTo(debuffData.EnemyLostRegen));
if (CalamityUtils.ShouldTriggerSummonPenalty(Main.player[owner], heldItem))
totalDamage = (int)(totalDamage * BalancingConstants.SummonerCrossClassNerf);
int totalDisplayedDamage = totalDamage / 5;
int totalDisplayedDamage = (int)Math.Max(totalDamage * debuffData.MultiplierDamageTickSize, debuffData.MinimumDamageTickSize);
npc.Calamity().ApplyDPSDebuff(projectileCount * totalDamage, projectileCount * totalDisplayedDamage, ref npc.lifeRegen, ref damage);
}
public override void SetStaticDefaults()
@@ -46,7 +52,8 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
BuffID.Sets.IsATagBuff[Type] = true;
}
public override void Update(NPC npc, ref int buffIndex)
+2 -1
View File
@@ -2,6 +2,7 @@
using CalamityMod.Projectiles.Rogue;
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -34,7 +35,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(NPC npc, ref int buffIndex)
+2 -1
View File
@@ -4,6 +4,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -20,7 +21,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -5,6 +5,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
// Acid Venom immunity is granted automatically if you are immune to Sulphuric Poisoning.
BuffID.Sets.GrantImmunityWith[BuffID.Venom].Add(Type);
+2 -1
View File
@@ -8,6 +8,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -28,7 +29,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.buffNoSave[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex) => player.Calamity().trueVHex = true;
+2 -1
View File
@@ -6,6 +6,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -23,7 +24,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -5,6 +5,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -5,6 +5,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
+2 -1
View File
@@ -8,6 +8,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -31,7 +32,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.buffNoSave[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex) => player.Calamity().vHex = true;
+2 -1
View File
@@ -1,6 +1,7 @@
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -17,7 +18,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex) => player.Calamity().weakBrimstoneFlames = true;
+108
View File
@@ -0,0 +1,108 @@
using System;
using CalamityMod.DataStructures;
using CalamityMod.Dusts;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
{
public class WindChilled : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 12,
NPCLifeRegenMethod = WindChilledNPCLifeRegen,
ColdDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
public static void WindChilledNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
var cnpc = npc.Calamity();
int baseDoTValue = (int)(cnpc.windChilledMult * npc.Calamity().ActiveColdDebuffMultiplier.ApplyTo(debuffData.EnemyLostRegen));
cnpc.ApplyDPSDebuff(baseDoTValue, Math.Max((int)(baseDoTValue * debuffData.MultiplierDamageTickSize), debuffData.MinimumDamageTickSize) / 2, ref npc.lifeRegen, ref damage);
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().windChilled = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.Calamity().windChilled = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false)
{
Player player = drawInfo.drawPlayer;
float widthMult = 1;
float hightMult = 1;
Color color = Elumphant.color1;
Color color2 = Elumphant.color2;
float sine = (float)Math.Sin((Main.GlobalTimeWrappedHourly * 9.0f) / MathHelper.Pi);
if (Main.rand.NextBool(16))
{
bool start = !Main.rand.NextBool(4);
Vector2 particleVel = Vector2.UnitY * Main.rand.NextFloat(-1.25f, 1.25f) * Math.Max(hightMult, widthMult) * (Main.rand.NextBool(5) ? 1.5f : 1) + player.velocity * 0.85f;
Vector2 particlePos = player.Center + Main.rand.NextVector2Circular(3 * widthMult + 8, 3 * widthMult + 8) * Math.Max(hightMult, widthMult);
Particle mist = new CustomPulsingSpark(particlePos, particleVel, "CalamityMod/Particles/ThinSparkle", "CalamityMod/Particles/BloomCircle", false, 65, Main.rand.NextFloat(0.95f, 1.35f) * MathF.Pow(widthMult, 0.45f), start ? color : color2, start ? color2 : color,
new Vector2(0.6f, 1.2f), true, true, Main.rand.Next(4, 7 + 1), colorFadeSpeed: 0.85f, noShrink: true, extraRotation: -particleVel.ToRotation(), shrinkSpeed: 0.1f, sineRate: Main.rand.NextFloat(0.25f, 0.55f), sineIntensity: (int)(Main.rand.Next(12, 19 + 1) * Math.Max(hightMult, widthMult)));
GeneralParticleHandler.SpawnParticle(mist, true, Enums.GeneralDrawLayer.AfterPlayers);
}
if (Main.rand.NextBool(11))
{
Vector2 dustVel = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(0.2f, 1.1f) * Math.Max(hightMult, widthMult) * 2 * (Main.rand.NextBool(5) ? 2f : 1);
Dust dust2 = Dust.NewDustPerfect(player.Center + dustVel * Main.rand.NextFloat(3, 4), ModContent.DustType<SquashDustPixelated>(),
Vector2.Zero, 0, default, Main.rand.NextFloat(0.2f, 0.45f) * Math.Max(hightMult, widthMult));
dust2.noGravity = false;
dust2.color = Main.rand.NextBool() ? color : color2;
dust2.customData = new Vector2(0.7f, 1.4f);
dust2.fadeIn = 0.1f * Math.Max(hightMult, widthMult);
}
}
internal static void DrawEffects(NPC npc, ref Color drawColor)
{
float maxSizeMult = 10f;
float widthMult = MathF.Pow(Utils.Remap(npc.width, 10, 500, 1f, maxSizeMult, false), 0.8f);
float hightMult = MathF.Pow(Utils.Remap(npc.height, 10, 500, 1f, maxSizeMult, false), 0.8f);
Color color = Elumphant.color1;
Color color2 = Elumphant.color2;
float sine = (float)Math.Sin((Main.GlobalTimeWrappedHourly * 9.0f) / MathHelper.Pi);
if (Main.rand.NextBool(16))
{
bool start = !Main.rand.NextBool(4);
Vector2 particleVel = Vector2.UnitY * Main.rand.NextFloat(-1.25f, 1.25f) * Math.Max(hightMult, widthMult) * (Main.rand.NextBool(5) ? 1.5f : 1) + npc.velocity * 0.85f;
Vector2 particlePos = npc.Center + Main.rand.NextVector2Circular(3 * widthMult + 8, 3 * widthMult + 8) * Math.Max(hightMult, widthMult);
Particle mist = new CustomPulsingSpark(particlePos, particleVel, "CalamityMod/Particles/ThinSparkle", "CalamityMod/Particles/BloomCircle", false, 65, Main.rand.NextFloat(0.95f, 1.35f) * MathF.Pow(widthMult, 0.45f), start ? color : color2, start ? color2 : color,
new Vector2(0.6f, 1.2f), true, true, Main.rand.Next(4, 7 + 1), colorFadeSpeed: 0.85f, noShrink: true, extraRotation: -particleVel.ToRotation(), shrinkSpeed: 0.1f, sineRate: Main.rand.NextFloat(0.25f, 0.55f), sineIntensity: (int)(Main.rand.Next(12, 19 + 1) * Math.Max(hightMult, widthMult)));
GeneralParticleHandler.SpawnParticle(mist, true, Main.rand.NextBool() ? Enums.GeneralDrawLayer.AfterNPCs : Enums.GeneralDrawLayer.BeforeNPCs);
}
if (Main.rand.NextBool(11))
{
Vector2 dustVel = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(0.2f, 1.1f) * Math.Max(hightMult, widthMult) * 2 * (Main.rand.NextBool(5) ? 2f : 1);
Dust dust2 = Dust.NewDustPerfect(npc.Center + dustVel * Main.rand.NextFloat(3, 4), ModContent.DustType<SquashDustPixelated>(),
Vector2.Zero, 0, default, Main.rand.NextFloat(0.2f, 0.45f) * Math.Max(hightMult, widthMult));
dust2.noGravity = false;
dust2.color = Main.rand.NextBool() ? color : color2;
dust2.customData = new Vector2(0.7f, 1.4f);
dust2.fadeIn = 0.1f * Math.Max(hightMult, widthMult);
}
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

@@ -2,7 +2,7 @@
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Cooldowns
namespace CalamityMod.Buffs.DamageOverTime
{
public class Withered : ModBuff
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 586 B

+27
View File
@@ -0,0 +1,27 @@
using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Pets
{
public class BeldumBuff : ModBuff
{
public override void SetStaticDefaults()
{
Main.buffNoTimeDisplay[Type] = true;
Main.vanityPet[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.buffTime[buffIndex] = 18000;
player.Calamity().beldum = true;
bool PetProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType<Beldum>()] <= 0;
if (PetProjectileNotSpawned && player.whoAmI == Main.myPlayer)
{
Projectile.NewProjectile(player.GetSource_Buff(buffIndex), player.Center, Vector2.Zero, ModContent.ProjectileType<Beldum>(), 0, 0f, player.whoAmI, 0f, 0f);
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Loaded 100 of 2263 files, more files were not shown because too many files have changed in this diff. Show more