Neoplasm regen ability

This commit is contained in:
Anuken
2021-09-23 17:34:19 -04:00
parent 01f06cd0f7
commit de7dfc75f9
4 changed files with 31 additions and 2 deletions

View File

@@ -0,0 +1,16 @@
package mindustry.entities.abilities;
import arc.util.*;
import mindustry.gen.*;
public class RegenAbility extends Ability{
/** Amount healed as percent per tick. */
public float percentAmount = 0f;
/** Amount healed as a flat amount per tick. */
public float amount = 0f;
@Override
public void update(Unit unit){
unit.heal((unit.maxHealth * percentAmount / 100f + amount) * Time.delta);
}
}