Merge branch '1.4' of https://github.com/CalamityTeam/CalamityMod into 1.4
This commit is contained in:
commit
3f08520430
5 files changed
+34
-24
No files matched your search
@@ -6034,11 +6034,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Being hit for zero from Paladin's Shield damage share does not cancel Adrenaline.
|
||||
// Adrenaline is not lost when hit if using Draedon's Heart.
|
||||
if (!draedonsHeart && !adrenalineModeActive && damage > 0)
|
||||
{
|
||||
adrenaline -= stressPills ? adrenalineMax / 2 : adrenalineMax;
|
||||
if (adrenaline < 0)
|
||||
adrenaline = 0;
|
||||
}
|
||||
adrenaline = 0f;
|
||||
|
||||
// If using Draedon's Heart and not actively healing with Nanomachines, pause generation briefly.
|
||||
if (draedonsHeart && !adrenalineModeActive)
|
||||
|
||||
@@ -420,7 +420,7 @@ namespace CalamityMod.CalPlayer
|
||||
// If using Draedon's Heart, you get healing instead of damage.
|
||||
if (draedonsHeart)
|
||||
{
|
||||
Player.statLife += DraedonsHeart.NanomachinesHeal / DraedonsHeart.NanomachinesDuration;
|
||||
Player.statLife += DraedonsHeart.NanomachinesHealPerFrame;
|
||||
if (Player.statLife >= Player.statLifeMax2)
|
||||
Player.statLife = Player.statLifeMax2;
|
||||
|
||||
@@ -450,9 +450,18 @@ namespace CalamityMod.CalPlayer
|
||||
adrenalineDiff = -adrenalineMax / AdrenalineFadeTime;
|
||||
}
|
||||
|
||||
// In the SCal fight, adrenaline charges 33% slower (meaning it takes 50% longer to fully charge it).
|
||||
if (SCalAlive && adrenalineDiff > 0f)
|
||||
adrenalineDiff *= 0.67f;
|
||||
// Adjustments to how fast Adrenaline charges
|
||||
if (adrenalineDiff > 0f)
|
||||
{
|
||||
// Stress Pills make Adrenaline charge 20% faster (meaning it takes 83.333% standard time to charge it).
|
||||
if (stressPills)
|
||||
adrenalineDiff *= 1.2f;
|
||||
|
||||
// In the SCal fight, adrenaline charges 33% slower (meaning it takes 50% longer to fully charge it).
|
||||
if (SCalAlive)
|
||||
adrenalineDiff *= 0.67f;
|
||||
}
|
||||
|
||||
|
||||
// Apply the adrenaline change and cap adrenaline in both directions.
|
||||
// Changes are only applied if the Adrenaline mechanic is available.
|
||||
|
||||
@@ -16,24 +16,29 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
// Duration of Nanomachines in frames.
|
||||
internal static readonly int NanomachinesDuration = 120;
|
||||
|
||||
// Health gained per frame while using Nanomachines.
|
||||
internal static readonly int NanomachinesHealPerFrame = 3;
|
||||
// Duration of time where Nanomachines won't accumulate after taking damage, in frames.
|
||||
internal static readonly int NanomachinePauseAfterDamage = 240;
|
||||
|
||||
internal static readonly int NanomachinesHeal = 240;
|
||||
internal static readonly int NanomachinePauseAfterDamage = 60;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
SacrificeTotal = 1;
|
||||
DisplayName.SetDefault("Draedon's Heart");
|
||||
Tooltip.SetDefault("15% reduced contact damage from enemies\n" +
|
||||
"Reduces defense damage taken by 50%\n" + "Replaces Adrenaline with the Nanomachines meter\n" +
|
||||
$"Unlike Adrenaline, you lose no Nanomachines when you take damage, but they stop accumulating for {NanomachinePauseAfterDamage / 60} seconds\n" +
|
||||
$"With full Nanomachines, press & to heal {NanomachinesHeal} health over {NanomachinesDuration / 60} seconds\n" +
|
||||
"While healing, you take &% less damage\n" +
|
||||
"'Nanomachines, son.'");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 11));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
|
||||
string seconds = NanomachinePauseAfterDamage == 60 ? "second" : "seconds";
|
||||
string pauseDurationTooltip = $"{NanomachinePauseAfterDamage / 60} {seconds}";
|
||||
string totalHealTooltip = $"{NanomachinesHealPerFrame * NanomachinesDuration}";
|
||||
string healDurationTooltip = $"{NanomachinesDuration / 60}";
|
||||
|
||||
Tooltip.SetDefault("15% reduced contact damage from enemies\n" +
|
||||
"Reduces defense damage taken by 50%\n" + "Replaces Adrenaline with the Nanomachines meter\n" +
|
||||
$"Unlike Adrenaline, you lose no Nanomachines when you take damage, but they stop accumulating for {pauseDurationTooltip}\n" +
|
||||
$"With full Nanomachines, press & to heal {totalHealTooltip} health over {healDurationTooltip} seconds\n" +
|
||||
"While healing, you take &% less damage\n" +
|
||||
"'Nanomachines, son.'");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"Converts certain debuffs into buffs and extends their durations\n" +
|
||||
"Debuffs affected: Darkness, Blackout, Confused, Slow, Weak, Broken Armor,\n" +
|
||||
"Armor Crunch, War Cleave, Chilled, Ichor and Obstructed\n" +
|
||||
"Getting hit causes you to only lose half of your max adrenaline rather than all of it\n" +
|
||||
"Adrenaline charges 20% faster\n" +
|
||||
"Increases your max movement speed and acceleration by 5%\n" +
|
||||
"Can also be worn as a helmet\n" +
|
||||
"Revengeance item");
|
||||
|
||||
@@ -11,15 +11,16 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
SacrificeTotal = 1;
|
||||
DisplayName.SetDefault("Stress Pills");
|
||||
Tooltip.SetDefault("Boosts your defense by 4 and max movement speed and acceleration by 5%\n" +
|
||||
"Receiving a hit causes you to only lose 50% of your max adrenaline rather than all of it\n" +
|
||||
"Revengeance drop");
|
||||
Tooltip.SetDefault("Adrenaline charges 20% faster\n" +
|
||||
"Increases your max movement speed and acceleration by 5%\n" +
|
||||
"Revengeance drop");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 26;
|
||||
Item.height = 26;
|
||||
Item.defense = 4;
|
||||
Item.value = CalamityGlobalItem.Rarity3BuyPrice;
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
Item.accessory = true;
|
||||
@@ -27,7 +28,6 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.statDefense += 4;
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.stressPills = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user