mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Added support for mandatory targeting in AF Play.
This commit is contained in:
@@ -5,13 +5,11 @@ Text:no text
|
||||
K:Players can't draw cards.
|
||||
T:Mode$ Phase | Phase$ Draw | ValidPlayer$ You | Execute$ TrigOmenExileCardYou | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of each player's draw step, that player exiles the top card of his or her library. If it's a land card, the player puts it onto the battlefield. Otherwise, the player casts it without paying its mana cost if able.
|
||||
SVar:TrigOmenExileCardYou:AB$ Mill | Cost$ 0 | NumCards$ 1 | Defined$ You | Destination$ Exile | RememberMilled$ True | SubAbility$ DBOmenPlayYou
|
||||
SVar:DBOmenPlayYou:DB$ Play | ValidZone$ Exile | Controller$ TriggeredPlayer | Valid$ Remembered | WithoutManaCost$ True | SubAbility$ DBOmenCleanupYou
|
||||
SVar:DBOmenCleanupYou:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:DBOmenPlayYou:DB$ Play | ValidZone$ Exile | Controller$ TriggeredPlayer | Valid$ Remembered | WithoutManaCost$ True | SubAbility$ DBOmenCleanup
|
||||
SVar:DBOmenCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
T:Mode$ Phase | Phase$ Draw | ValidPlayer$ Opponent | Execute$ TrigOmenExileCardOpp | TriggerZones$ Battlefield | Secondary$ True | TriggerDescription$ At the beginning of each player's draw step, that player exiles the top card of his or her library. If it's a land card, the player puts it onto the battlefield. Otherwise, the player casts it without paying its mana cost if able.
|
||||
SVar:TrigOmenExileCardOpp:AB$ Mill | Cost$ 0 | NumCards$ 1 | Destination$ Exile | Defined$ Opponent | RememberMilled$ True | SubAbility$ DBOmenPlayOpp
|
||||
SVar:DBOmenPlayOpp:DB$ Play | ValidZone$ Exile | Controller$ TriggeredPlayer | Valid$ Remembered | WithoutManaCost$ True | SubAbility$ DBOmenCleanupOpp
|
||||
SVar:DBOmenCleanupOpp:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:RemAIDeck:True
|
||||
SVar:DBOmenPlayOpp:DB$ Play | ValidZone$ Exile | Controller$ TriggeredPlayer | Valid$ Remembered | WithoutManaCost$ True | SubAbility$ DBOmenCleanup
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/omen_machine.jpg
|
||||
|
||||
@@ -1121,7 +1121,7 @@ public abstract class Player extends GameEntity {
|
||||
* @return true if a player can draw a card, false otherwise
|
||||
*/
|
||||
public final boolean canDraw() {
|
||||
if (AllZoneUtil.isCardInPlay("Omen Machine") || AllZoneUtil.isCardInPlay("Maralen of the Mornsong"))
|
||||
if (AllZoneUtil.isCardInPlay("Omen Machine") || AllZoneUtil.isCardInPlay("Maralen of the Mornsong"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -364,9 +364,9 @@ public final class AbilityFactoryPlay {
|
||||
tgtCards = tgtCards.filter(new CardListFilter() {
|
||||
@Override
|
||||
public boolean addCard(final Card c) {
|
||||
ArrayList<SpellAbility> SpellAbilities = c.getBasicSpells();
|
||||
ArrayList<SpellAbility> spellAbilities = c.getBasicSpells();
|
||||
ArrayList<SpellAbility> sas = new ArrayList<SpellAbility>();
|
||||
for (SpellAbility s : SpellAbilities) {
|
||||
for (SpellAbility s : spellAbilities) {
|
||||
Spell spell = (Spell) s;
|
||||
s.setActivatingPlayer(controller);
|
||||
SpellAbilityRestriction res = s.getRestrictions();
|
||||
@@ -397,9 +397,9 @@ public final class AbilityFactoryPlay {
|
||||
}
|
||||
|
||||
// get basic spells (no flashback, etc.)
|
||||
ArrayList<SpellAbility> SpellAbilities = tgtCard.getBasicSpells();
|
||||
ArrayList<SpellAbility> spellAbilities = tgtCard.getBasicSpells();
|
||||
ArrayList<SpellAbility> sas = new ArrayList<SpellAbility>();
|
||||
for (SpellAbility s : SpellAbilities) {
|
||||
for (SpellAbility s : spellAbilities) {
|
||||
s.setActivatingPlayer(controller);
|
||||
SpellAbilityRestriction res = s.getRestrictions();
|
||||
// timing restrictions still apply
|
||||
@@ -420,6 +420,10 @@ public final class AbilityFactoryPlay {
|
||||
tgtSA = sas.get(0);
|
||||
}
|
||||
|
||||
if (tgtSA.getTarget() != null && !params.containsKey("Optional")) {
|
||||
tgtSA.getTarget().setMandatory(true);
|
||||
}
|
||||
|
||||
if (params.containsKey("WithoutManaCost")) {
|
||||
if (controller.isHuman()) {
|
||||
final SpellAbility newSA = tgtSA.copy();
|
||||
|
||||
Reference in New Issue
Block a user