fixed a couple grav pot interactions
removed scale from omniblade (this is not a nerf because scale actually does not affect hitboxes on its own thanks)
This commit is contained in:
1 parent
c34f4fd503
commit
ba3ff4e397
4 files changed
+15
-43
No files matched your search
@@ -36,27 +36,15 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X;
|
||||
float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y;
|
||||
Vector2 tentacleVelocity = new Vector2(mouseXDist, mouseYDist);
|
||||
tentacleVelocity.Normalize();
|
||||
Vector2 tentacleRandVelocity = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
|
||||
tentacleRandVelocity.Normalize();
|
||||
tentacleVelocity = tentacleVelocity * 6f + tentacleRandVelocity;
|
||||
tentacleVelocity.Normalize();
|
||||
tentacleVelocity *= Item.shootSpeed;
|
||||
float tentacleYDirection = (float)Main.rand.Next(10, 50) * 0.001f;
|
||||
Vector2 spreadVelocity = velocity.RotatedByRandom(MathHelper.ToRadians(18f)) * Main.rand.NextFloat(0.8f, 1.2f);
|
||||
float tentacleYDirection = Main.rand.NextFloat(0.01f, 0.05f);
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
tentacleYDirection *= -1f;
|
||||
}
|
||||
float tentacleXDirection = (float)Main.rand.Next(10, 50) * 0.001f;
|
||||
float tentacleXDirection = Main.rand.NextFloat(0.01f, 0.05f);
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
tentacleXDirection *= -1f;
|
||||
}
|
||||
Projectile.NewProjectile(source, realPlayerPos, tentacleVelocity, type, damage, knockback, player.whoAmI, tentacleXDirection, tentacleYDirection);
|
||||
|
||||
Projectile.NewProjectile(source, position, spreadVelocity, type, damage, knockback, Main.myPlayer, tentacleXDirection, tentacleYDirection);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,31 +35,15 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
int i = Main.myPlayer;
|
||||
float playerKnockback = knockback;
|
||||
playerKnockback = player.GetWeaponKnockback(Item, playerKnockback);
|
||||
player.itemTime = Item.useTime;
|
||||
Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X;
|
||||
float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y;
|
||||
Vector2 tentacleVelocity = new Vector2(mouseXDist, mouseYDist);
|
||||
tentacleVelocity.Normalize();
|
||||
Vector2 tentacleRandVelocity = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
|
||||
tentacleRandVelocity.Normalize();
|
||||
tentacleVelocity = tentacleVelocity * 4f + tentacleRandVelocity;
|
||||
tentacleVelocity.Normalize();
|
||||
tentacleVelocity *= Item.shootSpeed;
|
||||
float tentacleYDirection = (float)Main.rand.Next(10, 80) * 0.001f;
|
||||
Vector2 spreadVelocity = velocity.RotatedByRandom(MathHelper.ToRadians(18f)) * Main.rand.NextFloat(0.8f, 1.2f);
|
||||
float tentacleYDirection = Main.rand.NextFloat(0.01f, 0.05f);
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
tentacleYDirection *= -1f;
|
||||
}
|
||||
float tentacleXDirection = (float)Main.rand.Next(10, 80) * 0.001f;
|
||||
float tentacleXDirection = Main.rand.NextFloat(0.01f, 0.05f);
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
tentacleXDirection *= -1f;
|
||||
}
|
||||
Projectile.NewProjectile(source, realPlayerPos, tentacleVelocity, ModContent.ProjectileType<EldritchTentacle>(), damage, playerKnockback, i, tentacleXDirection, tentacleYDirection);
|
||||
|
||||
Projectile.NewProjectile(source, position, spreadVelocity, type, damage, knockback, Main.myPlayer, tentacleXDirection, tentacleYDirection);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 246;
|
||||
Projectile.width = 308;
|
||||
Projectile.height = 184;
|
||||
Projectile.scale = 1.15f;
|
||||
|
||||
Projectile.friendly = true;
|
||||
Projectile.penetrate = -1;
|
||||
@@ -49,16 +48,17 @@ namespace CalamityMod.Projectiles.Melee
|
||||
}
|
||||
|
||||
// Rotation and directioning.
|
||||
Projectile.rotation = Owner.gravDir == -1f ? MathHelper.Pi : 0f;
|
||||
Projectile.direction = (Projectile.velocity.X > 0).ToDirectionInt();
|
||||
|
||||
// Sprite and player directioning.
|
||||
Projectile.spriteDirection = -Projectile.direction;
|
||||
Projectile.spriteDirection = Projectile.direction * (int)(Owner.gravDir);
|
||||
if (Projectile.direction == 1)
|
||||
Projectile.Left = Owner.MountedCenter;
|
||||
else
|
||||
Projectile.Right = Owner.MountedCenter;
|
||||
Projectile.position.X += Projectile.spriteDirection == -1 ? -116f : 88f;
|
||||
Projectile.position.Y -= Projectile.scale * 66f;
|
||||
Projectile.position.X += (Projectile.spriteDirection == 1 ? -92f : 96f) * Owner.gravDir;
|
||||
Projectile.position.Y -= 80f * Owner.gravDir;
|
||||
Owner.ChangeDir(Projectile.direction);
|
||||
|
||||
// Prevents the projectile from dying
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 14 KiB |
Reference in new issue
Block a user