Skip to content

Commit

Permalink
Add explosion damage from allied garun
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeeeeeeeeen committed Oct 15, 2021
1 parent 95310a4 commit 358e5c2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Projectiles/Ranged/AlliedGarun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using static ChensGradiusMod.GradiusHelper;

Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 358e5c2

Please sign in to comment.