use of com.watabou.pixeldungeon.windows.WndQuest in project pixel-dungeon-remix by NYRDS.
the class AzuterronNPC method interact.
@Override
public boolean interact(final Hero hero) {
getSprite().turnTo(getPos(), hero.getPos());
if (Quest.completed) {
sell();
return true;
}
if (Quest.given) {
Item item = hero.belongings.getItem(HeartOfDarkness.class);
if (item != null) {
item.removeItemFrom(Dungeon.hero);
Item reward = new PotionOfMight();
if (reward.doPickUp(Dungeon.hero)) {
GLog.i(Hero.TXT_YOU_NOW_HAVE, reward.name());
} else {
Dungeon.level.drop(reward, hero.getPos()).sprite.drop();
}
Quest.complete();
GameScene.show(new WndQuest(this, TXT_QUEST_END));
} else {
GameScene.show(new WndQuest(this, TXT_QUEST));
}
} else {
GameScene.show(new WndQuest(this, TXT_QUEST_START));
Quest.given = true;
Quest.process();
Journal.add(Journal.Feature.AZUTERRON.desc());
}
return true;
}
use of com.watabou.pixeldungeon.windows.WndQuest in project pixel-dungeon-remix by NYRDS.
the class BellaNPC method interact.
@Override
public boolean interact(final Hero hero) {
getSprite().turnTo(getPos(), hero.getPos());
GameScene.show(new WndQuest(this, TXT_MESSAGE));
return true;
}
use of com.watabou.pixeldungeon.windows.WndQuest in project pixel-dungeon-remix by NYRDS.
the class ScarecrowNPC method interact.
@Override
public boolean interact(final Hero hero) {
getSprite().turnTo(getPos(), hero.getPos());
if (Quest.completed) {
this.die(null);
return true;
}
if (Quest.given) {
Item item = hero.belongings.getItem(Candy.class);
if (item != null && item.quantity() == 5) {
item.removeItemFrom(Dungeon.hero);
Item reward = new PumpkinPie();
reward.quantity(5);
if (reward.doPickUp(Dungeon.hero)) {
GLog.i(Hero.TXT_YOU_NOW_HAVE, reward.name());
} else {
Dungeon.level.drop(reward, hero.getPos()).sprite.drop();
}
Quest.complete();
GameScene.show(new WndQuest(this, TXT_QUEST_END));
} else {
GameScene.show(new WndQuest(this, TXT_QUEST));
}
} else {
String txtQuestStart = TXT_QUEST_START_M;
if (Dungeon.hero.getGender() == Utils.FEMININE) {
txtQuestStart = TXT_QUEST_START_F;
}
GameScene.show(new WndQuest(this, txtQuestStart));
Quest.given = true;
Quest.process(hero.getPos());
Journal.add(Journal.Feature.SCARECROW.desc());
}
return true;
}
use of com.watabou.pixeldungeon.windows.WndQuest in project pixel-dungeon-remix by NYRDS.
the class TownGuardNPC method interact.
@Override
public boolean interact(final Hero hero) {
getSprite().turnTo(getPos(), hero.getPos());
int index = Random.Int(0, TXT_PHRASES.length);
GameScene.show(new WndQuest(this, TXT_PHRASES[index]));
return true;
}
use of com.watabou.pixeldungeon.windows.WndQuest in project pixel-dungeon-remix by NYRDS.
the class TownsfolkSilentNPC method interact.
@Override
public boolean interact(final Hero hero) {
getSprite().turnTo(getPos(), hero.getPos());
int index = Random.Int(0, TXT_PHRASES.length);
GameScene.show(new WndQuest(this, TXT_PHRASES[index]));
return true;
}
Aggregations