From 358e5c23d5de993fc884cdcb85428c311d040711 Mon Sep 17 00:00:00 2001 From: cheeeeeeeeeen Date: Fri, 15 Oct 2021 12:49:00 +0800 Subject: [PATCH] Add explosion damage from allied garun --- Projectiles/Ranged/AlliedGarun.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Projectiles/Ranged/AlliedGarun.cs b/Projectiles/Ranged/AlliedGarun.cs index 0c552ef..b5aa6d6 100644 --- a/Projectiles/Ranged/AlliedGarun.cs +++ b/Projectiles/Ranged/AlliedGarun.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.ID; using Terraria.ModLoader; using static ChensGradiusMod.GradiusHelper; @@ -31,7 +32,7 @@ public override void SetDefaults() projectile.usesIDStaticNPCImmunity = true; projectile.idStaticNPCHitCooldown = 30; projectile.aiStyle = 0; - projectile.timeLeft = 9480; + projectile.timeLeft = 480; aiType = 0; ComputeCenterFromHitbox(projectile, ref drawOffsetX, ref drawOriginOffsetY, 32, 252, 9); } @@ -63,6 +64,14 @@ public override void Kill(int timeLeft) mod.GetGoreSlot("Gores/GradiusExplode"), .5f); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Enemies/Gradius2Death"), projectile.Center); + Vector2 oldCenter = projectile.Center; + projectile.width = projectile.height = 200; + projectile.Center = oldCenter; + projectile.Damage(); + for (int i = 0; i < 100; i++) + { + Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, DustID.ApprenticeStorm, 0f, 0f, 0, default, 1f); + } } public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)