Search in sources :

Example 1 with SpiderArmor

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);
            }
        }
    }
}
Also used : Char(com.watabou.pixeldungeon.actors.Char) Hero(com.watabou.pixeldungeon.actors.hero.Hero) SpiderArmor(com.nyrds.pixeldungeon.items.common.armor.SpiderArmor)

Example 2 with SpiderArmor

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);
            }
        }
    }
}
Also used : IChaosItem(com.nyrds.pixeldungeon.items.chaos.IChaosItem) Item(com.watabou.pixeldungeon.items.Item) WndTradeItem(com.watabou.pixeldungeon.windows.WndTradeItem) IActingItem(com.nyrds.pixeldungeon.items.artifacts.IActingItem) Hunger(com.watabou.pixeldungeon.actors.buffs.Hunger) Web(com.watabou.pixeldungeon.actors.blobs.Web) IChaosItem(com.nyrds.pixeldungeon.items.chaos.IChaosItem) SpiderArmor(com.nyrds.pixeldungeon.items.common.armor.SpiderArmor)

Aggregations

SpiderArmor (com.nyrds.pixeldungeon.items.common.armor.SpiderArmor)2 IActingItem (com.nyrds.pixeldungeon.items.artifacts.IActingItem)1 IChaosItem (com.nyrds.pixeldungeon.items.chaos.IChaosItem)1 Char (com.watabou.pixeldungeon.actors.Char)1 Web (com.watabou.pixeldungeon.actors.blobs.Web)1 Hunger (com.watabou.pixeldungeon.actors.buffs.Hunger)1 Hero (com.watabou.pixeldungeon.actors.hero.Hero)1 Item (com.watabou.pixeldungeon.items.Item)1 WndTradeItem (com.watabou.pixeldungeon.windows.WndTradeItem)1