Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
rzc0d3r authored Sep 24, 2024
1 parent a6112d0 commit 90f94d1
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions Common/Players/ERIPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ public class ERIPlayer : ModPlayer
{
public bool Blessed = false;
public bool WeaponImbueBlackFlame = false;

public bool DarkMoonGreatswordIsCharged = false;
public bool DarkMoonGreatswordCharging = false;


public override void ResetEffects()
{
WeaponImbueBlackFlame = false;
Expand All @@ -24,8 +21,6 @@ public override void ResetEffects()
public override void OnRespawn()
{
Blessed = false;
DarkMoonGreatswordIsCharged = false;
DarkMoonGreatswordCharging = false;
}

public override void MeleeEffects(Item item, Rectangle hitbox)
Expand All @@ -34,19 +29,15 @@ public override void MeleeEffects(Item item, Rectangle hitbox)
{
if (item.DamageType.CountsAsClass<MeleeDamageClass>() && !item.noMelee && !item.noUseGraphic) {
if (Main.rand.NextBool(2))
{
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.Wraith, Scale: Main.rand.NextFloat(0.5f, 0.8f));
}
}
}
}

public override void OnHitNPCWithItem(Item item, NPC target, NPC.HitInfo hit, int damageDone)
{
if (WeaponImbueBlackFlame && item.DamageType.CountsAsClass<MeleeDamageClass>())
{
target.AddBuff(ModContent.BuffType<BlackFlameDebuff>(), 60*3);
}
target.AddBuff(ModContent.BuffType<BlackFlameDebuff>(), 60 * 3); // 3 seconds
}
}
}

0 comments on commit 90f94d1

Please sign in to comment.