From eeca50117fa0cb9a343832e1eefc5cd04362ca19 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 19 Jan 2020 18:28:41 -0500 Subject: [PATCH] buffed necklace of vexation and some pvp effects --- CalPlayer/CalamityPlayer.cs | 377 ++++++++++++++++++------ CalPlayer/CalamityPlayerMiscEffects.cs | 2 +- Items/Accessories/NecklaceofVexation.cs | 3 +- 3 files changed, 284 insertions(+), 98 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 5f4b2e025d..0c0c1947e7 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -3680,10 +3680,55 @@ namespace CalamityMod.CalPlayer } } } + if (item.Calamity().rogue) + { + if (player.meleeEnchant > 0) + { + if (player.meleeEnchant == 1) + { + target.AddBuff(BuffID.Venom, 60 * Main.rand.Next(5, 10), false); + } + if (player.meleeEnchant == 2) + { + target.AddBuff(BuffID.CursedInferno, 60 * Main.rand.Next(3, 7), false); + } + if (player.meleeEnchant == 3) + { + target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(3, 7), false); + } + if (player.meleeEnchant == 5) + { + target.AddBuff(BuffID.Ichor, 60 * Main.rand.Next(10, 20), false); + } + if (player.meleeEnchant == 6) + { + target.AddBuff(BuffID.Confused, 60 * Main.rand.Next(1, 4), false); + } + if (player.meleeEnchant == 8) + { + target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false); + } + /*if (player.meleeEnchant == 4) + { + target.AddBuff(BuffID.Midas, 120, false); + }*/ + } + } if (holyWrath) { target.AddBuff(ModContent.BuffType(), 600, false); } + if (vexation) + { + if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType()) && + player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) + { + target.AddBuff(BuffID.CursedInferno, 120, false); + target.AddBuff(BuffID.Venom, 120, false); + } + } } #endregion @@ -3951,6 +3996,17 @@ namespace CalamityMod.CalPlayer } } } + if (vexation) + { + if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType()) && + player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) + { + target.AddBuff(BuffID.CursedInferno, 120, false); + target.AddBuff(BuffID.Venom, 120, false); + } + } } #endregion @@ -3959,100 +4015,116 @@ namespace CalamityMod.CalPlayer { if (omegaBlueChestplate) target.AddBuff(ModContent.BuffType(), 240); + if (sulfurSet) + target.AddBuff(BuffID.Poisoned, 120); + switch (item.type) + { + case ItemID.IceSickle: + case ItemID.Frostbrand: + target.AddBuff(BuffID.Frostburn, 600); + break; - if (eGauntlet) - { - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - if (Main.rand.NextBool(5)) - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(BuffID.Poisoned, 120, false); - target.AddBuff(BuffID.OnFire, 120, false); - target.AddBuff(BuffID.CursedInferno, 120, false); - target.AddBuff(BuffID.Frostburn, 120, false); - target.AddBuff(BuffID.Ichor, 120, false); - target.AddBuff(BuffID.Venom, 120, false); - } - if (aWeapon) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (abyssalAmulet) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (cryogenSoul || frostFlare) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(44, 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(44, 240, false); - } - else - { - target.AddBuff(44, 120, false); - } - } - if (yInsignia) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (ataxiaFire) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(BuffID.OnFire, 720, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(BuffID.OnFire, 480, false); - } - else - { - target.AddBuff(BuffID.OnFire, 240, false); - } - } + case ItemID.IceBlade: + target.AddBuff(BuffID.Frostburn, 360); + break; + } + + if (item.melee) + { + if (eGauntlet) + { + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + if (Main.rand.NextBool(5)) + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(BuffID.Poisoned, 120, false); + target.AddBuff(BuffID.OnFire, 120, false); + target.AddBuff(BuffID.CursedInferno, 120, false); + target.AddBuff(BuffID.Frostburn, 120, false); + target.AddBuff(BuffID.Ichor, 120, false); + target.AddBuff(BuffID.Venom, 120, false); + } + if (aWeapon) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (abyssalAmulet) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (cryogenSoul || frostFlare) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(44, 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(44, 240, false); + } + else + { + target.AddBuff(44, 120, false); + } + } + if (yInsignia) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (ataxiaFire) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(BuffID.OnFire, 720, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(BuffID.OnFire, 480, false); + } + else + { + target.AddBuff(BuffID.OnFire, 240, false); + } + } + } if (alchFlask) { if (Main.rand.NextBool(4)) @@ -4068,20 +4140,102 @@ namespace CalamityMod.CalPlayer target.AddBuff(ModContent.BuffType(), 120, false); } } + if (item.Calamity().rogue) + { + if (player.meleeEnchant > 0) + { + if (player.meleeEnchant == 1) + { + target.AddBuff(BuffID.Venom, 60 * Main.rand.Next(5, 10), false); + } + if (player.meleeEnchant == 2) + { + target.AddBuff(BuffID.CursedInferno, 60 * Main.rand.Next(3, 7), false); + } + if (player.meleeEnchant == 3) + { + target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(3, 7), false); + } + if (player.meleeEnchant == 5) + { + target.AddBuff(BuffID.Ichor, 60 * Main.rand.Next(10, 20), false); + } + if (player.meleeEnchant == 6) + { + target.AddBuff(BuffID.Confused, 60 * Main.rand.Next(1, 4), false); + } + if (player.meleeEnchant == 8) + { + target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false); + } + /*if (player.meleeEnchant == 4) + { + target.AddBuff(BuffID.Midas, 120, false); + }*/ + } + } if (holyWrath) { target.AddBuff(ModContent.BuffType(), 600, false); } + if (vexation) + { + if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType()) && + player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) + { + target.AddBuff(BuffID.CursedInferno, 120, false); + target.AddBuff(BuffID.Venom, 120, false); + } + } } public override void OnHitPvpWithProj(Projectile proj, Player target, int damage, bool crit) { - if (omegaBlueChestplate) + if (sulfurSet && proj.friendly && !target.friendly) + target.AddBuff(BuffID.Poisoned, 120); + if (omegaBlueChestplate && proj.friendly && !target.friendly) target.AddBuff(ModContent.BuffType(), 240); if (proj.melee && silvaMelee && Main.rand.NextBool(4)) target.AddBuff(ModContent.BuffType(), 20); + switch (proj.type) + { + case ProjectileID.BoneArrow: + target.AddBuff(ModContent.BuffType(), 300); + break; + + case ProjectileID.FrostBlastFriendly: + case ProjectileID.NorthPoleWeapon: + target.AddBuff(BuffID.Frostburn, 600); + break; + + case ProjectileID.FrostBoltStaff: + case ProjectileID.IceSickle: + case ProjectileID.FrostBoltSword: + case ProjectileID.FrostArrow: + case ProjectileID.NorthPoleSpear: + target.AddBuff(BuffID.Frostburn, 480); + break; + + case ProjectileID.IceBoomerang: + case ProjectileID.IceBolt: + case ProjectileID.Blizzard: + case ProjectileID.NorthPoleSnowflake: + target.AddBuff(BuffID.Frostburn, 240); + break; + + case ProjectileID.FrostDaggerfish: + target.AddBuff(BuffID.Frostburn, 180); + break; + + case ProjectileID.SnowBallFriendly: + target.AddBuff(BuffID.Frostburn, 120); + break; + } + if (abyssalAmulet) { if (Main.rand.NextBool(4)) @@ -4259,12 +4413,43 @@ namespace CalamityMod.CalPlayer { target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false); } - if (player.meleeEnchant == 4) + /*if (player.meleeEnchant == 4) { target.AddBuff(BuffID.Midas, 120, false); - } + }*/ } + if (etherealExtorter) + { + if (ZoneSunkenSea) + { + target.AddBuff(ModContent.BuffType(), 60, false); + } + if (ZoneSulphur) + { + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 300, false); + } + if (Main.moonPhase == 6) //first quarter + { + target.AddBuff(BuffID.Midas, 120, false); + } + if (ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.inventory[player.selectedItem].type)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + } } + if (vexation) + { + if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType()) && + player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) + { + target.AddBuff(BuffID.CursedInferno, 120, false); + target.AddBuff(BuffID.Venom, 120, false); + } + } } #endregion diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 35d63cf231..6ead7abc68 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2441,7 +2441,7 @@ namespace CalamityMod.CalPlayer if (modPlayer.vexation) { if (player.statLife < (int)((double)player.statLifeMax2 * 0.5)) - player.allDamage += 0.15f; + player.allDamage += 0.2f; } if (modPlayer.ataxiaBlaze) diff --git a/Items/Accessories/NecklaceofVexation.cs b/Items/Accessories/NecklaceofVexation.cs index 83fa81047f..fa64a07297 100644 --- a/Items/Accessories/NecklaceofVexation.cs +++ b/Items/Accessories/NecklaceofVexation.cs @@ -12,7 +12,8 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Necklace of Vexation"); Tooltip.SetDefault("Revenge\n" + - "15% increased damage when under 50% life"); + "20% increased damage when under 50% life\n" + + "All attacks inflict Cursed Inferno and Venom while wearing Reaver armor"); } public override void SetDefaults()