mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +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);
|
lki.animateBestow(false);
|
||||||
|
|
||||||
CardCollection preList = new CardCollection(lki);
|
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);
|
||||||
game.getAction().checkStaticAbilities(false, Sets.newHashSet(lki), /*preList*/new CardCollection());
|
|
||||||
|
|
||||||
flash = lki.hasKeyword("Flash");
|
flash = lki.hasKeyword("Flash");
|
||||||
|
|
||||||
|
|||||||
@@ -217,6 +217,11 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
|||||||
|
|
||||||
// for Bestow need to check the animated State
|
// for Bestow need to check the animated State
|
||||||
if (sa.isSpell() && sa.hasParam("Bestow")) {
|
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()) {
|
if (!c.isLKI()) {
|
||||||
cp = CardUtil.getLKICopy(c);
|
cp = CardUtil.getLKICopy(c);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -829,19 +829,23 @@ public final class StaticAbilityContinuous {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// non - CharacteristicDefining
|
// non - CharacteristicDefining
|
||||||
CardCollection affectedCards;
|
CardCollection affectedCards = new CardCollection();
|
||||||
if (preList.isEmpty()) {
|
|
||||||
|
// 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")) {
|
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 {
|
} 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 {
|
} else {
|
||||||
if (params.containsKey("AffectedZone")) {
|
affectedCards.addAll(game.getCardsIn(ZoneType.Battlefield));
|
||||||
affectedCards = CardLists.filter(preList, CardPredicates.inZone(ZoneType.listValueOf(params.get("AffectedZone"))));
|
|
||||||
} else {
|
|
||||||
affectedCards = CardLists.filter(preList, CardPredicates.inZone(ZoneType.Battlefield));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.containsKey("Affected") && !params.get("Affected").contains(",")) {
|
if (params.containsKey("Affected") && !params.get("Affected").contains(",")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user