From afc3db2e13da943af323dd09265e1f8ae5948d94 Mon Sep 17 00:00:00 2001
From: Evan Debenham <Evan.SHPX@gmail.com>
Date: Wed, 14 Sep 2016 21:21:12 -0400
Subject: [PATCH] v0.4.2b: fixed berserker bonus damage not applying to lucky
 enchants

---
 .../items/weapon/enchantments/Lucky.java                   | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Lucky.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Lucky.java
index ba0ff76cd..8dc16bd2a 100644
--- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Lucky.java
+++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Lucky.java
@@ -22,6 +22,9 @@ package com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments;
 
 import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
 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.sprites.ItemSprite;
 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();
 		}
 
+		if (attacker == Dungeon.hero && Dungeon.hero.subClass == HeroSubClass.BERSERKER ){
+			damage = Buff.affect(Dungeon.hero, Berserk.class).damageFactor(damage);
+		}
+
 		return Math.max(0, damage);
 	}