use of com.nyrds.pixeldungeon.items.common.armor.SpiderArmor in project pixel-dungeon-remix by NYRDS.
the class Web method evolve.
@Override
protected void evolve() {
for (int i = 0; i < getLength(); i++) {
int offv = cur[i] > 0 ? cur[i] - 1 : 0;
off[i] = offv;
if (offv > 0) {
volume += offv;
Char ch = Actor.findChar(i);
boolean rootable = false;
if (ch != null) {
rootable = true;
if (ch instanceof Hero) {
if (((Hero) ch).belongings.armor instanceof SpiderArmor) {
rootable = false;
}
}
}
if (rootable) {
Buff.prolong(ch, Roots.class, TICK);
}
}
}
}
use of com.nyrds.pixeldungeon.items.common.armor.SpiderArmor in project pixel-dungeon-remix by NYRDS.
the class Hero method damage.
@Override
public void damage(int dmg, Object src) {
restoreHealth = false;
super.damage(dmg, src);
checkIfFurious();
interrupt();
if (belongings.armor instanceof SpiderArmor) {
// Armor proc
if (Random.Int(100) < 50) {
GameScene.add(Blob.seed(getPos(), Random.Int(5, 7), Web.class));
}
}
for (Item item : belongings) {
if (item instanceof IChaosItem && item.isEquipped(this)) {
if (!(src instanceof Hunger)) {
((IChaosItem) item).ownerTakesDamage(dmg);
}
}
}
}
Aggregations