mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Merge pull request #1095 from xaviermd/CardScript--CLB--Call-to-the-Void
Card script for Call to the Void and changes to ChooseCardEffect to enable card mechanisms.
This commit is contained in:
@@ -203,6 +203,18 @@ public class ChooseCardEffect extends SpellAbilityEffect {
|
|||||||
chosenPool.add(choice);
|
chosenPool.add(choice);
|
||||||
}
|
}
|
||||||
chosen.addAll(chosenPool);
|
chosen.addAll(chosenPool);
|
||||||
|
} else if (sa.hasParam("ControlAndNot")) {
|
||||||
|
String title = sa.hasParam("ChoiceTitle") ? sa.getParam("ChoiceTitle") : Localizer.getInstance().getMessage("lblChooseCreature");
|
||||||
|
// Targeted player (p) chooses N creatures that belongs to them
|
||||||
|
CardCollection tgtPlayerCtrl = CardLists.filterControlledBy(choices, p);
|
||||||
|
chosen.addAll(p.getController().chooseCardsForEffect(tgtPlayerCtrl, sa, title + " " + "you control", minAmount, validAmount,
|
||||||
|
!sa.hasParam("Mandatory"), null));
|
||||||
|
// Targeted player (p) chooses N creatures that don't belong to them
|
||||||
|
CardCollection notTgtPlayerCtrl = new CardCollection(choices);
|
||||||
|
notTgtPlayerCtrl.removeAll(tgtPlayerCtrl);
|
||||||
|
chosen.addAll(p.getController().chooseCardsForEffect(notTgtPlayerCtrl, sa, title + " " + "you don't control", minAmount, validAmount,
|
||||||
|
!sa.hasParam("Mandatory"), null));
|
||||||
|
|
||||||
} else if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
} else if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
||||||
if (sa.hasParam("AtRandom") && !choices.isEmpty()) {
|
if (sa.hasParam("AtRandom") && !choices.isEmpty()) {
|
||||||
Aggregates.random(choices, validAmount, chosen);
|
Aggregates.random(choices, validAmount, chosen);
|
||||||
@@ -233,8 +245,13 @@ public class ChooseCardEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sa.hasParam("Reveal")) {
|
if (sa.hasParam("Reveal") && !sa.hasParam("SecretlyChoose")) {
|
||||||
game.getAction().reveal(chosen, p, true, Localizer.getInstance().getMessage("lblChosenCards") + " ");
|
game.getAction().reveal(chosen, p, true, sa.hasParam("RevealTitle") ? sa.getParam("RevealTitle") : Localizer.getInstance().getMessage("lblChosenCards") + " ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(sa.hasParam("Reveal") && sa.hasParam("SecretlyChoose")) {
|
||||||
|
for (final Player p : tgtPlayers) {
|
||||||
|
game.getAction().reveal(chosen, p, true, sa.hasParam("RevealTitle") ? sa.getParam("RevealTitle") : Localizer.getInstance().getMessage("lblChosenCards") + " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
host.setChosenCards(chosen);
|
host.setChosenCards(chosen);
|
||||||
|
|||||||
6
forge-gui/res/cardsfolder/upcoming/call_to_the_void.txt
Normal file
6
forge-gui/res/cardsfolder/upcoming/call_to_the_void.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
Name:Call to the Void
|
||||||
|
ManaCost:4 B
|
||||||
|
Types:Sorcery
|
||||||
|
A:SP$ ChooseCard | Defined$ Player | Choices$ Creature | SecretlyChoose$ True | Amount$ 1 | ControlAndNot$ True | ChoiceTitle$ Secretly choose a creature | Reveal$ True | RevealTitle$ OVERRIDE Chosen creatures. They will be destroyed. | SubAbility$ DBDestroyChosen | Mandatory$ True
|
||||||
|
SVar:DBDestroyChosen:DB$ DestroyAll | ValidCards$ Creature.ChosenCard
|
||||||
|
Oracle:Each player secretly chooses a creature they control and a creature they don't control. Then those choices are revealed. Destroy each creature chosen this way.
|
||||||
Reference in New Issue
Block a user