v2.0.0: fixed rare cases of WoL incorrectly taking hero kill credit
This commit is contained in:
+6
-7
@@ -82,18 +82,17 @@ public class WandOfLightning extends DamageWand {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
wandProc(ch, chargesPerCast());
|
wandProc(ch, chargesPerCast());
|
||||||
if (ch == curUser) {
|
if (ch == curUser && ch.isAlive()) {
|
||||||
ch.damage(Math.round(damageRoll() * multipler * 0.5f), this);
|
ch.damage(Math.round(damageRoll() * multipler * 0.5f), this);
|
||||||
|
if (!curUser.isAlive()) {
|
||||||
|
Badges.validateDeathFromFriendlyMagic();
|
||||||
|
Dungeon.fail( getClass() );
|
||||||
|
GLog.n(Messages.get(this, "ondeath"));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ch.damage(Math.round(damageRoll() * multipler), this);
|
ch.damage(Math.round(damageRoll() * multipler), this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!curUser.isAlive()) {
|
|
||||||
Badges.validateDeathFromFriendlyMagic();
|
|
||||||
Dungeon.fail( getClass() );
|
|
||||||
GLog.n(Messages.get(this, "ondeath"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user