New game modes, bug fixes in primitives, improving AI, new planeswalkers type rule

New rules based on vanguard, 3 new random game modes, one is tribal and one uses any card in the game.

Several corrections and bugs fixes. Cards with x in their cost and that can target any player used to crash the game.

Teaching AI new things and changing values of efficiency.

You can have multiple "Jace" planeswalkers, you can't have two of the exact same name (no two Jace, the mind sculptor).
This commit is contained in:
Eduardo
2019-04-14 19:57:01 -05:00
parent 6eca5bea2f
commit ab1fbaa806
19 changed files with 623 additions and 3894 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
name=Blitzkrieg name=Mode Blitzkrieg
unlock=prx_geirkztilb unlock=prx_geirkztilb
[INIT] [INIT]
mode=mtg mode=mtg
+55 -1
View File
@@ -34,4 +34,58 @@ unlock_text=Blitzkrieg Mode Unlocked
teaser=Like to play fast? Unlock Blitzkrieg Mode :) teaser=Like to play fast? Unlock Blitzkrieg Mode :)
trophyroom_text=Won with more than 18 lands. trophyroom_text=Won with more than 18 lands.
unlock_condition=type(land|myBattlefield)~morethan~18 unlock_condition=type(land|myBattlefield)~morethan~18
[/award] [/award]
[award]
name=Paradise
id=prx_paradise
unlock_img=
unlock_text=Birds of Paradise Mode Unlocked
teaser=Utopia! Bring me down to the Paradise City.
Lands you control have "{T}: Add one mana of any color."
trophyroom_text=Won with Birds of Paradise on the battlefield.
unlock_condition=type(Birds of Paradise|mybattlefield)~morethan~0
[/award]
[award]
name=Morinfen Mode
id=prx_morinfen
unlock_img=
unlock_text=Morinfen Mode Unlocked
teaser="I looked into its eyes, and its soul was so empty I saw no reflection, no light there." — Crovax
At the beginning of your upkeep, you lose 1 life for each permanent you control.
trophyroom_text=Won with less than 5 life.
unlock_condition=this(controllerlife<=6)
[/award]
[award]
name=Horde
id=prx_horde
unlock_img=
unlock_text=Tribal Horde Mode Unlocked
teaser="From shards and splinters I call forth my living horde." -Molimo, maro-sorcerer
trophyroom_text=Won with more than 25 life.
unlock_condition=this(controllerlife>=26)
[/award]
[award]
name=False God
id=prx_karona
unlock_img=
unlock_text=False God Mode Unlocked
teaser=At the beginning of your upkeep, exchange control of a permanent you control chosen at random and a permanent target opponent controls chosen at random.
trophyroom_text=Devotion to red more than 7.
unlock_condition=this(variable{type:manar}>7)
[/award]
[award]
name=Titania Mode
id=prx_titania
unlock_img=
unlock_text=Titania Mode Unlocked
teaser=Voice of the Argoth forest, defender of its creatures, and enforcer of its laws, Titania is literally an aspect of the forest itself.
You may play an additional land on each of your turns.
trophyroom_text=Devotion to green more than 7.
unlock_condition=this(variable{type:manag}>7)
[/award]
File diff suppressed because it is too large Load Diff
-412
View File
@@ -1,412 +0,0 @@
[meta]
author=Wagic Team
name=Duel Decks: Speed vs. Cunning
block=Duel
year=2014
total=81
[/meta]
[card]
primitive=Act of Treason
id=386299
rarity=C
[/card]
[card]
primitive=Aquamorph Entity
id=386300
rarity=C
[/card]
[card]
primitive=Arc Trail
id=386301
rarity=U
[/card]
[card]
primitive=Arcanis the Omnipotent
id=386302
rarity=M
[/card]
[card]
primitive=Arrow Volley Trap
id=386303
rarity=U
[/card]
[card]
primitive=Banefire
id=386304
rarity=R
[/card]
[card]
primitive=Beetleback Chief
id=386305
rarity=U
[/card]
[card]
primitive=Bone Splinters
id=386306
rarity=C
[/card]
[card]
primitive=Coral Trickster
id=386307
rarity=C
[/card]
[card]
primitive=Dauntless Onslaught
id=386308
rarity=U
[/card]
[card]
primitive=Dregscape Zombie
id=386309
rarity=C
[/card]
[card]
primitive=Echo Tracer
id=386310
rarity=C
[/card]
[card]
primitive=Evolving Wilds
id=386311
rarity=C
[/card]
[card]
primitive=Faerie Impostor
id=386312
rarity=U
[/card]
[card]
primitive=Faerie Invaders
id=386313
rarity=C
[/card]
[card]
primitive=Fathom Seer
id=386314
rarity=C
[/card]
[card]
primitive=Fiery Fall
id=386315
rarity=C
[/card]
[card]
primitive=Flame-Kin Zealot
id=386316
rarity=U
[/card]
[card]
primitive=Fleeting Distraction
id=386317
rarity=C
[/card]
[card]
primitive=Fleshbag Marauder
id=386318
rarity=U
[/card]
[card]
primitive=Frenzied Goblin
id=386319
rarity=U
[/card]
[card]
primitive=Fury of the Horde
id=386320
rarity=R
[/card]
[card]
primitive=Ghitu Encampment
id=386321
rarity=U
[/card]
[card]
primitive=Goblin Bombardment
id=386323
rarity=U
[/card]
[card]
primitive=Goblin Deathraiders
id=386324
rarity=C
[/card]
[card]
primitive=Goblin Warchief
id=386325
rarity=U
[/card]
[card]
primitive=Hell's Thunder
id=386326
rarity=R
[/card]
[card]
primitive=Hellraiser Goblin
id=386327
rarity=U
[/card]
[card]
primitive=Hold the Line
id=386328
rarity=R
[/card]
[card]
primitive=Hussar Patrol
id=386329
rarity=C
[/card]
[card]
primitive=Impulse
id=386330
rarity=C
[/card]
[card]
primitive=Infantry Veteran
id=386331
rarity=C
[/card]
[card]
primitive=Inferno Trap
id=386332
rarity=U
[/card]
[card]
primitive=Island
id=386333
rarity=L
[/card]
[card]
primitive=Island
id=386334
rarity=L
[/card]
[card]
primitive=Island
id=386335
rarity=L
[/card]
[card]
primitive=Jeskai Elder
id=386336
rarity=U
[/card]
[card]
primitive=Kathari Bomber
id=386337
rarity=C
[/card]
[card]
primitive=Kor Hookmaster
id=386338
rarity=C
[/card]
[card]
primitive=Krenko's Command
id=386340
rarity=C
[/card]
[card]
primitive=Krenko, Mob Boss
id=386339
rarity=R
[/card]
[card]
primitive=Leonin Snarecaster
id=386341
rarity=C
[/card]
[card]
primitive=Lightning Angel
id=386342
rarity=R
[/card]
[card]
primitive=Lightning Helix
id=386343
rarity=U
[/card]
[card]
primitive=Lone Missionary
id=386344
rarity=C
[/card]
[card]
primitive=Mana Leak
id=386345
rarity=C
[/card]
[card]
primitive=Mardu Heart-Piercer
id=386346
rarity=U
[/card]
[card]
primitive=Master Decoy
id=386347
rarity=C
[/card]
[card]
primitive=Mountain
id=386348
rarity=L
[/card]
[card]
primitive=Mountain
id=386349
rarity=L
[/card]
[card]
primitive=Mountain
id=386350
rarity=L
[/card]
[card]
primitive=Mountain
id=386351
rarity=L
[/card]
[card]
primitive=Mystic Monastery
id=386352
rarity=U
[/card]
[card]
primitive=Nomad Outpost
id=386353
rarity=U
[/card]
[card]
primitive=Ogre Battledriver
id=386354
rarity=R
[/card]
[card]
primitive=Oni of Wild Places
id=386355
rarity=U
[/card]
[card]
primitive=Orcish Cannonade
id=386356
rarity=C
[/card]
[card]
primitive=Plains
id=386357
rarity=L
[/card]
[card]
primitive=Plains
id=386358
rarity=L
[/card]
[card]
primitive=Plains
id=386359
rarity=L
[/card]
[card]
primitive=Plains
id=386360
rarity=L
[/card]
[card]
primitive=Reckless Abandon
id=386361
rarity=C
[/card]
[card]
primitive=Repeal
id=386362
rarity=C
[/card]
[card]
primitive=Scourge Devil
id=386363
rarity=U
[/card]
[card]
primitive=Shambling Remains
id=386364
rarity=U
[/card]
[card]
primitive=Shock
id=386365
rarity=C
[/card]
[card]
primitive=Sparkmage Apprentice
id=386366
rarity=C
[/card]
[card]
primitive=Sphinx of Uthuun
id=386367
rarity=R
[/card]
[card]
primitive=Stave Off
id=386368
rarity=C
[/card]
[card]
primitive=Steam Augury
id=386369
rarity=R
[/card]
[card]
primitive=Stonecloaker
id=386370
rarity=U
[/card]
[card]
primitive=Swamp
id=386371
rarity=L
[/card]
[card]
primitive=Swamp
id=386372
rarity=L
[/card]
[card]
primitive=Swamp
id=386373
rarity=L
[/card]
[card]
primitive=Swift Justice
id=386374
rarity=C
[/card]
[card]
primitive=Terramorphic Expanse
id=386375
rarity=C
[/card]
[card]
primitive=Thousand Winds
id=386376
rarity=R
[/card]
[card]
primitive=Traumatic Visions
id=386377
rarity=C
[/card]
[card]
primitive=Whiplash Trap
id=386378
rarity=C
[/card]
[card]
primitive=Willbender
id=386379
rarity=U
[/card]
[card]
primitive=Zurgo Helmsmasher
id=386380
rarity=M
[/card]
@@ -15,3 +15,11 @@
# Fabricate # Fabricate
#AUTO_DEFINE _FABRICATE_($c) transforms((,newability[choice counter(1/1.$c)],newability[choice create(Servo:Artifact Creature Servo:1/1)*$c])) ueot #AUTO_DEFINE _FABRICATE_($c) transforms((,newability[choice counter(1/1.$c)],newability[choice create(Servo:Artifact Creature Servo:1/1)*$c])) ueot
# Scry, Evergreen
#AUTO_DEFINE _SCRY_($c) scry:$c scrycore delayed dontshow donothing scrycoreend scryend
# Amass, Set WAR
#AUTO_DEFINE _AMASS_($c) if type(army|mybattlefield)~morethan~0 then counter(1/1,$c) notATarget(army|myBattlefield) else create(Zombie Army:creature Zombie Army:0/0:black) and!(counter(1/1,$c) notATarget(army|myBattlefield))!
# Treasure token, Set XLN
#AUTO_DEFINE _TREASURE_ create(Treasure:Artifact Treasure:0/0:"{T}, Sacrifice this artifact: Add one mana of any color.") and!( transforms((,newability[{T}{S}:Add{W}],newability[{T}{S}:Add{U}],newability[{T}{S}:Add{R}],newability[{T}{S}:Add{B}],newability[{T}{S}:Add{G}])) forever )!
@@ -512,8 +512,8 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Relentless Dead name=Relentless Dead
auto=@movedTo(this|graveyard) from(battlefield):transforms((,newability[{B}:moveto(myhand)])) ueot autograveyard=@movedTo(this|graveyard) from(battlefield):name(return relentless dead) pay({B}) moveTo(hand)
auto=@movedTo(this|graveyard) from(battlefield):transforms((,newability[{X}:moveto(myhand) target(zombie[manacost=X]|mygraveyard)])) ueot auto=@movedTo(this|graveyard) from(battlefield):choice name(rturn cost X) pay({1}) moveTo(battlefield) target(other zombie|mygraveyard)
text=Menace (This creature can't be blocked except by two or more creatures.) -- When Relentless Dead dies, you may pay {B}. If you do, return it to its owner's hand. -- When Relentless Dead dies, you may pay {X}. If you do, return another target Zombie creature card with converted mana cost X from your graveyard to the battlefield. text=Menace (This creature can't be blocked except by two or more creatures.) -- When Relentless Dead dies, you may pay {B}. If you do, return it to its owner's hand. -- When Relentless Dead dies, you may pay {X}. If you do, return another target Zombie creature card with converted mana cost X from your graveyard to the battlefield.
mana={B}{B} mana={B}{B}
abilities=menace abilities=menace
@@ -787,15 +787,6 @@ mana={2}{U}
type=Instant type=Instant
[/card] [/card]
[card] [card]
name=Villainous Wealth
#can't order stack
target=opponent
auto=moveto(exile) and!( if cantargetcard(*[-land;manacost<=castx]|*) then transforms((,newability[may activate castcard(normal)]])) ueot )! all(*[zpos<=castx]|mylibrary)
text=Target opponent exiles the top X cards of his or her library. You may cast any number of nonland cards with converted mana cost X or less from among them without paying their mana costs.
mana={X}{B}{G}{U}
type=Sorcery
[/card]
[card]
name=Watcher of the Roost name=Watcher of the Roost
#missing reveal card #missing reveal card
abilities=flying abilities=flying
@@ -810,14 +801,6 @@ power=2
toughness=1 toughness=1
[/card] [/card]
[card] [card]
name=Wolfcaller's Howl
#wagic supports one opponent only
auto=@each my upkeep restriction{type(*|opponenthand)~morethan~3}:token(Wolf,Creature Wolf,2/2,green)
text=At the beginning of your upkeep, put X 2/2 green Wolf creature tokens onto the battlefield, where X is the number of your opponents with four or more cards in hand.
mana={3}{G}
type=Enchantment
[/card]
[card]
name=Wren's Run Vanquisher name=Wren's Run Vanquisher
otherrestriction=type(*[elf]|myhand)~lessthan~2 otherrestriction=type(*[elf]|myhand)~lessthan~2
other={4}{G} other={4}{G}
+129 -119
View File
@@ -4262,7 +4262,7 @@ type=Artifact
[card] [card]
name=Ankle Shanker name=Ankle Shanker
abilities=haste abilities=haste
auto=@combat(attacking) source(this):all(creature|mybattlefield) transforms((newability[first strike ueot],newability[deathtouch ueot])) ueot auto=@combat(attacking) source(this):all(creature|mybattlefield) transforms((,newability[first strike ueot],newability[deathtouch ueot])) ueot
text=Haste -- Whenever Ankle Shanker attacks, creatures you control gain first strike and deathtouch until end of turn. text=Haste -- Whenever Ankle Shanker attacks, creatures you control gain first strike and deathtouch until end of turn.
mana={2}{R}{W}{B} mana={2}{R}{W}{B}
type=Creature type=Creature
@@ -6189,7 +6189,7 @@ type=Sorcery
name=Artful Maneuver name=Artful Maneuver
target=creature target=creature
auto=2/2 ueot auto=2/2 ueot
auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this)all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target creature gets +2/+2 until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Target creature gets +2/+2 until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={1}{W} mana={1}{W}
type=Instant type=Instant
@@ -7974,7 +7974,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Awaken the Ancient name=Awaken the Ancient
target=mountain target=land[mountain]
auto=transforms((Giant Creature,setpower=7,settoughness=7,red,haste)) auto=transforms((Giant Creature,setpower=7,settoughness=7,red,haste))
text=Enchant Mountain -- {2}: Enchanted Mountain becomes a 7/7 red Giant creature with haste. It's still a land. text=Enchant Mountain -- {2}: Enchanted Mountain becomes a 7/7 red Giant creature with haste. It's still a land.
mana={1}{R}{R}{R} mana={1}{R}{R}{R}
@@ -8791,6 +8791,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Balustrade Spy name=Balustrade Spy
abilities=flying
auto=target(player) Reveal:1 revealzone(targetedpersonslibrary) revealuntil(land|targetedpersonslibrary) optionone choice name(Look) target(*|reveal) donothing optiononeend optiontwo choice name(put in Graveyard) all(*|reveal) moveto(graveyard) optiontwoend revealend auto=target(player) Reveal:1 revealzone(targetedpersonslibrary) revealuntil(land|targetedpersonslibrary) optionone choice name(Look) target(*|reveal) donothing optiononeend optiontwo choice name(put in Graveyard) all(*|reveal) moveto(graveyard) optiontwoend revealend
text=Flying -- When Balustrade Spy enters the battlefield, target player reveals cards from the top of his or her library until he or she reveals a land card, then puts those cards into his or her graveyard. text=Flying -- When Balustrade Spy enters the battlefield, target player reveals cards from the top of his or her library until he or she reveals a land card, then puts those cards into his or her graveyard.
mana={3}{B} mana={3}{B}
@@ -8849,10 +8850,10 @@ toughness=5
name=Bane of Progress name=Bane of Progress
auto=count(type:artifact:battlefield) auto=count(type:artifact:battlefield)
auto=all(artifact|battlefield) destroy auto=all(artifact|battlefield) destroy
auto=counter(1/1,1,countedamountminustype:artifact:battlefieldminusend) auto=counter(1/1,countedamountminustype:artifact:battlefieldminusend)
auto=count(type:enchantment:battlefield) auto=count(type:enchantment:battlefield)
auto=all(enchantment|battlefield) destroy auto=all(enchantment|battlefield) destroy
auto=counter(1/1,1,countedamountminustype:enchantment:battlefieldminusend) auto=counter(1/1,countedamountminustype:enchantment:battlefieldminusend)
text=When Bane of Progress enters the battlefield, destroy all artifacts and enchantments. Put a +1/+1 counter on Bane of Progress for each permanent destroyed this way. text=When Bane of Progress enters the battlefield, destroy all artifacts and enchantments. Put a +1/+1 counter on Bane of Progress for each permanent destroyed this way.
mana={4}{G}{G} mana={4}{G}{G}
type=Creature type=Creature
@@ -8992,8 +8993,8 @@ type=Instant
[card] [card]
name=Bant Panorama name=Bant Panorama
auto={T}:Add{1} auto={T}:Add{1}
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic&island;forest;plains]|myLibrary) aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic;island;forest;plains]|myLibrary)
auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic&island;forest;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic;island;forest;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Bant Panorama: Search your library for a basic Forest, Plains, or Island card and put it onto the battlefield tapped. Then shuffle your library. text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Bant Panorama: Search your library for a basic Forest, Plains, or Island card and put it onto the battlefield tapped. Then shuffle your library.
type=Land type=Land
[/card] [/card]
@@ -12560,7 +12561,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Bloodhall Priest name=Bloodhall Priest
auto=target(creature,player) damage:2 auto=target(creature,player) damage:2 restriction{type(*|myhand)~lessthan~1}
auto=@combat(attacking) source(this) restriction{type(*|myhand)~lessthan~1}:target(creature,player) damage:2 auto=@combat(attacking) source(this) restriction{type(*|myhand)~lessthan~1}:target(creature,player) damage:2
abilities=madness abilities=madness
autoexile=restriction{discarded} pay({1}{b}{r}) name(pay 1BR to cast) activate name(pay 1BR to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) autoexile=restriction{discarded} pay({1}{b}{r}) name(pay 1BR to cast) activate name(pay 1BR to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard)
@@ -12936,8 +12937,9 @@ subtype=Aura
[/card] [/card]
[card] [card]
name=Blue Sun's Zenith name=Blue Sun's Zenith
target=player #target=player
auto=draw:X auto=choice name(You draw X) draw:X controller
auto=choice name(Opponent draws) draw:X target(opponent)
alias=135262 alias=135262
text=Target player draws X cards. Shuffle Blue Sun's Zenith into its owner's library. text=Target player draws X cards. Shuffle Blue Sun's Zenith into its owner's library.
mana={X}{U}{U}{U} mana={X}{U}{U}{U}
@@ -13796,6 +13798,7 @@ toughness=4
[/card] [/card]
[card] [card]
name=Borborygmos Enraged name=Borborygmos Enraged
abilities=trample
auto={D(land|myhand)}:target(creature,player) damage:3 auto={D(land|myhand)}:target(creature,player) damage:3
aicode=activate target(<3>*[zpos<=3]|mylibrary) name(revealed card) moveto(myhand) name(revealed card) and!(if cantargetcard(*[-land]|*) then moveto(mygraveyard))! aicode=activate target(<3>*[zpos<=3]|mylibrary) name(revealed card) moveto(myhand) name(revealed card) and!(if cantargetcard(*[-land]|*) then moveto(mygraveyard))!
auto=@combatdamaged(player) from(this):reveal:3 optionone name(Reveal) target(<3>land|reveal) moveto(myhand) optiononeend optiontwo name(Send To Grave) choice all(*|reveal) moveto(mygraveyard) optiontwoend revealend auto=@combatdamaged(player) from(this):reveal:3 optionone name(Reveal) target(<3>land|reveal) moveto(myhand) optiononeend optiontwo name(Send To Grave) choice all(*|reveal) moveto(mygraveyard) optiontwoend revealend
@@ -14399,8 +14402,10 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Braingeyser name=Braingeyser
target=player #target=player
auto=draw:X #auto=draw:X
auto=choice name(You draw X) draw:X controller
auto=choice name(Opponent draws) draw:X target(opponent)
text=Target player draws X cards. text=Target player draws X cards.
mana={X}{U}{U} mana={X}{U}{U}
type=Sorcery type=Sorcery
@@ -18237,7 +18242,7 @@ auto=choice name(red) transforms((,newability[protection from red])) ueot
auto=choice name(blue) transforms((,newability[protection from blue])) ueot auto=choice name(blue) transforms((,newability[protection from blue])) ueot
auto=choice name(black) transforms((,newability[protection from black])) ueot auto=choice name(black) transforms((,newability[protection from black])) ueot
auto=choice name(white) transforms((,newability[protection from white])) ueot auto=choice name(white) transforms((,newability[protection from white])) ueot
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target creature you control gains protection from the color of your choice until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Target creature you control gains protection from the color of your choice until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={1}{W} mana={1}{W}
type=Instant type=Instant
@@ -18536,7 +18541,7 @@ toughness=5
[/card] [/card]
[card] [card]
name=Chained to the Rocks name=Chained to the Rocks
target=mountain|mybattlefield target=land[mountain]|mybattlefield
auto=(blink)forsrc target(creature|opponentbattlefield) auto=(blink)forsrc target(creature|opponentbattlefield)
text=Enchant Mountain you control. -- When Chained to the Rocks enters the battlefield, exile target creature an opponent controls until Chained to the Rocks leaves the battlefield. That creature returns under its owner's control.) text=Enchant Mountain you control. -- When Chained to the Rocks enters the battlefield, exile target creature an opponent controls until Chained to the Rocks leaves the battlefield. That creature returns under its owner's control.)
mana={W} mana={W}
@@ -19484,7 +19489,6 @@ type=Artifact
[card] [card]
name=Chimeric Mass name=Chimeric Mass
auto=counter(0/0,X,Charge) auto=counter(0/0,X,Charge)
auto=counter{0%0.1.charge}/counter{0%0.1.charge} nonstatic
auto={1}:transforms((Artifact Creature Construct,setpower=counter{0%0.1.charge},settoughness=counter{0%0.1.charge})) ueot auto={1}:transforms((Artifact Creature Construct,setpower=counter{0%0.1.charge},settoughness=counter{0%0.1.charge})) ueot
text=Chimeric Mass enters the battlefield with X charge counters. -- {1}: Until end of turn, Chimeric Mass becomes a Construct artifact creature with "This creature's power and toughness are each equal to the number of charge counters on it." text=Chimeric Mass enters the battlefield with X charge counters. -- {1}: Until end of turn, Chimeric Mass becomes a Construct artifact creature with "This creature's power and toughness are each equal to the number of charge counters on it."
mana={X} mana={X}
@@ -19686,7 +19690,7 @@ type=Sorcery
name=Chosen by Heliod name=Chosen by Heliod
target=creature target=creature
auto=0/2 auto=0/2
auto=draw:1 targetcontroller auto=draw:1 controller
text=Enchant creature. -- When Chosen by Heliod enters the battlefield, draw a card. -- Enchanted creature gets +0/+2. text=Enchant creature. -- When Chosen by Heliod enters the battlefield, draw a card. -- Enchanted creature gets +0/+2.
mana={1}{W} mana={1}{W}
type=Enchantment type=Enchantment
@@ -20184,10 +20188,10 @@ toughness=4
[card] [card]
name=City of Brass name=City of Brass
auto=@tapped(this):damage:1 controller auto=@tapped(this):damage:1 controller
auto={T}:Add{U}
auto={T}:Add{R}
auto={T}:Add{W} auto={T}:Add{W}
auto={T}:Add{U}
auto={T}:Add{B} auto={T}:Add{B}
auto={T}:Add{R}
auto={T}:Add{G} auto={T}:Add{G}
text=Whenever City of Brass becomes tapped, it deals 1 damage to you. -- {T}: Add one mana of any color to your mana pool. text=Whenever City of Brass becomes tapped, it deals 1 damage to you. -- {T}: Add one mana of any color to your mana pool.
type=Land type=Land
@@ -22224,7 +22228,7 @@ type=Instant
name=Consuming Vapors name=Consuming Vapors
target=player target=player
auto=ability$! notatarget(creature|mybattlefield) dynamicability<!mytgt toughnesslifegain abilitycontroller!> sacrifice ) !$ targetedplayer auto=ability$! notatarget(creature|mybattlefield) dynamicability<!mytgt toughnesslifegain abilitycontroller!> sacrifice ) !$ targetedplayer
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target player sacrifices a creature. You gain life equal to that creature's toughness. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Target player sacrifices a creature. You gain life equal to that creature's toughness. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={3}{B} mana={3}{B}
type=Sorcery type=Sorcery
@@ -22242,7 +22246,7 @@ toughness=1
[card] [card]
name=Contagion Clasp name=Contagion Clasp
auto=counter(-1/-1,1) target(creature) auto=counter(-1/-1,1) target(creature)
auto={4}{T}:notatarget(<anyamount>*[artifact;creature;enchantment;land;planeswalker;player]) proliferate auto={4}{T}:notatarget(<anyamount>*) propagate
text=When Contagion Clasp enters the battlefield, put a -1/-1 counter on target creature. -- {4}, Tap: Proliferate. (You choose any number of permanents and/or players with counters on them, then give each another counter of a kind already there.) text=When Contagion Clasp enters the battlefield, put a -1/-1 counter on target creature. -- {4}, Tap: Proliferate. (You choose any number of permanents and/or players with counters on them, then give each another counter of a kind already there.)
mana={2} mana={2}
type=Artifact type=Artifact
@@ -22917,7 +22921,7 @@ text=Counter target spell if its controller is poisoned.
[/card] [/card]
[card] [card]
name=Corrupted Roots name=Corrupted Roots
target=forest,plains target=land[forest;plains]
auto=@tapped(mytgt):life:-2 targetController auto=@tapped(mytgt):life:-2 targetController
text=Enchant Forest or Plains -- Whenever enchanted land becomes tapped, its controller loses 2 life. text=Enchant Forest or Plains -- Whenever enchanted land becomes tapped, its controller loses 2 life.
mana={B} mana={B}
@@ -23744,7 +23748,7 @@ toughness=1
[card] [card]
name=Crimson Hellkite name=Crimson Hellkite
abilities=flying abilities=flying
auto={X:red}:damage:X target(creature) auto={X:red}{T}:damage:X target(creature)
text=Flying -- {X}, {T}: Crimson Hellkite deals X damage to target creature. Spend only red mana this way. text=Flying -- {X}, {T}: Crimson Hellkite deals X damage to target creature. Spend only red mana this way.
mana={6}{R}{R}{R} mana={6}{R}{R}{R}
type=Creature type=Creature
@@ -25540,9 +25544,9 @@ toughness=4
[/card] [/card]
[card] [card]
name=Damnable Pact name=Damnable Pact
target=player #target=player
auto=draw:X targetedplayer auto=choice name(You draw) draw:X && life:-X controller
auto=life:-X targetedplayer auto=choice name(Opponent draws) draw:X && life:-X target(opponent)
text=Target player draws X cards and loses X life. text=Target player draws X cards and loses X life.
mana={X}{B}{B} mana={X}{B}{B}
type=Sorcery type=Sorcery
@@ -25919,9 +25923,11 @@ type=Instant
[/card] [/card]
[card] [card]
name=Dark Salvation name=Dark Salvation
target=player #target=player
auto=token(Zombie,Creature Zombie,2/2,black)*xx targetedplayer #auto=token(Zombie,Creature Zombie,2/2,black)*xx targetedplayer
auto=ability$!name(Darkness) target(<upto:1>creature|Battlefield) foreach(zombie|myBattlefield) -1/-1!$ targetedplayer #auto=ability$!name(Darkness) target(<upto:1>creature|Battlefield) foreach(zombie|myBattlefield) -1/-1!$ targetedplayer
auto=token(Zombie,Creature Zombie,2/2,black)*xx
auto=name(-X/-X) target(<upto:1>creature|Battlefield) -type:zombie:myBattlefield/-type:zombie:myBattlefield
text=Target player puts X 2/2 black Zombie creature tokens onto the battlefield, then up to one target creature gets -1/-1 until end of turn for each Zombie that player controls. text=Target player puts X 2/2 black Zombie creature tokens onto the battlefield, then up to one target creature gets -1/-1 until end of turn for each Zombie that player controls.
mana={X}{X}{B} mana={X}{X}{B}
type=Sorcery type=Sorcery
@@ -30318,7 +30324,7 @@ name=Distortion Strike
target=creature target=creature
auto=1/0 ueot auto=1/0 ueot
auto=unblockable ueot auto=unblockable ueot
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target creature gets +1/+0 until end of turn and is unblockable this turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Target creature gets +1/+0 until end of turn and is unblockable this turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={U} mana={U}
type=Sorcery type=Sorcery
@@ -30400,7 +30406,7 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Divine Congregation name=Divine Congregation
auto=choice name(target player) target(player) donothing && all(this) transforms((,newability[life:twicetype:creature:targetedpersonsbattlefield])) auto=choice name(target player) target(player) all(this) transforms((,newability[life:twicetype:creature:targetedpersonsbattlefield]))
text=You gain 2 life for each creature target player controls. -- Suspend 5 - {1}{W} (Rather than cast this card from your hand, you may pay {1}{W} and exile it with five time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost.) text=You gain 2 life for each creature target player controls. -- Suspend 5 - {1}{W} (Rather than cast this card from your hand, you may pay {1}{W} and exile it with five time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost.)
mana={3}{W} mana={3}{W}
suspend(5)={1}{w} suspend(5)={1}{w}
@@ -34183,7 +34189,7 @@ toughness=4
[/card] [/card]
[card] [card]
name=Eight-and-a-Half-Tails name=Eight-and-a-Half-Tails
auto={1}{W}:protection from white target(creature) auto={1}{W}:protection from white target(*|myBattlefield)
auto={1}:name(target permanent becomes white ueot) transforms((,white)) target(*) ueot auto={1}:name(target permanent becomes white ueot) transforms((,white)) target(*) ueot
text={1}{W}: Target permanent you control gains protection from white until end of turn. -- {1}: Target spell or permanent becomes white until end of turn. text={1}{W}: Target permanent you control gains protection from white until end of turn. -- {1}: Target spell or permanent becomes white until end of turn.
mana={W}{W} mana={W}{W}
@@ -34488,8 +34494,8 @@ type=Instant
name=Electrolyze name=Electrolyze
target=creature,player target=creature,player
auto=damage:1 auto=damage:1
auto=damage:1 target(creature,player)
auto=draw:1 controller auto=draw:1 controller
auto=damage:1 target(creature,player)
text=Electrolyze deals 2 damage divided as you choose among one or two target creatures and/or players. -- Draw a card. text=Electrolyze deals 2 damage divided as you choose among one or two target creatures and/or players. -- Draw a card.
mana={1}{U}{R} mana={1}{U}{R}
type=Instant type=Instant
@@ -35578,7 +35584,7 @@ auto=choice name(red) transforms((,newability[protection from red])) ueot
auto=choice name(blue) transforms((,newability[protection from blue])) ueot auto=choice name(blue) transforms((,newability[protection from blue])) ueot
auto=choice name(black) transforms((,newability[protection from black])) ueot auto=choice name(black) transforms((,newability[protection from black])) ueot
auto=choice name(white) transforms((,newability[protection from white])) ueot auto=choice name(white) transforms((,newability[protection from white])) ueot
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target creature you control gains protection from the color of your choice until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Target creature you control gains protection from the color of your choice until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={W} mana={W}
type=Instant type=Instant
@@ -36115,7 +36121,7 @@ type=Instant
[/card] [/card]
[card] [card]
name=Energy Bolt name=Energy Bolt
auto=choice damage:X target(player) auto=choice damage:X opponent
auto=choice life:X target(player) auto=choice life:X target(player)
text=Choose one - Energy Bolt deals X damage to target player; or target player gains X life. text=Choose one - Energy Bolt deals X damage to target player; or target player gains X life.
mana={X}{R}{W} mana={X}{R}{W}
@@ -36980,8 +36986,8 @@ toughness=3
[card] [card]
name=Esper Panorama name=Esper Panorama
auto={T}:Add{1} auto={T}:Add{1}
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic&swamp;island;plains]|myLibrary) aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic;swamp;island;plains]|myLibrary)
auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic&swamp;island;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic;swamp;island;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Esper Panorama: Search your library for a basic Plains, Island, or Swamp card and put it onto the battlefield tapped. Then shuffle your library. text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Esper Panorama: Search your library for a basic Plains, Island, or Swamp card and put it onto the battlefield tapped. Then shuffle your library.
type=Land type=Land
[/card] [/card]
@@ -39509,8 +39515,8 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Feast of Dreams name=Feast of Dreams
target=creature[enchantment] auto=choice name(enchanted creature) destroy target(creature[enchanted])
auto=destroy auto=choice name(enchantment creature) destroy target(creature[enchantment])
text=Destroy target enchanted creature or enchantment creature. text=Destroy target enchanted creature or enchantment creature.
mana={1}{B} mana={1}{B}
type=Instant type=Instant
@@ -40018,7 +40024,7 @@ toughness=2
[card] [card]
name=Fertile Ground name=Fertile Ground
target=land target=land
auto=all(this) transforms((,newability[produceextra:selectmana])) forever auto=all(this) transforms((,newability[produceextra:selectmana] controller)) forever
text=Enchant land -- Whenever enchanted land is tapped for mana, its controller adds one mana of any color to his or her mana pool (in addition to the mana the land produces). text=Enchant land -- Whenever enchanted land is tapped for mana, its controller adds one mana of any color to his or her mana pool (in addition to the mana the land produces).
mana={1}{G} mana={1}{G}
type=Enchantment type=Enchantment
@@ -41595,7 +41601,7 @@ toughness=2
[card] [card]
name=Flayer Drone name=Flayer Drone
abilities=first strike abilities=first strike
auto=@movedto(other creature[colorless]|battlefield):target(opponent) life:-1 auto=@movedto(other creature[colorless]|mybattlefield):target(opponent) life:-1
text=Devoid (This card has no color.) -- First strike -- Whenever another colorless creature enters the battlefield under your control, target opponent loses 1 life. text=Devoid (This card has no color.) -- First strike -- Whenever another colorless creature enters the battlefield under your control, target opponent loses 1 life.
mana={1}{B}{R} mana={1}{B}{R}
abilities=devoid abilities=devoid
@@ -44086,7 +44092,7 @@ subtype=Aura
name=Funeral Pyre name=Funeral Pyre
target=*|graveyard target=*|graveyard
auto=moveto(exile) auto=moveto(exile)
auto=token(Spirit creature,1/1,flying) targetcontroller auto=create(Spirit:creature Spirit:1/1:white:flying) targetcontroller
text=Exile target card from a graveyard. Its owner puts a 1/1 white Spirit creature token with flying onto the battlefield. text=Exile target card from a graveyard. Its owner puts a 1/1 white Spirit creature token with flying onto the battlefield.
mana={W} mana={W}
type=Instant type=Instant
@@ -45442,7 +45448,7 @@ toughness=4
[/card] [/card]
[card] [card]
name=Genju of the Cedars name=Genju of the Cedars
target=forest target=land[forest]
auto={2}:transforms((Spirit Creature,setpower=4,settoughness=4,green)) ueot auto={2}:transforms((Spirit Creature,setpower=4,settoughness=4,green)) ueot
auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this) auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this)
text=Enchant Forest -- {2}: Enchanted Forest becomes a 4/4 green Spirit creature until end of turn. It's still a land. -- When enchanted Forest is put into a graveyard, you may return Genju of the Cedars from your graveyard to your hand. text=Enchant Forest -- {2}: Enchanted Forest becomes a 4/4 green Spirit creature until end of turn. It's still a land. -- When enchanted Forest is put into a graveyard, you may return Genju of the Cedars from your graveyard to your hand.
@@ -45452,7 +45458,7 @@ subtype=Aura
[/card] [/card]
[card] [card]
name=Genju of the Falls name=Genju of the Falls
target=island target=land[island]
auto={2}:transforms((Spirit Creature,setpower=3,settoughness=2,flying,blue)) ueot auto={2}:transforms((Spirit Creature,setpower=3,settoughness=2,flying,blue)) ueot
auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this) auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this)
text=Enchant Island -- {2}: Enchanted Island becomes a 3/2 blue Spirit creature with flying until end of turn. It's still a land. -- When enchanted Island is put into a graveyard, you may return Genju of the Falls from your graveyard to your hand. text=Enchant Island -- {2}: Enchanted Island becomes a 3/2 blue Spirit creature with flying until end of turn. It's still a land. -- When enchanted Island is put into a graveyard, you may return Genju of the Falls from your graveyard to your hand.
@@ -45462,7 +45468,7 @@ subtype=Aura
[/card] [/card]
[card] [card]
name=Genju of the Fens name=Genju of the Fens
target=swamp target=land[swamp]
auto={2}:transforms((Spirit Creature,newability[{B}:1/1],setpower=2,settoughness=2,black)) ueot auto={2}:transforms((Spirit Creature,newability[{B}:1/1],setpower=2,settoughness=2,black)) ueot
auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this) auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this)
text=Enchant Swamp -- {2}: Until end of turn, enchanted Swamp becomes a 2/2 black Spirit creature with "{B}: This creature gets +1/+1 until end of turn." It's still a land. -- When enchanted Swamp is put into a graveyard, you may return Genju of the Fens from your graveyard to your hand. text=Enchant Swamp -- {2}: Until end of turn, enchanted Swamp becomes a 2/2 black Spirit creature with "{B}: This creature gets +1/+1 until end of turn." It's still a land. -- When enchanted Swamp is put into a graveyard, you may return Genju of the Fens from your graveyard to your hand.
@@ -45472,7 +45478,7 @@ subtype=Aura
[/card] [/card]
[card] [card]
name=Genju of the Fields name=Genju of the Fields
target=plains target=land[plains]
auto={2}:transforms((Spirit Creature,setpower=2,settoughness=5,spiritlink,white)) ueot auto={2}:transforms((Spirit Creature,setpower=2,settoughness=5,spiritlink,white)) ueot
auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this) auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this)
text=Enchant Plains -- {2}: Until end of turn, enchanted Plains becomes a 2/5 white Spirit creature with "Whenever this creature deals damage, its controller gains that much life." It's still a land. -- When enchanted Plains is put into a graveyard, you may return Genju of the Fields from your graveyard to your hand. text=Enchant Plains -- {2}: Until end of turn, enchanted Plains becomes a 2/5 white Spirit creature with "Whenever this creature deals damage, its controller gains that much life." It's still a land. -- When enchanted Plains is put into a graveyard, you may return Genju of the Fields from your graveyard to your hand.
@@ -45492,7 +45498,7 @@ subtype=Aura
[/card] [/card]
[card] [card]
name=Genju of the Spires name=Genju of the Spires
target=mountain target=land[mountain]
auto={2}:transforms((Spirit Creature,setpower=6,settoughness=1,red)) ueot auto={2}:transforms((Spirit Creature,setpower=6,settoughness=1,red)) ueot
auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this) auto=@movedTo(mytgt|mygraveyard) from(battlefield):may moveTo(myhand) all(this)
text=Enchant Mountain -- {2}: Enchanted Mountain becomes a 6/1 red Spirit creature until end of turn. It's still a land. -- When enchanted Mountain is put into a graveyard, you may return Genju of the Spires from your graveyard to your hand. text=Enchant Mountain -- {2}: Enchanted Mountain becomes a 6/1 red Spirit creature until end of turn. It's still a land. -- When enchanted Mountain is put into a graveyard, you may return Genju of the Spires from your graveyard to your hand.
@@ -46652,11 +46658,11 @@ toughness=1
[/card] [/card]
[card] [card]
name=Gilded Lotus name=Gilded Lotus
auto={T}:Add{B}{B}{B}
auto={T}:Add{G}{G}{G}
auto={T}:Add{R}{R}{R}
auto={T}:Add{U}{U}{U}
auto={T}:Add{W}{W}{W} auto={T}:Add{W}{W}{W}
auto={T}:Add{U}{U}{U}
auto={T}:Add{B}{B}{B}
auto={T}:Add{R}{R}{R}
auto={T}:Add{G}{G}{G}
text={T}: Add three mana of any one color to your mana pool. text={T}: Add three mana of any one color to your mana pool.
mana={5} mana={5}
type=Artifact type=Artifact
@@ -48044,6 +48050,7 @@ type=Sorcery
[card] [card]
name=Goblin Guide name=Goblin Guide
abilities=haste abilities=haste
aicode=activate target(land[zpos<=1]|opponentLibrary) moveto(ownerhand)
auto=@combat(attacking) source(this):reveal:1 revealzone(opponentlibrary) optionone name(choose card) notatarget(<1>*|reveal) moveto(ownerlibrary) and!( if cantargetcard(*[land]|*) then moveto(ownerhand) )! optiononeend revealend auto=@combat(attacking) source(this):reveal:1 revealzone(opponentlibrary) optionone name(choose card) notatarget(<1>*|reveal) moveto(ownerlibrary) and!( if cantargetcard(*[land]|*) then moveto(ownerhand) )! optiononeend revealend
text=Haste -- Whenever Goblin Guide attacks, defending player reveals the top card of his or her library. If it's a land card, that player puts it into his or her hand. text=Haste -- Whenever Goblin Guide attacks, defending player reveals the top card of his or her library. If it's a land card, that player puts it into his or her hand.
mana={R} mana={R}
@@ -50070,7 +50077,7 @@ toughness=3
[card] [card]
name=Great Teacher's Decree name=Great Teacher's Decree
auto=all(creature|mybattlefield) 2/1 ueot auto=all(creature|mybattlefield) 2/1 ueot
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Creatures you control get +2/+1 until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Creatures you control get +2/+1 until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={3}{W} mana={3}{W}
type=Sorcery type=Sorcery
@@ -50847,8 +50854,8 @@ toughness=1
[card] [card]
name=Grixis Panorama name=Grixis Panorama
auto={T}:Add{1} auto={T}:Add{1}
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic&mountain;island;swamp]|myLibrary) aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic;mountain;island;swamp]|myLibrary)
auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic&mountain;island;swamp]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic;mountain;island;swamp]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Grixis Panorama: Search your library for a basic Island, Swamp, or Mountain card and put it onto the battlefield tapped. Then shuffle your library. text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Grixis Panorama: Search your library for a basic Island, Swamp, or Mountain card and put it onto the battlefield tapped. Then shuffle your library.
type=Land type=Land
[/card] [/card]
@@ -55460,7 +55467,6 @@ facedown={3}
autofacedown={3}{G}{G}:morph autofacedown={3}{G}{G}:morph
autofaceup=counter(1/1,5) autofaceup=counter(1/1,5)
auto=counter(1/1,X) auto=counter(1/1,X)
auto=0/-1
auto=@movedTo(this|Graveyard) from(myBattlefield):thisforeach(counter{1/1.1}) token(Snake,Creature Snake,1/1,green) auto=@movedTo(this|Graveyard) from(myBattlefield):thisforeach(counter{1/1.1}) token(Snake,Creature Snake,1/1,green)
text=Hooded Hydra enters the battlefield with X +1/+1 counters on it. -- When Hooded Hydra dies, put a 1/1 green Snake creature token onto the battlefield for each +1/+1 counter on it. -- Morph {3}G}{G}: As Hooded Hydra is turned face up, put five +1/+1 counters on it. text=Hooded Hydra enters the battlefield with X +1/+1 counters on it. -- When Hooded Hydra dies, put a 1/1 green Snake creature token onto the battlefield for each +1/+1 counter on it. -- Morph {3}G}{G}: As Hooded Hydra is turned face up, put five +1/+1 counters on it.
mana={X}{G}{G} mana={X}{G}{G}
@@ -57662,6 +57668,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Imposing Visage name=Imposing Visage
target=creature
auto=teach(creature) menace auto=teach(creature) menace
text=Enchant creature -- Enchanted creature can't be blocked except by two or more creatures. text=Enchant creature -- Enchanted creature can't be blocked except by two or more creatures.
mana={R} mana={R}
@@ -60975,8 +60982,8 @@ toughness=1
[card] [card]
name=Jund Panorama name=Jund Panorama
auto={T}:Add{1} auto={T}:Add{1}
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic&mountain;forest;swamp]|myLibrary) aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic;mountain;forest;swamp]|myLibrary)
auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic&mountain;forest;swamp]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic;mountain;forest;swamp]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Jund Panorama: Search your library for a basic Swamp, Mountain, or Forest card and put it onto the battlefield tapped. Then shuffle your library. text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Jund Panorama: Search your library for a basic Swamp, Mountain, or Forest card and put it onto the battlefield tapped. Then shuffle your library.
type=Land type=Land
[/card] [/card]
@@ -63776,7 +63783,7 @@ toughness=2
[card] [card]
name=Knight of the Mists name=Knight of the Mists
abilities=flanking abilities=flanking
auto=pay[[{U}]] name(pay blue mana) donothing?bury auto=pay[[{U}]] name(pay blue mana) donothing?bury target(Knight)
text=Flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.) -- When Knight of the Mists enters the battlefield, you may pay {U}. If you don't, destroy target Knight and it can't be regenerated. text=Flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.) -- When Knight of the Mists enters the battlefield, you may pay {U}. If you don't, destroy target Knight and it can't be regenerated.
mana={2}{U} mana={2}{U}
type=Creature type=Creature
@@ -63797,8 +63804,8 @@ toughness=2
[card] [card]
name=Knight of the Reliquary name=Knight of the Reliquary
auto=foreach(land|mygraveyard) 1/1 auto=foreach(land|mygraveyard) 1/1
aicode=activate moveTo(myBattlefield) target(land|myLibrary) auto={T}{S(forest,plains|myBattlefield)}:moveTo(myBattlefield) target(land|myLibrary)
auto={T}{S(forest,plains|myBattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(land|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend #auto={T}{S(forest,plains|myBattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(land|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend
text=Knight of the Reliquary gets +1/+1 for each land card in your graveyard. -- {T}, Sacrifice a Forest or Plains: Search your library for a land card, put it onto the battlefield, then shuffle your library. text=Knight of the Reliquary gets +1/+1 for each land card in your graveyard. -- {T}, Sacrifice a Forest or Plains: Search your library for a land card, put it onto the battlefield, then shuffle your library.
mana={1}{G}{W} mana={1}{G}{W}
type=Creature type=Creature
@@ -65248,7 +65255,7 @@ subtype=Equipment
[/card] [/card]
[card] [card]
name=Kynaios and Tiro of Meletis name=Kynaios and Tiro of Meletis
auto=@each my end:draw:1 && ability$!choice draw:1 _ if type(land|myhand)~morethan~0 then choice moveto(mybattlefield) notatarget(land|myhand)!$ controller && ability$!choice draw:1 _ if type(land|myhand)~morethan~0 then choice moveto(mybattlefield) notatarget(land|myhand)!$ opponent auto=@each my end:draw:1 && ability$!if type(land|myhand)~morethan~0 then choice moveto(mybattlefield) notatarget(land|myhand)!$ controller && ability$!choice draw:1 _ if type(land|myhand)~morethan~0 then choice moveto(mybattlefield) notatarget(land|myhand)!$ opponent
text=At the beginning of your end step, draw a card. Each player may put a land card from his or her hand onto the battlefield, then each opponent who didn't draws a card. text=At the beginning of your end step, draw a card. Each player may put a land card from his or her hand onto the battlefield, then each opponent who didn't draws a card.
mana={R}{G}{W}{U} mana={R}{G}{W}{U}
type=Legendary Creature type=Legendary Creature
@@ -68093,7 +68100,7 @@ name=Llanowar Reborn
auto=tap(noevent) auto=tap(noevent)
auto={T}:Add{G} auto={T}:Add{G}
auto=counter(1/1,1) auto=counter(1/1,1)
auto=@movedto(creature|battlefield):may this(counter{1/1}) all(trigger) counter(1/1,1) && this(counter{1/1}) counter(1/1,-1) auto=this(counter{1/1.1}>0) transforms((,newability[@movedto(creature|battlefield):may name(move 1/1 counter) all(trigger) counter(1/1.1) && counter(1/1.-1) all(this)]))
text=Llanowar Reborn enters the battlefield tapped. -- {T}: Add {G} to your mana pool. -- Graft 1 (This land enters the battlefield with a +1/+1 counter on it. Whenever a creature enters the battlefield, you may move a +1/+1 counter from this land onto it.) text=Llanowar Reborn enters the battlefield tapped. -- {T}: Add {G} to your mana pool. -- Graft 1 (This land enters the battlefield with a +1/+1 counter on it. Whenever a creature enters the battlefield, you may move a +1/+1 counter from this land onto it.)
type=Land type=Land
[/card] [/card]
@@ -72379,7 +72386,7 @@ toughness=3
[card] [card]
name=Mayael the Anima name=Mayael the Anima
aicode=activate target(creature[power>=5;zpos<=5]|mylibrary) moveto(mybattlefield) aicode=activate target(creature[power>=5;zpos<=5]|mylibrary) moveto(mybattlefield)
auto={3}{R}{G}{W}{T}:name(look) reveal:5 optionone name(Get Creature) target(creature[power >4]|reveal) moveto(mybattlefield) optiononeend optiontwo name(put on bottom) target(<5>*|reveal) bottomoflibrary optiontwoend revealend auto={3}{R}{G}{W}{T}:name(look) reveal:5 optionone name(Get Creature) target(creature[power>=5]|reveal) moveto(mybattlefield) optiononeend optiontwo name(put on bottom) target(<5>*|reveal) bottomoflibrary optiontwoend revealend
text={3}{R}{G}{W}, {T}: Look at the top five cards of your library. You may put a creature card with power 5 or greater from among them onto the battlefield. Put the rest on the bottom of your library in any order. text={3}{R}{G}{W}, {T}: Look at the top five cards of your library. You may put a creature card with power 5 or greater from among them onto the battlefield. Put the rest on the bottom of your library in any order.
mana={R}{G}{W} mana={R}{G}{W}
type=Legendary Creature type=Legendary Creature
@@ -74038,6 +74045,7 @@ type=Legendary Land
[card] [card]
name=Mind Burst name=Mind Burst
target=player target=player
auto=ability$!name(discard) target(*|myhand) reject!$ targetedplayer
auto=ability$!name(discard) target(<type:mind burst:graveyard>*|myhandplus1plusend) reject!$ targetedplayer auto=ability$!name(discard) target(<type:mind burst:graveyard>*|myhandplus1plusend) reject!$ targetedplayer
text=Target player discards X cards, where X is one plus the number of cards named Mind Burst in all graveyards. text=Target player discards X cards, where X is one plus the number of cards named Mind Burst in all graveyards.
mana={1}{B} mana={1}{B}
@@ -74687,7 +74695,7 @@ type=Instant
[/card] [/card]
[card] [card]
name=Mirari name=Mirari
auto=@movedto(*[instant;sorcery]|mystack):target(trigger[to]<1>) pay[[{3}]] name(copy spell) activate name(copy spell) castcard(copied noevent) auto=@movedto(*[instant;sorcery]|mystack):all(trigger[to]<1>) transforms((,newability[pay[[{3}]] name(copy spell) activate name(copy spell) castcard(copied noevent)])) forever
text=Whenever you cast an instant or sorcery spell, you may pay {3}. If you do, copy that spell. You may choose new targets for the copy. text=Whenever you cast an instant or sorcery spell, you may pay {3}. If you do, copy that spell. You may choose new targets for the copy.
mana={5} mana={5}
type=Legendary Artifact type=Legendary Artifact
@@ -77469,7 +77477,7 @@ type=Instant
[card] [card]
name=Murderous Redcap name=Murderous Redcap
abilities=persist abilities=persist
auto=target(creature) dynamicability<!powerstrike!> auto=target(creature,player) dynamicability<!powerstrike!>
text=When Murderous Redcap enters the battlefield, it deals damage equal to its power to target creature or player. -- Persist (When this creature dies, if it had no -1/-1 counters on it, return it to the battlefield under its owner's control with a -1/-1 counter on it.) text=When Murderous Redcap enters the battlefield, it deals damage equal to its power to target creature or player. -- Persist (When this creature dies, if it had no -1/-1 counters on it, return it to the battlefield under its owner's control with a -1/-1 counter on it.)
mana={2}{BR}{BR} mana={2}{BR}{BR}
type=Creature type=Creature
@@ -78282,7 +78290,7 @@ type=Sorcery
name=Nahiri, the Harbinger name=Nahiri, the Harbinger
auto=counter(0/0,4,loyalty) auto=counter(0/0,4,loyalty)
aicode=activate moveto(mybattlefield) notatarget(artifact,creature|mylibrary) and!( transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveTo(ownerhand)])) forever )! aicode=activate moveto(mybattlefield) notatarget(artifact,creature|mylibrary) and!( transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveTo(ownerhand)])) forever )!
auto={C(0/0,2,Loyalty)}:name(+2: Discard to draw) notatarget(*|myhand) transforms((,newability[reject and!(draw:1)!])) forever auto={C(0/0,2,Loyalty)}:name(+2: Discard to draw)may notatarget(*|myhand) transforms((,newability[reject and!(draw:1)!])) forever
auto={C(0/0,-2,Loyalty)}:name(-2: Exile tapped Artifact or Creature) target(*[artifact;creature;tapped]) moveto(exile) auto={C(0/0,-2,Loyalty)}:name(-2: Exile tapped Artifact or Creature) target(*[artifact;creature;tapped]) moveto(exile)
auto={C(0/0,-2,Loyalty)}:name(-2: Exile target Enchantment) target(enchantment) moveto(exile) auto={C(0/0,-2,Loyalty)}:name(-2: Exile target Enchantment) target(enchantment) moveto(exile)
auto={C(0/0,-8,Loyalty)}:name(-8: Fetch) reveal:plibrarycount optionone name(choose card) target(artifact,creature|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveto(mybattlefield) and!( transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveTo(ownerhand)])) forever )!)! afterrevealedend revealend auto={C(0/0,-8,Loyalty)}:name(-8: Fetch) reveal:plibrarycount optionone name(choose card) target(artifact,creature|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveto(mybattlefield) and!( transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveTo(ownerhand)])) forever )!)! afterrevealedend revealend
@@ -78794,8 +78802,8 @@ toughness=1
[card] [card]
name=Naya Panorama name=Naya Panorama
auto={T}:Add{1} auto={T}:Add{1}
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic&mountain;forest;plains]|myLibrary) aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(*[basic;mountain;forest;plains]|myLibrary)
auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic&mountain;forest;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend auto={1}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[basic;mountain;forest;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Naya Panorama: Search your library for a basic Mountain, Forest, or Plains card and put it onto the battlefield tapped. Then shuffle your library. text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Naya Panorama: Search your library for a basic Mountain, Forest, or Plains card and put it onto the battlefield tapped. Then shuffle your library.
type=Land type=Land
[/card] [/card]
@@ -80930,7 +80938,7 @@ toughness=2
[card] [card]
name=Nomads' Assembly name=Nomads' Assembly
auto=token(Kor Soldier,Creature Kor Soldier,1/1,white)*type:creature:mybattlefield auto=token(Kor Soldier,Creature Kor Soldier,1/1,white)*type:creature:mybattlefield
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Put a 1/1 white Kor Soldier creature token onto the battlefield for each creature you control. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Put a 1/1 white Kor Soldier creature token onto the battlefield for each creature you control. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={4}{W}{W} mana={4}{W}{W}
type=Sorcery type=Sorcery
@@ -80959,8 +80967,8 @@ toughness=0
[/card] [/card]
[card] [card]
name=Norin the Wary name=Norin the Wary
auto=@movedTo(*|stack):(blink)ueot auto=@movedTo(*|stack):transforms((,newability[moveto(exile)],newability[phaseactionmulti[endofturn] moveto(ownerbattlefield)]))
auto=@combat(attacking) source(creature):(blink)ueot auto=@combat(attacking) source(creature):transforms((,newability[moveto(exile)],newability[phaseactionmulti[endofturn] moveto(ownerbattlefield)]))
text=When a player casts a spell or a creature attacks, exile Norin the Wary. Return it to the battlefield under its owner's control at the beginning of the next end step. text=When a player casts a spell or a creature attacks, exile Norin the Wary. Return it to the battlefield under its owner's control at the beginning of the next end step.
mana={R} mana={R}
type=Legendary Creature type=Legendary Creature
@@ -81639,7 +81647,7 @@ type=Enchantment
[/card] [/card]
[card] [card]
name=Oath of Nissa name=Oath of Nissa
aicode=activate target(creature,land,planeswalker[zpos<=3]|mylibrary) moveto(myhand) aicode=activate target(*[creature;land;planeswalker;zpos<=3]|mylibrary) moveto(myhand)
auto=name(look) reveal:3 optionone name(Get a card) target(<1>*[creature;land;planeswalker]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<3>*|reveal) bottomoflibrary optiontwoend revealend auto=name(look) reveal:3 optionone name(Get a card) target(<1>*[creature;land;planeswalker]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<3>*|reveal) bottomoflibrary optiontwoend revealend
auto=lord(planeswalker|mycastingzone) anytypeofmana auto=lord(planeswalker|mycastingzone) anytypeofmana
text=When Oath of Nissa enters the battlefield, look at the top three cards of your library. You may reveal a creature, land, or planeswalker card from among them and put it into your hand. Put the rest on the bottom of your library in any order. -- You may spend mana as though it were mana of any color to cast planeswalker spells. text=When Oath of Nissa enters the battlefield, look at the top three cards of your library. You may reveal a creature, land, or planeswalker card from among them and put it into your hand. Put the rest on the bottom of your library in any order. -- You may spend mana as though it were mana of any color to cast planeswalker spells.
@@ -82313,7 +82321,7 @@ toughness=6
name=Ojutai's Breath name=Ojutai's Breath
target=creature target=creature
auto=freeze auto=freeze
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Tap target creature. It doesn't untap during its controller's next untap step. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Tap target creature. It doesn't untap during its controller's next untap step. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={2}{U} mana={2}{U}
type=Instant type=Instant
@@ -82321,7 +82329,7 @@ type=Instant
[card] [card]
name=Ojutai's Summons name=Ojutai's Summons
auto=create(Djinn Monk:Creature Djinn Monk:2/2:flying:blue) auto=create(Djinn Monk:Creature Djinn Monk:2/2:flying:blue)
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Put a 2/2 blue Djinn Monk creature token with flying onto the battlefield. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Put a 2/2 blue Djinn Monk creature token with flying onto the battlefield. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={3}{U}{U} mana={3}{U}{U}
type=Sorcery type=Sorcery
@@ -82430,7 +82438,7 @@ toughness=2
[card] [card]
name=Omen name=Omen
aicode=name(look) activate name(look) transforms((,newability[foreach(*[zpos<=4]|mylibrary) moverandom(*[zpos<=4]) from(mylibrary) to(mylibrary)],newability[draw:1])) ueot aicode=name(look) activate name(look) transforms((,newability[foreach(*[zpos<=4]|mylibrary) moverandom(*[zpos<=4]) from(mylibrary) to(mylibrary)],newability[draw:1])) ueot
auto=name(Look) reveal:3 optionone name(Look) target(*|reveal) doNothing optiononeend optiontwo target(<3>*|reveal) moveto(mylibrary) optiontwoend afterrevealed transforms((,newability[choice shuffle && draw:1],newability[choice name(Cancel) draw:1])) afterrevealedend revealend auto=name(Look) reveal:3 optionone name(Look) target(*|reveal) doNothing optiononeend optiontwo target(<3>*|reveal) moveto(mylibrary) optiontwoend afterrevealed transforms((,newability[choice shuffle && draw:1],newability[choice name(Cancel) draw:1])) afterrevealedend revealend
text=Look at the top three cards of your library, then put them back in any order. You may shuffle your library. -- Draw a card. text=Look at the top three cards of your library, then put them back in any order. You may shuffle your library. -- Draw a card.
mana={1}{U} mana={1}{U}
type=Sorcery type=Sorcery
@@ -82940,8 +82948,8 @@ type=Enchantment
[card] [card]
name=Opt name=Opt
aicode=activate may bottomoflibrary all(*[zpos=1]|mylibrary) aicode=activate may bottomoflibrary all(*[zpos=1]|mylibrary)
auto=name(Look) reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend
auto=draw:1 auto=draw:1
auto=name(Look) reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend
text=Look at the top card of your library. You may put that card on the bottom of your library. -- Draw a card. text=Look at the top card of your library. You may put that card on the bottom of your library. -- Draw a card.
mana={U} mana={U}
type=Instant type=Instant
@@ -83789,7 +83797,7 @@ subtype=Arcane
name=Otherworldly Outburst name=Otherworldly Outburst
target=creature target=creature
auto=1/0 ueot auto=1/0 ueot
auto=transforms((newability[@movedto(this|graveyard) from(battlefield):token(Eldrazi Horror)])) ueot auto=transforms((,newability[@movedto(this|graveyard) from(battlefield):token(Eldrazi Horror)])) ueot
text=Target creature gets +1/+0 until end of turn. When that creature dies this turn, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield. text=Target creature gets +1/+0 until end of turn. When that creature dies this turn, put a 3/2 colorless Eldrazi Horror creature token onto the battlefield.
mana={R} mana={R}
type=Instant type=Instant
@@ -84058,8 +84066,10 @@ type=Instant
[/card] [/card]
[card] [card]
name=Overwhelming Stampede name=Overwhelming Stampede
auto=all(creature|mybattlefield) power:highest:creature:mybattlefield/power:highest:creature:mybattlefield ueot auto=notatarget(creature[power=power:highest:creature:mybattlefield]|mybattlefield) transforms((,newability[all(creature|mybattlefield) dynamicability<!powerpumpboth!>,newability[all(creature|mybattlefield) trample]))
auto=all(creature|mybattlefield) trample ueot #auto=choice notatarget((creature[power=power:highest:creature:mybattlefield]|mybattlefield) transforms((,newability[all(creature)|mybattlefield] power))
#auto=all(creature|mybattlefield) /power:highest:creature:mybattlefield
#auto=all(creature|mybattlefield) trample ueot
text=Until end of turn, creatures you control gain trample and get +X/+X, where X is the greatest power among creatures you control. (If a creature you control would assign enough damage to its blockers to destroy them, you may have it assign the rest of its damage to defending player or planeswalker.) text=Until end of turn, creatures you control gain trample and get +X/+X, where X is the greatest power among creatures you control. (If a creature you control would assign enough damage to its blockers to destroy them, you may have it assign the rest of its damage to defending player or planeswalker.)
mana={3}{G}{G} mana={3}{G}{G}
type=Sorcery type=Sorcery
@@ -85254,7 +85264,7 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Peak Eruption name=Peak Eruption
target=mountain target=land[mountain]
auto=destroy auto=destroy
auto=Damage:3 targetController auto=Damage:3 targetController
text=Destroy target Mountain. Peak Eruption deals 3 damage to that land's controller. text=Destroy target Mountain. Peak Eruption deals 3 damage to that land's controller.
@@ -88605,7 +88615,7 @@ type=Sorcery
name=Prey's Vengeance name=Prey's Vengeance
target=creature target=creature
auto=2/2 auto=2/2
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target creature gets +2/+2 until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Target creature gets +2/+2 until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={G} mana={G}
type=Instant type=Instant
@@ -89341,7 +89351,7 @@ type=Sorcery
name=Profound Journey name=Profound Journey
target=*[-instant;-sorcery]|mygraveyard target=*[-instant;-sorcery]|mygraveyard
auto=moveto(ownerbattlefield) auto=moveto(ownerbattlefield)
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Return target permanent card from your graveyard to the battlefield. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Return target permanent card from your graveyard to the battlefield. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={5}{W}{W} mana={5}{W}{W}
type=Sorcery type=Sorcery
@@ -89895,7 +89905,7 @@ type=Instant
[card] [card]
name=Pulse of the Dross name=Pulse of the Dross
target=player target=player
auto=Reveal:3 revealzone(targetedpersonshand) optionone choice name(choose Discards) target(<1>*|reveal) transforms((,newability[moveto(ownerhand) and!(reject)!])) oneshot optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) oneshot optiontwoend afterrevealed if type(*|myhand)~lessthan~type(*|opponenthand) then moveto(myhand) afterrevealedend revealend auto=Reveal:3 revealzone(targetedpersonshand) optionone choice name(choose Discards) target(<1>*|reveal) transforms((,newability[moveto(ownerhand) and!(reject)!])) oneshot optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) oneshot optiontwoend afterrevealed if type(*|myhand)~lessthan~type(*|opponenthand) then moveto(myhand) all(this) afterrevealedend revealend
text=Target player reveals three cards from his or her hand and you choose one of them. That player discards that card. Then if that player has more cards in hand than you, return Pulse of the Dross to its owner's hand. text=Target player reveals three cards from his or her hand and you choose one of them. That player discards that card. Then if that player has more cards in hand than you, return Pulse of the Dross to its owner's hand.
mana={1}{B}{B} mana={1}{B}{B}
type=Sorcery type=Sorcery
@@ -91463,7 +91473,7 @@ name=Raging Ravine
auto=tap(noevent) auto=tap(noevent)
auto={T}:Add{R} auto={T}:Add{R}
auto={T}:Add{G} auto={T}:Add{G}
auto={2}{R}{G}:transforms((Elemental Creature,setpower=3,settoughness=3,red,green,newability[@combat(attacking) source(this):counter(1/1.1)])) ueot auto={2}{R}{G}:transforms((Elemental Creature,setpower=3,settoughness=3,red,green,newability[@combat(attacking) source(this):counter(1/1.1) all(this)])) ueot
text=Raging Ravine enters the battlefield tapped. -- {T}: Add {R} or {G} to your mana pool. -- {2}{R}{G}: Until end of turn, Raging Ravine becomes a 3/3 red and green Elemental creature with "Whenever this creature attacks, put a +1/+1 counter on it." It's still a land. text=Raging Ravine enters the battlefield tapped. -- {T}: Add {R} or {G} to your mana pool. -- {2}{R}{G}: Until end of turn, Raging Ravine becomes a 3/3 red and green Elemental creature with "Whenever this creature attacks, put a +1/+1 counter on it." It's still a land.
type=Land type=Land
[/card] [/card]
@@ -91802,9 +91812,9 @@ toughness=6
[/card] [/card]
[card] [card]
name=Rakdos's Return name=Rakdos's Return
target=opponent #target=opponent Game crashes when AI plays a card with cost {X} and that targets a player
auto=damage:x auto=damage:x opponent
auto=ability$!name(discard) target(<storedx>*|myhand) reject!$ targetedplayer auto=ability$!name(discard) target(<storedx>*|myhand) reject!$ opponent
text=Rakdos's Return deals X damage to target opponent. That player discards X cards. text=Rakdos's Return deals X damage to target opponent. That player discards X cards.
mana={X}{B}{R} mana={X}{B}{R}
type=Sorcery type=Sorcery
@@ -93060,9 +93070,9 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Reap Intellect name=Reap Intellect
target=opponent #target=opponent Game crashes when AI plays a card with cost {X} and that targets a player
aicode=activate notatarget(<upto:castx>*[-land]|targetedpersonshand) moveto(exile) and!( transforms((,newability[moveTo(exile) all(*[share!name!]|mygraveyard)],newability[moveTo(exile) all(*[share!name!]|myhand)],newability[moveTo(exile) and!(shuffle)! all(*[share!name!]|mylibrary)])) oneshot )! aicode=activate notatarget(<upto:castx>*[-land]|opponenthand) moveto(exile) and!( transforms((,newability[moveTo(exile) all(*[share!name!]|mygraveyard)],newability[moveTo(exile) all(*[share!name!]|myhand)],newability[moveTo(exile) and!(shuffle)! all(*[share!name!]|mylibrary)])) oneshot )!
auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) notatarget(<upto:castx>*[-land]|reveal) moveto(exile) and!( transforms((,newability[moveTo(exile) all(*[share!name!]|mygraveyard)],newability[moveTo(exile) all(*[share!name!]|myhand)],newability[moveTo(exile) and!(shuffle)! all(*[share!name!]|mylibrary)])) oneshot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend auto=reveal:type:*:opponenthand revealzone(opponenthand) optionone name(choose card) notatarget(<upto:castx>*[-land]|reveal) moveto(exile) and!( transforms((,newability[moveTo(exile) all(*[share!name!]|mygraveyard)],newability[moveTo(exile) all(*[share!name!]|myhand)],newability[moveTo(exile) and!(shuffle)! all(*[share!name!]|mylibrary)])) oneshot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend
text=Target opponent reveals his or her hand. You choose up to X nonland cards from it and exile them. For each card exiled this way, search that player's graveyard, hand, and library for any number of cards with the same name as that card and exile them. Then that player shuffles his or her library. text=Target opponent reveals his or her hand. You choose up to X nonland cards from it and exile them. For each card exiled this way, search that player's graveyard, hand, and library for any number of cards with the same name as that card and exile them. Then that player shuffles his or her library.
mana={X}{2}{U}{B} mana={X}{2}{U}{B}
type=Sorcery type=Sorcery
@@ -93555,8 +93565,8 @@ type=Instant
[card] [card]
name=Recurring Insight name=Recurring Insight
target=opponent target=opponent
auto=draw:type:*:targetedpersonshand auto=draw:type:*:targetedpersonshand controller
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Draw cards equal to the number of cards in target opponent's hand. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Draw cards equal to the number of cards in target opponent's hand. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={4}{U}{U} mana={4}{U}{U}
type=Sorcery type=Sorcery
@@ -101139,7 +101149,7 @@ type=Sorcery
[card] [card]
name=Scrounging Bandar name=Scrounging Bandar
auto=counter(1/1,2) auto=counter(1/1,2)
auto={0}{counter(1/1,-1)}:counter(1/1,1) target(creature) myUpkeepOnly auto={0}{counter(1/1,-1)}:counter(1/1,1) target(other creature) myUpkeepOnly
text=Scrounging Bandar enters the battlefield with two +1/+1 counters on it. -- At the beginning of your upkeep, you may move any number of +1/+1 counters from Scrounging Bandar onto another target creature. text=Scrounging Bandar enters the battlefield with two +1/+1 counters on it. -- At the beginning of your upkeep, you may move any number of +1/+1 counters from Scrounging Bandar onto another target creature.
mana={1}{G} mana={1}{G}
type=Creature type=Creature
@@ -101573,8 +101583,8 @@ type=Enchantment
[/card] [/card]
[card] [card]
name=Sealed Fate name=Sealed Fate
target=opponent #target=opponent Game crashes when AI plays a card with cost {X} and that targets a player
auto=name(Look) reveal:x revealzone(targetedpersonslibrary) optionone name(exile a card) target(*|reveal) moveto(ownerexile) optiononeend optiontwo target(<60>*|reveal) moveto(ownerlibrary) optiontwoend revealend auto=name(Look) reveal:x revealzone(opponentlibrary) optionone name(exile a card) target(<1>*|reveal) moveto(ownerexile) optiononeend optiontwo target(<60>*|reveal) moveto(ownerlibrary) optiontwoend revealend
text=Look at the top X cards of target opponent's library. Exile one of those cards and put the rest back on top of that player's library in any order. text=Look at the top X cards of target opponent's library. Exile one of those cards and put the rest back on top of that player's library in any order.
mana={X}{U}{B} mana={X}{U}{B}
type=Sorcery type=Sorcery
@@ -101630,8 +101640,7 @@ toughness=1
[card] [card]
name=Searing Blood name=Searing Blood
target=creature target=creature
auto=damage:2 auto=transforms((,newability[@movedto(this|graveyard) from(battlefield):damage:3 controller])) ueot && damage:2
auto=transforms((newability[@movedto(this|graveyard) from(battlefield):damage:3 controller])) ueot
text=Searing Blood deals 2 damage to target creature. When that creature dies this turn, Searing Blood deals 3 damage to the creature's controller. text=Searing Blood deals 2 damage to target creature. When that creature dies this turn, Searing Blood deals 3 damage to the creature's controller.
mana={R}{R} mana={R}{R}
type=Instant type=Instant
@@ -102206,6 +102215,7 @@ text=When Seismic Elemental enters the battlefield, creatures without flying can
mana={3}{R}{R} mana={3}{R}{R}
type=Creature type=Creature
subtype=Elemental subtype=Elemental
subtype=Elemental
power=4 power=4
toughness=4 toughness=4
[/card] [/card]
@@ -102441,8 +102451,8 @@ type=Artifact
[/card] [/card]
[card] [card]
name=Self-Assembler name=Self-Assembler
aicode=activate notatarget(creature[Assembly-Worker]|mylibrary) moveTo(ownerhand) auto=notatarget(creature[Assembly-Worker]|mylibrary) moveTo(ownerhand)
auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(creature[Assembly-Worker]|mylibrary) optionone name(choose card) target(creature[Assembly-Worker]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend revealend #auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(creature[Assembly-Worker]|mylibrary) optionone name(choose card) target(creature[Assembly-Worker]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend revealend
text=When Self-Assembler enters the battlefield, you may search your library for an Assembly-Worker creature card, reveal it, put it into your hand, then shuffle your library. text=When Self-Assembler enters the battlefield, you may search your library for an Assembly-Worker creature card, reveal it, put it into your hand, then shuffle your library.
mana={5} mana={5}
type=Artifact Creature type=Artifact Creature
@@ -103568,7 +103578,7 @@ toughness=1
name=Shadowborn Demon name=Shadowborn Demon
abilities=flying abilities=flying
auto=destroy target(creature[-demon]) auto=destroy target(creature[-demon])
auto=@each myupkeep:if type(creature|mygraveyard)~lessthan~6 then sacrifice auto=@each myupkeep:if type(creature|mygraveyard)~lessthan~6 then sacrifice notatarget(creature|mybattlefield)
text=Flying -- When Shadowborn Demon enters the battlefield, destroy target non-demon creature. -- At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature. text=Flying -- When Shadowborn Demon enters the battlefield, destroy target non-demon creature. -- At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature.
mana={3}{B}{B} mana={3}{B}{B}
type=Creature type=Creature
@@ -105495,7 +105505,7 @@ name=Sight Beyond Sight
abilities=hiddenface abilities=hiddenface
aicode=activate transforms((,newability[moveto(myhand) all(*[zpos=1]|mylibrary) && bottomoflibrary all(*[zpos=2]|mylibrary)])) ueot aicode=activate transforms((,newability[moveto(myhand) all(*[zpos=1]|mylibrary) && bottomoflibrary all(*[zpos=2]|mylibrary)])) ueot
auto=name(look) reveal:2 optionone name(Get a card) target(<1>*|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<2>*|reveal) bottomoflibrary optiontwoend revealend auto=name(look) reveal:2 optionone name(Get a card) target(<1>*|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<2>*|reveal) bottomoflibrary optiontwoend revealend
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Look at the top two cards of your library. Put one of them into your hand and the other on the bottom of your library. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Look at the top two cards of your library. Put one of them into your hand and the other on the bottom of your library. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={3}{U} mana={3}{U}
type=Sorcery type=Sorcery
@@ -106356,7 +106366,7 @@ type=Instant
[/card] [/card]
[card] [card]
name=Sin Collector name=Sin Collector
auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) notatarget(*[instant;sorcery]|reveal) moveto(exile) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) notatarget(<1>*[instant;sorcery]|reveal) moveto(exile) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend
text=When Sin Collector enters the battlefield target opponent reveals his or her hand. You choose an instant or a sorcery card from it and exile that card. text=When Sin Collector enters the battlefield target opponent reveals his or her hand. You choose an instant or a sorcery card from it and exile that card.
mana={1}{W}{B} mana={1}{W}{B}
type=Creature type=Creature
@@ -110177,7 +110187,7 @@ toughness=3
[/card] [/card]
[card] [card]
name=Soul Tithe name=Soul Tithe
target=*[-land] target=artifact,creature,enchantment,planeswalker
auto=teach(*[manacost=1]) transforms((,newability[upcost[{1}] sacrifice])) auto=teach(*[manacost=1]) transforms((,newability[upcost[{1}] sacrifice]))
auto=teach(*[manacost=2]) transforms((,newability[upcost[{2}] sacrifice])) auto=teach(*[manacost=2]) transforms((,newability[upcost[{2}] sacrifice]))
auto=teach(*[manacost=3]) transforms((,newability[upcost[{3}] sacrifice])) auto=teach(*[manacost=3]) transforms((,newability[upcost[{3}] sacrifice]))
@@ -112425,7 +112435,7 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Spreading Algae name=Spreading Algae
target=swamp target=land[swamp]
auto=@tapped(mytgt):destroy auto=@tapped(mytgt):destroy
autograveyard=@movedTo(this|graveyard) from(battlefield):moveTo(ownerhand) autograveyard=@movedTo(this|graveyard) from(battlefield):moveTo(ownerhand)
text=Enchant Swamp -- When enchanted land becomes tapped, destroy it. -- When Spreading Algae is put into a graveyard from the battlefield, return Spreading Algae to its owner's hand. text=Enchant Swamp -- When enchanted land becomes tapped, destroy it. -- When Spreading Algae is put into a graveyard from the battlefield, return Spreading Algae to its owner's hand.
@@ -112861,7 +112871,7 @@ toughness=0
name=Staggershock name=Staggershock
target=creature,player target=creature,player
auto=damage:2 auto=damage:2
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Staggershock deals 2 damage to target creature or player. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Staggershock deals 2 damage to target creature or player. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={2}{R} mana={2}{R}
type=Instant type=Instant
@@ -113254,7 +113264,7 @@ toughness=1
name=Stasis Cell name=Stasis Cell
target=creature target=creature
text=Enchant creature -- Enchanted creature doesn't untap during its controller's untap step. -- {3}{U}: Attach Stasis Cell to target creature. text=Enchant creature -- Enchanted creature doesn't untap during its controller's untap step. -- {3}{U}: Attach Stasis Cell to target creature.
auto=doesnotuntap auto=teach(creature) doesnotuntap
auto={3}{U}:retarget target(creature) auto={3}{U}:retarget target(creature)
mana={4}{U} mana={4}{U}
type=Enchantment type=Enchantment
@@ -113669,7 +113679,7 @@ type=Enchantment
[card] [card]
name=Steppe Glider name=Steppe Glider
abilities=flying,vigilance abilities=flying,vigilance
auto={w}{1}:target(creature[counter{1/1.1}]) transforms((newability[flying],newability[vigilance])) ueot auto={w}{1}:target(creature[counter{1/1.1}]) transforms((,newability[flying],newability[vigilance])) ueot
text=Flying, vigilance -- {1}{W}: Target creature with a +1/+1 counter on it gains flying and vigilance until end of turn. text=Flying, vigilance -- {1}{W}: Target creature with a +1/+1 counter on it gains flying and vigilance until end of turn.
mana={4}{W} mana={4}{W}
type=Creature type=Creature
@@ -116049,6 +116059,7 @@ type=Enchantment
[/card] [/card]
[card] [card]
name=Sunken Field name=Sunken Field
target=land
auto=teach(land) {T}:name(counter spell) target(*|stack) transforms((,newability[pay[[{1}]] name(pay mana) donothing?fizzle])) forever auto=teach(land) {T}:name(counter spell) target(*|stack) transforms((,newability[pay[[{1}]] name(pay mana) donothing?fizzle])) forever
text=Enchant land -- Enchanted land has "{T}: Counter target spell unless its controller pays {1}." text=Enchant land -- Enchanted land has "{T}: Counter target spell unless its controller pays {1}."
mana={1}{U} mana={1}{U}
@@ -116543,7 +116554,7 @@ toughness=1
[card] [card]
name=Surreal Memoir name=Surreal Memoir
auto=moverandom(instant) from(mygraveyard) to(myhand) auto=moverandom(instant) from(mygraveyard) to(myhand)
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Return an instant card at random from your graveyard to your hand. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Return an instant card at random from your graveyard to your hand. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={3}{R} mana={3}{R}
type=Sorcery type=Sorcery
@@ -116571,7 +116582,7 @@ type=Sorcery
name=Survival Cache name=Survival Cache
auto=life:2 controller auto=life:2 controller
auto=if compare(lifetotal)~morethan~compare(opponentlifetotal) then draw:1 controller auto=if compare(lifetotal)~morethan~compare(opponentlifetotal) then draw:1 controller
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=You gain 2 life. Then if you have more life than an opponent, draw a card. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=You gain 2 life. Then if you have more life than an opponent, draw a card. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={2}{W} mana={2}{W}
type=Sorcery type=Sorcery
@@ -117611,7 +117622,7 @@ name=Taigam's Strike
target=creature target=creature
auto=2/0 ueot auto=2/0 ueot
auto=unblockable ueot auto=unblockable ueot
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target creature gets +2/+0 until end of turn and can't be blocked this turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Target creature gets +2/+0 until end of turn and can't be blocked this turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={3}{U} mana={3}{U}
type=Sorcery type=Sorcery
@@ -122313,10 +122324,10 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Timetwister name=Timetwister
auto=moveto(opponentgraveyard) all(*|opponenthand) auto=moveto(opponentlibrary) all(*|opponenthand)
auto=moveto(opponentlibrary) all(*|opponentgraveyard) && shuffle auto=moveto(opponentlibrary) all(*|opponentgraveyard) && shuffle
auto=draw:7 opponent auto=draw:7 opponent
auto=moveto(mygraveyard) all(*|myhand) auto=moveto(mylibrary) all(*|myhand)
auto=moveto(mylibrary) all(*|mygraveyard) && shuffle auto=moveto(mylibrary) all(*|mygraveyard) && shuffle
auto=draw:7 controller auto=draw:7 controller
text=Each player shuffles his or her hand and graveyard into his or her library, then draws seven cards. (Then put Timetwister into its owner's graveyard.) text=Each player shuffles his or her hand and graveyard into his or her library, then draws seven cards. (Then put Timetwister into its owner's graveyard.)
@@ -124460,8 +124471,7 @@ toughness=3
[/card] [/card]
[card] [card]
name=Triangle of War name=Triangle of War
auto={2}{S}:name(powerstrike) target(other creature|mybattlefield) transforms((,newability[dynamicability<!powerstrike eachother!> target(creature|opponentbattlefield)])) forever auto={2}{S} restriction(type(creature|opponentbattlefield)~morethan~0):name(fight) target(creature|mybattlefield) transforms((,newability[dynamicability<!powerstrike eachother!> target(creature|opponentbattlefield)])) forever
restriction=type(creature|opponentbattlefield)~morethan~0
text={2}, Sacrifice Triangle of War: Target creature you control fights target creature an opponent controls. (Each deals damage equal to its power to the other.) text={2}, Sacrifice Triangle of War: Target creature you control fights target creature an opponent controls. (Each deals damage equal to its power to the other.)
mana={1} mana={1}
type=Artifact type=Artifact
@@ -127278,7 +127288,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Utopia Sprawl name=Utopia Sprawl
target=forest target=land[forest]
auto=choice name(green) transforms((,newability[produceextra:{g}])) forever auto=choice name(green) transforms((,newability[produceextra:{g}])) forever
auto=choice name(blue) transforms((,newability[produceextra:{u}])) forever auto=choice name(blue) transforms((,newability[produceextra:{u}])) forever
auto=choice name(red) transforms((,newability[produceextra:{r}])) forever auto=choice name(red) transforms((,newability[produceextra:{r}])) forever
@@ -129902,7 +129912,7 @@ name=Virulent Swipe
target=creature target=creature
auto=2/0 ueot auto=2/0 ueot
auto=deathtouch ueot auto=deathtouch ueot
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Target creature gets +2/+0 and gains deathtouch until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Target creature gets +2/+0 and gains deathtouch until end of turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={B} mana={B}
type=Instant type=Instant
@@ -130484,7 +130494,7 @@ type=Sorcery
name=Void Squall name=Void Squall
target=*[-land] target=*[-land]
auto=moveto(ownerhand) auto=moveto(ownerhand)
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=Return target nonland permanent to its owner's hand. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=Return target nonland permanent to its owner's hand. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={4}{U} mana={4}{U}
type=Sorcery type=Sorcery
@@ -130753,7 +130763,7 @@ subtype=Aura
[/card] [/card]
[card] [card]
name=Volrath the Fallen name=Volrath the Fallen
auto={D(creature|myhand)}:storedmanacost/storedmanacost ueot auto={1}{B}{D(creature|myhand)}:storedmanacost/storedmanacost ueot
text={1}{B}, Discard a creature card: Volrath the Fallen gets +X/+X until end of turn, where X is the discarded card's converted mana cost. text={1}{B}, Discard a creature card: Volrath the Fallen gets +X/+X until end of turn, where X is the discarded card's converted mana cost.
mana={3}{B}{B}{B} mana={3}{B}{B}{B}
type=Legendary Creature type=Legendary Creature
@@ -133434,7 +133444,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Weldfast Engineer name=Weldfast Engineer
auto=@each my combatbegins:target(artifact|mybattlefield) 2/0 ueot auto=@each my combatbegins:target(artifact[creature]|mybattlefield) 2/0 ueot
text=At the beginning of combat on your turn, target artifact creature you control gets +2/+0 until end of turn. text=At the beginning of combat on your turn, target artifact creature you control gets +2/+0 until end of turn.
mana={1}{B}{R} mana={1}{B}{R}
type=Creature type=Creature
@@ -136114,7 +136124,7 @@ toughness=2
name=World at War name=World at War
auto=nextphasealter(add,combatphaseswithmain,controller,after<postbattle>) auto=nextphasealter(add,combatphaseswithmain,controller,after<postbattle>)
auto=untap all(creature[attacking]) auto=untap all(creature[attacking])
auto=if rebound then moveto(exile) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )! auto=if rebound then moveto(exile) all(this) and!( transforms((,newability[@rebounded:may activate castcard(normal)])) forever )!
text=After the first postcombat main phase this turn, there's an additional combat phase followed by an additional main phase. At the beginning of that combat, untap all creatures that attacked this turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=After the first postcombat main phase this turn, there's an additional combat phase followed by an additional main phase. At the beginning of that combat, untap all creatures that attacked this turn. -- Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
mana={3}{R}{R} mana={3}{R}{R}
type=Sorcery type=Sorcery
+3
View File
@@ -15,6 +15,9 @@ typedef enum
GAME_TYPE_MOMIR, GAME_TYPE_MOMIR,
GAME_TYPE_RANDOM1, GAME_TYPE_RANDOM1,
GAME_TYPE_RANDOM2, GAME_TYPE_RANDOM2,
GAME_TYPE_RANDOM3,
GAME_TYPE_RANDOM5,
GAME_TYPE_HORDE,
GAME_TYPE_STORY, GAME_TYPE_STORY,
GAME_TYPE_DEMO, GAME_TYPE_DEMO,
GAME_TYPE_STONEHEWER, GAME_TYPE_STONEHEWER,
+3
View File
@@ -42,6 +42,9 @@ class Rules
protected: protected:
Player * loadPlayerMomir(GameObserver* observer, int isAI); Player * loadPlayerMomir(GameObserver* observer, int isAI);
Player * loadPlayerRandom(GameObserver* observer, int isAI, int mode); Player * loadPlayerRandom(GameObserver* observer, int isAI, int mode);
Player * loadPlayerRandomThree(GameObserver* observer, int isAI);
Player * loadPlayerRandomFive(GameObserver* observer, int isAI);
Player * loadPlayerHorde(GameObserver* observer, int isAI);
Player * initPlayer(GameObserver *observer, int playerId); Player * initPlayer(GameObserver *observer, int playerId);
MTGDeck * buildDeck(int playerId); MTGDeck * buildDeck(int playerId);
GameType strToGameMode(string s); GameType strToGameMode(string s);
+1 -1
View File
@@ -12,7 +12,7 @@ Author: Michael Nguyen
/* Wagic versions */ /* Wagic versions */
#define WAGIC_VERSION_MAJOR 0 #define WAGIC_VERSION_MAJOR 0
#define WAGIC_VERSION_MEDIUM 20 #define WAGIC_VERSION_MEDIUM 21
#define WAGIC_VERSION_MINOR 1 #define WAGIC_VERSION_MINOR 1
#define VERSION_DOT(a, b, c) a ##.## b ##.## c #define VERSION_DOT(a, b, c) a ##.## b ##.## c
+146 -93
View File
@@ -46,14 +46,15 @@ int OrderedAIAction::getEfficiency(AADamager * aad)
return 0; return 0;
} }
if(p == target->controller()) if(p && target)
return 0; if(p == target->controller())
return 0;
if (dTarget && aad && (aad->getDamage() >= dTarget->toughness)) if (dTarget && aad && (aad->getDamage() >= dTarget->toughness))
return 100; return 100;
if (dTarget && dTarget->toughness) if (dTarget && dTarget->toughness)
return (50 * aad->getDamage()) / dTarget->toughness; return (10 * aad->getDamage()) / dTarget->toughness; // Don't waste damage spells
return 0; return 0;
} }
@@ -129,8 +130,12 @@ int OrderedAIAction::getEfficiency()
{ {
efficiency = 95; efficiency = 95;
} }
//TODO If the card is the target of a damage spell //TODO If the card is the target of a damage spell
break; if (!coreAbilityCardTarget->regenerateTokens && (MTGCardInstance*)target == a->source)
{
efficiency = 95;
}
break;
} }
case MTGAbility::STANDARD_PREVENT: case MTGAbility::STANDARD_PREVENT:
{ {
@@ -271,7 +276,7 @@ int OrderedAIAction::getEfficiency()
} }
case MTGAbility::STANDARD_PUMP: case MTGAbility::STANDARD_PUMP:
{ {
efficiency = 0; efficiency = 0;
if(!coreAbilityCardTarget) if(!coreAbilityCardTarget)
break; break;
if(!target && !dynamic_cast<ALord*> (a) && (((MTGCardInstance *)a->source)->hasSubtype(Subtypes::TYPE_AURA) || ((MTGCardInstance *)a->source)->hasSubtype(Subtypes::TYPE_EQUIPMENT))) if(!target && !dynamic_cast<ALord*> (a) && (((MTGCardInstance *)a->source)->hasSubtype(Subtypes::TYPE_AURA) || ((MTGCardInstance *)a->source)->hasSubtype(Subtypes::TYPE_EQUIPMENT)))
@@ -291,9 +296,9 @@ int OrderedAIAction::getEfficiency()
int suggestion = af.abilityEfficiency(a, p, MODE_ABILITY); int suggestion = af.abilityEfficiency(a, p, MODE_ABILITY);
//i do not set a starting eff. on this ability, this allows Ai to sometimes randomly do it as it normally does. //i do not set a starting eff. on this ability, this allows Ai to sometimes randomly do it as it normally does.
int currentPhase = g->getCurrentGamePhase(); int currentPhase = g->getCurrentGamePhase();
if ((currentPhase == MTG_PHASE_COMBATBLOCKERS) || (currentPhase == MTG_PHASE_COMBATATTACKERS)) if (suggestion == BAKA_EFFECT_GOOD && target->controller() == p)
{ {
if (suggestion == BAKA_EFFECT_GOOD && target->controller() == p) if ((currentPhase == MTG_PHASE_COMBATBLOCKERS) || (currentPhase == MTG_PHASE_COMBATATTACKERS))
{ {
if(coreAbilityCardTarget->defenser || coreAbilityCardTarget->blockers.size()) if(coreAbilityCardTarget->defenser || coreAbilityCardTarget->blockers.size())
{ {
@@ -315,6 +320,10 @@ int OrderedAIAction::getEfficiency()
efficiency -= coreAbilityCardTarget->power;//we don't need to go overboard. better to not put all your eggs in a single basket. efficiency -= coreAbilityCardTarget->power;//we don't need to go overboard. better to not put all your eggs in a single basket.
} }
} }
if (currentPhase == MTG_PHASE_FIRSTMAIN)
{
efficiency = 10;
}
} }
if (suggestion == BAKA_EFFECT_BAD && target->controller() != p && target->toughness > 0) if (suggestion == BAKA_EFFECT_BAD && target->controller() != p && target->toughness > 0)
{ {
@@ -326,28 +335,41 @@ int OrderedAIAction::getEfficiency()
{ {
if(!coreAbilityCardTarget) if(!coreAbilityCardTarget)
break; break;
// It used to skip most effects, with no other condition efficiency is -1
// Becomes is generally good so setting a value, but don't want to spam it
if (coreAbilityCardTarget && !coreAbilityCardTarget->isLand())
{
// Bonus if almost no cards in hand
if (p->game->hand->nb_cards <= 1)
{
efficiency = 60;
}
else efficiency = 30;
}
//nothing huge here, just ensuring that Ai makes his noncreature becomers into creatures during first main, so it can actually use them in combat. //nothing huge here, just ensuring that Ai makes his noncreature becomers into creatures during first main, so it can actually use them in combat.
if (coreAbilityCardTarget && !coreAbilityCardTarget->isCreature() && currentPhase == MTG_PHASE_FIRSTMAIN) if (coreAbilityCardTarget && !coreAbilityCardTarget->isCreature() && currentPhase == MTG_PHASE_FIRSTMAIN)
{ {
efficiency = 100; efficiency = 60;
} }
break; break;
} }
case MTGAbility::MANA_PRODUCER://only way to hit this condition is nested manaabilities, ai skips manaproducers by defualt when finding an ability to use. case MTGAbility::MANA_PRODUCER://only way to hit this condition is nested manaabilities, ai skips manaproducers by defualt when finding an ability to use.
{ {
AManaProducer * manamaker = dynamic_cast<AManaProducer*>(a); AManaProducer * manamaker = dynamic_cast<AManaProducer*>(a);
GenericActivatedAbility * GAA = dynamic_cast<GenericActivatedAbility*>(ability); GenericActivatedAbility * GAA = dynamic_cast<GenericActivatedAbility*>(ability);
AForeach * forMana = dynamic_cast<AForeach*>(GAA->ability); if(GAA)
if (manamaker && forMana) {
{ AForeach * forMana = dynamic_cast<AForeach*>(GAA->ability);
int outPut = forMana->checkActivation(); if (manamaker && forMana)
if (ability->getCost() && outPut > int(ability->getCost()->getConvertedCost() +1) && currentPhase == MTG_PHASE_FIRSTMAIN && ability->source->controller()->game->hand->nb_cards > 1) {
efficiency = 90;//might be a bit random, but better than never using them. int outPut = forMana->checkActivation();
} if (ability->getCost() && outPut > int(ability->getCost()->getConvertedCost() +1) && currentPhase == MTG_PHASE_FIRSTMAIN && ability->source->controller()->game->hand->nb_cards > 1)
else efficiency = 60;//might be a bit random, but better than never using them.
efficiency = 0; }
break; }
else
efficiency = 0;
break;
} }
case MTGAbility::STANDARDABILITYGRANT: case MTGAbility::STANDARDABILITYGRANT:
{ {
@@ -426,11 +448,12 @@ int OrderedAIAction::getEfficiency()
case MTGAbility::LIFER: case MTGAbility::LIFER:
{ {
//use life abilities whenever possible. //use life abilities whenever possible. Well yes, but actually no
//limits mana and in case of Zuran Orb it just sacrifices all lands
AALifer * alife = (AALifer *) a; AALifer * alife = (AALifer *) a;
Targetable * _t = alife->getTarget(); Targetable * _t = alife->getTarget();
efficiency = 100; efficiency = 80;
AbilityFactory af(g); AbilityFactory af(g);
int suggestion = af.abilityEfficiency(a, p, MODE_ABILITY); int suggestion = af.abilityEfficiency(a, p, MODE_ABILITY);
@@ -566,6 +589,12 @@ int OrderedAIAction::getEfficiency()
{ {
if (z == p->game->hand) if (z == p->game->hand)
efficiency = 10 + (owner->getRandomGenerator()->random() % 10);//random chance to bounce their own card; efficiency = 10 + (owner->getRandomGenerator()->random() % 10);//random chance to bounce their own card;
}
// We don't want to return cards in play to own hand, save rare combos
else if(target->currentZone == p->game->inPlay)
{
if (z == p->game->hand || z == p->game->library)
efficiency = (owner->getRandomGenerator()->random() % 10);//random chance to bounce their own card;
} }
else else
{ {
@@ -574,7 +603,11 @@ int OrderedAIAction::getEfficiency()
} }
else else
{ {
efficiency = 50; // We don't want to return the ability source cards in play to own hand, save rare combos
// cards like Blinking Spirit use to be auto lose for AI
if(z == p->game->hand || z == p->game->library)
efficiency = 1;
else efficiency = 50;
//may abilities target the source until thier nested ability is activated, so 50% chance to use this //may abilities target the source until thier nested ability is activated, so 50% chance to use this
//mover, until we can come up with something more elegent.... //mover, until we can come up with something more elegent....
} }
@@ -639,7 +672,7 @@ int OrderedAIAction::getEfficiency()
{ {
AIPlayer * chk = (AIPlayer*)p; AIPlayer * chk = (AIPlayer*)p;
if(may->ability && may->ability->getActionTc() && chk->chooseTarget(may->ability->getActionTc(),NULL,NULL,true)) if(may->ability && may->ability->getActionTc() && chk->chooseTarget(may->ability->getActionTc(),NULL,NULL,true))
efficiency = 50 + (owner->getRandomGenerator()->random() % 50); efficiency = 80 + (owner->getRandomGenerator()->random() % 50);
} }
if (p->game->hand->nb_cards == 0) if (p->game->hand->nb_cards == 0)
efficiency = (int) ((float) efficiency * 1.3); //increase chance of using ability if hand is empty efficiency = (int) ((float) efficiency * 1.3); //increase chance of using ability if hand is empty
@@ -666,13 +699,18 @@ int OrderedAIAction::getEfficiency()
} }
else if (dynamic_cast<MTGAlternativeCostRule *>(a)) else if (dynamic_cast<MTGAlternativeCostRule *>(a))
{ {
efficiency += 55; efficiency += 65;
} }
else if (dynamic_cast<MTGSuspendRule *>(a)) else if (dynamic_cast<MTGSuspendRule *>(a))
{ {
efficiency += 55; efficiency += 55;
} }
SAFE_DELETE(transAbility);
if (ability->source)
if(ability->source->hasType(Subtypes::TYPE_PLANESWALKER))
efficiency += 50;
SAFE_DELETE(transAbility);
return efficiency; return efficiency;
} }
@@ -944,7 +982,7 @@ int OrderedAIAction::getRevealedEfficiency(MTGAbility * ability2)
//nothing huge here, just ensuring that Ai makes his noncreature becomers into creatures during first main, so it can actually use them in combat. //nothing huge here, just ensuring that Ai makes his noncreature becomers into creatures during first main, so it can actually use them in combat.
if (coreAbilityCardTarget && !coreAbilityCardTarget->isCreature() && currentPhase == MTG_PHASE_FIRSTMAIN) if (coreAbilityCardTarget && !coreAbilityCardTarget->isCreature() && currentPhase == MTG_PHASE_FIRSTMAIN)
{ {
eff2 = 100; eff2 = 70;
} }
break; break;
} }
@@ -957,7 +995,7 @@ int OrderedAIAction::getRevealedEfficiency(MTGAbility * ability2)
{ {
int outPut = forMana->checkActivation(); int outPut = forMana->checkActivation();
if (ability2->getCost() && outPut > int(ability2->getCost()->getConvertedCost() +1) && currentPhase == MTG_PHASE_FIRSTMAIN && ability2->source->controller()->game->hand->nb_cards > 1) if (ability2->getCost() && outPut > int(ability2->getCost()->getConvertedCost() +1) && currentPhase == MTG_PHASE_FIRSTMAIN && ability2->source->controller()->game->hand->nb_cards > 1)
eff2 = 90;//might be a bit random, but better than never using them. eff2 = 60;//might be a bit random, but better than never using them.
} }
else else
eff2 = 0; eff2 = 0;
@@ -2447,11 +2485,10 @@ int AIPlayerBaka::getEfficiency(MTGAbility * ability)
int AIPlayerBaka::selectMenuOption() int AIPlayerBaka::selectMenuOption()
{ {
ActionLayer * object = observer->mLayers->actionLayer(); ActionLayer * object = observer->mLayers->actionLayer();
int doThis = -1; int doThis = 0; // The AI just passes on things if set to -1, getEfficiency should be improved
if (object->menuObject) if (object->menuObject)
{ {
int checkedLast = 0; int checkedLast = 0;
if(object->abilitiesMenu->isMultipleChoice && object->currentActionCard) if(object->abilitiesMenu->isMultipleChoice && object->currentActionCard)
{ {
MenuAbility * currentMenu = NULL; MenuAbility * currentMenu = NULL;
@@ -2510,7 +2547,7 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
{ {
nextCardToPlay = comboCards.back(); nextCardToPlay = comboCards.back();
gotPayments.clear(); gotPayments.clear();
if((!pMana->canAfford(nextCardToPlay->getManaCost()) || nextCardToPlay->getManaCost()->getKicker())) if((!pMana->canAfford(nextCardToPlay->getManaCost()) || nextCardToPlay->getManaCost()->getKicker() || nextCardToPlay->getManaCost()->getBestow()))
gotPayments = canPayMana(nextCardToPlay,nextCardToPlay->getManaCost()); gotPayments = canPayMana(nextCardToPlay,nextCardToPlay->getManaCost());
DebugTrace("ai is doing a combo:" << nextCardToPlay->getName()); DebugTrace("ai is doing a combo:" << nextCardToPlay->getName());
comboCards.pop_back(); comboCards.pop_back();
@@ -2524,11 +2561,26 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
card = NULL; card = NULL;
gotPayments = vector<MTGAbility*>(); gotPayments = vector<MTGAbility*>();
//canplayfromgraveyard //canplayfromgraveyard
while ((card = cd.nextmatch(game->graveyard, card))&& card->has(Constants::CANPLAYFROMGRAVEYARD)) while ((card = cd.nextmatch(game->graveyard, card)))
{ {
bool hasFlashback = false;
if(card->getManaCost())
if(card->getManaCost()->getFlashback())
hasFlashback = true;
if( card->has(Constants::CANPLAYFROMGRAVEYARD) || card->has(Constants::TEMPFLASHBACK) || hasFlashback )
{
if (!CanHandleCost(card->getManaCost(),card)) if (!CanHandleCost(card->getManaCost(),card))
continue; continue;
if (hasFlashback && !CanHandleCost(card->getManaCost()->getFlashback(),card))
continue;
// Case were manacost is equal to flashback cost, if they are different the AI hangs
if (hasFlashback && (card->getManaCost() != card->getManaCost()->getFlashback()) )
continue;
if (card->hasType(Subtypes::TYPE_LAND)) if (card->hasType(Subtypes::TYPE_LAND))
{ {
if (game->playRestrictions->canPutIntoZone(card, game->inPlay) == PlayRestriction::CANT_PLAY) if (game->playRestrictions->canPutIntoZone(card, game->inPlay) == PlayRestriction::CANT_PLAY)
@@ -2619,27 +2671,27 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
} }
else else
{ {
int shouldPlay = effectBadOrGood(card); // Refactor to not check effect of lands since it always returned BAKA_EFFECT_DONTKNOW
if (shouldPlay == BAKA_EFFECT_GOOD) // If it is a land, play it
if (card->isLand())
{ {
shouldPlayPercentage = 90; shouldPlayPercentage = 90;
} }
else if (BAKA_EFFECT_DONTKNOW == shouldPlay) else {
{ int shouldPlay = effectBadOrGood(card);
//previously shouldPlayPercentage = 80;, I found this a little to high if (shouldPlay == BAKA_EFFECT_GOOD) {
//for cards which AI had no idea how to use. shouldPlayPercentage = 90;
shouldPlayPercentage = 60; }
} else if (BAKA_EFFECT_DONTKNOW == shouldPlay) {
else if (card->isLand()) //previously shouldPlayPercentage = 80;, I found this a little to high
{ //for cards which AI had no idea how to use.
shouldPlayPercentage = 90; shouldPlayPercentage = 60;
} }
else else {
{ // shouldPlay == baka_effect_bad giving it a 10 for odd ball lottery chance.
// shouldPlay == baka_effect_bad giving it a 1 for odd ball lottery chance. shouldPlayPercentage = 10;
shouldPlayPercentage = 1; }
} }
} }
//Reduce the chances of playing a spell with X cost if available mana is low //Reduce the chances of playing a spell with X cost if available mana is low
if (hasX) if (hasX)
@@ -2677,6 +2729,7 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
if (hasX) if (hasX)
maxCost = pMana->getConvertedCost(); maxCost = pMana->getConvertedCost();
} }
}
} }
//canplayfromexile //canplayfromexile
while ((card = cd.nextmatch(game->exile, card))&& card->has(Constants::CANPLAYFROMEXILE)) while ((card = cd.nextmatch(game->exile, card))&& card->has(Constants::CANPLAYFROMEXILE))
@@ -2774,27 +2827,27 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
} }
else else
{ {
int shouldPlay = effectBadOrGood(card); // Refactor to not check effect of lands since it always returned BAKA_EFFECT_DONTKNOW
if (shouldPlay == BAKA_EFFECT_GOOD) // If it is a land, play it
if (card->isLand())
{ {
shouldPlayPercentage = 90; shouldPlayPercentage = 90;
} }
else if (BAKA_EFFECT_DONTKNOW == shouldPlay) else {
{ int shouldPlay = effectBadOrGood(card);
//previously shouldPlayPercentage = 80;, I found this a little to high if (shouldPlay == BAKA_EFFECT_GOOD) {
//for cards which AI had no idea how to use. shouldPlayPercentage = 90;
shouldPlayPercentage = 60; }
} else if (BAKA_EFFECT_DONTKNOW == shouldPlay) {
else if (card->isLand()) //previously shouldPlayPercentage = 80;, I found this a little to high
{ //for cards which AI had no idea how to use.
shouldPlayPercentage = 90; shouldPlayPercentage = 60;
} }
else else {
{ // shouldPlay == baka_effect_bad giving it a 10 for odd ball lottery chance.
// shouldPlay == baka_effect_bad giving it a 1 for odd ball lottery chance. shouldPlayPercentage = 10;
shouldPlayPercentage = 1; }
} }
} }
//Reduce the chances of playing a spell with X cost if available mana is low //Reduce the chances of playing a spell with X cost if available mana is low
if (hasX) if (hasX)
@@ -2928,27 +2981,27 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
} }
else else
{ {
int shouldPlay = effectBadOrGood(card); // Refactor to not check effect of lands since it always returned BAKA_EFFECT_DONTKNOW
if (shouldPlay == BAKA_EFFECT_GOOD) // If it is a land, play it
if (card->isLand())
{ {
shouldPlayPercentage = 90; shouldPlayPercentage = 90;
} }
else if (BAKA_EFFECT_DONTKNOW == shouldPlay) else {
{ int shouldPlay = effectBadOrGood(card);
//previously shouldPlayPercentage = 80;, I found this a little to high if (shouldPlay == BAKA_EFFECT_GOOD) {
//for cards which AI had no idea how to use. shouldPlayPercentage = 90;
shouldPlayPercentage = 60; }
} else if (BAKA_EFFECT_DONTKNOW == shouldPlay) {
else if (card->isLand()) //previously shouldPlayPercentage = 80;, I found this a little to high
{ //for cards which AI had no idea how to use.
shouldPlayPercentage = 90; shouldPlayPercentage = 60;
} }
else else {
{ // shouldPlay == baka_effect_bad giving it a 10 for odd ball lottery chance.
// shouldPlay == baka_effect_bad giving it a 1 for odd ball lottery chance. shouldPlayPercentage = 10;
shouldPlayPercentage = 1; }
} }
} }
//Reduce the chances of playing a spell with X cost if available mana is low //Reduce the chances of playing a spell with X cost if available mana is low
if (hasX) if (hasX)
+1 -1
View File
@@ -463,7 +463,7 @@ void CardGui::Render()
string buff = ""; string buff = "";
string starMark = ""; string starMark = "";
if(card->exerted) if(card->exerted)
starMark += "*"; starMark += "exerted";
if(card->isToken && !card->isACopier) if(card->isToken && !card->isACopier)
buff = "T"; buff = "T";
if(card->isToken && card->isACopier) if(card->isToken && card->isACopier)
+5 -4
View File
@@ -417,10 +417,11 @@ ManaCost* CardPrimitive::getManaCost()
bool CardPrimitive::hasType(int _type) bool CardPrimitive::hasType(int _type)
{ {
for (size_t i = 0; i < types.size(); i++) if (types.size() > 400) {return false;} // Null pointer?
if (types[i] == _type) for (size_t i = 0; i < types.size(); i++)
return true; if (types[i] == _type)
return false; return true;
return false;
} }
bool CardPrimitive::hasSubtype(int _subtype) bool CardPrimitive::hasSubtype(int _subtype)
+4 -1
View File
@@ -770,7 +770,10 @@ void GameStateDuel::Update(float dt)
musictrack = "ai_baka_music_momir.mp3"; musictrack = "ai_baka_music_momir.mp3";
else if (mParent->gameType == GAME_TYPE_RANDOM1 || mParent->gameType == GAME_TYPE_RANDOM2) musictrack else if (mParent->gameType == GAME_TYPE_RANDOM1 || mParent->gameType == GAME_TYPE_RANDOM2) musictrack
= "ai_baka_music_random.mp3"; = "ai_baka_music_random.mp3";
else if (mParent->gameType == GAME_TYPE_RANDOM3 || mParent->gameType == GAME_TYPE_RANDOM5) musictrack
= "ai_baka_music_random.mp3";
else if (mParent->gameType == GAME_TYPE_HORDE) musictrack
= "ai_baka_music_momir.mp3";
if (!MusicExist(musictrack)) if (!MusicExist(musictrack))
musictrack = "ai_baka_music.mp3"; musictrack = "ai_baka_music.mp3";
+1 -1
View File
@@ -312,7 +312,7 @@ void GuiPlay::Render()
MTGCardInstance * ctarget = ((MTGCardInstance *)(*it)->card->isAttacking); MTGCardInstance * ctarget = ((MTGCardInstance *)(*it)->card->isAttacking);
if(ctarget->hasType(Subtypes::TYPE_PLANESWALKER) && observer->isInPlay(ctarget) && observer->getCurrentGamePhase() < MTG_PHASE_COMBATEND) if(ctarget->hasType(Subtypes::TYPE_PLANESWALKER) && observer->isInPlay(ctarget) && observer->getCurrentGamePhase() < MTG_PHASE_COMBATEND)
{ {
JRenderer::GetInstance()->DrawLine((*it)->actX,(*it)->actY,ctarget->view->actX,ctarget->view->actY,0.5f,ARGB(128 - wave, 255, 20, 0)); JRenderer::GetInstance()->DrawLine((*it)->actX,(*it)->actY,ctarget->view->actX,ctarget->view->actY,0.5f,ARGB(128 - wave, 255, 40, 40));
} }
} }
} }
+45 -9
View File
@@ -1835,7 +1835,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
tc->targetter = NULL; tc->targetter = NULL;
} }
else else
tc->targetter->bypassTC = false; if (tc->targetter)
tc->targetter->bypassTC = false;
sWithoutTc = splitTarget[0]; sWithoutTc = splitTarget[0];
sWithoutTc.append(splitTarget[2]); sWithoutTc.append(splitTarget[2]);
} }
@@ -1935,7 +1936,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
{ {
if (!(spell && spell->FullfilledAlternateCost(kAlternateCostIds[i]))) if (!(spell && spell->FullfilledAlternateCost(kAlternateCostIds[i])))
{ {
DebugTrace("INFO parseMagicLine: Alternative Cost was not fulfilled for " << s); DebugTrace("INFO parseMagicLine: Alternative Cost was not fulfilled for " << spell << s);
SAFE_DELETE(tc); SAFE_DELETE(tc);
return NULL; return NULL;
} }
@@ -3512,7 +3513,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
//produce additional mana when a mana is engaged //produce additional mana when a mana is engaged
if (s.find("producecolor:") != string::npos) if (s.find("producecolor:") != string::npos)
{ {
return NEW AEngagedManaAbility(observer, id, card,s.substr(13)); return NEW AEngagedManaAbility(observer, id, card,s.substr(13));
} }
@@ -4094,13 +4095,14 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return NEW ANewAffinity(observer, id, card, tcString, manaString); return NEW ANewAffinity(observer, id, card, tcString, manaString);
} }
//proliferate //proliferate, rule changes in War of the Spark set
found = s.find("proliferate"); found = s.find("proliferate");
if (found != string::npos) if (found != string::npos)
{ {
MTGAbility * a = NEW AAProliferate(observer, id, card, target); MTGAbility * a = NEW AAProliferate(observer, id, card, target);
a->oneShot = 1; a->oneShot = 1;
a->canBeInterrupted = false; a->canBeInterrupted = false;
((AAProliferate*)a)->allcounters = true;
return a; return a;
} }
//proliferate all counters //proliferate all counters
@@ -4545,6 +4547,8 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ
return BAKA_EFFECT_BAD; return BAKA_EFFECT_BAD;
if (dynamic_cast<AManaProducer *> (a)) if (dynamic_cast<AManaProducer *> (a))
return BAKA_EFFECT_GOOD; return BAKA_EFFECT_GOOD;
if (dynamic_cast<AARemoveAllCounter *> (a))
return BAKA_EFFECT_BAD;
// Equipment that gets immediately attached. Todo: check the abilities associated with Equip, to make sure they're good (for now it seems to be the majority of the cases)? // Equipment that gets immediately attached. Todo: check the abilities associated with Equip, to make sure they're good (for now it seems to be the majority of the cases)?
if (dynamic_cast<AEquip *> (a)) if (dynamic_cast<AEquip *> (a))
@@ -4568,12 +4572,12 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ
if (AAMover * aam = dynamic_cast<AAMover *>(a)) if (AAMover * aam = dynamic_cast<AAMover *>(a))
{ {
MTGGameZone * z = aam->destinationZone(target); MTGGameZone * z = aam->destinationZone(target);
if (tc && tc->targetsZone(p->game->library)) if (tc && tc->targetsZone(p->game->library)||tc && tc->targetsZone(p->game->graveyard))
{ {
if (z == p->game->hand || z == p->game->inPlay) if (z == p->game->hand || z == p->game->inPlay)
return BAKA_EFFECT_GOOD; return BAKA_EFFECT_GOOD;
} }
return BAKA_EFFECT_BAD; //TODO return BAKA_EFFECT_DONTKNOW; //TODO
} }
if (dynamic_cast<AACopier *> (a)) if (dynamic_cast<AACopier *> (a))
@@ -4598,6 +4602,31 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ
return BAKA_EFFECT_GOOD; return BAKA_EFFECT_GOOD;
if (dynamic_cast<ABushidoAbility *> (a)) if (dynamic_cast<ABushidoAbility *> (a))
return BAKA_EFFECT_GOOD; return BAKA_EFFECT_GOOD;
if (dynamic_cast<AACascade *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AACastCard *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AAFlip *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AAImprint *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<ABestow *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AExert *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<ALoseAbilities *> (a))
return BAKA_EFFECT_BAD;
if (dynamic_cast<AModularAbility *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<APaired *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AProduceMana *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AACloner *> (a))
return BAKA_EFFECT_GOOD;
if (dynamic_cast<AAModTurn *> (a))
return BAKA_EFFECT_GOOD;
if (PTInstant * abi = dynamic_cast<PTInstant *>(a)) if (PTInstant * abi = dynamic_cast<PTInstant *>(a))
return (abi->wppt->power.getValue() >= 0 && abi->wppt->toughness.getValue() >= 0) ? BAKA_EFFECT_GOOD : BAKA_EFFECT_BAD; return (abi->wppt->power.getValue() >= 0 && abi->wppt->toughness.getValue() >= 0) ? BAKA_EFFECT_GOOD : BAKA_EFFECT_BAD;
if (APowerToughnessModifier * abi = dynamic_cast<APowerToughnessModifier *>(a)) if (APowerToughnessModifier * abi = dynamic_cast<APowerToughnessModifier *>(a))
@@ -4628,6 +4657,8 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ
badAbilities[(int)Constants::NOLIFEGAINOPPONENT] = true; badAbilities[(int)Constants::NOLIFEGAINOPPONENT] = true;
badAbilities[(int)Constants::MUSTBLOCK] = true; badAbilities[(int)Constants::MUSTBLOCK] = true;
badAbilities[(int)Constants::FLYERSONLY] = true; badAbilities[(int)Constants::FLYERSONLY] = true;
badAbilities[(int)Constants::TREASON] = true;
badAbilities[(int)Constants::SHACKLER] = true;
if (AInstantBasicAbilityModifierUntilEOT * abi = dynamic_cast<AInstantBasicAbilityModifierUntilEOT *>(a)) if (AInstantBasicAbilityModifierUntilEOT * abi = dynamic_cast<AInstantBasicAbilityModifierUntilEOT *>(a))
{ {
@@ -4694,7 +4725,7 @@ int AbilityFactory::getAbilities(vector<MTGAbility *> * v, Spell * spell, MTGCar
card->exileEffects = true; card->exileEffects = true;
break; break;
} }
if (dest == zones->library) if (dest == zones->library)
{ {
magicText = card->magicTexts["library"]; magicText = card->magicTexts["library"];
break; break;
@@ -4788,7 +4819,7 @@ int AbilityFactory::getAbilities(vector<MTGAbility *> * v, Spell * spell, MTGCar
} }
else else
{ {
DebugTrace("ABILITYFACTORY ERROR: Parser returned NULL"); DebugTrace("ABILITYFACTORY ERROR: Parser returned NULL " + magicText);
} }
} }
return result; return result;
@@ -4804,7 +4835,7 @@ int AbilityFactory::getAbilities(vector<MTGAbility *> * v, Spell * spell, MTGCar
* - doTap (a dirty way to know if tapping is included in the cost... * - doTap (a dirty way to know if tapping is included in the cost...
*/ */
int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card, int mode, TargetChooser * tc, MTGGameZone * dest) int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card, int mode, TargetChooser * tc, MTGGameZone * dest)
{ {try{
int dryMode = 0; int dryMode = 0;
if (!spell && !dest) if (!spell && !dest)
dryMode = 1; dryMode = 1;
@@ -4888,6 +4919,11 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card, int
} }
return result; return result;
}
catch(exception) {
DebugTrace("MAGIC TEST ERROR: Parser returned NULL");
}
return 0;
} }
void AbilityFactory::addAbilities(int _id, Spell * spell) void AbilityFactory::addAbilities(int _id, Spell * spell)
+52 -20
View File
@@ -505,6 +505,20 @@ int MTGPutInPlayRule::reactToClick(MTGCardInstance * card)
} }
delete withKickerCost; delete withKickerCost;
} }
if (card->getManaCost()->getBestow())
{
ManaCost * withBestowCost= NEW ManaCost(card->getManaCost());
withBestowCost->add(withBestowCost->getBestow());
DebugTrace("AltCost BESTOW " << withBestowCost);
if (previousManaPool->canAfford(withBestowCost))
{
player->getManaPool()->pay(card->getManaCost()->getBestow());
payResult = ManaCost::MANA_PAID_WITH_BESTOW;
}
delete withBestowCost;
}
card->getManaCost()->doPayExtra(); card->getManaCost()->doPayExtra();
ManaCost * spellCost = previousManaPool->Diff(player->getManaPool()); ManaCost * spellCost = previousManaPool->Diff(player->getManaPool());
@@ -652,6 +666,19 @@ int MTGKickerRule::reactToClick(MTGCardInstance * card)
payResult = ManaCost::MANA_PAID_WITH_KICKER; payResult = ManaCost::MANA_PAID_WITH_KICKER;
} }
delete withKickerCost; delete withKickerCost;
}
// Handles bestow,also has to go in isExtraPaymentSet
if (card->getManaCost()->getBestow())
{
ManaCost * withBestowCost= NEW ManaCost(card->getManaCost());
withBestowCost->add(withBestowCost->getBestow());
if (previousManaPool->canAfford(withBestowCost))
{
player->getManaPool()->pay(card->getManaCost()->getBestow());
payResult = ManaCost::MANA_PAID_WITH_BESTOW;
}
delete withBestowCost;
} }
card->getManaCost()->doPayExtra(); card->getManaCost()->doPayExtra();
ManaCost * spellCost = previousManaPool->Diff(player->getManaPool()); ManaCost * spellCost = previousManaPool->Diff(player->getManaPool());
@@ -3486,7 +3513,7 @@ PermanentAbility(observer, _id)
} }
int MTGNewPlaneswalker::receiveEvent(WEvent * e) int MTGNewPlaneswalker::receiveEvent(WEvent * e)
{ {
if(game->getCurrentTargetChooser() || game->mLayers->actionLayer()->isWaitingForAnswer()) if(game->getCurrentTargetChooser() || game->mLayers->actionLayer()->isWaitingForAnswer())
return 0; return 0;
if (WEventZoneChange* ev1 = dynamic_cast<WEventZoneChange*>(e)) if (WEventZoneChange* ev1 = dynamic_cast<WEventZoneChange*>(e))
@@ -3494,7 +3521,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e)
if (ev1->to == game->players[0]->game->inPlay || ev1->to == game->players[1]->game->inPlay) if (ev1->to == game->players[0]->game->inPlay || ev1->to == game->players[1]->game->inPlay)
{ {
MTGCardInstance * card = ev1->card; MTGCardInstance * card = ev1->card;
if(card && card->hasType(Subtypes::TYPE_PLANESWALKER)) if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY))
{ {
CheckPW(card); CheckPW(card);
return 1; return 1;
@@ -3504,7 +3531,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e)
else if(WEventCardControllerChange* ev2 = dynamic_cast<WEventCardControllerChange*>(e)) else if(WEventCardControllerChange* ev2 = dynamic_cast<WEventCardControllerChange*>(e))
{ {
MTGCardInstance * card = ev2->card; MTGCardInstance * card = ev2->card;
if(card && card->hasType(Subtypes::TYPE_PLANESWALKER)) if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY))
{ {
CheckPW(card); CheckPW(card);
return 1; return 1;
@@ -3513,7 +3540,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e)
else if(WEventCardTransforms* ev3 = dynamic_cast<WEventCardTransforms*>(e)) else if(WEventCardTransforms* ev3 = dynamic_cast<WEventCardTransforms*>(e))
{ {
MTGCardInstance * card = ev3->card; MTGCardInstance * card = ev3->card;
if(card && card->hasType(Subtypes::TYPE_PLANESWALKER)) if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY))
{ {
CheckPW(card); CheckPW(card);
return 1; return 1;
@@ -3522,7 +3549,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e)
else if(WEventCardCopiedACard* ev4 = dynamic_cast<WEventCardCopiedACard*>(e)) else if(WEventCardCopiedACard* ev4 = dynamic_cast<WEventCardCopiedACard*>(e))
{ {
MTGCardInstance * card = ev4->card; MTGCardInstance * card = ev4->card;
if(card && card->hasType(Subtypes::TYPE_PLANESWALKER)) if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY))
{ {
CheckPW(card); CheckPW(card);
return 1; return 1;
@@ -3531,7 +3558,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e)
else if(WEventCardFaceUp* ev5 = dynamic_cast<WEventCardFaceUp*>(e)) else if(WEventCardFaceUp* ev5 = dynamic_cast<WEventCardFaceUp*>(e))
{ {
MTGCardInstance * card = ev5->card; MTGCardInstance * card = ev5->card;
if(card && card->hasType(Subtypes::TYPE_PLANESWALKER)) if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY))
{ {
CheckPW(card); CheckPW(card);
return 1; return 1;
@@ -3540,7 +3567,7 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e)
else if(WEventCardPhasesIn* ev6 = dynamic_cast<WEventCardPhasesIn*>(e)) else if(WEventCardPhasesIn* ev6 = dynamic_cast<WEventCardPhasesIn*>(e))
{ {
MTGCardInstance * card = ev6->card; MTGCardInstance * card = ev6->card;
if(card && card->hasType(Subtypes::TYPE_PLANESWALKER)) if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY))
{ {
CheckPW(card); CheckPW(card);
return 1; return 1;
@@ -3550,23 +3577,26 @@ int MTGNewPlaneswalker::receiveEvent(WEvent * e)
} }
int MTGNewPlaneswalker::CheckPW(MTGCardInstance * card) int MTGNewPlaneswalker::CheckPW(MTGCardInstance * card)
{ {
if(!card) if(!card)
return 0; return 0;
if(card->isPhased) if(card->isPhased)
return 0; return 0;
if(card->countDuplicateCardTypes() < 1) if (card->hasType(Subtypes::TYPE_LEGENDARY) && card->controller()->game->inPlay->hasCard(card))
if(card->has(Constants::NOLEGEND)||card->controller()->opponent()->inPlay()->hasAbility(Constants::NOLEGENDRULE)||card->controller()->inPlay()->hasAbility(Constants::NOLEGENDRULE))
return 0;
if(card->countDuplicateCardNames() <= 2)
return 0; return 0;
MovePW(card); MovePW(card);
return 1; return 1;
} }
void MTGNewPlaneswalker::MovePW(MTGCardInstance * card) void MTGNewPlaneswalker::MovePW(MTGCardInstance * card)
{ {
game->LPWeffect = true; game->LPWeffect = true;
vector<MTGAbility*>selection; vector<MTGAbility*>selection;
MTGCardInstance * myClone = NEW MTGCardInstance(card, card->controller()->game); MTGCardInstance * myClone = NEW MTGCardInstance(card, card->controller()->game);
TargetChooserFactory tfL(game); TargetChooserFactory tfL(game);
tcP = tfL.createTargetChooser("planeswalker[share!types!]|mybattlefield",myClone); tcP = tfL.createTargetChooser("*[share!name!]|mybattlefield",myClone);
tcP->targetter = NULL; tcP->targetter = NULL;
tcP->maxtargets = 1; tcP->maxtargets = 1;
PWrule = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), myClone, NULL,"ownergraveyard","Put in Graveyard"); PWrule = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), myClone, NULL,"ownergraveyard","Put in Graveyard");
@@ -3679,24 +3709,27 @@ ListMaintainerAbility(observer, _id)
int MTGPlaneWalkerRule::canBeInList(MTGCardInstance * card) int MTGPlaneWalkerRule::canBeInList(MTGCardInstance * card)
{ {
if(card->isPhased) if(card->isPhased)
return 0; return 0;
if (card->hasType(Subtypes::TYPE_PLANESWALKER) && card->controller()->game->inPlay->hasCard(card)) if (card->hasType(Subtypes::TYPE_LEGENDARY) && card->controller()->game->inPlay->hasCard(card))
{ {
return 1; if(card->has(Constants::NOLEGEND)||card->controller()->opponent()->inPlay()->hasAbility(Constants::NOLEGENDRULE)||card->controller()->inPlay()->hasAbility(Constants::NOLEGENDRULE))
return 0;
else
return 1;
} }
return 0; return 0;
} }
int MTGPlaneWalkerRule::added(MTGCardInstance * card) int MTGPlaneWalkerRule::added(MTGCardInstance * card)
{ {
map<MTGCardInstance *, bool>::iterator it; map<MTGCardInstance *, bool>::iterator it;
int destroy = 0; int destroy = 0;
vector<MTGCardInstance*>oldCards; vector<MTGCardInstance*>oldCards;
for (it = cards.begin(); it != cards.end(); it++) for (it = cards.begin(); it != cards.end(); it++)
{ {
MTGCardInstance * comparison = (*it).first; MTGCardInstance * comparison = (*it).first;
if (comparison != card && comparison->types == card->types && comparison->controller() == card->controller()) if (comparison != card && comparison->controller() == card->controller() && !(comparison->getName().compare(card->getName())))
if (!(game->getCurrentTargetChooser() || game->mLayers->actionLayer()->isWaitingForAnswer())) if (!(game->getCurrentTargetChooser() || game->mLayers->actionLayer()->isWaitingForAnswer()))
{ {
oldCards.push_back(comparison); oldCards.push_back(comparison);
@@ -3704,11 +3737,10 @@ int MTGPlaneWalkerRule::added(MTGCardInstance * card)
game->LPWeffect = true; game->LPWeffect = true;
} }
} }
if (destroy) if(destroy)
{ {
vector<MTGAbility*>selection; vector<MTGAbility*>selection;
MultiAbility * multi = NEW MultiAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card, NULL);
MultiAbility * multi = NEW MultiAbility(game,game->mLayers->actionLayer()->getMaxId(), card, card, NULL);
for(unsigned int i = 0;i < oldCards.size();i++) for(unsigned int i = 0;i < oldCards.size();i++)
{ {
AAMover *a = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), card, oldCards[i],"ownergraveyard","Keep New"); AAMover *a = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), card, oldCards[i],"ownergraveyard","Keep New");
@@ -3722,7 +3754,7 @@ int MTGPlaneWalkerRule::added(MTGCardInstance * card)
b->oneShot = true; b->oneShot = true;
MTGAbility * b1 = b; MTGAbility * b1 = b;
selection.push_back(b1); selection.push_back(b1);
MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Planeswalker Rule"); MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Legendary Rule");
menuChoice->addToGame(); menuChoice->addToGame();
} }
return 1; return 1;
+3 -1
View File
@@ -579,6 +579,8 @@ int ManaCost::hasAnotherCost()
if(kicker) if(kicker)
result = 1; result = 1;
//kicker is the only one ai knows for now, later hasAnotherCost() can be used to determine other cost types. //kicker is the only one ai knows for now, later hasAnotherCost() can be used to determine other cost types.
if(Retrace || BuyBack || alternative || FlashBack || morph || suspend || Bestow)
result = 1;
return result; return result;
} }
@@ -730,7 +732,7 @@ int ManaCost::getCost(int color)
{ {
if (cost.size() <= (size_t)color) if (cost.size() <= (size_t)color)
{ {
DebugTrace("Seems ManaCost was not properly initialized"); DebugTrace("in GetCost Seems ManaCost was not properly initialized");
return 0; return 0;
} }
return cost[color]; return cost[color];
+164 -1
View File
@@ -168,6 +168,10 @@ void Rules::addExtraRules(GameObserver* g)
difficultyRating = 0; difficultyRating = 0;
else if(g->mRules->gamemode == GAME_TYPE_RANDOM1 || g->mRules->gamemode == GAME_TYPE_RANDOM2) else if(g->mRules->gamemode == GAME_TYPE_RANDOM1 || g->mRules->gamemode == GAME_TYPE_RANDOM2)
difficultyRating = 0; difficultyRating = 0;
else if(g->mRules->gamemode == GAME_TYPE_RANDOM3 || g->mRules->gamemode == GAME_TYPE_RANDOM5)
difficultyRating = 0;
else if(g->mRules->gamemode == GAME_TYPE_HORDE)
difficultyRating = 0;
else if (g->mRules->gamemode == GAME_TYPE_STORY) else if (g->mRules->gamemode == GAME_TYPE_STORY)
difficultyRating = 0; difficultyRating = 0;
else if (a->aType == MTGAbility::STANDARD_DRAW) else if (a->aType == MTGAbility::STANDARD_DRAW)
@@ -196,9 +200,11 @@ void Rules::addExtraRules(GameObserver* g)
a->resolve(); a->resolve();
else if(g->mRules->gamemode == GAME_TYPE_RANDOM1 || g->mRules->gamemode == GAME_TYPE_RANDOM2) else if(g->mRules->gamemode == GAME_TYPE_RANDOM1 || g->mRules->gamemode == GAME_TYPE_RANDOM2)
a->resolve(); a->resolve();
else if(g->mRules->gamemode == GAME_TYPE_RANDOM3 || g->mRules->gamemode == GAME_TYPE_RANDOM5)
a->resolve();
else if (g->mRules->gamemode == GAME_TYPE_STORY) else if (g->mRules->gamemode == GAME_TYPE_STORY)
a->resolve(); a->resolve();
else//stupid protections to keep this out of mimor and other game modes. else//stupid protections to keep this out of momir and other game modes.
{ {
handsize = ((AADrawer *)a)->getNumCards(); handsize = ((AADrawer *)a)->getNumCards();
if(difficultyRating == EASY) if(difficultyRating == EASY)
@@ -305,6 +311,154 @@ Player * Rules::loadPlayerRandom(GameObserver* observer, int isAI, int mode)
return player; return player;
} }
Player * Rules::loadPlayerRandomThree(GameObserver* observer, int isAI)
{
int color1 = 1 + observer->getRandomGenerator()->random() % 5;
int color2 = 1 + observer->getRandomGenerator()->random() % 5;
int color3 = 1 + observer->getRandomGenerator()->random() % 5;
int color0 = Constants::MTG_COLOR_ARTIFACT;
int colors[] = { color1, color2, color3, color0 };
int nbcolors = 4;
string lands[] = { "", "forest", "island", "mountain", "swamp", "plains", "" };
MTGDeck * tempDeck = NEW MTGDeck(MTGCollection());
tempDeck->addRandomCards(1, 0, 0, -1, lands[color1].c_str());
tempDeck->addRandomCards(1, 0, 0, -1, lands[color2].c_str());
tempDeck->addRandomCards(1, 0, 0, -1, lands[color3].c_str());
tempDeck->addRandomCards(6, 0, 0, 'R', lands[color1].c_str());
tempDeck->addRandomCards(6, 0, 0, 'R', lands[color2].c_str());
tempDeck->addRandomCards(6, 0, 0, 'R', lands[color3].c_str());
tempDeck->addRandomCards(3, 0, 0, -1, "land");
tempDeck->addRandomCards(1, 0, 0, 'U', "land");
tempDeck->addRandomCards(1, 0, 0, 'R', "land");
tempDeck->addRandomCards(18, 0, 0, -1, "creature", colors, nbcolors);
tempDeck->addRandomCards(1, 0, 0, 'R', "creature", colors, nbcolors);
tempDeck->addRandomCards(1, 0, 0, 'M', "creature", colors, nbcolors);
tempDeck->addRandomCards(3, 0, 0, -1, "sorcery", colors, nbcolors);
tempDeck->addRandomCards(3, 0, 0, -1, "enchantment", colors, nbcolors);
tempDeck->addRandomCards(3, 0, 0, -1, "instant", colors, nbcolors);
tempDeck->addRandomCards(4, 0, 0, -1, "artifact", colors, nbcolors);
tempDeck->addRandomCards(1, 0, 0, -1, "planeswalker", colors, nbcolors);
string deckFile = "random";
string deckFileSmall = "random";
Player *player = NULL;
if (!isAI) // Human Player
player = NEW HumanPlayer(observer, deckFile, deckFileSmall, false, tempDeck);
else
player = NEW AIPlayerBaka(observer, deckFile, deckFileSmall, "", tempDeck);
return player;
}
Player * Rules::loadPlayerRandomFive(GameObserver* observer, int isAI)
{
MTGDeck * tempDeck = NEW MTGDeck(MTGCollection());
tempDeck->addRandomCards(1, 0, 0, -1, "plains");
tempDeck->addRandomCards(1, 0, 0, -1, "island");
tempDeck->addRandomCards(1, 0, 0, -1, "swamp");
tempDeck->addRandomCards(1, 0, 0, -1, "mountain");
tempDeck->addRandomCards(1, 0, 0, -1, "forest");
tempDeck->addRandomCards(3, 0, 0, 'R', "plains");
tempDeck->addRandomCards(3, 0, 0, 'R', "island");
tempDeck->addRandomCards(3, 0, 0, 'R', "swamp");
tempDeck->addRandomCards(3, 0, 0, 'R', "mountain");
tempDeck->addRandomCards(3, 0, 0, 'R', "forest");
tempDeck->addRandomCards(4, 0, 0, -1, "land");
tempDeck->addRandomCards(1, 0, 0, 'U', "land");
tempDeck->addRandomCards(1, 0, 0, 'R', "land");
tempDeck->addRandomCards(18, 0, 0, -1, "creature");
tempDeck->addRandomCards(1, 0, 0, 'R', "creature");
tempDeck->addRandomCards(1, 0, 0, 'M', "creature");
tempDeck->addRandomCards(3, 0, 0, -1, "sorcery");
tempDeck->addRandomCards(3, 0, 0, -1, "enchantment");
tempDeck->addRandomCards(3, 0, 0, -1, "instant");
tempDeck->addRandomCards(4, 0, 0, -1, "artifact");
tempDeck->addRandomCards(1, 0, 0, -1, "planeswalker");
string deckFile = "random";
string deckFileSmall = "random";
Player *player = NULL;
if (!isAI) // Human Player
player = NEW HumanPlayer(observer, deckFile, deckFileSmall, false, tempDeck);
else
player = NEW AIPlayerBaka(observer, deckFile, deckFileSmall, "", tempDeck);
return player;
}
Player * Rules::loadPlayerHorde(GameObserver* observer, int isAI)
{
int nbColors = 1;
string randomTribe = "";
int tribeColor[] = { observer->getRandomGenerator()->random() % 6 };
string lands[] = { "land", "forest", "island", "mountain", "swamp", "plains" };
const char* const multicolorTribes[] = { "Ally", "Atog", "Eldrazi", "Elemental", "Human", "Knight",
"Myr", "Samurai", "Shaman", "Shapeshifter", "Sliver", "Soldier", "Spellshaper" };
const char* const whiteTribes[] = { "Angel","Cat", "Griffin", "Kithkin", "Knight", "Pegasus", "Soldier" };
const char* const blueTribes[] = { "Artificer", "Merfolk", "Drake", "Faerie", "Illusion", "Vedalken" };
const char* const blackTribes[] = { "Demon", "Faerie", "Horror", "Pirate", "Rat", "Shade", "Skeleton", "Vampire", "Zombie" };
const char* const redTribes[] = { "Barbarian", "Berserker","Cat", "Devil", "Goblin", "Minotaur", "Werewolf" };
const char* const greenTribes[] = { "Beast", "Cat", "Centaur", "Dinosaur", "Druid", "Elf", "Fungus",
"Saproling", "Spider", "Treefolk", "Werewolf" };
int multicolorTribesSize = sizeof(multicolorTribes)/sizeof(multicolorTribes[0]);
int whiteTribesSize = sizeof(whiteTribes)/sizeof(whiteTribes[0]);
int blueTribesSize = sizeof(blueTribes)/sizeof(blueTribes[0]);
int blackTribesSize = sizeof(blackTribes)/sizeof(blackTribes[0]);
int redTribesSize = sizeof(redTribes)/sizeof(redTribes[0]);
int greenTribesSize = sizeof(greenTribes)/sizeof(greenTribes[0]);
switch (tribeColor[0])
{
case Constants::MTG_COLOR_ARTIFACT :
randomTribe = multicolorTribes[observer->getRandomGenerator()->random() % multicolorTribesSize];
nbColors = 0;
break;
case Constants::MTG_COLOR_WHITE :
randomTribe = whiteTribes[observer->getRandomGenerator()->random() % whiteTribesSize];
break;
case Constants::MTG_COLOR_BLUE :
randomTribe = blueTribes[observer->getRandomGenerator()->random() % blueTribesSize];
break;
case Constants::MTG_COLOR_BLACK :
randomTribe = blackTribes[observer->getRandomGenerator()->random() % blackTribesSize];
break;
case Constants::MTG_COLOR_RED :
randomTribe = redTribes[observer->getRandomGenerator()->random() % redTribesSize];
break;
case Constants::MTG_COLOR_GREEN :
randomTribe = greenTribes[observer->getRandomGenerator()->random() % greenTribesSize];
break;
}
MTGDeck * tempDeck = NEW MTGDeck(MTGCollection());
tempDeck->addRandomCards(16, 0, 0, -1, lands[tribeColor[0]].c_str());
tempDeck->addRandomCards(4, 0, 0, 'R', lands[tribeColor[0]].c_str());
tempDeck->addRandomCards(4, 0, 0, -1, "land");
tempDeck->addRandomCards(21, 0, 0, -1, randomTribe);
tempDeck->addRandomCards(5, 0, 0, -1, "enchantment", tribeColor, nbColors);
tempDeck->addRandomCards(5, 0, 0, -1, "instant", tribeColor, nbColors);
tempDeck->addRandomCards(5, 0, 0, -1, "sorcery", tribeColor, nbColors);
string deckFile = "random";
string deckFileSmall = "random";
Player *player = NULL;
if (!isAI) // Human Player
player = NEW HumanPlayer(observer, deckFile, deckFileSmall, false, tempDeck);
else
player = NEW AIPlayerBaka(observer, deckFile, deckFileSmall, "", tempDeck);
return player;
}
Player * Rules::initPlayer(GameObserver *g, int playerId) Player * Rules::initPlayer(GameObserver *g, int playerId)
{ {
Player * p = g->players.size() > 1?g->players[playerId]:NULL; Player * p = g->players.size() > 1?g->players[playerId]:NULL;
@@ -322,6 +476,12 @@ Player * Rules::initPlayer(GameObserver *g, int playerId)
return loadPlayerRandom(g, isAI, GAME_TYPE_RANDOM1); return loadPlayerRandom(g, isAI, GAME_TYPE_RANDOM1);
case GAME_TYPE_RANDOM2: case GAME_TYPE_RANDOM2:
return loadPlayerRandom(g, isAI, GAME_TYPE_RANDOM2); return loadPlayerRandom(g, isAI, GAME_TYPE_RANDOM2);
case GAME_TYPE_RANDOM3:
return loadPlayerRandomThree(g, isAI);
case GAME_TYPE_RANDOM5:
return loadPlayerRandomFive(g, isAI);
case GAME_TYPE_HORDE:
return loadPlayerHorde(g, isAI);
default: default:
return NULL; return NULL;
} }
@@ -627,6 +787,9 @@ GameType Rules::strToGameMode(string s)
if (s.compare("momir") == 0) return GAME_TYPE_MOMIR; if (s.compare("momir") == 0) return GAME_TYPE_MOMIR;
if (s.compare("random1") == 0) return GAME_TYPE_RANDOM1; if (s.compare("random1") == 0) return GAME_TYPE_RANDOM1;
if (s.compare("random2") == 0) return GAME_TYPE_RANDOM2; if (s.compare("random2") == 0) return GAME_TYPE_RANDOM2;
if (s.compare("random3") == 0) return GAME_TYPE_RANDOM3;
if (s.compare("random5") == 0) return GAME_TYPE_RANDOM5;
if (s.compare("horde") == 0) return GAME_TYPE_HORDE;
if (s.compare("story") == 0) return GAME_TYPE_STORY; if (s.compare("story") == 0) return GAME_TYPE_STORY;
if (s.compare("stonehewer") == 0) return GAME_TYPE_STONEHEWER; if (s.compare("stonehewer") == 0) return GAME_TYPE_STONEHEWER;
if (s.compare("hermit") == 0) return GAME_TYPE_HERMIT; if (s.compare("hermit") == 0) return GAME_TYPE_HERMIT;