diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 272f034764..2eb7d39619 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -451,6 +451,7 @@ namespace CalamityMod.CalPlayer public bool starTaintedGenerator = false; public bool hallowedRune = false; public bool silvaWings = false; + public int icicleCooldown = 0; // Armor Set @@ -1633,6 +1634,7 @@ namespace CalamityMod.CalPlayer nanoFlareCooldown = 0; fleshTotemCooldown = false; sandCloakCooldown = false; + icicleCooldown = 0; alcoholPoisoning = false; shadowflame = false; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index f6a0ff73a8..4923d30d24 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -885,6 +885,8 @@ namespace CalamityMod.CalPlayer modPlayer.projRefRareLifeRegenCounter--; if (modPlayer.hurtSoundTimer > 0) modPlayer.hurtSoundTimer--; + if (modPlayer.icicleCooldown > 0) + modPlayer.icicleCooldown--; // Silva invincibility effects if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet) diff --git a/CalamityMod.cs b/CalamityMod.cs index de43089830..366342ce64 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -5,6 +5,7 @@ using CalamityMod.CalPlayer; using CalamityMod.ILEditing; using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; +using CalamityMod.Items.Accessories.Wings; using CalamityMod.Items.Armor; using CalamityMod.Items.Fishing.AstralCatches; using CalamityMod.Items.Fishing.BrimstoneCragCatches; @@ -1064,6 +1065,7 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), //Cryonic Bar set stuff, could potentially be removed ModContent.ItemType(), ModContent.ItemType(), @@ -2182,6 +2184,7 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), diff --git a/Items/Accessories/Wings/SoulofCryogen.cs b/Items/Accessories/Wings/SoulofCryogen.cs index f3125c5d18..753d432f3c 100644 --- a/Items/Accessories/Wings/SoulofCryogen.cs +++ b/Items/Accessories/Wings/SoulofCryogen.cs @@ -1,4 +1,6 @@ using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Rogue; +using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ModLoader; @@ -19,6 +21,7 @@ namespace CalamityMod.Items.Accessories.Wings "Flight time: 100\n" + "5% increase to all damage and pick speed\n" + "All melee attacks and projectiles inflict frostburn\n" + + "Icicles rain down as you fly\n" + "Provides heat and cold protection in Death Mode"); Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(8, 4)); } @@ -35,7 +38,6 @@ namespace CalamityMod.Items.Accessories.Wings public override void Update(ref float gravity, ref float maxFallSpeed) { - maxFallSpeed *= 0f; float num = (float)Main.rand.Next(90, 111) * 0.01f; num *= Main.essScale; Lighting.AddLight((int)((item.position.X + (float)(item.width / 2)) / 16f), (int)((item.position.Y + (float)(item.height / 2)) / 16f), 0f * num, 0.3f * num, 0.3f * num); @@ -63,6 +65,17 @@ namespace CalamityMod.Items.Accessories.Wings player.allDamage += 0.05f; player.wingTimeMax = 100; player.noFallDmg = true; + if (modPlayer.icicleCooldown <= 0) + { + if (player.controlJump && player.wingTime > 0f && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f) + { + int p = Projectile.NewProjectile(player.Center.X, player.Center.Y, player.velocity.X * 0f, 2f, ModContent.ProjectileType(), 25, 3f, player.whoAmI); + Main.projectile[p].minion = false; + Main.projectile[p].Calamity().rogue = false; + Main.projectile[p].frame = Main.rand.Next(5); + modPlayer.icicleCooldown = 10; + } + } } } } diff --git a/Items/Weapons/Melee/BladeofEnmity.cs b/Items/Weapons/Melee/BladeofEnmity.cs index fbbefe5f60..81cd369c1c 100644 --- a/Items/Weapons/Melee/BladeofEnmity.cs +++ b/Items/Weapons/Melee/BladeofEnmity.cs @@ -15,7 +15,8 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - item.width = 60; + item.width = 72; + item.height = 76; item.damage = 158; item.melee = true; item.useAnimation = 10; @@ -25,7 +26,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 8f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 68; item.value = Item.buyPrice(0, 80, 0, 0); item.rare = 8; } diff --git a/Items/Weapons/Melee/BladeofEnmity.png b/Items/Weapons/Melee/BladeofEnmity.png index 605b8f54b5..9a2d2ca0b0 100644 Binary files a/Items/Weapons/Melee/BladeofEnmity.png and b/Items/Weapons/Melee/BladeofEnmity.png differ diff --git a/Projectiles/Magic/IceBarrageMain.cs b/Projectiles/Magic/IceBarrageMain.cs index 68f85d1838..5c73582f71 100644 --- a/Projectiles/Magic/IceBarrageMain.cs +++ b/Projectiles/Magic/IceBarrageMain.cs @@ -27,6 +27,7 @@ namespace CalamityMod.Projectiles.Magic projectile.penetrate = -1; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 10; + projectile.coldDamage = true; } public override void AI() diff --git a/Projectiles/Magic/IceBlock.cs b/Projectiles/Magic/IceBlock.cs index f102ca012b..97038953c2 100644 --- a/Projectiles/Magic/IceBlock.cs +++ b/Projectiles/Magic/IceBlock.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.Magic projectile.penetrate = -1; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 60; + projectile.coldDamage = true; } public override void AI() diff --git a/Projectiles/Magic/IceBlockIcicle.cs b/Projectiles/Magic/IceBlockIcicle.cs index 3183e00921..93e0b7d34f 100644 --- a/Projectiles/Magic/IceBlockIcicle.cs +++ b/Projectiles/Magic/IceBlockIcicle.cs @@ -21,6 +21,7 @@ namespace CalamityMod.Projectiles.Magic projectile.ignoreWater = true; projectile.magic = true; projectile.timeLeft = 600; + projectile.coldDamage = true; } public override void AI() diff --git a/Projectiles/Ranged/KarasawaShot.cs b/Projectiles/Ranged/KarasawaShot.cs index ae98d72579..e6c1805e5e 100644 --- a/Projectiles/Ranged/KarasawaShot.cs +++ b/Projectiles/Ranged/KarasawaShot.cs @@ -82,7 +82,6 @@ namespace CalamityMod.Projectiles.Ranged { float angleRandom = 0.1f; - int num3; for (int num53 = 0; num53 < 40; num53++) { float dustSpeed = Main.rand.NextFloat(6.0f, 12.0f); diff --git a/Projectiles/Summon/EndoBeam.cs b/Projectiles/Summon/EndoBeam.cs index 77806775a3..f258ba8d45 100644 --- a/Projectiles/Summon/EndoBeam.cs +++ b/Projectiles/Summon/EndoBeam.cs @@ -36,6 +36,7 @@ namespace CalamityMod.Projectiles.Summon projectile.timeLeft = timeToExist; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 10; + projectile.coldDamage = true; } // Netcode for sending and receiving shit diff --git a/Projectiles/Summon/EndoCooperBody.cs b/Projectiles/Summon/EndoCooperBody.cs index 33bca03eee..3fb2622696 100644 --- a/Projectiles/Summon/EndoCooperBody.cs +++ b/Projectiles/Summon/EndoCooperBody.cs @@ -41,6 +41,7 @@ namespace CalamityMod.Projectiles.Summon projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 10; projectile.extraUpdates = 1; + projectile.coldDamage = true; } public override void AI() @@ -77,7 +78,7 @@ namespace CalamityMod.Projectiles.Summon //Spawn effects if (projectile.localAI[0] == 0f) { - projectile.Calamity().spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f); + projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage(); projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; AttackMode = (int)projectile.ai[0]; LimbID = (int)projectile.ai[1]; @@ -99,10 +100,10 @@ namespace CalamityMod.Projectiles.Summon projectile.localAI[1] = AttackMode; //Damage Update - if ((player.allDamage + player.minionDamage - 1f) != projectile.Calamity().spawnedPlayerMinionDamageValue) + if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) { int damage2 = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / - projectile.Calamity().spawnedPlayerMinionDamageValue * (player.allDamage + player.minionDamage - 1f)); + projectile.Calamity().spawnedPlayerMinionDamageValue * player.MinionDamage()); projectile.damage = damage2; } //Variables diff --git a/Projectiles/Summon/EndoCooperLimbs.cs b/Projectiles/Summon/EndoCooperLimbs.cs index 1a54f840b8..9086423b2a 100644 --- a/Projectiles/Summon/EndoCooperLimbs.cs +++ b/Projectiles/Summon/EndoCooperLimbs.cs @@ -39,6 +39,7 @@ namespace CalamityMod.Projectiles.Summon projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 10; projectile.extraUpdates = 1; + projectile.coldDamage = true; } public override void AI() diff --git a/Projectiles/Summon/EndoFire.cs b/Projectiles/Summon/EndoFire.cs index f2343bd8fe..f37ed57865 100644 --- a/Projectiles/Summon/EndoFire.cs +++ b/Projectiles/Summon/EndoFire.cs @@ -32,6 +32,7 @@ namespace CalamityMod.Projectiles.Summon projectile.idStaticNPCHitCooldown = 5; projectile.timeLeft = 300; projectile.tileCollide = false; + projectile.coldDamage = true; } public override void AI() diff --git a/Projectiles/Summon/EndoHydraBody.cs b/Projectiles/Summon/EndoHydraBody.cs index c9ba3974aa..2330afe3e8 100644 --- a/Projectiles/Summon/EndoHydraBody.cs +++ b/Projectiles/Summon/EndoHydraBody.cs @@ -30,6 +30,7 @@ namespace CalamityMod.Projectiles.Summon projectile.tileCollide = false; projectile.timeLeft *= 5; projectile.minion = true; + projectile.coldDamage = true; } public override void AI() @@ -38,16 +39,16 @@ namespace CalamityMod.Projectiles.Summon CalamityPlayer modPlayer = player.Calamity(); if (projectile.localAI[0] == 0f) { - projectile.Calamity().spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f); + projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage(); projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; projectile.ai[0] = -1f; projectile.localAI[0] = 1f; } - if ((player.allDamage + player.minionDamage - 1f) != projectile.Calamity().spawnedPlayerMinionDamageValue) + if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) { int trueDamage = (int)(projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / projectile.Calamity().spawnedPlayerMinionDamageValue * - (player.allDamage + player.minionDamage - 1f)); + player.MinionDamage()); projectile.damage = trueDamage; } bool isProperProjectile = projectile.type == ModContent.ProjectileType(); diff --git a/Projectiles/Summon/EndoHydraHead.cs b/Projectiles/Summon/EndoHydraHead.cs index c8c7870488..b4bb75b731 100644 --- a/Projectiles/Summon/EndoHydraHead.cs +++ b/Projectiles/Summon/EndoHydraHead.cs @@ -35,6 +35,7 @@ namespace CalamityMod.Projectiles.Summon projectile.tileCollide = false; projectile.timeLeft *= 5; projectile.minion = true; + projectile.coldDamage = true; } public override void ReceiveExtraAI(BinaryReader reader) { @@ -65,15 +66,15 @@ namespace CalamityMod.Projectiles.Summon DeltaPosition = new Vector2(Main.rand.NextFloat(-72f - 8f * totalHeads, 72f + 8f * totalHeads), -Main.rand.NextFloat(8f, 84f + 4f * totalHeads)); projectile.netUpdate = true; - projectile.Calamity().spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f); + projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage(); projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; projectile.localAI[0] = 1f; } - if ((player.allDamage + player.minionDamage - 1f) != projectile.Calamity().spawnedPlayerMinionDamageValue) + if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) { int trueDamage = (int)(projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / projectile.Calamity().spawnedPlayerMinionDamageValue * - (player.allDamage + player.minionDamage - 1f)); + player.MinionDamage()); projectile.damage = trueDamage; } Vector2 bodyTop = body.Center + new Vector2(body.spriteDirection == 1 ? 12 : -14, -50f) + DeltaPosition; diff --git a/Projectiles/Summon/EndoIceShard.cs b/Projectiles/Summon/EndoIceShard.cs index 8ca728169e..59d4c26914 100644 --- a/Projectiles/Summon/EndoIceShard.cs +++ b/Projectiles/Summon/EndoIceShard.cs @@ -14,8 +14,6 @@ namespace CalamityMod.Projectiles.Summon DisplayName.SetDefault("Endo Ice Shard"); ProjectileID.Sets.TrailCacheLength[projectile.type] = 4; ProjectileID.Sets.TrailingMode[projectile.type] = 0; - ProjectileID.Sets.MinionSacrificable[projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; ProjectileID.Sets.MinionShot[projectile.type] = true; } @@ -31,6 +29,7 @@ namespace CalamityMod.Projectiles.Summon projectile.extraUpdates = 1; projectile.alpha = 255; projectile.timeLeft = 240; + projectile.coldDamage = true; } public override void AI() diff --git a/Projectiles/Summon/EndoRay.cs b/Projectiles/Summon/EndoRay.cs index 8ec7067ca4..a4be260b63 100644 --- a/Projectiles/Summon/EndoRay.cs +++ b/Projectiles/Summon/EndoRay.cs @@ -21,6 +21,7 @@ namespace CalamityMod.Projectiles.Summon projectile.penetrate = 10; projectile.extraUpdates = 100; projectile.timeLeft = 265; + projectile.coldDamage = true; } public override void AI() diff --git a/Projectiles/Summon/FrostBeam.cs b/Projectiles/Summon/FrostBeam.cs index 9975871fa6..2345c453ce 100644 --- a/Projectiles/Summon/FrostBeam.cs +++ b/Projectiles/Summon/FrostBeam.cs @@ -23,6 +23,7 @@ namespace CalamityMod.Projectiles.Summon projectile.penetrate = 1; projectile.extraUpdates = 220; projectile.timeLeft = 200; + projectile.coldDamage = true; } public override void AI() diff --git a/Projectiles/Summon/FrostBlossom.cs b/Projectiles/Summon/FrostBlossom.cs index 8d815e3b4d..7ae84ddefd 100644 --- a/Projectiles/Summon/FrostBlossom.cs +++ b/Projectiles/Summon/FrostBlossom.cs @@ -29,6 +29,7 @@ namespace CalamityMod.Projectiles.Summon projectile.tileCollide = false; projectile.timeLeft *= 5; projectile.minion = true; + projectile.coldDamage = true; } public override void AI()