* Fixed that attacking creature with deathtouch and trample had to assign more than 1 damage to blocker if only blocked by one (fixes #290).

This commit is contained in:
LevelX2 2013-07-20 12:43:07 +02:00
parent 15862b4fc5
commit b1915a1b9a

View file

@ -213,7 +213,12 @@ public class CombatGroup implements Serializable, Copyable<CombatGroup> {
if (blocked && canDamage(attacker, first)) {
int damage = attacker.getPower().getValue();
if (hasTrample(attacker)) {
int lethalDamage = blocker.getToughness().getValue() - blocker.getDamage();
int lethalDamage;
if (attacker.getAbilities().containsKey(DeathtouchAbility.getInstance().getId())) {
lethalDamage = 1;
} else {
lethalDamage = blocker.getToughness().getValue() - blocker.getDamage();
}
if (lethalDamage >= damage) {
blocker.markDamage(damage, attacker.getId(), game, true, true);
}