use of com.nyrds.pixeldungeon.items.artifacts.IActingItem in project pixel-dungeon-remix by NYRDS.
the class Hero method spend.
@Override
public void spend(float time) {
int hasteLevel = 0;
if (heroClass == HeroClass.ELF) {
hasteLevel++;
if (subClass == HeroSubClass.SCOUT) {
hasteLevel++;
}
}
for (Buff buff : buffs(RingOfHaste.Haste.class)) {
hasteLevel += ((RingOfHaste.Haste) buff).level;
}
for (Item item : belongings) {
if (item instanceof IActingItem && item.isEquipped(this)) {
((IActingItem) item).spend(this, time);
}
}
super.spend(hasteLevel == 0 ? time : (float) (time * Math.pow(1.1, -hasteLevel)));
}
Aggregations