mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Fix cleanup crash with planeswalkers in play
This commit is contained in:
@@ -58,7 +58,7 @@ public class Combat {
|
||||
|
||||
// Defenders are the Defending Player + Each controlled Planeswalker
|
||||
private List<GameEntity> defenders = new ArrayList<GameEntity>();
|
||||
private Map<GameEntity, CardList> defenderMap = new TreeMap<GameEntity, CardList>();
|
||||
private Map<GameEntity, CardList> defenderMap = new HashMap<GameEntity, CardList>();
|
||||
private int currentDefender = 0;
|
||||
private int nextDefender = 0;
|
||||
|
||||
@@ -545,7 +545,8 @@ public class Combat {
|
||||
*
|
||||
* @param attacker
|
||||
* a {@link forge.Card} object.
|
||||
* @return a {@link forge.CardList} object.
|
||||
* @param blockers
|
||||
* a {@link forge.CardList} object.
|
||||
*/
|
||||
public void setBlockerList(final Card attacker, final CardList blockers) {
|
||||
this.attackerMap.put(attacker, blockers);
|
||||
@@ -684,8 +685,8 @@ public class Combat {
|
||||
}
|
||||
|
||||
private final boolean assignDamageAsIfNotBlocked(Card attacker) {
|
||||
return attacker.hasKeyword("CARDNAME assigns its combat damage as though it weren't blocked.") ||
|
||||
(attacker.hasKeyword("You may have CARDNAME assign its combat damage as though it weren't blocked.")
|
||||
return attacker.hasKeyword("CARDNAME assigns its combat damage as though it weren't blocked.")
|
||||
|| (attacker.hasKeyword("You may have CARDNAME assign its combat damage as though it weren't blocked.")
|
||||
&& GameActionUtil.showYesNoDialog(attacker, "Do you want to assign its combat damage as though it weren't blocked?"));
|
||||
}
|
||||
|
||||
@@ -740,7 +741,6 @@ public class Combat {
|
||||
return assignedDamage;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* distributeAIDamage.
|
||||
|
||||
Reference in New Issue
Block a user