HP Drain sigil (shura) implementation
Drains 15% of damage done but HP isn't restored by VT timer
This commit is contained in:
@@ -354,7 +354,7 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
|
||||
{
|
||||
PlayerFXAnimations.Play("death");
|
||||
|
||||
if (AutoRevive || SigilComponent.Sigil.AutoRevive)
|
||||
if (AutoRevive || SigilComponent.Sigil.SigilTag == SigilTag.AutoRevive)
|
||||
return;
|
||||
|
||||
SetSigil(new NoneSigil());
|
||||
@@ -801,7 +801,7 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
|
||||
{
|
||||
if (animName == "death")
|
||||
{
|
||||
if (AutoRevive || SigilComponent.Sigil.AutoRevive)
|
||||
if (AutoRevive || SigilComponent.Sigil.SigilTag == SigilTag.AutoRevive)
|
||||
PlayerFXAnimations.PlayBackwards("revive");
|
||||
else
|
||||
PlayerDied?.Invoke();
|
||||
@@ -903,7 +903,8 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
|
||||
if (((Accessory)EquipmentComponent.EquippedAccessory.Value).AccessoryTag == AccessoryTag.HalfVTConsumption)
|
||||
_healthTimerActive = !_healthTimerActive;
|
||||
|
||||
HealthComponent.Heal(HealthTimerHPRate);
|
||||
if (SigilComponent.Sigil.SigilTag != SigilTag.HPDrain)
|
||||
HealthComponent.Heal(HealthTimerHPRate);
|
||||
|
||||
if (_healthTimerActive)
|
||||
VTComponent.Reduce(1);
|
||||
@@ -965,6 +966,13 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
|
||||
enemy.StatusEffectComponent.Rust.OnNext(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (SigilComponent.Sigil.SigilTag == SigilTag.HPDrain)
|
||||
{
|
||||
SfxDatabase.Instance.Play(SoundEffect.AbsorbHP);
|
||||
var hpToDrain = Mathf.RoundToInt(totalDamage * 0.15f);
|
||||
HealthComponent.Heal(hpToDrain);
|
||||
}
|
||||
}
|
||||
|
||||
private async void CollisionDetector_AreaEntered(Area3D area)
|
||||
|
||||
Reference in New Issue
Block a user