Search in sources :

Example 1 with Knuckles

use of com.watabou.pixeldungeon.items.weapon.melee.Knuckles in project pixel-dungeon by watabou.

the class Monk method attackProc.

@Override
public int attackProc(Char enemy, int damage) {
    if (Random.Int(6) == 0 && enemy == Dungeon.hero) {
        Hero hero = Dungeon.hero;
        KindOfWeapon weapon = hero.belongings.weapon;
        if (weapon != null && !(weapon instanceof Knuckles) && !weapon.cursed) {
            hero.belongings.weapon = null;
            Dungeon.level.drop(weapon, hero.pos).sprite.drop();
            GLog.w(TXT_DISARM, name, weapon.name());
        }
    }
    return damage;
}
Also used : Knuckles(com.watabou.pixeldungeon.items.weapon.melee.Knuckles) Hero(com.watabou.pixeldungeon.actors.hero.Hero) KindOfWeapon(com.watabou.pixeldungeon.items.KindOfWeapon)

Aggregations

Hero (com.watabou.pixeldungeon.actors.hero.Hero)1 KindOfWeapon (com.watabou.pixeldungeon.items.KindOfWeapon)1 Knuckles (com.watabou.pixeldungeon.items.weapon.melee.Knuckles)1