From 42b0236f0eda30592cb46c003e5637d80cbe46a1 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 8 Oct 2019 20:57:31 -0400 Subject: [PATCH 1/2] some fixes --- Items/Weapons/Helstorm.cs | 2 +- Projectiles/Rogue/PalladiumJavelinProjectile.cs | 5 ----- Projectiles/Rogue/ScourgeoftheSeasStealth.cs | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Items/Weapons/Helstorm.cs b/Items/Weapons/Helstorm.cs index 4f9ed958db..ed53dc9134 100644 --- a/Items/Weapons/Helstorm.cs +++ b/Items/Weapons/Helstorm.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Items.Weapons public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { - target.AddBuff(BuffID.OnFire, 400); + target.AddBuff(BuffID.OnFire, 360); } } } diff --git a/Projectiles/Rogue/PalladiumJavelinProjectile.cs b/Projectiles/Rogue/PalladiumJavelinProjectile.cs index e59d969af4..8ae7a9ebcb 100644 --- a/Projectiles/Rogue/PalladiumJavelinProjectile.cs +++ b/Projectiles/Rogue/PalladiumJavelinProjectile.cs @@ -45,10 +45,5 @@ namespace CalamityMod.Projectiles.Rogue Item.NewItem((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height, mod.ItemType("PalladiumJavelin")); } } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(BuffID.BoneJavelin, 500); - } } } diff --git a/Projectiles/Rogue/ScourgeoftheSeasStealth.cs b/Projectiles/Rogue/ScourgeoftheSeasStealth.cs index 018105df32..461bc85be5 100644 --- a/Projectiles/Rogue/ScourgeoftheSeasStealth.cs +++ b/Projectiles/Rogue/ScourgeoftheSeasStealth.cs @@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - if (target.type != mod.NPCType("Cryogen") || target.type != mod.NPCType("Brimstone Elemental") || target.type != NPCID.SkeletronPrime) + if (target.type == mod.NPCType("Cryogen") || target.type == mod.NPCType("Brimstone Elemental") || target.type == NPCID.SkeletronPrime) { target.buffImmune[BuffID.Venom] = false; } From b6555daf8dfe3f91c116ee79cc31b43acb3b472c Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 8 Oct 2019 23:13:32 -0400 Subject: [PATCH 2/2] Added Ursa Sergeant accessory --- CalPlayer/CalamityPlayer.cs | 31 ++++++++++++++++++++++++- Items/Accessories/UrsaSergeant.cs | 36 +++++++++++++++++++++++++++++ Items/Accessories/UrsaSergeant.png | Bin 0 -> 776 bytes 3 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 Items/Accessories/UrsaSergeant.cs create mode 100644 Items/Accessories/UrsaSergeant.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 7ef0de9576..ea70bf852c 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -291,6 +291,8 @@ namespace CalamityMod.CalPlayer public bool fabledTortoise = false; public bool manaOverloader = false; public bool royalGel = false; + public bool oldDie = false; + public bool ursaSergeant = false; public bool sandWaifu = false; public bool sandBoobWaifu = false; public bool cloudWaifu = false; @@ -304,7 +306,6 @@ namespace CalamityMod.CalPlayer public bool abyssalMirrorCooldown = false; public bool eclipseMirror = false; public bool eclipseMirrorCooldown = false; - public bool oldDie = false; public bool featherCrown = false; public bool moonCrown = false; @@ -961,6 +962,7 @@ namespace CalamityMod.CalPlayer eTracers = false; cTracers = false; oldDie = false; + ursaSergeant = false; daedalusReflect = false; daedalusSplit = false; @@ -3285,6 +3287,24 @@ namespace CalamityMod.CalPlayer } } } + if (ursaSergeant) + { + if (player.statLife <= (int)((double)player.statLifeMax2 * 0.15)) + { + player.lifeRegen += 3; + player.lifeRegenTime += 3; + } + else if (player.statLife <= (int)((double)player.statLifeMax2 * 0.25)) + { + player.lifeRegen += 2; + player.lifeRegenTime += 2; + } + else if (player.statLife <= (int)((double)player.statLifeMax2 * 0.5)) + { + player.lifeRegen += 1; + player.lifeRegenTime += 1; + } + } if (invincible || lol) { player.thorns = 0f; @@ -4738,6 +4758,11 @@ namespace CalamityMod.CalPlayer runAccMult *= 0.5f; runSpeedMult *= 0.5f; } + if (ursaSergeant) + { + runAccMult *= 0.8f; + runSpeedMult *= 0.8f; + } if (elysianGuard) { runAccMult *= 0.5f; @@ -6792,6 +6817,10 @@ namespace CalamityMod.CalPlayer #region Fishing public override void CatchFish(Item fishingRod, Item bait, int power, int liquidType, int poolSize, int worldLayer, int questFish, ref int caughtType, ref bool junk) { + if (ZoneAstral && Main.rand.NextBool(25)) + { + caughtType = mod.ItemType("UrsaSergeant"); + } Point point = player.Center.ToTileCoordinates(); bool abyssPosX = false; if (CalamityWorld.abyssSide) diff --git a/Items/Accessories/UrsaSergeant.cs b/Items/Accessories/UrsaSergeant.cs new file mode 100644 index 0000000000..43658c96ae --- /dev/null +++ b/Items/Accessories/UrsaSergeant.cs @@ -0,0 +1,36 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.CalPlayer; + +namespace CalamityMod.Items.Accessories +{ + public class UrsaSergeant : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ursa Sergeant"); + Tooltip.SetDefault("+20 defense but 20% reduced movement speed\n" + + "Immune to Astral Infection and Feral Bite\n" + + "Increased regeneration at lower health"); + } + + public override void SetDefaults() + { + item.width = 36; + item.height = 26; + item.value = Item.buyPrice(0, 24, 0, 0); + item.rare = 8; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetCalamityPlayer(); + modPlayer.ursaSergeant = true; + player.statDefense += 20; + player.buffImmune[mod.BuffType("AstralInfectionDebuff")] = true; + player.buffImmune[148] = true; //Feral Bite + } + } +} diff --git a/Items/Accessories/UrsaSergeant.png b/Items/Accessories/UrsaSergeant.png new file mode 100644 index 0000000000000000000000000000000000000000..88265b671b742338e03a7af60ce48a0041cbb9d9 GIT binary patch literal 776 zcmV+j1NZ!iP)Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^00LG?L_t(Y$JLfiYg0iKhM#L~W1A*z z(j*OdNlL^Zh{X?tZUn8k=t5WST)1^9_#4!};Icb6Dz0?p2Z&JVLa|gtL6R6D=A%ig z#xy04i^-vx>m-4KaQkj<&di*9@B8GOx#Q4B&la!tn^N7Y!vI};{(!ycz@D=HqyBMe zA){~VQPlw;%(ep9BH#eL-f9BSYBd0OT&@97EWh7hgbsQKk|7PG^uw`|5zVNk z0$3SI1F+D^1Mp!asQ{M3I=)`eWC8(A&P~i)Uqs0Hj*xTv(k)|PF<1g18)_+lci#p! z6U&pcM!f#31;BW{Y>elNd24=PD&hcaZ`S=usJDg`K&}&V0J3POClBjVx>uS5;6^eB zz?Jnj0GUbihR1`4^p9W)fG@=Y0BKj(+V4ohSYKXSRlTHqO-MUx1(hZeG>Cj0*Tima zCIL8q%B-D2t~u`|a^&t@rcR zj>JMtdeVP{J~yiX9G!>(@bFJVzqy;TCdfXsG?zBUh0N1j-f%7&7K?mG$Z-?%3gE)R zxq%D4-6JG~l+=_+x+vqOtg-0D$}0fk(bzuOhrA@jxtD;{z{|I*R_ESt*Dx}b4PDFr zB_!RGikoEQzwhVN>sT~19d){-RBxWFn+{JIWc+&`k}k{MzY9R)&Ld#AM#NFiHwW15 zN|_%U9diKMJ8k0u@u=S4DjQYn3DkSW_8*~Rm#+cv^Ua#FEr`St4nVzHR5_CmabVXQ6MmkS&X=QG7VRUJ4ZU8ZaSnTfr0000