mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Added Ashiok, Dream Render.
This commit is contained in:
@@ -48,6 +48,11 @@ public class ChangeZoneAllEffect extends SpellAbilityEffect {
|
||||
cards = new CardCollection();
|
||||
for (final Player p : tgtPlayers) {
|
||||
cards.addAll(p.getCardsIn(origin));
|
||||
|
||||
if (origin.contains(ZoneType.Library) && sa.hasParam("Search") && !sa.getActivatingPlayer().canSearchOwnLibraryWith(sa, p)) {
|
||||
cards.removeAll(p.getCardsIn(ZoneType.Library));
|
||||
}
|
||||
|
||||
}
|
||||
if (origin.contains(ZoneType.Library) && sa.hasParam("Search")) {
|
||||
// Search library using changezoneall effect need a param "Search"
|
||||
|
||||
@@ -767,7 +767,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
||||
fetchList.addAll(player.getCardsIn(ZoneType.Library, fetchNum));
|
||||
}
|
||||
}
|
||||
if (decider.hasKeyword("CantSearchLibrary")) {
|
||||
if (decider.hasKeyword("CantSearchLibrary") || !decider.canSearchOwnLibraryWith(sa, player)) {
|
||||
fetchList.removeAll(player.getCardsIn(ZoneType.Library));
|
||||
// "if you do/sb does, shuffle" is not mandatory (usually a triggered ability), should has this param.
|
||||
// "then shuffle" is mandatory
|
||||
|
||||
@@ -2965,4 +2965,16 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean canSearchOwnLibraryWith(SpellAbility sa, Player targetPlayer) {
|
||||
if (sa == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (targetPlayer.equals(sa.getActivatingPlayer()) && hasKeyword("Spells and abilities you control can't cause you to search your library.")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
8
forge-gui/res/cardsfolder/a/ashiok_dream_render.txt
Normal file
8
forge-gui/res/cardsfolder/a/ashiok_dream_render.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Name:Ashiok, Dream Render
|
||||
ManaCost:1 UB UB
|
||||
Types:Legendary Planeswalker Ashiok
|
||||
Loyalty:5
|
||||
S:Mode$ Continuous | Affected$ Opponent | AddKeyword$ Spells and abilities you control can't cause you to search your library. | Description$ Spells and abilities your opponents control can't cause their controller to search their library.
|
||||
A:AB$ Mill | Cost$ SubCounter<1/LOYALTY> | Planeswalker$ True | NumCards$ 4 | ValidTgts$ Player | TgtPrompt$ Choose a player | SubAbility$ DBExileGrave | SpellDescription$ Target player puts the top four cards of their library into their graveyard. Then exile each opponent's graveyard.
|
||||
SVar:DBExileGrave:DB$ ChangeZoneAll | Origin$ Graveyard | Destination$ Exile | Defined$ Opponent | ChangeType$ Card
|
||||
Oracle:Spells and abilities your opponents control can't cause their controller to search their library.\n[-1]: Target player puts the top four cards of their library into their graveyard. Then exile each opponent's graveyard.
|
||||
Reference in New Issue
Block a user