Merge branch '1.4.4' into MegalodonLine

This commit is contained in:
sunny-raindrops committed 2026-05-24 16:01:42 -07:00
commit 4504fefe04
822 files changed
+15111 -4493

No files matched your search

+7 -16
View File
@@ -167,9 +167,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))));
@@ -198,9 +195,6 @@ namespace CalamityMod.Balancing
// 75% resist to Plaguenades.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.25f, ProjectileType<PlaguenadeBee>(), ProjectileType<PlaguenadeProj>()))));
// 70% resist to Stardust Dragon Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(ResistTrueMelee(0.5f))));
@@ -209,13 +203,16 @@ 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>()))));
// 40% resist to Stardust Dragon Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.6f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
// 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>()))));
@@ -254,9 +251,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
@@ -274,9 +268,6 @@ namespace CalamityMod.Balancing
// 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>()))));
+30
View File
@@ -0,0 +1,30 @@
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;
BuffID.Sets.NurseCannotRemoveDebuff[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 -1
View File
@@ -1,10 +1,15 @@
using Terraria;
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;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 646 B

After

Width:  |  Height:  |  Size: 871 B

+6 -1
View File
@@ -1,10 +1,15 @@
using Terraria;
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;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 B

After

Width:  |  Height:  |  Size: 866 B

+6 -1
View File
@@ -1,10 +1,15 @@
using Terraria;
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;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 651 B

After

Width:  |  Height:  |  Size: 832 B

+6 -1
View File
@@ -1,10 +1,15 @@
using Terraria;
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;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 736 B

After

Width:  |  Height:  |  Size: 819 B

+6 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ModLoader;
@@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol
{
public class EvergreenGinBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 B

After

Width:  |  Height:  |  Size: 907 B

+6 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ModLoader;
@@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol
{
public class FireballBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 818 B

+6 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ModLoader;
@@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol
{
public class GrapeBeerBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

After

Width:  |  Height:  |  Size: 885 B

+6 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ModLoader;
@@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol
{
public class ManhattanBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 626 B

After

Width:  |  Height:  |  Size: 815 B

+6 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ModLoader;
@@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol
{
public class MargaritaBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 729 B

After

Width:  |  Height:  |  Size: 842 B

+6 -1
View File
@@ -1,10 +1,15 @@
using Terraria;
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;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 B

After

Width:  |  Height:  |  Size: 813 B

+6 -1
View File
@@ -1,10 +1,15 @@
using Terraria;
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;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 743 B

After

Width:  |  Height:  |  Size: 898 B

+6 -1
View File
@@ -1,10 +1,15 @@
using Terraria;
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;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 649 B

After

Width:  |  Height:  |  Size: 788 B

+6 -1
View File
@@ -1,10 +1,15 @@
using Terraria;
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;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 807 B

+6 -1
View File
@@ -1,10 +1,15 @@
using Terraria;
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;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 688 B

After

Width:  |  Height:  |  Size: 816 B

+6 -1
View File
@@ -1,10 +1,15 @@
using Terraria;
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;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 789 B

+6 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ModLoader;
@@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol
{
public class ScrewdriverBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 656 B

After

Width:  |  Height:  |  Size: 828 B

+6 -1
View File
@@ -1,10 +1,15 @@
using Terraria;
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;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 716 B

After

Width:  |  Height:  |  Size: 836 B

+6 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ModLoader;
@@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol
{
public class TequilaBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 822 B

+6 -1
View File
@@ -1,10 +1,15 @@
using Terraria;
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;
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 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ModLoader;
@@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol
{
public class VodkaBuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
AlcoholLevel = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 706 B

After

Width:  |  Height:  |  Size: 820 B

+6 -1
View File
@@ -1,10 +1,15 @@
using Terraria;
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;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 752 B

After

Width:  |  Height:  |  Size: 790 B

+6 -1
View File
@@ -1,10 +1,15 @@
using Terraria;
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;
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)
{
+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)
+11 -4
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)
@@ -38,7 +44,7 @@ namespace CalamityMod.Buffs.DamageOverTime
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.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 B

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 664 B

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 562 B

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 B

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 B

After

Width:  |  Height:  |  Size: 530 B

+42
View File
@@ -0,0 +1,42 @@
using CalamityMod.DataStructures;
using CalamityMod.Items.Potions;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class SwinesWrathBuff : ModBuff
{
public static readonly SoundStyle TimerSound = new("CalamityMod/Sounds/Custom/TickingTimer");
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
TheConcoctionPlayer concoctionPlayer = player.GetModPlayer<TheConcoctionPlayer>();
if (concoctionPlayer.swinesWrathCounter < 2 && concoctionPlayer.swinesWrathCounter != -1)
{
player.KillMe(PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.SwinesWrath" + Main.rand.Next(1, 7 + 1)).ToNetworkText(player.name)), 1000, -1);
concoctionPlayer.swinesWrathCounter = -1;
}
else if (concoctionPlayer.swinesWrathCounter % 60 == 59)
SoundEngine.PlaySound(TimerSound with { Volume = ((600f - concoctionPlayer.swinesWrathCounter) / 600f) }, player.Center); // Gets louder as time progresses
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

+2 -1
View File
@@ -4,6 +4,7 @@ using CalamityMod.Items.Accessories;
using Terraria;
using Terraria.Localization;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.StatBuffs
{
@@ -47,7 +48,7 @@ namespace CalamityMod.Buffs.StatBuffs
Main.debuff[Type] = false;
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
@@ -4,6 +4,7 @@ using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.StatDebuffs
{
@@ -21,7 +22,7 @@ namespace CalamityMod.Buffs.StatDebuffs
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)
-7
View File
@@ -6,8 +6,6 @@ namespace CalamityMod.Buffs.StatDebuffs
{
public class Crumbling : ModBuff
{
public static int DefenseReduction = 10;
public static float MultiplicativeDamageReductionPlayer = 0.7f;
// 8% DR reduction
public static float MultiplicativeDamageReductionEnemy = 0.92f;
@@ -24,10 +22,5 @@ namespace CalamityMod.Buffs.StatDebuffs
{
npc.Calamity().crumble = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().crumble = true;
}
}
}
+2 -1
View File
@@ -4,6 +4,7 @@ using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.StatDebuffs
{
@@ -15,7 +16,7 @@ namespace CalamityMod.Buffs.StatDebuffs
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
CalamityBuffSets.DebuffDataset[Type] = debuffData;
}
// Purely to make it get electric color in tooltips
public static DebuffData debuffData = new DebuffData()
+2 -1
View File
@@ -4,6 +4,7 @@ using CalamityMod.Projectiles.Magic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Systems.Collections;
namespace CalamityMod.Buffs.StatDebuffs
{
@@ -53,7 +54,7 @@ namespace CalamityMod.Buffs.StatDebuffs
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)
+22
View File
@@ -0,0 +1,22 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatDebuffs
{
public class Malnourished : ModBuff
{
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().malnourished = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

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