Merge branch '1.4.4' into magnetized-orb
No files matched your search
@@ -68,6 +68,9 @@ namespace CalamityMod.Balancing
|
||||
|
||||
// 25% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.EaterOfWorlds, Do(ResistTrueMelee(0.75f))));
|
||||
|
||||
// 40% resist to Lemon 'nade
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.EaterOfWorlds, Do(new ProjectileResistBalancingRule(0.60f, ProjectileType<LemonNadeProjectile>()))));
|
||||
#endregion
|
||||
|
||||
#region Brain of Cthulhu: Creepers
|
||||
@@ -167,9 +170,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,30 +198,33 @@ namespace CalamityMod.Balancing
|
||||
// 75% resist to Plaguenades.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.25f, ProjectileType<PlaguenadeBee>(), ProjectileType<PlaguenadeProj>()))));
|
||||
|
||||
// 70% resist to Charged Blaster Cannon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.ChargedBlasterLaser))));
|
||||
|
||||
// 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))));
|
||||
|
||||
// 50% resist to Atlantis (Atlantis gaming!).
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AtlantisSpear>()))));
|
||||
|
||||
// 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>()))));
|
||||
|
||||
// 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 +254,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
|
||||
@@ -271,9 +271,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>()))));
|
||||
|
||||
@@ -293,12 +290,12 @@ namespace CalamityMod.Balancing
|
||||
// 65% resist to Wave Pounder.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<WavePounderBoom>()))));
|
||||
|
||||
// 60% resist to Corinth Prime's grenades.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType<CorinthPrimeAirburst>()))));
|
||||
|
||||
// 35% resist to Sulphuric Acid Cannon's explosions.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<SulphuricAcidCannonExplosion>()))));
|
||||
|
||||
// 25% resist to Corinth Prime's grenades.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<CorinthPrimeAirburst>()))));
|
||||
|
||||
// 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>()))));
|
||||
|
||||
|
||||
@@ -62,18 +62,18 @@
|
||||
internal const int SolarFlareIFrames = 12;
|
||||
internal const float SolarFlareBaseDamage = 400f;
|
||||
|
||||
// Dodge cooldowns (in frames)
|
||||
// TODO -- Some of these could be moved to the respective item files
|
||||
internal static readonly int BeltDodgeCooldownMin = 1200;
|
||||
internal static readonly int BeltDodgeCooldownMax = 5400;
|
||||
internal static readonly int BrainDodgeCooldownMin = 1200;
|
||||
internal static readonly int BrainDodgeCooldownMax = 5400;
|
||||
internal static readonly int AmalgamDodgeCooldownMin = 1200;
|
||||
internal static readonly int AmalgamDodgeCooldownMax = 5400;
|
||||
internal static readonly int MirrorDodgeCooldownMin = 1200;
|
||||
internal static readonly int MirrorDodgeCooldownMax = 5400;
|
||||
internal static readonly int EvolutionReflectCooldownMin = 1200;
|
||||
internal static readonly int EvolutionReflectCooldownMax = 5400;
|
||||
/// <summary>
|
||||
/// How long the dodge cooldown is at maximum damage
|
||||
/// </summary>
|
||||
internal static readonly int DodgeCooldownMax = 5400; // 90 seconds
|
||||
/// <summary>
|
||||
/// How much the dodge cooldown is reduced when at minimum damage
|
||||
/// </summary>
|
||||
internal static float DodgeCooldownDamageMult => 0.33f; // 30 seconds
|
||||
/// <summary>
|
||||
/// How much the dodge cooldown is reduced per stacked dodge. Each stack applies multiplicatively.
|
||||
/// </summary>
|
||||
internal static float DodgeCooldownMultPerStack => 0.85f; // -15% per stack, multiplicatively
|
||||
#endregion
|
||||
|
||||
#region Damage
|
||||
@@ -126,11 +126,11 @@
|
||||
internal static readonly float LifeStealRecoveryRate_Classic = 0.6f;
|
||||
internal static readonly float LifeStealRecoveryRate_Expert = 0.5f;
|
||||
|
||||
// Nerfs the life steal recovery rate in Classic from 0.6 to 0.2 (36 HP/s to 12 HP/s)
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Classic = 0.4f;
|
||||
// Nerfs the life steal recovery rate in Classic from 0.6 to 0.15 (36 HP/s to 9 HP/s)
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Classic = 0.45f;
|
||||
|
||||
// Nerfs the life steal recovery rate in Expert from 0.5 to 0.15 (30 HP/s to 9 HP/s)
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Expert = 0.35f;
|
||||
// Nerfs the life steal recovery rate in Expert from 0.5 to 0.1 (30 HP/s to 6 HP/s)
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Expert = 0.4f;
|
||||
#endregion
|
||||
|
||||
#region Rogue Base Stats
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 646 B After Width: | Height: | Size: 871 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 866 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 651 B After Width: | Height: | Size: 832 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 736 B After Width: | Height: | Size: 819 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 668 B After Width: | Height: | Size: 907 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 818 B |
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 640 B After Width: | Height: | Size: 885 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 626 B After Width: | Height: | Size: 815 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 729 B After Width: | Height: | Size: 842 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 813 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 743 B After Width: | Height: | Size: 898 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 649 B After Width: | Height: | Size: 788 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 807 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 688 B After Width: | Height: | Size: 816 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 789 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 656 B After Width: | Height: | Size: 828 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 716 B After Width: | Height: | Size: 836 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 822 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 700 B After Width: | Height: | Size: 964 B |
|
Before Width: | Height: | Size: 723 B After Width: | Height: | Size: 731 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 706 B After Width: | Height: | Size: 820 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 752 B After Width: | Height: | Size: 790 B |
@@ -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)
|
||||
|
||||
|
Before Width: | Height: | Size: 698 B After Width: | Height: | Size: 848 B |
@@ -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;
|
||||
@@ -156,11 +158,13 @@ namespace CalamityMod.Buffs
|
||||
}
|
||||
}
|
||||
|
||||
if (type == BuffID.Frozen)
|
||||
{
|
||||
npc.Calamity().frozen = true;
|
||||
}
|
||||
if (type == BuffID.Webbed)
|
||||
{
|
||||
npc.Calamity().webbed = true;
|
||||
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
||||
}
|
||||
if (type == BuffID.Electrified)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
using System;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Systems.Collections;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class Bane : ModBuff
|
||||
{
|
||||
public static Color baneColor1 = new Color(217, 115, 0);
|
||||
public static Color baneColor2 = new Color(0, 232, 146);
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 40,
|
||||
NPCLifeRegenMethod = BaneNPCLifeRegen
|
||||
};
|
||||
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 BaneNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
var cnpc = npc.Calamity();
|
||||
bool effected = (cnpc.abaddonEffected || cnpc.apollyonEffected);
|
||||
bool strong = cnpc.apollyonEffected;
|
||||
int baseDoTValue = (int)debuffData.EnemyLostRegen;
|
||||
if (effected)
|
||||
{
|
||||
foreach (var player in Main.ActivePlayers)
|
||||
{
|
||||
{
|
||||
float improvedDamage = baseDoTValue * player.Calamity().playerBaneDebuffDamage;
|
||||
if (improvedDamage > baseDoTValue && (player.Calamity().abaddon || player.Calamity().apollyon))
|
||||
{
|
||||
baseDoTValue = (int)improvedDamage;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cnpc.ApplyDPSDebuff(baseDoTValue, baseDoTValue / 20, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().bane = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
npc.Calamity().bane = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false)
|
||||
{
|
||||
Player player = drawInfo.drawPlayer;
|
||||
Vector3 light = baneColor1.ToVector3();
|
||||
Lighting.AddLight(player.Center, light);
|
||||
|
||||
float sine = (float)Math.Sin((Main.GlobalTimeWrappedHourly * 9.0f) / MathHelper.Pi);
|
||||
if (Main.rand.NextBool(20))
|
||||
{
|
||||
bool start = !Main.rand.NextBool(4);
|
||||
Vector2 baneVel = Vector2.UnitY * Main.rand.NextFloat(-0.5f, -1.5f) * (Main.rand.NextBool(5) ? 2 : 1) + player.velocity * 0.35f;
|
||||
Vector2 banePos = player.Center + Main.rand.NextVector2Circular(3, 8) + (Vector2.UnitY * 14) + Vector2.UnitY * ((1 - sine) * 2.3f);
|
||||
Particle baneRunes = new BaneParticle(banePos, baneVel, false, 55, 1f, start ? baneColor1 : baneColor2, start ? baneColor2 : baneColor1, Vector2.One, true, Main.rand.NextBool(3) ? Main.rand.NextFloat(-0.2f, 0.2f) : 0, 0.95f, MathHelper.PiOver2 * Main.rand.Next(4 + 1), sineRate: Main.rand.NextFloat(0.2f, 1f), sineIntensity: Main.rand.Next(14, 19 + 1));
|
||||
GeneralParticleHandler.SpawnParticle(baneRunes);
|
||||
if (Main.rand.NextBool())
|
||||
baneRunes.DrawLayer = Enums.GeneralDrawLayer.BeforeNPCs;
|
||||
}
|
||||
}
|
||||
|
||||
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
||||
{
|
||||
Texture2D bloom = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomRingAngled").Value;
|
||||
Texture2D center = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
|
||||
Vector2 drawPosition = npc.Center - Main.screenPosition;
|
||||
Color color = baneColor1;
|
||||
Color color2 = baneColor2;
|
||||
float maxSizeMult = 10f;
|
||||
float widthMult = MathF.Pow(Utils.Remap(npc.width, 10, 500, 1f, maxSizeMult, false), 0.8f);
|
||||
float sine = (float)Math.Sin((Main.GlobalTimeWrappedHourly * 9.0f) / MathHelper.Pi);
|
||||
float sine2 = (float)Math.Sin((Main.GlobalTimeWrappedHourly * 11.0f) / MathHelper.Pi);
|
||||
float randSize = Main.rand.NextFloat(0.82f, 1.08f);
|
||||
|
||||
float clockSine = (float)Math.Sin((float)Math.Pow(Utils.GetLerpValue(0, 110, ((int)(Main.GlobalTimeWrappedHourly * 60) % 120)), 5));
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
float sizeMult = (i == 0 ? 1 : 0.8f);
|
||||
float colorMult = (i == 0 ? 1 : 0.7f);
|
||||
Main.EntitySpriteDraw(bloom, drawPosition + (Vector2.UnitY * npc.height / 2f) + Vector2.UnitY * ((1 - sine) * 2.3f * MathF.Pow(widthMult, 0.55f)), null, Color.Lerp(color2, Color.White, i * 0.7f) with { A = 0 } * colorMult, 0, bloom.Size() / 2, new Vector2((sine * 0.09f + 1.2f) * widthMult, 0.9f) * 0.18f * MathF.Pow(randSize, 0.3f) * npc.Calamity().baneVisual, SpriteEffects.None);
|
||||
Main.EntitySpriteDraw(center, drawPosition + (Vector2.UnitY * npc.height / 2f) + Vector2.UnitY * ((1 - sine2) * 3.3f * MathF.Pow(widthMult, 0.55f)), null, Color.Lerp(color, Color.White, i * 0.7f) with { A = 0 } * colorMult, 0, center.Size() / 2, new Vector2((sine2 * 0.09f + 1.2f) * widthMult, 0.6f) * 0.18f * randSize * npc.Calamity().baneVisual, SpriteEffects.None);
|
||||
}
|
||||
|
||||
int chance = (int)(13 + 40 * (1 - npc.Calamity().baneVisual));
|
||||
if (Main.rand.NextBool(chance))
|
||||
{
|
||||
bool start = !Main.rand.NextBool(4);
|
||||
Vector2 baneVel = Vector2.UnitY * Main.rand.NextFloat(-0.5f, -1.5f) * widthMult * (Main.rand.NextBool(5) ? 2 : 1) + npc.velocity * 0.35f;
|
||||
Vector2 banePos = npc.Center + Main.rand.NextVector2Circular(3 * widthMult, 8) + (Vector2.UnitY * npc.height / 3f) + Vector2.UnitY * ((1 - sine) * 2.3f);
|
||||
Particle baneRunes = new BaneParticle(banePos, baneVel, false, 55, 1f * MathF.Pow(widthMult, 0.45f), start ? color : color2, start ? color2 : color, Vector2.One, true, Main.rand.NextBool(3) ? Main.rand.NextFloat(-0.2f, 0.2f) : 0, 0.95f, MathHelper.PiOver2 * Main.rand.Next(4 + 1), sineRate: Main.rand.NextFloat(0.2f, 1f), sineIntensity: Main.rand.Next(14, 19 + 1) * widthMult);
|
||||
GeneralParticleHandler.SpawnParticle(baneRunes);
|
||||
if (Main.rand.NextBool())
|
||||
baneRunes.DrawLayer = Enums.GeneralDrawLayer.BeforeNPCs;
|
||||
}
|
||||
Lighting.AddLight(npc.Center, color.ToVector3() * 0.6f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.1 KiB |
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -7,6 +7,7 @@ using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Systems.Collections;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
@@ -16,11 +17,11 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
EnemyLostRegen = 60, //Unused in the method, this is the amount of DoT from Forbidden Oathblade demon flames
|
||||
HeatDebuffScaling = 1, //Unused in the method, but kept so other things can know this is a heat debuff
|
||||
NPCLifeRegenMethod = DemonFlamesNPCLifeRegen
|
||||
NPCLifeRegenMethod = DemonicFlamesNPCLifeRegen
|
||||
};
|
||||
public static void DemonFlamesNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
public static void DemonicFlamesNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
int baseDemonicFlamesDoTValue = (int)Math.Max(npc.Calamity().ActiveHeatDebuffMultiplier.ApplyTo(npc.Calamity().demonicFlamesBonusDamage), npc.Calamity().demonicFlamesBonusDamage);
|
||||
int baseDemonicFlamesDoTValue = (int)Math.Max(Math.Max(npc.Calamity().ActiveHeatDebuffMultiplier.ApplyTo(npc.Calamity().demonicFlamesBonusDamage), npc.Calamity().demonicFlamesBonusDamage), (int)debuffData.EnemyLostRegen);
|
||||
npc.Calamity().ApplyDPSDebuff(baseDemonicFlamesDoTValue, baseDemonicFlamesDoTValue / 15, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
public override void SetStaticDefaults()
|
||||
@@ -29,8 +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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -5,6 +5,7 @@ using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Systems.Collections;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
@@ -12,7 +13,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 400,
|
||||
EnemyLostRegen = 350, //175 dps
|
||||
WaterDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
@@ -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;
|
||||
|
||||
@@ -3,8 +3,10 @@ using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Systems.Collections;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
@@ -20,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)
|
||||
@@ -40,14 +42,14 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Vector2 randVel = new Vector2(5, 5).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 1f);
|
||||
Dust dust = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, DustID.Blood, randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.6f, 0.9f));
|
||||
Dust dust = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, (!ChildSafety.Disabled ? DustID.Cloud : DustID.Blood), randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.6f, 0.9f));
|
||||
dust.noGravity = false;
|
||||
Particle spark = new AltSparkParticle(modPlayer.RandomDebuffVisualSpot, randVel + new Vector2(0, -4), true, 12, Main.rand.NextFloat(0.25f, 0.6f), Color.DarkRed * 0.5f);
|
||||
Particle spark = new AltSparkParticle(modPlayer.RandomDebuffVisualSpot, randVel + new Vector2(0, -4), true, 12, Main.rand.NextFloat(0.25f, 0.6f), (!ChildSafety.Disabled ? Color.CornflowerBlue : Color.DarkRed) * 0.5f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
if (Main.rand.NextBool(8))
|
||||
{
|
||||
Particle spark = new GlowOrbParticle(modPlayer.RandomDebuffVisualSpot, new Vector2(0, 4) * Main.rand.NextFloat(0.5f, 0.7f), true, 16, Main.rand.NextFloat(0.55f, 0.8f), Color.DarkRed * 0.8f, false, false, false);
|
||||
Particle spark = new GlowOrbParticle(modPlayer.RandomDebuffVisualSpot, new Vector2(0, 4) * Main.rand.NextFloat(0.5f, 0.7f), true, 16, Main.rand.NextFloat(0.55f, 0.8f), (!ChildSafety.Disabled ? Color.CornflowerBlue : Color.DarkRed) * 0.8f, false, false, false);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
}
|
||||
@@ -58,17 +60,17 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
Vector2 randVel = new Vector2(5, 5).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 1f);
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
Particle spark = new AltSparkParticle(npcSize, randVel + new Vector2(0, -4), true, 12, Main.rand.NextFloat(0.25f, 0.6f), Color.DarkRed * 0.5f);
|
||||
Particle spark = new AltSparkParticle(npcSize, randVel + new Vector2(0, -4), true, 12, Main.rand.NextFloat(0.25f, 0.6f), (!ChildSafety.Disabled ? Color.CornflowerBlue : Color.DarkRed) * 0.5f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
else
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(npcSize, DustID.Blood, randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.2f, 0.6f));
|
||||
Dust dust = Dust.NewDustPerfect(npcSize, (!ChildSafety.Disabled ? DustID.Cloud : DustID.Blood), randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.2f, 0.6f));
|
||||
dust.noGravity = false;
|
||||
}
|
||||
if (Main.rand.NextBool(8))
|
||||
{
|
||||
Particle spark = new GlowOrbParticle(npcSize, new Vector2(0, 4) * Main.rand.NextFloat(0.5f, 0.7f), true, 16, Main.rand.NextFloat(0.55f, 0.8f), Color.DarkRed * 0.8f, false, false, false);
|
||||
Particle spark = new GlowOrbParticle(npcSize, new Vector2(0, 4) * Main.rand.NextFloat(0.5f, 0.7f), true, 16, Main.rand.NextFloat(0.55f, 0.8f), (!ChildSafety.Disabled ? Color.CornflowerBlue : Color.DarkRed) * 0.8f, false, false, false);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,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)
|
||||
|
||||
@@ -3,8 +3,10 @@ using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Systems.Collections;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
@@ -20,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)
|
||||
@@ -40,14 +42,14 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Vector2 randVel = new Vector2(6, 6).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 1f);
|
||||
Dust dust = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, DustID.Blood, randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.6f, 0.9f));
|
||||
Dust dust = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, (!ChildSafety.Disabled ? DustID.Cloud : DustID.Blood), randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.6f, 0.9f));
|
||||
dust.noGravity = false;
|
||||
Particle spark = new AltSparkParticle(modPlayer.RandomDebuffVisualSpot, randVel + new Vector2(0, -4), true, 12, Main.rand.NextFloat(0.25f, 0.6f), Color.DarkRed * 0.5f);
|
||||
Particle spark = new AltSparkParticle(modPlayer.RandomDebuffVisualSpot, randVel + new Vector2(0, -4), true, 12, Main.rand.NextFloat(0.25f, 0.6f), (!ChildSafety.Disabled ? Color.CornflowerBlue : Color.DarkRed) * 0.5f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
if (Main.rand.NextBool(8))
|
||||
{
|
||||
Particle spark = new GlowOrbParticle(modPlayer.RandomDebuffVisualSpot, new Vector2(0, 4) * Main.rand.NextFloat(0.5f, 0.7f), true, 16, Main.rand.NextFloat(0.55f, 0.8f), Color.DarkRed * 0.8f, false, false, false);
|
||||
Particle spark = new GlowOrbParticle(modPlayer.RandomDebuffVisualSpot, new Vector2(0, 4) * Main.rand.NextFloat(0.5f, 0.7f), true, 16, Main.rand.NextFloat(0.55f, 0.8f), (!ChildSafety.Disabled ? Color.CornflowerBlue : Color.DarkRed) * 0.8f, false, false, false);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
}
|
||||
@@ -58,17 +60,17 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
Vector2 randVel = new Vector2(6, 6).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 1f);
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Particle spark = new AltSparkParticle(npcSize, randVel + new Vector2(0, -4), true, 12, Main.rand.NextFloat(0.25f, 0.6f), Color.DarkRed * 0.5f);
|
||||
Particle spark = new AltSparkParticle(npcSize, randVel + new Vector2(0, -4), true, 12, Main.rand.NextFloat(0.25f, 0.6f), (!ChildSafety.Disabled ? Color.CornflowerBlue : Color.DarkRed) * 0.5f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
else
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(npcSize, DustID.Blood, randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.2f, 0.6f));
|
||||
Dust dust = Dust.NewDustPerfect(npcSize, (!ChildSafety.Disabled ? DustID.Cloud : DustID.Blood), randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.2f, 0.6f));
|
||||
dust.noGravity = false;
|
||||
}
|
||||
if (Main.rand.NextBool(8))
|
||||
{
|
||||
Particle spark = new GlowOrbParticle(npcSize, new Vector2(0, 4) * Main.rand.NextFloat(0.5f, 0.7f), true, 16, Main.rand.NextFloat(0.55f, 0.8f), Color.DarkRed * 0.8f, false, false, false);
|
||||
Particle spark = new GlowOrbParticle(npcSize, new Vector2(0, 4) * Main.rand.NextFloat(0.5f, 0.7f), true, 16, Main.rand.NextFloat(0.55f, 0.8f), (!ChildSafety.Disabled ? Color.CornflowerBlue : Color.DarkRed) * 0.8f, false, false, false);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Systems.Collections;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Systems.Collections;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
@@ -17,8 +19,17 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
public static float ViridVanguardPoisonMultiplier => 2;
|
||||
public static void SagePoisonPower(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
// The base DoT is multiplied by the amount of Viral Sprouts you have when applied
|
||||
// See SageNeedle.cs for details
|
||||
int viralCount = 0;
|
||||
int viridCount = 0;
|
||||
foreach (var item in Main.ActiveProjectiles)
|
||||
{
|
||||
if (item.type == ModContent.ProjectileType<SageSpirit>())
|
||||
viralCount++;
|
||||
if (item.type == ModContent.ProjectileType<ViridVanguardBlade>())
|
||||
viridCount++;
|
||||
}
|
||||
if ((viralCount + viridCount) <= 0)
|
||||
return;
|
||||
|
||||
//Reduce power of weakness/resistances but leave sickness debuff boosters at full power
|
||||
//We first need to apply Irradiated as that isn't included in SicknessDebuffMultiplier due to needing to dynamically update if Irradiated is applied
|
||||
@@ -39,15 +50,16 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
multiplier *= NewResistanceEffectiveness;
|
||||
|
||||
//Apply the DOT
|
||||
int baseSagePoisonDoTValue = (int)multiplier.ApplyTo(npc.Calamity().sagePoisonDamage);
|
||||
npc.Calamity().ApplyDPSDebuff(baseSagePoisonDoTValue, baseSagePoisonDoTValue / 5, ref npc.lifeRegen, ref damage);
|
||||
float SagePoisonRegen = (viralCount + ViridVanguardPoisonMultiplier * viridCount) * debuffData.EnemyLostRegen;
|
||||
int totalDoT = (int)multiplier.ApplyTo(SagePoisonRegen);
|
||||
npc.Calamity().ApplyDPSDebuff(totalDoT, totalDoT/(2*(viridCount+viralCount)), ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using System;
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Systems.Collections;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
@@ -9,16 +11,30 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 1000, //Never infliced on enemies, token value. Really high bc this hurts a lot on players
|
||||
HeatDebuffScaling = 1
|
||||
EnemyLostRegen = 40,
|
||||
HeatDebuffScaling = 2,
|
||||
NPCLifeRegenMethod = CragsLavaScaling
|
||||
};
|
||||
|
||||
public static void CragsLavaScaling(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
//Applies the double Heat scaling but completely ignores NPC weakness/resistance to heat.
|
||||
|
||||
//We need to apply slimed as that isn't included in HeatDebuffMultiplier due to needing to dynamically update if slimed is applied
|
||||
StatModifier multiplier = npc.Calamity().HeatDebuffMultiplier;
|
||||
if (npc.drippingSlime || npc.drippingSparkleSlime)
|
||||
multiplier += 1f;
|
||||
|
||||
int dotValue = (int)DebuffData.ApplyScalingToStatModifer(multiplier, debuffData.HeatDebuffScaling).ApplyTo(debuffData.EnemyLostRegen);
|
||||
npc.Calamity().ApplyDPSDebuff(dotValue, (int)Math.Max(dotValue * debuffData.MultiplierDamageTickSize, debuffData.MinimumDamageTickSize), ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using System;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
@@ -18,7 +20,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
// This deals 600 DPS per stack, is boosted by ranged stats and can supercrit.
|
||||
internal static int BaseDamage = 120;
|
||||
internal static int FramesPerDamageTick = 12;
|
||||
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = BaseDamage
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
@@ -100,7 +105,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
int bloodLifetime = Main.rand.Next(22, 36);
|
||||
float bloodScale = Main.rand.NextFloat(0.6f, 0.8f);
|
||||
Color bloodColor = Color.Lerp(Color.Red, Color.DarkRed, Main.rand.NextFloat());
|
||||
bloodColor = Color.Lerp(bloodColor, new Color(51, 22, 94), Main.rand.NextFloat(0.65f));
|
||||
bloodColor = (!ChildSafety.Disabled ? Color.CornflowerBlue : Color.Lerp(bloodColor, new Color(51, 22, 94), Main.rand.NextFloat(0.65f)));
|
||||
|
||||
if (Main.rand.NextBool(20))
|
||||
bloodScale *= 2f;
|
||||
@@ -114,7 +119,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
for (int i = 0; i < exactBloodCount / 3; ++i)
|
||||
{
|
||||
float bloodScale = Main.rand.NextFloat(0.2f, 0.33f);
|
||||
Color bloodColor = Color.Lerp(Color.Red, Color.DarkRed, Main.rand.NextFloat(0.5f, 1f));
|
||||
Color bloodColor = (!ChildSafety.Disabled ? Color.CornflowerBlue : Color.Lerp(Color.Red, Color.DarkRed, Main.rand.NextFloat(0.5f, 1f)));
|
||||
Vector2 bloodVelocity = Main.rand.NextVector2Unit() * velStackMult * Main.rand.NextFloat(1f, 2f);
|
||||
bloodVelocity.Y -= 2.3f;
|
||||
BloodParticle2 blood = new BloodParticle2(npc.Center, bloodVelocity, 20, bloodScale, bloodColor);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -5,6 +5,7 @@ using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Systems.Collections;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
@@ -12,7 +13,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 240,
|
||||
EnemyLostRegen = 350, //175 dps
|
||||
SicknessDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
@@ -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);
|
||||
|
||||
@@ -8,6 +8,7 @@ using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Systems.Collections;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
@@ -15,7 +16,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 3996, //6x the tick size
|
||||
EnemyLostRegen = 2664, //4x the tick size
|
||||
HeatDebuffScaling = 1,
|
||||
MinimumDamageTickSize = 666, //Vhex should always have ticks of 666
|
||||
MultiplierDamageTickSize = 0
|
||||
@@ -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;
|
||||
@@ -41,9 +42,6 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
cgn.trueVulnerabilityHex = true;
|
||||
if (cgn.VulnerabilityHexFireDrawer != null)
|
||||
cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + npc.buffTime[buffIndex];
|
||||
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && cgn.debuffResistanceTimer <= 0)
|
||||
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
||||
|
||||
}
|
||||
|
||||
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
||||
|
||||
@@ -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)
|
||||
@@ -34,8 +35,6 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
npc.Calamity().vaporfied = true;
|
||||
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin +npc.buffTime[buffIndex];
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -5,6 +5,7 @@ using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Systems.Collections;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
@@ -12,7 +13,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData(DebuffData.DebuffBehavior.Electric)
|
||||
{
|
||||
EnemyLostRegen = 100,
|
||||
EnemyLostRegen = 75, //150 dps when moving, 37.5 dps when stationary
|
||||
ElectricDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
@@ -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)
|
||||
|
||||
@@ -5,6 +5,7 @@ using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Systems.Collections;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
@@ -12,7 +13,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 400,
|
||||
EnemyLostRegen = 500, //250 dps is extra strong for its tier due to being difficult to inflict
|
||||
ColdDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
@@ -46,10 +47,6 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
// Set the remaining time of the fire drawer to be exactly right.
|
||||
if (cgn.VulnerabilityHexFireDrawer != null)
|
||||
cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + npc.buffTime[buffIndex];
|
||||
|
||||
// Apply immunity timer.
|
||||
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && cgn.debuffResistanceTimer <= 0)
|
||||
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + +npc.buffTime[buffIndex];
|
||||
}
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
@@ -0,0 +1,17 @@
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Pets
|
||||
{
|
||||
public class StarSwallowerPetBuff : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.vanityPet[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex) => player.BuffHandle_SpawnPetIfNeededAndSetTime(buffIndex, ref player.Calamity().starSwallowerPetFroge, ModContent.ProjectileType<StarSwallowerPet>());
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 662 B |
|
Before Width: | Height: | Size: 575 B After Width: | Height: | Size: 587 B |
|
Before Width: | Height: | Size: 664 B After Width: | Height: | Size: 644 B |
|
Before Width: | Height: | Size: 562 B After Width: | Height: | Size: 551 B |
|
Before Width: | Height: | Size: 535 B After Width: | Height: | Size: 503 B |
|
Before Width: | Height: | Size: 587 B After Width: | Height: | Size: 530 B |
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Potions.Food;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Potions
|
||||
@@ -7,7 +8,7 @@ namespace CalamityMod.Buffs.Potions
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
}
|
||||
@@ -15,6 +16,7 @@ namespace CalamityMod.Buffs.Potions
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().baguette = true;
|
||||
player.lifeRegen -= Baguette.RedWineRegenLoss;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 522 B |