Reworked Raider's Talisman
This commit is contained in:
1 parent
ba5e7ab2a5
commit
e3a40b45cc
5 files changed
+18
-47
No files matched your search
@@ -446,8 +446,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool aBrain = false;
|
||||
public bool amalgam = false;
|
||||
public bool raiderTalisman = false;
|
||||
public int raiderStack = 0;
|
||||
public int raiderCooldown = 0;
|
||||
public float raiderCritBonus = RaidersTalisman.RaiderBonus;
|
||||
public bool gSabaton = false;
|
||||
public int gSabatonFall = 0;
|
||||
public int gSabatonCooldown = 0;
|
||||
@@ -2115,8 +2114,7 @@ namespace CalamityMod.CalPlayer
|
||||
spiritOriginConvertedCrit = 0;
|
||||
rage = 0f;
|
||||
adrenaline = 0f;
|
||||
raiderStack = 0;
|
||||
raiderCooldown = 0;
|
||||
raiderCritBonus = 0f;
|
||||
gSabatonFall = 0;
|
||||
gSabatonCooldown = 0;
|
||||
astralStarRainCooldown = 0;
|
||||
|
||||
@@ -1083,8 +1083,8 @@ namespace CalamityMod.CalPlayer
|
||||
soundCooldown--;
|
||||
if (shadowPotCooldown > 0)
|
||||
shadowPotCooldown--;
|
||||
if (raiderCooldown > 0)
|
||||
raiderCooldown--;
|
||||
if (raiderCritBonus > 0f)
|
||||
raiderCritBonus -= RaidersTalisman.RaiderBonus / (float)CalamityUtils.SecondsToFrames(RaidersTalisman.RaiderCooldown);
|
||||
if (gSabatonCooldown > 0)
|
||||
gSabatonCooldown--;
|
||||
if (gSabatonFall > 0)
|
||||
@@ -1388,12 +1388,9 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
// Raider Talisman bonus
|
||||
if (raiderTalisman)
|
||||
if (raiderTalisman && !StealthStrikeAvailable())
|
||||
{
|
||||
// Nanotech use to have an exclusive nerf here, but since they are currently equal, there
|
||||
// is no check to indicate such.
|
||||
float damageMult = 0.15f;
|
||||
Player.GetDamage<ThrowingDamageClass>() += raiderStack / 150f * damageMult;
|
||||
Player.GetCritChance<ThrowingDamageClass>() += raiderCritBonus;
|
||||
}
|
||||
|
||||
if (kamiBoost)
|
||||
|
||||
@@ -1246,6 +1246,11 @@ namespace CalamityMod.CalPlayer
|
||||
shadowPotCooldown = 30;
|
||||
}
|
||||
|
||||
if (raiderTalisman && modProj.stealthStrike)
|
||||
{
|
||||
raiderCritBonus = RaidersTalisman.RaiderBonus;
|
||||
}
|
||||
|
||||
if (npcCheck)
|
||||
{
|
||||
// Umbraphile cannot trigger off of itself. It is guaranteed on stealth strikes and 25% chance otherwise.
|
||||
@@ -1255,12 +1260,6 @@ namespace CalamityMod.CalPlayer
|
||||
int umbraBlastDamage = CalamityUtils.DamageSoftCap(proj.damage * 0.25, 50);
|
||||
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<UmbraphileBoom>(), umbraBlastDamage, 0f, Player.whoAmI);
|
||||
}
|
||||
|
||||
if (raiderTalisman && raiderStack < 150 && crit && raiderCooldown <= 0)
|
||||
{
|
||||
raiderStack++;
|
||||
raiderCooldown = 30;
|
||||
}
|
||||
if (electricianGlove && modProj.stealthStrike && modProj.stealthStrikeHitCount < 5)
|
||||
{
|
||||
for (int s = 0; s < 3; s++)
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using System.Linq;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
@@ -20,10 +18,8 @@ namespace CalamityMod.Items.Accessories
|
||||
"Stealth strikes summon nanobeams and sparks on enemy hits\n" +
|
||||
"Stealth strikes have +20 armor penetration, deal 5% more damage, and heal for 1 HP\n" +
|
||||
"15% increased rogue damage and 15% increased rogue velocity\n" +
|
||||
"Whenever you crit an enemy with a rogue weapon your rogue damage increases\n" +
|
||||
"This effect can stack up to 150 times\n" +
|
||||
"Max rogue damage boost is 15%\n" +
|
||||
"This line is modified below");
|
||||
$"Landing a stealth strike grants a {(int)RaidersTalisman.RaiderBonus}% crit bonus to non-stealth strikes\n" +
|
||||
$"This damage bonus decays over {RaidersTalisman.RaiderCooldown} seconds");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -35,15 +31,6 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.rare = ModContent.RarityType<DarkBlue>();
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
int critLevel = Main.player[Main.myPlayer].Calamity().raiderStack;
|
||||
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip7");
|
||||
|
||||
if (line != null)
|
||||
line.Text = "Rogue Crit Level: " + critLevel;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using System.Linq;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class RaidersTalisman : ModItem
|
||||
{
|
||||
public const float RaiderBonus = 12f;
|
||||
public const int RaiderCooldown = 5;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
SacrificeTotal = 1;
|
||||
DisplayName.SetDefault("Raider's Talisman");
|
||||
Tooltip.SetDefault("Whenever you crit an enemy with a rogue weapon your rogue damage increases\n" +
|
||||
"This effect can stack up to 150 times\n" +
|
||||
"Max rogue damage boost is 15%\n" +
|
||||
"This line is modified below");
|
||||
Tooltip.SetDefault($"Landing a stealth strike grants a {(int)RaiderBonus}% crit bonus to non-stealth strikes\n" +
|
||||
$"This damage bonus decays over {RaiderCooldown} seconds");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -28,15 +27,6 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
int critLevel = Main.player[Main.myPlayer].Calamity().raiderStack;
|
||||
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip3");
|
||||
|
||||
if (line != null)
|
||||
line.Text = "Rogue Crit Level: " + critLevel;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
Reference in new issue
Block a user