mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Added Aven Mindcensor
This commit is contained in:
@@ -1106,6 +1106,13 @@ public class ChangeZoneAi extends SpellAbilityAi {
|
||||
fetchList = AbilityUtils.filterListByType(fetchList, type, sa);
|
||||
} else {
|
||||
fetchList = player.getCardsIn(origin);
|
||||
if (origin.contains(ZoneType.Library) && ai.hasKeyword("LimitSearchLibrary")
|
||||
&& !sa.hasParam("NoLooking")) {
|
||||
// Aven Mindcensor
|
||||
fetchList.removeAll(player.getCardsIn(ZoneType.Library));
|
||||
final int fetchNum = Math.min(player.getCardsIn(ZoneType.Library).size(), 4);
|
||||
fetchList.addAll(player.getCardsIn(ZoneType.Library, fetchNum));
|
||||
}
|
||||
fetchList = AbilityUtils.filterListByType(fetchList, type, sa);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.google.common.collect.Iterables;
|
||||
|
||||
import forge.Card;
|
||||
import forge.CardCharacteristicName;
|
||||
import forge.CardLists;
|
||||
import forge.CardPredicates;
|
||||
import forge.card.ability.AbilityUtils;
|
||||
import forge.card.ability.SpellAbilityEffect;
|
||||
@@ -47,12 +48,24 @@ public class ChangeZoneAllEffect extends SpellAbilityEffect {
|
||||
|
||||
if ((tgtPlayers == null) || tgtPlayers.isEmpty() || sa.hasParam("UseAllOriginZones")) {
|
||||
cards = game.getCardsIn(origin);
|
||||
} else if (sa.getActivatingPlayer().hasKeyword("LimitSearchLibrary")
|
||||
&& origin.contains(ZoneType.Library) && sa.hasParam("Search")) {
|
||||
for (final Player p : tgtPlayers) {
|
||||
cards.addAll(p.getCardsIn(origin));
|
||||
cards.removeAll(p.getCardsIn(ZoneType.Library));
|
||||
int fetchNum = Math.min(p.getCardsIn(ZoneType.Library).size(), 4);
|
||||
cards.addAll(p.getCardsIn(ZoneType.Library, fetchNum));
|
||||
}
|
||||
} else {
|
||||
for (final Player p : tgtPlayers) {
|
||||
cards.addAll(p.getCardsIn(origin));
|
||||
}
|
||||
}
|
||||
|
||||
if (sa.getActivatingPlayer().isHuman() && origin.contains(ZoneType.Library)
|
||||
&& sa.hasParam("Search")) {
|
||||
GuiChoose.oneOrNone("Looking at the Library",
|
||||
CardLists.getValidCards(cards, "Card.inZoneLibrary", sa.getActivatingPlayer(), sa.getSourceCard()));
|
||||
}
|
||||
cards = AbilityUtils.filterListByType(cards, sa.getParam("ChangeType"), sa);
|
||||
|
||||
if (sa.hasParam("ForgetOtherRemembered")) {
|
||||
|
||||
@@ -682,13 +682,22 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
||||
fetchList = game.getCardsIn(origin);
|
||||
} else {
|
||||
fetchList = player.getCardsIn(origin);
|
||||
if (origin.contains(ZoneType.Library) && decider.hasKeyword("LimitSearchLibrary")
|
||||
&& !sa.hasParam("NoLooking")) {// Aven Mindcensor
|
||||
fetchList.removeAll(player.getCardsIn(ZoneType.Library));
|
||||
final int fetchNum = Math.min(player.getCardsIn(ZoneType.Library).size(), 4);
|
||||
fetchList.addAll(player.getCardsIn(ZoneType.Library, fetchNum));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!defined) {
|
||||
if (origin.contains(ZoneType.Library) && !defined && !sa.hasParam("NoLooking")) {
|
||||
final int fetchNum = Math.min(player.getCardsIn(ZoneType.Library).size(), 4);
|
||||
// Look at whole library before moving onto choosing a card
|
||||
GuiChoose.oneOrNone(sa.getSourceCard().getName() + " - Looking at Library",
|
||||
player.getCardsIn(ZoneType.Library));
|
||||
!decider.hasKeyword("LimitSearchLibrary")
|
||||
? player.getCardsIn(ZoneType.Library)
|
||||
: player.getCardsIn(ZoneType.Library, fetchNum));
|
||||
}
|
||||
|
||||
// Look at opponents hand before moving onto choosing a card
|
||||
|
||||
Reference in New Issue
Block a user