From 320e2395fdfea50205ba792689836744fbb95cec Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 30 Nov 2019 13:02:55 -0500 Subject: [PATCH] ethereal extorter (unobtainable), partisan nerf, buff fixes, umbraphile hood fix --- Buffs/StatBuffs/BloodflareBloodFrenzy.cs | 2 +- Buffs/StatBuffs/ElysianGuard.cs | 2 +- Buffs/StatBuffs/PolarisBuff.cs | 1 + Buffs/StatBuffs/SpiritGeneratorAtkBuff.cs | 1 + Buffs/StatBuffs/SpiritGeneratorDefBuff.cs | 1 + Buffs/StatBuffs/SpiritGeneratorRegenBuff.cs | 1 + Buffs/StatBuffs/TarragonCloak.cs | 2 +- Buffs/StatBuffs/TarragonImmunity.cs | 2 +- CalPlayer/CalamityPlayer.cs | 170 +++++++++++++++++- CalPlayer/CalamityPlayerLifeRegen.cs | 3 + CalamityMod.cs | 130 ++++++++++++++ Items/Accessories/EtherealExtorter.cs | 39 ++++ Items/Accessories/EtherealExtorter.png | Bin 0 -> 458 bytes Items/Armor/UmbraphileHood.cs | 4 +- Items/CalamityGlobalItem.cs | 7 +- Items/Weapons/Rogue/ProfanedPartisan.cs | 2 +- Items/Weapons/Rogue/RogueWeapon.cs | 5 + Projectiles/CalamityGlobalProjectile.cs | 38 +++- ...{TyphonsGreed.cs => TyphonsGreedBubble.cs} | 2 +- ...yphonsGreed.png => TyphonsGreedBubble.png} | Bin Projectiles/Melee/TyphonsGreedStaff.cs | 2 +- 21 files changed, 401 insertions(+), 13 deletions(-) create mode 100644 Items/Accessories/EtherealExtorter.cs create mode 100644 Items/Accessories/EtherealExtorter.png rename Projectiles/Melee/{TyphonsGreed.cs => TyphonsGreedBubble.cs} (99%) rename Projectiles/Melee/{TyphonsGreed.png => TyphonsGreedBubble.png} (100%) diff --git a/Buffs/StatBuffs/BloodflareBloodFrenzy.cs b/Buffs/StatBuffs/BloodflareBloodFrenzy.cs index 053a3378e4..8c9ad3837d 100644 --- a/Buffs/StatBuffs/BloodflareBloodFrenzy.cs +++ b/Buffs/StatBuffs/BloodflareBloodFrenzy.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.StatBuffs { DisplayName.SetDefault("Blood Frenzy"); Description.SetDefault("Contact damage is reduced and melee stats are greatly increased"); - Main.debuff[Type] = false; + Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; longerExpertDebuff = false; diff --git a/Buffs/StatBuffs/ElysianGuard.cs b/Buffs/StatBuffs/ElysianGuard.cs index 04334f8bfb..018030bcc3 100644 --- a/Buffs/StatBuffs/ElysianGuard.cs +++ b/Buffs/StatBuffs/ElysianGuard.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.StatBuffs { DisplayName.SetDefault("Elysian Guard"); Description.SetDefault("Movement speed reduced, other stats buffed"); - Main.debuff[Type] = false; + Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; Main.buffNoTimeDisplay[Type] = true; diff --git a/Buffs/StatBuffs/PolarisBuff.cs b/Buffs/StatBuffs/PolarisBuff.cs index 048a93d7fd..4654acdc1b 100644 --- a/Buffs/StatBuffs/PolarisBuff.cs +++ b/Buffs/StatBuffs/PolarisBuff.cs @@ -12,6 +12,7 @@ namespace CalamityMod.Buffs.StatBuffs Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; + Main.buffNoTimeDisplay[Type] = true; longerExpertDebuff = false; } diff --git a/Buffs/StatBuffs/SpiritGeneratorAtkBuff.cs b/Buffs/StatBuffs/SpiritGeneratorAtkBuff.cs index fb78bb33a9..c0feaf6629 100644 --- a/Buffs/StatBuffs/SpiritGeneratorAtkBuff.cs +++ b/Buffs/StatBuffs/SpiritGeneratorAtkBuff.cs @@ -12,6 +12,7 @@ namespace CalamityMod.Buffs.StatBuffs Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; + Main.buffNoTimeDisplay[Type] = true; longerExpertDebuff = false; } diff --git a/Buffs/StatBuffs/SpiritGeneratorDefBuff.cs b/Buffs/StatBuffs/SpiritGeneratorDefBuff.cs index 491717c3f3..b6f97b4e67 100644 --- a/Buffs/StatBuffs/SpiritGeneratorDefBuff.cs +++ b/Buffs/StatBuffs/SpiritGeneratorDefBuff.cs @@ -12,6 +12,7 @@ namespace CalamityMod.Buffs.StatBuffs Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; + Main.buffNoTimeDisplay[Type] = true; longerExpertDebuff = false; } diff --git a/Buffs/StatBuffs/SpiritGeneratorRegenBuff.cs b/Buffs/StatBuffs/SpiritGeneratorRegenBuff.cs index 77abb58f91..65a3e88a9c 100644 --- a/Buffs/StatBuffs/SpiritGeneratorRegenBuff.cs +++ b/Buffs/StatBuffs/SpiritGeneratorRegenBuff.cs @@ -12,6 +12,7 @@ namespace CalamityMod.Buffs.StatBuffs Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; + Main.buffNoTimeDisplay[Type] = true; longerExpertDebuff = false; } diff --git a/Buffs/StatBuffs/TarragonCloak.cs b/Buffs/StatBuffs/TarragonCloak.cs index 26400266e5..d6c7e218a2 100644 --- a/Buffs/StatBuffs/TarragonCloak.cs +++ b/Buffs/StatBuffs/TarragonCloak.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.StatBuffs { DisplayName.SetDefault("Tarragon Cloak"); Description.SetDefault("Contact damage is reduced"); - Main.debuff[Type] = false; + Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; longerExpertDebuff = false; diff --git a/Buffs/StatBuffs/TarragonImmunity.cs b/Buffs/StatBuffs/TarragonImmunity.cs index 079614f2cb..9645bd17cf 100644 --- a/Buffs/StatBuffs/TarragonImmunity.cs +++ b/Buffs/StatBuffs/TarragonImmunity.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.StatBuffs { DisplayName.SetDefault("Tarragon Immunity"); Description.SetDefault("You are immune"); - Main.debuff[Type] = false; + Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; longerExpertDebuff = false; diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 1ba06e17e0..05e565be73 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -167,6 +167,7 @@ namespace CalamityMod.CalPlayer public float throwingDamage = 1f; public float throwingVelocity = 1f; public int throwingCrit = 4; + public bool throwingAmmoCost75 = false; public bool throwingAmmoCost66 = false; public bool throwingAmmoCost50 = false; @@ -375,6 +376,7 @@ namespace CalamityMod.CalPlayer public bool ursaSergeant = false; public bool thiefsDime = false; public bool dynamoStemCells = false; + public bool etherealExtorter = false; //public bool dukeScales = false; public bool sandWaifu = false; public bool sandBoobWaifu = false; @@ -870,6 +872,7 @@ namespace CalamityMod.CalPlayer throwingDamage = 1f; throwingVelocity = 1f; throwingCrit = 4; + throwingAmmoCost75 = false; throwingAmmoCost66 = false; throwingAmmoCost50 = false; @@ -1077,6 +1080,7 @@ namespace CalamityMod.CalPlayer ursaSergeant = false; thiefsDime = false; dynamoStemCells = false; + etherealExtorter = false; //dukeScales = false; daedalusReflect = false; @@ -1407,6 +1411,7 @@ namespace CalamityMod.CalPlayer throwingDamage = 1f; throwingVelocity = 1f; throwingCrit = 4; + throwingAmmoCost75 = false; throwingAmmoCost66 = false; throwingAmmoCost50 = false; #endregion @@ -3247,6 +3252,10 @@ namespace CalamityMod.CalPlayer { player.maxFallSpeed *= 1.1f; } + if (etherealExtorter && player.ZoneSkyHeight) + { + player.maxFallSpeed *= 1.25f; + } } if (normalityRelocator) { @@ -4388,6 +4397,84 @@ namespace CalamityMod.CalPlayer { player.Calamity().throwingCrit += 10; } + if (etherealExtorter) + { + bool ZoneForest = !ZoneAbyss && !ZoneSulphur && !ZoneAstral && !ZoneCalamity && !ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor; + if (player.ZoneUnderworldHeight && !ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.inventory[player.selectedItem].type)) + { + player.endurance += 0.03f; + } + if ((player.ZoneDesert || player.ZoneUndergroundDesert) && CalamityMod.daggerList.Contains(player.inventory[player.selectedItem].type)) + { + player.scope = true; + } + if (ZoneSunkenSea) + { + player.gills = true; + player.ignoreWater = true; + } + if (player.ZoneSnow && CalamityMod.iceWeaponList.Contains(player.inventory[player.selectedItem].type)) + { + player.statDefense += 5; + } + if (ZoneAstral) + { + if (player.wingTimeMax > 0) + player.wingTimeMax = (int)((double)player.wingTimeMax * 1.05); + } + if (player.ZoneJungle && CalamityMod.natureWeaponList.Contains(player.inventory[player.selectedItem].type)) + { + player.AddBuff(165, 5, true); //Dryad's Blessing + } + if (ZoneAbyss) + { + player.blind = true; + player.headcovered = true; + player.blackout = true; + if (player.FindBuffIndex(BuffID.Shine) > -1) + { player.ClearBuff(BuffID.Shine); } + if (player.FindBuffIndex(BuffID.NightOwl) > -1) + { player.ClearBuff(BuffID.NightOwl); } + player.nightVision = false; + shine = false; + player.allDamage += 0.2f; + AllCritBoost(5); + player.statDefense += 8; + player.endurance += 0.05f; + } + if (player.ZoneRockLayerHeight && ZoneForest && CalamityMod.flaskBombList.Contains(player.inventory[player.selectedItem].type)) + { + player.blackBelt = true; + } + if (player.ZoneHoly) + { + player.maxMinions += 1; + player.manaCost *= 0.9f; + player.ammoCost75 = true; //25% chance to not use ranged ammo + throwingAmmoCost75 = true; //25% chance to not consume rogue consumables + } + if (player.ZoneBeach) + { + player.moveSpeed += 0.05f; + } + if (player.ZoneGlowshroom) + { + player.statDefense += 3; + } + if (player.ZoneMeteor) + { + gravityNormalizer = true; + player.slowFall = true; + } + if (Main.moonPhase == 0) //full moon + { + player.fishingSkill += 30; + } + if (Main.moonPhase == 6) //first quarter + { + player.discount = true; + } + } if (harpyRing) { if (player.wingTimeMax > 0) @@ -5250,6 +5337,7 @@ namespace CalamityMod.CalPlayer (silvaSet ? 0.05f : 0f) + (eTracers ? 0.05f : 0f) + (blueCandle ? 0.05f : 0f) + + (etherealExtorter && player.ZoneBeach ? 0.05f : 0f) + ((deepDiver && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) ? 0.15f : 0f) + (rogueStealthMax > 0f ? (rogueStealth >= rogueStealthMax ? rogueStealth * 0.05f : rogueStealth * 0.025f) : 0f); @@ -5263,6 +5351,7 @@ namespace CalamityMod.CalPlayer (cTracers ? 0.1f : 0f) + (silvaSet ? 0.05f : 0f) + (eTracers ? 0.05f : 0f) + + (etherealExtorter && player.ZoneBeach ? 0.05f : 0f) + ((stressPills || laudanum || draedonsHeart) ? 0.05f : 0f) + ((deepDiver && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) ? 0.15f : 0f) + (rogueStealthMax > 0f ? (rogueStealth >= rogueStealthMax ? rogueStealth * 0.05f : rogueStealth * 0.025f) : 0f); @@ -5624,6 +5713,11 @@ namespace CalamityMod.CalPlayer item.Calamity().rogue && item.useTime > 3) return 1.1f; } + if (etherealExtorter) + { + if (Main.moonPhase == 1 && item.Calamity().rogue && item.useTime > 3) //Waning gibbous + return 1.1f; + } return 1f; } #endregion @@ -5678,6 +5772,10 @@ namespace CalamityMod.CalPlayer { add += 0.1f; } + if (etherealExtorter && player.ZoneDungeon && item.Calamity().rogue && !item.consumable) + { + add += 0.05f; + } if (theBee && player.statLife >= player.statLifeMax2) { @@ -5727,6 +5825,14 @@ namespace CalamityMod.CalPlayer if (moscowMule) { knockback *= 1.09f; + } + bool ZoneForest = !ZoneAbyss && !ZoneSulphur && !ZoneAstral && !ZoneCalamity && !ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor; + if (etherealExtorter) + { + if (player.ZoneOverworldHeight && ZoneForest) + { + knockback *= 1.15f; + } } } #endregion @@ -6264,6 +6370,26 @@ namespace CalamityMod.CalPlayer 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); + } + } } } #endregion @@ -6920,7 +7046,33 @@ namespace CalamityMod.CalPlayer } if ((filthyGlove || electricianGlove) && proj.Calamity().stealthStrike && proj.Calamity().rogue) { - damageMult += 0.01; + damageMult += 0.1; + } + if (etherealExtorter && proj.Calamity().rogue) + { + bool ZoneForest = !ZoneAbyss && !ZoneSulphur && !ZoneAstral && !ZoneCalamity && !ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor; + if (Main.moonPhase == 7 && crit) //Waxing Gibbous + { + damageMult += 0.05; + } + if (Main.moonPhase == 5) //Waxing Cresent + { + if (proj.penetrate == -1) + damageMult += 0.1; + else if (proj.penetrate >= 5) + damageMult += 0.08; + else if (proj.penetrate == 4) + damageMult += 0.06; + else if (proj.penetrate == 3) + damageMult += 0.03; + else if (proj.penetrate == 2) + damageMult += 0.02; + } + if (player.ZoneDirtLayerHeight && ZoneForest) + { + if (Main.rand.NextBool(20) && !crit) //5% chance to minicrit + damageMult += 0.5; + } } damage = (int)((double)damage * damageMult); @@ -6964,6 +7116,15 @@ namespace CalamityMod.CalPlayer int penetratedDefense = Math.Min(penetratableDefense, 10); damage += (int)(0.5f * penetratedDefense); } + if (proj.Calamity().rogue && etherealExtorter) + { + if (CalamityMod.boomerangProjList.Contains(proj.type) && player.ZoneCorrupt) + { + int penetratableDefense = Math.Max(target.defense - player.armorPenetration, 0); + int penetratedDefense = Math.Min(penetratableDefense, 6); + damage += (int)(0.5f * penetratedDefense); + } + } #endregion #region MultiplicativeReductions @@ -10832,7 +10993,7 @@ namespace CalamityMod.CalPlayer fullBright = true; } } - if (mushy) + if (mushy || (etherealExtorter && player.ZoneGlowshroom)) { if (Main.rand.NextBool(6) && drawInfo.shadow == 0f) { @@ -11039,6 +11200,11 @@ namespace CalamityMod.CalPlayer stealthGenMoving += 0.2f; } + if (etherealExtorter && Main.moonPhase == 3) //Waning Crescent + { + stealthGenMoving += 0.1f; + } + bool standstill = Math.Abs(player.velocity.X) < 0.1f && Math.Abs(player.velocity.Y) < 0.1f && !player.mount.Active; // Stealth gen acceleration diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index d6fe6591f6..fe95cc9855 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -585,6 +585,9 @@ namespace CalamityMod.CalPlayer player.lifeRegen += 2; } + if (modPlayer.etherealExtorter || player.ZoneGlowshroom) + player.lifeRegen += 1; + if (!player.shinyStone) { int lifeRegenTimeMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 450 : 1800; diff --git a/CalamityMod.cs b/CalamityMod.cs index ae0b42a5f5..9288ae663f 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -46,7 +46,10 @@ using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.NPCs.Yharon; using CalamityMod.Projectiles.Boss; using CalamityMod.Projectiles.Enemy; +using CalamityMod.Projectiles.Melee; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Typeless; using CalamityMod.Skies; using CalamityMod.Tiles.Abyss; using CalamityMod.Tiles.Furniture; @@ -163,6 +166,11 @@ namespace CalamityMod public static List daggerList; public static List flaskBombList; public static List spikyBallList; + public static List boomerangProjList; + public static List javelinProjList; + public static List daggerProjList; + public static List flaskBombProjList; + public static List spikyBallProjList; public static List noGravityList; public static List lavaFishList; public static List highTestFishList; @@ -336,6 +344,11 @@ namespace CalamityMod daggerList = null; flaskBombList = null; spikyBallList = null; + boomerangProjList = null; + javelinProjList = null; + daggerProjList = null; + flaskBombProjList = null; + spikyBallProjList = null; noGravityList = null; lavaFishList = null; highTestFishList = null; @@ -836,6 +849,8 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType() }; @@ -998,6 +1013,7 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType() }; @@ -1747,11 +1763,44 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType() }; + boomerangProjList = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + javelinList = new List() { ModContent.ItemType(), @@ -1772,6 +1821,26 @@ namespace CalamityMod ModContent.ItemType() }; + javelinProjList = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + daggerList = new List() { ModContent.ItemType(), @@ -1803,6 +1872,44 @@ namespace CalamityMod ModContent.ItemType() }; + boomerangProjList = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + flaskBombList = new List() { ModContent.ItemType(), @@ -1816,6 +1923,19 @@ namespace CalamityMod ModContent.ItemType() }; + flaskBombProjList = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + spikyBallList = new List() { ModContent.ItemType(), @@ -1826,6 +1946,16 @@ namespace CalamityMod ModContent.ItemType() }; + spikyBallProjList = new List() + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + noGravityList = new List() { ModContent.ItemType(), diff --git a/Items/Accessories/EtherealExtorter.cs b/Items/Accessories/EtherealExtorter.cs new file mode 100644 index 0000000000..0270046c6a --- /dev/null +++ b/Items/Accessories/EtherealExtorter.cs @@ -0,0 +1,39 @@ +using CalamityMod.CalPlayer; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + public class EtherealExtorter : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ethereal Extorter"); + Tooltip.SetDefault(@"Infuses souls into your weapons and body generating different boosts that vary with the environment +Rogue projectiles rarely explode into homing souls +10% rogue damage but reduced life regen"); + } + + public override void SetDefaults() + { + item.width = 28; + item.height = 32; + item.accessory = true; + item.value = Item.buyPrice(0, 24, 0, 0); + item.rare = 8; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.etherealExtorter = true; + modPlayer.throwingDamage += 0.1f; + player.lifeRegen -= 1; //canceled out in mushroom biome btw + if (Main.moonPhase == 4) //new moon + { + modPlayer.rogueStealthMax += 0.1f; + } + } + } +} diff --git a/Items/Accessories/EtherealExtorter.png b/Items/Accessories/EtherealExtorter.png new file mode 100644 index 0000000000000000000000000000000000000000..c257c4e747bea32ed037f9efc711d74ab4041944 GIT binary patch literal 458 zcmV;*0X6=KP)Xqx-uI0CfRke8L<88 zj70hl8V=-F@#v`?*IS*07*qoM6N<$f`&D| A0{{R3 literal 0 HcmV?d00001 diff --git a/Items/Armor/UmbraphileHood.cs b/Items/Armor/UmbraphileHood.cs index 53da9fde5e..86f6f5b55a 100644 --- a/Items/Armor/UmbraphileHood.cs +++ b/Items/Armor/UmbraphileHood.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Armor player.Calamity().throwingVelocity += 0.10f; } - /*public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 12); @@ -63,6 +63,6 @@ namespace CalamityMod.Items.Armor recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); - }*/ + } } } diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 72e61dddcb..c8cac5b383 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -450,6 +450,10 @@ namespace CalamityMod.Items { return false; } + if ((item.type == ItemID.ShinePotion || item.type == ItemID.NightOwlPotion) && (modPlayer.etherealExtorter && modPlayer.ZoneAbyss)) + { + return false; + } if ((item.type == ItemID.SuperAbsorbantSponge || item.type == ItemID.EmptyBucket) && modPlayer.ZoneAbyss) { return false; @@ -2414,7 +2418,8 @@ Grants immunity to fire blocks, and temporary immunity to lava"; (modPlayer.soaring ? 0.1f : 0f) + (modPlayer.holyWrath ? 0.05f : 0f) + (modPlayer.profanedRage ? 0.05f : 0f) + - (modPlayer.draconicSurge ? 0.15f : 0f); + (modPlayer.draconicSurge ? 0.15f : 0f) + + (modPlayer.etherealExtorter && modPlayer.ZoneAstral ? 0.05f : 0f); if (flightSpeedMult > 1.2f) flightSpeedMult = 1.2f; diff --git a/Items/Weapons/Rogue/ProfanedPartisan.cs b/Items/Weapons/Rogue/ProfanedPartisan.cs index 0fcb994e32..faa79880b6 100644 --- a/Items/Weapons/Rogue/ProfanedPartisan.cs +++ b/Items/Weapons/Rogue/ProfanedPartisan.cs @@ -18,7 +18,7 @@ Stealth strikes spawn smaller spears to fly along side it"); public override void SafeSetDefaults() { - item.damage = 450; + item.damage = 410; item.knockBack = 8f; item.crit += 15; diff --git a/Items/Weapons/Rogue/RogueWeapon.cs b/Items/Weapons/Rogue/RogueWeapon.cs index 38511e189d..f4dc73825b 100644 --- a/Items/Weapons/Rogue/RogueWeapon.cs +++ b/Items/Weapons/Rogue/RogueWeapon.cs @@ -65,6 +65,11 @@ namespace CalamityMod.Items.Weapons.Rogue if (Main.rand.Next(1, 101) > 66) return false; } + if (player.Calamity().throwingAmmoCost75) + { + if (Main.rand.Next(1, 101) > 75) + return false; + } return true; } } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 4d6ef70757..0c6a01bd3a 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -57,6 +57,7 @@ namespace CalamityMod.Projectiles private int counter2 = 0; public bool lineColor = false; //holy mother of god, Eater of Shoals was a pain in the ass + public bool extorterBoost = false; #region SetDefaults public override void SetDefaults(Projectile projectile) @@ -582,6 +583,20 @@ namespace CalamityMod.Projectiles else if (projectile.type == ProjectileID.SoulDrain) projectile.magic = true; + if (Main.player[projectile.owner].Calamity().etherealExtorter) + { + if (CalamityMod.spikyBallProjList.Contains(projectile.type) && extorterBoost == false && Main.moonPhase == 2) //third quarter + { + projectile.timeLeft += 300; + extorterBoost = true; + } + if (CalamityMod.javelinProjList.Contains(projectile.type) && extorterBoost == false && Main.player[projectile.owner].ZoneCrimson) + { + projectile.knockBack *= 2; + extorterBoost = true; + } + } + if (!projectile.npcProj && projectile.friendly && projectile.damage > 0) { if (Main.player[projectile.owner].Calamity().eQuiver && projectile.ranged && CalamityMod.rangedProjectileExceptionList.TrueForAll(x => projectile.type != x)) @@ -1394,7 +1409,6 @@ namespace CalamityMod.Projectiles } } - if (playerC.Calamity().moonCrown && stealthStrike && playerC.Calamity().moonCrownCooldown <= 0) { for (int i = 0; i < 20; i++) @@ -1716,6 +1730,28 @@ namespace CalamityMod.Projectiles } } } + + if (rogue) + { + if (Main.player[projectile.owner].Calamity().etherealExtorter && Main.rand.Next(0, 100) >= 95) + { + for (int num252 = 0; num252 < 3; num252++) + { + Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + while (value15.X == 0f && value15.Y == 0f) + { + value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + } + value15.Normalize(); + value15 *= (float)Main.rand.Next(70, 101) * 0.1f; + int newDamage = (int)((double)projectile.damage * 0.33); + int soul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ProjectileID.LostSoulFriendly, newDamage, 0f, projectile.owner, 0f, 0f); + Main.projectile[soul].Calamity().forceRogue = true; + Main.projectile[soul].timeLeft = 300; + Main.projectile[soul].tileCollide = false; + } + } + } } } #endregion diff --git a/Projectiles/Melee/TyphonsGreed.cs b/Projectiles/Melee/TyphonsGreedBubble.cs similarity index 99% rename from Projectiles/Melee/TyphonsGreed.cs rename to Projectiles/Melee/TyphonsGreedBubble.cs index 4ca1979fd7..773ab62d18 100644 --- a/Projectiles/Melee/TyphonsGreed.cs +++ b/Projectiles/Melee/TyphonsGreedBubble.cs @@ -6,7 +6,7 @@ using Terraria; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { - public class TyphonsGreed : ModProjectile + public class TyphonsGreedBubble : ModProjectile { public override void SetStaticDefaults() { diff --git a/Projectiles/Melee/TyphonsGreed.png b/Projectiles/Melee/TyphonsGreedBubble.png similarity index 100% rename from Projectiles/Melee/TyphonsGreed.png rename to Projectiles/Melee/TyphonsGreedBubble.png diff --git a/Projectiles/Melee/TyphonsGreedStaff.cs b/Projectiles/Melee/TyphonsGreedStaff.cs index f36befd0ab..651ab03052 100644 --- a/Projectiles/Melee/TyphonsGreedStaff.cs +++ b/Projectiles/Melee/TyphonsGreedStaff.cs @@ -169,7 +169,7 @@ namespace CalamityMod.Projectiles.Melee if (projectile.owner == Main.myPlayer) { float ai1 = Main.rand.NextFloat() + 0.5f; - Projectile.NewProjectile(vector20.X, vector20.Y, speedX, speedY, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner, 0.0f, ai1); + Projectile.NewProjectile(vector20.X, vector20.Y, speedX, speedY, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner, 0.0f, ai1); } } }