v0.6.3a: fixed imbues and sharpshooting sometimes affecting str bonus
This commit is contained in:
parent
4f5355bca4
commit
c892fb30cf
|
@ -52,8 +52,8 @@ public class MeleeWeapon extends Weapon {
|
|||
|
||||
@Override
|
||||
public int damageRoll(Char owner) {
|
||||
int damage = super.damageRoll( owner );
|
||||
|
||||
int damage = imbue.damageFactor(super.damageRoll( owner ));
|
||||
|
||||
if (owner instanceof Hero) {
|
||||
int exStr = ((Hero)owner).STR() - STRReq();
|
||||
if (exStr > 0) {
|
||||
|
@ -61,7 +61,7 @@ public class MeleeWeapon extends Weapon {
|
|||
}
|
||||
}
|
||||
|
||||
return imbue.damageFactor(damage);
|
||||
return damage;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -164,7 +164,8 @@ abstract public class MissileWeapon extends Weapon {
|
|||
|
||||
@Override
|
||||
public int damageRoll(Char owner) {
|
||||
int damage = super.damageRoll( owner );
|
||||
int damage = imbue.damageFactor(super.damageRoll( owner ));
|
||||
damage = Math.round( damage * RingOfSharpshooting.damageMultiplier( owner ));
|
||||
|
||||
if (owner instanceof Hero &&
|
||||
((Hero)owner).heroClass == HeroClass.HUNTRESS) {
|
||||
|
@ -174,7 +175,7 @@ abstract public class MissileWeapon extends Weapon {
|
|||
}
|
||||
}
|
||||
|
||||
return (int)(imbue.damageFactor(damage) * RingOfSharpshooting.damageMultiplier( owner ));
|
||||
return damage;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -234,8 +235,8 @@ abstract public class MissileWeapon extends Weapon {
|
|||
String info = desc();
|
||||
|
||||
info += "\n\n" + Messages.get( MissileWeapon.class, "stats",
|
||||
(int)(imbue.damageFactor(min()) * RingOfSharpshooting.damageMultiplier( Dungeon.hero )),
|
||||
(int)(imbue.damageFactor(max()) * RingOfSharpshooting.damageMultiplier( Dungeon.hero )),
|
||||
Math.round(imbue.damageFactor(min()) * RingOfSharpshooting.damageMultiplier( Dungeon.hero )),
|
||||
Math.round(imbue.damageFactor(max()) * RingOfSharpshooting.damageMultiplier( Dungeon.hero )),
|
||||
STRReq());
|
||||
|
||||
if (STRReq() > Dungeon.hero.STR()) {
|
||||
|
|
|
@ -69,14 +69,15 @@ public class ThrowingKnife extends MissileWeapon {
|
|||
if (enemy instanceof Mob && ((Mob) enemy).surprisedBy(hero)) {
|
||||
//deals 75% toward max to max on surprise, instead of min to max.
|
||||
int diff = max() - min();
|
||||
int damage = Random.NormalIntRange(
|
||||
int damage = imbue.damageFactor(Random.NormalIntRange(
|
||||
min() + Math.round(diff*0.75f),
|
||||
max());
|
||||
max()));
|
||||
damage = Math.round(damage * RingOfSharpshooting.damageMultiplier( hero ));
|
||||
int exStr = hero.STR() - STRReq();
|
||||
if (exStr > 0 && hero.heroClass == HeroClass.HUNTRESS) {
|
||||
damage += Random.IntRange(0, exStr);
|
||||
}
|
||||
return (int)(imbue.damageFactor(damage) * RingOfSharpshooting.damageMultiplier( hero ));
|
||||
return damage;
|
||||
}
|
||||
}
|
||||
return super.damageRoll(owner);
|
||||
|
|
Loading…
Reference in New Issue
Block a user