Reworked Trinket of Chi.
This commit is contained in:
1 parent
86c6b12574
commit
60ff7b44a1
4 files changed
+29
-30
No files matched your search
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
@@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Chi");
|
||||
Description.SetDefault("Your next attack is boosted and you are more resilient");
|
||||
Description.SetDefault("You are more resilient");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
|
||||
@@ -4590,7 +4590,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
if (trinketOfChiBuff)
|
||||
contactDamageReduction += 0.15;
|
||||
contactDamageReduction += 0.1;
|
||||
|
||||
// Fearmonger set provides 15% multiplicative DR that ignores caps during the Holiday Moons.
|
||||
// To prevent abuse, this effect does not work if there are any bosses alive.
|
||||
@@ -4865,7 +4865,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
if (trinketOfChiBuff)
|
||||
projectileDamageReduction += 0.15;
|
||||
projectileDamageReduction += 0.1;
|
||||
|
||||
// Fearmonger set provides 15% multiplicative DR that ignores caps during the Holiday Moons.
|
||||
// To prevent abuse, this effect does not work if there are any bosses alive.
|
||||
@@ -5709,6 +5709,9 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
hellbornBoost = 0;
|
||||
|
||||
if (trinketOfChi)
|
||||
chiBuffTimer = 0;
|
||||
|
||||
if (amidiasBlessing && damage > 50)
|
||||
{
|
||||
Player.ClearBuff(ModContent.BuffType<AmidiasBlessing>());
|
||||
|
||||
@@ -2049,29 +2049,6 @@ namespace CalamityMod.CalPlayer
|
||||
// Rogue Stealth
|
||||
UpdateRogueStealth();
|
||||
|
||||
// Trinket of Chi bonus
|
||||
if (trinketOfChi)
|
||||
{
|
||||
if (trinketOfChiBuff)
|
||||
{
|
||||
Player.GetDamage<GenericDamageClass>() += 0.5f;
|
||||
if (Player.itemAnimation > 0)
|
||||
chiBuffTimer = 0;
|
||||
}
|
||||
|
||||
if (Player.StandingStill(0.1f) && !Player.mount.Active)
|
||||
{
|
||||
if (chiBuffTimer < 60)
|
||||
chiBuffTimer++;
|
||||
else
|
||||
Player.AddBuff(ModContent.BuffType<ChiBuff>(), 6);
|
||||
}
|
||||
else
|
||||
chiBuffTimer--;
|
||||
}
|
||||
else
|
||||
chiBuffTimer = 0;
|
||||
|
||||
// Aquatic Emblem bonus
|
||||
if (aquaticEmblem)
|
||||
{
|
||||
@@ -2376,6 +2353,17 @@ namespace CalamityMod.CalPlayer
|
||||
else
|
||||
titanBoost = 0;
|
||||
|
||||
// Trinket of Chi bonus
|
||||
if (trinketOfChi)
|
||||
{
|
||||
if (chiBuffTimer < TrinketofChi.ChiBuffTimerMax)
|
||||
chiBuffTimer++;
|
||||
else
|
||||
Player.AddBuff(ModContent.BuffType<ChiBuff>(), 6);
|
||||
}
|
||||
else
|
||||
chiBuffTimer = 0;
|
||||
|
||||
if (darkSunRing)
|
||||
{
|
||||
Player.maxMinions += 2;
|
||||
|
||||
@@ -2,18 +2,20 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class TrinketofChi : ModItem
|
||||
{
|
||||
internal const int ChiBuffTimerMax = 900;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
SacrificeTotal = 1;
|
||||
DisplayName.SetDefault("Trinket of Chi");
|
||||
Tooltip.SetDefault("After 1 second of standing still and not attacking you gain a buff\n" +
|
||||
"This buff boosts your damage by 50% and decreases damage taken by 15%\n" +
|
||||
"The buff deactivates after you move or attack once");
|
||||
Tooltip.SetDefault("Provides 10% damage reduction after not being hit for 15 seconds, this is removed when you are hit\n" +
|
||||
"Provides 2 life regen for you and everyone on your team");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -29,6 +31,12 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.trinketOfChi = true;
|
||||
player.lifeRegen += 2;
|
||||
if (player.whoAmI != Main.myPlayer && player.miscCounter % 10 == 0)
|
||||
{
|
||||
if (Main.LocalPlayer.team == player.team && player.team != 0)
|
||||
Main.LocalPlayer.lifeRegen += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user