spiky balls should no longer consume stealth on right click

This commit is contained in:
termigator1359 committed 2020-05-22 22:51:41 -04:00
1 parent 9d6b175f9c
commit 490ba5c8fa
7 files changed
+68 -104

No files matched your search

+1 -4
View File
@@ -63,10 +63,7 @@ namespace CalamityMod.Items.Weapons.Melee
return false;
}
public override bool AltFunctionUse(Player player)
{
return true;
}
public override bool AltFunctionUse(Player player) => true;
public override bool CanUseItem(Player player)
{
+12 -23
View File
@@ -48,33 +48,22 @@ Right click to delete all existing spiky balls");
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
if (player.ownedProjectileCounts[item.shoot] > 0)
{
return true;
}
else
{
return false;
}
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
item.shoot = 0;
item.shootSpeed = 0f;
return player.ownedProjectileCounts[ModContent.ProjectileType<GodsParanoiaProj>()] > 0;
}
else
{
item.shoot = ModContent.ProjectileType<GodsParanoiaProj>();
item.shootSpeed = 5f;
int UseMax = item.stack;
if (player.ownedProjectileCounts[item.shoot] >= UseMax)
{
return false;
}
else
{
return true;
}
return player.ownedProjectileCounts[ModContent.ProjectileType<GodsParanoiaProj>()] < UseMax;
}
}
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
+13 -24
View File
@@ -46,36 +46,25 @@ namespace CalamityMod.Items.Weapons.Rogue
item.shootSpeed = 5f;
item.shoot = ModContent.ProjectileType<HellsSunProj>();
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
if (player.ownedProjectileCounts[item.shoot] > 0)
{
return true;
}
else
{
return false;
}
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
item.shoot = 0;
item.shootSpeed = 0f;
return player.ownedProjectileCounts[ModContent.ProjectileType<HellsSunProj>()] > 0;
}
else
{
item.shoot = ModContent.ProjectileType<HellsSunProj>();
item.shootSpeed = 5f;
int UseMax = item.stack;
if (player.ownedProjectileCounts[item.shoot] >= UseMax)
{
return false;
}
else
{
return true;
}
return player.ownedProjectileCounts[ModContent.ProjectileType<HellsSunProj>()] < UseMax;
}
}
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
+17 -5
View File
@@ -58,7 +58,7 @@ namespace CalamityMod.Items.Weapons.Rogue
if (player.Calamity().StealthStrikeAvailable())
{
for (int j = 0; j < item.stack - player.ownedProjectileCounts[item.shoot]; j++)
for (int j = 0; j < item.stack - player.ownedProjectileCounts[ModContent.ProjectileType<NychthemeronProjectile>()]; j++)
{
float spread = 2;
int pIndex = Projectile.NewProjectile(position.X, position.Y, speedX + Main.rand.NextFloat(-spread, spread), speedY + Main.rand.NextFloat(-spread, spread), type, damage, knockBack, player.whoAmI, 0f, 1f);
@@ -79,10 +79,22 @@ namespace CalamityMod.Items.Weapons.Rogue
return false;
}
public override bool CanUseItem(Player player)
{
return player.ownedProjectileCounts[item.shoot] < item.stack && player.altFunctionUse != 2;
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
item.shoot = 0;
item.shootSpeed = 0f;
return player.ownedProjectileCounts[ModContent.ProjectileType<NychthemeronProjectile>()] > 0;
}
else
{
item.shoot = ModContent.ProjectileType<NychthemeronProjectile>();
item.shootSpeed = 6f;
int UseMax = item.stack;
return player.ownedProjectileCounts[ModContent.ProjectileType<NychthemeronProjectile>()] < UseMax;
}
}
public override void AddRecipes()
{
+12 -24
View File
@@ -42,36 +42,24 @@ namespace CalamityMod.Items.Weapons.Rogue
item.shootSpeed = 7f;
item.shoot = ModContent.ProjectileType<PoisonBol>();
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
if (player.ownedProjectileCounts[item.shoot] > 0)
{
return true;
}
else
{
return false;
}
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
item.shoot = 0;
item.shootSpeed = 0f;
return player.ownedProjectileCounts[ModContent.ProjectileType<PoisonBol>()] > 0;
}
else
{
item.shoot = ModContent.ProjectileType<PoisonBol>();
item.shootSpeed = 7f;
int UseMax = item.stack;
if (player.ownedProjectileCounts[item.shoot] >= UseMax)
{
return false;
}
else
{
return true;
}
return player.ownedProjectileCounts[ModContent.ProjectileType<PoisonBol>()] < UseMax;
}
}
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
+12 -24
View File
@@ -42,36 +42,24 @@ namespace CalamityMod.Items.Weapons.Rogue
item.shootSpeed = 2f;
item.shoot = ModContent.ProjectileType<SkyStabberProj>();
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
if (player.ownedProjectileCounts[item.shoot] > 0)
{
return true;
}
else
{
return false;
}
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
item.shoot = 0;
item.shootSpeed = 0f;
return player.ownedProjectileCounts[ModContent.ProjectileType<SkyStabberProj>()] > 0;
}
else
{
item.shoot = ModContent.ProjectileType<SkyStabberProj>();
item.shootSpeed = 2f;
int UseMax = item.stack;
if (player.ownedProjectileCounts[item.shoot] >= UseMax)
{
return false;
}
else
{
return true;
}
return player.ownedProjectileCounts[ModContent.ProjectileType<SkyStabberProj>()] < UseMax;
}
}
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
+1
View File
@@ -68,6 +68,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using Terraria;
using Terraria.GameContent.Events;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;