Now using SVar

This commit is contained in:
Seravy
2018-02-18 19:53:11 +01:00
parent 4dd73930e3
commit c348ffa34e
3 changed files with 9 additions and 9 deletions

View File

@@ -864,17 +864,15 @@ public class SpecialCardAi {
opplands++;
}
}
// We want to empty hand as much as possible for this
if (("Ensnaring Bridge".equals(cardInPlay.getName())) &&
(cardInPlay.getController().equals(ai))) {
hasbridge = true;
}
// We want to go down to 1 card for this
if (("Cursed Scroll".equals(cardInPlay.getName())) &&
(cardInPlay.getController().equals(ai))
&& (ai.getGame().getCardsIn(ZoneType.Hand).size() >= 2)) {
// Do we have a card in play that makes us want to empty out hand?
if ((cardInPlay.hasSVar("PreferredHandSize")) &&
(cardInPlay.getController().equals(ai))) {
if (ai.getGame().getCardsIn(ZoneType.Hand).size() > Integer.parseInt(cardInPlay.getSVar("PreferredHandSize"))) {
hasbridge = true;
}
}
}
// Always if enemy would die and we don't!
// TODO : predict actual damage instead of assuming it'll be 2*lands

View File

@@ -5,5 +5,6 @@ A:AB$ NameCard | Cost$ 3 T | Defined$ You | SubAbility$ DBReveal | AILogic$ Curs
SVar:DBReveal:DB$ Reveal | Random$ True | RememberRevealed$ True | Defined$ You | SubAbility$ DBDamage
SVar:DBDamage:DB$ DealDamage | NumDmg$ 2 | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | ConditionDefined$ Remembered | ConditionPresent$ Card.NamedCard | ConditionCompare$ EQ1 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:PreferredHandSize:1
SVar:Picture:http://www.wizards.com/global/images/magic/general/cursed_scroll.jpg
Oracle:{3}, {T}: Choose a card name, then reveal a card at random from your hand. If that card has the chosen name, Cursed Scroll deals 2 damage to target creature or player.

View File

@@ -6,5 +6,6 @@ SVar:X:Count$InYourHand
SVar:NonStackingEffect:True
#NOTE: The AI will not play around this effect, so it's only good in properly designed decks that circumvent the necessity to worry about the detrimental effect.
SVar:RemRandomDeck:True
SVar:PreferredHandSize:1
SVar:Picture:http://www.wizards.com/global/images/magic/general/ensnaring_bridge.jpg
Oracle:Creatures with power greater than the number of cards in your hand can't attack.