- The AI will now be aware of Chalice of the Void and Presence of the Master.

This commit is contained in:
Sloth
2015-10-05 12:54:27 +00:00
parent c1c03cff7d
commit 374a78604e
5 changed files with 15 additions and 6 deletions

View File

@@ -162,14 +162,21 @@ public class AiController {
private boolean checkCurseEffects(final SpellAbility sa) {
for (final Card c : game.getCardsIn(ZoneType.Battlefield)) {
if (c.hasSVar("CurseEffect")) {
final String curse = c.getSVar("CurseEffect");
if (c.hasSVar("AICurseEffect")) {
final String curse = c.getSVar("AICurseEffect");
final Card host = sa.getHostCard();
if ("NonActive".equals(curse) && !player.equals(game.getPhaseHandler().getPlayerTurn())) {
return true;
} else if ("DestroyCreature".equals(curse) && sa.isSpell() && sa.getHostCard().isCreature()
} else if ("DestroyCreature".equals(curse) && sa.isSpell() && host.isCreature()
&& !sa.getHostCard().hasKeyword("Indestructible")) {
return true;
}
} else if ("CounterEnchantment".equals(curse) && sa.isSpell() && host.isEnchantment()
&& !sa.getHostCard().hasKeyword("CARDNAME can't be countered.")) {
return true;
} else if ("ChaliceOfTheVoid".equals(curse) && sa.isSpell() && !host.hasKeyword("CARDNAME can't be countered.")
&& host.getCMC() == c.getCounters(CounterType.CHARGE)) {
return true;
}
}
}
return false;

View File

@@ -6,6 +6,7 @@ T:Mode$ SpellCast | ValidCard$ Card.cmcEQY | ValidActivatingPlayer$ Player | Tri
SVar:TrigCounter:AB$ Counter | Cost$ 0 | Defined$ TriggeredSpellAbility
SVar:X:Count$xPaid
SVar:Y:Count$CardCounters.CHARGE
SVar:AICurseEffect:ChaliceOfTheVoid
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/chalice_of_the_void.jpg
Oracle:Chalice of the Void enters the battlefield with X charge counters on it.\nWhenever a player casts a spell with converted mana cost equal to the number of charge counters on Chalice of the Void, counter that spell.

View File

@@ -5,7 +5,7 @@ T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Creature | Execute$
SVar:TrigDestroy:AB$ Destroy | Cost$ 0 | Defined$ TriggeredCard
A:AB$ Destroy | Cost$ 0 | Defined$ Self | SubAbility$ DBSkipTurn | AnyPlayer$ True | AILogic$ WillSkipTurn | SpellDescription$ Destroy CARDNAME. You skip your next turn. Any player may activate this ability.
SVar:DBSkipTurn:DB$ SkipTurn | Defined$ You | NumTurns$ 1 | AILogic$ Always
SVar:CurseEffect:DestroyCreature
SVar:AICurseEffect:DestroyCreature
SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/lethal_vapors.jpg

View File

@@ -3,6 +3,7 @@ ManaCost:3 W
Types:Enchantment
T:Mode$ SpellCast | ValidCard$ Enchantment | TriggerZones$ Battlefield | Execute$ TrigCounter | TriggerDescription$ Whenever a player casts an enchantment spell, counter it.
SVar:TrigCounter:AB$Counter | Cost$ 0 | Defined$ TriggeredSpellAbility
SVar:AICurseEffect:CounterEnchantment
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/presence_of_the_master.jpg
Oracle:Whenever a player casts an enchantment spell, counter it.

View File

@@ -3,7 +3,7 @@ ManaCost:2 R
Types:Enchantment
T:Mode$ TapsForMana | ValidCard$ Land | Execute$ TrigDestroy | TriggerZones$ Battlefield | Activator$ Player.NonActive | TriggerDescription$ Whenever a player taps a land for mana, if it's not that player's turn, destroy that land.
SVar:TrigDestroy:DB$ Destroy | Defined$ TriggeredCard
SVar:CurseEffect:NonActive
SVar:AICurseEffect:NonActive
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/price_of_glory.jpg
Oracle:Whenever a player taps a land for mana, if it's not that player's turn, destroy that land.