Search in sources :

Example 1 with TomeOfMastery

use of com.watabou.pixeldungeon.items.TomeOfMastery in project pixel-dungeon by watabou.

the class Tengu method die.

@Override
public void die(Object cause) {
    Badges.Badge badgeToCheck = null;
    switch(Dungeon.hero.heroClass) {
        case WARRIOR:
            badgeToCheck = Badge.MASTERY_WARRIOR;
            break;
        case MAGE:
            badgeToCheck = Badge.MASTERY_MAGE;
            break;
        case ROGUE:
            badgeToCheck = Badge.MASTERY_ROGUE;
            break;
        case HUNTRESS:
            badgeToCheck = Badge.MASTERY_HUNTRESS;
            break;
    }
    if (!Badges.isUnlocked(badgeToCheck) || Dungeon.hero.subClass != HeroSubClass.NONE) {
        Dungeon.level.drop(new TomeOfMastery(), pos).sprite.drop();
    }
    GameScene.bossSlain();
    Dungeon.level.drop(new SkeletonKey(), pos).sprite.drop();
    super.die(cause);
    Badges.validateBossSlain();
    yell("Free at last...");
}
Also used : Badges(com.watabou.pixeldungeon.Badges) TomeOfMastery(com.watabou.pixeldungeon.items.TomeOfMastery) Badge(com.watabou.pixeldungeon.Badges.Badge) SkeletonKey(com.watabou.pixeldungeon.items.keys.SkeletonKey)

Aggregations

Badges (com.watabou.pixeldungeon.Badges)1 Badge (com.watabou.pixeldungeon.Badges.Badge)1 TomeOfMastery (com.watabou.pixeldungeon.items.TomeOfMastery)1 SkeletonKey (com.watabou.pixeldungeon.items.keys.SkeletonKey)1