This commit is contained in:
Shucks committed 2019-10-08 22:16:42 -05:00
commit b2a38d4350
6 files changed
+68 -8

No files matched your search

+30 -1
View File
@@ -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)
+36
View File
@@ -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
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 776 B

+1 -1
View File
@@ -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);
}
}
}
@@ -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);
}
}
}
+1 -1
View File
@@ -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;
}