Search in sources :

Example 1 with WndTradeItem

use of com.watabou.pixeldungeon.windows.WndTradeItem in project pixel-dungeon by watabou.

the class Hero method actBuy.

private boolean actBuy(HeroAction.Buy action) {
    int dst = action.dst;
    if (pos == dst || Level.adjacent(pos, dst)) {
        ready();
        Heap heap = Dungeon.level.heaps.get(dst);
        if (heap != null && heap.type == Type.FOR_SALE && heap.size() == 1) {
            GameScene.show(new WndTradeItem(heap, true));
        }
        return false;
    } else if (getCloser(dst)) {
        return true;
    } else {
        ready();
        return false;
    }
}
Also used : WndTradeItem(com.watabou.pixeldungeon.windows.WndTradeItem) Heap(com.watabou.pixeldungeon.items.Heap)

Aggregations

Heap (com.watabou.pixeldungeon.items.Heap)1 WndTradeItem (com.watabou.pixeldungeon.windows.WndTradeItem)1