mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- The AI will now be aware of Chalice of the Void and Presence of the Master.
This commit is contained in:
@@ -162,13 +162,20 @@ public class AiController {
|
|||||||
|
|
||||||
private boolean checkCurseEffects(final SpellAbility sa) {
|
private boolean checkCurseEffects(final SpellAbility sa) {
|
||||||
for (final Card c : game.getCardsIn(ZoneType.Battlefield)) {
|
for (final Card c : game.getCardsIn(ZoneType.Battlefield)) {
|
||||||
if (c.hasSVar("CurseEffect")) {
|
if (c.hasSVar("AICurseEffect")) {
|
||||||
final String curse = c.getSVar("CurseEffect");
|
final String curse = c.getSVar("AICurseEffect");
|
||||||
|
final Card host = sa.getHostCard();
|
||||||
if ("NonActive".equals(curse) && !player.equals(game.getPhaseHandler().getPlayerTurn())) {
|
if ("NonActive".equals(curse) && !player.equals(game.getPhaseHandler().getPlayerTurn())) {
|
||||||
return true;
|
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")) {
|
&& !sa.getHostCard().hasKeyword("Indestructible")) {
|
||||||
return true;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ T:Mode$ SpellCast | ValidCard$ Card.cmcEQY | ValidActivatingPlayer$ Player | Tri
|
|||||||
SVar:TrigCounter:AB$ Counter | Cost$ 0 | Defined$ TriggeredSpellAbility
|
SVar:TrigCounter:AB$ Counter | Cost$ 0 | Defined$ TriggeredSpellAbility
|
||||||
SVar:X:Count$xPaid
|
SVar:X:Count$xPaid
|
||||||
SVar:Y:Count$CardCounters.CHARGE
|
SVar:Y:Count$CardCounters.CHARGE
|
||||||
|
SVar:AICurseEffect:ChaliceOfTheVoid
|
||||||
SVar:RemAIDeck:True
|
SVar:RemAIDeck:True
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/chalice_of_the_void.jpg
|
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.
|
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.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Creature | Execute$
|
|||||||
SVar:TrigDestroy:AB$ Destroy | Cost$ 0 | Defined$ TriggeredCard
|
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.
|
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:DBSkipTurn:DB$ SkipTurn | Defined$ You | NumTurns$ 1 | AILogic$ Always
|
||||||
SVar:CurseEffect:DestroyCreature
|
SVar:AICurseEffect:DestroyCreature
|
||||||
SVar:RemAIDeck:True
|
SVar:RemAIDeck:True
|
||||||
SVar:RemRandomDeck:True
|
SVar:RemRandomDeck:True
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/lethal_vapors.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/lethal_vapors.jpg
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ ManaCost:3 W
|
|||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
T:Mode$ SpellCast | ValidCard$ Enchantment | TriggerZones$ Battlefield | Execute$ TrigCounter | TriggerDescription$ Whenever a player casts an enchantment spell, counter it.
|
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:TrigCounter:AB$Counter | Cost$ 0 | Defined$ TriggeredSpellAbility
|
||||||
|
SVar:AICurseEffect:CounterEnchantment
|
||||||
SVar:RemRandomDeck:True
|
SVar:RemRandomDeck:True
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/presence_of_the_master.jpg
|
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.
|
Oracle:Whenever a player casts an enchantment spell, counter it.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:2 R
|
|||||||
Types:Enchantment
|
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.
|
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:TrigDestroy:DB$ Destroy | Defined$ TriggeredCard
|
||||||
SVar:CurseEffect:NonActive
|
SVar:AICurseEffect:NonActive
|
||||||
SVar:RemAIDeck:True
|
SVar:RemAIDeck:True
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/price_of_glory.jpg
|
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.
|
Oracle:Whenever a player taps a land for mana, if it's not that player's turn, destroy that land.
|
||||||
|
|||||||
Reference in New Issue
Block a user