Wave of item effects and implementation
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Chickensoft.Collections;
|
||||
using Godot;
|
||||
using System;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
@@ -77,4 +78,11 @@ public class HealthComponent : IHealthComponent
|
||||
if (restoreHP)
|
||||
Heal(raiseAmount);
|
||||
}
|
||||
|
||||
public void LowerMaximumHP(int lowerAmount)
|
||||
{
|
||||
_maximumHP.OnNext(Mathf.Max(_maximumHP.Value - lowerAmount, 1));
|
||||
if (_currentHP.Value > _maximumHP.Value)
|
||||
_currentHP.OnNext(_maximumHP.Value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user