use of com.watabou.pixeldungeon.items.food.FrozenCarpaccio in project pixel-dungeon by watabou.
the class Frost method attachTo.
@Override
public boolean attachTo(Char target) {
if (super.attachTo(target)) {
target.paralysed = true;
Burning.detach(target, Burning.class);
if (target instanceof Hero) {
Hero hero = (Hero) target;
Item item = hero.belongings.randomUnequipped();
if (item instanceof MysteryMeat) {
item = item.detach(hero.belongings.backpack);
FrozenCarpaccio carpaccio = new FrozenCarpaccio();
if (!carpaccio.collect(hero.belongings.backpack)) {
Dungeon.level.drop(carpaccio, target.pos).sprite.drop();
}
}
}
return true;
} else {
return false;
}
}
Aggregations