mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Require "Blockers" in TriggerAttackerBlocked to be an
Iterable rather than a List, fixing issue with Flash Foliage.
This commit is contained in:
@@ -17,12 +17,11 @@
|
|||||||
*/
|
*/
|
||||||
package forge.game.trigger;
|
package forge.game.trigger;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import forge.game.card.Card;
|
import forge.game.card.Card;
|
||||||
import forge.game.spellability.SpellAbility;
|
import forge.game.spellability.SpellAbility;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Trigger_AttackerBlocked class.
|
* Trigger_AttackerBlocked class.
|
||||||
@@ -61,8 +60,8 @@ public class TriggerAttackerBlocked extends Trigger {
|
|||||||
if (this.mapParams.containsKey("ValidBlocker")) {
|
if (this.mapParams.containsKey("ValidBlocker")) {
|
||||||
boolean valid = false;
|
boolean valid = false;
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<Card> list = (List<Card>) runParams2.get("Blockers");
|
final Iterable<Card> list = (Iterable<Card>) runParams2.get("Blockers");
|
||||||
for (Card b : list) {
|
for (final Card b : list) {
|
||||||
if (matchesValid(b, this.mapParams.get("ValidBlocker").split(","), this.getHostCard())) {
|
if (matchesValid(b, this.mapParams.get("ValidBlocker").split(","), this.getHostCard())) {
|
||||||
valid = true;
|
valid = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user