fixed cosmic discharge being affected by defiled

This commit is contained in:
termigator1359 committed 2020-03-16 11:16:36 -04:00
1 parent c9e11f9e40
commit cffe849220
6 files changed
+27 -45

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ namespace CalamityMod.Items.TreasureBags
// Weapons
DropHelper.DropItemChance(player, ModContent.ItemType<Excelsus>(), 3);
float dischargeChance = CalamityWorld.defiled ? DropHelper.DefiledDropRateFloat : DropHelper.LegendaryDropRateFloat;
float dischargeChance = DropHelper.LegendaryDropRateFloat;
DropHelper.DropItemCondition(player, ModContent.ItemType<CosmicDischarge>(), CalamityWorld.revenge, dischargeChance);
DropHelper.DropItemChance(player, ModContent.ItemType<TheObliterator>(), 3);
DropHelper.DropItemChance(player, ModContent.ItemType<Deathwind>(), 3);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

+1 -3
View File
@@ -54,14 +54,12 @@ namespace CalamityMod.Items.Weapons.Ranged
{
if (player.altFunctionUse == 2)
{
item.damage = 73;
item.useTime = 30;
item.useAnimation = 30;
item.reuseDelay = 0;
}
else
{
item.damage = BaseDamage;
item.useTime = 5;
item.useAnimation = 15;
item.reuseDelay = 20;
@@ -73,7 +71,7 @@ namespace CalamityMod.Items.Weapons.Ranged
{
if (player.altFunctionUse == 2)
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<SeasSearingSecondary>(), damage, knockBack, player.whoAmI, 0f, 0f);
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<SeasSearingSecondary>(), (int)(damage * 1.22f), knockBack, player.whoAmI, 0f, 0f);
}
else
{
+13 -18
View File
@@ -52,33 +52,28 @@ namespace CalamityMod.Projectiles.Ranged
for (int num298 = 0; num298 < 1; num298++)
{
int num299 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, num297, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 100, default, 1f);
Dust dust = Main.dust[num299];
if (Main.rand.NextBool(3))
{
Main.dust[num299].noGravity = true;
Main.dust[num299].scale *= 2.5f;
Dust expr_DBEF_cp_0 = Main.dust[num299];
expr_DBEF_cp_0.velocity.X *= 2f;
Dust expr_DC0F_cp_0 = Main.dust[num299];
expr_DC0F_cp_0.velocity.Y *= 2f;
dust.noGravity = true;
dust.scale *= 2.5f;
dust.velocity.X *= 2f;
dust.velocity.Y *= 2f;
}
if (Main.rand.NextBool(6))
{
Main.dust[num299].noGravity = true;
Main.dust[num299].scale *= 3f;
Dust expr_DBEF_cp_0 = Main.dust[num299];
expr_DBEF_cp_0.velocity.X *= 2f;
Dust expr_DC0F_cp_0 = Main.dust[num299];
expr_DC0F_cp_0.velocity.Y *= 2f;
dust.noGravity = true;
dust.scale *= 3f;
dust.velocity.X *= 2f;
dust.velocity.Y *= 2f;
}
else
{
Main.dust[num299].scale *= 2f;
dust.scale *= 2f;
}
Dust expr_DC74_cp_0 = Main.dust[num299];
expr_DC74_cp_0.velocity.X *= 1.2f;
Dust expr_DC94_cp_0 = Main.dust[num299];
expr_DC94_cp_0.velocity.Y *= 1.2f;
Main.dust[num299].scale *= num296;
dust.velocity.X *= 1.2f;
dust.velocity.Y *= 1.2f;
dust.scale *= num296;
}
}
}
+12 -21
View File
@@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Ranged
float angleRandom = 0.1f;
int num3;
for (int num53 = 0; num53 < 40; num53 = num3 + 1)
for (int num53 = 0; num53 < 40; num53++)
{
float dustSpeed = Main.rand.NextFloat(6.0f, 12.0f);
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(projectile.velocity.ToRotation());
@@ -92,28 +92,22 @@ namespace CalamityMod.Projectiles.Ranged
int randomDustType = Main.rand.NextBool(2) ? dust1 : dust2;
int num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f);
Main.dust[num54].position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f;
Main.dust[num54].noGravity = true;
Dust dust = Main.dust[num54];
dust.position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f;
dust.noGravity = true;
dust.velocity *= randomDustType == dust2 ? 2f : 4f;
dust = Main.dust[num54];
num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f);
Main.dust[num54].position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f;
dust.position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f;
dust = Main.dust[num54];
dust.velocity *= randomDustType == dust2 ? 1.33f : 2.66f;
Main.dust[num54].noGravity = true;
Main.dust[num54].fadeIn = 1f;
Main.dust[num54].color = Color.Blue * 0.5f;
dust = Main.dust[num54];
num3 = num53;
dust.noGravity = true;
dust.fadeIn = 1f;
dust.color = Color.Blue * 0.5f;
}
for (int num55 = 0; num55 < 20; num55 = num3 + 1)
for (int num55 = 0; num55 < 20; num55++)
{
float dustSpeed = Main.rand.NextFloat(6.0f, 12.0f);
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(projectile.velocity.ToRotation());
@@ -122,14 +116,11 @@ namespace CalamityMod.Projectiles.Ranged
int randomDustType = Main.rand.NextBool(2) ? dust1 : dust2;
int num56 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f);
Main.dust[num56].position = projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)projectile.velocity.ToRotation(), default) * (float)projectile.width / 3f;
Main.dust[num56].noGravity = true;
Dust dust = Main.dust[num56];
dust.velocity *= randomDustType == dust2 ? 0.33f : 0.66f;
dust = Main.dust[num56];
dust.position = projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)projectile.velocity.ToRotation(), default) * (float)projectile.width / 3f;
dust.noGravity = true;
num3 = num55;
dust.velocity *= randomDustType == dust2 ? 0.33f : 0.66f;
}
}
}
-2
View File
@@ -223,7 +223,6 @@ namespace CalamityMod.Projectiles.Summon
}
if (projectile.ai[0] == 2f) //attack target
{
projectile.friendly = true;
projectile.spriteDirection = -projectile.direction;
projectile.rotation = 0f;
if (projectile.velocity.Y == 0f)
@@ -283,7 +282,6 @@ namespace CalamityMod.Projectiles.Summon
{
projectile.ai[1] = 0f;
projectile.ai[0] = 0f;
projectile.friendly = false;
projectile.netUpdate = true;
return;
}