merge
No files matched your search
@@ -222,6 +222,9 @@ namespace CalamityMod.Balancing
|
|||||||
// 30% resist to Flak Kraken.
|
// 30% resist to Flak Kraken.
|
||||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
|
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
|
||||||
|
|
||||||
|
// 25% resist to Solar Eruption.
|
||||||
|
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.SolarWhipSword, ProjectileID.SolarWhipSwordExplosion))));
|
||||||
|
|
||||||
// 20% resist to Ballistic Poison Bomb's clouds.
|
// 20% resist to Ballistic Poison Bomb's clouds.
|
||||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<BallisticPoisonCloud>()))));
|
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<BallisticPoisonCloud>()))));
|
||||||
|
|
||||||
|
|||||||
@@ -126,11 +126,11 @@
|
|||||||
internal static readonly float LifeStealRecoveryRate_Classic = 0.6f;
|
internal static readonly float LifeStealRecoveryRate_Classic = 0.6f;
|
||||||
internal static readonly float LifeStealRecoveryRate_Expert = 0.5f;
|
internal static readonly float LifeStealRecoveryRate_Expert = 0.5f;
|
||||||
|
|
||||||
// Nerfs the life steal recovery rate in Classic from 0.6 to 0.2 (36 HP/s to 12 HP/s)
|
// Nerfs the life steal recovery rate in Classic from 0.6 to 0.15 (36 HP/s to 9 HP/s)
|
||||||
internal static readonly float LifeStealRecoveryRateReduction_Classic = 0.4f;
|
internal static readonly float LifeStealRecoveryRateReduction_Classic = 0.45f;
|
||||||
|
|
||||||
// Nerfs the life steal recovery rate in Expert from 0.5 to 0.15 (30 HP/s to 9 HP/s)
|
// Nerfs the life steal recovery rate in Expert from 0.5 to 0.1 (30 HP/s to 6 HP/s)
|
||||||
internal static readonly float LifeStealRecoveryRateReduction_Expert = 0.35f;
|
internal static readonly float LifeStealRecoveryRateReduction_Expert = 0.4f;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Rogue Base Stats
|
#region Rogue Base Stats
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -10,10 +11,8 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.debuff[Type] = true;
|
Main.debuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = true;
|
Main.buffNoSave[Type] = true;
|
||||||
Main.buffNoTimeDisplay[Type] = true;
|
Main.buffNoTimeDisplay[Type] = true;
|
||||||
// The nurse technically cannot get rid of this debuff by herself, as it reapplies immediately after if you have alcohol left
|
// The nurse can remove all alcohol debuffs individually, thus removing this by proxy.
|
||||||
// But she also cleanses excess alcohol if you have Alcohol Poisoning (see CalamityPlayer.PostNurseHeal)
|
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||||
// Removing this set means she costs 1 debuff worth of cost to remove excess alcohol
|
|
||||||
// BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using CalamityMod.Items.Potions.Alcohol;
|
using CalamityMod.Items.Potions.Alcohol;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -13,7 +12,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using CalamityMod.Items.Potions.Alcohol;
|
using CalamityMod.Items.Potions.Alcohol;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -13,7 +12,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using CalamityMod.Items.Potions.Alcohol;
|
using CalamityMod.Items.Potions.Alcohol;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -13,14 +12,12 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
{
|
{
|
||||||
var cplayer = player.Calamity();
|
var cplayer = player.Calamity();
|
||||||
cplayer.grapeBeer = true;
|
cplayer.grapeBeer = true;
|
||||||
cplayer.critDamage -= GrapeBeer.CritLoss * 0.01f;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
using CalamityMod.Items.Potions.Alcohol;
|
using CalamityMod.Items.Potions.Alcohol;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -13,7 +12,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using CalamityMod.Items.Potions.Alcohol;
|
using CalamityMod.Items.Potions.Alcohol;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -13,7 +12,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using CalamityMod.Items.Potions.Alcohol;
|
using CalamityMod.Items.Potions.Alcohol;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -13,7 +12,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using CalamityMod.Items.Potions.Alcohol;
|
using CalamityMod.Items.Potions.Alcohol;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -13,7 +12,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using CalamityMod.Items.Potions.Alcohol;
|
using CalamityMod.Items.Potions.Alcohol;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -13,7 +12,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Alcohol
|
namespace CalamityMod.Buffs.Alcohol
|
||||||
@@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
Main.persistentBuff[Type] = true;
|
Main.persistentBuff[Type] = true;
|
||||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -156,11 +156,13 @@ namespace CalamityMod.Buffs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type == BuffID.Frozen)
|
||||||
|
{
|
||||||
|
npc.Calamity().frozen = true;
|
||||||
|
}
|
||||||
if (type == BuffID.Webbed)
|
if (type == BuffID.Webbed)
|
||||||
{
|
{
|
||||||
npc.Calamity().webbed = true;
|
npc.Calamity().webbed = true;
|
||||||
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
|
||||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
|
||||||
}
|
}
|
||||||
if (type == BuffID.Electrified)
|
if (type == BuffID.Electrified)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
|||||||
public static Color baneColor2 = new Color(0, 232, 146);
|
public static Color baneColor2 = new Color(0, 232, 146);
|
||||||
public static DebuffData debuffData = new DebuffData()
|
public static DebuffData debuffData = new DebuffData()
|
||||||
{
|
{
|
||||||
EnemyLostRegen = 90,
|
EnemyLostRegen = 40,
|
||||||
NPCLifeRegenMethod = BaneNPCLifeRegen
|
NPCLifeRegenMethod = BaneNPCLifeRegen
|
||||||
};
|
};
|
||||||
public override void SetStaticDefaults()
|
public override void SetStaticDefaults()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using CalamityMod.DataStructures;
|
using CalamityMod.DataStructures;
|
||||||
|
using CalamityMod.Projectiles.Summon;
|
||||||
using CalamityMod.Systems.Collections;
|
using CalamityMod.Systems.Collections;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
@@ -17,8 +18,17 @@ namespace CalamityMod.Buffs.DamageOverTime
|
|||||||
public static float ViridVanguardPoisonMultiplier => 2;
|
public static float ViridVanguardPoisonMultiplier => 2;
|
||||||
public static void SagePoisonPower(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
public static void SagePoisonPower(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||||
{
|
{
|
||||||
// The base DoT is multiplied by the amount of Viral Sprouts you have when applied
|
int viralCount = 0;
|
||||||
// See SageNeedle.cs for details
|
int viridCount = 0;
|
||||||
|
foreach (var item in Main.ActiveProjectiles)
|
||||||
|
{
|
||||||
|
if (item.type == ModContent.ProjectileType<SageSpirit>())
|
||||||
|
viralCount++;
|
||||||
|
if (item.type == ModContent.ProjectileType<ViridVanguardBlade>())
|
||||||
|
viridCount++;
|
||||||
|
}
|
||||||
|
if ((viralCount + viridCount) <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
//Reduce power of weakness/resistances but leave sickness debuff boosters at full power
|
//Reduce power of weakness/resistances but leave sickness debuff boosters at full power
|
||||||
//We first need to apply Irradiated as that isn't included in SicknessDebuffMultiplier due to needing to dynamically update if Irradiated is applied
|
//We first need to apply Irradiated as that isn't included in SicknessDebuffMultiplier due to needing to dynamically update if Irradiated is applied
|
||||||
@@ -39,8 +49,9 @@ namespace CalamityMod.Buffs.DamageOverTime
|
|||||||
multiplier *= NewResistanceEffectiveness;
|
multiplier *= NewResistanceEffectiveness;
|
||||||
|
|
||||||
//Apply the DOT
|
//Apply the DOT
|
||||||
int baseSagePoisonDoTValue = (int)multiplier.ApplyTo(npc.Calamity().sagePoisonDamage);
|
float SagePoisonRegen = (viralCount + ViridVanguardPoisonMultiplier * viridCount) * debuffData.EnemyLostRegen;
|
||||||
npc.Calamity().ApplyDPSDebuff(baseSagePoisonDoTValue, baseSagePoisonDoTValue / 5, ref npc.lifeRegen, ref damage);
|
int totalDoT = (int)multiplier.ApplyTo(SagePoisonRegen);
|
||||||
|
npc.Calamity().ApplyDPSDebuff(totalDoT, totalDoT/(2*(viridCount+viralCount)), ref npc.lifeRegen, ref damage);
|
||||||
}
|
}
|
||||||
public override void SetStaticDefaults()
|
public override void SetStaticDefaults()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
|||||||
{
|
{
|
||||||
public static DebuffData debuffData = new DebuffData()
|
public static DebuffData debuffData = new DebuffData()
|
||||||
{
|
{
|
||||||
EnemyLostRegen = 3996, //6x the tick size
|
EnemyLostRegen = 2664, //4x the tick size
|
||||||
HeatDebuffScaling = 1,
|
HeatDebuffScaling = 1,
|
||||||
MinimumDamageTickSize = 666, //Vhex should always have ticks of 666
|
MinimumDamageTickSize = 666, //Vhex should always have ticks of 666
|
||||||
MultiplierDamageTickSize = 0
|
MultiplierDamageTickSize = 0
|
||||||
@@ -41,9 +41,6 @@ namespace CalamityMod.Buffs.DamageOverTime
|
|||||||
cgn.trueVulnerabilityHex = true;
|
cgn.trueVulnerabilityHex = true;
|
||||||
if (cgn.VulnerabilityHexFireDrawer != null)
|
if (cgn.VulnerabilityHexFireDrawer != null)
|
||||||
cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + npc.buffTime[buffIndex];
|
cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + npc.buffTime[buffIndex];
|
||||||
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && cgn.debuffResistanceTimer <= 0)
|
|
||||||
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
||||||
|
|||||||
@@ -34,8 +34,6 @@ namespace CalamityMod.Buffs.DamageOverTime
|
|||||||
public override void Update(NPC npc, ref int buffIndex)
|
public override void Update(NPC npc, ref int buffIndex)
|
||||||
{
|
{
|
||||||
npc.Calamity().vaporfied = true;
|
npc.Calamity().vaporfied = true;
|
||||||
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
|
||||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin +npc.buffTime[buffIndex];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||||
|
|||||||
@@ -46,10 +46,6 @@ namespace CalamityMod.Buffs.DamageOverTime
|
|||||||
// Set the remaining time of the fire drawer to be exactly right.
|
// Set the remaining time of the fire drawer to be exactly right.
|
||||||
if (cgn.VulnerabilityHexFireDrawer != null)
|
if (cgn.VulnerabilityHexFireDrawer != null)
|
||||||
cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + npc.buffTime[buffIndex];
|
cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + npc.buffTime[buffIndex];
|
||||||
|
|
||||||
// Apply immunity timer.
|
|
||||||
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && cgn.debuffResistanceTimer <= 0)
|
|
||||||
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + +npc.buffTime[buffIndex];
|
|
||||||
}
|
}
|
||||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
using CalamityMod.Projectiles.Pets;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
namespace CalamityMod.Buffs.Pets
|
||||||
|
{
|
||||||
|
public class StarSwallowerPetBuff : ModBuff
|
||||||
|
{
|
||||||
|
public override void SetStaticDefaults()
|
||||||
|
{
|
||||||
|
Main.buffNoTimeDisplay[Type] = true;
|
||||||
|
Main.vanityPet[Type] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Update(Player player, ref int buffIndex) => player.BuffHandle_SpawnPetIfNeededAndSetTime(buffIndex, ref player.Calamity().starSwallowerPetFroge, ModContent.ProjectileType<StarSwallowerPet>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 662 B |
@@ -1,4 +1,5 @@
|
|||||||
using Terraria;
|
using CalamityMod.Items.Potions.Food;
|
||||||
|
using Terraria;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Potions
|
namespace CalamityMod.Buffs.Potions
|
||||||
@@ -7,7 +8,7 @@ namespace CalamityMod.Buffs.Potions
|
|||||||
{
|
{
|
||||||
public override void SetStaticDefaults()
|
public override void SetStaticDefaults()
|
||||||
{
|
{
|
||||||
Main.debuff[Type] = false;
|
Main.debuff[Type] = true;
|
||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
}
|
}
|
||||||
@@ -15,6 +16,7 @@ namespace CalamityMod.Buffs.Potions
|
|||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
{
|
{
|
||||||
player.Calamity().baguette = true;
|
player.Calamity().baguette = true;
|
||||||
|
player.lifeRegen -= Baguette.RedWineRegenLoss;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using Terraria;
|
using CalamityMod.Items.Accessories;
|
||||||
|
using Terraria;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.StatBuffs
|
namespace CalamityMod.Buffs.StatBuffs
|
||||||
@@ -15,7 +16,7 @@ namespace CalamityMod.Buffs.StatBuffs
|
|||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
{
|
{
|
||||||
player.endurance += 0.08f;
|
player.endurance += TrinketofChi.ChiBuffDamageReductionBoost;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,13 +9,12 @@ namespace CalamityMod.Buffs.StatBuffs
|
|||||||
{
|
{
|
||||||
public class Mushy : ModBuff
|
public class Mushy : ModBuff
|
||||||
{
|
{
|
||||||
public static int DefenseBoost = 5;
|
public static int DefenseBoost = 3;
|
||||||
public static int RegenBoost = 2;
|
public static int RegenBoost = 2;
|
||||||
public override LocalizedText Description => base.Description.WithFormatArgs(DefenseBoost, RegenBoost.ToRegenPerSecond());
|
public override LocalizedText Description => base.Description.WithFormatArgs(DefenseBoost, RegenBoost.ToRegenPerSecond());
|
||||||
|
|
||||||
public override void SetStaticDefaults()
|
public override void SetStaticDefaults()
|
||||||
{
|
{
|
||||||
Main.debuff[Type] = true;
|
|
||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = true;
|
Main.buffNoSave[Type] = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ namespace CalamityMod.Buffs.StatDebuffs
|
|||||||
public override void Update(NPC npc, ref int buffIndex)
|
public override void Update(NPC npc, ref int buffIndex)
|
||||||
{
|
{
|
||||||
npc.Calamity().eutrophication = true;
|
npc.Calamity().eutrophication = true;
|
||||||
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
|
||||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using CalamityMod.NPCs;
|
using CalamityMod.DataStructures;
|
||||||
|
using CalamityMod.NPCs;
|
||||||
using CalamityMod.Systems.Collections;
|
using CalamityMod.Systems.Collections;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
@@ -14,13 +15,17 @@ namespace CalamityMod.Buffs.StatDebuffs
|
|||||||
Main.pvpBuff[Type] = true;
|
Main.pvpBuff[Type] = true;
|
||||||
Main.buffNoSave[Type] = false;
|
Main.buffNoSave[Type] = false;
|
||||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||||
|
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||||
}
|
}
|
||||||
|
// Purely to make it get electric color in tooltips
|
||||||
|
public static DebuffData debuffData = new DebuffData()
|
||||||
|
{
|
||||||
|
ElectricDebuffScaling = 1
|
||||||
|
};
|
||||||
|
|
||||||
public override void Update(NPC npc, ref int buffIndex)
|
public override void Update(NPC npc, ref int buffIndex)
|
||||||
{
|
{
|
||||||
npc.Calamity().galvanicCorrosion = true;
|
npc.Calamity().galvanicCorrosion = true;
|
||||||
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
|
||||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
using CalamityMod.NPCs;
|
|
||||||
using CalamityMod.Systems.Collections;
|
|
||||||
using Terraria;
|
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.StatDebuffs
|
|
||||||
{
|
|
||||||
public class GlacialState : ModBuff
|
|
||||||
{
|
|
||||||
public override void SetStaticDefaults()
|
|
||||||
{
|
|
||||||
Main.debuff[Type] = true;
|
|
||||||
Main.pvpBuff[Type] = true;
|
|
||||||
Main.buffNoSave[Type] = true;
|
|
||||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Update(NPC npc, ref int buffIndex)
|
|
||||||
{
|
|
||||||
npc.Calamity().glacialState = true;
|
|
||||||
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
|
||||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
|
||||||
npc.DelBuff(buffIndex);
|
|
||||||
buffIndex--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 611 B |
@@ -17,8 +17,6 @@ namespace CalamityMod.Buffs.StatDebuffs
|
|||||||
public override void Update(NPC npc, ref int buffIndex)
|
public override void Update(NPC npc, ref int buffIndex)
|
||||||
{
|
{
|
||||||
npc.Calamity().temporalSadness = true;
|
npc.Calamity().temporalSadness = true;
|
||||||
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
|
||||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -19,8 +19,6 @@ namespace CalamityMod.Buffs.StatDebuffs
|
|||||||
public override void Update(NPC npc, ref int buffIndex)
|
public override void Update(NPC npc, ref int buffIndex)
|
||||||
{
|
{
|
||||||
npc.Calamity().timeDistortion = true;
|
npc.Calamity().timeDistortion = true;
|
||||||
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
|
||||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
using CalamityMod.Projectiles.Typeless;
|
|
||||||
using Terraria.ModLoader;
|
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Summon
|
|
||||||
{
|
|
||||||
public class DemonshadeSetDevilBuff : BaseSummonBuff
|
|
||||||
{
|
|
||||||
protected override int MinionProjectileType => ModContent.ProjectileType<DemonshadeRedDevil>();
|
|
||||||
|
|
||||||
protected override ref bool MinionBool => ref BuffModdedOwner.rDevil;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 993 B |
@@ -1,34 +1,14 @@
|
|||||||
using CalamityMod.CalPlayer;
|
using CalamityMod.CalPlayer;
|
||||||
|
using CalamityMod.Items.Weapons.Summon;
|
||||||
using CalamityMod.Projectiles.Summon;
|
using CalamityMod.Projectiles.Summon;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Buffs.Summon
|
namespace CalamityMod.Buffs.Summon
|
||||||
{
|
{
|
||||||
public class VoidConcentrationBuff : ModBuff
|
public class VoidConcentrationBuff : BaseSummonBuff
|
||||||
{
|
{
|
||||||
public override void SetStaticDefaults()
|
protected override ref bool MinionBool => ref BuffModdedOwner.VoidConcentrationStaff;
|
||||||
{
|
protected override int MinionProjectileType => ModContent.ProjectileType<VoidConcentrationMinion>();
|
||||||
Main.buffNoTimeDisplay[Type] = true;
|
|
||||||
Main.buffNoSave[Type] = true;
|
|
||||||
//Main.persistentBuff[Type] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
|
||||||
{
|
|
||||||
CalamityPlayer mp = player.Calamity();
|
|
||||||
int count = player.ownedProjectileCounts[ModContent.ProjectileType<VoidConcentrationAura>()];
|
|
||||||
player.GetDamage<SummonDamageClass>() += 0.05f; //5%
|
|
||||||
mp.voidConcentrationAura = true;
|
|
||||||
if (!mp.voidAuraDamage && count == 0)
|
|
||||||
{
|
|
||||||
player.DelBuff(buffIndex);
|
|
||||||
buffIndex--;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.buffTime[buffIndex] = 18000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -132,6 +132,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
/// <summary> If set to true, completely disables ALL life regeneration effects. Used by Omega Blue armor. </summary>
|
/// <summary> If set to true, completely disables ALL life regeneration effects. Used by Omega Blue armor. </summary>
|
||||||
public bool noLifeRegen = false;
|
public bool noLifeRegen = false;
|
||||||
public float ammoCost = 1f;
|
public float ammoCost = 1f;
|
||||||
|
public float partialLifeRegen = 0f;
|
||||||
public float healingPotionMultiplier = 1f;
|
public float healingPotionMultiplier = 1f;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Tracks whether or not the player is currently holding Gael's Greatsword.<br/>
|
/// Tracks whether or not the player is currently holding Gael's Greatsword.<br/>
|
||||||
@@ -186,11 +187,11 @@ namespace CalamityMod.CalPlayer
|
|||||||
public enum FishingMinigames
|
public enum FishingMinigames
|
||||||
{
|
{
|
||||||
None,
|
None,
|
||||||
ScrapBobber,
|
WulfrumBobber,
|
||||||
NavystoneBobber,
|
SunkenSinker,
|
||||||
SkylineBobber,
|
AcrobaticBobber,
|
||||||
PerennialBobber,
|
FeralBobber,
|
||||||
ScoriaBobber,
|
VolcanicSinker,
|
||||||
DevourerofCods //Not a fishing minigame but uses the same code as the rest
|
DevourerofCods //Not a fishing minigame but uses the same code as the rest
|
||||||
}
|
}
|
||||||
public FishingMinigames SelectedFishingMinigame = FishingMinigames.None;
|
public FishingMinigames SelectedFishingMinigame = FishingMinigames.None;
|
||||||
@@ -311,6 +312,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Timer and Counter
|
#region Timer and Counter
|
||||||
|
public float partialLifeRegenCounter = 0f;
|
||||||
public int gaelSwipes = 0;
|
public int gaelSwipes = 0;
|
||||||
public int arsenalCooldown = 0;
|
public int arsenalCooldown = 0;
|
||||||
public int killModeCooldown = 0;
|
public int killModeCooldown = 0;
|
||||||
@@ -326,15 +328,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
public int deadSunCounter = 6;
|
public int deadSunCounter = 6;
|
||||||
public int DragonsBreathAudioCooldown = 0;
|
public int DragonsBreathAudioCooldown = 0;
|
||||||
public int DragonsBreathAudioCooldown2 = 0;
|
public int DragonsBreathAudioCooldown2 = 0;
|
||||||
public int darklightEnergy = 0;
|
|
||||||
public int darklightEnergyTimer = 0;
|
|
||||||
public bool darklightEnergyPaused = false;
|
|
||||||
public bool darklightEnergyMaxFXPlayed = false;
|
|
||||||
private int lucreciaParticleTimer = 0;
|
|
||||||
public int elementalMastery = 0;
|
|
||||||
public int elementalMasteryTimer = 0;
|
|
||||||
public bool elementalMasteryPaused = false;
|
|
||||||
public bool elementalMasterySFXPlayed = false;
|
|
||||||
public float unstableCastersGauntletVis = 0;
|
public float unstableCastersGauntletVis = 0;
|
||||||
public int unstableCastersGauntletVisTimer = 0;
|
public int unstableCastersGauntletVisTimer = 0;
|
||||||
public int PhotoAudioCooldown = 0;
|
public int PhotoAudioCooldown = 0;
|
||||||
@@ -343,11 +336,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
public int arpeggioCooldown = 0;
|
public int arpeggioCooldown = 0;
|
||||||
/// <summary> Cooldown variable which prevents using Burning Sea during its "burn-out" mechanic. </summary>
|
/// <summary> Cooldown variable which prevents using Burning Sea during its "burn-out" mechanic. </summary>
|
||||||
public int burningSeaBurnOut = 0;
|
public int burningSeaBurnOut = 0;
|
||||||
/// <summary>
|
|
||||||
/// How many stacks of Evil Smasher's boost the player has. This increases the weapon's damage, use speed, and knockback.<br/>
|
|
||||||
/// Getting hit decreases this by 1. Switching to a different item resets this to 0.
|
|
||||||
/// </summary>
|
|
||||||
public int evilSmasherBoost = 0;
|
|
||||||
/// <summary> Cooldown variable for spawning Plague Tainted SMG's drones from left-click bullets. </summary>
|
/// <summary> Cooldown variable for spawning Plague Tainted SMG's drones from left-click bullets. </summary>
|
||||||
public int plagueTaintedSMGDroneCooldown = 0;
|
public int plagueTaintedSMGDroneCooldown = 0;
|
||||||
/// <summary> Cooldown variable which prevents using Firestorm Cannon or Spectralstorm Cannon during their overheat periods. </summary>
|
/// <summary> Cooldown variable which prevents using Firestorm Cannon or Spectralstorm Cannon during their overheat periods. </summary>
|
||||||
@@ -375,6 +363,9 @@ namespace CalamityMod.CalPlayer
|
|||||||
public int amputatorBuff = 0;
|
public int amputatorBuff = 0;
|
||||||
/// <summary> Variable used to track the current fuel amount for Pristine Fury's right-click. </summary>
|
/// <summary> Variable used to track the current fuel amount for Pristine Fury's right-click. </summary>
|
||||||
public int furyFuel = 1800;
|
public int furyFuel = 1800;
|
||||||
|
/// <summary> Variable to track the healing over time gained from Grand Dad. </summary>
|
||||||
|
public int grandDadHealPool = 0;
|
||||||
|
public int grandDadHealTimer = 0;
|
||||||
public const int FuryFuelMax = 1800;
|
public const int FuryFuelMax = 1800;
|
||||||
public float furyRefuelTimer = 0;
|
public float furyRefuelTimer = 0;
|
||||||
/// <summary> Variable used to track if Auger can do its big slash attack. </summary>
|
/// <summary> Variable used to track if Auger can do its big slash attack. </summary>
|
||||||
@@ -598,6 +589,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
public bool lordePet = false;
|
public bool lordePet = false;
|
||||||
public bool frostyBat = false;
|
public bool frostyBat = false;
|
||||||
public bool toastyBat = false;
|
public bool toastyBat = false;
|
||||||
|
public bool starSwallowerPetFroge = false;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Rage
|
#region Rage
|
||||||
@@ -914,12 +906,16 @@ namespace CalamityMod.CalPlayer
|
|||||||
public bool lAmbergrisVisual = false;
|
public bool lAmbergrisVisual = false;
|
||||||
public bool tortShell = false;
|
public bool tortShell = false;
|
||||||
public bool absorber = false;
|
public bool absorber = false;
|
||||||
|
/// <summary>
|
||||||
|
/// Used for detetcing life regen hindering debuffs
|
||||||
|
/// </summary>
|
||||||
|
bool _hasNoNaturalRegen = false;
|
||||||
public bool hadLifeRegenHinderingDebuff = false;
|
public bool hadLifeRegenHinderingDebuff = false;
|
||||||
public bool alwaysHoneyRegen = false;
|
public bool alwaysHoneyRegen = false;
|
||||||
public float alwaysHoneyRegenAmount = 0;
|
public float alwaysHoneyRegenAmount = 0;
|
||||||
public bool honeyTurboRegen = false;
|
public bool honeyTurboRegen = false;
|
||||||
public bool honeyDewHalveDebuffs = false;
|
public bool honeyDew = false;
|
||||||
public bool livingDewHalveDebuffs = false;
|
public bool livingDew = false;
|
||||||
public int jewelBonusDefense = 0;
|
public int jewelBonusDefense = 0;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Counter variable for spawning Toxic Heart's pulses.<br/>
|
/// Counter variable for spawning Toxic Heart's pulses.<br/>
|
||||||
@@ -933,8 +929,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
public float pulseRate = 1;
|
public float pulseRate = 1;
|
||||||
public bool aAmpoule = false;
|
public bool aAmpoule = false;
|
||||||
public bool rOoze = false;
|
public bool rOoze = false;
|
||||||
public float radiantOozeRegen = 0;
|
|
||||||
public float purityRegen = 0;
|
|
||||||
public bool fBarrier = false;
|
public bool fBarrier = false;
|
||||||
public bool aBrain = false;
|
public bool aBrain = false;
|
||||||
public bool amalgam = false;
|
public bool amalgam = false;
|
||||||
@@ -955,8 +949,12 @@ namespace CalamityMod.CalPlayer
|
|||||||
public bool seraphTracers = false;
|
public bool seraphTracers = false;
|
||||||
public bool frostFlare = false;
|
public bool frostFlare = false;
|
||||||
public bool evolution = false;
|
public bool evolution = false;
|
||||||
public bool procDodgeEffects = true;
|
public bool v8Engine = false;
|
||||||
|
public bool v8000Engine = false;
|
||||||
|
public bool v8EngineFXPlayed = false;
|
||||||
|
public bool procDodgeEffects = false;
|
||||||
public bool nanotech = false;
|
public bool nanotech = false;
|
||||||
|
public int nanotechHitCooldown = 0;
|
||||||
public bool deadshotBrooch = false;
|
public bool deadshotBrooch = false;
|
||||||
public bool shadowMinions = false;
|
public bool shadowMinions = false;
|
||||||
public bool holyMinions = false;
|
public bool holyMinions = false;
|
||||||
@@ -977,6 +975,9 @@ namespace CalamityMod.CalPlayer
|
|||||||
public bool community = false;
|
public bool community = false;
|
||||||
public bool shatteredCommunity = false;
|
public bool shatteredCommunity = false;
|
||||||
public bool fleshTotem = false;
|
public bool fleshTotem = false;
|
||||||
|
public bool fleshTotemMinion = false;
|
||||||
|
public bool fleshTotemVisual = false;
|
||||||
|
public int fleshTotemManaStorage = 0;
|
||||||
public bool bloodPact = false;
|
public bool bloodPact = false;
|
||||||
public bool bloodflareCore = false;
|
public bool bloodflareCore = false;
|
||||||
public int bloodflareCoreRemainingHealOverTime = 0;
|
public int bloodflareCoreRemainingHealOverTime = 0;
|
||||||
@@ -994,7 +995,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
public bool purity = false;
|
public bool purity = false;
|
||||||
/// <summary> If true, reduces the damage of electricity debuffs by 50%. </summary>
|
/// <summary> If true, reduces the damage of electricity debuffs by 50%. </summary>
|
||||||
public bool eleResist = false;
|
public bool eleResist = false;
|
||||||
public int PurityHealSlowdownFrames = 0;
|
|
||||||
public bool harpyRing = false;
|
public bool harpyRing = false;
|
||||||
public bool angelTreads = false;
|
public bool angelTreads = false;
|
||||||
/// <summary> Makes Flesh Knuckles and its upgrades increase the player's max health. </summary>
|
/// <summary> Makes Flesh Knuckles and its upgrades increase the player's max health. </summary>
|
||||||
@@ -1040,9 +1040,9 @@ namespace CalamityMod.CalPlayer
|
|||||||
public int fallingBootVelCheckTimer = 0;
|
public int fallingBootVelCheckTimer = 0;
|
||||||
public bool voidOfCalamity = false;
|
public bool voidOfCalamity = false;
|
||||||
public bool apollyon = false;
|
public bool apollyon = false;
|
||||||
public bool eArtifact = false;
|
public bool fragmentsOfAnotherWorld = false;
|
||||||
public bool dArtifact = false;
|
public bool crushingEgo = false;
|
||||||
public bool auricSArtifact = false;
|
public bool fadedIdolatry = false;
|
||||||
public bool pSoulArtifact = false;
|
public bool pSoulArtifact = false;
|
||||||
public bool giantPearl = false;
|
public bool giantPearl = false;
|
||||||
public bool shieldOfTheOcean = false;
|
public bool shieldOfTheOcean = false;
|
||||||
@@ -1099,7 +1099,9 @@ namespace CalamityMod.CalPlayer
|
|||||||
public bool eclipseMirror = false;
|
public bool eclipseMirror = false;
|
||||||
public bool featherCrown = false;
|
public bool featherCrown = false;
|
||||||
public bool moonCrown = false;
|
public bool moonCrown = false;
|
||||||
public int rogueCrownCooldown = 0;
|
public bool mageCrownVisibility = false;
|
||||||
|
public int mageCrownTimer = 0;
|
||||||
|
public int mageCrownCount = 0;
|
||||||
public bool dragonScales = false;
|
public bool dragonScales = false;
|
||||||
public bool gloveOfPrecision = false;
|
public bool gloveOfPrecision = false;
|
||||||
public bool gloveOfRecklessness = false;
|
public bool gloveOfRecklessness = false;
|
||||||
@@ -1114,6 +1116,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
public int spectralVeilImmunity = 0;
|
public int spectralVeilImmunity = 0;
|
||||||
/// <summary> Check for if the player has Plagued Fuel Pack OR Blunder Booster equipped. </summary>
|
/// <summary> Check for if the player has Plagued Fuel Pack OR Blunder Booster equipped. </summary>
|
||||||
public bool hasJetpack = false;
|
public bool hasJetpack = false;
|
||||||
|
public bool hasEngineDash = false;
|
||||||
public bool plaguedFuelPack = false;
|
public bool plaguedFuelPack = false;
|
||||||
public bool blunderBooster = false;
|
public bool blunderBooster = false;
|
||||||
public bool blunderBoosterVisibility = true;
|
public bool blunderBoosterVisibility = true;
|
||||||
@@ -1283,6 +1286,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
public bool plaguebringerPatronSet = false;
|
public bool plaguebringerPatronSet = false;
|
||||||
public bool plaguebringerCarapace = false;
|
public bool plaguebringerCarapace = false;
|
||||||
public float ataxiaDmg;
|
public float ataxiaDmg;
|
||||||
|
public float hydroHealTimer = 0;
|
||||||
public bool ataxiaMage = false;
|
public bool ataxiaMage = false;
|
||||||
public bool ataxiaGeyser = false;
|
public bool ataxiaGeyser = false;
|
||||||
public float xerocDmg;
|
public float xerocDmg;
|
||||||
@@ -1314,8 +1318,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
public bool daedalusCrystal = false;
|
public bool daedalusCrystal = false;
|
||||||
/// <summary> Hydrothermic armor's summoner set bonus minion. </summary>
|
/// <summary> Hydrothermic armor's summoner set bonus minion. </summary>
|
||||||
public bool chaosSpirit = false;
|
public bool chaosSpirit = false;
|
||||||
/// <summary> Demonshade armor's set bonus minion. </summary>
|
|
||||||
public bool redDevil = false;
|
|
||||||
public bool GemTechSet = false;
|
public bool GemTechSet = false;
|
||||||
/// <summary> Calamity's Cobalt armor set bonus; increases damage and crit chance based on how fast the player is moving. </summary>
|
/// <summary> Calamity's Cobalt armor set bonus; increases damage and crit chance based on how fast the player is moving. </summary>
|
||||||
public bool CobaltSet = false;
|
public bool CobaltSet = false;
|
||||||
@@ -1571,8 +1573,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
/// <summary> Pearl of Enthrallment. </summary>
|
/// <summary> Pearl of Enthrallment. </summary>
|
||||||
public bool waterEleBuff = false;
|
public bool waterEleBuff = false;
|
||||||
public bool fClump = false;
|
public bool fClump = false;
|
||||||
/// <summary> Demonshade armor's Red Devil. </summary>
|
|
||||||
public bool rDevil = false;
|
|
||||||
/// <summary> Aerospec armor's Valkyrie. </summary>
|
/// <summary> Aerospec armor's Valkyrie. </summary>
|
||||||
public bool aValkyrie = false;
|
public bool aValkyrie = false;
|
||||||
public bool apexShark = false;
|
public bool apexShark = false;
|
||||||
@@ -1599,9 +1599,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
public bool plaguebringerMK2 = false;
|
public bool plaguebringerMK2 = false;
|
||||||
public bool igneousExaltation = false;
|
public bool igneousExaltation = false;
|
||||||
public bool GlacialEmbrace = false;
|
public bool GlacialEmbrace = false;
|
||||||
public bool voidAura = false;
|
public bool VoidConcentrationStaff = false;
|
||||||
public bool voidAuraDamage = false;
|
|
||||||
public bool voidConcentrationAura = false;
|
|
||||||
public bool MutatedTruffleBool = false;
|
public bool MutatedTruffleBool = false;
|
||||||
public bool virili = false;
|
public bool virili = false;
|
||||||
public bool frostBlossom = false;
|
public bool frostBlossom = false;
|
||||||
@@ -2290,6 +2288,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
lordePet = false;
|
lordePet = false;
|
||||||
frostyBat = false;
|
frostyBat = false;
|
||||||
toastyBat = false;
|
toastyBat = false;
|
||||||
|
starSwallowerPetFroge = false;
|
||||||
|
|
||||||
onyxExcavator = false;
|
onyxExcavator = false;
|
||||||
rimehound = false;
|
rimehound = false;
|
||||||
@@ -2404,18 +2403,19 @@ namespace CalamityMod.CalPlayer
|
|||||||
lAmbergris = false;
|
lAmbergris = false;
|
||||||
tortShell = false;
|
tortShell = false;
|
||||||
absorber = false;
|
absorber = false;
|
||||||
honeyDewHalveDebuffs = false;
|
honeyDew = false;
|
||||||
livingDewHalveDebuffs = false;
|
livingDew = false;
|
||||||
aAmpoule = false;
|
aAmpoule = false;
|
||||||
rOoze = false;
|
rOoze = false;
|
||||||
radiantOozeRegen = 0;
|
|
||||||
purityRegen = 0;
|
|
||||||
fBarrier = false;
|
fBarrier = false;
|
||||||
aBrain = false;
|
aBrain = false;
|
||||||
amalgam = false;
|
amalgam = false;
|
||||||
frostFlare = false;
|
frostFlare = false;
|
||||||
evolution = false;
|
evolution = false;
|
||||||
|
v8Engine = false;
|
||||||
|
v8000Engine = false;
|
||||||
nanotech = false;
|
nanotech = false;
|
||||||
|
nanotechHitCooldown = 0;
|
||||||
deadshotBrooch = false;
|
deadshotBrooch = false;
|
||||||
tesla = false;
|
tesla = false;
|
||||||
teslaVisuals = true;
|
teslaVisuals = true;
|
||||||
@@ -2451,6 +2451,8 @@ namespace CalamityMod.CalPlayer
|
|||||||
stressPills = false;
|
stressPills = false;
|
||||||
laudanum = false;
|
laudanum = false;
|
||||||
fleshTotem = false;
|
fleshTotem = false;
|
||||||
|
fleshTotemVisual = false;
|
||||||
|
fleshTotemMinion = false;
|
||||||
bloodPact = false;
|
bloodPact = false;
|
||||||
bloodflareCore = false;
|
bloodflareCore = false;
|
||||||
chaliceOfTheBloodGod = false;
|
chaliceOfTheBloodGod = false;
|
||||||
@@ -2468,9 +2470,9 @@ namespace CalamityMod.CalPlayer
|
|||||||
baroclaw = false;
|
baroclaw = false;
|
||||||
voidOfCalamity = false;
|
voidOfCalamity = false;
|
||||||
apollyon = false;
|
apollyon = false;
|
||||||
eArtifact = false;
|
fragmentsOfAnotherWorld = false;
|
||||||
dArtifact = false;
|
crushingEgo = false;
|
||||||
auricSArtifact = false;
|
fadedIdolatry = false;
|
||||||
pSoulArtifact = false;
|
pSoulArtifact = false;
|
||||||
giantPearl = false;
|
giantPearl = false;
|
||||||
shieldOfTheOcean = false;
|
shieldOfTheOcean = false;
|
||||||
@@ -2531,6 +2533,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
lunicCorpsLegs = false;
|
lunicCorpsLegs = false;
|
||||||
|
|
||||||
ammoCost = 1f;
|
ammoCost = 1f;
|
||||||
|
partialLifeRegen = 0f;
|
||||||
healingPotionMultiplier = 1f;
|
healingPotionMultiplier = 1f;
|
||||||
|
|
||||||
avertorBonus = false;
|
avertorBonus = false;
|
||||||
@@ -2635,6 +2638,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
eclipseMirror = false;
|
eclipseMirror = false;
|
||||||
featherCrown = false;
|
featherCrown = false;
|
||||||
moonCrown = false;
|
moonCrown = false;
|
||||||
|
mageCrownVisibility = false;
|
||||||
dragonScales = false;
|
dragonScales = false;
|
||||||
gloveOfPrecision = false;
|
gloveOfPrecision = false;
|
||||||
gloveOfRecklessness = false;
|
gloveOfRecklessness = false;
|
||||||
@@ -2645,6 +2649,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
sandCloak = false;
|
sandCloak = false;
|
||||||
spectralVeil = false;
|
spectralVeil = false;
|
||||||
hasJetpack = false;
|
hasJetpack = false;
|
||||||
|
hasEngineDash = false;
|
||||||
plaguedFuelPack = false;
|
plaguedFuelPack = false;
|
||||||
blunderBooster = false;
|
blunderBooster = false;
|
||||||
blunderBoosterVisibility = true;
|
blunderBoosterVisibility = true;
|
||||||
@@ -2828,7 +2833,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
brimEleBuff = false;
|
brimEleBuff = false;
|
||||||
waterEleBuff = false;
|
waterEleBuff = false;
|
||||||
fClump = false;
|
fClump = false;
|
||||||
rDevil = false;
|
|
||||||
aValkyrie = false;
|
aValkyrie = false;
|
||||||
sCrystal = false;
|
sCrystal = false;
|
||||||
sGod = false;
|
sGod = false;
|
||||||
@@ -2855,7 +2859,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
fungalClumpVanity = false;
|
fungalClumpVanity = false;
|
||||||
howlsHeart = false;
|
howlsHeart = false;
|
||||||
howlsHeartVanity = false;
|
howlsHeartVanity = false;
|
||||||
redDevil = false;
|
|
||||||
valkyrie = false;
|
valkyrie = false;
|
||||||
slimeGod = false;
|
slimeGod = false;
|
||||||
chaosSpirit = false;
|
chaosSpirit = false;
|
||||||
@@ -2870,9 +2873,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
plaguebringerMK2 = false;
|
plaguebringerMK2 = false;
|
||||||
igneousExaltation = false;
|
igneousExaltation = false;
|
||||||
GlacialEmbrace = false;
|
GlacialEmbrace = false;
|
||||||
voidAura = false;
|
VoidConcentrationStaff = false;
|
||||||
voidAuraDamage = false;
|
|
||||||
voidConcentrationAura = false;
|
|
||||||
saros = false;
|
saros = false;
|
||||||
if (sarosEclipseBeamUsage > 300)
|
if (sarosEclipseBeamUsage > 300)
|
||||||
sarosEclipseBeamUsage = 300;
|
sarosEclipseBeamUsage = 300;
|
||||||
@@ -3070,6 +3071,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (Player.HeldItem.IsAir || Player.HeldItem.fishingPole == 0)
|
if (Player.HeldItem.IsAir || Player.HeldItem.fishingPole == 0)
|
||||||
consecutiveCaughtFish = 0;
|
consecutiveCaughtFish = 0;
|
||||||
heldGaelsLastFrame = false;
|
heldGaelsLastFrame = false;
|
||||||
|
partialLifeRegenCounter = 0f;
|
||||||
gaelSwipes = 0;
|
gaelSwipes = 0;
|
||||||
whitewaterHeal = 0;
|
whitewaterHeal = 0;
|
||||||
luxorHit = false;
|
luxorHit = false;
|
||||||
@@ -3131,7 +3133,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
andromedaCripple = 0;
|
andromedaCripple = 0;
|
||||||
theBeeCooldown = 0;
|
theBeeCooldown = 0;
|
||||||
scuttlerCooldown = 0;
|
scuttlerCooldown = 0;
|
||||||
rogueCrownCooldown = 0;
|
mageCrownTimer = 0;
|
||||||
wingProjectileCooldown = 0;
|
wingProjectileCooldown = 0;
|
||||||
hallowedRuneCooldown = 0;
|
hallowedRuneCooldown = 0;
|
||||||
sulphurBubbleCooldown = 0;
|
sulphurBubbleCooldown = 0;
|
||||||
@@ -3189,7 +3191,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
vaporfied = false;
|
vaporfied = false;
|
||||||
banishingFire = false;
|
banishingFire = false;
|
||||||
wither = false;
|
wither = false;
|
||||||
PurityHealSlowdownFrames = 0;
|
|
||||||
ImmobilityDebuffImmunityTimer = 0;
|
ImmobilityDebuffImmunityTimer = 0;
|
||||||
TypelessDebuffMultiplier = new();
|
TypelessDebuffMultiplier = new();
|
||||||
HeatDebuffMultiplier = new();
|
HeatDebuffMultiplier = new();
|
||||||
@@ -3305,6 +3306,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
healCounter = 300;
|
healCounter = 300;
|
||||||
danceOfLightCharge = 0;
|
danceOfLightCharge = 0;
|
||||||
ammoCost = 1f;
|
ammoCost = 1f;
|
||||||
|
partialLifeRegen = 0f;
|
||||||
healingPotionMultiplier = 1f;
|
healingPotionMultiplier = 1f;
|
||||||
avertorBonus = false;
|
avertorBonus = false;
|
||||||
divineBless = false;
|
divineBless = false;
|
||||||
@@ -3449,12 +3451,9 @@ namespace CalamityMod.CalPlayer
|
|||||||
CurrentlyViewedHologramText = string.Empty;
|
CurrentlyViewedHologramText = string.Empty;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
evilSmasherBoost = 0;
|
|
||||||
burningSeaBurnOut = 0;
|
burningSeaBurnOut = 0;
|
||||||
flareGunOverheat = 0;
|
flareGunOverheat = 0;
|
||||||
hellbornShots = 0;
|
hellbornShots = 0;
|
||||||
darklightEnergy = 0;
|
|
||||||
elementalMastery = 0;
|
|
||||||
garandShots = 0;
|
garandShots = 0;
|
||||||
persecutedEnchantSummonTimer = 0;
|
persecutedEnchantSummonTimer = 0;
|
||||||
momentumCapacitorTime = 0;
|
momentumCapacitorTime = 0;
|
||||||
@@ -4857,6 +4856,29 @@ namespace CalamityMod.CalPlayer
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region PreItemChecks
|
||||||
|
public override bool PreItemCheck()
|
||||||
|
{
|
||||||
|
//For use when the player runs out of mana. Currently only used for Feather and Moonstone Crown
|
||||||
|
if (Player.HeldItem.mana > 0 && Player.controlUseItem && Player.itemAnimation == 0)
|
||||||
|
{
|
||||||
|
if (!Player.CheckMana(Player.HeldItem, -1, false, true))
|
||||||
|
{
|
||||||
|
if (moonCrown || featherCrown)
|
||||||
|
{
|
||||||
|
if (mageCrownCount > 0)
|
||||||
|
{
|
||||||
|
mageCrownCount = 0;
|
||||||
|
mageCrownTimer = 300;
|
||||||
|
}
|
||||||
|
if (mageCrownCount < 0) mageCrownCount = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region PostUpdateEquips
|
#region PostUpdateEquips
|
||||||
public override void PostUpdateEquips()
|
public override void PostUpdateEquips()
|
||||||
{
|
{
|
||||||
@@ -5039,6 +5061,9 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (gSabaton && Player.whoAmI == Main.myPlayer)
|
if (gSabaton && Player.whoAmI == Main.myPlayer)
|
||||||
Player.jumpSpeedBoost += 2f;
|
Player.jumpSpeedBoost += 2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Update life regen that needs to happen before calculating debuffs
|
||||||
|
GeneralLifeRegen();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -5062,7 +5087,8 @@ namespace CalamityMod.CalPlayer
|
|||||||
|
|
||||||
//Flashlight
|
//Flashlight
|
||||||
//Due to being in postUpdate we need to adjust the mousepos for the player's movement that will have happened
|
//Due to being in postUpdate we need to adjust the mousepos for the player's movement that will have happened
|
||||||
var mouseworld = Main.MouseWorld + Player.position - Player.oldPosition;
|
mouseWorldListener = true;
|
||||||
|
var mouseworld = mouseWorld + Player.position - Player.oldPosition;
|
||||||
EnhancedDarknessSystem.lights.Add(new(center: Player.Center + Player.DirectionTo(mouseworld) * 750f, rotation: Player.DirectionTo(mouseworld).ToRotation() - MathHelper.PiOver2, vectorScale: new Vector2(0.85f * abyssFlashlightWidthMultiplier, 0.75f), texture: Request<Texture2D>("CalamityMod/Particles/BloomLineFade").Value));
|
EnhancedDarknessSystem.lights.Add(new(center: Player.Center + Player.DirectionTo(mouseworld) * 750f, rotation: Player.DirectionTo(mouseworld).ToRotation() - MathHelper.PiOver2, vectorScale: new Vector2(0.85f * abyssFlashlightWidthMultiplier, 0.75f), texture: Request<Texture2D>("CalamityMod/Particles/BloomLineFade").Value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5163,11 +5189,11 @@ namespace CalamityMod.CalPlayer
|
|||||||
((abyssalDivingSuit && Player.IsUnderwater()) ? 0.05f : 0f) +
|
((abyssalDivingSuit && Player.IsUnderwater()) ? 0.05f : 0f) +
|
||||||
(aquaticHeartWaterBuff ? AquaticHeart.WaterSpeedBoost : 0f) +
|
(aquaticHeartWaterBuff ? AquaticHeart.WaterSpeedBoost : 0f) +
|
||||||
(laudanum && Player.HasBuff(BuffID.VortexDebuff) ? 0.15f : 0f) +
|
(laudanum && Player.HasBuff(BuffID.VortexDebuff) ? 0.15f : 0f) +
|
||||||
((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) ? 0.15f : 0f) +
|
((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * FrostFlare.HealthRatioThreshold)) ? FrostFlare.AccelerationBoost : 0f) +
|
||||||
(dragonScales ? 0.1f : 0f) +
|
(dragonScales ? 0.1f : 0f) +
|
||||||
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
|
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
|
||||||
(silvaSet ? SilvaArmor.AccelerationBoost : 0f) +
|
(silvaSet ? SilvaArmor.AccelerationBoost : 0f) +
|
||||||
(getSandCloakAccelBoost ? 0.75f : 0f) +
|
(getSandCloakAccelBoost ? Items.Accessories.SandCloak.SandVeilAccelerationBoost : 0f) +
|
||||||
(ascendantInsignia ? (AscendantInsignia.AccelerationBoost - 0.25f) : 0f) + // Subtracted 0.25 provided by Soaring Insignia
|
(ascendantInsignia ? (AscendantInsignia.AccelerationBoost - 0.25f) : 0f) + // Subtracted 0.25 provided by Soaring Insignia
|
||||||
(statisNinjaBelt ? 0.6f : 0f) +
|
(statisNinjaBelt ? 0.6f : 0f) +
|
||||||
(statisVoidSash ? 0.85f : 0f) +
|
(statisVoidSash ? 0.85f : 0f) +
|
||||||
@@ -5183,7 +5209,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
(stressPills ? 0.05f : 0f) +
|
(stressPills ? 0.05f : 0f) +
|
||||||
((abyssalDivingSuit && Player.IsUnderwater()) ? 0.05f : 0f) +
|
((abyssalDivingSuit && Player.IsUnderwater()) ? 0.05f : 0f) +
|
||||||
(aquaticHeartWaterBuff ? AquaticHeart.WaterSpeedBoost : 0f) +
|
(aquaticHeartWaterBuff ? AquaticHeart.WaterSpeedBoost : 0f) +
|
||||||
((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) ? 0.15f : 0f) +
|
((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * FrostFlare.HealthRatioThreshold)) ? FrostFlare.AccelerationBoost : 0f) +
|
||||||
(dragonScales ? 0.1f : 0f) +
|
(dragonScales ? 0.1f : 0f) +
|
||||||
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
|
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
|
||||||
(silvaSet ? SilvaArmor.AccelerationBoost : 0f) +
|
(silvaSet ? SilvaArmor.AccelerationBoost : 0f) +
|
||||||
@@ -5521,6 +5547,8 @@ namespace CalamityMod.CalPlayer
|
|||||||
{
|
{
|
||||||
Main.projectile[p].DamageType = DamageClass.Generic; //Makes it not proc shit like nanotech, extorter and other stuff
|
Main.projectile[p].DamageType = DamageClass.Generic; //Makes it not proc shit like nanotech, extorter and other stuff
|
||||||
Main.projectile[p].Calamity().LocketClone = true; //To not have clones trigger effects like Sacrifice's Lifesteal and Final Dawn's stealth generation
|
Main.projectile[p].Calamity().LocketClone = true; //To not have clones trigger effects like Sacrifice's Lifesteal and Final Dawn's stealth generation
|
||||||
|
|
||||||
|
Projectile.NewProjectile(LocketSource, Main.projectile[p].Center, Vector2.Zero, ModContent.ProjectileType<DoGWeaponTeleportRift>(), 0, 0, Player.whoAmI); // Spawn a little portal!
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle AI edge-cases. These are like overlapping projectiles and the projectile not spawning at all
|
// Handle AI edge-cases. These are like overlapping projectiles and the projectile not spawning at all
|
||||||
@@ -5896,32 +5924,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
price /= vanillaPriceMult;
|
price /= vanillaPriceMult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PostNurseHeal(NPC nurse, int health, bool removeDebuffs, int price)
|
|
||||||
{
|
|
||||||
// Remove excess alcohol
|
|
||||||
if (removeDebuffs && alcoholPoisonLevel > 3)
|
|
||||||
{
|
|
||||||
List<int[]> Alcohol = new List<int[]>();
|
|
||||||
for (int i = 0; i < Player.MaxBuffs; i++)
|
|
||||||
{
|
|
||||||
int buff = Player.buffType[i];
|
|
||||||
if (CalamityBuffSets.AlcoholStrength.TryGetValue(buff, out int level))
|
|
||||||
Alcohol.Insert(0, new int[] { i, level });
|
|
||||||
}
|
|
||||||
|
|
||||||
int poison = alcoholPoisonLevel;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
// Obtain the index:level relationship
|
|
||||||
int[] relation = Alcohol[0];
|
|
||||||
Player.DelBuff(relation[0]); // Remove the alcohol
|
|
||||||
poison -= relation[1]; // Cancel the poison level
|
|
||||||
Alcohol.RemoveAt(0);
|
|
||||||
}
|
|
||||||
while (poison > 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Rogue Stealth
|
#region Rogue Stealth
|
||||||
@@ -6091,12 +6093,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
stealthGenMoving += ShadowPotion.StealthRegenBoost;
|
stealthGenMoving += ShadowPotion.StealthRegenBoost;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eArtifact)
|
|
||||||
{
|
|
||||||
stealthGenStandstill += 0.15f;
|
|
||||||
stealthGenMoving += 0.15f;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Accessory modifiers can boost these stats
|
// Accessory modifiers can boost these stats
|
||||||
stealthGenStandstill += accStealthGenBoost;
|
stealthGenStandstill += accStealthGenBoost;
|
||||||
stealthGenMoving += accStealthGenBoost;
|
stealthGenMoving += accStealthGenBoost;
|
||||||
@@ -6303,6 +6299,18 @@ namespace CalamityMod.CalPlayer
|
|||||||
life.noGravity = true;
|
life.noGravity = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (modPlayer.fleshTotem)
|
||||||
|
{
|
||||||
|
if (Main.myPlayer == Player.whoAmI)
|
||||||
|
{
|
||||||
|
fleshTotemManaStorage += manaConsumed;
|
||||||
|
if (fleshTotemManaStorage >= FleshTotem.manaStorageMax)
|
||||||
|
{
|
||||||
|
fleshTotemManaStorage = FleshTotem.manaStorageMax;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using CalamityMod.Balancing;
|
|||||||
using CalamityMod.CalPlayer.Dashes;
|
using CalamityMod.CalPlayer.Dashes;
|
||||||
using CalamityMod.EntitySources;
|
using CalamityMod.EntitySources;
|
||||||
using CalamityMod.Enums;
|
using CalamityMod.Enums;
|
||||||
|
using CalamityMod.Items.Accessories;
|
||||||
using CalamityMod.Items.Mounts;
|
using CalamityMod.Items.Mounts;
|
||||||
using CalamityMod.Projectiles.Typeless;
|
using CalamityMod.Projectiles.Typeless;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
@@ -132,6 +133,10 @@ namespace CalamityMod.CalPlayer
|
|||||||
dashDelayToApply = BalancingConstants.UniversalShieldBonkCooldown;
|
dashDelayToApply = BalancingConstants.UniversalShieldBonkCooldown;
|
||||||
if (DashID == DeepDiverDash.ID || (evasionScarf && DashID == CounterScarfDash.ID))
|
if (DashID == DeepDiverDash.ID || (evasionScarf && DashID == CounterScarfDash.ID))
|
||||||
dashDelayToApply = (int)(dashDelayToApply * 0.75f);
|
dashDelayToApply = (int)(dashDelayToApply * 0.75f);
|
||||||
|
if (DashID == V8EngineDash.ID)
|
||||||
|
dashDelayToApply = (int)(dashDelayToApply * V8Engine.DashDelayModifier);
|
||||||
|
if (DashID == V8000EngineDash.ID)
|
||||||
|
dashDelayToApply = (int)(dashDelayToApply * V8000Engine.DashDelayModifier);
|
||||||
if (DashID == StatisNinjaBeltDash.ID || DashID == StatisVoidSashDash.ID || Player.dashType == 1)
|
if (DashID == StatisNinjaBeltDash.ID || DashID == StatisVoidSashDash.ID || Player.dashType == 1)
|
||||||
dashDelayToApply = BalancingConstants.UniversalSashDashCooldown;
|
dashDelayToApply = BalancingConstants.UniversalSashDashCooldown;
|
||||||
|
|
||||||
@@ -144,15 +149,11 @@ namespace CalamityMod.CalPlayer
|
|||||||
|
|
||||||
// Handle mid-dash effects.
|
// Handle mid-dash effects.
|
||||||
UsedDash.MidDashEffects(Player, ref dashSpeed, ref dashSpeedDecelerationFactor, ref runSpeedDecelerationFactor);
|
UsedDash.MidDashEffects(Player, ref dashSpeed, ref dashSpeedDecelerationFactor, ref runSpeedDecelerationFactor);
|
||||||
int VerticalOmnidashCap = DashID == GodslayerArmorDash.ID ? 75 : 25;
|
if (UsedDash.ForceEndAt > 0)
|
||||||
if (UsedDash.IsOmnidirectional && VerticalOmnidashTimer < VerticalOmnidashCap)
|
|
||||||
{
|
{
|
||||||
VerticalOmnidashTimer++;
|
if (UsedDash.dashTime >= UsedDash.ForceEndAt)
|
||||||
if (VerticalOmnidashTimer >= VerticalOmnidashCap)
|
|
||||||
{
|
{
|
||||||
Player.dashDelay = dashDelayToApply;
|
Player.dashDelay = dashDelayToApply;
|
||||||
// Stop the player from going flying
|
|
||||||
Player.velocity *= 0.2f;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,7 +232,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle first-frame effects.
|
// Handle first-frame effects.
|
||||||
else if (HasCustomDash && !Player.mount.Active)
|
else if (HasCustomDash && (!Player.mount.Active || DashID == V8EngineDash.ID || DashID == V8000EngineDash.ID))
|
||||||
{
|
{
|
||||||
UsedDash.dashTime = 0;
|
UsedDash.dashTime = 0;
|
||||||
if (DoADash(UsedDash.CalculateDashSpeed(Player)))
|
if (DoADash(UsedDash.CalculateDashSpeed(Player)))
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ using CalamityMod.NPCs.Providence;
|
|||||||
using CalamityMod.NPCs.SupremeCalamitas;
|
using CalamityMod.NPCs.SupremeCalamitas;
|
||||||
using CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses;
|
using CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses;
|
||||||
using CalamityMod.Particles;
|
using CalamityMod.Particles;
|
||||||
|
using CalamityMod.Projectiles.Magic;
|
||||||
using CalamityMod.Projectiles.Melee;
|
using CalamityMod.Projectiles.Melee;
|
||||||
using CalamityMod.Projectiles.Ranged;
|
using CalamityMod.Projectiles.Ranged;
|
||||||
using CalamityMod.Projectiles.Rogue;
|
using CalamityMod.Projectiles.Rogue;
|
||||||
@@ -594,7 +595,19 @@ namespace CalamityMod.CalPlayer
|
|||||||
{
|
{
|
||||||
if (proj.npcProj || proj.trap)
|
if (proj.npcProj || proj.trap)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
//Add raider crit before hit
|
||||||
|
if (!proj.Calamity().stealthStrike && !proj.Calamity().stealthStrikeSubProjectile && raiderCritLifespan > 0f)
|
||||||
|
{
|
||||||
|
if (nanotech)
|
||||||
|
proj.CritChance += Items.Accessories.Nanotech.RaiderBonus;
|
||||||
|
else if (vampiricTalisman)
|
||||||
|
proj.CritChance += VampiricTalisman.RaiderBonus;
|
||||||
|
else if (raiderTalisman)
|
||||||
|
proj.CritChance += RaidersTalisman.RaiderBonus;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
modifiers.CritDamage += critDamage;
|
modifiers.CritDamage += critDamage;
|
||||||
|
|
||||||
// All Calamity multipliers are added together to prevent insane exponential stacking
|
// All Calamity multipliers are added together to prevent insane exponential stacking
|
||||||
@@ -790,10 +803,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
// The amount of damage that will be dealt is yet to be determined.
|
// The amount of damage that will be dealt is yet to be determined.
|
||||||
//
|
//
|
||||||
|
|
||||||
// Can't have any cooldowns here because dodges grrrrr....
|
|
||||||
if (fleshTotem && !Player.HasCooldown(Cooldowns.FleshTotem.ID) && TotalEnergyShielding <= 0)
|
|
||||||
modifiers.FinalDamage *= 0.5f;
|
|
||||||
|
|
||||||
if (tarragonCloak && tarraMelee && !Player.HasCooldown(Cooldowns.TarragonCloak.ID))
|
if (tarragonCloak && tarraMelee && !Player.HasCooldown(Cooldowns.TarragonCloak.ID))
|
||||||
modifiers.FinalDamage *= (1f - TarragonHeadMelee.CloakContactDamageReduction);
|
modifiers.FinalDamage *= (1f - TarragonHeadMelee.CloakContactDamageReduction);
|
||||||
|
|
||||||
@@ -1083,10 +1092,9 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (!hasIFrames && !Player.creativeGodMode)
|
if (!hasIFrames && !Player.creativeGodMode)
|
||||||
nextHitDealsDefenseDamage |= npc.Calamity().canBreakPlayerDefense;
|
nextHitDealsDefenseDamage |= npc.Calamity().canBreakPlayerDefense;
|
||||||
|
|
||||||
// ModifyHit (Flesh Totem effect happens here) -> Hurt (includes dodges) -> OnHit
|
// ModifyHit -> Hurt (includes dodges) -> OnHit
|
||||||
// As such, to avoid cooldowns proccing from dodge hits, do it here
|
// As such, to avoid cooldowns proccing from dodge hits, do it here
|
||||||
if (fleshTotem && !Player.HasCooldown(Cooldowns.FleshTotem.ID) && hurtInfo.Damage > 0)
|
|
||||||
Player.AddCooldown(Cooldowns.FleshTotem.ID, CalamityUtils.SecondsToFrames(20));
|
|
||||||
|
|
||||||
if (NPC.AnyNPCs(ModContent.NPCType<THELORDE>()))
|
if (NPC.AnyNPCs(ModContent.NPCType<THELORDE>()))
|
||||||
Player.AddBuff(ModContent.BuffType<NOU>(), 15, true);
|
Player.AddBuff(ModContent.BuffType<NOU>(), 15, true);
|
||||||
@@ -1628,7 +1636,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
|
|
||||||
#region Player Incoming Damage Multiplier (Increases)
|
#region Player Incoming Damage Multiplier (Increases)
|
||||||
double damageMult = 1D;
|
double damageMult = 1D;
|
||||||
if (dArtifact) // Dimensional Soul Artifact increases incoming damage by 15%.
|
if (crushingEgo) // Dimensional Soul Artifact increases incoming damage by 15%.
|
||||||
damageMult += 0.15;
|
damageMult += 0.15;
|
||||||
if (enraged) // Demonshade Enrage
|
if (enraged) // Demonshade Enrage
|
||||||
damageMult += DemonshadeHelm.MultDamageTakenBoost;
|
damageMult += DemonshadeHelm.MultDamageTakenBoost;
|
||||||
@@ -2220,9 +2228,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
LoseAdrenalineOnHurt(hurtInfo, false);
|
LoseAdrenalineOnHurt(hurtInfo, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (evilSmasherBoost > 0)
|
|
||||||
evilSmasherBoost -= 1;
|
|
||||||
|
|
||||||
if (trinketOfChi)
|
if (trinketOfChi)
|
||||||
chiBuffTimer = 0;
|
chiBuffTimer = 0;
|
||||||
|
|
||||||
@@ -2232,7 +2237,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
SoundEngine.PlaySound(SoundID.Item96, Player.Center);
|
SoundEngine.PlaySound(SoundID.Item96, Player.Center);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gShell) //3 seconds of no dash reduction and reduced defense
|
if (gShell)
|
||||||
{
|
{
|
||||||
if (giantShellPostHit == 0)
|
if (giantShellPostHit == 0)
|
||||||
{
|
{
|
||||||
@@ -2249,10 +2254,10 @@ namespace CalamityMod.CalPlayer
|
|||||||
dust.scale = Main.rand.NextFloat(1.5f, 1.2f);
|
dust.scale = Main.rand.NextFloat(1.5f, 1.2f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
giantShellPostHit = 180;
|
giantShellPostHit = GiantShell.PostHitCancelDuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tortShell) //3 seconds of no dash reduction and reduced defense
|
if (tortShell)
|
||||||
{
|
{
|
||||||
if (tortShellPostHit == 0)
|
if (tortShellPostHit == 0)
|
||||||
{
|
{
|
||||||
@@ -2269,7 +2274,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
dust.scale = Main.rand.NextFloat(1.6f, 2.2f);
|
dust.scale = Main.rand.NextFloat(1.6f, 2.2f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tortShellPostHit = 180;
|
tortShellPostHit = GiantTortoiseShell.PostHitCancelDuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aquaticHeartIce)
|
if (aquaticHeartIce)
|
||||||
@@ -2329,11 +2334,35 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (duration > 120)
|
if (duration > 120)
|
||||||
duration = 120;
|
duration = 120;
|
||||||
|
|
||||||
npc.AddBuff(ModContent.BuffType<GlacialState>(), (int)duration, false);
|
npc.AddBuff(BuffID.Frozen, (int)duration, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fleshTotem && hurtInfo.Damage > 0)
|
||||||
|
{
|
||||||
|
SoundStyle Counter = new SoundStyle("CalamityMod/Sounds/Custom/BrainOfCthulhu/BoC_Rev_Shield_Down");
|
||||||
|
if (fleshTotemManaStorage >= 100 && fleshTotemVisual)
|
||||||
|
SoundEngine.PlaySound(Counter with { Volume = 0.75f}, Player.Center);
|
||||||
|
int lostSoulAmount = fleshTotemManaStorage / 25;
|
||||||
|
if (Player.ownedProjectileCounts[ModContent.ProjectileType<FleshTotemMinion>()] != 0)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||||
|
{
|
||||||
|
Projectile proj = Main.projectile[i];
|
||||||
|
if (proj.active && proj.owner == Player.whoAmI && proj.type == ModContent.ProjectileType<FleshTotemMinion>())
|
||||||
|
{
|
||||||
|
for (int k = 0; k < lostSoulAmount; k++)
|
||||||
|
{
|
||||||
|
Projectile.NewProjectile(Player.GetSource_Accessory_OnHurt(FindAccessory<FleshTotem>(), hurtInfo.DamageSource), proj.Center, new Vector2(10, 10).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.55f), ModContent.ProjectileType<FleshTotemSoul>(), FleshTotem.lostSoulDamage, 0f, Main.myPlayer, 0f, 0f, 3f);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fleshTotemManaStorage = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// By setting brainOfConfusionItem, these accessories have this code already,
|
// By setting brainOfConfusionItem, these accessories have this code already,
|
||||||
// but doing it again allows for increased duration + The Amalgam's other buffs,
|
// but doing it again allows for increased duration + The Amalgam's other buffs,
|
||||||
// and also doesn't have random chance (why does Brain of Confusion not guarantee confusion on hit)
|
// and also doesn't have random chance (why does Brain of Confusion not guarantee confusion on hit)
|
||||||
|
|||||||
@@ -48,22 +48,22 @@ namespace CalamityMod.CalPlayer
|
|||||||
{
|
{
|
||||||
int totalVanillaDoT = 0;
|
int totalVanillaDoT = 0;
|
||||||
|
|
||||||
if (Player.poisoned && !purity)
|
if (Player.poisoned)
|
||||||
totalVanillaDoT += 4;
|
totalVanillaDoT += 4;
|
||||||
|
|
||||||
if (Player.onFire && !purity)
|
if (Player.onFire)
|
||||||
totalVanillaDoT += 8;
|
totalVanillaDoT += 8;
|
||||||
|
|
||||||
if (Player.tongued)
|
if (Player.tongued)
|
||||||
totalVanillaDoT += 100;
|
totalVanillaDoT += 100;
|
||||||
|
|
||||||
if (Player.venom && !purity)
|
if (Player.venom)
|
||||||
totalVanillaDoT += 12;
|
totalVanillaDoT += 12;
|
||||||
|
|
||||||
if (Player.onFrostBurn && !purity)
|
if (Player.onFrostBurn)
|
||||||
totalVanillaDoT += 12;
|
totalVanillaDoT += 12;
|
||||||
|
|
||||||
if (Player.onFire2 && !purity)
|
if (Player.onFire2)
|
||||||
totalVanillaDoT += 12;
|
totalVanillaDoT += 12;
|
||||||
|
|
||||||
if (Player.burned)
|
if (Player.burned)
|
||||||
@@ -72,7 +72,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (Player.suffocating)
|
if (Player.suffocating)
|
||||||
totalVanillaDoT += 40;
|
totalVanillaDoT += 40;
|
||||||
|
|
||||||
if (Player.electrified && !purity)
|
if (Player.electrified)
|
||||||
{
|
{
|
||||||
totalVanillaDoT += eleResist ? 4 : 8;
|
totalVanillaDoT += eleResist ? 4 : 8;
|
||||||
if (Player.controlLeft || Player.controlRight)
|
if (Player.controlLeft || Player.controlRight)
|
||||||
@@ -101,38 +101,38 @@ namespace CalamityMod.CalPlayer
|
|||||||
// Whispering Death sets positive regen to zero but doesn't actually deal any damage
|
// Whispering Death sets positive regen to zero but doesn't actually deal any damage
|
||||||
ApplyDoTDebuff(whisperingDeath, 0, laudanum);
|
ApplyDoTDebuff(whisperingDeath, 0, laudanum);
|
||||||
|
|
||||||
ApplyDoTDebuff(irradiated, 4, purity);
|
ApplyDoTDebuff(irradiated, 4);
|
||||||
int sulphurDoT = 6 - (sulphurSet ? 2 : 0) - (sulphurskin ? 2 : 0) - (corrosiveSpine ? 2 : 0);
|
int sulphurDoT = 6 - (sulphurSet ? 2 : 0) - (sulphurskin ? 2 : 0) - (corrosiveSpine ? 2 : 0);
|
||||||
ApplyDoTDebuff(sulphurPoison, sulphurDoT, purity);
|
ApplyDoTDebuff(sulphurPoison, sulphurDoT);
|
||||||
ApplyDoTDebuff(riptide, 6, purity);
|
ApplyDoTDebuff(riptide, 6);
|
||||||
ApplyDoTDebuff(weakBrimstoneFlames, 7);
|
ApplyDoTDebuff(weakBrimstoneFlames, 7);
|
||||||
ApplyDoTDebuff(burningBlood, 8, purity);
|
ApplyDoTDebuff(burningBlood, 8);
|
||||||
ApplyDoTDebuff(brainRot, 8, purity);
|
ApplyDoTDebuff(brainRot, 8);
|
||||||
ApplyDoTDebuff(vaporfied, 8, purity);
|
ApplyDoTDebuff(vaporfied, 8);
|
||||||
int staticDoT = ((Player.controlLeft || Player.controlRight) ? 12 : 3) / (eleResist ? 2 : 1);
|
int staticDoT = ((Player.controlLeft || Player.controlRight) ? 12 : 3) / (eleResist ? 2 : 1);
|
||||||
ApplyDoTDebuff(staticDischarge, staticDoT, purity);
|
ApplyDoTDebuff(staticDischarge, staticDoT);
|
||||||
ApplyDoTDebuff(heavybleeding, 16, purity);
|
ApplyDoTDebuff(heavybleeding, 16);
|
||||||
ApplyDoTDebuff(crushDepth, 18, purity);
|
ApplyDoTDebuff(crushDepth, 18);
|
||||||
ApplyDoTDebuff(astralInfection, 24, infectedJewel || hideOfDeus || purity);
|
ApplyDoTDebuff(astralInfection, 24, hideOfDeus);
|
||||||
ApplyDoTDebuff(shadowflame, 30, purity);
|
ApplyDoTDebuff(shadowflame, 30);
|
||||||
ApplyDoTDebuff(brimstoneFlames, 30, purity);
|
ApplyDoTDebuff(brimstoneFlames, 30);
|
||||||
ApplyDoTDebuff(plague, (int)MathF.Round(30 * (alchFlask ? (1f - AlchemicalDecanter.PlagueReduction) : 1f)), purity);
|
ApplyDoTDebuff(plague, (int)MathF.Round(30 * (alchFlask ? (1f - AlchemicalDecanter.PlagueReduction) : 1f)));
|
||||||
ApplyDoTDebuff(vHex, 30); // Has other effects
|
ApplyDoTDebuff(vHex, 30); // Has other effects
|
||||||
ApplyDoTDebuff(searingLava, 30);
|
ApplyDoTDebuff(searingLava, 30);
|
||||||
ApplyDoTDebuff(demonicFlames, 33, purity); // Never inflicted on the player
|
ApplyDoTDebuff(demonicFlames, 33); // Never inflicted on the player
|
||||||
ApplyDoTDebuff(laceration, 36, purity);
|
ApplyDoTDebuff(laceration, 36);
|
||||||
ApplyDoTDebuff(daybroken, 40, purity);
|
ApplyDoTDebuff(daybroken, 40);
|
||||||
ApplyDoTDebuff(bane, 40, purity);
|
ApplyDoTDebuff(bane, 40);
|
||||||
ApplyDoTDebuff(nightwither, 40, purity);
|
ApplyDoTDebuff(nightwither, 40);
|
||||||
ApplyDoTDebuff(holyFlames, 40, purity);
|
ApplyDoTDebuff(holyFlames, 40);
|
||||||
ApplyDoTDebuff(voidfrost, 40, purity);
|
ApplyDoTDebuff(voidfrost, 40);
|
||||||
ApplyDoTDebuff(hadopelagicPressure, 40, purity);
|
ApplyDoTDebuff(hadopelagicPressure, 40);
|
||||||
|
|
||||||
// Profaned Soul Crystal turns you into Providence, a God, and you take more damage from God Slayer Inferno
|
// Profaned Soul Crystal turns you into Providence, a God, and you take more damage from God Slayer Inferno
|
||||||
ApplyDoTDebuff(godSlayerInferno, profanedCrystalBuffs ? 50 : 40);
|
ApplyDoTDebuff(godSlayerInferno, profanedCrystalBuffs ? 50 : 40);
|
||||||
int fluxDoT = ((Player.controlLeft || Player.controlRight) ? 50 : 10) / (eleResist ? 2 : 1);
|
int fluxDoT = ((Player.controlLeft || Player.controlRight) ? 50 : 10) / (eleResist ? 2 : 1);
|
||||||
ApplyDoTDebuff(vermillionFlux, fluxDoT);
|
ApplyDoTDebuff(vermillionFlux, fluxDoT);
|
||||||
ApplyDoTDebuff(elementalMix, 50, purity); // Never inflicted on the player
|
ApplyDoTDebuff(elementalMix, 50); // Never inflicted on the player
|
||||||
ApplyDoTDebuff(trueVHex, 50);
|
ApplyDoTDebuff(trueVHex, 50);
|
||||||
int dragonfireDoT = ((Player.name == "JFL" || Player.name == "MrJFL") ? 200 : 50) / (dynamoStemCells ? 2 : 1);
|
int dragonfireDoT = ((Player.name == "JFL" || Player.name == "MrJFL") ? 200 : 50) / (dynamoStemCells ? 2 : 1);
|
||||||
ApplyDoTDebuff(dragonFire, dragonfireDoT);
|
ApplyDoTDebuff(dragonFire, dragonfireDoT);
|
||||||
@@ -218,9 +218,8 @@ namespace CalamityMod.CalPlayer
|
|||||||
// Independently of Calamity's nerfs to Nebula life regen, it is disabled entirely by alcohol poisoning.
|
// Independently of Calamity's nerfs to Nebula life regen, it is disabled entirely by alcohol poisoning.
|
||||||
Player.nebulaLevelLife = 0;
|
Player.nebulaLevelLife = 0;
|
||||||
|
|
||||||
// This has to last over 60 frames for the nurse to count the debuff, so...
|
|
||||||
if (Player.whoAmI == Main.myPlayer)
|
if (Player.whoAmI == Main.myPlayer)
|
||||||
Player.AddBuff(ModContent.BuffType<AlcoholPoisoning>(), 61, false);
|
Player.AddBuff(ModContent.BuffType<AlcoholPoisoning>(), 2, false);
|
||||||
|
|
||||||
if (Player.lifeRegen > 0)
|
if (Player.lifeRegen > 0)
|
||||||
Player.lifeRegen = 0;
|
Player.lifeRegen = 0;
|
||||||
@@ -276,25 +275,23 @@ namespace CalamityMod.CalPlayer
|
|||||||
|
|
||||||
bool hasLifeRegenHinderingDebuff = Player.lifeRegenTime == 0;
|
bool hasLifeRegenHinderingDebuff = Player.lifeRegenTime == 0;
|
||||||
|
|
||||||
#region Life Regen That Works Even During DoT Debuffs
|
|
||||||
if (honeyDewHalveDebuffs)
|
|
||||||
{
|
|
||||||
// Tick down all sickness debuffs; this makes them expire 2x faster
|
|
||||||
// Upgrades increase the sets of debuffs which expire faster
|
|
||||||
for (int l = 0; l < Player.MaxBuffs; ++l)
|
|
||||||
{
|
|
||||||
int buffID = Player.buffType[l];
|
|
||||||
if (Player.buffTime[l] <= 2 || BuffDatasets.DebuffDataset[buffID] is null)
|
|
||||||
continue;
|
|
||||||
bool shouldHalveDuration = BuffDatasets.DebuffDataset[buffID].SicknessDebuffScaling > 0;
|
|
||||||
if (livingDewHalveDebuffs)
|
|
||||||
shouldHalveDuration |= BuffDatasets.DebuffDataset[buffID].HeatDebuffScaling > 0;
|
|
||||||
if (purity)
|
|
||||||
shouldHalveDuration |= CalamityBuffSets.IsDebuff[buffID];
|
|
||||||
|
|
||||||
if (shouldHalveDuration)
|
#region Life Regen That Works Even During DoT Debuffs
|
||||||
--Player.buffTime[l];
|
|
||||||
}
|
//Negation of debuffs. These all will not take life regen above 0
|
||||||
|
if (Player.lifeRegen < 0)
|
||||||
|
{
|
||||||
|
if (crownJewel)
|
||||||
|
Player.lifeRegen += CrownJewel.ReducedDoTAmount;
|
||||||
|
|
||||||
|
if (infectedJewel)
|
||||||
|
Player.lifeRegen += InfectedJewel.ReducedDoTAmount;
|
||||||
|
|
||||||
|
if (purity)
|
||||||
|
Player.lifeRegen += Radiance.ReducedDoTAmount;
|
||||||
|
|
||||||
|
if (Player.lifeRegen > 0)
|
||||||
|
Player.lifeRegen = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (divineBless)
|
if (divineBless)
|
||||||
@@ -308,19 +305,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
|
|
||||||
if (bloodfinBoost)
|
if (bloodfinBoost)
|
||||||
{
|
{
|
||||||
if (Player.lifeRegen < 0)
|
|
||||||
{
|
|
||||||
if (Player.lifeRegenTime < Bloodfin.DebuffedRegenTimeFloor)
|
|
||||||
Player.lifeRegenTime = Bloodfin.DebuffedRegenTimeFloor;
|
|
||||||
|
|
||||||
Player.lifeRegen += Bloodfin.DebuffedRegenBoost;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Player.lifeRegen += Bloodfin.RegenBoost;
|
|
||||||
Player.lifeRegenTime += Bloodfin.RegenTimeBoost;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bloodfinTimer > 0)
|
if (bloodfinTimer > 0)
|
||||||
bloodfinTimer--;
|
bloodfinTimer--;
|
||||||
|
|
||||||
@@ -328,124 +312,37 @@ namespace CalamityMod.CalPlayer
|
|||||||
{
|
{
|
||||||
bloodfinTimer = Bloodfin.FramesForExtraRegen;
|
bloodfinTimer = Bloodfin.FramesForExtraRegen;
|
||||||
|
|
||||||
if (Player.statLife < (int)(Player.statLifeMax2 * Bloodfin.ExtraRegenHealthThreshold) && !noLifeRegen)
|
if (!noLifeRegen)
|
||||||
Player.HealPlayer(1, HealTextType.None);
|
Player.HealPlayer(1, HealTextType.None);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Permafrost's Concoction increases life regen while afflicted with a fire debuff
|
// Permafrost's Concoction increases life regen while afflicted with a fire debuff
|
||||||
if (permafrostsConcoction && Player.buffType.Any(l => BuffDatasets.DebuffDataset[l] is not null && BuffDatasets.DebuffDataset[l].HeatDebuffScaling > 0))
|
if (permafrostsConcoction && Player.buffType.Any(l => BuffDatasets.DebuffDataset[l] is not null && BuffDatasets.DebuffDataset[l].HeatDebuffScaling > 0))
|
||||||
{
|
|
||||||
if (Player.lifeRegenTime < 900)
|
|
||||||
Player.lifeRegenTime = 900;
|
|
||||||
|
|
||||||
Player.lifeRegen += 6;
|
Player.lifeRegen += 6;
|
||||||
}
|
|
||||||
|
|
||||||
// Grant life regen based on missing health for Radiant Ooze, Ambrosial Ampule, and purity
|
if (grandDadHealTimer == 0 && grandDadHealPool >= 7)
|
||||||
if (rOoze || aAmpoule || purity)
|
|
||||||
{
|
{
|
||||||
float missingLifeRatio = (Player.statLifeMax2 - Player.statLife) / (float)Player.statLifeMax2;
|
Player.HealPlayer(7, HealTextType.Broadcast);
|
||||||
//Ambrosial Ampule and ooze give between 2 and 5 hp/s
|
grandDadHealPool -= 7;
|
||||||
int lifeRegenToGive = (int)Math.Round(MathHelper.Lerp(RadiantOoze.MinRegenBoost, RadiantOoze.MaxRegenBoost, missingLifeRatio));//Rounding is needed for it to ever actually give +5 hp/s, as the integer conversion would otherwise floor it.
|
grandDadHealTimer = (int)(30 * Utils.GetLerpValue(260, 60, grandDadHealPool, true));
|
||||||
Player.lifeRegen += lifeRegenToGive;
|
|
||||||
radiantOozeRegen += lifeRegenToGive / 2f;
|
|
||||||
purityRegen += lifeRegenToGive / 2f;
|
|
||||||
}
|
}
|
||||||
|
else if (grandDadHealTimer > 0)
|
||||||
|
grandDadHealTimer--;
|
||||||
|
|
||||||
if (purity)
|
//Raising natural regen post-damaging-debuff
|
||||||
|
if (hadLifeRegenHinderingDebuff && !hasLifeRegenHinderingDebuff)
|
||||||
{
|
{
|
||||||
int intendedPurityDefense = 0;
|
if (infectedJewel)
|
||||||
int currentDebuffs = Player.buffType.Count(i => CalamityBuffSets.IsDebuff[i]);
|
Player.lifeRegenTime += InfectedJewel.PostDebuffRegenTimeBoost;
|
||||||
if (currentDebuffs > 0)
|
|
||||||
{
|
|
||||||
// Healing rate is normally 5 HP/s (+1 every 12 frames)
|
|
||||||
// However, that 12 frames can and will slowly increase if you try to abuse this accessory
|
|
||||||
int healFrameCadence = 12;
|
|
||||||
|
|
||||||
// Healing slows down after 5 seconds (300 frames) debuffed. For every 15 frames thereafter the cadence slows
|
if (purity)
|
||||||
// The upper limit to how slow it can get is after 15 seconds (900 frames)
|
Player.lifeRegenTime += Radiance.PostDebuffRegenTimeBoost;
|
||||||
int punishmentFrames = PurityHealSlowdownFrames - 300;
|
|
||||||
//lowest punishment is a little under a second between the one health heal
|
|
||||||
if (healFrameCadence < 52)
|
|
||||||
healFrameCadence += (punishmentFrames < 0) ? 0 : punishmentFrames / 15;
|
|
||||||
|
|
||||||
if (Player.miscCounter % healFrameCadence == healFrameCadence - 1)
|
if (tequilaSunrise)
|
||||||
Player.Heal(1);
|
|
||||||
|
|
||||||
intendedPurityDefense = 15 + (currentDebuffs - 1) * 5;
|
|
||||||
if (jewelBonusDefense < intendedPurityDefense)
|
|
||||||
jewelBonusDefense = intendedPurityDefense;
|
|
||||||
|
|
||||||
// Count up total frames spent healing for slowdown.
|
|
||||||
if (PurityHealSlowdownFrames < 900)
|
|
||||||
++PurityHealSlowdownFrames;
|
|
||||||
purityRegen += (60 / (float)healFrameCadence);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the defense should be ticking down to some lower value, do that.
|
|
||||||
// Purity loses 1 point of defense every second.
|
|
||||||
if (Player.miscCounter % 60 == 0 && jewelBonusDefense > intendedPurityDefense)
|
|
||||||
--jewelBonusDefense;
|
|
||||||
|
|
||||||
// If the player is clear of all debuffs then gradually reduce the slowdown frames
|
|
||||||
if (currentDebuffs <= 0)
|
|
||||||
{
|
|
||||||
--PurityHealSlowdownFrames;
|
|
||||||
if (PurityHealSlowdownFrames < 0)
|
|
||||||
PurityHealSlowdownFrames = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Actually apply defense bonus
|
|
||||||
Player.statDefense += jewelBonusDefense;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Infected Jewel does not stack with Purity
|
|
||||||
else if (infectedJewel)
|
|
||||||
{
|
|
||||||
Player.lifeRegen += 2;
|
|
||||||
|
|
||||||
// If the player has any debuffs, give the extra life regen and defense
|
|
||||||
// More defense is given for each additional debuff
|
|
||||||
int intendedJewelDefense = 0;
|
|
||||||
int currentDebuffs = Player.buffType.Count(i => CalamityBuffSets.IsDebuff[i]);
|
|
||||||
if (currentDebuffs > 0)
|
|
||||||
{
|
|
||||||
Player.lifeRegen += 4;
|
|
||||||
|
|
||||||
intendedJewelDefense = 12 + (currentDebuffs - 1) * 4;
|
|
||||||
if (jewelBonusDefense < intendedJewelDefense)
|
|
||||||
jewelBonusDefense = intendedJewelDefense;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the defense should be ticking down to some lower value, do that.
|
|
||||||
// Infected Jewel loses 1 point of defense every 20 frames.
|
|
||||||
if (Player.miscCounter % 60 == 0 && jewelBonusDefense > intendedJewelDefense)
|
|
||||||
--jewelBonusDefense;
|
|
||||||
|
|
||||||
// Actually apply defense bonus
|
|
||||||
Player.statDefense += jewelBonusDefense;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Crown Jewel does not stack with Purity or Infected Jewel
|
|
||||||
else if (crownJewel)
|
|
||||||
{
|
|
||||||
Player.lifeRegen += 2;
|
|
||||||
|
|
||||||
// If any debuff is detected, provide even more life regen
|
|
||||||
if (Player.buffType.Any(i => CalamityBuffSets.IsDebuff[i]))
|
|
||||||
Player.lifeRegen += 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
//If a player had a life regen hindering debuff, add 30 seconds to their regen time when under Tequila Sunrise
|
|
||||||
//This stacks with all other post-debuff boosts due to Tequila Sunrise increasing DoT damage taken
|
|
||||||
if (tequilaSunrise)
|
|
||||||
{
|
|
||||||
if (hadLifeRegenHinderingDebuff && !hasLifeRegenHinderingDebuff)
|
|
||||||
{
|
|
||||||
Player.lifeRegenTime += 1800;
|
Player.lifeRegenTime += 1800;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// During Silva revive or God Slayer dash, all negative life regen is canceled
|
// During Silva revive or God Slayer dash, all negative life regen is canceled
|
||||||
@@ -520,24 +417,43 @@ namespace CalamityMod.CalPlayer
|
|||||||
// The bleedout is applied by directly reducing the player's health. It is not canceled by anything.
|
// The bleedout is applied by directly reducing the player's health. It is not canceled by anything.
|
||||||
ChaliceOfTheBloodGod.HandleBleedout(Player);
|
ChaliceOfTheBloodGod.HandleBleedout(Player);
|
||||||
|
|
||||||
//Finally, update the state of hadLifeRegenHinderingDebuff for next frame.
|
//Finally, update the state of hadLifeRegenHinderingDebuff for next frame. Needs to check for 2 frames of 0 regen time to be sure they had a debuff
|
||||||
hadLifeRegenHinderingDebuff = hasLifeRegenHinderingDebuff;
|
hadLifeRegenHinderingDebuff = hasLifeRegenHinderingDebuff && _hasNoNaturalRegen;
|
||||||
|
_hasNoNaturalRegen = hasLifeRegenHinderingDebuff;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Update Life Regen
|
#region Update Life Regen
|
||||||
public override void UpdateLifeRegen()
|
//This method runs BEFORE UpdateBadLifeRegen. Put most effects here. Ran at the end of PostUpdateEquips
|
||||||
|
public void GeneralLifeRegen()
|
||||||
{
|
{
|
||||||
|
// Apply partial life regeneration
|
||||||
|
// Regenerator applies partial life regen as a part of its damage conversion straight up, so it will avoid this function
|
||||||
|
if (regenerator)
|
||||||
|
partialLifeRegenCounter = 0f;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
partialLifeRegenCounter += partialLifeRegen;
|
||||||
|
if (partialLifeRegenCounter >= 1f || partialLifeRegenCounter <= -1f)
|
||||||
|
{
|
||||||
|
int flooredRegenAdded = (int)MathF.Floor(partialLifeRegenCounter);
|
||||||
|
Player.lifeRegen += flooredRegenAdded;
|
||||||
|
partialLifeRegenCounter -= flooredRegenAdded;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float lifeRatio = (Player.statLife) / (float)Player.statLifeMax2;
|
||||||
|
|
||||||
if (mushy)
|
if (mushy)
|
||||||
Player.lifeRegen += Mushy.RegenBoost;
|
Player.lifeRegen += Mushy.RegenBoost;
|
||||||
|
|
||||||
if (permafrostsConcoction)
|
if (permafrostsConcoction)
|
||||||
{
|
{
|
||||||
if (Player.statLife < actualMaxLife / 2)
|
if (lifeRatio <= 0.5f)
|
||||||
Player.lifeRegen++;
|
Player.lifeRegen++;
|
||||||
if (Player.statLife < actualMaxLife / 4)
|
if (lifeRatio <= 0.25f)
|
||||||
Player.lifeRegen++;
|
Player.lifeRegen++;
|
||||||
if (Player.statLife < actualMaxLife / 10)
|
if (lifeRatio <= 0.1f)
|
||||||
Player.lifeRegen += 2;
|
Player.lifeRegen += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -553,6 +469,25 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (PinkJellyRegen)
|
if (PinkJellyRegen)
|
||||||
Player.lifeRegen += LifeJelly.AuraRegenBoost;
|
Player.lifeRegen += LifeJelly.AuraRegenBoost;
|
||||||
|
|
||||||
|
if (rOoze)
|
||||||
|
Player.lifeRegen += (int)Math.Round(MathHelper.Lerp(RadiantOoze.MaxRegenBoost, RadiantOoze.MinRegenBoost, lifeRatio));
|
||||||
|
|
||||||
|
if (livingDew)
|
||||||
|
Player.lifeRegenTime += LivingDew.RegenTimeBoost;
|
||||||
|
|
||||||
|
if (aAmpoule)
|
||||||
|
{
|
||||||
|
Player.lifeRegen += (int)Math.Round(MathHelper.Lerp(AmbrosialAmpoule.MaxRegenBoost, AmbrosialAmpoule.MinRegenBoost, lifeRatio));
|
||||||
|
Player.lifeRegenTime += AmbrosialAmpoule.RegenTimeBoost;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (purity)
|
||||||
|
{
|
||||||
|
Player.lifeRegen += (int)Math.Round(MathHelper.Lerp(Radiance.MaxRegenBoost, Radiance.MinRegenBoost, lifeRatio));
|
||||||
|
Player.lifeRegenTime += Radiance.RegenTimeBoost;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (GreenJellyRegen)
|
if (GreenJellyRegen)
|
||||||
Player.lifeRegen += Items.Accessories.GrandGelatin.AuraRegenBoost;
|
Player.lifeRegen += Items.Accessories.GrandGelatin.AuraRegenBoost;
|
||||||
|
|
||||||
@@ -566,7 +501,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
Player.lifeRegen += Affliction.RegenBoost;
|
Player.lifeRegen += Affliction.RegenBoost;
|
||||||
|
|
||||||
if (trinketOfChi || chiRegen)
|
if (trinketOfChi || chiRegen)
|
||||||
Player.lifeRegen += 2;
|
Player.lifeRegen += TrinketofChi.RegenBoost;
|
||||||
|
|
||||||
if (darkSunRing)
|
if (darkSunRing)
|
||||||
{
|
{
|
||||||
@@ -577,6 +512,12 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (silvaSet)
|
if (silvaSet)
|
||||||
Player.lifeRegen += SilvaArmor.SetBonusRegenBoost;
|
Player.lifeRegen += SilvaArmor.SetBonusRegenBoost;
|
||||||
|
|
||||||
|
if (angelicAlliance)
|
||||||
|
{
|
||||||
|
if (Player.wingTime < Player.wingTimeMax)
|
||||||
|
Player.lifeRegen += AngelicAlliance.RegenBoostDuringFlight;
|
||||||
|
}
|
||||||
|
|
||||||
if (phantomicHeartRegen > 0 && phantomicHeartRegen < 1000)
|
if (phantomicHeartRegen > 0 && phantomicHeartRegen < 1000)
|
||||||
{
|
{
|
||||||
Player.lifeRegen += PhantomicArtifact.RegenBoost;
|
Player.lifeRegen += PhantomicArtifact.RegenBoost;
|
||||||
@@ -592,6 +533,27 @@ namespace CalamityMod.CalPlayer
|
|||||||
regen.position = Player.Center - velocity;
|
regen.position = Player.Center - velocity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (fearmongerSet && fearmongerRegenFrames > 0)
|
||||||
|
{
|
||||||
|
if (Player.lifeRegenTime < FearmongerGreathelm.MinionRegenTimeFloor)
|
||||||
|
Player.lifeRegenTime = FearmongerGreathelm.MinionRegenTimeFloor;
|
||||||
|
|
||||||
|
Player.lifeRegen += FearmongerGreathelm.MinionRegenBoost;
|
||||||
|
Player.lifeRegenTime += FearmongerGreathelm.MinionRegenTimeBoost;
|
||||||
|
}
|
||||||
|
if (handWarmer && eskimoSet)
|
||||||
|
{
|
||||||
|
Player.lifeRegen += 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//This method runs AFTER UpdateBadLifeRegen. Only put effects that should bypass debuff DoT canceling here.
|
||||||
|
public override void UpdateLifeRegen()
|
||||||
|
{
|
||||||
|
if (avertorBonus)
|
||||||
|
{
|
||||||
|
Player.lifeRegen += 4;
|
||||||
|
}
|
||||||
|
|
||||||
if (community)
|
if (community)
|
||||||
{
|
{
|
||||||
@@ -606,22 +568,10 @@ namespace CalamityMod.CalPlayer
|
|||||||
Player.lifeRegen += lesserEffect ? 1 : regenBoost;
|
Player.lifeRegen += lesserEffect ? 1 : regenBoost;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handWarmer && eskimoSet)
|
if (manaOverloader)
|
||||||
{
|
{
|
||||||
Player.lifeRegen += 2;
|
float manaRatio = Player.statMana / (float)Player.statManaMax2;
|
||||||
}
|
Player.lifeRegen += (int)(MathF.Round(MathHelper.Lerp(4f, -4f, manaRatio)) * (Player.HasBuff(BuffID.ManaSickness) ? 0.5f : 1f));
|
||||||
if (avertorBonus)
|
|
||||||
{
|
|
||||||
Player.lifeRegen += 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fearmongerSet && fearmongerRegenFrames > 0)
|
|
||||||
{
|
|
||||||
if (Player.lifeRegenTime < FearmongerGreathelm.MinionRegenTimeFloor)
|
|
||||||
Player.lifeRegenTime = FearmongerGreathelm.MinionRegenTimeFloor;
|
|
||||||
|
|
||||||
Player.lifeRegen += FearmongerGreathelm.MinionRegenBoost;
|
|
||||||
Player.lifeRegenTime += FearmongerGreathelm.MinionRegenTimeBoost;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pinkCandle && !noLifeRegen)
|
if (pinkCandle && !noLifeRegen)
|
||||||
@@ -638,12 +588,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
else
|
else
|
||||||
pinkCandleHealFraction = 0D;
|
pinkCandleHealFraction = 0D;
|
||||||
|
|
||||||
if (manaOverloader)
|
|
||||||
{
|
|
||||||
float manaRatio = Player.statMana / (float)Player.statManaMax2;
|
|
||||||
Player.lifeRegen += (int)(MathF.Round(MathHelper.Lerp(4f, -4f, manaRatio)) * (Player.HasBuff(BuffID.ManaSickness) ? 0.5f : 1f));
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Standing Still Life Regen
|
#region Standing Still Life Regen
|
||||||
// Standing still healing bonuses (all are exclusive with vanilla Shiny Stone, but all function similarly)
|
// Standing still healing bonuses (all are exclusive with vanilla Shiny Stone, but all function similarly)
|
||||||
if (!Player.shinyStone && Player.StandingStill() && Player.velocity.Y == 0 && Player.itemAnimation == 0 && (shadeRegen || cFreeze))
|
if (!Player.shinyStone && Player.StandingStill() && Player.velocity.Y == 0 && Player.itemAnimation == 0 && (shadeRegen || cFreeze))
|
||||||
@@ -729,6 +673,16 @@ namespace CalamityMod.CalPlayer
|
|||||||
|
|
||||||
public override void NaturalLifeRegen(ref float regen)
|
public override void NaturalLifeRegen(ref float regen)
|
||||||
{
|
{
|
||||||
|
// Honey Dew and its upgrades make natural regen more powerful
|
||||||
|
if (purity)
|
||||||
|
regen *= Radiance.NaturalRegenPower;
|
||||||
|
else if (aAmpoule)
|
||||||
|
regen *= AmbrosialAmpoule.NaturalRegenPower;
|
||||||
|
else if (livingDew)
|
||||||
|
regen *= LivingDew.NaturalRegenPower;
|
||||||
|
else if (honeyDew)
|
||||||
|
regen *= HoneyDew.NaturalRegenPower;
|
||||||
|
|
||||||
// The Camper counteracts the regen loss while moving horizontally
|
// The Camper counteracts the regen loss while moving horizontally
|
||||||
if (camper && (Player.velocity.X != 0 && Player.grappling[0] <= 0))
|
if (camper && (Player.velocity.X != 0 && Player.grappling[0] <= 0))
|
||||||
{
|
{
|
||||||
@@ -751,13 +705,13 @@ namespace CalamityMod.CalPlayer
|
|||||||
// Regenerator trades all positive regen for damage, and caps your health gain at 50%
|
// Regenerator trades all positive regen for damage, and caps your health gain at 50%
|
||||||
if (regenerator)
|
if (regenerator)
|
||||||
{
|
{
|
||||||
int finalRegen = Player.lifeRegen + (int)Math.Round(regen * (Player.statLifeMax2 / 400f * 0.85f + 0.15f));
|
float finalRegen = Player.lifeRegen + partialLifeRegen + MathF.Round(regen * (Player.statLifeMax2 / 400f * 0.85f + 0.15f));
|
||||||
finalRegen = (int)Math.Max(finalRegen, 0);
|
finalRegen = MathF.Max(finalRegen, 0f);
|
||||||
|
|
||||||
// Rapid Healing increments RegenCount directly so it needs to be manually added
|
// Rapid Healing increments RegenCount directly so it needs to be manually added
|
||||||
// It also works while debuffs are active so the same logic applies here
|
// It also works while debuffs are active so the same logic applies here
|
||||||
if (Player.palladiumRegen)
|
if (Player.palladiumRegen)
|
||||||
finalRegen += 4;
|
finalRegen += 4f;
|
||||||
|
|
||||||
regeneratorDamage = finalRegen * Regenerator.RegenToDamageRatio;
|
regeneratorDamage = finalRegen * Regenerator.RegenToDamageRatio;
|
||||||
Player.GetDamage<GenericDamageClass>() += regeneratorDamage;
|
Player.GetDamage<GenericDamageClass>() += regeneratorDamage;
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ using CalamityMod.Items.VanillaArmorChanges;
|
|||||||
using CalamityMod.Items.Weapons.Magic;
|
using CalamityMod.Items.Weapons.Magic;
|
||||||
using CalamityMod.Items.Weapons.Melee;
|
using CalamityMod.Items.Weapons.Melee;
|
||||||
using CalamityMod.Items.Weapons.Ranged;
|
using CalamityMod.Items.Weapons.Ranged;
|
||||||
|
using CalamityMod.Items.Weapons.Summon;
|
||||||
using CalamityMod.NPCs;
|
using CalamityMod.NPCs;
|
||||||
using CalamityMod.NPCs.AcidRain;
|
using CalamityMod.NPCs.AcidRain;
|
||||||
using CalamityMod.NPCs.Astral;
|
using CalamityMod.NPCs.Astral;
|
||||||
@@ -154,9 +155,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
// Drawing parameters
|
// Drawing parameters
|
||||||
UpdateDrawingParameters();
|
UpdateDrawingParameters();
|
||||||
|
|
||||||
// Handle Lucrecia's passive energy effects
|
|
||||||
HandleLucreciaLineEffects();
|
|
||||||
|
|
||||||
// Update all particle sets for items.
|
// Update all particle sets for items.
|
||||||
// This must be done here instead of in the item logic because these sets are not properly instanced
|
// This must be done here instead of in the item logic because these sets are not properly instanced
|
||||||
// in the global classes. Attempting to update them there will cause multiple updates to one set for multiple items.
|
// in the global classes. Attempting to update them there will cause multiple updates to one set for multiple items.
|
||||||
@@ -213,17 +211,22 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (Player.HeldItem.type == ModContent.ItemType<Starfleet>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<StarfleetHoldout>()] == 0))
|
if (Player.HeldItem.type == ModContent.ItemType<Starfleet>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<StarfleetHoldout>()] == 0))
|
||||||
{
|
{
|
||||||
int damage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(Player.HeldItem.damage);
|
int damage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(Player.HeldItem.damage);
|
||||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<StarfleetHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
Projectile.NewProjectile(Player.GetProjectileSource_Item_WithPotentialAmmo(Player.HeldItem, 0), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<StarfleetHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
||||||
}
|
}
|
||||||
if (Player.HeldItem.type == ModContent.ItemType<Starmada>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<StarmadaHoldout>()] == 0))
|
if (Player.HeldItem.type == ModContent.ItemType<Starmada>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<StarmadaHoldout>()] == 0))
|
||||||
{
|
{
|
||||||
int damage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(Player.HeldItem.damage);
|
int damage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(Player.HeldItem.damage);
|
||||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<StarmadaHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
Projectile.NewProjectile(Player.GetProjectileSource_Item_WithPotentialAmmo(Player.HeldItem, 0), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<StarmadaHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
||||||
}
|
}
|
||||||
if (Player.HeldItem.type == ModContent.ItemType<Basher>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<BasherHoldout>()] == 0))
|
if (Player.HeldItem.type == ModContent.ItemType<Basher>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<BasherHoldout>()] == 0))
|
||||||
{
|
{
|
||||||
int damage = (int)Player.GetTotalDamage<TrueMeleeDamageClass>().ApplyTo(Player.HeldItem.damage);
|
int damage = (int)Player.GetTotalDamage<TrueMeleeDamageClass>().ApplyTo(Player.HeldItem.damage);
|
||||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<BasherHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
Projectile.NewProjectile(Player.GetProjectileSource_Item_WithPotentialAmmo(Player.HeldItem, 0), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<BasherHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
||||||
|
}
|
||||||
|
if (Player.HeldItem.type == ModContent.ItemType<GrandDad>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<GrandDadHoldout>()] == 0))
|
||||||
|
{
|
||||||
|
int damage = (int)Player.GetTotalDamage<TrueMeleeDamageClass>().ApplyTo(Player.HeldItem.damage);
|
||||||
|
Projectile.NewProjectile(Player.GetProjectileSource_Item_WithPotentialAmmo(Player.HeldItem, 0), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<GrandDadHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -302,17 +305,17 @@ namespace CalamityMod.CalPlayer
|
|||||||
}
|
}
|
||||||
|
|
||||||
// First Frame dash effects
|
// First Frame dash effects
|
||||||
bool dashStart = (Player.dashDelay == -1 && ((!HasCustomDash && IsFirstDashFrame) || (HasCustomDash && UsedDash.DashTimeAdjustedForStartup == 1)));
|
bool dashStart = (Player.Calamity().DashID == DefaultDash.ID && Player.timeSinceLastDashStarted == 1 && Player.dashDelay != 0 ) || (Player.dashDelay == -1 && ((!HasCustomDash && IsFirstDashFrame) || (HasCustomDash && UsedDash.DashTimeAdjustedForStartup == 1)));
|
||||||
int dir = MathF.Sign(Player.velocity.X);
|
int dir = MathF.Sign(Player.velocity.X);
|
||||||
|
|
||||||
if (dashStart)
|
if (dashStart)
|
||||||
{
|
{
|
||||||
lastDashWasTabi = false;
|
lastDashWasTabi = false;
|
||||||
}
|
|
||||||
|
|
||||||
if (((gShell && giantShellPostHit == 0) || (tortShell && tortShellPostHit == 0)) && dashStart)
|
if ((tortShell && tortShellPostHit == 0))
|
||||||
{
|
Player.velocity.X *= GiantTortoiseShell.DashVelocityMult;
|
||||||
Player.velocity.X *= 0.9f;
|
if ((gShell && giantShellPostHit == 0))
|
||||||
|
Player.velocity.X *= GiantShell.DashVelocityMult;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tabi/Master Ninja Gear dash change
|
// Tabi/Master Ninja Gear dash change
|
||||||
@@ -347,9 +350,9 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (Player.miscCounter % 4 == 0)
|
if (Player.miscCounter % 4 == 0)
|
||||||
Player.HealPlayer(1, HealTextType.None);
|
Player.HealPlayer(1, HealTextType.None);
|
||||||
|
|
||||||
if (Player.dashDelay > 0) // Reduced dash cooldown
|
if (Player.dashDelay > 1) // Reduced dash cooldown
|
||||||
{
|
{
|
||||||
Player.dashDelay = 0;
|
Player.dashDelay = 1;
|
||||||
}
|
}
|
||||||
if (Player.dashDelay == -1)
|
if (Player.dashDelay == -1)
|
||||||
{
|
{
|
||||||
@@ -364,9 +367,9 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (Player.miscCounter % 5 == 0)
|
if (Player.miscCounter % 5 == 0)
|
||||||
Player.HealPlayer(2, HealTextType.None);
|
Player.HealPlayer(2, HealTextType.None);
|
||||||
|
|
||||||
if (Player.dashDelay > 0) // Reduced dash cooldown
|
if (Player.dashDelay > 1) // Reduced dash cooldown
|
||||||
{
|
{
|
||||||
Player.dashDelay = 0;
|
Player.dashDelay = 1;
|
||||||
}
|
}
|
||||||
if (Player.dashDelay == -1)
|
if (Player.dashDelay == -1)
|
||||||
{
|
{
|
||||||
@@ -408,120 +411,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
Player.wingTime++;
|
Player.wingTime++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Player.HeldItem.type == ModContent.ItemType<Lucrecia>() && darklightEnergy > 0)
|
|
||||||
{
|
|
||||||
if (darklightEnergy == Lucrecia.MaxEnergy && !darklightEnergyPaused)
|
|
||||||
{
|
|
||||||
darklightEnergyPaused = true;
|
|
||||||
darklightEnergyTimer = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
darklightEnergyTimer++;
|
|
||||||
|
|
||||||
// If the energy is at max, pause for 180 ticks
|
|
||||||
if (darklightEnergyPaused)
|
|
||||||
{
|
|
||||||
if (darklightEnergyTimer >= 1 && !darklightEnergyMaxFXPlayed)
|
|
||||||
{
|
|
||||||
SoundStyle maxEnergyReached = new("CalamityMod/Sounds/Custom/AbilitySounds/DarklightEnergyCharged");
|
|
||||||
SoundEngine.PlaySound(maxEnergyReached with { Volume = 0.9f }, Player.Center);
|
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++) // Circular ring of particles burst from player
|
|
||||||
{
|
|
||||||
float angle = MathHelper.TwoPi * (i / 10f);
|
|
||||||
Vector2 spawnDirection = angle.ToRotationVector2();
|
|
||||||
Vector2 velocity = spawnDirection * 14f;
|
|
||||||
|
|
||||||
CritSpark spark = new CritSpark(Player.Center + spawnDirection * 3f, velocity, Color.Lerp(Color.CornflowerBlue, Color.MediumPurple, Main.rand.NextFloat(1f)), Color.White * 0.33f, 1.2f, 12, 0.3f, 1.2f);
|
|
||||||
GeneralParticleHandler.SpawnParticle(spark);
|
|
||||||
}
|
|
||||||
darklightEnergyMaxFXPlayed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the pause is Done, resume decrementing.
|
|
||||||
if (darklightEnergyTimer >= 180)
|
|
||||||
{
|
|
||||||
darklightEnergyPaused = false;
|
|
||||||
darklightEnergyTimer = 0;
|
|
||||||
darklightEnergy--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // Decrementing
|
|
||||||
{
|
|
||||||
darklightEnergyMaxFXPlayed = false;
|
|
||||||
// Once every 20 ticks
|
|
||||||
if (darklightEnergyTimer >= 20)
|
|
||||||
{
|
|
||||||
darklightEnergy--;
|
|
||||||
darklightEnergyTimer = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Reset all energy variables when not holding the weapon
|
|
||||||
darklightEnergyTimer = 0;
|
|
||||||
darklightEnergyPaused = false;
|
|
||||||
darklightEnergy = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Player.HeldItem.type == ModContent.ItemType<Lightspeed>() && elementalMastery > 0)
|
|
||||||
{
|
|
||||||
if (elementalMastery == Lightspeed.MaxEnergy && !elementalMasteryPaused)
|
|
||||||
{
|
|
||||||
elementalMasteryPaused = true;
|
|
||||||
elementalMasteryTimer = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
elementalMasteryTimer++;
|
|
||||||
|
|
||||||
// If the mastery is at max, pause for 180 ticks
|
|
||||||
if (elementalMasteryPaused)
|
|
||||||
{
|
|
||||||
if (elementalMasteryTimer >= 1 && !elementalMasterySFXPlayed)
|
|
||||||
{
|
|
||||||
SoundStyle maxEnergyReached = new("CalamityMod/Sounds/Custom/AbilitySounds/DarklightEnergyCharged");
|
|
||||||
SoundEngine.PlaySound(maxEnergyReached with { Volume = 0.9f }, Player.Center);
|
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++) // Circular ring of particles burst from player
|
|
||||||
{
|
|
||||||
float angle = MathHelper.TwoPi * (i / 10f);
|
|
||||||
Vector2 spawnDirection = angle.ToRotationVector2();
|
|
||||||
Vector2 velocity = spawnDirection * 14f;
|
|
||||||
|
|
||||||
CritSpark spark = new CritSpark(Player.Center + spawnDirection * 3f, velocity, Color.Lerp(Color.CornflowerBlue, Color.MediumPurple, Main.rand.NextFloat(1f)), Color.White * 0.33f, 1.2f, 12, 0.3f, 1.2f);
|
|
||||||
GeneralParticleHandler.SpawnParticle(spark);
|
|
||||||
}
|
|
||||||
elementalMasterySFXPlayed = true;
|
|
||||||
}
|
|
||||||
// If the pause is Done, resume decrementing.
|
|
||||||
if (elementalMasteryTimer >= 180)
|
|
||||||
{
|
|
||||||
elementalMasteryPaused = false;
|
|
||||||
elementalMasteryTimer = 0;
|
|
||||||
elementalMastery--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // Decrementing
|
|
||||||
{
|
|
||||||
elementalMasterySFXPlayed = false;
|
|
||||||
// Once every 30 ticks
|
|
||||||
if (elementalMasteryTimer >= 30)
|
|
||||||
{
|
|
||||||
elementalMastery--;
|
|
||||||
elementalMasteryTimer = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Reset all EM variables when not holding the weapon
|
|
||||||
elementalMasteryTimer = 0;
|
|
||||||
elementalMasteryPaused = false;
|
|
||||||
elementalMastery = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (Player.HeldItem.type == ModContent.ItemType<UnstableCastersGauntlet>() && unstableCastersGauntletVis < 100)
|
if (Player.HeldItem.type == ModContent.ItemType<UnstableCastersGauntlet>() && unstableCastersGauntletVis < 100)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -569,6 +458,30 @@ namespace CalamityMod.CalPlayer
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (v8Engine || v8000Engine)
|
||||||
|
{
|
||||||
|
if (Player.dashDelay == 1 && !v8EngineFXPlayed)
|
||||||
|
{
|
||||||
|
|
||||||
|
SoundStyle maxEnergyReached = new("CalamityMod/Sounds/Custom/ScornJump");
|
||||||
|
SoundEngine.PlaySound(maxEnergyReached with { Volume = 0.7f }, Player.Center);
|
||||||
|
|
||||||
|
for (int i = 0; i < 10; i++) // Circular ring of particles burst from player
|
||||||
|
{
|
||||||
|
float angle = MathHelper.TwoPi * (i / 10f);
|
||||||
|
Vector2 spawnDirection = angle.ToRotationVector2();
|
||||||
|
Vector2 velocity = spawnDirection * 18f;
|
||||||
|
|
||||||
|
CritSpark spark = new CritSpark(Player.Center + spawnDirection * 3f, velocity, Color.Lerp(Player.Calamity().DashID == V8EngineDash.ID ? Color.OrangeRed : Color.Cyan, Color.White, Main.rand.NextFloat(1f)), Color.White * 0.5f, 1.2f, 12, 0.3f, 1.2f);
|
||||||
|
GeneralParticleHandler.SpawnParticle(spark);
|
||||||
|
}
|
||||||
|
v8EngineFXPlayed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Player.dashDelay == -1)
|
||||||
|
v8EngineFXPlayed = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (XykVisualsBlue || XykVisualsOrange)
|
if (XykVisualsBlue || XykVisualsOrange)
|
||||||
{
|
{
|
||||||
bool Orange = XykVisualsOrange;
|
bool Orange = XykVisualsOrange;
|
||||||
@@ -640,7 +553,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
// Spawn sand veil when dashing if it does not exist and you do not have the cooldown
|
// Spawn sand veil when dashing if it does not exist and you do not have the cooldown
|
||||||
if (!(CalamityUtils.AnyProjectiles(ModContent.ProjectileType<SandCloakVeil>()) || Player.HasCooldown(Cooldowns.SandCloak.ID)))
|
if (!(CalamityUtils.AnyProjectiles(ModContent.ProjectileType<SandCloakVeil>()) || Player.HasCooldown(Cooldowns.SandCloak.ID)))
|
||||||
{
|
{
|
||||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType<SandCloakVeil>(), 13, 2.5f, Player.whoAmI);
|
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType<SandCloakVeil>(), 10, 2.5f, Player.whoAmI);
|
||||||
SoundEngine.PlaySound(SoundID.Item45, Player.Center);
|
SoundEngine.PlaySound(SoundID.Item45, Player.Center);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -683,17 +596,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
{
|
{
|
||||||
if (Player.whoAmI == Main.myPlayer)
|
if (Player.whoAmI == Main.myPlayer)
|
||||||
{
|
{
|
||||||
// Hallowed Armor nerf
|
|
||||||
if (Player.onHitDodge)
|
|
||||||
{
|
|
||||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
|
||||||
{
|
|
||||||
int hasBuff = Player.buffType[l];
|
|
||||||
if (Player.buffTime[l] > 600 && hasBuff == BuffID.ShadowDodge)
|
|
||||||
Player.buffTime[l] = 600;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Immunity Frames nerf
|
// Immunity Frames nerf
|
||||||
int immuneTimeLimit = 150;
|
int immuneTimeLimit = 150;
|
||||||
if (Player.immuneTime > immuneTimeLimit)
|
if (Player.immuneTime > immuneTimeLimit)
|
||||||
@@ -1121,12 +1023,17 @@ namespace CalamityMod.CalPlayer
|
|||||||
|
|
||||||
// Incinerate the target with either Vulnerability Hex or True Vulnerability Hex, depending on current cursor focus.
|
// Incinerate the target with either Vulnerability Hex or True Vulnerability Hex, depending on current cursor focus.
|
||||||
// This adds 8 to the buff duration, which results in a net increase of 3 frames every time damage is dealt, due to damage occurring every 5 frames.
|
// This adds 8 to the buff duration, which results in a net increase of 3 frames every time damage is dealt, due to damage occurring every 5 frames.
|
||||||
int buffToInflict = target.Calamity().trueVulnerabilityHex ? ModContent.BuffType<TrueVulnerabilityHex>() : ModContent.BuffType<VulnerabilityHex>();
|
int buffToInflict = target.Calamity().trueVulnerabilityHex ? ModContent.BuffType<TrueVulnerabilityHex>() : ModContent.BuffType<VulnerabilityHex>();
|
||||||
if (!target.HasBuff(buffToInflict))
|
if (!target.buffImmune[buffToInflict])
|
||||||
target.AddBuff(buffToInflict, 52);
|
{
|
||||||
target.buffTime[target.FindBuffIndex(buffToInflict)] += 8;
|
if (!target.HasBuff(buffToInflict))
|
||||||
if (target.buffTime[target.FindBuffIndex(buffToInflict)] < VulnerabilityHex.CalamityDuration)
|
target.AddBuff(buffToInflict, 52);
|
||||||
target.buffTime[target.FindBuffIndex(buffToInflict)] = VulnerabilityHex.CalamityDuration;
|
|
||||||
|
int index = target.FindBuffIndex(buffToInflict);
|
||||||
|
|
||||||
|
if (index != -1)
|
||||||
|
target.buffTime[index] = Math.Max(target.buffTime[index] + 8, VulnerabilityHex.CalamityDuration);
|
||||||
|
}
|
||||||
|
|
||||||
// Make some fancy dust to indicate damage is being done.
|
// Make some fancy dust to indicate damage is being done.
|
||||||
for (int j = 0; j < 12; j++)
|
for (int j = 0; j < 12; j++)
|
||||||
@@ -1342,7 +1249,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (brittleStar && brittleStarBuffMode)
|
if (brittleStar && brittleStarBuffMode)
|
||||||
Player.statDefense += 4 * Player.ownedProjectileCounts[ModContent.ProjectileType<BrittleStarMinion>()];
|
Player.statDefense += BrittleStarStaff.DefenseBoostPerBuffStar * Player.ownedProjectileCounts[ModContent.ProjectileType<BrittleStarMinion>()];
|
||||||
|
|
||||||
// Reduce the rate of recovery of the Lifesteal variable
|
// Reduce the rate of recovery of the Lifesteal variable
|
||||||
// Classic Mode: 36 HP/s to 12 HP/s
|
// Classic Mode: 36 HP/s to 12 HP/s
|
||||||
@@ -1463,19 +1370,31 @@ namespace CalamityMod.CalPlayer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hydrothermal blue smoke effects but it doesn't work epicccccc
|
|
||||||
if (Player.whoAmI == Main.myPlayer)
|
if (Player.whoAmI == Main.myPlayer)
|
||||||
{
|
{
|
||||||
if (hydrothermalSmoke)
|
if (hydrothermalSmoke && !Main.dedServ)
|
||||||
{
|
{
|
||||||
|
// Release effects when the player moves.
|
||||||
if (Math.Abs(Player.velocity.X) > 0.1f || Math.Abs(Player.velocity.Y) > 0.1f)
|
if (Math.Abs(Player.velocity.X) > 0.1f || Math.Abs(Player.velocity.Y) > 0.1f)
|
||||||
{
|
{
|
||||||
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
|
if (Main.rand.NextBool(6))
|
||||||
var source = Player.GetSource_FromThis(HydrothermicArmor.VanitySmokeEntitySourceContext);
|
{
|
||||||
Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<HydrothermalSmoke>(), 0, 0f, Player.whoAmI);
|
int fieryDust = Dust.NewDust(Player.Top + Vector2.UnitY, 20, 42, DustID.Flare, 0f, 0f, 100, default, 0.7f);
|
||||||
|
if (Main.rand.NextBool(4))
|
||||||
|
{
|
||||||
|
Main.dust[fieryDust].scale *= 0.35f;
|
||||||
|
}
|
||||||
|
Main.dust[fieryDust].velocity *= 0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Main.rand.NextBool(2))
|
||||||
|
{
|
||||||
|
float upwardVariation = Main.rand.NextFloat(-4.5f, -8f);
|
||||||
|
MediumMistParticle mist = new MediumMistParticle(Player.Top + Vector2.UnitY, -Player.velocity + new Vector2(0.5f, upwardVariation), Main.rand.NextBool(3) ? Color.LightSteelBlue : Color.Black, Color.Black, Main.rand.NextFloat(0.4f, 0.65f), 130);
|
||||||
|
GeneralParticleHandler.SpawnParticle(mist);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Trying to find a workaround because apparently putting the bool in ResetEffects prevents it from working
|
|
||||||
if (!Player.armorEffectDrawOutlines)
|
if (!Player.armorEffectDrawOutlines)
|
||||||
{
|
{
|
||||||
hydrothermalSmoke = false;
|
hydrothermalSmoke = false;
|
||||||
@@ -1686,7 +1605,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
|
|
||||||
if (Player.whoAmI == Main.myPlayer)
|
if (Player.whoAmI == Main.myPlayer)
|
||||||
{
|
{
|
||||||
Player.HealPlayer(15);
|
Player.HealPlayer(10);
|
||||||
|
|
||||||
if (profanedCrystal)
|
if (profanedCrystal)
|
||||||
{
|
{
|
||||||
@@ -1934,7 +1853,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
{
|
{
|
||||||
if (numOfEnergy < energyCap)
|
if (numOfEnergy < energyCap)
|
||||||
{
|
{
|
||||||
int energyDamage = (int)Player.GetBestClassDamage().ApplyTo(8);
|
int energyDamage = (int)Player.GetBestClassDamage().ApplyTo(12);
|
||||||
Projectile energy = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, (Vector2.One * 4).RotatedByRandom(MathHelper.TwoPi), ModContent.ProjectileType<AmuletEnergy>(), energyDamage, 0f, Player.whoAmI, 0, numOfEnergy);
|
Projectile energy = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, (Vector2.One * 4).RotatedByRandom(MathHelper.TwoPi), ModContent.ProjectileType<AmuletEnergy>(), energyDamage, 0f, Player.whoAmI, 0, numOfEnergy);
|
||||||
if (numOfEnergy + 1 == energyCap && Player.Calamity().sSpiritAmuletVisual)
|
if (numOfEnergy + 1 == energyCap && Player.Calamity().sSpiritAmuletVisual)
|
||||||
{
|
{
|
||||||
@@ -2111,6 +2030,42 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (Player.velocity.Length() < 6)
|
if (Player.velocity.Length() < 6)
|
||||||
hookPullVisuals = 0;
|
hookPullVisuals = 0;
|
||||||
}
|
}
|
||||||
|
if (featherCrown)
|
||||||
|
{
|
||||||
|
int MaxSigils = 4; //Starts at 0, so cap is 5
|
||||||
|
if (mageCrownTimer == 0)
|
||||||
|
{
|
||||||
|
if (mageCrownCount <= MaxSigils && Main.myPlayer == Player.whoAmI)
|
||||||
|
{
|
||||||
|
mageCrownCount += 1;
|
||||||
|
float start = 360f / mageCrownCount;
|
||||||
|
Projectile.NewProjectile(Player.GetSource_Accessory(FindAccessory<FeatherCrown>()), new Vector2((int)(Player.Center.X + (Math.Sin(0 * start) * 300)), (int)(Player.Center.Y + (Math.Cos(0 * start) * 300))), Vector2.Zero, ModContent.ProjectileType<SpectralFeather>(), 0, 0, Player.whoAmI, 0, mageCrownCount);
|
||||||
|
}
|
||||||
|
mageCrownTimer = 120;
|
||||||
|
}
|
||||||
|
else if (!Player.dead)
|
||||||
|
{
|
||||||
|
mageCrownTimer--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (moonCrown)
|
||||||
|
{
|
||||||
|
int MaxSigils = 9; //Starts at 0, so cap is 10
|
||||||
|
if (mageCrownTimer == 0)
|
||||||
|
{
|
||||||
|
if (mageCrownCount <= MaxSigils && Main.myPlayer == Player.whoAmI)
|
||||||
|
{
|
||||||
|
mageCrownCount += 1;
|
||||||
|
float start = 360f / mageCrownCount;
|
||||||
|
Projectile.NewProjectile(Player.GetSource_Accessory(FindAccessory<MoonstoneCrown>()), new Vector2((int)(Player.Center.X + (Math.Sin(0 * start) * 300)), (int)(Player.Center.Y + (Math.Cos(0 * start) * 300))), Vector2.Zero, ModContent.ProjectileType<MoonSigil>(), 0, 0, Player.whoAmI, 0, mageCrownCount);
|
||||||
|
}
|
||||||
|
mageCrownTimer = 120;
|
||||||
|
}
|
||||||
|
else if (!Player.dead)
|
||||||
|
{
|
||||||
|
mageCrownTimer--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (unstableGraniteCore)
|
if (unstableGraniteCore)
|
||||||
{
|
{
|
||||||
@@ -2173,7 +2128,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
|
|
||||||
if (whitewaterHeal > 0)
|
if (whitewaterHeal > 0)
|
||||||
{
|
{
|
||||||
if (whitewaterHeal % 15 == 0)
|
if (whitewaterHeal % 20 == 0)
|
||||||
Player.HealPlayer(1);
|
Player.HealPlayer(1);
|
||||||
whitewaterHeal--;
|
whitewaterHeal--;
|
||||||
|
|
||||||
@@ -2297,10 +2252,8 @@ namespace CalamityMod.CalPlayer
|
|||||||
bloodflareMageCooldown--;
|
bloodflareMageCooldown--;
|
||||||
if (silvaMageCooldown > 0)
|
if (silvaMageCooldown > 0)
|
||||||
silvaMageCooldown--;
|
silvaMageCooldown--;
|
||||||
if (scuttlerCooldown > 0)
|
if (nanotechHitCooldown > 0)
|
||||||
scuttlerCooldown--;
|
nanotechHitCooldown--;
|
||||||
if (rogueCrownCooldown > 0)
|
|
||||||
rogueCrownCooldown--;
|
|
||||||
if (spectralVeilImmunity > 0)
|
if (spectralVeilImmunity > 0)
|
||||||
spectralVeilImmunity--;
|
spectralVeilImmunity--;
|
||||||
if (jetPackDash > 0)
|
if (jetPackDash > 0)
|
||||||
@@ -2356,6 +2309,10 @@ namespace CalamityMod.CalPlayer
|
|||||||
ataxiaDmg -= 1.5f;
|
ataxiaDmg -= 1.5f;
|
||||||
if (ataxiaDmg < 0f)
|
if (ataxiaDmg < 0f)
|
||||||
ataxiaDmg = 0f;
|
ataxiaDmg = 0f;
|
||||||
|
if (hydroHealTimer > 0f)
|
||||||
|
hydroHealTimer -= 0.05f;
|
||||||
|
if (ataxiaDmg < 0f)
|
||||||
|
ataxiaDmg = 0f;
|
||||||
if (xerocDmg > 0f)
|
if (xerocDmg > 0f)
|
||||||
xerocDmg -= 2f;
|
xerocDmg -= 2f;
|
||||||
if (xerocDmg < 0f)
|
if (xerocDmg < 0f)
|
||||||
@@ -2748,12 +2705,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Raider Talisman bonus
|
|
||||||
if (raiderTalisman && !vampiricTalisman && !StealthStrikeAvailable() && raiderCritLifespan > 0f)
|
|
||||||
Player.GetCritChance<ThrowingDamageClass>() += RaidersTalisman.RaiderBonus;
|
|
||||||
if (vampiricTalisman && !StealthStrikeAvailable() && raiderCritLifespan > 0f)
|
|
||||||
Player.GetCritChance<ThrowingDamageClass>() += VampiricTalisman.RaiderBonus;
|
|
||||||
|
|
||||||
if (avertorBonus)
|
if (avertorBonus)
|
||||||
Player.GetDamage<GenericDamageClass>() += 0.1f;
|
Player.GetDamage<GenericDamageClass>() += 0.1f;
|
||||||
|
|
||||||
@@ -2766,8 +2717,8 @@ namespace CalamityMod.CalPlayer
|
|||||||
{
|
{
|
||||||
if (Player.isNearFairy())
|
if (Player.isNearFairy())
|
||||||
{
|
{
|
||||||
Player.lifeRegen += 4;
|
Player.lifeRegen += 2;
|
||||||
Player.statDefense += 6;
|
Player.statDefense += 4;
|
||||||
Player.moveSpeed += 0.1f;
|
Player.moveSpeed += 0.1f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2825,7 +2776,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (permafrostsConcoction)
|
if (permafrostsConcoction)
|
||||||
{
|
{
|
||||||
Player.manaCost -= 0.15f;
|
Player.manaCost -= 0.15f;
|
||||||
Player.statManaMax2 += 50;
|
Player.statManaMax2 += 40;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (encased)
|
if (encased)
|
||||||
@@ -2844,10 +2795,10 @@ namespace CalamityMod.CalPlayer
|
|||||||
Player.buffImmune[BuffID.Chilled] = true;
|
Player.buffImmune[BuffID.Chilled] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cosmic Discharge Cosmic Freeze buff, gives surrounding enemies the Glacial State debuff
|
// Cosmic Discharge Cosmic Freeze buff, gives surrounding enemies the Frozen debuff
|
||||||
if (cFreeze)
|
if (cFreeze)
|
||||||
{
|
{
|
||||||
int buffType = ModContent.BuffType<GlacialState>();
|
int buffType = BuffID.Frozen;
|
||||||
float freezeDist = 200f;
|
float freezeDist = 200f;
|
||||||
if (Player.whoAmI == Main.myPlayer)
|
if (Player.whoAmI == Main.myPlayer)
|
||||||
{
|
{
|
||||||
@@ -3461,14 +3412,13 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (graxDefense)
|
if (graxDefense)
|
||||||
{
|
{
|
||||||
Player.statDefense += Grax.DefenseBoost;
|
Player.statDefense += Grax.DefenseBoost;
|
||||||
Player.endurance += Grax.DamageReductionBoost;
|
|
||||||
Player.GetDamage<GenericDamageClass>() += Grax.DamageBoost;
|
Player.GetDamage<GenericDamageClass>() += Grax.DamageBoost;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trinket of Chi bonus
|
// Trinket of Chi bonus
|
||||||
if (trinketOfChi)
|
if (trinketOfChi)
|
||||||
{
|
{
|
||||||
if (chiBuffTimer < TrinketofChi.ChiBuffTimerMax)
|
if (chiBuffTimer < TrinketofChi.ChiBuffHitlessTime)
|
||||||
chiBuffTimer++;
|
chiBuffTimer++;
|
||||||
else
|
else
|
||||||
Player.AddBuff(ModContent.BuffType<ChiBuff>(), 6);
|
Player.AddBuff(ModContent.BuffType<ChiBuff>(), 6);
|
||||||
@@ -3513,7 +3463,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
|
|
||||||
if (giantShellPostHit > 0)
|
if (giantShellPostHit > 0)
|
||||||
{
|
{
|
||||||
Player.statDefense -= 3;
|
Player.statDefense -= GiantShell.DefenseBoost;
|
||||||
giantShellPostHit--;
|
giantShellPostHit--;
|
||||||
}
|
}
|
||||||
if (giantShellPostHit < 0)
|
if (giantShellPostHit < 0)
|
||||||
@@ -3529,11 +3479,11 @@ namespace CalamityMod.CalPlayer
|
|||||||
|
|
||||||
if (tortShellPostHit > 0)
|
if (tortShellPostHit > 0)
|
||||||
{
|
{
|
||||||
Player.statDefense -= 6;
|
Player.statDefense -= GiantTortoiseShell.DefenseBoost;
|
||||||
tortShellPostHit--;
|
tortShellPostHit--;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Player.endurance += 0.05f;
|
Player.endurance += GiantTortoiseShell.DamageReductionBoost;
|
||||||
|
|
||||||
if (tortShellPostHit < 0)
|
if (tortShellPostHit < 0)
|
||||||
{
|
{
|
||||||
@@ -3551,7 +3501,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (gloveLevel > 0)
|
if (gloveLevel > 0)
|
||||||
{
|
{
|
||||||
// Determine the glove the player benefits from in priority of latest in progression
|
// Determine the glove the player benefits from in priority of latest in progression
|
||||||
float gloveAttackSpeed = (gloveLevel == 5 ? 0.15f : gloveLevel == 4 ? 0.14f : gloveLevel == 3 ? 0.12f : gloveLevel <= 2 ? 0.10f : 0);
|
float gloveAttackSpeed = (gloveLevel == 5 ? 0.15f : gloveLevel == 4 ? 0.14f : gloveLevel >= 2 ? 0.12f : gloveLevel == 1 ? 0.10f : 0);
|
||||||
Player.GetAttackSpeed<MeleeDamageClass>() += gloveAttackSpeed; // Give the player attack speed based on the glove they have
|
Player.GetAttackSpeed<MeleeDamageClass>() += gloveAttackSpeed; // Give the player attack speed based on the glove they have
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3660,11 +3610,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (Player.HeldItem.type != ModContent.ItemType<PridefulHuntersPlanarRipper>())
|
if (Player.HeldItem.type != ModContent.ItemType<PridefulHuntersPlanarRipper>())
|
||||||
planarSpeedBoost = 0;
|
planarSpeedBoost = 0;
|
||||||
}
|
}
|
||||||
if (evilSmasherBoost > 0)
|
|
||||||
{
|
|
||||||
if (Player.HeldItem.type != ModContent.ItemType<EvilSmasher>())
|
|
||||||
evilSmasherBoost = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Flight time boosts
|
// Flight time boosts
|
||||||
double flightTimeMult = 1D +
|
double flightTimeMult = 1D +
|
||||||
@@ -3748,24 +3693,24 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (tarraSet)
|
if (tarraSet)
|
||||||
Player.lifeMagnet = true;
|
Player.lifeMagnet = true;
|
||||||
|
|
||||||
if (whisperingDeath && !laudanum && !purity)
|
if (whisperingDeath && !laudanum)
|
||||||
Player.GetDamage<GenericDamageClass>() -= 0.2f;
|
Player.GetDamage<GenericDamageClass>() -= 0.2f;
|
||||||
|
|
||||||
if (armorCrunch && !laudanum && !purity)
|
if (armorCrunch && !laudanum)
|
||||||
{
|
{
|
||||||
Player.statDefense -= ArmorCrunch.DefenseReduction;
|
Player.statDefense -= ArmorCrunch.DefenseReduction;
|
||||||
Player.endurance *= ArmorCrunch.MultiplicativeDamageReductionPlayer;
|
Player.endurance *= ArmorCrunch.MultiplicativeDamageReductionPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wither && !purity)
|
if (wither)
|
||||||
{
|
{
|
||||||
Player.statDefense -= RemsRevenge.WitherDefenseReduction;
|
Player.statDefense -= RemsRevenge.WitherDefenseReduction;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eutrophication && !purity)
|
if (eutrophication)
|
||||||
Player.velocity = Vector2.Zero;
|
Player.velocity = Vector2.Zero;
|
||||||
|
|
||||||
if ((vaporfied && !purity) || galvanicCorrosion)
|
if (vaporfied || galvanicCorrosion)
|
||||||
Player.velocity *= 0.98f;
|
Player.velocity *= 0.98f;
|
||||||
|
|
||||||
if (molluskHelmet)
|
if (molluskHelmet)
|
||||||
@@ -3775,7 +3720,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (molluskLegs)
|
if (molluskLegs)
|
||||||
Player.velocity.X *= 0.996f;
|
Player.velocity.X *= 0.996f;
|
||||||
|
|
||||||
if ((warped) && !Player.slowFall && !Player.mount.Active)
|
if (warped && !Player.slowFall && !Player.mount.Active)
|
||||||
{
|
{
|
||||||
float velocityYMultiplier = 1.01f;
|
float velocityYMultiplier = 1.01f;
|
||||||
Player.velocity.Y *= velocityYMultiplier;
|
Player.velocity.Y *= velocityYMultiplier;
|
||||||
@@ -3846,10 +3791,10 @@ namespace CalamityMod.CalPlayer
|
|||||||
Player.buffImmune[BuffID.Chilled] = true;
|
Player.buffImmune[BuffID.Chilled] = true;
|
||||||
Player.buffImmune[BuffID.Frozen] = true;
|
Player.buffImmune[BuffID.Frozen] = true;
|
||||||
|
|
||||||
if (Player.statLife > (int)(Player.statLifeMax2 * 0.5))
|
if (Player.statLife > (int)(Player.statLifeMax2 * FrostFlare.HealthRatioThreshold))
|
||||||
Player.GetDamage<GenericDamageClass>() += 0.1f;
|
Player.GetDamage<GenericDamageClass>() += FrostFlare.DamageBoost;
|
||||||
if (Player.statLife <= (int)(Player.statLifeMax2 * 0.5))
|
else
|
||||||
Player.statDefense += 15;
|
Player.statDefense += FrostFlare.DefenseBoost;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vexation)
|
if (vexation)
|
||||||
@@ -4016,13 +3961,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
Player.npcTypeNoAggro[ModContent.NPCType<GammaSlime>()] = true;
|
Player.npcTypeNoAggro[ModContent.NPCType<GammaSlime>()] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eArtifact)
|
if (fadedIdolatry && Player.FindBuffIndex(ModContent.BuffType<FieryDraconidBuff>()) != -1)
|
||||||
{
|
|
||||||
Player.manaCost -= 0.25f;
|
|
||||||
Player.maxMinions++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (auricSArtifact && Player.FindBuffIndex(ModContent.BuffType<FieryDraconidBuff>()) != -1)
|
|
||||||
Player.maxMinions += Player.ownedProjectileCounts[ModContent.ProjectileType<FieryDraconid>()];
|
Player.maxMinions += Player.ownedProjectileCounts[ModContent.ProjectileType<FieryDraconid>()];
|
||||||
|
|
||||||
if (pSoulArtifact)
|
if (pSoulArtifact)
|
||||||
@@ -4457,7 +4396,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
|
|
||||||
// Add any multiplicative damage bonuses here
|
// Add any multiplicative damage bonuses here
|
||||||
float multiplicativeDamage = 1;
|
float multiplicativeDamage = 1;
|
||||||
if (dArtifact)
|
if (crushingEgo)
|
||||||
multiplicativeDamage += 0.2f;
|
multiplicativeDamage += 0.2f;
|
||||||
if (WarbanneroftheRighteous)
|
if (WarbanneroftheRighteous)
|
||||||
multiplicativeDamage += warbannerDamageMult;
|
multiplicativeDamage += warbannerDamageMult;
|
||||||
@@ -4466,82 +4405,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Lucrecia Line Effects
|
|
||||||
|
|
||||||
public void HandleLucreciaLineEffects()
|
|
||||||
{
|
|
||||||
int lucreciaItemID = ModContent.ItemType<Lucrecia>();
|
|
||||||
int lightspeedItemID = ModContent.ItemType<Lightspeed>();
|
|
||||||
|
|
||||||
if (Player.HeldItem.type == lucreciaItemID && darklightEnergy > 0)
|
|
||||||
{
|
|
||||||
lucreciaParticleTimer--;
|
|
||||||
|
|
||||||
// If the timer is at or below zero, spawn a particle.
|
|
||||||
if (lucreciaParticleTimer <= 0)
|
|
||||||
{
|
|
||||||
// Reset the timer (spawn rate depends on energy)
|
|
||||||
lucreciaParticleTimer = (int)(20 - 15 * (darklightEnergy / 60));
|
|
||||||
|
|
||||||
float radius = Main.rand.NextFloat(160f, 190f); // Distance from center
|
|
||||||
float spawnAngle = Main.rand.NextFloat(MathHelper.TwoPi); // Random angle along the whole radius
|
|
||||||
|
|
||||||
Vector2 spawnPosition = Player.Center + spawnAngle.ToRotationVector2() * radius;
|
|
||||||
|
|
||||||
// Scale opacity with energy
|
|
||||||
float opacity = darklightEnergy / (float)Lucrecia.MaxEnergy;
|
|
||||||
Color color = Main.rand.NextBool() ? Color.MediumPurple : Color.CornflowerBlue;
|
|
||||||
color *= opacity * 0.5f;
|
|
||||||
|
|
||||||
if (darklightEnergy >= 100)
|
|
||||||
{
|
|
||||||
color *= 2.4f; // Way brighter
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector2 dummyVelocity = Vector2.Zero; // We dont want the argument where this is used to have influence on the actual path
|
|
||||||
float rotationSpeed = 0.04f;
|
|
||||||
|
|
||||||
var particle = new RoundedStarParticle(spawnPosition, dummyVelocity, color with { A = 0 }, Main.rand.NextFloat(0.05f, 0.065f), Main.rand.Next(30, 60), rotationSpeed, 1f, true, Player.Center, Player.whoAmI);
|
|
||||||
GeneralParticleHandler.SpawnParticle(particle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Player.HeldItem.type == lightspeedItemID && elementalMastery > 0)
|
|
||||||
{
|
|
||||||
lucreciaParticleTimer--;
|
|
||||||
|
|
||||||
// If the timer is at or below zero, spawn a particle.
|
|
||||||
if (lucreciaParticleTimer <= 0)
|
|
||||||
{
|
|
||||||
// Reset the timer (spawn rate depends on energy)
|
|
||||||
lucreciaParticleTimer = (int)(20 - 15 * (elementalMastery / 60));
|
|
||||||
|
|
||||||
float radius = Main.rand.NextFloat(160f, 190f); // Distance from center
|
|
||||||
float spawnAngle = Main.rand.NextFloat(MathHelper.TwoPi); // Random angle along the whole radius
|
|
||||||
|
|
||||||
Vector2 spawnPosition = Player.Center + spawnAngle.ToRotationVector2() * radius;
|
|
||||||
|
|
||||||
// Scale opacity with energy
|
|
||||||
float opacity = elementalMastery / (float)Lightspeed.MaxEnergy;
|
|
||||||
Color color = Main.rand.NextBool() ? Color.Aqua : Color.OrangeRed;
|
|
||||||
color *= opacity * 0.5f;
|
|
||||||
|
|
||||||
if (elementalMastery >= 100)
|
|
||||||
{
|
|
||||||
color *= 2.4f; // Way brighter
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector2 dummyVelocity = Vector2.Zero; // We dont want the argument where this is used to have influence on the actual path
|
|
||||||
float rotationSpeed = 0.04f;
|
|
||||||
|
|
||||||
var particle = new RoundedStarParticle(spawnPosition, dummyVelocity, color with { A = 0 }, Main.rand.NextFloat(0.05f, 0.065f), Main.rand.Next(30, 60), rotationSpeed, 1f, true, Player.Center, Player.whoAmI);
|
|
||||||
GeneralParticleHandler.SpawnParticle(particle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
#region Energy Shields
|
#region Energy Shields
|
||||||
private void EnergyShields()
|
private void EnergyShields()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
|
|
||||||
if (AdamantiteSet)
|
if (AdamantiteSet)
|
||||||
{
|
{
|
||||||
adamantiteSetDefenseBoostInterpolant += 1.75f / AdamantiteArmorSetChange.TimeUntilBoostCompletelyDecays;
|
adamantiteSetDefenseBoostInterpolant += 1f / AdamantiteArmorSetChange.TimeUntilBoostCompletelyDecays;
|
||||||
adamantiteSetDefenseBoostInterpolant = MathHelper.Clamp(adamantiteSetDefenseBoostInterpolant, 0f, 1f);
|
adamantiteSetDefenseBoostInterpolant = MathHelper.Clamp(adamantiteSetDefenseBoostInterpolant, 0f, 1f);
|
||||||
AdamantiteSetDecayDelay = AdamantiteArmorSetChange.TimeUntilDecayBeginsAfterAttacking;
|
AdamantiteSetDecayDelay = AdamantiteArmorSetChange.TimeUntilDecayBeginsAfterAttacking;
|
||||||
}
|
}
|
||||||
@@ -109,15 +109,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
target.AddBuff(BuffID.Electrified, 300);
|
target.AddBuff(BuffID.Electrified, 300);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ItemID.BeeKeeper:
|
|
||||||
case ItemID.BladeofGrass:
|
|
||||||
target.AddBuff(BuffID.Poisoned, 240);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ItemID.FieryGreatsword:
|
|
||||||
target.AddBuff(BuffID.OnFire3, 90);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ItemID.IceSickle:
|
case ItemID.IceSickle:
|
||||||
case ItemID.Frostbrand:
|
case ItemID.Frostbrand:
|
||||||
target.AddBuff(BuffID.Frostburn2, 300);
|
target.AddBuff(BuffID.Frostburn2, 300);
|
||||||
@@ -126,11 +117,6 @@ namespace CalamityMod.CalPlayer
|
|||||||
case ItemID.IceBlade:
|
case ItemID.IceBlade:
|
||||||
target.AddBuff(BuffID.Frostburn, 120);
|
target.AddBuff(BuffID.Frostburn, 120);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (>= ItemID.BluePhaseblade and <= ItemID.YellowPhaseblade) or ItemID.OrangePhaseblade:
|
|
||||||
case (>= ItemID.BluePhasesaber and <= ItemID.YellowPhasesaber) or ItemID.OrangePhasesaber:
|
|
||||||
// TODO: find an EPIC lightsaber sound
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flameWakerBoots)
|
if (flameWakerBoots)
|
||||||
@@ -226,6 +212,17 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (Player.whoAmI != Main.myPlayer)
|
if (Player.whoAmI != Main.myPlayer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
//Undo raider crit after hit
|
||||||
|
if (!proj.Calamity().stealthStrike && !proj.Calamity().stealthStrikeSubProjectile && raiderCritLifespan > 0f)
|
||||||
|
{
|
||||||
|
if (nanotech)
|
||||||
|
proj.CritChance -= Items.Accessories.Nanotech.RaiderBonus;
|
||||||
|
else if (vampiricTalisman)
|
||||||
|
proj.CritChance -= VampiricTalisman.RaiderBonus;
|
||||||
|
else if (raiderTalisman)
|
||||||
|
proj.CritChance -= RaidersTalisman.RaiderBonus;
|
||||||
|
}
|
||||||
|
|
||||||
// Apply this to player equippable sources ie. Orichalcum set bonus petal spawns
|
// Apply this to player equippable sources ie. Orichalcum set bonus petal spawns
|
||||||
// Do not apply if this effect is an extension of a weapon ie. Pearl God round effect as it will mess up Old Fashioned
|
// Do not apply if this effect is an extension of a weapon ie. Pearl God round effect as it will mess up Old Fashioned
|
||||||
var source = Player.GetSource_OnHit(target);
|
var source = Player.GetSource_OnHit(target);
|
||||||
@@ -249,7 +246,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (proj.IsMinionOrSentryRelated)
|
if (proj.IsMinionOrSentryRelated)
|
||||||
center = proj.Center;
|
center = proj.Center;
|
||||||
Vector2 launchVel = Utils.DirectionTo(center, target.Center);
|
Vector2 launchVel = Utils.DirectionTo(center, target.Center);
|
||||||
target.MoveNPC(launchVel, proj.knockBack, true);
|
target.MoveNPC(launchVel, proj.knockBack, true, Player);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moscowMule || bloodyMary)
|
if (moscowMule || bloodyMary)
|
||||||
@@ -272,11 +269,11 @@ namespace CalamityMod.CalPlayer
|
|||||||
|
|
||||||
switch (proj.type)
|
switch (proj.type)
|
||||||
{
|
{
|
||||||
|
// Remove this in 1.4.5 port
|
||||||
case ProjectileID.ObsidianSwordfish:
|
case ProjectileID.ObsidianSwordfish:
|
||||||
target.AddBuff(BuffID.OnFire3, 180);
|
target.AddBuff(BuffID.OnFire3, 180);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ProjectileID.InfluxWaver:
|
|
||||||
case ProjectileID.UFOLaser:
|
case ProjectileID.UFOLaser:
|
||||||
case ProjectileID.Electrosphere:
|
case ProjectileID.Electrosphere:
|
||||||
target.AddBuff(BuffID.Electrified, 180);
|
target.AddBuff(BuffID.Electrified, 180);
|
||||||
@@ -288,11 +285,12 @@ namespace CalamityMod.CalPlayer
|
|||||||
target.AddBuff(BuffType<StaticDischarge>(), 90);
|
target.AddBuff(BuffType<StaticDischarge>(), 90);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Replace with Broken Armor in 1.4.5 port
|
||||||
case ProjectileID.GolemFist:
|
case ProjectileID.GolemFist:
|
||||||
target.AddBuff(BuffType<ArmorCrunch>(), 180);
|
target.AddBuff(BuffType<ArmorCrunch>(), 180);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ProjectileID.ButchersChainsaw:
|
// Remove this in 1.4.5 port
|
||||||
case ProjectileID.MechanicalPiranha:
|
case ProjectileID.MechanicalPiranha:
|
||||||
target.AddBuff(BuffType<HeavyBleeding>(), 180);
|
target.AddBuff(BuffType<HeavyBleeding>(), 180);
|
||||||
break;
|
break;
|
||||||
@@ -301,25 +299,10 @@ namespace CalamityMod.CalPlayer
|
|||||||
target.AddBuff(BuffType<Nightwither>(), 180);
|
target.AddBuff(BuffType<Nightwither>(), 180);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ProjectileID.Cascade:
|
|
||||||
case ProjectileID.FlamingMace:
|
case ProjectileID.FlamingMace:
|
||||||
target.AddBuff(BuffID.OnFire, 60);
|
target.AddBuff(BuffID.OnFire, 60);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ProjectileID.Bee:
|
|
||||||
case ProjectileID.GiantBee:
|
|
||||||
case ProjectileID.BladeOfGrass:
|
|
||||||
target.AddBuff(BuffID.Poisoned, 120);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ProjectileID.Wasp:
|
|
||||||
target.AddBuff(BuffID.Venom, 60);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ProjectileID.BoneArrow:
|
|
||||||
target.AddBuff(BuffType<Crumbling>(), 300);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ProjectileID.NorthPoleWeapon:
|
case ProjectileID.NorthPoleWeapon:
|
||||||
target.AddBuff(BuffID.Frostburn, 300);
|
target.AddBuff(BuffID.Frostburn, 300);
|
||||||
break;
|
break;
|
||||||
@@ -762,7 +745,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (hideOfDeus && hideOfDeusTimer == 0)
|
if (hideOfDeus && hideOfDeusTimer == 0)
|
||||||
{
|
{
|
||||||
hideOfDeusTimer = 10;
|
hideOfDeusTimer = 10;
|
||||||
int bulwarkStarDamage = (int)Player.GetTotalDamage<MeleeDamageClass>().ApplyTo(320);
|
int bulwarkStarDamage = (int)Player.GetTotalDamage<MeleeDamageClass>().ApplyTo(HideofAstrumDeus.StarDamage);
|
||||||
|
|
||||||
for (int n = 0; n < 3; n++)
|
for (int n = 0; n < 3; n++)
|
||||||
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ProjectileType<AstralStar>(), bulwarkStarDamage, 5f, Player.whoAmI);
|
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ProjectileType<AstralStar>(), bulwarkStarDamage, 5f, Player.whoAmI);
|
||||||
@@ -903,7 +886,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
{
|
{
|
||||||
if (Player.ownedProjectileCounts[ProjectileType<PhantomicDagger>()] < 3 && Main.rand.NextBool(4))
|
if (Player.ownedProjectileCounts[ProjectileType<PhantomicDagger>()] < 3 && Main.rand.NextBool(4))
|
||||||
{
|
{
|
||||||
int damage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(100);
|
int damage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(PhantomicArtifact.DaggerDamage);
|
||||||
Projectile.NewProjectile(source, Player.Center, new Vector2(Player.velocity.X,Player.velocity.Y-10).RotatedByRandom(0.3f), ProjectileType<PhantomicDagger>(), damage, 1f, Player.whoAmI);
|
Projectile.NewProjectile(source, Player.Center, new Vector2(Player.velocity.X,Player.velocity.Y-10).RotatedByRandom(0.3f), ProjectileType<PhantomicDagger>(), damage, 1f, Player.whoAmI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1058,10 +1041,9 @@ namespace CalamityMod.CalPlayer
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (modProj.stealthStrike && nanotechHitCooldown <= 0 && modProj.stealthStrikeHitCount < 3)
|
||||||
if (modProj.stealthStrike && rogueCrownCooldown <= 0 && modProj.stealthStrikeHitCount < 3)
|
|
||||||
{
|
{
|
||||||
bool spawnedFeathers = false;
|
bool spawnedFlares = false;
|
||||||
if (nanotech)
|
if (nanotech)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
@@ -1072,41 +1054,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
Projectile.NewProjectile(spawnSource, source, velocity, ProjectileType<NanoFlare>(), damage, 3f, proj.owner);
|
Projectile.NewProjectile(spawnSource, source, velocity, ProjectileType<NanoFlare>(), damage, 3f, proj.owner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (moonCrown)
|
nanotechHitCooldown = spawnedFlares ? 15 : 60;
|
||||||
{
|
|
||||||
int lunarFlareDamage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(MoonstoneCrown.BaseDamage);
|
|
||||||
float lunarFlareKB = 3f;
|
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++)
|
|
||||||
{
|
|
||||||
Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
|
|
||||||
Vector2 velocity = (position - source) / 10f;
|
|
||||||
int flare = Projectile.NewProjectile(spawnSource, source, velocity, ProjectileID.LunarFlare, lunarFlareDamage, lunarFlareKB, proj.owner);
|
|
||||||
if (flare.WithinBounds(Main.maxProjectiles))
|
|
||||||
Main.projectile[flare].DamageType = DamageClass.Generic;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (featherCrown)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < 3; i++)
|
|
||||||
{
|
|
||||||
Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
|
|
||||||
float speedX = (position.X - source.X) / 30f;
|
|
||||||
float speedY = (position.Y - source.Y) * 8;
|
|
||||||
Vector2 velocity = new Vector2(speedX, speedY);
|
|
||||||
|
|
||||||
int featherDamage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(25);
|
|
||||||
|
|
||||||
int feather = Projectile.NewProjectile(spawnSource, source, velocity, ProjectileType<StickyFeather>(), featherDamage, 3f, proj.owner);
|
|
||||||
if (feather.WithinBounds(Main.maxProjectiles))
|
|
||||||
{
|
|
||||||
Main.projectile[feather].DamageType = DamageClass.Generic;
|
|
||||||
Main.projectile[feather].extraUpdates += 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
spawnedFeathers = true;
|
|
||||||
}
|
|
||||||
rogueCrownCooldown = spawnedFeathers ? 15 : 60;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (titanHeartSet && modProj.stealthStrike && titanCooldown <= 0 && modProj.stealthStrikeHitCount < 3)
|
if (titanHeartSet && modProj.stealthStrike && titanCooldown <= 0 && modProj.stealthStrikeHitCount < 3)
|
||||||
@@ -1127,8 +1075,7 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (raiderTalisman && modProj.stealthStrike)
|
if (raiderTalisman && modProj.stealthStrike)
|
||||||
{
|
{
|
||||||
raiderCritLifespan = CalamityUtils.SecondsToFrames(RaidersTalisman.RaiderCooldown);
|
raiderCritLifespan = CalamityUtils.SecondsToFrames(RaidersTalisman.RaiderCooldown);
|
||||||
// TO DO: Add nanotech here
|
Player.AddCooldown(RaiderBoost.ID, raiderCritLifespan, true, nanotech ? "Nanotech" : vampiricTalisman ? "Vampiric" : "default");
|
||||||
Player.AddCooldown(RaiderBoost.ID, raiderCritLifespan, true, vampiricTalisman ? "Bloodfeast" : "default");
|
|
||||||
if (raiderSoundCooldown <= 0)
|
if (raiderSoundCooldown <= 0)
|
||||||
{
|
{
|
||||||
SoundEngine.PlaySound(RaidersTalisman.StealthHitSound, Player.Center);
|
SoundEngine.PlaySound(RaidersTalisman.StealthHitSound, Player.Center);
|
||||||
@@ -1139,12 +1086,12 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (npcCheck)
|
if (npcCheck)
|
||||||
{
|
{
|
||||||
// Umbraphile cannot trigger off of itself. It is guaranteed on stealth strikes and 20% chance otherwise.
|
// Umbraphile cannot trigger off of itself. It is guaranteed on stealth strikes and 20% chance otherwise.
|
||||||
if (umbraphileSet && ((modProj.stealthStrike && modProj.stealthStrikeHitCount < 3) || Main.rand.NextBool(5)))
|
if (umbraphileSet && ((modProj.stealthStrike && modProj.stealthStrikeHitCount < 3) || Main.rand.NextBool(5)) && !modProj.CannotProc)
|
||||||
{
|
{
|
||||||
int umbraBlastDamage = CalamityUtils.DamageSoftCap(proj.damage * UmbraphileHood.ExplosionDamageRatio, UmbraphileHood.ExplosionDamageSoftcap);
|
int umbraBlastDamage = CalamityUtils.DamageSoftCap(proj.damage * UmbraphileHood.ExplosionDamageRatio, UmbraphileHood.ExplosionDamageSoftcap);
|
||||||
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<UmbraphileBoom>(), umbraBlastDamage, 0f, Player.whoAmI);
|
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<UmbraphileBoom>(), umbraBlastDamage, 0f, Player.whoAmI);
|
||||||
}
|
}
|
||||||
if (electricianGlove && modProj.stealthStrike && modProj.stealthStrikeHitCount < 3)
|
if (electricianGlove && modProj.stealthStrike && modProj.stealthStrikeHitCount < 3 && !modProj.CannotProc)
|
||||||
{
|
{
|
||||||
for (int s = 0; s < 3; s++)
|
for (int s = 0; s < 3; s++)
|
||||||
{
|
{
|
||||||
@@ -1221,12 +1168,25 @@ namespace CalamityMod.CalPlayer
|
|||||||
target.AddBuff(BuffType<AstralInfectionDebuff>(), TitanHeartMask.OnHitDebuffDuration);
|
target.AddBuff(BuffType<AstralInfectionDebuff>(), TitanHeartMask.OnHitDebuffDuration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (magic)
|
||||||
|
{
|
||||||
|
if (moonCrown && mageCrownCount == 10)
|
||||||
|
{
|
||||||
|
target.AddBuff(BuffType<Nightwither>(), 360);
|
||||||
|
}
|
||||||
|
if(featherCrown && mageCrownCount == 5)
|
||||||
|
{
|
||||||
|
target.AddBuff(BuffType<StaticDischarge>(), 120);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (summon && !whip)
|
if (summon && !whip)
|
||||||
{
|
{
|
||||||
if (profanedCrystal && DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs)
|
if (profanedCrystal && (DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs))
|
||||||
|
{
|
||||||
target.AddBuff(BuffType<HolyFlames>(), 600);
|
target.AddBuff(BuffType<HolyFlames>(), 600);
|
||||||
|
}
|
||||||
else if (pSoulArtifact)
|
else if (pSoulArtifact)
|
||||||
target.AddBuff(BuffType<HolyFlames>(), 300);
|
target.AddBuff(BuffType<HolyFlames>(), 300);
|
||||||
|
|
||||||
if (divineBless)
|
if (divineBless)
|
||||||
target.AddBuff(BuffType<BanishingFire>(), AngelicAlliance.BanishingFireDuration);
|
target.AddBuff(BuffType<BanishingFire>(), AngelicAlliance.BanishingFireDuration);
|
||||||
@@ -1320,28 +1280,27 @@ namespace CalamityMod.CalPlayer
|
|||||||
if (heal > 2)
|
if (heal > 2)
|
||||||
heal = 2;
|
heal = 2;
|
||||||
|
|
||||||
Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, heal, (raiderCritLifespan > 0 && !proj.Calamity().stealthStrike) ? 1.3f : 1.6f);
|
Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, heal, (raiderCritLifespan > 0 && !proj.Calamity().stealthStrike) ? 1.2f : 1.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bloodyGlove && proj.CountsAsClass<RogueDamageClass>() && modProj.stealthStrike && proj.numHits < 1)
|
if (bloodyGlove && proj.CountsAsClass<RogueDamageClass>() && (modProj.stealthStrike || (nanotech && raiderCritLifespan > 0)) && proj.numHits < 1)
|
||||||
//Nanotech has the same heal as Electrician's glove
|
//Nanotech has the same heal as Electrician's glove
|
||||||
Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, electricianGlove ? 10 : 5, 2f);
|
Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, electricianGlove ? 10 : 5, electricianGlove ? 2f : 3f);
|
||||||
|
|
||||||
if (bloodflareThrowing && proj.CountsAsClass<ThrowingDamageClass>() && crit)
|
|
||||||
Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, 2, 1.5f);
|
|
||||||
|
|
||||||
if (proj.CountsAsClass<MagicDamageClass>() && Player.HeldItem.CountsAsClass<MagicDamageClass>())
|
if (proj.CountsAsClass<MagicDamageClass>() && Player.HeldItem.CountsAsClass<MagicDamageClass>())
|
||||||
{
|
{
|
||||||
if (manaOverloader)
|
if (manaOverloader)
|
||||||
{
|
{
|
||||||
double healMult = 0.1D - proj.numHits * 0.025D;
|
double healMult = 0.1D - proj.numHits * 0.025D;
|
||||||
Player.SpawnLifeStealProjectile(target, proj, ProjectileType<ManaPolarizerHealOrb>(), (int)Math.Round(damage * healMult), 1.75f);
|
Player.SpawnLifeStealProjectile(target, proj, ProjectileType<ManaPolarizerHealOrb>(), (int)Math.Round(damage * healMult), 2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ataxiaMage)
|
if (ataxiaMage && hydroHealTimer <= 0)
|
||||||
{
|
{
|
||||||
double healMult = HydrothermicHeadMagic.OrbHealingRatio - proj.numHits * HydrothermicHeadMagic.OrbHealingRatioLossPerPierce;
|
double healMult = HydrothermicHeadMagic.OrbHealingRatio - proj.numHits * HydrothermicHeadMagic.OrbHealingRatioLossPerPierce;
|
||||||
Player.SpawnLifeStealProjectile(target, proj, ProjectileType<HydrothermicHealOrb>(), (int)Math.Round(damage * healMult), HydrothermicHeadMagic.OrbHealingCooldownMult);
|
var heal = (int)Math.Round(damage * healMult);
|
||||||
|
hydroHealTimer += heal;
|
||||||
|
Player.SpawnLifeStealProjectile(target, proj, ProjectileType<HydrothermicHealOrb>(), heal, HydrothermicHeadMagic.OrbHealingCooldownMult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ namespace CalamityMod.CalPlayer.Dashes
|
|||||||
|
|
||||||
public override bool IsOmnidirectional => true;
|
public override bool IsOmnidirectional => true;
|
||||||
|
|
||||||
public int Time = 0;
|
public override int ForceEndAt => 75;
|
||||||
|
|
||||||
public float Size = 2.2f;
|
public float Size = 2.2f;
|
||||||
public bool SoundOnce = true;
|
public bool SoundOnce = true;
|
||||||
|
|
||||||
@@ -40,7 +41,7 @@ namespace CalamityMod.CalPlayer.Dashes
|
|||||||
|
|
||||||
public override void OnDashEffects(Player player)
|
public override void OnDashEffects(Player player)
|
||||||
{
|
{
|
||||||
Time = 0;
|
dashTime = 0;
|
||||||
Size = 2.2f;
|
Size = 2.2f;
|
||||||
GSDashSlot = SoundEngine.PlaySound(DevourerofGodsHead.DeathAnimationSound, player.Center);
|
GSDashSlot = SoundEngine.PlaySound(DevourerofGodsHead.DeathAnimationSound, player.Center);
|
||||||
SoundOnce = true;
|
SoundOnce = true;
|
||||||
@@ -60,24 +61,36 @@ namespace CalamityMod.CalPlayer.Dashes
|
|||||||
if (SoundEngine.TryGetActiveSound(GSDashSlot, out var Dashsound) && Dashsound.IsPlaying)
|
if (SoundEngine.TryGetActiveSound(GSDashSlot, out var Dashsound) && Dashsound.IsPlaying)
|
||||||
Dashsound.Position = player.Center;
|
Dashsound.Position = player.Center;
|
||||||
|
|
||||||
Time++;
|
|
||||||
Size -= 0.01f;
|
Size -= 0.01f;
|
||||||
|
|
||||||
const int totalDashTime = 75;
|
|
||||||
|
|
||||||
// Constantly update the player's velocity direction.
|
// Constantly update the player's velocity direction.
|
||||||
float progress = MathHelper.Clamp(Time / (float)totalDashTime, 0f, 1f);
|
float progress = MathHelper.Clamp(dashTime / (float)ForceEndAt, 0f, 1f);
|
||||||
float ease = 1f - (float)Math.Pow(1f - progress, 0.2f);
|
float ease = 1f - (float)Math.Pow(1f - progress, 0.2f);
|
||||||
float finalSpeed = MathHelper.Lerp(32f, 11f, ease);
|
float finalSpeed = MathHelper.Lerp(32f, 11f, ease);
|
||||||
|
|
||||||
Vector2 dashVel = Main.MouseWorld - player.Center;
|
Vector2 dashVel = Main.MouseWorld - player.Center;
|
||||||
Vector2 targetDirection = player.velocity.ToRotation().AngleTowards(dashVel.ToRotation(), 0.175f).ToRotationVector2();
|
|
||||||
player.velocity = targetDirection * finalSpeed;
|
Vector2 direction = Vector2.Zero;
|
||||||
|
if (player.controlLeft)
|
||||||
|
direction.X -= 1;
|
||||||
|
if (player.controlRight)
|
||||||
|
direction.X += 1;
|
||||||
|
if (player.controlUp)
|
||||||
|
direction.Y -= 1;
|
||||||
|
if (player.controlDown)
|
||||||
|
direction.Y += 1;
|
||||||
|
|
||||||
|
Vector2 targetDirection = direction == Vector2.Zero ? player.velocity.SafeNormalize(Vector2.Zero) : player.velocity.ToRotation().AngleTowards(direction.ToRotation(), 0.175f).ToRotationVector2();
|
||||||
|
|
||||||
|
if (targetDirection == Vector2.Zero)
|
||||||
|
targetDirection = new(player.direction, 0);
|
||||||
|
|
||||||
|
player.velocity = ((dashTime == 1 && direction != Vector2.Zero) ? direction : targetDirection) * finalSpeed;
|
||||||
|
|
||||||
// Fall way, way, faster than usual.
|
// Fall way, way, faster than usual.
|
||||||
player.maxFallSpeed = 50f;
|
player.maxFallSpeed = 50f;
|
||||||
|
|
||||||
if (Time < 75)
|
if (dashTime < ForceEndAt)
|
||||||
{
|
{
|
||||||
Particle jaws = new Jaws(player.Center + player.velocity * 0.5f, player.velocity, Color.Fuchsia, new Vector2(0.8f, 1f), player.velocity.ToRotation() + MathHelper.PiOver2, Size, Size, 2);
|
Particle jaws = new Jaws(player.Center + player.velocity * 0.5f, player.velocity, Color.Fuchsia, new Vector2(0.8f, 1f), player.velocity.ToRotation() + MathHelper.PiOver2, Size, Size, 2);
|
||||||
GeneralParticleHandler.SpawnParticle(jaws);
|
GeneralParticleHandler.SpawnParticle(jaws);
|
||||||
@@ -85,11 +98,11 @@ namespace CalamityMod.CalPlayer.Dashes
|
|||||||
GeneralParticleHandler.SpawnParticle(jaws2);
|
GeneralParticleHandler.SpawnParticle(jaws2);
|
||||||
}
|
}
|
||||||
|
|
||||||
float radiusFactor = MathHelper.Lerp(0f, 1f, Utils.GetLerpValue(2f, 2.5f, Time, true));
|
float radiusFactor = MathHelper.Lerp(0f, 1f, Utils.GetLerpValue(2f, 2.5f, dashTime, true));
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
float offsetRotationAngle = player.velocity.ToRotation() + Time / 20f;
|
float offsetRotationAngle = player.velocity.ToRotation() + dashTime / 20f;
|
||||||
float radius = (30f + (float)Math.Cos(Time / 3f) * 24f) * radiusFactor;
|
float radius = (30f + (float)Math.Cos(dashTime / 3f) * 24f) * radiusFactor;
|
||||||
Vector2 dustPosition = player.Center + player.velocity * 0.8f;
|
Vector2 dustPosition = player.Center + player.velocity * 0.8f;
|
||||||
dustPosition += offsetRotationAngle.ToRotationVector2().RotatedBy(i / 5f * MathHelper.TwoPi) * radius;
|
dustPosition += offsetRotationAngle.ToRotationVector2().RotatedBy(i / 5f * MathHelper.TwoPi) * radius;
|
||||||
Dust dust = Dust.NewDustPerfect(dustPosition, Main.rand.NextBool(5) ? 181 : 295);
|
Dust dust = Dust.NewDustPerfect(dustPosition, Main.rand.NextBool(5) ? 181 : 295);
|
||||||
@@ -100,7 +113,7 @@ namespace CalamityMod.CalPlayer.Dashes
|
|||||||
dust2.noGravity = true;
|
dust2.noGravity = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Time % 2 == 0)
|
if (dashTime % 2 == 0)
|
||||||
{
|
{
|
||||||
float sparkscale = Size * 1.3f;
|
float sparkscale = Size * 1.3f;
|
||||||
Vector2 SparkVelocity1 = player.velocity.RotatedBy(player.direction * -4, default) * 0.08f - player.velocity / 2f;
|
Vector2 SparkVelocity1 = player.velocity.RotatedBy(player.direction * -4, default) * 0.08f - player.velocity / 2f;
|
||||||
@@ -111,14 +124,12 @@ namespace CalamityMod.CalPlayer.Dashes
|
|||||||
GeneralParticleHandler.SpawnParticle(spark2);
|
GeneralParticleHandler.SpawnParticle(spark2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Time > 75 && Time < 78)
|
if (dashTime >= ForceEndAt)
|
||||||
{
|
{
|
||||||
Particle pulse = new DirectionalPulseRing(player.Center - player.velocity * 0.52f, player.velocity / 1.5f, Color.Fuchsia, new Vector2(1f, 2f), player.velocity.ToRotation(), 0.82f, 0.32f, 60);
|
Particle pulse = new DirectionalPulseRing(player.Center - player.velocity * 0.52f, player.velocity / 1.5f, Color.Fuchsia, new Vector2(1f, 2f), player.velocity.ToRotation(), 0.82f, 0.32f, 60);
|
||||||
GeneralParticleHandler.SpawnParticle(pulse);
|
GeneralParticleHandler.SpawnParticle(pulse);
|
||||||
Particle pulse2 = new DirectionalPulseRing(player.Center - player.velocity * 0.40f, player.velocity / 1.5f * 0.9f, Color.Aqua, new Vector2(0.8f, 1.5f), player.velocity.ToRotation(), 0.58f, 0.28f, 50);
|
Particle pulse2 = new DirectionalPulseRing(player.Center - player.velocity * 0.40f, player.velocity / 1.5f * 0.9f, Color.Aqua, new Vector2(0.8f, 1.5f), player.velocity.ToRotation(), 0.58f, 0.28f, 50);
|
||||||
GeneralParticleHandler.SpawnParticle(pulse2);
|
GeneralParticleHandler.SpawnParticle(pulse2);
|
||||||
|
|
||||||
Time = 95;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dash at a much, much faster speed than the default value.
|
// Dash at a much, much faster speed than the default value.
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ namespace CalamityMod.CalPlayer.Dashes
|
|||||||
|
|
||||||
public abstract bool IsOmnidirectional { get; }
|
public abstract bool IsOmnidirectional { get; }
|
||||||
|
|
||||||
|
public virtual int ForceEndAt { get; } = -1;
|
||||||
|
|
||||||
public abstract float CalculateDashSpeed(Player player);
|
public abstract float CalculateDashSpeed(Player player);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Effects that happen once when the main dash starts
|
/// Effects that happen once when the main dash starts
|
||||||
|
|||||||
@@ -0,0 +1,190 @@
|
|||||||
|
using System;
|
||||||
|
using CalamityMod.Dusts;
|
||||||
|
using CalamityMod.Enums;
|
||||||
|
using CalamityMod.Items.Accessories;
|
||||||
|
using CalamityMod.Items.Weapons.Magic;
|
||||||
|
using CalamityMod.Particles;
|
||||||
|
using CalamityMod.Projectiles.Magic;
|
||||||
|
using CalamityMod.Projectiles.Typeless;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.Audio;
|
||||||
|
using Terraria.DataStructures;
|
||||||
|
using Terraria.Graphics.Shaders;
|
||||||
|
using Terraria.ID;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
namespace CalamityMod.CalPlayer.Dashes
|
||||||
|
{
|
||||||
|
public class V8000EngineDash : PlayerDashEffect
|
||||||
|
{
|
||||||
|
public static new string ID { get; private set; }
|
||||||
|
|
||||||
|
public override DashCollisionType CollisionType => DashCollisionType.ShieldSlam;
|
||||||
|
|
||||||
|
public override bool IsOmnidirectional => false;
|
||||||
|
public int Time = 0;
|
||||||
|
|
||||||
|
public override void Load()
|
||||||
|
{
|
||||||
|
ID = DashID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override float CalculateDashSpeed(Player player) => 16f;
|
||||||
|
|
||||||
|
public override void DashStartupEffects(Player player)
|
||||||
|
{
|
||||||
|
player.velocity *= 0.9f;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnDashEffects(Player player)
|
||||||
|
{
|
||||||
|
Time = 0;
|
||||||
|
|
||||||
|
// Burst of evenly spaced but random velocity dusts
|
||||||
|
for (int m = 0; m < 6; m++)
|
||||||
|
{
|
||||||
|
float fxFade = Utils.GetLerpValue(5, 15, Math.Abs(player.velocity.X), true);
|
||||||
|
|
||||||
|
Vector2 trailPos = player.Center - (player.velocity * 2) + new Vector2(0, (18 - (m * 6)));
|
||||||
|
float trailScale = 1 * fxFade;
|
||||||
|
Color trailColor = Main.rand.NextBool(3) ? Color.DodgerBlue : Color.LightSkyBlue;
|
||||||
|
|
||||||
|
int dustStyle = ModContent.DustType<SquashDust>();
|
||||||
|
Dust dust2 = Dust.NewDustPerfect(trailPos, dustStyle, -player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(6, 21));
|
||||||
|
dust2.scale = Main.rand.NextFloat(0.8f, 1.4f);
|
||||||
|
dust2.color = trailColor;
|
||||||
|
dust2.noGravity = true;
|
||||||
|
dust2.fadeIn = 0.5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Thruster prim
|
||||||
|
int beamCount = 3;
|
||||||
|
float maxAngle = MathHelper.ToRadians(10f);
|
||||||
|
|
||||||
|
Vector2 baseDir = -player.velocity.SafeNormalize(Vector2.UnitX);
|
||||||
|
|
||||||
|
for (int i = -1; i < beamCount; i++)
|
||||||
|
{
|
||||||
|
float t = i / (float)(beamCount - 1);
|
||||||
|
|
||||||
|
float centered = t * 2f - 1f;
|
||||||
|
|
||||||
|
float angleOffset = centered * maxAngle;
|
||||||
|
|
||||||
|
Vector2 dir = baseDir.RotatedBy(angleOffset);
|
||||||
|
|
||||||
|
float sizeFactor = 1f - Math.Abs(centered) * 0.7f;
|
||||||
|
|
||||||
|
ThrusterParticle particle = new ThrusterParticle(player, dir, 16, 120f * sizeFactor, 1);
|
||||||
|
GeneralParticleHandler.SpawnParticle(particle, false, GeneralDrawLayer.BeforeProjectiles);
|
||||||
|
}
|
||||||
|
|
||||||
|
SoundStyle sound = V8000Engine.DashSound;
|
||||||
|
SoundEngine.PlaySound(sound with { Volume = 0.5f, Pitch = Main.rand.NextFloat(-0.4f, -0.3f) }, player.Center);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor)
|
||||||
|
{
|
||||||
|
Time++; // For VFX
|
||||||
|
|
||||||
|
if (Time % 2 == 0 && Time < 10)
|
||||||
|
{
|
||||||
|
// Angled, consistently placed sparks
|
||||||
|
Vector2 dustVel = -player.velocity.RotatedBy(0.05f + MathHelper.Clamp(Time * 0.03f, 0, 0.55f)) * 0.75f;
|
||||||
|
Vector2 dustVel2 = -player.velocity.RotatedBy(-0.05f - MathHelper.Clamp(Time * 0.03f, 0, 0.55f)) * 0.75f;
|
||||||
|
|
||||||
|
PointParticle spark = new PointParticle(player.Center + new Vector2(0, -15 * player.direction) + dustVel, dustVel, false, 8, 1.25f, (Main.rand.NextBool() ? Color.DodgerBlue : Color.LightSkyBlue) * 0.66f);
|
||||||
|
GeneralParticleHandler.SpawnParticle(spark);
|
||||||
|
PointParticle spark2 = new PointParticle(player.Center + new Vector2(0, 15 * player.direction) + dustVel2, dustVel2, false, 8, 1.25f, (Main.rand.NextBool() ? Color.DodgerBlue : Color.LightSkyBlue) * 0.66f);
|
||||||
|
GeneralParticleHandler.SpawnParticle(spark2);
|
||||||
|
|
||||||
|
// Glow beam
|
||||||
|
float fadeInLerp = Utils.GetLerpValue(0, 12, Time, true);
|
||||||
|
Color primaryColor = Color.Lerp(Color.DodgerBlue, Color.LightSkyBlue, fadeInLerp);
|
||||||
|
Particle beamBody = new CustomSpark(player.Center, -player.velocity * 0.15f, "CalamityMod/Particles/BloomCircle", false, 7, 0.65f - 0.3f * fadeInLerp, primaryColor * 0.8f, new Vector2(1.1f - 0.4f * fadeInLerp, 0.8f + 0.6f * fadeInLerp), true, true, shrinkSpeed: 0.6f);
|
||||||
|
GeneralParticleHandler.SpawnParticle(beamBody);
|
||||||
|
Particle beamCore = new CustomSpark(player.Center, -player.velocity * 0.15f, "CalamityMod/Particles/BloomCircle", false, 5, 0.35f - 0.15f * fadeInLerp, Color.Lerp(primaryColor, Color.White, 0.6f), new Vector2(0.5f, 1.4f), true, true, shrinkSpeed: 0.6f);
|
||||||
|
GeneralParticleHandler.SpawnParticle(beamCore);
|
||||||
|
|
||||||
|
// Horizontal dust
|
||||||
|
float fxFade = Utils.GetLerpValue(5, 15, Math.Abs(player.velocity.X), true);
|
||||||
|
Vector2 trailPos = player.Center - (player.velocity * 2) + Main.rand.NextVector2Circular(10, 20);
|
||||||
|
float trailScale = 1 * fxFade;
|
||||||
|
Color trailColor = Main.rand.NextBool(3) ? Color.DodgerBlue : Color.LightSkyBlue;
|
||||||
|
|
||||||
|
int dustStyle = ModContent.DustType<SquashDust>();
|
||||||
|
Dust dust2 = Dust.NewDustPerfect(trailPos, dustStyle, -player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(6, 21));
|
||||||
|
dust2.scale = Main.rand.NextFloat(0.8f, 1.4f);
|
||||||
|
dust2.color = trailColor;
|
||||||
|
dust2.noGravity = true;
|
||||||
|
dust2.fadeIn = 0.5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
// SHPS-esque souls
|
||||||
|
if (Time % 4 == 0)
|
||||||
|
{
|
||||||
|
if (player.whoAmI == Main.myPlayer)
|
||||||
|
{
|
||||||
|
Vector2 spawnPos = player.Center + Main.rand.NextVector2Circular(10, 10);
|
||||||
|
Vector2 trailVel = -player.velocity * 0.6f + Main.rand.NextVector2Circular(3f, 3f);
|
||||||
|
|
||||||
|
Projectile.NewProjectile(player.GetSource_FromThis(), spawnPos, trailVel, ModContent.ProjectileType<V8000SoulVisual>(), 0, 0, player.whoAmI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dashSpeed = 14f;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnHitEffects(Player player, NPC npc, IEntitySource source, ref DashHitContext hitContext)
|
||||||
|
{
|
||||||
|
SoundStyle hit = new("CalamityMod/Sounds/Item/DoomsdayDeviceImpact");
|
||||||
|
SoundEngine.PlaySound(hit with { Pitch = -0.2f, Volume = 0.4f }, player.Center);
|
||||||
|
SoundEngine.PlaySound(SoundID.DD2_ExplosiveTrapExplode with { Volume = 1f, Pitch = -0.2f }, player.Center);
|
||||||
|
SoundEngine.PlaySound(SoundID.Item74 with { Volume = 0.7f, Pitch = 1f }, player.Center);
|
||||||
|
|
||||||
|
for (int i = 0; i <= 6; i++)
|
||||||
|
{
|
||||||
|
Dust dust = Dust.NewDustPerfect(player.Center, Main.rand.NextBool() ? 278 : 132, player.velocity.RotatedByRandom(0.7f) * Main.rand.NextFloat(0.5f, 1f) + new Vector2(0, -3f));
|
||||||
|
if (dust.type == 278)
|
||||||
|
{
|
||||||
|
dust.scale = 1.2f;
|
||||||
|
dust.color = Main.rand.NextBool() ? Color.DodgerBlue : Color.LightSkyBlue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dust.scale = 0.9f;
|
||||||
|
}
|
||||||
|
dust.noGravity = false;
|
||||||
|
dust.shader = GameShaders.Armor.GetSecondaryShader(player.cShield, player);
|
||||||
|
}
|
||||||
|
|
||||||
|
Particle pulse = new DirectionalPulseRing(npc.Center, Vector2.Zero, Color.DodgerBlue * 0.8f, new Vector2(2f, 2f), 0, 0.05f, 1f, 24);
|
||||||
|
GeneralParticleHandler.SpawnParticle(pulse);
|
||||||
|
|
||||||
|
for (int i = 0; i < 14; i++)
|
||||||
|
{
|
||||||
|
Vector2 velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(3f, 7f);
|
||||||
|
Color dustColor = Color.Lerp(Color.DodgerBlue, Color.White, Main.rand.NextFloat());
|
||||||
|
|
||||||
|
float scale = Main.rand.NextFloat(0.25f, .6f);
|
||||||
|
int lifetime = Main.rand.Next(30, 50);
|
||||||
|
|
||||||
|
SquishyLightParticle plasma = new(player.Center, velocity, scale, dustColor, lifetime);
|
||||||
|
GeneralParticleHandler.SpawnParticle(plasma);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define hit context variables.
|
||||||
|
int hitDirection = player.direction;
|
||||||
|
if (player.velocity.X != 0f)
|
||||||
|
hitDirection = Math.Sign(player.velocity.X);
|
||||||
|
hitContext.HitDirection = hitDirection;
|
||||||
|
hitContext.PlayerImmunityFrames = V8000Engine.ShieldSlamIFrames;
|
||||||
|
|
||||||
|
// Define damage parameters.
|
||||||
|
hitContext.damageClass = DamageClass.Melee;
|
||||||
|
hitContext.BaseDamage = V8000Engine.ShieldSlamDamage;
|
||||||
|
hitContext.BaseKnockback = V8000Engine.ShieldSlamKnockback;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
using System;
|
||||||
|
using CalamityMod.Dusts;
|
||||||
|
using CalamityMod.Enums;
|
||||||
|
using CalamityMod.Graphics.Renderers;
|
||||||
|
using CalamityMod.Items.Accessories;
|
||||||
|
using CalamityMod.Particles;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.Audio;
|
||||||
|
using Terraria.DataStructures;
|
||||||
|
using Terraria.GameContent.Drawing;
|
||||||
|
using Terraria.GameContent.Items;
|
||||||
|
using Terraria.Graphics.Shaders;
|
||||||
|
using Terraria.ID;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
namespace CalamityMod.CalPlayer.Dashes
|
||||||
|
{
|
||||||
|
public class V8EngineDash : PlayerDashEffect
|
||||||
|
{
|
||||||
|
public static new string ID { get; private set; }
|
||||||
|
|
||||||
|
public override DashCollisionType CollisionType => DashCollisionType.NoCollision;
|
||||||
|
|
||||||
|
public override bool IsOmnidirectional => false;
|
||||||
|
public int Time = 0;
|
||||||
|
|
||||||
|
public override void Load()
|
||||||
|
{
|
||||||
|
ID = DashID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override float CalculateDashSpeed(Player player) => 6.5f;
|
||||||
|
|
||||||
|
public override void OnDashEffects(Player player)
|
||||||
|
{
|
||||||
|
Time = 0;
|
||||||
|
|
||||||
|
// Burst of evenly spaced but random velocity dusts
|
||||||
|
for (int m = 0; m < 6; m++)
|
||||||
|
{
|
||||||
|
float fxFade = Utils.GetLerpValue(5, 15, Math.Abs(player.velocity.X), true);
|
||||||
|
|
||||||
|
Vector2 trailPos = player.Center - (player.velocity * 2) + new Vector2(0, (18 - (m * 6)));
|
||||||
|
float trailScale = 1 * fxFade;
|
||||||
|
Color trailColor = Main.rand.NextBool(3) ? Color.Firebrick : Color.OrangeRed;
|
||||||
|
|
||||||
|
int dustStyle = ModContent.DustType<SquashDust>();
|
||||||
|
Dust dust2 = Dust.NewDustPerfect(trailPos, dustStyle, -player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(5, 16));
|
||||||
|
dust2.scale = Main.rand.NextFloat(0.8f, 1.3f);
|
||||||
|
dust2.color = trailColor;
|
||||||
|
dust2.noGravity = true;
|
||||||
|
dust2.fadeIn = 0.5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Thruster prim
|
||||||
|
int beamCount = 3;
|
||||||
|
float maxAngle = MathHelper.ToRadians(10f);
|
||||||
|
|
||||||
|
Vector2 baseDir = -player.velocity.SafeNormalize(Vector2.UnitX);
|
||||||
|
|
||||||
|
for (int i = -1; i < beamCount; i++)
|
||||||
|
{
|
||||||
|
float t = i / (float)(beamCount - 1);
|
||||||
|
|
||||||
|
float centered = t * 2f - 1f;
|
||||||
|
|
||||||
|
float angleOffset = centered * maxAngle;
|
||||||
|
|
||||||
|
Vector2 dir = baseDir.RotatedBy(angleOffset);
|
||||||
|
|
||||||
|
float sizeFactor = 1f - Math.Abs(centered) * 0.7f;
|
||||||
|
|
||||||
|
ThrusterParticle particle = new ThrusterParticle(player, dir, 12, 100f * sizeFactor, 0);
|
||||||
|
GeneralParticleHandler.SpawnParticle(particle, false, GeneralDrawLayer.BeforeProjectiles);
|
||||||
|
}
|
||||||
|
|
||||||
|
SoundStyle sound = V8Engine.DashSound;
|
||||||
|
SoundEngine.PlaySound(sound with { Volume = 0.5f, Pitch = Main.rand.NextFloat(-0.4f, -0.3f) }, player.Center);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor)
|
||||||
|
{
|
||||||
|
player.velocity.X *= 0.925f;
|
||||||
|
Dust hFlameDust = Dust.NewDustPerfect(player.Center + new Vector2(Main.rand.NextFloat(-6f, 6f), Main.rand.NextFloat(-15f, 15f)) - (player.velocity * 5f), DustID.HeatRay, -player.velocity.RotatedByRandom(MathHelper.ToRadians(10f)) * Main.rand.NextFloat(0.1f, 0.8f), 0, Color.Firebrick, Main.rand.NextFloat(1.8f, 2.8f));
|
||||||
|
|
||||||
|
// Angled, consistently placed sparks
|
||||||
|
Vector2 dustVel = -player.velocity.RotatedBy(0.05f + MathHelper.Clamp(Time * 0.03f, 0, 0.55f)) * 0.75f;
|
||||||
|
Vector2 dustVel2 = -player.velocity.RotatedBy(-0.05f - MathHelper.Clamp(Time * 0.03f, 0, 0.55f)) * 0.75f;
|
||||||
|
|
||||||
|
PointParticle spark = new PointParticle(player.Center + new Vector2(0, -15 * player.direction) + dustVel, dustVel, false, 8, 1.25f, (Main.rand.NextBool() ? Color.Firebrick : Color.OrangeRed) * 0.66f);
|
||||||
|
GeneralParticleHandler.SpawnParticle(spark);
|
||||||
|
PointParticle spark2 = new PointParticle(player.Center + new Vector2(0, 15 * player.direction) + dustVel2, dustVel2, false, 8, 1.25f, (Main.rand.NextBool() ? Color.Firebrick : Color.OrangeRed) * 0.66f);
|
||||||
|
GeneralParticleHandler.SpawnParticle(spark2);
|
||||||
|
|
||||||
|
// Glow beam
|
||||||
|
float fadeInLerp = Utils.GetLerpValue(0, 12, Time, true);
|
||||||
|
Color primaryColor = Color.Lerp(Color.Firebrick, Color.OrangeRed, fadeInLerp);
|
||||||
|
Particle beamBody = new CustomSpark(player.Center, -player.velocity * 0.15f, "CalamityMod/Particles/BloomCircle", false, 7, 0.65f - 0.3f * fadeInLerp, primaryColor * 0.8f, new Vector2(1.1f - 0.4f * fadeInLerp, 0.8f + 0.6f * fadeInLerp), true, false, shrinkSpeed: 0.6f);
|
||||||
|
GeneralParticleHandler.SpawnParticle(beamBody);
|
||||||
|
Particle beamCore = new CustomSpark(player.Center, -player.velocity * 0.15f, "CalamityMod/Particles/BloomCircle", false, 5, 0.35f - 0.15f * fadeInLerp, Color.Lerp(primaryColor, Color.White, 0.6f), new Vector2(0.5f, 1.2f), true, false, shrinkSpeed: 0.6f);
|
||||||
|
GeneralParticleHandler.SpawnParticle(beamCore);
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; i++)
|
||||||
|
{
|
||||||
|
// Fruit loop particles, also used by Elysian Aegis
|
||||||
|
Dust dust = Dust.NewDustPerfect(player.Center + Main.rand.NextVector2Circular(6, 6) - player.velocity * 2.2f, DustID.GoldFlame);
|
||||||
|
dust.velocity = -player.velocity * Main.rand.NextFloat(0.66f, 1.8f);
|
||||||
|
dust.scale = Main.rand.NextFloat(0.4f, 1.3f);
|
||||||
|
dust.noGravity = true;
|
||||||
|
Particle sparkler = new CustomSpark(player.Center + new Vector2(Main.rand.NextFloat(-6f, 6f), Main.rand.NextFloat(-15f, 15f)) - (player.velocity * 1.2f), -player.velocity.RotatedByRandom(MathHelper.ToRadians(10f)) * Main.rand.NextFloat(0.1f, 0.8f), "CalamityMod/Particles/ProvidenceMarkParticle", false, 17, Main.rand.NextFloat(1.15f, 1.25f), Main.rand.NextBool(4) ? Color.Khaki : Color.Orange, new Vector2(1.3f, 0.5f), true, false, 0, false, false, Main.rand.NextFloat(0.4f, 0.5f));
|
||||||
|
GeneralParticleHandler.SpawnParticle(sparkler);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
|||||||
{
|
{
|
||||||
Player drawPlayer = drawInfo.drawPlayer;
|
Player drawPlayer = drawInfo.drawPlayer;
|
||||||
CalamityPlayer modPlayer = drawPlayer.Calamity();
|
CalamityPlayer modPlayer = drawPlayer.Calamity();
|
||||||
return drawInfo.shadow == 0f && !drawPlayer.dead && (modPlayer.voidAura || modPlayer.voidAuraDamage);
|
return drawInfo.shadow == 0f && !drawPlayer.dead && modPlayer.VoidConcentrationStaff;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Draw(ref PlayerDrawSet drawInfo)
|
protected override void Draw(ref PlayerDrawSet drawInfo)
|
||||||
|
|||||||
|
After Width: | Height: | Size: 376 B |
@@ -0,0 +1,76 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using CalamityMod.ExtraJumps;
|
||||||
|
using CalamityMod.Items.Accessories;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
|
using ReLogic.Content;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.DataStructures;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
using static Terraria.ModLoader.PlayerDrawLayer;
|
||||||
|
|
||||||
|
namespace CalamityMod.CalPlayer.DrawLayers
|
||||||
|
{
|
||||||
|
public class SpringStoolLayer : PlayerDrawLayer
|
||||||
|
{
|
||||||
|
private Asset<Texture2D> stoolTexture;
|
||||||
|
private Asset<Texture2D> springTexture;
|
||||||
|
private Asset<Texture2D> topTexture;
|
||||||
|
|
||||||
|
public override Position GetDefaultPosition() => new BeforeParent(PlayerDrawLayers.Leggings);
|
||||||
|
|
||||||
|
public override bool GetDefaultVisibility(PlayerDrawSet drawInfo)
|
||||||
|
{
|
||||||
|
// Only draw if the player is holding Up and still
|
||||||
|
return drawInfo.drawPlayer.GetModPlayer<SpringStoolPlayer>().springStool &&
|
||||||
|
drawInfo.drawPlayer.portableStoolInfo.IsInUse;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Draw(ref PlayerDrawSet drawInfo)
|
||||||
|
{
|
||||||
|
Player drawPlayer = drawInfo.drawPlayer;
|
||||||
|
|
||||||
|
// Load textures if null
|
||||||
|
stoolTexture ??= ModContent.Request<Texture2D>("CalamityMod/CalPlayer/DrawLayers/SpringStoolBottom");
|
||||||
|
springTexture ??= ModContent.Request<Texture2D>("CalamityMod/CalPlayer/DrawLayers/SpringStoolSpring");
|
||||||
|
topTexture ??= ModContent.Request<Texture2D>("CalamityMod/CalPlayer/DrawLayers/SpringStoolTop");
|
||||||
|
|
||||||
|
Texture2D stoolTex = stoolTexture.Value;
|
||||||
|
Texture2D springTex = springTexture.Value;
|
||||||
|
Texture2D topTex = topTexture.Value;
|
||||||
|
|
||||||
|
// Bottom Position
|
||||||
|
Vector2 bottomPosition = new Vector2(
|
||||||
|
(int)(drawInfo.Position.X - Main.screenPosition.X + drawPlayer.width / 2f),
|
||||||
|
(int)(drawInfo.Position.Y - Main.screenPosition.Y + drawPlayer.height + drawPlayer.portableStoolInfo.HeightBoost)
|
||||||
|
);
|
||||||
|
Rectangle bottomSource = stoolTex.Frame();
|
||||||
|
Vector2 bottomOrigin = new Vector2(bottomSource.Width / 2f, bottomSource.Height - 2);
|
||||||
|
|
||||||
|
// Spring
|
||||||
|
Vector2 springPosition = bottomPosition - new Vector2(0, bottomSource.Height);
|
||||||
|
Rectangle springSource = springTex.Frame();
|
||||||
|
Vector2 springOrigin = new Vector2(springSource.Width / 2f, springSource.Height - 2);
|
||||||
|
|
||||||
|
// Top
|
||||||
|
Vector2 topPosition = springPosition - new Vector2(0, springSource.Height - 5);
|
||||||
|
Rectangle topSource = topTex.Frame();
|
||||||
|
Vector2 topOrigin = new Vector2(topSource.Width / 2f, topSource.Height);
|
||||||
|
|
||||||
|
// Add all to cache
|
||||||
|
DrawPart(ref drawInfo, stoolTex, bottomPosition, bottomSource, bottomOrigin);
|
||||||
|
DrawPart(ref drawInfo, springTex, springPosition, springSource, springOrigin);
|
||||||
|
DrawPart(ref drawInfo, topTex, topPosition, topSource, topOrigin);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DrawPart(ref PlayerDrawSet drawInfo, Texture2D tex, Vector2 pos, Rectangle src, Vector2 origin)
|
||||||
|
{
|
||||||
|
drawInfo.DrawDataCache.Add(new DrawData(tex, pos, src, drawInfo.colorArmorLegs, drawInfo.drawPlayer.bodyRotation, origin, 1f, drawInfo.playerEffect, 0)
|
||||||
|
{ shader = drawInfo.cPortableStool });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 202 B |
|
After Width: | Height: | Size: 232 B |
@@ -46,6 +46,10 @@ namespace CalamityMod
|
|||||||
[DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
public bool Photosensitivity { get; set; }
|
public bool Photosensitivity { get; set; }
|
||||||
|
|
||||||
|
[BackgroundColor(192, 54, 64, 192)]
|
||||||
|
[DefaultValue(false)]
|
||||||
|
public bool BoCSpriteChange { get; set; }
|
||||||
|
|
||||||
[BackgroundColor(192, 54, 64, 192)]
|
[BackgroundColor(192, 54, 64, 192)]
|
||||||
[DefaultValue(true)]
|
[DefaultValue(true)]
|
||||||
public bool EnableVanillaTextureEdits { get; set; }
|
public bool EnableVanillaTextureEdits { get; set; }
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ namespace CalamityMod
|
|||||||
public static ModKeybind NormalityRelocatorHotKey { get; private set; }
|
public static ModKeybind NormalityRelocatorHotKey { get; private set; }
|
||||||
public static ModKeybind RageHotKey { get; private set; }
|
public static ModKeybind RageHotKey { get; private set; }
|
||||||
public static ModKeybind SpectralVeilHotKey { get; private set; }
|
public static ModKeybind SpectralVeilHotKey { get; private set; }
|
||||||
|
public static ModKeybind SpringStoolJumpHotKey { get; private set; }
|
||||||
public static ModKeybind TransformerHotKey { get; private set; }
|
public static ModKeybind TransformerHotKey { get; private set; }
|
||||||
public static ModKeybind SwitchGravityHotkey {get; private set;}
|
public static ModKeybind SwitchGravityHotkey {get; private set;}
|
||||||
public static ModKeybind ExpandDebuffInfo { get; private set; }
|
public static ModKeybind ExpandDebuffInfo { get; private set; }
|
||||||
@@ -40,6 +41,7 @@ namespace CalamityMod
|
|||||||
NormalityRelocatorHotKey = KeybindLoader.RegisterKeybind(Mod, "NormalityRelocator", "Z");
|
NormalityRelocatorHotKey = KeybindLoader.RegisterKeybind(Mod, "NormalityRelocator", "Z");
|
||||||
RageHotKey = KeybindLoader.RegisterKeybind(Mod, "RageMode", "V");
|
RageHotKey = KeybindLoader.RegisterKeybind(Mod, "RageMode", "V");
|
||||||
SpectralVeilHotKey = KeybindLoader.RegisterKeybind(Mod, "SpectralVeilTeleport", "Z");
|
SpectralVeilHotKey = KeybindLoader.RegisterKeybind(Mod, "SpectralVeilTeleport", "Z");
|
||||||
|
SpringStoolJumpHotKey = KeybindLoader.RegisterKeybind(Mod, "SpringStoolJumpHotKey", "U");
|
||||||
TransformerHotKey = KeybindLoader.RegisterKeybind(Mod, "TransformerHotKey", "K");
|
TransformerHotKey = KeybindLoader.RegisterKeybind(Mod, "TransformerHotKey", "K");
|
||||||
SwitchGravityHotkey = KeybindLoader.RegisterKeybind(Mod, "GravitySwapOverride", "T");
|
SwitchGravityHotkey = KeybindLoader.RegisterKeybind(Mod, "GravitySwapOverride", "T");
|
||||||
ExpandDebuffInfo = KeybindLoader.RegisterKeybind(Mod, "ExpandDebuffInfo", "LeftControl");
|
ExpandDebuffInfo = KeybindLoader.RegisterKeybind(Mod, "ExpandDebuffInfo", "LeftControl");
|
||||||
@@ -62,6 +64,7 @@ namespace CalamityMod
|
|||||||
NormalityRelocatorHotKey = null;
|
NormalityRelocatorHotKey = null;
|
||||||
RageHotKey = null;
|
RageHotKey = null;
|
||||||
SpectralVeilHotKey = null;
|
SpectralVeilHotKey = null;
|
||||||
|
SpringStoolJumpHotKey = null;
|
||||||
TransformerHotKey = null;
|
TransformerHotKey = null;
|
||||||
ExpandDebuffInfo = null;
|
ExpandDebuffInfo = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ using Terraria.UI.Chat;
|
|||||||
|
|
||||||
namespace CalamityMod.ChatTags
|
namespace CalamityMod.ChatTags
|
||||||
{
|
{
|
||||||
public sealed class CalamityBuffTagHandler : AbstractTagHandler<CalamityBuffTagHandler>
|
public sealed class BuffTagEnemyEffectHandler : AbstractTagHandler<BuffTagEnemyEffectHandler>
|
||||||
{
|
{
|
||||||
public sealed class Snippet(int buffId) : TextSnippet
|
public sealed class Snippet(int buffId) : TextSnippet
|
||||||
{
|
{
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
|
using ReLogic.Graphics;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.GameContent;
|
||||||
|
using Terraria.ID;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
using Terraria.UI.Chat;
|
||||||
|
|
||||||
|
namespace CalamityMod.ChatTags
|
||||||
|
{
|
||||||
|
public sealed class BuffTagPlayerEffectHandler : AbstractTagHandler<BuffTagPlayerEffectHandler>
|
||||||
|
{
|
||||||
|
public sealed class Snippet(int buffId) : TextSnippet
|
||||||
|
{
|
||||||
|
private const float IconSize = 26f;
|
||||||
|
|
||||||
|
public int BuffId => buffId;
|
||||||
|
|
||||||
|
public bool DrawIcon => true;
|
||||||
|
|
||||||
|
public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = default, Color color = default, float scale = 1)
|
||||||
|
{
|
||||||
|
size = new Vector2(GetStringLength(FontAssets.MouseText.Value), IconSize);
|
||||||
|
|
||||||
|
if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0))
|
||||||
|
{
|
||||||
|
// Avoid re-drawing the icon when drawing borders.
|
||||||
|
if (DrawIcon)
|
||||||
|
{
|
||||||
|
// Tomat: I would love to support
|
||||||
|
// BuffLoader.[Pre/Post]Draw here, but it's not vaible
|
||||||
|
// because:
|
||||||
|
// 1. Main.DrawBuffIcon relies on LocalPlayer's buffs,
|
||||||
|
// 2. we can't control the source or destination
|
||||||
|
// rectangles.
|
||||||
|
|
||||||
|
if (Main.netMode != NetmodeID.Server && !Main.dedServ)
|
||||||
|
{
|
||||||
|
var texture = TextureAssets.Buff[BuffId];
|
||||||
|
spriteBatch.Draw(texture.Value, new Rectangle((int)position.X, (int)position.Y - 2, (int)IconSize, (int)IconSize), null, Color.White);
|
||||||
|
}
|
||||||
|
|
||||||
|
position.X += IconSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
var buffColor = CalamityUtils.GetDebuffTooltipNameColor(buffId);
|
||||||
|
var name = $"{(DrawIcon ? " " : "")}{Lang.GetBuffName(buffId)}";
|
||||||
|
ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.MouseText.Value, name, position, buffColor, 0f, Vector2.Zero, new Vector2(scale));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override float GetStringLength(DynamicSpriteFont font)
|
||||||
|
{
|
||||||
|
float iconSize = !DrawIcon ? 0f : IconSize + font.MeasureString(" ").X;
|
||||||
|
float size = iconSize + font.MeasureString(Lang.GetBuffName(buffId)).X;
|
||||||
|
return size * Scale;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string[] TagNames { get; } = ["cbuffplr"];
|
||||||
|
|
||||||
|
public override TextSnippet Parse(string text, Color baseColor = new(), string options = null)
|
||||||
|
{
|
||||||
|
if (int.TryParse(text, out int buffId) && buffId >= 0 && buffId < BuffLoader.BuffCount)
|
||||||
|
{
|
||||||
|
return new Snippet(buffId);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (BuffID.Search.TryGetId(text, out buffId))
|
||||||
|
{
|
||||||
|
return new Snippet(buffId);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new TextSnippet(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
using System;
|
||||||
|
using CalamityMod.NPCs.DevourerofGods;
|
||||||
|
using CalamityMod.Rarities;
|
||||||
|
using CalamityMod.Utilities.Daybreak;
|
||||||
|
using CalamityMod.Utilities.Daybreak.Buffers;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
|
using ReLogic.Graphics;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.GameContent;
|
||||||
|
using Terraria.UI.Chat;
|
||||||
|
|
||||||
|
namespace CalamityMod.ChatTags
|
||||||
|
{
|
||||||
|
// This is a tag handler for storing custom color effects for text all within the "ceffect" tag; the parameter determining the actual effect in use.
|
||||||
|
// i.e [ceffect/darksun:Hello World] would apply darksun effect to "Hello World".
|
||||||
|
public sealed class CustomColorEffectHandler : AbstractTagHandler<CustomColorEffectHandler>
|
||||||
|
{
|
||||||
|
protected override string[] TagNames { get; } = ["ceffect", "ce"];
|
||||||
|
public override TextSnippet Parse(string text, Color baseColor = new(), string options = null)
|
||||||
|
{
|
||||||
|
if (!CalamityClientConfig.Instance.TextEffects)
|
||||||
|
return new TextSnippet(text);
|
||||||
|
if (options.Equals("darksun", StringComparison.OrdinalIgnoreCase))
|
||||||
|
return new DarksunTextSnippet(text);
|
||||||
|
if (options.Equals("drunk", StringComparison.OrdinalIgnoreCase))
|
||||||
|
return new DrunkTextSnippet(text);
|
||||||
|
if (options.Equals("dog", StringComparison.OrdinalIgnoreCase))
|
||||||
|
return new DoGTextSnippet(text);
|
||||||
|
if (options.Equals("cosmic", StringComparison.OrdinalIgnoreCase))
|
||||||
|
return new CosmicPurple.CustomTextSnippet(text);
|
||||||
|
if (options.Equals("auric", StringComparison.OrdinalIgnoreCase))
|
||||||
|
return new BurnishedAuric.CustomTextSnippet(text);
|
||||||
|
if (options.Equals("calamity", StringComparison.OrdinalIgnoreCase))
|
||||||
|
return new CalamityRed.CustomTextSnippet(text);
|
||||||
|
if (options.Equals("exo", StringComparison.OrdinalIgnoreCase))
|
||||||
|
return new ExoticRainbow.CustomTextSnippet(text);
|
||||||
|
return new TextSnippet(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public sealed class DarksunTextSnippet(string text) : TextSnippet
|
||||||
|
{
|
||||||
|
public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = new Vector2(), Color color = new Color(), float scale = 1)
|
||||||
|
{
|
||||||
|
size = new Vector2(GetStringLength(FontAssets.MouseText.Value), FontAssets.MouseText.Value.MeasureString(" ").Y * scale);
|
||||||
|
|
||||||
|
if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0))
|
||||||
|
{
|
||||||
|
var font = FontAssets.MouseText.Value;
|
||||||
|
var BorderColor = new Color(255, 191, 73);
|
||||||
|
var HazeColor = new Color(238, 226, 153);
|
||||||
|
|
||||||
|
for (float f = 0f; f < MathHelper.TwoPi; f += MathHelper.TwoPi * 0.05f)
|
||||||
|
{
|
||||||
|
ChatManager.DrawColorCodedString(spriteBatch, font, text, position + new Vector2(2, 0).RotatedBy(f + Main.GlobalTimeWrappedHourly), Color.Lerp(BorderColor, HazeColor, (Main.mouseTextColor - 190) / 65f * 0.1f), 0f, Vector2.Zero, new Vector2(scale));
|
||||||
|
}
|
||||||
|
ChatManager.DrawColorCodedString(spriteBatch, font, text, position, Color.Black, 0f, Vector2.Zero, new Vector2(scale));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public override float GetStringLength(DynamicSpriteFont font)
|
||||||
|
{
|
||||||
|
float size = font.MeasureString(text).X;
|
||||||
|
return size * Scale;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public sealed class DrunkTextSnippet(string text) : TextSnippet
|
||||||
|
{
|
||||||
|
public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = new Vector2(), Color color = new Color(), float scale = 1)
|
||||||
|
{
|
||||||
|
size = new Vector2(GetStringLength(FontAssets.MouseText.Value), FontAssets.MouseText.Value.MeasureString(" ").Y * scale);
|
||||||
|
|
||||||
|
if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0))
|
||||||
|
{
|
||||||
|
var matrix = spriteBatch.transformMatrix;
|
||||||
|
Main.spriteBatch.End(out var ss);
|
||||||
|
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, matrix);
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; i++) // Draw 3 lines of differing opacity, color, and displacement.
|
||||||
|
{
|
||||||
|
float timer = (float)Math.Sin(Main.GlobalTimeWrappedHourly + 1f) / 2f;
|
||||||
|
|
||||||
|
float angle = (Main.GlobalTimeWrappedHourly * 2f) + (i * MathHelper.TwoPi / 3f);
|
||||||
|
float radius = timer * (3f + i * 6f);
|
||||||
|
Vector2 offset = new Vector2((float)Math.Cos(angle) * 1.7f, (float)Math.Sin(angle) * 1f) * radius; // Offset in an elliptical pattern
|
||||||
|
Vector2 pos = position + offset;
|
||||||
|
|
||||||
|
color = CalamityUtils.MulticolorLerp(Math.Abs(timer + (i * 0.2f)) % 1f, Color.LightBlue, Color.LightGreen, (i == 3) ? Color.Blue : (i == 2) ? Color.Red : Color.White);
|
||||||
|
float opacity = 1f - (i * 0.2f);
|
||||||
|
float rotation = +(timer * (Main.GlobalTimeWrappedHourly * 0.00001f)); // This precision is intended
|
||||||
|
|
||||||
|
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, FontAssets.MouseText.Value, text, pos, color * opacity, rotation, Vector2.Zero, new Vector2(scale));
|
||||||
|
}
|
||||||
|
|
||||||
|
Main.spriteBatch.End();
|
||||||
|
Main.spriteBatch.Begin(ss);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public override float GetStringLength(DynamicSpriteFont font)
|
||||||
|
{
|
||||||
|
float size = font.MeasureString(text).X;
|
||||||
|
return size * Scale;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public sealed class DoGTextSnippet(string text) : TextSnippet
|
||||||
|
{
|
||||||
|
public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = new Vector2(), Color color = new Color(), float scale = 1)
|
||||||
|
{
|
||||||
|
size = new Vector2(GetStringLength(FontAssets.MouseText.Value), FontAssets.MouseText.Value.MeasureString(" ").Y * scale);
|
||||||
|
|
||||||
|
if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0))
|
||||||
|
{
|
||||||
|
var pos = position;
|
||||||
|
using var lease = ScreenspaceTargetPool.Shared.Rent(Main.instance.GraphicsDevice);
|
||||||
|
string txt = "";
|
||||||
|
var matrix = spriteBatch.transformMatrix;
|
||||||
|
using (spriteBatch.Scope())
|
||||||
|
{
|
||||||
|
using (lease.Scope(clearColor: Color.Transparent))
|
||||||
|
{
|
||||||
|
|
||||||
|
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, matrix);
|
||||||
|
foreach (var item in text)
|
||||||
|
{
|
||||||
|
pos = position;
|
||||||
|
pos.X += FontAssets.MouseText.Value.MeasureString(txt).X;
|
||||||
|
float sin = MathHelper.SmoothStep(0, 1, (MathF.Sin(pos.X * 0.02f + Main.GlobalTimeWrappedHourly * -1.5f) + 1) * 0.5f);
|
||||||
|
var c = Color.Lerp(Color.Cyan, Color.Fuchsia, sin);
|
||||||
|
ChatManager.DrawColorCodedString(spriteBatch, FontAssets.MouseText.Value, item.ToString(), pos + new Vector2(0, -2 + sin * 4), c, 0, Vector2.Zero, new Vector2(scale));
|
||||||
|
txt += item;
|
||||||
|
}
|
||||||
|
spriteBatch.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity);
|
||||||
|
foreach (var item in ChatManager.ShadowDirections)
|
||||||
|
{
|
||||||
|
spriteBatch.Draw(lease.Target, Vector2.Zero + Vector2.TransformNormal(item * 2,matrix), null, Color.Black, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
|
||||||
|
}
|
||||||
|
spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
|
||||||
|
spriteBatch.End();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public override float GetStringLength(DynamicSpriteFont font)
|
||||||
|
{
|
||||||
|
float size = font.MeasureString(text).X;
|
||||||
|
return size * Scale;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
using Microsoft.Xna.Framework;
|
|
||||||
using Terraria.Localization;
|
|
||||||
|
|
||||||
namespace CalamityMod.Cooldowns
|
|
||||||
{
|
|
||||||
public class FleshTotem : CooldownHandler
|
|
||||||
{
|
|
||||||
public static new string ID => "FleshTotem";
|
|
||||||
|
|
||||||
public override bool ShouldDisplay => true;
|
|
||||||
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
|
|
||||||
public override string Texture => "CalamityMod/Cooldowns/FleshTotem";
|
|
||||||
public override Color OutlineColor => new Color(157, 248, 234);
|
|
||||||
public override Color CooldownStartColor => new Color(111, 169, 241);
|
|
||||||
public override Color CooldownEndColor => new Color(111, 169, 241);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 441 B |
|
Before Width: | Height: | Size: 217 B |
|
Before Width: | Height: | Size: 167 B |
|
After Width: | Height: | Size: 510 B |
|
After Width: | Height: | Size: 432 B |
|
After Width: | Height: | Size: 422 B |
@@ -26,7 +26,14 @@ namespace CalamityMod.Cooldowns
|
|||||||
{
|
{
|
||||||
switch (skin)
|
switch (skin)
|
||||||
{
|
{
|
||||||
case "Bloodfeast":
|
case "Nanotech":
|
||||||
|
skinTexture = "NanotechBoost";
|
||||||
|
outlineColor = new Color(14, 103, 129);
|
||||||
|
cooldownColorStart = new Color(85, 252, 229);
|
||||||
|
cooldownColorEnd = new Color(52,255,171);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "Vampiric":
|
||||||
skinTexture = "VampiricTalismanBoost";
|
skinTexture = "VampiricTalismanBoost";
|
||||||
outlineColor = new Color(143, 27, 27);
|
outlineColor = new Color(143, 27, 27);
|
||||||
cooldownColorStart = new Color(133, 5, 5);
|
cooldownColorStart = new Color(133, 5, 5);
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
using System;
|
||||||
|
using CalamityMod.Items.Accessories;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.Audio;
|
||||||
|
using Terraria.GameContent;
|
||||||
|
using Terraria.ID;
|
||||||
|
using Terraria.Localization;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
namespace CalamityMod.Cooldowns
|
||||||
|
{
|
||||||
|
public class Stooldown : CooldownHandler
|
||||||
|
{
|
||||||
|
public static new string ID => "Stooldown";
|
||||||
|
public override bool ShouldDisplay => true;
|
||||||
|
public override bool CanTickDown => true;
|
||||||
|
public override void Tick()
|
||||||
|
{
|
||||||
|
base.Tick();
|
||||||
|
}
|
||||||
|
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
|
||||||
|
public override string Texture => "CalamityMod/Cooldowns/Stooldown";
|
||||||
|
public override Color OutlineColor => Color.SandyBrown;
|
||||||
|
public override Color CooldownStartColor => Color.Brown;
|
||||||
|
public override Color CooldownEndColor => Color.Khaki;
|
||||||
|
|
||||||
|
public override SoundStyle? EndSound => new("CalamityMod/Sounds/Item/AscendantOff");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 270 B |
|
After Width: | Height: | Size: 185 B |
|
After Width: | Height: | Size: 166 B |
@@ -57,7 +57,7 @@ namespace CalamityMod.Dusts
|
|||||||
public override bool PreDraw(Dust dust)
|
public override bool PreDraw(Dust dust)
|
||||||
{
|
{
|
||||||
Vector2 baseSize = Vector2.One;
|
Vector2 baseSize = Vector2.One;
|
||||||
if (dust.customData != null)
|
if (dust.customData != null && dust.customData is Vector2)
|
||||||
baseSize = (Vector2)dust.customData;
|
baseSize = (Vector2)dust.customData;
|
||||||
|
|
||||||
Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.X, 0.5f * baseSize.X), Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.Y, 2.5f * baseSize.Y));
|
Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.X, 0.5f * baseSize.X), Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.Y, 2.5f * baseSize.Y));
|
||||||
@@ -87,7 +87,7 @@ namespace CalamityMod.Dusts
|
|||||||
private static void DrawPixelated(Dust dust)
|
private static void DrawPixelated(Dust dust)
|
||||||
{
|
{
|
||||||
Vector2 baseSize = Vector2.One;
|
Vector2 baseSize = Vector2.One;
|
||||||
if (dust.customData != null)
|
if (dust.customData != null && dust.customData is Vector2)
|
||||||
baseSize = (Vector2)dust.customData;
|
baseSize = (Vector2)dust.customData;
|
||||||
|
|
||||||
Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.X, 0.5f * baseSize.X), Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.Y, 2.5f * baseSize.Y));
|
Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.X, 0.5f * baseSize.X), Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.Y, 2.5f * baseSize.Y));
|
||||||
|
|||||||
@@ -31,30 +31,51 @@ namespace CalamityMod.Dusts
|
|||||||
|
|
||||||
public override bool Update(Dust dust)
|
public override bool Update(Dust dust)
|
||||||
{
|
{
|
||||||
dust.rotation += MathF.Sign(dust.velocity.X);
|
float fade = (1 + dust.fadeIn);
|
||||||
dust.velocity *= 0.98f;
|
dust.velocity *= 0.96f;
|
||||||
if (dust.noGravity)
|
if (dust.noGravity)
|
||||||
dust.scale += 0.02f;
|
dust.scale -= 0.05f * fade;
|
||||||
else
|
else
|
||||||
dust.scale -= 0.01f;
|
dust.scale -= 0.065f * fade;
|
||||||
|
|
||||||
float light = MathHelper.Clamp(dust.scale * 0.8f, 0f, 1f);
|
float light = MathHelper.Clamp(dust.scale * 0.8f, 0f, 1f);
|
||||||
if (!dust.noLightEmittence)
|
if (!dust.noLightEmittence)
|
||||||
Lighting.AddLight(dust.position, dust.color.ToVector3() * light);
|
Lighting.AddLight(dust.position, dust.color.ToVector3() * light);
|
||||||
|
|
||||||
|
if (dust.scale <= 0)
|
||||||
|
dust.active = false;
|
||||||
|
|
||||||
return true;
|
dust.position += dust.velocity;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
public override bool MidUpdate(Dust dust)
|
||||||
|
{
|
||||||
|
dust.rotation = dust.velocity.ToRotation() + MathHelper.PiOver2;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool PreDraw(Dust dust)
|
public override bool PreDraw(Dust dust)
|
||||||
{
|
{
|
||||||
|
dust.rotation = dust.velocity.ToRotation() + MathHelper.PiOver2;
|
||||||
|
Vector2 baseSize = Vector2.One;
|
||||||
|
bool useSquash = false;
|
||||||
|
float squashMaxSpeed = 0;
|
||||||
|
if (dust.customData != null && dust.customData is int)
|
||||||
|
{
|
||||||
|
useSquash = true;
|
||||||
|
squashMaxSpeed = (float)dust.customData;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector2 squash = useSquash ? new Vector2(Utils.Remap(dust.velocity.Length(), squashMaxSpeed / 4, squashMaxSpeed, 1 * baseSize.X, 0.5f * baseSize.X), Utils.Remap(dust.velocity.Length(), squashMaxSpeed / 4, squashMaxSpeed, 1 * baseSize.Y, 2.5f * baseSize.Y)) : baseSize;
|
||||||
|
|
||||||
if (!dust.noLight)
|
if (!dust.noLight)
|
||||||
{
|
{
|
||||||
// Glow Orb
|
// Glow Orb
|
||||||
Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.1f, SpriteEffects.None, 0);
|
Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
|
||||||
if (dust.alpha < 1)
|
if (dust.alpha < 1)
|
||||||
Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.04f, SpriteEffects.None, 0);
|
Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.04f, SpriteEffects.None, 0);
|
||||||
}
|
}
|
||||||
Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, Color.Black * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, dust.scale * 0.075f, SpriteEffects.None, 0);
|
Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, Color.Black * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -65,20 +86,32 @@ namespace CalamityMod.Dusts
|
|||||||
|
|
||||||
public override bool PreDraw(Dust dust)
|
public override bool PreDraw(Dust dust)
|
||||||
{
|
{
|
||||||
|
dust.rotation = dust.velocity.ToRotation() + MathHelper.PiOver2;
|
||||||
PixelationManager.AddPixelatedDrawer((_) => DrawPixelated(dust), GeneralDrawLayer.AfterDusts);
|
PixelationManager.AddPixelatedDrawer((_) => DrawPixelated(dust), GeneralDrawLayer.AfterDusts);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void DrawPixelated(Dust dust)
|
private static void DrawPixelated(Dust dust)
|
||||||
{
|
{
|
||||||
|
Vector2 baseSize = Vector2.One;
|
||||||
|
bool useSquash = false;
|
||||||
|
float squashMaxSpeed = 0;
|
||||||
|
if (dust.customData != null && dust.customData is int)
|
||||||
|
{
|
||||||
|
useSquash = true;
|
||||||
|
squashMaxSpeed = (int)dust.customData;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector2 squash = useSquash ? new Vector2(Utils.Remap(dust.velocity.Length(), squashMaxSpeed / 4, squashMaxSpeed, 1 * baseSize.X, 0.5f * baseSize.X), Utils.Remap(dust.velocity.Length(), squashMaxSpeed / 4, squashMaxSpeed, 1 * baseSize.Y, 2.5f * baseSize.Y)) : baseSize;
|
||||||
|
|
||||||
if (!dust.noLight)
|
if (!dust.noLight)
|
||||||
{
|
{
|
||||||
// Glow Orb
|
// Glow Orb
|
||||||
Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.1f, SpriteEffects.None, 0);
|
Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
|
||||||
if (dust.alpha < 1)
|
if (dust.alpha < 1)
|
||||||
Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.04f, SpriteEffects.None, 0);
|
Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.04f, SpriteEffects.None, 0);
|
||||||
}
|
}
|
||||||
Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, Color.Black * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, dust.scale * 0.075f, SpriteEffects.None, 0);
|
Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, Color.Black * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 445 B After Width: | Height: | Size: 786 B |
|
Before Width: | Height: | Size: 401 B After Width: | Height: | Size: 366 B |
|
Before Width: | Height: | Size: 290 B After Width: | Height: | Size: 463 B |
@@ -322,7 +322,7 @@ namespace CalamityMod.Graphics.Primitives
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Legacy behaviour: sample based on requested point count using Catmull-Rom style interpolation.
|
// Legacy behaviour: sample based on requested point count using Catmull-Rom style interpolation.
|
||||||
PositionsIndex = 1;
|
PositionsIndex = 0;
|
||||||
float controlCountMinusOne = controlCount - 1f;
|
float controlCountMinusOne = controlCount - 1f;
|
||||||
PrimitiveSmoothingType legacyType = settings.SmoothingType;
|
PrimitiveSmoothingType legacyType = settings.SmoothingType;
|
||||||
|
|
||||||
@@ -344,8 +344,6 @@ namespace CalamityMod.Graphics.Primitives
|
|||||||
MainPositions[PositionsIndex] = EvaluateCurve(legacyType, p0, p1, p2, p3, localSplineInterpolant, settings);
|
MainPositions[PositionsIndex] = EvaluateCurve(legacyType, p0, p1, p2, p3, localSplineInterpolant, settings);
|
||||||
PositionsIndex++;
|
PositionsIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainPositions[0] = controlPoints[0];
|
|
||||||
MainPositions[PositionsIndex] = controlPoints[controlCount - 1];
|
MainPositions[PositionsIndex] = controlPoints[controlCount - 1];
|
||||||
PositionsIndex++;
|
PositionsIndex++;
|
||||||
controlPoints.Clear();
|
controlPoints.Clear();
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ namespace CalamityMod.Graphics.Primitives
|
|||||||
SmoothingTension = smoothingTension;
|
SmoothingTension = smoothingTension;
|
||||||
FrameTransportMode = frameTransportMode;
|
FrameTransportMode = frameTransportMode;
|
||||||
Topology = topology;
|
Topology = topology;
|
||||||
CapStyle = PrimitiveCapStyle.Flat;
|
CapStyle = capStyle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -401,6 +401,32 @@ namespace CalamityMod.ILEditing
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Flail Balance Changes
|
||||||
|
// Make flails be unaffected by player velocity
|
||||||
|
private static void FlailsNoLongerAffectedByPlayerVelocity(On_Projectile.orig_AI_015_Flails orig, Projectile self)
|
||||||
|
{
|
||||||
|
orig(self);
|
||||||
|
if (self.ai[0] == 1f && self.ai[1] == 0f)
|
||||||
|
self.velocity -= Main.player[self.owner].velocity;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Increase Flower Pow's return speed
|
||||||
|
private static void IncreaseFlowerPowRetSpeed(ILContext il)
|
||||||
|
{
|
||||||
|
var cursor = new ILCursor(il);
|
||||||
|
// Move to where Flower Pow receives its specific flail stat changes. This moves it after num2 = 23f
|
||||||
|
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdcR4(23f), i => i.MatchStloc(6)))
|
||||||
|
{
|
||||||
|
LogFailure("Flower Pow Buff", "Could not move to Flower Pow's specific flail stat changes.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Emit an instruction setting num5 (the return speed) to 21. Vanilla is 16
|
||||||
|
cursor.Emit(OpCodes.Ldc_R4, 21f);
|
||||||
|
cursor.Emit(OpCodes.Stloc, 9);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Terrarian Projectile Limitation for Extra Updates
|
#region Terrarian Projectile Limitation for Extra Updates
|
||||||
private static void LimitTerrarianProjectiles(ILContext il)
|
private static void LimitTerrarianProjectiles(ILContext il)
|
||||||
{
|
{
|
||||||
@@ -686,5 +712,67 @@ namespace CalamityMod.ILEditing
|
|||||||
return orig(self);
|
return orig(self);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Adjust lifesteal costs
|
||||||
|
/// <summary>
|
||||||
|
/// Reimplemnts our own implementation of Spectre Healing so we can customize effects
|
||||||
|
/// Also means it will no longer reduce lifesteal cooldown when hitting with non-magic attacks, and not proc if every player is full HP
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="orig"></param>
|
||||||
|
/// <param name="self"></param>
|
||||||
|
/// <param name="dmg"></param>
|
||||||
|
/// <param name="Position"></param>
|
||||||
|
/// <param name="victim"></param>
|
||||||
|
private static void AdjustSpectreHealing(On_Projectile.orig_ghostHeal orig, Projectile self, int dmg, Vector2 Position, Entity victim)
|
||||||
|
{
|
||||||
|
float HealingMultiplier = 0.2f;
|
||||||
|
float LifestealCooldownMult = 0.66f;
|
||||||
|
|
||||||
|
var owner = Main.player[self.owner];
|
||||||
|
HealingMultiplier -= self.numHits * 0.05f;
|
||||||
|
int AmountToHeal = (int)Math.Round(dmg * HealingMultiplier);
|
||||||
|
if (!self.magic || AmountToHeal <= 0 || Main.player[Main.myPlayer].lifeSteal <= 0f)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
float MissingLifeGoal = 0f;
|
||||||
|
int targetPlayer = self.owner;
|
||||||
|
foreach (var player in Main.ActivePlayers)
|
||||||
|
{
|
||||||
|
if (!player.dead && ((!self.hostile && !owner.hostile) || owner.team == player.team) && self.Distance(player.Center) <= 3000f)
|
||||||
|
{
|
||||||
|
int MissingLife = player.statLifeMax2 - player.statLife;
|
||||||
|
if ((float)MissingLife > MissingLifeGoal)
|
||||||
|
{
|
||||||
|
MissingLifeGoal = MissingLife;
|
||||||
|
targetPlayer = player.whoAmI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AmountToHeal = (int)MathHelper.Min(AmountToHeal, MissingLifeGoal);
|
||||||
|
if (AmountToHeal <= 0)
|
||||||
|
return;
|
||||||
|
owner.lifeSteal -= AmountToHeal * LifestealCooldownMult;
|
||||||
|
Projectile.NewProjectile(self.GetSource_OnHit(victim, ProjectileSourceID.ToContextString(ProjectileSourceID.SetBonus_GhostHeal)), Position.X, Position.Y, 0f, 0f, ProjectileID.SpiritHeal, 0, 0f, self.owner, targetPlayer, AmountToHeal);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Adjust Vampire Knives implementation, stopping them from trying to heal when at full HP
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="orig"></param>
|
||||||
|
/// <param name="self"></param>
|
||||||
|
/// <param name="dmg"></param>
|
||||||
|
/// <param name="Position"></param>
|
||||||
|
/// <param name="victim"></param>
|
||||||
|
private static void AdjustVampireHealing(On_Projectile.orig_vampireHeal orig, Projectile self, int dmg, Vector2 Position, Entity victim)
|
||||||
|
{
|
||||||
|
int healAmount = (int)(dmg * 0.075f);
|
||||||
|
float LifestealCooldownMult = 1f;
|
||||||
|
if ((int)healAmount != 0 && !(Main.player[Main.myPlayer].lifeSteal <= 0f) && Main.player[Main.myPlayer].statLifeMax2 > Main.player[Main.myPlayer].statLife)
|
||||||
|
{
|
||||||
|
Main.player[Main.myPlayer].lifeSteal -= healAmount * LifestealCooldownMult;
|
||||||
|
Projectile.NewProjectile(self.GetSource_OnHit(victim, ProjectileSourceID.ToContextString(ProjectileSourceID.VampireKnives)), Position.X, Position.Y, 0f, 0f, ProjectileID.VampireHeal, 0, 0f, self.owner, self.owner, healAmount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,6 @@ using CalamityMod.Tiles.FurnitureExo;
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.DataStructures;
|
using Terraria.DataStructures;
|
||||||
using Terraria.GameContent;
|
using Terraria.GameContent;
|
||||||
using Terraria.GameContent.Biomes;
|
|
||||||
using Terraria.GameContent.Drawing;
|
using Terraria.GameContent.Drawing;
|
||||||
using Terraria.GameContent.Events;
|
using Terraria.GameContent.Events;
|
||||||
using Terraria.GameContent.ItemDropRules;
|
using Terraria.GameContent.ItemDropRules;
|
||||||
@@ -107,11 +106,15 @@ namespace CalamityMod.ILEditing
|
|||||||
IL_NPC.ScaleStats_ApplyExpertTweaks += RemoveExpertHardmodeScaling;
|
IL_NPC.ScaleStats_ApplyExpertTweaks += RemoveExpertHardmodeScaling;
|
||||||
IL_Projectile.Damage += VanillaBossResistChanges;
|
IL_Projectile.Damage += VanillaBossResistChanges;
|
||||||
IL_Projectile.AI_099_2 += LimitTerrarianProjectiles;
|
IL_Projectile.AI_099_2 += LimitTerrarianProjectiles;
|
||||||
|
On_Projectile.AI_015_Flails += FlailsNoLongerAffectedByPlayerVelocity;
|
||||||
|
IL_Projectile.AI_015_Flails += IncreaseFlowerPowRetSpeed;
|
||||||
IL_Projectile.AI_120_StardustGuardian += StardustGuardianAttackBuffs;
|
IL_Projectile.AI_120_StardustGuardian += StardustGuardianAttackBuffs;
|
||||||
On_Player.ConsumeSolarFlare += SolarWingsDashChange;
|
On_Player.ConsumeSolarFlare += SolarWingsDashChange;
|
||||||
On_Projectile.IsDamageDodgable += GFBNurseMeteorUndodgeable;
|
On_Projectile.IsDamageDodgable += GFBNurseMeteorUndodgeable;
|
||||||
IL_Player.UpdateBuffs += UpdateBuffsBalancingChanges;
|
IL_Player.UpdateBuffs += UpdateBuffsBalancingChanges;
|
||||||
IL_Player.ApplyVanillaHurtEffectModifiers += RemoveBeetleAndSolarFlareMultiplicativeDR;
|
IL_Player.ApplyVanillaHurtEffectModifiers += RemoveBeetleAndSolarFlareMultiplicativeDR;
|
||||||
|
On_Projectile.ghostHeal += AdjustSpectreHealing;
|
||||||
|
On_Projectile.vampireHeal += AdjustVampireHealing;
|
||||||
|
|
||||||
// Movement speed balance
|
// Movement speed balance
|
||||||
IL_Player.UpdateJumpHeight += FixJumpHeightBoosts;
|
IL_Player.UpdateJumpHeight += FixJumpHeightBoosts;
|
||||||
@@ -149,7 +152,6 @@ namespace CalamityMod.ILEditing
|
|||||||
IL_Item.TryGetPrefixStatMultipliersForItem += RelaxPrefixRequirements;
|
IL_Item.TryGetPrefixStatMultipliersForItem += RelaxPrefixRequirements;
|
||||||
On_NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns;
|
On_NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns;
|
||||||
On_ShimmerTransforms.IsItemTransformLocked += AdjustShimmerRequirements;
|
On_ShimmerTransforms.IsItemTransformLocked += AdjustShimmerRequirements;
|
||||||
On_Projectile.AI_015_Flails += FlailsNoLongerAffectedByPlayerVelocity;
|
|
||||||
IL_Projectile.AI_061_FishingBobber += WhitelistVictideBobber;
|
IL_Projectile.AI_061_FishingBobber += WhitelistVictideBobber;
|
||||||
On_Player.ItemCheck_CheckFishingBobbers += PreventVictideBobberFromJamming;
|
On_Player.ItemCheck_CheckFishingBobbers += PreventVictideBobberFromJamming;
|
||||||
|
|
||||||
|
|||||||
@@ -318,15 +318,6 @@ namespace CalamityMod.ILEditing
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Remove Flail Throw Velocity Being Affected By Player Velocity
|
|
||||||
private static void FlailsNoLongerAffectedByPlayerVelocity(On_Projectile.orig_AI_015_Flails orig, Projectile self)
|
|
||||||
{
|
|
||||||
orig(self);
|
|
||||||
if (self.ai[0] == 1f && self.ai[1] == 0f)
|
|
||||||
self.velocity -= Main.player[self.owner].velocity;
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Allow Victide Bobber to Exist
|
#region Allow Victide Bobber to Exist
|
||||||
private static void WhitelistVictideBobber(ILContext il)
|
private static void WhitelistVictideBobber(ILContext il)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories
|
|||||||
public new string LocalizationCategory => "Items.Accessories";
|
public new string LocalizationCategory => "Items.Accessories";
|
||||||
|
|
||||||
public static float BrimstoneFlamesReduction = 0.5f;
|
public static float BrimstoneFlamesReduction = 0.5f;
|
||||||
public static float critScaling = 3.5f; // How effective crit chance is at increasing debuff damage
|
public static float critScaling = 3f; // How effective crit chance is at increasing debuff damage
|
||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.width = 26;
|
Item.width = 26;
|
||||||
@@ -30,9 +30,9 @@ namespace CalamityMod.Items.Accessories
|
|||||||
}
|
}
|
||||||
public override void ModifyTooltips(List<TooltipLine> list)
|
public override void ModifyTooltips(List<TooltipLine> list)
|
||||||
{
|
{
|
||||||
Player player = Main.LocalPlayer;
|
|
||||||
if (Main.LocalPlayer != null)
|
if (Main.LocalPlayer != null)
|
||||||
list.FindAndReplace("[DAMAGE]", ((int)(Bane.debuffData.EnemyLostRegen / 2 * player.Calamity().playerBaneDebuffDamage)).ToString());
|
list.FindAndReplace("[DAMAGELINE]", Main.LocalPlayer.Calamity().abaddon ? this.GetLocalization("Equipped").Format(((int)(Bane.debuffData.EnemyLostRegen / 2 * Main.LocalPlayer.Calamity().playerBaneDebuffDamage)).ToString())
|
||||||
|
: this.GetLocalizedValue("Unequipped"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,8 @@ using Terraria.ModLoader;
|
|||||||
|
|
||||||
namespace CalamityMod.Items.Fishing
|
namespace CalamityMod.Items.Fishing
|
||||||
{
|
{
|
||||||
internal class SkylineBobber : ModItem, ILocalizedModType
|
[LegacyName("SkylineBobber")]
|
||||||
|
internal class AcrobaticBobber : ModItem, ILocalizedModType
|
||||||
{
|
{
|
||||||
public new string LocalizationCategory => "Items.Fishing";
|
public new string LocalizationCategory => "Items.Fishing";
|
||||||
public override string Texture => "CalamityMod/Projectiles/Typeless/HeronBobber";
|
public override string Texture => "CalamityMod/Projectiles/Typeless/HeronBobber";
|
||||||
@@ -22,7 +23,7 @@ namespace CalamityMod.Items.Fishing
|
|||||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
{
|
{
|
||||||
player.accFishingBobber = true;
|
player.accFishingBobber = true;
|
||||||
player.Calamity().SelectedFishingMinigame = CalamityPlayer.FishingMinigames.SkylineBobber;
|
player.Calamity().SelectedFishingMinigame = CalamityPlayer.FishingMinigames.AcrobaticBobber;
|
||||||
}
|
}
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using CalamityMod.CalPlayer;
|
using CalamityMod.CalPlayer;
|
||||||
using CalamityMod.Items.Materials;
|
using CalamityMod.Items.Materials;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
@@ -13,8 +14,11 @@ namespace CalamityMod.Items.Accessories
|
|||||||
{
|
{
|
||||||
public new string LocalizationCategory => "Items.Accessories";
|
public new string LocalizationCategory => "Items.Accessories";
|
||||||
|
|
||||||
public static int MaxLifeBoost = 50;
|
public static int MinRegenBoost => 2;
|
||||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxLifeBoost, RadiantOoze.MinRegenBoost.ToRegenPerSecond(), RadiantOoze.MaxRegenBoost.ToRegenPerSecond());
|
public static int MaxRegenBoost => 6;
|
||||||
|
public static float RegenTimeBoost => 1;
|
||||||
|
public static float NaturalRegenPower => 1.5f;
|
||||||
|
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinRegenBoost.ToRegenPerSecond(), MaxRegenBoost.ToRegenPerSecond(), (NaturalRegenPower - 1f).ToPercent(), RegenTimeBoost.ToPercent());
|
||||||
|
|
||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
@@ -28,19 +32,8 @@ namespace CalamityMod.Items.Accessories
|
|||||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
{
|
{
|
||||||
CalamityPlayer modPlayer = player.Calamity();
|
CalamityPlayer modPlayer = player.Calamity();
|
||||||
player.statLifeMax2 += MaxLifeBoost;
|
|
||||||
if (!player.HasBuff(BuffID.Honey))
|
|
||||||
player.AddBuff(BuffID.Honey, 2);
|
|
||||||
|
|
||||||
// bool left in for abyss light purposes and life regen effects
|
|
||||||
modPlayer.aAmpoule = true;
|
modPlayer.aAmpoule = true;
|
||||||
|
if (!modPlayer.purity && !hideVisual)
|
||||||
// Inherits all effects of Honey Dew and Living Dew
|
|
||||||
modPlayer.honeyDewHalveDebuffs = true;
|
|
||||||
modPlayer.livingDewHalveDebuffs = true;
|
|
||||||
|
|
||||||
// Add light if the other accessories aren't equipped and visibility is turned on
|
|
||||||
if (!(modPlayer.rOoze || modPlayer.purity) && !hideVisual)
|
|
||||||
Lighting.AddLight(player.Center, new Vector3(1.2f, 1.2f, 0.72f));
|
Lighting.AddLight(player.Center, new Vector3(1.2f, 1.2f, 0.72f));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +42,7 @@ namespace CalamityMod.Items.Accessories
|
|||||||
var player = Main.LocalPlayer;
|
var player = Main.LocalPlayer;
|
||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
list.FindAndReplace("[REGEN]", player.Calamity().radiantOozeRegen.ToString("0.##"));
|
list.FindAndReplace("[REGEN]", ((int)MathF.Round(MathHelper.Lerp(MaxRegenBoost, MinRegenBoost, (player.statLife / (float)player.statLifeMax2)))).ToRegenPerSecond());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,8 +48,6 @@ namespace CalamityMod.Items.Accessories
|
|||||||
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
player.GetDamage<GenericDamageClass>() += DamageBoost;
|
||||||
player.GetDamage<SummonDamageClass>() += TotalSummonDamageBoost - DamageBoost;
|
player.GetDamage<SummonDamageClass>() += TotalSummonDamageBoost - DamageBoost;
|
||||||
player.maxMinions += MinionSlotBoost;
|
player.maxMinions += MinionSlotBoost;
|
||||||
if (player.wingTime < player.wingTimeMax)
|
|
||||||
player.lifeRegen += RegenBoostDuringFlight;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories
|
|||||||
{
|
{
|
||||||
public new string LocalizationCategory => "Items.Accessories";
|
public new string LocalizationCategory => "Items.Accessories";
|
||||||
|
|
||||||
public static float critScaling = 7.5f; // How effective crit chance is at increasing debuff damage
|
public static float critScaling = 8f; // How effective crit chance is at increasing debuff damage
|
||||||
public static float critDamageBoostPerDebuff = 0.03f; // 3% increased crit damage per debuff
|
public static float critDamageBoostPerDebuff = 0.03f; // 3% increased crit damage per debuff
|
||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
@@ -42,9 +42,9 @@ namespace CalamityMod.Items.Accessories
|
|||||||
}
|
}
|
||||||
public override void ModifyTooltips(List<TooltipLine> list)
|
public override void ModifyTooltips(List<TooltipLine> list)
|
||||||
{
|
{
|
||||||
Player player = Main.LocalPlayer;
|
|
||||||
if (Main.LocalPlayer != null)
|
if (Main.LocalPlayer != null)
|
||||||
list.FindAndReplace("[DAMAGE]", ((int)(Bane.debuffData.EnemyLostRegen / 2 * player.Calamity().playerBaneDebuffDamage)).ToString());
|
list.FindAndReplace("[DAMAGELINE]", Main.LocalPlayer.Calamity().apollyon ? this.GetLocalization("Equipped").Format(((int)(Bane.debuffData.EnemyLostRegen / 2 * Main.LocalPlayer.Calamity().playerBaneDebuffDamage)).ToString())
|
||||||
|
: this.GetLocalizedValue("Unequipped"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories
|
|||||||
{
|
{
|
||||||
public new string LocalizationCategory => "Items.Accessories";
|
public new string LocalizationCategory => "Items.Accessories";
|
||||||
|
|
||||||
public static int MaxDefenseBoost = 20;
|
public static int MaxDefenseBoost = 15;
|
||||||
public static float MaxMoveSpeedReduction = 0.1f;
|
public static float MaxMoveSpeedReduction = 0.1f;
|
||||||
public static int TimeToReachMaxBoost = CalamityUtils.SecondsToFrames(10);
|
public static int TimeToReachMaxBoost = CalamityUtils.SecondsToFrames(10);
|
||||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(TimeToReachMaxBoost.FramesToSeconds(), MaxDefenseBoost, MaxMoveSpeedReduction.ToPercent());
|
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(TimeToReachMaxBoost.FramesToSeconds(), MaxDefenseBoost, MaxMoveSpeedReduction.ToPercent());
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace CalamityMod.Items.Accessories
|
|||||||
{
|
{
|
||||||
public new string LocalizationCategory => "Items.Accessories";
|
public new string LocalizationCategory => "Items.Accessories";
|
||||||
public static int cooldown = 600;
|
public static int cooldown = 600;
|
||||||
public static int damage = 100;
|
public static int damage = 50;
|
||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.width = 36;
|
Item.width = 36;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories
|
|||||||
{
|
{
|
||||||
Item.width = 26;
|
Item.width = 26;
|
||||||
Item.height = 42;
|
Item.height = 42;
|
||||||
Item.defense = 3;
|
Item.defense = 2;
|
||||||
Item.value = CalamityGlobalItem.RarityLightRedBuyPrice;
|
Item.value = CalamityGlobalItem.RarityLightRedBuyPrice;
|
||||||
Item.rare = ItemRarityID.LightRed;
|
Item.rare = ItemRarityID.LightRed;
|
||||||
Item.accessory = true;
|
Item.accessory = true;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories
|
|||||||
{
|
{
|
||||||
Item.width = 12;
|
Item.width = 12;
|
||||||
Item.height = 15;
|
Item.height = 15;
|
||||||
Item.defense = 3;
|
Item.defense = 2;
|
||||||
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
|
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
|
||||||
Item.rare = ItemRarityID.Orange;
|
Item.rare = ItemRarityID.Orange;
|
||||||
Item.accessory = true;
|
Item.accessory = true;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories
|
|||||||
{
|
{
|
||||||
Item.width = 44;
|
Item.width = 44;
|
||||||
Item.height = 108;
|
Item.height = 108;
|
||||||
Item.rare = ModContent.RarityType<BurnishedAuric>();
|
Item.rare = ModContent.RarityType<CalamityRed>();
|
||||||
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
||||||
Item.accessory = true;
|
Item.accessory = true;
|
||||||
Item.expert = true;
|
Item.expert = true;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using CalamityMod.CalPlayer;
|
using CalamityMod.CalPlayer;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
|
using Terraria.Localization;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace CalamityMod.Items.Accessories
|
namespace CalamityMod.Items.Accessories
|
||||||
@@ -8,11 +9,14 @@ namespace CalamityMod.Items.Accessories
|
|||||||
public class CrownJewel : ModItem, ILocalizedModType
|
public class CrownJewel : ModItem, ILocalizedModType
|
||||||
{
|
{
|
||||||
public new string LocalizationCategory => "Items.Accessories";
|
public new string LocalizationCategory => "Items.Accessories";
|
||||||
|
|
||||||
|
public static int RegenBoost = 1;
|
||||||
|
public static int ReducedDoTAmount = 4;
|
||||||
|
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RegenBoost.ToRegenPerSecond(), ReducedDoTAmount.ToRegenPerSecond());
|
||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
Item.width = 26;
|
Item.width = 26;
|
||||||
Item.height = 26;
|
Item.height = 26;
|
||||||
Item.defense = 1;
|
|
||||||
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
|
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
|
||||||
Item.rare = ItemRarityID.Blue;
|
Item.rare = ItemRarityID.Blue;
|
||||||
Item.accessory = true;
|
Item.accessory = true;
|
||||||
@@ -22,6 +26,7 @@ namespace CalamityMod.Items.Accessories
|
|||||||
{
|
{
|
||||||
CalamityPlayer modPlayer = player.Calamity();
|
CalamityPlayer modPlayer = player.Calamity();
|
||||||
modPlayer.crownJewel = true;
|
modPlayer.crownJewel = true;
|
||||||
|
player.lifeRegen += RegenBoost;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,7 +9,8 @@ using Terraria.ModLoader;
|
|||||||
|
|
||||||
namespace CalamityMod.Items.Accessories
|
namespace CalamityMod.Items.Accessories
|
||||||
{
|
{
|
||||||
public class DimensionalSoulArtifact : ModItem, ILocalizedModType
|
[LegacyName("DimensionalSoulArtifact")]
|
||||||
|
public class CrushingEgo : ModItem, ILocalizedModType
|
||||||
{
|
{
|
||||||
public new string LocalizationCategory => "Items.Accessories";
|
public new string LocalizationCategory => "Items.Accessories";
|
||||||
public override void SetDefaults()
|
public override void SetDefaults()
|
||||||
@@ -24,7 +25,7 @@ namespace CalamityMod.Items.Accessories
|
|||||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
{
|
{
|
||||||
CalamityPlayer modPlayer = player.Calamity();
|
CalamityPlayer modPlayer = player.Calamity();
|
||||||
modPlayer.dArtifact = true;
|
modPlayer.crushingEgo = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipes()
|
public override void AddRecipes()
|
||||||
|
Before Width: | Height: | Size: 793 B After Width: | Height: | Size: 793 B |