2 - Made the application of all immunity frames consistent with vanilla rules. 3 - Added balancing constants and utility helper functions for all immunity frame calculations. 4 - Buffed many dodges, reflects, and other dodge-like effects to benefit from Cross Necklace like vanilla dodges. 5 - Permafrost's Concoction now is buffed by Cross Necklace. 6 - Significantly buffed the immunity frames granted by Spectral Veil and all reflects by making them consistent with vanilla. 7 - Significantly buffed the immunity frames granted by Ark line parries by making them consistent with vanilla.
33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using CalamityMod.Balancing;
|
|
using CalamityMod.Items.Accessories;
|
|
using Terraria;
|
|
using Terraria.Audio;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Buffs.StatBuffs
|
|
{
|
|
public class Encased : ModBuff
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Main.debuff[Type] = true;
|
|
Main.buffNoSave[Type] = true;
|
|
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
}
|
|
|
|
public override void Update(Player player, ref int buffIndex)
|
|
{
|
|
player.Calamity().encased = true;
|
|
if (player.buffTime[buffIndex] == 2)
|
|
{
|
|
SoundEngine.PlaySound(SoundID.Item27, player.Center);
|
|
|
|
// 17APR2024: Ozzatron: Permafrost's Concoction gives true invulnerability to everything and is boosted by Cross Necklace.
|
|
int encasedIFrames = PermafrostsConcoction.EncasedIFrames + (player.longInvince ? BalancingConstants.CrossNecklaceIFrameBoost : 0);
|
|
player.GiveUniversalIFrames(encasedIFrames, true);
|
|
}
|
|
}
|
|
}
|
|
}
|