public override void SpecialMove0(int length) { if (Owner.whoAmI == Main.myPlayer && FistRushVelocity == Vector2.Zero) { //Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, ShortShoutID).WithVolume(1f)); FistRushVelocity = TBMUtils.DistanceToMouse(projectile.Center, 10f); if (Main.MouseWorld.X < Owner.Center.X) { Owner.direction = -1; } else { Owner.direction = 1; } TBMPlayer.Get(Owner).PreRushDirection = Owner.direction; } if (_attackCounter < 1) { Projectile.NewProjectile(projectile.Center + new Vector2(34 * Main.player[projectile.owner].direction, -14), FistRushVelocity, mod.ProjectileType <UnzippedStickyFist>(), 60, 2.5f, projectile.owner); } if (++_attackCounter < length) { FrameOffset = 5; _positionOffsetX = 25; } else { FistRushVelocity = Vector2.Zero; _positionOffsetX = -20; State = StandState.Idle; _attackCounter = 0; } }
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { TBMPlayer.Get(Main.player[projectile.owner]).Stamina += 1; Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Punch" + Main.rand.Next(1, 5)).WithVolume(0.35f)); target.immune[projectile.owner] = 10; TBMUtils.CircleDust(projectile.Center, projectile.velocity, DustID.AncientLight); }
public override void SpecialMove1(int length) { if (Owner.whoAmI == Main.myPlayer && FistRushVelocity == Vector2.Zero) { FistRushVelocity = TBMUtils.DistanceToMouse(projectile.Center, 10f); if (Main.MouseWorld.X < Owner.Center.X) { Owner.direction = -1; } else { Owner.direction = 1; } TBMPlayer.Get(Owner).PreRushDirection = Owner.direction; } if (_attackCounter < 1) { for (int i = 0; i < 8; i++) { Projectile.NewProjectile(projectile.Center + new Vector2(Main.rand.Next(-16, 16), Main.rand.Next(-25, 25)).RotatedBy(FistRushVelocity.SafeNormalize(-Vector2.UnitY).ToRotation()), FistRushVelocity, mod.ProjectileType <Knife>(), 22, 0f, projectile.owner); } } if (++_attackCounter < length) { _positionOffsetX = 25; } else { FistRushVelocity = Vector2.Zero; _positionOffsetX = -20; State = StandState.Idle; _attackCounter = 0; } }
private void RushAttackLong(int length) { FrameSpeed = 1; if (Owner.whoAmI == Main.myPlayer && FistRushVelocity == Vector2.Zero) { FistRushVelocity = TBMUtils.DistanceToMouse(projectile.Center, 10f); if (Main.MouseWorld.X < Owner.Center.X) { Owner.direction = -1; } else { Owner.direction = 1; } TBMPlayer.Get(Owner).PreRushDirection = Owner.direction; } if (++_attackCounter < length) { TBMPlayer.Get(Owner).InRush = true; _positionOffsetX = 25; Projectile.NewProjectile(projectile.Center, FistRushVelocity, FistID, 60, 3.5f, projectile.owner); } else { FistRushVelocity = Vector2.Zero; _positionOffsetX = -20; State = StandState.Idle; _attackCounter = 0; } }
public override void OnHitPvp(Player target, int damage, bool crit) { if (TBMWorld.Get().TimeStopDuration <= 0) { TBMPlayer.Get(Main.player[projectile.owner]).Stamina += 1; } TBMUtils.CircleDust(projectile.Center, projectile.velocity, DustID.AncientLight); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Punch" + Main.rand.Next(1, 5)).WithVolume(0.35f)); }