public static int armedDamageBonus( Char ch ){ return getBonus( ch, Force.class); }
public static int damageRoll( Hero hero ){ if (hero.buff(Force.class) != null) { int level = getBonus(hero, Force.class); float tier = tier(hero.STR()); return Random.NormalIntRange(min(level, tier), max(level, tier)); } else { //attack without any ring of force influence return Random.NormalIntRange(1, Math.max(hero.STR()-8, 1)); } }
@Override public int damageRoll() { KindOfWeapon wep = belongings.weapon; int dmg; if (wep != null) { dmg = wep.damageRoll( this ); if (!(wep instanceof MissileWeapon)) dmg += RingOfForce.armedDamageBonus(this); } else { dmg = RingOfForce.damageRoll(this); } if (dmg < 0) dmg = 0; Berserk berserk = buff(Berserk.class); if (berserk != null) dmg = berserk.damageFactor(dmg); return buff( Fury.class ) != null ? (int)(dmg * 1.5f) : dmg; }
"A +6 ring grants almost exactly doubled attack speed.")); changes.addButton( new ChangeButton( new ItemSprite(ItemSpriteSheet.RING_GARNET, null), new RingOfForce().trueName(), "The ring of force's equipped weapon bonus was always meant as a small boost so it wasn't useless if the player already had a better weapon. It wasn't intended to be used to both replace melee and then boost thrown weapons.\n" + "_-_ The ring of force no longer gives bonus damage to thrown weapons."));
public static int damageRoll( Hero hero ){ if (hero.buff(Force.class) != null) { int level = getBonus(hero, Force.class); float tier = tier(hero.STR()); return Random.NormalIntRange(min(level, tier), max(level, tier)); } else { //attack without any ring of force influence return Random.NormalIntRange(1, Math.max(hero.STR()-8, 1)); } }
@Override public int damageRoll() { KindOfWeapon wep = belongings.weapon; int dmg; if (wep != null) { dmg = wep.damageRoll( this ); if (!(wep instanceof MissileWeapon)) dmg += RingOfForce.armedDamageBonus(this); } else { dmg = RingOfForce.damageRoll(this); } if (dmg < 0) dmg = 0; Berserk berserk = buff(Berserk.class); if (berserk != null) dmg = berserk.damageFactor(dmg); return buff( Fury.class ) != null ? (int)(dmg * 1.5f) : dmg; }
"A +6 ring grants almost exactly doubled attack speed.")); changes.addButton( new ChangeButton( new ItemSprite(ItemSpriteSheet.RING_GARNET, null), new RingOfForce().trueName(), "The ring of force's equipped weapon bonus was always meant as a small boost so it wasn't useless if the player already had a better weapon. It wasn't intended to be used to both replace melee and then boost thrown weapons.\n" + "_-_ The ring of force no longer gives bonus damage to thrown weapons."));
public static int armedDamageBonus( Char ch ){ return getBonus( ch, Force.class); }