mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Merge branch 'master' of git.cardforge.org:core-developers/forge into assorted-fixes
This commit is contained in:
@@ -100,8 +100,7 @@ public abstract class Spell extends SpellAbility implements java.io.Serializable
|
||||
lki.animateBestow(false);
|
||||
|
||||
CardCollection preList = new CardCollection(lki);
|
||||
// FIXME: make this work with preList so that it doesn't cause game state corruption with pump effects (see issue #131)
|
||||
game.getAction().checkStaticAbilities(false, Sets.newHashSet(lki), /*preList*/new CardCollection());
|
||||
game.getAction().checkStaticAbilities(false, Sets.newHashSet(lki), preList);
|
||||
|
||||
flash = lki.hasKeyword("Flash");
|
||||
|
||||
|
||||
@@ -217,6 +217,11 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
||||
|
||||
// for Bestow need to check the animated State
|
||||
if (sa.isSpell() && sa.hasParam("Bestow")) {
|
||||
// already bestowed or in battlefield, no need to check for spell
|
||||
if (c.isBestowed() || c.isInZone(ZoneType.Battlefield)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!c.isLKI()) {
|
||||
cp = CardUtil.getLKICopy(c);
|
||||
}
|
||||
|
||||
@@ -829,19 +829,23 @@ public final class StaticAbilityContinuous {
|
||||
}
|
||||
|
||||
// non - CharacteristicDefining
|
||||
CardCollection affectedCards;
|
||||
if (preList.isEmpty()) {
|
||||
CardCollection affectedCards = new CardCollection();
|
||||
|
||||
// add preList in addition to the normal affected cards
|
||||
// need to add before game cards to have preference over them
|
||||
if (!preList.isEmpty()) {
|
||||
if (params.containsKey("AffectedZone")) {
|
||||
affectedCards = new CardCollection(game.getCardsIn(ZoneType.listValueOf(params.get("AffectedZone"))));
|
||||
affectedCards.addAll(CardLists.filter(preList, CardPredicates.inZone(
|
||||
ZoneType.listValueOf(params.get("AffectedZone")))));
|
||||
} else {
|
||||
affectedCards = new CardCollection(game.getCardsIn(ZoneType.Battlefield));
|
||||
affectedCards.addAll(CardLists.filter(preList, CardPredicates.inZone(ZoneType.Battlefield)));
|
||||
}
|
||||
}
|
||||
|
||||
if (params.containsKey("AffectedZone")) {
|
||||
affectedCards.addAll(game.getCardsIn(ZoneType.listValueOf(params.get("AffectedZone"))));
|
||||
} else {
|
||||
if (params.containsKey("AffectedZone")) {
|
||||
affectedCards = CardLists.filter(preList, CardPredicates.inZone(ZoneType.listValueOf(params.get("AffectedZone"))));
|
||||
} else {
|
||||
affectedCards = CardLists.filter(preList, CardPredicates.inZone(ZoneType.Battlefield));
|
||||
}
|
||||
affectedCards.addAll(game.getCardsIn(ZoneType.Battlefield));
|
||||
}
|
||||
|
||||
if (params.containsKey("Affected") && !params.get("Affected").contains(",")) {
|
||||
|
||||
Reference in New Issue
Block a user