v0.4.2b: fixed berserker bonus damage not applying to lucky enchants
This commit is contained in:
parent
8501abc9cf
commit
afc3db2e13
|
@ -22,6 +22,9 @@ package com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Berserk;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
|
||||||
|
@ -43,6 +46,10 @@ public class Lucky extends Weapon.Enchantment {
|
||||||
damage = weapon.imbue.damageFactor(weapon.min()) - defender.drRoll();
|
damage = weapon.imbue.damageFactor(weapon.min()) - defender.drRoll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (attacker == Dungeon.hero && Dungeon.hero.subClass == HeroSubClass.BERSERKER ){
|
||||||
|
damage = Buff.affect(Dungeon.hero, Berserk.class).damageFactor(damage);
|
||||||
|
}
|
||||||
|
|
||||||
return Math.max(0, damage);
|
return Math.max(0, damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user