public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { Player player = Main.player[projectile.owner]; if (player.GetModPlayer <ModPlayerEffects>().lcPulseEquipped) { int debuff = ModProjectileEffects.randDebuff(); if (debuff != 0) { target.AddBuff(debuff, 300); } } if (player.GetModPlayer <ModPlayerEffects>().qPulseEquipped) { int debuff = ModProjectileEffects.randDebuffQuantum(); if (debuff != 0) { target.AddBuff(debuff, 300); } } }
public override void Hurt(bool pvp, bool quiet, double damage, int hitDirection, bool crit) { //Get the current player int currPlayer = player.whoAmI; //Pulse Shield if (pulseEquipped) { float projectilespeedX = 0f; float projectilespeedY = 0f; float projectileKnockback = 4f; int minDamage = 5; int maxDamage = 15; int projectileDamage = ModProjectileEffects.randDamage(minDamage, maxDamage); for (int i = 0; i <= 35; i++) { int projIndex = Projectile.NewProjectile(player.position.X, player.position.Y, projectilespeedX, projectilespeedY, mod.ProjectileType("PulseP1"), projectileDamage, projectileKnockback, currPlayer, 0f, 0f); float angle = (360 / 35) * i; Projectiles.PulseP1 tempProj = Main.projectile[projIndex].modProjectile as Projectiles.PulseP1; tempProj.SetOrbit(angle); } } //Upgraded Pulse Shield if (upgradedPulseEquipped) { float projectilespeedX = 0f; float projectilespeedY = 0f; float projectileKnockback = 4f; int minDamage = 10; int maxDamage = 25; int projectileDamage = ModProjectileEffects.randDamage(minDamage, maxDamage); //First Ring (Centre) for (int i = 0; i <= 36; i++) { int projIndex = Projectile.NewProjectile(player.position.X, player.position.Y, projectilespeedX, projectilespeedY, mod.ProjectileType("UPulseP1"), projectileDamage, projectileKnockback, currPlayer, 0f, 0f); float angle = (360 / 36) * i; Projectiles.UPulseP1 tempProj = Main.projectile[projIndex].modProjectile as Projectiles.UPulseP1; tempProj.SetOrbit(angle); } //Second Ring for (int i = 0; i <= 54; i++) { int projIndex = Projectile.NewProjectile(player.position.X, player.position.Y, projectilespeedX, projectilespeedY, mod.ProjectileType("UPulseP2"), projectileDamage, projectileKnockback, currPlayer, 0f, 0f); float angle = (360 / 54) * i; Projectiles.UPulseP2 tempProj = Main.projectile[projIndex].modProjectile as Projectiles.UPulseP2; tempProj.SetOrbit(angle); } //Third Ring (Outer) for (int i = 0; i <= 72; i++) { int projIndex = Projectile.NewProjectile(player.position.X, player.position.Y, projectilespeedX, projectilespeedY, mod.ProjectileType("UPulseP3"), projectileDamage, projectileKnockback, currPlayer, 0f, 0f); float angle = (360 / 72) * i; Projectiles.UPulseP3 tempProj = Main.projectile[projIndex].modProjectile as Projectiles.UPulseP3; tempProj.SetOrbit(angle); } } //Liquid Cooled Pulse Shield if (lcPulseEquipped) { float projectilespeedX = 0f; float projectilespeedY = 0f; float projectileKnockback = 4f; int minDamage = 15; int maxDamage = 30; int projectileDamage = ModProjectileEffects.randDamage(minDamage, maxDamage); //First Ring (Centre) for (int i = 0; i <= 36; i++) { int projIndex = Projectile.NewProjectile(player.position.X, player.position.Y, projectilespeedX, projectilespeedY, mod.ProjectileType("LCPulseP1"), projectileDamage, projectileKnockback, currPlayer, 0f, 0f); float angle = (360 / 36) * i; Projectiles.LCPulseP1 tempProj = Main.projectile[projIndex].modProjectile as Projectiles.LCPulseP1; tempProj.SetOrbit(angle); } //Second Ring for (int i = 0; i <= 54; i++) { int projIndex = Projectile.NewProjectile(player.position.X, player.position.Y, projectilespeedX, projectilespeedY, mod.ProjectileType("LCPulseP2"), projectileDamage, projectileKnockback, currPlayer, 0f, 0f); float angle = (360 / 54) * i; Projectiles.LCPulseP2 tempProj = Main.projectile[projIndex].modProjectile as Projectiles.LCPulseP2; tempProj.SetOrbit(angle); } //Third Ring (Outer) for (int i = 0; i <= 72; i++) { int projIndex = Projectile.NewProjectile(player.position.X, player.position.Y, projectilespeedX, projectilespeedY, mod.ProjectileType("LCPulseP3"), projectileDamage, projectileKnockback, currPlayer, 0f, 0f); float angle = (360 / 72) * i; Projectiles.LCPulseP3 tempProj = Main.projectile[projIndex].modProjectile as Projectiles.LCPulseP3; tempProj.SetOrbit(angle); } } //Quantum Pulse Shield if (qPulseEquipped) { float projectilespeedX = 0f; float projectilespeedY = 0f; float projectileKnockback = 4f; int minDamage = 20; int maxDamage = 35; int projectileDamage = ModProjectileEffects.randDamage(minDamage, maxDamage); //First Ring (Centre) for (int i = 0; i <= 36; i++) { int projIndex = Projectile.NewProjectile(player.position.X, player.position.Y, projectilespeedX, projectilespeedY, mod.ProjectileType("QPulseP1"), projectileDamage, projectileKnockback, currPlayer, 0f, 0f); float angle = (360 / 36) * i; Projectiles.QPulseP1 tempProj = Main.projectile[projIndex].modProjectile as Projectiles.QPulseP1; tempProj.SetOrbit(angle); } //Second Ring for (int i = 0; i <= 54; i++) { int projIndex = Projectile.NewProjectile(player.position.X, player.position.Y, projectilespeedX, projectilespeedY, mod.ProjectileType("QPulseP2"), projectileDamage, projectileKnockback, currPlayer, 0f, 0f); float angle = (360 / 54) * i; Projectiles.QPulseP2 tempProj = Main.projectile[projIndex].modProjectile as Projectiles.QPulseP2; tempProj.SetOrbit(angle); } //Third Ring for (int i = 0; i <= 72; i++) { int projIndex = Projectile.NewProjectile(player.position.X, player.position.Y, projectilespeedX, projectilespeedY, mod.ProjectileType("QPulseP3"), projectileDamage, projectileKnockback, currPlayer, 0f, 0f); float angle = (360 / 72) * i; Projectiles.QPulseP3 tempProj = Main.projectile[projIndex].modProjectile as Projectiles.QPulseP3; tempProj.SetOrbit(angle); } //Fourth Ring (Outer) for (int i = 0; i <= 90; i++) { int projIndex = Projectile.NewProjectile(player.position.X, player.position.Y, projectilespeedX, projectilespeedY, mod.ProjectileType("QPulseP4"), projectileDamage, projectileKnockback, currPlayer, 0f, 0f); float angle = (360 / 90) * i; Projectiles.QPulseP4 tempProj = Main.projectile[projIndex].modProjectile as Projectiles.QPulseP4; tempProj.SetOrbit(angle); } } //Micro Adrenaline if (mAdrenalineEquipped) { int quarterLife = player.statLifeMax2 / 4; if (player.statLife <= quarterLife && !mAdrenalineActive) { mAdrenalineActive = true; player.minionDamage *= 2.0f; } } //Summoners Blessing if (sBlessingEquipped) { int quarterLife = player.statLifeMax2 / 4; if (player.statLife <= quarterLife) { sBlessingActive = true; player.minionDamage *= 2.0f; } } //Dead Hand if (dHandEquipped) { player.AddBuff(mod.BuffType("SuperQuickFire"), 400, false); } }