diff --git a/Buffs/Potions/PenumbraBuff.cs b/Buffs/Potions/PenumbraBuff.cs index feae731526..2ffcf2e778 100644 --- a/Buffs/Potions/PenumbraBuff.cs +++ b/Buffs/Potions/PenumbraBuff.cs @@ -8,9 +8,7 @@ namespace CalamityMod.Buffs.Potions public override void SetStaticDefaults() { DisplayName.SetDefault("Penumbra"); - Description.SetDefault("Stealth regenerates 15% faster while moving\n" + - "At night, stealth additionally regenerates 15% faster while standing still\n" + - "Both boosts increase to 20% during a solar eclipse"); + Description.SetDefault("Stealth regenerates 10% faster while moving and 15% faster while standing still"); Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; diff --git a/Buffs/Potions/ShadowBuff.cs b/Buffs/Potions/ShadowBuff.cs index 68b4e3d25d..b1f0231d3b 100644 --- a/Buffs/Potions/ShadowBuff.cs +++ b/Buffs/Potions/ShadowBuff.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.Potions public override void SetStaticDefaults() { DisplayName.SetDefault("Shadow"); - Description.SetDefault("You're invisible, certain rogue weapons give and gain buffs, and stealth generation is boosted."); + Description.SetDefault("You are a shadow, rogue weapons spawn projectiles on hit, and stealth generation is boosted by 8%"); Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; @@ -16,8 +16,9 @@ namespace CalamityMod.Buffs.Potions public override void Update(Player player, ref int buffIndex) { - player.invis = true; player.Calamity().shadow = true; + if (player.yoraiz0rEye < 2 && CalamityConfig.Instance.StealthInvisibility) + player.yoraiz0rEye = 2; } } } diff --git a/Buffs/Summon/FungalClumpBuff.cs b/Buffs/Summon/FungalClumpBuff.cs index 3288fe9f5d..3017d83657 100644 --- a/Buffs/Summon/FungalClumpBuff.cs +++ b/Buffs/Summon/FungalClumpBuff.cs @@ -1,5 +1,5 @@ using CalamityMod.CalPlayer; -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Typeless; using Terraria; using Terraria.ModLoader; diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 33f737eaf4..df061192e1 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -254,28 +254,6 @@ namespace CalamityMod.CalPlayer public static readonly SoundStyle IjiDeathSound = new("CalamityMod/Sounds/Custom/IjiDies"); #endregion - #region Proficiency - private const int levelTier1 = 1500; - private const int levelTier2 = 5500; - private const int levelTier3 = 12500; - public int meleeLevel = 0; - public int rangedLevel = 0; - public int magicLevel = 0; - public int rogueLevel = 0; - public int summonLevel = 0; - public bool shootFireworksLevelUpMelee = true; - public bool shootFireworksLevelUpRanged = true; - public bool shootFireworksLevelUpMagic = true; - public bool shootFireworksLevelUpSummon = true; - public bool shootFireworksLevelUpRogue = true; - public int exactMeleeLevel = 0; - public int exactRangedLevel = 0; - public int exactMagicLevel = 0; - public int exactSummonLevel = 0; - public int exactRogueLevel = 0; - public int gainLevelCooldown = 120; - #endregion - #region Rogue public float rogueStealth = 0f; public float rogueStealthMax = 0f; @@ -287,7 +265,7 @@ namespace CalamityMod.CalPlayer public bool stealthStrikeThisFrame = false; public bool stealthStrikeHalfCost = false; public bool stealthStrike75Cost = false; - public bool stealthStrikeAlwaysCrits = false; + public bool stealthStrike90Cost = false; public bool wearingRogueArmor = false; public float accStealthGenBoost = 0f; @@ -411,11 +389,6 @@ namespace CalamityMod.CalPlayer #endregion #region Accessory - public bool fasterMeleeLevel = false; - public bool fasterRangedLevel = false; - public bool fasterMagicLevel = false; - public bool fasterSummonLevel = false; - public bool fasterRogueLevel = false; public bool luxorsGift = false; public bool fungalSymbiote = false; public bool trinketOfChi = false; @@ -538,6 +511,7 @@ namespace CalamityMod.CalPlayer public bool handWarmer = false; public bool ursaSergeant = false; public bool scuttlersJewel = false; + public int scuttlerCooldown = 0; public bool thiefsDime = false; public bool dynamoStemCells = false; public bool etherealExtorter = false; @@ -1273,16 +1247,6 @@ namespace CalamityMod.CalPlayer tag["aquaticBoostPower"] = aquaticBoost; tag["sCalDeathCount"] = sCalDeathCount; tag["sCalKillCount"] = sCalKillCount; - tag["meleeLevel"] = meleeLevel; - tag["exactMeleeLevel"] = exactMeleeLevel; - tag["rangedLevel"] = rangedLevel; - tag["exactRangedLevel"] = exactRangedLevel; - tag["magicLevel"] = magicLevel; - tag["exactMagicLevel"] = exactMagicLevel; - tag["summonLevel"] = summonLevel; - tag["exactSummonLevel"] = exactSummonLevel; - tag["rogueLevel"] = rogueLevel; - tag["exactRogueLevel"] = exactRogueLevel; tag["moveSpeedBonus"] = moveSpeedBonus; tag["defenseDamage"] = totalDefenseDamage; tag["defenseDamageRecoveryFrames"] = defenseDamageRecoveryFrames; @@ -1367,17 +1331,6 @@ namespace CalamityMod.CalPlayer sCalKillCount = tag.GetInt("sCalKillCount"); deathCount = tag.GetInt("deathCount"); - meleeLevel = tag.GetInt("meleeLevel"); - rangedLevel = tag.GetInt("rangedLevel"); - magicLevel = tag.GetInt("magicLevel"); - summonLevel = tag.GetInt("summonLevel"); - rogueLevel = tag.GetInt("rogueLevel"); - exactMeleeLevel = tag.GetInt("exactMeleeLevel"); - exactRangedLevel = tag.GetInt("exactRangedLevel"); - exactMagicLevel = tag.GetInt("exactMagicLevel"); - exactSummonLevel = tag.GetInt("exactSummonLevel"); - exactRogueLevel = tag.GetInt("exactRogueLevel"); - if (tag.ContainsKey("moveSpeedBonus")) moveSpeedBonus = tag.GetFloat("moveSpeedBonus"); totalDefenseDamage = tag.GetInt("defenseDamage"); @@ -1523,12 +1476,6 @@ namespace CalamityMod.CalPlayer afflicted = false; affliction = false; - fasterMeleeLevel = false; - fasterRangedLevel = false; - fasterMagicLevel = false; - fasterSummonLevel = false; - fasterRogueLevel = false; - dodgeScarf = false; evasionScarf = false; @@ -2189,6 +2136,7 @@ namespace CalamityMod.CalPlayer andromedaCripple = 0; theBeeCooldown = 0; killSpikyBalls = false; + scuttlerCooldown = 0; rogueCrownCooldown = 0; icicleCooldown = 0; statisTimer = 0; @@ -2586,7 +2534,7 @@ namespace CalamityMod.CalPlayer for (int projIndex = 0; projIndex < Main.maxProjectiles; projIndex++) { Projectile proj = Main.projectile[projIndex]; - if (proj.minionSlots <= 0f || !proj.IsSummon()) + if (proj.minionSlots <= 0f || !proj.CountsAsClass()) continue; if (proj.active && proj.owner == Player.whoAmI) { @@ -2604,14 +2552,15 @@ namespace CalamityMod.CalPlayer Player.HealEffect(2); } } - if (CalamityKeybinds.SandCloakHotkey.JustPressed && sandCloak && Main.myPlayer == Player.whoAmI && rogueStealth >= rogueStealthMax * 0.25f && + if (CalamityKeybinds.SandCloakHotkey.JustPressed && sandCloak && Main.myPlayer == Player.whoAmI && rogueStealth >= rogueStealthMax * 0.1f && wearingRogueArmor && rogueStealthMax > 0 && !Player.HasCooldown(Cooldowns.SandCloak.ID)) { - Player.AddCooldown(Cooldowns.SandCloak.ID, CalamityUtils.SecondsToFrames(30)); + Player.AddCooldown(Cooldowns.SandCloak.ID, CalamityUtils.SecondsToFrames(25)); var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType())); - rogueStealth -= rogueStealthMax * 0.25f; - Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType(), 7, 8, Player.whoAmI); + rogueStealth -= rogueStealthMax * 0.1f; + int veil = Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType(), 7, 8, Player.whoAmI); + Main.projectile[veil].Center = Player.Center; SoundEngine.PlaySound(SoundID.Item45, Player.position); } if (CalamityKeybinds.SpectralVeilHotKey.JustPressed && spectralVeil && Main.myPlayer == Player.whoAmI && rogueStealth >= rogueStealthMax * 0.25f && @@ -3312,9 +3261,6 @@ namespace CalamityMod.CalPlayer if (Player.beetleOffense && Player.beetleOrbs > 0) meleeSpeedMult -= 0.1f * Player.beetleOrbs; - if (CalamityConfig.Instance.Proficiency) - meleeSpeedMult += GetMeleeSpeedBonus(); - if (GemTechSet && GemTechState.IsYellowGemActive) meleeSpeedMult += GemTechHeadgear.MeleeSpeedBoost; @@ -4385,38 +4331,6 @@ namespace CalamityMod.CalPlayer damage += defenseAdd; } #endregion - - if ((target.damage > 0 || target.boss) && !target.SpawnedFromStatue && Player.whoAmI == Main.myPlayer) - { - if (CalamityConfig.Instance.Proficiency && item.DamageType == DamageClass.Melee) - { - if (gainLevelCooldown <= 0) - { - gainLevelCooldown = 120; - if (meleeLevel <= 12500) - { - if (!ReduceCooldown((int)ClassType.Melee)) - { - if (!Main.hardMode && meleeLevel >= 1500) - gainLevelCooldown = 1200; //20 seconds - if (!NPC.downedMoonlord && meleeLevel >= 5500) - gainLevelCooldown = 2400; //40 seconds - } - else - gainLevelCooldown /= 2; - - if (fasterMeleeLevel) - gainLevelCooldown /= 2; - - meleeLevel++; - shootFireworksLevelUpMelee = true; - - if (Main.netMode == NetmodeID.MultiplayerClient) - SyncLevel(false, (int)ClassType.Melee); - } - } - } - } } public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) @@ -4424,7 +4338,7 @@ namespace CalamityMod.CalPlayer if (proj.npcProj || proj.trap) return; - bool isSummon = proj.IsSummon(); + bool isSummon = proj.CountsAsClass(); Item heldItem = Player.ActiveItem(); #region MultiplierBoosts @@ -4548,119 +4462,6 @@ namespace CalamityMod.CalPlayer // Handle on-hit ranged effects for the gem tech armor set. if (proj.CountsAsClass() && proj.type != ModContent.ProjectileType()) GemTechState.RangedOnHitEffects(target, damage); - - if ((target.damage > 0 || target.boss) && !target.SpawnedFromStatue && CalamityConfig.Instance.Proficiency) - { - if (gainLevelCooldown <= 0) //max is 12501 to avoid setting off fireworks forever - { - gainLevelCooldown = 120; //2 seconds - if (proj.CountsAsClass() && meleeLevel <= 12500) - { - if (!ReduceCooldown((int)ClassType.Melee)) - { - if (!Main.hardMode && meleeLevel >= 1500) - gainLevelCooldown = 1200; //20 seconds - if (!NPC.downedMoonlord && meleeLevel >= 5500) - gainLevelCooldown = 2400; //40 seconds - } - else - gainLevelCooldown /= 2; - - if (fasterMeleeLevel) - gainLevelCooldown /= 2; - - meleeLevel++; - shootFireworksLevelUpMelee = true; - - if (Main.netMode == NetmodeID.MultiplayerClient) - SyncLevel(false, (int)ClassType.Melee); - } - else if (proj.CountsAsClass() && rangedLevel <= 12500) - { - if (!ReduceCooldown((int)ClassType.Ranged)) - { - if (!Main.hardMode && rangedLevel >= 1500) - gainLevelCooldown = 1200; //20 seconds - if (!NPC.downedMoonlord && rangedLevel >= 5500) - gainLevelCooldown = 2400; //40 seconds - } - else - gainLevelCooldown /= 2; - - if (fasterRangedLevel) - gainLevelCooldown /= 2; - - rangedLevel++; - shootFireworksLevelUpRanged = true; - - if (Main.netMode == NetmodeID.MultiplayerClient) - SyncLevel(false, (int)ClassType.Ranged); - } - else if (proj.CountsAsClass() && magicLevel <= 12500) - { - if (!ReduceCooldown((int)ClassType.Magic)) - { - if (!Main.hardMode && magicLevel >= 1500) - gainLevelCooldown = 1200; //20 seconds - if (!NPC.downedMoonlord && magicLevel >= 5500) - gainLevelCooldown = 2400; //40 seconds - } - else - gainLevelCooldown /= 2; - - if (fasterMagicLevel) - gainLevelCooldown /= 2; - - magicLevel++; - shootFireworksLevelUpMagic = true; - - if (Main.netMode == NetmodeID.MultiplayerClient) - SyncLevel(false, (int)ClassType.Magic); - } - else if (proj.IsSummon() && summonLevel <= 12500) - { - if (!ReduceCooldown((int)ClassType.Summon)) - { - if (!Main.hardMode && summonLevel >= 1500) - gainLevelCooldown = 1200; //20 seconds - if (!NPC.downedMoonlord && summonLevel >= 5500) - gainLevelCooldown = 2400; //40 seconds - } - else - gainLevelCooldown /= 2; - - if (fasterSummonLevel) - gainLevelCooldown /= 2; - - summonLevel++; - shootFireworksLevelUpSummon = true; - - if (Main.netMode == NetmodeID.MultiplayerClient) - SyncLevel(false, (int)ClassType.Summon); - } - else if (proj.CountsAsClass() && rogueLevel <= 12500) - { - if (!ReduceCooldown((int)ClassType.Rogue)) - { - if (!Main.hardMode && rogueLevel >= 1500) - gainLevelCooldown = 1200; //20 seconds - if (!NPC.downedMoonlord && rogueLevel >= 5500) - gainLevelCooldown = 2400; //40 seconds - } - else - gainLevelCooldown /= 2; - - if (fasterRogueLevel) - gainLevelCooldown /= 2; - - rogueLevel++; - shootFireworksLevelUpRogue = true; - - if (Main.netMode == NetmodeID.MultiplayerClient) - SyncLevel(false, (int)ClassType.Rogue); - } - } - } } #endregion @@ -6681,7 +6482,7 @@ namespace CalamityMod.CalPlayer stealthStrikeThisFrame = false; stealthStrikeHalfCost = false; stealthStrike75Cost = false; - stealthStrikeAlwaysCrits = false; + stealthStrike90Cost = false; // stealthAcceleration only resets if you don't have either of the accelerator accessories equipped if (!darkGodSheath && !eclipseMirror) @@ -6792,11 +6593,6 @@ namespace CalamityMod.CalPlayer double stealthAddedDamage = rogueStealth * BalancingConstants.UniversalStealthStrikeDamageFactor * useTimeFactor * stealthGenFactor; stealthDamage += (float)stealthAddedDamage; - // Show 100% crit chance if your stealth strikes always crit. - // In practice, this is only for visuals because Terraria determines crit status on hit. - if (stealthStrikeAlwaysCrits && StealthStrikeAvailable()) - Player.GetCritChance() = 100f; - // Stealth slightly decreases aggro. Player.aggro -= (int)(rogueStealth * 300f); } @@ -6813,32 +6609,22 @@ namespace CalamityMod.CalPlayer if (Player.itemAnimation > 0 || finalDawnProjCount > 0) return 0f; - // Penumbra Potion provides various boosts to rogue stealth generation if (penumbra) { - if (Main.eclipse || umbraphileSet) - { - stealthGenStandstill += 0.2f; - stealthGenMoving += 0.2f; - } - else if (!Main.dayTime) - { - stealthGenStandstill += 0.15f; - stealthGenMoving += 0.15f; - } - else // daytime - stealthGenMoving += 0.15f; + stealthGenStandstill += 0.15f; + stealthGenMoving += 0.1f; } - if (CalamityLists.daggerList.Contains(Player.ActiveItem().type) && Player.invis) + if (Player.invis || shadow) { stealthGenStandstill += 0.08f; stealthGenMoving += 0.08f; } - if (shadow) + + if (eArtifact) { - stealthGenStandstill += 0.1f; - stealthGenMoving += 0.1f; + stealthGenStandstill += 0.1f; + stealthGenMoving += 0.1f; } //Accessory modifiers can boost these stats @@ -6891,6 +6677,8 @@ namespace CalamityMod.CalPlayer consumptionMult = 0.5f; else if (stealthStrike75Cost) consumptionMult = 0.75f; + else if (stealthStrike90Cost) + consumptionMult = 0.9f; return rogueStealth >= rogueStealthMax * consumptionMult; } @@ -6917,941 +6705,17 @@ namespace CalamityMod.CalPlayer if (rogueStealth <= 0f) rogueStealth = 0f; } + else if (stealthStrike90Cost) + { + rogueStealth -= 0.9f * stealthToLose; + if (rogueStealth <= 0f) + rogueStealth = 0f; + } else rogueStealth = remainingStealth; } #endregion - #region Proficiency Stuff - private bool ReduceCooldown(int classType) - { - switch (classType) - { - case (int)ClassType.Melee: - - if (meleeLevel < levelTier3 && (rangedLevel >= levelTier3 || magicLevel >= levelTier3 || summonLevel >= levelTier3 || rogueLevel >= levelTier3)) - return true; - if (meleeLevel < levelTier2 && (rangedLevel >= levelTier2 || magicLevel >= levelTier2 || summonLevel >= levelTier2 || rogueLevel >= levelTier2)) - return true; - if (meleeLevel < levelTier1 && (rangedLevel >= levelTier1 || magicLevel >= levelTier1 || summonLevel >= levelTier1 || rogueLevel >= levelTier1)) - return true; - - break; - - case (int)ClassType.Ranged: - - if (rangedLevel < levelTier3 && (meleeLevel >= levelTier3 || magicLevel >= levelTier3 || summonLevel >= levelTier3 || rogueLevel >= levelTier3)) - return true; - if (rangedLevel < levelTier2 && (meleeLevel >= levelTier2 || magicLevel >= levelTier2 || summonLevel >= levelTier2 || rogueLevel >= levelTier2)) - return true; - if (rangedLevel < levelTier1 && (meleeLevel >= levelTier1 || magicLevel >= levelTier1 || summonLevel >= levelTier1 || rogueLevel >= levelTier1)) - return true; - - break; - - case (int)ClassType.Magic: - - if (magicLevel < levelTier3 && (rangedLevel >= levelTier3 || meleeLevel >= levelTier3 || summonLevel >= levelTier3 || rogueLevel >= levelTier3)) - return true; - if (magicLevel < levelTier2 && (rangedLevel >= levelTier2 || meleeLevel >= levelTier2 || summonLevel >= levelTier2 || rogueLevel >= levelTier2)) - return true; - if (magicLevel < levelTier1 && (rangedLevel >= levelTier1 || meleeLevel >= levelTier1 || summonLevel >= levelTier1 || rogueLevel >= levelTier1)) - return true; - - break; - - case (int)ClassType.Summon: - - if (summonLevel < levelTier3 && (rangedLevel >= levelTier3 || magicLevel >= levelTier3 || meleeLevel >= levelTier3 || rogueLevel >= levelTier3)) - return true; - if (summonLevel < levelTier2 && (rangedLevel >= levelTier2 || magicLevel >= levelTier2 || meleeLevel >= levelTier2 || rogueLevel >= levelTier2)) - return true; - if (summonLevel < levelTier1 && (rangedLevel >= levelTier1 || magicLevel >= levelTier1 || meleeLevel >= levelTier1 || rogueLevel >= levelTier1)) - return true; - - break; - - case (int)ClassType.Rogue: - - if (rogueLevel < levelTier3 && (rangedLevel >= levelTier3 || magicLevel >= levelTier3 || summonLevel >= levelTier3 || meleeLevel >= levelTier3)) - return true; - if (rogueLevel < levelTier2 && (rangedLevel >= levelTier2 || magicLevel >= levelTier2 || summonLevel >= levelTier2 || meleeLevel >= levelTier2)) - return true; - if (rogueLevel < levelTier1 && (rangedLevel >= levelTier1 || magicLevel >= levelTier1 || summonLevel >= levelTier1 || meleeLevel >= levelTier1)) - return true; - - break; - } - return false; - } - - public void GetExactLevelUp() - { - if (gainLevelCooldown > 0) - gainLevelCooldown--; - - #region MeleeLevels - switch (meleeLevel) - { - case 100: - ExactLevelUp(0, 1, false); - break; - case 300: - ExactLevelUp(0, 2, false); - break; - case 600: - ExactLevelUp(0, 3, false); - break; - case 1000: - ExactLevelUp(0, 4, false); - break; - case 1500: - ExactLevelUp(0, 5, false); - break; - case 2100: - ExactLevelUp(0, 6, false); - break; - case 2800: - ExactLevelUp(0, 7, false); - break; - case 3600: - ExactLevelUp(0, 8, false); - break; - case 4500: - ExactLevelUp(0, 9, false); - break; - case 5500: - ExactLevelUp(0, 10, false); - break; - case 6600: - ExactLevelUp(0, 11, false); - break; - case 7800: - ExactLevelUp(0, 12, false); - break; - case 9100: - ExactLevelUp(0, 13, false); - break; - case 10500: - ExactLevelUp(0, 14, false); - break; - case 12500: //celebration or some shit for final level, yay - ExactLevelUp(0, 15, true); - break; - default: - break; - } - #endregion - - #region RangedLevels - switch (rangedLevel) - { - case 100: - ExactLevelUp(1, 1, false); - break; - case 300: - ExactLevelUp(1, 2, false); - break; - case 600: - ExactLevelUp(1, 3, false); - break; - case 1000: - ExactLevelUp(1, 4, false); - break; - case 1500: - ExactLevelUp(1, 5, false); - break; - case 2100: - ExactLevelUp(1, 6, false); - break; - case 2800: - ExactLevelUp(1, 7, false); - break; - case 3600: - ExactLevelUp(1, 8, false); - break; - case 4500: - ExactLevelUp(1, 9, false); - break; - case 5500: - ExactLevelUp(1, 10, false); - break; - case 6600: - ExactLevelUp(1, 11, false); - break; - case 7800: - ExactLevelUp(1, 12, false); - break; - case 9100: - ExactLevelUp(1, 13, false); - break; - case 10500: - ExactLevelUp(1, 14, false); - break; - case 12500: //celebration or some shit for final level, yay - ExactLevelUp(1, 15, true); - break; - default: - break; - } - #endregion - - #region MagicLevels - switch (magicLevel) - { - case 100: - ExactLevelUp(2, 1, false); - break; - case 300: - ExactLevelUp(2, 2, false); - break; - case 600: - ExactLevelUp(2, 3, false); - break; - case 1000: - ExactLevelUp(2, 4, false); - break; - case 1500: - ExactLevelUp(2, 5, false); - break; - case 2100: - ExactLevelUp(2, 6, false); - break; - case 2800: - ExactLevelUp(2, 7, false); - break; - case 3600: - ExactLevelUp(2, 8, false); - break; - case 4500: - ExactLevelUp(2, 9, false); - break; - case 5500: - ExactLevelUp(2, 10, false); - break; - case 6600: - ExactLevelUp(2, 11, false); - break; - case 7800: - ExactLevelUp(2, 12, false); - break; - case 9100: - ExactLevelUp(2, 13, false); - break; - case 10500: - ExactLevelUp(2, 14, false); - break; - case 12500: //celebration or some shit for final level, yay - ExactLevelUp(2, 15, true); - break; - default: - break; - } - #endregion - - #region SummonLevels - switch (summonLevel) - { - case 100: - ExactLevelUp(3, 1, false); - break; - case 300: - ExactLevelUp(3, 2, false); - break; - case 600: - ExactLevelUp(3, 3, false); - break; - case 1000: - ExactLevelUp(3, 4, false); - break; - case 1500: - ExactLevelUp(3, 5, false); - break; - case 2100: - ExactLevelUp(3, 6, false); - break; - case 2800: - ExactLevelUp(3, 7, false); - break; - case 3600: - ExactLevelUp(3, 8, false); - break; - case 4500: - ExactLevelUp(3, 9, false); - break; - case 5500: - ExactLevelUp(3, 10, false); - break; - case 6600: - ExactLevelUp(3, 11, false); - break; - case 7800: - ExactLevelUp(3, 12, false); - break; - case 9100: - ExactLevelUp(3, 13, false); - break; - case 10500: - ExactLevelUp(3, 14, false); - break; - case 12500: //celebration or some shit for final level, yay - ExactLevelUp(3, 15, true); - break; - default: - break; - } - #endregion - - #region RogueLevels - switch (rogueLevel) - { - case 100: - ExactLevelUp(4, 1, false); - break; - case 300: - ExactLevelUp(4, 2, false); - break; - case 600: - ExactLevelUp(4, 3, false); - break; - case 1000: - ExactLevelUp(4, 4, false); - break; - case 1500: - ExactLevelUp(4, 5, false); - break; - case 2100: - ExactLevelUp(4, 6, false); - break; - case 2800: - ExactLevelUp(4, 7, false); - break; - case 3600: - ExactLevelUp(4, 8, false); - break; - case 4500: - ExactLevelUp(4, 9, false); - break; - case 5500: - ExactLevelUp(4, 10, false); - break; - case 6600: - ExactLevelUp(4, 11, false); - break; - case 7800: - ExactLevelUp(4, 12, false); - break; - case 9100: - ExactLevelUp(4, 13, false); - break; - case 10500: - ExactLevelUp(4, 14, false); - break; - case 12500: //celebration or some shit for final level, yay - ExactLevelUp(4, 15, true); - break; - default: - break; - } - #endregion - } - - private void ExactLevelUp(int levelUpType, int level, bool final) - { - var source = new ProjectileSource_LevelUp(Player); - Color messageColor = Color.Orange; - switch (levelUpType) - { - case 0: - exactMeleeLevel = level; - if (shootFireworksLevelUpMelee) - { - string key = final ? "Mods.CalamityMod.MeleeLevelUpFinal" : "Mods.CalamityMod.MeleeLevelUp"; - shootFireworksLevelUpMelee = false; - if (Player.whoAmI == Main.myPlayer) - { - if (final) - { - int prof = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -5f, ProjectileID.RocketFireworkRed + Main.rand.Next(4), - 0, 0f, Main.myPlayer, 0f, 1f); - // Main.projectile[prof].ranged = false /* tModPorter - this is redundant, for more info see https://github.com/tModLoader/tModLoader/wiki/Update-Migration-Guide#damage-classes */ ; - } - else - { - int prof = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -5f, ProjectileID.RocketFireworksBoxRed + Main.rand.Next(4), - 0, 0f, Main.myPlayer, 0f, 0f); - // Main.projectile[prof].ranged = false /* tModPorter - this is redundant, for more info see https://github.com/tModLoader/tModLoader/wiki/Update-Migration-Guide#damage-classes */ ; - } - Main.NewText(Language.GetTextValue(key), messageColor); - } - } - break; - case 1: - exactRangedLevel = level; - if (shootFireworksLevelUpRanged) - { - string key = final ? "Mods.CalamityMod.RangedLevelUpFinal" : "Mods.CalamityMod.RangedLevelUp"; - messageColor = Color.GreenYellow; - shootFireworksLevelUpRanged = false; - if (Player.whoAmI == Main.myPlayer) - { - if (final) - { - int prof = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -5f, ProjectileID.RocketFireworkRed + Main.rand.Next(4), - 0, 0f, Main.myPlayer, 0f, 1f); - // Main.projectile[prof].ranged = false /* tModPorter - this is redundant, for more info see https://github.com/tModLoader/tModLoader/wiki/Update-Migration-Guide#damage-classes */ ; - } - else - { - int prof = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -5f, ProjectileID.RocketFireworksBoxRed + Main.rand.Next(4), - 0, 0f, Main.myPlayer, 0f, 0f); - // Main.projectile[prof].ranged = false /* tModPorter - this is redundant, for more info see https://github.com/tModLoader/tModLoader/wiki/Update-Migration-Guide#damage-classes */ ; - } - Main.NewText(Language.GetTextValue(key), messageColor); - } - } - break; - case 2: - exactMagicLevel = level; - if (shootFireworksLevelUpMagic) - { - string key = final ? "Mods.CalamityMod.MagicLevelUpFinal" : "Mods.CalamityMod.MagicLevelUp"; - messageColor = Color.DodgerBlue; - shootFireworksLevelUpMagic = false; - if (Player.whoAmI == Main.myPlayer) - { - if (final) - { - int prof = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -5f, ProjectileID.RocketFireworkRed + Main.rand.Next(4), - 0, 0f, Main.myPlayer, 0f, 1f); - // Main.projectile[prof].ranged = false /* tModPorter - this is redundant, for more info see https://github.com/tModLoader/tModLoader/wiki/Update-Migration-Guide#damage-classes */ ; - } - else - { - int prof = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -5f, ProjectileID.RocketFireworksBoxRed + Main.rand.Next(4), - 0, 0f, Main.myPlayer, 0f, 0f); - // Main.projectile[prof].ranged = false /* tModPorter - this is redundant, for more info see https://github.com/tModLoader/tModLoader/wiki/Update-Migration-Guide#damage-classes */ ; - } - Main.NewText(Language.GetTextValue(key), messageColor); - } - } - break; - case 3: - exactSummonLevel = level; - if (shootFireworksLevelUpSummon) - { - string key = final ? "Mods.CalamityMod.SummonLevelUpFinal" : "Mods.CalamityMod.SummonLevelUp"; - messageColor = Color.Aquamarine; - shootFireworksLevelUpSummon = false; - if (Player.whoAmI == Main.myPlayer) - { - if (final) - { - int prof = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -5f, ProjectileID.RocketFireworkRed + Main.rand.Next(4), - 0, 0f, Main.myPlayer, 0f, 1f); - // Main.projectile[prof].ranged = false /* tModPorter - this is redundant, for more info see https://github.com/tModLoader/tModLoader/wiki/Update-Migration-Guide#damage-classes */ ; - } - else - { - int prof = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -5f, ProjectileID.RocketFireworksBoxRed + Main.rand.Next(4), - 0, 0f, Main.myPlayer, 0f, 0f); - // Main.projectile[prof].ranged = false /* tModPorter - this is redundant, for more info see https://github.com/tModLoader/tModLoader/wiki/Update-Migration-Guide#damage-classes */ ; - } - Main.NewText(Language.GetTextValue(key), messageColor); - } - } - break; - case 4: - exactRogueLevel = level; - if (shootFireworksLevelUpRogue) - { - string key = final ? "Mods.CalamityMod.RogueLevelUpFinal" : "Mods.CalamityMod.RogueLevelUp"; - messageColor = Color.Orchid; - shootFireworksLevelUpRogue = false; - if (Player.whoAmI == Main.myPlayer) - { - if (final) - { - int prof = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -5f, ProjectileID.RocketFireworkRed + Main.rand.Next(4), - 0, 0f, Main.myPlayer, 0f, 1f); - // Main.projectile[prof].ranged = false /* tModPorter - this is redundant, for more info see https://github.com/tModLoader/tModLoader/wiki/Update-Migration-Guide#damage-classes */ ; - } - else - { - int prof = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -5f, ProjectileID.RocketFireworksBoxRed + Main.rand.Next(4), - 0, 0f, Main.myPlayer, 0f, 0f); - // Main.projectile[prof].ranged = false /* tModPorter - this is redundant, for more info see https://github.com/tModLoader/tModLoader/wiki/Update-Migration-Guide#damage-classes */ ; - } - Main.NewText(Language.GetTextValue(key), messageColor); - } - } - break; - } - if (Main.netMode == NetmodeID.MultiplayerClient) - { - SyncExactLevel(false, levelUpType); - } - } - - public void GetStatBonuses() - { - #region MeleeLevelBoosts - if (meleeLevel >= 12500) - { - Player.GetDamage() += 0.06f; - Player.GetCritChance() += 3; - } - else if (meleeLevel >= 10500) - { - Player.GetDamage() += 0.06f; - Player.GetCritChance() += 3; - } - else if (meleeLevel >= 9100) - { - Player.GetDamage() += 0.06f; - Player.GetCritChance() += 3; - } - else if (meleeLevel >= 7800) - { - Player.GetDamage() += 0.05f; - Player.GetCritChance() += 3; - } - else if (meleeLevel >= 6600) - { - Player.GetDamage() += 0.05f; - Player.GetCritChance() += 3; - } - else if (meleeLevel >= 5500) //hm limit - { - Player.GetDamage() += 0.05f; - Player.GetCritChance() += 2; - } - else if (meleeLevel >= 4500) - { - Player.GetDamage() += 0.05f; - Player.GetCritChance() += 2; - } - else if (meleeLevel >= 3600) - { - Player.GetDamage() += 0.04f; - Player.GetCritChance() += 2; - } - else if (meleeLevel >= 2800) - { - Player.GetDamage() += 0.04f; - Player.GetCritChance() += 1; - } - else if (meleeLevel >= 2100) - { - Player.GetDamage() += 0.04f; - Player.GetCritChance() += 1; - } - else if (meleeLevel >= 1500) //prehm limit - { - Player.GetDamage() += 0.03f; - Player.GetCritChance() += 1; - } - else if (meleeLevel >= 1000) - { - Player.GetDamage() += 0.02f; - Player.GetCritChance() += 1; - } - else if (meleeLevel >= 600) - { - Player.GetDamage() += 0.02f; - } - else if (meleeLevel >= 300) - Player.GetDamage() += 0.02f; - else if (meleeLevel >= 100) - Player.GetDamage() += 0.01f; - #endregion - - #region RangedLevelBoosts - if (rangedLevel >= 12500) - { - Player.GetDamage() += 0.06f; - Player.moveSpeed += 0.06f; - Player.GetCritChance() += 3; - } - else if (rangedLevel >= 10500) - { - Player.GetDamage() += 0.05f; - Player.moveSpeed += 0.06f; - Player.GetCritChance() += 3; - } - else if (rangedLevel >= 9100) - { - Player.GetDamage() += 0.05f; - Player.moveSpeed += 0.05f; - Player.GetCritChance() += 3; - } - else if (rangedLevel >= 7800) - { - Player.GetDamage() += 0.04f; - Player.moveSpeed += 0.05f; - Player.GetCritChance() += 3; - } - else if (rangedLevel >= 6600) - { - Player.GetDamage() += 0.04f; - Player.moveSpeed += 0.04f; - Player.GetCritChance() += 3; - } - else if (rangedLevel >= 5500) - { - Player.GetDamage() += 0.04f; - Player.moveSpeed += 0.04f; - Player.GetCritChance() += 2; - } - else if (rangedLevel >= 4500) - { - Player.GetDamage() += 0.03f; - Player.moveSpeed += 0.04f; - Player.GetCritChance() += 2; - } - else if (rangedLevel >= 3600) - { - Player.GetDamage() += 0.03f; - Player.moveSpeed += 0.03f; - Player.GetCritChance() += 2; - } - else if (rangedLevel >= 2800) - { - Player.GetDamage() += 0.02f; - Player.moveSpeed += 0.03f; - Player.GetCritChance() += 2; - } - else if (rangedLevel >= 2100) - { - Player.GetDamage() += 0.02f; - Player.moveSpeed += 0.03f; - Player.GetCritChance() += 1; - } - else if (rangedLevel >= 1500) - { - Player.GetDamage() += 0.02f; - Player.moveSpeed += 0.02f; - Player.GetCritChance() += 1; - } - else if (rangedLevel >= 1000) - { - Player.GetDamage() += 0.02f; - Player.moveSpeed += 0.01f; - Player.GetCritChance() += 1; - } - else if (rangedLevel >= 600) - { - Player.GetDamage() += 0.02f; - Player.GetCritChance() += 1; - } - else if (rangedLevel >= 300) - Player.GetDamage() += 0.02f; - else if (rangedLevel >= 100) - Player.GetDamage() += 0.01f; - #endregion - - #region MagicLevelBoosts - if (magicLevel >= 12500) - { - Player.GetDamage() += 0.06f; - Player.manaCost *= 0.94f; - Player.GetCritChance() += 3; - } - else if (magicLevel >= 10500) - { - Player.GetDamage() += 0.05f; - Player.manaCost *= 0.94f; - Player.GetCritChance() += 3; - } - else if (magicLevel >= 9100) - { - Player.GetDamage() += 0.05f; - Player.manaCost *= 0.95f; - Player.GetCritChance() += 3; - } - else if (magicLevel >= 7800) - { - Player.GetDamage() += 0.04f; - Player.manaCost *= 0.95f; - Player.GetCritChance() += 3; - } - else if (magicLevel >= 6600) - { - Player.GetDamage() += 0.04f; - Player.manaCost *= 0.96f; - Player.GetCritChance() += 3; - } - else if (magicLevel >= 5500) - { - Player.GetDamage() += 0.04f; - Player.manaCost *= 0.96f; - Player.GetCritChance() += 2; - } - else if (magicLevel >= 4500) - { - Player.GetDamage() += 0.04f; - Player.manaCost *= 0.97f; - Player.GetCritChance() += 2; - } - else if (magicLevel >= 3600) - { - Player.GetDamage() += 0.03f; - Player.manaCost *= 0.97f; - Player.GetCritChance() += 2; - } - else if (magicLevel >= 2800) - { - Player.GetDamage() += 0.03f; - Player.manaCost *= 0.98f; - Player.GetCritChance() += 2; - } - else if (magicLevel >= 2100) - { - Player.GetDamage() += 0.03f; - Player.manaCost *= 0.98f; - Player.GetCritChance() += 1; - } - else if (magicLevel >= 1500) - { - Player.GetDamage() += 0.02f; - Player.manaCost *= 0.98f; - Player.GetCritChance() += 1; - } - else if (magicLevel >= 1000) - { - Player.GetDamage() += 0.02f; - Player.manaCost *= 0.99f; - Player.GetCritChance() += 1; - } - else if (magicLevel >= 600) - { - Player.GetDamage() += 0.02f; - Player.manaCost *= 0.99f; - } - else if (magicLevel >= 300) - Player.GetDamage() += 0.02f; - else if (magicLevel >= 100) - Player.GetDamage() += 0.01f; - #endregion - - #region SummonLevelBoosts - if (summonLevel >= 12500) - { - Player.GetDamage() += 0.12f; - Player.GetKnockback(DamageClass.Summon) += 3.0f; - } - else if (summonLevel >= 10500) - { - Player.GetDamage() += 0.1f; - Player.GetKnockback(DamageClass.Summon) += 3.0f; - } - else if (summonLevel >= 9100) - { - Player.GetDamage() += 0.09f; - Player.GetKnockback(DamageClass.Summon) += 2.7f; - } - else if (summonLevel >= 7800) - { - Player.GetDamage() += 0.08f; - Player.GetKnockback(DamageClass.Summon) += 2.4f; - } - else if (summonLevel >= 6600) - { - Player.GetDamage() += 0.07f; - Player.GetKnockback(DamageClass.Summon) += 2.1f; - } - else if (summonLevel >= 5500) - { - Player.GetDamage() += 0.07f; - Player.GetKnockback(DamageClass.Summon) += 1.8f; - } - else if (summonLevel >= 4500) - { - Player.GetDamage() += 0.06f; - Player.GetKnockback(DamageClass.Summon) += 1.8f; - } - else if (summonLevel >= 3600) - { - Player.GetDamage() += 0.05f; - Player.GetKnockback(DamageClass.Summon) += 1.5f; - } - else if (summonLevel >= 2800) - { - Player.GetDamage() += 0.04f; - Player.GetKnockback(DamageClass.Summon) += 1.2f; - } - else if (summonLevel >= 2100) - { - Player.GetDamage() += 0.04f; - Player.GetKnockback(DamageClass.Summon) += 0.9f; - } - else if (summonLevel >= 1500) - { - Player.GetDamage() += 0.03f; - Player.GetKnockback(DamageClass.Summon) += 0.6f; - } - else if (summonLevel >= 1000) - { - Player.GetDamage() += 0.03f; - Player.GetKnockback(DamageClass.Summon) += 0.3f; - } - else if (summonLevel >= 600) - { - Player.GetDamage() += 0.02f; - Player.GetKnockback(DamageClass.Summon) += 0.3f; - } - else if (summonLevel >= 300) - Player.GetDamage() += 0.02f; - else if (summonLevel >= 100) - Player.GetDamage() += 0.01f; - #endregion - - #region RogueLevelBoosts - ref StatModifier throwingDamage = ref Player.GetDamage(); - ref float throwingCrit = ref Player.GetCritChance(); - if (rogueLevel >= 12500) - { - throwingDamage += 0.06f; - rogueVelocity += 0.06f; - throwingCrit += 3; - } - else if (rogueLevel >= 10500) - { - throwingDamage += 0.05f; - rogueVelocity += 0.06f; - throwingCrit += 3; - } - else if (rogueLevel >= 9100) - { - throwingDamage += 0.05f; - rogueVelocity += 0.05f; - throwingCrit += 3; - } - else if (rogueLevel >= 7800) - { - throwingDamage += 0.04f; - rogueVelocity += 0.05f; - throwingCrit += 3; - } - else if (rogueLevel >= 6600) - { - throwingDamage += 0.04f; - rogueVelocity += 0.04f; - throwingCrit += 3; - } - else if (rogueLevel >= 5500) - { - throwingDamage += 0.04f; - rogueVelocity += 0.04f; - throwingCrit += 2; - } - else if (rogueLevel >= 4500) - { - throwingDamage += 0.03f; - rogueVelocity += 0.04f; - throwingCrit += 2; - } - else if (rogueLevel >= 3600) - { - throwingDamage += 0.03f; - rogueVelocity += 0.03f; - throwingCrit += 2; - } - else if (rogueLevel >= 2800) - { - throwingDamage += 0.03f; - rogueVelocity += 0.03f; - throwingCrit += 1; - } - else if (rogueLevel >= 2100) - { - throwingDamage += 0.02f; - rogueVelocity += 0.03f; - throwingCrit += 1; - } - else if (rogueLevel >= 1500) - { - throwingDamage += 0.02f; - rogueVelocity += 0.02f; - throwingCrit += 1; - } - else if (rogueLevel >= 1000) - { - throwingDamage += 0.02f; - rogueVelocity += 0.01f; - throwingCrit += 1; - } - else if (rogueLevel >= 600) - { - throwingDamage += 0.02f; - rogueVelocity += 0.01f; - } - else if (rogueLevel >= 300) - throwingDamage += 0.02f; - else if (rogueLevel >= 100) - throwingDamage += 0.01f; - #endregion - } - - private float GetMeleeSpeedBonus() - { - float meleeSpeedBonus = 0f; - if (meleeLevel >= 12500) - { - meleeSpeedBonus += 0.06f; - } - else if (meleeLevel >= 10500) - { - meleeSpeedBonus += 0.05f; - } - else if (meleeLevel >= 9100) - { - meleeSpeedBonus += 0.04f; - } - else if (meleeLevel >= 7800) - { - meleeSpeedBonus += 0.04f; - } - else if (meleeLevel >= 6600) - { - meleeSpeedBonus += 0.03f; - } - else if (meleeLevel >= 5500) //hm limit - { - meleeSpeedBonus += 0.03f; - } - else if (meleeLevel >= 4500) - { - meleeSpeedBonus += 0.02f; - } - else if (meleeLevel >= 3600) - { - meleeSpeedBonus += 0.02f; - } - else if (meleeLevel >= 2800) - { - meleeSpeedBonus += 0.02f; - } - else if (meleeLevel >= 2100) - { - meleeSpeedBonus += 0.01f; - } - else if (meleeLevel >= 1500) //prehm limit - { - meleeSpeedBonus += 0.01f; - } - else if (meleeLevel >= 1000) - { - meleeSpeedBonus += 0.01f; - } - else if (meleeLevel >= 600) - { - meleeSpeedBonus += 0.01f; - } - return meleeSpeedBonus; - } - #endregion - #region Profaned Soul Crystal Stuffs internal void rollBabSpears(int randAmt, bool chaseable) diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index a9ad711658..01a9230036 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -544,6 +544,12 @@ namespace CalamityMod.CalPlayer drawInfo.GoreCache.Add(heart); } } + if (calamityPlayer.shadow && CalamityConfig.Instance.StealthInvisibility) + { + r *= 0f; + g *= 0f; + b *= 0f; + } } #endregion diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 3486e52654..8b406eb8e3 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -670,10 +670,6 @@ namespace CalamityMod.CalPlayer } } - // Proficiency level ups - if (CalamityConfig.Instance.Proficiency) - GetExactLevelUp(); - // Max mana bonuses Player.statManaMax2 += (permafrostsConcoction ? 50 : 0) + @@ -1101,6 +1097,8 @@ namespace CalamityMod.CalPlayer silvaMageCooldown--; if (tarraMageHealCooldown > 0) tarraMageHealCooldown--; + if (scuttlerCooldown > 0) + scuttlerCooldown--; if (rogueCrownCooldown > 0) rogueCrownCooldown--; if (spectralVeilImmunity > 0) @@ -2570,18 +2568,6 @@ namespace CalamityMod.CalPlayer if (CalamityLists.highTestFishList.Contains(Player.ActiveItem().type)) Player.accFishingLine = true; - if (CalamityLists.boomerangList.Contains(Player.ActiveItem().type) && Player.invis) - Player.GetDamage() += 0.1f; - - if (CalamityLists.javelinList.Contains(Player.ActiveItem().type) && Player.invis) - Player.GetArmorPenetration() += 5; - - if (CalamityLists.flaskBombList.Contains(Player.ActiveItem().type) && Player.invis) - rogueVelocity += 0.1f; - - if (CalamityLists.spikyBallList.Contains(Player.ActiveItem().type) && Player.invis) - Player.GetCritChance() += 10; - if (planarSpeedBoost != 0) { if (Player.ActiveItem().type != ModContent.ItemType()) @@ -3126,7 +3112,6 @@ namespace CalamityMod.CalPlayer if (eArtifact) { Player.manaCost *= 0.85f; - Player.GetDamage() += 0.15f; Player.maxMinions += 2; } @@ -3488,9 +3473,6 @@ namespace CalamityMod.CalPlayer Player.GetCritChance() += 5; } - if (CalamityConfig.Instance.Proficiency) - GetStatBonuses(); - // Amalgam boosts if (Main.myPlayer == Player.whoAmI) { diff --git a/CalPlayer/CalamityPlayerNetcode.cs b/CalPlayer/CalamityPlayerNetcode.cs index e0f9b5a105..738d01da03 100644 --- a/CalPlayer/CalamityPlayerNetcode.cs +++ b/CalPlayer/CalamityPlayerNetcode.cs @@ -22,16 +22,6 @@ namespace CalamityMod.CalPlayer private void EnterWorldSync() { StandardSync(); - SyncExactLevel(false, 0); - SyncExactLevel(false, 1); - SyncExactLevel(false, 2); - SyncExactLevel(false, 3); - SyncExactLevel(false, 4); - SyncLevel(false, 0); - SyncLevel(false, 1); - SyncLevel(false, 2); - SyncLevel(false, 3); - SyncLevel(false, 4); } internal void MouseControlsSync() @@ -42,74 +32,6 @@ namespace CalamityMod.CalPlayer #endregion #region Creating and Sending Packets - private void SyncExactLevel(bool server, int levelType) - { - ModPacket packet = Mod.GetPacket(); - switch (levelType) - { - case 0: - packet.Write((byte)CalamityModMessageType.ExactMeleeLevelSync); - packet.Write(Player.whoAmI); - packet.Write(exactMeleeLevel); - break; - case 1: - packet.Write((byte)CalamityModMessageType.ExactRangedLevelSync); - packet.Write(Player.whoAmI); - packet.Write(exactRangedLevel); - break; - case 2: - packet.Write((byte)CalamityModMessageType.ExactMagicLevelSync); - packet.Write(Player.whoAmI); - packet.Write(exactMagicLevel); - break; - case 3: - packet.Write((byte)CalamityModMessageType.ExactSummonLevelSync); - packet.Write(Player.whoAmI); - packet.Write(exactSummonLevel); - break; - case 4: - packet.Write((byte)CalamityModMessageType.ExactRogueLevelSync); - packet.Write(Player.whoAmI); - packet.Write(exactRogueLevel); - break; - } - Player.SendPacket(packet, server); - } - - private void SyncLevel(bool server, int levelType) - { - ModPacket packet = Mod.GetPacket(256); - switch (levelType) - { - case 0: - packet.Write((byte)CalamityModMessageType.MeleeLevelSync); - packet.Write(Player.whoAmI); - packet.Write(meleeLevel); - break; - case 1: - packet.Write((byte)CalamityModMessageType.RangedLevelSync); - packet.Write(Player.whoAmI); - packet.Write(rangedLevel); - break; - case 2: - packet.Write((byte)CalamityModMessageType.MagicLevelSync); - packet.Write(Player.whoAmI); - packet.Write(magicLevel); - break; - case 3: - packet.Write((byte)CalamityModMessageType.SummonLevelSync); - packet.Write(Player.whoAmI); - packet.Write(summonLevel); - break; - case 4: - packet.Write((byte)CalamityModMessageType.RogueLevelSync); - packet.Write(Player.whoAmI); - packet.Write(rogueLevel); - break; - } - Player.SendPacket(packet, server); - } - public void SyncDefenseDamage(bool server) { ModPacket packet = Mod.GetPacket(256); @@ -207,56 +129,6 @@ namespace CalamityMod.CalPlayer #endregion #region Reading and Handling Packets - internal void HandleExactLevels(BinaryReader reader, int levelType) - { - switch (levelType) - { - case 0: - exactMeleeLevel = reader.ReadInt32(); - break; - case 1: - exactRangedLevel = reader.ReadInt32(); - break; - case 2: - exactMagicLevel = reader.ReadInt32(); - break; - case 3: - exactSummonLevel = reader.ReadInt32(); - break; - case 4: - exactRogueLevel = reader.ReadInt32(); - break; - } - - if (Main.netMode == NetmodeID.Server) - SyncExactLevel(true, levelType); - } - - internal void HandleLevels(BinaryReader reader, int levelType) - { - switch (levelType) - { - case 0: - meleeLevel = reader.ReadInt32(); - break; - case 1: - rangedLevel = reader.ReadInt32(); - break; - case 2: - magicLevel = reader.ReadInt32(); - break; - case 3: - summonLevel = reader.ReadInt32(); - break; - case 4: - rogueLevel = reader.ReadInt32(); - break; - } - - if (Main.netMode == NetmodeID.Server) - SyncLevel(true, levelType); - } - internal void HandleRage(BinaryReader reader) { rage = reader.ReadSingle(); diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index f0956e2507..87659207b6 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -393,7 +393,7 @@ namespace CalamityMod.CalPlayer ProjLifesteal(target, proj, damage, crit); ProjOnHit(proj, target.Center, crit, (target.damage > 5 || target.boss) && !target.SpawnedFromStatue); - NPCDebuffs(target, proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), proj.IsSummon(), proj.CountsAsClass(), true); + NPCDebuffs(target, proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), true); // Shattered Community tracks all damage dealt with Rage Mode (ignoring dummies). if (target.type == NPCID.TargetDummy || target.type == NPCType()) @@ -615,7 +615,7 @@ namespace CalamityMod.CalPlayer target.AddBuff(BuffType(), 300); } ProjOnHit(proj, target.Center, crit, true); - PvpDebuffs(target, proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), proj.IsSummon(), proj.CountsAsClass(), true); + PvpDebuffs(target, proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), true); } } #endregion @@ -762,7 +762,7 @@ namespace CalamityMod.CalPlayer RangedOnHit(proj, modProj, position, crit, npcCheck); if (proj.CountsAsClass()) MagicOnHit(proj, modProj, position, crit, npcCheck); - if (proj.IsSummon()) + if (proj.CountsAsClass() && !proj.CountsAsClass()) SummonOnHit(proj, modProj, position, crit, npcCheck); if (proj.CountsAsClass()) RogueOnHit(proj, modProj, position, crit, npcCheck); @@ -902,6 +902,7 @@ namespace CalamityMod.CalPlayer private void SummonOnHit(Projectile proj, CalamityGlobalProjectile modProj, Vector2 position, bool crit, bool npcCheck) { var source = proj.GetSource_FromThis(); + if (npcCheck) { if (phantomicArtifact) @@ -1161,7 +1162,10 @@ namespace CalamityMod.CalPlayer int featherDamage = (int)Player.GetTotalDamage().ApplyTo(15); int feather = Projectile.NewProjectile(spawnSource, source, velocity, ProjectileType(), featherDamage, 3f, proj.owner); if (feather.WithinBounds(Main.maxProjectiles)) + { Main.projectile[feather].DamageType = DamageClass.Generic; + Main.projectile[feather].extraUpdates += 3; + } } spawnedFeathers = true; } @@ -1234,55 +1238,12 @@ namespace CalamityMod.CalPlayer if (shadow && shadowPotCooldown <= 0 && modProj.stealthStrikeHitCount < 5) { - if (CalamityLists.javelinProjList.Contains(proj.type)) - { - int randrot = Main.rand.Next(-30, 391); - Vector2 SoulSpeed = new Vector2(13f, 13f).RotatedBy(MathHelper.ToRadians(randrot)); - int soul = Projectile.NewProjectile(spawnSource, proj.Center, SoulSpeed, ProjectileType(), (int)(proj.damage * 0.1), 3f, proj.owner, 0f, 0f); - if (soul.WithinBounds(Main.maxProjectiles)) - Main.projectile[soul].DamageType = DamageClass.Generic; - shadowPotCooldown = 30; - } - if (CalamityLists.spikyBallProjList.Contains(proj.type)) - { - int scythe = Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType(), (int)(proj.damage * 0.05), 3f, proj.owner, 1f, 0f); - if (scythe.WithinBounds(Main.maxProjectiles)) - Main.projectile[scythe].DamageType = DamageClass.Generic; - Main.projectile[scythe].usesLocalNPCImmunity = true; - Main.projectile[scythe].localNPCHitCooldown = 10; - Main.projectile[scythe].penetrate = 2; - shadowPotCooldown = 30; - } - if (CalamityLists.daggerProjList.Contains(proj.type)) - { - Vector2 shardVelocity = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f)); - shardVelocity.Normalize(); - shardVelocity *= 5f; - int shard = Projectile.NewProjectile(spawnSource, proj.Center, shardVelocity, ProjectileType(), (int)(proj.damage * 0.15), 0f, proj.owner); - if (shard.WithinBounds(Main.maxProjectiles)) - Main.projectile[shard].DamageType = DamageClass.Generic; - Main.projectile[shard].timeLeft = 150; - shadowPotCooldown = 30; - } - if (CalamityLists.boomerangProjList.Contains(proj.type)) - { - int spiritDamage = (int)(proj.damage * 0.2); - Projectile ghost = CalamityUtils.SpawnOrb(proj, spiritDamage, ProjectileID.SpectreWrath, 800f, 4f); - if (ghost.whoAmI.WithinBounds(Main.maxProjectiles)) - { - ghost.DamageType = DamageClass.Generic; - ghost.penetrate = 1; - } - shadowPotCooldown = 30; - } - if (CalamityLists.flaskBombProjList.Contains(proj.type)) - { - int blackhole = Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType(), (int)(proj.damage * 0.05), 3f, proj.owner, 0f, 0f); - if (blackhole.WithinBounds(Main.maxProjectiles)) - Main.projectile[blackhole].DamageType = DamageClass.Generic; - Main.projectile[blackhole].Center = proj.Center; - shadowPotCooldown = 30; - } + int randrot = Main.rand.Next(-30, 391); + Vector2 SoulSpeed = new Vector2(13f, 13f).RotatedBy(MathHelper.ToRadians(randrot)); + int soul = Projectile.NewProjectile(spawnSource, proj.Center, SoulSpeed, ProjectileType(), (int)(proj.damage * 0.1), 3f, proj.owner, 0f, 0f); + if (soul.WithinBounds(Main.maxProjectiles)) + Main.projectile[soul].DamageType = DamageClass.Generic; + shadowPotCooldown = 30; } if (npcCheck) diff --git a/CalamityConfig.cs b/CalamityConfig.cs index 4b8623fc26..e6305fc419 100644 --- a/CalamityConfig.cs +++ b/CalamityConfig.cs @@ -198,12 +198,6 @@ namespace CalamityMod [Tooltip("$Mods.CalamityMod.Config.EntryTooltip.EarlyHardmodeProgressionRework")] public bool EarlyHardmodeProgressionRework { get; set; } - [Label("$Mods.CalamityMod.Config.EntryTitle.Proficiency")] - [BackgroundColor(192, 54, 64, 192)] - [DefaultValue(true)] - [Tooltip("$Mods.CalamityMod.Config.EntryTooltip.Proficiency")] - public bool Proficiency { get; set; } - [Label("$Mods.CalamityMod.Config.EntryTitle.BossZen")] [BackgroundColor(192, 54, 64, 192)] [DefaultValue(true)] @@ -408,7 +402,6 @@ namespace CalamityMod new("RemoveReforgeRNG", ItemID.TinHammer), new("EarlyHardmodeProgressionRework", ItemID.Pwnhammer), - new("Proficiency", ModContent.ItemType()), new("BossZen", ModContent.ItemType()), new("TownNPCsSpawnAtNight", ItemID.ClothierVoodooDoll), new("TownNPCSpawnRateMultiplier", ItemID.GuideVoodooDoll), diff --git a/CalamityLists.cs b/CalamityLists.cs index 17dc25ee58..b294dcb570 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -109,16 +109,6 @@ namespace CalamityMod public static List needsDebuffIconDisplayList; public static List trapProjectileList; public static List scopedWeaponList; - public static List boomerangList; - public static List javelinList; - 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 lavaFishList; public static List highTestFishList; public static List flamethrowerList; @@ -1328,303 +1318,6 @@ namespace CalamityMod ItemType() }; - boomerangList = new List() - { - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType() - }; - - boomerangProjList = new List() - { - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType() - }; - - javelinList = new List() - { - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType() - }; - - javelinProjList = new List() - { - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType() - }; - - daggerList = new List() - { - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType() - }; - - daggerProjList = new List() - { - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType() - }; - - flaskBombList = new List() - { - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType() - }; - - flaskBombProjList = new List() - { - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType() - }; - - spikyBallList = new List() - { - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType(), - ItemType() - }; - - spikyBallProjList = new List() - { - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType() - }; - highTestFishList = new List() { ItemID.GoldenFishingRod, @@ -2703,16 +2396,6 @@ namespace CalamityMod needsDebuffIconDisplayList = null; trapProjectileList = null; scopedWeaponList = null; - boomerangList = null; - javelinList = null; - daggerList = null; - flaskBombList = null; - spikyBallList = null; - boomerangProjList = null; - javelinProjList = null; - daggerProjList = null; - flaskBombProjList = null; - spikyBallProjList = null; lavaFishList = null; highTestFishList = null; flamethrowerList = null; diff --git a/CalamityNetcode.cs b/CalamityNetcode.cs index 26a37f0b0a..21d9595985 100644 --- a/CalamityNetcode.cs +++ b/CalamityNetcode.cs @@ -24,41 +24,6 @@ namespace CalamityMod CalamityModMessageType msgType = (CalamityModMessageType)reader.ReadByte(); switch (msgType) { - // - // Proficiency levels - // - - case CalamityModMessageType.MeleeLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 0); - break; - case CalamityModMessageType.RangedLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 1); - break; - case CalamityModMessageType.MagicLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 2); - break; - case CalamityModMessageType.SummonLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 3); - break; - case CalamityModMessageType.RogueLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 4); - break; - case CalamityModMessageType.ExactMeleeLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 0); - break; - case CalamityModMessageType.ExactRangedLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 1); - break; - case CalamityModMessageType.ExactMagicLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 2); - break; - case CalamityModMessageType.ExactSummonLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 3); - break; - case CalamityModMessageType.ExactRogueLevelSync: - Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 4); - break; - // // Player mechanic syncs // @@ -335,19 +300,6 @@ namespace CalamityMod public enum CalamityModMessageType : byte { - // Proficiency levels - // TODO -- simplify proficiency netcode, there do not need to be this many separate packet types - MeleeLevelSync, - RangedLevelSync, - MagicLevelSync, - SummonLevelSync, - RogueLevelSync, - ExactMeleeLevelSync, - ExactRangedLevelSync, - ExactMagicLevelSync, - ExactSummonLevelSync, - ExactRogueLevelSync, - // Player mechanic syncs DefenseDamageSync, // TODO -- this can't be synced every 60 frames, it needs to be synced when the player gets hit, or every time it heals up RageSync, // TODO -- this can't be synced every 60 frames, it needs to be synced every time the player is diff --git a/Gores/GulperEel.png b/Gores/GulperEel.png index 65a12da214..36ef10f644 100644 Binary files a/Gores/GulperEel.png and b/Gores/GulperEel.png differ diff --git a/Gores/GulperEel2.png b/Gores/GulperEel2.png index 306eef3487..2b23fba06e 100644 Binary files a/Gores/GulperEel2.png and b/Gores/GulperEel2.png differ diff --git a/Gores/GulperEel3.png b/Gores/GulperEel3.png index 3186171c0f..ea5230067f 100644 Binary files a/Gores/GulperEel3.png and b/Gores/GulperEel3.png differ diff --git a/Gores/GulperEel4.png b/Gores/GulperEel4.png index b8b9bcb777..e2f3d001eb 100644 Binary files a/Gores/GulperEel4.png and b/Gores/GulperEel4.png differ diff --git a/Items/Accessories/CoinofDeceit.cs b/Items/Accessories/CoinofDeceit.cs index 2904a7d398..3b1a12df80 100644 --- a/Items/Accessories/CoinofDeceit.cs +++ b/Items/Accessories/CoinofDeceit.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables; +using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,8 +11,7 @@ namespace CalamityMod.Items.Accessories { SacrificeTotal = 1; DisplayName.SetDefault("Coin of Deceit"); - Tooltip.SetDefault("Stealth strikes only expend 75% of your max stealth\n" + - "6% increased rogue crit chance"); + Tooltip.SetDefault("Stealth strikes only expend 90% of your max stealth"); } public override void SetDefaults() @@ -26,16 +25,15 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - player.GetCritChance() += 6; - player.Calamity().stealthStrike75Cost = true; + player.Calamity().stealthStrike90Cost = true; } public override void AddRecipes() { CreateRecipe(). AddRecipeGroup("AnyGoldBar", 4). - AddRecipeGroup("AnyCopperBar", 8). - AddIngredient(5). + AddRecipeGroup("AnyEvilBar", 8). + AddIngredient(5). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Accessories/CorrosiveSpine.cs b/Items/Accessories/CorrosiveSpine.cs index f0ca8d61e4..9c6aa04075 100644 --- a/Items/Accessories/CorrosiveSpine.cs +++ b/Items/Accessories/CorrosiveSpine.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories { SacrificeTotal = 1; DisplayName.SetDefault("Corrosive Spine"); - Tooltip.SetDefault("10% increased movement speed\n" + + Tooltip.SetDefault("5% increased movement speed\n" + "All rogue weapons inflict venom and spawn clouds on enemy hits\n" + "You release a ton of clouds everywhere on hit"); } @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - player.moveSpeed += 0.1f; + player.moveSpeed += 0.05f; player.Calamity().corrosiveSpine = true; if (player.immune) { diff --git a/Items/Accessories/DarkGodsSheath.cs b/Items/Accessories/DarkGodsSheath.cs index 005f809f6a..be0144203c 100644 --- a/Items/Accessories/DarkGodsSheath.cs +++ b/Items/Accessories/DarkGodsSheath.cs @@ -12,9 +12,8 @@ namespace CalamityMod.Items.Accessories { SacrificeTotal = 1; DisplayName.SetDefault("Dark God's Sheath"); - Tooltip.SetDefault("+20 maximum stealth\n" + + Tooltip.SetDefault("+10 maximum stealth\n" + "Mobile stealth generation accelerates while not attacking\n" + - "Stealth strikes have a 100% critical hit chance\n" + "Stealth strikes only expend 50% of your max stealth\n" + "6% increased rogue damage, and 6% increased rogue crit chance"); } @@ -31,9 +30,8 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.stealthStrikeAlwaysCrits = true; modPlayer.stealthStrikeHalfCost = true; - modPlayer.rogueStealthMax += 0.2f; + modPlayer.rogueStealthMax += 0.1f; modPlayer.darkGodSheath = true; player.GetCritChance() += 6; player.GetDamage() += 0.06f; diff --git a/Items/Accessories/EclipseMirror.cs b/Items/Accessories/EclipseMirror.cs index 207f6be366..6e31178ea2 100644 --- a/Items/Accessories/EclipseMirror.cs +++ b/Items/Accessories/EclipseMirror.cs @@ -15,12 +15,11 @@ namespace CalamityMod.Items.Accessories SacrificeTotal = 1; DisplayName.SetDefault("Eclipse Mirror"); Tooltip.SetDefault("Its reflection shows naught but darkness\n" + - "+20 maximum stealth\n" + + "+10 maximum stealth\n" + "6% increased rogue damage, and 6% increased rogue crit chance\n" + "Vastly reduces enemy aggression, even in the abyss\n" + "Stealth generates 20% faster when standing still\n" + "Mobile stealth generation exponentially accelerates while not attacking\n" + - "Stealth strikes have a 100% critical hit chance\n" + "Stealth strikes only expend 50% of your max stealth\n" + "Grants the ability to evade attacks in a blast of darksun light, which inflicts extreme damage in a wide area\n" + "Evading an attack grants full stealth but has a 90 second cooldown\n" + @@ -40,9 +39,8 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.stealthGenStandstill += 0.2f; - modPlayer.rogueStealthMax += 0.2f; + modPlayer.rogueStealthMax += 0.1f; modPlayer.eclipseMirror = true; - modPlayer.stealthStrikeAlwaysCrits = true; modPlayer.stealthStrikeHalfCost = true; player.GetCritChance() += 6; player.GetDamage() += 0.06f; diff --git a/Items/Accessories/EldritchSoulArtifact.cs b/Items/Accessories/EldritchSoulArtifact.cs index b477a59d6e..dfd1e287e0 100644 --- a/Items/Accessories/EldritchSoulArtifact.cs +++ b/Items/Accessories/EldritchSoulArtifact.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Accessories SacrificeTotal = 1; DisplayName.SetDefault("Eldritch Soul Artifact"); Tooltip.SetDefault("Knowledge\n" + - "Boosts melee speed by 10%, ranged velocity by 25%, rogue damage by 15%, max minions by 2 and reduces mana cost by 15%\n" + + "Boosts melee speed by 10%, ranged velocity by 25%, rogue stealth regen by 10%, max minions by 2 and reduces mana cost by 15%\n" + "Grants immunity to Whispering Death"); } diff --git a/Items/Accessories/EtherealExtorter.cs b/Items/Accessories/EtherealExtorter.cs index a30aa715e9..395ea49ed3 100644 --- a/Items/Accessories/EtherealExtorter.cs +++ b/Items/Accessories/EtherealExtorter.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories SacrificeTotal = 1; DisplayName.SetDefault("Ethereal Extorter"); Tooltip.SetDefault(@"Rogue projectiles explode into homing souls on death -10% increased rogue damage and +10 maximum stealth, however, life regen is reduced by 1"); +10% increased rogue damage and +10 maximum stealth"); } public override void SetDefaults() @@ -29,7 +29,6 @@ namespace CalamityMod.Items.Accessories CalamityPlayer modPlayer = player.Calamity(); modPlayer.etherealExtorter = true; player.GetDamage() += 0.1f; - player.lifeRegen -= 1; modPlayer.rogueStealthMax += 0.1f; } } diff --git a/Items/Accessories/FungalClump.cs b/Items/Accessories/FungalClump.cs index fcef579a53..7850c277ae 100644 --- a/Items/Accessories/FungalClump.cs +++ b/Items/Accessories/FungalClump.cs @@ -1,9 +1,9 @@ using CalamityMod.Buffs.Summon; using CalamityMod.CalPlayer; -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Typeless; using Terraria; -using Terraria.ModLoader; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { @@ -28,8 +28,6 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().fungalClump; - public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); @@ -44,7 +42,7 @@ namespace CalamityMod.Items.Accessories { var source = player.GetSource_Accessory(Item); int damage = (int)player.GetBestClassDamage().ApplyTo(FungalClumpDamage); - int p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), damage, 1f, player.whoAmI, 0f, 0f); + int p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), damage, 1f, player.whoAmI); if (Main.projectile.IndexInRange(p)) Main.projectile[p].originalDamage = FungalClumpDamage; } diff --git a/Items/Accessories/GloveOfRecklessness.cs b/Items/Accessories/GloveOfRecklessness.cs index 24bb13e885..852458b693 100644 --- a/Items/Accessories/GloveOfRecklessness.cs +++ b/Items/Accessories/GloveOfRecklessness.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories { SacrificeTotal = 1; DisplayName.SetDefault("Glove of Recklessness"); - Tooltip.SetDefault("Increases rogue attack speed by 12% but decreases damage by 10%\n" + + Tooltip.SetDefault("Increases rogue attack speed by 15% but decreases damage by 10%\n" + "Adds inaccuracy to rogue weapons"); } @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories CalamityPlayer modPlayer = player.Calamity(); modPlayer.gloveOfRecklessness = true; player.GetDamage() -= 0.1f; - player.GetAttackSpeed() += 0.12f; + player.GetAttackSpeed() += 0.15f; } } } diff --git a/Items/Accessories/GloveofPrecision.cs b/Items/Accessories/GloveofPrecision.cs index e1c2130511..4c72bf827d 100644 --- a/Items/Accessories/GloveofPrecision.cs +++ b/Items/Accessories/GloveofPrecision.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories { SacrificeTotal = 1; DisplayName.SetDefault("Glove of Precision"); - Tooltip.SetDefault("Decreases rogue attack speed by 20% but increases damage and crit by 12% and velocity by 25%"); + Tooltip.SetDefault("Decreases rogue attack speed by 15% but increases damage and crit by 12% and velocity by 25%"); } public override void SetDefaults() @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories player.GetDamage() += 0.12f; player.GetCritChance() += 12; modPlayer.rogueVelocity += 0.25f; - player.GetAttackSpeed() -= 0.2f; + player.GetAttackSpeed() -= 0.15f; } } } diff --git a/Items/Accessories/MagicLevelMeter.cs b/Items/Accessories/MagicLevelMeter.cs deleted file mode 100644 index 1c542f155b..0000000000 --- a/Items/Accessories/MagicLevelMeter.cs +++ /dev/null @@ -1,129 +0,0 @@ -using CalamityMod.CalPlayer; -using System.Collections.Generic; -using Terraria; -using Terraria.ModLoader; -using Terraria.ID; -using System.Linq; - -namespace CalamityMod.Items.Accessories -{ - public class MagicLevelMeter : ModItem - { - public override void SetStaticDefaults() - { - SacrificeTotal = 1; - DisplayName.SetDefault("Magic Level Meter"); - Tooltip.SetDefault("Tells you how high your magic proficiency is"); - } - - public override void SetDefaults() - { - Item.width = 26; - Item.height = 26; - Item.value = CalamityGlobalItem.Rarity3BuyPrice; - Item.rare = ItemRarityID.Orange; - Item.accessory = true; - } - - public override void ModifyTooltips(List list) - { - int level = Main.player[Main.myPlayer].Calamity().magicLevel; - int exactLevel = Main.player[Main.myPlayer].Calamity().exactMagicLevel; - int damageGain = 0; - int manaUsage = 0; - int critGain = 0; - switch (exactLevel) - { - case 0: - break; - case 1: - damageGain = 1; - break; - case 2: - damageGain = 2; - break; - case 3: - damageGain = 2; - manaUsage = 1; - break; - case 4: - damageGain = 2; - manaUsage = 1; - critGain = 1; - break; - case 5: - damageGain = 2; - manaUsage = 2; - critGain = 1; - break; - case 6: - damageGain = 3; - manaUsage = 2; - critGain = 1; - break; - case 7: - damageGain = 3; - manaUsage = 2; - critGain = 2; - break; - case 8: - damageGain = 3; - manaUsage = 3; - critGain = 2; - break; - case 9: - damageGain = 4; - manaUsage = 3; - critGain = 2; - break; - case 10: - damageGain = 4; - manaUsage = 4; - critGain = 2; - break; - case 11: - damageGain = 4; - manaUsage = 4; - critGain = 3; - break; - case 12: - damageGain = 4; - manaUsage = 5; - critGain = 3; - break; - case 13: - damageGain = 5; - manaUsage = 5; - critGain = 3; - break; - case 14: - damageGain = 5; - manaUsage = 6; - critGain = 3; - break; - case 15: - damageGain = 6; - manaUsage = 6; - critGain = 3; - break; - } - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0"); - - if (line != null) - line.Text = "Tells you how high your magic proficiency is\n" + - "While equipped you will gain magic proficiency faster\n" + - "The higher your magic level the higher your magic damage, critical strike chance, and the lower your mana cost\n" + - "Magic proficiency (max of 12500): " + (level - (level > 12500 ? 1 : 0)) + "\n" + - "Magic level (max of 15): " + exactLevel + "\n" + - "Magic damage increase: " + damageGain + "%\n" + - "Mana usage decrease: " + manaUsage + "%\n" + - "Magic crit increase: " + critGain + "%"; - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.fasterMagicLevel = true; - } - } -} diff --git a/Items/Accessories/MagicLevelMeter.png b/Items/Accessories/MagicLevelMeter.png deleted file mode 100644 index c3e5bff4fc..0000000000 Binary files a/Items/Accessories/MagicLevelMeter.png and /dev/null differ diff --git a/Items/Accessories/MeleeLevelMeter.cs b/Items/Accessories/MeleeLevelMeter.cs deleted file mode 100644 index f05a33e53c..0000000000 --- a/Items/Accessories/MeleeLevelMeter.cs +++ /dev/null @@ -1,130 +0,0 @@ -using CalamityMod.CalPlayer; -using System.Collections.Generic; -using Terraria; -using Terraria.ModLoader; -using Terraria.ID; -using System.Linq; - -namespace CalamityMod.Items.Accessories -{ - public class MeleeLevelMeter : ModItem - { - public override void SetStaticDefaults() - { - SacrificeTotal = 1; - DisplayName.SetDefault("Melee Level Meter"); - Tooltip.SetDefault("Tells you how high your melee proficiency is"); - } - - public override void SetDefaults() - { - Item.width = 26; - Item.height = 26; - Item.value = CalamityGlobalItem.Rarity3BuyPrice; - Item.rare = ItemRarityID.Orange; - Item.accessory = true; - } - - public override void ModifyTooltips(List list) - { - int level = Main.player[Main.myPlayer].Calamity().meleeLevel; - int exactLevel = Main.player[Main.myPlayer].Calamity().exactMeleeLevel; - int damageGain = 0; - int meleeSpeed = 0; - int critGain = 0; - switch (exactLevel) - { - case 0: - break; - case 1: - damageGain = 1; - break; - case 2: - damageGain = 2; - break; - case 3: - damageGain = 2; - meleeSpeed = 1; - break; - case 4: - damageGain = 2; - meleeSpeed = 1; - critGain = 1; - break; - case 5: - damageGain = 3; - meleeSpeed = 1; - critGain = 1; - break; - case 6: - damageGain = 4; - meleeSpeed = 1; - critGain = 1; - break; - case 7: - damageGain = 4; - meleeSpeed = 2; - critGain = 1; - break; - case 8: - damageGain = 4; - meleeSpeed = 2; - critGain = 2; - break; - case 9: - damageGain = 5; - meleeSpeed = 2; - critGain = 2; - break; - case 10: - damageGain = 5; - meleeSpeed = 3; - critGain = 2; - break; - case 11: - damageGain = 5; - meleeSpeed = 3; - critGain = 3; - break; - case 12: - damageGain = 5; - meleeSpeed = 4; - critGain = 3; - break; - case 13: - damageGain = 6; - meleeSpeed = 4; - critGain = 3; - break; - case 14: - damageGain = 6; - meleeSpeed = 5; - critGain = 3; - break; - case 15: - damageGain = 6; - meleeSpeed = 6; - critGain = 3; - break; - } - - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0"); - - if (line != null) - line.Text = "Tells you how high your melee proficiency is\n" + - "While equipped you will gain melee proficiency faster\n" + - "The higher your melee level the higher your melee damage, speed, and critical strike chance\n" + - "Melee proficiency (max of 12500): " + (level - (level > 12500 ? 1 : 0)) + "\n" + - "Melee level (max of 15): " + exactLevel + "\n" + - "Melee damage increase: " + damageGain + "%\n" + - "Melee speed increase: " + meleeSpeed + "%\n" + - "Melee crit increase: " + critGain + "%"; - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.fasterMeleeLevel = true; - } - } -} diff --git a/Items/Accessories/MeleeLevelMeter.png b/Items/Accessories/MeleeLevelMeter.png deleted file mode 100644 index c3e5bff4fc..0000000000 Binary files a/Items/Accessories/MeleeLevelMeter.png and /dev/null differ diff --git a/Items/Accessories/RangedLevelMeter.cs b/Items/Accessories/RangedLevelMeter.cs deleted file mode 100644 index 08c3f75b09..0000000000 --- a/Items/Accessories/RangedLevelMeter.cs +++ /dev/null @@ -1,130 +0,0 @@ -using CalamityMod.CalPlayer; -using System.Collections.Generic; -using Terraria; -using Terraria.ModLoader; -using Terraria.ID; -using System.Linq; - -namespace CalamityMod.Items.Accessories -{ - public class RangedLevelMeter : ModItem - { - public override void SetStaticDefaults() - { - SacrificeTotal = 1; - DisplayName.SetDefault("Ranged Level Meter"); - Tooltip.SetDefault("Tells you how high your ranged proficiency is"); - } - - public override void SetDefaults() - { - Item.width = 26; - Item.height = 26; - Item.value = CalamityGlobalItem.Rarity3BuyPrice; - Item.rare = ItemRarityID.Orange; - Item.accessory = true; - } - - public override void ModifyTooltips(List list) - { - int level = Main.player[Main.myPlayer].Calamity().rangedLevel; - int exactLevel = Main.player[Main.myPlayer].Calamity().exactRangedLevel; - int damageGain = 0; - int moveSpeed = 0; - int critGain = 0; - switch (exactLevel) - { - case 0: - break; - case 1: - damageGain = 1; - break; - case 2: - damageGain = 2; - break; - case 3: - damageGain = 2; - critGain = 1; - break; - case 4: - damageGain = 2; - moveSpeed = 1; - critGain = 1; - break; - case 5: - damageGain = 2; - moveSpeed = 2; - critGain = 1; - break; - case 6: - damageGain = 2; - moveSpeed = 3; - critGain = 1; - break; - case 7: - damageGain = 2; - moveSpeed = 3; - critGain = 2; - break; - case 8: - damageGain = 3; - moveSpeed = 3; - critGain = 2; - break; - case 9: - damageGain = 3; - moveSpeed = 4; - critGain = 2; - break; - case 10: - damageGain = 4; - moveSpeed = 4; - critGain = 2; - break; - case 11: - damageGain = 4; - moveSpeed = 4; - critGain = 3; - break; - case 12: - damageGain = 4; - moveSpeed = 5; - critGain = 3; - break; - case 13: - damageGain = 5; - moveSpeed = 5; - critGain = 3; - break; - case 14: - damageGain = 5; - moveSpeed = 6; - critGain = 3; - break; - case 15: - damageGain = 6; - moveSpeed = 6; - critGain = 3; - break; - } - - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0"); - - if (line != null) - line.Text = "Tells you how high your ranged proficiency is\n" + - "While equipped you will gain ranged proficiency faster\n" + - "The higher your ranged level the higher your ranged damage, critical strike chance, and movement speed\n" + - "Ranged proficiency (max of 12500): " + (level - (level > 12500 ? 1 : 0)) + "\n" + - "Ranged level (max of 15): " + exactLevel + "\n" + - "Ranged damage increase: " + damageGain + "%\n" + - "Movement speed increase: " + moveSpeed + "%\n" + - "Ranged crit increase: " + critGain + "%"; - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.fasterRangedLevel = true; - } - } -} diff --git a/Items/Accessories/RangedLevelMeter.png b/Items/Accessories/RangedLevelMeter.png deleted file mode 100644 index c3e5bff4fc..0000000000 Binary files a/Items/Accessories/RangedLevelMeter.png and /dev/null differ diff --git a/Items/Accessories/RogueLevelMeter.cs b/Items/Accessories/RogueLevelMeter.cs deleted file mode 100644 index b51e7b1355..0000000000 --- a/Items/Accessories/RogueLevelMeter.cs +++ /dev/null @@ -1,130 +0,0 @@ -using CalamityMod.CalPlayer; -using System.Collections.Generic; -using Terraria; -using Terraria.ModLoader; -using Terraria.ID; -using System.Linq; - -namespace CalamityMod.Items.Accessories -{ - public class RogueLevelMeter : ModItem - { - public override void SetStaticDefaults() - { - SacrificeTotal = 1; - DisplayName.SetDefault("Rogue Level Meter"); - Tooltip.SetDefault("Tells you how high your rogue proficiency is"); - } - - public override void SetDefaults() - { - Item.width = 26; - Item.height = 26; - Item.value = CalamityGlobalItem.Rarity3BuyPrice; - Item.rare = ItemRarityID.Orange; - Item.accessory = true; - } - - public override void ModifyTooltips(List list) - { - int level = Main.player[Main.myPlayer].Calamity().rogueLevel; - int exactLevel = Main.player[Main.myPlayer].Calamity().exactRogueLevel; - int damageGain = 0; - int velocityGain = 0; - int critGain = 0; - switch (exactLevel) - { - case 0: - break; - case 1: - damageGain = 1; - break; - case 2: - damageGain = 2; - break; - case 3: - damageGain = 2; - velocityGain = 1; - break; - case 4: - damageGain = 2; - velocityGain = 1; - critGain = 1; - break; - case 5: - damageGain = 2; - velocityGain = 2; - critGain = 1; - break; - case 6: - damageGain = 2; - velocityGain = 3; - critGain = 1; - break; - case 7: - damageGain = 3; - velocityGain = 3; - critGain = 1; - break; - case 8: - damageGain = 3; - velocityGain = 3; - critGain = 2; - break; - case 9: - damageGain = 3; - velocityGain = 4; - critGain = 2; - break; - case 10: - damageGain = 4; - velocityGain = 4; - critGain = 2; - break; - case 11: - damageGain = 4; - velocityGain = 4; - critGain = 3; - break; - case 12: - damageGain = 4; - velocityGain = 5; - critGain = 3; - break; - case 13: - damageGain = 5; - velocityGain = 5; - critGain = 3; - break; - case 14: - damageGain = 5; - velocityGain = 6; - critGain = 3; - break; - case 15: - damageGain = 6; - velocityGain = 6; - critGain = 3; - break; - } - - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0"); - - if (line != null) - line.Text = "Tells you how high your rogue proficiency is\n" + - "While equipped you will gain rogue proficiency faster\n" + - "The higher your rogue level the higher your rogue damage, critical strike chance, and velocity\n" + - "Rogue proficiency (max of 12500): " + (level - (level > 12500 ? 1 : 0)) + "\n" + - "Rogue level (max of 15): " + exactLevel + "\n" + - "Rogue damage increase: " + damageGain + "%\n" + - "Rogue velocity increase: " + velocityGain + "%\n" + - "Rogue crit increase: " + critGain + "%"; - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.fasterRogueLevel = true; - } - } -} diff --git a/Items/Accessories/RogueLevelMeter.png b/Items/Accessories/RogueLevelMeter.png deleted file mode 100644 index c3e5bff4fc..0000000000 Binary files a/Items/Accessories/RogueLevelMeter.png and /dev/null differ diff --git a/Items/Accessories/RuinMedallion.cs b/Items/Accessories/RuinMedallion.cs index 755bafe0eb..822847edf0 100644 --- a/Items/Accessories/RuinMedallion.cs +++ b/Items/Accessories/RuinMedallion.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories { SacrificeTotal = 1; DisplayName.SetDefault("Ruin Medallion"); - Tooltip.SetDefault("Stealth strikes only expend 50% of your max stealth\n" + + Tooltip.SetDefault("Stealth strikes only expend 75% of your max stealth\n" + "6% increased rogue damage, and 6% increased rogue crit chance"); } @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.stealthStrikeHalfCost = true; + modPlayer.stealthStrike75Cost = true; player.GetCritChance() += 6; player.GetDamage() += 0.06f; } diff --git a/Items/Accessories/SandCloak.cs b/Items/Accessories/SandCloak.cs index e4626916e4..9abaa49f93 100644 --- a/Items/Accessories/SandCloak.cs +++ b/Items/Accessories/SandCloak.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Items.Accessories { SacrificeTotal = 1; DisplayName.SetDefault("Sand Cloak"); - Tooltip.SetDefault("+1 defense and 5% increased movement speed\n" + + Tooltip.SetDefault("+2 defense and 5% increased movement speed\n" + "TOOLTIP LINE HERE\n" + - "This effect has a 30 second cooldown before it can be used again"); + "This effect has a 25 second cooldown before it can be used again"); } public override void SetDefaults() @@ -32,12 +32,12 @@ namespace CalamityMod.Items.Accessories TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1"); if (line != null) - line.Text = "Press " + hotkey + " to consume 25% of your maximum stealth to create a protective dust veil which provides +6 defense and +2 life regen"; + line.Text = "Press " + hotkey + " to consume 10% of your maximum stealth to create a protective dust veil which provides +6 defense and +2 life regen"; } public override void UpdateAccessory(Player player, bool hideVisual) { - player.statDefense += 1; + player.statDefense += 2; player.moveSpeed += 0.05f; player.Calamity().sandCloak = true; } diff --git a/Items/Accessories/SilencingSheath.cs b/Items/Accessories/SilencingSheath.cs index 461da0fb36..d8d3302764 100644 --- a/Items/Accessories/SilencingSheath.cs +++ b/Items/Accessories/SilencingSheath.cs @@ -11,8 +11,7 @@ namespace CalamityMod.Items.Accessories { SacrificeTotal = 1; DisplayName.SetDefault("Silencing Sheath"); - Tooltip.SetDefault("+20 maximum stealth\n" + - "Stealth generates 15% faster"); + Tooltip.SetDefault("+10 maximum stealth"); } public override void SetDefaults() @@ -27,9 +26,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.rogueStealthMax += 0.2f; - modPlayer.stealthGenStandstill += 0.15f; - modPlayer.stealthGenMoving += 0.15f; + modPlayer.rogueStealthMax += 0.1f; } public override void AddRecipes() diff --git a/Items/Accessories/StatMeter.cs b/Items/Accessories/StatMeter.cs index 22a0ac5500..f7ea0fea72 100644 --- a/Items/Accessories/StatMeter.cs +++ b/Items/Accessories/StatMeter.cs @@ -1,9 +1,9 @@ -using System.Collections.Generic; -using System.Linq; -using System.Text; -using CalamityMod.Balancing; +using CalamityMod.Balancing; using CalamityMod.CalPlayer; using CalamityMod.World; +using System.Collections.Generic; +using System.Linq; +using System.Text; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -26,13 +26,9 @@ namespace CalamityMod.Items.Accessories Item.height = 26; Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; + Item.accessory = true; } - public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) - { - itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.ToolsOther; - } - public override void ModifyTooltips(List list) { Player player = Main.player[Main.myPlayer]; diff --git a/Items/Accessories/SummonLevelMeter.cs b/Items/Accessories/SummonLevelMeter.cs deleted file mode 100644 index 9851e4fa01..0000000000 --- a/Items/Accessories/SummonLevelMeter.cs +++ /dev/null @@ -1,115 +0,0 @@ -using CalamityMod.CalPlayer; -using System.Collections.Generic; -using Terraria; -using Terraria.ModLoader; -using Terraria.ID; -using System.Linq; - -namespace CalamityMod.Items.Accessories -{ - public class SummonLevelMeter : ModItem - { - public override void SetStaticDefaults() - { - SacrificeTotal = 1; - DisplayName.SetDefault("Summon Level Meter"); - Tooltip.SetDefault("Tells you how high your summon proficiency is"); - } - - public override void SetDefaults() - { - Item.width = 26; - Item.height = 26; - Item.value = CalamityGlobalItem.Rarity3BuyPrice; - Item.rare = ItemRarityID.Orange; - Item.accessory = true; - } - - public override void ModifyTooltips(List list) - { - int level = Main.player[Main.myPlayer].Calamity().summonLevel; - int exactLevel = Main.player[Main.myPlayer].Calamity().exactSummonLevel; - int damageGain = 0; - int minionKB = 0; - switch (exactLevel) - { - case 0: - break; - case 1: - damageGain = 1; - break; - case 2: - damageGain = 2; - break; - case 3: - damageGain = 2; - minionKB = 30; - break; - case 4: - damageGain = 3; - minionKB = 30; - break; - case 5: - damageGain = 3; - minionKB = 60; - break; - case 6: - damageGain = 4; - minionKB = 90; - break; - case 7: - damageGain = 4; - minionKB = 120; - break; - case 8: - damageGain = 5; - minionKB = 150; - break; - case 9: - damageGain = 6; - minionKB = 180; - break; - case 10: - damageGain = 7; - minionKB = 180; - break; - case 11: - damageGain = 7; - minionKB = 210; - break; - case 12: - damageGain = 8; - minionKB = 240; - break; - case 13: - damageGain = 9; - minionKB = 270; - break; - case 14: - damageGain = 10; - minionKB = 300; - break; - case 15: - damageGain = 12; - minionKB = 300; - break; - } - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0"); - - if (line != null) - line.Text = "Tells you how high your summon proficiency is\n" + - "While equipped you will gain summon proficiency faster\n" + - "The higher your summon level the higher your minion damage and knockback\n" + - "Summon proficiency (max of 12500): " + (level - (level > 12500 ? 1 : 0)) + "\n" + - "Summon level (max of 15): " + exactLevel + "\n" + - "Minion damage increase: " + damageGain + "%\n" + - "Minion knockback increase: " + minionKB; - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.fasterSummonLevel = true; - } - } -} diff --git a/Items/Accessories/SummonLevelMeter.png b/Items/Accessories/SummonLevelMeter.png deleted file mode 100644 index c3e5bff4fc..0000000000 Binary files a/Items/Accessories/SummonLevelMeter.png and /dev/null differ diff --git a/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs b/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs index 852cea14b0..babf075af0 100644 --- a/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs +++ b/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs @@ -51,6 +51,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian AddRecipeGroup("AnySnowBlock", 30). AddRecipeGroup("AnyIceBlock", 15). AddIngredient(ItemID.BorealWood, 45). + AddIngredient(ItemID.FlinxFur, 2). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs b/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs index 14a9d19820..92a8ce8358 100644 --- a/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs +++ b/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs @@ -34,6 +34,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian AddRecipeGroup("AnySnowBlock", 20). AddRecipeGroup("AnyIceBlock", 10). AddIngredient(ItemID.BorealWood, 30). + AddIngredient(ItemID.FlinxFur). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Armor/SnowRuffian/SnowRuffianMask.cs b/Items/Armor/SnowRuffian/SnowRuffianMask.cs index 19ffe8aa13..69d2fb259e 100644 --- a/Items/Armor/SnowRuffian/SnowRuffianMask.cs +++ b/Items/Armor/SnowRuffian/SnowRuffianMask.cs @@ -79,6 +79,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian AddRecipeGroup("AnySnowBlock", 10). AddRecipeGroup("AnyIceBlock", 5). AddIngredient(ItemID.BorealWood, 15). + AddIngredient(ItemID.FlinxFur). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Armor/Umbraphile/UmbraphileHood.cs b/Items/Armor/Umbraphile/UmbraphileHood.cs index 45e36fbe17..361edcf82f 100644 --- a/Items/Armor/Umbraphile/UmbraphileHood.cs +++ b/Items/Armor/Umbraphile/UmbraphileHood.cs @@ -42,8 +42,7 @@ namespace CalamityMod.Items.Armor.Umbraphile modPlayer.rogueStealthMax += 1.1f; player.setBonus = "+110 maximum stealth\n" + "Rogue weapons have a chance to create explosions on hit\n" + - "Stealth strikes always create an explosion\n" + - "Penumbra potions always build stealth at max effectiveness"; + "Stealth strikes always create an explosion"; player.Calamity().wearingRogueArmor = true; } diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 68bd4b2933..c83ce90652 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -214,7 +214,7 @@ namespace CalamityMod.Items { velocity *= modPlayer.rogueVelocity; if (modPlayer.gloveOfRecklessness) - velocity = velocity.RotatedByRandom(MathHelper.ToRadians(6f)); + velocity = velocity.RotatedByRandom(MathHelper.ToRadians(12f)); } if (modPlayer.eArtifact && item.CountsAsClass()) velocity *= 1.25f; diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index bdf7007167..b4a49723f8 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -311,9 +311,9 @@ namespace CalamityMod.Items EditTooltipByNum(0, (line) => line.Text += extraLine); } - // Invisibility Potion provides various rogue boosts + // Invisibility Potion provides stealth regen if (item.type == ItemID.InvisibilityPotion) - EditTooltipByNum(0, (line) => line.Text += "\nBoosts various rogue stats depending on held weapon"); + EditTooltipByNum(0, (line) => line.Text += "\n8% increased rogue stealth regen"); // Golden Fishing Rod inherently contains High Test Fishing Line if (item.type == ItemID.GoldenFishingRod) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 7325e077d0..1feaca37b5 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -290,7 +290,7 @@ namespace CalamityMod.Items { ItemID.MaceWhip, autoReuse }, { ItemID.MagicalHarp, Do(DamageExact(50), ShootSpeedExact(12f)) }, { ItemID.MagicDagger, Do(AutoReuse, DamageExact(77), UseExact(16), ShootSpeedExact(30)) }, - { ItemID.MagicMissile, Do(DamageRatio(1.2f)) }, + { ItemID.MagicMissile, Do(DamageRatio(1.2f), ManaExact(5)) }, { ItemID.MagnetSphere, Do(DamageRatio(1.1f)) }, { ItemID.ManaCrystal, autoReuse }, { ItemID.Marrow, Do(PointBlank, AutoReuse, DamageExact(69)) }, @@ -402,7 +402,7 @@ namespace CalamityMod.Items { ItemID.QueenSlimeCrystal, nonConsumableBossSummon }, { ItemID.QueenSpiderStaff, Do(UseExact(25)) }, { ItemID.RainbowCrystalStaff, Do(UseExact(15)) }, - { ItemID.RainbowRod, Do(DamageExact(50), UseExact(35)) }, + { ItemID.RainbowRod, Do(DamageExact(50), ManaExact(12), UseExact(35)) }, { ItemID.RainbowWhip, autoReuse }, { ItemID.Rally, Do(AutoReuse, DamageExact(20)) }, { ItemID.RavenStaff, Do(AutoReuse, UseExact(20)) }, diff --git a/Items/Placeables/AbyssGravel.cs b/Items/Placeables/AbyssGravel.cs index e5cf8a3f79..82087cef44 100644 --- a/Items/Placeables/AbyssGravel.cs +++ b/Items/Placeables/AbyssGravel.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Items.Placeables Item.useTime = 10; Item.autoReuse = true; Item.consumable = true; - Item.width = 13; - Item.height = 10; + Item.width = 16; + Item.height = 16; Item.maxStack = 999; } } diff --git a/Items/Placeables/AbyssGravel.png b/Items/Placeables/AbyssGravel.png index 79c48af545..b6f0e0ed2f 100644 Binary files a/Items/Placeables/AbyssGravel.png and b/Items/Placeables/AbyssGravel.png differ diff --git a/Items/Placeables/Walls/AbyssGravelWallItem.cs b/Items/Placeables/Walls/AbyssGravelWallItem.cs index 21d486530b..22dde7ef79 100644 --- a/Items/Placeables/Walls/AbyssGravelWallItem.cs +++ b/Items/Placeables/Walls/AbyssGravelWallItem.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Items.Placeables.Walls public override void SetDefaults() { - Item.width = 32; - Item.height = 32; + Item.width = 24; + Item.height = 24; Item.maxStack = 999; Item.useTurn = true; Item.autoReuse = true; diff --git a/Items/Placeables/Walls/AbyssGravelWallItem.png b/Items/Placeables/Walls/AbyssGravelWallItem.png index 8adf7a052e..37de1361ee 100644 Binary files a/Items/Placeables/Walls/AbyssGravelWallItem.png and b/Items/Placeables/Walls/AbyssGravelWallItem.png differ diff --git a/Items/Potions/PenumbraPotion.cs b/Items/Potions/PenumbraPotion.cs index 3531ec6abd..a8fb73be1b 100644 --- a/Items/Potions/PenumbraPotion.cs +++ b/Items/Potions/PenumbraPotion.cs @@ -12,9 +12,7 @@ namespace CalamityMod.Items.Potions { SacrificeTotal = 20; DisplayName.SetDefault("Penumbra Potion"); - Tooltip.SetDefault("Rogue stealth generates 15% faster while moving\n" - + "At night, stealth also generates 15% faster while standing still\n" - + "During an eclipse both boosts increase to 20%"); + Tooltip.SetDefault("Rogue stealth generates 10% faster while moving and 15% faster while standing still"); } public override void SetDefaults() diff --git a/Items/Potions/ShadowPotion.cs b/Items/Potions/ShadowPotion.cs index f8143c4e01..bc2cbddb09 100644 --- a/Items/Potions/ShadowPotion.cs +++ b/Items/Potions/ShadowPotion.cs @@ -13,10 +13,10 @@ namespace CalamityMod.Items.Potions { SacrificeTotal = 20; DisplayName.SetDefault("Shadow Potion"); - Tooltip.SetDefault("Causes the player to disappear while not attacking\n" + - "Holding different types of rogue weapons give the player boosts\n" + - "Different types of rogue weapons spawn different projectiles on hit\n" + - "Stealth generation is increased by 10%"); + Tooltip.SetDefault("Turns the player into a shadow with glowing eyes\n" + + "Rogue weapons spawn projectiles on hit\n" + + "Stealth generation is increased by 8%\n" + + "Visual effects can be disabled with the Stealth Invisibility config"); } public override void SetDefaults() diff --git a/Items/Weapons/Rogue/BlazingStar.cs b/Items/Weapons/Rogue/BlazingStar.cs index 92eee0aaf4..51ab5becbb 100644 --- a/Items/Weapons/Rogue/BlazingStar.cs +++ b/Items/Weapons/Rogue/BlazingStar.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetStaticDefaults() { DisplayName.SetDefault("Blazing Star"); - Tooltip.SetDefault("Stacks up to 4\n" + + Tooltip.SetDefault("Stacks up to 3\n" + "Stealth strikes release all stars at once with infinite piercing"); - SacrificeTotal = 4; + SacrificeTotal = 3; } public override void SetDefaults() @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item1; - Item.maxStack = 4; + Item.maxStack = 3; Item.shootSpeed = Speed; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Rogue/BouncySpikyBall.cs b/Items/Weapons/Rogue/BouncySpikyBall.cs index 51f1d9d016..b8e18f7e76 100644 --- a/Items/Weapons/Rogue/BouncySpikyBall.cs +++ b/Items/Weapons/Rogue/BouncySpikyBall.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue DisplayName.SetDefault("Bouncy Spiky Ball"); Tooltip.SetDefault(@"Throws a very bouncy ball that ricochets off walls and enemies Receives a small boost in damage and velocity after bouncing off an enemy -Stealth strikes provide a bigger boost after ricocheting"); +Stealth strikes throw four at once and provide a bigger boost after ricocheting"); SacrificeTotal = 99; } @@ -44,9 +44,17 @@ Stealth strikes provide a bigger boost after ricocheting"); { if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike { - int stealth = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); - if (stealth.WithinBounds(Main.maxProjectiles)) - Main.projectile[stealth].Calamity().stealthStrike = true; + int spread = 3; + for (int i = 0; i < 4; i++) + { + Vector2 perturbedspeed = new Vector2(velocity.X + Main.rand.Next(-3,4), velocity.Y + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread)); + int proj = Projectile.NewProjectile(source, position, perturbedspeed, type, damage, knockback, player.whoAmI); + if (proj.WithinBounds(Main.maxProjectiles)) + { + Main.projectile[proj].Calamity().stealthStrike = true; + } + spread -= Main.rand.Next(1,4); + } return false; } return true; diff --git a/Items/Weapons/Rogue/CobaltKunai.cs b/Items/Weapons/Rogue/CobaltKunai.cs index 942afd6af6..0294996832 100644 --- a/Items/Weapons/Rogue/CobaltKunai.cs +++ b/Items/Weapons/Rogue/CobaltKunai.cs @@ -41,8 +41,6 @@ namespace CalamityMod.Items.Weapons.Rogue { if (player.Calamity().StealthStrikeAvailable()) { - damage = (int)(damage * 1.4f); - for (int i = -6; i <= 6; i += 6) { Vector2 perturbedSpeed = velocity.RotatedBy(MathHelper.ToRadians(i)); diff --git a/Items/Weapons/Rogue/FeatherKnife.cs b/Items/Weapons/Rogue/FeatherKnife.cs index 2c31495cd1..6f7fc3fef1 100644 --- a/Items/Weapons/Rogue/FeatherKnife.cs +++ b/Items/Weapons/Rogue/FeatherKnife.cs @@ -21,17 +21,17 @@ Stealth strike throws a volley of knives"); public override void SetDefaults() { Item.width = 18; - Item.damage = 25; - Item.noMelee = true; - Item.consumable = true; - Item.noUseGraphic = true; - Item.useAnimation = 11; - Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 18; - Item.knockBack = 2f; - Item.UseSound = SoundID.Item1; - Item.autoReuse = true; Item.height = 32; + Item.noMelee = true; + Item.noUseGraphic = true; + + Item.damage = 16; + Item.useAnimation = Item.useTime = 20; + Item.knockBack = 2f; + Item.autoReuse = true; + Item.consumable = true; + Item.useStyle = ItemUseStyleID.Swing; + Item.UseSound = SoundID.Item1; Item.maxStack = 999; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 25f; diff --git a/Items/Weapons/Rogue/StickySpikyBall.cs b/Items/Weapons/Rogue/StickySpikyBall.cs index 035ed78b17..3954fe5f25 100644 --- a/Items/Weapons/Rogue/StickySpikyBall.cs +++ b/Items/Weapons/Rogue/StickySpikyBall.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue { DisplayName.SetDefault("Sticky Spiky Ball"); Tooltip.SetDefault(@"Throws a spiky ball that sticks to everything -Stealth strikes throw seven at once and last a lot longer"); +Stealth strikes throw four at once and last a lot longer"); SacrificeTotal = 99; } @@ -43,7 +43,7 @@ Stealth strikes throw seven at once and last a lot longer"); if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike { int spread = 3; - for (int i = 0; i < 7; i++) + for (int i = 0; i < 4; i++) { Vector2 perturbedspeed = new Vector2(velocity.X + Main.rand.Next(-3,4), velocity.Y + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread)); int proj = Projectile.NewProjectile(source, position, perturbedspeed, type, damage, knockback, player.whoAmI); diff --git a/Items/Weapons/Melee/Cnidarian.cs b/Items/Weapons/Summon/Cnidarian.cs similarity index 96% rename from Items/Weapons/Melee/Cnidarian.cs rename to Items/Weapons/Summon/Cnidarian.cs index 6f1a636f64..481f383928 100644 --- a/Items/Weapons/Melee/Cnidarian.cs +++ b/Items/Weapons/Summon/Cnidarian.cs @@ -1,6 +1,6 @@ using System.Linq; using CalamityMod.Items.Materials; -using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Summon; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -8,11 +8,11 @@ using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; -namespace CalamityMod.Items.Weapons.Melee +namespace CalamityMod.Items.Weapons.Summon { public class Cnidarian : ModItem { - public override string Texture => "CalamityMod/Items/Weapons/Melee/CnidarianFishingRod"; + public override string Texture => "CalamityMod/Items/Weapons/Summon/CnidarianFishingRod"; public override void SetStaticDefaults() { @@ -135,7 +135,7 @@ namespace CalamityMod.Items.Weapons.Melee public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) { - Texture2D properSprite = ModContent.Request("CalamityMod/Items/Weapons/Melee/Cnidarian").Value; + Texture2D properSprite = ModContent.Request("CalamityMod/Items/Weapons/Summon/Cnidarian").Value; spriteBatch.DrawNewInventorySprite(properSprite, new Vector2(42f, 34), position, drawColor, origin, scale); return false; @@ -143,7 +143,7 @@ namespace CalamityMod.Items.Weapons.Melee public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) { - Texture2D properSprite = ModContent.Request("CalamityMod/Items/Weapons/Melee/Cnidarian").Value; + Texture2D properSprite = ModContent.Request("CalamityMod/Items/Weapons/Summon/Cnidarian").Value; spriteBatch.Draw(properSprite, Item.position - Main.screenPosition, null, lightColor, rotation, properSprite.Size() / 2f, scale, 0, 0); return false; diff --git a/Items/Weapons/Melee/Cnidarian.png b/Items/Weapons/Summon/Cnidarian.png similarity index 100% rename from Items/Weapons/Melee/Cnidarian.png rename to Items/Weapons/Summon/Cnidarian.png diff --git a/Items/Weapons/Melee/CnidarianFishingRod.png b/Items/Weapons/Summon/CnidarianFishingRod.png similarity index 100% rename from Items/Weapons/Melee/CnidarianFishingRod.png rename to Items/Weapons/Summon/CnidarianFishingRod.png diff --git a/Items/Weapons/Summon/TacticalPlagueEngine.cs b/Items/Weapons/Summon/TacticalPlagueEngine.cs index d8a10b8e57..a7d0ed9a71 100644 --- a/Items/Weapons/Summon/TacticalPlagueEngine.cs +++ b/Items/Weapons/Summon/TacticalPlagueEngine.cs @@ -10,6 +10,8 @@ namespace CalamityMod.Items.Weapons.Summon { public class TacticalPlagueEngine : ModItem { + public static int BaseDamage = 52; + public override void SetStaticDefaults() { DisplayName.SetDefault("Tactical Plague Engine"); @@ -21,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - Item.damage = 52; + Item.damage = BaseDamage; Item.mana = 10; Item.width = 28; Item.height = 20; @@ -44,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Summon { int p = Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI, 0f, 1f); if (Main.projectile.IndexInRange(p)) - Main.projectile[p].originalDamage = Item.damage; + Main.projectile[p].originalDamage = BaseDamage; } return false; } diff --git a/Items/Weapons/Typeless/EyeofMagnus.cs b/Items/Weapons/Typeless/EyeofMagnus.cs index bfff5f86d6..6e90590c03 100644 --- a/Items/Weapons/Typeless/EyeofMagnus.cs +++ b/Items/Weapons/Typeless/EyeofMagnus.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Magic; +using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; diff --git a/Localization/CalamityLocalization.cs b/Localization/CalamityLocalization.cs index fa9610dd42..e8be92b01b 100644 --- a/Localization/CalamityLocalization.cs +++ b/Localization/CalamityLocalization.cs @@ -171,17 +171,6 @@ namespace CalamityMod.Localization new [] { "BossRushTierFourEndText2", "Go forth and conquer 'til the ritual's end!" }, new [] { "BossRushTierFiveEndText", "Hmm? You expected a reward beyond this mere pebble? Patience, the true reward will become apparent in time..." }, - new [] { "MeleeLevelUp", "Melee weapon proficiency level up!" }, - new [] { "MeleeLevelUpFinal", "Melee weapon proficiency maxed out!" }, - new [] { "RangedLevelUp", "Ranged weapon proficiency level up!" }, - new [] { "RangedLevelUpFinal", "Ranged weapon proficiency maxed out!" }, - new [] { "MagicLevelUp", "Magic weapon proficiency level up!" }, - new [] { "MagicLevelUpFinal", "Magic weapon proficiency maxed out!" }, - new [] { "SummonLevelUp", "Summoner weapon proficiency level up!" }, - new [] { "SummonLevelUpFinal", "Summoner weapon proficiency maxed out!" }, - new [] { "RogueLevelUp", "Rogue weapon proficiency level up!" }, - new [] { "RogueLevelUpFinal", "Rogue weapon proficiency maxed out!" }, - new [] { "OpenSunkenSea", "The depths of the underground desert are rumbling..." }, new [] { "SandstormTrigger", "The desert wind is blowing furiously!" }, diff --git a/Localization/enUS.hjson b/Localization/enUS.hjson index 18667e034e..4731fe2df1 100644 --- a/Localization/enUS.hjson +++ b/Localization/enUS.hjson @@ -43,7 +43,6 @@ Config: "FasterTilePlacement": "Faster Base Tile Placement Speed", "NerfExpertDebuffs": "Remove Increased Debuff Duration", "ParticleLimit": "Max Particle Limit", - "Proficiency": "Proficiency", "RageMeterPosX": "Rage Meter X Position", "RageMeterPosY": "Rage Meter Y Position", "RemoveReforgeRNG": "Remove Reforge RNG", @@ -90,7 +89,6 @@ Config: "FasterTilePlacement": "Increases the player's base tile placement speed", "NerfExpertDebuffs": "Disables Expert Mode doubling (and Master Mode tripling) the duration of debuffs on the player.\nCalamity is balanced around this setting being enabled.", "ParticleLimit": "Sets the maximum of particle effects that can exist at once.\nParticles are separate from dust and gores.\nTurn down to improve performance.", - "Proficiency": "Enables the Proficiency system which allows the player to gain slight stat bonuses by persistently using one damage class.\nDisabling the system does not remove levels players already have, but disables their stat bonuses and prevents experience gain.", "RageMeterPosX": "The X position of the Rage Meter, measured as a % of your screen width.\nThe meter can be dragged with the mouse if Lock Meter Positions is disabled.", "RageMeterPosY": "The Y position of the Rage Meter, measured as a % of your screen height.\nThe meter can be dragged with the mouse if Lock Meter Positions is disabled.", "RemoveReforgeRNG": "Removes randomness from the Goblin Tinkerer's reforges for both weapons and accessories.\nDisable this if using mods that change reforging on their own to prevent conflicts.", diff --git a/NPCs/Abyss/GulperEelBody.cs b/NPCs/Abyss/GulperEelBody.cs index a6f4082452..7337c4e46d 100644 --- a/NPCs/Abyss/GulperEelBody.cs +++ b/NPCs/Abyss/GulperEelBody.cs @@ -20,8 +20,8 @@ namespace CalamityMod.NPCs.Abyss public override void SetDefaults() { NPC.damage = 90; //70 - NPC.width = 56; //36 - NPC.height = 36; + NPC.width = 40; //36 + NPC.height = 48; NPC.defense = 30; NPC.lifeMax = 60000; NPC.aiStyle = -1; //new @@ -117,9 +117,9 @@ namespace CalamityMod.NPCs.Abyss NPC.position.Y = NPC.position.Y + num192; if (num191 < 0f) - NPC.spriteDirection = -1; - else if (num191 > 0f) NPC.spriteDirection = 1; + else if (num191 > 0f) + NPC.spriteDirection = -1; } } diff --git a/NPCs/Abyss/GulperEelBody.png b/NPCs/Abyss/GulperEelBody.png index 02a0ee98da..fb79dc639f 100644 Binary files a/NPCs/Abyss/GulperEelBody.png and b/NPCs/Abyss/GulperEelBody.png differ diff --git a/NPCs/Abyss/GulperEelBodyAlt.cs b/NPCs/Abyss/GulperEelBodyAlt.cs index bb8228de69..5d39b4fd87 100644 --- a/NPCs/Abyss/GulperEelBodyAlt.cs +++ b/NPCs/Abyss/GulperEelBodyAlt.cs @@ -20,8 +20,8 @@ namespace CalamityMod.NPCs.Abyss public override void SetDefaults() { NPC.damage = 90; //70 - NPC.width = 36; //36 - NPC.height = 36; + NPC.width = 40; //36 + NPC.height = 48; NPC.defense = 30; NPC.lifeMax = 60000; NPC.aiStyle = -1; //new @@ -117,9 +117,9 @@ namespace CalamityMod.NPCs.Abyss NPC.position.Y = NPC.position.Y + num192; if (num191 < 0f) - NPC.spriteDirection = -1; - else if (num191 > 0f) NPC.spriteDirection = 1; + else if (num191 > 0f) + NPC.spriteDirection = -1; } } diff --git a/NPCs/Abyss/GulperEelBodyAlt.png b/NPCs/Abyss/GulperEelBodyAlt.png index 1b715e703f..b913ecfe72 100644 Binary files a/NPCs/Abyss/GulperEelBodyAlt.png and b/NPCs/Abyss/GulperEelBodyAlt.png differ diff --git a/NPCs/Abyss/GulperEelBodyAltGlow.png b/NPCs/Abyss/GulperEelBodyAltGlow.png index 106da36968..363279be79 100644 Binary files a/NPCs/Abyss/GulperEelBodyAltGlow.png and b/NPCs/Abyss/GulperEelBodyAltGlow.png differ diff --git a/NPCs/Abyss/GulperEelBodyGlow.png b/NPCs/Abyss/GulperEelBodyGlow.png index 32fdd42499..bd7324a232 100644 Binary files a/NPCs/Abyss/GulperEelBodyGlow.png and b/NPCs/Abyss/GulperEelBodyGlow.png differ diff --git a/NPCs/Abyss/GulperEelHead.cs b/NPCs/Abyss/GulperEelHead.cs index 616a40f299..911b2bdbc0 100644 --- a/NPCs/Abyss/GulperEelHead.cs +++ b/NPCs/Abyss/GulperEelHead.cs @@ -42,8 +42,8 @@ namespace CalamityMod.NPCs.Abyss { NPC.Calamity().canBreakPlayerDefense = true; NPC.damage = 135; - NPC.width = 66; //36 - NPC.height = 86; //20 + NPC.width = 40; //36 + NPC.height = 84; //20 NPC.defense = 10; NPC.lifeMax = 48000; NPC.aiStyle = -1; @@ -139,11 +139,11 @@ namespace CalamityMod.NPCs.Abyss } if (NPC.velocity.X < 0f) { - NPC.spriteDirection = -1; + NPC.spriteDirection = 1; } else if (NPC.velocity.X > 0f) { - NPC.spriteDirection = 1; + NPC.spriteDirection = -1; } if (Main.player[NPC.target].dead) { diff --git a/NPCs/Abyss/GulperEelHead.png b/NPCs/Abyss/GulperEelHead.png index 00e25c1d75..b840a7904d 100644 Binary files a/NPCs/Abyss/GulperEelHead.png and b/NPCs/Abyss/GulperEelHead.png differ diff --git a/NPCs/Abyss/GulperEelHeadGlow.png b/NPCs/Abyss/GulperEelHeadGlow.png index 10b965122b..f7d7b57f39 100644 Binary files a/NPCs/Abyss/GulperEelHeadGlow.png and b/NPCs/Abyss/GulperEelHeadGlow.png differ diff --git a/NPCs/Abyss/GulperEelTail.cs b/NPCs/Abyss/GulperEelTail.cs index 830e6e6e83..31fbd435bf 100644 --- a/NPCs/Abyss/GulperEelTail.cs +++ b/NPCs/Abyss/GulperEelTail.cs @@ -20,8 +20,8 @@ namespace CalamityMod.NPCs.Abyss public override void SetDefaults() { NPC.damage = 65; //70 - NPC.width = 54; //28 - NPC.height = 76; //28 + NPC.width = 40; //28 + NPC.height = 54; //28 NPC.defense = 50; NPC.lifeMax = 60000; NPC.aiStyle = -1; //new @@ -117,9 +117,9 @@ namespace CalamityMod.NPCs.Abyss NPC.position.Y = NPC.position.Y + num192; if (num191 < 0f) - NPC.spriteDirection = -1; - else if (num191 > 0f) NPC.spriteDirection = 1; + else if (num191 > 0f) + NPC.spriteDirection = -1; } } diff --git a/NPCs/Abyss/GulperEelTail.png b/NPCs/Abyss/GulperEelTail.png index 5ad140ba0a..acade0c0a0 100644 Binary files a/NPCs/Abyss/GulperEelTail.png and b/NPCs/Abyss/GulperEelTail.png differ diff --git a/NPCs/Abyss/GulperEelTailGlow.png b/NPCs/Abyss/GulperEelTailGlow.png index b7a15e8890..b07de25a2d 100644 Binary files a/NPCs/Abyss/GulperEelTailGlow.png and b/NPCs/Abyss/GulperEelTailGlow.png differ diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 845f505b7e..08f22f201d 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -4365,6 +4365,17 @@ namespace CalamityMod.NPCs // Apply balancing resists/vulnerabilities. BalancingChangesManager.ApplyFromProjectile(npc, ref damage, projectile); + if (CalamityLists.GrenadeResistIDs.Contains(projectile.type)) + { + // Eater of Worlds has a vanilla resist in Expert+, this gives it to him in Normal mode + bool hasResist = CalamityLists.EaterofWorldsIDs.Contains(npc.type) && !Main.expertMode; + // Add a resist for BoC's creepers and Prehardmode worm bosses + if (npc.type == NPCID.Creeper || CalamityLists.DesertScourgeIDs.Contains(npc.type) || CalamityLists.PerforatorIDs.Contains(npc.type)) + hasResist = true; + if (hasResist) + damage = (int)(damage * 0.2); + } + if (CalamityLists.pierceResistList.Contains(npc.type)) PierceResistGlobal(projectile, npc, ref damage); @@ -4375,14 +4386,6 @@ namespace CalamityMod.NPCs // TODO -- What in god's name is this? private void PierceResistGlobal(Projectile projectile, NPC npc, ref int damage) { - if (CalamityLists.GrenadeResistIDs.Contains(projectile.type)) - { - if (!CalamityLists.EaterofWorldsIDs.Contains(npc.type)) - damage = (int)(damage * 0.2); - else if (!Main.expertMode) - damage = (int)(damage * 0.2); - } - // Thanatos segments do not trigger pierce resistance if they are closed if (CalamityLists.ThanatosIDs.Contains(npc.type) && unbreakableDR) return; @@ -4393,7 +4396,7 @@ namespace CalamityMod.NPCs damage -= (int)(damage * damageReduction); - if ((projectile.penetrate > 1 || projectile.penetrate == -1) && !CalamityLists.pierceResistExceptionList.Contains(projectile.type) && !projectile.IsSummon() && projectile.aiStyle != 15 && projectile.aiStyle != 39 && projectile.aiStyle != 99) + if ((projectile.penetrate > 1 || projectile.penetrate == -1) && !CalamityLists.pierceResistExceptionList.Contains(projectile.type) && !projectile.CountsAsClass() && projectile.aiStyle != 15 && projectile.aiStyle != 39 && projectile.aiStyle != 99) projectile.Calamity().timesPierced++; } #endregion diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index a86e0511fa..1002a52836 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -1597,12 +1597,7 @@ namespace CalamityMod.NPCs if (type == NPCID.GoblinTinkerer) { SetShopItem(ref shop, ref nextSlot, ItemID.StinkPotion, true, Item.buyPrice(0, 1, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemType(), price: Item.buyPrice(0, 5)); - SetShopItem(ref shop, ref nextSlot, ItemType(), price: Item.buyPrice(0, 5)); - SetShopItem(ref shop, ref nextSlot, ItemType(), price: Item.buyPrice(0, 5)); - SetShopItem(ref shop, ref nextSlot, ItemType(), price: Item.buyPrice(0, 5)); - SetShopItem(ref shop, ref nextSlot, ItemType(), price: Item.buyPrice(0, 5)); - SetShopItem(ref shop, ref nextSlot, ItemType(), price: Item.buyPrice(0, 5)); + SetShopItem(ref shop, ref nextSlot, ItemType()); } if (type == NPCID.Mechanic) diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 5141294361..bfddbda64d 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -1897,8 +1897,8 @@ namespace CalamityMod.NPCs.Providence ModContent.ProjectileType() }; - bool allowedClass = projectile.IsSummon() || (!projectile.CountsAsClass() && !projectile.CountsAsClass() && - !projectile.CountsAsClass() && !projectile.CountsAsClass()); + bool allowedClass = projectile.CountsAsClass() || (!projectile.CountsAsClass() && !projectile.CountsAsClass() && + !projectile.CountsAsClass() && !projectile.CountsAsClass() && !projectile.CountsAsClass()); bool allowedDamage = allowedClass && damage <= 75; //Flat 75 regardless of difficulty. //Absorber on-hit effects likely won't proc this but Deific Amulet and Astral Bulwark stars will proc this. bool allowedBabs = Main.player[projectile.owner].Calamity().pArtifact && !Main.player[projectile.owner].Calamity().profanedCrystalBuffs; diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index a74d5504f5..73092b4db1 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -135,6 +135,10 @@ namespace CalamityMod.Projectiles { CreatedByPlayerDash = source is ProjectileSource_PlayerDashHit; + IEntitySource sourceItem = source as EntitySource_ItemUse_WithAmmo; + if (sourceItem != null) + extorterBoost = true; + // TODO -- it would be nice to move frame one hacks here, but this runs in the middle of NewProjectile // which is way too early, the projectile's own initialization isn't even done yet } @@ -2397,9 +2401,6 @@ namespace CalamityMod.Projectiles damage = (int)Math.Ceiling(damage * proximityDamageFactor); } - if (!projectile.npcProj && !projectile.trap && projectile.CountsAsClass() && stealthStrike && modPlayer.stealthStrikeAlwaysCrits) - crit = true; - // Aerial Bane does 50% damage to "airborne" enemies. This is just simple math to revert that as it is a very unbalanced mechanic. if (projectile.type == ProjectileID.DD2BetsyArrow) { @@ -2569,7 +2570,7 @@ namespace CalamityMod.Projectiles { if (projectile.CountsAsClass()) { - if (modPlayer.etherealExtorter && Main.player[projectile.owner].ownedProjectileCounts[ProjectileType()] < 5) + if (modPlayer.etherealExtorter && extorterBoost && Main.player[projectile.owner].ownedProjectileCounts[ProjectileType()] < 5) { for (int i = 0; i < 2; i++) { @@ -2582,13 +2583,14 @@ namespace CalamityMod.Projectiles } } - if (modPlayer.scuttlersJewel && stealthStrike) + if (modPlayer.scuttlersJewel && stealthStrike && modPlayer.scuttlerCooldown <= 0) { - int damage = (int)player.GetTotalDamage().ApplyTo(15); + int damage = (int)player.GetTotalDamage().ApplyTo(20); int spike = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType(), damage, projectile.knockBack, projectile.owner); Main.projectile[spike].frame = 4; if (spike.WithinBounds(Main.maxProjectiles)) Main.projectile[spike].DamageType = DamageClass.Generic; + modPlayer.scuttlerCooldown = 30; } } diff --git a/Projectiles/Magic/MagnusBeam.cs b/Projectiles/Magic/MagnusBeam.cs deleted file mode 100644 index 0755aef63b..0000000000 --- a/Projectiles/Magic/MagnusBeam.cs +++ /dev/null @@ -1,287 +0,0 @@ -using CalamityMod.Buffs.StatDebuffs; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Terraria.Audio; - -namespace CalamityMod.Projectiles.Magic -{ - public class MagnusBeam : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Beam"); - } - - public override void SetDefaults() - { - Projectile.width = 8; - Projectile.height = 8; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.penetrate = 1; - Projectile.extraUpdates = 2; - Projectile.alpha = 0; - } - - public override void AI() - { - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X); - float num29 = 5f; - float num30 = 150f; - float scaleFactor = 6f; - Vector2 value7 = new Vector2(10f, 20f); - float num31 = 1f; - int num32 = 3 * Projectile.MaxUpdates; - int num33 = Utils.SelectRandom(Main.rand, new int[] - { - 56, - 92, - 229, - 206, - 181 - }); - int num34 = 261; - if (Projectile.ai[1] == 0f) - { - Projectile.ai[1] = 1f; - Projectile.localAI[0] = (float)-(float)Main.rand.Next(48); - } - else if (Projectile.ai[1] == 1f && Projectile.owner == Main.myPlayer) - { - int num35 = -1; - float num36 = num30; - for (int num37 = 0; num37 < 200; num37++) - { - if (Main.npc[num37].active && Main.npc[num37].CanBeChasedBy(Projectile, false)) - { - Vector2 center3 = Main.npc[num37].Center; - float num38 = Vector2.Distance(center3, Projectile.Center); - if (num38 < num36 && num35 == -1 && Collision.CanHitLine(Projectile.Center, 1, 1, center3, 1, 1)) - { - num36 = num38; - num35 = num37; - } - } - } - if (num36 < 8f) - { - Projectile.Kill(); - return; - } - if (num35 != -1) - { - Projectile.ai[1] = num29 + 1f; - Projectile.ai[0] = (float)num35; - Projectile.netUpdate = true; - } - } - else if (Projectile.ai[1] > num29) - { - Projectile.ai[1] += 1f; - int num39 = (int)Projectile.ai[0]; - if (!Main.npc[num39].active || !Main.npc[num39].CanBeChasedBy(Projectile, false)) - { - Projectile.ai[1] = 1f; - Projectile.ai[0] = 0f; - Projectile.netUpdate = true; - } - else - { - Projectile.velocity.ToRotation(); - Vector2 vector6 = Main.npc[num39].Center - Projectile.Center; - if (vector6.Length() < 20f) - { - Projectile.Kill(); - return; - } - if (vector6 != Vector2.Zero) - { - vector6.Normalize(); - vector6 *= scaleFactor; - } - float num40 = 30f; - Projectile.velocity = (Projectile.velocity * (num40 - 1f) + vector6) / num40; - } - } - if (Projectile.ai[1] >= 1f && Projectile.ai[1] < num29) - { - Projectile.ai[1] += 1f; - if (Projectile.ai[1] == num29) - { - Projectile.ai[1] = 1f; - } - } - Projectile.localAI[0] += 1f; - if (Projectile.localAI[0] == 48f) - { - Projectile.localAI[0] = 0f; - } - else if (Projectile.alpha == 0) - { - for (int num41 = 0; num41 < 2; num41++) - { - Vector2 value8 = Vector2.UnitX * -30f; - value8 = -Vector2.UnitY.RotatedBy((double)(Projectile.localAI[0] * 0.1308997f + (float)num41 * 3.14159274f), default) * value7 - Projectile.rotation.ToRotationVector2() * 10f; - int num42 = Dust.NewDust(Projectile.Center, 0, 0, num34, 0f, 0f, 160, default, 1f); - Main.dust[num42].scale = num31; - Main.dust[num42].noGravity = true; - Main.dust[num42].position = Projectile.Center + value8 + Projectile.velocity * 2f; - Main.dust[num42].velocity = Vector2.Normalize(Projectile.Center + Projectile.velocity * 2f * 8f - Main.dust[num42].position) * 2f + Projectile.velocity * 2f; - } - } - if (Main.rand.NextBool(12)) - { - Vector2 value9 = -Vector2.UnitX.RotatedByRandom(0.2).RotatedBy((double)Projectile.velocity.ToRotation(), default); - int num44 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 234, 0f, 0f, 100, default, 1f); - Main.dust[num44].velocity *= 0.1f; - Main.dust[num44].position = Projectile.Center + value9 * (float)Projectile.width / 2f + Projectile.velocity * 2f; - Main.dust[num44].fadeIn = 0.9f; - } - if (Main.rand.NextBool(64)) - { - Vector2 value10 = -Vector2.UnitX.RotatedByRandom(0.4).RotatedBy((double)Projectile.velocity.ToRotation(), default); - int num46 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 234, 0f, 0f, 155, default, 0.8f); - Main.dust[num46].velocity *= 0.3f; - Main.dust[num46].position = Projectile.Center + value10 * (float)Projectile.width / 2f; - if (Main.rand.NextBool(2)) - { - Main.dust[num46].fadeIn = 1.4f; - } - } - if (Main.rand.NextBool(4)) - { - for (int num47 = 0; num47 < 2; num47++) - { - Vector2 value11 = -Vector2.UnitX.RotatedByRandom(0.8).RotatedBy((double)Projectile.velocity.ToRotation(), default); - int num48 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, num33, 0f, 0f, 0, default, 1.2f); - Main.dust[num48].velocity *= 0.3f; - Main.dust[num48].noGravity = true; - Main.dust[num48].position = Projectile.Center + value11 * (float)Projectile.width / 2f; - if (Main.rand.NextBool(2)) - { - Main.dust[num48].fadeIn = 1.4f; - } - } - } - if (Main.rand.NextBool(3)) - { - Vector2 value13 = -Vector2.UnitX.RotatedByRandom(0.2).RotatedBy((double)Projectile.velocity.ToRotation(), default); - int num50 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, num34, 0f, 0f, 100, default, 1f); - Main.dust[num50].velocity *= 0.3f; - Main.dust[num50].position = Projectile.Center + value13 * (float)Projectile.width / 2f; - Main.dust[num50].fadeIn = 1.2f; - Main.dust[num50].scale = 1.5f; - Main.dust[num50].noGravity = true; - } - Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.25f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.25f / 255f); - for (int num151 = 0; num151 < 2; num151++) - { - int num154 = 14; - int num155 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width - num154 * 2, Projectile.height - num154 * 2, 263, 0f, 0f, 100, default, 1.35f); - Main.dust[num155].noGravity = true; - Main.dust[num155].velocity *= 0.1f; - Main.dust[num155].velocity += Projectile.velocity * 0.5f; - } - if (Main.rand.NextBool(8)) - { - int num156 = 16; - int num157 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width - num156 * 2, Projectile.height - num156 * 2, 263, 0f, 0f, 100, default, 1f); - Main.dust[num157].velocity *= 0.25f; - Main.dust[num157].noGravity = true; - Main.dust[num157].velocity += Projectile.velocity * 0.5f; - } - } - - public override bool PreDraw(ref Color lightColor) - { - Texture2D tex = ModContent.Request(Texture).Value; - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); - return false; - } - - public override void OnHitPvp(Player target, int damage, bool crit) - { - target.AddBuff(ModContent.BuffType(), 480); - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 480); - - if (!target.canGhostHeal || Main.player[Projectile.owner].moonLeech) - return; - - Player player = Main.player[Projectile.owner]; - player.statLife += 1; - player.statMana += 25; - player.HealEffect(1); - player.ManaEffect(25); - } - - public override void Kill(int timeLeft) - { - int num47 = Utils.SelectRandom(Main.rand, new int[] - { - 56, - 92, - 229, - 206, - 181 - }); - int num48 = 263; - int num49 = 263; - int height = 50; - float num50 = 1.7f; - float num51 = 0.8f; - float num52 = 2f; - Vector2 value3 = (Projectile.rotation - 1.57079637f).ToRotationVector2(); - Vector2 value4 = value3 * Projectile.velocity.Length() * (float)Projectile.MaxUpdates; - SoundEngine.PlaySound(SoundID.Item14, Projectile.position); - Projectile.position = Projectile.Center; - Projectile.width = Projectile.height = height; - Projectile.Center = Projectile.position; - Projectile.maxPenetrate = -1; - Projectile.penetrate = -1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; - Projectile.Damage(); - for (int num53 = 0; num53 < 40; num53++) - { - num47 = Utils.SelectRandom(Main.rand, new int[] - { - 56, - 92, - 229, - 206, - 181 - }); - int num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, num47, 0f, 0f, 200, default, num50); - 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.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); - dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; - dust.velocity *= 2f; - dust.noGravity = true; - dust.fadeIn = 1f; - dust.color = Color.Crimson * 0.5f; - dust.velocity += value4 * Main.rand.NextFloat(); - } - for (int num55 = 0; num55 < 20; num55++) - { - int num56 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, num49, 0f, 0f, 0, default, num52); - 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.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat()); - } - } - } -} diff --git a/Projectiles/Rogue/DestructionStar.cs b/Projectiles/Rogue/DestructionStar.cs index 7c6ce73ee7..b07418d7f7 100644 --- a/Projectiles/Rogue/DestructionStar.cs +++ b/Projectiles/Rogue/DestructionStar.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.penetrate = 16; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; + Projectile.localNPCHitCooldown = 5; Projectile.ignoreWater = true; Projectile.tileCollide = false; Projectile.timeLeft = 300; @@ -76,6 +76,8 @@ namespace CalamityMod.Projectiles.Rogue } if (Projectile.owner == Main.myPlayer) { + if (hitCount < 4) + hitCount = 4; for (int i = 0; i < hitCount; i++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); diff --git a/Projectiles/Melee/CnidarianJellyfishOnTheString.cs b/Projectiles/Summon/CnidarianJellyfishOnTheString.cs similarity index 99% rename from Projectiles/Melee/CnidarianJellyfishOnTheString.cs rename to Projectiles/Summon/CnidarianJellyfishOnTheString.cs index 7057dad097..8c8d172ccc 100644 --- a/Projectiles/Melee/CnidarianJellyfishOnTheString.cs +++ b/Projectiles/Summon/CnidarianJellyfishOnTheString.cs @@ -1,8 +1,9 @@ -using System; +using CalamityMod.DataStructures; +using CalamityMod.Particles; +using System; using System.Collections.Generic; using System.IO; using System.Linq; -using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -11,11 +12,9 @@ using Terraria.ID; using Terraria.ModLoader; using static CalamityMod.CalamityUtils; using static Terraria.ModLoader.ModContent; -using CalamityMod.DataStructures; -namespace CalamityMod.Projectiles.Melee +namespace CalamityMod.Projectiles.Summon { - public class CnidarianJellyfishOnTheString : ModProjectile { public const int SegmentCount = 10; diff --git a/Projectiles/Melee/CnidarianJellyfishOnTheString.png b/Projectiles/Summon/CnidarianJellyfishOnTheString.png similarity index 100% rename from Projectiles/Melee/CnidarianJellyfishOnTheString.png rename to Projectiles/Summon/CnidarianJellyfishOnTheString.png diff --git a/Projectiles/Melee/CnidarianSpark.cs b/Projectiles/Summon/CnidarianSpark.cs similarity index 98% rename from Projectiles/Melee/CnidarianSpark.cs rename to Projectiles/Summon/CnidarianSpark.cs index 009e7f9469..86c3bf9010 100644 --- a/Projectiles/Melee/CnidarianSpark.cs +++ b/Projectiles/Summon/CnidarianSpark.cs @@ -4,7 +4,7 @@ using Terraria; using Terraria.Audio; using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Melee +namespace CalamityMod.Projectiles.Summon { public class CnidarianSpark : ModProjectile { diff --git a/Projectiles/Melee/CnidarianSpark.png b/Projectiles/Summon/CnidarianSpark.png similarity index 100% rename from Projectiles/Melee/CnidarianSpark.png rename to Projectiles/Summon/CnidarianSpark.png diff --git a/Projectiles/Summon/GiantIbanRobotOfDoom.cs b/Projectiles/Summon/GiantIbanRobotOfDoom.cs index e1f709f43a..748d5861c2 100644 --- a/Projectiles/Summon/GiantIbanRobotOfDoom.cs +++ b/Projectiles/Summon/GiantIbanRobotOfDoom.cs @@ -345,7 +345,7 @@ namespace CalamityMod.Projectiles.Summon 8f, Projectile.owner, Projectile.whoAmI); - deathLaser.originalDamage = damage; + deathLaser.originalDamage = LaserBaseDamage; if (player.HeldItem != null && deathLaser.whoAmI.WithinBounds(Main.maxProjectiles)) deathLaser.DamageType = DamageClass.Summon; } diff --git a/Projectiles/Summon/HowlsHeartHowl.cs b/Projectiles/Summon/HowlsHeartHowl.cs index 9a731e448b..916b5ab63f 100644 --- a/Projectiles/Summon/HowlsHeartHowl.cs +++ b/Projectiles/Summon/HowlsHeartHowl.cs @@ -266,7 +266,7 @@ namespace CalamityMod.Projectiles.Summon targetVec *= speedMult; SoundEngine.PlaySound(SoundID.Item20, Projectile.position); int fireball = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, targetVec, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, targetIndex, 0f); - Main.projectile[fireball].originalDamage = Projectile.damage; + Main.projectile[fireball].originalDamage = Projectile.originalDamage; Main.projectile[fireball].netUpdate = true; Main.projectile[fireball].frame = Main.rand.Next(4); Projectile.netUpdate = true; diff --git a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs index 8b930c76c6..fec561c763 100644 --- a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs +++ b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs @@ -35,6 +35,7 @@ namespace CalamityMod.Projectiles.Summon if (!hit) mult = enrage ? 0.2f : 0.1f; //punishing to miss int damage = (int)((Projectile.damage * 0.2f) * mult); + int origDmg = (int)((Projectile.originalDamage * 0.2f) * mult); float outerAngleVariance = MathHelper.TwoPi / (float)outerSplits; float outerOffsetAngle = MathHelper.Pi / (2f * outerSplits); @@ -52,7 +53,7 @@ namespace CalamityMod.Projectiles.Summon int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + outerPosVec, velocity, ModContent.ProjectileType(), damage, Projectile.knockBack, Projectile.owner, 0f, 0f); if (proj.WithinBounds(Main.maxProjectiles)) { - Main.projectile[proj].originalDamage = damage; + Main.projectile[proj].originalDamage = origDmg; Main.projectile[proj].DamageType = DamageClass.Summon; } if (innerSplits > 0) //only runs if there's still inner splits to create @@ -64,7 +65,7 @@ namespace CalamityMod.Projectiles.Summon proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + innerPosVec, velocity, ModContent.ProjectileType(), damage, Projectile.knockBack, Projectile.owner, 0f, 0f); if (proj.WithinBounds(Main.maxProjectiles)) { - Main.projectile[proj].originalDamage = damage; + Main.projectile[proj].originalDamage = origDmg; Main.projectile[proj].DamageType = DamageClass.Summon; } } diff --git a/Projectiles/Summon/SarosAura.cs b/Projectiles/Summon/SarosAura.cs index 7c07476c4c..15422d540b 100644 --- a/Projectiles/Summon/SarosAura.cs +++ b/Projectiles/Summon/SarosAura.cs @@ -62,6 +62,7 @@ namespace CalamityMod.Projectiles.Summon softcappedDamageMultiplier = ((damageMultiplier - 3f) * 0.1f) + 3f; int radiantOrbDamage = (int)(Projectile.damage * softcappedDamageMultiplier); + int radiantOrbOriginalDamage = (int)(Projectile.originalDamage * softcappedDamageMultiplier); int radiantOrbAppearRate = (int)(130 * Math.Pow(0.9, AllocatedSlots)); // Hard-cap the orb appear rate and damage. @@ -76,7 +77,7 @@ namespace CalamityMod.Projectiles.Summon GeneralTimer++; NPC potentialTarget = Projectile.Center.MinionHoming(TargetCheckDistance, Owner); if (potentialTarget != null && Main.myPlayer == Projectile.owner) - AttackTarget(potentialTarget, radiantOrbAppearRate, radiantOrbDamage); + AttackTarget(potentialTarget, radiantOrbAppearRate, radiantOrbDamage, radiantOrbOriginalDamage); } public void VerifyIdentityOfCaller() @@ -93,7 +94,7 @@ namespace CalamityMod.Projectiles.Summon } } - public void AttackTarget(NPC target, int radiantOrbAppearRate, int radiantOrbDamage) + public void AttackTarget(NPC target, int radiantOrbAppearRate, int radiantOrbDamage, int radiantOrbOriginalDamage) { if (GeneralTimer % 35f == 34f) { @@ -103,7 +104,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 fireVelocity = Projectile.SafeDirectionTo(target.Center).RotatedBy(angle) * 15f; int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, fireVelocity, ModContent.ProjectileType(), radiantOrbDamage / 2, Projectile.knockBack, Projectile.owner); if (Main.projectile.IndexInRange(p)) - Main.projectile[p].originalDamage = radiantOrbDamage / 2; + Main.projectile[p].originalDamage = radiantOrbOriginalDamage / 2; } } @@ -113,14 +114,14 @@ namespace CalamityMod.Projectiles.Summon Vector2 bootlegRadianceOrbVelocity = Projectile.SafeDirectionTo(target.Center) * 2f; int p2 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPosition, bootlegRadianceOrbVelocity, ModContent.ProjectileType(), radiantOrbDamage, Projectile.knockBack * 4f, Projectile.owner); if (Main.projectile.IndexInRange(p2)) - Main.projectile[p2].originalDamage = radiantOrbDamage; + Main.projectile[p2].originalDamage = radiantOrbOriginalDamage; for (int i = 0; i < 3; i++) { float angle = MathHelper.Lerp(-MathHelper.ToRadians(30f), MathHelper.ToRadians(30f), i / 3f); Vector2 fireVelocity = Projectile.SafeDirectionTo(target.Center).RotatedBy(angle) * 19f; int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, fireVelocity, ModContent.ProjectileType(), radiantOrbDamage / 2, Projectile.knockBack, Projectile.owner); if (Main.projectile.IndexInRange(p)) - Main.projectile[p].originalDamage = radiantOrbDamage / 2; + Main.projectile[p].originalDamage = radiantOrbOriginalDamage / 2; } } } diff --git a/Projectiles/Summon/TacticalPlagueJet.cs b/Projectiles/Summon/TacticalPlagueJet.cs index 2a457faa01..4b961c6b88 100644 --- a/Projectiles/Summon/TacticalPlagueJet.cs +++ b/Projectiles/Summon/TacticalPlagueJet.cs @@ -1,4 +1,6 @@ using CalamityMod.Buffs.Summon; +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.CalPlayer; using CalamityMod.Dusts; using Microsoft.Xna.Framework; @@ -41,9 +43,10 @@ namespace CalamityMod.Projectiles.Summon // The false gun's damage is changed to the appropriate value every time a Tactical Plague Jet wants to fire a bullet. private static void DefineFalseGun() { - int p90ID = ModContent.ItemType(); + int p90ID = ModContent.ItemType(); FalseGun = new Item(); FalseGun.SetDefaults(p90ID, true); + FalseGun.damage = TacticalPlagueEngine.BaseDamage; FalseGun.consumeAmmoOnFirstShotOnly = false; FalseGun.consumeAmmoOnLastShotOnly = false; @@ -174,14 +177,14 @@ namespace CalamityMod.Projectiles.Summon } // Fire the selected bullet, nothing special. - else { - projIndex = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.SafeDirectionTo(potentialTarget.Center) * shootSpeed, projID, damage, kb, Projectile.owner);} + else + projIndex = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.SafeDirectionTo(potentialTarget.Center) * shootSpeed, projID, damage, kb, Projectile.owner); // Regardless of what was fired, force it to be a summon projectile so that summon accessories work. if (projIndex.WithinBounds(Main.maxProjectiles)) { Main.projectile[projIndex].DamageType = DamageClass.Summon; - Main.projectile[projIndex].originalDamage = Projectile.originalDamage; + Main.projectile[projIndex].minion = false; } } diff --git a/Projectiles/Summon/UniverseSplitterField.cs b/Projectiles/Summon/UniverseSplitterField.cs index 41d8ff0ef3..9e71901e7d 100644 --- a/Projectiles/Summon/UniverseSplitterField.cs +++ b/Projectiles/Summon/UniverseSplitterField.cs @@ -143,7 +143,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.knockBack, Projectile.owner, (-Vector2.Normalize(offset)).ToRotation()); - Main.projectile[beam].originalDamage = Projectile.damage; + Main.projectile[beam].originalDamage = Projectile.originalDamage; } } // Summon a giant beam @@ -158,7 +158,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.knockBack, Projectile.owner, 0f); - Main.projectile[beam].originalDamage = Projectile.damage; + Main.projectile[beam].originalDamage = Projectile.originalDamage; } } diff --git a/Projectiles/Summon/WitherBolt.cs b/Projectiles/Summon/WitherBolt.cs index 241e6cd0c1..99c44f9c0d 100644 --- a/Projectiles/Summon/WitherBolt.cs +++ b/Projectiles/Summon/WitherBolt.cs @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Summon { Vector2 spawnPosition = Projectile.Center + Main.rand.NextVector2CircularEdge(8f, 8f); int seeker = Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPosition, Main.rand.NextVector2Circular(12f, 12f), ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack, Projectile.owner); - Main.projectile[seeker].originalDamage = Projectile.damage / 2; + Main.projectile[seeker].originalDamage = Projectile.originalDamage / 2; Main.projectile[seeker].DamageType = DamageClass.Summon; } } diff --git a/Projectiles/Summon/FungalClumpMinion.cs b/Projectiles/Typeless/FungalClumpMinion.cs similarity index 91% rename from Projectiles/Summon/FungalClumpMinion.cs rename to Projectiles/Typeless/FungalClumpMinion.cs index aa5799513f..8a71041e9d 100644 --- a/Projectiles/Summon/FungalClumpMinion.cs +++ b/Projectiles/Typeless/FungalClumpMinion.cs @@ -6,7 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Summon +namespace CalamityMod.Projectiles.Typeless { public class FungalClumpMinion : ModProjectile { @@ -28,11 +28,9 @@ namespace CalamityMod.Projectiles.Summon Projectile.friendly = true; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 10; - Projectile.minionSlots = 0f; Projectile.timeLeft = 18000; Projectile.penetrate = -1; Projectile.timeLeft *= 5; - Projectile.minion = true; Projectile.tileCollide = false; } @@ -59,6 +57,8 @@ namespace CalamityMod.Projectiles.Summon } } + Projectile.damage = (int)player.GetBestClassDamage().ApplyTo(Projectile.originalDamage); + //Animation Projectile.frameCounter++; if (Projectile.frameCounter > 6) @@ -74,16 +74,16 @@ namespace CalamityMod.Projectiles.Summon //Initializing dust and damage if (Projectile.localAI[0] == 0f) { - int num226 = 36; - for (int num227 = 0; num227 < num226; num227++) + int dustAmt = 36; + for (int i = 0; i < dustAmt; i++) { - Vector2 vector6 = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f; - vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + Projectile.Center; - Vector2 vector7 = vector6 - Projectile.Center; - int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 56, vector7.X * 1.5f, vector7.Y * 1.5f, 100, default, 1.4f); - Main.dust[num228].noGravity = true; - Main.dust[num228].noLight = true; - Main.dust[num228].velocity = vector7; + Vector2 spawnPos = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f; + spawnPos = spawnPos.RotatedBy((double)((float)(i - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Projectile.Center; + Vector2 velocity = spawnPos - Projectile.Center; + int idx = Dust.NewDust(spawnPos + velocity, 0, 0, 56, velocity.X * 1.5f, velocity.Y * 1.5f, 100, default, 1.4f); + Main.dust[idx].noGravity = true; + Main.dust[idx].noLight = true; + Main.dust[idx].velocity = velocity; } Projectile.localAI[0] += 1f; } diff --git a/Projectiles/Summon/FungalClumpMinion.png b/Projectiles/Typeless/FungalClumpMinion.png similarity index 100% rename from Projectiles/Summon/FungalClumpMinion.png rename to Projectiles/Typeless/FungalClumpMinion.png diff --git a/Projectiles/Typeless/MagnusBeam.cs b/Projectiles/Typeless/MagnusBeam.cs new file mode 100644 index 0000000000..5bbcd2ce1f --- /dev/null +++ b/Projectiles/Typeless/MagnusBeam.cs @@ -0,0 +1,269 @@ +using CalamityMod.Buffs.StatDebuffs; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class MagnusBeam : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Beam"); + } + + public override void SetDefaults() + { + Projectile.width = 8; + Projectile.height = 8; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.penetrate = 1; + Projectile.extraUpdates = 2; + Projectile.alpha = 0; + } + + public override void AI() + { + Projectile.rotation = Projectile.velocity.ToRotation(); + float limit = 5f; + float scaleFactor = 6f; + if (Projectile.ai[1] == 0f) + { + Projectile.ai[1] = 1f; + Projectile.localAI[0] = (float)-(float)Main.rand.Next(48); + } + else if (Projectile.ai[1] == 1f && Projectile.owner == Main.myPlayer) + { + int targetIdx = -1; + float npcRange = 150f; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].CanBeChasedBy(Projectile, false)) + { + Vector2 npcPos = Main.npc[i].Center; + float npcDist = Vector2.Distance(npcPos, Projectile.Center); + if (npcDist < npcRange && targetIdx == -1 && Collision.CanHitLine(Projectile.Center, 1, 1, npcPos, 1, 1)) + { + npcRange = npcDist; + targetIdx = i; + } + } + } + if (npcRange < 8f) + { + Projectile.Kill(); + return; + } + if (targetIdx != -1) + { + Projectile.ai[1] = limit + 1f; + Projectile.ai[0] = (float)targetIdx; + Projectile.netUpdate = true; + } + } + else if (Projectile.ai[1] > limit) + { + Projectile.ai[1] += 1f; + int idx = (int)Projectile.ai[0]; + if (!Main.npc[idx].active || !Main.npc[idx].CanBeChasedBy(Projectile, false)) + { + Projectile.ai[1] = 1f; + Projectile.ai[0] = 0f; + Projectile.netUpdate = true; + } + else + { + Projectile.velocity.ToRotation(); + Vector2 toNPC = Main.npc[idx].Center - Projectile.Center; + if (toNPC.Length() < 20f) + { + Projectile.Kill(); + return; + } + if (toNPC != Vector2.Zero) + { + toNPC.Normalize(); + toNPC *= scaleFactor; + } + float homingSpeed = 30f; + Projectile.velocity = (Projectile.velocity * (homingSpeed - 1f) + toNPC) / homingSpeed; + } + } + if (Projectile.ai[1] >= 1f && Projectile.ai[1] < limit) + { + Projectile.ai[1] += 1f; + if (Projectile.ai[1] == limit) + { + Projectile.ai[1] = 1f; + } + } + + int dustTypeRand = Utils.SelectRandom(Main.rand, new int[] + { + 56, + 92, + 229, + 206, + 181 + }); + int dustType = 261; + Projectile.localAI[0] += 1f; + if (Projectile.localAI[0] == 48f) + { + Projectile.localAI[0] = 0f; + } + else if (Projectile.alpha == 0) + { + for (int i = 0; i < 2; i++) + { + Vector2 offset = Vector2.UnitX * -30f; + offset = -Vector2.UnitY.RotatedBy((double)(Projectile.localAI[0] * 0.1308997f + i * MathHelper.Pi), default) * new Vector2(10f, 20f) - Projectile.rotation.ToRotationVector2() * 10f; + int idx = Dust.NewDust(Projectile.Center, 0, 0, dustType, 0f, 0f, 160, default, 1f); + Main.dust[idx].scale = 1f; + Main.dust[idx].noGravity = true; + Main.dust[idx].position = Projectile.Center + offset + Projectile.velocity * 2f; + Main.dust[idx].velocity = Vector2.Normalize(Projectile.Center + Projectile.velocity * 2f * 8f - Main.dust[idx].position) * 2f + Projectile.velocity * 2f; + } + } + if (Main.rand.NextBool(12)) + { + Vector2 offset = -Vector2.UnitX.RotatedByRandom(0.2).RotatedBy((double)Projectile.velocity.ToRotation(), default); + int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 234, 0f, 0f, 100, default, 1f); + Main.dust[idx].velocity *= 0.1f; + Main.dust[idx].position = Projectile.Center + offset * (float)Projectile.width / 2f + Projectile.velocity * 2f; + Main.dust[idx].fadeIn = 0.9f; + } + if (Main.rand.NextBool(64)) + { + Vector2 offset = -Vector2.UnitX.RotatedByRandom(0.4).RotatedBy((double)Projectile.velocity.ToRotation(), default); + int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 234, 0f, 0f, 155, default, 0.8f); + Main.dust[idx].velocity *= 0.3f; + Main.dust[idx].position = Projectile.Center + offset * (float)Projectile.width / 2f; + if (Main.rand.NextBool(2)) + { + Main.dust[idx].fadeIn = 1.4f; + } + } + if (Main.rand.NextBool(4)) + { + for (int i = 0; i < 2; i++) + { + Vector2 offset = -Vector2.UnitX.RotatedByRandom(0.8).RotatedBy((double)Projectile.velocity.ToRotation(), default); + int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustTypeRand, 0f, 0f, 0, default, 1.2f); + Main.dust[idx].velocity *= 0.3f; + Main.dust[idx].noGravity = true; + Main.dust[idx].position = Projectile.Center + offset * (float)Projectile.width / 2f; + if (Main.rand.NextBool(2)) + { + Main.dust[idx].fadeIn = 1.4f; + } + } + } + if (Main.rand.NextBool(3)) + { + Vector2 offset = -Vector2.UnitX.RotatedByRandom(0.2).RotatedBy((double)Projectile.velocity.ToRotation(), default); + int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 1f); + Main.dust[idx].velocity *= 0.3f; + Main.dust[idx].position = Projectile.Center + offset * (float)Projectile.width / 2f; + Main.dust[idx].fadeIn = 1.2f; + Main.dust[idx].scale = 1.5f; + Main.dust[idx].noGravity = true; + } + Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.25f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.25f / 255f); + for (int i = 0; i < 2; i++) + { + int sizeFactor = 14; + int idx = Dust.NewDust(Projectile.position, Projectile.width - sizeFactor * 2, Projectile.height - sizeFactor * 2, 263, 0f, 0f, 100, default, 1.35f); + Main.dust[idx].noGravity = true; + Main.dust[idx].velocity *= 0.1f; + Main.dust[idx].velocity += Projectile.velocity * 0.5f; + } + if (Main.rand.NextBool(8)) + { + int sizeFactor = 16; + int idx = Dust.NewDust(Projectile.position, Projectile.width - sizeFactor * 2, Projectile.height - sizeFactor * 2, 263, 0f, 0f, 100, default, 1f); + Main.dust[idx].velocity *= 0.25f; + Main.dust[idx].noGravity = true; + Main.dust[idx].velocity += Projectile.velocity * 0.5f; + } + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = ModContent.Request(Texture).Value; + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 480); + + if (!target.canGhostHeal || Main.player[Projectile.owner].moonLeech) + return; + + Player player = Main.player[Projectile.owner]; + player.statLife += 1; + player.statMana += 25; + player.HealEffect(1); + player.ManaEffect(25); + } + + public override void Kill(int timeLeft) + { + int dustType1 = 263; + int dustType2 = 263; + int height = 50; + float scale1 = 1.7f; + float scale2 = 0.8f; + float scale3 = 2f; + Vector2 value3 = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2(); + Vector2 velocity = value3 * Projectile.velocity.Length() * (float)Projectile.MaxUpdates; + SoundEngine.PlaySound(SoundID.Item14, Projectile.position); + Projectile.ExpandHitboxBy(height); + Projectile.maxPenetrate = -1; + Projectile.penetrate = -1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; + Projectile.Damage(); + for (int i = 0; i < 40; i++) + { + int dustType = Utils.SelectRandom(Main.rand, new int[] + { + 56, + 92, + 229, + 206, + 181 + }); + int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 200, default, scale1); + Dust dust = Main.dust[idx]; + dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; + dust.noGravity = true; + dust.velocity *= 3f; + dust.velocity += velocity * Main.rand.NextFloat(); + idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType1, 0f, 0f, 100, default, scale2); + dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; + dust.velocity *= 2f; + dust.noGravity = true; + dust.fadeIn = 1f; + dust.color = Color.Crimson * 0.5f; + dust.velocity += velocity * Main.rand.NextFloat(); + } + for (int i = 0; i < 20; i++) + { + int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType2, 0f, 0f, 0, default, scale3); + Dust dust = Main.dust[idx]; + dust.position = Projectile.Center + Vector2.UnitX.RotatedByRandom(Math.PI).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 3f; + dust.noGravity = true; + dust.velocity *= 0.5f; + dust.velocity += velocity * (0.6f + 0.6f * Main.rand.NextFloat()); + } + } + } +} diff --git a/Projectiles/Magic/MagnusBeam.png b/Projectiles/Typeless/MagnusBeam.png similarity index 100% rename from Projectiles/Magic/MagnusBeam.png rename to Projectiles/Typeless/MagnusBeam.png diff --git a/Projectiles/Typeless/SandCloakVeil.cs b/Projectiles/Typeless/SandCloakVeil.cs index 864035dfa0..b65cc0dbcb 100644 --- a/Projectiles/Typeless/SandCloakVeil.cs +++ b/Projectiles/Typeless/SandCloakVeil.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Projectiles.Typeless { public class SandCloakVeil : ModProjectile { - private const float radius = 225f; + private const float radius = 272f; private const int duration = 900; public override void SetStaticDefaults() @@ -27,6 +27,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.timeLeft = duration; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 10; + Projectile.scale = 1.2f; } public override void AI() diff --git a/Tiles/Abyss/AbyssGravel.png b/Tiles/Abyss/AbyssGravel.png index 1ce3ac3347..c51a8c09ea 100644 Binary files a/Tiles/Abyss/AbyssGravel.png and b/Tiles/Abyss/AbyssGravel.png differ diff --git a/Tiles/DraedonStructures/LaboratoryPlating.cs b/Tiles/DraedonStructures/LaboratoryPlating.cs index 357714e390..590f64322b 100644 --- a/Tiles/DraedonStructures/LaboratoryPlating.cs +++ b/Tiles/DraedonStructures/LaboratoryPlating.cs @@ -13,7 +13,6 @@ namespace CalamityMod.Tiles.DraedonStructures Main.tileBlockLight[Type] = true; CalamityUtils.MergeWithGeneral(Type); - CalamityUtils.SetMerge(Type, ModContent.TileType()); HitSound = SoundID.Tink; DustType = 30; diff --git a/Tiles/DraedonStructures/RustedPlating.cs b/Tiles/DraedonStructures/RustedPlating.cs index 998b7c60fc..7414893162 100644 --- a/Tiles/DraedonStructures/RustedPlating.cs +++ b/Tiles/DraedonStructures/RustedPlating.cs @@ -13,7 +13,6 @@ namespace CalamityMod.Tiles.DraedonStructures Main.tileBlockLight[Type] = true; CalamityUtils.MergeWithGeneral(Type); - CalamityUtils.SetMerge(Type, ModContent.TileType()); HitSound = SoundID.Tink; DustType = 32; diff --git a/UI/StealthUI.cs b/UI/StealthUI.cs index 7b0693af9e..132ac6d50d 100644 --- a/UI/StealthUI.cs +++ b/UI/StealthUI.cs @@ -107,7 +107,9 @@ namespace CalamityMod.UI textToDisplay += "Rogue stealth builds while not attacking and slower while moving\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + - "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; + "The higher your rogue stealth the higher your rogue damage and crit\n" + + "Having more stealth regeneration slightly decreases your damage per hit in return\n" + + "This is offset by you being able to use stealth strikes far more often"; } Main.instance.MouseText(textToDisplay, 0, 0, -1, -1, -1, -1); diff --git a/Utilities/ProjectileUtils.cs b/Utilities/ProjectileUtils.cs index 5b2f9932f8..fa02ddce21 100644 --- a/Utilities/ProjectileUtils.cs +++ b/Utilities/ProjectileUtils.cs @@ -24,10 +24,6 @@ namespace CalamityMod public static bool FinalExtraUpdate(this Projectile proj) => proj.numUpdates == -1; - // TODO -- Why does this not simply check if the projectile is summon damage class? - // Is it because of whips? We can make it "IsSummonNotWhip" if needed - public static bool IsSummon(this Projectile proj) => proj.minion || proj.sentry || CalamityLists.projectileMinionList.Contains(proj.type) || ProjectileID.Sets.MinionShot[proj.type] || ProjectileID.Sets.SentryShot[proj.type]; - public static bool IsTrueMelee(this Projectile proj) { if (proj is null || !proj.active) diff --git a/Walls/AbyssGravelWall.png b/Walls/AbyssGravelWall.png index 3af77f5171..90a8303f16 100644 Binary files a/Walls/AbyssGravelWall.png and b/Walls/AbyssGravelWall.png differ diff --git a/Walls/AbyssGravelWallSafe.png b/Walls/AbyssGravelWallSafe.png index 3af77f5171..b486909ee3 100644 Binary files a/Walls/AbyssGravelWallSafe.png and b/Walls/AbyssGravelWallSafe.png differ