use of com.watabou.pixeldungeon.items.weapon.missiles.Shuriken in project pixel-dungeon by watabou.
the class HuntressArmor method doSpecial.
@Override
public void doSpecial() {
Item proto = new Shuriken();
for (Mob mob : Dungeon.level.mobs) {
if (Level.fieldOfView[mob.pos]) {
Callback callback = new Callback() {
@Override
public void call() {
curUser.attack(targets.get(this));
targets.remove(this);
if (targets.isEmpty()) {
curUser.spendAndNext(curUser.attackDelay());
}
}
};
((MissileSprite) curUser.sprite.parent.recycle(MissileSprite.class)).reset(curUser.pos, mob.pos, proto, callback);
targets.put(callback, mob);
}
}
if (targets.size() == 0) {
GLog.w(TXT_NO_ENEMIES);
return;
}
curUser.HP -= (curUser.HP / 3);
curUser.sprite.zap(curUser.pos);
curUser.busy();
}
use of com.watabou.pixeldungeon.items.weapon.missiles.Shuriken in project pixel-dungeon by watabou.
the class TenguSprite method attack.
@Override
public void attack(int cell) {
if (!Level.adjacent(cell, ch.pos)) {
((MissileSprite) parent.recycle(MissileSprite.class)).reset(ch.pos, cell, new Shuriken(), new Callback() {
@Override
public void call() {
ch.onAttackComplete();
}
});
play(cast);
turnTo(ch.pos, cell);
} else {
super.attack(cell);
}
}
Aggregations