use of com.watabou.pixeldungeon.actors.hero.HeroSubClass in project pixel-dungeon-remix by NYRDS.
the class TomeOfMastery method execute.
@Override
public void execute(Hero hero, String action) {
if (action.equals(AC_READ)) {
if (hero.hasBuff(Blindness.class)) {
GLog.w(TXT_BLINDED);
return;
}
if (hero.subClass != HeroSubClass.NONE) {
GLog.w(TXT_WAY_ALREADY_CHOSEN);
return;
}
setCurUser(hero);
HeroSubClass way1 = null;
HeroSubClass way2 = null;
switch(hero.heroClass) {
case WARRIOR:
way1 = HeroSubClass.GLADIATOR;
way2 = HeroSubClass.BERSERKER;
break;
case MAGE:
way1 = HeroSubClass.BATTLEMAGE;
way2 = HeroSubClass.WARLOCK;
break;
case ROGUE:
way1 = HeroSubClass.FREERUNNER;
way2 = HeroSubClass.ASSASSIN;
break;
case HUNTRESS:
way1 = HeroSubClass.SNIPER;
way2 = HeroSubClass.WARDEN;
break;
case ELF:
way1 = HeroSubClass.SCOUT;
way2 = HeroSubClass.SHAMAN;
break;
default:
GLog.w(TXT_WAY_ALREADY_CHOSEN);
return;
}
GameScene.show(new WndChooseWay(this, way1, way2));
} else {
super.execute(hero, action);
}
}
use of com.watabou.pixeldungeon.actors.hero.HeroSubClass in project pixel-dungeon-remix by NYRDS.
the class BlackSkullOfMastery method execute.
@Override
public void execute(Hero hero, String action) {
if (action.equals(AC_NECROMANCY)) {
setCurUser(hero);
HeroSubClass way;
switch(hero.heroClass) {
default:
GLog.w("Error: How did you get this item?! You're not supposed to be able to obtain it!!");
return;
case NECROMANCER:
way = HeroSubClass.LICH;
hero.setMaxSoulPoints(hero.getSoulPointsMax() * 2);
break;
}
GameScene.show(new WndChooseWay(this, way));
} else {
super.execute(hero, action);
}
}
Aggregations