- Blockers with Trample should not open the AssignDamage dialog when there is only one creature it's blocking

This commit is contained in:
Sol
2013-04-15 03:18:56 +00:00
parent 56c2bff69f
commit d110c283ab

View File

@@ -188,12 +188,14 @@ public class PlayerControllerHuman extends PlayerController {
*/
@Override
public Map<Card, Integer> assignCombatDamage(Card attacker, List<Card> blockers, int damageDealt, GameEntity defender) {
// Attacker is a poor name here, since the creature assigning damage
// could just as easily be the blocker.
Map<Card, Integer> map;
if (defender != null && assignDamageAsIfNotBlocked(attacker)) {
map = new HashMap<Card, Integer>();
map.put(null, damageDealt);
} else {
if (attacker.hasKeyword("Trample") || (blockers.size() > 1)) {
if ((attacker.hasKeyword("Trample") && defender != null) || (blockers.size() > 1)) {
map = CMatchUI.SINGLETON_INSTANCE.getDamageToAssign(attacker, blockers, damageDealt, defender);
} else {
map = new HashMap<Card, Integer>();