REIMPLEMENTED commit d34eef95a4ead14963fdfd7bf79212e1c621f4b3

This commit is contained in:
Ozzatron authored and Cameron Ewell committed 2022-07-11 19:05:37 -04:00
1 parent b0627123b4
commit e52a340f13
6 files changed
+34 -8

No files matched your search

+15 -3
View File
@@ -209,7 +209,15 @@ namespace CalamityMod.Items.Accessories
hookCache = -1;
if (Grappled)
SimulateMovement(Main.projectile[Grapple]);
{
if ((Main.projectile[Grapple].Center - Player.Center).Length() > SwingLenght + 80f)
{
SoundEngine.PlaySound(WulfrumAcrobaticsPack.ReleaseSound, Main.projectile[Grapple].Center);
Main.projectile[Grapple].Kill();
}
else
SimulateMovement(Main.projectile[Grapple]);
}
}
public void SimulateMovement(Projectile grapple)
@@ -309,11 +317,11 @@ namespace CalamityMod.Items.Accessories
if (collisionVector.Y < Player.velocity.Y)
{
imminentDanger = true;
checkedPlayerPosition += Player.velocity;
checkedPlayerPosition += collisionVector;
break;
}
checkedPlayerPosition += Player.velocity;
checkedPlayerPosition += collisionVector;
}
if (!imminentDanger)
@@ -365,6 +373,10 @@ namespace CalamityMod.Items.Accessories
}
}
//Reset the players fall height, because if they take fall dmg in teh frame right after this one it may have a chance of still killing the player due to the
//code where the grapple resets the players fall speed hasnt been called yet
Player.fallStart = (int)(Player.position.Y / 16);
if (Player.whoAmI == Main.myPlayer)
{
Projectile.NewProjectile(Player.GetSource_ItemUse(PackItem), bestGrapplePos.ToWorldCoordinates(), Vector2.Zero, ProjectileType<WulfrumHook>(), 3, 0, Player.whoAmI);
+1 -1
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Fishing.FishingRods
{
SacrificeTotal = 1;
DisplayName.SetDefault("Wulfrum Fishing Pole");
Tooltip.SetDefault("This barely works, but it's better than nothing.");
Tooltip.SetDefault("This barely works, but it's better than nothing");
}
public override void SetDefaults()
+6 -1
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Tools
{
DisplayName.SetDefault("Wulfrum Digging Turtle");
Tooltip.SetDefault("Throws a rickety mining contraption to dig out a small tunnel\n" +
"In case of an emergency, right click to instantly detonate all your digging turtles.");
"In case of an emergency, right click to instantly detonate all your digging turtles");
SacrificeTotal = 10;
}
@@ -38,6 +38,11 @@ namespace CalamityMod.Items.Tools
public override bool AltFunctionUse(Player player) => true;
public override bool ConsumeItem(Player player)
{
return player.altFunctionUse != 2;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
// Play a sound and detonate all owned turtles.
+2 -2
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Tools
public override void SetStaticDefaults()
{
SacrificeTotal = 1;
DisplayName.SetDefault("Wulfrum Pickaxe");
DisplayName.SetDefault("Wulfrum Drill");
}
public override void SetDefaults()
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Tools
Item.rare = ItemRarityID.Blue;
Item.UseSound = SoundID.Item23;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<WulfrumDrillProj>(); ///
Item.shoot = ModContent.ProjectileType<WulfrumDrillProj>();
Item.channel = true;
Item.noMelee = true;
+9
View File
@@ -67,6 +67,8 @@ namespace CalamityMod.Projectiles.Typeless
Lighting.AddLight(Projectile.Center, Color.DeepSkyBlue.ToVector3());
Vector2 BetweenOwner = Owner.Center - Projectile.Center;
Main.instance.MouseText(Owner.Center.ToString());
if (Owner.dead || Owner.stoned || Owner.webbed || Owner.frozen || BetweenOwner.Length() > 1500)
{
Projectile.Kill();
@@ -114,6 +116,13 @@ namespace CalamityMod.Projectiles.Typeless
else
{
float lenghtToOwner = BetweenOwner.Length();
if (lenghtToOwner > Owner.GetModPlayer<WulfrumPackPlayer>().SwingLenght + 60f)
{
State = HookState.Retracting;
}
Point tilePos = Projectile.Center.ToTileCoordinates();
Tile tile = Main.tile[tilePos];
if (!tile.HasUnactuatedTile || !tile.CanTileBeLatchedOnTo() || Owner.IsBlacklistedForGrappling(tilePos))
+1 -1
View File
@@ -42,7 +42,7 @@ namespace CalamityMod.Tiles
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = Main.rand.NextBool(3) ? 0 : 1;
num = Main.rand.NextBool(3) ? 3 : Main.rand.NextBool(3) ? 1 : 2;
}
public override void PlaceInWorld(int i, int j, Item item)