diff --git a/Buffs/Alcohol/BloodyMaryBuff.cs b/Buffs/Alcohol/BloodyMaryBuff.cs index 1e3ef36857..337af644c7 100644 --- a/Buffs/Alcohol/BloodyMaryBuff.cs +++ b/Buffs/Alcohol/BloodyMaryBuff.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Alcohol public override void SetStaticDefaults() { DisplayName.SetDefault("Bloody Mary"); - Description.SetDefault("Damage, critical strike chance, movement speed, and melee speed boosted during a Blood Moon, life regen and defense reduced"); + Description.SetDefault("Damage and movement speed boosted during a Blood Moon, life regen and defense reduced"); Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; @@ -19,8 +19,6 @@ namespace CalamityMod.Buffs.Alcohol public override void Update(Player player, ref int buffIndex) { player.Calamity().bloodyMary = true; - if (Main.bloodMoon) - player.GetAttackSpeed() += 0.15f; } } } diff --git a/Buffs/Alcohol/TequilaBuff.cs b/Buffs/Alcohol/TequilaBuff.cs index 3269624146..9b0cfbee4c 100644 --- a/Buffs/Alcohol/TequilaBuff.cs +++ b/Buffs/Alcohol/TequilaBuff.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Alcohol public override void SetStaticDefaults() { DisplayName.SetDefault("Tequila"); - Description.SetDefault("Damage, critical strike chance, damage reduction, defense, and knockback boosted during daytime, life regen reduced"); + Description.SetDefault("Critical strike chance, defense, and knockback boosted during daytime, life regen reduced"); Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; diff --git a/Buffs/Alcohol/TequilaSunriseBuff.cs b/Buffs/Alcohol/TequilaSunriseBuff.cs index e2defbe958..9a0d6d3321 100644 --- a/Buffs/Alcohol/TequilaSunriseBuff.cs +++ b/Buffs/Alcohol/TequilaSunriseBuff.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Alcohol public override void SetStaticDefaults() { DisplayName.SetDefault("Tequila Sunrise"); - Description.SetDefault("Damage, critical strike chance, damage reduction, defense, and knockback boosted during daytime, life regen reduced"); + Description.SetDefault("Critical strike chance, defense, and knockback boosted during daytime, life regen reduced"); Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 1ca2350eb2..94ac681cca 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -190,7 +190,7 @@ namespace CalamityMod.CalPlayer #region Timer and Counter public int gaelSwipes = 0; public int gaelRageAttackCooldown = 0; - public int aBulwarkRareMeleeBoostTimer = 0; + public int hideOfDeusMeleeBoostTimer = 0; public int nebulaManaNerfCounter = 0; public int alcoholPoisonLevel = 0; public int modStealthTimer; @@ -221,7 +221,7 @@ namespace CalamityMod.CalPlayer public int auralisAuroraCounter = 0; public int auralisAuroraCooldown = 0; public int auralisAurora = 0; - public int aBulwarkRareTimer = 0; + public int hideOfDeusTimer = 0; public int spiritOriginBullseyeShootCountdown = 0; public int spiritOriginConvertedCrit = 0; public int RustyMedallionCooldown = 0; @@ -427,12 +427,10 @@ namespace CalamityMod.CalPlayer public bool evasionScarf = false; public bool badgeOfBravery = false; public bool warbannerOfTheSun = false; - public float warBannerBonus = 0f; public bool cryogenSoul = false; public bool yInsignia = false; public bool eGauntlet = false; public bool eTalisman = false; - public bool statisBeltOfCurses = false; public int statisTimer = 0; public bool nucleogenesis = false; public bool nuclearRod = false; @@ -445,8 +443,8 @@ namespace CalamityMod.CalPlayer public bool aquaticHeartWaterBuff = false; public bool aquaticHeartIce = false; public bool aSpark = false; - public bool aSparkRare = false; - public bool aBulwarkRare = false; + public bool transformer = false; + public bool hideOfDeus = false; public bool dAmulet = false; public bool fCarapace = false; public bool gShell = false; @@ -473,13 +471,14 @@ namespace CalamityMod.CalPlayer public bool frostFlare = false; public bool beeResist = false; public bool uberBees = false; - public bool projRefRare = false; - public int projRefRareLifeRegenCounter = 0; + public bool evolution = false; + public int evolutionLifeRegenCounter = 0; public bool nanotech = false; public bool deadshotBrooch = false; public bool shadowMinions = false; public bool holyMinions = false; public bool alchFlask = false; + public bool toxicHeart = false; public bool abaddon = false; public bool aeroStone = false; public bool community = false; @@ -880,7 +879,6 @@ namespace CalamityMod.CalPlayer #region Minion public bool wDroid = false; public bool resButterfly = false; - public bool glSword = false; public bool mWorm = false; public bool iClasper = false; public bool magicHat = false; @@ -1572,8 +1570,8 @@ namespace CalamityMod.CalPlayer badgeOfBravery = false; warbannerOfTheSun = false; aSpark = false; - aSparkRare = false; - aBulwarkRare = false; + transformer = false; + hideOfDeus = false; dAmulet = false; fCarapace = false; gShell = false; @@ -1587,20 +1585,20 @@ namespace CalamityMod.CalPlayer frostFlare = false; beeResist = false; uberBees = false; - projRefRare = false; + evolution = false; nanotech = false; deadshotBrooch = false; cryogenSoul = false; yInsignia = false; eGauntlet = false; eTalisman = false; - statisBeltOfCurses = false; nucleogenesis = false; nuclearRod = false; heartOfDarkness = false; shadowMinions = false; holyMinions = false; alchFlask = false; + toxicHeart = false; abaddon = false; aeroStone = false; community = false; @@ -1905,7 +1903,6 @@ namespace CalamityMod.CalPlayer wDroid = false; resButterfly = false; - glSword = false; mWorm = false; iClasper = false; magicHat = false; @@ -2136,7 +2133,7 @@ namespace CalamityMod.CalPlayer auralisAuroraCounter = 0; auralisAuroraCooldown = 0; auralisAurora = 0; - aBulwarkRareTimer = 0; + hideOfDeusTimer = 0; RustyMedallionCooldown = 0; SulphWaterPoisoningLevel = 0f; spiritOriginConvertedCrit = 0; @@ -2151,7 +2148,7 @@ namespace CalamityMod.CalPlayer bloodflareMageCooldown = 0; tarraRangedCooldown = 0; tarraMageHealCooldown = 0; - aBulwarkRareMeleeBoostTimer = 0; + hideOfDeusMeleeBoostTimer = 0; acidRoundMultiplier = 1D; externalAbyssLight = 0; externalColdImmunity = externalHeatImmunity = false; @@ -4555,7 +4552,7 @@ namespace CalamityMod.CalPlayer } } - if (aSparkRare) + if (transformer) { if (npc.type == NPCID.BlueJellyfish || npc.type == NPCID.PinkJellyfish || npc.type == NPCID.GreenJellyfish || npc.type == NPCID.FungoFish || npc.type == NPCID.BloodJelly || npc.type == NPCID.AngryNimbus || npc.type == NPCID.GigaZapper || @@ -4683,11 +4680,11 @@ namespace CalamityMod.CalPlayer } } - if (aBulwarkRare) + if (hideOfDeus) { - aBulwarkRareMeleeBoostTimer += 3 * damage; - if (aBulwarkRareMeleeBoostTimer > 900) - aBulwarkRareMeleeBoostTimer = 900; + hideOfDeusMeleeBoostTimer += 3 * damage; + if (hideOfDeusMeleeBoostTimer > 900) + hideOfDeusMeleeBoostTimer = 900; } } #endregion @@ -4701,7 +4698,7 @@ namespace CalamityMod.CalPlayer if (!disableAllDodges && !Player.HasCooldown(GlobalDodge.ID)) { // The Evolution - if (projRefRare) + if (evolution) { proj.hostile = false; proj.friendly = true; @@ -4711,7 +4708,7 @@ namespace CalamityMod.CalPlayer Player.GiveIFrames(20, false); damage = 0; - projRefRareLifeRegenCounter = 300; + evolutionLifeRegenCounter = 300; projTypeJustHitBy = proj.type; Player.AddCooldown(GlobalDodge.ID, BalancingConstants.EvolutionReflectCooldown); @@ -4845,13 +4842,13 @@ namespace CalamityMod.CalPlayer // The amount of damage that will be dealt is yet to be determined. // - if (projRefRare) + if (evolution) { if (proj.type == projTypeJustHitBy) projectileDamageReduction += 0.15; } - if (aSparkRare) + if (transformer) { if (proj.type == ProjectileID.MartianTurretBolt || proj.type == ProjectileID.GigaZapperSpear || proj.type == ProjectileID.CultistBossLightningOrbArc || proj.type == ProjectileID.VortexLightning || proj.type == ModContent.ProjectileType() || proj.type == ProjectileID.BulletSnowman || proj.type == ProjectileID.BulletDeadeye || proj.type == ProjectileID.SniperBullet || proj.type == ProjectileID.VortexLaser) @@ -4861,7 +4858,7 @@ namespace CalamityMod.CalPlayer if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => proj.type != x) && proj.active && !proj.friendly && proj.hostile && damage > 0) { // Daedalus Reflect counts as a reflect but doesn't actually stop you from taking damage - if (daedalusReflect && !disableAllDodges && !projRefRare && !Player.HasCooldown(GlobalDodge.ID)) + if (daedalusReflect && !disableAllDodges && !evolution && !Player.HasCooldown(GlobalDodge.ID)) projectileDamageReduction += 0.5; } @@ -5112,7 +5109,7 @@ namespace CalamityMod.CalPlayer if (CalamityLists.projectileDestroyExceptionList.TrueForAll(x => proj.type != x) && proj.active && !proj.friendly && proj.hostile && damage > 0) { // The Transformer can reflect bullets - if (aSparkRare) + if (transformer) { if (proj.type == ProjectileID.BulletSnowman || proj.type == ProjectileID.BulletDeadeye || proj.type == ProjectileID.SniperBullet || proj.type == ProjectileID.VortexLaser) { @@ -5128,7 +5125,7 @@ namespace CalamityMod.CalPlayer // Reflects count as dodges. They share the timer and can be disabled by global dodge disabling effects. if (!disableAllDodges && !Player.HasCooldown(GlobalDodge.ID)) { - if (daedalusReflect && !projRefRare) + if (daedalusReflect && !evolution) { proj.hostile = false; proj.friendly = true; @@ -6005,7 +6002,7 @@ namespace CalamityMod.CalPlayer CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 20f, ModContent.ProjectileType(), featherDamage, 1f, Player.whoAmI); } } - if (aBulwarkRare) + if (hideOfDeus) { var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType())); SoundEngine.PlaySound(SoundID.Item74, Player.Center); @@ -6071,7 +6068,7 @@ namespace CalamityMod.CalPlayer // Start with base damage, then apply the best damage class you can int sDamage = 6; - if (aSparkRare) + if (transformer) sDamage += 42; sDamage = (int)Player.GetBestClassDamage().ApplyTo(sDamage); if (Player.whoAmI == Main.myPlayer) diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 97782a4d22..177c9feb3e 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -345,7 +345,7 @@ namespace CalamityMod.CalPlayer if (bloodyMary) { alcoholPoisonLevel++; - lifeRegenLost += 2; + lifeRegenLost += 4; } if (tequila) { @@ -355,7 +355,7 @@ namespace CalamityMod.CalPlayer if (tequilaSunrise) { alcoholPoisonLevel++; - lifeRegenLost += 1; + lifeRegenLost += 2; } if (screwdriver) { @@ -378,12 +378,12 @@ namespace CalamityMod.CalPlayer if (starBeamRye) { alcoholPoisonLevel++; - lifeRegenLost += 1; + lifeRegenLost += 2; } if (moscowMule) { alcoholPoisonLevel++; - lifeRegenLost += 2; + lifeRegenLost += 4; } if (whiteWine) { @@ -710,7 +710,7 @@ namespace CalamityMod.CalPlayer Player.lifeRegenTime += 1; } - if (projRefRareLifeRegenCounter > 0) + if (evolutionLifeRegenCounter > 0) { Player.lifeRegenTime += 2; Player.lifeRegen += 2; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index e508cb57c0..9fcb8d92c5 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -803,7 +803,7 @@ namespace CalamityMod.CalPlayer ProvidenceBurnEffectDrawer.Update(); // Transformer immunity to Electrified - if (aSparkRare) + if (transformer) Player.buffImmune[BuffID.Electrified] = true; // Reduce breath meter while in icy water instead of chilling @@ -1194,12 +1194,12 @@ namespace CalamityMod.CalPlayer xerocDmg -= 2f; if (xerocDmg < 0f) xerocDmg = 0f; - if (aBulwarkRareMeleeBoostTimer > 0) - aBulwarkRareMeleeBoostTimer--; + if (hideOfDeusMeleeBoostTimer > 0) + hideOfDeusMeleeBoostTimer--; if (gaelRageAttackCooldown > 0) gaelRageAttackCooldown--; - if (projRefRareLifeRegenCounter > 0) - projRefRareLifeRegenCounter--; + if (evolutionLifeRegenCounter > 0) + evolutionLifeRegenCounter--; if (hurtSoundTimer > 0) hurtSoundTimer--; if (icicleCooldown > 0) @@ -1222,8 +1222,8 @@ namespace CalamityMod.CalPlayer dogTextCooldown--; if (titanCooldown > 0) titanCooldown--; - if (aBulwarkRareTimer > 0) - aBulwarkRareTimer--; + if (hideOfDeusTimer > 0) + hideOfDeusTimer--; if (hellbornBoost > 0) hellbornBoost--; if (persecutedEnchantSummonTimer < 1800) @@ -2361,7 +2361,7 @@ namespace CalamityMod.CalPlayer if (astralInjection) { if (Player.statMana < Player.statManaMax2) - Player.statMana += 3; + Player.statMana += 2; if (Player.statMana > Player.statManaMax2) Player.statMana = Player.statManaMax2; } @@ -2472,8 +2472,7 @@ namespace CalamityMod.CalPlayer { if (Main.bloodMoon) { - Player.GetDamage() += 0.15f; - Player.GetCritChance() += BloodyMary.CritBoost; + Player.GetDamage() += 0.1f; Player.moveSpeed += 0.1f; } } @@ -2483,9 +2482,7 @@ namespace CalamityMod.CalPlayer if (Main.dayTime) { Player.statDefense += 5; - Player.GetDamage() += 0.03f; Player.GetCritChance() += Tequila.CritBoost; - Player.endurance += 0.03f; } } @@ -2494,9 +2491,7 @@ namespace CalamityMod.CalPlayer if (Main.dayTime) { Player.statDefense += 10; - Player.GetDamage() += 0.07f; Player.GetCritChance() += TequilaSunrise.CritBoost; - Player.endurance += 0.03f; } } @@ -2522,7 +2517,7 @@ namespace CalamityMod.CalPlayer } if (whiteWine) - Player.GetDamage() += 0.1f; + Player.GetDamage() += 0.08f; // Adjustment to the Tipsy debuff if (Player.tipsy) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index d7f3fb7a5c..dd086cef9d 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -62,12 +62,17 @@ namespace CalamityMod.CalPlayer if (flamingItemEnchant) target.AddBuff(BuffType(), VulnerabilityHex.AflameDuration); + + target.Calamity().IncreasedColdEffects_EskimoSet = eskimoSet; + target.Calamity().IncreasedColdEffects_CryoStone = CryoStone; + + target.Calamity().IncreasedElectricityEffects_Transformer = transformer; target.Calamity().IncreasedHeatEffects_Fireball = fireball; target.Calamity().IncreasedHeatEffects_CinnamonRoll = cinnamonRoll; target.Calamity().IncreasedHeatEffects_HellfireTreads = hellfireTreads; - target.Calamity().IncreasedColdEffects_EskimoSet = eskimoSet; + target.Calamity().IncreasedSicknessEffects_ToxicHeart = toxicHeart; target.Calamity().IncreasedSicknessAndWaterEffects_EvergreenGin = evergreenGin; @@ -201,11 +206,16 @@ namespace CalamityMod.CalPlayer if (witheringWeaponEnchant) witheringDamageDone += (int)(damage * (crit ? 2D : 1D)); + cgn.IncreasedColdEffects_EskimoSet = eskimoSet; + cgn.IncreasedColdEffects_CryoStone = CryoStone; + + cgn.IncreasedElectricityEffects_Transformer = transformer; + cgn.IncreasedHeatEffects_Fireball = fireball; cgn.IncreasedHeatEffects_CinnamonRoll = cinnamonRoll; cgn.IncreasedHeatEffects_HellfireTreads = hellfireTreads; - cgn.IncreasedColdEffects_EskimoSet = eskimoSet; + cgn.IncreasedSicknessEffects_ToxicHeart = toxicHeart; cgn.IncreasedSicknessAndWaterEffects_EvergreenGin = evergreenGin; @@ -583,9 +593,9 @@ namespace CalamityMod.CalPlayer if (npcCheck) { - if (item.CountsAsClass() && aBulwarkRare && aBulwarkRareTimer == 0) + if (item.CountsAsClass() && hideOfDeus && hideOfDeusTimer == 0) { - aBulwarkRareTimer = 10; + hideOfDeusTimer = 10; int bulwarkStarDamage = (int)Player.GetTotalDamage().ApplyTo(320); for (int n = 0; n < 3; n++) CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ProjectileType(), bulwarkStarDamage, 5f, Player.whoAmI); @@ -722,9 +732,9 @@ namespace CalamityMod.CalPlayer if (Player.wingTime > Player.wingTimeMax) Player.wingTime = Player.wingTimeMax; } - if (aBulwarkRare && aBulwarkRareTimer == 0) + if (hideOfDeus && hideOfDeusTimer == 0) { - aBulwarkRareTimer = 10; + hideOfDeusTimer = 10; int bulwarkStarDamage = (int)Player.GetTotalDamage().ApplyTo(320); for (int n = 0; n < 3; n++) CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ProjectileType(), bulwarkStarDamage, 5f, Player.whoAmI); diff --git a/CalamityLists.cs b/CalamityLists.cs index 136ab33ad8..47238d602b 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -526,6 +526,7 @@ namespace CalamityMod ProjectileID.ChargedBlasterCannon, ProjectileID.MedusaHead, + ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), @@ -1783,6 +1784,7 @@ namespace CalamityMod ProjectileType(), ProjectileType(), ProjectileType(), + ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), diff --git a/Items/Accessories/CryoStone.cs b/Items/Accessories/CryoStone.cs index b8797c1623..5ae61c8983 100644 --- a/Items/Accessories/CryoStone.cs +++ b/Items/Accessories/CryoStone.cs @@ -12,6 +12,7 @@ namespace CalamityMod.Items.Accessories SacrificeTotal = 1; DisplayName.SetDefault("Cryo Stone"); Tooltip.SetDefault("One of the ancient relics\n" + + "Multiplies all cold-based debuff damage by 1.5\n" + "Creates a rotating ice shield around you that damages and slows down enemies on contact"); Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(4, 4)); ItemID.Sets.AnimatesAsSoul[Type] = true; diff --git a/Items/Accessories/HideofAstrumDeus.cs b/Items/Accessories/HideofAstrumDeus.cs index 19f7ad2cb2..bc8709dc0b 100644 --- a/Items/Accessories/HideofAstrumDeus.cs +++ b/Items/Accessories/HideofAstrumDeus.cs @@ -32,8 +32,8 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); player.buffImmune[ModContent.BuffType()] = true; - modPlayer.aBulwarkRare = true; - if (modPlayer.aBulwarkRareMeleeBoostTimer > 0) + modPlayer.hideOfDeus = true; + if (modPlayer.hideOfDeusMeleeBoostTimer > 0) player.GetDamage() += 0.5f; player.buffImmune[BuffID.CursedInferno] = true; player.buffImmune[BuffID.OnFire] = true; diff --git a/Items/Accessories/TheEvolution.cs b/Items/Accessories/TheEvolution.cs index 7a2a53aae1..cba0cf7bb2 100644 --- a/Items/Accessories/TheEvolution.cs +++ b/Items/Accessories/TheEvolution.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.projRefRare = true; + modPlayer.evolution = true; } } } diff --git a/Items/Accessories/TheTransformer.cs b/Items/Accessories/TheTransformer.cs index a9d18edddf..32ee0b7b66 100644 --- a/Items/Accessories/TheTransformer.cs +++ b/Items/Accessories/TheTransformer.cs @@ -12,7 +12,8 @@ namespace CalamityMod.Items.Accessories { SacrificeTotal = 1; DisplayName.SetDefault("The Transformer"); - Tooltip.SetDefault("Taking damage releases a blast of sparks\n" + + Tooltip.SetDefault("Multiplies all electricity-based debuff damage by 1.5\n" + + "Taking damage releases a blast of sparks\n" + "Immunity to Electrified and you resist all electrical projectile and enemy damage\n" + "Enemy bullets do half damage to you and are reflected back at the enemy for 800% their original damage"); Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 16)); @@ -31,7 +32,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.aSparkRare = true; + modPlayer.transformer = true; modPlayer.aSpark = true; } } diff --git a/Items/Accessories/ToxicHeart.cs b/Items/Accessories/ToxicHeart.cs index 83ac5ece17..78667e6afc 100644 --- a/Items/Accessories/ToxicHeart.cs +++ b/Items/Accessories/ToxicHeart.cs @@ -15,7 +15,8 @@ namespace CalamityMod.Items.Accessories SacrificeTotal = 1; DisplayName.SetDefault("Toxic Heart"); Tooltip.SetDefault("Summons a plague aura around you that damages nearby enemies\n" + - "Makes you immune to the Plague debuff "); + "Makes you immune to the Plague debuff\n"+ + "Multiplies all sickness-based debuff damage by 1.5"); } public override void SetDefaults() @@ -30,6 +31,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); + modPlayer.toxicHeart = true; player.buffImmune[ModContent.BuffType()] = true; int plagueCounter = 0; Lighting.AddLight((int)(player.Center.X / 16f), (int)(player.Center.Y / 16f), 0.05f, 1f, 0.1f); diff --git a/Items/Ammo/ArcticArrow.cs b/Items/Ammo/ArcticArrow.cs index 3009245093..0c7f956cec 100644 --- a/Items/Ammo/ArcticArrow.cs +++ b/Items/Ammo/ArcticArrow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Ammo public override void SetDefaults() { - Item.damage = 20; + Item.damage = 18; Item.DamageType = DamageClass.Ranged; Item.width = 22; Item.height = 36; diff --git a/Items/Ammo/NapalmArrow.cs b/Items/Ammo/NapalmArrow.cs index b7aa485b09..0f4def240a 100644 --- a/Items/Ammo/NapalmArrow.cs +++ b/Items/Ammo/NapalmArrow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Ammo public override void SetDefaults() { - Item.damage = 12; + Item.damage = 11; Item.DamageType = DamageClass.Ranged; Item.width = 22; Item.height = 36; diff --git a/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs b/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs index d68f70940c..860197099a 100644 --- a/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs +++ b/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian Item.height = 18; Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; - Item.defense = 2; //4 + Item.defense = 4; //9 } public override void UpdateEquip(Player player) diff --git a/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs b/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs index 9de765231c..7540ce5e19 100644 --- a/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs +++ b/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian Item.height = 18; Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; - Item.defense = 1; //4 + Item.defense = 3; //9 } public override void UpdateEquip(Player player) diff --git a/Items/Armor/SnowRuffian/SnowRuffianMask.cs b/Items/Armor/SnowRuffian/SnowRuffianMask.cs index c8216f46b5..84813b660b 100644 --- a/Items/Armor/SnowRuffian/SnowRuffianMask.cs +++ b/Items/Armor/SnowRuffian/SnowRuffianMask.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian Item.height = 18; Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; - Item.defense = 1; //4 + Item.defense = 2; //9 } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 9fdd9ce31b..dd93d1d8d5 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -690,11 +690,11 @@ namespace CalamityMod.Items // Tin if (item.type == ItemID.TinHelmet) - AddTooltip("4% increased critical strike chance"); + AddTooltip("3% increased critical strike chance"); if (item.type == ItemID.TinChainmail) AddTooltip("+1 life regen"); if (item.type == ItemID.TinGreaves) - AddTooltip("10% increased movement speed"); + AddTooltip("5% increased movement speed"); // Iron if (item.type == ItemID.IronHelmet || item.type == ItemID.AncientIronHelmet || item.type == ItemID.IronChainmail || item.type == ItemID.IronGreaves) @@ -706,11 +706,11 @@ namespace CalamityMod.Items // Silver if (item.type == ItemID.SilverHelmet) - AddTooltip("6% increased critical strike chance"); + AddTooltip("5% increased critical strike chance"); if (item.type == ItemID.SilverChainmail) AddTooltip("+2 life regen"); if (item.type == ItemID.SilverGreaves) - AddTooltip("10% increased movement speed"); + AddTooltip("8% increased movement speed"); // Tungsten if (item.type == ItemID.TungstenHelmet) @@ -718,7 +718,7 @@ namespace CalamityMod.Items if (item.type == ItemID.TungstenChainmail) AddTooltip("+1 life regen"); if (item.type == ItemID.TungstenGreaves) - AddTooltip("10% increased movement speed"); + AddTooltip("8% increased movement speed"); // Gold if (item.type == ItemID.GoldHelmet || item.type == ItemID.AncientGoldHelmet) @@ -726,7 +726,7 @@ namespace CalamityMod.Items if (item.type == ItemID.GoldChainmail) AddTooltip("Reduces damage taken by 5%"); if (item.type == ItemID.GoldGreaves) - AddTooltip("12% increased movement speed"); + AddTooltip("10% increased movement speed"); // Platinum if (item.type == ItemID.PlatinumHelmet) @@ -734,7 +734,7 @@ namespace CalamityMod.Items if (item.type == ItemID.PlatinumChainmail) AddTooltip("5% increased critical strike chance"); if (item.type == ItemID.PlatinumGreaves) - AddTooltip("12% increased movement speed"); + AddTooltip("10% increased movement speed"); // Shadow if (item.type == ItemID.ShadowHelmet || item.type == ItemID.AncientShadowHelmet || item.type == ItemID.ShadowScalemail || item.type == ItemID.AncientShadowScalemail || item.type == ItemID.ShadowGreaves || item.type == ItemID.AncientShadowGreaves) @@ -766,10 +766,6 @@ namespace CalamityMod.Items // Mythril if (item.type == ItemID.MythrilHood) EditTooltipByNum(0, (line) => line.Text = $"Increases maximum mana by {MythrilArmorSetChange.MaxManaBoost + 60}"); - if (item.type == ItemID.MythrilChainmail) - EditTooltipByNum(0, (line) => line.Text = $"{MythrilArmorSetChange.ChestplateDamagePercentageBoost + 7}% increased damage"); - if (item.type == ItemID.MythrilGreaves) - EditTooltipByNum(0, (line) => line.Text = $"{MythrilArmorSetChange.LeggingsCritChanceBoost + 10}% increased critical strike chance"); // Orichalcum if (item.type == ItemID.OrichalcumBreastplate) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index a8e20c4ec7..c87c893eb6 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -81,11 +81,10 @@ namespace CalamityMod.Items { ItemID.BluePhaseblade, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(51)) }, // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.BluePhasesaber, Do(ScaleRatio(1.5f), DamageExact(72), UseExact(20)) }, + { ItemID.BluePhasesaber, Do(ScaleRatio(1.5f), DamageExact(72)) }, // { ItemID.BluePhasesaber, Do(ScaleRatio(1.5f), DamageExact(60)) }, { ItemID.BlueSolution, Do(Value(Item.buyPrice(silver: 5))) }, - { ItemID.BoneArrow, Do(DamageExact(7)) }, { ItemID.BonePickaxe, Do(PickPower(55), UseTimeExact(6)) }, // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT @@ -96,11 +95,7 @@ namespace CalamityMod.Items { ItemID.BookofSkulls, Do(ManaExact(12), ShootSpeedExact(5.5f)) }, { ItemID.BookStaff, Do(ManaExact(14)) }, // Tome of Infinite Wisdom { ItemID.Boomstick, Do(PointBlank, DamageExact(11)) }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.BorealWoodBow, Do(PointBlank, DamageRatio(1.1f)) }, - // { ItemID.BorealWoodBow, pointBlank }, - + { ItemID.BorealWoodBow, pointBlank }, { ItemID.BorealWoodHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) }, { ItemID.BorealWoodSword, Do(AutoReuse, UseTurn) }, @@ -134,30 +129,20 @@ namespace CalamityMod.Items { ItemID.ChlorophyteSaber, Do(UseMeleeSpeed, DamageExact(80), UseExact(10)) }, { ItemID.ChlorophyteShotbow, Do(PointBlank, DamageExact(80), UseExact(50)) }, { ItemID.ChlorophyteWarhammer, Do(HammerPower(90), UseTimeExact(8), TileBoostExact(+2)) }, - { ItemID.ChristmasTreeSword, Do(AutoReuse, UseTurn, UseMeleeSpeed, DamageExact(114)) }, + { ItemID.ChristmasTreeSword, Do(AutoReuse, UseTurn, UseMeleeSpeed) }, { ItemID.ClingerStaff, Do(DamageExact(118)) }, { ItemID.ClockworkAssaultRifle, Do(PointBlank, DamageExact(21)) }, - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.CobaltBreastplate, Do(DefenseDelta(+3)) }, - // { ItemID.CobaltBreastplate, Do(DefenseDelta(+1)) }, + // TODO -- DELETE THIS LINE IN 1.4.4 PORT + { ItemID.CobaltBreastplate, Do(DefenseDelta(+2)) }, { ItemID.CobaltChainsaw, Do(TrueMeleeNoSpeed, AxePower(70), UseTimeExact(4), TileBoostExact(-1)) }, { ItemID.CobaltDrill, Do(TrueMeleeNoSpeed, PickPower(130), UseTimeExact(5)) }, - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.CobaltHat, Do(DefenseDelta(+2)) }, - // { ItemID.CobaltHat, Do(DefenseDelta(+1)) }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.CobaltHelmet, Do(DefenseDelta(+4)) }, - // { ItemID.CobaltHelmet, Do(DefenseDelta(+2)) }, - - { ItemID.CobaltLeggings, Do(DefenseDelta(+2)) }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.CobaltMask, Do(DefenseDelta(+3)) }, - // { ItemID.CobaltMask, Do(DefenseDelta(+2)) }, + // TODO -- DELETE THE FOLLOWING THREE LINES IN 1.4.4 PORT + { ItemID.CobaltHat, Do(DefenseDelta(+1)) }, + { ItemID.CobaltHelmet, Do(DefenseDelta(+2)) }, + { ItemID.CobaltMask, Do(DefenseDelta(+1)) }, { ItemID.CobaltNaginata, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(90)) }, { ItemID.CobaltPickaxe, Do(PickPower(130), UseTimeExact(9)) }, @@ -173,11 +158,7 @@ namespace CalamityMod.Items { ItemID.Code2, autoReuse }, { ItemID.CoolWhip, autoReuse }, { ItemID.CopperAxe, Do(AxePower(50), UseTimeExact(16), TileBoostExact(+0)) }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.CopperBow, Do(PointBlank, DamageRatio(1.1f)) }, - // { ItemID.CopperBow, pointBlank }, - + { ItemID.CopperBow, pointBlank }, { ItemID.CopperBroadsword, Do(AutoReuse, UseTurn) }, { ItemID.CopperHammer, Do(HammerPower(35), UseTimeExact(12), TileBoostExact(+0)) }, { ItemID.CopperPickaxe, Do(PickPower(35), UseTimeExact(10), TileBoostExact(+0)) }, @@ -187,8 +168,6 @@ namespace CalamityMod.Items { ItemID.CrystalDart, Do(DamageExact(20)) }, { ItemID.CrystalSerpent, Do(DamageExact(45)) }, { ItemID.CrystalStorm, Do(DamageExact(40))}, - { ItemID.CursedArrow, Do(DamageRatio(1.1f)) }, - { ItemID.CursedBullet, Do(DamageExact(16)) }, { ItemID.CursedDart, Do(DamageExact(25)) }, // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT @@ -202,36 +181,20 @@ namespace CalamityMod.Items { ItemID.DarkLance, Do(AutoReuse, TrueMelee, DamageExact(68)) }, { ItemID.DartPistol, pointBlank }, { ItemID.DartRifle, Do(PointBlank, DamageExact(58)) }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.DD2BallistraTowerT1Popper, Do(AutoReuse, UseExact(30)) }, // Ballista Tier 1 - // { ItemID.DD2BallistraTowerT1Popper, autoReuse }, // Ballista Tier 1 - + { ItemID.DD2BallistraTowerT1Popper, autoReuse }, // Ballista Tier 1 { ItemID.DD2BallistraTowerT2Popper, Do(AutoReuse, UseExact(25)) }, // Ballista Tier 2 { ItemID.DD2BallistraTowerT3Popper, Do(AutoReuse, UseExact(20)) }, // Ballista Tier 3 { ItemID.DD2BetsyBow, Do(DamageRatio(1.1f)) }, // Aerial Bane's ridiculous multiplier is removed, so this compensates for that - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.DD2ExplosiveTrapT1Popper, Do(AutoReuse, UseExact(30)) }, // Explosive Trap Tier 1 - // { ItemID.DD2ExplosiveTrapT1Popper, autoReuse }, // Explosive Trap Tier 1 - + { ItemID.DD2ExplosiveTrapT1Popper, autoReuse }, // Explosive Trap Tier 1 { ItemID.DD2ExplosiveTrapT2Popper, Do(AutoReuse, UseExact(25)) }, // Explosive Trap Tier 2 { ItemID.DD2ExplosiveTrapT3Popper, Do(AutoReuse, UseExact(20)) }, // Explosive Trap Tier 3 - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.DD2FlameburstTowerT1Popper, Do(AutoReuse, UseExact(30)) }, // Flameburst Tier 1 - // { ItemID.DD2FlameburstTowerT1Popper, autoReuse }, // Flameburst Tier 1 - + { ItemID.DD2FlameburstTowerT1Popper, autoReuse }, // Flameburst Tier 1 { ItemID.DD2FlameburstTowerT2Popper, Do(AutoReuse, UseExact(25)) }, // Flameburst Tier 2 { ItemID.DD2FlameburstTowerT3Popper, Do(AutoReuse, UseExact(20)) }, // Flameburst Tier 3 - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.DD2LightningAuraT1Popper, Do(AutoReuse, UseExact(30)) }, // Lightning Aura Tier 1 - // { ItemID.DD2LightningAuraT1Popper, autoReuse }, // Lightning Aura Tier 1 - + { ItemID.DD2LightningAuraT1Popper, autoReuse }, // Lightning Aura Tier 1 { ItemID.DD2LightningAuraT2Popper, Do(AutoReuse, UseExact(25)) }, // Lightning Aura Tier 2 { ItemID.DD2LightningAuraT3Popper, Do(AutoReuse, UseExact(20)) }, // Lightning Aura Tier 3 - { ItemID.DD2PhoenixBow, Do(PointBlank, UseExact(18)) }, // Phantom Phoenix + { ItemID.DD2PhoenixBow, pointBlank }, // Phantom Phoenix { ItemID.DD2SquireBetsySword, Do(UseMeleeSpeed) }, // Flying Dragon { ItemID.DD2SquireDemonSword, Do(DamageExact(110), UseExact(25)) }, // Brand of the Inferno { ItemID.DeadlySphereStaff, Do(AutoReuse, UseExact(20)) }, @@ -243,11 +206,7 @@ namespace CalamityMod.Items { ItemID.DiamondStaff, Do(DamageExact(26)) }, { ItemID.Drax, Do(TrueMeleeNoSpeed, PickPower(200), AxePower(110), UseTimeExact(4), TileBoostExact(+1)) }, { ItemID.DyeTradersScimitar, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageRatio(1.33f)) }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.EbonwoodBow, Do(PointBlank, DamageRatio(1.1f)) }, - // { ItemID.EbonwoodBow, pointBlank }, - + { ItemID.EbonwoodBow, pointBlank }, { ItemID.EbonwoodHammer, Do(HammerPower(25), UseTimeExact(9), TileBoostExact(+0)) }, { ItemID.EbonwoodSword, Do(AutoReuse, UseTurn) }, { ItemID.ElectrosphereLauncher, Do(DamageRatio(1.1f)) }, @@ -260,10 +219,6 @@ namespace CalamityMod.Items // { ItemID.EnchantedBoomerang, Do(DamageExact(26), UseExact(28)) }, { ItemID.EnchantedSword, Do(UseMeleeSpeed, ScaleRatio(1.5f), DamageExact(42), UseAnimationExact(20), ShootSpeedExact(15f)) }, - - // TODO -- DELETE THIS LINE IN 1.4.4 PORT - { ItemID.EndlessQuiver, Do(DamageRatio(1.1f)) }, - { ItemID.EoCShield, Do(DefenseDelta(+1)) }, { ItemID.FairyQueenRangedItem, pointBlank }, { ItemID.Excalibur, Do(UseTurn, ScaleRatio(1.5f), UseRatio(0.8f), DamageExact(125), UseAnimationExact(45)) }, @@ -283,10 +238,6 @@ namespace CalamityMod.Items { ItemID.Flamelash, Do(DamageRatio(1.25f)) }, { ItemID.Flamethrower, Do(DamageExact(47), ShootSpeedDelta(+3f)) }, - - // TODO -- DELETE THIS LINE IN 1.4.4 PORT - { ItemID.FlamingArrow, Do(DamageRatio(1.1f)) }, - { ItemID.FlareGun, pointBlank }, { ItemID.FleshGrinder, Do(HammerPower(70), UseTimeExact(13), TileBoostExact(+0)) }, { ItemID.FlintlockPistol, pointBlank }, @@ -295,11 +246,7 @@ namespace CalamityMod.Items { ItemID.FlowerofFrost, Do(AutoReuse, ManaExact(7), UseExact(30), DamageExact(70), ShootSpeedExact(14)) }, { ItemID.FlyingKnife, Do(DamageExact(70)) }, { ItemID.FormatC, autoReuse }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.Frostbrand, Do(UseMeleeSpeed, DamageExact(97), UseExact(23)) }, - // { ItemID.Frostbrand, Do(UseMeleeSpeed, DamageExact(97)) }, - + { ItemID.Frostbrand, Do(UseMeleeSpeed, DamageExact(97)) }, { ItemID.FrostburnArrow, Do(DamageExact(8)) }, { ItemID.FrostStaff, Do(DamageExact(160), UseExact(37), ShootSpeedExact(20f)) }, // has 1 extra update { ItemID.FrozenShield, Do(DefenseDelta(+7)) }, @@ -329,7 +276,7 @@ namespace CalamityMod.Items { ItemID.GreenPhaseblade, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(51)) }, // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.GreenPhasesaber, Do(ScaleRatio(1.5f), DamageExact(72), UseExact(20)) }, + { ItemID.GreenPhasesaber, Do(ScaleRatio(1.5f), DamageExact(72)) }, // { ItemID.GreenPhasesaber, Do(ScaleRatio(1.5f), DamageExact(60)) }, { ItemID.GreenSolution, Do(Value(Item.buyPrice(silver: 5))) }, @@ -344,18 +291,15 @@ namespace CalamityMod.Items { ItemID.Handgun, Do(PointBlank, UseExact(27), DamageExact(36)) }, { ItemID.Harpoon, pointBlank }, { ItemID.HelFire, autoReuse }, - { ItemID.HellfireArrow, Do(DamageRatio(1.1f)) }, { ItemID.HellwingBow, Do(PointBlank, DamageExact(16)) }, { ItemID.HeroShield, Do(DefenseDelta(+10)) }, { ItemID.HighVelocityBullet, Do(DamageExact(15)) }, - { ItemID.HolyArrow, Do(DamageRatio(1.1f)) }, { ItemID.HornetStaff, Do(AutoReuse, UseExact(30)) }, { ItemID.IceBlade, Do(UseMeleeSpeed, DamageExact(26), UseTimeExact(33)) }, { ItemID.IceBoomerang, Do(DamageExact(28), UseExact(25), ShootSpeedExact(10)) }, { ItemID.IceBow, Do(PointBlank, AutoReuse, DamageExact(120), UseExact(35)) }, { ItemID.IceRod, Do(UseExact(6), DamageExact(30), ShootSpeedExact(20)) }, { ItemID.IceSickle, Do(AutoReuse, UseMeleeSpeed, DamageExact(95), ShootSpeedExact(20f)) }, - { ItemID.IchorArrow, Do(DamageExact(15)) }, { ItemID.ImpStaff, Do(AutoReuse, UseExact(30)) }, // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT @@ -367,10 +311,7 @@ namespace CalamityMod.Items // { ItemID.InfluxWaver, Do(UseMeleeSpeed, DamageExact(82)) }, { ItemID.IronAxe, Do(AxePower(60), UseTimeExact(15), TileBoostExact(+0)) }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.IronBow, Do(PointBlank, DamageRatio(1.1f)) }, - // { ItemID.IronBow, pointBlank }, + { ItemID.IronBow, pointBlank }, // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT { ItemID.IronBroadsword, Do(AutoReuse, UseTurn, DamageRatio(1.25f), ScaleRatio(1.2f)) }, @@ -395,10 +336,7 @@ namespace CalamityMod.Items { ItemID.LastPrism, Do(DamageRatio(0.75f)) }, { ItemID.LavaSkull, Do(DefenseExact(4)) }, { ItemID.LeadAxe, Do(AxePower(60), UseTimeExact(15), TileBoostExact(+0)) }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.LeadBow, Do(PointBlank, DamageRatio(1.1f)) }, - // { ItemID.LeadBow, pointBlank }, + { ItemID.LeadBow, pointBlank }, // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT { ItemID.LeadBroadsword, Do(AutoReuse, UseTurn, DamageRatio(1.25f), ScaleRatio(1.2f)) }, @@ -413,7 +351,7 @@ namespace CalamityMod.Items { ItemID.LightDisc, Do(DamageExact(128)) }, { ItemID.LightsBane, Do(AutoReuse, UseTurn, DamageExact(34)) }, { ItemID.LucyTheAxe, Do(AxePower(150), UseExact(13), TileBoostExact(+1)) }, - { ItemID.LunarFlareBook, Do(DamageRatio(1.5f)) }, + { ItemID.LunarFlareBook, Do(DamageRatio(1.2f)) }, { ItemID.LunarHamaxeNebula, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) }, { ItemID.LunarHamaxeSolar, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) }, { ItemID.LunarHamaxeStardust, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) }, @@ -441,7 +379,7 @@ namespace CalamityMod.Items { ItemID.MonkStaffT1, Do(TrueMeleeNoSpeed, DamageExact(83)) }, // Sleepy Octopod { ItemID.MonkStaffT2, Do(AutoReuse, TrueMelee, DamageRatio(2f)) }, // Ghastly Glaive { ItemID.MonkStaffT3, Do(DamageExact(225)) }, // Sky Dragon's Fury - { ItemID.MoonlordArrow, Do(DamageRatio(1.1f)) }, // Luminite Arrow + { ItemID.MoonlordArrow, Do(DamageExact(12)) }, // Luminite Arrow // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT { ItemID.MoonlordTurretStaff, Do(UseExact(15), DamageRatio(1.5f)) }, @@ -483,7 +421,7 @@ namespace CalamityMod.Items { ItemID.OrangePhaseblade, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(51)) }, // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.OrangePhasesaber, Do(ScaleRatio(1.5f), DamageExact(72), UseExact(20)) }, + { ItemID.OrangePhasesaber, Do(ScaleRatio(1.5f), DamageExact(72)) }, // { ItemID.OrangePhasesaber, Do(ScaleRatio(1.5f), DamageExact(60)) }, { ItemID.OrichalcumBreastplate, Do(DefenseDelta(+3)) }, @@ -525,10 +463,7 @@ namespace CalamityMod.Items // { ItemID.PalladiumSword, Do(UseTurn, ScaleRatio(1.4f), DamageExact(100)) }, { ItemID.PalladiumWaraxe, Do(AxePower(125), UseTimeExact(12), TileBoostExact(+0)) }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.PalmWoodBow, Do(PointBlank, DamageRatio(1.1f)) }, - // { ItemID.PalmWoodBow, pointBlank }, + { ItemID.PalmWoodBow, pointBlank }, { ItemID.PalmWoodHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) }, { ItemID.PalmWoodSword, Do(AutoReuse, UseTurn) }, @@ -550,10 +485,7 @@ namespace CalamityMod.Items { ItemID.PirateMap, nonConsumableBossSummon }, { ItemID.PirateStaff, Do(AutoReuse, UseExact(25)) }, { ItemID.PlatinumAxe, Do(AxePower(80), UseTimeExact(14), TileBoostExact(+0)) }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.PlatinumBow, Do(PointBlank, DamageExact(13)) }, - // { ItemID.PlatinumBow, pointBlank }, + { ItemID.PlatinumBow, pointBlank }, // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT { ItemID.PlatinumBroadsword, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageRatio(2f)) }, @@ -563,7 +495,6 @@ namespace CalamityMod.Items { ItemID.PlatinumPickaxe, Do(PickPower(55), UseTimeExact(9)) }, { ItemID.PlatinumShortsword, Do(AutoReuse, TrueMelee, DamageRatio(2f)) }, { ItemID.PoisonStaff, Do(DamageExact(57)) }, - { ItemID.ProximityMineLauncher, Do(DamageRatio(4f), UseRatio(0.8f)) }, { ItemID.PsychoKnife, Do(UseTurn, UseExact(11), AttackSpeedExact(0.5f), DamageRatio(3f)) }, { ItemID.PulseBow, Do(PointBlank, DamageRatio(1.2f)) }, { ItemID.PumpkinMoonMedallion, nonConsumableBossSummon }, @@ -571,7 +502,7 @@ namespace CalamityMod.Items { ItemID.PurplePhaseblade, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(51)) }, // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.PurplePhasesaber, Do(ScaleRatio(1.5f), DamageExact(72), UseExact(20)) }, + { ItemID.PurplePhasesaber, Do(ScaleRatio(1.5f), DamageExact(72)) }, // { ItemID.PurplePhasesaber, Do(ScaleRatio(1.5f), DamageExact(60)) }, { ItemID.PurpleSolution, Do(Value(Item.buyPrice(silver: 5))) }, @@ -581,7 +512,7 @@ namespace CalamityMod.Items { ItemID.QueenSlimeCrystal, nonConsumableBossSummon }, { ItemID.QueenSpiderStaff, Do(UseExact(25)) }, { ItemID.RainbowCrystalStaff, Do(UseExact(15)) }, - { ItemID.RainbowRod, Do(DamageExact(35), ManaExact(15), UseExact(25)) }, + { ItemID.RainbowRod, Do(DamageExact(35), ManaExact(15)) }, { ItemID.RainbowWhip, autoReuse }, { ItemID.Rally, Do(AutoReuse, DamageExact(20)) }, { ItemID.RavenStaff, Do(AutoReuse, UseExact(20)) }, @@ -590,17 +521,14 @@ namespace CalamityMod.Items { ItemID.RedPhaseblade, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(51)) }, // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.RedPhasesaber, Do(ScaleRatio(1.5f), DamageExact(72), UseExact(20)) }, + { ItemID.RedPhasesaber, Do(ScaleRatio(1.5f), DamageExact(72)) }, // { ItemID.RedPhasesaber, Do(ScaleRatio(1.5f), DamageExact(60)) }, { ItemID.RedRyder, Do(PointBlank, DamageExact(24)) }, { ItemID.RedSolution, Do(Value(Item.buyPrice(silver: 5))) }, { ItemID.RedsYoyo, autoReuse }, { ItemID.Revolver, Do(PointBlank, AutoReuse) }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.RichMahoganyBow, Do(PointBlank, DamageRatio(1.1f)) }, - // { ItemID.RichMahoganyBow, pointBlank }, + { ItemID.RichMahoganyBow, pointBlank }, { ItemID.RichMahoganyHammer, Do(HammerPower(25), UseTimeExact(10), TileBoostExact(+0)) }, { ItemID.RichMahoganySword, Do(AutoReuse, UseTurn) }, @@ -618,10 +546,7 @@ namespace CalamityMod.Items { ItemID.SDMG, pointBlank }, { ItemID.Seedler, Do(UseMeleeSpeed, DamageRatio(1.5f)) }, { ItemID.Shackle, Do(DefenseDelta(+2)) }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.ShadewoodBow, Do(PointBlank, DamageRatio(1.1f)) }, - // { ItemID.ShadewoodBow, pointBlank }, + { ItemID.ShadewoodBow, pointBlank }, { ItemID.ShadewoodHammer, Do(HammerPower(25), UseTimeExact(9), TileBoostExact(+0)) }, { ItemID.ShadewoodSword, Do(AutoReuse, UseTurn) }, @@ -640,10 +565,7 @@ namespace CalamityMod.Items { ItemID.Shotgun, Do(PointBlank, DamageExact(36), AutoReuse) }, { ItemID.ShroomiteDiggingClaw, Do(PickPower(200), AxePower(125), UseTimeExact(4), TileBoostExact(-1)) }, { ItemID.SilverAxe, Do(AxePower(70), UseTimeExact(14), TileBoostExact(+0)) }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.SilverBow, Do(PointBlank, DamageRatio(1.1f)) }, - // { ItemID.SilverBow, pointBlank }, + { ItemID.SilverBow, pointBlank }, // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT { ItemID.SilverBroadsword, Do(AutoReuse, UseTurn, DamageRatio(1.5f), ScaleRatio(1.3f)) }, @@ -672,7 +594,7 @@ namespace CalamityMod.Items { ItemID.Spear, Do(AutoReuse, TrueMelee, DamageRatio(2f)) }, { ItemID.SpectreHamaxe, Do(HammerPower(90), AxePower(170), UseTimeExact(8), TileBoostExact(+4)) }, { ItemID.SpectrePickaxe, Do(PickPower(200), UseTimeExact(8), TileBoostExact(+4)) }, - { ItemID.SpectreStaff, Do(DamageRatio(3f)) }, + { ItemID.SpectreStaff, Do(DamageRatio(1.2f)) }, { ItemID.SpiderStaff, Do(AutoReuse, UseExact(25)) }, { ItemID.SpiritFlame, Do(UseExact(20), ManaExact(11), ShootSpeedExact(2f)) }, { ItemID.StaffofEarth, Do(DamageRatio(1.2f)) }, @@ -716,11 +638,7 @@ namespace CalamityMod.Items { ItemID.ThornWhip, autoReuse }, { ItemID.ThunderSpear, Do(AutoReuse, UseMeleeSpeed) }, // Storm Spear { ItemID.TinAxe, Do(AxePower(50), UseTimeExact(16), TileBoostExact(+0)) }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.TinBow, Do(PointBlank, DamageRatio(1.1f)) }, - // { ItemID.TinBow, pointBlank }, - + { ItemID.TinBow, pointBlank }, { ItemID.TinBroadsword, Do(AutoReuse, UseTurn) }, { ItemID.TinHammer, Do(HammerPower(35), UseTimeExact(12), TileBoostExact(+0)) }, { ItemID.TinPickaxe, Do(PickPower(35), UseTimeExact(10), TileBoostExact(+0)) }, @@ -757,7 +675,6 @@ namespace CalamityMod.Items { ItemID.Valor, Do(DamageExact(32)) }, { ItemID.VampireFrogStaff, Do(AutoReuse, UseExact(30)) }, { ItemID.VampireKnives, Do(DamageRatio(1.33f)) }, - { ItemID.VenomArrow, Do(DamageRatio(1.1f)) }, { ItemID.VenomStaff, Do(DamageRatio(1.5f)) }, { ItemID.VenusMagnum, Do(AutoReuse, PointBlank) }, { ItemID.ViciousMushroom, Do(Value(0)) }, @@ -775,18 +692,11 @@ namespace CalamityMod.Items { ItemID.WhitePhaseblade, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(51)) }, // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.WhitePhasesaber, Do(ScaleRatio(1.5f), DamageExact(72), UseExact(20)) }, + { ItemID.WhitePhasesaber, Do(ScaleRatio(1.5f), DamageExact(72)) }, // { ItemID.WhitePhasesaber, Do(ScaleRatio(1.5f), DamageExact(60)) }, - // TODO -- DELETE THIS LINE IN 1.4.4 PORT - { ItemID.WoodenArrow, Do(DamageRatio(1.1f)) }, - { ItemID.WoodenBoomerang, Do(DamageRatio(2f), Value(Item.sellPrice(copper: 20))) }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.WoodenBow, Do(PointBlank, DamageRatio(1.1f)) }, - // { ItemID.WoodenBow, pointBlank }, - + { ItemID.WoodenBow, pointBlank }, { ItemID.WoodenHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) }, { ItemID.WoodenSword, Do(AutoReuse, UseTurn) }, { ItemID.WoodYoyo, autoReuse }, @@ -797,15 +707,12 @@ namespace CalamityMod.Items { ItemID.YellowPhaseblade, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(51)) }, // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.YellowPhasesaber, Do(ScaleRatio(1.5f), DamageExact(72), UseExact(20)) }, + { ItemID.YellowPhasesaber, Do(ScaleRatio(1.5f), DamageExact(72)) }, // { ItemID.YellowPhasesaber, Do(ScaleRatio(1.5f), DamageExact(60)) }, { ItemID.ZapinatorGray, autoReuse }, { ItemID.ZapinatorOrange, autoReuse }, - - // TODO -- REPLACE WITH COMMENTED LINE IN 1.4.4 PORT - { ItemID.ZombieArm, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(12), KnockbackExact(12f)) }, - // { ItemID.ZombieArm, Do(AutoReuse, UseTurn, ScaleRatio(1.25f), KnockbackExact(12f)) }, + { ItemID.ZombieArm, Do(AutoReuse, UseTurn, ScaleRatio(1.25f), KnockbackExact(12f)) }, }; } diff --git a/Items/PermanentBoosters/BloodOrange.cs b/Items/PermanentBoosters/BloodOrange.cs index dfbb2732da..2c1c04def9 100644 --- a/Items/PermanentBoosters/BloodOrange.cs +++ b/Items/PermanentBoosters/BloodOrange.cs @@ -18,8 +18,7 @@ namespace CalamityMod.Items.PermanentBoosters DisplayName.SetDefault("Blood Orange"); Tooltip.SetDefault("It has a distinctly sweet flavor and a strong aroma\n" + "Permanently increases maximum life by 25\n" + - "Can only be used if the max amount of life fruit has been consumed\n" + - ""); + "Can only be used if the max amount of life fruit has been consumed"); SacrificeTotal = 1; // For some reason Life/Mana boosting items are in this set (along with Magic Mirror+) ItemID.Sets.SortingPriorityBossSpawns[Type] = 18; // Life Fruit @@ -81,7 +80,6 @@ namespace CalamityMod.Items.PermanentBoosters { CreateRecipe(). AddIngredient(ItemID.LifeFruit, 5). - AddIngredient(ItemID.OrangeBloodroot). AddIngredient(10). AddIngredient(ItemID.SoulofFright, 5). AddIngredient(ItemID.SoulofMight, 5). diff --git a/Items/PermanentBoosters/Dragonfruit.cs b/Items/PermanentBoosters/Dragonfruit.cs index 9c41bb4f7e..afb31bcd68 100644 --- a/Items/PermanentBoosters/Dragonfruit.cs +++ b/Items/PermanentBoosters/Dragonfruit.cs @@ -83,7 +83,6 @@ namespace CalamityMod.Items.PermanentBoosters { CreateRecipe(). AddIngredient(ItemID.LifeFruit, 5). - AddIngredient(ItemID.SkyBlueFlower). AddIngredient(ItemID.FragmentSolar, 15). AddIngredient(5). AddIngredient(). diff --git a/Items/PermanentBoosters/Elderberry.cs b/Items/PermanentBoosters/Elderberry.cs index 4e58b85b92..fd95605c79 100644 --- a/Items/PermanentBoosters/Elderberry.cs +++ b/Items/PermanentBoosters/Elderberry.cs @@ -82,7 +82,6 @@ namespace CalamityMod.Items.PermanentBoosters { CreateRecipe(). AddIngredient(ItemID.LifeFruit, 5). - AddIngredient(ItemID.BlueBerries). AddIngredient(10). AddIngredient(10). AddIngredient(20). diff --git a/Items/PermanentBoosters/MiracleFruit.cs b/Items/PermanentBoosters/MiracleFruit.cs index 381ac019b6..bde8646184 100644 --- a/Items/PermanentBoosters/MiracleFruit.cs +++ b/Items/PermanentBoosters/MiracleFruit.cs @@ -81,7 +81,6 @@ namespace CalamityMod.Items.PermanentBoosters { CreateRecipe(). AddIngredient(ItemID.LifeFruit, 5). - AddIngredient(ItemID.TealMushroom). AddIngredient(5). AddIngredient(5). AddIngredient(10). diff --git a/Items/Potions/Alcohol/BloodyMary.cs b/Items/Potions/Alcohol/BloodyMary.cs index 54823ff571..78ceda1216 100644 --- a/Items/Potions/Alcohol/BloodyMary.cs +++ b/Items/Potions/Alcohol/BloodyMary.cs @@ -7,15 +7,13 @@ namespace CalamityMod.Items.Potions.Alcohol { public class BloodyMary : ModItem { - internal static readonly int CritBoost = 7; - public override void SetStaticDefaults() { SacrificeTotal = 5; DisplayName.SetDefault("Bloody Mary"); Tooltip.SetDefault(@"Extra spicy and bloody! -Boosts damage by 15%, movement speed by 10%, melee speed by 15% and crit chance by 7% during a Blood Moon -Reduces life regen by 2 and defense by 4%"); +Boosts damage and movement speed by 10% during a Blood Moon +Reduces life regen by 4 and defense by 4%"); } public override void SetDefaults() diff --git a/Items/Potions/Alcohol/MoscowMule.cs b/Items/Potions/Alcohol/MoscowMule.cs index a86b3f19c3..3c75eed13e 100644 --- a/Items/Potions/Alcohol/MoscowMule.cs +++ b/Items/Potions/Alcohol/MoscowMule.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Potions.Alcohol DisplayName.SetDefault("Moscow Mule"); Tooltip.SetDefault(@"I once heard the copper mug can be toxic and I told 'em 'listen dummy, I'm already poisoning myself' Boosts damage by 9%, knockback by 50% and critical strike chance by 3% -Reduces life regen by 2"); +Reduces life regen by 4"); } public override void SetDefaults() diff --git a/Items/Potions/Alcohol/StarBeamRye.cs b/Items/Potions/Alcohol/StarBeamRye.cs index 6611f24241..a27a1a4e66 100644 --- a/Items/Potions/Alcohol/StarBeamRye.cs +++ b/Items/Potions/Alcohol/StarBeamRye.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Potions.Alcohol Tooltip.SetDefault(@"Made from some stuff I found near the Astral Meteor crash site, don't worry it's safe, trust me Boosts max mana by 50, magic damage by 8%, and reduces mana usage by 10% -Reduces defense by 6% and life regen by 1"); +Reduces defense by 6% and life regen by 2"); } public override void SetDefaults() diff --git a/Items/Potions/Alcohol/Tequila.cs b/Items/Potions/Alcohol/Tequila.cs index 47bdc44153..b030060aa0 100644 --- a/Items/Potions/Alcohol/Tequila.cs +++ b/Items/Potions/Alcohol/Tequila.cs @@ -7,14 +7,14 @@ namespace CalamityMod.Items.Potions.Alcohol { public class Tequila : ModItem { - internal static readonly int CritBoost = 2; + internal static readonly int CritBoost = 4; public override void SetStaticDefaults() { SacrificeTotal = 5; DisplayName.SetDefault("Tequila"); Tooltip.SetDefault(@"Great for mixing up daytime drinks -Boosts damage and damage reduction by 3%, knockback by 10%, crit chance by 2% and defense by 5 during daytime +Boosts knockback by 10%, crit chance by 4% and defense by 5 during daytime Reduces life regen by 1"); } diff --git a/Items/Potions/Alcohol/TequilaSunrise.cs b/Items/Potions/Alcohol/TequilaSunrise.cs index 1238c2bbc7..0aac64449d 100644 --- a/Items/Potions/Alcohol/TequilaSunrise.cs +++ b/Items/Potions/Alcohol/TequilaSunrise.cs @@ -7,14 +7,14 @@ namespace CalamityMod.Items.Potions.Alcohol { public class TequilaSunrise : ModItem { - internal static readonly int CritBoost = 3; + internal static readonly int CritBoost = 8; public override void SetStaticDefaults() { SacrificeTotal = 5; DisplayName.SetDefault("Tequila Sunrise"); Tooltip.SetDefault(@"The greatest daytime drink I've ever had -Boosts damage by 7%, knockback by 20%, crit chance and damage reduction by 3% and defense by 10 during daytime -Reduces life regen by 1"); +Boosts knockback by 20%, crit chance by 8% and defense by 10 during daytime +Reduces life regen by 2"); } public override void SetDefaults() diff --git a/Items/Potions/Alcohol/WhiteWine.cs b/Items/Potions/Alcohol/WhiteWine.cs index 9e869c5ece..b661b77616 100644 --- a/Items/Potions/Alcohol/WhiteWine.cs +++ b/Items/Potions/Alcohol/WhiteWine.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Potions.Alcohol SacrificeTotal = 5; DisplayName.SetDefault("White Wine"); Tooltip.SetDefault(@"I drank a full barrel of this stuff once in one night, I couldn't remember who I was the next day -Boosts magic damage by 10% +Boosts magic damage by 8% Reduces defense by 6% and life regen by 1"); } @@ -29,7 +29,7 @@ Reduces defense by 6% and life regen by 1"); Item.useStyle = ItemUseStyleID.DrinkLiquid; Item.UseSound = SoundID.Item3; Item.consumable = true; - Item.healMana = 400; + Item.healMana = 300; Item.buffType = ModContent.BuffType(); Item.buffTime = CalamityUtils.SecondsToFrames(300f); Item.value = Item.buyPrice(0, 4, 0, 0); diff --git a/Items/Potions/AstralInjection.cs b/Items/Potions/AstralInjection.cs index 158eb77ac4..5f22e38ff0 100644 --- a/Items/Potions/AstralInjection.cs +++ b/Items/Potions/AstralInjection.cs @@ -50,16 +50,16 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(4). - AddIngredient(ItemID.BottledWater, 4). + CreateRecipe(15). + AddIngredient(ItemID.BottledWater, 15). AddIngredient(4). AddIngredient(). AddTile(TileID.AlchemyTable). AddConsumeItemCallback(Recipe.ConsumptionRules.Alchemy). Register(); - CreateRecipe(8). - AddIngredient(ItemID.BottledWater, 4). + CreateRecipe(15). + AddIngredient(ItemID.BottledWater, 15). AddIngredient(5). AddIngredient(). AddTile(TileID.AlchemyTable). diff --git a/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs b/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs index ed6f00a5d0..cd726e457a 100644 --- a/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs +++ b/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Adamantite"; public const int MaxManaBoost = 20; - public const int DefenseBoostMax = 30; + public const int DefenseBoostMax = 15; public const int TimeUntilDecayBeginsAfterAttacking = 60; public const int TimeUntilBoostCompletelyDecays = 210; diff --git a/Items/VanillaArmorChanges/CobaltArmorSetChange.cs b/Items/VanillaArmorChanges/CobaltArmorSetChange.cs index b1b450c1b0..87bf0c8f78 100644 --- a/Items/VanillaArmorChanges/CobaltArmorSetChange.cs +++ b/Items/VanillaArmorChanges/CobaltArmorSetChange.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.VanillaArmorChanges public const int SpeedBoostSetBonusPercentage = 10; public const int MaxManaBoost = 20; public const int MovementSpeedBoostPercentageMax = 10; - public const int MovementSpeedBoostMphThreshold = 60; + public const int MovementSpeedBoostMphThreshold = 80; public override void ApplyHeadPieceEffect(Player player) { diff --git a/Items/VanillaArmorChanges/CopperArmorSetChange.cs b/Items/VanillaArmorChanges/CopperArmorSetChange.cs index 228dcffb3d..fa2f673f9b 100644 --- a/Items/VanillaArmorChanges/CopperArmorSetChange.cs +++ b/Items/VanillaArmorChanges/CopperArmorSetChange.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Items.VanillaArmorChanges public const float ChestCrit = 3f; public const float LegsMoveSpeed = 0.05f; public const float SetBonusFlatDamage = 2.0f; - public const float SetBonusMoveSpeed = 0.1f; public override void ApplyHeadPieceEffect(Player player) => player.GetDamage() += HeadDamage; @@ -30,14 +29,13 @@ namespace CalamityMod.Items.VanillaArmorChanges public override void UpdateSetBonusText(ref string setBonusText) { StringBuilder sb = new StringBuilder(256); - sb.Append("\nIncreases all damage by 2\n10% increased movement speed"); + sb.Append("\nIncreases all damage by 2"); setBonusText += sb.ToString(); } public override void ApplyArmorSetBonus(Player player) { player.GetDamage().Flat += SetBonusFlatDamage; - player.moveSpeed += SetBonusMoveSpeed; } } } diff --git a/Items/VanillaArmorChanges/GoldArmorSetChange.cs b/Items/VanillaArmorChanges/GoldArmorSetChange.cs index 59f8ab6079..de69a79da7 100644 --- a/Items/VanillaArmorChanges/GoldArmorSetChange.cs +++ b/Items/VanillaArmorChanges/GoldArmorSetChange.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.VanillaArmorChanges public const float HeadDamage = 0.06f; public const float ChestDR = 0.05f; - public const float LegsMoveSpeed = 0.12f; + public const float LegsMoveSpeed = 0.1f; public const float GoldDropChanceFromEnemies = 0.04f; public const int GoldFromBosses = 3; public const float SetBonusCritPerGoldCoin = 0.2f; // 5 gold coins = +1% crit chance diff --git a/Items/VanillaArmorChanges/MythrilArmorSetChange.cs b/Items/VanillaArmorChanges/MythrilArmorSetChange.cs index 359a72a64a..f9da6d3217 100644 --- a/Items/VanillaArmorChanges/MythrilArmorSetChange.cs +++ b/Items/VanillaArmorChanges/MythrilArmorSetChange.cs @@ -19,10 +19,8 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Mythril"; public const int MaxManaBoost = 20; - public const int ChestplateDamagePercentageBoost = 5; - public const int LeggingsCritChanceBoost = 4; - public const int FlareFrameSpawnDelay = 9; - public const int FlareDamageSoftcap = 105; + public const int FlareFrameSpawnDelay = 12; + public const int FlareDamageSoftcap = 50; public override void UpdateSetBonusText(ref string setBonusText) { @@ -36,13 +34,6 @@ namespace CalamityMod.Items.VanillaArmorChanges player.statManaMax2 += MaxManaBoost; } - public override void ApplyBodyPieceEffect(Player player) - { - player.GetDamage() += ChestplateDamagePercentageBoost * 0.01f; - } - - public override void ApplyLegPieceEffect(Player player) => player.GetCritChance() += LeggingsCritChanceBoost; - public override void ApplyArmorSetBonus(Player player) { player.Calamity().MythrilSet = true; diff --git a/Items/VanillaArmorChanges/PalladiumArmorSetChange.cs b/Items/VanillaArmorChanges/PalladiumArmorSetChange.cs index 0a1537e259..7d0756257c 100644 --- a/Items/VanillaArmorChanges/PalladiumArmorSetChange.cs +++ b/Items/VanillaArmorChanges/PalladiumArmorSetChange.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Palladium"; - public const int ChestplateDamagePercentageBoost = 4; - public const int LeggingsDamagePercentageBoost = 5; + public const int ChestplateDamagePercentageBoost = 2; + public const int LeggingsDamagePercentageBoost = 3; public override void ApplyBodyPieceEffect(Player player) { diff --git a/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs b/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs index 7ee6cb1d8b..19b239eb06 100644 --- a/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs +++ b/Items/VanillaArmorChanges/PlatinumArmorSetChange.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.VanillaArmorChanges public const float HeadDamage = 0.06f; public const float ChestCrit = 5f; - public const float LegsMoveSpeed = 0.12f; + public const float LegsMoveSpeed = 0.1f; public const float SetBonusLifeRegenPerDefense = 0.0666667f; // 15 defense = +1 life regen public const float SetBonusCritPerDefense = 0.0666667f; // 15 defense = +1% crit chance public const int SetBonusDefenseCap = 45; diff --git a/Items/VanillaArmorChanges/SilverArmorSetChange.cs b/Items/VanillaArmorChanges/SilverArmorSetChange.cs index f5df7cebb7..e7fa03d65f 100644 --- a/Items/VanillaArmorChanges/SilverArmorSetChange.cs +++ b/Items/VanillaArmorChanges/SilverArmorSetChange.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Silver"; - public const float HeadCrit = 6f; + public const float HeadCrit = 5f; public const int ChestLifeRegen = 2; - public const float LegsMoveSpeed = 0.1f; + public const float LegsMoveSpeed = 0.08f; public const int SetBonusLifeRegen = 1; public const double SetBonusMinimumDamageToHeal = 20.0; diff --git a/Items/VanillaArmorChanges/TinArmorSetChange.cs b/Items/VanillaArmorChanges/TinArmorSetChange.cs index 4387072c97..2d7c838e2b 100644 --- a/Items/VanillaArmorChanges/TinArmorSetChange.cs +++ b/Items/VanillaArmorChanges/TinArmorSetChange.cs @@ -17,9 +17,8 @@ namespace CalamityMod.Items.VanillaArmorChanges public const float HeadCrit = 4f; public const int ChestLifeRegen = 1; - public const float LegsMoveSpeed = 0.1f; + public const float LegsMoveSpeed = 0.05f; public const float SetBonusArmorPen = 5.0f; - public const int SetBonusLifeRegen = 1; public override void ApplyHeadPieceEffect(Player player) => player.GetCritChance() += HeadCrit; @@ -30,14 +29,13 @@ namespace CalamityMod.Items.VanillaArmorChanges public override void UpdateSetBonusText(ref string setBonusText) { StringBuilder sb = new StringBuilder(256); - sb.Append("\nIncreases armor penetration by 5\n+1 life regen"); + sb.Append("\nIncreases armor penetration by 5"); setBonusText += sb.ToString(); } public override void ApplyArmorSetBonus(Player player) { player.GetArmorPenetration() += SetBonusArmorPen; - player.lifeRegen += SetBonusLifeRegen; } } } diff --git a/Items/VanillaArmorChanges/TungstenArmorSetChange.cs b/Items/VanillaArmorChanges/TungstenArmorSetChange.cs index 172e88affa..597efa2bfa 100644 --- a/Items/VanillaArmorChanges/TungstenArmorSetChange.cs +++ b/Items/VanillaArmorChanges/TungstenArmorSetChange.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.VanillaArmorChanges public const float HeadDamage = 0.07f; public const int ChestLifeRegen = 1; - public const float LegsMoveSpeed = 0.1f; + public const float LegsMoveSpeed = 0.08f; public const float KnockbackMultiplier = 1.33f; public const float MaxKnockbackCritConversion = 10f; diff --git a/Items/Weapons/Magic/ArtAttack.cs b/Items/Weapons/Magic/ArtAttack.cs index e57451a97c..8c3642eace 100644 --- a/Items/Weapons/Magic/ArtAttack.cs +++ b/Items/Weapons/Magic/ArtAttack.cs @@ -8,8 +8,8 @@ namespace CalamityMod.Items.Weapons.Magic { public class ArtAttack : ModItem { - public const int MaxDamageBoostTime = 270; - public const float MaxDamageBoostFactor = 2.3f; + public const int MaxDamageBoostTime = 240; + public const float MaxDamageBoostFactor = 20f; public static readonly SoundStyle UseSound = new("CalamityMod/Sounds/Item/ArtAttackCast"); public override void SetStaticDefaults() { @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 470; + Item.damage = 80; Item.DamageType = DamageClass.Magic; Item.mana = 10; Item.width = 70; @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.knockBack = 2f; Item.value = CalamityGlobalItem.Rarity7BuyPrice; Item.rare = ItemRarityID.Lime; - Item.UseSound = UseSound; + Item.UseSound = null; Item.autoReuse = true; Item.noUseGraphic = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/BrimroseStaff.cs b/Items/Weapons/Magic/BrimroseStaff.cs index 778289f4d4..bde42ffe85 100644 --- a/Items/Weapons/Magic/BrimroseStaff.cs +++ b/Items/Weapons/Magic/BrimroseStaff.cs @@ -1,6 +1,5 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; -using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -19,11 +18,11 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 15; - Item.DamageType = DamageClass.Magic; - Item.mana = 6; Item.width = 36; Item.height = 34; + Item.damage = 45; + Item.DamageType = DamageClass.Magic; + Item.mana = 6; Item.useTime = 16; Item.useAnimation = 16; Item.useStyle = ItemUseStyleID.Shoot; @@ -33,10 +32,9 @@ namespace CalamityMod.Items.Weapons.Magic Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item43; Item.autoReuse = true; - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; } - public override void AddRecipes() { diff --git a/Items/Weapons/Magic/BurningSea.cs b/Items/Weapons/Magic/BurningSea.cs index cfe6ccbe57..7698837490 100644 --- a/Items/Weapons/Magic/BurningSea.cs +++ b/Items/Weapons/Magic/BurningSea.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 72; + Item.damage = 75; Item.DamageType = DamageClass.Magic; Item.mana = 15; Item.width = 28; diff --git a/Items/Weapons/Magic/DivineRetribution.cs b/Items/Weapons/Magic/DivineRetribution.cs index 3e849daa23..d77d2be6c0 100644 --- a/Items/Weapons/Magic/DivineRetribution.cs +++ b/Items/Weapons/Magic/DivineRetribution.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 62; + Item.damage = 48; Item.DamageType = DamageClass.Magic; Item.mana = 15; Item.width = 66; diff --git a/Items/Weapons/Magic/HeliumFlash.cs b/Items/Weapons/Magic/HeliumFlash.cs index 6925925c24..1a3d62fd3b 100644 --- a/Items/Weapons/Magic/HeliumFlash.cs +++ b/Items/Weapons/Magic/HeliumFlash.cs @@ -2,7 +2,10 @@ using CalamityMod.Projectiles.Magic; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; +using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -44,15 +47,13 @@ namespace CalamityMod.Items.Weapons.Magic Item.shootSpeed = 15f; } - // TODO -- Fancy visual flare doesn't work with resprited Helium Flash, adjust dust positions - /* // Creates dust at the tip of the staff when used. public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { Vector2 dir = velocity; double angle = Math.Atan2(velocity.Y, velocity.X) + MathHelper.PiOver4; dir = dir.SafeNormalize(Vector2.Zero); - dir *= 64f * 1.4142f; // distance to gleaming point on staff + dir *= 80f * (float)Math.Sqrt(2); // distance to gleaming point on staff Vector2 dustPos = position + dir; int dustType = 162; @@ -93,7 +94,7 @@ namespace CalamityMod.Items.Weapons.Magic } return true; } - */ + public override void AddRecipes() { diff --git a/Items/Weapons/Magic/InfernalRift.cs b/Items/Weapons/Magic/InfernalRift.cs index 6c74648d37..9191efa5e1 100644 --- a/Items/Weapons/Magic/InfernalRift.cs +++ b/Items/Weapons/Magic/InfernalRift.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 40; + Item.damage = 50; Item.DamageType = DamageClass.Magic; Item.mana = 15; Item.width = 16; @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.UseSound = SoundID.Item9; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 16f; + Item.shootSpeed = 28f; } // Terraria seems to really dislike high crit values in SetDefaults @@ -49,7 +49,7 @@ namespace CalamityMod.Items.Weapons.Magic float num72 = Item.shootSpeed; float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - float f = Main.rand.NextFloat() * 6.28318548f; + float f = Main.rand.NextFloat() * MathHelper.TwoPi; float value12 = 20f; float value13 = 60f; Vector2 vector13 = vector2 + f.ToRotationVector2() * MathHelper.Lerp(value12, value13, Main.rand.NextFloat()); @@ -60,7 +60,7 @@ namespace CalamityMod.Items.Weapons.Magic { break; } - f = Main.rand.NextFloat() * 6.28318548f; + f = Main.rand.NextFloat() * MathHelper.TwoPi; } Vector2 mouseWorld = Main.MouseWorld; Vector2 vector14 = mouseWorld - vector13; diff --git a/Items/Weapons/Magic/Lazhar.cs b/Items/Weapons/Magic/Lazhar.cs index 0b21cf8b3d..38f6d02e5f 100644 --- a/Items/Weapons/Magic/Lazhar.cs +++ b/Items/Weapons/Magic/Lazhar.cs @@ -11,13 +11,13 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetStaticDefaults() { DisplayName.SetDefault("Lazhar"); - Tooltip.SetDefault("Fires a bouncing laser that explodes on enemy hits"); + Tooltip.SetDefault("Fires a highly volatile concentrated solar beam"); SacrificeTotal = 1; } public override void SetDefaults() { - Item.damage = 100; + Item.damage = 80; Item.DamageType = DamageClass.Magic; Item.mana = 4; Item.width = 42; @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.UseSound = SoundID.Item12; Item.autoReuse = true; Item.shootSpeed = 15f; - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); } public override Vector2? HoldoutOffset() => new Vector2(-5, 0); @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void AddRecipes() { - CreateRecipe(1). + CreateRecipe(). AddIngredient(ItemID.SpaceGun). AddIngredient(ItemID.HeatRay). AddIngredient(ItemID.FragmentSolar, 6). diff --git a/Items/Weapons/Magic/PlagueStaff.cs b/Items/Weapons/Magic/PlagueStaff.cs index bb0b5e9572..c1e0e521ef 100644 --- a/Items/Weapons/Magic/PlagueStaff.cs +++ b/Items/Weapons/Magic/PlagueStaff.cs @@ -1,6 +1,5 @@ using CalamityMod.Projectiles.Magic; using Microsoft.Xna.Framework; -using System; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -13,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetStaticDefaults() { DisplayName.SetDefault("Plague Staff"); - Tooltip.SetDefault("Fires a spread of plague fangs"); + Tooltip.SetDefault("Fires a tight spread of 4 plague fangs"); Item.staff[Item.type] = true; SacrificeTotal = 1; } @@ -41,40 +40,12 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num72 = Item.shootSpeed; - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - int num130 = 6; - if (Main.rand.NextBool(3)) + for (int i = 0; i < 3; i++) { - num130++; + Vector2 spreadVelocity = velocity.RotatedByRandom(MathHelper.ToRadians(5f)) * Main.rand.NextFloat(0.8f, 1.2f); + Projectile.NewProjectile(source, position, spreadVelocity, type, damage, knockback, Main.myPlayer); } - if (Main.rand.NextBool(4)) - { - num130++; - } - if (Main.rand.NextBool(5)) - { - num130++; - } - for (int num131 = 0; num131 < num130; num131++) - { - float num132 = num78; - float num133 = num79; - float num134 = 0.05f * (float)num131; - num132 += (float)Main.rand.Next(-120, 121) * num134; - num133 += (float)Main.rand.Next(-120, 121) * num134; - num80 = (float)Math.Sqrt((double)(num132 * num132 + num133 * num133)); - num80 = num72 / num80; - num132 *= num80; - num133 *= num80; - float x2 = vector2.X; - float y2 = vector2.Y; - Projectile.NewProjectile(source, x2, y2, num132, num133, ModContent.ProjectileType(), damage, knockback, Main.myPlayer, 0f, 0f); - } - return false; + return true; // Fires one directly with no randomness, totaling 4 projectiles } } } diff --git a/Items/Weapons/Magic/PlasmaRod.cs b/Items/Weapons/Magic/PlasmaRod.cs index 2378ee1770..dfa783c984 100644 --- a/Items/Weapons/Magic/PlasmaRod.cs +++ b/Items/Weapons/Magic/PlasmaRod.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic DisplayName.SetDefault("Plasma Rod"); Tooltip.SetDefault("Casts a low-damage plasma bolt\n" + "Shooting a tile will cause several bolts with increased damage to fire\n" + - "Shooting an enemy will inflict shadowflame for a long duration"); + "Shooting an enemy will inflict shadowflame"); Item.staff[Item.type] = true; SacrificeTotal = 1; } diff --git a/Items/Weapons/Magic/PrimordialEarth.cs b/Items/Weapons/Magic/PrimordialEarth.cs index 0a7bd65407..9c855c11c2 100644 --- a/Items/Weapons/Magic/PrimordialEarth.cs +++ b/Items/Weapons/Magic/PrimordialEarth.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 60; + Item.damage = 72; Item.DamageType = DamageClass.Magic; Item.mana = 19; Item.width = 36; diff --git a/Items/Weapons/Magic/ShiftingSands.cs b/Items/Weapons/Magic/ShiftingSands.cs index b08ec184cf..3d41433bf8 100644 --- a/Items/Weapons/Magic/ShiftingSands.cs +++ b/Items/Weapons/Magic/ShiftingSands.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 61; + Item.damage = 92; Item.knockBack = 5f; Item.useTime = Item.useAnimation = 30; Item.mana = 20; @@ -35,19 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.rare = ItemRarityID.Lime; } - public override bool CanUseItem(Player player) - { - int projCount = 0; - for (int x = 0; x < Main.maxProjectiles; x++) - { - Projectile proj = Main.projectile[x]; - if (proj.active && proj.owner == player.whoAmI && proj.type == Item.shoot && proj.ai[0] <= 0f) - { - projCount++; - } - } - return projCount <= 0; - } + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; public override void AddRecipes() { diff --git a/Items/Weapons/Magic/TearsofHeaven.cs b/Items/Weapons/Magic/TearsofHeaven.cs index 37d1f6bb50..4a36e0e062 100644 --- a/Items/Weapons/Magic/TearsofHeaven.cs +++ b/Items/Weapons/Magic/TearsofHeaven.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 64; + Item.damage = 54; Item.DamageType = DamageClass.Magic; Item.mana = 18; Item.width = 28; diff --git a/Items/Weapons/Magic/WulfrumProsthesis.cs b/Items/Weapons/Magic/WulfrumProsthesis.cs index ee7d3ddb2b..3a137c5305 100644 --- a/Items/Weapons/Magic/WulfrumProsthesis.cs +++ b/Items/Weapons/Magic/WulfrumProsthesis.cs @@ -39,9 +39,9 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 13; + Item.damage = 18; Item.DamageType = DamageClass.Magic; - Item.mana = 2; + Item.mana = 5; Item.width = 34; Item.height = 42; Item.useTime = 24; diff --git a/Items/Weapons/Melee/BurntSienna.cs b/Items/Weapons/Melee/BurntSienna.cs index 1e907a3ec6..a2e5762aad 100644 --- a/Items/Weapons/Melee/BurntSienna.cs +++ b/Items/Weapons/Melee/BurntSienna.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { Item.width = 42; - Item.damage = 28; + Item.damage = 32; Item.DamageType = DamageClass.Melee; Item.useAnimation = Item.useTime = 21; Item.useTurn = true; diff --git a/Items/Weapons/Melee/MonstrousKnives.cs b/Items/Weapons/Melee/MonstrousKnives.cs index 836fef92c5..1b94b18331 100644 --- a/Items/Weapons/Melee/MonstrousKnives.cs +++ b/Items/Weapons/Melee/MonstrousKnives.cs @@ -1,5 +1,4 @@ using Terraria.DataStructures; -using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; using Terraria; @@ -20,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { Item.width = 18; - Item.damage = 4; + Item.damage = 9; Item.DamageType = DamageClass.MeleeNoSpeed; Item.noMelee = true; Item.noUseGraphic = true; @@ -105,7 +104,6 @@ namespace CalamityMod.Items.Weapons.Melee AddIngredient(ItemID.ThrowingKnife, 200). AddIngredient(ItemID.LifeCrystal). AddIngredient(ItemID.LesserHealingPotion, 5). - AddIngredient(10). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Weapons/Melee/WulfrumScrewdriver.cs b/Items/Weapons/Melee/WulfrumScrewdriver.cs index 04483a5e41..7952175583 100644 --- a/Items/Weapons/Melee/WulfrumScrewdriver.cs +++ b/Items/Weapons/Melee/WulfrumScrewdriver.cs @@ -76,7 +76,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 14; Item.height = 50; - Item.damage = 9; + Item.damage = 12; Item.DamageType = DamageClass.Melee; Item.useAnimation = DefaultTime + WulfrumScrewdriverProj.MaxTime; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Ranged/Archerfish.cs b/Items/Weapons/Ranged/Archerfish.cs index 5a8189bfc1..b2609e0292 100644 --- a/Items/Weapons/Ranged/Archerfish.cs +++ b/Items/Weapons/Ranged/Archerfish.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 9; + Item.damage = 16; Item.DamageType = DamageClass.Ranged; Item.width = 78; Item.height = 36; @@ -45,9 +45,9 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (type == ProjectileID.Bullet) - Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), damage, knockback, player.whoAmI); + Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI); else - Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI); + Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); return false; } diff --git a/Items/Weapons/Ranged/BladedgeGreatbow.cs b/Items/Weapons/Ranged/BladedgeGreatbow.cs index 4ea51b65f2..f773a5332b 100644 --- a/Items/Weapons/Ranged/BladedgeGreatbow.cs +++ b/Items/Weapons/Ranged/BladedgeGreatbow.cs @@ -12,14 +12,13 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { DisplayName.SetDefault("Bladedge Railbow"); - Tooltip.SetDefault("Fires 4 arrows at once\n" + - "Fires 2 additional leaves"); + Tooltip.SetDefault("Fires a spread of 4 arrows and 2 leaves at once"); SacrificeTotal = 1; } public override void SetDefaults() { - Item.damage = 28; + Item.damage = 35; Item.DamageType = DamageClass.Ranged; Item.width = 74; Item.height = 24; @@ -53,21 +52,20 @@ namespace CalamityMod.Items.Weapons.Ranged Main.projectile[index].noDropItem = true; } Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num117 = 0.314159274f; - int num118 = 2; + float PiOver10 = MathHelper.Pi * 0.1f; Vector2 vector7 = velocity; vector7.Normalize(); vector7 *= 10f; bool flag11 = Collision.CanHit(vector2, 0, 0, vector2 + vector7, 0, 0); - for (int num119 = 0; num119 < num118; num119++) + for (int num119 = 0; num119 < 2; num119++) { - float num120 = (float)num119 - ((float)num118 - 1f) / 2f; - Vector2 value9 = vector7.RotatedBy((double)(num117 * num120), default); + float num120 = (float)num119 - 1f / 2f; + Vector2 value9 = vector7.RotatedBy((double)(PiOver10 * num120), default); if (!flag11) { value9 -= vector7; } - int projectile = Projectile.NewProjectile(source, vector2.X + value9.X, vector2.Y + value9.Y, velocity.X, velocity.Y, ProjectileID.Leaf, damage / 2, 0f, player.whoAmI); + int projectile = Projectile.NewProjectile(source, vector2.X + value9.X, vector2.Y + value9.Y, velocity.X, velocity.Y, ProjectileID.Leaf, damage, 0f, player.whoAmI); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].DamageType = DamageClass.Ranged; } diff --git a/Items/Weapons/Ranged/BrimstoneFury.cs b/Items/Weapons/Ranged/BrimstoneFury.cs index 1eef18eec4..6eb82b0c60 100644 --- a/Items/Weapons/Ranged/BrimstoneFury.cs +++ b/Items/Weapons/Ranged/BrimstoneFury.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 20; + Item.damage = 25; Item.DamageType = DamageClass.Ranged; Item.width = 30; Item.height = 58; diff --git a/Items/Weapons/Ranged/ClamorRifle.cs b/Items/Weapons/Ranged/ClamorRifle.cs index 3b4ac288e2..dcf21014ea 100644 --- a/Items/Weapons/Ranged/ClamorRifle.cs +++ b/Items/Weapons/Ranged/ClamorRifle.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 32; + Item.damage = 36; Item.DamageType = DamageClass.Ranged; Item.width = 64; Item.height = 30; diff --git a/Items/Weapons/Ranged/CoralCannon.cs b/Items/Weapons/Ranged/CoralCannon.cs index f86b50ddc6..b2c13ca807 100644 --- a/Items/Weapons/Ranged/CoralCannon.cs +++ b/Items/Weapons/Ranged/CoralCannon.cs @@ -1,4 +1,4 @@ -using Terraria.DataStructures; +using Terraria.DataStructures; using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; using Terraria; @@ -12,13 +12,14 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { DisplayName.SetDefault("Coral Cannon"); - Tooltip.SetDefault("Has a chance to shoot a big coral that stuns enemies"); + Tooltip.SetDefault("Has a 20% chance to shoot a big coral that stuns enemies\n" + + "Does not consume ammo"); SacrificeTotal = 1; } public override void SetDefaults() { - Item.damage = 20; + Item.damage = 24; Item.DamageType = DamageClass.Ranged; Item.width = 52; Item.height = 40; @@ -45,13 +46,10 @@ namespace CalamityMod.Items.Weapons.Ranged { if (Main.rand.NextBool(5)) { - Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), (int)((double)damage * 2.0), knockback * 2f, player.whoAmI); + Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), (int)(damage * 1.5f), knockback * 1.5f, player.whoAmI); + return false; } - else - { - Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI); - } - return false; + return true; } } } diff --git a/Items/Weapons/Ranged/CosmicBolter.cs b/Items/Weapons/Ranged/CosmicBolter.cs index f7419e0d8b..c70f979674 100644 --- a/Items/Weapons/Ranged/CosmicBolter.cs +++ b/Items/Weapons/Ranged/CosmicBolter.cs @@ -13,14 +13,14 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { DisplayName.SetDefault("Cosmic Bolter"); - Tooltip.SetDefault("Fires three arrows at once\n" + + Tooltip.SetDefault("Fires a tight column of three arrows\n" + "Converts wooden arrows into sliding energy bolts"); SacrificeTotal = 1; } public override void SetDefaults() { - Item.damage = 39; + Item.damage = 48; Item.DamageType = DamageClass.Ranged; Item.width = 40; Item.height = 76; @@ -56,7 +56,7 @@ namespace CalamityMod.Items.Weapons.Ranged offset -= velocity; if (CalamityUtils.CheckWoodenAmmo(type, player)) - Projectile.NewProjectile(spawnSource, source + offset, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI); + Projectile.NewProjectile(spawnSource, source + offset, velocity, ModContent.ProjectileType(), (int)(damage * 1.2), knockback * 1.2f, player.whoAmI); else { int proj = Projectile.NewProjectile(spawnSource, source + offset, velocity, type, damage, knockback, player.whoAmI); diff --git a/Items/Weapons/Ranged/FirestormCannon.cs b/Items/Weapons/Ranged/FirestormCannon.cs index bc65c220e4..9ca9c0e480 100644 --- a/Items/Weapons/Ranged/FirestormCannon.cs +++ b/Items/Weapons/Ranged/FirestormCannon.cs @@ -19,12 +19,12 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 10; + Item.damage = 14; Item.DamageType = DamageClass.Ranged; Item.width = 56; Item.height = 28; - Item.useTime = 15; - Item.useAnimation = 15; + Item.useTime = 12; + Item.useAnimation = 12; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1.5f; @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Weapons.Ranged { float SpeedX = velocity.X + (float)Main.rand.Next(-50, 51) * 0.05f; float SpeedY = velocity.Y + (float)Main.rand.Next(-50, 51) * 0.05f; - int flare = Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, (int)((double)damage * 1.4), knockback, player.whoAmI); + int flare = Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI); if (flare.WithinBounds(Main.maxProjectiles)) { Main.projectile[flare].penetrate = 1; diff --git a/Items/Weapons/Ranged/FlakKraken.cs b/Items/Weapons/Ranged/FlakKraken.cs index a5ccc5f718..2938203931 100644 --- a/Items/Weapons/Ranged/FlakKraken.cs +++ b/Items/Weapons/Ranged/FlakKraken.cs @@ -27,7 +27,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 58; Item.useTime = 10; Item.useAnimation = 10; - Item.reuseDelay = 5; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.noUseGraphic = true; @@ -42,12 +41,6 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) - { - Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0f); - return false; - } - public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Ranged/Hellborn.cs b/Items/Weapons/Ranged/Hellborn.cs index 906fa7f51c..8e190b21d1 100644 --- a/Items/Weapons/Ranged/Hellborn.cs +++ b/Items/Weapons/Ranged/Hellborn.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Weapons.Ranged { public class Hellborn : ModItem { - public const float ExplosionDamageMultiplier = 5f; + public const float ExplosionDamageMultiplier = 3f; public override void SetStaticDefaults() { @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 7; + Item.damage = 20; Item.DamageType = DamageClass.Ranged; Item.width = 66; Item.height = 34; diff --git a/Items/Weapons/Ranged/MagnaStriker.cs b/Items/Weapons/Ranged/MagnaStriker.cs index 9569589415..655c05e861 100644 --- a/Items/Weapons/Ranged/MagnaStriker.cs +++ b/Items/Weapons/Ranged/MagnaStriker.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 35; + Item.damage = 50; Item.DamageType = DamageClass.Ranged; Item.width = 72; Item.height = 38; @@ -46,16 +46,12 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int randomProj = Main.rand.Next(2); - if (randomProj == 0) + if (Main.rand.NextBool()) { - Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), (int)(damage * 0.75), knockback, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI); + return false; } - else - { - Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0f); - } - return false; + return true; } public override void AddRecipes() diff --git a/Items/Weapons/Ranged/PearlGod.cs b/Items/Weapons/Ranged/PearlGod.cs index 4892411e3e..929d0d0fdf 100644 --- a/Items/Weapons/Ranged/PearlGod.cs +++ b/Items/Weapons/Ranged/PearlGod.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 32; + Item.damage = 40; Item.DamageType = DamageClass.Ranged; Item.width = 80; Item.height = 46; diff --git a/Items/Weapons/Ranged/Pumpler.cs b/Items/Weapons/Ranged/Pumpler.cs index 8a759a84c5..4ae4ba99be 100644 --- a/Items/Weapons/Ranged/Pumpler.cs +++ b/Items/Weapons/Ranged/Pumpler.cs @@ -20,11 +20,11 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 18; + Item.damage = 24; Item.DamageType = DamageClass.Ranged; Item.width = 72; Item.height = 34; - Item.useTime = 60; + Item.useTime = 30; Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; diff --git a/Items/Weapons/Ranged/ReedBlowgun.cs b/Items/Weapons/Ranged/ReedBlowgun.cs index c746a9dde1..f998eb2040 100644 --- a/Items/Weapons/Ranged/ReedBlowgun.cs +++ b/Items/Weapons/Ranged/ReedBlowgun.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 14; + Item.damage = 21; Item.DamageType = DamageClass.Ranged; Item.width = 22; Item.height = 46; diff --git a/Items/Weapons/Ranged/Shellshooter.cs b/Items/Weapons/Ranged/Shellshooter.cs index 626f92d13a..d2af730069 100644 --- a/Items/Weapons/Ranged/Shellshooter.cs +++ b/Items/Weapons/Ranged/Shellshooter.cs @@ -12,7 +12,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { DisplayName.SetDefault("Shellshooter"); - Tooltip.SetDefault("Converts wooden arrows into slow, powerful shells"); + Tooltip.SetDefault("Fires slow but powerful arrows\n" + + "Converts wooden arrows into heavy piercing seashells"); SacrificeTotal = 1; } @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.UseSound = SoundID.Item5; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 1.5f; + Item.shootSpeed = 2.5f; Item.useAmmo = AmmoID.Arrow; Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/TheBallista.cs b/Items/Weapons/Ranged/TheBallista.cs index 0a907184e5..b2ad1db295 100644 --- a/Items/Weapons/Ranged/TheBallista.cs +++ b/Items/Weapons/Ranged/TheBallista.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 99; + Item.damage = 120; Item.DamageType = DamageClass.Ranged; Item.width = 40; Item.height = 70; diff --git a/Items/Weapons/Ranged/WulfrumBlunderbuss.cs b/Items/Weapons/Ranged/WulfrumBlunderbuss.cs index 33b0df3b41..38eaf88a45 100644 --- a/Items/Weapons/Ranged/WulfrumBlunderbuss.cs +++ b/Items/Weapons/Ranged/WulfrumBlunderbuss.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 8; + Item.damage = 11; Item.ArmorPenetration = 3; Item.DamageType = DamageClass.Ranged; Item.width = 23; diff --git a/Items/Weapons/Rogue/AdamantiteThrowingAxe.cs b/Items/Weapons/Rogue/AdamantiteThrowingAxe.cs index 4c42013ebe..4f9805deb3 100644 --- a/Items/Weapons/Rogue/AdamantiteThrowingAxe.cs +++ b/Items/Weapons/Rogue/AdamantiteThrowingAxe.cs @@ -18,13 +18,12 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 30; - Item.damage = 44; + Item.damage = 64; Item.noMelee = true; Item.consumable = true; Item.noUseGraphic = true; - Item.useAnimation = 12; + Item.useAnimation = Item.useTime = 12; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 12; Item.knockBack = 3.25f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Rogue/AuroradicalThrow.cs b/Items/Weapons/Rogue/AuroradicalThrow.cs index 7a087a3c8d..069b00ce9d 100644 --- a/Items/Weapons/Rogue/AuroradicalThrow.cs +++ b/Items/Weapons/Rogue/AuroradicalThrow.cs @@ -24,12 +24,11 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 34; Item.height = 58; - Item.damage = 32; + Item.damage = 48; Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 30; + Item.useAnimation = Item.useTime = 30; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 30; Item.knockBack = 6f; Item.UseSound = SoundID.Item117; Item.autoReuse = true; @@ -40,8 +39,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - public override float StealthDamageMultiplier => 1.2f; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { int star = Projectile.NewProjectile(source, player.Center, velocity, type, damage, knockback, player.whoAmI); diff --git a/Items/Weapons/Rogue/BallisticPoisonBomb.cs b/Items/Weapons/Rogue/BallisticPoisonBomb.cs index 4b4629dbce..e8a1140781 100644 --- a/Items/Weapons/Rogue/BallisticPoisonBomb.cs +++ b/Items/Weapons/Rogue/BallisticPoisonBomb.cs @@ -1,4 +1,4 @@ -using Terraria.DataStructures; +using Terraria.DataStructures; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.Rogue; @@ -23,16 +23,15 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 30; - Item.damage = 50; + Item.height = 38; + Item.damage = 72; Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 26; + Item.useAnimation = Item.useTime = 26; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 26; Item.knockBack = 6.5f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.height = 38; Item.value = CalamityGlobalItem.Rarity7BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); @@ -40,8 +39,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - public override float StealthDamageMultiplier => 0.5f; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike diff --git a/Items/Weapons/Rogue/CobaltKunai.cs b/Items/Weapons/Rogue/CobaltKunai.cs index de79f17eb3..eb4dc100b0 100644 --- a/Items/Weapons/Rogue/CobaltKunai.cs +++ b/Items/Weapons/Rogue/CobaltKunai.cs @@ -22,9 +22,8 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noMelee = true; Item.consumable = true; Item.noUseGraphic = true; - Item.useAnimation = 12; + Item.useAnimation = Item.useTime = 10; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 12; Item.knockBack = 2.5f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Rogue/ConsecratedWater.cs b/Items/Weapons/Rogue/ConsecratedWater.cs index c116bdd535..e73b462286 100644 --- a/Items/Weapons/Rogue/ConsecratedWater.cs +++ b/Items/Weapons/Rogue/ConsecratedWater.cs @@ -26,8 +26,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.damage = BaseDamage; Item.width = 22; Item.height = 24; - Item.useAnimation = 29; - Item.useTime = 29; + Item.useAnimation = Item.useTime = 29; Item.noMelee = true; Item.noUseGraphic = true; Item.useStyle = ItemUseStyleID.Swing; diff --git a/Items/Weapons/Rogue/CrystalPiercer.cs b/Items/Weapons/Rogue/CrystalPiercer.cs index 9279d91a0a..cb8917d784 100644 --- a/Items/Weapons/Rogue/CrystalPiercer.cs +++ b/Items/Weapons/Rogue/CrystalPiercer.cs @@ -21,13 +21,12 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 62; - Item.damage = 52; + Item.damage = 92; Item.noMelee = true; Item.consumable = true; Item.noUseGraphic = true; - Item.useAnimation = 17; + Item.useAnimation = Item.useTime = 22; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 17; Item.knockBack = 6f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Rogue/CursedDagger.cs b/Items/Weapons/Rogue/CursedDagger.cs index b70e5fd881..f92ded5841 100644 --- a/Items/Weapons/Rogue/CursedDagger.cs +++ b/Items/Weapons/Rogue/CursedDagger.cs @@ -23,9 +23,8 @@ namespace CalamityMod.Items.Weapons.Rogue Item.damage = 34; Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 16; + Item.useAnimation = Item.useTime = 8; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 16; Item.knockBack = 4.5f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Rogue/Equanimity.cs b/Items/Weapons/Rogue/Equanimity.cs index 46ee1418e8..696e106cba 100644 --- a/Items/Weapons/Rogue/Equanimity.cs +++ b/Items/Weapons/Rogue/Equanimity.cs @@ -24,9 +24,8 @@ namespace CalamityMod.Items.Weapons.Rogue Item.damage = 40; Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 15; + Item.useAnimation = Item.useTime = 36; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 20; Item.knockBack = 1f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Rogue/ExecutionersBlade.cs b/Items/Weapons/Rogue/ExecutionersBlade.cs index d0d25c257a..59d36c8ca1 100644 --- a/Items/Weapons/Rogue/ExecutionersBlade.cs +++ b/Items/Weapons/Rogue/ExecutionersBlade.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 64; - Item.damage = 82; + Item.damage = 188; Item.noMelee = true; Item.noUseGraphic = true; Item.useTime = 3; @@ -48,8 +48,6 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Rogue/ExecutionersBladeGlow").Value); } - - public override float StealthDamageMultiplier => 3.61f; public override bool AdditionalStealthCheck() => counter == 0; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Rogue/Exorcism.cs b/Items/Weapons/Rogue/Exorcism.cs index 1c1ae9b872..84deb9d06a 100644 --- a/Items/Weapons/Rogue/Exorcism.cs +++ b/Items/Weapons/Rogue/Exorcism.cs @@ -24,9 +24,8 @@ namespace CalamityMod.Items.Weapons.Rogue Item.damage = 55; Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 20; + Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 20; Item.knockBack = 1f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; @@ -39,8 +38,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - public override float StealthDamageMultiplier => 1.15f; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) diff --git a/Items/Weapons/Rogue/FeatherKnife.cs b/Items/Weapons/Rogue/FeatherKnife.cs index 6f7fc3fef1..ba1deba921 100644 --- a/Items/Weapons/Rogue/FeatherKnife.cs +++ b/Items/Weapons/Rogue/FeatherKnife.cs @@ -51,10 +51,8 @@ Stealth strike throws a volley of knives"); 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; - Main.projectile[proj].noDropItem = true; - } + spread -= Main.rand.Next(2, 6); } return false; diff --git a/Items/Weapons/Rogue/FrostyFlare.cs b/Items/Weapons/Rogue/FrostyFlare.cs index fda751a6f8..cfc277f10b 100644 --- a/Items/Weapons/Rogue/FrostyFlare.cs +++ b/Items/Weapons/Rogue/FrostyFlare.cs @@ -21,13 +21,12 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { + Item.width = 10; + Item.height = 22; Item.damage = 32; Item.noUseGraphic = true; Item.noMelee = true; - Item.width = 10; - Item.height = 22; - Item.useTime = 16; - Item.useAnimation = 16; + Item.useAnimation = Item.useTime = 13; Item.useStyle = ItemUseStyleID.Swing; Item.useTurn = false; Item.UseSound = SoundID.Item1; @@ -42,8 +41,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - public override float StealthDamageMultiplier => 0.9f; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) diff --git a/Items/Weapons/Rogue/HardenedHoneycomb.cs b/Items/Weapons/Rogue/HardenedHoneycomb.cs index 23b7207b7a..f10359dd3c 100644 --- a/Items/Weapons/Rogue/HardenedHoneycomb.cs +++ b/Items/Weapons/Rogue/HardenedHoneycomb.cs @@ -21,12 +21,11 @@ Stealth strikes can bounce off walls and enemies"); public override void SetDefaults() { Item.width = 30; - Item.damage = 25; + Item.damage = 20; Item.noMelee = true; Item.consumable = true; Item.noUseGraphic = true; - Item.useAnimation = 21; - Item.useTime = 21; + Item.useAnimation = Item.useTime = 16; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 3f; Item.UseSound = SoundID.Item1; diff --git a/Items/Weapons/Rogue/HeavenfallenStardisk.cs b/Items/Weapons/Rogue/HeavenfallenStardisk.cs index de7d58caaa..d52fd67705 100644 --- a/Items/Weapons/Rogue/HeavenfallenStardisk.cs +++ b/Items/Weapons/Rogue/HeavenfallenStardisk.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetStaticDefaults() { DisplayName.SetDefault("Heavenfallen Stardisk"); - Tooltip.SetDefault("Throws a stardisk upwards which then launches itself towards your mouse cursor,\n" + - "explodes into several astral energy bolts if the thrower is moving vertically when throwing it and during its impact\n" + + Tooltip.SetDefault("Throws a stardisk upwards which then launches itself towards your mouse cursor\n" + + "Explodes into 5 astral energy bolts if the thrower is moving vertically when throwing it\n" + "Stealth strikes rain astral energy bolts from the sky"); SacrificeTotal = 1; } @@ -22,12 +22,11 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 44; Item.height = 48; - Item.damage = 115; + Item.damage = 90; Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 25; + Item.useAnimation = Item.useTime = 40; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 25; Item.knockBack = 8f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; @@ -41,20 +40,12 @@ namespace CalamityMod.Items.Weapons.Rogue // Terraria seems to really dislike high crit values in SetDefaults public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20; - public override float StealthDamageMultiplier => 1.25f; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - if (player.Calamity().StealthStrikeAvailable()) - { - int proj = Projectile.NewProjectile(source, position.X, position.Y, 0f, -10f, type, damage, knockback, player.whoAmI); - if (proj.WithinBounds(Main.maxProjectiles)) - Main.projectile[proj].Calamity().stealthStrike = true; - } - else - { - Projectile.NewProjectile(source, position.X, position.Y, 0f, -10f, type, damage, knockback, player.whoAmI); - } + int proj = Projectile.NewProjectile(source, position, velocity.Length() * -Vector2.UnitY, type, damage, knockback, player.whoAmI); + if (proj.WithinBounds(Main.maxProjectiles)) + Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); + return false; } } diff --git a/Items/Weapons/Rogue/IceStar.cs b/Items/Weapons/Rogue/IceStar.cs index 560f30e084..f81b3572a8 100644 --- a/Items/Weapons/Rogue/IceStar.cs +++ b/Items/Weapons/Rogue/IceStar.cs @@ -12,9 +12,8 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetStaticDefaults() { DisplayName.SetDefault("Ice Star"); - Tooltip.SetDefault("Throws homing ice stars\n" + - "Stealth strikes pierce infinitely and spawn ice shards on hit\n" + - "Ice Stars are too brittle to be recovered after being thrown"); + Tooltip.SetDefault("Throws fast but brittle homing ice stars\n" + + "Stealth strikes last longer and spawn smaller homing stars on first hits"); SacrificeTotal = 99; } diff --git a/Items/Weapons/Rogue/IchorSpear.cs b/Items/Weapons/Rogue/IchorSpear.cs index ffab54b31a..46531dafe1 100644 --- a/Items/Weapons/Rogue/IchorSpear.cs +++ b/Items/Weapons/Rogue/IchorSpear.cs @@ -1,4 +1,4 @@ -using Terraria.DataStructures; +using Terraria.DataStructures; using CalamityMod.Projectiles.Rogue; using Microsoft.Xna.Framework; using Terraria; @@ -20,12 +20,11 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 52; - Item.damage = 76; + Item.damage = 84; Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 20; + Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 20; Item.knockBack = 6f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; @@ -37,8 +36,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - public override float StealthDamageMultiplier => 1.6f; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike diff --git a/Items/Weapons/Rogue/KelvinCatalyst.cs b/Items/Weapons/Rogue/KelvinCatalyst.cs index 53ac94255a..56044a4d8d 100644 --- a/Items/Weapons/Rogue/KelvinCatalyst.cs +++ b/Items/Weapons/Rogue/KelvinCatalyst.cs @@ -24,16 +24,15 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 20; + Item.height = 20; Item.damage = 60; Item.noMelee = true; Item.noUseGraphic = true; Item.autoReuse = true; - Item.useAnimation = 30; + Item.useAnimation = Item.useTime = 30; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 30; Item.knockBack = 4f; Item.UseSound = SoundID.Item1; - Item.height = 20; Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; Item.Calamity().donorItem = true; @@ -44,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int proj = Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI); + int proj = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); return false; diff --git a/Items/Weapons/Rogue/LeviathanTeeth.cs b/Items/Weapons/Rogue/LeviathanTeeth.cs index fcb15920d6..5b17ec1cb1 100644 --- a/Items/Weapons/Rogue/LeviathanTeeth.cs +++ b/Items/Weapons/Rogue/LeviathanTeeth.cs @@ -13,23 +13,22 @@ namespace CalamityMod.Items.Weapons.Rogue { DisplayName.SetDefault("Leviathan Teeth"); Tooltip.SetDefault("Rapidly throws a variety of poisonous fangs that stick to enemies\n" + - "Stealth strikes cause 3 very fast teeth to be thrown, ignoring gravity and inflicting extreme knockback"); + "Stealth strikes cause 6 very fast teeth to be thrown, ignoring gravity and inflicting extreme knockback"); SacrificeTotal = 1; } public override void SetDefaults() { Item.width = 36; - Item.damage = 50; + Item.height = 38; + Item.damage = 66; Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 10; + Item.useAnimation = Item.useTime = 15; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 10; Item.knockBack = 1f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.height = 38; Item.maxStack = 1; Item.value = CalamityGlobalItem.Rarity7BuyPrice; Item.rare = ItemRarityID.Lime; @@ -38,20 +37,18 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - public override float StealthDamageMultiplier => 1.3f; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { bool stealthStrike = false; int teethCount; if (player.Calamity().StealthStrikeAvailable()) { - teethCount = 3; + teethCount = 6; stealthStrike = true; } else { - teethCount = Main.rand.Next(1, 4); + teethCount = Main.rand.Next(1, 3); } float spreadAngle = MathHelper.ToRadians(10); diff --git a/Items/Weapons/Rogue/MythrilKnife.cs b/Items/Weapons/Rogue/MythrilKnife.cs index 9d8569e6a1..ab264cb971 100644 --- a/Items/Weapons/Rogue/MythrilKnife.cs +++ b/Items/Weapons/Rogue/MythrilKnife.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 12; - Item.damage = 40; + Item.damage = 80; Item.noMelee = true; Item.consumable = true; Item.noUseGraphic = true; diff --git a/Items/Weapons/Rogue/NastyCholla.cs b/Items/Weapons/Rogue/NastyCholla.cs index 600cb33e8a..353e2e48e6 100644 --- a/Items/Weapons/Rogue/NastyCholla.cs +++ b/Items/Weapons/Rogue/NastyCholla.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Rogue Tooltip.SetDefault(@"Throws a spiky ball that sticks to everything Explodes into cactus spikes after roughly 3 seconds Can hurt town NPCs -Stealth strikes throw five at once"); +Stealth strikes throw four at once"); SacrificeTotal = 99; } @@ -42,19 +42,20 @@ Stealth strikes throw five at once"); Item.DamageType = RogueDamageClass.Instance; } - public override float StealthDamageMultiplier => 1.4f; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike { int spread = 3; - for (int i = 0; i < 5; 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.X, position.Y, perturbedspeed.X, perturbedspeed.Y, type, damage, knockback, player.whoAmI); if (proj.WithinBounds(Main.maxProjectiles)) + { + Main.projectile[proj].originalDamage = damage; Main.projectile[proj].Calamity().stealthStrike = true; + } spread -= Main.rand.Next(1,4); } return false; diff --git a/Items/Weapons/Rogue/OrichalcumSpikedGemstone.cs b/Items/Weapons/Rogue/OrichalcumSpikedGemstone.cs index 33799245f7..80bdc1f0ce 100644 --- a/Items/Weapons/Rogue/OrichalcumSpikedGemstone.cs +++ b/Items/Weapons/Rogue/OrichalcumSpikedGemstone.cs @@ -18,18 +18,16 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 14; - Item.damage = 37; + Item.height = 34; + Item.damage = 40; Item.noMelee = true; Item.consumable = true; Item.noUseGraphic = true; - Item.useAnimation = 13; + Item.useAnimation = Item.useTime = 13; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 13; Item.knockBack = 2f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.height = 34; - Item.shoot = ProjectileID.StarAnise; Item.maxStack = 999; Item.value = 1200; Item.rare = ItemRarityID.LightRed; @@ -46,9 +44,7 @@ namespace CalamityMod.Items.Weapons.Rogue if (gemstone.WithinBounds(Main.maxProjectiles)) { Main.projectile[gemstone].Calamity().stealthStrike = true; - Main.projectile[gemstone].usesLocalNPCImmunity = true; - Main.projectile[gemstone].timeLeft = 900; - Main.projectile[gemstone].penetrate = 4; + Main.projectile[gemstone].timeLeft = 600; } return false; } diff --git a/Items/Weapons/Rogue/PalladiumJavelin.cs b/Items/Weapons/Rogue/PalladiumJavelin.cs index 366c7b20a9..55db18e5d2 100644 --- a/Items/Weapons/Rogue/PalladiumJavelin.cs +++ b/Items/Weapons/Rogue/PalladiumJavelin.cs @@ -11,25 +11,23 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetStaticDefaults() { DisplayName.SetDefault("Palladium Javelin"); - Tooltip.SetDefault("Stealth strikes split into more javelins"); + Tooltip.SetDefault("Stealth strikes split into more javelins and boost life regeneration on hits"); SacrificeTotal = 99; } public override void SetDefaults() { Item.width = 54; - Item.damage = 68; + Item.damage = 88; Item.noMelee = true; Item.consumable = true; Item.noUseGraphic = true; - Item.useAnimation = 19; + Item.useAnimation = Item.useTime = 26; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 19; Item.knockBack = 5.5f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 54; - Item.shoot = ProjectileID.StarAnise; Item.maxStack = 999; Item.value = 1200; Item.rare = ItemRarityID.LightRed; @@ -38,17 +36,12 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - public override float StealthDamageMultiplier => 1.425f; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { int javelin = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); if (javelin.WithinBounds(Main.maxProjectiles)) - { Main.projectile[javelin].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); - if (!player.Calamity().StealthStrikeAvailable()) - Main.projectile[javelin].usesLocalNPCImmunity = false; - } + return false; } diff --git a/Items/Weapons/Rogue/Prismalline.cs b/Items/Weapons/Rogue/Prismalline.cs index 15707713e2..ccf6acf8a0 100644 --- a/Items/Weapons/Rogue/Prismalline.cs +++ b/Items/Weapons/Rogue/Prismalline.cs @@ -22,12 +22,11 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 46; - Item.damage = 24; + Item.damage = 36; Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 16; + Item.useAnimation = Item.useTime = 24; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 16; Item.knockBack = 5f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; @@ -42,8 +41,6 @@ namespace CalamityMod.Items.Weapons.Rogue // Terraria seems to really dislike high crit values in SetDefaults public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 4; - public override float StealthDamageMultiplier => 1.15f; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) diff --git a/Items/Weapons/Rogue/RadiantStar.cs b/Items/Weapons/Rogue/RadiantStar.cs index f4282fe01d..3bcd63f5cb 100644 --- a/Items/Weapons/Rogue/RadiantStar.cs +++ b/Items/Weapons/Rogue/RadiantStar.cs @@ -22,16 +22,15 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 52; + Item.height = 48; Item.damage = 55; //33 Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 12; + Item.useAnimation = Item.useTime = 12; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 12; Item.knockBack = 5f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.height = 48; Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Rogue/ShinobiBlade.cs b/Items/Weapons/Rogue/ShinobiBlade.cs index 0abf32a92b..31b0ca866e 100644 --- a/Items/Weapons/Rogue/ShinobiBlade.cs +++ b/Items/Weapons/Rogue/ShinobiBlade.cs @@ -1,4 +1,4 @@ -using Terraria.DataStructures; +using Terraria.DataStructures; using CalamityMod.Projectiles.Rogue; using Microsoft.Xna.Framework; using Terraria; @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue { DisplayName.SetDefault("Shinobi Blade"); Tooltip.SetDefault("Throws a fast blade that spawns healing orbs when it kills an enemy\n" + - "Stealth strikes cause 3 blades to be thrown at once"); + "Stealth strikes repeatedly stab the struck enemy from random directions"); SacrificeTotal = 1; } @@ -21,12 +21,11 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 16; Item.height = 42; - Item.damage = 15; + Item.damage = 24; Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 15; + Item.useAnimation = Item.useTime = 10; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 15; Item.knockBack = 1f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; @@ -34,29 +33,17 @@ namespace CalamityMod.Items.Weapons.Rogue Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 20f; + Item.shootSpeed = 10f; Item.DamageType = RogueDamageClass.Instance; } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - if (player.Calamity().StealthStrikeAvailable()) - { - float spreadAngle = MathHelper.ToRadians(7.5f); - Vector2 direction = velocity; - Vector2 baseDirection = direction.RotatedBy(-spreadAngle); + int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); + if (p.WithinBounds(Main.maxProjectiles)) + Main.projectile[p].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); - for (int i = 0; i < 3; i++) - { - Vector2 currentDirection = baseDirection.RotatedBy(spreadAngle * i); - - int p = Projectile.NewProjectile(source, position, currentDirection, type, damage, knockback, player.whoAmI); - if (p.WithinBounds(Main.maxProjectiles)) - Main.projectile[p].Calamity().stealthStrike = true; - } - return false; - } - return true; + return false; } } } diff --git a/Items/Weapons/Rogue/ShockGrenade.cs b/Items/Weapons/Rogue/ShockGrenade.cs index 04ddbd039a..b461e69558 100644 --- a/Items/Weapons/Rogue/ShockGrenade.cs +++ b/Items/Weapons/Rogue/ShockGrenade.cs @@ -21,13 +21,12 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 14; - Item.damage = 90; + Item.damage = 108; Item.noMelee = true; Item.noUseGraphic = true; Item.consumable = true; - Item.useAnimation = 18; + Item.useAnimation = Item.useTime = 18; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 18; Item.knockBack = 1f; Item.autoReuse = true; Item.height = 30; @@ -43,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Rogue { if (player.Calamity().StealthStrikeAvailable()) { - int p = Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI); + int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); if (p.WithinBounds(Main.maxProjectiles)) Main.projectile[p].Calamity().stealthStrike = true; return false; diff --git a/Items/Weapons/Rogue/SludgeSplotch.cs b/Items/Weapons/Rogue/SludgeSplotch.cs index 4bdfe66565..0f69ae14b5 100644 --- a/Items/Weapons/Rogue/SludgeSplotch.cs +++ b/Items/Weapons/Rogue/SludgeSplotch.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 32; - Item.damage = 30; + Item.damage = 48; Item.noMelee = true; Item.noUseGraphic = true; Item.consumable = true; diff --git a/Items/Weapons/Rogue/TerraDisk.cs b/Items/Weapons/Rogue/TerraDisk.cs index 83bea7206e..e933509f83 100644 --- a/Items/Weapons/Rogue/TerraDisk.cs +++ b/Items/Weapons/Rogue/TerraDisk.cs @@ -1,4 +1,4 @@ -using Terraria.DataStructures; +using Terraria.DataStructures; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; using Microsoft.Xna.Framework; @@ -17,7 +17,6 @@ namespace CalamityMod.Items.Weapons.Rogue { DisplayName.SetDefault("Terra Disk"); Tooltip.SetDefault(@"Throws a disk that has a chance to generate several disks if enemies are near it -A max of three disks can be active at a time Stealth strikes travel slower and are rapidly orbited by the smaller disks"); SacrificeTotal = 1; } @@ -28,8 +27,7 @@ Stealth strikes travel slower and are rapidly orbited by the smaller disks"); Item.height = 46; Item.damage = BaseDamage; Item.knockBack = 4f; - Item.useAnimation = 16; - Item.useTime = 16; + Item.useAnimation = Item.useTime = 30; Item.autoReuse = true; Item.noMelee = true; Item.noUseGraphic = true; @@ -44,27 +42,7 @@ Stealth strikes travel slower and are rapidly orbited by the smaller disks"); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = Speed; } - - public override bool CanUseItem(Player player) - { - //Stealth strikes ignore the proj cap - int terraDiskCount = 0; - for (int p = 0; p < Main.maxProjectiles; p++) - { - Projectile proj = Main.projectile[p]; - if (!proj.active || proj.owner != player.whoAmI) - continue; - if (proj.type == Item.shoot && !proj.Calamity().stealthStrike) - { - terraDiskCount++; - } - if (terraDiskCount >= 3) - break; - } - return terraDiskCount < 3; - } - - public override float StealthDamageMultiplier => 0.9f; + public override float StealthVelocityMultiplier => 0.75f; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Rogue/TerrorTalons.cs b/Items/Weapons/Rogue/TerrorTalons.cs index aa3b52de1f..bb2c260385 100644 --- a/Items/Weapons/Rogue/TerrorTalons.cs +++ b/Items/Weapons/Rogue/TerrorTalons.cs @@ -22,12 +22,11 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 40; - Item.damage = 47; + Item.damage = 52; Item.noMelee = true; Item.noUseGraphic = true; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 7; - Item.useAnimation = 7; + Item.useAnimation = Item.useTime = 7; Item.knockBack = 3f; Item.UseSound = SoundID.Item39; Item.autoReuse = true; @@ -39,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; } - public override float StealthDamageMultiplier => 4.875f; + public override float StealthDamageMultiplier => 9f; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { @@ -61,7 +60,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(ItemID.FeralClaws). + AddIngredient(ItemID.ChlorophyteBar, 5). AddIngredient(ItemID.Leather, 10). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Rogue/ThrowingBrick.cs b/Items/Weapons/Rogue/ThrowingBrick.cs index c6317fdf60..65e28f2f96 100644 --- a/Items/Weapons/Rogue/ThrowingBrick.cs +++ b/Items/Weapons/Rogue/ThrowingBrick.cs @@ -39,8 +39,6 @@ namespace CalamityMod.Items.Weapons.Rogue // Terraria seems to really dislike high crit values in SetDefaults public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20; - public override float StealthDamageMultiplier => 1.2f; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { //Check if stealth is full diff --git a/Items/Weapons/Rogue/TitaniumShuriken.cs b/Items/Weapons/Rogue/TitaniumShuriken.cs index 1e919fab24..bbc402ef44 100644 --- a/Items/Weapons/Rogue/TitaniumShuriken.cs +++ b/Items/Weapons/Rogue/TitaniumShuriken.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 34; - Item.damage = 37; + Item.damage = 56; Item.noMelee = true; Item.consumable = true; Item.noUseGraphic = true; diff --git a/Items/Weapons/Rogue/WaveSkipper.cs b/Items/Weapons/Rogue/WaveSkipper.cs index 30280e76ce..083c6973c5 100644 --- a/Items/Weapons/Rogue/WaveSkipper.cs +++ b/Items/Weapons/Rogue/WaveSkipper.cs @@ -24,12 +24,11 @@ Stealth strikes throw three high speed spears"); public override void SetDefaults() { Item.width = 44; - Item.damage = 50; + Item.damage = 80; Item.noMelee = true; Item.noUseGraphic = true; - Item.useAnimation = 22; + Item.useAnimation = Item.useTime = 22; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 22; Item.knockBack = 4f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; @@ -41,8 +40,6 @@ Stealth strikes throw three high speed spears"); Item.DamageType = RogueDamageClass.Instance; } - public override float StealthDamageMultiplier => 0.3333f; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) diff --git a/NPCs/AstrumAureus/AureusSpawn.cs b/NPCs/AstrumAureus/AureusSpawn.cs index b6c42d7994..4f1e36d5b5 100644 --- a/NPCs/AstrumAureus/AureusSpawn.cs +++ b/NPCs/AstrumAureus/AureusSpawn.cs @@ -325,6 +325,10 @@ namespace CalamityMod.NPCs.AstrumAureus } } + // Return if Astrum Aureus isn't active + if (CalamityGlobalNPC.astrumAureus < 0 || !Main.npc[CalamityGlobalNPC.astrumAureus].active) + return; + // Damage Aureus for a percentage of its HP if the spawn explodes on or near it if (Main.netMode != NetmodeID.MultiplayerClient && (Main.npc[CalamityGlobalNPC.astrumAureus].Center - NPC.Center).Length() < (200f + 30f * (NPC.scale - 1f)) && !Main.dayTime) Projectile.NewProjectileDirect(NPC.GetSource_FromAI(), Main.npc[CalamityGlobalNPC.astrumAureus].Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Main.npc[CalamityGlobalNPC.astrumAureus].lifeMax / 200 * NPC.scale), 0f, Main.myPlayer, Main.npc[CalamityGlobalNPC.astrumAureus].whoAmI); diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index de9aa95311..c00405f93e 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -343,6 +343,7 @@ namespace CalamityMod.NPCs.AstrumDeus lastWorm.Add(DropHelper.NormalVsExpertQuantity(ItemID.FragmentVortex, 1, 16, 24, 20, 32)); lastWorm.Add(DropHelper.NormalVsExpertQuantity(ItemID.FragmentNebula, 1, 16, 24, 20, 32)); lastWorm.Add(DropHelper.NormalVsExpertQuantity(ItemID.FragmentStardust, 1, 16, 24, 20, 32)); + lastWorm.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 1, 16, 24, 20, 32)); // Lore bool firstDeusKill(DropAttemptInfo info) => !DownedBossSystem.downedAstrumDeus && !ShouldNotDropThings(info.npc); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 975fe35f00..2634f6a01a 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -111,14 +111,22 @@ namespace CalamityMod.NPCs public const double VulnerableToDoTDamageMult = 2D; public const double VulnerableToDoTDamageMult_Worms_SlimeGod = 1.5; - // Eskimo Set effect + // Eskimo Set and Cryo Stone effects public bool IncreasedColdEffects_EskimoSet = false; + public bool IncreasedColdEffects_CryoStone = false; + + // Transformer effect + + public bool IncreasedElectricityEffects_Transformer = false; // Fireball, Cinnamon Roll and Hellfire Treads effects public bool IncreasedHeatEffects_Fireball = false; public bool IncreasedHeatEffects_CinnamonRoll = false; public bool IncreasedHeatEffects_HellfireTreads = false; + // Toxic Heart effect + public bool IncreasedSicknessEffects_ToxicHeart = false; + // Evergreen Gin effect public bool IncreasedSicknessAndWaterEffects_EvergreenGin = false; @@ -361,9 +369,12 @@ namespace CalamityMod.NPCs myClone.VulnerableToWater = VulnerableToWater; myClone.IncreasedColdEffects_EskimoSet = IncreasedColdEffects_EskimoSet; + myClone.IncreasedColdEffects_CryoStone = IncreasedColdEffects_CryoStone; + myClone.IncreasedElectricityEffects_Transformer = IncreasedElectricityEffects_Transformer; myClone.IncreasedHeatEffects_Fireball = IncreasedHeatEffects_Fireball; myClone.IncreasedHeatEffects_CinnamonRoll = IncreasedHeatEffects_CinnamonRoll; myClone.IncreasedHeatEffects_HellfireTreads = IncreasedHeatEffects_HellfireTreads; + myClone.IncreasedSicknessEffects_ToxicHeart = IncreasedSicknessEffects_ToxicHeart; myClone.IncreasedSicknessAndWaterEffects_EvergreenGin = IncreasedSicknessAndWaterEffects_EvergreenGin; myClone.velocityPriorToPhaseSwap = velocityPriorToPhaseSwap; @@ -800,15 +811,23 @@ namespace CalamityMod.NPCs waterDamageMult *= 0.5; } + if (IncreasedColdEffects_EskimoSet) + coldDamageMult += 0.25; + if (IncreasedColdEffects_CryoStone) + coldDamageMult += 0.5; + + if (IncreasedElectricityEffects_Transformer) + electricityDamageMult += 0.5; + if (IncreasedHeatEffects_Fireball) heatDamageMult += 0.25; if (IncreasedHeatEffects_CinnamonRoll) heatDamageMult += 0.5; if (IncreasedHeatEffects_HellfireTreads) heatDamageMult += 0.5; - - if (IncreasedColdEffects_EskimoSet) - coldDamageMult += 0.25; + + if (IncreasedSicknessEffects_ToxicHeart) + sicknessDamageMult += 0.5; if (IncreasedSicknessAndWaterEffects_EvergreenGin) { @@ -2897,7 +2916,7 @@ namespace CalamityMod.NPCs { // Emit light float lifeRatio = Main.npc[(int)npc.ai[3]].life / (float)Main.npc[(int)npc.ai[3]].lifeMax; - float colorTransitionAmt = (float)Math.Pow((double)(1f - lifeRatio), 4D); + float colorTransitionAmt = (float)Math.Pow((double)(1f - lifeRatio), 2D); Color lightColor = Color.Lerp(Color.Cyan, Color.Blue, colorTransitionAmt); Lighting.AddLight(npc.Center, lightColor.R / 255f, lightColor.G / 255f, lightColor.B / 255f); } @@ -2906,7 +2925,7 @@ namespace CalamityMod.NPCs { // Emit light float lifeRatio = npc.life / (float)npc.lifeMax; - float colorTransitionAmt = (float)Math.Pow((double)(1f - lifeRatio), 4D); + float colorTransitionAmt = (float)Math.Pow((double)(1f - lifeRatio), 2D); Color lightColor = Color.Lerp(Color.Cyan, Color.Blue, colorTransitionAmt); Lighting.AddLight(npc.Center, lightColor.R / 255f, lightColor.G / 255f, lightColor.B / 255f); @@ -5883,7 +5902,7 @@ namespace CalamityMod.NPCs else GameShaders.Misc["CalamityMod:SupremeShield"].UseImage1("Images/Misc/noise"); - float colorTransitionAmt = (float)Math.Pow((double)(1f - lifeRatio), 4D); + float colorTransitionAmt = (float)Math.Pow((double)(1f - lifeRatio), 2D); Color forcefieldColor = Color.Lerp(Color.MediumSpringGreen, Color.Black, colorTransitionAmt); Color secondaryForcefieldColor = Color.Lerp(Color.Cyan, Color.Blue, colorTransitionAmt); @@ -5897,7 +5916,7 @@ namespace CalamityMod.NPCs GameShaders.Misc["CalamityMod:SupremeShield"].Apply(); // Actual Cultist has a bigger shield than the Clones. - float shieldScale = npc.type == NPCID.CultistBossClone ? 1.65f : MathHelper.Lerp(1.65f, 3f, lifeRatio); + float shieldScale = npc.type == NPCID.CultistBossClone ? 1.65f : MathHelper.Lerp(1.65f, 3f, (float)Math.Pow((double)lifeRatio, 2D)); spriteBatch.Draw(forcefieldTexture, npc.Center - Main.screenPosition, null, Color.White * opacity, 0f, forcefieldTexture.Size() * 0.5f, shieldScale, SpriteEffects.None, 0f); spriteBatch.ExitShaderRegion(); diff --git a/NPCs/NormalNPCs/SeaUrchin.cs b/NPCs/NormalNPCs/SeaUrchin.cs index f2a5f4dc96..6baa1b7601 100644 --- a/NPCs/NormalNPCs/SeaUrchin.cs +++ b/NPCs/NormalNPCs/SeaUrchin.cs @@ -68,7 +68,7 @@ namespace CalamityMod.NPCs.NormalNPCs return SpawnCondition.OceanMonster.Chance * 0.2f; } - public override void ModifyNPCLoot(NPCLoot npcLoot) => npcLoot.Add(ModContent.ItemType(), 1, 15, 25); + public override void ModifyNPCLoot(NPCLoot npcLoot) => npcLoot.Add(ModContent.ItemType(), 1, 30, 50); public override void HitEffect(int hitDirection, double damage) { diff --git a/NPCs/SulphurousSea/AquaticUrchin.cs b/NPCs/SulphurousSea/AquaticUrchin.cs index fa86620c10..dac0e25e12 100644 --- a/NPCs/SulphurousSea/AquaticUrchin.cs +++ b/NPCs/SulphurousSea/AquaticUrchin.cs @@ -147,7 +147,7 @@ namespace CalamityMod.NPCs.SulphurousSea public override void ModifyNPCLoot(NPCLoot npcLoot) { - npcLoot.Add(ModContent.ItemType(), 1, 15, 25); + npcLoot.Add(ModContent.ItemType(), 1, 30, 50); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs b/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs index 4967dfd0ce..d8f3de357b 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs @@ -166,7 +166,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses for (int i = 0; i < numProj; i++) { offsetAngle = startAngle + deltaAngle * i; - int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), center.X, center.Y, baseSpeed * (float)Math.Sin(offsetAngle), baseSpeed * (float)Math.Cos(offsetAngle), type, damage, 0f, Main.myPlayer, -1f, 0f); + int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), center.X, center.Y, baseSpeed * (float)Math.Sin(offsetAngle), baseSpeed * (float)Math.Cos(offsetAngle), type, damage, 0f, Main.myPlayer, -2f, 0f); Main.projectile[proj].timeLeft = 300; } diff --git a/Projectiles/Boss/DoGDeath.cs b/Projectiles/Boss/DoGDeath.cs index 0e9d0f4144..ed5b0fdf87 100644 --- a/Projectiles/Boss/DoGDeath.cs +++ b/Projectiles/Boss/DoGDeath.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.Opacity = 0f; Projectile.penetrate = -1; Projectile.extraUpdates = 3; - Projectile.timeLeft = 1200; + Projectile.timeLeft = 940; CooldownSlot = ImmunityCooldownID.Bosses; } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index fc375b517e..b89266f39b 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -222,7 +222,7 @@ namespace CalamityMod.Projectiles RequiresManualResurrection = false; } - if (projectile.type == ProjectileID.Skull && projectile.ai[0] == 0f) + if (projectile.type == ProjectileID.Skull && (projectile.ai[0] == 0f || projectile.ai[0] == -2f)) { if (projectile.alpha > 0) projectile.alpha -= 75; @@ -243,81 +243,84 @@ namespace CalamityMod.Projectiles Main.dust[num173].velocity.Y *= 0.3f; } - float num180 = (float)Math.Sqrt(projectile.velocity.X * projectile.velocity.X + projectile.velocity.Y * projectile.velocity.Y); - float num181 = projectile.localAI[0]; - - if (num181 == 0f) + if (projectile.ai[0] == 0f) { - projectile.localAI[0] = num180; - num181 = num180; - } + float num180 = (float)Math.Sqrt(projectile.velocity.X * projectile.velocity.X + projectile.velocity.Y * projectile.velocity.Y); + float num181 = projectile.localAI[0]; - float num182 = projectile.position.X; - float num183 = projectile.position.Y; - float num184 = 300f; - bool flag4 = false; - int num185 = 0; - - if (projectile.ai[1] == 0f) - { - for (int num186 = 0; num186 < Main.maxNPCs; num186++) + if (num181 == 0f) { - if (Main.npc[num186].CanBeChasedBy(this) && (projectile.ai[1] == 0f || projectile.ai[1] == (float)(num186 + 1))) + projectile.localAI[0] = num180; + num181 = num180; + } + + float num182 = projectile.position.X; + float num183 = projectile.position.Y; + float num184 = 300f; + bool flag4 = false; + int num185 = 0; + + if (projectile.ai[1] == 0f) + { + for (int num186 = 0; num186 < Main.maxNPCs; num186++) { - float num187 = Main.npc[num186].position.X + (float)(Main.npc[num186].width / 2); - float num188 = Main.npc[num186].position.Y + (float)(Main.npc[num186].height / 2); - float num189 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num187) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num188); - if (num189 < num184 && Collision.CanHit(new Vector2(projectile.position.X + (float)(projectile.width / 2), projectile.position.Y + (float)(projectile.height / 2)), 1, 1, Main.npc[num186].position, Main.npc[num186].width, Main.npc[num186].height)) + if (Main.npc[num186].CanBeChasedBy(this) && (projectile.ai[1] == 0f || projectile.ai[1] == (float)(num186 + 1))) { - num184 = num189; - num182 = num187; - num183 = num188; - flag4 = true; - num185 = num186; + float num187 = Main.npc[num186].position.X + (float)(Main.npc[num186].width / 2); + float num188 = Main.npc[num186].position.Y + (float)(Main.npc[num186].height / 2); + float num189 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num187) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num188); + if (num189 < num184 && Collision.CanHit(new Vector2(projectile.position.X + (float)(projectile.width / 2), projectile.position.Y + (float)(projectile.height / 2)), 1, 1, Main.npc[num186].position, Main.npc[num186].width, Main.npc[num186].height)) + { + num184 = num189; + num182 = num187; + num183 = num188; + flag4 = true; + num185 = num186; + } } } + + if (flag4) + projectile.ai[1] = num185 + 1; + + flag4 = false; } + if (projectile.ai[1] > 0f) + { + int num190 = (int)(projectile.ai[1] - 1f); + if (Main.npc[num190].active && Main.npc[num190].CanBeChasedBy(this, ignoreDontTakeDamage: true) && !Main.npc[num190].dontTakeDamage) + { + float num191 = Main.npc[num190].position.X + (float)(Main.npc[num190].width / 2); + float num192 = Main.npc[num190].position.Y + (float)(Main.npc[num190].height / 2); + if (Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num191) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num192) < 1000f) + { + flag4 = true; + num182 = Main.npc[num190].position.X + (float)(Main.npc[num190].width / 2); + num183 = Main.npc[num190].position.Y + (float)(Main.npc[num190].height / 2); + } + } + else + projectile.ai[1] = 0f; + } + + if (!projectile.friendly) + flag4 = false; + if (flag4) - projectile.ai[1] = num185 + 1; - - flag4 = false; - } - - if (projectile.ai[1] > 0f) - { - int num190 = (int)(projectile.ai[1] - 1f); - if (Main.npc[num190].active && Main.npc[num190].CanBeChasedBy(this, ignoreDontTakeDamage: true) && !Main.npc[num190].dontTakeDamage) { - float num191 = Main.npc[num190].position.X + (float)(Main.npc[num190].width / 2); - float num192 = Main.npc[num190].position.Y + (float)(Main.npc[num190].height / 2); - if (Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num191) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num192) < 1000f) - { - flag4 = true; - num182 = Main.npc[num190].position.X + (float)(Main.npc[num190].width / 2); - num183 = Main.npc[num190].position.Y + (float)(Main.npc[num190].height / 2); - } + float num193 = num181; + Vector2 vector9 = new(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num194 = num182 - vector9.X; + float num195 = num183 - vector9.Y; + float num196 = (float)Math.Sqrt(num194 * num194 + num195 * num195); + num196 = num193 / num196; + num194 *= num196; + num195 *= num196; + int num197 = 32; + projectile.velocity.X = (projectile.velocity.X * (float)(num197 - 1) + num194) / (float)num197; + projectile.velocity.Y = (projectile.velocity.Y * (float)(num197 - 1) + num195) / (float)num197; } - else - projectile.ai[1] = 0f; - } - - if (!projectile.friendly) - flag4 = false; - - if (flag4) - { - float num193 = num181; - Vector2 vector9 = new(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); - float num194 = num182 - vector9.X; - float num195 = num183 - vector9.Y; - float num196 = (float)Math.Sqrt(num194 * num194 + num195 * num195); - num196 = num193 / num196; - num194 *= num196; - num195 *= num196; - int num197 = 32; - projectile.velocity.X = (projectile.velocity.X * (float)(num197 - 1) + num194) / (float)num197; - projectile.velocity.Y = (projectile.velocity.Y * (float)(num197 - 1) + num195) / (float)num197; } projectile.spriteDirection = projectile.direction; diff --git a/Projectiles/Healing/ShinobiHealOrb.cs b/Projectiles/Healing/ShinobiHealOrb.cs index b02276a89e..eaf087d39e 100644 --- a/Projectiles/Healing/ShinobiHealOrb.cs +++ b/Projectiles/Healing/ShinobiHealOrb.cs @@ -17,10 +17,10 @@ namespace CalamityMod.Projectiles.Healing Projectile.width = 20; Projectile.height = 20; Projectile.friendly = true; - Projectile.DamageType = DamageClass.Melee; Projectile.tileCollide = false; Projectile.penetrate = -1; - Projectile.timeLeft = 300; + Projectile.MaxUpdates = 5; + Projectile.timeLeft = 600; } public override void AI() diff --git a/Projectiles/Magic/ArtAttackHoldout.cs b/Projectiles/Magic/ArtAttackHoldout.cs index 3f827286dd..7717b48e36 100644 --- a/Projectiles/Magic/ArtAttackHoldout.cs +++ b/Projectiles/Magic/ArtAttackHoldout.cs @@ -1,5 +1,7 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Items.Weapons.Magic; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Magic @@ -37,11 +39,18 @@ namespace CalamityMod.Projectiles.Magic UpdateAim(); // Create the star. - if (Projectile.localAI[0] == 0f) + int attackType = ModContent.ProjectileType(); + if (Owner.ownedProjectileCounts[attackType] == 0) { - Vector2 initialStarVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 15f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, initialStarVelocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); - Projectile.localAI[0] = 1f; + if (Projectile.ai[0] >= 0f && Owner.CheckMana(Owner.ActiveItem(), -1, true, false)) + { + SoundEngine.PlaySound(ArtAttack.UseSound, Owner.Center); + Vector2 initialStarVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 15f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, initialStarVelocity, attackType, Projectile.damage, Projectile.knockBack, Projectile.owner); + Projectile.ai[0] = -24f; + } + else + Projectile.ai[0]++; } if (!Owner.channel) diff --git a/Projectiles/Magic/AtlantisSpear.cs b/Projectiles/Magic/AtlantisSpear.cs index ec40bd85c2..f4cf92153c 100644 --- a/Projectiles/Magic/AtlantisSpear.cs +++ b/Projectiles/Magic/AtlantisSpear.cs @@ -25,6 +25,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Magic; AIType = ProjectileID.CrystalVileShardHead; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 15; } public override void AI() @@ -45,13 +47,13 @@ namespace CalamityMod.Projectiles.Magic if (Main.myPlayer == Projectile.owner) { int projType = Projectile.type; - if (Projectile.ai[1] >= (float)(12 + Main.rand.Next(2))) + if (Projectile.ai[1] >= 20f) { projType = ModContent.ProjectileType(); } int dmg = Projectile.damage; float kBack = Projectile.knockBack; - int number = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.position.X + Projectile.velocity.X + (float)(Projectile.width / 2), Projectile.position.Y + Projectile.velocity.Y + (float)(Projectile.height / 2), Projectile.velocity.X, Projectile.velocity.Y, projType, dmg, kBack, Projectile.owner, 0f, Projectile.ai[1] + 1f); + int number = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + Projectile.velocity, Projectile.velocity, projType, dmg, kBack, Projectile.owner, 0f, Projectile.ai[1] + 1f); NetMessage.SendData(MessageID.SyncProjectile, -1, -1, null, number, 0f, 0f, 0f, 0, 0, 0); } } @@ -81,11 +83,6 @@ namespace CalamityMod.Projectiles.Magic public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, Projectile.alpha); - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.immune[Projectile.owner] = 6; - } - public override void Kill(int timeLeft) { int numProj = 2; diff --git a/Projectiles/Magic/AtlantisSpear2.cs b/Projectiles/Magic/AtlantisSpear2.cs index 89c990a897..94e58e47bf 100644 --- a/Projectiles/Magic/AtlantisSpear2.cs +++ b/Projectiles/Magic/AtlantisSpear2.cs @@ -26,6 +26,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Magic; AIType = ProjectileID.CrystalVileShardShaft; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 15; } public override void AI() diff --git a/Projectiles/Magic/BeamingBolt.cs b/Projectiles/Magic/BeamingBolt.cs index 49387a3924..bf4b131808 100644 --- a/Projectiles/Magic/BeamingBolt.cs +++ b/Projectiles/Magic/BeamingBolt.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.width = Projectile.height = 30; Projectile.friendly = true; Projectile.timeLeft = 120; - Projectile.penetrate = -1; + Projectile.penetrate = 1; Projectile.DamageType = DamageClass.Magic; } @@ -76,10 +76,5 @@ namespace CalamityMod.Projectiles.Magic } SoundEngine.PlaySound(SoundID.Item105, Projectile.position); } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.immune[Projectile.owner] = 7; - } } } diff --git a/Projectiles/Magic/BigBeamofDeath.cs b/Projectiles/Magic/BigBeamofDeath.cs index 255f0c5ae0..1fab66dc7e 100644 --- a/Projectiles/Magic/BigBeamofDeath.cs +++ b/Projectiles/Magic/BigBeamofDeath.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.DamageType = DamageClass.Magic; Projectile.tileCollide = false; Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 100; + Projectile.idStaticNPCHitCooldown = 10; Projectile.penetrate = -1; Projectile.extraUpdates = 100; Projectile.timeLeft = 80; diff --git a/Projectiles/Magic/BrimroseBeam.cs b/Projectiles/Magic/BrimroseBeam.cs new file mode 100644 index 0000000000..39466f5c9c --- /dev/null +++ b/Projectiles/Magic/BrimroseBeam.cs @@ -0,0 +1,66 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Magic +{ + public class BrimroseBeam : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Brimrose Beam"); + } + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 4; + Projectile.alpha = 255; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Magic; + Projectile.penetrate = -1; + Projectile.extraUpdates = 100; + Projectile.timeLeft = 30; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; + } + + public override void Kill(int timeLeft) + { + int numProj = 2; + float rotation = MathHelper.ToRadians(Projectile.ai[0] >= 3f ? 20 : 10); + // Splits up to 4 times + if (Projectile.owner == Main.myPlayer && Projectile.ai[0] < 4f) + { + for (int i = 0; i < numProj; i++) + { + Vector2 perturbedSpeed = Projectile.velocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, perturbedSpeed, Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner, Projectile.ai[0] + 1f); + } + } + } + + public override void AI() + { + // Small buffer before dust spawns on the first projectile + Projectile.ai[1]++; + if (Projectile.ai[1] > 9f || Projectile.ai[0] > 0f) + { + int fire = Dust.NewDust(Projectile.Center, 1, 1, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1.5f); + Main.dust[fire].velocity *= 0.1f; + Main.dust[fire].noGravity = true; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + + // Pierce damage decay time + if (Projectile.numHits > 0) + Projectile.damage = (int)(Projectile.damage * 0.8); + } + } +} diff --git a/Projectiles/Magic/BrimstoneBeam.cs b/Projectiles/Magic/BrimstoneBeam.cs deleted file mode 100644 index 49b22584c9..0000000000 --- a/Projectiles/Magic/BrimstoneBeam.cs +++ /dev/null @@ -1,62 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Magic -{ - public class BrimstoneBeam : ModProjectile - { - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Beam"); - } - - public override void SetDefaults() - { - Projectile.width = 2; - Projectile.height = 2; - Projectile.friendly = true; - Projectile.DamageType = DamageClass.Magic; - Projectile.penetrate = 1; - Projectile.extraUpdates = 100; - Projectile.timeLeft = 30; - } - - public override void Kill(int timeLeft) - { - int numProj = 2; - float rotation = MathHelper.ToRadians(10); - if (Projectile.owner == Main.myPlayer) - { - for (int i = 0; i < numProj; i++) - { - Vector2 perturbedSpeed = new Vector2(Projectile.velocity.X, Projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); - } - } - } - - public override void AI() - { - Projectile.localAI[0] += 1f; - if (Projectile.localAI[0] > 9f) - { - Vector2 vector33 = Projectile.position; - vector33 -= Projectile.velocity; - Projectile.alpha = 255; - int num249 = 235; - int num448 = Dust.NewDust(vector33, 1, 1, num249, 0f, 0f, 0, default, 1.5f); - Main.dust[num448].position = vector33; - Main.dust[num448].velocity *= 0.1f; - Main.dust[num448].noGravity = true; - } - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 120); - } - } -} diff --git a/Projectiles/Magic/BrimstoneBeam2.cs b/Projectiles/Magic/BrimstoneBeam2.cs deleted file mode 100644 index 2dc1abf343..0000000000 --- a/Projectiles/Magic/BrimstoneBeam2.cs +++ /dev/null @@ -1,58 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Magic -{ - public class BrimstoneBeam2 : ModProjectile - { - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Beam"); - } - - public override void SetDefaults() - { - Projectile.width = 2; - Projectile.height = 2; - Projectile.friendly = true; - Projectile.DamageType = DamageClass.Magic; - Projectile.penetrate = 1; - Projectile.extraUpdates = 100; - Projectile.timeLeft = 30; - } - - public override void Kill(int timeLeft) - { - int numProj = 2; - float rotation = MathHelper.ToRadians(10); - if (Projectile.owner == Main.myPlayer) - { - for (int i = 0; i < numProj; i++) - { - Vector2 perturbedSpeed = new Vector2(Projectile.velocity.X, Projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); - } - } - } - - public override void AI() - { - Vector2 vector33 = Projectile.position; - vector33 -= Projectile.velocity; - Projectile.alpha = 255; - int num249 = 235; - int num448 = Dust.NewDust(vector33, 1, 1, num249, 0f, 0f, 0, default, 1.5f); - Main.dust[num448].position = vector33; - Main.dust[num448].velocity *= 0.1f; - Main.dust[num448].noGravity = true; - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 120); - } - } -} diff --git a/Projectiles/Magic/BrimstoneBeam3.cs b/Projectiles/Magic/BrimstoneBeam3.cs deleted file mode 100644 index 41275ff8e4..0000000000 --- a/Projectiles/Magic/BrimstoneBeam3.cs +++ /dev/null @@ -1,58 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Magic -{ - public class BrimstoneBeam3 : ModProjectile - { - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Beam"); - } - - public override void SetDefaults() - { - Projectile.width = 2; - Projectile.height = 2; - Projectile.friendly = true; - Projectile.DamageType = DamageClass.Magic; - Projectile.penetrate = -1; - Projectile.extraUpdates = 100; - Projectile.timeLeft = 30; - } - - public override void Kill(int timeLeft) - { - int numProj = 2; - float rotation = MathHelper.ToRadians(10); - if (Projectile.owner == Main.myPlayer) - { - for (int i = 0; i < numProj; i++) - { - Vector2 perturbedSpeed = new Vector2(Projectile.velocity.X, Projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); - } - } - } - - public override void AI() - { - Vector2 vector33 = Projectile.position; - vector33 -= Projectile.velocity; - Projectile.alpha = 255; - int num249 = 235; - int num448 = Dust.NewDust(vector33, 1, 1, num249, 0f, 0f, 0, default, 1.5f); - Main.dust[num448].position = vector33; - Main.dust[num448].velocity *= 0.1f; - Main.dust[num448].noGravity = true; - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 120); - } - } -} diff --git a/Projectiles/Magic/BrimstoneBeam4.cs b/Projectiles/Magic/BrimstoneBeam4.cs deleted file mode 100644 index 14623c464f..0000000000 --- a/Projectiles/Magic/BrimstoneBeam4.cs +++ /dev/null @@ -1,58 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Magic -{ - public class BrimstoneBeam4 : ModProjectile - { - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Beam"); - } - - public override void SetDefaults() - { - Projectile.width = 2; - Projectile.height = 2; - Projectile.friendly = true; - Projectile.DamageType = DamageClass.Magic; - Projectile.penetrate = 1; - Projectile.extraUpdates = 100; - Projectile.timeLeft = 30; - } - - public override void Kill(int timeLeft) - { - int numProj = 2; - float rotation = MathHelper.ToRadians(20); - if (Projectile.owner == Main.myPlayer) - { - for (int i = 0; i < numProj; i++) - { - Vector2 perturbedSpeed = new Vector2(Projectile.velocity.X, Projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); - } - } - } - - public override void AI() - { - Vector2 vector33 = Projectile.position; - vector33 -= Projectile.velocity; - Projectile.alpha = 255; - int num249 = 235; - int num448 = Dust.NewDust(vector33, 1, 1, num249, 0f, 0f, 0, default, 1.5f); - Main.dust[num448].position = vector33; - Main.dust[num448].velocity *= 0.1f; - Main.dust[num448].noGravity = true; - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 120); - } - } -} diff --git a/Projectiles/Magic/BrimstoneBeam5.cs b/Projectiles/Magic/BrimstoneBeam5.cs deleted file mode 100644 index cd05d3e0e0..0000000000 --- a/Projectiles/Magic/BrimstoneBeam5.cs +++ /dev/null @@ -1,44 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Magic -{ - public class BrimstoneBeam5 : ModProjectile - { - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Beam"); - } - - public override void SetDefaults() - { - Projectile.width = 2; - Projectile.height = 2; - Projectile.friendly = true; - Projectile.DamageType = DamageClass.Magic; - Projectile.penetrate = 1; - Projectile.extraUpdates = 100; - Projectile.timeLeft = 30; - } - - public override void AI() - { - Vector2 vector33 = Projectile.position; - vector33 -= Projectile.velocity; - Projectile.alpha = 255; - int num249 = 235; - int num448 = Dust.NewDust(vector33, 1, 1, num249, 0f, 0f, 0, default, 1.5f); - Main.dust[num448].position = vector33; - Main.dust[num448].velocity *= 0.1f; - Main.dust[num448].noGravity = true; - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 120); - } - } -} diff --git a/Projectiles/Magic/BrimstoneFireball.cs b/Projectiles/Magic/BrimstoneFireball.cs index 04badd11be..2c2fb93db2 100644 --- a/Projectiles/Magic/BrimstoneFireball.cs +++ b/Projectiles/Magic/BrimstoneFireball.cs @@ -25,6 +25,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.DamageType = DamageClass.Magic; Projectile.penetrate = 4; Projectile.timeLeft = 300; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; } public override void AI() @@ -35,8 +37,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.Kill(); if (Projectile.owner == Main.myPlayer) { - int fireballAmt = Main.rand.Next(2, 4); - for (int j = 0; j < fireballAmt; j++) + for (int j = 0; j < 2; j++) { Vector2 velocity = new Vector2(Main.rand.NextFloat(-100f, 100f), Main.rand.NextFloat(-100f, -50f)); while (velocity.X == 0f) @@ -44,8 +45,8 @@ namespace CalamityMod.Projectiles.Magic velocity.X = (float)Main.rand.Next(-100, 101); } velocity.Normalize(); - velocity *= Main.rand.NextFloat(70f, 100f) * 0.1f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.oldPosition.X + (float)(Projectile.width / 2), Projectile.oldPosition.Y + (float)(Projectile.height / 2), velocity.X, velocity.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.85), 0f, Projectile.owner, 0f, 0f); + velocity *= Main.rand.NextFloat(7f, 10f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.oldPosition.X + (float)(Projectile.width / 2), Projectile.oldPosition.Y + (float)(Projectile.height / 2), velocity.X, velocity.Y, ModContent.ProjectileType(), Projectile.damage, 0f, Projectile.owner, 0f, 0f); } } } @@ -112,10 +113,6 @@ namespace CalamityMod.Projectiles.Magic SoundEngine.PlaySound(SoundID.Item20, Projectile.position); } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.immune[Projectile.owner] = 8; - target.AddBuff(ModContent.BuffType(), 120); - } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => target.AddBuff(ModContent.BuffType(), 120); } } diff --git a/Projectiles/Magic/BrimstoneHellfireballFriendly.cs b/Projectiles/Magic/BrimstoneHellfireballFriendly.cs index 305c1112c5..e68fe70f6f 100644 --- a/Projectiles/Magic/BrimstoneHellfireballFriendly.cs +++ b/Projectiles/Magic/BrimstoneHellfireballFriendly.cs @@ -26,11 +26,9 @@ namespace CalamityMod.Projectiles.Magic Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.timeLeft = 300; - Projectile.penetrate = 2; - Projectile.extraUpdates = 1; + Projectile.penetrate = 1; + Projectile.MaxUpdates = 1; Projectile.DamageType = DamageClass.Magic; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; } public override void AI() @@ -57,7 +55,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.spriteDirection = Projectile.direction = (Projectile.velocity.X > 0).ToDirectionInt(); Projectile.rotation = Projectile.velocity.ToRotation() + (Projectile.spriteDirection == 1 ? 0f : MathHelper.Pi) - MathHelper.ToRadians(90) * Projectile.direction; - int num458 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 170, default, 1.1f); + int num458 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 170, default, 1.1f); Main.dust[num458].noGravity = true; Main.dust[num458].velocity *= 0.5f; Main.dust[num458].velocity += Projectile.velocity * 0.1f; @@ -65,7 +63,7 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.localAI[0] == 0f) { - SoundEngine.PlaySound(SoundID.Item20, Projectile.position); + SoundEngine.PlaySound(SoundID.Item20, Projectile.Center); Projectile.localAI[0] += 1f; } @@ -77,7 +75,7 @@ namespace CalamityMod.Projectiles.Magic { if (Projectile.owner == Main.myPlayer) { - int fire = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + int fire = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); } } diff --git a/Projectiles/Magic/CryoBlast.cs b/Projectiles/Magic/CryoBlast.cs index 16680cab81..79829113c4 100644 --- a/Projectiles/Magic/CryoBlast.cs +++ b/Projectiles/Magic/CryoBlast.cs @@ -27,6 +27,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.coldDamage = true; Projectile.ignoreWater = true; Projectile.alpha = 255; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/DustProjectile.cs b/Projectiles/Magic/DustProjectile.cs index 5504eb43ba..146b8a6876 100644 --- a/Projectiles/Magic/DustProjectile.cs +++ b/Projectiles/Magic/DustProjectile.cs @@ -1,5 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.DataStructures; using Microsoft.Xna.Framework; using System; @@ -26,9 +25,11 @@ namespace CalamityMod.Projectiles.Magic Projectile.ignoreWater = true; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; - Projectile.penetrate = -1; - Projectile.extraUpdates = 3; - Projectile.timeLeft = 90; + Projectile.penetrate = 4; + Projectile.MaxUpdates = 4; + Projectile.timeLeft = 30 * Projectile.MaxUpdates; // 30 effectively, 120 total + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10 * Projectile.MaxUpdates; // 10 effective, 40 total } public override void AI() @@ -62,15 +63,15 @@ namespace CalamityMod.Projectiles.Magic } Projectile.ai[0] += 1f; Projectile.rotation += 0.3f * (float)Projectile.direction; - if (Projectile.timeLeft < 30) - Projectile.Opacity = MathHelper.Lerp(0f, 1f, (float)Projectile.timeLeft / 30f); + if (Projectile.timeLeft < 5) + Projectile.Opacity = MathHelper.Lerp(0f, 1f, (float)Projectile.timeLeft / 5f); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => target.AddBuff(ModContent.BuffType(), 180); public override void OnHitPvp(Player target, int damage, bool crit) => target.AddBuff(ModContent.BuffType(), 180); - public override bool? CanDamage() => Projectile.timeLeft > 30; + public override bool? CanDamage() => Projectile.timeLeft > 5; public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Magic/FlareBoltProjectile.cs b/Projectiles/Magic/FlareBoltProjectile.cs index ee2dbe0755..8fad8df544 100644 --- a/Projectiles/Magic/FlareBoltProjectile.cs +++ b/Projectiles/Magic/FlareBoltProjectile.cs @@ -24,6 +24,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = 4; Projectile.timeLeft = 480; Projectile.DamageType = DamageClass.Magic; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/FrigidflashBoltProjectile.cs b/Projectiles/Magic/FrigidflashBoltProjectile.cs index 2bac92d6b5..ca2c8e6bd0 100644 --- a/Projectiles/Magic/FrigidflashBoltProjectile.cs +++ b/Projectiles/Magic/FrigidflashBoltProjectile.cs @@ -24,6 +24,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = 5; Projectile.timeLeft = 480; Projectile.DamageType = DamageClass.Magic; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/FrostBoltProjectile.cs b/Projectiles/Magic/FrostBoltProjectile.cs index 8aaf8e57a3..1cac15e013 100644 --- a/Projectiles/Magic/FrostBoltProjectile.cs +++ b/Projectiles/Magic/FrostBoltProjectile.cs @@ -25,6 +25,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.timeLeft = 480; Projectile.DamageType = DamageClass.Magic; Projectile.coldDamage = true; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Magic/SolarBeam2.cs b/Projectiles/Magic/LazharSolarBeam.cs similarity index 70% rename from Projectiles/Magic/SolarBeam2.cs rename to Projectiles/Magic/LazharSolarBeam.cs index d27f031fed..8d3f30d792 100644 --- a/Projectiles/Magic/SolarBeam2.cs +++ b/Projectiles/Magic/LazharSolarBeam.cs @@ -1,18 +1,17 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Terraria.ID; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Magic { - public class SolarBeam2 : ModProjectile + public class LazharSolarBeam : ModProjectile { public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public override void SetStaticDefaults() { - DisplayName.SetDefault("Beam"); + DisplayName.SetDefault("Concentrated Solar Beam"); } public override void SetDefaults() @@ -21,32 +20,11 @@ namespace CalamityMod.Projectiles.Magic Projectile.height = 4; Projectile.friendly = true; Projectile.DamageType = DamageClass.Magic; - Projectile.penetrate = 6; + Projectile.penetrate = 1; Projectile.extraUpdates = 100; Projectile.timeLeft = 300; } - public override bool OnTileCollide(Vector2 oldVelocity) - { - Projectile.penetrate--; - if (Projectile.penetrate <= 0) - { - Projectile.Kill(); - } - else - { - if (Projectile.velocity.X != oldVelocity.X) - { - Projectile.velocity.X = -oldVelocity.X; - } - if (Projectile.velocity.Y != oldVelocity.Y) - { - Projectile.velocity.Y = -oldVelocity.Y; - } - } - return false; - } - public override void AI() { Projectile.localAI[0] += 1f; @@ -68,8 +46,6 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.Daybreak, 180); - - target.immune[Projectile.owner] = 4; if (Projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); diff --git a/Projectiles/Magic/PlasmaRay.cs b/Projectiles/Magic/PlasmaRay.cs index b24e9db233..a71154e1b7 100644 --- a/Projectiles/Magic/PlasmaRay.cs +++ b/Projectiles/Magic/PlasmaRay.cs @@ -90,7 +90,7 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.AddBuff(BuffID.ShadowFlame, 600); + target.AddBuff(BuffID.ShadowFlame, 360); } } } diff --git a/Projectiles/Magic/SupremeDustFlakProjectile.cs b/Projectiles/Magic/SupremeDustFlakProjectile.cs index 58123adf6d..c805af6239 100644 --- a/Projectiles/Magic/SupremeDustFlakProjectile.cs +++ b/Projectiles/Magic/SupremeDustFlakProjectile.cs @@ -1,5 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -20,9 +19,9 @@ namespace CalamityMod.Projectiles.Magic Projectile.ignoreWater = true; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; - Projectile.penetrate = 2; - Projectile.extraUpdates = 3; - Projectile.timeLeft = 100; + Projectile.penetrate = 1; + Projectile.MaxUpdates = 4; + Projectile.timeLeft = 25 * Projectile.MaxUpdates; // 25 effective, 100 total } public override void AI() @@ -91,12 +90,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.rotation += 0.3f * (float)Projectile.direction; } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 180); - - target.immune[Projectile.owner] = 6; - } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => target.AddBuff(ModContent.BuffType(), 180); public override void OnHitPvp(Player target, int damage, bool crit) => target.AddBuff(ModContent.BuffType(), 180); } diff --git a/Projectiles/Magic/SupremeDustProjectile.cs b/Projectiles/Magic/SupremeDustProjectile.cs index 3b0f097606..2df3b7c803 100644 --- a/Projectiles/Magic/SupremeDustProjectile.cs +++ b/Projectiles/Magic/SupremeDustProjectile.cs @@ -1,5 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -21,8 +20,10 @@ namespace CalamityMod.Projectiles.Magic Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; Projectile.penetrate = 4; - Projectile.extraUpdates = 3; - Projectile.timeLeft = 200; + Projectile.MaxUpdates = 4; + Projectile.timeLeft = 50 * Projectile.MaxUpdates; // 50 effective, 200 total + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10 * Projectile.MaxUpdates; // 10 effective, 40 total } public override void AI() @@ -88,11 +89,9 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(ModContent.BuffType(), 180); - - target.immune[Projectile.owner] = 6; if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); } } diff --git a/Projectiles/Magic/TearsofHeavenProjectile.cs b/Projectiles/Magic/TearsofHeavenProjectile.cs index aa2436772d..221a0bfafe 100644 --- a/Projectiles/Magic/TearsofHeavenProjectile.cs +++ b/Projectiles/Magic/TearsofHeavenProjectile.cs @@ -20,11 +20,13 @@ namespace CalamityMod.Projectiles.Magic Projectile.height = 24; Projectile.friendly = true; Projectile.DamageType = DamageClass.Magic; - Projectile.penetrate = 3; + Projectile.penetrate = 2; Projectile.alpha = 255; Projectile.timeLeft = 240; Projectile.light = 0.5f; Projectile.tileCollide = false; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 20; } public override void AI() @@ -60,7 +62,6 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.immune[Projectile.owner] = 6; target.AddBuff(ModContent.BuffType(), 180); } } diff --git a/Projectiles/Melee/UrchinMaceProjectile.cs b/Projectiles/Melee/UrchinMaceProjectile.cs index abc4d1c88d..9318d5b68f 100644 --- a/Projectiles/Melee/UrchinMaceProjectile.cs +++ b/Projectiles/Melee/UrchinMaceProjectile.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Melee public static float MaxWindup = 110; public ref float Windup => ref Projectile.ai[0]; public float WindupProgress => MathHelper.Clamp(Windup, 0, MaxWindup) / MaxWindup; - public static float whirlpoolDamageMultiplier = 1.6f; + public static float whirlpoolDamageMultiplier = 2f; public override void SetStaticDefaults() { diff --git a/Projectiles/Ranged/ArcherfishShot.cs b/Projectiles/Ranged/ArcherfishShot.cs index b80507570b..50ac4f5406 100644 --- a/Projectiles/Ranged/ArcherfishShot.cs +++ b/Projectiles/Ranged/ArcherfishShot.cs @@ -22,12 +22,12 @@ namespace CalamityMod.Projectiles.Ranged Projectile.friendly = true; Projectile.DamageType = DamageClass.Ranged; Projectile.ignoreWater = true; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; Projectile.penetrate = 2; Projectile.alpha = 255; Projectile.timeLeft = 600; - Projectile.extraUpdates = 2; + Projectile.MaxUpdates = 3; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration; } diff --git a/Projectiles/Ranged/BallistaGreatArrow.cs b/Projectiles/Ranged/BallistaGreatArrow.cs index 66336919a7..67496bfb00 100644 --- a/Projectiles/Ranged/BallistaGreatArrow.cs +++ b/Projectiles/Ranged/BallistaGreatArrow.cs @@ -26,6 +26,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.penetrate = 2; Projectile.aiStyle = ProjAIStyleID.Arrow; AIType = ProjectileID.WoodenArrowFriendly; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration; } @@ -38,24 +40,18 @@ namespace CalamityMod.Projectiles.Ranged public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.immune[Projectile.owner] = 12; target.AddBuff(ModContent.BuffType(), 180); } public override void Kill(int timeLeft) { SoundEngine.PlaySound(SoundID.Item14, Projectile.position); - float spread = 90f * 0.0174f; - double startAngle = Math.Atan2(Projectile.velocity.X, Projectile.velocity.Y) - spread / 2; - double deltaAngle = spread / 8f; - double offsetAngle; if (Projectile.owner == Main.myPlayer) { - for (int i = 0; i < 3; i++) + for (int i = -1; i < 2; i++) // Burst into 3 shards upwards { - offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.2), Projectile.knockBack / 5, Projectile.owner, 0f, 0f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.2), Projectile.knockBack / 5, Projectile.owner, 0f, 0f); + Vector2 baseVelocity = Vector2.UnitY * -12f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Top, baseVelocity.RotatedBy(MathHelper.ToRadians(10 * i)), ModContent.ProjectileType(), Projectile.damage / 4, Projectile.knockBack * 0.25f, Projectile.owner); } } } diff --git a/Projectiles/Ranged/ClamorRifleProj.cs b/Projectiles/Ranged/ClamorRifleProj.cs index 2cbc4659fb..7e2cb0511b 100644 --- a/Projectiles/Ranged/ClamorRifleProj.cs +++ b/Projectiles/Ranged/ClamorRifleProj.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Ranged for (int b = 0; b < bulletAmt; b++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.45), 0f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), 0f, Projectile.owner, 0f, 0f); } } SoundEngine.PlaySound(SoundID.Item118, Projectile.Center); diff --git a/Projectiles/Ranged/FlakKrakenProj.cs b/Projectiles/Ranged/FlakKrakenProj.cs index afb1b3ccce..803790fa33 100644 --- a/Projectiles/Ranged/FlakKrakenProj.cs +++ b/Projectiles/Ranged/FlakKrakenProj.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.ignoreWater = true; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 4; + Projectile.localNPCHitCooldown = 6; } public override void AI() diff --git a/Projectiles/Ranged/Sickness.cs b/Projectiles/Ranged/Sickness.cs index 6e0bb776e9..243280b42f 100644 --- a/Projectiles/Ranged/Sickness.cs +++ b/Projectiles/Ranged/Sickness.cs @@ -24,6 +24,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; Projectile.timeLeft = 5; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; } public override void AI() diff --git a/Projectiles/Ranged/SpykerProj.cs b/Projectiles/Ranged/SpykerProj.cs index 06ba322812..28b55613b5 100644 --- a/Projectiles/Ranged/SpykerProj.cs +++ b/Projectiles/Ranged/SpykerProj.cs @@ -28,6 +28,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.extraUpdates = 2; Projectile.aiStyle = ProjAIStyleID.Nail; AIType = ProjectileID.NailFriendly; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; } public override void AI() @@ -55,11 +57,7 @@ namespace CalamityMod.Projectiles.Ranged return false; } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(BuffID.Venom, 180); - target.immune[Projectile.owner] = 1; - } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => target.AddBuff(BuffID.Venom, 180); public override void OnHitPvp(Player target, int damage, bool crit) => target.AddBuff(BuffID.Venom, 180); diff --git a/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs b/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs index eae0eca2e5..8782c1f06f 100644 --- a/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs +++ b/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs @@ -20,11 +20,12 @@ namespace CalamityMod.Projectiles.Rogue Projectile.width = 30; Projectile.height = 30; Projectile.friendly = true; - Projectile.penetrate = 6; + Projectile.penetrate = 4; Projectile.aiStyle = ProjAIStyleID.ThrownProjectile; Projectile.timeLeft = 600; AIType = ProjectileID.Shuriken; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 10; } @@ -35,14 +36,6 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void Kill(int timeLeft) - { - if (Main.rand.NextBool(2)) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.Center.X, (int)Projectile.Center.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } - } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { OnHitEffects(); diff --git a/Projectiles/Rogue/AntumbraShardProjectile.cs b/Projectiles/Rogue/AntumbraShardProjectile.cs index 32f60474f9..616d61b35e 100644 --- a/Projectiles/Rogue/AntumbraShardProjectile.cs +++ b/Projectiles/Rogue/AntumbraShardProjectile.cs @@ -24,11 +24,13 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.penetrate = -1; - Projectile.extraUpdates = 1; + Projectile.MaxUpdates = 2; Projectile.aiStyle = ProjAIStyleID.StickProjectile; Projectile.timeLeft = 600; AIType = ProjectileID.BoneJavelin; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10 * Projectile.MaxUpdates; // 10 effective, 20 total } public override void AI() @@ -61,14 +63,6 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void Kill(int timeLeft) - { - if (Main.rand.NextBool(2)) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } - } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { Projectile.damage /= 2; @@ -76,7 +70,6 @@ namespace CalamityMod.Projectiles.Rogue { Projectile.damage = 1; } - target.immune[Projectile.owner] = 2; } public override void OnHitPvp(Player target, int damage, bool crit) diff --git a/Projectiles/Rogue/AuroradicalSplitter.cs b/Projectiles/Rogue/AuroradicalSplitter.cs index 226c2cf4ef..d36d039bbd 100644 --- a/Projectiles/Rogue/AuroradicalSplitter.cs +++ b/Projectiles/Rogue/AuroradicalSplitter.cs @@ -99,7 +99,7 @@ namespace CalamityMod.Projectiles.Rogue for (float i = 0; i < 5; i++) { float angle = MathHelper.TwoPi / 5f * i; - int star = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, angle.ToRotationVector2() * 5f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.87), Projectile.knockBack, Projectile.owner, 0f, 0f); + int star = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, angle.ToRotationVector2() * 5f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); Main.projectile[star].Calamity().stealthStrike = Projectile.Calamity().stealthStrike; } Projectile.position = Projectile.Center; diff --git a/Projectiles/Rogue/AuroradicalStar.cs b/Projectiles/Rogue/AuroradicalStar.cs index 0c8f4a6a5a..0a363e49a5 100644 --- a/Projectiles/Rogue/AuroradicalStar.cs +++ b/Projectiles/Rogue/AuroradicalStar.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.tileCollide = false; Projectile.alpha = 100; Projectile.penetrate = 1; - Projectile.timeLeft = 485; + Projectile.timeLeft = 360; Projectile.DamageType = RogueDamageClass.Instance; } @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Rogue } //Home in - float maxDistance = 500f; + float maxDistance = 800f; int targetIndex = -1; int i; for (i = 0; i < Main.maxNPCs; i++) @@ -88,29 +88,21 @@ namespace CalamityMod.Projectiles.Rogue } if (targetIndex != -1) { - Vector2 targetVec = Main.npc[i].Center - Projectile.Center; - if (targetVec.Length() < 60f) - { - Projectile.Kill(); - return; - } - if (Projectile.ai[0] >= 120f) + Vector2 targetVec = Main.npc[targetIndex].Center - Projectile.Center; + if (Projectile.ai[0] >= 30f) { Projectile.ai[1] += 1f; - if (Projectile.ai[1] < 120f) + if (Projectile.ai[1] < 90f) { - float speedMult = 25f; + float speedMult = 16f; targetVec.Normalize(); targetVec *= speedMult; Projectile.velocity = (Projectile.velocity * 15f + targetVec) / 16f; Projectile.velocity.Normalize(); Projectile.velocity *= speedMult; } - else if (Math.Abs(Projectile.velocity.X) + Math.Abs(Projectile.velocity.Y) < 18f) - { - Projectile.velocity.X *= 1.01f; - Projectile.velocity.Y *= 1.01f; - } + else // Chase after the target more straightforwardly + Projectile.velocity = (Main.npc[targetIndex].Center - Projectile.Center) / 12f; } } } @@ -135,8 +127,7 @@ namespace CalamityMod.Projectiles.Rogue { Vector2 pos = new Vector2(targetPos.X + width * 0.5f + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); Vector2 velocity = (targetPos - pos) / 40f; - int dmg = Projectile.damage / 2; - int comet = Projectile.NewProjectile(Projectile.GetSource_FromThis(), pos, velocity, ModContent.ProjectileType(), dmg, Projectile.knockBack, Projectile.owner); + int comet = Projectile.NewProjectile(Projectile.GetSource_FromThis(), pos, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 1.25), Projectile.knockBack, Projectile.owner); if (comet.WithinBounds(Main.maxProjectiles)) { Main.projectile[comet].DamageType = RogueDamageClass.Instance; @@ -154,10 +145,6 @@ namespace CalamityMod.Projectiles.Rogue public override void Kill(int timeLeft) { SoundEngine.PlaySound(SoundID.Item9, Projectile.position); - Projectile.ExpandHitboxBy(96); - Projectile.localNPCHitCooldown = 10; - Projectile.usesLocalNPCImmunity = true; - Projectile.Damage(); for (int d = 0; d < 2; d++) { Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, Main.rand.Next(dustTypes), 0f, 0f, 50, default, 1f); diff --git a/Projectiles/Rogue/BallisticPoisonBombProj.cs b/Projectiles/Rogue/BallisticPoisonBombProj.cs index c3fe454283..b64f185018 100644 --- a/Projectiles/Rogue/BallisticPoisonBombProj.cs +++ b/Projectiles/Rogue/BallisticPoisonBombProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using System; using Terraria; @@ -69,13 +69,13 @@ namespace CalamityMod.Projectiles.Rogue for (int s = 0; s < projAmt; s++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), 0f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage, 0f, Projectile.owner); } int cloudAmt = Main.rand.Next(8, 13); for (int c = 0; c < cloudAmt; c++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 10f, 200f, 0.01f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), 1f, Projectile.owner, 0f, (float)Main.rand.Next(-45, 1)); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), 0f, Projectile.owner); } } for (int d = 0; d < 5; d++) diff --git a/Projectiles/Rogue/BallisticPoisonBombSpike.cs b/Projectiles/Rogue/BallisticPoisonBombSpike.cs index 43b0ee640d..da5bc888e3 100644 --- a/Projectiles/Rogue/BallisticPoisonBombSpike.cs +++ b/Projectiles/Rogue/BallisticPoisonBombSpike.cs @@ -20,11 +20,12 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.penetrate = 3; - Projectile.alpha = 255; - Projectile.extraUpdates = 2; + Projectile.MaxUpdates = 3; Projectile.aiStyle = ProjAIStyleID.Nail; AIType = ProjectileID.NailFriendly; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10 * Projectile.MaxUpdates; // 10 effective, 30 total } public override void AI() @@ -46,7 +47,6 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.Venom, 120); - target.immune[Projectile.owner] = 1; } public override void OnHitPvp(Player target, int damage, bool crit) diff --git a/Projectiles/Rogue/BlueFlamePillar.cs b/Projectiles/Rogue/BlueFlamePillar.cs index e78f8d08ce..294e622cd3 100644 --- a/Projectiles/Rogue/BlueFlamePillar.cs +++ b/Projectiles/Rogue/BlueFlamePillar.cs @@ -24,6 +24,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.tileCollide = false; Projectile.alpha = 255; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 20; } public override void AI() { diff --git a/Projectiles/Rogue/Brick.cs b/Projectiles/Rogue/Brick.cs index f9c684e74f..60591eaafb 100644 --- a/Projectiles/Rogue/Brick.cs +++ b/Projectiles/Rogue/Brick.cs @@ -41,11 +41,6 @@ namespace CalamityMod.Projectiles.Rogue public override void Kill(int timeLeft) { - if (Main.rand.NextBool(2)) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } - SoundEngine.PlaySound(SoundID.Item50, Projectile.position); //Dust on impact int dust_splash = 0; @@ -58,23 +53,23 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.ai[0] == 1) { int split = 0; - while (split < 3) + while (split < 5) { //Calculate the velocity of the projectile - float shardspeedX = -Projectile.velocity.X * Main.rand.NextFloat(.5f, .7f) + Main.rand.NextFloat(-3f, 3f); - float shardspeedY = -Projectile.velocity.Y * Main.rand.Next(50, 70) * 0.01f + Main.rand.Next(-8, 9) * 0.2f; + float shardspeedX = -Projectile.velocity.X * Main.rand.NextFloat(.1f, .15f) + Main.rand.NextFloat(-3f, 3f); + float shardspeedY = -Projectile.velocity.Y * Main.rand.NextFloat(.5f, .9f) + Main.rand.NextFloat(-6f, -3f); //Prevents the projectile speed from being too low - if (shardspeedX < 2f && shardspeedX > -2f) + if (shardspeedX < 1f && shardspeedX > -1f) { shardspeedX += -Projectile.velocity.X; } - if (shardspeedY > 2f && shardspeedY < 2f) + if (shardspeedY > -3f) { shardspeedY += -Projectile.velocity.Y; } //Spawn the projectile - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), Projectile.knockBack / 2f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack / 2f, Projectile.owner); split += 1; } } diff --git a/Projectiles/Rogue/CobaltKunaiProjectile.cs b/Projectiles/Rogue/CobaltKunaiProjectile.cs index 26a8af5ef7..347403306b 100644 --- a/Projectiles/Rogue/CobaltKunaiProjectile.cs +++ b/Projectiles/Rogue/CobaltKunaiProjectile.cs @@ -25,6 +25,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 600; AIType = ProjectileID.ThrowingKnife; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; } public override bool OnTileCollide(Vector2 oldVelocity) @@ -54,13 +56,5 @@ namespace CalamityMod.Projectiles.Rogue 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 Kill(int timeLeft) - { - if (Main.rand.NextBool(2)) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } - } } } diff --git a/Projectiles/Rogue/CrystalPiercerProjectile.cs b/Projectiles/Rogue/CrystalPiercerProjectile.cs index 9c05ca8c43..c20ae4ee78 100644 --- a/Projectiles/Rogue/CrystalPiercerProjectile.cs +++ b/Projectiles/Rogue/CrystalPiercerProjectile.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X + Main.rand.NextFloat(-15f, 15f), Projectile.Center.Y + Main.rand.NextFloat(-15f, 15f), Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X + Main.rand.NextFloat(-15f, 15f), Projectile.Center.Y + Main.rand.NextFloat(-15f, 15f), Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.7f), Projectile.knockBack * 0.7f, Projectile.owner, 0f, 0f); } } } @@ -72,10 +72,6 @@ namespace CalamityMod.Projectiles.Rogue { Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 173, Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f); } - if (Main.rand.NextBool(2)) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Rogue/CursedDaggerProj.cs b/Projectiles/Rogue/CursedDaggerProj.cs index 47ab20ce20..70fed5d718 100644 --- a/Projectiles/Rogue/CursedDaggerProj.cs +++ b/Projectiles/Rogue/CursedDaggerProj.cs @@ -26,6 +26,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 600; AIType = ProjectileID.ThrowingKnife; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 10; } @@ -38,12 +39,12 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.Calamity().stealthStrike) { - if (Projectile.timeLeft % 8 == 0) + if (Projectile.timeLeft % 6 == 0) { if (Projectile.owner == Main.myPlayer) { Vector2 velocity = new Vector2(Main.rand.NextFloat(-14f, 14f), Main.rand.NextFloat(-14f, 14f)); - int flame = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, Main.rand.NextBool(2) ? ProjectileID.CursedFlameFriendly : ProjectileID.CursedDartFlame, (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner); + int flame = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, Main.rand.NextBool(2) ? ProjectileID.CursedFlameFriendly : ProjectileID.CursedDartFlame, Projectile.damage, Projectile.knockBack, Projectile.owner); if (flame.WithinBounds(Main.maxProjectiles)) { Main.projectile[flame].DamageType = RogueDamageClass.Instance; diff --git a/Projectiles/Rogue/DesecratedWaterProj.cs b/Projectiles/Rogue/DesecratedWaterProj.cs index d4cd154fab..21a532dd5d 100644 --- a/Projectiles/Rogue/DesecratedWaterProj.cs +++ b/Projectiles/Rogue/DesecratedWaterProj.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue Dust dust2 = Main.dust[index3]; dust2.velocity = dust2.velocity * 3f; } - int num220 = (Projectile.Calamity().stealthStrike ? Main.rand.Next(10, 16) : Main.rand.Next(5, 11)); + int num220 = (Projectile.Calamity().stealthStrike ? 12 : 5); if (Projectile.owner == Main.myPlayer) { for (int num221 = 0; num221 < num220; num221++) @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 value17 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); value17.Normalize(); value17 *= (float)Main.rand.Next(10, 201) * 0.01f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, value17.X, value17.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), 1f, Projectile.owner, (Projectile.Calamity().stealthStrike ? 1f : 0f), 1f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, value17.X, value17.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.6), Projectile.knockBack * 0.6f, Projectile.owner, (Projectile.Calamity().stealthStrike ? 1f : 0f), 1f); } } } diff --git a/Projectiles/Rogue/DuneHopperProjectile.cs b/Projectiles/Rogue/DuneHopperProjectile.cs index fdba0d84ba..56c7f3e776 100644 --- a/Projectiles/Rogue/DuneHopperProjectile.cs +++ b/Projectiles/Rogue/DuneHopperProjectile.cs @@ -22,6 +22,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.penetrate = 6; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 20; } public override void AI() diff --git a/Projectiles/Rogue/DuststormCloud.cs b/Projectiles/Rogue/DuststormCloud.cs index 4a6305c026..c94b03f9ba 100644 --- a/Projectiles/Rogue/DuststormCloud.cs +++ b/Projectiles/Rogue/DuststormCloud.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.ignoreWater = true; - Projectile.timeLeft = 3600; + Projectile.timeLeft = 600; Projectile.DamageType = RogueDamageClass.Instance; Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 6; diff --git a/Projectiles/Rogue/EpidemicShredderProjectile.cs b/Projectiles/Rogue/EpidemicShredderProjectile.cs index d5b11a4893..481676e039 100644 --- a/Projectiles/Rogue/EpidemicShredderProjectile.cs +++ b/Projectiles/Rogue/EpidemicShredderProjectile.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.height = 34; Projectile.friendly = true; Projectile.penetrate = 6; - Projectile.timeLeft = 600; + Projectile.timeLeft = 180; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 40; Projectile.DamageType = RogueDamageClass.Instance; @@ -36,15 +36,15 @@ namespace CalamityMod.Projectiles.Rogue { Projectile.ai[0] -= 1f; } - if (Projectile.timeLeft < 580f) + if (Projectile.timeLeft < 160f) { Projectile.velocity = (Projectile.velocity * 18f + Projectile.SafeDirectionTo(Main.player[Projectile.owner].Center) * 18f) / 19f; if (Main.player[Projectile.owner].Hitbox.Intersects(Projectile.Hitbox)) Projectile.Kill(); } - if (Projectile.timeLeft % 5 == 0 && Projectile.Calamity().stealthStrike) + if (Projectile.timeLeft % 4 == 0 && Projectile.Calamity().stealthStrike) { - int projIndex2 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.velocity * -1f).RotatedByRandom(MathHelper.ToRadians(15f)), ModContent.ProjectileType(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner); + int projIndex2 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.velocity * -1f).RotatedByRandom(MathHelper.ToRadians(15f)), ModContent.ProjectileType(), (int)(Projectile.damage * 0.6), Projectile.knockBack * 0.6f, Projectile.owner); if (projIndex2.WithinBounds(Main.maxProjectiles)) Main.projectile[projIndex2].DamageType = RogueDamageClass.Instance; } @@ -62,13 +62,7 @@ namespace CalamityMod.Projectiles.Rogue { Projectile.velocity.Y = -oldVelocity.Y; } - if (Projectile.ai[0] == 0f) - { - int projIndex1 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner); - if (projIndex1.WithinBounds(Main.maxProjectiles)) - Main.projectile[projIndex1].DamageType = RogueDamageClass.Instance; - Projectile.ai[0] = 12f; //0.2th of a second cooldown - } + SpawnSeeker(); Projectile.penetrate--; } else @@ -79,26 +73,25 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - if (Projectile.ai[0] == 0f) - { - int projectileIndex = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner); - if (projectileIndex.WithinBounds(Main.maxProjectiles)) - Main.projectile[projectileIndex].DamageType = RogueDamageClass.Instance; - Projectile.ai[0] = 12f; //0.2th of a second cooldown - } + SpawnSeeker(); target.AddBuff(ModContent.BuffType(), 240); } public override void OnHitPvp(Player target, int damage, bool crit) + { + SpawnSeeker(); + target.AddBuff(ModContent.BuffType(), 240); + } + + public void SpawnSeeker() { if (Projectile.ai[0] == 0f) { - int projectileIndex = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25f), 2f, Projectile.owner); + int projectileIndex = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.6), Projectile.knockBack * 0.6f, Projectile.owner); if (projectileIndex.WithinBounds(Main.maxProjectiles)) Main.projectile[projectileIndex].DamageType = RogueDamageClass.Instance; Projectile.ai[0] = 12f; //0.2th of a second cooldown } - target.AddBuff(ModContent.BuffType(), 240); } } } diff --git a/Projectiles/Rogue/EquanimityProj.cs b/Projectiles/Rogue/EquanimityProj.cs index 8d972f34bb..1a32e1a104 100644 --- a/Projectiles/Rogue/EquanimityProj.cs +++ b/Projectiles/Rogue/EquanimityProj.cs @@ -49,10 +49,10 @@ namespace CalamityMod.Projectiles.Rogue Vector2 shardVelocity = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f)); shardVelocity.Normalize(); shardVelocity *= 5f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.15f), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.8f), 0f, Projectile.owner); if (Projectile.Calamity().stealthStrike) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.15f), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.8f), 0f, Projectile.owner); } } @@ -83,10 +83,10 @@ namespace CalamityMod.Projectiles.Rogue Vector2 shardVelocity = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f)); shardVelocity.Normalize(); shardVelocity *= 5f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.8f), 0f, Projectile.owner); if (Projectile.Calamity().stealthStrike) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.8f), 0f, Projectile.owner); } } } @@ -104,10 +104,10 @@ namespace CalamityMod.Projectiles.Rogue Vector2 shardVelocity = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f)); shardVelocity.Normalize(); shardVelocity *= 5f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.8f), 0f, Projectile.owner); if (Projectile.Calamity().stealthStrike) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1f), 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, -shardVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.8f), 0f, Projectile.owner); } } } diff --git a/Projectiles/Rogue/ExecutionersBladeProj.cs b/Projectiles/Rogue/ExecutionersBladeProj.cs index 58e1de0a12..6b99beab65 100644 --- a/Projectiles/Rogue/ExecutionersBladeProj.cs +++ b/Projectiles/Rogue/ExecutionersBladeProj.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Rogue SoundEngine.PlaySound(SoundID.Item73, Projectile.Center); for (int i = 0; i < 20; i++) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), new Vector2(position.X + (-600 + i * 60), position.Y - 800), new Vector2(0f, 2.5f), ModContent.ProjectileType(), (int)(Projectile.damage * 1.2f), Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), new Vector2(position.X + (-600 + i * 60), position.Y - 800), new Vector2(0f, 2.5f), ModContent.ProjectileType(), Projectile.damage * 4, Projectile.knockBack, Projectile.owner); } } } diff --git a/Projectiles/Rogue/ExorcismProj.cs b/Projectiles/Rogue/ExorcismProj.cs index a6ac8a8a9c..94be2b397c 100644 --- a/Projectiles/Rogue/ExorcismProj.cs +++ b/Projectiles/Rogue/ExorcismProj.cs @@ -109,18 +109,17 @@ namespace CalamityMod.Projectiles.Rogue //Crystal smash sound SoundEngine.PlaySound(SoundID.Item27, Projectile.Center); // Light burst - int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.8f), 0, Projectile.owner, Projectile.ai[0] - 1f, 0); + int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner, Projectile.ai[0] - 1f, 0); Main.projectile[p].rotation = Projectile.rotation; // Stars if (Projectile.Calamity().stealthStrike) { - int numStars = Main.rand.Next(4, 7); - for (int i = 0; i < numStars; i++) + for (int i = 0; i < 9; i++) { Vector2 pos = new Vector2(Projectile.Center.X + (float)Projectile.width * 0.5f + (float)Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); float speedX = (Projectile.Center.X - pos.X) / 20f; float speedY = (Projectile.Center.Y - pos.Y) / 20f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), pos.X, pos.Y, speedX, speedY, ModContent.ProjectileType(), Projectile.damage / 2, 3, Projectile.owner, Main.rand.NextFloat(-3f, 3f), 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), pos.X, pos.Y, speedX, speedY, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner, Main.rand.NextFloat(-3f, 3f), 0f); } } } diff --git a/Projectiles/Rogue/FeatherKnifeProjectile.cs b/Projectiles/Rogue/FeatherKnifeProjectile.cs index 9473f1e1bf..cb9bbb5db9 100644 --- a/Projectiles/Rogue/FeatherKnifeProjectile.cs +++ b/Projectiles/Rogue/FeatherKnifeProjectile.cs @@ -53,11 +53,5 @@ namespace CalamityMod.Projectiles.Rogue if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].DamageType = RogueDamageClass.Instance; } - - public override void Kill(int timeLeft) - { - if (Main.rand.NextBool(2) && !Projectile.noDropItem) - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } } } diff --git a/Projectiles/Rogue/GelDartProjectile.cs b/Projectiles/Rogue/GelDartProjectile.cs index 7669c1fe7a..ef1fe96d81 100644 --- a/Projectiles/Rogue/GelDartProjectile.cs +++ b/Projectiles/Rogue/GelDartProjectile.cs @@ -28,6 +28,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 600; AIType = ProjectileID.ThrowingKnife; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; } public override void AI() @@ -84,14 +86,6 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void Kill(int timeLeft) - { - if (Main.rand.NextBool(2)) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } - } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.Slimed, 120); diff --git a/Projectiles/Rogue/HeavenfallenEnergy.cs b/Projectiles/Rogue/HeavenfallenEnergy.cs index 36bff03fed..febb558ad8 100644 --- a/Projectiles/Rogue/HeavenfallenEnergy.cs +++ b/Projectiles/Rogue/HeavenfallenEnergy.cs @@ -9,6 +9,8 @@ namespace CalamityMod.Projectiles.Rogue { public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public bool raining => Projectile.ai[1] == 0f; + public override void SetStaticDefaults() { DisplayName.SetDefault("Heavenfallen Energy"); @@ -29,7 +31,7 @@ namespace CalamityMod.Projectiles.Rogue { int num154 = 14; int coolDust; - Projectile.ai[0] += 1; + Projectile.ai[0]++; if (Projectile.ai[0] % 2 == 0) { if (Projectile.ai[0] % 4 == 0) @@ -44,16 +46,17 @@ namespace CalamityMod.Projectiles.Rogue Main.dust[coolDust].velocity *= 0.1f; Main.dust[coolDust].velocity += Projectile.velocity * 0.5f; } + + float homingRange = raining ? 480f : 240f; + + if (Projectile.ai[0] >= 15f || raining) + CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, homingRange, 12f, 20f); } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 180); - } - - public override void OnHitPvp(Player target, int damage, bool crit) - { - target.AddBuff(ModContent.BuffType(), 180); - } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => target.AddBuff(ModContent.BuffType(), 180); + + public override void OnHitPvp(Player target, int damage, bool crit) => target.AddBuff(ModContent.BuffType(), 180); + + public override bool? CanDamage() => Projectile.ai[0] >= 15f || raining; } } diff --git a/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs b/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs index 34b6f673d8..c58af9ae7b 100644 --- a/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs +++ b/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs @@ -12,8 +12,7 @@ namespace CalamityMod.Projectiles.Rogue public class HeavenfallenStardiskBoomerang : ModProjectile { public override string Texture => "CalamityMod/Items/Weapons/Rogue/HeavenfallenStardisk"; - - private bool explode = false; + public Player Owner => Main.player[Projectile.owner]; public override void SetStaticDefaults() { @@ -31,29 +30,14 @@ namespace CalamityMod.Projectiles.Rogue Projectile.ignoreWater = true; Projectile.netImportant = true; Projectile.penetrate = 1; - Projectile.timeLeft = 600; + Projectile.timeLeft = 300; Projectile.DamageType = RogueDamageClass.Instance; } public override void AI() { - Player player = Main.player[Projectile.owner]; - - if (Projectile.Calamity().stealthStrike) - { - if (Projectile.timeLeft % 5f == 0f) //every 5 ticks - { - var source = Projectile.GetSource_FromThis(); - if (Main.rand.NextBool(2)) - { - int energyAmt = Main.rand.Next(1, 4); //1 to 3 energy - for (int n = 0; n < energyAmt; n++) - { - CalamityUtils.ProjectileRain(source, Projectile.Center, 400f, 100f, 500f, 800f, 29f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner); - } - } - } - } + if (Projectile.Calamity().stealthStrike && Projectile.timeLeft % 5f == 4f) // every 5 frames + CalamityUtils.ProjectileRain(Projectile.GetSource_FromThis(), Projectile.Center, 400f, 100f, 500f, 800f, 29f, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner); if (Projectile.alpha > 0) { @@ -79,21 +63,19 @@ namespace CalamityMod.Projectiles.Rogue Projectile.rotation += 0.5f; - if (player.position.Y != player.oldPosition.Y && Projectile.ai[0] == 0f) - { - explode = true; - } + if (Owner.position.Y != Owner.oldPosition.Y && Projectile.ai[0] == 0f) + Projectile.ai[1]++; - Projectile.ai[0] += 1f; + Projectile.ai[0]++; if (Main.myPlayer == Projectile.owner && Projectile.ai[0] == 20f) { - if (player.channel) + if (Owner.channel) { float num115 = 20f; float num116 = (float)Main.mouseX + Main.screenPosition.X - Projectile.Center.X; float num117 = (float)Main.mouseY + Main.screenPosition.Y - Projectile.Center.Y; - if (player.gravDir == -1f) + if (Owner.gravDir == -1f) { num117 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - Projectile.Center.Y; } @@ -135,14 +117,14 @@ namespace CalamityMod.Projectiles.Rogue Vector2 vector11 = Projectile.Center; float num128 = (float)Main.mouseX + Main.screenPosition.X - vector11.X; float num129 = (float)Main.mouseY + Main.screenPosition.Y - vector11.Y; - if (player.gravDir == -1f) + if (Owner.gravDir == -1f) { num129 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector11.Y; } float num130 = (float)Math.Sqrt((double)(num128 * num128 + num129 * num129)); if (num130 == 0f || Projectile.ai[0] < 0f) { - vector11 = player.Center; + vector11 = Owner.Center; num128 = Projectile.Center.X - vector11.X; num129 = Projectile.Center.Y - vector11.Y; num130 = (float)Math.Sqrt((double)(num128 * num128 + num129 * num129)); @@ -168,8 +150,6 @@ namespace CalamityMod.Projectiles.Rogue public override void Kill(int timeLeft) { - Player player = Main.player[Projectile.owner]; - SoundEngine.PlaySound(SoundID.Item10, Projectile.position); for (int i = 0; i < 10; i++) { @@ -183,21 +163,13 @@ namespace CalamityMod.Projectiles.Rogue Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; } - - if (explode && player.position.Y != player.oldPosition.Y) + + if (Projectile.owner == Main.myPlayer && Projectile.ai[1] > 0) { - if (Projectile.owner == Main.myPlayer) + for (int i = 0; i < 5; i++) { - float spread = 45f * 0.0174f; - double startAngle = Math.Atan2(Projectile.velocity.X, Projectile.velocity.Y) - spread / 2; - double deltaAngle = spread / 8f; - double offsetAngle; - for (int i = 0; i < 4; i++) - { - offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 0f, 0f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.4), Projectile.knockBack * 0.4f, Projectile.owner, 0f, 0f); - } + Vector2 velocity = ((MathHelper.TwoPi * i / 5f) - MathHelper.PiOver2).ToRotationVector2() * 4f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 1f); } } } diff --git a/Projectiles/Rogue/Honeycomb.cs b/Projectiles/Rogue/Honeycomb.cs index 92ac307791..cb98f49956 100644 --- a/Projectiles/Rogue/Honeycomb.cs +++ b/Projectiles/Rogue/Honeycomb.cs @@ -43,26 +43,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool OnTileCollide(Vector2 oldVelocity) { - int split = 0; - while (split < 3) - { - //Calculate the velocity of the projectile - float shardspeedX = -Projectile.velocity.X * Main.rand.NextFloat(.5f, .7f) + Main.rand.NextFloat(-3f, 3f); - float shardspeedY = -Projectile.velocity.Y * Main.rand.Next(50, 70) * 0.01f + Main.rand.Next(-8, 9) * 0.2f; - //Prevents the projectile speed from being too low - if (shardspeedX < 2f && shardspeedX > -2f) - { - shardspeedX += -Projectile.velocity.X; - } - if (shardspeedY > 2f && shardspeedY < 2f) - { - shardspeedY += -Projectile.velocity.Y; - } - - //Spawn the projectile - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), 2f, Projectile.owner, Main.rand.Next(3), 0f); - split += 1; - } + SpawnFragments(); Projectile.penetrate--; if (Projectile.penetrate <= 0) { @@ -84,36 +65,22 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { + SpawnFragments(); Projectile.velocity.X = -Projectile.velocity.X; Projectile.velocity.Y = -Projectile.velocity.Y; - int split = 0; - while (split < 3) - { - //Calculate the velocity of the projectile - float shardspeedX = -Projectile.velocity.X * Main.rand.NextFloat(.5f, .7f) + Main.rand.NextFloat(-3f, 3f); - float shardspeedY = -Projectile.velocity.Y * Main.rand.Next(50, 70) * 0.01f + Main.rand.Next(-8, 9) * 0.2f; - //Prevents the projectile speed from being too low - if (shardspeedX < 2f && shardspeedX > -2f) - { - shardspeedX += -Projectile.velocity.X; - } - if (shardspeedY > 2f && shardspeedY < 2f) - { - shardspeedY += -Projectile.velocity.Y; - } - - //Spawn the projectile - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), 2f, Projectile.owner, Main.rand.Next(3), 0f); - split += 1; - } } public override void OnHitPvp(Player target, int damage, bool crit) { + SpawnFragments(); Projectile.velocity.X = -Projectile.velocity.X; Projectile.velocity.Y = -Projectile.velocity.Y; + } + + public void SpawnFragments() + { int split = 0; - while (split < 3) + while (split < 2) { //Calculate the velocity of the projectile float shardspeedX = -Projectile.velocity.X * Main.rand.NextFloat(.5f, .7f) + Main.rand.NextFloat(-3f, 3f); @@ -129,7 +96,7 @@ namespace CalamityMod.Projectiles.Rogue } //Spawn the projectile - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3), 2f, Projectile.owner, Main.rand.Next(3), 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.position.X + shardspeedX, Projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, Main.rand.Next(3), 0f); split += 1; } } @@ -151,10 +118,6 @@ namespace CalamityMod.Projectiles.Rogue Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 9, -Projectile.velocity.X * 0.15f, -Projectile.velocity.Y * 0.15f, 159, default, 1.5f); dust_splash += 1; } - if (Main.rand.NextBool(2)) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } } } } diff --git a/Projectiles/Rogue/IceStarProjectile.cs b/Projectiles/Rogue/IceStarProjectile.cs index 8b7fc2ded3..982b622291 100644 --- a/Projectiles/Rogue/IceStarProjectile.cs +++ b/Projectiles/Rogue/IceStarProjectile.cs @@ -1,7 +1,5 @@ using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -27,10 +25,13 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.penetrate = 3; Projectile.aiStyle = ProjAIStyleID.ThrownProjectile; - Projectile.timeLeft = 280; AIType = ProjectileID.ThrowingKnife; Projectile.DamageType = RogueDamageClass.Instance; Projectile.coldDamage = true; + Projectile.MaxUpdates = 2; + Projectile.timeLeft = 60 * Projectile.MaxUpdates; //60 effective, 120 total + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 30 * Projectile.MaxUpdates; //30 effective, 60 total } public override void AI() @@ -38,14 +39,14 @@ namespace CalamityMod.Projectiles.Rogue if (!initStealth && Projectile.Calamity().stealthStrike) { Projectile.penetrate = -1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 9; Projectile.tileCollide = false; + Projectile.timeLeft = 90 * Projectile.MaxUpdates; initialVelocity = Projectile.velocity; initStealth = true; } - Projectile.rotation += 0.5f; + //Projectile.rotation = Projectile.velocity.ToRotation(); + if (Main.rand.NextBool(3)) { Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 67, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f); @@ -72,18 +73,11 @@ namespace CalamityMod.Projectiles.Rogue if (homeIn) { Vector2 moveDirection = Projectile.SafeDirectionTo(center, Vector2.UnitY); - Projectile.velocity = (Projectile.velocity * 20f + moveDirection * 14f) / (21f); + Projectile.velocity = (Projectile.velocity * 20f + moveDirection * 14f) / 21f; } Projectile.velocity = initStealth && !homeIn ? initialVelocity : Projectile.velocity; } - 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 Kill(int timeLeft) { SoundEngine.PlaySound(SoundID.Item27, Projectile.position); @@ -93,52 +87,18 @@ namespace CalamityMod.Projectiles.Rogue } } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => OnHitEffects(); + + public override void OnHitPvp(Player target, int damage, bool crit) => OnHitEffects(); + + public void OnHitEffects() { - if (initStealth) - { - if (Projectile.owner == Main.myPlayer && Main.player[Projectile.owner].ownedProjectileCounts[ModContent.ProjectileType()] < 15) + if (initStealth && Projectile.owner == Main.myPlayer && Projectile.numHits < 1) + { + for (int i = 0; i < 8; i++) { - float spread = 45f * 0.0174f; - double startAngle = Math.Atan2(Projectile.velocity.X, Projectile.velocity.Y) - spread / 2; - double deltaAngle = spread / 8f; - double offsetAngle; - int i; - for (i = 0; i < 4; i++) - { - offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f), - ModContent.ProjectileType(), Projectile.damage / 8, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); - - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f), - ModContent.ProjectileType(), Projectile.damage / 8, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); - } - } - } - } - - public override void OnHitPvp(Player target, int damage, bool crit) - { - if (initStealth) - { - if (Projectile.owner == Main.myPlayer && Main.player[Projectile.owner].ownedProjectileCounts[ModContent.ProjectileType()] < 15) - { - float spread = 45f * 0.0174f; - double startAngle = Math.Atan2(Projectile.velocity.X, Projectile.velocity.Y) - spread / 2; - double deltaAngle = spread / 8f; - double offsetAngle; - int i; - for (i = 0; i < 4; i++) - { - offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f), - ModContent.ProjectileType(), Projectile.damage / 8, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); - - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f), - ModContent.ProjectileType(), Projectile.damage / 8, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f); - } + Vector2 velocity = (MathHelper.TwoPi * i / 8f).ToRotationVector2() * 4f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); } } } diff --git a/Projectiles/Rogue/IchorSpearProj.cs b/Projectiles/Rogue/IchorSpearProj.cs index d6becf3209..52364bab02 100644 --- a/Projectiles/Rogue/IchorSpearProj.cs +++ b/Projectiles/Rogue/IchorSpearProj.cs @@ -27,6 +27,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 600; AIType = ProjectileID.BoneJavelin; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 10; } @@ -44,12 +45,12 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.Calamity().stealthStrike) { - if (Projectile.timeLeft % 8 == 0) + if (Projectile.timeLeft % 6 == 0) { if (Projectile.owner == Main.myPlayer) { Vector2 velocity = new Vector2(Main.rand.NextFloat(-14f, 14f), Main.rand.NextFloat(-14f, 14f)); - int ichor = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, Main.rand.NextBool(2) ? ProjectileID.GoldenShowerFriendly : ProjectileID.IchorSplash, (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner); + int ichor = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, Main.rand.NextBool(2) ? ProjectileID.GoldenShowerFriendly : ProjectileID.IchorSplash, Projectile.damage, Projectile.knockBack, Projectile.owner); if (ichor.WithinBounds(Main.maxProjectiles)) { Main.projectile[ichor].DamageType = RogueDamageClass.Instance; diff --git a/Projectiles/Rogue/InfernalKrisProjectile.cs b/Projectiles/Rogue/InfernalKrisProjectile.cs index 61f01f7de2..a2fca994dd 100644 --- a/Projectiles/Rogue/InfernalKrisProjectile.cs +++ b/Projectiles/Rogue/InfernalKrisProjectile.cs @@ -165,11 +165,6 @@ namespace CalamityMod.Projectiles.Rogue public override void Kill(int timeLeft) { - if (Main.rand.Next(4) == 0) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } - if (Projectile.Calamity().stealthStrike) { int sparkCount = Main.rand.Next(3, 7); diff --git a/Projectiles/Rogue/IronFranciscaProj.cs b/Projectiles/Rogue/IronFranciscaProj.cs index 05edbd1e86..bb10e241f2 100644 --- a/Projectiles/Rogue/IronFranciscaProj.cs +++ b/Projectiles/Rogue/IronFranciscaProj.cs @@ -28,6 +28,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = 2; Projectile.timeLeft = 600; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; } public override void AI() @@ -47,7 +49,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.damage *= 2; } Projectile.ai[0]++; - if (Projectile.ai[0] == 10) + if (Projectile.ai[0] == 15) { Projectile.damage /= 2; } @@ -62,14 +64,6 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void Kill(int timeLeft) - { - if (Main.rand.Next(4) == 0) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } - } - public override bool OnTileCollide(Vector2 oldVelocity) { Collision.HitTiles(Projectile.position + Projectile.velocity, Projectile.velocity, Projectile.width, Projectile.height); diff --git a/Projectiles/Rogue/KelvinCatalystBoomerang.cs b/Projectiles/Rogue/KelvinCatalystBoomerang.cs index b0f9349b15..b511b3a4e5 100644 --- a/Projectiles/Rogue/KelvinCatalystBoomerang.cs +++ b/Projectiles/Rogue/KelvinCatalystBoomerang.cs @@ -28,9 +28,11 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.penetrate = -1; - Projectile.extraUpdates = 1; + Projectile.MaxUpdates = 2; Projectile.DamageType = RogueDamageClass.Instance; Projectile.coldDamage = true; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 20 * Projectile.MaxUpdates; //20 effective, 40 total } public override void SendExtraAI(BinaryWriter writer) @@ -67,9 +69,9 @@ namespace CalamityMod.Projectiles.Rogue break; case 2: // Will target the targetted NPC that minions use btw - Projectile.ChargingMinionAI(1200f, 1500f, 2200f, 150f, 0, 40f, 9f, 4f, new Vector2(0f, -60f), 40f, 9f, true, true); + Projectile.ChargingMinionAI(1200f, 1500f, 2200f, 150f, 1, 40f, 12f, 6f, new Vector2(0f, -60f), 40f, 12f, true, true); Projectile.localAI[0] += 1f; - if (Projectile.localAI[0] >= 120) + if (Projectile.localAI[0] >= 180) { ResetStats(false); } @@ -129,7 +131,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.soundDelay == 0) { Projectile.soundDelay = 8; - SoundEngine.PlaySound(SoundID.Item7, Projectile.position); + SoundEngine.PlaySound(SoundID.Item7, Projectile.Center); } int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 67, 0f, 0f, 100, default, 1f); @@ -172,23 +174,16 @@ namespace CalamityMod.Projectiles.Rogue private void OnHitEffects() { - int projType = ModContent.ProjectileType(); - if (Projectile.owner == Main.myPlayer && Main.player[Projectile.owner].ownedProjectileCounts[projType] < 25) - { - float spread = 45f * 0.0174f; - double startAngle = Math.Atan2(Projectile.velocity.X, Projectile.velocity.Y) - spread / 2; - double deltaAngle = spread / 8f; - double offsetAngle; - for (int i = 0; i < 4; i++) + int maxSpawns = Projectile.Calamity().stealthStrike ? 3 : 1; + if (Projectile.owner == Main.myPlayer && Projectile.numHits < maxSpawns) + { + for (int i = 0; i < 5; i++) { - offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f), projType, Projectile.damage / 6, Projectile.knockBack * 0.5f, Projectile.owner); - - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f), projType, Projectile.damage / 6, Projectile.knockBack * 0.5f, Projectile.owner); + Vector2 velocity = (MathHelper.TwoPi * i / 5f).ToRotationVector2() * 4f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner); } + SoundEngine.PlaySound(SoundID.Item30, Projectile.Center); } - SoundEngine.PlaySound(SoundID.Item30, Projectile.position); } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Rogue/LeadTomahawkProj.cs b/Projectiles/Rogue/LeadTomahawkProj.cs index e52a3b0f56..09d67a6cf6 100644 --- a/Projectiles/Rogue/LeadTomahawkProj.cs +++ b/Projectiles/Rogue/LeadTomahawkProj.cs @@ -28,6 +28,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = 2; Projectile.timeLeft = 600; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; } public override void AI() @@ -47,7 +49,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.damage *= 2; } Projectile.ai[0]++; - if (Projectile.ai[0] == 10) + if (Projectile.ai[0] == 15) { Projectile.damage /= 2; } @@ -62,14 +64,6 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void Kill(int timeLeft) - { - if (Main.rand.Next(4) == 0) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } - } - public override bool OnTileCollide(Vector2 oldVelocity) { Collision.HitTiles(Projectile.position + Projectile.velocity, Projectile.velocity, Projectile.width, Projectile.height); diff --git a/Projectiles/Rogue/MonkeyDart.cs b/Projectiles/Rogue/MonkeyDart.cs index ee83ac5fb0..40a886d96a 100644 --- a/Projectiles/Rogue/MonkeyDart.cs +++ b/Projectiles/Rogue/MonkeyDart.cs @@ -62,12 +62,6 @@ namespace CalamityMod.Projectiles.Rogue Main.dust[d].position = Projectile.Center; dustsplash += 1; } - - //Randomly not consume item if it wasnt a stealth strike - if (Main.rand.Next(4) == 0 && Projectile.ai[0] != 1) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, 27, 27, ModContent.ItemType()); - } } public override bool OnTileCollide(Vector2 oldVelocity) diff --git a/Projectiles/Rogue/MythrilKnifeProjectile.cs b/Projectiles/Rogue/MythrilKnifeProjectile.cs index e926f54fac..9519b9c947 100644 --- a/Projectiles/Rogue/MythrilKnifeProjectile.cs +++ b/Projectiles/Rogue/MythrilKnifeProjectile.cs @@ -77,22 +77,14 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void Kill(int timeLeft) - { - if (Main.rand.NextBool(2)) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } - } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { if (!Projectile.Calamity().stealthStrike) return; - target.AddBuff(BuffID.Poisoned, 300); - target.AddBuff(BuffID.Venom, 120); - target.AddBuff(ModContent.BuffType(), 60); + target.AddBuff(BuffID.Poisoned, 480); + target.AddBuff(BuffID.Venom, 480); + target.AddBuff(ModContent.BuffType(), 480); } public override void OnHitPvp(Player target, int damage, bool crit) @@ -100,9 +92,9 @@ namespace CalamityMod.Projectiles.Rogue if (!Projectile.Calamity().stealthStrike) return; - target.AddBuff(BuffID.Poisoned, 300); - target.AddBuff(BuffID.Venom, 120); - target.AddBuff(ModContent.BuffType(), 60); + target.AddBuff(BuffID.Poisoned, 480); + target.AddBuff(BuffID.Venom, 480); + target.AddBuff(ModContent.BuffType(), 480); } } } diff --git a/Projectiles/Rogue/NastyChollaBol.cs b/Projectiles/Rogue/NastyChollaBol.cs index 82e875af31..0c1ad9de79 100644 --- a/Projectiles/Rogue/NastyChollaBol.cs +++ b/Projectiles/Rogue/NastyChollaBol.cs @@ -91,7 +91,8 @@ namespace CalamityMod.Projectiles.Rogue for (int n = 0; n < needleAmt; n++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - int damage = (int)player.GetTotalDamage().ApplyTo(0.25f * NastyCholla.BaseDamage); + // Since damage is reset on stick, this needs new damage calculations or stored damage in some way. + int damage = Projectile.Calamity().stealthStrike ? Projectile.originalDamage / 2 : (int)player.GetTotalDamage().ApplyTo(0.5f * NastyCholla.BaseDamage); Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), damage, 0f, Projectile.owner, 0f, 0f); } } diff --git a/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs b/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs index 1630b98085..92ab7037fc 100644 --- a/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs +++ b/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs @@ -1,5 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -22,10 +21,11 @@ namespace CalamityMod.Projectiles.Rogue Projectile.height = 12; Projectile.friendly = true; Projectile.aiStyle = ProjAIStyleID.ThrownProjectile; - Projectile.penetrate = 5; - Projectile.timeLeft = 600; + Projectile.penetrate = 4; + Projectile.timeLeft = 360; AIType = ProjectileID.ThrowingKnife; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 10; } @@ -89,13 +89,5 @@ namespace CalamityMod.Projectiles.Rogue Main.projectile[petal].DamageType = RogueDamageClass.Instance; } } - - public override void Kill(int timeLeft) - { - if (Main.rand.NextBool(2)) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } - } } } diff --git a/Projectiles/Rogue/PalladiumJavelinProjectile.cs b/Projectiles/Rogue/PalladiumJavelinProjectile.cs index 49470f1369..cd005f0330 100644 --- a/Projectiles/Rogue/PalladiumJavelinProjectile.cs +++ b/Projectiles/Rogue/PalladiumJavelinProjectile.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Rogue if (!Projectile.Calamity().stealthStrike || Projectile.owner != Main.myPlayer || Projectile.Calamity().lineColor >= 2) return; Projectile.localAI[0]++; - if (Projectile.localAI[0] >= 30f) + if (Projectile.localAI[0] >= 15f) { Vector2 vector2 = new Vector2(20f, 20f); for (int index1 = 0; index1 < 10; ++index1) @@ -75,12 +75,13 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void Kill(int timeLeft) + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => OnHitEffects(); + public override void OnHitPvp(Player target, int damage, bool crit) => OnHitEffects(); + + public void OnHitEffects() { - if (Main.rand.NextBool(2) && !Projectile.Calamity().stealthStrike) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } + if (Projectile.owner == Main.myPlayer && Projectile.Calamity().stealthStrike) + Main.player[Projectile.owner].AddBuff(BuffID.RapidHealing, 300); } } } diff --git a/Projectiles/Rogue/PrismallineProj.cs b/Projectiles/Rogue/PrismallineProj.cs index a2f4e21a81..5eb37f06d7 100644 --- a/Projectiles/Rogue/PrismallineProj.cs +++ b/Projectiles/Rogue/PrismallineProj.cs @@ -30,6 +30,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 180; AIType = ProjectileID.BoneJavelin; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; } public override void AI() @@ -50,19 +52,18 @@ namespace CalamityMod.Projectiles.Rogue Vector2 velocity = CalamityUtils.RandomVelocity(50f, 30f, 60f, 0.2f); if (numSpecProj < 2 && !hitEnemy) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 1.1), Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); ++numSpecProj; } else { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); } } } else //stealth strike { - int shardCount = Main.rand.Next(2,5); - for (int num252 = 0; num252 < shardCount; num252++) + for (int num252 = 0; num252 < 5; num252++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); int shard = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 2, 0f, Projectile.owner); @@ -76,7 +77,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < numProj + 1; i++) { Vector2 velocity = CalamityUtils.RandomVelocity(50f, 30f, 60f, 0.2f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 1.15), Projectile.knockBack, Projectile.owner, 1f, 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 1f, 0f); } } } @@ -99,8 +100,7 @@ namespace CalamityMod.Projectiles.Rogue } if (Projectile.Calamity().stealthStrike) { - int shardCount = Main.rand.Next(1,4); - for (int s = 0; s < shardCount; s++) + for (int s = 0; s < 5; s++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); int shard = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 2, 0f, Projectile.owner); diff --git a/Projectiles/Rogue/RadiantExplosion.cs b/Projectiles/Rogue/RadiantExplosion.cs index f7830aea92..9102eb6779 100644 --- a/Projectiles/Rogue/RadiantExplosion.cs +++ b/Projectiles/Rogue/RadiantExplosion.cs @@ -31,6 +31,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = -1; Projectile.timeLeft = 10; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 35; // Hits 3 times when stealth } public override void AI() @@ -114,10 +116,10 @@ namespace CalamityMod.Projectiles.Rogue int projType = Utils.SelectRandom(Main.rand, new int[] { ModContent.ProjectileType(), - ProjectileID.HallowStar, + ProjectileID.StarCloakStar, ModContent.ProjectileType() }); - Projectile star = CalamityUtils.ProjectileRain(source, targetPos, 400f, 100f, 500f, 800f, 25f, projType, (int)(Projectile.damage * 0.75), 5f, Projectile.owner); + Projectile star = CalamityUtils.ProjectileRain(source, targetPos, 400f, 100f, 500f, 800f, 25f, projType, (int)(Projectile.damage * 0.75), Projectile.knockBack * 0.75f, Projectile.owner); if (star.whoAmI.WithinBounds(Main.maxProjectiles)) { star.DamageType = RogueDamageClass.Instance; diff --git a/Projectiles/Rogue/RadiantStarKnife.cs b/Projectiles/Rogue/RadiantStarKnife.cs index 9c8c4c4ebd..a45bf1c10a 100644 --- a/Projectiles/Rogue/RadiantStarKnife.cs +++ b/Projectiles/Rogue/RadiantStarKnife.cs @@ -29,6 +29,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = 4; Projectile.timeLeft = 300; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; } public override void AI() @@ -73,7 +75,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.ai[1] += 1f; if (Projectile.ai[1] == 25f) { - int numProj = Projectile.Calamity().stealthStrike ? 5 : 3; + int numProj = Projectile.Calamity().stealthStrike ? 7 : 3; float rotation = MathHelper.ToRadians(50); if (Projectile.owner == Main.myPlayer) { @@ -86,12 +88,12 @@ namespace CalamityMod.Projectiles.Rogue } speed.Normalize(); speed *= (float)Main.rand.Next(30, 61) * 0.1f * 2.5f; - int stabber2 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner, + int stabber2 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, Projectile.ai[0] == 1f ? 1f : 0f, 0f); Main.projectile[stabber2].Calamity().stealthStrike = Projectile.Calamity().stealthStrike; } SoundEngine.PlaySound(SoundID.Item14, Projectile.position); - int boomer = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75f), Projectile.knockBack, Projectile.owner); + int boomer = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); if (Projectile.Calamity().stealthStrike && boomer.WithinBounds(Main.maxProjectiles)) { Main.projectile[boomer].Calamity().stealthStrike = true; diff --git a/Projectiles/Rogue/RotBallProjectile.cs b/Projectiles/Rogue/RotBallProjectile.cs index 399380c5c9..43afdb458d 100644 --- a/Projectiles/Rogue/RotBallProjectile.cs +++ b/Projectiles/Rogue/RotBallProjectile.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 600; AIType = ProjectileID.ThrowingKnife; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 10; } @@ -35,14 +36,6 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void Kill(int timeLeft) - { - if (Main.rand.NextBool(2)) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } - } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { if (Projectile.owner == Main.myPlayer && Projectile.Calamity().stealthStrike) diff --git a/Projectiles/Rogue/ShinobiBladeProjectile.cs b/Projectiles/Rogue/ShinobiBladeProjectile.cs index ddb19281ca..dfdead1f7b 100644 --- a/Projectiles/Rogue/ShinobiBladeProjectile.cs +++ b/Projectiles/Rogue/ShinobiBladeProjectile.cs @@ -3,7 +3,6 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Projectiles.Rogue { @@ -24,6 +23,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.penetrate = 1; Projectile.timeLeft = 300; + Projectile.MaxUpdates = 5; Projectile.DamageType = RogueDamageClass.Instance; } @@ -39,14 +39,6 @@ namespace CalamityMod.Projectiles.Rogue } } - public override bool OnTileCollide(Vector2 oldVelocity) - { - Collision.HitTiles(Projectile.position + Projectile.velocity, Projectile.velocity, Projectile.width, Projectile.height); - SoundEngine.PlaySound(SoundID.Dig, Projectile.position); - Projectile.Kill(); - return false; - } - public override bool PreDraw(ref Color lightColor) { CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); @@ -54,7 +46,20 @@ namespace CalamityMod.Projectiles.Rogue } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { + { + NPC firstTarget = Main.npc[(int)Projectile.ai[0]]; + + // 7 hits total + if (Projectile.Calamity().stealthStrike && Projectile.ai[1] <= 7f && (Projectile.ai[1] == 0f || firstTarget != null)) + { + Vector2 targetPos = Projectile.ai[1] == 0f ? target.Center : firstTarget.Center; + Vector2 offset = Vector2.UnitX.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(80f, 120f); + Vector2 eVelocity = Vector2.UnitX.RotatedBy(offset.ToRotation() + MathHelper.Pi) * 4f; + int realTarget = Projectile.ai[1] == 0f ? target.whoAmI : firstTarget.whoAmI; + Projectile echo = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), targetPos + offset, eVelocity, Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner, realTarget, Projectile.ai[1] + 1); + echo.Calamity().stealthStrike = true; + } + if (target.life <= 0) CalamityGlobalProjectile.SpawnLifeStealProjectile(Projectile, Main.player[Projectile.owner], 10, ModContent.ProjectileType(), 1200f, 0f); } diff --git a/Projectiles/Rogue/SludgeSplotchProj1.cs b/Projectiles/Rogue/SludgeSplotchProj1.cs index d4b45fa56d..0b83fe54d5 100644 --- a/Projectiles/Rogue/SludgeSplotchProj1.cs +++ b/Projectiles/Rogue/SludgeSplotchProj1.cs @@ -1,5 +1,4 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -9,6 +8,7 @@ namespace CalamityMod.Projectiles.Rogue { public class SludgeSplotchProj1 : ModProjectile { + public static int sludgeDustType = 191; public override void SetStaticDefaults() { DisplayName.SetDefault("Sludge Splotch"); @@ -16,8 +16,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - Projectile.width = 10; - Projectile.height = 10; + Projectile.width = Projectile.height = 14; Projectile.friendly = true; Projectile.penetrate = 1; Projectile.timeLeft = 300; @@ -27,105 +26,45 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { Projectile.velocity.Y += 0.1f; - if (Projectile.velocity.Y >= 16f) - { + if (Projectile.velocity.Y > 16f) Projectile.velocity.Y = 16f; - } - Projectile.rotation = Projectile.velocity.ToRotation() + (Projectile.spriteDirection == 1 ? 0f : MathHelper.Pi); + Projectile.rotation = Projectile.velocity.ToRotation(); int numDust = 2; for (int i = 0; i < numDust; i++) { - int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 191, 0f, 0f, 225, new Color(255, 255, 255), 3); + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, sludgeDustType, 0f, 0f, 225, new Color(255, 255, 255), 3); Main.dust[dust].noGravity = true; Main.dust[dust].noLight = true; Main.dust[dust].velocity = Main.dust[dust].velocity * 0.25f; } } - public override bool OnTileCollide(Vector2 oldVelocity) - { - if (Projectile.Calamity().stealthStrike) - { - Projectile.ai[0] = 0; - Projectile.ai[1] = 0; + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => target.AddBuff(BuffID.Slimed, 120); - if (Projectile.velocity.X != oldVelocity.X) - { - if (oldVelocity.X < 0) - { - Projectile.ai[0] = 1; - } - if (oldVelocity.X > 0) - { - Projectile.ai[0] = -1; - } - } - if (Projectile.velocity.Y != oldVelocity.Y) - { - if (oldVelocity.Y < 0) - { - Projectile.ai[1] = 1; - } - if (oldVelocity.Y > 0) - { - Projectile.ai[1] = -1; - } - } - } - - Collision.HitTiles(Projectile.position + Projectile.velocity, Projectile.velocity, Projectile.width, Projectile.height); - SoundEngine.PlaySound(SoundID.Dig, Projectile.position); - SoundEngine.PlaySound(SoundID.NPCDeath9 with { Volume = SoundID.NPCDeath9.Volume * 2f }, Projectile.position); - Projectile.Kill(); - return false; - } - - 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(BuffID.Slimed, 120); - SoundEngine.PlaySound(SoundID.NPCDeath9 with { Volume = SoundID.NPCDeath9.Volume * 2 }, Projectile.position); - } - - public override void OnHitPvp(Player target, int damage, bool crit) - { - target.AddBuff(BuffID.Slimed, 120); - SoundEngine.PlaySound(SoundID.NPCDeath9 with { Volume = SoundID.NPCDeath9.Volume * 2 }, Projectile.position); - } + public override void OnHitPvp(Player target, int damage, bool crit) => target.AddBuff(BuffID.Slimed, 120); public override void Kill(int timeLeft) { if (Projectile.Calamity().stealthStrike) { - int sparkCount = Main.rand.Next(3, 6); - for (int i = 0; i < sparkCount; i++) + for (int i = 0; i < 3; i++) { - int sparkScatter = 1; - Vector2 sparkVelocity = new Vector2(Main.rand.NextFloat(-sparkScatter, sparkScatter), Main.rand.NextFloat(-sparkScatter - 2, sparkScatter + 2)); - - sparkVelocity.Normalize(); - sparkVelocity *= 7; - - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, sparkVelocity, ModContent.ProjectileType(), 7, 0, Projectile.owner, 0, 0); + Vector2 sparkVelocity = CalamityUtils.RandomVelocity(100f, 40f, 60f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, sparkVelocity, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); } } + SoundEngine.PlaySound(SoundID.NPCDeath9 with { Volume = SoundID.NPCDeath9.Volume * 2 }, Projectile.position); + int numDust = 20; - int dustType = 191; float spread = 3f; for (int i = 0; i < numDust; i++) { Vector2 velocity = Projectile.velocity + new Vector2(Main.rand.NextFloat(-spread, spread), Main.rand.NextFloat(-spread, spread)); - int dust = Dust.NewDust(Projectile.Center, 1, 1, dustType, velocity.X, velocity.Y, 175, default, 3f); + int dust = Dust.NewDust(Projectile.Center, 1, 1, sludgeDustType, velocity.X, velocity.Y, 175, default, 3f); Main.dust[dust].noGravity = true; } } diff --git a/Projectiles/Rogue/TalonLargeProj.cs b/Projectiles/Rogue/TalonLargeProj.cs index bbfc969799..a336cb8f25 100644 --- a/Projectiles/Rogue/TalonLargeProj.cs +++ b/Projectiles/Rogue/TalonLargeProj.cs @@ -20,13 +20,13 @@ namespace CalamityMod.Projectiles.Rogue Projectile.height = 20; Projectile.friendly = true; Projectile.ignoreWater = true; - Projectile.penetrate = 10; + Projectile.penetrate = 5; Projectile.tileCollide = false; Projectile.timeLeft = 180; Projectile.DamageType = RogueDamageClass.Instance; - Projectile.extraUpdates = 2; + Projectile.MaxUpdates = 3; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; + Projectile.localNPCHitCooldown = 10 * Projectile.MaxUpdates; // 10 effective, 30 total } public override void AI() diff --git a/Projectiles/Rogue/TarragonThrowingDartProjectile.cs b/Projectiles/Rogue/TarragonThrowingDartProjectile.cs index eaf9b0ce0d..41db3fbc2f 100644 --- a/Projectiles/Rogue/TarragonThrowingDartProjectile.cs +++ b/Projectiles/Rogue/TarragonThrowingDartProjectile.cs @@ -49,14 +49,6 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void Kill(int timeLeft) - { - if (Main.rand.NextBool(2)) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } - } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { if (Main.myPlayer == Projectile.owner) diff --git a/Projectiles/Rogue/TerraDiskProjectile.cs b/Projectiles/Rogue/TerraDiskProjectile.cs index 3a4f31b596..ddb3119f41 100644 --- a/Projectiles/Rogue/TerraDiskProjectile.cs +++ b/Projectiles/Rogue/TerraDiskProjectile.cs @@ -131,8 +131,6 @@ namespace CalamityMod.Projectiles.Rogue { int disk = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 4, Projectile.knockBack / 4f, Projectile.owner, Projectile.identity, Main.rand.NextFloat(0.02f, 0.1f)); Main.projectile[disk].timeLeft *= 2; - Main.projectile[disk].idStaticNPCHitCooldown = 8; - Main.projectile[disk].usesIDStaticNPCImmunity = true; Main.projectile[disk].aiStyle = -1; } } @@ -175,11 +173,10 @@ namespace CalamityMod.Projectiles.Rogue double startAngle = Math.Atan2(Projectile.velocity.X, Projectile.velocity.Y) - spread / 2; double deltaAngle = spread / 6f; double offsetAngle; - for (int i = 0; i < 3; i++) + for (int i = 0; i < 6; i++) { - offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), splitProj, Projectile.damage / 2, Projectile.knockBack / 2f, Projectile.owner); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), splitProj, Projectile.damage / 2, Projectile.knockBack / 2f, Projectile.owner); + Vector2 velocity = ((MathHelper.TwoPi * i / 6f) - MathHelper.PiOver2).ToRotationVector2() * 6f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner); } } } diff --git a/Projectiles/Rogue/TerraDiskProjectile2.cs b/Projectiles/Rogue/TerraDiskProjectile2.cs index 573571cbc9..4c14c9cb6f 100644 --- a/Projectiles/Rogue/TerraDiskProjectile2.cs +++ b/Projectiles/Rogue/TerraDiskProjectile2.cs @@ -28,6 +28,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 60; AIType = ProjectileID.WoodenBoomerang; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 6; } public override void AI() diff --git a/Projectiles/Rogue/TitaniumShurikenProjectile.cs b/Projectiles/Rogue/TitaniumShurikenProjectile.cs index bcdea49291..05f313b883 100644 --- a/Projectiles/Rogue/TitaniumShurikenProjectile.cs +++ b/Projectiles/Rogue/TitaniumShurikenProjectile.cs @@ -31,6 +31,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 600; AIType = ProjectileID.ThrowingKnife; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 20; } @@ -144,20 +145,11 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void Kill(int timeLeft) - { - if (Main.rand.NextBool(2) && !Projectile.Calamity().stealthStrike) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } - } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - if (Projectile.owner == Main.myPlayer && Projectile.Calamity().stealthStrike) + if (Projectile.owner == Main.myPlayer && Projectile.Calamity().stealthStrike && Projectile.numHits < 3) { - int projNumber = Main.rand.Next(1,3); - for (int index2 = 0; index2 < projNumber; index2++) + for (int index2 = 0; index2 < 4; index2++) { float xVector = (float)Main.rand.Next(-35, 36) * 0.02f; float yVector = (float)Main.rand.Next(-35, 36) * 0.02f; @@ -170,10 +162,9 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitPvp(Player target, int damage, bool crit) { - if (Projectile.owner == Main.myPlayer && Projectile.Calamity().stealthStrike) + if (Projectile.owner == Main.myPlayer && Projectile.Calamity().stealthStrike && Projectile.numHits < 3) { - int projNumber = Main.rand.Next(1,3); - for (int index2 = 0; index2 < projNumber; index2++) + for (int index2 = 0; index2 < 4; index2++) { float xVector = (float)Main.rand.Next(-35, 36) * 0.02f; float yVector = (float)Main.rand.Next(-35, 36) * 0.02f; diff --git a/Projectiles/Rogue/ToothBallProjectile.cs b/Projectiles/Rogue/ToothBallProjectile.cs index 0d29e40397..a5534e4f30 100644 --- a/Projectiles/Rogue/ToothBallProjectile.cs +++ b/Projectiles/Rogue/ToothBallProjectile.cs @@ -36,14 +36,6 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void Kill(int timeLeft) - { - if (Main.rand.NextBool(2)) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } - } - public override void OnHitPvp(Player target, int damage, bool crit) { target.AddBuff(ModContent.BuffType(), 180); diff --git a/Projectiles/Rogue/UrchinStingerProj.cs b/Projectiles/Rogue/UrchinStingerProj.cs index be439d469f..8d3bc1b197 100644 --- a/Projectiles/Rogue/UrchinStingerProj.cs +++ b/Projectiles/Rogue/UrchinStingerProj.cs @@ -99,13 +99,5 @@ namespace CalamityMod.Projectiles.Rogue 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 Kill(int timeLeft) - { - if (Main.rand.NextBool(2)) - { - Item.NewItem(Projectile.GetSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); - } - } } } diff --git a/Projectiles/Summon/IgneousBlade.cs b/Projectiles/Summon/IgneousBlade.cs index 20434fe039..cd0e7fb9c9 100644 --- a/Projectiles/Summon/IgneousBlade.cs +++ b/Projectiles/Summon/IgneousBlade.cs @@ -102,7 +102,7 @@ namespace CalamityMod.Projectiles.Summon { Vector2 spawnPosition = target.Center - new Vector2(0f, 550f).RotatedByRandom(MathHelper.ToRadians(8f)); int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPosition, Vector2.Normalize(target.Center - spawnPosition) * 24f, ModContent.ProjectileType(), - (int)(Projectile.damage * 0.666), Projectile.knockBack, Projectile.owner); + Projectile.damage, Projectile.knockBack, Projectile.owner); if (Main.projectile.IndexInRange(p)) Main.projectile[p].originalDamage = Projectile.originalDamage; } diff --git a/Projectiles/Summon/TacticalPlagueJet.cs b/Projectiles/Summon/TacticalPlagueJet.cs index c58fc0670e..ad274418d0 100644 --- a/Projectiles/Summon/TacticalPlagueJet.cs +++ b/Projectiles/Summon/TacticalPlagueJet.cs @@ -165,7 +165,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.ai[0]++ % TacticalPlagueEngine.BulletShootRate == 24f) { - bool shootRocket = ++Projectile.ai[1] % 20f == 0f; + bool shootRocket = ++Projectile.ai[1] % 2f == 0f; // Rockets never consume ammo. bool dontConsumeAmmo = Main.rand.NextBool() || shootRocket; int projIndex; @@ -173,7 +173,7 @@ namespace CalamityMod.Projectiles.Summon // Vanilla function tricked into using a fake gun item with the appropriate base damage as the "firing item". player.PickAmmo(FalseGun, out int projID, out float shootSpeed, out int damage, out float kb, out _, dontConsumeAmmo); - // One in every 20 shots is a rocket which deals 1.5x total damage and extreme knockback. + // Fires a rocket every other time which deals 1.5x total damage and extreme knockback. if (shootRocket) { int rocketDamage = (int)(damage * 1.5f); diff --git a/Projectiles/Typeless/BallisticPoisonCloud.cs b/Projectiles/Typeless/BallisticPoisonCloud.cs index 50ac10d4f1..4ffa1f9f97 100644 --- a/Projectiles/Typeless/BallisticPoisonCloud.cs +++ b/Projectiles/Typeless/BallisticPoisonCloud.cs @@ -1,4 +1,4 @@ -using System; +using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -22,9 +22,9 @@ namespace CalamityMod.Projectiles.Typeless Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.ignoreWater = true; - Projectile.timeLeft = 3600; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 20; + Projectile.timeLeft = 600; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Typeless/KelvinCatalystStar.cs b/Projectiles/Typeless/KelvinCatalystStar.cs index 94a296b71a..28e341a8bb 100644 --- a/Projectiles/Typeless/KelvinCatalystStar.cs +++ b/Projectiles/Typeless/KelvinCatalystStar.cs @@ -101,9 +101,6 @@ namespace CalamityMod.Projectiles.Typeless int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 67, vector7.X * 0.5f, vector7.Y * 0.5f, 100, default, 0.75f); Main.dust[num228].noGravity = true; } - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; - Projectile.Damage(); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)