public override bool Shoot(Item item, Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { ClickerAddonPlayer clickerPlayer = player.GetModPlayer <ClickerAddonPlayer>(); Mod calamity = ModLoader.GetMod("CalamityMod"); if (ClickerCompat.IsClickerItem(item)) { if (clickerPlayer.daedalusCapsuit && Main.rand.NextBool(5)) { for (int i = 0; i < 5; i++) { int damageA = (int)(damage * 0.5f); Vector2 vec1 = Main.MouseWorld; Vector2 vec2 = new Vector2(Main.rand.NextFloat(-5f, 5f), Main.rand.NextFloat(-5f, 5f)); Projectile.NewProjectile(vec1, vec2, ProjectileID.CrystalShard, damageA, knockBack, player.whoAmI); } } if (clickerPlayer.reaverCapsuit && Main.rand.NextBool(5)) { int damageA = (int)(damage * 0.1f); for (int i = 0; i < 4; i++) { int numA = 50; Vector2 vec1 = new Vector2(Main.MouseWorld.X + Main.rand.Next(-numA, numA), Main.MouseWorld.Y + Main.rand.Next(-numA, numA)); Vector2 vec2 = new Vector2(0f, 0f); if (Main.rand.NextBool(2)) { Projectile.NewProjectile(vec1, vec2, ProjectileID.SporeTrap, damageA, knockBack, player.whoAmI); } else { Projectile.NewProjectile(vec1, vec2, ProjectileID.SporeTrap2, damageA, knockBack, player.whoAmI); } } } if (clickerPlayer.godSlayerCapsuit && Main.rand.NextBool(5)) { int damageA = (int)(damage * 0.15f); for (int i = 0; i < 4; i++) { int numA = 50; Vector2 vec1 = new Vector2(Main.MouseWorld.X + Main.rand.Next(-numA, numA), Main.MouseWorld.Y + Main.rand.Next(-numA, numA)); Vector2 vec2 = new Vector2(0f, 0f); Projectile.NewProjectile(vec1, vec2, calamity.ProjectileType("NebulaStar"), damageA, knockBack, player.whoAmI); } } return(false); } return(base.Shoot(item, player, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack)); }
public override void OnHitNPC(Projectile projectile, NPC target, int damage, float knockback, bool crit) { Player player = Main.LocalPlayer; Mod calamity = ModLoader.GetMod("CalamityMod"); if (player.GetModPlayer <ClickerAddonPlayer>().ataxiaCapsuit&& ClickerCompat.IsClickerItem(player.HeldItem)) { if ((double)Main.player[Main.myPlayer].lifeSteal > 0.0 && target.canGhostHeal && (target.type != 488 && target.type != calamity.NPCType("SuperDummyNPC")) && !player.moonLeech) { float healMultiplier = 0.1f - (float)projectile.numHits * 0.05f; float healAmount = (float)projectile.damage * healMultiplier; if ((double)healAmount > 50.0) { healAmount = 50f; } if (CalamityGlobalProjectile.CanSpawnLifeStealProjectile(projectile, healMultiplier, healAmount)) { CalamityGlobalProjectile.SpawnLifeStealProjectile(projectile, player, healAmount, calamity.ProjectileType("AtaxiaHealOrb"), 1200f, 2f); } } } }