Glacial State can no longer be inflicted on the player
This commit is contained in:
1 parent
cb7b338a15
commit
74ebcaba34
19 files changed
+7
-77
No files matched your search
@@ -18,11 +18,6 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().gState = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().gState < npc.buffTime[buffIndex])
|
||||
@@ -32,20 +27,5 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
{
|
||||
Player Player = drawInfo.drawPlayer;
|
||||
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Dust d = Dust.NewDustDirect(Player.Center - 10 * Vector2.One, 20, 20, DustID.IcyMerman);
|
||||
d.noGravity = Main.rand.NextBool();
|
||||
d.noLight = false;
|
||||
d.velocity *= 0.2f;
|
||||
d.velocity.Y -= Main.rand.NextFloat(0.4f, 0.6f);
|
||||
d.scale = Main.rand.NextFloat(0.4f, 0.7f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1263,7 +1263,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool pFlames = false;
|
||||
public bool hFlames = false;
|
||||
public bool hInferno = false;
|
||||
public bool gState = false;
|
||||
public bool bBlood = false;
|
||||
public bool brainRot = false;
|
||||
public bool heavybleeding = false;
|
||||
@@ -2480,7 +2479,6 @@ namespace CalamityMod.CalPlayer
|
||||
pFlames = false;
|
||||
hFlames = false;
|
||||
hInferno = false;
|
||||
gState = false;
|
||||
bBlood = false;
|
||||
brainRot = false;
|
||||
heavybleeding = false;
|
||||
@@ -2948,7 +2946,6 @@ namespace CalamityMod.CalPlayer
|
||||
pFlames = false;
|
||||
hFlames = false;
|
||||
hInferno = false;
|
||||
gState = false;
|
||||
bBlood = false;
|
||||
brainRot = false;
|
||||
heavybleeding = false;
|
||||
|
||||
@@ -230,15 +230,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (calamityPlayer.eutrophication && drawInfo.shadow == 0f)
|
||||
Eutrophication.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.gState && drawInfo.shadow == 0f)
|
||||
{
|
||||
// These lines cannot be moved to Glacial State's own file
|
||||
r *= 0.13f;
|
||||
g *= 0.66f;
|
||||
|
||||
GlacialState.DrawEffects(drawInfo);
|
||||
}
|
||||
|
||||
if (calamityPlayer.gsInferno && drawInfo.shadow == 0f)
|
||||
GodSlayerInferno.DrawEffects(drawInfo);
|
||||
|
||||
|
||||
@@ -2012,7 +2012,7 @@ namespace CalamityMod.CalPlayer
|
||||
SyncCooldownRemoval(Main.dedServ, expiredCooldowns);
|
||||
|
||||
// Grant the player 5 seconds of immunity to immobilizing debuffs after an immobilizing debuff wears off.
|
||||
if (Player.stoned || Player.frozen || Player.webbed || gState)
|
||||
if (Player.stoned || Player.frozen || Player.webbed)
|
||||
{
|
||||
ImmobilityDebuffImmunityTimer = ImmobilityDebuffImmunityTimerMax;
|
||||
}
|
||||
@@ -2022,7 +2022,6 @@ namespace CalamityMod.CalPlayer
|
||||
Player.buffImmune[BuffID.Stoned] = true;
|
||||
Player.buffImmune[BuffID.Frozen] = true;
|
||||
Player.buffImmune[BuffID.Webbed] = true;
|
||||
Player.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
}
|
||||
|
||||
if (arsenalCooldown > 0)
|
||||
@@ -2623,7 +2622,6 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
Player.buffImmune[BuffID.Frozen] = true;
|
||||
Player.buffImmune[BuffID.Chilled] = true;
|
||||
Player.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
}
|
||||
|
||||
// Cosmic Discharge Cosmic Freeze buff, gives surrounding enemies the Glacial State debuff
|
||||
@@ -3319,12 +3317,12 @@ namespace CalamityMod.CalPlayer
|
||||
if (AdamantiteSet)
|
||||
Player.statDefense += AdamantiteSetDefenseBoost;
|
||||
|
||||
// Warmth makes Chilled, Frozen, and Glacial State tick down 3x as fast
|
||||
// Warmth makes Chilled and Frozen tick down 3x as fast
|
||||
if (Player.HasBuff(BuffID.Warmth))
|
||||
{
|
||||
for (int b = 0; b < Player.MaxBuffs; b++)
|
||||
{
|
||||
if (Player.buffType[b] == BuffID.Chilled || Player.buffType[b] == BuffID.Frozen || Player.buffType[b] == ModContent.BuffType<GlacialState>())
|
||||
if (Player.buffType[b] == BuffID.Chilled || Player.buffType[b] == BuffID.Frozen)
|
||||
{
|
||||
if (Player.buffTime[b] > 3)
|
||||
{
|
||||
@@ -3717,14 +3715,6 @@ namespace CalamityMod.CalPlayer
|
||||
Player.statDefense -= RemsRevenge.WitherDefenseReduction;
|
||||
}
|
||||
|
||||
if (gState)
|
||||
{
|
||||
Player.velocity.X *= 0.5f;
|
||||
Player.velocity.Y += 0.05f;
|
||||
if (Player.velocity.Y > 15f)
|
||||
Player.velocity.Y = 15f;
|
||||
}
|
||||
|
||||
if (eutrophication && !purity)
|
||||
Player.velocity = Vector2.Zero;
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@ namespace CalamityMod.Items.Armor.Fearmonger
|
||||
ModContent.BuffType<GodSlayerInferno>(),
|
||||
BuffID.Chilled,
|
||||
BuffID.Frozen,
|
||||
ModContent.BuffType<GlacialState>(),
|
||||
};
|
||||
for (var i = 0; i < immuneDebuffs.Length; ++i)
|
||||
player.buffImmune[immuneDebuffs[i]] = true;
|
||||
|
||||
@@ -32,7 +32,6 @@ namespace CalamityMod.Items.VanillaArmorChanges
|
||||
player.Calamity().eskimoSet = true;
|
||||
|
||||
player.buffImmune[BuffID.Frostburn] = true;
|
||||
player.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
target.AddBuff(BuffID.Frostburn2, 300);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
var source = player.GetSource_ItemUse(Item);
|
||||
int p = Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType<DarkIceZero>(), Item.damage, 12f, player.whoAmI);
|
||||
Main.projectile[p].Kill();
|
||||
|
||||
@@ -39,7 +39,7 @@ SetBonus: {
|
||||
'''
|
||||
Multiplies all cold-based debuff damage by 1.25x
|
||||
Cold enemies will deal reduced contact damage to the player
|
||||
Provides immunity to the Chilled, Frozen, Frostburn and Glacial State debuffs
|
||||
Provides immunity to the Chilled, Frozen, and Frostburn debuffs
|
||||
'''
|
||||
Rain:
|
||||
'''
|
||||
|
||||
@@ -27,7 +27,7 @@ AddedTooltip: {
|
||||
This grants +1.5 HP/s life regen and accelerates natural life regen
|
||||
Life drain stacks based on the number of enemies being hit
|
||||
'''
|
||||
WarmthPotion: Greatly reduces the duration of Chilled, Frozen, and Glacial State
|
||||
WarmthPotion: Greatly reduces the duration of Chilled and Frozen
|
||||
HandWarmer: Provides a regeneration boost while wearing the Snow armor
|
||||
GoldenFishingRod: Its fishing line will never break
|
||||
// Step Stool
|
||||
|
||||
@@ -101,9 +101,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
target.AddBuff(BuffID.Frostburn, 180, true);
|
||||
target.AddBuff(BuffID.Chilled, 90, true);
|
||||
|
||||
if (!target.Calamity().gState)
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,6 +163,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
// Prevent the crystals from utilizing velocity. Their movement is entirely dependant on Center setting.
|
||||
public override bool ShouldUpdatePosition() => false;
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<GlacialState>(), 300);
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.Frozen, 300);
|
||||
}
|
||||
}
|
||||
@@ -315,7 +315,6 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), Terratomere.TrueMeleeGlacialStateTime);
|
||||
OnHitHealEffect(info.Damage);
|
||||
}
|
||||
#endregion Hit Effects and Collision
|
||||
|
||||
@@ -121,7 +121,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(BuffID.Frostburn2, 180);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
|
||||
}
|
||||
|
||||
public override bool? CanDamage() => Projectile.ai[0] == 0f ? null : false;
|
||||
|
||||
@@ -130,7 +130,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(BuffID.Frostburn2, 180);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
|
||||
}
|
||||
|
||||
public override bool? CanDamage() => Projectile.ai[0] == 0f ? null : false;
|
||||
|
||||
@@ -82,7 +82,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Voidfrost>(), 300);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 150);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
|
||||
@@ -90,19 +90,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
int ice = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<CosmicIceBurst>(), (int)(Projectile.damage * 1.5), Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f, 1f);
|
||||
if (ice.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[ice].DamageType = RogueDamageClass.Instance;
|
||||
|
||||
int buffType = ModContent.BuffType<GlacialState>();
|
||||
float radius = 112f; // 7 blocks
|
||||
|
||||
foreach (Player player in Main.ActivePlayers)
|
||||
{
|
||||
Player owner = Main.player[Projectile.owner];
|
||||
if ((owner.team != player.team || player.team == 0) && player.hostile && owner.hostile && !player.dead && !player.buffImmune[buffType] && Vector2.Distance(Projectile.Center, player.Center) <= radius)
|
||||
{
|
||||
if (player.FindBuffIndex(buffType) == -1)
|
||||
player.AddBuff(buffType, 60, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,8 +198,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
OnHitEffects(target);
|
||||
target.AddBuff(BuffID.Frostburn2, 120);
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 45);
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Turret
|
||||
}
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
|
||||
target.AddBuff(BuffID.Frozen, 30);
|
||||
target.AddBuff(BuffID.Frostburn, 180);
|
||||
if (Projectile.hostile && Main.netMode == NetmodeID.MultiplayerClient) //hostile version pierces through players in multiplayer
|
||||
return;
|
||||
|
||||
@@ -83,10 +83,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
Player player = Main.player[Projectile.owner];
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (!modPlayer.CryoStoneVanity)
|
||||
{
|
||||
target.AddBuff(BuffID.Frostburn2, 180);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.Size.Length() * 0.5f, targetHitbox);
|
||||
|
||||
Reference in new issue
Block a user