some minor refactors
This commit is contained in:
1 parent
0610a96ccc
commit
b39ec21f30
1 file changed
+24
-24
+24
-24
@@ -2788,8 +2788,8 @@ namespace CalamityMod.CalPlayer
|
||||
blunderBoosterDash = 15;
|
||||
blunderBoosterDirection = player.direction;
|
||||
rogueStealth -= rogueStealthMax * 0.25f;
|
||||
Main.PlaySound(2, player.position, 66);
|
||||
Main.PlaySound(2, player.position, 34);
|
||||
Main.PlaySound(SoundID.Item66, player.Center);
|
||||
Main.PlaySound(SoundID.Item34, player.Center);
|
||||
}
|
||||
else if (plaguedFuelPack)
|
||||
{
|
||||
@@ -2797,8 +2797,8 @@ namespace CalamityMod.CalPlayer
|
||||
plaguedFuelPackDash = 10;
|
||||
plaguedFuelPackDirection = player.direction;
|
||||
rogueStealth -= rogueStealthMax * 0.25f;
|
||||
Main.PlaySound(SoundID.Item, player.position, 66);
|
||||
Main.PlaySound(SoundID.Item, player.position, 34);
|
||||
Main.PlaySound(SoundID.Item66, player.Center);
|
||||
Main.PlaySound(SoundID.Item34, player.Center);
|
||||
}
|
||||
}
|
||||
if (CalamityMod.TarraHotKey.JustPressed)
|
||||
@@ -2931,10 +2931,10 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
for (int l = 0; l < Main.maxNPCs; l++)
|
||||
{
|
||||
NPC nPC = Main.npc[l];
|
||||
if (nPC.active && !nPC.friendly && !nPC.dontTakeDamage && Vector2.Distance(player.Center, nPC.Center) <= 3000f)
|
||||
NPC npc = Main.npc[l];
|
||||
if (npc.active && !npc.friendly && !npc.dontTakeDamage && Vector2.Distance(player.Center, npc.Center) <= 3000f)
|
||||
{
|
||||
nPC.AddBuff(ModContent.BuffType<Enraged>(), 600, false);
|
||||
npc.AddBuff(ModContent.BuffType<Enraged>(), 600, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2970,7 +2970,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
if (prismaticSet && !prismaticCooldown && prismaticLasers == 0)
|
||||
if (prismaticSet && !prismaticCooldown && prismaticLasers <= 0)
|
||||
prismaticLasers = CalamityUtils.SecondsToFrames(35f);
|
||||
}
|
||||
if (CalamityMod.AstralArcanumUIHotkey.JustPressed && astralArcanum)
|
||||
@@ -3531,8 +3531,8 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
player.meleeSpeed += meleeSpeedMult;
|
||||
|
||||
if (player.inventory[player.selectedItem].type == ModContent.ItemType<AstralBlade>() || player.inventory[player.selectedItem].type == ModContent.ItemType<MantisClaws>() ||
|
||||
player.inventory[player.selectedItem].type == ModContent.ItemType<Omniblade>() || player.inventory[player.selectedItem].type == ModContent.ItemType<BladeofEnmity>())
|
||||
if (player.ActiveItem().type == ModContent.ItemType<AstralBlade>() || player.ActiveItem().type == ModContent.ItemType<MantisClaws>() ||
|
||||
player.ActiveItem().type == ModContent.ItemType<Omniblade>() || player.ActiveItem().type == ModContent.ItemType<BladeofEnmity>())
|
||||
{
|
||||
float newMeleeSpeed = 1f + ((player.meleeSpeed - 1f) * 0.25f);
|
||||
player.meleeSpeed = newMeleeSpeed;
|
||||
@@ -3885,7 +3885,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.hurtCooldowns[k] = player.immuneTime;
|
||||
}
|
||||
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaActivation"), (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y);
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaActivation"), player.Center);
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
@@ -3916,8 +3916,8 @@ namespace CalamityMod.CalPlayer
|
||||
player.hurtCooldowns[k] = player.immuneTime;
|
||||
}
|
||||
|
||||
Main.PlaySound(SoundID.Item68, Main.player[Main.myPlayer].position);
|
||||
int eclipseBurst = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<EclipseMirrorBurst>(), (int)(7000 * player.RogueDamage()), 0, player.whoAmI);
|
||||
Main.PlaySound(SoundID.Item68, player.Center);
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<EclipseMirrorBurst>(), (int)(7000 * player.RogueDamage()), 0, player.whoAmI);
|
||||
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
@@ -3971,7 +3971,7 @@ namespace CalamityMod.CalPlayer
|
||||
Main.PlaySound(SoundID.Item, (int)player.position.X, (int)player.position.Y, 67);
|
||||
for (int j = 0; j < 25; j++)
|
||||
{
|
||||
int num = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 173, 0f, 0f, 100, default, 2f);
|
||||
int num = Dust.NewDust(player.position, player.width, player.height, 173, 0f, 0f, 100, default, 2f);
|
||||
Dust dust = Main.dust[num];
|
||||
dust.position.X += (float)Main.rand.Next(-20, 21);
|
||||
dust.position.Y += (float)Main.rand.Next(-20, 21);
|
||||
@@ -3996,7 +3996,7 @@ namespace CalamityMod.CalPlayer
|
||||
Main.PlaySound(SoundID.Item, (int)player.position.X, (int)player.position.Y, 67);
|
||||
for (int j = 0; j < 50; j++)
|
||||
{
|
||||
int num = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 173, 0f, 0f, 100, default, 2f);
|
||||
int num = Dust.NewDust(player.position, player.width, player.height, 173, 0f, 0f, 100, default, 2f);
|
||||
Dust dust = Main.dust[num];
|
||||
dust.position.X += (float)Main.rand.Next(-20, 21);
|
||||
dust.position.Y += (float)Main.rand.Next(-20, 21);
|
||||
@@ -8717,7 +8717,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.dashDelay = -1;
|
||||
for (int num17 = 0; num17 < 20; num17++)
|
||||
{
|
||||
int num18 = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 235, 0f, 0f, 100, default, 2f);
|
||||
int num18 = Dust.NewDust(player.position, player.width, player.height, 235, 0f, 0f, 100, default, 2f);
|
||||
Dust dust = Main.dust[num18];
|
||||
dust.position.X += (float)Main.rand.Next(-5, 6);
|
||||
dust.position.Y += (float)Main.rand.Next(-5, 6);
|
||||
@@ -8779,7 +8779,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.dashDelay = -1;
|
||||
for (int num24 = 0; num24 < 20; num24++)
|
||||
{
|
||||
int num25 = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 246, 0f, 0f, 100, default, 3f);
|
||||
int num25 = Dust.NewDust(player.position, player.width, player.height, 246, 0f, 0f, 100, default, 3f);
|
||||
Dust dust = Main.dust[num25];
|
||||
dust.position.X += (float)Main.rand.Next(-5, 6);
|
||||
dust.position.Y += (float)Main.rand.Next(-5, 6);
|
||||
@@ -8842,7 +8842,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.dashDelay = -1;
|
||||
for (int num24 = 0; num24 < 40; num24++)
|
||||
{
|
||||
int num25 = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 244, 0f, 0f, 100, default, 3f);
|
||||
int num25 = Dust.NewDust(player.position, player.width, player.height, 244, 0f, 0f, 100, default, 3f);
|
||||
Dust dust = Main.dust[num25];
|
||||
dust.position.X += (float)Main.rand.Next(-5, 6);
|
||||
dust.position.Y += (float)Main.rand.Next(-5, 6);
|
||||
@@ -8905,7 +8905,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.dashDelay = -1;
|
||||
for (int num24 = 0; num24 < 60; num24++)
|
||||
{
|
||||
int num25 = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 244, 0f, 0f, 100, default, 3f);
|
||||
int num25 = Dust.NewDust(player.position, player.width, player.height, 244, 0f, 0f, 100, default, 3f);
|
||||
Dust dust = Main.dust[num25];
|
||||
dust.position.X += (float)Main.rand.Next(-5, 6);
|
||||
dust.position.Y += (float)Main.rand.Next(-5, 6);
|
||||
@@ -8968,7 +8968,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.dashDelay = -1;
|
||||
for (int num24 = 0; num24 < 60; num24++)
|
||||
{
|
||||
int num25 = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 33, 0f, 0f, 100, default, 3f);
|
||||
int num25 = Dust.NewDust(player.position, player.width, player.height, 33, 0f, 0f, 100, default, 3f);
|
||||
Dust dust = Main.dust[num25];
|
||||
dust.position.X += (float)Main.rand.Next(-5, 6);
|
||||
dust.position.Y += (float)Main.rand.Next(-5, 6);
|
||||
@@ -9031,7 +9031,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.dashDelay = -1;
|
||||
for (int num24 = 0; num24 < 60; num24++)
|
||||
{
|
||||
int num25 = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 67, 0f, 0f, 100, default, 1.25f);
|
||||
int num25 = Dust.NewDust(player.position, player.width, player.height, 67, 0f, 0f, 100, default, 1.25f);
|
||||
Dust dust = Main.dust[num25];
|
||||
dust.position.X += (float)Main.rand.Next(-5, 6);
|
||||
dust.position.Y += (float)Main.rand.Next(-5, 6);
|
||||
@@ -9094,7 +9094,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.dashDelay = -1;
|
||||
for (int num17 = 0; num17 < 20; num17++)
|
||||
{
|
||||
int num18 = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 70, 0f, 0f, 100, default, 2f);
|
||||
int num18 = Dust.NewDust(player.position, player.width, player.height, 70, 0f, 0f, 100, default, 2f);
|
||||
Dust dust = Main.dust[num18];
|
||||
dust.position.X += (float)Main.rand.Next(-5, 6);
|
||||
dust.position.Y += (float)Main.rand.Next(-5, 6);
|
||||
@@ -9156,7 +9156,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.dashDelay = -1;
|
||||
for (int num24 = 0; num24 < 60; num24++)
|
||||
{
|
||||
int num25 = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 89, 0f, 0f, 100, default, 1.25f);
|
||||
int num25 = Dust.NewDust(player.position, player.width, player.height, 89, 0f, 0f, 100, default, 1.25f);
|
||||
Dust dust = Main.dust[num25];
|
||||
dust.position.X += (float)Main.rand.Next(-5, 6);
|
||||
dust.position.Y += (float)Main.rand.Next(-5, 6);
|
||||
@@ -9193,7 +9193,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
for (int j = 0; j < 100; j++)
|
||||
{
|
||||
int num = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 235, 0f, 0f, 100, default, 2f);
|
||||
int num = Dust.NewDust(player.position, player.width, player.height, 235, 0f, 0f, 100, default, 2f);
|
||||
Dust dust = Main.dust[num];
|
||||
dust.position.X += (float)Main.rand.Next(-20, 21);
|
||||
dust.position.Y += (float)Main.rand.Next(-20, 21);
|
||||
|
||||
Reference in new issue
Block a user