Speed Blaster + Surge Driver fixes
This commit is contained in:
1 parent
bd9d697b40
commit
6590a84f8b
3 files changed
+11
-12
No files matched your search
@@ -53,15 +53,12 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.UseSound = player.altFunctionUse == 2 && player.Calamity().SpeedBlasterDashDelayCooldown == 0 ? ShotBig : Shot;
|
||||
return base.CanUseItem(player);
|
||||
}
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-1, -6);
|
||||
}
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-1, -6);
|
||||
public override float UseSpeedMultiplier(Player player) => player.altFunctionUse == 2 ? 1.15f : 1f;
|
||||
public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback)
|
||||
{
|
||||
if (player.Calamity().SpeedBlasterDashDelayCooldown == 0)
|
||||
{
|
||||
Item.useTime = Item.useAnimation = 9;
|
||||
ShotBigMode = 0;
|
||||
}
|
||||
|
||||
@@ -73,7 +70,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
else
|
||||
ColorValue++;
|
||||
|
||||
Item.useTime = Item.useAnimation = 8;
|
||||
player.Calamity().SpeedBlasterDashDelayCooldown = 300;
|
||||
|
||||
player.Calamity().sBlasterDashActivated = true;
|
||||
@@ -106,7 +102,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.PainterPaintballGun).
|
||||
AddIngredient(ItemID.MythrilBar, 5).
|
||||
AddRecipeGroup("AnyMythrilBar", 5).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
player.Calamity().rightClickListener = true;
|
||||
|
||||
Item.noUseGraphic = !player.Calamity().mouseRight && player.ownedProjectileCounts[ModContent.ProjectileType<SurgeDriverHoldout>()] > 0;
|
||||
Item.noUseGraphic = !player.Calamity().mouseRight || player.ownedProjectileCounts[ModContent.ProjectileType<SurgeDriverHoldout>()] > 0;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[ModContent.ProjectileType<SurgeDriverHoldout>()] <= 0;
|
||||
|
||||
@@ -26,9 +26,6 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (!OwnerCanShoot)
|
||||
Projectile.Kill();
|
||||
|
||||
Vector2 armPosition = Owner.RotatedRelativePoint(Owner.MountedCenter, true);
|
||||
armPosition += Projectile.velocity.SafeNormalize(Owner.direction * Vector2.UnitX) * 32f;
|
||||
armPosition.Y -= 12f;
|
||||
@@ -36,8 +33,14 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
UpdateProjectileHeldVariables(armPosition);
|
||||
ManipulatePlayerVariables();
|
||||
|
||||
if (!OwnerCanShoot)
|
||||
{
|
||||
// Prevent spam clicking by letting the animation run if the player just stops holding
|
||||
if (Owner.noItems || Owner.CCed || Owner.dead || ShootCountdown < 0f)
|
||||
Projectile.Kill();
|
||||
}
|
||||
// Can't shoot on frame 1 as it can't use ammo yet
|
||||
if (ShootCountdown < 0f && Owner.HasAmmo(Owner.ActiveItem()))
|
||||
else if (ShootCountdown < 0f && Owner.HasAmmo(Owner.ActiveItem()))
|
||||
{
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user