Buffed Mangrove Chakram stealth strike damage

This commit is contained in:
Dominic committed 2021-10-28 15:22:29 -05:00
1 parent 135f09622c
commit c8f665de2c
2 files changed
+13 -6

No files matched your search

+3
View File
@@ -37,6 +37,9 @@ namespace CalamityMod.Items.Weapons.Rogue
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.Calamity().StealthStrikeAvailable())
damage = (int)(damage * 1.25f);
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
if (proj.WithinBounds(Main.maxProjectiles))
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
+10 -6
View File
@@ -35,14 +35,18 @@ namespace CalamityMod.Projectiles.Rogue
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 44, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
if (projectile.Calamity().stealthStrike)
{
// Die early.
if (projectile.timeLeft < 240)
projectile.Kill();
projectile.localAI[0] += Main.rand.Next(0,3);
if (projectile.localAI[0] >= 10f)
{
if (projectile.localAI[0] >= 10f)
{
projectile.localAI[0] = 0f;
Projectile.NewProjectile(projectile.Center + new Vector2(Main.rand.NextFloat(-10f,10f), Main.rand.NextFloat(-10f,10f)),
(projectile.velocity).RotatedByRandom(0.1f) * 0.25f,
ModContent.ProjectileType<MangroveChakramFlower>(), projectile.damage / 4, 0f, projectile.owner);
}
Vector2 flowerSpawnPosition = projectile.Center + Main.rand.NextVector2Square(-10f, 10f);
Vector2 flowerShootVelocity = projectile.velocity.RotatedByRandom(0.1f) * 0.25f;
Projectile.NewProjectile(flowerSpawnPosition, flowerShootVelocity, ModContent.ProjectileType<MangroveChakramFlower>(), projectile.damage / 4, 0f, projectile.owner);
}
}
}