@Override public int STRReq(int lvl) { return SpiritBow.this.STRReq(lvl); }
@Override public int damageRoll(Char owner) { return SpiritBow.this.damageRoll(owner); }
@Override public boolean hasEnchant(Class<? extends Enchantment> type, Char owner) { return SpiritBow.this.hasEnchant(type, owner); }
@Override public String info() { String info = desc(); Math.round(augment.damageFactor(min())), Math.round(augment.damageFactor(max())), STRReq()); if (STRReq() > Dungeon.hero.STR()) { info += " " + Messages.get(Weapon.class, "too_heavy"); } else if (Dungeon.hero.STR() > STRReq()){ info += " " + Messages.get(Weapon.class, "excess_str", Dungeon.hero.STR() - STRReq()); if (cursed && isEquipped( Dungeon.hero )) { info += "\n\n" + Messages.get(Weapon.class, "cursed_worn"); } else if (cursedKnown && cursed) { info += "\n\n" + Messages.get(Weapon.class, "cursed"); } else if (!isIdentified() && cursedKnown){ info += "\n\n" + Messages.get(Weapon.class, "not_cursed");
hero.belongings.weapon = null; if (!bow.collect()){ level.drop(bow, hero.pos); if (bow != null && bow.spentUpgrades() > 0){ ScrollOfUpgrade refund = new ScrollOfUpgrade(); refund.quantity(bow.spentUpgrades()); bow.level(0);
private static void initHuntress( Hero hero ) { (hero.belongings.weapon = new Gloves()).identify(); SpiritBow bow = new SpiritBow(); bow.identify().collect(); Dungeon.quickslot.setSlot(0, bow); new VelvetPouch().collect(); Dungeon.LimitedDrops.VELVET_POUCH.drop(); new PotionOfMindVision().identify(); new ScrollOfLullaby().identify(); }
@Override public void onSelect( Integer target ) { if (target != null) { knockArrow().cast(curUser, target); } } @Override
@Override public String info() { String info = desc(); Math.round(augment.damageFactor(min())), Math.round(augment.damageFactor(max())), STRReq()); if (STRReq() > Dungeon.hero.STR()) { info += " " + Messages.get(Weapon.class, "too_heavy"); } else if (Dungeon.hero.STR() > STRReq()){ info += " " + Messages.get(Weapon.class, "excess_str", Dungeon.hero.STR() - STRReq()); if (cursed && isEquipped( Dungeon.hero )) { info += "\n\n" + Messages.get(Weapon.class, "cursed_worn"); } else if (cursedKnown && cursed) { info += "\n\n" + Messages.get(Weapon.class, "cursed"); } else if (!isIdentified() && cursedKnown){ info += "\n\n" + Messages.get(Weapon.class, "not_cursed");
hero.belongings.weapon = null; if (!bow.collect()){ level.drop(bow, hero.pos); if (bow != null && bow.spentUpgrades() > 0){ ScrollOfUpgrade refund = new ScrollOfUpgrade(); refund.quantity(bow.spentUpgrades()); bow.level(0);
private static void initHuntress( Hero hero ) { (hero.belongings.weapon = new Gloves()).identify(); SpiritBow bow = new SpiritBow(); bow.identify().collect(); Dungeon.quickslot.setSlot(0, bow); new VelvetPouch().collect(); Dungeon.LimitedDrops.VELVET_POUCH.drop(); new PotionOfMindVision().identify(); new ScrollOfLullaby().identify(); }
@Override public void onSelect( Integer target ) { if (target != null) { knockArrow().cast(curUser, target); } } @Override
@Override public void doAction() { Hero hero = Dungeon.hero; if (hero == null) return; SpiritBow bow = hero.belongings.getItem(SpiritBow.class); if (bow == null) return; SpiritBow.SpiritArrow arrow = bow.knockArrow(); if (arrow == null) return; Char ch = (Char) Actor.findById(object); if (ch == null) return; int cell = QuickSlotButton.autoAim(ch, arrow); if (cell == -1) return; bow.sniperSpecial = true; arrow.cast(hero, cell); detach(); } }
@Override public int STRReq(int lvl) { return SpiritBow.this.STRReq(lvl); }
@Override public boolean hasEnchant(Class<? extends Enchantment> type, Char owner) { return SpiritBow.this.hasEnchant(type, owner); }
@Override public int damageRoll(Char owner) { return SpiritBow.this.damageRoll(owner); }
@Override public void doAction() { Hero hero = Dungeon.hero; if (hero == null) return; SpiritBow bow = hero.belongings.getItem(SpiritBow.class); if (bow == null) return; SpiritBow.SpiritArrow arrow = bow.knockArrow(); if (arrow == null) return; Char ch = (Char) Actor.findById(object); if (ch == null) return; int cell = QuickSlotButton.autoAim(ch, arrow); if (cell == -1) return; bow.sniperSpecial = true; arrow.cast(hero, cell); detach(); } }
@Override public int damageRoll(Char owner) { int damage = augment.damageFactor(super.damageRoll(owner)); if (owner instanceof Hero) { int exStr = ((Hero)owner).STR() - STRReq(); if (exStr > 0) { damage += Random.IntRange( 0, exStr ); } } if (sniperSpecial){ switch (augment){ case NONE: damage = Math.round(damage * 0.667f); break; case SPEED: damage = Math.round(damage * 0.5f); break; case DAMAGE: int distance = Dungeon.level.distance(owner.pos, targetPos) - 1; damage = Math.round(damage * (1f + 0.1f * distance)); break; } } return damage; }
@Override public int damageRoll(Char owner) { int damage = augment.damageFactor(super.damageRoll(owner)); if (owner instanceof Hero) { int exStr = ((Hero)owner).STR() - STRReq(); if (exStr > 0) { damage += Random.IntRange( 0, exStr ); } } if (sniperSpecial){ switch (augment){ case NONE: damage = Math.round(damage * 0.667f); break; case SPEED: damage = Math.round(damage * 0.5f); break; case DAMAGE: int distance = Dungeon.level.distance(owner.pos, targetPos) - 1; damage = Math.round(damage * (1f + 0.1f * distance)); break; } } return damage; }