Cold Divinity Fix
This commit is contained in:
1 parent
ea7be9ac04
commit
54b0907b4e
2 files changed
+14
-9
No files matched your search
@@ -673,14 +673,15 @@ namespace CalamityMod.Items
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType<ColdDivinityPointyThing>() && Main.projectile[i].owner == player.whoAmI)
|
||||
{
|
||||
if (Main.projectile[i].ai[1] >= 1f)
|
||||
if (Main.projectile[i].ai[1] > 1f)
|
||||
{
|
||||
canContinue = false;
|
||||
break;
|
||||
}
|
||||
else if (Main.projectile[i].ai[1] == 0f)
|
||||
{
|
||||
count++;
|
||||
if (((ColdDivinityPointyThing)Main.projectile[i].modProjectile).circlingPlayer)
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -691,14 +692,15 @@ namespace CalamityMod.Items
|
||||
{
|
||||
int height = unluckyTarget.getRect().Height;
|
||||
int width = unluckyTarget.getRect().Width;
|
||||
float dist = (height > width ? height : width) * 1.5f; //create distance between hitbox and spears.
|
||||
int pointyThingyAmount = count;
|
||||
pointyThingyAmount += dist > 100 ? (int)dist / 100 : 0;
|
||||
float angleVariance = MathHelper.TwoPi / pointyThingyAmount;
|
||||
float angle = 0f;
|
||||
|
||||
for (int i = 0; i < pointyThingyAmount; i++)
|
||||
{
|
||||
int projj = Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, ModContent.ProjectileType<ColdDivinityPointyThing>(), (int)((80 * player.MinionDamage())), 1f, player.whoAmI, angle, 2f);
|
||||
if (Main.projectile.Length == Main.maxProjectiles)
|
||||
break;
|
||||
int projj = Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, ModContent.ProjectileType<ColdDivinityPointyThing>(), (int)(80 * player.MinionDamage()), 1f, player.whoAmI, angle, 2f);
|
||||
angle += angleVariance;
|
||||
for (int j = 0; j < 22; j++)
|
||||
{
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
circling = circlingPlayer = false;
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
else if (projectile.ai[1] == 2f && projectile.timeLeft > 900)
|
||||
else if (projectile.ai[1] >= 2f && projectile.timeLeft > 900)
|
||||
{
|
||||
target = CalamityUtils.MinionHoming(projectile.position, 1000f, Main.player[projectile.owner]);
|
||||
projectile.timeLeft = 800;
|
||||
@@ -111,7 +111,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
circlingPlayer = false;
|
||||
float height = target.getRect().Height;
|
||||
float width = target.getRect().Width;
|
||||
floatyDistance = (height > width ? height : width) * 1.15f;
|
||||
floatyDistance = (height > width ? height : width) * 1.5f;
|
||||
if (floatyDistance > Main.LogicCheckScreenWidth / 3)
|
||||
floatyDistance = Main.LogicCheckScreenWidth / 3;
|
||||
projectile.penetrate = -1;
|
||||
projectile.usesIDStaticNPCImmunity = true;
|
||||
projectile.idStaticNPCHitCooldown = 4;
|
||||
@@ -182,10 +184,11 @@ namespace CalamityMod.Projectiles.Summon
|
||||
recharging = 0;
|
||||
projectile.usesIDStaticNPCImmunity = false;
|
||||
projectile.penetrate = 1;
|
||||
float applicableDist = target.getRect().Width > target.getRect().Height ? target.getRect().Width : target.getRect().Height;
|
||||
if (projectile.timeLeft > 60)
|
||||
floatyDistance += Main.rand.Next(0, 5);
|
||||
floatyDistance += Main.rand.Next(0, 10);
|
||||
else
|
||||
floatyDistance -= Main.rand.Next(5, 10);
|
||||
floatyDistance -= Main.rand.Next(10, 20);
|
||||
}
|
||||
if (circlingPlayer)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user