From 4366635adb655b91c4b2fe6a2cce188d37f75ce5 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 16 Mar 2020 13:23:29 -0400 Subject: [PATCH] icy shit, and soul of cryo buff --- CalPlayer/CalamityPlayer.cs | 2 ++ CalPlayer/CalamityPlayerMiscEffects.cs | 2 ++ CalamityMod.cs | 3 +++ Items/Accessories/Wings/SoulofCryogen.cs | 15 ++++++++++++++- Items/Weapons/Melee/BladeofEnmity.cs | 4 ++-- Items/Weapons/Melee/BladeofEnmity.png | Bin 1514 -> 1958 bytes Projectiles/Magic/IceBarrageMain.cs | 1 + Projectiles/Magic/IceBlock.cs | 1 + Projectiles/Magic/IceBlockIcicle.cs | 1 + Projectiles/Ranged/KarasawaShot.cs | 1 - Projectiles/Summon/EndoBeam.cs | 1 + Projectiles/Summon/EndoCooperBody.cs | 7 ++++--- Projectiles/Summon/EndoCooperLimbs.cs | 1 + Projectiles/Summon/EndoFire.cs | 1 + Projectiles/Summon/EndoHydraBody.cs | 7 ++++--- Projectiles/Summon/EndoHydraHead.cs | 7 ++++--- Projectiles/Summon/EndoIceShard.cs | 3 +-- Projectiles/Summon/EndoRay.cs | 1 + Projectiles/Summon/FrostBeam.cs | 1 + Projectiles/Summon/FrostBlossom.cs | 1 + 20 files changed, 45 insertions(+), 15 deletions(-) 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 605b8f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(xj-vEFq99b|GpF%7K(=mG? z&n2P^vByOreGgeTxl+{EH`)wmgrTNqX`4{hqXZzG(v_ifrZ8P?L1Kkeo-$W?r(eeo z|I>8_>42RX842`28;vuR~g;J;qcHWmdV}9Y@|HhCbWnD>%8N!}QaN=8a zUV)1dO(TVQj~5qoo{uvjZf+viOC2F~!;JZT-IbF5eN+Muq-qs@)t+2EI3o;d|Bl0f zl_ptV$h7OOvzQV!7l_I>Hmx?duyIBhd?Uin!OHJk$ba_(); 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()