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