diff --git a/Buffs/DamageOverTime/Vaporfied.cs b/Buffs/DamageOverTime/Vaporfied.cs index 587949fa9a..c429efc8be 100644 --- a/Buffs/DamageOverTime/Vaporfied.cs +++ b/Buffs/DamageOverTime/Vaporfied.cs @@ -21,5 +21,10 @@ namespace CalamityMod.Buffs.DamageOverTime npc.DelBuff(buffIndex); buffIndex--; } + + public override void Update(Player player, ref int buffIndex) + { + player.Calamity().vaporfied = true; + } } } diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 981d01ee14..768c80a569 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -544,6 +544,7 @@ namespace CalamityMod.CalPlayer public bool eutrophication = false; public bool iCantBreathe = false; //Frozen Lungs debuff public bool cragsLava = false; + public bool vaporfied = false; // Buff public bool trinketOfChiBuff = false; @@ -1303,6 +1304,7 @@ namespace CalamityMod.CalPlayer eutrophication = false; iCantBreathe = false; cragsLava = false; + vaporfied = false; revivify = false; trinketOfChiBuff = false; @@ -1541,6 +1543,7 @@ namespace CalamityMod.CalPlayer eutrophication = false; iCantBreathe = false; cragsLava = false; + vaporfied = false; #endregion #region Rogue @@ -3244,6 +3247,10 @@ namespace CalamityMod.CalPlayer { damageSource = PlayerDeathReason.ByCustomReason(player.name + " was incinerated by lunar rays."); } + if (vaporfied && damage == 10.0 && hitDirection == 0 && damageSource.SourceOtherIndex == 8) + { + damageSource = PlayerDeathReason.ByCustomReason(player.name + " vaporized into thin air."); + } if (manaOverloader && damage == 10.0 && hitDirection == 0 && damageSource.SourceOtherIndex == 8) { damageSource = PlayerDeathReason.ByCustomReason(player.name + "'s life was completely converted into mana."); @@ -8275,6 +8282,39 @@ namespace CalamityMod.CalPlayer fullBright = true; } } + if (vaporfied) + { + int dustType = Utils.SelectRandom(Main.rand, new int[] + { + 246, + 242, + 229, + 226, + 247, + 187, + 234 + }); + if (Main.rand.NextBool(4) && drawInfo.shadow == 0f) + { + int dust = Dust.NewDust(drawInfo.position - new Vector2(2f, 2f), player.width + 4, player.height + 4, dustType, player.velocity.X * 0.4f, player.velocity.Y * 0.4f, 100, default, 3f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 1.8f; + Main.dust[dust].velocity.Y -= 0.5f; + if (Main.rand.NextBool(4)) + { + Main.dust[dust].noGravity = false; + Main.dust[dust].scale *= 0.5f; + } + Main.playerDrawDust.Add(dust); + } + if (noRogueStealth) + { + r *= 0.25f; + g *= 0.25f; + b *= 0.1f; + fullBright = true; + } + } if (eFreeze || silvaStun || gState || cDepth || eutrophication) { if (noRogueStealth) diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 047304a29d..ca3a012515 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -104,6 +104,15 @@ namespace CalamityMod.CalPlayer player.lifeRegen -= 16; } + if (modPlayer.vaporfied) + { + if (player.lifeRegen > 0) + player.lifeRegen = 0; + + player.lifeRegenTime = 0; + player.lifeRegen -= 8; + } + if (modPlayer.cragsLava) { if (player.lifeRegen > 0) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index ab3da3e7d5..0172a6bfb8 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2280,6 +2280,12 @@ namespace CalamityMod.CalPlayer player.velocity.X = 0f; } + if (modPlayer.vaporfied) + { + player.velocity.Y *= 0.98f; + player.velocity.X *= 0.98f; + } + if (modPlayer.eGravity) { if (player.wingTimeMax < 0) diff --git a/Projectiles/Typeless/AstralStar.cs b/Projectiles/Typeless/AstralStar.cs index 24baff0cd0..5f5a69cad3 100644 --- a/Projectiles/Typeless/AstralStar.cs +++ b/Projectiles/Typeless/AstralStar.cs @@ -94,6 +94,11 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(ModContent.BuffType(), 120); } + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } + public override Color? GetAlpha(Color lightColor) { return new Color(200, 100, 250, projectile.alpha); diff --git a/Projectiles/Typeless/AtaxiaOrb.cs b/Projectiles/Typeless/AtaxiaOrb.cs index 3ddbe6368c..1da5fe5d56 100644 --- a/Projectiles/Typeless/AtaxiaOrb.cs +++ b/Projectiles/Typeless/AtaxiaOrb.cs @@ -68,5 +68,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(BuffID.OnFire, 180); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.OnFire, 180); + } } } diff --git a/Projectiles/Typeless/BallisticPoisonCloud.cs b/Projectiles/Typeless/BallisticPoisonCloud.cs index 85c298c4c1..ecdde6f8f6 100644 --- a/Projectiles/Typeless/BallisticPoisonCloud.cs +++ b/Projectiles/Typeless/BallisticPoisonCloud.cs @@ -69,5 +69,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(BuffID.Venom, 240); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.Venom, 240); + } } } diff --git a/Projectiles/Typeless/BallisticPoisonCloud2.cs b/Projectiles/Typeless/BallisticPoisonCloud2.cs index b6dac364c0..0e44037c13 100644 --- a/Projectiles/Typeless/BallisticPoisonCloud2.cs +++ b/Projectiles/Typeless/BallisticPoisonCloud2.cs @@ -69,5 +69,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(BuffID.Venom, 240); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.Venom, 240); + } } } diff --git a/Projectiles/Typeless/BallisticPoisonCloud3.cs b/Projectiles/Typeless/BallisticPoisonCloud3.cs index b0ac1bcf78..caa48fea6e 100644 --- a/Projectiles/Typeless/BallisticPoisonCloud3.cs +++ b/Projectiles/Typeless/BallisticPoisonCloud3.cs @@ -69,5 +69,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(BuffID.Venom, 240); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.Venom, 240); + } } } diff --git a/Projectiles/Typeless/BlazingSun.cs b/Projectiles/Typeless/BlazingSun.cs index d0946b0475..6f4b1f5ec9 100644 --- a/Projectiles/Typeless/BlazingSun.cs +++ b/Projectiles/Typeless/BlazingSun.cs @@ -108,5 +108,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(ModContent.BuffType(), 180); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + } } } diff --git a/Projectiles/Typeless/ChaosBlaze.cs b/Projectiles/Typeless/ChaosBlaze.cs index 88741ca645..1f9a7d908e 100644 --- a/Projectiles/Typeless/ChaosBlaze.cs +++ b/Projectiles/Typeless/ChaosBlaze.cs @@ -94,5 +94,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(BuffID.OnFire, 300); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.OnFire, 300); + } } } diff --git a/Projectiles/Typeless/ChaosFlare.cs b/Projectiles/Typeless/ChaosFlare.cs index e36117d193..89f07eeaeb 100644 --- a/Projectiles/Typeless/ChaosFlare.cs +++ b/Projectiles/Typeless/ChaosFlare.cs @@ -79,5 +79,11 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(ModContent.BuffType(), 180); target.AddBuff(BuffID.OnFire, 180); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.OnFire, 180); + target.AddBuff(ModContent.BuffType(), 180); + } } } diff --git a/Projectiles/Typeless/ChaosFlare2.cs b/Projectiles/Typeless/ChaosFlare2.cs index 046e1e39ec..d02009a88f 100644 --- a/Projectiles/Typeless/ChaosFlare2.cs +++ b/Projectiles/Typeless/ChaosFlare2.cs @@ -73,5 +73,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(BuffID.OnFire, 180); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.OnFire, 180); + } } } diff --git a/Projectiles/Typeless/ChaosGeyser.cs b/Projectiles/Typeless/ChaosGeyser.cs index 80178c22e7..8e069d2f09 100644 --- a/Projectiles/Typeless/ChaosGeyser.cs +++ b/Projectiles/Typeless/ChaosGeyser.cs @@ -99,5 +99,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(BuffID.OnFire, 180); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.OnFire, 180); + } } } diff --git a/Projectiles/Typeless/CorpusAvertorClone.cs b/Projectiles/Typeless/CorpusAvertorClone.cs index 6ddf7a8aae..778f7d5f02 100644 --- a/Projectiles/Typeless/CorpusAvertorClone.cs +++ b/Projectiles/Typeless/CorpusAvertorClone.cs @@ -123,5 +123,18 @@ namespace CalamityMod.Projectiles.Typeless int owner = projectile.owner; Projectile.NewProjectile(target.position.X, target.position.Y, 0f, 0f, ProjectileID.VampireHeal, 0, 0f, projectile.owner, (float)owner, heal); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + float heal = (float)damage * 0.05f; + if ((int)heal == 0) + return; + if (Main.player[Main.myPlayer].lifeSteal <= 0f) + return; + + Main.player[Main.myPlayer].lifeSteal -= heal * 1.5f; + int owner = projectile.owner; + Projectile.NewProjectile(target.position.X, target.position.Y, 0f, 0f, ProjectileID.VampireHeal, 0, 0f, projectile.owner, (float)owner, heal); + } } } diff --git a/Projectiles/Typeless/CorpusAvertorProj.cs b/Projectiles/Typeless/CorpusAvertorProj.cs index d88581cca7..6d9c8252a2 100644 --- a/Projectiles/Typeless/CorpusAvertorProj.cs +++ b/Projectiles/Typeless/CorpusAvertorProj.cs @@ -94,5 +94,18 @@ namespace CalamityMod.Projectiles.Typeless int owner = projectile.owner; Projectile.NewProjectile(target.position.X, target.position.Y, 0f, 0f, ProjectileID.VampireHeal, 0, 0f, projectile.owner, (float)owner, heal); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + float heal = (float)damage * 0.05f; + if ((int)heal == 0) + return; + if (Main.player[Main.myPlayer].lifeSteal <= 0f) + return; + + Main.player[Main.myPlayer].lifeSteal -= heal * 1.5f; + int owner = projectile.owner; + Projectile.NewProjectile(target.position.X, target.position.Y, 0f, 0f, ProjectileID.VampireHeal, 0, 0f, projectile.owner, (float)owner, heal); + } } } diff --git a/Projectiles/Typeless/CursorProj.cs b/Projectiles/Typeless/CursorProj.cs index edca07c6b3..b725fbae1d 100644 --- a/Projectiles/Typeless/CursorProj.cs +++ b/Projectiles/Typeless/CursorProj.cs @@ -194,6 +194,11 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(ModContent.BuffType(), 300); } + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } + public override void Kill(int timeLeft) { Vector2 velocity = projectile.velocity; diff --git a/Projectiles/Typeless/CursorProjSplit.cs b/Projectiles/Typeless/CursorProjSplit.cs index 673703e220..36440ec6ba 100644 --- a/Projectiles/Typeless/CursorProjSplit.cs +++ b/Projectiles/Typeless/CursorProjSplit.cs @@ -190,6 +190,11 @@ namespace CalamityMod.Projectiles.Typeless } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } + + public override void OnHitPvp(Player target, int damage, bool crit) { target.AddBuff(ModContent.BuffType(), 120); } diff --git a/Projectiles/Typeless/DarkIce.cs b/Projectiles/Typeless/DarkIce.cs index 440856f078..e0cea56dbb 100644 --- a/Projectiles/Typeless/DarkIce.cs +++ b/Projectiles/Typeless/DarkIce.cs @@ -51,6 +51,12 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(ModContent.BuffType(), 480); } + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.Frostburn, 480); + target.AddBuff(ModContent.BuffType(), 480); + } + public override Color? GetAlpha(Color lightColor) { return new Color(198, 197, 246); diff --git a/Projectiles/Typeless/DragonDust.cs b/Projectiles/Typeless/DragonDust.cs index 31dce97f79..ce2bf96961 100644 --- a/Projectiles/Typeless/DragonDust.cs +++ b/Projectiles/Typeless/DragonDust.cs @@ -87,5 +87,10 @@ namespace CalamityMod.Projectiles.Typeless target.immune[projectile.owner] = 0; target.AddBuff(ModContent.BuffType(), 120); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } } } diff --git a/Projectiles/Typeless/FlareExplosion.cs b/Projectiles/Typeless/FlareExplosion.cs index 3fd18dc722..bd6f4bb55e 100644 --- a/Projectiles/Typeless/FlareExplosion.cs +++ b/Projectiles/Typeless/FlareExplosion.cs @@ -41,5 +41,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(ModContent.BuffType(), 60); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 60); + } } } diff --git a/Projectiles/Typeless/FuckYou.cs b/Projectiles/Typeless/FuckYou.cs index b4c784587c..63c0ad13ce 100644 --- a/Projectiles/Typeless/FuckYou.cs +++ b/Projectiles/Typeless/FuckYou.cs @@ -120,6 +120,12 @@ namespace CalamityMod.Projectiles.Typeless projectile.direction = Main.player[projectile.owner].direction; } + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.OnFire, 300); + projectile.direction = Main.player[projectile.owner].direction; + } + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { damage = (int)((double)damage * 0.3); diff --git a/Projectiles/Typeless/GalaxySmasherHammer.cs b/Projectiles/Typeless/GalaxySmasherHammer.cs index 469e88e2ba..e65bfa40d9 100644 --- a/Projectiles/Typeless/GalaxySmasherHammer.cs +++ b/Projectiles/Typeless/GalaxySmasherHammer.cs @@ -193,5 +193,63 @@ namespace CalamityMod.Projectiles.Typeless } } } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + // Some dust gets produced on impact. + int dustSets = Main.rand.Next(5, 8); + int dustRadius = 6; + Vector2 corner = new Vector2(target.Center.X - (float)dustRadius, target.Center.Y - (float)dustRadius); + for (int i = 0; i < dustSets; ++i) + { + // Bigger, flying orb dust + float scaleOrb = 1.2f + Main.rand.NextFloat(1f); + int orb = Dust.NewDust(corner, 2 * dustRadius, 2 * dustRadius, 112); + Main.dust[orb].noGravity = true; + Main.dust[orb].velocity *= 4f; + Main.dust[orb].scale = scaleOrb; + + // Add six sparkles per flying orb + for (int j = 0; j < 6; ++j) + { + float scaleSparkle = 0.8f + Main.rand.NextFloat(1.1f); + int sparkle = Dust.NewDust(corner, 2 * dustRadius, 2 * dustRadius, 173); + Main.dust[sparkle].noGravity = true; + float dustSpeed = Main.rand.NextFloat(10f, 18f); + Main.dust[sparkle].velocity = Main.rand.NextVector2Unit() * dustSpeed; + Main.dust[sparkle].scale = scaleSparkle; + } + } + + // Makes an explosion sound. + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); + + // Applies God Slayer Inferno on contact. + target.AddBuff(ModContent.BuffType(), 480); + + // Three death lasers (aka "Nebula Shots") swarm the target. + int laserID = ModContent.ProjectileType(); + int laserDamage = (int)(0.2f * projectile.damage); + float laserKB = 2.5f; + int numLasers = 3; + for (int i = 0; i < numLasers; ++i) + { + float startDist = Main.rand.NextFloat(260f, 270f); + Vector2 startDir = Main.rand.NextVector2Unit(); + Vector2 startPoint = target.Center + (startDir * startDist); + + float laserSpeed = Main.rand.NextFloat(15f, 18f); + Vector2 velocity = startDir * (-laserSpeed); + + // NebulaShot projectile adjusts its own damage type based on ai[0] + if (projectile.owner == Main.myPlayer) + { + float damageType = projectile.melee ? 1f : 2f; + int proj = Projectile.NewProjectile(startPoint, velocity, laserID, laserDamage, laserKB, projectile.owner, damageType, 0f); + Main.projectile[proj].tileCollide = false; + Main.projectile[proj].timeLeft = 30; + } + } + } } } diff --git a/Projectiles/Typeless/GodKiller.cs b/Projectiles/Typeless/GodKiller.cs index 62d2ccdd51..c680b3f777 100644 --- a/Projectiles/Typeless/GodKiller.cs +++ b/Projectiles/Typeless/GodKiller.cs @@ -139,6 +139,11 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(ModContent.BuffType(), 180); } + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); diff --git a/Projectiles/Typeless/GodSlayerBlaze.cs b/Projectiles/Typeless/GodSlayerBlaze.cs index a1b3a03a59..c4411a03e1 100644 --- a/Projectiles/Typeless/GodSlayerBlaze.cs +++ b/Projectiles/Typeless/GodSlayerBlaze.cs @@ -80,5 +80,13 @@ namespace CalamityMod.Projectiles.Typeless else target.AddBuff(ModContent.BuffType(), 300); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + if (projectile.ai[1] == 1f) + target.AddBuff(ModContent.BuffType(), 300); + else + target.AddBuff(ModContent.BuffType(), 300); + } } } diff --git a/Projectiles/Typeless/GodSlayerOrb.cs b/Projectiles/Typeless/GodSlayerOrb.cs index 665087298f..71ef1e8dde 100644 --- a/Projectiles/Typeless/GodSlayerOrb.cs +++ b/Projectiles/Typeless/GodSlayerOrb.cs @@ -67,5 +67,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(ModContent.BuffType(), 180); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + } } } diff --git a/Projectiles/Typeless/GodSlayerPhantom.cs b/Projectiles/Typeless/GodSlayerPhantom.cs index 08b3b71562..69395eeef9 100644 --- a/Projectiles/Typeless/GodSlayerPhantom.cs +++ b/Projectiles/Typeless/GodSlayerPhantom.cs @@ -129,6 +129,11 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(ModContent.BuffType(), 300); } + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } + public override void Kill(int timeLeft) { projectile.position = projectile.Center; diff --git a/Projectiles/Typeless/GoldenGunProj.cs b/Projectiles/Typeless/GoldenGunProj.cs index 59e0aab675..d83e70b9d2 100644 --- a/Projectiles/Typeless/GoldenGunProj.cs +++ b/Projectiles/Typeless/GoldenGunProj.cs @@ -42,33 +42,25 @@ namespace CalamityMod.Projectiles.Typeless float num589 = projectile.velocity.Y / 6f * (float)num587; int num590 = 6; int num591 = Dust.NewDust(new Vector2(projectile.position.X + (float)num590, projectile.position.Y + (float)num590), projectile.width - num590 * 2, projectile.height - num590 * 2, 170, 0f, 0f, 75, default, 1.2f); - Dust dust; + Dust dust = Main.dust[num591]; if (Main.rand.NextBool(2)) { - dust = Main.dust[num591]; dust.alpha += 25; } if (Main.rand.NextBool(2)) { - dust = Main.dust[num591]; dust.alpha += 25; } if (Main.rand.NextBool(2)) { - dust = Main.dust[num591]; dust.alpha += 25; } - Main.dust[num591].noGravity = true; - dust = Main.dust[num591]; + dust.noGravity = true; dust.velocity *= 0.3f; - dust = Main.dust[num591]; dust.velocity += projectile.velocity * 0.5f; - Main.dust[num591].position = projectile.Center; - Dust var_2_18F52_cp_0_cp_0 = Main.dust[num591]; - var_2_18F52_cp_0_cp_0.position.X -= num588; - Dust var_2_18F74_cp_0_cp_0 = Main.dust[num591]; - var_2_18F74_cp_0_cp_0.position.Y -= num589; - dust = Main.dust[num591]; + dust.position = projectile.Center; + dust.position.X -= num588; + dust.position.Y -= num589; dust.velocity *= 0.2f; num3 = num587; } @@ -78,7 +70,6 @@ namespace CalamityMod.Projectiles.Typeless int num593 = Dust.NewDust(new Vector2(projectile.position.X + (float)num592, projectile.position.Y + (float)num592), projectile.width - num592 * 2, projectile.height - num592 * 2, 170, 0f, 0f, 75, default, 0.65f); Dust dust = Main.dust[num593]; dust.velocity *= 0.5f; - dust = Main.dust[num593]; dust.velocity += projectile.velocity * 0.5f; } num3 = num586; @@ -127,5 +118,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(BuffID.Ichor, 600); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.Ichor, 600); + } } } diff --git a/Projectiles/Typeless/HolyEruption.cs b/Projectiles/Typeless/HolyEruption.cs index f9b2fb1401..f86a0170cf 100644 --- a/Projectiles/Typeless/HolyEruption.cs +++ b/Projectiles/Typeless/HolyEruption.cs @@ -93,5 +93,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(ModContent.BuffType(), 300); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } } } diff --git a/Projectiles/Typeless/HolyFlameBomb.cs b/Projectiles/Typeless/HolyFlameBomb.cs index 91255821ae..3624ca77a2 100644 --- a/Projectiles/Typeless/HolyFlameBomb.cs +++ b/Projectiles/Typeless/HolyFlameBomb.cs @@ -76,5 +76,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(ModContent.BuffType(), 300); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } } } diff --git a/Projectiles/Typeless/KelvinCatalystBoomerang.cs b/Projectiles/Typeless/KelvinCatalystBoomerang.cs index 044bc360e3..0ecbc6cdb6 100644 --- a/Projectiles/Typeless/KelvinCatalystBoomerang.cs +++ b/Projectiles/Typeless/KelvinCatalystBoomerang.cs @@ -164,6 +164,30 @@ namespace CalamityMod.Projectiles.Typeless Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 30); } + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.Frostburn, 240); + if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].ownedProjectileCounts[ModContent.ProjectileType()] < 25) + { + float spread = 45f * 0.0174f; + double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2; + double deltaAngle = spread / 8f; + double offsetAngle; + int i; + for (i = 0; i < 4; i++) + { + offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; + + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f), + ModContent.ProjectileType(), projectile.damage / 6, projectile.knockBack * 0.5f, projectile.owner, 0f, 0f); + + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f), + ModContent.ProjectileType(), projectile.damage / 6, projectile.knockBack * 0.5f, projectile.owner, 0f, 0f); + } + } + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 30); + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); diff --git a/Projectiles/Typeless/KelvinCatalystStar.cs b/Projectiles/Typeless/KelvinCatalystStar.cs index 45fad36d34..39f3192aad 100644 --- a/Projectiles/Typeless/KelvinCatalystStar.cs +++ b/Projectiles/Typeless/KelvinCatalystStar.cs @@ -123,5 +123,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(BuffID.Frostburn, 60); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.Frostburn, 60); + } } } diff --git a/Projectiles/Typeless/LunicBeam.cs b/Projectiles/Typeless/LunicBeam.cs index 8b411c2fe0..b6bd3c32bb 100644 --- a/Projectiles/Typeless/LunicBeam.cs +++ b/Projectiles/Typeless/LunicBeam.cs @@ -210,6 +210,11 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(ModContent.BuffType(), 300); } + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } + public override void Kill(int timeLeft) { int num47 = Utils.SelectRandom(Main.rand, new int[] @@ -249,31 +254,27 @@ namespace CalamityMod.Projectiles.Typeless 247 }); int num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, num47, 0f, 0f, 200, default, num50); - Main.dust[num54].position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f; - Main.dust[num54].noGravity = true; Dust dust = Main.dust[num54]; + dust.position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f; + dust.noGravity = true; dust.velocity *= 3f; - dust = Main.dust[num54]; dust.velocity += value4 * Main.rand.NextFloat(); num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, num48, 0f, 0f, 100, default, num51); - Main.dust[num54].position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f; - dust = Main.dust[num54]; + dust.position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f; dust.velocity *= 2f; - Main.dust[num54].noGravity = true; - Main.dust[num54].fadeIn = 1f; - Main.dust[num54].color = Color.Crimson * 0.5f; - dust = Main.dust[num54]; + dust.noGravity = true; + dust.fadeIn = 1f; + dust.color = Color.Crimson * 0.5f; dust.velocity += value4 * Main.rand.NextFloat(); num3 = num53; } for (int num55 = 0; num55 < 20; num55 = num3 + 1) { int num56 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, num49, 0f, 0f, 0, default, num52); - Main.dust[num56].position = projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)projectile.velocity.ToRotation(), default) * (float)projectile.width / 3f; - Main.dust[num56].noGravity = true; Dust dust = Main.dust[num56]; + dust.position = projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)projectile.velocity.ToRotation(), default) * (float)projectile.width / 3f; + dust.noGravity = true; dust.velocity *= 0.5f; - dust = Main.dust[num56]; dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat()); num3 = num55; } diff --git a/Projectiles/Typeless/MarkRound.cs b/Projectiles/Typeless/MarkRound.cs index 628bf05a1a..d1517e81a3 100644 --- a/Projectiles/Typeless/MarkRound.cs +++ b/Projectiles/Typeless/MarkRound.cs @@ -107,5 +107,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(ModContent.BuffType(), 300); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } } } diff --git a/Projectiles/Typeless/OmegaBlueTentacle.cs b/Projectiles/Typeless/OmegaBlueTentacle.cs index b8d4132b7a..029e62f3b8 100644 --- a/Projectiles/Typeless/OmegaBlueTentacle.cs +++ b/Projectiles/Typeless/OmegaBlueTentacle.cs @@ -186,20 +186,45 @@ namespace CalamityMod.Projectiles.Typeless crit = true; } + public override void ModifyHitPvp(Player target, ref int damage, ref bool crit) + { + if (Main.player[projectile.owner].Calamity().omegaBlueHentai) + crit = true; + } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - if (projectile.owner == Main.myPlayer && Main.player[Main.myPlayer].lifeSteal > 0f && target.type != NPCID.TargetDummy) + if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].lifeSteal > 0f && target.type != NPCID.TargetDummy) { int healAmount = 10 * damage / projectile.damage; //should always be around max, less if enemy has defense/DR if (healAmount > 0) { - Main.player[Main.myPlayer].lifeSteal -= healAmount; - if (Main.player[Main.myPlayer].Calamity().omegaBlueHentai) //hentai always crits, this makes it have same lifesteal delay - Main.player[Main.myPlayer].lifeSteal += healAmount / 2; - /*Main.player[Main.myPlayer].statLife += healAmount; - if (Main.player[Main.myPlayer].statLife > Main.player[Main.myPlayer].statLifeMax2) - Main.player[Main.myPlayer].statLife = Main.player[Main.myPlayer].statLifeMax2; - Main.player[Main.myPlayer].HealEffect(healAmount, false);*/ + Main.player[projectile.owner].lifeSteal -= healAmount; + if (Main.player[projectile.owner].Calamity().omegaBlueHentai) //hentai always crits, this makes it have same lifesteal delay + Main.player[projectile.owner].lifeSteal += healAmount / 2; + /*Main.player[projectile.owner].statLife += healAmount; + if (Main.player[projectile.owner].statLife > Main.player[projectile.owner].statLifeMax2) + Main.player[projectile.owner].statLife = Main.player[projectile.owner].statLifeMax2; + Main.player[projectile.owner].HealEffect(healAmount, false);*/ + Projectile.NewProjectile(projectile.Center, Vector2.Zero, ProjectileID.SpiritHeal, 0, 0f, projectile.owner, projectile.owner, healAmount); + } + } + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].lifeSteal > 0f) + { + int healAmount = 10 * damage / projectile.damage; //should always be around max, less if enemy has defense/DR + if (healAmount > 0) + { + Main.player[projectile.owner].lifeSteal -= healAmount; + if (Main.player[projectile.owner].Calamity().omegaBlueHentai) //hentai always crits, this makes it have same lifesteal delay + Main.player[projectile.owner].lifeSteal += healAmount / 2; + /*Main.player[projectile.owner].statLife += healAmount; + if (Main.player[projectile.owner].statLife > Main.player[projectile.owner].statLifeMax2) + Main.player[projectile.owner].statLife = Main.player[projectile.owner].statLifeMax2; + Main.player[projectile.owner].HealEffect(healAmount, false);*/ Projectile.NewProjectile(projectile.Center, Vector2.Zero, ProjectileID.SpiritHeal, 0, 0f, projectile.owner, projectile.owner, healAmount); } } diff --git a/Projectiles/Typeless/PoisonousSeawater.cs b/Projectiles/Typeless/PoisonousSeawater.cs index c30a5b5070..681e084116 100644 --- a/Projectiles/Typeless/PoisonousSeawater.cs +++ b/Projectiles/Typeless/PoisonousSeawater.cs @@ -59,5 +59,11 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(BuffID.Venom, 120); target.AddBuff(BuffID.Poisoned, 120); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.Venom, 120); + target.AddBuff(BuffID.Poisoned, 120); + } } } diff --git a/Projectiles/Typeless/ReaverBlast.cs b/Projectiles/Typeless/ReaverBlast.cs index 149cb978db..6627f85652 100644 --- a/Projectiles/Typeless/ReaverBlast.cs +++ b/Projectiles/Typeless/ReaverBlast.cs @@ -89,5 +89,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(BuffID.CursedInferno, 60); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.CursedInferno, 60); + } } } diff --git a/Projectiles/Typeless/SabatonBoom.cs b/Projectiles/Typeless/SabatonBoom.cs index 7ea0641f76..22059f16f5 100644 --- a/Projectiles/Typeless/SabatonBoom.cs +++ b/Projectiles/Typeless/SabatonBoom.cs @@ -21,5 +21,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(ModContent.BuffType(), 300); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } } } diff --git a/Projectiles/Typeless/ShadowflameExplosion.cs b/Projectiles/Typeless/ShadowflameExplosion.cs index b47c288c50..629485379d 100644 --- a/Projectiles/Typeless/ShadowflameExplosion.cs +++ b/Projectiles/Typeless/ShadowflameExplosion.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Buffs.DamageOverTime; +using Terraria; using Terraria.ID; using Terraria.ModLoader; using Microsoft.Xna.Framework; @@ -50,5 +51,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(BuffID.ShadowFlame, 180); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + } } } diff --git a/Projectiles/Typeless/ShadowflameExplosionBig.cs b/Projectiles/Typeless/ShadowflameExplosionBig.cs index caf854b491..60ffd632c6 100644 --- a/Projectiles/Typeless/ShadowflameExplosionBig.cs +++ b/Projectiles/Typeless/ShadowflameExplosionBig.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Buffs.DamageOverTime; +using Terraria; using Terraria.ID; using Terraria.ModLoader; using Microsoft.Xna.Framework; @@ -52,5 +53,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(BuffID.ShadowFlame, 180); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + } } } diff --git a/Projectiles/Typeless/StandingFire.cs b/Projectiles/Typeless/StandingFire.cs index 22495b3327..2de3751394 100644 --- a/Projectiles/Typeless/StandingFire.cs +++ b/Projectiles/Typeless/StandingFire.cs @@ -97,5 +97,10 @@ namespace CalamityMod.Projectiles.Typeless target.immune[projectile.owner] = 7; target.AddBuff(ModContent.BuffType(), 120); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } } } diff --git a/Projectiles/Typeless/StellarContemptHammer.cs b/Projectiles/Typeless/StellarContemptHammer.cs index 407ef89340..570812b8f1 100644 --- a/Projectiles/Typeless/StellarContemptHammer.cs +++ b/Projectiles/Typeless/StellarContemptHammer.cs @@ -189,5 +189,71 @@ namespace CalamityMod.Projectiles.Typeless } } } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + // Some dust gets produced on impact. + int dustCount = Main.rand.Next(20, 24); + int dustRadius = 6; + Vector2 corner = new Vector2(target.Center.X - (float)dustRadius, target.Center.Y - (float)dustRadius); + for (int i = 0; i < dustCount; ++i) + { + int dustType = 229; + float scale = 0.8f + Main.rand.NextFloat(1.1f); + int idx = Dust.NewDust(corner, 2 * dustRadius, 2 * dustRadius, dustType); + Main.dust[idx].noGravity = true; + Main.dust[idx].velocity *= 3f; + Main.dust[idx].scale = scale; + } + + // Applies Nightwither on contact at night. + if (!Main.dayTime) + target.AddBuff(ModContent.BuffType(), 480); + + // Play the Lunar Flare sound centered on the user, not the target (consistent with Lunar Flare and Stellar Striker) + Player user = Main.player[projectile.owner]; + Main.PlaySound(2, (int)user.position.X, (int)user.position.Y, 88); + projectile.netUpdate = true; + + int numFlares = 2; + int flareDamage = (int)(0.3f * projectile.damage); + float flareKB = 4f; + for (int i = 0; i < numFlares; ++i) + { + float flareSpeed = Main.rand.NextFloat(8f, 11f); + + // Flares never come from straight up, there is always at least an 80 pixel horizontal offset + float xDist = Main.rand.NextFloat(80f, 320f) * (Main.rand.NextBool() ? -1f : 1f); + float yDist = Main.rand.NextFloat(1200f, 1440f); + Vector2 startPoint = target.Center + new Vector2(xDist, -yDist); + + // The flare is somewhat inaccurate based on the size of the target. + float xVariance = target.width / 4f; + if (xVariance < 8f) + xVariance = 8f; + float yVariance = target.height / 4f; + if (yVariance < 8f) + yVariance = 8f; + float xOffset = Main.rand.NextFloat(-xVariance, xVariance); + float yOffset = Main.rand.NextFloat(-yVariance, yVariance); + Vector2 offsetTarget = target.Center + new Vector2(xOffset, yOffset); + + // Finalize the velocity vector and make sure it's going at the right speed. + Vector2 velocity = offsetTarget - startPoint; + velocity.Normalize(); + velocity *= flareSpeed; + + float AI1 = (float)Main.rand.Next(3); + if (projectile.owner == Main.myPlayer) + { + int proj = Projectile.NewProjectile(startPoint, velocity, ProjectileID.LunarFlare, flareDamage, flareKB, Main.myPlayer, 0f, AI1); + CalamityGlobalProjectile cgp = Main.projectile[proj].Calamity(); + if (projectile.melee) + cgp.forceMelee = true; + else + cgp.forceRogue = true; + } + } + } } } diff --git a/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs b/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs index 79c8125c7c..a03c1e4e18 100644 --- a/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs +++ b/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs @@ -114,6 +114,16 @@ namespace CalamityMod.Projectiles.Typeless projectile.Kill(); } + public override void OnHitPvp(Player target, int damage, bool crit) + { + if (projectile.localAI[1] < 1f) + { + return; + } + target.AddBuff(BuffID.Venom, fromArmour ? 150 : 120); + projectile.Kill(); + } + public override void Kill(int timeLeft) { Main.PlaySound(SoundID.Item54, projectile.position); diff --git a/Projectiles/Typeless/TeslaAura.cs b/Projectiles/Typeless/TeslaAura.cs index ceac146712..2af729e8a6 100644 --- a/Projectiles/Typeless/TeslaAura.cs +++ b/Projectiles/Typeless/TeslaAura.cs @@ -77,6 +77,11 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(ModContent.BuffType(), 120); } + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.Electrified, 300); + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Texture2D sprite = Main.projectileTexture[projectile.type]; diff --git a/Projectiles/Typeless/TheDeadlyMicrobeProjectile.cs b/Projectiles/Typeless/TheDeadlyMicrobeProjectile.cs index 76277f16f1..303b0059bd 100644 --- a/Projectiles/Typeless/TheDeadlyMicrobeProjectile.cs +++ b/Projectiles/Typeless/TheDeadlyMicrobeProjectile.cs @@ -178,6 +178,11 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(BuffID.CursedInferno, 90); } + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.CursedInferno, 90); + } + public override void Kill(int timeLeft) { projectile.position = projectile.Center; diff --git a/Projectiles/Typeless/VanquisherArrowSplit.cs b/Projectiles/Typeless/VanquisherArrowSplit.cs index e8ea00ba8c..e0cc5a6752 100644 --- a/Projectiles/Typeless/VanquisherArrowSplit.cs +++ b/Projectiles/Typeless/VanquisherArrowSplit.cs @@ -92,5 +92,10 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(ModContent.BuffType(), 300); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } } } diff --git a/Projectiles/Typeless/XerocBlast.cs b/Projectiles/Typeless/XerocBlast.cs index f2efc595f9..9c037b04e8 100644 --- a/Projectiles/Typeless/XerocBlast.cs +++ b/Projectiles/Typeless/XerocBlast.cs @@ -89,5 +89,11 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(BuffID.CursedInferno, 120); target.AddBuff(BuffID.OnFire, 120); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.CursedInferno, 120); + target.AddBuff(BuffID.OnFire, 120); + } } } diff --git a/Projectiles/Typeless/XerocBubble.cs b/Projectiles/Typeless/XerocBubble.cs index ac3c2d816e..f42f7a1743 100644 --- a/Projectiles/Typeless/XerocBubble.cs +++ b/Projectiles/Typeless/XerocBubble.cs @@ -76,5 +76,11 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(BuffID.OnFire, 120); target.AddBuff(BuffID.CursedInferno, 120); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.CursedInferno, 120); + target.AddBuff(BuffID.OnFire, 120); + } } } diff --git a/Projectiles/Typeless/XerocFire.cs b/Projectiles/Typeless/XerocFire.cs index f723260082..db4ca95f9a 100644 --- a/Projectiles/Typeless/XerocFire.cs +++ b/Projectiles/Typeless/XerocFire.cs @@ -93,5 +93,11 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(BuffID.OnFire, 120); target.AddBuff(BuffID.CursedInferno, 120); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.CursedInferno, 120); + target.AddBuff(BuffID.OnFire, 120); + } } } diff --git a/Projectiles/Typeless/XerocOrb.cs b/Projectiles/Typeless/XerocOrb.cs index 531e688a7d..e42f63cb51 100644 --- a/Projectiles/Typeless/XerocOrb.cs +++ b/Projectiles/Typeless/XerocOrb.cs @@ -68,5 +68,11 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(BuffID.OnFire, 120); target.AddBuff(BuffID.CursedInferno, 120); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.CursedInferno, 120); + target.AddBuff(BuffID.OnFire, 120); + } } } diff --git a/Projectiles/Typeless/XerocStar.cs b/Projectiles/Typeless/XerocStar.cs index 7bd1414a30..bf6ee3496c 100644 --- a/Projectiles/Typeless/XerocStar.cs +++ b/Projectiles/Typeless/XerocStar.cs @@ -85,5 +85,11 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(BuffID.OnFire, 120); target.AddBuff(BuffID.CursedInferno, 120); } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.CursedInferno, 120); + target.AddBuff(BuffID.OnFire, 120); + } } }