- Made Boneyard Parley AI playable.

git-svn-id: http://svn.slightlymagic.net/forge/trunk@35740 269b9781-a132-4a9b-9d4e-f004f1b56b58
This commit is contained in:
Agetian 2017-09-24 14:07:06 +00:00
parent ba31f5bbed
commit fa10fd8a77
2 changed files with 24 additions and 13 deletions

View File

@ -1010,18 +1010,21 @@ public class ChangeZoneAi extends SpellAbilityAi {
return false; return false;
} }
list = CardLists.filterControlledBy(list, ai.getOpponents());
list = CardLists.filter(list, new Predicate<Card>() { if (!sa.hasParam("AITgts") || sa.getParam("AITgts").contains("OppCtrl")) {
@Override list = CardLists.filterControlledBy(list, ai.getOpponents());
public boolean apply(final Card c) { list = CardLists.filter(list, new Predicate<Card>() {
for (Card aura : c.getEnchantedBy(false)) { @Override
if (c.getOwner().isOpponentOf(ai) && aura.getController().equals(ai)) { public boolean apply(final Card c) {
return false; for (Card aura : c.getEnchantedBy(false)) {
if (c.getOwner().isOpponentOf(ai) && aura.getController().equals(ai)) {
return false;
}
} }
return true;
} }
return true; });
} }
});
} }
// Only care about combatants during combat // Only care about combatants during combat
@ -1117,7 +1120,16 @@ public class ChangeZoneAi extends SpellAbilityAi {
return false; return false;
} else { } else {
if (!sa.isTrigger() && !ComputerUtil.shouldCastLessThanMax(ai, source)) { if (!sa.isTrigger() && !ComputerUtil.shouldCastLessThanMax(ai, source)) {
return false; boolean aiTgtsOK = false;
if (sa.hasParam("AIMinTgts")) {
int minTgts = Integer.parseInt(sa.getParam("AIMinTgts"));
if (sa.getTargets().getNumTargeted() >= minTgts) {
aiTgtsOK = true;
}
}
if (!aiTgtsOK) {
return false;
}
} }
break; break;
} }

View File

@ -1,11 +1,10 @@
Name:Boneyard Parley Name:Boneyard Parley
ManaCost:5 B B ManaCost:5 B B
Types:Sorcery Types:Sorcery
A:SP$ ChangeZone | Cost$ 5 B B | Origin$ Graveyard | Destination$ Exile | TargetMin$ 0 | TargetMax$ 5 | TgtPrompt$ Select up to five target cards in graveyards | ValidTgts$ Card.Creature | RememberTargets$ True | SubAbility$ DBTwoPiles | SpellDescription$ Exile up to five target creature cards from graveyards. An opponent separates those cards into two piles. Put all cards from the pile of your choice onto the battlefield under your control and the rest into their owners' graveyards. A:SP$ ChangeZone | Cost$ 5 B B | Origin$ Graveyard | Destination$ Exile | TargetMin$ 0 | TargetMax$ 5 | TgtPrompt$ Select up to five target cards in graveyards | ValidTgts$ Card.Creature | RememberTargets$ True | SubAbility$ DBTwoPiles | AITgts$ Card.Creature | AIMinTgts$ 3 | SpellDescription$ Exile up to five target creature cards from graveyards. An opponent separates those cards into two piles. Put all cards from the pile of your choice onto the battlefield under your control and the rest into their owners' graveyards.
SVar:DBTwoPiles:DB$ TwoPiles | Defined$ You | DefinedCards$ Remembered | Separator$ Opponent | ChosenPile$ DBBattlefield | UnchosenPile$ DBGrave SVar:DBTwoPiles:DB$ TwoPiles | Defined$ You | DefinedCards$ Remembered | Separator$ Opponent | ChosenPile$ DBBattlefield | UnchosenPile$ DBGrave
SVar:DBBattlefield:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Battlefield | GainControl$ True | SubAbility$ DBCleanup SVar:DBBattlefield:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Battlefield | GainControl$ True | SubAbility$ DBCleanup
SVar:DBGrave:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Graveyard | SubAbility$ DBCleanup SVar:DBGrave:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Graveyard | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/boneyard_parley.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/boneyard_parley.jpg
Oracle:Exile up to five target creature cards from graveyards. An opponent separates those cards into two piles. Put all cards from the pile of your choice onto the battlefield under your control and the rest into their owners' graveyards. Oracle:Exile up to five target creature cards from graveyards. An opponent separates those cards into two piles. Put all cards from the pile of your choice onto the battlefield under your control and the rest into their owners' graveyards.