Added Crumbling
Added Crumbling, reduces enemy dr by 12%, reduces player defense by 10 and multiplies player dr by 0.55 Crumbling replaced Armor crunch on: Craw Carapace, Broken Biome Blade Purity, Rotten Dogtooth, Crumbling Potion, Bone Arrow Buffed Armor crunch dr reduction on enemies to 20%
This commit is contained in:
1 parent
233cad6042
commit
7c8310fca2
11 files changed
+69
-10
No files matched your search
@@ -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 |
@@ -807,6 +807,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;
|
||||
@@ -1813,6 +1814,7 @@ namespace CalamityMod.CalPlayer
|
||||
dragonFire = false;
|
||||
miracleBlight = false;
|
||||
aCrunch = false;
|
||||
crumble = false;
|
||||
irradiated = false;
|
||||
bFlames = false;
|
||||
witheredDebuff = false;
|
||||
@@ -2223,6 +2225,7 @@ namespace CalamityMod.CalPlayer
|
||||
dragonFire = false;
|
||||
miracleBlight = false;
|
||||
aCrunch = false;
|
||||
crumble = false;
|
||||
irradiated = false;
|
||||
bFlames = false;
|
||||
witheredDebuff = false;
|
||||
@@ -4689,6 +4692,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);
|
||||
@@ -4962,6 +4967,8 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (aCrunch)
|
||||
projectileDamageReduction *= (double)ArmorCrunch.MultiplicativeDamageReductionPlayer;
|
||||
if (crumble)
|
||||
contactDamageReduction *= (double)Crumbling.MultiplicativeDamageReductionPlayer;
|
||||
|
||||
// Projectile damage reduction is reduced by DR Damage, which itself is proportional to defense damage
|
||||
int currentDefense = Player.GetCurrentDefense(false);
|
||||
@@ -5014,7 +5021,7 @@ 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -1148,6 +1148,7 @@ namespace CalamityMod
|
||||
BuffType<MarkedforDeath>(),
|
||||
BuffType<AbsorberAffliction>(),
|
||||
BuffType<ArmorCrunch>(),
|
||||
BuffType<Crumbling>(),
|
||||
BuffType<Vaporfied>(),
|
||||
BuffType<Eutrophication>(),
|
||||
BuffType<Dragonfire>(),
|
||||
|
||||
@@ -859,6 +859,11 @@ ArmorCrunch: {
|
||||
Description: Your armor is shredded
|
||||
}
|
||||
|
||||
Crumbling: {
|
||||
DisplayName: Crumbling
|
||||
Description: Your armor is damaged
|
||||
}
|
||||
|
||||
Clamity: {
|
||||
DisplayName: Clamity
|
||||
Description: The clams have been angered!
|
||||
|
||||
@@ -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
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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
|
||||
@@ -431,6 +432,7 @@ namespace CalamityMod.NPCs
|
||||
myClone.hFlames = hFlames;
|
||||
myClone.pFlames = pFlames;
|
||||
myClone.aCrunch = aCrunch;
|
||||
myClone.crumble = crumble;
|
||||
|
||||
myClone.somaShredStacks = somaShredStacks;
|
||||
myClone.somaShredApplicator = somaShredApplicator;
|
||||
@@ -2687,6 +2689,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,6 +4225,8 @@ 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 (gsInferno > 0)
|
||||
@@ -5711,6 +5718,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)
|
||||
|
||||
@@ -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