Search in sources :

Example 1 with WndWandmaker

use of com.watabou.pixeldungeon.windows.WndWandmaker in project pixel-dungeon-remix by NYRDS.

the class WandMaker method interact.

@Override
public boolean interact(final Hero hero) {
    getSprite().turnTo(getPos(), hero.getPos());
    if (Quest.given) {
        Item item = Quest.alternative ? hero.belongings.getItem(CorpseDust.class) : hero.belongings.getItem(Rotberry.Seed.class);
        if (item != null) {
            GameScene.show(new WndWandmaker(this, item));
        } else {
            tell(Quest.alternative ? TXT_DUST2 : TXT_BERRY2, hero.className());
        }
    } else {
        tell(Quest.alternative ? TXT_DUST1 : TXT_BERRY1);
        Quest.given = true;
        Quest.placeItem();
        Journal.add(Journal.Feature.WANDMAKER.desc());
    }
    return true;
}
Also used : WndWandmaker(com.watabou.pixeldungeon.windows.WndWandmaker) Item(com.watabou.pixeldungeon.items.Item) CorpseDust(com.watabou.pixeldungeon.items.quest.CorpseDust)

Aggregations

Item (com.watabou.pixeldungeon.items.Item)1 CorpseDust (com.watabou.pixeldungeon.items.quest.CorpseDust)1 WndWandmaker (com.watabou.pixeldungeon.windows.WndWandmaker)1