@Override public int attackSkill(Char target) { //same accuracy as the hero. int acc = Dungeon.hero.lvl + 9; if (rose != null && rose.weapon != null){ acc *= rose.weapon.accuracyFactor(this); } return acc; }
@Override public ArrayList<String> actions(Hero hero) { ArrayList<String> actions = super.actions( hero ); actions.add(AC_IMBUE); if (wand!= null && wand.curCharges > 0) { actions.add( AC_ZAP ); } return actions; }
@Override protected boolean canAttack(Char enemy) { return super.canAttack(enemy) || (rose != null && rose.weapon != null && rose.weapon.canReach(this, enemy.pos)); }
@Override public String info() { String info = desc(); info += "\n\n" + Messages.get(MeleeWeapon.class, "stats_known", tier, augment.damageFactor(min()), 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()); info += "\n\n" + Messages.get(MeleeWeapon.class, "stats_unknown", tier, min(0), max(0), STRReq(0)); if (STRReq(0) > Dungeon.hero.STR()) { info += " " + Messages.get(MeleeWeapon.class, "probably_too_heavy"); String statsInfo = statsInfo(); if (!statsInfo.equals("")) info += "\n\n" + statsInfo; 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");
@Override public int damageRoll() { int dmg = 0; if (rose != null && rose.weapon != null){ dmg += rose.weapon.damageRoll(this); } else { dmg += Random.NormalIntRange(0, 5); } return dmg; }
@Override public int drRoll() { int block = 0; if (rose != null && rose.armor != null){ block += Random.NormalIntRange( rose.armor.DRMin(), rose.armor.DRMax()); } if (rose != null && rose.weapon != null){ block += Random.NormalIntRange( 0, rose.weapon.defenseFactor( this )); } return block; }
@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 ); } } return damage; }
@Override public boolean collect( Bag container ) { if (super.collect(container)) { if (container.owner != null && wand != null) { wand.charge(container.owner, STAFF_SCALE_FACTOR); } return true; } else { return false; } }
@Override public Item degrade() { super.degrade(); if (wand != null) { int curCharges = wand.curCharges; wand.degrade(); //gives the wand one additional charge wand.maxCharges = Math.min(wand.maxCharges + 1, 10); wand.curCharges = curCharges-1; updateQuickslot(); } return this; }
if (rose.weapon != null){ item(new WndBag.Placeholder(ItemSpriteSheet.WEAPON_HOLDER)); if (!rose.weapon.doPickUp(Dungeon.hero)){ Dungeon.level.drop( rose.weapon, Dungeon.hero.pos);
@Override public String info() { String info = desc(); info += "\n\n" + Messages.get(MeleeWeapon.class, "stats_known", tier, augment.damageFactor(min()), 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()); info += "\n\n" + Messages.get(MeleeWeapon.class, "stats_unknown", tier, min(0), max(0), STRReq(0)); if (STRReq(0) > Dungeon.hero.STR()) { info += " " + Messages.get(MeleeWeapon.class, "probably_too_heavy"); String statsInfo = statsInfo(); if (!statsInfo.equals("")) info += "\n\n" + statsInfo; 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");
@Override public int damageRoll() { int dmg = 0; if (rose != null && rose.weapon != null){ dmg += rose.weapon.damageRoll(this); } else { dmg += Random.NormalIntRange(0, 5); } return dmg; }
@Override public int drRoll() { int block = 0; if (rose != null && rose.armor != null){ block += Random.NormalIntRange( rose.armor.DRMin(), rose.armor.DRMax()); } if (rose != null && rose.weapon != null){ block += Random.NormalIntRange( 0, rose.weapon.defenseFactor( this )); } return block; }
@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 ); } } return damage; }
@Override public boolean collect( Bag container ) { if (super.collect(container)) { if (container.owner != null && wand != null) { wand.charge(container.owner, STAFF_SCALE_FACTOR); } return true; } else { return false; } }
@Override public Item degrade() { super.degrade(); if (wand != null) { int curCharges = wand.curCharges; wand.degrade(); //gives the wand one additional charge wand.maxCharges = Math.min(wand.maxCharges + 1, 10); wand.curCharges = curCharges-1; updateQuickslot(); } return this; }
if (rose.weapon != null){ item(new WndBag.Placeholder(ItemSpriteSheet.WEAPON_HOLDER)); if (!rose.weapon.doPickUp(Dungeon.hero)){ Dungeon.level.drop( rose.weapon, Dungeon.hero.pos);
@Override public int damageRoll(Char owner) { if (owner instanceof Hero) { Hero hero = (Hero)owner; Char enemy = hero.enemy(); if (enemy instanceof Mob && ((Mob) enemy).surprisedBy(hero)) { //deals 50% toward max to max on surprise, instead of min to max. int diff = max() - min(); int damage = augment.damageFactor(Random.NormalIntRange( min() + Math.round(diff*0.50f), max())); int exStr = hero.STR() - STRReq(); if (exStr > 0) { damage += Random.IntRange(0, exStr); } return damage; } } return super.damageRoll(owner); }
@Override public ArrayList<String> actions(Hero hero) { ArrayList<String> actions = super.actions( hero ); actions.add(AC_IMBUE); if (wand!= null && wand.curCharges > 0) { actions.add( AC_ZAP ); } return actions; }
@Override public int attackSkill(Char target) { //same accuracy as the hero. int acc = Dungeon.hero.lvl + 9; if (rose != null && rose.weapon != null){ acc *= rose.weapon.accuracyFactor(this); } return acc; }