Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into 1.4.4
No files matched your search
@@ -36,9 +36,9 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
if (Main.rand.NextBool(4) && drawInfo.shadow == 0f)
|
||||
{
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Calamity().RandomDebuffVisualSpot, Vector2.Zero, Main.rand.NextBool(2) ? Color.DarkTurquoise : Color.Coral, new Vector2(1, 1), 0, 0.08f, 0f, 20);
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Calamity().RandomDebuffVisualSpot, Vector2.Zero, Main.rand.NextBool() ? Color.DarkTurquoise : Color.Coral, new Vector2(1, 1), 0, 0.08f, 0f, 20);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
Particle orb = new GenericBloom(Player.Calamity().RandomDebuffVisualSpot, Vector2.Zero, Main.rand.NextBool(2) ? Color.DarkTurquoise : Color.Coral, 0.055f, 8);
|
||||
Particle orb = new GenericBloom(Player.Calamity().RandomDebuffVisualSpot, Vector2.Zero, Main.rand.NextBool() ? Color.DarkTurquoise : Color.Coral, 0.055f, 8);
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
}
|
||||
}
|
||||
@@ -49,9 +49,9 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
|
||||
Vector2 npcSize2 = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, Main.rand.NextBool(2) ? Color.DarkTurquoise : Color.Coral, new Vector2(1, 1), 0, 0.1f + (0.0000007f * npc.width * npc.height), 0f, 20);
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, Main.rand.NextBool() ? Color.DarkTurquoise : Color.Coral, new Vector2(1, 1), 0, 0.1f + (0.0000007f * npc.width * npc.height), 0f, 20);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
Particle orb = new GenericBloom(npcSize2, Vector2.Zero, Main.rand.NextBool(2) ? Color.DarkTurquoise : Color.Coral, 0.065f + (0.0000007f * npc.width * npc.height), 8);
|
||||
Particle orb = new GenericBloom(npcSize2, Vector2.Zero, Main.rand.NextBool() ? Color.DarkTurquoise : Color.Coral, 0.065f + (0.0000007f * npc.width * npc.height), 8);
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
dust.noGravity = true;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Dust dust2 = Dust.NewDustPerfect(Player.Center + new Vector2(Main.rand.NextFloat(-10f, 10f), 19), Main.rand.NextBool(2) ? 90 : ModContent.DustType<BrimstoneFlame>(), new Vector2(Main.rand.NextFloat(-4f, 4f), Main.rand.NextFloat(-1f, -3f)) + Player.velocity, 0, default, hasDebuffResistance ? 0.4f : 1.4f);
|
||||
Dust dust2 = Dust.NewDustPerfect(Player.Center + new Vector2(Main.rand.NextFloat(-10f, 10f), 19), Main.rand.NextBool() ? 90 : ModContent.DustType<BrimstoneFlame>(), new Vector2(Main.rand.NextFloat(-4f, 4f), Main.rand.NextFloat(-1f, -3f)) + Player.velocity, 0, default, hasDebuffResistance ? 0.4f : 1.4f);
|
||||
dust2.noGravity = true;
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
dust.scale = 1.6f;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Dust dust2 = Dust.NewDustDirect(npc.position + new Vector2(Main.rand.NextFloat(-10f, 10f), npc.height / 2), npc.width, npc.height, Main.rand.NextBool(2) ? 90 : ModContent.DustType<BrimstoneFlame>());
|
||||
Dust dust2 = Dust.NewDustDirect(npc.position + new Vector2(Main.rand.NextFloat(-10f, 10f), npc.height / 2), npc.width, npc.height, Main.rand.NextBool() ? 90 : ModContent.DustType<BrimstoneFlame>());
|
||||
dust2.noGravity = true;
|
||||
dust2.velocity = new Vector2(Main.rand.NextFloat(-4f, 4f), Main.rand.NextFloat(-1f, -3f)) + npc.velocity;
|
||||
dust2.scale = 1.4f;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
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));
|
||||
SparkParticle spark = new SparkParticle(npcSize, new Vector2(0, Main.rand.NextFloat(-5f, 5f)), false, Main.rand.Next(11, 13), Main.rand.NextFloat(0.2f, 0.5f), Main.rand.NextBool(7) ? Color.Aqua : Color.Fuchsia);
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
if (Main.rand.NextBool(hasDebuffResistance ? 4 : 2) && drawInfo.shadow == 0f)
|
||||
{
|
||||
Vector2 Vect = new Vector2(0f, Main.rand.NextBool(4) ? -5f : -9f).RotatedByRandom(MathHelper.ToRadians(25f)) * Main.rand.NextFloat(0.1f, 1.9f);
|
||||
CritSpark spark = new CritSpark(Player.Calamity().RandomDebuffVisualSpot, Vect, Main.rand.NextBool(2) ? Color.Coral : Color.OrangeRed, Color.Orange, (hasDebuffResistance ? 0.4f : 0.8f), 15, 2f, 1.9f);
|
||||
CritSpark spark = new CritSpark(Player.Calamity().RandomDebuffVisualSpot, Vect, Main.rand.NextBool() ? Color.Coral : Color.OrangeRed, Color.Orange, (hasDebuffResistance ? 0.4f : 0.8f), 15, 2f, 1.9f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
|
||||
Vector2 Vect = new Vector2(0f, Main.rand.NextBool(4) ? -5f : -9f).RotatedByRandom(MathHelper.ToRadians(25f)) * Main.rand.NextFloat(0.1f, 1.9f);
|
||||
CritSpark spark = new CritSpark(npcSize, Vect, Main.rand.NextBool(2) ? Color.Coral : Color.OrangeRed, Color.Orange, 0.8f, 15, 2f, 1.9f);
|
||||
CritSpark spark = new CritSpark(npcSize, Vect, Main.rand.NextBool() ? Color.Coral : Color.OrangeRed, Color.Orange, 0.8f, 15, 2f, 1.9f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
if (Main.rand.NextBool(hasDebuffResistance ? 4 : 2) && drawInfo.shadow == 0f)
|
||||
{
|
||||
Vector2 Vect = new Vector2(0f, Main.rand.NextBool(4) ? -5f : -9f).RotatedByRandom(MathHelper.ToRadians(25f)) * Main.rand.NextFloat(0.1f, 1.9f);
|
||||
CritSpark spark = new CritSpark(Player.Calamity().RandomDebuffVisualSpot, Vect, Main.rand.NextBool(2) ? Color.Cyan : Color.DarkBlue, Color.DodgerBlue, (hasDebuffResistance ? 0.4f : 0.8f), 15, 2f, 1.9f);
|
||||
CritSpark spark = new CritSpark(Player.Calamity().RandomDebuffVisualSpot, Vect, Main.rand.NextBool() ? Color.Cyan : Color.DarkBlue, Color.DodgerBlue, (hasDebuffResistance ? 0.4f : 0.8f), 15, 2f, 1.9f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
for (int i = 0; i < (hasDebuffResistance ? 1 : 2); i++)
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Vector2 Vect = new Vector2(0f, Main.rand.NextBool(4) ? -5f : -9f).RotatedByRandom(MathHelper.ToRadians(25f)) * Main.rand.NextFloat(0.1f, 1.9f);
|
||||
CritSpark spark = new CritSpark(npcSize, Vect, Main.rand.NextBool(2) ? Color.Cyan : Color.DarkBlue, Color.DodgerBlue, 0.8f, 15, 2f, 1.9f);
|
||||
CritSpark spark = new CritSpark(npcSize, Vect, Main.rand.NextBool() ? Color.Cyan : Color.DarkBlue, Color.DodgerBlue, 0.8f, 15, 2f, 1.9f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
for (int i = 0; i < 2; i++)
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
}
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Calamity().RandomDebuffVisualSpot, new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-3f, -4f)), Main.rand.NextBool(2) ? Color.OliveDrab : Color.GreenYellow, new Vector2(0.8f, 1), 0, 0.09f, 0f, 45);
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Calamity().RandomDebuffVisualSpot, new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-3f, -4f)), Main.rand.NextBool() ? Color.OliveDrab : Color.GreenYellow, new Vector2(0.8f, 1), 0, 0.09f, 0f, 45);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
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, 298, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.2f + +(0.000003f * npc.width * npc.height));
|
||||
@@ -69,9 +69,9 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.4f;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-4.5f, -6f)), Main.rand.NextBool(2) ? Color.OliveDrab : Color.GreenYellow, new Vector2(0.8f, 1), 0, 0.12f + (0.0000007f * npc.width * npc.height), 0f, 45);
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-4.5f, -6f)), Main.rand.NextBool() ? Color.OliveDrab : Color.GreenYellow, new Vector2(0.8f, 1), 0, 0.12f + (0.0000007f * npc.width * npc.height), 0f, 45);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -30,21 +31,18 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
Player player = Main.player[Main.myPlayer];
|
||||
if (player.Calamity().profanedCrystalBuffs)
|
||||
{
|
||||
if (player.Calamity().endoCooper)
|
||||
bool empowered = player.Calamity().pscState == (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Empowered;
|
||||
if (empowered)
|
||||
{
|
||||
tip = this.GetLocalizedValue("NerfedEndo");
|
||||
}
|
||||
else if (player.Calamity().magicHat)
|
||||
{
|
||||
tip = this.GetLocalizedValue("NerfedHat");
|
||||
tip += "\n" + this.GetLocalizedValue("Empowered");
|
||||
}
|
||||
else
|
||||
{
|
||||
bool offense = (Main.dayTime && !player.wet) || player.lavaWet;
|
||||
tip += "\n" + (offense ? this.GetLocalization("Offense").Format(this.GetLocalizedValue(player.lavaWet ? "Lava" : "Day"))
|
||||
: this.GetLocalization("Defense").Format(this.GetLocalizedValue(player.honeyWet ? "Honey" : (player.wet ? "Water" : "Night"))));
|
||||
: this.GetLocalization("Defense").Format(this.GetLocalizedValue(player.honeyWet ? "Honey" : (player.wet ? "Water" : "Night"))));
|
||||
|
||||
if (player.statLife <= (int)(player.statLifeMax2 * 0.5))
|
||||
if (!Main.dayTime)
|
||||
tip += "\n" + this.GetLocalizedValue("Enrage");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,10 +54,10 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
modPlayer.ragePulseTimer++;
|
||||
int dustID = modPlayer.heartOfDarkness ? 240 : 114;
|
||||
|
||||
if (modPlayer.shatteredCommunity && Main.rand.NextBool(2))
|
||||
if (modPlayer.shatteredCommunity && Main.rand.NextBool())
|
||||
dustID = 112; //special dust visual for Shattered Community
|
||||
|
||||
if (modPlayer.heartOfDarkness && !modPlayer.shatteredCommunity && Main.rand.NextBool(2))
|
||||
if (modPlayer.heartOfDarkness && !modPlayer.shatteredCommunity && Main.rand.NextBool())
|
||||
dustID = 90; //special dust visual for Heart of Darkness
|
||||
|
||||
if (modPlayer.ragePulseTimer == 60)
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
using static CalamityMod.Items.Accessories.ProfanedSoulCrystal;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon.Whips
|
||||
{
|
||||
public class ProfanedCrystalWhipBuff : ModBuff
|
||||
{
|
||||
public override string Texture => "CalamityMod/Buffs/Summon/Whips/SentinalLash";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void ModifyBuffText(ref string buffName, ref string tip, ref int rare)
|
||||
{
|
||||
Player player = Main.player[Main.myPlayer];
|
||||
bool empowered = player.Calamity().pscState == (int)ProfanedSoulCrystalState.Empowered;
|
||||
if (empowered)
|
||||
{
|
||||
tip += "\n" + this.GetLocalizedValue("Empowered");
|
||||
}
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
if (player.Calamity().profanedCrystalStatePrevious < (int)ProfanedSoulCrystalState.Buffs)
|
||||
{
|
||||
player.ClearBuff(Type);
|
||||
return;
|
||||
}
|
||||
|
||||
var whipBuffs = new int[]
|
||||
{
|
||||
BuffID.CoolWhipPlayerBuff, BuffID.ScytheWhipPlayerBuff, BuffID.SwordWhipPlayerBuff,
|
||||
BuffID.ThornWhipPlayerBuff
|
||||
};
|
||||
|
||||
foreach (int buff in whipBuffs)
|
||||
{
|
||||
player.ClearBuff(buff);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.NPCs;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon.Whips
|
||||
{
|
||||
public class ProfanedCrystalWhipDebuff : ModBuff
|
||||
{
|
||||
public override string Texture => "CalamityMod/Buffs/Summon/Whips/SentinalLash";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
BuffID.Sets.IsAnNPCWhipDebuff[Type] = true;
|
||||
Main.debuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
// var whipBuffs = new int[]
|
||||
// {
|
||||
// BuffID.BlandWhipEnemyDebuff, BuffID.FlameWhipEnemyDebuff, BuffID.BoneWhipNPCDebuff,
|
||||
// BuffID.ScytheWhipEnemyDebuff, BuffID.CoolWhipNPCDebuff, BuffID.MaceWhipNPCDebuff,
|
||||
// BuffID.RainbowWhipNPCDebuff, BuffID.SwordWhipNPCDebuff, BuffID.ThornWhipNPCDebuff
|
||||
// };
|
||||
|
||||
//kill whip stacking for psc purposes
|
||||
for (int buff = 0; buff < NPC.maxBuffs; buff++)
|
||||
{
|
||||
if(npc.buffTime[buff] > 0 && BuffID.Sets.IsAnNPCWhipDebuff[npc.buffType[buff]] && npc.buffType[buff] != Type)
|
||||
npc.RequestBuffRemoval(npc.buffType[buff]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 693 B |
@@ -1066,12 +1066,14 @@ namespace CalamityMod.CalPlayer
|
||||
public bool abyssalDivingSuitForce;
|
||||
public bool abyssalDivingSuitPower;
|
||||
public bool profanedCrystal;
|
||||
public bool profanedCrystalPrevious;
|
||||
public int profanedCrystalStatePrevious;
|
||||
public bool profanedCrystalForce;
|
||||
public bool profanedCrystalBuffs;
|
||||
public bool profanedCrystalHide;
|
||||
public KeyValuePair<int, int> profanedCrystalWingCounter = new KeyValuePair<int, int>(0, 10);
|
||||
public KeyValuePair<int, int> profanedCrystalAnimCounter = new KeyValuePair<int, int>(0, 10);
|
||||
public int pscState;
|
||||
public Color pscLerpColor = Color.White;
|
||||
public bool aquaticHeartPrevious;
|
||||
public bool aquaticHeart;
|
||||
public bool aquaticHeartHide;
|
||||
@@ -2081,8 +2083,10 @@ namespace CalamityMod.CalPlayer
|
||||
aquaticHeartPrevious = aquaticHeart;
|
||||
aquaticHeart = aquaticHeartHide = aquaticHeartForce = aquaticHeartPower = false;
|
||||
|
||||
profanedCrystalPrevious = profanedCrystal;
|
||||
profanedCrystalStatePrevious = pscState;
|
||||
profanedCrystal = profanedCrystalBuffs = profanedCrystalForce = profanedCrystalHide = false;
|
||||
pscState = 0;
|
||||
pscLerpColor = Color.White;
|
||||
|
||||
snowmanPrevious = snowman;
|
||||
snowman = snowmanHide = snowmanForce = snowmanPower = false;
|
||||
@@ -3082,7 +3086,7 @@ namespace CalamityMod.CalPlayer
|
||||
for (int i = 0; i < dustPerSegment; ++i)
|
||||
{
|
||||
bool electricity = Main.rand.NextBool(4);
|
||||
int dustID = electricity ? (Main.rand.NextBool(2) ? 132 : 131) : ModContent.DustType<AdrenDust>();
|
||||
int dustID = electricity ? (Main.rand.NextBool() ? 132 : 131) : ModContent.DustType<AdrenDust>();
|
||||
|
||||
float interpolant = i + 0.5f;
|
||||
float spreadSpeed = Main.rand.NextFloat(0.5f, maxDustVelSpread);
|
||||
@@ -3265,7 +3269,7 @@ namespace CalamityMod.CalPlayer
|
||||
Main.dust[idx].velocity *= 2f;
|
||||
Main.dust[idx].scale *= 1.2f;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
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);
|
||||
@@ -4050,18 +4054,18 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
else if ((profanedCrystal || profanedCrystalForce) && !profanedCrystalHide)
|
||||
{
|
||||
Player.legs = EquipLoader.GetEquipSlot(Mod, "ProfanedSoulCrystal", EquipType.Legs);
|
||||
Player.legs = EquipLoader.GetEquipSlot(Mod, Main.dayTime ? "ProfanedSoulCrystal" : "PscNightLegs", EquipType.Legs);
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "ProfanedSoulCrystal", EquipType.Body);
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, "ProfanedSoulCrystal", EquipType.Head);
|
||||
Player.wings = EquipLoader.GetEquipSlot(Mod, "ProfanedSoulCrystal", EquipType.Wings);
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, Main.dayTime ? "ProfanedSoulCrystal" : "PscNightHead", EquipType.Head);
|
||||
Player.wings = EquipLoader.GetEquipSlot(Mod, Main.dayTime ? "ProfanedSoulCrystal" : "PscNightWings", EquipType.Wings);
|
||||
Player.face = -1;
|
||||
|
||||
bool enrage = !profanedCrystalForce && profanedCrystalBuffs && Player.statLife <= (int)(Player.statLifeMax2 * 0.5);
|
||||
bool enrage = pscState >= (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Enraged;
|
||||
|
||||
if (profanedCrystalWingCounter.Value == 0)
|
||||
{
|
||||
int key = profanedCrystalWingCounter.Key;
|
||||
profanedCrystalWingCounter = new KeyValuePair<int, int>(key == 3 ? 0 : key + 1, enrage ? 5 : 7);
|
||||
profanedCrystalWingCounter = new KeyValuePair<int, int>(key == 3 ? 0 : key + 1, enrage ? 5 : 8);
|
||||
}
|
||||
|
||||
Player.wingFrame = profanedCrystalWingCounter.Key;
|
||||
@@ -4707,7 +4711,7 @@ namespace CalamityMod.CalPlayer
|
||||
for (int x = 0; x < numSpears; x++)
|
||||
{
|
||||
float angle = MathHelper.TwoPi / numSpears * x;
|
||||
int proj = Projectile.NewProjectile(source, Main.projectile[i].Center, angle.ToRotationVector2().RotatedBy(Math.Atan(-45f)) * 8f, ModContent.ProjectileType<MiniGuardianSpear>(), dam, 0f, Player.whoAmI, 0f, 0f);
|
||||
int proj = Projectile.NewProjectile(source, Main.projectile[i].Center, angle.ToRotationVector2().RotatedBy(Math.Atan(-45f)) * 8f, ModContent.ProjectileType<MiniGuardianSpear>(), dam, 0f, Player.whoAmI, pscState, 0f);
|
||||
Main.projectile[proj].originalDamage = dam;
|
||||
}
|
||||
spearsFired++;
|
||||
@@ -4756,7 +4760,9 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
public override void PostUpdate() //needs to be here else it doesn't work properly, otherwise i'd have stuck it with the wing anim stuffs
|
||||
{
|
||||
if (!profanedCrystalHide && (profanedCrystal || profanedCrystalForce) && Player.legs == EquipLoader.GetEquipSlot(Mod, "ProfanedSoulCrystal", EquipType.Legs))
|
||||
bool validEquipSlot = Player.legs == EquipLoader.GetEquipSlot(Mod, "ProfanedSoulCrystal", EquipType.Legs) ||
|
||||
Player.legs == EquipLoader.GetEquipSlot(Mod, "PscNightLegs", EquipType.Legs);
|
||||
if (!profanedCrystalHide && (profanedCrystal || profanedCrystalForce) && validEquipSlot)
|
||||
{
|
||||
bool usingCarpet = Player.carpetTime > 0 && Player.controlJump; //doesn't make sense for carpet to use jump frame since you have solid ground
|
||||
AnimationType animType = AnimationType.Walk;
|
||||
@@ -4836,7 +4842,7 @@ namespace CalamityMod.CalPlayer
|
||||
public override void OnConsumeMana(Item item, int manaConsumed)
|
||||
{
|
||||
CalamityPlayer modPlayer = Player.Calamity();
|
||||
if (Main.rand.NextBool(2) && modPlayer.lifeManaEnchant)
|
||||
if (Main.rand.NextBool() && modPlayer.lifeManaEnchant)
|
||||
{
|
||||
if (Main.myPlayer == Player.whoAmI)
|
||||
{
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (!Player.StandingStill() && !Player.mount.Active)
|
||||
{
|
||||
if (Main.rand.NextBool(2) && drawInfo.shadow == 0f)
|
||||
if (Main.rand.NextBool() && drawInfo.shadow == 0f)
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 229, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
@@ -140,7 +140,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (!Player.StandingStill() && !Player.mount.Active)
|
||||
{
|
||||
if (Main.rand.NextBool(2) && drawInfo.shadow == 0f)
|
||||
if (Main.rand.NextBool() && drawInfo.shadow == 0f)
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 246, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
@@ -160,7 +160,7 @@ namespace CalamityMod.CalPlayer
|
||||
Lighting.AddLight((int)Player.Center.X / 16, (int)Player.Center.Y / 16, 100 / 235f, 1 / 235f, 250 / 235f);
|
||||
if (!Player.StandingStill() && !Player.mount.Active)
|
||||
{
|
||||
if (Main.rand.NextBool(2) && drawInfo.shadow == 0f)
|
||||
if (Main.rand.NextBool() && drawInfo.shadow == 0f)
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 27, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.5f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
@@ -191,7 +191,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.rand.NextBool(8) && drawInfo.shadow == 0f)
|
||||
{
|
||||
int de_dust2 = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, Main.rand.NextBool(2) ? 204 : 213, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.5f);
|
||||
int de_dust2 = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, Main.rand.NextBool() ? 204 : 213, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.5f);
|
||||
Main.dust[de_dust2].noGravity = true;
|
||||
Main.dust[de_dust2].velocity *= 0.5f;
|
||||
drawInfo.DustCache.Add(de_dust2);
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace CalamityMod.CalPlayer
|
||||
dust.velocity *= 0.4f;
|
||||
dust.scale *= 1f + Main.rand.Next(40) * 0.01f;
|
||||
dust.shader = GameShaders.Armor.GetSecondaryShader(Player.ArmorSetDye(), Player);
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
dust.scale *= 1f + Main.rand.Next(40) * 0.01f;
|
||||
dust.noGravity = true;
|
||||
@@ -126,7 +126,7 @@ namespace CalamityMod.CalPlayer
|
||||
dust.velocity *= 0.4f;
|
||||
dust.scale *= 1f + Main.rand.Next(40) * 0.01f;
|
||||
dust.shader = GameShaders.Armor.GetSecondaryShader(Player.cNeck, Player);
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
dust.scale *= 1f + Main.rand.Next(40) * 0.01f;
|
||||
dust.noGravity = true;
|
||||
@@ -241,7 +241,7 @@ namespace CalamityMod.CalPlayer
|
||||
dust.scale *= 1f + Main.rand.Next(40) * 0.01f;
|
||||
// Change this accordingly if we have a proper equipped sprite.
|
||||
dust.shader = GameShaders.Armor.GetSecondaryShader(Player.cBody, Player);
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
dust.scale *= 1f + Main.rand.Next(40) * 0.01f;
|
||||
}
|
||||
|
||||
@@ -1741,7 +1741,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (pSoulShieldDurability <= 0)
|
||||
{
|
||||
pSoulShieldDurability = 0;
|
||||
SoundEngine.PlaySound(SoundID.Lavafall, Player.Center);
|
||||
SoundEngine.PlaySound(SoundID.DD2_BetsyFlameBreath, Player.Center);
|
||||
Player.Calamity().GeneralScreenShakePower += anyShieldBroke ? 0.5f : 2f;
|
||||
anyShieldBroke = true;
|
||||
}
|
||||
@@ -2081,7 +2081,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
int dust = Dust.NewDust(Player.position, Player.width, Player.height, 31, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[dust].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[dust].scale = 0.5f;
|
||||
Main.dust[dust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
@@ -2108,7 +2108,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
int ice = Dust.NewDust(Player.position, Player.width, Player.height, 67, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[ice].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[ice].scale = 0.5f;
|
||||
Main.dust[ice].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -679,7 +679,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (phantomicHeartRegen <= 720 && phantomicHeartRegen >= 600)
|
||||
{
|
||||
Player.lifeRegen += 2;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, 5, 0f, 0f, 200, new Color(99, 54, 84), 2f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
@@ -788,7 +788,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.lifeRegen > 0 && Player.statLife < actualMaxLife)
|
||||
{
|
||||
int dustType = shadeRegen ? 173 : cFreeze ? 67 : honeyDewWorking ? DustID.Honey2 : photosynthesis ? 244 : aAmpoule ? 228 : purity ? 187 : -1;
|
||||
bool dustSpawnRolled = Main.rand.Next(30000) < Player.lifeRegenTime || purity ? Main.rand.NextBool(2) : aAmpoule ? Main.rand.NextBool(4) : Main.rand.NextBool(30);
|
||||
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);
|
||||
@@ -832,7 +832,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Normally 1.25 while resting and 0.5 while not
|
||||
Player.lifeRegen += (int)(baseRegenRate * 0.75f);
|
||||
|
||||
if (Main.rand.Next(30000) < Player.lifeRegenTime || Main.rand.NextBool(2))
|
||||
if (Main.rand.Next(30000) < Player.lifeRegenTime || Main.rand.NextBool())
|
||||
{
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, 12, 0f, 0f, 200, Color.OrangeRed, 1f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
|
||||
@@ -246,7 +246,7 @@ namespace CalamityMod.CalPlayer
|
||||
float rot = MathHelper.ToRadians(i * rotFactor);
|
||||
Vector2 offset = new Vector2(Player.velocity.X * Player.direction * 0.7f + 6f, 0).RotatedBy(rot * Main.rand.NextFloat(4f, 5f));
|
||||
Vector2 velOffset = Vector2.Zero;
|
||||
Dust dust = Dust.NewDustPerfect(Player.Center + offset + Player.velocity, Main.rand.NextBool(2) ? 160 : 307, new Vector2(velOffset.X, velOffset.Y));
|
||||
Dust dust = Dust.NewDustPerfect(Player.Center + offset + Player.velocity, Main.rand.NextBool() ? 160 : 307, new Vector2(velOffset.X, velOffset.Y));
|
||||
dust.noGravity = true;
|
||||
dust.velocity = velOffset;
|
||||
dust.alpha = 100;
|
||||
@@ -256,10 +256,10 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
float sparkscale = (Player.velocity.X * Player.direction * 0.07f);
|
||||
Vector2 SparkVelocity1 = Player.velocity.RotatedBy(Player.direction * 2, default) * 0.1f - Player.velocity / 2f;
|
||||
SparkParticle spark = new SparkParticle(Player.Center + Player.velocity.RotatedBy(2f * Player.direction) * 1.5f, SparkVelocity1, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool(2) ? Color.DarkTurquoise : Color.DodgerBlue);
|
||||
SparkParticle spark = new SparkParticle(Player.Center + Player.velocity.RotatedBy(2f * Player.direction) * 1.5f, SparkVelocity1, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkTurquoise : Color.DodgerBlue);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
Vector2 SparkVelocity2 = Player.velocity.RotatedBy(Player.direction * -2, default) * 0.1f - Player.velocity / 2f;
|
||||
SparkParticle spark2 = new SparkParticle(Player.Center + Player.velocity.RotatedBy(-2f * Player.direction) * 1.5f, SparkVelocity2, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool(2) ? Color.DarkTurquoise : Color.DodgerBlue);
|
||||
SparkParticle spark2 = new SparkParticle(Player.Center + Player.velocity.RotatedBy(-2f * Player.direction) * 1.5f, SparkVelocity2, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkTurquoise : Color.DodgerBlue);
|
||||
GeneralParticleHandler.SpawnParticle(spark2);
|
||||
}
|
||||
if (Player.miscCounter % 4 == 0 && Player.velocity != Vector2.Zero) //every other frame spawn the hitbox
|
||||
@@ -287,7 +287,7 @@ namespace CalamityMod.CalPlayer
|
||||
float rot = MathHelper.ToRadians(i * rotFactor);
|
||||
Vector2 offset = new Vector2(Player.velocity.X * Player.direction * 0.7f + 8f, 0).RotatedBy(rot * Main.rand.NextFloat(4f, 5f));
|
||||
Vector2 velOffset = Vector2.Zero;
|
||||
Dust dust = Dust.NewDustPerfect(Player.Center + offset + Player.velocity, Main.rand.NextBool(2) ? 35 : 127, new Vector2(velOffset.X, velOffset.Y));
|
||||
Dust dust = Dust.NewDustPerfect(Player.Center + offset + Player.velocity, Main.rand.NextBool() ? 35 : 127, new Vector2(velOffset.X, velOffset.Y));
|
||||
dust.noGravity = true;
|
||||
dust.velocity = velOffset;
|
||||
dust.alpha = 100;
|
||||
@@ -295,10 +295,10 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
float sparkscale = (Player.velocity.X * Player.direction * 0.08f);
|
||||
Vector2 SparkVelocity1 = Player.velocity.RotatedBy(Player.direction * -3, default) * 0.1f - Player.velocity / 2f;
|
||||
SparkParticle spark = new SparkParticle(Player.Center + Player.velocity.RotatedBy(2f * Player.direction) * 1.5f, SparkVelocity1, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool(2) ? Color.DarkOrange : Color.OrangeRed);
|
||||
SparkParticle spark = new SparkParticle(Player.Center + Player.velocity.RotatedBy(2f * Player.direction) * 1.5f, SparkVelocity1, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
Vector2 SparkVelocity2 = Player.velocity.RotatedBy(Player.direction * 3, default) * 0.1f - Player.velocity / 2f;
|
||||
SparkParticle spark2 = new SparkParticle(Player.Center + Player.velocity.RotatedBy(-2f * Player.direction) * 1.5f, SparkVelocity2, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool(2) ? Color.DarkOrange : Color.OrangeRed);
|
||||
SparkParticle spark2 = new SparkParticle(Player.Center + Player.velocity.RotatedBy(-2f * Player.direction) * 1.5f, SparkVelocity2, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed);
|
||||
GeneralParticleHandler.SpawnParticle(spark2);
|
||||
|
||||
if (Player.miscCounter % 5 == 0 && Player.velocity != Vector2.Zero) //every other frame spawn the hitbox
|
||||
@@ -1135,14 +1135,54 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (healCounter <= 0)
|
||||
{
|
||||
bool enrage = Player.statLife < (int)(Player.statLifeMax2 * 0.5);
|
||||
|
||||
healCounter = (!enrage && profanedCrystalBuffs) ? 360 : 300;
|
||||
healCounter = 300;
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Player.statLife += 15;
|
||||
Player.HealEffect(15);
|
||||
|
||||
if (profanedCrystal)
|
||||
{
|
||||
var healerID = ModContent.ProjectileType<MiniGuardianHealer>();
|
||||
var healer = Main.projectile.FirstOrDefault(proj => proj.active && proj.owner == Main.myPlayer && proj.type == healerID, null);
|
||||
if (healer != null)
|
||||
{
|
||||
float distanceFromHealer = Vector2.Distance(healer.Center, Player.Center);
|
||||
int maxHealDustIterations = (int)distanceFromHealer;
|
||||
int maxDust = 40;
|
||||
int dustDivisor = maxHealDustIterations / maxDust;
|
||||
if (dustDivisor < 2)
|
||||
dustDivisor = 2;
|
||||
|
||||
Vector2 dustLineStart = healer.Center;
|
||||
Vector2 dustLineEnd = Player.Center;
|
||||
Vector2 currentDustPos = default;
|
||||
Vector2 spinningpoint = new Vector2(0f, -3f).RotatedByRandom(MathHelper.Pi);
|
||||
Vector2 value5 = new Vector2(2.1f, 2f);
|
||||
Color dustColor = Main.hslToRgb(Main.rgbToHsl(new Color(255, 200, Main.DiscoB)).X, 1f, 0.5f);
|
||||
dustColor.A = 255;
|
||||
for (int i = 0; i < maxHealDustIterations; i++)
|
||||
{
|
||||
if (i % dustDivisor == 0)
|
||||
{
|
||||
currentDustPos = Vector2.Lerp(dustLineStart, dustLineEnd, i / (float)maxHealDustIterations);
|
||||
int dust = Dust.NewDust(currentDustPos, 0, 0, 267, 0f, 0f, 0, dustColor, 1f);
|
||||
Main.dust[dust].position = currentDustPos;
|
||||
Main.dust[dust].velocity = spinningpoint.RotatedBy(MathHelper.TwoPi * i / maxHealDustIterations) * value5 * (0.8f + Main.rand.NextFloat() * 0.4f) + Player.velocity;
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].scale = 1f;
|
||||
Main.dust[dust].fadeIn = Main.rand.NextFloat() * 2f;
|
||||
Dust dust2 = Dust.CloneDust(dust);
|
||||
Dust dust3 = dust2;
|
||||
dust3.scale /= 2f;
|
||||
dust3 = dust2;
|
||||
dust3.fadeIn /= 2f;
|
||||
dust2.color = new Color(255, 255, 255, 255);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1512,7 +1552,7 @@ namespace CalamityMod.CalPlayer
|
||||
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);
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
Main.dust[green].scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
}
|
||||
}
|
||||
@@ -1543,7 +1583,7 @@ namespace CalamityMod.CalPlayer
|
||||
dust.noGravity = true;
|
||||
dust.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
dust.shader = GameShaders.Armor.GetSecondaryShader(Player.ArmorSetDye(), Player);
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
dust.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
}
|
||||
}
|
||||
@@ -1614,7 +1654,7 @@ namespace CalamityMod.CalPlayer
|
||||
dust.noGravity = true;
|
||||
dust.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
dust.shader = GameShaders.Armor.GetSecondaryShader(Player.ArmorSetDye(), Player);
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
dust.scale *= 1f + (float)Main.rand.Next(40) * 0.01f;
|
||||
}
|
||||
}
|
||||
@@ -2691,7 +2731,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (profanedCrystalBuffs)
|
||||
{
|
||||
bool offenseBuffs = (Main.dayTime && !Player.wet) || Player.lavaWet;
|
||||
bool offenseBuffs = pscState == (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Buffs || (Main.dayTime && !Player.wet) || Player.lavaWet;
|
||||
if (offenseBuffs)
|
||||
flightTimeMult += 0.1;
|
||||
}
|
||||
@@ -3102,7 +3142,11 @@ namespace CalamityMod.CalPlayer
|
||||
int babDamage = profanedCrystal ? 346 : 52;
|
||||
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianHealer>()] < guardianAmt)
|
||||
Projectile.NewProjectile(source, Player.Center, Vector2.UnitY * -6f, ModContent.ProjectileType<MiniGuardianHealer>(), 0, 0f, Main.myPlayer);
|
||||
{
|
||||
var babH = Projectile.NewProjectileDirect(source, Player.Center, Vector2.UnitY * -6f, ModContent.ProjectileType<MiniGuardianHealer>(), 0, 0f, Main.myPlayer, babCheck);
|
||||
babH.originalDamage = babDamage;
|
||||
}
|
||||
|
||||
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianDefense>()] < guardianAmt)
|
||||
{
|
||||
@@ -3112,7 +3156,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] < guardianAmt)
|
||||
{
|
||||
float spearCounter = profanedCrystal ? 0f : 15f;
|
||||
float spearCounter = profanedCrystal ? 60 * 8 : 15f;
|
||||
var babO = Projectile.NewProjectileDirect(source, Player.Center, Vector2.UnitY * -1f, ModContent.ProjectileType<MiniGuardianAttack>(), 1, 1f, Main.myPlayer, babCheck, spearCounter);
|
||||
babO.originalDamage = babDamage;
|
||||
}
|
||||
@@ -3123,7 +3167,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Player.scope = false; //this is so it doesn't mess with the balance of ranged transform attacks over the others
|
||||
bool empowered = pscState == (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Empowered;
|
||||
Player.lavaImmune = true;
|
||||
Player.fireWalk = true;
|
||||
Player.buffImmune[ModContent.BuffType<HolyFlames>()] = Main.dayTime;
|
||||
@@ -3131,36 +3175,27 @@ namespace CalamityMod.CalPlayer
|
||||
Player.buffImmune[BuffID.OnFire] = true;
|
||||
Player.buffImmune[BuffID.Burning] = true;
|
||||
Player.buffImmune[BuffID.Daybreak] = true;
|
||||
bool offenseBuffs = (Main.dayTime && !Player.wet) || Player.lavaWet;
|
||||
bool offenseBuffs = (Main.dayTime && !Player.wet) || Player.lavaWet || empowered;
|
||||
if (offenseBuffs)
|
||||
{
|
||||
Player.GetDamage<SummonDamageClass>() += 0.15f;
|
||||
Player.GetKnockback<SummonDamageClass>() += 0.15f;
|
||||
Player.moveSpeed += 0.1f;
|
||||
Player.statDefense -= 15;
|
||||
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
|
||||
else if (empowered || !offenseBuffs)
|
||||
{
|
||||
Player.moveSpeed -= 0.1f;
|
||||
Player.endurance += 0.05f;
|
||||
Player.statDefense += 15;
|
||||
Player.lifeRegen += 5;
|
||||
}
|
||||
bool enrage = Player.statLife <= (int)(Player.statLifeMax2 * 0.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 (enrage)
|
||||
{
|
||||
bool special = ProfanedSoulCrystal.testerNames.Any(name => name.Equals(Player.name));
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
int fire = Dust.NewDust(Player.position, Player.width, Player.height, special ? 231 : (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, special ? Color.DarkRed : default, 1f);
|
||||
Main.dust[fire].scale = special ? 1.169f : 2f;
|
||||
Main.dust[fire].noGravity = true;
|
||||
Main.dust[fire].velocity *= special ? 10f : 6.9f;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3636,9 +3671,15 @@ namespace CalamityMod.CalPlayer
|
||||
int maxDurability = profanedCrystalBuffs
|
||||
? ProfanedSoulCrystal.ShieldDurabilityMax
|
||||
: ProfanedSoulArtifact.ShieldDurabilityMax;
|
||||
int delay = profanedCrystalBuffs
|
||||
? ProfanedSoulCrystal.ShieldRechargeDelay
|
||||
: ProfanedSoulArtifact.ShieldRechargeDelay;
|
||||
int totalRecharge = profanedCrystalBuffs
|
||||
? ProfanedSoulCrystal.TotalShieldRechargeTime
|
||||
: ProfanedSoulArtifact.TotalShieldRechargeTime;
|
||||
|
||||
if (pSoulShieldDurability == 0 && !cooldowns.ContainsKey(Cooldowns.ProfanedSoulShieldRecharge.ID))
|
||||
Player.AddCooldown(ProfanedSoulShieldRecharge.ID, ProfanedSoulArtifact.ShieldRechargeDelay);
|
||||
Player.AddCooldown(ProfanedSoulShieldRecharge.ID, delay);
|
||||
|
||||
// If the shield has greater than zero durability but that durability is not on the cooldown rack, add it to the cooldown rack.
|
||||
if (pSoulShieldDurability > 0 && !cooldowns.ContainsKey(Cooldowns.ProfanedSoulShield.ID))
|
||||
@@ -3656,7 +3697,7 @@ namespace CalamityMod.CalPlayer
|
||||
playedProfanedSoulShieldSound = true;
|
||||
|
||||
// This number is not an integer, and stores exact per-frame recharge progress.
|
||||
pSoulShieldPartialRechargeProgress += maxDurability / (float)ProfanedSoulArtifact.TotalShieldRechargeTime;
|
||||
pSoulShieldPartialRechargeProgress += maxDurability / (float)totalRecharge;
|
||||
|
||||
// Floor the value to get whole number of shield points recharged this frame.
|
||||
int pointsActuallyRecharged = (int)MathF.Floor(pSoulShieldPartialRechargeProgress);
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.rand.NextBool(4))
|
||||
target.AddBuff(BuffID.OnFire3, 360);
|
||||
else if (Main.rand.NextBool(2))
|
||||
else if (Main.rand.NextBool())
|
||||
target.AddBuff(BuffID.OnFire3, 240);
|
||||
else
|
||||
target.AddBuff(BuffID.OnFire3, 120);
|
||||
@@ -335,7 +335,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.rand.NextBool(4))
|
||||
target.AddBuff(BuffID.OnFire3, 360);
|
||||
else if (Main.rand.NextBool(2))
|
||||
else if (Main.rand.NextBool())
|
||||
target.AddBuff(BuffID.OnFire3, 240);
|
||||
else
|
||||
target.AddBuff(BuffID.OnFire3, 120);
|
||||
@@ -895,7 +895,7 @@ namespace CalamityMod.CalPlayer
|
||||
for (int dustexplode = 0; dustexplode < 360; dustexplode++)
|
||||
{
|
||||
Vector2 dustd = new Vector2(17f, 17f).RotatedBy(MathHelper.ToRadians(dustexplode));
|
||||
int d = Dust.NewDust(proj.Center, proj.width, proj.height, Main.rand.NextBool(2) ? DustType<AstralBlue>() : DustType<AstralOrange>(), dustd.X, dustd.Y, 100, default, 1f);
|
||||
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;
|
||||
@@ -907,7 +907,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int type = -1;
|
||||
switch (Main.rand.Next(15))
|
||||
@@ -1062,7 +1062,13 @@ namespace CalamityMod.CalPlayer
|
||||
target.AddBuff(BuffType<HolyFlames>(), 300);
|
||||
|
||||
if (profanedCrystalBuffs)
|
||||
target.AddBuff(Main.dayTime ? BuffType<HolyFlames>() : BuffType<Nightwither>(), 600);
|
||||
{
|
||||
bool empowered = pscState == (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Empowered;
|
||||
if (empowered || Main.dayTime)
|
||||
target.AddBuff(BuffType<HolyFlames>(), 600);
|
||||
if (empowered || !Main.dayTime)
|
||||
target.AddBuff(BuffType<Nightwither>(), 600);
|
||||
}
|
||||
|
||||
if (divineBless)
|
||||
target.AddBuff(BuffType<BanishingFire>(), 60);
|
||||
@@ -1210,7 +1216,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if ((target.damage > 5 || target.boss) && !target.SpawnedFromStatue)
|
||||
{
|
||||
if (bloodflareThrowing && proj.CountsAsClass<ThrowingDamageClass>() && crit && Main.rand.NextBool(2))
|
||||
if (bloodflareThrowing && proj.CountsAsClass<ThrowingDamageClass>() && crit && Main.rand.NextBool())
|
||||
{
|
||||
float projHitMult = 0.03f;
|
||||
projHitMult -= proj.numHits * 0.015f;
|
||||
@@ -1243,7 +1249,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (manaOverloader && otherHealTypes)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
float healMult = 0.2f;
|
||||
healMult -= proj.numHits * 0.05f;
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
holyFireDashDust.scale *= Main.rand.NextFloat(1f, 1.2f);
|
||||
holyFireDashDust.shader = GameShaders.Armor.GetSecondaryShader(player.cShield, player);
|
||||
holyFireDashDust.noGravity = true;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
holyFireDashDust.fadeIn = 0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
iceDashDust.scale *= Main.rand.NextFloat(1f, 1.2f);
|
||||
iceDashDust.shader = GameShaders.Armor.GetSecondaryShader(player.cShield, player);
|
||||
iceDashDust.noGravity = true;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
iceDashDust.fadeIn = 0.5f;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
holyFireDashDust.scale *= Main.rand.NextFloat(1f, 1.2f);
|
||||
holyFireDashDust.shader = GameShaders.Armor.GetSecondaryShader(player.cShield, player);
|
||||
holyFireDashDust.noGravity = true;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
holyFireDashDust.fadeIn = 0.5f;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
plagueDashDust.scale *= Main.rand.NextFloat(1f, 1.2f);
|
||||
plagueDashDust.shader = GameShaders.Armor.GetSecondaryShader(player.ArmorSetDye(), player);
|
||||
plagueDashDust.noGravity = true;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
plagueDashDust.fadeIn = 0.5f;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace CalamityMod.Items.Accessories
|
||||
// On grass, grow flowers.
|
||||
if (groundTile.TileType == TileID.Grass)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
walkTile.Get<TileWallWireStateData>().HasTile = true;
|
||||
walkTile.TileType = TileID.Plants;
|
||||
@@ -84,7 +84,7 @@ namespace CalamityMod.Items.Accessories
|
||||
// On hallowed grass, grow hallowed flowers.
|
||||
else if (groundTile.TileType == TileID.HallowedGrass)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
walkTile.Get<TileWallWireStateData>().HasTile = true;
|
||||
walkTile.TileType = TileID.HallowedPlants;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using CalamityMod.CalPlayer;
|
||||
using static CalamityMod.Items.Accessories.ProfanedSoulCrystal;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Plates;
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
@@ -51,8 +52,9 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
// Do not render the shield if its visibility is off (or it does not exist)
|
||||
bool isVanityOnly = modPlayer.pSoulShieldVisible && !modPlayer.pSoulArtifact;
|
||||
bool shouldNotDraw = modPlayer.andromedaState >= AndromedaPlayerState.LargeRobot; //I am not dealing with drawing that :taxevasion:
|
||||
bool shieldExists = isVanityOnly || modPlayer.pSoulShieldDurability > 0;
|
||||
if (!modPlayer.pSoulShieldVisible || modPlayer.drawnAnyShieldThisFrame || !shieldExists)
|
||||
if (!modPlayer.pSoulShieldVisible || modPlayer.drawnAnyShieldThisFrame || shouldNotDraw || !shieldExists)
|
||||
continue;
|
||||
|
||||
// Scale the shield is drawn at.
|
||||
@@ -62,8 +64,9 @@ namespace CalamityMod.Items.Accessories
|
||||
if (!alreadyDrawnShieldForPlayer)
|
||||
{
|
||||
CalamityPlayer localModPlayer = Main.LocalPlayer.Calamity();
|
||||
DetermineTransformationEligibility(localModPlayer.Player);
|
||||
var psc = localModPlayer.profanedCrystalBuffs;
|
||||
scale += psc ? 0.025f : 0f;
|
||||
scale += ((ProfanedSoulCrystalState)localModPlayer.pscState) == ProfanedSoulCrystalState.Empowered ? 0.05f : psc ? 0.025f : 0f;
|
||||
float visualShieldStrength = 1f;
|
||||
if (!isVanityOnly)
|
||||
{
|
||||
@@ -92,11 +95,13 @@ namespace CalamityMod.Items.Accessories
|
||||
shieldEffect.Parameters["shieldEdgeBlendStrenght"].SetValue(4f);
|
||||
|
||||
// Profaned Soul shields are not team specific
|
||||
Color shieldColor = new Color(231, 160, 56);
|
||||
if (psc && ProfanedSoulCrystal.testerNames.Any(name => name.Equals(localModPlayer.Player.name)))
|
||||
shieldColor = CalamityUtils.ColorSwap(new Color(255, 166, 0), new Color(25, 250, 25), 4f);
|
||||
else if (psc)
|
||||
shieldColor = new Color(255, 110, 56);
|
||||
Color shieldColor = GetColorForPsc(localModPlayer.pscState, Main.dayTime);
|
||||
if (modPlayer.pscState >= (int)(ProfanedSoulCrystalState.Buffs))
|
||||
{
|
||||
bool tester = contributorNames.Any(name => name.Equals(localModPlayer.Player.name));
|
||||
shieldColor = tester ? CalamityUtils.ColorSwap(new Color(255, 166, 0), new Color(25, 250, 25) * 0.8f, 6f) :
|
||||
GetLerpedColorForPsc(modPlayer);
|
||||
}
|
||||
|
||||
Color primaryEdgeColor = new Color(230, 199, 102) * 0.8f;
|
||||
Color secondaryEdgeColor = new Color(249, 231, 217) * 0.8f;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using System;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
@@ -7,6 +8,7 @@ using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CalamityMod.Buffs.Summon.Whips;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
@@ -18,22 +20,96 @@ namespace CalamityMod.Items.Accessories
|
||||
//Developer item, dedicatee: Mishiro Usui/Amber Sienna
|
||||
public class ProfanedSoulCrystal : ModItem, ILocalizedModType
|
||||
{
|
||||
public static string[] testerNames = new[] { "IbanPlay", "Chen", "Nincity", "Amber", "Mishiro" };
|
||||
public static string[] contributorNames = new[] { "IbanPlay", "Chen", "Nincity", "Amber", "Mishiro", "LordMetarex", "Memes" };
|
||||
public static int ShieldDurabilityMax = 125;
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int ShieldRechargeDelay = CalamityUtils.SecondsToFrames(5);
|
||||
public static int TotalShieldRechargeTime = CalamityUtils.SecondsToFrames(4);
|
||||
|
||||
internal const int maxMinionRequirement = 10;
|
||||
|
||||
public enum ProfanedSoulCrystalState
|
||||
{
|
||||
Vanity, //pre scal/draedon or insufficient minion slots
|
||||
Buffs, //regular psc, offense guardian functionality
|
||||
Enraged, //psc but night, some attacks are faster
|
||||
Empowered //psc but no other minions, healer guardian functionality, inherits all other functionality (except vanity) and goes even further beyond, any remaining attack changes are here
|
||||
}
|
||||
|
||||
private static ProfanedSoulCrystalState GetPscStateFor(Player player)
|
||||
{
|
||||
if (!player.Calamity().profanedCrystalBuffs)
|
||||
return ProfanedSoulCrystalState.Vanity; //vanity if no buffs
|
||||
|
||||
var noMinions = player.slotsMinions == 0;
|
||||
var noSentries = !Main.projectile.Any(proj => proj.active && proj.owner == player.whoAmI && proj.sentry);
|
||||
if (noMinions && noSentries)
|
||||
return ProfanedSoulCrystalState.Empowered; //immediately check for empowered as it overrides everything else
|
||||
|
||||
return !Main.dayTime ? ProfanedSoulCrystalState.Enraged : //check for enrage
|
||||
ProfanedSoulCrystalState.Buffs; //return buffs as the sole remaining option
|
||||
}
|
||||
|
||||
internal static Color GetColorForPsc(int pscState, bool day, int alpha = 0)
|
||||
{
|
||||
return ((ProfanedSoulCrystalState)pscState) switch
|
||||
{
|
||||
ProfanedSoulCrystalState.Vanity => new Color(231, 160, 56, alpha),
|
||||
ProfanedSoulCrystalState.Buffs => new Color(255, 110, 56, alpha),
|
||||
ProfanedSoulCrystalState.Enraged => new Color(145, 208, 188, alpha),
|
||||
ProfanedSoulCrystalState.Empowered => day ? new Color(255, 75, 13, alpha) : new Color(84, 186, 163, alpha),
|
||||
_ => Color.White //defaults to white, should not be white
|
||||
};
|
||||
}
|
||||
|
||||
internal static Color GetLerpedColorForPsc(CalamityPlayer calPlayer)
|
||||
{
|
||||
if (calPlayer.pscLerpColor != Color.White)
|
||||
return calPlayer.pscLerpColor; //already set the lerp colour this frame, calculating it again is redundant
|
||||
|
||||
bool day = Main.dayTime;
|
||||
double totalTime = Main.dayTime ? Main.dayLength : Main.dayLength + Main.nightLength;
|
||||
double currentTime = Main.time;
|
||||
double midday = Main.dayLength / 2;
|
||||
double midnight = Main.nightLength / 2;
|
||||
Color dayColor = GetColorForPsc(calPlayer.pscState, day);
|
||||
Color nightColor = GetColorForPsc(calPlayer.pscState > (int)ProfanedSoulCrystalState.Enraged
|
||||
? (int)ProfanedSoulCrystalState.Empowered
|
||||
: (int)ProfanedSoulCrystalState.Enraged, false);
|
||||
var targetColor = Main.dayTime ? dayColor : nightColor;
|
||||
var nonTargetColor = Main.dayTime ? nightColor : dayColor;
|
||||
var targetTime = Main.dayTime ? midday : midnight;
|
||||
var interpolant = Utils.GetLerpValue(totalTime, targetTime, currentTime, false);
|
||||
var result = Color.White;
|
||||
if (!Main.dayTime && Main.time > midnight)
|
||||
{
|
||||
result = Color.Lerp(nightColor, dayColor, 2f - (float)interpolant);
|
||||
}
|
||||
|
||||
else if (Main.dayTime && Main.time > midday)
|
||||
{
|
||||
result = Color.Lerp(nightColor, dayColor, (float)interpolant);
|
||||
}
|
||||
|
||||
if (result == Color.White)
|
||||
{
|
||||
result = Color.Lerp(nonTargetColor, targetColor, (Main.time < midday ? 2f : 0f) - (float)interpolant);
|
||||
}
|
||||
|
||||
|
||||
calPlayer.pscLerpColor = result;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes: Drops from providence if the only damage source during the fight is from typeless damage or the profaned soul and the owners of those babs do not have profaned crystal.
|
||||
* All projectiles are in ProfanedSoulCrystalProjectiles.cs in the summon projectile directory
|
||||
* The projectiles being created/fired on click happens in CalamityGlobalItem (there's a region specially for it so ctrl + f is your friend)
|
||||
* the day/night buffs are in calamityplayermisceffects
|
||||
* the bab projectiles are the same, just refactored ai to be more adhering to DRY principle
|
||||
* bab spears being fired happens at the bottom of calplayer
|
||||
* Animation of legs is postupdate, animation of wings is frameeffects.
|
||||
* Projectiles transformed are ONLY affected by alldamage and summon damage bonuses, likewise the weapon's base damage/usetime is NOT taken into account.
|
||||
* You enrage below or at 50% hp.
|
||||
* The on-hit effect for the whip is in globalnpc
|
||||
*/
|
||||
public override void Load()
|
||||
{
|
||||
@@ -41,9 +117,12 @@ namespace CalamityMod.Items.Accessories
|
||||
return;
|
||||
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/ProfanedSoulTransHead", EquipType.Head, this);
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/ProfanedSoulTransHeadNight", EquipType.Head, this, "PscNightHead");
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/ProfanedSoulTransBody", EquipType.Body, this);
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/ProfanedSoulTransLegs", EquipType.Legs, this);
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/ProfanedSoulTransLegsNight", EquipType.Legs, this, "PscNightLegs");
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Wings/ProfanedSoulTransWings", EquipType.Wings, this);
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Wings/ProfanedSoulTransWingsNight", EquipType.Wings, this, "PscNightWings");
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
@@ -60,6 +139,11 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Legs);
|
||||
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
|
||||
ArmorIDs.Legs.Sets.OverridesLegs[equipSlotLegs] = true;
|
||||
|
||||
int equipSlotNightLegs = EquipLoader.GetEquipSlot(Mod, "PscNightLegs", EquipType.Legs);
|
||||
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotNightLegs] = true;
|
||||
ArmorIDs.Legs.Sets.OverridesLegs[equipSlotNightLegs] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -93,7 +177,7 @@ namespace CalamityMod.Items.Accessories
|
||||
else
|
||||
{
|
||||
string manaCost = (100 * Main.player[Main.myPlayer].manaCost).ToString("N0");
|
||||
string full = this.GetLocalization("FullTooltip").Format(manaCost);
|
||||
string full = this.GetLocalization("FullTooltip").Format(maxMinionRequirement, manaCost);
|
||||
tooltips.FindAndReplace("[STATUS]", full);
|
||||
}
|
||||
}
|
||||
@@ -115,15 +199,15 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
player.Calamity().profanedCrystalHide = false;
|
||||
player.Calamity().profanedCrystalForce = true;
|
||||
player.Calamity().pSoulShieldVisible = true;
|
||||
}
|
||||
|
||||
internal static void DetermineTransformationEligibility(Player player)
|
||||
{
|
||||
//short circuit immediately if profanedcrystalbuffs has already been set
|
||||
if (!player.Calamity().profanedCrystalBuffs && DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs && (player.maxMinions - player.slotsMinions) >= 10 && !player.Calamity().profanedCrystalForce && player.HasBuff<ProfanedCrystalBuff>())
|
||||
if (!player.Calamity().profanedCrystalBuffs && DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs && (player.maxMinions - player.slotsMinions) >= maxMinionRequirement && !player.Calamity().profanedCrystalForce && player.HasBuff<ProfanedCrystalBuff>())
|
||||
{
|
||||
player.Calamity().profanedCrystalBuffs = true;
|
||||
player.Calamity().pscState = (int)GetPscStateFor(player); //update psc state, default is 0 which is the same as the int value of vanity
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,50 +221,51 @@ namespace CalamityMod.Items.Accessories
|
||||
int weaponType = item.CountsAsClass<MeleeDamageClass>() ? 1 :
|
||||
item.CountsAsClass<RangedDamageClass>() ? 2 :
|
||||
item.CountsAsClass<MagicDamageClass>() ? 3 :
|
||||
item.CountsAsClass<ThrowingDamageClass>() ? 4 : -1;
|
||||
item.CountsAsClass<ThrowingDamageClass>() ? 4 :
|
||||
item.CountsAsClass<SummonMeleeSpeedDamageClass>() ? 5 : -1;
|
||||
if (weaponType > 0)
|
||||
{
|
||||
if (player.Calamity().profanedSoulWeaponType != weaponType || player.Calamity().profanedSoulWeaponUsage >= 300)
|
||||
if (player.Calamity().profanedSoulWeaponType != weaponType || player.Calamity().profanedSoulWeaponUsage >= 370)
|
||||
{
|
||||
player.Calamity().profanedSoulWeaponType = weaponType;
|
||||
player.Calamity().profanedSoulWeaponUsage = 0;
|
||||
}
|
||||
Vector2 correctedVelocity = Main.MouseWorld - player.Center;
|
||||
correctedVelocity.Normalize();
|
||||
bool shouldNerf = player.Calamity().endoCooper || player.Calamity().magicHat; //No bonkers damage memes thank you very much.
|
||||
bool enrage = player.statLife <= (int)(player.statLifeMax2 * 0.5);
|
||||
bool empowered = player.Calamity().pscState == (int)ProfanedSoulCrystalState.Empowered;
|
||||
bool enraged = player.Calamity().pscState >= (int)ProfanedSoulCrystalState.Enraged;
|
||||
if (item.CountsAsClass<MeleeDamageClass>())
|
||||
{
|
||||
if (player.Calamity().profanedSoulWeaponUsage % (enrage ? 4 : 6) == 0)
|
||||
if (player.Calamity().profanedSoulWeaponUsage % (enraged ? 4 : 6) == 0)
|
||||
{
|
||||
if (player.Calamity().profanedSoulWeaponUsage > 0 && player.Calamity().profanedSoulWeaponUsage % (enrage ? 20 : 30) == 0) //every 5 shots is a shotgun spread
|
||||
if (player.Calamity().profanedSoulWeaponUsage > 0 && player.Calamity().profanedSoulWeaponUsage % (enraged ? 20 : 30) == 0) //every 5 shots is a shotgun spread
|
||||
{
|
||||
int numProj = 5;
|
||||
|
||||
correctedVelocity *= 12f;
|
||||
int spread = 3;
|
||||
correctedVelocity *= 20f;
|
||||
int spread = -6;
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
Vector2 perturbedspeed = new Vector2(correctedVelocity.X, correctedVelocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread));
|
||||
|
||||
int spearBaseDamage = shouldNerf ? 175 : 350;
|
||||
Vector2 perturbedspeed = new Vector2(correctedVelocity.X, correctedVelocity.Y).RotatedBy(MathHelper.ToRadians(spread));
|
||||
int separation = (i * 4) - 8;
|
||||
int spearBaseDamage = 350;
|
||||
int spearDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(spearBaseDamage);
|
||||
int proj = Projectile.NewProjectile(source, player.Center.X, player.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), spearDamage, 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f);
|
||||
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))
|
||||
{
|
||||
Main.projectile[proj].DamageType = DamageClass.Summon;
|
||||
Main.projectile[proj].originalDamage = spearBaseDamage;
|
||||
}
|
||||
spread -= Main.rand.Next(2, 4);
|
||||
spread += 3;
|
||||
SoundEngine.PlaySound(SoundID.Item20, player.Center);
|
||||
}
|
||||
player.Calamity().profanedSoulWeaponUsage = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
int spearBaseDamage = shouldNerf ? 125 : 250;
|
||||
int spearBaseDamage = 250;
|
||||
int spearDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(spearBaseDamage);
|
||||
int proj = Projectile.NewProjectile(source, player.Center, correctedVelocity * 6.9f, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), spearDamage, 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f, 1f);
|
||||
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))
|
||||
{
|
||||
Main.projectile[proj].DamageType = DamageClass.Summon;
|
||||
@@ -195,14 +280,14 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
else if (item.CountsAsClass<RangedDamageClass>())
|
||||
{
|
||||
if (enrage || Main.rand.NextBool(2)) //100% chance if 50% or lower, else 1 in 2 chance
|
||||
if (enraged || Main.rand.NextBool()) //100% chance if 50% or lower, else 1 in 2 chance
|
||||
{
|
||||
correctedVelocity *= 20f;
|
||||
Vector2 perturbedspeed = new Vector2(correctedVelocity.X + Main.rand.Next(-3, 4), correctedVelocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(3));
|
||||
bool isSmallBoomer = Main.rand.NextDouble() <= (enrage ? 0.2 : 0.3); // 20% chance if enraged, else 30% This is intentional due to literally doubling the amount of projectiles fired.
|
||||
bool isSmallBoomer = Main.rand.NextDouble() <= (enraged && !empowered ? 0.2 : 0.3); // 20% chance if enraged, else 30% This is intentional due to literally doubling the amount of projectiles fired.
|
||||
bool isThiccBoomer = isSmallBoomer && Main.rand.NextDouble() <= 0.05; // 5%
|
||||
int projType = isSmallBoomer ? isThiccBoomer ? 1 : 2 : 3;
|
||||
int boomBaseDamage = shouldNerf ? 100 : 200;
|
||||
int boomBaseDamage = 200;
|
||||
int boomDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(boomBaseDamage);
|
||||
switch (projType)
|
||||
{
|
||||
@@ -250,20 +335,20 @@ namespace CalamityMod.Items.Accessories
|
||||
player.statMana -= manaCost;
|
||||
correctedVelocity *= 25f;
|
||||
SoundEngine.PlaySound(SoundID.Item20, player.Center);
|
||||
int magefireBaseDamage = shouldNerf ? 450 : 900;
|
||||
int magefireBaseDamage = 900;
|
||||
int magefireDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(magefireBaseDamage);
|
||||
if (player.HasBuff(BuffID.ManaSickness))
|
||||
{
|
||||
int sickPenalty = (int)(magefireDamage * (0.05f * ((player.buffTime[player.FindBuffIndex(BuffID.ManaSickness)] + 60) / 60)));
|
||||
magefireDamage -= sickPenalty;
|
||||
}
|
||||
int proj = Projectile.NewProjectile(source, player.position, correctedVelocity, ModContent.ProjectileType<ProfanedCrystalMageFireball>(), magefireDamage, 1f, player.whoAmI, enrage ? 1f : 0f);
|
||||
int proj = Projectile.NewProjectile(source, player.position, correctedVelocity, ModContent.ProjectileType<ProfanedCrystalMageFireball>(), magefireDamage, 1f, player.whoAmI, empowered ? 1f : 0f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].DamageType = DamageClass.Summon;
|
||||
Main.projectile[proj].originalDamage = magefireBaseDamage;
|
||||
}
|
||||
player.Calamity().profanedSoulWeaponUsage = enrage ? 20 : 25;
|
||||
player.Calamity().profanedSoulWeaponUsage = enraged ? 20 : 25;
|
||||
}
|
||||
if (player.Calamity().profanedSoulWeaponUsage > 0)
|
||||
player.Calamity().profanedSoulWeaponUsage--;
|
||||
@@ -274,15 +359,16 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
player.Calamity().profanedSoulWeaponUsage = 0;
|
||||
}
|
||||
if (player.Calamity().profanedSoulWeaponUsage >= (enrage ? 69 : 180))
|
||||
|
||||
if (player.Calamity().profanedSoulWeaponUsage >= (empowered ? 120 : 360))
|
||||
{
|
||||
float crystalCount = 36f;
|
||||
for (float i = 0; i < crystalCount; i++)
|
||||
{
|
||||
float angle = MathHelper.TwoPi / crystalCount * i;
|
||||
int shardBaseDamage = shouldNerf ? 88 : 176;
|
||||
int shardBaseDamage = 176;
|
||||
int shardDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(shardBaseDamage);
|
||||
int proj = Projectile.NewProjectile(source, player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), shardDamage, 1f, player.whoAmI, 0f, 0f);
|
||||
int proj = Projectile.NewProjectile(source, player.Center, angle.ToRotationVector2() * 12f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), shardDamage, 1f, player.whoAmI, 0f, 0f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].DamageType = DamageClass.Summon;
|
||||
@@ -292,22 +378,63 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
player.Calamity().profanedSoulWeaponUsage = 0;
|
||||
}
|
||||
else if (player.Calamity().profanedSoulWeaponUsage % (enrage ? 5 : 10) == 0)
|
||||
else if (player.Calamity().profanedSoulWeaponUsage % (empowered ? 5 : 10) == 0)
|
||||
{
|
||||
float angle = MathHelper.TwoPi / (enrage ? 9 : 18) * (player.Calamity().profanedSoulWeaponUsage / (enrage ? 1 : 10));
|
||||
int shardBaseDamage = shouldNerf ? 110 : 220;
|
||||
int chains = empowered ? 3 : 1;
|
||||
int totalShardProjectiles = empowered ? 360 / 5 : 360 / 10;
|
||||
int shardBaseDamage = empowered ? 125 : 220;
|
||||
int shardDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(shardBaseDamage);
|
||||
int proj = Projectile.NewProjectile(source, player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), shardDamage, 1f, player.whoAmI, 1f, 0f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
|
||||
float interval = totalShardProjectiles / chains * (empowered ? 5f : 10f);
|
||||
double patternInterval = Math.Floor(player.Calamity().profanedSoulWeaponUsage / interval);
|
||||
if (patternInterval % 2 == 0)
|
||||
{
|
||||
Main.projectile[proj].DamageType = DamageClass.Summon;
|
||||
Main.projectile[proj].originalDamage = shardBaseDamage;
|
||||
double radians = MathHelper.TwoPi / chains;
|
||||
double angleA = radians * 0.5;
|
||||
double angleB = MathHelper.ToRadians(90f) - angleA;
|
||||
float velocityX = (float)(2f * Math.Sin(angleA) / Math.Sin(angleB));
|
||||
Vector2 spinningPoint = new Vector2(velocityX, -2f);
|
||||
for (int i = 0; i < chains; i++)
|
||||
{
|
||||
Vector2 vector2 = spinningPoint.RotatedBy(radians * i + MathHelper.ToRadians(player.Calamity().profanedSoulWeaponUsage));
|
||||
vector2.Normalize();
|
||||
int proj = Projectile.NewProjectile(source, player.Center, vector2 * 12f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), shardDamage, 1f, player.whoAmI, 1f, 0f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].DamageType = DamageClass.Summon;
|
||||
Main.projectile[proj].originalDamage = shardBaseDamage;
|
||||
}
|
||||
}
|
||||
|
||||
SoundEngine.PlaySound(SoundID.Item20, player.Center);
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item20, player.Center);
|
||||
}
|
||||
player.Calamity().profanedSoulWeaponUsage += enrage ? 1 : 2;
|
||||
if (!enrage && player.Calamity().profanedSoulWeaponUsage % 2 != 0)
|
||||
player.Calamity().profanedSoulWeaponUsage--;
|
||||
player.Calamity().profanedSoulWeaponUsage += !empowered ? 2 : 1;
|
||||
|
||||
}
|
||||
else if (item.CountsAsClass<SummonMeleeSpeedDamageClass>())
|
||||
{
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<ProfanedCrystalWhip>()] == 0)
|
||||
{
|
||||
player.Calamity().profanedSoulWeaponUsage = 0;
|
||||
}
|
||||
|
||||
if (player.Calamity().profanedSoulWeaponUsage == 0)
|
||||
{
|
||||
int whipBaseDamage = 250;
|
||||
int whipDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(whipBaseDamage);
|
||||
var buffed = player.HasBuff<ProfanedCrystalWhipBuff>();
|
||||
correctedVelocity *= buffed ? 10f : 8f;
|
||||
int permittedDistance = player.HasBuff<ProfanedCrystalWhipBuff>() ? 10 : 8;
|
||||
correctedVelocity.X = Math.Clamp(correctedVelocity.X, -permittedDistance, permittedDistance);
|
||||
correctedVelocity.Y = Math.Clamp(correctedVelocity.Y, -permittedDistance, permittedDistance);
|
||||
|
||||
player.direction = correctedVelocity.X > 0 ? 1 : -1;
|
||||
Projectile.NewProjectile(source, player.Center, correctedVelocity, ModContent.ProjectileType<ProfanedCrystalWhip>(), whipDamage, 1f, player.whoAmI);
|
||||
player.Calamity().profanedSoulWeaponUsage = 10;
|
||||
}
|
||||
|
||||
player.Calamity().profanedSoulWeaponUsage--;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 1007 B |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,85 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories.Vanity
|
||||
{
|
||||
public class OracleHeadphones : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void Load()
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Mishiro_Head", EquipType.Head, this);
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Mishiro_Body", EquipType.Body, this);
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Mishiro_Legs", EquipType.Legs, this);
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Accessories/Vanity/Mishiro_Back", EquipType.Back, this);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
return;
|
||||
|
||||
int equipSlotHead = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Head);
|
||||
ArmorIDs.Head.Sets.DrawHead[equipSlotHead] = false;
|
||||
|
||||
int equipSlotBody = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
|
||||
ArmorIDs.Body.Sets.HidesTopSkin[equipSlotBody] = true;
|
||||
ArmorIDs.Body.Sets.HidesArms[equipSlotBody] = true;
|
||||
|
||||
int equipSlotLegs = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Legs);
|
||||
ArmorIDs.Legs.Sets.HidesBottomSkin[equipSlotLegs] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 22;
|
||||
Item.height = 30;
|
||||
Item.accessory = true;
|
||||
Item.value = Item.buyPrice(0, 1, 0, 0);
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
Item.vanity = true;
|
||||
Item.Calamity().devItem = true;
|
||||
}
|
||||
|
||||
public override void UpdateVanity(Player player)
|
||||
{
|
||||
player.GetModPlayer<OracleHeadphonesPlayer>().vanityEquipped = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
if (!hideVisual)
|
||||
{
|
||||
player.GetModPlayer<OracleHeadphonesPlayer>().vanityEquipped = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class OracleHeadphonesPlayer : ModPlayer
|
||||
{
|
||||
public bool vanityEquipped = false;
|
||||
|
||||
public override void ResetEffects()
|
||||
{
|
||||
vanityEquipped = false;
|
||||
}
|
||||
|
||||
public override void FrameEffects()
|
||||
{
|
||||
if (vanityEquipped)
|
||||
{
|
||||
Player.back = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Back);
|
||||
Player.legs = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Legs);
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Body);
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Head);
|
||||
|
||||
//Player.HideAccessories();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 870 B |
|
After Width: | Height: | Size: 1.2 KiB |
@@ -42,7 +42,7 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
{
|
||||
num59 = -40;
|
||||
}
|
||||
int num60 = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)num59, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, Main.rand.NextBool(2) ? 206 : 173, 0f, 0f, 100, default, 2.4f);
|
||||
int num60 = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)num59, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, Main.rand.NextBool() ? 206 : 173, 0f, 0f, 100, default, 2.4f);
|
||||
Main.dust[num60].noGravity = true;
|
||||
Main.dust[num60].velocity *= 0.3f;
|
||||
if (Main.rand.NextBool(10))
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace CalamityMod.Items.Armor.Plaguebringer
|
||||
//On grass, grow flowers
|
||||
if (Main.tile[x, y + 1].TileType == TileID.Grass)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
tile.Get<TileWallWireStateData>().HasTile = true;
|
||||
tile.TileType = TileID.Plants;
|
||||
@@ -90,7 +90,7 @@ namespace CalamityMod.Items.Armor.Plaguebringer
|
||||
//On hallowed grass, grow hallowed flowers
|
||||
else if (Main.tile[x, y + 1].TileType == TileID.HallowedGrass)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
tile.Get<TileWallWireStateData>().HasTile = true;
|
||||
tile.TileType = TileID.HallowedPlants;
|
||||
|
||||
@@ -647,17 +647,8 @@ namespace CalamityMod.Items
|
||||
|
||||
public override bool AltFunctionUse(Item item, Player player)
|
||||
{
|
||||
if (player.Calamity().profanedCrystalBuffs && item.pick == 0 && item.axe == 0 && item.hammer == 0 && item.autoReuse && (item.CountsAsClass<ThrowingDamageClass>() || item.CountsAsClass<MagicDamageClass>() || item.CountsAsClass<RangedDamageClass>() || item.CountsAsClass<MeleeDamageClass>()))
|
||||
if (player.Calamity().profanedCrystalBuffs && item.pick == 0 && item.axe == 0 && item.hammer == 0 && item.autoReuse && (item.CountsAsClass<ThrowingDamageClass>() || item.CountsAsClass<MagicDamageClass>() || item.CountsAsClass<RangedDamageClass>() || item.CountsAsClass<MeleeDamageClass>() || item.CountsAsClass<SummonMeleeSpeedDamageClass>()))
|
||||
{
|
||||
NPC closest = Main.MouseWorld.ClosestNPCAt(1000f, true);
|
||||
if (closest != null)
|
||||
{
|
||||
//TODO look into this, it does not work as expected!
|
||||
//Does not draw the ring, mostly, which leads to uncertainty of it's functionality
|
||||
//Maybe just move it to a whip transform :wires:
|
||||
player.MinionAttackTargetNPC = closest.whoAmI;
|
||||
player.UpdateMinionTarget();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (player.ActiveItem().type == ModContent.ItemType<IgneousExaltation>())
|
||||
@@ -751,7 +742,7 @@ namespace CalamityMod.Items
|
||||
for (int j = 0; j < 22; j++)
|
||||
{
|
||||
Dust dust = Dust.NewDustDirect(Main.projectile[projj].position, Main.projectile[projj].width, Main.projectile[projj].height, DustID.Ice);
|
||||
dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool(2).ToDirectionInt();
|
||||
dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool().ToDirectionInt();
|
||||
dust.noGravity = true;
|
||||
}
|
||||
}
|
||||
@@ -790,9 +781,8 @@ namespace CalamityMod.Items
|
||||
}
|
||||
|
||||
// Conversion for Profaned Soul Crystal
|
||||
// DO NOT CHECK TRANSFORM ELIGIBILITY HERE
|
||||
// It causes issues with actually restricting the transformed attacks when the player fails the ~~vibe check~~ minion requirement check
|
||||
if (modPlayer.profanedCrystalBuffs && item.pick == 0 && item.axe == 0 && item.hammer == 0 && item.autoReuse && (item.CountsAsClass<ThrowingDamageClass>() || item.CountsAsClass<MagicDamageClass>() || item.CountsAsClass<RangedDamageClass>() || item.CountsAsClass<MeleeDamageClass>()))
|
||||
bool autoreuse = item.autoReuse || item.CountsAsClass<SummonMeleeSpeedDamageClass>();
|
||||
if (modPlayer.profanedCrystalBuffs && item.pick == 0 && item.axe == 0 && item.hammer == 0 && autoreuse && (item.CountsAsClass<ThrowingDamageClass>() || item.CountsAsClass<MagicDamageClass>() || item.CountsAsClass<RangedDamageClass>() || item.CountsAsClass<MeleeDamageClass>() || item.CountsAsClass<SummonMeleeSpeedDamageClass>()))
|
||||
return player.altFunctionUse == 0 ? ProfanedSoulCrystal.TransformItemUsage(item, player) : AltFunctionUse(item, player);
|
||||
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace CalamityMod.Items
|
||||
if (item.type == ModContent.ItemType<ShatteredCommunity>())
|
||||
nameLine.OverrideColor = ShatteredCommunity.GetRarityColor();
|
||||
if (item.type == ModContent.ItemType<ProfanedSoulCrystal>())
|
||||
nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(255, 166, 0), new Color(25, 250, 25), 4f); //alternates between emerald green and amber (BanditHueh)
|
||||
nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(255, 166, 0), new Color(25, 250, 25), 6f); //alternates between emerald green and amber (BanditHueh)
|
||||
if (item.type == ModContent.ItemType<TemporalUmbrella>())
|
||||
nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(210, 0, 255), new Color(255, 248, 24), 4f);
|
||||
if (item.type == ModContent.ItemType<Endogenesis>())
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.Items
|
||||
{
|
||||
#region CATEGORY 1: Weapon Balancing
|
||||
{ ItemID.AdamantiteGlaive, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(65), ShootSpeedRatio(1.25f)) },
|
||||
{ ItemID.AdamantiteRepeater, Do(PointBlank, UseExact(18), DamageExact(61)) },
|
||||
{ ItemID.AdamantiteRepeater, Do(PointBlank, UseExact(15)) },
|
||||
{ ItemID.AdamantiteSword, Do(UseTurn, ScaleRatio(1.45f), DamageExact(77)) },
|
||||
{ ItemID.AmberStaff, Do(UseTimeExact(15), UseAnimationExact(45), ReuseDelayExact(15)) },
|
||||
{ ItemID.AmethystStaff, Do(ManaExact(2)) },
|
||||
@@ -63,16 +63,14 @@ namespace CalamityMod.Items
|
||||
{ ItemID.ChainKnife, Do(AutoReuse, DamageRatio(1.34f)) }, // Uses ratios due to remix seed
|
||||
// Charged Blaster Cannon is now an earlier Last Prism-like, so it will probably need careful balance attention.
|
||||
// { ItemID.ChargedBlasterCannon, Do(DamageRatio(1.33f)) },
|
||||
{ ItemID.ChlorophyteArrow, Do(DamageRatio(1.1f)) },
|
||||
{ ItemID.ChlorophyteClaymore, Do(UseMeleeSpeed) },
|
||||
{ ItemID.ChlorophytePartisan, Do(AutoReuse, UseMeleeSpeed, UseRatio(0.8f), DamageExact(70)) },
|
||||
{ ItemID.ChlorophyteSaber, Do(UseMeleeSpeed, DamageExact(80), UseExact(10)) },
|
||||
{ ItemID.ChlorophyteShotbow, Do(PointBlank, DamageExact(80), UseExact(50)) },
|
||||
{ ItemID.ChristmasTreeSword, Do(AutoReuse, UseTurn, UseMeleeSpeed, DamageExact(80), UseExact(30)) },
|
||||
{ ItemID.ClingerStaff, Do(DamageExact(118)) },
|
||||
{ ItemID.ClockworkAssaultRifle, Do(PointBlank, DamageExact(21)) },
|
||||
{ ItemID.CobaltNaginata, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(90)) },
|
||||
{ ItemID.CobaltRepeater, Do(PointBlank, DamageExact(50), UseExact(20)) },
|
||||
{ ItemID.CobaltRepeater, Do(PointBlank, UseExact(20)) },
|
||||
{ ItemID.CobaltSword, Do(UseTurn, ScaleRatio(1.4f), DamageExact(80)) },
|
||||
{ ItemID.CorruptYoyo, Do(AutoReuse, DamageExact(20)) }, // Malaise
|
||||
{ ItemID.CrimsonYoyo, Do(AutoReuse, DamageExact(20)) }, // Artery
|
||||
@@ -111,7 +109,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.FlowerofFire, Do(AutoReuse, ManaExact(7), UseRatio(0.88f)) }, // Uses ratios due to remix seed
|
||||
{ ItemID.FlowerofFrost, Do(AutoReuse, ManaExact(7), UseExact(30), DamageExact(70), ShootSpeedExact(14)) },
|
||||
{ ItemID.FlyingKnife, Do(DamageExact(70)) },
|
||||
{ ItemID.Frostbrand, Do(UseMeleeSpeed, DamageExact(110)) },
|
||||
{ ItemID.Frostbrand, Do(UseMeleeSpeed, DamageExact(88)) },
|
||||
{ ItemID.FrostStaff, Do(DamageExact(160), UseExact(37), ShootSpeedExact(20f)) }, // has 1 extra update
|
||||
{ ItemID.Gatligator, Do(PointBlank, UseExact(6)) },
|
||||
{ ItemID.GoldenShower, Do(DamageExact(44)) },
|
||||
@@ -121,15 +119,15 @@ namespace CalamityMod.Items
|
||||
{ ItemID.GreenPhasesaber, Do(ScaleRatio(1.5f), DamageExact(60)) },
|
||||
{ ItemID.GrenadeLauncher, Do(DamageRatio(1.5f)) },
|
||||
{ ItemID.Gungnir, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(92), ShootSpeedRatio(1.25f)) },
|
||||
{ ItemID.HallowedRepeater, Do(PointBlank, UseExact(14), DamageExact(57)) },
|
||||
{ ItemID.Handgun, Do(PointBlank, UseExact(27), DamageExact(36)) },
|
||||
{ ItemID.HallowedRepeater, Do(PointBlank, UseExact(12)) },
|
||||
{ ItemID.Handgun, Do(PointBlank, UseExact(22), DamageExact(36)) },
|
||||
{ ItemID.HellwingBow, Do(PointBlank, DamageExact(16)) },
|
||||
{ ItemID.HighVelocityBullet, Do(DamageExact(15)) },
|
||||
{ ItemID.IceBlade, Do(UseMeleeSpeed) },
|
||||
{ ItemID.IceBoomerang, Do(DamageExact(25), UseExact(25), ShootSpeedExact(9)) },
|
||||
{ ItemID.IceBoomerang, Do(UseExact(25), ShootSpeedExact(9)) },
|
||||
{ ItemID.IceBow, Do(PointBlank, AutoReuse, DamageRatio(3f), UseRatio(2.5f)) }, // Uses ratios due to remix seed
|
||||
{ ItemID.IceRod, Do(UseExact(6), DamageExact(30), ShootSpeedExact(20)) },
|
||||
{ ItemID.IceSickle, Do(AutoReuse, UseMeleeSpeed, DamageExact(90), ShootSpeedExact(20f)) },
|
||||
{ ItemID.IceSickle, Do(AutoReuse, UseMeleeSpeed, DamageExact(84), ShootSpeedExact(20f)) },
|
||||
{ ItemID.InfernoFork, Do(DamageRatio(1.2f)) },
|
||||
{ ItemID.InfluxWaver, Do(UseMeleeSpeed, DamageExact(80), UseExact(25)) },
|
||||
{ ItemID.IronShortsword, Do(AutoReuse, TrueMelee, DamageExact(10)) },
|
||||
@@ -158,18 +156,18 @@ namespace CalamityMod.Items
|
||||
{ ItemID.MushroomSpear, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(100)) },
|
||||
{ ItemID.Musket, Do(PointBlank, DamageExact(22)) },
|
||||
{ ItemID.MythrilHalberd, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(95), ShootSpeedRatio(1.25f)) },
|
||||
{ ItemID.MythrilRepeater, Do(PointBlank, DamageExact(58), UseExact(19)) },
|
||||
{ ItemID.MythrilRepeater, Do(PointBlank, UseExact(18)) },
|
||||
{ ItemID.MythrilSword, Do(UseTurn, ScaleRatio(1.45f), DamageExact(100)) },
|
||||
{ ItemID.NorthPole, Do(AutoReuse, UseMeleeSpeed) },
|
||||
{ ItemID.OrangePhaseblade, Do(AutoReuse, UseTurn, DamageExact(32)) },
|
||||
{ ItemID.OrangePhasesaber, Do(ScaleRatio(1.5f), DamageExact(60)) },
|
||||
{ ItemID.OrichalcumHalberd, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(98), ShootSpeedRatio(1.25f)) },
|
||||
{ ItemID.OrichalcumRepeater, Do(PointBlank, DamageExact(86), UseExact(27)) },
|
||||
{ ItemID.OrichalcumRepeater, Do(PointBlank, DamageExact(48)) },
|
||||
{ ItemID.OrichalcumSword, Do(UseTurn, ScaleRatio(1.45f), DamageExact(82)) },
|
||||
{ ItemID.PainterPaintballGun, Do(PointBlank, DamageExact(8)) },
|
||||
{ ItemID.PaladinsHammer, Do(DamageExact(100), ShootSpeedExact(23)) },
|
||||
{ ItemID.PalladiumPike, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(96)) },
|
||||
{ ItemID.PalladiumRepeater, Do(PointBlank, UseExact(25), DamageExact(75)) },
|
||||
{ ItemID.PalladiumRepeater, Do(PointBlank, DamageExact(45)) },
|
||||
{ ItemID.PalladiumSword, Do(UseTurn, ScaleRatio(1.4f), DamageExact(100)) },
|
||||
{ ItemID.PearlwoodBow, Do(AutoReuse, PointBlank, DamageRatio(2.31f), UseDelta(+8), ShootSpeedDelta(+3.4f), KnockbackDelta(+1f)) },
|
||||
{ ItemID.PearlwoodSword, Do(UseTurn, DamageRatio(1.5f)) },
|
||||
@@ -231,7 +229,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.TheRottedFork, Do(AutoReuse, TrueMelee, DamageExact(20)) },
|
||||
{ ItemID.TheUndertaker, Do(PointBlank, AutoReuse, DamageExact(15)) },
|
||||
{ ItemID.ThunderSpear, Do(AutoReuse, UseMeleeSpeed) }, // Storm Spear
|
||||
{ ItemID.TitaniumRepeater, Do(PointBlank, UseExact(29), DamageExact(122)) },
|
||||
{ ItemID.TitaniumRepeater, Do(PointBlank, DamageExact(52)) },
|
||||
{ ItemID.TitaniumSword, Do(UseTurn, ScaleRatio(1.45f), DamageExact(77)) },
|
||||
{ ItemID.TitaniumTrident, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(72), ShootSpeedRatio(1.25f)) },
|
||||
{ ItemID.TopazStaff, Do(ManaExact(2)) },
|
||||
@@ -417,6 +415,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.Blowpipe, pointBlank },
|
||||
{ ItemID.BorealWoodBow, pointBlank },
|
||||
{ ItemID.ChainGun, pointBlank },
|
||||
{ ItemID.ChlorophyteShotbow, pointBlank },
|
||||
{ ItemID.CopperBow, pointBlank },
|
||||
{ ItemID.DartPistol, pointBlank },
|
||||
{ ItemID.DD2PhoenixBow, pointBlank }, // Phantom Phoenix
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
|
||||
{
|
||||
velocity = velocity.RotatedByRandom(MathHelper.ToRadians(10f));
|
||||
int shotType = ModContent.ProjectileType<DrizzlefishFireball>();
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
shotType = ModContent.ProjectileType<DrizzlefishFire>();
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.Tools
|
||||
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
Dust d = CalamityUtils.MeleeDustHelper(player, Main.rand.NextBool(2) ? ModContent.DustType<AstralOrange>() : ModContent.DustType<AstralBlue>(), 0.48f, 50, 78, -0.1f, 0.1f);
|
||||
Dust d = CalamityUtils.MeleeDustHelper(player, Main.rand.NextBool() ? ModContent.DustType<AstralOrange>() : ModContent.DustType<AstralBlue>(), 0.48f, 50, 78, -0.1f, 0.1f);
|
||||
if (d != null)
|
||||
{
|
||||
d.customData = 0.02f;
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace CalamityMod.Items.Tools
|
||||
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
Dust d = CalamityUtils.MeleeDustHelper(player, Main.rand.NextBool(2) ? ModContent.DustType<AstralOrange>() : ModContent.DustType<AstralBlue>(), 0.56f, 40, 65, -0.13f, 0.13f);
|
||||
Dust d = CalamityUtils.MeleeDustHelper(player, Main.rand.NextBool() ? ModContent.DustType<AstralOrange>() : ModContent.DustType<AstralBlue>(), 0.56f, 40, 65, -0.13f, 0.13f);
|
||||
if (d != null)
|
||||
{
|
||||
d.customData = 0.02f;
|
||||
|
||||
@@ -99,6 +99,17 @@ namespace CalamityMod.Items.TreasureBags.MiscGrabBags
|
||||
}
|
||||
|
||||
itemLoot.AddIf(getsRedBow, ModContent.ItemType<RedBow>());
|
||||
|
||||
// Mishiro dev vanity
|
||||
// Name specific: "Amber" or "Mishiro"
|
||||
static bool getsOracleHeadphones(DropAttemptInfo info)
|
||||
{
|
||||
string playerName = info.player.name;
|
||||
return playerName is "Amber" or "Mishiro";
|
||||
}
|
||||
|
||||
itemLoot.AddIf(getsOracleHeadphones, ModContent.ItemType<OracleHeadphones>());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,12 +46,12 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
value2.Normalize();
|
||||
value2 *= Item.shootSpeed;
|
||||
float num91 = (float)Main.rand.Next(10, 50) * 0.001f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
num91 *= -1f;
|
||||
}
|
||||
float num92 = (float)Main.rand.Next(10, 50) * 0.001f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
num92 *= -1f;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
counter++;
|
||||
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Vector2 speed = velocity.RotatedBy(MathHelper.ToRadians(Main.rand.Next(-15, 16)));
|
||||
speed.Normalize();
|
||||
@@ -51,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
velocity.Y += Main.rand.Next(-40, 41) * 0.05f;
|
||||
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, counter % 2 == 0 ? 1f : 0f);
|
||||
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int noteProj = Utils.SelectRandom(Main.rand, new int[]
|
||||
{
|
||||
|
||||
@@ -51,12 +51,12 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
value2.Normalize();
|
||||
value2 *= Item.shootSpeed;
|
||||
float num91 = (float)Main.rand.Next(10, 80) * 0.001f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
num91 *= -1f;
|
||||
}
|
||||
float num92 = (float)Main.rand.Next(10, 80) * 0.001f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
num92 *= -1f;
|
||||
}
|
||||
|
||||
@@ -53,12 +53,12 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
value2 *= Item.shootSpeed;
|
||||
int projChoice = Main.rand.Next(7);
|
||||
float num91 = (float)Main.rand.Next(10, 160) * 0.001f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
num91 *= -1f;
|
||||
}
|
||||
float num92 = (float)Main.rand.Next(10, 160) * 0.001f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
num92 *= -1f;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
type = ModContent.ProjectileType<WyvernFeatherGreen>();
|
||||
}
|
||||
else if (Main.rand.NextBool(2))
|
||||
else if (Main.rand.NextBool())
|
||||
{
|
||||
type = ModContent.ProjectileType<WyvernFeatherPink>();
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Dust d = CalamityUtils.MeleeDustHelper(player, Main.rand.NextBool(2) ? ModContent.DustType<AstralOrange>() : ModContent.DustType<AstralBlue>(), 0.7f, 55, 110, -0.07f, 0.07f);
|
||||
Dust d = CalamityUtils.MeleeDustHelper(player, Main.rand.NextBool() ? ModContent.DustType<AstralOrange>() : ModContent.DustType<AstralBlue>(), 0.7f, 55, 110, -0.07f, 0.07f);
|
||||
if (d != null)
|
||||
{
|
||||
d.customData = 0.03f;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.width = 94;
|
||||
Item.height = 92;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.damage = 455;
|
||||
Item.damage = 432;
|
||||
Item.knockBack = 2.5f;
|
||||
Item.useAnimation = 19;
|
||||
Item.useTime = 19;
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
int idx = Dust.NewDust(target.position, target.width, target.height, DustID.Blood, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[idx].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[idx].scale = 0.5f;
|
||||
Main.dust[idx].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
type = Main.rand.NextBool(2) ? type : ModContent.ProjectileType<LightBeam>();
|
||||
type = Main.rand.NextBool() ? type : ModContent.ProjectileType<LightBeam>();
|
||||
Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, (int)(damage * 0.8), knockback, player.whoAmI);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
num78 *= num80;
|
||||
num79 *= num80;
|
||||
int num146 = 4;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
num146++;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, Main.rand.NextBool(2) ? 164 : 229);
|
||||
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, Main.rand.NextBool() ? 164 : 229);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
num78 *= num80;
|
||||
num79 *= num80;
|
||||
int num146 = 4;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
num146++;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
xDist *= speedMult;
|
||||
yDist *= speedMult;
|
||||
int knifeAmt = 3;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
knifeAmt++;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 89, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
@@ -79,7 +79,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 89, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -15,12 +15,12 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public new string LocalizationCategory => "Items.Weapons.Melee";
|
||||
|
||||
// Held stats
|
||||
public const int HeldDefense = 12;
|
||||
public const int DisableDashDuration = 120;
|
||||
public const int HeldDefense = 16;
|
||||
public const int DisableDashDuration = 90;
|
||||
|
||||
public int ThrownShieldID = ModContent.ProjectileType<StygianShieldThrown>();
|
||||
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(HeldDefense, DisableDashDuration / 60);
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(HeldDefense, (DisableDashDuration / 60D).ToString("N1"));
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.channel = true;
|
||||
Item.damage = 200;
|
||||
Item.damage = 250;
|
||||
Item.DamageType = DamageClass.MeleeNoSpeed;
|
||||
Item.useAnimation = Item.useTime = 40; // This is only for the "Very slow" tooltip. The real use time should be faster
|
||||
Item.shoot = ModContent.ProjectileType<StygianShieldAttack>();
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
if (target.life <= (target.lifeMax * 0.2f) && target.canGhostHeal)
|
||||
{
|
||||
if (!CalamityPlayer.areThereAnyDamnBosses || Main.rand.NextBool(2))
|
||||
if (!CalamityPlayer.areThereAnyDamnBosses || Main.rand.NextBool())
|
||||
{
|
||||
int heartDrop = CalamityPlayer.areThereAnyDamnBosses ? 1 : Main.rand.Next(1, 3);
|
||||
for (int i = 0; i < heartDrop; i++)
|
||||
@@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.width = 42;
|
||||
Item.height = 40;
|
||||
Item.DamageType = DamageClass.MeleeNoSpeed;
|
||||
Item.damage = 250;
|
||||
Item.damage = 220;
|
||||
Item.knockBack = 7.5f;
|
||||
Item.useTime = 20;
|
||||
Item.useAnimation = 20;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 50;
|
||||
Item.damage = 40;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 54;
|
||||
Item.height = 26;
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
for (int i = 0; i < icicleAmt; i++)
|
||||
{
|
||||
Vector2 perturbedspeed = new Vector2(velocity.X + Main.rand.Next(-3,4), velocity.Y + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread2));
|
||||
Projectile.NewProjectile(source, position, perturbedspeed, (Main.rand.NextBool(2) ? ModContent.ProjectileType<Valaricicle>() : ModContent.ProjectileType<Valaricicle2>()), damage, 0f, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(source, position, perturbedspeed, (Main.rand.NextBool() ? ModContent.ProjectileType<Valaricicle>() : ModContent.ProjectileType<Valaricicle2>()), damage, 0f, player.whoAmI, 0f, 0f);
|
||||
spread2 -= Main.rand.Next(1,4);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
if (player.altFunctionUse != 2)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
type = ModContent.ProjectileType<CatastropheSummon>();
|
||||
int p = Projectile.NewProjectile(source, Main.MouseWorld, Vector2.Zero, type, damage, knockback, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(p))
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
for (int j = 0; j < 22; j++)
|
||||
{
|
||||
Dust dust = Dust.NewDustDirect(Main.projectile[i].position, Main.projectile[i].width, Main.projectile[i].height, DustID.Ice);
|
||||
dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool(2).ToDirectionInt();
|
||||
dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool().ToDirectionInt();
|
||||
dust.noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
for (int j = 0; j < 22; j++)
|
||||
{
|
||||
Dust dust = Dust.NewDustDirect(Main.projectile[i].position, Main.projectile[i].width, Main.projectile[i].height, 6);
|
||||
dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool(2).ToDirectionInt();
|
||||
dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool().ToDirectionInt();
|
||||
dust.noGravity = true;
|
||||
}
|
||||
}
|
||||
@@ -79,7 +79,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
for (int j = 0; j < 22; j++)
|
||||
{
|
||||
Dust dust = Dust.NewDustDirect(Main.projectile[i].position, Main.projectile[i].width, Main.projectile[i].height, 6);
|
||||
dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool(2).ToDirectionInt();
|
||||
dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool().ToDirectionInt();
|
||||
dust.noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -791,19 +791,33 @@ ProfanedCrystalBuff: {
|
||||
Description: You are an emissary of the profaned goddess now!
|
||||
Offense: The {0} empowers your offensive capabilities
|
||||
Lava: heat of the lava
|
||||
Day: light of the sun
|
||||
Day: light of day
|
||||
Defense: The {0} your flames, empowering your defensive capabilities
|
||||
Water: water douses
|
||||
Honey: honey cools
|
||||
Night: darkness of night cools
|
||||
Enrage: Your weakened life force fuels your desperate attacks
|
||||
NerfedEndo: An ascended ice construct is suppressing your true potential...
|
||||
NerfedHat: A magical hat overwhelms your senses, squandering your true potential...
|
||||
Enrage: In the absence of the day's warmth, your flames burn brighter
|
||||
Empowered:
|
||||
'''
|
||||
By forgoing any additional minion support, your full potential has been unleashed
|
||||
[c/F05A5A:You are the last ace, in the lost hand of this campaign.]
|
||||
'''
|
||||
LockedSlots: Your profaned soul is constrained by your insufficient summoning powers
|
||||
LockedExos: The soul within this crystal has been defiled by overwhelming energy waves from dangerous mechanations
|
||||
LockedSCal: The profaned soul within has been defiled by the powerful magic of a supreme witch
|
||||
}
|
||||
|
||||
ProfanedCrystalWhipDebuff: {
|
||||
DisplayName: Profaned Crystal Whip Debuff
|
||||
Description: Your flesh has been torn asunder by a profaned crystalline whip!
|
||||
}
|
||||
|
||||
ProfanedCrystalWhipBuff: {
|
||||
DisplayName: Profaned Crystal Whip Empowerment
|
||||
Description: The guardians have been empowered by the profaned crystal whip!
|
||||
Empowered: Their full potential has been unleashed, and nobody is safe from their wrath
|
||||
}
|
||||
|
||||
RageMode: {
|
||||
DisplayName: Rage Mode
|
||||
Description: Total damage multiplied by 1.35x
|
||||
|
||||
@@ -392,7 +392,7 @@ CorruptFlask: {
|
||||
Tooltip:
|
||||
'''
|
||||
4% increased damage reduction and +6 defense while in the corruption
|
||||
Grants immunity to the Cursed Inferno debuff
|
||||
Grants immunity to the Brain Rot debuff
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -537,8 +537,7 @@ DimensionalSoulArtifact: {
|
||||
Tooltip:
|
||||
'''
|
||||
Power
|
||||
Boosts all damage by 25%, but at what cost?
|
||||
Increases all damage taken by 15%
|
||||
Boosts all damage by 25%, but at the cost of increasing damage taken by 15%
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1278,14 +1277,15 @@ ProfanedSoulCrystal: {
|
||||
Reject: Merchants will reject a defiled soul such as this.
|
||||
FullTooltip:
|
||||
'''
|
||||
Requires 10 minion slots to use in order to grant the following effects
|
||||
Requires {0} minion slots to use in order to grant the following effects
|
||||
All non-summon weapons are converted into powerful summon variations
|
||||
Falling below 50% life will empower these attacks
|
||||
Having no other minions will empower these attacks
|
||||
[c/F05A5A:Transforms Melee attacks into a barrage of spears]
|
||||
[c/3A83E4:Transforms Magic attacks into a powerful splitting fireball for {0} mana per cast]
|
||||
[c/3A83E4:Transforms Magic attacks into a powerful splitting fireball for {1} mana per cast]
|
||||
[c/85E092:Transforms Ranged attacks into a flurry of fireballs and meteors]
|
||||
[c/E94571:Transforms Rogue attacks into a deadly crystalline spiral]
|
||||
Summons and empowers the profaned babs to fight alongside you
|
||||
[c/E299FF:Transforms Whip attacks into an empowering profaned crystal whip]
|
||||
Summons and empowers the profaned soul guardians to fight alongside you
|
||||
Provides buffs depending on the time of day
|
||||
Thinking back, it was a boring life
|
||||
[c/FFBF49:And so we burn it all in the name of purity]
|
||||
@@ -1888,6 +1888,11 @@ RedBow: {
|
||||
Tooltip: "'Pelusa's favorite bow'"
|
||||
}
|
||||
|
||||
OracleHeadphones: {
|
||||
DisplayName: Oracle Headphones
|
||||
Tooltip: "'Hey game's over!'"
|
||||
}
|
||||
|
||||
Popo: {
|
||||
DisplayName: Magic Scarf and Hat
|
||||
Tooltip:
|
||||
|
||||
@@ -515,7 +515,7 @@ GleamingDagger: {
|
||||
}
|
||||
|
||||
GodsParanoia: {
|
||||
DisplayName: God's Paranoia
|
||||
DisplayName: Gods' Paranoia
|
||||
Tooltip:
|
||||
'''
|
||||
Hurls up to 10 speedy homing spiky balls
|
||||
|
||||
@@ -166,8 +166,10 @@ MidnightSunUFO.DisplayName: Midnight Sun UFO
|
||||
MiniGuardianAttack.DisplayName: Offensive Guardian
|
||||
MiniGuardianDefense.DisplayName: Defensive Guardian
|
||||
MiniGuardianHealer.DisplayName: Healer Guardian
|
||||
MiniGuardianHolyRay.DisplayName: Bab Holy Ray
|
||||
MiniGuardianRock.DisplayName: Rocky Road
|
||||
MiniGuardianSpear.DisplayName: Bab Spear
|
||||
MiniGuardianStars.DisplayName: Bab Star
|
||||
MiniSandShark.DisplayName: Mini Sand Shark
|
||||
MK2FlaskSummon.DisplayName: Fuel Cell Flask
|
||||
MK2RocketHoming.DisplayName: Plague Rocket
|
||||
@@ -315,4 +317,7 @@ HopeShredder.DisplayName: Hope Shredder
|
||||
HopeShredderArrow.DisplayName: Hope Shredder Arrow
|
||||
HopeShredderArrowSplit.DisplayName: Hope Shredder Split Arrow
|
||||
StellarTorusSummon.DisplayName: Stellar Torus Summon
|
||||
StellarTorusBeam.DisplayName: Stellar Torus Beam
|
||||
StellarTorusBeam.DisplayName: Stellar Torus Beam
|
||||
MiniGuardianFireball.DisplayName: Mini Guardian Fireball
|
||||
MiniGuardianFireballSplit.DisplayName: Mini Guardian Fireball Split
|
||||
ProfanedCrystalWhip.DisplayName: Profaned Crystal Whip
|
||||
@@ -119,7 +119,7 @@ namespace CalamityMod.NPCs.Abyss
|
||||
int min = 6;
|
||||
int max = 9;
|
||||
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
num1250 += Main.rand.Next(min, max);
|
||||
else
|
||||
num1250 -= Main.rand.Next(min, max);
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
Main.dust[dust].velocity *= 1.1f;
|
||||
Main.dust[dust].velocity.Y += 0.25f;
|
||||
Main.dust[dust].noLight = true;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.5f;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
{
|
||||
if (NPC.ai[0] == 0f)
|
||||
{
|
||||
NPC.ai[0] = Main.rand.NextBool(2).ToDirectionInt();
|
||||
NPC.ai[0] = Main.rand.NextBool().ToDirectionInt();
|
||||
NPC.netUpdate = true;
|
||||
}
|
||||
if (NPC.collideX)
|
||||
|
||||
@@ -492,7 +492,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
int damageBoom = 200;
|
||||
for (iBoom = 0; iBoom < 25; iBoom++)
|
||||
{
|
||||
int projectileType = Main.rand.NextBool(2) ? ModContent.ProjectileType<SulphuricAcidMist>() : ModContent.ProjectileType<SulphuricAcidBubble>();
|
||||
int projectileType = Main.rand.NextBool() ? ModContent.ProjectileType<SulphuricAcidMist>() : ModContent.ProjectileType<SulphuricAcidBubble>();
|
||||
offsetAngleBoom = startAngleBoom + deltaAngleBoom * (iBoom + iBoom * iBoom) / 2f + 32f * iBoom;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
@@ -504,7 +504,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
{
|
||||
int num622 = Dust.NewDust(NPC.position, NPC.width, NPC.height, 31, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -260,7 +260,7 @@ namespace CalamityMod.NPCs.Astral
|
||||
{
|
||||
int purple = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[purple].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[purple].scale = 0.5f;
|
||||
Main.dust[purple].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace CalamityMod.NPCs.Astral
|
||||
}
|
||||
else if (NPC.ai[1] >= 140f) //oozin dust at the "mouth"
|
||||
{
|
||||
int dustType = Main.rand.NextBool(2) ? ModContent.DustType<AstralOrange>() : ModContent.DustType<AstralBlue>();
|
||||
int dustType = Main.rand.NextBool() ? ModContent.DustType<AstralOrange>() : ModContent.DustType<AstralBlue>();
|
||||
int d = Dust.NewDust(spawnPoint - new Vector2(5), 10, 10, dustType);
|
||||
Main.dust[d].velocity = NPC.velocity * 0.3f;
|
||||
Main.dust[d].customData = true;
|
||||
@@ -284,7 +284,7 @@ namespace CalamityMod.NPCs.Astral
|
||||
for (int i = 0; i < numDust; i++)
|
||||
{
|
||||
Vector2 vel = (angle + Main.rand.NextFloat(-0.04f, 0.04f)).ToRotationVector2();
|
||||
int dustType = Main.rand.NextBool(2) ? ModContent.DustType<AstralOrange>() : ModContent.DustType<AstralBlue>();
|
||||
int dustType = Main.rand.NextBool() ? ModContent.DustType<AstralOrange>() : ModContent.DustType<AstralBlue>();
|
||||
Dust d = Dust.NewDustPerfect(NPC.Center, dustType, vel * Main.rand.NextFloat(1.8f, 2.2f));
|
||||
d.customData = NPC;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace CalamityMod.NPCs.Astral
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 2 * hit.HitDirection, -2f);
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].scale = 1.2f * NPC.scale;
|
||||
|
||||
@@ -444,7 +444,7 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -169,7 +169,7 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1f);
|
||||
Main.dust[dust].velocity *= 1.66f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[dust].scale = 0.5f;
|
||||
Main.dust[dust].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
@@ -355,7 +355,7 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, ModContent.DustType<AstralOrange>(), 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -156,7 +156,7 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -268,7 +268,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -279,7 +279,7 @@ namespace CalamityMod.NPCs.CalClone
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace CalamityMod.NPCs.CalClone
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace CalamityMod.NPCs.CalClone
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace CalamityMod.NPCs.CalClone
|
||||
{
|
||||
int red = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[red].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[red].scale = 0.5f;
|
||||
Main.dust[red].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -837,12 +837,12 @@ namespace CalamityMod.NPCs
|
||||
int min = 12;
|
||||
int max = 16;
|
||||
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
playerPosX += Main.rand.Next(min, max);
|
||||
else
|
||||
playerPosX -= Main.rand.Next(min, max);
|
||||
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
playerPosY += Main.rand.Next(min, max);
|
||||
else
|
||||
playerPosY -= Main.rand.Next(min, max);
|
||||
@@ -3169,7 +3169,7 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int type = Main.rand.NextBool(2) ? ModContent.ProjectileType<AstralLaser>() : ModContent.ProjectileType<AstralFlame>();
|
||||
int type = Main.rand.NextBool() ? ModContent.ProjectileType<AstralLaser>() : ModContent.ProjectileType<AstralFlame>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
int totalProjectiles = bossRush ? 14 : death ? 12 : revenge ? 10 : expertMode ? 8 : 6;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
|
||||
@@ -720,7 +720,7 @@ namespace CalamityMod.NPCs
|
||||
int dustIdx = Dust.NewDust(spawnPosiion, 1, 1, 27, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dustIdx].velocity = -dustVelocity * 0.3f;
|
||||
Main.dust[dustIdx].alpha = 100;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[dustIdx].noGravity = true;
|
||||
Main.dust[dustIdx].scale += 0.3f;
|
||||
@@ -5497,7 +5497,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
if (npc.type == NPCID.Necromancer || npc.type == NPCID.NecromancerArmored)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int num121 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 173, 0f, 0f, 0, default(Color), 1f);
|
||||
Dust dust = Main.dust[num121];
|
||||
@@ -5507,7 +5507,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
else if (npc.type == NPCID.DiabolistRed || npc.type == NPCID.DiabolistWhite)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int num122 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 174, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 1f);
|
||||
Dust dust = Main.dust[num122];
|
||||
@@ -5519,7 +5519,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
else if (npc.type == NPCID.RaggedCaster || npc.type == NPCID.RaggedCasterOpenCoat)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int num123 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 175, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 0.1f);
|
||||
Dust dust = Main.dust[num123];
|
||||
@@ -5535,7 +5535,7 @@ namespace CalamityMod.NPCs
|
||||
Lighting.AddLight(npc.Top, 0.6f, 0.6f, 0.3f);
|
||||
return false;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int num124 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 6, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 2f);
|
||||
Dust dust = Main.dust[num124];
|
||||
@@ -6627,13 +6627,13 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
npc.noGravity = false;
|
||||
npc.noTileCollide = false;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int sand = Dust.NewDust(new Vector2(npc.position.X - 4f, npc.position.Y + (float)npc.height - 8f), npc.width + 8, 24, 32, 0f, npc.velocity.Y / 2f, 0, default(Color), 1f);
|
||||
Dust dust = Main.dust[sand];
|
||||
dust.velocity.X *= 0.4f;
|
||||
dust.velocity.Y *= -1f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
dust.noGravity = true;
|
||||
dust.scale += 0.2f;
|
||||
|
||||
@@ -7,6 +7,7 @@ using CalamityMod.Buffs;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.Summon.Whips;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Events;
|
||||
@@ -59,6 +60,7 @@ using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.GameContent;
|
||||
@@ -3841,8 +3843,11 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
for (int k = 0; k < npc.buffImmune.Length; k++)
|
||||
{
|
||||
npc.buffImmune[k] = true;
|
||||
if (!BuffID.Sets.IsAnNPCWhipDebuff[k])
|
||||
npc.buffImmune[k] = true;
|
||||
}
|
||||
NPCDebuffImmunityData debuffData = new NPCDebuffImmunityData { ImmuneToAllBuffsThatAreNotWhips = true };
|
||||
NPCID.Sets.DebuffImmunitySets[npc.type] = debuffData;
|
||||
|
||||
if (npc.townNPC || NPCID.Sets.ActsLikeTownNPC[npc.type])
|
||||
{
|
||||
@@ -4729,6 +4734,23 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
}
|
||||
//BuffType cannot be used in switch case, so that has to be handled outside of it
|
||||
//Verify that the owner of the proj has psc state higher or equal to psc buffs
|
||||
if (npc.HasBuff<ProfanedCrystalWhipDebuff>() && Main.player[proj.owner].Calamity().pscState >= (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Buffs)
|
||||
{
|
||||
var empowered = Main.player[proj.owner].Calamity().pscState == (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Empowered;
|
||||
//20% is balanced for non empowered, while 40% helps ensure psc remains balanced at empowered tier
|
||||
//Some PSC projectiles receive a reduced amount of benefit from this, for balancing purposes
|
||||
modifiers.ScalingBonusDamage += (empowered ? 0.4f : 0.2f) * TagDamageMult;
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
var color = ProvUtils.GetProjectileColor((int)(Main.dayTime ? Providence.Providence.BossMode.Day : Providence.Providence.BossMode.Night), 0);
|
||||
float power = Math.Min(npc.height / 100f, 3f);
|
||||
var position = new Vector2(Main.rand.NextFloat(npc.Left.X, npc.Right.X), Main.rand.NextFloat(npc.Top.Y, npc.Bottom.Y));
|
||||
var particle = new FlameParticle(position, 50, 0.25f, power, color * (Main.dayTime ? 1f : 1.25f), color * (Main.dayTime ? 1.25f : 1f));
|
||||
GeneralParticleHandler.SpawnParticle(particle);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -5053,8 +5075,8 @@ namespace CalamityMod.NPCs
|
||||
Vector2 iceLabCenter = CalamityWorld.IceLabCenter / 16f;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
int checkPositionX = (int)(playerCenterX + Main.rand.Next(30, 54) * Main.rand.NextBool(2).ToDirectionInt());
|
||||
int checkPositionY = (int)(playerCenterY + Main.rand.Next(24, 45) * Main.rand.NextBool(2).ToDirectionInt());
|
||||
int checkPositionX = (int)(playerCenterX + Main.rand.Next(30, 54) * Main.rand.NextBool().ToDirectionInt());
|
||||
int checkPositionY = (int)(playerCenterY + Main.rand.Next(24, 45) * Main.rand.NextBool().ToDirectionInt());
|
||||
Vector2 checkPosition = new Vector2(checkPositionX, checkPositionY);
|
||||
|
||||
Tile aboveSpawnTile = CalamityUtils.ParanoidTileRetrieval(checkPositionX, checkPositionY - 1);
|
||||
@@ -5352,7 +5374,7 @@ namespace CalamityMod.NPCs
|
||||
// TODO -- These debuff visuals cannot be moved because they correspond to vanilla debuffs
|
||||
if (electrified > 0)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Dust.NewDustDirect(npc.position, npc.width, npc.height, 226, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), 0, default, 0.35f);
|
||||
}
|
||||
@@ -5365,7 +5387,7 @@ namespace CalamityMod.NPCs
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.1f;
|
||||
Main.dust[dust].velocity.Y += 0.25f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.5f;
|
||||
@@ -5380,7 +5402,7 @@ namespace CalamityMod.NPCs
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.1f;
|
||||
Main.dust[dust].velocity.Y += 0.25f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.5f;
|
||||
|
||||
@@ -1003,7 +1003,7 @@ namespace CalamityMod.NPCs
|
||||
chat = CalamityUtils.GetTextValue("Vanilla.DryadChat.DarksunEclipse");
|
||||
else if (Main.rand.NextBool(5) && Main.LocalPlayer.ZoneGlowshroom)
|
||||
{
|
||||
if (Main.rand.NextBool(2) && fapsol != -1)
|
||||
if (Main.rand.NextBool() && fapsol != -1)
|
||||
chat = CalamityUtils.GetText("Vanilla.DryadChat.DrunkPrincessShroom").Format(Main.npc[fapsol].GivenName);
|
||||
else
|
||||
chat = CalamityUtils.GetTextValue("Vanilla.DryadChat.Mushroom");
|
||||
@@ -1066,7 +1066,7 @@ namespace CalamityMod.NPCs
|
||||
chat = CalamityUtils.GetTextValue("Vanilla.PainterChat.Crimson");
|
||||
if (Main.rand.NextBool(4) && Main.LocalPlayer.ZoneSnow)
|
||||
{
|
||||
if (Main.rand.NextBool(2) && permadong != -1)
|
||||
if (Main.rand.NextBool() && permadong != -1)
|
||||
chat = CalamityUtils.GetText("Vanilla.PainterChat.Archmage").Format(Main.npc[permadong].GivenName);
|
||||
else
|
||||
chat = CalamityUtils.GetTextValue("Vanilla.PainterChat.Tundra");
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.NPCs
|
||||
curPolarity--;
|
||||
|
||||
//Polarity particles
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Color sparkColor = AdamantiteParticleAccelerator.LightColors[CurPolarity < 0 ? 1 : 0];
|
||||
Particle spark = new ElectricSpark(npc.Center + Main.rand.NextVector2Circular(npc.width / 2f, npc.height / 2f), Main.rand.NextVector2CircularEdge(20f, 20f) * 0.4f, Color.Lerp(Color.White, sparkColor, 0.4f), sparkColor, Main.rand.NextFloat(0.5f, 1.2f), Main.rand.Next(20, 40), bloomScale: 2.5f);
|
||||
|
||||
@@ -288,7 +288,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
Main.dust[num622].noGravity = true;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -898,7 +898,7 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 56, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -329,7 +329,7 @@ namespace CalamityMod.NPCs.Crags
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -816,12 +816,12 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
int min = 16;
|
||||
int max = 20;
|
||||
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
num1250 += Main.rand.Next(min, max);
|
||||
else
|
||||
num1250 -= Main.rand.Next(min, max);
|
||||
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
num1251 += Main.rand.Next(min, max);
|
||||
else
|
||||
num1251 -= Main.rand.Next(min, max);
|
||||
@@ -1254,7 +1254,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -169,7 +169,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, dusttype, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -399,7 +399,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -484,7 +484,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
|
||||
@@ -933,7 +933,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X - spawnOffset, targetPosY + shotSpacing_Phase2[3], laserVelocity, 0f, type, damage, 0f, Main.myPlayer);
|
||||
}
|
||||
|
||||
shotSpacing_Phase2[3] -= Main.rand.NextBool(2) ? 180 : 200;
|
||||
shotSpacing_Phase2[3] -= Main.rand.NextBool() ? 180 : 200;
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
@@ -2813,7 +2813,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
|
||||
|
||||