Electric debuff distribution
Transformer now makes you resist all electric debuffs and emits more sparks when you're hit DSS no longer reduces damage from electrified
This commit is contained in:
1 parent
b269525897
commit
129447f7fe
38 files changed
+149
-102
No files matched your search
File renamed without changes.
@@ -784,13 +784,6 @@ namespace CalamityMod.CalPlayer
|
||||
// The amount of damage that will be dealt is yet to be determined.
|
||||
//
|
||||
|
||||
if (transformer)
|
||||
{
|
||||
if (npc.type == NPCID.BlueJellyfish || npc.type == NPCID.PinkJellyfish || npc.type == NPCID.GreenJellyfish || npc.type == NPCID.FungoFish ||
|
||||
npc.type == NPCID.BloodJelly || npc.type == ModContent.NPCType<Stormlion>() || npc.type == ModContent.NPCType<GhostBell>() || npc.type == ModContent.NPCType<BoxJellyfish>())
|
||||
contactDamageReduction += 0.5;
|
||||
}
|
||||
|
||||
// Can't have any cooldowns here because dodges grrrrr....
|
||||
if (fleshTotem && !Player.HasCooldown(Cooldowns.FleshTotem.ID) && TotalEnergyShielding <= 0)
|
||||
contactDamageReduction += 0.5;
|
||||
@@ -1044,8 +1037,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (transformer)
|
||||
{
|
||||
if (proj.type == ProjectileID.MartianTurretBolt || proj.type == ProjectileID.GigaZapperSpear || proj.type == ProjectileID.CultistBossLightningOrbArc || proj.type == ProjectileID.VortexLightning || proj.type == ModContent.ProjectileType<DestroyerElectricLaser>() ||
|
||||
proj.type == ProjectileID.BulletSnowman || proj.type == ProjectileID.BulletDeadeye || proj.type == ProjectileID.SniperBullet || proj.type == ProjectileID.VortexLaser)
|
||||
if (proj.type == ProjectileID.BulletSnowman || proj.type == ProjectileID.BulletDeadeye || proj.type == ProjectileID.SniperBullet)
|
||||
projectileDamageReduction += 0.5;
|
||||
}
|
||||
|
||||
@@ -2483,7 +2475,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
for (int i = 0; i < (transformer ? 5 : 4); i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
int spark1 = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<Spark>(), sDamage, 1.25f, Player.whoAmI, 0f, 0f);
|
||||
@@ -2492,11 +2484,23 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Main.projectile[spark1].timeLeft = 120;
|
||||
Main.projectile[spark1].DamageType = DamageClass.Generic;
|
||||
if (transformer)
|
||||
{
|
||||
Main.projectile[spark1].timeLeft = 240;
|
||||
Main.projectile[spark1].extraUpdates = 1;
|
||||
Main.projectile[spark1].penetrate = 10;
|
||||
}
|
||||
}
|
||||
if (spark2.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[spark2].timeLeft = 120;
|
||||
Main.projectile[spark2].DamageType = DamageClass.Generic;
|
||||
if (transformer)
|
||||
{
|
||||
Main.projectile[spark2].timeLeft = 240;
|
||||
Main.projectile[spark2].extraUpdates = 1;
|
||||
Main.projectile[spark2].penetrate = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -693,7 +693,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (tile.TileType == auricOreID)
|
||||
{
|
||||
Player.Hurt(PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.AuricRejection").Format(Player.name)), auricRejectionDamage, 0);
|
||||
Player.AddBuff(BuffID.Electrified, 300);
|
||||
Player.AddBuff(ModContent.BuffType<AuricRebuke>(), 120);
|
||||
}
|
||||
SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Custom/ExoMechs/TeslaShoot1"));
|
||||
}
|
||||
@@ -970,9 +970,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
holyInfernoFadeIntensity = MathHelper.Clamp(holyInfernoFadeIntensity - 0.01f, 0f, 1f);
|
||||
}
|
||||
// Transformer immunity to Electrified
|
||||
if (transformer)
|
||||
Player.buffImmune[BuffID.Electrified] = true;
|
||||
|
||||
// Reduce breath meter while in icy water instead of chilling
|
||||
bool canBreath = (aquaticHeart && NPC.downedBoss3) || Player.gills || Player.merman;
|
||||
@@ -3385,34 +3382,9 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
// Reduce the buffTime of Electrified.
|
||||
bool reduceElectrifiedDuration = false;
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
if (Player.buffType[l] == ModContent.BuffType<TeslaBuff>())
|
||||
{
|
||||
if (Player.buffTime[l] >= 5)
|
||||
reduceElectrifiedDuration = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (reduceElectrifiedDuration)
|
||||
{
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
if (Player.buffType[l] == BuffID.Electrified)
|
||||
{
|
||||
if (Player.buffTime[l] > 2)
|
||||
{
|
||||
Player.buffTime[l]--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool check = true;
|
||||
// Summon the aura (this check is here to prevent out of bounds errors).
|
||||
if (reduceElectrifiedDuration)
|
||||
if (check)
|
||||
{
|
||||
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
|
||||
var source = Player.GetSource_Buff(Player.FindBuffIndex(ModContent.BuffType<TeslaBuff>()));
|
||||
|
||||
@@ -130,6 +130,10 @@ namespace CalamityMod.CalPlayer
|
||||
target.AddBuff(BuffType<WhisperingDeath>(), 120);
|
||||
break;
|
||||
|
||||
case ItemID.InfluxWaver:
|
||||
target.AddBuff(BuffID.Electrified, 300);
|
||||
break;
|
||||
|
||||
case ItemID.BeeKeeper:
|
||||
case ItemID.BladeofGrass:
|
||||
target.AddBuff(BuffID.Poisoned, 240);
|
||||
@@ -262,6 +266,18 @@ namespace CalamityMod.CalPlayer
|
||||
target.AddBuff(BuffID.OnFire3, 180);
|
||||
break;
|
||||
|
||||
case ProjectileID.InfluxWaver:
|
||||
case ProjectileID.UFOLaser:
|
||||
case ProjectileID.Electrosphere:
|
||||
target.AddBuff(BuffID.Electrified, 180);
|
||||
break;
|
||||
|
||||
case ProjectileID.ThunderSpear:
|
||||
case ProjectileID.ThunderSpearShot:
|
||||
case ProjectileID.ThunderStaffShot:
|
||||
target.AddBuff(BuffType<StaticDischarge>(), 90);
|
||||
break;
|
||||
|
||||
case ProjectileID.GolemFist:
|
||||
target.AddBuff(BuffType<ArmorCrunch>(), 180);
|
||||
break;
|
||||
@@ -1249,7 +1265,7 @@ namespace CalamityMod.CalPlayer
|
||||
//20% chance for Voltaic Jelly
|
||||
if (Main.rand.NextBool(starTaintedGenerator ? 1 : 5))
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 60);
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 60);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ namespace CalamityMod.Items.Accessories
|
||||
player.Calamity().MiniSwarmers = true;
|
||||
player.GetDamage<RangedDamageClass>() += 0.1f;
|
||||
player.moveSpeed += 0.1f;
|
||||
player.Calamity().eleResist = true;
|
||||
}
|
||||
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.nucleogenesis = true;
|
||||
modPlayer.shadowMinions = true; //shadowflame
|
||||
modPlayer.holyMinions = true; //holy flames
|
||||
modPlayer.voltaicJelly = true; //electrified
|
||||
modPlayer.voltaicJelly = true; //static discharge
|
||||
modPlayer.starTaintedGenerator = true; //astral infection and irradiated
|
||||
player.GetKnockback<SummonDamageClass>() += 3f;
|
||||
player.GetDamage<SummonDamageClass>() += 0.15f;
|
||||
|
||||
@@ -32,6 +32,7 @@ namespace CalamityMod.Items.Accessories
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.transformer = true;
|
||||
modPlayer.aSpark = true;
|
||||
player.Calamity().eleResist = true;
|
||||
}
|
||||
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
|
||||
@@ -601,7 +601,7 @@ DynamoStemCells: {
|
||||
'''
|
||||
10% increased ranged damage and movement speed
|
||||
Ranged weapons fire a powerful mini swarmer every 3 seconds
|
||||
Reduces the damage of the Dragonfire and Electrified debuff
|
||||
Reduces the damage you take from the Dragonfire debuff
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -984,7 +984,7 @@ JellyChargedBattery: {
|
||||
Tooltip:
|
||||
'''
|
||||
+1 max minions and 7% summon damage
|
||||
Minion attacks spawn orbs of energy and inflict Electrified
|
||||
Minion attacks spawn orbs of energy and inflict Static Discharge
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1873,7 +1873,7 @@ TheTransformer: {
|
||||
'''
|
||||
Multiplies all electricity-based debuff damage by 1.5
|
||||
Taking damage releases a blast of sparks
|
||||
Immunity to Electrified and you resist all electrical projectile and enemy damage
|
||||
Reduces the damage you take from all electric debuffs
|
||||
Enemy bullets do half damage to you and are reflected back at the enemy for 800% their original damage
|
||||
'''
|
||||
}
|
||||
@@ -1955,7 +1955,7 @@ VoltaicJelly: {
|
||||
Tooltip:
|
||||
'''
|
||||
+1 max minions
|
||||
Minion attacks inflict Electrified
|
||||
Minion attacks inflict Static Discharge
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,6 @@ TeslaPotion: {
|
||||
'''
|
||||
Summons an aura of electricity that electrifies and slows enemies
|
||||
Aura damage is reduced on bosses
|
||||
Reduces the duration of the Electrified debuff
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Armor.Vanity;
|
||||
@@ -456,7 +457,11 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
// Lore
|
||||
npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedDragonfolly, ModContent.ItemType<LoreDragonfolly>(), desc: DropHelper.FirstKillText);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(ModContent.BuffType<VermillionFlux>(), 120, true);
|
||||
}
|
||||
public override void OnKill()
|
||||
{
|
||||
CalamityGlobalNPC.SetNewBossJustDowned(NPC);
|
||||
|
||||
@@ -972,14 +972,14 @@ namespace CalamityMod.NPCs
|
||||
// Vermillion Flux
|
||||
if (vermillionFlux > 0)
|
||||
{
|
||||
int baseVermillionFluxDoTValue = (int)(75 * (npc.velocity.X == 0 ? 1 : 4) * electricityDamageMult); // 300 on moving targets
|
||||
int baseVermillionFluxDoTValue = (int)(100 * (npc.velocity.X == 0 ? 1 : 4) * electricityDamageMult); // 400 on moving targets
|
||||
ApplyDPSDebuff(baseVermillionFluxDoTValue, baseVermillionFluxDoTValue / 40, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
|
||||
// Auric Rebuke
|
||||
if (auricRebuke > 0)
|
||||
{
|
||||
int baseAuricRebukeDoTValue = (int)(175 * (npc.velocity.X == 0 ? 1 : 4) * electricityDamageMult); // 700 on moving targets
|
||||
int baseAuricRebukeDoTValue = (int)(200 * (npc.velocity.X == 0 ? 1 : 4) * electricityDamageMult); // 800 on moving targets
|
||||
ApplyDPSDebuff(baseAuricRebukeDoTValue, baseAuricRebukeDoTValue / 70, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
|
||||
@@ -1114,8 +1114,8 @@ namespace CalamityMod.NPCs
|
||||
// Electrified
|
||||
if (electrified > 0)
|
||||
{
|
||||
int baseElectrifiedDoTValue = (int)(5 * (npc.velocity.X == 0 ? 1 : 4) * electricityDamageMult);
|
||||
ApplyDPSDebuff(baseElectrifiedDoTValue, baseElectrifiedDoTValue / 5, ref npc.lifeRegen, ref damage);
|
||||
int baseElectrifiedDoTValue = (int)(21 * (npc.velocity.X == 0 ? 1 : 4) * electricityDamageMult); // 84 on moving targets
|
||||
ApplyDPSDebuff(baseElectrifiedDoTValue, baseElectrifiedDoTValue / 22, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
|
||||
// Crush Depth
|
||||
@@ -5268,7 +5268,7 @@ namespace CalamityMod.NPCs
|
||||
if (tile.TileType == auricOreID)
|
||||
{
|
||||
npc.SimpleStrikeNPC((int)(npc.lifeMax * 0.2f), 0);
|
||||
npc.AddBuff(BuffID.Electrified, 300);
|
||||
npc.AddBuff(ModContent.BuffType<AuricRebuke>(), 120);
|
||||
}
|
||||
SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Custom/ExoMechs/TeslaShoot1"), npc.Center);
|
||||
break;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Banners;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using Terraria;
|
||||
@@ -109,7 +110,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Electrified, 30, true);
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 90, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Banners;
|
||||
@@ -464,7 +465,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Electrified, 180, true);
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 180, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.IO;
|
||||
using CalamityMod.BiomeManagers;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Placeables.Banners;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -174,7 +175,7 @@ namespace CalamityMod.NPCs.SunkenSea
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Electrified, 120, true);
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 120, true);
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
@@ -59,7 +60,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (info.Damage <= 0)
|
||||
return;
|
||||
|
||||
target.AddBuff(BuffID.Electrified, 60);
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 90);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -174,7 +175,7 @@ IL_25092:
|
||||
if (info.Damage <= 0)
|
||||
return;
|
||||
|
||||
target.AddBuff(BuffID.Electrified, 120);
|
||||
target.AddBuff(ModContent.BuffType<VermillionFlux>(), 90);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -128,7 +129,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (info.Damage <= 0 || Projectile.Opacity != 1f)
|
||||
return;
|
||||
|
||||
target.AddBuff(BuffID.Electrified, 60);
|
||||
target.AddBuff(ModContent.BuffType<VermillionFlux>(), 40);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -118,7 +119,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 120);
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 180);
|
||||
|
||||
if (AIState == TaserAIState.Firing)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -91,7 +92,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
dust.velocity *= 2.1f;
|
||||
dust.noGravity = true;
|
||||
}
|
||||
Target.AddBuff(BuffID.Electrified, 180);
|
||||
Target.AddBuff(ModContent.BuffType<StaticDischarge>(), 180);
|
||||
Projectile.Kill();
|
||||
}
|
||||
Time++;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -157,7 +158,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 120);
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 120);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
@@ -58,7 +59,11 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Projectile.velocity *= 0.25f;
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
Projectile.velocity *= 0.25f;
|
||||
target.AddBuff(ModContent.BuffType<VermillionFlux>(), 120);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
@@ -58,7 +59,11 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Projectile.velocity *= 0.25f;
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
Projectile.velocity *= 0.25f;
|
||||
target.AddBuff(ModContent.BuffType<VermillionFlux>(), 120);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
@@ -58,7 +59,11 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Projectile.velocity *= 0.25f;
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
Projectile.velocity *= 0.25f;
|
||||
target.AddBuff(ModContent.BuffType<VermillionFlux>(), 120);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
@@ -171,7 +172,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 180);
|
||||
target.AddBuff(ModContent.BuffType<AuricRebuke>(), 180);
|
||||
if (hit.Damage > 1 && Projectile.ai[2] == 3)
|
||||
Projectile.Kill();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -21,6 +22,10 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.localNPCHitCooldown = 15;
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
}
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 120);
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@ using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
|
||||
namespace CalamityMod.Projectiles.Melee.Spears
|
||||
{
|
||||
@@ -42,6 +43,8 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<VermillionFlux>(), 240);
|
||||
|
||||
int heal = (int)Math.Round(hit.Damage * 0.01);
|
||||
if (heal > BalancingConstants.LifeStealCap)
|
||||
heal = BalancingConstants.LifeStealCap;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -75,7 +76,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 300);
|
||||
target.AddBuff(ModContent.BuffType<AuricRebuke>(), 240);
|
||||
SoundEngine.PlaySound(HitSound with { PitchVariance = 0.15f }, Projectile.Center);
|
||||
GenericSparkle sparker = new GenericSparkle(Projectile.Center, Vector2.Zero, Color.Gold, Color.Cyan, Main.rand.NextFloat(1.8f, 2.5f), 5, Main.rand.NextFloat(-0.01f, 0.01f), 1.68f);
|
||||
GeneralParticleHandler.SpawnParticle(sparker);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -23,7 +25,10 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.DamageType = DamageClass.Ranged;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.penetrate = 4;
|
||||
Projectile.extraUpdates = 2;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
Projectile.timeLeft = 600;
|
||||
}
|
||||
|
||||
@@ -58,7 +63,10 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
return new Color(255, 255, 255, 100);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 90);
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
@@ -35,6 +36,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<VermillionFlux>(), 90);
|
||||
SoundEngine.PlaySound(SoundID.NPCHit51, Projectile.Center);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -88,12 +89,12 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 180);
|
||||
target.AddBuff(ModContent.BuffType<VermillionFlux>(), 90);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 180);
|
||||
target.AddBuff(ModContent.BuffType<VermillionFlux>(), 90);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -42,9 +43,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, 250f, 12f, 20f);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Electrified, 120);
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<StaticDischarge>(), 120);
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.Electrified, 120);
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<StaticDischarge>(), 120);
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.NPCs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -91,7 +92,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 180);
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 60);
|
||||
target.AddBuff(ModContent.BuffType<GalvanicCorrosion>(), 60);
|
||||
|
||||
if (target.knockBackResist <= 0f)
|
||||
@@ -109,7 +110,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 180);
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 60);
|
||||
target.AddBuff(ModContent.BuffType<GalvanicCorrosion>(), 60);
|
||||
}
|
||||
|
||||
|
||||
@@ -166,14 +166,14 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item93, Projectile.position);
|
||||
target.AddBuff(BuffID.Electrified, 150);
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 150);
|
||||
Sparks();
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item93, Projectile.position);
|
||||
target.AddBuff(BuffID.Electrified, 150);
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 150);
|
||||
Sparks();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
@@ -62,7 +63,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 45);
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 45);
|
||||
if (Main.rand.NextBool(10))
|
||||
{
|
||||
int d = Dust.NewDust(Projectile.Center, Projectile.width, Projectile.height, DustID.Electric, 0f, 0f, 100, new Color(Main.rand.Next(20, 100), 204, 250), 1f);
|
||||
@@ -94,7 +95,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 45);
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 45);
|
||||
if (Main.rand.NextBool(10))
|
||||
{
|
||||
int d = Dust.NewDust(Projectile.Center, Projectile.width, Projectile.height, DustID.Electric, 0f, 0f, 100, new Color(Main.rand.Next(20, 100), 204, 250), 1f);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -36,6 +37,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.velocity = (Projectile.velocity * 20f + Projectile.SafeDirectionTo(potentialTarget.Center) * 10f) / 21f;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Electrified, 120);
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<StaticDischarge>(), 90);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.AcidRain;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -66,7 +67,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 180);
|
||||
target.AddBuff(ModContent.BuffType<VermillionFlux>(), 180);
|
||||
|
||||
if (target.knockBackResist <= 0f)
|
||||
return;
|
||||
@@ -81,7 +82,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.Electrified, 180);
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<VermillionFlux>(), 180);
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Buffs.Potions;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.Potions;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.AcidRain;
|
||||
@@ -69,7 +70,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 180);
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 90);
|
||||
target.AddBuff(ModContent.BuffType<GalvanicCorrosion>(), 6);
|
||||
|
||||
if (target.knockBackResist <= 0f)
|
||||
@@ -87,7 +88,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 180);
|
||||
target.AddBuff(ModContent.BuffType<StaticDischarge>(), 90);
|
||||
target.AddBuff(ModContent.BuffType<GalvanicCorrosion>(), 6);
|
||||
}
|
||||
|
||||
|
||||
@@ -242,9 +242,9 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<CeaselessVoid>(), immuneToEverything },
|
||||
{ ModContent.NPCType<DarkEnergy>(), immuneToEverything },
|
||||
|
||||
{ ModContent.NPCType<StormWeaverHead>(), new(GeneralImmunityStatus.None, new int[] { BuffID.Electrified }) },
|
||||
{ ModContent.NPCType<StormWeaverBody>(), new(GeneralImmunityStatus.None, new int[] { BuffID.Electrified }) },
|
||||
{ ModContent.NPCType<StormWeaverTail>(), new(GeneralImmunityStatus.None, new int[] { BuffID.Electrified }) },
|
||||
{ ModContent.NPCType<StormWeaverHead>(), new(GeneralImmunityStatus.None, new int[] { BuffID.Electrified, ModContent.BuffType<StaticDischarge>() }) },
|
||||
{ ModContent.NPCType<StormWeaverBody>(), new(GeneralImmunityStatus.None, new int[] { BuffID.Electrified, ModContent.BuffType<StaticDischarge>() }) },
|
||||
{ ModContent.NPCType<StormWeaverTail>(), new(GeneralImmunityStatus.None, new int[] { BuffID.Electrified, ModContent.BuffType<StaticDischarge>() }) },
|
||||
|
||||
{ ModContent.NPCType<Signus>(), new(GeneralImmunityStatus.None, new int[] { ModContent.BuffType<WhisperingDeath>() }) },
|
||||
{ ModContent.NPCType<CosmicLantern>(), immuneToEverything },
|
||||
@@ -402,7 +402,7 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<SeaUrchin>(), new(GeneralImmunityStatus.None, new int[] { BuffID.Poisoned, BuffID.Venom }) },
|
||||
{ ModContent.NPCType<Frogfish>(), new(GeneralImmunityStatus.None, new int[] { BuffID.Poisoned, BuffID.Venom }) },
|
||||
|
||||
{ ModContent.NPCType<ThiccWaifu>(), new(GeneralImmunityStatus.None, new int[] { BuffID.Electrified }) },
|
||||
{ ModContent.NPCType<ThiccWaifu>(), new(GeneralImmunityStatus.None, new int[] { BuffID.Electrified, ModContent.BuffType<StaticDischarge>() }) },
|
||||
|
||||
{ ModContent.NPCType<CrimulanBlightSlime>(), slime },
|
||||
{ ModContent.NPCType<EbonianBlightSlime>(), slime },
|
||||
|
||||
Reference in new issue
Block a user