Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into BiomeBladeChanges
No files matched your search
@@ -31,7 +31,7 @@ namespace CalamityMod.Backgrounds
|
||||
/// </summary>
|
||||
public override void PreUpdatePlayers()
|
||||
{
|
||||
if (!Main.dedServ && Main.LocalPlayer.InModBiome<BiomeManagers.SunkenSeaBurrowsBiome>())
|
||||
if (!Main.dedServ && Main.LocalPlayer.InModBiome<BiomeManagers.GleamingBurrowsBiome>())
|
||||
{
|
||||
for (int i = 0; i < Main.screenWidth / 16; i++)
|
||||
{
|
||||
@@ -68,7 +68,7 @@ namespace CalamityMod.Backgrounds
|
||||
|
||||
private static void DrawBurrowsBG()
|
||||
{
|
||||
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.SunkenSeaBurrowsBiome>()))
|
||||
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.GleamingBurrowsBiome>()))
|
||||
{
|
||||
Transparency += TransitionSpeed;
|
||||
|
||||
|
||||
@@ -307,6 +307,9 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), ResistTrueMelee(0.5f)));
|
||||
|
||||
// 50% resist to Galactus Blade.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.5f, ProjectileType<GalacticaComet>())));
|
||||
|
||||
// 40% resist to Stellar Torus Staff.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<StellarTorusBeam>())));
|
||||
#endregion
|
||||
@@ -416,9 +419,6 @@ namespace CalamityMod.Balancing
|
||||
// 60% resist to Dynamic Pursuer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
|
||||
|
||||
// 60% resist to Prismatic Breaker's deathray.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType<PrismaticRay>()))));
|
||||
|
||||
// 50% resist to Chicken Cannon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<ChickenExplosion>()))));
|
||||
|
||||
@@ -434,6 +434,9 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Yharim's Crystal.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<YharimsCrystalBeam>()))));
|
||||
|
||||
// 45% resist to Prismatic Breaker's deathray.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<PrismaticRay>()))));
|
||||
|
||||
// 45% resist to Wrathwing's stealth strike fireballs.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<WrathwingCinder>()))));
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
public static class BalancingConstants
|
||||
{
|
||||
#region Movement
|
||||
// When the relevant config is enabled: Gives the player a substantial +50% move speed boost at all times
|
||||
internal static readonly float DefaultMoveSpeedBoost = 0.5f;
|
||||
// When the relevant config is enabled: Multiplies the player's movement speed by 1.5x at all times
|
||||
internal static readonly float DefaultMoveSpeedBoost = 1.5f;
|
||||
|
||||
// When the relevant config is enabled: Increases the player's base jump height by 10%
|
||||
internal static readonly float ConfigBoostedBaseJumpHeight = 5.51f; // vanilla = 5.01f
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class BasaltGullyBiome : ModBiome
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class SunkenSeaBurrowsBiome : ModBiome
|
||||
public class GleamingBurrowsBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => SunkenSeaBurrowsWater.Instance;
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
@@ -7,7 +7,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class SunkenSeaPolypBiome : ModBiome
|
||||
public class PolypForestBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => SunkenSeaPolypWater.Instance;
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
@@ -7,7 +7,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class SunkenSeaReefsBiome : ModBiome
|
||||
public class RadiantReefsBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => SunkenSeaReefsWater.Instance;
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
@@ -7,7 +7,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class SunkenSeaShoresBiome : ModBiome
|
||||
public class TimelessShoresBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => SunkenSeaShoresWater.Instance;
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
|
Before Width: | Height: | Size: 446 B After Width: | Height: | Size: 367 B |
@@ -1,10 +1,14 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class Trippy : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(OddMushroom.DamageBoost.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
|
||||
|
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 393 B |
@@ -63,10 +63,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, Main.rand.NextBool(8) ? 296 : 5, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.25f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.3f;
|
||||
Main.dust[dust].velocity.Y -= 0.5f;
|
||||
Dust blood = Dust.NewDustDirect(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, Main.rand.NextBool(8) ? 296 : 5, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.25f);
|
||||
blood.noGravity = true;
|
||||
blood.velocity *= 1.3f;
|
||||
blood.velocity.Y -= 0.5f;
|
||||
}
|
||||
Lighting.AddLight(npc.Center, 0.08f, 0f, 0f);
|
||||
}
|
||||
|
||||
@@ -53,15 +53,15 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
}
|
||||
|
||||
// Blue n black dust
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, Main.rand.NextBool(3) ? 104 : 186, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.4f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.75f;
|
||||
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
|
||||
Main.dust[dust].velocity.Y = Main.dust[dust].velocity.Y - 1f;
|
||||
Dust water = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, Main.rand.NextBool(3) ? 104 : 186, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.4f);
|
||||
water.noGravity = true;
|
||||
water.velocity *= 0.75f;
|
||||
water.velocity.X *= 0.75f;
|
||||
water.velocity.Y -= 1f;
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.2f;
|
||||
water.noGravity = false;
|
||||
water.scale *= 0.2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,15 +84,15 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
BloodParticle blood = new BloodParticle(npcSize, bloodVelocity, bloodLifetime, bloodScale, bloodColor);
|
||||
GeneralParticleHandler.SpawnParticle(blood);
|
||||
}
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, Main.rand.NextBool(3) ? 104 : 186, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.4f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.75f;
|
||||
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
|
||||
Main.dust[dust].velocity.Y = Main.dust[dust].velocity.Y - 1f;
|
||||
Dust water = Dust.NewDustDirect(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, Main.rand.NextBool(3) ? 104 : 186, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.4f);
|
||||
water.noGravity = true;
|
||||
water.velocity *= 0.75f;
|
||||
water.velocity.X = water.velocity.X * 0.75f;
|
||||
water.velocity.Y = water.velocity.Y - 1f;
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.2f;
|
||||
water.noGravity = false;
|
||||
water.scale *= 0.2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,10 +45,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
Vector2 dustCorner = Player.position - 2f * Vector2.One;
|
||||
Vector2 dustVel = Player.velocity + new Vector2(0f, Main.rand.NextFloat(-5f, -1f));
|
||||
int d = Dust.NewDust(dustCorner, Player.width + 4, Player.height + 4, DustID.GemTopaz, dustVel.X, dustVel.Y);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].scale = Main.rand.NextFloat(0.7f, 1.2f);
|
||||
Main.dust[d].alpha = 235;
|
||||
Dust fire = Dust.NewDustDirect(dustCorner, Player.width + 4, Player.height + 4, DustID.GemTopaz, dustVel.X, dustVel.Y);
|
||||
fire.noGravity = true;
|
||||
fire.scale = Main.rand.NextFloat(0.7f, 1.2f);
|
||||
fire.alpha = 235;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,10 +66,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
Vector2 dustCorner = npc.position - 2f * Vector2.One;
|
||||
Vector2 dustVel = npc.velocity + new Vector2(0f, Main.rand.NextFloat(-5f, -1f));
|
||||
int d = Dust.NewDust(dustCorner, npc.width + 4, npc.height + 4, DustID.GemTopaz, dustVel.X, dustVel.Y);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].scale = Main.rand.NextFloat(0.7f, 1.2f);
|
||||
Main.dust[d].alpha = 235;
|
||||
Dust fire = Dust.NewDustDirect(dustCorner, npc.width + 4, npc.height + 4, DustID.GemTopaz, dustVel.X, dustVel.Y);
|
||||
fire.noGravity = true;
|
||||
fire.scale = Main.rand.NextFloat(0.7f, 1.2f);
|
||||
fire.alpha = 235;
|
||||
}
|
||||
Lighting.AddLight(npc.position, 0.25f, 0.25f, 0.1f);
|
||||
}
|
||||
|
||||
@@ -44,10 +44,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
Vector2 dustCorner = Player.position - 2f * Vector2.One;
|
||||
Vector2 dustVel = Player.velocity + new Vector2(0f, Main.rand.NextFloat(-11f, -2f));
|
||||
int d = Dust.NewDust(dustCorner, Player.width + 4, Player.height + 4, Main.rand.NextBool(4) ? 300 : 323, dustVel.X, dustVel.Y);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].scale = hasDebuffResistance ? Main.rand.NextFloat(0.3f, 0.3f) : Main.rand.NextFloat(0.5f, 0.5f);
|
||||
Main.dust[d].alpha = 235;
|
||||
Dust moonDust = Dust.NewDustDirect(dustCorner, Player.width + 4, Player.height + 4, Main.rand.NextBool(4) ? 300 : 323, dustVel.X, dustVel.Y);
|
||||
moonDust.noGravity = true;
|
||||
moonDust.scale = hasDebuffResistance ? Main.rand.NextFloat(0.3f, 0.3f) : Main.rand.NextFloat(0.5f, 0.5f);
|
||||
moonDust.alpha = 235;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,10 +64,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
Vector2 dustCorner = npc.position - 2f * Vector2.One;
|
||||
Vector2 dustVel = npc.velocity + new Vector2(0f, Main.rand.NextFloat(-11f, -2f));
|
||||
int d = Dust.NewDust(dustCorner, npc.width + 4, npc.height + 4, Main.rand.NextBool(4) ? 300 : 323, dustVel.X, dustVel.Y);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].scale = Main.rand.NextFloat(0.5f, 0.5f);
|
||||
Main.dust[d].alpha = 235;
|
||||
Dust moonDust = Dust.NewDustDirect(dustCorner, npc.width + 4, npc.height + 4, Main.rand.NextBool(4) ? 300 : 323, dustVel.X, dustVel.Y);
|
||||
moonDust.noGravity = true;
|
||||
moonDust.scale = Main.rand.NextFloat(0.5f, 0.5f);
|
||||
moonDust.alpha = 235;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,11 +36,11 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
if (Main.rand.NextBool(14))
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.FungiHit, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].velocity *= 1.2f;
|
||||
Main.dust[dust].velocity.Y += 0.8f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.FungiHit, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
dust.noGravity = false;
|
||||
dust.velocity *= 1.2f;
|
||||
dust.velocity.Y += 0.8f;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
if (Main.rand.NextBool(9))
|
||||
{
|
||||
|
||||
@@ -30,15 +30,15 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
if (Main.rand.Next(5) < 4)
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Shadowflame, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.75f;
|
||||
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
|
||||
Main.dust[dust].velocity.Y = Main.dust[dust].velocity.Y - 3f;
|
||||
Dust flame = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Shadowflame, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.1f);
|
||||
flame.noGravity = true;
|
||||
flame.velocity *= 0.75f;
|
||||
flame.velocity.X *= 0.75f;
|
||||
flame.velocity.Y -= 3f;
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.3f;
|
||||
flame.noGravity = false;
|
||||
flame.scale *= 0.3f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,15 +45,15 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
if (Main.rand.Next(5) < 4)
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.JungleTorch, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 0.6f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.75f;
|
||||
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
|
||||
Main.dust[dust].velocity.Y = Main.dust[dust].velocity.Y - 1f;
|
||||
Dust microbe = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.JungleTorch, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 0.6f);
|
||||
microbe.noGravity = true;
|
||||
microbe.velocity *= 0.75f;
|
||||
microbe.velocity.X *= 0.75f;
|
||||
microbe.velocity.Y -= 1f;
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.2f;
|
||||
microbe.noGravity = false;
|
||||
microbe.scale *= 0.2f;
|
||||
}
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
@@ -68,15 +68,15 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, DustID.JungleTorch, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.2f + +(0.000003f * npc.width * npc.height));
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.75f;
|
||||
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
|
||||
Main.dust[dust].velocity.Y = Main.dust[dust].velocity.Y - 1f;
|
||||
Dust microbe = Dust.NewDustDirect(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, DustID.JungleTorch, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.2f + +(0.000003f * npc.width * npc.height));
|
||||
microbe.noGravity = true;
|
||||
microbe.velocity *= 0.75f;
|
||||
microbe.velocity.X *= 0.75f;
|
||||
microbe.velocity.Y -= 1f;
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.4f;
|
||||
microbe.noGravity = false;
|
||||
microbe.scale *= 0.4f;
|
||||
}
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
|
||||
@@ -48,16 +48,16 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
});
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, dustType, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 3f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.8f;
|
||||
Main.dust[dust].velocity.Y -= 0.5f;
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, dustType, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 3f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 1.8f;
|
||||
dust.velocity.Y -= 0.5f;
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.5f;
|
||||
dust.noGravity = false;
|
||||
dust.scale *= 0.5f;
|
||||
}
|
||||
drawInfo.DustCache.Add(dust);
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,14 +76,14 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
if (Main.rand.Next(5) < 4)
|
||||
{
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, dustType, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 3f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.8f;
|
||||
Main.dust[dust].velocity.Y -= 0.5f;
|
||||
Dust dust = Dust.NewDustDirect(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, dustType, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 3f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 1.8f;
|
||||
dust.velocity.Y -= 0.5f;
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.5f;
|
||||
dust.noGravity = false;
|
||||
dust.scale *= 0.5f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,10 +48,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
}
|
||||
Vector2 dustCorner = Player.position - 2f * Vector2.One;
|
||||
Vector2 dustVel = Player.velocity + new Vector2(0f, Main.rand.NextFloat(-11f, -2f));
|
||||
int d = Dust.NewDust(dustCorner, Player.width + 4, Player.height + 4, Main.rand.NextBool(4) ? 20 : 113, dustVel.X, dustVel.Y);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].scale = Main.rand.NextFloat(1f, 0.3f);
|
||||
Main.dust[d].alpha = 10;
|
||||
Dust dust = Dust.NewDustDirect(dustCorner, Player.width + 4, Player.height + 4, Main.rand.NextBool(4) ? 20 : 113, dustVel.X, dustVel.Y);
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(1f, 0.3f);
|
||||
dust.alpha = 10;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
||||
@@ -72,10 +72,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
Vector2 dustCorner = npc.position - 2f * Vector2.One;
|
||||
Vector2 dustVel = npc.velocity + new Vector2(0f, Main.rand.NextFloat(-11f, -2f));
|
||||
int d = Dust.NewDust(dustCorner, npc.width + 4, npc.height + 4, Main.rand.NextBool(4) ? 20 : 113, dustVel.X, dustVel.Y);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].scale = Main.rand.NextFloat(1f, 0.3f);
|
||||
Main.dust[d].alpha = 10;
|
||||
Dust dust = Dust.NewDustDirect(dustCorner, npc.width + 4, npc.height + 4, Main.rand.NextBool(4) ? 20 : 113, dustVel.X, dustVel.Y);
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(1f, 0.3f);
|
||||
dust.alpha = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Potions;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Potions
|
||||
{
|
||||
public class CalciumBuff : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(CalciumPotion.KnockbackResistance.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Potions;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Potions
|
||||
{
|
||||
public class PhotosynthesisBuff : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(PhotosynthesisPotion.IncreasedHeartHeal);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Potions;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Potions
|
||||
{
|
||||
public class ShadowBuff : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(ShadowPotion.StealthRegenBoost.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Items.Potions;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Potions
|
||||
{
|
||||
public class Soaring : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(SoaringPotion.FlightBoost.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
|
||||
@@ -35,12 +35,11 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
int dustID = ModContent.DustType<AdrenDust>();
|
||||
Vector2 dustVel = Player.velocity * 0.5f;
|
||||
int idx = Dust.NewDust(Main.rand.NextBool(5) ? drawInfo.Position : drawInfo.Position - Player.velocity * 1.5f, Player.width, Player.height, dustID, dustVel.X, dustVel.Y);
|
||||
Dust d = Main.dust[idx];
|
||||
d.scale = Main.rand.NextFloat(0.4f, 1.2f);
|
||||
d.noGravity = true;
|
||||
d.noLight = false;
|
||||
drawInfo.DustCache.Add(idx);
|
||||
Dust dust = Dust.NewDustDirect(Main.rand.NextBool(5) ? drawInfo.Position : drawInfo.Position - Player.velocity * 1.5f, Player.width, Player.height, dustID, dustVel.X, dustVel.Y);
|
||||
dust.scale = Main.rand.NextFloat(0.4f, 1.2f);
|
||||
dust.noGravity = true;
|
||||
dust.noLight = false;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class EmpyreanRage : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().xRage = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,11 +26,11 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
|
||||
if (Main.rand.NextBool(10))
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.TerraBlade, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.75f;
|
||||
Main.dust[dust].velocity.Y -= 0.35f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.TerraBlade, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 0.75f;
|
||||
dust.velocity.Y -= 0.35f;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,11 +32,11 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
if (Main.rand.Next(5) >= 0)
|
||||
{
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, ModContent.DustType<AbsorberDust>(), npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 2.5f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity.Y -= 1.8f;
|
||||
Main.dust[dust].velocity.Y *= 2.5f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
Dust dust = Dust.NewDustDirect(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, ModContent.DustType<AbsorberDust>(), npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 2.5f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity.Y -= 1.8f;
|
||||
dust.velocity.Y *= 2.5f;
|
||||
dust.noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,11 +28,11 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
if (Main.rand.NextBool(12))
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, (int)CalamityDusts.ProfanedFire, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 3f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.8f;
|
||||
Main.dust[dust].velocity.Y -= 0.5f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, (int)CalamityDusts.ProfanedFire, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 3f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 1.8f;
|
||||
dust.velocity.Y -= 0.5f;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 907 B |
|
Before Width: | Height: | Size: 645 B After Width: | Height: | Size: 409 B |
@@ -29,6 +29,8 @@ using CalamityMod.Items.Dyes;
|
||||
using CalamityMod.Items.Mounts;
|
||||
using CalamityMod.Items.Mounts.Minecarts;
|
||||
using CalamityMod.Items.PermanentBoosters;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using CalamityMod.Items.TreasureBags.MiscGrabBags;
|
||||
using CalamityMod.Items.VanillaArmorChanges;
|
||||
using CalamityMod.Items.Weapons.DraedonsArsenal;
|
||||
@@ -234,7 +236,6 @@ namespace CalamityMod.CalPlayer
|
||||
public int profanedSoulWeaponType = 0;
|
||||
public int hurtSoundTimer = 0;
|
||||
public int danceOfLightCharge = 0;
|
||||
public int shadowPotCooldown = 0;
|
||||
public int dogTextCooldown = 0;
|
||||
public float auralisStealthCounter = 0f;
|
||||
public int auralisAuroraCounter = 0;
|
||||
@@ -531,6 +532,7 @@ namespace CalamityMod.CalPlayer
|
||||
public int ascendantInsigniaCooldown = 0;
|
||||
public bool ascendantTrail = false;
|
||||
public bool frozenWingsCold = false;
|
||||
public bool flameWingsHeat = false;
|
||||
public bool magmaStoneVisuals = true;
|
||||
public bool eGauntlet = false;
|
||||
public bool eGauntletVisuals = true; // Used to control dust spawned when swinging
|
||||
@@ -727,7 +729,7 @@ namespace CalamityMod.CalPlayer
|
||||
public int phantomicBulwarkCooldown = 0;
|
||||
public int phantomicHeartRegen = 0; // 0 = can spawn, 720 = regen applied, 600 = regen stops and 10 sec cd before it can spawn again
|
||||
public bool silvaWings = false;
|
||||
public int icicleCooldown = 0;
|
||||
public int wingProjectileCooldown = 0;
|
||||
public bool RustyMedallionDroplets = false;
|
||||
public bool MiniSwarmers = false;
|
||||
public bool noStupidNaturalARSpawns = false;
|
||||
@@ -964,7 +966,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool decayEffigy = false;
|
||||
public bool rRage = false;
|
||||
public bool tRegen = false;
|
||||
public bool xRage = false;
|
||||
public bool xWrath = false;
|
||||
public bool graxDefense = false;
|
||||
public bool encased = false;
|
||||
@@ -1147,20 +1148,25 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
#region Biome
|
||||
public bool ZoneCalamity => Player.InModBiome(GetInstance<BrimstoneCragsBiome>());
|
||||
public bool ZoneAstral => Player.InModBiome(GetInstance<BiomeManagers.AstralInfectionBiome>()) && !ZoneAbyss;
|
||||
public bool ZoneSunkenSea => ZoneSunkenBurrows || ZoneSunkenSeaReefs || ZoneSunkenSeaPolyp || ZoneSunkenSeaShores;
|
||||
public bool ZoneSunkenBurrows => Player.InModBiome(GetInstance<SunkenSeaBurrowsBiome>());
|
||||
public bool ZoneSunkenSeaReefs => Player.InModBiome(GetInstance<SunkenSeaReefsBiome>());
|
||||
public bool ZoneSunkenSeaPolyp => Player.InModBiome(GetInstance<SunkenSeaPolypBiome>());
|
||||
public bool ZoneSunkenSeaShores => Player.InModBiome(GetInstance<SunkenSeaShoresBiome>());
|
||||
public bool ZoneSulphur => Player.InModBiome(GetInstance<SulphurousSeaBiome>());
|
||||
public bool ZoneSunkenSea => ZoneTimelessShores || ZoneRadiantReefs || ZonePolypForest || ZoneGleamingBurrows || ZoneBasaltGully;
|
||||
public bool ZoneTimelessShores => Player.InModBiome<TimelessShoresBiome>();
|
||||
public bool ZonePolypForest => Player.InModBiome<PolypForestBiome>();
|
||||
public bool ZoneRadiantReefs => Player.InModBiome<RadiantReefsBiome>();
|
||||
public bool ZoneGleamingBurrows => Player.InModBiome<GleamingBurrowsBiome>();
|
||||
public bool ZoneBasaltGully => Player.InModBiome<BasaltGullyBiome>();
|
||||
|
||||
public bool ZoneSulphur => Player.InModBiome<SulphurousSeaBiome>();
|
||||
public bool ZoneAbyss => ZoneAbyssLayer1 || ZoneAbyssLayer2 || ZoneAbyssLayer3 || ZoneAbyssLayer4;
|
||||
public bool ZoneAbyssLayer1 => Player.InModBiome(GetInstance<AbyssLayer1Biome>());
|
||||
public bool ZoneAbyssLayer2 => Player.InModBiome(GetInstance<AbyssLayer2Biome>());
|
||||
public bool ZoneAbyssLayer3 => Player.InModBiome(GetInstance<AbyssLayer3Biome>());
|
||||
public bool ZoneAbyssLayer4 => Player.InModBiome(GetInstance<AbyssLayer4Biome>());
|
||||
public bool ZoneFloralParadise => Player.InModBiome(GetInstance<FloralParadiseBiome>());
|
||||
public bool ZoneAbyssLayer1 => Player.InModBiome<AbyssLayer1Biome>();
|
||||
public bool ZoneAbyssLayer2 => Player.InModBiome<AbyssLayer2Biome>();
|
||||
public bool ZoneAbyssLayer3 => Player.InModBiome<AbyssLayer3Biome>();
|
||||
public bool ZoneAbyssLayer4 => Player.InModBiome<AbyssLayer4Biome>();
|
||||
|
||||
public bool ZoneFloralParadise => Player.InModBiome<FloralParadiseBiome>();
|
||||
|
||||
public bool ZoneCalamity => Player.InModBiome<BrimstoneCragsBiome>();
|
||||
|
||||
public bool ZoneAstral => Player.InModBiome<AstralInfectionBiome>() && !ZoneAbyss;
|
||||
|
||||
public bool InAnyCalamityBiome => ZoneAbyss || ZoneCalamity || ZoneFloralParadise || ZoneSulphur || ZoneSunkenSea || ZoneAstral;
|
||||
|
||||
@@ -1781,6 +1787,7 @@ namespace CalamityMod.CalPlayer
|
||||
ascendantInsignia = false;
|
||||
ascendantTrail = false;
|
||||
frozenWingsCold = false;
|
||||
flameWingsHeat = false;
|
||||
magmaStoneVisuals = true;
|
||||
eGauntlet = false;
|
||||
eGauntletVisuals = true;
|
||||
@@ -2059,7 +2066,6 @@ namespace CalamityMod.CalPlayer
|
||||
crimEffigy = false;
|
||||
decayEffigy = false;
|
||||
rRage = false;
|
||||
xRage = false;
|
||||
xWrath = false;
|
||||
graxDefense = false;
|
||||
encased = false;
|
||||
@@ -2393,7 +2399,6 @@ namespace CalamityMod.CalPlayer
|
||||
planarSpeedBoost = 0;
|
||||
galileoCooldown = 0;
|
||||
soundCooldown = 0;
|
||||
shadowPotCooldown = 0;
|
||||
dogTextCooldown = 0;
|
||||
auralisStealthCounter = 0f;
|
||||
auralisAuroraCounter = 0;
|
||||
@@ -2442,7 +2447,7 @@ namespace CalamityMod.CalPlayer
|
||||
killSpikyBalls = false;
|
||||
scuttlerCooldown = 0;
|
||||
rogueCrownCooldown = 0;
|
||||
icicleCooldown = 0;
|
||||
wingProjectileCooldown = 0;
|
||||
statisTimer = 0;
|
||||
hallowedRuneCooldown = 0;
|
||||
sulphurBubbleCooldown = 0;
|
||||
@@ -2543,7 +2548,6 @@ namespace CalamityMod.CalPlayer
|
||||
corrEffigy = false;
|
||||
crimEffigy = false;
|
||||
rRage = false;
|
||||
xRage = false;
|
||||
xWrath = false;
|
||||
kamiBoost = false;
|
||||
graxDefense = false;
|
||||
@@ -2825,7 +2829,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (ascendantInsignia && Main.myPlayer == Player.whoAmI && CalamityKeybinds.AscendantInsigniaHotKey.JustPressed && ascendantInsigniaCooldown <= 0)
|
||||
{
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ItemType<AscendantInsignia>()));
|
||||
Projectile.NewProjectileDirect(source, Player.Center - Vector2.UnitY * 45f, Vector2.Zero, ProjectileType<AscendantAura>(), 0, 0f);
|
||||
Projectile.NewProjectile(source, Player.Center - Vector2.UnitY * 45f, Vector2.Zero, ProjectileType<AscendantAura>(), 0, 0f);
|
||||
SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Item/AscendantActivate"));
|
||||
ascendantInsigniaCooldown = 2400;
|
||||
ascendantInsigniaBuffTime = 240; //4 seconds
|
||||
@@ -2899,9 +2903,8 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Projectile proj = Main.projectile[projIndex];
|
||||
float start = 360f / angelAmt;
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(proj.damage / 10);
|
||||
|
||||
Projectile.NewProjectile(source, new Vector2((int)(Player.Center.X + (Math.Sin(projIndex * start) * 300)), (int)(Player.Center.Y + (Math.Cos(projIndex * start) * 300))), Vector2.Zero, ProjectileType<AngelicAllianceArchangel>(), damage, proj.knockBack / 10f, Player.whoAmI, Main.rand.Next(180), projIndex * start);
|
||||
Projectile.NewProjectile(source, new Vector2((int)(Player.Center.X + (Math.Sin(projIndex * start) * 300)), (int)(Player.Center.Y + (Math.Cos(projIndex * start) * 300))), Vector2.Zero, ProjectileType<AngelicAllianceArchangel>(), proj.damage / 10, proj.knockBack / 10f, Player.whoAmI, Main.rand.Next(180), projIndex * start);
|
||||
Player.HealPlayer(2);
|
||||
}
|
||||
}
|
||||
@@ -2910,10 +2913,9 @@ namespace CalamityMod.CalPlayer
|
||||
Player.AddCooldown(Cooldowns.SandCloak.ID, CalamityUtils.SecondsToFrames(20));
|
||||
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ItemType<Items.Accessories.SandCloak>()));
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(12);
|
||||
float knockback = 2.5f;
|
||||
|
||||
int veil = Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ProjectileType<SandCloakVeil>(), damage, knockback, Player.whoAmI);
|
||||
int veil = Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ProjectileType<SandCloakVeil>(), 12, knockback, Player.whoAmI);
|
||||
Main.projectile[veil].Center = Player.Center;
|
||||
SoundEngine.PlaySound(SoundID.Item45, Player.Center);
|
||||
}
|
||||
@@ -2953,9 +2955,9 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 step = teleportOffset / numDust;
|
||||
for (int i = 0; i < numDust; i++)
|
||||
{
|
||||
int dustIndex = Dust.NewDust(Player.Center - (step * i), 1, 1, DustID.VilePowder, step.X, step.Y);
|
||||
Main.dust[dustIndex].noGravity = true;
|
||||
Main.dust[dustIndex].noLight = true;
|
||||
Dust dust = Dust.NewDustDirect(Player.Center - (step * i), 1, 1, DustID.VilePowder, step.X, step.Y);
|
||||
dust.noGravity = true;
|
||||
dust.noLight = true;
|
||||
}
|
||||
|
||||
spectralVeilImmunity = SpectralVeil.VeilIFrames;
|
||||
@@ -2993,9 +2995,9 @@ namespace CalamityMod.CalPlayer
|
||||
SoundEngine.PlaySound(BrimflameScowl.ActivationSound, Player.Center);
|
||||
for (int i = 0; i < 36; i++)
|
||||
{
|
||||
int brimDust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[brimDust].velocity *= 3f;
|
||||
Main.dust[brimDust].scale *= 1.15f;
|
||||
Dust brimDust = Dust.NewDustDirect(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f);
|
||||
brimDust.velocity *= 3f;
|
||||
brimDust.scale *= 1.15f;
|
||||
}
|
||||
int dustAmt = 36;
|
||||
for (int j = 0; j < dustAmt; j++)
|
||||
@@ -3003,10 +3005,10 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 dustRotation = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f;
|
||||
dustRotation = dustRotation.RotatedBy((double)((float)(j - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Player.Center;
|
||||
Vector2 dustVelocity = dustRotation - Player.Center;
|
||||
int brimDust2 = Dust.NewDust(dustRotation + dustVelocity, 0, 0, (int)CalamityDusts.Brimstone, dustVelocity.X * 1.5f, dustVelocity.Y * 1.5f, 100, default, 1.4f);
|
||||
Main.dust[brimDust2].noGravity = true;
|
||||
Main.dust[brimDust2].noLight = true;
|
||||
Main.dust[brimDust2].velocity = dustVelocity;
|
||||
Dust brimDust2 = Dust.NewDustDirect(dustRotation + dustVelocity, 0, 0, (int)CalamityDusts.Brimstone, dustVelocity.X * 1.5f, dustVelocity.Y * 1.5f, 100, default, 1.4f);
|
||||
brimDust2.noGravity = true;
|
||||
brimDust2.noLight = true;
|
||||
brimDust2.velocity = dustVelocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3026,9 +3028,9 @@ namespace CalamityMod.CalPlayer
|
||||
SoundEngine.PlaySound(BloodflareHeadRanged.ActivationSound, Player.Center);
|
||||
for (int d = 0; d < 64; d++)
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Necroplasm, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust].velocity *= 3f;
|
||||
Main.dust[dust].scale *= 1.15f;
|
||||
Dust dust = Dust.NewDustDirect(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Necroplasm, 0f, 0f, 0, default, 1f);
|
||||
dust.velocity *= 3f;
|
||||
dust.scale *= 1.15f;
|
||||
}
|
||||
int dustAmt = 36;
|
||||
for (int d = 0; d < dustAmt; d++)
|
||||
@@ -3036,10 +3038,10 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 source = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f;
|
||||
source = source.RotatedBy((double)((float)(d - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Player.Center;
|
||||
Vector2 dustVel = source - Player.Center;
|
||||
int phanto = Dust.NewDust(source + dustVel, 0, 0, (int)CalamityDusts.Necroplasm, dustVel.X * 1.5f, dustVel.Y * 1.5f, 100, default, 1.4f);
|
||||
Main.dust[phanto].noGravity = true;
|
||||
Main.dust[phanto].noLight = true;
|
||||
Main.dust[phanto].velocity = dustVel;
|
||||
Dust phanto = Dust.NewDustDirect(source + dustVel, 0, 0, (int)CalamityDusts.Necroplasm, dustVel.X * 1.5f, dustVel.Y * 1.5f, 100, default, 1.4f);
|
||||
phanto.noGravity = true;
|
||||
phanto.noLight = true;
|
||||
phanto.velocity = dustVel;
|
||||
}
|
||||
float spread = 45f * 0.0174f;
|
||||
double startAngle = Math.Atan2(Player.velocity.X, Player.velocity.Y) - spread / 2;
|
||||
@@ -3047,7 +3049,6 @@ namespace CalamityMod.CalPlayer
|
||||
double offsetAngle;
|
||||
|
||||
int damage = (int)(Player.GetTotalDamage<RangedDamageClass>().ApplyTo(300f));
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
@@ -3077,11 +3078,11 @@ namespace CalamityMod.CalPlayer
|
||||
SoundEngine.PlaySound(OmegaBlueHelmet.ActivationSound, Player.Center);
|
||||
for (int i = 0; i < 66; i++)
|
||||
{
|
||||
int d = Dust.NewDust(Player.position, Player.width, Player.height, DustID.PurificationPowder, 0, 0, 100, Color.Transparent, 2.6f);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].noLight = true;
|
||||
Main.dust[d].fadeIn = 1f;
|
||||
Main.dust[d].velocity *= 6.6f;
|
||||
Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.PurificationPowder, 0, 0, 100, Color.Transparent, 2.6f);
|
||||
dust.noGravity = true;
|
||||
dust.noLight = true;
|
||||
dust.fadeIn = 1f;
|
||||
dust.velocity *= 6.6f;
|
||||
}
|
||||
}
|
||||
if (dsSetBonus)
|
||||
@@ -3089,9 +3090,9 @@ namespace CalamityMod.CalPlayer
|
||||
SoundEngine.PlaySound(DemonshadeHelm.ActivationSound, Player.Center);
|
||||
for (int i = 0; i < 36; i++)
|
||||
{
|
||||
int brimDust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[brimDust].velocity *= 3f;
|
||||
Main.dust[brimDust].scale *= 1.15f;
|
||||
Dust brimDust = Dust.NewDustDirect(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f);
|
||||
brimDust.velocity *= 3f;
|
||||
brimDust.scale *= 1.15f;
|
||||
}
|
||||
int dustAmt = 36;
|
||||
for (int j = 0; j < dustAmt; j++)
|
||||
@@ -3099,10 +3100,10 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 dustRotation = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f;
|
||||
dustRotation = dustRotation.RotatedBy((double)((float)(j - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Player.Center;
|
||||
Vector2 dustVelocity = dustRotation - Player.Center;
|
||||
int brimDust2 = Dust.NewDust(dustRotation + dustVelocity, 0, 0, (int)CalamityDusts.Brimstone, dustVelocity.X * 1.5f, dustVelocity.Y * 1.5f, 100, default, 1.4f);
|
||||
Main.dust[brimDust2].noGravity = true;
|
||||
Main.dust[brimDust2].noLight = true;
|
||||
Main.dust[brimDust2].velocity = dustVelocity;
|
||||
Dust brimDust2 = Dust.NewDustDirect(dustRotation + dustVelocity, 0, 0, (int)CalamityDusts.Brimstone, dustVelocity.X * 1.5f, dustVelocity.Y * 1.5f, 100, default, 1.4f);
|
||||
brimDust2.noGravity = true;
|
||||
brimDust2.noLight = true;
|
||||
brimDust2.velocity = dustVelocity;
|
||||
}
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
@@ -3142,7 +3143,6 @@ namespace CalamityMod.CalPlayer
|
||||
// To compute Forbidden Circlet tornado damage, create a fake stat modifier on the spot which combines both classes.
|
||||
StatModifier forbidden = Player.GetTotalDamage<SummonDamageClass>().CombineWith(Player.GetDamage<RogueDamageClass>());
|
||||
int damage = (int)forbidden.ApplyTo(ForbiddenCirclet.tornadoBaseDmg);
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
float kBack = Player.GetTotalKnockback<SummonDamageClass>().ApplyTo(ForbiddenCirclet.tornadoBaseKB);
|
||||
|
||||
@@ -3226,12 +3226,12 @@ namespace CalamityMod.CalPlayer
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
float angle = MathHelper.TwoPi * i / 30f;
|
||||
int dustIndex = Dust.NewDust(Player.position, 120, 120, DustID.Rain_BloodMoon, 0f, 0f, 0, default, 2f);
|
||||
Main.dust[dustIndex].noGravity = true;
|
||||
Main.dust[dustIndex].velocity *= 4f;
|
||||
dustIndex = Dust.NewDust(Player.position, 120, 120, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[dustIndex].velocity *= 2.25f;
|
||||
Main.dust[dustIndex].noGravity = true;
|
||||
Dust dust = Dust.NewDustDirect(Player.position, 120, 120, DustID.Rain_BloodMoon, 0f, 0f, 0, default, 2f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 4f;
|
||||
dust = Dust.NewDustDirect(Player.position, 120, 120, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1f);
|
||||
dust.velocity *= 2.25f;
|
||||
dust.noGravity = true;
|
||||
Dust.NewDust(Player.Center + angle.ToRotationVector2() * 160f, 0, 0, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1f);
|
||||
}
|
||||
|
||||
@@ -3404,44 +3404,44 @@ namespace CalamityMod.CalPlayer
|
||||
// Make some dust
|
||||
for (int index = 0; index < 100; ++index)
|
||||
{
|
||||
Main.dust[Dust.NewDust(player.position, player.width, player.height, DustID.TeleportationPotion, player.velocity.X * 0.2f, player.velocity.Y * 0.2f, 150, Color.Cyan, 1.2f)].velocity *= 0.5f;
|
||||
Dust.NewDust(player.position, player.width, player.height, DustID.TeleportationPotion, player.velocity.X * 0.1f, player.velocity.Y * 0.1f, 150, Color.Cyan, 1.2f);
|
||||
}
|
||||
Rectangle rect = player.getRect();
|
||||
int dustAmt = rect.Width * rect.Height / 5;
|
||||
for (int k = 0; k < dustAmt; k++)
|
||||
{
|
||||
int idx = Dust.NewDust(new Vector2(rect.X, rect.Y), rect.Width, rect.Height, DustID.TeleportationPotion);
|
||||
Main.dust[idx].scale = Main.rand.NextFloat(0.2f, 0.7f);
|
||||
Dust dust = Dust.NewDustDirect(new Vector2(rect.X, rect.Y), rect.Width, rect.Height, DustID.TeleportationPotion);
|
||||
dust.scale = Main.rand.NextFloat(0.2f, 0.7f);
|
||||
if (k < 10)
|
||||
Main.dust[idx].scale += 0.25f;
|
||||
dust.scale += 0.25f;
|
||||
if (k < 5)
|
||||
Main.dust[idx].scale += 0.25f;
|
||||
dust.scale += 0.25f;
|
||||
}
|
||||
for (int k = 0; k < 50; k++)
|
||||
{
|
||||
int idx = Dust.NewDust(new Vector2(rect.X, rect.Y), rect.Width, rect.Height, DustID.DungeonSpirit);
|
||||
Main.dust[idx].noGravity = true;
|
||||
Dust dust = Dust.NewDustDirect(new Vector2(rect.X, rect.Y), rect.Width, rect.Height, DustID.DungeonSpirit);
|
||||
dust.noGravity = true;
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
Main.dust[idx].velocity *= 0.75f;
|
||||
dust.velocity *= 0.75f;
|
||||
}
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Main.dust[idx].velocity *= 2f;
|
||||
Main.dust[idx].scale *= 1.2f;
|
||||
dust.velocity *= 2f;
|
||||
dust.scale *= 1.2f;
|
||||
}
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Main.dust[idx].velocity *= 2f;
|
||||
Main.dust[idx].scale *= 1.2f;
|
||||
dust.velocity *= 2f;
|
||||
dust.scale *= 1.2f;
|
||||
}
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[idx].fadeIn = Main.rand.NextFloat(0.75f, 1f);
|
||||
Main.dust[idx].scale = Main.rand.NextFloat(0.25f, 0.75f);
|
||||
dust.fadeIn = Main.rand.NextFloat(0.75f, 1f);
|
||||
dust.scale = Main.rand.NextFloat(0.25f, 0.75f);
|
||||
}
|
||||
Main.dust[idx].scale *= 0.8f;
|
||||
dust.scale *= 0.8f;
|
||||
}
|
||||
|
||||
if (playSound)
|
||||
@@ -3581,7 +3581,7 @@ namespace CalamityMod.CalPlayer
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ItemType<InterstellarStompers>()));
|
||||
//Spawn explosion. ai[0] is used for transferring the recorded falling time
|
||||
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcIntDamage<MeleeDamageClass>(InterstellarStompers.SlamDamage));
|
||||
int damage = Player.CalcIntDamage<MeleeDamageClass>(InterstellarStompers.SlamDamage);
|
||||
|
||||
Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ProjectileType<StomperSlam>(), damage, 4f, Player.whoAmI, gSabatonFall);
|
||||
gSabatonFall = 0;
|
||||
@@ -3866,7 +3866,7 @@ namespace CalamityMod.CalPlayer
|
||||
(kamiBoost ? KamiBuff.RunAccelerationBoost : 0f) +
|
||||
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
|
||||
(silvaSet ? 0.05f : 0f) +
|
||||
(nimbleBounderBoost ? 0.1f : 0f) +
|
||||
(nimbleBounderBoost ? NimbleBounder.AccelerationBoost : 0f) +
|
||||
(blueCandle ? CirrusBlueCandleBuff.AccelerationBoost : 0f) +
|
||||
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
|
||||
(hasteLevel * 0.05f);
|
||||
@@ -3882,7 +3882,7 @@ namespace CalamityMod.CalPlayer
|
||||
(kamiBoost ? KamiBuff.RunSpeedBoost : 0f) +
|
||||
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
|
||||
(silvaSet ? 0.05f : 0f) +
|
||||
(nimbleBounderBoost ? 0.1f : 0f) +
|
||||
(nimbleBounderBoost ? NimbleBounder.AccelerationBoost : 0f) +
|
||||
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
|
||||
(hasteLevel * 0.05f);
|
||||
|
||||
@@ -3966,16 +3966,16 @@ namespace CalamityMod.CalPlayer
|
||||
knockback.Flat += item.knockBack * ((1f - modStealth) * 0.5f);
|
||||
|
||||
if (whiskey)
|
||||
knockback.Flat += item.knockBack * 0.2f;
|
||||
knockback.Flat += item.knockBack * Whiskey.KnockbackBoost;
|
||||
|
||||
if (tequila && Main.dayTime)
|
||||
knockback += item.knockBack * 0.1f;
|
||||
knockback += item.knockBack * Tequila.KnockbackBoost;
|
||||
|
||||
if (tequilaSunrise && Main.dayTime)
|
||||
knockback += item.knockBack * 0.2f;
|
||||
knockback += item.knockBack * TequilaSunrise.KnockbackBoost;
|
||||
|
||||
if (moscowMule)
|
||||
knockback += item.knockBack * 0.5f;
|
||||
knockback += item.knockBack * MoscowMule.KnockbackBoost;
|
||||
|
||||
if (titanHeartMask && rogue)
|
||||
knockback += item.knockBack * 0.05f;
|
||||
@@ -4021,12 +4021,12 @@ namespace CalamityMod.CalPlayer
|
||||
if (Main.rand.NextBool(20))
|
||||
{
|
||||
int confettiDust = Main.rand.Next(139, 143);
|
||||
int confetti = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, confettiDust, Player.velocity.X, Player.velocity.Y, 0, new Color(), 1.2f);
|
||||
Main.dust[confetti].velocity.X *= (float)(1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
Main.dust[confetti].velocity.Y *= (float)(1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
Main.dust[confetti].velocity.X += Main.rand.Next(-50, 51) * 0.05f;
|
||||
Main.dust[confetti].velocity.Y += Main.rand.Next(-50, 51) * 0.05f;
|
||||
Main.dust[confetti].scale *= (float)(1.0 + Main.rand.Next(-30, 31) * 0.01);
|
||||
Dust confetti = Dust.NewDustDirect(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, confettiDust, Player.velocity.X, Player.velocity.Y, 0, new Color(), 1.2f);
|
||||
confetti.velocity.X *= (float)(1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
confetti.velocity.Y *= (float)(1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
confetti.velocity.X += Main.rand.Next(-50, 51) * 0.05f;
|
||||
confetti.velocity.Y += Main.rand.Next(-50, 51) * 0.05f;
|
||||
confetti.scale *= (float)(1.0 + Main.rand.Next(-30, 31) * 0.01);
|
||||
}
|
||||
if (Main.rand.NextBool(40) && Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
@@ -4134,8 +4134,8 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int element = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.RainbowTorch, Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.25f);
|
||||
Main.dust[element].noGravity = true;
|
||||
Dust rainbow = Dust.NewDustDirect(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.RainbowTorch, Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.25f);
|
||||
rainbow.noGravity = true;
|
||||
}
|
||||
}
|
||||
if (dsSetBonus)
|
||||
@@ -4157,6 +4157,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (veneratedLocket)
|
||||
{
|
||||
var LocketSource = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<VeneratedLocket>()));
|
||||
if (item.CountsAsClass<RogueDamageClass>())
|
||||
{
|
||||
if (!CalamityLists.VeneratedLocketBanlist.Contains(item.type))
|
||||
@@ -4202,9 +4203,8 @@ namespace CalamityMod.CalPlayer
|
||||
float speedY5 = veneratedCloneYPos + (float)Main.rand.Next(-30, 31) * 0.02f;
|
||||
|
||||
// 08DEC2023: Ozzatron: Locket + Old Fashioned may need to be a corner case. We should probably just rework Locket instead.
|
||||
int locketDamage = Player.ApplyArmorAccDamageBonusesTo((int)(damage * 0.07f));
|
||||
|
||||
int p = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, locketDamage, knockBack * 0.5f, Player.whoAmI);
|
||||
int locketDamage = (int)(damage * 0.07f);
|
||||
int p = Projectile.NewProjectile(LocketSource, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, locketDamage, knockBack * 0.5f, Player.whoAmI);
|
||||
|
||||
if (p.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
@@ -4223,7 +4223,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
int knifeCount = 12;
|
||||
int knifeDamage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(55);
|
||||
knifeDamage = Player.ApplyArmorAccDamageBonusesTo(knifeDamage);
|
||||
|
||||
float angleStep = MathHelper.TwoPi / knifeCount;
|
||||
float speed = 14f;
|
||||
@@ -4234,7 +4233,7 @@ namespace CalamityMod.CalPlayer
|
||||
velocity2 = velocity2.RotatedBy(angleStep * i);
|
||||
int knifeCol = Main.rand.Next(0, 2);
|
||||
|
||||
int knife = Projectile.NewProjectile(source, Player.Center, velocity2, ProjectileType<VeneratedKnife>(), knifeDamage, 0f, Player.whoAmI, knifeCol, 0);
|
||||
int knife = Projectile.NewProjectile(LocketSource, Player.Center, velocity2, ProjectileType<VeneratedKnife>(), knifeDamage, 0f, Player.whoAmI, knifeCol, 0);
|
||||
if (knife.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[knife].DamageType = DamageClass.Generic;
|
||||
}
|
||||
@@ -4246,12 +4245,12 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (item.CountsAsClass<RangedDamageClass>())
|
||||
{
|
||||
var MedallionSource = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<RustyMedallion>()));
|
||||
int d = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(RustyMedallion.AcidDropBaseDamage);
|
||||
d = Player.ApplyArmorAccDamageBonusesTo(d);
|
||||
|
||||
Vector2 startingPosition = Main.MouseWorld - Vector2.UnitY.RotatedByRandom(0.3f) * 1250f;
|
||||
Vector2 directionToMouse = (Main.MouseWorld - startingPosition).SafeNormalize(Vector2.UnitX);
|
||||
int drop = Projectile.NewProjectile(source, startingPosition, directionToMouse * 15f, ProjectileType<AcidBarrelDrop>(), d, 0f, Player.whoAmI, 3);
|
||||
int drop = Projectile.NewProjectile(MedallionSource, startingPosition, directionToMouse * 15f, ProjectileType<AcidBarrelDrop>(), d, 0f, Player.whoAmI, 3);
|
||||
if (drop.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[drop].penetrate = 2;
|
||||
@@ -4265,9 +4264,9 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (item.CountsAsClass<RangedDamageClass>() && !item.channel)
|
||||
{
|
||||
var SwarmerSource = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<DynamoStemCells>()));
|
||||
int newDamage = (int)(damage * (6 - 5 * (item.useTime >= 25 ? 1 : item.useTime / 25)));
|
||||
newDamage = Player.ApplyArmorAccDamageBonusesTo(newDamage);
|
||||
Projectile.NewProjectile(source, position, velocity * 1.25f, ProjectileType<MiniatureFolly>(), newDamage, 2f, Player.whoAmI);
|
||||
Projectile.NewProjectile(SwarmerSource, position, velocity * 1.25f, ProjectileType<MiniatureFolly>(), newDamage, 2f, Player.whoAmI);
|
||||
|
||||
MiniSwamerCooldown = DynamoStemCells.MiniSwamerCooldown;
|
||||
}
|
||||
@@ -4462,9 +4461,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.ownedProjectileCounts[ProjectileType<GiantIbanRobotOfDoom>()] > 0)
|
||||
Player.yoraiz0rEye = 0;
|
||||
|
||||
if (Player.HeldItem != null && Player.HeldItem.type == ItemID.FalconBlade)
|
||||
Player.moveSpeed += 0.2f;
|
||||
|
||||
int totalMoonlightDyes = Player.dye.Count(dyeItem => dyeItem.type == ItemType<ProfanedMoonlightDye>());
|
||||
if (totalMoonlightDyes > 0)
|
||||
{
|
||||
@@ -4855,8 +4851,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (shadow)
|
||||
{
|
||||
stealthGenStandstill += 0.08f;
|
||||
stealthGenMoving += 0.08f;
|
||||
stealthGenStandstill += ShadowPotion.StealthRegenBoost;
|
||||
stealthGenMoving += ShadowPotion.StealthRegenBoost;
|
||||
}
|
||||
|
||||
if (eArtifact)
|
||||
|
||||
@@ -142,7 +142,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (HasCustomDash)
|
||||
{
|
||||
Player.vortexStealthActive = false;
|
||||
if (Player.wingsLogic != (int)VanillaWingID.WingsVortex)
|
||||
Player.vortexStealthActive = false;
|
||||
|
||||
// Decide the player's facing direction.
|
||||
if (Player.velocity.X != 0f)
|
||||
@@ -489,6 +490,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (WorldGen.SolidOrSlopedTile(upwardTilePoint.X, upwardTilePoint.Y) || WorldGen.SolidOrSlopedTile(aheadTilePoint.X, aheadTilePoint.Y))
|
||||
Player.velocity.X /= 2f;
|
||||
|
||||
Player.timeSinceLastDashStarted = 0;
|
||||
Player.dashDelay = -1;
|
||||
}
|
||||
|
||||
@@ -567,6 +569,7 @@ namespace CalamityMod.CalPlayer
|
||||
hitDirection = Player.direction;
|
||||
|
||||
// TODO -- This should probably use DirectStrike?
|
||||
// If this does use DirectStrike, remember to remove the Old Fashioned bonus as it'd be a projectile.
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
Player.ApplyDamageToNPC(n, (int)Damage, Knockback, hitDirection, false);
|
||||
|
||||
|
||||
@@ -131,10 +131,10 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Vortex, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.5f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Vortex, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 0.5f;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,10 +146,10 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.GoldCoin, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.5f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.GoldCoin, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 0.5f;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -166,10 +166,10 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Shadowflame, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.5f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.5f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Shadowflame, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.5f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 0.5f;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -332,11 +332,11 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, Main.rand.NextBool(8) ? 296 : 5, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.25f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.3f;
|
||||
Main.dust[dust].velocity.Y -= 0.5f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
Dust dust = Dust.NewDustDirect(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, Main.rand.NextBool(8) ? 296 : 5, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.25f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 1.3f;
|
||||
dust.velocity.Y -= 0.5f;
|
||||
drawInfo.DustCache.Add(dust.dustIndex);
|
||||
}
|
||||
if (Main.rand.NextBool(16))
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using CalamityMod.Items.Fishing.BrimstoneCragCatches;
|
||||
using CalamityMod.Items.Fishing.FishingRods;
|
||||
using CalamityMod.Items.Fishing.SulphurCatches;
|
||||
using CalamityMod.Items.Fishing.SunkenSeaCatches;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Items.Placeables.Abyss;
|
||||
using CalamityMod.Items.SummonItems;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
|
||||
@@ -20,6 +20,8 @@ using CalamityMod.Items.Armor.LunicCorps;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
using CalamityMod.Items.Armor.Wulfrum;
|
||||
using CalamityMod.Items.Mounts;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using CalamityMod.Items.Tools;
|
||||
using CalamityMod.Items.VanillaArmorChanges;
|
||||
using CalamityMod.Items.Weapons.DraedonsArsenal;
|
||||
@@ -71,12 +73,12 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int sVeilDustIndex1 = Dust.NewDust(Player.Center, 1, 1, DustID.VilePowder, sVeilDustDir.X * j, sVeilDustDir.Y * j);
|
||||
int sVeilDustIndex2 = Dust.NewDust(Player.Center, 1, 1, DustID.VilePowder, -sVeilDustDir.X * j, -sVeilDustDir.Y * j);
|
||||
Main.dust[sVeilDustIndex1].noGravity = false;
|
||||
Main.dust[sVeilDustIndex1].noLight = false;
|
||||
Main.dust[sVeilDustIndex2].noGravity = false;
|
||||
Main.dust[sVeilDustIndex2].noLight = false;
|
||||
Dust sVeilDust1 = Dust.NewDustDirect(Player.Center, 1, 1, DustID.VilePowder, sVeilDustDir.X * j, sVeilDustDir.Y * j);
|
||||
Dust sVeilDust2 = Dust.NewDustDirect(Player.Center, 1, 1, DustID.VilePowder, -sVeilDustDir.X * j, -sVeilDustDir.Y * j);
|
||||
sVeilDust1.noGravity = false;
|
||||
sVeilDust1.noLight = false;
|
||||
sVeilDust2.noGravity = false;
|
||||
sVeilDust2.noLight = false;
|
||||
}
|
||||
|
||||
SoundEngine.PlaySound(SilvaHeadSummon.DispelSound, Player.Center);
|
||||
@@ -94,8 +96,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int j = 0; j < 30; j++)
|
||||
{
|
||||
int num = Dust.NewDust(Player.position, Player.width, Player.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Dust dust = Main.dust[num];
|
||||
Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
dust.position.X += Main.rand.Next(-20, 21);
|
||||
dust.position.Y += Main.rand.Next(-20, 21);
|
||||
dust.velocity *= 0.4f;
|
||||
@@ -122,8 +123,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int j = 0; j < 100; j++)
|
||||
{
|
||||
int scarfDodgeDust = Dust.NewDust(Player.position, Player.width, Player.height, DustID.LifeDrain, 0f, 0f, 100, default, 2f);
|
||||
Dust dust = Main.dust[scarfDodgeDust];
|
||||
Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.LifeDrain, 0f, 0f, 100, default, 2f);
|
||||
dust.position.X += Main.rand.Next(-20, 21);
|
||||
dust.position.Y += Main.rand.Next(-20, 21);
|
||||
dust.velocity *= 0.4f;
|
||||
@@ -166,7 +166,6 @@ namespace CalamityMod.CalPlayer
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(55);
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
int lumenyl = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), ModContent.ProjectileType<AbyssalMirrorProjectile>(), damage, 0, Player.whoAmI);
|
||||
Main.projectile[lumenyl].rotation = Main.rand.NextFloat(0, 360);
|
||||
@@ -208,7 +207,6 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<EclipseMirror>()));
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(2750);
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
int eclipse = Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<EclipseMirrorBurst>(), damage, 0, Player.whoAmI);
|
||||
if (eclipse.WithinBounds(Main.maxProjectiles))
|
||||
@@ -266,8 +264,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int j = 0; j < 50; j++)
|
||||
{
|
||||
int nebulousReviveDust = Dust.NewDust(Player.position, Player.width, Player.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
|
||||
Dust dust = Main.dust[nebulousReviveDust];
|
||||
Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
|
||||
dust.position.X += Main.rand.Next(-20, 21);
|
||||
dust.position.Y += Main.rand.Next(-20, 21);
|
||||
dust.velocity *= 0.9f;
|
||||
@@ -351,9 +348,9 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int i = 0; i < 60; i++)
|
||||
{
|
||||
int d = Dust.NewDust(Player.position, Player.width, Player.height, DustID.GemSapphire, 0f, 0f, 0, default, 2.5f);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].velocity *= 5f;
|
||||
Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.GemSapphire, 0f, 0f, 0, default, 2.5f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 5f;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -541,32 +538,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (yellowCandle && cgn.DR < 0.99f && target.takenDamageMultiplier > 0.05f)
|
||||
modifiers.ModifyHitInfo += CirrusYellowCandleBuff.ModifyHitInfo_Spite;
|
||||
|
||||
// Excalibur and True Excalibur deal +100% damage to targets above 75% HP.
|
||||
if (item.type == ItemID.Excalibur || item.type == ItemID.TrueExcalibur)
|
||||
{
|
||||
if (target.life > (int)(target.lifeMax * 0.75))
|
||||
modifiers.ScalingBonusDamage += 1f;
|
||||
}
|
||||
|
||||
// Titanium Sword deals up to +15% damage based on the target's knockback resistance.
|
||||
if (item.type == ItemID.TitaniumSword)
|
||||
{
|
||||
float knockbackResistBonus = 0.15f * (1f - target.knockBackResist);
|
||||
modifiers.ScalingBonusDamage += knockbackResistBonus;
|
||||
}
|
||||
|
||||
// Antlion Claw, Bone Sword and Breaker Blade ignore 50% of the enemy's defense.
|
||||
if (item.type == ItemID.AntlionClaw || item.type == ItemID.BoneSword || item.type == ItemID.BreakerBlade)
|
||||
{
|
||||
modifiers.ScalingArmorPenetration += 0.5f;
|
||||
}
|
||||
|
||||
// Stylish Scissors, all Phaseblades and all Phasesabers ignore 100% of the enemy's defense.
|
||||
if (item.type == ItemID.StylistKilLaKillScissorsIWish || (item.type >= ItemID.BluePhaseblade && item.type <= ItemID.YellowPhaseblade) || (item.type >= ItemID.BluePhasesaber && item.type <= ItemID.YellowPhasesaber) || item.type == ItemID.OrangePhaseblade || item.type == ItemID.OrangePhasesaber)
|
||||
{
|
||||
modifiers.ScalingArmorPenetration += 1f;
|
||||
}
|
||||
|
||||
// Frost Armor's rework gives +X% melee damage and +Y% ranged damage based on distance, where X+Y = 15.
|
||||
if (frostSet)
|
||||
{
|
||||
@@ -658,14 +629,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (screwdriver)
|
||||
{
|
||||
if (proj.penetrate > 1 || proj.penetrate == -1)
|
||||
modifiers.ScalingBonusDamage += 0.05f;
|
||||
}
|
||||
|
||||
// Excalibur and True Excalibur deal +100% damage to targets above 75% HP.
|
||||
if (proj.type == ProjectileID.Excalibur || proj.type == ProjectileID.TrueExcalibur)
|
||||
{
|
||||
if (target.life > (int)(target.lifeMax * 0.75))
|
||||
modifiers.ScalingBonusDamage += 1f;
|
||||
modifiers.ScalingBonusDamage += Screwdriver.PiercingDamageBuff;
|
||||
}
|
||||
|
||||
// Calamity buffs Inferno Fork by 20%. This is multiplicative because it's supposed to be a buff to the weapon's base damage.
|
||||
@@ -673,20 +637,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (proj.type == ProjectileID.InfernoFriendlyBlast)
|
||||
modifiers.SourceDamage *= 1.2f;
|
||||
|
||||
// Gungnir deals +100% damage to targets above 75% HP.
|
||||
if (proj.type == ProjectileID.Gungnir)
|
||||
{
|
||||
if (target.life > (int)(target.lifeMax * 0.75))
|
||||
modifiers.ScalingBonusDamage += 1f;
|
||||
}
|
||||
|
||||
// Titanium Trident deals up to +15% damage based on the target's knockback resistance.
|
||||
if (proj.type == ProjectileID.TitaniumTrident)
|
||||
{
|
||||
float knockbackResistBonus = 0.15f * (1f - target.knockBackResist);
|
||||
modifiers.ScalingBonusDamage += knockbackResistBonus;
|
||||
}
|
||||
|
||||
// Frost Armor's rework gives +X% melee damage and +Y% ranged damage based on distance, where X+Y = 15.
|
||||
if (frostSet)
|
||||
{
|
||||
@@ -1549,7 +1499,6 @@ namespace CalamityMod.CalPlayer
|
||||
for (int i = 0; i < 9; i++)
|
||||
{
|
||||
int seekerDamage = (int)Player.GetBestClassDamage().ApplyTo(15);
|
||||
seekerDamage = Player.ApplyArmorAccDamageBonusesTo(seekerDamage);
|
||||
|
||||
Projectile bee = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, new Vector2(5, 5).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1.2f), ModContent.ProjectileType<BasicPlagueBee>(), seekerDamage, 0f, Player.whoAmI, -20, 30, 2);
|
||||
bee.ArmorPenetration = 35;
|
||||
@@ -1615,7 +1564,7 @@ namespace CalamityMod.CalPlayer
|
||||
Rectangle npcHitbox = n.getRect();
|
||||
if ((Player.getRect()).Intersects(npcHitbox) && (n.noTileCollide || Collision.CanHit(Player.position, Player.width, Player.height, n.position, n.width, n.height)))
|
||||
{
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcIntDamage<MeleeDamageClass>(InterstellarStompers.PassthroughDamage));
|
||||
int damage = Player.CalcIntDamage<MeleeDamageClass>(InterstellarStompers.PassthroughDamage);
|
||||
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), n.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0, Main.myPlayer);
|
||||
|
||||
@@ -1716,6 +1665,10 @@ namespace CalamityMod.CalPlayer
|
||||
#region Modify Hurt
|
||||
public override void ModifyHurt(ref Player.HurtModifiers modifiers)
|
||||
{
|
||||
// Calcium Potion knockback reduction
|
||||
if (calcium)
|
||||
modifiers.Knockback *= (1f - CalciumPotion.KnockbackResistance);
|
||||
|
||||
// Handles energy shields and Boss Rush, in that order
|
||||
modifiers.ModifyHurtInfo += ModifyHurtInfo_Calamity;
|
||||
|
||||
@@ -2355,22 +2308,22 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int d = 0; d < 20; d++)
|
||||
{
|
||||
int dust = Dust.NewDust(Player.position, Player.width, Player.height, DustID.Smoke, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[dust].velocity *= 3f;
|
||||
Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.Smoke, 0f, 0f, 100, default, 2f);
|
||||
dust.velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[dust].scale = 0.5f;
|
||||
Main.dust[dust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
dust.scale = 0.5f;
|
||||
dust.fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
for (int d = 0; d < 35; d++)
|
||||
{
|
||||
int fire = Dust.NewDust(Player.position, Player.width, Player.height, DustID.Torch, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[fire].noGravity = true;
|
||||
Main.dust[fire].velocity *= 5f;
|
||||
fire = Dust.NewDust(Player.position, Player.width, Player.height, DustID.Torch, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[fire].velocity *= 2f;
|
||||
Dust fire = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.Torch, 0f, 0f, 100, default, 3f);
|
||||
fire.noGravity = true;
|
||||
fire.velocity *= 5f;
|
||||
fire = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.Torch, 0f, 0f, 100, default, 2f);
|
||||
fire.velocity *= 2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2382,21 +2335,21 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int d = 0; d < 10; d++)
|
||||
{
|
||||
int ice = Dust.NewDust(Player.position, Player.width, Player.height, DustID.IceRod, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ice].velocity *= 3f;
|
||||
Dust ice = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.IceRod, 0f, 0f, 100, default, 2f);
|
||||
ice.velocity *= 3f;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[ice].scale = 0.5f;
|
||||
Main.dust[ice].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
ice.scale = 0.5f;
|
||||
ice.fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int d = 0; d < 15; d++)
|
||||
{
|
||||
int ice = Dust.NewDust(Player.position, Player.width, Player.height, DustID.IceRod, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[ice].noGravity = true;
|
||||
Main.dust[ice].velocity *= 5f;
|
||||
ice = Dust.NewDust(Player.position, Player.width, Player.height, DustID.IceRod, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ice].velocity *= 2f;
|
||||
Dust ice = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.IceRod, 0f, 0f, 100, default, 3f);
|
||||
ice.noGravity = true;
|
||||
ice.velocity *= 5f;
|
||||
ice = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.IceRod, 0f, 0f, 100, default, 2f);
|
||||
ice.velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2406,7 +2359,6 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
else if (xerocSet)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<EmpyreanRage>(), 180);
|
||||
Player.AddBuff(ModContent.BuffType<EmpyreanWrath>(), 180);
|
||||
}
|
||||
else if (reaverDefense)
|
||||
@@ -2544,7 +2496,6 @@ namespace CalamityMod.CalPlayer
|
||||
for (int n = 0; n < 4; n++)
|
||||
{
|
||||
int featherDamage = (int)Player.GetBestClassDamage().ApplyTo(30);
|
||||
featherDamage = Player.ApplyArmorAccDamageBonusesTo(featherDamage);
|
||||
|
||||
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 20f, ModContent.ProjectileType<StickyFeatherAero>(), featherDamage, 1f, Player.whoAmI);
|
||||
}
|
||||
@@ -2555,10 +2506,7 @@ namespace CalamityMod.CalPlayer
|
||||
SoundEngine.PlaySound(SoundID.Item74, Player.Center);
|
||||
|
||||
int blazeDamage = (int)Player.GetBestClassDamage().ApplyTo(25);
|
||||
blazeDamage = Player.ApplyArmorAccDamageBonusesTo(blazeDamage);
|
||||
|
||||
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(320);
|
||||
astralStarDamage = Player.ApplyArmorAccDamageBonusesTo(astralStarDamage);
|
||||
|
||||
Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, 0f, ModContent.ProjectileType<HideOfAstrumDeusExplosion>(), blazeDamage, 5f, Player.whoAmI, 0f, 1f);
|
||||
for (int n = 0; n < 12; n++)
|
||||
@@ -2573,7 +2521,6 @@ namespace CalamityMod.CalPlayer
|
||||
for (int n = 0; n < 3; n++)
|
||||
{
|
||||
int deificStarDamage = (int)Player.GetBestClassDamage().ApplyTo(130);
|
||||
deificStarDamage = Player.ApplyArmorAccDamageBonusesTo(deificStarDamage);
|
||||
|
||||
Projectile star = CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ProjectileID.StarVeilStar, deificStarDamage, 4f, Player.whoAmI);
|
||||
if (star.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
@@ -2614,7 +2561,6 @@ namespace CalamityMod.CalPlayer
|
||||
int effectStrength = amalgam ? 3 : aBrain ? 2 : 1;
|
||||
int effectDamage = amalgam ? 400 : aBrain ? 50 : 15;
|
||||
effectDamage = (int)Player.GetBestClassDamage().ApplyTo(effectDamage);
|
||||
effectDamage = Player.ApplyArmorAccDamageBonusesTo(effectDamage);
|
||||
|
||||
Vector2 spawnerVelocity = -Vector2.UnitY.RotatedByRandom(MathHelper.Pi / 40f) * 12.5f;
|
||||
Projectile.NewProjectile(source, Player.Center, spawnerVelocity, ModContent.ProjectileType<ShadeNimbusSpawner>(), effectDamage, 0f, Player.whoAmI, 0f, 0f, effectStrength);
|
||||
@@ -2643,7 +2589,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item74, Player.Center);
|
||||
int eDamage = (int)Player.GetBestClassDamage().ApplyTo(230);
|
||||
eDamage = Player.ApplyArmorAccDamageBonusesTo(eDamage);
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
Projectile.NewProjectile(fuckYouBitch, Player.Center, Vector2.Zero, ModContent.ProjectileType<DeepseaBlaze>(), eDamage, 1f, Player.whoAmI, 0f, 0f);
|
||||
@@ -2660,7 +2605,6 @@ namespace CalamityMod.CalPlayer
|
||||
double deltaAngle = spread / 8f;
|
||||
double offsetAngle;
|
||||
int sDamage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(60);
|
||||
sDamage = Player.ApplyArmorAccDamageBonusesTo(sDamage);
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
@@ -2685,7 +2629,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (hurtInfo.Damage > 0)
|
||||
{
|
||||
int rDamage = (int)Player.GetBestClassDamage().ApplyTo(240);
|
||||
rDamage = Player.ApplyArmorAccDamageBonusesTo(rDamage);
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
Projectile.NewProjectile(source, Player.Center.X, Player.position.Y + 36f, 0f, -18f, ModContent.ProjectileType<ReaverThornBase>(), rDamage, 0f, Player.whoAmI, 0f, 0f);
|
||||
@@ -2701,7 +2644,7 @@ namespace CalamityMod.CalPlayer
|
||||
double startAngle = Math.Atan2(Player.velocity.X, Player.velocity.Y) - spread / 2;
|
||||
double deltaAngle = spread / 8f;
|
||||
double offsetAngle;
|
||||
int shrapnelDamage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcIntDamage<MeleeDamageClass>(675));
|
||||
int shrapnelDamage = Player.CalcIntDamage<MeleeDamageClass>(675);
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
@@ -2722,7 +2665,6 @@ namespace CalamityMod.CalPlayer
|
||||
for (int l = 0; l < 2; l++)
|
||||
{
|
||||
int shadowbeamDamage = (int)Player.GetBestClassDamage().ApplyTo(300);
|
||||
shadowbeamDamage = Player.ApplyArmorAccDamageBonusesTo(shadowbeamDamage);
|
||||
|
||||
Projectile beam = CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 22f, ProjectileID.ShadowBeamFriendly, shadowbeamDamage, 7f, Player.whoAmI);
|
||||
if (beam.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
@@ -2735,7 +2677,6 @@ namespace CalamityMod.CalPlayer
|
||||
for (int l = 0; l < 5; l++)
|
||||
{
|
||||
int scytheDamage = (int)Player.GetBestClassDamage().ApplyTo(500);
|
||||
scytheDamage = Player.ApplyArmorAccDamageBonusesTo(scytheDamage);
|
||||
|
||||
Projectile scythe = CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 22f, ProjectileID.DemonScythe, scytheDamage, 7f, Player.whoAmI);
|
||||
if (scythe.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
|
||||
@@ -6,6 +6,8 @@ using CalamityMod.Buffs.Placeables;
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
@@ -177,14 +179,12 @@ namespace CalamityMod.CalPlayer
|
||||
if (vodka)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += 1;
|
||||
totalNegativeLifeRegen += Vodka.RegenLoss;
|
||||
}
|
||||
if (redWine)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += 1;
|
||||
if (baguette)
|
||||
totalNegativeLifeRegen += 3;
|
||||
totalNegativeLifeRegen += baguette ? Baguette.RedWineBuffedRegenLoss : RedWine.RegenLoss;
|
||||
}
|
||||
if (grapeBeer)
|
||||
{
|
||||
@@ -193,7 +193,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (moonshine)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += 1;
|
||||
totalNegativeLifeRegen += Moonshine.RegenLoss;
|
||||
}
|
||||
if (rum)
|
||||
{
|
||||
@@ -206,7 +206,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (fireball)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += 1;
|
||||
totalNegativeLifeRegen += Fireball.RegenLoss;
|
||||
}
|
||||
if (whiskey)
|
||||
{
|
||||
@@ -215,27 +215,27 @@ namespace CalamityMod.CalPlayer
|
||||
if (everclear)
|
||||
{
|
||||
alcoholPoisonLevel += 2;
|
||||
totalNegativeLifeRegen += 10;
|
||||
totalNegativeLifeRegen += Everclear.RegenLoss;
|
||||
}
|
||||
if (bloodyMary)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += 4;
|
||||
totalNegativeLifeRegen += BloodyMary.RegenLoss;
|
||||
}
|
||||
if (tequila)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += 1;
|
||||
totalNegativeLifeRegen += Tequila.RegenLoss;
|
||||
}
|
||||
if (tequilaSunrise)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += 2;
|
||||
totalNegativeLifeRegen += TequilaSunrise.RegenLoss;
|
||||
}
|
||||
if (screwdriver)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += 1;
|
||||
totalNegativeLifeRegen += Screwdriver.RegenLoss;
|
||||
}
|
||||
if (caribbeanRum)
|
||||
{
|
||||
@@ -252,27 +252,27 @@ namespace CalamityMod.CalPlayer
|
||||
if (margarita)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += 1;
|
||||
totalNegativeLifeRegen += Margarita.RegenLoss;
|
||||
}
|
||||
if (starBeamRye)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += 2;
|
||||
totalNegativeLifeRegen += StarBeamRye.RegenLoss;
|
||||
}
|
||||
if (moscowMule)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += 4;
|
||||
totalNegativeLifeRegen += MoscowMule.RegenLoss;
|
||||
}
|
||||
if (whiteWine)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += 1;
|
||||
totalNegativeLifeRegen += WhiteWine.RegenLoss;
|
||||
}
|
||||
if (evergreenGin)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += 1;
|
||||
totalNegativeLifeRegen += EvergreenGin.RegenLoss;
|
||||
}
|
||||
if (Player.tipsy)
|
||||
{
|
||||
@@ -615,10 +615,10 @@ namespace CalamityMod.CalPlayer
|
||||
public override void UpdateLifeRegen()
|
||||
{
|
||||
if (rum)
|
||||
Player.lifeRegen += 2;
|
||||
Player.lifeRegen += Rum.RegenBoost;
|
||||
|
||||
if (caribbeanRum)
|
||||
Player.lifeRegen += 2;
|
||||
Player.lifeRegen += CaribbeanRum.RegenBoost;
|
||||
|
||||
if (aChicken)
|
||||
Player.lifeRegen += 1;
|
||||
@@ -679,14 +679,14 @@ namespace CalamityMod.CalPlayer
|
||||
Player.lifeRegen += 2;
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, DustID.Blood, 0f, 0f, 200, new Color(99, 54, 84), 2f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
Main.dust[regen].fadeIn = 1.3f;
|
||||
Dust regen = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.Blood, 0f, 0f, 200, new Color(99, 54, 84), 2f);
|
||||
regen.noGravity = true;
|
||||
regen.fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
Main.dust[regen].velocity = velocity;
|
||||
regen.velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= 34f;
|
||||
Main.dust[regen].position = Player.Center - velocity;
|
||||
regen.position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -769,8 +769,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (!Player.shinyStone && Player.StandingStill() && Player.velocity.Y == 0 && Player.itemAnimation == 0)
|
||||
{
|
||||
bool honeyDewWorking = honeyTurboRegen && Player.honeyWet;
|
||||
bool anyStandingStillLifeRegen = shadeRegen || cFreeze || honeyDewWorking || photosynthesis || aAmpoule || purity;
|
||||
bool onlyPhotosynthesisAtNight = !shadeRegen && !cFreeze && !honeyDewWorking && photosynthesis && !Main.dayTime;
|
||||
bool anyStandingStillLifeRegen = shadeRegen || cFreeze || honeyDewWorking || aAmpoule || purity;
|
||||
|
||||
// Divides all negative life regen by two before applying any other effects.
|
||||
if (anyStandingStillLifeRegen && Player.lifeRegen < 0)
|
||||
@@ -779,32 +778,31 @@ namespace CalamityMod.CalPlayer
|
||||
// Spawn dust of some flavor while actually regenerating, aAmpule and purity have a slightly different looking style
|
||||
if (Player.lifeRegen > 0 && Player.statLife < actualMaxLife)
|
||||
{
|
||||
int dustType = shadeRegen ? 173 : cFreeze ? 67 : honeyDewWorking ? DustID.Honey2 : photosynthesis ? 244 : aAmpoule ? 228 : purity ? 187 : -1;
|
||||
int dustType = shadeRegen ? 173 : cFreeze ? 67 : honeyDewWorking ? DustID.Honey2 : aAmpoule ? 228 : purity ? 187 : -1;
|
||||
bool dustSpawnRolled = Main.rand.Next(30000) < Player.lifeRegenTime || purity ? Main.rand.NextBool() : aAmpoule ? Main.rand.NextBool(4) : Main.rand.NextBool(30);
|
||||
if (dustType != -1 && dustSpawnRolled)
|
||||
{
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, dustType, 0f, 0f, purity || aAmpoule ? 80 : 200, default, purity || aAmpoule ? 0.5f : 1f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
Main.dust[regen].fadeIn = 1.3f;
|
||||
Dust regen = Dust.NewDustDirect(Player.position, Player.width, Player.height, dustType, 0f, 0f, purity || aAmpoule ? 80 : 200, default, purity || aAmpoule ? 0.5f : 1f);
|
||||
regen.noGravity = true;
|
||||
regen.fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
Main.dust[regen].velocity = velocity;
|
||||
regen.velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= purity || aAmpoule ? 55f : 34f;
|
||||
Main.dust[regen].position = Player.Center - velocity;
|
||||
regen.position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
|
||||
// Actually apply "standing still" regeneration (the stats are granted even at full health)
|
||||
float regenTimeNeededForTurboRegen = shadeRegen ? 40f : cFreeze ? 60f : honeyDewWorking ? 90f : photosynthesis ? 90f : aAmpoule ? 90f : purity ? 60f : -1f;
|
||||
float regenTimeNeededForTurboRegen = shadeRegen ? 40f : cFreeze ? 60f : honeyDewWorking ? 90f : aAmpoule ? 90f : purity ? 60f : -1f;
|
||||
|
||||
// 4 = vanilla Shiny Stone
|
||||
int turboRegenPower = shadeRegen || cFreeze || purity ? 4 : honeyDewWorking || aAmpoule ? 3 : photosynthesis ? 1 : -1;
|
||||
int turboRegenPower = shadeRegen || cFreeze || purity ? 4 : honeyDewWorking || aAmpoule ? 3 : -1;
|
||||
|
||||
if (turboRegenPower > 0)
|
||||
{
|
||||
// After a brief delay determined by your form of standing still regen, min-cap life regen time at 1800 / 3600.
|
||||
// Photosynthesis Potion does not do this at night.
|
||||
if (Player.lifeRegenTime > regenTimeNeededForTurboRegen && Player.lifeRegenTime < 1800f && !onlyPhotosynthesisAtNight)
|
||||
if (Player.lifeRegenTime > regenTimeNeededForTurboRegen && Player.lifeRegenTime < 1800f)
|
||||
Player.lifeRegenTime = 1800f;
|
||||
|
||||
Player.lifeRegen += turboRegenPower;
|
||||
@@ -826,14 +824,14 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (Main.rand.Next(30000) < Player.lifeRegenTime || Main.rand.NextBool())
|
||||
{
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, DustID.HeartCrystal, 0f, 0f, 200, Color.OrangeRed, 1f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
Main.dust[regen].fadeIn = 1.3f;
|
||||
Dust regen = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.HeartCrystal, 0f, 0f, 200, Color.OrangeRed, 1f);
|
||||
regen.noGravity = true;
|
||||
regen.fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
Main.dust[regen].velocity = velocity;
|
||||
regen.velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= 34f;
|
||||
Main.dust[regen].position = Player.Center - velocity;
|
||||
regen.position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -841,9 +839,9 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.statLife < actualMaxLife)
|
||||
{
|
||||
// The soft cap doesn't apply if the player is not moving and not using a weapon while having any of the following:
|
||||
// Shiny Stone, Cosmic Freeze buff from the Cosmic Discharge, Demonshade Armor, Photosynthesis Potion buff or The Camper.
|
||||
// Shiny Stone, Cosmic Freeze buff from the Cosmic Discharge, Demonshade Armor, or The Camper.
|
||||
int baseLifeRegenBoost = 4;
|
||||
bool noLifeRegenCap = (Player.shinyStone || cFreeze || shadeRegen || photosynthesis || camper) &&
|
||||
bool noLifeRegenCap = (Player.shinyStone || cFreeze || shadeRegen || camper) &&
|
||||
Player.StandingStill() && Player.itemAnimation == 0;
|
||||
|
||||
if (!noLifeRegenCap)
|
||||
@@ -881,12 +879,11 @@ namespace CalamityMod.CalPlayer
|
||||
if (toxicHeart) // Since it needs to know your life regen, it must be placed here
|
||||
{
|
||||
int auraDamage = (int)Player.GetBestClassDamage().ApplyTo(200);
|
||||
auraDamage = Player.ApplyArmorAccDamageBonusesTo(auraDamage);
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<ToxicHeart>()));
|
||||
pulseRate = Utils.Remap(Player.lifeRegen, -30, 10, 20, 1, true);
|
||||
if (pulseCounter >= 420)
|
||||
{
|
||||
Projectile.NewProjectileDirect(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<PlaguePulse>(), auraDamage, 0f, Player.whoAmI, 0, 0, 0);
|
||||
Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<PlaguePulse>(), auraDamage, 0f, Player.whoAmI, 0, 0, 0);
|
||||
pulseCounter = 0;
|
||||
float soundVolume = Utils.Remap(Player.lifeRegen, -30, 10, 1f, 0.3f, true);
|
||||
SoundStyle heartbeat = new("CalamityMod/Sounds/Item/Heartbeat");
|
||||
|
||||
@@ -32,6 +32,7 @@ using CalamityMod.Items.DraedonMisc;
|
||||
using CalamityMod.Items.Dyes;
|
||||
using CalamityMod.Items.Fishing.FishingRods;
|
||||
using CalamityMod.Items.Mounts.Minecarts;
|
||||
using CalamityMod.Items.PermanentBoosters;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using CalamityMod.Items.VanillaArmorChanges;
|
||||
@@ -244,7 +245,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (!HasIncreasedDashFirstFrame)
|
||||
{
|
||||
Player.velocity.X *= 1.2f;
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.GetBestClassDamage().ApplyTo(75));
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(75);
|
||||
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<LeviAmberDash>(), damage, 0f, Player.whoAmI);
|
||||
HasIncreasedDashFirstFrame = true;
|
||||
@@ -274,7 +275,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (Player.miscCounter % 4 == 0 && Player.velocity != Vector2.Zero) //every other frame spawn the hitbox
|
||||
{
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.GetBestClassDamage().ApplyTo(90));
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(90);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<LeviAmberDash>(), damage, 0f, Player.whoAmI);
|
||||
}
|
||||
}
|
||||
@@ -290,7 +291,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (!HasReducedDashFirstFrame) // Dash isn't reduced, this is used to determine the first frame of dashing
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact with { Volume = 0.4f, PitchVariance = 0.4f }, Player.Center);
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.GetBestClassDamage().ApplyTo(67));
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(67);
|
||||
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<PauldronDash>(), damage, 16f, Player.whoAmI);
|
||||
HasReducedDashFirstFrame = true;
|
||||
@@ -318,7 +319,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (Player.miscCounter % 6 == 0 && Player.velocity != Vector2.Zero)
|
||||
{
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.GetBestClassDamage().ApplyTo(170));
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(170);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<PauldronDash>(), damage, 10f, Player.whoAmI);
|
||||
}
|
||||
}
|
||||
@@ -422,6 +423,21 @@ namespace CalamityMod.CalPlayer
|
||||
else
|
||||
HasReducedDashFirstFrame = false;
|
||||
}
|
||||
|
||||
// Solar Wings increase dash velocity of Solar Flare armor dash
|
||||
if (Player.wingsLogic == (int)VanillaWingID.WingsSolar)
|
||||
{
|
||||
if (Player.dashDelay == -1 && Player.dash == 3)
|
||||
{
|
||||
if (!HasReducedDashFirstFrame)
|
||||
{
|
||||
Player.velocity.X *= 1.3f;
|
||||
HasReducedDashFirstFrame = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
HasReducedDashFirstFrame = false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -632,14 +648,14 @@ namespace CalamityMod.CalPlayer
|
||||
// Old Draedon's Heart dust effect from its standing still regen. Works just fine.
|
||||
int dustID = DustID.TerraBlade;
|
||||
{
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, dustID, 0f, 0f, 200, default, 1f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
Main.dust[regen].fadeIn = 1.3f;
|
||||
Dust regen = Dust.NewDustDirect(Player.position, Player.width, Player.height, dustID, 0f, 0f, 200, default, 1f);
|
||||
regen.noGravity = true;
|
||||
regen.fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
Main.dust[regen].velocity = velocity;
|
||||
regen.velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= 34f;
|
||||
Main.dust[regen].position = Player.Center - velocity;
|
||||
regen.position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -721,8 +737,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.velocity.Length() == 0f)
|
||||
return;
|
||||
|
||||
Dust dust;
|
||||
dust = Main.dust[Dust.NewDust(Player.Center, 16, 16, DustID.Firefly, 0.23255825f, 10f, 0, new Color(117, 55, 15), 1.5116279f)];
|
||||
Dust dust = Dust.NewDustDirect(Player.Center, 16, 16, DustID.Firefly, 0.23255825f, 10f, 0, new Color(117, 55, 15), 1.5116279f);
|
||||
dust.noGravity = true;
|
||||
dust.noLight = true;
|
||||
dust.fadeIn = 2.5813954f;
|
||||
@@ -788,7 +803,6 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
Rectangle sigilHitbox = Utils.CenteredRectangle(Main.MouseWorld, new Vector2(35f, 62f));
|
||||
int sigilDamage = (int)Player.GetBestClassDamage().ApplyTo(Calamity.BaseDamage);
|
||||
sigilDamage = Player.ApplyArmorAccDamageBonusesTo(sigilDamage);
|
||||
|
||||
bool brightenedSigil = false;
|
||||
foreach (NPC target in Main.ActiveNPCs)
|
||||
@@ -860,12 +874,27 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
private void MiscEffects()
|
||||
{
|
||||
// Update Carpet textures
|
||||
// Update textures
|
||||
if (Main.netMode != NetmodeID.Server && Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Asset<Texture2D> carpetAuric = ExtraTextureRefs.FlyingCarpetAuric;
|
||||
Asset<Texture2D> carpetOriginal = ExtraTextureRefs.FlyingCarpetVanilla;
|
||||
TextureAssets.FlyingCarpet = (auricSet ? carpetAuric : carpetOriginal);
|
||||
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
if (Player.buffType[l] != BuffID.Lucky)
|
||||
continue;
|
||||
|
||||
if (Player.buffTime[l] > CalamityUtils.SecondsToFrames(600f))
|
||||
TextureAssets.Buff[BuffID.Lucky] = ExtraTextureRefs.LuckIconGreater;
|
||||
else if (Player.buffTime[l] > CalamityUtils.SecondsToFrames(300f))
|
||||
TextureAssets.Buff[BuffID.Lucky] = ExtraTextureRefs.LuckIconVanilla;
|
||||
else
|
||||
TextureAssets.Buff[BuffID.Lucky] = ExtraTextureRefs.LuckIconLesser;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate/reset DoG cart rotations based on whether the DoG cart is in use.
|
||||
@@ -1327,7 +1356,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (!tentaclesPresent[i])
|
||||
{
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(390);
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
var source = Player.GetSource_FromThis(OmegaBlueHelmet.TentacleEntitySourceContext);
|
||||
Vector2 vel = new Vector2(Main.rand.Next(-13, 14), Main.rand.Next(-13, 14)) * 0.25f;
|
||||
@@ -1391,12 +1419,12 @@ namespace CalamityMod.CalPlayer
|
||||
if (i % dustDivisor == 0)
|
||||
{
|
||||
currentDustPos = Vector2.Lerp(dustLineStart, dustLineEnd, i / (float)maxHealDustIterations);
|
||||
int holyDust = Dust.NewDust(currentDustPos, 0, 0, DustID.RainbowMk2, 0f, 0f, 0, dustColor, 1f);
|
||||
Main.dust[holyDust].position = currentDustPos;
|
||||
Main.dust[holyDust].velocity = spinningpoint.RotatedBy(MathHelper.TwoPi * i / maxHealDustIterations) * healerDustVel * (0.8f + Main.rand.NextFloat() * 0.4f) + Player.velocity;
|
||||
Main.dust[holyDust].noGravity = true;
|
||||
Main.dust[holyDust].scale = 1f;
|
||||
Main.dust[holyDust].fadeIn = Main.rand.NextFloat() * 2f;
|
||||
Dust holyDust = Dust.NewDustDirect(currentDustPos, 0, 0, DustID.RainbowMk2, 0f, 0f, 0, dustColor, 1f);
|
||||
holyDust.position = currentDustPos;
|
||||
holyDust.velocity = spinningpoint.RotatedBy(MathHelper.TwoPi * i / maxHealDustIterations) * healerDustVel * (0.8f + Main.rand.NextFloat() * 0.4f) + Player.velocity;
|
||||
holyDust.noGravity = true;
|
||||
holyDust.scale = 1f;
|
||||
holyDust.fadeIn = Main.rand.NextFloat() * 2f;
|
||||
Dust dustClone = Dust.CloneDust(holyDust);
|
||||
Dust extraDust = dustClone;
|
||||
extraDust.scale /= 2f;
|
||||
@@ -1434,7 +1462,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
unstableSelectedTarget = Main.npc[target];
|
||||
unstableSelectedTarget.Calamity().arcZapCooldown = 18;
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.GetBestClassDamage().ApplyTo(18));
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(18);
|
||||
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), new Vector2(Player.Center.X, Player.Center.Y - 20f), new Vector2(0f, -2f), ModContent.ProjectileType<ArcZap>(), damage, 0f, Player.whoAmI, target, 3f);
|
||||
target = -1;
|
||||
@@ -1555,8 +1583,6 @@ namespace CalamityMod.CalPlayer
|
||||
dragonRageCooldown--;
|
||||
if (soundCooldown > 0)
|
||||
soundCooldown--;
|
||||
if (shadowPotCooldown > 0)
|
||||
shadowPotCooldown--;
|
||||
if (raiderCritLifespan > 0f)
|
||||
raiderCritLifespan--;
|
||||
if (raiderSoundCooldown > 0)
|
||||
@@ -1603,8 +1629,8 @@ namespace CalamityMod.CalPlayer
|
||||
evolutionLifeRegenCounter--;
|
||||
if (hurtSoundTimer > 0)
|
||||
hurtSoundTimer--;
|
||||
if (icicleCooldown > 0)
|
||||
icicleCooldown--;
|
||||
if (wingProjectileCooldown > 0)
|
||||
wingProjectileCooldown--;
|
||||
if (statisTimer > 0 && Player.dashDelay >= 0)
|
||||
statisTimer = 0;
|
||||
if (hallowedRuneCooldown > 0)
|
||||
@@ -1842,15 +1868,15 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
int green = Dust.NewDust(Player.position, Player.width, Player.height, DustID.ChlorophyteWeapon, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 2f);
|
||||
Main.dust[green].position.X += (float)Main.rand.Next(-20, 21);
|
||||
Main.dust[green].position.Y += (float)Main.rand.Next(-20, 21);
|
||||
Main.dust[green].velocity *= 0.9f;
|
||||
Main.dust[green].noGravity = true;
|
||||
Main.dust[green].scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
Main.dust[green].shader = GameShaders.Armor.GetSecondaryShader(Player.ArmorSetDye(), Player);
|
||||
Dust green = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.ChlorophyteWeapon, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 2f);
|
||||
green.position.X += (float)Main.rand.Next(-20, 21);
|
||||
green.position.Y += (float)Main.rand.Next(-20, 21);
|
||||
green.velocity *= 0.9f;
|
||||
green.noGravity = true;
|
||||
green.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
green.shader = GameShaders.Armor.GetSecondaryShader(Player.ArmorSetDye(), Player);
|
||||
if (Main.rand.NextBool())
|
||||
Main.dust[green].scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
green.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
}
|
||||
}
|
||||
if (!Player.HasCooldown(SilvaRevive.ID) && hasSilvaEffect && silvaCountdown <= 0 && !areThereAnyDamnBosses && !areThereAnyDamnEvents)
|
||||
@@ -1944,16 +1970,15 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
int blood = Dust.NewDust(Player.position, Player.width, Player.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
Dust dust = Main.dust[blood];
|
||||
dust.position.X += (float)Main.rand.Next(-20, 21);
|
||||
dust.position.Y += (float)Main.rand.Next(-20, 21);
|
||||
dust.velocity *= 0.9f;
|
||||
dust.noGravity = true;
|
||||
dust.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
dust.shader = GameShaders.Armor.GetSecondaryShader(Player.ArmorSetDye(), Player);
|
||||
Dust blood = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
blood.position.X += (float)Main.rand.Next(-20, 21);
|
||||
blood.position.Y += (float)Main.rand.Next(-20, 21);
|
||||
blood.velocity *= 0.9f;
|
||||
blood.noGravity = true;
|
||||
blood.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
blood.shader = GameShaders.Armor.GetSecondaryShader(Player.ArmorSetDye(), Player);
|
||||
if (Main.rand.NextBool())
|
||||
dust.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
blood.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1994,8 +2019,8 @@ namespace CalamityMod.CalPlayer
|
||||
// Nimble Bounder bonus
|
||||
if (nimbleBounderBoost)
|
||||
{
|
||||
Player.moveSpeed += 0.05f;
|
||||
Player.jumpSpeedBoost += 0.25f;
|
||||
Player.moveSpeed += NimbleBounder.MoveSpeedBoost;
|
||||
Player.jumpSpeedBoost += NimbleBounder.JumpSpeedBoost;
|
||||
}
|
||||
|
||||
// Affliction bonus
|
||||
@@ -2053,9 +2078,9 @@ namespace CalamityMod.CalPlayer
|
||||
Player.velocity.X = 0f;
|
||||
Player.velocity.Y = -0.4f; // Should negate gravity
|
||||
|
||||
int ice = Dust.NewDust(Player.position, Player.width, Player.height, DustID.GemSapphire);
|
||||
Main.dust[ice].noGravity = true;
|
||||
Main.dust[ice].velocity *= 2f;
|
||||
Dust ice = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.GemSapphire);
|
||||
ice.noGravity = true;
|
||||
ice.velocity *= 2f;
|
||||
|
||||
Player.buffImmune[BuffID.Frozen] = true;
|
||||
Player.buffImmune[BuffID.Chilled] = true;
|
||||
@@ -2112,10 +2137,6 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
// Calcium Potion buff
|
||||
if (calcium)
|
||||
Player.noFallDmg = true;
|
||||
|
||||
// Ceaseless Hunger Potion buff
|
||||
if (ceaselessHunger)
|
||||
{
|
||||
@@ -2190,7 +2211,6 @@ namespace CalamityMod.CalPlayer
|
||||
lightningVel.Normalize();
|
||||
lightningVel *= Main.rand.NextFloat(1f, 2f);
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(30);
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
int projectile = Projectile.NewProjectile(source, Player.Center, lightningVel, ModContent.ProjectileType<BlunderBoosterLightning>(), damage, 0, Player.whoAmI, Main.rand.Next(2), 0f);
|
||||
Main.projectile[projectile].timeLeft = Main.rand.Next(180, 240);
|
||||
@@ -2200,10 +2220,10 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(Player.Center, 1, 1, DustID.RedTorch, Player.velocity.X * -0.1f, Player.velocity.Y * -0.1f, 100, default, 3.5f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.2f;
|
||||
Main.dust[dust].velocity.Y -= 0.15f;
|
||||
Dust dust = Dust.NewDustDirect(Player.Center, 1, 1, DustID.RedTorch, Player.velocity.X * -0.1f, Player.velocity.Y * -0.1f, 100, default, 3.5f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 1.2f;
|
||||
dust.velocity.Y -= 0.15f;
|
||||
}
|
||||
}
|
||||
else if (plaguedFuelPack)
|
||||
@@ -2216,7 +2236,6 @@ namespace CalamityMod.CalPlayer
|
||||
cloudVelocity.Normalize();
|
||||
cloudVelocity *= Main.rand.NextFloat(0f, 1f);
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(20);
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
int projectile = Projectile.NewProjectile(source, Player.Center, cloudVelocity, ModContent.ProjectileType<PlaguedFuelPackCloud>(), damage, 0, Player.whoAmI, 0, 0);
|
||||
Main.projectile[projectile].timeLeft = Main.rand.Next(180, 240);
|
||||
@@ -2226,10 +2245,10 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(Player.Center, 1, 1, DustID.GemEmerald, Player.velocity.X * -0.1f, Player.velocity.Y * -0.1f, 100, default, 3.5f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.2f;
|
||||
Main.dust[dust].velocity.Y -= 0.15f;
|
||||
Dust dust = Dust.NewDustDirect(Player.Center, 1, 1, DustID.GemEmerald, Player.velocity.X * -0.1f, Player.velocity.Y * -0.1f, 100, default, 3.5f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 1.2f;
|
||||
dust.velocity.Y -= 0.15f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2721,20 +2740,20 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 source = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 1f; //0.75
|
||||
source = source.RotatedBy((double)((float)(d - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Player.Center;
|
||||
Vector2 dustVel = source - Player.Center;
|
||||
int blue = Dust.NewDust(source + dustVel, 0, 0, DustID.Vortex, dustVel.X, dustVel.Y, 100, default, 1.2f);
|
||||
Main.dust[blue].noGravity = true;
|
||||
Main.dust[blue].noLight = false;
|
||||
Main.dust[blue].velocity = dustVel;
|
||||
Dust blue = Dust.NewDustDirect(source + dustVel, 0, 0, DustID.Vortex, dustVel.X, dustVel.Y, 100, default, 1.2f);
|
||||
blue.noGravity = true;
|
||||
blue.noLight = false;
|
||||
blue.velocity = dustVel;
|
||||
}
|
||||
for (int d = 0; d < dustAmt; d++)
|
||||
{
|
||||
Vector2 source = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f;
|
||||
source = source.RotatedBy((double)((float)(d - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Player.Center;
|
||||
Vector2 dustVel = source - Player.Center;
|
||||
int green = Dust.NewDust(source + dustVel, 0, 0, DustID.TerraBlade, dustVel.X, dustVel.Y, 100, default, 1.2f);
|
||||
Main.dust[green].noGravity = true;
|
||||
Main.dust[green].noLight = false;
|
||||
Main.dust[green].velocity = dustVel;
|
||||
Dust green = Dust.NewDustDirect(source + dustVel, 0, 0, DustID.TerraBlade, dustVel.X, dustVel.Y, 100, default, 1.2f);
|
||||
green.noGravity = true;
|
||||
green.noLight = false;
|
||||
green.velocity = dustVel;
|
||||
}
|
||||
}
|
||||
auralisAuroraCounter = 0;
|
||||
@@ -2749,7 +2768,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (gravityNormalizer)
|
||||
{
|
||||
Player.buffImmune[BuffID.VortexDebuff] = true;
|
||||
if (Player.InSpace())
|
||||
if (Player.ReducedSpaceGravity())
|
||||
{
|
||||
Player.gravity = Player.defaultGravity;
|
||||
if (Player.wet)
|
||||
@@ -2800,7 +2819,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (astralInjection)
|
||||
{
|
||||
if (Player.statMana < Player.statManaMax2)
|
||||
Player.statMana += 2;
|
||||
Player.statMana += AstralInjection.ManaPerFrame;
|
||||
if (Player.statMana > Player.statManaMax2)
|
||||
Player.statMana = Player.statManaMax2;
|
||||
}
|
||||
@@ -2814,11 +2833,11 @@ namespace CalamityMod.CalPlayer
|
||||
Player.statDefense += 5;
|
||||
}
|
||||
|
||||
if (xRage)
|
||||
Player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
|
||||
if (xWrath)
|
||||
Player.GetCritChance<RogueDamageClass>() += 5;
|
||||
{
|
||||
Player.GetDamage<ThrowingDamageClass>() += 0.1f;
|
||||
Player.GetCritChance<RogueDamageClass>() += 5;
|
||||
}
|
||||
|
||||
if (graxDefense)
|
||||
{
|
||||
@@ -2942,10 +2961,10 @@ namespace CalamityMod.CalPlayer
|
||||
--bloodflareCoreRemainingHealOverTime;
|
||||
}
|
||||
|
||||
// 50% movement speed bonus so that you don't feel like a snail in the early game
|
||||
// Multiplies base movement speed by 1.5x so that you don't feel like a snail in the early game
|
||||
// Disabled while Overhaul is enabled, because Overhaul does very similar things to make movement more snappy
|
||||
if (ExternalMods.overhaul is null && CalamityServerConfig.Instance.FasterBaseSpeed)
|
||||
Player.moveSpeed += BalancingConstants.DefaultMoveSpeedBoost;
|
||||
Player.maxRunSpeed *= BalancingConstants.DefaultMoveSpeedBoost;
|
||||
|
||||
// Reduce how slow Chilled makes the player, because it's cancerous right now
|
||||
// The moveSpeed multiplier for Chilled in vanilla is 0.75, so we just multiply by 1.166667 here to make it 0.875, effectively cutting the reduction in half
|
||||
@@ -2956,38 +2975,38 @@ namespace CalamityMod.CalPlayer
|
||||
Player.moveSpeed -= 0.2f;
|
||||
|
||||
if (fabsolVodka)
|
||||
Player.GetDamage<GenericDamageClass>() += 0.08f;
|
||||
Player.GetDamage<GenericDamageClass>() += FabsolsVodka.DamageBoost;
|
||||
|
||||
if (vodka)
|
||||
{
|
||||
Player.GetDamage<GenericDamageClass>() += 0.06f;
|
||||
Player.GetDamage<GenericDamageClass>() += Vodka.DamageBoost;
|
||||
Player.GetCritChance<GenericDamageClass>() += Vodka.CritBoost;
|
||||
}
|
||||
|
||||
if (moonshine)
|
||||
{
|
||||
Player.statDefense += 10;
|
||||
Player.endurance += 0.03f;
|
||||
Player.statDefense += Moonshine.DefenseBoost;
|
||||
Player.endurance += Moonshine.DamageReductionBoost;
|
||||
}
|
||||
|
||||
if (rum)
|
||||
Player.moveSpeed += 0.1f;
|
||||
Player.moveSpeed += Rum.MoveSpeedBoost;
|
||||
|
||||
if (whiskey)
|
||||
{
|
||||
Player.GetDamage<GenericDamageClass>() += 0.04f;
|
||||
Player.GetDamage<GenericDamageClass>() += Whiskey.DamageBoost;
|
||||
Player.GetCritChance<GenericDamageClass>() += Whiskey.CritBoost;
|
||||
}
|
||||
|
||||
if (everclear)
|
||||
Player.GetDamage<GenericDamageClass>() += 0.25f;
|
||||
Player.GetDamage<GenericDamageClass>() += Everclear.DamageBoost;
|
||||
|
||||
if (bloodyMary)
|
||||
{
|
||||
if (Main.bloodMoon)
|
||||
{
|
||||
Player.GetDamage<GenericDamageClass>() += 0.1f;
|
||||
Player.moveSpeed += 0.1f;
|
||||
Player.GetDamage<GenericDamageClass>() += BloodyMary.DamageMovementBoost;
|
||||
Player.moveSpeed += BloodyMary.DamageMovementBoost;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2995,7 +3014,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.dayTime)
|
||||
{
|
||||
Player.statDefense += 5;
|
||||
Player.statDefense += Tequila.DefenseBoost;
|
||||
Player.GetCritChance<GenericDamageClass>() += Tequila.CritBoost;
|
||||
}
|
||||
}
|
||||
@@ -3004,38 +3023,35 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.dayTime)
|
||||
{
|
||||
Player.statDefense += 10;
|
||||
Player.statDefense += TequilaSunrise.DefenseBoost;
|
||||
Player.GetCritChance<GenericDamageClass>() += TequilaSunrise.CritBoost;
|
||||
}
|
||||
}
|
||||
|
||||
if (caribbeanRum)
|
||||
Player.moveSpeed += 0.1f;
|
||||
Player.moveSpeed += CaribbeanRum.MoveSpeedBoost;
|
||||
|
||||
if (cinnamonRoll)
|
||||
{
|
||||
Player.manaRegenDelay--;
|
||||
Player.manaRegenBonus += 10;
|
||||
Player.manaRegenDelayBonus += CinnamonRoll.ManaRegenDelayBonus;
|
||||
Player.manaRegenBonus += CinnamonRoll.ManaRegenBonus;
|
||||
}
|
||||
|
||||
if (starBeamRye)
|
||||
{
|
||||
Player.GetDamage<MagicDamageClass>() += 0.08f;
|
||||
Player.manaCost *= 0.9f;
|
||||
Player.statManaMax2 += 50;
|
||||
Player.GetDamage<MagicDamageClass>() += StarBeamRye.MagicDamageBoost;
|
||||
Player.manaCost *= (1f - StarBeamRye.ManaCostReduction);
|
||||
Player.statManaMax2 += StarBeamRye.MaxManaBoost;
|
||||
}
|
||||
|
||||
if (moscowMule)
|
||||
{
|
||||
Player.GetDamage<GenericDamageClass>() += 0.09f;
|
||||
Player.GetDamage<GenericDamageClass>() += MoscowMule.DamageBoost;
|
||||
Player.GetCritChance<GenericDamageClass>() += MoscowMule.CritBoost;
|
||||
}
|
||||
|
||||
if (oldFashioned)
|
||||
Player.GetDamage<GenericDamageClass>() -= OldFashioned.DamageStatReduction;
|
||||
|
||||
if (whiteWine)
|
||||
Player.GetDamage<MagicDamageClass>() += 0.08f;
|
||||
Player.GetDamage<MagicDamageClass>() += WhiteWine.MagicDamageBoost;
|
||||
|
||||
// Adjustment to the Tipsy debuff
|
||||
if (Player.tipsy)
|
||||
@@ -3092,7 +3108,7 @@ namespace CalamityMod.CalPlayer
|
||||
(reaverSpeed ? 0.1 : 0D) +
|
||||
(angelTreads ? 0.1 : 0D) +
|
||||
(blueCandle ? CirrusBlueCandleBuff.WingTimeBoost : 0D) +
|
||||
(soaring ? 0.1 : 0D) +
|
||||
(soaring ? SoaringPotion.FlightBoost : 0D) +
|
||||
(prismaticGreaves ? 0.1 : 0D) +
|
||||
(plagueReaper ? 0.05 : 0D) +
|
||||
(ascendantInsignia ? 0.05 : 0D) + // Added to soaring insignia's flight to get 30%
|
||||
@@ -3113,13 +3129,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (shatteredCommunity)
|
||||
flightTimeMult += 0.2f;
|
||||
|
||||
if (profanedCrystalBuffs)
|
||||
{
|
||||
bool offenseBuffs = pscState == (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Buffs || (Main.dayTime && !Player.wet) || Player.lavaWet;
|
||||
if (offenseBuffs || pscState == (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Empowered)
|
||||
flightTimeMult += 0.1;
|
||||
}
|
||||
|
||||
// Reaver Tank set nuke flight time
|
||||
if (reaverDefense)
|
||||
flightTimeMult -= 0.3f;
|
||||
@@ -3155,9 +3164,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (bounding)
|
||||
{
|
||||
Player.jumpSpeedBoost += 0.25f;
|
||||
Player.jumpHeight += 10;
|
||||
Player.extraFall += 25;
|
||||
Player.jumpSpeedBoost += BoundingPotion.JumpSpeedBoost;
|
||||
Player.jumpHeight += (int)(BoundingPotion.JumpHeightPercentBoost * 15);
|
||||
}
|
||||
|
||||
if (mushy)
|
||||
@@ -3326,15 +3334,13 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
float ai1 = I * 120;
|
||||
|
||||
// 08DEC2023: Ozzatron: Bloodflare mines spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
|
||||
int baseDamage = Player.ApplyArmorAccDamageBonusesTo(3750);
|
||||
int damage = Player.CalcIntDamage<SummonDamageClass>(baseDamage);
|
||||
int damage = (int)Player.CalcIntDamage<SummonDamageClass>(3750);
|
||||
|
||||
int projectile = Projectile.NewProjectile(source, Player.Center.X + (float)(Math.Sin(I * 120) * 550), Player.Center.Y + (float)(Math.Cos(I * 120) * 550), 0f, 0f,
|
||||
ModContent.ProjectileType<GhostlyMine>(), damage, 1f, Player.whoAmI, ai1, 0f);
|
||||
if (projectile.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[projectile].originalDamage = baseDamage;
|
||||
Main.projectile[projectile].originalDamage = 3750;
|
||||
Main.projectile[projectile].DamageType = DamageClass.Generic;
|
||||
}
|
||||
}
|
||||
@@ -3350,13 +3356,11 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<SilvaCrystal>()] < 1)
|
||||
{
|
||||
// 08DEC2023: Ozzatron: Silva Crystals spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
|
||||
int baseDamage = Player.ApplyArmorAccDamageBonusesTo(600);
|
||||
var damage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
|
||||
int damage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(600);
|
||||
|
||||
var p = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -1f, ModContent.ProjectileType<SilvaCrystal>(), damage, 0f, Main.myPlayer, -20f, 0f);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
Main.projectile[p].originalDamage = baseDamage;
|
||||
Main.projectile[p].originalDamage = 600;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3397,7 +3401,7 @@ namespace CalamityMod.CalPlayer
|
||||
// If the timer rolls over, it's time to deal damage. Only run this code for the client which is wearing the armor.
|
||||
if (tarraLifeAuraTimer == 0 && Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcDamage<SummonDamageClass>(120));
|
||||
int damage = (int)Player.CalcDamage<SummonDamageClass>(120);
|
||||
|
||||
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
|
||||
var source = Player.GetSource_FromThis(TarragonHeadSummon.LifeAuraEntitySourceContext);
|
||||
@@ -3409,7 +3413,7 @@ namespace CalamityMod.CalPlayer
|
||||
continue;
|
||||
|
||||
if (Vector2.Distance(Player.Center, npc.Center) <= range)
|
||||
Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<TarragonAura>(), damage, 0f, Player.whoAmI, npc.whoAmI);
|
||||
Projectile.NewProjectile(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<TarragonAura>(), damage, 0f, Player.whoAmI, npc.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3436,7 +3440,7 @@ namespace CalamityMod.CalPlayer
|
||||
continue;
|
||||
|
||||
if (Vector2.Distance(Player.Center, npc.Center) <= range)
|
||||
Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0f, Player.whoAmI, npc.whoAmI);
|
||||
Projectile.NewProjectile(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0f, Player.whoAmI, npc.whoAmI);
|
||||
|
||||
// Occasionally spawn cute sparks so it looks like an electrical aura
|
||||
if (Main.rand.NextBool(10))
|
||||
@@ -3462,7 +3466,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Brimstone flames is applied every single frame, but direct damage is only dealt twice per second.
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.GetBestClassDamage().ApplyTo(50));
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(50);
|
||||
|
||||
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
|
||||
var source = Player.GetSource_FromThis(HydrothermicArmor.InfernoPotionEntitySourceContext);
|
||||
@@ -3477,7 +3481,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
npc.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
|
||||
if (brimLoreInfernoTimer == 0)
|
||||
Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0f, Player.whoAmI, npc.whoAmI);
|
||||
Projectile.NewProjectile(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0f, Player.whoAmI, npc.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3503,7 +3507,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.GetDamage<GenericDamageClass>() *= 1.2f;
|
||||
|
||||
if (trippy)
|
||||
Player.GetDamage<GenericDamageClass>() += 0.5f;
|
||||
Player.GetDamage<GenericDamageClass>() += OddMushroom.DamageBoost;
|
||||
|
||||
if (eArtifact)
|
||||
{
|
||||
@@ -3528,7 +3532,6 @@ namespace CalamityMod.CalPlayer
|
||||
int guardianAmt = 1;
|
||||
float babCheck = profanedCrystal ? 1f : 0f;
|
||||
int babDamage = profanedCrystal ? 346 : 52;
|
||||
babDamage = Player.ApplyArmorAccDamageBonusesTo(babDamage);
|
||||
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianHealer>()] < guardianAmt)
|
||||
{
|
||||
@@ -3552,38 +3555,44 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (profanedCrystalBuffs)
|
||||
if (profanedCrystal)
|
||||
{
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
ProfanedSoulCrystal.DetermineTransformationEligibility(Player);
|
||||
var calPlayer = Player.Calamity();
|
||||
bool vanity = calPlayer.pscState == (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Vanity;
|
||||
if (!vanity)
|
||||
{
|
||||
bool empowered = pscState == (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Empowered;
|
||||
|
||||
bool empowered = calPlayer.pscState == (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Empowered;
|
||||
bool night = empowered || calPlayer.pscState == (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Enraged;
|
||||
bool day = empowered || calPlayer.pscState == (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Buffs;
|
||||
|
||||
Player.lavaImmune = true;
|
||||
Player.fireWalk = true;
|
||||
Player.buffImmune[ModContent.BuffType<HolyFlames>()] = Main.dayTime || empowered;
|
||||
Player.buffImmune[ModContent.BuffType<HolyFlames>()] = true;
|
||||
Player.buffImmune[BuffID.OnFire] = true;
|
||||
Player.buffImmune[BuffID.Burning] = true;
|
||||
Player.buffImmune[BuffID.Daybreak] = true;
|
||||
bool offenseBuffs = (Main.dayTime && !Player.wet) || Player.lavaWet || empowered;
|
||||
if (offenseBuffs)
|
||||
|
||||
if (Player.wingTimeMax > 0)
|
||||
Player.wingTimeMax = (int)(Player.wingTimeMax * 1.1D);
|
||||
Player.GetDamage<SummonDamageClass>() += 0.15f;
|
||||
if (day)
|
||||
{
|
||||
Player.GetDamage<SummonDamageClass>() += 0.15f;
|
||||
Player.GetKnockback<SummonDamageClass>() += 0.15f;
|
||||
Player.moveSpeed += 0.1f;
|
||||
if (!empowered)
|
||||
Player.statDefense -= 15;
|
||||
Player.ignoreWater = true;
|
||||
Player.GetAttackSpeed(DamageClass.SummonMeleeSpeed) += 1f; //this only ever affects psc whip and should not be problematic
|
||||
}
|
||||
else if (empowered || !offenseBuffs)
|
||||
else if (night)
|
||||
{
|
||||
Player.endurance += 0.05f;
|
||||
Player.statDefense += 15;
|
||||
Player.lifeRegen += 5;
|
||||
}
|
||||
bool enrage = pscState >= (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Enraged;
|
||||
if (!ZoneAbyss) //No abyss memes.
|
||||
Lighting.AddLight(Player.Center, enrage ? 1.2f : offenseBuffs ? 1f : 0.2f, enrage ? 0.21f : offenseBuffs ? 0.2f : 0.01f, 0);
|
||||
|
||||
if (!calPlayer.ZoneAbyss) //No abyss memes.
|
||||
Lighting.AddLight(Player.Center, night ? 1.2f : day ? 1f : 0.2f, night ? 0.21f : day ? 0.2f : 0.01f, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3626,7 +3635,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<BlunderBooster>()));
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcDamage<RogueDamageClass>(30));
|
||||
int damage = (int)Player.CalcDamage<RogueDamageClass>(30);
|
||||
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<BlunderBoosterAura>()] < 1)
|
||||
Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<BlunderBoosterAura>(), damage, 0f, Player.whoAmI, 0f, 0f);
|
||||
@@ -3696,7 +3705,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<CryoStone>()));
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(70);
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer && Player.ownedProjectileCounts[ModContent.ProjectileType<CryonicShield>()] == 0)
|
||||
Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<CryonicShield>(), damage, 0f, Player.whoAmI);
|
||||
@@ -3718,7 +3726,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
float shootSpeed = 18f;
|
||||
int dmg = (int)Player.GetTotalDamage<MagicDamageClass>().ApplyTo(30);
|
||||
dmg = Player.ApplyArmorAccDamageBonusesTo(dmg);
|
||||
|
||||
Vector2 startPos = Player.RotatedRelativePoint(Player.MountedCenter, true);
|
||||
Vector2 velocity = Main.MouseWorld - startPos;
|
||||
@@ -3798,10 +3805,10 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 source = Vector2.Normalize(Player.velocity) * new Vector2(Player.width / 2f, Player.height) * 0.75f;
|
||||
source = source.RotatedBy((dustIndex - (dustAmt / 2 - 1)) * MathHelper.TwoPi / dustAmt, default) + Player.Center;
|
||||
Vector2 dustVel = source - Player.Center;
|
||||
int dusty = Dust.NewDust(source + dustVel, 0, 0, DustID.RainbowMk2, dustVel.X * 1f, dustVel.Y * 1f, 100, color, 1f);
|
||||
Main.dust[dusty].noGravity = true;
|
||||
Main.dust[dusty].noLight = true;
|
||||
Main.dust[dusty].velocity = dustVel;
|
||||
Dust dusty = Dust.NewDustDirect(source + dustVel, 0, 0, DustID.RainbowMk2, dustVel.X * 1f, dustVel.Y * 1f, 100, color, 1f);
|
||||
dusty.noGravity = true;
|
||||
dusty.noLight = true;
|
||||
dusty.velocity = dustVel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3944,8 +3951,7 @@ namespace CalamityMod.CalPlayer
|
||||
int numDust = 2;
|
||||
for (int i = 0; i < numDust; i++)
|
||||
{
|
||||
int dustIndex = Dust.NewDust(Player.position, Player.width, Player.height, DustID.VilePowder, 0f, 0f);
|
||||
Dust dust = Main.dust[dustIndex];
|
||||
Dust dust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.VilePowder, 0f, 0f);
|
||||
dust.position.X += Main.rand.Next(-5, 6);
|
||||
dust.position.Y += Main.rand.Next(-5, 6);
|
||||
dust.velocity *= 0.2f;
|
||||
@@ -4251,37 +4257,37 @@ namespace CalamityMod.CalPlayer
|
||||
if (fabsolVodka)
|
||||
{
|
||||
if (Player.statDefense > 0)
|
||||
Player.statDefense -= (int)(Player.statDefense * 0.05);
|
||||
Player.statDefense -= (int)(Player.statDefense * FabsolsVodka.DefenseLossPercent);
|
||||
}
|
||||
|
||||
if (vodka)
|
||||
{
|
||||
if (Player.statDefense > 0)
|
||||
Player.statDefense -= (int)(Player.statDefense * 0.05);
|
||||
Player.statDefense -= (int)(Player.statDefense * Vodka.DefenseLossPercent);
|
||||
}
|
||||
|
||||
if (grapeBeer)
|
||||
{
|
||||
if (Player.statDefense > 0)
|
||||
Player.statDefense -= (int)(Player.statDefense * 0.03);
|
||||
Player.statDefense -= (int)(Player.statDefense * GrapeBeer.DefenseLossPercent);
|
||||
}
|
||||
|
||||
if (rum)
|
||||
{
|
||||
if (Player.statDefense > 0)
|
||||
Player.statDefense -= (int)(Player.statDefense * 0.05);
|
||||
Player.statDefense -= (int)(Player.statDefense * Rum.DefenseLossPercent);
|
||||
}
|
||||
|
||||
if (whiskey)
|
||||
{
|
||||
if (Player.statDefense > 0)
|
||||
Player.statDefense -= (int)(Player.statDefense * 0.05);
|
||||
Player.statDefense -= (int)(Player.statDefense * Whiskey.DefenseLossPercent);
|
||||
}
|
||||
|
||||
if (everclear)
|
||||
{
|
||||
if (Player.statDefense > 0)
|
||||
Player.statDefense -= (int)(Player.statDefense * 0.3);
|
||||
Player.statDefense -= (int)(Player.statDefense * Everclear.DefenseLossPercent);
|
||||
}
|
||||
|
||||
if (bloodyMary)
|
||||
@@ -4289,38 +4295,38 @@ namespace CalamityMod.CalPlayer
|
||||
if (Main.bloodMoon)
|
||||
{
|
||||
if (Player.statDefense > 0)
|
||||
Player.statDefense -= (int)(Player.statDefense * 0.04);
|
||||
Player.statDefense -= (int)(Player.statDefense * BloodyMary.DefenseLossPercent);
|
||||
}
|
||||
}
|
||||
|
||||
if (caribbeanRum)
|
||||
{
|
||||
if (Player.statDefense > 0)
|
||||
Player.statDefense -= (int)(Player.statDefense * 0.1);
|
||||
Player.statDefense -= (int)(Player.statDefense * CaribbeanRum.DefenseLossPercent);
|
||||
}
|
||||
|
||||
if (cinnamonRoll)
|
||||
{
|
||||
if (Player.statDefense > 0)
|
||||
Player.statDefense -= (int)(Player.statDefense * 0.1);
|
||||
Player.statDefense -= (int)(Player.statDefense * CinnamonRoll.DefenseLossPercent);
|
||||
}
|
||||
|
||||
if (margarita)
|
||||
{
|
||||
if (Player.statDefense > 0)
|
||||
Player.statDefense -= (int)(Player.statDefense * 0.06);
|
||||
Player.statDefense -= (int)(Player.statDefense * Margarita.DefenseLossPercent);
|
||||
}
|
||||
|
||||
if (starBeamRye)
|
||||
{
|
||||
if (Player.statDefense > 0)
|
||||
Player.statDefense -= (int)(Player.statDefense * 0.06);
|
||||
Player.statDefense -= (int)(Player.statDefense * StarBeamRye.DefenseLossPercent);
|
||||
}
|
||||
|
||||
if (whiteWine)
|
||||
{
|
||||
if (Player.statDefense > 0)
|
||||
Player.statDefense -= (int)(Player.statDefense * 0.06);
|
||||
Player.statDefense -= (int)(Player.statDefense * WhiteWine.DefenseLossPercent);
|
||||
}
|
||||
|
||||
if (Player.tipsy)
|
||||
@@ -4595,7 +4601,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (item.type == ModContent.ItemType<HadalStew>())
|
||||
CalamityUtils.ConsumeItemViaQuickBuff(Player, item, HadalStew.BuffType, HadalStew.BuffDuration, true);
|
||||
if (item.type == ModContent.ItemType<Margarita>())
|
||||
CalamityUtils.ConsumeItemViaQuickBuff(Player, item, Margarita.BuffType, Margarita.BuffDuration, false);
|
||||
CalamityUtils.ConsumeItemViaQuickBuff(Player, item, Margarita.BuffType, CalamityUtils.MinutesToFrames(Margarita.MinuteDuration), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,6 +80,7 @@ namespace CalamityMod.CalPlayer
|
||||
target.Calamity().IncreasedHeatEffects_CinnamonRoll = cinnamonRoll;
|
||||
target.Calamity().IncreasedHeatEffects_FlameWakerBoots = flameWakerBoots;
|
||||
target.Calamity().IncreasedHeatEffects_HellfireTreads = hellfireTreads;
|
||||
target.Calamity().IncreasedHeatEffects_FlameWings = flameWingsHeat;
|
||||
|
||||
target.Calamity().IncreasedSicknessEffects_ToxicHeart = toxicHeart;
|
||||
|
||||
@@ -87,43 +88,6 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
switch (item.type)
|
||||
{
|
||||
case ItemID.CobaltSword:
|
||||
target.Calamity().cobaltNerfTimer = CalamityGlobalNPC.cobaltAndMythrilNerfTime;
|
||||
break;
|
||||
|
||||
case ItemID.PalladiumSword:
|
||||
if (Player.moonLeech)
|
||||
return;
|
||||
Player.lifeRegenTime += 2;
|
||||
break;
|
||||
|
||||
case ItemID.MythrilSword:
|
||||
target.Calamity().mythrilNerfTimer = CalamityGlobalNPC.cobaltAndMythrilNerfTime;
|
||||
break;
|
||||
|
||||
case ItemID.OrichalcumSword:
|
||||
if (Player.petalTimer > 0)
|
||||
Player.petalTimer /= 2;
|
||||
break;
|
||||
|
||||
case ItemID.AdamantiteSword:
|
||||
float slowDownMult = 0.5f;
|
||||
if (CalamityLists.enemyImmunityList.Contains(target.type) || target.boss)
|
||||
slowDownMult = 0.95f;
|
||||
target.velocity *= slowDownMult;
|
||||
break;
|
||||
|
||||
case ItemID.CandyCaneSword:
|
||||
|
||||
if (Player.moonLeech || Player.lifeSteal <= 0f || target.lifeMax <= 5)
|
||||
return;
|
||||
|
||||
int heal = 2;
|
||||
Player.lifeSteal -= heal;
|
||||
Player.HealPlayer(heal);
|
||||
|
||||
break;
|
||||
|
||||
case ItemID.DeathSickle:
|
||||
target.AddBuff(BuffType<WhisperingDeath>(), 120);
|
||||
break;
|
||||
@@ -169,12 +133,14 @@ namespace CalamityMod.CalPlayer
|
||||
target.AddBuff(BuffID.OnFire3, 120);
|
||||
}
|
||||
|
||||
bool targetIsDummy = target.type == NPCID.TargetDummy || target.type == NPCType<SuperDummyNPC>();
|
||||
|
||||
ItemLifesteal(target, item, damageDone);
|
||||
ItemOnHit(item, damageDone, target.Center, hit.Crit, target.IsAnEnemy(false, true));
|
||||
ItemOnHit(item, damageDone, target.Center, hit.Crit, target.IsAnEnemy(false, true), targetIsDummy);
|
||||
NPCDebuffs(target, item.CountsAsClass<MeleeDamageClass>(), item.CountsAsClass<RangedDamageClass>(), item.CountsAsClass<MagicDamageClass>(), item.CountsAsClass<SummonDamageClass>(), item.CountsAsClass<ThrowingDamageClass>(), item.CountsAsClass<SummonMeleeSpeedDamageClass>());
|
||||
|
||||
// Shattered Community tracks all damage dealt with Rage Mode (ignoring dummies).
|
||||
if (target.type == NPCID.TargetDummy || target.type == NPCType<SuperDummyNPC>())
|
||||
if (targetIsDummy)
|
||||
return;
|
||||
|
||||
if (rageModeActive && shatteredCommunity)
|
||||
@@ -218,6 +184,7 @@ namespace CalamityMod.CalPlayer
|
||||
cgn.IncreasedHeatEffects_Fireball = fireball;
|
||||
cgn.IncreasedHeatEffects_CinnamonRoll = cinnamonRoll;
|
||||
cgn.IncreasedHeatEffects_HellfireTreads = hellfireTreads;
|
||||
cgn.IncreasedHeatEffects_FlameWings = flameWingsHeat;
|
||||
|
||||
cgn.IncreasedSicknessEffects_ToxicHeart = toxicHeart;
|
||||
|
||||
@@ -225,43 +192,6 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
switch (proj.type)
|
||||
{
|
||||
case ProjectileID.CobaltNaginata:
|
||||
target.Calamity().cobaltNerfTimer = CalamityGlobalNPC.cobaltAndMythrilNerfTime;
|
||||
break;
|
||||
|
||||
case ProjectileID.PalladiumPike:
|
||||
if (Player.moonLeech)
|
||||
return;
|
||||
Player.lifeRegenTime += 2;
|
||||
break;
|
||||
|
||||
case ProjectileID.MythrilHalberd:
|
||||
target.Calamity().mythrilNerfTimer = CalamityGlobalNPC.cobaltAndMythrilNerfTime;
|
||||
break;
|
||||
|
||||
case ProjectileID.OrichalcumHalberd:
|
||||
if (Player.petalTimer > 0)
|
||||
Player.petalTimer /= 2;
|
||||
break;
|
||||
|
||||
case ProjectileID.AdamantiteGlaive:
|
||||
float slowDownMult = 0.5f;
|
||||
if (CalamityLists.enemyImmunityList.Contains(target.type) || target.boss)
|
||||
slowDownMult = 0.95f;
|
||||
target.velocity *= slowDownMult;
|
||||
break;
|
||||
|
||||
case ProjectileID.FruitcakeChakram:
|
||||
|
||||
if (Player.moonLeech || Main.player[Main.myPlayer].lifeSteal <= 0f || target.lifeMax <= 5)
|
||||
return;
|
||||
|
||||
int heal = 2;
|
||||
Main.player[Main.myPlayer].lifeSteal -= heal;
|
||||
Player.HealPlayer(heal);
|
||||
|
||||
break;
|
||||
|
||||
case ProjectileID.ObsidianSwordfish:
|
||||
target.AddBuff(BuffID.OnFire3, 180);
|
||||
break;
|
||||
@@ -427,7 +357,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
int onHitDamage = Player.CalcIntDamage<RangedDamageClass>(0.2f * proj.damage);
|
||||
Player.ApplyDamageToNPC(target, onHitDamage, 0f, 0, false);
|
||||
|
||||
Projectile shock = Projectile.NewProjectileDirect(proj.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), onHitDamage, 0f, Player.whoAmI, target.whoAmI);
|
||||
shock.DamageType = proj.DamageType;
|
||||
SoundStyle hitSound = new("CalamityMod/Sounds/Item/ElectricHit");
|
||||
SoundEngine.PlaySound(hitSound with { Volume = 0.2f, Pitch = 0.7f, PitchVariance = 0.2f }, proj.Center);
|
||||
}
|
||||
@@ -475,7 +406,8 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
int onHitDamage = Player.CalcIntDamage<RangedDamageClass>(0.2f * proj.damage);
|
||||
Player.ApplyDamageToNPC(target, onHitDamage, 0f, 0, false);
|
||||
Projectile blast = Projectile.NewProjectileDirect(proj.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), onHitDamage, 0f, Player.whoAmI, target.whoAmI);
|
||||
blast.DamageType = proj.DamageType;
|
||||
|
||||
SoundStyle hitSound = new("CalamityMod/Sounds/Item/HadalUrnClose");
|
||||
SoundEngine.PlaySound(hitSound with { Volume = 0.4f, Pitch = 0.4f, PitchVariance = 0.2f }, proj.Center);
|
||||
@@ -522,12 +454,14 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
bool targetIsDummy = target.type == NPCID.TargetDummy || target.type == NPCType<SuperDummyNPC>();
|
||||
|
||||
ProjLifesteal(target, proj, damageDone, hit.Crit);
|
||||
ProjOnHit(proj, target.Center, hit.Crit, target.IsAnEnemy(false));
|
||||
ProjOnHit(proj, target.Center, hit.Crit, target.IsAnEnemy(false), targetIsDummy);
|
||||
NPCDebuffs(target, proj.CountsAsClass<MeleeDamageClass>(), proj.CountsAsClass<RangedDamageClass>(), proj.CountsAsClass<MagicDamageClass>(), proj.CountsAsClass<SummonDamageClass>(), proj.CountsAsClass<ThrowingDamageClass>(), proj.CountsAsClass<SummonMeleeSpeedDamageClass>(), true, proj.noEnchantments);
|
||||
|
||||
// Shattered Community tracks all damage dealt with Rage Mode (ignoring dummies).
|
||||
if (target.type == NPCID.TargetDummy || target.type == NPCType<SuperDummyNPC>())
|
||||
if (targetIsDummy)
|
||||
return;
|
||||
|
||||
if (rageModeActive && shatteredCommunity)
|
||||
@@ -537,7 +471,7 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
#region Item
|
||||
public void ItemOnHit(Item item, int damage, Vector2 position, bool crit, bool npcCheck)
|
||||
public void ItemOnHit(Item item, int damage, Vector2 position, bool crit, bool npcCheck, bool targetIsDummy)
|
||||
{
|
||||
var source = Player.GetSource_ItemUse(item);
|
||||
if (!item.CountsAsClass<MeleeDamageClass>() && Player.meleeEnchant == 7)
|
||||
@@ -552,7 +486,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
hideOfDeusTimer = 10;
|
||||
int bulwarkStarDamage = (int)Player.GetTotalDamage<MeleeDamageClass>().ApplyTo(320);
|
||||
bulwarkStarDamage = Player.ApplyArmorAccDamageBonusesTo(bulwarkStarDamage);
|
||||
|
||||
for (int n = 0; n < 3; n++)
|
||||
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ProjectileType<AstralStar>(), bulwarkStarDamage, 5f, Player.whoAmI);
|
||||
@@ -571,7 +504,6 @@ namespace CalamityMod.CalPlayer
|
||||
});
|
||||
|
||||
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(120);
|
||||
astralStarDamage = Player.ApplyArmorAccDamageBonusesTo(astralStarDamage);
|
||||
|
||||
Projectile star = CalamityUtils.ProjectileRain(source, position, 400f, 100f, 500f, 800f, 12f, projectileType, astralStarDamage, 5f, Player.whoAmI);
|
||||
if (star.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
@@ -588,24 +520,10 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
// Ataxia True Melee Geysers: 15%, softcap starts at 300 base damage
|
||||
int geyserDamage = CalamityUtils.DamageSoftCap(damage * 0.15, 45);
|
||||
geyserDamage = Player.ApplyArmorAccDamageBonusesTo(geyserDamage);
|
||||
|
||||
Projectile.NewProjectile(source, position, Vector2.Zero, ProjectileType<ChaoticGeyser>(), geyserDamage, 2f, Player.whoAmI, 0f, 0f);
|
||||
}
|
||||
if (soaring)
|
||||
{
|
||||
double useTimeMultiplier = 0.85 + (item.useTime * item.useAnimation / 3600D); //28 * 28 = 784 is average so that equals 784 / 3600 = 0.217777 + 1 = 21.7% boost
|
||||
double wingTimeFraction = Player.wingTimeMax / 20D;
|
||||
|
||||
// TODO -- this scaling function is probably totally screwed. What is it supposed to do?
|
||||
double meleeStatMultiplier = (double)(Player.GetTotalDamage<MeleeDamageClass>().Additive * (float)(Player.GetTotalCritChance<MeleeDamageClass>() / 10f));
|
||||
|
||||
if (Player.wingTime < Player.wingTimeMax)
|
||||
Player.wingTime += (int)(useTimeMultiplier * (wingTimeFraction + meleeStatMultiplier));
|
||||
|
||||
if (Player.wingTime > Player.wingTimeMax)
|
||||
Player.wingTime = Player.wingTimeMax;
|
||||
}
|
||||
if (bloodflareMelee && item.CountsAsClass<MeleeDamageClass>() && bloodflareMeleeHits < 15 && !bloodflareFrenzy && !Player.HasCooldown(BloodflareFrenzy.ID))
|
||||
bloodflareMeleeHits++;
|
||||
}
|
||||
@@ -614,7 +532,7 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
#region Proj On Hit
|
||||
public void ProjOnHit(Projectile proj, Vector2 position, bool crit, bool npcCheck)
|
||||
public void ProjOnHit(Projectile proj, Vector2 position, bool crit, bool npcCheck, bool targetIsDummy)
|
||||
{
|
||||
CalamityGlobalProjectile modProj = proj.Calamity();
|
||||
var source = proj.GetSource_FromThis();
|
||||
@@ -627,7 +545,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (alchFlask && AlchFlaskCooldown == 0 && proj.type != ProjectileType<BasicPlagueBee>())
|
||||
{
|
||||
int seekerDamage = (int)Player.GetBestClassDamage().ApplyTo(10);
|
||||
seekerDamage = Player.ApplyArmorAccDamageBonusesTo(seekerDamage);
|
||||
Vector2 seekerVelocity = new Vector2(5, 5).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1.2f);
|
||||
|
||||
Projectile bee = Projectile.NewProjectileDirect(source, position, seekerVelocity, ProjectileType<BasicPlagueBee>(), seekerDamage, 0f, Player.whoAmI, -20, 30, 2);
|
||||
@@ -660,7 +577,6 @@ namespace CalamityMod.CalPlayer
|
||||
});
|
||||
|
||||
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(120);
|
||||
astralStarDamage = Player.ApplyArmorAccDamageBonusesTo(astralStarDamage);
|
||||
|
||||
Projectile star = CalamityUtils.ProjectileRain(source, position, 400f, 100f, 500f, 800f, 25f, projectileType, astralStarDamage, 5f, Player.whoAmI);
|
||||
if (star.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
@@ -688,13 +604,12 @@ namespace CalamityMod.CalPlayer
|
||||
ursaSergeantCooldown = 300;
|
||||
|
||||
int ursaSlashdamage = (int)Player.GetBestClassDamage().ApplyTo(200);
|
||||
ursaSlashdamage = Player.ApplyArmorAccDamageBonusesTo(ursaSlashdamage);
|
||||
|
||||
Projectile.NewProjectile(source, position, Vector2.Zero, ProjectileType<UrsaSlash>(), ursaSlashdamage, 0f, Player.whoAmI);
|
||||
}
|
||||
|
||||
if (proj.CountsAsClass<MeleeDamageClass>())
|
||||
MeleeOnHit(proj, modProj, position, crit, npcCheck);
|
||||
MeleeOnHit(proj, modProj, position, crit, npcCheck, targetIsDummy);
|
||||
if (proj.CountsAsClass<RangedDamageClass>())
|
||||
RangedOnHit(proj, modProj, position, crit, npcCheck);
|
||||
if (proj.CountsAsClass<MagicDamageClass>())
|
||||
@@ -706,32 +621,17 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
#region Melee
|
||||
private void MeleeOnHit(Projectile proj, CalamityGlobalProjectile modProj, Vector2 position, bool crit, bool npcCheck)
|
||||
private void MeleeOnHit(Projectile proj, CalamityGlobalProjectile modProj, Vector2 position, bool crit, bool npcCheck, bool targetIsDummy)
|
||||
{
|
||||
var source = proj.GetSource_FromThis();
|
||||
Item heldItem = Player.ActiveItem();
|
||||
|
||||
if (proj.IsTrueMelee())
|
||||
{
|
||||
if (soaring)
|
||||
{
|
||||
double useTimeMultiplier = 0.85 + (heldItem.useTime * heldItem.useAnimation / 3600D); //28 * 28 = 784 is average so that equals 784 / 3600 = 0.217777 + 1 = 21.7% boost
|
||||
double wingTimeFraction = Player.wingTimeMax / 20D;
|
||||
|
||||
// TODO -- this scaling function is probably totally screwed. What is it supposed to do?
|
||||
double meleeStatMultiplier = (double)(Player.GetTotalDamage<MeleeDamageClass>().Additive * (float)(Player.GetTotalCritChance<MeleeDamageClass>() / 10f));
|
||||
|
||||
if (Player.wingTime < Player.wingTimeMax)
|
||||
Player.wingTime += (int)(useTimeMultiplier * (wingTimeFraction + meleeStatMultiplier));
|
||||
|
||||
if (Player.wingTime > Player.wingTimeMax)
|
||||
Player.wingTime = Player.wingTimeMax;
|
||||
}
|
||||
if (hideOfDeus && hideOfDeusTimer == 0)
|
||||
{
|
||||
hideOfDeusTimer = 10;
|
||||
int bulwarkStarDamage = (int)Player.GetTotalDamage<MeleeDamageClass>().ApplyTo(320);
|
||||
bulwarkStarDamage = Player.ApplyArmorAccDamageBonusesTo(bulwarkStarDamage);
|
||||
|
||||
for (int n = 0; n < 3; n++)
|
||||
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ProjectileType<AstralStar>(), bulwarkStarDamage, 5f, Player.whoAmI);
|
||||
@@ -744,7 +644,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
// Ataxia Melee Geysers: 15%, softcap starts at 240 base damage
|
||||
int geyserDamage = CalamityUtils.DamageSoftCap(proj.damage * 0.15, 36);
|
||||
geyserDamage = Player.ApplyArmorAccDamageBonusesTo(geyserDamage);
|
||||
|
||||
Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType<ChaoticGeyser>(), geyserDamage, 0f, Player.whoAmI, 0f, 0f);
|
||||
}
|
||||
@@ -767,7 +666,7 @@ namespace CalamityMod.CalPlayer
|
||||
for (int l = 0; l < 2; l++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
int leafDamage = Player.ApplyArmorAccDamageBonusesTo(0.25f * proj.damage);
|
||||
int leafDamage = (int)(0.25f * proj.damage);
|
||||
int leaf = Projectile.NewProjectile(source, position, velocity, ProjectileID.Leaf, leafDamage, 0f, Player.whoAmI);
|
||||
if (leaf.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
@@ -780,7 +679,7 @@ namespace CalamityMod.CalPlayer
|
||||
for (int projCount = 0; projCount < 2; projCount++)
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
|
||||
int energyDamage = Player.ApplyArmorAccDamageBonusesTo(0.33f * proj.damage);
|
||||
int energyDamage = (int)(0.33f * proj.damage);
|
||||
Projectile.NewProjectile(source, proj.Center, velocity, ProjectileType<TarraEnergy>(), energyDamage, 0f, proj.owner);
|
||||
}
|
||||
}
|
||||
@@ -795,7 +694,7 @@ namespace CalamityMod.CalPlayer
|
||||
var source = proj.GetSource_FromThis();
|
||||
if (ataxiaMage && ataxiaDmg <= 0)
|
||||
{
|
||||
int orbDamage = Player.ApplyArmorAccDamageBonusesTo(proj.damage * 0.6f);
|
||||
int orbDamage = (int)(proj.damage * 0.6f);
|
||||
|
||||
CalamityUtils.SpawnOrb(proj, orbDamage, ProjectileType<HydrothermicSphere>(), 800f, 20f);
|
||||
int cooldown = (int)(orbDamage * 0.5);
|
||||
@@ -811,7 +710,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
bloodflareMageCooldown = 120;
|
||||
// Bloodflare Mage Explosion: 50%, softcap starts at 500 base damage to not overly punish slow weapons
|
||||
int bloodflareFireballDamage = Player.ApplyArmorAccDamageBonusesTo(CalamityUtils.DamageSoftCap(proj.damage * 0.5, 250));
|
||||
int bloodflareFireballDamage = CalamityUtils.DamageSoftCap(proj.damage * 0.5, 250);
|
||||
|
||||
int fire = Projectile.NewProjectile(source, position, Vector2.Zero, ProjectileType<BloodBombExplosion>(), bloodflareFireballDamage, 0f, Player.whoAmI, 0f, 0f, 1f);
|
||||
if (fire.WithinBounds(Main.maxProjectiles))
|
||||
@@ -826,7 +725,7 @@ namespace CalamityMod.CalPlayer
|
||||
silvaMageCooldown = 300;
|
||||
SoundEngine.PlaySound(SoundID.Zombie103, proj.Center); //So scuffed, just because zombie sounds werent ported normally
|
||||
// Silva Mage Blasts: 800 + 60%, softcap on the whole combined thing starts at 1400
|
||||
int silvaBurstDamage = Player.ApplyArmorAccDamageBonusesTo(CalamityUtils.DamageSoftCap(800.0 + 0.6 * proj.damage, 1400));
|
||||
int silvaBurstDamage = CalamityUtils.DamageSoftCap(800.0 + 0.6 * proj.damage, 1400);
|
||||
Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType<SilvaBurst>(), silvaBurstDamage, 8f, Player.whoAmI);
|
||||
}
|
||||
}
|
||||
@@ -866,7 +765,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.ownedProjectileCounts[ProjectileType<PhantomicDagger>()] < 3 && Main.rand.NextBool(10))
|
||||
{
|
||||
int damage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(100);
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
Projectile.NewProjectile(source, proj.position, proj.velocity, ProjectileType<PhantomicDagger>(), damage, 1f, Player.whoAmI);
|
||||
}
|
||||
}
|
||||
@@ -923,28 +821,24 @@ namespace CalamityMod.CalPlayer
|
||||
if (nucleogenesis)
|
||||
{
|
||||
int apparatusDamage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(60);
|
||||
apparatusDamage = Player.ApplyArmorAccDamageBonusesTo(apparatusDamage);
|
||||
Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType<ApparatusExplosion>(), apparatusDamage, 4f, proj.owner);
|
||||
summonProjCooldown = 100f;
|
||||
}
|
||||
else if (starbusterCore)
|
||||
{
|
||||
int starburstDamage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(40);
|
||||
starburstDamage = Player.ApplyArmorAccDamageBonusesTo(starburstDamage);
|
||||
Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType<SummonAstralExplosion>(), starburstDamage, 3.5f, proj.owner);
|
||||
summonProjCooldown = 60f;
|
||||
}
|
||||
else if (nuclearFuelRod)
|
||||
{
|
||||
int nuclearDamage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(20);
|
||||
nuclearDamage = Player.ApplyArmorAccDamageBonusesTo(nuclearDamage);
|
||||
Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType<IrradiatedAura>(), nuclearDamage, 0f, proj.owner);
|
||||
summonProjCooldown = 60f;
|
||||
}
|
||||
else if (jellyChargedBattery)
|
||||
{
|
||||
int batteryDamage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(15);
|
||||
batteryDamage = Player.ApplyArmorAccDamageBonusesTo(batteryDamage);
|
||||
CalamityUtils.SpawnOrb(proj, batteryDamage, ProjectileType<EnergyOrb>(), 800f, 15f);
|
||||
summonProjCooldown = 60f;
|
||||
}
|
||||
@@ -958,7 +852,6 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 spawnPosition = position - new Vector2(0f, 920f).RotatedByRandom(0.3f);
|
||||
float speed = Main.rand.NextFloat(17f, 23f);
|
||||
int hallowedDamage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(50);
|
||||
hallowedDamage = Player.ApplyArmorAccDamageBonusesTo(hallowedDamage);
|
||||
Projectile.NewProjectile(source, spawnPosition, Vector2.Normalize(position - spawnPosition) * speed, ProjectileType<HallowedStarSummon>(), hallowedDamage, 3f, proj.owner);
|
||||
}
|
||||
}
|
||||
@@ -974,7 +867,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (modProj.stealthStrike && dragonScales && Main.projectile.Count(proj => proj.type == Type && proj.active) < 1)
|
||||
{
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(DragonScales.TornadoBaseDamage);
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
int projectileIndex = Projectile.NewProjectile(spawnSource, proj.Center.X, proj.Center.Y, 0f, 0f, ProjectileType<DragonScalesInfernado>(), damage, 15f, Main.myPlayer, 10f, 9f); //First overload seems to deal with timing, second is segment amount
|
||||
if (projectileIndex.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[projectileIndex].netUpdate = true;
|
||||
@@ -989,33 +881,33 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
case 0:
|
||||
// Exodus Rogue Stars: 80%
|
||||
int starDamage = Player.ApplyArmorAccDamageBonusesTo(proj.damage * 0.8f);
|
||||
int starDamage = (int)(proj.damage * 0.8f);
|
||||
CalamityUtils.SpawnOrb(proj, starDamage, ProjectileType<EmpyreanStellarDetritus>(), 800f, Main.rand.Next(15, 30));
|
||||
xerocDmg += (int)(starDamage * 0.5f);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
// Exodus Rogue Orbs: 60%
|
||||
int orbDamage = Player.ApplyArmorAccDamageBonusesTo(proj.damage * 0.6f);
|
||||
int orbDamage = (int)(proj.damage * 0.6f);
|
||||
CalamityUtils.SpawnOrb(proj, orbDamage, ProjectileType<EmpyreanMarble>(), 800f, 30f);
|
||||
xerocDmg += (int)(orbDamage * 0.5f);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
// Exodus Rogue Fire: 15%
|
||||
int fireDamage = Player.ApplyArmorAccDamageBonusesTo(proj.damage * 0.15f);
|
||||
int fireDamage = (int)(proj.damage * 0.15f);
|
||||
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<EmpyreanEmber>(), fireDamage, 0f, proj.owner, 0f, 0f);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
// Exodus Rogue Blast: 20%
|
||||
int blastDamage = Player.ApplyArmorAccDamageBonusesTo(proj.damage * 0.2f);
|
||||
int blastDamage = (int)(proj.damage * 0.2f);
|
||||
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<EmpyreanBlast>(), blastDamage, 0f, proj.owner, 0f, 0f);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
// Exodus Rogue Bubble: 60%
|
||||
int bubbleDamage = Player.ApplyArmorAccDamageBonusesTo(proj.damage * 0.6f);
|
||||
int bubbleDamage = (int)(proj.damage * 0.6f);
|
||||
CalamityUtils.SpawnOrb(proj, bubbleDamage, ProjectileType<EmpyreanGlob>(), 800f, 15f);
|
||||
xerocDmg += (int)(bubbleDamage * 0.5);
|
||||
break;
|
||||
@@ -1035,14 +927,12 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
|
||||
Vector2 velocity = (position - source) / 40f;
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(120);
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
Projectile.NewProjectile(spawnSource, source, velocity, ProjectileType<NanoFlare>(), damage, 3f, proj.owner);
|
||||
}
|
||||
}
|
||||
else if (moonCrown)
|
||||
{
|
||||
int lunarFlareDamage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(MoonstoneCrown.BaseDamage);
|
||||
lunarFlareDamage = Player.ApplyArmorAccDamageBonusesTo(lunarFlareDamage);
|
||||
float lunarFlareKB = 3f;
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
@@ -1064,7 +954,6 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 velocity = new Vector2(speedX, speedY);
|
||||
|
||||
int featherDamage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(25);
|
||||
featherDamage = Player.ApplyArmorAccDamageBonusesTo(featherDamage);
|
||||
|
||||
int feather = Projectile.NewProjectile(spawnSource, source, velocity, ProjectileType<StickyFeather>(), featherDamage, 3f, proj.owner);
|
||||
if (feather.WithinBounds(Main.maxProjectiles))
|
||||
@@ -1087,7 +976,6 @@ namespace CalamityMod.CalPlayer
|
||||
xVector *= 10f;
|
||||
yVector *= 10f;
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(40);
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
int eater = Projectile.NewProjectile(spawnSource, proj.Center.X, proj.Center.Y, xVector, yVector, ProjectileType<ForbiddenCircletEater>(), damage, proj.knockBack, proj.owner);
|
||||
if (eater.WithinBounds(Main.maxProjectiles))
|
||||
@@ -1099,17 +987,14 @@ namespace CalamityMod.CalPlayer
|
||||
if (titanHeartSet && modProj.stealthStrike && titanCooldown <= 0 && modProj.stealthStrikeHitCount < 3)
|
||||
{
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(40);
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<TitanHeartBoom>(), damage, proj.knockBack, proj.owner, 1f, 0f);
|
||||
SoundEngine.PlaySound(SoundID.Item14, proj.Center);
|
||||
for (int dustexplode = 0; dustexplode < 180; dustexplode++)
|
||||
{
|
||||
Vector2 dustd = new Vector2(17f, 17f).RotatedBy(MathHelper.ToRadians(dustexplode * 2));
|
||||
int d = Dust.NewDust(proj.Center, proj.width, proj.height, Main.rand.NextBool() ? DustType<AstralBlue>() : DustType<AstralOrange>(), dustd.X, dustd.Y, 100, default, 1f);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].position = proj.Center;
|
||||
Main.dust[d].velocity *= 0.1f;
|
||||
Vector2 dustd = Vector2.One.RotatedBy(MathHelper.ToRadians(dustexplode * 2)) * 1.7f;
|
||||
Dust dust = Dust.NewDustPerfect(proj.Center, Main.rand.NextBool() ? DustType<AstralBlue>() : DustType<AstralOrange>(), dustd, Alpha: 100);
|
||||
dust.noGravity = true;
|
||||
}
|
||||
titanCooldown = 15;
|
||||
}
|
||||
@@ -1137,7 +1022,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (type != -1)
|
||||
{
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(22);
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
float speed = Main.rand.NextFloat(5f, 11f);
|
||||
int cloud = Projectile.NewProjectile(spawnSource, position, Vector2.One.RotatedByRandom(MathHelper.TwoPi) * speed, type, damage, proj.knockBack, Player.whoAmI);
|
||||
@@ -1148,16 +1032,6 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (shadow && shadowPotCooldown <= 0 && modProj.stealthStrikeHitCount < 3)
|
||||
{
|
||||
int randrot = Main.rand.Next(-30, 391);
|
||||
Vector2 SoulSpeed = new Vector2(13f, 13f).RotatedBy(MathHelper.ToRadians(randrot));
|
||||
int soul = Projectile.NewProjectile(spawnSource, proj.Center, SoulSpeed, ProjectileType<PenumbraSoul>(), (int)(proj.damage * 0.1), 3f, proj.owner, 0f, 0f);
|
||||
if (soul.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[soul].DamageType = DamageClass.Generic;
|
||||
shadowPotCooldown = 30;
|
||||
}
|
||||
|
||||
if (raiderTalisman && modProj.stealthStrike)
|
||||
{
|
||||
raiderCritLifespan = CalamityUtils.SecondsToFrames(RaidersTalisman.RaiderCooldown);
|
||||
@@ -1175,7 +1049,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
// Umbraphile Rogue Blasts: 20%, softcap starts at 50 base damage
|
||||
int umbraBlastDamage = CalamityUtils.DamageSoftCap(proj.damage * 0.20, 50);
|
||||
umbraBlastDamage = Player.ApplyArmorAccDamageBonusesTo(umbraBlastDamage);
|
||||
|
||||
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<UmbraphileBoom>(), umbraBlastDamage, 0f, Player.whoAmI);
|
||||
}
|
||||
@@ -1185,7 +1058,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(50f, 30f, 60f);
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(9);
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
int spark = Projectile.NewProjectile(spawnSource, position, velocity, ProjectileType<EGloveSpark>(), damage, 0f, Player.whoAmI);
|
||||
if (spark.WithinBounds(Main.maxProjectiles))
|
||||
|
||||
@@ -77,14 +77,12 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
hitContext.PlayerImmunityFrames = AsgardianAegis.ShieldSlamIFrames;
|
||||
|
||||
// Define damage parameters.
|
||||
int dashDamage = AsgardianAegis.ShieldSlamDamage;
|
||||
hitContext.damageClass = DamageClass.Melee;
|
||||
hitContext.BaseDamage = player.ApplyArmorAccDamageBonusesTo(dashDamage);
|
||||
hitContext.BaseDamage = AsgardianAegis.ShieldSlamDamage;
|
||||
hitContext.BaseKnockback = AsgardianAegis.ShieldSlamKnockback;
|
||||
|
||||
// On-hit Cosmic Dash Explosion
|
||||
int explosionDamage = (int)player.GetBestClassDamage().ApplyTo(AsgardianAegis.RamExplosionDamage);
|
||||
explosionDamage = player.ApplyArmorAccDamageBonusesTo(explosionDamage);
|
||||
Projectile.NewProjectile(source, player.Center, Vector2.Zero, ModContent.ProjectileType<CosmicDashExplosion>(), explosionDamage, AsgardianAegis.RamExplosionKnockback, Main.myPlayer, 3f, 0f);
|
||||
npc.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
|
||||
}
|
||||
|
||||
@@ -61,9 +61,8 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
hitContext.PlayerImmunityFrames = AsgardsValor.ShieldSlamIFrames;
|
||||
|
||||
// Define damage parameters.
|
||||
int dashDamage = AsgardsValor.ShieldSlamDamage;
|
||||
hitContext.damageClass = DamageClass.Melee;
|
||||
hitContext.BaseDamage = player.ApplyArmorAccDamageBonusesTo(dashDamage);
|
||||
hitContext.BaseDamage = AsgardsValor.ShieldSlamDamage;
|
||||
hitContext.BaseKnockback = AsgardsValor.ShieldSlamKnockback;
|
||||
|
||||
int Dusts = 12;
|
||||
|
||||
@@ -100,9 +100,8 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
hitContext.PlayerImmunityFrames = DeepDiver.ShieldSlamIFrames;
|
||||
|
||||
// Define damage parameters.
|
||||
int dashDamage = DeepDiver.ShieldSlamDamage;
|
||||
hitContext.damageClass = DamageClass.Melee;
|
||||
hitContext.BaseDamage = player.ApplyArmorAccDamageBonusesTo(dashDamage);
|
||||
hitContext.BaseDamage = DeepDiver.ShieldSlamDamage;
|
||||
hitContext.BaseKnockback = DeepDiver.ShieldSlamKnockback;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,14 +74,12 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
hitContext.PlayerImmunityFrames = ElysianAegis.ShieldSlamIFrames;
|
||||
|
||||
// Define damage parameters.
|
||||
int dashDamage = ElysianAegis.ShieldSlamDamage;
|
||||
hitContext.damageClass = DamageClass.Melee;
|
||||
hitContext.BaseDamage = player.ApplyArmorAccDamageBonusesTo(dashDamage);
|
||||
hitContext.BaseDamage = ElysianAegis.ShieldSlamDamage;
|
||||
hitContext.BaseKnockback = ElysianAegis.ShieldSlamKnockback;
|
||||
|
||||
// On-hit Supreme Holy Explosion
|
||||
int supremeExplosionDamage = (int)player.GetBestClassDamage().ApplyTo(ElysianAegis.RamExplosionDamage);
|
||||
supremeExplosionDamage = player.ApplyArmorAccDamageBonusesTo(supremeExplosionDamage);
|
||||
Projectile.NewProjectile(source, player.Center, Vector2.Zero, ModContent.ProjectileType<HolyExplosionSupreme>(), supremeExplosionDamage, ElysianAegis.RamExplosionKnockback, Main.myPlayer, 1f, 0f);
|
||||
npc.AddBuff(ModContent.BuffType<HolyFlames>(), 300);
|
||||
}
|
||||
|
||||
@@ -140,9 +140,8 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
hitContext.PlayerImmunityFrames = AsgardianAegis.ShieldSlamIFrames;
|
||||
|
||||
// Define damage parameters.
|
||||
int dashDamage = 3000;
|
||||
hitContext.damageClass = player.GetBestClass();
|
||||
hitContext.BaseDamage = player.ApplyArmorAccDamageBonusesTo(dashDamage);
|
||||
hitContext.BaseDamage = 3000;
|
||||
hitContext.BaseKnockback = 15f;
|
||||
|
||||
// God Slayer Dash intentionally does not use the vanilla function for collision attack iframes.
|
||||
|
||||
@@ -51,9 +51,8 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
hitContext.PlayerImmunityFrames = OrnateShield.ShieldSlamIFrames;
|
||||
|
||||
// Define damage parameters.
|
||||
int dashDamage = OrnateShield.ShieldSlamDamage;
|
||||
hitContext.damageClass = DamageClass.Melee;
|
||||
hitContext.BaseDamage = player.ApplyArmorAccDamageBonusesTo(dashDamage);
|
||||
hitContext.BaseDamage = OrnateShield.ShieldSlamDamage;
|
||||
hitContext.BaseKnockback = OrnateShield.ShieldSlamKnockback;
|
||||
|
||||
npc.AddBuff(BuffID.Frostburn2, 180); //Great, Frostbite is ACTUALLY called Frostburn 2
|
||||
|
||||
@@ -64,9 +64,8 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
hitContext.PlayerImmunityFrames = AsgardsValor.ShieldSlamIFrames;
|
||||
|
||||
// Define damage parameters.
|
||||
int dashDamage = 50;
|
||||
hitContext.damageClass = DamageClass.Summon;
|
||||
hitContext.BaseDamage = player.ApplyArmorAccDamageBonusesTo(dashDamage);
|
||||
hitContext.BaseDamage = 50;
|
||||
hitContext.BaseKnockback = 3f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
if (Main.myPlayer == player.whoAmI && player.Calamity().statisTimer % 5 == 0)
|
||||
{
|
||||
int scytheDamage = (int)player.GetBestClassDamage().ApplyTo(250);
|
||||
scytheDamage = player.ApplyArmorAccDamageBonusesTo(scytheDamage);
|
||||
|
||||
int scythe = Projectile.NewProjectile(player.GetSource_FromAI(), player.Center, player.velocity.RotatedBy(player.direction * (AngleSwap ? 30 : -30), default) * 0.1f - player.velocity / 2f, ModContent.ProjectileType<CosmicScythe>(), scytheDamage, 5f, player.whoAmI); ;
|
||||
if (scythe.WithinBounds(Main.maxProjectiles))
|
||||
|
||||
@@ -68,6 +68,8 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Magic/FatesRevealGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<GreatswordofJudgement>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/GreatswordofJudgementGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<GalactusBlade>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/GalactusBladeGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<LegionofCelestia>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Summon/LegionofCelestiaGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<NecroplasmicBeacon>())
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.BiomeManagers;
|
||||
using CalamityMod.Buffs;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Buffs.Cooldowns;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.Potions;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Armor.Vanity;
|
||||
using CalamityMod.Items.DraedonMisc;
|
||||
using CalamityMod.Items.Fishing.FishingRods;
|
||||
using CalamityMod.Items.LoreItems;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Items.Placeables.Abyss;
|
||||
using CalamityMod.Items.Placeables.Furniture.Trophies;
|
||||
using CalamityMod.Items.Tools;
|
||||
using CalamityMod.Items.TreasureBags;
|
||||
@@ -61,7 +64,6 @@ using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using CalamityMod.NPCs.Yharon;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using CalamityMod.Projectiles.Enemy;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Projectiles.Melee.MaceFlails;
|
||||
@@ -157,6 +159,11 @@ namespace CalamityMod
|
||||
|
||||
public static List<int> VeneratedLocketBanlist; //To ban projectiles from locket, mainly spikeballs altho Toasty asked me to add mod calls for adding stuff like Dreamtastic
|
||||
|
||||
/// <summary>
|
||||
/// Each Sunken Sea subbiome has a correspoding spawn condition boolean value and a biome type.
|
||||
/// </summary>
|
||||
public static SortedDictionary<SunkenSeaBiomeFlags, (Func<NPCSpawnInfo, bool> SpawnCondition, int BiomeType)> SunkenSeaBiomeCorrespondentValues { get; private set; }
|
||||
|
||||
public override void OnModLoad()
|
||||
{
|
||||
donatorList = new List<string>()
|
||||
@@ -1956,6 +1963,7 @@ namespace CalamityMod
|
||||
ProjectileID.NettleBurstEnd,
|
||||
ProjectileID.NettleBurstLeft,
|
||||
ProjectileID.NettleBurstRight,
|
||||
ProjectileID.PrincessWeapon,
|
||||
ProjectileType<AnahitasArpeggioNote>(),
|
||||
ProjectileType<AtlantisSpear>(),
|
||||
ProjectileType<AuroraFire>(),
|
||||
@@ -2713,6 +2721,16 @@ namespace CalamityMod
|
||||
ItemType<Mycoroot>(),
|
||||
ItemType<CosmicKunai>()
|
||||
};
|
||||
|
||||
SunkenSeaBiomeCorrespondentValues = new()
|
||||
{
|
||||
{ SunkenSeaBiomeFlags.UndergroundDesert, (spawnInfo => spawnInfo.Player.ZoneDesert, -1 /* None needed. */) },
|
||||
{ SunkenSeaBiomeFlags.TimelessShores, (spawnInfo => spawnInfo.Player.Calamity().ZoneTimelessShores, GetInstance<TimelessShoresBiome>().Type) },
|
||||
{ SunkenSeaBiomeFlags.RadiantReefs, (spawnInfo => spawnInfo.Player.Calamity().ZoneRadiantReefs, GetInstance<RadiantReefsBiome>().Type) },
|
||||
{ SunkenSeaBiomeFlags.PolypForest, (spawnInfo => spawnInfo.Player.Calamity().ZonePolypForest, GetInstance<PolypForestBiome>().Type) },
|
||||
{ SunkenSeaBiomeFlags.GleamingBurrows, (spawnInfo => spawnInfo.Player.Calamity().ZoneGleamingBurrows, GetInstance<GleamingBurrowsBiome>().Type) },
|
||||
{ SunkenSeaBiomeFlags.BasaltGully, (spawnInfo => spawnInfo.Player.Calamity().ZoneBasaltGully, GetInstance<BasaltGullyBiome>().Type) },
|
||||
};
|
||||
}
|
||||
|
||||
public override void Unload()
|
||||
@@ -2794,6 +2812,8 @@ namespace CalamityMod
|
||||
DisabledSummonerNerfMinions = null;
|
||||
|
||||
VeneratedLocketBanlist = null;
|
||||
|
||||
SunkenSeaBiomeCorrespondentValues = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,11 +27,11 @@ namespace CalamityMod.Cooldowns
|
||||
{
|
||||
for (int i = 0; i < 66; i++)
|
||||
{
|
||||
int d = Dust.NewDust(instance.player.position, instance.player.width, instance.player.height, DustID.PurificationPowder, 0, 0, 100, Color.Transparent, 2.6f);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].noLight = true;
|
||||
Main.dust[d].fadeIn = 1f;
|
||||
Main.dust[d].velocity *= 6.6f;
|
||||
Dust dust = Dust.NewDustDirect(instance.player.position, instance.player.width, instance.player.height, DustID.PurificationPowder, 0, 0, 100, Color.Transparent, 2.6f);
|
||||
dust.noGravity = true;
|
||||
dust.noLight = true;
|
||||
dust.fadeIn = 1f;
|
||||
dust.velocity *= 6.6f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ namespace CalamityMod.Cooldowns
|
||||
int h = instance.player.height;
|
||||
for (int i = 0; i < 66; i++)
|
||||
{
|
||||
int d = Dust.NewDust(pos, w, h, DustID.GemEmerald, 0, 0, 100, default, 1.5f);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].velocity *= 6.6f;
|
||||
Dust dust = Dust.NewDustDirect(pos, w, h, DustID.GemEmerald, 0, 0, 100, default, 1.5f);
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 6.6f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,6 @@ namespace CalamityMod.DataStructures
|
||||
return;
|
||||
|
||||
int damage = (int)Owner.GetTotalDamage<MeleeDamageClass>().ApplyTo(GemTechHeadgear.MeleeShardBaseDamage);
|
||||
damage = Owner.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
for (int i = 0; i < 14; i++)
|
||||
{
|
||||
@@ -167,7 +166,6 @@ namespace CalamityMod.DataStructures
|
||||
return;
|
||||
|
||||
int damage = CalamityUtils.DamageSoftCap((int)(hitDamage * 0.32f), 400);
|
||||
damage = Owner.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
Vector2 spawnPosition = Owner.Center + Main.rand.NextVector2Circular(Owner.width, Owner.height) * 1.35f;
|
||||
Vector2 shootVelocity = (target.Center - spawnPosition) * 0.04f;
|
||||
@@ -277,7 +275,6 @@ namespace CalamityMod.DataStructures
|
||||
|
||||
// Softcap the damage. This is done primarily to dampen stealth interactions.
|
||||
gemDamage = CalamityUtils.DamageSoftCap(gemDamage, GemTechHeadgear.GemDamageSoftcapThreshold);
|
||||
gemDamage = Owner.ApplyArmorAccDamageBonusesTo(gemDamage);
|
||||
|
||||
if (Main.myPlayer == OwnerIndex)
|
||||
Projectile.NewProjectile(Owner.GetSource_ItemUse(Owner.ActiveItem()), gemPosition, Vector2.Zero, ModContent.ProjectileType<GemTechArmorGem>(), gemDamage, 0f, OwnerIndex, 0f, (int)GemThatShouldBeLost);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace CalamityMod.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// The flags corresponding for the possible spawns for a Sunken Sea NPC.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum SunkenSeaBiomeFlags : byte
|
||||
{
|
||||
None = 0,
|
||||
UndergroundDesert = 1,
|
||||
TimelessShores = 2,
|
||||
RadiantReefs = 4,
|
||||
PolypForest = 8,
|
||||
GleamingBurrows = 16,
|
||||
BasaltGully = 32,
|
||||
}
|
||||
}
|
||||
@@ -2,57 +2,51 @@
|
||||
{
|
||||
public enum VanillaWingID
|
||||
{
|
||||
FledglingWings = 46,
|
||||
// Early HM Wings
|
||||
DemonWings = 1,
|
||||
AngelWings = 2,
|
||||
FairyWings = 6,
|
||||
FinWings = 25,
|
||||
// Post-Mech Wings
|
||||
RedsWings = 3,
|
||||
Jetpack = 4,
|
||||
ButterflyWings = 5,
|
||||
FairyWings = 6,
|
||||
HarpyWings = 7,
|
||||
BoneWings = 8,
|
||||
FlameWings = 9,
|
||||
FrozenWings = 10,
|
||||
SpectreWings = 11,
|
||||
SteampunkWings = 12,
|
||||
LeafWings = 13,
|
||||
BatWings = 14,
|
||||
BeeWings = 15,
|
||||
// Post-Plantera Wings
|
||||
BoneWings = 8,
|
||||
SpectreWings = 11,
|
||||
LeafWings = 13,
|
||||
Hoverboard = 22,
|
||||
MothronWings = 27,
|
||||
// Post-Golem Wings
|
||||
BeetleWings = 24,
|
||||
SteampunkWings = 12,
|
||||
TatteredFairyWings = 20,
|
||||
SpookyWings = 21,
|
||||
FestiveWings = 23,
|
||||
FishronWings = 26,
|
||||
RainbowWings = 44, // Empress Wings
|
||||
BetsyWings = 37,
|
||||
// Post-Moon Lord Wings
|
||||
WingsSolar = 29,
|
||||
WingsNebula = 30,
|
||||
WingsVortex = 31,
|
||||
WingsStardust = 32,
|
||||
LongRainbowTrailWings = 45, // Celestial Starboard
|
||||
// Dev Wings
|
||||
RedsWings = 3,
|
||||
DTownsWings = 16,
|
||||
WillsWings = 17,
|
||||
CrownosWings = 18,
|
||||
CenxsWings = 19,
|
||||
TatteredFairyWings = 20,
|
||||
SpookyWings = 21,
|
||||
Hoverboard = 22,
|
||||
FestiveWings = 23,
|
||||
BeetleWings = 24,
|
||||
FinWings = 25,
|
||||
FishronWings = 26,
|
||||
MothronWings = 27,
|
||||
BejeweledValkyrieWing = 28, // Lazure's Barrier Platform
|
||||
WingsSolar = 29,
|
||||
WingsVortex = 30,
|
||||
WingsNebula = 31,
|
||||
WingsStardust = 32,
|
||||
Yoraiz0rWings = 33, // Yoraiz0r's Spell
|
||||
JimsWings = 34,
|
||||
SkiphsWings = 35,
|
||||
LokisWings = 36,
|
||||
BetsyWings = 37,
|
||||
ArkhalisWings = 38,
|
||||
LeinforsWings = 39,
|
||||
GhostarsWings = 40,
|
||||
SafemanWings = 41,
|
||||
FoodBarbarianWings = 42,
|
||||
GroxTheGreatWings = 43,
|
||||
RainbowWings = 44, // Empress Wings
|
||||
LongRainbowTrailWings = 45, // Celestial Starboard
|
||||
FledglingWings = 46,
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,6 @@ namespace CalamityMod.ExtraJumps
|
||||
{
|
||||
var source = player.GetSource_Misc("0");
|
||||
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(20);
|
||||
damage = player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
int bubble = Projectile.NewProjectile(source, new Vector2(player.position.X, player.position.Y + (player.gravDir == -1f ? 20 : -20)), Vector2.Zero, ModContent.ProjectileType<SulphuricAcidBubbleFriendly>(), damage, 0f, player.whoAmI, 1f, 0f);
|
||||
if (bubble.WithinBounds(Main.maxProjectiles))
|
||||
|
||||
@@ -7,6 +7,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.ExtraTextures
|
||||
@@ -32,6 +33,11 @@ namespace CalamityMod.ExtraTextures
|
||||
public static Asset<Texture2D> FlyingCarpetVanilla;
|
||||
public static Asset<Texture2D> FlyingCarpetAuric;
|
||||
|
||||
// Lucky Buff icon replacements
|
||||
public static Asset<Texture2D> LuckIconGreater;
|
||||
public static Asset<Texture2D> LuckIconVanilla;
|
||||
public static Asset<Texture2D> LuckIconLesser;
|
||||
|
||||
// Boss Heads
|
||||
// I know it's not exactly a Texture2D but it belongs to ExtraTextures.
|
||||
public static int BossHeadIndex_ChadPrime;
|
||||
@@ -60,6 +66,10 @@ namespace CalamityMod.ExtraTextures
|
||||
|
||||
FlyingCarpetVanilla = TextureAssets.FlyingCarpet;
|
||||
FlyingCarpetAuric = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/AuricCarpet", AssetRequestMode.AsyncLoad);
|
||||
|
||||
LuckIconGreater = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBuffs/LuckyGreater", AssetRequestMode.AsyncLoad);
|
||||
LuckIconVanilla = TextureAssets.Buff[BuffID.Lucky];
|
||||
LuckIconLesser = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBuffs/LuckyLesser", AssetRequestMode.AsyncLoad);
|
||||
}
|
||||
|
||||
public override void Unload()
|
||||
@@ -67,6 +77,7 @@ namespace CalamityMod.ExtraTextures
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
TextureAssets.FlyingCarpet = FlyingCarpetVanilla;
|
||||
TextureAssets.Buff[BuffID.Lucky] = LuckIconVanilla;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 622 B |
|
After Width: | Height: | Size: 612 B |
@@ -60,24 +60,7 @@ namespace CalamityMod.Graphics.Renderers.CalamityRenderers
|
||||
if (!npc.active || npc.type <= NPCID.None)
|
||||
return false;
|
||||
|
||||
// Do not draw other mod's bosses.
|
||||
if (npc.ModNPC != null && npc.ModNPC.Mod != CalamityMod.Instance && npc.boss)
|
||||
return false;
|
||||
|
||||
// Don't draw excluded NPCs, or if the npc is a bestiary dummy.
|
||||
if (ExcludedNPCs.Contains(npc.type) || npc.IsABestiaryIconDummy)
|
||||
return false;
|
||||
|
||||
// Safety check for weird MP bug when getting global npcs.
|
||||
if (!npc.TryGetGlobalNPCSafer<CalamityGlobalNPC>(out var calNPC) || !npc.TryGetGlobalNPCSafer<CalamityPolarityNPC>(out var polNPC))
|
||||
return false;
|
||||
|
||||
// Do not draw if the npc does not have miracle blight, or has the polarity effect.
|
||||
if (calNPC.miracleBlight <= 0 || polNPC.CurPolarity > 0f)
|
||||
return false;
|
||||
|
||||
// Do not draw if the current player has the trippy effect.
|
||||
if (Main.LocalPlayer.Calamity().trippy)
|
||||
if (!CalamityDrawParameterNPC.DrawingMiracleBlight[npc.whoAmI])
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.Enums;
|
||||
using Mono.Cecil.Cil;
|
||||
using MonoMod.Cil;
|
||||
using Terraria;
|
||||
@@ -437,7 +438,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region Damage Variance Dampening and Luck Removal
|
||||
private static int AdjustDamageVariance(Terraria.On_Main.orig_DamageVar_float_int_float orig, float dmg, int percent, float luck)
|
||||
private static int AdjustDamageVariance(On_Main.orig_DamageVar_float_int_float orig, float dmg, int percent, float luck)
|
||||
{
|
||||
// Change the default damage variance from +-15% to +-5%.
|
||||
// If other mods decide to change the scale, they can override this. We're solely killing the default value.
|
||||
@@ -566,6 +567,21 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Vortex Booster Keeps Vortex Stealth When Dashing
|
||||
private static void VortexBoosterKeepsVortexStealthWhenDashing(On_Player.orig_DashMovement orig, Player self)
|
||||
{
|
||||
// Allows for Vortex Booster to keep Vortex armor's stealth when dashing
|
||||
bool vortexStealth = self.vortexStealthActive;
|
||||
orig(self);
|
||||
|
||||
if (self.wingsLogic == (int)VanillaWingID.WingsVortex)
|
||||
{
|
||||
if (vortexStealth && !self.vortexStealthActive)
|
||||
self.vortexStealthActive = true;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Nebula Armor Nerfs
|
||||
private static void NerfNebulaArmorBaseLifeRegenAndDamage(ILContext il)
|
||||
{
|
||||
@@ -645,6 +661,54 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Stardust Guardian Buffs
|
||||
private static void StardustGuardianAttackBuffs(ILContext il)
|
||||
{
|
||||
// Increase the Stardust Guardian's attack range while wearing Stardust Wings.
|
||||
var cursor = new ILCursor(il);
|
||||
|
||||
// Move to the label after the instruction that sets num3 to 500f.
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchLdcR4(100f)))
|
||||
{
|
||||
LogFailure("Stardust Guardian Buffs", "Could not move to after the Stardust Guardian's attack range.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Define a label for the branch statement.
|
||||
var label = il.DefineLabel();
|
||||
|
||||
// Load Player.wingsLogic, and check if it's Stardust Wings.
|
||||
// If it is, increase the two attack range variables.
|
||||
cursor.Emit(OpCodes.Ldloc_0);
|
||||
cursor.Emit(OpCodes.Ldfld, typeof(Player).GetField("wingsLogic"));
|
||||
cursor.Emit(OpCodes.Ldc_I4, (int)VanillaWingID.WingsStardust);
|
||||
cursor.Emit(OpCodes.Bne_Un, label);
|
||||
|
||||
cursor.Emit(OpCodes.Ldc_R4, 900f);
|
||||
cursor.Emit(OpCodes.Stloc, 4);
|
||||
cursor.Emit(OpCodes.Ldc_R4, 900f);
|
||||
cursor.Emit(OpCodes.Stloc, 5);
|
||||
|
||||
cursor.MarkLabel(label);
|
||||
|
||||
// Now, increase the Stardust Guardian's move speed when attacking targets.
|
||||
// This is applied regardless of having Stardust Wings.
|
||||
// This jumps to the base speed value when moving towards a target.
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdcR4(6f)))
|
||||
{
|
||||
LogFailure("Stardust Guardian Buffs", "Could not locate the Stardust Guardian's attack move speed.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove and replace with a higher value.
|
||||
cursor.EmitPop();
|
||||
cursor.Emit(OpCodes.Ldc_R4, 12f);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Remove Melee Armor (Beetle Shell + Solar Flare) Multiplicative DR
|
||||
private static void RemoveBeetleAndSolarFlareMultiplicativeDR(ILContext il)
|
||||
{
|
||||
|
||||
@@ -70,13 +70,15 @@ namespace CalamityMod.ILEditing
|
||||
IL_Player.ApplyEquipFunctional += ScopesRequireVisibilityToZoom;
|
||||
IL_Player.Hurt_PlayerDeathReason_int_int_refHurtInfo_bool_bool_int_bool_float_float_float += DodgeMechanicAdjustments;
|
||||
IL_Player.DashMovement += FixAllDashMechanics;
|
||||
On_Player.DashMovement += VortexBoosterKeepsVortexStealthWhenDashing;
|
||||
On_Player.DoCommonDashHandle += ApplyDashKeybind;
|
||||
IL_Player.GiveImmuneTimeForCollisionAttack += MakeShieldSlamIFramesConsistent;
|
||||
IL_Player.Update_NPCCollision += NerfShieldOfCthulhuBonkSafety;
|
||||
On_WorldGen.OpenDoor += OpenDoor_LabDoorOverride;
|
||||
On_WorldGen.CloseDoor += CloseDoor_LabDoorOverride;
|
||||
On_Item.AffixName += IncorporateEnchantmentInAffix;
|
||||
On_Projectile.NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float += IncorporateMinionExplodingCountdown;
|
||||
On_Projectile.NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float += IncorporateExtraProjectileVariables;
|
||||
On_Player.ApplyDamageToNPC += ApplyOldFashionedDamageToMiscHits;
|
||||
// TODO -- This should be unnecessary. There is now a TML hook for platform collision for ModNPCs.
|
||||
On_NPC.Collision_DecideFallThroughPlatforms += EnableCalamityBossPlatformCollision;
|
||||
IL_Wiring.HitWireSingle += AddTwinklersToStatue;
|
||||
@@ -143,6 +145,7 @@ namespace CalamityMod.ILEditing
|
||||
IL_NPC.ScaleStats_ApplyExpertTweaks += RemoveExpertHardmodeScaling;
|
||||
IL_Projectile.Damage += ReduceEoWGrenadeResist;
|
||||
IL_Projectile.AI_099_2 += LimitTerrarianProjectiles;
|
||||
IL_Projectile.AI_120_StardustGuardian += StardustGuardianAttackBuffs;
|
||||
IL_Player.UpdateBuffs += NerfSharpeningStation;
|
||||
IL_Player.UpdateBuffs += NerfBeetleScaleMail;
|
||||
IL_Player.UpdateBuffs += NerfNebulaArmorBaseLifeRegenAndDamage;
|
||||
@@ -205,6 +208,7 @@ namespace CalamityMod.ILEditing
|
||||
IL_Player.TileInteractionsUse += RemovePowerCellPlanteraLock;
|
||||
On_Player.ItemCheck_CheckCanUse += RemoveCelestialSigilUseLock;
|
||||
On_Player.ItemCheck_UseEventItems += ApplyCelestialSigilChanges;
|
||||
IL_Main.DrawInfoAccs += RemoveDamageConditionFromRadar;
|
||||
|
||||
// Fix vanilla bugs exposed by Calamity mechanics
|
||||
IL_NPC.NPCLoot += FixSplittingWormBannerDrops;
|
||||
|
||||
@@ -11,6 +11,7 @@ using CalamityMod.Events;
|
||||
using CalamityMod.FluidSimulation;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Accessories.Vanity;
|
||||
using CalamityMod.Items.Armor.Wulfrum;
|
||||
using CalamityMod.Items.Dyes;
|
||||
using CalamityMod.Items.Placeables.FurniturePlagued;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
@@ -308,16 +309,14 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
dir = self.direction;
|
||||
dashing = true;
|
||||
if (self.dashTime > 0)
|
||||
self.dashTime--;
|
||||
if (self.dashTime < 0)
|
||||
self.dashTime++;
|
||||
|
||||
if ((self.dashTime <= 0 && self.direction == -1) || (self.dashTime >= 0 && self.direction == 1))
|
||||
// CIT 16OCT2024: Commented this code out, as there's no reason for custom dash hotkey to use Player.dashTime
|
||||
// and was causing the return of Celestial Starboard's dash bug from early 1.4 versions
|
||||
/*if ((self.dashTime <= 0 && self.direction == -1) || (self.dashTime >= 0 && self.direction == 1))
|
||||
{
|
||||
self.dashTime = 15;
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
dashing = true;
|
||||
self.dashTime = 0;
|
||||
@@ -332,6 +331,7 @@ namespace CalamityMod.ILEditing
|
||||
{
|
||||
dir = 1;
|
||||
dashing = false;
|
||||
self.dashTime = 0;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -540,32 +540,80 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Hellbound Enchantment Projectile Creation Effects
|
||||
private static int IncorporateMinionExplodingCountdown(Terraria.On_Projectile.orig_NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float orig, IEntitySource spawnSource, float x, float y, float xSpeed, float ySpeed, int type, int damage, float knockback, int owner, float ai0, float ai1, float ai2)
|
||||
#region Apply Projectile Variables Upon Creation
|
||||
private static int IncorporateExtraProjectileVariables(Terraria.On_Projectile.orig_NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float orig, IEntitySource spawnSource, float x, float y, float xSpeed, float ySpeed, int type, int damage, float knockback, int owner, float ai0, float ai1, float ai2)
|
||||
{
|
||||
// This is unfortunately not something that can be done via SetDefaults since owner is set
|
||||
// after that method is called. Doing it directly when the projectile is spawned appears to be the only reasonable way.
|
||||
int proj = orig(spawnSource, x, y, xSpeed, ySpeed, type, damage, knockback, owner, ai0, ai1, ai2);
|
||||
Projectile projectile = Main.projectile[proj];
|
||||
if (projectile.minion)
|
||||
|
||||
Player player = Main.player[projectile.owner];
|
||||
if (Main.gameMenu || !player.active)
|
||||
return proj;
|
||||
|
||||
// Old Fashioned
|
||||
if (spawnSource is EntitySource_Parent parentSource)
|
||||
{
|
||||
Player player = Main.player[projectile.owner];
|
||||
if (Main.gameMenu || !player.active)
|
||||
return proj;
|
||||
// Parent-spawned projectiles involve 5 relevant sources: Buff, Item, NPC, Player, Projectile
|
||||
// 1. Buffs: Old Fashioned inherently does not affect them, they have no effect
|
||||
|
||||
// Do not apply Hellbound effects to minions not spawned by the item itself, if it came out of an item
|
||||
// This prevent minions like Luxor's Gift getting it, but minions spawned out of minions such as Temporal Umbrella will work fine
|
||||
if (spawnSource is EntitySource_ItemUse && player.ActiveItem().shoot != projectile.type)
|
||||
return proj;
|
||||
/* 2. Item: If detected to be from weapons, are assumedly debuffed
|
||||
*The criteria includes: A. has damage, B. has use animation, and C. came out of an item
|
||||
*This rules out items such as Bombs or Shield of Cthulhu (hypothetically were it to spawn projectiles)
|
||||
*This source is *not* from item use, but is still used for a multitude of purposes in weapons */
|
||||
if (parentSource.Entity is Item item && item.damage > 0 && item.useAnimation > 0)
|
||||
projectile.Calamity().buffedByOldFashioned = false;
|
||||
|
||||
// 3. NPCs: Not considered at all; no effect
|
||||
|
||||
// 4. Players: Only considered if the source owner matches the projectile's, otherwise no effect
|
||||
else if (parentSource.Entity is Player parentPlayer && parentPlayer.whoAmI == projectile.owner)
|
||||
{
|
||||
// 4A. The primary player-based source is item use, which follows the same logic as items (see above)
|
||||
// Edge case: Wulfrum Fusion Cannon is coded like a weapon. There may be a better way to approach this but an exclusion works for now
|
||||
if (spawnSource is EntitySource_ItemUse itemSource && itemSource.Item is Item usedItem
|
||||
&& usedItem.damage > 0 && usedItem.useAnimation > 0 && usedItem.type != ModContent.ItemType<WulfrumFusionCannon>())
|
||||
projectile.Calamity().buffedByOldFashioned = false;
|
||||
// 4B. Every non item-use source is assumed safe to buff
|
||||
else
|
||||
projectile.Calamity().buffedByOldFashioned = true;
|
||||
}
|
||||
|
||||
// 5. Projectiles: Directly inherited by its parent projectile
|
||||
else if (parentSource.Entity is Projectile parentProj)
|
||||
projectile.Calamity().buffedByOldFashioned = parentProj.Calamity().buffedByOldFashioned;
|
||||
}
|
||||
|
||||
// Hellbound Enchantment
|
||||
// This only applies to minions spawned by weapon uses, preventing other minions such as Luxor's Gift from exploding
|
||||
if (projectile.minion && spawnSource is EntitySource_ItemUse useSource && useSource.Item is Item weapon && weapon.useAnimation > 0)
|
||||
{
|
||||
CalamityPlayer.EnchantHeldItemEffects(player, player.Calamity(), player.ActiveItem());
|
||||
if (player.Calamity().explosiveMinionsEnchant)
|
||||
projectile.Calamity().ExplosiveEnchantCountdown = CalamityGlobalProjectile.ExplosiveEnchantTime;
|
||||
}
|
||||
// Minion shots inherit the "explode countdown" from the parent minion
|
||||
// This is only to inherit the damage scaling of the minion and does NOT mean the shot will explode too
|
||||
else if (ProjectileID.Sets.MinionShot[projectile.type])
|
||||
{
|
||||
// Going down the chain
|
||||
if (spawnSource is EntitySource_Parent trueSource && trueSource.Entity is Projectile parent)
|
||||
projectile.Calamity().ExplosiveEnchantCountdown = parent.Calamity().ExplosiveEnchantCountdown;
|
||||
}
|
||||
return proj;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Apply Old Fashioned Damage to Miscellanous Hits
|
||||
private static void ApplyOldFashionedDamageToMiscHits(Terraria.On_Player.orig_ApplyDamageToNPC orig, Player self, NPC npc, int damage, float knockback, int direction, bool crit = false, DamageClass? damageType = null, bool damageVariation = false)
|
||||
{
|
||||
if (self.Calamity().oldFashioned)
|
||||
damage = (int)(damage * OldFashioned.DamageBoostMultiplier);
|
||||
orig(self, npc, damage, knockback, direction, crit, damageType, damageVariation);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Chaos Stone and Chalice of the Blood God
|
||||
private static void ManaSicknessAndChaliceBufferHeal(ILContext il)
|
||||
{
|
||||
@@ -1889,8 +1937,8 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
drawColor = glowMaskTile.GlowMaskPaintInteraction switch
|
||||
{
|
||||
GlowMaskTile.PaintColorTint.OnlyByDeepPaint => GlowMaskTile.ApplyPaint(colType, drawColor, deepPaintOnly: true),
|
||||
GlowMaskTile.PaintColorTint.ByEveryPaint => GlowMaskTile.ApplyPaint(colType, drawColor, deepPaintOnly: false),
|
||||
GlowMaskTile.PaintColorTint.OnlyByDeepPaint => CalamityUtils.ApplyPaint(colType, drawColor, deepPaintOnly: true),
|
||||
GlowMaskTile.PaintColorTint.ByEveryPaint => CalamityUtils.ApplyPaint(colType, drawColor, deepPaintOnly: false),
|
||||
_ => drawColor
|
||||
};
|
||||
|
||||
|
||||
@@ -1103,6 +1103,33 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Remove NPC.damage Condition from Radar
|
||||
private static void RemoveDamageConditionFromRadar(ILContext il)
|
||||
{
|
||||
var cursor = new ILCursor(il);
|
||||
|
||||
Func<Instruction, bool>[] searchFor =
|
||||
[
|
||||
(x => x.MatchLdfld<NPC>(nameof(NPC.damage))),
|
||||
(x => x.MatchLdcI4(out var comp) && comp == 0),
|
||||
(x => x.MatchBle(out _)) //ble.s
|
||||
];
|
||||
|
||||
if (!cursor.TryGotoNext(MoveType.After, searchFor))
|
||||
{
|
||||
LogFailure("Radar Condition", "Unable to locate condition for NPC.damage > 0");
|
||||
return;
|
||||
}
|
||||
|
||||
// branch is used for exit condition. So setting ble.s opcode to nop will remove the condition
|
||||
cursor.Prev.OpCode = OpCodes.Nop;
|
||||
|
||||
// After that we pop NPC.damage and 0 from stack
|
||||
cursor.EmitPop();
|
||||
cursor.EmitPop();
|
||||
}
|
||||
#endregion
|
||||
|
||||
// 02JUN2024: Ozzatron: The below code is being kept in its initial state for historic value.
|
||||
#region Store The Stupid Fucking Private Wind Map In Public Property
|
||||
[/*TotallyNot*/Obsolete("This function serves no purpose and is included in the Calamity source code for historic value.", error: true)]
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace CalamityMod.Items.Accessories
|
||||
AddIngredient<LivingDew>().
|
||||
AddIngredient<RadiantOoze>().
|
||||
AddIngredient<LifeAlloy>(3).
|
||||
AddIngredient(ItemID.FragmentSolar, 6).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Items.Placeables.Crags;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -79,7 +79,6 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
spinningPoint *= 1.5f;
|
||||
dmgAmt = (int)player.GetBestClassDamage().ApplyTo(dmgAmt);
|
||||
dmgAmt = player.ApplyArmorAccDamageBonusesTo(dmgAmt);
|
||||
Projectile.NewProjectile(player.GetSource_FromThis(), player.Center, vector2, projectileType, dmgAmt, 0f, Main.myPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Items.Accessories
|
||||
if (Main.zenithWorld)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Items/Accessories/Calamity_GFB").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, Main.itemAnimations[Item.type].GetFrame(texture), lightColor, 0f, Vector2.Zero, 1f, 0, 0);
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, Main.itemAnimations[Type].GetFrame(texture), lightColor, 0f, Vector2.Zero, 1f, 0, 0);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -4,7 +4,7 @@ using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Items.Placeables.SunkenSea;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Items.Placeables.SunkenSea;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -38,9 +38,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.FireGauntlet).
|
||||
AddIngredient(ItemID.LunarBar, 8).
|
||||
AddIngredient<AscendantSpiritEssence>(4).
|
||||
AddIngredient<GalacticaSingularity>(4).
|
||||
AddTile<CosmicAnvil>().
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Items.Placeables.SunkenSea;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -40,9 +40,7 @@ namespace CalamityMod.Items.Accessories
|
||||
CreateRecipe().
|
||||
AddIngredient<SigilofCalamitas>().
|
||||
AddRecipeGroup("AnyManaFlower"). //Any mana flower accessory
|
||||
AddIngredient(ItemID.LunarBar, 8).
|
||||
AddIngredient<AscendantSpiritEssence>(4).
|
||||
AddIngredient<GalacticaSingularity>(4).
|
||||
AddTile<CosmicAnvil>().
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -44,13 +44,10 @@ namespace CalamityMod.Items.Accessories
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<CloudElementalMinion>()] < 1)
|
||||
{
|
||||
var source = player.GetSource_Accessory(Item);
|
||||
|
||||
// 08DEC2023: Ozzatron: Cloud Elementals spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
|
||||
int baseDamage = player.ApplyArmorAccDamageBonusesTo(45);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(45);
|
||||
|
||||
var p = Projectile.NewProjectileDirect(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<CloudElementalMinion>(), damage, 2f, Main.myPlayer, 0f, 0f);
|
||||
p.originalDamage = baseDamage;
|
||||
p.originalDamage = 45;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,6 @@ namespace CalamityMod.Items.Accessories
|
||||
float offsetAngle = (float)Math.PI * radialOffset;
|
||||
int type = ModContent.ProjectileType<FlameLickedHellblast>();
|
||||
int damage = (int)player.GetBestClassDamage().ApplyTo(200);
|
||||
damage = player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
@@ -73,7 +72,6 @@ namespace CalamityMod.Items.Accessories
|
||||
float radians2 = MathHelper.TwoPi / totalProjectiles;
|
||||
type = ModContent.ProjectileType<FlameLickedBarrage>();
|
||||
damage = (int)player.GetBestClassDamage().ApplyTo(70);
|
||||
damage = player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
double angleA = radians2 * 0.5;
|
||||
double angleB = MathHelper.ToRadians(90f) - angleA;
|
||||
|
||||
@@ -35,14 +35,11 @@ namespace CalamityMod.Items.Accessories
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<FungalClumpMinion>()] < 1)
|
||||
{
|
||||
var source = player.GetSource_Accessory(Item);
|
||||
|
||||
// 08DEC2023: Ozzatron: Fungal Clumps spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
|
||||
int baseDamage = player.ApplyArmorAccDamageBonusesTo(FungalClumpDamage);
|
||||
int damage = (int)player.GetBestClassDamage().ApplyTo(baseDamage);
|
||||
int damage = (int)player.GetBestClassDamage().ApplyTo(FungalClumpDamage);
|
||||
|
||||
int p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<FungalClumpMinion>(), damage, 1f, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
Main.projectile[p].originalDamage = baseDamage;
|
||||
Main.projectile[p].originalDamage = FungalClumpDamage;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,12 +59,11 @@ namespace CalamityMod.Items.Accessories
|
||||
var source = player.GetSource_Accessory(Item);
|
||||
|
||||
// 08DEC2023: Ozzatron: Fungal Clumps spawned with... Hold on a second. Why the fuck are we doing damage calculations when the accessory is in vanity?!
|
||||
int baseDamage = player.ApplyArmorAccDamageBonusesTo(FungalClumpDamage);
|
||||
int damage = (int)player.GetBestClassDamage().ApplyTo(baseDamage);
|
||||
int damage = (int)player.GetBestClassDamage().ApplyTo(FungalClumpDamage);
|
||||
|
||||
int p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<FungalClumpMinion>(), damage, 1f, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
Main.projectile[p].originalDamage = baseDamage;
|
||||
Main.projectile[p].originalDamage = FungalClumpDamage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace CalamityMod.Items.Accessories
|
||||
public class HeartoftheElements : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public static int ElementalDamage = 50;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 8));
|
||||
@@ -59,9 +61,7 @@ namespace CalamityMod.Items.Accessories
|
||||
var source = player.GetSource_Accessory(Item);
|
||||
Vector2 velocity = new Vector2(0f, -1f);
|
||||
|
||||
// 08DEC2023: Ozzatron: Elementals spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
|
||||
int baseDamage = player.ApplyArmorAccDamageBonusesTo(50);
|
||||
int elementalDmg = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
|
||||
int elementalDmg = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(ElementalDamage);
|
||||
|
||||
float kBack = 2f + player.GetKnockback<SummonDamageClass>().Additive;
|
||||
|
||||
@@ -81,31 +81,31 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
int p = Projectile.NewProjectile(source, player.Center, velocity, brimmy, elementalDmg, kBack, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
Main.projectile[p].originalDamage = baseDamage;
|
||||
Main.projectile[p].originalDamage = ElementalDamage;
|
||||
}
|
||||
if (player.ownedProjectileCounts[siren] < 1)
|
||||
{
|
||||
int p = Projectile.NewProjectile(source, player.Center, velocity, siren, elementalDmg, kBack, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
Main.projectile[p].originalDamage = baseDamage;
|
||||
Main.projectile[p].originalDamage = ElementalDamage;
|
||||
}
|
||||
if (player.ownedProjectileCounts[healer] < 1)
|
||||
{
|
||||
int p = Projectile.NewProjectile(source, player.Center, velocity, healer, elementalDmg, kBack, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
Main.projectile[p].originalDamage = baseDamage;
|
||||
Main.projectile[p].originalDamage = ElementalDamage;
|
||||
}
|
||||
if (player.ownedProjectileCounts[sandy] < 1)
|
||||
{
|
||||
int p = Projectile.NewProjectile(source, player.Center, velocity, sandy, elementalDmg, kBack, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
Main.projectile[p].originalDamage = baseDamage;
|
||||
Main.projectile[p].originalDamage = ElementalDamage;
|
||||
}
|
||||
if (player.ownedProjectileCounts[cloudy] < 1)
|
||||
{
|
||||
int p = Projectile.NewProjectile(source, player.Center, velocity, cloudy, elementalDmg, kBack, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
Main.projectile[p].originalDamage = baseDamage;
|
||||
Main.projectile[p].originalDamage = ElementalDamage;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,8 +126,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Vector2 velocity = new Vector2(0f, -1f);
|
||||
|
||||
// 08DEC2023: Ozzatron: Elementals spawned with... Hold on a second. Why the fuck are we doing damage calculations when the accessory is in vanity?!
|
||||
int baseDamage = player.ApplyArmorAccDamageBonusesTo(50);
|
||||
int elementalDmg = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
|
||||
int elementalDmg = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(ElementalDamage);
|
||||
|
||||
float kBack = 2f + player.GetKnockback<SummonDamageClass>().Additive;
|
||||
|
||||
@@ -147,31 +146,31 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
int p = Projectile.NewProjectile(source, player.Center, velocity, brimmy, elementalDmg, kBack, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
Main.projectile[p].originalDamage = baseDamage;
|
||||
Main.projectile[p].originalDamage = ElementalDamage;
|
||||
}
|
||||
if (player.ownedProjectileCounts[siren] < 1)
|
||||
{
|
||||
int p = Projectile.NewProjectile(source, player.Center, velocity, siren, elementalDmg, kBack, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
Main.projectile[p].originalDamage = baseDamage;
|
||||
Main.projectile[p].originalDamage = ElementalDamage;
|
||||
}
|
||||
if (player.ownedProjectileCounts[healer] < 1)
|
||||
{
|
||||
int p = Projectile.NewProjectile(source, player.Center, velocity, healer, elementalDmg, kBack, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
Main.projectile[p].originalDamage = baseDamage;
|
||||
Main.projectile[p].originalDamage = ElementalDamage;
|
||||
}
|
||||
if (player.ownedProjectileCounts[sandy] < 1)
|
||||
{
|
||||
int p = Projectile.NewProjectile(source, player.Center, velocity, sandy, elementalDmg, kBack, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
Main.projectile[p].originalDamage = baseDamage;
|
||||
Main.projectile[p].originalDamage = ElementalDamage;
|
||||
}
|
||||
if (player.ownedProjectileCounts[cloudy] < 1)
|
||||
{
|
||||
int p = Projectile.NewProjectile(source, player.Center, velocity, cloudy, elementalDmg, kBack, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
Main.projectile[p].originalDamage = baseDamage;
|
||||
Main.projectile[p].originalDamage = ElementalDamage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,12 +47,10 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
if (player.ownedProjectileCounts[ProjectileType<HowlsHeartHowl>()] < 1)
|
||||
{
|
||||
// 08DEC2023: Ozzatron: Howls spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
|
||||
int baseDamage = player.ApplyArmorAccDamageBonusesTo(HowlDamage);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(HowlDamage);
|
||||
|
||||
Projectile howl = Projectile.NewProjectileDirect(source, player.Center, -Vector2.UnitY, ProjectileType<HowlsHeartHowl>(), damage, 1f, player.whoAmI, 0f, 1f);
|
||||
howl.originalDamage = damage;
|
||||
howl.originalDamage = HowlDamage;
|
||||
}
|
||||
if (player.ownedProjectileCounts[ProjectileType<HowlsHeartCalcifer>()] < 1)
|
||||
{
|
||||
@@ -77,8 +75,7 @@ namespace CalamityMod.Items.Accessories
|
||||
if (player.ownedProjectileCounts[ProjectileType<HowlsHeartHowl>()] < 1)
|
||||
{
|
||||
// 08DEC2023: Ozzatron: Howls spawned with... Hold on a second. Why the fuck are we doing damage calculations when the accessory is in vanity?!
|
||||
int baseDamage = player.ApplyArmorAccDamageBonusesTo(HowlDamage);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(HowlDamage);
|
||||
|
||||
int p = Projectile.NewProjectile(source, player.Center, -Vector2.UnitY, ProjectileType<HowlsHeartHowl>(), damage, 1f, player.whoAmI, 0f, 1f);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
|
||||
@@ -37,12 +37,11 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
int baseDamage = player.ApplyArmorAccDamageBonusesTo(5);
|
||||
var source = player.GetSource_Accessory(Item);
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MarniteRepulsionHitbox>()] < 1)
|
||||
{
|
||||
var hitbox = Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, ModContent.ProjectileType<MarniteRepulsionHitbox>(), baseDamage, 12f, Main.myPlayer);
|
||||
hitbox.originalDamage = baseDamage;
|
||||
var hitbox = Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, ModContent.ProjectileType<MarniteRepulsionHitbox>(), 5, 12f, Main.myPlayer);
|
||||
hitbox.originalDamage = 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,9 +39,7 @@ namespace CalamityMod.Items.Accessories
|
||||
AddIngredient<RaidersTalisman>().
|
||||
AddIngredient<MoonstoneCrown>().
|
||||
AddIngredient<ElectriciansGlove>().
|
||||
AddIngredient(ItemID.LunarBar, 8).
|
||||
AddIngredient<AscendantSpiritEssence>(4).
|
||||
AddIngredient<GalacticaSingularity>(4).
|
||||
AddTile<CosmicAnvil>().
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -67,10 +67,9 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
var source = player.GetSource_Accessory(Item);
|
||||
int damage = (int)player.GetBestClassDamage().ApplyTo(250);
|
||||
damage = player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
float knockBack = 3f;
|
||||
|
||||
Projectile.NewProjectile(source, center.X, center.Y, 0f, 0f, ModContent.ProjectileType<NebulaStar>(), damage, knockBack, player.whoAmI);
|
||||
Projectile.NewProjectile(source, center, Vector2.Zero, ModContent.ProjectileType<NebulaStar>(), damage, knockBack, player.whoAmI);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,9 +48,7 @@ namespace CalamityMod.Items.Accessories
|
||||
CreateRecipe().
|
||||
AddIngredient<StarTaintedGenerator>().
|
||||
AddIngredient<StatisCurse>().
|
||||
AddIngredient(ItemID.LunarBar, 8).
|
||||
AddIngredient<AscendantSpiritEssence>(4).
|
||||
AddIngredient<GalacticaSingularity>(4).
|
||||
AddTile<CosmicAnvil>().
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@ namespace CalamityMod.Items.Accessories
|
||||
public class PearlofEnthrallment : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public static int ElementalDamage = 65;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 56;
|
||||
@@ -45,13 +47,11 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<WaterElementalMinion>()] < 1)
|
||||
{
|
||||
// 08DEC2023: Ozzatron: Anahitas spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
|
||||
int baseDamage = player.ApplyArmorAccDamageBonusesTo(65);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(ElementalDamage);
|
||||
|
||||
int anahita = Projectile.NewProjectile(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<WaterElementalMinion>(), damage, 2f, Main.myPlayer);
|
||||
if (Main.projectile.IndexInRange(anahita))
|
||||
Main.projectile[anahita].originalDamage = baseDamage;
|
||||
Main.projectile[anahita].originalDamage = ElementalDamage;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,12 +70,11 @@ namespace CalamityMod.Items.Accessories
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<WaterElementalMinion>()] < 1)
|
||||
{
|
||||
// 08DEC2023: Ozzatron: Anahitas spawned with... Hold on a second. Why the fuck are we doing damage calculations when the accessory is in vanity?!
|
||||
int baseDamage = player.ApplyArmorAccDamageBonusesTo(65);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(ElementalDamage);
|
||||
|
||||
int anahita = Projectile.NewProjectile(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<WaterElementalMinion>(), damage, 2f, Main.myPlayer);
|
||||
if (Main.projectile.IndexInRange(anahita))
|
||||
Main.projectile[anahita].originalDamage = baseDamage;
|
||||
Main.projectile[anahita].originalDamage = ElementalDamage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,9 +36,7 @@ namespace CalamityMod.Items.Accessories
|
||||
CreateRecipe().
|
||||
AddRecipeGroup("AnyQuiver").
|
||||
AddIngredient<DeadshotBrooch>().
|
||||
AddIngredient(ItemID.LunarBar, 8).
|
||||
AddIngredient<AscendantSpiritEssence>(4).
|
||||
AddIngredient<GalacticaSingularity>(4).
|
||||
AddTile<CosmicAnvil>().
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -311,7 +311,6 @@ namespace CalamityMod.Items.Accessories
|
||||
int separation = (i * 4) - 8;
|
||||
int spearBaseDamage = 350;
|
||||
int spearDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(spearBaseDamage);
|
||||
spearDamage = player.ApplyArmorAccDamageBonusesTo(spearDamage);
|
||||
|
||||
int proj = Projectile.NewProjectile(source, player.Center.X, player.Center.Y - separation, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), spearDamage, 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
@@ -328,7 +327,6 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
int spearBaseDamage = 250;
|
||||
int spearDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(spearBaseDamage);
|
||||
spearDamage = player.ApplyArmorAccDamageBonusesTo(spearDamage);
|
||||
|
||||
int proj = Projectile.NewProjectile(source, player.Center, correctedVelocity * 14f, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), spearDamage, 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f, 1f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
@@ -354,7 +352,6 @@ namespace CalamityMod.Items.Accessories
|
||||
int projType = isSmallBoomer ? isThiccBoomer ? 1 : 2 : 3;
|
||||
int boomBaseDamage = 200;
|
||||
int boomDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(boomBaseDamage);
|
||||
boomDamage = player.ApplyArmorAccDamageBonusesTo(boomDamage);
|
||||
|
||||
switch (projType)
|
||||
{
|
||||
@@ -409,7 +406,6 @@ namespace CalamityMod.Items.Accessories
|
||||
int sickPenalty = (int)(mageFireDamage * (0.05f * ((player.buffTime[player.FindBuffIndex(BuffID.ManaSickness)] + 60) / 60)));
|
||||
mageFireDamage -= sickPenalty;
|
||||
}
|
||||
mageFireDamage = player.ApplyArmorAccDamageBonusesTo(mageFireDamage);
|
||||
|
||||
int proj = Projectile.NewProjectile(source, player.position, correctedVelocity, ModContent.ProjectileType<ProfanedCrystalMageFireball>(), mageFireDamage, 1f, player.whoAmI, empowered ? 1f : 0f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
@@ -437,7 +433,6 @@ namespace CalamityMod.Items.Accessories
|
||||
float angle = MathHelper.TwoPi / crystalCount * i;
|
||||
int shardBaseDamage = 176;
|
||||
int shardDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(shardBaseDamage);
|
||||
shardDamage = player.ApplyArmorAccDamageBonusesTo(shardDamage);
|
||||
|
||||
int proj = Projectile.NewProjectile(source, player.Center, angle.ToRotationVector2() * 12f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), shardDamage, 1f, player.whoAmI, 0f, 0f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
@@ -455,7 +450,6 @@ namespace CalamityMod.Items.Accessories
|
||||
int totalShardProjectiles = empowered ? 360 / 5 : 360 / 10;
|
||||
int shardBaseDamage = empowered ? 125 : 220;
|
||||
int shardDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(shardBaseDamage);
|
||||
shardDamage = player.ApplyArmorAccDamageBonusesTo(shardDamage);
|
||||
|
||||
float interval = totalShardProjectiles / chains * (empowered ? 5f : 10f);
|
||||
double patternInterval = Math.Floor(player.Calamity().profanedSoulWeaponUsage / interval);
|
||||
@@ -495,7 +489,6 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
int whipBaseDamage = 250;
|
||||
int whipDamage = (int)player.GetTotalDamage<SummonMeleeSpeedDamageClass>().ApplyTo(whipBaseDamage);
|
||||
whipDamage = player.ApplyArmorAccDamageBonusesTo(whipDamage);
|
||||
|
||||
var buffed = player.HasBuff<ProfanedCrystalWhipBuff>();
|
||||
correctedVelocity *= buffed ? 10f : 8f;
|
||||
|
||||
@@ -32,14 +32,17 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.voidField = true;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<VoidFieldGenerator>()] >= 4)
|
||||
return;
|
||||
|
||||
var source = player.GetSource_Accessory(Item);
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<VoidFieldGenerator>()] < 4)
|
||||
int count = player.ownedProjectileCounts[ModContent.ProjectileType<VoidFieldGenerator>()];
|
||||
do
|
||||
{
|
||||
for (int v = 0; v < 4; v++)
|
||||
{
|
||||
Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, ModContent.ProjectileType<VoidFieldGenerator>(), 0, 0f, Main.myPlayer, v);
|
||||
}
|
||||
Projectile.NewProjectile(source, player.Center, Vector2.Zero, ModContent.ProjectileType<VoidFieldGenerator>(), 0, 0f, Main.myPlayer, count);
|
||||
count++;
|
||||
}
|
||||
while (count < 4);
|
||||
}
|
||||
}
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace CalamityMod.Items.Accessories
|
||||
public class RoseStone : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public static int ElementalDamage = 60;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 20;
|
||||
@@ -44,12 +46,11 @@ namespace CalamityMod.Items.Accessories
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrimstoneElementalMinion>()] < 1)
|
||||
{
|
||||
// 08DEC2023: Ozzatron: Brimstone Elementals spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
|
||||
int baseDamage = player.ApplyArmorAccDamageBonusesTo(60);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(ElementalDamage);
|
||||
|
||||
int p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<BrimstoneElementalMinion>(), damage, 2f, Main.myPlayer, 0f, 0f);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
Main.projectile[p].originalDamage = baseDamage;
|
||||
Main.projectile[p].originalDamage = ElementalDamage;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -68,12 +69,11 @@ namespace CalamityMod.Items.Accessories
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrimstoneElementalMinion>()] < 1)
|
||||
{
|
||||
// 08DEC2023: Ozzatron: Brimstone Elementals spawned with... Hold on a second. Why the fuck are we doing damage calculations when the accessory is in vanity?!
|
||||
int baseDamage = player.ApplyArmorAccDamageBonusesTo(60);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(ElementalDamage);
|
||||
|
||||
int p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<BrimstoneElementalMinion>(), damage, 2f, Main.myPlayer, 0f, 0f);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
Main.projectile[p].originalDamage = baseDamage;
|
||||
Main.projectile[p].originalDamage = ElementalDamage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
|
||||
// Allows item to be extractinated and specifies custom behavior instead of copying an existing item
|
||||
public override void SetStaticDefaults() => ItemID.Sets.ExtractinatorMode[Item.type] = Item.type;
|
||||
public override void SetStaticDefaults() => ItemID.Sets.ExtractinatorMode[Type] = Item.type;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ExtractinatorMode[Item.type] = Item.type;
|
||||
ItemID.Sets.ExtractinatorMode[Type] = Item.type;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Items.Placeables.Crags;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Accessories
|
||||
AddIngredient(ItemID.PygmyNecklace).
|
||||
AddIngredient(ItemID.SummonerEmblem).
|
||||
AddIngredient(ItemID.HolyWater, 30).
|
||||
AddIngredient<CoreofSunlight>(5).
|
||||
AddIngredient<EssenceofSunlight>(5).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Items.Placeables.SunkenSea;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace CalamityMod.Items.Accessories
|
||||
if (npc.IsAnEnemy() && !npc.dontTakeDamage && Vector2.Distance(player.Center, npc.Center) <= range)
|
||||
{
|
||||
int campingFireDamage = (int)player.GetBestClassDamage().ApplyTo(Main.rand.Next(20, 41));
|
||||
Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), campingFireDamage, 0f, player.whoAmI, npc.whoAmI);
|
||||
Projectile.NewProjectile(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), campingFireDamage, 0f, player.whoAmI, npc.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace CalamityMod.Items.Accessories
|
||||
if (Texture == "CalamityMod/Items/Accessories/TheSponge")
|
||||
{
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Items/Accessories/TheSpongeShield").Value;
|
||||
spriteBatch.Draw(tex, Item.Center - Main.screenPosition + new Vector2(0f, 0f), Main.itemAnimations[Item.type].GetFrame(tex), Color.Cyan * 0.5f, 0f, new Vector2(tex.Width / 2f, (tex.Height / 30f) * 0.8f), 1f, SpriteEffects.None, 0);
|
||||
spriteBatch.Draw(tex, Item.Center - Main.screenPosition + new Vector2(0f, 0f), Main.itemAnimations[Type].GetFrame(tex), Color.Cyan * 0.5f, 0f, new Vector2(tex.Width / 2f, (tex.Height / 30f) * 0.8f), 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace CalamityMod.Items.Accessories
|
||||
spriteBatch,
|
||||
texture: tex,
|
||||
position,
|
||||
Main.itemAnimations[Item.type].GetFrame(tex),
|
||||
Main.itemAnimations[Type].GetFrame(tex),
|
||||
Color.Cyan * 0.4f,
|
||||
itemColor,
|
||||
origin,
|
||||
|
||||
@@ -33,7 +33,6 @@ namespace CalamityMod.Items.Accessories
|
||||
if (player.miscCounter % 10 == 0)
|
||||
{
|
||||
int damage = (int)player.GetBestClassDamage().ApplyTo(30);
|
||||
damage = player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<StandingFire>(), damage, 5f, player.whoAmI);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<Abaddon>().
|
||||
AddIngredient<CoreofHavoc>().
|
||||
AddIngredient<ScoriaBar>(3).
|
||||
AddIngredient<CoreofCalamity>().
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -49,12 +49,10 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalMinion>()] < 1)
|
||||
{
|
||||
// 08DEC2023: Ozzatron: Sand Elementals spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
|
||||
int baseDamage = player.ApplyArmorAccDamageBonusesTo(ElementalDamage);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(ElementalDamage);
|
||||
|
||||
var p = Projectile.NewProjectileDirect(player.GetSource_Accessory(Item), player.Center, -Vector2.UnitY, ModContent.ProjectileType<SandElementalMinion>(), damage, 2f, Main.myPlayer);
|
||||
p.originalDamage = baseDamage;
|
||||
p.originalDamage = ElementalDamage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@ namespace CalamityMod.Items.Accessories
|
||||
public class WifeinaBottlewithBoobs : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
// Hold on... isn't this the HEALER elemental??
|
||||
public static int ElementalDamage = 45;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 20;
|
||||
@@ -44,13 +48,10 @@ namespace CalamityMod.Items.Accessories
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalHealer>()] < 1)
|
||||
{
|
||||
var source = player.GetSource_Accessory(Item);
|
||||
|
||||
// 08DEC2023: Ozzatron: Rare Sand Elementals spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
|
||||
int baseDamage = player.ApplyArmorAccDamageBonusesTo(45);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(ElementalDamage);
|
||||
|
||||
Projectile sandy = Projectile.NewProjectileDirect(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<SandElementalHealer>(), damage, 2f, Main.myPlayer, 0f, 0f);
|
||||
sandy.originalDamage = baseDamage;
|
||||
sandy.originalDamage = ElementalDamage;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,11 +71,10 @@ namespace CalamityMod.Items.Accessories
|
||||
var source = player.GetSource_Accessory(Item);
|
||||
|
||||
// 08DEC2023: Ozzatron: Rare Sand Elementals spawned with... Hold on a second. Why the fuck are we doing damage calculations when the accessory is in vanity?!
|
||||
int baseDamage = player.ApplyArmorAccDamageBonusesTo(45);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
|
||||
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(ElementalDamage);
|
||||
|
||||
Projectile sandy = Projectile.NewProjectileDirect(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<SandElementalHealer>(), damage, 2f, Main.myPlayer, 0f, 0f);
|
||||
sandy.originalDamage = baseDamage;
|
||||
sandy.originalDamage = ElementalDamage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Items.Armor.Empyrean;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Items.Armor.Empyrean;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -33,8 +34,7 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
{
|
||||
if (player.armor[0].type == ModContent.ItemType<EmpyreanMask>() && player.armor[1].type == ModContent.ItemType<EmpyreanCloak>() && player.armor[2].type == ModContent.ItemType<EmpyreanCuisses>())
|
||||
{
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.05f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 5;
|
||||
player.AddBuff(ModContent.BuffType<EmpyreanWrath>(), 2);
|
||||
}
|
||||
|
||||
if (player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
|
||||
|
||||
@@ -30,14 +30,6 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
if ((player.armor[0].type == ModContent.ItemType<HydrothermicHeadRanged>() || player.armor[0].type == ModContent.ItemType<HydrothermicHeadMelee>() ||
|
||||
player.armor[0].type == ModContent.ItemType<HydrothermicHeadSummon>() || player.armor[0].type == ModContent.ItemType<HydrothermicHeadRogue>() ||
|
||||
player.armor[0].type == ModContent.ItemType<HydrothermicHeadMagic>()) &&
|
||||
player.armor[1].type == ModContent.ItemType<HydrothermicArmor>() && player.armor[2].type == ModContent.ItemType<HydrothermicSubligar>())
|
||||
{
|
||||
player.GetDamage<GenericDamageClass>() += 0.05f;
|
||||
}
|
||||
|
||||
if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual)
|
||||
{
|
||||
int dustXOffset = 4;
|
||||
|
||||