Merge of Xyk's water debuffs
This commit is contained in:
22 files changed
+176
-40
No files matched your search
@@ -0,0 +1,30 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class RiptideDebuff : 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().rTide = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().rTide < npc.buffTime[buffIndex])
|
||||
npc.Calamity().rTide = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -8,7 +8,8 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
{
|
||||
public static int DefenseReduction = 15;
|
||||
public static float MultiplicativeDamageReductionPlayer = 0.33f;
|
||||
public static float MultiplicativeDamageReductionEnemy = 0.85f;
|
||||
//20% dr reduction
|
||||
public static float MultiplicativeDamageReductionEnemy = 0.80f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatDebuffs
|
||||
{
|
||||
public class Crumbling : ModBuff
|
||||
{
|
||||
public static int DefenseReduction = 10;
|
||||
public static float MultiplicativeDamageReductionPlayer = 0.55f;
|
||||
//12% dr reduction
|
||||
public static float MultiplicativeDamageReductionEnemy = 0.88f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().crumble < npc.buffTime[buffIndex])
|
||||
npc.Calamity().crumble = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().crumble = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@@ -791,6 +791,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool dragonFire = false;
|
||||
public bool miracleBlight = false;
|
||||
public bool aCrunch = false;
|
||||
public bool crumble = false;
|
||||
public bool irradiated = false;
|
||||
public bool bFlames = false;
|
||||
public bool weakBrimstoneFlames = false;
|
||||
@@ -807,6 +808,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool DoGExtremeGravity = false;
|
||||
public bool warped = false;
|
||||
public bool cDepth = false;
|
||||
public bool rTide = false;
|
||||
public bool fishAlert = false;
|
||||
public bool clamity = false;
|
||||
public bool NOU = false;
|
||||
@@ -1797,6 +1799,7 @@ namespace CalamityMod.CalPlayer
|
||||
dragonFire = false;
|
||||
miracleBlight = false;
|
||||
aCrunch = false;
|
||||
crumble = false;
|
||||
irradiated = false;
|
||||
bFlames = false;
|
||||
witheredDebuff = false;
|
||||
@@ -1814,6 +1817,7 @@ namespace CalamityMod.CalPlayer
|
||||
DoGExtremeGravity = false;
|
||||
warped = false;
|
||||
cDepth = false;
|
||||
rTide = false;
|
||||
fishAlert = false;
|
||||
clamity = false;
|
||||
NOU = false;
|
||||
@@ -2207,6 +2211,7 @@ namespace CalamityMod.CalPlayer
|
||||
dragonFire = false;
|
||||
miracleBlight = false;
|
||||
aCrunch = false;
|
||||
crumble = false;
|
||||
irradiated = false;
|
||||
bFlames = false;
|
||||
witheredDebuff = false;
|
||||
@@ -2224,6 +2229,7 @@ namespace CalamityMod.CalPlayer
|
||||
DoGExtremeGravity = false;
|
||||
warped = false;
|
||||
cDepth = false;
|
||||
rTide = false;
|
||||
fishAlert = false;
|
||||
clamity = false;
|
||||
NOU = false;
|
||||
|
||||
@@ -482,6 +482,17 @@ namespace CalamityMod.CalPlayer
|
||||
fullBright = true;
|
||||
}
|
||||
}
|
||||
if (calamityPlayer.rTide)
|
||||
{
|
||||
if (Main.rand.NextBool(7) && drawInfo.shadow == 0f)
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 165, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].velocity *= 1.8f;
|
||||
Main.dust[dust].velocity.Y += 0.5f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
}
|
||||
}
|
||||
if (calamityPlayer.bBlood)
|
||||
{
|
||||
if (Main.rand.NextBool(6) && drawInfo.shadow == 0f)
|
||||
|
||||
@@ -373,6 +373,10 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.CrushDepth" + Main.rand.Next(1, 2 + 1)).Format(Player.name));
|
||||
}
|
||||
if (rTide)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.Riptide").Format(Player.name));
|
||||
}
|
||||
if (bFlames || weakBrimstoneFlames)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.BrimstoneFlames").Format(Player.name));
|
||||
@@ -813,6 +817,8 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (aCrunch)
|
||||
contactDamageReduction *= (double)ArmorCrunch.MultiplicativeDamageReductionPlayer;
|
||||
if (crumble)
|
||||
contactDamageReduction *= (double)Crumbling.MultiplicativeDamageReductionPlayer;
|
||||
|
||||
// Contact damage reduction is reduced by DR Damage, which itself is proportional to defense damage
|
||||
int currentDefense = Player.GetCurrentDefense(false);
|
||||
@@ -1086,6 +1092,8 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (aCrunch)
|
||||
projectileDamageReduction *= (double)ArmorCrunch.MultiplicativeDamageReductionPlayer;
|
||||
if (crumble)
|
||||
projectileDamageReduction *= (double)Crumbling.MultiplicativeDamageReductionPlayer;
|
||||
|
||||
// Projectile damage reduction is reduced by DR Damage, which itself is proportional to defense damage
|
||||
int currentDefense = Player.GetCurrentDefense(false);
|
||||
@@ -1138,13 +1146,14 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (crawCarapace)
|
||||
{
|
||||
npc.AddBuff(ModContent.BuffType<ArmorCrunch>(), 720);
|
||||
npc.AddBuff(ModContent.BuffType<Crumbling>(), 720);
|
||||
SoundEngine.PlaySound(SoundID.NPCHit33 with { Volume = 0.5f }, Player.Center);
|
||||
}
|
||||
|
||||
if (baroclaw)
|
||||
{
|
||||
npc.AddBuff(ModContent.BuffType<ArmorCrunch>(), 1800);
|
||||
npc.AddBuff(ModContent.BuffType<CrushDepth>(), 1800);
|
||||
SoundEngine.PlaySound(BaroclawHit, Player.Center);
|
||||
Vector2 bloodSpawnPosition = Player.Center + Main.rand.NextVector2Circular(Player.width, Player.height) * 0.04f;
|
||||
Vector2 splatterDirection = (Player.Center - bloodSpawnPosition).SafeNormalize(Vector2.UnitY);
|
||||
|
||||
@@ -282,21 +282,20 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (cDepth)
|
||||
{
|
||||
if (Player.statDefense > 0)
|
||||
{
|
||||
int depthDamage = depthCharm ? 9 : 18;
|
||||
int subtractDefense = (int)(Player.statDefense * 0.05); // 240 defense = 0 damage taken with depth charm
|
||||
int calcDepthDamage = depthDamage - subtractDefense;
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
if (calcDepthDamage < 0)
|
||||
calcDepthDamage = 0;
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 18;
|
||||
}
|
||||
|
||||
if (rTide)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += calcDepthDamage;
|
||||
}
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 6;
|
||||
}
|
||||
|
||||
if (vodka)
|
||||
|
||||
@@ -306,7 +306,7 @@ namespace CalamityMod.CalPlayer
|
||||
break;
|
||||
|
||||
case ProjectileID.BoneArrow:
|
||||
target.AddBuff(BuffType<ArmorCrunch>(), 300);
|
||||
target.AddBuff(BuffType<Crumbling>(), 300);
|
||||
break;
|
||||
|
||||
case ProjectileID.FrostBlastFriendly:
|
||||
@@ -1017,7 +1017,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (flaskCrumbling)
|
||||
{
|
||||
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<ArmorCrunch>());
|
||||
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<Crumbling>());
|
||||
}
|
||||
if (flaskBrimstone)
|
||||
{
|
||||
@@ -1106,7 +1106,7 @@ namespace CalamityMod.CalPlayer
|
||||
target.AddBuff(BuffID.Poisoned, 120);
|
||||
if (abyssalAmulet)
|
||||
{
|
||||
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<CrushDepth>());
|
||||
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<RiptideDebuff>());
|
||||
}
|
||||
if (alchFlask)
|
||||
{
|
||||
|
||||
@@ -1145,9 +1145,11 @@ namespace CalamityMod
|
||||
BuffType<Irradiated>(),
|
||||
BuffType<Plague>(),
|
||||
BuffType<CrushDepth>(),
|
||||
BuffType<RiptideDebuff>(),
|
||||
BuffType<MarkedforDeath>(),
|
||||
BuffType<AbsorberAffliction>(),
|
||||
BuffType<ArmorCrunch>(),
|
||||
BuffType<Crumbling>(),
|
||||
BuffType<Vaporfied>(),
|
||||
BuffType<Eutrophication>(),
|
||||
BuffType<Dragonfire>(),
|
||||
|
||||
+1
-1
@@ -138,7 +138,7 @@ namespace CalamityMod
|
||||
public static int[] iceEnemyImmunities = new int[3] { BuffID.Frostburn, BuffID.Frostburn2, ModContent.BuffType<GlacialState>() };
|
||||
public static int[] sulphurEnemyImmunities = new int[4] { BuffID.Poisoned, BuffID.Venom, ModContent.BuffType<SulphuricPoisoning>(), ModContent.BuffType<Irradiated>() };
|
||||
public static int[] sunkenSeaEnemyImmunities = new int[2] { ModContent.BuffType<Eutrophication>(), ModContent.BuffType<PearlAura>() };
|
||||
public static int[] abyssEnemyImmunities = new int[1] { ModContent.BuffType<CrushDepth>() };
|
||||
public static int[] abyssEnemyImmunities = new int[2] { ModContent.BuffType<CrushDepth>(), ModContent.BuffType<RiptideDebuff>() };
|
||||
public static int[] cragEnemyImmunities = new int[3] { BuffID.OnFire, BuffID.OnFire3, ModContent.BuffType<BrimstoneFlames>() };
|
||||
public static int[] astralEnemyImmunities = new int[2] { BuffID.Poisoned, ModContent.BuffType<AstralInfectionDebuff>() };
|
||||
public static int[] plagueEnemyImmunities = new int[3] { BuffID.Poisoned, BuffID.Venom, ModContent.BuffType<Plague>() };
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.abyssalAmulet = true;
|
||||
player.buffImmune[ModContent.BuffType<CrushDepth>()] = true;
|
||||
player.buffImmune[ModContent.BuffType<RiptideDebuff>()] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,12 +62,12 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<CrushDepth>(), 180);
|
||||
target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 180);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<CrushDepth>(), 180);
|
||||
target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 180);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -138,6 +138,11 @@ CrushDepth: {
|
||||
Description: Crushed by aquatic pressure
|
||||
}
|
||||
|
||||
RiptideDebuff: {
|
||||
DisplayName: Riptide
|
||||
Description: Lashed at by powerful waters
|
||||
}
|
||||
|
||||
Dragonfire: {
|
||||
DisplayName: Dragonfire
|
||||
Description: Engulfed by roaring flames
|
||||
@@ -859,6 +864,11 @@ ArmorCrunch: {
|
||||
Description: Your armor is shredded
|
||||
}
|
||||
|
||||
Crumbling: {
|
||||
DisplayName: Crumbling
|
||||
Description: Your armor is damaged
|
||||
}
|
||||
|
||||
Clamity: {
|
||||
DisplayName: Clamity
|
||||
Description: The clams have been angered!
|
||||
|
||||
@@ -7,8 +7,8 @@ AbyssalAmulet: {
|
||||
DisplayName: Abyssal Amulet
|
||||
Tooltip:
|
||||
'''
|
||||
Attacks inflict the Crush Depth debuff
|
||||
Grants immunity to the Crush Depth debuff
|
||||
Attacks inflict the Riptide debuff
|
||||
Grants immunity to the Riptide debuff
|
||||
While in the abyss you gain 10% increased max life
|
||||
'''
|
||||
}
|
||||
@@ -422,7 +422,7 @@ CrawCarapace: {
|
||||
Tooltip:
|
||||
'''
|
||||
5% increased damage
|
||||
Enemies that hit you take damage and are inflicted with Armor Crunch
|
||||
Enemies that hit you take damage and are inflicted with Crumbling
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -431,7 +431,7 @@ Baroclaw: {
|
||||
Tooltip:
|
||||
'''
|
||||
10% increased damage
|
||||
Enemies that hit you take high damage and are inflicted with Armor Crunch for a long time
|
||||
Enemies that hit you take high damage and are inflicted with Armor Crunch and Crush Depth for a long time
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1381,7 +1381,7 @@ RottenBrain: {
|
||||
|
||||
RottenDogtooth: {
|
||||
DisplayName: Rotten Dogtooth
|
||||
Tooltip: Makes Stealth strikes inflict Armor Crunch and deal 8% more damage
|
||||
Tooltip: Makes Stealth strikes inflict Crumbling and deal 8% more damage
|
||||
}
|
||||
|
||||
RoverDrive: {
|
||||
|
||||
@@ -72,7 +72,7 @@ FlaskOfBrimstone: {
|
||||
|
||||
FlaskOfCrumbling: {
|
||||
DisplayName: Flask of Crumbling
|
||||
Tooltip: Melee, Whip, and Rogue attacks inflict Armor Crunch on enemies
|
||||
Tooltip: Melee, Whip, and Rogue attacks inflict Crumbling on enemies
|
||||
}
|
||||
|
||||
FlaskOfHolyFlames: {
|
||||
|
||||
@@ -318,8 +318,7 @@ DepthCrusher: {
|
||||
DisplayName: Depth Crusher
|
||||
Tooltip:
|
||||
'''
|
||||
Hitting enemies will inflict the crush depth debuff
|
||||
The lower the enemies' defense, the more damage they take from this debuff
|
||||
Hitting enemies will inflict the Riptide debuff
|
||||
Press <right> to use without hammering down walls
|
||||
'''
|
||||
}
|
||||
@@ -792,7 +791,6 @@ NeptunesBounty: {
|
||||
'''
|
||||
Fires a trident that rains additional tridents as it travels
|
||||
Hitting enemies will inflict the crush depth debuff
|
||||
The lower the enemies' defense, the more damage they take from this debuff
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
AbyssDrown1: "{0} is food for the Wyrms."
|
||||
AbyssDrown2: Oxygen failed to reach {0} from the depths of the Abyss.
|
||||
AbyssDrown2: "Oxygen failed to reach {0} from the depths of the Abyss."
|
||||
AlcoholBig1: "{0} downed too many shots."
|
||||
AlcoholBig2: "{0}'s liver failed."
|
||||
AlcoholSmall: "{0} succumbed to alcohol sickness."
|
||||
@@ -17,6 +17,8 @@ CirrusSlap: "{0} was slapped too hard."
|
||||
CorpusAvertor: "{0} became the blood god's sacrifice."
|
||||
CrushDepth1: "{0} was crushed by the pressure."
|
||||
CrushDepth2: "{0}'s lungs collapsed."
|
||||
Riptide1: "{0} was swept away by the tides."
|
||||
Riptide2: "{0} was ripped apart by the current."
|
||||
Dragonfire: "{0}'s ashes scatter in the wind."
|
||||
GodSlayerInferno: "{0}'s soul was extinguished."
|
||||
Goldfish: "{0} was once again impaled by Goldfish."
|
||||
|
||||
@@ -223,6 +223,7 @@ namespace CalamityMod.NPCs
|
||||
public int hFlames = 0;
|
||||
public int pFlames = 0;
|
||||
public int aCrunch = 0;
|
||||
public int crumble = 0;
|
||||
|
||||
// Soma Prime Shred deals damage with DirectStrikes instead of with direct debuff damage
|
||||
// It also stacks, scales with ranged damage, and can crit, meaning it needs to know who applied it most recently
|
||||
@@ -232,6 +233,7 @@ namespace CalamityMod.NPCs
|
||||
public int somaShredFalloff = Shred.StackFalloffFrames;
|
||||
|
||||
public int cDepth = 0;
|
||||
public int rTide = 0;
|
||||
public int gsInferno = 0;
|
||||
public int dragonFire = 0;
|
||||
public int miracleBlight = 0;
|
||||
@@ -431,12 +433,14 @@ namespace CalamityMod.NPCs
|
||||
myClone.hFlames = hFlames;
|
||||
myClone.pFlames = pFlames;
|
||||
myClone.aCrunch = aCrunch;
|
||||
myClone.crumble = crumble;
|
||||
|
||||
myClone.somaShredStacks = somaShredStacks;
|
||||
myClone.somaShredApplicator = somaShredApplicator;
|
||||
myClone.somaShredFalloff = somaShredFalloff;
|
||||
|
||||
myClone.cDepth = cDepth;
|
||||
myClone.rTide = rTide;
|
||||
myClone.gsInferno = gsInferno;
|
||||
myClone.miracleBlight = miracleBlight;
|
||||
myClone.dragonFire = dragonFire;
|
||||
@@ -1011,7 +1015,7 @@ namespace CalamityMod.NPCs
|
||||
if (absorberAffliction > 0)
|
||||
{
|
||||
int baseAbsorberDoTValue = (int)(260 * sicknessDamageMult);
|
||||
ApplyDPSDebuff(baseAbsorberDoTValue, baseAbsorberDoTValue / 10, ref npc.lifeRegen, ref damage);
|
||||
ApplyDPSDebuff(baseAbsorberDoTValue, baseAbsorberDoTValue / 65, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
|
||||
// Poisoned
|
||||
@@ -1042,9 +1046,15 @@ namespace CalamityMod.NPCs
|
||||
// Crush Depth
|
||||
if (cDepth > 0)
|
||||
{
|
||||
int baseCrushDepthDoTValue = (int)(((Main.hardMode ? 36 : 12) - npc.defense) * 5 * waterDamageMult);
|
||||
if (baseCrushDepthDoTValue > 0)
|
||||
ApplyDPSDebuff(baseCrushDepthDoTValue, baseCrushDepthDoTValue / 5, ref npc.lifeRegen, ref damage);
|
||||
int baseCrushDepthDoTValue = (int)(100 * waterDamageMult);
|
||||
ApplyDPSDebuff(baseCrushDepthDoTValue, baseCrushDepthDoTValue / 2, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
|
||||
//Riptide
|
||||
if (rTide > 0)
|
||||
{
|
||||
int baseRiptideDoTValue = (int)(40 * waterDamageMult);
|
||||
ApplyDPSDebuff(baseRiptideDoTValue, baseRiptideDoTValue / 3, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
|
||||
// Debuffs that aren't affected by weaknesses or resistances.
|
||||
@@ -2687,6 +2697,9 @@ namespace CalamityMod.NPCs
|
||||
calcDR *= KamiFlu.MultiplicativeDamageReduction;
|
||||
if (npc.Calamity().aCrunch > 0)
|
||||
calcDR *= ArmorCrunch.MultiplicativeDamageReductionEnemy;
|
||||
if (npc.Calamity().crumble > 0)
|
||||
calcDR *= Crumbling.MultiplicativeDamageReductionEnemy;
|
||||
|
||||
|
||||
return calcDR;
|
||||
}
|
||||
@@ -4220,8 +4233,12 @@ namespace CalamityMod.NPCs
|
||||
// Soma Prime's Shred stacks have a unique falloff mechanic in the debuff's own file.
|
||||
if (aCrunch > 0)
|
||||
aCrunch--;
|
||||
if (crumble > 0)
|
||||
crumble--;
|
||||
if (cDepth > 0)
|
||||
cDepth--;
|
||||
if (rTide > 0)
|
||||
rTide--;
|
||||
if (gsInferno > 0)
|
||||
gsInferno--;
|
||||
if (dragonFire > 0)
|
||||
@@ -5538,6 +5555,17 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
|
||||
if (rTide > 0)
|
||||
{
|
||||
if (Main.rand.Next(7) < 3)
|
||||
{
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, 165, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1f);
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].velocity *= 1.8f;
|
||||
Main.dust[dust].velocity.Y += 0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
if (sulphurPoison > 0)
|
||||
{
|
||||
if (Main.rand.Next(5) < 4)
|
||||
@@ -5681,6 +5709,8 @@ namespace CalamityMod.NPCs
|
||||
buffTextureList.Add(Request<Texture2D>("CalamityMod/Buffs/DamageOverTime/BurningBlood").Value);
|
||||
if (cDepth > 0)
|
||||
buffTextureList.Add(Request<Texture2D>("CalamityMod/Buffs/DamageOverTime/CrushDepth").Value);
|
||||
if (rTide > 0)
|
||||
buffTextureList.Add(Request<Texture2D>("CalamityMod/Buffs/DamageOverTime/RiptideDebuff").Value);
|
||||
if (dragonFire > 0)
|
||||
buffTextureList.Add(Request<Texture2D>("CalamityMod/Buffs/DamageOverTime/Dragonfire").Value);
|
||||
if (miracleBlight > 0)
|
||||
@@ -5711,6 +5741,8 @@ namespace CalamityMod.NPCs
|
||||
// Stat debuffs
|
||||
if (aCrunch > 0)
|
||||
buffTextureList.Add(Request<Texture2D>("CalamityMod/Buffs/StatDebuffs/ArmorCrunch").Value);
|
||||
if (crumble > 0)
|
||||
buffTextureList.Add(Request<Texture2D>("CalamityMod/Buffs/StatDebuffs/Crumbling").Value);
|
||||
if (enraged > 0)
|
||||
buffTextureList.Add(Request<Texture2D>("CalamityMod/Buffs/StatDebuffs/Enraged").Value);
|
||||
if (eutrophication > 0)
|
||||
|
||||
@@ -2584,7 +2584,7 @@ namespace CalamityMod.Projectiles
|
||||
modifiers.SetCrit();
|
||||
|
||||
if (modPlayer.rottenDogTooth && projectile.Calamity().stealthStrike)
|
||||
target.AddBuff(BuffType<ArmorCrunch>(), RottenDogtooth.ArmorCrunchDebuffTime);
|
||||
target.AddBuff(BuffType<Crumbling>(), RottenDogtooth.ArmorCrunchDebuffTime);
|
||||
|
||||
if (modPlayer.flamingItemEnchant && !projectile.minion && !projectile.npcProj && !projectile.Calamity().CreatedByPlayerDash)
|
||||
target.AddBuff(BuffType<VulnerabilityHex>(), VulnerabilityHex.AflameDuration);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
int debuffTime = 90;
|
||||
target.AddBuff(BuffType<ArmorCrunch>(), debuffTime);
|
||||
target.AddBuff(BuffType<Crumbling>(), debuffTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user