v1.1.0: fixed spirit bow having negative damage values in rare cases

This commit is contained in:
Evan Debenham 2021-10-28 20:01:39 -04:00 committed by Evan Debenham
parent 59a9e786bb
commit 30eb015a57

View File

@ -184,16 +184,18 @@ public class SpiritBow extends Weapon {
@Override
public int min(int lvl) {
return 1 + Dungeon.hero.lvl/5
int dmg = 1 + Dungeon.hero.lvl/5
+ RingOfSharpshooting.levelDamageBonus(Dungeon.hero)
+ (curseInfusionBonus ? 1 : 0);
return Math.max(0, dmg);
}
@Override
public int max(int lvl) {
return 6 + (int)(Dungeon.hero.lvl/2.5f)
int dmg = 6 + (int)(Dungeon.hero.lvl/2.5f)
+ 2*RingOfSharpshooting.levelDamageBonus(Dungeon.hero)
+ (curseInfusionBonus ? 2 : 0);
return Math.max(0, dmg);
}
@Override