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 0000000000..88265b671b Binary files /dev/null and b/Items/Accessories/UrsaSergeant.png differ 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; }