Added stealth strike availability method
This commit is contained in:
1 parent
8167fdf488
commit
0881cefeb2
4 files changed
+15
-27
No files matched your search
+14
-7
@@ -2857,13 +2857,20 @@ namespace CalamityMod
|
||||
{
|
||||
player.ClearBuff(BuffID.WindPushed);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region PostUpdate
|
||||
|
||||
#region PostUpdateBuffs
|
||||
public override void PostUpdateBuffs()
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region RogueStealthStrike
|
||||
public bool StealthStrikeAvailable()
|
||||
{
|
||||
return rogueStealth >= rogueStealthMax && rogueStealthMax > 0f;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region PostUpdate
|
||||
|
||||
#region PostUpdateBuffs
|
||||
public override void PostUpdateBuffs()
|
||||
{
|
||||
if (CalamityWorld.defiled)
|
||||
Defiled();
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Items;
|
||||
|
||||
namespace CalamityMod.Items.CalamityCustomThrowingDamage
|
||||
{
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Rogue
|
||||
@@ -80,15 +78,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
return new Color(250, 250, 250);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
CalamityPlayer modPlayer = Main.player[Main.myPlayer].GetModPlayer<CalamityPlayer>(mod);
|
||||
if (target.type == NPCID.TargetDummy || modPlayer.rogueStealth <= 0f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.GameContent.Achievements;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace CalamityMod.Projectiles.Rogue
|
||||
@@ -40,7 +37,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 0.785f;
|
||||
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 130, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, 0, new Color(255, 255, 255), 0.85f);
|
||||
projectile.ai[0] += 1f;
|
||||
if(projectile.ai[0] == 1f && modPlayer.rogueStealth >= modPlayer.rogueStealthMax && modPlayer.rogueStealthMax > 0f)
|
||||
if(projectile.ai[0] == 1f && modPlayer.StealthStrikeAvailable())
|
||||
lifesteal = true;
|
||||
if ((projectile.ai[0] %= 5f) == 0f)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user